@lovrabet/lovrabet-cli 2.0.9-beta.1 → 2.0.9-beta.3
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 +1 -2
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
(function(_0xec9b65,_0xca220c){const _0x19a3ee=a0_0x4332,_0x5226e9=_0xec9b65();while(!![]){try{const _0x5f3d3d=parseInt(_0x19a3ee(0x1dc))/0x1+-parseInt(_0x19a3ee(0x1fb))/0x2+-parseInt(_0x19a3ee(0x1ea))/0x3*(-parseInt(_0x19a3ee(0x1f0))/0x4)+parseInt(_0x19a3ee(0x1f2))/0x5+-parseInt(_0x19a3ee(0x1ee))/0x6+-parseInt(_0x19a3ee(0x1f1))/0x7+-parseInt(_0x19a3ee(0x1fc))/0x8*(-parseInt(_0x19a3ee(0x1f7))/0x9);if(_0x5f3d3d===_0xca220c)break;else _0x5226e9['push'](_0x5226e9['shift']());}catch(_0x290770){_0x5226e9['push'](_0x5226e9['shift']());}}}(a0_0x2bba,0x220f9));import{jsx as a0_0x237b34}from'react/jsx-runtime';import a0_0x47989c 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';function a0_0x2bba(){const _0x2a0916=['flatMap','handler','508863aWGBgr','defaultCommand','./framework/preparse.js',':\x20--','952740cQRTdk','[preparse]\x20','4ALFtUT','251440whmluQ','715835XgnzNV','code','original','Hint:\x20','stderr','909txaFRS','Unexpected\x20error:','args','exit','554970lxIjHg','18584CKDLZb','name','length','ERR_STREAM_DESTROYED','log','64297NFmShu','error','write','slice','input','help','assign','hint','Error:\x20','unknownCommand','ERR_USE_AFTER_CLOSE','exitCode'];a0_0x2bba=function(){return _0x2a0916;};return a0_0x2bba();}import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x47989c(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x44a129){handleError(_0x44a129);}}function a0_0x4332(_0x1d7c42,_0x17f07c){_0x1d7c42=_0x1d7c42-0x1dc;const _0x2bbaac=a0_0x2bba();let _0x4332d7=_0x2bbaac[_0x1d7c42];return _0x4332d7;}async function run(){const _0x38a02b=a0_0x4332;let _0x14e93a=cli[_0x38a02b(0x1e0)][0x0],_0x41ed17=cli[_0x38a02b(0x1e0)][0x1];const _0x17a20f=cli['flags'];try{const {correctFlags:_0x8840ae}=await import(_0x38a02b(0x1ec)),_0x10375a=getAllDefinitions()[_0x38a02b(0x1e8)](_0x152b51=>_0x152b51['flags']??[]),{flags:_0x356817,corrections:_0x2fa037}=_0x8840ae(_0x17a20f,_0x10375a);if(_0x2fa037[_0x38a02b(0x1fe)]>0x0){for(const _0x293e89 of _0x2fa037){process[_0x38a02b(0x1f6)][_0x38a02b(0x1de)](_0x38a02b(0x1ef)+_0x293e89[_0x38a02b(0x1e9)]+_0x38a02b(0x1ed)+_0x293e89[_0x38a02b(0x1f4)]+'\x20->\x20--'+_0x293e89['corrected']+'\x0a');}Object[_0x38a02b(0x1e2)](_0x17a20f,_0x356817);}}catch{}if(!_0x14e93a||!isKnownService(_0x14e93a)){const {waitUntilExit:_0x10e41d}=render(a0_0x237b34(Help,{}));await _0x10e41d();return;}const _0x283f1a=getServiceEntry(_0x14e93a);if(!_0x41ed17){if(_0x17a20f[_0x38a02b(0x1e1)]){console[_0x38a02b(0x200)](generateServiceHelp(_0x14e93a));return;}if(_0x283f1a[_0x38a02b(0x1eb)])_0x41ed17=_0x283f1a['defaultCommand'];else{console[_0x38a02b(0x200)](generateServiceHelp(_0x14e93a));return;}}const _0x229069=findDefinition(_0x14e93a,_0x41ed17);!_0x229069&&(console[_0x38a02b(0x200)](generateServiceHelp(_0x14e93a)),handleError(CliErrors[_0x38a02b(0x1e5)](_0x14e93a+'\x20'+_0x41ed17)));if(_0x17a20f[_0x38a02b(0x1e1)]){console[_0x38a02b(0x200)](generateCommandHelp(_0x229069));return;}const _0x3eb0cd=buildConfigFromFlags(_0x17a20f);await initGlobalEnvironment(_0x3eb0cd);const _0x3879a9=createPipelineEnv(_0x3eb0cd,_0x17a20f);_0x3879a9[_0x38a02b(0x1f9)]=cli[_0x38a02b(0x1e0)][_0x38a02b(0x1df)](0x2),await runCommand(_0x229069,_0x3879a9);}function handleError(_0x462652){const _0x521202=a0_0x4332;if(_0x462652 instanceof CliError){_0x462652[_0x521202(0x1f3)]==='cancelled'&&(process[_0x521202(0x1f6)]['write']('\x0aCancelled.\x0a'),process[_0x521202(0x1fa)](0x0));console[_0x521202(0x1dd)](_0x521202(0x1e4)+_0x462652['message']);if(_0x462652[_0x521202(0x1e3)])console[_0x521202(0x1dd)](_0x521202(0x1f5)+_0x462652[_0x521202(0x1e3)]);process[_0x521202(0x1fa)](_0x462652[_0x521202(0x1e7)]);}isUserCancellation(_0x462652)&&(process['stderr']['write']('\x0aCancelled.\x0a'),process[_0x521202(0x1fa)](0x0)),console[_0x521202(0x1dd)](_0x521202(0x1f8),_0x462652),process[_0x521202(0x1fa)](0x1);}function isUserCancellation(_0x23c69e){const _0x4ea85=a0_0x4332;if(!(_0x23c69e instanceof Error))return![];if(_0x23c69e[_0x4ea85(0x1fd)]==='ExitPromptError')return!![];if(_0x23c69e[_0x4ea85(0x1f3)]===_0x4ea85(0x1e6))return!![];if(_0x23c69e[_0x4ea85(0x1f3)]===_0x4ea85(0x1ff))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a1_0x457d(_0x38375b,_0x549734){_0x38375b=_0x38375b-0x15e;const _0x57beb4=a1_0x57be();let _0x457d61=_0x57beb4[_0x38375b];return _0x457d61;}(function(_0x3026dc,_0x5e80e3){const _0x52d446=a1_0x457d,_0x51bea2=_0x3026dc();while(!![]){try{const _0x4c94e8=-parseInt(_0x52d446(0x171))/0x1+-parseInt(_0x52d446(0x177))/0x2*(parseInt(_0x52d446(0x17c))/0x3)+parseInt(_0x52d446(0x173))/0x4*(parseInt(_0x52d446(0x175))/0x5)+-parseInt(_0x52d446(0x178))/0x6*(-parseInt(_0x52d446(0x16c))/0x7)+-parseInt(_0x52d446(0x15f))/0x8+parseInt(_0x52d446(0x172))/0x9+parseInt(_0x52d446(0x16d))/0xa*(parseInt(_0x52d446(0x169))/0xb);if(_0x4c94e8===_0x5e80e3)break;else _0x51bea2['push'](_0x51bea2['shift']());}catch(_0xf8c64b){_0x51bea2['push'](_0x51bea2['shift']());}}}(a1_0x57be,0x8d649));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';export function fingerprintAccessKey(_0x2375ce){const _0x2729a7=a1_0x457d,_0x4cb956=_0x2375ce['trim'](),_0x366521=_0x4cb956[_0x2729a7(0x179)](-0x6)||_0x2729a7(0x165),_0x4639b9=createHash(_0x2729a7(0x174))[_0x2729a7(0x17a)](_0x4cb956)[_0x2729a7(0x16f)](_0x2729a7(0x161))[_0x2729a7(0x179)](0x0,0xc);return _0x2729a7(0x168)+_0x366521+'_'+_0x4639b9;}function a1_0x57be(){const _0xe539b2=['EPERM','digest','EACCES','897296UCoOUg','7344009DKEeht','2848bGwwpo','sha256','6490qchksm','stringify','172284ftWmrJ','2051190Ootclo','slice','update','my-apps.json','30fgUjUs','code','homeDirName','3576400AARQxD','appCode','hex','EXDEV','items','trim','unknown','cache','utf8','ak_','3971044AmKJGl','.tmp','appName','14mGdWoo','10HyApGj'];a1_0x57be=function(){return _0xe539b2;};return a1_0x57be();}export function getAppCacheFilePath(_0x2d771d,_0x479404){const _0x5924b0=a1_0x457d;return resolve(homedir(),PRODUCT_CONFIG[_0x5924b0(0x15e)],_0x5924b0(0x166),_0x2d771d,fingerprintAccessKey(_0x479404),_0x5924b0(0x17b));}export function readCachedAppList(_0xc490d5,_0xc5d005){const _0x2d3008=a1_0x457d;if(!_0xc5d005?.[_0x2d3008(0x164)]())return null;const _0x5d5e0d=getAppCacheFilePath(_0xc490d5,_0xc5d005);if(!existsSync(_0x5d5e0d))return null;try{const _0x274e1a=readFileSync(_0x5d5e0d,_0x2d3008(0x167));if(!_0x274e1a[_0x2d3008(0x164)]())return null;const _0x5366b6=JSON['parse'](_0x274e1a);if(!Array['isArray'](_0x5366b6[_0x2d3008(0x163)]))return null;return _0x5366b6;}catch{return null;}}export function writeCachedAppList(_0x356707,_0xe7ab,_0x583d05){const _0x45b37f=a1_0x457d,_0x39beb3=getAppCacheFilePath(_0x356707,_0xe7ab),_0x19f498=dirname(_0x39beb3);!existsSync(_0x19f498)&&mkdirSync(_0x19f498,{'recursive':!![]});const _0xda2a52=_0x39beb3+_0x45b37f(0x16a);try{writeFileSync(_0xda2a52,JSON[_0x45b37f(0x176)](_0x583d05,null,0x2)+'\x0a',{'encoding':_0x45b37f(0x167),'mode':0x180});try{renameSync(_0xda2a52,_0x39beb3);}catch(_0x3c723e){if(_0x3c723e['code']===_0x45b37f(0x16e)||_0x3c723e[_0x45b37f(0x17d)]===_0x45b37f(0x162)||_0x3c723e[_0x45b37f(0x17d)]===_0x45b37f(0x170)){writeFileSync(_0x39beb3,JSON[_0x45b37f(0x176)](_0x583d05,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0xda2a52);}catch{}}else throw _0x3c723e;}}catch(_0xa0692){try{unlinkSync(_0xda2a52);}catch{}throw _0xa0692;}return _0x39beb3;}export function resolveCachedAppCode(_0x3e9f72,_0x471c7b,_0x2cd2b7){const _0x48eee2=a1_0x457d;if(!_0x3e9f72)return undefined;const _0x364745=readCachedAppList(_0x471c7b,_0x2cd2b7),_0x2a36b7=_0x364745?.[_0x48eee2(0x163)]['find'](_0x280785=>_0x280785[_0x48eee2(0x16b)]===_0x3e9f72);return _0x2a36b7?.[_0x48eee2(0x160)]?.[_0x48eee2(0x164)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x3b6a03=a2_0x6a6c;(function(_0x4488af,_0xa4d649){const _0x3f763e=a2_0x6a6c,_0x11d6d4=_0x4488af();while(!![]){try{const _0x341fc2=parseInt(_0x3f763e(0x97))/0x1*(-parseInt(_0x3f763e(0xad))/0x2)+-parseInt(_0x3f763e(0xae))/0x3+parseInt(_0x3f763e(0xb0))/0x4*(-parseInt(_0x3f763e(0xac))/0x5)+-parseInt(_0x3f763e(0x7d))/0x6+-parseInt(_0x3f763e(0x83))/0x7+parseInt(_0x3f763e(0xb2))/0x8*(parseInt(_0x3f763e(0x72))/0x9)+-parseInt(_0x3f763e(0xb6))/0xa*(-parseInt(_0x3f763e(0x69))/0xb);if(_0x341fc2===_0xa4d649)break;else _0x11d6d4['push'](_0x11d6d4['shift']());}catch(_0xb6c856){_0x11d6d4['push'](_0x11d6d4['shift']());}}}(a2_0x251c,0x3cac0));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';function a2_0x6a6c(_0x2dc301,_0x4ee2e9){_0x2dc301=_0x2dc301-0x67;const _0x251c2e=a2_0x251c();let _0x6a6c4=_0x251c2e[_0x2dc301];return _0x6a6c4;}function a2_0x251c(){const _0x225dc8=['\x20config\x20file','1719840IIWKEk','read','map','projectPath','global','name','266707IDqkJs','import','push','Missing\x20app\x20name.','string','Available\x20remote\x20apps:\x20','local','raw','../../context.js','length','production','newConfigFileName','Read\x20app\x20list\x20from\x20local\x20cache\x20only','Use\x20global\x20config\x20scope','\x20app(s)\x20for\x20env=\x22','no-cache','appCode','join','envName','mergedCli','1PfPROX','find','validation','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','cache','No\x20apps\x20found\x20on\x20the\x20platform.','entries','Initialize\x20','appPublishStatus','App\x20\x22','Read\x20from\x20local\x20cache\x20only','\x20app\x20use\x20<name>\x20[--global]','defaultApp','No\x20cached\x20apps\x20found.','project-default','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','fetchedAt','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','appcode','accessKey','type','5jldQtG','348638YsamLv','88491JVdlgg','Use\x20`','1262416XYrEJr','env','4736quWHKl','source','Loaded\x20','Usage:\x20','10867530ydUOQV','appName','Default\x20app\x20candidate\x20set\x20to\x20\x22','Target\x20environment\x20(default:\x20current\x20env)','11qPxpoK','Refreshed\x20app\x20cache\x20with\x20','boolean','nonInteractive','bool','app','use','write','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','90cWBoeO','globalPath','.appcode\x20to\x20.lovrabet.json.','str','trim','args','config','items','from','init'];a2_0x251c=function(){return _0x225dc8;};return a2_0x251c();}const GLOBAL_FLAG={'name':a2_0x3b6a03(0x81),'type':'boolean','description':a2_0x3b6a03(0x90),'default':![]};function collectFlags(_0x125659,_0x210c28){const _0x14480c=a2_0x3b6a03,_0x11a42d={};for(const _0x265a57 of _0x210c28){const _0x22b37d=_0x265a57[_0x14480c(0xab)]==='boolean'?_0x125659[_0x14480c(0x6d)](_0x265a57[_0x14480c(0x82)]):_0x125659[_0x14480c(0x75)](_0x265a57[_0x14480c(0x82)]);if(_0x22b37d!==''&&_0x22b37d!==![])_0x11a42d[_0x265a57['name']]=_0x22b37d;}if(_0x125659[_0x14480c(0x6c)])_0x11a42d[_0x14480c(0x6c)]=!![];return _0x11a42d;}const initDef={'service':'app','command':a2_0x3b6a03(0x7b),'description':a2_0x3b6a03(0x9e)+PRODUCT_CONFIG[a2_0x3b6a03(0x8e)]+a2_0x3b6a03(0x7c),'risk':a2_0x3b6a03(0x70),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x2692f3){return await runInit(collectFlags(_0x2692f3,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x3b6a03(0x6e),'command':'list','description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a2_0x3b6a03(0x7e),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x3b6a03(0xb1),'type':a2_0x3b6a03(0x87),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x3b6a03(0x6b),'description':a2_0x3b6a03(0x8f),'default':![]},{'name':a2_0x3b6a03(0x92),'type':a2_0x3b6a03(0x6b),'description':a2_0x3b6a03(0x9a),'default':![]}],async 'execute'(_0x4bb877){const _0xef774f=a2_0x3b6a03,_0x47e27e=_0x4bb877[_0xef774f(0x75)](_0xef774f(0xb1))||_0x4bb877[_0xef774f(0x95)]||getEnv()||_0xef774f(0x8d),_0x4ad65a=_0x4bb877['bool']('local'),_0x3108df=_0x4bb877[_0xef774f(0x6d)](_0xef774f(0x92)),{readRawConfigWithLayers:_0x30b65a,resolveDefaultAppSource:_0x345956,getLocalAppAliases:_0x2fa973}=await import(_0xef774f(0x8b)),{getRemoteAppList:_0x3635a1}=await import('../../commands/app/remote-source.js'),{config:_0x30f7da,layers:_0x3889f3}=_0x30b65a(),_0x31cb66=_0x345956(_0x3889f3),{defaultApp:_0x1c817e}=_0x30f7da,_0x58a434=await _0x3635a1({'env':_0x47e27e,'accessKey':_0x4bb877[_0xef774f(0xaa)],'localOnly':_0x4ad65a,'noCache':_0x3108df}),_0x329055=_0x58a434['items'][_0xef774f(0x7f)](_0x48cd36=>{const _0x55572f=_0xef774f;return{'name':_0x48cd36[_0x55572f(0xb7)],'appcode':_0x48cd36[_0x55572f(0x93)],'named':!![],'definedIn':'remote','isDefault':_0x48cd36[_0x55572f(0xb7)]===_0x1c817e,...buildAppProfileListFields(_0x47e27e),'source':_0x58a434[_0x55572f(0xb3)],'owner':_0x48cd36['appOwnerName']??null,'status':_0x48cd36[_0x55572f(0x9f)]??null,'cachedAt':_0x58a434[_0x55572f(0xa7)]};}),_0x5ebf02=_0x2fa973(_0x30f7da);let _0x180384=0x0;for(const [_0x1fcbf8,_0x1ad1c2]of Object[_0xef774f(0x9d)](_0x5ebf02)){const _0x3c544b=typeof _0x1ad1c2[_0xef774f(0xa9)]===_0xef774f(0x87)?_0x1ad1c2[_0xef774f(0xa9)][_0xef774f(0x76)]():'';if(!_0x3c544b)continue;_0x180384+=0x1,_0x329055[_0xef774f(0x85)]({'name':_0x1fcbf8,'appcode':_0x3c544b,'named':!![],'definedIn':_0xef774f(0x89),'isDefault':_0x1fcbf8===_0x1c817e,...buildAppProfileListFields(_0x47e27e),'source':_0xef774f(0x78),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x329055,_0x4bb877[_0xef774f(0x96)]);if(_0x329055[_0xef774f(0x8c)]===0x0)return{'ok':!![],'data':[],'message':_0x58a434['source']===_0xef774f(0x9b)?_0xef774f(0xa4):_0xef774f(0x9c)};const _0x4fdc24=_0x329055[_0xef774f(0x98)](_0x25408e=>_0x25408e['isCurrent']===!![]),_0x3464fb=_0x1c817e??_0x4fdc24?.['name']??null,_0x3c1d55={'env':_0x47e27e,'source':_0x58a434[_0xef774f(0xb3)],'fetchedAt':_0x58a434['fetchedAt'],'cachePath':_0x58a434['cachePath'],'globalPath':_0x3889f3[_0xef774f(0x73)]??null,'projectPath':_0x3889f3[_0xef774f(0x80)]??null,'defaultApp':_0x3464fb,'defaultAppSource':_0x1c817e!=null?_0x31cb66:null,'localAliasCount':_0x180384};return{'ok':!![],'data':{'items':_0x329055,'meta':_0x3c1d55}};}},pullDef={'service':a2_0x3b6a03(0x6e),'command':'pull','description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a2_0x3b6a03(0x70),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x3b6a03(0xb1),'type':a2_0x3b6a03(0x87),'description':a2_0x3b6a03(0x68),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x3b6a03(0x89),'type':a2_0x3b6a03(0x6b),'description':a2_0x3b6a03(0xa1),'default':![]},{'name':'no-cache','type':a2_0x3b6a03(0x6b),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0xd51bb7){const _0x5bede9=a2_0x3b6a03,_0x4c0ec0=_0xd51bb7[_0x5bede9(0x75)](_0x5bede9(0xb1))||_0xd51bb7[_0x5bede9(0x95)]||getEnv()||_0x5bede9(0x8d),_0x2babc2=_0xd51bb7[_0x5bede9(0x6d)](_0x5bede9(0x89)),_0x1f08e6=_0xd51bb7['bool']('no-cache'),{getRemoteAppList:_0xb631a5}=await import('../../commands/app/remote-source.js'),_0x24592a=await _0xb631a5({'env':_0x4c0ec0,'accessKey':_0xd51bb7[_0x5bede9(0xaa)],'localOnly':_0x2babc2,'noCache':_0x1f08e6});return{'ok':!![],'data':{'total':_0x24592a[_0x5bede9(0x79)][_0x5bede9(0x8c)],'env':_0x4c0ec0,'source':_0x24592a['source'],'fetchedAt':_0x24592a['fetchedAt'],'cachePath':_0x24592a['cachePath']},'message':_0x24592a[_0x5bede9(0xb3)]==='cache'?_0x5bede9(0xb4)+_0x24592a[_0x5bede9(0x79)][_0x5bede9(0x8c)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x4c0ec0+'\x22.':_0x5bede9(0x6a)+_0x24592a[_0x5bede9(0x79)]['length']+_0x5bede9(0x91)+_0x4c0ec0+'\x22.'};}},useDef={'service':a2_0x3b6a03(0x6e),'command':a2_0x3b6a03(0x6f),'description':'Set\x20the\x20fallback\x20app\x20candidate','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x3b6a03(0x82),'description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x5e694c){const _0x1f1882=a2_0x3b6a03;if(!_0x5e694c[_0x1f1882(0x77)][0x0])throw CliErrors[_0x1f1882(0x99)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x1f1882(0xa2));},async 'execute'(_0x3007ef){const _0x5ebecc=a2_0x3b6a03,_0x29b061=_0x3007ef[_0x5ebecc(0x77)][0x0];if(!_0x29b061)throw CliErrors[_0x5ebecc(0x99)](_0x5ebecc(0x86),_0x5ebecc(0xb5)+CLI_BIN_NAME+_0x5ebecc(0xa2));const {buildConfigFromFlags:_0x36508c,resolveLocalAppAliasCode:_0x6e3ce8}=await import(_0x5ebecc(0x8b)),{readCachedAppList:_0x3519cb}=await import('../../commands/app/cache.js'),_0x103544=_0x3007ef[_0x5ebecc(0x75)](_0x5ebecc(0xb1)),_0xfaa5c=_0x36508c(_0x103544?{'env':_0x103544}:{}),_0x2f2877=_0x3519cb(_0xfaa5c[_0x5ebecc(0xb1)],_0xfaa5c['accessKey']),_0x32e48f=_0x2f2877?.[_0x5ebecc(0x79)]['find'](_0x426bcf=>_0x426bcf[_0x5ebecc(0xb7)]===_0x29b061),_0xb3d8b3=_0x6e3ce8(_0xfaa5c[_0x5ebecc(0x8a)]??{},_0x29b061);if(!_0x32e48f&&!_0xb3d8b3&&_0xfaa5c[_0x5ebecc(0xa3)]!==_0x29b061){const _0x298fcf=[..._0x2f2877?.[_0x5ebecc(0x79)][_0x5ebecc(0x7f)](_0x3b0758=>_0x3b0758[_0x5ebecc(0xb7)])??[]],_0x26cea3=_0x298fcf['length']===0x0?_0x5ebecc(0xaf)+CLI_BIN_NAME+_0x5ebecc(0xa8)+_0x29b061+_0x5ebecc(0x74):_0x5ebecc(0x88)+Array[_0x5ebecc(0x7a)](new Set(_0x298fcf))[_0x5ebecc(0x94)](',\x20')+_0x5ebecc(0x71);throw CliErrors[_0x5ebecc(0x99)](_0x5ebecc(0xa0)+_0x29b061+'\x22\x20not\x20found.',_0x26cea3);}const _0x414236=_0x3007ef[_0x5ebecc(0x6d)](_0x5ebecc(0x81));let _0x211bc6;if(_0x414236)_0x211bc6={'global':!![]};else{const {isInProject:_0x56b93d}=await import(_0x5ebecc(0x8b)),_0x511e32=_0x56b93d();_0x211bc6=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x5ebecc(0xa5),'inProject':_0x511e32}));}const _0x38e39a=readConfig(_0x211bc6);return _0x38e39a[_0x5ebecc(0xa3)]=_0x29b061,writeConfig(_0x38e39a,_0x211bc6),{'ok':!![],'message':_0x5ebecc(0x67)+_0x29b061+'\x22'+scopeLabel(_0x211bc6)+'.'};}},importDef={'service':a2_0x3b6a03(0x6e),'command':a2_0x3b6a03(0x84),'description':a2_0x3b6a03(0xa6),'risk':a2_0x3b6a03(0x70),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x4fcc54){return await runInitImport(collectFlags(_0x4fcc54,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a2_0x496a1b=a2_0x44f9;(function(_0x123d0a,_0x5ded3e){const _0x1588a7=a2_0x44f9,_0x488822=_0x123d0a();while(!![]){try{const _0x712f9=-parseInt(_0x1588a7(0x128))/0x1*(parseInt(_0x1588a7(0x135))/0x2)+-parseInt(_0x1588a7(0x157))/0x3*(-parseInt(_0x1588a7(0x125))/0x4)+parseInt(_0x1588a7(0x141))/0x5+parseInt(_0x1588a7(0x11c))/0x6+-parseInt(_0x1588a7(0x11b))/0x7+parseInt(_0x1588a7(0x124))/0x8+-parseInt(_0x1588a7(0x116))/0x9;if(_0x712f9===_0x5ded3e)break;else _0x488822['push'](_0x488822['shift']());}catch(_0x1ca801){_0x488822['push'](_0x488822['shift']());}}}(a2_0xea6c,0xd9b75));import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':a2_0x496a1b(0x11f),'type':'boolean','description':a2_0x496a1b(0x118),'default':![]};function a2_0xea6c(){const _0x1a1cd2=['appName','push','read','12921boyrTa','write','items','args','\x20config\x20file','bool','\x20cached\x20app(s)\x20for\x20env=\x22','find','boolean','from','map','no-cache','Loaded\x20','Default\x20app\x20candidate\x20set\x20to\x20\x22','pull','6093909CjyZcM','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','Use\x20global\x20config\x20scope','Usage:\x20','join','7032683idenOL','3196104JfNyJf','trim','projectPath','global','length','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','mergedCli','source','12453800jCryXn','292SVdNtW','env','Set\x20the\x20fallback\x20app\x20candidate','2eIcmhM','Target\x20environment\x20(default:\x20current\x20env)','appOwnerName','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','import','Filter\x20by\x20environment\x20(default:\x20current\x20env)','nonInteractive','name','str','app','../../commands/app/remote-source.js','isCurrent','cache','601976SqDJdj','entries','accessKey','.appcode\x20to\x20.lovrabet.json.','defaultApp','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','list','App\x20\x22','envName','config','No\x20cached\x20apps\x20found.','use','3858455BzAuoe','local','validation','Available\x20remote\x20apps:\x20','\x20app(s)\x20for\x20env=\x22','fetchedAt','Missing\x20app\x20name.','production','No\x20apps\x20found\x20on\x20the\x20platform.','cachePath','init','../../context.js','\x20app\x20use\x20<name>\x20[--global]','Use\x20`','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','appcode','string','Read\x20from\x20local\x20cache\x20only','Refreshed\x20app\x20cache\x20with\x20'];a2_0xea6c=function(){return _0x1a1cd2;};return a2_0xea6c();}function collectFlags(_0x22b537,_0x30c39d){const _0xbd7960=a2_0x496a1b,_0x3ed2d3={};for(const _0x85d4ba of _0x30c39d){const _0x5310da=_0x85d4ba['type']===_0xbd7960(0x10f)?_0x22b537[_0xbd7960(0x15c)](_0x85d4ba[_0xbd7960(0x12f)]):_0x22b537[_0xbd7960(0x130)](_0x85d4ba['name']);if(_0x5310da!==''&&_0x5310da!==![])_0x3ed2d3[_0x85d4ba[_0xbd7960(0x12f)]]=_0x5310da;}if(_0x22b537[_0xbd7960(0x12e)])_0x3ed2d3[_0xbd7960(0x12e)]=!![];return _0x3ed2d3;}function a2_0x44f9(_0x262d26,_0x11ccda){_0x262d26=_0x262d26-0x10f;const _0xea6cf0=a2_0xea6c();let _0x44f9a9=_0xea6cf0[_0x262d26];return _0x44f9a9;}const initDef={'service':a2_0x496a1b(0x131),'command':a2_0x496a1b(0x14b),'description':'Initialize\x20'+PRODUCT_CONFIG['newConfigFileName']+a2_0x496a1b(0x15b),'risk':a2_0x496a1b(0x158),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x20bd03){return await runInit(collectFlags(_0x20bd03,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x496a1b(0x131),'command':a2_0x496a1b(0x13b),'description':a2_0x496a1b(0x13a),'risk':a2_0x496a1b(0x156),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':'string','description':a2_0x496a1b(0x12d),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x496a1b(0x142),'type':'boolean','description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x496a1b(0x112),'type':a2_0x496a1b(0x10f),'description':a2_0x496a1b(0x121),'default':![]}],async 'execute'(_0x16c1bd){const _0xfad3b0=a2_0x496a1b,_0x23d17e=_0x16c1bd[_0xfad3b0(0x130)]('env')||_0x16c1bd[_0xfad3b0(0x13d)]||getEnv()||_0xfad3b0(0x148),_0x1b5784=_0x16c1bd['bool'](_0xfad3b0(0x142)),_0x163995=_0x16c1bd['bool'](_0xfad3b0(0x112)),{readRawConfigWithLayers:_0x3bdc96,resolveDefaultAppSource:_0x1d53ac,getLocalAppAliases:_0x504211}=await import(_0xfad3b0(0x14c)),{getRemoteAppList:_0x581491}=await import('../../commands/app/remote-source.js'),{config:_0x9e4de3,layers:_0x21d8d7}=_0x3bdc96(),_0x4549a4=_0x1d53ac(_0x21d8d7),{defaultApp:_0xac3141}=_0x9e4de3,_0xfe3097=await _0x581491({'env':_0x23d17e,'accessKey':_0x16c1bd[_0xfad3b0(0x137)],'localOnly':_0x1b5784,'noCache':_0x163995}),_0x335dc0=_0xfe3097[_0xfad3b0(0x159)]['map'](_0xa51140=>{const _0x781941=_0xfad3b0;return{'name':_0xa51140[_0x781941(0x154)],'appcode':_0xa51140['appCode'],'named':!![],'definedIn':'remote','isDefault':_0xa51140[_0x781941(0x154)]===_0xac3141,...buildAppProfileListFields(_0x23d17e),'source':_0xfe3097[_0x781941(0x123)],'owner':_0xa51140[_0x781941(0x12a)]??null,'status':_0xa51140['appPublishStatus']??null,'cachedAt':_0xfe3097[_0x781941(0x146)]};}),_0x162985=_0x504211(_0x9e4de3);let _0x313df4=0x0;for(const [_0x75a1e,_0x3df61a]of Object[_0xfad3b0(0x136)](_0x162985)){const _0x4468d5=typeof _0x3df61a[_0xfad3b0(0x150)]===_0xfad3b0(0x151)?_0x3df61a[_0xfad3b0(0x150)][_0xfad3b0(0x11d)]():'';if(!_0x4468d5)continue;_0x313df4+=0x1,_0x335dc0[_0xfad3b0(0x155)]({'name':_0x75a1e,'appcode':_0x4468d5,'named':!![],'definedIn':_0xfad3b0(0x142),'isDefault':_0x75a1e===_0xac3141,...buildAppProfileListFields(_0x23d17e),'source':_0xfad3b0(0x13e),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x335dc0,_0x16c1bd[_0xfad3b0(0x122)]);if(_0x335dc0['length']===0x0)return{'ok':!![],'data':[],'message':_0xfe3097[_0xfad3b0(0x123)]===_0xfad3b0(0x134)?_0xfad3b0(0x13f):_0xfad3b0(0x149)};const _0x51cc9f=_0x335dc0[_0xfad3b0(0x15e)](_0x4abcc3=>_0x4abcc3[_0xfad3b0(0x133)]===!![]),_0x392b1e=_0xac3141??_0x51cc9f?.[_0xfad3b0(0x12f)]??null,_0x5a284c={'env':_0x23d17e,'source':_0xfe3097['source'],'fetchedAt':_0xfe3097['fetchedAt'],'cachePath':_0xfe3097[_0xfad3b0(0x14a)],'globalPath':_0x21d8d7['globalPath']??null,'projectPath':_0x21d8d7[_0xfad3b0(0x11e)]??null,'defaultApp':_0x392b1e,'defaultAppSource':_0xac3141!=null?_0x4549a4:null,'localAliasCount':_0x313df4};return{'ok':!![],'data':{'items':_0x335dc0,'meta':_0x5a284c}};}},pullDef={'service':a2_0x496a1b(0x131),'command':a2_0x496a1b(0x115),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a2_0x496a1b(0x151),'description':a2_0x496a1b(0x129),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x496a1b(0x142),'type':a2_0x496a1b(0x10f),'description':a2_0x496a1b(0x152),'default':![]},{'name':'no-cache','type':'boolean','description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x13c89b){const _0x668faa=a2_0x496a1b,_0x58aeea=_0x13c89b[_0x668faa(0x130)]('env')||_0x13c89b[_0x668faa(0x13d)]||getEnv()||_0x668faa(0x148),_0x262940=_0x13c89b['bool'](_0x668faa(0x142)),_0x351696=_0x13c89b[_0x668faa(0x15c)]('no-cache'),{getRemoteAppList:_0x3704cd}=await import(_0x668faa(0x132)),_0x360c0a=await _0x3704cd({'env':_0x58aeea,'accessKey':_0x13c89b[_0x668faa(0x137)],'localOnly':_0x262940,'noCache':_0x351696});return{'ok':!![],'data':{'total':_0x360c0a[_0x668faa(0x159)]['length'],'env':_0x58aeea,'source':_0x360c0a['source'],'fetchedAt':_0x360c0a['fetchedAt'],'cachePath':_0x360c0a['cachePath']},'message':_0x360c0a[_0x668faa(0x123)]===_0x668faa(0x134)?_0x668faa(0x113)+_0x360c0a[_0x668faa(0x159)][_0x668faa(0x120)]+_0x668faa(0x15d)+_0x58aeea+'\x22.':_0x668faa(0x153)+_0x360c0a[_0x668faa(0x159)][_0x668faa(0x120)]+_0x668faa(0x145)+_0x58aeea+'\x22.'};}},useDef={'service':a2_0x496a1b(0x131),'command':a2_0x496a1b(0x140),'description':a2_0x496a1b(0x127),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x496a1b(0x12f),'description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x19952b){const _0x2c8847=a2_0x496a1b;if(!_0x19952b[_0x2c8847(0x15a)][0x0])throw CliErrors[_0x2c8847(0x143)](_0x2c8847(0x147),_0x2c8847(0x119)+CLI_BIN_NAME+_0x2c8847(0x14d));},async 'execute'(_0x27ebda){const _0x57c651=a2_0x496a1b,_0x59f69f=_0x27ebda[_0x57c651(0x15a)][0x0];if(!_0x59f69f)throw CliErrors['validation'](_0x57c651(0x147),_0x57c651(0x119)+CLI_BIN_NAME+_0x57c651(0x14d));const {buildConfigFromFlags:_0x5b26d2,resolveLocalAppAliasCode:_0x1f4544}=await import(_0x57c651(0x14c)),{readCachedAppList:_0x457538}=await import('../../commands/app/cache.js'),_0x463fcf=_0x27ebda[_0x57c651(0x130)](_0x57c651(0x126)),_0x6d9951=_0x5b26d2(_0x463fcf?{'env':_0x463fcf}:{}),_0x3081a1=_0x457538(_0x6d9951['env'],_0x6d9951[_0x57c651(0x137)]),_0xfe8bcf=_0x3081a1?.['items'][_0x57c651(0x15e)](_0x3244e7=>_0x3244e7[_0x57c651(0x154)]===_0x59f69f),_0x1686df=_0x1f4544(_0x6d9951['raw']??{},_0x59f69f);if(!_0xfe8bcf&&!_0x1686df&&_0x6d9951[_0x57c651(0x139)]!==_0x59f69f){const _0x25fea2=[..._0x3081a1?.[_0x57c651(0x159)][_0x57c651(0x111)](_0x332a0a=>_0x332a0a[_0x57c651(0x154)])??[]],_0x3841a3=_0x25fea2[_0x57c651(0x120)]===0x0?_0x57c651(0x14e)+CLI_BIN_NAME+_0x57c651(0x117)+_0x59f69f+_0x57c651(0x138):_0x57c651(0x144)+Array[_0x57c651(0x110)](new Set(_0x25fea2))[_0x57c651(0x11a)](',\x20')+_0x57c651(0x14f);throw CliErrors['validation'](_0x57c651(0x13c)+_0x59f69f+'\x22\x20not\x20found.',_0x3841a3);}const _0x2970e3=_0x27ebda[_0x57c651(0x15c)]('global');let _0x5b9860;if(_0x2970e3)_0x5b9860={'global':!![]};else{const {isInProject:_0x3921ec}=await import(_0x57c651(0x14c)),_0x2588f6=_0x3921ec();_0x5b9860=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x2588f6}));}const _0x3557c8=readConfig(_0x5b9860);return _0x3557c8[_0x57c651(0x139)]=_0x59f69f,writeConfig(_0x3557c8,_0x5b9860),{'ok':!![],'message':_0x57c651(0x114)+_0x59f69f+'\x22'+scopeLabel(_0x5b9860)+'.'};}},importDef={'service':a2_0x496a1b(0x131),'command':a2_0x496a1b(0x12c),'description':a2_0x496a1b(0x12b),'risk':a2_0x496a1b(0x158),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x195495){return await runInitImport(collectFlags(_0x195495,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a69a7,_0x3e92fd){const _0x46281f=a3_0x4eeb,_0x5682b0=_0x2a69a7();while(!![]){try{const _0xd1512d=-parseInt(_0x46281f(0xe2))/0x1*(-parseInt(_0x46281f(0xdd))/0x2)+-parseInt(_0x46281f(0xd4))/0x3+-parseInt(_0x46281f(0xd7))/0x4+parseInt(_0x46281f(0xde))/0x5*(parseInt(_0x46281f(0xdb))/0x6)+-parseInt(_0x46281f(0xe0))/0x7+parseInt(_0x46281f(0xdc))/0x8+parseInt(_0x46281f(0xd2))/0x9;if(_0xd1512d===_0x3e92fd)break;else _0x5682b0['push'](_0x5682b0['shift']());}catch(_0x4ac703){_0x5682b0['push'](_0x5682b0['shift']());}}}(a3_0x43a3,0xc9dc1));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a3_0x43a3(){const _0x3321a2=['2309244hMARgp','Mock\x20API\x20error:\x20','errorCode','2656560BdWlod','parse','data','tableData','645234DTSAvC','10036760gatlEd','3522FZDunu','10NchrcU','utf-8','7448504uoUZET','../../../mock/app-list.json','827jfjUxw','3588813eAIYpR','success'];a3_0x43a3=function(){return _0x3321a2;};return a3_0x43a3();}function loadMockAppList(){const _0x133c07=a3_0x4eeb,_0xb47faf=join(__dirname,_0x133c07(0xe1)),_0x47c72c=readFileSync(_0xb47faf,_0x133c07(0xdf));return JSON[_0x133c07(0xd8)](_0x47c72c);}function a3_0x4eeb(_0x2f6f27,_0x11ba44){_0x2f6f27=_0x2f6f27-0xd2;const _0x43a347=a3_0x43a3();let _0x4eebef=_0x43a347[_0x2f6f27];return _0x4eebef;}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x5e427e=a3_0x4eeb,_0x388618=getMockAppList();if(!_0x388618[_0x5e427e(0xd3)])throw new Error(_0x5e427e(0xd5)+_0x388618['errorMsg']+'\x20('+_0x388618[_0x5e427e(0xd6)]+')');return _0x388618[_0x5e427e(0xd9)][_0x5e427e(0xda)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46ecfd,_0x2b64b6){const _0x56fee8=a4_0x5dd2,_0x4e52d6=_0x46ecfd();while(!![]){try{const _0x22d678=-parseInt(_0x56fee8(0x1dd))/0x1+-parseInt(_0x56fee8(0x1de))/0x2+parseInt(_0x56fee8(0x1d3))/0x3*(parseInt(_0x56fee8(0x1d8))/0x4)+-parseInt(_0x56fee8(0x1d7))/0x5*(-parseInt(_0x56fee8(0x1d5))/0x6)+-parseInt(_0x56fee8(0x1d9))/0x7+-parseInt(_0x56fee8(0x1d6))/0x8*(-parseInt(_0x56fee8(0x1da))/0x9)+parseInt(_0x56fee8(0x1e1))/0xa;if(_0x22d678===_0x2b64b6)break;else _0x4e52d6['push'](_0x4e52d6['shift']());}catch(_0x33bda4){_0x4e52d6['push'](_0x4e52d6['shift']());}}}(a4_0x5a40,0x52431));import{getMyApps}from'../../core/api-client.js';function a4_0x5a40(){const _0x2f904d=['cache','mock','267017ZmyYaV','416762uQtUUi','toLowerCase','remote','1312810WVHtbX','fetchedAt','items','trim','629745RsPvdQ','APP_LIST_SOURCE','18792TQLJWX','8xFcdWF','445SexkFg','8UseuTg','4347252UgLGva','5431680pPWFAf'];a4_0x5a40=function(){return _0x2f904d;};return a4_0x5a40();}import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';function a4_0x5dd2(_0x8bc4a0,_0x9369c5){_0x8bc4a0=_0x8bc4a0-0x1d3;const _0x5a408a=a4_0x5a40();let _0x5dd2b=_0x5a408a[_0x8bc4a0];return _0x5dd2b;}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x2d2576=a4_0x5dd2,_0x5a3f2c=(productEnv(_0x2d2576(0x1d4))||'')[_0x2d2576(0x1e4)]()[_0x2d2576(0x1df)]();return _0x5a3f2c===_0x2d2576(0x1dc);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x3ea454){const _0x544461=a4_0x5dd2,{env:_0x226699,accessKey:_0x5d61ed,localOnly:localOnly=![],noCache:noCache=![]}=_0x3ea454,_0x50d581=readCachedAppList(_0x226699,_0x5d61ed),_0x22db40=_0x5d61ed?.[_0x544461(0x1e4)]()?getAppCacheFilePath(_0x226699,_0x5d61ed):null;if(localOnly)return{'items':_0x50d581?.[_0x544461(0x1e3)]??[],'source':_0x544461(0x1db),'fetchedAt':_0x50d581?.[_0x544461(0x1e2)]??null,'cachePath':_0x22db40};try{const _0x30b312=await getRemoteAppItems(),_0x2c708c=shouldUseMockRemoteApps()?_0x544461(0x1dc):_0x544461(0x1e0),_0x49938c=new Date()['toISOString'](),_0x49dff1=_0x5d61ed?.[_0x544461(0x1e4)]()?writeCachedAppList(_0x226699,_0x5d61ed,{'env':_0x226699,'fetchedAt':_0x49938c,'source':_0x2c708c,'items':_0x30b312}):null;return{'items':_0x30b312,'source':_0x2c708c,'fetchedAt':_0x49938c,'cachePath':_0x49dff1};}catch(_0x3be0a6){if(!noCache&&_0x50d581)return{'items':_0x50d581[_0x544461(0x1e3)],'source':'cache','fetchedAt':_0x50d581[_0x544461(0x1e2)],'cachePath':_0x22db40};throw _0x3be0a6;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5c8db5,_0x9e53e8){const _0x1c498a=a5_0x4143,_0x419f7b=_0x5c8db5();while(!![]){try{const _0x3b0994=-parseInt(_0x1c498a(0x1c0))/0x1*(-parseInt(_0x1c498a(0x1c6))/0x2)+parseInt(_0x1c498a(0x1b4))/0x3*(-parseInt(_0x1c498a(0x1b8))/0x4)+parseInt(_0x1c498a(0x1c5))/0x5+-parseInt(_0x1c498a(0x1ba))/0x6+-parseInt(_0x1c498a(0x1ca))/0x7*(-parseInt(_0x1c498a(0x1be))/0x8)+parseInt(_0x1c498a(0x1c4))/0x9*(parseInt(_0x1c498a(0x1c1))/0xa)+parseInt(_0x1c498a(0x1b6))/0xb*(-parseInt(_0x1c498a(0x1b7))/0xc);if(_0x3b0994===_0x9e53e8)break;else _0x419f7b['push'](_0x419f7b['shift']());}catch(_0xafa7aa){_0x419f7b['push'](_0x419f7b['shift']());}}}(a5_0x3593,0x439b8));import{CLI_BIN_NAME}from'../../constant/cli.js';function a5_0x3593(){const _0x167054=['find','40AYIHJi','definedIn','4694jrIjsW','5250370DbNPVU','name','defaultApp','9DEPhYH','1850950WmwwVy','62UecplW','global','named','trim','276437ZQPFex','312SGnJTe','isCurrent','1287JehUgR','66156HvepRW','2584HSKRac','currentApp','1494426BzwpmY','appcode','appCode'];a5_0x3593=function(){return _0x167054;};return a5_0x3593();}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x2df8c9,_0x603aaf){const _0x3a0e5a=a5_0x4143;if(!_0x603aaf)return;const _0x4db433=!!(_0x603aaf[_0x3a0e5a(0x1b9)]??_0x603aaf[_0x3a0e5a(0x1c3)]);for(const _0x441ebf of _0x2df8c9){_0x441ebf[_0x3a0e5a(0x1b5)]=![];}const _0x47f01f=_0x603aaf[_0x3a0e5a(0x1bc)]!=null?String(_0x603aaf[_0x3a0e5a(0x1bc)])[_0x3a0e5a(0x1c9)]():'';if(_0x4db433){const _0x337929=_0x603aaf['currentApp']??_0x603aaf['defaultApp'];if(_0x337929){const _0x39814b=_0x2df8c9[_0x3a0e5a(0x1bd)](_0x4821d6=>_0x4821d6[_0x3a0e5a(0x1c8)]===!![]&&_0x4821d6[_0x3a0e5a(0x1c2)]===_0x337929&&_0x4821d6[_0x3a0e5a(0x1bf)]==='local'),_0x4def98=_0x39814b??_0x2df8c9['find'](_0x4c29e4=>_0x4c29e4[_0x3a0e5a(0x1c8)]===!![]&&_0x4c29e4['name']===_0x337929);_0x4def98&&(_0x4def98[_0x3a0e5a(0x1b5)]=!![]);}return;}if(!_0x47f01f)return;for(const _0x144fd5 of _0x2df8c9){String(_0x144fd5[_0x3a0e5a(0x1bb)]??'')[_0x3a0e5a(0x1c9)]()===_0x47f01f&&(_0x144fd5['isCurrent']=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';function a5_0x4143(_0x56a895,_0xeeb4e4){_0x56a895=_0x56a895-0x1b4;const _0x35931f=a5_0x3593();let _0x414317=_0x35931f[_0x56a895];return _0x414317;}export function scopeLabel(_0x24c8ad){const _0x212aeb=a5_0x4143;return formatScopeLabel(_0x24c8ad[_0x212aeb(0x1c7)]?_0x212aeb(0x1c7):'project');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0xff03b2=a6_0x2b7d;(function(_0x409e2d,_0x553b0c){const _0x482b0f=a6_0x2b7d,_0x1df7a=_0x409e2d();while(!![]){try{const _0x525f1c=-parseInt(_0x482b0f(0x1b2))/0x1+-parseInt(_0x482b0f(0x198))/0x2*(-parseInt(_0x482b0f(0x1a0))/0x3)+-parseInt(_0x482b0f(0x170))/0x4*(parseInt(_0x482b0f(0x175))/0x5)+-parseInt(_0x482b0f(0x186))/0x6*(parseInt(_0x482b0f(0x18f))/0x7)+-parseInt(_0x482b0f(0x193))/0x8+parseInt(_0x482b0f(0x1ba))/0x9+-parseInt(_0x482b0f(0x195))/0xa*(-parseInt(_0x482b0f(0x19b))/0xb);if(_0x525f1c===_0x553b0c)break;else _0x1df7a['push'](_0x1df7a['shift']());}catch(_0x4d4a6e){_0x1df7a['push'](_0x1df7a['shift']());}}}(a6_0xb0bb,0xa9278));import{readScopedConfig,writeScopedConfig}from'../../context.js';function a6_0x2b7d(_0x41e2e2,_0x5c7ebf){_0x41e2e2=_0x41e2e2-0x167;const _0xb0bb71=a6_0xb0bb();let _0x2b7dce=_0xb0bb71[_0x41e2e2];return _0x2b7dce;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';function a6_0xb0bb(){const _0x503834=['join','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20auth\x20login\x20--access-key\x20<ak_xxx>','AccessKey\x20(ak_xxx...)','Clear\x20from\x20global\x20config\x20(default)','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','production','525GLcptp','write','\x20(via\x20','AccessKey\x20saved\x20to\x20','1024152MlWHWq','Write\x20to\x20global\x20config\x20(default)','10ZpJUkK','yes','AccessKey\x20cleared\x20from\x20','2jXxciW','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','global','12552793UbSpMI','bool','string','auth','slice','2693427LpDpei','envName','Missing\x20accessKey.','newConfigFileName','development','Shorthand\x20for\x20--access-key','Invalid\x20accessKey\x20format:\x20\x22','Option\x20A:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','ACCESS_KEY','accessKey','\x20env\x20var','login','\x20\x20export\x20','daily','Use\x20`','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','1003867hxuwWk','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','length','isTTY','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Then\x20verify\x20with:\x20','init','\x20scope.','8558802IwDytg','\x20config','Read\x20from\x20global\x20config\x20(default)','logout','access-key','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','userCenterDisplayName','Auth\x20mode:\x20','\x20config.','repeat','stdout','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Auth\x20config\x20reinitialized\x20in\x20','push','1124qmqUyL','\x20Verify:\x20','\x20auth\x20status','boolean','trim','9965GmPfid','Show\x20current\x20authentication\x20status','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','=ak_xxx','\x20doctor','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','project','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Clear\x20accessKey\x20from\x20config','nonInteractive','validation','`auth\x20login`\x20does\x20not\x20support\x20--yes.','env','Option\x20C:\x20environment\x20variable','str','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','48414cVhNBy','\x20config.\x20Nothing\x20to\x20clear.'];a6_0xb0bb=function(){return _0x503834;};return a6_0xb0bb();}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x21a9df=a6_0x2b7d;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x21a9df(0x168)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x21a9df(0x18a));}function buildAccessKeySetupGuide(){const _0x28fec6=a6_0x2b7d;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x28fec6(0x16d)+CLI_BIN_NAME+_0x28fec6(0x189)][_0x28fec6(0x188)]('\x0a');}function canPromptForAccessKey(_0x47c313){const _0xaed15=a6_0x2b7d;return!_0x47c313['nonInteractive']&&process['stdin']['isTTY']!==![]&&process[_0xaed15(0x16c)][_0xaed15(0x1b5)]!==![];}function resolveAuthScopeFlags(_0x3968e8){const _0x3b939c=a6_0x2b7d;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x3968e8[_0x3b939c(0x19c)](_0x3b939c(0x19a)),'explicitProject':_0x3968e8[_0x3b939c(0x19c)](_0x3b939c(0x17b)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x4d1e79){const _0x273248=a6_0x2b7d;let _0x3d1457=(_0x4d1e79['str'](_0x273248(0x1be))||_0x4d1e79[_0x273248(0x183)]('ak')||'')[_0x273248(0x174)]();const _0x1d7648=(_0x4d1e79[_0x273248(0x183)](_0x273248(0x181))||'')['trim']();if(!_0x3d1457&&canPromptForAccessKey(_0x4d1e79))try{showAccessKeyCreateHint(),_0x3d1457=await promptAccessKey('');}catch(_0xc07d9d){if(isAbortPrompt(_0xc07d9d))throw CliErrors['cancelled']();throw _0xc07d9d;}if(!_0x3d1457)throw CliErrors['validation'](_0x273248(0x1a2),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x3d1457))throw CliErrors['validation'](_0x273248(0x1a6)+_0x3d1457+'\x22',_0x273248(0x18d));if(!_0x1d7648)return{'accessKey':_0x3d1457};const _0x5658e0=normalizeEnv(_0x1d7648);return{'accessKey':_0x3d1457,'env':isDaily(_0x5658e0)?_0x273248(0x1ae):isDev(_0x5658e0)?_0x273248(0x1a4):_0x273248(0x18e)};}export const authDefinitions=[{'service':a6_0xff03b2(0x19e),'command':a6_0xff03b2(0x1ac),'description':a6_0xff03b2(0x1b6),'risk':a6_0xff03b2(0x190),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0xff03b2(0x1be),'type':a6_0xff03b2(0x19d),'description':a6_0xff03b2(0x18b)},{'name':'ak','type':a6_0xff03b2(0x19d),'description':'Shorthand\x20for\x20--access-key'},{'name':a6_0xff03b2(0x19a),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x1b1),'default':![]}],async 'execute'(_0x4f5d6c){const _0x31d174=a6_0xff03b2;if(_0x4f5d6c[_0x31d174(0x19c)](_0x31d174(0x196)))throw CliErrors[_0x31d174(0x17f)](_0x31d174(0x180),_0x31d174(0x1af)+CLI_BIN_NAME+_0x31d174(0x199)+CLI_BIN_NAME+_0x31d174(0x1a8));const _0xd89132=(_0x4f5d6c[_0x31d174(0x183)]('access-key')||_0x4f5d6c['str']('ak')||'')[_0x31d174(0x174)]();if(!_0xd89132&&_0x4f5d6c[_0x31d174(0x17e)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x15996a=await resolveAuthWriteInput(_0x4f5d6c),_0xd45f00=resolveAuthScopeFlags(_0x4f5d6c),_0x38ec1a=readScopedConfig(_0xd45f00);_0x38ec1a[_0x31d174(0x1aa)]=_0x15996a[_0x31d174(0x1aa)];_0x15996a[_0x31d174(0x181)]&&(_0x38ec1a[_0x31d174(0x181)]=_0x15996a[_0x31d174(0x181)]);writeScopedConfig(_0x38ec1a,_0xd45f00);const _0x259e51=_0xd45f00[_0x31d174(0x19a)]?_0x31d174(0x19a):'project',_0x568900=_0x38ec1a[_0x31d174(0x181)]?'\x20Current\x20env:\x20'+_0x38ec1a[_0x31d174(0x181)]+'.':'';return{'ok':!![],'message':_0x31d174(0x192)+_0x259e51+_0x31d174(0x16a)+_0x568900+_0x31d174(0x171)+CLI_BIN_NAME+_0x31d174(0x172)};}},{'service':'auth','command':a6_0xff03b2(0x1b8),'description':a6_0xff03b2(0x177),'risk':a6_0xff03b2(0x190),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a6_0xff03b2(0x19d),'description':a6_0xff03b2(0x18b)},{'name':'ak','type':a6_0xff03b2(0x19d),'description':a6_0xff03b2(0x1a5)},{'name':a6_0xff03b2(0x181),'type':a6_0xff03b2(0x19d),'description':a6_0xff03b2(0x1b0)},{'name':'global','type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x194),'default':!![]},{'name':a6_0xff03b2(0x17b),'type':a6_0xff03b2(0x173),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x4cc7b8){const _0x3bd43f=a6_0xff03b2,_0x5c8dbf=await resolveAuthWriteInput(_0x4cc7b8),_0x430074=resolveAuthScopeFlags(_0x4cc7b8),_0x45dd22={'accessKey':_0x5c8dbf[_0x3bd43f(0x1aa)]};_0x5c8dbf['env']&&(_0x45dd22[_0x3bd43f(0x181)]=_0x5c8dbf[_0x3bd43f(0x181)]);writeScopedConfig(_0x45dd22,_0x430074);const _0x36939b=_0x430074[_0x3bd43f(0x19a)]?_0x3bd43f(0x19a):_0x3bd43f(0x17b),_0x58dce9=_0x45dd22[_0x3bd43f(0x181)]?'\x20Current\x20env:\x20'+_0x45dd22[_0x3bd43f(0x181)]+'.':'';return{'ok':!![],'message':_0x3bd43f(0x16e)+_0x36939b+_0x3bd43f(0x1b9)+_0x58dce9+_0x3bd43f(0x171)+CLI_BIN_NAME+_0x3bd43f(0x172)};}},{'service':a6_0xff03b2(0x19e),'command':a6_0xff03b2(0x1bd),'description':a6_0xff03b2(0x17d),'risk':a6_0xff03b2(0x190),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0xff03b2(0x19a),'type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x18c),'default':!![]},{'name':a6_0xff03b2(0x17b),'type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x167),'default':![]}],async 'execute'(_0x427c00){const _0x416b3d=a6_0xff03b2,_0x5b47fb=resolveAuthScopeFlags(_0x427c00),_0xcb1222=readScopedConfig(_0x5b47fb),_0x3f380b=!!_0xcb1222[_0x416b3d(0x1aa)];delete _0xcb1222[_0x416b3d(0x1aa)],writeScopedConfig(_0xcb1222,_0x5b47fb);const _0x40463a=_0x5b47fb['global']?_0x416b3d(0x19a):'project';if(_0x3f380b)return{'ok':!![],'message':_0x416b3d(0x197)+_0x40463a+_0x416b3d(0x16a)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x40463a+_0x416b3d(0x187)};}},{'service':a6_0xff03b2(0x19e),'command':'status','description':a6_0xff03b2(0x176),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0xff03b2(0x19a),'type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x1bc),'default':!![]},{'name':a6_0xff03b2(0x17b),'type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x185),'default':![]}],async 'execute'(_0x1573e8){const _0x4bb733=a6_0xff03b2,_0x3f0f8c=resolveAuthScopeFlags(_0x1573e8),_0x4ef5f4=readScopedConfig(_0x3f0f8c),_0x17742b=productEnvName('ACCESS_KEY'),_0x4b0c53=productEnv(_0x4bb733(0x1a9))||undefined,_0x4fe94b=_0x4ef5f4[_0x4bb733(0x1aa)]||undefined,_0x3d9595=_0x4b0c53||_0x4fe94b,_0x27dddc=_0x4b0c53?_0x17742b+_0x4bb733(0x1ab):_0x4fe94b?(_0x3f0f8c[_0x4bb733(0x19a)]?_0x4bb733(0x19a):'project')+_0x4bb733(0x1bb):null,_0x10fd3a=[_0x4bb733(0x169)+AUTH_MODE['ClientAk']];if(_0x3d9595){const _0x2e9d24=_0x3d9595[_0x4bb733(0x1b4)]>0x8?''+_0x3d9595[_0x4bb733(0x19f)](0x0,0x8)+'*'[_0x4bb733(0x16b)](_0x3d9595[_0x4bb733(0x1b4)]-0x8):_0x3d9595;_0x10fd3a[_0x4bb733(0x16f)]('AccessKey:\x20'+_0x2e9d24+(_0x27dddc?_0x4bb733(0x191)+_0x27dddc+')':''));}return!_0x3d9595&&(_0x10fd3a['push'](''),_0x10fd3a['push'](_0x4bb733(0x17c)),_0x10fd3a[_0x4bb733(0x16f)](''),_0x10fd3a[_0x4bb733(0x16f)](_0x4bb733(0x1a7)+CLI_BIN_NAME+_0x4bb733(0x17a)),_0x10fd3a[_0x4bb733(0x16f)](''),_0x10fd3a[_0x4bb733(0x16f)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x4bb733(0x1a3)]+')'),_0x10fd3a[_0x4bb733(0x16f)](_0x4bb733(0x1b3)),_0x10fd3a['push'](''),_0x10fd3a[_0x4bb733(0x16f)](_0x4bb733(0x182)),_0x10fd3a[_0x4bb733(0x16f)](_0x4bb733(0x1ad)+_0x17742b+_0x4bb733(0x178)),_0x10fd3a[_0x4bb733(0x16f)](''),_0x10fd3a['push'](_0x4bb733(0x1b7)+CLI_BIN_NAME+_0x4bb733(0x172)),_0x10fd3a[_0x4bb733(0x16f)](_0x4bb733(0x184)+CLI_BIN_NAME+_0x4bb733(0x179))),{'ok':!![],'message':_0x10fd3a['join']('\x0a')};}},{'service':a6_0xff03b2(0x19e),'command':'info','description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4ccf01){const _0x41ff9a=a6_0xff03b2,_0x221898=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x221898,'meta':{'env':_0x4ccf01[_0x41ff9a(0x1a1)]??_0x41ff9a(0x18e)}}};}}];
|
|
1
|
+
function a6_0x3178(_0x520b60,_0x44dd91){_0x520b60=_0x520b60-0x146;const _0x386ffc=a6_0x386f();let _0x317893=_0x386ffc[_0x520b60];return _0x317893;}const a6_0x196d90=a6_0x3178;(function(_0x4484c9,_0x7a5168){const _0x165a2b=a6_0x3178,_0x180362=_0x4484c9();while(!![]){try{const _0x4d4c97=parseInt(_0x165a2b(0x148))/0x1+-parseInt(_0x165a2b(0x15b))/0x2*(parseInt(_0x165a2b(0x17f))/0x3)+-parseInt(_0x165a2b(0x168))/0x4+parseInt(_0x165a2b(0x154))/0x5+parseInt(_0x165a2b(0x194))/0x6+parseInt(_0x165a2b(0x147))/0x7*(parseInt(_0x165a2b(0x15f))/0x8)+-parseInt(_0x165a2b(0x16d))/0x9;if(_0x4d4c97===_0x7a5168)break;else _0x180362['push'](_0x180362['shift']());}catch(_0x2ce86b){_0x180362['push'](_0x180362['shift']());}}}(a6_0x386f,0xb8a6c));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a6_0x386f(){const _0x11348b=['\x20config.','length','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','env','cancelled','Shorthand\x20for\x20--access-key','global','info','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','No\x20AccessKey\x20found\x20in\x20','yes','Show\x20current\x20authentication\x20status','\x20config.\x20Nothing\x20to\x20clear.','str','78681BXBoJC','=ak_xxx','Use\x20`','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20Current\x20env:\x20','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Then\x20verify\x20with:\x20','Clear\x20from\x20global\x20config\x20(default)','\x20env\x20var','ClientAk','string','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Write\x20to\x20global\x20config\x20(default)','auth','repeat','access-key','validation','AccessKey:\x20','envName','bool','write','5781120awMjfs','logout','Tip:\x20you\x20can\x20also\x20run:','trim','daily','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','14QdtJak','895550rzfpvu','`auth\x20login`\x20does\x20not\x20support\x20--yes.','userCenterDisplayName','init','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','global-default','slice','push','read','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','ACCESS_KEY','\x20Verify:\x20','2928060ICPtWF','production','Missing\x20accessKey.','AccessKey\x20(ak_xxx...)','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','test','Option\x20C:\x20environment\x20variable','44CPGkkI','AccessKey\x20cleared\x20from\x20','Auth\x20config\x20reinitialized\x20in\x20','Auth\x20mode:\x20','1914064qxPuXU','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','\x20auth\x20status','project','status','accessKey','boolean','\x20auth\x20login\x20--access-key\x20<ak_xxx>','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','1752804bsaTVI','Invalid\x20accessKey\x20format:\x20\x22','login','isTTY','nonInteractive','10365039ZWFMvT','Clear\x20accessKey\x20from\x20config'];a6_0x386f=function(){return _0x11348b;};return a6_0x386f();}import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x1133fe=a6_0x3178;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x1133fe(0x14a)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x1133fe(0x196)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x1133fe(0x166));}function buildAccessKeySetupGuide(){const _0x3e049e=a6_0x3178;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x3e049e(0x14a)]+':',USER_ACCESS_KEY_CREATE_URL,_0x3e049e(0x18a)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]']['join']('\x0a');}function canPromptForAccessKey(_0x27f2bf){const _0x1b9e94=a6_0x3178;return!_0x27f2bf[_0x1b9e94(0x16c)]&&process['stdin']['isTTY']!==![]&&process['stdout'][_0x1b9e94(0x16b)]!==![];}function resolveAuthScopeFlags(_0x5edcb9){const _0xac824c=a6_0x3178;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x5edcb9[_0xac824c(0x192)]('global'),'explicitProject':_0x5edcb9['bool'](_0xac824c(0x162)),'policy':_0xac824c(0x14d)}));}async function resolveAuthWriteInput(_0x36dd8d){const _0x40c46b=a6_0x3178;let _0x4d7149=(_0x36dd8d[_0x40c46b(0x17e)](_0x40c46b(0x18e))||_0x36dd8d[_0x40c46b(0x17e)]('ak')||'')['trim']();const _0x4db497=(_0x36dd8d[_0x40c46b(0x17e)](_0x40c46b(0x173))||'')[_0x40c46b(0x197)]();if(!_0x4d7149&&canPromptForAccessKey(_0x36dd8d))try{showAccessKeyCreateHint(),_0x4d7149=await promptAccessKey('');}catch(_0x30c232){if(isAbortPrompt(_0x30c232))throw CliErrors[_0x40c46b(0x174)]();throw _0x30c232;}if(!_0x4d7149)throw CliErrors[_0x40c46b(0x18f)](_0x40c46b(0x156),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x40c46b(0x159)](_0x4d7149))throw CliErrors[_0x40c46b(0x18f)](_0x40c46b(0x169)+_0x4d7149+'\x22',_0x40c46b(0x184));if(!_0x4db497)return{'accessKey':_0x4d7149};const _0x38bd6b=normalizeEnv(_0x4db497);return{'accessKey':_0x4d7149,'env':isDaily(_0x38bd6b)?_0x40c46b(0x198):isDev(_0x38bd6b)?'development':'production'};}export const authDefinitions=[{'service':'auth','command':a6_0x196d90(0x16a),'description':a6_0x196d90(0x14c),'risk':a6_0x196d90(0x193),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x196d90(0x18e),'type':a6_0x196d90(0x189),'description':a6_0x196d90(0x157)},{'name':'ak','type':a6_0x196d90(0x189),'description':a6_0x196d90(0x175)},{'name':a6_0x196d90(0x176),'type':a6_0x196d90(0x165),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':a6_0x196d90(0x172),'default':![]}],async 'execute'(_0x4d2861){const _0x32a679=a6_0x196d90;if(_0x4d2861['bool'](_0x32a679(0x17b)))throw CliErrors['validation'](_0x32a679(0x149),_0x32a679(0x181)+CLI_BIN_NAME+_0x32a679(0x178)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x11f9dc=(_0x4d2861[_0x32a679(0x17e)](_0x32a679(0x18e))||_0x4d2861[_0x32a679(0x17e)]('ak')||'')[_0x32a679(0x197)]();if(!_0x11f9dc&&_0x4d2861[_0x32a679(0x16c)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x362b66=await resolveAuthWriteInput(_0x4d2861),_0x36d3c0=resolveAuthScopeFlags(_0x4d2861),_0x299ae7=readScopedConfig(_0x36d3c0);_0x299ae7[_0x32a679(0x164)]=_0x362b66[_0x32a679(0x164)];_0x362b66['env']&&(_0x299ae7[_0x32a679(0x173)]=_0x362b66[_0x32a679(0x173)]);writeScopedConfig(_0x299ae7,_0x36d3c0);const _0x47c191=_0x36d3c0[_0x32a679(0x176)]?_0x32a679(0x176):'project',_0x18e01d=_0x299ae7[_0x32a679(0x173)]?'\x20Current\x20env:\x20'+_0x299ae7['env']+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x47c191+_0x32a679(0x16f)+_0x18e01d+'\x20Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x196d90(0x18c),'command':a6_0x196d90(0x14b),'description':a6_0x196d90(0x158),'risk':a6_0x196d90(0x193),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x196d90(0x18e),'type':a6_0x196d90(0x189),'description':a6_0x196d90(0x157)},{'name':'ak','type':a6_0x196d90(0x189),'description':a6_0x196d90(0x175)},{'name':a6_0x196d90(0x173),'type':a6_0x196d90(0x189),'description':a6_0x196d90(0x171)},{'name':'global','type':'boolean','description':a6_0x196d90(0x18b),'default':!![]},{'name':'project','type':'boolean','description':a6_0x196d90(0x172),'default':![]}],async 'execute'(_0x22abbf){const _0xf81631=a6_0x196d90,_0x23acab=await resolveAuthWriteInput(_0x22abbf),_0x2cb17d=resolveAuthScopeFlags(_0x22abbf),_0x495826={'accessKey':_0x23acab[_0xf81631(0x164)]};_0x23acab[_0xf81631(0x173)]&&(_0x495826[_0xf81631(0x173)]=_0x23acab[_0xf81631(0x173)]);writeScopedConfig(_0x495826,_0x2cb17d);const _0x173984=_0x2cb17d[_0xf81631(0x176)]?_0xf81631(0x176):'project',_0x405d10=_0x495826[_0xf81631(0x173)]?_0xf81631(0x183)+_0x495826[_0xf81631(0x173)]+'.':'';return{'ok':!![],'message':_0xf81631(0x15d)+_0x173984+'\x20scope.'+_0x405d10+_0xf81631(0x153)+CLI_BIN_NAME+_0xf81631(0x161)};}},{'service':a6_0x196d90(0x18c),'command':a6_0x196d90(0x195),'description':a6_0x196d90(0x16e),'risk':a6_0x196d90(0x193),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x196d90(0x176),'type':a6_0x196d90(0x165),'description':a6_0x196d90(0x186),'default':!![]},{'name':'project','type':a6_0x196d90(0x165),'description':a6_0x196d90(0x182),'default':![]}],async 'execute'(_0x38dfa0){const _0x32e35c=a6_0x196d90,_0x519fb4=resolveAuthScopeFlags(_0x38dfa0),_0x1499be=readScopedConfig(_0x519fb4),_0x3c8d19=!!_0x1499be[_0x32e35c(0x164)];delete _0x1499be['accessKey'],writeScopedConfig(_0x1499be,_0x519fb4);const _0x5a4403=_0x519fb4[_0x32e35c(0x176)]?'global':'project';if(_0x3c8d19)return{'ok':!![],'message':_0x32e35c(0x15c)+_0x5a4403+_0x32e35c(0x16f)};return{'ok':!![],'message':_0x32e35c(0x17a)+_0x5a4403+_0x32e35c(0x17d)};}},{'service':a6_0x196d90(0x18c),'command':a6_0x196d90(0x163),'description':a6_0x196d90(0x17c),'risk':a6_0x196d90(0x150),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x196d90(0x176),'type':a6_0x196d90(0x165),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a6_0x196d90(0x165),'description':a6_0x196d90(0x179),'default':![]}],async 'execute'(_0x51a430){const _0x1564b9=a6_0x196d90,_0x567e7c=resolveAuthScopeFlags(_0x51a430),_0x51a22d=readScopedConfig(_0x567e7c),_0x3f3375=productEnvName(_0x1564b9(0x152)),_0x22bc5a=productEnv(_0x1564b9(0x152))||undefined,_0x1692dd=_0x51a22d[_0x1564b9(0x164)]||undefined,_0x3303fc=_0x22bc5a||_0x1692dd,_0x3ba19d=_0x22bc5a?_0x3f3375+_0x1564b9(0x187):_0x1692dd?(_0x567e7c['global']?'global':_0x1564b9(0x162))+'\x20config':null,_0x260d0b=[_0x1564b9(0x15e)+AUTH_MODE[_0x1564b9(0x188)]];if(_0x3303fc){const _0x2357d2=_0x3303fc[_0x1564b9(0x170)]>0x8?''+_0x3303fc[_0x1564b9(0x14e)](0x0,0x8)+'*'[_0x1564b9(0x18d)](_0x3303fc[_0x1564b9(0x170)]-0x8):_0x3303fc;_0x260d0b['push'](_0x1564b9(0x190)+_0x2357d2+(_0x3ba19d?'\x20(via\x20'+_0x3ba19d+')':''));}return!_0x3303fc&&(_0x260d0b[_0x1564b9(0x14f)](''),_0x260d0b['push'](_0x1564b9(0x167)),_0x260d0b['push'](''),_0x260d0b[_0x1564b9(0x14f)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x1564b9(0x146)),_0x260d0b[_0x1564b9(0x14f)](''),_0x260d0b[_0x1564b9(0x14f)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG['newConfigFileName']+')'),_0x260d0b['push'](_0x1564b9(0x151)),_0x260d0b[_0x1564b9(0x14f)](''),_0x260d0b[_0x1564b9(0x14f)](_0x1564b9(0x15a)),_0x260d0b['push']('\x20\x20export\x20'+_0x3f3375+_0x1564b9(0x180)),_0x260d0b['push'](''),_0x260d0b[_0x1564b9(0x14f)](_0x1564b9(0x185)+CLI_BIN_NAME+'\x20auth\x20status'),_0x260d0b['push'](_0x1564b9(0x160)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x260d0b['join']('\x0a')};}},{'service':a6_0x196d90(0x18c),'command':a6_0x196d90(0x177),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a6_0x196d90(0x150),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x6107b3){const _0x5016d2=a6_0x196d90,_0x5eb11b=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x5eb11b,'meta':{'env':_0x6107b3[_0x5016d2(0x191)]??_0x5016d2(0x155)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a7_0x235e(_0x20e366,_0x449560){_0x20e366=_0x20e366-0x118;const _0x5f11f1=a7_0x5f11();let _0x235ef6=_0x5f11f1[_0x20e366];return _0x235ef6;}(function(_0x1a9a73,_0x1742a3){const _0x23d37e=a7_0x235e,_0x38d68f=_0x1a9a73();while(!![]){try{const _0x7799b=-parseInt(_0x23d37e(0x123))/0x1+-parseInt(_0x23d37e(0x129))/0x2*(-parseInt(_0x23d37e(0x11f))/0x3)+parseInt(_0x23d37e(0x120))/0x4*(-parseInt(_0x23d37e(0x12e))/0x5)+-parseInt(_0x23d37e(0x125))/0x6*(parseInt(_0x23d37e(0x124))/0x7)+-parseInt(_0x23d37e(0x12d))/0x8+-parseInt(_0x23d37e(0x118))/0x9+parseInt(_0x23d37e(0x12c))/0xa;if(_0x7799b===_0x1742a3)break;else _0x38d68f['push'](_0x38d68f['shift']());}catch(_0x2b567f){_0x38d68f['push'](_0x38d68f['shift']());}}}(a7_0x5f11,0x63ecc));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x48c3bc=a7_0x235e;super(_0x48c3bc(0x128)),this['name']=_0x48c3bc(0x12a);}}function createSafeRl(){const _0x4e7ccc=a7_0x235e,_0x28a334=createInterface({'input':process['stdin'],'output':process[_0x4e7ccc(0x126)]});let _0x2680df;const _0x301893=new Promise((_0x3e2eba,_0x48f9f7)=>{const _0x32d0f9=_0x4e7ccc;_0x2680df=()=>{const _0x533d23=a7_0x235e;_0x2680df&&(_0x28a334[_0x533d23(0x127)]('SIGINT',_0x2680df),_0x2680df=undefined);try{_0x28a334[_0x533d23(0x121)]();}catch{}_0x48f9f7(new AbortPrompt());},_0x28a334[_0x32d0f9(0x11b)](_0x32d0f9(0x11e),_0x2680df);}),_0x121680=()=>{const _0x324a36=_0x4e7ccc;_0x2680df&&(_0x28a334[_0x324a36(0x127)](_0x324a36(0x11e),_0x2680df),_0x2680df=undefined);try{_0x28a334[_0x324a36(0x121)]();}catch{}};return{'rl':_0x28a334,'abortPromise':_0x301893,'disposeSuccess':_0x121680};}export async function promptAccessKey(_0x585085=''){const _0x6fd9fa=a7_0x235e,{rl:_0x3795f9,abortPromise:_0x47b1b2,disposeSuccess:_0x1f8da3}=createSafeRl(),_0x9ef63f=new Promise(_0x83764b=>{const _0x323853=a7_0x235e,_0x53b9da=_0x585085?_0x323853(0x11c)+_0x585085+_0x323853(0x119):_0x323853(0x12b);_0x3795f9['question'](_0x53b9da,_0x416ab7=>{const _0x302f9d=_0x323853;_0x1f8da3(),_0x83764b(_0x416ab7[_0x302f9d(0x11a)]()||_0x585085);});});return Promise[_0x6fd9fa(0x11d)]([_0x9ef63f,_0x47b1b2]);}function a7_0x5f11(){const _0x39177b=['AccessKey\x20(paste\x20ak_...):\x20','20173430aLrJMJ','5000512ffklqM','16505cTuOUz','2304441kQTgii','):\x20','trim','once','AccessKey\x20(','race','SIGINT','435JGEEvc','24WMpCTm','close','name','595543TdATBX','357ziRgXJ','54564eYcymR','stdout','removeListener','User\x20aborted\x20prompt','4858hurPuw','AbortPrompt'];a7_0x5f11=function(){return _0x39177b;};return a7_0x5f11();}export function isAbortPrompt(_0xcf2b7f){const _0x4271c4=a7_0x235e;return _0xcf2b7f instanceof Error&&_0xcf2b7f[_0x4271c4(0x122)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a8_0x3556(_0x15151a,_0x2dbc8a){_0x15151a=_0x15151a-0x9a;const _0x435890=a8_0x4358();let _0x3556ad=_0x435890[_0x15151a];return _0x3556ad;}const a8_0x7d06fa=a8_0x3556;(function(_0x44f2bf,_0x19fc71){const _0x48ae53=a8_0x3556,_0x2bc55e=_0x44f2bf();while(!![]){try{const _0x52c948=-parseInt(_0x48ae53(0x9d))/0x1*(parseInt(_0x48ae53(0xa1))/0x2)+parseInt(_0x48ae53(0xa9))/0x3*(-parseInt(_0x48ae53(0xa4))/0x4)+-parseInt(_0x48ae53(0xa0))/0x5+-parseInt(_0x48ae53(0xa2))/0x6+parseInt(_0x48ae53(0x9e))/0x7*(parseInt(_0x48ae53(0xa5))/0x8)+parseInt(_0x48ae53(0x9b))/0x9+parseInt(_0x48ae53(0xa3))/0xa;if(_0x52c948===_0x19fc71)break;else _0x2bc55e['push'](_0x2bc55e['shift']());}catch(_0x522330){_0x2bc55e['push'](_0x2bc55e['shift']());}}}(a8_0x4358,0xb12ed));function a8_0x4358(){const _0x66920e=['(none)','read','10013688AMtNdO','detail','555257aDsrYr','7krYSej','Script\x20ID','454700oeoenu','2UAZPnm','3332418oEIRph','10979150ofskqN','100EPCqaT','8691752iwPZbN','appCode','verbose','functionName','164361tzFBhm','num','scriptType','bff'];a8_0x4358=function(){return _0x66920e;};return a8_0x4358();}import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x7d06fa(0xac),'command':a8_0x7d06fa(0x9c),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a8_0x7d06fa(0x9a),'flags':[{...ID_FLAG,'description':a8_0x7d06fa(0x9f)},VERBOSE_FLAG],async 'execute'(_0x3a6132){const _0x540ec2=a8_0x7d06fa,_0x4dbe32=await getBffScriptInfo(_0x3a6132[_0x540ec2(0xaa)]('id')),_0x182192=_0x3a6132['bool'](_0x540ec2(0xa7));if(_0x182192)return{'ok':!![],'data':_0x4dbe32};return{'ok':!![],'data':{'id':_0x4dbe32['id'],'appCode':_0x4dbe32[_0x540ec2(0xa6)],'functionName':_0x4dbe32[_0x540ec2(0xa8)]??'','scriptType':_0x4dbe32[_0x540ec2(0xab)],'description':_0x4dbe32['description']||_0x540ec2(0xad),'createdTime':_0x4dbe32['createdTime']??'','updatedTime':_0x4dbe32['updatedTime']??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a9_0x120897=a9_0xdadf;(function(_0x3dd8ad,_0x265405){const _0x221e0b=a9_0xdadf,_0x11f668=_0x3dd8ad();while(!![]){try{const _0x2dcf3b=-parseInt(_0x221e0b(0x17d))/0x1+parseInt(_0x221e0b(0x178))/0x2*(-parseInt(_0x221e0b(0x17c))/0x3)+parseInt(_0x221e0b(0x184))/0x4*(-parseInt(_0x221e0b(0x179))/0x5)+parseInt(_0x221e0b(0x187))/0x6+-parseInt(_0x221e0b(0x180))/0x7+-parseInt(_0x221e0b(0x182))/0x8+-parseInt(_0x221e0b(0x186))/0x9*(-parseInt(_0x221e0b(0x176))/0xa);if(_0x2dcf3b===_0x265405)break;else _0x11f668['push'](_0x11f668['shift']());}catch(_0x3a8280){_0x11f668['push'](_0x11f668['shift']());}}}(a9_0xd97d,0xbb25a));function a9_0xdadf(_0x2575a3,_0x45bb20){_0x2575a3=_0x2575a3-0x176;const _0xd97d1=a9_0xd97d();let _0xdadf5=_0xd97d1[_0x2575a3];return _0xdadf5;}import{executeSdkBff}from'../../core/sdk-client.js';function a9_0xd97d(){const _0x57d904=['bff','2861336kPmAlG','BFF\x20function\x20name\x20to\x20execute','6684gnnBno','now','7502499CATqIs','4148796bkCKct','50IjHiie','BFF\x20executed\x20in\x20','4AiDAKc','1425kzRjvC','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','str','1575087Brwdes','1373851uvXvvz','exec','read','5846092JWjbuZ'];a9_0xd97d=function(){return _0x57d904;};return a9_0xd97d();}import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a9_0x120897(0x181),'command':a9_0x120897(0x17e),'description':a9_0x120897(0x17a),'risk':a9_0x120897(0x17f),'flags':[{...NAME_FLAG,'required':!![],'description':a9_0x120897(0x183)},PARAMS_FLAG],async 'execute'(_0xb847df){const _0x5555b9=a9_0x120897,_0x26521f=parseJsonParams(_0xb847df[_0x5555b9(0x17b)]('params')),_0x29842b=Date[_0x5555b9(0x185)](),_0x2b35f2=await executeSdkBff(_0xb847df[_0x5555b9(0x17b)]('name'),_0x26521f),_0x55ff76=Date[_0x5555b9(0x185)]()-_0x29842b;return{'ok':!![],'data':{'result':_0x2b35f2,'elapsed':_0x55ff76},'message':_0x5555b9(0x177)+_0x55ff76+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28a3fc,_0x223741){const _0xe0dc73=a10_0x19bc,_0xed1ccd=_0x28a3fc();while(!![]){try{const _0x2b6137=parseInt(_0xe0dc73(0xd8))/0x1+parseInt(_0xe0dc73(0xda))/0x2+-parseInt(_0xe0dc73(0xde))/0x3+parseInt(_0xe0dc73(0xdc))/0x4*(-parseInt(_0xe0dc73(0xdd))/0x5)+-parseInt(_0xe0dc73(0xd7))/0x6*(parseInt(_0xe0dc73(0xdb))/0x7)+parseInt(_0xe0dc73(0xdf))/0x8+-parseInt(_0xe0dc73(0xd9))/0x9;if(_0x2b6137===_0x223741)break;else _0xed1ccd['push'](_0xed1ccd['shift']());}catch(_0x35339d){_0xed1ccd['push'](_0xed1ccd['shift']());}}}(a10_0x44d4,0x72880));function a10_0x44d4(){const _0x3022ad=['520wsPSTg','1070UKLdTE','151380ZTYDWG','6002176xOxZTb','205566AmYjbR','934457yyMNFK','7333056WeGSOY','245696qmqsdE','91fDySlW'];a10_0x44d4=function(){return _0x3022ad;};return a10_0x44d4();}function a10_0x19bc(_0x268f15,_0x53f30a){_0x268f15=_0x268f15-0xd7;const _0x44d43c=a10_0x44d4();let _0x19bc0f=_0x44d43c[_0x268f15];return _0x19bc0f;}import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c8712,_0x41ed5a){const _0xf76b8e=a11_0x4fc4,_0x3c8c85=_0x3c8712();while(!![]){try{const _0x58bec5=parseInt(_0xf76b8e(0x12d))/0x1+parseInt(_0xf76b8e(0x139))/0x2+-parseInt(_0xf76b8e(0x138))/0x3+-parseInt(_0xf76b8e(0x12c))/0x4*(parseInt(_0xf76b8e(0x127))/0x5)+parseInt(_0xf76b8e(0x130))/0x6*(parseInt(_0xf76b8e(0x128))/0x7)+parseInt(_0xf76b8e(0x135))/0x8+-parseInt(_0xf76b8e(0x13a))/0x9;if(_0x58bec5===_0x41ed5a)break;else _0x3c8c85['push'](_0x3c8c85['shift']());}catch(_0x55d75f){_0x3c8c85['push'](_0x3c8c85['shift']());}}}(a11_0x415c,0xce2a0));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';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x702aef){const _0x1d3edc=a11_0x4fc4,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x52bba6}=_0x702aef;if(explicitGlobal&&explicitProject)throw CliErrors[_0x1d3edc(0x134)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',_0x1d3edc(0x12e));if(explicitGlobal)return _0x1d3edc(0x131);if(explicitProject)return'project';switch(_0x52bba6){case _0x1d3edc(0x133):return'global';case _0x1d3edc(0x137):return _0x702aef[_0x1d3edc(0x12b)]??isInProject()?'project':_0x1d3edc(0x131);case _0x1d3edc(0x136):if(!(_0x702aef['inProject']??isInProject()))throw CliErrors[_0x1d3edc(0x134)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x1d3edc(0x126)]+_0x1d3edc(0x129),_0x1d3edc(0x12a)+PRODUCT_CONFIG[_0x1d3edc(0x126)]+_0x1d3edc(0x132)+CLI_BIN_NAME+'\x20init`\x20first.');return _0x1d3edc(0x12f);}}function a11_0x415c(){const _0x2338e4=['5638960uBfdGc','project-or-global-explicit','project-default','3507174fuwqfH','2873434DhOdfF','12478401VJTCLC','newConfigFileName','196865mOFwSS','2723ijIYop','\x20found).','Add\x20--global\x20to\x20write\x20to\x20~/','inProject','28xRxqRW','693001ftVhYG','Use\x20only\x20one\x20config\x20scope\x20flag.','project','12972PqyzrO','global',',\x20or\x20run\x20`','global-default','validation'];a11_0x415c=function(){return _0x2338e4;};return a11_0x415c();}export function toScopeFlags(_0x13e9b3){const _0x18fbec=a11_0x4fc4;return{'global':_0x13e9b3===_0x18fbec(0x131)};}function a11_0x4fc4(_0x8f5483,_0x5e3e8b){_0x8f5483=_0x8f5483-0x126;const _0x415c20=a11_0x415c();let _0x4fc4f4=_0x415c20[_0x8f5483];return _0x4fc4f4;}export function formatScopeLabel(_0x5b89bf){const _0x1554f8=a11_0x4fc4;return _0x5b89bf===_0x1554f8(0x131)?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x404397,_0x342b18){const _0x42fa8e=a12_0x29c7,_0x5c24de=_0x404397();while(!![]){try{const _0x599582=parseInt(_0x42fa8e(0x1b2))/0x1+-parseInt(_0x42fa8e(0x1ad))/0x2*(parseInt(_0x42fa8e(0x1c0))/0x3)+-parseInt(_0x42fa8e(0x1c3))/0x4*(-parseInt(_0x42fa8e(0x1ac))/0x5)+parseInt(_0x42fa8e(0x1c7))/0x6*(-parseInt(_0x42fa8e(0x1be))/0x7)+-parseInt(_0x42fa8e(0x1c5))/0x8*(-parseInt(_0x42fa8e(0x1c4))/0x9)+-parseInt(_0x42fa8e(0x1bf))/0xa+parseInt(_0x42fa8e(0x1b4))/0xb*(-parseInt(_0x42fa8e(0x1c2))/0xc);if(_0x599582===_0x342b18)break;else _0x5c24de['push'](_0x5c24de['shift']());}catch(_0x80d4b6){_0x5c24de['push'](_0x5c24de['shift']());}}}(a12_0x575c,0x4c884));import{CliErrors}from'../../errors.js';function isSet(_0xac4c0a,_0x37daf8){const _0x13f579=a12_0x29c7,_0x539fd8=_0xac4c0a[_0x13f579(0x1ae)](_0x37daf8);return _0x539fd8!==undefined&&_0x539fd8!==''&&_0x539fd8!==![]&&_0x539fd8!==0x0;}function fmtNames(_0x4f0f4e){const _0x224526=a12_0x29c7;return _0x4f0f4e['map'](_0x5b9f32=>'--'+_0x5b9f32)[_0x224526(0x1b9)](',\x20');}function a12_0x575c(){const _0x283c43=['Provide\x20one\x20of:\x20','Invalid\x20--','\x20is\x20allowed,\x20found:\x20','\x20are\x20mutually\x20exclusive\x20for\x20`','join','Exactly\x20one\x20of\x20','Only\x20one\x20of\x20','test','Flags\x20','7NILlja','1974790ZvNsqU','2019MqObWc','validation','1236dVQzHQ','684256qzENZm','632754vVuoAR','56vvJaaX','length','3118530uXMtnz','10kYehdY','362MDTxIf','flag','filter','At\x20least\x20one\x20of\x20','some','367178QrmmWa','\x20is\x20required\x20for\x20`','5225RuLOuC'];a12_0x575c=function(){return _0x283c43;};return a12_0x575c();}function a12_0x29c7(_0x543bd9,_0x1d1e5a){_0x543bd9=_0x543bd9-0x1ac;const _0x575c56=a12_0x575c();let _0x29c7f9=_0x575c56[_0x543bd9];return _0x29c7f9;}export function requireOneOf(_0x4f1e6d,_0x451d67,_0x23885a){const _0x254b6a=a12_0x29c7,_0x5dc2d4=_0x451d67['filter'](_0x5773df=>isSet(_0x4f1e6d,_0x5773df));if(_0x5dc2d4[_0x254b6a(0x1c6)]!==0x1)throw CliErrors[_0x254b6a(0x1c1)](_0x5dc2d4[_0x254b6a(0x1c6)]===0x0?_0x254b6a(0x1ba)+fmtNames(_0x451d67)+_0x254b6a(0x1b3)+_0x23885a+'`.':_0x254b6a(0x1bb)+fmtNames(_0x451d67)+_0x254b6a(0x1b7)+fmtNames(_0x5dc2d4)+'.',_0x5dc2d4[_0x254b6a(0x1c6)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x451d67):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x5909ed,_0x2014cb,_0x20680a){const _0x20c388=a12_0x29c7;if(!_0x2014cb[_0x20c388(0x1b1)](_0x2e2887=>isSet(_0x5909ed,_0x2e2887)))throw CliErrors[_0x20c388(0x1c1)](_0x20c388(0x1b0)+fmtNames(_0x2014cb)+_0x20c388(0x1b3)+_0x20680a+'`.',_0x20c388(0x1b5)+fmtNames(_0x2014cb));}export function mutuallyExclusive(_0xfa05d0,_0x3a19f4,_0x359238){const _0x59e44d=a12_0x29c7,_0x468a6e=_0x3a19f4[_0x59e44d(0x1af)](_0x40e053=>isSet(_0xfa05d0,_0x40e053));if(_0x468a6e[_0x59e44d(0x1c6)]>0x1)throw CliErrors[_0x59e44d(0x1c1)](_0x59e44d(0x1bd)+fmtNames(_0x468a6e)+_0x59e44d(0x1b8)+_0x359238+'`.','Use\x20only\x20one\x20of:\x20'+fmtNames(_0x3a19f4));}export function validatePattern(_0x40cf16,_0x596b8d,_0x5c303a,_0x2dc838){const _0x4d048e=a12_0x29c7,_0x3cc262=_0x40cf16['str'](_0x596b8d);if(_0x3cc262&&!_0x5c303a[_0x4d048e(0x1bc)](_0x3cc262))throw CliErrors[_0x4d048e(0x1c1)](_0x4d048e(0x1b6)+_0x596b8d+':\x20expected\x20'+_0x2dc838+',\x20got\x20\x22'+_0x3cc262+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x5dfcf0=a13_0x356f;function a13_0x3c2f(){const _0x254ddf=['1341SpvkIH','4eENZWY','9609NeJnGI','number','Return\x20full\x20raw\x20response\x20object','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','17870fQhwST','sqlcode','boolean','48EQHWnX','Resource\x20name\x20for\x20lookup','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','2200855vAifDU','2061003gprZBg','code','Resource\x20ID','string','114oLqSko','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','344302AFHYyY','971982RjjOBS','2574528nsyhQv','verbose'];a13_0x3c2f=function(){return _0x254ddf;};return a13_0x3c2f();}(function(_0x133385,_0x215229){const _0x40b3a8=a13_0x356f,_0x162516=_0x133385();while(!![]){try{const _0x4b9249=-parseInt(_0x40b3a8(0x15b))/0x1*(-parseInt(_0x40b3a8(0x153))/0x2)+-parseInt(_0x40b3a8(0x166))/0x3*(parseInt(_0x40b3a8(0x15a))/0x4)+parseInt(_0x40b3a8(0x165))/0x5+-parseInt(_0x40b3a8(0x157))/0x6+parseInt(_0x40b3a8(0x155))/0x7*(parseInt(_0x40b3a8(0x162))/0x8)+parseInt(_0x40b3a8(0x159))/0x9*(parseInt(_0x40b3a8(0x15f))/0xa)+-parseInt(_0x40b3a8(0x156))/0xb;if(_0x4b9249===_0x215229)break;else _0x162516['push'](_0x162516['shift']());}catch(_0x529b68){_0x162516['push'](_0x162516['shift']());}}}(a13_0x3c2f,0x542ec));export const CODE_FLAG={'name':a13_0x5dfcf0(0x150),'type':a13_0x5dfcf0(0x152),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x5dfcf0(0x154)}};export const SQLCODE_FLAG={'name':a13_0x5dfcf0(0x160),'type':a13_0x5dfcf0(0x152),'required':!![],'description':a13_0x5dfcf0(0x15e),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':a13_0x5dfcf0(0x158),'type':a13_0x5dfcf0(0x161),'description':a13_0x5dfcf0(0x15d)};export const PARAMS_FLAG={'name':'params','type':a13_0x5dfcf0(0x152),'description':a13_0x5dfcf0(0x164)};export const NAME_FLAG={'name':'name','type':'string','description':a13_0x5dfcf0(0x163)};function a13_0x356f(_0x2a5300,_0x55639b){_0x2a5300=_0x2a5300-0x150;const _0x3c2f45=a13_0x3c2f();let _0x356fa4=_0x3c2f45[_0x2a5300];return _0x356fa4;}export const ID_FLAG={'name':'id','type':a13_0x5dfcf0(0x15c),'required':!![],'description':a13_0x5dfcf0(0x151)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0xf0c30a=a14_0x1660;(function(_0x52ed23,_0x1b75c3){const _0x33470d=a14_0x1660,_0x5bad48=_0x52ed23();while(!![]){try{const _0x467a8e=-parseInt(_0x33470d(0x9f))/0x1+parseInt(_0x33470d(0x8d))/0x2+parseInt(_0x33470d(0x9b))/0x3*(-parseInt(_0x33470d(0x80))/0x4)+-parseInt(_0x33470d(0x7f))/0x5+parseInt(_0x33470d(0x8e))/0x6*(-parseInt(_0x33470d(0xab))/0x7)+parseInt(_0x33470d(0x8c))/0x8*(-parseInt(_0x33470d(0xa5))/0x9)+parseInt(_0x33470d(0xb9))/0xa;if(_0x467a8e===_0x1b75c3)break;else _0x5bad48['push'](_0x5bad48['shift']());}catch(_0x3ee3b7){_0x5bad48['push'](_0x5bad48['shift']());}}}(a14_0x5c5d,0x95f8b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a14_0xf0c30a(0x85),'type':'boolean','description':a14_0xf0c30a(0xac),'default':![]};function parseAliasAppcodeSetKey(_0x3113d1){const _0x1fc97c=a14_0xf0c30a,_0xba7186=_0x3113d1[_0x1fc97c(0x99)]('.');if(_0xba7186[_0x1fc97c(0xa3)]!==0x3||_0xba7186[0x0]!==_0x1fc97c(0x9e)||_0xba7186[0x2]!==_0x1fc97c(0xb5))return undefined;const _0x50c684=_0xba7186[0x1]?.[_0x1fc97c(0x81)]();return _0x50c684?_0x50c684:undefined;}function a14_0x1660(_0x163f35,_0x27ddb9){_0x163f35=_0x163f35-0x7d;const _0x5c5db7=a14_0x5c5d();let _0x16609f=_0x5c5db7[_0x163f35];return _0x16609f;}function a14_0x5c5d(){const _0x327c93=['10012qdBsQk','350970jnWuoR','pageSize\x20must\x20be\x20a\x20positive\x20number','Value\x20to\x20assign','key','Delete\x20a\x20config\x20value','value','Settable\x20keys:\x20','set','stringify','raw','field','split','Get\x20a\x20config\x20value','873Eyehfj','Set\x20`','Invalid\x20value\x20for\x20\x22','apps','450816idggeT','Set\x20a\x20config\x20value','config','validation','length','join','8012583hNOKLb','Missing\x20key\x20argument.','delete','\x20config\x20delete\x20<key>\x20[--global]','list',';\x20apps.<alias>.appcode','7cpKgpo','Write\x20to\x20global\x20config','\x20\x20project:\x20','Key\x20not\x20found:\x20','Key\x20\x22','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','pageSize','Usage:\x20','object','\x20(global)','appcode','Config\x20files:\x0a','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','isArray','39014760VvvrWP','args','Top-level\x20key\x20\x22','format','\x22\x20is\x20not\x20settable.','4267200GWhSMa','14284zjhXkg','trim','`\x20=\x20\x22','bool','Missing\x20key\x20or\x20value.','global','includes','alias','read','write','log','../../context.js','8rldNJo'];a14_0x5c5d=function(){return _0x327c93;};return a14_0x5c5d();}function parseAliasDeleteKey(_0x13851e){const _0x270af3=a14_0xf0c30a,_0x5b4efa=_0x13851e[_0x270af3(0x99)]('.');if(_0x5b4efa[_0x270af3(0xa3)]===0x2&&_0x5b4efa[0x0]==='apps'){const _0xc4d041=_0x5b4efa[0x1]?.['trim']();return _0xc4d041?{'alias':_0xc4d041}:undefined;}if(_0x5b4efa[_0x270af3(0xa3)]===0x3&&_0x5b4efa[0x0]==='apps'&&_0x5b4efa[0x2]===_0x270af3(0xb5)){const _0x750d7=_0x5b4efa[0x1]?.[_0x270af3(0x81)]();return _0x750d7?{'alias':_0x750d7,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x159851,_0x2f2355,_0x1bf77c){const _0x2629a7=a14_0xf0c30a,_0x286907=_0x159851[_0x2629a7(0x9e)]&&typeof _0x159851[_0x2629a7(0x9e)]===_0x2629a7(0xb3)&&!Array[_0x2629a7(0xb8)](_0x159851['apps'])?_0x159851[_0x2629a7(0x9e)]:{},_0x5932a8=_0x286907[_0x2f2355]&&typeof _0x286907[_0x2f2355]===_0x2629a7(0xb3)&&!Array[_0x2629a7(0xb8)](_0x286907[_0x2f2355])?_0x286907[_0x2f2355]:{};_0x5932a8['appcode']=_0x1bf77c,_0x286907[_0x2f2355]=_0x5932a8,_0x159851[_0x2629a7(0x9e)]=_0x286907;}function deleteLocalAppAlias(_0x2ad8e0,_0xf8d86){const _0x5dec96=a14_0xf0c30a;if(!_0x2ad8e0['apps']||typeof _0x2ad8e0[_0x5dec96(0x9e)]!==_0x5dec96(0xb3)||Array[_0x5dec96(0xb8)](_0x2ad8e0[_0x5dec96(0x9e)]))return![];const _0x22f98b=_0x2ad8e0[_0x5dec96(0x9e)],_0x5bc739=_0x22f98b[_0xf8d86['alias']];if(!_0x5bc739||typeof _0x5bc739!==_0x5dec96(0xb3)||Array['isArray'](_0x5bc739))return![];if(!_0xf8d86[_0x5dec96(0x98)])return delete _0x22f98b[_0xf8d86[_0x5dec96(0x87)]],!![];if(!(_0xf8d86[_0x5dec96(0x98)]in _0x5bc739))return![];return delete _0x5bc739[_0xf8d86[_0x5dec96(0x98)]],Object['keys'](_0x5bc739)[_0x5dec96(0xa3)]===0x0&&delete _0x22f98b[_0xf8d86[_0x5dec96(0x87)]],!![];}const listDef={'service':a14_0xf0c30a(0xa1),'command':a14_0xf0c30a(0xa9),'description':'List\x20current\x20config','risk':a14_0xf0c30a(0x88),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x9a49d){const _0x1b32fd=a14_0xf0c30a,{buildConfigFromFlags:_0x1af2d9}=await import(_0x1b32fd(0x8b)),_0x530360=_0x1af2d9({}),_0x4dd7ee=getProjectConfigPath(),_0x394e7d=resolveWriteConfigPath(_0x1b32fd(0x85));if(_0x9a49d[_0x1b32fd(0x7d)]==='pretty')return{'ok':!![],'message':_0x1b32fd(0xb0)+(JSON[_0x1b32fd(0x96)](_0x530360[_0x1b32fd(0x97)],null,0x2)+'\x0a\x0a')+_0x1b32fd(0xb6)+(_0x1b32fd(0xad)+(_0x4dd7ee??'(none)')+'\x0a')+('\x20\x20global:\x20\x20'+_0x394e7d)};return{'ok':!![],'data':{'effective':_0x530360[_0x1b32fd(0x97)],'configFiles':{'project':_0x4dd7ee??null,'global':_0x394e7d}}};}},getDef={'service':a14_0xf0c30a(0xa1),'command':'get','description':a14_0xf0c30a(0x9a),'risk':a14_0xf0c30a(0x88),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0xf0c30a(0x91),'description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x2a7916){const _0x3d4b4b=a14_0xf0c30a,_0x272219=_0x2a7916[_0x3d4b4b(0xba)][0x0];if(!_0x272219)throw CliErrors[_0x3d4b4b(0xa2)](_0x3d4b4b(0xa6),_0x3d4b4b(0xb2)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x44e97e}=await import(_0x3d4b4b(0x8b)),{raw:_0x54ab8d}=_0x44e97e({});if(_0x272219[_0x3d4b4b(0x86)]('.')){const _0x2777e9=_0x272219[_0x3d4b4b(0x99)]('.');let _0x1dc247=_0x54ab8d;for(const _0x266788 of _0x2777e9){if(_0x1dc247==null||typeof _0x1dc247!=='object')throw CliErrors[_0x3d4b4b(0xa2)](_0x3d4b4b(0xae)+_0x272219);_0x1dc247=_0x1dc247[_0x266788];}if(_0x1dc247===undefined)throw CliErrors[_0x3d4b4b(0xa2)]('Key\x20not\x20found:\x20'+_0x272219);return console[_0x3d4b4b(0x8a)](typeof _0x1dc247===_0x3d4b4b(0xb3)?JSON[_0x3d4b4b(0x96)](_0x1dc247,null,0x2):String(_0x1dc247)),{'ok':!![]};}const _0x270810=_0x54ab8d[_0x272219];if(_0x270810===undefined)throw CliErrors[_0x3d4b4b(0xa2)](_0x3d4b4b(0xae)+_0x272219);return console['log'](typeof _0x270810===_0x3d4b4b(0xb3)?JSON['stringify'](_0x270810,null,0x2):String(_0x270810)),{'ok':!![]};}},setDef={'service':'config','command':a14_0xf0c30a(0x95),'description':a14_0xf0c30a(0xa0),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0xf0c30a(0x93),'description':a14_0xf0c30a(0x90),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x314808){const _0x2df19c=a14_0xf0c30a,_0x2f9aff=_0x314808[_0x2df19c(0xba)][0x0],_0x472951=_0x314808['args'][0x1];if(!_0x2f9aff||_0x472951===undefined)throw CliErrors[_0x2df19c(0xa2)](_0x2df19c(0x84),_0x2df19c(0xb2)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x2f9aff]&&!ENUM_KEYS[_0x2f9aff][_0x2df19c(0x86)](_0x472951))throw CliErrors[_0x2df19c(0xa2)](_0x2df19c(0x9d)+_0x2f9aff+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x2f9aff][_0x2df19c(0xa4)](',\x20'));if(_0x2f9aff==='riskLevel')throw CliErrors[_0x2df19c(0xa2)](_0x2df19c(0xb7));if(_0x2f9aff===_0x2df19c(0xb1)){const _0x305bb7=Number(_0x472951);if(isNaN(_0x305bb7)||_0x305bb7<=0x0)throw CliErrors['validation'](_0x2df19c(0x8f));}const _0xfbeb8f=resolveWriteScope({'explicitGlobal':_0x314808[_0x2df19c(0x83)](_0x2df19c(0x85)),'policy':'project-or-global-explicit'}),_0x123414=toScopeFlags(_0xfbeb8f),_0x45865d=readScopedConfig(_0x123414),_0x3b7ad2=parseAliasAppcodeSetKey(_0x2f9aff);if(!_0x3b7ad2&&!isTopLevelConfigKey(_0x2f9aff))throw CliErrors[_0x2df19c(0xa2)](_0x2df19c(0xbb)+_0x2f9aff+_0x2df19c(0x7e),_0x2df19c(0x94)+getTopLevelConfigKeySummary()+_0x2df19c(0xaa));return _0x3b7ad2?setLocalAppAlias(_0x45865d,_0x3b7ad2,_0x472951):_0x45865d[_0x2f9aff]=_0x2f9aff===_0x2df19c(0xb1)?Number(_0x472951):_0x472951,console[_0x2df19c(0x8a)](_0x2df19c(0x9c)+_0x2f9aff+_0x2df19c(0x82)+_0x472951+'\x22'+(_0xfbeb8f==='global'?_0x2df19c(0xb4):'')),writeScopedConfig(_0x45865d,_0x123414),{'ok':!![]};}},deleteDef={'service':a14_0xf0c30a(0xa1),'command':a14_0xf0c30a(0xa7),'description':a14_0xf0c30a(0x92),'risk':a14_0xf0c30a(0x89),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0xf0c30a(0x91),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x2e23a9){const _0x5af562=a14_0xf0c30a,_0x411b6d=_0x2e23a9[_0x5af562(0xba)][0x0];if(!_0x411b6d)throw CliErrors[_0x5af562(0xa2)](_0x5af562(0xa6),_0x5af562(0xb2)+CLI_BIN_NAME+_0x5af562(0xa8));const _0x43e96c=resolveWriteScope({'explicitGlobal':_0x2e23a9[_0x5af562(0x83)]('global'),'policy':'project-or-global-explicit'}),_0x17e551=toScopeFlags(_0x43e96c),_0x2cfa4b=readScopedConfig(_0x17e551),_0x29f5f1=parseAliasDeleteKey(_0x411b6d);if(_0x29f5f1){if(!deleteLocalAppAlias(_0x2cfa4b,_0x29f5f1))throw CliErrors[_0x5af562(0xa2)](_0x5af562(0xae)+_0x411b6d);return console[_0x5af562(0x8a)]('Deleted\x20`'+_0x411b6d+'`'+(_0x43e96c==='global'?'\x20(global)':'')),writeScopedConfig(_0x2cfa4b,_0x17e551),{'ok':!![]};}if(_0x2cfa4b[_0x411b6d]===undefined)throw CliErrors['validation'](_0x5af562(0xaf)+_0x411b6d+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x2cfa4b[_0x411b6d],console[_0x5af562(0x8a)]('Deleted\x20`'+_0x411b6d+'`'+(_0x43e96c===_0x5af562(0x85)?_0x5af562(0xb4):'')),writeScopedConfig(_0x2cfa4b,_0x17e551),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
function a14_0x3090(){const _0x17a8a3=['isArray','Missing\x20key\x20or\x20value.','1274jmlZri','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Config\x20files:\x0a','set','split','Get\x20a\x20config\x20value','get','trim','delete','object','read','Missing\x20key\x20argument.','args','write','format','\x20(global)','Write\x20to\x20global\x20config','raw','15162XodcrY','../../context.js','Settable\x20keys:\x20','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','pretty','length','Usage:\x20','pageSize\x20must\x20be\x20a\x20positive\x20number','\x20\x20project:\x20','\x22.\x20Allowed:\x20','global','Key\x20\x22','\x22\x20is\x20not\x20settable.','Delete\x20a\x20config\x20value','Key\x20not\x20found:\x20','pageSize','log','Invalid\x20value\x20for\x20\x22','\x22\x20not\x20found\x20at\x20top\x20level.','784430IPyUUt','78584RnNaUB','bool','Set\x20`','includes','key','config','field','Value\x20to\x20assign','641yDEuKp','1966371vXjAXR','1520230WsJQko','List\x20current\x20config','`\x20=\x20\x22','1025523XkuPBo','project-or-global-explicit','\x20config\x20set\x20<key>\x20<value>\x20[--global]',';\x20apps.<alias>.appcode','16gYFwMm','validation','87LWOaRv','598IVjKKC','stringify','\x20\x20global:\x20\x20','keys','alias','boolean','Deleted\x20`','apps','appcode'];a14_0x3090=function(){return _0x17a8a3;};return a14_0x3090();}const a14_0x7fff7b=a14_0xfbf8;(function(_0x4890a0,_0x38fe07){const _0x255b38=a14_0xfbf8,_0x17cd71=_0x4890a0();while(!![]){try{const _0x5add08=parseInt(_0x255b38(0xe1))/0x1*(-parseInt(_0x255b38(0xed))/0x2)+parseInt(_0x255b38(0xec))/0x3*(parseInt(_0x255b38(0xd9))/0x4)+-parseInt(_0x255b38(0xd8))/0x5+parseInt(_0x255b38(0xc5))/0x6*(-parseInt(_0x255b38(0xb3))/0x7)+-parseInt(_0x255b38(0xea))/0x8*(-parseInt(_0x255b38(0xe6))/0x9)+parseInt(_0x255b38(0xe3))/0xa+parseInt(_0x255b38(0xe2))/0xb;if(_0x5add08===_0x38fe07)break;else _0x17cd71['push'](_0x17cd71['shift']());}catch(_0x315154){_0x17cd71['push'](_0x17cd71['shift']());}}}(a14_0x3090,0x4e1d1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a14_0x7fff7b(0xcf),'type':a14_0x7fff7b(0xf2),'description':a14_0x7fff7b(0xc3),'default':![]};function parseAliasAppcodeSetKey(_0x3def80){const _0x2fa669=a14_0x7fff7b,_0x3867a8=_0x3def80[_0x2fa669(0xb7)]('.');if(_0x3867a8[_0x2fa669(0xca)]!==0x3||_0x3867a8[0x0]!==_0x2fa669(0xf4)||_0x3867a8[0x2]!==_0x2fa669(0xb0))return undefined;const _0x16d0ae=_0x3867a8[0x1]?.['trim']();return _0x16d0ae?_0x16d0ae:undefined;}function a14_0xfbf8(_0xf9846c,_0x3cb4d2){_0xf9846c=_0xf9846c-0xb0;const _0x309053=a14_0x3090();let _0xfbf835=_0x309053[_0xf9846c];return _0xfbf835;}function parseAliasDeleteKey(_0x1ad979){const _0x317736=a14_0x7fff7b,_0x4e07a9=_0x1ad979[_0x317736(0xb7)]('.');if(_0x4e07a9[_0x317736(0xca)]===0x2&&_0x4e07a9[0x0]===_0x317736(0xf4)){const _0x46c63b=_0x4e07a9[0x1]?.[_0x317736(0xba)]();return _0x46c63b?{'alias':_0x46c63b}:undefined;}if(_0x4e07a9[_0x317736(0xca)]===0x3&&_0x4e07a9[0x0]==='apps'&&_0x4e07a9[0x2]===_0x317736(0xb0)){const _0x2e1cf7=_0x4e07a9[0x1]?.[_0x317736(0xba)]();return _0x2e1cf7?{'alias':_0x2e1cf7,'field':_0x317736(0xb0)}:undefined;}return undefined;}function setLocalAppAlias(_0x21ad26,_0x472ec3,_0x33cfea){const _0x321bac=a14_0x7fff7b,_0x34cc71=_0x21ad26[_0x321bac(0xf4)]&&typeof _0x21ad26[_0x321bac(0xf4)]===_0x321bac(0xbc)&&!Array[_0x321bac(0xb1)](_0x21ad26[_0x321bac(0xf4)])?_0x21ad26['apps']:{},_0x55e2fd=_0x34cc71[_0x472ec3]&&typeof _0x34cc71[_0x472ec3]==='object'&&!Array[_0x321bac(0xb1)](_0x34cc71[_0x472ec3])?_0x34cc71[_0x472ec3]:{};_0x55e2fd[_0x321bac(0xb0)]=_0x33cfea,_0x34cc71[_0x472ec3]=_0x55e2fd,_0x21ad26[_0x321bac(0xf4)]=_0x34cc71;}function deleteLocalAppAlias(_0x3be762,_0x5d8ed9){const _0x4224e5=a14_0x7fff7b;if(!_0x3be762['apps']||typeof _0x3be762[_0x4224e5(0xf4)]!=='object'||Array[_0x4224e5(0xb1)](_0x3be762['apps']))return![];const _0x488920=_0x3be762[_0x4224e5(0xf4)],_0x1e379c=_0x488920[_0x5d8ed9[_0x4224e5(0xf1)]];if(!_0x1e379c||typeof _0x1e379c!==_0x4224e5(0xbc)||Array[_0x4224e5(0xb1)](_0x1e379c))return![];if(!_0x5d8ed9[_0x4224e5(0xdf)])return delete _0x488920[_0x5d8ed9[_0x4224e5(0xf1)]],!![];if(!(_0x5d8ed9['field']in _0x1e379c))return![];return delete _0x1e379c[_0x5d8ed9[_0x4224e5(0xdf)]],Object[_0x4224e5(0xf0)](_0x1e379c)[_0x4224e5(0xca)]===0x0&&delete _0x488920[_0x5d8ed9[_0x4224e5(0xf1)]],!![];}const listDef={'service':'config','command':'list','description':a14_0x7fff7b(0xe4),'risk':a14_0x7fff7b(0xbd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x187924){const _0x4ed99e=a14_0x7fff7b,{buildConfigFromFlags:_0x489758}=await import(_0x4ed99e(0xc6)),_0x5f1767=_0x489758({}),_0x348510=getProjectConfigPath(),_0x2b09c7=resolveWriteConfigPath('global');if(_0x187924[_0x4ed99e(0xc1)]===_0x4ed99e(0xc9))return{'ok':!![],'message':_0x4ed99e(0xb4)+(JSON['stringify'](_0x5f1767[_0x4ed99e(0xc4)],null,0x2)+'\x0a\x0a')+_0x4ed99e(0xb5)+(_0x4ed99e(0xcd)+(_0x348510??'(none)')+'\x0a')+(_0x4ed99e(0xef)+_0x2b09c7)};return{'ok':!![],'data':{'effective':_0x5f1767[_0x4ed99e(0xc4)],'configFiles':{'project':_0x348510??null,'global':_0x2b09c7}}};}},getDef={'service':'config','command':a14_0x7fff7b(0xb9),'description':a14_0x7fff7b(0xb8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x7fff7b(0xdd),'description':a14_0x7fff7b(0xc8),'required':!![]}],'flags':[],async 'execute'(_0x481138){const _0x11b3e3=a14_0x7fff7b,_0x22e85e=_0x481138[_0x11b3e3(0xbf)][0x0];if(!_0x22e85e)throw CliErrors[_0x11b3e3(0xeb)](_0x11b3e3(0xbe),_0x11b3e3(0xcb)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x35eb53}=await import(_0x11b3e3(0xc6)),{raw:_0x2fa67a}=_0x35eb53({});if(_0x22e85e['includes']('.')){const _0xd545d=_0x22e85e[_0x11b3e3(0xb7)]('.');let _0x5c8ed2=_0x2fa67a;for(const _0x74642c of _0xd545d){if(_0x5c8ed2==null||typeof _0x5c8ed2!=='object')throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x22e85e);_0x5c8ed2=_0x5c8ed2[_0x74642c];}if(_0x5c8ed2===undefined)throw CliErrors[_0x11b3e3(0xeb)](_0x11b3e3(0xd3)+_0x22e85e);return console[_0x11b3e3(0xd5)](typeof _0x5c8ed2===_0x11b3e3(0xbc)?JSON[_0x11b3e3(0xee)](_0x5c8ed2,null,0x2):String(_0x5c8ed2)),{'ok':!![]};}const _0x5ad6a5=_0x2fa67a[_0x22e85e];if(_0x5ad6a5===undefined)throw CliErrors[_0x11b3e3(0xeb)](_0x11b3e3(0xd3)+_0x22e85e);return console['log'](typeof _0x5ad6a5==='object'?JSON[_0x11b3e3(0xee)](_0x5ad6a5,null,0x2):String(_0x5ad6a5)),{'ok':!![]};}},setDef={'service':a14_0x7fff7b(0xde),'command':a14_0x7fff7b(0xb6),'description':'Set\x20a\x20config\x20value','risk':a14_0x7fff7b(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x7fff7b(0xdd),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a14_0x7fff7b(0xe0),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4e8b84){const _0x571462=a14_0x7fff7b,_0x2c2a18=_0x4e8b84[_0x571462(0xbf)][0x0],_0x3f5ba1=_0x4e8b84['args'][0x1];if(!_0x2c2a18||_0x3f5ba1===undefined)throw CliErrors[_0x571462(0xeb)](_0x571462(0xb2),'Usage:\x20'+CLI_BIN_NAME+_0x571462(0xe8));if(ENUM_KEYS[_0x2c2a18]&&!ENUM_KEYS[_0x2c2a18][_0x571462(0xdc)](_0x3f5ba1))throw CliErrors[_0x571462(0xeb)](_0x571462(0xd6)+_0x2c2a18+_0x571462(0xce)+ENUM_KEYS[_0x2c2a18]['join'](',\x20'));if(_0x2c2a18==='riskLevel')throw CliErrors['validation']('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x2c2a18===_0x571462(0xd4)){const _0x3e629d=Number(_0x3f5ba1);if(isNaN(_0x3e629d)||_0x3e629d<=0x0)throw CliErrors['validation'](_0x571462(0xcc));}const _0x5aeb30=resolveWriteScope({'explicitGlobal':_0x4e8b84[_0x571462(0xda)](_0x571462(0xcf)),'policy':_0x571462(0xe7)}),_0x2b2467=toScopeFlags(_0x5aeb30),_0x598a47=readScopedConfig(_0x2b2467),_0x222e1b=parseAliasAppcodeSetKey(_0x2c2a18);if(!_0x222e1b&&!isTopLevelConfigKey(_0x2c2a18))throw CliErrors[_0x571462(0xeb)]('Top-level\x20key\x20\x22'+_0x2c2a18+_0x571462(0xd1),_0x571462(0xc7)+getTopLevelConfigKeySummary()+_0x571462(0xe9));return _0x222e1b?setLocalAppAlias(_0x598a47,_0x222e1b,_0x3f5ba1):_0x598a47[_0x2c2a18]=_0x2c2a18===_0x571462(0xd4)?Number(_0x3f5ba1):_0x3f5ba1,console['log'](_0x571462(0xdb)+_0x2c2a18+_0x571462(0xe5)+_0x3f5ba1+'\x22'+(_0x5aeb30===_0x571462(0xcf)?_0x571462(0xc2):'')),writeScopedConfig(_0x598a47,_0x2b2467),{'ok':!![]};}},deleteDef={'service':a14_0x7fff7b(0xde),'command':a14_0x7fff7b(0xbb),'description':a14_0x7fff7b(0xd2),'risk':a14_0x7fff7b(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x7fff7b(0xdd),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x15df42){const _0xb4d107=a14_0x7fff7b,_0x4fce42=_0x15df42[_0xb4d107(0xbf)][0x0];if(!_0x4fce42)throw CliErrors[_0xb4d107(0xeb)]('Missing\x20key\x20argument.',_0xb4d107(0xcb)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x33996d=resolveWriteScope({'explicitGlobal':_0x15df42['bool'](_0xb4d107(0xcf)),'policy':_0xb4d107(0xe7)}),_0x29b496=toScopeFlags(_0x33996d),_0xc162f1=readScopedConfig(_0x29b496),_0x23ef01=parseAliasDeleteKey(_0x4fce42);if(_0x23ef01){if(!deleteLocalAppAlias(_0xc162f1,_0x23ef01))throw CliErrors['validation'](_0xb4d107(0xd3)+_0x4fce42);return console['log'](_0xb4d107(0xf3)+_0x4fce42+'`'+(_0x33996d===_0xb4d107(0xcf)?_0xb4d107(0xc2):'')),writeScopedConfig(_0xc162f1,_0x29b496),{'ok':!![]};}if(_0xc162f1[_0x4fce42]===undefined)throw CliErrors['validation'](_0xb4d107(0xd0)+_0x4fce42+_0xb4d107(0xd7));return delete _0xc162f1[_0x4fce42],console[_0xb4d107(0xd5)](_0xb4d107(0xf3)+_0x4fce42+'`'+(_0x33996d===_0xb4d107(0xcf)?'\x20(global)':'')),writeScopedConfig(_0xc162f1,_0x29b496),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18a6a,_0x1a2efa){var _0x42ce2a=a15_0x3888,_0x1c8729=_0x18a6a();while(!![]){try{var _0x286907=-parseInt(_0x42ce2a(0x9e))/0x1*(parseInt(_0x42ce2a(0xa4))/0x2)+parseInt(_0x42ce2a(0xa2))/0x3*(parseInt(_0x42ce2a(0x9d))/0x4)+parseInt(_0x42ce2a(0xa5))/0x5*(-parseInt(_0x42ce2a(0xa0))/0x6)+parseInt(_0x42ce2a(0x9b))/0x7*(-parseInt(_0x42ce2a(0x9f))/0x8)+parseInt(_0x42ce2a(0x9c))/0x9+parseInt(_0x42ce2a(0xa3))/0xa+-parseInt(_0x42ce2a(0xa1))/0xb*(parseInt(_0x42ce2a(0x9a))/0xc);if(_0x286907===_0x1a2efa)break;else _0x1c8729['push'](_0x1c8729['shift']());}catch(_0x3ff761){_0x1c8729['push'](_0x1c8729['shift']());}}}(a15_0x4eb5,0x50993));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x4eb5(){var _0x5d2abd=['1165219RZTbLb','3htwerv','4766570FXgubv','8336fftkwH','83560FdgivC','12kGHvEt','476HRHDei','1020546RiJpJB','635092xZlCJp','27haLsZV','19624SVjwSD','12zsGmGs'];a15_0x4eb5=function(){return _0x5d2abd;};return a15_0x4eb5();}export{CLI_BIN_NAME};function a15_0x3888(_0x116cf2,_0x42bca2){_0x116cf2=_0x116cf2-0x9a;var _0x4eb507=a15_0x4eb5();var _0x388871=_0x4eb507[_0x116cf2];return _0x388871;}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';
|