@lovrabet/lovrabet-cli 2.0.4 → 2.0.5-beta.1
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 +1 -1
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x30af89=a32_0x1ceb;function a32_0x1ceb(_0x4c9d42,_0x45c73d){_0x4c9d42=_0x4c9d42-0xfc;const _0x116a42=a32_0x116a();let _0x1cebdd=_0x116a42[_0x4c9d42];return _0x1cebdd;}(function(_0x44df53,_0x23c437){const _0x4d1c09=a32_0x1ceb,_0x551162=_0x44df53();while(!![]){try{const _0x473cc1=-parseInt(_0x4d1c09(0x105))/0x1*(parseInt(_0x4d1c09(0x101))/0x2)+-parseInt(_0x4d1c09(0x108))/0x3+parseInt(_0x4d1c09(0x107))/0x4+-parseInt(_0x4d1c09(0x103))/0x5+parseInt(_0x4d1c09(0xfe))/0x6+parseInt(_0x4d1c09(0xfd))/0x7+-parseInt(_0x4d1c09(0x106))/0x8*(-parseInt(_0x4d1c09(0xfc))/0x9);if(_0x473cc1===_0x23c437)break;else _0x551162['push'](_0x551162['shift']());}catch(_0xb45eca){_0x551162['push'](_0x551162['shift']());}}}(a32_0x116a,0x9a1d1));export const DEFAULT_APP_PROFILE_NAME='main';function a32_0x116a(){const _0x539b87=['en-US','637030wnbxWy','write','18ECbYsK','25176mBiBjb','1650884YnbfIy','3696159AeADvj','2403EBEQFd','6538455mTZuHo','1191882yTOHue','production','compress','43886vFGOnD'];a32_0x116a=function(){return _0x539b87;};return a32_0x116a();}export const DEFAULT_CONFIG_VALUES={'env':a32_0x30af89(0xff),'format':'compress','locale':a32_0x30af89(0x102),'riskLevel':a32_0x30af89(0x104)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a32_0x30af89(0x100);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x3fd9d9=a33_0x28c3;(function(_0x3cf4bd,_0x355599){const _0x4e32e4=a33_0x28c3,_0x4d85ea=_0x3cf4bd();while(!![]){try{const _0x388274=-parseInt(_0x4e32e4(0x1e0))/0x1*(-parseInt(_0x4e32e4(0x1e3))/0x2)+parseInt(_0x4e32e4(0x1df))/0x3*(-parseInt(_0x4e32e4(0x1ed))/0x4)+parseInt(_0x4e32e4(0x1e5))/0x5+parseInt(_0x4e32e4(0x1eb))/0x6+parseInt(_0x4e32e4(0x1ea))/0x7+-parseInt(_0x4e32e4(0x1e6))/0x8+-parseInt(_0x4e32e4(0x1e1))/0x9*(-parseInt(_0x4e32e4(0x1e7))/0xa);if(_0x388274===_0x355599)break;else _0x4d85ea['push'](_0x4d85ea['shift']());}catch(_0x44911c){_0x4d85ea['push'](_0x4d85ea['shift']());}}}(a33_0x4797,0x735e0));function a33_0x28c3(_0x47b622,_0x473f4){_0x47b622=_0x47b622-0x1de;const _0x4797d9=a33_0x4797();let _0x28c33a=_0x4797d9[_0x47b622];return _0x28c33a;}import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x9f4b5d){const _0x52aeda=a33_0x28c3;customApiDomain=_0x9f4b5d?.[_0x52aeda(0x1de)],customUserDomain=_0x9f4b5d?.[_0x52aeda(0x1ec)],customRuntimeDomain=_0x9f4b5d?.[_0x52aeda(0x1e9)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':'https://user-daily.lovrabet.com');function a33_0x4797(){const _0x20296c=['6aAQASM','https://daily-runtime.lovrabet.com','741875jSoxoD','4077040xHVdmB','98060QIKcdH','https://api.lovrabet.com','runtimeDomain','4831442QugKAZ','3490986OnhNvd','userDomain','100IvivcH','apiDomain','107151UVlDwE','105801JIPELO','126TwbJuT','https://runtime.lovrabet.com'];a33_0x4797=function(){return _0x20296c;};return a33_0x4797();}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a33_0x3fd9d9(0x1e8):'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a33_0x3fd9d9(0x1e2):a33_0x3fd9d9(0x1e4));
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x496659=a34_0x367b;(function(_0x2acfc6,_0x42225b){const _0xdae7bd=a34_0x367b,_0x34619d=_0x2acfc6();while(!![]){try{const _0xd71d7=-parseInt(_0xdae7bd(0xe1))/0x1+parseInt(_0xdae7bd(0xd9))/0x2*(-parseInt(_0xdae7bd(0xdc))/0x3)+-parseInt(_0xdae7bd(0xdb))/0x4*(-parseInt(_0xdae7bd(0xde))/0x5)+parseInt(_0xdae7bd(0xd5))/0x6+-parseInt(_0xdae7bd(0xd4))/0x7*(parseInt(_0xdae7bd(0xd6))/0x8)+parseInt(_0xdae7bd(0xdf))/0x9+-parseInt(_0xdae7bd(0xe0))/0xa*(-parseInt(_0xdae7bd(0xd8))/0xb);if(_0xd71d7===_0x42225b)break;else _0x34619d['push'](_0x34619d['shift']());}catch(_0x4676a6){_0x34619d['push'](_0x34619d['shift']());}}}(a34_0x58bd,0x923f4));export const RUNTIME_ENV_VALUES=[a34_0x496659(0xe2),a34_0x496659(0xd7),'daily'];function a34_0x367b(_0x2031e3,_0x55b8ea){_0x2031e3=_0x2031e3-0xd4;const _0x58bd74=a34_0x58bd();let _0x367b2b=_0x58bd74[_0x2031e3];return _0x367b2b;}export function normalizeEnv(_0x3aa5b0){const _0x26b75e=a34_0x496659;return _0x3aa5b0===_0x26b75e(0xdd)?_0x26b75e(0xe2):_0x3aa5b0;}export function isProduction(_0x230ca5){const _0x3e9c11=a34_0x496659;return normalizeEnv(_0x230ca5)===_0x3e9c11(0xe2);}export function isDaily(_0x34dc73){return normalizeEnv(_0x34dc73)==='daily';}export function isDev(_0x2fc161){const _0x2d3471=a34_0x496659,_0x1ffb34=normalizeEnv(_0x2fc161);return _0x1ffb34===_0x2d3471(0xd7)||_0x1ffb34===_0x2d3471(0xda);}let env=normalizeEnv(process.env.LOVRABET_ENV||a34_0x496659(0xe2));export function getEnv(){return env;}export function initEnv(_0x12f421){env=normalizeEnv(_0x12f421);}function a34_0x58bd(){const _0x34904a=['production','14PaIiLG','381582zybyov','3508168BVjEDP','development','420607DKeeUb','156998rXgubK','dev','4SVxhbC','36pGwuML','online','4852495iqHwnZ','3812040CIVvnc','370exAaBr','454367TWtSgs'];a34_0x58bd=function(){return _0x34904a;};return a34_0x58bd();}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a35_0x2193(_0x29e3cd,_0x1329a3){_0x29e3cd=_0x29e3cd-0x103;const _0x3fca6b=a35_0x3fca();let _0x2193db=_0x3fca6b[_0x29e3cd];return _0x2193db;}const a35_0x88b6a8=a35_0x2193;(function(_0x462126,_0x457003){const _0x4fe2a3=a35_0x2193,_0x2373ae=_0x462126();while(!![]){try{const _0x5a510c=parseInt(_0x4fe2a3(0x10a))/0x1*(-parseInt(_0x4fe2a3(0x103))/0x2)+parseInt(_0x4fe2a3(0x108))/0x3+parseInt(_0x4fe2a3(0x106))/0x4+parseInt(_0x4fe2a3(0x10d))/0x5*(-parseInt(_0x4fe2a3(0x10c))/0x6)+-parseInt(_0x4fe2a3(0x105))/0x7*(parseInt(_0x4fe2a3(0x109))/0x8)+parseInt(_0x4fe2a3(0x107))/0x9+parseInt(_0x4fe2a3(0x10e))/0xa*(parseInt(_0x4fe2a3(0x104))/0xb);if(_0x5a510c===_0x457003)break;else _0x2373ae['push'](_0x2373ae['shift']());}catch(_0x186d71){_0x2373ae['push'](_0x2373ae['shift']());}}}(a35_0x3fca,0x920ec));function a35_0x3fca(){const _0x2f1810=['102XxeoCW','2190562CRFpXi','4295767IxhdwO','3610896GFSQGW','4022910IBxPwu','3216711iTjWge','8bbPIaU','8723AgMSHK','compress','2094LRzEdv','13815VoJPpw','10ZgOdoP','pretty'];a35_0x3fca=function(){return _0x2f1810;};return a35_0x3fca();}export const OUTPUT_FORMAT_VALUES=['json',a35_0x88b6a8(0x10f),a35_0x88b6a8(0x10b)];
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x18a81a=a36_0x471a;function a36_0x691c(){const _0x16ff97=['read','write','199545CYnFQT','21fsfERQ','40FKvSOE','320348bByBMc','828105wymHQu','297678zFWOvQ','high-risk-write','286632rKAfXN','116252ktmoJN','1216143aKlaQI'];a36_0x691c=function(){return _0x16ff97;};return a36_0x691c();}function a36_0x471a(_0x378c35,_0x3b9a5d){_0x378c35=_0x378c35-0x93;const _0x691c55=a36_0x691c();let _0x471ad6=_0x691c55[_0x378c35];return _0x471ad6;}(function(_0x32b0fc,_0x271601){const _0x560d5b=a36_0x471a,_0x4d2198=_0x32b0fc();while(!![]){try{const _0x1e4d83=parseInt(_0x560d5b(0x99))/0x1+parseInt(_0x560d5b(0x9c))/0x2+parseInt(_0x560d5b(0x9d))/0x3+-parseInt(_0x560d5b(0x95))/0x4*(parseInt(_0x560d5b(0x9b))/0x5)+-parseInt(_0x560d5b(0x9e))/0x6*(parseInt(_0x560d5b(0x9a))/0x7)+parseInt(_0x560d5b(0x94))/0x8+-parseInt(_0x560d5b(0x96))/0x9;if(_0x1e4d83===_0x271601)break;else _0x4d2198['push'](_0x4d2198['shift']());}catch(_0x117625){_0x4d2198['push'](_0x4d2198['shift']());}}}(a36_0x691c,0x25de9));export const RISK_LEVEL_VALUES=[a36_0x18a81a(0x97),a36_0x18a81a(0x98),a36_0x18a81a(0x93)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a37_0x54c2(){const _0x4b6a39=['245006jfSLFV','232290KQJvOH','136leJocN','https://user.lovrabet.com/user/ak','24451ZxvTjM','29847RtFJwU','1UYKSzO','714YDIkmC','9734168lNixUG','7699630hiAaZN','37678223cmScfF','350NXACuO'];a37_0x54c2=function(){return _0x4b6a39;};return a37_0x54c2();}const a37_0x1b4ae2=a37_0x2635;function a37_0x2635(_0x41f100,_0x5008d4){_0x41f100=_0x41f100-0xae;const _0x54c29c=a37_0x54c2();let _0x263549=_0x54c29c[_0x41f100];return _0x263549;}(function(_0x135b9e,_0x229afe){const _0x3fe235=a37_0x2635,_0xb0a150=_0x135b9e();while(!![]){try{const _0x26d8b0=-parseInt(_0x3fe235(0xaf))/0x1*(parseInt(_0x3fe235(0xb5))/0x2)+parseInt(_0x3fe235(0xae))/0x3*(parseInt(_0x3fe235(0xb7))/0x4)+parseInt(_0x3fe235(0xb2))/0x5+-parseInt(_0x3fe235(0xb0))/0x6*(-parseInt(_0x3fe235(0xb9))/0x7)+parseInt(_0x3fe235(0xb1))/0x8+parseInt(_0x3fe235(0xb6))/0x9*(parseInt(_0x3fe235(0xb4))/0xa)+-parseInt(_0x3fe235(0xb3))/0xb;if(_0x26d8b0===_0x229afe)break;else _0xb0a150['push'](_0xb0a150['shift']());}catch(_0x126959){_0xb0a150['push'](_0xb0a150['shift']());}}}(a37_0x54c2,0xd3788));export const USER_ACCESS_KEY_CREATE_URL=a37_0x1b4ae2(0xb8);
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a38_0x1493aa=a38_0x183c;(function(_0x5a12a6,_0x252546){const _0x243fa7=a38_0x183c,_0x6f3305=_0x5a12a6();while(!![]){try{const _0xf4ae47=-parseInt(_0x243fa7(0xa1))/0x1+parseInt(_0x243fa7(0xca))/0x2+-parseInt(_0x243fa7(0xc9))/0x3*(-parseInt(_0x243fa7(0xe3))/0x4)+parseInt(_0x243fa7(0xcd))/0x5+-parseInt(_0x243fa7(0xcc))/0x6+parseInt(_0x243fa7(0xdd))/0x7+parseInt(_0x243fa7(0xa3))/0x8*(-parseInt(_0x243fa7(0xae))/0x9);if(_0xf4ae47===_0x252546)break;else _0x6f3305['push'](_0x6f3305['shift']());}catch(_0x3ceadc){_0x6f3305['push'](_0x6f3305['shift']());}}}(a38_0x2f45,0x8ed95));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';function a38_0x183c(_0x53bd85,_0x1b63b5){_0x53bd85=_0x53bd85-0x9e;const _0x2f4583=a38_0x2f45();let _0x183c50=_0x2f4583[_0x53bd85];return _0x183c50;}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_0x1493aa(0xde),a38_0x1493aa(0xa2)];export const NEW_CONFIG_NAME=a38_0x1493aa(0xde);function resolveConfigPath(_0x534f1d){for(const _0xf200b7 of CONFIG_NAMES){const _0x7ef27b=resolve(_0x534f1d,_0xf200b7);if(existsSync(_0x7ef27b))return _0x7ef27b;}return undefined;}export function resolveWriteConfigPath(_0xd03003){const _0xcfc2f0=a38_0x1493aa,_0x36c88e=_0xd03003===_0xcfc2f0(0xaf)?process[_0xcfc2f0(0xd3)]():homedir(),_0x4d70b4=resolveConfigPath(_0x36c88e);return _0x4d70b4??resolve(_0x36c88e,NEW_CONFIG_NAME);}export function readConfigFile(_0x543a8a){const _0x52c864=a38_0x1493aa;try{if(existsSync(_0x543a8a)){const _0x337069=readFileSync(_0x543a8a,{'encoding':_0x52c864(0xb9)});if(_0x337069){const _0x53d47f=JSON[_0x52c864(0xc8)](_0x337069);return migrateOnlineEnv(_0x543a8a,_0x53d47f),_0x53d47f;}}}catch{}return{};}function migrateOnlineEnv(_0x103255,_0x1761a9){const _0x347a16=a38_0x1493aa;let _0xa46c93=![];_0x1761a9[_0x347a16(0xc2)]===_0x347a16(0xa6)&&(_0x1761a9[_0x347a16(0xc2)]=_0x347a16(0xa5),_0xa46c93=!![]);if(_0x1761a9[_0x347a16(0xbc)]&&typeof _0x1761a9[_0x347a16(0xbc)]===_0x347a16(0xd7))for(const _0x544e6e of Object[_0x347a16(0xc3)](_0x1761a9['apps'])){_0x544e6e&&_0x544e6e[_0x347a16(0xc2)]===_0x347a16(0xa6)&&(_0x544e6e[_0x347a16(0xc2)]='production',_0xa46c93=!![]);}if(_0xa46c93)try{writeConfigFile(_0x103255,_0x1761a9);}catch{}}export function writeConfigFile(_0x5b4416,_0x23e4d9){const _0x5ab8c4=a38_0x1493aa,_0x1e5377=dirname(_0x5b4416);!existsSync(_0x1e5377)&&mkdirSync(_0x1e5377,{'recursive':!![]});const _0x334893=_0x5b4416+_0x5ab8c4(0xc7);try{writeFileSync(_0x334893,JSON[_0x5ab8c4(0xb4)](_0x23e4d9,null,0x2)+'\x0a',{'encoding':_0x5ab8c4(0xb9),'mode':0x180});try{renameSync(_0x334893,_0x5b4416);}catch(_0x3e2b1d){if(_0x3e2b1d[_0x5ab8c4(0x9e)]===_0x5ab8c4(0xcf)||_0x3e2b1d['code']===_0x5ab8c4(0xe1)||_0x3e2b1d[_0x5ab8c4(0x9e)]==='EACCES'){writeFileSync(_0x5b4416,JSON[_0x5ab8c4(0xb4)](_0x23e4d9,null,0x2)+'\x0a',{'encoding':_0x5ab8c4(0xb9)});try{unlinkSync(_0x334893);}catch{}}else throw _0x3e2b1d;}}catch(_0x37e087){try{unlinkSync(_0x334893);}catch{}throw _0x37e087;}}export function isNonInteractiveMode(_0x13db65){const _0x2dbf3d=a38_0x1493aa;return!!(_0x13db65[_0x2dbf3d(0xa4)]||_0x13db65['ci']||process.env.LOVRABET_CI===_0x2dbf3d(0xad)||process.env.RABETBASE_CI===_0x2dbf3d(0xad)||process.env.LOVRABET_CI===_0x2dbf3d(0xad)||process.env.CI===_0x2dbf3d(0xad)||!process['stdout']['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x25418f=a38_0x1493aa;if(!process[_0x25418f(0xab)][_0x25418f(0xa9)])return![];try{const _0x2d0425=process[_0x25418f(0xab)][_0x25418f(0xba)];return process[_0x25418f(0xab)][_0x25418f(0xd8)](!![]),process[_0x25418f(0xab)][_0x25418f(0xd8)](_0x2d0425??![]),!![];}catch{return![];}}export async function createContext(_0x59a833){const _0x46d4e3=a38_0x1493aa,_0x4287ff=readRawConfig(),_0x5acead=buildConfig(_0x4287ff,_0x59a833);await initGlobalEnvironment(_0x5acead);const {getUserDomain:_0x263487,getApiDomain:_0x4ee320}=await import(_0x46d4e3(0xa0)),_0x3b2312={'apiDomain':_0x4ee320(),'userDomain':_0x263487()},_0x1ded45=await buildAuth(_0x5acead);logger['setLogPath'](process[_0x46d4e3(0xd3)]());const _0x13916c=(CLI_BIN_NAME+'\x20'+process[_0x46d4e3(0xc0)][_0x46d4e3(0xd2)](0x2)[_0x46d4e3(0xaa)]('\x20'))[_0x46d4e3(0xc1)]();logger[_0x46d4e3(0xb1)](_0x13916c);const _0x21094c=isNonInteractiveMode(_0x59a833);return{'config':_0x5acead,'auth':_0x1ded45,'logger':logger,'env':_0x3b2312,'nonInteractive':_0x21094c};}export function buildConfigFromFlags(_0x367332){return buildConfig(readRawConfig(),_0x367332);}export function readAppCodeFromConfig(){const _0x5b897f=a38_0x1493aa,_0x13b915=readRawConfig(),_0x2486a3=_0x13b915['appcode']??_0x13b915[_0x5b897f(0xc6)];if(typeof _0x2486a3===_0x5b897f(0xd1)&&_0x2486a3[_0x5b897f(0xc1)]())return _0x2486a3[_0x5b897f(0xc1)]();const _0x43d9e2=_0x13b915[_0x5b897f(0xbc)]&&typeof _0x13b915['apps']===_0x5b897f(0xd7)?_0x13b915[_0x5b897f(0xbc)]:{},_0xb4d5ff=_0x13b915['defaultApp']?_0x43d9e2[_0x13b915['defaultApp']]:undefined;if(_0xb4d5ff?.[_0x5b897f(0xd6)])return String(_0xb4d5ff[_0x5b897f(0xd6)])['trim']();const _0x28d583=normalizeEnv(String(_0x13b915[_0x5b897f(0xc2)]||'production')),_0x52de96=isDaily(_0x28d583)?_0x5b897f(0x9f):isDev(_0x28d583)?_0x5b897f(0xb2):_0x5b897f(0xa5),_0x1b68a3=resolveCachedAppCode(typeof _0x13b915[_0x5b897f(0xbb)]==='string'?_0x13b915[_0x5b897f(0xbb)]:undefined,_0x52de96,typeof _0x13b915[_0x5b897f(0xb6)]==='string'?_0x13b915['accessKey']:undefined);if(_0x1b68a3)return _0x1b68a3;const _0x560b1e=Object[_0x5b897f(0xc3)](_0x43d9e2)[_0x5b897f(0xdc)](_0x2b8b04=>_0x2b8b04?.[_0x5b897f(0xd6)]);return _0x560b1e?.[_0x5b897f(0xd6)]?String(_0x560b1e[_0x5b897f(0xd6)])[_0x5b897f(0xc1)]():undefined;}export function readScopedConfig(_0xb92de0){const _0x5155c5=a38_0x1493aa,_0x239beb=_0xb92de0[_0x5155c5(0xd0)]?_0x5155c5(0xd0):_0x5155c5(0xaf);return readConfigFile(resolveWriteConfigPath(_0x239beb));}export function writeScopedConfig(_0x433e4e,_0x3f2263){const _0x2cb34b=a38_0x1493aa,_0xa0f078=_0x3f2263[_0x2cb34b(0xd0)]?_0x2cb34b(0xd0):_0x2cb34b(0xaf);writeConfigFile(resolveWriteConfigPath(_0xa0f078),_0x433e4e);}export async function initGlobalEnvironment(_0x33b58b){const _0x449c0c=a38_0x1493aa,{initEnv:_0x12d5e7}=await import(_0x449c0c(0xe0));_0x12d5e7(_0x33b58b[_0x449c0c(0xc2)]);const {initDomains:_0x1c7be9}=await import(_0x449c0c(0xa0));_0x1c7be9({'apiDomain':_0x33b58b['raw'][_0x449c0c(0xa7)]||_0x33b58b[_0x449c0c(0xa8)][_0x449c0c(0xd4)]||undefined,'userDomain':_0x33b58b[_0x449c0c(0xa8)][_0x449c0c(0xdb)]||undefined,'runtimeDomain':_0x33b58b['raw'][_0x449c0c(0xc4)]||undefined});}export function getProjectConfigPath(){const _0x4359b6=a38_0x1493aa;return resolveConfigPath(process[_0x4359b6(0xd3)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x4e2541){const _0x4885de=a38_0x1493aa;if(!existsSync(_0x4e2541))return{'status':_0x4885de(0xb5)};try{const _0xf436f3=readFileSync(_0x4e2541,{'encoding':_0x4885de(0xb9)});if(!_0xf436f3?.[_0x4885de(0xc1)]())return{'status':_0x4885de(0xd5)};const _0x723d8=JSON[_0x4885de(0xc8)](_0xf436f3);return{'status':'ok','data':_0x723d8};}catch(_0x15b4ad){return{'status':'error','message':_0x15b4ad instanceof Error?_0x15b4ad[_0x4885de(0xda)]:String(_0x15b4ad)};}}export function loadRawConfigLayers(_0x37c89a){const _0x388592=a38_0x1493aa;let _0x482e0b={},_0x20d160={},_0x4a7d6e,_0x2fbc03;try{_0x4a7d6e=resolveConfigPath(homedir());if(_0x4a7d6e){const _0x402931=readFileSync(_0x4a7d6e,{'encoding':_0x388592(0xb9)});if(_0x402931)_0x482e0b=JSON[_0x388592(0xc8)](_0x402931);}}catch{}try{const _0x1785fa=_0x37c89a||process[_0x388592(0xd3)]();_0x2fbc03=resolveConfigPath(_0x1785fa);if(_0x2fbc03){const _0x4583e7=readFileSync(_0x2fbc03,{'encoding':_0x388592(0xb9)});if(_0x4583e7)_0x20d160=JSON['parse'](_0x4583e7);}}catch{}return{'globalPath':_0x4a7d6e,'projectPath':_0x2fbc03,'globalConfig':_0x482e0b,'projectConfig':_0x20d160};}function mergeRawConfigLayers(_0x29b740){const _0x48b2d6=a38_0x1493aa,{globalConfig:_0x1c4595,projectConfig:_0x4578a1}=_0x29b740;if(_0x4578a1[_0x48b2d6(0xd9)]===![]){const _0x2811ac={..._0x4578a1};return delete _0x2811ac['inherit'],_0x2811ac;}const _0x1318cf={..._0x1c4595,..._0x4578a1};if(_0x48b2d6(0xbb)in _0x4578a1)_0x1318cf[_0x48b2d6(0xbb)]=_0x4578a1[_0x48b2d6(0xbb)];else _0x1c4595[_0x48b2d6(0xbb)]&&(_0x1318cf[_0x48b2d6(0xbb)]=_0x1c4595[_0x48b2d6(0xbb)]);return _0x1318cf;}function a38_0x2f45(){const _0x519f2c=['authRequired','./constant/env.js','EXDEV','globalConfig','8TfRgKc','code','daily','./constant/domain.js','309277dhaamW','.lovrabetrc','6906512trYaLa','nonInteractive','production','online','apiDomain','raw','isTTY','join','stdin','riskLevel','true','18YYVLxN','project','maxRisk','setRawCommand','development','high-risk-write','stringify','missing','accessKey','format','APPCODE','utf8','isRaw','defaultApp','apps','locale','projectConfig','write','argv','trim','env','values','runtimeDomain','ACCESS_KEY','app','.tmp','parse','294339pOKkuu','2123502ujMtXS','VERBOSE','624006JGlOhv','2435830kjBfSB','ENV','EPERM','global','string','slice','cwd','host','empty','appcode','object','setRawMode','inherit','message','userDomain','find','6859104GsTbvt','.lovrabet.json'];a38_0x2f45=function(){return _0x519f2c;};return a38_0x2f45();}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x269b30){return mergeRawConfigLayers(loadRawConfigLayers(_0x269b30));}export function readRawConfigWithLayers(_0x39b9fb){const _0x41ebd9=loadRawConfigLayers(_0x39b9fb);return{'config':mergeRawConfigLayers(_0x41ebd9),'layers':_0x41ebd9};}export function resolveDefaultAppSource(_0x230b7a){const _0x49c999=a38_0x1493aa;if(_0x49c999(0xbb)in _0x230b7a[_0x49c999(0xbe)])return _0x49c999(0xaf);if(_0x230b7a[_0x49c999(0xbe)][_0x49c999(0xd9)]===![])return null;if(_0x230b7a[_0x49c999(0xe2)][_0x49c999(0xbb)])return'global';return null;}function buildConfig(_0x1f7aaa,_0x57e2a2){const _0x49eec3=a38_0x1493aa,_0x371c17=_0x1f7aaa[_0x49eec3(0xbb)]||undefined,_0x4be116=_0x57e2a2[_0x49eec3(0xc6)]||env('APP')||undefined,_0x38f912=_0x4be116||_0x371c17||undefined,_0x17a690=env(_0x49eec3(0xc5))||_0x1f7aaa[_0x49eec3(0xb6)]||undefined,_0x56efbf=_0x57e2a2['env']||env(_0x49eec3(0xce))||_0x1f7aaa['env']||DEFAULT_CONFIG_VALUES[_0x49eec3(0xc2)],_0x5a32b1=normalizeEnv(String(_0x56efbf)),_0x392c66=isDaily(_0x5a32b1)?_0x49eec3(0x9f):isDev(_0x5a32b1)?_0x49eec3(0xb2):'production',_0x21e3a5=resolveCachedAppCode(_0x38f912,_0x392c66,_0x17a690),_0x2f046c=_0x57e2a2[_0x49eec3(0xd6)]||env(_0x49eec3(0xb8))||_0x21e3a5||_0x1f7aaa[_0x49eec3(0xd6)]||_0x1f7aaa[_0x49eec3(0xc6)]||undefined,_0x450133=_0x1f7aaa['locale']||DEFAULT_CONFIG_VALUES[_0x49eec3(0xbd)],_0x4b7411=undefined,_0x2030d1=_0x57e2a2[_0x49eec3(0xb7)]||env('FORMAT')||_0x1f7aaa[_0x49eec3(0xb7)],_0x58ad03=normalizeLegacyOutputFormat(_0x2030d1),_0x563758=env('PAGE_SIZE')||_0x1f7aaa['pageSize'],_0x4f4352=_0x563758?Number(_0x563758)||undefined:undefined,_0x39d761=_0x1f7aaa[_0x49eec3(0xac)]||_0x1f7aaa[_0x49eec3(0xb0)],_0x1f409a=_0x39d761==='read'||_0x39d761===_0x49eec3(0xbf)||_0x39d761===_0x49eec3(0xb3)?_0x39d761:DEFAULT_CONFIG_VALUES['riskLevel'],_0x8b55d6=env(_0x49eec3(0xcb)),_0x410daf=_0x8b55d6==='1'||_0x8b55d6===_0x49eec3(0xad);return{'appCode':typeof _0x2f046c===_0x49eec3(0xd1)&&_0x2f046c[_0x49eec3(0xc1)]()?_0x2f046c[_0x49eec3(0xc1)]():undefined,'env':_0x392c66,'locale':_0x450133,'cookie':_0x4b7411,'accessKey':_0x17a690,'format':_0x58ad03,'pageSize':_0x4f4352,'riskLevel':_0x1f409a,'verbose':_0x410daf,'defaultApp':_0x371c17,'currentApp':typeof _0x38f912===_0x49eec3(0xd1)?_0x38f912:undefined,'raw':_0x1f7aaa};}function env(_0xa1fa1c){return process.env[`LOVRABET_${_0xa1fa1c}`]||undefined;}async function buildAuth(_0xc191ea){const _0x113b11=a38_0x1493aa,_0x64e54e='',_0x27e594=!!_0xc191ea[_0x113b11(0xb6)];return{'cookie':_0x64e54e,'isLoggedIn':_0x27e594,async 'getOrLogin'(){const _0x2ddaf3=_0x113b11;if(_0x27e594)return _0x64e54e;throw CliErrors[_0x2ddaf3(0xdf)]();}};}
|
|
1
|
+
const a38_0x1ac0c6=a38_0x3b57;(function(_0x357ee0,_0x5b700c){const _0x2f5c27=a38_0x3b57,_0x3ca20a=_0x357ee0();while(!![]){try{const _0x142e29=parseInt(_0x2f5c27(0x96))/0x1*(parseInt(_0x2f5c27(0xb6))/0x2)+parseInt(_0x2f5c27(0x93))/0x3*(parseInt(_0x2f5c27(0x9a))/0x4)+parseInt(_0x2f5c27(0xb2))/0x5*(-parseInt(_0x2f5c27(0xb9))/0x6)+-parseInt(_0x2f5c27(0xc1))/0x7*(-parseInt(_0x2f5c27(0xaa))/0x8)+-parseInt(_0x2f5c27(0xa7))/0x9+parseInt(_0x2f5c27(0x9e))/0xa*(-parseInt(_0x2f5c27(0xcf))/0xb)+-parseInt(_0x2f5c27(0x88))/0xc*(-parseInt(_0x2f5c27(0xa6))/0xd);if(_0x142e29===_0x5b700c)break;else _0x3ca20a['push'](_0x3ca20a['shift']());}catch(_0x4e6544){_0x3ca20a['push'](_0x3ca20a['shift']());}}}(a38_0x4197,0xa6f55));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a38_0x3b57(_0x4eb6a8,_0x2cdce5){_0x4eb6a8=_0x4eb6a8-0x86;const _0x419708=a38_0x4197();let _0x3b57b7=_0x419708[_0x4eb6a8];return _0x3b57b7;}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';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=['.lovrabet.json','.lovrabetrc'];export const NEW_CONFIG_NAME=a38_0x1ac0c6(0xc8);function a38_0x4197(){const _0x158f9d=['ENV','slice','5060765WMBaCS','stringify','missing','accessKey','2009662ERVBRI','runtimeDomain','production','6iwLRXG','format','defaultApp','isTTY','appcode','./constant/env.js','cwd','project','189VywpJH','stdin','pageSize','locale','trim','apiDomain','true','.lovrabet.json','raw','write','inherit','message','EACCES','./constant/domain.js','2657831mfcokf','online','env','string','12porykN','projectConfig','global','ACCESS_KEY','isRaw','join','setRawMode','host','APPCODE','setRawCommand','read','636621bVUGhf','argv','utf8','1poDNMS','code','FORMAT','apps','4klOSZD','daily','find','development','20pVLeEU','values','userDomain','APP','parse','setLogPath','riskLevel','stdout','16116412igYXYO','9617697oEMGec','object','EXDEV','234408cMIHsd','EPERM','maxRisk','app','error','PAGE_SIZE'];a38_0x4197=function(){return _0x158f9d;};return a38_0x4197();}function resolveConfigPath(_0x59984b){for(const _0x495164 of CONFIG_NAMES){const _0x26cd58=resolve(_0x59984b,_0x495164);if(existsSync(_0x26cd58))return _0x26cd58;}return undefined;}export function resolveWriteConfigPath(_0x38072c){const _0x265f42=a38_0x1ac0c6,_0x3dc004=_0x38072c===_0x265f42(0xc0)?process[_0x265f42(0xbf)]():homedir(),_0x37bd16=resolveConfigPath(_0x3dc004);return _0x37bd16??resolve(_0x3dc004,NEW_CONFIG_NAME);}export function readConfigFile(_0x5070a2){const _0x30db52=a38_0x1ac0c6;try{if(existsSync(_0x5070a2)){const _0x4160f0=readFileSync(_0x5070a2,{'encoding':_0x30db52(0x95)});if(_0x4160f0){const _0x96710c=JSON[_0x30db52(0xa2)](_0x4160f0);return migrateOnlineEnv(_0x5070a2,_0x96710c),_0x96710c;}}}catch{}return{};}function migrateOnlineEnv(_0x30d1fd,_0x624a85){const _0xf60144=a38_0x1ac0c6;let _0x159d25=![];_0x624a85[_0xf60144(0x86)]===_0xf60144(0xd0)&&(_0x624a85[_0xf60144(0x86)]='production',_0x159d25=!![]);if(_0x624a85[_0xf60144(0x99)]&&typeof _0x624a85[_0xf60144(0x99)]===_0xf60144(0xa8))for(const _0xb3226c of Object[_0xf60144(0x9f)](_0x624a85[_0xf60144(0x99)])){_0xb3226c&&_0xb3226c['env']===_0xf60144(0xd0)&&(_0xb3226c[_0xf60144(0x86)]=_0xf60144(0xb8),_0x159d25=!![]);}if(_0x159d25)try{writeConfigFile(_0x30d1fd,_0x624a85);}catch{}}export function writeConfigFile(_0x118142,_0x2a4be8){const _0x5dbefb=a38_0x1ac0c6,_0xca5d09=dirname(_0x118142);!existsSync(_0xca5d09)&&mkdirSync(_0xca5d09,{'recursive':!![]});const _0x39f1f8=_0x118142+'.tmp';try{writeFileSync(_0x39f1f8,JSON[_0x5dbefb(0xb3)](_0x2a4be8,null,0x2)+'\x0a',{'encoding':_0x5dbefb(0x95),'mode':0x180});try{renameSync(_0x39f1f8,_0x118142);}catch(_0x31b15d){if(_0x31b15d[_0x5dbefb(0x97)]===_0x5dbefb(0xab)||_0x31b15d[_0x5dbefb(0x97)]===_0x5dbefb(0xa9)||_0x31b15d['code']===_0x5dbefb(0xcd)){writeFileSync(_0x118142,JSON[_0x5dbefb(0xb3)](_0x2a4be8,null,0x2)+'\x0a',{'encoding':_0x5dbefb(0x95)});try{unlinkSync(_0x39f1f8);}catch{}}else throw _0x31b15d;}}catch(_0x4674c3){try{unlinkSync(_0x39f1f8);}catch{}throw _0x4674c3;}}export function isNonInteractiveMode(_0x51abb2){const _0x2993b0=a38_0x1ac0c6;return!!(_0x51abb2['nonInteractive']||_0x51abb2['ci']||process.env.LOVRABET_CI===_0x2993b0(0xc7)||process.env.RABETBASE_CI===_0x2993b0(0xc7)||process.env.LOVRABET_CI===_0x2993b0(0xc7)||process.env.CI===_0x2993b0(0xc7)||!process[_0x2993b0(0xa5)][_0x2993b0(0xbc)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x590de9=a38_0x1ac0c6;if(!process[_0x590de9(0xc2)]['isTTY'])return![];try{const _0x44d62c=process[_0x590de9(0xc2)][_0x590de9(0x8c)];return process[_0x590de9(0xc2)][_0x590de9(0x8e)](!![]),process[_0x590de9(0xc2)][_0x590de9(0x8e)](_0x44d62c??![]),!![];}catch{return![];}}export async function createContext(_0x5d2cdb){const _0xde3aa=a38_0x1ac0c6,_0x57dee2=readRawConfig(),_0x663ccd=buildConfig(_0x57dee2,_0x5d2cdb);await initGlobalEnvironment(_0x663ccd);const {getUserDomain:_0x3a15f1,getApiDomain:_0x433282}=await import(_0xde3aa(0xce)),_0x1618e6={'apiDomain':_0x433282(),'userDomain':_0x3a15f1()},_0x59bd59=await buildAuth(_0x663ccd);logger[_0xde3aa(0xa3)](process[_0xde3aa(0xbf)]());const _0x2e33e9=(CLI_BIN_NAME+'\x20'+process[_0xde3aa(0x94)][_0xde3aa(0xb1)](0x2)[_0xde3aa(0x8d)]('\x20'))[_0xde3aa(0xc5)]();logger[_0xde3aa(0x91)](_0x2e33e9);const _0x302111=isNonInteractiveMode(_0x5d2cdb);return{'config':_0x663ccd,'auth':_0x59bd59,'logger':logger,'env':_0x1618e6,'nonInteractive':_0x302111};}export function buildConfigFromFlags(_0x4d7019){return buildConfig(readRawConfig(),_0x4d7019);}export function readAppCodeFromConfig(){const _0x375585=a38_0x1ac0c6,_0x1bc5cf=readRawConfig(),_0x32f04d=_0x1bc5cf[_0x375585(0xbd)]??_0x1bc5cf[_0x375585(0xad)];if(typeof _0x32f04d===_0x375585(0x87)&&_0x32f04d[_0x375585(0xc5)]())return _0x32f04d[_0x375585(0xc5)]();const _0x4cc54d=_0x1bc5cf['apps']&&typeof _0x1bc5cf[_0x375585(0x99)]===_0x375585(0xa8)?_0x1bc5cf[_0x375585(0x99)]:{},_0xc3d7e5=_0x1bc5cf[_0x375585(0xbb)]?_0x4cc54d[_0x1bc5cf[_0x375585(0xbb)]]:undefined;if(_0xc3d7e5?.['appcode'])return String(_0xc3d7e5[_0x375585(0xbd)])[_0x375585(0xc5)]();const _0x20d128=normalizeEnv(String(_0x1bc5cf[_0x375585(0x86)]||'production')),_0x1da05b=isDaily(_0x20d128)?_0x375585(0x9b):isDev(_0x20d128)?_0x375585(0x9d):'production',_0x1e3e54=resolveCachedAppCode(typeof _0x1bc5cf['defaultApp']===_0x375585(0x87)?_0x1bc5cf[_0x375585(0xbb)]:undefined,_0x1da05b,typeof _0x1bc5cf['accessKey']===_0x375585(0x87)?_0x1bc5cf[_0x375585(0xb5)]:undefined);if(_0x1e3e54)return _0x1e3e54;const _0x2207fa=Object['values'](_0x4cc54d)[_0x375585(0x9c)](_0x5633c6=>_0x5633c6?.[_0x375585(0xbd)]);return _0x2207fa?.[_0x375585(0xbd)]?String(_0x2207fa[_0x375585(0xbd)])['trim']():undefined;}export function readScopedConfig(_0x13547c){const _0x31d695=a38_0x1ac0c6,_0x5d46e7=_0x13547c[_0x31d695(0x8a)]?_0x31d695(0x8a):_0x31d695(0xc0);return readConfigFile(resolveWriteConfigPath(_0x5d46e7));}export function writeScopedConfig(_0x1bc94f,_0xf90c37){const _0x5d700a=a38_0x1ac0c6,_0x1770d5=_0xf90c37['global']?_0x5d700a(0x8a):_0x5d700a(0xc0);writeConfigFile(resolveWriteConfigPath(_0x1770d5),_0x1bc94f);}export async function initGlobalEnvironment(_0x3633b5){const _0x2e8fc1=a38_0x1ac0c6,{initEnv:_0x460b65}=await import(_0x2e8fc1(0xbe));_0x460b65(_0x3633b5['env']);const {initDomains:_0x545a98}=await import(_0x2e8fc1(0xce));_0x545a98({'apiDomain':_0x3633b5[_0x2e8fc1(0xc9)][_0x2e8fc1(0xc6)]||_0x3633b5[_0x2e8fc1(0xc9)][_0x2e8fc1(0x8f)]||undefined,'userDomain':_0x3633b5[_0x2e8fc1(0xc9)][_0x2e8fc1(0xa0)]||undefined,'runtimeDomain':_0x3633b5[_0x2e8fc1(0xc9)][_0x2e8fc1(0xb7)]||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x4a2aaf){const _0x4bc5a9=a38_0x1ac0c6;if(!existsSync(_0x4a2aaf))return{'status':_0x4bc5a9(0xb4)};try{const _0x319966=readFileSync(_0x4a2aaf,{'encoding':_0x4bc5a9(0x95)});if(!_0x319966?.[_0x4bc5a9(0xc5)]())return{'status':'empty'};const _0x476c0c=JSON[_0x4bc5a9(0xa2)](_0x319966);return{'status':'ok','data':_0x476c0c};}catch(_0x8e5f1f){return{'status':_0x4bc5a9(0xae),'message':_0x8e5f1f instanceof Error?_0x8e5f1f[_0x4bc5a9(0xcc)]:String(_0x8e5f1f)};}}export function loadRawConfigLayers(_0x36498e){const _0x1edc89=a38_0x1ac0c6;let _0x89d41f={},_0x466941={},_0x13c019,_0x5d7dbe;try{_0x13c019=resolveConfigPath(homedir());if(_0x13c019){const _0x1a9df1=readFileSync(_0x13c019,{'encoding':'utf8'});if(_0x1a9df1)_0x89d41f=JSON[_0x1edc89(0xa2)](_0x1a9df1);}}catch{}try{const _0x3798b5=_0x36498e||process[_0x1edc89(0xbf)]();_0x5d7dbe=resolveConfigPath(_0x3798b5);if(_0x5d7dbe){const _0x304151=readFileSync(_0x5d7dbe,{'encoding':_0x1edc89(0x95)});if(_0x304151)_0x466941=JSON[_0x1edc89(0xa2)](_0x304151);}}catch{}return{'globalPath':_0x13c019,'projectPath':_0x5d7dbe,'globalConfig':_0x89d41f,'projectConfig':_0x466941};}function mergeRawConfigLayers(_0x3c21aa){const _0x1b3bcc=a38_0x1ac0c6,{globalConfig:_0x1a1c5e,projectConfig:_0x2be407}=_0x3c21aa;if(_0x2be407[_0x1b3bcc(0xcb)]===![]){const _0x281f80={..._0x2be407};return delete _0x281f80['inherit'],_0x281f80;}const _0x39ffe3={..._0x1a1c5e,..._0x2be407};if(_0x1b3bcc(0xbb)in _0x2be407)_0x39ffe3[_0x1b3bcc(0xbb)]=_0x2be407[_0x1b3bcc(0xbb)];else _0x1a1c5e[_0x1b3bcc(0xbb)]&&(_0x39ffe3['defaultApp']=_0x1a1c5e['defaultApp']);return _0x39ffe3;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x44abca){return mergeRawConfigLayers(loadRawConfigLayers(_0x44abca));}export function readRawConfigWithLayers(_0x50cd59){const _0x10b4ef=loadRawConfigLayers(_0x50cd59);return{'config':mergeRawConfigLayers(_0x10b4ef),'layers':_0x10b4ef};}export function resolveDefaultAppSource(_0x2357fc){const _0x52cf0a=a38_0x1ac0c6;if('defaultApp'in _0x2357fc['projectConfig'])return _0x52cf0a(0xc0);if(_0x2357fc[_0x52cf0a(0x89)]['inherit']===![])return null;if(_0x2357fc['globalConfig']['defaultApp'])return _0x52cf0a(0x8a);return null;}function buildConfig(_0x5a24fb,_0x476e8f){const _0x4cbcb9=a38_0x1ac0c6,_0x14dcb8=_0x5a24fb['defaultApp']||undefined,_0x249274=_0x476e8f[_0x4cbcb9(0xad)]||env(_0x4cbcb9(0xa1))||undefined,_0x606765=_0x249274||_0x14dcb8||undefined,_0xaff7e=env(_0x4cbcb9(0x8b))||_0x5a24fb[_0x4cbcb9(0xb5)]||undefined,_0x491bc1=_0x476e8f[_0x4cbcb9(0x86)]||env(_0x4cbcb9(0xb0))||_0x5a24fb[_0x4cbcb9(0x86)]||DEFAULT_CONFIG_VALUES[_0x4cbcb9(0x86)],_0x483672=normalizeEnv(String(_0x491bc1)),_0x3baeb4=isDaily(_0x483672)?_0x4cbcb9(0x9b):isDev(_0x483672)?'development':_0x4cbcb9(0xb8),_0xc28389=resolveCachedAppCode(_0x606765,_0x3baeb4,_0xaff7e),_0x3e2016=_0x476e8f[_0x4cbcb9(0xbd)]||env(_0x4cbcb9(0x90))||_0xc28389||_0x5a24fb[_0x4cbcb9(0xbd)]||_0x5a24fb[_0x4cbcb9(0xad)]||undefined,_0x49584f=_0x5a24fb[_0x4cbcb9(0xc4)]||DEFAULT_CONFIG_VALUES[_0x4cbcb9(0xc4)],_0x460648=undefined,_0x87ba13=_0x476e8f[_0x4cbcb9(0xba)]||env(_0x4cbcb9(0x98))||_0x5a24fb[_0x4cbcb9(0xba)],_0x2bf961=normalizeLegacyOutputFormat(_0x87ba13),_0x351934=env(_0x4cbcb9(0xaf))||_0x5a24fb[_0x4cbcb9(0xc3)],_0x32701b=_0x351934?Number(_0x351934)||undefined:undefined,_0x420964=_0x5a24fb[_0x4cbcb9(0xa4)]||_0x5a24fb[_0x4cbcb9(0xac)],_0x3f30fe=_0x420964===_0x4cbcb9(0x92)||_0x420964===_0x4cbcb9(0xca)||_0x420964==='high-risk-write'?_0x420964:DEFAULT_CONFIG_VALUES[_0x4cbcb9(0xa4)],_0x3a5df6=env('VERBOSE'),_0x1f5f3a=_0x3a5df6==='1'||_0x3a5df6==='true';return{'appCode':typeof _0x3e2016===_0x4cbcb9(0x87)&&_0x3e2016['trim']()?_0x3e2016['trim']():undefined,'env':_0x3baeb4,'locale':_0x49584f,'cookie':_0x460648,'accessKey':_0xaff7e,'format':_0x2bf961,'pageSize':_0x32701b,'riskLevel':_0x3f30fe,'verbose':_0x1f5f3a,'defaultApp':_0x14dcb8,'currentApp':typeof _0x606765==='string'?_0x606765:undefined,'raw':_0x5a24fb};}function env(_0x2a2ac7){return process.env[`LOVRABET_${_0x2a2ac7}`]||undefined;}async function buildAuth(_0x1b4e68){const _0x85b22e='',_0x8a6405=!!_0x1b4e68['accessKey'];return{'cookie':_0x85b22e,'isLoggedIn':_0x8a6405,async 'getOrLogin'(){if(_0x8a6405)return _0x85b22e;throw CliErrors['authRequired']();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4e908a,_0x1da82f){const _0x2f5919=a39_0x44ba,_0x11682f=_0x4e908a();while(!![]){try{const _0x46a32f=parseInt(_0x2f5919(0x1be))/0x1*(-parseInt(_0x2f5919(0x199))/0x2)+parseInt(_0x2f5919(0x1a4))/0x3*(-parseInt(_0x2f5919(0x193))/0x4)+-parseInt(_0x2f5919(0x1b4))/0x5*(parseInt(_0x2f5919(0x1ad))/0x6)+parseInt(_0x2f5919(0x1a9))/0x7+parseInt(_0x2f5919(0x1af))/0x8+parseInt(_0x2f5919(0x19e))/0x9*(parseInt(_0x2f5919(0x1a0))/0xa)+parseInt(_0x2f5919(0x198))/0xb;if(_0x46a32f===_0x1da82f)break;else _0x11682f['push'](_0x11682f['shift']());}catch(_0x2cdbbe){_0x11682f['push'](_0x11682f['shift']());}}}(a39_0x5c29,0x7b104));import{getRuntimeDomain}from'../constant/domain.js';function a39_0x44ba(_0x4fbd29,_0x238e0d){_0x4fbd29=_0x4fbd29-0x190;const _0x5c294d=a39_0x5c29();let _0x44ba7f=_0x5c294d[_0x4fbd29];return _0x44ba7f;}import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x13d0d1){_activeAK=_0x13d0d1||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x53be23,_0x146262={}){const _0x66d601=a39_0x44ba,{method:method=_0x66d601(0x19f),body:_0xfc83f9,headers:headers={},timeout:timeout=0x7530}=_0x146262,_0x50ce03=_activeAK,_0x4dcfca=getRuntimeDomain();if(!_0x50ce03)throw CliErrors[_0x66d601(0x19d)](_0x66d601(0x1ac));const _0x1f2acb=''+_0x4dcfca+_0x53be23,_0x1d1e3a={'X-User-AK':_0x50ce03},_0x51c470=new AbortController(),_0x48081b=setTimeout(()=>_0x51c470['abort'](),timeout);try{const _0x3e479a=await fetch(_0x1f2acb,{'method':method,'headers':{'Content-Type':_0x66d601(0x1ae),'X-Invoke-Source':'cli:lovrabet-runtime',..._0x1d1e3a,...headers},'body':_0xfc83f9?JSON[_0x66d601(0x1b1)](_0xfc83f9):undefined,'signal':_0x51c470[_0x66d601(0x1b2)]});let _0x4575ac;try{_0x4575ac=await _0x3e479a[_0x66d601(0x1b0)]();}catch{throw CliErrors[_0x66d601(0x190)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x3e479a[_0x66d601(0x19a)]+')',_0x3e479a[_0x66d601(0x19a)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x3e479a['ok']||_0x4575ac[_0x66d601(0x1a8)]===![])throw CliErrors[_0x66d601(0x190)](_0x4575ac['errorMsg']||_0x4575ac[_0x66d601(0x1b7)]||'API\x20error:\x20'+_0x3e479a[_0x66d601(0x19a)],_0x4575ac['errorCode']?_0x66d601(0x1b9)+_0x4575ac['errorCode']:undefined);return _0x4575ac;}catch(_0x3e0ed8){if(_0x3e0ed8 instanceof Error&&_0x3e0ed8[_0x66d601(0x1a2)]===_0x66d601(0x195))throw CliErrors[_0x66d601(0x190)](_0x66d601(0x1b3)+_0x1f2acb);throw _0x3e0ed8;}finally{clearTimeout(_0x48081b);}}export async function getBffScriptInfo(_0x4da85b){const _0x57d237=a39_0x44ba,_0x1388ff=await apiRequest(_0x57d237(0x194)+_0x4da85b);if(!_0x1388ff['data'])throw CliErrors[_0x57d237(0x1a6)](_0x57d237(0x1b8)+_0x4da85b);return _0x1388ff[_0x57d237(0x19c)];}export async function getSqlQueryInfo(_0x513400,_0x15667b){const _0x541ddb=a39_0x44ba,_0x4c66a6=await apiRequest('/client/sql/query',{'method':_0x541ddb(0x1bb),'body':{'appCode':_0x513400,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x15667b}}),_0x133c8d=_0x4c66a6[_0x541ddb(0x19c)],_0x5783ef=_0x133c8d&&typeof _0x133c8d===_0x541ddb(0x1b5)&&_0x541ddb(0x1a7)in _0x133c8d?_0x133c8d[_0x541ddb(0x1a7)]?.[0x0]:_0x133c8d&&typeof _0x133c8d===_0x541ddb(0x1b5)&&'sqlCode'in _0x133c8d?_0x133c8d:undefined;if(!_0x5783ef)throw CliErrors[_0x541ddb(0x1a6)](_0x541ddb(0x19b)+_0x15667b);return _0x5783ef;}function isRemoteAppItem(_0x2fc128){const _0x39e148=a39_0x44ba;return!!_0x2fc128&&typeof _0x2fc128===_0x39e148(0x1b5)&&typeof _0x2fc128[_0x39e148(0x197)]===_0x39e148(0x1ba)&&typeof _0x2fc128[_0x39e148(0x1bc)]===_0x39e148(0x1ba);}function extractRemoteAppItems(_0x364d81){const _0x2aff07=a39_0x44ba;if(Array[_0x2aff07(0x1a1)](_0x364d81))return _0x364d81['filter'](isRemoteAppItem);if(!_0x364d81||typeof _0x364d81!==_0x2aff07(0x1b5))throw CliErrors[_0x2aff07(0x190)](_0x2aff07(0x1ab));const _0x54a868=_0x364d81;if(Array[_0x2aff07(0x1a1)](_0x54a868['tableData']))return _0x54a868['tableData'][_0x2aff07(0x1aa)](isRemoteAppItem);if(_0x54a868[_0x2aff07(0x19c)]&&typeof _0x54a868['data']===_0x2aff07(0x1b5)){const _0x2b5aca=_0x54a868['data'];if(Array['isArray'](_0x2b5aca['tableData']))return _0x2b5aca['tableData'][_0x2aff07(0x1aa)](isRemoteAppItem);}throw CliErrors['apiError'](_0x2aff07(0x1bd));}function a39_0x5c29(){const _0x5ebdd4=['signal','Request\x20timeout:\x20','5fKSzWQ','object','/client/app/my-apps','message','BFF\x20script\x20not\x20found:\x20id=','API\x20error\x20code:\x20','string','POST','appName','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','43195bVUhQG','apiError','/client/dataset/list','code','4oXkjcl','/client/bff/query/','AbortError','test','appCode','4837833mUTceq','8dthzSJ','status','SQL\x20query\x20not\x20found:\x20','data','authRequired','9pKHwgc','GET','4966910KipOFW','isArray','name','/client/user/loginUserInfo','2832234JeisHT','/client/dataset/query?','validation','tableData','success','4346846Vlowls','filter','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','Configure\x20accessKey\x20in\x20.lovrabet.json.','3138972KezoEE','application/json','4692928ilSpdO','json','stringify'];a39_0x5c29=function(){return _0x5ebdd4;};return a39_0x5c29();}export async function getMyApps(){const _0x56fc31=a39_0x44ba,_0x52322c=await apiRequest(_0x56fc31(0x1b6));return extractRemoteAppItems(_0x52322c[_0x56fc31(0x19c)]);}export async function getLoginUserInfo(){const _0x21fc75=a39_0x44ba,_0x53a419=await apiRequest(_0x21fc75(0x1a3));if(!_0x53a419[_0x21fc75(0x19c)]||typeof _0x53a419[_0x21fc75(0x19c)]!==_0x21fc75(0x1b5)||Array['isArray'](_0x53a419[_0x21fc75(0x19c)]))throw CliErrors[_0x21fc75(0x190)]('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x53a419[_0x21fc75(0x19c)];}export async function listDatasets(_0x391ac9,_0x503616){const _0x2940c6=a39_0x44ba,_0xc25839=await apiRequest(_0x2940c6(0x191),{'method':_0x2940c6(0x1bb),'body':{'appCode':_0x391ac9,..._0x503616?.[_0x2940c6(0x192)]&&{'code':_0x503616[_0x2940c6(0x192)]},..._0x503616?.['name']&&{'name':_0x503616[_0x2940c6(0x1a2)]}}});return extractList(_0xc25839[_0x2940c6(0x19c)]);}export async function getDatasetDetail(_0x26296d){const _0x8dccf5=a39_0x44ba,_0x21d5e8=/^\d+$/[_0x8dccf5(0x196)](_0x26296d)?'id':_0x8dccf5(0x192),_0x3cc820=await apiRequest(_0x8dccf5(0x1a5)+_0x21d5e8+'='+_0x26296d);return _0x3cc820['data'];}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a40_0x4d9f(_0x4b3d4c,_0x4beab5){_0x4b3d4c=_0x4b3d4c-0x1a7;const _0x5d67cd=a40_0x5d67();let _0x4d9ff5=_0x5d67cd[_0x4b3d4c];return _0x4d9ff5;}(function(_0x718ae0,_0x4b1f68){const _0x3eedc3=a40_0x4d9f,_0x217028=_0x718ae0();while(!![]){try{const _0x280a2f=-parseInt(_0x3eedc3(0x1b3))/0x1*(parseInt(_0x3eedc3(0x1b2))/0x2)+-parseInt(_0x3eedc3(0x1a8))/0x3+-parseInt(_0x3eedc3(0x1b0))/0x4*(parseInt(_0x3eedc3(0x1ad))/0x5)+-parseInt(_0x3eedc3(0x1b9))/0x6+-parseInt(_0x3eedc3(0x1a9))/0x7*(parseInt(_0x3eedc3(0x1b6))/0x8)+parseInt(_0x3eedc3(0x1ac))/0x9+-parseInt(_0x3eedc3(0x1b4))/0xa*(-parseInt(_0x3eedc3(0x1b7))/0xb);if(_0x280a2f===_0x4b1f68)break;else _0x217028['push'](_0x217028['shift']());}catch(_0x1d1189){_0x217028['push'](_0x217028['shift']());}}}(a40_0x5d67,0xe62c4));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x467267){const _0x19f927=a40_0x4d9f;if(cache['has'](_0x467267))return cache[_0x19f927(0x1ab)](_0x467267);const _0x4cb99e=await listDatasets(_0x467267),_0x541aea=new Map();for(const _0x1b7da2 of _0x4cb99e){const _0x1e1348=_0x1b7da2[_0x19f927(0x1b1)];_0x1e1348?.['dbId']!=null&&_0x541aea['set'](_0x1e1348[_0x19f927(0x1ae)],_0x1e1348[_0x19f927(0x1aa)]??_0x19f927(0x1b8)+_0x1e1348[_0x19f927(0x1ae)]);}const _0x411ec5=[..._0x541aea[_0x19f927(0x1a7)]()][_0x19f927(0x1b5)](([_0x19a222,_0x46ccd9])=>({'dbId':_0x19a222,'dbName':_0x46ccd9}));return cache['set'](_0x467267,_0x411ec5),_0x411ec5;}export async function getDbName(_0x330e77,_0x19a091){const _0x58b8f9=a40_0x4d9f;try{const _0x414b79=await listDatabases(_0x330e77);return _0x414b79[_0x58b8f9(0x1af)](_0x4e9b2c=>_0x4e9b2c[_0x58b8f9(0x1ae)]===_0x19a091)?.[_0x58b8f9(0x1aa)];}catch{return undefined;}}function a40_0x5d67(){const _0x827a37=['dbtableConfig','51742IzoBIO','12lpjqLH','10sOjAXr','map','104JIOiSY','37902414JjHVoD','db-','4531188moutET','entries','3186243fiUsiq','477449SnxmJs','dbName','get','7391916FlAUki','774470CqgwKS','dbId','find','8NQWtfc'];a40_0x5d67=function(){return _0x827a37;};return a40_0x5d67();}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4436d4,_0x412e60){const _0x2be0a4=a41_0x38cb,_0xb022af=_0x4436d4();while(!![]){try{const _0x50e0b5=-parseInt(_0x2be0a4(0xc1))/0x1+parseInt(_0x2be0a4(0xd1))/0x2*(parseInt(_0x2be0a4(0xca))/0x3)+-parseInt(_0x2be0a4(0xcf))/0x4*(parseInt(_0x2be0a4(0xcb))/0x5)+parseInt(_0x2be0a4(0xc0))/0x6*(-parseInt(_0x2be0a4(0xd8))/0x7)+parseInt(_0x2be0a4(0xd6))/0x8+parseInt(_0x2be0a4(0xbe))/0x9*(-parseInt(_0x2be0a4(0xd2))/0xa)+parseInt(_0x2be0a4(0xbc))/0xb;if(_0x50e0b5===_0x412e60)break;else _0xb022af['push'](_0xb022af['shift']());}catch(_0x5420d2){_0xb022af['push'](_0xb022af['shift']());}}}(a41_0xd869,0xb8859));function a41_0x38cb(_0x2d0646,_0x5eb162){_0x2d0646=_0x2d0646-0xbb;const _0xd8695b=a41_0xd869();let _0x38cb2b=_0xd8695b[_0x2d0646];return _0x38cb2b;}import{createClient}from'@lovrabet/sdk';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x37a88a){const _0x1879e7=a41_0x38cb;_client=createClient({'appCode':_0x37a88a['appCode'],'env':_0x37a88a[_0x1879e7(0xc2)],'authMode':_0x37a88a[_0x1879e7(0xc6)],..._0x37a88a[_0x1879e7(0xd3)]?{'accessKey':_0x37a88a[_0x1879e7(0xd3)]}:{},'options':{'timeout':0x7530}});}function ensureClient(){const _0x23f9d0=a41_0x38cb;if(!_client)throw new Error(_0x23f9d0(0xc4));return _client;}export async function executeData(_0x25c79e,_0x2949b4,_0x2adaac){const _0x318fda=a41_0x38cb,_0x1275ab=ensureClient(),_0x5c4dbe=_0x318fda(0xd0)+_0x25c79e,_0x2aff26=_0x1275ab[_0x318fda(0xcd)][_0x5c4dbe];if(!_0x2aff26||typeof _0x2aff26[_0x2949b4]!==_0x318fda(0xc5))throw new Error(_0x318fda(0xd4)+_0x2949b4+_0x318fda(0xc9)+'Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.');if(_0x2949b4===_0x318fda(0xd5))return _0x2aff26[_0x318fda(0xd5)](parseBatchCreateItemsFromParams(_0x2adaac));const _0x1b869f=_0x2adaac!==undefined&&_0x2adaac!==null&&!Array[_0x318fda(0xd9)](_0x2adaac)?_0x2adaac:{};switch(_0x2949b4){case _0x318fda(0xc3):{const _0x8c9fd9=_0x1b869f['id'];if(_0x8c9fd9===undefined||_0x8c9fd9===null)throw new Error(_0x318fda(0xce));return _0x2aff26[_0x318fda(0xc3)](_0x8c9fd9);}case _0x318fda(0xd7):{const {id:_0xe32a91,..._0x881c37}=_0x1b869f;if(_0xe32a91===undefined||_0xe32a91===null)throw new Error(_0x318fda(0xbf));return _0x2aff26[_0x318fda(0xd7)](_0xe32a91,_0x881c37);}case _0x318fda(0xbb):{const _0x1380ac=_0x1b869f['id'];if(_0x1380ac===undefined||_0x1380ac===null)throw new Error(_0x318fda(0xbd));return _0x2aff26['delete'](_0x1380ac);}default:return _0x2aff26[_0x2949b4](_0x1b869f);}}export async function executeSdkSql(_0x7dbb16,_0x4d8930){const _0x52a072=a41_0x38cb,_0x4219bd=ensureClient();return _0x4219bd[_0x52a072(0xcc)]['execute']({'sqlCode':_0x7dbb16,'params':_0x4d8930});}export async function executeSdkBff(_0x2e0d03,_0x4681b1){const _0x3786ef=a41_0x38cb,_0x4abb19=ensureClient();return _0x4abb19[_0x3786ef(0xc7)][_0x3786ef(0xc8)]({'scriptName':_0x2e0d03,'params':_0x4681b1});}function a41_0xd869(){const _0x462e5e=['delete','39461059BRFcro','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','217503uaQbQp','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','270TRmnBM','777983hEolRR','env','getOne','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','function','authMode','bff','execute','\x22.\x20','3xTHoAC','2409995VgEtKn','sql','models','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','12mXySmc','dataset_','1121070jRmuqG','130hvdQLf','accessKey','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','batchCreate','2638184nLAruI','update','184135ZoCLBV','isArray'];a41_0xd869=function(){return _0x462e5e;};return a41_0xd869();}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x85b80=a42_0x53df;(function(_0x23430a,_0x4384ff){const _0x2fea9f=a42_0x53df,_0x547125=_0x23430a();while(!![]){try{const _0x588054=-parseInt(_0x2fea9f(0x127))/0x1*(-parseInt(_0x2fea9f(0x12d))/0x2)+parseInt(_0x2fea9f(0x12a))/0x3+-parseInt(_0x2fea9f(0x126))/0x4+-parseInt(_0x2fea9f(0x12b))/0x5+parseInt(_0x2fea9f(0x12c))/0x6*(-parseInt(_0x2fea9f(0x124))/0x7)+parseInt(_0x2fea9f(0x122))/0x8*(-parseInt(_0x2fea9f(0x121))/0x9)+parseInt(_0x2fea9f(0x125))/0xa;if(_0x588054===_0x4384ff)break;else _0x547125['push'](_0x547125['shift']());}catch(_0x178ce9){_0x547125['push'](_0x547125['shift']());}}}(a42_0x4842,0xc5c66));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a42_0x53df(_0x30b0a3,_0x1e7b6e){_0x30b0a3=_0x30b0a3-0x121;const _0x48423e=a42_0x4842();let _0x53df75=_0x48423e[_0x30b0a3];return _0x53df75;}export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a42_0x85b80(0x128)+CLI_BIN_NAME+'\x20auth\x20login`.','configMissingHint':a42_0x85b80(0x123),'notInProjectHint':a42_0x85b80(0x129)});function a42_0x4842(){const _0x47bbb0=['1161393AXdkMw','7027965WwhHDz','78KrdKaS','778614uXpGRp','6597SreGSM','2840IGJFTm','Set\x20appcode\x20via\x20--appcode\x20or\x20.lovrabet.json.','758121WhQPEo','31116200XCGUGo','3131356fcXdEq','3ACDKuL','Configure\x20accessKey\x20in\x20.lovrabet.json\x20or\x20run\x20`','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20.lovrabet.json\x20file.'];a42_0x4842=function(){return _0x47bbb0;};return a42_0x4842();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x311718,_0x3aaeff){var _0x15a937=a43_0x489b,_0x9a9bf3=_0x311718();while(!![]){try{var _0x3201b3=-parseInt(_0x15a937(0x1ad))/0x1+-parseInt(_0x15a937(0x1a6))/0x2*(-parseInt(_0x15a937(0x1ab))/0x3)+parseInt(_0x15a937(0x1a8))/0x4*(parseInt(_0x15a937(0x1ae))/0x5)+parseInt(_0x15a937(0x1aa))/0x6+-parseInt(_0x15a937(0x1a7))/0x7+parseInt(_0x15a937(0x1ac))/0x8+-parseInt(_0x15a937(0x1a9))/0x9;if(_0x3201b3===_0x3aaeff)break;else _0x9a9bf3['push'](_0x9a9bf3['shift']());}catch(_0x13965f){_0x9a9bf3['push'](_0x9a9bf3['shift']());}}}(a43_0x2013,0x5c3b6));function a43_0x2013(){var _0x487f5e=['1275490bEVKEI','2622PZQhWt','4128628CPhbLW','4RwwuEj','1969425TkyZTb','1569510zEyKVj','177GnKRDp','5431496SnRXlu','86558IzQcIN'];a43_0x2013=function(){return _0x487f5e;};return a43_0x2013();}function a43_0x489b(_0x3412ec,_0x1c2f96){_0x3412ec=_0x3412ec-0x1a6;var _0x2013da=a43_0x2013();var _0x489b4e=_0x2013da[_0x3412ec];return _0x489b4e;}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a43_0x1f0232}from'@lovrabet/cli-framework';export function buildAllFlags(_0x3684c3){return a43_0x1f0232(_0x3684c3,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a44_0x1839(){const _0x182d96=['19326384iwcXSo','body','1qxsjIB','2491472leLjTr','3936339yfnKhy','8846835FNmGRj','796125KBHejY','14898896VrvZgM','30REZhMi','4Fthnuw','description','147jrYWtJ','289998pSrELw'];a44_0x1839=function(){return _0x182d96;};return a44_0x1839();}function a44_0x5ae3(_0x5549d2,_0x3aeaa){_0x5549d2=_0x5549d2-0x1d6;const _0x1839f6=a44_0x1839();let _0x5ae3f9=_0x1839f6[_0x5549d2];return _0x5ae3f9;}(function(_0x318efa,_0x1f7dc1){const _0x27303c=a44_0x5ae3,_0x201ebb=_0x318efa();while(!![]){try{const _0x2eabc2=parseInt(_0x27303c(0x1da))/0x1*(-parseInt(_0x27303c(0x1db))/0x2)+-parseInt(_0x27303c(0x1de))/0x3*(-parseInt(_0x27303c(0x1e1))/0x4)+parseInt(_0x27303c(0x1dd))/0x5+-parseInt(_0x27303c(0x1d7))/0x6*(parseInt(_0x27303c(0x1d6))/0x7)+-parseInt(_0x27303c(0x1df))/0x8+parseInt(_0x27303c(0x1dc))/0x9*(parseInt(_0x27303c(0x1e0))/0xa)+parseInt(_0x27303c(0x1d8))/0xb;if(_0x2eabc2===_0x1f7dc1)break;else _0x201ebb['push'](_0x201ebb['shift']());}catch(_0x5867f2){_0x201ebb['push'](_0x201ebb['shift']());}}}(a44_0x1839,0xef6e4));export function dryRun(_0x3771cf,_0x129075){const _0x15c710={'method':_0x3771cf,'url':_0x129075},_0x5c49f7={'body'(_0x5573){const _0x3beb27=a44_0x5ae3;return _0x15c710[_0x3beb27(0x1d9)]=_0x5573,_0x5c49f7;},'description'(_0xb6b50c){const _0x2aecc8=a44_0x5ae3;return _0x15c710[_0x2aecc8(0x1e2)]=_0xb6b50c,_0x5c49f7;},'build'(){return{..._0x15c710};}};return _0x5c49f7;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x13edc9=a45_0x4cdf;(function(_0x2fc76c,_0x564a89){const _0x2335d0=a45_0x4cdf,_0x55282b=_0x2fc76c();while(!![]){try{const _0xa5de1d=parseInt(_0x2335d0(0xf5))/0x1*(parseInt(_0x2335d0(0xf4))/0x2)+parseInt(_0x2335d0(0xef))/0x3+-parseInt(_0x2335d0(0xf6))/0x4*(parseInt(_0x2335d0(0xf0))/0x5)+-parseInt(_0x2335d0(0xf3))/0x6*(parseInt(_0x2335d0(0xf8))/0x7)+parseInt(_0x2335d0(0xf1))/0x8*(parseInt(_0x2335d0(0xf9))/0x9)+-parseInt(_0x2335d0(0xf2))/0xa*(-parseInt(_0x2335d0(0xfb))/0xb)+parseInt(_0x2335d0(0xfa))/0xc;if(_0xa5de1d===_0x564a89)break;else _0x55282b['push'](_0x55282b['shift']());}catch(_0x4cbd0b){_0x55282b['push'](_0x55282b['shift']());}}}(a45_0x2c67,0xa52fa));function a45_0x4cdf(_0x3fa28e,_0x204c29){_0x3fa28e=_0x3fa28e-0xef;const _0x2c67c2=a45_0x2c67();let _0x4cdf3c=_0x2c67c2[_0x3fa28e];return _0x4cdf3c;}import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a45_0x13edc9(0xf7)];export const validateFlags=helpers['validateFlags'];function a45_0x2c67(){const _0x5eed42=['28TWHmcn','6335289WwpoCG','4710516nxPuAy','11OuVpGd','1539060pLyLci','125ENGEDU','8RronQj','4599550ZveSfG','616776OEqxmF','4augIHO','22936AYZOIj','164404yIqRyi','parseFlags'];a45_0x2c67=function(){return _0x5eed42;};return a45_0x2c67();}
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a46_0x5aad97=a46_0x282c;(function(_0x5c3e47,_0x1aa265){const _0x325786=a46_0x282c,_0x2d2c9a=_0x5c3e47();while(!![]){try{const _0x45281b=parseInt(_0x325786(0x10b))/0x1*(-parseInt(_0x325786(0x115))/0x2)+parseInt(_0x325786(0x119))/0x3*(parseInt(_0x325786(0x10a))/0x4)+parseInt(_0x325786(0x10c))/0x5+parseInt(_0x325786(0x118))/0x6+-parseInt(_0x325786(0x114))/0x7*(-parseInt(_0x325786(0x116))/0x8)+parseInt(_0x325786(0x10e))/0x9+parseInt(_0x325786(0x10d))/0xa*(-parseInt(_0x325786(0x117))/0xb);if(_0x45281b===_0x1aa265)break;else _0x2d2c9a['push'](_0x2d2c9a['shift']());}catch(_0x4f4c3d){_0x2d2c9a['push'](_0x2d2c9a['shift']());}}}(a46_0x4d43,0x364ae));import{createHelpGenerators}from'@lovrabet/cli-framework';function a46_0x4d43(){const _0x3b47e1=['21680RWcTgo','2239587XrAceI','get','generateServiceHelp','generateCommandHelp','Requires\x20appcode\x20(set\x20via\x20.lovrabet.json\x20or\x20--appcode).','generateFullHelp','50309xjdCKC','2NNeSwU','88OBmsGc','3322qmGNNv','2512950xjUnsT','3LYKQSY','327464NfatoE','289215PNpceN','1688710yEsmWU'];a46_0x4d43=function(){return _0x3b47e1;};return a46_0x4d43();}import{buildAllFlags}from'../framework/build-all-flags.js';function a46_0x282c(_0x157916,_0x4250ac){_0x157916=_0x157916-0x10a;const _0x4d43a3=a46_0x4d43();let _0x282cfb=_0x4d43a3[_0x157916];return _0x282cfb;}import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x43116=>serviceGroups[a46_0x5aad97(0x10f)](_0x43116),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a46_0x5aad97(0x112)});export function generateCommandHelp(_0x5ea176){const _0x23e50e=a46_0x5aad97;return generators[_0x23e50e(0x111)](_0x5ea176);}export const generateServiceHelp=generators[a46_0x5aad97(0x110)];export const generateFullHelp=generators[a46_0x5aad97(0x113)];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2ec34b,_0xa76d4d){var _0x5142ad=a47_0x3b3a,_0x52c849=_0x2ec34b();while(!![]){try{var _0x16c313=-parseInt(_0x5142ad(0xe1))/0x1+parseInt(_0x5142ad(0xdf))/0x2*(-parseInt(_0x5142ad(0xdd))/0x3)+parseInt(_0x5142ad(0xe5))/0x4*(parseInt(_0x5142ad(0xdc))/0x5)+-parseInt(_0x5142ad(0xe2))/0x6+-parseInt(_0x5142ad(0xe3))/0x7*(parseInt(_0x5142ad(0xdb))/0x8)+parseInt(_0x5142ad(0xe0))/0x9+parseInt(_0x5142ad(0xe4))/0xa*(parseInt(_0x5142ad(0xde))/0xb);if(_0x16c313===_0xa76d4d)break;else _0x52c849['push'](_0x52c849['shift']());}catch(_0x5a7f67){_0x52c849['push'](_0x52c849['shift']());}}}(a47_0x3ae4,0x4ad19));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';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';function a47_0x3b3a(_0x2a738d,_0x1b38b2){_0x2a738d=_0x2a738d-0xdb;var _0x3ae4a4=a47_0x3ae4();var _0x3b3acc=_0x3ae4a4[_0x2a738d];return _0x3b3acc;}function a47_0x3ae4(){var _0x11bea0=['24vlemAf','3310mDuqaT','2766qxSVJx','11mhPnee','1048TweueW','53757maFGey','379069jQMrCu','2965020ddinWR','584444ZSRvJt','15736790rjhXiG','2016nOOpLC'];a47_0x3ae4=function(){return _0x11bea0;};return a47_0x3ae4();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x300e96,_0x5993c6){const _0x49a247=a48_0x1209,_0x2e2aa4=_0x300e96();while(!![]){try{const _0x2f9b24=-parseInt(_0x49a247(0x18f))/0x1+-parseInt(_0x49a247(0x186))/0x2+parseInt(_0x49a247(0x18e))/0x3+-parseInt(_0x49a247(0x189))/0x4*(-parseInt(_0x49a247(0x18d))/0x5)+-parseInt(_0x49a247(0x18b))/0x6+-parseInt(_0x49a247(0x18c))/0x7*(-parseInt(_0x49a247(0x187))/0x8)+-parseInt(_0x49a247(0x18a))/0x9*(-parseInt(_0x49a247(0x188))/0xa);if(_0x2f9b24===_0x5993c6)break;else _0x2e2aa4['push'](_0x2e2aa4['shift']());}catch(_0x309118){_0x2e2aa4['push'](_0x2e2aa4['shift']());}}}(a48_0x3239,0x21dae));function a48_0x3239(){const _0x532fc5=['1967gcFwGy','775pnaGjZ','407124BqLwex','55677fgHngB','542266hAfzZQ','7136zApXdj','104900YQyqaZ','968mQerID','252JhHWgm','1512660twiove'];a48_0x3239=function(){return _0x532fc5;};return a48_0x3239();}import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a48_0x1209(_0x1145ef,_0x54c9c3){_0x1145ef=_0x1145ef-0x186;const _0x323961=a48_0x3239();let _0x1209ee=_0x323961[_0x1145ef];return _0x1209ee;}import{CliErrors}from'../errors.js';export const formatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x469125,_0xdd2f77){const _0x34e6f6=a49_0x3701,_0x1480fb=_0x469125();while(!![]){try{const _0x5c23c8=parseInt(_0x34e6f6(0x10c))/0x1+-parseInt(_0x34e6f6(0x107))/0x2*(-parseInt(_0x34e6f6(0xf5))/0x3)+parseInt(_0x34e6f6(0xfd))/0x4*(parseInt(_0x34e6f6(0x10a))/0x5)+-parseInt(_0x34e6f6(0x112))/0x6+-parseInt(_0x34e6f6(0xfc))/0x7+parseInt(_0x34e6f6(0xff))/0x8*(parseInt(_0x34e6f6(0x113))/0x9)+-parseInt(_0x34e6f6(0x101))/0xa*(parseInt(_0x34e6f6(0x102))/0xb);if(_0x5c23c8===_0xdd2f77)break;else _0x1480fb['push'](_0x1480fb['shift']());}catch(_0x42ebb1){_0x1480fb['push'](_0x1480fb['shift']());}}}(a49_0x545e,0xc634a));function toKebab(_0x417746){const _0x2da17c=a49_0x3701;return _0x417746[_0x2da17c(0x115)](/_/g,'-')[_0x2da17c(0x115)](/-([A-Z]+)/g,(_0x3747a5,_0x1a26db)=>'-'+_0x1a26db[_0x2da17c(0xef)]())['replace'](/([a-z0-9])([A-Z])/g,(_0x5339d1,_0x1a1ea2,_0x2d743e)=>_0x1a1ea2+'-'+_0x2d743e)['toLowerCase']();}function buildKnownFlags(_0x31ce5c){const _0x5daf9c=a49_0x3701,_0x10f052=new Set();for(const _0x26f38c of _0x31ce5c){_0x10f052[_0x5daf9c(0xf8)](_0x26f38c[_0x5daf9c(0x106)]),_0x10f052[_0x5daf9c(0xf8)](toCamelCase(_0x26f38c['name']));}for(const _0x529b0e of['dry-run',_0x5daf9c(0xfb),_0x5daf9c(0xf3),_0x5daf9c(0x10b)]){_0x10f052[_0x5daf9c(0xf8)](_0x529b0e);}for(const _0x4974ba of[_0x5daf9c(0xfe),'env','appcode',_0x5daf9c(0x10d),'nonInteractive',_0x5daf9c(0x104),'ci',_0x5daf9c(0xf0),'version']){_0x10f052[_0x5daf9c(0xf8)](_0x4974ba);}return _0x10f052;}function a49_0x545e(){const _0x2d3af2=['name','154186zwEGxl','keys','has','187505ziIYeX','format','1018172Xpphhv','app','sticky','set','push','string','5098830aGJYBY','3249fVvGwH','indexOf','replace','toLowerCase','global','alias','corrected','yes','original','30CEjMMQ','toUpperCase','get','add','type','number','dryRun','4854710OxBJYX','112pJKIDI','help','10984bjpKte','entries','4897990mAKxBS','22UBkcsu','boolean','non-interactive','slice'];a49_0x545e=function(){return _0x2d3af2;};return a49_0x545e();}function a49_0x3701(_0x4647f1,_0x32b1b8){_0x4647f1=_0x4647f1-0xef;const _0x545ea5=a49_0x545e();let _0x370155=_0x545ea5[_0x4647f1];return _0x370155;}function buildFlagTypeMap(_0x265c1a){const _0x433250=a49_0x3701,_0x365c2a=new Map();for(const _0x3b8036 of _0x265c1a){_0x365c2a[_0x433250(0x10f)](_0x3b8036[_0x433250(0x106)],_0x3b8036[_0x433250(0xf9)]),_0x365c2a['set'](toCamelCase(_0x3b8036[_0x433250(0x106)]),_0x3b8036[_0x433250(0xf9)]);}return _0x365c2a;}function toCamelCase(_0x23a33b){const _0x527c2e=a49_0x3701;return _0x23a33b[_0x527c2e(0x115)](/-([a-z])/g,(_0x305e5a,_0x1d42b9)=>_0x1d42b9[_0x527c2e(0xf6)]());}function aliasHandler(_0x1b0aa4,_0x289f68){const _0x142225=a49_0x3701,_0x3bd77a=[];for(const _0x1628ea of Object[_0x142225(0x108)](_0x1b0aa4)){if(_0x289f68[_0x142225(0x109)](_0x1628ea))continue;const _0x15c35d=toKebab(_0x1628ea);_0x15c35d!==_0x1628ea&&_0x289f68[_0x142225(0x109)](_0x15c35d)&&_0x3bd77a[_0x142225(0x110)]({'original':_0x1628ea,'corrected':_0x15c35d,'handler':_0x142225(0xf1)});}return _0x3bd77a;}function stickyHandler(_0x287f8b,_0x349102,_0x3fabf2){const _0x30b252=a49_0x3701,_0x323f96=[];for(const [_0x290b5d,_0x2bfc2c]of Object[_0x30b252(0x100)](_0x287f8b)){if(_0x2bfc2c!==!![])continue;for(let _0x4aea92=_0x290b5d['length']-0x1;_0x4aea92>0x0;_0x4aea92--){const _0x2b122b=_0x290b5d[_0x30b252(0x105)](0x0,_0x4aea92),_0x4b0dd6=_0x290b5d[_0x30b252(0x105)](_0x4aea92),_0x388b7d=toKebab(_0x2b122b),_0x192223=toCamelCase(_0x2b122b),_0x4ad643=_0x349102[_0x30b252(0x109)](_0x2b122b)?_0x2b122b:_0x349102[_0x30b252(0x109)](_0x388b7d)?_0x388b7d:_0x349102[_0x30b252(0x109)](_0x192223)?_0x192223:null;if(!_0x4ad643)continue;const _0x2d991d=_0x3fabf2[_0x30b252(0xf7)](_0x4ad643)??_0x30b252(0x111);let _0x2c5851;if(_0x2d991d===_0x30b252(0xfa)){const _0x26f3e2=Number(_0x4b0dd6);if(isNaN(_0x26f3e2)||_0x4b0dd6==='')continue;_0x2c5851=_0x26f3e2;}else{if(_0x2d991d===_0x30b252(0x103))continue;else{if(_0x4b0dd6==='')continue;_0x2c5851=_0x4b0dd6;}}_0x323f96['push']({'original':_0x290b5d,'corrected':_0x4ad643+'='+_0x2c5851,'handler':_0x30b252(0x10e)});break;}}return _0x323f96;}export function correctFlags(_0xf2d896,_0x577a69){const _0x425634=a49_0x3701,_0x4521dc=buildKnownFlags(_0x577a69),_0x2dc7ba=buildFlagTypeMap(_0x577a69),_0x1363f3=aliasHandler(_0xf2d896,_0x4521dc),_0x37420e=stickyHandler(_0xf2d896,_0x4521dc,_0x2dc7ba),_0x568aa5=[..._0x1363f3,..._0x37420e];if(_0x568aa5['length']===0x0)return{'flags':_0xf2d896,'corrections':[]};const _0x519a27={..._0xf2d896},_0x4e98c9=new Set();for(const _0x4d469c of _0x1363f3){_0x519a27[_0x4d469c[_0x425634(0xf2)]]=_0xf2d896[_0x4d469c[_0x425634(0xf4)]],_0x4e98c9[_0x425634(0xf8)](_0x4d469c['original']);}for(const _0x1603d9 of _0x37420e){const _0x44ae21=_0x1603d9['corrected'][_0x425634(0x114)]('='),_0xdd7d4e=_0x1603d9[_0x425634(0xf2)]['slice'](0x0,_0x44ae21),_0x5aa5b3=_0x1603d9[_0x425634(0xf2)]['slice'](_0x44ae21+0x1),_0x1b216e=_0x2dc7ba[_0x425634(0xf7)](_0xdd7d4e)??_0x425634(0x111);_0x1b216e===_0x425634(0xfa)?_0x519a27[_0xdd7d4e]=Number(_0x5aa5b3):_0x519a27[_0xdd7d4e]=_0x5aa5b3,_0x4e98c9[_0x425634(0xf8)](_0x1603d9[_0x425634(0xf4)]);}for(const _0x53daf3 of _0x4e98c9){delete _0x519a27[_0x53daf3];}return{'flags':_0x519a27,'corrections':_0x568aa5};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x42a154,_0x3dee1e){var _0x113ba7=a50_0x31bc,_0x5c8a37=_0x42a154();while(!![]){try{var _0x4a734c=-parseInt(_0x113ba7(0x131))/0x1+-parseInt(_0x113ba7(0x134))/0x2*(-parseInt(_0x113ba7(0x133))/0x3)+parseInt(_0x113ba7(0x130))/0x4*(parseInt(_0x113ba7(0x135))/0x5)+parseInt(_0x113ba7(0x137))/0x6+parseInt(_0x113ba7(0x139))/0x7*(-parseInt(_0x113ba7(0x136))/0x8)+parseInt(_0x113ba7(0x13b))/0x9*(-parseInt(_0x113ba7(0x138))/0xa)+-parseInt(_0x113ba7(0x132))/0xb*(parseInt(_0x113ba7(0x13a))/0xc);if(_0x4a734c===_0x3dee1e)break;else _0x5c8a37['push'](_0x5c8a37['shift']());}catch(_0x19a86b){_0x5c8a37['push'](_0x5c8a37['shift']());}}}(a50_0x240c,0x47f08));function a50_0x31bc(_0x5abe9f,_0x59ebcb){_0x5abe9f=_0x5abe9f-0x130;var _0x240ca6=a50_0x240c();var _0x31bc26=_0x240ca6[_0x5abe9f];return _0x31bc26;}export{extractList,extractPaging}from'@lovrabet/cli-framework';function a50_0x240c(){var _0x34e9db=['1588824XFJSKj','1262187FzsgtZ','196GfUBbo','147874LgvqsJ','11OSDkPO','3qVmxsU','550852uVUSpZ','59460sQAvQZ','987720PByjGe','1465332kCeWaw','20AJKdKj','14yllXxz'];a50_0x240c=function(){return _0x34e9db;};return a50_0x240c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x42e4e3,_0x4dcb9a){const _0x4291c3=a51_0x4df0,_0x20e958=_0x42e4e3();while(!![]){try{const _0x34362a=-parseInt(_0x4291c3(0x1c7))/0x1+-parseInt(_0x4291c3(0x1be))/0x2+parseInt(_0x4291c3(0x1c6))/0x3+parseInt(_0x4291c3(0x1c1))/0x4+-parseInt(_0x4291c3(0x1c8))/0x5*(parseInt(_0x4291c3(0x1bd))/0x6)+parseInt(_0x4291c3(0x1bc))/0x7+-parseInt(_0x4291c3(0x1cc))/0x8*(-parseInt(_0x4291c3(0x1cd))/0x9);if(_0x34362a===_0x4dcb9a)break;else _0x20e958['push'](_0x20e958['shift']());}catch(_0x5939cd){_0x20e958['push'](_0x20e958['shift']());}}}(a51_0x9b8e,0x3b79b));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x230eea,_0x49f610,_0x137bcd){const _0x4b1af0=a51_0x4df0,_0x498b59=buildConfirmationContext(_0x230eea,_0x49f610,_0x137bcd),_0x36bca6=[_0x4b1af0(0x1c5)+_0x498b59[_0x4b1af0(0x1b9)]];return _0x498b59[_0x4b1af0(0x1cb)]&&_0x36bca6[_0x4b1af0(0x1c2)](_0x4b1af0(0x1b8)+_0x498b59['description']),_0x498b59['affectedRecords']&&_0x36bca6[_0x4b1af0(0x1c2)](_0x4b1af0(0x1c3)+_0x498b59['affectedRecords']),_0x36bca6[_0x4b1af0(0x1c2)](_0x4b1af0(0x1b6)),_0x36bca6;}export function reconstructCommandArgv(_0x3bc6a8,_0x3fbd39){const _0xdb11a=a51_0x4df0,_0x48f3ee=[CLI_BIN_NAME,_0x3bc6a8[_0xdb11a(0x1bf)],_0x3bc6a8[_0xdb11a(0x1b4)]];for(const [_0x20f83f,_0x492f11]of Object['entries'](_0x3fbd39)){if(_0x492f11===!![])_0x48f3ee[_0xdb11a(0x1c2)]('--'+_0x20f83f);else _0x492f11!==![]&&_0x492f11!==undefined&&_0x492f11!==''&&_0x48f3ee[_0xdb11a(0x1c2)]('--'+_0x20f83f+'\x20'+JSON[_0xdb11a(0x1ba)](_0x492f11));}return _0x48f3ee['push'](_0xdb11a(0x1b7)),_0x48f3ee[_0xdb11a(0x1b3)]('\x20');}function buildConfirmationContext(_0x2b2d72,_0x219fc8,_0x23aa40){const _0x301adc=a51_0x4df0,_0x397586=extractAffectedRecords(_0x23aa40);return{'commandLabel':_0x219fc8,'description':_0x2b2d72[_0x301adc(0x1cb)],'affectedRecords':_0x397586};}function a51_0x4df0(_0x5a428c,_0x35ff1c){_0x5a428c=_0x5a428c-0x1b3;const _0x9b8ee8=a51_0x9b8e();let _0x4df03e=_0x9b8ee8[_0x5a428c];return _0x4df03e;}function a51_0x9b8e(){const _0x451039=['\x20\x20\x20Affected:\x20','name=','⚠\x20\x20High-risk\x20operation:\x20','334434PWPVDl','27162ssLyZe','10LmNSLr','code=','params','description','716208umJUjN','9vwldoH','join','command','name','\x20\x20\x20Continue?\x20[y/N]\x20','--yes','\x20\x20\x20','commandLabel','stringify','id=','1839495XFzUUm','1272918BfqhBC','162384ryGPbK','service','code','1249928JhDMJO','push'];a51_0x9b8e=function(){return _0x451039;};return a51_0x9b8e();}function extractAffectedRecords(_0x5507bb){const _0xee34ad=a51_0x4df0,_0x4dffc2=[];if(_0x5507bb['code'])_0x4dffc2[_0xee34ad(0x1c2)](_0xee34ad(0x1c9)+_0x5507bb[_0xee34ad(0x1c0)]);if(_0x5507bb['id'])_0x4dffc2['push'](_0xee34ad(0x1bb)+_0x5507bb['id']);if(_0x5507bb[_0xee34ad(0x1b5)])_0x4dffc2[_0xee34ad(0x1c2)](_0xee34ad(0x1c4)+_0x5507bb[_0xee34ad(0x1b5)]);if(_0x5507bb['params'])_0x4dffc2['push']('params='+_0x5507bb[_0xee34ad(0x1ca)]);return _0x4dffc2['length']>0x0?_0x4dffc2[_0xee34ad(0x1b3)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58e88d,_0x285eee){const _0x1229cd=a52_0x4aba,_0x38815d=_0x58e88d();while(!![]){try{const _0x2c3874=parseInt(_0x1229cd(0xd0))/0x1*(parseInt(_0x1229cd(0xd2))/0x2)+-parseInt(_0x1229cd(0xc6))/0x3*(-parseInt(_0x1229cd(0xd1))/0x4)+-parseInt(_0x1229cd(0xc8))/0x5+-parseInt(_0x1229cd(0xca))/0x6+parseInt(_0x1229cd(0xc9))/0x7+parseInt(_0x1229cd(0xcf))/0x8*(-parseInt(_0x1229cd(0xcb))/0x9)+-parseInt(_0x1229cd(0xce))/0xa*(-parseInt(_0x1229cd(0xcc))/0xb);if(_0x2c3874===_0x285eee)break;else _0x38815d['push'](_0x38815d['shift']());}catch(_0x51edd){_0x38815d['push'](_0x38815d['shift']());}}}(a52_0x5565,0x19fba));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x102ab1){if(_0x102ab1 instanceof LovrabetError)return CliErrors['validation'](userFacingLovrabetMessage(_0x102ab1));return _0x102ab1;}function a52_0x4aba(_0x23b79f,_0x50469b){_0x23b79f=_0x23b79f-0xc6;const _0x55656e=a52_0x5565();let _0x4aba5=_0x55656e[_0x23b79f];return _0x4aba5;}function a52_0x5565(){const _0x19c1af=['5ouFmca','567500EVyYKB','64136pidhvn','trim','description','3jOXypZ','stringify','487245IfuZvo','394366AnFbfB','1274070uCSUzC','1719639ycnIUF','195437jeLPUJ','string','140tkWVSD','8pngMxo'];a52_0x5565=function(){return _0x19c1af;};return a52_0x5565();}function userFacingLovrabetMessage(_0x27e975){const _0x57a732=a52_0x4aba,_0x23d62f=_0x27e975[_0x57a732(0xd4)];if(_0x23d62f!==undefined&&_0x23d62f!==null){if(typeof _0x23d62f===_0x57a732(0xcd)&&_0x23d62f[_0x57a732(0xd3)]())return _0x23d62f[_0x57a732(0xd3)]();try{return JSON[_0x57a732(0xc7)](_0x23d62f);}catch{}}return _0x27e975['message'];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0x5ccc75=a53_0x8617;(function(_0x2e1b52,_0x29bfdc){const _0x9d546f=a53_0x8617,_0x3d81cf=_0x2e1b52();while(!![]){try{const _0x19b382=-parseInt(_0x9d546f(0x1e9))/0x1+parseInt(_0x9d546f(0x1db))/0x2+parseInt(_0x9d546f(0x1da))/0x3+-parseInt(_0x9d546f(0x1ee))/0x4+parseInt(_0x9d546f(0x1e8))/0x5+parseInt(_0x9d546f(0x1d5))/0x6*(parseInt(_0x9d546f(0x1e6))/0x7)+-parseInt(_0x9d546f(0x1dc))/0x8;if(_0x19b382===_0x29bfdc)break;else _0x3d81cf['push'](_0x3d81cf['shift']());}catch(_0x395c95){_0x3d81cf['push'](_0x3d81cf['shift']());}}}(a53_0x3c78,0x1aed7));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';function a53_0x8617(_0x332611,_0x2403b4){_0x332611=_0x332611-0x1d3;const _0x3c78ed=a53_0x3c78();let _0x8617cc=_0x3c78ed[_0x332611];return _0x8617cc;}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';function a53_0x3c78(){const _0x3d5297=['pageSize','accessKey','Set\x20accessKey\x20in\x20.lovrabet.json\x20or\x20pass\x20LOVRABET_ACCESS_KEY.','492LNlHjE','defaultPageSize','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20.lovrabet.json.','High-risk\x20operation\x20`','format','297897hkmEIU','180654QihLTF','1148752WREXEN','requiresAuth','env','defaultVerbose','production','authRequired','appCode','map','service','name','17528rZfIdd','cancelled','26000eeospN','118365UZWdSt','configMissing','../core/sdk-client.js','requiresAppCode','currentApp','111600GwvPss','riskLevel','command','../core/api-client.js','validation','error','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'];a53_0x3c78=function(){return _0x3d5297;};return a53_0x3c78();}import{mapUserFacingExecuteError}from'../framework/runner-error.js';export function resolveAuthMode(_0x45f20e){return void _0x45f20e,AUTH_MODE['ClientAk'];}export function createPipelineEnv(_0x31c497,_0x88ca4f){const _0x3520cb=a53_0x8617;return{'rawFlags':_0x88ca4f,'appCode':_0x31c497[_0x3520cb(0x1e2)]||process.env.RABETBASE_APPCODE||readAppCodeFromConfig(),'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x88ca4f),'defaultFormat':_0x31c497[_0x3520cb(0x1d9)],'defaultPageSize':_0x31c497[_0x3520cb(0x1f5)],'defaultVerbose':_0x31c497['verbose'],'riskLevel':_0x31c497[_0x3520cb(0x1ef)],'accessKey':_0x31c497[_0x3520cb(0x1d3)],'env':_0x31c497[_0x3520cb(0x1de)],'mergedCli':{'defaultApp':_0x31c497['defaultApp'],'currentApp':_0x31c497[_0x3520cb(0x1ed)],'appCode':_0x31c497[_0x3520cb(0x1e2)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x25e3fc=>PIPELINE_FLAG_NAMES['has'](_0x25e3fc[a53_0x5ccc75(0x1e5)]))[a53_0x5ccc75(0x1e3)](({name:_0x1cd802,type:_0x261408,description:_0x1072ad})=>({'name':_0x1cd802,'type':_0x261408,'description':_0x1072ad})),'formatOutput':formatOutput,'getCommandLabel'(_0xd76322){const _0x56d304=a53_0x5ccc75;return CLI_BIN_NAME+'\x20'+_0xd76322[_0x56d304(0x1e4)]+'\x20'+_0xd76322[_0x56d304(0x1f0)];},'riskPolicy':{'onViolation'(_0x28aa93){const _0x48f5eb=a53_0x5ccc75;console[_0x48f5eb(0x1f3)](_0x28aa93);},'createError'(_0x666883){const _0x4e1c5f=a53_0x5ccc75;return CliErrors[_0x4e1c5f(0x1e7)](_0x666883);}},async 'prepare'(_0x3a1e2d,_0x12dc24){const _0x5cf1f8=a53_0x5ccc75,_0x5d97ad=resolveAuthMode(_0x12dc24);if(_0x3a1e2d[_0x5cf1f8(0x1dd)]!==![]){if(!_0x12dc24['accessKey'])throw CliErrors[_0x5cf1f8(0x1e1)](_0x5cf1f8(0x1d4));const {setActiveAK:_0x45fc76}=await import(_0x5cf1f8(0x1f1));_0x45fc76(_0x12dc24[_0x5cf1f8(0x1d3)]);}let _0x12c84f='';if(_0x3a1e2d[_0x5cf1f8(0x1ec)]!==![]){_0x12c84f=_0x12dc24[_0x5cf1f8(0x1e2)]??'';if(!_0x12c84f)throw CliErrors[_0x5cf1f8(0x1ea)](_0x5cf1f8(0x1d7));}if(_0x12c84f){const {initSdkClient:_0x5401b4}=await import(_0x5cf1f8(0x1eb));_0x5401b4({'appCode':_0x12c84f,'env':_0x12dc24[_0x5cf1f8(0x1de)]??_0x5cf1f8(0x1e0),'accessKey':_0x12dc24[_0x5cf1f8(0x1d3)],'authMode':_0x5d97ad});}return{'defaults':{'booleans':{'verbose':_0x12dc24[_0x5cf1f8(0x1df)]},'numbers':{'pagesize':_0x12dc24[_0x5cf1f8(0x1d6)]}},'extras':{'appCode':_0x12c84f,'cookie':'','apiDomain':_0x12dc24['apiDomain'],'apiDir':'','accessKey':_0x12dc24[_0x5cf1f8(0x1d3)],'envName':_0x12dc24[_0x5cf1f8(0x1de)],'mergedCli':_0x12dc24['mergedCli']}};},async 'confirmHighRisk'({def:_0x1da230,env:_0x51f7b1,flags:_0x1e39bc,commandLabel:_0x3e1815}){const _0x4e606d=a53_0x5ccc75;if(_0x51f7b1['isNonInteractive']){const _0x5127ed=reconstructCommandArgv(_0x1da230,_0x1e39bc);throw CliErrors[_0x4e606d(0x1f2)](_0x4e606d(0x1d8)+_0x3e1815+_0x4e606d(0x1f4)+('\x20\x20To\x20proceed:\x20'+_0x5127ed));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x1da230,_0x3e1815,_0x1e39bc),'createCancelledError':_0x57e1a9=>CliErrors[_0x4e606d(0x1e7)](_0x57e1a9)});},'mapDryRunError'(_0x1df218){return mapUserFacingExecuteError(_0x1df218);},'mapExecuteError'(_0x1fd9fd){return mapUserFacingExecuteError(_0x1fd9fd);},async 'finalize'(){const _0x26549e=a53_0x5ccc75,{clearActiveAK:_0x4883ed}=await import(_0x26549e(0x1f1));_0x4883ed();}};export async function runCommand(_0x504455,_0x5995a2){await runCommandWithAdapter(_0x504455,_0x5995a2,runnerAdapter);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x43a117,_0x184c06){const _0x427e3a=a54_0x1e72,_0x111de5=_0x43a117();while(!![]){try{const _0x1dfb76=-parseInt(_0x427e3a(0x1bd))/0x1+-parseInt(_0x427e3a(0x1bf))/0x2+parseInt(_0x427e3a(0x1b9))/0x3*(-parseInt(_0x427e3a(0x1bc))/0x4)+-parseInt(_0x427e3a(0x1ba))/0x5+-parseInt(_0x427e3a(0x1be))/0x6+-parseInt(_0x427e3a(0x1c1))/0x7*(parseInt(_0x427e3a(0x1c3))/0x8)+-parseInt(_0x427e3a(0x1c0))/0x9*(-parseInt(_0x427e3a(0x1bb))/0xa);if(_0x1dfb76===_0x184c06)break;else _0x111de5['push'](_0x111de5['shift']());}catch(_0x454626){_0x111de5['push'](_0x111de5['shift']());}}}(a54_0x8096,0xbd419));function a54_0x8096(){const _0x2ccfdd=['8vtgkeU','3vjzYdj','7485935IRoIMS','480bhIaKm','4248628WnydBy','39369DkkWKs','4127040zRKVUK','2959272fXvOcz','1321245cPkgGW','10536806kEDCgo','../commands/registry.js'];a54_0x8096=function(){return _0x2ccfdd;};return a54_0x8096();}import{buildSchemaPayload as a54_0x2568f6}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a54_0x1e72(_0x483ac,_0x275b26){_0x483ac=_0x483ac-0x1b9;const _0x80968d=a54_0x8096();let _0x1e7268=_0x80968d[_0x483ac];return _0x1e7268;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x2703dc=a54_0x1e72,{serviceRegistry:_0x3ec6bc,findDefinition:_0x1757cc}=await import(_0x2703dc(0x1c2));return a54_0x2568f6({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x3ec6bc,'buildAllFlags':buildAllFlags,'findDefinition':_0x1757cc});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a55_0x231c(_0x1e0d66,_0x2a3f29){_0x1e0d66=_0x1e0d66-0xcd;var _0x4dd6b6=a55_0x4dd6();var _0x231cb3=_0x4dd6b6[_0x1e0d66];return _0x231cb3;}(function(_0x4d12a6,_0x34fc87){var _0x31eb6f=a55_0x231c,_0x13171e=_0x4d12a6();while(!![]){try{var _0x18b92c=-parseInt(_0x31eb6f(0xd5))/0x1+parseInt(_0x31eb6f(0xd3))/0x2+parseInt(_0x31eb6f(0xcf))/0x3+parseInt(_0x31eb6f(0xd1))/0x4*(parseInt(_0x31eb6f(0xd2))/0x5)+-parseInt(_0x31eb6f(0xce))/0x6+-parseInt(_0x31eb6f(0xd0))/0x7*(-parseInt(_0x31eb6f(0xcd))/0x8)+-parseInt(_0x31eb6f(0xd4))/0x9;if(_0x18b92c===_0x34fc87)break;else _0x13171e['push'](_0x13171e['shift']());}catch(_0x228f7d){_0x13171e['push'](_0x13171e['shift']());}}}(a55_0x4dd6,0x441f1));function a55_0x4dd6(){var _0x2ef07f=['344230SDvzet','1306472gWAvbb','972042ndBVjg','1623441EsFBct','7fWeXuZ','4RRmtYX','2653680cLHCLf','94932HgMClh','4476564kchyBd'];a55_0x4dd6=function(){return _0x2ef07f;};return a55_0x4dd6();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3ef222,_0x5d9eeb){const _0xb8363b=a56_0x1013,_0x2882c9=_0x3ef222();while(!![]){try{const _0x335dc7=parseInt(_0xb8363b(0x156))/0x1*(parseInt(_0xb8363b(0x149))/0x2)+-parseInt(_0xb8363b(0x14a))/0x3*(-parseInt(_0xb8363b(0x14d))/0x4)+-parseInt(_0xb8363b(0x14f))/0x5*(parseInt(_0xb8363b(0x154))/0x6)+parseInt(_0xb8363b(0x150))/0x7*(parseInt(_0xb8363b(0x155))/0x8)+parseInt(_0xb8363b(0x14c))/0x9*(-parseInt(_0xb8363b(0x152))/0xa)+-parseInt(_0xb8363b(0x153))/0xb+parseInt(_0xb8363b(0x14e))/0xc*(parseInt(_0xb8363b(0x151))/0xd);if(_0x335dc7===_0x5d9eeb)break;else _0x2882c9['push'](_0x2882c9['shift']());}catch(_0x406bb9){_0x2882c9['push'](_0x2882c9['shift']());}}}(a56_0x5bfe,0x6b695));import{jsx as a56_0x2e7ad3,jsxs as a56_0x1b17d7}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a56_0x5bfe(){const _0xd1ad68=['\x20--help','792798IjpBwj','5505YNRgQl','column','3331206qpTdbr','1028AOChQy','5847276vhhJvH','15McEmgZ','259014ZImpWs','13GgsGbE','10SZjfQc','2073401PuZPim','935382KBoNuO','24NybODM','1puoNGI','\x20to\x20view\x20available\x20commands.','\x20\x20Use\x20'];a56_0x5bfe=function(){return _0xd1ad68;};return a56_0x5bfe();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a56_0x1013(_0x388cfd,_0x568e2d){_0x388cfd=_0x388cfd-0x149;const _0x5bfef6=a56_0x5bfe();let _0x10139e=_0x5bfef6[_0x388cfd];return _0x10139e;}export function Help(){const _0x121010=a56_0x1013,{exit:_0x1b5b52}=useApp();return useEffect(()=>{_0x1b5b52();},[_0x1b5b52]),a56_0x1b17d7(Box,{'flexDirection':_0x121010(0x14b),'marginTop':0x1,'marginBottom':0x1,'children':[a56_0x2e7ad3(Box,{'children':a56_0x2e7ad3(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a56_0x1b17d7(Box,{'marginTop':0x1,'children':[a56_0x2e7ad3(Text,{'dimColor':!![],'children':_0x121010(0x158)}),a56_0x2e7ad3(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x121010(0x159)}),a56_0x2e7ad3(Text,{'dimColor':!![],'children':_0x121010(0x157)})]})]});}
|