@lovrabet/lovrabet-cli 2.0.1 → 2.0.2
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/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/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/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.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/commands/init/index.js +0 -1
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a33_0x29d04d=a33_0x4b42;(function(_0x1f2e57,_0x281fb0){const _0x57d5b8=a33_0x4b42,_0xfc8eb8=_0x1f2e57();while(!![]){try{const _0x14c900=-parseInt(_0x57d5b8(0x19e))/0x1*(parseInt(_0x57d5b8(0x19d))/0x2)+-parseInt(_0x57d5b8(0x1a6))/0x3*(-parseInt(_0x57d5b8(0x19b))/0x4)+-parseInt(_0x57d5b8(0x1a5))/0x5*(parseInt(_0x57d5b8(0x1a1))/0x6)+parseInt(_0x57d5b8(0x19f))/0x7*(-parseInt(_0x57d5b8(0x19a))/0x8)+parseInt(_0x57d5b8(0x1a8))/0x9*(parseInt(_0x57d5b8(0x1a4))/0xa)+-parseInt(_0x57d5b8(0x1a2))/0xb+-parseInt(_0x57d5b8(0x19c))/0xc*(-parseInt(_0x57d5b8(0x199))/0xd);if(_0x14c900===_0x281fb0)break;else _0xfc8eb8['push'](_0xfc8eb8['shift']());}catch(_0x2e403d){_0xfc8eb8['push'](_0xfc8eb8['shift']());}}}(a33_0xa70c,0x919eb));export const RUNTIME_ENV_VALUES=[a33_0x29d04d(0x1a7),'development',a33_0x29d04d(0x1a3)];function a33_0xa70c(){const _0x4d881f=['1035UlWcmS','2660189igQprq','dev','4071294SmhVRF','9848487ZnDvSA','daily','1293340dkwEQN','5TfZQUm','1294311QaSbay','production','9YLMrzZ','832BHeDYN','8UUMtiq','4sDgEVt','433788YCqNeh','626VZEhCH'];a33_0xa70c=function(){return _0x4d881f;};return a33_0xa70c();}export function normalizeEnv(_0x3461e6){const _0x4983f8=a33_0x29d04d;return _0x3461e6==='online'?_0x4983f8(0x1a7):_0x3461e6;}export function isProduction(_0x3fd796){const _0x14bf93=a33_0x29d04d;return normalizeEnv(_0x3fd796)===_0x14bf93(0x1a7);}export function isDaily(_0x4c7a92){return normalizeEnv(_0x4c7a92)==='daily';}export function isDev(_0x2a8fd0){const _0x37e007=a33_0x29d04d,_0x31e8a8=normalizeEnv(_0x2a8fd0);return _0x31e8a8==='development'||_0x31e8a8===_0x37e007(0x1a0);}function a33_0x4b42(_0x2cdd67,_0x279358){_0x2cdd67=_0x2cdd67-0x199;const _0xa70c68=a33_0xa70c();let _0x4b42cc=_0xa70c68[_0x2cdd67];return _0x4b42cc;}let env=normalizeEnv(process.env.LOVRABET_ENV||a33_0x29d04d(0x1a7));export function getEnv(){return env;}export function initEnv(_0x1ae2d5){env=normalizeEnv(_0x1ae2d5);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x351987=a34_0x4787;(function(_0xbe074e,_0x31c71f){const _0xba9d43=a34_0x4787,_0x205b0c=_0xbe074e();while(!![]){try{const _0x3ee8c6=parseInt(_0xba9d43(0x128))/0x1+-parseInt(_0xba9d43(0x127))/0x2*(parseInt(_0xba9d43(0x121))/0x3)+parseInt(_0xba9d43(0x123))/0x4*(-parseInt(_0xba9d43(0x11e))/0x5)+parseInt(_0xba9d43(0x124))/0x6+-parseInt(_0xba9d43(0x122))/0x7+parseInt(_0xba9d43(0x11f))/0x8+parseInt(_0xba9d43(0x126))/0x9;if(_0x3ee8c6===_0x31c71f)break;else _0x205b0c['push'](_0x205b0c['shift']());}catch(_0x4d476e){_0x205b0c['push'](_0x205b0c['shift']());}}}(a34_0x5b0c,0xbedf8));export const OUTPUT_FORMAT_VALUES=['json',a34_0x351987(0x120),a34_0x351987(0x125)];function a34_0x4787(_0x2a8ba5,_0xb55261){_0x2a8ba5=_0x2a8ba5-0x11e;const _0x5b0c03=a34_0x5b0c();let _0x4787d7=_0x5b0c03[_0x2a8ba5];return _0x4787d7;}function a34_0x5b0c(){const _0x346709=['188335YoIVWh','15XUlyjP','9863296tmMvbo','pretty','2853rGLvup','6874147fqrExv','1327152CcgNNq','208092YgcNpA','compress','20879019HEWvrl','2138QnzjwL'];a34_0x5b0c=function(){return _0x346709;};return a34_0x5b0c();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a35_0x3016cf=a35_0x3275;function a35_0x110a(){const _0x4cc84f=['1109232kPeWMu','1107yPtxFF','1820022AHhViY','high-risk-write','7254444icQtli','1201236wUHaPj','read','4KOXNhw','89440nHwvuG','4967459cjxPdB','10vOlZTU','1180135EyIyef','80uWGxYK'];a35_0x110a=function(){return _0x4cc84f;};return a35_0x110a();}function a35_0x3275(_0x100d9a,_0x5b7165){_0x100d9a=_0x100d9a-0x179;const _0x110ae5=a35_0x110a();let _0x327522=_0x110ae5[_0x100d9a];return _0x327522;}(function(_0x58a6d8,_0xe869d8){const _0x439d27=a35_0x3275,_0x2cac68=_0x58a6d8();while(!![]){try{const _0x2d44d8=-parseInt(_0x439d27(0x181))/0x1+-parseInt(_0x439d27(0x17b))/0x2*(parseInt(_0x439d27(0x183))/0x3)+parseInt(_0x439d27(0x179))/0x4*(parseInt(_0x439d27(0x17e))/0x5)+parseInt(_0x439d27(0x185))/0x6+parseInt(_0x439d27(0x17d))/0x7+parseInt(_0x439d27(0x17c))/0x8*(parseInt(_0x439d27(0x182))/0x9)+parseInt(_0x439d27(0x180))/0xa*(-parseInt(_0x439d27(0x17f))/0xb);if(_0x2d44d8===_0xe869d8)break;else _0x2cac68['push'](_0x2cac68['shift']());}catch(_0x4dd585){_0x2cac68['push'](_0x2cac68['shift']());}}}(a35_0x110a,0xae389));export const RISK_LEVEL_VALUES=[a35_0x3016cf(0x17a),'write',a35_0x3016cf(0x184)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x5b7191=a37_0x4fb4;(function(_0x3b806c,_0x45913d){const _0x425113=a37_0x4fb4,_0x338b25=_0x3b806c();while(!![]){try{const _0x83ed85=-parseInt(_0x425113(0xd4))/0x1*(parseInt(_0x425113(0xe6))/0x2)+-parseInt(_0x425113(0x10e))/0x3*(-parseInt(_0x425113(0xf8))/0x4)+parseInt(_0x425113(0xd9))/0x5+-parseInt(_0x425113(0xff))/0x6*(-parseInt(_0x425113(0xe7))/0x7)+-parseInt(_0x425113(0xfa))/0x8*(parseInt(_0x425113(0xdc))/0x9)+-parseInt(_0x425113(0x10d))/0xa+-parseInt(_0x425113(0xe3))/0xb;if(_0x83ed85===_0x45913d)break;else _0x338b25['push'](_0x338b25['shift']());}catch(_0x34c0af){_0x338b25['push'](_0x338b25['shift']());}}}(a37_0x2f90,0xebe91));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';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=['.lovrabet.json','.lovrabetrc'];export const NEW_CONFIG_NAME=a37_0x5b7191(0xf4);function resolveConfigPath(_0x20d75f){for(const _0x21b398 of CONFIG_NAMES){const _0x197fce=resolve(_0x20d75f,_0x21b398);if(existsSync(_0x197fce))return _0x197fce;}return undefined;}export function resolveWriteConfigPath(_0x59d000){const _0x1e5486=a37_0x5b7191,_0x17de7d=_0x59d000===_0x1e5486(0xe9)?process[_0x1e5486(0x100)]():homedir(),_0x11fe9d=resolveConfigPath(_0x17de7d);return _0x11fe9d??resolve(_0x17de7d,NEW_CONFIG_NAME);}export function readConfigFile(_0x2eb695){const _0xf6696a=a37_0x5b7191;try{if(existsSync(_0x2eb695)){const _0x3759b5=readFileSync(_0x2eb695,{'encoding':_0xf6696a(0x108)});if(_0x3759b5){const _0xdc5222=JSON[_0xf6696a(0xe0)](_0x3759b5);return migrateOnlineEnv(_0x2eb695,_0xdc5222),_0xdc5222;}}}catch{}return{};}function migrateOnlineEnv(_0x18754f,_0x4e88fe){const _0xb7aceb=a37_0x5b7191;let _0x2c8c1b=![];_0x4e88fe[_0xb7aceb(0xf1)]==='online'&&(_0x4e88fe['env']='production',_0x2c8c1b=!![]);if(_0x4e88fe[_0xb7aceb(0xf6)]&&typeof _0x4e88fe[_0xb7aceb(0xf6)]===_0xb7aceb(0xfc))for(const _0x2fd513 of Object[_0xb7aceb(0x110)](_0x4e88fe[_0xb7aceb(0xf6)])){_0x2fd513&&_0x2fd513[_0xb7aceb(0xf1)]===_0xb7aceb(0x10f)&&(_0x2fd513[_0xb7aceb(0xf1)]=_0xb7aceb(0xeb),_0x2c8c1b=!![]);}if(_0x2c8c1b)try{writeConfigFile(_0x18754f,_0x4e88fe);}catch{}}export function writeConfigFile(_0x23979a,_0x3856a2){const _0x7c9f7a=a37_0x5b7191,_0x4be669=dirname(_0x23979a);!existsSync(_0x4be669)&&mkdirSync(_0x4be669,{'recursive':!![]});const _0x160dc1=_0x23979a+_0x7c9f7a(0xdd);try{writeFileSync(_0x160dc1,JSON[_0x7c9f7a(0x115)](_0x3856a2,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x160dc1,_0x23979a);}catch(_0xed1725){if(_0xed1725[_0x7c9f7a(0xd6)]==='EPERM'||_0xed1725[_0x7c9f7a(0xd6)]===_0x7c9f7a(0x106)||_0xed1725[_0x7c9f7a(0xd6)]===_0x7c9f7a(0xdb)){writeFileSync(_0x23979a,JSON[_0x7c9f7a(0x115)](_0x3856a2,null,0x2)+'\x0a',{'encoding':_0x7c9f7a(0x108)});try{unlinkSync(_0x160dc1);}catch{}}else throw _0xed1725;}}catch(_0x3a6baa){try{unlinkSync(_0x160dc1);}catch{}throw _0x3a6baa;}}export function isNonInteractiveMode(_0x119f63){const _0x5414e8=a37_0x5b7191;return!!(_0x119f63[_0x5414e8(0x113)]||_0x119f63['ci']||process.env.LOVRABET_CI===_0x5414e8(0xfd)||process.env.RABETBASE_CI===_0x5414e8(0xfd)||process.env.LOVRABET_CI===_0x5414e8(0xfd)||process.env.CI==='true'||!process['stdout'][_0x5414e8(0x112)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x56b919=a37_0x5b7191;if(!process['stdin'][_0x56b919(0x112)])return![];try{const _0x369925=process['stdin'][_0x56b919(0xe8)];return process[_0x56b919(0x114)][_0x56b919(0xd8)](!![]),process[_0x56b919(0x114)]['setRawMode'](_0x369925??![]),!![];}catch{return![];}}export async function createContext(_0x34caba){const _0x31c2ef=a37_0x5b7191,_0x54af71=readRawConfig(),_0x167c05=buildConfig(_0x54af71,_0x34caba);await initGlobalEnvironment(_0x167c05);const {getUserDomain:_0x4a7211,getApiDomain:_0x381528}=await import(_0x31c2ef(0xfb)),_0x513ed6={'apiDomain':_0x381528(),'userDomain':_0x4a7211()},_0x30ce73=await buildAuth(_0x167c05);logger['setLogPath'](process[_0x31c2ef(0x100)]());const _0x1a5dff=(CLI_BIN_NAME+'\x20'+process[_0x31c2ef(0xec)][_0x31c2ef(0xf7)](0x2)['join']('\x20'))[_0x31c2ef(0x107)]();logger['setRawCommand'](_0x1a5dff);const _0x441792=isNonInteractiveMode(_0x34caba);return{'config':_0x167c05,'auth':_0x30ce73,'logger':logger,'env':_0x513ed6,'nonInteractive':_0x441792};}export function buildConfigFromFlags(_0x506e0e){return buildConfig(readRawConfig(),_0x506e0e);}export function readAppCodeFromConfig(){const _0x3d1960=a37_0x5b7191,_0x5e908a=readRawConfig(),_0x5e091d=_0x5e908a[_0x3d1960(0x10b)]??_0x5e908a[_0x3d1960(0xda)];if(typeof _0x5e091d===_0x3d1960(0xf3)&&_0x5e091d['trim']())return _0x5e091d['trim']();const _0x16915d=_0x5e908a[_0x3d1960(0xf6)]&&typeof _0x5e908a[_0x3d1960(0xf6)]===_0x3d1960(0xfc)?_0x5e908a[_0x3d1960(0xf6)]:{},_0x16149b=_0x5e908a[_0x3d1960(0xe1)]?_0x16915d[_0x5e908a[_0x3d1960(0xe1)]]:undefined;if(_0x16149b?.[_0x3d1960(0x10b)])return String(_0x16149b['appcode'])[_0x3d1960(0x107)]();const _0x211d39=normalizeEnv(String(_0x5e908a[_0x3d1960(0xf1)]||_0x3d1960(0xeb))),_0x31b026=isDaily(_0x211d39)?'daily':isDev(_0x211d39)?_0x3d1960(0xe2):_0x3d1960(0xeb),_0x595afe=resolveCachedAppCode(typeof _0x5e908a['defaultApp']===_0x3d1960(0xf3)?_0x5e908a[_0x3d1960(0xe1)]:undefined,_0x31b026,typeof _0x5e908a[_0x3d1960(0xee)]==='string'?_0x5e908a[_0x3d1960(0xee)]:undefined);if(_0x595afe)return _0x595afe;const _0x2e324e=Object[_0x3d1960(0x110)](_0x16915d)[_0x3d1960(0xf9)](_0xf53e23=>_0xf53e23?.['appcode']);return _0x2e324e?.[_0x3d1960(0x10b)]?String(_0x2e324e['appcode'])[_0x3d1960(0x107)]():undefined;}export function readScopedConfig(_0x2bced9){const _0x3d5eee=a37_0x5b7191,_0x59df00=_0x2bced9[_0x3d5eee(0xed)]?_0x3d5eee(0xed):'project';return readConfigFile(resolveWriteConfigPath(_0x59df00));}export function writeScopedConfig(_0x2b9606,_0x32d34b){const _0x43a50e=a37_0x5b7191,_0x53ded2=_0x32d34b[_0x43a50e(0xed)]?_0x43a50e(0xed):_0x43a50e(0xe9);writeConfigFile(resolveWriteConfigPath(_0x53ded2),_0x2b9606);}export async function initGlobalEnvironment(_0x516309){const _0x1100e3=a37_0x5b7191,{initEnv:_0x356df9}=await import(_0x1100e3(0xd7));_0x356df9(_0x516309['env']);const {initDomains:_0x350335}=await import(_0x1100e3(0xfb));_0x350335({'apiDomain':_0x516309[_0x1100e3(0xea)][_0x1100e3(0xe4)]||_0x516309['raw']['host']||undefined,'userDomain':_0x516309[_0x1100e3(0xea)][_0x1100e3(0x109)]||undefined,'runtimeDomain':_0x516309[_0x1100e3(0xea)]['runtimeDomain']||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x244a2a){const _0x3cdf67=a37_0x5b7191;if(!existsSync(_0x244a2a))return{'status':_0x3cdf67(0xfe)};try{const _0x220022=readFileSync(_0x244a2a,{'encoding':_0x3cdf67(0x108)});if(!_0x220022?.[_0x3cdf67(0x107)]())return{'status':_0x3cdf67(0xe5)};const _0x2019ea=JSON['parse'](_0x220022);return{'status':'ok','data':_0x2019ea};}catch(_0xc51268){return{'status':_0x3cdf67(0x103),'message':_0xc51268 instanceof Error?_0xc51268['message']:String(_0xc51268)};}}export function loadRawConfigLayers(_0x4001fa){const _0x26a3f4=a37_0x5b7191;let _0x1d84aa={},_0x7bffc5={},_0x5041b1,_0x227927;try{_0x5041b1=resolveConfigPath(homedir());if(_0x5041b1){const _0x3126c7=readFileSync(_0x5041b1,{'encoding':_0x26a3f4(0x108)});if(_0x3126c7)_0x1d84aa=JSON['parse'](_0x3126c7);}}catch{}try{const _0x4105fc=_0x4001fa||process[_0x26a3f4(0x100)]();_0x227927=resolveConfigPath(_0x4105fc);if(_0x227927){const _0x1effaa=readFileSync(_0x227927,{'encoding':'utf8'});if(_0x1effaa)_0x7bffc5=JSON['parse'](_0x1effaa);}}catch{}return{'globalPath':_0x5041b1,'projectPath':_0x227927,'globalConfig':_0x1d84aa,'projectConfig':_0x7bffc5};}function mergeRawConfigLayers(_0x37a8a8){const _0x5abfca=a37_0x5b7191,{globalConfig:_0x108efc,projectConfig:_0x2bf1d3}=_0x37a8a8;if(_0x2bf1d3[_0x5abfca(0x104)]===![]){const _0x1325eb={..._0x2bf1d3};return delete _0x1325eb[_0x5abfca(0x104)],_0x1325eb;}const _0x250ba4={..._0x108efc,..._0x2bf1d3};if('defaultApp'in _0x2bf1d3)_0x250ba4['defaultApp']=_0x2bf1d3[_0x5abfca(0xe1)];else _0x108efc[_0x5abfca(0xe1)]&&(_0x250ba4[_0x5abfca(0xe1)]=_0x108efc[_0x5abfca(0xe1)]);return _0x250ba4;}export function isInProject(){return!!getProjectConfigPath();}function a37_0x2f90(){const _0x120f12=['141414FtvnHg','isRaw','project','raw','production','argv','global','accessKey','format','ACCESS_KEY','env','locale','string','.lovrabet.json','write','apps','slice','1502768cMBffp','find','2384LwdCct','./constant/domain.js','object','true','missing','84NrqfRZ','cwd','daily','pageSize','error','inherit','maxRisk','EXDEV','trim','utf8','userDomain','ENV','appcode','read','3865150dwIAPh','9oGdCzF','online','values','projectConfig','isTTY','nonInteractive','stdin','stringify','19YfDzIv','APPCODE','code','./constant/env.js','setRawMode','8515325YmVCFk','app','EACCES','47592cayhAZ','.tmp','high-risk-write','PAGE_SIZE','parse','defaultApp','development','938861zWiJzq','apiDomain','empty','10420LLSfLZ'];a37_0x2f90=function(){return _0x120f12;};return a37_0x2f90();}export function readRawConfig(_0x110ba9){return mergeRawConfigLayers(loadRawConfigLayers(_0x110ba9));}export function readRawConfigWithLayers(_0x123b6c){const _0x2ff088=loadRawConfigLayers(_0x123b6c);return{'config':mergeRawConfigLayers(_0x2ff088),'layers':_0x2ff088};}function a37_0x4fb4(_0x5c25f2,_0x75144b){_0x5c25f2=_0x5c25f2-0xd4;const _0x2f9017=a37_0x2f90();let _0x4fb48a=_0x2f9017[_0x5c25f2];return _0x4fb48a;}export function resolveDefaultAppSource(_0xa796a8){const _0x31b334=a37_0x5b7191;if(_0x31b334(0xe1)in _0xa796a8[_0x31b334(0x111)])return _0x31b334(0xe9);if(_0xa796a8[_0x31b334(0x111)][_0x31b334(0x104)]===![])return null;if(_0xa796a8['globalConfig'][_0x31b334(0xe1)])return _0x31b334(0xed);return null;}function buildConfig(_0x142ea3,_0xf3af37){const _0x306e64=a37_0x5b7191,_0x34f2b0=_0x142ea3[_0x306e64(0xe1)]||undefined,_0x1d7b0e=_0xf3af37['app']||env('APP')||undefined,_0x7abd24=_0x1d7b0e||_0x34f2b0||undefined,_0x222a69=env(_0x306e64(0xf0))||_0x142ea3[_0x306e64(0xee)]||undefined,_0x935d4b=_0xf3af37[_0x306e64(0xf1)]||env(_0x306e64(0x10a))||_0x142ea3[_0x306e64(0xf1)]||DEFAULT_CONFIG_VALUES[_0x306e64(0xf1)],_0x11d86a=normalizeEnv(String(_0x935d4b)),_0x374298=isDaily(_0x11d86a)?_0x306e64(0x101):isDev(_0x11d86a)?_0x306e64(0xe2):_0x306e64(0xeb),_0xadd6c7=resolveCachedAppCode(_0x7abd24,_0x374298,_0x222a69),_0x4274bd=_0xf3af37[_0x306e64(0x10b)]||env(_0x306e64(0xd5))||_0xadd6c7||_0x142ea3[_0x306e64(0x10b)]||_0x142ea3[_0x306e64(0xda)]||undefined,_0x5c98cc=_0x142ea3[_0x306e64(0xf2)]||DEFAULT_CONFIG_VALUES[_0x306e64(0xf2)],_0x38bbc8=undefined,_0x2c95e1=_0xf3af37[_0x306e64(0xef)]||env('FORMAT')||_0x142ea3['format'],_0x138b05=normalizeLegacyOutputFormat(_0x2c95e1),_0x309f41=env(_0x306e64(0xdf))||_0x142ea3[_0x306e64(0x102)],_0xee2436=_0x309f41?Number(_0x309f41)||undefined:undefined,_0x132428=_0x142ea3['riskLevel']||_0x142ea3[_0x306e64(0x105)],_0x5214d4=_0x132428===_0x306e64(0x10c)||_0x132428===_0x306e64(0xf5)||_0x132428===_0x306e64(0xde)?_0x132428:DEFAULT_CONFIG_VALUES['riskLevel'],_0x38bc12=env('VERBOSE'),_0x2bd74a=_0x38bc12==='1'||_0x38bc12==='true';return{'appCode':typeof _0x4274bd===_0x306e64(0xf3)&&_0x4274bd[_0x306e64(0x107)]()?_0x4274bd[_0x306e64(0x107)]():undefined,'env':_0x374298,'locale':_0x5c98cc,'cookie':_0x38bbc8,'accessKey':_0x222a69,'format':_0x138b05,'pageSize':_0xee2436,'riskLevel':_0x5214d4,'verbose':_0x2bd74a,'defaultApp':_0x34f2b0,'currentApp':typeof _0x7abd24==='string'?_0x7abd24:undefined,'raw':_0x142ea3};}function env(_0x1fcb83){return process.env[`LOVRABET_${_0x1fcb83}`]||undefined;}async function buildAuth(_0x2bda1f){const _0x28f2d7='',_0xe3946f=!!_0x2bda1f['accessKey'];return{'cookie':_0x28f2d7,'isLoggedIn':_0xe3946f,async 'getOrLogin'(){if(_0xe3946f)return _0x28f2d7;throw CliErrors['authRequired']();}};}
|
|
1
|
+
const a36_0x5728e6=a36_0x3220;(function(_0x2ab86d,_0x25c5cb){const _0x24251f=a36_0x3220,_0x2f4ef9=_0x2ab86d();while(!![]){try{const _0x2481b9=parseInt(_0x24251f(0x162))/0x1+parseInt(_0x24251f(0x199))/0x2+-parseInt(_0x24251f(0x179))/0x3+parseInt(_0x24251f(0x178))/0x4+parseInt(_0x24251f(0x198))/0x5+parseInt(_0x24251f(0x172))/0x6*(-parseInt(_0x24251f(0x193))/0x7)+parseInt(_0x24251f(0x180))/0x8;if(_0x2481b9===_0x25c5cb)break;else _0x2f4ef9['push'](_0x2f4ef9['shift']());}catch(_0x2bbd24){_0x2f4ef9['push'](_0x2f4ef9['shift']());}}}(a36_0x324c,0x74598));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';function a36_0x3220(_0x39b544,_0x32ac00){_0x39b544=_0x39b544-0x15d;const _0x324c6b=a36_0x324c();let _0x3220b5=_0x324c6b[_0x39b544];return _0x3220b5;}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=[a36_0x5728e6(0x168),a36_0x5728e6(0x18f)];export const NEW_CONFIG_NAME=a36_0x5728e6(0x168);function resolveConfigPath(_0x180a0a){for(const _0x4791d7 of CONFIG_NAMES){const _0x5c1574=resolve(_0x180a0a,_0x4791d7);if(existsSync(_0x5c1574))return _0x5c1574;}return undefined;}export function resolveWriteConfigPath(_0x3ef783){const _0x487697=a36_0x5728e6,_0x422e1d=_0x3ef783===_0x487697(0x175)?process[_0x487697(0x166)]():homedir(),_0x101826=resolveConfigPath(_0x422e1d);return _0x101826??resolve(_0x422e1d,NEW_CONFIG_NAME);}export function readConfigFile(_0x3652a7){const _0x5a57b1=a36_0x5728e6;try{if(existsSync(_0x3652a7)){const _0x32bea3=readFileSync(_0x3652a7,{'encoding':_0x5a57b1(0x177)});if(_0x32bea3){const _0x4db8b2=JSON['parse'](_0x32bea3);return migrateOnlineEnv(_0x3652a7,_0x4db8b2),_0x4db8b2;}}}catch{}return{};}function migrateOnlineEnv(_0x5a1145,_0x44166d){const _0x548570=a36_0x5728e6;let _0x29b7e8=![];_0x44166d[_0x548570(0x191)]===_0x548570(0x186)&&(_0x44166d[_0x548570(0x191)]=_0x548570(0x165),_0x29b7e8=!![]);if(_0x44166d[_0x548570(0x174)]&&typeof _0x44166d[_0x548570(0x174)]===_0x548570(0x16a))for(const _0x58004b of Object[_0x548570(0x197)](_0x44166d[_0x548570(0x174)])){_0x58004b&&_0x58004b[_0x548570(0x191)]==='online'&&(_0x58004b['env']=_0x548570(0x165),_0x29b7e8=!![]);}if(_0x29b7e8)try{writeConfigFile(_0x5a1145,_0x44166d);}catch{}}export function writeConfigFile(_0x26aae8,_0x3d9f4b){const _0xd4e93=a36_0x5728e6,_0x34751f=dirname(_0x26aae8);!existsSync(_0x34751f)&&mkdirSync(_0x34751f,{'recursive':!![]});const _0xfa21fc=_0x26aae8+_0xd4e93(0x17b);try{writeFileSync(_0xfa21fc,JSON['stringify'](_0x3d9f4b,null,0x2)+'\x0a',{'encoding':_0xd4e93(0x177),'mode':0x180});try{renameSync(_0xfa21fc,_0x26aae8);}catch(_0xec468e){if(_0xec468e[_0xd4e93(0x196)]===_0xd4e93(0x15f)||_0xec468e[_0xd4e93(0x196)]===_0xd4e93(0x17e)||_0xec468e['code']===_0xd4e93(0x17c)){writeFileSync(_0x26aae8,JSON[_0xd4e93(0x16c)](_0x3d9f4b,null,0x2)+'\x0a',{'encoding':_0xd4e93(0x177)});try{unlinkSync(_0xfa21fc);}catch{}}else throw _0xec468e;}}catch(_0x1c56d7){try{unlinkSync(_0xfa21fc);}catch{}throw _0x1c56d7;}}export function isNonInteractiveMode(_0xc24276){const _0x56cf8a=a36_0x5728e6;return!!(_0xc24276[_0x56cf8a(0x187)]||_0xc24276['ci']||process.env.LOVRABET_CI===_0x56cf8a(0x19a)||process.env.RABETBASE_CI==='true'||process.env.LOVRABET_CI===_0x56cf8a(0x19a)||process.env.CI===_0x56cf8a(0x19a)||!process['stdout'][_0x56cf8a(0x182)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x482b46=a36_0x5728e6;if(!process[_0x482b46(0x18a)][_0x482b46(0x182)])return![];try{const _0x53abc1=process[_0x482b46(0x18a)]['isRaw'];return process[_0x482b46(0x18a)]['setRawMode'](!![]),process[_0x482b46(0x18a)][_0x482b46(0x181)](_0x53abc1??![]),!![];}catch{return![];}}export async function createContext(_0xe0cb32){const _0x32bd16=a36_0x5728e6,_0x3deaaf=readRawConfig(),_0x3f94f4=buildConfig(_0x3deaaf,_0xe0cb32);await initGlobalEnvironment(_0x3f94f4);const {getUserDomain:_0x3150ac,getApiDomain:_0xc754e5}=await import(_0x32bd16(0x192)),_0x3dd79e={'apiDomain':_0xc754e5(),'userDomain':_0x3150ac()},_0x30d46b=await buildAuth(_0x3f94f4);logger['setLogPath'](process['cwd']());const _0x197a4c=(CLI_BIN_NAME+'\x20'+process[_0x32bd16(0x184)][_0x32bd16(0x189)](0x2)[_0x32bd16(0x16d)]('\x20'))[_0x32bd16(0x18d)]();logger['setRawCommand'](_0x197a4c);const _0xcc91ec=isNonInteractiveMode(_0xe0cb32);return{'config':_0x3f94f4,'auth':_0x30d46b,'logger':logger,'env':_0x3dd79e,'nonInteractive':_0xcc91ec};}export function buildConfigFromFlags(_0x169ee6){return buildConfig(readRawConfig(),_0x169ee6);}export function readAppCodeFromConfig(){const _0x392b0f=a36_0x5728e6,_0x1c2010=readRawConfig(),_0x379d63=_0x1c2010[_0x392b0f(0x170)]??_0x1c2010['app'];if(typeof _0x379d63===_0x392b0f(0x17f)&&_0x379d63[_0x392b0f(0x18d)]())return _0x379d63[_0x392b0f(0x18d)]();const _0x5aa7d7=_0x1c2010[_0x392b0f(0x174)]&&typeof _0x1c2010['apps']===_0x392b0f(0x16a)?_0x1c2010[_0x392b0f(0x174)]:{},_0x30bf58=_0x1c2010['defaultApp']?_0x5aa7d7[_0x1c2010['defaultApp']]:undefined;if(_0x30bf58?.[_0x392b0f(0x170)])return String(_0x30bf58[_0x392b0f(0x170)])['trim']();const _0x427270=normalizeEnv(String(_0x1c2010['env']||_0x392b0f(0x165))),_0x51f5b0=isDaily(_0x427270)?_0x392b0f(0x188):isDev(_0x427270)?'development':'production',_0xcdc903=resolveCachedAppCode(typeof _0x1c2010[_0x392b0f(0x16e)]===_0x392b0f(0x17f)?_0x1c2010[_0x392b0f(0x16e)]:undefined,_0x51f5b0,typeof _0x1c2010[_0x392b0f(0x19c)]==='string'?_0x1c2010['accessKey']:undefined);if(_0xcdc903)return _0xcdc903;const _0x473578=Object[_0x392b0f(0x197)](_0x5aa7d7)['find'](_0x49e5c2=>_0x49e5c2?.[_0x392b0f(0x170)]);return _0x473578?.[_0x392b0f(0x170)]?String(_0x473578[_0x392b0f(0x170)])[_0x392b0f(0x18d)]():undefined;}export function readScopedConfig(_0x8edfe8){const _0x29f9aa=a36_0x5728e6,_0x269254=_0x8edfe8[_0x29f9aa(0x15d)]?'global':_0x29f9aa(0x175);return readConfigFile(resolveWriteConfigPath(_0x269254));}export function writeScopedConfig(_0x3c2031,_0xf5313e){const _0x1b7bc5=a36_0x5728e6,_0x217af2=_0xf5313e['global']?'global':_0x1b7bc5(0x175);writeConfigFile(resolveWriteConfigPath(_0x217af2),_0x3c2031);}function a36_0x324c(){const _0x1db1dc=['EACCES','FORMAT','EXDEV','string','1957536AjHkJX','setRawMode','isTTY','error','argv','development','online','nonInteractive','daily','slice','stdin','missing','inherit','trim','APP','.lovrabetrc','VERBOSE','env','./constant/domain.js','11494vpJngh','high-risk-write','host','code','values','1606080SNRtxL','1744178eUeIdF','true','read','accessKey','global','format','EPERM','ACCESS_KEY','runtimeDomain','94347wJXRgq','raw','write','production','cwd','parse','.lovrabet.json','locale','object','userDomain','stringify','join','defaultApp','projectConfig','appcode','empty','1836sigvTy','riskLevel','apps','project','app','utf8','1115004ZuYgxj','2496225NHSkEM','APPCODE','.tmp'];a36_0x324c=function(){return _0x1db1dc;};return a36_0x324c();}export async function initGlobalEnvironment(_0xb7b263){const _0x1e3dfc=a36_0x5728e6,{initEnv:_0x42dbf5}=await import('./constant/env.js');_0x42dbf5(_0xb7b263[_0x1e3dfc(0x191)]);const {initDomains:_0x5bf5ba}=await import('./constant/domain.js');_0x5bf5ba({'apiDomain':_0xb7b263['raw']['apiDomain']||_0xb7b263[_0x1e3dfc(0x163)][_0x1e3dfc(0x195)]||undefined,'userDomain':_0xb7b263[_0x1e3dfc(0x163)][_0x1e3dfc(0x16b)]||undefined,'runtimeDomain':_0xb7b263[_0x1e3dfc(0x163)][_0x1e3dfc(0x161)]||undefined});}export function getProjectConfigPath(){const _0x3273a2=a36_0x5728e6;return resolveConfigPath(process[_0x3273a2(0x166)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x5561a8){const _0x158da7=a36_0x5728e6;if(!existsSync(_0x5561a8))return{'status':_0x158da7(0x18b)};try{const _0x3d23aa=readFileSync(_0x5561a8,{'encoding':_0x158da7(0x177)});if(!_0x3d23aa?.[_0x158da7(0x18d)]())return{'status':_0x158da7(0x171)};const _0xef99=JSON['parse'](_0x3d23aa);return{'status':'ok','data':_0xef99};}catch(_0xffe706){return{'status':_0x158da7(0x183),'message':_0xffe706 instanceof Error?_0xffe706['message']:String(_0xffe706)};}}export function loadRawConfigLayers(_0x1b6e95){const _0xc074b2=a36_0x5728e6;let _0x2cdb28={},_0xcabab3={},_0x2c406c,_0xb94825;try{_0x2c406c=resolveConfigPath(homedir());if(_0x2c406c){const _0x13c86a=readFileSync(_0x2c406c,{'encoding':'utf8'});if(_0x13c86a)_0x2cdb28=JSON[_0xc074b2(0x167)](_0x13c86a);}}catch{}try{const _0x721273=_0x1b6e95||process['cwd']();_0xb94825=resolveConfigPath(_0x721273);if(_0xb94825){const _0x36dd2c=readFileSync(_0xb94825,{'encoding':_0xc074b2(0x177)});if(_0x36dd2c)_0xcabab3=JSON[_0xc074b2(0x167)](_0x36dd2c);}}catch{}return{'globalPath':_0x2c406c,'projectPath':_0xb94825,'globalConfig':_0x2cdb28,'projectConfig':_0xcabab3};}function mergeRawConfigLayers(_0x19a9fe){const _0x14ee4b=a36_0x5728e6,{globalConfig:_0x42475d,projectConfig:_0x3363cb}=_0x19a9fe;if(_0x3363cb['inherit']===![]){const _0x4fe43c={..._0x3363cb};return delete _0x4fe43c[_0x14ee4b(0x18c)],_0x4fe43c;}const _0x23b27d={..._0x42475d,..._0x3363cb};if('defaultApp'in _0x3363cb)_0x23b27d[_0x14ee4b(0x16e)]=_0x3363cb[_0x14ee4b(0x16e)];else _0x42475d[_0x14ee4b(0x16e)]&&(_0x23b27d[_0x14ee4b(0x16e)]=_0x42475d[_0x14ee4b(0x16e)]);return _0x23b27d;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x56ee87){return mergeRawConfigLayers(loadRawConfigLayers(_0x56ee87));}export function readRawConfigWithLayers(_0x30d1ac){const _0xd2bb6=loadRawConfigLayers(_0x30d1ac);return{'config':mergeRawConfigLayers(_0xd2bb6),'layers':_0xd2bb6};}export function resolveDefaultAppSource(_0x1abdff){const _0x5063a2=a36_0x5728e6;if(_0x5063a2(0x16e)in _0x1abdff[_0x5063a2(0x16f)])return'project';if(_0x1abdff[_0x5063a2(0x16f)]['inherit']===![])return null;if(_0x1abdff['globalConfig'][_0x5063a2(0x16e)])return'global';return null;}function buildConfig(_0x25e8aa,_0x5e136d){const _0x1b6bca=a36_0x5728e6,_0xbbb5a4=_0x25e8aa['defaultApp']||undefined,_0x4ed42e=_0x5e136d[_0x1b6bca(0x176)]||env(_0x1b6bca(0x18e))||undefined,_0xe80642=_0x4ed42e||_0xbbb5a4||undefined,_0x29dc90=env(_0x1b6bca(0x160))||_0x25e8aa['accessKey']||undefined,_0x468902=_0x5e136d[_0x1b6bca(0x191)]||env('ENV')||_0x25e8aa[_0x1b6bca(0x191)]||DEFAULT_CONFIG_VALUES[_0x1b6bca(0x191)],_0x323ce4=normalizeEnv(String(_0x468902)),_0x1a97b5=isDaily(_0x323ce4)?_0x1b6bca(0x188):isDev(_0x323ce4)?_0x1b6bca(0x185):'production',_0x287469=resolveCachedAppCode(_0xe80642,_0x1a97b5,_0x29dc90),_0x5932e0=_0x5e136d[_0x1b6bca(0x170)]||env(_0x1b6bca(0x17a))||_0x287469||_0x25e8aa[_0x1b6bca(0x170)]||_0x25e8aa['app']||undefined,_0x126d43=_0x25e8aa[_0x1b6bca(0x169)]||DEFAULT_CONFIG_VALUES[_0x1b6bca(0x169)],_0x24903e=undefined,_0x12b8c6=_0x5e136d[_0x1b6bca(0x15e)]||env(_0x1b6bca(0x17d))||_0x25e8aa[_0x1b6bca(0x15e)],_0x294b1b=normalizeLegacyOutputFormat(_0x12b8c6),_0x4dab49=env('PAGE_SIZE')||_0x25e8aa['pageSize'],_0x407904=_0x4dab49?Number(_0x4dab49)||undefined:undefined,_0x321f03=_0x25e8aa[_0x1b6bca(0x173)]||_0x25e8aa['maxRisk'],_0x2a2207=_0x321f03===_0x1b6bca(0x19b)||_0x321f03===_0x1b6bca(0x164)||_0x321f03===_0x1b6bca(0x194)?_0x321f03:DEFAULT_CONFIG_VALUES[_0x1b6bca(0x173)],_0xbce43=env(_0x1b6bca(0x190)),_0x2cb2f0=_0xbce43==='1'||_0xbce43==='true';return{'appCode':typeof _0x5932e0===_0x1b6bca(0x17f)&&_0x5932e0['trim']()?_0x5932e0[_0x1b6bca(0x18d)]():undefined,'env':_0x1a97b5,'locale':_0x126d43,'cookie':_0x24903e,'accessKey':_0x29dc90,'format':_0x294b1b,'pageSize':_0x407904,'riskLevel':_0x2a2207,'verbose':_0x2cb2f0,'defaultApp':_0xbbb5a4,'currentApp':typeof _0xe80642==='string'?_0xe80642:undefined,'raw':_0x25e8aa};}function env(_0x4cb74b){return process.env[`LOVRABET_${_0x4cb74b}`]||undefined;}async function buildAuth(_0x142e54){const _0x1f72da=a36_0x5728e6,_0x517cfe='',_0x16c8ab=!!_0x142e54[_0x1f72da(0x19c)];return{'cookie':_0x517cfe,'isLoggedIn':_0x16c8ab,async 'getOrLogin'(){if(_0x16c8ab)return _0x517cfe;throw CliErrors['authRequired']();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46c323,_0x1dc65b){const _0x523fc5=a37_0x46bd,_0x2a4234=_0x46c323();while(!![]){try{const _0x4f0ddd=-parseInt(_0x523fc5(0x93))/0x1*(parseInt(_0x523fc5(0x83))/0x2)+parseInt(_0x523fc5(0xa0))/0x3+parseInt(_0x523fc5(0x9e))/0x4+-parseInt(_0x523fc5(0x80))/0x5*(-parseInt(_0x523fc5(0x88))/0x6)+parseInt(_0x523fc5(0x99))/0x7+parseInt(_0x523fc5(0x79))/0x8*(parseInt(_0x523fc5(0x87))/0x9)+-parseInt(_0x523fc5(0x7b))/0xa*(parseInt(_0x523fc5(0x90))/0xb);if(_0x4f0ddd===_0x1dc65b)break;else _0x2a4234['push'](_0x2a4234['shift']());}catch(_0x29a9ee){_0x2a4234['push'](_0x2a4234['shift']());}}}(a37_0x508e,0x2b84d));import{getRuntimeDomain}from'../constant/domain.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x5e6823){_activeAK=_0x5e6823||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x510465,_0x3a4e80={}){const _0x5c0439=a37_0x46bd,{method:method=_0x5c0439(0x7a),body:_0x2db646,headers:headers={},timeout:timeout=0x7530}=_0x3a4e80,_0x17f36e=_activeAK,_0x10bfa8=getRuntimeDomain();if(!_0x17f36e)throw CliErrors['authRequired'](_0x5c0439(0x78));const _0x38ef6c=''+_0x10bfa8+_0x510465,_0x470822={'X-User-AK':_0x17f36e},_0x44ffca=new AbortController(),_0x1a43bd=setTimeout(()=>_0x44ffca[_0x5c0439(0x92)](),timeout);try{const _0xe95ee6=await fetch(_0x38ef6c,{'method':method,'headers':{'Content-Type':_0x5c0439(0x74),'X-Invoke-Source':'cli:lovrabet-runtime',..._0x470822,...headers},'body':_0x2db646?JSON[_0x5c0439(0x77)](_0x2db646):undefined,'signal':_0x44ffca[_0x5c0439(0x89)]});let _0x1f7462;try{_0x1f7462=await _0xe95ee6['json']();}catch{throw CliErrors[_0x5c0439(0x7c)](_0x5c0439(0x85)+_0xe95ee6['status']+')',_0xe95ee6[_0x5c0439(0xa1)]>=0x190?_0x5c0439(0x9c):undefined);}if(!_0xe95ee6['ok']||_0x1f7462[_0x5c0439(0x9d)]===![])throw CliErrors[_0x5c0439(0x7c)](_0x1f7462[_0x5c0439(0x8a)]||_0x1f7462[_0x5c0439(0x8b)]||_0x5c0439(0x9a)+_0xe95ee6[_0x5c0439(0xa1)],_0x1f7462[_0x5c0439(0x75)]?'API\x20error\x20code:\x20'+_0x1f7462[_0x5c0439(0x75)]:undefined);return _0x1f7462;}catch(_0x45608d){if(_0x45608d instanceof Error&&_0x45608d['name']==='AbortError')throw CliErrors[_0x5c0439(0x7c)](_0x5c0439(0x7f)+_0x38ef6c);throw _0x45608d;}finally{clearTimeout(_0x1a43bd);}}export async function getBffScriptInfo(_0x384815){const _0x5cdb28=a37_0x46bd,_0x57293b=await apiRequest(_0x5cdb28(0x91)+_0x384815);if(!_0x57293b[_0x5cdb28(0x7e)])throw CliErrors[_0x5cdb28(0x8d)]('BFF\x20script\x20not\x20found:\x20id='+_0x384815);return _0x57293b['data'];}export async function getSqlQueryInfo(_0x1f4365,_0x39b7d1){const _0x38f573=a37_0x46bd,_0x2d5043=await apiRequest('/client/sql/query',{'method':'POST','body':{'appCode':_0x1f4365,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x39b7d1}}),_0x1af7ab=_0x2d5043[_0x38f573(0x7e)],_0x1f72bc=_0x1af7ab&&typeof _0x1af7ab===_0x38f573(0x84)&&'tableData'in _0x1af7ab?_0x1af7ab[_0x38f573(0x98)]?.[0x0]:_0x1af7ab&&typeof _0x1af7ab===_0x38f573(0x84)&&_0x38f573(0x82)in _0x1af7ab?_0x1af7ab:undefined;if(!_0x1f72bc)throw CliErrors['validation'](_0x38f573(0x86)+_0x39b7d1);return _0x1f72bc;}function a37_0x508e(){const _0x22e1ff=['Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','Check\x20your\x20credentials\x20and\x20try\x20again.','success','1080572XTjJzx','test','544302tUUzXo','status','string','name','application/json','errorCode','/client/dataset/list','stringify','Configure\x20accessKey\x20in\x20.lovrabet.json.','32QxvuiM','GET','20IWvwYz','apiError','filter','data','Request\x20timeout:\x20','53670caaFKO','appCode','sqlCode','32eyvxca','object','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','SQL\x20query\x20not\x20found:\x20','656379CzYTSX','6wkqQuT','signal','errorMsg','message','/client/dataset/query?','validation','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','isArray','2763772TgJkco','/client/bff/query/','abort','5617KLOxKB','POST','appName','code','/client/app/my-apps','tableData','116158wYKLIr','API\x20error:\x20'];a37_0x508e=function(){return _0x22e1ff;};return a37_0x508e();}function isRemoteAppItem(_0x160488){const _0x5bf105=a37_0x46bd;return!!_0x160488&&typeof _0x160488===_0x5bf105(0x84)&&typeof _0x160488[_0x5bf105(0x81)]===_0x5bf105(0x72)&&typeof _0x160488[_0x5bf105(0x95)]===_0x5bf105(0x72);}function extractRemoteAppItems(_0x4495a6){const _0x36ffc7=a37_0x46bd;if(Array['isArray'](_0x4495a6))return _0x4495a6[_0x36ffc7(0x7d)](isRemoteAppItem);if(!_0x4495a6||typeof _0x4495a6!=='object')throw CliErrors[_0x36ffc7(0x7c)](_0x36ffc7(0x9b));const _0x34ad1f=_0x4495a6;if(Array[_0x36ffc7(0x8f)](_0x34ad1f['tableData']))return _0x34ad1f[_0x36ffc7(0x98)]['filter'](isRemoteAppItem);if(_0x34ad1f[_0x36ffc7(0x7e)]&&typeof _0x34ad1f['data']===_0x36ffc7(0x84)){const _0x4181ff=_0x34ad1f[_0x36ffc7(0x7e)];if(Array[_0x36ffc7(0x8f)](_0x4181ff[_0x36ffc7(0x98)]))return _0x4181ff[_0x36ffc7(0x98)]['filter'](isRemoteAppItem);}throw CliErrors[_0x36ffc7(0x7c)](_0x36ffc7(0x8e));}export async function getMyApps(){const _0x10b58b=a37_0x46bd,_0x2839dc=await apiRequest(_0x10b58b(0x97));return extractRemoteAppItems(_0x2839dc[_0x10b58b(0x7e)]);}function a37_0x46bd(_0xe1c463,_0xe2db2b){_0xe1c463=_0xe1c463-0x72;const _0x508eea=a37_0x508e();let _0x46bd10=_0x508eea[_0xe1c463];return _0x46bd10;}export async function listDatasets(_0x384672,_0x4653c0){const _0xc44d49=a37_0x46bd,_0x5dac17=await apiRequest(_0xc44d49(0x76),{'method':_0xc44d49(0x94),'body':{'appCode':_0x384672,..._0x4653c0?.[_0xc44d49(0x96)]&&{'code':_0x4653c0[_0xc44d49(0x96)]},..._0x4653c0?.[_0xc44d49(0x73)]&&{'name':_0x4653c0['name']}}});return extractList(_0x5dac17['data']);}export async function getDatasetDetail(_0x599be1){const _0x37b265=a37_0x46bd,_0x179fba=/^\d+$/[_0x37b265(0x9f)](_0x599be1)?'id':_0x37b265(0x96),_0x5cd603=await apiRequest(_0x37b265(0x8c)+_0x179fba+'='+_0x599be1);return _0x5cd603[_0x37b265(0x7e)];}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c728e,_0x16172f){const _0x423208=a38_0x39b3,_0xdc6e0a=_0x3c728e();while(!![]){try{const _0x45a096=parseInt(_0x423208(0x1ac))/0x1+parseInt(_0x423208(0x1b1))/0x2+parseInt(_0x423208(0x1b3))/0x3+parseInt(_0x423208(0x1b7))/0x4*(-parseInt(_0x423208(0x1b8))/0x5)+parseInt(_0x423208(0x1b9))/0x6*(parseInt(_0x423208(0x1b2))/0x7)+-parseInt(_0x423208(0x1ad))/0x8+-parseInt(_0x423208(0x1a9))/0x9*(parseInt(_0x423208(0x1b0))/0xa);if(_0x45a096===_0x16172f)break;else _0xdc6e0a['push'](_0xdc6e0a['shift']());}catch(_0x5d6942){_0xdc6e0a['push'](_0xdc6e0a['shift']());}}}(a38_0x114e,0xbf583));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x5a007d){const _0x314138=a38_0x39b3;if(cache[_0x314138(0x1b4)](_0x5a007d))return cache[_0x314138(0x1b5)](_0x5a007d);const _0x411fe7=await listDatasets(_0x5a007d),_0x16fb95=new Map();for(const _0x296270 of _0x411fe7){const _0x4fbd76=_0x296270[_0x314138(0x1ae)];_0x4fbd76?.[_0x314138(0x1b6)]!=null&&_0x16fb95[_0x314138(0x1ab)](_0x4fbd76[_0x314138(0x1b6)],_0x4fbd76[_0x314138(0x1aa)]??_0x314138(0x1a8)+_0x4fbd76[_0x314138(0x1b6)]);}const _0x28e614=[..._0x16fb95[_0x314138(0x1af)]()][_0x314138(0x1ba)](([_0x133bb5,_0x10b337])=>({'dbId':_0x133bb5,'dbName':_0x10b337}));return cache[_0x314138(0x1ab)](_0x5a007d,_0x28e614),_0x28e614;}export async function getDbName(_0x4893e3,_0x3c9869){const _0x2018fb=a38_0x39b3;try{const _0x564a5b=await listDatabases(_0x4893e3);return _0x564a5b[_0x2018fb(0x1bb)](_0x5e9072=>_0x5e9072[_0x2018fb(0x1b6)]===_0x3c9869)?.[_0x2018fb(0x1aa)];}catch{return undefined;}}function a38_0x39b3(_0x12c2ab,_0x4b5425){_0x12c2ab=_0x12c2ab-0x1a8;const _0x114ea9=a38_0x114e();let _0x39b334=_0x114ea9[_0x12c2ab];return _0x39b334;}function a38_0x114e(){const _0x59a584=['dbtableConfig','entries','4637090jKtbxL','1011440JAyKte','37100sUNdrL','3806028vsrKfi','has','get','dbId','1312904apSSAi','15NdYJsC','240rTpZLW','map','find','db-','9cCAgTE','dbName','set','1251539efYlnp','8046408wzKTwm'];a38_0x114e=function(){return _0x59a584;};return a38_0x114e();}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5c86fe,_0x1d16a8){const _0x4840d7=a39_0x52a0,_0x4ebf8e=_0x5c86fe();while(!![]){try{const _0x5a3743=-parseInt(_0x4840d7(0x1bc))/0x1*(parseInt(_0x4840d7(0x1ad))/0x2)+parseInt(_0x4840d7(0x1ac))/0x3+parseInt(_0x4840d7(0x1c5))/0x4+parseInt(_0x4840d7(0x1bd))/0x5+parseInt(_0x4840d7(0x1b2))/0x6*(-parseInt(_0x4840d7(0x1ae))/0x7)+parseInt(_0x4840d7(0x1ab))/0x8+-parseInt(_0x4840d7(0x1bb))/0x9;if(_0x5a3743===_0x1d16a8)break;else _0x4ebf8e['push'](_0x4ebf8e['shift']());}catch(_0x4a73e7){_0x4ebf8e['push'](_0x4ebf8e['shift']());}}}(a39_0x550f,0x21279));import{createClient}from'@lovrabet/sdk';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x5eb727){const _0x455a57=a39_0x52a0;_client=createClient({'appCode':_0x5eb727[_0x455a57(0x1b0)],'env':_0x5eb727['env'],'authMode':_0x5eb727[_0x455a57(0x1b7)],..._0x5eb727['accessKey']?{'accessKey':_0x5eb727[_0x455a57(0x1c3)]}:{},'options':{'timeout':0x7530}});}function a39_0x52a0(_0x1d9da5,_0x54aa2d){_0x1d9da5=_0x1d9da5-0x1aa;const _0x550faf=a39_0x550f();let _0x52a05a=_0x550faf[_0x1d9da5];return _0x52a05a;}function ensureClient(){const _0x48dcdd=a39_0x52a0;if(!_client)throw new Error(_0x48dcdd(0x1b9));return _client;}function a39_0x550f(){const _0x2dc0da=['batchCreate','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','execute','2264058erprcv','163529YtNpbb','397390XSuZeJ','sql','dataset_','isArray','update','\x22.\x20','accessKey','models','992496LvpRpQ','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','1147200WtalNz','271806RasmLL','2HCwjAO','56IwkVlA','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','appCode','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','8034yjVPFI','delete','getOne','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','bff','authMode'];a39_0x550f=function(){return _0x2dc0da;};return a39_0x550f();}export async function executeData(_0x350348,_0x1a0533,_0x2010af){const _0x5343d9=a39_0x52a0,_0x498658=ensureClient(),_0x3b68c0=_0x5343d9(0x1bf)+_0x350348,_0xb9aee7=_0x498658[_0x5343d9(0x1c4)][_0x3b68c0];if(!_0xb9aee7||typeof _0xb9aee7[_0x1a0533]!=='function')throw new Error(_0x5343d9(0x1aa)+_0x1a0533+_0x5343d9(0x1c2)+_0x5343d9(0x1b1));if(_0x1a0533===_0x5343d9(0x1b8))return _0xb9aee7[_0x5343d9(0x1b8)](parseBatchCreateItemsFromParams(_0x2010af));const _0x3edcbc=_0x2010af!==undefined&&_0x2010af!==null&&!Array[_0x5343d9(0x1c0)](_0x2010af)?_0x2010af:{};switch(_0x1a0533){case'getOne':{const _0x2309c2=_0x3edcbc['id'];if(_0x2309c2===undefined||_0x2309c2===null)throw new Error('getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0xb9aee7[_0x5343d9(0x1b4)](_0x2309c2);}case'update':{const {id:_0x559d3d,..._0x202900}=_0x3edcbc;if(_0x559d3d===undefined||_0x559d3d===null)throw new Error(_0x5343d9(0x1af));return _0xb9aee7[_0x5343d9(0x1c1)](_0x559d3d,_0x202900);}case _0x5343d9(0x1b3):{const _0x4349dc=_0x3edcbc['id'];if(_0x4349dc===undefined||_0x4349dc===null)throw new Error(_0x5343d9(0x1b5));return _0xb9aee7[_0x5343d9(0x1b3)](_0x4349dc);}default:return _0xb9aee7[_0x1a0533](_0x3edcbc);}}export async function executeSdkSql(_0x6b95d5,_0x2713d5){const _0x4ede57=a39_0x52a0,_0x4ab52d=ensureClient();return _0x4ab52d[_0x4ede57(0x1be)][_0x4ede57(0x1ba)]({'sqlCode':_0x6b95d5,'params':_0x2713d5});}export async function executeSdkBff(_0x5c291e,_0x428704){const _0x469d13=a39_0x52a0,_0xabe74=ensureClient();return _0xabe74[_0x469d13(0x1b6)]['execute']({'scriptName':_0x5c291e,'params':_0x428704});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a40_0x4df62f=a40_0x456c;function a40_0x1955(){const _0x59a592=['209263gAqWuY','224SbyMrt','529605upqaFb','32qfbZqH','458127KyBJFS','227478pIaIMH','7686lbkmHJ','1075964GBZHya','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20.lovrabet.json\x20file.','\x20auth\x20login`.','443432GrxOtb','Set\x20appcode\x20via\x20--appcode\x20or\x20.lovrabet.json.'];a40_0x1955=function(){return _0x59a592;};return a40_0x1955();}(function(_0x3dadec,_0x1a7e3b){const _0x431f39=a40_0x456c,_0x5b1f17=_0x3dadec();while(!![]){try{const _0x108f1b=parseInt(_0x431f39(0x1d7))/0x1+-parseInt(_0x431f39(0x1d5))/0x2+parseInt(_0x431f39(0x1dc))/0x3+-parseInt(_0x431f39(0x1d2))/0x4+parseInt(_0x431f39(0x1d9))/0x5+-parseInt(_0x431f39(0x1dd))/0x6*(-parseInt(_0x431f39(0x1d8))/0x7)+-parseInt(_0x431f39(0x1da))/0x8*(-parseInt(_0x431f39(0x1db))/0x9);if(_0x108f1b===_0x1a7e3b)break;else _0x5b1f17['push'](_0x5b1f17['shift']());}catch(_0x30c5c2){_0x5b1f17['push'](_0x5b1f17['shift']());}}}(a40_0x1955,0x2360b));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';export{CliError};function a40_0x456c(_0x5d2437,_0x517e63){_0x5d2437=_0x5d2437-0x1d2;const _0x195553=a40_0x1955();let _0x456cca=_0x195553[_0x5d2437];return _0x456cca;}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Configure\x20accessKey\x20in\x20.lovrabet.json\x20or\x20run\x20`'+CLI_BIN_NAME+a40_0x4df62f(0x1d4),'configMissingHint':a40_0x4df62f(0x1d6),'notInProjectHint':a40_0x4df62f(0x1d3)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28a62a,_0x583c3d){var _0x36ae58=a41_0x82c8,_0x29dcb7=_0x28a62a();while(!![]){try{var _0x3128dc=-parseInt(_0x36ae58(0x1a7))/0x1+-parseInt(_0x36ae58(0x1a0))/0x2*(parseInt(_0x36ae58(0x1a4))/0x3)+parseInt(_0x36ae58(0x1a3))/0x4*(parseInt(_0x36ae58(0x19e))/0x5)+parseInt(_0x36ae58(0x1a2))/0x6+-parseInt(_0x36ae58(0x19f))/0x7+-parseInt(_0x36ae58(0x1a6))/0x8*(parseInt(_0x36ae58(0x1a1))/0x9)+parseInt(_0x36ae58(0x1a5))/0xa;if(_0x3128dc===_0x583c3d)break;else _0x29dcb7['push'](_0x29dcb7['shift']());}catch(_0xb728b5){_0x29dcb7['push'](_0x29dcb7['shift']());}}}(a41_0x3a75,0x99762));function a41_0x82c8(_0x48c777,_0x1d383b){_0x48c777=_0x48c777-0x19e;var _0x3a7523=a41_0x3a75();var _0x82c8b4=_0x3a7523[_0x48c777];return _0x82c8b4;}function a41_0x3a75(){var _0x526111=['5461615hDDBCn','6042218deowtA','22882GJrwLG','90rjIeWu','168120ovcrkB','4WmTNLr','159LBfipV','15347350INeglF','106208mqSLyN','424193akbDdJ'];a41_0x3a75=function(){return _0x526111;};return a41_0x3a75();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a41_0x14820a}from'@lovrabet/cli-framework';export function buildAllFlags(_0x3543f5){return a41_0x14820a(_0x3543f5,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59272b,_0x1947a3){const _0x51e9d1=a42_0x295f,_0x22161e=_0x59272b();while(!![]){try{const _0x325043=-parseInt(_0x51e9d1(0xb7))/0x1+-parseInt(_0x51e9d1(0xb5))/0x2+-parseInt(_0x51e9d1(0xb3))/0x3+-parseInt(_0x51e9d1(0xad))/0x4*(-parseInt(_0x51e9d1(0xae))/0x5)+-parseInt(_0x51e9d1(0xb2))/0x6+-parseInt(_0x51e9d1(0xb6))/0x7*(parseInt(_0x51e9d1(0xb4))/0x8)+-parseInt(_0x51e9d1(0xb1))/0x9*(-parseInt(_0x51e9d1(0xb0))/0xa);if(_0x325043===_0x1947a3)break;else _0x22161e['push'](_0x22161e['shift']());}catch(_0x55ec4e){_0x22161e['push'](_0x22161e['shift']());}}}(a42_0x4c62,0xae31e));function a42_0x295f(_0x382e87,_0x57c85b){_0x382e87=_0x382e87-0xac;const _0x4c6257=a42_0x4c62();let _0x295f25=_0x4c6257[_0x382e87];return _0x295f25;}export function dryRun(_0xb51ac8,_0x3be687){const _0x155198={'method':_0xb51ac8,'url':_0x3be687},_0x4b3b27={'body'(_0x2f63ed){const _0x2ebc33=a42_0x295f;return _0x155198[_0x2ebc33(0xaf)]=_0x2f63ed,_0x4b3b27;},'description'(_0x5e057a){const _0x41693c=a42_0x295f;return _0x155198[_0x41693c(0xac)]=_0x5e057a,_0x4b3b27;},'build'(){return{..._0x155198};}};return _0x4b3b27;}function a42_0x4c62(){const _0x536c88=['9uLbCiU','3877692hzGxTw','2161602rSdOao','16tIZyqK','1721036HnTBOe','2045708gnMOOl','305342crBjKx','description','41956JUYQjM','150APAvzm','body','35159960VuYMtL'];a42_0x4c62=function(){return _0x536c88;};return a42_0x4c62();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x1c072f=a43_0x466b;(function(_0x5085c2,_0xc87d0b){const _0x38962b=a43_0x466b,_0x276c11=_0x5085c2();while(!![]){try{const _0x375fdf=-parseInt(_0x38962b(0x1ca))/0x1*(-parseInt(_0x38962b(0x1c6))/0x2)+-parseInt(_0x38962b(0x1c8))/0x3*(parseInt(_0x38962b(0x1cd))/0x4)+-parseInt(_0x38962b(0x1cc))/0x5*(parseInt(_0x38962b(0x1c7))/0x6)+parseInt(_0x38962b(0x1c9))/0x7*(parseInt(_0x38962b(0x1cb))/0x8)+-parseInt(_0x38962b(0x1c3))/0x9+parseInt(_0x38962b(0x1c2))/0xa+-parseInt(_0x38962b(0x1c5))/0xb;if(_0x375fdf===_0xc87d0b)break;else _0x276c11['push'](_0x276c11['shift']());}catch(_0x4ad10a){_0x276c11['push'](_0x276c11['shift']());}}}(a43_0x350e,0xe40da));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a43_0x466b(_0x2527d2,_0x3d10d1){_0x2527d2=_0x2527d2-0x1c2;const _0x350e49=a43_0x350e();let _0x466bf6=_0x350e49[_0x2527d2];return _0x466bf6;}const helpers=createFlagHelpers(CliErrors);function a43_0x350e(){const _0x433385=['validateFlags','9440670vVHFhj','6806574FuBtDz','parseFlags','5684294ZcLdih','102uEhJic','16836yTKWMM','174699FyHYcZ','23331bZBKWd','34625JPPRaW','1952QnpNhr','1930sLBCNH','16NyvsjA'];a43_0x350e=function(){return _0x433385;};return a43_0x350e();}export const parseFlags=helpers[a43_0x1c072f(0x1c4)];export const validateFlags=helpers[a43_0x1c072f(0x1ce)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a44_0x1e7344=a44_0x1ace;(function(_0x474476,_0x174892){const _0x56a976=a44_0x1ace,_0x52fc97=_0x474476();while(!![]){try{const _0x51bc3e=-parseInt(_0x56a976(0x1cf))/0x1*(parseInt(_0x56a976(0x1d0))/0x2)+-parseInt(_0x56a976(0x1c3))/0x3+-parseInt(_0x56a976(0x1c5))/0x4*(-parseInt(_0x56a976(0x1c6))/0x5)+parseInt(_0x56a976(0x1c4))/0x6+parseInt(_0x56a976(0x1c9))/0x7+parseInt(_0x56a976(0x1c7))/0x8+parseInt(_0x56a976(0x1c2))/0x9*(-parseInt(_0x56a976(0x1cb))/0xa);if(_0x51bc3e===_0x174892)break;else _0x52fc97['push'](_0x52fc97['shift']());}catch(_0x4c9c25){_0x52fc97['push'](_0x52fc97['shift']());}}}(a44_0xdb91,0xbcf9b));function a44_0xdb91(){const _0x1f520e=['20446PGxier','18NrWreu','2914326dnnfbT','8017110vhUWyD','776RdUddr','18475aEsjwf','2451360nbYuxQ','Requires\x20appcode\x20(set\x20via\x20.lovrabet.json\x20or\x20--appcode).','4878531BnOdpE','generateServiceHelp','4356470MZZfnN','get','generateCommandHelp','generateFullHelp','43WRrzAY'];a44_0xdb91=function(){return _0x1f520e;};return a44_0xdb91();}import{createHelpGenerators}from'@lovrabet/cli-framework';function a44_0x1ace(_0xd47b29,_0x1bd252){_0xd47b29=_0xd47b29-0x1c2;const _0xdb918d=a44_0xdb91();let _0x1acef3=_0xdb918d[_0xd47b29];return _0x1acef3;}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';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x38f090=>serviceGroups[a44_0x1e7344(0x1cc)](_0x38f090),'buildAllFlags':buildAllFlags,'appPrerequisiteText':a44_0x1e7344(0x1c8)});export function generateCommandHelp(_0x375853){const _0x4ab40b=a44_0x1e7344;return generators[_0x4ab40b(0x1cd)](_0x375853);}export const generateServiceHelp=generators[a44_0x1e7344(0x1ca)];export const generateFullHelp=generators[a44_0x1e7344(0x1ce)];
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5445c5,_0x40f4ad){var _0xdf8007=a45_0x488a,_0x298925=_0x5445c5();while(!![]){try{var _0x550a23=-parseInt(_0xdf8007(0x15d))/0x1*(parseInt(_0xdf8007(0x162))/0x2)+parseInt(_0xdf8007(0x15b))/0x3*(-parseInt(_0xdf8007(0x15f))/0x4)+-parseInt(_0xdf8007(0x163))/0x5*(-parseInt(_0xdf8007(0x165))/0x6)+parseInt(_0xdf8007(0x15e))/0x7+parseInt(_0xdf8007(0x164))/0x8+parseInt(_0xdf8007(0x166))/0x9*(parseInt(_0xdf8007(0x15c))/0xa)+parseInt(_0xdf8007(0x160))/0xb*(-parseInt(_0xdf8007(0x161))/0xc);if(_0x550a23===_0x40f4ad)break;else _0x298925['push'](_0x298925['shift']());}catch(_0x32e66a){_0x298925['push'](_0x298925['shift']());}}}(a45_0x1db2,0x6a7f3));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';function a45_0x1db2(){var _0x407f83=['2734544QOYAuu','372234NwHxbR','15858YrENCh','9ivVEJd','3550qFXIHA','1829XWhJUK','3895787ZSVrbm','580292fjowfX','2826571XUWOdJ','36CmBAWs','74VpgJan','15RBEnsb'];a45_0x1db2=function(){return _0x407f83;};return a45_0x1db2();}function a45_0x488a(_0x1dd169,_0x3bdc3d){_0x1dd169=_0x1dd169-0x15b;var _0x1db279=a45_0x1db2();var _0x488a6b=_0x1db279[_0x1dd169];return _0x488a6b;}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
|
-
(function(
|
|
1
|
+
(function(_0x12b79c,_0x3e33c1){var _0x5244e7=a46_0x5da5,_0x402e72=_0x12b79c();while(!![]){try{var _0x433833=-parseInt(_0x5244e7(0x11b))/0x1*(-parseInt(_0x5244e7(0x11d))/0x2)+parseInt(_0x5244e7(0x119))/0x3+parseInt(_0x5244e7(0x117))/0x4+parseInt(_0x5244e7(0x118))/0x5*(-parseInt(_0x5244e7(0x11f))/0x6)+-parseInt(_0x5244e7(0x120))/0x7+-parseInt(_0x5244e7(0x11c))/0x8*(parseInt(_0x5244e7(0x11e))/0x9)+-parseInt(_0x5244e7(0x121))/0xa*(-parseInt(_0x5244e7(0x11a))/0xb);if(_0x433833===_0x3e33c1)break;else _0x402e72['push'](_0x402e72['shift']());}catch(_0x207737){_0x402e72['push'](_0x402e72['shift']());}}}(a46_0x257d,0x9335c));function a46_0x5da5(_0x34520f,_0xc29184){_0x34520f=_0x34520f-0x117;var _0x257df0=a46_0x257d();var _0x5da5f5=_0x257df0[_0x34520f];return _0x5da5f5;}export{formatOutput}from'@lovrabet/cli-framework';function a46_0x257d(){var _0x4857fa=['9263142idpCRy','12dyfJgv','465206LqWWRU','10udYrQT','2724776YtSxGv','124560ppWmlr','579996MLxIAB','123167ZaiZmQ','1GLzOIR','8tGpEtD','1725538wEgcJP'];a46_0x257d=function(){return _0x4857fa;};return a46_0x257d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2290e0,_0x29642e){const _0x414e17=a47_0x4e4a,_0x10c5fa=_0x2290e0();while(!![]){try{const _0x40166f=parseInt(_0x414e17(0x1f8))/0x1*(parseInt(_0x414e17(0x1e5))/0x2)+parseInt(_0x414e17(0x1ec))/0x3+-parseInt(_0x414e17(0x1f6))/0x4+parseInt(_0x414e17(0x1ea))/0x5+parseInt(_0x414e17(0x1e7))/0x6*(parseInt(_0x414e17(0x1e9))/0x7)+-parseInt(_0x414e17(0x1e0))/0x8+-parseInt(_0x414e17(0x1ed))/0x9*(parseInt(_0x414e17(0x1fb))/0xa);if(_0x40166f===_0x29642e)break;else _0x10c5fa['push'](_0x10c5fa['shift']());}catch(_0x3360e4){_0x10c5fa['push'](_0x10c5fa['shift']());}}}(a47_0x5ad4,0x95f4d));function a47_0x4e4a(_0x4d1b06,_0xf92705){_0x4d1b06=_0x4d1b06-0x1e0;const _0x5ad43a=a47_0x5ad4();let _0x4e4a2f=_0x5ad43a[_0x4d1b06];return _0x4e4a2f;}function toKebab(_0x470edc){const _0x3fe98a=a47_0x4e4a;return _0x470edc[_0x3fe98a(0x1ee)](/_/g,'-')[_0x3fe98a(0x1ee)](/-([A-Z]+)/g,(_0x513b7b,_0x44b8e2)=>'-'+_0x44b8e2[_0x3fe98a(0x1f3)]())['replace'](/([a-z0-9])([A-Z])/g,(_0x5a3836,_0x484684,_0x2bf47d)=>_0x484684+'-'+_0x2bf47d)['toLowerCase']();}function a47_0x5ad4(){const _0x5acf56=['set','slice','add','dryRun','has','keys','corrected','help','number','5431120hTyKrP','get','push','name','version','14ELjVco','toUpperCase','246IvAtUU','original','189917guMOBD','1381345ypsYzE','indexOf','1116258EziuEK','1395lbAIHm','replace','format','dry-run','global','boolean','toLowerCase','env','yes','980444JWAUEU','app','151468WCTmwH','length','non-interactive','82760irkTQN','alias','nonInteractive','string'];a47_0x5ad4=function(){return _0x5acf56;};return a47_0x5ad4();}function buildKnownFlags(_0x32d919){const _0x38cc36=a47_0x4e4a,_0x3ebb38=new Set();for(const _0x4e7691 of _0x32d919){_0x3ebb38[_0x38cc36(0x201)](_0x4e7691['name']),_0x3ebb38[_0x38cc36(0x201)](toCamelCase(_0x4e7691[_0x38cc36(0x1e3)]));}for(const _0x5bfd5d of[_0x38cc36(0x1f0),_0x38cc36(0x202),_0x38cc36(0x1f5),_0x38cc36(0x1ef)]){_0x3ebb38[_0x38cc36(0x201)](_0x5bfd5d);}for(const _0xf2b576 of[_0x38cc36(0x206),_0x38cc36(0x1f4),'appcode',_0x38cc36(0x1f7),_0x38cc36(0x1fd),_0x38cc36(0x1fa),'ci',_0x38cc36(0x1f1),_0x38cc36(0x1e4)]){_0x3ebb38[_0x38cc36(0x201)](_0xf2b576);}return _0x3ebb38;}function buildFlagTypeMap(_0xd5f494){const _0x5974ad=a47_0x4e4a,_0x23e31c=new Map();for(const _0x430633 of _0xd5f494){_0x23e31c[_0x5974ad(0x1ff)](_0x430633[_0x5974ad(0x1e3)],_0x430633['type']),_0x23e31c[_0x5974ad(0x1ff)](toCamelCase(_0x430633[_0x5974ad(0x1e3)]),_0x430633['type']);}return _0x23e31c;}function toCamelCase(_0x25b643){const _0x37a050=a47_0x4e4a;return _0x25b643['replace'](/-([a-z])/g,(_0x4ad9cb,_0x5d5497)=>_0x5d5497[_0x37a050(0x1e6)]());}function aliasHandler(_0x506268,_0x5cf21a){const _0x429060=a47_0x4e4a,_0x48cc36=[];for(const _0x2d1cdf of Object[_0x429060(0x204)](_0x506268)){if(_0x5cf21a[_0x429060(0x203)](_0x2d1cdf))continue;const _0x12c632=toKebab(_0x2d1cdf);_0x12c632!==_0x2d1cdf&&_0x5cf21a[_0x429060(0x203)](_0x12c632)&&_0x48cc36['push']({'original':_0x2d1cdf,'corrected':_0x12c632,'handler':_0x429060(0x1fc)});}return _0x48cc36;}function stickyHandler(_0x36d8e7,_0xfe0ee1,_0x1919bc){const _0x97080f=a47_0x4e4a,_0x23e8e2=[];for(const [_0x4fe5d1,_0x4e3fbe]of Object['entries'](_0x36d8e7)){if(_0x4e3fbe!==!![])continue;for(let _0x39aec2=_0x4fe5d1[_0x97080f(0x1f9)]-0x1;_0x39aec2>0x0;_0x39aec2--){const _0x468e9b=_0x4fe5d1[_0x97080f(0x200)](0x0,_0x39aec2),_0x4d8f6b=_0x4fe5d1[_0x97080f(0x200)](_0x39aec2),_0x117f1b=toKebab(_0x468e9b),_0x5e5d83=toCamelCase(_0x468e9b),_0x250475=_0xfe0ee1[_0x97080f(0x203)](_0x468e9b)?_0x468e9b:_0xfe0ee1[_0x97080f(0x203)](_0x117f1b)?_0x117f1b:_0xfe0ee1[_0x97080f(0x203)](_0x5e5d83)?_0x5e5d83:null;if(!_0x250475)continue;const _0x52f8a5=_0x1919bc[_0x97080f(0x1e1)](_0x250475)??_0x97080f(0x1fe);let _0x36b258;if(_0x52f8a5===_0x97080f(0x207)){const _0x2497bd=Number(_0x4d8f6b);if(isNaN(_0x2497bd)||_0x4d8f6b==='')continue;_0x36b258=_0x2497bd;}else{if(_0x52f8a5===_0x97080f(0x1f2))continue;else{if(_0x4d8f6b==='')continue;_0x36b258=_0x4d8f6b;}}_0x23e8e2[_0x97080f(0x1e2)]({'original':_0x4fe5d1,'corrected':_0x250475+'='+_0x36b258,'handler':'sticky'});break;}}return _0x23e8e2;}export function correctFlags(_0x31617f,_0x27ff6e){const _0x1885ff=a47_0x4e4a,_0x26dfb5=buildKnownFlags(_0x27ff6e),_0x22963c=buildFlagTypeMap(_0x27ff6e),_0x1a4f5b=aliasHandler(_0x31617f,_0x26dfb5),_0x1920da=stickyHandler(_0x31617f,_0x26dfb5,_0x22963c),_0x4ddbb9=[..._0x1a4f5b,..._0x1920da];if(_0x4ddbb9['length']===0x0)return{'flags':_0x31617f,'corrections':[]};const _0x2740b5={..._0x31617f},_0x3d6cfb=new Set();for(const _0xae137f of _0x1a4f5b){_0x2740b5[_0xae137f[_0x1885ff(0x205)]]=_0x31617f[_0xae137f[_0x1885ff(0x1e8)]],_0x3d6cfb['add'](_0xae137f[_0x1885ff(0x1e8)]);}for(const _0x4d31f7 of _0x1920da){const _0x1e2ce6=_0x4d31f7[_0x1885ff(0x205)][_0x1885ff(0x1eb)]('='),_0x3153e4=_0x4d31f7[_0x1885ff(0x205)][_0x1885ff(0x200)](0x0,_0x1e2ce6),_0x3bf50d=_0x4d31f7[_0x1885ff(0x205)][_0x1885ff(0x200)](_0x1e2ce6+0x1),_0x2008a8=_0x22963c[_0x1885ff(0x1e1)](_0x3153e4)??'string';_0x2008a8==='number'?_0x2740b5[_0x3153e4]=Number(_0x3bf50d):_0x2740b5[_0x3153e4]=_0x3bf50d,_0x3d6cfb[_0x1885ff(0x201)](_0x4d31f7[_0x1885ff(0x1e8)]);}for(const _0x546e43 of _0x3d6cfb){delete _0x2740b5[_0x546e43];}return{'flags':_0x2740b5,'corrections':_0x4ddbb9};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x52ca26,_0x3d4781){var _0x34c7cb=a48_0xbcf7,_0x35cce3=_0x52ca26();while(!![]){try{var _0x1d29d9=parseInt(_0x34c7cb(0x192))/0x1+parseInt(_0x34c7cb(0x197))/0x2+parseInt(_0x34c7cb(0x193))/0x3+-parseInt(_0x34c7cb(0x194))/0x4*(parseInt(_0x34c7cb(0x196))/0x5)+-parseInt(_0x34c7cb(0x18e))/0x6*(parseInt(_0x34c7cb(0x190))/0x7)+parseInt(_0x34c7cb(0x191))/0x8+-parseInt(_0x34c7cb(0x195))/0x9*(parseInt(_0x34c7cb(0x18f))/0xa);if(_0x1d29d9===_0x3d4781)break;else _0x35cce3['push'](_0x35cce3['shift']());}catch(_0x3a03b1){_0x35cce3['push'](_0x35cce3['shift']());}}}(a48_0x43d4,0xd7c26));function a48_0x43d4(){var _0x2e80f1=['6qcJGoL','70vUanrv','5712651ICUTMQ','6468712kNWddm','1561949sdhYBw','3198906jOAMbD','264948XMPdqw','2039967LhyGgt','35BOTfHi','626606bWNnEU'];a48_0x43d4=function(){return _0x2e80f1;};return a48_0x43d4();}function a48_0xbcf7(_0x57206c,_0x2546d8){_0x57206c=_0x57206c-0x18e;var _0x43d4bc=a48_0x43d4();var _0xbcf779=_0x43d4bc[_0x57206c];return _0xbcf779;}export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11f579,_0xf7ed56){const _0x4520f3=a49_0x4b34,_0x1179aa=_0x11f579();while(!![]){try{const _0x51515e=parseInt(_0x4520f3(0x1fd))/0x1+parseInt(_0x4520f3(0x209))/0x2+parseInt(_0x4520f3(0x203))/0x3*(parseInt(_0x4520f3(0x1fa))/0x4)+parseInt(_0x4520f3(0x208))/0x5+parseInt(_0x4520f3(0x1f7))/0x6*(parseInt(_0x4520f3(0x1f3))/0x7)+-parseInt(_0x4520f3(0x1fc))/0x8+-parseInt(_0x4520f3(0x205))/0x9;if(_0x51515e===_0xf7ed56)break;else _0x1179aa['push'](_0x1179aa['shift']());}catch(_0x4fdfd7){_0x1179aa['push'](_0x1179aa['shift']());}}}(a49_0xbe62,0x9c314));function a49_0xbe62(){const _0x58a89a=['\x20\x20\x20Affected:\x20','⚠\x20\x20High-risk\x20operation:\x20','2435645mWFNVB','1978970GGfQVB','stringify','\x20\x20\x20','params','code','4188359TJYMWE','join','service','--yes','6pYekgz','\x20\x20\x20Continue?\x20[y/N]\x20','id=','1880516PTVOyo','commandLabel','3770448ZMstwR','1155997mRFgYx','affectedRecords','push','description','name','name=','3GQfcvv','code=','23310063vUMtJq'];a49_0xbe62=function(){return _0x58a89a;};return a49_0xbe62();}function a49_0x4b34(_0x43b4d8,_0x6a89a9){_0x43b4d8=_0x43b4d8-0x1f1;const _0xbe62e9=a49_0xbe62();let _0x4b3435=_0xbe62e9[_0x43b4d8];return _0x4b3435;}import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x16f5a5,_0x27e7b6,_0x16b48c){const _0x1cbe53=a49_0x4b34,_0x1fd19f=buildConfirmationContext(_0x16f5a5,_0x27e7b6,_0x16b48c),_0x529240=[_0x1cbe53(0x207)+_0x1fd19f[_0x1cbe53(0x1fb)]];return _0x1fd19f[_0x1cbe53(0x200)]&&_0x529240[_0x1cbe53(0x1ff)](_0x1cbe53(0x20b)+_0x1fd19f[_0x1cbe53(0x200)]),_0x1fd19f['affectedRecords']&&_0x529240[_0x1cbe53(0x1ff)](_0x1cbe53(0x206)+_0x1fd19f[_0x1cbe53(0x1fe)]),_0x529240['push'](_0x1cbe53(0x1f8)),_0x529240;}export function reconstructCommandArgv(_0x3ac503,_0x41df0c){const _0x2afe8e=a49_0x4b34,_0x18d7f6=[CLI_BIN_NAME,_0x3ac503[_0x2afe8e(0x1f5)],_0x3ac503['command']];for(const [_0x5bcfab,_0xb31d0]of Object['entries'](_0x41df0c)){if(_0xb31d0===!![])_0x18d7f6[_0x2afe8e(0x1ff)]('--'+_0x5bcfab);else _0xb31d0!==![]&&_0xb31d0!==undefined&&_0xb31d0!==''&&_0x18d7f6['push']('--'+_0x5bcfab+'\x20'+JSON[_0x2afe8e(0x20a)](_0xb31d0));}return _0x18d7f6[_0x2afe8e(0x1ff)](_0x2afe8e(0x1f6)),_0x18d7f6[_0x2afe8e(0x1f4)]('\x20');}function buildConfirmationContext(_0x4fb4f4,_0x159318,_0x2dde3c){const _0x1d222e=a49_0x4b34,_0x16e4ae=extractAffectedRecords(_0x2dde3c);return{'commandLabel':_0x159318,'description':_0x4fb4f4[_0x1d222e(0x200)],'affectedRecords':_0x16e4ae};}function extractAffectedRecords(_0x5c3c5d){const _0x331669=a49_0x4b34,_0x2fe293=[];if(_0x5c3c5d[_0x331669(0x1f2)])_0x2fe293[_0x331669(0x1ff)](_0x331669(0x204)+_0x5c3c5d[_0x331669(0x1f2)]);if(_0x5c3c5d['id'])_0x2fe293[_0x331669(0x1ff)](_0x331669(0x1f9)+_0x5c3c5d['id']);if(_0x5c3c5d[_0x331669(0x201)])_0x2fe293[_0x331669(0x1ff)](_0x331669(0x202)+_0x5c3c5d[_0x331669(0x201)]);if(_0x5c3c5d[_0x331669(0x1f1)])_0x2fe293[_0x331669(0x1ff)]('params='+_0x5c3c5d[_0x331669(0x1f1)]);return _0x2fe293['length']>0x0?_0x2fe293[_0x331669(0x1f4)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c3f18,_0x319af9){const _0x15ef5f=a50_0x38b7,_0x380f23=_0x1c3f18();while(!![]){try{const _0xfeac3f=-parseInt(_0x15ef5f(0xe0))/0x1*(-parseInt(_0x15ef5f(0xde))/0x2)+parseInt(_0x15ef5f(0xe3))/0x3+parseInt(_0x15ef5f(0xea))/0x4*(-parseInt(_0x15ef5f(0xdd))/0x5)+-parseInt(_0x15ef5f(0xe6))/0x6*(-parseInt(_0x15ef5f(0xe2))/0x7)+-parseInt(_0x15ef5f(0xe1))/0x8+parseInt(_0x15ef5f(0xe7))/0x9+-parseInt(_0x15ef5f(0xe4))/0xa*(parseInt(_0x15ef5f(0xe9))/0xb);if(_0xfeac3f===_0x319af9)break;else _0x380f23['push'](_0x380f23['shift']());}catch(_0x15c11e){_0x380f23['push'](_0x380f23['shift']());}}}(a50_0x5d50,0xba125));import{LovrabetError}from'@lovrabet/sdk';function a50_0x38b7(_0x5e966d,_0x1bdf7d){_0x5e966d=_0x5e966d-0xdd;const _0x5d508b=a50_0x5d50();let _0x38b720=_0x5d508b[_0x5e966d];return _0x38b720;}import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x1536f3){const _0x3ea99d=a50_0x38b7;if(_0x1536f3 instanceof LovrabetError)return CliErrors[_0x3ea99d(0xe8)](userFacingLovrabetMessage(_0x1536f3));return _0x1536f3;}function a50_0x5d50(){const _0x26246c=['1108WYMRCJ','trim','9385OzHRVr','1812542AfMJVe','string','1asbZIb','2593152GyxpMf','287GNFhVq','4127013Skbgav','50sELEuq','message','18888lARslo','1545993StXxJQ','validation','2148443aDtHfa'];a50_0x5d50=function(){return _0x26246c;};return a50_0x5d50();}function userFacingLovrabetMessage(_0x269220){const _0x19acb8=a50_0x38b7,_0x25c515=_0x269220['description'];if(_0x25c515!==undefined&&_0x25c515!==null){if(typeof _0x25c515===_0x19acb8(0xdf)&&_0x25c515[_0x19acb8(0xeb)]())return _0x25c515[_0x19acb8(0xeb)]();try{return JSON['stringify'](_0x25c515);}catch{}}return _0x269220[_0x19acb8(0xe5)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0xa91d8b=a51_0x1d18;(function(_0x194aaa,_0x4a7e30){const _0x4d2754=a51_0x1d18,_0x3b77b9=_0x194aaa();while(!![]){try{const _0x4d56e0=-parseInt(_0x4d2754(0x1cf))/0x1*(parseInt(_0x4d2754(0x1d8))/0x2)+parseInt(_0x4d2754(0x1c7))/0x3*(parseInt(_0x4d2754(0x1dc))/0x4)+-parseInt(_0x4d2754(0x1ce))/0x5+-parseInt(_0x4d2754(0x1c6))/0x6+-parseInt(_0x4d2754(0x1c9))/0x7*(parseInt(_0x4d2754(0x1e8))/0x8)+parseInt(_0x4d2754(0x1c3))/0x9*(-parseInt(_0x4d2754(0x1d3))/0xa)+-parseInt(_0x4d2754(0x1d0))/0xb*(-parseInt(_0x4d2754(0x1de))/0xc);if(_0x4d56e0===_0x4a7e30)break;else _0x3b77b9['push'](_0x3b77b9['shift']());}catch(_0xd885bd){_0x3b77b9['push'](_0x3b77b9['shift']());}}}(a51_0x45a1,0x71be0));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';function a51_0x1d18(_0xe583a9,_0x3ab9f2){_0xe583a9=_0xe583a9-0x1c2;const _0x45a101=a51_0x45a1();let _0x1d188d=_0x45a101[_0xe583a9];return _0x1d188d;}import{mapUserFacingExecuteError}from'../framework/runner-error.js';export function resolveAuthMode(_0x14002a){const _0x1a4b08=a51_0x1d18;return void _0x14002a,AUTH_MODE[_0x1a4b08(0x1ea)];}export function createPipelineEnv(_0xa1605a,_0x560a45){const _0x3d7367=a51_0x1d18;return{'rawFlags':_0x560a45,'appCode':_0xa1605a[_0x3d7367(0x1db)]||process.env.RABETBASE_APPCODE||readAppCodeFromConfig(),'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x560a45),'defaultFormat':_0xa1605a[_0x3d7367(0x1c2)],'defaultPageSize':_0xa1605a[_0x3d7367(0x1cb)],'defaultVerbose':_0xa1605a[_0x3d7367(0x1ca)],'riskLevel':_0xa1605a[_0x3d7367(0x1d9)],'accessKey':_0xa1605a[_0x3d7367(0x1d2)],'env':_0xa1605a[_0x3d7367(0x1cd)],'mergedCli':{'defaultApp':_0xa1605a[_0x3d7367(0x1d5)],'currentApp':_0xa1605a['currentApp'],'appCode':_0xa1605a['appCode']}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x1d2e4f=>PIPELINE_FLAG_NAMES[a51_0xa91d8b(0x1e5)](_0x1d2e4f[a51_0xa91d8b(0x1c8)]))['map'](({name:_0x4892b5,type:_0x27f640,description:_0x4c3151})=>({'name':_0x4892b5,'type':_0x27f640,'description':_0x4c3151})),'formatOutput':formatOutput,'getCommandLabel'(_0x3e3399){const _0x1e5ae2=a51_0xa91d8b;return CLI_BIN_NAME+'\x20'+_0x3e3399[_0x1e5ae2(0x1dd)]+'\x20'+_0x3e3399[_0x1e5ae2(0x1e1)];},'riskPolicy':{'onViolation'(_0x25fe5c){console['error'](_0x25fe5c);},'createError'(_0x27e60d){const _0x31e3e7=a51_0xa91d8b;return CliErrors[_0x31e3e7(0x1e4)](_0x27e60d);}},async 'prepare'(_0x5b5aa4,_0x19246f){const _0x2b08e6=a51_0xa91d8b,_0x18244e=resolveAuthMode(_0x19246f);if(_0x5b5aa4[_0x2b08e6(0x1d6)]!==![]){if(!_0x19246f[_0x2b08e6(0x1d2)])throw CliErrors['authRequired'](_0x2b08e6(0x1d7));const {setActiveAK:_0x384f1f}=await import(_0x2b08e6(0x1e7));_0x384f1f(_0x19246f[_0x2b08e6(0x1d2)]);}let _0x485b76='';if(_0x5b5aa4[_0x2b08e6(0x1e9)]!==![]){_0x485b76=_0x19246f[_0x2b08e6(0x1db)]??'';if(!_0x485b76)throw CliErrors[_0x2b08e6(0x1d1)](_0x2b08e6(0x1c4));}if(_0x485b76){const {initSdkClient:_0x33354a}=await import(_0x2b08e6(0x1e2));_0x33354a({'appCode':_0x485b76,'env':_0x19246f['env']??_0x2b08e6(0x1c5),'accessKey':_0x19246f['accessKey'],'authMode':_0x18244e});}return{'defaults':{'booleans':{'verbose':_0x19246f[_0x2b08e6(0x1da)]},'numbers':{'pagesize':_0x19246f[_0x2b08e6(0x1e6)]}},'extras':{'appCode':_0x485b76,'cookie':'','apiDomain':_0x19246f['apiDomain'],'apiDir':'','accessKey':_0x19246f[_0x2b08e6(0x1d2)],'envName':_0x19246f[_0x2b08e6(0x1cd)],'mergedCli':_0x19246f[_0x2b08e6(0x1e3)]}};},async 'confirmHighRisk'({def:_0x4e5434,env:_0x4d32f4,flags:_0x1923ab,commandLabel:_0x53db48}){const _0x38d029=a51_0xa91d8b;if(_0x4d32f4[_0x38d029(0x1d4)]){const _0xd0fdae=reconstructCommandArgv(_0x4e5434,_0x1923ab);throw CliErrors[_0x38d029(0x1cc)]('High-risk\x20operation\x20`'+_0x53db48+_0x38d029(0x1e0)+(_0x38d029(0x1df)+_0xd0fdae));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x4e5434,_0x53db48,_0x1923ab),'createCancelledError':_0x2cc263=>CliErrors[_0x38d029(0x1e4)](_0x2cc263)});},'mapDryRunError'(_0x5f3bfc){return mapUserFacingExecuteError(_0x5f3bfc);},'mapExecuteError'(_0xfb26d9){return mapUserFacingExecuteError(_0xfb26d9);},async 'finalize'(){const _0x4fa218=a51_0xa91d8b,{clearActiveAK:_0x446361}=await import(_0x4fa218(0x1e7));_0x446361();}};function a51_0x45a1(){const _0x133793=['cancelled','has','defaultPageSize','../core/api-client.js','29576CHqfji','requiresAppCode','ClientAk','format','350775UbKbTm','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20.lovrabet.json.','production','4312014YdYXNI','26139PMCcJl','name','1036XHKjDy','verbose','pageSize','validation','env','40150eYgGDh','1226guUJmM','495EgtWbM','configMissing','accessKey','10fWUVpK','isNonInteractive','defaultApp','requiresAuth','Set\x20accessKey\x20in\x20.lovrabet.json\x20or\x20pass\x20LOVRABET_ACCESS_KEY.','1014QZvMEu','riskLevel','defaultVerbose','appCode','360hHahxL','service','430968qrfRAf','\x20\x20To\x20proceed:\x20','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','command','../core/sdk-client.js','mergedCli'];a51_0x45a1=function(){return _0x133793;};return a51_0x45a1();}export async function runCommand(_0x4bc83c,_0x513627){await runCommandWithAdapter(_0x4bc83c,_0x513627,runnerAdapter);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x501cb8,_0x534549){const _0x50773e=a52_0x1e5d,_0x4cdea2=_0x501cb8();while(!![]){try{const _0x33110d=-parseInt(_0x50773e(0x150))/0x1*(-parseInt(_0x50773e(0x157))/0x2)+parseInt(_0x50773e(0x152))/0x3+-parseInt(_0x50773e(0x15a))/0x4+-parseInt(_0x50773e(0x151))/0x5*(-parseInt(_0x50773e(0x158))/0x6)+-parseInt(_0x50773e(0x15b))/0x7*(parseInt(_0x50773e(0x156))/0x8)+parseInt(_0x50773e(0x159))/0x9*(-parseInt(_0x50773e(0x155))/0xa)+-parseInt(_0x50773e(0x15c))/0xb*(-parseInt(_0x50773e(0x153))/0xc);if(_0x33110d===_0x534549)break;else _0x4cdea2['push'](_0x4cdea2['shift']());}catch(_0x3f9e15){_0x4cdea2['push'](_0x4cdea2['shift']());}}}(a52_0x5584,0x4106e));function a52_0x5584(){const _0x49327f=['1858176NNMgAN','7ByQDew','4026EDxtTI','14323XgNGVX','49985OiudUr','735465sObeWl','7632EsvrZQ','../commands/registry.js','92840udIVdt','126184xEdiYj','12oxkQea','132LSlVjd','36HormoQ'];a52_0x5584=function(){return _0x49327f;};return a52_0x5584();}function a52_0x1e5d(_0x2fc02c,_0x1dc775){_0x2fc02c=_0x2fc02c-0x150;const _0x55847c=a52_0x5584();let _0x1e5da9=_0x55847c[_0x2fc02c];return _0x1e5da9;}import{buildSchemaPayload as a52_0x5b1705}from'@lovrabet/cli-framework';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 _0x3b3998=a52_0x1e5d,{serviceRegistry:_0x47ed1a,findDefinition:_0x25275e}=await import(_0x3b3998(0x154));return a52_0x5b1705({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x47ed1a,'buildAllFlags':buildAllFlags,'findDefinition':_0x25275e});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a53_0x102e(_0x5b31d6,_0x4cc774){_0x5b31d6=_0x5b31d6-0x130;var _0x1f3bad=a53_0x1f3b();var _0x102e1c=_0x1f3bad[_0x5b31d6];return _0x102e1c;}(function(_0x1d63fa,_0x1cfe7e){var _0x231915=a53_0x102e,_0x4bafa0=_0x1d63fa();while(!![]){try{var _0x60af4a=-parseInt(_0x231915(0x132))/0x1+-parseInt(_0x231915(0x137))/0x2+parseInt(_0x231915(0x134))/0x3*(parseInt(_0x231915(0x135))/0x4)+-parseInt(_0x231915(0x133))/0x5*(parseInt(_0x231915(0x138))/0x6)+-parseInt(_0x231915(0x130))/0x7+parseInt(_0x231915(0x136))/0x8*(parseInt(_0x231915(0x139))/0x9)+parseInt(_0x231915(0x131))/0xa;if(_0x60af4a===_0x1cfe7e)break;else _0x4bafa0['push'](_0x4bafa0['shift']());}catch(_0x13ad93){_0x4bafa0['push'](_0x4bafa0['shift']());}}}(a53_0x1f3b,0xe9fd4));function a53_0x1f3b(){var _0x341173=['4jgyoME','48EVTaup','2886972ZLzJzP','6PEjkMq','1020915NeaQPn','2375177xQpreV','25912910YhFMYa','989597yUrDlA','6729510YUhcHs','5414445akRjjE'];a53_0x1f3b=function(){return _0x341173;};return a53_0x1f3b();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0x1e4c(_0x26c1d6,_0x17fbd9){_0x26c1d6=_0x26c1d6-0x110;const _0x57d632=a54_0x57d6();let _0x1e4cc0=_0x57d632[_0x26c1d6];return _0x1e4cc0;}(function(_0x16fde8,_0x1531cc){const _0x48401f=a54_0x1e4c,_0x5d8950=_0x16fde8();while(!![]){try{const _0x2a0545=parseInt(_0x48401f(0x113))/0x1*(-parseInt(_0x48401f(0x114))/0x2)+parseInt(_0x48401f(0x11c))/0x3*(parseInt(_0x48401f(0x110))/0x4)+-parseInt(_0x48401f(0x11d))/0x5*(-parseInt(_0x48401f(0x112))/0x6)+parseInt(_0x48401f(0x11a))/0x7+parseInt(_0x48401f(0x116))/0x8+-parseInt(_0x48401f(0x115))/0x9+-parseInt(_0x48401f(0x117))/0xa;if(_0x2a0545===_0x1531cc)break;else _0x5d8950['push'](_0x5d8950['shift']());}catch(_0x51eade){_0x5d8950['push'](_0x5d8950['shift']());}}}(a54_0x57d6,0xa358e));import{jsx as a54_0x47fbb1,jsxs as a54_0x20dee7}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a54_0x57d6(){const _0xf78cb6=['column','207984UqtrDN','5051ZwAYEx','194seSTxJ','7431183qbrZPD','8297272Grodtf','2235920HqPYVQ','green','\x20--help','191443CThigl','\x20\x20Use\x20','3JqMQsN','130QWSpWq','970096ThUSyj'];a54_0x57d6=function(){return _0xf78cb6;};return a54_0x57d6();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x669427=a54_0x1e4c,{exit:_0x528bd2}=useApp();return useEffect(()=>{_0x528bd2();},[_0x528bd2]),a54_0x20dee7(Box,{'flexDirection':_0x669427(0x111),'marginTop':0x1,'marginBottom':0x1,'children':[a54_0x47fbb1(Box,{'children':a54_0x47fbb1(Text,{'bold':!![],'color':_0x669427(0x118),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a54_0x20dee7(Box,{'marginTop':0x1,'children':[a54_0x47fbb1(Text,{'dimColor':!![],'children':_0x669427(0x11b)}),a54_0x47fbb1(Text,{'bold':!![],'color':_0x669427(0x118),'children':CLI_BIN_NAME+_0x669427(0x119)}),a54_0x47fbb1(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26f1f7,_0x2a85bb){const _0x5b61ed=a55_0x19cc,_0x1b178f=_0x26f1f7();while(!![]){try{const _0x27e281=-parseInt(_0x5b61ed(0x1e8))/0x1*(parseInt(_0x5b61ed(0x1e4))/0x2)+parseInt(_0x5b61ed(0x1e3))/0x3*(parseInt(_0x5b61ed(0x1e6))/0x4)+-parseInt(_0x5b61ed(0x1e9))/0x5+parseInt(_0x5b61ed(0x1ec))/0x6*(parseInt(_0x5b61ed(0x1ea))/0x7)+parseInt(_0x5b61ed(0x1e7))/0x8*(parseInt(_0x5b61ed(0x1e1))/0x9)+parseInt(_0x5b61ed(0x1e2))/0xa+parseInt(_0x5b61ed(0x1e5))/0xb*(-parseInt(_0x5b61ed(0x1eb))/0xc);if(_0x27e281===_0x2a85bb)break;else _0x1b178f['push'](_0x1b178f['shift']());}catch(_0x117e11){_0x1b178f['push'](_0x1b178f['shift']());}}}(a55_0x187c,0x4f2f9));function a55_0x187c(){const _0x495500=['2632315xVktKX','35elowDw','1380XHaNsL','510348ycHWYV','77031jKFRRG','4736830WvUXSt','276ktWNLg','3956dkNmIz','101453pJfJKX','27316aYjKjf','544dmfJVT','100mIekno'];a55_0x187c=function(){return _0x495500;};return a55_0x187c();}import{createJqFilter}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a55_0x19cc(_0x3da09e,_0x6999bc){_0x3da09e=_0x3da09e-0x1e1;const _0x187c5b=a55_0x187c();let _0x19cc3f=_0x187c5b[_0x3da09e];return _0x19cc3f;}export const applyJqFilter=createJqFilter(CliErrors);
|