@lovrabet/lovrabet-cli 2.0.9-beta.1 → 2.0.9-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/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 -1
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a0_0x5a01e2=a0_0x5a7f;(function(_0x2fe09f,_0xe43910){const _0x4a589c=a0_0x5a7f,_0x20b8e7=_0x2fe09f();while(!![]){try{const _0x4eda37=-parseInt(_0x4a589c(0xe1))/0x1+parseInt(_0x4a589c(0xed))/0x2+parseInt(_0x4a589c(0xd7))/0x3+-parseInt(_0x4a589c(0xf9))/0x4*(-parseInt(_0x4a589c(0xdb))/0x5)+parseInt(_0x4a589c(0xe3))/0x6+parseInt(_0x4a589c(0xf0))/0x7+-parseInt(_0x4a589c(0xea))/0x8;if(_0x4eda37===_0xe43910)break;else _0x20b8e7['push'](_0x20b8e7['shift']());}catch(_0x3bff70){_0x20b8e7['push'](_0x20b8e7['shift']());}}}(a0_0x3f60,0x7bfc5));import{jsx as a0_0x277720}from'react/jsx-runtime';import a0_0x3dc4f8 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';function a0_0x3f60(){const _0x410522=['original','stderr','assign','4yBaIlZ','\x20->\x20--','ERR_USE_AFTER_CLOSE','help','flatMap','1830885tUCLbz','error','write','cancelled','1872535wDVSMe','hint','message','Error:\x20','name','exit','60283ijSrLs','corrected','3224772HFjriO','ExitPromptError','log','Hint:\x20','input','exitCode','catch','17309472KYKexR','flags','ERR_STREAM_DESTROYED','976302VciYNO','unknownCommand','handler','5049779zaYVWn','code','defaultCommand','./framework/preparse.js','length','[preparse]\x20'];a0_0x3f60=function(){return _0x410522;};return a0_0x3f60();}import{buildMeowFlags}from'./constant/cli.js';function a0_0x5a7f(_0x507fb9,_0x221f87){_0x507fb9=_0x507fb9-0xd6;const _0x3f6040=a0_0x3f60();let _0x5a7fbd=_0x3f6040[_0x507fb9];return _0x5a7fbd;}const helpText=generateFullHelp(),cli=a0_0x3dc4f8(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()[a0_0x5a01e2(0xe9)](handleError);async function main(){try{await run();}catch(_0x30fd36){handleError(_0x30fd36);}}async function run(){const _0x4a2b48=a0_0x5a01e2;let _0x2f7abd=cli[_0x4a2b48(0xe7)][0x0],_0x26bd98=cli[_0x4a2b48(0xe7)][0x1];const _0x5848ac=cli[_0x4a2b48(0xeb)];try{const {correctFlags:_0x3e58c1}=await import(_0x4a2b48(0xf3)),_0x19e5be=getAllDefinitions()[_0x4a2b48(0xd6)](_0x5950e2=>_0x5950e2['flags']??[]),{flags:_0x3be112,corrections:_0x499d31}=_0x3e58c1(_0x5848ac,_0x19e5be);if(_0x499d31[_0x4a2b48(0xf4)]>0x0){for(const _0x2fe078 of _0x499d31){process['stderr'][_0x4a2b48(0xd9)](_0x4a2b48(0xf5)+_0x2fe078[_0x4a2b48(0xef)]+':\x20--'+_0x2fe078[_0x4a2b48(0xf6)]+_0x4a2b48(0xfa)+_0x2fe078[_0x4a2b48(0xe2)]+'\x0a');}Object[_0x4a2b48(0xf8)](_0x5848ac,_0x3be112);}}catch{}if(!_0x2f7abd||!isKnownService(_0x2f7abd)){const {waitUntilExit:_0x477299}=render(a0_0x277720(Help,{}));await _0x477299();return;}const _0x132d9d=getServiceEntry(_0x2f7abd);if(!_0x26bd98){if(_0x5848ac[_0x4a2b48(0xfc)]){console[_0x4a2b48(0xe5)](generateServiceHelp(_0x2f7abd));return;}if(_0x132d9d[_0x4a2b48(0xf2)])_0x26bd98=_0x132d9d[_0x4a2b48(0xf2)];else{console[_0x4a2b48(0xe5)](generateServiceHelp(_0x2f7abd));return;}}const _0x3daeaf=findDefinition(_0x2f7abd,_0x26bd98);!_0x3daeaf&&(console[_0x4a2b48(0xe5)](generateServiceHelp(_0x2f7abd)),handleError(CliErrors[_0x4a2b48(0xee)](_0x2f7abd+'\x20'+_0x26bd98)));if(_0x5848ac[_0x4a2b48(0xfc)]){console[_0x4a2b48(0xe5)](generateCommandHelp(_0x3daeaf));return;}const _0x36709f=buildConfigFromFlags(_0x5848ac);await initGlobalEnvironment(_0x36709f);const _0x11cd8e=createPipelineEnv(_0x36709f,_0x5848ac);_0x11cd8e['args']=cli['input']['slice'](0x2),await runCommand(_0x3daeaf,_0x11cd8e);}function handleError(_0x3bae22){const _0x4a702f=a0_0x5a01e2;if(_0x3bae22 instanceof CliError){_0x3bae22['code']===_0x4a702f(0xda)&&(process[_0x4a702f(0xf7)][_0x4a702f(0xd9)]('\x0aCancelled.\x0a'),process[_0x4a702f(0xe0)](0x0));console[_0x4a702f(0xd8)](_0x4a702f(0xde)+_0x3bae22[_0x4a702f(0xdd)]);if(_0x3bae22[_0x4a702f(0xdc)])console[_0x4a702f(0xd8)](_0x4a702f(0xe6)+_0x3bae22[_0x4a702f(0xdc)]);process[_0x4a702f(0xe0)](_0x3bae22[_0x4a702f(0xe8)]);}isUserCancellation(_0x3bae22)&&(process[_0x4a702f(0xf7)][_0x4a702f(0xd9)]('\x0aCancelled.\x0a'),process[_0x4a702f(0xe0)](0x0)),console[_0x4a702f(0xd8)]('Unexpected\x20error:',_0x3bae22),process[_0x4a702f(0xe0)](0x1);}function isUserCancellation(_0x1f16e1){const _0x4e96a6=a0_0x5a01e2;if(!(_0x1f16e1 instanceof Error))return![];if(_0x1f16e1[_0x4e96a6(0xdf)]===_0x4e96a6(0xe4))return!![];if(_0x1f16e1[_0x4e96a6(0xf1)]===_0x4e96a6(0xfb))return!![];if(_0x1f16e1[_0x4e96a6(0xf1)]===_0x4e96a6(0xec))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x114952,_0x37aad4){const _0x412a77=a1_0x15fd,_0x192dd8=_0x114952();while(!![]){try{const _0x1cd7ff=parseInt(_0x412a77(0x1a3))/0x1*(parseInt(_0x412a77(0x1b7))/0x2)+-parseInt(_0x412a77(0x1ab))/0x3*(parseInt(_0x412a77(0x1b2))/0x4)+-parseInt(_0x412a77(0x1bd))/0x5+-parseInt(_0x412a77(0x1b0))/0x6+-parseInt(_0x412a77(0x1b9))/0x7*(parseInt(_0x412a77(0x1a8))/0x8)+-parseInt(_0x412a77(0x1ae))/0x9+parseInt(_0x412a77(0x1a2))/0xa;if(_0x1cd7ff===_0x37aad4)break;else _0x192dd8['push'](_0x192dd8['shift']());}catch(_0x3772f6){_0x192dd8['push'](_0x192dd8['shift']());}}}(a1_0x172a,0xb24f0));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a1_0x15fd(_0x570c78,_0x1a419f){_0x570c78=_0x570c78-0x1a1;const _0x172a58=a1_0x172a();let _0x15fdc5=_0x172a58[_0x570c78];return _0x15fdc5;}import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';export function fingerprintAccessKey(_0x4ff789){const _0x520bd1=a1_0x15fd,_0x6ae720=_0x4ff789[_0x520bd1(0x1a1)](),_0x291d41=_0x6ae720[_0x520bd1(0x1bc)](-0x6)||_0x520bd1(0x1b5),_0x2d6d35=createHash(_0x520bd1(0x1b1))['update'](_0x6ae720)[_0x520bd1(0x1a6)]('hex')['slice'](0x0,0xc);return'ak_'+_0x291d41+'_'+_0x2d6d35;}export function getAppCacheFilePath(_0x1560c8,_0x4d2996){const _0x3354cf=a1_0x15fd;return resolve(homedir(),PRODUCT_CONFIG[_0x3354cf(0x1ba)],_0x3354cf(0x1b6),_0x1560c8,fingerprintAccessKey(_0x4d2996),'my-apps.json');}function a1_0x172a(){const _0x5f0594=['sha256','1196nflrnP','EXDEV','items','unknown','cache','86246PBRcYa','appName','1666PuLsgT','homeDirName','find','slice','7064855zpbRks','utf8','trim','46721110Levasj','11qEoEbi','appCode','parse','digest','.tmp','26608xuWTCX','code','EPERM','12321wOeoZZ','stringify','EACCES','4109004iGdyUL','isArray','3162024TgIecR'];a1_0x172a=function(){return _0x5f0594;};return a1_0x172a();}export function readCachedAppList(_0x17f9ad,_0xa2554){const _0x3b48dd=a1_0x15fd;if(!_0xa2554?.[_0x3b48dd(0x1a1)]())return null;const _0x279cf5=getAppCacheFilePath(_0x17f9ad,_0xa2554);if(!existsSync(_0x279cf5))return null;try{const _0xe56f55=readFileSync(_0x279cf5,'utf8');if(!_0xe56f55[_0x3b48dd(0x1a1)]())return null;const _0x267fa2=JSON[_0x3b48dd(0x1a5)](_0xe56f55);if(!Array[_0x3b48dd(0x1af)](_0x267fa2['items']))return null;return _0x267fa2;}catch{return null;}}export function writeCachedAppList(_0x266108,_0x18ab9b,_0x3df60f){const _0x5ae669=a1_0x15fd,_0x14541a=getAppCacheFilePath(_0x266108,_0x18ab9b),_0x564fc3=dirname(_0x14541a);!existsSync(_0x564fc3)&&mkdirSync(_0x564fc3,{'recursive':!![]});const _0x17f4ae=_0x14541a+_0x5ae669(0x1a7);try{writeFileSync(_0x17f4ae,JSON['stringify'](_0x3df60f,null,0x2)+'\x0a',{'encoding':_0x5ae669(0x1be),'mode':0x180});try{renameSync(_0x17f4ae,_0x14541a);}catch(_0x3af79d){if(_0x3af79d[_0x5ae669(0x1a9)]===_0x5ae669(0x1aa)||_0x3af79d[_0x5ae669(0x1a9)]===_0x5ae669(0x1b3)||_0x3af79d['code']===_0x5ae669(0x1ad)){writeFileSync(_0x14541a,JSON[_0x5ae669(0x1ac)](_0x3df60f,null,0x2)+'\x0a',{'encoding':_0x5ae669(0x1be)});try{unlinkSync(_0x17f4ae);}catch{}}else throw _0x3af79d;}}catch(_0x41a496){try{unlinkSync(_0x17f4ae);}catch{}throw _0x41a496;}return _0x14541a;}export function resolveCachedAppCode(_0x4808d0,_0x42c328,_0x353e45){const _0x37f05e=a1_0x15fd;if(!_0x4808d0)return undefined;const _0x215358=readCachedAppList(_0x42c328,_0x353e45),_0x492748=_0x215358?.[_0x37f05e(0x1b4)][_0x37f05e(0x1bb)](_0x4220ba=>_0x4220ba[_0x37f05e(0x1b8)]===_0x4808d0);return _0x492748?.[_0x37f05e(0x1a4)]?.[_0x37f05e(0x1a1)]()||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_0x1fbf87=a2_0x3cc3;(function(_0x3989ef,_0x20a215){const _0x35fe0f=a2_0x3cc3,_0x52a0cf=_0x3989ef();while(!![]){try{const _0xc29b9=parseInt(_0x35fe0f(0x143))/0x1+-parseInt(_0x35fe0f(0x11b))/0x2+parseInt(_0x35fe0f(0x13c))/0x3*(parseInt(_0x35fe0f(0x15f))/0x4)+parseInt(_0x35fe0f(0x160))/0x5*(-parseInt(_0x35fe0f(0x166))/0x6)+parseInt(_0x35fe0f(0x120))/0x7*(-parseInt(_0x35fe0f(0x158))/0x8)+parseInt(_0x35fe0f(0x152))/0x9+parseInt(_0x35fe0f(0x12c))/0xa;if(_0xc29b9===_0x20a215)break;else _0x52a0cf['push'](_0x52a0cf['shift']());}catch(_0x2db103){_0x52a0cf['push'](_0x52a0cf['shift']());}}}(a2_0x4246,0x7851e));import{CliErrors}from'../../errors.js';function a2_0x4246(){const _0x35053f=['appName','Initialize\x20','pull','appPublishStatus','No\x20apps\x20found\x20on\x20the\x20platform.','Set\x20the\x20fallback\x20app\x20candidate','items','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','appCode','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','2482803FIIxDf','envName','\x22\x20not\x20found.','Use\x20global\x20config\x20scope','name','bool','1160rPnkcZ','init','projectPath','newConfigFileName','App\x20\x22','validation','write','53260JVIkgY','298525apbRmH','Usage:\x20','../../context.js','str','Target\x20environment\x20(default:\x20current\x20env)','\x20app(s)\x20for\x20env=\x22','30RznLEE','source','Missing\x20app\x20name.','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','local','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Remote\x20app\x20name\x20to\x20activate','map','\x20cached\x20app(s)\x20for\x20env=\x22','.appcode\x20to\x20.lovrabet.json.','env','\x20app\x20use\x20<name>\x20[--global]','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','push','from','366636LGlomD','../../commands/app/remote-source.js','args','app','project-default','33992dYUMnD','raw','boolean','fetchedAt','no-cache','join','../../commands/app/cache.js','length','defaultApp','isCurrent','type','appcode','7572350WyZLmR','\x20config\x20file','Use\x20`','Default\x20app\x20candidate\x20set\x20to\x20\x22','Available\x20remote\x20apps:\x20','string','list','trim','nonInteractive','find','cache','globalPath','production','global','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','config','111NxQJQo','import','appOwnerName','entries','accessKey','No\x20cached\x20apps\x20found.','Read\x20app\x20list\x20from\x20local\x20cache\x20only','153036GHZWVA','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','remote','mergedCli','Refreshed\x20app\x20cache\x20with\x20'];a2_0x4246=function(){return _0x35053f;};return a2_0x4246();}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';function a2_0x3cc3(_0x42f081,_0x4be601){_0x42f081=_0x42f081-0x10d;const _0x4246f5=a2_0x4246();let _0x3cc342=_0x4246f5[_0x42f081];return _0x3cc342;}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_0x1fbf87(0x139),'type':a2_0x1fbf87(0x122),'description':a2_0x1fbf87(0x155),'default':![]};function collectFlags(_0x2b547f,_0x4d0da5){const _0x57e909=a2_0x1fbf87,_0x11231c={};for(const _0x3040f9 of _0x4d0da5){const _0x21e138=_0x3040f9[_0x57e909(0x12a)]===_0x57e909(0x122)?_0x2b547f[_0x57e909(0x157)](_0x3040f9[_0x57e909(0x156)]):_0x2b547f[_0x57e909(0x163)](_0x3040f9[_0x57e909(0x156)]);if(_0x21e138!==''&&_0x21e138!==![])_0x11231c[_0x3040f9['name']]=_0x21e138;}if(_0x2b547f[_0x57e909(0x134)])_0x11231c['nonInteractive']=!![];return _0x11231c;}const initDef={'service':'app','command':a2_0x1fbf87(0x159),'description':a2_0x1fbf87(0x149)+PRODUCT_CONFIG[a2_0x1fbf87(0x15b)]+a2_0x1fbf87(0x12d),'risk':a2_0x1fbf87(0x15e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x2d05b9){return await runInit(collectFlags(_0x2d05b9,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x1fbf87(0x11e),'command':a2_0x1fbf87(0x132),'description':a2_0x1fbf87(0x10f),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x1fbf87(0x116),'type':'string','description':a2_0x1fbf87(0x111),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x1fbf87(0x110),'type':a2_0x1fbf87(0x122),'description':a2_0x1fbf87(0x142),'default':![]},{'name':a2_0x1fbf87(0x124),'type':a2_0x1fbf87(0x122),'description':a2_0x1fbf87(0x144),'default':![]}],async 'execute'(_0x142c58){const _0x1dbb6e=a2_0x1fbf87,_0x2ba2bd=_0x142c58[_0x1dbb6e(0x163)](_0x1dbb6e(0x116))||_0x142c58[_0x1dbb6e(0x153)]||getEnv()||_0x1dbb6e(0x138),_0x2be729=_0x142c58[_0x1dbb6e(0x157)](_0x1dbb6e(0x110)),_0x57e01e=_0x142c58[_0x1dbb6e(0x157)](_0x1dbb6e(0x124)),{readRawConfigWithLayers:_0x13e2c0,resolveDefaultAppSource:_0x1e26f2,getLocalAppAliases:_0x2ce305}=await import(_0x1dbb6e(0x162)),{getRemoteAppList:_0xe31e84}=await import(_0x1dbb6e(0x11c)),{config:_0xb43d51,layers:_0x5a2e41}=_0x13e2c0(),_0x26871a=_0x1e26f2(_0x5a2e41),{defaultApp:_0x4ac8fa}=_0xb43d51,_0x38c0a7=await _0xe31e84({'env':_0x2ba2bd,'accessKey':_0x142c58['accessKey'],'localOnly':_0x2be729,'noCache':_0x57e01e}),_0x52dd65=_0x38c0a7[_0x1dbb6e(0x14e)][_0x1dbb6e(0x113)](_0x1f5fa2=>{const _0x3b7f55=_0x1dbb6e;return{'name':_0x1f5fa2[_0x3b7f55(0x148)],'appcode':_0x1f5fa2[_0x3b7f55(0x150)],'named':!![],'definedIn':_0x3b7f55(0x145),'isDefault':_0x1f5fa2[_0x3b7f55(0x148)]===_0x4ac8fa,...buildAppProfileListFields(_0x2ba2bd),'source':_0x38c0a7[_0x3b7f55(0x10d)],'owner':_0x1f5fa2[_0x3b7f55(0x13e)]??null,'status':_0x1f5fa2[_0x3b7f55(0x14b)]??null,'cachedAt':_0x38c0a7['fetchedAt']};}),_0x1aaeb6=_0x2ce305(_0xb43d51);let _0xa50320=0x0;for(const [_0x91d7d2,_0x19a40b]of Object[_0x1dbb6e(0x13f)](_0x1aaeb6)){const _0x28e2a=typeof _0x19a40b[_0x1dbb6e(0x12b)]===_0x1dbb6e(0x131)?_0x19a40b[_0x1dbb6e(0x12b)][_0x1dbb6e(0x133)]():'';if(!_0x28e2a)continue;_0xa50320+=0x1,_0x52dd65[_0x1dbb6e(0x119)]({'name':_0x91d7d2,'appcode':_0x28e2a,'named':!![],'definedIn':_0x1dbb6e(0x110),'isDefault':_0x91d7d2===_0x4ac8fa,...buildAppProfileListFields(_0x2ba2bd),'source':_0x1dbb6e(0x13b),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x52dd65,_0x142c58[_0x1dbb6e(0x146)]);if(_0x52dd65['length']===0x0)return{'ok':!![],'data':[],'message':_0x38c0a7['source']===_0x1dbb6e(0x136)?_0x1dbb6e(0x141):_0x1dbb6e(0x14c)};const _0x55828f=_0x52dd65[_0x1dbb6e(0x135)](_0x10d839=>_0x10d839[_0x1dbb6e(0x129)]===!![]),_0x5f3fa2=_0x4ac8fa??_0x55828f?.[_0x1dbb6e(0x156)]??null,_0x8f80a2={'env':_0x2ba2bd,'source':_0x38c0a7['source'],'fetchedAt':_0x38c0a7[_0x1dbb6e(0x123)],'cachePath':_0x38c0a7['cachePath'],'globalPath':_0x5a2e41[_0x1dbb6e(0x137)]??null,'projectPath':_0x5a2e41[_0x1dbb6e(0x15a)]??null,'defaultApp':_0x5f3fa2,'defaultAppSource':_0x4ac8fa!=null?_0x26871a:null,'localAliasCount':_0xa50320};return{'ok':!![],'data':{'items':_0x52dd65,'meta':_0x8f80a2}};}},pullDef={'service':a2_0x1fbf87(0x11e),'command':a2_0x1fbf87(0x14a),'description':a2_0x1fbf87(0x151),'risk':a2_0x1fbf87(0x15e),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x1fbf87(0x116),'type':'string','description':a2_0x1fbf87(0x164),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x1fbf87(0x110),'type':a2_0x1fbf87(0x122),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x1fbf87(0x124),'type':a2_0x1fbf87(0x122),'description':a2_0x1fbf87(0x144),'default':![]}],async 'execute'(_0x581348){const _0x838236=a2_0x1fbf87,_0x559260=_0x581348[_0x838236(0x163)](_0x838236(0x116))||_0x581348[_0x838236(0x153)]||getEnv()||_0x838236(0x138),_0x420cd1=_0x581348['bool']('local'),_0x34447c=_0x581348[_0x838236(0x157)](_0x838236(0x124)),{getRemoteAppList:_0x5df4f6}=await import('../../commands/app/remote-source.js'),_0x419a47=await _0x5df4f6({'env':_0x559260,'accessKey':_0x581348[_0x838236(0x140)],'localOnly':_0x420cd1,'noCache':_0x34447c});return{'ok':!![],'data':{'total':_0x419a47[_0x838236(0x14e)][_0x838236(0x127)],'env':_0x559260,'source':_0x419a47[_0x838236(0x10d)],'fetchedAt':_0x419a47[_0x838236(0x123)],'cachePath':_0x419a47['cachePath']},'message':_0x419a47[_0x838236(0x10d)]===_0x838236(0x136)?'Loaded\x20'+_0x419a47[_0x838236(0x14e)]['length']+_0x838236(0x114)+_0x559260+'\x22.':_0x838236(0x147)+_0x419a47[_0x838236(0x14e)][_0x838236(0x127)]+_0x838236(0x165)+_0x559260+'\x22.'};}},useDef={'service':a2_0x1fbf87(0x11e),'command':'use','description':a2_0x1fbf87(0x14d),'risk':a2_0x1fbf87(0x15e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x1fbf87(0x156),'description':a2_0x1fbf87(0x112),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x37257d){const _0x557e9f=a2_0x1fbf87;if(!_0x37257d[_0x557e9f(0x11d)][0x0])throw CliErrors['validation'](_0x557e9f(0x10e),_0x557e9f(0x161)+CLI_BIN_NAME+_0x557e9f(0x117));},async 'execute'(_0x17e1e1){const _0x4034eb=a2_0x1fbf87,_0x42771c=_0x17e1e1[_0x4034eb(0x11d)][0x0];if(!_0x42771c)throw CliErrors[_0x4034eb(0x15d)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x4034eb(0x117));const {buildConfigFromFlags:_0x1e038e,resolveLocalAppAliasCode:_0x150373}=await import(_0x4034eb(0x162)),{readCachedAppList:_0x127cb7}=await import(_0x4034eb(0x126)),_0x124c99=_0x17e1e1[_0x4034eb(0x163)](_0x4034eb(0x116)),_0x51e715=_0x1e038e(_0x124c99?{'env':_0x124c99}:{}),_0x169c07=_0x127cb7(_0x51e715[_0x4034eb(0x116)],_0x51e715['accessKey']),_0x21bce8=_0x169c07?.[_0x4034eb(0x14e)][_0x4034eb(0x135)](_0x545c8c=>_0x545c8c[_0x4034eb(0x148)]===_0x42771c),_0x856eb=_0x150373(_0x51e715[_0x4034eb(0x121)]??{},_0x42771c);if(!_0x21bce8&&!_0x856eb&&_0x51e715['defaultApp']!==_0x42771c){const _0x5e4a2d=[..._0x169c07?.[_0x4034eb(0x14e)][_0x4034eb(0x113)](_0x25c5e1=>_0x25c5e1[_0x4034eb(0x148)])??[]],_0x40bb5b=_0x5e4a2d[_0x4034eb(0x127)]===0x0?_0x4034eb(0x12e)+CLI_BIN_NAME+_0x4034eb(0x13a)+_0x42771c+_0x4034eb(0x115):_0x4034eb(0x130)+Array[_0x4034eb(0x11a)](new Set(_0x5e4a2d))[_0x4034eb(0x125)](',\x20')+_0x4034eb(0x14f);throw CliErrors['validation'](_0x4034eb(0x15c)+_0x42771c+_0x4034eb(0x154),_0x40bb5b);}const _0x3d07c8=_0x17e1e1['bool'](_0x4034eb(0x139));let _0x396386;if(_0x3d07c8)_0x396386={'global':!![]};else{const {isInProject:_0x473b2d}=await import(_0x4034eb(0x162)),_0x5529e3=_0x473b2d();_0x396386=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x4034eb(0x11f),'inProject':_0x5529e3}));}const _0x325cde=readConfig(_0x396386);return _0x325cde[_0x4034eb(0x128)]=_0x42771c,writeConfig(_0x325cde,_0x396386),{'ok':!![],'message':_0x4034eb(0x12f)+_0x42771c+'\x22'+scopeLabel(_0x396386)+'.'};}},importDef={'service':a2_0x1fbf87(0x11e),'command':a2_0x1fbf87(0x13d),'description':a2_0x1fbf87(0x118),'risk':a2_0x1fbf87(0x15e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x22a198){return await runInitImport(collectFlags(_0x22a198,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5eea30,_0x5b0a3a){const _0x1b57cf=a3_0x584b,_0xe710dd=_0x5eea30();while(!![]){try{const _0x5f2949=-parseInt(_0x1b57cf(0x1ab))/0x1+parseInt(_0x1b57cf(0x1aa))/0x2*(parseInt(_0x1b57cf(0x1a9))/0x3)+-parseInt(_0x1b57cf(0x1a8))/0x4+-parseInt(_0x1b57cf(0x1a0))/0x5+-parseInt(_0x1b57cf(0x1a2))/0x6+-parseInt(_0x1b57cf(0x1a7))/0x7*(parseInt(_0x1b57cf(0x1a5))/0x8)+-parseInt(_0x1b57cf(0x1a4))/0x9*(-parseInt(_0x1b57cf(0x1ae))/0xa);if(_0x5f2949===_0x5b0a3a)break;else _0xe710dd['push'](_0xe710dd['shift']());}catch(_0x759bfa){_0xe710dd['push'](_0xe710dd['shift']());}}}(a3_0x2c8d,0x26103));import{fileURLToPath}from'url';import{dirname,join}from'path';function a3_0x584b(_0x51b04d,_0x70cbcf){_0x51b04d=_0x51b04d-0x1a0;const _0x2c8d2c=a3_0x2c8d();let _0x584b19=_0x2c8d2c[_0x51b04d];return _0x584b19;}function a3_0x2c8d(){const _0x36f601=['94DNtOSQ','71394LNNKZF','../../../mock/app-list.json','errorCode','1341730LjVYzH','1453175avwHyp','utf-8','1374036jnMYjg','Mock\x20API\x20error:\x20','54JSFGkm','104QDxoeI','data','12411jUyPUu','140376dZKBxS','3CffyMr'];a3_0x2c8d=function(){return _0x36f601;};return a3_0x2c8d();}import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x3dc8e3=a3_0x584b,_0x4aba0b=join(__dirname,_0x3dc8e3(0x1ac)),_0x1cea75=readFileSync(_0x4aba0b,_0x3dc8e3(0x1a1));return JSON['parse'](_0x1cea75);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x411c98=a3_0x584b,_0x1800ae=getMockAppList();if(!_0x1800ae['success'])throw new Error(_0x411c98(0x1a3)+_0x1800ae['errorMsg']+'\x20('+_0x1800ae[_0x411c98(0x1ad)]+')');return _0x1800ae[_0x411c98(0x1a6)]['tableData'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f085d,_0x59bb12){const _0x1ff081=a4_0xb1b8,_0x5cca61=_0x4f085d();while(!![]){try{const _0x17febe=parseInt(_0x1ff081(0xe9))/0x1*(-parseInt(_0x1ff081(0xec))/0x2)+-parseInt(_0x1ff081(0xef))/0x3+parseInt(_0x1ff081(0xf7))/0x4+-parseInt(_0x1ff081(0xf0))/0x5*(-parseInt(_0x1ff081(0xeb))/0x6)+parseInt(_0x1ff081(0xe7))/0x7+-parseInt(_0x1ff081(0xe8))/0x8+-parseInt(_0x1ff081(0xf1))/0x9*(-parseInt(_0x1ff081(0xf6))/0xa);if(_0x17febe===_0x59bb12)break;else _0x5cca61['push'](_0x5cca61['shift']());}catch(_0x29df0c){_0x5cca61['push'](_0x5cca61['shift']());}}}(a4_0x47ce,0x8c3c3));function a4_0xb1b8(_0x40bf9d,_0x58e097){_0x40bf9d=_0x40bf9d-0xe7;const _0x47ce59=a4_0x47ce();let _0xb1b8cf=_0x47ce59[_0x40bf9d];return _0xb1b8cf;}import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x59c584=a4_0xb1b8,_0x74de24=(productEnv('APP_LIST_SOURCE')||'')[_0x59c584(0xf2)]()[_0x59c584(0xed)]();return _0x74de24===_0x59c584(0xf3);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a4_0x47ce(){const _0x4a159e=['2101tYwOOt','cache','131250qEdERH','254lXgZEp','toLowerCase','items','2343768QunhMy','160Mcqfqp','45WsMXRa','trim','mock','remote','fetchedAt','668570IOrUKG','2174844ftTuXU','5830993PLDhjL','6308072VflsEs'];a4_0x47ce=function(){return _0x4a159e;};return a4_0x47ce();}export async function getRemoteAppList(_0x4b9ef8){const _0x17604a=a4_0xb1b8,{env:_0x2c1e47,accessKey:_0x3844e5,localOnly:localOnly=![],noCache:noCache=![]}=_0x4b9ef8,_0x5cbe70=readCachedAppList(_0x2c1e47,_0x3844e5),_0x10f0c9=_0x3844e5?.[_0x17604a(0xf2)]()?getAppCacheFilePath(_0x2c1e47,_0x3844e5):null;if(localOnly)return{'items':_0x5cbe70?.['items']??[],'source':_0x17604a(0xea),'fetchedAt':_0x5cbe70?.['fetchedAt']??null,'cachePath':_0x10f0c9};try{const _0x330806=await getRemoteAppItems(),_0x3e512e=shouldUseMockRemoteApps()?'mock':_0x17604a(0xf4),_0xf2a292=new Date()['toISOString'](),_0x3ad1ac=_0x3844e5?.[_0x17604a(0xf2)]()?writeCachedAppList(_0x2c1e47,_0x3844e5,{'env':_0x2c1e47,'fetchedAt':_0xf2a292,'source':_0x3e512e,'items':_0x330806}):null;return{'items':_0x330806,'source':_0x3e512e,'fetchedAt':_0xf2a292,'cachePath':_0x3ad1ac};}catch(_0x24f4a8){if(!noCache&&_0x5cbe70)return{'items':_0x5cbe70[_0x17604a(0xee)],'source':_0x17604a(0xea),'fetchedAt':_0x5cbe70[_0x17604a(0xf5)],'cachePath':_0x10f0c9};throw _0x24f4a8;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x183ab0,_0x2cea25){const _0x3a4cbd=a5_0x4c98,_0x30b61f=_0x183ab0();while(!![]){try{const _0x3d56f9=parseInt(_0x3a4cbd(0x181))/0x1*(parseInt(_0x3a4cbd(0x18f))/0x2)+parseInt(_0x3a4cbd(0x17f))/0x3*(-parseInt(_0x3a4cbd(0x180))/0x4)+parseInt(_0x3a4cbd(0x18b))/0x5+-parseInt(_0x3a4cbd(0x179))/0x6*(parseInt(_0x3a4cbd(0x17c))/0x7)+parseInt(_0x3a4cbd(0x17e))/0x8*(-parseInt(_0x3a4cbd(0x185))/0x9)+parseInt(_0x3a4cbd(0x188))/0xa*(-parseInt(_0x3a4cbd(0x184))/0xb)+parseInt(_0x3a4cbd(0x187))/0xc;if(_0x3d56f9===_0x2cea25)break;else _0x30b61f['push'](_0x30b61f['shift']());}catch(_0x2080d2){_0x30b61f['push'](_0x30b61f['shift']());}}}(a5_0x2fb3,0xdeeab));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};function a5_0x2fb3(){const _0x4de265=['global','17984520YLGubG','4310qQFiMv','currentApp','named','4077005lDGicj','appCode','isCurrent','local','4SKbPQT','6CVYnxy','name','definedIn','4026883EarBtB','find','1528CFUQcD','1733517sZpLTY','4KZTVkm','658072JagQCl','trim','defaultApp','25465kgSeEH','26685yWMiPn'];a5_0x2fb3=function(){return _0x4de265;};return a5_0x2fb3();}export function enrichAppListItemsWithMergedSelection(_0x2db6,_0x1d3193){const _0x4638e9=a5_0x4c98;if(!_0x1d3193)return;const _0x2c6d14=!!(_0x1d3193[_0x4638e9(0x189)]??_0x1d3193[_0x4638e9(0x183)]);for(const _0x405eb9 of _0x2db6){_0x405eb9['isCurrent']=![];}const _0x346faa=_0x1d3193[_0x4638e9(0x18c)]!=null?String(_0x1d3193[_0x4638e9(0x18c)])[_0x4638e9(0x182)]():'';if(_0x2c6d14){const _0x458319=_0x1d3193['currentApp']??_0x1d3193[_0x4638e9(0x183)];if(_0x458319){const _0x2c71da=_0x2db6['find'](_0x4aa8bd=>_0x4aa8bd['named']===!![]&&_0x4aa8bd[_0x4638e9(0x17a)]===_0x458319&&_0x4aa8bd[_0x4638e9(0x17b)]===_0x4638e9(0x18e)),_0x5c7527=_0x2c71da??_0x2db6[_0x4638e9(0x17d)](_0x31fc63=>_0x31fc63[_0x4638e9(0x18a)]===!![]&&_0x31fc63[_0x4638e9(0x17a)]===_0x458319);_0x5c7527&&(_0x5c7527[_0x4638e9(0x18d)]=!![]);}return;}if(!_0x346faa)return;for(const _0x20904d of _0x2db6){String(_0x20904d['appcode']??'')[_0x4638e9(0x182)]()===_0x346faa&&(_0x20904d[_0x4638e9(0x18d)]=!![]);}}function a5_0x4c98(_0x20dc6c,_0xead946){_0x20dc6c=_0x20dc6c-0x179;const _0x2fb356=a5_0x2fb3();let _0x4c9850=_0x2fb356[_0x20dc6c];return _0x4c9850;}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x501a1e){const _0x505f9f=a5_0x4c98;return formatScopeLabel(_0x501a1e['global']?_0x505f9f(0x186):'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
|
+
const a6_0x587b22=a6_0x1bbf;(function(_0x13bb26,_0x3854db){const _0x7899f1=a6_0x1bbf,_0x41526f=_0x13bb26();while(!![]){try{const _0x1c01ec=-parseInt(_0x7899f1(0x1ba))/0x1+-parseInt(_0x7899f1(0x1b4))/0x2*(-parseInt(_0x7899f1(0x1d7))/0x3)+parseInt(_0x7899f1(0x1f5))/0x4*(-parseInt(_0x7899f1(0x200))/0x5)+parseInt(_0x7899f1(0x1d1))/0x6+parseInt(_0x7899f1(0x1c0))/0x7+-parseInt(_0x7899f1(0x1b9))/0x8*(parseInt(_0x7899f1(0x1f7))/0x9)+parseInt(_0x7899f1(0x1e3))/0xa*(parseInt(_0x7899f1(0x1e1))/0xb);if(_0x1c01ec===_0x3854db)break;else _0x41526f['push'](_0x41526f['shift']());}catch(_0x1e3fef){_0x41526f['push'](_0x41526f['shift']());}}}(a6_0x443a,0x27a47));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function a6_0x443a(){const _0x40f43d=['global-default','Show\x20current\x20authentication\x20status','bool','\x20config','Tip:\x20you\x20can\x20also\x20run:','104daGtbK','join','36ZbPxLn','logout','Clear\x20from\x20global\x20config\x20(default)','\x20\x20export\x20','Shorthand\x20for\x20--access-key','AccessKey\x20cleared\x20from\x20','userCenterDisplayName','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Missing\x20accessKey.','50335nBxlXI','string','daily','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','length','read','accessKey','cancelled','env','isTTY','\x20Verify:\x20','Clear\x20accessKey\x20from\x20config','237284wuhmXY','write','global','newConfigFileName','login','87688ByPlSH','117615sMokWl','Write\x20to\x20global\x20config\x20(default)','Auth\x20mode:\x20','AccessKey\x20(ak_xxx...)','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Auth\x20config\x20reinitialized\x20in\x20','1620570tKFgHu','trim','push','\x20auth\x20login\x20--access-key\x20<ak_xxx>','project','validation','\x20doctor','AccessKey:\x20','yes','slice','Option\x20C:\x20environment\x20variable','stdout','info','Read\x20from\x20global\x20config\x20(default)','\x20env\x20var','test','Then\x20verify\x20with:\x20','303870GYjwkM','\x20config.\x20Nothing\x20to\x20clear.','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','\x20Current\x20env:\x20','boolean','3WOaStS','str','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','production','status','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','No\x20AccessKey\x20found\x20in\x20','ACCESS_KEY','\x20scope.','Invalid\x20accessKey\x20format:\x20\x22','539McRsIh','nonInteractive','37710RIEWKN','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','repeat','envName','auth','\x20auth\x20status','\x20config.','development','access-key','Option\x20B:\x20apps\x20config\x20(','\x20(via\x20','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'];a6_0x443a=function(){return _0x40f43d;};return a6_0x443a();}function a6_0x1bbf(_0xc688c,_0x29f6ab){_0xc688c=_0xc688c-0x1b1;const _0x443a8c=a6_0x443a();let _0x1bbfbe=_0x443a8c[_0xc688c];return _0x1bbfbe;}function showAccessKeyCreateHint(){const _0x66fd3e=a6_0x1bbf;writeCliSideChannelLine(_0x66fd3e(0x1be)+PRODUCT_CONFIG[_0x66fd3e(0x1fd)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x66fd3e(0x1f4)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x66fd3e(0x1c3));}function buildAccessKeySetupGuide(){const _0x4bba30=a6_0x1bbf;return[_0x4bba30(0x1be)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x4bba30(0x1d9)+CLI_BIN_NAME+_0x4bba30(0x1e5)][_0x4bba30(0x1f6)]('\x0a');}function canPromptForAccessKey(_0x16abe9){const _0xa75e8c=a6_0x1bbf;return!_0x16abe9[_0xa75e8c(0x1e2)]&&process['stdin']['isTTY']!==![]&&process[_0xa75e8c(0x1cb)][_0xa75e8c(0x1b1)]!==![];}function resolveAuthScopeFlags(_0x3f6b71){const _0x4e3cca=a6_0x1bbf;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x3f6b71[_0x4e3cca(0x1f2)](_0x4e3cca(0x1b6)),'explicitProject':_0x3f6b71[_0x4e3cca(0x1f2)]('project'),'policy':_0x4e3cca(0x1f0)}));}async function resolveAuthWriteInput(_0x33f7ca){const _0x39f509=a6_0x1bbf;let _0x51bec7=(_0x33f7ca[_0x39f509(0x1d8)]('access-key')||_0x33f7ca[_0x39f509(0x1d8)]('ak')||'')[_0x39f509(0x1c1)]();const _0x975521=(_0x33f7ca['str'](_0x39f509(0x209))||'')[_0x39f509(0x1c1)]();if(!_0x51bec7&&canPromptForAccessKey(_0x33f7ca))try{showAccessKeyCreateHint(),_0x51bec7=await promptAccessKey('');}catch(_0x110edb){if(isAbortPrompt(_0x110edb))throw CliErrors[_0x39f509(0x208)]();throw _0x110edb;}if(!_0x51bec7)throw CliErrors['validation'](_0x39f509(0x1ff),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x39f509(0x1cf)](_0x51bec7))throw CliErrors['validation'](_0x39f509(0x1e0)+_0x51bec7+'\x22',_0x39f509(0x1dc));if(!_0x975521)return{'accessKey':_0x51bec7};const _0x2d0639=normalizeEnv(_0x975521);return{'accessKey':_0x51bec7,'env':isDaily(_0x2d0639)?_0x39f509(0x202):isDev(_0x2d0639)?_0x39f509(0x1eb):_0x39f509(0x1da)};}export const authDefinitions=[{'service':a6_0x587b22(0x1e8),'command':a6_0x587b22(0x1b8),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':a6_0x587b22(0x1b5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x587b22(0x1ec),'type':a6_0x587b22(0x201),'description':a6_0x587b22(0x1bd)},{'name':'ak','type':a6_0x587b22(0x201),'description':a6_0x587b22(0x1fb)},{'name':a6_0x587b22(0x1b6),'type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1bb),'default':!![]},{'name':a6_0x587b22(0x1c4),'type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1d4),'default':![]}],async 'execute'(_0x2d00a2){const _0x1f147b=a6_0x587b22;if(_0x2d00a2['bool'](_0x1f147b(0x1c8)))throw CliErrors[_0x1f147b(0x1c5)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.','Use\x20`'+CLI_BIN_NAME+_0x1f147b(0x1e4)+CLI_BIN_NAME+_0x1f147b(0x1d3));const _0x3235e2=(_0x2d00a2[_0x1f147b(0x1d8)](_0x1f147b(0x1ec))||_0x2d00a2[_0x1f147b(0x1d8)]('ak')||'')[_0x1f147b(0x1c1)]();if(!_0x3235e2&&_0x2d00a2[_0x1f147b(0x1e2)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x11b7d9=await resolveAuthWriteInput(_0x2d00a2),_0x3695df=resolveAuthScopeFlags(_0x2d00a2),_0x4e9e2e=readScopedConfig(_0x3695df);_0x4e9e2e[_0x1f147b(0x207)]=_0x11b7d9['accessKey'];_0x11b7d9['env']&&(_0x4e9e2e['env']=_0x11b7d9['env']);writeScopedConfig(_0x4e9e2e,_0x3695df);const _0x2ec8d5=_0x3695df[_0x1f147b(0x1b6)]?_0x1f147b(0x1b6):_0x1f147b(0x1c4),_0x57fd5f=_0x4e9e2e[_0x1f147b(0x209)]?_0x1f147b(0x1d5)+_0x4e9e2e[_0x1f147b(0x209)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x2ec8d5+_0x1f147b(0x1ea)+_0x57fd5f+_0x1f147b(0x1b2)+CLI_BIN_NAME+_0x1f147b(0x1e9)};}},{'service':a6_0x587b22(0x1e8),'command':'init','description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a6_0x587b22(0x1b5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x587b22(0x1ec),'type':a6_0x587b22(0x201),'description':a6_0x587b22(0x1bd)},{'name':'ak','type':a6_0x587b22(0x201),'description':a6_0x587b22(0x1fb)},{'name':a6_0x587b22(0x209),'type':a6_0x587b22(0x201),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':'global','type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1bb),'default':!![]},{'name':a6_0x587b22(0x1c4),'type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1d4),'default':![]}],async 'execute'(_0x3d5aa6){const _0xd3bed5=a6_0x587b22,_0xb4ffee=await resolveAuthWriteInput(_0x3d5aa6),_0x1f4776=resolveAuthScopeFlags(_0x3d5aa6),_0x134f8d={'accessKey':_0xb4ffee[_0xd3bed5(0x207)]};_0xb4ffee['env']&&(_0x134f8d[_0xd3bed5(0x209)]=_0xb4ffee[_0xd3bed5(0x209)]);writeScopedConfig(_0x134f8d,_0x1f4776);const _0x5c9507=_0x1f4776[_0xd3bed5(0x1b6)]?_0xd3bed5(0x1b6):_0xd3bed5(0x1c4),_0x4f9458=_0x134f8d[_0xd3bed5(0x209)]?_0xd3bed5(0x1d5)+_0x134f8d[_0xd3bed5(0x209)]+'.':'';return{'ok':!![],'message':_0xd3bed5(0x1bf)+_0x5c9507+_0xd3bed5(0x1df)+_0x4f9458+'\x20Verify:\x20'+CLI_BIN_NAME+_0xd3bed5(0x1e9)};}},{'service':'auth','command':a6_0x587b22(0x1f8),'description':a6_0x587b22(0x1b3),'risk':a6_0x587b22(0x1b5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x587b22(0x1b6),'type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1f9),'default':!![]},{'name':'project','type':a6_0x587b22(0x1d6),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x52ab97){const _0x45dcd2=a6_0x587b22,_0x3cf61c=resolveAuthScopeFlags(_0x52ab97),_0xb5b1b=readScopedConfig(_0x3cf61c),_0x5570fc=!!_0xb5b1b['accessKey'];delete _0xb5b1b[_0x45dcd2(0x207)],writeScopedConfig(_0xb5b1b,_0x3cf61c);const _0x378bcd=_0x3cf61c[_0x45dcd2(0x1b6)]?_0x45dcd2(0x1b6):_0x45dcd2(0x1c4);if(_0x5570fc)return{'ok':!![],'message':_0x45dcd2(0x1fc)+_0x378bcd+_0x45dcd2(0x1ea)};return{'ok':!![],'message':_0x45dcd2(0x1dd)+_0x378bcd+_0x45dcd2(0x1d2)};}},{'service':'auth','command':a6_0x587b22(0x1db),'description':a6_0x587b22(0x1f1),'risk':a6_0x587b22(0x206),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x587b22(0x1b6),'type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1cd),'default':!![]},{'name':a6_0x587b22(0x1c4),'type':'boolean','description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x453d17){const _0x40c0ee=a6_0x587b22,_0x23dd82=resolveAuthScopeFlags(_0x453d17),_0x204a3a=readScopedConfig(_0x23dd82),_0xb9b27f=productEnvName(_0x40c0ee(0x1de)),_0x39783a=productEnv(_0x40c0ee(0x1de))||undefined,_0x34cb0e=_0x204a3a[_0x40c0ee(0x207)]||undefined,_0x459142=_0x39783a||_0x34cb0e,_0x3fbea6=_0x39783a?_0xb9b27f+_0x40c0ee(0x1ce):_0x34cb0e?(_0x23dd82[_0x40c0ee(0x1b6)]?_0x40c0ee(0x1b6):_0x40c0ee(0x1c4))+_0x40c0ee(0x1f3):null,_0x3a8e22=[_0x40c0ee(0x1bc)+AUTH_MODE['ClientAk']];if(_0x459142){const _0x309a05=_0x459142[_0x40c0ee(0x205)]>0x8?''+_0x459142[_0x40c0ee(0x1c9)](0x0,0x8)+'*'[_0x40c0ee(0x1e6)](_0x459142['length']-0x8):_0x459142;_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1c7)+_0x309a05+(_0x3fbea6?_0x40c0ee(0x1ee)+_0x3fbea6+')':''));}return!_0x459142&&(_0x3a8e22[_0x40c0ee(0x1c2)](''),_0x3a8e22['push']('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x3a8e22[_0x40c0ee(0x1c2)](''),_0x3a8e22[_0x40c0ee(0x1c2)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x40c0ee(0x1fe)),_0x3a8e22[_0x40c0ee(0x1c2)](''),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1ed)+PRODUCT_CONFIG[_0x40c0ee(0x1b7)]+')'),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1ef)),_0x3a8e22[_0x40c0ee(0x1c2)](''),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1ca)),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1fa)+_0xb9b27f+'=ak_xxx'),_0x3a8e22[_0x40c0ee(0x1c2)](''),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1d0)+CLI_BIN_NAME+_0x40c0ee(0x1e9)),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x203)+CLI_BIN_NAME+_0x40c0ee(0x1c6))),{'ok':!![],'message':_0x3a8e22[_0x40c0ee(0x1f6)]('\x0a')};}},{'service':a6_0x587b22(0x1e8),'command':a6_0x587b22(0x1cc),'description':a6_0x587b22(0x204),'risk':a6_0x587b22(0x206),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x208267){const _0x3cca12=a6_0x587b22,_0x2f608e=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x2f608e,'meta':{'env':_0x208267[_0x3cca12(0x1e7)]??_0x3cca12(0x1da)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x526d23,_0x3a71d0){const _0x55d26b=a7_0x5efa,_0x54ada1=_0x526d23();while(!![]){try{const _0x18d81e=-parseInt(_0x55d26b(0x1e8))/0x1+-parseInt(_0x55d26b(0x1ea))/0x2+parseInt(_0x55d26b(0x1f2))/0x3+-parseInt(_0x55d26b(0x1e3))/0x4*(-parseInt(_0x55d26b(0x1ec))/0x5)+parseInt(_0x55d26b(0x1f1))/0x6+parseInt(_0x55d26b(0x1f0))/0x7*(-parseInt(_0x55d26b(0x1ee))/0x8)+-parseInt(_0x55d26b(0x1eb))/0x9;if(_0x18d81e===_0x3a71d0)break;else _0x54ada1['push'](_0x54ada1['shift']());}catch(_0x10857f){_0x54ada1['push'](_0x54ada1['shift']());}}}(a7_0x4cb3,0xd9ab7));import{createInterface}from'node:readline';function a7_0x4cb3(){const _0x42281f=['371HBtmny','10493484OQNusJ','3029739RXDFwe','race','removeListener','SIGINT','4EVJqvx','AccessKey\x20(','name','trim','):\x20','775234eKChPG','stdin','2929154RvznMz','5282163YvCfQk','8234645lpJrYy','close','103768AWkgtg','AbortPrompt'];a7_0x4cb3=function(){return _0x42281f;};return a7_0x4cb3();}class AbortPrompt extends Error{constructor(){const _0x2f8bd6=a7_0x5efa;super('User\x20aborted\x20prompt'),this[_0x2f8bd6(0x1e5)]=_0x2f8bd6(0x1ef);}}function createSafeRl(){const _0x18f5e5=a7_0x5efa,_0x29d8bc=createInterface({'input':process[_0x18f5e5(0x1e9)],'output':process['stdout']});let _0x1385db;const _0x1cd1db=new Promise((_0x1c0633,_0x4123a2)=>{_0x1385db=()=>{const _0x186a2c=a7_0x5efa;_0x1385db&&(_0x29d8bc[_0x186a2c(0x1f4)](_0x186a2c(0x1e2),_0x1385db),_0x1385db=undefined);try{_0x29d8bc['close']();}catch{}_0x4123a2(new AbortPrompt());},_0x29d8bc['once']('SIGINT',_0x1385db);}),_0x1d7d90=()=>{const _0x48842f=_0x18f5e5;_0x1385db&&(_0x29d8bc[_0x48842f(0x1f4)]('SIGINT',_0x1385db),_0x1385db=undefined);try{_0x29d8bc[_0x48842f(0x1ed)]();}catch{}};return{'rl':_0x29d8bc,'abortPromise':_0x1cd1db,'disposeSuccess':_0x1d7d90};}function a7_0x5efa(_0x3d45fd,_0x150a56){_0x3d45fd=_0x3d45fd-0x1e2;const _0x4cb365=a7_0x4cb3();let _0x5efac5=_0x4cb365[_0x3d45fd];return _0x5efac5;}export async function promptAccessKey(_0x25687f=''){const _0x2b141e=a7_0x5efa,{rl:_0x13b077,abortPromise:_0x1d2536,disposeSuccess:_0x386a85}=createSafeRl(),_0x224004=new Promise(_0x5dbf3d=>{const _0x4a2ec5=a7_0x5efa,_0x441951=_0x25687f?_0x4a2ec5(0x1e4)+_0x25687f+_0x4a2ec5(0x1e7):'AccessKey\x20(paste\x20ak_...):\x20';_0x13b077['question'](_0x441951,_0x2ff4d5=>{const _0x5e33c3=_0x4a2ec5;_0x386a85(),_0x5dbf3d(_0x2ff4d5[_0x5e33c3(0x1e6)]()||_0x25687f);});});return Promise[_0x2b141e(0x1f3)]([_0x224004,_0x1d2536]);}export function isAbortPrompt(_0x142d3a){return _0x142d3a instanceof Error&&_0x142d3a['name']==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x2ecdd4=a8_0x157c;(function(_0x2248ef,_0x31593a){const _0xe9c0a5=a8_0x157c,_0x3f5b6f=_0x2248ef();while(!![]){try{const _0x35fcfb=-parseInt(_0xe9c0a5(0x1c4))/0x1+parseInt(_0xe9c0a5(0x1c1))/0x2*(-parseInt(_0xe9c0a5(0x1b5))/0x3)+-parseInt(_0xe9c0a5(0x1b6))/0x4*(parseInt(_0xe9c0a5(0x1c2))/0x5)+parseInt(_0xe9c0a5(0x1b0))/0x6+parseInt(_0xe9c0a5(0x1c0))/0x7+parseInt(_0xe9c0a5(0x1ba))/0x8*(-parseInt(_0xe9c0a5(0x1b4))/0x9)+parseInt(_0xe9c0a5(0x1be))/0xa;if(_0x35fcfb===_0x31593a)break;else _0x3f5b6f['push'](_0x3f5b6f['shift']());}catch(_0x1ab647){_0x3f5b6f['push'](_0x3f5b6f['shift']());}}}(a8_0x2ffc,0x899f4));function a8_0x157c(_0x805199,_0x4bf37a){_0x805199=_0x805199-0x1b0;const _0x2ffc0f=a8_0x2ffc();let _0x157ccb=_0x2ffc0f[_0x805199];return _0x157ccb;}import{getBffScriptInfo}from'../../core/api-client.js';function a8_0x2ffc(){const _0x340625=['detail','bff','functionName','657YuAkQY','127833ZnHrQg','38424NXSBFs','read','scriptType','(none)','22552ALwTBT','verbose','updatedTime','Script\x20ID','11407650SdANmR','Get\x20BFF\x20script\x20details\x20by\x20ID','3258304kbkixd','2uZDUaD','555pydTQR','createdTime','682629hjOttZ','5728536LKISKd'];a8_0x2ffc=function(){return _0x340625;};return a8_0x2ffc();}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x2ecdd4(0x1b2),'command':a8_0x2ecdd4(0x1b1),'description':a8_0x2ecdd4(0x1bf),'risk':a8_0x2ecdd4(0x1b7),'flags':[{...ID_FLAG,'description':a8_0x2ecdd4(0x1bd)},VERBOSE_FLAG],async 'execute'(_0x505357){const _0x3abeab=a8_0x2ecdd4,_0x2cb373=await getBffScriptInfo(_0x505357['num']('id')),_0xa2ccd9=_0x505357['bool'](_0x3abeab(0x1bb));if(_0xa2ccd9)return{'ok':!![],'data':_0x2cb373};return{'ok':!![],'data':{'id':_0x2cb373['id'],'appCode':_0x2cb373['appCode'],'functionName':_0x2cb373[_0x3abeab(0x1b3)]??'','scriptType':_0x2cb373[_0x3abeab(0x1b8)],'description':_0x2cb373['description']||_0x3abeab(0x1b9),'createdTime':_0x2cb373[_0x3abeab(0x1c3)]??'','updatedTime':_0x2cb373[_0x3abeab(0x1bc)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a9_0x52543d=a9_0x16e1;function a9_0x16e1(_0x500e2a,_0x37ad86){_0x500e2a=_0x500e2a-0x108;const _0x32f8da=a9_0x32f8();let _0x16e191=_0x32f8da[_0x500e2a];return _0x16e191;}(function(_0x47c18d,_0x5e80a6){const _0x1acb1f=a9_0x16e1,_0xa569b=_0x47c18d();while(!![]){try{const _0x55059c=-parseInt(_0x1acb1f(0x109))/0x1+-parseInt(_0x1acb1f(0x10c))/0x2*(parseInt(_0x1acb1f(0x108))/0x3)+parseInt(_0x1acb1f(0x112))/0x4+parseInt(_0x1acb1f(0x111))/0x5+-parseInt(_0x1acb1f(0x10d))/0x6*(parseInt(_0x1acb1f(0x114))/0x7)+parseInt(_0x1acb1f(0x110))/0x8+-parseInt(_0x1acb1f(0x113))/0x9*(parseInt(_0x1acb1f(0x10f))/0xa);if(_0x55059c===_0x5e80a6)break;else _0xa569b['push'](_0xa569b['shift']());}catch(_0x30cbf9){_0xa569b['push'](_0xa569b['shift']());}}}(a9_0x32f8,0x37507));function a9_0x32f8(){const _0x3446a2=['str','bff','5524FasInG','7278gJPbPY','now','25100dDurka','2801632bqNtQU','356370NPejJC','1540516PbIgXp','657mIYZKD','973teuugK','name','read','BFF\x20executed\x20in\x20','6AynIwU','222679GqkZFc'];a9_0x32f8=function(){return _0x3446a2;};return a9_0x32f8();}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a9_0x52543d(0x10b),'command':'exec','description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a9_0x52543d(0x116),'flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x5f3b75){const _0x295a27=a9_0x52543d,_0x4ec36e=parseJsonParams(_0x5f3b75[_0x295a27(0x10a)]('params')),_0x2574aa=Date[_0x295a27(0x10e)](),_0x38bc04=await executeSdkBff(_0x5f3b75['str'](_0x295a27(0x115)),_0x4ec36e),_0x564803=Date[_0x295a27(0x10e)]()-_0x2574aa;return{'ok':!![],'data':{'result':_0x38bc04,'elapsed':_0x564803},'message':_0x295a27(0x117)+_0x564803+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xba9f5f,_0x30b51b){const _0xde6f86=a10_0x3e6b,_0x33f157=_0xba9f5f();while(!![]){try{const _0x2f1c7f=-parseInt(_0xde6f86(0xfa))/0x1*(-parseInt(_0xde6f86(0xf4))/0x2)+-parseInt(_0xde6f86(0xfb))/0x3*(-parseInt(_0xde6f86(0xf2))/0x4)+parseInt(_0xde6f86(0xf5))/0x5*(parseInt(_0xde6f86(0xf1))/0x6)+-parseInt(_0xde6f86(0xf6))/0x7+parseInt(_0xde6f86(0xf3))/0x8*(parseInt(_0xde6f86(0xfd))/0x9)+-parseInt(_0xde6f86(0xf7))/0xa*(parseInt(_0xde6f86(0xfc))/0xb)+-parseInt(_0xde6f86(0xf9))/0xc*(-parseInt(_0xde6f86(0xf8))/0xd);if(_0x2f1c7f===_0x30b51b)break;else _0x33f157['push'](_0x33f157['shift']());}catch(_0x10ff3b){_0x33f157['push'](_0x33f157['shift']());}}}(a10_0x4110,0x20632));function a10_0x4110(){const _0x5548b9=['17798tpxaKe','1165977KsvXMT','222CWyLMX','772IRTuKf','8ufspIS','17988brkOJa','18765rGZpop','1659903NvNmpQ','1150ojuirX','468NUOrVO','8268ofewla','23JToacA','867HYUkgs'];a10_0x4110=function(){return _0x5548b9;};return a10_0x4110();}import{bffDetail}from'../../commands/bff/detail.js';function a10_0x3e6b(_0x1b1de5,_0x37bde4){_0x1b1de5=_0x1b1de5-0xf1;const _0x411056=a10_0x4110();let _0x3e6b21=_0x411056[_0x1b1de5];return _0x3e6b21;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3bc336,_0x322371){const _0x27650a=a11_0x2957,_0x49f5af=_0x3bc336();while(!![]){try{const _0x3151f0=-parseInt(_0x27650a(0x11d))/0x1*(parseInt(_0x27650a(0x126))/0x2)+parseInt(_0x27650a(0x11a))/0x3*(-parseInt(_0x27650a(0x121))/0x4)+parseInt(_0x27650a(0x111))/0x5*(-parseInt(_0x27650a(0x118))/0x6)+-parseInt(_0x27650a(0x110))/0x7+parseInt(_0x27650a(0x124))/0x8+-parseInt(_0x27650a(0x11c))/0x9*(-parseInt(_0x27650a(0x11b))/0xa)+-parseInt(_0x27650a(0x119))/0xb*(-parseInt(_0x27650a(0x116))/0xc);if(_0x3151f0===_0x322371)break;else _0x49f5af['push'](_0x49f5af['shift']());}catch(_0x4e4867){_0x49f5af['push'](_0x49f5af['shift']());}}}(a11_0x332a,0xdf05e));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';function a11_0x2957(_0x5cd869,_0x180390){_0x5cd869=_0x5cd869-0x10f;const _0x332a0d=a11_0x332a();let _0x2957fe=_0x332a0d[_0x5cd869];return _0x2957fe;}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(_0x357cf0){const _0x341711=a11_0x2957,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x5c8df1}=_0x357cf0;if(explicitGlobal&&explicitProject)throw CliErrors[_0x341711(0x117)](_0x341711(0x114),'Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return'global';if(explicitProject)return _0x341711(0x127);switch(_0x5c8df1){case _0x341711(0x112):return _0x341711(0x113);case _0x341711(0x122):return _0x357cf0[_0x341711(0x11f)]??isInProject()?_0x341711(0x127):'global';case _0x341711(0x11e):if(!(_0x357cf0['inProject']??isInProject()))throw CliErrors['validation']('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x341711(0x123)]+_0x341711(0x115),_0x341711(0x128)+PRODUCT_CONFIG['newConfigFileName']+_0x341711(0x120)+CLI_BIN_NAME+_0x341711(0x10f));return'project';}}export function toScopeFlags(_0x5a73c5){return{'global':_0x5a73c5==='global'};}export function formatScopeLabel(_0x55e578){const _0x506501=a11_0x2957;return _0x55e578==='global'?_0x506501(0x125):'';}function a11_0x332a(){const _0x32cf6c=['global','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','\x20found).','276uEFRoR','validation','2938002NMdscp','470723qAjOPc','3hWEDEc','10bKywJP','12928851imrSFE','1gWtAXi','project-or-global-explicit','inProject',',\x20or\x20run\x20`','1550308okICPB','project-default','newConfigFileName','2969096iNgTKV','\x20(global)','197786gprSWc','project','Add\x20--global\x20to\x20write\x20to\x20~/','\x20init`\x20first.','6315932fRQxkx','5ttAhOk','global-default'];a11_0x332a=function(){return _0x32cf6c;};return a11_0x332a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a12_0x285e(_0x563f4a,_0x383f1f){_0x563f4a=_0x563f4a-0x1c9;const _0x3e5f98=a12_0x3e5f();let _0x285e55=_0x3e5f98[_0x563f4a];return _0x285e55;}(function(_0xad7c,_0x598d4c){const _0x1a2b9f=a12_0x285e,_0x2781e8=_0xad7c();while(!![]){try{const _0xc66d91=-parseInt(_0x1a2b9f(0x1d4))/0x1*(parseInt(_0x1a2b9f(0x1ca))/0x2)+-parseInt(_0x1a2b9f(0x1cd))/0x3*(-parseInt(_0x1a2b9f(0x1e2))/0x4)+-parseInt(_0x1a2b9f(0x1db))/0x5*(-parseInt(_0x1a2b9f(0x1da))/0x6)+parseInt(_0x1a2b9f(0x1e5))/0x7*(-parseInt(_0x1a2b9f(0x1e4))/0x8)+-parseInt(_0x1a2b9f(0x1d6))/0x9+parseInt(_0x1a2b9f(0x1cf))/0xa*(-parseInt(_0x1a2b9f(0x1e0))/0xb)+parseInt(_0x1a2b9f(0x1d0))/0xc*(parseInt(_0x1a2b9f(0x1df))/0xd);if(_0xc66d91===_0x598d4c)break;else _0x2781e8['push'](_0x2781e8['shift']());}catch(_0xaa6905){_0x2781e8['push'](_0x2781e8['shift']());}}}(a12_0x3e5f,0xf3a7d));import{CliErrors}from'../../errors.js';function a12_0x3e5f(){const _0x16b795=['Use\x20only\x20one\x20of:\x20','1xYfbnA','\x20is\x20allowed,\x20found:\x20','1924380KGpRjH','test','map','filter','5983554yEbJdZ','5MLJYng','flag','Remove\x20all\x20but\x20one.','At\x20least\x20one\x20of\x20','4408053lsuqOh','16750019PJzwvz','join','268McSmTt','str','1172024ySPSGP','91CNaDdx','Only\x20one\x20of\x20','length',':\x20expected\x20','Flags\x20','Invalid\x20--','2356972SXLRwr','Provide\x20one\x20of:\x20','\x20are\x20mutually\x20exclusive\x20for\x20`','79191LfHPdN','\x20is\x20required\x20for\x20`','10eDTkBR','108eIeinD','Exactly\x20one\x20of\x20','validation'];a12_0x3e5f=function(){return _0x16b795;};return a12_0x3e5f();}function isSet(_0x48f494,_0x343edd){const _0x50f2b4=a12_0x285e,_0x4c84f1=_0x48f494[_0x50f2b4(0x1dc)](_0x343edd);return _0x4c84f1!==undefined&&_0x4c84f1!==''&&_0x4c84f1!==![]&&_0x4c84f1!==0x0;}function fmtNames(_0xd409dc){const _0x197d26=a12_0x285e;return _0xd409dc[_0x197d26(0x1d8)](_0x4c6c7a=>'--'+_0x4c6c7a)[_0x197d26(0x1e1)](',\x20');}export function requireOneOf(_0x11dc25,_0x54beee,_0x4788bf){const _0x18b0db=a12_0x285e,_0xda3f01=_0x54beee[_0x18b0db(0x1d9)](_0x1c41f8=>isSet(_0x11dc25,_0x1c41f8));if(_0xda3f01[_0x18b0db(0x1e7)]!==0x1)throw CliErrors[_0x18b0db(0x1d2)](_0xda3f01[_0x18b0db(0x1e7)]===0x0?_0x18b0db(0x1d1)+fmtNames(_0x54beee)+_0x18b0db(0x1ce)+_0x4788bf+'`.':_0x18b0db(0x1e6)+fmtNames(_0x54beee)+_0x18b0db(0x1d5)+fmtNames(_0xda3f01)+'.',_0xda3f01[_0x18b0db(0x1e7)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x54beee):_0x18b0db(0x1dd));}export function requireAnyOf(_0x422a38,_0x513a53,_0x49802e){const _0x10a90e=a12_0x285e;if(!_0x513a53['some'](_0x13ce75=>isSet(_0x422a38,_0x13ce75)))throw CliErrors[_0x10a90e(0x1d2)](_0x10a90e(0x1de)+fmtNames(_0x513a53)+_0x10a90e(0x1ce)+_0x49802e+'`.',_0x10a90e(0x1cb)+fmtNames(_0x513a53));}export function mutuallyExclusive(_0x58643f,_0xff8647,_0xa292be){const _0x4107f0=a12_0x285e,_0x386930=_0xff8647[_0x4107f0(0x1d9)](_0xfbacd2=>isSet(_0x58643f,_0xfbacd2));if(_0x386930['length']>0x1)throw CliErrors[_0x4107f0(0x1d2)](_0x4107f0(0x1e9)+fmtNames(_0x386930)+_0x4107f0(0x1cc)+_0xa292be+'`.',_0x4107f0(0x1d3)+fmtNames(_0xff8647));}export function validatePattern(_0x44ac79,_0x172184,_0x2aedfb,_0x16a923){const _0x4cc1ac=a12_0x285e,_0x883e5a=_0x44ac79[_0x4cc1ac(0x1e3)](_0x172184);if(_0x883e5a&&!_0x2aedfb[_0x4cc1ac(0x1d7)](_0x883e5a))throw CliErrors['validation'](_0x4cc1ac(0x1c9)+_0x172184+_0x4cc1ac(0x1e8)+_0x16a923+',\x20got\x20\x22'+_0x883e5a+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a13_0x40c8(_0x2157e2,_0x434971){_0x2157e2=_0x2157e2-0x167;const _0x1bf827=a13_0x1bf8();let _0x40c831=_0x1bf827[_0x2157e2];return _0x40c831;}const a13_0x3f8e8f=a13_0x40c8;(function(_0x1b7b23,_0x4be2c8){const _0x44a012=a13_0x40c8,_0x273bb9=_0x1b7b23();while(!![]){try{const _0x1582fc=parseInt(_0x44a012(0x16b))/0x1+parseInt(_0x44a012(0x177))/0x2*(-parseInt(_0x44a012(0x173))/0x3)+-parseInt(_0x44a012(0x172))/0x4*(parseInt(_0x44a012(0x175))/0x5)+-parseInt(_0x44a012(0x179))/0x6+-parseInt(_0x44a012(0x176))/0x7*(-parseInt(_0x44a012(0x170))/0x8)+-parseInt(_0x44a012(0x167))/0x9+parseInt(_0x44a012(0x16c))/0xa*(parseInt(_0x44a012(0x174))/0xb);if(_0x1582fc===_0x4be2c8)break;else _0x273bb9['push'](_0x273bb9['shift']());}catch(_0x7900bf){_0x273bb9['push'](_0x273bb9['shift']());}}}(a13_0x1bf8,0xcb13e));export const CODE_FLAG={'name':'code','type':a13_0x3f8e8f(0x17b),'required':!![],'description':a13_0x3f8e8f(0x178),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x3f8e8f(0x16e)}};export const SQLCODE_FLAG={'name':a13_0x3f8e8f(0x17a),'type':a13_0x3f8e8f(0x17b),'required':!![],'description':a13_0x3f8e8f(0x171),'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_0x3f8e8f(0x168),'type':'boolean','description':a13_0x3f8e8f(0x16d)};export const PARAMS_FLAG={'name':'params','type':a13_0x3f8e8f(0x17b),'description':a13_0x3f8e8f(0x16f)};export const NAME_FLAG={'name':a13_0x3f8e8f(0x17c),'type':'string','description':a13_0x3f8e8f(0x169)};export const ID_FLAG={'name':'id','type':a13_0x3f8e8f(0x16a),'required':!![],'description':'Resource\x20ID'};function a13_0x1bf8(){const _0x424410=['name','12908745RnLccK','verbose','Resource\x20name\x20for\x20lookup','number','318607UXTZso','10856710WmdwEw','Return\x20full\x20raw\x20response\x20object','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','75944nafzqK','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','16AumOyu','230829IZdKvE','44YtlsPP','870980GBmNWC','973KmUdPn','42TRbdFo','Dataset\x20code\x20(32-char\x20hex\x20UUID)','8412720foLZKv','sqlcode','string'];a13_0x1bf8=function(){return _0x424410;};return a13_0x1bf8();}
|
|
@@ -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
|
+
const a14_0x3994b8=a14_0x23f3;(function(_0x40a56f,_0x122528){const _0x4affb3=a14_0x23f3,_0x35555b=_0x40a56f();while(!![]){try{const _0x1ab1ed=parseInt(_0x4affb3(0x17a))/0x1*(parseInt(_0x4affb3(0x166))/0x2)+parseInt(_0x4affb3(0x19a))/0x3+parseInt(_0x4affb3(0x19d))/0x4*(parseInt(_0x4affb3(0x169))/0x5)+parseInt(_0x4affb3(0x16a))/0x6+-parseInt(_0x4affb3(0x172))/0x7*(-parseInt(_0x4affb3(0x180))/0x8)+-parseInt(_0x4affb3(0x168))/0x9+-parseInt(_0x4affb3(0x18d))/0xa;if(_0x1ab1ed===_0x122528)break;else _0x35555b['push'](_0x35555b['shift']());}catch(_0x2ed5a8){_0x35555b['push'](_0x35555b['shift']());}}}(a14_0x2be1,0x88fe1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';function a14_0x23f3(_0x32db7a,_0x240e55){_0x32db7a=_0x32db7a-0x160;const _0x2be1b3=a14_0x2be1();let _0x23f339=_0x2be1b3[_0x32db7a];return _0x23f339;}import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';function a14_0x2be1(){const _0x529f64=['46TPwoqp','\x20config\x20get\x20<key>','3854403inDvIK','88390ucjvKZ','340938YGEngK','validation','object','join','pretty','boolean','List\x20current\x20config','list','518PMZcIW','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','split','Key\x20\x22','key','Value\x20to\x20assign','log','alias','46547txJnvg','global','Settable\x20keys:\x20','Key\x20not\x20found:\x20','project-or-global-explicit','../../context.js','60472QiZWtE','write','read','riskLevel','\x20config\x20delete\x20<key>\x20[--global]','`\x20=\x20\x22','config','stringify','\x22\x20is\x20not\x20settable.','get','apps','\x20\x20global:\x20\x20','appcode','20534770naSlIG','Missing\x20key\x20or\x20value.','Top-level\x20key\x20\x22','\x22\x20not\x20found\x20at\x20top\x20level.','trim','Delete\x20a\x20config\x20value','field','Write\x20to\x20global\x20config','args','raw','keys','(none)','value','2742435XETaJB','\x20\x20project:\x20','length','100kxZIvt','Deleted\x20`','Missing\x20key\x20argument.','includes','Usage:\x20','bool','\x20config\x20set\x20<key>\x20<value>\x20[--global]','delete','Set\x20a\x20config\x20value','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','pageSize','Invalid\x20value\x20for\x20\x22','Config\x20files:\x0a','\x20(global)','isArray'];a14_0x2be1=function(){return _0x529f64;};return a14_0x2be1();}const GLOBAL_FLAG={'name':a14_0x3994b8(0x17b),'type':a14_0x3994b8(0x16f),'description':a14_0x3994b8(0x194),'default':![]};function parseAliasAppcodeSetKey(_0x17c7bc){const _0x1adaaf=a14_0x3994b8,_0x3c2a87=_0x17c7bc[_0x1adaaf(0x174)]('.');if(_0x3c2a87[_0x1adaaf(0x19c)]!==0x3||_0x3c2a87[0x0]!==_0x1adaaf(0x18a)||_0x3c2a87[0x2]!==_0x1adaaf(0x18c))return undefined;const _0x50a776=_0x3c2a87[0x1]?.['trim']();return _0x50a776?_0x50a776:undefined;}function parseAliasDeleteKey(_0x49a4c1){const _0x326f30=a14_0x3994b8,_0x225157=_0x49a4c1[_0x326f30(0x174)]('.');if(_0x225157[_0x326f30(0x19c)]===0x2&&_0x225157[0x0]==='apps'){const _0x45c869=_0x225157[0x1]?.[_0x326f30(0x191)]();return _0x45c869?{'alias':_0x45c869}:undefined;}if(_0x225157['length']===0x3&&_0x225157[0x0]==='apps'&&_0x225157[0x2]==='appcode'){const _0x40d940=_0x225157[0x1]?.[_0x326f30(0x191)]();return _0x40d940?{'alias':_0x40d940,'field':_0x326f30(0x18c)}:undefined;}return undefined;}function setLocalAppAlias(_0x1e6824,_0x557643,_0x46fe6f){const _0xbcc9f=a14_0x3994b8,_0x1ebe59=_0x1e6824[_0xbcc9f(0x18a)]&&typeof _0x1e6824[_0xbcc9f(0x18a)]===_0xbcc9f(0x16c)&&!Array[_0xbcc9f(0x165)](_0x1e6824[_0xbcc9f(0x18a)])?_0x1e6824['apps']:{},_0x1038cc=_0x1ebe59[_0x557643]&&typeof _0x1ebe59[_0x557643]===_0xbcc9f(0x16c)&&!Array[_0xbcc9f(0x165)](_0x1ebe59[_0x557643])?_0x1ebe59[_0x557643]:{};_0x1038cc['appcode']=_0x46fe6f,_0x1ebe59[_0x557643]=_0x1038cc,_0x1e6824[_0xbcc9f(0x18a)]=_0x1ebe59;}function deleteLocalAppAlias(_0x5c4a50,_0x2df94d){const _0x18948e=a14_0x3994b8;if(!_0x5c4a50[_0x18948e(0x18a)]||typeof _0x5c4a50[_0x18948e(0x18a)]!==_0x18948e(0x16c)||Array['isArray'](_0x5c4a50[_0x18948e(0x18a)]))return![];const _0x4cb11a=_0x5c4a50[_0x18948e(0x18a)],_0x23aa44=_0x4cb11a[_0x2df94d[_0x18948e(0x179)]];if(!_0x23aa44||typeof _0x23aa44!==_0x18948e(0x16c)||Array[_0x18948e(0x165)](_0x23aa44))return![];if(!_0x2df94d[_0x18948e(0x193)])return delete _0x4cb11a[_0x2df94d[_0x18948e(0x179)]],!![];if(!(_0x2df94d[_0x18948e(0x193)]in _0x23aa44))return![];return delete _0x23aa44[_0x2df94d['field']],Object[_0x18948e(0x197)](_0x23aa44)[_0x18948e(0x19c)]===0x0&&delete _0x4cb11a[_0x2df94d[_0x18948e(0x179)]],!![];}const listDef={'service':a14_0x3994b8(0x186),'command':a14_0x3994b8(0x171),'description':a14_0x3994b8(0x170),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1c3b64){const _0x4d5160=a14_0x3994b8,{buildConfigFromFlags:_0x432ce3}=await import(_0x4d5160(0x17f)),_0x4dfb0c=_0x432ce3({}),_0x315562=getProjectConfigPath(),_0x14c4ff=resolveWriteConfigPath(_0x4d5160(0x17b));if(_0x1c3b64['format']===_0x4d5160(0x16e))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON['stringify'](_0x4dfb0c[_0x4d5160(0x196)],null,0x2)+'\x0a\x0a')+_0x4d5160(0x163)+(_0x4d5160(0x19b)+(_0x315562??_0x4d5160(0x198))+'\x0a')+(_0x4d5160(0x18b)+_0x14c4ff)};return{'ok':!![],'data':{'effective':_0x4dfb0c['raw'],'configFiles':{'project':_0x315562??null,'global':_0x14c4ff}}};}},getDef={'service':a14_0x3994b8(0x186),'command':a14_0x3994b8(0x189),'description':'Get\x20a\x20config\x20value','risk':a14_0x3994b8(0x182),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a14_0x3994b8(0x173),'required':!![]}],'flags':[],async 'execute'(_0x31beed){const _0xbce361=a14_0x3994b8,_0x3acd99=_0x31beed[_0xbce361(0x195)][0x0];if(!_0x3acd99)throw CliErrors[_0xbce361(0x16b)](_0xbce361(0x19f),_0xbce361(0x1a1)+CLI_BIN_NAME+_0xbce361(0x167));const {buildConfigFromFlags:_0x200ff6}=await import('../../context.js'),{raw:_0x496dfd}=_0x200ff6({});if(_0x3acd99[_0xbce361(0x1a0)]('.')){const _0x2a1bc5=_0x3acd99['split']('.');let _0x3999bd=_0x496dfd;for(const _0x47cf4c of _0x2a1bc5){if(_0x3999bd==null||typeof _0x3999bd!=='object')throw CliErrors['validation'](_0xbce361(0x17d)+_0x3acd99);_0x3999bd=_0x3999bd[_0x47cf4c];}if(_0x3999bd===undefined)throw CliErrors[_0xbce361(0x16b)]('Key\x20not\x20found:\x20'+_0x3acd99);return console[_0xbce361(0x178)](typeof _0x3999bd===_0xbce361(0x16c)?JSON['stringify'](_0x3999bd,null,0x2):String(_0x3999bd)),{'ok':!![]};}const _0x32371c=_0x496dfd[_0x3acd99];if(_0x32371c===undefined)throw CliErrors[_0xbce361(0x16b)](_0xbce361(0x17d)+_0x3acd99);return console['log'](typeof _0x32371c==='object'?JSON[_0xbce361(0x187)](_0x32371c,null,0x2):String(_0x32371c)),{'ok':!![]};}},setDef={'service':a14_0x3994b8(0x186),'command':'set','description':a14_0x3994b8(0x1a5),'risk':a14_0x3994b8(0x181),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x3994b8(0x176),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x3994b8(0x199),'description':a14_0x3994b8(0x177),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x2fa847){const _0x4bbe53=a14_0x3994b8,_0x40ed87=_0x2fa847['args'][0x0],_0x548744=_0x2fa847[_0x4bbe53(0x195)][0x1];if(!_0x40ed87||_0x548744===undefined)throw CliErrors['validation'](_0x4bbe53(0x18e),_0x4bbe53(0x1a1)+CLI_BIN_NAME+_0x4bbe53(0x1a3));if(ENUM_KEYS[_0x40ed87]&&!ENUM_KEYS[_0x40ed87][_0x4bbe53(0x1a0)](_0x548744))throw CliErrors[_0x4bbe53(0x16b)](_0x4bbe53(0x162)+_0x40ed87+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x40ed87][_0x4bbe53(0x16d)](',\x20'));if(_0x40ed87===_0x4bbe53(0x183))throw CliErrors[_0x4bbe53(0x16b)](_0x4bbe53(0x160));if(_0x40ed87===_0x4bbe53(0x161)){const _0xc6db34=Number(_0x548744);if(isNaN(_0xc6db34)||_0xc6db34<=0x0)throw CliErrors['validation']('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x51af44=resolveWriteScope({'explicitGlobal':_0x2fa847['bool'](_0x4bbe53(0x17b)),'policy':_0x4bbe53(0x17e)}),_0x8ba79e=toScopeFlags(_0x51af44),_0x443a08=readScopedConfig(_0x8ba79e),_0x335336=parseAliasAppcodeSetKey(_0x40ed87);if(!_0x335336&&!isTopLevelConfigKey(_0x40ed87))throw CliErrors[_0x4bbe53(0x16b)](_0x4bbe53(0x18f)+_0x40ed87+_0x4bbe53(0x188),_0x4bbe53(0x17c)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x335336?setLocalAppAlias(_0x443a08,_0x335336,_0x548744):_0x443a08[_0x40ed87]=_0x40ed87===_0x4bbe53(0x161)?Number(_0x548744):_0x548744,console[_0x4bbe53(0x178)]('Set\x20`'+_0x40ed87+_0x4bbe53(0x185)+_0x548744+'\x22'+(_0x51af44===_0x4bbe53(0x17b)?_0x4bbe53(0x164):'')),writeScopedConfig(_0x443a08,_0x8ba79e),{'ok':!![]};}},deleteDef={'service':a14_0x3994b8(0x186),'command':a14_0x3994b8(0x1a4),'description':a14_0x3994b8(0x192),'risk':a14_0x3994b8(0x181),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x3994b8(0x176),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x118822){const _0x15ee37=a14_0x3994b8,_0x31bc5f=_0x118822[_0x15ee37(0x195)][0x0];if(!_0x31bc5f)throw CliErrors[_0x15ee37(0x16b)](_0x15ee37(0x19f),'Usage:\x20'+CLI_BIN_NAME+_0x15ee37(0x184));const _0x15e029=resolveWriteScope({'explicitGlobal':_0x118822[_0x15ee37(0x1a2)](_0x15ee37(0x17b)),'policy':_0x15ee37(0x17e)}),_0xcf337b=toScopeFlags(_0x15e029),_0x30ead9=readScopedConfig(_0xcf337b),_0x48ece2=parseAliasDeleteKey(_0x31bc5f);if(_0x48ece2){if(!deleteLocalAppAlias(_0x30ead9,_0x48ece2))throw CliErrors[_0x15ee37(0x16b)]('Key\x20not\x20found:\x20'+_0x31bc5f);return console[_0x15ee37(0x178)]('Deleted\x20`'+_0x31bc5f+'`'+(_0x15e029===_0x15ee37(0x17b)?_0x15ee37(0x164):'')),writeScopedConfig(_0x30ead9,_0xcf337b),{'ok':!![]};}if(_0x30ead9[_0x31bc5f]===undefined)throw CliErrors['validation'](_0x15ee37(0x175)+_0x31bc5f+_0x15ee37(0x190));return delete _0x30ead9[_0x31bc5f],console[_0x15ee37(0x178)](_0x15ee37(0x19e)+_0x31bc5f+'`'+(_0x15e029==='global'?'\x20(global)':'')),writeScopedConfig(_0x30ead9,_0xcf337b),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a15_0x4dad(){var _0x54f87b=['1211268LnYxFT','9246105GuSbTx','7CltVqs','3xjvlvk','1428811lKWBPT','853490YFNvDX','35961370ZVuoCo','3811292LWyCUy','8SXcDsl','5620695Mrzien'];a15_0x4dad=function(){return _0x54f87b;};return a15_0x4dad();}(function(_0x9d364d,_0x43e7b9){var _0x19ea68=a15_0x3bc2,_0x513882=_0x9d364d();while(!![]){try{var _0x18d662=-parseInt(_0x19ea68(0x13a))/0x1+-parseInt(_0x19ea68(0x131))/0x2+parseInt(_0x19ea68(0x139))/0x3*(-parseInt(_0x19ea68(0x133))/0x4)+-parseInt(_0x19ea68(0x135))/0x5+-parseInt(_0x19ea68(0x136))/0x6*(-parseInt(_0x19ea68(0x138))/0x7)+parseInt(_0x19ea68(0x134))/0x8*(parseInt(_0x19ea68(0x137))/0x9)+parseInt(_0x19ea68(0x132))/0xa;if(_0x18d662===_0x43e7b9)break;else _0x513882['push'](_0x513882['shift']());}catch(_0x490826){_0x513882['push'](_0x513882['shift']());}}}(a15_0x4dad,0xd9faa));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x3bc2(_0xacbfbf,_0x216874){_0xacbfbf=_0xacbfbf-0x131;var _0x4dad84=a15_0x4dad();var _0x3bc28e=_0x4dad84[_0xacbfbf];return _0x3bc28e;}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
|