@lovrabet/lovrabet-cli 2.0.9-beta.7 → 2.0.10
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
|
-
(function(
|
|
2
|
+
(function(_0x2a2e74,_0xcf4bcf){const _0x304fab=a0_0x4028,_0x41013c=_0x2a2e74();while(!![]){try{const _0x2bb9e2=parseInt(_0x304fab(0x1ff))/0x1+-parseInt(_0x304fab(0x1fc))/0x2*(parseInt(_0x304fab(0x1dd))/0x3)+parseInt(_0x304fab(0x1f5))/0x4*(parseInt(_0x304fab(0x1eb))/0x5)+-parseInt(_0x304fab(0x1de))/0x6+parseInt(_0x304fab(0x1e2))/0x7+-parseInt(_0x304fab(0x1fd))/0x8*(-parseInt(_0x304fab(0x1f7))/0x9)+parseInt(_0x304fab(0x1e1))/0xa*(-parseInt(_0x304fab(0x1e6))/0xb);if(_0x2bb9e2===_0xcf4bcf)break;else _0x41013c['push'](_0x41013c['shift']());}catch(_0x504835){_0x41013c['push'](_0x41013c['shift']());}}}(a0_0x5f0d,0xa9769));import{jsx as a0_0x1c5e5c}from'react/jsx-runtime';import a0_0x348b24 from'meow';import{render}from'ink';function a0_0x5f0d(){const _0x4acc08=['handler','hint','assign','original','1320398OjBRXY','16PkiRLZ','message','1049157rGJVrG','unknownCommand','exitCode','corrected','defaultCommand','input','\x20->\x20--','3tshVBc','7103160mLgNbs','stderr','ERR_STREAM_DESTROYED','430hFwytJ','9099755oxePVU','Hint:\x20','exit','ERR_USE_AFTER_CLOSE','447953xWlSsE','code','cancelled','help',':\x20--','1745mOMPfv','flags','write','flatMap','Error:\x20','./framework/preparse.js','length','error','name','log','14628IMGHLM','\x0aCancelled.\x0a','2987343PHMBPD'];a0_0x5f0d=function(){return _0x4acc08;};return a0_0x5f0d();}import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x348b24(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x4571a0){handleError(_0x4571a0);}}function a0_0x4028(_0x2999a6,_0x4dd07f){_0x2999a6=_0x2999a6-0x1dd;const _0x5f0d47=a0_0x5f0d();let _0x402844=_0x5f0d47[_0x2999a6];return _0x402844;}async function run(){const _0x2495d4=a0_0x4028;let _0xa2a4e0=cli[_0x2495d4(0x204)][0x0],_0x332e3b=cli[_0x2495d4(0x204)][0x1];const _0x4dea49=cli[_0x2495d4(0x1ec)];try{const {correctFlags:_0x4f0546}=await import(_0x2495d4(0x1f0)),_0x10febd=getAllDefinitions()[_0x2495d4(0x1ee)](_0x8c52e7=>_0x8c52e7[_0x2495d4(0x1ec)]??[]),{flags:_0x858246,corrections:_0x165491}=_0x4f0546(_0x4dea49,_0x10febd);if(_0x165491[_0x2495d4(0x1f1)]>0x0){for(const _0x1619f3 of _0x165491){process[_0x2495d4(0x1df)]['write']('[preparse]\x20'+_0x1619f3[_0x2495d4(0x1f8)]+_0x2495d4(0x1ea)+_0x1619f3[_0x2495d4(0x1fb)]+_0x2495d4(0x205)+_0x1619f3[_0x2495d4(0x202)]+'\x0a');}Object[_0x2495d4(0x1fa)](_0x4dea49,_0x858246);}}catch{}if(!_0xa2a4e0||!isKnownService(_0xa2a4e0)){const {waitUntilExit:_0x14b22}=render(a0_0x1c5e5c(Help,{}));await _0x14b22();return;}const _0x531b5c=getServiceEntry(_0xa2a4e0);if(!_0x332e3b){if(_0x4dea49['help']){console[_0x2495d4(0x1f4)](generateServiceHelp(_0xa2a4e0));return;}if(_0x531b5c[_0x2495d4(0x203)])_0x332e3b=_0x531b5c['defaultCommand'];else{console['log'](generateServiceHelp(_0xa2a4e0));return;}}const _0x1d6e08=findDefinition(_0xa2a4e0,_0x332e3b);!_0x1d6e08&&(console[_0x2495d4(0x1f4)](generateServiceHelp(_0xa2a4e0)),handleError(CliErrors[_0x2495d4(0x200)](_0xa2a4e0+'\x20'+_0x332e3b)));if(_0x4dea49[_0x2495d4(0x1e9)]){console[_0x2495d4(0x1f4)](generateCommandHelp(_0x1d6e08));return;}const _0x1587bb=buildConfigFromFlags(_0x4dea49);await initGlobalEnvironment(_0x1587bb);const _0x4c66ab=createPipelineEnv(_0x1587bb,_0x4dea49);_0x4c66ab['args']=cli[_0x2495d4(0x204)]['slice'](0x2),await runCommand(_0x1d6e08,_0x4c66ab);}function handleError(_0x1d261d){const _0x27695d=a0_0x4028;if(_0x1d261d instanceof CliError){_0x1d261d[_0x27695d(0x1e7)]===_0x27695d(0x1e8)&&(process[_0x27695d(0x1df)][_0x27695d(0x1ed)](_0x27695d(0x1f6)),process['exit'](0x0));console[_0x27695d(0x1f2)](_0x27695d(0x1ef)+_0x1d261d[_0x27695d(0x1fe)]);if(_0x1d261d['hint'])console['error'](_0x27695d(0x1e3)+_0x1d261d[_0x27695d(0x1f9)]);process['exit'](_0x1d261d[_0x27695d(0x201)]);}isUserCancellation(_0x1d261d)&&(process['stderr']['write'](_0x27695d(0x1f6)),process['exit'](0x0)),console[_0x27695d(0x1f2)]('Unexpected\x20error:',_0x1d261d),process[_0x27695d(0x1e4)](0x1);}function isUserCancellation(_0x4d75b2){const _0x30e134=a0_0x4028;if(!(_0x4d75b2 instanceof Error))return![];if(_0x4d75b2[_0x30e134(0x1f3)]==='ExitPromptError')return!![];if(_0x4d75b2[_0x30e134(0x1e7)]===_0x30e134(0x1e5))return!![];if(_0x4d75b2['code']===_0x30e134(0x1e0))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b747a,_0x5f47e9){const _0x12bb64=a1_0x27cb,_0x3861ec=_0x2b747a();while(!![]){try{const _0x15a59d=parseInt(_0x12bb64(0x1b9))/0x1+-parseInt(_0x12bb64(0x1bf))/0x2*(-parseInt(_0x12bb64(0x1c5))/0x3)+-parseInt(_0x12bb64(0x1b4))/0x4+parseInt(_0x12bb64(0x1cb))/0x5*(-parseInt(_0x12bb64(0x1bd))/0x6)+parseInt(_0x12bb64(0x1ba))/0x7*(-parseInt(_0x12bb64(0x1ae))/0x8)+-parseInt(_0x12bb64(0x1af))/0x9+parseInt(_0x12bb64(0x1c1))/0xa;if(_0x15a59d===_0x5f47e9)break;else _0x3861ec['push'](_0x3861ec['shift']());}catch(_0x4857fe){_0x3861ec['push'](_0x3861ec['shift']());}}}(a1_0x4949,0xbf9aa));function a1_0x27cb(_0x2a5d2d,_0x509f8f){_0x2a5d2d=_0x2a5d2d-0x1ae;const _0x4949a3=a1_0x4949();let _0x27cb8a=_0x4949a3[_0x2a5d2d];return _0x27cb8a;}import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';export function fingerprintAccessKey(_0x21548f){const _0x2bebe3=a1_0x27cb,_0x463c87=_0x21548f[_0x2bebe3(0x1c2)](),_0x41e68f=_0x463c87[_0x2bebe3(0x1b1)](-0x6)||'unknown',_0x32b66a=createHash(_0x2bebe3(0x1b5))[_0x2bebe3(0x1c7)](_0x463c87)[_0x2bebe3(0x1b7)](_0x2bebe3(0x1bc))['slice'](0x0,0xc);return _0x2bebe3(0x1c3)+_0x41e68f+'_'+_0x32b66a;}function a1_0x4949(){const _0x4a3ad4=['EXDEV','77431qbrlYE','196TDEvQi','stringify','hex','12xNcZfo','utf8','13766iEGPWK','appName','27866230vzsFgV','trim','ak_','EPERM','531SFNzcZ','code','update','homeDirName','cache','appCode','697945ZvjHDe','my-apps.json','155096JtfqOD','10208691UybEVn','.tmp','slice','parse','items','5364888cqztiA','sha256','isArray','digest'];a1_0x4949=function(){return _0x4a3ad4;};return a1_0x4949();}export function getAppCacheFilePath(_0xa33ad5,_0x58d1d6){const _0x5aecab=a1_0x27cb;return resolve(homedir(),PRODUCT_CONFIG[_0x5aecab(0x1c8)],_0x5aecab(0x1c9),_0xa33ad5,fingerprintAccessKey(_0x58d1d6),_0x5aecab(0x1cc));}export function readCachedAppList(_0x4f72ec,_0x38a2ab){const _0x530970=a1_0x27cb;if(!_0x38a2ab?.[_0x530970(0x1c2)]())return null;const _0x5c4932=getAppCacheFilePath(_0x4f72ec,_0x38a2ab);if(!existsSync(_0x5c4932))return null;try{const _0x58f981=readFileSync(_0x5c4932,'utf8');if(!_0x58f981['trim']())return null;const _0xf87414=JSON[_0x530970(0x1b2)](_0x58f981);if(!Array[_0x530970(0x1b6)](_0xf87414[_0x530970(0x1b3)]))return null;return _0xf87414;}catch{return null;}}export function writeCachedAppList(_0x2965d1,_0x1b7e5b,_0x5da392){const _0x439233=a1_0x27cb,_0x1831e0=getAppCacheFilePath(_0x2965d1,_0x1b7e5b),_0x2f8a60=dirname(_0x1831e0);!existsSync(_0x2f8a60)&&mkdirSync(_0x2f8a60,{'recursive':!![]});const _0x22de16=_0x1831e0+_0x439233(0x1b0);try{writeFileSync(_0x22de16,JSON[_0x439233(0x1bb)](_0x5da392,null,0x2)+'\x0a',{'encoding':_0x439233(0x1be),'mode':0x180});try{renameSync(_0x22de16,_0x1831e0);}catch(_0x278b3a){if(_0x278b3a[_0x439233(0x1c6)]===_0x439233(0x1c4)||_0x278b3a['code']===_0x439233(0x1b8)||_0x278b3a['code']==='EACCES'){writeFileSync(_0x1831e0,JSON[_0x439233(0x1bb)](_0x5da392,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x22de16);}catch{}}else throw _0x278b3a;}}catch(_0x43f7da){try{unlinkSync(_0x22de16);}catch{}throw _0x43f7da;}return _0x1831e0;}export function resolveCachedAppCode(_0x3cde14,_0x577e6e,_0x1e5765){const _0x5ba795=a1_0x27cb;if(!_0x3cde14)return undefined;const _0x222439=readCachedAppList(_0x577e6e,_0x1e5765),_0x5406c2=_0x222439?.[_0x5ba795(0x1b3)]['find'](_0x52c5a2=>_0x52c5a2[_0x5ba795(0x1c0)]===_0x3cde14);return _0x5406c2?.[_0x5ba795(0x1ca)]?.['trim']()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a2_0x5a39(){const _0x31be32=['Default\x20app\x20candidate\x20set\x20to\x20\x22','\x20cached\x20app(s)\x20for\x20env=\x22','pull','1ZHPbsB','Use\x20`','boolean','14WoMGoK','bool','length','1098582syEgHL','push','write','import','appcode','entries','Loaded\x20','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','Read\x20from\x20local\x20cache\x20only','Missing\x20app\x20name.','local','appOwnerName','766184EVlPnN','Read\x20app\x20list\x20from\x20local\x20cache\x20only','production','read','i18nInfo','Initialize\x20','../../context.js','735933VghjqS','find','filter','cache','validation','\x20app\x20use\x20<name>\x20[--global]','cachePath','no-cache','trim','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','str','map','App\x20\x22','2460095KFpYTC','accessKey','global','name','Available\x20remote\x20apps:\x20','875432VLuoye','globalPath','env','type','raw','../../commands/app/cache.js','use','Refreshed\x20app\x20cache\x20with\x20','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','items','isArray','3143504ltQpJw','Use\x20global\x20config\x20scope','\x22\x20not\x20found.','config','string','fetchedAt','../../commands/app/remote-source.js','init','defaultApp','Set\x20the\x20fallback\x20app\x20candidate','app','enableI18n','Usage:\x20','Target\x20environment\x20(default:\x20current\x20env)','appName','project-default','\x20config\x20file','args','source','nonInteractive','projectPath','1411614cZFVrw','from'];a2_0x5a39=function(){return _0x31be32;};return a2_0x5a39();}const a2_0xcc871d=a2_0x2638;(function(_0x503f7d,_0x2cf1ef){const _0x12002e=a2_0x2638,_0x1b6116=_0x503f7d();while(!![]){try{const _0x36a0e7=parseInt(_0x12002e(0x182))/0x1*(-parseInt(_0x12002e(0x144))/0x2)+parseInt(_0x12002e(0x14b))/0x3+-parseInt(_0x12002e(0x15d))/0x4+parseInt(_0x12002e(0x158))/0x5+-parseInt(_0x12002e(0x188))/0x6*(-parseInt(_0x12002e(0x185))/0x7)+-parseInt(_0x12002e(0x168))/0x8+parseInt(_0x12002e(0x17d))/0x9;if(_0x36a0e7===_0x2cf1ef)break;else _0x1b6116['push'](_0x1b6116['shift']());}catch(_0x4cf295){_0x1b6116['push'](_0x1b6116['shift']());}}}(a2_0x5a39,0x40d0a));import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':a2_0xcc871d(0x15a),'type':a2_0xcc871d(0x184),'description':a2_0xcc871d(0x169),'default':![]};function collectFlags(_0x4a73c6,_0x2a3b35){const _0x4fb623=a2_0xcc871d,_0x37c41c={};for(const _0x2e2db7 of _0x2a3b35){const _0x508dda=_0x2e2db7[_0x4fb623(0x160)]==='boolean'?_0x4a73c6[_0x4fb623(0x186)](_0x2e2db7[_0x4fb623(0x15b)]):_0x4a73c6[_0x4fb623(0x155)](_0x2e2db7[_0x4fb623(0x15b)]);if(_0x508dda!==''&&_0x508dda!==![])_0x37c41c[_0x2e2db7[_0x4fb623(0x15b)]]=_0x508dda;}if(_0x4a73c6[_0x4fb623(0x17b)])_0x37c41c[_0x4fb623(0x17b)]=!![];return _0x37c41c;}function a2_0x2638(_0x2a031d,_0x3a7691){_0x2a031d=_0x2a031d-0x13f;const _0x5a3983=a2_0x5a39();let _0x263807=_0x5a3983[_0x2a031d];return _0x263807;}function normalizeLanguages(_0x5c36e4){const _0x117733=a2_0xcc871d;if(!Array[_0x117733(0x167)](_0x5c36e4))return[];return _0x5c36e4['filter'](_0x5499cb=>typeof _0x5499cb==='string')[_0x117733(0x156)](_0x1ef5e8=>_0x1ef5e8['trim']())[_0x117733(0x14d)](Boolean);}function buildRemoteAppI18nFields(_0x38850d){const _0x2afdd8=a2_0xcc871d,_0x568368=normalizeLanguages(_0x38850d[_0x2afdd8(0x148)]?.['langs']);return{'enableI18n':typeof _0x38850d[_0x2afdd8(0x173)]===_0x2afdd8(0x184)?_0x38850d['enableI18n']:null,'languages':_0x568368,'i18nInfo':_0x38850d['i18nInfo']?{..._0x38850d[_0x2afdd8(0x148)],'langs':_0x568368[_0x2afdd8(0x187)]?_0x568368:null}:null};}const initDef={'service':a2_0xcc871d(0x172),'command':a2_0xcc871d(0x16f),'description':a2_0xcc871d(0x149)+PRODUCT_CONFIG['newConfigFileName']+a2_0xcc871d(0x178),'risk':a2_0xcc871d(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x5ca1f7){return await runInit(collectFlags(_0x5ca1f7,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0xcc871d(0x172),'command':'list','description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a2_0xcc871d(0x147),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0xcc871d(0x15f),'type':a2_0xcc871d(0x16c),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0xcc871d(0x142),'type':a2_0xcc871d(0x184),'description':a2_0xcc871d(0x145),'default':![]},{'name':'no-cache','type':a2_0xcc871d(0x184),'description':a2_0xcc871d(0x13f),'default':![]}],async 'execute'(_0x5c14ce){const _0x40bd9a=a2_0xcc871d,_0x48b1f2=_0x5c14ce[_0x40bd9a(0x155)]('env')||_0x5c14ce['envName']||getEnv()||_0x40bd9a(0x146),_0xb01ef6=_0x5c14ce[_0x40bd9a(0x186)](_0x40bd9a(0x142)),_0x43d608=_0x5c14ce['bool']('no-cache'),{readRawConfigWithLayers:_0x231409,resolveDefaultAppSource:_0x48eeea,getLocalAppAliases:_0x2b2359}=await import('../../context.js'),{getRemoteAppList:_0x2e7514}=await import('../../commands/app/remote-source.js'),{config:_0x24ed22,layers:_0x498fa0}=_0x231409(),_0x1e5f57=_0x48eeea(_0x498fa0),{defaultApp:_0x2ce1e3}=_0x24ed22,_0x2bfb8f=await _0x2e7514({'env':_0x48b1f2,'accessKey':_0x5c14ce[_0x40bd9a(0x159)],'localOnly':_0xb01ef6,'noCache':_0x43d608}),_0xaf430b=_0x2bfb8f[_0x40bd9a(0x166)][_0x40bd9a(0x156)](_0x31fd7b=>{const _0x8bbfcb=_0x40bd9a;return{'name':_0x31fd7b[_0x8bbfcb(0x176)],'appcode':_0x31fd7b['appCode'],'named':!![],'definedIn':'remote','isDefault':_0x31fd7b[_0x8bbfcb(0x176)]===_0x2ce1e3,...buildAppProfileListFields(_0x48b1f2),...buildRemoteAppI18nFields(_0x31fd7b),'source':_0x2bfb8f[_0x8bbfcb(0x17a)],'owner':_0x31fd7b[_0x8bbfcb(0x143)]??null,'status':_0x31fd7b['appPublishStatus']??null,'cachedAt':_0x2bfb8f[_0x8bbfcb(0x16d)]};}),_0x125c8f=_0x2b2359(_0x24ed22);let _0x4ef54f=0x0;for(const [_0x50a488,_0x157875]of Object[_0x40bd9a(0x18d)](_0x125c8f)){const _0x224361=typeof _0x157875['appcode']==='string'?_0x157875[_0x40bd9a(0x18c)][_0x40bd9a(0x153)]():'';if(!_0x224361)continue;_0x4ef54f+=0x1,_0xaf430b[_0x40bd9a(0x189)]({'name':_0x50a488,'appcode':_0x224361,'named':!![],'definedIn':'local','isDefault':_0x50a488===_0x2ce1e3,...buildAppProfileListFields(_0x48b1f2),'source':_0x40bd9a(0x16b),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0xaf430b,_0x5c14ce['mergedCli']);if(_0xaf430b['length']===0x0)return{'ok':!![],'data':[],'message':_0x2bfb8f[_0x40bd9a(0x17a)]===_0x40bd9a(0x14e)?'No\x20cached\x20apps\x20found.':'No\x20apps\x20found\x20on\x20the\x20platform.'};const _0x3d838c=_0xaf430b[_0x40bd9a(0x14c)](_0x16f27e=>_0x16f27e['isCurrent']===!![]),_0x43430c=_0x2ce1e3??_0x3d838c?.[_0x40bd9a(0x15b)]??null,_0x2ab00c={'env':_0x48b1f2,'source':_0x2bfb8f[_0x40bd9a(0x17a)],'fetchedAt':_0x2bfb8f['fetchedAt'],'cachePath':_0x2bfb8f[_0x40bd9a(0x151)],'globalPath':_0x498fa0[_0x40bd9a(0x15e)]??null,'projectPath':_0x498fa0[_0x40bd9a(0x17c)]??null,'defaultApp':_0x43430c,'defaultAppSource':_0x2ce1e3!=null?_0x1e5f57:null,'localAliasCount':_0x4ef54f};return{'ok':!![],'data':{'items':_0xaf430b,'meta':_0x2ab00c}};}},pullDef={'service':a2_0xcc871d(0x172),'command':a2_0xcc871d(0x181),'description':a2_0xcc871d(0x165),'risk':a2_0xcc871d(0x18a),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0xcc871d(0x15f),'type':a2_0xcc871d(0x16c),'description':a2_0xcc871d(0x175),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0xcc871d(0x184),'description':a2_0xcc871d(0x140),'default':![]},{'name':a2_0xcc871d(0x152),'type':'boolean','description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x2bb00f){const _0x1fdbda=a2_0xcc871d,_0x3b0468=_0x2bb00f[_0x1fdbda(0x155)](_0x1fdbda(0x15f))||_0x2bb00f['envName']||getEnv()||_0x1fdbda(0x146),_0x2f3872=_0x2bb00f[_0x1fdbda(0x186)](_0x1fdbda(0x142)),_0x359bb6=_0x2bb00f[_0x1fdbda(0x186)]('no-cache'),{getRemoteAppList:_0x149753}=await import(_0x1fdbda(0x16e)),_0x49fada=await _0x149753({'env':_0x3b0468,'accessKey':_0x2bb00f['accessKey'],'localOnly':_0x2f3872,'noCache':_0x359bb6});return{'ok':!![],'data':{'total':_0x49fada[_0x1fdbda(0x166)][_0x1fdbda(0x187)],'env':_0x3b0468,'source':_0x49fada[_0x1fdbda(0x17a)],'fetchedAt':_0x49fada['fetchedAt'],'cachePath':_0x49fada[_0x1fdbda(0x151)]},'message':_0x49fada[_0x1fdbda(0x17a)]===_0x1fdbda(0x14e)?_0x1fdbda(0x18e)+_0x49fada[_0x1fdbda(0x166)][_0x1fdbda(0x187)]+_0x1fdbda(0x180)+_0x3b0468+'\x22.':_0x1fdbda(0x164)+_0x49fada['items'][_0x1fdbda(0x187)]+'\x20app(s)\x20for\x20env=\x22'+_0x3b0468+'\x22.'};}},useDef={'service':a2_0xcc871d(0x172),'command':a2_0xcc871d(0x163),'description':a2_0xcc871d(0x171),'risk':a2_0xcc871d(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0xcc871d(0x15b),'description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x4d323b){const _0x444370=a2_0xcc871d;if(!_0x4d323b['args'][0x0])throw CliErrors[_0x444370(0x14f)](_0x444370(0x141),_0x444370(0x174)+CLI_BIN_NAME+_0x444370(0x150));},async 'execute'(_0x49f317){const _0x413d9e=a2_0xcc871d,_0x1283af=_0x49f317[_0x413d9e(0x179)][0x0];if(!_0x1283af)throw CliErrors[_0x413d9e(0x14f)](_0x413d9e(0x141),'Usage:\x20'+CLI_BIN_NAME+_0x413d9e(0x150));const {buildConfigFromFlags:_0x5ed999,resolveLocalAppAliasCode:_0x2e6bf8}=await import(_0x413d9e(0x14a)),{readCachedAppList:_0x570d8a}=await import(_0x413d9e(0x162)),_0x239abd=_0x49f317[_0x413d9e(0x155)](_0x413d9e(0x15f)),_0x49c1dc=_0x5ed999(_0x239abd?{'env':_0x239abd}:{}),_0x1192b1=_0x570d8a(_0x49c1dc[_0x413d9e(0x15f)],_0x49c1dc[_0x413d9e(0x159)]),_0x1b4c40=_0x1192b1?.[_0x413d9e(0x166)][_0x413d9e(0x14c)](_0x18cf6f=>_0x18cf6f[_0x413d9e(0x176)]===_0x1283af),_0x5d1add=_0x2e6bf8(_0x49c1dc[_0x413d9e(0x161)]??{},_0x1283af);if(!_0x1b4c40&&!_0x5d1add&&_0x49c1dc[_0x413d9e(0x170)]!==_0x1283af){const _0x13e5ab=[..._0x1192b1?.[_0x413d9e(0x166)]['map'](_0xf53896=>_0xf53896[_0x413d9e(0x176)])??[]],_0x1d58df=_0x13e5ab['length']===0x0?_0x413d9e(0x183)+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x1283af+'.appcode\x20to\x20.lovrabet.json.':_0x413d9e(0x15c)+Array[_0x413d9e(0x17e)](new Set(_0x13e5ab))['join'](',\x20')+_0x413d9e(0x154);throw CliErrors[_0x413d9e(0x14f)](_0x413d9e(0x157)+_0x1283af+_0x413d9e(0x16a),_0x1d58df);}const _0x385827=_0x49f317[_0x413d9e(0x186)]('global');let _0x42b29e;if(_0x385827)_0x42b29e={'global':!![]};else{const {isInProject:_0x548b0e}=await import('../../context.js'),_0x96c557=_0x548b0e();_0x42b29e=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x413d9e(0x177),'inProject':_0x96c557}));}const _0x48ce86=readConfig(_0x42b29e);return _0x48ce86[_0x413d9e(0x170)]=_0x1283af,writeConfig(_0x48ce86,_0x42b29e),{'ok':!![],'message':_0x413d9e(0x17f)+_0x1283af+'\x22'+scopeLabel(_0x42b29e)+'.'};}},importDef={'service':'app','command':a2_0xcc871d(0x18b),'description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a2_0xcc871d(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x34882b){return await runInitImport(collectFlags(_0x34882b,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a2_0x3eb605=a2_0x54f1;(function(_0x10cfe9,_0x3e9009){const _0x8597b6=a2_0x54f1,_0x2234ef=_0x10cfe9();while(!![]){try{const _0x4095b6=parseInt(_0x8597b6(0x1ea))/0x1*(-parseInt(_0x8597b6(0x1da))/0x2)+parseInt(_0x8597b6(0x1fa))/0x3+-parseInt(_0x8597b6(0x1de))/0x4*(parseInt(_0x8597b6(0x208))/0x5)+-parseInt(_0x8597b6(0x1f2))/0x6+parseInt(_0x8597b6(0x1db))/0x7*(-parseInt(_0x8597b6(0x1e9))/0x8)+parseInt(_0x8597b6(0x21f))/0x9*(-parseInt(_0x8597b6(0x219))/0xa)+parseInt(_0x8597b6(0x20a))/0xb;if(_0x4095b6===_0x3e9009)break;else _0x2234ef['push'](_0x2234ef['shift']());}catch(_0x7abfbd){_0x2234ef['push'](_0x2234ef['shift']());}}}(a2_0x9d94,0xb6426));import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';function a2_0x9d94(){const _0xadc541=['cachePath','../../context.js','Default\x20app\x20candidate\x20set\x20to\x20\x22','items','../../commands/app/remote-source.js','851346FlLLoj','find','Filter\x20by\x20environment\x20(default:\x20current\x20env)','args','import','source','entries','pull','trim','defaultApp','Available\x20remote\x20apps:\x20','\x20app\x20use\x20<name>\x20[--global]','Target\x20environment\x20(default:\x20current\x20env)','isArray','4893810htusjz','validation','50864869FWVHSD','bool','isCurrent','boolean','accessKey','list','Use\x20`','map','use','appName','App\x20\x22','Missing\x20app\x20name.','global','appOwnerName','join','2265590OFBnth','newConfigFileName','env','appcode','Loaded\x20','no-cache','18hthvlf','read','No\x20apps\x20found\x20on\x20the\x20platform.','mergedCli','local','envName','fetchedAt','Remote\x20app\x20name\x20to\x20activate','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','../../commands/app/cache.js','production','langs','write','Refreshed\x20app\x20cache\x20with\x20','10wwRibN','49ueJXzF','i18nInfo','No\x20cached\x20apps\x20found.','4eBLSiy','nonInteractive','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','enableI18n','str','name','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','app','Set\x20the\x20fallback\x20app\x20candidate','cache','\x20app(s)\x20for\x20env=\x22','1593976FbOuGM','166570Hlemyy','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','Usage:\x20','remote','length','raw','Use\x20global\x20config\x20scope','\x20config\x20file','3011208eQXnoa','from','string'];a2_0x9d94=function(){return _0xadc541;};return a2_0x9d94();}const GLOBAL_FLAG={'name':a2_0x3eb605(0x216),'type':a2_0x3eb605(0x20d),'description':a2_0x3eb605(0x1f0),'default':![]};function collectFlags(_0x2e8409,_0x4c7913){const _0x2edfee=a2_0x3eb605,_0x1f8264={};for(const _0x2e0585 of _0x4c7913){const _0x3c34cd=_0x2e0585['type']===_0x2edfee(0x20d)?_0x2e8409[_0x2edfee(0x20b)](_0x2e0585[_0x2edfee(0x1e3)]):_0x2e8409[_0x2edfee(0x1e2)](_0x2e0585[_0x2edfee(0x1e3)]);if(_0x3c34cd!==''&&_0x3c34cd!==![])_0x1f8264[_0x2e0585[_0x2edfee(0x1e3)]]=_0x3c34cd;}if(_0x2e8409['nonInteractive'])_0x1f8264[_0x2edfee(0x1df)]=!![];return _0x1f8264;}function normalizeLanguages(_0x2a812b){const _0x2d786b=a2_0x3eb605;if(!Array[_0x2d786b(0x207)](_0x2a812b))return[];return _0x2a812b['filter'](_0x2f7f57=>typeof _0x2f7f57===_0x2d786b(0x1f4))[_0x2d786b(0x211)](_0x1c95d6=>_0x1c95d6[_0x2d786b(0x202)]())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x2acc31){const _0x215e16=a2_0x3eb605,_0x2496df=normalizeLanguages(_0x2acc31[_0x215e16(0x1dc)]?.[_0x215e16(0x1d7)]);return{'enableI18n':typeof _0x2acc31['enableI18n']===_0x215e16(0x20d)?_0x2acc31[_0x215e16(0x1e1)]:null,'languages':_0x2496df,'i18nInfo':_0x2acc31[_0x215e16(0x1dc)]?{..._0x2acc31[_0x215e16(0x1dc)],'langs':_0x2496df[_0x215e16(0x1ee)]?_0x2496df:null}:null};}const initDef={'service':a2_0x3eb605(0x1e5),'command':'init','description':'Initialize\x20'+PRODUCT_CONFIG[a2_0x3eb605(0x21a)]+a2_0x3eb605(0x1f1),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x376172){return await runInit(collectFlags(_0x376172,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x3eb605(0x1e5),'command':a2_0x3eb605(0x20f),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a2_0x3eb605(0x220),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x3eb605(0x21b),'type':'string','description':a2_0x3eb605(0x1fc),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x3eb605(0x223),'type':a2_0x3eb605(0x20d),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x3eb605(0x21e),'type':'boolean','description':a2_0x3eb605(0x227),'default':![]}],async 'execute'(_0x106307){const _0x80c121=a2_0x3eb605,_0x1dca1a=_0x106307[_0x80c121(0x1e2)](_0x80c121(0x21b))||_0x106307[_0x80c121(0x224)]||getEnv()||_0x80c121(0x229),_0x17a60e=_0x106307['bool'](_0x80c121(0x223)),_0x10c4f5=_0x106307[_0x80c121(0x20b)](_0x80c121(0x21e)),{readRawConfigWithLayers:_0x5d2efb,resolveDefaultAppSource:_0x332a67,getLocalAppAliases:_0x128851}=await import(_0x80c121(0x1f6)),{getRemoteAppList:_0x18af74}=await import(_0x80c121(0x1f9)),{config:_0x1b5f0e,layers:_0x2be831}=_0x5d2efb(),_0xf1b4a2=_0x332a67(_0x2be831),{defaultApp:_0x116f07}=_0x1b5f0e,_0x5d5d73=await _0x18af74({'env':_0x1dca1a,'accessKey':_0x106307[_0x80c121(0x20e)],'localOnly':_0x17a60e,'noCache':_0x10c4f5}),_0x245ab1=_0x5d5d73[_0x80c121(0x1f8)]['map'](_0x160cb4=>{const _0x2dde83=_0x80c121;return{'name':_0x160cb4[_0x2dde83(0x213)],'appcode':_0x160cb4['appCode'],'named':!![],'definedIn':_0x2dde83(0x1ed),'isDefault':_0x160cb4[_0x2dde83(0x213)]===_0x116f07,...buildAppProfileListFields(_0x1dca1a),...buildRemoteAppI18nFields(_0x160cb4),'source':_0x5d5d73[_0x2dde83(0x1ff)],'owner':_0x160cb4[_0x2dde83(0x217)]??null,'status':_0x160cb4['appPublishStatus']??null,'cachedAt':_0x5d5d73[_0x2dde83(0x225)]};}),_0x4d5dba=_0x128851(_0x1b5f0e);let _0x527693=0x0;for(const [_0x1da743,_0x46e52c]of Object[_0x80c121(0x200)](_0x4d5dba)){const _0x453c07=typeof _0x46e52c[_0x80c121(0x21c)]===_0x80c121(0x1f4)?_0x46e52c['appcode'][_0x80c121(0x202)]():'';if(!_0x453c07)continue;_0x527693+=0x1,_0x245ab1['push']({'name':_0x1da743,'appcode':_0x453c07,'named':!![],'definedIn':_0x80c121(0x223),'isDefault':_0x1da743===_0x116f07,...buildAppProfileListFields(_0x1dca1a),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x245ab1,_0x106307[_0x80c121(0x222)]);if(_0x245ab1[_0x80c121(0x1ee)]===0x0)return{'ok':!![],'data':[],'message':_0x5d5d73[_0x80c121(0x1ff)]===_0x80c121(0x1e7)?_0x80c121(0x1dd):_0x80c121(0x221)};const _0x51befc=_0x245ab1[_0x80c121(0x1fb)](_0x2812b0=>_0x2812b0[_0x80c121(0x20c)]===!![]),_0x35caea=_0x116f07??_0x51befc?.[_0x80c121(0x1e3)]??null,_0xcf5a2d={'env':_0x1dca1a,'source':_0x5d5d73[_0x80c121(0x1ff)],'fetchedAt':_0x5d5d73['fetchedAt'],'cachePath':_0x5d5d73[_0x80c121(0x1f5)],'globalPath':_0x2be831['globalPath']??null,'projectPath':_0x2be831['projectPath']??null,'defaultApp':_0x35caea,'defaultAppSource':_0x116f07!=null?_0xf1b4a2:null,'localAliasCount':_0x527693};return{'ok':!![],'data':{'items':_0x245ab1,'meta':_0xcf5a2d}};}},pullDef={'service':'app','command':a2_0x3eb605(0x201),'description':a2_0x3eb605(0x1eb),'risk':a2_0x3eb605(0x1d8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x3eb605(0x21b),'type':a2_0x3eb605(0x1f4),'description':a2_0x3eb605(0x206),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x3eb605(0x20d),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x3eb605(0x21e),'type':a2_0x3eb605(0x20d),'description':a2_0x3eb605(0x227),'default':![]}],async 'execute'(_0x239247){const _0x18a783=a2_0x3eb605,_0x591b76=_0x239247[_0x18a783(0x1e2)](_0x18a783(0x21b))||_0x239247[_0x18a783(0x224)]||getEnv()||_0x18a783(0x229),_0xe1a03b=_0x239247[_0x18a783(0x20b)]('local'),_0x2d55ab=_0x239247[_0x18a783(0x20b)](_0x18a783(0x21e)),{getRemoteAppList:_0x4ef556}=await import('../../commands/app/remote-source.js'),_0xdc10f8=await _0x4ef556({'env':_0x591b76,'accessKey':_0x239247[_0x18a783(0x20e)],'localOnly':_0xe1a03b,'noCache':_0x2d55ab});return{'ok':!![],'data':{'total':_0xdc10f8[_0x18a783(0x1f8)][_0x18a783(0x1ee)],'env':_0x591b76,'source':_0xdc10f8[_0x18a783(0x1ff)],'fetchedAt':_0xdc10f8[_0x18a783(0x225)],'cachePath':_0xdc10f8[_0x18a783(0x1f5)]},'message':_0xdc10f8[_0x18a783(0x1ff)]===_0x18a783(0x1e7)?_0x18a783(0x21d)+_0xdc10f8['items'][_0x18a783(0x1ee)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x591b76+'\x22.':_0x18a783(0x1d9)+_0xdc10f8[_0x18a783(0x1f8)]['length']+_0x18a783(0x1e8)+_0x591b76+'\x22.'};}},useDef={'service':a2_0x3eb605(0x1e5),'command':a2_0x3eb605(0x212),'description':a2_0x3eb605(0x1e6),'risk':a2_0x3eb605(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x3eb605(0x1e3),'description':a2_0x3eb605(0x226),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x34c546){const _0x562024=a2_0x3eb605;if(!_0x34c546[_0x562024(0x1fd)][0x0])throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x562024(0x205));},async 'execute'(_0x57e240){const _0xb80206=a2_0x3eb605,_0x3951e2=_0x57e240['args'][0x0];if(!_0x3951e2)throw CliErrors[_0xb80206(0x209)](_0xb80206(0x215),_0xb80206(0x1ec)+CLI_BIN_NAME+_0xb80206(0x205));const {buildConfigFromFlags:_0x2e0903,resolveLocalAppAliasCode:_0x35d360}=await import('../../context.js'),{readCachedAppList:_0x256c09}=await import(_0xb80206(0x228)),_0x13274b=_0x57e240[_0xb80206(0x1e2)](_0xb80206(0x21b)),_0x26a301=_0x2e0903(_0x13274b?{'env':_0x13274b}:{}),_0x3ec6a8=_0x256c09(_0x26a301['env'],_0x26a301[_0xb80206(0x20e)]),_0x37b883=_0x3ec6a8?.[_0xb80206(0x1f8)]['find'](_0x1cbeee=>_0x1cbeee[_0xb80206(0x213)]===_0x3951e2),_0x2668d1=_0x35d360(_0x26a301[_0xb80206(0x1ef)]??{},_0x3951e2);if(!_0x37b883&&!_0x2668d1&&_0x26a301['defaultApp']!==_0x3951e2){const _0x592f8e=[..._0x3ec6a8?.[_0xb80206(0x1f8)][_0xb80206(0x211)](_0x4d9692=>_0x4d9692[_0xb80206(0x213)])??[]],_0x518300=_0x592f8e[_0xb80206(0x1ee)]===0x0?_0xb80206(0x210)+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x3951e2+'.appcode\x20to\x20.lovrabet.json.':_0xb80206(0x204)+Array[_0xb80206(0x1f3)](new Set(_0x592f8e))[_0xb80206(0x218)](',\x20')+_0xb80206(0x1e0);throw CliErrors['validation'](_0xb80206(0x214)+_0x3951e2+'\x22\x20not\x20found.',_0x518300);}const _0x28594f=_0x57e240['bool'](_0xb80206(0x216));let _0x696a5b;if(_0x28594f)_0x696a5b={'global':!![]};else{const {isInProject:_0x109ac6}=await import(_0xb80206(0x1f6)),_0x435e7f=_0x109ac6();_0x696a5b=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x435e7f}));}const _0x47b750=readConfig(_0x696a5b);return _0x47b750[_0xb80206(0x203)]=_0x3951e2,writeConfig(_0x47b750,_0x696a5b),{'ok':!![],'message':_0xb80206(0x1f7)+_0x3951e2+'\x22'+scopeLabel(_0x696a5b)+'.'};}},importDef={'service':a2_0x3eb605(0x1e5),'command':a2_0x3eb605(0x1fe),'description':a2_0x3eb605(0x1e4),'risk':a2_0x3eb605(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x3e272f){return await runInitImport(collectFlags(_0x3e272f,initImportFlagDefs)),{'ok':!![]};}};function a2_0x54f1(_0x5941aa,_0x23ca2d){_0x5941aa=_0x5941aa-0x1d7;const _0x9d944e=a2_0x9d94();let _0x54f179=_0x9d944e[_0x5941aa];return _0x54f179;}export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c8810,_0x3a21ec){const _0x5ef5be=a3_0x2e31,_0x3783da=_0x4c8810();while(!![]){try{const _0x29dc56=-parseInt(_0x5ef5be(0x1c5))/0x1+parseInt(_0x5ef5be(0x1c1))/0x2+-parseInt(_0x5ef5be(0x1ba))/0x3*(-parseInt(_0x5ef5be(0x1b9))/0x4)+parseInt(_0x5ef5be(0x1c3))/0x5*(parseInt(_0x5ef5be(0x1c2))/0x6)+-parseInt(_0x5ef5be(0x1bd))/0x7+parseInt(_0x5ef5be(0x1bf))/0x8*(-parseInt(_0x5ef5be(0x1c0))/0x9)+parseInt(_0x5ef5be(0x1bb))/0xa*(parseInt(_0x5ef5be(0x1c4))/0xb);if(_0x29dc56===_0x3a21ec)break;else _0x3783da['push'](_0x3783da['shift']());}catch(_0x406eef){_0x3783da['push'](_0x3783da['shift']());}}}(a3_0x4dff,0x26184));function a3_0x2e31(_0x4e9e8c,_0x4d4ee5){_0x4e9e8c=_0x4e9e8c-0x1b9;const _0x4dfffb=a3_0x4dff();let _0x2e319d=_0x4dfffb[_0x4e9e8c];return _0x2e319d;}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 _0x7a28e9=a3_0x2e31,_0x1b1614=join(__dirname,'../../../mock/app-list.json'),_0x562e18=readFileSync(_0x1b1614,_0x7a28e9(0x1bc));return JSON[_0x7a28e9(0x1be)](_0x562e18);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x5e1373=a3_0x2e31,_0xeadca1=getMockAppList();if(!_0xeadca1[_0x5e1373(0x1c6)])throw new Error('Mock\x20API\x20error:\x20'+_0xeadca1[_0x5e1373(0x1c8)]+'\x20('+_0xeadca1['errorCode']+')');return _0xeadca1['data'][_0x5e1373(0x1c7)];}function a3_0x4dff(){const _0x2123be=['1135354riLqte','206830ZyMhqm','success','tableData','errorMsg','4cGaeIX','530493PsPGWc','10DIGlZL','utf-8','2068290adebar','parse','2760NqTvMC','603stZFWB','390266vLXtDH','6SmTCSV','1031365QCKwYz'];a3_0x4dff=function(){return _0x2123be;};return a3_0x4dff();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x519e9c,_0x1958de){const _0x3d28aa=a4_0x1e78,_0x12f358=_0x519e9c();while(!![]){try{const _0x1153a4=parseInt(_0x3d28aa(0x115))/0x1*(-parseInt(_0x3d28aa(0x124))/0x2)+parseInt(_0x3d28aa(0x117))/0x3*(parseInt(_0x3d28aa(0x122))/0x4)+-parseInt(_0x3d28aa(0x11c))/0x5+parseInt(_0x3d28aa(0x116))/0x6+parseInt(_0x3d28aa(0x11d))/0x7+parseInt(_0x3d28aa(0x11f))/0x8+-parseInt(_0x3d28aa(0x125))/0x9;if(_0x1153a4===_0x1958de)break;else _0x12f358['push'](_0x12f358['shift']());}catch(_0x56ebf6){_0x12f358['push'](_0x12f358['shift']());}}}(a4_0x300d,0xf13d4));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x38da3f=a4_0x1e78,_0x570fa7=(productEnv('APP_LIST_SOURCE')||'')[_0x38da3f(0x123)]()[_0x38da3f(0x11b)]();return _0x570fa7===_0x38da3f(0x118);}function a4_0x1e78(_0x19a1a8,_0x1954ac){_0x19a1a8=_0x19a1a8-0x115;const _0x300de2=a4_0x300d();let _0x1e783c=_0x300de2[_0x19a1a8];return _0x1e783c;}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x7014be){const _0x361f74=a4_0x1e78,{env:_0x27b9e1,accessKey:_0x52a256,localOnly:localOnly=![],noCache:noCache=![]}=_0x7014be,_0x14a0c5=readCachedAppList(_0x27b9e1,_0x52a256),_0x447bc2=_0x52a256?.[_0x361f74(0x123)]()?getAppCacheFilePath(_0x27b9e1,_0x52a256):null;if(localOnly)return{'items':_0x14a0c5?.[_0x361f74(0x11e)]??[],'source':'cache','fetchedAt':_0x14a0c5?.[_0x361f74(0x120)]??null,'cachePath':_0x447bc2};try{const _0x5848b6=await getRemoteAppItems(),_0xec923b=shouldUseMockRemoteApps()?'mock':_0x361f74(0x11a),_0x117413=new Date()[_0x361f74(0x119)](),_0x5a7305=_0x52a256?.[_0x361f74(0x123)]()?writeCachedAppList(_0x27b9e1,_0x52a256,{'env':_0x27b9e1,'fetchedAt':_0x117413,'source':_0xec923b,'items':_0x5848b6}):null;return{'items':_0x5848b6,'source':_0xec923b,'fetchedAt':_0x117413,'cachePath':_0x5a7305};}catch(_0x2fb956){if(!noCache&&_0x14a0c5)return{'items':_0x14a0c5[_0x361f74(0x11e)],'source':_0x361f74(0x121),'fetchedAt':_0x14a0c5[_0x361f74(0x120)],'cachePath':_0x447bc2};throw _0x2fb956;}}function a4_0x300d(){const _0x55d05c=['remote','toLowerCase','4566355ytKrUO','8584772tWlkIN','items','3063984phtTCT','fetchedAt','cache','10328EwTPcq','trim','2015918CzvNbe','11229498OjCNjW','1qSFOWa','9724416qCBTcG','1077mHmyZK','mock','toISOString'];a4_0x300d=function(){return _0x55d05c;};return a4_0x300d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x407516,_0xdfad91){const _0x16120b=a5_0x1b6b,_0x85c90a=_0x407516();while(!![]){try{const _0x2fe0f8=parseInt(_0x16120b(0x99))/0x1+parseInt(_0x16120b(0x97))/0x2*(parseInt(_0x16120b(0x8e))/0x3)+-parseInt(_0x16120b(0x8b))/0x4+-parseInt(_0x16120b(0x98))/0x5*(-parseInt(_0x16120b(0x95))/0x6)+parseInt(_0x16120b(0x92))/0x7*(parseInt(_0x16120b(0x83))/0x8)+parseInt(_0x16120b(0x84))/0x9+parseInt(_0x16120b(0x8a))/0xa*(-parseInt(_0x16120b(0x88))/0xb);if(_0x2fe0f8===_0xdfad91)break;else _0x85c90a['push'](_0x85c90a['shift']());}catch(_0x1b5015){_0x85c90a['push'](_0x85c90a['shift']());}}}(a5_0x2173,0x5298c));function a5_0x1b6b(_0x29eb5f,_0x5820e0){_0x29eb5f=_0x29eb5f-0x82;const _0x2173a9=a5_0x2173();let _0x1b6b39=_0x2173a9[_0x29eb5f];return _0x1b6b39;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';function a5_0x2173(){const _0x1660cc=['587328jddknA','named','isCurrent','416931EtYwDG','local','find','definedIn','9947Jqcdkg','trim','name','114rTfwWs','defaultApp','6KnyvqM','53540BPTQdg','397681uwzMkJ','global','3112pzKevK','4978575XqdMqh','project','currentApp','appCode','901373pMRRZs','appcode','200bXXGxp'];a5_0x2173=function(){return _0x1660cc;};return a5_0x2173();}export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x31904f,_0x3786b4){const _0x56ec77=a5_0x1b6b;if(!_0x3786b4)return;const _0x5189d2=!!(_0x3786b4[_0x56ec77(0x86)]??_0x3786b4[_0x56ec77(0x96)]);for(const _0x342e1f of _0x31904f){_0x342e1f[_0x56ec77(0x8d)]=![];}const _0x34ba7e=_0x3786b4['appCode']!=null?String(_0x3786b4[_0x56ec77(0x87)])[_0x56ec77(0x93)]():'';if(_0x5189d2){const _0xcb9cbd=_0x3786b4[_0x56ec77(0x86)]??_0x3786b4['defaultApp'];if(_0xcb9cbd){const _0x54516b=_0x31904f[_0x56ec77(0x90)](_0x1f20a4=>_0x1f20a4[_0x56ec77(0x8c)]===!![]&&_0x1f20a4[_0x56ec77(0x94)]===_0xcb9cbd&&_0x1f20a4[_0x56ec77(0x91)]===_0x56ec77(0x8f)),_0x32323f=_0x54516b??_0x31904f[_0x56ec77(0x90)](_0x5a18f1=>_0x5a18f1['named']===!![]&&_0x5a18f1['name']===_0xcb9cbd);_0x32323f&&(_0x32323f[_0x56ec77(0x8d)]=!![]);}return;}if(!_0x34ba7e)return;for(const _0x3484dc of _0x31904f){String(_0x3484dc[_0x56ec77(0x89)]??'')[_0x56ec77(0x93)]()===_0x34ba7e&&(_0x3484dc[_0x56ec77(0x8d)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x2eedd7){const _0x5d5cbc=a5_0x1b6b;return formatScopeLabel(_0x2eedd7[_0x5d5cbc(0x82)]?_0x5d5cbc(0x82):_0x5d5cbc(0x85));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x1200a1=a6_0x271d;(function(_0x3a8d04,_0x2da0a7){const _0x4d66f0=a6_0x271d,_0x185f17=_0x3a8d04();while(!![]){try{const _0x227408=parseInt(_0x4d66f0(0xab))/0x1+parseInt(_0x4d66f0(0xbd))/0x2+parseInt(_0x4d66f0(0xb5))/0x3*(-parseInt(_0x4d66f0(0xb2))/0x4)+-parseInt(_0x4d66f0(0xc2))/0x5+parseInt(_0x4d66f0(0x91))/0x6+parseInt(_0x4d66f0(0xbc))/0x7*(-parseInt(_0x4d66f0(0x7e))/0x8)+-parseInt(_0x4d66f0(0x8a))/0x9;if(_0x227408===_0x2da0a7)break;else _0x185f17['push'](_0x185f17['shift']());}catch(_0x3fee45){_0x185f17['push'](_0x185f17['shift']());}}}(a6_0xeefc,0x797a4));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x1e41f7=a6_0x271d;writeCliSideChannelLine(_0x1e41f7(0x93)+PRODUCT_CONFIG[_0x1e41f7(0x80)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x1e41f7(0x86));}function a6_0x271d(_0x474b35,_0x32b884){_0x474b35=_0x474b35-0x79;const _0xeefc81=a6_0xeefc();let _0x271daa=_0xeefc81[_0x474b35];return _0x271daa;}function buildAccessKeySetupGuide(){const _0x283ac2=a6_0x271d;return[_0x283ac2(0x93)+PRODUCT_CONFIG[_0x283ac2(0x80)]+':',USER_ACCESS_KEY_CREATE_URL,_0x283ac2(0x7a)+CLI_BIN_NAME+_0x283ac2(0xad)][_0x283ac2(0xb3)]('\x0a');}function canPromptForAccessKey(_0x3cefc8){const _0x175057=a6_0x271d;return!_0x3cefc8[_0x175057(0xba)]&&process['stdin']['isTTY']!==![]&&process[_0x175057(0x89)][_0x175057(0xcb)]!==![];}function a6_0xeefc(){const _0x2b3c4c=['Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Auth\x20config\x20reinitialized\x20in\x20','stdout','850239tWWmsG','Clear\x20accessKey\x20from\x20config','validation','yes','\x20(via\x20','read','Read\x20from\x20global\x20config\x20(default)','3834762fkZouy','newConfigFileName','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','string','trim','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','length','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','boolean','auth','project','production','daily','ClientAk','AccessKey\x20cleared\x20from\x20','global','\x20config','ACCESS_KEY','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','global-default','\x20scope.','\x20doctor','Missing\x20accessKey.','Shorthand\x20for\x20--access-key','slice','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','263938IaJHCl','info','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','AccessKey\x20(ak_xxx...)','Write\x20to\x20global\x20config\x20(default)','Option\x20C:\x20environment\x20variable','test','10148LjBUGq','join','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','1059LlivVn','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','str','status','=ak_xxx','nonInteractive','accessKey','872067objsNU','1832210nAajXd','env','\x20\x20export\x20','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','\x20Verify:\x20','1034925yaQdlr','access-key','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','\x20Current\x20env:\x20','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','Auth\x20mode:\x20','AccessKey\x20saved\x20to\x20','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20env\x20var','isTTY','Option\x20B:\x20apps\x20config\x20(','\x20auth\x20status','push','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20config.','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Option\x20A:\x20','8QxjJFb','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','userCenterDisplayName','No\x20AccessKey\x20found\x20in\x20','Invalid\x20accessKey\x20format:\x20\x22','bool','write','Show\x20current\x20authentication\x20status','\x20auth\x20login\x20--access-key\x20<ak_xxx>'];a6_0xeefc=function(){return _0x2b3c4c;};return a6_0xeefc();}function resolveAuthScopeFlags(_0x454766){const _0x272c0a=a6_0x271d;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x454766[_0x272c0a(0x83)]('global'),'explicitProject':_0x454766[_0x272c0a(0x83)](_0x272c0a(0x9b)),'policy':_0x272c0a(0xa4)}));}async function resolveAuthWriteInput(_0x512bf9){const _0x269ba1=a6_0x271d;let _0x539345=(_0x512bf9[_0x269ba1(0xb7)](_0x269ba1(0xc3))||_0x512bf9[_0x269ba1(0xb7)]('ak')||'')[_0x269ba1(0x95)]();const _0x290192=(_0x512bf9[_0x269ba1(0xb7)]('env')||'')[_0x269ba1(0x95)]();if(!_0x539345&&canPromptForAccessKey(_0x512bf9))try{showAccessKeyCreateHint(),_0x539345=await promptAccessKey('');}catch(_0x287988){if(isAbortPrompt(_0x287988))throw CliErrors['cancelled']();throw _0x287988;}if(!_0x539345)throw CliErrors[_0x269ba1(0x8c)](_0x269ba1(0xa7),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x269ba1(0xb1)](_0x539345))throw CliErrors['validation'](_0x269ba1(0x82)+_0x539345+'\x22',_0x269ba1(0xa3));if(!_0x290192)return{'accessKey':_0x539345};const _0x1328bd=normalizeEnv(_0x290192);return{'accessKey':_0x539345,'env':isDaily(_0x1328bd)?_0x269ba1(0x9d):isDev(_0x1328bd)?'development':_0x269ba1(0x9c)};}export const authDefinitions=[{'service':a6_0x1200a1(0x9a),'command':'login','description':a6_0x1200a1(0x7c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1200a1(0xc3),'type':a6_0x1200a1(0x94),'description':a6_0x1200a1(0xae)},{'name':'ak','type':a6_0x1200a1(0x94),'description':a6_0x1200a1(0xa8)},{'name':'global','type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x1200a1(0x9b),'type':a6_0x1200a1(0x99),'description':a6_0x1200a1(0x98),'default':![]}],async 'execute'(_0x38d659){const _0x2e5502=a6_0x1200a1;if(_0x38d659['bool'](_0x2e5502(0x8d)))throw CliErrors[_0x2e5502(0x8c)](_0x2e5502(0xc9),'Use\x20`'+CLI_BIN_NAME+_0x2e5502(0xc6)+CLI_BIN_NAME+_0x2e5502(0xb6));const _0x2db73c=(_0x38d659[_0x2e5502(0xb7)](_0x2e5502(0xc3))||_0x38d659[_0x2e5502(0xb7)]('ak')||'')[_0x2e5502(0x95)]();if(!_0x2db73c&&_0x38d659['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x3ae83a=await resolveAuthWriteInput(_0x38d659),_0x5cb814=resolveAuthScopeFlags(_0x38d659),_0x544988=readScopedConfig(_0x5cb814);_0x544988[_0x2e5502(0xbb)]=_0x3ae83a['accessKey'];_0x3ae83a[_0x2e5502(0xbe)]&&(_0x544988[_0x2e5502(0xbe)]=_0x3ae83a[_0x2e5502(0xbe)]);writeScopedConfig(_0x544988,_0x5cb814);const _0x46ea42=_0x5cb814[_0x2e5502(0xa0)]?_0x2e5502(0xa0):_0x2e5502(0x9b),_0x2fd320=_0x544988[_0x2e5502(0xbe)]?_0x2e5502(0xc5)+_0x544988[_0x2e5502(0xbe)]+'.':'';return{'ok':!![],'message':_0x2e5502(0xc8)+_0x46ea42+_0x2e5502(0x7b)+_0x2fd320+_0x2e5502(0xc1)+CLI_BIN_NAME+_0x2e5502(0xcd)};}},{'service':'auth','command':'init','description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1200a1(0xc3),'type':a6_0x1200a1(0x94),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a6_0x1200a1(0x94),'description':a6_0x1200a1(0xa8)},{'name':'env','type':a6_0x1200a1(0x94),'description':a6_0x1200a1(0xc4)},{'name':a6_0x1200a1(0xa0),'type':a6_0x1200a1(0x99),'description':a6_0x1200a1(0xaf),'default':!![]},{'name':a6_0x1200a1(0x9b),'type':a6_0x1200a1(0x99),'description':a6_0x1200a1(0x98),'default':![]}],async 'execute'(_0x2ff284){const _0x29a126=a6_0x1200a1,_0x48e6f5=await resolveAuthWriteInput(_0x2ff284),_0x512b06=resolveAuthScopeFlags(_0x2ff284),_0x53ac67={'accessKey':_0x48e6f5['accessKey']};_0x48e6f5['env']&&(_0x53ac67['env']=_0x48e6f5[_0x29a126(0xbe)]);writeScopedConfig(_0x53ac67,_0x512b06);const _0x11ee9f=_0x512b06[_0x29a126(0xa0)]?_0x29a126(0xa0):'project',_0x3b09c9=_0x53ac67[_0x29a126(0xbe)]?_0x29a126(0xc5)+_0x53ac67[_0x29a126(0xbe)]+'.':'';return{'ok':!![],'message':_0x29a126(0x88)+_0x11ee9f+_0x29a126(0xa5)+_0x3b09c9+_0x29a126(0xc1)+CLI_BIN_NAME+_0x29a126(0xcd)};}},{'service':'auth','command':'logout','description':a6_0x1200a1(0x8b),'risk':a6_0x1200a1(0x84),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1200a1(0xa0),'type':'boolean','description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x1200a1(0x9b),'type':'boolean','description':a6_0x1200a1(0xb4),'default':![]}],async 'execute'(_0x3c4db9){const _0x719fdb=a6_0x1200a1,_0x4d0707=resolveAuthScopeFlags(_0x3c4db9),_0x21e1ac=readScopedConfig(_0x4d0707),_0x4065fc=!!_0x21e1ac[_0x719fdb(0xbb)];delete _0x21e1ac[_0x719fdb(0xbb)],writeScopedConfig(_0x21e1ac,_0x4d0707);const _0x4cac66=_0x4d0707[_0x719fdb(0xa0)]?_0x719fdb(0xa0):_0x719fdb(0x9b);if(_0x4065fc)return{'ok':!![],'message':_0x719fdb(0x9f)+_0x4cac66+_0x719fdb(0x7b)};return{'ok':!![],'message':_0x719fdb(0x81)+_0x4cac66+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a6_0x1200a1(0x9a),'command':a6_0x1200a1(0xb8),'description':a6_0x1200a1(0x85),'risk':a6_0x1200a1(0x8f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1200a1(0xa0),'type':a6_0x1200a1(0x99),'description':a6_0x1200a1(0x90),'default':!![]},{'name':a6_0x1200a1(0x9b),'type':a6_0x1200a1(0x99),'description':a6_0x1200a1(0x87),'default':![]}],async 'execute'(_0x2e4213){const _0x2305b6=a6_0x1200a1,_0x45e231=resolveAuthScopeFlags(_0x2e4213),_0x42c30c=readScopedConfig(_0x45e231),_0x34ac19=productEnvName(_0x2305b6(0xa2)),_0x248238=productEnv(_0x2305b6(0xa2))||undefined,_0x5b4b7e=_0x42c30c['accessKey']||undefined,_0x577f94=_0x248238||_0x5b4b7e,_0x24992d=_0x248238?_0x34ac19+_0x2305b6(0xca):_0x5b4b7e?(_0x45e231[_0x2305b6(0xa0)]?_0x2305b6(0xa0):_0x2305b6(0x9b))+_0x2305b6(0xa1):null,_0xc1a5bc=[_0x2305b6(0xc7)+AUTH_MODE[_0x2305b6(0x9e)]];if(_0x577f94){const _0x2ba9af=_0x577f94[_0x2305b6(0x97)]>0x8?''+_0x577f94[_0x2305b6(0xa9)](0x0,0x8)+'*'['repeat'](_0x577f94[_0x2305b6(0x97)]-0x8):_0x577f94;_0xc1a5bc['push']('AccessKey:\x20'+_0x2ba9af+(_0x24992d?_0x2305b6(0x8e)+_0x24992d+')':''));}return!_0x577f94&&(_0xc1a5bc[_0x2305b6(0x79)](''),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0x96)),_0xc1a5bc[_0x2305b6(0x79)](''),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0x7d)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0xc1a5bc['push'](''),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0xcc)+PRODUCT_CONFIG[_0x2305b6(0x92)]+')'),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0xaa)),_0xc1a5bc[_0x2305b6(0x79)](''),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0xb0)),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0xbf)+_0x34ac19+_0x2305b6(0xb9)),_0xc1a5bc[_0x2305b6(0x79)](''),_0xc1a5bc['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20auth\x20status'),_0xc1a5bc[_0x2305b6(0x79)](_0x2305b6(0xc0)+CLI_BIN_NAME+_0x2305b6(0xa6))),{'ok':!![],'message':_0xc1a5bc['join']('\x0a')};}},{'service':a6_0x1200a1(0x9a),'command':a6_0x1200a1(0xac),'description':a6_0x1200a1(0x7f),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x271a29){const _0x46957d=a6_0x1200a1,_0x46ee50=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x46ee50,'meta':{'env':_0x271a29['envName']??_0x46957d(0x9c)}}};}}];
|
|
1
|
+
const a6_0x5016aa=a6_0x2ab9;(function(_0x2deec5,_0x118e80){const _0x4016b4=a6_0x2ab9,_0x21ed15=_0x2deec5();while(!![]){try{const _0x3f58ef=-parseInt(_0x4016b4(0xe3))/0x1*(-parseInt(_0x4016b4(0xdd))/0x2)+parseInt(_0x4016b4(0xe8))/0x3+parseInt(_0x4016b4(0x106))/0x4*(-parseInt(_0x4016b4(0x10a))/0x5)+parseInt(_0x4016b4(0xf0))/0x6*(-parseInt(_0x4016b4(0xd8))/0x7)+parseInt(_0x4016b4(0xe9))/0x8*(parseInt(_0x4016b4(0xf7))/0x9)+-parseInt(_0x4016b4(0xfe))/0xa*(parseInt(_0x4016b4(0xd9))/0xb)+parseInt(_0x4016b4(0x110))/0xc;if(_0x3f58ef===_0x118e80)break;else _0x21ed15['push'](_0x21ed15['shift']());}catch(_0x3ac30b){_0x21ed15['push'](_0x21ed15['shift']());}}}(a6_0x3e96,0xecf5e));function a6_0x3e96(){const _0x28c75f=['init','project','26570JoOllG','accessKey','boolean','Auth\x20mode:\x20','write','validation','join','cancelled','4hieRYA','stdout','envName','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','1322445FMRCYo','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20config.\x20Nothing\x20to\x20clear.','AccessKey:\x20','access-key','userCenterDisplayName','20030004DxNOQk','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','repeat','AccessKey\x20(ak_xxx...)','nonInteractive','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20config.','bool','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','`auth\x20login`\x20does\x20not\x20support\x20--yes.','logout','yes','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20Current\x20env:\x20','auth','length','newConfigFileName','Write\x20to\x20global\x20config\x20(default)','global-default','No\x20AccessKey\x20found\x20in\x20','=ak_xxx','\x20Verify:\x20','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Then\x20verify\x20with:\x20','Option\x20A:\x20','Show\x20current\x20authentication\x20status','stdin','push','2345WMwGbf','4070SMWzQR','Option\x20C:\x20environment\x20variable','\x20(via\x20','\x20config','122NihjQA','Tip:\x20you\x20can\x20also\x20run:','login','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Use\x20`','trim','3161gferBZ','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','str','AccessKey\x20cleared\x20from\x20','3201525dAjfdJ','9009168ceBKpT','\x20env\x20var','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','status','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Read\x20from\x20global\x20config\x20(default)','string','32904FpdaUG','Shorthand\x20for\x20--access-key','\x20auth\x20status','Invalid\x20accessKey\x20format:\x20\x22','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','isTTY','read','9LRSITW','global','production','env','slice'];a6_0x3e96=function(){return _0x28c75f;};return a6_0x3e96();}import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';function a6_0x2ab9(_0x27723b,_0x3622ce){_0x27723b=_0x27723b-0xbd;const _0x3e96e2=a6_0x3e96();let _0x2ab9cc=_0x3e96e2[_0x27723b];return _0x2ab9cc;}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x84758c=a6_0x2ab9;writeCliSideChannelLine(_0x84758c(0xe5)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x84758c(0xde)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x84758c(0xc1));}function buildAccessKeySetupGuide(){const _0x1e3dd0=a6_0x2ab9;return[_0x1e3dd0(0xe5)+PRODUCT_CONFIG[_0x1e3dd0(0x10f)]+':',USER_ACCESS_KEY_CREATE_URL,_0x1e3dd0(0xc8)+CLI_BIN_NAME+_0x1e3dd0(0xe4)][_0x1e3dd0(0x104)]('\x0a');}function canPromptForAccessKey(_0x5b2159){const _0x223277=a6_0x2ab9;return!_0x5b2159['nonInteractive']&&process[_0x223277(0xd6)][_0x223277(0xf5)]!==![]&&process[_0x223277(0x107)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x4b3d4b){const _0x437243=a6_0x2ab9;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4b3d4b[_0x437243(0xc3)]('global'),'explicitProject':_0x4b3d4b['bool'](_0x437243(0xfd)),'policy':_0x437243(0xce)}));}async function resolveAuthWriteInput(_0x3f983e){const _0x142ccb=a6_0x2ab9;let _0x1b4d8e=(_0x3f983e[_0x142ccb(0xe6)](_0x142ccb(0x10e))||_0x3f983e[_0x142ccb(0xe6)]('ak')||'')[_0x142ccb(0xe2)]();const _0x4c2e88=(_0x3f983e['str'](_0x142ccb(0xfa))||'')[_0x142ccb(0xe2)]();if(!_0x1b4d8e&&canPromptForAccessKey(_0x3f983e))try{showAccessKeyCreateHint(),_0x1b4d8e=await promptAccessKey('');}catch(_0x1b40d2){if(isAbortPrompt(_0x1b40d2))throw CliErrors[_0x142ccb(0x105)]();throw _0x1b40d2;}if(!_0x1b4d8e)throw CliErrors[_0x142ccb(0x103)]('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x1b4d8e))throw CliErrors['validation'](_0x142ccb(0xf3)+_0x1b4d8e+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x4c2e88)return{'accessKey':_0x1b4d8e};const _0x30b48b=normalizeEnv(_0x4c2e88);return{'accessKey':_0x1b4d8e,'env':isDaily(_0x30b48b)?'daily':isDev(_0x30b48b)?'development':_0x142ccb(0xf9)};}export const authDefinitions=[{'service':a6_0x5016aa(0xca),'command':a6_0x5016aa(0xdf),'description':a6_0x5016aa(0x112),'risk':a6_0x5016aa(0x102),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a6_0x5016aa(0xef),'description':a6_0x5016aa(0xbe)},{'name':'ak','type':a6_0x5016aa(0xef),'description':a6_0x5016aa(0xf1)},{'name':a6_0x5016aa(0xf8),'type':a6_0x5016aa(0x100),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x5016aa(0xfd),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0x111),'default':![]}],async 'execute'(_0x4823d9){const _0x474473=a6_0x5016aa;if(_0x4823d9['bool'](_0x474473(0xc7)))throw CliErrors[_0x474473(0x103)](_0x474473(0xc5),_0x474473(0xe1)+CLI_BIN_NAME+_0x474473(0x10b)+CLI_BIN_NAME+_0x474473(0xe0));const _0x3e5254=(_0x4823d9['str']('access-key')||_0x4823d9[_0x474473(0xe6)]('ak')||'')['trim']();if(!_0x3e5254&&_0x4823d9[_0x474473(0xbf)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x57f3f9=await resolveAuthWriteInput(_0x4823d9),_0x3c5e66=resolveAuthScopeFlags(_0x4823d9),_0x3d2a07=readScopedConfig(_0x3c5e66);_0x3d2a07['accessKey']=_0x57f3f9['accessKey'];_0x57f3f9[_0x474473(0xfa)]&&(_0x3d2a07[_0x474473(0xfa)]=_0x57f3f9[_0x474473(0xfa)]);writeScopedConfig(_0x3d2a07,_0x3c5e66);const _0x591172=_0x3c5e66[_0x474473(0xf8)]?_0x474473(0xf8):_0x474473(0xfd),_0x21dd50=_0x3d2a07[_0x474473(0xfa)]?_0x474473(0xc9)+_0x3d2a07[_0x474473(0xfa)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x591172+_0x474473(0xc2)+_0x21dd50+_0x474473(0xd1)+CLI_BIN_NAME+_0x474473(0xf2)};}},{'service':'auth','command':a6_0x5016aa(0xfc),'description':a6_0x5016aa(0xd2),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':'string','description':a6_0x5016aa(0xbe)},{'name':'ak','type':a6_0x5016aa(0xef),'description':a6_0x5016aa(0xf1)},{'name':a6_0x5016aa(0xfa),'type':a6_0x5016aa(0xef),'description':a6_0x5016aa(0xc0)},{'name':a6_0x5016aa(0xf8),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0xcd),'default':!![]},{'name':a6_0x5016aa(0xfd),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0x111),'default':![]}],async 'execute'(_0x914acc){const _0x4fc12b=a6_0x5016aa,_0x500ca6=await resolveAuthWriteInput(_0x914acc),_0x5bacf7=resolveAuthScopeFlags(_0x914acc),_0x507203={'accessKey':_0x500ca6[_0x4fc12b(0xff)]};_0x500ca6[_0x4fc12b(0xfa)]&&(_0x507203[_0x4fc12b(0xfa)]=_0x500ca6['env']);writeScopedConfig(_0x507203,_0x5bacf7);const _0x55e26d=_0x5bacf7[_0x4fc12b(0xf8)]?'global':_0x4fc12b(0xfd),_0x90e57f=_0x507203[_0x4fc12b(0xfa)]?_0x4fc12b(0xc9)+_0x507203['env']+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x55e26d+'\x20scope.'+_0x90e57f+_0x4fc12b(0xd1)+CLI_BIN_NAME+_0x4fc12b(0xf2)};}},{'service':a6_0x5016aa(0xca),'command':a6_0x5016aa(0xc6),'description':'Clear\x20accessKey\x20from\x20config','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x5016aa(0xf8),'type':a6_0x5016aa(0x100),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x5016aa(0xfd),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0xed),'default':![]}],async 'execute'(_0x3dea65){const _0x12c0f1=a6_0x5016aa,_0x28b965=resolveAuthScopeFlags(_0x3dea65),_0xe04a30=readScopedConfig(_0x28b965),_0x572270=!!_0xe04a30[_0x12c0f1(0xff)];delete _0xe04a30[_0x12c0f1(0xff)],writeScopedConfig(_0xe04a30,_0x28b965);const _0x1abaa7=_0x28b965[_0x12c0f1(0xf8)]?_0x12c0f1(0xf8):_0x12c0f1(0xfd);if(_0x572270)return{'ok':!![],'message':_0x12c0f1(0xe7)+_0x1abaa7+_0x12c0f1(0xc2)};return{'ok':!![],'message':_0x12c0f1(0xcf)+_0x1abaa7+_0x12c0f1(0x10c)};}},{'service':'auth','command':a6_0x5016aa(0xec),'description':a6_0x5016aa(0xd5),'risk':a6_0x5016aa(0xf6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x5016aa(0xf8),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0xee),'default':!![]},{'name':a6_0x5016aa(0xfd),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0xc4),'default':![]}],async 'execute'(_0x403640){const _0xc9a8b0=a6_0x5016aa,_0x15ec9f=resolveAuthScopeFlags(_0x403640),_0x4c9a1a=readScopedConfig(_0x15ec9f),_0x4bf9d2=productEnvName('ACCESS_KEY'),_0x1f6801=productEnv('ACCESS_KEY')||undefined,_0x385faa=_0x4c9a1a[_0xc9a8b0(0xff)]||undefined,_0x1ef737=_0x1f6801||_0x385faa,_0x1226d1=_0x1f6801?_0x4bf9d2+_0xc9a8b0(0xea):_0x385faa?(_0x15ec9f[_0xc9a8b0(0xf8)]?_0xc9a8b0(0xf8):_0xc9a8b0(0xfd))+_0xc9a8b0(0xdc):null,_0x24c291=[_0xc9a8b0(0x101)+AUTH_MODE['ClientAk']];if(_0x1ef737){const _0x58f84e=_0x1ef737[_0xc9a8b0(0xcb)]>0x8?''+_0x1ef737[_0xc9a8b0(0xfb)](0x0,0x8)+'*'[_0xc9a8b0(0xbd)](_0x1ef737[_0xc9a8b0(0xcb)]-0x8):_0x1ef737;_0x24c291['push'](_0xc9a8b0(0x10d)+_0x58f84e+(_0x1226d1?_0xc9a8b0(0xdb)+_0x1226d1+')':''));}return!_0x1ef737&&(_0x24c291['push'](''),_0x24c291[_0xc9a8b0(0xd7)](_0xc9a8b0(0x109)),_0x24c291[_0xc9a8b0(0xd7)](''),_0x24c291[_0xc9a8b0(0xd7)](_0xc9a8b0(0xd4)+CLI_BIN_NAME+_0xc9a8b0(0xeb)),_0x24c291[_0xc9a8b0(0xd7)](''),_0x24c291['push']('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0xc9a8b0(0xcc)]+')'),_0x24c291[_0xc9a8b0(0xd7)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x24c291[_0xc9a8b0(0xd7)](''),_0x24c291[_0xc9a8b0(0xd7)](_0xc9a8b0(0xda)),_0x24c291[_0xc9a8b0(0xd7)]('\x20\x20export\x20'+_0x4bf9d2+_0xc9a8b0(0xd0)),_0x24c291[_0xc9a8b0(0xd7)](''),_0x24c291[_0xc9a8b0(0xd7)](_0xc9a8b0(0xd3)+CLI_BIN_NAME+_0xc9a8b0(0xf2)),_0x24c291[_0xc9a8b0(0xd7)](_0xc9a8b0(0xf4)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x24c291['join']('\x0a')};}},{'service':a6_0x5016aa(0xca),'command':'info','description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x263efa){const _0x467f0e=a6_0x5016aa,_0x20b99a=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x20b99a,'meta':{'env':_0x263efa[_0x467f0e(0x108)]??_0x467f0e(0xf9)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5dc1dd,_0x366db7){const _0x5c091b=a7_0x5340,_0x2bce1b=_0x5dc1dd();while(!![]){try{const _0x259e18=parseInt(_0x5c091b(0x17d))/0x1*(parseInt(_0x5c091b(0x190))/0x2)+parseInt(_0x5c091b(0x185))/0x3+-parseInt(_0x5c091b(0x188))/0x4*(parseInt(_0x5c091b(0x181))/0x5)+-parseInt(_0x5c091b(0x17e))/0x6+-parseInt(_0x5c091b(0x17f))/0x7*(-parseInt(_0x5c091b(0x191))/0x8)+-parseInt(_0x5c091b(0x17c))/0x9+parseInt(_0x5c091b(0x187))/0xa*(parseInt(_0x5c091b(0x189))/0xb);if(_0x259e18===_0x366db7)break;else _0x2bce1b['push'](_0x2bce1b['shift']());}catch(_0x47f9d0){_0x2bce1b['push'](_0x2bce1b['shift']());}}}(a7_0x416e,0x1c37d));function a7_0x5340(_0x48a8bb,_0x86c80d){_0x48a8bb=_0x48a8bb-0x17b;const _0x416ef2=a7_0x416e();let _0x534099=_0x416ef2[_0x48a8bb];return _0x534099;}import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x5b272a=a7_0x5340;super(_0x5b272a(0x184)),this[_0x5b272a(0x18e)]=_0x5b272a(0x180);}}function createSafeRl(){const _0x53530f=a7_0x5340,_0x479dbc=createInterface({'input':process[_0x53530f(0x18a)],'output':process[_0x53530f(0x18c)]});let _0x2630ca;const _0x2c9f2f=new Promise((_0x586865,_0x3eb5a0)=>{const _0x2729d6=_0x53530f;_0x2630ca=()=>{const _0x4f3db5=a7_0x5340;_0x2630ca&&(_0x479dbc[_0x4f3db5(0x18f)](_0x4f3db5(0x17b),_0x2630ca),_0x2630ca=undefined);try{_0x479dbc['close']();}catch{}_0x3eb5a0(new AbortPrompt());},_0x479dbc[_0x2729d6(0x18b)](_0x2729d6(0x17b),_0x2630ca);}),_0x1699de=()=>{const _0x248797=_0x53530f;_0x2630ca&&(_0x479dbc['removeListener'](_0x248797(0x17b),_0x2630ca),_0x2630ca=undefined);try{_0x479dbc['close']();}catch{}};return{'rl':_0x479dbc,'abortPromise':_0x2c9f2f,'disposeSuccess':_0x1699de};}export async function promptAccessKey(_0x351407=''){const _0x88d787=a7_0x5340,{rl:_0x3c1049,abortPromise:_0x55a63c,disposeSuccess:_0x48b07f}=createSafeRl(),_0x572395=new Promise(_0x855889=>{const _0x569568=a7_0x5340,_0x2d4f38=_0x351407?_0x569568(0x183)+_0x351407+'):\x20':_0x569568(0x186);_0x3c1049[_0x569568(0x182)](_0x2d4f38,_0x5269ed=>{_0x48b07f(),_0x855889(_0x5269ed['trim']()||_0x351407);});});return Promise[_0x88d787(0x18d)]([_0x572395,_0x55a63c]);}function a7_0x416e(){const _0x5cb9b2=['563664xIlsCg','AccessKey\x20(paste\x20ak_...):\x20','10NfQLWV','4pinqbe','229273xheCeT','stdin','once','stdout','race','name','removeListener','51842luIpEc','8RapxSR','SIGINT','1545003hwdJHe','3OmyQEs','101952XzHBBu','1093848iKZvev','AbortPrompt','692590SdBFzn','question','AccessKey\x20(','User\x20aborted\x20prompt'];a7_0x416e=function(){return _0x5cb9b2;};return a7_0x416e();}export function isAbortPrompt(_0x4c767a){const _0x1a8875=a7_0x5340;return _0x4c767a instanceof Error&&_0x4c767a[_0x1a8875(0x18e)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a8_0x3755(){const _0x4ef47b=['71368BQaWvA','561302WQZivX','description','bff','appCode','238215NVsKDy','40fPAvSK','180upoUyd','scriptType','1224012NdnQip','5MxHdyL','detail','num','Script\x20ID','687915wvKcDJ','363TsmNSI','1570TJutHU','4540xiVGXX','11792011IhROPw','updatedTime','read','845zdddNw','(none)'];a8_0x3755=function(){return _0x4ef47b;};return a8_0x3755();}function a8_0x4947(_0xc238f3,_0x2810a8){_0xc238f3=_0xc238f3-0xc7;const _0x37558e=a8_0x3755();let _0x49475a=_0x37558e[_0xc238f3];return _0x49475a;}const a8_0x25f743=a8_0x4947;(function(_0x496009,_0x2e23a9){const _0x3d01fb=a8_0x4947,_0x417292=_0x496009();while(!![]){try{const _0x229424=parseInt(_0x3d01fb(0xdb))/0x1*(-parseInt(_0x3d01fb(0xd2))/0x2)+parseInt(_0x3d01fb(0xc9))/0x3*(parseInt(_0x3d01fb(0xcb))/0x4)+-parseInt(_0x3d01fb(0xd6))/0x5*(parseInt(_0x3d01fb(0xd8))/0x6)+-parseInt(_0x3d01fb(0xcc))/0x7+-parseInt(_0x3d01fb(0xd7))/0x8*(parseInt(_0x3d01fb(0xc8))/0x9)+parseInt(_0x3d01fb(0xca))/0xa*(-parseInt(_0x3d01fb(0xd1))/0xb)+parseInt(_0x3d01fb(0xda))/0xc*(parseInt(_0x3d01fb(0xcf))/0xd);if(_0x229424===_0x2e23a9)break;else _0x417292['push'](_0x417292['shift']());}catch(_0x1c908d){_0x417292['push'](_0x417292['shift']());}}}(a8_0x3755,0xcf653));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x25f743(0xd4),'command':a8_0x25f743(0xdc),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a8_0x25f743(0xce),'flags':[{...ID_FLAG,'description':a8_0x25f743(0xc7)},VERBOSE_FLAG],async 'execute'(_0x4ccecc){const _0x48210b=a8_0x25f743,_0x3768ff=await getBffScriptInfo(_0x4ccecc[_0x48210b(0xdd)]('id')),_0x304e5b=_0x4ccecc['bool']('verbose');if(_0x304e5b)return{'ok':!![],'data':_0x3768ff};return{'ok':!![],'data':{'id':_0x3768ff['id'],'appCode':_0x3768ff[_0x48210b(0xd5)],'functionName':_0x3768ff['functionName']??'','scriptType':_0x3768ff[_0x48210b(0xd9)],'description':_0x3768ff[_0x48210b(0xd3)]||_0x48210b(0xd0),'createdTime':_0x3768ff['createdTime']??'','updatedTime':_0x3768ff[_0x48210b(0xcd)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a9_0x1bce(){const _0x1cb589=['str','bff','5479857TJdiBB','5899pvVWQF','BFF\x20executed\x20in\x20','params','exec','32808Chxeys','BFF\x20function\x20name\x20to\x20execute','now','read','3702515GOkIyC','3980454aPRORb','262jCQcjK','1065169ECJlei','36MXVRJe','3574536mVOXep'];a9_0x1bce=function(){return _0x1cb589;};return a9_0x1bce();}const a9_0xab6901=a9_0x4d96;(function(_0x3f4d32,_0x100cbc){const _0x1c4d1d=a9_0x4d96,_0x176675=_0x3f4d32();while(!![]){try{const _0x11d2fd=-parseInt(_0x1c4d1d(0xd1))/0x1*(-parseInt(_0x1c4d1d(0xca))/0x2)+-parseInt(_0x1c4d1d(0xc4))/0x3*(parseInt(_0x1c4d1d(0xcc))/0x4)+parseInt(_0x1c4d1d(0xc8))/0x5+-parseInt(_0x1c4d1d(0xc9))/0x6+-parseInt(_0x1c4d1d(0xcb))/0x7+parseInt(_0x1c4d1d(0xcd))/0x8+-parseInt(_0x1c4d1d(0xd0))/0x9;if(_0x11d2fd===_0x100cbc)break;else _0x176675['push'](_0x176675['shift']());}catch(_0x1bdb57){_0x176675['push'](_0x176675['shift']());}}}(a9_0x1bce,0x6abe0));function a9_0x4d96(_0x1f3b75,_0x109c40){_0x1f3b75=_0x1f3b75-0xc4;const _0x1bce3a=a9_0x1bce();let _0x4d9638=_0x1bce3a[_0x1f3b75];return _0x4d9638;}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a9_0xab6901(0xcf),'command':a9_0xab6901(0xd4),'description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a9_0xab6901(0xc7),'flags':[{...NAME_FLAG,'required':!![],'description':a9_0xab6901(0xc5)},PARAMS_FLAG],async 'execute'(_0xdcc762){const _0x447eba=a9_0xab6901,_0x1f4998=parseJsonParams(_0xdcc762['str'](_0x447eba(0xd3))),_0x4dc69b=Date[_0x447eba(0xc6)](),_0x14d345=await executeSdkBff(_0xdcc762[_0x447eba(0xce)]('name'),_0x1f4998),_0x551a0d=Date[_0x447eba(0xc6)]()-_0x4dc69b;return{'ok':!![],'data':{'result':_0x14d345,'elapsed':_0x551a0d},'message':_0x447eba(0xd2)+_0x551a0d+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x465b3c,_0x1d29b6){const _0x1661d9=a10_0x24a5,_0x30f30d=_0x465b3c();while(!![]){try{const _0xcef2a0=parseInt(_0x1661d9(0x1a7))/0x1*(-parseInt(_0x1661d9(0x1b0))/0x2)+-parseInt(_0x1661d9(0x1a8))/0x3+-parseInt(_0x1661d9(0x1ae))/0x4*(parseInt(_0x1661d9(0x1af))/0x5)+-parseInt(_0x1661d9(0x1ac))/0x6*(-parseInt(_0x1661d9(0x1aa))/0x7)+parseInt(_0x1661d9(0x1a9))/0x8+-parseInt(_0x1661d9(0x1ad))/0x9+parseInt(_0x1661d9(0x1ab))/0xa;if(_0xcef2a0===_0x1d29b6)break;else _0x30f30d['push'](_0x30f30d['shift']());}catch(_0x39105f){_0x30f30d['push'](_0x30f30d['shift']());}}}(a10_0x2b8e,0xae8ee));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a10_0x24a5(_0x3bba46,_0x37e650){_0x3bba46=_0x3bba46-0x1a7;const _0x2b8eca=a10_0x2b8e();let _0x24a595=_0x2b8eca[_0x3bba46];return _0x24a595;}function a10_0x2b8e(){const _0x737507=['6169146Xufetf','11838933EBubBB','196mGyRnc','3670yFUoRY','339882RAjlNl','3RoZgxz','782046yojsVJ','8227960pLCGGi','7lSvmdO','7802120IoJHjY'];a10_0x2b8e=function(){return _0x737507;};return a10_0x2b8e();}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a11_0x20b0(_0x430ac6,_0x33e875){_0x430ac6=_0x430ac6-0x1af;const _0x418202=a11_0x4182();let _0x20b00e=_0x418202[_0x430ac6];return _0x20b00e;}(function(_0x345292,_0x874e17){const _0x4fd136=a11_0x20b0,_0x4dd822=_0x345292();while(!![]){try{const _0x235531=-parseInt(_0x4fd136(0x1b1))/0x1+-parseInt(_0x4fd136(0x1b9))/0x2+-parseInt(_0x4fd136(0x1b7))/0x3*(-parseInt(_0x4fd136(0x1c6))/0x4)+-parseInt(_0x4fd136(0x1bd))/0x5+-parseInt(_0x4fd136(0x1b5))/0x6+-parseInt(_0x4fd136(0x1b0))/0x7*(-parseInt(_0x4fd136(0x1c3))/0x8)+-parseInt(_0x4fd136(0x1bb))/0x9*(-parseInt(_0x4fd136(0x1c5))/0xa);if(_0x235531===_0x874e17)break;else _0x4dd822['push'](_0x4dd822['shift']());}catch(_0x3a08c0){_0x4dd822['push'](_0x4dd822['shift']());}}}(a11_0x4182,0xef982));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a11_0x4182(){const _0x3aac10=['Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','9bBdLeJ','inProject','5211080HCEuGB','project','Add\x20--global\x20to\x20write\x20to\x20~/','\x20init`\x20first.','\x20(global)','global','8ABzJMe','validation','26332310nUYPGf','78544OlhSdd','\x20found).','4660383NgMlCq','706425DEAQDE','global-default',',\x20or\x20run\x20`','project-default','3733170VeGvXR','newConfigFileName','219gYnNXk','Use\x20only\x20one\x20config\x20scope\x20flag.','2760428PydJcO'];a11_0x4182=function(){return _0x3aac10;};return a11_0x4182();}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(_0x4d94cb){const _0x3cdff7=a11_0x20b0,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x3d02a5}=_0x4d94cb;if(explicitGlobal&&explicitProject)throw CliErrors[_0x3cdff7(0x1c4)](_0x3cdff7(0x1ba),_0x3cdff7(0x1b8));if(explicitGlobal)return'global';if(explicitProject)return'project';switch(_0x3d02a5){case _0x3cdff7(0x1b2):return _0x3cdff7(0x1c2);case _0x3cdff7(0x1b4):return _0x4d94cb[_0x3cdff7(0x1bc)]??isInProject()?'project':_0x3cdff7(0x1c2);case'project-or-global-explicit':if(!(_0x4d94cb[_0x3cdff7(0x1bc)]??isInProject()))throw CliErrors['validation']('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x3cdff7(0x1b6)]+_0x3cdff7(0x1af),_0x3cdff7(0x1bf)+PRODUCT_CONFIG[_0x3cdff7(0x1b6)]+_0x3cdff7(0x1b3)+CLI_BIN_NAME+_0x3cdff7(0x1c0));return _0x3cdff7(0x1be);}}export function toScopeFlags(_0x4df12b){const _0x208575=a11_0x20b0;return{'global':_0x4df12b===_0x208575(0x1c2)};}export function formatScopeLabel(_0x2bc2ef){const _0x40ed2d=a11_0x20b0;return _0x2bc2ef===_0x40ed2d(0x1c2)?_0x40ed2d(0x1c1):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3ad7db,_0x386647){const _0x3ae0f8=a12_0x13ce,_0x33fe6d=_0x3ad7db();while(!![]){try{const _0x71e37d=-parseInt(_0x3ae0f8(0x19b))/0x1*(-parseInt(_0x3ae0f8(0x1a0))/0x2)+parseInt(_0x3ae0f8(0x1b4))/0x3*(-parseInt(_0x3ae0f8(0x1b6))/0x4)+parseInt(_0x3ae0f8(0x1b1))/0x5*(-parseInt(_0x3ae0f8(0x19e))/0x6)+parseInt(_0x3ae0f8(0x1b2))/0x7*(parseInt(_0x3ae0f8(0x1aa))/0x8)+parseInt(_0x3ae0f8(0x1a1))/0x9+-parseInt(_0x3ae0f8(0x1b0))/0xa+-parseInt(_0x3ae0f8(0x1a4))/0xb*(parseInt(_0x3ae0f8(0x1a2))/0xc);if(_0x71e37d===_0x386647)break;else _0x33fe6d['push'](_0x33fe6d['shift']());}catch(_0x6033f4){_0x33fe6d['push'](_0x33fe6d['shift']());}}}(a12_0x57bb,0xdbe57));import{CliErrors}from'../../errors.js';function isSet(_0x6da379,_0x4ded16){const _0x2ef3b=a12_0x13ce,_0x32b2be=_0x6da379[_0x2ef3b(0x19f)](_0x4ded16);return _0x32b2be!==undefined&&_0x32b2be!==''&&_0x32b2be!==![]&&_0x32b2be!==0x0;}function a12_0x13ce(_0x4c48bb,_0x375c7c){_0x4c48bb=_0x4c48bb-0x19b;const _0x57bbee=a12_0x57bb();let _0x13ce5c=_0x57bbee[_0x4c48bb];return _0x13ce5c;}function a12_0x57bb(){const _0x368359=['Exactly\x20one\x20of\x20','5786dJKoIR','\x20is\x20allowed,\x20found:\x20','Flags\x20','length','str',',\x20got\x20\x22','4024WoDogC','test','Only\x20one\x20of\x20','\x20is\x20required\x20for\x20`','\x20are\x20mutually\x20exclusive\x20for\x20`','Invalid\x20--','2616270ffkaWz','375TuwznX','12229zbvZLg','map','1233sasuVR','validation','3288cjnmTS','Provide\x20one\x20of:\x20','filter','4517QiMaiX','At\x20least\x20one\x20of\x20','some','55542OyDCEn','flag','758pnCtPV','2294487bhLCkr','14856UFFfgv'];a12_0x57bb=function(){return _0x368359;};return a12_0x57bb();}function fmtNames(_0x257423){const _0x3a55a9=a12_0x13ce;return _0x257423[_0x3a55a9(0x1b3)](_0x2648cc=>'--'+_0x2648cc)['join'](',\x20');}export function requireOneOf(_0x33bb8d,_0x950bc9,_0x334d85){const _0x2c5a29=a12_0x13ce,_0xd05c9d=_0x950bc9[_0x2c5a29(0x1b8)](_0x5f483c=>isSet(_0x33bb8d,_0x5f483c));if(_0xd05c9d['length']!==0x1)throw CliErrors['validation'](_0xd05c9d[_0x2c5a29(0x1a7)]===0x0?_0x2c5a29(0x1a3)+fmtNames(_0x950bc9)+_0x2c5a29(0x1ad)+_0x334d85+'`.':_0x2c5a29(0x1ac)+fmtNames(_0x950bc9)+_0x2c5a29(0x1a5)+fmtNames(_0xd05c9d)+'.',_0xd05c9d[_0x2c5a29(0x1a7)]===0x0?_0x2c5a29(0x1b7)+fmtNames(_0x950bc9):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x1c26f2,_0x514ebe,_0x2688ff){const _0x1a502d=a12_0x13ce;if(!_0x514ebe[_0x1a502d(0x19d)](_0x540b60=>isSet(_0x1c26f2,_0x540b60)))throw CliErrors['validation'](_0x1a502d(0x19c)+fmtNames(_0x514ebe)+_0x1a502d(0x1ad)+_0x2688ff+'`.','Provide\x20one\x20of:\x20'+fmtNames(_0x514ebe));}export function mutuallyExclusive(_0x5bf4f3,_0x3994ac,_0x326003){const _0x48127b=a12_0x13ce,_0x10dacb=_0x3994ac[_0x48127b(0x1b8)](_0x5cc971=>isSet(_0x5bf4f3,_0x5cc971));if(_0x10dacb[_0x48127b(0x1a7)]>0x1)throw CliErrors[_0x48127b(0x1b5)](_0x48127b(0x1a6)+fmtNames(_0x10dacb)+_0x48127b(0x1ae)+_0x326003+'`.','Use\x20only\x20one\x20of:\x20'+fmtNames(_0x3994ac));}export function validatePattern(_0x589da3,_0x382bea,_0x466d30,_0x695987){const _0x36f6b2=a12_0x13ce,_0x35233c=_0x589da3[_0x36f6b2(0x1a8)](_0x382bea);if(_0x35233c&&!_0x466d30[_0x36f6b2(0x1ab)](_0x35233c))throw CliErrors[_0x36f6b2(0x1b5)](_0x36f6b2(0x1af)+_0x382bea+':\x20expected\x20'+_0x695987+_0x36f6b2(0x1a9)+_0x35233c+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a13_0x4458(){const _0x3aecc9=['params','3323836XQlEns','code','boolean','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','verbose','435846OUJIuy','Dataset\x20code\x20(32-char\x20hex\x20UUID)','8919ZtfcBS','14780reRqXd','371606FzvOeS','4563376uknVVh','1817802iYSOvQ','Return\x20full\x20raw\x20response\x20object','string','number','3296225oTSmhP','6PikQHD','2bSWrzQ'];a13_0x4458=function(){return _0x3aecc9;};return a13_0x4458();}const a13_0x3b91b5=a13_0x2cca;(function(_0xfbe7b7,_0x124733){const _0x2e01f7=a13_0x2cca,_0x8517b2=_0xfbe7b7();while(!![]){try{const _0x5750f6=-parseInt(_0x2e01f7(0x1b5))/0x1*(parseInt(_0x2e01f7(0x1bd))/0x2)+parseInt(_0x2e01f7(0x1b1))/0x3+parseInt(_0x2e01f7(0x1bf))/0x4+-parseInt(_0x2e01f7(0x1bb))/0x5*(parseInt(_0x2e01f7(0x1bc))/0x6)+-parseInt(_0x2e01f7(0x1b7))/0x7+-parseInt(_0x2e01f7(0x1b6))/0x8+-parseInt(_0x2e01f7(0x1b3))/0x9*(-parseInt(_0x2e01f7(0x1b4))/0xa);if(_0x5750f6===_0x124733)break;else _0x8517b2['push'](_0x8517b2['shift']());}catch(_0x1ebeb4){_0x8517b2['push'](_0x8517b2['shift']());}}}(a13_0x4458,0x8d98c));export const CODE_FLAG={'name':a13_0x3b91b5(0x1c0),'type':'string','required':!![],'description':a13_0x3b91b5(0x1b2),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':a13_0x3b91b5(0x1b0),'type':a13_0x3b91b5(0x1c1),'description':a13_0x3b91b5(0x1b8)};export const PARAMS_FLAG={'name':a13_0x3b91b5(0x1be),'type':a13_0x3b91b5(0x1b9),'description':a13_0x3b91b5(0x1c2)};function a13_0x2cca(_0x144483,_0x6ee112){_0x144483=_0x144483-0x1b0;const _0x4458eb=a13_0x4458();let _0x2cca7d=_0x4458eb[_0x144483];return _0x2cca7d;}export const NAME_FLAG={'name':'name','type':a13_0x3b91b5(0x1b9),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':a13_0x3b91b5(0x1ba),'required':!![],'description':'Resource\x20ID'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0x31619c=a14_0x1647;(function(_0x2ca772,_0x39797d){const _0x5b12a7=a14_0x1647,_0x2dbd02=_0x2ca772();while(!![]){try{const _0x52e47e=-parseInt(_0x5b12a7(0x1d7))/0x1*(parseInt(_0x5b12a7(0x1db))/0x2)+-parseInt(_0x5b12a7(0x1d1))/0x3*(parseInt(_0x5b12a7(0x1d3))/0x4)+parseInt(_0x5b12a7(0x1ec))/0x5+-parseInt(_0x5b12a7(0x1e1))/0x6+-parseInt(_0x5b12a7(0x1e2))/0x7+parseInt(_0x5b12a7(0x1f5))/0x8*(parseInt(_0x5b12a7(0x1ed))/0x9)+parseInt(_0x5b12a7(0x1d2))/0xa*(parseInt(_0x5b12a7(0x1d0))/0xb);if(_0x52e47e===_0x39797d)break;else _0x2dbd02['push'](_0x2dbd02['shift']());}catch(_0x363054){_0x2dbd02['push'](_0x2dbd02['shift']());}}}(a14_0x5f19,0x2c521));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a14_0x31619c(0x1c8),'type':'boolean','description':'Write\x20to\x20global\x20config','default':![]};function a14_0x5f19(){const _0x53c11c=['Missing\x20key\x20or\x20value.','\x20(global)','riskLevel','`\x20=\x20\x22','get','length',';\x20apps.<alias>.appcode','includes','project-or-global-explicit','log','value','\x20config\x20set\x20<key>\x20<value>\x20[--global]','global','appcode','keys','trim','isArray','field','Set\x20`','\x20config\x20delete\x20<key>\x20[--global]','3179DyzmHO','3NKwKWi','15570rqkjZh','397196uOuIVd','\x22.\x20Allowed:\x20','\x20config\x20get\x20<key>','pageSize\x20must\x20be\x20a\x20positive\x20number','10IMqnsV','Set\x20a\x20config\x20value','alias','Deleted\x20`','15546WkNyKa','object','set','write','pageSize','bool','103470rTKkXZ','1967413DiqUTd','\x22\x20not\x20found\x20at\x20top\x20level.','apps','\x20\x20global:\x20\x20','Usage:\x20','(none)','config','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Top-level\x20key\x20\x22','Delete\x20a\x20config\x20value','603440NWqXgu','775881LKXvQH','\x22\x20is\x20not\x20settable.','validation','Missing\x20key\x20argument.','\x20\x20project:\x20','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','delete','key','8uJvlfs','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','read','raw','Get\x20a\x20config\x20value','Key\x20not\x20found:\x20','args','stringify','pretty','Value\x20to\x20assign'];a14_0x5f19=function(){return _0x53c11c;};return a14_0x5f19();}function parseAliasAppcodeSetKey(_0x28e974){const _0xae935a=a14_0x31619c,_0x594dba=_0x28e974['split']('.');if(_0x594dba['length']!==0x3||_0x594dba[0x0]!==_0xae935a(0x1e4)||_0x594dba[0x2]!==_0xae935a(0x1c9))return undefined;const _0x17ebaa=_0x594dba[0x1]?.['trim']();return _0x17ebaa?_0x17ebaa:undefined;}function parseAliasDeleteKey(_0x763873){const _0x2c1ffe=a14_0x31619c,_0x84ecd=_0x763873['split']('.');if(_0x84ecd['length']===0x2&&_0x84ecd[0x0]===_0x2c1ffe(0x1e4)){const _0x3ff7ef=_0x84ecd[0x1]?.[_0x2c1ffe(0x1cb)]();return _0x3ff7ef?{'alias':_0x3ff7ef}:undefined;}if(_0x84ecd[_0x2c1ffe(0x1c1)]===0x3&&_0x84ecd[0x0]===_0x2c1ffe(0x1e4)&&_0x84ecd[0x2]===_0x2c1ffe(0x1c9)){const _0x316c77=_0x84ecd[0x1]?.[_0x2c1ffe(0x1cb)]();return _0x316c77?{'alias':_0x316c77,'field':_0x2c1ffe(0x1c9)}:undefined;}return undefined;}function setLocalAppAlias(_0x32f5f6,_0x1eb26a,_0x459bf2){const _0x111cc5=a14_0x31619c,_0x12c6e6=_0x32f5f6[_0x111cc5(0x1e4)]&&typeof _0x32f5f6[_0x111cc5(0x1e4)]===_0x111cc5(0x1dc)&&!Array[_0x111cc5(0x1cc)](_0x32f5f6[_0x111cc5(0x1e4)])?_0x32f5f6[_0x111cc5(0x1e4)]:{},_0x260054=_0x12c6e6[_0x1eb26a]&&typeof _0x12c6e6[_0x1eb26a]===_0x111cc5(0x1dc)&&!Array['isArray'](_0x12c6e6[_0x1eb26a])?_0x12c6e6[_0x1eb26a]:{};_0x260054[_0x111cc5(0x1c9)]=_0x459bf2,_0x12c6e6[_0x1eb26a]=_0x260054,_0x32f5f6[_0x111cc5(0x1e4)]=_0x12c6e6;}function deleteLocalAppAlias(_0x546a38,_0x4af74b){const _0x2dfef4=a14_0x31619c;if(!_0x546a38[_0x2dfef4(0x1e4)]||typeof _0x546a38[_0x2dfef4(0x1e4)]!==_0x2dfef4(0x1dc)||Array[_0x2dfef4(0x1cc)](_0x546a38[_0x2dfef4(0x1e4)]))return![];const _0x4e85ec=_0x546a38[_0x2dfef4(0x1e4)],_0x180cc2=_0x4e85ec[_0x4af74b[_0x2dfef4(0x1d9)]];if(!_0x180cc2||typeof _0x180cc2!==_0x2dfef4(0x1dc)||Array['isArray'](_0x180cc2))return![];if(!_0x4af74b[_0x2dfef4(0x1cd)])return delete _0x4e85ec[_0x4af74b['alias']],!![];if(!(_0x4af74b[_0x2dfef4(0x1cd)]in _0x180cc2))return![];return delete _0x180cc2[_0x4af74b['field']],Object[_0x2dfef4(0x1ca)](_0x180cc2)[_0x2dfef4(0x1c1)]===0x0&&delete _0x4e85ec[_0x4af74b['alias']],!![];}function a14_0x1647(_0x3a8fb5,_0x6d6e8a){_0x3a8fb5=_0x3a8fb5-0x1b7;const _0x5f1996=a14_0x5f19();let _0x164723=_0x5f1996[_0x3a8fb5];return _0x164723;}const listDef={'service':a14_0x31619c(0x1e8),'command':'list','description':'List\x20current\x20config','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2c2f5e){const _0x46198a=a14_0x31619c,{buildConfigFromFlags:_0x4a9016}=await import('../../context.js'),_0x3b812e=_0x4a9016({}),_0x59aaa5=getProjectConfigPath(),_0x36b5aa=resolveWriteConfigPath(_0x46198a(0x1c8));if(_0x2c2f5e['format']===_0x46198a(0x1ba))return{'ok':!![],'message':_0x46198a(0x1f6)+(JSON[_0x46198a(0x1b9)](_0x3b812e[_0x46198a(0x1f8)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x46198a(0x1f1)+(_0x59aaa5??_0x46198a(0x1e7))+'\x0a')+(_0x46198a(0x1e5)+_0x36b5aa)};return{'ok':!![],'data':{'effective':_0x3b812e[_0x46198a(0x1f8)],'configFiles':{'project':_0x59aaa5??null,'global':_0x36b5aa}}};}},getDef={'service':a14_0x31619c(0x1e8),'command':a14_0x31619c(0x1c0),'description':a14_0x31619c(0x1f9),'risk':a14_0x31619c(0x1f7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x31619c(0x1f4),'description':a14_0x31619c(0x1f2),'required':!![]}],'flags':[],async 'execute'(_0x5f2db9){const _0x3f6a7c=a14_0x31619c,_0x52612e=_0x5f2db9[_0x3f6a7c(0x1b8)][0x0];if(!_0x52612e)throw CliErrors[_0x3f6a7c(0x1ef)](_0x3f6a7c(0x1f0),'Usage:\x20'+CLI_BIN_NAME+_0x3f6a7c(0x1d5));const {buildConfigFromFlags:_0x3c043d}=await import('../../context.js'),{raw:_0x26a4fc}=_0x3c043d({});if(_0x52612e[_0x3f6a7c(0x1c3)]('.')){const _0x3413fa=_0x52612e['split']('.');let _0x1878e4=_0x26a4fc;for(const _0x3b82e2 of _0x3413fa){if(_0x1878e4==null||typeof _0x1878e4!=='object')throw CliErrors[_0x3f6a7c(0x1ef)](_0x3f6a7c(0x1b7)+_0x52612e);_0x1878e4=_0x1878e4[_0x3b82e2];}if(_0x1878e4===undefined)throw CliErrors[_0x3f6a7c(0x1ef)]('Key\x20not\x20found:\x20'+_0x52612e);return console['log'](typeof _0x1878e4===_0x3f6a7c(0x1dc)?JSON['stringify'](_0x1878e4,null,0x2):String(_0x1878e4)),{'ok':!![]};}const _0x3a37ee=_0x26a4fc[_0x52612e];if(_0x3a37ee===undefined)throw CliErrors[_0x3f6a7c(0x1ef)](_0x3f6a7c(0x1b7)+_0x52612e);return console['log'](typeof _0x3a37ee===_0x3f6a7c(0x1dc)?JSON[_0x3f6a7c(0x1b9)](_0x3a37ee,null,0x2):String(_0x3a37ee)),{'ok':!![]};}},setDef={'service':'config','command':a14_0x31619c(0x1dd),'description':a14_0x31619c(0x1d8),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x31619c(0x1f4),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x31619c(0x1c6),'description':a14_0x31619c(0x1bb),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0xd625ff){const _0x1579ce=a14_0x31619c,_0x3be932=_0xd625ff[_0x1579ce(0x1b8)][0x0],_0x12657c=_0xd625ff[_0x1579ce(0x1b8)][0x1];if(!_0x3be932||_0x12657c===undefined)throw CliErrors[_0x1579ce(0x1ef)](_0x1579ce(0x1bc),'Usage:\x20'+CLI_BIN_NAME+_0x1579ce(0x1c7));if(ENUM_KEYS[_0x3be932]&&!ENUM_KEYS[_0x3be932][_0x1579ce(0x1c3)](_0x12657c))throw CliErrors[_0x1579ce(0x1ef)]('Invalid\x20value\x20for\x20\x22'+_0x3be932+_0x1579ce(0x1d4)+ENUM_KEYS[_0x3be932]['join'](',\x20'));if(_0x3be932===_0x1579ce(0x1be))throw CliErrors[_0x1579ce(0x1ef)](_0x1579ce(0x1e9));if(_0x3be932===_0x1579ce(0x1df)){const _0x315b52=Number(_0x12657c);if(isNaN(_0x315b52)||_0x315b52<=0x0)throw CliErrors[_0x1579ce(0x1ef)](_0x1579ce(0x1d6));}const _0x453aec=resolveWriteScope({'explicitGlobal':_0xd625ff[_0x1579ce(0x1e0)](_0x1579ce(0x1c8)),'policy':_0x1579ce(0x1c4)}),_0x53d584=toScopeFlags(_0x453aec),_0x526d9b=readScopedConfig(_0x53d584),_0x4b7818=parseAliasAppcodeSetKey(_0x3be932);if(!_0x4b7818&&!isTopLevelConfigKey(_0x3be932))throw CliErrors[_0x1579ce(0x1ef)](_0x1579ce(0x1ea)+_0x3be932+_0x1579ce(0x1ee),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+_0x1579ce(0x1c2));return _0x4b7818?setLocalAppAlias(_0x526d9b,_0x4b7818,_0x12657c):_0x526d9b[_0x3be932]=_0x3be932===_0x1579ce(0x1df)?Number(_0x12657c):_0x12657c,console['log'](_0x1579ce(0x1ce)+_0x3be932+_0x1579ce(0x1bf)+_0x12657c+'\x22'+(_0x453aec===_0x1579ce(0x1c8)?_0x1579ce(0x1bd):'')),writeScopedConfig(_0x526d9b,_0x53d584),{'ok':!![]};}},deleteDef={'service':a14_0x31619c(0x1e8),'command':a14_0x31619c(0x1f3),'description':a14_0x31619c(0x1eb),'risk':a14_0x31619c(0x1de),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x31619c(0x1f4),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4ad692){const _0x373871=a14_0x31619c,_0x1990d2=_0x4ad692[_0x373871(0x1b8)][0x0];if(!_0x1990d2)throw CliErrors[_0x373871(0x1ef)](_0x373871(0x1f0),_0x373871(0x1e6)+CLI_BIN_NAME+_0x373871(0x1cf));const _0x52a928=resolveWriteScope({'explicitGlobal':_0x4ad692[_0x373871(0x1e0)](_0x373871(0x1c8)),'policy':_0x373871(0x1c4)}),_0x5d24d6=toScopeFlags(_0x52a928),_0x44b077=readScopedConfig(_0x5d24d6),_0x44d70f=parseAliasDeleteKey(_0x1990d2);if(_0x44d70f){if(!deleteLocalAppAlias(_0x44b077,_0x44d70f))throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x1990d2);return console['log'](_0x373871(0x1da)+_0x1990d2+'`'+(_0x52a928===_0x373871(0x1c8)?_0x373871(0x1bd):'')),writeScopedConfig(_0x44b077,_0x5d24d6),{'ok':!![]};}if(_0x44b077[_0x1990d2]===undefined)throw CliErrors[_0x373871(0x1ef)]('Key\x20\x22'+_0x1990d2+_0x373871(0x1e3));return delete _0x44b077[_0x1990d2],console[_0x373871(0x1c5)]('Deleted\x20`'+_0x1990d2+'`'+(_0x52a928==='global'?_0x373871(0x1bd):'')),writeScopedConfig(_0x44b077,_0x5d24d6),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a14_0x92c4d8=a14_0x353e;(function(_0x57d0ac,_0x1f2b94){const _0x4ab828=a14_0x353e,_0x277e41=_0x57d0ac();while(!![]){try{const _0x54bd9a=-parseInt(_0x4ab828(0x11d))/0x1*(parseInt(_0x4ab828(0xf3))/0x2)+-parseInt(_0x4ab828(0x11b))/0x3*(parseInt(_0x4ab828(0xf1))/0x4)+parseInt(_0x4ab828(0xf4))/0x5+-parseInt(_0x4ab828(0x11f))/0x6+-parseInt(_0x4ab828(0xf7))/0x7+parseInt(_0x4ab828(0x116))/0x8*(-parseInt(_0x4ab828(0xf6))/0x9)+-parseInt(_0x4ab828(0x123))/0xa*(-parseInt(_0x4ab828(0xea))/0xb);if(_0x54bd9a===_0x1f2b94)break;else _0x277e41['push'](_0x277e41['shift']());}catch(_0xc1231a){_0x277e41['push'](_0x277e41['shift']());}}}(a14_0x1aaf,0xbc96f));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';function a14_0x353e(_0x4f928e,_0x19c00d){_0x4f928e=_0x4f928e-0xea;const _0x1aaf40=a14_0x1aaf();let _0x353eeb=_0x1aaf40[_0x4f928e];return _0x353eeb;}function a14_0x1aaf(){const _0x22bb9e=['Key\x20not\x20found:\x20','\x20\x20project:\x20','boolean','config','../../context.js','Missing\x20key\x20argument.',';\x20apps.<alias>.appcode','Value\x20to\x20assign','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','isArray','Set\x20a\x20config\x20value','key','field','value','write','bool','\x20\x20global:\x20\x20','log','appcode','join','(none)','3631024zsLolX','global','Invalid\x20value\x20for\x20\x22','format','alias','3DelnoM','\x20config\x20delete\x20<key>\x20[--global]','1039238Oiyenm','trim','4081350cURutF','Deleted\x20`','object','keys','20jgaYJa','\x22\x20is\x20not\x20settable.','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Usage:\x20','List\x20current\x20config','apps','Get\x20a\x20config\x20value','\x22.\x20Allowed:\x20','project-or-global-explicit','stringify','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','Missing\x20key\x20or\x20value.','24629121IOJJfw','raw','set','pageSize\x20must\x20be\x20a\x20positive\x20number','includes','Key\x20\x22','riskLevel','4763428SVZzKC','pageSize','2phfaEn','2437305jGvwgE','\x22\x20not\x20found\x20at\x20top\x20level.','18IXrqvs','2624608UWjwCx','\x20(global)','args','split','Delete\x20a\x20config\x20value','pretty','\x20config\x20get\x20<key>','Settable\x20keys:\x20','validation','length'];a14_0x1aaf=function(){return _0x22bb9e;};return a14_0x1aaf();}const GLOBAL_FLAG={'name':a14_0x92c4d8(0x117),'type':a14_0x92c4d8(0x103),'description':'Write\x20to\x20global\x20config','default':![]};function parseAliasAppcodeSetKey(_0x4194d3){const _0x2ce8fb=a14_0x92c4d8,_0x9dd5c0=_0x4194d3['split']('.');if(_0x9dd5c0['length']!==0x3||_0x9dd5c0[0x0]!=='apps'||_0x9dd5c0[0x2]!==_0x2ce8fb(0x113))return undefined;const _0x578aa4=_0x9dd5c0[0x1]?.[_0x2ce8fb(0x11e)]();return _0x578aa4?_0x578aa4:undefined;}function parseAliasDeleteKey(_0x318807){const _0x4b068f=a14_0x92c4d8,_0x523ef3=_0x318807[_0x4b068f(0xfa)]('.');if(_0x523ef3[_0x4b068f(0x100)]===0x2&&_0x523ef3[0x0]===_0x4b068f(0x128)){const _0x4a8502=_0x523ef3[0x1]?.[_0x4b068f(0x11e)]();return _0x4a8502?{'alias':_0x4a8502}:undefined;}if(_0x523ef3[_0x4b068f(0x100)]===0x3&&_0x523ef3[0x0]===_0x4b068f(0x128)&&_0x523ef3[0x2]==='appcode'){const _0x538025=_0x523ef3[0x1]?.[_0x4b068f(0x11e)]();return _0x538025?{'alias':_0x538025,'field':_0x4b068f(0x113)}:undefined;}return undefined;}function setLocalAppAlias(_0x5f6912,_0x27c554,_0x18cb8e){const _0x184c34=a14_0x92c4d8,_0x56e942=_0x5f6912[_0x184c34(0x128)]&&typeof _0x5f6912['apps']==='object'&&!Array['isArray'](_0x5f6912[_0x184c34(0x128)])?_0x5f6912[_0x184c34(0x128)]:{},_0x2d35f3=_0x56e942[_0x27c554]&&typeof _0x56e942[_0x27c554]===_0x184c34(0x121)&&!Array[_0x184c34(0x10a)](_0x56e942[_0x27c554])?_0x56e942[_0x27c554]:{};_0x2d35f3[_0x184c34(0x113)]=_0x18cb8e,_0x56e942[_0x27c554]=_0x2d35f3,_0x5f6912[_0x184c34(0x128)]=_0x56e942;}function deleteLocalAppAlias(_0x19ec7a,_0x4dbbac){const _0x1e1550=a14_0x92c4d8;if(!_0x19ec7a[_0x1e1550(0x128)]||typeof _0x19ec7a[_0x1e1550(0x128)]!==_0x1e1550(0x121)||Array[_0x1e1550(0x10a)](_0x19ec7a[_0x1e1550(0x128)]))return![];const _0x2679ea=_0x19ec7a[_0x1e1550(0x128)],_0x3bf28b=_0x2679ea[_0x4dbbac[_0x1e1550(0x11a)]];if(!_0x3bf28b||typeof _0x3bf28b!==_0x1e1550(0x121)||Array[_0x1e1550(0x10a)](_0x3bf28b))return![];if(!_0x4dbbac['field'])return delete _0x2679ea[_0x4dbbac['alias']],!![];if(!(_0x4dbbac[_0x1e1550(0x10d)]in _0x3bf28b))return![];return delete _0x3bf28b[_0x4dbbac['field']],Object[_0x1e1550(0x122)](_0x3bf28b)[_0x1e1550(0x100)]===0x0&&delete _0x2679ea[_0x4dbbac['alias']],!![];}const listDef={'service':'config','command':'list','description':a14_0x92c4d8(0x127),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2a4c7b){const _0x4f7891=a14_0x92c4d8,{buildConfigFromFlags:_0x20c200}=await import(_0x4f7891(0x105)),_0x206d0d=_0x20c200({}),_0x59840d=getProjectConfigPath(),_0x2b8de8=resolveWriteConfigPath(_0x4f7891(0x117));if(_0x2a4c7b[_0x4f7891(0x119)]===_0x4f7891(0xfc))return{'ok':!![],'message':_0x4f7891(0x125)+(JSON['stringify'](_0x206d0d[_0x4f7891(0xeb)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x4f7891(0x102)+(_0x59840d??_0x4f7891(0x115))+'\x0a')+(_0x4f7891(0x111)+_0x2b8de8)};return{'ok':!![],'data':{'effective':_0x206d0d[_0x4f7891(0xeb)],'configFiles':{'project':_0x59840d??null,'global':_0x2b8de8}}};}},getDef={'service':a14_0x92c4d8(0x104),'command':'get','description':a14_0x92c4d8(0x129),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x92c4d8(0x10c),'description':a14_0x92c4d8(0x12d),'required':!![]}],'flags':[],async 'execute'(_0x5f2460){const _0xf0ec50=a14_0x92c4d8,_0x21fa5a=_0x5f2460[_0xf0ec50(0xf9)][0x0];if(!_0x21fa5a)throw CliErrors[_0xf0ec50(0xff)](_0xf0ec50(0x106),_0xf0ec50(0x126)+CLI_BIN_NAME+_0xf0ec50(0xfd));const {buildConfigFromFlags:_0x36251f}=await import(_0xf0ec50(0x105)),{raw:_0x3d14d7}=_0x36251f({});if(_0x21fa5a[_0xf0ec50(0xee)]('.')){const _0x448247=_0x21fa5a[_0xf0ec50(0xfa)]('.');let _0x58540c=_0x3d14d7;for(const _0x4b60b9 of _0x448247){if(_0x58540c==null||typeof _0x58540c!==_0xf0ec50(0x121))throw CliErrors[_0xf0ec50(0xff)](_0xf0ec50(0x101)+_0x21fa5a);_0x58540c=_0x58540c[_0x4b60b9];}if(_0x58540c===undefined)throw CliErrors[_0xf0ec50(0xff)](_0xf0ec50(0x101)+_0x21fa5a);return console['log'](typeof _0x58540c==='object'?JSON['stringify'](_0x58540c,null,0x2):String(_0x58540c)),{'ok':!![]};}const _0x58cee2=_0x3d14d7[_0x21fa5a];if(_0x58cee2===undefined)throw CliErrors[_0xf0ec50(0xff)]('Key\x20not\x20found:\x20'+_0x21fa5a);return console[_0xf0ec50(0x112)](typeof _0x58cee2===_0xf0ec50(0x121)?JSON[_0xf0ec50(0x12c)](_0x58cee2,null,0x2):String(_0x58cee2)),{'ok':!![]};}},setDef={'service':a14_0x92c4d8(0x104),'command':a14_0x92c4d8(0xec),'description':a14_0x92c4d8(0x10b),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x92c4d8(0x10e),'description':a14_0x92c4d8(0x108),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x3f1c08){const _0xc4b21d=a14_0x92c4d8,_0x5acdd2=_0x3f1c08[_0xc4b21d(0xf9)][0x0],_0x58367e=_0x3f1c08[_0xc4b21d(0xf9)][0x1];if(!_0x5acdd2||_0x58367e===undefined)throw CliErrors[_0xc4b21d(0xff)](_0xc4b21d(0x12e),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x5acdd2]&&!ENUM_KEYS[_0x5acdd2][_0xc4b21d(0xee)](_0x58367e))throw CliErrors['validation'](_0xc4b21d(0x118)+_0x5acdd2+_0xc4b21d(0x12a)+ENUM_KEYS[_0x5acdd2][_0xc4b21d(0x114)](',\x20'));if(_0x5acdd2===_0xc4b21d(0xf0))throw CliErrors[_0xc4b21d(0xff)](_0xc4b21d(0x109));if(_0x5acdd2===_0xc4b21d(0xf2)){const _0x48df00=Number(_0x58367e);if(isNaN(_0x48df00)||_0x48df00<=0x0)throw CliErrors[_0xc4b21d(0xff)](_0xc4b21d(0xed));}const _0x490833=resolveWriteScope({'explicitGlobal':_0x3f1c08[_0xc4b21d(0x110)]('global'),'policy':_0xc4b21d(0x12b)}),_0x33b107=toScopeFlags(_0x490833),_0x57feed=readScopedConfig(_0x33b107),_0xd0dff9=parseAliasAppcodeSetKey(_0x5acdd2);if(!_0xd0dff9&&!isTopLevelConfigKey(_0x5acdd2))throw CliErrors[_0xc4b21d(0xff)]('Top-level\x20key\x20\x22'+_0x5acdd2+_0xc4b21d(0x124),_0xc4b21d(0xfe)+getTopLevelConfigKeySummary()+_0xc4b21d(0x107));return _0xd0dff9?setLocalAppAlias(_0x57feed,_0xd0dff9,_0x58367e):_0x57feed[_0x5acdd2]=_0x5acdd2===_0xc4b21d(0xf2)?Number(_0x58367e):_0x58367e,console[_0xc4b21d(0x112)]('Set\x20`'+_0x5acdd2+'`\x20=\x20\x22'+_0x58367e+'\x22'+(_0x490833===_0xc4b21d(0x117)?_0xc4b21d(0xf8):'')),writeScopedConfig(_0x57feed,_0x33b107),{'ok':!![]};}},deleteDef={'service':a14_0x92c4d8(0x104),'command':'delete','description':a14_0x92c4d8(0xfb),'risk':a14_0x92c4d8(0x10f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x92c4d8(0x10c),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x19573b){const _0x314b50=a14_0x92c4d8,_0x470d78=_0x19573b[_0x314b50(0xf9)][0x0];if(!_0x470d78)throw CliErrors[_0x314b50(0xff)]('Missing\x20key\x20argument.',_0x314b50(0x126)+CLI_BIN_NAME+_0x314b50(0x11c));const _0x318d43=resolveWriteScope({'explicitGlobal':_0x19573b[_0x314b50(0x110)](_0x314b50(0x117)),'policy':'project-or-global-explicit'}),_0x5cf47c=toScopeFlags(_0x318d43),_0x292c2d=readScopedConfig(_0x5cf47c),_0x48a1e4=parseAliasDeleteKey(_0x470d78);if(_0x48a1e4){if(!deleteLocalAppAlias(_0x292c2d,_0x48a1e4))throw CliErrors['validation'](_0x314b50(0x101)+_0x470d78);return console[_0x314b50(0x112)]('Deleted\x20`'+_0x470d78+'`'+(_0x318d43===_0x314b50(0x117)?_0x314b50(0xf8):'')),writeScopedConfig(_0x292c2d,_0x5cf47c),{'ok':!![]};}if(_0x292c2d[_0x470d78]===undefined)throw CliErrors[_0x314b50(0xff)](_0x314b50(0xef)+_0x470d78+_0x314b50(0xf5));return delete _0x292c2d[_0x470d78],console['log'](_0x314b50(0x120)+_0x470d78+'`'+(_0x318d43===_0x314b50(0x117)?_0x314b50(0xf8):'')),writeScopedConfig(_0x292c2d,_0x5cf47c),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x148fed,_0x3ece8b){var _0x54b6c7=a15_0xb207,_0x5564f4=_0x148fed();while(!![]){try{var _0x1bac04=-parseInt(_0x54b6c7(0x1c9))/0x1+parseInt(_0x54b6c7(0x1c6))/0x2*(-parseInt(_0x54b6c7(0x1cc))/0x3)+-parseInt(_0x54b6c7(0x1ca))/0x4*(-parseInt(_0x54b6c7(0x1cb))/0x5)+-parseInt(_0x54b6c7(0x1c4))/0x6+-parseInt(_0x54b6c7(0x1c3))/0x7*(parseInt(_0x54b6c7(0x1c2))/0x8)+parseInt(_0x54b6c7(0x1c5))/0x9+-parseInt(_0x54b6c7(0x1c7))/0xa*(-parseInt(_0x54b6c7(0x1c8))/0xb);if(_0x1bac04===_0x3ece8b)break;else _0x5564f4['push'](_0x5564f4['shift']());}catch(_0x4c737f){_0x5564f4['push'](_0x5564f4['shift']());}}}(a15_0x1dcb,0xa9920));function a15_0x1dcb(){var _0x5a98cd=['16AqyYCQ','18905vfIKhu','448890KCDbyg','8Upavbi','648571TTFrIh','2563524XMztga','2399769Qrquul','8DGyRbf','18755670HrHHWQ','11IgvBAn','344345LqgOiD'];a15_0x1dcb=function(){return _0x5a98cd;};return a15_0x1dcb();}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a15_0xb207(_0xc640a5,_0x5e2316){_0xc640a5=_0xc640a5-0x1c2;var _0x1dcb71=a15_0x1dcb();var _0xb20771=_0x1dcb71[_0xc640a5];return _0xb20771;}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';
|