@lovrabet/lovrabet-cli 2.0.1-beta.5 → 2.0.1-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/help.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa1d23c,_0x3a4bd1){const _0x270995=a0_0x4539,_0x1090a5=_0xa1d23c();while(!![]){try{const _0x5688c4=parseInt(_0x270995(0x150))/0x1+-parseInt(_0x270995(0x147))/0x2*(parseInt(_0x270995(0x14b))/0x3)+-parseInt(_0x270995(0x155))/0x4*(parseInt(_0x270995(0x153))/0x5)+parseInt(_0x270995(0x14d))/0x6*(-parseInt(_0x270995(0x14f))/0x7)+-parseInt(_0x270995(0x154))/0x8*(-parseInt(_0x270995(0x14e))/0x9)+-parseInt(_0x270995(0x14c))/0xa*(-parseInt(_0x270995(0x14a))/0xb)+parseInt(_0x270995(0x148))/0xc*(parseInt(_0x270995(0x15b))/0xd);if(_0x5688c4===_0x3a4bd1)break;else _0x1090a5['push'](_0x1090a5['shift']());}catch(_0x463b0c){_0x1090a5['push'](_0x1090a5['shift']());}}}(a0_0x21b3,0xc085a));function a0_0x4539(_0x13e25a,_0x2c7a41){_0x13e25a=_0x13e25a-0x145;const _0x21b310=a0_0x21b3();let _0x4539e8=_0x21b310[_0x13e25a];return _0x4539e8;}import{jsx as a0_0x408756,jsxs as a0_0x39faf3}from'react/jsx-runtime';function a0_0x21b3(){const _0x53bc26=['return','*\x20Press\x20Enter\x20to\x20start\x20login.','then','gray','dots','131729bWHbYP','finally','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','Logging\x20in...\x20','94230GxDHjK','3084DsTkGD','green','1502908lBOFBM','9TdTirB','10bptakT','18neMHpj','696015nyghQz','2907737FLPNMa','380715eZqVMT','log','*\x20Login\x20successful!','23410uoxaOe','32HmvqGQ','1072QZyWJJ'];a0_0x21b3=function(){return _0x53bc26;};return a0_0x21b3();}import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a0_0x532496 from'ink-spinner';export function AuthServer(){const _0x5d4a1b=a0_0x4539,{exit:_0x18de9b}=useApp(),[_0x458ded,_0x4a6640]=useState(![]),[_0x43bfa6,_0x11ef08]=useState(!![]),[_0x24af00,_0x558988]=useState(![]),[_0x3c9bd1,_0xc246bd]=useState(![]);useEffect(()=>{const _0x5a2ce1=a0_0x4539;getIsSessionValid()[_0x5a2ce1(0x158)](_0x4a6640)[_0x5a2ce1(0x15c)](()=>_0x11ef08(![]));},[]),useEffect(()=>{const _0x362f6c=a0_0x4539;!_0x43bfa6&&_0x458ded&&(console[_0x362f6c(0x151)](_0x362f6c(0x145)),_0x18de9b());},[_0x43bfa6,_0x458ded,_0x18de9b]),useEffect(()=>{const _0x154499=a0_0x4539;_0x3c9bd1&&(console[_0x154499(0x151)](_0x154499(0x152)),_0x18de9b());},[_0x3c9bd1,_0x18de9b]),useInput((_0x58e8de,_0x277dfc)=>{const _0x551abd=a0_0x4539;_0x277dfc[_0x551abd(0x156)]&&(_0x558988(!![]),authServer({'silent':!![]})[_0x551abd(0x158)](_0x227d10=>{_0xc246bd(_0x227d10);})),_0x58e8de==='q'&&_0x18de9b();});if(_0x43bfa6)return null;if(_0x458ded||_0x3c9bd1)return null;return a0_0x408756(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':_0x24af00?a0_0x39faf3(Box,{'children':[a0_0x408756(Box,{'width':'1'}),a0_0x39faf3(Text,{'color':_0x5d4a1b(0x149),'children':[a0_0x408756(a0_0x532496,{'type':_0x5d4a1b(0x15a)}),'\x20\x20']}),a0_0x408756(Text,{'children':_0x5d4a1b(0x146)}),a0_0x408756(Text,{'color':'gray','children':'Please\x20complete\x20login\x20in\x20your\x20browser.'})]}):a0_0x39faf3(Box,{'children':[a0_0x408756(Box,{'width':'1'}),a0_0x408756(Text,{'children':_0x5d4a1b(0x157)}),a0_0x408756(Text,{'color':_0x5d4a1b(0x159),'children':'Press\x20\x22q\x22\x20to\x20exit.'})]})});}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10e5fc,_0x13d32c){const _0x17e5cb=a1_0x2fb5,_0x595348=_0x10e5fc();while(!![]){try{const _0x55471a=parseInt(_0x17e5cb(0xe3))/0x1+-parseInt(_0x17e5cb(0xcc))/0x2+-parseInt(_0x17e5cb(0xd5))/0x3+-parseInt(_0x17e5cb(0xc7))/0x4+-parseInt(_0x17e5cb(0xcd))/0x5*(parseInt(_0x17e5cb(0xcb))/0x6)+-parseInt(_0x17e5cb(0xbc))/0x7+-parseInt(_0x17e5cb(0xd8))/0x8*(-parseInt(_0x17e5cb(0xc0))/0x9);if(_0x55471a===_0x13d32c)break;else _0x595348['push'](_0x595348['shift']());}catch(_0xa3ccc5){_0x595348['push'](_0x595348['shift']());}}}(a1_0x15b7,0xc3502));import{writeFileSync}from'node:fs';import a1_0x1a41d2 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';function a1_0x15b7(){const _0x23d926=['then','xdg-open\x20\x22','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','127.0.0.1','851265LYYfmJ','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','2732072FeoLiL','object','https://dev.lovrabet.com:','port','darwin','win32','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','error','Auth\x20server\x20error:','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','<span\x20id=\x22t\x22>5</span>','836781lUgiRu','createServer','end','platform','utf-8','json','</title></head>\x0a<body>\x0a\x20\x20<div>','catch','🔐\x20Starting\x20login\x20service...','Login\x20successful.\x20Please\x20return\x20to\x20the\x20CLI\x20to\x20continue.\x20This\x20window\x20will\x20close\x20in\x20','5821172lEhGJm','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','listen','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','117yDBzaL','/api/auth/get-session','session','cookie','/sign-in?redirect=','close','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','4905760pdjZDP','https://g.yuntooai.com/cert/lovrabet-dev.json','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','Login\x20Successful','762dYKjCH','1843256oXlBVa','47755orzVQV','headers','log','\x20seconds.'];a1_0x15b7=function(){return _0x23d926;};return a1_0x15b7();}function a1_0x2fb5(_0x228ed0,_0x21b9e0){_0x228ed0=_0x228ed0-0xb5;const _0x15b7b8=a1_0x15b7();let _0x2fb559=_0x15b7b8[_0x228ed0];return _0x2fb559;}import{cookieFile}from'./constant.js';export async function authServer(_0x37a059){const _0x594853=a1_0x2fb5,_0x273945=_0x37a059?.['silent']||![];if(await getIsSessionValid())return!![];const _0x28d9de=await(await fetch(_0x594853(0xc8)))[_0x594853(0xb7)]();return new Promise(async(_0x4d6344,_0x548f5f)=>{const _0x3eb2d1=_0x594853;let _0x7f19f2=0x0;const _0xa2cd5e=a1_0x1a41d2[_0x3eb2d1(0xe4)](_0x28d9de,async(_0x11204e,_0x53bfef)=>{const _0x4baa82=_0x3eb2d1,_0x1f0664=getUserDomain(),_0xebd70c=_0x11204e[_0x4baa82(0xce)][_0x4baa82(0xc3)]||'',_0xc00922=await fetch(_0x1f0664+_0x4baa82(0xc1),{'headers':{'cookie':_0xebd70c}})[_0x4baa82(0xd1)](_0x4c82da=>_0x4c82da[_0x4baa82(0xb7)]()),_0x4130c4=_0xc00922&&_0xc00922[_0x4baa82(0xc2)]&&_0xc00922['user'];if(_0x4130c4){writeFileSync(cookieFile,_0xebd70c,_0x4baa82(0xb6)),_0x4d6344(!![]);const _0x15343f=_0x4baa82(0xca),_0x14486e=_0x4baa82(0xbb)+_0x4baa82(0xe2)+_0x4baa82(0xd0),_0xb80c8=_0x4baa82(0xd3),_0x1c5a81=_0x4baa82(0xe1)+_0x15343f+_0x4baa82(0xb8)+_0x14486e+_0x4baa82(0xc6)+_0xb80c8+_0x4baa82(0xd7);_0x53bfef['writeHead'](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x53bfef['end'](_0x1c5a81),_0xa2cd5e[_0x4baa82(0xc5)]();}else{const _0x3896f4=''+encodeURIComponent(_0x4baa82(0xda)+_0x7f19f2);_0x53bfef['writeHead'](0x12e,{'location':_0x1f0664+_0x4baa82(0xc4)+_0x3896f4}),_0x53bfef[_0x4baa82(0xe5)]();return;}});_0xa2cd5e[_0x3eb2d1(0xbe)](0x0,_0x3eb2d1(0xd4),()=>{const _0x160377=_0x3eb2d1,_0x25f14d=_0xa2cd5e['address']();_0x7f19f2=typeof _0x25f14d===_0x160377(0xd9)&&_0x25f14d?_0x25f14d[_0x160377(0xdb)]:Number(_0x25f14d);const _0x6e0e0c=_0x160377(0xda)+_0x7f19f2;!_0x273945&&(console[_0x160377(0xcf)](_0x160377(0xba)),console[_0x160377(0xcf)]('📍\x20Login\x20URL:',_0x6e0e0c),console[_0x160377(0xcf)](_0x160377(0xde)),console[_0x160377(0xcf)](''),console[_0x160377(0xcf)](_0x160377(0xbf)),console[_0x160377(0xcf)]('')),openInBrowser(_0x6e0e0c)[_0x160377(0xd1)](_0x150ade=>{const _0x33794b=_0x160377;!_0x273945&&(_0x150ade?console[_0x33794b(0xcf)](_0x33794b(0xbd)):(console[_0x33794b(0xcf)](_0x33794b(0xd6)),console['log'](_0x33794b(0xc9),_0x6e0e0c)),console[_0x33794b(0xcf)](''));})[_0x160377(0xb9)](()=>{const _0x2019d8=_0x160377;!_0x273945&&(console[_0x2019d8(0xcf)](_0x2019d8(0xd6)),console[_0x2019d8(0xcf)]('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x6e0e0c),console[_0x2019d8(0xcf)](''));});}),_0xa2cd5e['on'](_0x3eb2d1(0xdf),_0x38727e=>{const _0x4bccaf=_0x3eb2d1;!_0x273945&&console[_0x4bccaf(0xdf)](_0x4bccaf(0xe0),_0x38727e),_0x548f5f(_0x38727e);});});}function openInBrowser(_0x164782){return new Promise(_0x5f8629=>{const _0x3173eb=a1_0x2fb5,_0x5f4514=process[_0x3173eb(0xb5)];let _0x4dbf6d;if(_0x5f4514===_0x3173eb(0xdd))_0x4dbf6d='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0x164782+'\x22';else _0x5f4514===_0x3173eb(0xdc)?_0x4dbf6d='open\x20\x22'+_0x164782+'\x22':_0x4dbf6d=_0x3173eb(0xd2)+_0x164782+'\x22';exec(_0x4dbf6d,_0xe51a56=>{_0xe51a56?_0x5f8629(![]):_0x5f8629(!![]);});});}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a2_0x861a41=a2_0x5bb1;(function(_0x58f5a4,_0x54c64b){const _0x26fc19=a2_0x5bb1,_0x4fd027=_0x58f5a4();while(!![]){try{const _0x9e914c=parseInt(_0x26fc19(0x6e))/0x1+parseInt(_0x26fc19(0x6b))/0x2+parseInt(_0x26fc19(0x6f))/0x3*(-parseInt(_0x26fc19(0x70))/0x4)+-parseInt(_0x26fc19(0x72))/0x5+-parseInt(_0x26fc19(0x68))/0x6*(-parseInt(_0x26fc19(0x69))/0x7)+parseInt(_0x26fc19(0x6a))/0x8*(-parseInt(_0x26fc19(0x6d))/0x9)+parseInt(_0x26fc19(0x6c))/0xa;if(_0x9e914c===_0x54c64b)break;else _0x4fd027['push'](_0x4fd027['shift']());}catch(_0x28263b){_0x4fd027['push'](_0x4fd027['shift']());}}}(a2_0x3f32,0x66528));import{mkdirSync}from'node:fs';function a2_0x5bb1(_0x298c66,_0x134e12){_0x298c66=_0x298c66-0x68;const _0x3f32bf=a2_0x3f32();let _0x5bb15d=_0x3f32bf[_0x298c66];return _0x5bb15d;}import{homedir}from'node:os';function a2_0x3f32(){const _0x146eac=['9DsZsaz','387769VkmrjA','25323YLbVdO','244iswAOJ','.lovrabet','439710yEUffq','610032xKnFMU','7hMuIRj','6503432LPaysz','1032374ndRKdq','8292560xFYOKj'];a2_0x3f32=function(){return _0x146eac;};return a2_0x3f32();}import{join}from'node:path';export const configDir=join(homedir(),a2_0x861a41(0x71));export const cookieFile=join(configDir,'cookie');mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6d5861,_0x3fc66f){var _0x34c347=a3_0x1ad2,_0x17d4f0=_0x6d5861();while(!![]){try{var _0x10837c=parseInt(_0x34c347(0xd1))/0x1+parseInt(_0x34c347(0xd0))/0x2+parseInt(_0x34c347(0xc9))/0x3+-parseInt(_0x34c347(0xcb))/0x4*(-parseInt(_0x34c347(0xc8))/0x5)+parseInt(_0x34c347(0xd2))/0x6+parseInt(_0x34c347(0xcf))/0x7+-parseInt(_0x34c347(0xca))/0x8*(parseInt(_0x34c347(0xcc))/0x9);if(_0x10837c===_0x3fc66f)break;else _0x17d4f0['push'](_0x17d4f0['shift']());}catch(_0x131374){_0x17d4f0['push'](_0x17d4f0['shift']());}}}(a3_0xdcb0,0xa5df0));import{readFileSync}from'node:fs';function a3_0xdcb0(){var _0x5936fd=['2470504xzWuOG','5564583KlviPr','utf-8','trim','6861694vAJVRf','72358DIWjRG','456952gvJiAo','5554992zlOUhh','5oxzfvT','2262036kCYkBP','40ngoikR'];a3_0xdcb0=function(){return _0x5936fd;};return a3_0xdcb0();}function a3_0x1ad2(_0x35542d,_0x1e0c01){_0x35542d=_0x35542d-0xc8;var _0xdcb0fb=a3_0xdcb0();var _0x1ad24c=_0xdcb0fb[_0x35542d];return _0x1ad24c;}import{cookieFile}from'./constant.js';export function getCookie(){var _0x4e73a9=a3_0x1ad2;try{return readFileSync(cookieFile,_0x4e73a9(0xcd))[_0x4e73a9(0xce)]();}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a4_0x389e(_0x437a5a,_0x5214aa){_0x437a5a=_0x437a5a-0xea;const _0x3b2597=a4_0x3b25();let _0x389eb4=_0x3b2597[_0x437a5a];return _0x389eb4;}(function(_0x5377ec,_0xb99355){const _0x39b82c=a4_0x389e,_0x26dd35=_0x5377ec();while(!![]){try{const _0x59bde8=parseInt(_0x39b82c(0xf0))/0x1+parseInt(_0x39b82c(0xea))/0x2*(parseInt(_0x39b82c(0xf2))/0x3)+parseInt(_0x39b82c(0xf5))/0x4+-parseInt(_0x39b82c(0xf6))/0x5+-parseInt(_0x39b82c(0xec))/0x6+parseInt(_0x39b82c(0xee))/0x7*(parseInt(_0x39b82c(0xed))/0x8)+-parseInt(_0x39b82c(0xf7))/0x9*(-parseInt(_0x39b82c(0xef))/0xa);if(_0x59bde8===_0xb99355)break;else _0x26dd35['push'](_0x26dd35['shift']());}catch(_0x3797fd){_0x26dd35['push'](_0x26dd35['shift']());}}}(a4_0x3b25,0x8374a));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a4_0x3b25(){const _0x4d1cac=['2634720DhmPJN','8qMdeFC','1174621bFKrty','10SheAZf','295219cNlSnz','user','3SgeFka','then','trim','630024IwBqit','2353950iMclEr','7442649cfZfZp','session','1726gUYSPs','utf-8'];a4_0x3b25=function(){return _0x4d1cac;};return a4_0x3b25();}export async function getIsSessionValid(){const _0x1fd3d4=a4_0x389e;try{if(!existsSync(cookieFile))return![];const _0x41895d=readFileSync(cookieFile,_0x1fd3d4(0xeb))[_0x1fd3d4(0xf4)](),_0x4ad0fa=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x41895d}})[_0x1fd3d4(0xf3)](_0x19cc17=>_0x19cc17['json']());return _0x4ad0fa&&_0x4ad0fa[_0x1fd3d4(0xf8)]&&_0x4ad0fa[_0x1fd3d4(0xf1)];}catch{}return![];}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1713af,_0x3a5844){var _0xe8436d=a5_0x5fc7,_0x325977=_0x1713af();while(!![]){try{var _0x3b785c=parseInt(_0xe8436d(0x1e7))/0x1+parseInt(_0xe8436d(0x1ee))/0x2*(-parseInt(_0xe8436d(0x1e6))/0x3)+parseInt(_0xe8436d(0x1e9))/0x4+parseInt(_0xe8436d(0x1e5))/0x5*(-parseInt(_0xe8436d(0x1e4))/0x6)+parseInt(_0xe8436d(0x1e3))/0x7+-parseInt(_0xe8436d(0x1ed))/0x8*(parseInt(_0xe8436d(0x1e8))/0x9)+-parseInt(_0xe8436d(0x1eb))/0xa*(-parseInt(_0xe8436d(0x1ea))/0xb);if(_0x3b785c===_0x3a5844)break;else _0x325977['push'](_0x325977['shift']());}catch(_0x103903){_0x325977['push'](_0x325977['shift']());}}}(a5_0xf204,0xa2522));function a5_0xf204(){var _0x4c1bb1=['1288641AeKWwI','23553mnnyAC','3129536XAxHvZ','561SusEwN','137250EvYnPV','!\x20Not\x20logged\x20in','856mSCZZG','2326066cksmQq','log','✓\x20Logged\x20out','3885945SBDraG','7302cxPSsj','5005bnVVLu','3JMnCzB'];a5_0xf204=function(){return _0x4c1bb1;};return a5_0xf204();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a5_0x5fc7(_0x34494f,_0x4f2343){_0x34494f=_0x34494f-0x1e1;var _0xf2043=a5_0xf204();var _0x5fc7d3=_0xf2043[_0x34494f];return _0x5fc7d3;}export function logout(){var _0x82287d=a5_0x5fc7;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x82287d(0x1e2))):console[_0x82287d(0x1e1)](_0x82287d(0x1ec));}
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a6_0xd57509=a6_0x591c;(function(_0x40d9d7,_0x3a6ef6){const _0x5d3ca7=a6_0x591c,_0x5dec67=_0x40d9d7();while(!![]){try{const _0x39f486=parseInt(_0x5d3ca7(0x1f0))/0x1+parseInt(_0x5d3ca7(0x1e8))/0x2*(-parseInt(_0x5d3ca7(0x207))/0x3)+-parseInt(_0x5d3ca7(0x1f1))/0x4+-parseInt(_0x5d3ca7(0x1fe))/0x5*(-parseInt(_0x5d3ca7(0x1e4))/0x6)+-parseInt(_0x5d3ca7(0x1ea))/0x7+-parseInt(_0x5d3ca7(0x1ff))/0x8+parseInt(_0x5d3ca7(0x1f3))/0x9;if(_0x39f486===_0x3a6ef6)break;else _0x5dec67['push'](_0x5dec67['shift']());}catch(_0x3ef3cf){_0x5dec67['push'](_0x5dec67['shift']());}}}(a6_0x24fc,0x2b445));import{jsx as a6_0x266feb}from'react/jsx-runtime';import a6_0x58a3db from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';function a6_0x24fc(){const _0x34c5d5=[':\x20--','exit','args','19332wZSoth','defaultCommand','log','Error:\x20','12328vGmLFU','ERR_STREAM_DESTROYED','2126089ciDFXv','message','Unexpected\x20error:','Hint:\x20','corrected','slice','5693zHJXMH','451852QLIjBF','cancelled','5460633PdMyVB','help','code','assign','length','./framework/preparse.js','exitCode','unknownCommand','flatMap','error','stderr','545CcOxFt','788008TpdDgk','[preparse]\x20','hint','input','flags','ERR_USE_AFTER_CLOSE','ExitPromptError','catch','132cNjuSm'];a6_0x24fc=function(){return _0x34c5d5;};return a6_0x24fc();}import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';function a6_0x591c(_0x2b5a4b,_0x24261a){_0x2b5a4b=_0x2b5a4b-0x1e4;const _0x24fc78=a6_0x24fc();let _0x591c56=_0x24fc78[_0x2b5a4b];return _0x591c56;}const helpText=generateFullHelp(),cli=a6_0x58a3db(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});await run()[a6_0xd57509(0x206)](handleError);async function run(){const _0x1ccdf3=a6_0xd57509,_0x11eaec=cli[_0x1ccdf3(0x202)][0x0];let _0x10159e=cli[_0x1ccdf3(0x202)][0x1];const _0xfa8d97=cli['flags'];try{const {correctFlags:_0x414db5}=await import(_0x1ccdf3(0x1f8)),_0x668cf9=getAllDefinitions()[_0x1ccdf3(0x1fb)](_0x292d2a=>_0x292d2a[_0x1ccdf3(0x203)]??[]),{flags:_0x1a8e9c,corrections:_0xbef601}=_0x414db5(_0xfa8d97,_0x668cf9);if(_0xbef601[_0x1ccdf3(0x1f7)]>0x0){for(const _0x5d4560 of _0xbef601){process[_0x1ccdf3(0x1fd)]['write'](_0x1ccdf3(0x200)+_0x5d4560['handler']+_0x1ccdf3(0x208)+_0x5d4560['original']+'\x20->\x20--'+_0x5d4560[_0x1ccdf3(0x1ee)]+'\x0a');}Object[_0x1ccdf3(0x1f6)](_0xfa8d97,_0x1a8e9c);}}catch{}if(!_0x11eaec||!isKnownService(_0x11eaec)){render(a6_0x266feb(Help,{}));return;}const _0x228675=getServiceEntry(_0x11eaec);if(!_0x10159e){if(_0xfa8d97[_0x1ccdf3(0x1f4)]){console['log'](generateServiceHelp(_0x11eaec));return;}if(_0x228675[_0x1ccdf3(0x1e5)])_0x10159e=_0x228675[_0x1ccdf3(0x1e5)];else{console[_0x1ccdf3(0x1e6)](generateServiceHelp(_0x11eaec));return;}}const _0x130ab0=findDefinition(_0x11eaec,_0x10159e);!_0x130ab0&&(console[_0x1ccdf3(0x1e6)](generateServiceHelp(_0x11eaec)),handleError(CliErrors[_0x1ccdf3(0x1fa)](_0x11eaec+'\x20'+_0x10159e)));if(_0xfa8d97[_0x1ccdf3(0x1f4)]){console[_0x1ccdf3(0x1e6)](generateCommandHelp(_0x130ab0));return;}const _0x2a9690=buildConfigFromFlags(_0xfa8d97);await initGlobalEnvironment(_0x2a9690);const _0x59deb0=createPipelineEnv(_0x2a9690,_0xfa8d97);_0x59deb0[_0x1ccdf3(0x20a)]=cli['input'][_0x1ccdf3(0x1ef)](0x2),await runCommand(_0x130ab0,_0x59deb0);}function handleError(_0x297a32){const _0xe3a0c2=a6_0xd57509;if(_0x297a32 instanceof CliError){_0x297a32[_0xe3a0c2(0x1f5)]===_0xe3a0c2(0x1f2)&&process[_0xe3a0c2(0x209)](0x0);console['error'](_0xe3a0c2(0x1e7)+_0x297a32[_0xe3a0c2(0x1eb)]);if(_0x297a32[_0xe3a0c2(0x201)])console['error'](_0xe3a0c2(0x1ed)+_0x297a32[_0xe3a0c2(0x201)]);process[_0xe3a0c2(0x209)](_0x297a32[_0xe3a0c2(0x1f9)]);}isUserCancellation(_0x297a32)&&process[_0xe3a0c2(0x209)](0x0),console[_0xe3a0c2(0x1fc)](_0xe3a0c2(0x1ec),_0x297a32),process[_0xe3a0c2(0x209)](0x1);}function isUserCancellation(_0x52c59c){const _0x144bda=a6_0xd57509;if(!(_0x52c59c instanceof Error))return![];if(_0x52c59c['name']===_0x144bda(0x205))return!![];if(_0x52c59c[_0x144bda(0x1f5)]===_0x144bda(0x204))return!![];if(_0x52c59c['code']===_0x144bda(0x1e9))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a7_0x3124(){const _0x176ce4=['riskLevel','\x22\x20not\x20found.','write','number','\x20app\x20add\x20<name>\x20--appcode\x20<code>\x20[--env\x20<env>]\x20[--global]','Set\x20as\x20default\x20app.','940jzcwAk','40347jQyuxs','high-risk-write','56FFLUMC','str','17801LQrMGH','remove','\x20app\x20remove\x20<name>\x20[--global]','boolean','\x0aUse\x20`','\x20app\x20\x22','use','Default\x20app\x20changed\x20to\x20\x22','accessKey','read','app','Updated','Added','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','4068QaFjhl','cookie','args','12RhGSrS','string','Risk\x20level','daily','format','Default\x20page\x20size','\x20--appcode\x20<code>`\x20first.','Single-app\x20mode:\x20appcode=','validation','295296XzbkJl','15460AiPcNY','Use\x20global\x20config\x20scope','List\x20all\x20configured\x20apps','map','App\x20profile\x20name\x20to\x20remove','env','locale','keys','2486dXbxFd','No\x20apps\x20configured.\x20Use\x20`','Usage:\x20','bool','join','\x22\x20(appcode:\x20','380RwrrOT','appcode','log','secretKey','defaultApp','\x20app\x20add\x20','Use\x20`','Removed\x20app\x20\x22','\x20\x20env=','Switch\x20the\x20default\x20app','name','entries','App\x20profile\x20name\x20to\x20activate','Remove\x20an\x20app\x20from\x20config','Missing\x20app\x20name.','Output\x20format','Access\x20key','App\x20\x22','5245qVLHwp','pageSize','global','production','flagMissing','apps','280925McShaW','single-app','Auth\x20cookie','add','\x20app\x20use\x20<name>\x20[--global]','Add\x20an\x20app\x20to\x20config','length','../../context.js','Secret\x20key'];a7_0x3124=function(){return _0x176ce4;};return a7_0x3124();}const a7_0x218a72=a7_0x5e38;(function(_0x396774,_0x51c205){const _0x4ab881=a7_0x5e38,_0x281c82=_0x396774();while(!![]){try{const _0x5bb27e=-parseInt(_0x4ab881(0xa4))/0x1+-parseInt(_0x4ab881(0x7e))/0x2*(-parseInt(_0x4ab881(0xc9))/0x3)+-parseInt(_0x4ab881(0xb3))/0x4*(-parseInt(_0x4ab881(0x9e))/0x5)+parseInt(_0x4ab881(0x7d))/0x6+parseInt(_0x4ab881(0xb8))/0x7*(parseInt(_0x4ab881(0xb6))/0x8)+-parseInt(_0x4ab881(0xb4))/0x9*(-parseInt(_0x4ab881(0x8c))/0xa)+-parseInt(_0x4ab881(0x86))/0xb*(parseInt(_0x4ab881(0xc6))/0xc);if(_0x5bb27e===_0x51c205)break;else _0x281c82['push'](_0x281c82['shift']());}catch(_0x1477d0){_0x281c82['push'](_0x281c82['shift']());}}}(a7_0x3124,0x26653));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,migrateLegacySingleApp}from'./shared.js';function a7_0x5e38(_0x1f2bc4,_0x3d7347){_0x1f2bc4=_0x1f2bc4-0x76;const _0x312489=a7_0x3124();let _0x5e38c6=_0x312489[_0x1f2bc4];return _0x5e38c6;}const GLOBAL_FLAG={'name':a7_0x218a72(0xa0),'type':a7_0x218a72(0xbb),'description':a7_0x218a72(0x7f),'default':![]},PROFILE_FLAG_KEYS={'env':a7_0x218a72(0x83),'cookie':a7_0x218a72(0xc7),'accessKey':'accessKey','accesskey':a7_0x218a72(0xc0),'secretKey':a7_0x218a72(0x8f),'secretkey':a7_0x218a72(0x8f),'format':a7_0x218a72(0x78),'pageSize':'pageSize','pagesize':a7_0x218a72(0x9f),'riskLevel':a7_0x218a72(0xad),'risklevel':'riskLevel','locale':'locale'},listDef={'service':a7_0x218a72(0xc2),'command':'list','description':a7_0x218a72(0x80),'risk':a7_0x218a72(0xc1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x375a83){const _0x3f38de=a7_0x218a72,{buildConfigFromFlags:_0x9015fe}=await import(_0x3f38de(0xab)),_0x96a9b3=_0x9015fe({}),{apps:_0x59c607,defaultApp:_0x174996,currentApp:_0x157dda}=_0x96a9b3,_0x3b0f82=Object[_0x3f38de(0x97)](_0x59c607);if(_0x3b0f82['length']===0x0){const _0x20db5f=_0x96a9b3['appCode'];if(_0x20db5f)return{'ok':!![],'data':{'mode':_0x3f38de(0xa5),'appcode':_0x20db5f,'env':_0x96a9b3[_0x3f38de(0x83)]},'message':_0x3f38de(0x7b)+_0x20db5f+_0x3f38de(0x94)+_0x96a9b3[_0x3f38de(0x83)]+_0x3f38de(0xbc)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20enable\x20multi-app\x20mode.'};return{'ok':!![],'data':[],'message':_0x3f38de(0x87)+CLI_BIN_NAME+_0x3f38de(0xc5)};}const _0x5c3f38=_0x3b0f82[_0x3f38de(0x81)](([_0x1bdb8b,_0x28ac1a])=>({'name':_0x1bdb8b,'appcode':_0x28ac1a['appcode'],'isDefault':_0x1bdb8b===_0x174996,'isCurrent':_0x1bdb8b===(_0x157dda??_0x174996),'env':_0x28ac1a[_0x3f38de(0x83)]??null,'hasCookie':!!_0x28ac1a[_0x3f38de(0xc7)],'hasAccessKey':!!_0x28ac1a[_0x3f38de(0xc0)],'format':_0x28ac1a['format']??null,'pageSize':_0x28ac1a['pageSize']??null,'riskLevel':_0x28ac1a['riskLevel']??null,'locale':_0x28ac1a[_0x3f38de(0x84)]??null}));return{'ok':!![],'data':_0x5c3f38};}},useDef={'service':a7_0x218a72(0xc2),'command':a7_0x218a72(0xbe),'description':a7_0x218a72(0x95),'risk':a7_0x218a72(0xaf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a7_0x218a72(0x96),'description':a7_0x218a72(0x98),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x2b0689){const _0x287fce=a7_0x218a72,_0xb3d8ad=_0x2b0689[_0x287fce(0xc8)][0x0];if(!_0xb3d8ad)throw CliErrors[_0x287fce(0x7c)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x287fce(0xa8));const _0x338939=readConfig({'global':_0x2b0689[_0x287fce(0x89)](_0x287fce(0xa0))}),_0x51b0b2=_0x338939[_0x287fce(0xa3)]||{};if(!_0x51b0b2[_0xb3d8ad]){const _0xef5aab=Object[_0x287fce(0x85)](_0x51b0b2),_0x432c26=_0xef5aab[_0x287fce(0xaa)]===0x0?_0x287fce(0x92)+CLI_BIN_NAME+_0x287fce(0x91)+_0xb3d8ad+_0x287fce(0x7a):'Available:\x20'+_0xef5aab[_0x287fce(0x8a)](',\x20');throw CliErrors[_0x287fce(0x7c)](_0x287fce(0x9d)+_0xb3d8ad+_0x287fce(0xae),_0x432c26);}return _0x338939[_0x287fce(0x90)]=_0xb3d8ad,writeConfig(_0x338939,{'global':_0x2b0689['bool'](_0x287fce(0xa0))}),console[_0x287fce(0x8e)]('Default\x20app\x20set\x20to\x20\x22'+_0xb3d8ad+_0x287fce(0x8b)+_0x51b0b2[_0xb3d8ad][_0x287fce(0x8d)]+')'+scopeLabel({'global':_0x2b0689[_0x287fce(0x89)](_0x287fce(0xa0))})),{'ok':!![]};}},addFlags=[{'name':a7_0x218a72(0x8d),'type':a7_0x218a72(0xca),'description':'App\x20code\x20(required)','required':!![]},GLOBAL_FLAG,{'name':a7_0x218a72(0x83),'type':a7_0x218a72(0xca),'description':'Target\x20environment','enum':[a7_0x218a72(0xa1),a7_0x218a72(0x77)]},{'name':a7_0x218a72(0xc7),'type':a7_0x218a72(0xca),'description':a7_0x218a72(0xa6)},{'name':'accessKey','type':a7_0x218a72(0xca),'description':a7_0x218a72(0x9c)},{'name':a7_0x218a72(0x8f),'type':a7_0x218a72(0xca),'description':a7_0x218a72(0xac)},{'name':a7_0x218a72(0x78),'type':a7_0x218a72(0xca),'description':a7_0x218a72(0x9b),'enum':['json','pretty','table']},{'name':a7_0x218a72(0x9f),'type':a7_0x218a72(0xb0),'description':a7_0x218a72(0x79)},{'name':a7_0x218a72(0xad),'type':a7_0x218a72(0xca),'description':a7_0x218a72(0x76),'enum':[a7_0x218a72(0xc1),'write',a7_0x218a72(0xb5)]},{'name':a7_0x218a72(0x84),'type':a7_0x218a72(0xca),'description':'Locale'}],addDef={'service':a7_0x218a72(0xc2),'command':a7_0x218a72(0xa7),'description':a7_0x218a72(0xa9),'risk':a7_0x218a72(0xaf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a7_0x218a72(0x96),'description':'App\x20profile\x20name\x20(used\x20to\x20switch\x20between\x20apps)','required':!![]}],'flags':addFlags,async 'execute'(_0x2577fc){const _0x43428b=a7_0x218a72,_0x4d2466=_0x2577fc[_0x43428b(0xc8)][0x0];if(!_0x4d2466)throw CliErrors[_0x43428b(0x7c)](_0x43428b(0x9a),_0x43428b(0x88)+CLI_BIN_NAME+_0x43428b(0xb1));const _0x3761d8=_0x2577fc[_0x43428b(0xb7)](_0x43428b(0x8d));if(!_0x3761d8)throw CliErrors[_0x43428b(0xa2)](_0x43428b(0x8d),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>');const _0x46afc9={'global':_0x2577fc['bool'](_0x43428b(0xa0))},_0x3ee9f7=readConfig(_0x46afc9);if(!_0x3ee9f7[_0x43428b(0xa3)])_0x3ee9f7[_0x43428b(0xa3)]={};Object[_0x43428b(0x85)](_0x3ee9f7[_0x43428b(0xa3)])[_0x43428b(0xaa)]===0x0&&migrateLegacySingleApp(_0x3ee9f7,_0x4d2466);const _0x4513d8={'appcode':_0x3761d8};for(const [_0x3c7378,_0x110a23]of Object[_0x43428b(0x97)](PROFILE_FLAG_KEYS)){const _0x1ad116=_0x2577fc['str'](_0x3c7378);_0x1ad116&&(_0x4513d8[_0x110a23]=_0x110a23===_0x43428b(0x9f)?Number(_0x1ad116):_0x1ad116);}const _0x3364b5=!!_0x3ee9f7[_0x43428b(0xa3)][_0x4d2466];return _0x3ee9f7[_0x43428b(0xa3)][_0x4d2466]=_0x4513d8,!_0x3ee9f7[_0x43428b(0x90)]&&(_0x3ee9f7[_0x43428b(0x90)]=_0x4d2466),writeConfig(_0x3ee9f7,_0x46afc9),console[_0x43428b(0x8e)]((_0x3364b5?_0x43428b(0xc3):_0x43428b(0xc4))+_0x43428b(0xbd)+_0x4d2466+_0x43428b(0x8b)+_0x3761d8+')'+scopeLabel(_0x46afc9)),_0x3ee9f7[_0x43428b(0x90)]===_0x4d2466&&!_0x3364b5&&console[_0x43428b(0x8e)](_0x43428b(0xb2)),{'ok':!![]};}},removeDef={'service':a7_0x218a72(0xc2),'command':a7_0x218a72(0xb9),'description':a7_0x218a72(0x99),'risk':a7_0x218a72(0xb5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a7_0x218a72(0x96),'description':a7_0x218a72(0x82),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x20442b){const _0x28f636=a7_0x218a72,_0x56340a=_0x20442b[_0x28f636(0xc8)][0x0];if(!_0x56340a)throw CliErrors[_0x28f636(0x7c)](_0x28f636(0x9a),_0x28f636(0x88)+CLI_BIN_NAME+_0x28f636(0xba));const _0xee7024={'global':_0x20442b['bool'](_0x28f636(0xa0))},_0x47eaf8=readConfig(_0xee7024);if(!_0x47eaf8['apps']||!_0x47eaf8[_0x28f636(0xa3)][_0x56340a])throw CliErrors['validation'](_0x28f636(0x9d)+_0x56340a+_0x28f636(0xae));delete _0x47eaf8[_0x28f636(0xa3)][_0x56340a];if(_0x47eaf8[_0x28f636(0x90)]===_0x56340a){const _0x2021ee=Object[_0x28f636(0x85)](_0x47eaf8[_0x28f636(0xa3)]);_0x47eaf8[_0x28f636(0x90)]=_0x2021ee[_0x28f636(0xaa)]>0x0?_0x2021ee[0x0]:undefined,_0x47eaf8[_0x28f636(0x90)]?console['log'](_0x28f636(0xbf)+_0x47eaf8[_0x28f636(0x90)]+'\x22.'):delete _0x47eaf8['defaultApp'];}return Object[_0x28f636(0x85)](_0x47eaf8[_0x28f636(0xa3)])[_0x28f636(0xaa)]===0x0&&(delete _0x47eaf8[_0x28f636(0xa3)],delete _0x47eaf8['defaultApp']),writeConfig(_0x47eaf8,_0xee7024),console[_0x28f636(0x8e)](_0x28f636(0x93)+_0x56340a+'\x22.'),{'ok':!![]};}};export const appDefinitions=[listDef,useDef,addDef,removeDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a0ba3,_0x556265){const _0x519470=a8_0x3d47,_0xc07bba=_0x4a0ba3();while(!![]){try{const _0x10eee2=-parseInt(_0x519470(0x195))/0x1*(-parseInt(_0x519470(0x1a4))/0x2)+-parseInt(_0x519470(0x19f))/0x3+parseInt(_0x519470(0x193))/0x4+-parseInt(_0x519470(0x191))/0x5*(parseInt(_0x519470(0x194))/0x6)+parseInt(_0x519470(0x198))/0x7*(parseInt(_0x519470(0x19b))/0x8)+parseInt(_0x519470(0x19d))/0x9+-parseInt(_0x519470(0x1a1))/0xa;if(_0x10eee2===_0x556265)break;else _0xc07bba['push'](_0xc07bba['shift']());}catch(_0xbc09ae){_0xc07bba['push'](_0xc07bba['shift']());}}}(a8_0x32a0,0x48437));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig as readConfig,writeScopedConfig as writeConfig}from'../../context.js';function a8_0x3d47(_0x2a6830,_0x56ca62){_0x2a6830=_0x2a6830-0x18d;const _0x32a079=a8_0x32a0();let _0x3d478a=_0x32a079[_0x2a6830];return _0x3d478a;}export function scopeLabel(_0xd7ca92){const _0x52a5a3=a8_0x3d47;return _0xd7ca92[_0x52a5a3(0x1a2)]?_0x52a5a3(0x1a0):'';}export function migrateLegacySingleApp(_0x524a9e,_0xb72d4c){const _0x1b1d2b=a8_0x3d47,_0xeb29df=_0x524a9e[_0x1b1d2b(0x19e)]||_0x524a9e[_0x1b1d2b(0x18f)];if(!_0xeb29df)return;const _0x42905c=String(_0xeb29df);if(_0x42905c===_0xb72d4c)return;const _0x5e5584={'appcode':_0xeb29df};if(_0x524a9e[_0x1b1d2b(0x19a)])_0x5e5584[_0x1b1d2b(0x19a)]=_0x524a9e[_0x1b1d2b(0x19a)];if(_0x524a9e['cookie'])_0x5e5584[_0x1b1d2b(0x1a3)]=_0x524a9e[_0x1b1d2b(0x1a3)];if(_0x524a9e[_0x1b1d2b(0x19c)])_0x5e5584[_0x1b1d2b(0x19c)]=_0x524a9e[_0x1b1d2b(0x19c)];if(_0x524a9e[_0x1b1d2b(0x18d)])_0x5e5584[_0x1b1d2b(0x18d)]=_0x524a9e[_0x1b1d2b(0x18d)];if(_0x524a9e[_0x1b1d2b(0x199)])_0x5e5584[_0x1b1d2b(0x199)]=_0x524a9e[_0x1b1d2b(0x199)];if(_0x524a9e['pageSize'])_0x5e5584[_0x1b1d2b(0x18e)]=_0x524a9e[_0x1b1d2b(0x18e)];if(_0x524a9e['riskLevel'])_0x5e5584[_0x1b1d2b(0x190)]=_0x524a9e[_0x1b1d2b(0x190)];if(_0x524a9e[_0x1b1d2b(0x197)])_0x5e5584[_0x1b1d2b(0x197)]=_0x524a9e[_0x1b1d2b(0x197)];_0x524a9e[_0x1b1d2b(0x1a5)][_0x42905c]=_0x5e5584,_0x524a9e[_0x1b1d2b(0x196)]=_0x42905c,delete _0x524a9e['appcode'],delete _0x524a9e['app'],console['log']('Migrated\x20existing\x20app\x20\x22'+_0x42905c+_0x1b1d2b(0x192));}function a8_0x32a0(){const _0x1f48af=['secretKey','pageSize','app','riskLevel','11525pPXlAb','\x22\x20to\x20multi-app\x20config\x20(set\x20as\x20default).','1512160zCFgcA','150GUBbTM','1thcQmY','defaultApp','locale','2899708mQfAbl','format','env','8tuEZZE','accessKey','2116818IFJPQu','appcode','970785pQOCRZ','\x20(global)','4817070niDfVm','global','cookie','262864RkEDnY','apps'];a8_0x32a0=function(){return _0x1f48af;};return a8_0x32a0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a9_0x57b1bf=a9_0x4dad;(function(_0x4e7816,_0x1725f6){const _0x1d1dcc=a9_0x4dad,_0x45652e=_0x4e7816();while(!![]){try{const _0xbde4d6=parseInt(_0x1d1dcc(0x19d))/0x1*(-parseInt(_0x1d1dcc(0x1aa))/0x2)+parseInt(_0x1d1dcc(0x1af))/0x3*(-parseInt(_0x1d1dcc(0x1a4))/0x4)+-parseInt(_0x1d1dcc(0x19e))/0x5+parseInt(_0x1d1dcc(0x1a5))/0x6+parseInt(_0x1d1dcc(0x1ae))/0x7*(parseInt(_0x1d1dcc(0x1a6))/0x8)+parseInt(_0x1d1dcc(0x1ac))/0x9+-parseInt(_0x1d1dcc(0x1a3))/0xa*(-parseInt(_0x1d1dcc(0x1a2))/0xb);if(_0xbde4d6===_0x1725f6)break;else _0x45652e['push'](_0x45652e['shift']());}catch(_0x1c7617){_0x45652e['push'](_0x45652e['shift']());}}}(a9_0x127e,0x39066));function a9_0x127e(){const _0x5e4ce4=['read','Login\x20via\x20browser','auth','4338169bSEdZA','10Sgrxko','1047084MMovQq','1689762FDSsTj','112Rvghcy','write','Clear\x20login\x20session','log','17288zqtylM','✓\x20Logged\x20out','4163670RnIJjg','!\x20Not\x20logged\x20in','147JDAQtb','3AERWjM','53TPQIDN','927265JtSFXM'];a9_0x127e=function(){return _0x5e4ce4;};return a9_0x127e();}function a9_0x4dad(_0x43273e,_0x2d00f4){_0x43273e=_0x43273e-0x19d;const _0x127ea5=a9_0x127e();let _0x4dad98=_0x127ea5[_0x43273e];return _0x4dad98;}import{jsx as a9_0x4c4056}from'react/jsx-runtime';import{unlinkSync,existsSync}from'node:fs';import{render}from'ink';import{cookieFile}from'../../auth/constant.js';import{AuthServer}from'../../auth/auth-server-ui.js';export const authDefinitions=[{'service':'auth','command':'login','description':a9_0x57b1bf(0x1a0),'risk':a9_0x57b1bf(0x19f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1e06b3){return render(a9_0x4c4056(AuthServer,{})),{'ok':!![]};}},{'service':a9_0x57b1bf(0x1a1),'command':'logout','description':a9_0x57b1bf(0x1a8),'risk':a9_0x57b1bf(0x1a7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x362dd8){const _0x7f9600=a9_0x57b1bf;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x7f9600(0x1a9)](_0x7f9600(0x1ab))):console[_0x7f9600(0x1a9)](_0x7f9600(0x1ad)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a10_0x48d6(_0x41b443,_0x50e53e){_0x41b443=_0x41b443-0x162;const _0x26992a=a10_0x2699();let _0x48d6d8=_0x26992a[_0x41b443];return _0x48d6d8;}const a10_0x548db8=a10_0x48d6;(function(_0x47fb92,_0x1413ad){const _0x3d20df=a10_0x48d6,_0x5d51d3=_0x47fb92();while(!![]){try{const _0x4b5c43=parseInt(_0x3d20df(0x16f))/0x1*(parseInt(_0x3d20df(0x172))/0x2)+parseInt(_0x3d20df(0x163))/0x3+-parseInt(_0x3d20df(0x165))/0x4+parseInt(_0x3d20df(0x16c))/0x5*(-parseInt(_0x3d20df(0x174))/0x6)+-parseInt(_0x3d20df(0x175))/0x7*(-parseInt(_0x3d20df(0x171))/0x8)+parseInt(_0x3d20df(0x167))/0x9+-parseInt(_0x3d20df(0x166))/0xa;if(_0x4b5c43===_0x1413ad)break;else _0x5d51d3['push'](_0x5d51d3['shift']());}catch(_0x23b3b4){_0x5d51d3['push'](_0x5d51d3['shift']());}}}(a10_0x2699,0xa93de));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../common/flags.js';function a10_0x2699(){const _0xbfbe56=['319389pqAzRz','bool','3008883rIrzaV','bff','2124588VYMeiX','8896720PjsUaw','10024920LzTBeA','num','appCode','(none)','description','5bEbStk','updatedTime','read','118267eZZpZk','scriptType','32wFWZvu','10UaGlFW','functionName','4659906FcTBTH'];a10_0x2699=function(){return _0xbfbe56;};return a10_0x2699();}export const bffDetail={'service':a10_0x548db8(0x164),'command':'detail','description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a10_0x548db8(0x16e),'requiresCookieAuth':!![],'flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0x26ac18){const _0x15c2b6=a10_0x548db8,_0x32e309=await getBffScriptInfo(_0x26ac18[_0x15c2b6(0x168)]('id')),_0x48a4ef=_0x26ac18[_0x15c2b6(0x162)]('verbose');if(_0x48a4ef)return{'ok':!![],'data':_0x32e309};return{'ok':!![],'data':{'id':_0x32e309['id'],'appCode':_0x32e309[_0x15c2b6(0x169)],'functionName':_0x32e309[_0x15c2b6(0x173)]??'','scriptType':_0x32e309[_0x15c2b6(0x170)],'description':_0x32e309[_0x15c2b6(0x16b)]||_0x15c2b6(0x16a),'createdTime':_0x32e309['createdTime']??'','updatedTime':_0x32e309[_0x15c2b6(0x16d)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x5a13b0=a11_0x4d0e;function a11_0x4c43(){const _0x3e4c7e=['now','BFF\x20function\x20name\x20to\x20execute','4621659ArJeyp','45QXczCG','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','15iSJrgt','params','name','BFF\x20executed\x20in\x20','exec','912008lbSYmD','2606088pZePjy','463479ycuSdB','bff','880008eDnqhf','2ZfuHiC','str','6189840UKbwyv','451134dofkAJ'];a11_0x4c43=function(){return _0x3e4c7e;};return a11_0x4c43();}(function(_0x4563a9,_0x1c026d){const _0x471268=a11_0x4d0e,_0x39ff19=_0x4563a9();while(!![]){try{const _0x238c46=parseInt(_0x471268(0xb7))/0x1*(parseInt(_0x471268(0xba))/0x2)+-parseInt(_0x471268(0xaa))/0x3+-parseInt(_0x471268(0xb6))/0x4+-parseInt(_0x471268(0xb0))/0x5*(-parseInt(_0x471268(0xb9))/0x6)+-parseInt(_0x471268(0xad))/0x7+parseInt(_0x471268(0xb5))/0x8*(parseInt(_0x471268(0xae))/0x9)+parseInt(_0x471268(0xa9))/0xa;if(_0x238c46===_0x1c026d)break;else _0x39ff19['push'](_0x39ff19['shift']());}catch(_0x4ec04a){_0x39ff19['push'](_0x39ff19['shift']());}}}(a11_0x4c43,0x99e3f));import{executeSdkBff}from'../../core/sdk-client.js';function a11_0x4d0e(_0x5edc35,_0x3118f6){_0x5edc35=_0x5edc35-0xa9;const _0x4c43b4=a11_0x4c43();let _0x4d0ea0=_0x4c43b4[_0x5edc35];return _0x4d0ea0;}import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../common/flags.js';export const bffExec={'service':a11_0x5a13b0(0xb8),'command':a11_0x5a13b0(0xb4),'description':a11_0x5a13b0(0xaf),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a11_0x5a13b0(0xac)},PARAMS_FLAG],async 'execute'(_0xf4410){const _0x2afc5d=a11_0x5a13b0,_0x295c08=parseJsonParams(_0xf4410['str'](_0x2afc5d(0xb1))),_0x13d00a=Date[_0x2afc5d(0xab)](),_0x48d2a5=await executeSdkBff(_0xf4410[_0x2afc5d(0xbb)](_0x2afc5d(0xb2)),_0x295c08),_0x42ea4e=Date[_0x2afc5d(0xab)]()-_0x13d00a;return{'ok':!![],'data':{'result':_0x48d2a5,'elapsed':_0x42ea4e},'message':_0x2afc5d(0xb3)+_0x42ea4e+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a12_0x4803(_0x181ae8,_0x4538c5){_0x181ae8=_0x181ae8-0x16f;const _0x528369=a12_0x5283();let _0x480354=_0x528369[_0x181ae8];return _0x480354;}(function(_0x353885,_0x4cfe46){const _0x5ad36c=a12_0x4803,_0x22835e=_0x353885();while(!![]){try{const _0x304d99=parseInt(_0x5ad36c(0x171))/0x1*(parseInt(_0x5ad36c(0x179))/0x2)+-parseInt(_0x5ad36c(0x172))/0x3*(parseInt(_0x5ad36c(0x178))/0x4)+-parseInt(_0x5ad36c(0x17c))/0x5*(parseInt(_0x5ad36c(0x177))/0x6)+parseInt(_0x5ad36c(0x175))/0x7*(parseInt(_0x5ad36c(0x16f))/0x8)+parseInt(_0x5ad36c(0x17a))/0x9*(parseInt(_0x5ad36c(0x170))/0xa)+parseInt(_0x5ad36c(0x17b))/0xb*(-parseInt(_0x5ad36c(0x173))/0xc)+parseInt(_0x5ad36c(0x174))/0xd*(-parseInt(_0x5ad36c(0x176))/0xe);if(_0x304d99===_0x4cfe46)break;else _0x22835e['push'](_0x22835e['shift']());}catch(_0x2e110e){_0x22835e['push'](_0x22835e['shift']());}}}(a12_0x5283,0x6026a));import{bffDetail}from'./detail.js';import{bffExec}from'./exec.js';function a12_0x5283(){const _0x39b15d=['5304qdhdoa','338sCNmTH','49441AxsIAW','36582NtcDOZ','126264uONrBY','16RmSMmL','534190UEnhtC','9yUVDuY','10109LhlsBp','85VFkAAR','752mdDOvf','2566540kckYUg','2nVhROp','171786dAZGgC'];a12_0x5283=function(){return _0x39b15d;};return a12_0x5283();}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2bde0b,_0x691945){const _0x4576ab=a13_0x2637,_0x1ea383=_0x2bde0b();while(!![]){try{const _0x5ce05b=-parseInt(_0x4576ab(0x165))/0x1+parseInt(_0x4576ab(0x164))/0x2+parseInt(_0x4576ab(0x171))/0x3*(-parseInt(_0x4576ab(0x172))/0x4)+-parseInt(_0x4576ab(0x170))/0x5+-parseInt(_0x4576ab(0x179))/0x6+-parseInt(_0x4576ab(0x168))/0x7+-parseInt(_0x4576ab(0x16a))/0x8*(-parseInt(_0x4576ab(0x166))/0x9);if(_0x5ce05b===_0x691945)break;else _0x1ea383['push'](_0x1ea383['shift']());}catch(_0x1b29cd){_0x1ea383['push'](_0x1ea383['shift']());}}}(a13_0x4b49,0xca2f6));import{CliErrors}from'../../errors.js';function isSet(_0x158470,_0x4cf963){const _0x2c9f35=a13_0x2637,_0x470432=_0x158470[_0x2c9f35(0x16f)](_0x4cf963);return _0x470432!==undefined&&_0x470432!==''&&_0x470432!==![]&&_0x470432!==0x0;}function fmtNames(_0xedda42){return _0xedda42['map'](_0x568497=>'--'+_0x568497)['join'](',\x20');}export function requireOneOf(_0x3d393f,_0x4cf52d,_0x5baadd){const _0x4e22d8=a13_0x2637,_0x29b461=_0x4cf52d[_0x4e22d8(0x175)](_0x558fbf=>isSet(_0x3d393f,_0x558fbf));if(_0x29b461[_0x4e22d8(0x177)]!==0x1)throw CliErrors[_0x4e22d8(0x16b)](_0x29b461[_0x4e22d8(0x177)]===0x0?_0x4e22d8(0x16d)+fmtNames(_0x4cf52d)+_0x4e22d8(0x174)+_0x5baadd+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x4cf52d)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x29b461)+'.',_0x29b461[_0x4e22d8(0x177)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x4cf52d):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x149209,_0x3e604b,_0x203c5f){const _0xc39405=a13_0x2637;if(!_0x3e604b[_0xc39405(0x167)](_0x552814=>isSet(_0x149209,_0x552814)))throw CliErrors[_0xc39405(0x16b)](_0xc39405(0x169)+fmtNames(_0x3e604b)+'\x20is\x20required\x20for\x20`'+_0x203c5f+'`.',_0xc39405(0x16c)+fmtNames(_0x3e604b));}export function mutuallyExclusive(_0x5de100,_0x49fe16,_0x3e2119){const _0x1c093a=a13_0x2637,_0x543a14=_0x49fe16[_0x1c093a(0x175)](_0x211649=>isSet(_0x5de100,_0x211649));if(_0x543a14[_0x1c093a(0x177)]>0x1)throw CliErrors['validation']('Flags\x20'+fmtNames(_0x543a14)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x3e2119+'`.',_0x1c093a(0x173)+fmtNames(_0x49fe16));}function a13_0x2637(_0x3abfac,_0x47d26f){_0x3abfac=_0x3abfac-0x163;const _0x4b4959=a13_0x4b49();let _0x2637a2=_0x4b4959[_0x3abfac];return _0x2637a2;}export function validatePattern(_0x1cae53,_0x16cfea,_0x337d79,_0x3b1a8e){const _0x409efe=a13_0x2637,_0x5d5d03=_0x1cae53[_0x409efe(0x178)](_0x16cfea);if(_0x5d5d03&&!_0x337d79['test'](_0x5d5d03))throw CliErrors[_0x409efe(0x16b)](_0x409efe(0x176)+_0x16cfea+_0x409efe(0x16e)+_0x3b1a8e+_0x409efe(0x163)+_0x5d5d03+'\x22.');}function a13_0x4b49(){const _0x2adcc1=['validation','Provide\x20one\x20of:\x20','Exactly\x20one\x20of\x20',':\x20expected\x20','flag','2300600AluBCc','3861966BKBRVY','4IVAlFt','Use\x20only\x20one\x20of:\x20','\x20is\x20required\x20for\x20`','filter','Invalid\x20--','length','str','7368744NFbVMG',',\x20got\x20\x22','28576eiJZHK','367771lXNYkf','377343tkSbQE','some','8759688MIQliL','At\x20least\x20one\x20of\x20','1032BdSUEn'];a13_0x4b49=function(){return _0x2adcc1;};return a13_0x4b49();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a14_0x592a07=a14_0x5570;(function(_0x2e43fe,_0x2f1661){const _0x55d7a6=a14_0x5570,_0xf302f5=_0x2e43fe();while(!![]){try{const _0x5ba665=-parseInt(_0x55d7a6(0x8b))/0x1*(-parseInt(_0x55d7a6(0x90))/0x2)+parseInt(_0x55d7a6(0x88))/0x3+parseInt(_0x55d7a6(0x91))/0x4+parseInt(_0x55d7a6(0x8d))/0x5+parseInt(_0x55d7a6(0x80))/0x6+-parseInt(_0x55d7a6(0x83))/0x7*(-parseInt(_0x55d7a6(0x82))/0x8)+parseInt(_0x55d7a6(0x7f))/0x9*(-parseInt(_0x55d7a6(0x85))/0xa);if(_0x5ba665===_0x2f1661)break;else _0xf302f5['push'](_0xf302f5['shift']());}catch(_0x1d249d){_0xf302f5['push'](_0xf302f5['shift']());}}}(a14_0x570c,0xbe108));export const CODE_FLAG={'name':a14_0x592a07(0x8e),'type':a14_0x592a07(0x95),'required':!![],'description':a14_0x592a07(0x81),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a14_0x592a07(0x8f)}};export const SQLCODE_FLAG={'name':a14_0x592a07(0x8a),'type':a14_0x592a07(0x95),'required':!![],'description':a14_0x592a07(0x92),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a14_0x592a07(0x93)}};export const VERBOSE_FLAG={'name':a14_0x592a07(0x86),'type':a14_0x592a07(0x8c),'description':a14_0x592a07(0x87)};export const PARAMS_FLAG={'name':a14_0x592a07(0x94),'type':'string','description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':a14_0x592a07(0x89),'type':'string','description':a14_0x592a07(0x96)};function a14_0x570c(){const _0x212d65=['boolean','5746900VvPFMk','code','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','27502SKuuUY','547928nOtlWu','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','params','string','Resource\x20name\x20for\x20lookup','11601sxImeI','5171952xRFMUv','Dataset\x20code\x20(32-char\x20hex\x20UUID)','371688DAoLiI','77HkXyhN','number','32510Mrdiim','verbose','Return\x20full\x20raw\x20response\x20object','4494927CeSkmp','name','sqlcode','59HSmYrb'];a14_0x570c=function(){return _0x212d65;};return a14_0x570c();}function a14_0x5570(_0x556ee5,_0x36d415){_0x556ee5=_0x556ee5-0x7f;const _0x570c04=a14_0x570c();let _0x5570ed=_0x570c04[_0x556ee5];return _0x5570ed;}export const ID_FLAG={'name':'id','type':a14_0x592a07(0x84),'required':!![],'description':'Resource\x20ID'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a15_0xc34e13=a15_0x5cff;(function(_0x3ca2f5,_0x1a4282){const _0xbd6df2=a15_0x5cff,_0x2d1e1=_0x3ca2f5();while(!![]){try{const _0xb0fd65=-parseInt(_0xbd6df2(0xe9))/0x1*(parseInt(_0xbd6df2(0x105))/0x2)+parseInt(_0xbd6df2(0x132))/0x3*(parseInt(_0xbd6df2(0x10b))/0x4)+-parseInt(_0xbd6df2(0x124))/0x5*(-parseInt(_0xbd6df2(0x106))/0x6)+parseInt(_0xbd6df2(0x120))/0x7+parseInt(_0xbd6df2(0x10e))/0x8*(parseInt(_0xbd6df2(0xfb))/0x9)+parseInt(_0xbd6df2(0x104))/0xa*(-parseInt(_0xbd6df2(0x10c))/0xb)+-parseInt(_0xbd6df2(0xfe))/0xc;if(_0xb0fd65===_0x1a4282)break;else _0x2d1e1['push'](_0x2d1e1['shift']());}catch(_0x2bf2eb){_0x2d1e1['push'](_0x2d1e1['shift']());}}}(a15_0x4bc3,0xec2d6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,TOP_LEVEL_KEYS,APP_PROFILE_KEYS,ENUM_KEYS,readScopedConfig,writeScopedConfig}from'./shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';function a15_0x4bc3(){const _0xda386a=['`\x20from\x20app\x20\x22','Config\x20key\x20(supports\x20dot\x20notation:\x20apps.myapp.env)','\x22\x20not\x20found\x20on\x20app\x20\x22','Deleted\x20`','3762CCuMlL','delete','args','16956120oSOEeP','write','log','Value\x20to\x20assign','Delete\x20a\x20config\x20value','Top-level\x20key\x20\x22','78530ViEpan','28920WLXYDv','10056IeLTFB','join','\x20\x20project:\x20','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','list','703820vCFstL','1749bFLQTs','riskLevel','15400gqqQPN','\x20(global)','\x22.\x20Allowed:\x20','\x22\x20on\x20app\x20profile.','\x22\x20not\x20found\x20in\x20config.','Missing\x20key\x20argument.','bool','global','Available\x20for\x20--app:\x20','validation','\x20app\x20add`.','Invalid\x20value\x20for\x20\x22','read','Settable\x20top-level\x20keys:\x20','config','object','Get\x20a\x20config\x20value','`\x20=\x20\x22','5625816UYhuGJ','Set\x20a\x20config\x20value','str','stringify','5230WNhdrc','string','set','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a','get','\x0aConfig\x20files:','has','includes','Config\x20key\x20to\x20delete','\x22\x20not\x20found\x20at\x20top\x20level.','List\x20current\x20config','\x22\x20on\x20app\x20\x22','Usage:\x20','key','9wKnDhQ','Operate\x20within\x20a\x20specific\x20app\x20profile','Add\x20it\x20first\x20with\x20`','../../context.js','18EhDpXu','split','Cannot\x20set\x20\x22','Set\x20`','\x22\x20not\x20found.','(none)','apps','Config\x20key\x20to\x20set','\x22\x20is\x20not\x20settable.','value','Key\x20not\x20found:\x20','Key\x20\x22','App\x20\x22','app'];a15_0x4bc3=function(){return _0xda386a;};return a15_0x4bc3();}function a15_0x5cff(_0x4432ae,_0x84b672){_0x4432ae=_0x4432ae-0xe6;const _0x4bc34f=a15_0x4bc3();let _0x5cffee=_0x4bc34f[_0x4432ae];return _0x5cffee;}const GLOBAL_FLAG={'name':a15_0xc34e13(0x115),'type':'boolean','description':'Write\x20to\x20global\x20config','default':![]},APP_FLAG={'name':a15_0xc34e13(0xf6),'type':a15_0xc34e13(0x125),'description':a15_0xc34e13(0xe6)},listDef={'service':a15_0xc34e13(0x11c),'command':a15_0xc34e13(0x10a),'description':a15_0xc34e13(0x12e),'risk':a15_0xc34e13(0x11a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4d7357){const _0x4720ee=a15_0xc34e13,{buildConfigFromFlags:_0xc05216}=await import(_0x4720ee(0xe8)),_0x1dfc28=_0xc05216({});console[_0x4720ee(0x100)](_0x4720ee(0x127)),console[_0x4720ee(0x100)](JSON[_0x4720ee(0x123)](_0x1dfc28['raw'],null,0x2));const _0x165713=getProjectConfigPath(),_0x1436a7=resolveWriteConfigPath('global');return console[_0x4720ee(0x100)](_0x4720ee(0x129)),console['log'](_0x4720ee(0x108)+(_0x165713??_0x4720ee(0xee))),console[_0x4720ee(0x100)]('\x20\x20global:\x20\x20'+_0x1436a7),{'ok':!![]};}},getDef={'service':a15_0xc34e13(0x11c),'command':a15_0xc34e13(0x128),'description':a15_0xc34e13(0x11e),'risk':a15_0xc34e13(0x11a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a15_0xc34e13(0x131),'description':a15_0xc34e13(0xf8),'required':!![]}],'flags':[],async 'execute'(_0x5e989e){const _0x53e26c=a15_0xc34e13,_0x55c951=_0x5e989e[_0x53e26c(0xfd)][0x0];if(!_0x55c951)throw CliErrors[_0x53e26c(0x117)](_0x53e26c(0x113),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x18aa53}=await import(_0x53e26c(0xe8)),{raw:_0x4adead}=_0x18aa53({});if(_0x55c951[_0x53e26c(0x12b)]('.')){const _0xc22041=_0x55c951[_0x53e26c(0xea)]('.');let _0x3da2dc=_0x4adead;for(const _0x2045fb of _0xc22041){if(_0x3da2dc==null||typeof _0x3da2dc!==_0x53e26c(0x11d))throw CliErrors[_0x53e26c(0x117)](_0x53e26c(0xf3)+_0x55c951);_0x3da2dc=_0x3da2dc[_0x2045fb];}if(_0x3da2dc===undefined)throw CliErrors[_0x53e26c(0x117)](_0x53e26c(0xf3)+_0x55c951);return console[_0x53e26c(0x100)](typeof _0x3da2dc==='object'?JSON['stringify'](_0x3da2dc,null,0x2):String(_0x3da2dc)),{'ok':!![]};}const _0x1578df=_0x4adead[_0x55c951];if(_0x1578df===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x55c951);return console[_0x53e26c(0x100)](typeof _0x1578df===_0x53e26c(0x11d)?JSON[_0x53e26c(0x123)](_0x1578df,null,0x2):String(_0x1578df)),{'ok':!![]};}},setDef={'service':a15_0xc34e13(0x11c),'command':a15_0xc34e13(0x126),'description':a15_0xc34e13(0x121),'risk':a15_0xc34e13(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a15_0xc34e13(0xf0),'required':!![]},{'name':a15_0xc34e13(0xf2),'description':a15_0xc34e13(0x101),'required':!![]}],'flags':[GLOBAL_FLAG,APP_FLAG],async 'execute'(_0x5f542e){const _0x2348c7=a15_0xc34e13,_0x342b03=_0x5f542e[_0x2348c7(0xfd)][0x0],_0x5b3dc1=_0x5f542e[_0x2348c7(0xfd)][0x1];if(!_0x342b03||_0x5b3dc1===undefined)throw CliErrors[_0x2348c7(0x117)]('Missing\x20key\x20or\x20value.',_0x2348c7(0x130)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--app\x20<name>]\x20[--global]');if(ENUM_KEYS[_0x342b03]&&!ENUM_KEYS[_0x342b03][_0x2348c7(0x12b)](_0x5b3dc1))throw CliErrors[_0x2348c7(0x117)](_0x2348c7(0x119)+_0x342b03+_0x2348c7(0x110)+ENUM_KEYS[_0x342b03]['join'](',\x20'));if(_0x342b03===_0x2348c7(0x10d))throw CliErrors[_0x2348c7(0x117)](_0x2348c7(0x109));if(_0x342b03==='pageSize'){const _0x1b9bed=Number(_0x5b3dc1);if(isNaN(_0x1b9bed)||_0x1b9bed<=0x0)throw CliErrors[_0x2348c7(0x117)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x37939f={'global':_0x5f542e[_0x2348c7(0x114)](_0x2348c7(0x115))},_0x57ba66=readScopedConfig(_0x37939f),_0x53adbd=_0x5f542e[_0x2348c7(0x122)]('app');if(_0x53adbd){if(!_0x57ba66[_0x2348c7(0xef)])_0x57ba66[_0x2348c7(0xef)]={};if(!_0x57ba66[_0x2348c7(0xef)][_0x53adbd])throw CliErrors[_0x2348c7(0x117)](_0x2348c7(0xf5)+_0x53adbd+_0x2348c7(0x112),_0x2348c7(0xe7)+CLI_BIN_NAME+_0x2348c7(0x118));if(!APP_PROFILE_KEYS['has'](_0x342b03))throw CliErrors[_0x2348c7(0x117)](_0x2348c7(0xeb)+_0x342b03+_0x2348c7(0x111),_0x2348c7(0x116)+[...APP_PROFILE_KEYS][_0x2348c7(0x107)](',\x20'));_0x57ba66[_0x2348c7(0xef)][_0x53adbd][_0x342b03]=_0x342b03==='pageSize'?Number(_0x5b3dc1):_0x5b3dc1,console[_0x2348c7(0x100)]('Set\x20`'+_0x342b03+'`\x20=\x20\x22'+_0x5b3dc1+_0x2348c7(0x12f)+_0x53adbd+'\x22'+(_0x5f542e[_0x2348c7(0x114)](_0x2348c7(0x115))?'\x20(global)':''));}else{if(!TOP_LEVEL_KEYS[_0x2348c7(0x12a)](_0x342b03))throw CliErrors[_0x2348c7(0x117)](_0x2348c7(0x103)+_0x342b03+_0x2348c7(0xf1),_0x2348c7(0x11b)+[...TOP_LEVEL_KEYS]['join'](',\x20'));_0x57ba66[_0x342b03]=_0x342b03==='pageSize'?Number(_0x5b3dc1):_0x5b3dc1,console['log'](_0x2348c7(0xec)+_0x342b03+_0x2348c7(0x11f)+_0x5b3dc1+'\x22'+(_0x5f542e[_0x2348c7(0x114)](_0x2348c7(0x115))?_0x2348c7(0x10f):''));}return writeScopedConfig(_0x57ba66,_0x37939f),{'ok':!![]};}},deleteDef={'service':a15_0xc34e13(0x11c),'command':a15_0xc34e13(0xfc),'description':a15_0xc34e13(0x102),'risk':a15_0xc34e13(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a15_0xc34e13(0x131),'description':a15_0xc34e13(0x12c),'required':!![]}],'flags':[GLOBAL_FLAG,APP_FLAG],async 'execute'(_0x1f117d){const _0x1c7527=a15_0xc34e13,_0x5da66d=_0x1f117d[_0x1c7527(0xfd)][0x0];if(!_0x5da66d)throw CliErrors[_0x1c7527(0x117)](_0x1c7527(0x113),_0x1c7527(0x130)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--app\x20<name>]\x20[--global]');const _0x3f42a4={'global':_0x1f117d[_0x1c7527(0x114)](_0x1c7527(0x115))},_0x1a0dfa=readScopedConfig(_0x3f42a4),_0xaddc3a=_0x1f117d[_0x1c7527(0x122)](_0x1c7527(0xf6));if(_0xaddc3a){if(!_0x1a0dfa[_0x1c7527(0xef)]?.[_0xaddc3a])throw CliErrors[_0x1c7527(0x117)](_0x1c7527(0xf5)+_0xaddc3a+_0x1c7527(0xed));if(_0x1a0dfa['apps'][_0xaddc3a][_0x5da66d]===undefined)throw CliErrors[_0x1c7527(0x117)](_0x1c7527(0xf4)+_0x5da66d+_0x1c7527(0xf9)+_0xaddc3a+'\x22.');delete _0x1a0dfa[_0x1c7527(0xef)][_0xaddc3a][_0x5da66d],console['log'](_0x1c7527(0xfa)+_0x5da66d+_0x1c7527(0xf7)+_0xaddc3a+'\x22'+(_0x1f117d[_0x1c7527(0x114)](_0x1c7527(0x115))?_0x1c7527(0x10f):''));}else{if(_0x1a0dfa[_0x5da66d]===undefined)throw CliErrors[_0x1c7527(0x117)](_0x1c7527(0xf4)+_0x5da66d+_0x1c7527(0x12d));delete _0x1a0dfa[_0x5da66d],console['log'](_0x1c7527(0xfa)+_0x5da66d+'`'+(_0x1f117d['bool'](_0x1c7527(0x115))?_0x1c7527(0x10f):''));}return writeScopedConfig(_0x1a0dfa,_0x3f42a4),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x8c55bd=a16_0x557f;function a16_0x596c(){const _0x10c47f=['format','app','daily','appcode','6ecUGMg','610yPxdfh','1267888atvNaS','accessKey','userDomain','8153037NCbreD','17415iqrehM','2954505KErCkT','4664VVZhzo','runtimeDomain','env','3781624JZNPXZ','2061brEUAW','pretty','pageSize','locale','secretKey','18zKnvCL','table','cookie','production','70818JKOpGr'];a16_0x596c=function(){return _0x10c47f;};return a16_0x596c();}(function(_0x838730,_0x21103f){const _0x59723b=a16_0x557f,_0x426233=_0x838730();while(!![]){try{const _0x1c4903=parseInt(_0x59723b(0xa0))/0x1*(parseInt(_0x59723b(0x91))/0x2)+parseInt(_0x59723b(0xa6))/0x3*(parseInt(_0x59723b(0xa2))/0x4)+parseInt(_0x59723b(0xa1))/0x5*(-parseInt(_0x59723b(0x9a))/0x6)+-parseInt(_0x59723b(0xa5))/0x7+parseInt(_0x59723b(0x9c))/0x8+parseInt(_0x59723b(0x9f))/0x9+parseInt(_0x59723b(0x9b))/0xa*(-parseInt(_0x59723b(0x95))/0xb);if(_0x1c4903===_0x21103f)break;else _0x426233['push'](_0x426233['shift']());}catch(_0x160b30){_0x426233['push'](_0x426233['shift']());}}}(a16_0x596c,0x79a81));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export const TOP_LEVEL_KEYS=new Set([a16_0x8c55bd(0xa4),a16_0x8c55bd(0x96),a16_0x8c55bd(0xa9),'pageSize',a16_0x8c55bd(0x99),a16_0x8c55bd(0x97),'apiDomain',a16_0x8c55bd(0x9e),a16_0x8c55bd(0xa3)]);function a16_0x557f(_0x5764c5,_0x44ab60){_0x5764c5=_0x5764c5-0x90;const _0x596c73=a16_0x596c();let _0x557fa1=_0x596c73[_0x5764c5];return _0x557fa1;}export const APP_PROFILE_KEYS=new Set([a16_0x8c55bd(0xa4),a16_0x8c55bd(0x96),'locale',a16_0x8c55bd(0xa8),a16_0x8c55bd(0x93),a16_0x8c55bd(0x9d),a16_0x8c55bd(0x90)]);export const ENUM_KEYS={'env':[a16_0x8c55bd(0x94),a16_0x8c55bd(0x98)],'format':['json',a16_0x8c55bd(0xa7),a16_0x8c55bd(0x92)]};
|