@lovrabet/lovrabet-cli 2.0.3 → 2.0.4-beta.0
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/cli.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.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/config-policy.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/doctor.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/schema.js +1 -1
- package/lib/commands/skill/index.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/config/schema.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.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/build-all-flags.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-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +6 -6
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a32_0x2c42f7=a32_0x1595;function a32_0x1d97(){const _0x48c907=['563gKHPeN','16854660WAxMfy','150186DauQXT','en-US','889440Bnmdie','3238648gxHZXh','98gKIFwH','compress','2543981QFovNg','283915FLaolF','10coJOTz','161YbLWKD','main','12MDPDTO','9VFBUpc','write'];a32_0x1d97=function(){return _0x48c907;};return a32_0x1d97();}(function(_0xe347a0,_0x155c6a){const _0x577b66=a32_0x1595,_0xaf2357=_0xe347a0();while(!![]){try{const _0x47ae4b=parseInt(_0x577b66(0x201))/0x1*(-parseInt(_0x577b66(0x1f7))/0x2)+-parseInt(_0x577b66(0x1f5))/0x3+parseInt(_0x577b66(0x1fe))/0x4*(parseInt(_0x577b66(0x1fa))/0x5)+parseInt(_0x577b66(0x203))/0x6*(-parseInt(_0x577b66(0x1fc))/0x7)+parseInt(_0x577b66(0x1f6))/0x8*(-parseInt(_0x577b66(0x1ff))/0x9)+parseInt(_0x577b66(0x1fb))/0xa*(parseInt(_0x577b66(0x1f9))/0xb)+parseInt(_0x577b66(0x202))/0xc;if(_0x47ae4b===_0x155c6a)break;else _0xaf2357['push'](_0xaf2357['shift']());}catch(_0x117478){_0xaf2357['push'](_0xaf2357['shift']());}}}(a32_0x1d97,0x7a73c));export const DEFAULT_APP_PROFILE_NAME=a32_0x2c42f7(0x1fd);function a32_0x1595(_0x4304f4,_0x20cef2){_0x4304f4=_0x4304f4-0x1f4;const _0x1d9718=a32_0x1d97();let _0x159580=_0x1d9718[_0x4304f4];return _0x159580;}export const DEFAULT_CONFIG_VALUES={'env':'production','format':a32_0x2c42f7(0x1f8),'locale':a32_0x2c42f7(0x1f4),'riskLevel':a32_0x2c42f7(0x200)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a32_0x2c42f7(0x1f8);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x540cbf=a33_0x3060;(function(_0x1a4b87,_0x177cb0){const _0x52c0e3=a33_0x3060,_0x424088=_0x1a4b87();while(!![]){try{const _0x311849=-parseInt(_0x52c0e3(0x19a))/0x1*(-parseInt(_0x52c0e3(0x192))/0x2)+parseInt(_0x52c0e3(0x195))/0x3+-parseInt(_0x52c0e3(0x18f))/0x4+parseInt(_0x52c0e3(0x194))/0x5*(parseInt(_0x52c0e3(0x19e))/0x6)+-parseInt(_0x52c0e3(0x196))/0x7+parseInt(_0x52c0e3(0x19c))/0x8*(-parseInt(_0x52c0e3(0x190))/0x9)+parseInt(_0x52c0e3(0x197))/0xa*(parseInt(_0x52c0e3(0x19d))/0xb);if(_0x311849===_0x177cb0)break;else _0x424088['push'](_0x424088['shift']());}catch(_0x40f9f9){_0x424088['push'](_0x424088['shift']());}}}(a33_0x47d6,0xa5326));import{getEnv,isProduction}from'../constant/env.js';function a33_0x47d6(){const _0x36dda8=['https://daily-runtime.lovrabet.com','runtimeDomain','32483FeQATr','https://daily-api.lovrabet.com','80dtGDwM','4801423ylWyzc','16662XPRxdq','https://user-daily.lovrabet.com','https://runtime.lovrabet.com','https://api.lovrabet.com','apiDomain','3080844vKxRXm','469971FtmGJl','userDomain','22vWvJHd','https://user.lovrabet.com','225JBNwvH','3425337mSMLsi','6751423vOnFlg','30mCEhAh'];a33_0x47d6=function(){return _0x36dda8;};return a33_0x47d6();}let customApiDomain,customUserDomain,customRuntimeDomain;function a33_0x3060(_0x23cd7c,_0x38e9d8){_0x23cd7c=_0x23cd7c-0x18e;const _0x47d63d=a33_0x47d6();let _0x306045=_0x47d63d[_0x23cd7c];return _0x306045;}export function initDomains(_0x255ad5){const _0x2a4ba3=a33_0x3060;customApiDomain=_0x255ad5?.[_0x2a4ba3(0x18e)],customUserDomain=_0x255ad5?.[_0x2a4ba3(0x191)],customRuntimeDomain=_0x255ad5?.[_0x2a4ba3(0x199)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a33_0x540cbf(0x193):a33_0x540cbf(0x19f));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a33_0x540cbf(0x1a1):a33_0x540cbf(0x19b));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a33_0x540cbf(0x1a0):a33_0x540cbf(0x198));
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x42aad1=a34_0x13c8;(function(_0x1f91fd,_0x2a72f1){const _0x49085f=a34_0x13c8,_0x50ebc3=_0x1f91fd();while(!![]){try{const _0x1151d5=-parseInt(_0x49085f(0x9a))/0x1+parseInt(_0x49085f(0xa3))/0x2+parseInt(_0x49085f(0x9e))/0x3+parseInt(_0x49085f(0xa1))/0x4+-parseInt(_0x49085f(0x9d))/0x5+parseInt(_0x49085f(0xa2))/0x6*(parseInt(_0x49085f(0x9f))/0x7)+-parseInt(_0x49085f(0xa4))/0x8*(parseInt(_0x49085f(0x99))/0x9);if(_0x1151d5===_0x2a72f1)break;else _0x50ebc3['push'](_0x50ebc3['shift']());}catch(_0x69a65d){_0x50ebc3['push'](_0x50ebc3['shift']());}}}(a34_0x8cc0,0x767a5));export const RUNTIME_ENV_VALUES=[a34_0x42aad1(0x9c),a34_0x42aad1(0x9b),'daily'];export function normalizeEnv(_0x388677){const _0x6a7f4b=a34_0x42aad1;return _0x388677===_0x6a7f4b(0xa0)?_0x6a7f4b(0x9c):_0x388677;}function a34_0x13c8(_0x3e9a00,_0x177281){_0x3e9a00=_0x3e9a00-0x99;const _0x8cc0ef=a34_0x8cc0();let _0x13c8a1=_0x8cc0ef[_0x3e9a00];return _0x13c8a1;}export function isProduction(_0x158159){const _0x457aed=a34_0x42aad1;return normalizeEnv(_0x158159)===_0x457aed(0x9c);}export function isDaily(_0x1bf8c1){return normalizeEnv(_0x1bf8c1)==='daily';}export function isDev(_0x13d099){const _0x37cb15=a34_0x42aad1,_0x39b30a=normalizeEnv(_0x13d099);return _0x39b30a===_0x37cb15(0x9b)||_0x39b30a==='dev';}function a34_0x8cc0(){const _0x271caf=['4398544MdRMGV','9TIMRSn','960278ctBOAV','development','production','38995isxgFY','1544175yBfWTF','7GCHyXm','online','2062036hhNUJl','5193672SIgIzZ','214668YYQvEl'];a34_0x8cc0=function(){return _0x271caf;};return a34_0x8cc0();}let env=normalizeEnv(process.env.LOVRABET_ENV||a34_0x42aad1(0x9c));export function getEnv(){return env;}export function initEnv(_0x299fd1){env=normalizeEnv(_0x299fd1);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a35_0x108808=a35_0x3a2e;function a35_0x3a2e(_0x169579,_0x3ba9d4){_0x169579=_0x169579-0x1af;const _0x5bc180=a35_0x5bc1();let _0x3a2e1b=_0x5bc180[_0x169579];return _0x3a2e1b;}(function(_0xc85542,_0x2d504b){const _0x462042=a35_0x3a2e,_0x442f09=_0xc85542();while(!![]){try{const _0x1abc4c=parseInt(_0x462042(0x1b1))/0x1*(parseInt(_0x462042(0x1b4))/0x2)+-parseInt(_0x462042(0x1b6))/0x3+-parseInt(_0x462042(0x1b0))/0x4+parseInt(_0x462042(0x1bc))/0x5*(-parseInt(_0x462042(0x1b9))/0x6)+-parseInt(_0x462042(0x1bb))/0x7+parseInt(_0x462042(0x1b3))/0x8*(parseInt(_0x462042(0x1b2))/0x9)+parseInt(_0x462042(0x1ba))/0xa*(parseInt(_0x462042(0x1b8))/0xb);if(_0x1abc4c===_0x2d504b)break;else _0x442f09['push'](_0x442f09['shift']());}catch(_0x1ff42a){_0x442f09['push'](_0x442f09['shift']());}}}(a35_0x5bc1,0x58f4f));export const OUTPUT_FORMAT_VALUES=[a35_0x108808(0x1b5),a35_0x108808(0x1b7),a35_0x108808(0x1af)];function a35_0x5bc1(){const _0x411c2f=['38529qLsEnw','549YLjvfE','27824lgNtKk','18jYsiVB','json','1314486hcJfsK','pretty','6414958TuZPfN','1700286KnTLxu','30EWvbTF','4038552IuXzAP','10qrAzZw','compress','1448904siqNcv'];a35_0x5bc1=function(){return _0x411c2f;};return a35_0x5bc1();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a36_0x5e71bf=a36_0x1435;function a36_0x5d24(){const _0x3e3eb3=['6SRUXhb','655594KLcRPE','960880ObSPPQ','952fLrizq','652030ALNXsM','9CDsiut','19449880VbooYC','write','1067352JITfiU','high-risk-write','read','21204BmqnIA','3268524UNAulO'];a36_0x5d24=function(){return _0x3e3eb3;};return a36_0x5d24();}(function(_0x362318,_0x366f14){const _0x299a46=a36_0x1435,_0x24acc0=_0x362318();while(!![]){try{const _0x2fa38e=-parseInt(_0x299a46(0xe4))/0x1+parseInt(_0x299a46(0xde))/0x2+parseInt(_0x299a46(0xdb))/0x3*(-parseInt(_0x299a46(0xd8))/0x4)+parseInt(_0x299a46(0xda))/0x5*(parseInt(_0x299a46(0xe3))/0x6)+-parseInt(_0x299a46(0xe2))/0x7+-parseInt(_0x299a46(0xd9))/0x8*(parseInt(_0x299a46(0xe1))/0x9)+parseInt(_0x299a46(0xdc))/0xa;if(_0x2fa38e===_0x366f14)break;else _0x24acc0['push'](_0x24acc0['shift']());}catch(_0x1f3435){_0x24acc0['push'](_0x24acc0['shift']());}}}(a36_0x5d24,0x76890));function a36_0x1435(_0x33ba4d,_0x56546b){_0x33ba4d=_0x33ba4d-0xd8;const _0x5d2460=a36_0x5d24();let _0x14350b=_0x5d2460[_0x33ba4d];return _0x14350b;}export const RISK_LEVEL_VALUES=[a36_0x5e71bf(0xe0),a36_0x5e71bf(0xdd),a36_0x5e71bf(0xdf)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a37_0x5e0a(_0x4b17ac,_0x4f864f){_0x4b17ac=_0x4b17ac-0x186;const _0x45ae2e=a37_0x45ae();let _0x5e0a52=_0x45ae2e[_0x4b17ac];return _0x5e0a52;}const a37_0x582c54=a37_0x5e0a;(function(_0x523738,_0x4d5c5e){const _0x373b55=a37_0x5e0a,_0x49fa05=_0x523738();while(!![]){try{const _0x341e08=parseInt(_0x373b55(0x18c))/0x1*(-parseInt(_0x373b55(0x187))/0x2)+parseInt(_0x373b55(0x18d))/0x3*(-parseInt(_0x373b55(0x189))/0x4)+-parseInt(_0x373b55(0x190))/0x5*(parseInt(_0x373b55(0x192))/0x6)+parseInt(_0x373b55(0x191))/0x7*(parseInt(_0x373b55(0x18f))/0x8)+parseInt(_0x373b55(0x18b))/0x9*(-parseInt(_0x373b55(0x18a))/0xa)+-parseInt(_0x373b55(0x188))/0xb*(parseInt(_0x373b55(0x18e))/0xc)+parseInt(_0x373b55(0x186))/0xd;if(_0x341e08===_0x4d5c5e)break;else _0x49fa05['push'](_0x49fa05['shift']());}catch(_0x43bafa){_0x49fa05['push'](_0x49fa05['shift']());}}}(a37_0x45ae,0xd4b07));function a37_0x45ae(){const _0x19bb3a=['13433fIDpFt','633pswzti','5247192XGsmmE','950992lbpGyS','4744045maYjdo','14fAoyTT','6TaBcsj','https://user.lovrabet.com/user/ak','67412631KPVlWM','14qQAnIL','22QxCmYH','17428XONrXJ','1559510zdlUkb','99OlwkJB'];a37_0x45ae=function(){return _0x19bb3a;};return a37_0x45ae();}export const USER_ACCESS_KEY_CREATE_URL=a37_0x582c54(0x193);
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a38_0x2ec93e=a38_0x5dd9;(function(_0xb6de09,_0x2c21e8){const _0x41b996=a38_0x5dd9,_0x170957=_0xb6de09();while(!![]){try{const _0x381a28=-parseInt(_0x41b996(0x20a))/0x1*(-parseInt(_0x41b996(0x22b))/0x2)+parseInt(_0x41b996(0x225))/0x3+parseInt(_0x41b996(0x221))/0x4*(parseInt(_0x41b996(0x1f0))/0x5)+parseInt(_0x41b996(0x1ef))/0x6+parseInt(_0x41b996(0x20d))/0x7*(parseInt(_0x41b996(0x1fa))/0x8)+parseInt(_0x41b996(0x215))/0x9+-parseInt(_0x41b996(0x232))/0xa;if(_0x381a28===_0x2c21e8)break;else _0x170957['push'](_0x170957['shift']());}catch(_0x5756f6){_0x170957['push'](_0x170957['shift']());}}}(a38_0x4934,0xbae81));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{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';function a38_0x4934(){const _0x58a700=['./constant/env.js','empty','trim','2811384ctVszx','inherit','PAGE_SIZE','setRawMode','3923460gJRFaF','read','userDomain','stdout','ACCESS_KEY','join','17968oIDgQM','slice','development','.lovrabetrc','riskLevel','APPCODE','cwd','43726130fdKZQZ','true','parse','error','globalConfig','1666692OSBodb','10qmlgLc','env','FORMAT','production','host','apps','projectConfig','project','global','argv','21416RldknI','apiDomain','code','string','find','./constant/domain.js','defaultApp','online','object','locale','VERBOSE','values','setRawCommand','missing','.lovrabet.json','runtimeDomain','50miBnol','stringify','daily','1113dQrZmY','authRequired','EPERM','stdin','raw','appcode','utf8','APP','11448405RfMvMW','message','isTTY','app','.tmp','nonInteractive','EXDEV','format','accessKey'];a38_0x4934=function(){return _0x58a700;};return a38_0x4934();}export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';function a38_0x5dd9(_0x445a03,_0x280c1a){_0x445a03=_0x445a03-0x1ef;const _0x4934d8=a38_0x4934();let _0x5dd9b7=_0x4934d8[_0x445a03];return _0x5dd9b7;}const CONFIG_NAMES=['.lovrabet.json',a38_0x2ec93e(0x22e)];export const NEW_CONFIG_NAME=a38_0x2ec93e(0x208);function resolveConfigPath(_0x574f13){for(const _0x1989b6 of CONFIG_NAMES){const _0x5719a6=resolve(_0x574f13,_0x1989b6);if(existsSync(_0x5719a6))return _0x5719a6;}return undefined;}export function resolveWriteConfigPath(_0x3fa8a4){const _0x1e1805=a38_0x2ec93e,_0xce7666=_0x3fa8a4===_0x1e1805(0x1f7)?process['cwd']():homedir(),_0x173846=resolveConfigPath(_0xce7666);return _0x173846??resolve(_0xce7666,NEW_CONFIG_NAME);}export function readConfigFile(_0x20568d){const _0x167cac=a38_0x2ec93e;try{if(existsSync(_0x20568d)){const _0x42b205=readFileSync(_0x20568d,{'encoding':_0x167cac(0x213)});if(_0x42b205){const _0x2409e1=JSON[_0x167cac(0x234)](_0x42b205);return migrateOnlineEnv(_0x20568d,_0x2409e1),_0x2409e1;}}}catch{}return{};}function migrateOnlineEnv(_0x24325f,_0x4e443c){const _0x10f78f=a38_0x2ec93e;let _0x44e026=![];_0x4e443c[_0x10f78f(0x1f1)]===_0x10f78f(0x201)&&(_0x4e443c[_0x10f78f(0x1f1)]='production',_0x44e026=!![]);if(_0x4e443c['apps']&&typeof _0x4e443c['apps']===_0x10f78f(0x202))for(const _0x16bb36 of Object['values'](_0x4e443c[_0x10f78f(0x1f5)])){_0x16bb36&&_0x16bb36[_0x10f78f(0x1f1)]===_0x10f78f(0x201)&&(_0x16bb36[_0x10f78f(0x1f1)]='production',_0x44e026=!![]);}if(_0x44e026)try{writeConfigFile(_0x24325f,_0x4e443c);}catch{}}export function writeConfigFile(_0x24c9fb,_0x475872){const _0x574448=a38_0x2ec93e,_0x1cf420=dirname(_0x24c9fb);!existsSync(_0x1cf420)&&mkdirSync(_0x1cf420,{'recursive':!![]});const _0x480c38=_0x24c9fb+_0x574448(0x219);try{writeFileSync(_0x480c38,JSON['stringify'](_0x475872,null,0x2)+'\x0a',{'encoding':_0x574448(0x213),'mode':0x180});try{renameSync(_0x480c38,_0x24c9fb);}catch(_0x1dbbad){if(_0x1dbbad[_0x574448(0x1fc)]===_0x574448(0x20f)||_0x1dbbad[_0x574448(0x1fc)]===_0x574448(0x21b)||_0x1dbbad[_0x574448(0x1fc)]==='EACCES'){writeFileSync(_0x24c9fb,JSON[_0x574448(0x20b)](_0x475872,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x480c38);}catch{}}else throw _0x1dbbad;}}catch(_0x389b19){try{unlinkSync(_0x480c38);}catch{}throw _0x389b19;}}export function isNonInteractiveMode(_0x534566){const _0xd70770=a38_0x2ec93e;return!!(_0x534566[_0xd70770(0x21a)]||_0x534566['ci']||process.env.LOVRABET_CI==='true'||process.env.RABETBASE_CI===_0xd70770(0x233)||process.env.LOVRABET_CI===_0xd70770(0x233)||process.env.CI==='true'||!process[_0xd70770(0x228)][_0xd70770(0x217)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0xfc337f=a38_0x2ec93e;if(!process['stdin'][_0xfc337f(0x217)])return![];try{const _0x550de2=process['stdin']['isRaw'];return process[_0xfc337f(0x210)][_0xfc337f(0x224)](!![]),process[_0xfc337f(0x210)][_0xfc337f(0x224)](_0x550de2??![]),!![];}catch{return![];}}export async function createContext(_0x15879e){const _0x405b6b=a38_0x2ec93e,_0x4e5909=readRawConfig(),_0xb9692=buildConfig(_0x4e5909,_0x15879e);await initGlobalEnvironment(_0xb9692);const {getUserDomain:_0x59877f,getApiDomain:_0x431032}=await import(_0x405b6b(0x1ff)),_0x44b0ab={'apiDomain':_0x431032(),'userDomain':_0x59877f()},_0x4dbc06=await buildAuth(_0xb9692);logger['setLogPath'](process[_0x405b6b(0x231)]());const _0x5b19e8=(CLI_BIN_NAME+'\x20'+process[_0x405b6b(0x1f9)][_0x405b6b(0x22c)](0x2)[_0x405b6b(0x22a)]('\x20'))[_0x405b6b(0x220)]();logger[_0x405b6b(0x206)](_0x5b19e8);const _0x23bb86=isNonInteractiveMode(_0x15879e);return{'config':_0xb9692,'auth':_0x4dbc06,'logger':logger,'env':_0x44b0ab,'nonInteractive':_0x23bb86};}export function buildConfigFromFlags(_0x5f2ab7){return buildConfig(readRawConfig(),_0x5f2ab7);}export function readAppCodeFromConfig(){const _0x4a32e3=a38_0x2ec93e,_0x3aa3df=readRawConfig(),_0x270e45=_0x3aa3df[_0x4a32e3(0x212)]??_0x3aa3df[_0x4a32e3(0x218)];if(typeof _0x270e45===_0x4a32e3(0x1fd)&&_0x270e45[_0x4a32e3(0x220)]())return _0x270e45[_0x4a32e3(0x220)]();const _0x241e00=_0x3aa3df[_0x4a32e3(0x1f5)]&&typeof _0x3aa3df[_0x4a32e3(0x1f5)]==='object'?_0x3aa3df['apps']:{},_0x307ce7=_0x3aa3df[_0x4a32e3(0x200)]?_0x241e00[_0x3aa3df[_0x4a32e3(0x200)]]:undefined;if(_0x307ce7?.[_0x4a32e3(0x212)])return String(_0x307ce7[_0x4a32e3(0x212)])[_0x4a32e3(0x220)]();const _0x6d10be=normalizeEnv(String(_0x3aa3df['env']||'production')),_0x26baf7=isDaily(_0x6d10be)?_0x4a32e3(0x20c):isDev(_0x6d10be)?_0x4a32e3(0x22d):_0x4a32e3(0x1f3),_0x4ca3bf=resolveCachedAppCode(typeof _0x3aa3df[_0x4a32e3(0x200)]===_0x4a32e3(0x1fd)?_0x3aa3df[_0x4a32e3(0x200)]:undefined,_0x26baf7,typeof _0x3aa3df[_0x4a32e3(0x21d)]===_0x4a32e3(0x1fd)?_0x3aa3df[_0x4a32e3(0x21d)]:undefined);if(_0x4ca3bf)return _0x4ca3bf;const _0x1a410b=Object[_0x4a32e3(0x205)](_0x241e00)[_0x4a32e3(0x1fe)](_0xd1c00=>_0xd1c00?.[_0x4a32e3(0x212)]);return _0x1a410b?.[_0x4a32e3(0x212)]?String(_0x1a410b[_0x4a32e3(0x212)])[_0x4a32e3(0x220)]():undefined;}export function readScopedConfig(_0x54af3a){const _0x42e29e=a38_0x2ec93e,_0x2cc12a=_0x54af3a[_0x42e29e(0x1f8)]?'global':_0x42e29e(0x1f7);return readConfigFile(resolveWriteConfigPath(_0x2cc12a));}export function writeScopedConfig(_0x35a3dc,_0x58e692){const _0x4b0660=a38_0x2ec93e,_0x331ee8=_0x58e692[_0x4b0660(0x1f8)]?_0x4b0660(0x1f8):_0x4b0660(0x1f7);writeConfigFile(resolveWriteConfigPath(_0x331ee8),_0x35a3dc);}export async function initGlobalEnvironment(_0x4f3c12){const _0x5afbc9=a38_0x2ec93e,{initEnv:_0x146431}=await import(_0x5afbc9(0x21e));_0x146431(_0x4f3c12['env']);const {initDomains:_0x2dfe70}=await import(_0x5afbc9(0x1ff));_0x2dfe70({'apiDomain':_0x4f3c12['raw'][_0x5afbc9(0x1fb)]||_0x4f3c12['raw'][_0x5afbc9(0x1f4)]||undefined,'userDomain':_0x4f3c12[_0x5afbc9(0x211)][_0x5afbc9(0x227)]||undefined,'runtimeDomain':_0x4f3c12[_0x5afbc9(0x211)][_0x5afbc9(0x209)]||undefined});}export function getProjectConfigPath(){const _0x53331b=a38_0x2ec93e;return resolveConfigPath(process[_0x53331b(0x231)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x4ee677){const _0x5fe693=a38_0x2ec93e;if(!existsSync(_0x4ee677))return{'status':_0x5fe693(0x207)};try{const _0x2a3f6f=readFileSync(_0x4ee677,{'encoding':'utf8'});if(!_0x2a3f6f?.['trim']())return{'status':_0x5fe693(0x21f)};const _0x4f701e=JSON['parse'](_0x2a3f6f);return{'status':'ok','data':_0x4f701e};}catch(_0x101046){return{'status':_0x5fe693(0x235),'message':_0x101046 instanceof Error?_0x101046[_0x5fe693(0x216)]:String(_0x101046)};}}export function loadRawConfigLayers(_0x248990){const _0x3d9976=a38_0x2ec93e;let _0x3cb4da={},_0x5c6a9f={},_0x29360b,_0x30f094;try{_0x29360b=resolveConfigPath(homedir());if(_0x29360b){const _0x5e1e84=readFileSync(_0x29360b,{'encoding':_0x3d9976(0x213)});if(_0x5e1e84)_0x3cb4da=JSON[_0x3d9976(0x234)](_0x5e1e84);}}catch{}try{const _0x2fb197=_0x248990||process[_0x3d9976(0x231)]();_0x30f094=resolveConfigPath(_0x2fb197);if(_0x30f094){const _0xba1712=readFileSync(_0x30f094,{'encoding':'utf8'});if(_0xba1712)_0x5c6a9f=JSON[_0x3d9976(0x234)](_0xba1712);}}catch{}return{'globalPath':_0x29360b,'projectPath':_0x30f094,'globalConfig':_0x3cb4da,'projectConfig':_0x5c6a9f};}function mergeRawConfigLayers(_0x3cca11){const _0x302355=a38_0x2ec93e,{globalConfig:_0x7b41a8,projectConfig:_0x45ea35}=_0x3cca11;if(_0x45ea35[_0x302355(0x222)]===![]){const _0x8b1795={..._0x45ea35};return delete _0x8b1795[_0x302355(0x222)],_0x8b1795;}const _0x1c6190={..._0x7b41a8,..._0x45ea35};if(_0x302355(0x200)in _0x45ea35)_0x1c6190[_0x302355(0x200)]=_0x45ea35['defaultApp'];else _0x7b41a8['defaultApp']&&(_0x1c6190[_0x302355(0x200)]=_0x7b41a8['defaultApp']);return _0x1c6190;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x438795){return mergeRawConfigLayers(loadRawConfigLayers(_0x438795));}export function readRawConfigWithLayers(_0x354a81){const _0x45d5a4=loadRawConfigLayers(_0x354a81);return{'config':mergeRawConfigLayers(_0x45d5a4),'layers':_0x45d5a4};}export function resolveDefaultAppSource(_0x98ebff){const _0xcc9d1a=a38_0x2ec93e;if(_0xcc9d1a(0x200)in _0x98ebff[_0xcc9d1a(0x1f6)])return _0xcc9d1a(0x1f7);if(_0x98ebff[_0xcc9d1a(0x1f6)][_0xcc9d1a(0x222)]===![])return null;if(_0x98ebff[_0xcc9d1a(0x236)][_0xcc9d1a(0x200)])return _0xcc9d1a(0x1f8);return null;}function buildConfig(_0x10f708,_0x3fdad8){const _0x4d0317=a38_0x2ec93e,_0x3cae7d=_0x10f708[_0x4d0317(0x200)]||undefined,_0x179bb7=_0x3fdad8['app']||env(_0x4d0317(0x214))||undefined,_0x3f8501=_0x179bb7||_0x3cae7d||undefined,_0x1a28f5=env(_0x4d0317(0x229))||_0x10f708[_0x4d0317(0x21d)]||undefined,_0x109674=_0x3fdad8['env']||env('ENV')||_0x10f708['env']||DEFAULT_CONFIG_VALUES[_0x4d0317(0x1f1)],_0x31bb61=normalizeEnv(String(_0x109674)),_0x6c0f0c=isDaily(_0x31bb61)?'daily':isDev(_0x31bb61)?_0x4d0317(0x22d):'production',_0x5eb43e=resolveCachedAppCode(_0x3f8501,_0x6c0f0c,_0x1a28f5),_0xd72256=_0x3fdad8[_0x4d0317(0x212)]||env(_0x4d0317(0x230))||_0x5eb43e||_0x10f708[_0x4d0317(0x212)]||_0x10f708[_0x4d0317(0x218)]||undefined,_0x19ea7d=_0x10f708[_0x4d0317(0x203)]||DEFAULT_CONFIG_VALUES[_0x4d0317(0x203)],_0x142754=undefined,_0x40cc2b=_0x3fdad8[_0x4d0317(0x21c)]||env(_0x4d0317(0x1f2))||_0x10f708['format'],_0x5a85a1=normalizeLegacyOutputFormat(_0x40cc2b),_0x1ac53f=env(_0x4d0317(0x223))||_0x10f708['pageSize'],_0x256218=_0x1ac53f?Number(_0x1ac53f)||undefined:undefined,_0x373d03=_0x10f708[_0x4d0317(0x22f)]||_0x10f708['maxRisk'],_0x431269=_0x373d03===_0x4d0317(0x226)||_0x373d03==='write'||_0x373d03==='high-risk-write'?_0x373d03:DEFAULT_CONFIG_VALUES[_0x4d0317(0x22f)],_0x14affb=env(_0x4d0317(0x204)),_0x147520=_0x14affb==='1'||_0x14affb==='true';return{'appCode':typeof _0xd72256===_0x4d0317(0x1fd)&&_0xd72256[_0x4d0317(0x220)]()?_0xd72256[_0x4d0317(0x220)]():undefined,'env':_0x6c0f0c,'locale':_0x19ea7d,'cookie':_0x142754,'accessKey':_0x1a28f5,'format':_0x5a85a1,'pageSize':_0x256218,'riskLevel':_0x431269,'verbose':_0x147520,'defaultApp':_0x3cae7d,'currentApp':typeof _0x3f8501===_0x4d0317(0x1fd)?_0x3f8501:undefined,'raw':_0x10f708};}function env(_0x479166){return process.env[`LOVRABET_${_0x479166}`]||undefined;}async function buildAuth(_0x254fe2){const _0x293997=a38_0x2ec93e,_0x34e2f8='',_0x413224=!!_0x254fe2[_0x293997(0x21d)];return{'cookie':_0x34e2f8,'isLoggedIn':_0x413224,async 'getOrLogin'(){const _0x4d8694=_0x293997;if(_0x413224)return _0x34e2f8;throw CliErrors[_0x4d8694(0x20e)]();}};}
|
|
1
|
+
const a38_0xb0c848=a38_0x51c7;(function(_0x487315,_0x510d5e){const _0x1eb8c7=a38_0x51c7,_0x4211df=_0x487315();while(!![]){try{const _0x732bd8=parseInt(_0x1eb8c7(0x177))/0x1*(parseInt(_0x1eb8c7(0x169))/0x2)+-parseInt(_0x1eb8c7(0x18e))/0x3+parseInt(_0x1eb8c7(0x163))/0x4+parseInt(_0x1eb8c7(0x15d))/0x5+-parseInt(_0x1eb8c7(0x18c))/0x6*(-parseInt(_0x1eb8c7(0x17f))/0x7)+-parseInt(_0x1eb8c7(0x18f))/0x8+-parseInt(_0x1eb8c7(0x195))/0x9*(-parseInt(_0x1eb8c7(0x159))/0xa);if(_0x732bd8===_0x510d5e)break;else _0x4211df['push'](_0x4211df['shift']());}catch(_0x2ebd9c){_0x4211df['push'](_0x4211df['shift']());}}}(a38_0xee5d,0xdecc3));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';function a38_0x51c7(_0xb935f8,_0x24ee9c){_0xb935f8=_0xb935f8-0x151;const _0xee5db1=a38_0xee5d();let _0x51c7e3=_0xee5db1[_0xb935f8];return _0x51c7e3;}import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=[a38_0xb0c848(0x188),a38_0xb0c848(0x196)];export const NEW_CONFIG_NAME='.lovrabet.json';function resolveConfigPath(_0x3f407b){for(const _0x1ebb4f of CONFIG_NAMES){const _0x5ad23e=resolve(_0x3f407b,_0x1ebb4f);if(existsSync(_0x5ad23e))return _0x5ad23e;}return undefined;}export function resolveWriteConfigPath(_0x15463e){const _0x3efb01=a38_0xb0c848,_0x49d7b0=_0x15463e===_0x3efb01(0x192)?process[_0x3efb01(0x168)]():homedir(),_0x2a6430=resolveConfigPath(_0x49d7b0);return _0x2a6430??resolve(_0x49d7b0,NEW_CONFIG_NAME);}function a38_0xee5d(){const _0x1078c0=['parse','1536648EJNSge','string','missing','true','read','cwd','29486lCVIak','values','code','online','stdin','stringify','format','stdout','riskLevel','APPCODE','slice','nonInteractive','EPERM','find','23NUWLuj','production','error','global','object','maxRisk','defaultApp','locale','21NCMUgq','apps','./constant/domain.js','projectConfig','.tmp','./constant/env.js','PAGE_SIZE','message','isRaw','.lovrabet.json','env','argv','host','2558622fVmzDG','utf8','863181zqnRut','13793048wEXIzw','pageSize','empty','project','isTTY','setRawMode','207NVwyfr','.lovrabetrc','inherit','apiDomain','daily','development','setLogPath','accessKey','globalConfig','high-risk-write','FORMAT','321920jfDnVZ','app','VERBOSE','runtimeDomain','907295iuVRdA','ENV','trim','appcode','raw'];a38_0xee5d=function(){return _0x1078c0;};return a38_0xee5d();}export function readConfigFile(_0x3bdf96){const _0x16b865=a38_0xb0c848;try{if(existsSync(_0x3bdf96)){const _0x54e649=readFileSync(_0x3bdf96,{'encoding':_0x16b865(0x18d)});if(_0x54e649){const _0x16f53a=JSON[_0x16b865(0x162)](_0x54e649);return migrateOnlineEnv(_0x3bdf96,_0x16f53a),_0x16f53a;}}}catch{}return{};}function migrateOnlineEnv(_0x5b5c7b,_0x137356){const _0x5627cc=a38_0xb0c848;let _0x2fd6b0=![];_0x137356['env']===_0x5627cc(0x16c)&&(_0x137356[_0x5627cc(0x189)]=_0x5627cc(0x178),_0x2fd6b0=!![]);if(_0x137356['apps']&&typeof _0x137356[_0x5627cc(0x180)]===_0x5627cc(0x17b))for(const _0x3e9651 of Object['values'](_0x137356[_0x5627cc(0x180)])){_0x3e9651&&_0x3e9651[_0x5627cc(0x189)]===_0x5627cc(0x16c)&&(_0x3e9651[_0x5627cc(0x189)]=_0x5627cc(0x178),_0x2fd6b0=!![]);}if(_0x2fd6b0)try{writeConfigFile(_0x5b5c7b,_0x137356);}catch{}}export function writeConfigFile(_0x189057,_0x1eff71){const _0x455cc0=a38_0xb0c848,_0x57770f=dirname(_0x189057);!existsSync(_0x57770f)&&mkdirSync(_0x57770f,{'recursive':!![]});const _0x24350f=_0x189057+_0x455cc0(0x183);try{writeFileSync(_0x24350f,JSON[_0x455cc0(0x16e)](_0x1eff71,null,0x2)+'\x0a',{'encoding':_0x455cc0(0x18d),'mode':0x180});try{renameSync(_0x24350f,_0x189057);}catch(_0x4c24fc){if(_0x4c24fc['code']===_0x455cc0(0x175)||_0x4c24fc['code']==='EXDEV'||_0x4c24fc[_0x455cc0(0x16b)]==='EACCES'){writeFileSync(_0x189057,JSON[_0x455cc0(0x16e)](_0x1eff71,null,0x2)+'\x0a',{'encoding':_0x455cc0(0x18d)});try{unlinkSync(_0x24350f);}catch{}}else throw _0x4c24fc;}}catch(_0x91220a){try{unlinkSync(_0x24350f);}catch{}throw _0x91220a;}}export function isNonInteractiveMode(_0x5a9ff9){const _0x5859b5=a38_0xb0c848;return!!(_0x5a9ff9[_0x5859b5(0x174)]||_0x5a9ff9['ci']||process.env.LOVRABET_CI===_0x5859b5(0x166)||process.env.RABETBASE_CI===_0x5859b5(0x166)||process.env.LOVRABET_CI===_0x5859b5(0x166)||process.env.CI===_0x5859b5(0x166)||!process[_0x5859b5(0x170)][_0x5859b5(0x193)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x240f53=a38_0xb0c848;if(!process[_0x240f53(0x16d)]['isTTY'])return![];try{const _0x5738af=process[_0x240f53(0x16d)][_0x240f53(0x187)];return process[_0x240f53(0x16d)][_0x240f53(0x194)](!![]),process[_0x240f53(0x16d)][_0x240f53(0x194)](_0x5738af??![]),!![];}catch{return![];}}export async function createContext(_0x199a04){const _0x326848=a38_0xb0c848,_0x4940e0=readRawConfig(),_0x537ba4=buildConfig(_0x4940e0,_0x199a04);await initGlobalEnvironment(_0x537ba4);const {getUserDomain:_0x59381f,getApiDomain:_0x4342ed}=await import(_0x326848(0x181)),_0x37b9ff={'apiDomain':_0x4342ed(),'userDomain':_0x59381f()},_0x317516=await buildAuth(_0x537ba4);logger[_0x326848(0x154)](process['cwd']());const _0x139044=(CLI_BIN_NAME+'\x20'+process[_0x326848(0x18a)][_0x326848(0x173)](0x2)['join']('\x20'))[_0x326848(0x15f)]();logger['setRawCommand'](_0x139044);const _0x3bb441=isNonInteractiveMode(_0x199a04);return{'config':_0x537ba4,'auth':_0x317516,'logger':logger,'env':_0x37b9ff,'nonInteractive':_0x3bb441};}export function buildConfigFromFlags(_0x22a6ab){return buildConfig(readRawConfig(),_0x22a6ab);}export function readAppCodeFromConfig(){const _0x520e85=a38_0xb0c848,_0x1d604e=readRawConfig(),_0x908031=_0x1d604e['appcode']??_0x1d604e[_0x520e85(0x15a)];if(typeof _0x908031===_0x520e85(0x164)&&_0x908031[_0x520e85(0x15f)]())return _0x908031[_0x520e85(0x15f)]();const _0x4046d0=_0x1d604e[_0x520e85(0x180)]&&typeof _0x1d604e[_0x520e85(0x180)]===_0x520e85(0x17b)?_0x1d604e[_0x520e85(0x180)]:{},_0x490425=_0x1d604e[_0x520e85(0x17d)]?_0x4046d0[_0x1d604e[_0x520e85(0x17d)]]:undefined;if(_0x490425?.['appcode'])return String(_0x490425[_0x520e85(0x160)])[_0x520e85(0x15f)]();const _0x4d6a9a=normalizeEnv(String(_0x1d604e['env']||_0x520e85(0x178))),_0xc38437=isDaily(_0x4d6a9a)?_0x520e85(0x152):isDev(_0x4d6a9a)?_0x520e85(0x153):'production',_0x107e40=resolveCachedAppCode(typeof _0x1d604e[_0x520e85(0x17d)]===_0x520e85(0x164)?_0x1d604e[_0x520e85(0x17d)]:undefined,_0xc38437,typeof _0x1d604e[_0x520e85(0x155)]==='string'?_0x1d604e['accessKey']:undefined);if(_0x107e40)return _0x107e40;const _0x3260ba=Object[_0x520e85(0x16a)](_0x4046d0)[_0x520e85(0x176)](_0x55cd53=>_0x55cd53?.[_0x520e85(0x160)]);return _0x3260ba?.[_0x520e85(0x160)]?String(_0x3260ba[_0x520e85(0x160)])[_0x520e85(0x15f)]():undefined;}export function readScopedConfig(_0xa8a645){const _0x32684c=a38_0xb0c848,_0x46bbb7=_0xa8a645[_0x32684c(0x17a)]?_0x32684c(0x17a):_0x32684c(0x192);return readConfigFile(resolveWriteConfigPath(_0x46bbb7));}export function writeScopedConfig(_0x50d575,_0x5e2c10){const _0x132404=a38_0xb0c848,_0x2779e1=_0x5e2c10['global']?_0x132404(0x17a):_0x132404(0x192);writeConfigFile(resolveWriteConfigPath(_0x2779e1),_0x50d575);}export async function initGlobalEnvironment(_0x36a859){const _0x577c54=a38_0xb0c848,{initEnv:_0x5baf0e}=await import(_0x577c54(0x184));_0x5baf0e(_0x36a859[_0x577c54(0x189)]);const {initDomains:_0x227c4d}=await import(_0x577c54(0x181));_0x227c4d({'apiDomain':_0x36a859[_0x577c54(0x161)][_0x577c54(0x151)]||_0x36a859[_0x577c54(0x161)][_0x577c54(0x18b)]||undefined,'userDomain':_0x36a859['raw']['userDomain']||undefined,'runtimeDomain':_0x36a859[_0x577c54(0x161)][_0x577c54(0x15c)]||undefined});}export function getProjectConfigPath(){const _0x45a48a=a38_0xb0c848;return resolveConfigPath(process[_0x45a48a(0x168)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x2bfb23){const _0x397acb=a38_0xb0c848;if(!existsSync(_0x2bfb23))return{'status':_0x397acb(0x165)};try{const _0x3e50f1=readFileSync(_0x2bfb23,{'encoding':_0x397acb(0x18d)});if(!_0x3e50f1?.[_0x397acb(0x15f)]())return{'status':_0x397acb(0x191)};const _0x4dd73b=JSON['parse'](_0x3e50f1);return{'status':'ok','data':_0x4dd73b};}catch(_0x6633a9){return{'status':_0x397acb(0x179),'message':_0x6633a9 instanceof Error?_0x6633a9[_0x397acb(0x186)]:String(_0x6633a9)};}}export function loadRawConfigLayers(_0x248009){const _0x15b90a=a38_0xb0c848;let _0x37d07f={},_0x142767={},_0x527828,_0x2a83fa;try{_0x527828=resolveConfigPath(homedir());if(_0x527828){const _0x2b48d5=readFileSync(_0x527828,{'encoding':_0x15b90a(0x18d)});if(_0x2b48d5)_0x37d07f=JSON['parse'](_0x2b48d5);}}catch{}try{const _0x10e5de=_0x248009||process[_0x15b90a(0x168)]();_0x2a83fa=resolveConfigPath(_0x10e5de);if(_0x2a83fa){const _0x8fa0ea=readFileSync(_0x2a83fa,{'encoding':'utf8'});if(_0x8fa0ea)_0x142767=JSON[_0x15b90a(0x162)](_0x8fa0ea);}}catch{}return{'globalPath':_0x527828,'projectPath':_0x2a83fa,'globalConfig':_0x37d07f,'projectConfig':_0x142767};}function mergeRawConfigLayers(_0x3b856d){const _0x27a508=a38_0xb0c848,{globalConfig:_0x4e1168,projectConfig:_0x36a5a5}=_0x3b856d;if(_0x36a5a5[_0x27a508(0x197)]===![]){const _0x3c82c7={..._0x36a5a5};return delete _0x3c82c7['inherit'],_0x3c82c7;}const _0x3b0dd2={..._0x4e1168,..._0x36a5a5};if('defaultApp'in _0x36a5a5)_0x3b0dd2[_0x27a508(0x17d)]=_0x36a5a5[_0x27a508(0x17d)];else _0x4e1168[_0x27a508(0x17d)]&&(_0x3b0dd2[_0x27a508(0x17d)]=_0x4e1168[_0x27a508(0x17d)]);return _0x3b0dd2;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x1a4479){return mergeRawConfigLayers(loadRawConfigLayers(_0x1a4479));}export function readRawConfigWithLayers(_0xf163e9){const _0x5063be=loadRawConfigLayers(_0xf163e9);return{'config':mergeRawConfigLayers(_0x5063be),'layers':_0x5063be};}export function resolveDefaultAppSource(_0x26a19c){const _0x336211=a38_0xb0c848;if('defaultApp'in _0x26a19c[_0x336211(0x182)])return _0x336211(0x192);if(_0x26a19c['projectConfig'][_0x336211(0x197)]===![])return null;if(_0x26a19c[_0x336211(0x156)]['defaultApp'])return _0x336211(0x17a);return null;}function buildConfig(_0xfb1c38,_0x592741){const _0x200319=a38_0xb0c848,_0x4dc2e6=_0xfb1c38['defaultApp']||undefined,_0x4f6582=_0x592741[_0x200319(0x15a)]||env('APP')||undefined,_0xae256e=_0x4f6582||_0x4dc2e6||undefined,_0x3f19f3=env('ACCESS_KEY')||_0xfb1c38[_0x200319(0x155)]||undefined,_0x46bca3=_0x592741[_0x200319(0x189)]||env(_0x200319(0x15e))||_0xfb1c38[_0x200319(0x189)]||DEFAULT_CONFIG_VALUES['env'],_0x2a2392=normalizeEnv(String(_0x46bca3)),_0x14201b=isDaily(_0x2a2392)?'daily':isDev(_0x2a2392)?_0x200319(0x153):_0x200319(0x178),_0x46a5fd=resolveCachedAppCode(_0xae256e,_0x14201b,_0x3f19f3),_0x4f9a17=_0x592741[_0x200319(0x160)]||env(_0x200319(0x172))||_0x46a5fd||_0xfb1c38[_0x200319(0x160)]||_0xfb1c38[_0x200319(0x15a)]||undefined,_0x5c2e92=_0xfb1c38[_0x200319(0x17e)]||DEFAULT_CONFIG_VALUES[_0x200319(0x17e)],_0x1e16f1=undefined,_0x41b47d=_0x592741[_0x200319(0x16f)]||env(_0x200319(0x158))||_0xfb1c38[_0x200319(0x16f)],_0x18cce1=normalizeLegacyOutputFormat(_0x41b47d),_0x20733a=env(_0x200319(0x185))||_0xfb1c38[_0x200319(0x190)],_0x516613=_0x20733a?Number(_0x20733a)||undefined:undefined,_0xad3b23=_0xfb1c38[_0x200319(0x171)]||_0xfb1c38[_0x200319(0x17c)],_0x4ded9c=_0xad3b23===_0x200319(0x167)||_0xad3b23==='write'||_0xad3b23===_0x200319(0x157)?_0xad3b23:DEFAULT_CONFIG_VALUES[_0x200319(0x171)],_0x7010e0=env(_0x200319(0x15b)),_0x18899c=_0x7010e0==='1'||_0x7010e0==='true';return{'appCode':typeof _0x4f9a17===_0x200319(0x164)&&_0x4f9a17['trim']()?_0x4f9a17[_0x200319(0x15f)]():undefined,'env':_0x14201b,'locale':_0x5c2e92,'cookie':_0x1e16f1,'accessKey':_0x3f19f3,'format':_0x18cce1,'pageSize':_0x516613,'riskLevel':_0x4ded9c,'verbose':_0x18899c,'defaultApp':_0x4dc2e6,'currentApp':typeof _0xae256e==='string'?_0xae256e:undefined,'raw':_0xfb1c38};}function env(_0x1663a1){return process.env[`LOVRABET_${_0x1663a1}`]||undefined;}async function buildAuth(_0x4dc87a){const _0x1d152c=a38_0xb0c848,_0x247ec1='',_0x5b972b=!!_0x4dc87a[_0x1d152c(0x155)];return{'cookie':_0x247ec1,'isLoggedIn':_0x5b972b,async 'getOrLogin'(){if(_0x5b972b)return _0x247ec1;throw CliErrors['authRequired']();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4e6824,_0x346d94){const _0x16bb1f=a39_0x4218,_0x5def9=_0x4e6824();while(!![]){try{const _0x2ca419=-parseInt(_0x16bb1f(0x21b))/0x1*(-parseInt(_0x16bb1f(0x1ff))/0x2)+-parseInt(_0x16bb1f(0x20a))/0x3*(parseInt(_0x16bb1f(0x20f))/0x4)+-parseInt(_0x16bb1f(0x212))/0x5*(-parseInt(_0x16bb1f(0x1f3))/0x6)+parseInt(_0x16bb1f(0x219))/0x7+-parseInt(_0x16bb1f(0x1f7))/0x8+-parseInt(_0x16bb1f(0x1f8))/0x9+parseInt(_0x16bb1f(0x21c))/0xa*(-parseInt(_0x16bb1f(0x213))/0xb);if(_0x2ca419===_0x346d94)break;else _0x5def9['push'](_0x5def9['shift']());}catch(_0x57bd5b){_0x5def9['push'](_0x5def9['shift']());}}}(a39_0x4a91,0x5c5f4));import{getRuntimeDomain}from'../constant/domain.js';import{CliErrors}from'../errors.js';function a39_0x4218(_0x7eccc,_0x3a9ae6){_0x7eccc=_0x7eccc-0x1f1;const _0x4a9109=a39_0x4a91();let _0x4218d6=_0x4a9109[_0x7eccc];return _0x4218d6;}import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x31c421){_activeAK=_0x31c421||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x2a477e,_0x1c534a={}){const _0x242e4a=a39_0x4218,{method:method='GET',body:_0x184a60,headers:headers={},timeout:timeout=0x7530}=_0x1c534a,_0x54b81b=_activeAK,_0x3abd27=getRuntimeDomain();if(!_0x54b81b)throw CliErrors[_0x242e4a(0x1fe)](_0x242e4a(0x218));const _0x44c1a9=''+_0x3abd27+_0x2a477e,_0x20502a={'X-User-AK':_0x54b81b},_0x4ae69=new AbortController(),_0x371daa=setTimeout(()=>_0x4ae69[_0x242e4a(0x200)](),timeout);try{const _0x3dc8f7=await fetch(_0x44c1a9,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':_0x242e4a(0x207),..._0x20502a,...headers},'body':_0x184a60?JSON['stringify'](_0x184a60):undefined,'signal':_0x4ae69[_0x242e4a(0x214)]});let _0x71d5c7;try{_0x71d5c7=await _0x3dc8f7[_0x242e4a(0x20d)]();}catch{throw CliErrors['apiError'](_0x242e4a(0x217)+_0x3dc8f7[_0x242e4a(0x20b)]+')',_0x3dc8f7['status']>=0x190?_0x242e4a(0x20c):undefined);}if(!_0x3dc8f7['ok']||_0x71d5c7[_0x242e4a(0x204)]===![])throw CliErrors[_0x242e4a(0x1f1)](_0x71d5c7['errorMsg']||_0x71d5c7['message']||'API\x20error:\x20'+_0x3dc8f7['status'],_0x71d5c7[_0x242e4a(0x215)]?'API\x20error\x20code:\x20'+_0x71d5c7[_0x242e4a(0x215)]:undefined);return _0x71d5c7;}catch(_0x2bc2e0){if(_0x2bc2e0 instanceof Error&&_0x2bc2e0[_0x242e4a(0x1f9)]===_0x242e4a(0x216))throw CliErrors[_0x242e4a(0x1f1)](_0x242e4a(0x21a)+_0x44c1a9);throw _0x2bc2e0;}finally{clearTimeout(_0x371daa);}}export async function getBffScriptInfo(_0xd2782b){const _0x1e3eaf=a39_0x4218,_0x54c1bc=await apiRequest(_0x1e3eaf(0x201)+_0xd2782b);if(!_0x54c1bc[_0x1e3eaf(0x210)])throw CliErrors[_0x1e3eaf(0x1fc)](_0x1e3eaf(0x1f4)+_0xd2782b);return _0x54c1bc['data'];}export async function getSqlQueryInfo(_0x357dd2,_0x2ec9fd){const _0x385d8f=a39_0x4218,_0x194b8a=await apiRequest(_0x385d8f(0x202),{'method':'POST','body':{'appCode':_0x357dd2,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x2ec9fd}}),_0x2a1ae4=_0x194b8a[_0x385d8f(0x210)],_0x1732f9=_0x2a1ae4&&typeof _0x2a1ae4===_0x385d8f(0x205)&&_0x385d8f(0x20e)in _0x2a1ae4?_0x2a1ae4[_0x385d8f(0x20e)]?.[0x0]:_0x2a1ae4&&typeof _0x2a1ae4===_0x385d8f(0x205)&&_0x385d8f(0x1fb)in _0x2a1ae4?_0x2a1ae4:undefined;if(!_0x1732f9)throw CliErrors[_0x385d8f(0x1fc)](_0x385d8f(0x203)+_0x2ec9fd);return _0x1732f9;}function isRemoteAppItem(_0x55f133){const _0x11eb3e=a39_0x4218;return!!_0x55f133&&typeof _0x55f133===_0x11eb3e(0x205)&&typeof _0x55f133[_0x11eb3e(0x209)]===_0x11eb3e(0x1f6)&&typeof _0x55f133['appName']===_0x11eb3e(0x1f6);}function extractRemoteAppItems(_0x21a62b){const _0xbd7ca2=a39_0x4218;if(Array[_0xbd7ca2(0x206)](_0x21a62b))return _0x21a62b[_0xbd7ca2(0x1fa)](isRemoteAppItem);if(!_0x21a62b||typeof _0x21a62b!=='object')throw CliErrors[_0xbd7ca2(0x1f1)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x4d0de9=_0x21a62b;if(Array[_0xbd7ca2(0x206)](_0x4d0de9[_0xbd7ca2(0x20e)]))return _0x4d0de9[_0xbd7ca2(0x20e)][_0xbd7ca2(0x1fa)](isRemoteAppItem);if(_0x4d0de9[_0xbd7ca2(0x210)]&&typeof _0x4d0de9[_0xbd7ca2(0x210)]==='object'){const _0x5aa345=_0x4d0de9[_0xbd7ca2(0x210)];if(Array[_0xbd7ca2(0x206)](_0x5aa345[_0xbd7ca2(0x20e)]))return _0x5aa345[_0xbd7ca2(0x20e)][_0xbd7ca2(0x1fa)](isRemoteAppItem);}throw CliErrors[_0xbd7ca2(0x1f1)](_0xbd7ca2(0x208));}export async function getMyApps(){const _0x252635=a39_0x4218,_0x13c810=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x13c810[_0x252635(0x210)]);}export async function getLoginUserInfo(){const _0xe2c696=a39_0x4218,_0x5c6147=await apiRequest(_0xe2c696(0x1f5));if(!_0x5c6147['data']||typeof _0x5c6147[_0xe2c696(0x210)]!=='object'||Array['isArray'](_0x5c6147[_0xe2c696(0x210)]))throw CliErrors[_0xe2c696(0x1f1)]('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x5c6147[_0xe2c696(0x210)];}function a39_0x4a91(){const _0x2ddac4=['test','918JESAds','BFF\x20script\x20not\x20found:\x20id=','/client/user/loginUserInfo','string','1362664WqFLfK','1390716pJrwjO','name','filter','sqlCode','validation','/client/dataset/list','authRequired','2TCZtKB','abort','/client/bff/query/','/client/sql/query','SQL\x20query\x20not\x20found:\x20','success','object','isArray','cli:lovrabet-runtime','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','appCode','78taLyJE','status','Check\x20your\x20credentials\x20and\x20try\x20again.','json','tableData','90904pVanpb','data','POST','13065DNlGeL','42493dZEULp','signal','errorCode','AbortError','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Configure\x20accessKey\x20in\x20.lovrabet.json.','4958632yAFSNH','Request\x20timeout:\x20','444745BvDAQS','670QJkWrH','code','apiError'];a39_0x4a91=function(){return _0x2ddac4;};return a39_0x4a91();}export async function listDatasets(_0x41cab0,_0x1d3de9){const _0x925850=a39_0x4218,_0x411233=await apiRequest(_0x925850(0x1fd),{'method':_0x925850(0x211),'body':{'appCode':_0x41cab0,..._0x1d3de9?.[_0x925850(0x21d)]&&{'code':_0x1d3de9[_0x925850(0x21d)]},..._0x1d3de9?.[_0x925850(0x1f9)]&&{'name':_0x1d3de9[_0x925850(0x1f9)]}}});return extractList(_0x411233['data']);}export async function getDatasetDetail(_0x19b789){const _0x4dce05=a39_0x4218,_0x393e50=/^\d+$/[_0x4dce05(0x1f2)](_0x19b789)?'id':'code',_0xeb99ec=await apiRequest('/client/dataset/query?'+_0x393e50+'='+_0x19b789);return _0xeb99ec[_0x4dce05(0x210)];}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x12c21f,_0x1d7369){const _0x977272=a40_0x56fa,_0x5ef754=_0x12c21f();while(!![]){try{const _0x2b0212=-parseInt(_0x977272(0x81))/0x1*(parseInt(_0x977272(0x80))/0x2)+-parseInt(_0x977272(0x85))/0x3*(-parseInt(_0x977272(0x8f))/0x4)+parseInt(_0x977272(0x8b))/0x5+parseInt(_0x977272(0x87))/0x6+-parseInt(_0x977272(0x90))/0x7+parseInt(_0x977272(0x86))/0x8+parseInt(_0x977272(0x8a))/0x9*(parseInt(_0x977272(0x8c))/0xa);if(_0x2b0212===_0x1d7369)break;else _0x5ef754['push'](_0x5ef754['shift']());}catch(_0x5bc2fc){_0x5ef754['push'](_0x5ef754['shift']());}}}(a40_0x1c6a,0xc2966));function a40_0x56fa(_0x3791ea,_0x5a2c81){_0x3791ea=_0x3791ea-0x80;const _0x1c6aae=a40_0x1c6a();let _0x56fa3d=_0x1c6aae[_0x3791ea];return _0x56fa3d;}import{listDatasets}from'../core/api-client.js';const cache=new Map();function a40_0x1c6a(){const _0x3ecd38=['955dugCJu','has','set','map','249xOfUxH','1010960NeXAQM','1627674gPOOEH','dbId','dbName','2675583vJzanN','3670145kghceo','30JayfIQ','dbtableConfig','db-','66824dMceIB','9320479hOOSek','2684KwQvsf'];a40_0x1c6a=function(){return _0x3ecd38;};return a40_0x1c6a();}export async function listDatabases(_0x4e5930){const _0x3ebdc1=a40_0x56fa;if(cache[_0x3ebdc1(0x82)](_0x4e5930))return cache['get'](_0x4e5930);const _0x3c2e6=await listDatasets(_0x4e5930),_0x5afe1a=new Map();for(const _0x122b74 of _0x3c2e6){const _0x459ef2=_0x122b74[_0x3ebdc1(0x8d)];_0x459ef2?.[_0x3ebdc1(0x88)]!=null&&_0x5afe1a[_0x3ebdc1(0x83)](_0x459ef2[_0x3ebdc1(0x88)],_0x459ef2[_0x3ebdc1(0x89)]??_0x3ebdc1(0x8e)+_0x459ef2[_0x3ebdc1(0x88)]);}const _0x1982b6=[..._0x5afe1a['entries']()][_0x3ebdc1(0x84)](([_0x3fe14f,_0x1c0113])=>({'dbId':_0x3fe14f,'dbName':_0x1c0113}));return cache[_0x3ebdc1(0x83)](_0x4e5930,_0x1982b6),_0x1982b6;}export async function getDbName(_0x50e5ac,_0x32d9cd){const _0x2c998f=a40_0x56fa;try{const _0x52976a=await listDatabases(_0x50e5ac);return _0x52976a['find'](_0x39ba95=>_0x39ba95['dbId']===_0x32d9cd)?.[_0x2c998f(0x89)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x487219,_0x3d6912){const _0x2b049e=a41_0x15f6,_0xa47ec9=_0x487219();while(!![]){try{const _0x34b1cf=-parseInt(_0x2b049e(0x1d3))/0x1*(parseInt(_0x2b049e(0x1cd))/0x2)+-parseInt(_0x2b049e(0x1c0))/0x3*(parseInt(_0x2b049e(0x1ca))/0x4)+parseInt(_0x2b049e(0x1c6))/0x5*(parseInt(_0x2b049e(0x1cb))/0x6)+parseInt(_0x2b049e(0x1d0))/0x7*(parseInt(_0x2b049e(0x1c2))/0x8)+-parseInt(_0x2b049e(0x1bb))/0x9+-parseInt(_0x2b049e(0x1c4))/0xa+parseInt(_0x2b049e(0x1cf))/0xb;if(_0x34b1cf===_0x3d6912)break;else _0xa47ec9['push'](_0xa47ec9['shift']());}catch(_0x90efa){_0xa47ec9['push'](_0xa47ec9['shift']());}}}(a41_0x189a,0xaea0c));import{createClient}from'@lovrabet/sdk';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x47715c){const _0x889462=a41_0x15f6;_client=createClient({'appCode':_0x47715c['appCode'],'env':_0x47715c['env'],'authMode':_0x47715c[_0x889462(0x1d2)],..._0x47715c[_0x889462(0x1c9)]?{'accessKey':_0x47715c['accessKey']}:{},'options':{'timeout':0x7530}});}function a41_0x15f6(_0x1de7f8,_0x4d2afc){_0x1de7f8=_0x1de7f8-0x1ba;const _0x189ab5=a41_0x189a();let _0x15f643=_0x189ab5[_0x1de7f8];return _0x15f643;}function ensureClient(){const _0x4833bf=a41_0x15f6;if(!_client)throw new Error(_0x4833bf(0x1ce));return _client;}export async function executeData(_0x1754e8,_0x1f304f,_0x1af332){const _0x2210ec=a41_0x15f6,_0x1c3fd6=ensureClient(),_0x17e6d4=_0x2210ec(0x1c7)+_0x1754e8,_0xf71fa8=_0x1c3fd6[_0x2210ec(0x1be)][_0x17e6d4];if(!_0xf71fa8||typeof _0xf71fa8[_0x1f304f]!==_0x2210ec(0x1cc))throw new Error(_0x2210ec(0x1bf)+_0x1f304f+'\x22.\x20'+_0x2210ec(0x1c5));if(_0x1f304f===_0x2210ec(0x1d1))return _0xf71fa8['batchCreate'](parseBatchCreateItemsFromParams(_0x1af332));const _0xa254c5=_0x1af332!==undefined&&_0x1af332!==null&&!Array['isArray'](_0x1af332)?_0x1af332:{};switch(_0x1f304f){case _0x2210ec(0x1bc):{const _0xaa63f4=_0xa254c5['id'];if(_0xaa63f4===undefined||_0xaa63f4===null)throw new Error('getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0xf71fa8[_0x2210ec(0x1bc)](_0xaa63f4);}case _0x2210ec(0x1c3):{const {id:_0x5e0eb2,..._0x4d1eeb}=_0xa254c5;if(_0x5e0eb2===undefined||_0x5e0eb2===null)throw new Error('update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27');return _0xf71fa8[_0x2210ec(0x1c3)](_0x5e0eb2,_0x4d1eeb);}case _0x2210ec(0x1c8):{const _0x285dd2=_0xa254c5['id'];if(_0x285dd2===undefined||_0x285dd2===null)throw new Error('delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0xf71fa8[_0x2210ec(0x1c8)](_0x285dd2);}default:return _0xf71fa8[_0x1f304f](_0xa254c5);}}export async function executeSdkSql(_0x41e5f0,_0x445261){const _0x414278=a41_0x15f6,_0x14506c=ensureClient();return _0x14506c[_0x414278(0x1bd)][_0x414278(0x1c1)]({'sqlCode':_0x41e5f0,'params':_0x445261});}function a41_0x189a(){const _0x188eff=['6700cywiMH','dataset_','delete','accessKey','8444slhLvR','4812CwREot','function','31564LuzUMv','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','12884553woKtBd','1126671vTMbdE','batchCreate','authMode','15PkDuCl','bff','11435967QFPZdj','getOne','sql','models','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','1149wjFsrX','execute','56HAytHX','update','3414920Hucmmk','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.'];a41_0x189a=function(){return _0x188eff;};return a41_0x189a();}export async function executeSdkBff(_0x2739a1,_0xcac759){const _0x44aa24=a41_0x15f6,_0x3e349b=ensureClient();return _0x3e349b[_0x44aa24(0x1ba)]['execute']({'scriptName':_0x2739a1,'params':_0xcac759});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a42_0x4e7e73=a42_0x283b;(function(_0x269589,_0x5c913a){const _0x1700b6=a42_0x283b,_0x15bb82=_0x269589();while(!![]){try{const _0x1e63ad=parseInt(_0x1700b6(0x18a))/0x1+-parseInt(_0x1700b6(0x18f))/0x2*(-parseInt(_0x1700b6(0x18b))/0x3)+-parseInt(_0x1700b6(0x18e))/0x4+parseInt(_0x1700b6(0x188))/0x5+parseInt(_0x1700b6(0x185))/0x6+parseInt(_0x1700b6(0x184))/0x7*(parseInt(_0x1700b6(0x18d))/0x8)+-parseInt(_0x1700b6(0x18c))/0x9*(parseInt(_0x1700b6(0x186))/0xa);if(_0x1e63ad===_0x5c913a)break;else _0x15bb82['push'](_0x15bb82['shift']());}catch(_0x257bd8){_0x15bb82['push'](_0x15bb82['shift']());}}}(a42_0x3154,0x27812));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a42_0x3154(){const _0x18e37b=['742140SlzWBe','1332yBERDQ','652015pvMZro','688938ZdOgEO','2790CMnktM','Configure\x20accessKey\x20in\x20.lovrabet.json\x20or\x20run\x20`','1025785DRpqew','\x20auth\x20login`.','188992OiCafU','921jhsTkD','14814QjBaBs','8lIewcJ'];a42_0x3154=function(){return _0x18e37b;};return a42_0x3154();}function a42_0x283b(_0x26fa98,_0x332471){_0x26fa98=_0x26fa98-0x184;const _0x3154d7=a42_0x3154();let _0x283b1f=_0x3154d7[_0x26fa98];return _0x283b1f;}export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a42_0x4e7e73(0x187)+CLI_BIN_NAME+a42_0x4e7e73(0x189),'configMissingHint':'Set\x20appcode\x20via\x20--appcode\x20or\x20.lovrabet.json.','notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20.lovrabet.json\x20file.'});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x547261,_0x3c160e){var _0x1c1dc2=a43_0xae38,_0x579e09=_0x547261();while(!![]){try{var _0x212467=parseInt(_0x1c1dc2(0x9b))/0x1+-parseInt(_0x1c1dc2(0x9a))/0x2+parseInt(_0x1c1dc2(0x9d))/0x3+parseInt(_0x1c1dc2(0x99))/0x4+parseInt(_0x1c1dc2(0x9e))/0x5+-parseInt(_0x1c1dc2(0x9c))/0x6*(parseInt(_0x1c1dc2(0x9f))/0x7)+parseInt(_0x1c1dc2(0xa0))/0x8;if(_0x212467===_0x3c160e)break;else _0x579e09['push'](_0x579e09['shift']());}catch(_0x2f2e07){_0x579e09['push'](_0x579e09['shift']());}}}(a43_0x13c7,0xe404b));function a43_0xae38(_0x5e5933,_0x2b8160){_0x5e5933=_0x5e5933-0x99;var _0x13c70b=a43_0x13c7();var _0xae380d=_0x13c70b[_0x5e5933];return _0xae380d;}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a43_0xeda800}from'@lovrabet/cli-framework';function a43_0x13c7(){var _0x4bed23=['838764cHHeca','3463316tXzQje','1713923xkguOX','4639728xvIqCE','713763DgrpDL','7887290aGoMDa','14EmPIzp','3785632HoyuxN'];a43_0x13c7=function(){return _0x4bed23;};return a43_0x13c7();}export function buildAllFlags(_0xe147d6){return a43_0xeda800(_0xe147d6,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a44_0x5587(_0xf2e6e3,_0xeeb660){_0xf2e6e3=_0xf2e6e3-0x15f;const _0x2ef3cb=a44_0x2ef3();let _0x55870f=_0x2ef3cb[_0xf2e6e3];return _0x55870f;}function a44_0x2ef3(){const _0x341b1d=['28nZeszU','86046ZoftNf','description','7238452XwiUrI','22RtJdjp','1441060pMOras','1dlEvOD','5bXrBdT','36HHPvLI','body','1076466iIhqLd','34370EodFeA','21687CVqrfz','84MxCzGF','32vygXTC','877356EIXiBj'];a44_0x2ef3=function(){return _0x341b1d;};return a44_0x2ef3();}(function(_0x71e4d3,_0x1975f0){const _0x3b0184=a44_0x5587,_0x1a989f=_0x71e4d3();while(!![]){try{const _0x5d5b26=parseInt(_0x3b0184(0x161))/0x1*(-parseInt(_0x3b0184(0x16c))/0x2)+-parseInt(_0x3b0184(0x167))/0x3*(parseInt(_0x3b0184(0x168))/0x4)+-parseInt(_0x3b0184(0x162))/0x5*(-parseInt(_0x3b0184(0x165))/0x6)+parseInt(_0x3b0184(0x166))/0x7*(parseInt(_0x3b0184(0x169))/0x8)+-parseInt(_0x3b0184(0x163))/0x9*(parseInt(_0x3b0184(0x160))/0xa)+parseInt(_0x3b0184(0x15f))/0xb*(-parseInt(_0x3b0184(0x16a))/0xc)+-parseInt(_0x3b0184(0x16e))/0xd*(-parseInt(_0x3b0184(0x16b))/0xe);if(_0x5d5b26===_0x1975f0)break;else _0x1a989f['push'](_0x1a989f['shift']());}catch(_0xe21ae3){_0x1a989f['push'](_0x1a989f['shift']());}}}(a44_0x2ef3,0x607a9));export function dryRun(_0x48c601,_0x353477){const _0x44f78b={'method':_0x48c601,'url':_0x353477},_0x3eb874={'body'(_0x36a0f8){const _0x11e9c3=a44_0x5587;return _0x44f78b[_0x11e9c3(0x164)]=_0x36a0f8,_0x3eb874;},'description'(_0xfdb686){const _0x29fa92=a44_0x5587;return _0x44f78b[_0x29fa92(0x16d)]=_0xfdb686,_0x3eb874;},'build'(){return{..._0x44f78b};}};return _0x3eb874;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a45_0x31da(){const _0x1dbece=['284137aUVfYf','143rFnnSd','488784DItQPk','18HrbNgH','3906xmgZwV','6191211LVNyIb','36553eWGICS','48minOlm','8770mjmMdV','24txqVSS','1005318bhKtmd','951436iKlXsO','20TUCCGS','validateFlags'];a45_0x31da=function(){return _0x1dbece;};return a45_0x31da();}const a45_0x1873e3=a45_0x4272;(function(_0x270b67,_0x2b79a2){const _0x2e5b9a=a45_0x4272,_0x11788f=_0x270b67();while(!![]){try{const _0x59e452=parseInt(_0x2e5b9a(0x17a))/0x1*(parseInt(_0x2e5b9a(0x17d))/0x2)+-parseInt(_0x2e5b9a(0x177))/0x3*(-parseInt(_0x2e5b9a(0x17f))/0x4)+parseInt(_0x2e5b9a(0x180))/0x5*(parseInt(_0x2e5b9a(0x17e))/0x6)+-parseInt(_0x2e5b9a(0x182))/0x7*(parseInt(_0x2e5b9a(0x17b))/0x8)+-parseInt(_0x2e5b9a(0x178))/0x9*(parseInt(_0x2e5b9a(0x17c))/0xa)+parseInt(_0x2e5b9a(0x175))/0xb*(-parseInt(_0x2e5b9a(0x176))/0xc)+-parseInt(_0x2e5b9a(0x179))/0xd;if(_0x59e452===_0x2b79a2)break;else _0x11788f['push'](_0x11788f['shift']());}catch(_0x474354){_0x11788f['push'](_0x11788f['shift']());}}}(a45_0x31da,0xdd35b));function a45_0x4272(_0x16b380,_0x5c08e4){_0x16b380=_0x16b380-0x175;const _0x31da4c=a45_0x31da();let _0x42720b=_0x31da4c[_0x16b380];return _0x42720b;}import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers['parseFlags'];export const validateFlags=helpers[a45_0x1873e3(0x181)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a46_0x377594=a46_0x3893;(function(_0x138c36,_0x464d8a){const _0x527a07=a46_0x3893,_0x97e62=_0x138c36();while(!![]){try{const _0x44f81d=-parseInt(_0x527a07(0x1e9))/0x1*(-parseInt(_0x527a07(0x1e6))/0x2)+-parseInt(_0x527a07(0x1e2))/0x3*(parseInt(_0x527a07(0x1e5))/0x4)+parseInt(_0x527a07(0x1e4))/0x5+parseInt(_0x527a07(0x1e1))/0x6+-parseInt(_0x527a07(0x1ec))/0x7*(-parseInt(_0x527a07(0x1e3))/0x8)+parseInt(_0x527a07(0x1e7))/0x9+-parseInt(_0x527a07(0x1e8))/0xa*(parseInt(_0x527a07(0x1ea))/0xb);if(_0x44f81d===_0x464d8a)break;else _0x97e62['push'](_0x97e62['shift']());}catch(_0x1b3de5){_0x97e62['push'](_0x97e62['shift']());}}}(a46_0x4ef9,0xa7140));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a46_0x4ef9(){const _0x299222=['7AZYpuK','get','generateCommandHelp','2493672NXoQnh','104106iLQrLr','7745192CHrrUN','6192620FxKFLe','52WdoDmE','1538TnagiO','10487196XWjYJQ','144390SlINBx','438jJQXjK','2277VMGrSZ','generateServiceHelp'];a46_0x4ef9=function(){return _0x299222;};return a46_0x4ef9();}function a46_0x3893(_0x576069,_0x45b12a){_0x576069=_0x576069-0x1df;const _0x4ef9b0=a46_0x4ef9();let _0x3893e9=_0x4ef9b0[_0x576069];return _0x3893e9;}const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x1e25c7=>serviceGroups[a46_0x377594(0x1df)](_0x1e25c7),'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20.lovrabet.json\x20or\x20--appcode).'});export function generateCommandHelp(_0x5a1809){const _0x1d8105=a46_0x377594;return generators[_0x1d8105(0x1e0)](_0x5a1809);}export const generateServiceHelp=generators[a46_0x377594(0x1eb)];export const generateFullHelp=generators['generateFullHelp'];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39ec04,_0x65e22){var _0x11b38d=a47_0x4066,_0x536649=_0x39ec04();while(!![]){try{var _0x763d91=parseInt(_0x11b38d(0x162))/0x1*(-parseInt(_0x11b38d(0x15f))/0x2)+parseInt(_0x11b38d(0x167))/0x3+-parseInt(_0x11b38d(0x163))/0x4*(parseInt(_0x11b38d(0x161))/0x5)+parseInt(_0x11b38d(0x166))/0x6*(parseInt(_0x11b38d(0x168))/0x7)+parseInt(_0x11b38d(0x164))/0x8+parseInt(_0x11b38d(0x165))/0x9*(parseInt(_0x11b38d(0x160))/0xa)+-parseInt(_0x11b38d(0x169))/0xb;if(_0x763d91===_0x65e22)break;else _0x536649['push'](_0x536649['shift']());}catch(_0xf4910c){_0x536649['push'](_0x536649['shift']());}}}(a47_0x3fed,0x38c2e));function a47_0x3fed(){var _0x41e598=['384052gDcEeH','1061632rElvfO','4446YWVCor','22398dtFTMp','1365075EdMkuJ','595SFDsCy','6163421KDSiwD','9634omGHDv','5600GFKUwO','20EvxXqF','1BVZJWs'];a47_0x3fed=function(){return _0x41e598;};return a47_0x3fed();}export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';function a47_0x4066(_0x570944,_0x21c599){_0x570944=_0x570944-0x15f;var _0x3fed26=a47_0x3fed();var _0x4066b8=_0x3fed26[_0x570944];return _0x4066b8;}export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{dryRun}from'../framework/dryrun.js';export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d5c87,_0x40ffa2){const _0x45ee0f=a48_0x5e4f,_0x5b8c9b=_0x5d5c87();while(!![]){try{const _0x498e52=-parseInt(_0x45ee0f(0xd9))/0x1+-parseInt(_0x45ee0f(0xd3))/0x2+-parseInt(_0x45ee0f(0xd4))/0x3+-parseInt(_0x45ee0f(0xd8))/0x4+parseInt(_0x45ee0f(0xd7))/0x5+-parseInt(_0x45ee0f(0xd5))/0x6+parseInt(_0x45ee0f(0xd6))/0x7;if(_0x498e52===_0x40ffa2)break;else _0x5b8c9b['push'](_0x5b8c9b['shift']());}catch(_0x3fd27c){_0x5b8c9b['push'](_0x5b8c9b['shift']());}}}(a48_0x4be9,0xec506));function a48_0x5e4f(_0x43b241,_0x118b4a){_0x43b241=_0x43b241-0xd3;const _0x4be989=a48_0x4be9();let _0x5e4f51=_0x4be989[_0x43b241];return _0x5e4f51;}import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a48_0x4be9(){const _0x28f0fb=['3672384Wbessp','10963680WKrjWu','39159512ANASpR','3604945jstqQY','200312ctdxRB','943689SRBBny','2604176DecUHL'];a48_0x4be9=function(){return _0x28f0fb;};return a48_0x4be9();}export const formatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x122f45,_0x33f284){const _0x180975=a49_0x5f45,_0x5e0ec7=_0x122f45();while(!![]){try{const _0x18ab40=parseInt(_0x180975(0x122))/0x1*(-parseInt(_0x180975(0x118))/0x2)+-parseInt(_0x180975(0x11e))/0x3+-parseInt(_0x180975(0x132))/0x4+parseInt(_0x180975(0x121))/0x5*(-parseInt(_0x180975(0x12a))/0x6)+-parseInt(_0x180975(0x125))/0x7*(parseInt(_0x180975(0x110))/0x8)+parseInt(_0x180975(0x119))/0x9+parseInt(_0x180975(0x129))/0xa;if(_0x18ab40===_0x33f284)break;else _0x5e0ec7['push'](_0x5e0ec7['shift']());}catch(_0x59c486){_0x5e0ec7['push'](_0x5e0ec7['shift']());}}}(a49_0x1f4a,0x3ccc0));function toKebab(_0x47673c){const _0xf9c350=a49_0x5f45;return _0x47673c[_0xf9c350(0x130)](/_/g,'-')['replace'](/-([A-Z]+)/g,(_0x2741b1,_0x27f21f)=>'-'+_0x27f21f[_0xf9c350(0x111)]())[_0xf9c350(0x130)](/([a-z0-9])([A-Z])/g,(_0xd87751,_0x533c60,_0x482167)=>_0x533c60+'-'+_0x482167)[_0xf9c350(0x111)]();}function a49_0x5f45(_0x5291c9,_0x37b945){_0x5291c9=_0x5291c9-0x10f;const _0x1f4a6f=a49_0x1f4a();let _0x5f4541=_0x1f4a6f[_0x5291c9];return _0x5f4541;}function a49_0x1f4a(){const _0x157bff=['type','push','3848qMYzSz','toLowerCase','keys','set','dryRun','get','app','alias','50urDfqJ','1283346mdRBmE','name','has','dry-run','original','410982GBIWng','slice','add','2945foqRYz','14194cInVgB','appcode','string','6566IWgNzm','help','format','number','14092880twHJkC','3444nCrVMS','length','sticky','boolean','corrected','indexOf','replace','global','87000YWIVNL','entries'];a49_0x1f4a=function(){return _0x157bff;};return a49_0x1f4a();}function buildKnownFlags(_0x2262cd){const _0x3b8b25=a49_0x5f45,_0x368fe9=new Set();for(const _0x446282 of _0x2262cd){_0x368fe9[_0x3b8b25(0x120)](_0x446282['name']),_0x368fe9['add'](toCamelCase(_0x446282['name']));}for(const _0x4b9da4 of[_0x3b8b25(0x11c),_0x3b8b25(0x114),'yes',_0x3b8b25(0x127)]){_0x368fe9[_0x3b8b25(0x120)](_0x4b9da4);}for(const _0x2a842f of[_0x3b8b25(0x126),'env',_0x3b8b25(0x123),_0x3b8b25(0x116),'nonInteractive','non-interactive','ci',_0x3b8b25(0x131),'version']){_0x368fe9[_0x3b8b25(0x120)](_0x2a842f);}return _0x368fe9;}function buildFlagTypeMap(_0x3c1dac){const _0x243c3b=a49_0x5f45,_0x2768bb=new Map();for(const _0x2c019d of _0x3c1dac){_0x2768bb['set'](_0x2c019d['name'],_0x2c019d[_0x243c3b(0x134)]),_0x2768bb[_0x243c3b(0x113)](toCamelCase(_0x2c019d[_0x243c3b(0x11a)]),_0x2c019d[_0x243c3b(0x134)]);}return _0x2768bb;}function toCamelCase(_0x15bb61){return _0x15bb61['replace'](/-([a-z])/g,(_0x30a5f8,_0x7d7014)=>_0x7d7014['toUpperCase']());}function aliasHandler(_0x35a5fb,_0x24a4bd){const _0x51b6e2=a49_0x5f45,_0xf65e4b=[];for(const _0x4b43c4 of Object[_0x51b6e2(0x112)](_0x35a5fb)){if(_0x24a4bd['has'](_0x4b43c4))continue;const _0x12bfef=toKebab(_0x4b43c4);_0x12bfef!==_0x4b43c4&&_0x24a4bd[_0x51b6e2(0x11b)](_0x12bfef)&&_0xf65e4b[_0x51b6e2(0x10f)]({'original':_0x4b43c4,'corrected':_0x12bfef,'handler':_0x51b6e2(0x117)});}return _0xf65e4b;}function stickyHandler(_0x280ab8,_0x2de952,_0x1bd16c){const _0x4d92b7=a49_0x5f45,_0x1dcef6=[];for(const [_0x30b4ba,_0x503564]of Object[_0x4d92b7(0x133)](_0x280ab8)){if(_0x503564!==!![])continue;for(let _0x39a020=_0x30b4ba['length']-0x1;_0x39a020>0x0;_0x39a020--){const _0x392b67=_0x30b4ba[_0x4d92b7(0x11f)](0x0,_0x39a020),_0x31fa7d=_0x30b4ba['slice'](_0x39a020),_0x2a06dd=toKebab(_0x392b67),_0x1a2cac=toCamelCase(_0x392b67),_0x31501c=_0x2de952['has'](_0x392b67)?_0x392b67:_0x2de952[_0x4d92b7(0x11b)](_0x2a06dd)?_0x2a06dd:_0x2de952[_0x4d92b7(0x11b)](_0x1a2cac)?_0x1a2cac:null;if(!_0x31501c)continue;const _0x4ecab7=_0x1bd16c[_0x4d92b7(0x115)](_0x31501c)??_0x4d92b7(0x124);let _0x2d3224;if(_0x4ecab7===_0x4d92b7(0x128)){const _0x3a89b4=Number(_0x31fa7d);if(isNaN(_0x3a89b4)||_0x31fa7d==='')continue;_0x2d3224=_0x3a89b4;}else{if(_0x4ecab7===_0x4d92b7(0x12d))continue;else{if(_0x31fa7d==='')continue;_0x2d3224=_0x31fa7d;}}_0x1dcef6[_0x4d92b7(0x10f)]({'original':_0x30b4ba,'corrected':_0x31501c+'='+_0x2d3224,'handler':_0x4d92b7(0x12c)});break;}}return _0x1dcef6;}export function correctFlags(_0x534a0c,_0x5ca158){const _0x3e5d4f=a49_0x5f45,_0x4f8df1=buildKnownFlags(_0x5ca158),_0x412d9a=buildFlagTypeMap(_0x5ca158),_0x45779e=aliasHandler(_0x534a0c,_0x4f8df1),_0x438bb3=stickyHandler(_0x534a0c,_0x4f8df1,_0x412d9a),_0x216d77=[..._0x45779e,..._0x438bb3];if(_0x216d77[_0x3e5d4f(0x12b)]===0x0)return{'flags':_0x534a0c,'corrections':[]};const _0x391589={..._0x534a0c},_0x3dd451=new Set();for(const _0x1abb6b of _0x45779e){_0x391589[_0x1abb6b['corrected']]=_0x534a0c[_0x1abb6b[_0x3e5d4f(0x11d)]],_0x3dd451[_0x3e5d4f(0x120)](_0x1abb6b['original']);}for(const _0xca9622 of _0x438bb3){const _0x3c279c=_0xca9622[_0x3e5d4f(0x12e)][_0x3e5d4f(0x12f)]('='),_0x31a018=_0xca9622[_0x3e5d4f(0x12e)][_0x3e5d4f(0x11f)](0x0,_0x3c279c),_0x45716e=_0xca9622[_0x3e5d4f(0x12e)][_0x3e5d4f(0x11f)](_0x3c279c+0x1),_0x56f587=_0x412d9a[_0x3e5d4f(0x115)](_0x31a018)??_0x3e5d4f(0x124);_0x56f587===_0x3e5d4f(0x128)?_0x391589[_0x31a018]=Number(_0x45716e):_0x391589[_0x31a018]=_0x45716e,_0x3dd451[_0x3e5d4f(0x120)](_0xca9622['original']);}for(const _0x19bc73 of _0x3dd451){delete _0x391589[_0x19bc73];}return{'flags':_0x391589,'corrections':_0x216d77};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a50_0x121f(){var _0x5309fd=['677159RkrUtE','1550foQtgN','3204RSKkSO','1293XFuqZY','2597012wqJdjP','8735kFgpxe','310857iOVRlj','334JwOVfd','718692JBffGA','4beTzLj','756nUnXWA','16JeZUDv'];a50_0x121f=function(){return _0x5309fd;};return a50_0x121f();}(function(_0x46eda6,_0x2c82ff){var _0x32cb29=a50_0x3085,_0x17439f=_0x46eda6();while(!![]){try{var _0x247e3a=-parseInt(_0x32cb29(0x1b6))/0x1*(-parseInt(_0x32cb29(0x1ba))/0x2)+parseInt(_0x32cb29(0x1b9))/0x3*(-parseInt(_0x32cb29(0x1bc))/0x4)+-parseInt(_0x32cb29(0x1b8))/0x5*(parseInt(_0x32cb29(0x1bd))/0x6)+parseInt(_0x32cb29(0x1bf))/0x7*(parseInt(_0x32cb29(0x1be))/0x8)+parseInt(_0x32cb29(0x1b5))/0x9*(-parseInt(_0x32cb29(0x1c0))/0xa)+parseInt(_0x32cb29(0x1b7))/0xb+-parseInt(_0x32cb29(0x1bb))/0xc;if(_0x247e3a===_0x2c82ff)break;else _0x17439f['push'](_0x17439f['shift']());}catch(_0xc6a09b){_0x17439f['push'](_0x17439f['shift']());}}}(a50_0x121f,0x3275d));function a50_0x3085(_0x349d39,_0x481299){_0x349d39=_0x349d39-0x1b5;var _0x121f9f=a50_0x121f();var _0x308502=_0x121f9f[_0x349d39];return _0x308502;}export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4ec4ff,_0x4f1189){const _0x402241=a51_0x585b,_0x1a3306=_0x4ec4ff();while(!![]){try{const _0x386e11=-parseInt(_0x402241(0x8a))/0x1+parseInt(_0x402241(0x8c))/0x2+parseInt(_0x402241(0x77))/0x3*(parseInt(_0x402241(0x7a))/0x4)+-parseInt(_0x402241(0x87))/0x5*(parseInt(_0x402241(0x89))/0x6)+-parseInt(_0x402241(0x86))/0x7+parseInt(_0x402241(0x7d))/0x8*(parseInt(_0x402241(0x80))/0x9)+parseInt(_0x402241(0x90))/0xa;if(_0x386e11===_0x4f1189)break;else _0x1a3306['push'](_0x1a3306['shift']());}catch(_0x13e34b){_0x1a3306['push'](_0x1a3306['shift']());}}}(a51_0x14dd,0x48cd2));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x25cd9d,_0x53da28,_0x1a91bb){const _0x42ed64=a51_0x585b,_0x3424dd=buildConfirmationContext(_0x25cd9d,_0x53da28,_0x1a91bb),_0x409c5b=['⚠\x20\x20High-risk\x20operation:\x20'+_0x3424dd[_0x42ed64(0x82)]];return _0x3424dd[_0x42ed64(0x84)]&&_0x409c5b['push'](_0x42ed64(0x76)+_0x3424dd[_0x42ed64(0x84)]),_0x3424dd[_0x42ed64(0x78)]&&_0x409c5b[_0x42ed64(0x8e)](_0x42ed64(0x83)+_0x3424dd[_0x42ed64(0x78)]),_0x409c5b['push']('\x20\x20\x20Continue?\x20[y/N]\x20'),_0x409c5b;}function a51_0x585b(_0x58af95,_0x963159){_0x58af95=_0x58af95-0x76;const _0x14dd92=a51_0x14dd();let _0x585be7=_0x14dd92[_0x58af95];return _0x585be7;}export function reconstructCommandArgv(_0x2b185d,_0x25a397){const _0x45dab7=a51_0x585b,_0x557040=[CLI_BIN_NAME,_0x2b185d[_0x45dab7(0x7b)],_0x2b185d[_0x45dab7(0x8d)]];for(const [_0x5dc1a9,_0x5830c3]of Object[_0x45dab7(0x7f)](_0x25a397)){if(_0x5830c3===!![])_0x557040['push']('--'+_0x5dc1a9);else _0x5830c3!==![]&&_0x5830c3!==undefined&&_0x5830c3!==''&&_0x557040[_0x45dab7(0x8e)]('--'+_0x5dc1a9+'\x20'+JSON[_0x45dab7(0x7c)](_0x5830c3));}return _0x557040[_0x45dab7(0x8e)](_0x45dab7(0x8b)),_0x557040['join']('\x20');}function buildConfirmationContext(_0x510286,_0x2b4e06,_0x77c859){const _0x1f94d4=extractAffectedRecords(_0x77c859);return{'commandLabel':_0x2b4e06,'description':_0x510286['description'],'affectedRecords':_0x1f94d4};}function a51_0x14dd(){const _0x17426d=['257810OoEKkl','--yes','264730qfZSpM','command','push','params','1341190iXjZtr','code','\x20\x20\x20','628872dBrVYH','affectedRecords','name','4QXzIPf','service','stringify','3224dWnDhw','name=','entries','13059LoQgOp','id=','commandLabel','\x20\x20\x20Affected:\x20','description','code=','939547UEczXM','610IWpvvJ','params=','18228CFNGEf'];a51_0x14dd=function(){return _0x17426d;};return a51_0x14dd();}function extractAffectedRecords(_0x88920a){const _0x5e32c3=a51_0x585b,_0x1d0cbc=[];if(_0x88920a[_0x5e32c3(0x91)])_0x1d0cbc[_0x5e32c3(0x8e)](_0x5e32c3(0x85)+_0x88920a['code']);if(_0x88920a['id'])_0x1d0cbc['push'](_0x5e32c3(0x81)+_0x88920a['id']);if(_0x88920a[_0x5e32c3(0x79)])_0x1d0cbc[_0x5e32c3(0x8e)](_0x5e32c3(0x7e)+_0x88920a['name']);if(_0x88920a['params'])_0x1d0cbc[_0x5e32c3(0x8e)](_0x5e32c3(0x88)+_0x88920a[_0x5e32c3(0x8f)]);return _0x1d0cbc['length']>0x0?_0x1d0cbc['join'](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a52_0x5e43(_0x1f9137,_0x14ae8e){_0x1f9137=_0x1f9137-0x190;const _0x118619=a52_0x1186();let _0x5e43dd=_0x118619[_0x1f9137];return _0x5e43dd;}(function(_0x173bc3,_0x3c47d2){const _0x54ff53=a52_0x5e43,_0x49bcb8=_0x173bc3();while(!![]){try{const _0x1aee02=parseInt(_0x54ff53(0x194))/0x1+parseInt(_0x54ff53(0x199))/0x2+parseInt(_0x54ff53(0x196))/0x3*(parseInt(_0x54ff53(0x197))/0x4)+parseInt(_0x54ff53(0x191))/0x5+-parseInt(_0x54ff53(0x193))/0x6+parseInt(_0x54ff53(0x195))/0x7+parseInt(_0x54ff53(0x19b))/0x8*(-parseInt(_0x54ff53(0x192))/0x9);if(_0x1aee02===_0x3c47d2)break;else _0x49bcb8['push'](_0x49bcb8['shift']());}catch(_0x50b4a9){_0x49bcb8['push'](_0x49bcb8['shift']());}}}(a52_0x1186,0x899e9));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x189d31){const _0x48561a=a52_0x5e43;if(_0x189d31 instanceof LovrabetError)return CliErrors[_0x48561a(0x19c)](userFacingLovrabetMessage(_0x189d31));return _0x189d31;}function a52_0x1186(){const _0x5d7396=['3946000ubNDZG','6741RGUaqc','1271436AdgEVx','234680VcSMhH','3941049pdOjEq','1225299BXZbxd','4qrYQSO','string','343834imaWZW','trim','14864WroVwv','validation','message'];a52_0x1186=function(){return _0x5d7396;};return a52_0x1186();}function userFacingLovrabetMessage(_0x89443c){const _0xfb1a22=a52_0x5e43,_0x170dcd=_0x89443c['description'];if(_0x170dcd!==undefined&&_0x170dcd!==null){if(typeof _0x170dcd===_0xfb1a22(0x198)&&_0x170dcd[_0xfb1a22(0x19a)]())return _0x170dcd['trim']();try{return JSON['stringify'](_0x170dcd);}catch{}}return _0x89443c[_0xfb1a22(0x190)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a53_0x1b36(_0x214325,_0x162669){_0x214325=_0x214325-0x1c3;const _0x3f8ba0=a53_0x3f8b();let _0x1b368f=_0x3f8ba0[_0x214325];return _0x1b368f;}(function(_0x538aed,_0x242958){const _0xed4d91=a53_0x1b36,_0x51d49a=_0x538aed();while(!![]){try{const _0x1806d5=parseInt(_0xed4d91(0x1d0))/0x1+parseInt(_0xed4d91(0x1ce))/0x2+parseInt(_0xed4d91(0x1d3))/0x3*(-parseInt(_0xed4d91(0x1d2))/0x4)+-parseInt(_0xed4d91(0x1e1))/0x5+parseInt(_0xed4d91(0x1c3))/0x6+parseInt(_0xed4d91(0x1c6))/0x7+-parseInt(_0xed4d91(0x1d5))/0x8;if(_0x1806d5===_0x242958)break;else _0x51d49a['push'](_0x51d49a['shift']());}catch(_0x1262dc){_0x51d49a['push'](_0x51d49a['shift']());}}}(a53_0x3f8b,0xa0b5d));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';function a53_0x3f8b(){const _0x4b2add=['1990706uCzfWp','pageSize','1174475DXLZcI','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','360VUplyU','29694kIDjJk','riskLevel','6242448OPaioG','error','requiresAppCode','appCode','defaultPageSize','defaultVerbose','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20.lovrabet.json.','env','requiresAuth','verbose','mergedCli','cancelled','5371255cpnPwo','currentApp','2311728QxkByX','format','../core/api-client.js','5939710tIxFLV','command','Set\x20accessKey\x20in\x20.lovrabet.json\x20or\x20pass\x20LOVRABET_ACCESS_KEY.','High-risk\x20operation\x20`','configMissing','accessKey','defaultApp','validation'];a53_0x3f8b=function(){return _0x4b2add;};return a53_0x3f8b();}export function resolveAuthMode(_0x5ae07e){return void _0x5ae07e,AUTH_MODE['ClientAk'];}export function createPipelineEnv(_0x1792af,_0x102a63){const _0x4a9a48=a53_0x1b36;return{'rawFlags':_0x102a63,'appCode':_0x1792af[_0x4a9a48(0x1d8)]||process.env.RABETBASE_APPCODE||readAppCodeFromConfig(),'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x102a63),'defaultFormat':_0x1792af[_0x4a9a48(0x1c4)],'defaultPageSize':_0x1792af[_0x4a9a48(0x1cf)],'defaultVerbose':_0x1792af[_0x4a9a48(0x1de)],'riskLevel':_0x1792af[_0x4a9a48(0x1d4)],'accessKey':_0x1792af[_0x4a9a48(0x1cb)],'env':_0x1792af[_0x4a9a48(0x1dc)],'mergedCli':{'defaultApp':_0x1792af[_0x4a9a48(0x1cc)],'currentApp':_0x1792af[_0x4a9a48(0x1e2)],'appCode':_0x1792af['appCode']}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x15d0ee=>PIPELINE_FLAG_NAMES['has'](_0x15d0ee['name']))['map'](({name:_0x552f0e,type:_0x131a62,description:_0x441d05})=>({'name':_0x552f0e,'type':_0x131a62,'description':_0x441d05})),'formatOutput':formatOutput,'getCommandLabel'(_0x460691){const _0x4e02f0=a53_0x1b36;return CLI_BIN_NAME+'\x20'+_0x460691['service']+'\x20'+_0x460691[_0x4e02f0(0x1c7)];},'riskPolicy':{'onViolation'(_0xd5690b){const _0xc82fa4=a53_0x1b36;console[_0xc82fa4(0x1d6)](_0xd5690b);},'createError'(_0x4fa0ea){const _0x43386d=a53_0x1b36;return CliErrors[_0x43386d(0x1e0)](_0x4fa0ea);}},async 'prepare'(_0x4d544c,_0xd5364e){const _0x8ef8e=a53_0x1b36,_0xe17d23=resolveAuthMode(_0xd5364e);if(_0x4d544c[_0x8ef8e(0x1dd)]!==![]){if(!_0xd5364e[_0x8ef8e(0x1cb)])throw CliErrors['authRequired'](_0x8ef8e(0x1c8));const {setActiveAK:_0x127942}=await import(_0x8ef8e(0x1c5));_0x127942(_0xd5364e['accessKey']);}let _0x5c37a3='';if(_0x4d544c[_0x8ef8e(0x1d7)]!==![]){_0x5c37a3=_0xd5364e[_0x8ef8e(0x1d8)]??'';if(!_0x5c37a3)throw CliErrors[_0x8ef8e(0x1ca)](_0x8ef8e(0x1db));}if(_0x5c37a3){const {initSdkClient:_0x44595d}=await import('../core/sdk-client.js');_0x44595d({'appCode':_0x5c37a3,'env':_0xd5364e[_0x8ef8e(0x1dc)]??'production','accessKey':_0xd5364e['accessKey'],'authMode':_0xe17d23});}return{'defaults':{'booleans':{'verbose':_0xd5364e[_0x8ef8e(0x1da)]},'numbers':{'pagesize':_0xd5364e[_0x8ef8e(0x1d9)]}},'extras':{'appCode':_0x5c37a3,'cookie':'','apiDomain':_0xd5364e['apiDomain'],'apiDir':'','accessKey':_0xd5364e[_0x8ef8e(0x1cb)],'envName':_0xd5364e[_0x8ef8e(0x1dc)],'mergedCli':_0xd5364e[_0x8ef8e(0x1df)]}};},async 'confirmHighRisk'({def:_0x5cb55c,env:_0x575ef3,flags:_0x87881c,commandLabel:_0x471479}){const _0x1e421a=a53_0x1b36;if(_0x575ef3['isNonInteractive']){const _0xed1feb=reconstructCommandArgv(_0x5cb55c,_0x87881c);throw CliErrors[_0x1e421a(0x1cd)](_0x1e421a(0x1c9)+_0x471479+_0x1e421a(0x1d1)+('\x20\x20To\x20proceed:\x20'+_0xed1feb));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x5cb55c,_0x471479,_0x87881c),'createCancelledError':_0x2bb613=>CliErrors[_0x1e421a(0x1e0)](_0x2bb613)});},'mapDryRunError'(_0x8dee21){return mapUserFacingExecuteError(_0x8dee21);},'mapExecuteError'(_0x4c714f){return mapUserFacingExecuteError(_0x4c714f);},async 'finalize'(){const _0x55c3e8=a53_0x1b36,{clearActiveAK:_0x49d8ee}=await import(_0x55c3e8(0x1c5));_0x49d8ee();}};export async function runCommand(_0x165639,_0x5c0f4a){await runCommandWithAdapter(_0x165639,_0x5c0f4a,runnerAdapter);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ecaab,_0x4f9fd9){const _0x3fb669=a54_0x1aef,_0x581c97=_0x3ecaab();while(!![]){try{const _0x2e20b3=parseInt(_0x3fb669(0x15e))/0x1*(parseInt(_0x3fb669(0x160))/0x2)+-parseInt(_0x3fb669(0x161))/0x3+-parseInt(_0x3fb669(0x158))/0x4+-parseInt(_0x3fb669(0x159))/0x5+-parseInt(_0x3fb669(0x15c))/0x6+-parseInt(_0x3fb669(0x15a))/0x7*(parseInt(_0x3fb669(0x157))/0x8)+-parseInt(_0x3fb669(0x15d))/0x9*(-parseInt(_0x3fb669(0x15b))/0xa);if(_0x2e20b3===_0x4f9fd9)break;else _0x581c97['push'](_0x581c97['shift']());}catch(_0x33b0f4){_0x581c97['push'](_0x581c97['shift']());}}}(a54_0x4f47,0xa05fe));import{buildSchemaPayload as a54_0x5b5ad8}from'@lovrabet/cli-framework';function a54_0x4f47(){const _0xdf734c=['304652SonyrW','1506762FIPLYb','160haODlc','1196804gSUlMy','1132190QfJZxj','141827btTVby','1430zddpNS','1189260HnOYit','76905RWwBTt','7PZLmUn','../commands/registry.js'];a54_0x4f47=function(){return _0xdf734c;};return a54_0x4f47();}function a54_0x1aef(_0x11c6e5,_0x455776){_0x11c6e5=_0x11c6e5-0x157;const _0x4f47d1=a54_0x4f47();let _0x1aef25=_0x4f47d1[_0x11c6e5];return _0x1aef25;}import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x48693e=a54_0x1aef,{serviceRegistry:_0x4e2406,findDefinition:_0x48de6e}=await import(_0x48693e(0x15f));return a54_0x5b5ad8({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x4e2406,'buildAllFlags':buildAllFlags,'findDefinition':_0x48de6e});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a55_0x5132(_0x48f00d,_0x529cbd){_0x48f00d=_0x48f00d-0x73;var _0x44bbbe=a55_0x44bb();var _0x513244=_0x44bbbe[_0x48f00d];return _0x513244;}(function(_0x4eb03b,_0x410fd1){var _0x3efa75=a55_0x5132,_0x43772f=_0x4eb03b();while(!![]){try{var _0x549196=parseInt(_0x3efa75(0x78))/0x1+-parseInt(_0x3efa75(0x73))/0x2+parseInt(_0x3efa75(0x77))/0x3+-parseInt(_0x3efa75(0x75))/0x4+parseInt(_0x3efa75(0x76))/0x5+-parseInt(_0x3efa75(0x79))/0x6+parseInt(_0x3efa75(0x74))/0x7;if(_0x549196===_0x410fd1)break;else _0x43772f['push'](_0x43772f['shift']());}catch(_0x48f332){_0x43772f['push'](_0x43772f['shift']());}}}(a55_0x44bb,0xe3a85));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a55_0x44bb(){var _0x2c4124=['14487774GVJZyM','3962048jdRZHz','7468925seiYJH','4311102JHTJFN','375278aWVsFQ','10645254TqNFpq','3357146cwSoFW'];a55_0x44bb=function(){return _0x2c4124;};return a55_0x44bb();}
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5dfaf7,_0x1d0a15){const _0x1cd52b=a56_0x21c2,_0x418055=_0x5dfaf7();while(!![]){try{const _0x3c4d99=parseInt(_0x1cd52b(0x1df))/0x1*(-parseInt(_0x1cd52b(0x1e1))/0x2)+parseInt(_0x1cd52b(0x1e5))/0x3*(-parseInt(_0x1cd52b(0x1db))/0x4)+-parseInt(_0x1cd52b(0x1e8))/0x5*(-parseInt(_0x1cd52b(0x1e2))/0x6)+-parseInt(_0x1cd52b(0x1dc))/0x7*(parseInt(_0x1cd52b(0x1da))/0x8)+parseInt(_0x1cd52b(0x1e3))/0x9*(-parseInt(_0x1cd52b(0x1e0))/0xa)+-parseInt(_0x1cd52b(0x1e4))/0xb*(parseInt(_0x1cd52b(0x1d7))/0xc)+parseInt(_0x1cd52b(0x1d8))/0xd;if(_0x3c4d99===_0x1d0a15)break;else _0x418055['push'](_0x418055['shift']());}catch(_0x25f976){_0x418055['push'](_0x418055['shift']());}}}(a56_0x1e9e,0x696ef));import{jsx as a56_0x5eb911,jsxs as a56_0x197ddf}from'react/jsx-runtime';import{useEffect}from'react';function a56_0x21c2(_0x49c39d,_0x54f439){_0x49c39d=_0x49c39d-0x1d7;const _0x1e9e2e=a56_0x1e9e();let _0x21c26c=_0x1e9e2e[_0x49c39d];return _0x21c26c;}import{Box,Text,useApp}from'ink';function a56_0x1e9e(){const _0x4f2f09=['95jeiryI','240UvqlPA','23061870LHVkeB','\x20--help','40gQrVdW','364956tPMGII','984403QsJcqx','\x20to\x20view\x20available\x20commands.','green','62429hcGaxB','20xBUTEH','8LvprSL','177942NOQKNt','1815381sWspkm','251955tycwHH','3tHfnmI','\x20\x20Use\x20','column'];a56_0x1e9e=function(){return _0x4f2f09;};return a56_0x1e9e();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x188f09=a56_0x21c2,{exit:_0xc25e75}=useApp();return useEffect(()=>{_0xc25e75();},[_0xc25e75]),a56_0x197ddf(Box,{'flexDirection':_0x188f09(0x1e7),'marginTop':0x1,'marginBottom':0x1,'children':[a56_0x5eb911(Box,{'children':a56_0x5eb911(Text,{'bold':!![],'color':_0x188f09(0x1de),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a56_0x197ddf(Box,{'marginTop':0x1,'children':[a56_0x5eb911(Text,{'dimColor':!![],'children':_0x188f09(0x1e6)}),a56_0x5eb911(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x188f09(0x1d9)}),a56_0x5eb911(Text,{'dimColor':!![],'children':_0x188f09(0x1dd)})]})]});}
|