@lovrabet/lovrabet-cli 2.0.1-beta.5 → 2.0.1-beta.7

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.
Files changed (49) hide show
  1. package/lib/auth/auth-server-ui.js +1 -1
  2. package/lib/auth/auth-server.js +1 -1
  3. package/lib/auth/constant.js +1 -1
  4. package/lib/auth/get-cookie.js +1 -1
  5. package/lib/auth/is-session-valid.js +1 -1
  6. package/lib/auth/logout.js +1 -1
  7. package/lib/cli.js +1 -1
  8. package/lib/commands/app/definitions.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/auth/index.js +1 -1
  11. package/lib/commands/bff/detail.js +1 -1
  12. package/lib/commands/bff/exec.js +1 -1
  13. package/lib/commands/bff/index.js +1 -1
  14. package/lib/commands/common/constraints.js +1 -1
  15. package/lib/commands/common/flags.js +1 -1
  16. package/lib/commands/config/definitions.js +1 -1
  17. package/lib/commands/config/shared.js +1 -1
  18. package/lib/commands/data/index.js +1 -1
  19. package/lib/commands/dataset/detail.js +1 -1
  20. package/lib/commands/dataset/index.js +1 -1
  21. package/lib/commands/dataset/list.js +1 -1
  22. package/lib/commands/init/index.js +1 -1
  23. package/lib/commands/init.js +1 -1
  24. package/lib/commands/logs/index.js +1 -1
  25. package/lib/commands/registry.js +1 -1
  26. package/lib/commands/sql/detail.js +1 -1
  27. package/lib/commands/sql/exec.js +1 -1
  28. package/lib/commands/sql/index.js +1 -1
  29. package/lib/constant/cli.js +1 -1
  30. package/lib/constant/domain.js +1 -1
  31. package/lib/constant/env.js +1 -1
  32. package/lib/context.js +1 -1
  33. package/lib/core/api-client.js +1 -1
  34. package/lib/core/db-resolver.js +1 -1
  35. package/lib/core/sdk-client.js +1 -1
  36. package/lib/errors.js +1 -1
  37. package/lib/framework/dryrun.js +1 -1
  38. package/lib/framework/flags.js +1 -1
  39. package/lib/framework/help.js +1 -1
  40. package/lib/framework/index.js +1 -1
  41. package/lib/framework/output.js +1 -1
  42. package/lib/framework/preparse.js +1 -1
  43. package/lib/framework/response.js +1 -1
  44. package/lib/framework/runner.js +1 -1
  45. package/lib/framework/types.js +1 -1
  46. package/lib/help.js +1 -1
  47. package/lib/utils/logger.js +1 -1
  48. package/lib/utils/params.js +1 -1
  49. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x116458,_0x444614){const _0xac3e7b=a0_0x3fbe,_0x443f0c=_0x116458();while(!![]){try{const _0x315e59=-parseInt(_0xac3e7b(0x169))/0x1+parseInt(_0xac3e7b(0x156))/0x2*(parseInt(_0xac3e7b(0x161))/0x3)+-parseInt(_0xac3e7b(0x16c))/0x4*(parseInt(_0xac3e7b(0x15a))/0x5)+-parseInt(_0xac3e7b(0x157))/0x6*(parseInt(_0xac3e7b(0x15c))/0x7)+-parseInt(_0xac3e7b(0x158))/0x8*(parseInt(_0xac3e7b(0x166))/0x9)+parseInt(_0xac3e7b(0x168))/0xa+parseInt(_0xac3e7b(0x159))/0xb*(parseInt(_0xac3e7b(0x15d))/0xc);if(_0x315e59===_0x444614)break;else _0x443f0c['push'](_0x443f0c['shift']());}catch(_0x5c3663){_0x443f0c['push'](_0x443f0c['shift']());}}}(a0_0xd911,0x3d846));import{jsx as a0_0x21c54a,jsxs as a0_0x143329}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';function a0_0xd911(){const _0x43be2c=['finally','2644520fCqgSa','485999QVQMPx','column','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','4iFVOYK','*\x20Press\x20Enter\x20to\x20start\x20login.','2KqlBuA','102BynYYC','61928mATcbp','2533278KVVGed','913405dkfmLu','return','74662fFnBKz','36wZDryQ','log','Press\x20\x22q\x22\x20to\x20exit.','green','834681CbRmjb','Please\x20complete\x20login\x20in\x20your\x20browser.','dots','gray','then','153DkDIFB'];a0_0xd911=function(){return _0x43be2c;};return a0_0xd911();}import{authServer}from'./auth-server.js';function a0_0x3fbe(_0x448f15,_0x4c05a3){_0x448f15=_0x448f15-0x156;const _0xd91196=a0_0xd911();let _0x3fbe04=_0xd91196[_0x448f15];return _0x3fbe04;}import a0_0x39095b from'ink-spinner';export function AuthServer(){const _0x1be5ad=a0_0x3fbe,{exit:_0x51af3f}=useApp(),[_0x215e04,_0x21120a]=useState(![]),[_0x7329c7,_0x341951]=useState(!![]),[_0x4cbb74,_0x3cdd69]=useState(![]),[_0x425a4a,_0x305cd0]=useState(![]);useEffect(()=>{const _0x55ee5d=a0_0x3fbe;getIsSessionValid()[_0x55ee5d(0x165)](_0x21120a)[_0x55ee5d(0x167)](()=>_0x341951(![]));},[]),useEffect(()=>{const _0x34de18=a0_0x3fbe;!_0x7329c7&&_0x215e04&&(console[_0x34de18(0x15e)](_0x34de18(0x16b)),_0x51af3f());},[_0x7329c7,_0x215e04,_0x51af3f]),useEffect(()=>{const _0x364e20=a0_0x3fbe;_0x425a4a&&(console[_0x364e20(0x15e)]('*\x20Login\x20successful!'),_0x51af3f());},[_0x425a4a,_0x51af3f]),useInput((_0x44130b,_0x101bc3)=>{const _0x4c6a93=a0_0x3fbe;_0x101bc3[_0x4c6a93(0x15b)]&&(_0x3cdd69(!![]),authServer({'silent':!![]})[_0x4c6a93(0x165)](_0x3405a0=>{_0x305cd0(_0x3405a0);})),_0x44130b==='q'&&_0x51af3f();});if(_0x7329c7)return null;if(_0x215e04||_0x425a4a)return null;return a0_0x21c54a(Box,{'flexDirection':_0x1be5ad(0x16a),'marginTop':0x1,'marginBottom':0x1,'children':_0x4cbb74?a0_0x143329(Box,{'children':[a0_0x21c54a(Box,{'width':'1'}),a0_0x143329(Text,{'color':_0x1be5ad(0x160),'children':[a0_0x21c54a(a0_0x39095b,{'type':_0x1be5ad(0x163)}),'\x20\x20']}),a0_0x21c54a(Text,{'children':'Logging\x20in...\x20'}),a0_0x21c54a(Text,{'color':_0x1be5ad(0x164),'children':_0x1be5ad(0x162)})]}):a0_0x143329(Box,{'children':[a0_0x21c54a(Box,{'width':'1'}),a0_0x21c54a(Text,{'children':_0x1be5ad(0x16d)}),a0_0x21c54a(Text,{'color':_0x1be5ad(0x164),'children':_0x1be5ad(0x15f)})]})});}
1
+ (function(_0xa1d23c,_0x3a4bd1){const _0x270995=a0_0x4539,_0x1090a5=_0xa1d23c();while(!![]){try{const _0x5688c4=parseInt(_0x270995(0x150))/0x1+-parseInt(_0x270995(0x147))/0x2*(parseInt(_0x270995(0x14b))/0x3)+-parseInt(_0x270995(0x155))/0x4*(parseInt(_0x270995(0x153))/0x5)+parseInt(_0x270995(0x14d))/0x6*(-parseInt(_0x270995(0x14f))/0x7)+-parseInt(_0x270995(0x154))/0x8*(-parseInt(_0x270995(0x14e))/0x9)+-parseInt(_0x270995(0x14c))/0xa*(-parseInt(_0x270995(0x14a))/0xb)+parseInt(_0x270995(0x148))/0xc*(parseInt(_0x270995(0x15b))/0xd);if(_0x5688c4===_0x3a4bd1)break;else _0x1090a5['push'](_0x1090a5['shift']());}catch(_0x463b0c){_0x1090a5['push'](_0x1090a5['shift']());}}}(a0_0x21b3,0xc085a));function a0_0x4539(_0x13e25a,_0x2c7a41){_0x13e25a=_0x13e25a-0x145;const _0x21b310=a0_0x21b3();let _0x4539e8=_0x21b310[_0x13e25a];return _0x4539e8;}import{jsx as a0_0x408756,jsxs as a0_0x39faf3}from'react/jsx-runtime';function a0_0x21b3(){const _0x53bc26=['return','*\x20Press\x20Enter\x20to\x20start\x20login.','then','gray','dots','131729bWHbYP','finally','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','Logging\x20in...\x20','94230GxDHjK','3084DsTkGD','green','1502908lBOFBM','9TdTirB','10bptakT','18neMHpj','696015nyghQz','2907737FLPNMa','380715eZqVMT','log','*\x20Login\x20successful!','23410uoxaOe','32HmvqGQ','1072QZyWJJ'];a0_0x21b3=function(){return _0x53bc26;};return a0_0x21b3();}import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a0_0x532496 from'ink-spinner';export function AuthServer(){const _0x5d4a1b=a0_0x4539,{exit:_0x18de9b}=useApp(),[_0x458ded,_0x4a6640]=useState(![]),[_0x43bfa6,_0x11ef08]=useState(!![]),[_0x24af00,_0x558988]=useState(![]),[_0x3c9bd1,_0xc246bd]=useState(![]);useEffect(()=>{const _0x5a2ce1=a0_0x4539;getIsSessionValid()[_0x5a2ce1(0x158)](_0x4a6640)[_0x5a2ce1(0x15c)](()=>_0x11ef08(![]));},[]),useEffect(()=>{const _0x362f6c=a0_0x4539;!_0x43bfa6&&_0x458ded&&(console[_0x362f6c(0x151)](_0x362f6c(0x145)),_0x18de9b());},[_0x43bfa6,_0x458ded,_0x18de9b]),useEffect(()=>{const _0x154499=a0_0x4539;_0x3c9bd1&&(console[_0x154499(0x151)](_0x154499(0x152)),_0x18de9b());},[_0x3c9bd1,_0x18de9b]),useInput((_0x58e8de,_0x277dfc)=>{const _0x551abd=a0_0x4539;_0x277dfc[_0x551abd(0x156)]&&(_0x558988(!![]),authServer({'silent':!![]})[_0x551abd(0x158)](_0x227d10=>{_0xc246bd(_0x227d10);})),_0x58e8de==='q'&&_0x18de9b();});if(_0x43bfa6)return null;if(_0x458ded||_0x3c9bd1)return null;return a0_0x408756(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':_0x24af00?a0_0x39faf3(Box,{'children':[a0_0x408756(Box,{'width':'1'}),a0_0x39faf3(Text,{'color':_0x5d4a1b(0x149),'children':[a0_0x408756(a0_0x532496,{'type':_0x5d4a1b(0x15a)}),'\x20\x20']}),a0_0x408756(Text,{'children':_0x5d4a1b(0x146)}),a0_0x408756(Text,{'color':'gray','children':'Please\x20complete\x20login\x20in\x20your\x20browser.'})]}):a0_0x39faf3(Box,{'children':[a0_0x408756(Box,{'width':'1'}),a0_0x408756(Text,{'children':_0x5d4a1b(0x157)}),a0_0x408756(Text,{'color':_0x5d4a1b(0x159),'children':'Press\x20\x22q\x22\x20to\x20exit.'})]})});}
@@ -1 +1 @@
1
- (function(_0x3e7837,_0x3d34a3){const _0x11c1a2=a1_0x28ea,_0x536f7c=_0x3e7837();while(!![]){try{const _0x37b9f6=-parseInt(_0x11c1a2(0x1b9))/0x1*(-parseInt(_0x11c1a2(0x1ad))/0x2)+-parseInt(_0x11c1a2(0x199))/0x3*(parseInt(_0x11c1a2(0x196))/0x4)+-parseInt(_0x11c1a2(0x1a2))/0x5*(parseInt(_0x11c1a2(0x1ae))/0x6)+parseInt(_0x11c1a2(0x1af))/0x7+-parseInt(_0x11c1a2(0x1b5))/0x8*(parseInt(_0x11c1a2(0x1a5))/0x9)+-parseInt(_0x11c1a2(0x191))/0xa+-parseInt(_0x11c1a2(0x1b4))/0xb*(-parseInt(_0x11c1a2(0x1a4))/0xc);if(_0x37b9f6===_0x3d34a3)break;else _0x536f7c['push'](_0x536f7c['shift']());}catch(_0x4c36c2){_0x536f7c['push'](_0x536f7c['shift']());}}}(a1_0x2165,0x54de8));import{writeFileSync}from'node:fs';import a1_0x16de43 from'node:https';function a1_0x2165(){const _0x1a6a8c=['createServer','127.0.0.1','address','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','headers','then','354298nUHFfj','6yvftBA','2067646zSgeKu','writeHead','json','object','utf-8','10123003fkfZcL','8LYyjrN','Login\x20successful.\x20Please\x20return\x20to\x20the\x20CLI\x20to\x20continue.\x20This\x20window\x20will\x20close\x20in\x20','open\x20\x22','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','1fGLCNk','/sign-in?redirect=','catch','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','log','darwin','port','session','platform','<span\x20id=\x22t\x22>5</span>','text/html;\x20charset=utf-8','1089140HEvnbt','silent','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','/api/auth/get-session','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','20aMUfhq','cookie','</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','247503IixhDE','📍\x20Login\x20URL:','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','close','end','user','error','🔐\x20Starting\x20login\x20service...','win32','125830jrDbeG','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','12oXxlGZ','4487319aAmFNc','https://dev.lovrabet.com:'];a1_0x2165=function(){return _0x1a6a8c;};return a1_0x2165();}function a1_0x28ea(_0x3c03ff,_0x5d8731){_0x3c03ff=_0x3c03ff-0x18b;const _0x2165c5=a1_0x2165();let _0x28ea9f=_0x2165c5[_0x3c03ff];return _0x28ea9f;}import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x4172c1){const _0x2c20f6=a1_0x28ea,_0x4e5419=_0x4172c1?.[_0x2c20f6(0x192)]||![];if(await getIsSessionValid())return!![];const _0x3cbdf3=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x2c20f6(0x1b1)]();return new Promise(async(_0x3a5d0c,_0x46e7fd)=>{const _0x50bb33=_0x2c20f6;let _0x4ce47e=0x0;const _0x2f3a8f=a1_0x16de43[_0x50bb33(0x1a7)](_0x3cbdf3,async(_0x12af1d,_0x505205)=>{const _0x3a037c=_0x50bb33,_0x19998e=getUserDomain(),_0x11974a=_0x12af1d[_0x3a037c(0x1ab)][_0x3a037c(0x197)]||'',_0x51ac10=await fetch(_0x19998e+_0x3a037c(0x194),{'headers':{'cookie':_0x11974a}})['then'](_0x5bd648=>_0x5bd648[_0x3a037c(0x1b1)]()),_0x46e71f=_0x51ac10&&_0x51ac10[_0x3a037c(0x18d)]&&_0x51ac10[_0x3a037c(0x19e)];if(_0x46e71f){writeFileSync(cookieFile,_0x11974a,_0x3a037c(0x1b3)),_0x3a5d0c(!![]);const _0x43cd9c='Login\x20Successful',_0x11b802=_0x3a037c(0x1b6)+_0x3a037c(0x18f)+'\x20seconds.',_0x5a06c5='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.',_0x3f8b41=_0x3a037c(0x1aa)+_0x43cd9c+'</title></head>\x0a<body>\x0a\x20\x20<div>'+_0x11b802+_0x3a037c(0x195)+_0x5a06c5+_0x3a037c(0x198);_0x505205[_0x3a037c(0x1b0)](0xc8,{'Content-Type':_0x3a037c(0x190)}),_0x505205[_0x3a037c(0x19d)](_0x3f8b41),_0x2f3a8f[_0x3a037c(0x19c)]();}else{const _0x4a4404=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x4ce47e);_0x505205[_0x3a037c(0x1b0)](0x12e,{'location':_0x19998e+_0x3a037c(0x1ba)+_0x4a4404}),_0x505205[_0x3a037c(0x19d)]();return;}});_0x2f3a8f['listen'](0x0,_0x50bb33(0x1a8),()=>{const _0x2d9d71=_0x50bb33,_0x104fc4=_0x2f3a8f[_0x2d9d71(0x1a9)]();_0x4ce47e=typeof _0x104fc4===_0x2d9d71(0x1b2)&&_0x104fc4?_0x104fc4[_0x2d9d71(0x18c)]:Number(_0x104fc4);const _0x45142a=_0x2d9d71(0x1a6)+_0x4ce47e;!_0x4e5419&&(console[_0x2d9d71(0x1bd)](_0x2d9d71(0x1a0)),console[_0x2d9d71(0x1bd)](_0x2d9d71(0x19a),_0x45142a),console[_0x2d9d71(0x1bd)](_0x2d9d71(0x193)),console['log'](''),console[_0x2d9d71(0x1bd)](_0x2d9d71(0x19b)),console[_0x2d9d71(0x1bd)]('')),openInBrowser(_0x45142a)[_0x2d9d71(0x1ac)](_0x51a33e=>{const _0x4b02fa=_0x2d9d71;!_0x4e5419&&(_0x51a33e?console[_0x4b02fa(0x1bd)](_0x4b02fa(0x1a3)):(console[_0x4b02fa(0x1bd)](_0x4b02fa(0x1b8)),console['log'](_0x4b02fa(0x1bc),_0x45142a)),console['log'](''));})[_0x2d9d71(0x1bb)](()=>{const _0x531575=_0x2d9d71;!_0x4e5419&&(console['log'](_0x531575(0x1b8)),console[_0x531575(0x1bd)](_0x531575(0x1bc),_0x45142a),console[_0x531575(0x1bd)](''));});}),_0x2f3a8f['on'](_0x50bb33(0x19f),_0x3ab38c=>{const _0x30e1cc=_0x50bb33;!_0x4e5419&&console[_0x30e1cc(0x19f)]('Auth\x20server\x20error:',_0x3ab38c),_0x46e7fd(_0x3ab38c);});});}function openInBrowser(_0xb0401b){return new Promise(_0x49200b=>{const _0x1cfff4=a1_0x28ea,_0x599d8a=process[_0x1cfff4(0x18e)];let _0x3456ee;if(_0x599d8a===_0x1cfff4(0x1a1))_0x3456ee='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0xb0401b+'\x22';else _0x599d8a===_0x1cfff4(0x18b)?_0x3456ee=_0x1cfff4(0x1b7)+_0xb0401b+'\x22':_0x3456ee='xdg-open\x20\x22'+_0xb0401b+'\x22';exec(_0x3456ee,_0xdeaf24=>{_0xdeaf24?_0x49200b(![]):_0x49200b(!![]);});});}
1
+ (function(_0x10e5fc,_0x13d32c){const _0x17e5cb=a1_0x2fb5,_0x595348=_0x10e5fc();while(!![]){try{const _0x55471a=parseInt(_0x17e5cb(0xe3))/0x1+-parseInt(_0x17e5cb(0xcc))/0x2+-parseInt(_0x17e5cb(0xd5))/0x3+-parseInt(_0x17e5cb(0xc7))/0x4+-parseInt(_0x17e5cb(0xcd))/0x5*(parseInt(_0x17e5cb(0xcb))/0x6)+-parseInt(_0x17e5cb(0xbc))/0x7+-parseInt(_0x17e5cb(0xd8))/0x8*(-parseInt(_0x17e5cb(0xc0))/0x9);if(_0x55471a===_0x13d32c)break;else _0x595348['push'](_0x595348['shift']());}catch(_0xa3ccc5){_0x595348['push'](_0x595348['shift']());}}}(a1_0x15b7,0xc3502));import{writeFileSync}from'node:fs';import a1_0x1a41d2 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';function a1_0x15b7(){const _0x23d926=['then','xdg-open\x20\x22','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','127.0.0.1','851265LYYfmJ','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','2732072FeoLiL','object','https://dev.lovrabet.com:','port','darwin','win32','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','error','Auth\x20server\x20error:','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','<span\x20id=\x22t\x22>5</span>','836781lUgiRu','createServer','end','platform','utf-8','json','</title></head>\x0a<body>\x0a\x20\x20<div>','catch','🔐\x20Starting\x20login\x20service...','Login\x20successful.\x20Please\x20return\x20to\x20the\x20CLI\x20to\x20continue.\x20This\x20window\x20will\x20close\x20in\x20','5821172lEhGJm','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','listen','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','117yDBzaL','/api/auth/get-session','session','cookie','/sign-in?redirect=','close','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','4905760pdjZDP','https://g.yuntooai.com/cert/lovrabet-dev.json','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','Login\x20Successful','762dYKjCH','1843256oXlBVa','47755orzVQV','headers','log','\x20seconds.'];a1_0x15b7=function(){return _0x23d926;};return a1_0x15b7();}function a1_0x2fb5(_0x228ed0,_0x21b9e0){_0x228ed0=_0x228ed0-0xb5;const _0x15b7b8=a1_0x15b7();let _0x2fb559=_0x15b7b8[_0x228ed0];return _0x2fb559;}import{cookieFile}from'./constant.js';export async function authServer(_0x37a059){const _0x594853=a1_0x2fb5,_0x273945=_0x37a059?.['silent']||![];if(await getIsSessionValid())return!![];const _0x28d9de=await(await fetch(_0x594853(0xc8)))[_0x594853(0xb7)]();return new Promise(async(_0x4d6344,_0x548f5f)=>{const _0x3eb2d1=_0x594853;let _0x7f19f2=0x0;const _0xa2cd5e=a1_0x1a41d2[_0x3eb2d1(0xe4)](_0x28d9de,async(_0x11204e,_0x53bfef)=>{const _0x4baa82=_0x3eb2d1,_0x1f0664=getUserDomain(),_0xebd70c=_0x11204e[_0x4baa82(0xce)][_0x4baa82(0xc3)]||'',_0xc00922=await fetch(_0x1f0664+_0x4baa82(0xc1),{'headers':{'cookie':_0xebd70c}})[_0x4baa82(0xd1)](_0x4c82da=>_0x4c82da[_0x4baa82(0xb7)]()),_0x4130c4=_0xc00922&&_0xc00922[_0x4baa82(0xc2)]&&_0xc00922['user'];if(_0x4130c4){writeFileSync(cookieFile,_0xebd70c,_0x4baa82(0xb6)),_0x4d6344(!![]);const _0x15343f=_0x4baa82(0xca),_0x14486e=_0x4baa82(0xbb)+_0x4baa82(0xe2)+_0x4baa82(0xd0),_0xb80c8=_0x4baa82(0xd3),_0x1c5a81=_0x4baa82(0xe1)+_0x15343f+_0x4baa82(0xb8)+_0x14486e+_0x4baa82(0xc6)+_0xb80c8+_0x4baa82(0xd7);_0x53bfef['writeHead'](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x53bfef['end'](_0x1c5a81),_0xa2cd5e[_0x4baa82(0xc5)]();}else{const _0x3896f4=''+encodeURIComponent(_0x4baa82(0xda)+_0x7f19f2);_0x53bfef['writeHead'](0x12e,{'location':_0x1f0664+_0x4baa82(0xc4)+_0x3896f4}),_0x53bfef[_0x4baa82(0xe5)]();return;}});_0xa2cd5e[_0x3eb2d1(0xbe)](0x0,_0x3eb2d1(0xd4),()=>{const _0x160377=_0x3eb2d1,_0x25f14d=_0xa2cd5e['address']();_0x7f19f2=typeof _0x25f14d===_0x160377(0xd9)&&_0x25f14d?_0x25f14d[_0x160377(0xdb)]:Number(_0x25f14d);const _0x6e0e0c=_0x160377(0xda)+_0x7f19f2;!_0x273945&&(console[_0x160377(0xcf)](_0x160377(0xba)),console[_0x160377(0xcf)]('📍\x20Login\x20URL:',_0x6e0e0c),console[_0x160377(0xcf)](_0x160377(0xde)),console[_0x160377(0xcf)](''),console[_0x160377(0xcf)](_0x160377(0xbf)),console[_0x160377(0xcf)]('')),openInBrowser(_0x6e0e0c)[_0x160377(0xd1)](_0x150ade=>{const _0x33794b=_0x160377;!_0x273945&&(_0x150ade?console[_0x33794b(0xcf)](_0x33794b(0xbd)):(console[_0x33794b(0xcf)](_0x33794b(0xd6)),console['log'](_0x33794b(0xc9),_0x6e0e0c)),console[_0x33794b(0xcf)](''));})[_0x160377(0xb9)](()=>{const _0x2019d8=_0x160377;!_0x273945&&(console[_0x2019d8(0xcf)](_0x2019d8(0xd6)),console[_0x2019d8(0xcf)]('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x6e0e0c),console[_0x2019d8(0xcf)](''));});}),_0xa2cd5e['on'](_0x3eb2d1(0xdf),_0x38727e=>{const _0x4bccaf=_0x3eb2d1;!_0x273945&&console[_0x4bccaf(0xdf)](_0x4bccaf(0xe0),_0x38727e),_0x548f5f(_0x38727e);});});}function openInBrowser(_0x164782){return new Promise(_0x5f8629=>{const _0x3173eb=a1_0x2fb5,_0x5f4514=process[_0x3173eb(0xb5)];let _0x4dbf6d;if(_0x5f4514===_0x3173eb(0xdd))_0x4dbf6d='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0x164782+'\x22';else _0x5f4514===_0x3173eb(0xdc)?_0x4dbf6d='open\x20\x22'+_0x164782+'\x22':_0x4dbf6d=_0x3173eb(0xd2)+_0x164782+'\x22';exec(_0x4dbf6d,_0xe51a56=>{_0xe51a56?_0x5f8629(![]):_0x5f8629(!![]);});});}
@@ -1 +1 @@
1
- function a2_0x38ed(_0x121990,_0x3bce45){_0x121990=_0x121990-0xea;const _0x4a8390=a2_0x4a83();let _0x38ed33=_0x4a8390[_0x121990];return _0x38ed33;}const a2_0x7121e3=a2_0x38ed;(function(_0x795d4a,_0x1ef014){const _0x7d53b2=a2_0x38ed,_0x16d530=_0x795d4a();while(!![]){try{const _0x2ea56b=-parseInt(_0x7d53b2(0xec))/0x1+-parseInt(_0x7d53b2(0xf2))/0x2+parseInt(_0x7d53b2(0xea))/0x3*(parseInt(_0x7d53b2(0xed))/0x4)+parseInt(_0x7d53b2(0xf3))/0x5*(parseInt(_0x7d53b2(0xf0))/0x6)+-parseInt(_0x7d53b2(0xf4))/0x7*(parseInt(_0x7d53b2(0xf1))/0x8)+parseInt(_0x7d53b2(0xeb))/0x9+parseInt(_0x7d53b2(0xee))/0xa;if(_0x2ea56b===_0x1ef014)break;else _0x16d530['push'](_0x16d530['shift']());}catch(_0x4c502d){_0x16d530['push'](_0x16d530['shift']());}}}(a2_0x4a83,0x7ff2a));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a2_0x7121e3(0xf5));function a2_0x4a83(){const _0x3d2303=['4656FTkzny','7770700ovpXfW','cookie','65802DkemXZ','233712aPNDgm','1202316vrugjF','205WXmUPy','7OnjwXz','.lovrabet','1614oFJeit','2636874XENqwJ','991489OpTtjQ'];a2_0x4a83=function(){return _0x3d2303;};return a2_0x4a83();}export const cookieFile=join(configDir,a2_0x7121e3(0xef));mkdirSync(configDir,{'recursive':!![]});
1
+ const a2_0x861a41=a2_0x5bb1;(function(_0x58f5a4,_0x54c64b){const _0x26fc19=a2_0x5bb1,_0x4fd027=_0x58f5a4();while(!![]){try{const _0x9e914c=parseInt(_0x26fc19(0x6e))/0x1+parseInt(_0x26fc19(0x6b))/0x2+parseInt(_0x26fc19(0x6f))/0x3*(-parseInt(_0x26fc19(0x70))/0x4)+-parseInt(_0x26fc19(0x72))/0x5+-parseInt(_0x26fc19(0x68))/0x6*(-parseInt(_0x26fc19(0x69))/0x7)+parseInt(_0x26fc19(0x6a))/0x8*(-parseInt(_0x26fc19(0x6d))/0x9)+parseInt(_0x26fc19(0x6c))/0xa;if(_0x9e914c===_0x54c64b)break;else _0x4fd027['push'](_0x4fd027['shift']());}catch(_0x28263b){_0x4fd027['push'](_0x4fd027['shift']());}}}(a2_0x3f32,0x66528));import{mkdirSync}from'node:fs';function a2_0x5bb1(_0x298c66,_0x134e12){_0x298c66=_0x298c66-0x68;const _0x3f32bf=a2_0x3f32();let _0x5bb15d=_0x3f32bf[_0x298c66];return _0x5bb15d;}import{homedir}from'node:os';function a2_0x3f32(){const _0x146eac=['9DsZsaz','387769VkmrjA','25323YLbVdO','244iswAOJ','.lovrabet','439710yEUffq','610032xKnFMU','7hMuIRj','6503432LPaysz','1032374ndRKdq','8292560xFYOKj'];a2_0x3f32=function(){return _0x146eac;};return a2_0x3f32();}import{join}from'node:path';export const configDir=join(homedir(),a2_0x861a41(0x71));export const cookieFile=join(configDir,'cookie');mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- (function(_0x38333c,_0x2697a2){var _0x1f913e=a3_0x6db4,_0x4bd584=_0x38333c();while(!![]){try{var _0x25b2ea=-parseInt(_0x1f913e(0x1df))/0x1*(parseInt(_0x1f913e(0x1d5))/0x2)+-parseInt(_0x1f913e(0x1dd))/0x3+parseInt(_0x1f913e(0x1d7))/0x4*(-parseInt(_0x1f913e(0x1d9))/0x5)+-parseInt(_0x1f913e(0x1dc))/0x6+-parseInt(_0x1f913e(0x1d8))/0x7*(-parseInt(_0x1f913e(0x1db))/0x8)+-parseInt(_0x1f913e(0x1de))/0x9+parseInt(_0x1f913e(0x1da))/0xa;if(_0x25b2ea===_0x2697a2)break;else _0x4bd584['push'](_0x4bd584['shift']());}catch(_0x8edee9){_0x4bd584['push'](_0x4bd584['shift']());}}}(a3_0x4487,0x891f9));function a3_0x4487(){var _0x3b7dfa=['utf-8','8wyodoP','87521eoMdji','2207105mCtxaZ','30988330NooFGz','24VQzmUs','4567332TEBMAB','366405MMddmg','4390101htjVCD','39KGAdaW','16446sBRTYj'];a3_0x4487=function(){return _0x3b7dfa;};return a3_0x4487();}import{readFileSync}from'node:fs';function a3_0x6db4(_0x1c5467,_0x3db561){_0x1c5467=_0x1c5467-0x1d5;var _0x4487bc=a3_0x4487();var _0x6db40a=_0x4487bc[_0x1c5467];return _0x6db40a;}import{cookieFile}from'./constant.js';export function getCookie(){var _0x7bfc9a=a3_0x6db4;try{return readFileSync(cookieFile,_0x7bfc9a(0x1d6))['trim']();}catch{}return'';}
1
+ (function(_0x6d5861,_0x3fc66f){var _0x34c347=a3_0x1ad2,_0x17d4f0=_0x6d5861();while(!![]){try{var _0x10837c=parseInt(_0x34c347(0xd1))/0x1+parseInt(_0x34c347(0xd0))/0x2+parseInt(_0x34c347(0xc9))/0x3+-parseInt(_0x34c347(0xcb))/0x4*(-parseInt(_0x34c347(0xc8))/0x5)+parseInt(_0x34c347(0xd2))/0x6+parseInt(_0x34c347(0xcf))/0x7+-parseInt(_0x34c347(0xca))/0x8*(parseInt(_0x34c347(0xcc))/0x9);if(_0x10837c===_0x3fc66f)break;else _0x17d4f0['push'](_0x17d4f0['shift']());}catch(_0x131374){_0x17d4f0['push'](_0x17d4f0['shift']());}}}(a3_0xdcb0,0xa5df0));import{readFileSync}from'node:fs';function a3_0xdcb0(){var _0x5936fd=['2470504xzWuOG','5564583KlviPr','utf-8','trim','6861694vAJVRf','72358DIWjRG','456952gvJiAo','5554992zlOUhh','5oxzfvT','2262036kCYkBP','40ngoikR'];a3_0xdcb0=function(){return _0x5936fd;};return a3_0xdcb0();}function a3_0x1ad2(_0x35542d,_0x1e0c01){_0x35542d=_0x35542d-0xc8;var _0xdcb0fb=a3_0xdcb0();var _0x1ad24c=_0xdcb0fb[_0x35542d];return _0x1ad24c;}import{cookieFile}from'./constant.js';export function getCookie(){var _0x4e73a9=a3_0x1ad2;try{return readFileSync(cookieFile,_0x4e73a9(0xcd))[_0x4e73a9(0xce)]();}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0x564712,_0x522eb8){const _0x5b02d1=a4_0x1e98,_0x117b7a=_0x564712();while(!![]){try{const _0x13632f=-parseInt(_0x5b02d1(0x134))/0x1+parseInt(_0x5b02d1(0x131))/0x2*(-parseInt(_0x5b02d1(0x136))/0x3)+parseInt(_0x5b02d1(0x130))/0x4*(-parseInt(_0x5b02d1(0x137))/0x5)+parseInt(_0x5b02d1(0x12b))/0x6+-parseInt(_0x5b02d1(0x12d))/0x7*(parseInt(_0x5b02d1(0x12f))/0x8)+parseInt(_0x5b02d1(0x12e))/0x9*(-parseInt(_0x5b02d1(0x12c))/0xa)+parseInt(_0x5b02d1(0x132))/0xb;if(_0x13632f===_0x522eb8)break;else _0x117b7a['push'](_0x117b7a['shift']());}catch(_0x4a1c4e){_0x117b7a['push'](_0x117b7a['shift']());}}}(a4_0x2231,0x2c9a0));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a4_0x1e98(_0x335b88,_0x4fe234){_0x335b88=_0x335b88-0x12b;const _0x2231b3=a4_0x2231();let _0x1e981b=_0x2231b3[_0x335b88];return _0x1e981b;}function a4_0x2231(){const _0x2fcbd4=['102imwtfs','819220gQrUUq','/api/auth/get-session','1654128iQbecd','47830VFmsuH','2968LsUglI','171OMdqsp','3920lCSmgp','8yWGCdW','12916YADAQX','10595552dyHVPV','then','210335NfsyTf','session'];a4_0x2231=function(){return _0x2fcbd4;};return a4_0x2231();}import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x1cd4ca=a4_0x1e98;try{if(!existsSync(cookieFile))return![];const _0x3a7666=readFileSync(cookieFile,'utf-8')['trim'](),_0x47bae9=await fetch(getUserDomain()+_0x1cd4ca(0x138),{'headers':{'cookie':_0x3a7666}})[_0x1cd4ca(0x133)](_0x4e1bec=>_0x4e1bec['json']());return _0x47bae9&&_0x47bae9[_0x1cd4ca(0x135)]&&_0x47bae9['user'];}catch{}return![];}
1
+ function a4_0x389e(_0x437a5a,_0x5214aa){_0x437a5a=_0x437a5a-0xea;const _0x3b2597=a4_0x3b25();let _0x389eb4=_0x3b2597[_0x437a5a];return _0x389eb4;}(function(_0x5377ec,_0xb99355){const _0x39b82c=a4_0x389e,_0x26dd35=_0x5377ec();while(!![]){try{const _0x59bde8=parseInt(_0x39b82c(0xf0))/0x1+parseInt(_0x39b82c(0xea))/0x2*(parseInt(_0x39b82c(0xf2))/0x3)+parseInt(_0x39b82c(0xf5))/0x4+-parseInt(_0x39b82c(0xf6))/0x5+-parseInt(_0x39b82c(0xec))/0x6+parseInt(_0x39b82c(0xee))/0x7*(parseInt(_0x39b82c(0xed))/0x8)+-parseInt(_0x39b82c(0xf7))/0x9*(-parseInt(_0x39b82c(0xef))/0xa);if(_0x59bde8===_0xb99355)break;else _0x26dd35['push'](_0x26dd35['shift']());}catch(_0x3797fd){_0x26dd35['push'](_0x26dd35['shift']());}}}(a4_0x3b25,0x8374a));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a4_0x3b25(){const _0x4d1cac=['2634720DhmPJN','8qMdeFC','1174621bFKrty','10SheAZf','295219cNlSnz','user','3SgeFka','then','trim','630024IwBqit','2353950iMclEr','7442649cfZfZp','session','1726gUYSPs','utf-8'];a4_0x3b25=function(){return _0x4d1cac;};return a4_0x3b25();}export async function getIsSessionValid(){const _0x1fd3d4=a4_0x389e;try{if(!existsSync(cookieFile))return![];const _0x41895d=readFileSync(cookieFile,_0x1fd3d4(0xeb))[_0x1fd3d4(0xf4)](),_0x4ad0fa=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x41895d}})[_0x1fd3d4(0xf3)](_0x19cc17=>_0x19cc17['json']());return _0x4ad0fa&&_0x4ad0fa[_0x1fd3d4(0xf8)]&&_0x4ad0fa[_0x1fd3d4(0xf1)];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x410fe5,_0x29d121){var _0x36e06e=a5_0x31fc,_0x415150=_0x410fe5();while(!![]){try{var _0x5d9a68=parseInt(_0x36e06e(0x129))/0x1+parseInt(_0x36e06e(0x126))/0x2+-parseInt(_0x36e06e(0x123))/0x3*(parseInt(_0x36e06e(0x11f))/0x4)+parseInt(_0x36e06e(0x121))/0x5+parseInt(_0x36e06e(0x128))/0x6+-parseInt(_0x36e06e(0x125))/0x7*(-parseInt(_0x36e06e(0x124))/0x8)+parseInt(_0x36e06e(0x120))/0x9*(-parseInt(_0x36e06e(0x122))/0xa);if(_0x5d9a68===_0x29d121)break;else _0x415150['push'](_0x415150['shift']());}catch(_0xa47626){_0x415150['push'](_0x415150['shift']());}}}(a5_0x50d0,0x4edf1));function a5_0x50d0(){var _0xcaa53=['8YBveWw','3825423vTSSoS','1064088EiRxVw','!\x20Not\x20logged\x20in','390588ePTJhJ','291185HmoMHn','✓\x20Logged\x20out','1216SqMhlO','45UHWkzR','1033080GKNHdj','2524270ctdtnY','555MGiojN'];a5_0x50d0=function(){return _0xcaa53;};return a5_0x50d0();}function a5_0x31fc(_0x4ecd2d,_0x34ed59){_0x4ecd2d=_0x4ecd2d-0x11f;var _0x50d00d=a5_0x50d0();var _0x31fcb4=_0x50d00d[_0x4ecd2d];return _0x31fcb4;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x4a3fed=a5_0x31fc;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x4a3fed(0x12a))):console['log'](_0x4a3fed(0x127));}
1
+ (function(_0x1713af,_0x3a5844){var _0xe8436d=a5_0x5fc7,_0x325977=_0x1713af();while(!![]){try{var _0x3b785c=parseInt(_0xe8436d(0x1e7))/0x1+parseInt(_0xe8436d(0x1ee))/0x2*(-parseInt(_0xe8436d(0x1e6))/0x3)+parseInt(_0xe8436d(0x1e9))/0x4+parseInt(_0xe8436d(0x1e5))/0x5*(-parseInt(_0xe8436d(0x1e4))/0x6)+parseInt(_0xe8436d(0x1e3))/0x7+-parseInt(_0xe8436d(0x1ed))/0x8*(parseInt(_0xe8436d(0x1e8))/0x9)+-parseInt(_0xe8436d(0x1eb))/0xa*(-parseInt(_0xe8436d(0x1ea))/0xb);if(_0x3b785c===_0x3a5844)break;else _0x325977['push'](_0x325977['shift']());}catch(_0x103903){_0x325977['push'](_0x325977['shift']());}}}(a5_0xf204,0xa2522));function a5_0xf204(){var _0x4c1bb1=['1288641AeKWwI','23553mnnyAC','3129536XAxHvZ','561SusEwN','137250EvYnPV','!\x20Not\x20logged\x20in','856mSCZZG','2326066cksmQq','log','✓\x20Logged\x20out','3885945SBDraG','7302cxPSsj','5005bnVVLu','3JMnCzB'];a5_0xf204=function(){return _0x4c1bb1;};return a5_0xf204();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a5_0x5fc7(_0x34494f,_0x4f2343){_0x34494f=_0x34494f-0x1e1;var _0xf2043=a5_0xf204();var _0x5fc7d3=_0xf2043[_0x34494f];return _0x5fc7d3;}export function logout(){var _0x82287d=a5_0x5fc7;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x82287d(0x1e2))):console[_0x82287d(0x1e1)](_0x82287d(0x1ec));}
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a6_0x5679d6=a6_0x32ca;(function(_0x404c8c,_0x5ac6e6){const _0x4c74f5=a6_0x32ca,_0x3ad576=_0x404c8c();while(!![]){try{const _0xcd83ca=-parseInt(_0x4c74f5(0x118))/0x1+-parseInt(_0x4c74f5(0x112))/0x2+parseInt(_0x4c74f5(0x11c))/0x3*(-parseInt(_0x4c74f5(0x12b))/0x4)+-parseInt(_0x4c74f5(0x122))/0x5+parseInt(_0x4c74f5(0x12d))/0x6+-parseInt(_0x4c74f5(0x116))/0x7+-parseInt(_0x4c74f5(0x129))/0x8*(-parseInt(_0x4c74f5(0x117))/0x9);if(_0xcd83ca===_0x5ac6e6)break;else _0x3ad576['push'](_0x3ad576['shift']());}catch(_0x282589){_0x3ad576['push'](_0x3ad576['shift']());}}}(a6_0x30c7,0x995ff));import{jsx as a6_0x480a00}from'react/jsx-runtime';import a6_0x26cb4e from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';function a6_0x30c7(){const _0x5b8d6f=['hint','\x20->\x20--','2085874WANKaG','args','[preparse]\x20','name','1445045TObjtV','39225816XSuPfa','1213093BZaEoe','help','unknownCommand','corrected','6HSypnT','ERR_STREAM_DESTROYED','./framework/preparse.js','exitCode',':\x20--','log','5601465NfTXus','error','catch','defaultCommand','Unexpected\x20error:','input','assign','8tULoyn','code','1160772UGusYc','ExitPromptError','2597658qBWPiP','length','flags','Error:\x20','flatMap','stderr','Hint:\x20','handler','exit','slice'];a6_0x30c7=function(){return _0x5b8d6f;};return a6_0x30c7();}import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a6_0x26cb4e(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});await run()[a6_0x5679d6(0x124)](handleError);async function run(){const _0x5d2550=a6_0x5679d6,_0x3776e1=cli[_0x5d2550(0x127)][0x0];let _0x5d0bc1=cli['input'][0x1];const _0x464455=cli['flags'];try{const {correctFlags:_0xe22c8}=await import(_0x5d2550(0x11e)),_0x5da838=getAllDefinitions()[_0x5d2550(0x131)](_0x2cc525=>_0x2cc525[_0x5d2550(0x12f)]??[]),{flags:_0xe473b9,corrections:_0x5aa743}=_0xe22c8(_0x464455,_0x5da838);if(_0x5aa743[_0x5d2550(0x12e)]>0x0){for(const _0x46fc42 of _0x5aa743){process[_0x5d2550(0x132)]['write'](_0x5d2550(0x114)+_0x46fc42[_0x5d2550(0x134)]+_0x5d2550(0x120)+_0x46fc42['original']+_0x5d2550(0x138)+_0x46fc42[_0x5d2550(0x11b)]+'\x0a');}Object[_0x5d2550(0x128)](_0x464455,_0xe473b9);}}catch{}if(!_0x3776e1||!isKnownService(_0x3776e1)){render(a6_0x480a00(Help,{}));return;}const _0x3429b7=getServiceEntry(_0x3776e1);if(!_0x5d0bc1){if(_0x464455['help']){console[_0x5d2550(0x121)](generateServiceHelp(_0x3776e1));return;}if(_0x3429b7[_0x5d2550(0x125)])_0x5d0bc1=_0x3429b7[_0x5d2550(0x125)];else{console['log'](generateServiceHelp(_0x3776e1));return;}}const _0x562a4a=findDefinition(_0x3776e1,_0x5d0bc1);!_0x562a4a&&(console[_0x5d2550(0x121)](generateServiceHelp(_0x3776e1)),handleError(CliErrors[_0x5d2550(0x11a)](_0x3776e1+'\x20'+_0x5d0bc1)));if(_0x464455[_0x5d2550(0x119)]){console[_0x5d2550(0x121)](generateCommandHelp(_0x562a4a));return;}const _0x1ae908=buildConfigFromFlags(_0x464455);await initGlobalEnvironment(_0x1ae908);const _0x571f02=createPipelineEnv(_0x1ae908,_0x464455);_0x571f02[_0x5d2550(0x113)]=cli[_0x5d2550(0x127)][_0x5d2550(0x136)](0x2),await runCommand(_0x562a4a,_0x571f02);}function a6_0x32ca(_0x39c22c,_0x1c95f8){_0x39c22c=_0x39c22c-0x112;const _0x30c76b=a6_0x30c7();let _0x32ca65=_0x30c76b[_0x39c22c];return _0x32ca65;}function handleError(_0x2ce225){const _0x29b379=a6_0x5679d6;if(_0x2ce225 instanceof CliError){_0x2ce225[_0x29b379(0x12a)]==='cancelled'&&process[_0x29b379(0x135)](0x0);console[_0x29b379(0x123)](_0x29b379(0x130)+_0x2ce225['message']);if(_0x2ce225[_0x29b379(0x137)])console['error'](_0x29b379(0x133)+_0x2ce225[_0x29b379(0x137)]);process[_0x29b379(0x135)](_0x2ce225[_0x29b379(0x11f)]);}isUserCancellation(_0x2ce225)&&process['exit'](0x0),console[_0x29b379(0x123)](_0x29b379(0x126),_0x2ce225),process[_0x29b379(0x135)](0x1);}function isUserCancellation(_0x1b02fc){const _0x38672a=a6_0x5679d6;if(!(_0x1b02fc instanceof Error))return![];if(_0x1b02fc[_0x38672a(0x115)]===_0x38672a(0x12c))return!![];if(_0x1b02fc[_0x38672a(0x12a)]==='ERR_USE_AFTER_CLOSE')return!![];if(_0x1b02fc['code']===_0x38672a(0x11d))return!![];return![];}
2
+ const a6_0xd57509=a6_0x591c;(function(_0x40d9d7,_0x3a6ef6){const _0x5d3ca7=a6_0x591c,_0x5dec67=_0x40d9d7();while(!![]){try{const _0x39f486=parseInt(_0x5d3ca7(0x1f0))/0x1+parseInt(_0x5d3ca7(0x1e8))/0x2*(-parseInt(_0x5d3ca7(0x207))/0x3)+-parseInt(_0x5d3ca7(0x1f1))/0x4+-parseInt(_0x5d3ca7(0x1fe))/0x5*(-parseInt(_0x5d3ca7(0x1e4))/0x6)+-parseInt(_0x5d3ca7(0x1ea))/0x7+-parseInt(_0x5d3ca7(0x1ff))/0x8+parseInt(_0x5d3ca7(0x1f3))/0x9;if(_0x39f486===_0x3a6ef6)break;else _0x5dec67['push'](_0x5dec67['shift']());}catch(_0x3ef3cf){_0x5dec67['push'](_0x5dec67['shift']());}}}(a6_0x24fc,0x2b445));import{jsx as a6_0x266feb}from'react/jsx-runtime';import a6_0x58a3db from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';function a6_0x24fc(){const _0x34c5d5=[':\x20--','exit','args','19332wZSoth','defaultCommand','log','Error:\x20','12328vGmLFU','ERR_STREAM_DESTROYED','2126089ciDFXv','message','Unexpected\x20error:','Hint:\x20','corrected','slice','5693zHJXMH','451852QLIjBF','cancelled','5460633PdMyVB','help','code','assign','length','./framework/preparse.js','exitCode','unknownCommand','flatMap','error','stderr','545CcOxFt','788008TpdDgk','[preparse]\x20','hint','input','flags','ERR_USE_AFTER_CLOSE','ExitPromptError','catch','132cNjuSm'];a6_0x24fc=function(){return _0x34c5d5;};return a6_0x24fc();}import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';function a6_0x591c(_0x2b5a4b,_0x24261a){_0x2b5a4b=_0x2b5a4b-0x1e4;const _0x24fc78=a6_0x24fc();let _0x591c56=_0x24fc78[_0x2b5a4b];return _0x591c56;}const helpText=generateFullHelp(),cli=a6_0x58a3db(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});await run()[a6_0xd57509(0x206)](handleError);async function run(){const _0x1ccdf3=a6_0xd57509,_0x11eaec=cli[_0x1ccdf3(0x202)][0x0];let _0x10159e=cli[_0x1ccdf3(0x202)][0x1];const _0xfa8d97=cli['flags'];try{const {correctFlags:_0x414db5}=await import(_0x1ccdf3(0x1f8)),_0x668cf9=getAllDefinitions()[_0x1ccdf3(0x1fb)](_0x292d2a=>_0x292d2a[_0x1ccdf3(0x203)]??[]),{flags:_0x1a8e9c,corrections:_0xbef601}=_0x414db5(_0xfa8d97,_0x668cf9);if(_0xbef601[_0x1ccdf3(0x1f7)]>0x0){for(const _0x5d4560 of _0xbef601){process[_0x1ccdf3(0x1fd)]['write'](_0x1ccdf3(0x200)+_0x5d4560['handler']+_0x1ccdf3(0x208)+_0x5d4560['original']+'\x20->\x20--'+_0x5d4560[_0x1ccdf3(0x1ee)]+'\x0a');}Object[_0x1ccdf3(0x1f6)](_0xfa8d97,_0x1a8e9c);}}catch{}if(!_0x11eaec||!isKnownService(_0x11eaec)){render(a6_0x266feb(Help,{}));return;}const _0x228675=getServiceEntry(_0x11eaec);if(!_0x10159e){if(_0xfa8d97[_0x1ccdf3(0x1f4)]){console['log'](generateServiceHelp(_0x11eaec));return;}if(_0x228675[_0x1ccdf3(0x1e5)])_0x10159e=_0x228675[_0x1ccdf3(0x1e5)];else{console[_0x1ccdf3(0x1e6)](generateServiceHelp(_0x11eaec));return;}}const _0x130ab0=findDefinition(_0x11eaec,_0x10159e);!_0x130ab0&&(console[_0x1ccdf3(0x1e6)](generateServiceHelp(_0x11eaec)),handleError(CliErrors[_0x1ccdf3(0x1fa)](_0x11eaec+'\x20'+_0x10159e)));if(_0xfa8d97[_0x1ccdf3(0x1f4)]){console[_0x1ccdf3(0x1e6)](generateCommandHelp(_0x130ab0));return;}const _0x2a9690=buildConfigFromFlags(_0xfa8d97);await initGlobalEnvironment(_0x2a9690);const _0x59deb0=createPipelineEnv(_0x2a9690,_0xfa8d97);_0x59deb0[_0x1ccdf3(0x20a)]=cli['input'][_0x1ccdf3(0x1ef)](0x2),await runCommand(_0x130ab0,_0x59deb0);}function handleError(_0x297a32){const _0xe3a0c2=a6_0xd57509;if(_0x297a32 instanceof CliError){_0x297a32[_0xe3a0c2(0x1f5)]===_0xe3a0c2(0x1f2)&&process[_0xe3a0c2(0x209)](0x0);console['error'](_0xe3a0c2(0x1e7)+_0x297a32[_0xe3a0c2(0x1eb)]);if(_0x297a32[_0xe3a0c2(0x201)])console['error'](_0xe3a0c2(0x1ed)+_0x297a32[_0xe3a0c2(0x201)]);process[_0xe3a0c2(0x209)](_0x297a32[_0xe3a0c2(0x1f9)]);}isUserCancellation(_0x297a32)&&process[_0xe3a0c2(0x209)](0x0),console[_0xe3a0c2(0x1fc)](_0xe3a0c2(0x1ec),_0x297a32),process[_0xe3a0c2(0x209)](0x1);}function isUserCancellation(_0x52c59c){const _0x144bda=a6_0xd57509;if(!(_0x52c59c instanceof Error))return![];if(_0x52c59c['name']===_0x144bda(0x205))return!![];if(_0x52c59c[_0x144bda(0x1f5)]===_0x144bda(0x204))return!![];if(_0x52c59c['code']===_0x144bda(0x1e9))return!![];return![];}
@@ -1 +1 @@
1
- const a7_0x2ff97d=a7_0x5066;function a7_0x5066(_0x40516c,_0x4c7cdb){_0x40516c=_0x40516c-0xf2;const _0x10d173=a7_0x10d1();let _0x5066c0=_0x10d173[_0x40516c];return _0x5066c0;}(function(_0xe100fa,_0x88b723){const _0x3a0e21=a7_0x5066,_0x1b4d4d=_0xe100fa();while(!![]){try{const _0x919674=-parseInt(_0x3a0e21(0x109))/0x1+parseInt(_0x3a0e21(0x111))/0x2+parseInt(_0x3a0e21(0x110))/0x3*(-parseInt(_0x3a0e21(0x127))/0x4)+-parseInt(_0x3a0e21(0x115))/0x5+-parseInt(_0x3a0e21(0xf3))/0x6+-parseInt(_0x3a0e21(0x121))/0x7+parseInt(_0x3a0e21(0x11c))/0x8;if(_0x919674===_0x88b723)break;else _0x1b4d4d['push'](_0x1b4d4d['shift']());}catch(_0x501172){_0x1b4d4d['push'](_0x1b4d4d['shift']());}}}(a7_0x10d1,0x29867));import{CliErrors}from'../../errors.js';function a7_0x10d1(){const _0x5c1f11=['global','152ndnAjo','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20enable\x20multi-app\x20mode.','read','list','riskLevel','high-risk-write','\x20--appcode\x20<code>`\x20first.','map','number','\x20app\x20add\x20<name>\x20--appcode\x20<code>\x20[--env\x20<env>]\x20[--global]','Auth\x20cookie','\x20app\x20\x22','log','bool','Single-app\x20mode:\x20appcode=','Use\x20global\x20config\x20scope','cookie','Secret\x20key','length','string','List\x20all\x20configured\x20apps','Add\x20an\x20app\x20to\x20config','write','App\x20\x22','json','\x20\x20env=','Available:\x20','appcode','\x20app\x20remove\x20<name>\x20[--global]','keys','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','args','Missing\x20app\x20name.','table','1692156pKaQhS','App\x20code\x20(required)','accessKey','format','name','Access\x20key','Default\x20app\x20set\x20to\x20\x22','Set\x20as\x20default\x20app.','App\x20profile\x20name\x20to\x20remove','single-app','Use\x20`','flagMissing','apps','\x22\x20not\x20found.','env','defaultApp','secretKey','Added','App\x20profile\x20name\x20(used\x20to\x20switch\x20between\x20apps)','pageSize','Switch\x20the\x20default\x20app','No\x20apps\x20configured.\x20Use\x20`','109165IjXiwQ','Updated','Risk\x20level','../../context.js','validation','Removed\x20app\x20\x22','Default\x20page\x20size','25617GHAcaQ','26018edoqrS','appCode','pretty','\x22\x20(appcode:\x20','877680XLjMhx','App\x20profile\x20name\x20to\x20activate','str','app','entries','join','Default\x20app\x20changed\x20to\x20\x22','9691480EosSZE','add','\x20app\x20add\x20<name>\x20--appcode\x20<code>','use','daily','1142036HHvupt','locale','Usage:\x20','Output\x20format','remove'];a7_0x10d1=function(){return _0x5c1f11;};return a7_0x10d1();}import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,migrateLegacySingleApp}from'./shared.js';const GLOBAL_FLAG={'name':a7_0x2ff97d(0x126),'type':'boolean','description':a7_0x2ff97d(0x136),'default':![]},PROFILE_FLAG_KEYS={'env':'env','cookie':a7_0x2ff97d(0x137),'accessKey':a7_0x2ff97d(0xf5),'accesskey':a7_0x2ff97d(0xf5),'secretKey':a7_0x2ff97d(0x103),'secretkey':a7_0x2ff97d(0x103),'format':a7_0x2ff97d(0xf6),'pageSize':a7_0x2ff97d(0x106),'pagesize':'pageSize','riskLevel':'riskLevel','risklevel':a7_0x2ff97d(0x12b),'locale':a7_0x2ff97d(0x122)},listDef={'service':'app','command':a7_0x2ff97d(0x12a),'description':a7_0x2ff97d(0x13b),'risk':a7_0x2ff97d(0x129),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4551e6){const _0x226853=a7_0x2ff97d,{buildConfigFromFlags:_0x244794}=await import(_0x226853(0x10c)),_0xb5049e=_0x244794({}),{apps:_0x180990,defaultApp:_0x30b6da,currentApp:_0x1d1ff6}=_0xb5049e,_0x1ca6a7=Object['entries'](_0x180990);if(_0x1ca6a7['length']===0x0){const _0x486fb5=_0xb5049e[_0x226853(0x112)];if(_0x486fb5)return{'ok':!![],'data':{'mode':_0x226853(0xfc),'appcode':_0x486fb5,'env':_0xb5049e[_0x226853(0x101)]},'message':_0x226853(0x135)+_0x486fb5+_0x226853(0x140)+_0xb5049e[_0x226853(0x101)]+'\x0aUse\x20`'+CLI_BIN_NAME+_0x226853(0x128)};return{'ok':!![],'data':[],'message':_0x226853(0x108)+CLI_BIN_NAME+_0x226853(0x145)};}const _0x234487=_0x1ca6a7[_0x226853(0x12e)](([_0x50857b,_0xdeecb0])=>({'name':_0x50857b,'appcode':_0xdeecb0[_0x226853(0x142)],'isDefault':_0x50857b===_0x30b6da,'isCurrent':_0x50857b===(_0x1d1ff6??_0x30b6da),'env':_0xdeecb0[_0x226853(0x101)]??null,'hasCookie':!!_0xdeecb0[_0x226853(0x137)],'hasAccessKey':!!_0xdeecb0[_0x226853(0xf5)],'format':_0xdeecb0[_0x226853(0xf6)]??null,'pageSize':_0xdeecb0['pageSize']??null,'riskLevel':_0xdeecb0['riskLevel']??null,'locale':_0xdeecb0[_0x226853(0x122)]??null}));return{'ok':!![],'data':_0x234487};}},useDef={'service':'app','command':a7_0x2ff97d(0x11f),'description':a7_0x2ff97d(0x107),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a7_0x2ff97d(0xf7),'description':a7_0x2ff97d(0x116),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x43d247){const _0x39d7fa=a7_0x2ff97d,_0x4f2a91=_0x43d247[_0x39d7fa(0x146)][0x0];if(!_0x4f2a91)throw CliErrors[_0x39d7fa(0x10d)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const _0x5a42b7=readConfig({'global':_0x43d247[_0x39d7fa(0x134)](_0x39d7fa(0x126))}),_0x4a42c8=_0x5a42b7[_0x39d7fa(0xff)]||{};if(!_0x4a42c8[_0x4f2a91]){const _0x2eb78e=Object[_0x39d7fa(0x144)](_0x4a42c8),_0x198dc7=_0x2eb78e[_0x39d7fa(0x139)]===0x0?_0x39d7fa(0xfd)+CLI_BIN_NAME+'\x20app\x20add\x20'+_0x4f2a91+_0x39d7fa(0x12d):_0x39d7fa(0x141)+_0x2eb78e[_0x39d7fa(0x11a)](',\x20');throw CliErrors[_0x39d7fa(0x10d)](_0x39d7fa(0x13e)+_0x4f2a91+_0x39d7fa(0x100),_0x198dc7);}return _0x5a42b7['defaultApp']=_0x4f2a91,writeConfig(_0x5a42b7,{'global':_0x43d247[_0x39d7fa(0x134)](_0x39d7fa(0x126))}),console['log'](_0x39d7fa(0xf9)+_0x4f2a91+_0x39d7fa(0x114)+_0x4a42c8[_0x4f2a91][_0x39d7fa(0x142)]+')'+scopeLabel({'global':_0x43d247['bool']('global')})),{'ok':!![]};}},addFlags=[{'name':a7_0x2ff97d(0x142),'type':a7_0x2ff97d(0x13a),'description':a7_0x2ff97d(0xf4),'required':!![]},GLOBAL_FLAG,{'name':a7_0x2ff97d(0x101),'type':'string','description':'Target\x20environment','enum':['production',a7_0x2ff97d(0x120)]},{'name':a7_0x2ff97d(0x137),'type':a7_0x2ff97d(0x13a),'description':a7_0x2ff97d(0x131)},{'name':'accessKey','type':a7_0x2ff97d(0x13a),'description':a7_0x2ff97d(0xf8)},{'name':a7_0x2ff97d(0x103),'type':a7_0x2ff97d(0x13a),'description':a7_0x2ff97d(0x138)},{'name':'format','type':'string','description':a7_0x2ff97d(0x124),'enum':[a7_0x2ff97d(0x13f),a7_0x2ff97d(0x113),a7_0x2ff97d(0xf2)]},{'name':a7_0x2ff97d(0x106),'type':a7_0x2ff97d(0x12f),'description':a7_0x2ff97d(0x10f)},{'name':a7_0x2ff97d(0x12b),'type':'string','description':a7_0x2ff97d(0x10b),'enum':[a7_0x2ff97d(0x129),a7_0x2ff97d(0x13d),a7_0x2ff97d(0x12c)]},{'name':a7_0x2ff97d(0x122),'type':a7_0x2ff97d(0x13a),'description':'Locale'}],addDef={'service':a7_0x2ff97d(0x118),'command':a7_0x2ff97d(0x11d),'description':a7_0x2ff97d(0x13c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a7_0x2ff97d(0xf7),'description':a7_0x2ff97d(0x105),'required':!![]}],'flags':addFlags,async 'execute'(_0x3eeff6){const _0x2e7c5c=a7_0x2ff97d,_0x4ac0ae=_0x3eeff6[_0x2e7c5c(0x146)][0x0];if(!_0x4ac0ae)throw CliErrors[_0x2e7c5c(0x10d)](_0x2e7c5c(0x147),_0x2e7c5c(0x123)+CLI_BIN_NAME+_0x2e7c5c(0x130));const _0x530fb9=_0x3eeff6['str']('appcode');if(!_0x530fb9)throw CliErrors[_0x2e7c5c(0xfe)](_0x2e7c5c(0x142),_0x2e7c5c(0x123)+CLI_BIN_NAME+_0x2e7c5c(0x11e));const _0x491768={'global':_0x3eeff6[_0x2e7c5c(0x134)](_0x2e7c5c(0x126))},_0x2d157c=readConfig(_0x491768);if(!_0x2d157c['apps'])_0x2d157c[_0x2e7c5c(0xff)]={};Object[_0x2e7c5c(0x144)](_0x2d157c[_0x2e7c5c(0xff)])[_0x2e7c5c(0x139)]===0x0&&migrateLegacySingleApp(_0x2d157c,_0x4ac0ae);const _0x1568f6={'appcode':_0x530fb9};for(const [_0x25ff59,_0x71d457]of Object[_0x2e7c5c(0x119)](PROFILE_FLAG_KEYS)){const _0x59417=_0x3eeff6[_0x2e7c5c(0x117)](_0x25ff59);_0x59417&&(_0x1568f6[_0x71d457]=_0x71d457===_0x2e7c5c(0x106)?Number(_0x59417):_0x59417);}const _0x27c43d=!!_0x2d157c['apps'][_0x4ac0ae];return _0x2d157c[_0x2e7c5c(0xff)][_0x4ac0ae]=_0x1568f6,!_0x2d157c[_0x2e7c5c(0x102)]&&(_0x2d157c['defaultApp']=_0x4ac0ae),writeConfig(_0x2d157c,_0x491768),console['log']((_0x27c43d?_0x2e7c5c(0x10a):_0x2e7c5c(0x104))+_0x2e7c5c(0x132)+_0x4ac0ae+'\x22\x20(appcode:\x20'+_0x530fb9+')'+scopeLabel(_0x491768)),_0x2d157c[_0x2e7c5c(0x102)]===_0x4ac0ae&&!_0x27c43d&&console[_0x2e7c5c(0x133)](_0x2e7c5c(0xfa)),{'ok':!![]};}},removeDef={'service':a7_0x2ff97d(0x118),'command':a7_0x2ff97d(0x125),'description':'Remove\x20an\x20app\x20from\x20config','risk':a7_0x2ff97d(0x12c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a7_0x2ff97d(0xf7),'description':a7_0x2ff97d(0xfb),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x617f22){const _0x52553c=a7_0x2ff97d,_0x31a293=_0x617f22[_0x52553c(0x146)][0x0];if(!_0x31a293)throw CliErrors['validation'](_0x52553c(0x147),_0x52553c(0x123)+CLI_BIN_NAME+_0x52553c(0x143));const _0x284a57={'global':_0x617f22[_0x52553c(0x134)](_0x52553c(0x126))},_0x2af9c6=readConfig(_0x284a57);if(!_0x2af9c6['apps']||!_0x2af9c6[_0x52553c(0xff)][_0x31a293])throw CliErrors[_0x52553c(0x10d)](_0x52553c(0x13e)+_0x31a293+'\x22\x20not\x20found.');delete _0x2af9c6[_0x52553c(0xff)][_0x31a293];if(_0x2af9c6[_0x52553c(0x102)]===_0x31a293){const _0x3cfc71=Object[_0x52553c(0x144)](_0x2af9c6[_0x52553c(0xff)]);_0x2af9c6['defaultApp']=_0x3cfc71[_0x52553c(0x139)]>0x0?_0x3cfc71[0x0]:undefined,_0x2af9c6[_0x52553c(0x102)]?console[_0x52553c(0x133)](_0x52553c(0x11b)+_0x2af9c6[_0x52553c(0x102)]+'\x22.'):delete _0x2af9c6[_0x52553c(0x102)];}return Object[_0x52553c(0x144)](_0x2af9c6[_0x52553c(0xff)])[_0x52553c(0x139)]===0x0&&(delete _0x2af9c6[_0x52553c(0xff)],delete _0x2af9c6[_0x52553c(0x102)]),writeConfig(_0x2af9c6,_0x284a57),console[_0x52553c(0x133)](_0x52553c(0x10e)+_0x31a293+'\x22.'),{'ok':!![]};}};export const appDefinitions=[listDef,useDef,addDef,removeDef];
1
+ function a7_0x3124(){const _0x176ce4=['riskLevel','\x22\x20not\x20found.','write','number','\x20app\x20add\x20<name>\x20--appcode\x20<code>\x20[--env\x20<env>]\x20[--global]','Set\x20as\x20default\x20app.','940jzcwAk','40347jQyuxs','high-risk-write','56FFLUMC','str','17801LQrMGH','remove','\x20app\x20remove\x20<name>\x20[--global]','boolean','\x0aUse\x20`','\x20app\x20\x22','use','Default\x20app\x20changed\x20to\x20\x22','accessKey','read','app','Updated','Added','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','4068QaFjhl','cookie','args','12RhGSrS','string','Risk\x20level','daily','format','Default\x20page\x20size','\x20--appcode\x20<code>`\x20first.','Single-app\x20mode:\x20appcode=','validation','295296XzbkJl','15460AiPcNY','Use\x20global\x20config\x20scope','List\x20all\x20configured\x20apps','map','App\x20profile\x20name\x20to\x20remove','env','locale','keys','2486dXbxFd','No\x20apps\x20configured.\x20Use\x20`','Usage:\x20','bool','join','\x22\x20(appcode:\x20','380RwrrOT','appcode','log','secretKey','defaultApp','\x20app\x20add\x20','Use\x20`','Removed\x20app\x20\x22','\x20\x20env=','Switch\x20the\x20default\x20app','name','entries','App\x20profile\x20name\x20to\x20activate','Remove\x20an\x20app\x20from\x20config','Missing\x20app\x20name.','Output\x20format','Access\x20key','App\x20\x22','5245qVLHwp','pageSize','global','production','flagMissing','apps','280925McShaW','single-app','Auth\x20cookie','add','\x20app\x20use\x20<name>\x20[--global]','Add\x20an\x20app\x20to\x20config','length','../../context.js','Secret\x20key'];a7_0x3124=function(){return _0x176ce4;};return a7_0x3124();}const a7_0x218a72=a7_0x5e38;(function(_0x396774,_0x51c205){const _0x4ab881=a7_0x5e38,_0x281c82=_0x396774();while(!![]){try{const _0x5bb27e=-parseInt(_0x4ab881(0xa4))/0x1+-parseInt(_0x4ab881(0x7e))/0x2*(-parseInt(_0x4ab881(0xc9))/0x3)+-parseInt(_0x4ab881(0xb3))/0x4*(-parseInt(_0x4ab881(0x9e))/0x5)+parseInt(_0x4ab881(0x7d))/0x6+parseInt(_0x4ab881(0xb8))/0x7*(parseInt(_0x4ab881(0xb6))/0x8)+-parseInt(_0x4ab881(0xb4))/0x9*(-parseInt(_0x4ab881(0x8c))/0xa)+-parseInt(_0x4ab881(0x86))/0xb*(parseInt(_0x4ab881(0xc6))/0xc);if(_0x5bb27e===_0x51c205)break;else _0x281c82['push'](_0x281c82['shift']());}catch(_0x1477d0){_0x281c82['push'](_0x281c82['shift']());}}}(a7_0x3124,0x26653));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,migrateLegacySingleApp}from'./shared.js';function a7_0x5e38(_0x1f2bc4,_0x3d7347){_0x1f2bc4=_0x1f2bc4-0x76;const _0x312489=a7_0x3124();let _0x5e38c6=_0x312489[_0x1f2bc4];return _0x5e38c6;}const GLOBAL_FLAG={'name':a7_0x218a72(0xa0),'type':a7_0x218a72(0xbb),'description':a7_0x218a72(0x7f),'default':![]},PROFILE_FLAG_KEYS={'env':a7_0x218a72(0x83),'cookie':a7_0x218a72(0xc7),'accessKey':'accessKey','accesskey':a7_0x218a72(0xc0),'secretKey':a7_0x218a72(0x8f),'secretkey':a7_0x218a72(0x8f),'format':a7_0x218a72(0x78),'pageSize':'pageSize','pagesize':a7_0x218a72(0x9f),'riskLevel':a7_0x218a72(0xad),'risklevel':'riskLevel','locale':'locale'},listDef={'service':a7_0x218a72(0xc2),'command':'list','description':a7_0x218a72(0x80),'risk':a7_0x218a72(0xc1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x375a83){const _0x3f38de=a7_0x218a72,{buildConfigFromFlags:_0x9015fe}=await import(_0x3f38de(0xab)),_0x96a9b3=_0x9015fe({}),{apps:_0x59c607,defaultApp:_0x174996,currentApp:_0x157dda}=_0x96a9b3,_0x3b0f82=Object[_0x3f38de(0x97)](_0x59c607);if(_0x3b0f82['length']===0x0){const _0x20db5f=_0x96a9b3['appCode'];if(_0x20db5f)return{'ok':!![],'data':{'mode':_0x3f38de(0xa5),'appcode':_0x20db5f,'env':_0x96a9b3[_0x3f38de(0x83)]},'message':_0x3f38de(0x7b)+_0x20db5f+_0x3f38de(0x94)+_0x96a9b3[_0x3f38de(0x83)]+_0x3f38de(0xbc)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20enable\x20multi-app\x20mode.'};return{'ok':!![],'data':[],'message':_0x3f38de(0x87)+CLI_BIN_NAME+_0x3f38de(0xc5)};}const _0x5c3f38=_0x3b0f82[_0x3f38de(0x81)](([_0x1bdb8b,_0x28ac1a])=>({'name':_0x1bdb8b,'appcode':_0x28ac1a['appcode'],'isDefault':_0x1bdb8b===_0x174996,'isCurrent':_0x1bdb8b===(_0x157dda??_0x174996),'env':_0x28ac1a[_0x3f38de(0x83)]??null,'hasCookie':!!_0x28ac1a[_0x3f38de(0xc7)],'hasAccessKey':!!_0x28ac1a[_0x3f38de(0xc0)],'format':_0x28ac1a['format']??null,'pageSize':_0x28ac1a['pageSize']??null,'riskLevel':_0x28ac1a['riskLevel']??null,'locale':_0x28ac1a[_0x3f38de(0x84)]??null}));return{'ok':!![],'data':_0x5c3f38};}},useDef={'service':a7_0x218a72(0xc2),'command':a7_0x218a72(0xbe),'description':a7_0x218a72(0x95),'risk':a7_0x218a72(0xaf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a7_0x218a72(0x96),'description':a7_0x218a72(0x98),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x2b0689){const _0x287fce=a7_0x218a72,_0xb3d8ad=_0x2b0689[_0x287fce(0xc8)][0x0];if(!_0xb3d8ad)throw CliErrors[_0x287fce(0x7c)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x287fce(0xa8));const _0x338939=readConfig({'global':_0x2b0689[_0x287fce(0x89)](_0x287fce(0xa0))}),_0x51b0b2=_0x338939[_0x287fce(0xa3)]||{};if(!_0x51b0b2[_0xb3d8ad]){const _0xef5aab=Object[_0x287fce(0x85)](_0x51b0b2),_0x432c26=_0xef5aab[_0x287fce(0xaa)]===0x0?_0x287fce(0x92)+CLI_BIN_NAME+_0x287fce(0x91)+_0xb3d8ad+_0x287fce(0x7a):'Available:\x20'+_0xef5aab[_0x287fce(0x8a)](',\x20');throw CliErrors[_0x287fce(0x7c)](_0x287fce(0x9d)+_0xb3d8ad+_0x287fce(0xae),_0x432c26);}return _0x338939[_0x287fce(0x90)]=_0xb3d8ad,writeConfig(_0x338939,{'global':_0x2b0689['bool'](_0x287fce(0xa0))}),console[_0x287fce(0x8e)]('Default\x20app\x20set\x20to\x20\x22'+_0xb3d8ad+_0x287fce(0x8b)+_0x51b0b2[_0xb3d8ad][_0x287fce(0x8d)]+')'+scopeLabel({'global':_0x2b0689[_0x287fce(0x89)](_0x287fce(0xa0))})),{'ok':!![]};}},addFlags=[{'name':a7_0x218a72(0x8d),'type':a7_0x218a72(0xca),'description':'App\x20code\x20(required)','required':!![]},GLOBAL_FLAG,{'name':a7_0x218a72(0x83),'type':a7_0x218a72(0xca),'description':'Target\x20environment','enum':[a7_0x218a72(0xa1),a7_0x218a72(0x77)]},{'name':a7_0x218a72(0xc7),'type':a7_0x218a72(0xca),'description':a7_0x218a72(0xa6)},{'name':'accessKey','type':a7_0x218a72(0xca),'description':a7_0x218a72(0x9c)},{'name':a7_0x218a72(0x8f),'type':a7_0x218a72(0xca),'description':a7_0x218a72(0xac)},{'name':a7_0x218a72(0x78),'type':a7_0x218a72(0xca),'description':a7_0x218a72(0x9b),'enum':['json','pretty','table']},{'name':a7_0x218a72(0x9f),'type':a7_0x218a72(0xb0),'description':a7_0x218a72(0x79)},{'name':a7_0x218a72(0xad),'type':a7_0x218a72(0xca),'description':a7_0x218a72(0x76),'enum':[a7_0x218a72(0xc1),'write',a7_0x218a72(0xb5)]},{'name':a7_0x218a72(0x84),'type':a7_0x218a72(0xca),'description':'Locale'}],addDef={'service':a7_0x218a72(0xc2),'command':a7_0x218a72(0xa7),'description':a7_0x218a72(0xa9),'risk':a7_0x218a72(0xaf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a7_0x218a72(0x96),'description':'App\x20profile\x20name\x20(used\x20to\x20switch\x20between\x20apps)','required':!![]}],'flags':addFlags,async 'execute'(_0x2577fc){const _0x43428b=a7_0x218a72,_0x4d2466=_0x2577fc[_0x43428b(0xc8)][0x0];if(!_0x4d2466)throw CliErrors[_0x43428b(0x7c)](_0x43428b(0x9a),_0x43428b(0x88)+CLI_BIN_NAME+_0x43428b(0xb1));const _0x3761d8=_0x2577fc[_0x43428b(0xb7)](_0x43428b(0x8d));if(!_0x3761d8)throw CliErrors[_0x43428b(0xa2)](_0x43428b(0x8d),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>');const _0x46afc9={'global':_0x2577fc['bool'](_0x43428b(0xa0))},_0x3ee9f7=readConfig(_0x46afc9);if(!_0x3ee9f7[_0x43428b(0xa3)])_0x3ee9f7[_0x43428b(0xa3)]={};Object[_0x43428b(0x85)](_0x3ee9f7[_0x43428b(0xa3)])[_0x43428b(0xaa)]===0x0&&migrateLegacySingleApp(_0x3ee9f7,_0x4d2466);const _0x4513d8={'appcode':_0x3761d8};for(const [_0x3c7378,_0x110a23]of Object[_0x43428b(0x97)](PROFILE_FLAG_KEYS)){const _0x1ad116=_0x2577fc['str'](_0x3c7378);_0x1ad116&&(_0x4513d8[_0x110a23]=_0x110a23===_0x43428b(0x9f)?Number(_0x1ad116):_0x1ad116);}const _0x3364b5=!!_0x3ee9f7[_0x43428b(0xa3)][_0x4d2466];return _0x3ee9f7[_0x43428b(0xa3)][_0x4d2466]=_0x4513d8,!_0x3ee9f7[_0x43428b(0x90)]&&(_0x3ee9f7[_0x43428b(0x90)]=_0x4d2466),writeConfig(_0x3ee9f7,_0x46afc9),console[_0x43428b(0x8e)]((_0x3364b5?_0x43428b(0xc3):_0x43428b(0xc4))+_0x43428b(0xbd)+_0x4d2466+_0x43428b(0x8b)+_0x3761d8+')'+scopeLabel(_0x46afc9)),_0x3ee9f7[_0x43428b(0x90)]===_0x4d2466&&!_0x3364b5&&console[_0x43428b(0x8e)](_0x43428b(0xb2)),{'ok':!![]};}},removeDef={'service':a7_0x218a72(0xc2),'command':a7_0x218a72(0xb9),'description':a7_0x218a72(0x99),'risk':a7_0x218a72(0xb5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a7_0x218a72(0x96),'description':a7_0x218a72(0x82),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x20442b){const _0x28f636=a7_0x218a72,_0x56340a=_0x20442b[_0x28f636(0xc8)][0x0];if(!_0x56340a)throw CliErrors[_0x28f636(0x7c)](_0x28f636(0x9a),_0x28f636(0x88)+CLI_BIN_NAME+_0x28f636(0xba));const _0xee7024={'global':_0x20442b['bool'](_0x28f636(0xa0))},_0x47eaf8=readConfig(_0xee7024);if(!_0x47eaf8['apps']||!_0x47eaf8[_0x28f636(0xa3)][_0x56340a])throw CliErrors['validation'](_0x28f636(0x9d)+_0x56340a+_0x28f636(0xae));delete _0x47eaf8[_0x28f636(0xa3)][_0x56340a];if(_0x47eaf8[_0x28f636(0x90)]===_0x56340a){const _0x2021ee=Object[_0x28f636(0x85)](_0x47eaf8[_0x28f636(0xa3)]);_0x47eaf8[_0x28f636(0x90)]=_0x2021ee[_0x28f636(0xaa)]>0x0?_0x2021ee[0x0]:undefined,_0x47eaf8[_0x28f636(0x90)]?console['log'](_0x28f636(0xbf)+_0x47eaf8[_0x28f636(0x90)]+'\x22.'):delete _0x47eaf8['defaultApp'];}return Object[_0x28f636(0x85)](_0x47eaf8[_0x28f636(0xa3)])[_0x28f636(0xaa)]===0x0&&(delete _0x47eaf8[_0x28f636(0xa3)],delete _0x47eaf8['defaultApp']),writeConfig(_0x47eaf8,_0xee7024),console[_0x28f636(0x8e)](_0x28f636(0x93)+_0x56340a+'\x22.'),{'ok':!![]};}};export const appDefinitions=[listDef,useDef,addDef,removeDef];
@@ -1 +1 @@
1
- (function(_0x2e3c5f,_0x25494e){const _0x516830=a8_0x3660,_0x33e924=_0x2e3c5f();while(!![]){try{const _0x44fa09=parseInt(_0x516830(0x1a3))/0x1*(-parseInt(_0x516830(0x19f))/0x2)+parseInt(_0x516830(0x1a5))/0x3+parseInt(_0x516830(0x1b0))/0x4*(parseInt(_0x516830(0x1b6))/0x5)+parseInt(_0x516830(0x1aa))/0x6+parseInt(_0x516830(0x1a0))/0x7*(parseInt(_0x516830(0x1a2))/0x8)+-parseInt(_0x516830(0x1ad))/0x9*(-parseInt(_0x516830(0x1ab))/0xa)+-parseInt(_0x516830(0x1a9))/0xb;if(_0x44fa09===_0x25494e)break;else _0x33e924['push'](_0x33e924['shift']());}catch(_0x39dff7){_0x33e924['push'](_0x33e924['shift']());}}}(a8_0x85bf,0xf3e3f));function a8_0x3660(_0x3255d2,_0x73e9bc){_0x3255d2=_0x3255d2-0x19e;const _0x85bfba=a8_0x85bf();let _0x366010=_0x85bfba[_0x3255d2];return _0x366010;}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a8_0x85bf(){const _0x531aec=['locale','pageSize','riskLevel','14655iwnMZa','\x20(global)','env','app','990UJsEWE','1025843VVJAdM','apps','104YzHscu','3106opeyrQ','cookie','2571006fCghTH','format','Migrated\x20existing\x20app\x20\x22','secretKey','36909917Uaaakj','10960554vliDJy','2070430uYlvBX','appcode','36IRBELp','\x22\x20to\x20multi-app\x20config\x20(set\x20as\x20default).','accessKey','648CqbWEu','log','global'];a8_0x85bf=function(){return _0x531aec;};return a8_0x85bf();}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig}from'../../context.js';export function scopeLabel(_0x151f36){const _0x503bd9=a8_0x3660;return _0x151f36[_0x503bd9(0x1b2)]?_0x503bd9(0x1b7):'';}export function migrateLegacySingleApp(_0x12f3d0,_0x2c4a2c){const _0x217ded=a8_0x3660,_0x14e90f=_0x12f3d0[_0x217ded(0x1ac)]||_0x12f3d0['app'];if(!_0x14e90f)return;const _0x4a3317=String(_0x14e90f);if(_0x4a3317===_0x2c4a2c)return;const _0x1c31a0={'appcode':_0x14e90f};if(_0x12f3d0[_0x217ded(0x1b8)])_0x1c31a0[_0x217ded(0x1b8)]=_0x12f3d0['env'];if(_0x12f3d0[_0x217ded(0x1a4)])_0x1c31a0[_0x217ded(0x1a4)]=_0x12f3d0[_0x217ded(0x1a4)];if(_0x12f3d0[_0x217ded(0x1af)])_0x1c31a0[_0x217ded(0x1af)]=_0x12f3d0['accessKey'];if(_0x12f3d0[_0x217ded(0x1a8)])_0x1c31a0[_0x217ded(0x1a8)]=_0x12f3d0[_0x217ded(0x1a8)];if(_0x12f3d0[_0x217ded(0x1a6)])_0x1c31a0[_0x217ded(0x1a6)]=_0x12f3d0[_0x217ded(0x1a6)];if(_0x12f3d0[_0x217ded(0x1b4)])_0x1c31a0[_0x217ded(0x1b4)]=_0x12f3d0[_0x217ded(0x1b4)];if(_0x12f3d0[_0x217ded(0x1b5)])_0x1c31a0[_0x217ded(0x1b5)]=_0x12f3d0[_0x217ded(0x1b5)];if(_0x12f3d0[_0x217ded(0x1b3)])_0x1c31a0[_0x217ded(0x1b3)]=_0x12f3d0[_0x217ded(0x1b3)];_0x12f3d0[_0x217ded(0x1a1)][_0x4a3317]=_0x1c31a0,_0x12f3d0['defaultApp']=_0x4a3317,delete _0x12f3d0[_0x217ded(0x1ac)],delete _0x12f3d0[_0x217ded(0x19e)],console[_0x217ded(0x1b1)](_0x217ded(0x1a7)+_0x4a3317+_0x217ded(0x1ae));}
1
+ (function(_0x4a0ba3,_0x556265){const _0x519470=a8_0x3d47,_0xc07bba=_0x4a0ba3();while(!![]){try{const _0x10eee2=-parseInt(_0x519470(0x195))/0x1*(-parseInt(_0x519470(0x1a4))/0x2)+-parseInt(_0x519470(0x19f))/0x3+parseInt(_0x519470(0x193))/0x4+-parseInt(_0x519470(0x191))/0x5*(parseInt(_0x519470(0x194))/0x6)+parseInt(_0x519470(0x198))/0x7*(parseInt(_0x519470(0x19b))/0x8)+parseInt(_0x519470(0x19d))/0x9+-parseInt(_0x519470(0x1a1))/0xa;if(_0x10eee2===_0x556265)break;else _0xc07bba['push'](_0xc07bba['shift']());}catch(_0xbc09ae){_0xc07bba['push'](_0xc07bba['shift']());}}}(a8_0x32a0,0x48437));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig as readConfig,writeScopedConfig as writeConfig}from'../../context.js';function a8_0x3d47(_0x2a6830,_0x56ca62){_0x2a6830=_0x2a6830-0x18d;const _0x32a079=a8_0x32a0();let _0x3d478a=_0x32a079[_0x2a6830];return _0x3d478a;}export function scopeLabel(_0xd7ca92){const _0x52a5a3=a8_0x3d47;return _0xd7ca92[_0x52a5a3(0x1a2)]?_0x52a5a3(0x1a0):'';}export function migrateLegacySingleApp(_0x524a9e,_0xb72d4c){const _0x1b1d2b=a8_0x3d47,_0xeb29df=_0x524a9e[_0x1b1d2b(0x19e)]||_0x524a9e[_0x1b1d2b(0x18f)];if(!_0xeb29df)return;const _0x42905c=String(_0xeb29df);if(_0x42905c===_0xb72d4c)return;const _0x5e5584={'appcode':_0xeb29df};if(_0x524a9e[_0x1b1d2b(0x19a)])_0x5e5584[_0x1b1d2b(0x19a)]=_0x524a9e[_0x1b1d2b(0x19a)];if(_0x524a9e['cookie'])_0x5e5584[_0x1b1d2b(0x1a3)]=_0x524a9e[_0x1b1d2b(0x1a3)];if(_0x524a9e[_0x1b1d2b(0x19c)])_0x5e5584[_0x1b1d2b(0x19c)]=_0x524a9e[_0x1b1d2b(0x19c)];if(_0x524a9e[_0x1b1d2b(0x18d)])_0x5e5584[_0x1b1d2b(0x18d)]=_0x524a9e[_0x1b1d2b(0x18d)];if(_0x524a9e[_0x1b1d2b(0x199)])_0x5e5584[_0x1b1d2b(0x199)]=_0x524a9e[_0x1b1d2b(0x199)];if(_0x524a9e['pageSize'])_0x5e5584[_0x1b1d2b(0x18e)]=_0x524a9e[_0x1b1d2b(0x18e)];if(_0x524a9e['riskLevel'])_0x5e5584[_0x1b1d2b(0x190)]=_0x524a9e[_0x1b1d2b(0x190)];if(_0x524a9e[_0x1b1d2b(0x197)])_0x5e5584[_0x1b1d2b(0x197)]=_0x524a9e[_0x1b1d2b(0x197)];_0x524a9e[_0x1b1d2b(0x1a5)][_0x42905c]=_0x5e5584,_0x524a9e[_0x1b1d2b(0x196)]=_0x42905c,delete _0x524a9e['appcode'],delete _0x524a9e['app'],console['log']('Migrated\x20existing\x20app\x20\x22'+_0x42905c+_0x1b1d2b(0x192));}function a8_0x32a0(){const _0x1f48af=['secretKey','pageSize','app','riskLevel','11525pPXlAb','\x22\x20to\x20multi-app\x20config\x20(set\x20as\x20default).','1512160zCFgcA','150GUBbTM','1thcQmY','defaultApp','locale','2899708mQfAbl','format','env','8tuEZZE','accessKey','2116818IFJPQu','appcode','970785pQOCRZ','\x20(global)','4817070niDfVm','global','cookie','262864RkEDnY','apps'];a8_0x32a0=function(){return _0x1f48af;};return a8_0x32a0();}
@@ -1 +1 @@
1
- function a9_0x33e1(_0x75ca75,_0x4c9aaf){_0x75ca75=_0x75ca75-0xab;const _0x3e9876=a9_0x3e98();let _0x33e15b=_0x3e9876[_0x75ca75];return _0x33e15b;}const a9_0x2daa2d=a9_0x33e1;(function(_0x94e9ef,_0x3d5076){const _0x3f7216=a9_0x33e1,_0x383e09=_0x94e9ef();while(!![]){try{const _0x566d7=-parseInt(_0x3f7216(0xb9))/0x1*(-parseInt(_0x3f7216(0xb5))/0x2)+parseInt(_0x3f7216(0xae))/0x3+-parseInt(_0x3f7216(0xb1))/0x4+parseInt(_0x3f7216(0xb7))/0x5+-parseInt(_0x3f7216(0xac))/0x6+parseInt(_0x3f7216(0xb6))/0x7+-parseInt(_0x3f7216(0xba))/0x8*(-parseInt(_0x3f7216(0xaf))/0x9);if(_0x566d7===_0x3d5076)break;else _0x383e09['push'](_0x383e09['shift']());}catch(_0xef7563){_0x383e09['push'](_0x383e09['shift']());}}}(a9_0x3e98,0xceb75));function a9_0x3e98(){const _0x4f01e5=['4210710YXSXFl','8403025RFwUsi','logout','56668ThpQwH','432YnoFVM','✓\x20Logged\x20out','7447236ylZpqI','auth','1540953guisJV','84978aRpcbk','log','5777644OfJFdu','!\x20Not\x20logged\x20in','write','read','8PHdqXg'];a9_0x3e98=function(){return _0x4f01e5;};return a9_0x3e98();}import{jsx as a9_0x101541}from'react/jsx-runtime';import{unlinkSync,existsSync}from'node:fs';import{render}from'ink';import{cookieFile}from'../../auth/constant.js';import{AuthServer}from'../../auth/auth-server-ui.js';export const authDefinitions=[{'service':'auth','command':'login','description':'Login\x20via\x20browser','risk':a9_0x2daa2d(0xb4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5a3892){return render(a9_0x101541(AuthServer,{})),{'ok':!![]};}},{'service':a9_0x2daa2d(0xad),'command':a9_0x2daa2d(0xb8),'description':'Clear\x20login\x20session','risk':a9_0x2daa2d(0xb3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x59dc54){const _0x315e5d=a9_0x2daa2d;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x315e5d(0xb0)](_0x315e5d(0xab))):console[_0x315e5d(0xb0)](_0x315e5d(0xb2)),{'ok':!![]};}}];
1
+ const a9_0x57b1bf=a9_0x4dad;(function(_0x4e7816,_0x1725f6){const _0x1d1dcc=a9_0x4dad,_0x45652e=_0x4e7816();while(!![]){try{const _0xbde4d6=parseInt(_0x1d1dcc(0x19d))/0x1*(-parseInt(_0x1d1dcc(0x1aa))/0x2)+parseInt(_0x1d1dcc(0x1af))/0x3*(-parseInt(_0x1d1dcc(0x1a4))/0x4)+-parseInt(_0x1d1dcc(0x19e))/0x5+parseInt(_0x1d1dcc(0x1a5))/0x6+parseInt(_0x1d1dcc(0x1ae))/0x7*(parseInt(_0x1d1dcc(0x1a6))/0x8)+parseInt(_0x1d1dcc(0x1ac))/0x9+-parseInt(_0x1d1dcc(0x1a3))/0xa*(-parseInt(_0x1d1dcc(0x1a2))/0xb);if(_0xbde4d6===_0x1725f6)break;else _0x45652e['push'](_0x45652e['shift']());}catch(_0x1c7617){_0x45652e['push'](_0x45652e['shift']());}}}(a9_0x127e,0x39066));function a9_0x127e(){const _0x5e4ce4=['read','Login\x20via\x20browser','auth','4338169bSEdZA','10Sgrxko','1047084MMovQq','1689762FDSsTj','112Rvghcy','write','Clear\x20login\x20session','log','17288zqtylM','✓\x20Logged\x20out','4163670RnIJjg','!\x20Not\x20logged\x20in','147JDAQtb','3AERWjM','53TPQIDN','927265JtSFXM'];a9_0x127e=function(){return _0x5e4ce4;};return a9_0x127e();}function a9_0x4dad(_0x43273e,_0x2d00f4){_0x43273e=_0x43273e-0x19d;const _0x127ea5=a9_0x127e();let _0x4dad98=_0x127ea5[_0x43273e];return _0x4dad98;}import{jsx as a9_0x4c4056}from'react/jsx-runtime';import{unlinkSync,existsSync}from'node:fs';import{render}from'ink';import{cookieFile}from'../../auth/constant.js';import{AuthServer}from'../../auth/auth-server-ui.js';export const authDefinitions=[{'service':'auth','command':'login','description':a9_0x57b1bf(0x1a0),'risk':a9_0x57b1bf(0x19f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1e06b3){return render(a9_0x4c4056(AuthServer,{})),{'ok':!![]};}},{'service':a9_0x57b1bf(0x1a1),'command':'logout','description':a9_0x57b1bf(0x1a8),'risk':a9_0x57b1bf(0x1a7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x362dd8){const _0x7f9600=a9_0x57b1bf;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x7f9600(0x1a9)](_0x7f9600(0x1ab))):console[_0x7f9600(0x1a9)](_0x7f9600(0x1ad)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a10_0x17c65d=a10_0x412c;(function(_0x2a6507,_0x1541f5){const _0x48599c=a10_0x412c,_0x398f02=_0x2a6507();while(!![]){try{const _0x3cc094=-parseInt(_0x48599c(0x135))/0x1*(parseInt(_0x48599c(0x138))/0x2)+-parseInt(_0x48599c(0x143))/0x3*(-parseInt(_0x48599c(0x13a))/0x4)+parseInt(_0x48599c(0x13e))/0x5*(parseInt(_0x48599c(0x136))/0x6)+-parseInt(_0x48599c(0x132))/0x7*(-parseInt(_0x48599c(0x140))/0x8)+-parseInt(_0x48599c(0x141))/0x9+parseInt(_0x48599c(0x12f))/0xa*(parseInt(_0x48599c(0x13c))/0xb)+-parseInt(_0x48599c(0x133))/0xc;if(_0x3cc094===_0x1541f5)break;else _0x398f02['push'](_0x398f02['shift']());}catch(_0x1dd32b){_0x398f02['push'](_0x398f02['shift']());}}}(a10_0x1073,0xc7faa));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../common/flags.js';function a10_0x1073(){const _0x4a9935=['scriptType','380vwaMGy','appCode','11ktjSij','createdTime','198155vZbeSt','read','40IkAFTN','530766KmtKAf','(none)','23337AlzUOw','verbose','description','6052710zLaGFk','bff','Get\x20BFF\x20script\x20details\x20by\x20ID','2121469DexxSa','32460120AQAkNF','num','41AbeCXI','138FDcvLT','updatedTime','9172zOETKu'];a10_0x1073=function(){return _0x4a9935;};return a10_0x1073();}function a10_0x412c(_0x418396,_0x3d6c07){_0x418396=_0x418396-0x12d;const _0x107342=a10_0x1073();let _0x412c44=_0x107342[_0x418396];return _0x412c44;}export const bffDetail={'service':a10_0x17c65d(0x130),'command':'detail','description':a10_0x17c65d(0x131),'risk':a10_0x17c65d(0x13f),'requiresCookieAuth':!![],'flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0x1e682b){const _0x44dac4=a10_0x17c65d,_0x4e163d=await getBffScriptInfo(_0x1e682b[_0x44dac4(0x134)]('id')),_0x59aa26=_0x1e682b['bool'](_0x44dac4(0x12d));if(_0x59aa26)return{'ok':!![],'data':_0x4e163d};return{'ok':!![],'data':{'id':_0x4e163d['id'],'appCode':_0x4e163d[_0x44dac4(0x13b)],'functionName':_0x4e163d['functionName']??'','scriptType':_0x4e163d[_0x44dac4(0x139)],'description':_0x4e163d[_0x44dac4(0x12e)]||_0x44dac4(0x142),'createdTime':_0x4e163d[_0x44dac4(0x13d)]??'','updatedTime':_0x4e163d[_0x44dac4(0x137)]??''}};}};
1
+ function a10_0x48d6(_0x41b443,_0x50e53e){_0x41b443=_0x41b443-0x162;const _0x26992a=a10_0x2699();let _0x48d6d8=_0x26992a[_0x41b443];return _0x48d6d8;}const a10_0x548db8=a10_0x48d6;(function(_0x47fb92,_0x1413ad){const _0x3d20df=a10_0x48d6,_0x5d51d3=_0x47fb92();while(!![]){try{const _0x4b5c43=parseInt(_0x3d20df(0x16f))/0x1*(parseInt(_0x3d20df(0x172))/0x2)+parseInt(_0x3d20df(0x163))/0x3+-parseInt(_0x3d20df(0x165))/0x4+parseInt(_0x3d20df(0x16c))/0x5*(-parseInt(_0x3d20df(0x174))/0x6)+-parseInt(_0x3d20df(0x175))/0x7*(-parseInt(_0x3d20df(0x171))/0x8)+parseInt(_0x3d20df(0x167))/0x9+-parseInt(_0x3d20df(0x166))/0xa;if(_0x4b5c43===_0x1413ad)break;else _0x5d51d3['push'](_0x5d51d3['shift']());}catch(_0x23b3b4){_0x5d51d3['push'](_0x5d51d3['shift']());}}}(a10_0x2699,0xa93de));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../common/flags.js';function a10_0x2699(){const _0xbfbe56=['319389pqAzRz','bool','3008883rIrzaV','bff','2124588VYMeiX','8896720PjsUaw','10024920LzTBeA','num','appCode','(none)','description','5bEbStk','updatedTime','read','118267eZZpZk','scriptType','32wFWZvu','10UaGlFW','functionName','4659906FcTBTH'];a10_0x2699=function(){return _0xbfbe56;};return a10_0x2699();}export const bffDetail={'service':a10_0x548db8(0x164),'command':'detail','description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a10_0x548db8(0x16e),'requiresCookieAuth':!![],'flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0x26ac18){const _0x15c2b6=a10_0x548db8,_0x32e309=await getBffScriptInfo(_0x26ac18[_0x15c2b6(0x168)]('id')),_0x48a4ef=_0x26ac18[_0x15c2b6(0x162)]('verbose');if(_0x48a4ef)return{'ok':!![],'data':_0x32e309};return{'ok':!![],'data':{'id':_0x32e309['id'],'appCode':_0x32e309[_0x15c2b6(0x169)],'functionName':_0x32e309[_0x15c2b6(0x173)]??'','scriptType':_0x32e309[_0x15c2b6(0x170)],'description':_0x32e309[_0x15c2b6(0x16b)]||_0x15c2b6(0x16a),'createdTime':_0x32e309['createdTime']??'','updatedTime':_0x32e309[_0x15c2b6(0x16d)]??''}};}};
@@ -1 +1 @@
1
- const a11_0x35c669=a11_0x1f67;(function(_0x5d82f5,_0x5e0335){const _0x14bd92=a11_0x1f67,_0x4fd74b=_0x5d82f5();while(!![]){try{const _0x16a4a3=-parseInt(_0x14bd92(0x109))/0x1+parseInt(_0x14bd92(0x108))/0x2+parseInt(_0x14bd92(0x102))/0x3+-parseInt(_0x14bd92(0x10f))/0x4*(-parseInt(_0x14bd92(0x10b))/0x5)+-parseInt(_0x14bd92(0x104))/0x6+parseInt(_0x14bd92(0x103))/0x7+-parseInt(_0x14bd92(0x10a))/0x8*(parseInt(_0x14bd92(0x10e))/0x9);if(_0x16a4a3===_0x5e0335)break;else _0x4fd74b['push'](_0x4fd74b['shift']());}catch(_0x4fecdf){_0x4fd74b['push'](_0x4fd74b['shift']());}}}(a11_0x2ef3,0x2b294));function a11_0x1f67(_0x596960,_0x58ad69){_0x596960=_0x596960-0x102;const _0x2ef3e2=a11_0x2ef3();let _0x1f679c=_0x2ef3e2[_0x596960];return _0x1f679c;}function a11_0x2ef3(){const _0x13ec25=['234JvGZtC','21316iiGtMZ','998952xOwuiC','1116654UChbPT','514338VlTXnP','name','read','now','313516nSKSay','326092jYRnzB','108848RDXQsA','275rCAIer','bff','str'];a11_0x2ef3=function(){return _0x13ec25;};return a11_0x2ef3();}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../common/flags.js';export const bffExec={'service':a11_0x35c669(0x10c),'command':'exec','description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a11_0x35c669(0x106),'flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0xf1b712){const _0x4b47e3=a11_0x35c669,_0x2f3939=parseJsonParams(_0xf1b712['str']('params')),_0x8f38dc=Date[_0x4b47e3(0x107)](),_0x3e46ad=await executeSdkBff(_0xf1b712[_0x4b47e3(0x10d)](_0x4b47e3(0x105)),_0x2f3939),_0x537acd=Date[_0x4b47e3(0x107)]()-_0x8f38dc;return{'ok':!![],'data':{'result':_0x3e46ad,'elapsed':_0x537acd},'message':'BFF\x20executed\x20in\x20'+_0x537acd+'ms'};}};
1
+ const a11_0x5a13b0=a11_0x4d0e;function a11_0x4c43(){const _0x3e4c7e=['now','BFF\x20function\x20name\x20to\x20execute','4621659ArJeyp','45QXczCG','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','15iSJrgt','params','name','BFF\x20executed\x20in\x20','exec','912008lbSYmD','2606088pZePjy','463479ycuSdB','bff','880008eDnqhf','2ZfuHiC','str','6189840UKbwyv','451134dofkAJ'];a11_0x4c43=function(){return _0x3e4c7e;};return a11_0x4c43();}(function(_0x4563a9,_0x1c026d){const _0x471268=a11_0x4d0e,_0x39ff19=_0x4563a9();while(!![]){try{const _0x238c46=parseInt(_0x471268(0xb7))/0x1*(parseInt(_0x471268(0xba))/0x2)+-parseInt(_0x471268(0xaa))/0x3+-parseInt(_0x471268(0xb6))/0x4+-parseInt(_0x471268(0xb0))/0x5*(-parseInt(_0x471268(0xb9))/0x6)+-parseInt(_0x471268(0xad))/0x7+parseInt(_0x471268(0xb5))/0x8*(parseInt(_0x471268(0xae))/0x9)+parseInt(_0x471268(0xa9))/0xa;if(_0x238c46===_0x1c026d)break;else _0x39ff19['push'](_0x39ff19['shift']());}catch(_0x4ec04a){_0x39ff19['push'](_0x39ff19['shift']());}}}(a11_0x4c43,0x99e3f));import{executeSdkBff}from'../../core/sdk-client.js';function a11_0x4d0e(_0x5edc35,_0x3118f6){_0x5edc35=_0x5edc35-0xa9;const _0x4c43b4=a11_0x4c43();let _0x4d0ea0=_0x4c43b4[_0x5edc35];return _0x4d0ea0;}import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../common/flags.js';export const bffExec={'service':a11_0x5a13b0(0xb8),'command':a11_0x5a13b0(0xb4),'description':a11_0x5a13b0(0xaf),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a11_0x5a13b0(0xac)},PARAMS_FLAG],async 'execute'(_0xf4410){const _0x2afc5d=a11_0x5a13b0,_0x295c08=parseJsonParams(_0xf4410['str'](_0x2afc5d(0xb1))),_0x13d00a=Date[_0x2afc5d(0xab)](),_0x48d2a5=await executeSdkBff(_0xf4410[_0x2afc5d(0xbb)](_0x2afc5d(0xb2)),_0x295c08),_0x42ea4e=Date[_0x2afc5d(0xab)]()-_0x13d00a;return{'ok':!![],'data':{'result':_0x48d2a5,'elapsed':_0x42ea4e},'message':_0x2afc5d(0xb3)+_0x42ea4e+'ms'};}};
@@ -1 +1 @@
1
- (function(_0x276d6f,_0x28c4ad){const _0x489b1c=a12_0x5c4d,_0x22c5ed=_0x276d6f();while(!![]){try{const _0x436103=-parseInt(_0x489b1c(0xea))/0x1*(-parseInt(_0x489b1c(0xef))/0x2)+parseInt(_0x489b1c(0xed))/0x3+parseInt(_0x489b1c(0xe7))/0x4*(parseInt(_0x489b1c(0xee))/0x5)+-parseInt(_0x489b1c(0xeb))/0x6*(parseInt(_0x489b1c(0xe6))/0x7)+parseInt(_0x489b1c(0xe5))/0x8+-parseInt(_0x489b1c(0xe9))/0x9+-parseInt(_0x489b1c(0xe8))/0xa*(parseInt(_0x489b1c(0xec))/0xb);if(_0x436103===_0x28c4ad)break;else _0x22c5ed['push'](_0x22c5ed['shift']());}catch(_0x31472c){_0x22c5ed['push'](_0x22c5ed['shift']());}}}(a12_0x140f,0xef500));import{bffDetail}from'./detail.js';import{bffExec}from'./exec.js';function a12_0x5c4d(_0x8c0fe4,_0x55eeaf){_0x8c0fe4=_0x8c0fe4-0xe5;const _0x140fe8=a12_0x140f();let _0x5c4d35=_0x140fe8[_0x8c0fe4];return _0x5c4d35;}export const bffDefinitions=[bffDetail,bffExec];function a12_0x140f(){const _0x572bfe=['22nVmUxh','3987252aFHwOq','4330775cLWmsq','184ubMmIH','12302952IqxgEE','28DMZtYK','4LdiPKS','4535130ynXGHn','15294798HdIxPG','2390pcDWAj','549474uhQdvA'];a12_0x140f=function(){return _0x572bfe;};return a12_0x140f();}
1
+ function a12_0x4803(_0x181ae8,_0x4538c5){_0x181ae8=_0x181ae8-0x16f;const _0x528369=a12_0x5283();let _0x480354=_0x528369[_0x181ae8];return _0x480354;}(function(_0x353885,_0x4cfe46){const _0x5ad36c=a12_0x4803,_0x22835e=_0x353885();while(!![]){try{const _0x304d99=parseInt(_0x5ad36c(0x171))/0x1*(parseInt(_0x5ad36c(0x179))/0x2)+-parseInt(_0x5ad36c(0x172))/0x3*(parseInt(_0x5ad36c(0x178))/0x4)+-parseInt(_0x5ad36c(0x17c))/0x5*(parseInt(_0x5ad36c(0x177))/0x6)+parseInt(_0x5ad36c(0x175))/0x7*(parseInt(_0x5ad36c(0x16f))/0x8)+parseInt(_0x5ad36c(0x17a))/0x9*(parseInt(_0x5ad36c(0x170))/0xa)+parseInt(_0x5ad36c(0x17b))/0xb*(-parseInt(_0x5ad36c(0x173))/0xc)+parseInt(_0x5ad36c(0x174))/0xd*(-parseInt(_0x5ad36c(0x176))/0xe);if(_0x304d99===_0x4cfe46)break;else _0x22835e['push'](_0x22835e['shift']());}catch(_0x2e110e){_0x22835e['push'](_0x22835e['shift']());}}}(a12_0x5283,0x6026a));import{bffDetail}from'./detail.js';import{bffExec}from'./exec.js';function a12_0x5283(){const _0x39b15d=['5304qdhdoa','338sCNmTH','49441AxsIAW','36582NtcDOZ','126264uONrBY','16RmSMmL','534190UEnhtC','9yUVDuY','10109LhlsBp','85VFkAAR','752mdDOvf','2566540kckYUg','2nVhROp','171786dAZGgC'];a12_0x5283=function(){return _0x39b15d;};return a12_0x5283();}export const bffDefinitions=[bffDetail,bffExec];
@@ -1 +1 @@
1
- (function(_0x42fbe4,_0x17da0d){const _0x4bffbf=a13_0x7047,_0x408521=_0x42fbe4();while(!![]){try{const _0x3b61c4=-parseInt(_0x4bffbf(0xec))/0x1*(parseInt(_0x4bffbf(0xdf))/0x2)+parseInt(_0x4bffbf(0xd9))/0x3+parseInt(_0x4bffbf(0xd1))/0x4*(-parseInt(_0x4bffbf(0xe9))/0x5)+-parseInt(_0x4bffbf(0xd7))/0x6+parseInt(_0x4bffbf(0xe2))/0x7+parseInt(_0x4bffbf(0xd2))/0x8+-parseInt(_0x4bffbf(0xe7))/0x9*(-parseInt(_0x4bffbf(0xe0))/0xa);if(_0x3b61c4===_0x17da0d)break;else _0x408521['push'](_0x408521['shift']());}catch(_0x500748){_0x408521['push'](_0x408521['shift']());}}}(a13_0x51d3,0xaaa42));import{CliErrors}from'../../errors.js';function isSet(_0x4a0311,_0x1a6dcf){const _0x2b1ef6=a13_0x7047,_0x36d9ec=_0x4a0311[_0x2b1ef6(0xd5)](_0x1a6dcf);return _0x36d9ec!==undefined&&_0x36d9ec!==''&&_0x36d9ec!==![]&&_0x36d9ec!==0x0;}function fmtNames(_0x239069){const _0x328838=a13_0x7047;return _0x239069[_0x328838(0xe3)](_0x32d208=>'--'+_0x32d208)[_0x328838(0xde)](',\x20');}function a13_0x7047(_0x4c4516,_0x290c27){_0x4c4516=_0x4c4516-0xd1;const _0x51d3bb=a13_0x51d3();let _0x704700=_0x51d3bb[_0x4c4516];return _0x704700;}export function requireOneOf(_0x53ba96,_0xd99578,_0x4fd695){const _0x5e2535=a13_0x7047,_0x304f9e=_0xd99578[_0x5e2535(0xe4)](_0x272594=>isSet(_0x53ba96,_0x272594));if(_0x304f9e[_0x5e2535(0xdc)]!==0x1)throw CliErrors[_0x5e2535(0xd8)](_0x304f9e['length']===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0xd99578)+'\x20is\x20required\x20for\x20`'+_0x4fd695+'`.':_0x5e2535(0xeb)+fmtNames(_0xd99578)+_0x5e2535(0xe6)+fmtNames(_0x304f9e)+'.',_0x304f9e['length']===0x0?_0x5e2535(0xda)+fmtNames(_0xd99578):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0xb3ee7d,_0x4e2f03,_0x4090f4){const _0x5ba5a1=a13_0x7047;if(!_0x4e2f03[_0x5ba5a1(0xdd)](_0x28f8d0=>isSet(_0xb3ee7d,_0x28f8d0)))throw CliErrors[_0x5ba5a1(0xd8)](_0x5ba5a1(0xe8)+fmtNames(_0x4e2f03)+_0x5ba5a1(0xe1)+_0x4090f4+'`.',_0x5ba5a1(0xda)+fmtNames(_0x4e2f03));}export function mutuallyExclusive(_0x4b4f7d,_0x4a3627,_0x579611){const _0x1346c8=a13_0x7047,_0x245759=_0x4a3627['filter'](_0x8ebc79=>isSet(_0x4b4f7d,_0x8ebc79));if(_0x245759[_0x1346c8(0xdc)]>0x1)throw CliErrors[_0x1346c8(0xd8)]('Flags\x20'+fmtNames(_0x245759)+_0x1346c8(0xd4)+_0x579611+'`.',_0x1346c8(0xd6)+fmtNames(_0x4a3627));}export function validatePattern(_0x571a60,_0x8a8160,_0x3aa5ee,_0x10ab95){const _0x4fe0fb=a13_0x7047,_0x1ab1c7=_0x571a60[_0x4fe0fb(0xd3)](_0x8a8160);if(_0x1ab1c7&&!_0x3aa5ee[_0x4fe0fb(0xe5)](_0x1ab1c7))throw CliErrors[_0x4fe0fb(0xd8)]('Invalid\x20--'+_0x8a8160+_0x4fe0fb(0xdb)+_0x10ab95+_0x4fe0fb(0xea)+_0x1ab1c7+'\x22.');}function a13_0x51d3(){const _0x309e4e=['\x20are\x20mutually\x20exclusive\x20for\x20`','flag','Use\x20only\x20one\x20of:\x20','6961668MlaDSJ','validation','3022554kWuwXI','Provide\x20one\x20of:\x20',':\x20expected\x20','length','some','join','158qYSsSh','220xFrTEJ','\x20is\x20required\x20for\x20`','2932209nTFXBR','map','filter','test','\x20is\x20allowed,\x20found:\x20','216117pjoVHB','At\x20least\x20one\x20of\x20','10CScQsK',',\x20got\x20\x22','Only\x20one\x20of\x20','11069niLqJZ','1120348XVpalR','10713264FHztAv','str'];a13_0x51d3=function(){return _0x309e4e;};return a13_0x51d3();}
1
+ (function(_0x2bde0b,_0x691945){const _0x4576ab=a13_0x2637,_0x1ea383=_0x2bde0b();while(!![]){try{const _0x5ce05b=-parseInt(_0x4576ab(0x165))/0x1+parseInt(_0x4576ab(0x164))/0x2+parseInt(_0x4576ab(0x171))/0x3*(-parseInt(_0x4576ab(0x172))/0x4)+-parseInt(_0x4576ab(0x170))/0x5+-parseInt(_0x4576ab(0x179))/0x6+-parseInt(_0x4576ab(0x168))/0x7+-parseInt(_0x4576ab(0x16a))/0x8*(-parseInt(_0x4576ab(0x166))/0x9);if(_0x5ce05b===_0x691945)break;else _0x1ea383['push'](_0x1ea383['shift']());}catch(_0x1b29cd){_0x1ea383['push'](_0x1ea383['shift']());}}}(a13_0x4b49,0xca2f6));import{CliErrors}from'../../errors.js';function isSet(_0x158470,_0x4cf963){const _0x2c9f35=a13_0x2637,_0x470432=_0x158470[_0x2c9f35(0x16f)](_0x4cf963);return _0x470432!==undefined&&_0x470432!==''&&_0x470432!==![]&&_0x470432!==0x0;}function fmtNames(_0xedda42){return _0xedda42['map'](_0x568497=>'--'+_0x568497)['join'](',\x20');}export function requireOneOf(_0x3d393f,_0x4cf52d,_0x5baadd){const _0x4e22d8=a13_0x2637,_0x29b461=_0x4cf52d[_0x4e22d8(0x175)](_0x558fbf=>isSet(_0x3d393f,_0x558fbf));if(_0x29b461[_0x4e22d8(0x177)]!==0x1)throw CliErrors[_0x4e22d8(0x16b)](_0x29b461[_0x4e22d8(0x177)]===0x0?_0x4e22d8(0x16d)+fmtNames(_0x4cf52d)+_0x4e22d8(0x174)+_0x5baadd+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x4cf52d)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x29b461)+'.',_0x29b461[_0x4e22d8(0x177)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x4cf52d):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x149209,_0x3e604b,_0x203c5f){const _0xc39405=a13_0x2637;if(!_0x3e604b[_0xc39405(0x167)](_0x552814=>isSet(_0x149209,_0x552814)))throw CliErrors[_0xc39405(0x16b)](_0xc39405(0x169)+fmtNames(_0x3e604b)+'\x20is\x20required\x20for\x20`'+_0x203c5f+'`.',_0xc39405(0x16c)+fmtNames(_0x3e604b));}export function mutuallyExclusive(_0x5de100,_0x49fe16,_0x3e2119){const _0x1c093a=a13_0x2637,_0x543a14=_0x49fe16[_0x1c093a(0x175)](_0x211649=>isSet(_0x5de100,_0x211649));if(_0x543a14[_0x1c093a(0x177)]>0x1)throw CliErrors['validation']('Flags\x20'+fmtNames(_0x543a14)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x3e2119+'`.',_0x1c093a(0x173)+fmtNames(_0x49fe16));}function a13_0x2637(_0x3abfac,_0x47d26f){_0x3abfac=_0x3abfac-0x163;const _0x4b4959=a13_0x4b49();let _0x2637a2=_0x4b4959[_0x3abfac];return _0x2637a2;}export function validatePattern(_0x1cae53,_0x16cfea,_0x337d79,_0x3b1a8e){const _0x409efe=a13_0x2637,_0x5d5d03=_0x1cae53[_0x409efe(0x178)](_0x16cfea);if(_0x5d5d03&&!_0x337d79['test'](_0x5d5d03))throw CliErrors[_0x409efe(0x16b)](_0x409efe(0x176)+_0x16cfea+_0x409efe(0x16e)+_0x3b1a8e+_0x409efe(0x163)+_0x5d5d03+'\x22.');}function a13_0x4b49(){const _0x2adcc1=['validation','Provide\x20one\x20of:\x20','Exactly\x20one\x20of\x20',':\x20expected\x20','flag','2300600AluBCc','3861966BKBRVY','4IVAlFt','Use\x20only\x20one\x20of:\x20','\x20is\x20required\x20for\x20`','filter','Invalid\x20--','length','str','7368744NFbVMG',',\x20got\x20\x22','28576eiJZHK','367771lXNYkf','377343tkSbQE','some','8759688MIQliL','At\x20least\x20one\x20of\x20','1032BdSUEn'];a13_0x4b49=function(){return _0x2adcc1;};return a13_0x4b49();}
@@ -1 +1 @@
1
- function a14_0x56fa(_0x1a8572,_0x30725f){_0x1a8572=_0x1a8572-0xee;const _0x265b1d=a14_0x265b();let _0x56fa31=_0x265b1d[_0x1a8572];return _0x56fa31;}const a14_0x38315f=a14_0x56fa;function a14_0x265b(){const _0x573083=['751163QVVGTH','10THUYOr','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','840228mgNfup','number','40697AXzVPJ','2662165WfXcXF','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','537854EAsWQJ','3545973MOQqYg','boolean','Return\x20full\x20raw\x20response\x20object','verbose','params','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','8KaLjAo','3BMBukJ','Resource\x20ID','2653734LHBczy','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','string'];a14_0x265b=function(){return _0x573083;};return a14_0x265b();}(function(_0x552120,_0x3e59fa){const _0x5351c1=a14_0x56fa,_0x397c66=_0x552120();while(!![]){try{const _0x4d497b=-parseInt(_0x5351c1(0xfc))/0x1+-parseInt(_0x5351c1(0xff))/0x2*(parseInt(_0x5351c1(0xf2))/0x3)+parseInt(_0x5351c1(0xfa))/0x4+parseInt(_0x5351c1(0xfd))/0x5+-parseInt(_0x5351c1(0xf4))/0x6+parseInt(_0x5351c1(0xf7))/0x7*(-parseInt(_0x5351c1(0xf1))/0x8)+parseInt(_0x5351c1(0x100))/0x9*(parseInt(_0x5351c1(0xf8))/0xa);if(_0x4d497b===_0x3e59fa)break;else _0x397c66['push'](_0x397c66['shift']());}catch(_0x4b64e8){_0x397c66['push'](_0x397c66['shift']());}}}(a14_0x265b,0x43b11));export const CODE_FLAG={'name':'code','type':a14_0x38315f(0xf6),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a14_0x38315f(0xfe)}};export const SQLCODE_FLAG={'name':'sqlcode','type':a14_0x38315f(0xf6),'required':!![],'description':a14_0x38315f(0xf0),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a14_0x38315f(0xf9)}};export const VERBOSE_FLAG={'name':a14_0x38315f(0xee),'type':a14_0x38315f(0x101),'description':a14_0x38315f(0x102)};export const PARAMS_FLAG={'name':a14_0x38315f(0xef),'type':a14_0x38315f(0xf6),'description':a14_0x38315f(0xf5)};export const NAME_FLAG={'name':'name','type':'string','description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':a14_0x38315f(0xfb),'required':!![],'description':a14_0x38315f(0xf3)};
1
+ const a14_0x592a07=a14_0x5570;(function(_0x2e43fe,_0x2f1661){const _0x55d7a6=a14_0x5570,_0xf302f5=_0x2e43fe();while(!![]){try{const _0x5ba665=-parseInt(_0x55d7a6(0x8b))/0x1*(-parseInt(_0x55d7a6(0x90))/0x2)+parseInt(_0x55d7a6(0x88))/0x3+parseInt(_0x55d7a6(0x91))/0x4+parseInt(_0x55d7a6(0x8d))/0x5+parseInt(_0x55d7a6(0x80))/0x6+-parseInt(_0x55d7a6(0x83))/0x7*(-parseInt(_0x55d7a6(0x82))/0x8)+parseInt(_0x55d7a6(0x7f))/0x9*(-parseInt(_0x55d7a6(0x85))/0xa);if(_0x5ba665===_0x2f1661)break;else _0xf302f5['push'](_0xf302f5['shift']());}catch(_0x1d249d){_0xf302f5['push'](_0xf302f5['shift']());}}}(a14_0x570c,0xbe108));export const CODE_FLAG={'name':a14_0x592a07(0x8e),'type':a14_0x592a07(0x95),'required':!![],'description':a14_0x592a07(0x81),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a14_0x592a07(0x8f)}};export const SQLCODE_FLAG={'name':a14_0x592a07(0x8a),'type':a14_0x592a07(0x95),'required':!![],'description':a14_0x592a07(0x92),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a14_0x592a07(0x93)}};export const VERBOSE_FLAG={'name':a14_0x592a07(0x86),'type':a14_0x592a07(0x8c),'description':a14_0x592a07(0x87)};export const PARAMS_FLAG={'name':a14_0x592a07(0x94),'type':'string','description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':a14_0x592a07(0x89),'type':'string','description':a14_0x592a07(0x96)};function a14_0x570c(){const _0x212d65=['boolean','5746900VvPFMk','code','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','27502SKuuUY','547928nOtlWu','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','params','string','Resource\x20name\x20for\x20lookup','11601sxImeI','5171952xRFMUv','Dataset\x20code\x20(32-char\x20hex\x20UUID)','371688DAoLiI','77HkXyhN','number','32510Mrdiim','verbose','Return\x20full\x20raw\x20response\x20object','4494927CeSkmp','name','sqlcode','59HSmYrb'];a14_0x570c=function(){return _0x212d65;};return a14_0x570c();}function a14_0x5570(_0x556ee5,_0x36d415){_0x556ee5=_0x556ee5-0x7f;const _0x570c04=a14_0x570c();let _0x5570ed=_0x570c04[_0x556ee5];return _0x5570ed;}export const ID_FLAG={'name':'id','type':a14_0x592a07(0x84),'required':!![],'description':'Resource\x20ID'};
@@ -1 +1 @@
1
- function a15_0x272a(){const _0x2446ad=['204768WxmyCL','List\x20current\x20config','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a','log','\x22\x20not\x20found\x20in\x20config.','Missing\x20key\x20or\x20value.','has','join','object','3390qIdgxg','Operate\x20within\x20a\x20specific\x20app\x20profile','\x22\x20is\x20not\x20settable.','(none)','bool','535996GPOamA','App\x20\x22','Get\x20a\x20config\x20value','Set\x20`','string','key','24pZzFmR','Set\x20a\x20config\x20value','value','Key\x20\x22','get','11412qopbLq','Write\x20to\x20global\x20config','Delete\x20a\x20config\x20value','validation','Invalid\x20value\x20for\x20\x22','read','\x20\x20project:\x20','\x20(global)','792498dMXqBS','`\x20=\x20\x22','\x22\x20not\x20found\x20at\x20top\x20level.','app','\x20\x20global:\x20\x20','Missing\x20key\x20argument.','255343hAUUqD','Config\x20key\x20(supports\x20dot\x20notation:\x20apps.myapp.env)','stringify','3140NzjjGH','pageSize','list','Value\x20to\x20assign','args','includes','boolean','Settable\x20top-level\x20keys:\x20','Key\x20not\x20found:\x20','config','\x22.\x20Allowed:\x20','`\x20from\x20app\x20\x22','\x22\x20not\x20found\x20on\x20app\x20\x22','split','str','Cannot\x20set\x20\x22','\x20config\x20delete\x20<key>\x20[--app\x20<name>]\x20[--global]','24afpqup','Config\x20key\x20to\x20delete','Usage:\x20','\x22\x20not\x20found.','write','5MqLuZt','8558zbpaxm','apps','262UtBegN','global','Deleted\x20`'];a15_0x272a=function(){return _0x2446ad;};return a15_0x272a();}const a15_0x1ea2de=a15_0x5a41;function a15_0x5a41(_0x20c1aa,_0x30f510){_0x20c1aa=_0x20c1aa-0x1f2;const _0x272acd=a15_0x272a();let _0x5a41bc=_0x272acd[_0x20c1aa];return _0x5a41bc;}(function(_0x4ac40c,_0x54cbbe){const _0x5d979a=a15_0x5a41,_0x47274d=_0x4ac40c();while(!![]){try{const _0x42f17d=parseInt(_0x5d979a(0x22f))/0x1+parseInt(_0x5d979a(0x205))/0x2*(parseInt(_0x5d979a(0x211))/0x3)+-parseInt(_0x5d979a(0x216))/0x4*(parseInt(_0x5d979a(0x202))/0x5)+parseInt(_0x5d979a(0x1fd))/0x6*(parseInt(_0x5d979a(0x229))/0x7)+-parseInt(_0x5d979a(0x208))/0x8+parseInt(_0x5d979a(0x221))/0x9*(-parseInt(_0x5d979a(0x232))/0xa)+-parseInt(_0x5d979a(0x203))/0xb*(-parseInt(_0x5d979a(0x21c))/0xc);if(_0x42f17d===_0x54cbbe)break;else _0x47274d['push'](_0x47274d['shift']());}catch(_0x2df120){_0x47274d['push'](_0x47274d['shift']());}}}(a15_0x272a,0x49406));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,TOP_LEVEL_KEYS,APP_PROFILE_KEYS,ENUM_KEYS,readScopedConfig,writeScopedConfig}from'./shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a15_0x1ea2de(0x206),'type':a15_0x1ea2de(0x1f2),'description':a15_0x1ea2de(0x222),'default':![]},APP_FLAG={'name':'app','type':a15_0x1ea2de(0x21a),'description':a15_0x1ea2de(0x212)},listDef={'service':a15_0x1ea2de(0x1f5),'command':a15_0x1ea2de(0x234),'description':a15_0x1ea2de(0x209),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1f8d7c){const _0x598c22=a15_0x1ea2de,{buildConfigFromFlags:_0x5e63a4}=await import('../../context.js'),_0x2a293a=_0x5e63a4({});console[_0x598c22(0x20b)](_0x598c22(0x20a)),console[_0x598c22(0x20b)](JSON['stringify'](_0x2a293a['raw'],null,0x2));const _0x296a18=getProjectConfigPath(),_0x570337=resolveWriteConfigPath(_0x598c22(0x206));return console[_0x598c22(0x20b)]('\x0aConfig\x20files:'),console[_0x598c22(0x20b)](_0x598c22(0x227)+(_0x296a18??_0x598c22(0x214))),console[_0x598c22(0x20b)](_0x598c22(0x22d)+_0x570337),{'ok':!![]};}},getDef={'service':a15_0x1ea2de(0x1f5),'command':a15_0x1ea2de(0x220),'description':a15_0x1ea2de(0x218),'risk':a15_0x1ea2de(0x226),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a15_0x1ea2de(0x21b),'description':a15_0x1ea2de(0x230),'required':!![]}],'flags':[],async 'execute'(_0x38fb91){const _0x282719=a15_0x1ea2de,_0x41d5b9=_0x38fb91[_0x282719(0x236)][0x0];if(!_0x41d5b9)throw CliErrors[_0x282719(0x224)](_0x282719(0x22e),_0x282719(0x1ff)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x2027c9}=await import('../../context.js'),{raw:_0x4120e8}=_0x2027c9({});if(_0x41d5b9[_0x282719(0x237)]('.')){const _0xc2bd13=_0x41d5b9[_0x282719(0x1f9)]('.');let _0x2f105f=_0x4120e8;for(const _0x44aafa of _0xc2bd13){if(_0x2f105f==null||typeof _0x2f105f!==_0x282719(0x210))throw CliErrors['validation'](_0x282719(0x1f4)+_0x41d5b9);_0x2f105f=_0x2f105f[_0x44aafa];}if(_0x2f105f===undefined)throw CliErrors[_0x282719(0x224)]('Key\x20not\x20found:\x20'+_0x41d5b9);return console[_0x282719(0x20b)](typeof _0x2f105f===_0x282719(0x210)?JSON[_0x282719(0x231)](_0x2f105f,null,0x2):String(_0x2f105f)),{'ok':!![]};}const _0x295bb7=_0x4120e8[_0x41d5b9];if(_0x295bb7===undefined)throw CliErrors['validation'](_0x282719(0x1f4)+_0x41d5b9);return console['log'](typeof _0x295bb7===_0x282719(0x210)?JSON[_0x282719(0x231)](_0x295bb7,null,0x2):String(_0x295bb7)),{'ok':!![]};}},setDef={'service':a15_0x1ea2de(0x1f5),'command':'set','description':a15_0x1ea2de(0x21d),'risk':a15_0x1ea2de(0x201),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a15_0x1ea2de(0x21b),'description':'Config\x20key\x20to\x20set','required':!![]},{'name':a15_0x1ea2de(0x21e),'description':a15_0x1ea2de(0x235),'required':!![]}],'flags':[GLOBAL_FLAG,APP_FLAG],async 'execute'(_0x181759){const _0x2eedc7=a15_0x1ea2de,_0x104846=_0x181759[_0x2eedc7(0x236)][0x0],_0x1aba1f=_0x181759[_0x2eedc7(0x236)][0x1];if(!_0x104846||_0x1aba1f===undefined)throw CliErrors[_0x2eedc7(0x224)](_0x2eedc7(0x20d),_0x2eedc7(0x1ff)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--app\x20<name>]\x20[--global]');if(ENUM_KEYS[_0x104846]&&!ENUM_KEYS[_0x104846]['includes'](_0x1aba1f))throw CliErrors['validation'](_0x2eedc7(0x225)+_0x104846+_0x2eedc7(0x1f6)+ENUM_KEYS[_0x104846][_0x2eedc7(0x20f)](',\x20'));if(_0x104846==='pageSize'){const _0x4c1bee=Number(_0x1aba1f);if(isNaN(_0x4c1bee)||_0x4c1bee<=0x0)throw CliErrors[_0x2eedc7(0x224)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x3456e1={'global':_0x181759['bool'](_0x2eedc7(0x206))},_0x109ffa=readScopedConfig(_0x3456e1),_0x540b86=_0x181759[_0x2eedc7(0x1fa)](_0x2eedc7(0x22c));if(_0x540b86){if(!_0x109ffa[_0x2eedc7(0x204)])_0x109ffa[_0x2eedc7(0x204)]={};if(!_0x109ffa[_0x2eedc7(0x204)][_0x540b86])throw CliErrors[_0x2eedc7(0x224)](_0x2eedc7(0x217)+_0x540b86+_0x2eedc7(0x20c),'Add\x20it\x20first\x20with\x20`'+CLI_BIN_NAME+'\x20app\x20add`.');if(!APP_PROFILE_KEYS[_0x2eedc7(0x20e)](_0x104846))throw CliErrors['validation'](_0x2eedc7(0x1fb)+_0x104846+'\x22\x20on\x20app\x20profile.','Available\x20for\x20--app:\x20'+[...APP_PROFILE_KEYS]['join'](',\x20'));_0x109ffa['apps'][_0x540b86][_0x104846]=_0x104846===_0x2eedc7(0x233)?Number(_0x1aba1f):_0x1aba1f,console['log'](_0x2eedc7(0x219)+_0x104846+_0x2eedc7(0x22a)+_0x1aba1f+'\x22\x20on\x20app\x20\x22'+_0x540b86+'\x22'+(_0x181759[_0x2eedc7(0x215)](_0x2eedc7(0x206))?_0x2eedc7(0x228):''));}else{if(!TOP_LEVEL_KEYS[_0x2eedc7(0x20e)](_0x104846))throw CliErrors['validation']('Top-level\x20key\x20\x22'+_0x104846+_0x2eedc7(0x213),_0x2eedc7(0x1f3)+[...TOP_LEVEL_KEYS][_0x2eedc7(0x20f)](',\x20'));_0x109ffa[_0x104846]=_0x104846===_0x2eedc7(0x233)?Number(_0x1aba1f):_0x1aba1f,console['log'](_0x2eedc7(0x219)+_0x104846+_0x2eedc7(0x22a)+_0x1aba1f+'\x22'+(_0x181759['bool'](_0x2eedc7(0x206))?_0x2eedc7(0x228):''));}return writeScopedConfig(_0x109ffa,_0x3456e1),{'ok':!![]};}},deleteDef={'service':a15_0x1ea2de(0x1f5),'command':'delete','description':a15_0x1ea2de(0x223),'risk':a15_0x1ea2de(0x201),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a15_0x1ea2de(0x1fe),'required':!![]}],'flags':[GLOBAL_FLAG,APP_FLAG],async 'execute'(_0x362e3c){const _0x57cb99=a15_0x1ea2de,_0x57c721=_0x362e3c['args'][0x0];if(!_0x57c721)throw CliErrors[_0x57cb99(0x224)](_0x57cb99(0x22e),_0x57cb99(0x1ff)+CLI_BIN_NAME+_0x57cb99(0x1fc));const _0xd0500e={'global':_0x362e3c['bool'](_0x57cb99(0x206))},_0x322ef1=readScopedConfig(_0xd0500e),_0x15c8bc=_0x362e3c[_0x57cb99(0x1fa)](_0x57cb99(0x22c));if(_0x15c8bc){if(!_0x322ef1[_0x57cb99(0x204)]?.[_0x15c8bc])throw CliErrors[_0x57cb99(0x224)]('App\x20\x22'+_0x15c8bc+_0x57cb99(0x200));if(_0x322ef1[_0x57cb99(0x204)][_0x15c8bc][_0x57c721]===undefined)throw CliErrors[_0x57cb99(0x224)](_0x57cb99(0x21f)+_0x57c721+_0x57cb99(0x1f8)+_0x15c8bc+'\x22.');delete _0x322ef1[_0x57cb99(0x204)][_0x15c8bc][_0x57c721],console[_0x57cb99(0x20b)]('Deleted\x20`'+_0x57c721+_0x57cb99(0x1f7)+_0x15c8bc+'\x22'+(_0x362e3c[_0x57cb99(0x215)](_0x57cb99(0x206))?_0x57cb99(0x228):''));}else{if(_0x322ef1[_0x57c721]===undefined)throw CliErrors['validation']('Key\x20\x22'+_0x57c721+_0x57cb99(0x22b));delete _0x322ef1[_0x57c721],console[_0x57cb99(0x20b)](_0x57cb99(0x207)+_0x57c721+'`'+(_0x362e3c[_0x57cb99(0x215)](_0x57cb99(0x206))?_0x57cb99(0x228):''));}return writeScopedConfig(_0x322ef1,_0xd0500e),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
1
+ const a15_0xc34e13=a15_0x5cff;(function(_0x3ca2f5,_0x1a4282){const _0xbd6df2=a15_0x5cff,_0x2d1e1=_0x3ca2f5();while(!![]){try{const _0xb0fd65=-parseInt(_0xbd6df2(0xe9))/0x1*(parseInt(_0xbd6df2(0x105))/0x2)+parseInt(_0xbd6df2(0x132))/0x3*(parseInt(_0xbd6df2(0x10b))/0x4)+-parseInt(_0xbd6df2(0x124))/0x5*(-parseInt(_0xbd6df2(0x106))/0x6)+parseInt(_0xbd6df2(0x120))/0x7+parseInt(_0xbd6df2(0x10e))/0x8*(parseInt(_0xbd6df2(0xfb))/0x9)+parseInt(_0xbd6df2(0x104))/0xa*(-parseInt(_0xbd6df2(0x10c))/0xb)+-parseInt(_0xbd6df2(0xfe))/0xc;if(_0xb0fd65===_0x1a4282)break;else _0x2d1e1['push'](_0x2d1e1['shift']());}catch(_0x2bf2eb){_0x2d1e1['push'](_0x2d1e1['shift']());}}}(a15_0x4bc3,0xec2d6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,TOP_LEVEL_KEYS,APP_PROFILE_KEYS,ENUM_KEYS,readScopedConfig,writeScopedConfig}from'./shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';function a15_0x4bc3(){const _0xda386a=['`\x20from\x20app\x20\x22','Config\x20key\x20(supports\x20dot\x20notation:\x20apps.myapp.env)','\x22\x20not\x20found\x20on\x20app\x20\x22','Deleted\x20`','3762CCuMlL','delete','args','16956120oSOEeP','write','log','Value\x20to\x20assign','Delete\x20a\x20config\x20value','Top-level\x20key\x20\x22','78530ViEpan','28920WLXYDv','10056IeLTFB','join','\x20\x20project:\x20','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','list','703820vCFstL','1749bFLQTs','riskLevel','15400gqqQPN','\x20(global)','\x22.\x20Allowed:\x20','\x22\x20on\x20app\x20profile.','\x22\x20not\x20found\x20in\x20config.','Missing\x20key\x20argument.','bool','global','Available\x20for\x20--app:\x20','validation','\x20app\x20add`.','Invalid\x20value\x20for\x20\x22','read','Settable\x20top-level\x20keys:\x20','config','object','Get\x20a\x20config\x20value','`\x20=\x20\x22','5625816UYhuGJ','Set\x20a\x20config\x20value','str','stringify','5230WNhdrc','string','set','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a','get','\x0aConfig\x20files:','has','includes','Config\x20key\x20to\x20delete','\x22\x20not\x20found\x20at\x20top\x20level.','List\x20current\x20config','\x22\x20on\x20app\x20\x22','Usage:\x20','key','9wKnDhQ','Operate\x20within\x20a\x20specific\x20app\x20profile','Add\x20it\x20first\x20with\x20`','../../context.js','18EhDpXu','split','Cannot\x20set\x20\x22','Set\x20`','\x22\x20not\x20found.','(none)','apps','Config\x20key\x20to\x20set','\x22\x20is\x20not\x20settable.','value','Key\x20not\x20found:\x20','Key\x20\x22','App\x20\x22','app'];a15_0x4bc3=function(){return _0xda386a;};return a15_0x4bc3();}function a15_0x5cff(_0x4432ae,_0x84b672){_0x4432ae=_0x4432ae-0xe6;const _0x4bc34f=a15_0x4bc3();let _0x5cffee=_0x4bc34f[_0x4432ae];return _0x5cffee;}const GLOBAL_FLAG={'name':a15_0xc34e13(0x115),'type':'boolean','description':'Write\x20to\x20global\x20config','default':![]},APP_FLAG={'name':a15_0xc34e13(0xf6),'type':a15_0xc34e13(0x125),'description':a15_0xc34e13(0xe6)},listDef={'service':a15_0xc34e13(0x11c),'command':a15_0xc34e13(0x10a),'description':a15_0xc34e13(0x12e),'risk':a15_0xc34e13(0x11a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4d7357){const _0x4720ee=a15_0xc34e13,{buildConfigFromFlags:_0xc05216}=await import(_0x4720ee(0xe8)),_0x1dfc28=_0xc05216({});console[_0x4720ee(0x100)](_0x4720ee(0x127)),console[_0x4720ee(0x100)](JSON[_0x4720ee(0x123)](_0x1dfc28['raw'],null,0x2));const _0x165713=getProjectConfigPath(),_0x1436a7=resolveWriteConfigPath('global');return console[_0x4720ee(0x100)](_0x4720ee(0x129)),console['log'](_0x4720ee(0x108)+(_0x165713??_0x4720ee(0xee))),console[_0x4720ee(0x100)]('\x20\x20global:\x20\x20'+_0x1436a7),{'ok':!![]};}},getDef={'service':a15_0xc34e13(0x11c),'command':a15_0xc34e13(0x128),'description':a15_0xc34e13(0x11e),'risk':a15_0xc34e13(0x11a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a15_0xc34e13(0x131),'description':a15_0xc34e13(0xf8),'required':!![]}],'flags':[],async 'execute'(_0x5e989e){const _0x53e26c=a15_0xc34e13,_0x55c951=_0x5e989e[_0x53e26c(0xfd)][0x0];if(!_0x55c951)throw CliErrors[_0x53e26c(0x117)](_0x53e26c(0x113),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x18aa53}=await import(_0x53e26c(0xe8)),{raw:_0x4adead}=_0x18aa53({});if(_0x55c951[_0x53e26c(0x12b)]('.')){const _0xc22041=_0x55c951[_0x53e26c(0xea)]('.');let _0x3da2dc=_0x4adead;for(const _0x2045fb of _0xc22041){if(_0x3da2dc==null||typeof _0x3da2dc!==_0x53e26c(0x11d))throw CliErrors[_0x53e26c(0x117)](_0x53e26c(0xf3)+_0x55c951);_0x3da2dc=_0x3da2dc[_0x2045fb];}if(_0x3da2dc===undefined)throw CliErrors[_0x53e26c(0x117)](_0x53e26c(0xf3)+_0x55c951);return console[_0x53e26c(0x100)](typeof _0x3da2dc==='object'?JSON['stringify'](_0x3da2dc,null,0x2):String(_0x3da2dc)),{'ok':!![]};}const _0x1578df=_0x4adead[_0x55c951];if(_0x1578df===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x55c951);return console[_0x53e26c(0x100)](typeof _0x1578df===_0x53e26c(0x11d)?JSON[_0x53e26c(0x123)](_0x1578df,null,0x2):String(_0x1578df)),{'ok':!![]};}},setDef={'service':a15_0xc34e13(0x11c),'command':a15_0xc34e13(0x126),'description':a15_0xc34e13(0x121),'risk':a15_0xc34e13(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a15_0xc34e13(0xf0),'required':!![]},{'name':a15_0xc34e13(0xf2),'description':a15_0xc34e13(0x101),'required':!![]}],'flags':[GLOBAL_FLAG,APP_FLAG],async 'execute'(_0x5f542e){const _0x2348c7=a15_0xc34e13,_0x342b03=_0x5f542e[_0x2348c7(0xfd)][0x0],_0x5b3dc1=_0x5f542e[_0x2348c7(0xfd)][0x1];if(!_0x342b03||_0x5b3dc1===undefined)throw CliErrors[_0x2348c7(0x117)]('Missing\x20key\x20or\x20value.',_0x2348c7(0x130)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--app\x20<name>]\x20[--global]');if(ENUM_KEYS[_0x342b03]&&!ENUM_KEYS[_0x342b03][_0x2348c7(0x12b)](_0x5b3dc1))throw CliErrors[_0x2348c7(0x117)](_0x2348c7(0x119)+_0x342b03+_0x2348c7(0x110)+ENUM_KEYS[_0x342b03]['join'](',\x20'));if(_0x342b03===_0x2348c7(0x10d))throw CliErrors[_0x2348c7(0x117)](_0x2348c7(0x109));if(_0x342b03==='pageSize'){const _0x1b9bed=Number(_0x5b3dc1);if(isNaN(_0x1b9bed)||_0x1b9bed<=0x0)throw CliErrors[_0x2348c7(0x117)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x37939f={'global':_0x5f542e[_0x2348c7(0x114)](_0x2348c7(0x115))},_0x57ba66=readScopedConfig(_0x37939f),_0x53adbd=_0x5f542e[_0x2348c7(0x122)]('app');if(_0x53adbd){if(!_0x57ba66[_0x2348c7(0xef)])_0x57ba66[_0x2348c7(0xef)]={};if(!_0x57ba66[_0x2348c7(0xef)][_0x53adbd])throw CliErrors[_0x2348c7(0x117)](_0x2348c7(0xf5)+_0x53adbd+_0x2348c7(0x112),_0x2348c7(0xe7)+CLI_BIN_NAME+_0x2348c7(0x118));if(!APP_PROFILE_KEYS['has'](_0x342b03))throw CliErrors[_0x2348c7(0x117)](_0x2348c7(0xeb)+_0x342b03+_0x2348c7(0x111),_0x2348c7(0x116)+[...APP_PROFILE_KEYS][_0x2348c7(0x107)](',\x20'));_0x57ba66[_0x2348c7(0xef)][_0x53adbd][_0x342b03]=_0x342b03==='pageSize'?Number(_0x5b3dc1):_0x5b3dc1,console[_0x2348c7(0x100)]('Set\x20`'+_0x342b03+'`\x20=\x20\x22'+_0x5b3dc1+_0x2348c7(0x12f)+_0x53adbd+'\x22'+(_0x5f542e[_0x2348c7(0x114)](_0x2348c7(0x115))?'\x20(global)':''));}else{if(!TOP_LEVEL_KEYS[_0x2348c7(0x12a)](_0x342b03))throw CliErrors[_0x2348c7(0x117)](_0x2348c7(0x103)+_0x342b03+_0x2348c7(0xf1),_0x2348c7(0x11b)+[...TOP_LEVEL_KEYS]['join'](',\x20'));_0x57ba66[_0x342b03]=_0x342b03==='pageSize'?Number(_0x5b3dc1):_0x5b3dc1,console['log'](_0x2348c7(0xec)+_0x342b03+_0x2348c7(0x11f)+_0x5b3dc1+'\x22'+(_0x5f542e[_0x2348c7(0x114)](_0x2348c7(0x115))?_0x2348c7(0x10f):''));}return writeScopedConfig(_0x57ba66,_0x37939f),{'ok':!![]};}},deleteDef={'service':a15_0xc34e13(0x11c),'command':a15_0xc34e13(0xfc),'description':a15_0xc34e13(0x102),'risk':a15_0xc34e13(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a15_0xc34e13(0x131),'description':a15_0xc34e13(0x12c),'required':!![]}],'flags':[GLOBAL_FLAG,APP_FLAG],async 'execute'(_0x1f117d){const _0x1c7527=a15_0xc34e13,_0x5da66d=_0x1f117d[_0x1c7527(0xfd)][0x0];if(!_0x5da66d)throw CliErrors[_0x1c7527(0x117)](_0x1c7527(0x113),_0x1c7527(0x130)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--app\x20<name>]\x20[--global]');const _0x3f42a4={'global':_0x1f117d[_0x1c7527(0x114)](_0x1c7527(0x115))},_0x1a0dfa=readScopedConfig(_0x3f42a4),_0xaddc3a=_0x1f117d[_0x1c7527(0x122)](_0x1c7527(0xf6));if(_0xaddc3a){if(!_0x1a0dfa[_0x1c7527(0xef)]?.[_0xaddc3a])throw CliErrors[_0x1c7527(0x117)](_0x1c7527(0xf5)+_0xaddc3a+_0x1c7527(0xed));if(_0x1a0dfa['apps'][_0xaddc3a][_0x5da66d]===undefined)throw CliErrors[_0x1c7527(0x117)](_0x1c7527(0xf4)+_0x5da66d+_0x1c7527(0xf9)+_0xaddc3a+'\x22.');delete _0x1a0dfa[_0x1c7527(0xef)][_0xaddc3a][_0x5da66d],console['log'](_0x1c7527(0xfa)+_0x5da66d+_0x1c7527(0xf7)+_0xaddc3a+'\x22'+(_0x1f117d[_0x1c7527(0x114)](_0x1c7527(0x115))?_0x1c7527(0x10f):''));}else{if(_0x1a0dfa[_0x5da66d]===undefined)throw CliErrors[_0x1c7527(0x117)](_0x1c7527(0xf4)+_0x5da66d+_0x1c7527(0x12d));delete _0x1a0dfa[_0x5da66d],console['log'](_0x1c7527(0xfa)+_0x5da66d+'`'+(_0x1f117d['bool'](_0x1c7527(0x115))?_0x1c7527(0x10f):''));}return writeScopedConfig(_0x1a0dfa,_0x3f42a4),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
@@ -1 +1 @@
1
- const a16_0xf15cfa=a16_0x3f61;(function(_0x1e7afc,_0x8dc10a){const _0x13507c=a16_0x3f61,_0x32e219=_0x1e7afc();while(!![]){try{const _0x53ae63=-parseInt(_0x13507c(0xf0))/0x1*(-parseInt(_0x13507c(0xfb))/0x2)+parseInt(_0x13507c(0xff))/0x3+parseInt(_0x13507c(0xef))/0x4*(-parseInt(_0x13507c(0xfe))/0x5)+parseInt(_0x13507c(0x105))/0x6+parseInt(_0x13507c(0xf5))/0x7+parseInt(_0x13507c(0x100))/0x8+-parseInt(_0x13507c(0xfc))/0x9;if(_0x53ae63===_0x8dc10a)break;else _0x32e219['push'](_0x32e219['shift']());}catch(_0x4b486b){_0x32e219['push'](_0x32e219['shift']());}}}(a16_0x4295,0xd19a3));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a16_0x4295(){const _0x1956d7=['4863348mdZgKV','9316152jlfuLM','table','cookie','pageSize','high-risk-write','10016718TseCKa','436bLHXof','1LBLMqE','riskLevel','userDomain','read','appcode','1166634YgzhvX','runtimeDomain','format','write','env','app','1336486crjVCZ','31623138hkZhxl','locale','42100eyEYdv'];a16_0x4295=function(){return _0x1956d7;};return a16_0x4295();}export{readScopedConfig,writeScopedConfig}from'../../context.js';function a16_0x3f61(_0x3db563,_0x532cae){_0x3db563=_0x3db563-0xef;const _0x4295af=a16_0x4295();let _0x3f6110=_0x4295af[_0x3db563];return _0x3f6110;}export const TOP_LEVEL_KEYS=new Set([a16_0xf15cfa(0xf9),a16_0xf15cfa(0xf7),a16_0xf15cfa(0xfd),a16_0xf15cfa(0xf1),a16_0xf15cfa(0x103),a16_0xf15cfa(0xf4),a16_0xf15cfa(0xfa),'apiDomain',a16_0xf15cfa(0xf2),a16_0xf15cfa(0xf6)]);export const APP_PROFILE_KEYS=new Set(['env',a16_0xf15cfa(0xf7),'locale',a16_0xf15cfa(0xf1),a16_0xf15cfa(0x103),a16_0xf15cfa(0x102),'accessKey','secretKey']);export const ENUM_KEYS={'env':['production','daily'],'format':['json','pretty',a16_0xf15cfa(0x101)],'riskLevel':[a16_0xf15cfa(0xf3),a16_0xf15cfa(0xf8),a16_0xf15cfa(0x104)]};
1
+ const a16_0x8c55bd=a16_0x557f;function a16_0x596c(){const _0x10c47f=['format','app','daily','appcode','6ecUGMg','610yPxdfh','1267888atvNaS','accessKey','userDomain','8153037NCbreD','17415iqrehM','2954505KErCkT','4664VVZhzo','runtimeDomain','env','3781624JZNPXZ','2061brEUAW','pretty','pageSize','locale','secretKey','18zKnvCL','table','cookie','production','70818JKOpGr'];a16_0x596c=function(){return _0x10c47f;};return a16_0x596c();}(function(_0x838730,_0x21103f){const _0x59723b=a16_0x557f,_0x426233=_0x838730();while(!![]){try{const _0x1c4903=parseInt(_0x59723b(0xa0))/0x1*(parseInt(_0x59723b(0x91))/0x2)+parseInt(_0x59723b(0xa6))/0x3*(parseInt(_0x59723b(0xa2))/0x4)+parseInt(_0x59723b(0xa1))/0x5*(-parseInt(_0x59723b(0x9a))/0x6)+-parseInt(_0x59723b(0xa5))/0x7+parseInt(_0x59723b(0x9c))/0x8+parseInt(_0x59723b(0x9f))/0x9+parseInt(_0x59723b(0x9b))/0xa*(-parseInt(_0x59723b(0x95))/0xb);if(_0x1c4903===_0x21103f)break;else _0x426233['push'](_0x426233['shift']());}catch(_0x160b30){_0x426233['push'](_0x426233['shift']());}}}(a16_0x596c,0x79a81));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export const TOP_LEVEL_KEYS=new Set([a16_0x8c55bd(0xa4),a16_0x8c55bd(0x96),a16_0x8c55bd(0xa9),'pageSize',a16_0x8c55bd(0x99),a16_0x8c55bd(0x97),'apiDomain',a16_0x8c55bd(0x9e),a16_0x8c55bd(0xa3)]);function a16_0x557f(_0x5764c5,_0x44ab60){_0x5764c5=_0x5764c5-0x90;const _0x596c73=a16_0x596c();let _0x557fa1=_0x596c73[_0x5764c5];return _0x557fa1;}export const APP_PROFILE_KEYS=new Set([a16_0x8c55bd(0xa4),a16_0x8c55bd(0x96),'locale',a16_0x8c55bd(0xa8),a16_0x8c55bd(0x93),a16_0x8c55bd(0x9d),a16_0x8c55bd(0x90)]);export const ENUM_KEYS={'env':[a16_0x8c55bd(0x94),a16_0x8c55bd(0x98)],'format':['json',a16_0x8c55bd(0xa7),a16_0x8c55bd(0x92)]};