@lovrabet/lovrabet-cli 2.0.9-beta.5 → 2.0.9-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/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/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.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/distribution.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/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
(function(_0x254067,_0xc24d15){const _0x24c548=a0_0x6af5,_0x1eec81=_0x254067();while(!![]){try{const _0xc32a84=parseInt(_0x24c548(0x9f))/0x1*(-parseInt(_0x24c548(0xa1))/0x2)+-parseInt(_0x24c548(0x9d))/0x3*(parseInt(_0x24c548(0x9a))/0x4)+parseInt(_0x24c548(0x98))/0x5+-parseInt(_0x24c548(0x90))/0x6+-parseInt(_0x24c548(0xa5))/0x7+-parseInt(_0x24c548(0x89))/0x8*(-parseInt(_0x24c548(0xa2))/0x9)+-parseInt(_0x24c548(0x85))/0xa*(-parseInt(_0x24c548(0x96))/0xb);if(_0xc32a84===_0xc24d15)break;else _0x1eec81['push'](_0x1eec81['shift']());}catch(_0x3940b1){_0x1eec81['push'](_0x1eec81['shift']());}}}(a0_0x3876,0x48bb2));import{jsx as a0_0x5b2207}from'react/jsx-runtime';import a0_0x57b97c 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';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x57b97c(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});function a0_0x6af5(_0x50d95b,_0x13d110){_0x50d95b=_0x50d95b-0x84;const _0x38760a=a0_0x3876();let _0x6af582=_0x38760a[_0x50d95b];return _0x6af582;}void main()['catch'](handleError);async function main(){try{await run();}catch(_0x29bbcc){handleError(_0x29bbcc);}}async function run(){const _0x331971=a0_0x6af5;let _0x4c4c79=cli[_0x331971(0xa0)][0x0],_0x33afa5=cli['input'][0x1];const _0x2d0a78=cli['flags'];try{const {correctFlags:_0x4fbe16}=await import('./framework/preparse.js'),_0x5a6761=getAllDefinitions()[_0x331971(0xac)](_0x4255e4=>_0x4255e4[_0x331971(0xa9)]??[]),{flags:_0xe84612,corrections:_0x13aa1b}=_0x4fbe16(_0x2d0a78,_0x5a6761);if(_0x13aa1b[_0x331971(0x8f)]>0x0){for(const _0x55f880 of _0x13aa1b){process[_0x331971(0x8b)][_0x331971(0xa3)](_0x331971(0x8a)+_0x55f880[_0x331971(0x8d)]+_0x331971(0x94)+_0x55f880[_0x331971(0x97)]+_0x331971(0x8e)+_0x55f880[_0x331971(0xa4)]+'\x0a');}Object['assign'](_0x2d0a78,_0xe84612);}}catch{}if(!_0x4c4c79||!isKnownService(_0x4c4c79)){const {waitUntilExit:_0x159f51}=render(a0_0x5b2207(Help,{}));await _0x159f51();return;}const _0x24d0a6=getServiceEntry(_0x4c4c79);if(!_0x33afa5){if(_0x2d0a78[_0x331971(0xaa)]){console[_0x331971(0x88)](generateServiceHelp(_0x4c4c79));return;}if(_0x24d0a6[_0x331971(0x87)])_0x33afa5=_0x24d0a6[_0x331971(0x87)];else{console[_0x331971(0x88)](generateServiceHelp(_0x4c4c79));return;}}const _0x2a5ef4=findDefinition(_0x4c4c79,_0x33afa5);!_0x2a5ef4&&(console[_0x331971(0x88)](generateServiceHelp(_0x4c4c79)),handleError(CliErrors[_0x331971(0x84)](_0x4c4c79+'\x20'+_0x33afa5)));if(_0x2d0a78['help']){console['log'](generateCommandHelp(_0x2a5ef4));return;}const _0x56bb34=buildConfigFromFlags(_0x2d0a78);await initGlobalEnvironment(_0x56bb34);const _0x3d015f=createPipelineEnv(_0x56bb34,_0x2d0a78);_0x3d015f['args']=cli[_0x331971(0xa0)][_0x331971(0xa6)](0x2),await runCommand(_0x2a5ef4,_0x3d015f);}function handleError(_0x1e58f2){const _0x33a033=a0_0x6af5;if(_0x1e58f2 instanceof CliError){_0x1e58f2[_0x33a033(0x93)]===_0x33a033(0x99)&&(process[_0x33a033(0x8b)][_0x33a033(0xa3)](_0x33a033(0x8c)),process[_0x33a033(0x9e)](0x0));console[_0x33a033(0x9b)](_0x33a033(0x95)+_0x1e58f2[_0x33a033(0x91)]);if(_0x1e58f2[_0x33a033(0x9c)])console[_0x33a033(0x9b)](_0x33a033(0xa8)+_0x1e58f2[_0x33a033(0x9c)]);process['exit'](_0x1e58f2[_0x33a033(0x92)]);}isUserCancellation(_0x1e58f2)&&(process[_0x33a033(0x8b)][_0x33a033(0xa3)](_0x33a033(0x8c)),process[_0x33a033(0x9e)](0x0)),console[_0x33a033(0x9b)]('Unexpected\x20error:',_0x1e58f2),process[_0x33a033(0x9e)](0x1);}function isUserCancellation(_0x2adc0d){const _0x5d6210=a0_0x6af5;if(!(_0x2adc0d instanceof Error))return![];if(_0x2adc0d[_0x5d6210(0xab)]===_0x5d6210(0x86))return!![];if(_0x2adc0d['code']==='ERR_USE_AFTER_CLOSE')return!![];if(_0x2adc0d[_0x5d6210(0x93)]===_0x5d6210(0xa7))return!![];return![];}function a0_0x3876(){const _0x22d19d=['slice','ERR_STREAM_DESTROYED','Hint:\x20','flags','help','name','flatMap','unknownCommand','10ysQHyp','ExitPromptError','defaultCommand','log','552LWIHxb','[preparse]\x20','stderr','\x0aCancelled.\x0a','handler','\x20->\x20--','length','1509036Wkyjpq','message','exitCode','code',':\x20--','Error:\x20','14297987JWVVeq','original','251435KdviAH','cancelled','16WaGBlD','error','hint','72249llqkQt','exit','1579YCKjnC','input','748VwqLZB','2898hnPYiW','write','corrected','952224lkmyov'];a0_0x3876=function(){return _0x22d19d;};return a0_0x3876();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x182d0e,_0x4a1b26){const _0xdcc7ea=a1_0x56a0,_0x1e06d6=_0x182d0e();while(!![]){try{const _0x4b12ca=parseInt(_0xdcc7ea(0x124))/0x1*(-parseInt(_0xdcc7ea(0x128))/0x2)+parseInt(_0xdcc7ea(0x132))/0x3+-parseInt(_0xdcc7ea(0x137))/0x4+parseInt(_0xdcc7ea(0x130))/0x5+-parseInt(_0xdcc7ea(0x135))/0x6*(parseInt(_0xdcc7ea(0x125))/0x7)+-parseInt(_0xdcc7ea(0x11e))/0x8*(parseInt(_0xdcc7ea(0x12b))/0x9)+parseInt(_0xdcc7ea(0x122))/0xa;if(_0x4b12ca===_0x4a1b26)break;else _0x1e06d6['push'](_0x1e06d6['shift']());}catch(_0x2fb437){_0x1e06d6['push'](_0x1e06d6['shift']());}}}(a1_0xe97d,0x5787d));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';function a1_0x56a0(_0x4a7b2c,_0x573d15){_0x4a7b2c=_0x4a7b2c-0x11a;const _0xe97d1d=a1_0xe97d();let _0x56a0c7=_0xe97d1d[_0x4a7b2c];return _0x56a0c7;}export function fingerprintAccessKey(_0x431f0c){const _0x58f6dd=a1_0x56a0,_0x5dc2c3=_0x431f0c[_0x58f6dd(0x131)](),_0x2fc642=_0x5dc2c3[_0x58f6dd(0x136)](-0x6)||'unknown',_0x534b76=createHash(_0x58f6dd(0x126))[_0x58f6dd(0x12f)](_0x5dc2c3)[_0x58f6dd(0x120)](_0x58f6dd(0x12e))[_0x58f6dd(0x136)](0x0,0xc);return _0x58f6dd(0x11a)+_0x2fc642+'_'+_0x534b76;}export function getAppCacheFilePath(_0x3da61a,_0x4de923){const _0x298cec=a1_0x56a0;return resolve(homedir(),PRODUCT_CONFIG['homeDirName'],_0x298cec(0x134),_0x3da61a,fingerprintAccessKey(_0x4de923),_0x298cec(0x127));}function a1_0xe97d(){const _0x45d21d=['1qFdgJd','7VHpnRY','sha256','my-apps.json','22898ATMTJI','items','parse','232722DQQhie','appCode','stringify','hex','update','3099375eKMluS','trim','816744bMXQhD','isArray','cache','2794866gvfzHB','slice','1724540cRwzjt','ak_','find','EPERM','utf8','136VlaTll','.tmp','digest','code','8143830zKXgBR','appName'];a1_0xe97d=function(){return _0x45d21d;};return a1_0xe97d();}export function readCachedAppList(_0x1555b4,_0x52050d){const _0x3137fc=a1_0x56a0;if(!_0x52050d?.[_0x3137fc(0x131)]())return null;const _0x45039e=getAppCacheFilePath(_0x1555b4,_0x52050d);if(!existsSync(_0x45039e))return null;try{const _0x160399=readFileSync(_0x45039e,_0x3137fc(0x11d));if(!_0x160399[_0x3137fc(0x131)]())return null;const _0x3d08d5=JSON[_0x3137fc(0x12a)](_0x160399);if(!Array[_0x3137fc(0x133)](_0x3d08d5[_0x3137fc(0x129)]))return null;return _0x3d08d5;}catch{return null;}}export function writeCachedAppList(_0x2cec1b,_0x4f86fe,_0x5c382d){const _0x2b8e10=a1_0x56a0,_0x17bb46=getAppCacheFilePath(_0x2cec1b,_0x4f86fe),_0x50b0f3=dirname(_0x17bb46);!existsSync(_0x50b0f3)&&mkdirSync(_0x50b0f3,{'recursive':!![]});const _0x52df7a=_0x17bb46+_0x2b8e10(0x11f);try{writeFileSync(_0x52df7a,JSON[_0x2b8e10(0x12d)](_0x5c382d,null,0x2)+'\x0a',{'encoding':_0x2b8e10(0x11d),'mode':0x180});try{renameSync(_0x52df7a,_0x17bb46);}catch(_0x1ddc91){if(_0x1ddc91[_0x2b8e10(0x121)]===_0x2b8e10(0x11c)||_0x1ddc91[_0x2b8e10(0x121)]==='EXDEV'||_0x1ddc91[_0x2b8e10(0x121)]==='EACCES'){writeFileSync(_0x17bb46,JSON[_0x2b8e10(0x12d)](_0x5c382d,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x52df7a);}catch{}}else throw _0x1ddc91;}}catch(_0x56cc3){try{unlinkSync(_0x52df7a);}catch{}throw _0x56cc3;}return _0x17bb46;}export function resolveCachedAppCode(_0x42e47d,_0x1a4eec,_0x1bd3b6){const _0xc55fa2=a1_0x56a0;if(!_0x42e47d)return undefined;const _0x130aef=readCachedAppList(_0x1a4eec,_0x1bd3b6),_0x3a27c9=_0x130aef?.['items'][_0xc55fa2(0x11b)](_0x1148c4=>_0x1148c4[_0xc55fa2(0x123)]===_0x42e47d);return _0x3a27c9?.[_0xc55fa2(0x12c)]?.[_0xc55fa2(0x131)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x36bba5=a2_0x471b;(function(_0x3f7aa7,_0x20cd3c){const _0x33a803=a2_0x471b,_0x26abfb=_0x3f7aa7();while(!![]){try{const _0x2cdc86=-parseInt(_0x33a803(0x117))/0x1+parseInt(_0x33a803(0x121))/0x2+parseInt(_0x33a803(0x141))/0x3*(parseInt(_0x33a803(0x119))/0x4)+parseInt(_0x33a803(0x161))/0x5*(-parseInt(_0x33a803(0x14a))/0x6)+parseInt(_0x33a803(0x12d))/0x7*(parseInt(_0x33a803(0x11a))/0x8)+-parseInt(_0x33a803(0x12f))/0x9*(-parseInt(_0x33a803(0x120))/0xa)+-parseInt(_0x33a803(0x135))/0xb;if(_0x2cdc86===_0x20cd3c)break;else _0x26abfb['push'](_0x26abfb['shift']());}catch(_0x22daf7){_0x26abfb['push'](_0x26abfb['shift']());}}}(a2_0x1604,0xdd820));function a2_0x1604(){const _0x11ba97=['filter','Remote\x20app\x20name\x20to\x20activate','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','7323070OvYzak','1453698ZFcZIU','Use\x20`','enableI18n','items','Read\x20from\x20local\x20cache\x20only','defaultApp','\x20app(s)\x20for\x20env=\x22','Use\x20global\x20config\x20scope','Set\x20the\x20fallback\x20app\x20candidate','read','import','global','576751quFJIy','nonInteractive','18ROIiwg','cachePath','../../commands/app/cache.js','project-default','App\x20\x22','appcode','31667449ZrQprC','No\x20cached\x20apps\x20found.','entries','Initialize\x20','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','init','isCurrent','langs','../../commands/app/remote-source.js','source','production','../../context.js','33eTacKD','\x22\x20not\x20found.','push','join','map','appName','\x20config\x20file','accessKey','no-cache','3042708WRiuEw','boolean','bool','cache','config','mergedCli','trim','Filter\x20by\x20environment\x20(default:\x20current\x20env)','fetchedAt','str','type','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','i18nInfo','local','.appcode\x20to\x20.lovrabet.json.','\x20cached\x20app(s)\x20for\x20env=\x22','validation','args','appPublishStatus','length','appCode','string','5BrXymY','env','app','Read\x20app\x20list\x20from\x20local\x20cache\x20only','Target\x20environment\x20(default:\x20current\x20env)','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','write','Loaded\x20','Missing\x20app\x20name.','envName','503241UABZjz','\x20app\x20use\x20<name>\x20[--global]','527836oZYKIQ','112qqeHzX','Refreshed\x20app\x20cache\x20with\x20','name'];a2_0x1604=function(){return _0x11ba97;};return a2_0x1604();}import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,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':'global','type':a2_0x36bba5(0x14b),'description':a2_0x36bba5(0x128),'default':![]};function a2_0x471b(_0x22a1b5,_0x414d48){_0x22a1b5=_0x22a1b5-0x113;const _0x1604f7=a2_0x1604();let _0x471bc1=_0x1604f7[_0x22a1b5];return _0x471bc1;}function collectFlags(_0x2f0f5c,_0x16b92d){const _0x34a577=a2_0x36bba5,_0x4de83c={};for(const _0x15e2e0 of _0x16b92d){const _0x3c8cd1=_0x15e2e0[_0x34a577(0x154)]===_0x34a577(0x14b)?_0x2f0f5c[_0x34a577(0x14c)](_0x15e2e0[_0x34a577(0x11c)]):_0x2f0f5c[_0x34a577(0x153)](_0x15e2e0[_0x34a577(0x11c)]);if(_0x3c8cd1!==''&&_0x3c8cd1!==![])_0x4de83c[_0x15e2e0[_0x34a577(0x11c)]]=_0x3c8cd1;}if(_0x2f0f5c[_0x34a577(0x12e)])_0x4de83c[_0x34a577(0x12e)]=!![];return _0x4de83c;}function normalizeLanguages(_0x619881){const _0x165603=a2_0x36bba5;if(!Array['isArray'](_0x619881))return[];return _0x619881['filter'](_0x5e62ff=>typeof _0x5e62ff===_0x165603(0x160))[_0x165603(0x145)](_0x15fd10=>_0x15fd10[_0x165603(0x150)]())[_0x165603(0x11d)](Boolean);}function buildRemoteAppI18nFields(_0x1d627b){const _0x145a2b=a2_0x36bba5,_0x56bf57=normalizeLanguages(_0x1d627b[_0x145a2b(0x157)]?.[_0x145a2b(0x13c)]);return{'enableI18n':typeof _0x1d627b[_0x145a2b(0x123)]===_0x145a2b(0x14b)?_0x1d627b[_0x145a2b(0x123)]:null,'languages':_0x56bf57,'i18nInfo':_0x1d627b[_0x145a2b(0x157)]?{..._0x1d627b[_0x145a2b(0x157)],'langs':_0x56bf57['length']?_0x56bf57:null}:null};}const initDef={'service':a2_0x36bba5(0x163),'command':a2_0x36bba5(0x13a),'description':a2_0x36bba5(0x138)+PRODUCT_CONFIG['newConfigFileName']+a2_0x36bba5(0x147),'risk':a2_0x36bba5(0x113),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x23bce9){return await runInit(collectFlags(_0x23bce9,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':'app','command':'list','description':a2_0x36bba5(0x166),'risk':a2_0x36bba5(0x12a),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x36bba5(0x162),'type':a2_0x36bba5(0x160),'description':a2_0x36bba5(0x151),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x36bba5(0x158),'type':a2_0x36bba5(0x14b),'description':a2_0x36bba5(0x164),'default':![]},{'name':a2_0x36bba5(0x149),'type':'boolean','description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x241035){const _0x4ff5de=a2_0x36bba5,_0x58c472=_0x241035['str'](_0x4ff5de(0x162))||_0x241035[_0x4ff5de(0x116)]||getEnv()||_0x4ff5de(0x13f),_0x4847ff=_0x241035[_0x4ff5de(0x14c)]('local'),_0x5d337c=_0x241035[_0x4ff5de(0x14c)](_0x4ff5de(0x149)),{readRawConfigWithLayers:_0x3d32ae,resolveDefaultAppSource:_0x2147fe,getLocalAppAliases:_0x4f819e}=await import(_0x4ff5de(0x140)),{getRemoteAppList:_0x5338f6}=await import(_0x4ff5de(0x13d)),{config:_0x5a83f3,layers:_0x463d50}=_0x3d32ae(),_0x3d9242=_0x2147fe(_0x463d50),{defaultApp:_0x15387e}=_0x5a83f3,_0x4a5b78=await _0x5338f6({'env':_0x58c472,'accessKey':_0x241035[_0x4ff5de(0x148)],'localOnly':_0x4847ff,'noCache':_0x5d337c}),_0x3e079a=_0x4a5b78[_0x4ff5de(0x124)][_0x4ff5de(0x145)](_0x4311d1=>{const _0x3f2411=_0x4ff5de;return{'name':_0x4311d1[_0x3f2411(0x146)],'appcode':_0x4311d1[_0x3f2411(0x15f)],'named':!![],'definedIn':'remote','isDefault':_0x4311d1[_0x3f2411(0x146)]===_0x15387e,...buildAppProfileListFields(_0x58c472),...buildRemoteAppI18nFields(_0x4311d1),'source':_0x4a5b78[_0x3f2411(0x13e)],'owner':_0x4311d1['appOwnerName']??null,'status':_0x4311d1[_0x3f2411(0x15d)]??null,'cachedAt':_0x4a5b78[_0x3f2411(0x152)]};}),_0x5afae9=_0x4f819e(_0x5a83f3);let _0x1b1f59=0x0;for(const [_0x256c53,_0x547233]of Object[_0x4ff5de(0x137)](_0x5afae9)){const _0x5453fb=typeof _0x547233[_0x4ff5de(0x134)]==='string'?_0x547233[_0x4ff5de(0x134)]['trim']():'';if(!_0x5453fb)continue;_0x1b1f59+=0x1,_0x3e079a[_0x4ff5de(0x143)]({'name':_0x256c53,'appcode':_0x5453fb,'named':!![],'definedIn':_0x4ff5de(0x158),'isDefault':_0x256c53===_0x15387e,...buildAppProfileListFields(_0x58c472),'source':_0x4ff5de(0x14e),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x3e079a,_0x241035[_0x4ff5de(0x14f)]);if(_0x3e079a['length']===0x0)return{'ok':!![],'data':[],'message':_0x4a5b78[_0x4ff5de(0x13e)]===_0x4ff5de(0x14d)?_0x4ff5de(0x136):'No\x20apps\x20found\x20on\x20the\x20platform.'};const _0x2030b2=_0x3e079a['find'](_0x16413e=>_0x16413e[_0x4ff5de(0x13b)]===!![]),_0x52cc88=_0x15387e??_0x2030b2?.[_0x4ff5de(0x11c)]??null,_0x390e4f={'env':_0x58c472,'source':_0x4a5b78[_0x4ff5de(0x13e)],'fetchedAt':_0x4a5b78[_0x4ff5de(0x152)],'cachePath':_0x4a5b78[_0x4ff5de(0x130)],'globalPath':_0x463d50['globalPath']??null,'projectPath':_0x463d50['projectPath']??null,'defaultApp':_0x52cc88,'defaultAppSource':_0x15387e!=null?_0x3d9242:null,'localAliasCount':_0x1b1f59};return{'ok':!![],'data':{'items':_0x3e079a,'meta':_0x390e4f}};}},pullDef={'service':a2_0x36bba5(0x163),'command':'pull','description':a2_0x36bba5(0x139),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':'string','description':a2_0x36bba5(0x165),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x36bba5(0x14b),'description':a2_0x36bba5(0x125),'default':![]},{'name':a2_0x36bba5(0x149),'type':a2_0x36bba5(0x14b),'description':a2_0x36bba5(0x11f),'default':![]}],async 'execute'(_0xf242d6){const _0x23f9bf=a2_0x36bba5,_0x1cb7dc=_0xf242d6[_0x23f9bf(0x153)](_0x23f9bf(0x162))||_0xf242d6[_0x23f9bf(0x116)]||getEnv()||_0x23f9bf(0x13f),_0x345949=_0xf242d6[_0x23f9bf(0x14c)]('local'),_0xf35789=_0xf242d6[_0x23f9bf(0x14c)](_0x23f9bf(0x149)),{getRemoteAppList:_0x11a240}=await import('../../commands/app/remote-source.js'),_0x5ec276=await _0x11a240({'env':_0x1cb7dc,'accessKey':_0xf242d6[_0x23f9bf(0x148)],'localOnly':_0x345949,'noCache':_0xf35789});return{'ok':!![],'data':{'total':_0x5ec276[_0x23f9bf(0x124)][_0x23f9bf(0x15e)],'env':_0x1cb7dc,'source':_0x5ec276['source'],'fetchedAt':_0x5ec276[_0x23f9bf(0x152)],'cachePath':_0x5ec276['cachePath']},'message':_0x5ec276[_0x23f9bf(0x13e)]===_0x23f9bf(0x14d)?_0x23f9bf(0x114)+_0x5ec276['items'][_0x23f9bf(0x15e)]+_0x23f9bf(0x15a)+_0x1cb7dc+'\x22.':_0x23f9bf(0x11b)+_0x5ec276[_0x23f9bf(0x124)][_0x23f9bf(0x15e)]+_0x23f9bf(0x127)+_0x1cb7dc+'\x22.'};}},useDef={'service':'app','command':'use','description':a2_0x36bba5(0x129),'risk':a2_0x36bba5(0x113),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x36bba5(0x11c),'description':a2_0x36bba5(0x11e),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x14e4a3){const _0x1274c2=a2_0x36bba5;if(!_0x14e4a3[_0x1274c2(0x15c)][0x0])throw CliErrors[_0x1274c2(0x15b)](_0x1274c2(0x115),'Usage:\x20'+CLI_BIN_NAME+_0x1274c2(0x118));},async 'execute'(_0x52cf88){const _0x5ad727=a2_0x36bba5,_0x1896bc=_0x52cf88['args'][0x0];if(!_0x1896bc)throw CliErrors['validation'](_0x5ad727(0x115),'Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x42fbb3,resolveLocalAppAliasCode:_0x408d8c}=await import(_0x5ad727(0x140)),{readCachedAppList:_0x2d9036}=await import(_0x5ad727(0x131)),_0x32e1fb=_0x52cf88[_0x5ad727(0x153)](_0x5ad727(0x162)),_0x45d490=_0x42fbb3(_0x32e1fb?{'env':_0x32e1fb}:{}),_0x1fac56=_0x2d9036(_0x45d490[_0x5ad727(0x162)],_0x45d490[_0x5ad727(0x148)]),_0x5ebcf9=_0x1fac56?.[_0x5ad727(0x124)]['find'](_0x718e78=>_0x718e78[_0x5ad727(0x146)]===_0x1896bc),_0x475817=_0x408d8c(_0x45d490['raw']??{},_0x1896bc);if(!_0x5ebcf9&&!_0x475817&&_0x45d490[_0x5ad727(0x126)]!==_0x1896bc){const _0x5a1fe2=[..._0x1fac56?.[_0x5ad727(0x124)][_0x5ad727(0x145)](_0x25b91a=>_0x25b91a[_0x5ad727(0x146)])??[]],_0x4dca80=_0x5a1fe2[_0x5ad727(0x15e)]===0x0?_0x5ad727(0x122)+CLI_BIN_NAME+_0x5ad727(0x156)+_0x1896bc+_0x5ad727(0x159):'Available\x20remote\x20apps:\x20'+Array['from'](new Set(_0x5a1fe2))[_0x5ad727(0x144)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors[_0x5ad727(0x15b)](_0x5ad727(0x133)+_0x1896bc+_0x5ad727(0x142),_0x4dca80);}const _0x4c6447=_0x52cf88[_0x5ad727(0x14c)](_0x5ad727(0x12c));let _0x1ba403;if(_0x4c6447)_0x1ba403={'global':!![]};else{const {isInProject:_0x4032a5}=await import(_0x5ad727(0x140)),_0x19ef9d=_0x4032a5();_0x1ba403=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x5ad727(0x132),'inProject':_0x19ef9d}));}const _0x5a1b60=readConfig(_0x1ba403);return _0x5a1b60[_0x5ad727(0x126)]=_0x1896bc,writeConfig(_0x5a1b60,_0x1ba403),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0x1896bc+'\x22'+scopeLabel(_0x1ba403)+'.'};}},importDef={'service':a2_0x36bba5(0x163),'command':a2_0x36bba5(0x12b),'description':a2_0x36bba5(0x155),'risk':a2_0x36bba5(0x113),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x33a115){return await runInitImport(collectFlags(_0x33a115,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
function a2_0x5a39(){const _0x31be32=['Default\x20app\x20candidate\x20set\x20to\x20\x22','\x20cached\x20app(s)\x20for\x20env=\x22','pull','1ZHPbsB','Use\x20`','boolean','14WoMGoK','bool','length','1098582syEgHL','push','write','import','appcode','entries','Loaded\x20','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','Read\x20from\x20local\x20cache\x20only','Missing\x20app\x20name.','local','appOwnerName','766184EVlPnN','Read\x20app\x20list\x20from\x20local\x20cache\x20only','production','read','i18nInfo','Initialize\x20','../../context.js','735933VghjqS','find','filter','cache','validation','\x20app\x20use\x20<name>\x20[--global]','cachePath','no-cache','trim','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','str','map','App\x20\x22','2460095KFpYTC','accessKey','global','name','Available\x20remote\x20apps:\x20','875432VLuoye','globalPath','env','type','raw','../../commands/app/cache.js','use','Refreshed\x20app\x20cache\x20with\x20','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','items','isArray','3143504ltQpJw','Use\x20global\x20config\x20scope','\x22\x20not\x20found.','config','string','fetchedAt','../../commands/app/remote-source.js','init','defaultApp','Set\x20the\x20fallback\x20app\x20candidate','app','enableI18n','Usage:\x20','Target\x20environment\x20(default:\x20current\x20env)','appName','project-default','\x20config\x20file','args','source','nonInteractive','projectPath','1411614cZFVrw','from'];a2_0x5a39=function(){return _0x31be32;};return a2_0x5a39();}const a2_0xcc871d=a2_0x2638;(function(_0x503f7d,_0x2cf1ef){const _0x12002e=a2_0x2638,_0x1b6116=_0x503f7d();while(!![]){try{const _0x36a0e7=parseInt(_0x12002e(0x182))/0x1*(-parseInt(_0x12002e(0x144))/0x2)+parseInt(_0x12002e(0x14b))/0x3+-parseInt(_0x12002e(0x15d))/0x4+parseInt(_0x12002e(0x158))/0x5+-parseInt(_0x12002e(0x188))/0x6*(-parseInt(_0x12002e(0x185))/0x7)+-parseInt(_0x12002e(0x168))/0x8+parseInt(_0x12002e(0x17d))/0x9;if(_0x36a0e7===_0x2cf1ef)break;else _0x1b6116['push'](_0x1b6116['shift']());}catch(_0x4cf295){_0x1b6116['push'](_0x1b6116['shift']());}}}(a2_0x5a39,0x40d0a));import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,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_0xcc871d(0x15a),'type':a2_0xcc871d(0x184),'description':a2_0xcc871d(0x169),'default':![]};function collectFlags(_0x4a73c6,_0x2a3b35){const _0x4fb623=a2_0xcc871d,_0x37c41c={};for(const _0x2e2db7 of _0x2a3b35){const _0x508dda=_0x2e2db7[_0x4fb623(0x160)]==='boolean'?_0x4a73c6[_0x4fb623(0x186)](_0x2e2db7[_0x4fb623(0x15b)]):_0x4a73c6[_0x4fb623(0x155)](_0x2e2db7[_0x4fb623(0x15b)]);if(_0x508dda!==''&&_0x508dda!==![])_0x37c41c[_0x2e2db7[_0x4fb623(0x15b)]]=_0x508dda;}if(_0x4a73c6[_0x4fb623(0x17b)])_0x37c41c[_0x4fb623(0x17b)]=!![];return _0x37c41c;}function a2_0x2638(_0x2a031d,_0x3a7691){_0x2a031d=_0x2a031d-0x13f;const _0x5a3983=a2_0x5a39();let _0x263807=_0x5a3983[_0x2a031d];return _0x263807;}function normalizeLanguages(_0x5c36e4){const _0x117733=a2_0xcc871d;if(!Array[_0x117733(0x167)](_0x5c36e4))return[];return _0x5c36e4['filter'](_0x5499cb=>typeof _0x5499cb==='string')[_0x117733(0x156)](_0x1ef5e8=>_0x1ef5e8['trim']())[_0x117733(0x14d)](Boolean);}function buildRemoteAppI18nFields(_0x38850d){const _0x2afdd8=a2_0xcc871d,_0x568368=normalizeLanguages(_0x38850d[_0x2afdd8(0x148)]?.['langs']);return{'enableI18n':typeof _0x38850d[_0x2afdd8(0x173)]===_0x2afdd8(0x184)?_0x38850d['enableI18n']:null,'languages':_0x568368,'i18nInfo':_0x38850d['i18nInfo']?{..._0x38850d[_0x2afdd8(0x148)],'langs':_0x568368[_0x2afdd8(0x187)]?_0x568368:null}:null};}const initDef={'service':a2_0xcc871d(0x172),'command':a2_0xcc871d(0x16f),'description':a2_0xcc871d(0x149)+PRODUCT_CONFIG['newConfigFileName']+a2_0xcc871d(0x178),'risk':a2_0xcc871d(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x5ca1f7){return await runInit(collectFlags(_0x5ca1f7,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0xcc871d(0x172),'command':'list','description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a2_0xcc871d(0x147),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0xcc871d(0x15f),'type':a2_0xcc871d(0x16c),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0xcc871d(0x142),'type':a2_0xcc871d(0x184),'description':a2_0xcc871d(0x145),'default':![]},{'name':'no-cache','type':a2_0xcc871d(0x184),'description':a2_0xcc871d(0x13f),'default':![]}],async 'execute'(_0x5c14ce){const _0x40bd9a=a2_0xcc871d,_0x48b1f2=_0x5c14ce[_0x40bd9a(0x155)]('env')||_0x5c14ce['envName']||getEnv()||_0x40bd9a(0x146),_0xb01ef6=_0x5c14ce[_0x40bd9a(0x186)](_0x40bd9a(0x142)),_0x43d608=_0x5c14ce['bool']('no-cache'),{readRawConfigWithLayers:_0x231409,resolveDefaultAppSource:_0x48eeea,getLocalAppAliases:_0x2b2359}=await import('../../context.js'),{getRemoteAppList:_0x2e7514}=await import('../../commands/app/remote-source.js'),{config:_0x24ed22,layers:_0x498fa0}=_0x231409(),_0x1e5f57=_0x48eeea(_0x498fa0),{defaultApp:_0x2ce1e3}=_0x24ed22,_0x2bfb8f=await _0x2e7514({'env':_0x48b1f2,'accessKey':_0x5c14ce[_0x40bd9a(0x159)],'localOnly':_0xb01ef6,'noCache':_0x43d608}),_0xaf430b=_0x2bfb8f[_0x40bd9a(0x166)][_0x40bd9a(0x156)](_0x31fd7b=>{const _0x8bbfcb=_0x40bd9a;return{'name':_0x31fd7b[_0x8bbfcb(0x176)],'appcode':_0x31fd7b['appCode'],'named':!![],'definedIn':'remote','isDefault':_0x31fd7b[_0x8bbfcb(0x176)]===_0x2ce1e3,...buildAppProfileListFields(_0x48b1f2),...buildRemoteAppI18nFields(_0x31fd7b),'source':_0x2bfb8f[_0x8bbfcb(0x17a)],'owner':_0x31fd7b[_0x8bbfcb(0x143)]??null,'status':_0x31fd7b['appPublishStatus']??null,'cachedAt':_0x2bfb8f[_0x8bbfcb(0x16d)]};}),_0x125c8f=_0x2b2359(_0x24ed22);let _0x4ef54f=0x0;for(const [_0x50a488,_0x157875]of Object[_0x40bd9a(0x18d)](_0x125c8f)){const _0x224361=typeof _0x157875['appcode']==='string'?_0x157875[_0x40bd9a(0x18c)][_0x40bd9a(0x153)]():'';if(!_0x224361)continue;_0x4ef54f+=0x1,_0xaf430b[_0x40bd9a(0x189)]({'name':_0x50a488,'appcode':_0x224361,'named':!![],'definedIn':'local','isDefault':_0x50a488===_0x2ce1e3,...buildAppProfileListFields(_0x48b1f2),'source':_0x40bd9a(0x16b),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0xaf430b,_0x5c14ce['mergedCli']);if(_0xaf430b['length']===0x0)return{'ok':!![],'data':[],'message':_0x2bfb8f[_0x40bd9a(0x17a)]===_0x40bd9a(0x14e)?'No\x20cached\x20apps\x20found.':'No\x20apps\x20found\x20on\x20the\x20platform.'};const _0x3d838c=_0xaf430b[_0x40bd9a(0x14c)](_0x16f27e=>_0x16f27e['isCurrent']===!![]),_0x43430c=_0x2ce1e3??_0x3d838c?.[_0x40bd9a(0x15b)]??null,_0x2ab00c={'env':_0x48b1f2,'source':_0x2bfb8f[_0x40bd9a(0x17a)],'fetchedAt':_0x2bfb8f['fetchedAt'],'cachePath':_0x2bfb8f[_0x40bd9a(0x151)],'globalPath':_0x498fa0[_0x40bd9a(0x15e)]??null,'projectPath':_0x498fa0[_0x40bd9a(0x17c)]??null,'defaultApp':_0x43430c,'defaultAppSource':_0x2ce1e3!=null?_0x1e5f57:null,'localAliasCount':_0x4ef54f};return{'ok':!![],'data':{'items':_0xaf430b,'meta':_0x2ab00c}};}},pullDef={'service':a2_0xcc871d(0x172),'command':a2_0xcc871d(0x181),'description':a2_0xcc871d(0x165),'risk':a2_0xcc871d(0x18a),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0xcc871d(0x15f),'type':a2_0xcc871d(0x16c),'description':a2_0xcc871d(0x175),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0xcc871d(0x184),'description':a2_0xcc871d(0x140),'default':![]},{'name':a2_0xcc871d(0x152),'type':'boolean','description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x2bb00f){const _0x1fdbda=a2_0xcc871d,_0x3b0468=_0x2bb00f[_0x1fdbda(0x155)](_0x1fdbda(0x15f))||_0x2bb00f['envName']||getEnv()||_0x1fdbda(0x146),_0x2f3872=_0x2bb00f[_0x1fdbda(0x186)](_0x1fdbda(0x142)),_0x359bb6=_0x2bb00f[_0x1fdbda(0x186)]('no-cache'),{getRemoteAppList:_0x149753}=await import(_0x1fdbda(0x16e)),_0x49fada=await _0x149753({'env':_0x3b0468,'accessKey':_0x2bb00f['accessKey'],'localOnly':_0x2f3872,'noCache':_0x359bb6});return{'ok':!![],'data':{'total':_0x49fada[_0x1fdbda(0x166)][_0x1fdbda(0x187)],'env':_0x3b0468,'source':_0x49fada[_0x1fdbda(0x17a)],'fetchedAt':_0x49fada['fetchedAt'],'cachePath':_0x49fada[_0x1fdbda(0x151)]},'message':_0x49fada[_0x1fdbda(0x17a)]===_0x1fdbda(0x14e)?_0x1fdbda(0x18e)+_0x49fada[_0x1fdbda(0x166)][_0x1fdbda(0x187)]+_0x1fdbda(0x180)+_0x3b0468+'\x22.':_0x1fdbda(0x164)+_0x49fada['items'][_0x1fdbda(0x187)]+'\x20app(s)\x20for\x20env=\x22'+_0x3b0468+'\x22.'};}},useDef={'service':a2_0xcc871d(0x172),'command':a2_0xcc871d(0x163),'description':a2_0xcc871d(0x171),'risk':a2_0xcc871d(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0xcc871d(0x15b),'description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x4d323b){const _0x444370=a2_0xcc871d;if(!_0x4d323b['args'][0x0])throw CliErrors[_0x444370(0x14f)](_0x444370(0x141),_0x444370(0x174)+CLI_BIN_NAME+_0x444370(0x150));},async 'execute'(_0x49f317){const _0x413d9e=a2_0xcc871d,_0x1283af=_0x49f317[_0x413d9e(0x179)][0x0];if(!_0x1283af)throw CliErrors[_0x413d9e(0x14f)](_0x413d9e(0x141),'Usage:\x20'+CLI_BIN_NAME+_0x413d9e(0x150));const {buildConfigFromFlags:_0x5ed999,resolveLocalAppAliasCode:_0x2e6bf8}=await import(_0x413d9e(0x14a)),{readCachedAppList:_0x570d8a}=await import(_0x413d9e(0x162)),_0x239abd=_0x49f317[_0x413d9e(0x155)](_0x413d9e(0x15f)),_0x49c1dc=_0x5ed999(_0x239abd?{'env':_0x239abd}:{}),_0x1192b1=_0x570d8a(_0x49c1dc[_0x413d9e(0x15f)],_0x49c1dc[_0x413d9e(0x159)]),_0x1b4c40=_0x1192b1?.[_0x413d9e(0x166)][_0x413d9e(0x14c)](_0x18cf6f=>_0x18cf6f[_0x413d9e(0x176)]===_0x1283af),_0x5d1add=_0x2e6bf8(_0x49c1dc[_0x413d9e(0x161)]??{},_0x1283af);if(!_0x1b4c40&&!_0x5d1add&&_0x49c1dc[_0x413d9e(0x170)]!==_0x1283af){const _0x13e5ab=[..._0x1192b1?.[_0x413d9e(0x166)]['map'](_0xf53896=>_0xf53896[_0x413d9e(0x176)])??[]],_0x1d58df=_0x13e5ab['length']===0x0?_0x413d9e(0x183)+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x1283af+'.appcode\x20to\x20.lovrabet.json.':_0x413d9e(0x15c)+Array[_0x413d9e(0x17e)](new Set(_0x13e5ab))['join'](',\x20')+_0x413d9e(0x154);throw CliErrors[_0x413d9e(0x14f)](_0x413d9e(0x157)+_0x1283af+_0x413d9e(0x16a),_0x1d58df);}const _0x385827=_0x49f317[_0x413d9e(0x186)]('global');let _0x42b29e;if(_0x385827)_0x42b29e={'global':!![]};else{const {isInProject:_0x548b0e}=await import('../../context.js'),_0x96c557=_0x548b0e();_0x42b29e=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x413d9e(0x177),'inProject':_0x96c557}));}const _0x48ce86=readConfig(_0x42b29e);return _0x48ce86[_0x413d9e(0x170)]=_0x1283af,writeConfig(_0x48ce86,_0x42b29e),{'ok':!![],'message':_0x413d9e(0x17f)+_0x1283af+'\x22'+scopeLabel(_0x42b29e)+'.'};}},importDef={'service':'app','command':a2_0xcc871d(0x18b),'description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a2_0xcc871d(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x34882b){return await runInitImport(collectFlags(_0x34882b,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf3cadf,_0x322b72){const _0x43f1b3=a3_0x1167,_0x1be492=_0xf3cadf();while(!![]){try{const _0x58455f=parseInt(_0x43f1b3(0xd1))/0x1+-parseInt(_0x43f1b3(0xd3))/0x2*(-parseInt(_0x43f1b3(0xdb))/0x3)+-parseInt(_0x43f1b3(0xd7))/0x4+-parseInt(_0x43f1b3(0xd4))/0x5+-parseInt(_0x43f1b3(0xdc))/0x6*(-parseInt(_0x43f1b3(0xd6))/0x7)+parseInt(_0x43f1b3(0xd5))/0x8+parseInt(_0x43f1b3(0xdd))/0x9;if(_0x58455f===_0x322b72)break;else _0x1be492['push'](_0x1be492['shift']());}catch(_0x959175){_0x1be492['push'](_0x1be492['shift']());}}}(a3_0x1b8c,0x39c8e));import{fileURLToPath}from'url';function a3_0x1167(_0x17edef,_0x7c79c4){_0x17edef=_0x17edef-0xd0;const _0x1b8c35=a3_0x1b8c();let _0x1167d1=_0x1b8c35[_0x17edef];return _0x1167d1;}import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0xee1f3=a3_0x1167,_0x6604e8=join(__dirname,'../../../mock/app-list.json'),_0x436172=readFileSync(_0x6604e8,_0xee1f3(0xd2));return JSON['parse'](_0x436172);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}function a3_0x1b8c(){const _0x5b893e=['tableData','data','3LBeVFM','906oFQbPS','59013cZbtsn','errorMsg','success','104708CuJfNH','utf-8','538004GMpFHu','905505PHywUz','746080qzyVBG','994rLPQiC','308728OvgHAb','Mock\x20API\x20error:\x20'];a3_0x1b8c=function(){return _0x5b893e;};return a3_0x1b8c();}export function getMockRemoteAppItems(){const _0x10b28f=a3_0x1167,_0xba79dc=getMockAppList();if(!_0xba79dc[_0x10b28f(0xd0)])throw new Error(_0x10b28f(0xd8)+_0xba79dc[_0x10b28f(0xde)]+'\x20('+_0xba79dc['errorCode']+')');return _0xba79dc[_0x10b28f(0xda)][_0x10b28f(0xd9)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x113b43,_0x361b78){const _0x429407=a4_0x3c41,_0x289e0e=_0x113b43();while(!![]){try{const _0x1a0064=-parseInt(_0x429407(0x1ac))/0x1+parseInt(_0x429407(0x1b7))/0x2*(-parseInt(_0x429407(0x1b8))/0x3)+-parseInt(_0x429407(0x1b2))/0x4+parseInt(_0x429407(0x1b4))/0x5*(-parseInt(_0x429407(0x1b3))/0x6)+-parseInt(_0x429407(0x1af))/0x7+parseInt(_0x429407(0x1b1))/0x8+-parseInt(_0x429407(0x1b6))/0x9*(-parseInt(_0x429407(0x1b5))/0xa);if(_0x1a0064===_0x361b78)break;else _0x289e0e['push'](_0x289e0e['shift']());}catch(_0x50ee52){_0x289e0e['push'](_0x289e0e['shift']());}}}(a4_0x1699,0xca894));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';function a4_0x3c41(_0x9e47d8,_0x974e96){_0x9e47d8=_0x9e47d8-0x1a9;const _0x169907=a4_0x1699();let _0x3c411e=_0x169907[_0x9e47d8];return _0x3c411e;}function a4_0x1699(){const _0x20618a=['4284994RNouyP','fetchedAt','4406112qXEuZb','292380AhRRSC','195606YhZqUw','95VTOAnu','30GIRMxI','9331839VNislS','3380LjlouW','1179hJZlOS','APP_LIST_SOURCE','mock','cache','862963eREaUK','trim','items'];a4_0x1699=function(){return _0x20618a;};return a4_0x1699();}export function shouldUseMockRemoteApps(){const _0xa8aeb9=a4_0x3c41,_0x4fda0f=(productEnv(_0xa8aeb9(0x1a9))||'')['trim']()['toLowerCase']();return _0x4fda0f===_0xa8aeb9(0x1aa);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x3610ac){const _0xb13dbe=a4_0x3c41,{env:_0x43aaea,accessKey:_0x1dc3a3,localOnly:localOnly=![],noCache:noCache=![]}=_0x3610ac,_0x498764=readCachedAppList(_0x43aaea,_0x1dc3a3),_0x4854bb=_0x1dc3a3?.[_0xb13dbe(0x1ad)]()?getAppCacheFilePath(_0x43aaea,_0x1dc3a3):null;if(localOnly)return{'items':_0x498764?.[_0xb13dbe(0x1ae)]??[],'source':'cache','fetchedAt':_0x498764?.['fetchedAt']??null,'cachePath':_0x4854bb};try{const _0x205c3b=await getRemoteAppItems(),_0x4c23d7=shouldUseMockRemoteApps()?_0xb13dbe(0x1aa):'remote',_0x1e9d59=new Date()['toISOString'](),_0x2643b8=_0x1dc3a3?.['trim']()?writeCachedAppList(_0x43aaea,_0x1dc3a3,{'env':_0x43aaea,'fetchedAt':_0x1e9d59,'source':_0x4c23d7,'items':_0x205c3b}):null;return{'items':_0x205c3b,'source':_0x4c23d7,'fetchedAt':_0x1e9d59,'cachePath':_0x2643b8};}catch(_0x2dbb67){if(!noCache&&_0x498764)return{'items':_0x498764[_0xb13dbe(0x1ae)],'source':_0xb13dbe(0x1ab),'fetchedAt':_0x498764[_0xb13dbe(0x1b0)],'cachePath':_0x4854bb};throw _0x2dbb67;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc67672,_0x2134be){const _0x4fb589=a5_0x4879,_0x3a8e67=_0xc67672();while(!![]){try{const _0x3c817e=-parseInt(_0x4fb589(0x101))/0x1*(parseInt(_0x4fb589(0xfe))/0x2)+parseInt(_0x4fb589(0xfb))/0x3*(-parseInt(_0x4fb589(0xf8))/0x4)+-parseInt(_0x4fb589(0x106))/0x5*(-parseInt(_0x4fb589(0xfd))/0x6)+-parseInt(_0x4fb589(0x104))/0x7*(parseInt(_0x4fb589(0xf5))/0x8)+parseInt(_0x4fb589(0x105))/0x9+-parseInt(_0x4fb589(0xf4))/0xa*(-parseInt(_0x4fb589(0x102))/0xb)+parseInt(_0x4fb589(0xfa))/0xc;if(_0x3c817e===_0x2134be)break;else _0x3a8e67['push'](_0x3a8e67['shift']());}catch(_0x2facaf){_0x3a8e67['push'](_0x3a8e67['shift']());}}}(a5_0x66fa,0x99475));import{CLI_BIN_NAME}from'../../constant/cli.js';function a5_0x66fa(){const _0x203250=['42618AvZmMB','find','1657626ZAswdr','2pTSpKP','project','name','124467smEpeU','22hySZrC','appcode','7dRYlsM','6914952sgDFhn','10icoNlN','currentApp','appCode','local','definedIn','40730vjMGwJ','5385592yMPQoH','trim','isCurrent','16SsnVeg','named','1839636BNprJV'];a5_0x66fa=function(){return _0x203250;};return a5_0x66fa();}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};function a5_0x4879(_0x3d4473,_0x4496d5){_0x3d4473=_0x3d4473-0xf1;const _0x66fa24=a5_0x66fa();let _0x48791c=_0x66fa24[_0x3d4473];return _0x48791c;}export function enrichAppListItemsWithMergedSelection(_0x5d5fa5,_0x1e463e){const _0x13e8e4=a5_0x4879;if(!_0x1e463e)return;const _0x371f73=!!(_0x1e463e[_0x13e8e4(0x107)]??_0x1e463e['defaultApp']);for(const _0x5ac173 of _0x5d5fa5){_0x5ac173['isCurrent']=![];}const _0x68844f=_0x1e463e['appCode']!=null?String(_0x1e463e[_0x13e8e4(0xf1)])[_0x13e8e4(0xf6)]():'';if(_0x371f73){const _0x4ef9e5=_0x1e463e[_0x13e8e4(0x107)]??_0x1e463e['defaultApp'];if(_0x4ef9e5){const _0x870e8a=_0x5d5fa5[_0x13e8e4(0xfc)](_0x3c7ed0=>_0x3c7ed0['named']===!![]&&_0x3c7ed0[_0x13e8e4(0x100)]===_0x4ef9e5&&_0x3c7ed0[_0x13e8e4(0xf3)]===_0x13e8e4(0xf2)),_0xa96a68=_0x870e8a??_0x5d5fa5['find'](_0x33e67e=>_0x33e67e[_0x13e8e4(0xf9)]===!![]&&_0x33e67e['name']===_0x4ef9e5);_0xa96a68&&(_0xa96a68[_0x13e8e4(0xf7)]=!![]);}return;}if(!_0x68844f)return;for(const _0x2ff863 of _0x5d5fa5){String(_0x2ff863[_0x13e8e4(0x103)]??'')[_0x13e8e4(0xf6)]()===_0x68844f&&(_0x2ff863[_0x13e8e4(0xf7)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x25fe97){const _0x766961=a5_0x4879;return formatScopeLabel(_0x25fe97['global']?'global':_0x766961(0xff));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x3f1a46=a6_0x40ec;(function(_0x51f765,_0x33e700){const _0x4a9a81=a6_0x40ec,_0x2a7f89=_0x51f765();while(!![]){try{const _0x6cf25e=parseInt(_0x4a9a81(0x161))/0x1*(parseInt(_0x4a9a81(0x11f))/0x2)+-parseInt(_0x4a9a81(0x13a))/0x3+-parseInt(_0x4a9a81(0x155))/0x4*(parseInt(_0x4a9a81(0x142))/0x5)+-parseInt(_0x4a9a81(0x157))/0x6*(parseInt(_0x4a9a81(0x137))/0x7)+parseInt(_0x4a9a81(0x116))/0x8*(parseInt(_0x4a9a81(0x126))/0x9)+parseInt(_0x4a9a81(0x13e))/0xa+parseInt(_0x4a9a81(0x128))/0xb;if(_0x6cf25e===_0x33e700)break;else _0x2a7f89['push'](_0x2a7f89['shift']());}catch(_0x22f107){_0x2a7f89['push'](_0x2a7f89['shift']());}}}(a6_0x526f,0x8f7e8));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a6_0x526f(){const _0x17212b=['If\x20command\x20execution\x20still\x20fails,\x20run:\x20','accessKey','2454006VMYAHy','push','env','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','9662520wMhWHH','str','Shorthand\x20for\x20--access-key','ACCESS_KEY','4581620vZsPNu','ClientAk','global','Option\x20B:\x20apps\x20config\x20(','stdin','\x20auth\x20status','Write\x20to\x20global\x20config\x20(default)','Auth\x20mode:\x20','access-key','`auth\x20login`\x20does\x20not\x20support\x20--yes.','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','read','login','Option\x20C:\x20environment\x20variable','test','AccessKey:\x20','AccessKey\x20(ak_xxx...)','Show\x20current\x20authentication\x20status','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','4lhEOfW','Clear\x20from\x20global\x20config\x20(default)','37542gcYvmV','Invalid\x20accessKey\x20format:\x20\x22','write','newConfigFileName','\x20config.','\x20Verify:\x20','Tip:\x20you\x20can\x20also\x20run:','AccessKey\x20saved\x20to\x20','trim','=ak_xxx','1qpHMEx','join','repeat','isTTY','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20config.\x20Nothing\x20to\x20clear.','Option\x20A:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','8umvYps','cancelled','Read\x20from\x20global\x20config\x20(default)','status','\x20env\x20var','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Auth\x20config\x20reinitialized\x20in\x20','AccessKey\x20cleared\x20from\x20','development','1094098tyYngt','validation','project','\x20\x20export\x20','\x20(via\x20','global-default','userCenterDisplayName','6370173pjYHSf','string','9025885VhWWFK','bool','Missing\x20accessKey.','info','\x20doctor','Then\x20verify\x20with:\x20','\x20config','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','boolean','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Clear\x20accessKey\x20from\x20config','No\x20AccessKey\x20found\x20in\x20','auth','Use\x20`','805tQGhaL'];a6_0x526f=function(){return _0x17212b;};return a6_0x526f();}import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';function a6_0x40ec(_0x450b96,_0x3054db){_0x450b96=_0x450b96-0x110;const _0x526f4a=a6_0x526f();let _0x40ecb9=_0x526f4a[_0x450b96];return _0x40ecb9;}import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x520f1=a6_0x40ec;writeCliSideChannelLine(_0x520f1(0x132)+PRODUCT_CONFIG[_0x520f1(0x125)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x520f1(0x15d)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(){const _0x1f8829=a6_0x40ec;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x1f8829(0x125)]+':',USER_ACCESS_KEY_CREATE_URL,_0x1f8829(0x13d)+CLI_BIN_NAME+_0x1f8829(0x115)][_0x1f8829(0x162)]('\x0a');}function canPromptForAccessKey(_0x30ed6a){const _0x5906e4=a6_0x40ec;return!_0x30ed6a['nonInteractive']&&process[_0x5906e4(0x146)][_0x5906e4(0x110)]!==![]&&process['stdout'][_0x5906e4(0x110)]!==![];}function resolveAuthScopeFlags(_0x5866c3){const _0x14c751=a6_0x40ec;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x5866c3[_0x14c751(0x129)]('global'),'explicitProject':_0x5866c3[_0x14c751(0x129)](_0x14c751(0x121)),'policy':_0x14c751(0x124)}));}async function resolveAuthWriteInput(_0x4cb9a4){const _0xd7792d=a6_0x40ec;let _0x1977f8=(_0x4cb9a4[_0xd7792d(0x13f)]('access-key')||_0x4cb9a4[_0xd7792d(0x13f)]('ak')||'')['trim']();const _0x2117df=(_0x4cb9a4[_0xd7792d(0x13f)](_0xd7792d(0x13c))||'')[_0xd7792d(0x15f)]();if(!_0x1977f8&&canPromptForAccessKey(_0x4cb9a4))try{showAccessKeyCreateHint(),_0x1977f8=await promptAccessKey('');}catch(_0x5c143d){if(isAbortPrompt(_0x5c143d))throw CliErrors[_0xd7792d(0x117)]();throw _0x5c143d;}if(!_0x1977f8)throw CliErrors[_0xd7792d(0x120)](_0xd7792d(0x12a),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0xd7792d(0x150)](_0x1977f8))throw CliErrors[_0xd7792d(0x120)](_0xd7792d(0x158)+_0x1977f8+'\x22',_0xd7792d(0x14c));if(!_0x2117df)return{'accessKey':_0x1977f8};const _0x5aa228=normalizeEnv(_0x2117df);return{'accessKey':_0x1977f8,'env':isDaily(_0x5aa228)?'daily':isDev(_0x5aa228)?_0xd7792d(0x11e):'production'};}export const authDefinitions=[{'service':a6_0x3f1a46(0x135),'command':a6_0x3f1a46(0x14e),'description':a6_0x3f1a46(0x11b),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x3f1a46(0x14a),'type':'string','description':a6_0x3f1a46(0x152)},{'name':'ak','type':'string','description':a6_0x3f1a46(0x140)},{'name':a6_0x3f1a46(0x144),'type':'boolean','description':a6_0x3f1a46(0x148),'default':!![]},{'name':a6_0x3f1a46(0x121),'type':a6_0x3f1a46(0x131),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x4b93bd){const _0x5e3374=a6_0x3f1a46;if(_0x4b93bd[_0x5e3374(0x129)]('yes'))throw CliErrors[_0x5e3374(0x120)](_0x5e3374(0x14b),_0x5e3374(0x136)+CLI_BIN_NAME+_0x5e3374(0x12f)+CLI_BIN_NAME+_0x5e3374(0x130));const _0x182a2d=(_0x4b93bd[_0x5e3374(0x13f)]('access-key')||_0x4b93bd[_0x5e3374(0x13f)]('ak')||'')[_0x5e3374(0x15f)]();if(!_0x182a2d&&_0x4b93bd['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x524465=await resolveAuthWriteInput(_0x4b93bd),_0x50c1d3=resolveAuthScopeFlags(_0x4b93bd),_0x4298f6=readScopedConfig(_0x50c1d3);_0x4298f6[_0x5e3374(0x139)]=_0x524465[_0x5e3374(0x139)];_0x524465['env']&&(_0x4298f6[_0x5e3374(0x13c)]=_0x524465[_0x5e3374(0x13c)]);writeScopedConfig(_0x4298f6,_0x50c1d3);const _0x2252b4=_0x50c1d3[_0x5e3374(0x144)]?_0x5e3374(0x144):_0x5e3374(0x121),_0x3ca8ba=_0x4298f6[_0x5e3374(0x13c)]?'\x20Current\x20env:\x20'+_0x4298f6['env']+'.':'';return{'ok':!![],'message':_0x5e3374(0x15e)+_0x2252b4+_0x5e3374(0x15b)+_0x3ca8ba+_0x5e3374(0x15c)+CLI_BIN_NAME+_0x5e3374(0x147)};}},{'service':'auth','command':'init','description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a6_0x3f1a46(0x159),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a6_0x3f1a46(0x127),'description':a6_0x3f1a46(0x152)},{'name':'ak','type':a6_0x3f1a46(0x127),'description':'Shorthand\x20for\x20--access-key'},{'name':a6_0x3f1a46(0x13c),'type':'string','description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':a6_0x3f1a46(0x144),'type':'boolean','description':a6_0x3f1a46(0x148),'default':!![]},{'name':a6_0x3f1a46(0x121),'type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x58f390){const _0x550f0c=a6_0x3f1a46,_0x56e39d=await resolveAuthWriteInput(_0x58f390),_0x19e77b=resolveAuthScopeFlags(_0x58f390),_0x43bf71={'accessKey':_0x56e39d[_0x550f0c(0x139)]};_0x56e39d[_0x550f0c(0x13c)]&&(_0x43bf71[_0x550f0c(0x13c)]=_0x56e39d['env']);writeScopedConfig(_0x43bf71,_0x19e77b);const _0x3a50db=_0x19e77b['global']?_0x550f0c(0x144):'project',_0x11a9ce=_0x43bf71['env']?'\x20Current\x20env:\x20'+_0x43bf71[_0x550f0c(0x13c)]+'.':'';return{'ok':!![],'message':_0x550f0c(0x11c)+_0x3a50db+'\x20scope.'+_0x11a9ce+_0x550f0c(0x15c)+CLI_BIN_NAME+_0x550f0c(0x147)};}},{'service':a6_0x3f1a46(0x135),'command':'logout','description':a6_0x3f1a46(0x133),'risk':a6_0x3f1a46(0x159),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x3f1a46(0x144),'type':'boolean','description':a6_0x3f1a46(0x156),'default':!![]},{'name':a6_0x3f1a46(0x121),'type':'boolean','description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x15bbb9){const _0x4b8d9e=a6_0x3f1a46,_0x5d9780=resolveAuthScopeFlags(_0x15bbb9),_0x3683ba=readScopedConfig(_0x5d9780),_0x2a89db=!!_0x3683ba[_0x4b8d9e(0x139)];delete _0x3683ba[_0x4b8d9e(0x139)],writeScopedConfig(_0x3683ba,_0x5d9780);const _0x220f54=_0x5d9780[_0x4b8d9e(0x144)]?_0x4b8d9e(0x144):_0x4b8d9e(0x121);if(_0x2a89db)return{'ok':!![],'message':_0x4b8d9e(0x11d)+_0x220f54+_0x4b8d9e(0x15b)};return{'ok':!![],'message':_0x4b8d9e(0x134)+_0x220f54+_0x4b8d9e(0x113)};}},{'service':a6_0x3f1a46(0x135),'command':a6_0x3f1a46(0x119),'description':a6_0x3f1a46(0x153),'risk':a6_0x3f1a46(0x14d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x3f1a46(0x144),'type':a6_0x3f1a46(0x131),'description':a6_0x3f1a46(0x118),'default':!![]},{'name':'project','type':a6_0x3f1a46(0x131),'description':a6_0x3f1a46(0x112),'default':![]}],async 'execute'(_0x4ca4eb){const _0x2ed9df=a6_0x3f1a46,_0x266dc1=resolveAuthScopeFlags(_0x4ca4eb),_0x5dc0bc=readScopedConfig(_0x266dc1),_0x4e5921=productEnvName(_0x2ed9df(0x141)),_0x46a30e=productEnv(_0x2ed9df(0x141))||undefined,_0x890827=_0x5dc0bc[_0x2ed9df(0x139)]||undefined,_0x7025cc=_0x46a30e||_0x890827,_0xf7841a=_0x46a30e?_0x4e5921+_0x2ed9df(0x11a):_0x890827?(_0x266dc1[_0x2ed9df(0x144)]?_0x2ed9df(0x144):_0x2ed9df(0x121))+_0x2ed9df(0x12e):null,_0x1c621c=[_0x2ed9df(0x149)+AUTH_MODE[_0x2ed9df(0x143)]];if(_0x7025cc){const _0x5523e5=_0x7025cc['length']>0x8?''+_0x7025cc['slice'](0x0,0x8)+'*'[_0x2ed9df(0x163)](_0x7025cc['length']-0x8):_0x7025cc;_0x1c621c['push'](_0x2ed9df(0x151)+_0x5523e5+(_0xf7841a?_0x2ed9df(0x123)+_0xf7841a+')':''));}return!_0x7025cc&&(_0x1c621c[_0x2ed9df(0x13b)](''),_0x1c621c['push']('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x1c621c[_0x2ed9df(0x13b)](''),_0x1c621c['push'](_0x2ed9df(0x114)+CLI_BIN_NAME+_0x2ed9df(0x111)),_0x1c621c[_0x2ed9df(0x13b)](''),_0x1c621c[_0x2ed9df(0x13b)](_0x2ed9df(0x145)+PRODUCT_CONFIG[_0x2ed9df(0x15a)]+')'),_0x1c621c[_0x2ed9df(0x13b)](_0x2ed9df(0x154)),_0x1c621c[_0x2ed9df(0x13b)](''),_0x1c621c['push'](_0x2ed9df(0x14f)),_0x1c621c[_0x2ed9df(0x13b)](_0x2ed9df(0x122)+_0x4e5921+_0x2ed9df(0x160)),_0x1c621c['push'](''),_0x1c621c[_0x2ed9df(0x13b)](_0x2ed9df(0x12d)+CLI_BIN_NAME+'\x20auth\x20status'),_0x1c621c[_0x2ed9df(0x13b)](_0x2ed9df(0x138)+CLI_BIN_NAME+_0x2ed9df(0x12c))),{'ok':!![],'message':_0x1c621c[_0x2ed9df(0x162)]('\x0a')};}},{'service':a6_0x3f1a46(0x135),'command':a6_0x3f1a46(0x12b),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a6_0x3f1a46(0x14d),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x37fcf0){const _0x4c2df8=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x4c2df8,'meta':{'env':_0x37fcf0['envName']??'production'}}};}}];
|
|
1
|
+
const a6_0x1200a1=a6_0x271d;(function(_0x3a8d04,_0x2da0a7){const _0x4d66f0=a6_0x271d,_0x185f17=_0x3a8d04();while(!![]){try{const _0x227408=parseInt(_0x4d66f0(0xab))/0x1+parseInt(_0x4d66f0(0xbd))/0x2+parseInt(_0x4d66f0(0xb5))/0x3*(-parseInt(_0x4d66f0(0xb2))/0x4)+-parseInt(_0x4d66f0(0xc2))/0x5+parseInt(_0x4d66f0(0x91))/0x6+parseInt(_0x4d66f0(0xbc))/0x7*(-parseInt(_0x4d66f0(0x7e))/0x8)+-parseInt(_0x4d66f0(0x8a))/0x9;if(_0x227408===_0x2da0a7)break;else _0x185f17['push'](_0x185f17['shift']());}catch(_0x3fee45){_0x185f17['push'](_0x185f17['shift']());}}}(a6_0xeefc,0x797a4));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x1e41f7=a6_0x271d;writeCliSideChannelLine(_0x1e41f7(0x93)+PRODUCT_CONFIG[_0x1e41f7(0x80)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x1e41f7(0x86));}function a6_0x271d(_0x474b35,_0x32b884){_0x474b35=_0x474b35-0x79;const _0xeefc81=a6_0xeefc();let _0x271daa=_0xeefc81[_0x474b35];return _0x271daa;}function buildAccessKeySetupGuide(){const _0x283ac2=a6_0x271d;return[_0x283ac2(0x93)+PRODUCT_CONFIG[_0x283ac2(0x80)]+':',USER_ACCESS_KEY_CREATE_URL,_0x283ac2(0x7a)+CLI_BIN_NAME+_0x283ac2(0xad)][_0x283ac2(0xb3)]('\x0a');}function canPromptForAccessKey(_0x3cefc8){const _0x175057=a6_0x271d;return!_0x3cefc8[_0x175057(0xba)]&&process['stdin']['isTTY']!==![]&&process[_0x175057(0x89)][_0x175057(0xcb)]!==![];}function a6_0xeefc(){const _0x2b3c4c=['Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Auth\x20config\x20reinitialized\x20in\x20','stdout','850239tWWmsG','Clear\x20accessKey\x20from\x20config','validation','yes','\x20(via\x20','read','Read\x20from\x20global\x20config\x20(default)','3834762fkZouy','newConfigFileName','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','string','trim','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','length','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','boolean','auth','project','production','daily','ClientAk','AccessKey\x20cleared\x20from\x20','global','\x20config','ACCESS_KEY','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','global-default','\x20scope.','\x20doctor','Missing\x20accessKey.','Shorthand\x20for\x20--access-key','slice','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','263938IaJHCl','info','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','AccessKey\x20(ak_xxx...)','Write\x20to\x20global\x20config\x20(default)','Option\x20C:\x20environment\x20variable','test','10148LjBUGq','join','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','1059LlivVn','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','str','status','=ak_xxx','nonInteractive','accessKey','872067objsNU','1832210nAajXd','env','\x20\x20export\x20','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','\x20Verify:\x20','1034925yaQdlr','access-key','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','\x20Current\x20env:\x20','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','Auth\x20mode:\x20','AccessKey\x20saved\x20to\x20','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20env\x20var','isTTY','Option\x20B:\x20apps\x20config\x20(','\x20auth\x20status','push','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20config.','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Option\x20A:\x20','8QxjJFb','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','userCenterDisplayName','No\x20AccessKey\x20found\x20in\x20','Invalid\x20accessKey\x20format:\x20\x22','bool','write','Show\x20current\x20authentication\x20status','\x20auth\x20login\x20--access-key\x20<ak_xxx>'];a6_0xeefc=function(){return _0x2b3c4c;};return a6_0xeefc();}function resolveAuthScopeFlags(_0x454766){const _0x272c0a=a6_0x271d;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x454766[_0x272c0a(0x83)]('global'),'explicitProject':_0x454766[_0x272c0a(0x83)](_0x272c0a(0x9b)),'policy':_0x272c0a(0xa4)}));}async function resolveAuthWriteInput(_0x512bf9){const _0x269ba1=a6_0x271d;let _0x539345=(_0x512bf9[_0x269ba1(0xb7)](_0x269ba1(0xc3))||_0x512bf9[_0x269ba1(0xb7)]('ak')||'')[_0x269ba1(0x95)]();const _0x290192=(_0x512bf9[_0x269ba1(0xb7)]('env')||'')[_0x269ba1(0x95)]();if(!_0x539345&&canPromptForAccessKey(_0x512bf9))try{showAccessKeyCreateHint(),_0x539345=await promptAccessKey('');}catch(_0x287988){if(isAbortPrompt(_0x287988))throw CliErrors['cancelled']();throw _0x287988;}if(!_0x539345)throw CliErrors[_0x269ba1(0x8c)](_0x269ba1(0xa7),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x269ba1(0xb1)](_0x539345))throw CliErrors['validation'](_0x269ba1(0x82)+_0x539345+'\x22',_0x269ba1(0xa3));if(!_0x290192)return{'accessKey':_0x539345};const _0x1328bd=normalizeEnv(_0x290192);return{'accessKey':_0x539345,'env':isDaily(_0x1328bd)?_0x269ba1(0x9d):isDev(_0x1328bd)?'development':_0x269ba1(0x9c)};}export const authDefinitions=[{'service':a6_0x1200a1(0x9a),'command':'login','description':a6_0x1200a1(0x7c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1200a1(0xc3),'type':a6_0x1200a1(0x94),'description':a6_0x1200a1(0xae)},{'name':'ak','type':a6_0x1200a1(0x94),'description':a6_0x1200a1(0xa8)},{'name':'global','type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x1200a1(0x9b),'type':a6_0x1200a1(0x99),'description':a6_0x1200a1(0x98),'default':![]}],async 'execute'(_0x38d659){const _0x2e5502=a6_0x1200a1;if(_0x38d659['bool'](_0x2e5502(0x8d)))throw CliErrors[_0x2e5502(0x8c)](_0x2e5502(0xc9),'Use\x20`'+CLI_BIN_NAME+_0x2e5502(0xc6)+CLI_BIN_NAME+_0x2e5502(0xb6));const _0x2db73c=(_0x38d659[_0x2e5502(0xb7)](_0x2e5502(0xc3))||_0x38d659[_0x2e5502(0xb7)]('ak')||'')[_0x2e5502(0x95)]();if(!_0x2db73c&&_0x38d659['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x3ae83a=await resolveAuthWriteInput(_0x38d659),_0x5cb814=resolveAuthScopeFlags(_0x38d659),_0x544988=readScopedConfig(_0x5cb814);_0x544988[_0x2e5502(0xbb)]=_0x3ae83a['accessKey'];_0x3ae83a[_0x2e5502(0xbe)]&&(_0x544988[_0x2e5502(0xbe)]=_0x3ae83a[_0x2e5502(0xbe)]);writeScopedConfig(_0x544988,_0x5cb814);const _0x46ea42=_0x5cb814[_0x2e5502(0xa0)]?_0x2e5502(0xa0):_0x2e5502(0x9b),_0x2fd320=_0x544988[_0x2e5502(0xbe)]?_0x2e5502(0xc5)+_0x544988[_0x2e5502(0xbe)]+'.':'';return{'ok':!![],'message':_0x2e5502(0xc8)+_0x46ea42+_0x2e5502(0x7b)+_0x2fd320+_0x2e5502(0xc1)+CLI_BIN_NAME+_0x2e5502(0xcd)};}},{'service':'auth','command':'init','description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1200a1(0xc3),'type':a6_0x1200a1(0x94),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a6_0x1200a1(0x94),'description':a6_0x1200a1(0xa8)},{'name':'env','type':a6_0x1200a1(0x94),'description':a6_0x1200a1(0xc4)},{'name':a6_0x1200a1(0xa0),'type':a6_0x1200a1(0x99),'description':a6_0x1200a1(0xaf),'default':!![]},{'name':a6_0x1200a1(0x9b),'type':a6_0x1200a1(0x99),'description':a6_0x1200a1(0x98),'default':![]}],async 'execute'(_0x2ff284){const _0x29a126=a6_0x1200a1,_0x48e6f5=await resolveAuthWriteInput(_0x2ff284),_0x512b06=resolveAuthScopeFlags(_0x2ff284),_0x53ac67={'accessKey':_0x48e6f5['accessKey']};_0x48e6f5['env']&&(_0x53ac67['env']=_0x48e6f5[_0x29a126(0xbe)]);writeScopedConfig(_0x53ac67,_0x512b06);const _0x11ee9f=_0x512b06[_0x29a126(0xa0)]?_0x29a126(0xa0):'project',_0x3b09c9=_0x53ac67[_0x29a126(0xbe)]?_0x29a126(0xc5)+_0x53ac67[_0x29a126(0xbe)]+'.':'';return{'ok':!![],'message':_0x29a126(0x88)+_0x11ee9f+_0x29a126(0xa5)+_0x3b09c9+_0x29a126(0xc1)+CLI_BIN_NAME+_0x29a126(0xcd)};}},{'service':'auth','command':'logout','description':a6_0x1200a1(0x8b),'risk':a6_0x1200a1(0x84),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1200a1(0xa0),'type':'boolean','description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x1200a1(0x9b),'type':'boolean','description':a6_0x1200a1(0xb4),'default':![]}],async 'execute'(_0x3c4db9){const _0x719fdb=a6_0x1200a1,_0x4d0707=resolveAuthScopeFlags(_0x3c4db9),_0x21e1ac=readScopedConfig(_0x4d0707),_0x4065fc=!!_0x21e1ac[_0x719fdb(0xbb)];delete _0x21e1ac[_0x719fdb(0xbb)],writeScopedConfig(_0x21e1ac,_0x4d0707);const _0x4cac66=_0x4d0707[_0x719fdb(0xa0)]?_0x719fdb(0xa0):_0x719fdb(0x9b);if(_0x4065fc)return{'ok':!![],'message':_0x719fdb(0x9f)+_0x4cac66+_0x719fdb(0x7b)};return{'ok':!![],'message':_0x719fdb(0x81)+_0x4cac66+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a6_0x1200a1(0x9a),'command':a6_0x1200a1(0xb8),'description':a6_0x1200a1(0x85),'risk':a6_0x1200a1(0x8f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1200a1(0xa0),'type':a6_0x1200a1(0x99),'description':a6_0x1200a1(0x90),'default':!![]},{'name':a6_0x1200a1(0x9b),'type':a6_0x1200a1(0x99),'description':a6_0x1200a1(0x87),'default':![]}],async 'execute'(_0x2e4213){const _0x2305b6=a6_0x1200a1,_0x45e231=resolveAuthScopeFlags(_0x2e4213),_0x42c30c=readScopedConfig(_0x45e231),_0x34ac19=productEnvName(_0x2305b6(0xa2)),_0x248238=productEnv(_0x2305b6(0xa2))||undefined,_0x5b4b7e=_0x42c30c['accessKey']||undefined,_0x577f94=_0x248238||_0x5b4b7e,_0x24992d=_0x248238?_0x34ac19+_0x2305b6(0xca):_0x5b4b7e?(_0x45e231[_0x2305b6(0xa0)]?_0x2305b6(0xa0):_0x2305b6(0x9b))+_0x2305b6(0xa1):null,_0xc1a5bc=[_0x2305b6(0xc7)+AUTH_MODE[_0x2305b6(0x9e)]];if(_0x577f94){const _0x2ba9af=_0x577f94[_0x2305b6(0x97)]>0x8?''+_0x577f94[_0x2305b6(0xa9)](0x0,0x8)+'*'['repeat'](_0x577f94[_0x2305b6(0x97)]-0x8):_0x577f94;_0xc1a5bc['push']('AccessKey:\x20'+_0x2ba9af+(_0x24992d?_0x2305b6(0x8e)+_0x24992d+')':''));}return!_0x577f94&&(_0xc1a5bc[_0x2305b6(0x79)](''),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0x96)),_0xc1a5bc[_0x2305b6(0x79)](''),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0x7d)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0xc1a5bc['push'](''),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0xcc)+PRODUCT_CONFIG[_0x2305b6(0x92)]+')'),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0xaa)),_0xc1a5bc[_0x2305b6(0x79)](''),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0xb0)),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0xbf)+_0x34ac19+_0x2305b6(0xb9)),_0xc1a5bc[_0x2305b6(0x79)](''),_0xc1a5bc['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20auth\x20status'),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0xc0)+CLI_BIN_NAME+_0x2305b6(0xa6))),{'ok':!![],'message':_0xc1a5bc['join']('\x0a')};}},{'service':a6_0x1200a1(0x9a),'command':a6_0x1200a1(0xac),'description':a6_0x1200a1(0x7f),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x271a29){const _0x46957d=a6_0x1200a1,_0x46ee50=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x46ee50,'meta':{'env':_0x271a29['envName']??_0x46957d(0x9c)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x45723c,_0x118bcb){const _0x25bb7b=a7_0xd47e,_0x66a5bc=_0x45723c();while(!![]){try{const _0x453e28=parseInt(_0x25bb7b(0xe9))/0x1*(parseInt(_0x25bb7b(0xed))/0x2)+-parseInt(_0x25bb7b(0xd9))/0x3*(parseInt(_0x25bb7b(0xe0))/0x4)+parseInt(_0x25bb7b(0xea))/0x5+parseInt(_0x25bb7b(0xdf))/0x6*(-parseInt(_0x25bb7b(0xe5))/0x7)+parseInt(_0x25bb7b(0xe6))/0x8*(parseInt(_0x25bb7b(0xeb))/0x9)+parseInt(_0x25bb7b(0xdd))/0xa+-parseInt(_0x25bb7b(0xec))/0xb;if(_0x453e28===_0x118bcb)break;else _0x66a5bc['push'](_0x66a5bc['shift']());}catch(_0x2697c7){_0x66a5bc['push'](_0x66a5bc['shift']());}}}(a7_0x25ee,0x403a1));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x56a497=a7_0xd47e;super('User\x20aborted\x20prompt'),this['name']=_0x56a497(0xee);}}function createSafeRl(){const _0x1db1dc=a7_0xd47e,_0x56a96a=createInterface({'input':process[_0x1db1dc(0xe2)],'output':process[_0x1db1dc(0xe7)]});let _0x1d95df;const _0x520dbd=new Promise((_0x56c38d,_0x3d72c6)=>{const _0x2729b6=_0x1db1dc;_0x1d95df=()=>{const _0x5e4a8d=a7_0xd47e;_0x1d95df&&(_0x56a96a['removeListener'](_0x5e4a8d(0xda),_0x1d95df),_0x1d95df=undefined);try{_0x56a96a['close']();}catch{}_0x3d72c6(new AbortPrompt());},_0x56a96a[_0x2729b6(0xde)](_0x2729b6(0xda),_0x1d95df);}),_0x1c5a27=()=>{const _0x52b550=_0x1db1dc;_0x1d95df&&(_0x56a96a['removeListener'](_0x52b550(0xda),_0x1d95df),_0x1d95df=undefined);try{_0x56a96a[_0x52b550(0xe1)]();}catch{}};return{'rl':_0x56a96a,'abortPromise':_0x520dbd,'disposeSuccess':_0x1c5a27};}export async function promptAccessKey(_0x169708=''){const _0x25bb6f=a7_0xd47e,{rl:_0x56728d,abortPromise:_0x4bcec5,disposeSuccess:_0x47811c}=createSafeRl(),_0x495522=new Promise(_0x39b21e=>{const _0x16c819=a7_0xd47e,_0x5f58ce=_0x169708?_0x16c819(0xe3)+_0x169708+_0x16c819(0xdb):_0x16c819(0xdc);_0x56728d['question'](_0x5f58ce,_0xb81678=>{const _0x1bb451=_0x16c819;_0x47811c(),_0x39b21e(_0xb81678[_0x1bb451(0xe4)]()||_0x169708);});});return Promise[_0x25bb6f(0xd8)]([_0x495522,_0x4bcec5]);}function a7_0xd47e(_0x4d6748,_0x2b4ae3){_0x4d6748=_0x4d6748-0xd8;const _0x25ee44=a7_0x25ee();let _0xd47e91=_0x25ee44[_0x4d6748];return _0xd47e91;}function a7_0x25ee(){const _0x50e6a9=['1000068RbRPhI','3292XvNePQ','close','stdin','AccessKey\x20(','trim','14JEGcOH','100552JWJBCt','stdout','name','2oWovaV','2463250lFuQSG','351zwwauX','6479022FJgHhm','515806YIzXvo','AbortPrompt','race','1347OOLLSQ','SIGINT','):\x20','AccessKey\x20(paste\x20ak_...):\x20','563110blycJb','once'];a7_0x25ee=function(){return _0x50e6a9;};return a7_0x25ee();}export function isAbortPrompt(_0x58606f){const _0x350803=a7_0xd47e;return _0x58606f instanceof Error&&_0x58606f[_0x350803(0xe8)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x246268=a8_0x2965;(function(_0x24cbf7,_0x588611){const _0x4fe79c=a8_0x2965,_0x42c12f=_0x24cbf7();while(!![]){try{const _0x57572f=parseInt(_0x4fe79c(0x1ab))/0x1+parseInt(_0x4fe79c(0x19c))/0x2+parseInt(_0x4fe79c(0x1a0))/0x3*(-parseInt(_0x4fe79c(0x1a6))/0x4)+-parseInt(_0x4fe79c(0x1a5))/0x5+parseInt(_0x4fe79c(0x199))/0x6*(-parseInt(_0x4fe79c(0x19f))/0x7)+-parseInt(_0x4fe79c(0x1a7))/0x8*(-parseInt(_0x4fe79c(0x19e))/0x9)+parseInt(_0x4fe79c(0x1b0))/0xa*(parseInt(_0x4fe79c(0x1a3))/0xb);if(_0x57572f===_0x588611)break;else _0x42c12f['push'](_0x42c12f['shift']());}catch(_0x4197e0){_0x42c12f['push'](_0x42c12f['shift']());}}}(a8_0xdec1,0x61c56));import{getBffScriptInfo}from'../../core/api-client.js';function a8_0x2965(_0x4b1254,_0x5412b0){_0x4b1254=_0x4b1254-0x199;const _0xdec179=a8_0xdec1();let _0x296532=_0xdec179[_0x4b1254];return _0x296532;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a8_0xdec1(){const _0x4e6870=['147774mbLQpD','Get\x20BFF\x20script\x20details\x20by\x20ID','bool','721340kygiBK','verbose','12159QrWMip','133aXaQGH','87FiNmpZ','updatedTime','createdTime','1826nEUjQA','num','2919130oUnOEV','64124xYCDyW','24GYBdzE','bff','scriptType','appCode','257457KsstyY','detail','description','functionName','read','78010ERfxhJ'];a8_0xdec1=function(){return _0x4e6870;};return a8_0xdec1();}export const bffDetail={'service':a8_0x246268(0x1a8),'command':a8_0x246268(0x1ac),'description':a8_0x246268(0x19a),'risk':a8_0x246268(0x1af),'flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0x20548b){const _0x4aad57=a8_0x246268,_0x5a2e63=await getBffScriptInfo(_0x20548b[_0x4aad57(0x1a4)]('id')),_0x22004e=_0x20548b[_0x4aad57(0x19b)](_0x4aad57(0x19d));if(_0x22004e)return{'ok':!![],'data':_0x5a2e63};return{'ok':!![],'data':{'id':_0x5a2e63['id'],'appCode':_0x5a2e63[_0x4aad57(0x1aa)],'functionName':_0x5a2e63[_0x4aad57(0x1ae)]??'','scriptType':_0x5a2e63[_0x4aad57(0x1a9)],'description':_0x5a2e63[_0x4aad57(0x1ad)]||'(none)','createdTime':_0x5a2e63[_0x4aad57(0x1a2)]??'','updatedTime':_0x5a2e63[_0x4aad57(0x1a1)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a9_0x1dab(){const _0x7b6398=['Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','6329428hGqaAa','10MEVBML','6ebKLiq','3906PfTuuT','3LvoZEC','str','162413QBeaCx','BFF\x20function\x20name\x20to\x20execute','bff','19834980xIZJxB','now','10583914tSRkhJ','exec','186qauMtQ','18472tOqadW','2341272Yytxdj','name','138085hnGWxa'];a9_0x1dab=function(){return _0x7b6398;};return a9_0x1dab();}const a9_0x15b3a5=a9_0x5015;function a9_0x5015(_0x3af70d,_0x38ed0f){_0x3af70d=_0x3af70d-0xf0;const _0x1dabe9=a9_0x1dab();let _0x501540=_0x1dabe9[_0x3af70d];return _0x501540;}(function(_0x57da3d,_0x37bfe5){const _0x534700=a9_0x5015,_0x383c5e=_0x57da3d();while(!![]){try{const _0x55d7d7=-parseInt(_0x534700(0xfc))/0x1*(parseInt(_0x534700(0xf8))/0x2)+parseInt(_0x534700(0xfa))/0x3*(-parseInt(_0x534700(0xf2))/0x4)+-parseInt(_0x534700(0xf4))/0x5*(-parseInt(_0x534700(0xf0))/0x6)+-parseInt(_0x534700(0xf6))/0x7+-parseInt(_0x534700(0xf1))/0x8*(-parseInt(_0x534700(0xf9))/0x9)+-parseInt(_0x534700(0xf7))/0xa*(parseInt(_0x534700(0x101))/0xb)+parseInt(_0x534700(0xff))/0xc;if(_0x55d7d7===_0x37bfe5)break;else _0x383c5e['push'](_0x383c5e['shift']());}catch(_0x1c2cbd){_0x383c5e['push'](_0x383c5e['shift']());}}}(a9_0x1dab,0x8bb35));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':a9_0x15b3a5(0xfe),'command':a9_0x15b3a5(0x102),'description':a9_0x15b3a5(0xf5),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a9_0x15b3a5(0xfd)},PARAMS_FLAG],async 'execute'(_0x36a2df){const _0x28d2d5=a9_0x15b3a5,_0x2c5c21=parseJsonParams(_0x36a2df[_0x28d2d5(0xfb)]('params')),_0x2586fc=Date['now'](),_0x480e40=await executeSdkBff(_0x36a2df['str'](_0x28d2d5(0xf3)),_0x2c5c21),_0x3b84c8=Date[_0x28d2d5(0x100)]()-_0x2586fc;return{'ok':!![],'data':{'result':_0x480e40,'elapsed':_0x3b84c8},'message':'BFF\x20executed\x20in\x20'+_0x3b84c8+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x127c24,_0x3ca120){const _0x5af8e7=a10_0x2448,_0x18c60e=_0x127c24();while(!![]){try{const _0x3b0636=-parseInt(_0x5af8e7(0x164))/0x1*(-parseInt(_0x5af8e7(0x16b))/0x2)+-parseInt(_0x5af8e7(0x168))/0x3*(-parseInt(_0x5af8e7(0x167))/0x4)+-parseInt(_0x5af8e7(0x169))/0x5+-parseInt(_0x5af8e7(0x165))/0x6*(-parseInt(_0x5af8e7(0x16d))/0x7)+parseInt(_0x5af8e7(0x16e))/0x8*(-parseInt(_0x5af8e7(0x16a))/0x9)+-parseInt(_0x5af8e7(0x16c))/0xa+parseInt(_0x5af8e7(0x166))/0xb;if(_0x3b0636===_0x3ca120)break;else _0x18c60e['push'](_0x18c60e['shift']());}catch(_0x5ddcce){_0x18c60e['push'](_0x18c60e['shift']());}}}(a10_0x2c5d,0xe3d1f));import{bffDetail}from'../../commands/bff/detail.js';function a10_0x2448(_0x46b2fb,_0x5d83ed){_0x46b2fb=_0x46b2fb-0x164;const _0x2c5d84=a10_0x2c5d();let _0x24482a=_0x2c5d84[_0x46b2fb];return _0x24482a;}import{bffExec}from'../../commands/bff/exec.js';function a10_0x2c5d(){const _0x167224=['477048NgNpQU','21796874cIYXoG','4fwPJwp','1400394rkxEID','7664005iMgbug','189UuBJSf','18gPUHLh','2037560gQcwTf','21vupiNc','66512XcrqCK','17494QOPVzg'];a10_0x2c5d=function(){return _0x167224;};return a10_0x2c5d();}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x108c2f,_0x9a3d98){const _0x26678f=a11_0x2008,_0x55405d=_0x108c2f();while(!![]){try{const _0x1eb055=-parseInt(_0x26678f(0x159))/0x1*(-parseInt(_0x26678f(0x153))/0x2)+-parseInt(_0x26678f(0x147))/0x3*(-parseInt(_0x26678f(0x158))/0x4)+parseInt(_0x26678f(0x14e))/0x5*(-parseInt(_0x26678f(0x149))/0x6)+-parseInt(_0x26678f(0x152))/0x7+parseInt(_0x26678f(0x14a))/0x8*(parseInt(_0x26678f(0x145))/0x9)+-parseInt(_0x26678f(0x14c))/0xa*(parseInt(_0x26678f(0x154))/0xb)+-parseInt(_0x26678f(0x157))/0xc*(parseInt(_0x26678f(0x155))/0xd);if(_0x1eb055===_0x9a3d98)break;else _0x55405d['push'](_0x55405d['shift']());}catch(_0x2432d9){_0x55405d['push'](_0x55405d['shift']());}}}(a11_0x45f9,0x4ba78));function a11_0x2008(_0x56f7ae,_0x2456a6){_0x56f7ae=_0x56f7ae-0x142;const _0x45f930=a11_0x45f9();let _0x200801=_0x45f930[_0x56f7ae];return _0x200801;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';function a11_0x45f9(){const _0x20075e=['15vpgCSK','project','Use\x20only\x20one\x20config\x20scope\x20flag.','\x20found).','184702mGsyVI','10lpkKHX','110pHeaYE','13uNNTBv','inProject','5522532PNzrfi','116hgfTNI','95727ByPnqZ','global-default','global',',\x20or\x20run\x20`','22014UNraop','newConfigFileName','57201MUsFsw','\x20init`\x20first.','940794kKIKwN','1328qeARvQ','Add\x20--global\x20to\x20write\x20to\x20~/','170740fRPHiv','validation'];a11_0x45f9=function(){return _0x20075e;};return a11_0x45f9();}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(_0x2c0d36){const _0x65cb04=a11_0x2008,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x4f51ec}=_0x2c0d36;if(explicitGlobal&&explicitProject)throw CliErrors[_0x65cb04(0x14d)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',_0x65cb04(0x150));if(explicitGlobal)return _0x65cb04(0x143);if(explicitProject)return _0x65cb04(0x14f);switch(_0x4f51ec){case _0x65cb04(0x142):return _0x65cb04(0x143);case'project-default':return _0x2c0d36['inProject']??isInProject()?'project':_0x65cb04(0x143);case'project-or-global-explicit':if(!(_0x2c0d36[_0x65cb04(0x156)]??isInProject()))throw CliErrors[_0x65cb04(0x14d)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x65cb04(0x146)]+_0x65cb04(0x151),_0x65cb04(0x14b)+PRODUCT_CONFIG[_0x65cb04(0x146)]+_0x65cb04(0x144)+CLI_BIN_NAME+_0x65cb04(0x148));return _0x65cb04(0x14f);}}export function toScopeFlags(_0x160e09){const _0x54363f=a11_0x2008;return{'global':_0x160e09===_0x54363f(0x143)};}export function formatScopeLabel(_0x31a927){const _0x2d4375=a11_0x2008;return _0x31a927===_0x2d4375(0x143)?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a12_0x359f(){const _0x289bba=['Exactly\x20one\x20of\x20','39246JXnmVr','6405SuIMiw','join','4VxaorP','some','735955WSGNNk','24iYjZpt','filter','Flags\x20','190QIWvlx','178050BsqAOj','382060WAlgPM','Only\x20one\x20of\x20','186rfTVwl','804784sGAXWD','length','map','\x20is\x20required\x20for\x20`','validation','Remove\x20all\x20but\x20one.',':\x20expected\x20','24VwUSeU','Invalid\x20--','Provide\x20one\x20of:\x20',',\x20got\x20\x22','36963UEkTkY'];a12_0x359f=function(){return _0x289bba;};return a12_0x359f();}(function(_0xb64cfa,_0x3e3bb3){const _0x40ea7d=a12_0x2755,_0x3b1cde=_0xb64cfa();while(!![]){try{const _0x218584=-parseInt(_0x40ea7d(0xdd))/0x1+parseInt(_0x40ea7d(0xe0))/0x2*(parseInt(_0x40ea7d(0xe7))/0x3)+-parseInt(_0x40ea7d(0xeb))/0x4+-parseInt(_0x40ea7d(0xde))/0x5*(-parseInt(_0x40ea7d(0xea))/0x6)+parseInt(_0x40ea7d(0xe8))/0x7*(parseInt(_0x40ea7d(0xd7))/0x8)+parseInt(_0x40ea7d(0xdb))/0x9*(-parseInt(_0x40ea7d(0xe6))/0xa)+-parseInt(_0x40ea7d(0xe2))/0xb*(-parseInt(_0x40ea7d(0xe3))/0xc);if(_0x218584===_0x3e3bb3)break;else _0x3b1cde['push'](_0x3b1cde['shift']());}catch(_0x57b376){_0x3b1cde['push'](_0x3b1cde['shift']());}}}(a12_0x359f,0x2190e));import{CliErrors}from'../../errors.js';function isSet(_0x23d337,_0x32ad86){const _0x35ecc6=_0x23d337['flag'](_0x32ad86);return _0x35ecc6!==undefined&&_0x35ecc6!==''&&_0x35ecc6!==![]&&_0x35ecc6!==0x0;}function fmtNames(_0x2529cb){const _0x228618=a12_0x2755;return _0x2529cb[_0x228618(0xd2)](_0x4b1ef4=>'--'+_0x4b1ef4)[_0x228618(0xdf)](',\x20');}export function requireOneOf(_0x14efe9,_0x52e786,_0x35e26a){const _0x5e89fe=a12_0x2755,_0xf6ec4a=_0x52e786[_0x5e89fe(0xe4)](_0x10ccae=>isSet(_0x14efe9,_0x10ccae));if(_0xf6ec4a[_0x5e89fe(0xec)]!==0x1)throw CliErrors[_0x5e89fe(0xd4)](_0xf6ec4a[_0x5e89fe(0xec)]===0x0?_0x5e89fe(0xdc)+fmtNames(_0x52e786)+'\x20is\x20required\x20for\x20`'+_0x35e26a+'`.':_0x5e89fe(0xe9)+fmtNames(_0x52e786)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0xf6ec4a)+'.',_0xf6ec4a[_0x5e89fe(0xec)]===0x0?_0x5e89fe(0xd9)+fmtNames(_0x52e786):_0x5e89fe(0xd5));}export function requireAnyOf(_0x588b2a,_0x478f07,_0x4f582e){const _0x5cd8ca=a12_0x2755;if(!_0x478f07[_0x5cd8ca(0xe1)](_0x549198=>isSet(_0x588b2a,_0x549198)))throw CliErrors[_0x5cd8ca(0xd4)]('At\x20least\x20one\x20of\x20'+fmtNames(_0x478f07)+_0x5cd8ca(0xd3)+_0x4f582e+'`.',_0x5cd8ca(0xd9)+fmtNames(_0x478f07));}export function mutuallyExclusive(_0x4eda8a,_0x59d04b,_0x5c8ae0){const _0xe7ff65=a12_0x2755,_0x20795b=_0x59d04b['filter'](_0x5e7933=>isSet(_0x4eda8a,_0x5e7933));if(_0x20795b[_0xe7ff65(0xec)]>0x1)throw CliErrors[_0xe7ff65(0xd4)](_0xe7ff65(0xe5)+fmtNames(_0x20795b)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x5c8ae0+'`.','Use\x20only\x20one\x20of:\x20'+fmtNames(_0x59d04b));}function a12_0x2755(_0x5eff2a,_0x44e011){_0x5eff2a=_0x5eff2a-0xd2;const _0x359f25=a12_0x359f();let _0x2755fd=_0x359f25[_0x5eff2a];return _0x2755fd;}export function validatePattern(_0x21a8cd,_0x56d00a,_0x5de76a,_0xc6595e){const _0x5f5c06=a12_0x2755,_0x26f603=_0x21a8cd['str'](_0x56d00a);if(_0x26f603&&!_0x5de76a['test'](_0x26f603))throw CliErrors['validation'](_0x5f5c06(0xd8)+_0x56d00a+_0x5f5c06(0xd6)+_0xc6595e+_0x5f5c06(0xda)+_0x26f603+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x13f9fa=a13_0x2713;(function(_0x1dd009,_0x5168b2){const _0x662203=a13_0x2713,_0x1ffe57=_0x1dd009();while(!![]){try{const _0x3033bf=-parseInt(_0x662203(0x1b7))/0x1*(parseInt(_0x662203(0x1a6))/0x2)+parseInt(_0x662203(0x1b2))/0x3+-parseInt(_0x662203(0x1a3))/0x4+parseInt(_0x662203(0x1af))/0x5*(parseInt(_0x662203(0x1a5))/0x6)+-parseInt(_0x662203(0x1b6))/0x7+-parseInt(_0x662203(0x1a8))/0x8*(-parseInt(_0x662203(0x1b0))/0x9)+parseInt(_0x662203(0x1a9))/0xa*(parseInt(_0x662203(0x1a4))/0xb);if(_0x3033bf===_0x5168b2)break;else _0x1ffe57['push'](_0x1ffe57['shift']());}catch(_0x5486bf){_0x1ffe57['push'](_0x1ffe57['shift']());}}}(a13_0x275d,0xc4b6b));export const CODE_FLAG={'name':a13_0x13f9fa(0x1ad),'type':'string','required':!![],'description':a13_0x13f9fa(0x1a1),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x13f9fa(0x1b4)}};export const SQLCODE_FLAG={'name':a13_0x13f9fa(0x1b9),'type':a13_0x13f9fa(0x1ab),'required':!![],'description':a13_0x13f9fa(0x1b1),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a13_0x13f9fa(0x1b3)}};function a13_0x275d(){const _0x1219a4=['9170735zlyAVG','531889nhbHAo','name','sqlcode','verbose','Dataset\x20code\x20(32-char\x20hex\x20UUID)','Return\x20full\x20raw\x20response\x20object','483144wiHRPG','25069ZPzGwo','30zhYwJY','4HEsVCO','boolean','593304wVmZeq','7150Vefmdv','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','string','params','code','number','48605iIkBnJ','27cKejPn','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','4199487sLtEvA','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','Resource\x20ID'];a13_0x275d=function(){return _0x1219a4;};return a13_0x275d();}export const VERBOSE_FLAG={'name':a13_0x13f9fa(0x1a0),'type':a13_0x13f9fa(0x1a7),'description':a13_0x13f9fa(0x1a2)};export const PARAMS_FLAG={'name':a13_0x13f9fa(0x1ac),'type':'string','description':a13_0x13f9fa(0x1aa)};function a13_0x2713(_0x5541f7,_0x5a58b7){_0x5541f7=_0x5541f7-0x1a0;const _0x275ded=a13_0x275d();let _0x2713d5=_0x275ded[_0x5541f7];return _0x2713d5;}export const NAME_FLAG={'name':a13_0x13f9fa(0x1b8),'type':a13_0x13f9fa(0x1ab),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':a13_0x13f9fa(0x1ae),'required':!![],'description':a13_0x13f9fa(0x1b5)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0x570924=a14_0x4b53;(function(_0x31028a,_0x5c24c1){const _0x3797af=a14_0x4b53,_0x58adb7=_0x31028a();while(!![]){try{const _0x54c42f=parseInt(_0x3797af(0x182))/0x1*(parseInt(_0x3797af(0x172))/0x2)+-parseInt(_0x3797af(0x15a))/0x3+-parseInt(_0x3797af(0x181))/0x4*(-parseInt(_0x3797af(0x15c))/0x5)+parseInt(_0x3797af(0x14c))/0x6*(parseInt(_0x3797af(0x173))/0x7)+parseInt(_0x3797af(0x159))/0x8+parseInt(_0x3797af(0x164))/0x9*(parseInt(_0x3797af(0x163))/0xa)+-parseInt(_0x3797af(0x185))/0xb;if(_0x54c42f===_0x5c24c1)break;else _0x58adb7['push'](_0x58adb7['shift']());}catch(_0x2f1211){_0x58adb7['push'](_0x58adb7['shift']());}}}(a14_0x50ef,0x6545c));function a14_0x4b53(_0x49833a,_0x5cc45d){_0x49833a=_0x49833a-0x148;const _0x50efa3=a14_0x50ef();let _0x4b5399=_0x50efa3[_0x49833a];return _0x4b5399;}import{CliErrors}from'../../errors.js';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':'global','type':a14_0x570924(0x17d),'description':a14_0x570924(0x17b),'default':![]};function a14_0x50ef(){const _0x3021bd=['log','join','length','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','4681120OqjtLq','2037501IuUFVZ','Settable\x20keys:\x20','2155HXbjSX','split','Config\x20files:\x0a','list','Usage:\x20','../../context.js','pageSize','530gFYvoF','58068fvWUtQ','\x20(global)','read','pretty','raw','Key\x20\x22','Set\x20`','isArray','Value\x20to\x20assign','project-or-global-explicit','set','Top-level\x20key\x20\x22','bool','format','4568LTcuVw','343ZwbhbK','apps','field','\x22\x20is\x20not\x20settable.','write','global',';\x20apps.<alias>.appcode','config','Write\x20to\x20global\x20config','\x20config\x20get\x20<key>','boolean','args','stringify','appcode','2212jRxhBK','216llNPxx','\x20\x20global:\x20\x20','get','8289611WymTMP','trim','object','Key\x20not\x20found:\x20','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','List\x20current\x20config','pageSize\x20must\x20be\x20a\x20positive\x20number','\x20\x20project:\x20','includes','riskLevel','delete','23118tJCuyK','Missing\x20key\x20argument.','`\x20=\x20\x22','validation','keys','Missing\x20key\x20or\x20value.','\x20config\x20delete\x20<key>\x20[--global]','alias','key'];a14_0x50ef=function(){return _0x3021bd;};return a14_0x50ef();}function parseAliasAppcodeSetKey(_0x376b75){const _0x2bbade=a14_0x570924,_0x1180f3=_0x376b75[_0x2bbade(0x15d)]('.');if(_0x1180f3['length']!==0x3||_0x1180f3[0x0]!==_0x2bbade(0x174)||_0x1180f3[0x2]!==_0x2bbade(0x180))return undefined;const _0xb5e64e=_0x1180f3[0x1]?.[_0x2bbade(0x186)]();return _0xb5e64e?_0xb5e64e:undefined;}function parseAliasDeleteKey(_0x5de97c){const _0x2f096f=a14_0x570924,_0x11c4d5=_0x5de97c[_0x2f096f(0x15d)]('.');if(_0x11c4d5[_0x2f096f(0x157)]===0x2&&_0x11c4d5[0x0]===_0x2f096f(0x174)){const _0x34e15e=_0x11c4d5[0x1]?.[_0x2f096f(0x186)]();return _0x34e15e?{'alias':_0x34e15e}:undefined;}if(_0x11c4d5[_0x2f096f(0x157)]===0x3&&_0x11c4d5[0x0]===_0x2f096f(0x174)&&_0x11c4d5[0x2]===_0x2f096f(0x180)){const _0x10052d=_0x11c4d5[0x1]?.[_0x2f096f(0x186)]();return _0x10052d?{'alias':_0x10052d,'field':_0x2f096f(0x180)}:undefined;}return undefined;}function setLocalAppAlias(_0x11996b,_0x1d7567,_0x39c6ec){const _0x196009=a14_0x570924,_0x2c4806=_0x11996b[_0x196009(0x174)]&&typeof _0x11996b[_0x196009(0x174)]===_0x196009(0x187)&&!Array[_0x196009(0x16b)](_0x11996b[_0x196009(0x174)])?_0x11996b[_0x196009(0x174)]:{},_0x133e11=_0x2c4806[_0x1d7567]&&typeof _0x2c4806[_0x1d7567]===_0x196009(0x187)&&!Array[_0x196009(0x16b)](_0x2c4806[_0x1d7567])?_0x2c4806[_0x1d7567]:{};_0x133e11[_0x196009(0x180)]=_0x39c6ec,_0x2c4806[_0x1d7567]=_0x133e11,_0x11996b[_0x196009(0x174)]=_0x2c4806;}function deleteLocalAppAlias(_0x12ff47,_0x8f0e37){const _0x26c28c=a14_0x570924;if(!_0x12ff47[_0x26c28c(0x174)]||typeof _0x12ff47[_0x26c28c(0x174)]!==_0x26c28c(0x187)||Array['isArray'](_0x12ff47['apps']))return![];const _0xfcae76=_0x12ff47['apps'],_0x306c76=_0xfcae76[_0x8f0e37['alias']];if(!_0x306c76||typeof _0x306c76!==_0x26c28c(0x187)||Array[_0x26c28c(0x16b)](_0x306c76))return![];if(!_0x8f0e37['field'])return delete _0xfcae76[_0x8f0e37[_0x26c28c(0x153)]],!![];if(!(_0x8f0e37[_0x26c28c(0x175)]in _0x306c76))return![];return delete _0x306c76[_0x8f0e37[_0x26c28c(0x175)]],Object[_0x26c28c(0x150)](_0x306c76)[_0x26c28c(0x157)]===0x0&&delete _0xfcae76[_0x8f0e37[_0x26c28c(0x153)]],!![];}const listDef={'service':'config','command':a14_0x570924(0x15f),'description':a14_0x570924(0x18b),'risk':a14_0x570924(0x166),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x42f19f){const _0x354d99=a14_0x570924,{buildConfigFromFlags:_0x5bf2a3}=await import(_0x354d99(0x161)),_0x3d160a=_0x5bf2a3({}),_0x435454=getProjectConfigPath(),_0x3aa76f=resolveWriteConfigPath(_0x354d99(0x178));if(_0x42f19f[_0x354d99(0x171)]===_0x354d99(0x167))return{'ok':!![],'message':_0x354d99(0x18a)+(JSON[_0x354d99(0x17f)](_0x3d160a[_0x354d99(0x168)],null,0x2)+'\x0a\x0a')+_0x354d99(0x15e)+(_0x354d99(0x148)+(_0x435454??'(none)')+'\x0a')+(_0x354d99(0x183)+_0x3aa76f)};return{'ok':!![],'data':{'effective':_0x3d160a['raw'],'configFiles':{'project':_0x435454??null,'global':_0x3aa76f}}};}},getDef={'service':a14_0x570924(0x17a),'command':a14_0x570924(0x184),'description':'Get\x20a\x20config\x20value','risk':a14_0x570924(0x166),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a14_0x570924(0x158),'required':!![]}],'flags':[],async 'execute'(_0x5ee223){const _0x5ad8fa=a14_0x570924,_0x103ec8=_0x5ee223[_0x5ad8fa(0x17e)][0x0];if(!_0x103ec8)throw CliErrors[_0x5ad8fa(0x14f)](_0x5ad8fa(0x14d),'Usage:\x20'+CLI_BIN_NAME+_0x5ad8fa(0x17c));const {buildConfigFromFlags:_0x57e87e}=await import(_0x5ad8fa(0x161)),{raw:_0x53e3cc}=_0x57e87e({});if(_0x103ec8[_0x5ad8fa(0x149)]('.')){const _0x20b4ce=_0x103ec8['split']('.');let _0x3245df=_0x53e3cc;for(const _0x47a5d7 of _0x20b4ce){if(_0x3245df==null||typeof _0x3245df!==_0x5ad8fa(0x187))throw CliErrors[_0x5ad8fa(0x14f)]('Key\x20not\x20found:\x20'+_0x103ec8);_0x3245df=_0x3245df[_0x47a5d7];}if(_0x3245df===undefined)throw CliErrors['validation'](_0x5ad8fa(0x188)+_0x103ec8);return console[_0x5ad8fa(0x155)](typeof _0x3245df===_0x5ad8fa(0x187)?JSON[_0x5ad8fa(0x17f)](_0x3245df,null,0x2):String(_0x3245df)),{'ok':!![]};}const _0x2921c7=_0x53e3cc[_0x103ec8];if(_0x2921c7===undefined)throw CliErrors[_0x5ad8fa(0x14f)](_0x5ad8fa(0x188)+_0x103ec8);return console[_0x5ad8fa(0x155)](typeof _0x2921c7===_0x5ad8fa(0x187)?JSON[_0x5ad8fa(0x17f)](_0x2921c7,null,0x2):String(_0x2921c7)),{'ok':!![]};}},setDef={'service':a14_0x570924(0x17a),'command':a14_0x570924(0x16e),'description':'Set\x20a\x20config\x20value','risk':a14_0x570924(0x177),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a14_0x570924(0x16c),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4909b9){const _0x311763=a14_0x570924,_0x457090=_0x4909b9[_0x311763(0x17e)][0x0],_0x132b55=_0x4909b9[_0x311763(0x17e)][0x1];if(!_0x457090||_0x132b55===undefined)throw CliErrors[_0x311763(0x14f)](_0x311763(0x151),_0x311763(0x160)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x457090]&&!ENUM_KEYS[_0x457090][_0x311763(0x149)](_0x132b55))throw CliErrors[_0x311763(0x14f)]('Invalid\x20value\x20for\x20\x22'+_0x457090+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x457090][_0x311763(0x156)](',\x20'));if(_0x457090===_0x311763(0x14a))throw CliErrors[_0x311763(0x14f)](_0x311763(0x189));if(_0x457090===_0x311763(0x162)){const _0x215a19=Number(_0x132b55);if(isNaN(_0x215a19)||_0x215a19<=0x0)throw CliErrors[_0x311763(0x14f)](_0x311763(0x18c));}const _0x4f45da=resolveWriteScope({'explicitGlobal':_0x4909b9[_0x311763(0x170)](_0x311763(0x178)),'policy':_0x311763(0x16d)}),_0x1b42c=toScopeFlags(_0x4f45da),_0x33f066=readScopedConfig(_0x1b42c),_0x43164b=parseAliasAppcodeSetKey(_0x457090);if(!_0x43164b&&!isTopLevelConfigKey(_0x457090))throw CliErrors[_0x311763(0x14f)](_0x311763(0x16f)+_0x457090+_0x311763(0x176),_0x311763(0x15b)+getTopLevelConfigKeySummary()+_0x311763(0x179));return _0x43164b?setLocalAppAlias(_0x33f066,_0x43164b,_0x132b55):_0x33f066[_0x457090]=_0x457090==='pageSize'?Number(_0x132b55):_0x132b55,console[_0x311763(0x155)](_0x311763(0x16a)+_0x457090+_0x311763(0x14e)+_0x132b55+'\x22'+(_0x4f45da===_0x311763(0x178)?_0x311763(0x165):'')),writeScopedConfig(_0x33f066,_0x1b42c),{'ok':!![]};}},deleteDef={'service':'config','command':a14_0x570924(0x14b),'description':'Delete\x20a\x20config\x20value','risk':a14_0x570924(0x177),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x570924(0x154),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x54dd6a){const _0x4005ce=a14_0x570924,_0x3de850=_0x54dd6a[_0x4005ce(0x17e)][0x0];if(!_0x3de850)throw CliErrors[_0x4005ce(0x14f)](_0x4005ce(0x14d),_0x4005ce(0x160)+CLI_BIN_NAME+_0x4005ce(0x152));const _0x21e83f=resolveWriteScope({'explicitGlobal':_0x54dd6a[_0x4005ce(0x170)]('global'),'policy':_0x4005ce(0x16d)}),_0xf574c7=toScopeFlags(_0x21e83f),_0x3bc359=readScopedConfig(_0xf574c7),_0x1f516c=parseAliasDeleteKey(_0x3de850);if(_0x1f516c){if(!deleteLocalAppAlias(_0x3bc359,_0x1f516c))throw CliErrors[_0x4005ce(0x14f)](_0x4005ce(0x188)+_0x3de850);return console[_0x4005ce(0x155)]('Deleted\x20`'+_0x3de850+'`'+(_0x21e83f===_0x4005ce(0x178)?_0x4005ce(0x165):'')),writeScopedConfig(_0x3bc359,_0xf574c7),{'ok':!![]};}if(_0x3bc359[_0x3de850]===undefined)throw CliErrors[_0x4005ce(0x14f)](_0x4005ce(0x169)+_0x3de850+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x3bc359[_0x3de850],console[_0x4005ce(0x155)]('Deleted\x20`'+_0x3de850+'`'+(_0x21e83f===_0x4005ce(0x178)?_0x4005ce(0x165):'')),writeScopedConfig(_0x3bc359,_0xf574c7),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a14_0x31619c=a14_0x1647;(function(_0x2ca772,_0x39797d){const _0x5b12a7=a14_0x1647,_0x2dbd02=_0x2ca772();while(!![]){try{const _0x52e47e=-parseInt(_0x5b12a7(0x1d7))/0x1*(parseInt(_0x5b12a7(0x1db))/0x2)+-parseInt(_0x5b12a7(0x1d1))/0x3*(parseInt(_0x5b12a7(0x1d3))/0x4)+parseInt(_0x5b12a7(0x1ec))/0x5+-parseInt(_0x5b12a7(0x1e1))/0x6+-parseInt(_0x5b12a7(0x1e2))/0x7+parseInt(_0x5b12a7(0x1f5))/0x8*(parseInt(_0x5b12a7(0x1ed))/0x9)+parseInt(_0x5b12a7(0x1d2))/0xa*(parseInt(_0x5b12a7(0x1d0))/0xb);if(_0x52e47e===_0x39797d)break;else _0x2dbd02['push'](_0x2dbd02['shift']());}catch(_0x363054){_0x2dbd02['push'](_0x2dbd02['shift']());}}}(a14_0x5f19,0x2c521));import{CliErrors}from'../../errors.js';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_0x31619c(0x1c8),'type':'boolean','description':'Write\x20to\x20global\x20config','default':![]};function a14_0x5f19(){const _0x53c11c=['Missing\x20key\x20or\x20value.','\x20(global)','riskLevel','`\x20=\x20\x22','get','length',';\x20apps.<alias>.appcode','includes','project-or-global-explicit','log','value','\x20config\x20set\x20<key>\x20<value>\x20[--global]','global','appcode','keys','trim','isArray','field','Set\x20`','\x20config\x20delete\x20<key>\x20[--global]','3179DyzmHO','3NKwKWi','15570rqkjZh','397196uOuIVd','\x22.\x20Allowed:\x20','\x20config\x20get\x20<key>','pageSize\x20must\x20be\x20a\x20positive\x20number','10IMqnsV','Set\x20a\x20config\x20value','alias','Deleted\x20`','15546WkNyKa','object','set','write','pageSize','bool','103470rTKkXZ','1967413DiqUTd','\x22\x20not\x20found\x20at\x20top\x20level.','apps','\x20\x20global:\x20\x20','Usage:\x20','(none)','config','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Top-level\x20key\x20\x22','Delete\x20a\x20config\x20value','603440NWqXgu','775881LKXvQH','\x22\x20is\x20not\x20settable.','validation','Missing\x20key\x20argument.','\x20\x20project:\x20','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','delete','key','8uJvlfs','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','read','raw','Get\x20a\x20config\x20value','Key\x20not\x20found:\x20','args','stringify','pretty','Value\x20to\x20assign'];a14_0x5f19=function(){return _0x53c11c;};return a14_0x5f19();}function parseAliasAppcodeSetKey(_0x28e974){const _0xae935a=a14_0x31619c,_0x594dba=_0x28e974['split']('.');if(_0x594dba['length']!==0x3||_0x594dba[0x0]!==_0xae935a(0x1e4)||_0x594dba[0x2]!==_0xae935a(0x1c9))return undefined;const _0x17ebaa=_0x594dba[0x1]?.['trim']();return _0x17ebaa?_0x17ebaa:undefined;}function parseAliasDeleteKey(_0x763873){const _0x2c1ffe=a14_0x31619c,_0x84ecd=_0x763873['split']('.');if(_0x84ecd['length']===0x2&&_0x84ecd[0x0]===_0x2c1ffe(0x1e4)){const _0x3ff7ef=_0x84ecd[0x1]?.[_0x2c1ffe(0x1cb)]();return _0x3ff7ef?{'alias':_0x3ff7ef}:undefined;}if(_0x84ecd[_0x2c1ffe(0x1c1)]===0x3&&_0x84ecd[0x0]===_0x2c1ffe(0x1e4)&&_0x84ecd[0x2]===_0x2c1ffe(0x1c9)){const _0x316c77=_0x84ecd[0x1]?.[_0x2c1ffe(0x1cb)]();return _0x316c77?{'alias':_0x316c77,'field':_0x2c1ffe(0x1c9)}:undefined;}return undefined;}function setLocalAppAlias(_0x32f5f6,_0x1eb26a,_0x459bf2){const _0x111cc5=a14_0x31619c,_0x12c6e6=_0x32f5f6[_0x111cc5(0x1e4)]&&typeof _0x32f5f6[_0x111cc5(0x1e4)]===_0x111cc5(0x1dc)&&!Array[_0x111cc5(0x1cc)](_0x32f5f6[_0x111cc5(0x1e4)])?_0x32f5f6[_0x111cc5(0x1e4)]:{},_0x260054=_0x12c6e6[_0x1eb26a]&&typeof _0x12c6e6[_0x1eb26a]===_0x111cc5(0x1dc)&&!Array['isArray'](_0x12c6e6[_0x1eb26a])?_0x12c6e6[_0x1eb26a]:{};_0x260054[_0x111cc5(0x1c9)]=_0x459bf2,_0x12c6e6[_0x1eb26a]=_0x260054,_0x32f5f6[_0x111cc5(0x1e4)]=_0x12c6e6;}function deleteLocalAppAlias(_0x546a38,_0x4af74b){const _0x2dfef4=a14_0x31619c;if(!_0x546a38[_0x2dfef4(0x1e4)]||typeof _0x546a38[_0x2dfef4(0x1e4)]!==_0x2dfef4(0x1dc)||Array[_0x2dfef4(0x1cc)](_0x546a38[_0x2dfef4(0x1e4)]))return![];const _0x4e85ec=_0x546a38[_0x2dfef4(0x1e4)],_0x180cc2=_0x4e85ec[_0x4af74b[_0x2dfef4(0x1d9)]];if(!_0x180cc2||typeof _0x180cc2!==_0x2dfef4(0x1dc)||Array['isArray'](_0x180cc2))return![];if(!_0x4af74b[_0x2dfef4(0x1cd)])return delete _0x4e85ec[_0x4af74b['alias']],!![];if(!(_0x4af74b[_0x2dfef4(0x1cd)]in _0x180cc2))return![];return delete _0x180cc2[_0x4af74b['field']],Object[_0x2dfef4(0x1ca)](_0x180cc2)[_0x2dfef4(0x1c1)]===0x0&&delete _0x4e85ec[_0x4af74b['alias']],!![];}function a14_0x1647(_0x3a8fb5,_0x6d6e8a){_0x3a8fb5=_0x3a8fb5-0x1b7;const _0x5f1996=a14_0x5f19();let _0x164723=_0x5f1996[_0x3a8fb5];return _0x164723;}const listDef={'service':a14_0x31619c(0x1e8),'command':'list','description':'List\x20current\x20config','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2c2f5e){const _0x46198a=a14_0x31619c,{buildConfigFromFlags:_0x4a9016}=await import('../../context.js'),_0x3b812e=_0x4a9016({}),_0x59aaa5=getProjectConfigPath(),_0x36b5aa=resolveWriteConfigPath(_0x46198a(0x1c8));if(_0x2c2f5e['format']===_0x46198a(0x1ba))return{'ok':!![],'message':_0x46198a(0x1f6)+(JSON[_0x46198a(0x1b9)](_0x3b812e[_0x46198a(0x1f8)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x46198a(0x1f1)+(_0x59aaa5??_0x46198a(0x1e7))+'\x0a')+(_0x46198a(0x1e5)+_0x36b5aa)};return{'ok':!![],'data':{'effective':_0x3b812e[_0x46198a(0x1f8)],'configFiles':{'project':_0x59aaa5??null,'global':_0x36b5aa}}};}},getDef={'service':a14_0x31619c(0x1e8),'command':a14_0x31619c(0x1c0),'description':a14_0x31619c(0x1f9),'risk':a14_0x31619c(0x1f7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x31619c(0x1f4),'description':a14_0x31619c(0x1f2),'required':!![]}],'flags':[],async 'execute'(_0x5f2db9){const _0x3f6a7c=a14_0x31619c,_0x52612e=_0x5f2db9[_0x3f6a7c(0x1b8)][0x0];if(!_0x52612e)throw CliErrors[_0x3f6a7c(0x1ef)](_0x3f6a7c(0x1f0),'Usage:\x20'+CLI_BIN_NAME+_0x3f6a7c(0x1d5));const {buildConfigFromFlags:_0x3c043d}=await import('../../context.js'),{raw:_0x26a4fc}=_0x3c043d({});if(_0x52612e[_0x3f6a7c(0x1c3)]('.')){const _0x3413fa=_0x52612e['split']('.');let _0x1878e4=_0x26a4fc;for(const _0x3b82e2 of _0x3413fa){if(_0x1878e4==null||typeof _0x1878e4!=='object')throw CliErrors[_0x3f6a7c(0x1ef)](_0x3f6a7c(0x1b7)+_0x52612e);_0x1878e4=_0x1878e4[_0x3b82e2];}if(_0x1878e4===undefined)throw CliErrors[_0x3f6a7c(0x1ef)]('Key\x20not\x20found:\x20'+_0x52612e);return console['log'](typeof _0x1878e4===_0x3f6a7c(0x1dc)?JSON['stringify'](_0x1878e4,null,0x2):String(_0x1878e4)),{'ok':!![]};}const _0x3a37ee=_0x26a4fc[_0x52612e];if(_0x3a37ee===undefined)throw CliErrors[_0x3f6a7c(0x1ef)](_0x3f6a7c(0x1b7)+_0x52612e);return console['log'](typeof _0x3a37ee===_0x3f6a7c(0x1dc)?JSON[_0x3f6a7c(0x1b9)](_0x3a37ee,null,0x2):String(_0x3a37ee)),{'ok':!![]};}},setDef={'service':'config','command':a14_0x31619c(0x1dd),'description':a14_0x31619c(0x1d8),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x31619c(0x1f4),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x31619c(0x1c6),'description':a14_0x31619c(0x1bb),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0xd625ff){const _0x1579ce=a14_0x31619c,_0x3be932=_0xd625ff[_0x1579ce(0x1b8)][0x0],_0x12657c=_0xd625ff[_0x1579ce(0x1b8)][0x1];if(!_0x3be932||_0x12657c===undefined)throw CliErrors[_0x1579ce(0x1ef)](_0x1579ce(0x1bc),'Usage:\x20'+CLI_BIN_NAME+_0x1579ce(0x1c7));if(ENUM_KEYS[_0x3be932]&&!ENUM_KEYS[_0x3be932][_0x1579ce(0x1c3)](_0x12657c))throw CliErrors[_0x1579ce(0x1ef)]('Invalid\x20value\x20for\x20\x22'+_0x3be932+_0x1579ce(0x1d4)+ENUM_KEYS[_0x3be932]['join'](',\x20'));if(_0x3be932===_0x1579ce(0x1be))throw CliErrors[_0x1579ce(0x1ef)](_0x1579ce(0x1e9));if(_0x3be932===_0x1579ce(0x1df)){const _0x315b52=Number(_0x12657c);if(isNaN(_0x315b52)||_0x315b52<=0x0)throw CliErrors[_0x1579ce(0x1ef)](_0x1579ce(0x1d6));}const _0x453aec=resolveWriteScope({'explicitGlobal':_0xd625ff[_0x1579ce(0x1e0)](_0x1579ce(0x1c8)),'policy':_0x1579ce(0x1c4)}),_0x53d584=toScopeFlags(_0x453aec),_0x526d9b=readScopedConfig(_0x53d584),_0x4b7818=parseAliasAppcodeSetKey(_0x3be932);if(!_0x4b7818&&!isTopLevelConfigKey(_0x3be932))throw CliErrors[_0x1579ce(0x1ef)](_0x1579ce(0x1ea)+_0x3be932+_0x1579ce(0x1ee),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+_0x1579ce(0x1c2));return _0x4b7818?setLocalAppAlias(_0x526d9b,_0x4b7818,_0x12657c):_0x526d9b[_0x3be932]=_0x3be932===_0x1579ce(0x1df)?Number(_0x12657c):_0x12657c,console['log'](_0x1579ce(0x1ce)+_0x3be932+_0x1579ce(0x1bf)+_0x12657c+'\x22'+(_0x453aec===_0x1579ce(0x1c8)?_0x1579ce(0x1bd):'')),writeScopedConfig(_0x526d9b,_0x53d584),{'ok':!![]};}},deleteDef={'service':a14_0x31619c(0x1e8),'command':a14_0x31619c(0x1f3),'description':a14_0x31619c(0x1eb),'risk':a14_0x31619c(0x1de),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x31619c(0x1f4),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4ad692){const _0x373871=a14_0x31619c,_0x1990d2=_0x4ad692[_0x373871(0x1b8)][0x0];if(!_0x1990d2)throw CliErrors[_0x373871(0x1ef)](_0x373871(0x1f0),_0x373871(0x1e6)+CLI_BIN_NAME+_0x373871(0x1cf));const _0x52a928=resolveWriteScope({'explicitGlobal':_0x4ad692[_0x373871(0x1e0)](_0x373871(0x1c8)),'policy':_0x373871(0x1c4)}),_0x5d24d6=toScopeFlags(_0x52a928),_0x44b077=readScopedConfig(_0x5d24d6),_0x44d70f=parseAliasDeleteKey(_0x1990d2);if(_0x44d70f){if(!deleteLocalAppAlias(_0x44b077,_0x44d70f))throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x1990d2);return console['log'](_0x373871(0x1da)+_0x1990d2+'`'+(_0x52a928===_0x373871(0x1c8)?_0x373871(0x1bd):'')),writeScopedConfig(_0x44b077,_0x5d24d6),{'ok':!![]};}if(_0x44b077[_0x1990d2]===undefined)throw CliErrors[_0x373871(0x1ef)]('Key\x20\x22'+_0x1990d2+_0x373871(0x1e3));return delete _0x44b077[_0x1990d2],console[_0x373871(0x1c5)]('Deleted\x20`'+_0x1990d2+'`'+(_0x52a928==='global'?_0x373871(0x1bd):'')),writeScopedConfig(_0x44b077,_0x5d24d6),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a15_0x32cc(){var _0x126225=['42838Rcekrw','27350IXVVmJ','813032URHdEQ','26KnqrhO','898100dIjAOI','3438zIIOIB','499956QZKvIG','714110fGfYaz','84CYHmzE','407292xpHzfq'];a15_0x32cc=function(){return _0x126225;};return a15_0x32cc();}(function(_0x342932,_0x288e9d){var _0x437ed3=a15_0x512e,_0x1f5897=_0x342932();while(!![]){try{var _0x59ac2b=parseInt(_0x437ed3(0x119))/0x1*(parseInt(_0x437ed3(0x11c))/0x2)+-parseInt(_0x437ed3(0x115))/0x3+parseInt(_0x437ed3(0x113))/0x4+parseInt(_0x437ed3(0x116))/0x5+parseInt(_0x437ed3(0x118))/0x6+parseInt(_0x437ed3(0x117))/0x7*(-parseInt(_0x437ed3(0x11b))/0x8)+-parseInt(_0x437ed3(0x114))/0x9*(-parseInt(_0x437ed3(0x11a))/0xa);if(_0x59ac2b===_0x288e9d)break;else _0x1f5897['push'](_0x1f5897['shift']());}catch(_0x333e0f){_0x1f5897['push'](_0x1f5897['shift']());}}}(a15_0x32cc,0x9edc5));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x512e(_0x57b99d,_0x578312){_0x57b99d=_0x57b99d-0x113;var _0x32cc0c=a15_0x32cc();var _0x512e1b=_0x32cc0c[_0x57b99d];return _0x512e1b;}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';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';
|