@lovrabet/lovrabet-cli 2.0.1-beta.10 → 2.0.1-beta.11
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/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/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/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
(function(_0x234a7e,_0x5475ad){const _0x562bf1=a0_0x4886,_0x2fbc6a=_0x234a7e();while(!![]){try{const _0x13d833=-parseInt(_0x562bf1(0x7b))/0x1+-parseInt(_0x562bf1(0x6d))/0x2+parseInt(_0x562bf1(0x7e))/0x3*(parseInt(_0x562bf1(0x6b))/0x4)+-parseInt(_0x562bf1(0x8a))/0x5*(parseInt(_0x562bf1(0x6f))/0x6)+-parseInt(_0x562bf1(0x64))/0x7+parseInt(_0x562bf1(0x7a))/0x8*(parseInt(_0x562bf1(0x80))/0x9)+parseInt(_0x562bf1(0x89))/0xa*(parseInt(_0x562bf1(0x84))/0xb);if(_0x13d833===_0x5475ad)break;else _0x2fbc6a['push'](_0x2fbc6a['shift']());}catch(_0x5efbd5){_0x2fbc6a['push'](_0x2fbc6a['shift']());}}}(a0_0x94a8,0xb84e1));import{jsx as a0_0x5471bd}from'react/jsx-runtime';import a0_0x5f288f from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';function a0_0x94a8(){const _0x21beb9=['[preparse]\x20','ERR_STREAM_DESTROYED','exit','256BMjoeK','Error:\x20','636908gFCrUq','\x20app\x20import`.\x0a','6drjepx','hint','log',':\x20--','help','handler','stderr','app','original','\x20init\x20import`\x20has\x20moved\x20to\x20`','flags','24wyHFaB','1201780aXMtvI','args','\x0aCancelled.\x0a','34722JAUbeX','Hint:\x20','3118221YYuwrZ','error','input','[deprecation]\x20`','44JheXYf','length','import','name','write','4192070RvkfMt','4263075zRJNxv','defaultCommand','unknownCommand','init','Unexpected\x20error:','2304463diwaJa','code','exitCode','slice'];a0_0x94a8=function(){return _0x21beb9;};return a0_0x94a8();}function a0_0x4886(_0x1e50e8,_0x16b254){_0x1e50e8=_0x1e50e8-0x64;const _0x94a88=a0_0x94a8();let _0x4886e9=_0x94a88[_0x1e50e8];return _0x4886e9;}import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x5f288f(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x254fa9){handleError(_0x254fa9);}}async function run(){const _0x43a337=a0_0x4886;let _0x3c4e05=cli[_0x43a337(0x82)][0x0],_0x26dd8c=cli[_0x43a337(0x82)][0x1];const _0x58abcf=cli[_0x43a337(0x79)];try{const {correctFlags:_0x2738a5}=await import('./framework/preparse.js'),_0x5bc14d=getAllDefinitions()['flatMap'](_0xa5ab58=>_0xa5ab58[_0x43a337(0x79)]??[]),{flags:_0x50b97a,corrections:_0x48431c}=_0x2738a5(_0x58abcf,_0x5bc14d);if(_0x48431c[_0x43a337(0x85)]>0x0){for(const _0x4a8a37 of _0x48431c){process[_0x43a337(0x75)][_0x43a337(0x88)](_0x43a337(0x68)+_0x4a8a37[_0x43a337(0x74)]+_0x43a337(0x72)+_0x4a8a37[_0x43a337(0x77)]+'\x20->\x20--'+_0x4a8a37['corrected']+'\x0a');}Object['assign'](_0x58abcf,_0x50b97a);}}catch{}if(!_0x3c4e05||!isKnownService(_0x3c4e05)){const {waitUntilExit:_0x1c80a9}=render(a0_0x5471bd(Help,{}));await _0x1c80a9();return;}const _0x52d96a=getServiceEntry(_0x3c4e05);if(!_0x26dd8c){if(_0x58abcf['help']){console['log'](generateServiceHelp(_0x3c4e05));return;}if(_0x52d96a[_0x43a337(0x8b)])_0x26dd8c=_0x52d96a[_0x43a337(0x8b)];else{console[_0x43a337(0x71)](generateServiceHelp(_0x3c4e05));return;}}_0x3c4e05===_0x43a337(0x8d)&&_0x26dd8c===_0x43a337(0x86)&&(_0x3c4e05=_0x43a337(0x76),process[_0x43a337(0x75)][_0x43a337(0x88)](_0x43a337(0x83)+CLI_BIN_NAME+_0x43a337(0x78)+CLI_BIN_NAME+_0x43a337(0x6e)));const _0x25a4ef=findDefinition(_0x3c4e05,_0x26dd8c);!_0x25a4ef&&(console[_0x43a337(0x71)](generateServiceHelp(_0x3c4e05)),handleError(CliErrors[_0x43a337(0x8c)](_0x3c4e05+'\x20'+_0x26dd8c)));if(_0x58abcf[_0x43a337(0x73)]){console[_0x43a337(0x71)](generateCommandHelp(_0x25a4ef));return;}const _0x234beb=buildConfigFromFlags(_0x58abcf);await initGlobalEnvironment(_0x234beb);const _0x699920=createPipelineEnv(_0x234beb,_0x58abcf);_0x699920[_0x43a337(0x7c)]=cli['input'][_0x43a337(0x67)](0x2),await runCommand(_0x25a4ef,_0x699920);}function handleError(_0x54baad){const _0x5c759b=a0_0x4886;if(_0x54baad instanceof CliError){_0x54baad[_0x5c759b(0x65)]==='cancelled'&&(process[_0x5c759b(0x75)][_0x5c759b(0x88)](_0x5c759b(0x7d)),process[_0x5c759b(0x6a)](0x0));console['error'](_0x5c759b(0x6c)+_0x54baad['message']);if(_0x54baad['hint'])console[_0x5c759b(0x81)](_0x5c759b(0x7f)+_0x54baad[_0x5c759b(0x70)]);process[_0x5c759b(0x6a)](_0x54baad[_0x5c759b(0x66)]);}isUserCancellation(_0x54baad)&&(process[_0x5c759b(0x75)][_0x5c759b(0x88)]('\x0aCancelled.\x0a'),process['exit'](0x0)),console[_0x5c759b(0x81)](_0x5c759b(0x8e),_0x54baad),process['exit'](0x1);}function isUserCancellation(_0x598206){const _0x2e845e=a0_0x4886;if(!(_0x598206 instanceof Error))return![];if(_0x598206[_0x2e845e(0x87)]==='ExitPromptError')return!![];if(_0x598206[_0x2e845e(0x65)]==='ERR_USE_AFTER_CLOSE')return!![];if(_0x598206[_0x2e845e(0x65)]===_0x2e845e(0x69))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fd837,_0x2033eb){const _0x356166=a1_0x50ef,_0x37e3a9=_0x2fd837();while(!![]){try{const _0x3f70bf=-parseInt(_0x356166(0x1d8))/0x1*(parseInt(_0x356166(0x1c4))/0x2)+parseInt(_0x356166(0x1c8))/0x3*(-parseInt(_0x356166(0x1d3))/0x4)+-parseInt(_0x356166(0x1c0))/0x5+-parseInt(_0x356166(0x1cd))/0x6+-parseInt(_0x356166(0x1d9))/0x7*(parseInt(_0x356166(0x1d7))/0x8)+-parseInt(_0x356166(0x1d6))/0x9*(parseInt(_0x356166(0x1c9))/0xa)+parseInt(_0x356166(0x1d5))/0xb;if(_0x3f70bf===_0x2033eb)break;else _0x37e3a9['push'](_0x37e3a9['shift']());}catch(_0x2012c3){_0x37e3a9['push'](_0x37e3a9['shift']());}}}(a1_0x3a64,0x27b0c));import{createHash}from'node:crypto';function a1_0x3a64(){const _0x451634=['117927qUgbzV','80TtLPAZ','3263NurUAa','95837FoaXPf','sha256','parse','utf8','.lovrabet','slice','911930UzvuPC','trim','stringify','my-apps.json','142auYCox','isArray','items','appCode','1413LRWiFo','140QKHxkY','.tmp','EPERM','digest','1517574YnYMjs','appName','cache','code','unknown','hex','1264gVsIXh','EXDEV','14286228LGQAjw'];a1_0x3a64=function(){return _0x451634;};return a1_0x3a64();}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';function fingerprintAccessKey(_0x299f0f){const _0x37cc50=a1_0x50ef,_0x2999d6=_0x299f0f[_0x37cc50(0x1c1)](),_0x3c3fef=_0x2999d6['slice'](-0x6)||_0x37cc50(0x1d1),_0x1be2f7=createHash(_0x37cc50(0x1da))['update'](_0x2999d6)[_0x37cc50(0x1cc)](_0x37cc50(0x1d2))[_0x37cc50(0x1bf)](0x0,0xc);return'ak_'+_0x3c3fef+'_'+_0x1be2f7;}function a1_0x50ef(_0x3867ac,_0x17ef74){_0x3867ac=_0x3867ac-0x1bf;const _0x3a641d=a1_0x3a64();let _0x50ef4f=_0x3a641d[_0x3867ac];return _0x50ef4f;}export function getAppCacheFilePath(_0x394315,_0x53a436){const _0x1673fa=a1_0x50ef;return resolve(homedir(),_0x1673fa(0x1dd),_0x1673fa(0x1cf),_0x394315,fingerprintAccessKey(_0x53a436),_0x1673fa(0x1c3));}export function readCachedAppList(_0x62e3bf,_0x279102){const _0x3ce613=a1_0x50ef;if(!_0x279102?.[_0x3ce613(0x1c1)]())return null;const _0x120cfd=getAppCacheFilePath(_0x62e3bf,_0x279102);if(!existsSync(_0x120cfd))return null;try{const _0x5583e1=readFileSync(_0x120cfd,_0x3ce613(0x1dc));if(!_0x5583e1[_0x3ce613(0x1c1)]())return null;const _0xb199b1=JSON[_0x3ce613(0x1db)](_0x5583e1);if(!Array[_0x3ce613(0x1c5)](_0xb199b1['items']))return null;return _0xb199b1;}catch{return null;}}export function writeCachedAppList(_0x6ca8e2,_0xf30d07,_0x29b35c){const _0x5bdfbb=a1_0x50ef,_0x17456a=getAppCacheFilePath(_0x6ca8e2,_0xf30d07),_0x12d5e0=dirname(_0x17456a);!existsSync(_0x12d5e0)&&mkdirSync(_0x12d5e0,{'recursive':!![]});const _0x24edb9=_0x17456a+_0x5bdfbb(0x1ca);try{writeFileSync(_0x24edb9,JSON['stringify'](_0x29b35c,null,0x2)+'\x0a',{'encoding':_0x5bdfbb(0x1dc),'mode':0x180});try{renameSync(_0x24edb9,_0x17456a);}catch(_0x38d762){if(_0x38d762[_0x5bdfbb(0x1d0)]===_0x5bdfbb(0x1cb)||_0x38d762['code']===_0x5bdfbb(0x1d4)||_0x38d762['code']==='EACCES'){writeFileSync(_0x17456a,JSON[_0x5bdfbb(0x1c2)](_0x29b35c,null,0x2)+'\x0a',{'encoding':_0x5bdfbb(0x1dc)});try{unlinkSync(_0x24edb9);}catch{}}else throw _0x38d762;}}catch(_0x1fbd91){try{unlinkSync(_0x24edb9);}catch{}throw _0x1fbd91;}return _0x17456a;}export function resolveCachedAppCode(_0x2b86b5,_0xbbc8f4,_0x42300c){const _0x1aabd6=a1_0x50ef;if(!_0x2b86b5)return undefined;const _0x490d24=readCachedAppList(_0xbbc8f4,_0x42300c),_0xa0650b=_0x490d24?.[_0x1aabd6(0x1c6)]['find'](_0xdae6f5=>_0xdae6f5[_0x1aabd6(0x1ce)]===_0x2b86b5);return _0xa0650b?.[_0x1aabd6(0x1c7)]?.['trim']()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x2d39b7=a2_0x3ab9;(function(_0x4384c5,_0x571134){const _0xce0ea3=a2_0x3ab9,_0x4b5f6a=_0x4384c5();while(!![]){try{const _0x5a08aa=-parseInt(_0xce0ea3(0x17e))/0x1+-parseInt(_0xce0ea3(0x1a3))/0x2*(-parseInt(_0xce0ea3(0x188))/0x3)+-parseInt(_0xce0ea3(0x172))/0x4+parseInt(_0xce0ea3(0x186))/0x5+parseInt(_0xce0ea3(0x196))/0x6+-parseInt(_0xce0ea3(0x17d))/0x7+parseInt(_0xce0ea3(0x1a7))/0x8*(parseInt(_0xce0ea3(0x180))/0x9);if(_0x5a08aa===_0x571134)break;else _0x4b5f6a['push'](_0x4b5f6a['shift']());}catch(_0x129b5c){_0x4b5f6a['push'](_0x4b5f6a['shift']());}}}(a2_0x30e8,0xcb7a5));function a2_0x30e8(){const _0x11b563=['Remote\x20app\x20name\x20to\x20activate','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','from','../../commands/app/cache.js','No\x20cached\x20apps\x20found.','\x20app\x20use\x20<name>\x20[--global]','../../context.js','Use\x20global\x20config\x20scope','187778KOPdEV','App\x20\x22','Read\x20app\x20list\x20from\x20local\x20cache\x20only','string','1036240osoMZw','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','str','\x20cached\x20app(s)\x20for\x20env=\x22','no-cache','type','validation','source','name','globalPath','env','import','Target\x20environment\x20(default:\x20current\x20env)','Read\x20from\x20local\x20cache\x20only','projectPath','nonInteractive','../../commands/app/remote-source.js','read','list','pull','1558112BvuUdl','fetchedAt','production','boolean','items','local','project-default','mergedCli','cachePath','appCode','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','5106276IXYabE','1558347fapiqp','Missing\x20app\x20name.','189CooMhs','defaultApp','Refreshed\x20app\x20cache\x20with\x20','bool','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','cache','3449670pGHtwp','length','3XxTJae','Use\x20`','appOwnerName','Default\x20app\x20set\x20to\x20\x22','find','Filter\x20by\x20environment\x20(default:\x20current\x20env)','No\x20apps\x20found\x20on\x20the\x20platform.','map','global','use','\x20app\x20list`\x20to\x20discover\x20remote\x20apps.','appPublishStatus','write','appName','41010miuQxW','args','app','envName','Usage:\x20'];a2_0x30e8=function(){return _0x11b563;};return a2_0x30e8();}function a2_0x3ab9(_0x3db14b,_0x118197){_0x3db14b=_0x3db14b-0x171;const _0x30e85c=a2_0x30e8();let _0x3ab908=_0x30e85c[_0x3db14b];return _0x3ab908;}import{CliErrors}from'../../errors.js';import{initImportFlagDefs,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':a2_0x2d39b7(0x190),'type':a2_0x2d39b7(0x175),'description':a2_0x2d39b7(0x1a2),'default':![]};function collectFlags(_0x4937aa,_0x22cdd9){const _0x27faec=a2_0x2d39b7,_0x42e484={};for(const _0x45ad3d of _0x22cdd9){const _0x379d2c=_0x45ad3d[_0x27faec(0x1ac)]===_0x27faec(0x175)?_0x4937aa[_0x27faec(0x183)](_0x45ad3d[_0x27faec(0x1af)]):_0x4937aa[_0x27faec(0x1a9)](_0x45ad3d['name']);if(_0x379d2c!==''&&_0x379d2c!==![])_0x42e484[_0x45ad3d[_0x27faec(0x1af)]]=_0x379d2c;}if(_0x4937aa[_0x27faec(0x1b6)])_0x42e484[_0x27faec(0x1b6)]=!![];return _0x42e484;}const listDef={'service':a2_0x2d39b7(0x198),'command':a2_0x2d39b7(0x1b9),'description':a2_0x2d39b7(0x19c),'risk':a2_0x2d39b7(0x1b8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x2d39b7(0x1b1),'type':a2_0x2d39b7(0x1a6),'description':a2_0x2d39b7(0x18d),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x2d39b7(0x177),'type':a2_0x2d39b7(0x175),'description':a2_0x2d39b7(0x1a5),'default':![]},{'name':a2_0x2d39b7(0x1ab),'type':a2_0x2d39b7(0x175),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x339dde){const _0x248de0=a2_0x2d39b7,_0x456f52=_0x339dde[_0x248de0(0x1a9)](_0x248de0(0x1b1))||_0x339dde[_0x248de0(0x199)]||getEnv()||_0x248de0(0x174),_0xe8f25f=_0x339dde[_0x248de0(0x183)](_0x248de0(0x177)),_0x28efe7=_0x339dde['bool'](_0x248de0(0x1ab)),{readRawConfigWithLayers:_0x1944c3,resolveDefaultAppSource:_0x3ab348}=await import(_0x248de0(0x1a1)),{getRemoteAppList:_0x504e42}=await import(_0x248de0(0x1b7)),{config:_0x5e377e,layers:_0x1da400}=_0x1944c3(),_0x12214a=_0x3ab348(_0x1da400),{defaultApp:_0x33c8de}=_0x5e377e,_0x4007ff=await _0x504e42({'env':_0x456f52,'accessKey':_0x339dde['accessKey'],'localOnly':_0xe8f25f,'noCache':_0x28efe7}),_0x3c31f1=_0x4007ff[_0x248de0(0x176)]['map'](_0x584c1d=>{const _0x2eb96b=_0x248de0;return{'name':_0x584c1d[_0x2eb96b(0x195)],'appcode':_0x584c1d[_0x2eb96b(0x17b)],'named':!![],'definedIn':'remote','isDefault':_0x584c1d['appName']===_0x33c8de,...buildAppProfileListFields(_0x456f52),'source':_0x4007ff[_0x2eb96b(0x1ae)],'owner':_0x584c1d[_0x2eb96b(0x18a)]??null,'status':_0x584c1d[_0x2eb96b(0x193)]??null,'cachedAt':_0x4007ff['fetchedAt']};});enrichAppListItemsWithMergedSelection(_0x3c31f1,_0x339dde[_0x248de0(0x179)]);if(_0x3c31f1[_0x248de0(0x187)]===0x0)return{'ok':!![],'data':[],'message':_0x4007ff[_0x248de0(0x1ae)]===_0x248de0(0x185)?_0x248de0(0x19f):_0x248de0(0x18e)};const _0x1cb68d=_0x3c31f1[_0x248de0(0x18c)](_0x2db610=>_0x2db610['isCurrent']===!![]),_0x1c4b80=_0x33c8de??_0x1cb68d?.[_0x248de0(0x1af)]??null,_0x35aac0={'env':_0x456f52,'source':_0x4007ff[_0x248de0(0x1ae)],'fetchedAt':_0x4007ff[_0x248de0(0x173)],'cachePath':_0x4007ff[_0x248de0(0x17a)],'globalPath':_0x1da400[_0x248de0(0x1b0)]??null,'projectPath':_0x1da400[_0x248de0(0x1b5)]??null,'defaultApp':_0x1c4b80,'defaultAppSource':_0x33c8de!=null?_0x12214a:null};return{'ok':!![],'data':{'items':_0x3c31f1,'meta':_0x35aac0}};}},pullDef={'service':a2_0x2d39b7(0x198),'command':a2_0x2d39b7(0x171),'description':a2_0x2d39b7(0x184),'risk':a2_0x2d39b7(0x194),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x2d39b7(0x1b1),'type':a2_0x2d39b7(0x1a6),'description':a2_0x2d39b7(0x1b3),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x2d39b7(0x177),'type':'boolean','description':a2_0x2d39b7(0x1b4),'default':![]},{'name':'no-cache','type':a2_0x2d39b7(0x175),'description':a2_0x2d39b7(0x17c),'default':![]}],async 'execute'(_0x24efad){const _0xc7f136=a2_0x2d39b7,_0x370b5a=_0x24efad[_0xc7f136(0x1a9)](_0xc7f136(0x1b1))||_0x24efad[_0xc7f136(0x199)]||getEnv()||_0xc7f136(0x174),_0x5a873c=_0x24efad[_0xc7f136(0x183)](_0xc7f136(0x177)),_0x5bc743=_0x24efad[_0xc7f136(0x183)](_0xc7f136(0x1ab)),{getRemoteAppList:_0xdbfd4e}=await import(_0xc7f136(0x1b7)),_0xdbdb3c=await _0xdbfd4e({'env':_0x370b5a,'accessKey':_0x24efad['accessKey'],'localOnly':_0x5a873c,'noCache':_0x5bc743});return{'ok':!![],'data':{'total':_0xdbdb3c[_0xc7f136(0x176)]['length'],'env':_0x370b5a,'source':_0xdbdb3c[_0xc7f136(0x1ae)],'fetchedAt':_0xdbdb3c['fetchedAt'],'cachePath':_0xdbdb3c[_0xc7f136(0x17a)]},'message':_0xdbdb3c[_0xc7f136(0x1ae)]===_0xc7f136(0x185)?'Loaded\x20'+_0xdbdb3c[_0xc7f136(0x176)][_0xc7f136(0x187)]+_0xc7f136(0x1aa)+_0x370b5a+'\x22.':_0xc7f136(0x182)+_0xdbdb3c[_0xc7f136(0x176)][_0xc7f136(0x187)]+'\x20app(s)\x20for\x20env=\x22'+_0x370b5a+'\x22.'};}},useDef={'service':'app','command':a2_0x2d39b7(0x191),'description':'Switch\x20the\x20default\x20app','risk':a2_0x2d39b7(0x194),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':a2_0x2d39b7(0x19b),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x445854){const _0x28f124=a2_0x2d39b7;if(!_0x445854[_0x28f124(0x197)][0x0])throw CliErrors['validation'](_0x28f124(0x17f),_0x28f124(0x19a)+CLI_BIN_NAME+_0x28f124(0x1a0));},async 'execute'(_0x54386c){const _0x4dbb75=a2_0x2d39b7,_0xdd5087=_0x54386c['args'][0x0];if(!_0xdd5087)throw CliErrors[_0x4dbb75(0x1ad)](_0x4dbb75(0x17f),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x511dd4}=await import(_0x4dbb75(0x1a1)),{readCachedAppList:_0x5eced9}=await import(_0x4dbb75(0x19e)),_0x3dd62b=_0x511dd4({}),_0x1d4523=_0x5eced9(_0x3dd62b[_0x4dbb75(0x1b1)],_0x3dd62b['accessKey']),_0x415e95=_0x1d4523?.[_0x4dbb75(0x176)][_0x4dbb75(0x18c)](_0xd1c6a2=>_0xd1c6a2[_0x4dbb75(0x195)]===_0xdd5087);if(!_0x415e95&&_0x3dd62b[_0x4dbb75(0x181)]!==_0xdd5087){const _0x2a3178=[..._0x1d4523?.[_0x4dbb75(0x176)][_0x4dbb75(0x18f)](_0x15ddeb=>_0x15ddeb[_0x4dbb75(0x195)])??[]],_0x68ab2d=_0x2a3178[_0x4dbb75(0x187)]===0x0?_0x4dbb75(0x189)+CLI_BIN_NAME+_0x4dbb75(0x192):'Available:\x20'+Array[_0x4dbb75(0x19d)](new Set(_0x2a3178))['join'](',\x20');throw CliErrors[_0x4dbb75(0x1ad)](_0x4dbb75(0x1a4)+_0xdd5087+'\x22\x20not\x20found.',_0x68ab2d);}const _0x4386ee=_0x54386c[_0x4dbb75(0x183)](_0x4dbb75(0x190));let _0x1031d0;if(_0x4386ee)_0x1031d0={'global':!![]};else{const {isInProject:_0x313667}=await import(_0x4dbb75(0x1a1)),_0xe6a908=_0x313667();_0x1031d0=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x4dbb75(0x178),'inProject':_0xe6a908}));}const _0x45ad30=readConfig(_0x1031d0);return _0x45ad30[_0x4dbb75(0x181)]=_0xdd5087,writeConfig(_0x45ad30,_0x1031d0),{'ok':!![],'message':_0x4dbb75(0x18b)+_0xdd5087+'\x22'+scopeLabel(_0x1031d0)+'.'};}},importDef={'service':a2_0x2d39b7(0x198),'command':a2_0x2d39b7(0x1b2),'description':a2_0x2d39b7(0x1a8),'risk':a2_0x2d39b7(0x194),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x150cae){return await runInitImport(collectFlags(_0x150cae,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3d8cba,_0xbeb9){const _0x1d7910=a3_0xbf61,_0x691d3c=_0x3d8cba();while(!![]){try{const _0x40b6a0=-parseInt(_0x1d7910(0x6b))/0x1+parseInt(_0x1d7910(0x6a))/0x2*(parseInt(_0x1d7910(0x69))/0x3)+parseInt(_0x1d7910(0x72))/0x4+-parseInt(_0x1d7910(0x76))/0x5*(parseInt(_0x1d7910(0x6d))/0x6)+-parseInt(_0x1d7910(0x6f))/0x7+parseInt(_0x1d7910(0x74))/0x8+parseInt(_0x1d7910(0x77))/0x9;if(_0x40b6a0===_0xbeb9)break;else _0x691d3c['push'](_0x691d3c['shift']());}catch(_0x2eb4cb){_0x691d3c['push'](_0x691d3c['shift']());}}}(a3_0x15fa,0x6bd81));function a3_0xbf61(_0x27719d,_0x4f389b){_0x27719d=_0x27719d-0x69;const _0x15fa76=a3_0x15fa();let _0xbf6128=_0x15fa76[_0x27719d];return _0xbf6128;}import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x4a29c7=a3_0xbf61,_0x2b2e3f=join(__dirname,_0x4a29c7(0x6e)),_0x4e4b8b=readFileSync(_0x2b2e3f,_0x4a29c7(0x73));return JSON[_0x4a29c7(0x70)](_0x4e4b8b);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x5f2974=a3_0xbf61,_0x285b80=getMockAppList();if(!_0x285b80['success'])throw new Error(_0x5f2974(0x71)+_0x285b80[_0x5f2974(0x6c)]+'\x20('+_0x285b80[_0x5f2974(0x75)]+')');return _0x285b80['data']['tableData'];}function a3_0x15fa(){const _0x371b1a=['326914ULbcDO','errorMsg','9534kDPTQi','../../../mock/app-list.json','5965008nASmJK','parse','Mock\x20API\x20error:\x20','2238552zRTQlQ','utf-8','5021128nzHvRy','errorCode','2245iMwmtU','5655330AIYmyQ','50187yHsknJ','62jXvnZS'];a3_0x15fa=function(){return _0x371b1a;};return a3_0x15fa();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a4_0x145d(){const _0x17f718=['1957680pZPsCK','cache','770KqwgtL','mock','3316ncbrPx','20LivHXZ','remote','8908752tBmxbn','4839456qNIvrf','toISOString','items','7JGtmfW','trim','1572156DSZqtO','fetchedAt','toLowerCase','1726590sfFOCV','1854140dBMgHT'];a4_0x145d=function(){return _0x17f718;};return a4_0x145d();}(function(_0x2e4e58,_0x478498){const _0x2b8bf5=a4_0x117c,_0x24695e=_0x2e4e58();while(!![]){try{const _0x4a8a00=parseInt(_0x2b8bf5(0x12f))/0x1+-parseInt(_0x2b8bf5(0x130))/0x2+-parseInt(_0x2b8bf5(0x131))/0x3+-parseInt(_0x2b8bf5(0x123))/0x4*(-parseInt(_0x2b8bf5(0x121))/0x5)+-parseInt(_0x2b8bf5(0x127))/0x6+parseInt(_0x2b8bf5(0x12a))/0x7*(parseInt(_0x2b8bf5(0x126))/0x8)+-parseInt(_0x2b8bf5(0x12c))/0x9*(-parseInt(_0x2b8bf5(0x124))/0xa);if(_0x4a8a00===_0x478498)break;else _0x24695e['push'](_0x24695e['shift']());}catch(_0x3d7ab7){_0x24695e['push'](_0x24695e['shift']());}}}(a4_0x145d,0xe34c4));function a4_0x117c(_0x461694,_0x4de0ce){_0x461694=_0x461694-0x121;const _0x145d66=a4_0x145d();let _0x117c4e=_0x145d66[_0x461694];return _0x117c4e;}import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';export function shouldUseMockRemoteApps(){const _0xcb561f=a4_0x117c,_0x466684=(process.env.LOVRABET_APP_LIST_SOURCE||process.env.RABETBASE_APP_LIST_SOURCE||'')[_0xcb561f(0x12b)]()[_0xcb561f(0x12e)]();return _0x466684===_0xcb561f(0x122);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x3680ed){const _0x5525bb=a4_0x117c,{env:_0xf01477,accessKey:_0xedb802,localOnly:localOnly=![],noCache:noCache=![]}=_0x3680ed,_0x45e009=readCachedAppList(_0xf01477,_0xedb802),_0x5e3368=_0xedb802?.['trim']()?getAppCacheFilePath(_0xf01477,_0xedb802):null;if(localOnly)return{'items':_0x45e009?.[_0x5525bb(0x129)]??[],'source':'cache','fetchedAt':_0x45e009?.[_0x5525bb(0x12d)]??null,'cachePath':_0x5e3368};try{const _0x1e97a4=await getRemoteAppItems(),_0x5664b6=shouldUseMockRemoteApps()?_0x5525bb(0x122):_0x5525bb(0x125),_0x44aff3=new Date()[_0x5525bb(0x128)](),_0x280fd7=_0xedb802?.['trim']()?writeCachedAppList(_0xf01477,_0xedb802,{'env':_0xf01477,'fetchedAt':_0x44aff3,'source':_0x5664b6,'items':_0x1e97a4}):null;return{'items':_0x1e97a4,'source':_0x5664b6,'fetchedAt':_0x44aff3,'cachePath':_0x280fd7};}catch(_0x322f6a){if(!noCache&&_0x45e009)return{'items':_0x45e009[_0x5525bb(0x129)],'source':_0x5525bb(0x132),'fetchedAt':_0x45e009[_0x5525bb(0x12d)],'cachePath':_0x5e3368};throw _0x322f6a;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2753c3,_0x120064){const _0x319d55=a5_0x8c10,_0x1be429=_0x2753c3();while(!![]){try{const _0xa55de8=-parseInt(_0x319d55(0x172))/0x1*(-parseInt(_0x319d55(0x177))/0x2)+-parseInt(_0x319d55(0x176))/0x3*(-parseInt(_0x319d55(0x16e))/0x4)+-parseInt(_0x319d55(0x175))/0x5*(-parseInt(_0x319d55(0x16b))/0x6)+-parseInt(_0x319d55(0x173))/0x7+parseInt(_0x319d55(0x16c))/0x8+-parseInt(_0x319d55(0x16f))/0x9+-parseInt(_0x319d55(0x178))/0xa*(parseInt(_0x319d55(0x17b))/0xb);if(_0xa55de8===_0x120064)break;else _0x1be429['push'](_0x1be429['shift']());}catch(_0x52d0aa){_0x1be429['push'](_0x1be429['shift']());}}}(a5_0x3e11,0xe161a));import{CLI_BIN_NAME}from'../../constant/cli.js';function a5_0x8c10(_0x57bea2,_0x5193ee){_0x57bea2=_0x57bea2-0x16b;const _0x3e1120=a5_0x3e11();let _0x8c10f8=_0x3e1120[_0x57bea2];return _0x8c10f8;}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};function a5_0x3e11(){const _0x5506d3=['834215BbmqlX','182502eCZfDk','2tEmDZt','28190iIoQeM','appcode','appCode','5951CIfjpB','trim','24gnShTM','3697408FUHPFC','isCurrent','76DXlNHO','6204204RdFZpA','currentApp','project','1390959ggtjnV','3771292bzLciZ','defaultApp'];a5_0x3e11=function(){return _0x5506d3;};return a5_0x3e11();}export function enrichAppListItemsWithMergedSelection(_0x49a440,_0x1123c3){const _0x2916b0=a5_0x8c10;if(!_0x1123c3)return;const _0x4bf51a=!!(_0x1123c3['currentApp']??_0x1123c3[_0x2916b0(0x174)]);for(const _0x461153 of _0x49a440){_0x461153['isCurrent']=![];}const _0x1fe655=_0x1123c3[_0x2916b0(0x17a)]!=null?String(_0x1123c3[_0x2916b0(0x17a)])[_0x2916b0(0x17c)]():'';if(_0x4bf51a){const _0x128cf9=_0x1123c3[_0x2916b0(0x170)]??_0x1123c3['defaultApp'];if(_0x128cf9)for(const _0x2d6f34 of _0x49a440){_0x2d6f34['named']===!![]&&_0x2d6f34['name']===_0x128cf9&&(_0x2d6f34[_0x2916b0(0x16d)]=!![]);}return;}if(!_0x1fe655)return;for(const _0x44f48f of _0x49a440){String(_0x44f48f[_0x2916b0(0x179)]??'')[_0x2916b0(0x17c)]()===_0x1fe655&&(_0x44f48f[_0x2916b0(0x16d)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x44dbd9){const _0x5c653c=a5_0x8c10;return formatScopeLabel(_0x44dbd9['global']?'global':_0x5c653c(0x171));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x4da239=a6_0xec26;(function(_0x7be022,_0x9b8ac5){const _0x47ff23=a6_0xec26,_0x5bfa62=_0x7be022();while(!![]){try{const _0x2ddca8=-parseInt(_0x47ff23(0x14c))/0x1*(parseInt(_0x47ff23(0x12d))/0x2)+parseInt(_0x47ff23(0x13b))/0x3+-parseInt(_0x47ff23(0x135))/0x4*(-parseInt(_0x47ff23(0x11b))/0x5)+-parseInt(_0x47ff23(0x144))/0x6*(-parseInt(_0x47ff23(0x121))/0x7)+parseInt(_0x47ff23(0x13a))/0x8*(parseInt(_0x47ff23(0x152))/0x9)+-parseInt(_0x47ff23(0x126))/0xa*(-parseInt(_0x47ff23(0x124))/0xb)+-parseInt(_0x47ff23(0x14b))/0xc;if(_0x2ddca8===_0x9b8ac5)break;else _0x5bfa62['push'](_0x5bfa62['shift']());}catch(_0x45f1d2){_0x5bfa62['push'](_0x5bfa62['shift']());}}}(a6_0x221d,0xe7f61));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{CliErrors}from'../../errors.js';function a6_0xec26(_0x106a08,_0x4d7f73){_0x106a08=_0x106a08-0x114;const _0x221df1=a6_0x221d();let _0xec265c=_0x221df1[_0x106a08];return _0xec265c;}import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';function a6_0x221d(){const _0x3cc4cd=['project','8488570JcMndN','development','auth','Usage:\x20','\x20config.','Option\x20C:\x20environment\x20variable','global','27926YdjETm','boolean','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','access-key','Option\x20A:\x20','length','Show\x20current\x20authentication\x20status','\x20config','16kwTliM','repeat','trim','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','\x20config.\x20Nothing\x20to\x20clear.','2840YYKvbx','1993743XirtlC','read','Invalid\x20accessKey\x20format:\x20\x22','validation','\x20Current\x20env:\x20','push','Clear\x20from\x20global\x20config\x20(default)','No\x20AccessKey\x20found\x20in\x20','\x20doctor','6UwiGoh','str','\x20(via\x20','join','Clear\x20accessKey\x20from\x20config','Auth\x20mode:\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','38574156AYZgmk','34ajSDBj','\x20\x20export\x20LOVRABET_ACCESS_KEY=ak_xxx','bool','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Then\x20verify\x20with:\x20','nonInteractive','2052YmfXeb','daily','\x20auth\x20status','string','LOVRABET_ACCESS_KEY\x20env\x20var','global-default','login','env','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','accessKey','Option\x20B:\x20apps\x20config\x20(.lovrabet.json)','logout','status','AccessKey\x20saved\x20to\x20','Missing\x20accessKey.','ClientAk','2110915FFqNru','AccessKey\x20(ak_xxx...)','Shorthand\x20for\x20--access-key','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','slice','AccessKey\x20cleared\x20from\x20','3551807lHnTpg','Write\x20to\x20global\x20config\x20(default)','test','22nOlukE'];a6_0x221d=function(){return _0x3cc4cd;};return a6_0x221d();}import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function resolveAuthScopeFlags(_0x9c6a37){const _0x4f5416=a6_0xec26;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x9c6a37[_0x4f5416(0x14e)](_0x4f5416(0x12c)),'explicitProject':_0x9c6a37[_0x4f5416(0x14e)](_0x4f5416(0x125)),'policy':_0x4f5416(0x157)}));}export const authDefinitions=[{'service':'auth','command':a6_0x4da239(0x158),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4da239(0x130),'type':a6_0x4da239(0x155),'description':a6_0x4da239(0x11c)},{'name':'ak','type':a6_0x4da239(0x155),'description':a6_0x4da239(0x11d)},{'name':'global','type':a6_0x4da239(0x12e),'description':a6_0x4da239(0x122),'default':!![]},{'name':a6_0x4da239(0x125),'type':a6_0x4da239(0x12e),'description':a6_0x4da239(0x12f),'default':![]}],async 'execute'(_0x585745){const _0x5d5330=a6_0x4da239;let _0x4260af=(_0x585745[_0x5d5330(0x145)]('access-key')||_0x585745[_0x5d5330(0x145)]('ak')||'')[_0x5d5330(0x137)]();const _0xc9a100=(_0x585745[_0x5d5330(0x145)](_0x5d5330(0x159))||'')[_0x5d5330(0x137)]();if(!_0x4260af&&!_0x585745[_0x5d5330(0x151)])try{_0x4260af=await promptAccessKey('');}catch(_0x4388aa){if(isAbortPrompt(_0x4388aa))throw CliErrors['cancelled']();throw _0x4388aa;}if(!_0x4260af)throw CliErrors[_0x5d5330(0x13e)](_0x5d5330(0x119),_0x5d5330(0x129)+CLI_BIN_NAME+_0x5d5330(0x11e));if(!ACCESS_KEY_PATTERN[_0x5d5330(0x123)](_0x4260af))throw CliErrors[_0x5d5330(0x13e)](_0x5d5330(0x13d)+_0x4260af+'\x22',_0x5d5330(0x15a));const _0x43dfec=resolveAuthScopeFlags(_0x585745),_0x59e388=readScopedConfig(_0x43dfec);_0x59e388[_0x5d5330(0x114)]=_0x4260af;if(_0xc9a100){const _0x1e8f0a=normalizeEnv(_0xc9a100);_0x59e388['env']=isDaily(_0x1e8f0a)?_0x5d5330(0x153):isDev(_0x1e8f0a)?_0x5d5330(0x127):'production';}writeScopedConfig(_0x59e388,_0x43dfec);const _0x14c52b=_0x43dfec[_0x5d5330(0x12c)]?_0x5d5330(0x12c):_0x5d5330(0x125),_0x27e3db=_0x59e388[_0x5d5330(0x159)]?_0x5d5330(0x13f)+_0x59e388[_0x5d5330(0x159)]+'.':'';return{'ok':!![],'message':_0x5d5330(0x118)+_0x14c52b+_0x5d5330(0x12a)+_0x27e3db+'\x20Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':'auth','command':a6_0x4da239(0x116),'description':a6_0x4da239(0x148),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4da239(0x12c),'type':'boolean','description':a6_0x4da239(0x141),'default':!![]},{'name':a6_0x4da239(0x125),'type':a6_0x4da239(0x12e),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x1bdf2d){const _0x2b3895=a6_0x4da239,_0x33025e=resolveAuthScopeFlags(_0x1bdf2d),_0x514b3e=readScopedConfig(_0x33025e),_0x31975b=!!_0x514b3e['accessKey'];delete _0x514b3e['accessKey'],writeScopedConfig(_0x514b3e,_0x33025e);const _0x513743=_0x33025e[_0x2b3895(0x12c)]?_0x2b3895(0x12c):_0x2b3895(0x125);if(_0x31975b)return{'ok':!![],'message':_0x2b3895(0x120)+_0x513743+_0x2b3895(0x12a)};return{'ok':!![],'message':_0x2b3895(0x142)+_0x513743+_0x2b3895(0x139)};}},{'service':a6_0x4da239(0x128),'command':a6_0x4da239(0x117),'description':a6_0x4da239(0x133),'risk':a6_0x4da239(0x13c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4da239(0x12c),'type':a6_0x4da239(0x12e),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x4da239(0x125),'type':'boolean','description':a6_0x4da239(0x14f),'default':![]}],async 'execute'(_0x2a928c){const _0x4b2ea2=a6_0x4da239,_0x23cb8d=resolveAuthScopeFlags(_0x2a928c),_0x335455=readScopedConfig(_0x23cb8d),_0x219298=process.env.LOVRABET_ACCESS_KEY||undefined,_0x13a4a8=_0x335455['accessKey']||undefined,_0x2cf784=_0x219298||_0x13a4a8,_0x10db32=_0x219298?_0x4b2ea2(0x156):_0x13a4a8?(_0x23cb8d['global']?_0x4b2ea2(0x12c):_0x4b2ea2(0x125))+_0x4b2ea2(0x134):null,_0x3f0866=[_0x4b2ea2(0x149)+AUTH_MODE[_0x4b2ea2(0x11a)]];if(_0x2cf784){const _0x39f98a=_0x2cf784[_0x4b2ea2(0x132)]>0x8?''+_0x2cf784[_0x4b2ea2(0x11f)](0x0,0x8)+'*'[_0x4b2ea2(0x136)](_0x2cf784[_0x4b2ea2(0x132)]-0x8):_0x2cf784;_0x3f0866[_0x4b2ea2(0x140)]('AccessKey:\x20'+_0x39f98a+(_0x10db32?_0x4b2ea2(0x146)+_0x10db32+')':''));}return!_0x2cf784&&(_0x3f0866[_0x4b2ea2(0x140)](''),_0x3f0866['push'](_0x4b2ea2(0x14a)),_0x3f0866[_0x4b2ea2(0x140)](''),_0x3f0866[_0x4b2ea2(0x140)](_0x4b2ea2(0x131)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x3f0866[_0x4b2ea2(0x140)](''),_0x3f0866[_0x4b2ea2(0x140)](_0x4b2ea2(0x115)),_0x3f0866[_0x4b2ea2(0x140)](_0x4b2ea2(0x138)),_0x3f0866[_0x4b2ea2(0x140)](''),_0x3f0866[_0x4b2ea2(0x140)](_0x4b2ea2(0x12b)),_0x3f0866['push'](_0x4b2ea2(0x14d)),_0x3f0866[_0x4b2ea2(0x140)](''),_0x3f0866[_0x4b2ea2(0x140)](_0x4b2ea2(0x150)+CLI_BIN_NAME+_0x4b2ea2(0x154)),_0x3f0866['push']('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x4b2ea2(0x143))),{'ok':!![],'message':_0x3f0866[_0x4b2ea2(0x147)]('\x0a')};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2a3002,_0x2609d2){const _0x4504de=a7_0x244b,_0x5d24c9=_0x2a3002();while(!![]){try{const _0x565845=-parseInt(_0x4504de(0x1c1))/0x1*(-parseInt(_0x4504de(0x1be))/0x2)+-parseInt(_0x4504de(0x1c5))/0x3*(-parseInt(_0x4504de(0x1d2))/0x4)+-parseInt(_0x4504de(0x1c2))/0x5+parseInt(_0x4504de(0x1c6))/0x6+parseInt(_0x4504de(0x1c4))/0x7*(-parseInt(_0x4504de(0x1d0))/0x8)+-parseInt(_0x4504de(0x1d3))/0x9*(parseInt(_0x4504de(0x1cf))/0xa)+-parseInt(_0x4504de(0x1d4))/0xb;if(_0x565845===_0x2609d2)break;else _0x5d24c9['push'](_0x5d24c9['shift']());}catch(_0x35f290){_0x5d24c9['push'](_0x5d24c9['shift']());}}}(a7_0x539b,0x92f75));function a7_0x244b(_0x4ee2bf,_0x2af895){_0x4ee2bf=_0x4ee2bf-0x1be;const _0x539bd0=a7_0x539b();let _0x244baf=_0x539bd0[_0x4ee2bf];return _0x244baf;}import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x2e5393=a7_0x244b;super('User\x20aborted\x20prompt'),this[_0x2e5393(0x1d1)]=_0x2e5393(0x1cb);}}function createSafeRl(){const _0x805765=a7_0x244b,_0x206ea9=createInterface({'input':process[_0x805765(0x1cc)],'output':process[_0x805765(0x1d5)]});let _0xe48e53;const _0x46b330=new Promise((_0xbbf223,_0x1f3790)=>{const _0x16d41d=_0x805765;_0xe48e53=()=>{const _0xa00e81=a7_0x244b;_0xe48e53&&(_0x206ea9[_0xa00e81(0x1c0)](_0xa00e81(0x1ce),_0xe48e53),_0xe48e53=undefined);try{_0x206ea9[_0xa00e81(0x1ca)]();}catch{}_0x1f3790(new AbortPrompt());},_0x206ea9[_0x16d41d(0x1c9)]('SIGINT',_0xe48e53);}),_0x552418=()=>{const _0x30fa4a=_0x805765;_0xe48e53&&(_0x206ea9[_0x30fa4a(0x1c0)](_0x30fa4a(0x1ce),_0xe48e53),_0xe48e53=undefined);try{_0x206ea9['close']();}catch{}};return{'rl':_0x206ea9,'abortPromise':_0x46b330,'disposeSuccess':_0x552418};}function a7_0x539b(){const _0x16152b=['trim','once','close','AbortPrompt','stdin','race','SIGINT','160oskkWM','856JyNjxB','name','2334128gyqJHf','326466CBeDnY','13033900gqZDjT','stdout','67226wXItuy','\x20\x20AccessKey:\x20','removeListener','29sezHeP','1621845KuBKfu','):\x20','3773zJQpua','3augdOf','7145940ZzgjqS','\x20\x20AccessKey\x20('];a7_0x539b=function(){return _0x16152b;};return a7_0x539b();}export async function promptAccessKey(_0x5145cb=''){const _0x34f872=a7_0x244b,{rl:_0x2c833a,abortPromise:_0x1eeff2,disposeSuccess:_0x20decf}=createSafeRl(),_0x2f668a=new Promise(_0x22a2a0=>{const _0x3f7abe=a7_0x244b,_0x13cfbb=_0x5145cb?_0x3f7abe(0x1c7)+_0x5145cb+_0x3f7abe(0x1c3):_0x3f7abe(0x1bf);_0x2c833a['question'](_0x13cfbb,_0x98a49a=>{const _0x23f86e=_0x3f7abe;_0x20decf(),_0x22a2a0(_0x98a49a[_0x23f86e(0x1c8)]()||_0x5145cb);});});return Promise[_0x34f872(0x1cd)]([_0x2f668a,_0x1eeff2]);}export function isAbortPrompt(_0x546cb1){const _0x16c51b=a7_0x244b;return _0x546cb1 instanceof Error&&_0x546cb1[_0x16c51b(0x1d1)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a8_0x2d84(){const _0x5e1cb0=['598359VYCtQe','21qBCngf','Script\x20ID','updatedTime','verbose','13599LyPJmg','622314pkSmPc','(none)','description','num','scriptType','2810wWMara','3818428gOpaOM','11ZbzlpS','1937096KRMCkX','appCode','functionName','detail','6550476VWdLCM','bff','5NUUJlu','471426tyKTzl','2ZLcMOG','createdTime'];a8_0x2d84=function(){return _0x5e1cb0;};return a8_0x2d84();}const a8_0x3c9428=a8_0x158b;(function(_0x530a3c,_0x5204f1){const _0x155584=a8_0x158b,_0x295123=_0x530a3c();while(!![]){try{const _0x38c928=-parseInt(_0x155584(0x81))/0x1+parseInt(_0x155584(0x79))/0x2*(-parseInt(_0x155584(0x7b))/0x3)+parseInt(_0x155584(0x87))/0x4*(parseInt(_0x155584(0x77))/0x5)+-parseInt(_0x155584(0x78))/0x6+parseInt(_0x155584(0x7c))/0x7*(parseInt(_0x155584(0x89))/0x8)+-parseInt(_0x155584(0x80))/0x9*(-parseInt(_0x155584(0x86))/0xa)+parseInt(_0x155584(0x88))/0xb*(-parseInt(_0x155584(0x75))/0xc);if(_0x38c928===_0x5204f1)break;else _0x295123['push'](_0x295123['shift']());}catch(_0x70366){_0x295123['push'](_0x295123['shift']());}}}(a8_0x2d84,0xa0fc6));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a8_0x158b(_0x217659,_0x574f8e){_0x217659=_0x217659-0x74;const _0x2d8488=a8_0x2d84();let _0x158b27=_0x2d8488[_0x217659];return _0x158b27;}export const bffDetail={'service':a8_0x3c9428(0x76),'command':a8_0x3c9428(0x74),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':'read','flags':[{...ID_FLAG,'description':a8_0x3c9428(0x7d)},VERBOSE_FLAG],async 'execute'(_0x5956ee){const _0x22a87f=a8_0x3c9428,_0x404cbc=await getBffScriptInfo(_0x5956ee[_0x22a87f(0x84)]('id')),_0xf93cd0=_0x5956ee['bool'](_0x22a87f(0x7f));if(_0xf93cd0)return{'ok':!![],'data':_0x404cbc};return{'ok':!![],'data':{'id':_0x404cbc['id'],'appCode':_0x404cbc[_0x22a87f(0x8a)],'functionName':_0x404cbc[_0x22a87f(0x8b)]??'','scriptType':_0x404cbc[_0x22a87f(0x85)],'description':_0x404cbc[_0x22a87f(0x83)]||_0x22a87f(0x82),'createdTime':_0x404cbc[_0x22a87f(0x7a)]??'','updatedTime':_0x404cbc[_0x22a87f(0x7e)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a9_0x442dd0=a9_0x86be;function a9_0x86be(_0x5a1094,_0xf022f6){_0x5a1094=_0x5a1094-0x14f;const _0xb16075=a9_0xb160();let _0x86be05=_0xb16075[_0x5a1094];return _0x86be05;}(function(_0x3df8ae,_0x19047d){const _0x4424c0=a9_0x86be,_0x58081e=_0x3df8ae();while(!![]){try{const _0x14bc44=parseInt(_0x4424c0(0x15c))/0x1+parseInt(_0x4424c0(0x15f))/0x2*(parseInt(_0x4424c0(0x159))/0x3)+-parseInt(_0x4424c0(0x157))/0x4+-parseInt(_0x4424c0(0x150))/0x5*(-parseInt(_0x4424c0(0x156))/0x6)+-parseInt(_0x4424c0(0x14f))/0x7*(parseInt(_0x4424c0(0x15a))/0x8)+parseInt(_0x4424c0(0x152))/0x9*(-parseInt(_0x4424c0(0x151))/0xa)+parseInt(_0x4424c0(0x155))/0xb;if(_0x14bc44===_0x19047d)break;else _0x58081e['push'](_0x58081e['shift']());}catch(_0x5ad3f0){_0x58081e['push'](_0x58081e['shift']());}}}(a9_0xb160,0xcb6f8));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':'bff','command':a9_0x442dd0(0x160),'description':a9_0x442dd0(0x154),'risk':a9_0x442dd0(0x15b),'flags':[{...NAME_FLAG,'required':!![],'description':a9_0x442dd0(0x153)},PARAMS_FLAG],async 'execute'(_0x3098b0){const _0x2c4dfa=a9_0x442dd0,_0x413d16=parseJsonParams(_0x3098b0[_0x2c4dfa(0x15d)]('params')),_0x7c38bc=Date[_0x2c4dfa(0x15e)](),_0x2ce246=await executeSdkBff(_0x3098b0[_0x2c4dfa(0x15d)](_0x2c4dfa(0x158)),_0x413d16),_0x3d4d8e=Date[_0x2c4dfa(0x15e)]()-_0x7c38bc;return{'ok':!![],'data':{'result':_0x2ce246,'elapsed':_0x3d4d8e},'message':'BFF\x20executed\x20in\x20'+_0x3d4d8e+'ms'};}};function a9_0xb160(){const _0x55b034=['read','1473374ZRbDuy','str','now','2IdTlPx','exec','7AaktNt','110710YfPWhC','3836010DaMpmm','18UzOHSg','BFF\x20function\x20name\x20to\x20execute','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','46750ypqiXw','444PVnTRI','3127168YjiQIi','name','1110255ONBQLe','8831608VMxyyn'];a9_0xb160=function(){return _0x55b034;};return a9_0xb160();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a10_0x4f25(_0x55dc65,_0x2f68d1){_0x55dc65=_0x55dc65-0x70;const _0x1f6927=a10_0x1f69();let _0x4f25d1=_0x1f6927[_0x55dc65];return _0x4f25d1;}function a10_0x1f69(){const _0x3a55f4=['3732339VClpRT','1309136IOBKMR','4406875aagzjc','12026232TdOtAg','7PwuaWp','454244JCHXPU','1940252ZtCEiM','7947408BqXkel'];a10_0x1f69=function(){return _0x3a55f4;};return a10_0x1f69();}(function(_0x5ec7eb,_0x456efc){const _0x1a5d8d=a10_0x4f25,_0x49a61c=_0x5ec7eb();while(!![]){try{const _0x4da070=-parseInt(_0x1a5d8d(0x73))/0x1+-parseInt(_0x1a5d8d(0x70))/0x2+parseInt(_0x1a5d8d(0x72))/0x3+-parseInt(_0x1a5d8d(0x77))/0x4+-parseInt(_0x1a5d8d(0x74))/0x5+parseInt(_0x1a5d8d(0x71))/0x6+parseInt(_0x1a5d8d(0x76))/0x7*(parseInt(_0x1a5d8d(0x75))/0x8);if(_0x4da070===_0x456efc)break;else _0x49a61c['push'](_0x49a61c['shift']());}catch(_0x58bc78){_0x49a61c['push'](_0x49a61c['shift']());}}}(a10_0x1f69,0xc2c42));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1bb9b1,_0xd9d52d){const _0x19e294=a11_0x3e05,_0x2c8677=_0x1bb9b1();while(!![]){try{const _0x19c1d2=parseInt(_0x19e294(0x1a2))/0x1*(parseInt(_0x19e294(0x1ac))/0x2)+parseInt(_0x19e294(0x1a4))/0x3+parseInt(_0x19e294(0x19d))/0x4+parseInt(_0x19e294(0x19e))/0x5+parseInt(_0x19e294(0x1a8))/0x6*(parseInt(_0x19e294(0x1a3))/0x7)+parseInt(_0x19e294(0x1a5))/0x8+-parseInt(_0x19e294(0x1a0))/0x9;if(_0x19c1d2===_0xd9d52d)break;else _0x2c8677['push'](_0x2c8677['shift']());}catch(_0x4cf2fc){_0x2c8677['push'](_0x2c8677['shift']());}}}(a11_0x5666,0xd9529));import{CLI_BIN_NAME}from'../../constant/cli.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x332477){const _0x41a636=a11_0x3e05,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x2e4dd4}=_0x332477;if(explicitGlobal&&explicitProject)throw CliErrors[_0x41a636(0x1ab)](_0x41a636(0x1a7),'Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return'global';if(explicitProject)return _0x41a636(0x19a);switch(_0x2e4dd4){case _0x41a636(0x1a9):return'global';case'project-default':return _0x332477[_0x41a636(0x19b)]??isInProject()?_0x41a636(0x19a):_0x41a636(0x1a6);case _0x41a636(0x199):if(!(_0x332477['inProject']??isInProject()))throw CliErrors[_0x41a636(0x1ab)](_0x41a636(0x19c),_0x41a636(0x1aa)+CLI_BIN_NAME+_0x41a636(0x1a1));return _0x41a636(0x19a);}}export function toScopeFlags(_0x4d5e2c){const _0x118360=a11_0x3e05;return{'global':_0x4d5e2c===_0x118360(0x1a6)};}function a11_0x3e05(_0x3ea04f,_0x131fd1){_0x3ea04f=_0x3ea04f-0x199;const _0x566658=a11_0x5666();let _0x3e0515=_0x566658[_0x3ea04f];return _0x3e0515;}function a11_0x5666(){const _0x1e928=['Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','5530290sSkmTz','global-default','Add\x20--global\x20to\x20write\x20to\x20~/.lovrabet.json,\x20or\x20run\x20`','validation','2TanpWL','project-or-global-explicit','project','inProject','Not\x20inside\x20a\x20project\x20(no\x20.lovrabet.json\x20found).','2231176MzOCmo','880310yHSrtf','\x20(global)','22186764kvumwU','\x20init`\x20first.','692887MlOUKL','7LhYoiK','1878420rPkLWV','3046008uKwAgq','global'];a11_0x5666=function(){return _0x1e928;};return a11_0x5666();}export function formatScopeLabel(_0x5eae89){const _0x286a0b=a11_0x3e05;return _0x5eae89===_0x286a0b(0x1a6)?_0x286a0b(0x19f):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a12_0x59f3(){const _0x3c14e6=['416140QZKjmp','2651358LXcueM','Use\x20only\x20one\x20of:\x20','189ewjWxL','Provide\x20one\x20of:\x20','flag','\x20is\x20allowed,\x20found:\x20','8UeRCuC','121kEylHH','length','validation','1757565DroLJO','Only\x20one\x20of\x20','Flags\x20','\x20are\x20mutually\x20exclusive\x20for\x20`','5258853YCUwAu','414751TuQlbC','14296CZLami','map','Invalid\x20--','filter','740216VEgCSC','some','21zYUzbZ','\x20is\x20required\x20for\x20`'];a12_0x59f3=function(){return _0x3c14e6;};return a12_0x59f3();}(function(_0x323a8e,_0x5e57e1){const _0x3c4f3d=a12_0x4676,_0x2c3eba=_0x323a8e();while(!![]){try{const _0x39039d=-parseInt(_0x3c4f3d(0xb0))/0x1+parseInt(_0x3c4f3d(0xb5))/0x2+-parseInt(_0x3c4f3d(0xa3))/0x3*(-parseInt(_0x3c4f3d(0xb1))/0x4)+parseInt(_0x3c4f3d(0xab))/0x5+-parseInt(_0x3c4f3d(0xa1))/0x6*(-parseInt(_0x3c4f3d(0xb7))/0x7)+-parseInt(_0x3c4f3d(0xa7))/0x8*(parseInt(_0x3c4f3d(0xaf))/0x9)+parseInt(_0x3c4f3d(0xa0))/0xa*(-parseInt(_0x3c4f3d(0xa8))/0xb);if(_0x39039d===_0x5e57e1)break;else _0x2c3eba['push'](_0x2c3eba['shift']());}catch(_0x166a84){_0x2c3eba['push'](_0x2c3eba['shift']());}}}(a12_0x59f3,0xc7218));import{CliErrors}from'../../errors.js';function isSet(_0x55450d,_0x376744){const _0x508db3=a12_0x4676,_0xc88e21=_0x55450d[_0x508db3(0xa5)](_0x376744);return _0xc88e21!==undefined&&_0xc88e21!==''&&_0xc88e21!==![]&&_0xc88e21!==0x0;}function fmtNames(_0x5e5f60){const _0x2b5fd5=a12_0x4676;return _0x5e5f60[_0x2b5fd5(0xb2)](_0x3e6a60=>'--'+_0x3e6a60)['join'](',\x20');}export function requireOneOf(_0x4df6f9,_0x595d78,_0x44706f){const _0x10ff4e=a12_0x4676,_0x5edeb8=_0x595d78[_0x10ff4e(0xb4)](_0x414f32=>isSet(_0x4df6f9,_0x414f32));if(_0x5edeb8[_0x10ff4e(0xa9)]!==0x1)throw CliErrors[_0x10ff4e(0xaa)](_0x5edeb8[_0x10ff4e(0xa9)]===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x595d78)+_0x10ff4e(0x9f)+_0x44706f+'`.':_0x10ff4e(0xac)+fmtNames(_0x595d78)+_0x10ff4e(0xa6)+fmtNames(_0x5edeb8)+'.',_0x5edeb8[_0x10ff4e(0xa9)]===0x0?_0x10ff4e(0xa4)+fmtNames(_0x595d78):'Remove\x20all\x20but\x20one.');}function a12_0x4676(_0x3bd64a,_0x6c0d03){_0x3bd64a=_0x3bd64a-0x9f;const _0x59f3e6=a12_0x59f3();let _0x467601=_0x59f3e6[_0x3bd64a];return _0x467601;}export function requireAnyOf(_0x4d1119,_0xc5bb41,_0x16473d){const _0x53f5f0=a12_0x4676;if(!_0xc5bb41[_0x53f5f0(0xb6)](_0x17eff8=>isSet(_0x4d1119,_0x17eff8)))throw CliErrors[_0x53f5f0(0xaa)]('At\x20least\x20one\x20of\x20'+fmtNames(_0xc5bb41)+_0x53f5f0(0x9f)+_0x16473d+'`.',_0x53f5f0(0xa4)+fmtNames(_0xc5bb41));}export function mutuallyExclusive(_0xdc45ad,_0x114585,_0x58e845){const _0x37f6f6=a12_0x4676,_0x125f05=_0x114585[_0x37f6f6(0xb4)](_0xad30c6=>isSet(_0xdc45ad,_0xad30c6));if(_0x125f05[_0x37f6f6(0xa9)]>0x1)throw CliErrors['validation'](_0x37f6f6(0xad)+fmtNames(_0x125f05)+_0x37f6f6(0xae)+_0x58e845+'`.',_0x37f6f6(0xa2)+fmtNames(_0x114585));}export function validatePattern(_0x2696de,_0x4b123e,_0x24f49c,_0x1aca11){const _0x8edd04=a12_0x4676,_0x2e467d=_0x2696de['str'](_0x4b123e);if(_0x2e467d&&!_0x24f49c['test'](_0x2e467d))throw CliErrors[_0x8edd04(0xaa)](_0x8edd04(0xb3)+_0x4b123e+':\x20expected\x20'+_0x1aca11+',\x20got\x20\x22'+_0x2e467d+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x1ce490=a13_0x6ada;(function(_0x178ef3,_0x575f7f){const _0x24d799=a13_0x6ada,_0x130751=_0x178ef3();while(!![]){try{const _0x467ae5=parseInt(_0x24d799(0xa2))/0x1+parseInt(_0x24d799(0x9b))/0x2+-parseInt(_0x24d799(0x98))/0x3+-parseInt(_0x24d799(0x91))/0x4+-parseInt(_0x24d799(0xa3))/0x5+parseInt(_0x24d799(0x93))/0x6+parseInt(_0x24d799(0xa0))/0x7*(parseInt(_0x24d799(0x9f))/0x8);if(_0x467ae5===_0x575f7f)break;else _0x130751['push'](_0x130751['shift']());}catch(_0x9ff633){_0x130751['push'](_0x130751['shift']());}}}(a13_0x81af,0x24dbc));export const CODE_FLAG={'name':a13_0x1ce490(0x9c),'type':'string','required':!![],'description':a13_0x1ce490(0x94),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x1ce490(0xa1)}};export const SQLCODE_FLAG={'name':a13_0x1ce490(0x92),'type':a13_0x1ce490(0x9a),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};function a13_0x6ada(_0x41adf0,_0x2a6261){_0x41adf0=_0x41adf0-0x91;const _0x81af3b=a13_0x81af();let _0x6ada91=_0x81af3b[_0x41adf0];return _0x6ada91;}function a13_0x81af(){const _0x1eecdd=['32Zjrzrh','597933mmJvaq','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','49815AaGcZh','782015YIVikI','434448xsSNdG','sqlcode','1104606oGSjQq','Dataset\x20code\x20(32-char\x20hex\x20UUID)','number','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','Resource\x20ID','516162aXMoYY','params','string','24898jSqHaq','code','boolean','verbose'];a13_0x81af=function(){return _0x1eecdd;};return a13_0x81af();}export const VERBOSE_FLAG={'name':a13_0x1ce490(0x9e),'type':a13_0x1ce490(0x9d),'description':'Return\x20full\x20raw\x20response\x20object'};export const PARAMS_FLAG={'name':a13_0x1ce490(0x99),'type':a13_0x1ce490(0x9a),'description':a13_0x1ce490(0x96)};export const NAME_FLAG={'name':'name','type':a13_0x1ce490(0x9a),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':a13_0x1ce490(0x95),'required':!![],'description':a13_0x1ce490(0x97)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x3113ef=a14_0x5dc0;function a14_0x5dc0(_0x1383d1,_0x4d2cf3){_0x1383d1=_0x1383d1-0x1d7;const _0x23d9bc=a14_0x23d9();let _0x5dc082=_0x23d9bc[_0x1383d1];return _0x5dc082;}(function(_0x393faa,_0x4f7292){const _0x1081dc=a14_0x5dc0,_0x4eeceb=_0x393faa();while(!![]){try{const _0xbf12ce=parseInt(_0x1081dc(0x211))/0x1+-parseInt(_0x1081dc(0x208))/0x2+parseInt(_0x1081dc(0x1f9))/0x3+-parseInt(_0x1081dc(0x1f5))/0x4*(parseInt(_0x1081dc(0x1e9))/0x5)+-parseInt(_0x1081dc(0x20a))/0x6*(-parseInt(_0x1081dc(0x1d8))/0x7)+parseInt(_0x1081dc(0x210))/0x8*(-parseInt(_0x1081dc(0x202))/0x9)+-parseInt(_0x1081dc(0x1f0))/0xa;if(_0xbf12ce===_0x4f7292)break;else _0x4eeceb['push'](_0x4eeceb['shift']());}catch(_0x2ce125){_0x4eeceb['push'](_0x4eeceb['shift']());}}}(a14_0x23d9,0xda583));import{CliErrors}from'../../errors.js';function a14_0x23d9(){const _0x839885=['Usage:\x20','format','(none)','Set\x20`','732482jBIbag','project-or-global-explicit','560364BwrufZ','bool','\x20config\x20delete\x20<key>\x20[--global]','\x20\x20project:\x20','stringify','../../context.js','888KfzQsY','1283728VrhtTW','Deleted\x20`','log','63LgzqFh','`\x20=\x20\x22','riskLevel','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20\x20global:\x20\x20','read','global','Key\x20\x22','\x20config\x20set\x20<key>\x20<value>\x20[--global]','join','pageSize\x20must\x20be\x20a\x20positive\x20number','pageSize','delete','Missing\x20key\x20or\x20value.','\x20config\x20get\x20<key>','write','list','3365965lRiauZ','boolean','pretty','\x22\x20not\x20found\x20at\x20top\x20level.','key','set','Top-level\x20key\x20\x22','2725770Afueag','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','\x22\x20is\x20not\x20settable.','validation','includes','4ESJjuM','config','Set\x20a\x20config\x20value','object','582891JbZBaQ','split','get','\x22.\x20Allowed:\x20','Config\x20files:\x0a','args','Invalid\x20value\x20for\x20\x22','Settable\x20top-level\x20keys:\x20','Key\x20not\x20found:\x20','9099giPnLJ','raw'];a14_0x23d9=function(){return _0x839885;};return a14_0x23d9();}import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a14_0x3113ef(0x1de),'type':a14_0x3113ef(0x1ea),'description':'Write\x20to\x20global\x20config','default':![]},listDef={'service':a14_0x3113ef(0x1f6),'command':a14_0x3113ef(0x1e8),'description':'List\x20current\x20config','risk':a14_0x3113ef(0x1dd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x438d99){const _0x1210db=a14_0x3113ef,{buildConfigFromFlags:_0x7e7ccf}=await import(_0x1210db(0x20f)),_0x20df85=_0x7e7ccf({}),_0x378861=getProjectConfigPath(),_0x537bf2=resolveWriteConfigPath('global');if(_0x438d99[_0x1210db(0x205)]===_0x1210db(0x1eb))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x1210db(0x20e)](_0x20df85['raw'],null,0x2)+'\x0a\x0a')+_0x1210db(0x1fd)+(_0x1210db(0x20d)+(_0x378861??_0x1210db(0x206))+'\x0a')+(_0x1210db(0x1dc)+_0x537bf2)};return{'ok':!![],'data':{'effective':_0x20df85[_0x1210db(0x203)],'configFiles':{'project':_0x378861??null,'global':_0x537bf2}}};}},getDef={'service':a14_0x3113ef(0x1f6),'command':a14_0x3113ef(0x1fb),'description':'Get\x20a\x20config\x20value','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x3113ef(0x1ed),'description':a14_0x3113ef(0x1f1),'required':!![]}],'flags':[],async 'execute'(_0x1bc90c){const _0x5706b5=a14_0x3113ef,_0x28f6dc=_0x1bc90c[_0x5706b5(0x1fe)][0x0];if(!_0x28f6dc)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x5706b5(0x204)+CLI_BIN_NAME+_0x5706b5(0x1e6));const {buildConfigFromFlags:_0x8e4d23}=await import(_0x5706b5(0x20f)),{raw:_0xa88735}=_0x8e4d23({});if(_0x28f6dc[_0x5706b5(0x1f4)]('.')){const _0x380cd3=_0x28f6dc[_0x5706b5(0x1fa)]('.');let _0x5eeb4f=_0xa88735;for(const _0x1a97e8 of _0x380cd3){if(_0x5eeb4f==null||typeof _0x5eeb4f!=='object')throw CliErrors['validation'](_0x5706b5(0x201)+_0x28f6dc);_0x5eeb4f=_0x5eeb4f[_0x1a97e8];}if(_0x5eeb4f===undefined)throw CliErrors['validation'](_0x5706b5(0x201)+_0x28f6dc);return console['log'](typeof _0x5eeb4f==='object'?JSON[_0x5706b5(0x20e)](_0x5eeb4f,null,0x2):String(_0x5eeb4f)),{'ok':!![]};}const _0x159e14=_0xa88735[_0x28f6dc];if(_0x159e14===undefined)throw CliErrors[_0x5706b5(0x1f3)](_0x5706b5(0x201)+_0x28f6dc);return console[_0x5706b5(0x1d7)](typeof _0x159e14===_0x5706b5(0x1f8)?JSON['stringify'](_0x159e14,null,0x2):String(_0x159e14)),{'ok':!![]};}},setDef={'service':a14_0x3113ef(0x1f6),'command':a14_0x3113ef(0x1ee),'description':a14_0x3113ef(0x1f7),'risk':a14_0x3113ef(0x1e7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x3113ef(0x1ed),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x3a19c6){const _0x42972b=a14_0x3113ef,_0x20b286=_0x3a19c6['args'][0x0],_0x126d30=_0x3a19c6[_0x42972b(0x1fe)][0x1];if(!_0x20b286||_0x126d30===undefined)throw CliErrors[_0x42972b(0x1f3)](_0x42972b(0x1e5),'Usage:\x20'+CLI_BIN_NAME+_0x42972b(0x1e0));if(ENUM_KEYS[_0x20b286]&&!ENUM_KEYS[_0x20b286][_0x42972b(0x1f4)](_0x126d30))throw CliErrors[_0x42972b(0x1f3)](_0x42972b(0x1ff)+_0x20b286+_0x42972b(0x1fc)+ENUM_KEYS[_0x20b286][_0x42972b(0x1e1)](',\x20'));if(_0x20b286===_0x42972b(0x1da))throw CliErrors[_0x42972b(0x1f3)](_0x42972b(0x1db));if(_0x20b286===_0x42972b(0x1e3)){const _0x2eba6b=Number(_0x126d30);if(isNaN(_0x2eba6b)||_0x2eba6b<=0x0)throw CliErrors[_0x42972b(0x1f3)](_0x42972b(0x1e2));}const _0x15e6c7=resolveWriteScope({'explicitGlobal':_0x3a19c6[_0x42972b(0x20b)](_0x42972b(0x1de)),'policy':_0x42972b(0x209)}),_0xf2083f=toScopeFlags(_0x15e6c7),_0x1d0183=readScopedConfig(_0xf2083f);if(!isTopLevelConfigKey(_0x20b286))throw CliErrors['validation'](_0x42972b(0x1ef)+_0x20b286+_0x42972b(0x1f2),_0x42972b(0x200)+getTopLevelConfigKeySummary());return _0x1d0183[_0x20b286]=_0x20b286===_0x42972b(0x1e3)?Number(_0x126d30):_0x126d30,console[_0x42972b(0x1d7)](_0x42972b(0x207)+_0x20b286+_0x42972b(0x1d9)+_0x126d30+'\x22'+(_0x15e6c7===_0x42972b(0x1de)?'\x20(global)':'')),writeScopedConfig(_0x1d0183,_0xf2083f),{'ok':!![]};}},deleteDef={'service':a14_0x3113ef(0x1f6),'command':a14_0x3113ef(0x1e4),'description':'Delete\x20a\x20config\x20value','risk':a14_0x3113ef(0x1e7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x3113ef(0x1ed),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x51e95c){const _0x438ddc=a14_0x3113ef,_0x519b56=_0x51e95c['args'][0x0];if(!_0x519b56)throw CliErrors[_0x438ddc(0x1f3)]('Missing\x20key\x20argument.',_0x438ddc(0x204)+CLI_BIN_NAME+_0x438ddc(0x20c));const _0x719e5d=resolveWriteScope({'explicitGlobal':_0x51e95c[_0x438ddc(0x20b)](_0x438ddc(0x1de)),'policy':_0x438ddc(0x209)}),_0x152b2f=toScopeFlags(_0x719e5d),_0x172eec=readScopedConfig(_0x152b2f);if(_0x172eec[_0x519b56]===undefined)throw CliErrors['validation'](_0x438ddc(0x1df)+_0x519b56+_0x438ddc(0x1ec));return delete _0x172eec[_0x519b56],console[_0x438ddc(0x1d7)](_0x438ddc(0x212)+_0x519b56+'`'+(_0x719e5d==='global'?'\x20(global)':'')),writeScopedConfig(_0x172eec,_0x152b2f),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2905f5,_0x5adbeb){var _0x4202bd=a15_0x4386,_0x1a2156=_0x2905f5();while(!![]){try{var _0x443c44=parseInt(_0x4202bd(0x8d))/0x1+parseInt(_0x4202bd(0x92))/0x2*(-parseInt(_0x4202bd(0x8a))/0x3)+-parseInt(_0x4202bd(0x8e))/0x4+parseInt(_0x4202bd(0x93))/0x5*(-parseInt(_0x4202bd(0x90))/0x6)+parseInt(_0x4202bd(0x91))/0x7*(-parseInt(_0x4202bd(0x8f))/0x8)+parseInt(_0x4202bd(0x8b))/0x9+parseInt(_0x4202bd(0x8c))/0xa;if(_0x443c44===_0x5adbeb)break;else _0x1a2156['push'](_0x1a2156['shift']());}catch(_0x50d147){_0x1a2156['push'](_0x1a2156['shift']());}}}(a15_0x22f3,0x6755f));function a15_0x4386(_0x4c4588,_0x430efb){_0x4c4588=_0x4c4588-0x8a;var _0x22f38a=a15_0x22f3();var _0x438696=_0x22f38a[_0x4c4588];return _0x438696;}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a15_0x22f3(){var _0x145f19=['1461123yRMutW','19786120xQuNxj','60073kAMULV','2840440rRPgoh','56RXEwNG','124482zRtwcr','46781AUrtoV','1211876xvJbcI','100fiYqPq','3iTgtZJ'];a15_0x22f3=function(){return _0x145f19;};return a15_0x22f3();}export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
|