@lovrabet/lovrabet-cli 2.0.9-beta.5 → 2.0.9-beta.6
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
|
-
const
|
|
2
|
+
const a0_0xff98ca=a0_0x3a25;function a0_0x3a25(_0x72c5b7,_0x4dea8e){_0x72c5b7=_0x72c5b7-0x164;const _0x5f46a5=a0_0x5f46();let _0x3a2579=_0x5f46a5[_0x72c5b7];return _0x3a2579;}(function(_0x218810,_0x404b47){const _0x1b5767=a0_0x3a25,_0x2941c0=_0x218810();while(!![]){try{const _0x2b1342=-parseInt(_0x1b5767(0x17a))/0x1+parseInt(_0x1b5767(0x17b))/0x2*(-parseInt(_0x1b5767(0x18a))/0x3)+-parseInt(_0x1b5767(0x180))/0x4+-parseInt(_0x1b5767(0x188))/0x5*(-parseInt(_0x1b5767(0x165))/0x6)+parseInt(_0x1b5767(0x168))/0x7*(-parseInt(_0x1b5767(0x17f))/0x8)+parseInt(_0x1b5767(0x173))/0x9+-parseInt(_0x1b5767(0x164))/0xa*(-parseInt(_0x1b5767(0x184))/0xb);if(_0x2b1342===_0x404b47)break;else _0x2941c0['push'](_0x2941c0['shift']());}catch(_0x1f39e0){_0x2941c0['push'](_0x2941c0['shift']());}}}(a0_0x5f46,0x88da1));import{jsx as a0_0xe6a0f}from'react/jsx-runtime';import a0_0x4ff44f 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_0x4ff44f(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()[a0_0xff98ca(0x179)](handleError);async function main(){try{await run();}catch(_0xe55994){handleError(_0xe55994);}}async function run(){const _0x15cd19=a0_0xff98ca;let _0x3920a8=cli[_0x15cd19(0x18b)][0x0],_0x3b45de=cli[_0x15cd19(0x18b)][0x1];const _0x1f3d83=cli[_0x15cd19(0x17c)];try{const {correctFlags:_0x3c3a6d}=await import(_0x15cd19(0x16f)),_0x44fd12=getAllDefinitions()[_0x15cd19(0x181)](_0x551a85=>_0x551a85[_0x15cd19(0x17c)]??[]),{flags:_0xda3ca1,corrections:_0x46a863}=_0x3c3a6d(_0x1f3d83,_0x44fd12);if(_0x46a863[_0x15cd19(0x170)]>0x0){for(const _0x5844fa of _0x46a863){process[_0x15cd19(0x169)][_0x15cd19(0x166)](_0x15cd19(0x171)+_0x5844fa[_0x15cd19(0x187)]+_0x15cd19(0x178)+_0x5844fa[_0x15cd19(0x176)]+_0x15cd19(0x17d)+_0x5844fa[_0x15cd19(0x186)]+'\x0a');}Object[_0x15cd19(0x16a)](_0x1f3d83,_0xda3ca1);}}catch{}if(!_0x3920a8||!isKnownService(_0x3920a8)){const {waitUntilExit:_0x6696e8}=render(a0_0xe6a0f(Help,{}));await _0x6696e8();return;}const _0x1526ad=getServiceEntry(_0x3920a8);if(!_0x3b45de){if(_0x1f3d83[_0x15cd19(0x16b)]){console['log'](generateServiceHelp(_0x3920a8));return;}if(_0x1526ad['defaultCommand'])_0x3b45de=_0x1526ad[_0x15cd19(0x172)];else{console[_0x15cd19(0x189)](generateServiceHelp(_0x3920a8));return;}}const _0x385c7a=findDefinition(_0x3920a8,_0x3b45de);!_0x385c7a&&(console[_0x15cd19(0x189)](generateServiceHelp(_0x3920a8)),handleError(CliErrors[_0x15cd19(0x16e)](_0x3920a8+'\x20'+_0x3b45de)));if(_0x1f3d83[_0x15cd19(0x16b)]){console[_0x15cd19(0x189)](generateCommandHelp(_0x385c7a));return;}const _0x18e95d=buildConfigFromFlags(_0x1f3d83);await initGlobalEnvironment(_0x18e95d);const _0x2b06cd=createPipelineEnv(_0x18e95d,_0x1f3d83);_0x2b06cd[_0x15cd19(0x182)]=cli['input']['slice'](0x2),await runCommand(_0x385c7a,_0x2b06cd);}function handleError(_0x3cc25d){const _0x512570=a0_0xff98ca;if(_0x3cc25d instanceof CliError){_0x3cc25d[_0x512570(0x175)]===_0x512570(0x185)&&(process['stderr'][_0x512570(0x166)](_0x512570(0x183)),process[_0x512570(0x174)](0x0));console[_0x512570(0x177)]('Error:\x20'+_0x3cc25d[_0x512570(0x16c)]);if(_0x3cc25d[_0x512570(0x16d)])console[_0x512570(0x177)](_0x512570(0x18c)+_0x3cc25d[_0x512570(0x16d)]);process['exit'](_0x3cc25d['exitCode']);}isUserCancellation(_0x3cc25d)&&(process[_0x512570(0x169)][_0x512570(0x166)](_0x512570(0x183)),process[_0x512570(0x174)](0x0)),console[_0x512570(0x177)]('Unexpected\x20error:',_0x3cc25d),process[_0x512570(0x174)](0x1);}function a0_0x5f46(){const _0x569a2a=['hint','unknownCommand','./framework/preparse.js','length','[preparse]\x20','defaultCommand','3035205yjvHoB','exit','code','original','error',':\x20--','catch','739072fORvdu','382Luawqc','flags','\x20->\x20--','ERR_USE_AFTER_CLOSE','1784TdqebE','3503300hfVOFg','flatMap','args','\x0aCancelled.\x0a','22hPHTFN','cancelled','corrected','handler','10quYLWn','log','5961GGNyXi','input','Hint:\x20','name','10328420nfEInL','1510434YWJMZe','write','ExitPromptError','11032XNOqGF','stderr','assign','help','message'];a0_0x5f46=function(){return _0x569a2a;};return a0_0x5f46();}function isUserCancellation(_0x227285){const _0x453acb=a0_0xff98ca;if(!(_0x227285 instanceof Error))return![];if(_0x227285[_0x453acb(0x18d)]===_0x453acb(0x167))return!![];if(_0x227285[_0x453acb(0x175)]===_0x453acb(0x17e))return!![];if(_0x227285[_0x453acb(0x175)]==='ERR_STREAM_DESTROYED')return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x54f6f3,_0x1cd31a){const _0x3ad2cb=a1_0xb6ad,_0x2c1171=_0x54f6f3();while(!![]){try{const _0x111b2d=-parseInt(_0x3ad2cb(0x153))/0x1*(-parseInt(_0x3ad2cb(0x152))/0x2)+-parseInt(_0x3ad2cb(0x140))/0x3+-parseInt(_0x3ad2cb(0x139))/0x4*(-parseInt(_0x3ad2cb(0x137))/0x5)+parseInt(_0x3ad2cb(0x151))/0x6*(-parseInt(_0x3ad2cb(0x136))/0x7)+-parseInt(_0x3ad2cb(0x13c))/0x8+-parseInt(_0x3ad2cb(0x145))/0x9*(parseInt(_0x3ad2cb(0x13f))/0xa)+-parseInt(_0x3ad2cb(0x14d))/0xb*(-parseInt(_0x3ad2cb(0x147))/0xc);if(_0x111b2d===_0x1cd31a)break;else _0x2c1171['push'](_0x2c1171['shift']());}catch(_0x29119d){_0x2c1171['push'](_0x2c1171['shift']());}}}(a1_0x495e,0x8e270));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';function a1_0x495e(){const _0x4e53d3=['isArray','appCode','my-apps.json','stringify','77Gqjalq','cache','unknown','ak_','54858GCWpiC','1576BxqYTD','503IBrjfm','.tmp','utf8','digest','707qljPuK','5nYPPBa','slice','2815828WhRuXh','appName','EPERM','2167640FQdDPX','parse','sha256','554870FfiRGJ','32385CKSGwe','trim','find','EACCES','update','162qhDiwJ','EXDEV','2890104GHlQQy','items'];a1_0x495e=function(){return _0x4e53d3;};return a1_0x495e();}import{PRODUCT_CONFIG}from'../../constant/product.js';export function fingerprintAccessKey(_0x115f66){const _0x5c4f53=a1_0xb6ad,_0x11f530=_0x115f66['trim'](),_0x75cd3c=_0x11f530[_0x5c4f53(0x138)](-0x6)||_0x5c4f53(0x14f),_0x34f551=createHash(_0x5c4f53(0x13e))[_0x5c4f53(0x144)](_0x11f530)[_0x5c4f53(0x135)]('hex')[_0x5c4f53(0x138)](0x0,0xc);return _0x5c4f53(0x150)+_0x75cd3c+'_'+_0x34f551;}function a1_0xb6ad(_0x572d5a,_0x537f70){_0x572d5a=_0x572d5a-0x134;const _0x495e8d=a1_0x495e();let _0xb6ad47=_0x495e8d[_0x572d5a];return _0xb6ad47;}export function getAppCacheFilePath(_0x352ca7,_0x2b0105){const _0x474aee=a1_0xb6ad;return resolve(homedir(),PRODUCT_CONFIG['homeDirName'],_0x474aee(0x14e),_0x352ca7,fingerprintAccessKey(_0x2b0105),_0x474aee(0x14b));}export function readCachedAppList(_0xc6fd5c,_0x59904a){const _0x4796c2=a1_0xb6ad;if(!_0x59904a?.[_0x4796c2(0x141)]())return null;const _0x422dd1=getAppCacheFilePath(_0xc6fd5c,_0x59904a);if(!existsSync(_0x422dd1))return null;try{const _0x252ece=readFileSync(_0x422dd1,_0x4796c2(0x134));if(!_0x252ece['trim']())return null;const _0x4836e7=JSON[_0x4796c2(0x13d)](_0x252ece);if(!Array[_0x4796c2(0x149)](_0x4836e7[_0x4796c2(0x148)]))return null;return _0x4836e7;}catch{return null;}}export function writeCachedAppList(_0x4605bb,_0x4f1f96,_0x2842a3){const _0x598faa=a1_0xb6ad,_0x21dad8=getAppCacheFilePath(_0x4605bb,_0x4f1f96),_0x1ba872=dirname(_0x21dad8);!existsSync(_0x1ba872)&&mkdirSync(_0x1ba872,{'recursive':!![]});const _0x2e3ac1=_0x21dad8+_0x598faa(0x154);try{writeFileSync(_0x2e3ac1,JSON[_0x598faa(0x14c)](_0x2842a3,null,0x2)+'\x0a',{'encoding':_0x598faa(0x134),'mode':0x180});try{renameSync(_0x2e3ac1,_0x21dad8);}catch(_0x247a9c){if(_0x247a9c['code']===_0x598faa(0x13b)||_0x247a9c['code']===_0x598faa(0x146)||_0x247a9c['code']===_0x598faa(0x143)){writeFileSync(_0x21dad8,JSON[_0x598faa(0x14c)](_0x2842a3,null,0x2)+'\x0a',{'encoding':_0x598faa(0x134)});try{unlinkSync(_0x2e3ac1);}catch{}}else throw _0x247a9c;}}catch(_0x39a61){try{unlinkSync(_0x2e3ac1);}catch{}throw _0x39a61;}return _0x21dad8;}export function resolveCachedAppCode(_0x56dc5c,_0x592e25,_0x1dcf18){const _0x191e76=a1_0xb6ad;if(!_0x56dc5c)return undefined;const _0x1650d1=readCachedAppList(_0x592e25,_0x1dcf18),_0x217cf2=_0x1650d1?.['items'][_0x191e76(0x142)](_0x253e97=>_0x253e97[_0x191e76(0x13a)]===_0x56dc5c);return _0x217cf2?.[_0x191e76(0x14a)]?.['trim']()||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
|
+
const a2_0x4fc154=a2_0x58ed;(function(_0x4f8e87,_0x221583){const _0x15580d=a2_0x58ed,_0x3823c2=_0x4f8e87();while(!![]){try{const _0x45266e=-parseInt(_0x15580d(0xa8))/0x1*(parseInt(_0x15580d(0xa5))/0x2)+-parseInt(_0x15580d(0x98))/0x3+parseInt(_0x15580d(0xd4))/0x4+parseInt(_0x15580d(0xc9))/0x5+-parseInt(_0x15580d(0xa6))/0x6*(parseInt(_0x15580d(0x8a))/0x7)+-parseInt(_0x15580d(0x83))/0x8+parseInt(_0x15580d(0xb5))/0x9;if(_0x45266e===_0x221583)break;else _0x3823c2['push'](_0x3823c2['shift']());}catch(_0x49f9b7){_0x3823c2['push'](_0x3823c2['shift']());}}}(a2_0x11f5,0xf11d7));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_0x4fc154(0x93),'description':a2_0x4fc154(0x9c),'default':![]};function collectFlags(_0x5ba42c,_0x23eae0){const _0x449e3d=a2_0x4fc154,_0xf8ef2d={};for(const _0x163977 of _0x23eae0){const _0x397547=_0x163977[_0x449e3d(0xc3)]===_0x449e3d(0x93)?_0x5ba42c[_0x449e3d(0xa9)](_0x163977['name']):_0x5ba42c[_0x449e3d(0xb9)](_0x163977[_0x449e3d(0xcf)]);if(_0x397547!==''&&_0x397547!==![])_0xf8ef2d[_0x163977['name']]=_0x397547;}if(_0x5ba42c['nonInteractive'])_0xf8ef2d[_0x449e3d(0x99)]=!![];return _0xf8ef2d;}function a2_0x11f5(){const _0x1e1dcc=['Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','fetchedAt','entries','str','use','project-default','appOwnerName','app','source','map','\x20app(s)\x20for\x20env=\x22','Missing\x20app\x20name.','accessKey','type','globalPath','Remote\x20app\x20name\x20to\x20activate','\x20app\x20use\x20<name>\x20[--global]','i18nInfo','Refreshed\x20app\x20cache\x20with\x20','8965950HYnHKh','read','raw','write','cachePath','appName','name','projectPath','\x22\x20not\x20found.','../../commands/app/remote-source.js','local','5496608sSMuAF','pull','6669352AsaLhe','Usage:\x20','\x20cached\x20app(s)\x20for\x20env=\x22','mergedCli','\x20config\x20file','isArray','list','7LYPdYA','no-cache','appPublishStatus','cache','remote','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','length','Default\x20app\x20candidate\x20set\x20to\x20\x22','from','boolean','appcode','.appcode\x20to\x20.lovrabet.json.','find','join','3839073eGeCqV','nonInteractive','production','string','Use\x20global\x20config\x20scope','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','App\x20\x22','appCode','Target\x20environment\x20(default:\x20current\x20env)','Read\x20from\x20local\x20cache\x20only','Loaded\x20','newConfigFileName','global','16582CAQpHQ','2572446mZMmql','../../context.js','154wiHJbT','bool','validation','filter','No\x20cached\x20apps\x20found.','No\x20apps\x20found\x20on\x20the\x20platform.','trim','Filter\x20by\x20environment\x20(default:\x20current\x20env)','items','defaultApp','../../commands/app/cache.js','args','env','14752620MANjcw'];a2_0x11f5=function(){return _0x1e1dcc;};return a2_0x11f5();}function normalizeLanguages(_0x3f6ccc){const _0x56fb9b=a2_0x4fc154;if(!Array[_0x56fb9b(0x88)](_0x3f6ccc))return[];return _0x3f6ccc[_0x56fb9b(0xab)](_0x176619=>typeof _0x176619===_0x56fb9b(0x9b))[_0x56fb9b(0xbf)](_0x5bdc49=>_0x5bdc49[_0x56fb9b(0xae)]())[_0x56fb9b(0xab)](Boolean);}function buildRemoteAppI18nFields(_0x59776a){const _0x3da697=a2_0x4fc154,_0x5a94d9=normalizeLanguages(_0x59776a[_0x3da697(0xc7)]?.['langs']);return{'enableI18n':typeof _0x59776a['enableI18n']===_0x3da697(0x93)?_0x59776a['enableI18n']:null,'languages':_0x5a94d9,'i18nInfo':_0x59776a[_0x3da697(0xc7)]?{..._0x59776a['i18nInfo'],'langs':_0x5a94d9[_0x3da697(0x90)]?_0x5a94d9:null}:null};}function a2_0x58ed(_0x306d1a,_0x49f923){_0x306d1a=_0x306d1a-0x82;const _0x11f50f=a2_0x11f5();let _0x58ed58=_0x11f50f[_0x306d1a];return _0x58ed58;}const initDef={'service':'app','command':'init','description':'Initialize\x20'+PRODUCT_CONFIG[a2_0x4fc154(0xa3)]+a2_0x4fc154(0x87),'risk':a2_0x4fc154(0xcc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x49356d){return await runInit(collectFlags(_0x49356d,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':'app','command':a2_0x4fc154(0x89),'description':a2_0x4fc154(0x9d),'risk':a2_0x4fc154(0xca),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':'string','description':a2_0x4fc154(0xaf),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x4fc154(0xd3),'type':'boolean','description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x4fc154(0x8b),'type':a2_0x4fc154(0x93),'description':a2_0x4fc154(0xb6),'default':![]}],async 'execute'(_0x37b4f3){const _0x587671=a2_0x4fc154,_0x589a37=_0x37b4f3[_0x587671(0xb9)]('env')||_0x37b4f3['envName']||getEnv()||_0x587671(0x9a),_0x1c67a4=_0x37b4f3[_0x587671(0xa9)]('local'),_0xa5792a=_0x37b4f3[_0x587671(0xa9)]('no-cache'),{readRawConfigWithLayers:_0x1307b5,resolveDefaultAppSource:_0x7c7036,getLocalAppAliases:_0x317b86}=await import(_0x587671(0xa7)),{getRemoteAppList:_0x27ef4a}=await import(_0x587671(0xd2)),{config:_0x37863b,layers:_0x397d65}=_0x1307b5(),_0x1b2666=_0x7c7036(_0x397d65),{defaultApp:_0x30cc4f}=_0x37863b,_0x22b5b3=await _0x27ef4a({'env':_0x589a37,'accessKey':_0x37b4f3[_0x587671(0xc2)],'localOnly':_0x1c67a4,'noCache':_0xa5792a}),_0x315f1b=_0x22b5b3[_0x587671(0xb0)][_0x587671(0xbf)](_0x3f7900=>{const _0x29b6bb=_0x587671;return{'name':_0x3f7900[_0x29b6bb(0xce)],'appcode':_0x3f7900[_0x29b6bb(0x9f)],'named':!![],'definedIn':_0x29b6bb(0x8e),'isDefault':_0x3f7900['appName']===_0x30cc4f,...buildAppProfileListFields(_0x589a37),...buildRemoteAppI18nFields(_0x3f7900),'source':_0x22b5b3['source'],'owner':_0x3f7900[_0x29b6bb(0xbc)]??null,'status':_0x3f7900[_0x29b6bb(0x8c)]??null,'cachedAt':_0x22b5b3[_0x29b6bb(0xb7)]};}),_0x56ac7d=_0x317b86(_0x37863b);let _0x382e2d=0x0;for(const [_0x7ae29,_0x20e501]of Object[_0x587671(0xb8)](_0x56ac7d)){const _0x27f470=typeof _0x20e501[_0x587671(0x94)]===_0x587671(0x9b)?_0x20e501[_0x587671(0x94)][_0x587671(0xae)]():'';if(!_0x27f470)continue;_0x382e2d+=0x1,_0x315f1b['push']({'name':_0x7ae29,'appcode':_0x27f470,'named':!![],'definedIn':_0x587671(0xd3),'isDefault':_0x7ae29===_0x30cc4f,...buildAppProfileListFields(_0x589a37),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x315f1b,_0x37b4f3[_0x587671(0x86)]);if(_0x315f1b[_0x587671(0x90)]===0x0)return{'ok':!![],'data':[],'message':_0x22b5b3[_0x587671(0xbe)]==='cache'?_0x587671(0xac):_0x587671(0xad)};const _0x22d660=_0x315f1b[_0x587671(0x96)](_0x125661=>_0x125661['isCurrent']===!![]),_0x228eed=_0x30cc4f??_0x22d660?.[_0x587671(0xcf)]??null,_0x118e37={'env':_0x589a37,'source':_0x22b5b3['source'],'fetchedAt':_0x22b5b3[_0x587671(0xb7)],'cachePath':_0x22b5b3[_0x587671(0xcd)],'globalPath':_0x397d65[_0x587671(0xc4)]??null,'projectPath':_0x397d65[_0x587671(0xd0)]??null,'defaultApp':_0x228eed,'defaultAppSource':_0x30cc4f!=null?_0x1b2666:null,'localAliasCount':_0x382e2d};return{'ok':!![],'data':{'items':_0x315f1b,'meta':_0x118e37}};}},pullDef={'service':a2_0x4fc154(0xbd),'command':a2_0x4fc154(0x82),'description':a2_0x4fc154(0x8f),'risk':a2_0x4fc154(0xcc),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x4fc154(0xb4),'type':'string','description':a2_0x4fc154(0xa0),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x4fc154(0x93),'description':a2_0x4fc154(0xa1),'default':![]},{'name':a2_0x4fc154(0x8b),'type':'boolean','description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x107837){const _0x1d5c1f=a2_0x4fc154,_0x1f5775=_0x107837[_0x1d5c1f(0xb9)](_0x1d5c1f(0xb4))||_0x107837['envName']||getEnv()||_0x1d5c1f(0x9a),_0x18a106=_0x107837[_0x1d5c1f(0xa9)]('local'),_0x2bf9c1=_0x107837[_0x1d5c1f(0xa9)](_0x1d5c1f(0x8b)),{getRemoteAppList:_0x7acbb9}=await import(_0x1d5c1f(0xd2)),_0x4899c4=await _0x7acbb9({'env':_0x1f5775,'accessKey':_0x107837[_0x1d5c1f(0xc2)],'localOnly':_0x18a106,'noCache':_0x2bf9c1});return{'ok':!![],'data':{'total':_0x4899c4[_0x1d5c1f(0xb0)]['length'],'env':_0x1f5775,'source':_0x4899c4[_0x1d5c1f(0xbe)],'fetchedAt':_0x4899c4[_0x1d5c1f(0xb7)],'cachePath':_0x4899c4[_0x1d5c1f(0xcd)]},'message':_0x4899c4['source']===_0x1d5c1f(0x8d)?_0x1d5c1f(0xa2)+_0x4899c4[_0x1d5c1f(0xb0)][_0x1d5c1f(0x90)]+_0x1d5c1f(0x85)+_0x1f5775+'\x22.':_0x1d5c1f(0xc8)+_0x4899c4[_0x1d5c1f(0xb0)][_0x1d5c1f(0x90)]+_0x1d5c1f(0xc0)+_0x1f5775+'\x22.'};}},useDef={'service':a2_0x4fc154(0xbd),'command':a2_0x4fc154(0xba),'description':'Set\x20the\x20fallback\x20app\x20candidate','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':a2_0x4fc154(0xc5),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x1d9fc6){const _0x5b4d98=a2_0x4fc154;if(!_0x1d9fc6[_0x5b4d98(0xb3)][0x0])throw CliErrors[_0x5b4d98(0xaa)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x5b4d98(0xc6));},async 'execute'(_0x18c9e4){const _0x40bf09=a2_0x4fc154,_0x14927e=_0x18c9e4['args'][0x0];if(!_0x14927e)throw CliErrors[_0x40bf09(0xaa)](_0x40bf09(0xc1),_0x40bf09(0x84)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x3882d5,resolveLocalAppAliasCode:_0x11cf2d}=await import(_0x40bf09(0xa7)),{readCachedAppList:_0x248e23}=await import(_0x40bf09(0xb2)),_0x4bfbce=_0x18c9e4[_0x40bf09(0xb9)](_0x40bf09(0xb4)),_0x543a58=_0x3882d5(_0x4bfbce?{'env':_0x4bfbce}:{}),_0x272d00=_0x248e23(_0x543a58['env'],_0x543a58[_0x40bf09(0xc2)]),_0x5c7ea2=_0x272d00?.[_0x40bf09(0xb0)][_0x40bf09(0x96)](_0x2cb6b1=>_0x2cb6b1['appName']===_0x14927e),_0x2b3ed4=_0x11cf2d(_0x543a58[_0x40bf09(0xcb)]??{},_0x14927e);if(!_0x5c7ea2&&!_0x2b3ed4&&_0x543a58[_0x40bf09(0xb1)]!==_0x14927e){const _0x31ee89=[..._0x272d00?.[_0x40bf09(0xb0)][_0x40bf09(0xbf)](_0x4296ab=>_0x4296ab['appName'])??[]],_0x2376cd=_0x31ee89[_0x40bf09(0x90)]===0x0?'Use\x20`'+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x14927e+_0x40bf09(0x95):'Available\x20remote\x20apps:\x20'+Array[_0x40bf09(0x92)](new Set(_0x31ee89))[_0x40bf09(0x97)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors['validation'](_0x40bf09(0x9e)+_0x14927e+_0x40bf09(0xd1),_0x2376cd);}const _0x33c86f=_0x18c9e4[_0x40bf09(0xa9)](_0x40bf09(0xa4));let _0x3a781d;if(_0x33c86f)_0x3a781d={'global':!![]};else{const {isInProject:_0x5467d0}=await import(_0x40bf09(0xa7)),_0x53dffc=_0x5467d0();_0x3a781d=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x40bf09(0xbb),'inProject':_0x53dffc}));}const _0xfbd6f=readConfig(_0x3a781d);return _0xfbd6f['defaultApp']=_0x14927e,writeConfig(_0xfbd6f,_0x3a781d),{'ok':!![],'message':_0x40bf09(0x91)+_0x14927e+'\x22'+scopeLabel(_0x3a781d)+'.'};}},importDef={'service':a2_0x4fc154(0xbd),'command':'import','description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a2_0x4fc154(0xcc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x548524){return await runInitImport(collectFlags(_0x548524,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17e6e0,_0x3539e6){const _0x392281=a3_0x525c,_0x3b2303=_0x17e6e0();while(!![]){try{const _0x3345e7=parseInt(_0x392281(0x182))/0x1*(parseInt(_0x392281(0x174))/0x2)+parseInt(_0x392281(0x17b))/0x3+-parseInt(_0x392281(0x17a))/0x4*(-parseInt(_0x392281(0x173))/0x5)+parseInt(_0x392281(0x177))/0x6*(-parseInt(_0x392281(0x175))/0x7)+-parseInt(_0x392281(0x171))/0x8*(parseInt(_0x392281(0x179))/0x9)+parseInt(_0x392281(0x17f))/0xa+-parseInt(_0x392281(0x17c))/0xb*(-parseInt(_0x392281(0x180))/0xc);if(_0x3345e7===_0x3539e6)break;else _0x3b2303['push'](_0x3b2303['shift']());}catch(_0x3f0785){_0x3b2303['push'](_0x3b2303['shift']());}}}(a3_0x3122,0x2436c));import{fileURLToPath}from'url';function a3_0x525c(_0x5f4f8d,_0x4eaf46){_0x5f4f8d=_0x5f4f8d-0x16f;const _0x312213=a3_0x3122();let _0x525c34=_0x312213[_0x5f4f8d];return _0x525c34;}import{dirname,join}from'path';import{readFileSync}from'fs';function a3_0x3122(){const _0x57b1aa=['data','5zDroXj','2hIXtBv','217ymDORX','errorMsg','57264TFsNmb','success','4653eopffw','440196ccjkQt','279561LOxzHQ','617529wpImzW','parse','Mock\x20API\x20error:\x20','664110SJEccz','36WZlUJq','../../../mock/app-list.json','130729MutXFP','utf-8','errorCode','1928JDOFsm'];a3_0x3122=function(){return _0x57b1aa;};return a3_0x3122();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x169497=a3_0x525c,_0x382e30=join(__dirname,_0x169497(0x181)),_0x3d1068=readFileSync(_0x382e30,_0x169497(0x16f));return JSON[_0x169497(0x17d)](_0x3d1068);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x376b42=a3_0x525c,_0x40cd76=getMockAppList();if(!_0x40cd76[_0x376b42(0x178)])throw new Error(_0x376b42(0x17e)+_0x40cd76[_0x376b42(0x176)]+'\x20('+_0x40cd76[_0x376b42(0x170)]+')');return _0x40cd76[_0x376b42(0x172)]['tableData'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x91e9c4,_0x9c334b){const _0x580ad0=a4_0x296a,_0x5abdf2=_0x91e9c4();while(!![]){try{const _0x55d295=-parseInt(_0x580ad0(0xe7))/0x1*(-parseInt(_0x580ad0(0xe9))/0x2)+parseInt(_0x580ad0(0xee))/0x3*(-parseInt(_0x580ad0(0xef))/0x4)+-parseInt(_0x580ad0(0xe4))/0x5+-parseInt(_0x580ad0(0xeb))/0x6*(-parseInt(_0x580ad0(0xed))/0x7)+-parseInt(_0x580ad0(0xe5))/0x8+parseInt(_0x580ad0(0xf2))/0x9*(parseInt(_0x580ad0(0xf3))/0xa)+-parseInt(_0x580ad0(0xea))/0xb*(-parseInt(_0x580ad0(0xf6))/0xc);if(_0x55d295===_0x9c334b)break;else _0x5abdf2['push'](_0x5abdf2['shift']());}catch(_0x5286d7){_0x5abdf2['push'](_0x5abdf2['shift']());}}}(a4_0x1770,0x844ac));import{getMyApps}from'../../core/api-client.js';function a4_0x1770(){const _0x47518c=['items','toISOString','9EHekfn','5318300pFYbDN','fetchedAt','APP_LIST_SOURCE','84ksiKsc','cache','mock','2185010YFAHbQ','7764864xXOOYa','toLowerCase','9AlxIlZ','trim','82078ceeXSV','1582658ZmOcXe','120JQfyZW','remote','279076gFYopQ','2268627okXhPA','4dnXazP'];a4_0x1770=function(){return _0x47518c;};return a4_0x1770();}import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';function a4_0x296a(_0x18d3c1,_0x1c33af){_0x18d3c1=_0x18d3c1-0xe3;const _0x177070=a4_0x1770();let _0x296a53=_0x177070[_0x18d3c1];return _0x296a53;}import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x107f22=a4_0x296a,_0xdc76c=(productEnv(_0x107f22(0xf5))||'')[_0x107f22(0xe8)]()[_0x107f22(0xe6)]();return _0xdc76c==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x235317){const _0x385d84=a4_0x296a,{env:_0x71e297,accessKey:_0x15803e,localOnly:localOnly=![],noCache:noCache=![]}=_0x235317,_0x1e3ba3=readCachedAppList(_0x71e297,_0x15803e),_0x4b30be=_0x15803e?.[_0x385d84(0xe8)]()?getAppCacheFilePath(_0x71e297,_0x15803e):null;if(localOnly)return{'items':_0x1e3ba3?.[_0x385d84(0xf0)]??[],'source':_0x385d84(0xf7),'fetchedAt':_0x1e3ba3?.[_0x385d84(0xf4)]??null,'cachePath':_0x4b30be};try{const _0x5a47c1=await getRemoteAppItems(),_0x21ca5e=shouldUseMockRemoteApps()?_0x385d84(0xe3):_0x385d84(0xec),_0x4973b9=new Date()[_0x385d84(0xf1)](),_0x8ee7d4=_0x15803e?.[_0x385d84(0xe8)]()?writeCachedAppList(_0x71e297,_0x15803e,{'env':_0x71e297,'fetchedAt':_0x4973b9,'source':_0x21ca5e,'items':_0x5a47c1}):null;return{'items':_0x5a47c1,'source':_0x21ca5e,'fetchedAt':_0x4973b9,'cachePath':_0x8ee7d4};}catch(_0x287e4f){if(!noCache&&_0x1e3ba3)return{'items':_0x1e3ba3['items'],'source':_0x385d84(0xf7),'fetchedAt':_0x1e3ba3[_0x385d84(0xf4)],'cachePath':_0x4b30be};throw _0x287e4f;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x225324,_0x18e298){const _0x1a862c=a5_0x3950,_0x5c0f17=_0x225324();while(!![]){try{const _0x559101=parseInt(_0x1a862c(0x7e))/0x1*(parseInt(_0x1a862c(0x71))/0x2)+-parseInt(_0x1a862c(0x79))/0x3+parseInt(_0x1a862c(0x7d))/0x4*(-parseInt(_0x1a862c(0x80))/0x5)+-parseInt(_0x1a862c(0x7c))/0x6+parseInt(_0x1a862c(0x74))/0x7+-parseInt(_0x1a862c(0x82))/0x8+parseInt(_0x1a862c(0x76))/0x9*(parseInt(_0x1a862c(0x77))/0xa);if(_0x559101===_0x18e298)break;else _0x5c0f17['push'](_0x5c0f17['shift']());}catch(_0x29ce96){_0x5c0f17['push'](_0x5c0f17['shift']());}}}(a5_0x43fc,0x91aa9));import{CLI_BIN_NAME}from'../../constant/cli.js';function a5_0x43fc(){const _0x2d5bd7=['currentApp','1169790TvMgvw','trim','isCurrent','6449424EZXxdu','516aLRefB','16oEQtVm','name','35580FIGyvr','named','2989744mARKAJ','appCode','19876SVsuXh','global','appcode','793527YQhcij','defaultApp','99738Zyxvrr','2780ByZmXT'];a5_0x43fc=function(){return _0x2d5bd7;};return a5_0x43fc();}function a5_0x3950(_0x45d7f0,_0x4ac9ea){_0x45d7f0=_0x45d7f0-0x71;const _0x43fcf7=a5_0x43fc();let _0x39504=_0x43fcf7[_0x45d7f0];return _0x39504;}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x4e480d,_0x3b31d3){const _0x11b2fa=a5_0x3950;if(!_0x3b31d3)return;const _0x4d7a81=!!(_0x3b31d3['currentApp']??_0x3b31d3[_0x11b2fa(0x75)]);for(const _0x1894b0 of _0x4e480d){_0x1894b0[_0x11b2fa(0x7b)]=![];}const _0x28e3bf=_0x3b31d3['appCode']!=null?String(_0x3b31d3[_0x11b2fa(0x83)])[_0x11b2fa(0x7a)]():'';if(_0x4d7a81){const _0x50d738=_0x3b31d3[_0x11b2fa(0x78)]??_0x3b31d3[_0x11b2fa(0x75)];if(_0x50d738){const _0x367941=_0x4e480d['find'](_0x208c21=>_0x208c21[_0x11b2fa(0x81)]===!![]&&_0x208c21[_0x11b2fa(0x7f)]===_0x50d738&&_0x208c21['definedIn']==='local'),_0x686d81=_0x367941??_0x4e480d['find'](_0x9e061f=>_0x9e061f[_0x11b2fa(0x81)]===!![]&&_0x9e061f[_0x11b2fa(0x7f)]===_0x50d738);_0x686d81&&(_0x686d81[_0x11b2fa(0x7b)]=!![]);}return;}if(!_0x28e3bf)return;for(const _0x1c5a65 of _0x4e480d){String(_0x1c5a65[_0x11b2fa(0x73)]??'')[_0x11b2fa(0x7a)]()===_0x28e3bf&&(_0x1c5a65[_0x11b2fa(0x7b)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x42bf19){const _0x240754=a5_0x3950;return formatScopeLabel(_0x42bf19[_0x240754(0x72)]?_0x240754(0x72):'project');}
|
|
@@ -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_0x319398=a6_0x528b;(function(_0x2708ef,_0x20a771){const _0x2ba5d0=a6_0x528b,_0x540e31=_0x2708ef();while(!![]){try{const _0x2601c1=parseInt(_0x2ba5d0(0x11d))/0x1*(parseInt(_0x2ba5d0(0x138))/0x2)+parseInt(_0x2ba5d0(0xf3))/0x3*(-parseInt(_0x2ba5d0(0x12d))/0x4)+-parseInt(_0x2ba5d0(0x142))/0x5+parseInt(_0x2ba5d0(0x12c))/0x6*(-parseInt(_0x2ba5d0(0x115))/0x7)+parseInt(_0x2ba5d0(0x12b))/0x8+parseInt(_0x2ba5d0(0x137))/0x9*(parseInt(_0x2ba5d0(0xf5))/0xa)+parseInt(_0x2ba5d0(0x110))/0xb;if(_0x2601c1===_0x20a771)break;else _0x540e31['push'](_0x540e31['shift']());}catch(_0x8d36f7){_0x540e31['push'](_0x540e31['shift']());}}}(a6_0x707b,0x66228));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a6_0x707b(){const _0x5023c9=['slice','AccessKey\x20saved\x20to\x20','length','7KZJDlj','\x20(via\x20','read','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','init','\x20auth\x20status','stdin','\x20Verify:\x20','auth','\x20doctor','Write\x20to\x20global\x20config\x20(default)','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','test','bool','6472520NZJkhn','6FisygT','4GUREDr','str','env','=ak_xxx','status','ACCESS_KEY','envName','Auth\x20config\x20reinitialized\x20in\x20','Shorthand\x20for\x20--access-key','Read\x20from\x20global\x20config\x20(default)','1269MomSgk','40502KfrPgd','yes','AccessKey\x20(ak_xxx...)','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','write','global','\x20Current\x20env:\x20','login','project','\x20env\x20var','2360220cCgAuK','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','global-default','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','2490591sJaqQW','nonInteractive','8810TAhIur','info','No\x20AccessKey\x20found\x20in\x20','string','stdout','\x20config.','access-key','Show\x20current\x20authentication\x20status','join','isTTY','trim','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','daily','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','userCenterDisplayName','\x20scope.','production','Auth\x20mode:\x20','validation','push','accessKey','Missing\x20accessKey.','Option\x20B:\x20apps\x20config\x20(','Clear\x20from\x20global\x20config\x20(default)','boolean','Clear\x20accessKey\x20from\x20config','\x20config','12191014LJVunH','Tip:\x20you\x20can\x20also\x20run:','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Then\x20verify\x20with:\x20','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','3239124WIrHuZ','\x20auth\x20login\x20--access-key\x20<ak_xxx>','AccessKey\x20cleared\x20from\x20','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','logout'];a6_0x707b=function(){return _0x5023c9;};return a6_0x707b();}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 _0x5286dc=a6_0x528b;writeCliSideChannelLine(_0x5286dc(0x100)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x5286dc(0x111)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x5286dc(0x116));}function buildAccessKeySetupGuide(){const _0x5049dd=a6_0x528b;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x5049dd(0x103)]+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x5049dd(0x128)][_0x5049dd(0xfd)]('\x0a');}function canPromptForAccessKey(_0xc063de){const _0x4dc866=a6_0x528b;return!_0xc063de[_0x4dc866(0xf4)]&&process[_0x4dc866(0x123)]['isTTY']!==![]&&process[_0x4dc866(0xf9)][_0x4dc866(0xfe)]!==![];}function resolveAuthScopeFlags(_0x2154ea){const _0x3c028b=a6_0x528b;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x2154ea[_0x3c028b(0x12a)](_0x3c028b(0x13d)),'explicitProject':_0x2154ea[_0x3c028b(0x12a)](_0x3c028b(0x140)),'policy':_0x3c028b(0x144)}));}async function resolveAuthWriteInput(_0x55c610){const _0x5318fb=a6_0x528b;let _0x2ac5ff=(_0x55c610[_0x5318fb(0x12e)](_0x5318fb(0xfb))||_0x55c610[_0x5318fb(0x12e)]('ak')||'')[_0x5318fb(0xff)]();const _0x46cf20=(_0x55c610[_0x5318fb(0x12e)](_0x5318fb(0x12f))||'')[_0x5318fb(0xff)]();if(!_0x2ac5ff&&canPromptForAccessKey(_0x55c610))try{showAccessKeyCreateHint(),_0x2ac5ff=await promptAccessKey('');}catch(_0x383264){if(isAbortPrompt(_0x383264))throw CliErrors['cancelled']();throw _0x383264;}if(!_0x2ac5ff)throw CliErrors[_0x5318fb(0x107)](_0x5318fb(0x10a),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x5318fb(0x129)](_0x2ac5ff))throw CliErrors[_0x5318fb(0x107)]('Invalid\x20accessKey\x20format:\x20\x22'+_0x2ac5ff+'\x22',_0x5318fb(0x143));if(!_0x46cf20)return{'accessKey':_0x2ac5ff};const _0x2e4c55=normalizeEnv(_0x46cf20);return{'accessKey':_0x2ac5ff,'env':isDaily(_0x2e4c55)?_0x5318fb(0x101):isDev(_0x2e4c55)?'development':_0x5318fb(0x105)};}function a6_0x528b(_0x2ec43f,_0x58a3c0){_0x2ec43f=_0x2ec43f-0xf2;const _0x707b24=a6_0x707b();let _0x528bb7=_0x707b24[_0x2ec43f];return _0x528bb7;}export const authDefinitions=[{'service':a6_0x319398(0x125),'command':a6_0x319398(0x13f),'description':a6_0x319398(0x114),'risk':a6_0x319398(0x13c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x319398(0xfb),'type':a6_0x319398(0xf8),'description':a6_0x319398(0x13a)},{'name':'ak','type':a6_0x319398(0xf8),'description':a6_0x319398(0x135)},{'name':a6_0x319398(0x13d),'type':'boolean','description':a6_0x319398(0x127),'default':!![]},{'name':a6_0x319398(0x140),'type':a6_0x319398(0x10d),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x9db45){const _0x2e17b1=a6_0x319398;if(_0x9db45[_0x2e17b1(0x12a)](_0x2e17b1(0x139)))throw CliErrors[_0x2e17b1(0x107)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.','Use\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x2bd56d=(_0x9db45[_0x2e17b1(0x12e)](_0x2e17b1(0xfb))||_0x9db45[_0x2e17b1(0x12e)]('ak')||'')[_0x2e17b1(0xff)]();if(!_0x2bd56d&&_0x9db45[_0x2e17b1(0xf4)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x4fe95c=await resolveAuthWriteInput(_0x9db45),_0x9d2306=resolveAuthScopeFlags(_0x9db45),_0x18c203=readScopedConfig(_0x9d2306);_0x18c203[_0x2e17b1(0x109)]=_0x4fe95c['accessKey'];_0x4fe95c[_0x2e17b1(0x12f)]&&(_0x18c203[_0x2e17b1(0x12f)]=_0x4fe95c[_0x2e17b1(0x12f)]);writeScopedConfig(_0x18c203,_0x9d2306);const _0x50ab18=_0x9d2306[_0x2e17b1(0x13d)]?'global':'project',_0x4f4b4c=_0x18c203[_0x2e17b1(0x12f)]?'\x20Current\x20env:\x20'+_0x18c203[_0x2e17b1(0x12f)]+'.':'';return{'ok':!![],'message':_0x2e17b1(0x11b)+_0x50ab18+'\x20config.'+_0x4f4b4c+_0x2e17b1(0x124)+CLI_BIN_NAME+_0x2e17b1(0x122)};}},{'service':a6_0x319398(0x125),'command':a6_0x319398(0x121),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a6_0x319398(0x13c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a6_0x319398(0xf8),'description':a6_0x319398(0x13a)},{'name':'ak','type':a6_0x319398(0xf8),'description':a6_0x319398(0x135)},{'name':a6_0x319398(0x12f),'type':a6_0x319398(0xf8),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':'global','type':a6_0x319398(0x10d),'description':a6_0x319398(0x127),'default':!![]},{'name':a6_0x319398(0x140),'type':a6_0x319398(0x10d),'description':a6_0x319398(0x13b),'default':![]}],async 'execute'(_0x442005){const _0xe31e18=a6_0x319398,_0x47c0fb=await resolveAuthWriteInput(_0x442005),_0x4937d9=resolveAuthScopeFlags(_0x442005),_0x1f8a47={'accessKey':_0x47c0fb['accessKey']};_0x47c0fb[_0xe31e18(0x12f)]&&(_0x1f8a47['env']=_0x47c0fb[_0xe31e18(0x12f)]);writeScopedConfig(_0x1f8a47,_0x4937d9);const _0x42f746=_0x4937d9[_0xe31e18(0x13d)]?_0xe31e18(0x13d):_0xe31e18(0x140),_0x4f8121=_0x1f8a47[_0xe31e18(0x12f)]?_0xe31e18(0x13e)+_0x1f8a47[_0xe31e18(0x12f)]+'.':'';return{'ok':!![],'message':_0xe31e18(0x134)+_0x42f746+_0xe31e18(0x104)+_0x4f8121+_0xe31e18(0x124)+CLI_BIN_NAME+_0xe31e18(0x122)};}},{'service':a6_0x319398(0x125),'command':a6_0x319398(0x119),'description':a6_0x319398(0x10e),'risk':a6_0x319398(0x13c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x319398(0x13d),'type':'boolean','description':a6_0x319398(0x10c),'default':!![]},{'name':a6_0x319398(0x140),'type':a6_0x319398(0x10d),'description':a6_0x319398(0x118),'default':![]}],async 'execute'(_0x3dd265){const _0x5eba4e=a6_0x319398,_0x27c8e3=resolveAuthScopeFlags(_0x3dd265),_0x2ed3f1=readScopedConfig(_0x27c8e3),_0x2e1983=!!_0x2ed3f1['accessKey'];delete _0x2ed3f1['accessKey'],writeScopedConfig(_0x2ed3f1,_0x27c8e3);const _0x3e291f=_0x27c8e3[_0x5eba4e(0x13d)]?_0x5eba4e(0x13d):_0x5eba4e(0x140);if(_0x2e1983)return{'ok':!![],'message':_0x5eba4e(0x117)+_0x3e291f+_0x5eba4e(0xfa)};return{'ok':!![],'message':_0x5eba4e(0xf7)+_0x3e291f+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a6_0x319398(0x125),'command':a6_0x319398(0x131),'description':a6_0x319398(0xfc),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a6_0x319398(0x10d),'description':a6_0x319398(0x136),'default':!![]},{'name':'project','type':a6_0x319398(0x10d),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x2fa157){const _0x15ca9b=a6_0x319398,_0x5a0cd3=resolveAuthScopeFlags(_0x2fa157),_0x1aa377=readScopedConfig(_0x5a0cd3),_0x51ea45=productEnvName(_0x15ca9b(0x132)),_0x483ea9=productEnv(_0x15ca9b(0x132))||undefined,_0x1fc351=_0x1aa377[_0x15ca9b(0x109)]||undefined,_0x595c3f=_0x483ea9||_0x1fc351,_0x5669ab=_0x483ea9?_0x51ea45+_0x15ca9b(0x141):_0x1fc351?(_0x5a0cd3[_0x15ca9b(0x13d)]?'global':_0x15ca9b(0x140))+_0x15ca9b(0x10f):null,_0x391998=[_0x15ca9b(0x106)+AUTH_MODE['ClientAk']];if(_0x595c3f){const _0x37d7cf=_0x595c3f['length']>0x8?''+_0x595c3f[_0x15ca9b(0x11a)](0x0,0x8)+'*'['repeat'](_0x595c3f[_0x15ca9b(0x11c)]-0x8):_0x595c3f;_0x391998[_0x15ca9b(0x108)]('AccessKey:\x20'+_0x37d7cf+(_0x5669ab?_0x15ca9b(0x11e)+_0x5669ab+')':''));}return!_0x595c3f&&(_0x391998[_0x15ca9b(0x108)](''),_0x391998[_0x15ca9b(0x108)](_0x15ca9b(0x112)),_0x391998[_0x15ca9b(0x108)](''),_0x391998[_0x15ca9b(0x108)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x15ca9b(0x102)),_0x391998[_0x15ca9b(0x108)](''),_0x391998[_0x15ca9b(0x108)](_0x15ca9b(0x10b)+PRODUCT_CONFIG['newConfigFileName']+')'),_0x391998[_0x15ca9b(0x108)](_0x15ca9b(0x120)),_0x391998[_0x15ca9b(0x108)](''),_0x391998[_0x15ca9b(0x108)]('Option\x20C:\x20environment\x20variable'),_0x391998[_0x15ca9b(0x108)]('\x20\x20export\x20'+_0x51ea45+_0x15ca9b(0x130)),_0x391998['push'](''),_0x391998[_0x15ca9b(0x108)](_0x15ca9b(0x113)+CLI_BIN_NAME+_0x15ca9b(0x122)),_0x391998[_0x15ca9b(0x108)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x15ca9b(0x126))),{'ok':!![],'message':_0x391998[_0x15ca9b(0xfd)]('\x0a')};}},{'service':'auth','command':a6_0x319398(0xf6),'description':a6_0x319398(0xf2),'risk':a6_0x319398(0x11f),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x292d0f){const _0x1113ed=a6_0x319398,_0x330025=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x330025,'meta':{'env':_0x292d0f[_0x1113ed(0x133)]??'production'}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1ef82f,_0x48cae8){const _0x622e68=a7_0x17f1,_0x2f869c=_0x1ef82f();while(!![]){try{const _0x62ede7=parseInt(_0x622e68(0x1b2))/0x1*(-parseInt(_0x622e68(0x1b4))/0x2)+-parseInt(_0x622e68(0x1ac))/0x3*(parseInt(_0x622e68(0x1b5))/0x4)+-parseInt(_0x622e68(0x1ab))/0x5+parseInt(_0x622e68(0x1b7))/0x6*(parseInt(_0x622e68(0x1a9))/0x7)+-parseInt(_0x622e68(0x1ae))/0x8+-parseInt(_0x622e68(0x1aa))/0x9+parseInt(_0x622e68(0x1b8))/0xa;if(_0x62ede7===_0x48cae8)break;else _0x2f869c['push'](_0x2f869c['shift']());}catch(_0x5db548){_0x2f869c['push'](_0x2f869c['shift']());}}}(a7_0x21f7,0xa8511));import{createInterface}from'node:readline';function a7_0x21f7(){const _0xf9ee62=['7551280vMugYH','race','removeListener','once','6oJgTqM','):\x20','429244HhYpcX','156676fmshAT','AbortPrompt','304338PHSASR','46453560tvoICh','name','AccessKey\x20(paste\x20ak_...):\x20','stdin','question','close','161qBRhrw','9145827IkoumQ','3302380tvGfuK','93jafdQH','SIGINT'];a7_0x21f7=function(){return _0xf9ee62;};return a7_0x21f7();}class AbortPrompt extends Error{constructor(){const _0x46fbb2=a7_0x17f1;super('User\x20aborted\x20prompt'),this[_0x46fbb2(0x1b9)]='AbortPrompt';}}function createSafeRl(){const _0x4a28eb=a7_0x17f1,_0x3c8eac=createInterface({'input':process[_0x4a28eb(0x1a6)],'output':process['stdout']});let _0x9976d8;const _0xc07461=new Promise((_0x372e5d,_0x290239)=>{const _0x3c5021=_0x4a28eb;_0x9976d8=()=>{const _0x4063a4=a7_0x17f1;_0x9976d8&&(_0x3c8eac[_0x4063a4(0x1b0)](_0x4063a4(0x1ad),_0x9976d8),_0x9976d8=undefined);try{_0x3c8eac[_0x4063a4(0x1a8)]();}catch{}_0x290239(new AbortPrompt());},_0x3c8eac[_0x3c5021(0x1b1)]('SIGINT',_0x9976d8);}),_0x329d22=()=>{const _0x25a31d=_0x4a28eb;_0x9976d8&&(_0x3c8eac[_0x25a31d(0x1b0)](_0x25a31d(0x1ad),_0x9976d8),_0x9976d8=undefined);try{_0x3c8eac[_0x25a31d(0x1a8)]();}catch{}};return{'rl':_0x3c8eac,'abortPromise':_0xc07461,'disposeSuccess':_0x329d22};}function a7_0x17f1(_0x40f10d,_0x1a9558){_0x40f10d=_0x40f10d-0x1a6;const _0x21f717=a7_0x21f7();let _0x17f124=_0x21f717[_0x40f10d];return _0x17f124;}export async function promptAccessKey(_0x736509=''){const _0x5f5339=a7_0x17f1,{rl:_0x1d4e38,abortPromise:_0x5db8b9,disposeSuccess:_0x23cac2}=createSafeRl(),_0x3c98a0=new Promise(_0x367381=>{const _0x402d7a=a7_0x17f1,_0x4f6224=_0x736509?'AccessKey\x20('+_0x736509+_0x402d7a(0x1b3):_0x402d7a(0x1ba);_0x1d4e38[_0x402d7a(0x1a7)](_0x4f6224,_0x4e9c63=>{_0x23cac2(),_0x367381(_0x4e9c63['trim']()||_0x736509);});});return Promise[_0x5f5339(0x1af)]([_0x3c98a0,_0x5db8b9]);}export function isAbortPrompt(_0x5786e0){const _0x4169c0=a7_0x17f1;return _0x5786e0 instanceof Error&&_0x5786e0['name']===_0x4169c0(0x1b6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x4ac5e2=a8_0xe31c;(function(_0x528eb7,_0x1ee4c6){const _0x1081d0=a8_0xe31c,_0x4feac3=_0x528eb7();while(!![]){try{const _0x2a0c3c=parseInt(_0x1081d0(0x11a))/0x1*(-parseInt(_0x1081d0(0x128))/0x2)+-parseInt(_0x1081d0(0x127))/0x3+parseInt(_0x1081d0(0x123))/0x4+parseInt(_0x1081d0(0x119))/0x5+-parseInt(_0x1081d0(0x122))/0x6+parseInt(_0x1081d0(0x11e))/0x7+parseInt(_0x1081d0(0x118))/0x8;if(_0x2a0c3c===_0x1ee4c6)break;else _0x4feac3['push'](_0x4feac3['shift']());}catch(_0x2c174b){_0x4feac3['push'](_0x4feac3['shift']());}}}(a8_0x16b0,0x270ce));import{getBffScriptInfo}from'../../core/api-client.js';function a8_0x16b0(){const _0x221ace=['updatedTime','detail','626421aGbANi','6KrxNTj','(none)','Get\x20BFF\x20script\x20details\x20by\x20ID','1928168fjCvoE','1113440BGlhwj','73213EmhPoq','appCode','Script\x20ID','bff','1576960XVfzoQ','num','bool','scriptType','1796580VffKej','795348zyZOAR','description'];a8_0x16b0=function(){return _0x221ace;};return a8_0x16b0();}function a8_0xe31c(_0x54f87a,_0x12afb0){_0x54f87a=_0x54f87a-0x116;const _0x16b0a4=a8_0x16b0();let _0xe31cf7=_0x16b0a4[_0x54f87a];return _0xe31cf7;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x4ac5e2(0x11d),'command':a8_0x4ac5e2(0x126),'description':a8_0x4ac5e2(0x117),'risk':'read','flags':[{...ID_FLAG,'description':a8_0x4ac5e2(0x11c)},VERBOSE_FLAG],async 'execute'(_0x502ea5){const _0x1d2264=a8_0x4ac5e2,_0x4a85ff=await getBffScriptInfo(_0x502ea5[_0x1d2264(0x11f)]('id')),_0x4813f6=_0x502ea5[_0x1d2264(0x120)]('verbose');if(_0x4813f6)return{'ok':!![],'data':_0x4a85ff};return{'ok':!![],'data':{'id':_0x4a85ff['id'],'appCode':_0x4a85ff[_0x1d2264(0x11b)],'functionName':_0x4a85ff['functionName']??'','scriptType':_0x4a85ff[_0x1d2264(0x121)],'description':_0x4a85ff[_0x1d2264(0x124)]||_0x1d2264(0x116),'createdTime':_0x4a85ff['createdTime']??'','updatedTime':_0x4a85ff[_0x1d2264(0x125)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a9_0xa9b348=a9_0x2b05;(function(_0x1e9da6,_0x38ba73){const _0xd85f29=a9_0x2b05,_0x4bea0e=_0x1e9da6();while(!![]){try{const _0x5ec553=parseInt(_0xd85f29(0x1f4))/0x1+-parseInt(_0xd85f29(0x1f9))/0x2+-parseInt(_0xd85f29(0x201))/0x3+-parseInt(_0xd85f29(0x1f7))/0x4*(parseInt(_0xd85f29(0x1fe))/0x5)+parseInt(_0xd85f29(0x1f5))/0x6*(parseInt(_0xd85f29(0x202))/0x7)+parseInt(_0xd85f29(0x200))/0x8*(parseInt(_0xd85f29(0x1fb))/0x9)+-parseInt(_0xd85f29(0x1fc))/0xa;if(_0x5ec553===_0x38ba73)break;else _0x4bea0e['push'](_0x4bea0e['shift']());}catch(_0x40122b){_0x4bea0e['push'](_0x4bea0e['shift']());}}}(a9_0x5891,0x89972));function a9_0x5891(){const _0x5b1428=['54irVhNl','now','1703188kWhXzm','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','448220IrcmXN','str','27FSDAYT','3978690aDDRjt','name','5oifFAi','BFF\x20function\x20name\x20to\x20execute','2630816VZOpVq','2528874pPBrIY','694911ySplZF','read','574291hrSOkR'];a9_0x5891=function(){return _0x5b1428;};return a9_0x5891();}function a9_0x2b05(_0x2cbe25,_0x3a9ea8){_0x2cbe25=_0x2cbe25-0x1f3;const _0x5891a1=a9_0x5891();let _0x2b0534=_0x5891a1[_0x2cbe25];return _0x2b0534;}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':'bff','command':'exec','description':a9_0xa9b348(0x1f8),'risk':a9_0xa9b348(0x1f3),'flags':[{...NAME_FLAG,'required':!![],'description':a9_0xa9b348(0x1ff)},PARAMS_FLAG],async 'execute'(_0x124f7e){const _0x4ed425=a9_0xa9b348,_0x37eb38=parseJsonParams(_0x124f7e[_0x4ed425(0x1fa)]('params')),_0x5e3a90=Date[_0x4ed425(0x1f6)](),_0x43967c=await executeSdkBff(_0x124f7e[_0x4ed425(0x1fa)](_0x4ed425(0x1fd)),_0x37eb38),_0x1b9720=Date[_0x4ed425(0x1f6)]()-_0x5e3a90;return{'ok':!![],'data':{'result':_0x43967c,'elapsed':_0x1b9720},'message':'BFF\x20executed\x20in\x20'+_0x1b9720+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x454491,_0x2430ba){const _0xefda28=a10_0x130e,_0x4b4659=_0x454491();while(!![]){try{const _0x466839=-parseInt(_0xefda28(0x199))/0x1+parseInt(_0xefda28(0x197))/0x2+parseInt(_0xefda28(0x193))/0x3+parseInt(_0xefda28(0x196))/0x4+-parseInt(_0xefda28(0x198))/0x5+parseInt(_0xefda28(0x195))/0x6+parseInt(_0xefda28(0x192))/0x7*(-parseInt(_0xefda28(0x194))/0x8);if(_0x466839===_0x2430ba)break;else _0x4b4659['push'](_0x4b4659['shift']());}catch(_0xaa595f){_0x4b4659['push'](_0x4b4659['shift']());}}}(a10_0x4d07,0x6fed9));import{bffDetail}from'../../commands/bff/detail.js';function a10_0x4d07(){const _0x4ec110=['2709960ZPZgZm','229815rMWpgY','1062509fFOxwl','42417OpsGKu','32MioSaJ','2657166cjonJF','2640180jmumxO','1440734jxkfMV'];a10_0x4d07=function(){return _0x4ec110;};return a10_0x4d07();}import{bffExec}from'../../commands/bff/exec.js';function a10_0x130e(_0x241915,_0x224bdb){_0x241915=_0x241915-0x192;const _0x4d0757=a10_0x4d07();let _0x130e31=_0x4d0757[_0x241915];return _0x130e31;}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a220b,_0x5539cd){const _0x138d12=a11_0x5eb6,_0xf00ad9=_0x3a220b();while(!![]){try{const _0x4e83e7=-parseInt(_0x138d12(0xb1))/0x1+parseInt(_0x138d12(0xaf))/0x2*(parseInt(_0x138d12(0xbd))/0x3)+parseInt(_0x138d12(0xb7))/0x4*(-parseInt(_0x138d12(0xb4))/0x5)+-parseInt(_0x138d12(0xaa))/0x6*(parseInt(_0x138d12(0xa9))/0x7)+-parseInt(_0x138d12(0xb6))/0x8+parseInt(_0x138d12(0xb0))/0x9*(-parseInt(_0x138d12(0xae))/0xa)+parseInt(_0x138d12(0xb5))/0xb;if(_0x4e83e7===_0x5539cd)break;else _0xf00ad9['push'](_0xf00ad9['shift']());}catch(_0x2dbf10){_0xf00ad9['push'](_0xf00ad9['shift']());}}}(a11_0xa821,0x88ae1));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a11_0xa821(){const _0x3cc501=['468hpRxcA','67145zquQvH','validation','Add\x20--global\x20to\x20write\x20to\x20~/','5582515jUYnab','26760371twniBC','1732544mFYsET','4VloNaW','newConfigFileName','global-default','inProject','project-default','\x20init`\x20first.','1054551ZqkAnw','3244577iDhczT','12PsPUjp','project-or-global-explicit','project','global','47830pnbzoC','4RyKylZ'];a11_0xa821=function(){return _0x3cc501;};return a11_0xa821();}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';function a11_0x5eb6(_0x34344d,_0x471381){_0x34344d=_0x34344d-0xa9;const _0xa821c1=a11_0xa821();let _0x5eb65f=_0xa821c1[_0x34344d];return _0x5eb65f;}export function resolveConfigScope(_0x451f1b){const _0x337909=a11_0x5eb6,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x1688eb}=_0x451f1b;if(explicitGlobal&&explicitProject)throw CliErrors[_0x337909(0xb2)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return _0x337909(0xad);if(explicitProject)return _0x337909(0xac);switch(_0x1688eb){case _0x337909(0xb9):return _0x337909(0xad);case _0x337909(0xbb):return _0x451f1b[_0x337909(0xba)]??isInProject()?_0x337909(0xac):_0x337909(0xad);case _0x337909(0xab):if(!(_0x451f1b[_0x337909(0xba)]??isInProject()))throw CliErrors[_0x337909(0xb2)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x337909(0xb8)]+'\x20found).',_0x337909(0xb3)+PRODUCT_CONFIG[_0x337909(0xb8)]+',\x20or\x20run\x20`'+CLI_BIN_NAME+_0x337909(0xbc));return _0x337909(0xac);}}export function toScopeFlags(_0x1fbbe3){return{'global':_0x1fbbe3==='global'};}export function formatScopeLabel(_0x239b01){const _0x1fa644=a11_0x5eb6;return _0x239b01===_0x1fa644(0xad)?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a12_0x42ed(_0x4ce054,_0x42fec7){_0x4ce054=_0x4ce054-0x18b;const _0x3e445d=a12_0x3e44();let _0x42eddd=_0x3e445d[_0x4ce054];return _0x42eddd;}(function(_0x174e68,_0xbe3be3){const _0xaccc52=a12_0x42ed,_0x175f4d=_0x174e68();while(!![]){try{const _0x1370a3=-parseInt(_0xaccc52(0x196))/0x1*(parseInt(_0xaccc52(0x19d))/0x2)+parseInt(_0xaccc52(0x1a7))/0x3+parseInt(_0xaccc52(0x1a0))/0x4+-parseInt(_0xaccc52(0x190))/0x5+-parseInt(_0xaccc52(0x191))/0x6*(-parseInt(_0xaccc52(0x1a8))/0x7)+parseInt(_0xaccc52(0x1a5))/0x8*(parseInt(_0xaccc52(0x19c))/0x9)+-parseInt(_0xaccc52(0x19f))/0xa;if(_0x1370a3===_0xbe3be3)break;else _0x175f4d['push'](_0x175f4d['shift']());}catch(_0x580faf){_0x175f4d['push'](_0x175f4d['shift']());}}}(a12_0x3e44,0x79e08));import{CliErrors}from'../../errors.js';function a12_0x3e44(){const _0x9a0d34=['str','Invalid\x20--','7vNGdJM','some','Remove\x20all\x20but\x20one.','join','At\x20least\x20one\x20of\x20','\x20is\x20required\x20for\x20`','9963fdCJGu','1534LLvzLC','\x20are\x20mutually\x20exclusive\x20for\x20`','12981520WsgNIE','3067260nlSfHX','length','Provide\x20one\x20of:\x20','validation',',\x20got\x20\x22','1384VKVmWB','Use\x20only\x20one\x20of:\x20','2576328IzNOUi','1216481iinIWA','flag','\x20is\x20allowed,\x20found:\x20','filter','test','Only\x20one\x20of\x20','940780iXWrpK','6KClWWF','Flags\x20',':\x20expected\x20'];a12_0x3e44=function(){return _0x9a0d34;};return a12_0x3e44();}function isSet(_0x49fd8d,_0x47644b){const _0x52c00c=a12_0x42ed,_0x57a386=_0x49fd8d[_0x52c00c(0x18b)](_0x47644b);return _0x57a386!==undefined&&_0x57a386!==''&&_0x57a386!==![]&&_0x57a386!==0x0;}function fmtNames(_0x21d1e8){const _0x41a01d=a12_0x42ed;return _0x21d1e8['map'](_0x5ac1b7=>'--'+_0x5ac1b7)[_0x41a01d(0x199)](',\x20');}export function requireOneOf(_0x44c05b,_0x41cb5d,_0x4d2092){const _0x1ff7fe=a12_0x42ed,_0x170d8f=_0x41cb5d[_0x1ff7fe(0x18d)](_0x27412d=>isSet(_0x44c05b,_0x27412d));if(_0x170d8f[_0x1ff7fe(0x1a1)]!==0x1)throw CliErrors[_0x1ff7fe(0x1a3)](_0x170d8f[_0x1ff7fe(0x1a1)]===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x41cb5d)+_0x1ff7fe(0x19b)+_0x4d2092+'`.':_0x1ff7fe(0x18f)+fmtNames(_0x41cb5d)+_0x1ff7fe(0x18c)+fmtNames(_0x170d8f)+'.',_0x170d8f[_0x1ff7fe(0x1a1)]===0x0?_0x1ff7fe(0x1a2)+fmtNames(_0x41cb5d):_0x1ff7fe(0x198));}export function requireAnyOf(_0x2f3a65,_0x248e62,_0x1cf473){const _0x29983a=a12_0x42ed;if(!_0x248e62[_0x29983a(0x197)](_0x103206=>isSet(_0x2f3a65,_0x103206)))throw CliErrors[_0x29983a(0x1a3)](_0x29983a(0x19a)+fmtNames(_0x248e62)+'\x20is\x20required\x20for\x20`'+_0x1cf473+'`.',_0x29983a(0x1a2)+fmtNames(_0x248e62));}export function mutuallyExclusive(_0x4cb578,_0xec36ff,_0x54b82f){const _0x46364=a12_0x42ed,_0x192ef0=_0xec36ff[_0x46364(0x18d)](_0x3bd9ba=>isSet(_0x4cb578,_0x3bd9ba));if(_0x192ef0[_0x46364(0x1a1)]>0x1)throw CliErrors[_0x46364(0x1a3)](_0x46364(0x192)+fmtNames(_0x192ef0)+_0x46364(0x19e)+_0x54b82f+'`.',_0x46364(0x1a6)+fmtNames(_0xec36ff));}export function validatePattern(_0x1aaca5,_0x2bfaaa,_0x3b2c3a,_0xc36743){const _0x31c18a=a12_0x42ed,_0x4f380f=_0x1aaca5[_0x31c18a(0x194)](_0x2bfaaa);if(_0x4f380f&&!_0x3b2c3a[_0x31c18a(0x18e)](_0x4f380f))throw CliErrors['validation'](_0x31c18a(0x195)+_0x2bfaaa+_0x31c18a(0x193)+_0xc36743+_0x31c18a(0x1a4)+_0x4f380f+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x18b191=a13_0x5450;(function(_0x4f0d85,_0x5abfda){const _0x5aa22d=a13_0x5450,_0x435ffd=_0x4f0d85();while(!![]){try{const _0x1be150=-parseInt(_0x5aa22d(0x6f))/0x1+-parseInt(_0x5aa22d(0x76))/0x2+parseInt(_0x5aa22d(0x70))/0x3+parseInt(_0x5aa22d(0x74))/0x4*(-parseInt(_0x5aa22d(0x67))/0x5)+parseInt(_0x5aa22d(0x6d))/0x6+-parseInt(_0x5aa22d(0x65))/0x7+parseInt(_0x5aa22d(0x6e))/0x8*(parseInt(_0x5aa22d(0x7a))/0x9);if(_0x1be150===_0x5abfda)break;else _0x435ffd['push'](_0x435ffd['shift']());}catch(_0x1274fb){_0x435ffd['push'](_0x435ffd['shift']());}}}(a13_0x5a08,0x793ce));export const CODE_FLAG={'name':a13_0x18b191(0x79),'type':a13_0x18b191(0x69),'required':!![],'description':a13_0x18b191(0x73),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':a13_0x18b191(0x72),'type':a13_0x18b191(0x69),'required':!![],'description':a13_0x18b191(0x71),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a13_0x18b191(0x6a)}};export const VERBOSE_FLAG={'name':a13_0x18b191(0x66),'type':a13_0x18b191(0x68),'description':'Return\x20full\x20raw\x20response\x20object'};export const PARAMS_FLAG={'name':a13_0x18b191(0x75),'type':'string','description':a13_0x18b191(0x78)};export const NAME_FLAG={'name':a13_0x18b191(0x6c),'type':a13_0x18b191(0x69),'description':a13_0x18b191(0x6b)};function a13_0x5a08(){const _0x22572f=['Resource\x20ID','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','code','14508QRnNYs','4795308erQEuu','verbose','1561180FwUabi','boolean','string','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Resource\x20name\x20for\x20lookup','name','572910rkuHWl','7408YpJlhQ','282004GDOoid','2144106Zytjtp','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','sqlcode','Dataset\x20code\x20(32-char\x20hex\x20UUID)','4GRVunh','params','1054050NCQoYo'];a13_0x5a08=function(){return _0x22572f;};return a13_0x5a08();}function a13_0x5450(_0x46a98a,_0x39cefd){_0x46a98a=_0x46a98a-0x65;const _0x5a0866=a13_0x5a08();let _0x545000=_0x5a0866[_0x46a98a];return _0x545000;}export const ID_FLAG={'name':'id','type':'number','required':!![],'description':a13_0x18b191(0x77)};
|
|
@@ -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_0xf23a12=a14_0x41bc;(function(_0x5ab596,_0x592704){const _0x49f9c1=a14_0x41bc,_0x5a8dd1=_0x5ab596();while(!![]){try{const _0x3f9bbf=parseInt(_0x49f9c1(0x13c))/0x1+parseInt(_0x49f9c1(0x121))/0x2*(parseInt(_0x49f9c1(0x15c))/0x3)+-parseInt(_0x49f9c1(0x14e))/0x4+parseInt(_0x49f9c1(0x14b))/0x5*(parseInt(_0x49f9c1(0x13f))/0x6)+parseInt(_0x49f9c1(0x130))/0x7*(-parseInt(_0x49f9c1(0x158))/0x8)+-parseInt(_0x49f9c1(0x157))/0x9+-parseInt(_0x49f9c1(0x147))/0xa;if(_0x3f9bbf===_0x592704)break;else _0x5a8dd1['push'](_0x5a8dd1['shift']());}catch(_0x497263){_0x5a8dd1['push'](_0x5a8dd1['shift']());}}}(a14_0x3c69,0x2098a));import{CliErrors}from'../../errors.js';function a14_0x3c69(){const _0x3266a1=['\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Missing\x20key\x20argument.','Key\x20not\x20found:\x20','bool','delete','List\x20current\x20config','\x22.\x20Allowed:\x20','799460uZzJVa','stringify','pretty','\x20\x20global:\x20\x20','2695mlGNbc',';\x20apps.<alias>.appcode','set','569200lsIddw','args','(none)','Value\x20to\x20assign','\x20config\x20set\x20<key>\x20<value>\x20[--global]','Set\x20a\x20config\x20value','Deleted\x20`','key','Get\x20a\x20config\x20value','87426ctRklj','8dtMbGG','Delete\x20a\x20config\x20value','global','\x22\x20is\x20not\x20settable.','3NXOsRh','Settable\x20keys:\x20','pageSize','length','list','trim','Key\x20\x22','riskLevel','Usage:\x20','Top-level\x20key\x20\x22','\x22\x20not\x20found\x20at\x20top\x20level.','keys','242278hzRSfr','Missing\x20key\x20or\x20value.','value','validation','\x20(global)','includes','Write\x20to\x20global\x20config','write','\x20config\x20get\x20<key>','read','alias','pageSize\x20must\x20be\x20a\x20positive\x20number','apps','object','config','98273MJSoPf','Invalid\x20value\x20for\x20\x22','../../context.js','isArray','Config\x20files:\x0a','\x20config\x20delete\x20<key>\x20[--global]','raw','log','split','appcode','project-or-global-explicit','\x20\x20project:\x20','14207lKNkLP','field','boolean','2718oRIObJ'];a14_0x3c69=function(){return _0x3266a1;};return a14_0x3c69();}function a14_0x41bc(_0x295688,_0x5b5a8d){_0x295688=_0x295688-0x118;const _0x3c6942=a14_0x3c69();let _0x41bc63=_0x3c6942[_0x295688];return _0x41bc63;}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_0xf23a12(0x15a),'type':a14_0xf23a12(0x13e),'description':a14_0xf23a12(0x127),'default':![]};function parseAliasAppcodeSetKey(_0x4a336a){const _0x5d8178=a14_0xf23a12,_0x507c3c=_0x4a336a['split']('.');if(_0x507c3c[_0x5d8178(0x118)]!==0x3||_0x507c3c[0x0]!==_0x5d8178(0x12d)||_0x507c3c[0x2]!==_0x5d8178(0x139))return undefined;const _0x57147b=_0x507c3c[0x1]?.['trim']();return _0x57147b?_0x57147b:undefined;}function parseAliasDeleteKey(_0x46362d){const _0x2ffad9=a14_0xf23a12,_0x29f710=_0x46362d[_0x2ffad9(0x138)]('.');if(_0x29f710[_0x2ffad9(0x118)]===0x2&&_0x29f710[0x0]==='apps'){const _0x573b9b=_0x29f710[0x1]?.['trim']();return _0x573b9b?{'alias':_0x573b9b}:undefined;}if(_0x29f710[_0x2ffad9(0x118)]===0x3&&_0x29f710[0x0]===_0x2ffad9(0x12d)&&_0x29f710[0x2]===_0x2ffad9(0x139)){const _0xf95a9=_0x29f710[0x1]?.[_0x2ffad9(0x11a)]();return _0xf95a9?{'alias':_0xf95a9,'field':_0x2ffad9(0x139)}:undefined;}return undefined;}function setLocalAppAlias(_0x51fd8c,_0x591363,_0x362f19){const _0x1bafe0=a14_0xf23a12,_0x2b1b14=_0x51fd8c[_0x1bafe0(0x12d)]&&typeof _0x51fd8c['apps']==='object'&&!Array[_0x1bafe0(0x133)](_0x51fd8c['apps'])?_0x51fd8c[_0x1bafe0(0x12d)]:{},_0xa3ea72=_0x2b1b14[_0x591363]&&typeof _0x2b1b14[_0x591363]==='object'&&!Array[_0x1bafe0(0x133)](_0x2b1b14[_0x591363])?_0x2b1b14[_0x591363]:{};_0xa3ea72[_0x1bafe0(0x139)]=_0x362f19,_0x2b1b14[_0x591363]=_0xa3ea72,_0x51fd8c[_0x1bafe0(0x12d)]=_0x2b1b14;}function deleteLocalAppAlias(_0x324107,_0x520340){const _0x2bb0ec=a14_0xf23a12;if(!_0x324107[_0x2bb0ec(0x12d)]||typeof _0x324107[_0x2bb0ec(0x12d)]!=='object'||Array[_0x2bb0ec(0x133)](_0x324107[_0x2bb0ec(0x12d)]))return![];const _0x5001b5=_0x324107[_0x2bb0ec(0x12d)],_0x764f1c=_0x5001b5[_0x520340[_0x2bb0ec(0x12b)]];if(!_0x764f1c||typeof _0x764f1c!==_0x2bb0ec(0x12e)||Array[_0x2bb0ec(0x133)](_0x764f1c))return![];if(!_0x520340[_0x2bb0ec(0x13d)])return delete _0x5001b5[_0x520340['alias']],!![];if(!(_0x520340[_0x2bb0ec(0x13d)]in _0x764f1c))return![];return delete _0x764f1c[_0x520340[_0x2bb0ec(0x13d)]],Object[_0x2bb0ec(0x120)](_0x764f1c)[_0x2bb0ec(0x118)]===0x0&&delete _0x5001b5[_0x520340['alias']],!![];}const listDef={'service':a14_0xf23a12(0x12f),'command':a14_0xf23a12(0x119),'description':a14_0xf23a12(0x145),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x8a5f4b){const _0x41a22c=a14_0xf23a12,{buildConfigFromFlags:_0x4406bc}=await import(_0x41a22c(0x132)),_0x3bcdd4=_0x4406bc({}),_0x32704e=getProjectConfigPath(),_0x33d0bf=resolveWriteConfigPath('global');if(_0x8a5f4b['format']===_0x41a22c(0x149))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON['stringify'](_0x3bcdd4['raw'],null,0x2)+'\x0a\x0a')+_0x41a22c(0x134)+(_0x41a22c(0x13b)+(_0x32704e??_0x41a22c(0x150))+'\x0a')+(_0x41a22c(0x14a)+_0x33d0bf)};return{'ok':!![],'data':{'effective':_0x3bcdd4[_0x41a22c(0x136)],'configFiles':{'project':_0x32704e??null,'global':_0x33d0bf}}};}},getDef={'service':a14_0xf23a12(0x12f),'command':'get','description':a14_0xf23a12(0x156),'risk':a14_0xf23a12(0x12a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0xf23a12(0x155),'description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x4fb45b){const _0x2997bb=a14_0xf23a12,_0x192785=_0x4fb45b[_0x2997bb(0x14f)][0x0];if(!_0x192785)throw CliErrors[_0x2997bb(0x124)]('Missing\x20key\x20argument.',_0x2997bb(0x11d)+CLI_BIN_NAME+_0x2997bb(0x129));const {buildConfigFromFlags:_0x6f0f3a}=await import(_0x2997bb(0x132)),{raw:_0x4dda94}=_0x6f0f3a({});if(_0x192785[_0x2997bb(0x126)]('.')){const _0x3c609b=_0x192785[_0x2997bb(0x138)]('.');let _0x3ed083=_0x4dda94;for(const _0x40dd9c of _0x3c609b){if(_0x3ed083==null||typeof _0x3ed083!==_0x2997bb(0x12e))throw CliErrors[_0x2997bb(0x124)]('Key\x20not\x20found:\x20'+_0x192785);_0x3ed083=_0x3ed083[_0x40dd9c];}if(_0x3ed083===undefined)throw CliErrors[_0x2997bb(0x124)](_0x2997bb(0x142)+_0x192785);return console[_0x2997bb(0x137)](typeof _0x3ed083===_0x2997bb(0x12e)?JSON[_0x2997bb(0x148)](_0x3ed083,null,0x2):String(_0x3ed083)),{'ok':!![]};}const _0x146935=_0x4dda94[_0x192785];if(_0x146935===undefined)throw CliErrors[_0x2997bb(0x124)](_0x2997bb(0x142)+_0x192785);return console['log'](typeof _0x146935===_0x2997bb(0x12e)?JSON[_0x2997bb(0x148)](_0x146935,null,0x2):String(_0x146935)),{'ok':!![]};}},setDef={'service':'config','command':a14_0xf23a12(0x14d),'description':a14_0xf23a12(0x153),'risk':a14_0xf23a12(0x128),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0xf23a12(0x123),'description':a14_0xf23a12(0x151),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x411555){const _0x5b7e07=a14_0xf23a12,_0x4e325e=_0x411555[_0x5b7e07(0x14f)][0x0],_0x3f0aca=_0x411555[_0x5b7e07(0x14f)][0x1];if(!_0x4e325e||_0x3f0aca===undefined)throw CliErrors['validation'](_0x5b7e07(0x122),'Usage:\x20'+CLI_BIN_NAME+_0x5b7e07(0x152));if(ENUM_KEYS[_0x4e325e]&&!ENUM_KEYS[_0x4e325e][_0x5b7e07(0x126)](_0x3f0aca))throw CliErrors['validation'](_0x5b7e07(0x131)+_0x4e325e+_0x5b7e07(0x146)+ENUM_KEYS[_0x4e325e]['join'](',\x20'));if(_0x4e325e===_0x5b7e07(0x11c))throw CliErrors[_0x5b7e07(0x124)](_0x5b7e07(0x140));if(_0x4e325e===_0x5b7e07(0x15e)){const _0x407754=Number(_0x3f0aca);if(isNaN(_0x407754)||_0x407754<=0x0)throw CliErrors[_0x5b7e07(0x124)](_0x5b7e07(0x12c));}const _0x59e519=resolveWriteScope({'explicitGlobal':_0x411555[_0x5b7e07(0x143)]('global'),'policy':_0x5b7e07(0x13a)}),_0x294987=toScopeFlags(_0x59e519),_0x483344=readScopedConfig(_0x294987),_0x3fabf7=parseAliasAppcodeSetKey(_0x4e325e);if(!_0x3fabf7&&!isTopLevelConfigKey(_0x4e325e))throw CliErrors[_0x5b7e07(0x124)](_0x5b7e07(0x11e)+_0x4e325e+_0x5b7e07(0x15b),_0x5b7e07(0x15d)+getTopLevelConfigKeySummary()+_0x5b7e07(0x14c));return _0x3fabf7?setLocalAppAlias(_0x483344,_0x3fabf7,_0x3f0aca):_0x483344[_0x4e325e]=_0x4e325e==='pageSize'?Number(_0x3f0aca):_0x3f0aca,console[_0x5b7e07(0x137)]('Set\x20`'+_0x4e325e+'`\x20=\x20\x22'+_0x3f0aca+'\x22'+(_0x59e519===_0x5b7e07(0x15a)?_0x5b7e07(0x125):'')),writeScopedConfig(_0x483344,_0x294987),{'ok':!![]};}},deleteDef={'service':'config','command':a14_0xf23a12(0x144),'description':a14_0xf23a12(0x159),'risk':a14_0xf23a12(0x128),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0xf23a12(0x155),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x564ec6){const _0x5f563e=a14_0xf23a12,_0x8c1fea=_0x564ec6[_0x5f563e(0x14f)][0x0];if(!_0x8c1fea)throw CliErrors['validation'](_0x5f563e(0x141),_0x5f563e(0x11d)+CLI_BIN_NAME+_0x5f563e(0x135));const _0x4d45e1=resolveWriteScope({'explicitGlobal':_0x564ec6[_0x5f563e(0x143)](_0x5f563e(0x15a)),'policy':_0x5f563e(0x13a)}),_0x5abd0f=toScopeFlags(_0x4d45e1),_0xc8fb11=readScopedConfig(_0x5abd0f),_0x694bc4=parseAliasDeleteKey(_0x8c1fea);if(_0x694bc4){if(!deleteLocalAppAlias(_0xc8fb11,_0x694bc4))throw CliErrors[_0x5f563e(0x124)](_0x5f563e(0x142)+_0x8c1fea);return console[_0x5f563e(0x137)](_0x5f563e(0x154)+_0x8c1fea+'`'+(_0x4d45e1==='global'?_0x5f563e(0x125):'')),writeScopedConfig(_0xc8fb11,_0x5abd0f),{'ok':!![]};}if(_0xc8fb11[_0x8c1fea]===undefined)throw CliErrors[_0x5f563e(0x124)](_0x5f563e(0x11b)+_0x8c1fea+_0x5f563e(0x11f));return delete _0xc8fb11[_0x8c1fea],console[_0x5f563e(0x137)]('Deleted\x20`'+_0x8c1fea+'`'+(_0x4d45e1===_0x5f563e(0x15a)?_0x5f563e(0x125):'')),writeScopedConfig(_0xc8fb11,_0x5abd0f),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f0617,_0x374ec6){var _0xb6a181=a15_0x1ec1,_0x3db230=_0x1f0617();while(!![]){try{var _0x491cff=-parseInt(_0xb6a181(0x1b2))/0x1*(-parseInt(_0xb6a181(0x1ad))/0x2)+-parseInt(_0xb6a181(0x1b5))/0x3+-parseInt(_0xb6a181(0x1b0))/0x4+-parseInt(_0xb6a181(0x1af))/0x5*(parseInt(_0xb6a181(0x1b4))/0x6)+-parseInt(_0xb6a181(0x1ae))/0x7+parseInt(_0xb6a181(0x1b3))/0x8+parseInt(_0xb6a181(0x1b1))/0x9;if(_0x491cff===_0x374ec6)break;else _0x3db230['push'](_0x3db230['shift']());}catch(_0x3c6836){_0x3db230['push'](_0x3db230['shift']());}}}(a15_0x57de,0x52760));function a15_0x1ec1(_0xbc2254,_0x4f7875){_0xbc2254=_0xbc2254-0x1ad;var _0x57decb=a15_0x57de();var _0x1ec147=_0x57decb[_0xbc2254];return _0x1ec147;}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a15_0x57de(){var _0x2b05d5=['130486GVyMGV','3721802WNpwIn','53435inQBdU','2341724uZwTPH','12113361oQsSlW','2ZrddyA','1396256RONJev','48tSJCbA','331722hjbKTV'];a15_0x57de=function(){return _0x2b05d5;};return a15_0x57de();}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';
|