@lovrabet/lovrabet-cli 2.0.13-beta.0 → 2.0.13-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 +3 -3
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a0_0x36333c=a0_0x1ed5;(function(_0x5b9883,_0x562ac4){const _0x4de607=a0_0x1ed5,_0x19d0cf=_0x5b9883();while(!![]){try{const _0x5337c2=parseInt(_0x4de607(0xef))/0x1*(-parseInt(_0x4de607(0x104))/0x2)+-parseInt(_0x4de607(0x107))/0x3*(parseInt(_0x4de607(0xed))/0x4)+-parseInt(_0x4de607(0xf3))/0x5+parseInt(_0x4de607(0xea))/0x6+-parseInt(_0x4de607(0xf9))/0x7+parseInt(_0x4de607(0xf0))/0x8*(-parseInt(_0x4de607(0x102))/0x9)+-parseInt(_0x4de607(0xe2))/0xa*(-parseInt(_0x4de607(0x109))/0xb);if(_0x5337c2===_0x562ac4)break;else _0x19d0cf['push'](_0x19d0cf['shift']());}catch(_0x4ba9f7){_0x19d0cf['push'](_0x19d0cf['shift']());}}}(a0_0x5a5d,0xb1f78));import{jsx as a0_0x4be238}from'react/jsx-runtime';import a0_0xa0aa3 from'meow';import{render}from'ink';import{Help}from'./help.js';function a0_0x5a5d(){const _0x15cbd4=['stderr','14cbFazq','exit','error','386730gjiONB','flags','11GSOZkc','\x20->\x20--','43776490oYKgIt','Unexpected\x20error:','catch','write','help','\x0aCancelled.\x0a',':\x20--','./framework/preparse.js','6079872JXZHrH','ExitPromptError','slice','24ilBJwa','cancelled','95819CSASYI','24uivpzt','input','log','5845940KyhbCG','hint','code','length','Error:\x20','[preparse]\x20','5419722mRWtwC','original','args','exitCode','assign','name','Hint:\x20','ERR_STREAM_DESTROYED','flatMap','3823146uNOkMN'];a0_0x5a5d=function(){return _0x15cbd4;};return a0_0x5a5d();}function a0_0x1ed5(_0x393b12,_0x31b653){_0x393b12=_0x393b12-0xe1;const _0x5a5d53=a0_0x5a5d();let _0x1ed506=_0x5a5d53[_0x393b12];return _0x1ed506;}import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0xa0aa3(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()[a0_0x36333c(0xe4)](handleError);async function main(){try{await run();}catch(_0x40ea63){handleError(_0x40ea63);}}async function run(){const _0x1043ef=a0_0x36333c;let _0x208b6b=cli['input'][0x0],_0x2029ff=cli[_0x1043ef(0xf1)][0x1];const _0x185022=cli[_0x1043ef(0x108)];try{const {correctFlags:_0x5c4736}=await import(_0x1043ef(0xe9)),_0x4dfe63=getAllDefinitions()[_0x1043ef(0x101)](_0x2a6024=>_0x2a6024[_0x1043ef(0x108)]??[]),{flags:_0x32ed69,corrections:_0xfbe9cc}=_0x5c4736(_0x185022,_0x4dfe63);if(_0xfbe9cc[_0x1043ef(0xf6)]>0x0){for(const _0x10d78c of _0xfbe9cc){process[_0x1043ef(0x103)][_0x1043ef(0xe5)](_0x1043ef(0xf8)+_0x10d78c['handler']+_0x1043ef(0xe8)+_0x10d78c[_0x1043ef(0xfa)]+_0x1043ef(0xe1)+_0x10d78c['corrected']+'\x0a');}Object[_0x1043ef(0xfd)](_0x185022,_0x32ed69);}}catch{}if(!_0x208b6b||!isKnownService(_0x208b6b)){const {waitUntilExit:_0x143fe5}=render(a0_0x4be238(Help,{}));await _0x143fe5();return;}const _0x5254e8=getServiceEntry(_0x208b6b);if(!_0x2029ff){if(_0x185022[_0x1043ef(0xe6)]){console[_0x1043ef(0xf2)](generateServiceHelp(_0x208b6b));return;}if(_0x5254e8['defaultCommand'])_0x2029ff=_0x5254e8['defaultCommand'];else{console[_0x1043ef(0xf2)](generateServiceHelp(_0x208b6b));return;}}const _0x52f454=findDefinition(_0x208b6b,_0x2029ff);!_0x52f454&&(console[_0x1043ef(0xf2)](generateServiceHelp(_0x208b6b)),handleError(CliErrors['unknownCommand'](_0x208b6b+'\x20'+_0x2029ff)));if(_0x185022[_0x1043ef(0xe6)]){console['log'](generateCommandHelp(_0x52f454));return;}const _0x1b1f8a=buildConfigFromFlags(_0x185022);await initGlobalEnvironment(_0x1b1f8a);const _0x5dd439=createPipelineEnv(_0x1b1f8a,_0x185022);_0x5dd439[_0x1043ef(0xfb)]=cli[_0x1043ef(0xf1)][_0x1043ef(0xec)](0x2),await runCommand(_0x52f454,_0x5dd439);}function handleError(_0x323653){const _0x323681=a0_0x36333c;if(_0x323653 instanceof CliError){_0x323653['code']===_0x323681(0xee)&&(process[_0x323681(0x103)][_0x323681(0xe5)](_0x323681(0xe7)),process[_0x323681(0x105)](0x0));console['error'](_0x323681(0xf7)+_0x323653['message']);if(_0x323653[_0x323681(0xf4)])console[_0x323681(0x106)](_0x323681(0xff)+_0x323653[_0x323681(0xf4)]);process[_0x323681(0x105)](_0x323653[_0x323681(0xfc)]);}isUserCancellation(_0x323653)&&(process[_0x323681(0x103)][_0x323681(0xe5)](_0x323681(0xe7)),process[_0x323681(0x105)](0x0)),console[_0x323681(0x106)](_0x323681(0xe3),_0x323653),process[_0x323681(0x105)](0x1);}function isUserCancellation(_0x541acb){const _0x164002=a0_0x36333c;if(!(_0x541acb instanceof Error))return![];if(_0x541acb[_0x164002(0xfe)]===_0x164002(0xeb))return!![];if(_0x541acb[_0x164002(0xf5)]==='ERR_USE_AFTER_CLOSE')return!![];if(_0x541acb['code']===_0x164002(0x100))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a1_0x4614(_0x1296ec,_0x4740c0){_0x1296ec=_0x1296ec-0x1d6;const _0x2e2710=a1_0x2e27();let _0x46147d=_0x2e2710[_0x1296ec];return _0x46147d;}(function(_0x49da7e,_0xd2e389){const _0x1d8c0a=a1_0x4614,_0x257f4e=_0x49da7e();while(!![]){try{const _0x2f5c3f=parseInt(_0x1d8c0a(0x1df))/0x1+-parseInt(_0x1d8c0a(0x1e4))/0x2*(-parseInt(_0x1d8c0a(0x1e2))/0x3)+parseInt(_0x1d8c0a(0x1d9))/0x4*(-parseInt(_0x1d8c0a(0x1dc))/0x5)+parseInt(_0x1d8c0a(0x1d7))/0x6*(-parseInt(_0x1d8c0a(0x1db))/0x7)+-parseInt(_0x1d8c0a(0x1e3))/0x8*(parseInt(_0x1d8c0a(0x1eb))/0x9)+parseInt(_0x1d8c0a(0x1f3))/0xa+parseInt(_0x1d8c0a(0x1ef))/0xb;if(_0x2f5c3f===_0xd2e389)break;else _0x257f4e['push'](_0x257f4e['shift']());}catch(_0x2ab502){_0x257f4e['push'](_0x257f4e['shift']());}}}(a1_0x2e27,0xa654a));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';function a1_0x2e27(){const _0x1759e8=['244OPWruI','homeDirName','3213EWBfRZ','68455nEoMKz','digest','cache','50782ZhwHHa','appCode','trim','3WhYbxg','8kFzVPr','1088042aISbkr','sha256','find','code','.tmp','update','parse','5387022qWWRjO','isArray','utf8','EPERM','14830123MCBLuk','stringify','items','slice','12221950QfrYvz','appName','my-apps.json','13728ZzIEFy','EXDEV'];a1_0x2e27=function(){return _0x1759e8;};return a1_0x2e27();}export function fingerprintAccessKey(_0x19ca61){const _0x25fc10=a1_0x4614,_0x30f9ae=_0x19ca61['trim'](),_0x19b212=_0x30f9ae[_0x25fc10(0x1f2)](-0x6)||'unknown',_0x494841=createHash(_0x25fc10(0x1e5))[_0x25fc10(0x1e9)](_0x30f9ae)[_0x25fc10(0x1dd)]('hex')[_0x25fc10(0x1f2)](0x0,0xc);return'ak_'+_0x19b212+'_'+_0x494841;}export function getAppCacheFilePath(_0x5d30d1,_0x10ec64){const _0x7f2864=a1_0x4614;return resolve(homedir(),PRODUCT_CONFIG[_0x7f2864(0x1da)],_0x7f2864(0x1de),_0x5d30d1,fingerprintAccessKey(_0x10ec64),_0x7f2864(0x1d6));}export function readCachedAppList(_0x294ba2,_0x3eaf17){const _0x2b9d9d=a1_0x4614;if(!_0x3eaf17?.[_0x2b9d9d(0x1e1)]())return null;const _0x2bf4f8=getAppCacheFilePath(_0x294ba2,_0x3eaf17);if(!existsSync(_0x2bf4f8))return null;try{const _0x9efc74=readFileSync(_0x2bf4f8,_0x2b9d9d(0x1ed));if(!_0x9efc74[_0x2b9d9d(0x1e1)]())return null;const _0x5aa312=JSON[_0x2b9d9d(0x1ea)](_0x9efc74);if(!Array[_0x2b9d9d(0x1ec)](_0x5aa312[_0x2b9d9d(0x1f1)]))return null;return _0x5aa312;}catch{return null;}}export function writeCachedAppList(_0x4d18df,_0x209865,_0x2eb997){const _0x3b94b2=a1_0x4614,_0x389827=getAppCacheFilePath(_0x4d18df,_0x209865),_0x4d54c8=dirname(_0x389827);!existsSync(_0x4d54c8)&&mkdirSync(_0x4d54c8,{'recursive':!![]});const _0x3ec856=_0x389827+_0x3b94b2(0x1e8);try{writeFileSync(_0x3ec856,JSON[_0x3b94b2(0x1f0)](_0x2eb997,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x3ec856,_0x389827);}catch(_0xd452d6){if(_0xd452d6[_0x3b94b2(0x1e7)]===_0x3b94b2(0x1ee)||_0xd452d6[_0x3b94b2(0x1e7)]===_0x3b94b2(0x1d8)||_0xd452d6[_0x3b94b2(0x1e7)]==='EACCES'){writeFileSync(_0x389827,JSON[_0x3b94b2(0x1f0)](_0x2eb997,null,0x2)+'\x0a',{'encoding':_0x3b94b2(0x1ed)});try{unlinkSync(_0x3ec856);}catch{}}else throw _0xd452d6;}}catch(_0x582cd0){try{unlinkSync(_0x3ec856);}catch{}throw _0x582cd0;}return _0x389827;}export function resolveCachedAppCode(_0x15889b,_0x3a9553,_0x415b9c){const _0x4ce275=a1_0x4614;if(!_0x15889b)return undefined;const _0x434819=readCachedAppList(_0x3a9553,_0x415b9c),_0x1fc73c=_0x434819?.[_0x4ce275(0x1f1)][_0x4ce275(0x1e6)](_0x1029a3=>_0x1029a3[_0x4ce275(0x1f4)]===_0x15889b);return _0x1fc73c?.[_0x4ce275(0x1e0)]?.[_0x4ce275(0x1e1)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x5404e4=a2_0x1152;(function(_0x146f19,_0x4947f7){const _0x37f823=a2_0x1152,_0x509f9d=_0x146f19();while(!![]){try{const _0x230ce1=parseInt(_0x37f823(0xf1))/0x1+-parseInt(_0x37f823(0xe4))/0x2*(-parseInt(_0x37f823(0x11a))/0x3)+parseInt(_0x37f823(0x112))/0x4*(-parseInt(_0x37f823(0x11d))/0x5)+parseInt(_0x37f823(0x109))/0x6+-parseInt(_0x37f823(0xe9))/0x7*(-parseInt(_0x37f823(0x11f))/0x8)+parseInt(_0x37f823(0xd3))/0x9*(-parseInt(_0x37f823(0x10e))/0xa)+-parseInt(_0x37f823(0x10a))/0xb;if(_0x230ce1===_0x4947f7)break;else _0x509f9d['push'](_0x509f9d['shift']());}catch(_0x157df8){_0x509f9d['push'](_0x509f9d['shift']());}}}(a2_0x1ecc,0xeeb03));import{CliErrors}from'../../errors.js';function a2_0x1152(_0x2f6b22,_0x350e83){_0x2f6b22=_0x2f6b22-0xc9;const _0x1ecc95=a2_0x1ecc();let _0x11526a=_0x1ecc95[_0x2f6b22];return _0x11526a;}import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':a2_0x5404e4(0x11e),'type':a2_0x5404e4(0x102),'description':a2_0x5404e4(0xf7),'default':![]};function collectFlags(_0x121cef,_0x468059){const _0x50bd40=a2_0x5404e4,_0x1fee1c={};for(const _0xdf205a of _0x468059){const _0xbda264=_0xdf205a[_0x50bd40(0x115)]==='boolean'?_0x121cef[_0x50bd40(0xd6)](_0xdf205a[_0x50bd40(0xe0)]):_0x121cef[_0x50bd40(0xca)](_0xdf205a['name']);if(_0xbda264!==''&&_0xbda264!==![])_0x1fee1c[_0xdf205a[_0x50bd40(0xe0)]]=_0xbda264;}if(_0x121cef[_0x50bd40(0x121)])_0x1fee1c[_0x50bd40(0x121)]=!![];return _0x1fee1c;}function normalizeLanguages(_0xcca0b1){const _0x6a923a=a2_0x5404e4;if(!Array[_0x6a923a(0x103)](_0xcca0b1))return[];return _0xcca0b1[_0x6a923a(0x110)](_0x8641b9=>typeof _0x8641b9==='string')[_0x6a923a(0x119)](_0x2a644b=>_0x2a644b[_0x6a923a(0x118)]())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x333c5e){const _0x38501b=a2_0x5404e4,_0x1a52ce=normalizeLanguages(_0x333c5e[_0x38501b(0xd5)]?.[_0x38501b(0xe8)]);return{'enableI18n':typeof _0x333c5e[_0x38501b(0x113)]===_0x38501b(0x102)?_0x333c5e[_0x38501b(0x113)]:null,'languages':_0x1a52ce,'i18nInfo':_0x333c5e[_0x38501b(0xd5)]?{..._0x333c5e[_0x38501b(0xd5)],'langs':_0x1a52ce['length']?_0x1a52ce:null}:null};}function a2_0x1ecc(){const _0x4aa1a9=['use','source','Use\x20`','accessKey','No\x20apps\x20found\x20on\x20the\x20platform.','name','No\x20cached\x20apps\x20found.','cache','Set\x20the\x20fallback\x20app\x20candidate','150326GaSqVE','project-default','appcode','list','langs','580013fVxfSP','read','../../commands/app/remote-source.js','fetchedAt','Remote\x20app\x20name\x20to\x20activate','items','Loaded\x20','\x20app(s)\x20for\x20env=\x22','1502376BfilPa','Usage:\x20','raw','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','validation','../../context.js','Use\x20global\x20config\x20scope','join','.appcode\x20to\x20.lovrabet.json.','find','args','import','Filter\x20by\x20environment\x20(default:\x20current\x20env)','string','length','Initialize\x20','no-cache','boolean','isArray','defaultApp','write','isCurrent','\x22\x20not\x20found.','entries','5276292abVKZa','15789906LeKhXD','pull','local','appCode','50uquziY','newConfigFileName','filter','Refreshed\x20app\x20cache\x20with\x20','244RtINWk','enableI18n','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','type','\x20app\x20use\x20<name>\x20[--global]','app','trim','map','57EItEbK','\x20config\x20file','Read\x20from\x20local\x20cache\x20only','149215oCfSZA','global','152qqevUj','mergedCli','nonInteractive','Read\x20app\x20list\x20from\x20local\x20cache\x20only','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','production','str','from','Missing\x20app\x20name.','../../commands/app/cache.js','remote','push','appName','App\x20\x22','appPublishStatus','2071152wqoeFj','cachePath','i18nInfo','bool','env','\x20cached\x20app(s)\x20for\x20env=\x22','envName','Target\x20environment\x20(default:\x20current\x20env)'];a2_0x1ecc=function(){return _0x4aa1a9;};return a2_0x1ecc();}const initDef={'service':a2_0x5404e4(0x117),'command':'init','description':a2_0x5404e4(0x100)+PRODUCT_CONFIG[a2_0x5404e4(0x10f)]+a2_0x5404e4(0x11b),'risk':a2_0x5404e4(0x105),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x9c5ad3){return await runInit(collectFlags(_0x9c5ad3,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x5404e4(0x117),'command':a2_0x5404e4(0xe7),'description':a2_0x5404e4(0x123),'risk':a2_0x5404e4(0xea),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x5404e4(0xd7),'type':a2_0x5404e4(0xfe),'description':a2_0x5404e4(0xfd),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x5404e4(0x102),'description':a2_0x5404e4(0x122),'default':![]},{'name':'no-cache','type':'boolean','description':a2_0x5404e4(0x114),'default':![]}],async 'execute'(_0x2e8027){const _0x3a3d7d=a2_0x5404e4,_0x2f17ca=_0x2e8027[_0x3a3d7d(0xca)](_0x3a3d7d(0xd7))||_0x2e8027[_0x3a3d7d(0xd9)]||getEnv()||_0x3a3d7d(0xc9),_0x4d883e=_0x2e8027[_0x3a3d7d(0xd6)](_0x3a3d7d(0x10c)),_0x42ee77=_0x2e8027['bool'](_0x3a3d7d(0x101)),{readRawConfigWithLayers:_0x24b795,resolveDefaultAppSource:_0x3a896c,getLocalAppAliases:_0x126635}=await import(_0x3a3d7d(0xf6)),{getRemoteAppList:_0x2983f1}=await import(_0x3a3d7d(0xeb)),{config:_0x43f3e9,layers:_0x2a2acd}=_0x24b795(),_0x231395=_0x3a896c(_0x2a2acd),{defaultApp:_0x2f577c}=_0x43f3e9,_0x28477e=await _0x2983f1({'env':_0x2f17ca,'accessKey':_0x2e8027[_0x3a3d7d(0xde)],'localOnly':_0x4d883e,'noCache':_0x42ee77}),_0x489bf4=_0x28477e['items'][_0x3a3d7d(0x119)](_0x58bd7a=>{const _0x88cca2=_0x3a3d7d;return{'name':_0x58bd7a[_0x88cca2(0xd0)],'appcode':_0x58bd7a[_0x88cca2(0x10d)],'named':!![],'definedIn':_0x88cca2(0xce),'isDefault':_0x58bd7a[_0x88cca2(0xd0)]===_0x2f577c,...buildAppProfileListFields(_0x2f17ca),...buildRemoteAppI18nFields(_0x58bd7a),'source':_0x28477e[_0x88cca2(0xdc)],'owner':_0x58bd7a['appOwnerName']??null,'status':_0x58bd7a[_0x88cca2(0xd2)]??null,'cachedAt':_0x28477e[_0x88cca2(0xec)]};}),_0x5e4e14=_0x126635(_0x43f3e9);let _0x33abbb=0x0;for(const [_0x3fc388,_0xcedb71]of Object[_0x3a3d7d(0x108)](_0x5e4e14)){const _0x416c6c=typeof _0xcedb71[_0x3a3d7d(0xe6)]===_0x3a3d7d(0xfe)?_0xcedb71[_0x3a3d7d(0xe6)][_0x3a3d7d(0x118)]():'';if(!_0x416c6c)continue;_0x33abbb+=0x1,_0x489bf4[_0x3a3d7d(0xcf)]({'name':_0x3fc388,'appcode':_0x416c6c,'named':!![],'definedIn':_0x3a3d7d(0x10c),'isDefault':_0x3fc388===_0x2f577c,...buildAppProfileListFields(_0x2f17ca),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x489bf4,_0x2e8027[_0x3a3d7d(0x120)]);if(_0x489bf4[_0x3a3d7d(0xff)]===0x0)return{'ok':!![],'data':[],'message':_0x28477e['source']===_0x3a3d7d(0xe2)?_0x3a3d7d(0xe1):_0x3a3d7d(0xdf)};const _0x511da2=_0x489bf4[_0x3a3d7d(0xfa)](_0x3969a6=>_0x3969a6[_0x3a3d7d(0x106)]===!![]),_0x36dc93=_0x2f577c??_0x511da2?.[_0x3a3d7d(0xe0)]??null,_0x2bb123={'env':_0x2f17ca,'source':_0x28477e[_0x3a3d7d(0xdc)],'fetchedAt':_0x28477e[_0x3a3d7d(0xec)],'cachePath':_0x28477e['cachePath'],'globalPath':_0x2a2acd['globalPath']??null,'projectPath':_0x2a2acd['projectPath']??null,'defaultApp':_0x36dc93,'defaultAppSource':_0x2f577c!=null?_0x231395:null,'localAliasCount':_0x33abbb};return{'ok':!![],'data':{'items':_0x489bf4,'meta':_0x2bb123}};}},pullDef={'service':a2_0x5404e4(0x117),'command':a2_0x5404e4(0x10b),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a2_0x5404e4(0x105),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x5404e4(0xd7),'type':a2_0x5404e4(0xfe),'description':a2_0x5404e4(0xda),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x5404e4(0x10c),'type':a2_0x5404e4(0x102),'description':a2_0x5404e4(0x11c),'default':![]},{'name':a2_0x5404e4(0x101),'type':a2_0x5404e4(0x102),'description':a2_0x5404e4(0x114),'default':![]}],async 'execute'(_0x4dfc87){const _0x5e6dff=a2_0x5404e4,_0x5cc67f=_0x4dfc87[_0x5e6dff(0xca)](_0x5e6dff(0xd7))||_0x4dfc87['envName']||getEnv()||_0x5e6dff(0xc9),_0x434b2e=_0x4dfc87[_0x5e6dff(0xd6)]('local'),_0x4997c2=_0x4dfc87[_0x5e6dff(0xd6)](_0x5e6dff(0x101)),{getRemoteAppList:_0x1c2e36}=await import(_0x5e6dff(0xeb)),_0x55d959=await _0x1c2e36({'env':_0x5cc67f,'accessKey':_0x4dfc87[_0x5e6dff(0xde)],'localOnly':_0x434b2e,'noCache':_0x4997c2});return{'ok':!![],'data':{'total':_0x55d959['items']['length'],'env':_0x5cc67f,'source':_0x55d959[_0x5e6dff(0xdc)],'fetchedAt':_0x55d959['fetchedAt'],'cachePath':_0x55d959[_0x5e6dff(0xd4)]},'message':_0x55d959[_0x5e6dff(0xdc)]==='cache'?_0x5e6dff(0xef)+_0x55d959[_0x5e6dff(0xee)][_0x5e6dff(0xff)]+_0x5e6dff(0xd8)+_0x5cc67f+'\x22.':_0x5e6dff(0x111)+_0x55d959['items'][_0x5e6dff(0xff)]+_0x5e6dff(0xf0)+_0x5cc67f+'\x22.'};}},useDef={'service':a2_0x5404e4(0x117),'command':a2_0x5404e4(0xdb),'description':a2_0x5404e4(0xe3),'risk':a2_0x5404e4(0x105),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x5404e4(0xe0),'description':a2_0x5404e4(0xed),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x2a6873){const _0x268063=a2_0x5404e4;if(!_0x2a6873[_0x268063(0xfb)][0x0])throw CliErrors['validation'](_0x268063(0xcc),_0x268063(0xf2)+CLI_BIN_NAME+_0x268063(0x116));},async 'execute'(_0x2c996f){const _0x19938c=a2_0x5404e4,_0x3d99dd=_0x2c996f[_0x19938c(0xfb)][0x0];if(!_0x3d99dd)throw CliErrors[_0x19938c(0xf5)]('Missing\x20app\x20name.',_0x19938c(0xf2)+CLI_BIN_NAME+_0x19938c(0x116));const {buildConfigFromFlags:_0x37bb9c,resolveLocalAppAliasCode:_0x39e988}=await import(_0x19938c(0xf6)),{readCachedAppList:_0x2bbd00}=await import(_0x19938c(0xcd)),_0x39ddab=_0x2c996f[_0x19938c(0xca)](_0x19938c(0xd7)),_0x5a4a3a=_0x37bb9c(_0x39ddab?{'env':_0x39ddab}:{}),_0x3df351=_0x2bbd00(_0x5a4a3a[_0x19938c(0xd7)],_0x5a4a3a[_0x19938c(0xde)]),_0x3ce203=_0x3df351?.[_0x19938c(0xee)]['find'](_0x2e11c7=>_0x2e11c7[_0x19938c(0xd0)]===_0x3d99dd),_0x4cdf81=_0x39e988(_0x5a4a3a[_0x19938c(0xf3)]??{},_0x3d99dd);if(!_0x3ce203&&!_0x4cdf81&&_0x5a4a3a[_0x19938c(0x104)]!==_0x3d99dd){const _0x516726=[..._0x3df351?.[_0x19938c(0xee)]['map'](_0x431bcd=>_0x431bcd['appName'])??[]],_0x4776b9=_0x516726[_0x19938c(0xff)]===0x0?_0x19938c(0xdd)+CLI_BIN_NAME+_0x19938c(0xf4)+_0x3d99dd+_0x19938c(0xf9):'Available\x20remote\x20apps:\x20'+Array[_0x19938c(0xcb)](new Set(_0x516726))[_0x19938c(0xf8)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors['validation'](_0x19938c(0xd1)+_0x3d99dd+_0x19938c(0x107),_0x4776b9);}const _0x521acb=_0x2c996f['bool'](_0x19938c(0x11e));let _0x4926ff;if(_0x521acb)_0x4926ff={'global':!![]};else{const {isInProject:_0x3dfeeb}=await import(_0x19938c(0xf6)),_0x51f98a=_0x3dfeeb();_0x4926ff=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x19938c(0xe5),'inProject':_0x51f98a}));}const _0x517be8=readConfig(_0x4926ff);return _0x517be8[_0x19938c(0x104)]=_0x3d99dd,writeConfig(_0x517be8,_0x4926ff),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0x3d99dd+'\x22'+scopeLabel(_0x4926ff)+'.'};}},importDef={'service':a2_0x5404e4(0x117),'command':a2_0x5404e4(0xfc),'description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x1a4ddf){return await runInitImport(collectFlags(_0x1a4ddf,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a2_0x2e8c87=a2_0x5d1e;(function(_0x456a2b,_0xfdaabe){const _0x23fb35=a2_0x5d1e,_0x56503f=_0x456a2b();while(!![]){try{const _0x3486cf=-parseInt(_0x23fb35(0x13f))/0x1+-parseInt(_0x23fb35(0x118))/0x2*(-parseInt(_0x23fb35(0x109))/0x3)+-parseInt(_0x23fb35(0x13c))/0x4+parseInt(_0x23fb35(0xf5))/0x5+parseInt(_0x23fb35(0x105))/0x6+-parseInt(_0x23fb35(0x148))/0x7*(parseInt(_0x23fb35(0x128))/0x8)+-parseInt(_0x23fb35(0x10e))/0x9;if(_0x3486cf===_0xfdaabe)break;else _0x56503f['push'](_0x56503f['shift']());}catch(_0x1c5a84){_0x56503f['push'](_0x56503f['shift']());}}}(a2_0xf2aa,0x6b6fb));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';function a2_0xf2aa(){const _0x3556e1=['Set\x20the\x20fallback\x20app\x20candidate','entries','isCurrent','appPublishStatus','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','global','3021246MslwmJ','length','init','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','188523EkGipu','str','no-cache','No\x20cached\x20apps\x20found.','type','728334ffCtnB','enableI18n','name','Initialize\x20','projectPath','.appcode\x20to\x20.lovrabet.json.','\x20app(s)\x20for\x20env=\x22','Usage:\x20','boolean','from','26pnKtav','Missing\x20app\x20name.','appcode','join','Use\x20global\x20config\x20scope','Target\x20environment\x20(default:\x20current\x20env)','cache','config','map','langs','newConfigFileName','project-default','Default\x20app\x20candidate\x20set\x20to\x20\x22','Remote\x20app\x20name\x20to\x20activate','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','i18nInfo','2324880RErGis','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','app','use','Refreshed\x20app\x20cache\x20with\x20','\x20app\x20use\x20<name>\x20[--global]','filter','push','local','../../commands/app/cache.js','bool','string','cachePath','../../context.js','Available\x20remote\x20apps:\x20','args','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','No\x20apps\x20found\x20on\x20the\x20platform.','items','production','2900980kDgsKJ','fetchedAt','validation','63132RBTAJv','pull','list','remote','../../commands/app/remote-source.js','source','Loaded\x20','write','appName','7eIherF','import','accessKey','defaultApp','1397490jdLpjd','env','\x20cached\x20app(s)\x20for\x20env=\x22','find','appOwnerName','Read\x20app\x20list\x20from\x20local\x20cache\x20only','\x20config\x20file','envName','globalPath','raw'];a2_0xf2aa=function(){return _0x3556e1;};return a2_0xf2aa();}import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':a2_0x2e8c87(0x104),'type':a2_0x2e8c87(0x116),'description':a2_0x2e8c87(0x11c),'default':![]};function collectFlags(_0xe54fec,_0x13a06e){const _0x3117e4=a2_0x2e8c87,_0x24295c={};for(const _0x1e6a48 of _0x13a06e){const _0x3e882d=_0x1e6a48[_0x3117e4(0x10d)]==='boolean'?_0xe54fec['bool'](_0x1e6a48[_0x3117e4(0x110)]):_0xe54fec[_0x3117e4(0x10a)](_0x1e6a48[_0x3117e4(0x110)]);if(_0x3e882d!==''&&_0x3e882d!==![])_0x24295c[_0x1e6a48[_0x3117e4(0x110)]]=_0x3e882d;}if(_0xe54fec['nonInteractive'])_0x24295c['nonInteractive']=!![];return _0x24295c;}function normalizeLanguages(_0x1ca1d6){const _0x2bccbd=a2_0x2e8c87;if(!Array['isArray'](_0x1ca1d6))return[];return _0x1ca1d6['filter'](_0x790b54=>typeof _0x790b54===_0x2bccbd(0x133))[_0x2bccbd(0x120)](_0xb09ac3=>_0xb09ac3['trim']())[_0x2bccbd(0x12e)](Boolean);}function a2_0x5d1e(_0xa1a8e1,_0x2e7ac4){_0xa1a8e1=_0xa1a8e1-0xf3;const _0xf2aa9b=a2_0xf2aa();let _0x5d1e36=_0xf2aa9b[_0xa1a8e1];return _0x5d1e36;}function buildRemoteAppI18nFields(_0x3f7c2c){const _0x42a277=a2_0x2e8c87,_0x522302=normalizeLanguages(_0x3f7c2c[_0x42a277(0x127)]?.[_0x42a277(0x121)]);return{'enableI18n':typeof _0x3f7c2c['enableI18n']===_0x42a277(0x116)?_0x3f7c2c[_0x42a277(0x10f)]:null,'languages':_0x522302,'i18nInfo':_0x3f7c2c[_0x42a277(0x127)]?{..._0x3f7c2c[_0x42a277(0x127)],'langs':_0x522302[_0x42a277(0x106)]?_0x522302:null}:null};}const initDef={'service':a2_0x2e8c87(0x12a),'command':a2_0x2e8c87(0x107),'description':a2_0x2e8c87(0x111)+PRODUCT_CONFIG[a2_0x2e8c87(0x122)]+a2_0x2e8c87(0xfb),'risk':a2_0x2e8c87(0x146),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x460ac6){return await runInit(collectFlags(_0x460ac6,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x2e8c87(0x12a),'command':a2_0x2e8c87(0x141),'description':a2_0x2e8c87(0x108),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x2e8c87(0xf6),'type':a2_0x2e8c87(0x133),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x2e8c87(0x116),'description':a2_0x2e8c87(0xfa),'default':![]},{'name':a2_0x2e8c87(0x10b),'type':a2_0x2e8c87(0x116),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x9e4bd5){const _0x1f56da=a2_0x2e8c87,_0xcfdf21=_0x9e4bd5[_0x1f56da(0x10a)](_0x1f56da(0xf6))||_0x9e4bd5[_0x1f56da(0xfc)]||getEnv()||'production',_0xed7c3e=_0x9e4bd5[_0x1f56da(0x132)]('local'),_0x547398=_0x9e4bd5[_0x1f56da(0x132)](_0x1f56da(0x10b)),{readRawConfigWithLayers:_0x17ac8a,resolveDefaultAppSource:_0x512061,getLocalAppAliases:_0x3ab101}=await import('../../context.js'),{getRemoteAppList:_0x10c4fe}=await import(_0x1f56da(0x143)),{config:_0x1a3601,layers:_0x505f78}=_0x17ac8a(),_0x1654e6=_0x512061(_0x505f78),{defaultApp:_0x420ea8}=_0x1a3601,_0x330511=await _0x10c4fe({'env':_0xcfdf21,'accessKey':_0x9e4bd5[_0x1f56da(0xf3)],'localOnly':_0xed7c3e,'noCache':_0x547398}),_0x583628=_0x330511[_0x1f56da(0x13a)][_0x1f56da(0x120)](_0x15480a=>{const _0x2c02f1=_0x1f56da;return{'name':_0x15480a['appName'],'appcode':_0x15480a['appCode'],'named':!![],'definedIn':_0x2c02f1(0x142),'isDefault':_0x15480a[_0x2c02f1(0x147)]===_0x420ea8,...buildAppProfileListFields(_0xcfdf21),...buildRemoteAppI18nFields(_0x15480a),'source':_0x330511[_0x2c02f1(0x144)],'owner':_0x15480a[_0x2c02f1(0xf9)]??null,'status':_0x15480a[_0x2c02f1(0x102)]??null,'cachedAt':_0x330511[_0x2c02f1(0x13d)]};}),_0x24143f=_0x3ab101(_0x1a3601);let _0x2f816f=0x0;for(const [_0x2ec479,_0x22b009]of Object[_0x1f56da(0x100)](_0x24143f)){const _0x5b80bc=typeof _0x22b009[_0x1f56da(0x11a)]===_0x1f56da(0x133)?_0x22b009['appcode']['trim']():'';if(!_0x5b80bc)continue;_0x2f816f+=0x1,_0x583628[_0x1f56da(0x12f)]({'name':_0x2ec479,'appcode':_0x5b80bc,'named':!![],'definedIn':'local','isDefault':_0x2ec479===_0x420ea8,...buildAppProfileListFields(_0xcfdf21),'source':_0x1f56da(0x11f),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x583628,_0x9e4bd5['mergedCli']);if(_0x583628['length']===0x0)return{'ok':!![],'data':[],'message':_0x330511[_0x1f56da(0x144)]===_0x1f56da(0x11e)?_0x1f56da(0x10c):_0x1f56da(0x139)};const _0x5635fc=_0x583628[_0x1f56da(0xf8)](_0x52ceae=>_0x52ceae[_0x1f56da(0x101)]===!![]),_0x352e25=_0x420ea8??_0x5635fc?.[_0x1f56da(0x110)]??null,_0x505f0c={'env':_0xcfdf21,'source':_0x330511[_0x1f56da(0x144)],'fetchedAt':_0x330511[_0x1f56da(0x13d)],'cachePath':_0x330511['cachePath'],'globalPath':_0x505f78[_0x1f56da(0xfd)]??null,'projectPath':_0x505f78[_0x1f56da(0x112)]??null,'defaultApp':_0x352e25,'defaultAppSource':_0x420ea8!=null?_0x1654e6:null,'localAliasCount':_0x2f816f};return{'ok':!![],'data':{'items':_0x583628,'meta':_0x505f0c}};}},pullDef={'service':a2_0x2e8c87(0x12a),'command':a2_0x2e8c87(0x140),'description':a2_0x2e8c87(0x126),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x2e8c87(0xf6),'type':a2_0x2e8c87(0x133),'description':a2_0x2e8c87(0x11d),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x2e8c87(0x130),'type':a2_0x2e8c87(0x116),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':'no-cache','type':'boolean','description':a2_0x2e8c87(0x138),'default':![]}],async 'execute'(_0x2faf77){const _0x1c30e4=a2_0x2e8c87,_0x4f89b8=_0x2faf77['str'](_0x1c30e4(0xf6))||_0x2faf77[_0x1c30e4(0xfc)]||getEnv()||_0x1c30e4(0x13b),_0x1a2f8e=_0x2faf77['bool'](_0x1c30e4(0x130)),_0x558e48=_0x2faf77[_0x1c30e4(0x132)]('no-cache'),{getRemoteAppList:_0x56b699}=await import(_0x1c30e4(0x143)),_0x5ae399=await _0x56b699({'env':_0x4f89b8,'accessKey':_0x2faf77[_0x1c30e4(0xf3)],'localOnly':_0x1a2f8e,'noCache':_0x558e48});return{'ok':!![],'data':{'total':_0x5ae399[_0x1c30e4(0x13a)][_0x1c30e4(0x106)],'env':_0x4f89b8,'source':_0x5ae399[_0x1c30e4(0x144)],'fetchedAt':_0x5ae399[_0x1c30e4(0x13d)],'cachePath':_0x5ae399[_0x1c30e4(0x134)]},'message':_0x5ae399[_0x1c30e4(0x144)]===_0x1c30e4(0x11e)?_0x1c30e4(0x145)+_0x5ae399[_0x1c30e4(0x13a)][_0x1c30e4(0x106)]+_0x1c30e4(0xf7)+_0x4f89b8+'\x22.':_0x1c30e4(0x12c)+_0x5ae399[_0x1c30e4(0x13a)][_0x1c30e4(0x106)]+_0x1c30e4(0x114)+_0x4f89b8+'\x22.'};}},useDef={'service':'app','command':a2_0x2e8c87(0x12b),'description':a2_0x2e8c87(0xff),'risk':a2_0x2e8c87(0x146),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x2e8c87(0x110),'description':a2_0x2e8c87(0x125),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x27ad05){const _0x4176e2=a2_0x2e8c87;if(!_0x27ad05['args'][0x0])throw CliErrors[_0x4176e2(0x13e)](_0x4176e2(0x119),_0x4176e2(0x115)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');},async 'execute'(_0x1a4c96){const _0x13486d=a2_0x2e8c87,_0x87ce52=_0x1a4c96[_0x13486d(0x137)][0x0];if(!_0x87ce52)throw CliErrors[_0x13486d(0x13e)](_0x13486d(0x119),'Usage:\x20'+CLI_BIN_NAME+_0x13486d(0x12d));const {buildConfigFromFlags:_0x48db10,resolveLocalAppAliasCode:_0x343617}=await import(_0x13486d(0x135)),{readCachedAppList:_0x528288}=await import(_0x13486d(0x131)),_0x32a676=_0x1a4c96[_0x13486d(0x10a)]('env'),_0x4e6000=_0x48db10(_0x32a676?{'env':_0x32a676}:{}),_0x4caf84=_0x528288(_0x4e6000['env'],_0x4e6000[_0x13486d(0xf3)]),_0x96a556=_0x4caf84?.[_0x13486d(0x13a)][_0x13486d(0xf8)](_0x302229=>_0x302229[_0x13486d(0x147)]===_0x87ce52),_0xec37d2=_0x343617(_0x4e6000[_0x13486d(0xfe)]??{},_0x87ce52);if(!_0x96a556&&!_0xec37d2&&_0x4e6000[_0x13486d(0xf4)]!==_0x87ce52){const _0x823be8=[..._0x4caf84?.[_0x13486d(0x13a)]['map'](_0x5d2d19=>_0x5d2d19[_0x13486d(0x147)])??[]],_0x4f1502=_0x823be8['length']===0x0?'Use\x20`'+CLI_BIN_NAME+_0x13486d(0x129)+_0x87ce52+_0x13486d(0x113):_0x13486d(0x136)+Array[_0x13486d(0x117)](new Set(_0x823be8))[_0x13486d(0x11b)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors[_0x13486d(0x13e)]('App\x20\x22'+_0x87ce52+'\x22\x20not\x20found.',_0x4f1502);}const _0x436c4a=_0x1a4c96['bool']('global');let _0x4c3faf;if(_0x436c4a)_0x4c3faf={'global':!![]};else{const {isInProject:_0x4065df}=await import(_0x13486d(0x135)),_0x3483d3=_0x4065df();_0x4c3faf=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x13486d(0x123),'inProject':_0x3483d3}));}const _0x15eeb8=readConfig(_0x4c3faf);return _0x15eeb8[_0x13486d(0xf4)]=_0x87ce52,writeConfig(_0x15eeb8,_0x4c3faf),{'ok':!![],'message':_0x13486d(0x124)+_0x87ce52+'\x22'+scopeLabel(_0x4c3faf)+'.'};}},importDef={'service':a2_0x2e8c87(0x12a),'command':a2_0x2e8c87(0x149),'description':a2_0x2e8c87(0x103),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x5c2239){return await runInitImport(collectFlags(_0x5c2239,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a3_0x235c(){const _0x3bd840=['4257496DgQOos','1735844mtINOz','utf-8','1786506rHrUzm','5qozemb','7198147vKvZAU','10omIqJQ','../../../mock/app-list.json','success','31dPtGRu','25258mNoWGG','1180563tazbKE','errorCode','parse','errorMsg','9rsgtqv','tableData','data','3331790IogJll'];a3_0x235c=function(){return _0x3bd840;};return a3_0x235c();}(function(_0x413ae6,_0x1ec390){const _0x5296c4=a3_0x1414,_0x3d5f59=_0x413ae6();while(!![]){try{const _0x18f63a=parseInt(_0x5296c4(0x13b))/0x1*(parseInt(_0x5296c4(0x13c))/0x2)+parseInt(_0x5296c4(0x13d))/0x3+-parseInt(_0x5296c4(0x133))/0x4+parseInt(_0x5296c4(0x136))/0x5*(parseInt(_0x5296c4(0x135))/0x6)+-parseInt(_0x5296c4(0x131))/0x7+parseInt(_0x5296c4(0x132))/0x8*(-parseInt(_0x5296c4(0x12e))/0x9)+parseInt(_0x5296c4(0x138))/0xa*(parseInt(_0x5296c4(0x137))/0xb);if(_0x18f63a===_0x1ec390)break;else _0x3d5f59['push'](_0x3d5f59['shift']());}catch(_0x351cff){_0x3d5f59['push'](_0x3d5f59['shift']());}}}(a3_0x235c,0x48076));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x16b76c=a3_0x1414,_0x56f9e0=join(__dirname,_0x16b76c(0x139)),_0x8d56d3=readFileSync(_0x56f9e0,_0x16b76c(0x134));return JSON[_0x16b76c(0x12c)](_0x8d56d3);}let _cached=null;function a3_0x1414(_0x220297,_0xcede13){_0x220297=_0x220297-0x12c;const _0x235cc2=a3_0x235c();let _0x14146c=_0x235cc2[_0x220297];return _0x14146c;}export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x3847a6=a3_0x1414,_0x5699a2=getMockAppList();if(!_0x5699a2[_0x3847a6(0x13a)])throw new Error('Mock\x20API\x20error:\x20'+_0x5699a2[_0x3847a6(0x12d)]+'\x20('+_0x5699a2[_0x3847a6(0x13e)]+')');return _0x5699a2[_0x3847a6(0x130)][_0x3847a6(0x12f)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2f1af9,_0x1a9808){const _0x3ddef2=a4_0x37a1,_0x1621e3=_0x2f1af9();while(!![]){try{const _0x3afa5e=-parseInt(_0x3ddef2(0xde))/0x1*(parseInt(_0x3ddef2(0xd9))/0x2)+-parseInt(_0x3ddef2(0xdb))/0x3+-parseInt(_0x3ddef2(0xd3))/0x4+parseInt(_0x3ddef2(0xd4))/0x5*(-parseInt(_0x3ddef2(0xdd))/0x6)+-parseInt(_0x3ddef2(0xd2))/0x7+parseInt(_0x3ddef2(0xe0))/0x8*(parseInt(_0x3ddef2(0xd1))/0x9)+parseInt(_0x3ddef2(0xd7))/0xa;if(_0x3afa5e===_0x1a9808)break;else _0x1621e3['push'](_0x1621e3['shift']());}catch(_0x53566c){_0x1621e3['push'](_0x1621e3['shift']());}}}(a4_0x4ea8,0x3ee3c));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';function a4_0x37a1(_0x5d7d73,_0xfd7d93){_0x5d7d73=_0x5d7d73-0xd0;const _0x4ea89e=a4_0x4ea8();let _0x37a1de=_0x4ea89e[_0x5d7d73];return _0x37a1de;}export function shouldUseMockRemoteApps(){const _0x4315f0=a4_0x37a1,_0x40ea34=(productEnv(_0x4315f0(0xd5))||'')['trim']()[_0x4315f0(0xd8)]();return _0x40ea34===_0x4315f0(0xd6);}function a4_0x4ea8(){const _0x1d97e9=['fetchedAt','26976AsCvgr','cache','trim','toISOString','882fHwNeZ','2217075jLNKLc','457944LZPmLo','10QnNZbV','APP_LIST_SOURCE','mock','12822960fvfAUK','toLowerCase','122106vGYuao','items','93990UVOUQw','remote','1395732LsEjED','7BlUOfP'];a4_0x4ea8=function(){return _0x1d97e9;};return a4_0x4ea8();}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0xa6ae4){const _0x502b02=a4_0x37a1,{env:_0x53bba4,accessKey:_0x3c6ae1,localOnly:localOnly=![],noCache:noCache=![]}=_0xa6ae4,_0x352c1d=readCachedAppList(_0x53bba4,_0x3c6ae1),_0x3c1885=_0x3c6ae1?.['trim']()?getAppCacheFilePath(_0x53bba4,_0x3c6ae1):null;if(localOnly)return{'items':_0x352c1d?.['items']??[],'source':'cache','fetchedAt':_0x352c1d?.[_0x502b02(0xdf)]??null,'cachePath':_0x3c1885};try{const _0x4f10e3=await getRemoteAppItems(),_0x5b21fd=shouldUseMockRemoteApps()?'mock':_0x502b02(0xdc),_0x5f38b3=new Date()[_0x502b02(0xd0)](),_0x10207b=_0x3c6ae1?.[_0x502b02(0xe2)]()?writeCachedAppList(_0x53bba4,_0x3c6ae1,{'env':_0x53bba4,'fetchedAt':_0x5f38b3,'source':_0x5b21fd,'items':_0x4f10e3}):null;return{'items':_0x4f10e3,'source':_0x5b21fd,'fetchedAt':_0x5f38b3,'cachePath':_0x10207b};}catch(_0x4dd778){if(!noCache&&_0x352c1d)return{'items':_0x352c1d[_0x502b02(0xda)],'source':_0x502b02(0xe1),'fetchedAt':_0x352c1d[_0x502b02(0xdf)],'cachePath':_0x3c1885};throw _0x4dd778;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x126426,_0x32889a){const _0x2834c1=a5_0x5b4e,_0x4e3bab=_0x126426();while(!![]){try{const _0x15c572=parseInt(_0x2834c1(0x1c2))/0x1+parseInt(_0x2834c1(0x1d9))/0x2*(-parseInt(_0x2834c1(0x1d5))/0x3)+-parseInt(_0x2834c1(0x1d7))/0x4*(parseInt(_0x2834c1(0x1c9))/0x5)+parseInt(_0x2834c1(0x1d2))/0x6*(-parseInt(_0x2834c1(0x1cd))/0x7)+-parseInt(_0x2834c1(0x1cc))/0x8*(-parseInt(_0x2834c1(0x1d1))/0x9)+-parseInt(_0x2834c1(0x1ca))/0xa+parseInt(_0x2834c1(0x1c3))/0xb;if(_0x15c572===_0x32889a)break;else _0x4e3bab['push'](_0x4e3bab['shift']());}catch(_0x3ed783){_0x4e3bab['push'](_0x4e3bab['shift']());}}}(a5_0xc414,0x8a3f5));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';function a5_0x5b4e(_0x315290,_0xb25f10){_0x315290=_0x315290-0x1c2;const _0xc41494=a5_0xc414();let _0x5b4e7d=_0xc41494[_0x315290];return _0x5b4e7d;}export{CLI_BIN_NAME};function a5_0xc414(){const _0x56821d=['1346820Hsvuym','definedIn','global','15669fFmEYB','isCurrent','93028kYGSJV','project','106wVcsli','496009hUGPpK','23485220WCVwSt','named','defaultApp','currentApp','find','appcode','150TDdetC','855280doAPGM','appCode','104568wpbZOU','35CecWac','name','local','trim','81EwMVFM'];a5_0xc414=function(){return _0x56821d;};return a5_0xc414();}export function enrichAppListItemsWithMergedSelection(_0x2ccbae,_0x48fbd9){const _0x5412de=a5_0x5b4e;if(!_0x48fbd9)return;const _0x42bf1e=!!(_0x48fbd9[_0x5412de(0x1c6)]??_0x48fbd9[_0x5412de(0x1c5)]);for(const _0x4167c1 of _0x2ccbae){_0x4167c1['isCurrent']=![];}const _0x6bc4cf=_0x48fbd9[_0x5412de(0x1cb)]!=null?String(_0x48fbd9[_0x5412de(0x1cb)])[_0x5412de(0x1d0)]():'';if(_0x42bf1e){const _0x11c61f=_0x48fbd9['currentApp']??_0x48fbd9[_0x5412de(0x1c5)];if(_0x11c61f){const _0x19e1dd=_0x2ccbae[_0x5412de(0x1c7)](_0xce3689=>_0xce3689[_0x5412de(0x1c4)]===!![]&&_0xce3689[_0x5412de(0x1ce)]===_0x11c61f&&_0xce3689[_0x5412de(0x1d3)]===_0x5412de(0x1cf)),_0x8b3404=_0x19e1dd??_0x2ccbae[_0x5412de(0x1c7)](_0x50e8ae=>_0x50e8ae[_0x5412de(0x1c4)]===!![]&&_0x50e8ae['name']===_0x11c61f);_0x8b3404&&(_0x8b3404['isCurrent']=!![]);}return;}if(!_0x6bc4cf)return;for(const _0x19fc39 of _0x2ccbae){String(_0x19fc39[_0x5412de(0x1c8)]??'')[_0x5412de(0x1d0)]()===_0x6bc4cf&&(_0x19fc39[_0x5412de(0x1d6)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x342722){const _0x252780=a5_0x5b4e;return formatScopeLabel(_0x342722['global']?_0x252780(0x1d4):_0x252780(0x1d8));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x4efe86=a6_0x3c83;(function(_0x54139a,_0x5b0e27){const _0x2a960b=a6_0x3c83,_0x52e544=_0x54139a();while(!![]){try{const _0x203f32=-parseInt(_0x2a960b(0x1a9))/0x1*(parseInt(_0x2a960b(0x172))/0x2)+parseInt(_0x2a960b(0x1ac))/0x3*(parseInt(_0x2a960b(0x18c))/0x4)+parseInt(_0x2a960b(0x193))/0x5+-parseInt(_0x2a960b(0x187))/0x6+parseInt(_0x2a960b(0x190))/0x7*(-parseInt(_0x2a960b(0x186))/0x8)+-parseInt(_0x2a960b(0x16f))/0x9*(parseInt(_0x2a960b(0x192))/0xa)+parseInt(_0x2a960b(0x163))/0xb*(parseInt(_0x2a960b(0x19c))/0xc);if(_0x203f32===_0x5b0e27)break;else _0x52e544['push'](_0x52e544['shift']());}catch(_0x4c4c35){_0x52e544['push'](_0x52e544['shift']());}}}(a6_0x4c4a,0xeb74b));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a6_0x4c4a(){const _0x366718=['7DvVhJe','Read\x20from\x20global\x20config\x20(default)','90neyBlJ','9242930XjWvLh','length','validation','\x20config.','Missing\x20accessKey.','Clear\x20accessKey\x20from\x20config','project','Tip:\x20you\x20can\x20also\x20run:','Option\x20B:\x20apps\x20config\x20(','24IDVDUN','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','nonInteractive','cancelled','push','\x20\x20export\x20','daily','Then\x20verify\x20with:\x20','repeat','read','AccessKey:\x20','AccessKey\x20cleared\x20from\x20','AccessKey\x20saved\x20to\x20','637cFRGrn','Auth\x20mode:\x20','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','1773156OXQJHp','logout','stdin','Show\x20current\x20authentication\x20status','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','status','\x20config.\x20Nothing\x20to\x20clear.','Auth\x20config\x20reinitialized\x20in\x20','\x20config','env','boolean','write','stdout','3352283XZatbW','Option\x20C:\x20environment\x20variable','access-key','Option\x20A:\x20','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','ACCESS_KEY','str','\x20env\x20var','trim','Clear\x20from\x20global\x20config\x20(default)','\x20Current\x20env:\x20','envName','851418EJfmTO','join','Use\x20`','926hzxcEE','Invalid\x20accessKey\x20format:\x20\x22','\x20auth\x20status','production','test','slice','global','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','development','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','auth','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','newConfigFileName','accessKey','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','bool','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20Verify:\x20','\x20scope.','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','5130184KwzGad','5328882scXWwS','userCenterDisplayName','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','Write\x20to\x20global\x20config\x20(default)','8EBznoN','global-default','string','No\x20AccessKey\x20found\x20in\x20'];a6_0x4c4a=function(){return _0x366718;};return a6_0x4c4a();}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';function a6_0x3c83(_0x2239bf,_0x5c56f0){_0x2239bf=_0x2239bf-0x162;const _0x4c4a58=a6_0x4c4a();let _0x3c8347=_0x4c4a58[_0x2239bf];return _0x3c8347;}import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x36eba5=a6_0x3c83;writeCliSideChannelLine(_0x36eba5(0x179)+PRODUCT_CONFIG[_0x36eba5(0x188)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x36eba5(0x19a)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(){const _0x3209c0=a6_0x3c83;return[_0x3209c0(0x179)+PRODUCT_CONFIG[_0x3209c0(0x188)]+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x3209c0(0x180)][_0x3209c0(0x170)]('\x0a');}function canPromptForAccessKey(_0x287f85){const _0xbfb70a=a6_0x3c83;return!_0x287f85[_0xbfb70a(0x19e)]&&process[_0xbfb70a(0x1ae)]['isTTY']!==![]&&process[_0xbfb70a(0x162)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x599af1){const _0x46a1a6=a6_0x3c83;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x599af1[_0x46a1a6(0x181)]('global'),'explicitProject':_0x599af1[_0x46a1a6(0x181)](_0x46a1a6(0x199)),'policy':_0x46a1a6(0x18d)}));}async function resolveAuthWriteInput(_0x47a169){const _0x49a43f=a6_0x3c83;let _0x579e28=(_0x47a169['str'](_0x49a43f(0x165))||_0x47a169[_0x49a43f(0x169)]('ak')||'')['trim']();const _0x474bae=(_0x47a169[_0x49a43f(0x169)]('env')||'')[_0x49a43f(0x16b)]();if(!_0x579e28&&canPromptForAccessKey(_0x47a169))try{showAccessKeyCreateHint(),_0x579e28=await promptAccessKey('');}catch(_0x1c4e4e){if(isAbortPrompt(_0x1c4e4e))throw CliErrors[_0x49a43f(0x19f)]();throw _0x1c4e4e;}if(!_0x579e28)throw CliErrors[_0x49a43f(0x195)](_0x49a43f(0x197),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x49a43f(0x176)](_0x579e28))throw CliErrors[_0x49a43f(0x195)](_0x49a43f(0x173)+_0x579e28+'\x22',_0x49a43f(0x19d));if(!_0x474bae)return{'accessKey':_0x579e28};const _0x4df959=normalizeEnv(_0x474bae);return{'accessKey':_0x579e28,'env':isDaily(_0x4df959)?_0x49a43f(0x1a2):isDev(_0x4df959)?_0x49a43f(0x17a):_0x49a43f(0x175)};}export const authDefinitions=[{'service':a6_0x4efe86(0x17c),'command':'login','description':a6_0x4efe86(0x167),'risk':a6_0x4efe86(0x1b7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4efe86(0x165),'type':a6_0x4efe86(0x18e),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':'string','description':'Shorthand\x20for\x20--access-key'},{'name':'global','type':'boolean','description':a6_0x4efe86(0x18b),'default':!![]},{'name':a6_0x4efe86(0x199),'type':a6_0x4efe86(0x1b6),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x335ef8){const _0x40442a=a6_0x4efe86;if(_0x335ef8[_0x40442a(0x181)]('yes'))throw CliErrors[_0x40442a(0x195)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x40442a(0x171)+CLI_BIN_NAME+_0x40442a(0x182)+CLI_BIN_NAME+_0x40442a(0x189));const _0x4eea0e=(_0x335ef8['str'](_0x40442a(0x165))||_0x335ef8[_0x40442a(0x169)]('ak')||'')[_0x40442a(0x16b)]();if(!_0x4eea0e&&_0x335ef8['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x5c45ee=await resolveAuthWriteInput(_0x335ef8),_0x133c60=resolveAuthScopeFlags(_0x335ef8),_0x404510=readScopedConfig(_0x133c60);_0x404510['accessKey']=_0x5c45ee[_0x40442a(0x17f)];_0x5c45ee[_0x40442a(0x1b5)]&&(_0x404510['env']=_0x5c45ee[_0x40442a(0x1b5)]);writeScopedConfig(_0x404510,_0x133c60);const _0x1439d9=_0x133c60['global']?_0x40442a(0x178):_0x40442a(0x199),_0x3a7bb4=_0x404510[_0x40442a(0x1b5)]?'\x20Current\x20env:\x20'+_0x404510['env']+'.':'';return{'ok':!![],'message':_0x40442a(0x1a8)+_0x1439d9+_0x40442a(0x196)+_0x3a7bb4+_0x40442a(0x183)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x4efe86(0x17c),'command':'init','description':a6_0x4efe86(0x1b0),'risk':a6_0x4efe86(0x1b7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4efe86(0x165),'type':a6_0x4efe86(0x18e),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a6_0x4efe86(0x18e),'description':'Shorthand\x20for\x20--access-key'},{'name':a6_0x4efe86(0x1b5),'type':a6_0x4efe86(0x18e),'description':a6_0x4efe86(0x18a)},{'name':a6_0x4efe86(0x178),'type':'boolean','description':a6_0x4efe86(0x18b),'default':!![]},{'name':a6_0x4efe86(0x199),'type':a6_0x4efe86(0x1b6),'description':a6_0x4efe86(0x1ab),'default':![]}],async 'execute'(_0x5cd916){const _0x15fe40=a6_0x4efe86,_0x58e555=await resolveAuthWriteInput(_0x5cd916),_0x596499=resolveAuthScopeFlags(_0x5cd916),_0x27ac32={'accessKey':_0x58e555[_0x15fe40(0x17f)]};_0x58e555[_0x15fe40(0x1b5)]&&(_0x27ac32[_0x15fe40(0x1b5)]=_0x58e555[_0x15fe40(0x1b5)]);writeScopedConfig(_0x27ac32,_0x596499);const _0x4df815=_0x596499['global']?_0x15fe40(0x178):_0x15fe40(0x199),_0x350aa6=_0x27ac32[_0x15fe40(0x1b5)]?_0x15fe40(0x16d)+_0x27ac32[_0x15fe40(0x1b5)]+'.':'';return{'ok':!![],'message':_0x15fe40(0x1b3)+_0x4df815+_0x15fe40(0x184)+_0x350aa6+'\x20Verify:\x20'+CLI_BIN_NAME+_0x15fe40(0x174)};}},{'service':'auth','command':a6_0x4efe86(0x1ad),'description':a6_0x4efe86(0x198),'risk':a6_0x4efe86(0x1b7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4efe86(0x178),'type':a6_0x4efe86(0x1b6),'description':a6_0x4efe86(0x16c),'default':!![]},{'name':a6_0x4efe86(0x199),'type':a6_0x4efe86(0x1b6),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0xa90dcd){const _0x964727=a6_0x4efe86,_0x404506=resolveAuthScopeFlags(_0xa90dcd),_0x221bae=readScopedConfig(_0x404506),_0x22b97a=!!_0x221bae[_0x964727(0x17f)];delete _0x221bae[_0x964727(0x17f)],writeScopedConfig(_0x221bae,_0x404506);const _0x54d7a5=_0x404506['global']?'global':_0x964727(0x199);if(_0x22b97a)return{'ok':!![],'message':_0x964727(0x1a7)+_0x54d7a5+_0x964727(0x196)};return{'ok':!![],'message':_0x964727(0x18f)+_0x54d7a5+_0x964727(0x1b2)};}},{'service':'auth','command':a6_0x4efe86(0x1b1),'description':a6_0x4efe86(0x1af),'risk':a6_0x4efe86(0x1a5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':a6_0x4efe86(0x191),'default':!![]},{'name':a6_0x4efe86(0x199),'type':a6_0x4efe86(0x1b6),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x750da7){const _0x1016cd=a6_0x4efe86,_0x362b8f=resolveAuthScopeFlags(_0x750da7),_0x1c634a=readScopedConfig(_0x362b8f),_0x37d87a=productEnvName('ACCESS_KEY'),_0x15125f=productEnv(_0x1016cd(0x168))||undefined,_0x38863d=_0x1c634a[_0x1016cd(0x17f)]||undefined,_0xe6c500=_0x15125f||_0x38863d,_0x46b1d6=_0x15125f?_0x37d87a+_0x1016cd(0x16a):_0x38863d?(_0x362b8f[_0x1016cd(0x178)]?_0x1016cd(0x178):_0x1016cd(0x199))+_0x1016cd(0x1b4):null,_0xcb8a2e=[_0x1016cd(0x1aa)+AUTH_MODE['ClientAk']];if(_0xe6c500){const _0x354e48=_0xe6c500[_0x1016cd(0x194)]>0x8?''+_0xe6c500[_0x1016cd(0x177)](0x0,0x8)+'*'[_0x1016cd(0x1a4)](_0xe6c500[_0x1016cd(0x194)]-0x8):_0xe6c500;_0xcb8a2e[_0x1016cd(0x1a0)](_0x1016cd(0x1a6)+_0x354e48+(_0x46b1d6?'\x20(via\x20'+_0x46b1d6+')':''));}return!_0xe6c500&&(_0xcb8a2e['push'](''),_0xcb8a2e[_0x1016cd(0x1a0)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0xcb8a2e[_0x1016cd(0x1a0)](''),_0xcb8a2e['push'](_0x1016cd(0x166)+CLI_BIN_NAME+_0x1016cd(0x185)),_0xcb8a2e[_0x1016cd(0x1a0)](''),_0xcb8a2e[_0x1016cd(0x1a0)](_0x1016cd(0x19b)+PRODUCT_CONFIG[_0x1016cd(0x17e)]+')'),_0xcb8a2e['push']('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0xcb8a2e[_0x1016cd(0x1a0)](''),_0xcb8a2e[_0x1016cd(0x1a0)](_0x1016cd(0x164)),_0xcb8a2e['push'](_0x1016cd(0x1a1)+_0x37d87a+'=ak_xxx'),_0xcb8a2e[_0x1016cd(0x1a0)](''),_0xcb8a2e['push'](_0x1016cd(0x1a3)+CLI_BIN_NAME+_0x1016cd(0x174)),_0xcb8a2e[_0x1016cd(0x1a0)](_0x1016cd(0x17d)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0xcb8a2e['join']('\x0a')};}},{'service':'auth','command':'info','description':a6_0x4efe86(0x17b),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x177028){const _0xe58dbb=a6_0x4efe86,_0x3eadc8=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x3eadc8,'meta':{'env':_0x177028[_0xe58dbb(0x16e)]??_0xe58dbb(0x175)}}};}}];
|
|
1
|
+
function a6_0xddeb(_0x5857b3,_0x2bb31f){_0x5857b3=_0x5857b3-0x1e3;const _0x5c657f=a6_0x5c65();let _0xddebf8=_0x5c657f[_0x5857b3];return _0xddebf8;}const a6_0x5223a0=a6_0xddeb;(function(_0x5e7cad,_0x55211a){const _0x3bc9f8=a6_0xddeb,_0x42ffbd=_0x5e7cad();while(!![]){try{const _0x55c2d1=-parseInt(_0x3bc9f8(0x239))/0x1+parseInt(_0x3bc9f8(0x1e9))/0x2*(-parseInt(_0x3bc9f8(0x1f0))/0x3)+-parseInt(_0x3bc9f8(0x224))/0x4*(-parseInt(_0x3bc9f8(0x235))/0x5)+parseInt(_0x3bc9f8(0x234))/0x6+parseInt(_0x3bc9f8(0x222))/0x7*(parseInt(_0x3bc9f8(0x213))/0x8)+-parseInt(_0x3bc9f8(0x227))/0x9*(-parseInt(_0x3bc9f8(0x21f))/0xa)+-parseInt(_0x3bc9f8(0x1e7))/0xb;if(_0x55c2d1===_0x55211a)break;else _0x42ffbd['push'](_0x42ffbd['shift']());}catch(_0x511e4c){_0x42ffbd['push'](_0x42ffbd['shift']());}}}(a6_0x5c65,0xb168c));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a6_0x5c65(){const _0x5a6433=['cancelled','Shorthand\x20for\x20--access-key','daily','Invalid\x20accessKey\x20format:\x20\x22','Option\x20B:\x20apps\x20config\x20(','newConfigFileName','Tip:\x20you\x20can\x20also\x20run:','Clear\x20from\x20global\x20config\x20(default)','\x20Current\x20env:\x20','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','AccessKey\x20cleared\x20from\x20','Use\x20`','access-key','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','16uzLena','slice','boolean','No\x20AccessKey\x20found\x20in\x20','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','push','validation','env','stdin','accessKey','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','\x20config','70NtBqWC','userCenterDisplayName','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','1825565rHEYuP','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','553012fXLOhk','AccessKey\x20saved\x20to\x20','info','1711098cMjhxB','development','Auth\x20mode:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','stdout','isTTY','\x20\x20export\x20','=ak_xxx','\x20(via\x20','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Write\x20to\x20global\x20config\x20(default)','Option\x20C:\x20environment\x20variable','str','1568952IOegMv','10OmbYdU','global','length','\x20config.\x20Nothing\x20to\x20clear.','42544rDNCIc','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','trim','AccessKey:\x20','nonInteractive','Read\x20from\x20global\x20config\x20(default)','\x20auth\x20status','yes','Show\x20current\x20authentication\x20status','string','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','13830080npwEyJ','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','72790afQyiq','AccessKey\x20(ak_xxx...)','test','login','status','read','bool','30QDevAm','production','global-default','project','auth','ACCESS_KEY','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Missing\x20accessKey.','Then\x20verify\x20with:\x20','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20Verify:\x20','\x20scope.','ClientAk','logout','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','\x20env\x20var','\x20config.','Auth\x20config\x20reinitialized\x20in\x20','join','write'];a6_0x5c65=function(){return _0x5a6433;};return a6_0x5c65();}import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x279949=a6_0xddeb;writeCliSideChannelLine(_0x279949(0x1e6)+PRODUCT_CONFIG[_0x279949(0x220)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x279949(0x20b)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x279949(0x1fe));}function buildAccessKeySetupGuide(){const _0x574271=a6_0xddeb;return[_0x574271(0x1e6)+PRODUCT_CONFIG[_0x574271(0x220)]+':',USER_ACCESS_KEY_CREATE_URL,_0x574271(0x223)+CLI_BIN_NAME+_0x574271(0x22a)][_0x574271(0x203)]('\x0a');}function canPromptForAccessKey(_0x3e0587){const _0x36906b=a6_0xddeb;return!_0x3e0587[_0x36906b(0x23d)]&&process[_0x36906b(0x21b)][_0x36906b(0x22c)]!==![]&&process[_0x36906b(0x22b)][_0x36906b(0x22c)]!==![];}function resolveAuthScopeFlags(_0x410a70){const _0xbb787d=a6_0xddeb;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x410a70['bool'](_0xbb787d(0x236)),'explicitProject':_0x410a70[_0xbb787d(0x1ef)](_0xbb787d(0x1f3)),'policy':_0xbb787d(0x1f2)}));}async function resolveAuthWriteInput(_0xc083ac){const _0x4c2851=a6_0xddeb;let _0x2727e6=(_0xc083ac[_0x4c2851(0x233)]('access-key')||_0xc083ac[_0x4c2851(0x233)]('ak')||'')[_0x4c2851(0x23b)]();const _0x4435b9=(_0xc083ac[_0x4c2851(0x233)](_0x4c2851(0x21a))||'')[_0x4c2851(0x23b)]();if(!_0x2727e6&&canPromptForAccessKey(_0xc083ac))try{showAccessKeyCreateHint(),_0x2727e6=await promptAccessKey('');}catch(_0x486b25){if(isAbortPrompt(_0x486b25))throw CliErrors[_0x4c2851(0x205)]();throw _0x486b25;}if(!_0x2727e6)throw CliErrors[_0x4c2851(0x219)](_0x4c2851(0x1f7),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x4c2851(0x1eb)](_0x2727e6))throw CliErrors[_0x4c2851(0x219)](_0x4c2851(0x208)+_0x2727e6+'\x22',_0x4c2851(0x1e8));if(!_0x4435b9)return{'accessKey':_0x2727e6};const _0x892fd=normalizeEnv(_0x4435b9);return{'accessKey':_0x2727e6,'env':isDaily(_0x892fd)?_0x4c2851(0x207):isDev(_0x892fd)?_0x4c2851(0x228):'production'};}export const authDefinitions=[{'service':a6_0x5223a0(0x1f4),'command':a6_0x5223a0(0x1ec),'description':a6_0x5223a0(0x230),'risk':a6_0x5223a0(0x204),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x5223a0(0x211),'type':a6_0x5223a0(0x1e5),'description':a6_0x5223a0(0x1ea)},{'name':'ak','type':a6_0x5223a0(0x1e5),'description':a6_0x5223a0(0x206)},{'name':'global','type':a6_0x5223a0(0x215),'description':a6_0x5223a0(0x231),'default':!![]},{'name':'project','type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x5ec7b1){const _0x3c82ad=a6_0x5223a0;if(_0x5ec7b1[_0x3c82ad(0x1ef)](_0x3c82ad(0x1e3)))throw CliErrors['validation']('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x3c82ad(0x210)+CLI_BIN_NAME+_0x3c82ad(0x1f9)+CLI_BIN_NAME+_0x3c82ad(0x1ff));const _0x19dbcc=(_0x5ec7b1['str'](_0x3c82ad(0x211))||_0x5ec7b1[_0x3c82ad(0x233)]('ak')||'')['trim']();if(!_0x19dbcc&&_0x5ec7b1[_0x3c82ad(0x23d)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x454778=await resolveAuthWriteInput(_0x5ec7b1),_0x49b6f8=resolveAuthScopeFlags(_0x5ec7b1),_0x460d25=readScopedConfig(_0x49b6f8);_0x460d25[_0x3c82ad(0x21c)]=_0x454778['accessKey'];_0x454778['env']&&(_0x460d25['env']=_0x454778['env']);writeScopedConfig(_0x460d25,_0x49b6f8);const _0xfe0333=_0x49b6f8['global']?_0x3c82ad(0x236):'project',_0x5683eb=_0x460d25[_0x3c82ad(0x21a)]?_0x3c82ad(0x20d)+_0x460d25[_0x3c82ad(0x21a)]+'.':'';return{'ok':!![],'message':_0x3c82ad(0x225)+_0xfe0333+_0x3c82ad(0x201)+_0x5683eb+'\x20Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x5223a0(0x1f4),'command':'init','description':a6_0x5223a0(0x1f6),'risk':a6_0x5223a0(0x204),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':'string','description':a6_0x5223a0(0x1ea)},{'name':'ak','type':a6_0x5223a0(0x1e5),'description':a6_0x5223a0(0x206)},{'name':a6_0x5223a0(0x21a),'type':a6_0x5223a0(0x1e5),'description':a6_0x5223a0(0x23a)},{'name':a6_0x5223a0(0x236),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x5223a0(0x1f3),'type':'boolean','description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x2f43ec){const _0x34145e=a6_0x5223a0,_0x3139b5=await resolveAuthWriteInput(_0x2f43ec),_0x51204d=resolveAuthScopeFlags(_0x2f43ec),_0x10f1c4={'accessKey':_0x3139b5[_0x34145e(0x21c)]};_0x3139b5[_0x34145e(0x21a)]&&(_0x10f1c4[_0x34145e(0x21a)]=_0x3139b5[_0x34145e(0x21a)]);writeScopedConfig(_0x10f1c4,_0x51204d);const _0x1da3bd=_0x51204d[_0x34145e(0x236)]?_0x34145e(0x236):_0x34145e(0x1f3),_0x5dae93=_0x10f1c4[_0x34145e(0x21a)]?_0x34145e(0x20d)+_0x10f1c4[_0x34145e(0x21a)]+'.':'';return{'ok':!![],'message':_0x34145e(0x202)+_0x1da3bd+_0x34145e(0x1fb)+_0x5dae93+_0x34145e(0x1fa)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x5223a0(0x1f4),'command':a6_0x5223a0(0x1fd),'description':'Clear\x20accessKey\x20from\x20config','risk':a6_0x5223a0(0x204),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x5223a0(0x236),'type':'boolean','description':a6_0x5223a0(0x20c),'default':!![]},{'name':'project','type':a6_0x5223a0(0x215),'description':a6_0x5223a0(0x20e),'default':![]}],async 'execute'(_0x236e35){const _0x1d021f=a6_0x5223a0,_0x2fa6a3=resolveAuthScopeFlags(_0x236e35),_0x1f92ac=readScopedConfig(_0x2fa6a3),_0x7fde05=!!_0x1f92ac[_0x1d021f(0x21c)];delete _0x1f92ac[_0x1d021f(0x21c)],writeScopedConfig(_0x1f92ac,_0x2fa6a3);const _0x14db3a=_0x2fa6a3['global']?_0x1d021f(0x236):_0x1d021f(0x1f3);if(_0x7fde05)return{'ok':!![],'message':_0x1d021f(0x20f)+_0x14db3a+_0x1d021f(0x201)};return{'ok':!![],'message':_0x1d021f(0x216)+_0x14db3a+_0x1d021f(0x238)};}},{'service':a6_0x5223a0(0x1f4),'command':a6_0x5223a0(0x1ed),'description':a6_0x5223a0(0x1e4),'risk':a6_0x5223a0(0x1ee),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a6_0x5223a0(0x215),'description':a6_0x5223a0(0x23e),'default':!![]},{'name':a6_0x5223a0(0x1f3),'type':'boolean','description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3ebb56){const _0x58df4c=a6_0x5223a0,_0x11cb15=resolveAuthScopeFlags(_0x3ebb56),_0x543aab=readScopedConfig(_0x11cb15),_0x15b731=productEnvName('ACCESS_KEY'),_0x12c0d9=productEnv(_0x58df4c(0x1f5))||undefined,_0xa479c5=_0x543aab[_0x58df4c(0x21c)]||undefined,_0x468933=_0x12c0d9||_0xa479c5,_0x18b07c=_0x12c0d9?_0x15b731+_0x58df4c(0x200):_0xa479c5?(_0x11cb15[_0x58df4c(0x236)]?_0x58df4c(0x236):_0x58df4c(0x1f3))+_0x58df4c(0x21e):null,_0x4428fc=[_0x58df4c(0x229)+AUTH_MODE[_0x58df4c(0x1fc)]];if(_0x468933){const _0x172caf=_0x468933[_0x58df4c(0x237)]>0x8?''+_0x468933[_0x58df4c(0x214)](0x0,0x8)+'*'['repeat'](_0x468933['length']-0x8):_0x468933;_0x4428fc[_0x58df4c(0x218)](_0x58df4c(0x23c)+_0x172caf+(_0x18b07c?_0x58df4c(0x22f)+_0x18b07c+')':''));}return!_0x468933&&(_0x4428fc[_0x58df4c(0x218)](''),_0x4428fc[_0x58df4c(0x218)](_0x58df4c(0x217)),_0x4428fc[_0x58df4c(0x218)](''),_0x4428fc[_0x58df4c(0x218)]('Option\x20A:\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x4428fc['push'](''),_0x4428fc[_0x58df4c(0x218)](_0x58df4c(0x209)+PRODUCT_CONFIG[_0x58df4c(0x20a)]+')'),_0x4428fc[_0x58df4c(0x218)](_0x58df4c(0x221)),_0x4428fc[_0x58df4c(0x218)](''),_0x4428fc['push'](_0x58df4c(0x232)),_0x4428fc['push'](_0x58df4c(0x22d)+_0x15b731+_0x58df4c(0x22e)),_0x4428fc['push'](''),_0x4428fc[_0x58df4c(0x218)](_0x58df4c(0x1f8)+CLI_BIN_NAME+_0x58df4c(0x23f)),_0x4428fc[_0x58df4c(0x218)](_0x58df4c(0x21d)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x4428fc[_0x58df4c(0x203)]('\x0a')};}},{'service':a6_0x5223a0(0x1f4),'command':a6_0x5223a0(0x226),'description':a6_0x5223a0(0x212),'risk':a6_0x5223a0(0x1ee),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1cc0fa){const _0x195f95=a6_0x5223a0,_0x230996=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x230996,'meta':{'env':_0x1cc0fa['envName']??_0x195f95(0x1f1)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3dfa5c,_0x5cf17d){const _0x4490a0=a7_0x1bff,_0x298ebf=_0x3dfa5c();while(!![]){try{const _0x1d1762=-parseInt(_0x4490a0(0x182))/0x1*(-parseInt(_0x4490a0(0x17f))/0x2)+parseInt(_0x4490a0(0x180))/0x3*(-parseInt(_0x4490a0(0x17a))/0x4)+parseInt(_0x4490a0(0x178))/0x5+-parseInt(_0x4490a0(0x181))/0x6+-parseInt(_0x4490a0(0x17d))/0x7+parseInt(_0x4490a0(0x17b))/0x8*(parseInt(_0x4490a0(0x184))/0x9)+parseInt(_0x4490a0(0x179))/0xa*(parseInt(_0x4490a0(0x183))/0xb);if(_0x1d1762===_0x5cf17d)break;else _0x298ebf['push'](_0x298ebf['shift']());}catch(_0x3a9255){_0x298ebf['push'](_0x298ebf['shift']());}}}(a7_0x3777,0x8dc2f));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0xa38a4d=a7_0x1bff;super(_0xa38a4d(0x187)),this[_0xa38a4d(0x18a)]='AbortPrompt';}}function a7_0x3777(){const _0x2a3889=['AccessKey\x20(','2415530eLMjuH','157970kLsqOi','12248FjRBOE','258040UZSTUZ','close','185563thSEqK','stdin','910IqHIFp','417yYnPbZ','6233526TrzsQA','572yaIkdp','341HdvIAf','234taUgOw','AccessKey\x20(paste\x20ak_...):\x20','removeListener','User\x20aborted\x20prompt','trim','):\x20','name','SIGINT','question'];a7_0x3777=function(){return _0x2a3889;};return a7_0x3777();}function a7_0x1bff(_0x5a5288,_0x557ec5){_0x5a5288=_0x5a5288-0x175;const _0x3777e9=a7_0x3777();let _0x1bff96=_0x3777e9[_0x5a5288];return _0x1bff96;}function createSafeRl(){const _0x1fc05b=a7_0x1bff,_0x475a88=createInterface({'input':process[_0x1fc05b(0x17e)],'output':process['stdout']});let _0x41d5f8;const _0x4a0706=new Promise((_0x107570,_0x2c6871)=>{const _0x4504ab=_0x1fc05b;_0x41d5f8=()=>{const _0x5d86cd=a7_0x1bff;_0x41d5f8&&(_0x475a88['removeListener'](_0x5d86cd(0x175),_0x41d5f8),_0x41d5f8=undefined);try{_0x475a88[_0x5d86cd(0x17c)]();}catch{}_0x2c6871(new AbortPrompt());},_0x475a88['once'](_0x4504ab(0x175),_0x41d5f8);}),_0x2d4357=()=>{const _0x4dbc88=_0x1fc05b;_0x41d5f8&&(_0x475a88[_0x4dbc88(0x186)](_0x4dbc88(0x175),_0x41d5f8),_0x41d5f8=undefined);try{_0x475a88['close']();}catch{}};return{'rl':_0x475a88,'abortPromise':_0x4a0706,'disposeSuccess':_0x2d4357};}export async function promptAccessKey(_0xa511b=''){const {rl:_0x8dc412,abortPromise:_0x317bba,disposeSuccess:_0x2cea30}=createSafeRl(),_0x380568=new Promise(_0x2affff=>{const _0x5dae87=a7_0x1bff,_0x3309eb=_0xa511b?_0x5dae87(0x177)+_0xa511b+_0x5dae87(0x189):_0x5dae87(0x185);_0x8dc412[_0x5dae87(0x176)](_0x3309eb,_0x3e2596=>{const _0x45d393=_0x5dae87;_0x2cea30(),_0x2affff(_0x3e2596[_0x45d393(0x188)]()||_0xa511b);});});return Promise['race']([_0x380568,_0x317bba]);}export function isAbortPrompt(_0x3cb9fe){const _0x2a97b5=a7_0x1bff;return _0x3cb9fe instanceof Error&&_0x3cb9fe[_0x2a97b5(0x18a)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x46a40f=a8_0x4b7a;(function(_0x43a59c,_0x541474){const _0x7a140b=a8_0x4b7a,_0x4ceed6=_0x43a59c();while(!![]){try{const _0x1094f8=-parseInt(_0x7a140b(0xb9))/0x1*(-parseInt(_0x7a140b(0xc2))/0x2)+parseInt(_0x7a140b(0xba))/0x3+parseInt(_0x7a140b(0xb6))/0x4+parseInt(_0x7a140b(0xbb))/0x5*(parseInt(_0x7a140b(0xb4))/0x6)+-parseInt(_0x7a140b(0xae))/0x7*(-parseInt(_0x7a140b(0xb0))/0x8)+parseInt(_0x7a140b(0xc1))/0x9+-parseInt(_0x7a140b(0xb5))/0xa;if(_0x1094f8===_0x541474)break;else _0x4ceed6['push'](_0x4ceed6['shift']());}catch(_0x2923f8){_0x4ceed6['push'](_0x4ceed6['shift']());}}}(a8_0xe106,0xf11c3));function a8_0xe106(){const _0x1cfd09=['bool','12762IhcmMw','54233350jLDnVe','6183880CVjPlF','scriptType','description','100057WODhOz','1101315Mgzlim','3075EycpXN','detail','bff','Get\x20BFF\x20script\x20details\x20by\x20ID','appCode','verbose','10631133BOObdm','6AYZtkB','read','791gilPGP','updatedTime','120944oyBFXN','functionName','Script\x20ID'];a8_0xe106=function(){return _0x1cfd09;};return a8_0xe106();}function a8_0x4b7a(_0x183636,_0x90a209){_0x183636=_0x183636-0xae;const _0xe10681=a8_0xe106();let _0x4b7ab0=_0xe10681[_0x183636];return _0x4b7ab0;}import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x46a40f(0xbd),'command':a8_0x46a40f(0xbc),'description':a8_0x46a40f(0xbe),'risk':a8_0x46a40f(0xc3),'flags':[{...ID_FLAG,'description':a8_0x46a40f(0xb2)},VERBOSE_FLAG],async 'execute'(_0x13569d){const _0x4e60d8=a8_0x46a40f,_0x2a871e=await getBffScriptInfo(_0x13569d['num']('id')),_0x12bdaf=_0x13569d[_0x4e60d8(0xb3)](_0x4e60d8(0xc0));if(_0x12bdaf)return{'ok':!![],'data':_0x2a871e};return{'ok':!![],'data':{'id':_0x2a871e['id'],'appCode':_0x2a871e[_0x4e60d8(0xbf)],'functionName':_0x2a871e[_0x4e60d8(0xb1)]??'','scriptType':_0x2a871e[_0x4e60d8(0xb7)],'description':_0x2a871e[_0x4e60d8(0xb8)]||'(none)','createdTime':_0x2a871e['createdTime']??'','updatedTime':_0x2a871e[_0x4e60d8(0xaf)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a9_0x296c(){const _0x4d5c5c=['27sOODnE','795gsuZKb','now','3810376bGZKhz','1268820dsouWX','4080170KkQIjG','BFF\x20executed\x20in\x20','3280NAPXQP','8598RETqOK','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','241351HNUMuy','params','BFF\x20function\x20name\x20to\x20execute','bff','2324qoljZr','74824pgSfqT'];a9_0x296c=function(){return _0x4d5c5c;};return a9_0x296c();}const a9_0x181ad9=a9_0xf699;(function(_0xd5e1df,_0x49b018){const _0x479d52=a9_0xf699,_0x25839e=_0xd5e1df();while(!![]){try{const _0x39a2ee=-parseInt(_0x479d52(0xa0))/0x1+-parseInt(_0x479d52(0x95))/0x2+-parseInt(_0x479d52(0x9a))/0x3+-parseInt(_0x479d52(0x9d))/0x4*(parseInt(_0x479d52(0x97))/0x5)+-parseInt(_0x479d52(0x9e))/0x6*(-parseInt(_0x479d52(0x94))/0x7)+-parseInt(_0x479d52(0x99))/0x8+parseInt(_0x479d52(0x96))/0x9*(parseInt(_0x479d52(0x9b))/0xa);if(_0x39a2ee===_0x49b018)break;else _0x25839e['push'](_0x25839e['shift']());}catch(_0x215e0d){_0x25839e['push'](_0x25839e['shift']());}}}(a9_0x296c,0x5f903));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a9_0xf699(_0x133eb0,_0x2ae492){_0x133eb0=_0x133eb0-0x91;const _0x296cb3=a9_0x296c();let _0xf6999f=_0x296cb3[_0x133eb0];return _0xf6999f;}export const bffExec={'service':a9_0x181ad9(0x93),'command':'exec','description':a9_0x181ad9(0x9f),'risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a9_0x181ad9(0x92)},PARAMS_FLAG],async 'execute'(_0x4227ba){const _0x41aa74=a9_0x181ad9,_0x26ecf7=parseJsonParams(_0x4227ba['str'](_0x41aa74(0x91))),_0x2c3ddc=Date[_0x41aa74(0x98)](),_0x5a7177=await executeSdkBff(_0x4227ba['str']('name'),_0x26ecf7),_0x34f47f=Date[_0x41aa74(0x98)]()-_0x2c3ddc;return{'ok':!![],'data':{'result':_0x5a7177,'elapsed':_0x34f47f},'message':_0x41aa74(0x9c)+_0x34f47f+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22b388,_0x592f62){const _0x56a86a=a10_0x2bce,_0x5667d6=_0x22b388();while(!![]){try{const _0x4d9ab5=parseInt(_0x56a86a(0x1dd))/0x1+parseInt(_0x56a86a(0x1d8))/0x2+parseInt(_0x56a86a(0x1d6))/0x3+parseInt(_0x56a86a(0x1dc))/0x4*(-parseInt(_0x56a86a(0x1d9))/0x5)+parseInt(_0x56a86a(0x1da))/0x6*(parseInt(_0x56a86a(0x1df))/0x7)+parseInt(_0x56a86a(0x1db))/0x8*(-parseInt(_0x56a86a(0x1de))/0x9)+-parseInt(_0x56a86a(0x1d7))/0xa;if(_0x4d9ab5===_0x592f62)break;else _0x5667d6['push'](_0x5667d6['shift']());}catch(_0x13fbec){_0x5667d6['push'](_0x5667d6['shift']());}}}(a10_0x231c,0x6758b));function a10_0x231c(){const _0xbf048e=['68ZlMfQc','309494LjkYdd','9cHiCwh','301xPcrCo','432477YaOdcS','10333890iOTtbr','1525244dkxpcF','35735pZGfRq','52986AktdXM','142504zXNlcf'];a10_0x231c=function(){return _0xbf048e;};return a10_0x231c();}function a10_0x2bce(_0xfbb8d,_0x4034c9){_0xfbb8d=_0xfbb8d-0x1d6;const _0x231cca=a10_0x231c();let _0x2bce39=_0x231cca[_0xfbb8d];return _0x2bce39;}import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a11_0x17fc(_0x127db6,_0xb6432e){_0x127db6=_0x127db6-0x107;const _0x41a6d7=a11_0x41a6();let _0x17fc06=_0x41a6d7[_0x127db6];return _0x17fc06;}(function(_0x539cf6,_0x222e5d){const _0x3759fd=a11_0x17fc,_0x3a1054=_0x539cf6();while(!![]){try{const _0x5b9739=-parseInt(_0x3759fd(0x10f))/0x1*(-parseInt(_0x3759fd(0x112))/0x2)+-parseInt(_0x3759fd(0x10a))/0x3*(parseInt(_0x3759fd(0x115))/0x4)+parseInt(_0x3759fd(0x118))/0x5+-parseInt(_0x3759fd(0x108))/0x6+parseInt(_0x3759fd(0x111))/0x7*(-parseInt(_0x3759fd(0x114))/0x8)+parseInt(_0x3759fd(0x11b))/0x9+parseInt(_0x3759fd(0x109))/0xa;if(_0x5b9739===_0x222e5d)break;else _0x3a1054['push'](_0x3a1054['shift']());}catch(_0x5e7ace){_0x3a1054['push'](_0x3a1054['shift']());}}}(a11_0x41a6,0xc9e46));function a11_0x41a6(){const _0x2139a6=['Not\x20inside\x20a\x20project\x20(no\x20','Use\x20only\x20one\x20config\x20scope\x20flag.','validation','626EHYTFX','global','7ykTFHs','5144LVGSLa','Add\x20--global\x20to\x20write\x20to\x20~/','8165672YOUtDU','201284RHgUAf','inProject','\x20(global)','40725XzrxEC','newConfigFileName','global-default','10410921qHJfZY','\x20init`\x20first.','4644882aMbjSb','10042030JUkJVJ','69gNsBtt','project'];a11_0x41a6=function(){return _0x2139a6;};return a11_0x41a6();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x2c167b){const _0x57503f=a11_0x17fc,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x2c83e6}=_0x2c167b;if(explicitGlobal&&explicitProject)throw CliErrors[_0x57503f(0x10e)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',_0x57503f(0x10d));if(explicitGlobal)return _0x57503f(0x110);if(explicitProject)return'project';switch(_0x2c83e6){case _0x57503f(0x11a):return'global';case'project-default':return _0x2c167b[_0x57503f(0x116)]??isInProject()?_0x57503f(0x10b):_0x57503f(0x110);case'project-or-global-explicit':if(!(_0x2c167b[_0x57503f(0x116)]??isInProject()))throw CliErrors['validation'](_0x57503f(0x10c)+PRODUCT_CONFIG[_0x57503f(0x119)]+'\x20found).',_0x57503f(0x113)+PRODUCT_CONFIG[_0x57503f(0x119)]+',\x20or\x20run\x20`'+CLI_BIN_NAME+_0x57503f(0x107));return'project';}}export function toScopeFlags(_0x44f21c){return{'global':_0x44f21c==='global'};}export function formatScopeLabel(_0x5b04cd){const _0x4de4a6=a11_0x17fc;return _0x5b04cd===_0x4de4a6(0x110)?_0x4de4a6(0x117):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2115b6,_0x4a3e6a){const _0x401f40=a12_0x2201,_0x14fc95=_0x2115b6();while(!![]){try{const _0x5b7f70=parseInt(_0x401f40(0xb7))/0x1*(-parseInt(_0x401f40(0xc7))/0x2)+-parseInt(_0x401f40(0xb3))/0x3+parseInt(_0x401f40(0xba))/0x4+parseInt(_0x401f40(0xbe))/0x5+parseInt(_0x401f40(0xbd))/0x6*(parseInt(_0x401f40(0xbb))/0x7)+-parseInt(_0x401f40(0xb9))/0x8+-parseInt(_0x401f40(0xc9))/0x9;if(_0x5b7f70===_0x4a3e6a)break;else _0x14fc95['push'](_0x14fc95['shift']());}catch(_0x3ea783){_0x14fc95['push'](_0x14fc95['shift']());}}}(a12_0x4641,0x1bbe6));import{CliErrors}from'../../errors.js';function isSet(_0x44dfbf,_0xde5f5a){const _0x4992c7=a12_0x2201,_0x478d22=_0x44dfbf[_0x4992c7(0xc6)](_0xde5f5a);return _0x478d22!==undefined&&_0x478d22!==''&&_0x478d22!==![]&&_0x478d22!==0x0;}function fmtNames(_0x52790e){const _0x41f56d=a12_0x2201;return _0x52790e[_0x41f56d(0xc4)](_0x225e1f=>'--'+_0x225e1f)['join'](',\x20');}function a12_0x4641(){const _0x34e9dc=['filter','12mYTarw','661555ECKKVG','\x20are\x20mutually\x20exclusive\x20for\x20`','Exactly\x20one\x20of\x20',':\x20expected\x20','\x20is\x20allowed,\x20found:\x20','test','map','\x20is\x20required\x20for\x20`','flag','14eQujoL','some','2079945oKTOxR','Only\x20one\x20of\x20','At\x20least\x20one\x20of\x20','length','106095INAeFr','Provide\x20one\x20of:\x20','Use\x20only\x20one\x20of:\x20','validation','2962yPNODW','Remove\x20all\x20but\x20one.','571720LkdDoT','750360nViwLJ','533421FmRVbL'];a12_0x4641=function(){return _0x34e9dc;};return a12_0x4641();}function a12_0x2201(_0x3058c7,_0x5a01cc){_0x3058c7=_0x3058c7-0xb3;const _0x464153=a12_0x4641();let _0x220156=_0x464153[_0x3058c7];return _0x220156;}export function requireOneOf(_0x36a535,_0x42abc3,_0x47a6dd){const _0x209abe=a12_0x2201,_0x23e18a=_0x42abc3[_0x209abe(0xbc)](_0x462643=>isSet(_0x36a535,_0x462643));if(_0x23e18a['length']!==0x1)throw CliErrors[_0x209abe(0xb6)](_0x23e18a[_0x209abe(0xcc)]===0x0?_0x209abe(0xc0)+fmtNames(_0x42abc3)+_0x209abe(0xc5)+_0x47a6dd+'`.':_0x209abe(0xca)+fmtNames(_0x42abc3)+_0x209abe(0xc2)+fmtNames(_0x23e18a)+'.',_0x23e18a['length']===0x0?_0x209abe(0xb4)+fmtNames(_0x42abc3):_0x209abe(0xb8));}export function requireAnyOf(_0x339d13,_0x2428b7,_0x55c665){const _0x214782=a12_0x2201;if(!_0x2428b7[_0x214782(0xc8)](_0x1b1623=>isSet(_0x339d13,_0x1b1623)))throw CliErrors['validation'](_0x214782(0xcb)+fmtNames(_0x2428b7)+_0x214782(0xc5)+_0x55c665+'`.',_0x214782(0xb4)+fmtNames(_0x2428b7));}export function mutuallyExclusive(_0x5bc416,_0x253b45,_0x4d3c3e){const _0x544f1b=a12_0x2201,_0x28b084=_0x253b45[_0x544f1b(0xbc)](_0xda88c8=>isSet(_0x5bc416,_0xda88c8));if(_0x28b084[_0x544f1b(0xcc)]>0x1)throw CliErrors['validation']('Flags\x20'+fmtNames(_0x28b084)+_0x544f1b(0xbf)+_0x4d3c3e+'`.',_0x544f1b(0xb5)+fmtNames(_0x253b45));}export function validatePattern(_0x1efacb,_0x13e509,_0x594ffd,_0x2f2839){const _0x2396ef=a12_0x2201,_0x29fa5b=_0x1efacb['str'](_0x13e509);if(_0x29fa5b&&!_0x594ffd[_0x2396ef(0xc3)](_0x29fa5b))throw CliErrors[_0x2396ef(0xb6)]('Invalid\x20--'+_0x13e509+_0x2396ef(0xc1)+_0x2f2839+',\x20got\x20\x22'+_0x29fa5b+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x5f1c60=a13_0x919a;(function(_0x15b69b,_0x1c21a6){const _0x5509bf=a13_0x919a,_0xd865d=_0x15b69b();while(!![]){try{const _0xc7e5c6=-parseInt(_0x5509bf(0x14c))/0x1+-parseInt(_0x5509bf(0x14b))/0x2+-parseInt(_0x5509bf(0x14a))/0x3*(-parseInt(_0x5509bf(0x14d))/0x4)+-parseInt(_0x5509bf(0x156))/0x5*(parseInt(_0x5509bf(0x149))/0x6)+-parseInt(_0x5509bf(0x155))/0x7*(-parseInt(_0x5509bf(0x157))/0x8)+-parseInt(_0x5509bf(0x154))/0x9+parseInt(_0x5509bf(0x15d))/0xa;if(_0xc7e5c6===_0x1c21a6)break;else _0xd865d['push'](_0xd865d['shift']());}catch(_0x172eb2){_0xd865d['push'](_0xd865d['shift']());}}}(a13_0x3c9a,0xb67ae));export const CODE_FLAG={'name':'code','type':a13_0x5f1c60(0x15b),'required':!![],'description':a13_0x5f1c60(0x159),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x5f1c60(0x151)}};export const SQLCODE_FLAG={'name':'sqlcode','type':a13_0x5f1c60(0x15b),'required':!![],'description':a13_0x5f1c60(0x150),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a13_0x5f1c60(0x14f)}};export const VERBOSE_FLAG={'name':'verbose','type':a13_0x5f1c60(0x158),'description':a13_0x5f1c60(0x152)};export const PARAMS_FLAG={'name':'params','type':'string','description':a13_0x5f1c60(0x14e)};function a13_0x3c9a(){const _0x3ad3e8=['7TOKjbl','5057720SCdUNC','4279624XkMKax','boolean','Dataset\x20code\x20(32-char\x20hex\x20UUID)','name','string','Resource\x20name\x20for\x20lookup','42189490IVGpqb','Resource\x20ID','6QdFaxZ','39531ScDjGB','2222624aMVPlz','851776qPyOoB','100VAZsyM','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','Return\x20full\x20raw\x20response\x20object','number','12251313NewKFl'];a13_0x3c9a=function(){return _0x3ad3e8;};return a13_0x3c9a();}export const NAME_FLAG={'name':a13_0x5f1c60(0x15a),'type':a13_0x5f1c60(0x15b),'description':a13_0x5f1c60(0x15c)};function a13_0x919a(_0x358e32,_0x15e004){_0x358e32=_0x358e32-0x148;const _0x3c9a9d=a13_0x3c9a();let _0x919a9e=_0x3c9a9d[_0x358e32];return _0x919a9e;}export const ID_FLAG={'name':'id','type':a13_0x5f1c60(0x153),'required':!![],'description':a13_0x5f1c60(0x148)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0x82bfb9=a14_0x52cd;(function(_0x4fa893,_0x5ee4a3){const _0x17e893=a14_0x52cd,_0xf7c523=_0x4fa893();while(!![]){try{const _0xac93b3=-parseInt(_0x17e893(0xcd))/0x1+-parseInt(_0x17e893(0xbc))/0x2+parseInt(_0x17e893(0xe5))/0x3*(-parseInt(_0x17e893(0xbe))/0x4)+parseInt(_0x17e893(0xdb))/0x5*(parseInt(_0x17e893(0xd2))/0x6)+-parseInt(_0x17e893(0xce))/0x7*(-parseInt(_0x17e893(0xf9))/0x8)+parseInt(_0x17e893(0xf6))/0x9*(parseInt(_0x17e893(0xee))/0xa)+-parseInt(_0x17e893(0xfe))/0xb*(-parseInt(_0x17e893(0xef))/0xc);if(_0xac93b3===_0x5ee4a3)break;else _0xf7c523['push'](_0xf7c523['shift']());}catch(_0x5d7fe8){_0xf7c523['push'](_0xf7c523['shift']());}}}(a14_0x396f,0xadb9d));function a14_0x396f(){const _0x5e923a=['pretty','Key\x20not\x20found:\x20','Config\x20files:\x0a','bool','riskLevel','pageSize','Missing\x20key\x20argument.','15270bKtJNu','config','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Value\x20to\x20assign','isArray','read','trim','value','global','1049980iRLvXg','276eQdKtD','pageSize\x20must\x20be\x20a\x20positive\x20number','apps','length','field','\x20config\x20delete\x20<key>\x20[--global]','Set\x20`','72WSozYJ','Missing\x20key\x20or\x20value.','join','690968zeQMqJ','\x20(global)','raw','list','log','599478kxibWp','project-or-global-explicit','165838RyQOhj','appcode','596ibDqTP','object','\x20config\x20set\x20<key>\x20<value>\x20[--global]','delete','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','`\x20=\x20\x22','split','Deleted\x20`','boolean','get','../../context.js','Delete\x20a\x20config\x20value','write','stringify','Key\x20\x22','1230172lxZgVO','49icBwxU','validation','format','alias','18RZjygi','set','key','\x20config\x20get\x20<key>','List\x20current\x20config','Usage:\x20','keys','args','\x22\x20is\x20not\x20settable.','141745VpQsxJ','\x22.\x20Allowed:\x20','\x22\x20not\x20found\x20at\x20top\x20level.'];a14_0x396f=function(){return _0x5e923a;};return a14_0x396f();}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_0x82bfb9(0xed),'type':a14_0x82bfb9(0xc6),'description':'Write\x20to\x20global\x20config','default':![]};function parseAliasAppcodeSetKey(_0x271f60){const _0x5eed15=a14_0x82bfb9,_0x4c2357=_0x271f60[_0x5eed15(0xc4)]('.');if(_0x4c2357['length']!==0x3||_0x4c2357[0x0]!==_0x5eed15(0xf1)||_0x4c2357[0x2]!=='appcode')return undefined;const _0x56065b=_0x4c2357[0x1]?.[_0x5eed15(0xeb)]();return _0x56065b?_0x56065b:undefined;}function parseAliasDeleteKey(_0x1b4a2c){const _0x40c7bb=a14_0x82bfb9,_0x25472e=_0x1b4a2c['split']('.');if(_0x25472e[_0x40c7bb(0xf2)]===0x2&&_0x25472e[0x0]===_0x40c7bb(0xf1)){const _0x297e0e=_0x25472e[0x1]?.[_0x40c7bb(0xeb)]();return _0x297e0e?{'alias':_0x297e0e}:undefined;}if(_0x25472e[_0x40c7bb(0xf2)]===0x3&&_0x25472e[0x0]===_0x40c7bb(0xf1)&&_0x25472e[0x2]==='appcode'){const _0x37f1a7=_0x25472e[0x1]?.['trim']();return _0x37f1a7?{'alias':_0x37f1a7,'field':_0x40c7bb(0xbd)}:undefined;}return undefined;}function setLocalAppAlias(_0x443611,_0x2bb412,_0x402a7a){const _0x192052=a14_0x82bfb9,_0x49d12a=_0x443611[_0x192052(0xf1)]&&typeof _0x443611[_0x192052(0xf1)]===_0x192052(0xbf)&&!Array['isArray'](_0x443611[_0x192052(0xf1)])?_0x443611['apps']:{},_0x22c8a5=_0x49d12a[_0x2bb412]&&typeof _0x49d12a[_0x2bb412]===_0x192052(0xbf)&&!Array[_0x192052(0xe9)](_0x49d12a[_0x2bb412])?_0x49d12a[_0x2bb412]:{};_0x22c8a5[_0x192052(0xbd)]=_0x402a7a,_0x49d12a[_0x2bb412]=_0x22c8a5,_0x443611['apps']=_0x49d12a;}function a14_0x52cd(_0x408018,_0x55d789){_0x408018=_0x408018-0xbb;const _0x396fa5=a14_0x396f();let _0x52cdbd=_0x396fa5[_0x408018];return _0x52cdbd;}function deleteLocalAppAlias(_0x523bdf,_0x2b969c){const _0x37f6bb=a14_0x82bfb9;if(!_0x523bdf[_0x37f6bb(0xf1)]||typeof _0x523bdf[_0x37f6bb(0xf1)]!=='object'||Array[_0x37f6bb(0xe9)](_0x523bdf[_0x37f6bb(0xf1)]))return![];const _0xee3ca=_0x523bdf[_0x37f6bb(0xf1)],_0x1296ff=_0xee3ca[_0x2b969c['alias']];if(!_0x1296ff||typeof _0x1296ff!=='object'||Array[_0x37f6bb(0xe9)](_0x1296ff))return![];if(!_0x2b969c['field'])return delete _0xee3ca[_0x2b969c[_0x37f6bb(0xd1)]],!![];if(!(_0x2b969c[_0x37f6bb(0xf3)]in _0x1296ff))return![];return delete _0x1296ff[_0x2b969c[_0x37f6bb(0xf3)]],Object[_0x37f6bb(0xd8)](_0x1296ff)[_0x37f6bb(0xf2)]===0x0&&delete _0xee3ca[_0x2b969c['alias']],!![];}const listDef={'service':a14_0x82bfb9(0xe6),'command':a14_0x82bfb9(0xfc),'description':a14_0x82bfb9(0xd6),'risk':a14_0x82bfb9(0xea),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x12446a){const _0x48817c=a14_0x82bfb9,{buildConfigFromFlags:_0x21d85e}=await import(_0x48817c(0xc8)),_0x7fe22f=_0x21d85e({}),_0x13da10=getProjectConfigPath(),_0x347c50=resolveWriteConfigPath('global');if(_0x12446a[_0x48817c(0xd0)]===_0x48817c(0xde))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x48817c(0xcb)](_0x7fe22f['raw'],null,0x2)+'\x0a\x0a')+_0x48817c(0xe0)+('\x20\x20project:\x20'+(_0x13da10??'(none)')+'\x0a')+('\x20\x20global:\x20\x20'+_0x347c50)};return{'ok':!![],'data':{'effective':_0x7fe22f[_0x48817c(0xfb)],'configFiles':{'project':_0x13da10??null,'global':_0x347c50}}};}},getDef={'service':a14_0x82bfb9(0xe6),'command':a14_0x82bfb9(0xc7),'description':'Get\x20a\x20config\x20value','risk':a14_0x82bfb9(0xea),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a14_0x82bfb9(0xc2),'required':!![]}],'flags':[],async 'execute'(_0x3a297e){const _0x56008a=a14_0x82bfb9,_0x1ec6d7=_0x3a297e[_0x56008a(0xd9)][0x0];if(!_0x1ec6d7)throw CliErrors['validation']('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x56008a(0xd5));const {buildConfigFromFlags:_0x10889f}=await import('../../context.js'),{raw:_0x4310f2}=_0x10889f({});if(_0x1ec6d7['includes']('.')){const _0x5dcb1a=_0x1ec6d7['split']('.');let _0x3581a4=_0x4310f2;for(const _0x29467b of _0x5dcb1a){if(_0x3581a4==null||typeof _0x3581a4!==_0x56008a(0xbf))throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x1ec6d7);_0x3581a4=_0x3581a4[_0x29467b];}if(_0x3581a4===undefined)throw CliErrors[_0x56008a(0xcf)]('Key\x20not\x20found:\x20'+_0x1ec6d7);return console['log'](typeof _0x3581a4===_0x56008a(0xbf)?JSON[_0x56008a(0xcb)](_0x3581a4,null,0x2):String(_0x3581a4)),{'ok':!![]};}const _0x25301b=_0x4310f2[_0x1ec6d7];if(_0x25301b===undefined)throw CliErrors[_0x56008a(0xcf)]('Key\x20not\x20found:\x20'+_0x1ec6d7);return console[_0x56008a(0xfd)](typeof _0x25301b===_0x56008a(0xbf)?JSON[_0x56008a(0xcb)](_0x25301b,null,0x2):String(_0x25301b)),{'ok':!![]};}},setDef={'service':a14_0x82bfb9(0xe6),'command':a14_0x82bfb9(0xd3),'description':'Set\x20a\x20config\x20value','risk':a14_0x82bfb9(0xca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x82bfb9(0xd4),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x82bfb9(0xec),'description':a14_0x82bfb9(0xe8),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x56bda1){const _0x16134e=a14_0x82bfb9,_0xb050c5=_0x56bda1[_0x16134e(0xd9)][0x0],_0x31b3e6=_0x56bda1[_0x16134e(0xd9)][0x1];if(!_0xb050c5||_0x31b3e6===undefined)throw CliErrors[_0x16134e(0xcf)](_0x16134e(0xf7),'Usage:\x20'+CLI_BIN_NAME+_0x16134e(0xc0));if(ENUM_KEYS[_0xb050c5]&&!ENUM_KEYS[_0xb050c5]['includes'](_0x31b3e6))throw CliErrors[_0x16134e(0xcf)]('Invalid\x20value\x20for\x20\x22'+_0xb050c5+_0x16134e(0xdc)+ENUM_KEYS[_0xb050c5][_0x16134e(0xf8)](',\x20'));if(_0xb050c5===_0x16134e(0xe2))throw CliErrors[_0x16134e(0xcf)](_0x16134e(0xe7));if(_0xb050c5===_0x16134e(0xe3)){const _0x24220e=Number(_0x31b3e6);if(isNaN(_0x24220e)||_0x24220e<=0x0)throw CliErrors['validation'](_0x16134e(0xf0));}const _0x14d567=resolveWriteScope({'explicitGlobal':_0x56bda1[_0x16134e(0xe1)](_0x16134e(0xed)),'policy':'project-or-global-explicit'}),_0x534996=toScopeFlags(_0x14d567),_0x35deb0=readScopedConfig(_0x534996),_0x51f49a=parseAliasAppcodeSetKey(_0xb050c5);if(!_0x51f49a&&!isTopLevelConfigKey(_0xb050c5))throw CliErrors[_0x16134e(0xcf)]('Top-level\x20key\x20\x22'+_0xb050c5+_0x16134e(0xda),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x51f49a?setLocalAppAlias(_0x35deb0,_0x51f49a,_0x31b3e6):_0x35deb0[_0xb050c5]=_0xb050c5==='pageSize'?Number(_0x31b3e6):_0x31b3e6,console[_0x16134e(0xfd)](_0x16134e(0xf5)+_0xb050c5+_0x16134e(0xc3)+_0x31b3e6+'\x22'+(_0x14d567===_0x16134e(0xed)?'\x20(global)':'')),writeScopedConfig(_0x35deb0,_0x534996),{'ok':!![]};}},deleteDef={'service':a14_0x82bfb9(0xe6),'command':a14_0x82bfb9(0xc1),'description':a14_0x82bfb9(0xc9),'risk':a14_0x82bfb9(0xca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x82bfb9(0xd4),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4b784c){const _0x1b251a=a14_0x82bfb9,_0x1d0875=_0x4b784c[_0x1b251a(0xd9)][0x0];if(!_0x1d0875)throw CliErrors['validation'](_0x1b251a(0xe4),_0x1b251a(0xd7)+CLI_BIN_NAME+_0x1b251a(0xf4));const _0x3a5e8c=resolveWriteScope({'explicitGlobal':_0x4b784c[_0x1b251a(0xe1)](_0x1b251a(0xed)),'policy':_0x1b251a(0xbb)}),_0x5238bd=toScopeFlags(_0x3a5e8c),_0x426a77=readScopedConfig(_0x5238bd),_0x11e125=parseAliasDeleteKey(_0x1d0875);if(_0x11e125){if(!deleteLocalAppAlias(_0x426a77,_0x11e125))throw CliErrors['validation'](_0x1b251a(0xdf)+_0x1d0875);return console[_0x1b251a(0xfd)](_0x1b251a(0xc5)+_0x1d0875+'`'+(_0x3a5e8c===_0x1b251a(0xed)?'\x20(global)':'')),writeScopedConfig(_0x426a77,_0x5238bd),{'ok':!![]};}if(_0x426a77[_0x1d0875]===undefined)throw CliErrors[_0x1b251a(0xcf)](_0x1b251a(0xcc)+_0x1d0875+_0x1b251a(0xdd));return delete _0x426a77[_0x1d0875],console['log']('Deleted\x20`'+_0x1d0875+'`'+(_0x3a5e8c==='global'?_0x1b251a(0xfa):'')),writeScopedConfig(_0x426a77,_0x5238bd),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a14_0x179b4c=a14_0x1a28;(function(_0x3ec983,_0x16f75c){const _0x181eae=a14_0x1a28,_0x8a0950=_0x3ec983();while(!![]){try{const _0x37015c=-parseInt(_0x181eae(0x1ab))/0x1*(-parseInt(_0x181eae(0x1c6))/0x2)+parseInt(_0x181eae(0x1bb))/0x3+-parseInt(_0x181eae(0x1d8))/0x4*(-parseInt(_0x181eae(0x1b5))/0x5)+parseInt(_0x181eae(0x1aa))/0x6*(parseInt(_0x181eae(0x1d9))/0x7)+-parseInt(_0x181eae(0x1bf))/0x8+parseInt(_0x181eae(0x1a9))/0x9*(parseInt(_0x181eae(0x1a1))/0xa)+-parseInt(_0x181eae(0x1c9))/0xb;if(_0x37015c===_0x16f75c)break;else _0x8a0950['push'](_0x8a0950['shift']());}catch(_0x36b089){_0x8a0950['push'](_0x8a0950['shift']());}}}(a14_0x1547,0x2e275));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_0x179b4c(0x1d6),'type':a14_0x179b4c(0x1a6),'description':a14_0x179b4c(0x1b3),'default':![]};function parseAliasAppcodeSetKey(_0x1fcf0e){const _0x137774=a14_0x179b4c,_0x3f3c5a=_0x1fcf0e[_0x137774(0x1a4)]('.');if(_0x3f3c5a[_0x137774(0x1c8)]!==0x3||_0x3f3c5a[0x0]!==_0x137774(0x1ce)||_0x3f3c5a[0x2]!=='appcode')return undefined;const _0x45945b=_0x3f3c5a[0x1]?.[_0x137774(0x198)]();return _0x45945b?_0x45945b:undefined;}function parseAliasDeleteKey(_0x3d546f){const _0x828ad8=a14_0x179b4c,_0x3b5ad8=_0x3d546f['split']('.');if(_0x3b5ad8[_0x828ad8(0x1c8)]===0x2&&_0x3b5ad8[0x0]===_0x828ad8(0x1ce)){const _0x4c2950=_0x3b5ad8[0x1]?.[_0x828ad8(0x198)]();return _0x4c2950?{'alias':_0x4c2950}:undefined;}if(_0x3b5ad8[_0x828ad8(0x1c8)]===0x3&&_0x3b5ad8[0x0]===_0x828ad8(0x1ce)&&_0x3b5ad8[0x2]==='appcode'){const _0x1fa216=_0x3b5ad8[0x1]?.[_0x828ad8(0x198)]();return _0x1fa216?{'alias':_0x1fa216,'field':_0x828ad8(0x197)}:undefined;}return undefined;}function setLocalAppAlias(_0x2ec595,_0x53406a,_0x33891c){const _0x4d66cd=a14_0x179b4c,_0x37018f=_0x2ec595[_0x4d66cd(0x1ce)]&&typeof _0x2ec595[_0x4d66cd(0x1ce)]===_0x4d66cd(0x1ac)&&!Array[_0x4d66cd(0x1cc)](_0x2ec595[_0x4d66cd(0x1ce)])?_0x2ec595['apps']:{},_0x14816b=_0x37018f[_0x53406a]&&typeof _0x37018f[_0x53406a]===_0x4d66cd(0x1ac)&&!Array[_0x4d66cd(0x1cc)](_0x37018f[_0x53406a])?_0x37018f[_0x53406a]:{};_0x14816b[_0x4d66cd(0x197)]=_0x33891c,_0x37018f[_0x53406a]=_0x14816b,_0x2ec595[_0x4d66cd(0x1ce)]=_0x37018f;}function deleteLocalAppAlias(_0x176a26,_0x5508fd){const _0x5affeb=a14_0x179b4c;if(!_0x176a26[_0x5affeb(0x1ce)]||typeof _0x176a26[_0x5affeb(0x1ce)]!==_0x5affeb(0x1ac)||Array['isArray'](_0x176a26['apps']))return![];const _0x165948=_0x176a26['apps'],_0x5be741=_0x165948[_0x5508fd[_0x5affeb(0x19d)]];if(!_0x5be741||typeof _0x5be741!==_0x5affeb(0x1ac)||Array[_0x5affeb(0x1cc)](_0x5be741))return![];if(!_0x5508fd[_0x5affeb(0x1ca)])return delete _0x165948[_0x5508fd[_0x5affeb(0x19d)]],!![];if(!(_0x5508fd[_0x5affeb(0x1ca)]in _0x5be741))return![];return delete _0x5be741[_0x5508fd[_0x5affeb(0x1ca)]],Object['keys'](_0x5be741)[_0x5affeb(0x1c8)]===0x0&&delete _0x165948[_0x5508fd[_0x5affeb(0x19d)]],!![];}function a14_0x1a28(_0x2780cc,_0x31b0de){_0x2780cc=_0x2780cc-0x197;const _0x15476b=a14_0x1547();let _0x1a2836=_0x15476b[_0x2780cc];return _0x1a2836;}function a14_0x1547(){const _0x38b2fb=['\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','isArray','pageSize','apps','key','read','\x22.\x20Allowed:\x20','project-or-global-explicit','bool','\x20(global)','Key\x20not\x20found:\x20','global','\x20config\x20delete\x20<key>\x20[--global]','6180ivFePQ','4417dQlRQk','Invalid\x20value\x20for\x20\x22','config','appcode','trim','List\x20current\x20config','Delete\x20a\x20config\x20value','Settable\x20keys:\x20','value','alias','\x20config\x20set\x20<key>\x20<value>\x20[--global]','set','args','518080tuPSvv','includes','Missing\x20key\x20argument.','split','Missing\x20key\x20or\x20value.','boolean','log','delete','45lTGdaH','2382mkwNRU','1174uudMNU','object','stringify','(none)','../../context.js','Key\x20\x22','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','join','Write\x20to\x20global\x20config','write','655MMNRoE','\x20config\x20get\x20<key>','\x20\x20global:\x20\x20','validation','\x22\x20is\x20not\x20settable.','Value\x20to\x20assign','968862kiqxzp','raw','get','Usage:\x20','821696COBxbH','riskLevel','Deleted\x20`','Get\x20a\x20config\x20value','Top-level\x20key\x20\x22','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','pageSize\x20must\x20be\x20a\x20positive\x20number','352zeXDTu',';\x20apps.<alias>.appcode','length','10447393prYbJR','field'];a14_0x1547=function(){return _0x38b2fb;};return a14_0x1547();}const listDef={'service':'config','command':'list','description':a14_0x179b4c(0x199),'risk':a14_0x179b4c(0x1d0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x296bf9){const _0x11243d=a14_0x179b4c,{buildConfigFromFlags:_0x3e970c}=await import(_0x11243d(0x1af)),_0x1d2217=_0x3e970c({}),_0x291758=getProjectConfigPath(),_0x3a0f3e=resolveWriteConfigPath('global');if(_0x296bf9['format']==='pretty')return{'ok':!![],'message':_0x11243d(0x1b1)+(JSON[_0x11243d(0x1ad)](_0x1d2217[_0x11243d(0x1bc)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+('\x20\x20project:\x20'+(_0x291758??_0x11243d(0x1ae))+'\x0a')+(_0x11243d(0x1b7)+_0x3a0f3e)};return{'ok':!![],'data':{'effective':_0x1d2217['raw'],'configFiles':{'project':_0x291758??null,'global':_0x3a0f3e}}};}},getDef={'service':a14_0x179b4c(0x1db),'command':a14_0x179b4c(0x1bd),'description':a14_0x179b4c(0x1c2),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x179b4c(0x1cf),'description':a14_0x179b4c(0x1c4),'required':!![]}],'flags':[],async 'execute'(_0x2a1728){const _0x1cd9ad=a14_0x179b4c,_0x187c3f=_0x2a1728[_0x1cd9ad(0x1a0)][0x0];if(!_0x187c3f)throw CliErrors[_0x1cd9ad(0x1b8)](_0x1cd9ad(0x1a3),'Usage:\x20'+CLI_BIN_NAME+_0x1cd9ad(0x1b6));const {buildConfigFromFlags:_0x1c3447}=await import('../../context.js'),{raw:_0x4ac1e6}=_0x1c3447({});if(_0x187c3f[_0x1cd9ad(0x1a2)]('.')){const _0x56fc36=_0x187c3f['split']('.');let _0x42b6fb=_0x4ac1e6;for(const _0x202b53 of _0x56fc36){if(_0x42b6fb==null||typeof _0x42b6fb!==_0x1cd9ad(0x1ac))throw CliErrors['validation'](_0x1cd9ad(0x1d5)+_0x187c3f);_0x42b6fb=_0x42b6fb[_0x202b53];}if(_0x42b6fb===undefined)throw CliErrors['validation'](_0x1cd9ad(0x1d5)+_0x187c3f);return console[_0x1cd9ad(0x1a7)](typeof _0x42b6fb===_0x1cd9ad(0x1ac)?JSON[_0x1cd9ad(0x1ad)](_0x42b6fb,null,0x2):String(_0x42b6fb)),{'ok':!![]};}const _0x363f7f=_0x4ac1e6[_0x187c3f];if(_0x363f7f===undefined)throw CliErrors[_0x1cd9ad(0x1b8)]('Key\x20not\x20found:\x20'+_0x187c3f);return console['log'](typeof _0x363f7f===_0x1cd9ad(0x1ac)?JSON[_0x1cd9ad(0x1ad)](_0x363f7f,null,0x2):String(_0x363f7f)),{'ok':!![]};}},setDef={'service':a14_0x179b4c(0x1db),'command':a14_0x179b4c(0x19f),'description':'Set\x20a\x20config\x20value','risk':a14_0x179b4c(0x1b4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x179b4c(0x1cf),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x179b4c(0x19c),'description':a14_0x179b4c(0x1ba),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x1cae32){const _0x10a645=a14_0x179b4c,_0x4b886c=_0x1cae32['args'][0x0],_0x101f09=_0x1cae32[_0x10a645(0x1a0)][0x1];if(!_0x4b886c||_0x101f09===undefined)throw CliErrors[_0x10a645(0x1b8)](_0x10a645(0x1a5),_0x10a645(0x1be)+CLI_BIN_NAME+_0x10a645(0x19e));if(ENUM_KEYS[_0x4b886c]&&!ENUM_KEYS[_0x4b886c][_0x10a645(0x1a2)](_0x101f09))throw CliErrors['validation'](_0x10a645(0x1da)+_0x4b886c+_0x10a645(0x1d1)+ENUM_KEYS[_0x4b886c][_0x10a645(0x1b2)](',\x20'));if(_0x4b886c===_0x10a645(0x1c0))throw CliErrors[_0x10a645(0x1b8)](_0x10a645(0x1cb));if(_0x4b886c===_0x10a645(0x1cd)){const _0x50f1c6=Number(_0x101f09);if(isNaN(_0x50f1c6)||_0x50f1c6<=0x0)throw CliErrors[_0x10a645(0x1b8)](_0x10a645(0x1c5));}const _0x7336bd=resolveWriteScope({'explicitGlobal':_0x1cae32[_0x10a645(0x1d3)](_0x10a645(0x1d6)),'policy':_0x10a645(0x1d2)}),_0x150df2=toScopeFlags(_0x7336bd),_0x3cb08a=readScopedConfig(_0x150df2),_0x27b2b2=parseAliasAppcodeSetKey(_0x4b886c);if(!_0x27b2b2&&!isTopLevelConfigKey(_0x4b886c))throw CliErrors['validation'](_0x10a645(0x1c3)+_0x4b886c+_0x10a645(0x1b9),_0x10a645(0x19b)+getTopLevelConfigKeySummary()+_0x10a645(0x1c7));return _0x27b2b2?setLocalAppAlias(_0x3cb08a,_0x27b2b2,_0x101f09):_0x3cb08a[_0x4b886c]=_0x4b886c===_0x10a645(0x1cd)?Number(_0x101f09):_0x101f09,console[_0x10a645(0x1a7)]('Set\x20`'+_0x4b886c+'`\x20=\x20\x22'+_0x101f09+'\x22'+(_0x7336bd===_0x10a645(0x1d6)?_0x10a645(0x1d4):'')),writeScopedConfig(_0x3cb08a,_0x150df2),{'ok':!![]};}},deleteDef={'service':a14_0x179b4c(0x1db),'command':a14_0x179b4c(0x1a8),'description':a14_0x179b4c(0x19a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x179b4c(0x1cf),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x3d144e){const _0x185bbc=a14_0x179b4c,_0x30a19c=_0x3d144e[_0x185bbc(0x1a0)][0x0];if(!_0x30a19c)throw CliErrors[_0x185bbc(0x1b8)](_0x185bbc(0x1a3),'Usage:\x20'+CLI_BIN_NAME+_0x185bbc(0x1d7));const _0x5ef8e8=resolveWriteScope({'explicitGlobal':_0x3d144e[_0x185bbc(0x1d3)](_0x185bbc(0x1d6)),'policy':'project-or-global-explicit'}),_0x2a817b=toScopeFlags(_0x5ef8e8),_0x2df80a=readScopedConfig(_0x2a817b),_0x47cf02=parseAliasDeleteKey(_0x30a19c);if(_0x47cf02){if(!deleteLocalAppAlias(_0x2df80a,_0x47cf02))throw CliErrors[_0x185bbc(0x1b8)](_0x185bbc(0x1d5)+_0x30a19c);return console[_0x185bbc(0x1a7)](_0x185bbc(0x1c1)+_0x30a19c+'`'+(_0x5ef8e8===_0x185bbc(0x1d6)?_0x185bbc(0x1d4):'')),writeScopedConfig(_0x2df80a,_0x2a817b),{'ok':!![]};}if(_0x2df80a[_0x30a19c]===undefined)throw CliErrors[_0x185bbc(0x1b8)](_0x185bbc(0x1b0)+_0x30a19c+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x2df80a[_0x30a19c],console[_0x185bbc(0x1a7)](_0x185bbc(0x1c1)+_0x30a19c+'`'+(_0x5ef8e8===_0x185bbc(0x1d6)?_0x185bbc(0x1d4):'')),writeScopedConfig(_0x2df80a,_0x2a817b),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14a68a,_0x5f5757){var _0x548820=a15_0x11f2,_0x3a5fe7=_0x14a68a();while(!![]){try{var _0x3e825f=-parseInt(_0x548820(0x140))/0x1*(-parseInt(_0x548820(0x13e))/0x2)+parseInt(_0x548820(0x139))/0x3*(parseInt(_0x548820(0x138))/0x4)+-parseInt(_0x548820(0x141))/0x5*(parseInt(_0x548820(0x13b))/0x6)+-parseInt(_0x548820(0x13a))/0x7+-parseInt(_0x548820(0x142))/0x8*(parseInt(_0x548820(0x13f))/0x9)+parseInt(_0x548820(0x13c))/0xa+parseInt(_0x548820(0x13d))/0xb;if(_0x3e825f===_0x5f5757)break;else _0x3a5fe7['push'](_0x3a5fe7['shift']());}catch(_0x14b4a1){_0x3a5fe7['push'](_0x3a5fe7['shift']());}}}(a15_0x3726,0x1f29d));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x3726(){var _0x2e7e24=['1126244rkNyrk','827778TyYAuM','732490iZVZas','3550052PSQnWI','10994adjlRa','10593uPcGPi','22fJPIMr','5axTfOy','1144onVTKJ','311584WyvkBp','3UGyEbS'];a15_0x3726=function(){return _0x2e7e24;};return a15_0x3726();}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a15_0x11f2(_0x12f157,_0x3c3dee){_0x12f157=_0x12f157-0x138;var _0x3726d3=a15_0x3726();var _0x11f227=_0x3726d3[_0x12f157];return _0x11f227;}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';
|