@lovrabet/lovrabet-cli 2.0.1-beta.5
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.
- package/lib/auth/auth-server-ui.js +1 -0
- package/lib/auth/auth-server.js +1 -0
- package/lib/auth/constant.js +1 -0
- package/lib/auth/get-cookie.js +1 -0
- package/lib/auth/is-session-valid.js +1 -0
- package/lib/auth/logout.js +1 -0
- package/lib/cli.js +2 -0
- package/lib/commands/app/definitions.js +1 -0
- package/lib/commands/app/shared.js +1 -0
- package/lib/commands/auth/index.js +1 -0
- package/lib/commands/bff/detail.js +1 -0
- package/lib/commands/bff/exec.js +1 -0
- package/lib/commands/bff/index.js +1 -0
- package/lib/commands/common/constraints.js +1 -0
- package/lib/commands/common/flags.js +1 -0
- package/lib/commands/config/definitions.js +1 -0
- package/lib/commands/config/shared.js +1 -0
- package/lib/commands/data/index.js +1 -0
- package/lib/commands/dataset/detail.js +1 -0
- package/lib/commands/dataset/index.js +1 -0
- package/lib/commands/dataset/list.js +1 -0
- package/lib/commands/init/index.js +1 -0
- package/lib/commands/init.js +1 -0
- package/lib/commands/logs/index.js +1 -0
- package/lib/commands/registry.js +1 -0
- package/lib/commands/sql/detail.js +1 -0
- package/lib/commands/sql/exec.js +1 -0
- package/lib/commands/sql/index.js +1 -0
- package/lib/constant/cli.js +1 -0
- package/lib/constant/domain.js +1 -0
- package/lib/constant/env.js +1 -0
- package/lib/context.js +1 -0
- package/lib/core/api-client.js +1 -0
- package/lib/core/db-resolver.js +1 -0
- package/lib/core/sdk-client.js +1 -0
- package/lib/errors.js +1 -0
- package/lib/framework/dryrun.js +1 -0
- package/lib/framework/flags.js +1 -0
- package/lib/framework/help.js +1 -0
- package/lib/framework/index.js +1 -0
- package/lib/framework/output.js +1 -0
- package/lib/framework/preparse.js +1 -0
- package/lib/framework/response.js +1 -0
- package/lib/framework/runner.js +1 -0
- package/lib/framework/types.js +1 -0
- package/lib/help.js +1 -0
- package/lib/utils/logger.js +1 -0
- package/lib/utils/params.js +1 -0
- package/package.json +55 -0
|
@@ -0,0 +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)})]})});}
|
|
@@ -0,0 +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(!![]);});});}
|
|
@@ -0,0 +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':!![]});
|
|
@@ -0,0 +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'';}
|
|
@@ -0,0 +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![];}
|
|
@@ -0,0 +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));}
|
package/lib/cli.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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![];}
|
|
@@ -0,0 +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];
|
|
@@ -0,0 +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));}
|
|
@@ -0,0 +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':!![]};}}];
|
|
@@ -0,0 +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)]??''}};}};
|
|
@@ -0,0 +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'};}};
|
|
@@ -0,0 +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();}
|
|
@@ -0,0 +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();}
|
|
@@ -0,0 +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)};
|
|
@@ -0,0 +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];
|
|
@@ -0,0 +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)]};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a17_0x184a(){const _0xb9ee2b=['\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','4240ValIvc','/api/{appCode}/','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','5zjnldS','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','data','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','write','helpExtra','aggregate','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','create','delete','dryRun','code','map','565432EDeMHm','253YbGfZd','build','613766Nxpunn','POST','paramsHint','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','2472111wDCYci','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','Preview:\x20data\x20','paramsRequired','1608804TXAfst','params','filter','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','operation','3ePSmto','Update\x20an\x20existing\x20record','read','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','169947uDjyRy','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','join','8yKHyZN','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20field\x20values\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','command','\x20\x20PAGINATION','body','\x20on\x20dataset\x20','now','\x20\x20PARAMS\x20STRUCTURE','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','getOne','data\x20','description','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','413876BWNdiK','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','str'];a17_0x184a=function(){return _0xb9ee2b;};return a17_0x184a();}const a17_0x137553=a17_0x50b4;(function(_0x5d2a14,_0x5f42c6){const _0x59a796=a17_0x50b4,_0x16b091=_0x5d2a14();while(!![]){try{const _0x1c6915=-parseInt(_0x59a796(0x184))/0x1+parseInt(_0x59a796(0x168))/0x2*(parseInt(_0x59a796(0x17d))/0x3)+parseInt(_0x59a796(0x19e))/0x4*(parseInt(_0x59a796(0x154))/0x5)+-parseInt(_0x59a796(0x176))/0x6+-parseInt(_0x59a796(0x165))/0x7+parseInt(_0x59a796(0x187))/0x8*(parseInt(_0x59a796(0x172))/0x9)+parseInt(_0x59a796(0x1a2))/0xa*(-parseInt(_0x59a796(0x166))/0xb);if(_0x1c6915===_0x5f42c6)break;else _0x16b091['push'](_0x16b091['shift']());}catch(_0x5c3369){_0x16b091['push'](_0x16b091['shift']());}}}(a17_0x184a,0x26306));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../common/flags.js';import{requireAnyOf}from'../common/constraints.js';import{parseJsonParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a17_0x137553(0x178),'operation':a17_0x137553(0x178),'risk':a17_0x137553(0x17f),'paramsRequired':![],'description':a17_0x137553(0x191),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a17_0x137553(0x179),'helpExtra':[a17_0x137553(0x15d),a17_0x137553(0x16f),a17_0x137553(0x185),a17_0x137553(0x173),a17_0x137553(0x193),a17_0x137553(0x15b),'\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}',a17_0x137553(0x180),'\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}',a17_0x137553(0x19b),'',a17_0x137553(0x15c),a17_0x137553(0x16b),'\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a17_0x137553(0x170),a17_0x137553(0x153),a17_0x137553(0x15e),a17_0x137553(0x192),a17_0x137553(0x16d),'',a17_0x137553(0x18b),a17_0x137553(0x16e),a17_0x137553(0x157),a17_0x137553(0x196)][a17_0x137553(0x186)]('\x0a')},{'command':a17_0x137553(0x197),'operation':a17_0x137553(0x197),'risk':a17_0x137553(0x17f),'paramsRequired':!![],'description':a17_0x137553(0x19a),'paramsHint':a17_0x137553(0x19f)},{'command':'create','operation':a17_0x137553(0x160),'risk':a17_0x137553(0x158),'paramsRequired':!![],'description':a17_0x137553(0x181),'paramsHint':a17_0x137553(0x195)},{'command':'update','operation':'update','risk':'write','paramsRequired':!![],'description':a17_0x137553(0x17e),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27'},{'command':a17_0x137553(0x161),'operation':a17_0x137553(0x161),'risk':'high-risk-write','paramsRequired':!![],'description':a17_0x137553(0x183),'paramsHint':a17_0x137553(0x19f)},{'command':'aggregate','operation':a17_0x137553(0x15a),'risk':'read','paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a17_0x137553(0x19d),'helpExtra':['\x20\x20AGGREGATE\x20TYPES',a17_0x137553(0x189),a17_0x137553(0x194),a17_0x137553(0x17a),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}',a17_0x137553(0x171),a17_0x137553(0x19c),a17_0x137553(0x1a1),'',a17_0x137553(0x18f),a17_0x137553(0x17b),a17_0x137553(0x155),a17_0x137553(0x16c),a17_0x137553(0x190),'\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}',a17_0x137553(0x188),'','\x20\x20EXAMPLES',a17_0x137553(0x182),a17_0x137553(0x15f),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27'][a17_0x137553(0x186)]('\x0a')}];function a17_0x50b4(_0x1d9a02,_0x4d9ec1){_0x1d9a02=_0x1d9a02-0x152;const _0x184a8a=a17_0x184a();let _0x50b42b=_0x184a8a[_0x1d9a02];return _0x50b42b;}function makeDataCommand(_0x29b4ef){const _0x2e82fa=a17_0x137553,_0x1d6e2f=_0x2e82fa(0x198)+_0x29b4ef['command'],_0x2dffe7={'service':_0x2e82fa(0x156),'command':_0x29b4ef['command'],'description':_0x29b4ef[_0x2e82fa(0x199)],'risk':_0x29b4ef['risk'],'helpExtra':_0x29b4ef[_0x2e82fa(0x159)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x29b4ef[_0x2e82fa(0x16a)]}],..._0x29b4ef[_0x2e82fa(0x175)]&&{'validate':async _0x20eb38=>{requireAnyOf(_0x20eb38,['params'],_0x1d6e2f);}},async 'execute'(_0x352428){const _0x1ac414=_0x2e82fa,_0x2aa141=_0x352428['str']('code'),_0x354536=parseJsonParams(_0x352428[_0x1ac414(0x1a0)](_0x1ac414(0x177)))??{},_0x191e84=Date['now'](),_0x31b950=await executeData(_0x2aa141,_0x29b4ef['operation'],_0x354536),_0x1e094f=Date[_0x1ac414(0x18e)]()-_0x191e84;return{'ok':!![],'data':{'result':_0x31b950,'elapsed':_0x1e094f},'message':'data\x20'+_0x29b4ef[_0x1ac414(0x18a)]+'\x20completed\x20in\x20'+_0x1e094f+'ms'};}};return _0x29b4ef['risk']!==_0x2e82fa(0x17f)&&(_0x2dffe7[_0x2e82fa(0x162)]=async _0xcc7e43=>{const _0x2fd92e=_0x2e82fa,_0x5946d9=_0xcc7e43[_0x2fd92e(0x1a0)](_0x2fd92e(0x163)),_0x4eca68=parseJsonParams(_0xcc7e43[_0x2fd92e(0x1a0)](_0x2fd92e(0x177)))??{};return dryRun(_0x2fd92e(0x169),_0x2fd92e(0x152)+_0x5946d9+'/'+_0x29b4ef[_0x2fd92e(0x17c)])[_0x2fd92e(0x18c)](_0x4eca68)[_0x2fd92e(0x199)](_0x2fd92e(0x174)+_0x29b4ef[_0x2fd92e(0x18a)]+_0x2fd92e(0x18d)+_0x5946d9)[_0x2fd92e(0x167)]();}),_0x2dffe7;}export const dataDefinitions=specs[a17_0x137553(0x164)](makeDataCommand);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a18_0x3b3100=a18_0x30e0;(function(_0x3f6f18,_0x3b9438){const _0xd0d2eb=a18_0x30e0,_0x38fd11=_0x3f6f18();while(!![]){try{const _0x429a23=-parseInt(_0xd0d2eb(0x1e7))/0x1+-parseInt(_0xd0d2eb(0x1d7))/0x2+parseInt(_0xd0d2eb(0x1ce))/0x3*(-parseInt(_0xd0d2eb(0x1db))/0x4)+-parseInt(_0xd0d2eb(0x1e4))/0x5*(-parseInt(_0xd0d2eb(0x1df))/0x6)+parseInt(_0xd0d2eb(0x1c6))/0x7+parseInt(_0xd0d2eb(0x1e8))/0x8*(-parseInt(_0xd0d2eb(0x1d6))/0x9)+-parseInt(_0xd0d2eb(0x1c3))/0xa*(-parseInt(_0xd0d2eb(0x1d0))/0xb);if(_0x429a23===_0x3b9438)break;else _0x38fd11['push'](_0x38fd11['shift']());}catch(_0x291e3a){_0x38fd11['push'](_0x38fd11['shift']());}}}(a18_0x136c,0xc9bfc));import{getDatasetDetail}from'../../core/api-client.js';function a18_0x30e0(_0x3b3951,_0x5f0fc7){_0x3b3951=_0x3b3951-0x1c0;const _0x136c09=a18_0x136c();let _0x30e031=_0x136c09[_0x3b3951];return _0x30e031;}import{CODE_FLAG,VERBOSE_FLAG}from'../common/flags.js';function normalizeField(_0x53e3e6){const _0x1a7728=a18_0x30e0;if(_0x53e3e6['deleted'])return null;const _0x45515e=Boolean(_0x53e3e6[_0x1a7728(0x1c0)]!==undefined||_0x53e3e6['doType']!==undefined);let _0x58d1c5={};if(!_0x45515e&&typeof _0x53e3e6[_0x1a7728(0x1cd)]===_0x1a7728(0x1c8))try{_0x58d1c5=JSON['parse'](_0x53e3e6['extend']);}catch{}const _0x496a0c=_0x45515e?_0x53e3e6[_0x1a7728(0x1d8)]:_0x53e3e6['code'],_0x4fe5e4=_0x45515e?_0x53e3e6[_0x1a7728(0x1c0)]:_0x53e3e6['name'],_0x93d177=_0x45515e?_0x53e3e6['doType']:_0x53e3e6[_0x1a7728(0x1c9)]||_0x53e3e6[_0x1a7728(0x1c4)],_0x1f584c=_0x45515e?_0x53e3e6['pkField']===!![]:_0x58d1c5[_0x1a7728(0x1de)]===!![],_0x21b42b=_0x45515e?_0x53e3e6['required']===!![]:_0x58d1c5[_0x1a7728(0x1e6)]===!![],_0x3f2963=_0x45515e?_0x53e3e6['options']??null:_0x58d1c5['options']??null,_0x21bf7e={'name':_0x496a0c,'displayName':_0x4fe5e4||_0x496a0c,'type':_0x93d177,'dbType':_0x53e3e6[_0x1a7728(0x1c1)],'pk':_0x1f584c,'required':_0x21b42b,'description':_0x53e3e6[_0x1a7728(0x1c2)]||undefined};return Array[_0x1a7728(0x1c7)](_0x3f2963)&&_0x3f2963[_0x1a7728(0x1dd)]>0x0&&(_0x21bf7e[_0x1a7728(0x1c5)]=_0x3f2963),_0x21bf7e;}function a18_0x136c(){const _0x5dc3eb=['6192473FGnSLv','isArray','string','type','tableName','map','filter','extend','12267EMksbe','entries','10681LHeUyN','bool','verbose','detail','dataset','modelCode','76158qHaaCH','2551662KsmBer','name','source','method','956vREuVa','read','length','pkField','254634Owhftv','fields','object','sourceType','tableComment','170midLLK','code','required','1058016rMGlbG','504gLVDVk','dbtableConfig','push','operations','datasetKey','path','displayName','dbType','description','24130dlFbOD','dataType','options'];a18_0x136c=function(){return _0x5dc3eb;};return a18_0x136c();}export const datasetDetail={'service':'dataset','command':a18_0x3b3100(0x1d3),'description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a18_0x3b3100(0x1dc),'requiresCookieAuth':!![],'flags':[CODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x354a8e){const _0x203d84=a18_0x3b3100,_0x88b099=await getDatasetDetail(_0x354a8e['str']('code')),_0x546f46=_0x354a8e[_0x203d84(0x1d1)](_0x203d84(0x1d2));if(_0x546f46)return{'ok':!![],'data':_0x88b099};const _0x3dc880=Array['isArray'](_0x88b099['fields'])?_0x88b099[_0x203d84(0x1e0)]:Array[_0x203d84(0x1c7)](_0x88b099['properties'])?_0x88b099['properties']:[],_0x280aa2=_0x3dc880[_0x203d84(0x1cb)](_0x2a7275=>normalizeField(_0x2a7275))[_0x203d84(0x1cc)](_0x57e03c=>_0x57e03c!==null),_0x132e0c=_0x88b099[_0x203d84(0x1eb)]??{},_0x59b31c=[];for(const [_0x14199e,_0x4cab65]of Object[_0x203d84(0x1cf)](_0x132e0c)){if(_0x4cab65&&typeof _0x4cab65===_0x203d84(0x1e1)){const _0x5c841b=_0x4cab65;_0x5c841b[_0x203d84(0x1da)]&&_0x5c841b[_0x203d84(0x1ed)]&&_0x59b31c[_0x203d84(0x1ea)]({'name':_0x14199e,'method':_0x5c841b[_0x203d84(0x1da)],'path':_0x5c841b[_0x203d84(0x1ed)]});}}const _0x4d8d3e=_0x88b099[_0x203d84(0x1e9)]??{},_0x2c3c82=_0x88b099[_0x203d84(0x1d4)]??{};return{'ok':!![],'data':{'id':_0x88b099['modelId']??_0x88b099['id'],'name':_0x88b099[_0x203d84(0x1d8)],'code':_0x88b099[_0x203d84(0x1d5)]||_0x88b099[_0x203d84(0x1e5)],'description':_0x88b099[_0x203d84(0x1c2)]||_0x2c3c82[_0x203d84(0x1e3)]||undefined,'source':_0x88b099[_0x203d84(0x1d9)]||_0x2c3c82[_0x203d84(0x1e2)],'table':_0x4d8d3e[_0x203d84(0x1ca)]||_0x2c3c82[_0x203d84(0x1ca)],'datasetKey':_0x4d8d3e[_0x203d84(0x1ec)],'pk':_0x4d8d3e['pkField'],'fields':_0x280aa2,'operations':_0x59b31c,'stats':{'fieldCount':_0x280aa2[_0x203d84(0x1dd)],'operationCount':_0x59b31c[_0x203d84(0x1dd)]}}};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0xc68356,_0x3112ba){const _0x2c0938=a19_0x3d1a,_0x5278c6=_0xc68356();while(!![]){try{const _0x53bda2=-parseInt(_0x2c0938(0xa3))/0x1+parseInt(_0x2c0938(0x9e))/0x2+-parseInt(_0x2c0938(0xa1))/0x3*(parseInt(_0x2c0938(0x9d))/0x4)+-parseInt(_0x2c0938(0x9f))/0x5+-parseInt(_0x2c0938(0xa4))/0x6+parseInt(_0x2c0938(0xa5))/0x7*(-parseInt(_0x2c0938(0xa6))/0x8)+-parseInt(_0x2c0938(0xa0))/0x9*(-parseInt(_0x2c0938(0xa2))/0xa);if(_0x53bda2===_0x3112ba)break;else _0x5278c6['push'](_0x5278c6['shift']());}catch(_0x5a94a2){_0x5278c6['push'](_0x5278c6['shift']());}}}(a19_0x2a32,0x706aa));function a19_0x2a32(){const _0x3b20b8=['664cWdwoz','12xebOgj','1640806AcXqFA','819575AXGDkB','6183AuzAWb','47667ZtUEnv','22590ZClqau','496749hLMjpo','5210856WoKjoD','28259vTdatF'];a19_0x2a32=function(){return _0x3b20b8;};return a19_0x2a32();}import{datasetList}from'./list.js';import{datasetDetail}from'./detail.js';function a19_0x3d1a(_0x18e583,_0x58303f){_0x18e583=_0x18e583-0x9d;const _0x2a329c=a19_0x2a32();let _0x3d1acd=_0x2a329c[_0x18e583];return _0x3d1acd;}export const datasetDefinitions=[datasetList,datasetDetail];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a20_0x125b(){const _0x3a9117=['2134342dXwbiX','allFields','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','dataset','599868jmpiSb','139994SqLlSn','5wDdHVj','dbtableConfig','1354915EgTSDw','list','916023NhNsmp','1539000UyVJLb','length','datasetKey','name','code','source','tableName','str','split','108iwwlHL','appCode','pkField','string','266384AdhWyM'];a20_0x125b=function(){return _0x3a9117;};return a20_0x125b();}const a20_0x2d1cb4=a20_0x3c86;(function(_0x5befbf,_0x2f565e){const _0x2b1567=a20_0x3c86,_0x4c6b99=_0x5befbf();while(!![]){try{const _0x288e21=-parseInt(_0x2b1567(0x164))/0x1*(parseInt(_0x2b1567(0x163))/0x2)+-parseInt(_0x2b1567(0x168))/0x3+parseInt(_0x2b1567(0x169))/0x4+-parseInt(_0x2b1567(0x166))/0x5+parseInt(_0x2b1567(0x162))/0x6+parseInt(_0x2b1567(0x15d))/0x7+parseInt(_0x2b1567(0x15c))/0x8*(parseInt(_0x2b1567(0x158))/0x9);if(_0x288e21===_0x2f565e)break;else _0x4c6b99['push'](_0x4c6b99['shift']());}catch(_0x1e99a8){_0x4c6b99['push'](_0x4c6b99['shift']());}}}(a20_0x125b,0x402f5));import{listDatasets}from'../../core/api-client.js';function a20_0x3c86(_0x53524b,_0x4ae538){_0x53524b=_0x53524b-0x156;const _0x125bf5=a20_0x125b();let _0x3c86ba=_0x125bf5[_0x53524b];return _0x3c86ba;}import{CODE_FLAG}from'../common/flags.js';export const datasetList={'service':a20_0x2d1cb4(0x161),'command':a20_0x2d1cb4(0x167),'description':a20_0x2d1cb4(0x15f),'risk':'read','requiresCookieAuth':!![],'flags':[{'name':'name','type':a20_0x2d1cb4(0x15b),'description':a20_0x2d1cb4(0x160)},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0x3fe24d){const _0x440af4=a20_0x2d1cb4,_0x1d044=_0x3fe24d[_0x440af4(0x156)](_0x440af4(0x16c)),_0x39e4bb=_0x3fe24d['str'](_0x440af4(0x16d)),_0x2c0442=await listDatasets(_0x3fe24d[_0x440af4(0x159)],{..._0x1d044&&{'name':_0x1d044},..._0x39e4bb&&{'code':_0x39e4bb}});return{'ok':!![],'data':{'total':_0x2c0442[_0x440af4(0x16a)],'datasets':_0x2c0442['map'](_0x5f08f1=>{const _0xa21849=_0x440af4,_0x45e307=_0x5f08f1[_0xa21849(0x165)]??{};return{'id':_0x5f08f1['id'],'code':_0x5f08f1[_0xa21849(0x16d)],'name':_0x5f08f1[_0xa21849(0x16c)],'source':_0x5f08f1[_0xa21849(0x16e)],'description':_0x5f08f1['description'],'table':_0x45e307[_0xa21849(0x16f)],'datasetKey':_0x45e307[_0xa21849(0x16b)],'pk':_0x45e307[_0xa21849(0x15a)],'fields':_0x45e307[_0xa21849(0x15e)]?_0x45e307[_0xa21849(0x15e)][_0xa21849(0x157)](',')['map'](_0x1ddc99=>_0x1ddc99['trim']()):[]};})}};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a21_0x452934=a21_0x1e5b;(function(_0x3ab15f,_0xbe086f){const _0x387b60=a21_0x1e5b,_0x1d5904=_0x3ab15f();while(!![]){try{const _0x276d2c=parseInt(_0x387b60(0x1be))/0x1+parseInt(_0x387b60(0x1c5))/0x2+-parseInt(_0x387b60(0x1b3))/0x3*(parseInt(_0x387b60(0x1b6))/0x4)+parseInt(_0x387b60(0x1bf))/0x5*(parseInt(_0x387b60(0x1bc))/0x6)+-parseInt(_0x387b60(0x1c2))/0x7+-parseInt(_0x387b60(0x1c0))/0x8+-parseInt(_0x387b60(0x1b2))/0x9*(-parseInt(_0x387b60(0x1bd))/0xa);if(_0x276d2c===_0xbe086f)break;else _0x1d5904['push'](_0x1d5904['shift']());}catch(_0x21342f){_0x1d5904['push'](_0x1d5904['shift']());}}}(a21_0x5050,0x4d29a));import{runInit,initFlagDefs}from'../init.js';export const initDefinitions=[{'service':a21_0x452934(0x1c3),'command':a21_0x452934(0x1c1),'description':a21_0x452934(0x1bb),'risk':a21_0x452934(0x1b4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlagDefs,async 'execute'(_0x51d6da){const _0x49305c=a21_0x452934,_0x234a0d={};for(const _0x145363 of initFlagDefs){const _0x2236f7=_0x145363[_0x49305c(0x1c4)]===_0x49305c(0x1b5)?_0x51d6da[_0x49305c(0x1b9)](_0x145363[_0x49305c(0x1ba)]):_0x51d6da[_0x49305c(0x1b8)](_0x145363[_0x49305c(0x1ba)]);if(_0x2236f7!==''&&_0x2236f7!==![])_0x234a0d[_0x145363['name']]=_0x2236f7;}if(_0x51d6da[_0x49305c(0x1b7)])_0x234a0d['nonInteractive']=!![];return await runInit(_0x234a0d),{'ok':!![]};}}];function a21_0x1e5b(_0x1b7eb6,_0x2e7ad5){_0x1b7eb6=_0x1b7eb6-0x1b2;const _0x5050bc=a21_0x5050();let _0x1e5b93=_0x5050bc[_0x1b7eb6];return _0x1e5b93;}function a21_0x5050(){const _0x2b65f6=['nonInteractive','str','bool','name','Initialize\x20.lovrabet.json\x20config\x20file','42AfxFUA','3828030dSVIRC','534471lftsWy','102070zCslbX','4693056vLpCNj','create','2646490jmZcGP','init','type','902816KJUyPJ','18vBJEyG','9rPoZUS','write','boolean','818164SbPbUD'];a21_0x5050=function(){return _0x2b65f6;};return a21_0x5050();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a22_0x33069e=a22_0x27b2;(function(_0x25c32c,_0x14d8a4){const _0x10f3cd=a22_0x27b2,_0x40c04b=_0x25c32c();while(!![]){try{const _0x5e4e46=-parseInt(_0x10f3cd(0x1f2))/0x1+-parseInt(_0x10f3cd(0x1da))/0x2*(parseInt(_0x10f3cd(0x1cb))/0x3)+-parseInt(_0x10f3cd(0x1b4))/0x4*(-parseInt(_0x10f3cd(0x1d9))/0x5)+parseInt(_0x10f3cd(0x1df))/0x6*(-parseInt(_0x10f3cd(0x1c5))/0x7)+parseInt(_0x10f3cd(0x1e0))/0x8*(-parseInt(_0x10f3cd(0x1bf))/0x9)+-parseInt(_0x10f3cd(0x1f5))/0xa+-parseInt(_0x10f3cd(0x1ab))/0xb*(-parseInt(_0x10f3cd(0x1a2))/0xc);if(_0x5e4e46===_0x14d8a4)break;else _0x40c04b['push'](_0x40c04b['shift']());}catch(_0x12dfe8){_0x40c04b['push'](_0x40c04b['shift']());}}}(a22_0x6b7f,0xa320a));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';function a22_0x6b7f(){const _0x5de39d=['File\x20','Aborted.','boolean','App\x20code\x20cannot\x20be\x20empty.','parse','from','join','cookie','7235877JoSvOh','log','Source\x20file\x20not\x20found:\x20','Target\x20environment','app','daily','apiDir','production','\x20\x20env:\x20\x20\x20\x20\x20','4OTeBXe','\x20init\x20--appcode\x20<code>\x20[--env\x20production]\x20[--global]','utf8','cancelled','stdin','removeListener','Usage:\x20','read','yes','\x20already\x20exists.\x20Overwrite?','\x20\x20config:\x20\x20','2769939WPIpVU','apiDomain','defaultApp','App\x20code\x20for\x20the\x20project','name','cwd','5159loTtcv','Initialized\x20','string','userDomain','validation','User\x20aborted\x20prompt','6wxFwQi','Imported\x20from\x20','message','global','project','riskLevel','App\x20code','env','entries','AbortPrompt','runtimeDomain','question','\x22.\x20Allowed:\x20production,\x20daily','accessKey','1296745ZBPOnj','64212nxnaVC','close','stdout','race','once','780FfFqze','32tmwjop','[Y/n]','Invalid\x20env\x20\x22','SIGINT','):\x20','flagMissing','pageSize','appcode','map','Failed\x20to\x20parse\x20source\x20file:\x20','includes','trim','Skip\x20confirmation\x20when\x20overwriting','toLowerCase','\x0aInitialized\x20','[y/N]','keys','apps','1249912CbsuUZ','\x20\x20appcode:\x20','locale','2391960bBdBBS','secretKey','60mtSMEl'];a22_0x6b7f=function(){return _0x5de39d;};return a22_0x6b7f();}function a22_0x27b2(_0x40b41b,_0x213e1e){_0x40b41b=_0x40b41b-0x1a1;const _0x6b7f64=a22_0x6b7f();let _0x27b20f=_0x6b7f64[_0x40b41b];return _0x27b20f;}import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';export const initFlagDefs=[{'name':a22_0x33069e(0x1e7),'type':a22_0x33069e(0x1c7),'description':a22_0x33069e(0x1c2)},{'name':'env','type':a22_0x33069e(0x1c7),'description':a22_0x33069e(0x1ae),'default':a22_0x33069e(0x1b2),'enum':[a22_0x33069e(0x1b2),a22_0x33069e(0x1b0)]},{'name':a22_0x33069e(0x1ce),'type':a22_0x33069e(0x1a5),'description':'Write\x20to\x20global\x20(~/.lovrabet.json)\x20instead\x20of\x20project','default':![]},{'name':a22_0x33069e(0x1bc),'type':a22_0x33069e(0x1a5),'description':a22_0x33069e(0x1ec),'default':![]},{'name':a22_0x33069e(0x1a8),'type':a22_0x33069e(0x1c7),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path'}];export async function runInit(_0x224d9f){const _0x4c8aaf=a22_0x33069e,_0x453a68=isNonInteractiveMode(_0x224d9f),_0x340ad1=_0x224d9f[_0x4c8aaf(0x1ce)]?'global':_0x4c8aaf(0x1cf),_0x1751af=resolveWriteConfigPath(_0x340ad1);try{if(_0x224d9f[_0x4c8aaf(0x1a8)]){await runFromImport(_0x224d9f,_0x1751af);return;}_0x453a68?await runNonInteractive(_0x224d9f,_0x1751af):await runInteractive(_0x224d9f,_0x1751af);}catch(_0x1899bb){if(_0x1899bb instanceof AbortPrompt)throw CliErrors[_0x4c8aaf(0x1b7)]();throw _0x1899bb;}}const RUNTIME_IRRELEVANT_KEYS=new Set([a22_0x33069e(0x1b1)]);async function runFromImport(_0x833cfc,_0x5c5267){const _0x5ec73f=a22_0x33069e,_0xbeb8c4=resolveFilePath(_0x833cfc[_0x5ec73f(0x1a8)]);if(!existsSync(_0xbeb8c4))throw CliErrors[_0x5ec73f(0x1c9)](_0x5ec73f(0x1ad)+_0xbeb8c4);const _0x3fd039=readSourceFile(_0xbeb8c4),_0x106bd4=convertToRuntimeConfig(_0x3fd039);if(_0x833cfc[_0x5ec73f(0x1e7)])_0x106bd4[_0x5ec73f(0x1e7)]=_0x833cfc[_0x5ec73f(0x1e7)];if(_0x833cfc['env']&&_0x833cfc['env']!==_0x5ec73f(0x1b2))_0x106bd4['env']=_0x833cfc[_0x5ec73f(0x1d2)];if(!_0x106bd4['appcode'])throw CliErrors[_0x5ec73f(0x1c9)]('Source\x20file\x20does\x20not\x20contain\x20an\x20appcode.','Specify\x20one\x20with\x20--appcode\x20<code>');await writeInitConfig(_0x5c5267,_0x106bd4,_0x833cfc),console[_0x5ec73f(0x1ac)](_0x5ec73f(0x1cc)+_0xbeb8c4),console[_0x5ec73f(0x1ac)](_0x5ec73f(0x1be)+_0x5c5267),console[_0x5ec73f(0x1ac)]('\x20\x20appcode:\x20'+_0x106bd4[_0x5ec73f(0x1e7)]);if(_0x106bd4[_0x5ec73f(0x1d2)])console[_0x5ec73f(0x1ac)](_0x5ec73f(0x1b3)+_0x106bd4[_0x5ec73f(0x1d2)]);_0x106bd4[_0x5ec73f(0x1f1)]&&Object[_0x5ec73f(0x1f0)](_0x106bd4[_0x5ec73f(0x1f1)])['length']>0x0&&console[_0x5ec73f(0x1ac)]('\x20\x20apps:\x20\x20\x20\x20'+Object[_0x5ec73f(0x1f0)](_0x106bd4[_0x5ec73f(0x1f1)])[_0x5ec73f(0x1a9)](',\x20'));}function resolveFilePath(_0x3e0725){const _0x297ab3=a22_0x33069e;return isAbsolute(_0x3e0725)?_0x3e0725:resolve(process[_0x297ab3(0x1c4)](),_0x3e0725);}function readSourceFile(_0x2e0614){const _0x530cf3=a22_0x33069e;try{const _0x44896c=readFileSync(_0x2e0614,{'encoding':_0x530cf3(0x1b6)});return JSON[_0x530cf3(0x1a7)](_0x44896c);}catch(_0x54b54a){throw CliErrors[_0x530cf3(0x1c9)](_0x530cf3(0x1e9)+_0x54b54a[_0x530cf3(0x1cd)]);}}const RUNTIME_CONFIG_KEYS=[a22_0x33069e(0x1e7),a22_0x33069e(0x1d2),a22_0x33069e(0x1aa),a22_0x33069e(0x1d8),a22_0x33069e(0x1a1),'format',a22_0x33069e(0x1e6),a22_0x33069e(0x1d0),a22_0x33069e(0x1f4),a22_0x33069e(0x1c0),a22_0x33069e(0x1c8),a22_0x33069e(0x1d5),'host'];function convertToRuntimeConfig(_0x2810e4){const _0x1c941c=a22_0x33069e,_0x621174={};for(const _0x363476 of RUNTIME_CONFIG_KEYS){_0x2810e4[_0x363476]!==undefined&&(_0x621174[_0x363476]=_0x2810e4[_0x363476]);}!_0x621174[_0x1c941c(0x1e7)]&&_0x2810e4['app']&&(_0x621174[_0x1c941c(0x1e7)]=_0x2810e4[_0x1c941c(0x1af)]);!_0x621174[_0x1c941c(0x1d0)]&&(_0x621174[_0x1c941c(0x1d0)]=_0x1c941c(0x1bb));if(_0x2810e4['apps']&&typeof _0x2810e4[_0x1c941c(0x1f1)]==='object'){_0x621174['apps']={};for(const [_0x5ea081,_0x1ff616]of Object[_0x1c941c(0x1d3)](_0x2810e4['apps'])){_0x1ff616&&typeof _0x1ff616==='object'&&(_0x621174['apps'][_0x5ea081]=filterRuntimeProfile(_0x1ff616));}_0x2810e4[_0x1c941c(0x1c1)]&&(_0x621174[_0x1c941c(0x1c1)]=_0x2810e4[_0x1c941c(0x1c1)]);}return _0x621174;}function filterRuntimeProfile(_0xed99c){const _0x1a33b0=a22_0x33069e,_0xf32e18={};for(const _0x2f8d6d of RUNTIME_CONFIG_KEYS){_0xed99c[_0x2f8d6d]!==undefined&&(_0xf32e18[_0x2f8d6d]=_0xed99c[_0x2f8d6d]);}return!_0xf32e18[_0x1a33b0(0x1e7)]&&_0xed99c[_0x1a33b0(0x1af)]&&(_0xf32e18[_0x1a33b0(0x1e7)]=_0xed99c['app']),!_0xf32e18[_0x1a33b0(0x1d0)]&&(_0xf32e18[_0x1a33b0(0x1d0)]='read'),_0xf32e18;}async function runNonInteractive(_0x25a911,_0x5f1a86){const _0x17575e=a22_0x33069e,_0x1d1458=_0x25a911[_0x17575e(0x1e7)];if(!_0x1d1458)throw CliErrors[_0x17575e(0x1e5)]('appcode',_0x17575e(0x1ba)+CLI_BIN_NAME+_0x17575e(0x1b5));const _0x5af4db=_0x25a911['env']||_0x17575e(0x1b2);if(_0x5af4db!=='production'&&_0x5af4db!==_0x17575e(0x1b0))throw CliErrors[_0x17575e(0x1c9)](_0x17575e(0x1e2)+_0x5af4db+_0x17575e(0x1d7));await writeInitConfig(_0x5f1a86,{'appcode':_0x1d1458,'env':_0x5af4db},_0x25a911),console['log'](_0x17575e(0x1c6)+_0x5f1a86),console['log'](_0x17575e(0x1f3)+_0x1d1458),console['log']('\x20\x20env:\x20\x20\x20\x20\x20'+_0x5af4db);}async function runInteractive(_0x10fd77,_0x4bfa52){const _0x5c6722=a22_0x33069e,_0x3ebefe=loadExisting(_0x4bfa52),_0x3ddb8b=_0x3ebefe?.[_0x5c6722(0x1e7)]||_0x10fd77[_0x5c6722(0x1e7)]||'',_0x4bd404=_0x3ebefe?.[_0x5c6722(0x1d2)]||_0x10fd77[_0x5c6722(0x1d2)]||_0x5c6722(0x1b2);console['log'](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20.lovrabet.json\x0a');if(existsSync(_0x4bfa52)&&!_0x10fd77[_0x5c6722(0x1bc)]){const _0x52e995=await promptYesNo(_0x5c6722(0x1a3)+_0x4bfa52+_0x5c6722(0x1bd),![]);if(!_0x52e995){console['log'](_0x5c6722(0x1a4));return;}}const _0x1f612f=await promptInput(_0x5c6722(0x1d1),_0x3ddb8b);if(!_0x1f612f[_0x5c6722(0x1eb)]())throw CliErrors[_0x5c6722(0x1c9)](_0x5c6722(0x1a6));const _0x13e1b9=await promptChoice('Environment',[_0x5c6722(0x1b2),'daily'],_0x4bd404);await writeInitConfig(_0x4bfa52,{'appcode':_0x1f612f[_0x5c6722(0x1eb)](),'env':_0x13e1b9},_0x10fd77),console['log'](_0x5c6722(0x1ee)+_0x4bfa52),console[_0x5c6722(0x1ac)](_0x5c6722(0x1f3)+_0x1f612f[_0x5c6722(0x1eb)]()),console[_0x5c6722(0x1ac)](_0x5c6722(0x1b3)+_0x13e1b9);}async function writeInitConfig(_0x1bf840,_0x2eaac6,_0x3c4e42){const _0x3645a8=a22_0x33069e;let _0x3db9dd={};existsSync(_0x1bf840)&&!_0x3c4e42['yes']&&(_0x3db9dd=readConfigFile(_0x1bf840));for(const [_0x1a11d8,_0x176bfb]of Object[_0x3645a8(0x1d3)](_0x2eaac6)){_0x176bfb!==undefined&&(_0x3db9dd[_0x1a11d8]=_0x176bfb);}_0x3db9dd['app']&&delete _0x3db9dd[_0x3645a8(0x1af)],writeConfigFile(_0x1bf840,_0x3db9dd);}class AbortPrompt extends Error{constructor(){const _0xf08ccb=a22_0x33069e;super(_0xf08ccb(0x1ca)),this[_0xf08ccb(0x1c3)]=_0xf08ccb(0x1d4);}}function createSafeRl(){const _0x5b7882=a22_0x33069e,_0x3b930f=createInterface({'input':process[_0x5b7882(0x1b8)],'output':process[_0x5b7882(0x1dc)]});let _0x1c28d4;const _0x4d9f04=new Promise((_0x1d9129,_0x28ec84)=>{_0x1c28d4=()=>{const _0x165868=a22_0x27b2;_0x3b930f[_0x165868(0x1db)](),_0x28ec84(new AbortPrompt());};});return process[_0x5b7882(0x1b8)][_0x5b7882(0x1de)]('SIGINT',_0x1c28d4),_0x3b930f[_0x5b7882(0x1de)](_0x5b7882(0x1db),()=>{const _0x23d1fb=_0x5b7882;process['stdin'][_0x23d1fb(0x1b9)](_0x23d1fb(0x1e3),_0x1c28d4);}),{'rl':_0x3b930f,'abortPromise':_0x4d9f04};}async function promptInput(_0x234832,_0x2578da){const {rl:_0x1b2407,abortPromise:_0x456941}=createSafeRl(),_0x299f50=new Promise(_0x8babf0=>{const _0xafbc66=a22_0x27b2,_0x1d5f85=_0x2578da?'\x20\x20'+_0x234832+'\x20('+_0x2578da+'):\x20':'\x20\x20'+_0x234832+':\x20';_0x1b2407[_0xafbc66(0x1d6)](_0x1d5f85,_0x4bf35f=>{const _0x280d62=_0xafbc66;_0x1b2407[_0x280d62(0x1db)](),_0x8babf0(_0x4bf35f[_0x280d62(0x1eb)]()||_0x2578da);});});return Promise['race']([_0x299f50,_0x456941]);}async function promptChoice(_0x2c169e,_0x3c1c49,_0x10d681){const _0x5784cd=a22_0x33069e,{rl:_0x1ed6d5,abortPromise:_0x4a7cb6}=createSafeRl(),_0x5abfa0=new Promise(_0x1f97f7=>{const _0x4209f2=a22_0x27b2,_0x4607fb=_0x3c1c49[_0x4209f2(0x1e8)](_0x2fc511=>_0x2fc511===_0x10d681?'['+_0x2fc511+']':_0x2fc511)['join']('/');_0x1ed6d5['question']('\x20\x20'+_0x2c169e+'\x20('+_0x4607fb+_0x4209f2(0x1e4),_0x3b47a3=>{const _0x2f58d0=_0x4209f2;_0x1ed6d5[_0x2f58d0(0x1db)]();const _0x198e2d=_0x3b47a3[_0x2f58d0(0x1eb)]()[_0x2f58d0(0x1ed)]();_0x198e2d&&_0x3c1c49[_0x2f58d0(0x1ea)](_0x198e2d)?_0x1f97f7(_0x198e2d):_0x1f97f7(_0x10d681);});});return Promise[_0x5784cd(0x1dd)]([_0x5abfa0,_0x4a7cb6]);}async function promptYesNo(_0x16a4a8,_0x53df84){const _0x3dbcfb=a22_0x33069e,{rl:_0x394e20,abortPromise:_0x224f80}=createSafeRl(),_0x1adb11=new Promise(_0x131826=>{const _0x20e72f=a22_0x27b2,_0x4e6420=_0x53df84?_0x20e72f(0x1e1):_0x20e72f(0x1ef);_0x394e20['question']('\x20\x20'+_0x16a4a8+'\x20'+_0x4e6420+':\x20',_0x3a5f14=>{const _0x35d538=_0x20e72f;_0x394e20['close']();const _0x4607b3=_0x3a5f14[_0x35d538(0x1eb)]()[_0x35d538(0x1ed)]();if(_0x4607b3==='y'||_0x4607b3===_0x35d538(0x1bc))_0x131826(!![]);else{if(_0x4607b3==='n'||_0x4607b3==='no')_0x131826(![]);else _0x131826(_0x53df84);}});});return Promise[_0x3dbcfb(0x1dd)]([_0x1adb11,_0x224f80]);}function loadExisting(_0x27125f){if(!existsSync(_0x27125f))return null;return readConfigFile(_0x27125f);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a23_0x1e55(_0x5f1cff,_0x135b5c){_0x5f1cff=_0x5f1cff-0x199;const _0x32c55e=a23_0x32c5();let _0x1e55c4=_0x32c55e[_0x5f1cff];return _0x1e55c4;}const a23_0x3071a7=a23_0x1e55;(function(_0x113795,_0x20ca50){const _0x5d46ed=a23_0x1e55,_0x49b6f5=_0x113795();while(!![]){try{const _0x511210=parseInt(_0x5d46ed(0x1aa))/0x1*(-parseInt(_0x5d46ed(0x1ba))/0x2)+-parseInt(_0x5d46ed(0x19f))/0x3*(-parseInt(_0x5d46ed(0x1af))/0x4)+-parseInt(_0x5d46ed(0x19b))/0x5+-parseInt(_0x5d46ed(0x1b6))/0x6+-parseInt(_0x5d46ed(0x199))/0x7+parseInt(_0x5d46ed(0x19e))/0x8*(-parseInt(_0x5d46ed(0x1a0))/0x9)+-parseInt(_0x5d46ed(0x1a5))/0xa*(-parseInt(_0x5d46ed(0x1ae))/0xb);if(_0x511210===_0x20ca50)break;else _0x49b6f5['push'](_0x49b6f5['shift']());}catch(_0x2d00e6){_0x49b6f5['push'](_0x49b6f5['shift']());}}}(a23_0x32c5,0xc1af5));import{logger}from'../../utils/logger.js';function printLogs(_0x258ac7){const _0x5e443f=a23_0x1e55;if(_0x258ac7[_0x5e443f(0x19d)]===0x0){console[_0x5e443f(0x1ac)](_0x5e443f(0x1a7));return;}console[_0x5e443f(0x1ac)](_0x5e443f(0x1b0)),_0x258ac7[_0x5e443f(0x1a6)]((_0x529ef7,_0x33f256)=>{const _0x143228=_0x5e443f,_0x150630=new Date(_0x529ef7['timestamp'])[_0x143228(0x1b5)]('en-US'),_0x2c6d2e=_0x529ef7[_0x143228(0x1b4)]===_0x143228(0x1b9)?'√':_0x529ef7[_0x143228(0x1b4)]===_0x143228(0x1a3)?'×':_0x529ef7['level']==='warn'?'!':'i';console['log'](_0x33f256+0x1+'.\x20'+_0x2c6d2e+'\x20['+_0x529ef7['command']+']\x20'+_0x529ef7[_0x143228(0x1a4)]),console[_0x143228(0x1ac)](_0x143228(0x1b1)+_0x150630),_0x529ef7[_0x143228(0x1ab)]&&console[_0x143228(0x1ac)](_0x143228(0x1a9)+_0x529ef7[_0x143228(0x1ab)]+'ms'),_0x529ef7[_0x143228(0x19c)]&&Object[_0x143228(0x1b2)](_0x529ef7[_0x143228(0x19c)])[_0x143228(0x19d)]>0x0&&console[_0x143228(0x1ac)]('\x20\x20\x20Details:\x20'+JSON[_0x143228(0x1a2)](_0x529ef7['details'],null,0x2)),console[_0x143228(0x1ac)]('');});}export const logsDefinitions=[{'service':a23_0x3071a7(0x19a),'command':'show','description':a23_0x3071a7(0x1b7),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3ec6e3){const _0x38c671=a23_0x3071a7;return printLogs(logger[_0x38c671(0x1b8)]()),{'ok':!![]};}},{'service':a23_0x3071a7(0x19a),'command':a23_0x3071a7(0x1a1),'description':'Clear\x20command\x20history\x20logs','risk':a23_0x3071a7(0x1ad),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x34cb57){const _0x4323d3=a23_0x3071a7;return logger[_0x4323d3(0x1b3)](),console[_0x4323d3(0x1ac)](_0x4323d3(0x1a8)),{'ok':!![]};}}];function a23_0x32c5(){const _0x346059=['13268kHezBn','*\x20Lovrabet\x20Runtime\x20CLI\x20logs:\x0a','\x20\x20\x20Time:\x20','keys','clearLogs','level','toLocaleString','9518592LkfDwr','View\x20command\x20history\x20logs','readLogs','success','204830TQAWJa','835639hcIkyH','logs','247100WmZGfq','details','length','8lOsvMd','708biMxDP','14241951OfxuSL','clear','stringify','error','message','19340DtXXNF','forEach','*\x20No\x20logs\x20found','*\x20Logs\x20cleared','\x20\x20\x20Duration:\x20','5PNRYUU','duration','log','write','21956yflObp'];a23_0x32c5=function(){return _0x346059;};return a23_0x32c5();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a24_0x12bd7e=a24_0x196d;(function(_0x327b9d,_0x4995f2){const _0x101918=a24_0x196d,_0x40a44b=_0x327b9d();while(!![]){try{const _0x1d4ced=parseInt(_0x101918(0x15d))/0x1*(-parseInt(_0x101918(0x179))/0x2)+parseInt(_0x101918(0x15c))/0x3*(-parseInt(_0x101918(0x171))/0x4)+-parseInt(_0x101918(0x16a))/0x5*(parseInt(_0x101918(0x16e))/0x6)+-parseInt(_0x101918(0x175))/0x7*(parseInt(_0x101918(0x17c))/0x8)+-parseInt(_0x101918(0x16c))/0x9*(-parseInt(_0x101918(0x15f))/0xa)+parseInt(_0x101918(0x161))/0xb+parseInt(_0x101918(0x173))/0xc*(parseInt(_0x101918(0x168))/0xd);if(_0x1d4ced===_0x4995f2)break;else _0x40a44b['push'](_0x40a44b['shift']());}catch(_0x33476e){_0x40a44b['push'](_0x40a44b['shift']());}}}(a24_0x4f45,0x27d57));import{authDefinitions}from'./auth/index.js';import{logsDefinitions}from'./logs/index.js';function a24_0x196d(_0x285b6e,_0x59f6c2){_0x285b6e=_0x285b6e-0x15a;const _0x4f4511=a24_0x4f45();let _0x196da3=_0x4f4511[_0x285b6e];return _0x196da3;}import{initDefinitions}from'./init/index.js';import{appDefinitions}from'./app/definitions.js';import{configDefinitions}from'./config/definitions.js';import{bffDefinitions}from'./bff/index.js';import{sqlDefinitions}from'./sql/index.js';import{datasetDefinitions}from'./dataset/index.js';import{dataDefinitions}from'./data/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x223137){const _0x2c6e0f=a24_0x196d;for(const _0x573cab of _0x223137){definitions[_0x2c6e0f(0x163)](_0x573cab[_0x2c6e0f(0x174)]+':'+_0x573cab[_0x2c6e0f(0x162)],_0x573cab);let _0x3aee0b=serviceGroups[_0x2c6e0f(0x172)](_0x573cab[_0x2c6e0f(0x174)]);!_0x3aee0b&&(_0x3aee0b=[],serviceGroups[_0x2c6e0f(0x163)](_0x573cab[_0x2c6e0f(0x174)],_0x3aee0b)),_0x3aee0b[_0x2c6e0f(0x15b)](_0x573cab);}}function registerService(_0x510bcd,_0x440761,_0x41bd41){const _0x533bef=a24_0x196d;registerDefinitions(_0x440761);const _0x5b94ae=_0x10612a=>_0x10612a===_0x533bef(0x169)?'':_0x10612a===_0x533bef(0x15a)?_0x533bef(0x170):_0x533bef(0x17b),_0x57ddf9={'service':_0x440761[0x0][_0x533bef(0x174)],'label':_0x510bcd,'commands':_0x440761[_0x533bef(0x16f)](_0x30eee4=>({'command':_0x30eee4[_0x533bef(0x162)],'description':_0x30eee4['description'],'tag':_0x5b94ae(_0x30eee4['risk'])})),'defaultCommand':_0x41bd41?.[_0x533bef(0x164)]};serviceRegistry[_0x533bef(0x15b)](_0x57ddf9),serviceByName[_0x533bef(0x163)](_0x57ddf9[_0x533bef(0x174)],_0x57ddf9);}registerService(a24_0x12bd7e(0x16d),authDefinitions,{'defaultCommand':a24_0x12bd7e(0x15e)}),registerService(a24_0x12bd7e(0x177),datasetDefinitions),registerService('Data\x20CRUD',dataDefinitions),registerService(a24_0x12bd7e(0x16b),sqlDefinitions),registerService(a24_0x12bd7e(0x17a),bffDefinitions),registerService('App\x20Management',appDefinitions,{'defaultCommand':a24_0x12bd7e(0x166)}),registerService(a24_0x12bd7e(0x160),configDefinitions,{'defaultCommand':a24_0x12bd7e(0x166)}),registerService(a24_0x12bd7e(0x178),initDefinitions,{'defaultCommand':'create'}),registerService('Logs',logsDefinitions,{'defaultCommand':a24_0x12bd7e(0x165)});export function findDefinition(_0x4d66f5,_0x1ad1a0){return definitions['get'](_0x4d66f5+':'+_0x1ad1a0);}function a24_0x4f45(){const _0x2438fb=['344XSUSAu','write','push','3pxhnIi','11caYkvP','login','1370UuhbNS','Configuration','1469776jbHnYs','command','set','defaultCommand','show','list','values','390jmCwAV','read','10VwakjK','SQL\x20Queries','5877eyeeah','Authentication','531786pJkNAN','map','\x20\x20[write]','420252ufLIdY','get','139956VSUQUS','service','5362WpEsHp','from','Datasets','Initialize\x20project\x20config','17190EennXM','BFF\x20Scripts','\x20\x20[high-risk-write]'];a24_0x4f45=function(){return _0x2438fb;};return a24_0x4f45();}export function isKnownService(_0x2a7902){return serviceByName['has'](_0x2a7902);}export function getServiceEntry(_0x59694f){const _0xdfecd7=a24_0x12bd7e;return serviceByName[_0xdfecd7(0x172)](_0x59694f);}export function getAllDefinitions(){const _0x1fa458=a24_0x12bd7e;return Array[_0x1fa458(0x176)](definitions[_0x1fa458(0x167)]());}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a25_0x4c1221=a25_0x5012;(function(_0x3fa69a,_0x2130c9){const _0xec3527=a25_0x5012,_0x49b05c=_0x3fa69a();while(!![]){try{const _0x57ed44=parseInt(_0xec3527(0xb5))/0x1+parseInt(_0xec3527(0xb6))/0x2+-parseInt(_0xec3527(0xb9))/0x3*(parseInt(_0xec3527(0xbe))/0x4)+-parseInt(_0xec3527(0xb8))/0x5+-parseInt(_0xec3527(0xb3))/0x6*(-parseInt(_0xec3527(0xbc))/0x7)+parseInt(_0xec3527(0xb2))/0x8*(parseInt(_0xec3527(0xc3))/0x9)+-parseInt(_0xec3527(0xbb))/0xa;if(_0x57ed44===_0x2130c9)break;else _0x49b05c['push'](_0x49b05c['shift']());}catch(_0x58540c){_0x49b05c['push'](_0x49b05c['shift']());}}}(a25_0x502c,0x8f0af));import{getSqlQueryInfo}from'../../core/api-client.js';function a25_0x502c(){const _0x37bc42=['sqlcode','27BDfWJd','1979080nfymBM','114TfRDaQ','appCode','292186AJgGAR','1031198ktBxFj','detail','3362380hKgifo','14901wJgNvc','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','12179170RhEgUQ','343119WOaJqj','sql','4HMwnJU','dbId','sqlCode','read'];a25_0x502c=function(){return _0x37bc42;};return a25_0x502c();}import{getDbName}from'../../core/db-resolver.js';function a25_0x5012(_0xd8ed56,_0x1afe41){_0xd8ed56=_0xd8ed56-0xb2;const _0x502c16=a25_0x502c();let _0x5012b1=_0x502c16[_0xd8ed56];return _0x5012b1;}import{SQLCODE_FLAG,VERBOSE_FLAG}from'../common/flags.js';export const sqlDetail={'service':a25_0x4c1221(0xbd),'command':a25_0x4c1221(0xb7),'description':a25_0x4c1221(0xba),'risk':a25_0x4c1221(0xc1),'requiresCookieAuth':!![],'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x550e40){const _0x4a6ea9=a25_0x4c1221,_0x3b1a0b=await getSqlQueryInfo(_0x550e40[_0x4a6ea9(0xb4)],_0x550e40['str'](_0x4a6ea9(0xc2))),_0x937c53=_0x550e40['bool']('verbose');if(_0x937c53)return{'ok':!![],'data':_0x3b1a0b};const _0x128a91=_0x3b1a0b[_0x4a6ea9(0xbf)]?await getDbName(_0x550e40[_0x4a6ea9(0xb4)],_0x3b1a0b[_0x4a6ea9(0xbf)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x3b1a0b[_0x4a6ea9(0xc0)],'sqlName':_0x3b1a0b['sqlName'],'db':_0x128a91?_0x128a91+'\x20('+_0x3b1a0b['dbId']+')':_0x3b1a0b[_0x4a6ea9(0xbf)]??'','description':_0x3b1a0b['description']??'','sqlContent':_0x3b1a0b['sqlContent']??''}};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a26_0x210b(_0x3bb8e9,_0x1670d0){_0x3bb8e9=_0x3bb8e9-0x162;const _0x24c3ea=a26_0x24c3();let _0x210bb5=_0x24c3ea[_0x3bb8e9];return _0x210bb5;}const a26_0x24ec4b=a26_0x210b;function a26_0x24c3(){const _0x216e06=['execSuccess','SQL\x20execution\x20failed','1007292SGvWHB','sqlcode','now','5cbkOKV','exec','length','37420falUUj','execResult','149595kkVZTx','387636MuWCPe','read','8eINpTg','2184623EshIMD','572172NFzLSq','sql','str','isArray','481518kroKhM','execError'];a26_0x24c3=function(){return _0x216e06;};return a26_0x24c3();}(function(_0x5e4bd3,_0x36f844){const _0x2ba63e=a26_0x210b,_0x14abbf=_0x5e4bd3();while(!![]){try{const _0x3b6c7b=-parseInt(_0x2ba63e(0x16e))/0x1+parseInt(_0x2ba63e(0x16c))/0x2+parseInt(_0x2ba63e(0x166))/0x3+parseInt(_0x2ba63e(0x16f))/0x4*(-parseInt(_0x2ba63e(0x169))/0x5)+-parseInt(_0x2ba63e(0x173))/0x6+-parseInt(_0x2ba63e(0x172))/0x7*(-parseInt(_0x2ba63e(0x171))/0x8)+-parseInt(_0x2ba63e(0x162))/0x9;if(_0x3b6c7b===_0x36f844)break;else _0x14abbf['push'](_0x14abbf['shift']());}catch(_0x67e7f9){_0x14abbf['push'](_0x14abbf['shift']());}}}(a26_0x24c3,0x4235b));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a26_0x24ec4b(0x174),'command':a26_0x24ec4b(0x16a),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a26_0x24ec4b(0x170),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x31865e){const _0x102d1b=a26_0x24ec4b,_0x41de31=parseJsonParams(_0x31865e[_0x102d1b(0x175)]('params')),_0x463a8b=Date['now'](),_0x435f15=await executeSdkSql(_0x31865e[_0x102d1b(0x175)](_0x102d1b(0x167)),_0x41de31),_0x47a595=Date[_0x102d1b(0x168)]()-_0x463a8b,_0x46c7f3=_0x435f15?.[_0x102d1b(0x16d)]??_0x435f15,_0x3d69b4=_0x435f15?.[_0x102d1b(0x164)]??!![];if(!_0x3d69b4)return{'ok':![],'data':{'error':_0x435f15?.[_0x102d1b(0x163)]||_0x102d1b(0x165),'elapsed':_0x47a595},'message':_0x102d1b(0x165)};const _0x128504=Array[_0x102d1b(0x176)](_0x46c7f3)?_0x46c7f3:[];return{'ok':!![],'data':{'rows':_0x128504,'rowCount':_0x128504[_0x102d1b(0x16b)],'elapsed':_0x47a595},'message':'Returned\x20'+_0x128504['length']+'\x20row(s)\x20in\x20'+_0x47a595+'ms'};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x266733,_0x5900a1){const _0x2557e1=a27_0x23fe,_0x6099f7=_0x266733();while(!![]){try{const _0x2853c0=parseInt(_0x2557e1(0x1d6))/0x1+-parseInt(_0x2557e1(0x1d8))/0x2+-parseInt(_0x2557e1(0x1d9))/0x3*(parseInt(_0x2557e1(0x1d2))/0x4)+parseInt(_0x2557e1(0x1d4))/0x5*(parseInt(_0x2557e1(0x1d3))/0x6)+parseInt(_0x2557e1(0x1d7))/0x7+parseInt(_0x2557e1(0x1d5))/0x8+-parseInt(_0x2557e1(0x1d1))/0x9*(parseInt(_0x2557e1(0x1d0))/0xa);if(_0x2853c0===_0x5900a1)break;else _0x6099f7['push'](_0x6099f7['shift']());}catch(_0x148a4e){_0x6099f7['push'](_0x6099f7['shift']());}}}(a27_0x16d9,0xec767));function a27_0x16d9(){const _0xa7c252=['48237ORVlaj','10cyCTVM','10439775FPobCo','268djvKZo','5065206fZLNNh','5qLUGkB','14803672TzDvwk','1312148HGtOVu','601433dXfIiq','1773816AFsHce'];a27_0x16d9=function(){return _0xa7c252;};return a27_0x16d9();}import{sqlDetail}from'./detail.js';import{sqlExec}from'./exec.js';function a27_0x23fe(_0x2b5da4,_0x44fe2f){_0x2b5da4=_0x2b5da4-0x1d0;const _0x16d9d3=a27_0x16d9();let _0x23fea2=_0x16d9d3[_0x2b5da4];return _0x23fea2;}export const sqlDefinitions=[sqlDetail,sqlExec];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a28_0x3568(_0x392158,_0x5c19ff){_0x392158=_0x392158-0x1ed;const _0x53cb3f=a28_0x53cb();let _0x3568a7=_0x53cb3f[_0x392158];return _0x3568a7;}const a28_0x19a667=a28_0x3568;(function(_0x43e921,_0x2c4cdf){const _0x148f15=a28_0x3568,_0x1c51a2=_0x43e921();while(!![]){try{const _0x6db848=-parseInt(_0x148f15(0x214))/0x1+parseInt(_0x148f15(0x1f9))/0x2+parseInt(_0x148f15(0x215))/0x3*(parseInt(_0x148f15(0x20d))/0x4)+parseInt(_0x148f15(0x213))/0x5*(parseInt(_0x148f15(0x1ff))/0x6)+-parseInt(_0x148f15(0x212))/0x7*(-parseInt(_0x148f15(0x206))/0x8)+-parseInt(_0x148f15(0x202))/0x9+-parseInt(_0x148f15(0x1f0))/0xa;if(_0x6db848===_0x2c4cdf)break;else _0x1c51a2['push'](_0x1c51a2['shift']());}catch(_0x51a47d){_0x1c51a2['push'](_0x1c51a2['shift']());}}}(a28_0x53cb,0x63c26));export const CLI_BIN_NAME='lovrabet';export const CLI_DISPLAY_NAME=a28_0x19a667(0x203);export const NPM_PACKAGE_NAME='@lovrabet/lovrabet-cli';function a28_0x53cb(){const _0x578f16=['3232201cVDfOh','347455jWRfXo','496779bmQnKa','3mkGoqV','production\x20|\x20daily','type','string','Name\x20filter','Preview\x20operation\x20without\x20executing','SQL\x20query\x20code','dry-run','dryRun','non-interactive','meowKey','3450230BLfOuH','help','Force\x20non-interactive\x20mode\x20(CI)','sqlcode','boolean','Output\x20format','Select\x20app\x20profile\x20by\x20name','Use\x20global\x20config\x20scope','Skip\x20confirmation\x20for\x20high-risk\x20writes','1543414JCETir','env','json\x20|\x20pretty\x20|\x20table','name','global','app','6mEVBpd','format','params','6189174rmnPaI','Lovrabet\x20Runtime\x20CLI','Clear\x20output','appcode','8TwKtLQ','verbose','Show\x20help','Record\x20ID','<name>','nonInteractive','Environment','2540644TGdkAl','yes','clear','map','Verbose\x20output'];a28_0x53cb=function(){return _0x578f16;};return a28_0x53cb();}export const GLOBAL_FLAGS=[{'name':a28_0x19a667(0x205),'meowKey':a28_0x19a667(0x205),'type':a28_0x19a667(0x218),'description':'Override\x20appcode','hint':'<code>'},{'name':a28_0x19a667(0x1fe),'meowKey':'app','type':a28_0x19a667(0x218),'description':a28_0x19a667(0x1f6),'hint':a28_0x19a667(0x20a)},{'name':a28_0x19a667(0x1fa),'meowKey':'env','type':a28_0x19a667(0x218),'description':a28_0x19a667(0x20c),'hint':a28_0x19a667(0x216)},{'name':a28_0x19a667(0x200),'meowKey':a28_0x19a667(0x200),'type':a28_0x19a667(0x218),'description':a28_0x19a667(0x1f5),'hint':a28_0x19a667(0x1fb)},{'name':a28_0x19a667(0x21c),'meowKey':a28_0x19a667(0x1ed),'type':a28_0x19a667(0x1f4),'description':a28_0x19a667(0x21a)},{'name':a28_0x19a667(0x20e),'meowKey':a28_0x19a667(0x20e),'type':a28_0x19a667(0x1f4),'description':a28_0x19a667(0x1f8)},{'name':a28_0x19a667(0x1ee),'meowKey':a28_0x19a667(0x20b),'type':a28_0x19a667(0x1f4),'description':a28_0x19a667(0x1f2)},{'name':a28_0x19a667(0x1fd),'meowKey':'global','type':'boolean','description':a28_0x19a667(0x1f7)},{'name':'ci','meowKey':'ci','type':a28_0x19a667(0x1f4),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':'help','meowKey':a28_0x19a667(0x1f1),'type':a28_0x19a667(0x1f4),'description':a28_0x19a667(0x208)},{'name':'id','meowKey':'id','type':a28_0x19a667(0x218),'description':a28_0x19a667(0x209),'hidden':!![]},{'name':'name','meowKey':a28_0x19a667(0x1fc),'type':a28_0x19a667(0x218),'description':a28_0x19a667(0x219),'hidden':!![]},{'name':a28_0x19a667(0x1f3),'meowKey':a28_0x19a667(0x1f3),'type':a28_0x19a667(0x218),'description':a28_0x19a667(0x21b),'hidden':!![]},{'name':a28_0x19a667(0x201),'meowKey':a28_0x19a667(0x201),'type':a28_0x19a667(0x218),'description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':a28_0x19a667(0x207),'meowKey':'verbose','type':a28_0x19a667(0x1f4),'description':a28_0x19a667(0x211),'hidden':!![]},{'name':a28_0x19a667(0x20f),'meowKey':'clear','type':a28_0x19a667(0x1f4),'description':a28_0x19a667(0x204),'hidden':!![]}];export function buildMeowFlags(){const _0x12c4e7=a28_0x19a667;return Object['fromEntries'](GLOBAL_FLAGS[_0x12c4e7(0x210)](_0xc4c5d9=>[_0xc4c5d9[_0x12c4e7(0x1ef)],{'type':_0xc4c5d9[_0x12c4e7(0x217)]}]));}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a29_0x26152b=a29_0x1b9d;(function(_0x596e67,_0x2bec0f){const _0xaf1b6a=a29_0x1b9d,_0x120437=_0x596e67();while(!![]){try{const _0x3376d7=parseInt(_0xaf1b6a(0x114))/0x1+-parseInt(_0xaf1b6a(0x11a))/0x2+-parseInt(_0xaf1b6a(0x11c))/0x3*(-parseInt(_0xaf1b6a(0x115))/0x4)+-parseInt(_0xaf1b6a(0x121))/0x5*(parseInt(_0xaf1b6a(0x117))/0x6)+parseInt(_0xaf1b6a(0x11d))/0x7*(parseInt(_0xaf1b6a(0x11b))/0x8)+parseInt(_0xaf1b6a(0x116))/0x9+-parseInt(_0xaf1b6a(0x11e))/0xa;if(_0x3376d7===_0x2bec0f)break;else _0x120437['push'](_0x120437['shift']());}catch(_0x34ab17){_0x120437['push'](_0x120437['shift']());}}}(a29_0x4c16,0xc4f7b));import{getEnv}from'./env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x32b0fa){customApiDomain=_0x32b0fa?.['apiDomain'],customUserDomain=_0x32b0fa?.['userDomain'],customRuntimeDomain=_0x32b0fa?.['runtimeDomain'];}function a29_0x4c16(){const _0x523c93=['6ljNYHO','https://daily-runtime.lovrabet.com','https://daily-api.lovrabet.com','1271998jtygHX','16qrAJmD','21LbbKWB','4393844fCkEYc','29834380DuGezb','https://runtime.lovrabet.com','production','1164190KXAlzy','https://api.lovrabet.com','https://user.lovrabet.com','1485401FEbQAi','302300CQBffF','12503196IKzKqM'];a29_0x4c16=function(){return _0x523c93;};return a29_0x4c16();}export const getUserDomain=()=>customUserDomain||(getEnv()===a29_0x26152b(0x120)?a29_0x26152b(0x123):'https://user-daily.lovrabet.com');export const getApiDomain=()=>customApiDomain||(getEnv()===a29_0x26152b(0x120)?a29_0x26152b(0x122):a29_0x26152b(0x119));function a29_0x1b9d(_0x1e1d0d,_0x1e26aa){_0x1e1d0d=_0x1e1d0d-0x114;const _0x4c1664=a29_0x4c16();let _0x1b9d45=_0x4c1664[_0x1e1d0d];return _0x1b9d45;}export const getRuntimeDomain=()=>customRuntimeDomain||(getEnv()===a29_0x26152b(0x120)?a29_0x26152b(0x11f):a29_0x26152b(0x118));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a30_0x6357cb=a30_0x3d36;(function(_0x46b374,_0x30660e){const _0x2c101e=a30_0x3d36,_0x889fa3=_0x46b374();while(!![]){try{const _0xa01b02=parseInt(_0x2c101e(0x1c6))/0x1*(parseInt(_0x2c101e(0x1c4))/0x2)+-parseInt(_0x2c101e(0x1c7))/0x3*(-parseInt(_0x2c101e(0x1c9))/0x4)+parseInt(_0x2c101e(0x1c2))/0x5*(parseInt(_0x2c101e(0x1c8))/0x6)+-parseInt(_0x2c101e(0x1c5))/0x7+parseInt(_0x2c101e(0x1be))/0x8*(parseInt(_0x2c101e(0x1c1))/0x9)+parseInt(_0x2c101e(0x1c0))/0xa*(-parseInt(_0x2c101e(0x1bc))/0xb)+-parseInt(_0x2c101e(0x1bd))/0xc*(parseInt(_0x2c101e(0x1bf))/0xd);if(_0xa01b02===_0x30660e)break;else _0x889fa3['push'](_0x889fa3['shift']());}catch(_0x2f42f3){_0x889fa3['push'](_0x889fa3['shift']());}}}(a30_0x1ee0,0x3dcc7));function a30_0x1ee0(){const _0x432a7b=['21105jJOUqP','70945JdyaWp','online','38092HYfIqr','1020901hpxzSZ','26ijhmXH','210552wKQvKP','6oIfjRP','24sBDjtx','production','957QTVxTE','947292hUPKrF','1456WhCfXF','143HQChOO','10340YZqOsk'];a30_0x1ee0=function(){return _0x432a7b;};return a30_0x1ee0();}export function normalizeEnv(_0x2b5562){const _0x58356c=a30_0x3d36;return _0x2b5562===_0x58356c(0x1c3)?_0x58356c(0x1ca):_0x2b5562;}let env=normalizeEnv(process.env.LOVRABET_ENV||a30_0x6357cb(0x1ca));export function getEnv(){return env;}function a30_0x3d36(_0x480df9,_0x37eabd){_0x480df9=_0x480df9-0x1bc;const _0x1ee0c5=a30_0x1ee0();let _0x3d3656=_0x1ee0c5[_0x480df9];return _0x3d3656;}export function initEnv(_0x36962a){env=normalizeEnv(_0x36962a);}
|
package/lib/context.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a31_0x586098=a31_0xc643;(function(_0x1cde46,_0x11986a){const _0x2fe878=a31_0xc643,_0x20373f=_0x1cde46();while(!![]){try{const _0x28a282=parseInt(_0x2fe878(0x7f))/0x1*(parseInt(_0x2fe878(0x88))/0x2)+parseInt(_0x2fe878(0x87))/0x3*(-parseInt(_0x2fe878(0x86))/0x4)+parseInt(_0x2fe878(0xaf))/0x5+-parseInt(_0x2fe878(0x8f))/0x6*(parseInt(_0x2fe878(0x85))/0x7)+-parseInt(_0x2fe878(0xab))/0x8*(parseInt(_0x2fe878(0x96))/0x9)+-parseInt(_0x2fe878(0x82))/0xa+parseInt(_0x2fe878(0xa3))/0xb*(parseInt(_0x2fe878(0xb1))/0xc);if(_0x28a282===_0x11986a)break;else _0x20373f['push'](_0x20373f['shift']());}catch(_0x58bb7b){_0x20373f['push'](_0x20373f['shift']());}}}(a31_0x3685,0xdad1d));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{getIsSessionValid}from'./auth/is-session-valid.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';function env(_0x4f6e90){return process.env[`LOVRABET_${_0x4f6e90}`]||undefined;}const CONFIG_NAMES=[a31_0x586098(0xa8),a31_0x586098(0x9c)];export const NEW_CONFIG_NAME=a31_0x586098(0xa8);function resolveConfigPath(_0x15c192){for(const _0x2e4f7f of CONFIG_NAMES){const _0x25630e=resolve(_0x15c192,_0x2e4f7f);if(existsSync(_0x25630e))return _0x25630e;}return undefined;}export function resolveWriteConfigPath(_0x4fa9ab){const _0x2223bb=a31_0x586098,_0x5c243d=_0x4fa9ab==='project'?process[_0x2223bb(0x7a)]():homedir(),_0x32de4f=resolveConfigPath(_0x5c243d);return _0x32de4f??resolve(_0x5c243d,NEW_CONFIG_NAME);}function a31_0x3685(){const _0x273110=['apps','ENV','FORMAT','cwd','format','keys','stringify','table','68458CuoYMG','object','APP','13811090iKlCVl','.tmp','pretty','21gJTMvJ','27536PNkaSn','405GCGVKC','22JdorSz','accessKey','production','runtimeDomain','utf8','pageSize','length','704022rkuDXq','host','app','PAGE_SIZE','SECRET_KEY','env','json','90261DfpQus','./constant/domain.js','locale','global','isTTY','./auth/get-cookie.js','.lovrabetrc','setRawCommand','write','APPCODE','setRawMode','userDomain','code','1793bunDLg','COOKIE','high-risk-write','raw','argv','.lovrabet.json','true','parse','24STMMrt','join','secretKey','values','5459285GSdNHx','EACCES','128388JOqRIb','appcode','authRequired','riskLevel','stdin','project','trim','EPERM','./constant/env.js','ACCESS_KEY','nonInteractive','daily','cookie','online','setLogPath','defaultApp','string'];a31_0x3685=function(){return _0x273110;};return a31_0x3685();}export function readConfigFile(_0x659722){const _0x4c7401=a31_0x586098;try{if(existsSync(_0x659722)){const _0x5d02fe=readFileSync(_0x659722,{'encoding':_0x4c7401(0x8c)});if(_0x5d02fe){const _0xa98c50=JSON['parse'](_0x5d02fe);return migrateOnlineEnv(_0x659722,_0xa98c50),_0xa98c50;}}}catch{}return{};}function a31_0xc643(_0x250cc5,_0x3a1b59){_0x250cc5=_0x250cc5-0x73;const _0x368505=a31_0x3685();let _0xc643be=_0x368505[_0x250cc5];return _0xc643be;}function migrateOnlineEnv(_0x2787ac,_0x1b6dad){const _0x5ebcd6=a31_0x586098;let _0x225440=![];_0x1b6dad['env']==='online'&&(_0x1b6dad[_0x5ebcd6(0x94)]=_0x5ebcd6(0x8a),_0x225440=!![]);if(_0x1b6dad[_0x5ebcd6(0x77)]&&typeof _0x1b6dad['apps']===_0x5ebcd6(0x80))for(const _0x47f497 of Object[_0x5ebcd6(0xae)](_0x1b6dad[_0x5ebcd6(0x77)])){_0x47f497&&_0x47f497[_0x5ebcd6(0x94)]===_0x5ebcd6(0x73)&&(_0x47f497['env']=_0x5ebcd6(0x8a),_0x225440=!![]);}if(_0x225440)try{writeConfigFile(_0x2787ac,_0x1b6dad);}catch{}}export function writeConfigFile(_0x502c6c,_0x5e76cf){const _0x571377=a31_0x586098,_0x317b6e=dirname(_0x502c6c);!existsSync(_0x317b6e)&&mkdirSync(_0x317b6e,{'recursive':!![]});const _0x396a4e=_0x502c6c+_0x571377(0x83);try{writeFileSync(_0x396a4e,JSON[_0x571377(0x7d)](_0x5e76cf,null,0x2)+'\x0a',{'encoding':_0x571377(0x8c),'mode':0x180});try{renameSync(_0x396a4e,_0x502c6c);}catch(_0x43fac1){if(_0x43fac1[_0x571377(0xa2)]===_0x571377(0xb8)||_0x43fac1['code']==='EXDEV'||_0x43fac1[_0x571377(0xa2)]===_0x571377(0xb0)){writeFileSync(_0x502c6c,JSON['stringify'](_0x5e76cf,null,0x2)+'\x0a',{'encoding':_0x571377(0x8c)});try{unlinkSync(_0x396a4e);}catch{}}else throw _0x43fac1;}}catch(_0x516f6c){try{unlinkSync(_0x396a4e);}catch{}throw _0x516f6c;}}export function isNonInteractiveMode(_0x1499a8){const _0x28f7d5=a31_0x586098;return!!(_0x1499a8[_0x28f7d5(0xbb)]||_0x1499a8['ci']||env('CI')===_0x28f7d5(0xa9)||process.env.RABETBASE_CI==='true'||process.env.LOVRABET_CI==='true'||process.env.CI===_0x28f7d5(0xa9)||!process['stdout'][_0x28f7d5(0x9a)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0xf21ce8=a31_0x586098;if(!process[_0xf21ce8(0xb5)][_0xf21ce8(0x9a)])return![];try{const _0x4a1df8=process[_0xf21ce8(0xb5)]['isRaw'];return process[_0xf21ce8(0xb5)]['setRawMode'](!![]),process[_0xf21ce8(0xb5)][_0xf21ce8(0xa0)](_0x4a1df8??![]),!![];}catch{return![];}}export async function createContext(_0x1629f6){const _0x2f610e=a31_0x586098,_0x4fc716=readRawConfig(),_0x506327=buildConfig(_0x4fc716,_0x1629f6);await initGlobalEnvironment(_0x506327);const {getUserDomain:_0x588835,getApiDomain:_0xae5a81}=await import('./constant/domain.js'),_0xfa8749={'apiDomain':_0xae5a81(),'userDomain':_0x588835()},_0x16cf6e=await buildAuth(_0x506327);logger[_0x2f610e(0x74)](process[_0x2f610e(0x7a)]());const _0x2a85d9=(CLI_BIN_NAME+'\x20'+process[_0x2f610e(0xa7)]['slice'](0x2)[_0x2f610e(0xac)]('\x20'))[_0x2f610e(0xb7)]();logger[_0x2f610e(0x9d)](_0x2a85d9);const _0x45a893=isNonInteractiveMode(_0x1629f6);return{'config':_0x506327,'auth':_0x16cf6e,'logger':logger,'env':_0xfa8749,'nonInteractive':_0x45a893};}export function buildConfigFromFlags(_0x3cd2e6){return buildConfig(readRawConfig(),_0x3cd2e6);}export function readAppCodeFromConfig(){const _0x26be80=a31_0x586098,_0x5765b5=readRawConfig();if(_0x5765b5[_0x26be80(0x77)]&&_0x5765b5['defaultApp']&&_0x5765b5[_0x26be80(0x77)][_0x5765b5[_0x26be80(0x75)]]?.[_0x26be80(0xb2)])return String(_0x5765b5[_0x26be80(0x77)][_0x5765b5[_0x26be80(0x75)]]['appcode'])['trim']();const _0x26ce24=_0x5765b5[_0x26be80(0xb2)]||_0x5765b5['app'];return _0x26ce24?String(_0x26ce24)['trim']():undefined;}export function readScopedConfig(_0x447431){const _0x106ec5=a31_0x586098,_0x13bc08=_0x447431[_0x106ec5(0x99)]?_0x106ec5(0x99):_0x106ec5(0xb6);return readConfigFile(resolveWriteConfigPath(_0x13bc08));}export function writeScopedConfig(_0x3e8187,_0x4e869c){const _0x4fdda9=a31_0x586098,_0x44f3a3=_0x4e869c[_0x4fdda9(0x99)]?'global':_0x4fdda9(0xb6);writeConfigFile(resolveWriteConfigPath(_0x44f3a3),_0x3e8187);}export async function initGlobalEnvironment(_0x392dfe){const _0x4f3d00=a31_0x586098,{initEnv:_0x17348f}=await import(_0x4f3d00(0xb9));_0x17348f(_0x392dfe[_0x4f3d00(0x94)]);const {initDomains:_0x2713af}=await import(_0x4f3d00(0x97));_0x2713af({'apiDomain':_0x392dfe[_0x4f3d00(0xa6)]['apiDomain']||_0x392dfe[_0x4f3d00(0xa6)][_0x4f3d00(0x90)]||undefined,'userDomain':_0x392dfe[_0x4f3d00(0xa6)][_0x4f3d00(0xa1)]||undefined,'runtimeDomain':_0x392dfe['raw'][_0x4f3d00(0x8b)]||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function readRawConfig(_0x33a202){const _0x5bfce4=a31_0x586098;let _0x1f3ce8={},_0x439219={};try{const _0x32890d=resolveConfigPath(homedir());if(_0x32890d){const _0x1cb974=readFileSync(_0x32890d,{'encoding':_0x5bfce4(0x8c)});if(_0x1cb974)_0x1f3ce8=JSON[_0x5bfce4(0xaa)](_0x1cb974);}}catch{}try{const _0x20dc65=_0x33a202||process[_0x5bfce4(0x7a)](),_0x169fd0=resolveConfigPath(_0x20dc65);if(_0x169fd0){const _0x52858b=readFileSync(_0x169fd0,{'encoding':_0x5bfce4(0x8c)});if(_0x52858b)_0x439219=JSON[_0x5bfce4(0xaa)](_0x52858b);}}catch{}const _0x4f7f17=_0x1f3ce8[_0x5bfce4(0x77)]&&typeof _0x1f3ce8['apps']===_0x5bfce4(0x80)?_0x1f3ce8[_0x5bfce4(0x77)]:{},_0x22be33=_0x439219[_0x5bfce4(0x77)]&&typeof _0x439219['apps']===_0x5bfce4(0x80)?_0x439219['apps']:{},_0x42e839={..._0x4f7f17,..._0x22be33},_0xbffa7c={..._0x1f3ce8,..._0x439219};Object[_0x5bfce4(0x7c)](_0x42e839)[_0x5bfce4(0x8e)]>0x0&&(_0xbffa7c['apps']=_0x42e839);if(_0x5bfce4(0x75)in _0x439219)_0xbffa7c['defaultApp']=_0x439219['defaultApp'];else{if(_0x22be33&&Object[_0x5bfce4(0x7c)](_0x22be33)[_0x5bfce4(0x8e)]>0x0)_0xbffa7c['defaultApp']=Object[_0x5bfce4(0x7c)](_0x22be33)[0x0];else _0x1f3ce8[_0x5bfce4(0x75)]&&(_0xbffa7c['defaultApp']=_0x1f3ce8[_0x5bfce4(0x75)]);}return _0xbffa7c;}function buildConfig(_0x107f78,_0x47b055){const _0xbd1ecd=a31_0x586098,_0x4321c7={};if(_0x107f78[_0xbd1ecd(0x77)]&&typeof _0x107f78[_0xbd1ecd(0x77)]==='object')for(const [_0x1af076,_0x1fbfcd]of Object['entries'](_0x107f78[_0xbd1ecd(0x77)])){_0x1fbfcd&&typeof _0x1fbfcd===_0xbd1ecd(0x80)&&_0x1fbfcd[_0xbd1ecd(0xb2)]&&(_0x4321c7[_0x1af076]=_0x1fbfcd);}const _0x5e79c4=_0x107f78['defaultApp']||undefined,_0x522ffd=Object['keys'](_0x4321c7)[_0xbd1ecd(0x8e)]>0x0,_0x449155=_0x47b055[_0xbd1ecd(0x91)]||env(_0xbd1ecd(0x81))||undefined,_0x299713=_0x449155||_0x5e79c4||undefined,_0x451e2f=_0x299713&&_0x4321c7[_0x299713]?_0x4321c7[_0x299713]:undefined,_0x5e3595=_0x47b055[_0xbd1ecd(0xb2)]||env(_0xbd1ecd(0x9f))||_0x451e2f?.[_0xbd1ecd(0xb2)]||_0x107f78['appcode']||_0x107f78['app']||undefined,_0x175997=_0x47b055[_0xbd1ecd(0x94)]||env(_0xbd1ecd(0x78))||_0x451e2f?.[_0xbd1ecd(0x94)]||_0x107f78[_0xbd1ecd(0x94)]||_0xbd1ecd(0x8a),_0x3d5b82=_0x451e2f?.['locale']||_0x107f78[_0xbd1ecd(0x98)]||'en-US',_0x3753da=env(_0xbd1ecd(0xa4))||_0x451e2f?.[_0xbd1ecd(0xbd)]||_0x107f78[_0xbd1ecd(0xbd)]||undefined,_0x5878de=env(_0xbd1ecd(0xba))||_0x451e2f?.[_0xbd1ecd(0x89)]||_0x107f78[_0xbd1ecd(0x89)]||undefined,_0x5f11bf=env(_0xbd1ecd(0x93))||_0x451e2f?.['secretKey']||_0x107f78[_0xbd1ecd(0xad)]||undefined,_0x219b9a=_0x47b055[_0xbd1ecd(0x7b)]||env(_0xbd1ecd(0x79))||_0x451e2f?.[_0xbd1ecd(0x7b)]||_0x107f78[_0xbd1ecd(0x7b)],_0x355f8c=_0x219b9a===_0xbd1ecd(0x95)||_0x219b9a===_0xbd1ecd(0x84)||_0x219b9a===_0xbd1ecd(0x7e)?_0x219b9a:undefined,_0x364d55=env(_0xbd1ecd(0x92))||_0x451e2f?.[_0xbd1ecd(0x8d)]||_0x107f78['pageSize'],_0x412e66=_0x364d55?Number(_0x364d55)||undefined:undefined,_0x323b51=_0x451e2f?.['riskLevel']||_0x107f78[_0xbd1ecd(0xb4)]||_0x107f78['maxRisk'],_0xba164b=_0x323b51==='read'||_0x323b51===_0xbd1ecd(0x9e)||_0x323b51===_0xbd1ecd(0xa5)?_0x323b51:'write',_0x2bd2ba=env('VERBOSE'),_0x1f2879=_0x2bd2ba==='1'||_0x2bd2ba===_0xbd1ecd(0xa9);return{'appCode':typeof _0x5e3595===_0xbd1ecd(0x76)&&_0x5e3595[_0xbd1ecd(0xb7)]()?_0x5e3595[_0xbd1ecd(0xb7)]():undefined,'env':_0x175997==='online'?'production':_0x175997===_0xbd1ecd(0xbc)?_0xbd1ecd(0xbc):_0xbd1ecd(0x8a),'locale':_0x3d5b82,'cookie':_0x3753da,'accessKey':_0x5878de,'secretKey':_0x5f11bf,'format':_0x355f8c,'pageSize':_0x412e66,'riskLevel':_0xba164b,'verbose':_0x1f2879,'apps':_0x4321c7,'defaultApp':_0x5e79c4,'currentApp':_0x522ffd?_0x299713:undefined,'raw':_0x107f78};}async function buildAuth(_0x190af0){const _0x30553a=a31_0x586098,{getCookie:_0x24f067}=await import(_0x30553a(0x9b)),_0x6457c1=_0x190af0['cookie']||_0x24f067(),_0x23f4a8=_0x6457c1?await getIsSessionValid():![];return{'cookie':_0x6457c1,'isLoggedIn':_0x23f4a8,async 'getOrLogin'(){const _0xb1cd48=_0x30553a;if(_0x6457c1&&_0x23f4a8)return _0x6457c1;throw CliErrors[_0xb1cd48(0xb3)]();}};}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x23ca0b,_0x3ad855){const _0x4e401c=a32_0x29e3,_0x115cc8=_0x23ca0b();while(!![]){try{const _0x313e41=parseInt(_0x4e401c(0x166))/0x1+-parseInt(_0x4e401c(0x15d))/0x2*(-parseInt(_0x4e401c(0x174))/0x3)+parseInt(_0x4e401c(0x15f))/0x4*(parseInt(_0x4e401c(0x160))/0x5)+-parseInt(_0x4e401c(0x17d))/0x6*(parseInt(_0x4e401c(0x172))/0x7)+parseInt(_0x4e401c(0x173))/0x8+-parseInt(_0x4e401c(0x176))/0x9*(parseInt(_0x4e401c(0x170))/0xa)+-parseInt(_0x4e401c(0x178))/0xb*(-parseInt(_0x4e401c(0x16d))/0xc);if(_0x313e41===_0x3ad855)break;else _0x115cc8['push'](_0x115cc8['shift']());}catch(_0x45f6dd){_0x115cc8['push'](_0x115cc8['shift']());}}}(a32_0x4eba,0x885c1));import{getApiDomain}from'../constant/domain.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeCookie;export function setActiveCookie(_0x2e3f5a){_activeCookie=_0x2e3f5a||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}async function apiRequest(_0x433a3f,_0x2ec5db={}){const _0x1c8176=a32_0x29e3,{method:method=_0x1c8176(0x177),body:_0x567781,headers:headers={},timeout:timeout=0x7530}=_0x2ec5db,_0x5520b8=getApiDomain(),_0x1f40f6=_activeCookie;if(!_0x1f40f6)throw CliErrors['authRequired'](_0x1c8176(0x162));const _0x31a169=''+_0x5520b8+_0x433a3f,_0x328355=new AbortController(),_0xa894c=setTimeout(()=>_0x328355['abort'](),timeout);try{const _0x245329=await fetch(_0x31a169,{'method':method,'headers':{'Content-Type':'application/json','Cookie':_0x1f40f6,'X-Invoke-Source':'cli:lovrabet-runtime',...headers},'body':_0x567781?JSON[_0x1c8176(0x17a)](_0x567781):undefined,'signal':_0x328355['signal']});let _0x44a77a;try{_0x44a77a=await _0x245329[_0x1c8176(0x168)]();}catch{throw CliErrors[_0x1c8176(0x16b)](_0x1c8176(0x179)+_0x245329[_0x1c8176(0x164)]+')',_0x245329[_0x1c8176(0x164)]>=0x190?_0x1c8176(0x17b):undefined);}if(!_0x245329['ok']||_0x44a77a[_0x1c8176(0x15e)]===![])throw CliErrors['apiError'](_0x44a77a['errorMsg']||_0x44a77a['message']||'API\x20error:\x20'+_0x245329[_0x1c8176(0x164)],_0x44a77a[_0x1c8176(0x169)]?_0x1c8176(0x175)+_0x44a77a[_0x1c8176(0x169)]:undefined);return _0x44a77a;}catch(_0x4d1b16){if(_0x4d1b16 instanceof Error&&_0x4d1b16[_0x1c8176(0x16f)]==='AbortError')throw CliErrors['apiError'](_0x1c8176(0x16c)+_0x31a169);throw _0x4d1b16;}finally{clearTimeout(_0xa894c);}}function a32_0x4eba(){const _0x35454c=['Request\x20timeout:\x20','48NIaPnV','validation','name','2160DFxtFU','code','7jufaCq','1614224SrYBib','639378PygjSP','API\x20error\x20code:\x20','32508IZMRuC','GET','882563durjaw','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','stringify','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','/smartapi/custom/queryUserCustomSqlList','5404062WKyeOC','test','2tpNUlv','success','8wsKFST','1262180UkwmUy','data','API\x20client\x20used\x20without\x20setting\x20cookie.\x20Ensure\x20auth\x20pipeline\x20ran\x20before\x20making\x20requests.','POST','status','/smartapi/dataset/get-driven-data?','998690LrBnBB','tableData','json','errorCode','/smartapi/dataset/get-dataset-list','apiError'];a32_0x4eba=function(){return _0x35454c;};return a32_0x4eba();}function a32_0x29e3(_0x49520e,_0x352eaa){_0x49520e=_0x49520e-0x15c;const _0x4eba8e=a32_0x4eba();let _0x29e3a4=_0x4eba8e[_0x49520e];return _0x29e3a4;}export async function getBffScriptInfo(_0x254ff0){const _0x3e7927=a32_0x29e3,_0x14ab38=await apiRequest('/api/management/library/scripts/info?id='+_0x254ff0);if(!_0x14ab38[_0x3e7927(0x161)])throw CliErrors[_0x3e7927(0x16e)]('BFF\x20script\x20not\x20found:\x20id='+_0x254ff0);return _0x14ab38[_0x3e7927(0x161)];}export async function getSqlQueryInfo(_0x3aa2f9,_0x2bae2a){const _0x6cf94e=a32_0x29e3,_0x11c279=await apiRequest(_0x6cf94e(0x17c),{'method':_0x6cf94e(0x163),'body':{'appCode':_0x3aa2f9,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x2bae2a}}),_0x153f53=_0x11c279[_0x6cf94e(0x161)][_0x6cf94e(0x167)]?.[0x0];if(!_0x153f53)throw CliErrors[_0x6cf94e(0x16e)]('SQL\x20query\x20not\x20found:\x20'+_0x2bae2a);return _0x153f53;}export async function listDatasets(_0xe4db69,_0x1c2fa9){const _0x9c6b23=a32_0x29e3,_0xff802f=await apiRequest(_0x9c6b23(0x16a),{'method':_0x9c6b23(0x163),'body':{'appCode':_0xe4db69,..._0x1c2fa9?.[_0x9c6b23(0x171)]&&{'code':_0x1c2fa9[_0x9c6b23(0x171)]},..._0x1c2fa9?.[_0x9c6b23(0x16f)]&&{'name':_0x1c2fa9['name']}}});return extractList(_0xff802f[_0x9c6b23(0x161)]);}export async function getDatasetDetail(_0x11e639){const _0x5a16f0=a32_0x29e3,_0x1a053c=/^\d+$/[_0x5a16f0(0x15c)](_0x11e639)?'id':_0x5a16f0(0x171),_0x2b03b9=await apiRequest(_0x5a16f0(0x165)+_0x1a053c+'='+_0x11e639);return _0x2b03b9[_0x5a16f0(0x161)];}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a33_0x46fb(_0x50750c,_0x41bc4e){_0x50750c=_0x50750c-0x1b2;const _0x518c88=a33_0x518c();let _0x46fbd0=_0x518c88[_0x50750c];return _0x46fbd0;}(function(_0x11e7b5,_0x246991){const _0x272f67=a33_0x46fb,_0x54c139=_0x11e7b5();while(!![]){try{const _0x4fdf2e=-parseInt(_0x272f67(0x1b4))/0x1+parseInt(_0x272f67(0x1b5))/0x2*(parseInt(_0x272f67(0x1b8))/0x3)+parseInt(_0x272f67(0x1b2))/0x4+-parseInt(_0x272f67(0x1c2))/0x5+-parseInt(_0x272f67(0x1b7))/0x6*(parseInt(_0x272f67(0x1bd))/0x7)+parseInt(_0x272f67(0x1be))/0x8*(-parseInt(_0x272f67(0x1bf))/0x9)+parseInt(_0x272f67(0x1c1))/0xa*(parseInt(_0x272f67(0x1c5))/0xb);if(_0x4fdf2e===_0x246991)break;else _0x54c139['push'](_0x54c139['shift']());}catch(_0x1ed5a7){_0x54c139['push'](_0x54c139['shift']());}}}(a33_0x518c,0x70bee));import{listDatasets}from'./api-client.js';const cache=new Map();export async function listDatabases(_0x163060){const _0xff8285=a33_0x46fb;if(cache[_0xff8285(0x1b9)](_0x163060))return cache['get'](_0x163060);const _0x588934=await listDatasets(_0x163060),_0x240836=new Map();for(const _0x5e7c7d of _0x588934){const _0xe5c5ea=_0x5e7c7d[_0xff8285(0x1c4)];_0xe5c5ea?.[_0xff8285(0x1bb)]!=null&&_0x240836[_0xff8285(0x1b6)](_0xe5c5ea['dbId'],_0xe5c5ea[_0xff8285(0x1b3)]??_0xff8285(0x1ba)+_0xe5c5ea[_0xff8285(0x1bb)]);}const _0x391dc8=[..._0x240836[_0xff8285(0x1bc)]()][_0xff8285(0x1c3)](([_0x48f696,_0x186129])=>({'dbId':_0x48f696,'dbName':_0x186129}));return cache[_0xff8285(0x1b6)](_0x163060,_0x391dc8),_0x391dc8;}function a33_0x518c(){const _0x257c54=['has','db-','dbId','entries','4407410ncWRdy','7293512ShdmyQ','9QEAuLD','find','790HLTSBW','3142185HtfptN','map','dbtableConfig','130768SKPpOD','3226364CRPGac','dbName','13144xIMpGV','138302QqwosE','set','6XFWrbM','39MnGYHn'];a33_0x518c=function(){return _0x257c54;};return a33_0x518c();}export async function getDbName(_0x30a693,_0x413bd2){const _0x211fb5=a33_0x46fb,_0x412b2d=await listDatabases(_0x30a693);return _0x412b2d[_0x211fb5(0x1c0)](_0x1cca09=>_0x1cca09['dbId']===_0x413bd2)?.[_0x211fb5(0x1b3)];}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a34_0x36f5(){const _0x5698ab=['accessKey','update','Available:\x20filter,\x20getOne,\x20create,\x20update,\x20delete,\x20aggregate.','production','8955798ApSVdt','dataset_','4304144owFraU','1424253OZsjkl','5BcJcbz','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','delete','\x22.\x20','appCode','sql','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','7925771wjggQV','1215zrjyro','online','133020epkmqn','daily','cookie','env','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','execute','secretKey','8MeGJbM','bff','65177SnrANV','6455218ogxvXj','2xDgDBt','getOne'];a34_0x36f5=function(){return _0x5698ab;};return a34_0x36f5();}(function(_0x23224a,_0x5de8be){const _0x5b4137=a34_0x5a19,_0x603d6e=_0x23224a();while(!![]){try{const _0x4e78e4=-parseInt(_0x5b4137(0x140))/0x1+parseInt(_0x5b4137(0x142))/0x2*(parseInt(_0x5b4137(0x14b))/0x3)+-parseInt(_0x5b4137(0x14a))/0x4+-parseInt(_0x5b4137(0x14c))/0x5*(-parseInt(_0x5b4137(0x148))/0x6)+-parseInt(_0x5b4137(0x134))/0x7*(parseInt(_0x5b4137(0x13e))/0x8)+parseInt(_0x5b4137(0x135))/0x9*(parseInt(_0x5b4137(0x137))/0xa)+-parseInt(_0x5b4137(0x141))/0xb;if(_0x4e78e4===_0x5de8be)break;else _0x603d6e['push'](_0x603d6e['shift']());}catch(_0x116e09){_0x603d6e['push'](_0x603d6e['shift']());}}}(a34_0x36f5,0xdc6c2));import{createClient}from'@lovrabet/sdk';let _client;export function initSdkClient(_0x11873c){const _0x48accc=a34_0x5a19,_0x442f0d=_0x11873c[_0x48accc(0x13a)]===_0x48accc(0x147)?_0x48accc(0x136):_0x48accc(0x138),_0x5b7c87=!!(_0x11873c[_0x48accc(0x144)]&&_0x11873c['secretKey']);_client=createClient({'appCode':_0x11873c[_0x48accc(0x131)],'env':_0x442f0d,..._0x5b7c87?{'accessKey':_0x11873c[_0x48accc(0x144)],'secretKey':_0x11873c[_0x48accc(0x13d)]}:{},...!_0x5b7c87&&_0x11873c['cookie']?{'cookie':_0x11873c[_0x48accc(0x139)]}:{},'options':{'timeout':0x7530}});}function ensureClient(){const _0x33c1c4=a34_0x5a19;if(!_client)throw new Error(_0x33c1c4(0x133));return _client;}function a34_0x5a19(_0x2e208a,_0x9ffee1){_0x2e208a=_0x2e208a-0x12e;const _0x36f55=a34_0x36f5();let _0x5a1948=_0x36f55[_0x2e208a];return _0x5a1948;}export async function executeData(_0x3cf01b,_0xd1e99b,_0xa89f8d){const _0x5b3c32=a34_0x5a19,_0x5c7a4f=ensureClient(),_0x5b1f0e=_0x5b3c32(0x149)+_0x3cf01b,_0x499d3b=_0x5c7a4f['models'][_0x5b1f0e];if(!_0x499d3b||typeof _0x499d3b[_0xd1e99b]!=='function')throw new Error(_0x5b3c32(0x13b)+_0xd1e99b+_0x5b3c32(0x130)+_0x5b3c32(0x146));const _0x28d160=_0xa89f8d??{};switch(_0xd1e99b){case'getOne':{const _0x23ed49=_0x28d160['id'];if(_0x23ed49===undefined||_0x23ed49===null)throw new Error('getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x499d3b[_0x5b3c32(0x143)](_0x23ed49);}case'update':{const {id:_0x474603,..._0x4341ab}=_0x28d160;if(_0x474603===undefined||_0x474603===null)throw new Error(_0x5b3c32(0x12e));return _0x499d3b[_0x5b3c32(0x145)](_0x474603,_0x4341ab);}case'delete':{const _0x36335c=_0x28d160['id'];if(_0x36335c===undefined||_0x36335c===null)throw new Error('delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x499d3b[_0x5b3c32(0x12f)](_0x36335c);}default:return _0x499d3b[_0xd1e99b](_0x28d160);}}export async function executeSdkSql(_0x78272c,_0x506bfe){const _0x367725=a34_0x5a19,_0x476535=ensureClient();return _0x476535[_0x367725(0x132)][_0x367725(0x13c)]({'sqlCode':_0x78272c,'params':_0x506bfe});}export async function executeSdkBff(_0x401143,_0x41b127){const _0x255e67=a34_0x5a19,_0x44cd2e=ensureClient();return _0x44cd2e[_0x255e67(0x13f)][_0x255e67(0x13c)]({'scriptName':_0x401143,'params':_0x41b127});}
|
package/lib/errors.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a35_0xc590(){const _0x3e049a=['935144HFowIw','Operation\x20cancelled.','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20.lovrabet.json\x20file.','2nDDhIm','631050ILJtIU','name','exitCode','not_in_project','1422471Clylsb','auth_required','1061430XqNNti','81CwLIVM','274944ZbbHHY','unknown_command','501755RFHcNV','105UCqeQj','network_error','validation_error','config_missing','cancelled','api_error','\x20auth`\x20to\x20login\x20first.','code','Unknown\x20command:\x20','Configuration\x20file\x20not\x20found','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','hint','Set\x20appcode\x20via\x20--appcode\x20or\x20.lovrabet.json.','Run\x20`','831876olaQvu'];a35_0xc590=function(){return _0x3e049a;};return a35_0xc590();}function a35_0x22ef(_0x3b06d1,_0x2c38f0){_0x3b06d1=_0x3b06d1-0x11f;const _0xc590be=a35_0xc590();let _0x22eff2=_0xc590be[_0x3b06d1];return _0x22eff2;}const a35_0x45b743=a35_0x22ef;(function(_0x3769e7,_0x1780d7){const _0x4401a9=a35_0x22ef,_0x34a479=_0x3769e7();while(!![]){try{const _0x309e65=parseInt(_0x4401a9(0x135))/0x1+parseInt(_0x4401a9(0x12c))/0x2*(-parseInt(_0x4401a9(0x131))/0x3)+parseInt(_0x4401a9(0x128))/0x4+-parseInt(_0x4401a9(0x137))/0x5+-parseInt(_0x4401a9(0x133))/0x6+parseInt(_0x4401a9(0x138))/0x7*(parseInt(_0x4401a9(0x129))/0x8)+-parseInt(_0x4401a9(0x134))/0x9*(parseInt(_0x4401a9(0x12d))/0xa);if(_0x309e65===_0x1780d7)break;else _0x34a479['push'](_0x34a479['shift']());}catch(_0x3a30db){_0x34a479['push'](_0x34a479['shift']());}}}(a35_0xc590,0xdfdd6));import{CLI_BIN_NAME}from'./constant/cli.js';export class CliError extends Error{[a35_0x45b743(0x121)];['exitCode'];[a35_0x45b743(0x125)];constructor(_0x4097d0,_0x4edc30,_0x516ff3,_0x54e21d){const _0x145be0=a35_0x45b743;super(_0x516ff3),this[_0x145be0(0x12e)]='CliError',this['code']=_0x4097d0,this[_0x145be0(0x12f)]=_0x4edc30,this['hint']=_0x54e21d;}}export const CliErrors={'authRequired':_0x5d7610=>new CliError(a35_0x45b743(0x132),0x1,'Authentication\x20required',_0x5d7610??a35_0x45b743(0x127)+CLI_BIN_NAME+a35_0x45b743(0x120)),'configMissing':_0x5f07a5=>new CliError(a35_0x45b743(0x13b),0x1,a35_0x45b743(0x123),_0x5f07a5??a35_0x45b743(0x126)),'notInProject':()=>new CliError(a35_0x45b743(0x130),0x1,'Not\x20in\x20a\x20'+CLI_BIN_NAME+'\x20project\x20directory',a35_0x45b743(0x12b)),'apiError':(_0x38d88e,_0x313ec8)=>new CliError(a35_0x45b743(0x11f),0x2,_0x38d88e,_0x313ec8),'networkError':_0x2e8310=>new CliError(a35_0x45b743(0x139),0x2,'Network\x20error:\x20'+_0x2e8310,a35_0x45b743(0x124)),'unknownCommand':_0x2e69f2=>new CliError(a35_0x45b743(0x136),0x1,a35_0x45b743(0x122)+_0x2e69f2,a35_0x45b743(0x127)+CLI_BIN_NAME+'\x20--help`\x20to\x20see\x20available\x20commands.'),'flagMissing':(_0x472b22,_0xfd9f59)=>new CliError('flag_missing',0x1,'Missing\x20required\x20flag:\x20--'+_0x472b22,_0xfd9f59),'validation':(_0x320ed3,_0xd66b9e)=>new CliError(a35_0x45b743(0x13a),0x1,_0x320ed3,_0xd66b9e),'cancelled':_0x1924e7=>new CliError(a35_0x45b743(0x13c),0x0,_0x1924e7??a35_0x45b743(0x12a),undefined)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a36_0x5adf(){const _0x1a21c9=['2102550bdqoKl','description','68830tvaBZO','5vCWYFF','428276bhtWbx','117FwLMzk','130337JvLKjd','2346WjKSjH','2365320ePWfmv','896RAENzH','1538964qgHFVu'];a36_0x5adf=function(){return _0x1a21c9;};return a36_0x5adf();}function a36_0x3496(_0xbf3fcc,_0x11464f){_0xbf3fcc=_0xbf3fcc-0x15d;const _0x5adf81=a36_0x5adf();let _0x349616=_0x5adf81[_0xbf3fcc];return _0x349616;}(function(_0xb9a661,_0x296963){const _0x3ec02f=a36_0x3496,_0x18c365=_0xb9a661();while(!![]){try{const _0x161075=-parseInt(_0x3ec02f(0x166))/0x1+parseInt(_0x3ec02f(0x164))/0x2+-parseInt(_0x3ec02f(0x167))/0x3*(-parseInt(_0x3ec02f(0x15e))/0x4)+parseInt(_0x3ec02f(0x163))/0x5*(parseInt(_0x3ec02f(0x160))/0x6)+-parseInt(_0x3ec02f(0x15f))/0x7+-parseInt(_0x3ec02f(0x15d))/0x8+-parseInt(_0x3ec02f(0x165))/0x9*(-parseInt(_0x3ec02f(0x162))/0xa);if(_0x161075===_0x296963)break;else _0x18c365['push'](_0x18c365['shift']());}catch(_0x12fe53){_0x18c365['push'](_0x18c365['shift']());}}}(a36_0x5adf,0x2cc3c));export function dryRun(_0x3d84c1,_0x46bc18){const _0x3e2efe={'method':_0x3d84c1,'url':_0x46bc18},_0x3c789e={'body'(_0xe718e7){return _0x3e2efe['body']=_0xe718e7,_0x3c789e;},'description'(_0x1cf5f3){const _0x3da53b=a36_0x3496;return _0x3e2efe[_0x3da53b(0x161)]=_0x1cf5f3,_0x3c789e;},'build'(){return{..._0x3e2efe};}};return _0x3c789e;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x53223d,_0x45421f){const _0x421aaf=a37_0x3589,_0x3ae356=_0x53223d();while(!![]){try{const _0xc3ddef=parseInt(_0x421aaf(0x1db))/0x1*(-parseInt(_0x421aaf(0x1c8))/0x2)+-parseInt(_0x421aaf(0x1d9))/0x3*(-parseInt(_0x421aaf(0x1c2))/0x4)+parseInt(_0x421aaf(0x1cf))/0x5+-parseInt(_0x421aaf(0x1be))/0x6*(-parseInt(_0x421aaf(0x1c7))/0x7)+-parseInt(_0x421aaf(0x1d5))/0x8*(-parseInt(_0x421aaf(0x1c3))/0x9)+parseInt(_0x421aaf(0x1de))/0xa*(parseInt(_0x421aaf(0x1da))/0xb)+-parseInt(_0x421aaf(0x1cb))/0xc*(parseInt(_0x421aaf(0x1d2))/0xd);if(_0xc3ddef===_0x45421f)break;else _0x3ae356['push'](_0x3ae356['shift']());}catch(_0x11362a){_0x3ae356['push'](_0x3ae356['shift']());}}}(a37_0x56c2,0xb5a9c));import{CliErrors}from'../errors.js';export function parseFlags(_0xd234e3,_0x4c1616){const _0x4759c9=a37_0x3589,_0x23a821={};for(const _0x3b02db of _0xd234e3){const _0x56c176=_0x4c1616[_0x3b02db[_0x4759c9(0x1c1)]]??_0x4c1616[toCamelCase(_0x3b02db[_0x4759c9(0x1c1)])];if(_0x56c176===undefined||_0x56c176===null){_0x3b02db[_0x4759c9(0x1d1)]!==undefined&&(_0x23a821[_0x3b02db[_0x4759c9(0x1c1)]]=_0x3b02db[_0x4759c9(0x1d1)]);continue;}_0x23a821[_0x3b02db[_0x4759c9(0x1c1)]]=coerce(_0x3b02db,_0x56c176);}for(const _0x4d1c12 of['dry-run',_0x4759c9(0x1ce),'yes',_0x4759c9(0x1c5)]){const _0x11ecf2=_0x4c1616[_0x4d1c12];if(_0x11ecf2!==undefined){const _0x550675=_0x4d1c12==='dryRun'?_0x4759c9(0x1dc):_0x4d1c12;_0x23a821[_0x550675]=_0x11ecf2;}}return _0x23a821;}export function validateFlags(_0x1e6459,_0x13b209,_0x21c102){const _0xfef203=a37_0x3589;for(const _0x4da5f3 of _0x1e6459){const _0x3e9e2f=_0x13b209[_0x4da5f3[_0xfef203(0x1c1)]];if(_0x4da5f3['required']&&(_0x3e9e2f===undefined||_0x3e9e2f===''))throw CliErrors['flagMissing'](_0x4da5f3[_0xfef203(0x1c1)],'--'+_0x4da5f3['name']+_0xfef203(0x1cd)+_0x21c102+'`.');if(_0x4da5f3[_0xfef203(0x1d6)]&&_0x4da5f3[_0xfef203(0x1d6)][_0xfef203(0x1d8)]>0x0&&_0x3e9e2f!==undefined&&_0x3e9e2f!==''){if(!_0x4da5f3[_0xfef203(0x1d6)][_0xfef203(0x1bf)](String(_0x3e9e2f)))throw CliErrors['validation']('Invalid\x20value\x20\x22'+_0x3e9e2f+_0xfef203(0x1d7)+_0x4da5f3[_0xfef203(0x1c1)]+_0xfef203(0x1d4)+_0x4da5f3['enum'][_0xfef203(0x1ca)](',\x20'));}if(_0x4da5f3[_0xfef203(0x1cc)]&&_0x3e9e2f!==undefined&&_0x3e9e2f!==''){if(!_0x4da5f3['pattern'][_0xfef203(0x1d3)][_0xfef203(0x1c4)](String(_0x3e9e2f)))throw CliErrors[_0xfef203(0x1d0)]('Invalid\x20--'+_0x4da5f3[_0xfef203(0x1c1)]+_0xfef203(0x1df)+_0x4da5f3[_0xfef203(0x1cc)][_0xfef203(0x1c0)]+_0xfef203(0x1c6)+_0x3e9e2f+'\x22.');}}}function coerce(_0x3bd661,_0x35e967){const _0x2f93f4=a37_0x3589;switch(_0x3bd661['type']){case _0x2f93f4(0x1dd):return _0x35e967===!![]||_0x35e967==='true';case _0x2f93f4(0x1c9):{const _0x3b6728=Number(_0x35e967);if(isNaN(_0x3b6728))throw CliErrors[_0x2f93f4(0x1d0)]('--'+_0x3bd661['name']+'\x20expects\x20a\x20number,\x20got\x20\x22'+_0x35e967+'\x22');return _0x3b6728;}default:return String(_0x35e967);}}function toCamelCase(_0x190d1d){return _0x190d1d['replace'](/-([a-z])/g,(_0x4f47b0,_0x5a5ad2)=>_0x5a5ad2['toUpperCase']());}function a37_0x3589(_0x38879e,_0x39d240){_0x38879e=_0x38879e-0x1be;const _0x56c256=a37_0x56c2();let _0x3589ea=_0x56c256[_0x38879e];return _0x3589ea;}function a37_0x56c2(){const _0x14f6ec=['11jpjJME','46149xYOrCl','dry-run','boolean','13806430QHSwDE',':\x20expected\x20','492lPzeLy','includes','description','name','2793872UZYdVI','127989LUuVHQ','test','format',',\x20got\x20\x22','34118ZOBHgC','24CpNhsz','number','join','564iaXuKH','pattern','\x20is\x20required\x20for\x20`','dryRun','3685490bnTiCX','validation','default','876655ROmTIS','regex','.\x20Allowed:\x20','704alLGGj','enum','\x22\x20for\x20--','length','3qwwSkn'];a37_0x56c2=function(){return _0x14f6ec;};return a37_0x56c2();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x556109,_0x163043){const _0x1a52ff=a38_0x311f,_0x3e9891=_0x556109();while(!![]){try{const _0x1348c2=parseInt(_0x1a52ff(0x139))/0x1+parseInt(_0x1a52ff(0x128))/0x2+-parseInt(_0x1a52ff(0x11c))/0x3*(-parseInt(_0x1a52ff(0x101))/0x4)+-parseInt(_0x1a52ff(0x11f))/0x5+-parseInt(_0x1a52ff(0x100))/0x6*(parseInt(_0x1a52ff(0x145))/0x7)+-parseInt(_0x1a52ff(0x106))/0x8*(-parseInt(_0x1a52ff(0x12d))/0x9)+parseInt(_0x1a52ff(0x134))/0xa*(-parseInt(_0x1a52ff(0x137))/0xb);if(_0x1348c2===_0x163043)break;else _0x3e9891['push'](_0x3e9891['shift']());}catch(_0x16ebb3){_0x3e9891['push'](_0x3e9891['shift']());}}}(a38_0x2cbe,0x89c4f));import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a38_0x311f(_0x1d15f6,_0x441e71){_0x1d15f6=_0x1d15f6-0xff;const _0x2cbe7e=a38_0x2cbe();let _0x311f3b=_0x2cbe7e[_0x1d15f6];return _0x311f3b;}export function generateCommandHelp(_0x17c0b2){const _0x350909=a38_0x311f,_0x3fb161=[],_0x1ba70e=CLI_BIN_NAME+'\x20'+_0x17c0b2[_0x350909(0x117)]+'\x20'+_0x17c0b2[_0x350909(0x13a)],_0x8d3e5f=_0x17c0b2[_0x350909(0x141)]?_0x17c0b2[_0x350909(0x141)][_0x350909(0x120)](_0x10a0cc=>_0x10a0cc[_0x350909(0x131)]!==![]?'<'+_0x10a0cc[_0x350909(0x10c)]+'>':'['+_0x10a0cc[_0x350909(0x10c)]+']')[_0x350909(0x12e)]('\x20'):'',_0x3856b3=_0x8d3e5f?_0x1ba70e+'\x20'+_0x8d3e5f+'\x20[flags]':_0x1ba70e+_0x350909(0x11a);_0x3fb161[_0x350909(0x13c)](''),_0x3fb161[_0x350909(0x13c)]('\x20\x20'+_0x17c0b2[_0x350909(0x135)]),_0x3fb161[_0x350909(0x13c)](''),_0x3fb161[_0x350909(0x13c)](_0x350909(0x122)),_0x3fb161[_0x350909(0x13c)](_0x350909(0xff)+_0x3856b3),_0x3fb161['push'](''),_0x3fb161[_0x350909(0x13c)](_0x350909(0x13d)+_0x17c0b2[_0x350909(0x10d)]);_0x17c0b2[_0x350909(0x10d)]===_0x350909(0x109)&&_0x3fb161[_0x350909(0x13c)]('\x20\x20\x20\x20Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.');_0x3fb161[_0x350909(0x13c)]('');if(_0x17c0b2[_0x350909(0x141)]&&_0x17c0b2['args'][_0x350909(0x138)]>0x0){_0x3fb161['push']('\x20\x20ARGS');const _0x3e3536=Math[_0x350909(0x132)](..._0x17c0b2[_0x350909(0x141)][_0x350909(0x120)](_0x1cc6c5=>_0x1cc6c5[_0x350909(0x10c)][_0x350909(0x138)]+0x2));for(const _0x59eb9d of _0x17c0b2[_0x350909(0x141)]){const _0xb4e45d=('<'+_0x59eb9d[_0x350909(0x10c)]+'>')['padEnd'](_0x3e3536+0x2),_0x1bbf28=_0x59eb9d[_0x350909(0x131)]!==![]?_0x350909(0x124):'';_0x3fb161['push'](_0x350909(0xff)+_0xb4e45d+_0x59eb9d['description']+_0x1bbf28);}_0x3fb161[_0x350909(0x13c)]('');}if(_0x17c0b2[_0x350909(0x114)][_0x350909(0x138)]>0x0||_0x17c0b2[_0x350909(0x147)]||_0x17c0b2['hasFormat']!==![]){_0x3fb161[_0x350909(0x13c)](_0x350909(0x110));const _0x466b3b=buildAllFlags(_0x17c0b2),_0x58cd4f=Math[_0x350909(0x132)](..._0x466b3b[_0x350909(0x120)](_0x28cdb4=>formatFlagName(_0x28cdb4)[_0x350909(0x138)]));for(const _0x296878 of _0x466b3b){const _0x4c0735=formatFlagName(_0x296878)[_0x350909(0x11b)](_0x58cd4f+0x2);_0x3fb161[_0x350909(0x13c)](_0x350909(0xff)+_0x4c0735+renderFlagDesc(_0x296878));}_0x3fb161[_0x350909(0x13c)]('');}_0x17c0b2['helpExtra']&&(_0x3fb161[_0x350909(0x13c)](_0x17c0b2[_0x350909(0x133)]),_0x3fb161['push'](''));const _0xf4ec18=[];_0x17c0b2[_0x350909(0x13e)]!==![]&&_0xf4ec18[_0x350909(0x13c)](_0x350909(0x111)+CLI_BIN_NAME+_0x350909(0x146));_0x17c0b2[_0x350909(0x125)]!==![]&&_0xf4ec18[_0x350909(0x13c)](_0x350909(0x13b));if(_0xf4ec18['length']>0x0){_0x3fb161['push'](_0x350909(0x118));for(const _0x343bb4 of _0xf4ec18){_0x3fb161[_0x350909(0x13c)](_0x350909(0x126)+_0x343bb4);}_0x3fb161[_0x350909(0x13c)]('');}return _0x3fb161['join']('\x0a');}export function generateServiceHelp(_0xf61e4c){const _0x2dd73c=a38_0x311f,_0x10ab7a=getServiceEntry(_0xf61e4c);if(!_0x10ab7a)return _0x2dd73c(0x107)+_0xf61e4c+'\x0a';const _0x3ba3cd=[];_0x3ba3cd[_0x2dd73c(0x13c)](''),_0x3ba3cd[_0x2dd73c(0x13c)]('\x20\x20'+_0x10ab7a[_0x2dd73c(0x11e)]),_0x3ba3cd[_0x2dd73c(0x13c)](''),_0x3ba3cd['push'](_0x2dd73c(0x122)),_0x3ba3cd[_0x2dd73c(0x13c)](_0x2dd73c(0xff)+CLI_BIN_NAME+'\x20'+_0xf61e4c+'\x20<command>\x20[flags]'),_0x3ba3cd[_0x2dd73c(0x13c)](''),_0x3ba3cd['push']('\x20\x20COMMANDS');const _0x5639fc=serviceGroups['get'](_0xf61e4c);for(const _0x5b211f of _0x10ab7a[_0x2dd73c(0x144)]){_0x3ba3cd[_0x2dd73c(0x13c)]('');const _0x4e3605=_0x5b211f['tag']?'\x20\x20'+_0x5b211f[_0x2dd73c(0x10e)][_0x2dd73c(0x127)]():'';_0x3ba3cd[_0x2dd73c(0x13c)]('\x20\x20\x20\x20'+_0x5b211f[_0x2dd73c(0x13a)]+_0x4e3605),_0x3ba3cd[_0x2dd73c(0x13c)](_0x2dd73c(0x113)+_0x5b211f[_0x2dd73c(0x135)]);const _0x35bfc8=_0x5639fc?.['find'](_0x494345=>_0x494345[_0x2dd73c(0x13a)]===_0x5b211f[_0x2dd73c(0x13a)]);if(_0x35bfc8?.['args']&&_0x35bfc8[_0x2dd73c(0x141)][_0x2dd73c(0x138)]>0x0){_0x3ba3cd[_0x2dd73c(0x13c)]('\x20\x20\x20\x20\x20\x20ARGS');const _0x44a280=Math['max'](..._0x35bfc8[_0x2dd73c(0x141)][_0x2dd73c(0x120)](_0x1cb6ec=>_0x1cb6ec['name']['length']+0x2));for(const _0x3636fa of _0x35bfc8[_0x2dd73c(0x141)]){const _0x51c3f4=('<'+_0x3636fa[_0x2dd73c(0x10c)]+'>')['padEnd'](_0x44a280+0x2),_0x2d1653=_0x3636fa[_0x2dd73c(0x131)]!==![]?_0x2dd73c(0x124):'';_0x3ba3cd['push'](_0x2dd73c(0x143)+_0x51c3f4+_0x3636fa[_0x2dd73c(0x135)]+_0x2d1653);}}const _0x45a1b0=_0x35bfc8?buildAllFlags(_0x35bfc8):[];if(_0x45a1b0['length']>0x0){const _0x51ab2a=Math[_0x2dd73c(0x132)](..._0x45a1b0[_0x2dd73c(0x120)](_0xc0a3aa=>formatFlagName(_0xc0a3aa)[_0x2dd73c(0x138)]));for(const _0xdbec79 of _0x45a1b0){const _0x4e016e=formatFlagName(_0xdbec79)[_0x2dd73c(0x11b)](_0x51ab2a+0x2);_0x3ba3cd[_0x2dd73c(0x13c)](_0x2dd73c(0x113)+_0x4e016e+renderFlagDesc(_0xdbec79));}}}return _0x3ba3cd[_0x2dd73c(0x13c)](''),_0x3ba3cd[_0x2dd73c(0x12e)]('\x0a');}export function generateFullHelp(){const _0x3d0716=a38_0x311f,_0x343f49=[];_0x343f49['push'](''),_0x343f49[_0x3d0716(0x13c)]('\x20\x20'+CLI_DISPLAY_NAME),_0x343f49[_0x3d0716(0x13c)](''),_0x343f49['push']('\x20\x20USAGE'),_0x343f49['push'](_0x3d0716(0x12f)+CLI_BIN_NAME+_0x3d0716(0x115)),_0x343f49[_0x3d0716(0x13c)](''),_0x343f49[_0x3d0716(0x13c)](_0x3d0716(0x119));const _0x301ae0=GLOBAL_FLAGS[_0x3d0716(0x11d)](_0x49eb21=>!_0x49eb21['hidden']),_0xad30d0=Math[_0x3d0716(0x132)](..._0x301ae0[_0x3d0716(0x120)](_0x4717f7=>{const _0x34f47e=_0x3d0716,_0x3e25ec=_0x4717f7[_0x34f47e(0x102)]?'\x20'+_0x4717f7[_0x34f47e(0x102)]:'';return('--'+_0x4717f7['name']+_0x3e25ec)[_0x34f47e(0x138)];}));for(const _0x82a41b of _0x301ae0){const _0x14522d=_0x82a41b[_0x3d0716(0x102)]?'\x20'+_0x82a41b[_0x3d0716(0x102)]:'',_0x394587=('--'+_0x82a41b[_0x3d0716(0x10c)]+_0x14522d)['padEnd'](_0xad30d0+0x2);_0x343f49[_0x3d0716(0x13c)](_0x3d0716(0xff)+_0x394587+_0x82a41b[_0x3d0716(0x135)]);}_0x343f49['push'](''),_0x343f49[_0x3d0716(0x13c)](_0x3d0716(0x12a)),_0x343f49['push']('');for(const _0x1268ae of serviceRegistry){_0x343f49[_0x3d0716(0x13c)]('\x20\x20'+_0x1268ae['label']);const _0x425085=_0x1268ae[_0x3d0716(0x144)][_0x3d0716(0x120)](_0xdb73b1=>_0x1268ae['service']+'\x20'+_0xdb73b1[_0x3d0716(0x13a)]),_0x495e70=Math['max'](..._0x425085['map'](_0x3f2a66=>_0x3f2a66[_0x3d0716(0x138)]));for(let _0x2a36f1=0x0;_0x2a36f1<_0x1268ae[_0x3d0716(0x144)]['length'];_0x2a36f1++){const _0x1bf076=_0x1268ae['commands'][_0x2a36f1],_0x52a07f=_0x1bf076[_0x3d0716(0x10e)]??'';_0x343f49[_0x3d0716(0x13c)](_0x3d0716(0xff)+_0x425085[_0x2a36f1][_0x3d0716(0x11b)](_0x495e70+0x2)+_0x1bf076[_0x3d0716(0x135)]+_0x52a07f);}_0x343f49[_0x3d0716(0x13c)]('');}return _0x343f49['push'](_0x3d0716(0x136)+CLI_BIN_NAME+_0x3d0716(0x12b)),_0x343f49[_0x3d0716(0x13c)](_0x3d0716(0x136)+CLI_BIN_NAME+_0x3d0716(0x121)),_0x343f49[_0x3d0716(0x13c)](''),_0x343f49[_0x3d0716(0x12e)]('\x0a');}function a38_0x2cbe(){const _0x40dbfc=['\x20\x20Run\x20`','1804LVIrHv','length','104170nzfwvS','command','Requires\x20appcode\x20(set\x20via\x20.lovrabet.json\x20or\x20--appcode).','push','\x20\x20RISK:\x20','requiresAuth','\x20[default:\x20','Output\x20format','args','Skip\x20confirmation\x20prompt','\x20\x20\x20\x20\x20\x20\x20\x20','commands','28DxaXUk','\x20auth`\x20first).','dryRun','\x20\x20\x20\x20','685452fjoWjy','379884rWYguS','hint','type','\x20<value>','dry-run','2824IfBWli','\x20\x20Unknown\x20service:\x20','enum','high-risk-write','boolean','format','name','risk','tag','string','\x20\x20FLAGS','Requires\x20authentication\x20(run\x20`','(required)','\x20\x20\x20\x20\x20\x20','flags','\x20[global-options]\x20<service>\x20<command>\x20[flags]','hasFormat','service','\x20\x20PREREQUISITES','\x20\x20GLOBAL\x20OPTIONS','\x20[flags]','padEnd','6jQapbd','filter','label','218745AzWgCL','map','\x20<service>\x20<command>\x20--help`\x20for\x20command\x20flags.','\x20\x20USAGE','yes','\x20(required)','requiresAppCode','\x20\x20\x20\x20•\x20','trim','1241358kimtdY','Preview\x20the\x20operation\x20without\x20executing','\x20\x20COMMANDS','\x20<service>\x20--help`\x20for\x20service\x20commands.','includes','26865lhRTLK','join','\x20\x20\x20\x20$\x20','default','required','max','helpExtra','55090Zveyfh','description'];a38_0x2cbe=function(){return _0x40dbfc;};return a38_0x2cbe();}function buildAllFlags(_0x317fda){const _0xdc6b55=a38_0x311f,_0x1c294d=[..._0x317fda['flags']];return _0x317fda[_0xdc6b55(0x147)]&&_0x1c294d[_0xdc6b55(0x13c)]({'name':_0xdc6b55(0x105),'type':_0xdc6b55(0x10a),'description':_0xdc6b55(0x129)}),_0x317fda[_0xdc6b55(0x116)]!==![]&&_0x1c294d[_0xdc6b55(0x13c)]({'name':_0xdc6b55(0x10b),'type':_0xdc6b55(0x10f),'default':'json','enum':['json','pretty','table'],'description':_0xdc6b55(0x140)}),_0x317fda[_0xdc6b55(0x10d)]===_0xdc6b55(0x109)&&_0x1c294d['push']({'name':_0xdc6b55(0x123),'type':_0xdc6b55(0x10a),'description':_0xdc6b55(0x142)}),_0x1c294d;}function formatFlagName(_0x4fe7d5){const _0x1e85ef=a38_0x311f,_0x241c7c=_0x4fe7d5[_0x1e85ef(0x103)]===_0x1e85ef(0x10a)?'':_0x4fe7d5[_0x1e85ef(0x103)]==='number'?'\x20<n>':_0x1e85ef(0x104);return'--'+_0x4fe7d5[_0x1e85ef(0x10c)]+_0x241c7c;}function renderFlagDesc(_0xce8832){const _0x87f5cf=a38_0x311f;let _0x382c3d=_0xce8832['description'];return _0xce8832[_0x87f5cf(0x108)]&&_0xce8832['enum']['length']>0x0&&(_0x382c3d+='\x20('+_0xce8832['enum']['join']('\x20|\x20')+')'),_0xce8832[_0x87f5cf(0x130)]!==undefined&&_0xce8832[_0x87f5cf(0x130)]!==''&&_0xce8832['default']!==![]&&(_0x382c3d+=_0x87f5cf(0x13f)+_0xce8832[_0x87f5cf(0x130)]+']'),_0xce8832[_0x87f5cf(0x131)]&&!_0x382c3d[_0x87f5cf(0x12c)](_0x87f5cf(0x112))&&(_0x382c3d+='\x20(required)'),_0x382c3d;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x6c69bc,_0xe974b9){var _0x165eaf=a39_0x1d87,_0x75da07=_0x6c69bc();while(!![]){try{var _0x38236c=-parseInt(_0x165eaf(0xea))/0x1*(parseInt(_0x165eaf(0xe7))/0x2)+parseInt(_0x165eaf(0xeb))/0x3*(-parseInt(_0x165eaf(0xe2))/0x4)+-parseInt(_0x165eaf(0xe3))/0x5+parseInt(_0x165eaf(0xe5))/0x6+-parseInt(_0x165eaf(0xe4))/0x7*(parseInt(_0x165eaf(0xe9))/0x8)+parseInt(_0x165eaf(0xe6))/0x9+parseInt(_0x165eaf(0xe8))/0xa*(parseInt(_0x165eaf(0xe1))/0xb);if(_0x38236c===_0xe974b9)break;else _0x75da07['push'](_0x75da07['shift']());}catch(_0x10e257){_0x75da07['push'](_0x75da07['shift']());}}}(a39_0x2c9c,0xca53d));export{runCommand}from'./runner.js';export{parseFlags,validateFlags}from'./flags.js';function a39_0x1d87(_0x3555c0,_0x3c52af){_0x3555c0=_0x3555c0-0xe1;var _0x2c9cc7=a39_0x2c9c();var _0x1d879d=_0x2c9cc7[_0x3555c0];return _0x1d879d;}export{formatOutput}from'./output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./help.js';export{extractList,extractPaging}from'./response.js';export{dryRun}from'./dryrun.js';function a39_0x2c9c(){var _0x215abd=['28MnxqXV','5035705qaRnlN','26866mYLiyn','3386388rlWwnz','11523735OtAJOI','1600564JVMswQ','60wtUJMB','40InZsoZ','2ymOKJi','633921BUvDPs','5664934xaKbYb'];a39_0x2c9c=function(){return _0x215abd;};return a39_0x2c9c();}export{riskLevelOrder}from'./types.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x1523b9,_0x5d7b4c){const _0x2e87ab=a40_0x2cc4,_0x26e287=_0x1523b9();while(!![]){try{const _0x5c345d=parseInt(_0x2e87ab(0xd0))/0x1+parseInt(_0x2e87ab(0xd1))/0x2+-parseInt(_0x2e87ab(0xce))/0x3+parseInt(_0x2e87ab(0xe6))/0x4+-parseInt(_0x2e87ab(0xde))/0x5+parseInt(_0x2e87ab(0xe5))/0x6+parseInt(_0x2e87ab(0xdf))/0x7;if(_0x5c345d===_0x5d7b4c)break;else _0x26e287['push'](_0x26e287['shift']());}catch(_0x483d1b){_0x26e287['push'](_0x26e287['shift']());}}}(a40_0x443c,0xa907c));export function formatOutput(_0x5a4de7,_0x8cd3a3){const _0x3fe554=a40_0x2cc4,{format:_0x28f782}=_0x8cd3a3;switch(_0x28f782){case _0x3fe554(0xcf):printJson(_0x5a4de7,_0x8cd3a3);break;case _0x3fe554(0xdc):printTable(_0x5a4de7,_0x8cd3a3);break;case _0x3fe554(0xe7):default:printPretty(_0x5a4de7,_0x8cd3a3);break;}}function a40_0x443c(){const _0x3afcc6=['[dry-run]\x20Would\x20execute:','296112UUtIVZ','json','421073roPKCP','51320mcEFut','message','dryRun','command_error','command','\x20items:\x0a','error','Unknown\x20error','log','write','(empty)','table','Found\x20','5387050NjWNOM','2515786rleSBk','map','repeat','Error:\x20','data','object','827364pttOSE','3697748wqQXdc','pretty','risk','stdout','stringify','entries','padEnd','length','isArray','max','join','keys'];a40_0x443c=function(){return _0x3afcc6;};return a40_0x443c();}function printJson(_0x5b1ae2,_0x396bef){const _0x4aba24=a40_0x2cc4,_0x20fddb={'ok':_0x5b1ae2['ok'],'command':_0x396bef[_0x4aba24(0xd5)],'risk':_0x396bef[_0x4aba24(0xe8)]};if(_0x396bef[_0x4aba24(0xd3)])_0x20fddb[_0x4aba24(0xd3)]=!![];if(_0x5b1ae2[_0x4aba24(0xe3)]!==undefined)_0x20fddb[_0x4aba24(0xe3)]=_0x5b1ae2[_0x4aba24(0xe3)];!_0x5b1ae2['ok']&&_0x5b1ae2[_0x4aba24(0xd2)]&&(_0x20fddb[_0x4aba24(0xd7)]={'code':_0x4aba24(0xd4),'message':_0x5b1ae2[_0x4aba24(0xd2)]}),process[_0x4aba24(0xe9)][_0x4aba24(0xda)](JSON[_0x4aba24(0xc5)](_0x20fddb,null,0x2)+'\x0a');}function printPretty(_0x2b519b,_0x429dca){const _0x5870f4=a40_0x2cc4;if(_0x429dca[_0x5870f4(0xd3)]){console[_0x5870f4(0xd9)](_0x5870f4(0xcd)),console[_0x5870f4(0xd9)](JSON['stringify'](_0x2b519b[_0x5870f4(0xe3)],null,0x2));return;}if(!_0x2b519b['ok']){console[_0x5870f4(0xd7)]('Error:\x20'+(_0x2b519b[_0x5870f4(0xd2)]??_0x5870f4(0xd8)));return;}const _0x156a3a=_0x2b519b['data'];if(_0x156a3a===undefined||_0x156a3a===null){if(_0x2b519b['message'])console['log'](_0x2b519b[_0x5870f4(0xd2)]);return;}if(Array[_0x5870f4(0xc9)](_0x156a3a)){printArrayPretty(_0x156a3a);return;}if(typeof _0x156a3a==='object'){printObjectPretty(_0x156a3a);return;}console[_0x5870f4(0xd9)](String(_0x156a3a));}function printObjectPretty(_0x1f3c07){const _0x5b0270=a40_0x2cc4,_0x17d8bf=Math[_0x5b0270(0xca)](...Object[_0x5b0270(0xcc)](_0x1f3c07)[_0x5b0270(0xe0)](_0x2f5c06=>_0x2f5c06['length']),0x0);for(const [_0x44271b,_0x42b5a6]of Object[_0x5b0270(0xc6)](_0x1f3c07)){if(_0x42b5a6===undefined||_0x42b5a6===null)continue;const _0x1df0d5=_0x44271b[_0x5b0270(0xc7)](_0x17d8bf);typeof _0x42b5a6==='object'?console[_0x5b0270(0xd9)](_0x1df0d5+'\x20\x20'+JSON[_0x5b0270(0xc5)](_0x42b5a6)):console[_0x5b0270(0xd9)](_0x1df0d5+'\x20\x20'+_0x42b5a6);}}function a40_0x2cc4(_0x4c0254,_0x222bfd){_0x4c0254=_0x4c0254-0xc5;const _0x443cd1=a40_0x443c();let _0x2cc480=_0x443cd1[_0x4c0254];return _0x2cc480;}function printArrayPretty(_0x440830){const _0x85fe60=a40_0x2cc4;if(_0x440830[_0x85fe60(0xc8)]===0x0){console[_0x85fe60(0xd9)](_0x85fe60(0xdb));return;}console[_0x85fe60(0xd9)](_0x85fe60(0xdd)+_0x440830[_0x85fe60(0xc8)]+_0x85fe60(0xd6));for(const _0x75f8ea of _0x440830){if(typeof _0x75f8ea===_0x85fe60(0xe4)&&_0x75f8ea!==null){const _0x4d0866=Object[_0x85fe60(0xc6)](_0x75f8ea)['filter'](([,_0x51317d])=>_0x51317d!=null&&_0x51317d!=='');if(_0x4d0866[_0x85fe60(0xc8)]===0x0)continue;const _0x18e812=Math[_0x85fe60(0xca)](..._0x4d0866['map'](([_0x1bfbb0])=>_0x1bfbb0[_0x85fe60(0xc8)]));for(const [_0x1b2c33,_0x378336]of _0x4d0866){const _0x365ed4=typeof _0x378336===_0x85fe60(0xe4)?JSON[_0x85fe60(0xc5)](_0x378336):String(_0x378336);console['log']('\x20\x20'+_0x1b2c33[_0x85fe60(0xc7)](_0x18e812)+'\x20\x20'+_0x365ed4);}console[_0x85fe60(0xd9)]('');}else console[_0x85fe60(0xd9)]('\x20\x20'+_0x75f8ea);}}function printTable(_0xce2f8b,_0x46533a){const _0x33e15d=a40_0x2cc4,_0x166af0=_0xce2f8b['data'];if(!_0xce2f8b['ok']){console[_0x33e15d(0xd7)](_0x33e15d(0xe2)+(_0xce2f8b[_0x33e15d(0xd2)]??'Unknown\x20error'));return;}const _0x11552b=Array[_0x33e15d(0xc9)](_0x166af0)?_0x166af0:_0x166af0?[_0x166af0]:[];if(_0x11552b['length']===0x0){console[_0x33e15d(0xd9)](_0x33e15d(0xdb));return;}const _0x438d56=Object[_0x33e15d(0xcc)](_0x11552b[0x0]),_0x3fbbc3=_0x438d56[_0x33e15d(0xe0)](_0x12a983=>Math[_0x33e15d(0xca)](_0x12a983[_0x33e15d(0xc8)],..._0x11552b[_0x33e15d(0xe0)](_0x1add45=>String(_0x1add45[_0x12a983]??'')[_0x33e15d(0xc8)]))),_0x51b966=_0x438d56[_0x33e15d(0xe0)]((_0x293678,_0x2780e7)=>_0x293678[_0x33e15d(0xc7)](_0x3fbbc3[_0x2780e7]))['join']('\x20\x20'),_0xc0e365=_0x3fbbc3[_0x33e15d(0xe0)](_0x363519=>'-'[_0x33e15d(0xe1)](_0x363519))[_0x33e15d(0xcb)]('\x20\x20');console['log'](_0x51b966),console[_0x33e15d(0xd9)](_0xc0e365);for(const _0x5feacc of _0x11552b){const _0x28c9bf=_0x438d56[_0x33e15d(0xe0)]((_0x28530d,_0x5eaacd)=>String(_0x5feacc[_0x28530d]??'')[_0x33e15d(0xc7)](_0x3fbbc3[_0x5eaacd]))[_0x33e15d(0xcb)]('\x20\x20');console['log'](_0x28c9bf);}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x45f380,_0x30ab8e){const _0x4f3053=a41_0x247c,_0x3bbb9f=_0x45f380();while(!![]){try{const _0x3c6ce7=parseInt(_0x4f3053(0x7b))/0x1*(-parseInt(_0x4f3053(0x79))/0x2)+parseInt(_0x4f3053(0x6f))/0x3*(-parseInt(_0x4f3053(0x86))/0x4)+-parseInt(_0x4f3053(0x7c))/0x5*(-parseInt(_0x4f3053(0x8d))/0x6)+parseInt(_0x4f3053(0x7d))/0x7+-parseInt(_0x4f3053(0x8f))/0x8+-parseInt(_0x4f3053(0x8b))/0x9+parseInt(_0x4f3053(0x68))/0xa*(parseInt(_0x4f3053(0x89))/0xb);if(_0x3c6ce7===_0x30ab8e)break;else _0x3bbb9f['push'](_0x3bbb9f['shift']());}catch(_0x1c5e22){_0x3bbb9f['push'](_0x3bbb9f['shift']());}}}(a41_0x1e0a,0xba626));function toKebab(_0x24f063){const _0x15c0d9=a41_0x247c;return _0x24f063[_0x15c0d9(0x75)](/_/g,'-')[_0x15c0d9(0x75)](/-([A-Z]+)/g,(_0x4abadf,_0xd2b4c2)=>'-'+_0xd2b4c2[_0x15c0d9(0x81)]())['replace'](/([a-z0-9])([A-Z])/g,(_0x2eb3ed,_0x111d3c,_0x4a505a)=>_0x111d3c+'-'+_0x4a505a)[_0x15c0d9(0x81)]();}function buildKnownFlags(_0x2c8e10){const _0xc1cd93=a41_0x247c,_0x352147=new Set();for(const _0x22dd13 of _0x2c8e10){_0x352147[_0xc1cd93(0x6d)](_0x22dd13['name']),_0x352147[_0xc1cd93(0x6d)](toCamelCase(_0x22dd13[_0xc1cd93(0x78)]));}for(const _0x46c007 of[_0xc1cd93(0x77),_0xc1cd93(0x69),_0xc1cd93(0x83),_0xc1cd93(0x6a)]){_0x352147[_0xc1cd93(0x6d)](_0x46c007);}for(const _0x4a35c2 of[_0xc1cd93(0x87),'env',_0xc1cd93(0x85),_0xc1cd93(0x76),'nonInteractive',_0xc1cd93(0x70),'ci',_0xc1cd93(0x84),_0xc1cd93(0x8c)]){_0x352147[_0xc1cd93(0x6d)](_0x4a35c2);}return _0x352147;}function buildFlagTypeMap(_0x153622){const _0x8817b5=a41_0x247c,_0x198afe=new Map();for(const _0x266d49 of _0x153622){_0x198afe['set'](_0x266d49[_0x8817b5(0x78)],_0x266d49['type']),_0x198afe[_0x8817b5(0x6b)](toCamelCase(_0x266d49[_0x8817b5(0x78)]),_0x266d49[_0x8817b5(0x90)]);}return _0x198afe;}function toCamelCase(_0x593068){const _0x26db36=a41_0x247c;return _0x593068[_0x26db36(0x75)](/-([a-z])/g,(_0xe17660,_0x1a6cd7)=>_0x1a6cd7[_0x26db36(0x7e)]());}function aliasHandler(_0x2528c6,_0x39a7e6){const _0x4bd599=a41_0x247c,_0x45a828=[];for(const _0x1e53a9 of Object[_0x4bd599(0x92)](_0x2528c6)){if(_0x39a7e6[_0x4bd599(0x8a)](_0x1e53a9))continue;const _0x4a103e=toKebab(_0x1e53a9);_0x4a103e!==_0x1e53a9&&_0x39a7e6[_0x4bd599(0x8a)](_0x4a103e)&&_0x45a828[_0x4bd599(0x80)]({'original':_0x1e53a9,'corrected':_0x4a103e,'handler':_0x4bd599(0x7a)});}return _0x45a828;}function stickyHandler(_0x1e0cf6,_0x472262,_0xf7c867){const _0x1994c3=a41_0x247c,_0x16ccc9=[];for(const [_0x308691,_0x731a9c]of Object[_0x1994c3(0x8e)](_0x1e0cf6)){if(_0x731a9c!==!![])continue;for(let _0x38fab0=_0x308691[_0x1994c3(0x82)]-0x1;_0x38fab0>=0x1;_0x38fab0--){const _0xe2ccc6=_0x308691[_0x1994c3(0x91)](0x0,_0x38fab0),_0x128791=_0x308691['slice'](_0x38fab0),_0x543d81=toKebab(_0xe2ccc6),_0xc91092=toCamelCase(_0xe2ccc6),_0x39ff97=_0x472262[_0x1994c3(0x8a)](_0xe2ccc6)?_0xe2ccc6:_0x472262[_0x1994c3(0x8a)](_0x543d81)?_0x543d81:_0x472262['has'](_0xc91092)?_0xc91092:null;if(!_0x39ff97)continue;const _0x15f948=_0xf7c867[_0x1994c3(0x72)](_0x39ff97)??_0x1994c3(0x88);let _0xc2c897;if(_0x15f948==='number'){const _0xa50d5c=Number(_0x128791);if(isNaN(_0xa50d5c)||_0x128791==='')continue;_0xc2c897=_0xa50d5c;}else{if(_0x15f948===_0x1994c3(0x6e))continue;else{if(_0x128791==='')continue;_0xc2c897=_0x128791;}}_0x16ccc9[_0x1994c3(0x80)]({'original':_0x308691,'corrected':_0x39ff97+'='+_0xc2c897,'handler':_0x1994c3(0x71)});break;}}return _0x16ccc9;}function a41_0x1e0a(){const _0x2541d4=['appcode','16MVBkmc','help','string','106931ndHpvx','has','7078032UuyCUI','version','3363852XvnNRH','entries','6030800NjCMaf','type','slice','keys','570NWXguo','dryRun','format','set','indexOf','add','boolean','62994NqGlPx','non-interactive','sticky','get','corrected','number','replace','app','dry-run','name','2ZgIgYC','alias','773071eKkjgh','10sLoHZN','10397870cuuqCx','toUpperCase','original','push','toLowerCase','length','yes','global'];a41_0x1e0a=function(){return _0x2541d4;};return a41_0x1e0a();}function a41_0x247c(_0x1492a2,_0x58c68d){_0x1492a2=_0x1492a2-0x68;const _0x1e0a32=a41_0x1e0a();let _0x247cf2=_0x1e0a32[_0x1492a2];return _0x247cf2;}export function correctFlags(_0x4aa51a,_0x3fcfd7){const _0x1f11a8=a41_0x247c,_0x266ce7=buildKnownFlags(_0x3fcfd7),_0x2e6090=buildFlagTypeMap(_0x3fcfd7),_0x5cda5c=aliasHandler(_0x4aa51a,_0x266ce7),_0xcf4d71=stickyHandler(_0x4aa51a,_0x266ce7,_0x2e6090),_0x5e62b9=[..._0x5cda5c,..._0xcf4d71];if(_0x5e62b9[_0x1f11a8(0x82)]===0x0)return{'flags':_0x4aa51a,'corrections':[]};const _0x560658={..._0x4aa51a},_0x16f32b=new Set();for(const _0x51ad0f of _0x5cda5c){_0x560658[_0x51ad0f[_0x1f11a8(0x73)]]=_0x4aa51a[_0x51ad0f[_0x1f11a8(0x7f)]],_0x16f32b['add'](_0x51ad0f[_0x1f11a8(0x7f)]);}for(const _0x145763 of _0xcf4d71){const _0x1013a3=_0x145763['corrected'][_0x1f11a8(0x6c)]('='),_0x1d7263=_0x145763['corrected'][_0x1f11a8(0x91)](0x0,_0x1013a3),_0x105bbb=_0x145763['corrected'][_0x1f11a8(0x91)](_0x1013a3+0x1),_0x3788d6=_0x2e6090[_0x1f11a8(0x72)](_0x1d7263)??_0x1f11a8(0x88);_0x3788d6===_0x1f11a8(0x74)?_0x560658[_0x1d7263]=Number(_0x105bbb):_0x560658[_0x1d7263]=_0x105bbb,_0x16f32b['add'](_0x145763[_0x1f11a8(0x7f)]);}for(const _0x3eb5c3 of _0x16f32b){delete _0x560658[_0x3eb5c3];}return{'flags':_0x560658,'corrections':_0x5e62b9};}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x293609,_0x3c6988){var _0x4e7b83=a42_0x7a53,_0x2bbc7b=_0x293609();while(!![]){try{var _0x533a4f=-parseInt(_0x4e7b83(0x102))/0x1*(parseInt(_0x4e7b83(0xfc))/0x2)+-parseInt(_0x4e7b83(0xf8))/0x3*(parseInt(_0x4e7b83(0x104))/0x4)+-parseInt(_0x4e7b83(0xfd))/0x5*(parseInt(_0x4e7b83(0xf6))/0x6)+-parseInt(_0x4e7b83(0xf9))/0x7+-parseInt(_0x4e7b83(0xfb))/0x8+-parseInt(_0x4e7b83(0x101))/0x9+parseInt(_0x4e7b83(0xf7))/0xa*(parseInt(_0x4e7b83(0xff))/0xb);if(_0x533a4f===_0x3c6988)break;else _0x2bbc7b['push'](_0x2bbc7b['shift']());}catch(_0xc98d){_0x2bbc7b['push'](_0x2bbc7b['shift']());}}}(a42_0x48f9,0x551ff));export function extractList(_0x47d92c){var _0x38e54d=a42_0x7a53;if(Array[_0x38e54d(0xfe)](_0x47d92c))return _0x47d92c;if(_0x47d92c&&typeof _0x47d92c===_0x38e54d(0xfa))return _0x47d92c[_0x38e54d(0x100)]??[];return[];}function a42_0x48f9(){var _0x2e68ca=['isArray','11nFxYcv','tableData','6113475CrZtcp','1lQyUwJ','paging','244WzPAtp','55338hCDyPO','23349340FxsIxA','8502vDXmuy','2635941lMhAxe','object','3013288gHhCmh','706442cwzWnN','15eGXJtR'];a42_0x48f9=function(){return _0x2e68ca;};return a42_0x48f9();}function a42_0x7a53(_0x523a2e,_0x2cc346){_0x523a2e=_0x523a2e-0xf6;var _0x48f9f9=a42_0x48f9();var _0x7a53f6=_0x48f9f9[_0x523a2e];return _0x7a53f6;}export function extractPaging(_0x388223){var _0x180d36=a42_0x7a53;if(_0x388223&&typeof _0x388223==='object'&&!Array[_0x180d36(0xfe)](_0x388223))return _0x388223[_0x180d36(0x103)];return undefined;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x4cdd36,_0x3c0372){const _0x1b932a=a43_0x44be,_0xcd43cf=_0x4cdd36();while(!![]){try{const _0x33245c=parseInt(_0x1b932a(0x110))/0x1*(-parseInt(_0x1b932a(0x115))/0x2)+-parseInt(_0x1b932a(0xe2))/0x3+-parseInt(_0x1b932a(0x107))/0x4*(parseInt(_0x1b932a(0xda))/0x5)+-parseInt(_0x1b932a(0xd1))/0x6*(parseInt(_0x1b932a(0xf8))/0x7)+parseInt(_0x1b932a(0xf4))/0x8*(-parseInt(_0x1b932a(0xfa))/0x9)+-parseInt(_0x1b932a(0x105))/0xa+-parseInt(_0x1b932a(0x112))/0xb*(-parseInt(_0x1b932a(0x113))/0xc);if(_0x33245c===_0x3c0372)break;else _0xcd43cf['push'](_0xcd43cf['shift']());}catch(_0x526282){_0xcd43cf['push'](_0xcd43cf['shift']());}}}(a43_0x2c65,0x68ba7));import{riskLevelOrder}from'./types.js';import{parseFlags,validateFlags}from'./flags.js';function a43_0x2c65(){const _0x518ee=['push','format','params=','toLowerCase','102838iEBfhR','requiresCookieAuth','77ehLnSa','5018628mQVJBO','defaultVerbose','16WMskcY','appCode','../core/sdk-client.js','question','high-risk-write','defaultFormat','Command\x20`','env','risk','close','riskLevel','yes','dryRun','\x20\x20To\x20proceed:\x20','join','`\x20to\x20allow\x20this\x20operation.','validation','../core/api-client.js','accessKey','18CvvUYU','apiDomain','Operation\x20cancelled\x20by\x20user.','stderr','code','\x20\x20Run\x20`','\x22,\x20but\x20current\x20riskLevel\x20is\x20\x22','params','name=','95iXOFZj','dry-run','configMissing','json','`\x20requires\x20cookie\x20authentication\x20and\x20cannot\x20be\x20used\x20with\x20accessKey/secretKey\x20only.','pagesize','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20.lovrabet.json.','pretty','100485FVMzsO','verbose','entries','High-risk\x20operation\x20`','\x20\x20\x20Affected:\x20','Run\x20`','secretKey','node:readline','requiresAppCode','number','length','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','nonInteractive','hasFormat','pageSize','flags','cancelled','args','1880568XGmyfg','`\x20requires\x20riskLevel\x20\x22','--yes','\x22.\x0a','284165bGSSlD','⚠\x20\x20High-risk\x20operation:\x20','9YcJpEq','\x20config\x20set\x20riskLevel\x20','defaultPageSize','\x20\x20\x20Continue?\x20[y/N]\x20','command','service','isNonInteractive','affectedRecords','commandLabel','description','validate','7881480aewkVe','--dry-run\x20is\x20not\x20supported\x20for\x20`','104708LkbtZI','cookie','SIGINT','name','rawFlags'];a43_0x2c65=function(){return _0x518ee;};return a43_0x2c65();}import{formatOutput}from'./output.js';import{CliErrors}from'../errors.js';function a43_0x44be(_0x1d2304,_0x3611a2){_0x1d2304=_0x1d2304-0xc2;const _0x2c65ba=a43_0x2c65();let _0x44be78=_0x2c65ba[_0x1d2304];return _0x44be78;}import{CLI_BIN_NAME}from'../constant/cli.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';export function createPipelineEnv(_0xb5a678,_0x3972ab){const _0x253e2f=a43_0x44be;return{'rawFlags':_0x3972ab,'appCode':_0xb5a678[_0x253e2f(0x116)]||process.env.RABETBASE_APPCODE||readAppCodeFromConfig(),'cookie':_0xb5a678[_0x253e2f(0x108)]||getCookie(),'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x3972ab),'defaultFormat':_0xb5a678[_0x253e2f(0x10d)],'defaultPageSize':_0xb5a678[_0x253e2f(0xf0)],'defaultVerbose':_0xb5a678['verbose'],'riskLevel':_0xb5a678[_0x253e2f(0xc8)],'accessKey':_0xb5a678[_0x253e2f(0xd0)],'secretKey':_0xb5a678[_0x253e2f(0xe8)],'env':_0xb5a678[_0x253e2f(0xc5)]};}export async function runCommand(_0x16b07a,_0x221534){const _0xb69f43=a43_0x44be,_0x1d298a=CLI_BIN_NAME+'\x20'+_0x16b07a['service']+'\x20'+_0x16b07a[_0xb69f43(0xfe)],_0x5d3d12=parseFlags(_0x16b07a[_0xb69f43(0xf1)],_0x221534[_0xb69f43(0x10b)]);validateFlags(_0x16b07a['flags'],_0x5d3d12,_0x1d298a);if(_0x221534[_0xb69f43(0xc8)]&&riskLevelOrder(_0x16b07a[_0xb69f43(0xc6)])>riskLevelOrder(_0x221534[_0xb69f43(0xc8)])){console['error']('Command\x20`'+_0x1d298a+_0xb69f43(0xf5)+_0x16b07a[_0xb69f43(0xc6)]+_0xb69f43(0xd7)+_0x221534['riskLevel']+_0xb69f43(0xf7)+(_0xb69f43(0xd6)+CLI_BIN_NAME+_0xb69f43(0xfb)+_0x16b07a[_0xb69f43(0xc6)]+_0xb69f43(0xcd)));throw CliErrors[_0xb69f43(0xf2)]();}const _0x40cb33=!!(_0x221534[_0xb69f43(0xd0)]&&_0x221534['secretKey']);let _0x512e9c='';if(_0x16b07a['requiresAuth']!==![]){if(!_0x40cb33){_0x512e9c=_0x221534['cookie'];if(!_0x512e9c)throw CliErrors['authRequired']();}const {setActiveCookie:_0x42b587}=await import(_0xb69f43(0xcf));if(_0x512e9c)_0x42b587(_0x512e9c);}if(_0x16b07a[_0xb69f43(0x111)]&&_0x40cb33&&!_0x221534['cookie'])throw CliErrors[_0xb69f43(0xce)](_0xb69f43(0xc4)+_0x1d298a+_0xb69f43(0xde),_0xb69f43(0xe7)+CLI_BIN_NAME+'\x20auth`\x20to\x20log\x20in\x20and\x20obtain\x20a\x20session\x20cookie.');let _0x4584bd='';if(_0x16b07a[_0xb69f43(0xea)]!==![]){_0x4584bd=_0x221534[_0xb69f43(0x116)]??'';if(!_0x4584bd)throw CliErrors[_0xb69f43(0xdc)](_0xb69f43(0xe0));}if(_0x4584bd){const {initSdkClient:_0x54d012}=await import(_0xb69f43(0x117));_0x54d012({'appCode':_0x4584bd,'env':_0x221534['env']??'production','cookie':_0x512e9c||undefined,'accessKey':_0x221534[_0xb69f43(0xd0)],'secretKey':_0x221534[_0xb69f43(0xe8)]});}const _0x52e96d=resolveFormat(_0x5d3d12,_0x16b07a,_0x221534[_0xb69f43(0xc3)]),_0x14aec9=buildRuntimeContext({'appCode':_0x4584bd,'cookie':_0x512e9c,'apiDomain':_0x221534['apiDomain'],'format':_0x52e96d,'flags':_0x5d3d12,'def':_0x16b07a,'nonInteractive':_0x221534[_0xb69f43(0x100)],'defaultPageSize':_0x221534['defaultPageSize'],'defaultVerbose':_0x221534[_0xb69f43(0x114)],'args':_0x221534['args']??[]});_0x16b07a[_0xb69f43(0x104)]&&await _0x16b07a[_0xb69f43(0x104)](_0x14aec9);if(_0x5d3d12[_0xb69f43(0xdb)]){if(!_0x16b07a['dryRun'])throw CliErrors['validation'](_0xb69f43(0x106)+_0x1d298a+'`.');const _0x27534f=await _0x16b07a[_0xb69f43(0xca)](_0x14aec9);formatOutput({'ok':!![],'data':_0x27534f},{'command':_0x1d298a,'risk':_0x16b07a['risk'],'format':_0x52e96d,'dryRun':!![]});return;}if(_0x16b07a[_0xb69f43(0xc6)]===_0xb69f43(0xc2)&&!_0x5d3d12[_0xb69f43(0xc9)]){if(_0x221534[_0xb69f43(0x100)]){const _0x2fb58e=reconstructArgv(_0x16b07a,_0x5d3d12);throw CliErrors[_0xb69f43(0xce)](_0xb69f43(0xe5)+_0x1d298a+_0xb69f43(0xed)+(_0xb69f43(0xcb)+_0x2fb58e));}const _0x3a7c27=buildConfirmationContext(_0x16b07a,_0x1d298a,_0x5d3d12);await requireConfirmation(_0x3a7c27);}const _0x187a02=await _0x16b07a['execute'](_0x14aec9);formatOutput(_0x187a02,{'command':_0x1d298a,'risk':_0x16b07a[_0xb69f43(0xc6)],'format':_0x52e96d});}function buildRuntimeContext(_0x281583){const _0x56256d=a43_0x44be,{flags:_0x477e8e,def:_0x24ad8b}=_0x281583,_0x2d1c81=CLI_BIN_NAME+'\x20'+_0x24ad8b[_0x56256d(0xff)]+'\x20'+_0x24ad8b[_0x56256d(0xfe)];return{'appCode':_0x281583[_0x56256d(0x116)],'cookie':_0x281583['cookie'],'apiDomain':_0x281583[_0x56256d(0xd2)],'format':_0x281583['format'],'nonInteractive':_0x281583[_0x56256d(0xee)],'args':_0x281583[_0x56256d(0xf3)],'str'(_0x361f26){return String(_0x477e8e[_0x361f26]??'');},'bool'(_0x2c81b2){const _0x2a332c=_0x56256d;if(_0x477e8e[_0x2c81b2]===!![])return!![];if(_0x2c81b2===_0x2a332c(0xe3)&&_0x281583[_0x2a332c(0x114)])return!![];return![];},'num'(_0x1edc79,_0x358eda){const _0x18b654=_0x56256d,_0x51ede5=_0x477e8e[_0x1edc79];if(typeof _0x51ede5===_0x18b654(0xeb))return _0x51ede5;if(_0x1edc79===_0x18b654(0xdf)&&_0x281583['defaultPageSize']!=null)return _0x281583[_0x18b654(0xfc)];return _0x358eda??0x0;},'flag'(_0xa6eb6b){return _0x477e8e[_0xa6eb6b];},'output'(_0x1a99a3){const _0x13987e=_0x56256d;formatOutput(_0x1a99a3,{'command':_0x2d1c81,'risk':_0x24ad8b[_0x13987e(0xc6)],'format':_0x281583['format']});}};}function resolveFormat(_0x1dd7e5,_0x145d81,_0x6d0624){const _0x1f82fa=a43_0x44be;if(_0x145d81[_0x1f82fa(0xef)]===![])return'pretty';const _0x3de6b5=_0x1dd7e5[_0x1f82fa(0x10d)];if(_0x3de6b5===_0x1f82fa(0xdd)||_0x3de6b5===_0x1f82fa(0xe1)||_0x3de6b5==='table')return _0x3de6b5;if(_0x6d0624)return _0x6d0624;return _0x1f82fa(0xdd);}function buildConfirmationContext(_0x8c0bd2,_0x25c24e,_0x189097){const _0x1a06eb=a43_0x44be,_0x494034=extractAffectedRecords(_0x8c0bd2,_0x189097);return{'commandLabel':_0x25c24e,'description':_0x8c0bd2[_0x1a06eb(0x103)],'affectedRecords':_0x494034};}function extractAffectedRecords(_0x11279b,_0x35a8a0){const _0x574f57=a43_0x44be,_0x2652a3=[];if(_0x35a8a0['code'])_0x2652a3[_0x574f57(0x10c)]('code='+_0x35a8a0[_0x574f57(0xd5)]);if(_0x35a8a0['id'])_0x2652a3['push']('id='+_0x35a8a0['id']);if(_0x35a8a0['name'])_0x2652a3['push'](_0x574f57(0xd9)+_0x35a8a0[_0x574f57(0x10a)]);if(_0x35a8a0[_0x574f57(0xd8)])_0x2652a3[_0x574f57(0x10c)](_0x574f57(0x10e)+_0x35a8a0[_0x574f57(0xd8)]);return _0x2652a3[_0x574f57(0xec)]>0x0?_0x2652a3[_0x574f57(0xcc)](',\x20'):undefined;}function reconstructArgv(_0x4d8116,_0xf8cc00){const _0x151930=a43_0x44be,_0x5f3e58=[CLI_BIN_NAME,_0x4d8116['service'],_0x4d8116[_0x151930(0xfe)]];for(const [_0x5bccee,_0x4db130]of Object[_0x151930(0xe4)](_0xf8cc00)){if(_0x4db130===!![])_0x5f3e58[_0x151930(0x10c)]('--'+_0x5bccee);else _0x4db130!==![]&&_0x4db130!==undefined&&_0x4db130!==''&&_0x5f3e58[_0x151930(0x10c)]('--'+_0x5bccee+'\x20'+JSON['stringify'](_0x4db130));}return _0x5f3e58['push'](_0x151930(0xf6)),_0x5f3e58[_0x151930(0xcc)]('\x20');}async function requireConfirmation(_0x3e4581){const _0x12c705=a43_0x44be,_0x1fc817=await import(_0x12c705(0xe9)),_0x439f7f=_0x1fc817['createInterface']({'input':process['stdin'],'output':process[_0x12c705(0xd4)]}),_0x2b5a8b=[_0x12c705(0xf9)+_0x3e4581[_0x12c705(0x102)]];return _0x3e4581['description']&&_0x2b5a8b[_0x12c705(0x10c)]('\x20\x20\x20'+_0x3e4581['description']),_0x3e4581[_0x12c705(0x101)]&&_0x2b5a8b[_0x12c705(0x10c)](_0x12c705(0xe6)+_0x3e4581[_0x12c705(0x101)]),_0x2b5a8b[_0x12c705(0x10c)](_0x12c705(0xfd)),new Promise((_0x59a1cc,_0x434eca)=>{const _0x1d7049=_0x12c705;_0x439f7f['on'](_0x1d7049(0x109),()=>{const _0x5d73a4=_0x1d7049;_0x439f7f[_0x5d73a4(0xc7)](),_0x434eca(CliErrors[_0x5d73a4(0xf2)](_0x5d73a4(0xd3)));}),_0x439f7f[_0x1d7049(0x118)](_0x2b5a8b[_0x1d7049(0xcc)]('\x0a'),_0x8aa443=>{const _0x1440fb=_0x1d7049;_0x439f7f[_0x1440fb(0xc7)](),_0x8aa443[_0x1440fb(0x10f)]()==='y'||_0x8aa443[_0x1440fb(0x10f)]()===_0x1440fb(0xc9)?_0x59a1cc():_0x434eca(CliErrors[_0x1440fb(0xf2)](_0x1440fb(0xd3)));});});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a44_0x2878(_0x4a97e1,_0x538ffc){_0x4a97e1=_0x4a97e1-0x164;const _0x188e2c=a44_0x188e();let _0x28780f=_0x188e2c[_0x4a97e1];return _0x28780f;}function a44_0x188e(){const _0x19a08e=['4503930UfCkja','864GnTXrM','9btgHJA','324ntqqnM','337862kRDxvH','1NbaHaf','60OaKakd','54597DjlKrS','9170pChFQg','90673zpNXxC','4854174BBMLAt','679945ALnJds','40XrWWam','read'];a44_0x188e=function(){return _0x19a08e;};return a44_0x188e();}(function(_0x56132a,_0x18f177){const _0x2c74ce=a44_0x2878,_0x49073f=_0x56132a();while(!![]){try{const _0x4302a6=parseInt(_0x2c74ce(0x16f))/0x1*(-parseInt(_0x2c74ce(0x16e))/0x2)+-parseInt(_0x2c74ce(0x171))/0x3*(-parseInt(_0x2c74ce(0x170))/0x4)+parseInt(_0x2c74ce(0x164))/0x5*(parseInt(_0x2c74ce(0x16b))/0x6)+-parseInt(_0x2c74ce(0x167))/0x7*(-parseInt(_0x2c74ce(0x168))/0x8)+parseInt(_0x2c74ce(0x16c))/0x9*(-parseInt(_0x2c74ce(0x16a))/0xa)+-parseInt(_0x2c74ce(0x165))/0xb*(-parseInt(_0x2c74ce(0x16d))/0xc)+-parseInt(_0x2c74ce(0x166))/0xd;if(_0x4302a6===_0x18f177)break;else _0x49073f['push'](_0x49073f['shift']());}catch(_0x5611fb){_0x49073f['push'](_0x49073f['shift']());}}}(a44_0x188e,0x3dab3));export function riskLevelOrder(_0x3ba10f){const _0x110134=a44_0x2878,_0x2d224b={'read':0x0,'write':0x1,'high-risk-write':0x2};return _0x2d224b[_0x3ba10f??_0x110134(0x169)]??0x0;}
|
package/lib/help.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a45_0x4399(_0x4a3898,_0x477458){_0x4a3898=_0x4a3898-0x1cd;var _0xdcb090=a45_0xdcb0();var _0x4399c2=_0xdcb090[_0x4a3898];return _0x4399c2;}(function(_0x2837a9,_0x3a13f6){var _0x7458dc=a45_0x4399,_0x583323=_0x2837a9();while(!![]){try{var _0x4e8594=parseInt(_0x7458dc(0x1d4))/0x1+-parseInt(_0x7458dc(0x1cd))/0x2*(-parseInt(_0x7458dc(0x1d6))/0x3)+-parseInt(_0x7458dc(0x1d1))/0x4+-parseInt(_0x7458dc(0x1cf))/0x5*(parseInt(_0x7458dc(0x1db))/0x6)+parseInt(_0x7458dc(0x1d5))/0x7*(parseInt(_0x7458dc(0x1d9))/0x8)+-parseInt(_0x7458dc(0x1d0))/0x9+parseInt(_0x7458dc(0x1d2))/0xa*(-parseInt(_0x7458dc(0x1d7))/0xb);if(_0x4e8594===_0x3a13f6)break;else _0x583323['push'](_0x583323['shift']());}catch(_0x3cd59b){_0x583323['push'](_0x583323['shift']());}}}(a45_0xdcb0,0x31476));import{jsx as a45_0x1bec63,jsxs as a45_0x12cdcf}from'react/jsx-runtime';import{Box,Text}from'ink';function a45_0xdcb0(){var _0x6fa373=['green','9235zpFPAY','30519AnwOCn','461464uflgLY','40FhTnDD','column','89864CpAnoL','126YGuQJu','15Qbpeol','322729pYXxDp','\x20--help','173368MKwkFe','\x20to\x20view\x20available\x20commands.','414qoHhQj','\x20\x20Use\x20','34184ESlaZf'];a45_0xdcb0=function(){return _0x6fa373;};return a45_0xdcb0();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){var _0x2a144c=a45_0x4399;return a45_0x12cdcf(Box,{'flexDirection':_0x2a144c(0x1d3),'marginTop':0x1,'marginBottom':0x1,'children':[a45_0x1bec63(Box,{'children':a45_0x1bec63(Text,{'bold':!![],'color':_0x2a144c(0x1ce),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a45_0x12cdcf(Box,{'marginTop':0x1,'children':[a45_0x1bec63(Text,{'dimColor':!![],'children':_0x2a144c(0x1dc)}),a45_0x1bec63(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x2a144c(0x1d8)}),a45_0x1bec63(Text,{'dimColor':!![],'children':_0x2a144c(0x1da)})]})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a46_0xba079c=a46_0x5ce7;(function(_0x4b6b49,_0x29ce79){const _0x5d29ac=a46_0x5ce7,_0x7bf2d2=_0x4b6b49();while(!![]){try{const _0x1e0b65=-parseInt(_0x5d29ac(0xc2))/0x1+-parseInt(_0x5d29ac(0xb6))/0x2*(-parseInt(_0x5d29ac(0xaf))/0x3)+-parseInt(_0x5d29ac(0xa8))/0x4*(-parseInt(_0x5d29ac(0xb2))/0x5)+parseInt(_0x5d29ac(0xbc))/0x6*(parseInt(_0x5d29ac(0xa3))/0x7)+parseInt(_0x5d29ac(0xb0))/0x8+-parseInt(_0x5d29ac(0xc8))/0x9*(parseInt(_0x5d29ac(0xc0))/0xa)+-parseInt(_0x5d29ac(0xad))/0xb*(parseInt(_0x5d29ac(0xc5))/0xc);if(_0x1e0b65===_0x29ce79)break;else _0x7bf2d2['push'](_0x7bf2d2['shift']());}catch(_0x5e6186){_0x7bf2d2['push'](_0x7bf2d2['shift']());}}}(a46_0xca0b,0x626fe));function a46_0x5ce7(_0x61b26,_0x305efd){_0x61b26=_0x61b26-0x90;const _0xca0b5b=a46_0xca0b();let _0x5ce721=_0xca0b5b[_0x61b26];return _0x5ce721;}function a46_0xca0b(){const _0xecc90d=['完成:\x20','timestamp','now','toISOString','1554MZYOwE','开始执行:\x20','失败:\x20','rawCommand','480zmeYgg','info','115666YYtwWC','yellow','Failed\x20to\x20clear\x20logs:','16318056yDveZC','getWinstonInstance','.lovrabet-runtime.log','21663riQSTh','green','trim','currentRawCommand','warn','setLogPath','combine','success','error','logTask','stringify','setRawCommand','printf','clearLogs','winstonLogger','blue','parse','readFileSync','duration','map','mkdirSync','logFilePath','11578ZtJiXE','errors','unknown','message','format','668oizAsi','dirname','existsSync','createLogger','utf8','11mucwrj','split','111jBYOjY','3195184xvQJsB','initWinstonLogger','11945aTLYac','writeFileSync','join','Failed\x20to\x20read\x20logs:','41486vPMcBC','filter'];a46_0xca0b=function(){return _0xecc90d;};return a46_0xca0b();}import a46_0x1d1246 from'winston';import a46_0x13ea8f from'node:fs';import a46_0x32fb8e from'node:path';class Logger{[a46_0xba079c(0x9b)];[a46_0xba079c(0xa2)];[a46_0xba079c(0x90)]='';constructor(){const _0x1dbe94=a46_0xba079c;this[_0x1dbe94(0xa2)]='';}[a46_0xba079c(0x98)](_0x3cea2c){const _0x28d5bb=a46_0xba079c;this[_0x28d5bb(0x90)]=_0x3cea2c;}[a46_0xba079c(0xb1)](){const _0x3d93b5=a46_0xba079c,_0x4be335=a46_0x32fb8e[_0x3d93b5(0xa9)](this['logFilePath']);!a46_0x13ea8f[_0x3d93b5(0xaa)](_0x4be335)&&a46_0x13ea8f[_0x3d93b5(0xa1)](_0x4be335,{'recursive':!![]});const _0x4b1a14=a46_0x1d1246[_0x3d93b5(0xa7)][_0x3d93b5(0x93)](a46_0x1d1246[_0x3d93b5(0xa7)][_0x3d93b5(0xb9)](),a46_0x1d1246[_0x3d93b5(0xa7)][_0x3d93b5(0xa4)]({'stack':!![]}),a46_0x1d1246[_0x3d93b5(0xa7)][_0x3d93b5(0x99)](_0x3891bd=>{const _0x36ff3f=_0x3d93b5,_0x23d74c={'timestamp':_0x3891bd[_0x36ff3f(0xb9)]||new Date()[_0x36ff3f(0xbb)](),'level':_0x3891bd['level']||'info','command':_0x3891bd['command']||_0x36ff3f(0xa5),'rawCommand':_0x3891bd[_0x36ff3f(0xbf)]||this[_0x36ff3f(0x90)]||undefined,'message':_0x3891bd[_0x36ff3f(0xa6)]||'','duration':_0x3891bd[_0x36ff3f(0x9f)]||undefined,'details':_0x3891bd['details']||undefined};return JSON[_0x36ff3f(0x97)](_0x23d74c);}));this['winstonLogger']=a46_0x1d1246[_0x3d93b5(0xab)]({'level':_0x3d93b5(0xc1),'format':_0x4b1a14,'transports':[new a46_0x1d1246['transports']['File']({'filename':this['logFilePath'],'level':_0x3d93b5(0xc1)})],'silent':![]}),a46_0x1d1246['addColors']({'success':_0x3d93b5(0xc9),'error':'red','warn':_0x3d93b5(0xc3),'info':_0x3d93b5(0x9c)});}[a46_0xba079c(0x92)](_0x48692f){const _0x42196b=a46_0xba079c;this[_0x42196b(0xa2)]=a46_0x32fb8e[_0x42196b(0xb4)](_0x48692f,_0x42196b(0xc7)),this[_0x42196b(0x9b)]&&this[_0x42196b(0x9b)]['clear'](),this[_0x42196b(0xb1)]();}['info'](_0x98dfbc,_0x24de7f,_0x18d9d7){const _0x5b075c=a46_0xba079c;if(!this[_0x5b075c(0xa2)]||!this[_0x5b075c(0x9b)])return;this[_0x5b075c(0x9b)][_0x5b075c(0xc1)](_0x24de7f,{'command':_0x98dfbc,'details':_0x18d9d7});}[a46_0xba079c(0x94)](_0x5b1923,_0x195d98,_0x45e5c7,_0x3c761b){const _0x404d52=a46_0xba079c;if(!this[_0x404d52(0xa2)]||!this['winstonLogger'])return;this['winstonLogger']['log']('info',_0x195d98,{'level':_0x404d52(0x94),'command':_0x5b1923,'duration':_0x45e5c7,'details':_0x3c761b});}[a46_0xba079c(0x95)](_0x152164,_0x263fa0,_0x569876){const _0x315c23=a46_0xba079c;if(!this[_0x315c23(0xa2)]||!this['winstonLogger'])return;this[_0x315c23(0x9b)][_0x315c23(0x95)](_0x263fa0,{'command':_0x152164,'details':_0x569876});}[a46_0xba079c(0x91)](_0x29acff,_0x402b2a,_0x3cba0b){const _0x531dbc=a46_0xba079c;if(!this['logFilePath']||!this[_0x531dbc(0x9b)])return;this[_0x531dbc(0x9b)]['warn'](_0x402b2a,{'command':_0x29acff,'details':_0x3cba0b});}async[a46_0xba079c(0x96)](_0x1f2272,_0x1406b0,_0x234d80){const _0x40b2fb=a46_0xba079c,_0x3677f1=Date['now']();this[_0x40b2fb(0xc1)](_0x1f2272,_0x40b2fb(0xbd)+_0x1406b0);try{const _0x45593e=await _0x234d80(),_0x4c431b=Date[_0x40b2fb(0xba)]()-_0x3677f1;return this[_0x40b2fb(0x94)](_0x1f2272,_0x40b2fb(0xb8)+_0x1406b0,_0x4c431b),_0x45593e;}catch(_0x4363e2){const _0x2684fa=Date[_0x40b2fb(0xba)]()-_0x3677f1;this['error'](_0x1f2272,_0x40b2fb(0xbe)+_0x1406b0,{'error':_0x4363e2 instanceof Error?_0x4363e2['message']:String(_0x4363e2),'duration':_0x2684fa});throw _0x4363e2;}}['readLogs'](){const _0xadcec5=a46_0xba079c;try{if(!a46_0x13ea8f[_0xadcec5(0xaa)](this[_0xadcec5(0xa2)]))return[];const _0x1a2392=a46_0x13ea8f[_0xadcec5(0x9e)](this[_0xadcec5(0xa2)],_0xadcec5(0xac));return _0x1a2392[_0xadcec5(0xae)](/\r?\n/)[_0xadcec5(0xb7)](_0x14189a=>_0x14189a[_0xadcec5(0xca)]())[_0xadcec5(0xa0)](_0x4a7573=>JSON[_0xadcec5(0x9d)](_0x4a7573));}catch(_0x3a03bb){return console[_0xadcec5(0x91)](_0xadcec5(0xb5),_0x3a03bb),[];}}[a46_0xba079c(0x9a)](){const _0x3b702d=a46_0xba079c;try{a46_0x13ea8f[_0x3b702d(0xaa)](this['logFilePath'])&&a46_0x13ea8f[_0x3b702d(0xb3)](this['logFilePath'],'',_0x3b702d(0xac));}catch(_0x168068){console[_0x3b702d(0x91)](_0x3b702d(0xc4),_0x168068);}}[a46_0xba079c(0xc6)](){const _0x2881db=a46_0xba079c;return this[_0x2881db(0x9b)];}}export const logger=new Logger();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a47_0x2534(){var _0x15014b=['2130300NljzIG','999549kApabF','Invalid\x20JSON\x20for\x20--params:\x20','540260Ppqqgw','parse','2BTCfJl','54KxagZJ','474984HbBDxS','validation','281552zQrcSc','989681jXrmMp','16rcqPVB','56065aRSLQS'];a47_0x2534=function(){return _0x15014b;};return a47_0x2534();}(function(_0x351598,_0x88d6bc){var _0x3a945d=a47_0x3fce,_0x30c8c2=_0x351598();while(!![]){try{var _0x443aba=-parseInt(_0x3a945d(0x84))/0x1*(-parseInt(_0x3a945d(0x80))/0x2)+parseInt(_0x3a945d(0x82))/0x3+-parseInt(_0x3a945d(0x7e))/0x4+-parseInt(_0x3a945d(0x87))/0x5*(parseInt(_0x3a945d(0x81))/0x6)+-parseInt(_0x3a945d(0x85))/0x7*(-parseInt(_0x3a945d(0x86))/0x8)+-parseInt(_0x3a945d(0x7c))/0x9+-parseInt(_0x3a945d(0x88))/0xa;if(_0x443aba===_0x88d6bc)break;else _0x30c8c2['push'](_0x30c8c2['shift']());}catch(_0x509837){_0x30c8c2['push'](_0x30c8c2['shift']());}}}(a47_0x2534,0x27b0d));import{CliErrors}from'../errors.js';function a47_0x3fce(_0x2d0a64,_0x17bbce){_0x2d0a64=_0x2d0a64-0x7c;var _0x25343c=a47_0x2534();var _0x3fce7d=_0x25343c[_0x2d0a64];return _0x3fce7d;}export function parseJsonParams(_0x50088d){var _0x360607=a47_0x3fce;if(!_0x50088d)return undefined;try{return JSON[_0x360607(0x7f)](_0x50088d);}catch{throw CliErrors[_0x360607(0x83)](_0x360607(0x7d)+_0x50088d);}}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lovrabet/lovrabet-cli",
|
|
3
|
+
"version": "2.0.1-beta.5",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git"
|
|
8
|
+
},
|
|
9
|
+
"bin": {
|
|
10
|
+
"lovrabet": "lib/cli.js"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"module": "lib/cli.js",
|
|
14
|
+
"main": "lib/cli.js",
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=20"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "rimraf lib && tsc && javascript-obfuscator lib --output lib",
|
|
23
|
+
"build:dev": "rimraf lib && tsc",
|
|
24
|
+
"start": "tsc --watch",
|
|
25
|
+
"typecheck": "tsc --noEmit",
|
|
26
|
+
"lint": "echo 'No linter configured yet'",
|
|
27
|
+
"beta-release": "sh scripts/update-beta-version.sh && bun run build && git push && git push origin --tag && bun publish --tag beta",
|
|
28
|
+
"release": "sh scripts/update-latest-version.sh && bun run build && git push && git push origin --tag && bun publish",
|
|
29
|
+
"ci": "npm run typecheck && npm run build",
|
|
30
|
+
"test": "vitest",
|
|
31
|
+
"test:run": "vitest run",
|
|
32
|
+
"test:coverage": "vitest run --coverage"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"lib"
|
|
36
|
+
],
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@lovrabet/sdk": "^1.3.6",
|
|
39
|
+
"@types/winston": "^2.4.4",
|
|
40
|
+
"ink": "^6.2.3",
|
|
41
|
+
"ink-spinner": "^5.0.0",
|
|
42
|
+
"meow": "^13.2.0",
|
|
43
|
+
"react": "^19.2.0",
|
|
44
|
+
"winston": "^3.17.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^24.5.2",
|
|
48
|
+
"@types/react": "^19.2.0",
|
|
49
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
50
|
+
"javascript-obfuscator": "^5.4.1",
|
|
51
|
+
"rimraf": "^6.1.3",
|
|
52
|
+
"typescript": "latest",
|
|
53
|
+
"vitest": "^4.1.2"
|
|
54
|
+
}
|
|
55
|
+
}
|