@lovrabet/lovrabet-cli 2.0.8 → 2.0.9-beta.1
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 -0
- 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 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a0_0x3b72bc=a0_0xf674;(function(_0xe1dcd8,_0x5ad1e3){const _0x34a434=a0_0xf674,_0xef9ac9=_0xe1dcd8();while(!![]){try{const _0x1e1907=parseInt(_0x34a434(0xd2))/0x1+-parseInt(_0x34a434(0xb8))/0x2*(parseInt(_0x34a434(0xcf))/0x3)+parseInt(_0x34a434(0xc6))/0x4+parseInt(_0x34a434(0xc1))/0x5+parseInt(_0x34a434(0xb6))/0x6*(parseInt(_0x34a434(0xdb))/0x7)+parseInt(_0x34a434(0xc3))/0x8*(-parseInt(_0x34a434(0xc0))/0x9)+-parseInt(_0x34a434(0xcd))/0xa;if(_0x1e1907===_0x5ad1e3)break;else _0xef9ac9['push'](_0xef9ac9['shift']());}catch(_0x5320f1){_0xef9ac9['push'](_0xef9ac9['shift']());}}}(a0_0x28b5,0x85fb4));function a0_0xf674(_0x283b6b,_0x53c702){_0x283b6b=_0x283b6b-0xb6;const _0x28b52a=a0_0x28b5();let _0xf6742d=_0x28b52a[_0x283b6b];return _0xf6742d;}import{jsx as a0_0x4d39b2}from'react/jsx-runtime';import a0_0x1f2d21 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';function a0_0x28b5(){const _0x7363e8=['unknownCommand','original','hint','defaultCommand','[preparse]\x20','5824044GnrhoE','3546805ZAqfAF','stderr','8pDLVZn','ERR_USE_AFTER_CLOSE','input','3723964vejFFt','corrected','code','\x20->\x20--','catch','Unexpected\x20error:','ERR_STREAM_DESTROYED','15789680mncgUy','\x0aCancelled.\x0a','15YroBoy','write','error','1063145CHlOdh','length','exit','flatMap','flags','slice','exitCode','cancelled','./framework/preparse.js','14mPIlGl','Hint:\x20','3196440rtcrvr','Error:\x20','397642swpiCu','log','help'];a0_0x28b5=function(){return _0x7363e8;};return a0_0x28b5();}import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x1f2d21(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()[a0_0x3b72bc(0xca)](handleError);async function main(){try{await run();}catch(_0x527153){handleError(_0x527153);}}async function run(){const _0xb1600c=a0_0x3b72bc;let _0x178e83=cli[_0xb1600c(0xc5)][0x0],_0x5af921=cli['input'][0x1];const _0x35a4cd=cli[_0xb1600c(0xd6)];try{const {correctFlags:_0x4d730f}=await import(_0xb1600c(0xda)),_0x2f48e2=getAllDefinitions()[_0xb1600c(0xd5)](_0x1f2fbe=>_0x1f2fbe[_0xb1600c(0xd6)]??[]),{flags:_0x43d6e0,corrections:_0x3e49e0}=_0x4d730f(_0x35a4cd,_0x2f48e2);if(_0x3e49e0[_0xb1600c(0xd3)]>0x0){for(const _0x2006dc of _0x3e49e0){process[_0xb1600c(0xc2)]['write'](_0xb1600c(0xbf)+_0x2006dc['handler']+':\x20--'+_0x2006dc[_0xb1600c(0xbc)]+_0xb1600c(0xc9)+_0x2006dc[_0xb1600c(0xc7)]+'\x0a');}Object['assign'](_0x35a4cd,_0x43d6e0);}}catch{}if(!_0x178e83||!isKnownService(_0x178e83)){const {waitUntilExit:_0x2beb70}=render(a0_0x4d39b2(Help,{}));await _0x2beb70();return;}const _0x41cb0e=getServiceEntry(_0x178e83);if(!_0x5af921){if(_0x35a4cd[_0xb1600c(0xba)]){console[_0xb1600c(0xb9)](generateServiceHelp(_0x178e83));return;}if(_0x41cb0e[_0xb1600c(0xbe)])_0x5af921=_0x41cb0e[_0xb1600c(0xbe)];else{console[_0xb1600c(0xb9)](generateServiceHelp(_0x178e83));return;}}const _0x537d5a=findDefinition(_0x178e83,_0x5af921);!_0x537d5a&&(console[_0xb1600c(0xb9)](generateServiceHelp(_0x178e83)),handleError(CliErrors[_0xb1600c(0xbb)](_0x178e83+'\x20'+_0x5af921)));if(_0x35a4cd['help']){console[_0xb1600c(0xb9)](generateCommandHelp(_0x537d5a));return;}const _0x59515d=buildConfigFromFlags(_0x35a4cd);await initGlobalEnvironment(_0x59515d);const _0x1bb9b0=createPipelineEnv(_0x59515d,_0x35a4cd);_0x1bb9b0['args']=cli[_0xb1600c(0xc5)][_0xb1600c(0xd7)](0x2),await runCommand(_0x537d5a,_0x1bb9b0);}function handleError(_0x417b26){const _0x2ead31=a0_0x3b72bc;if(_0x417b26 instanceof CliError){_0x417b26['code']===_0x2ead31(0xd9)&&(process['stderr'][_0x2ead31(0xd0)](_0x2ead31(0xce)),process[_0x2ead31(0xd4)](0x0));console[_0x2ead31(0xd1)](_0x2ead31(0xb7)+_0x417b26['message']);if(_0x417b26['hint'])console[_0x2ead31(0xd1)](_0x2ead31(0xdc)+_0x417b26[_0x2ead31(0xbd)]);process[_0x2ead31(0xd4)](_0x417b26[_0x2ead31(0xd8)]);}isUserCancellation(_0x417b26)&&(process[_0x2ead31(0xc2)][_0x2ead31(0xd0)](_0x2ead31(0xce)),process[_0x2ead31(0xd4)](0x0)),console['error'](_0x2ead31(0xcb),_0x417b26),process[_0x2ead31(0xd4)](0x1);}function isUserCancellation(_0x506ea6){const _0x1e91a3=a0_0x3b72bc;if(!(_0x506ea6 instanceof Error))return![];if(_0x506ea6['name']==='ExitPromptError')return!![];if(_0x506ea6[_0x1e91a3(0xc8)]===_0x1e91a3(0xc4))return!![];if(_0x506ea6[_0x1e91a3(0xc8)]===_0x1e91a3(0xcc))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2dfeb7,_0x56b7fd){const _0x50c3b7=a1_0x4879,_0x19813a=_0x2dfeb7();while(!![]){try{const _0x2ef957=parseInt(_0x50c3b7(0x121))/0x1+parseInt(_0x50c3b7(0x132))/0x2*(parseInt(_0x50c3b7(0x120))/0x3)+parseInt(_0x50c3b7(0x12b))/0x4+parseInt(_0x50c3b7(0x135))/0x5*(-parseInt(_0x50c3b7(0x13a))/0x6)+parseInt(_0x50c3b7(0x129))/0x7*(parseInt(_0x50c3b7(0x137))/0x8)+-parseInt(_0x50c3b7(0x123))/0x9+-parseInt(_0x50c3b7(0x128))/0xa*(-parseInt(_0x50c3b7(0x12e))/0xb);if(_0x2ef957===_0x56b7fd)break;else _0x19813a['push'](_0x19813a['shift']());}catch(_0x527fda){_0x19813a['push'](_0x19813a['shift']());}}}(a1_0x3a40,0x6016b));import{createHash}from'node:crypto';function a1_0x3a40(){const _0x26b727=['318228Zwywqv','sha256','my-apps.json','792ppndwP','appName','parse','items','6ORGFwt','trim','homeDirName','3105740DDaJOC','digest','112768gwCpsa','EACCES','cache','6BZsiqo','hex','code','507471axqRqh','154149YxYPgF','unknown','5030370LwvlQT','ak_','slice','isArray','appCode','11860RwzcRF','371VidIPL','stringify'];a1_0x3a40=function(){return _0x26b727;};return a1_0x3a40();}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a1_0x4879(_0x510e58,_0x518a99){_0x510e58=_0x510e58-0x11f;const _0x3a406b=a1_0x3a40();let _0x4879c4=_0x3a406b[_0x510e58];return _0x4879c4;}import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';export function fingerprintAccessKey(_0x2367e0){const _0x15a40a=a1_0x4879,_0x30f395=_0x2367e0[_0x15a40a(0x133)](),_0x5deab3=_0x30f395[_0x15a40a(0x125)](-0x6)||_0x15a40a(0x122),_0x214bce=createHash(_0x15a40a(0x12c))['update'](_0x30f395)[_0x15a40a(0x136)](_0x15a40a(0x13b))[_0x15a40a(0x125)](0x0,0xc);return _0x15a40a(0x124)+_0x5deab3+'_'+_0x214bce;}export function getAppCacheFilePath(_0x213cef,_0x4aa8ce){const _0x476fe9=a1_0x4879;return resolve(homedir(),PRODUCT_CONFIG[_0x476fe9(0x134)],_0x476fe9(0x139),_0x213cef,fingerprintAccessKey(_0x4aa8ce),_0x476fe9(0x12d));}export function readCachedAppList(_0xde63fb,_0x540671){const _0x573cd4=a1_0x4879;if(!_0x540671?.['trim']())return null;const _0x4bf922=getAppCacheFilePath(_0xde63fb,_0x540671);if(!existsSync(_0x4bf922))return null;try{const _0x24aa67=readFileSync(_0x4bf922,'utf8');if(!_0x24aa67[_0x573cd4(0x133)]())return null;const _0x4221e8=JSON[_0x573cd4(0x130)](_0x24aa67);if(!Array[_0x573cd4(0x126)](_0x4221e8[_0x573cd4(0x131)]))return null;return _0x4221e8;}catch{return null;}}export function writeCachedAppList(_0x4086e3,_0x171036,_0xf6ccdc){const _0x2cf660=a1_0x4879,_0x4438e9=getAppCacheFilePath(_0x4086e3,_0x171036),_0x58b4e8=dirname(_0x4438e9);!existsSync(_0x58b4e8)&&mkdirSync(_0x58b4e8,{'recursive':!![]});const _0x5b0fba=_0x4438e9+'.tmp';try{writeFileSync(_0x5b0fba,JSON[_0x2cf660(0x12a)](_0xf6ccdc,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x5b0fba,_0x4438e9);}catch(_0x9f0511){if(_0x9f0511[_0x2cf660(0x11f)]==='EPERM'||_0x9f0511[_0x2cf660(0x11f)]==='EXDEV'||_0x9f0511[_0x2cf660(0x11f)]===_0x2cf660(0x138)){writeFileSync(_0x4438e9,JSON[_0x2cf660(0x12a)](_0xf6ccdc,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x5b0fba);}catch{}}else throw _0x9f0511;}}catch(_0x1804b1){try{unlinkSync(_0x5b0fba);}catch{}throw _0x1804b1;}return _0x4438e9;}export function resolveCachedAppCode(_0x255ef9,_0x4e5871,_0x3528c3){const _0x1b2338=a1_0x4879;if(!_0x255ef9)return undefined;const _0x451ab9=readCachedAppList(_0x4e5871,_0x3528c3),_0x269603=_0x451ab9?.['items']['find'](_0x53513c=>_0x53513c[_0x1b2338(0x12f)]===_0x255ef9);return _0x269603?.[_0x1b2338(0x127)]?.[_0x1b2338(0x133)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x1b6da5=a2_0x15bf;(function(_0x313e56,_0x53fa7a){const _0x42ef52=a2_0x15bf,_0x1883fd=_0x313e56();while(!![]){try{const _0xd2423b=parseInt(_0x42ef52(0x114))/0x1*(-parseInt(_0x42ef52(0x132))/0x2)+-parseInt(_0x42ef52(0x125))/0x3*(-parseInt(_0x42ef52(0x151))/0x4)+-parseInt(_0x42ef52(0x130))/0x5+-parseInt(_0x42ef52(0x10a))/0x6+parseInt(_0x42ef52(0x15a))/0x7*(parseInt(_0x42ef52(0x158))/0x8)+-parseInt(_0x42ef52(0x15b))/0x9+parseInt(_0x42ef52(0x13c))/0xa;if(_0xd2423b===_0x53fa7a)break;else _0x1883fd['push'](_0x1883fd['shift']());}catch(_0x21dc9e){_0x1883fd['push'](_0x1883fd['shift']());}}}(a2_0x580a,0x5e6a1));import{CliErrors}from'../../errors.js';function a2_0x15bf(_0x25e285,_0xac27b6){_0x25e285=_0x25e285-0x108;const _0x580a78=a2_0x580a();let _0x15bf8c=_0x580a78[_0x25e285];return _0x15bf8c;}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_0x1b6da5(0x110),'type':a2_0x1b6da5(0x147),'description':'Use\x20global\x20config\x20scope','default':![]};function collectFlags(_0x39548a,_0x1efc94){const _0x4d0013=a2_0x1b6da5,_0x48d9bb={};for(const _0x4a3a2b of _0x1efc94){const _0x75ff2d=_0x4a3a2b['type']==='boolean'?_0x39548a[_0x4d0013(0x116)](_0x4a3a2b[_0x4d0013(0x148)]):_0x39548a['str'](_0x4a3a2b[_0x4d0013(0x148)]);if(_0x75ff2d!==''&&_0x75ff2d!==![])_0x48d9bb[_0x4a3a2b[_0x4d0013(0x148)]]=_0x75ff2d;}if(_0x39548a[_0x4d0013(0x10d)])_0x48d9bb[_0x4d0013(0x10d)]=!![];return _0x48d9bb;}function a2_0x580a(){const _0x5d2bc5=['Use\x20`','production','import','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','Target\x20environment\x20(default:\x20current\x20env)','use','Default\x20app\x20candidate\x20set\x20to\x20\x22','no-cache','pull','1572930PQAzfw','appcode','19348MIlCui','Set\x20the\x20fallback\x20app\x20candidate','Remote\x20app\x20name\x20to\x20activate','config','Available\x20remote\x20apps:\x20','defaultApp','entries','.appcode\x20to\x20.lovrabet.json.','Refreshed\x20app\x20cache\x20with\x20','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','11822560dNauuI','projectPath','\x22\x20not\x20found.','local','read','join','string','accessKey','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','Missing\x20app\x20name.','fetchedAt','boolean','name','Read\x20from\x20local\x20cache\x20only','appOwnerName','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','../../commands/app/remote-source.js','init','length','Initialize\x20','appCode','2390556ZqoxPW','App\x20\x22','source','appPublishStatus','push','\x20app\x20use\x20<name>\x20[--global]','No\x20apps\x20found\x20on\x20the\x20platform.','569528VlLvvA','str','7EIcecT','1490679kfVsjH','write','map','newConfigFileName','4627920DzTlgb','Filter\x20by\x20environment\x20(default:\x20current\x20env)','env','nonInteractive','../../commands/app/cache.js','items','global','app','\x20app(s)\x20for\x20env=\x22','mergedCli','22XHePiU','globalPath','bool','remote','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','envName','isCurrent','No\x20cached\x20apps\x20found.','Read\x20app\x20list\x20from\x20local\x20cache\x20only','trim','find','cachePath','from','appName','../../context.js','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','list','3shRuwu','\x20config\x20file'];a2_0x580a=function(){return _0x5d2bc5;};return a2_0x580a();}const initDef={'service':a2_0x1b6da5(0x111),'command':a2_0x1b6da5(0x14d),'description':a2_0x1b6da5(0x14f)+PRODUCT_CONFIG[a2_0x1b6da5(0x109)]+a2_0x1b6da5(0x126),'risk':a2_0x1b6da5(0x15c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x56346d){return await runInit(collectFlags(_0x56346d,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':'app','command':a2_0x1b6da5(0x124),'description':a2_0x1b6da5(0x123),'risk':a2_0x1b6da5(0x140),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x1b6da5(0x10c),'type':a2_0x1b6da5(0x142),'description':a2_0x1b6da5(0x10b),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':'boolean','description':a2_0x1b6da5(0x11c),'default':![]},{'name':a2_0x1b6da5(0x12e),'type':a2_0x1b6da5(0x147),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x272031){const _0x4c6449=a2_0x1b6da5,_0x472f20=_0x272031[_0x4c6449(0x159)]('env')||_0x272031[_0x4c6449(0x119)]||getEnv()||_0x4c6449(0x128),_0x40f8a1=_0x272031[_0x4c6449(0x116)](_0x4c6449(0x13f)),_0xf6c356=_0x272031[_0x4c6449(0x116)]('no-cache'),{readRawConfigWithLayers:_0x3d1a4d,resolveDefaultAppSource:_0x47b28f,getLocalAppAliases:_0x13ffe9}=await import('../../context.js'),{getRemoteAppList:_0x9f1620}=await import('../../commands/app/remote-source.js'),{config:_0x2b3377,layers:_0x41dab8}=_0x3d1a4d(),_0x215bfd=_0x47b28f(_0x41dab8),{defaultApp:_0x227623}=_0x2b3377,_0x54df6a=await _0x9f1620({'env':_0x472f20,'accessKey':_0x272031[_0x4c6449(0x143)],'localOnly':_0x40f8a1,'noCache':_0xf6c356}),_0x338079=_0x54df6a[_0x4c6449(0x10f)]['map'](_0x11d5c0=>{const _0x87cad9=_0x4c6449;return{'name':_0x11d5c0['appName'],'appcode':_0x11d5c0[_0x87cad9(0x150)],'named':!![],'definedIn':_0x87cad9(0x117),'isDefault':_0x11d5c0[_0x87cad9(0x121)]===_0x227623,...buildAppProfileListFields(_0x472f20),'source':_0x54df6a['source'],'owner':_0x11d5c0[_0x87cad9(0x14a)]??null,'status':_0x11d5c0[_0x87cad9(0x154)]??null,'cachedAt':_0x54df6a[_0x87cad9(0x146)]};}),_0x3f367c=_0x13ffe9(_0x2b3377);let _0x5a6ae0=0x0;for(const [_0x253be3,_0x2f3d19]of Object[_0x4c6449(0x138)](_0x3f367c)){const _0x3cc586=typeof _0x2f3d19[_0x4c6449(0x131)]===_0x4c6449(0x142)?_0x2f3d19['appcode'][_0x4c6449(0x11d)]():'';if(!_0x3cc586)continue;_0x5a6ae0+=0x1,_0x338079[_0x4c6449(0x155)]({'name':_0x253be3,'appcode':_0x3cc586,'named':!![],'definedIn':'local','isDefault':_0x253be3===_0x227623,...buildAppProfileListFields(_0x472f20),'source':_0x4c6449(0x135),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x338079,_0x272031[_0x4c6449(0x113)]);if(_0x338079[_0x4c6449(0x14e)]===0x0)return{'ok':!![],'data':[],'message':_0x54df6a[_0x4c6449(0x153)]==='cache'?_0x4c6449(0x11b):_0x4c6449(0x157)};const _0x456339=_0x338079[_0x4c6449(0x11e)](_0x4bb756=>_0x4bb756[_0x4c6449(0x11a)]===!![]),_0x234b12=_0x227623??_0x456339?.[_0x4c6449(0x148)]??null,_0x44dba9={'env':_0x472f20,'source':_0x54df6a[_0x4c6449(0x153)],'fetchedAt':_0x54df6a[_0x4c6449(0x146)],'cachePath':_0x54df6a[_0x4c6449(0x11f)],'globalPath':_0x41dab8[_0x4c6449(0x115)]??null,'projectPath':_0x41dab8[_0x4c6449(0x13d)]??null,'defaultApp':_0x234b12,'defaultAppSource':_0x227623!=null?_0x215bfd:null,'localAliasCount':_0x5a6ae0};return{'ok':!![],'data':{'items':_0x338079,'meta':_0x44dba9}};}},pullDef={'service':a2_0x1b6da5(0x111),'command':a2_0x1b6da5(0x12f),'description':a2_0x1b6da5(0x118),'risk':a2_0x1b6da5(0x15c),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a2_0x1b6da5(0x142),'description':a2_0x1b6da5(0x12b),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x1b6da5(0x13f),'type':a2_0x1b6da5(0x147),'description':a2_0x1b6da5(0x149),'default':![]},{'name':a2_0x1b6da5(0x12e),'type':a2_0x1b6da5(0x147),'description':a2_0x1b6da5(0x144),'default':![]}],async 'execute'(_0x57ce18){const _0x19771b=a2_0x1b6da5,_0x387918=_0x57ce18[_0x19771b(0x159)](_0x19771b(0x10c))||_0x57ce18[_0x19771b(0x119)]||getEnv()||'production',_0x4bb9c7=_0x57ce18['bool']('local'),_0x569e71=_0x57ce18[_0x19771b(0x116)](_0x19771b(0x12e)),{getRemoteAppList:_0x20a36d}=await import(_0x19771b(0x14c)),_0x41ecc8=await _0x20a36d({'env':_0x387918,'accessKey':_0x57ce18[_0x19771b(0x143)],'localOnly':_0x4bb9c7,'noCache':_0x569e71});return{'ok':!![],'data':{'total':_0x41ecc8[_0x19771b(0x10f)][_0x19771b(0x14e)],'env':_0x387918,'source':_0x41ecc8[_0x19771b(0x153)],'fetchedAt':_0x41ecc8[_0x19771b(0x146)],'cachePath':_0x41ecc8['cachePath']},'message':_0x41ecc8['source']==='cache'?'Loaded\x20'+_0x41ecc8[_0x19771b(0x10f)][_0x19771b(0x14e)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x387918+'\x22.':_0x19771b(0x13a)+_0x41ecc8[_0x19771b(0x10f)][_0x19771b(0x14e)]+_0x19771b(0x112)+_0x387918+'\x22.'};}},useDef={'service':'app','command':a2_0x1b6da5(0x12c),'description':a2_0x1b6da5(0x133),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x1b6da5(0x148),'description':a2_0x1b6da5(0x134),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x3fa78a){const _0x2bffa4=a2_0x1b6da5;if(!_0x3fa78a['args'][0x0])throw CliErrors['validation'](_0x2bffa4(0x145),'Usage:\x20'+CLI_BIN_NAME+_0x2bffa4(0x156));},async 'execute'(_0x1deb34){const _0x16f019=a2_0x1b6da5,_0x47f121=_0x1deb34['args'][0x0];if(!_0x47f121)throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x46950f,resolveLocalAppAliasCode:_0xaf3c4a}=await import(_0x16f019(0x122)),{readCachedAppList:_0x223917}=await import(_0x16f019(0x10e)),_0x267918=_0x1deb34['str'](_0x16f019(0x10c)),_0x2b07d0=_0x46950f(_0x267918?{'env':_0x267918}:{}),_0x274568=_0x223917(_0x2b07d0[_0x16f019(0x10c)],_0x2b07d0[_0x16f019(0x143)]),_0x41fdf2=_0x274568?.['items'][_0x16f019(0x11e)](_0x49f1da=>_0x49f1da[_0x16f019(0x121)]===_0x47f121),_0x19eb96=_0xaf3c4a(_0x2b07d0['raw']??{},_0x47f121);if(!_0x41fdf2&&!_0x19eb96&&_0x2b07d0[_0x16f019(0x137)]!==_0x47f121){const _0x3d36e4=[..._0x274568?.[_0x16f019(0x10f)][_0x16f019(0x108)](_0x470b9e=>_0x470b9e[_0x16f019(0x121)])??[]],_0x372327=_0x3d36e4[_0x16f019(0x14e)]===0x0?_0x16f019(0x127)+CLI_BIN_NAME+_0x16f019(0x13b)+_0x47f121+_0x16f019(0x139):_0x16f019(0x136)+Array[_0x16f019(0x120)](new Set(_0x3d36e4))[_0x16f019(0x141)](',\x20')+_0x16f019(0x12a);throw CliErrors['validation'](_0x16f019(0x152)+_0x47f121+_0x16f019(0x13e),_0x372327);}const _0x227141=_0x1deb34[_0x16f019(0x116)](_0x16f019(0x110));let _0x455d21;if(_0x227141)_0x455d21={'global':!![]};else{const {isInProject:_0x3ca805}=await import(_0x16f019(0x122)),_0x30fa51=_0x3ca805();_0x455d21=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x30fa51}));}const _0xae3695=readConfig(_0x455d21);return _0xae3695[_0x16f019(0x137)]=_0x47f121,writeConfig(_0xae3695,_0x455d21),{'ok':!![],'message':_0x16f019(0x12d)+_0x47f121+'\x22'+scopeLabel(_0x455d21)+'.'};}},importDef={'service':a2_0x1b6da5(0x111),'command':a2_0x1b6da5(0x129),'description':a2_0x1b6da5(0x14b),'risk':a2_0x1b6da5(0x15c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x4a7353){return await runInitImport(collectFlags(_0x4a7353,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a2_0x3b6a03=a2_0x6a6c;(function(_0x4488af,_0xa4d649){const _0x3f763e=a2_0x6a6c,_0x11d6d4=_0x4488af();while(!![]){try{const _0x341fc2=parseInt(_0x3f763e(0x97))/0x1*(-parseInt(_0x3f763e(0xad))/0x2)+-parseInt(_0x3f763e(0xae))/0x3+parseInt(_0x3f763e(0xb0))/0x4*(-parseInt(_0x3f763e(0xac))/0x5)+-parseInt(_0x3f763e(0x7d))/0x6+-parseInt(_0x3f763e(0x83))/0x7+parseInt(_0x3f763e(0xb2))/0x8*(parseInt(_0x3f763e(0x72))/0x9)+-parseInt(_0x3f763e(0xb6))/0xa*(-parseInt(_0x3f763e(0x69))/0xb);if(_0x341fc2===_0xa4d649)break;else _0x11d6d4['push'](_0x11d6d4['shift']());}catch(_0xb6c856){_0x11d6d4['push'](_0x11d6d4['shift']());}}}(a2_0x251c,0x3cac0));import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';function a2_0x6a6c(_0x2dc301,_0x4ee2e9){_0x2dc301=_0x2dc301-0x67;const _0x251c2e=a2_0x251c();let _0x6a6c4=_0x251c2e[_0x2dc301];return _0x6a6c4;}function a2_0x251c(){const _0x225dc8=['\x20config\x20file','1719840IIWKEk','read','map','projectPath','global','name','266707IDqkJs','import','push','Missing\x20app\x20name.','string','Available\x20remote\x20apps:\x20','local','raw','../../context.js','length','production','newConfigFileName','Read\x20app\x20list\x20from\x20local\x20cache\x20only','Use\x20global\x20config\x20scope','\x20app(s)\x20for\x20env=\x22','no-cache','appCode','join','envName','mergedCli','1PfPROX','find','validation','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','cache','No\x20apps\x20found\x20on\x20the\x20platform.','entries','Initialize\x20','appPublishStatus','App\x20\x22','Read\x20from\x20local\x20cache\x20only','\x20app\x20use\x20<name>\x20[--global]','defaultApp','No\x20cached\x20apps\x20found.','project-default','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','fetchedAt','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','appcode','accessKey','type','5jldQtG','348638YsamLv','88491JVdlgg','Use\x20`','1262416XYrEJr','env','4736quWHKl','source','Loaded\x20','Usage:\x20','10867530ydUOQV','appName','Default\x20app\x20candidate\x20set\x20to\x20\x22','Target\x20environment\x20(default:\x20current\x20env)','11qPxpoK','Refreshed\x20app\x20cache\x20with\x20','boolean','nonInteractive','bool','app','use','write','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','90cWBoeO','globalPath','.appcode\x20to\x20.lovrabet.json.','str','trim','args','config','items','from','init'];a2_0x251c=function(){return _0x225dc8;};return a2_0x251c();}const GLOBAL_FLAG={'name':a2_0x3b6a03(0x81),'type':'boolean','description':a2_0x3b6a03(0x90),'default':![]};function collectFlags(_0x125659,_0x210c28){const _0x14480c=a2_0x3b6a03,_0x11a42d={};for(const _0x265a57 of _0x210c28){const _0x22b37d=_0x265a57[_0x14480c(0xab)]==='boolean'?_0x125659[_0x14480c(0x6d)](_0x265a57[_0x14480c(0x82)]):_0x125659[_0x14480c(0x75)](_0x265a57[_0x14480c(0x82)]);if(_0x22b37d!==''&&_0x22b37d!==![])_0x11a42d[_0x265a57['name']]=_0x22b37d;}if(_0x125659[_0x14480c(0x6c)])_0x11a42d[_0x14480c(0x6c)]=!![];return _0x11a42d;}const initDef={'service':'app','command':a2_0x3b6a03(0x7b),'description':a2_0x3b6a03(0x9e)+PRODUCT_CONFIG[a2_0x3b6a03(0x8e)]+a2_0x3b6a03(0x7c),'risk':a2_0x3b6a03(0x70),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x2692f3){return await runInit(collectFlags(_0x2692f3,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x3b6a03(0x6e),'command':'list','description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a2_0x3b6a03(0x7e),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x3b6a03(0xb1),'type':a2_0x3b6a03(0x87),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x3b6a03(0x6b),'description':a2_0x3b6a03(0x8f),'default':![]},{'name':a2_0x3b6a03(0x92),'type':a2_0x3b6a03(0x6b),'description':a2_0x3b6a03(0x9a),'default':![]}],async 'execute'(_0x4bb877){const _0xef774f=a2_0x3b6a03,_0x47e27e=_0x4bb877[_0xef774f(0x75)](_0xef774f(0xb1))||_0x4bb877[_0xef774f(0x95)]||getEnv()||_0xef774f(0x8d),_0x4ad65a=_0x4bb877['bool']('local'),_0x3108df=_0x4bb877[_0xef774f(0x6d)](_0xef774f(0x92)),{readRawConfigWithLayers:_0x30b65a,resolveDefaultAppSource:_0x345956,getLocalAppAliases:_0x2fa973}=await import(_0xef774f(0x8b)),{getRemoteAppList:_0x3635a1}=await import('../../commands/app/remote-source.js'),{config:_0x30f7da,layers:_0x3889f3}=_0x30b65a(),_0x31cb66=_0x345956(_0x3889f3),{defaultApp:_0x1c817e}=_0x30f7da,_0x58a434=await _0x3635a1({'env':_0x47e27e,'accessKey':_0x4bb877[_0xef774f(0xaa)],'localOnly':_0x4ad65a,'noCache':_0x3108df}),_0x329055=_0x58a434['items'][_0xef774f(0x7f)](_0x48cd36=>{const _0x55572f=_0xef774f;return{'name':_0x48cd36[_0x55572f(0xb7)],'appcode':_0x48cd36[_0x55572f(0x93)],'named':!![],'definedIn':'remote','isDefault':_0x48cd36[_0x55572f(0xb7)]===_0x1c817e,...buildAppProfileListFields(_0x47e27e),'source':_0x58a434[_0x55572f(0xb3)],'owner':_0x48cd36['appOwnerName']??null,'status':_0x48cd36[_0x55572f(0x9f)]??null,'cachedAt':_0x58a434[_0x55572f(0xa7)]};}),_0x5ebf02=_0x2fa973(_0x30f7da);let _0x180384=0x0;for(const [_0x1fcbf8,_0x1ad1c2]of Object[_0xef774f(0x9d)](_0x5ebf02)){const _0x3c544b=typeof _0x1ad1c2[_0xef774f(0xa9)]===_0xef774f(0x87)?_0x1ad1c2[_0xef774f(0xa9)][_0xef774f(0x76)]():'';if(!_0x3c544b)continue;_0x180384+=0x1,_0x329055[_0xef774f(0x85)]({'name':_0x1fcbf8,'appcode':_0x3c544b,'named':!![],'definedIn':_0xef774f(0x89),'isDefault':_0x1fcbf8===_0x1c817e,...buildAppProfileListFields(_0x47e27e),'source':_0xef774f(0x78),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x329055,_0x4bb877[_0xef774f(0x96)]);if(_0x329055[_0xef774f(0x8c)]===0x0)return{'ok':!![],'data':[],'message':_0x58a434['source']===_0xef774f(0x9b)?_0xef774f(0xa4):_0xef774f(0x9c)};const _0x4fdc24=_0x329055[_0xef774f(0x98)](_0x25408e=>_0x25408e['isCurrent']===!![]),_0x3464fb=_0x1c817e??_0x4fdc24?.['name']??null,_0x3c1d55={'env':_0x47e27e,'source':_0x58a434[_0xef774f(0xb3)],'fetchedAt':_0x58a434['fetchedAt'],'cachePath':_0x58a434['cachePath'],'globalPath':_0x3889f3[_0xef774f(0x73)]??null,'projectPath':_0x3889f3[_0xef774f(0x80)]??null,'defaultApp':_0x3464fb,'defaultAppSource':_0x1c817e!=null?_0x31cb66:null,'localAliasCount':_0x180384};return{'ok':!![],'data':{'items':_0x329055,'meta':_0x3c1d55}};}},pullDef={'service':a2_0x3b6a03(0x6e),'command':'pull','description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a2_0x3b6a03(0x70),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x3b6a03(0xb1),'type':a2_0x3b6a03(0x87),'description':a2_0x3b6a03(0x68),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x3b6a03(0x89),'type':a2_0x3b6a03(0x6b),'description':a2_0x3b6a03(0xa1),'default':![]},{'name':'no-cache','type':a2_0x3b6a03(0x6b),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0xd51bb7){const _0x5bede9=a2_0x3b6a03,_0x4c0ec0=_0xd51bb7[_0x5bede9(0x75)](_0x5bede9(0xb1))||_0xd51bb7[_0x5bede9(0x95)]||getEnv()||_0x5bede9(0x8d),_0x2babc2=_0xd51bb7[_0x5bede9(0x6d)](_0x5bede9(0x89)),_0x1f08e6=_0xd51bb7['bool']('no-cache'),{getRemoteAppList:_0xb631a5}=await import('../../commands/app/remote-source.js'),_0x24592a=await _0xb631a5({'env':_0x4c0ec0,'accessKey':_0xd51bb7[_0x5bede9(0xaa)],'localOnly':_0x2babc2,'noCache':_0x1f08e6});return{'ok':!![],'data':{'total':_0x24592a[_0x5bede9(0x79)][_0x5bede9(0x8c)],'env':_0x4c0ec0,'source':_0x24592a['source'],'fetchedAt':_0x24592a['fetchedAt'],'cachePath':_0x24592a['cachePath']},'message':_0x24592a[_0x5bede9(0xb3)]==='cache'?_0x5bede9(0xb4)+_0x24592a[_0x5bede9(0x79)][_0x5bede9(0x8c)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x4c0ec0+'\x22.':_0x5bede9(0x6a)+_0x24592a[_0x5bede9(0x79)]['length']+_0x5bede9(0x91)+_0x4c0ec0+'\x22.'};}},useDef={'service':a2_0x3b6a03(0x6e),'command':a2_0x3b6a03(0x6f),'description':'Set\x20the\x20fallback\x20app\x20candidate','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x3b6a03(0x82),'description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x5e694c){const _0x1f1882=a2_0x3b6a03;if(!_0x5e694c[_0x1f1882(0x77)][0x0])throw CliErrors[_0x1f1882(0x99)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x1f1882(0xa2));},async 'execute'(_0x3007ef){const _0x5ebecc=a2_0x3b6a03,_0x29b061=_0x3007ef[_0x5ebecc(0x77)][0x0];if(!_0x29b061)throw CliErrors[_0x5ebecc(0x99)](_0x5ebecc(0x86),_0x5ebecc(0xb5)+CLI_BIN_NAME+_0x5ebecc(0xa2));const {buildConfigFromFlags:_0x36508c,resolveLocalAppAliasCode:_0x6e3ce8}=await import(_0x5ebecc(0x8b)),{readCachedAppList:_0x3519cb}=await import('../../commands/app/cache.js'),_0x103544=_0x3007ef[_0x5ebecc(0x75)](_0x5ebecc(0xb1)),_0xfaa5c=_0x36508c(_0x103544?{'env':_0x103544}:{}),_0x2f2877=_0x3519cb(_0xfaa5c[_0x5ebecc(0xb1)],_0xfaa5c['accessKey']),_0x32e48f=_0x2f2877?.[_0x5ebecc(0x79)]['find'](_0x426bcf=>_0x426bcf[_0x5ebecc(0xb7)]===_0x29b061),_0xb3d8b3=_0x6e3ce8(_0xfaa5c[_0x5ebecc(0x8a)]??{},_0x29b061);if(!_0x32e48f&&!_0xb3d8b3&&_0xfaa5c[_0x5ebecc(0xa3)]!==_0x29b061){const _0x298fcf=[..._0x2f2877?.[_0x5ebecc(0x79)][_0x5ebecc(0x7f)](_0x3b0758=>_0x3b0758[_0x5ebecc(0xb7)])??[]],_0x26cea3=_0x298fcf['length']===0x0?_0x5ebecc(0xaf)+CLI_BIN_NAME+_0x5ebecc(0xa8)+_0x29b061+_0x5ebecc(0x74):_0x5ebecc(0x88)+Array[_0x5ebecc(0x7a)](new Set(_0x298fcf))[_0x5ebecc(0x94)](',\x20')+_0x5ebecc(0x71);throw CliErrors[_0x5ebecc(0x99)](_0x5ebecc(0xa0)+_0x29b061+'\x22\x20not\x20found.',_0x26cea3);}const _0x414236=_0x3007ef[_0x5ebecc(0x6d)](_0x5ebecc(0x81));let _0x211bc6;if(_0x414236)_0x211bc6={'global':!![]};else{const {isInProject:_0x56b93d}=await import(_0x5ebecc(0x8b)),_0x511e32=_0x56b93d();_0x211bc6=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x5ebecc(0xa5),'inProject':_0x511e32}));}const _0x38e39a=readConfig(_0x211bc6);return _0x38e39a[_0x5ebecc(0xa3)]=_0x29b061,writeConfig(_0x38e39a,_0x211bc6),{'ok':!![],'message':_0x5ebecc(0x67)+_0x29b061+'\x22'+scopeLabel(_0x211bc6)+'.'};}},importDef={'service':a2_0x3b6a03(0x6e),'command':a2_0x3b6a03(0x84),'description':a2_0x3b6a03(0xa6),'risk':a2_0x3b6a03(0x70),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x4fcc54){return await runInitImport(collectFlags(_0x4fcc54,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8e1bc6,_0x2d153b){const _0x394fe0=a3_0x1214,_0x21f801=_0x8e1bc6();while(!![]){try{const _0x54cf46=-parseInt(_0x394fe0(0x1b4))/0x1+parseInt(_0x394fe0(0x1ac))/0x2*(-parseInt(_0x394fe0(0x1ad))/0x3)+-parseInt(_0x394fe0(0x1b6))/0x4*(-parseInt(_0x394fe0(0x1a8))/0x5)+parseInt(_0x394fe0(0x1b5))/0x6+-parseInt(_0x394fe0(0x1ab))/0x7*(-parseInt(_0x394fe0(0x1b3))/0x8)+parseInt(_0x394fe0(0x1b7))/0x9*(parseInt(_0x394fe0(0x1b0))/0xa)+parseInt(_0x394fe0(0x1a6))/0xb*(parseInt(_0x394fe0(0x1a7))/0xc);if(_0x54cf46===_0x2d153b)break;else _0x21f801['push'](_0x21f801['shift']());}catch(_0xf630ef){_0x21f801['push'](_0x21f801['shift']());}}}(a3_0x1357,0x69fca));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';function a3_0x1357(){const _0x357750=['4JawZrq','7646517tosBlS','success','44CSACll','4812DgrFdP','1673405vcsIvy','tableData','parse','75607FZLTNa','2GbgULM','2027712CKVHoC','../../../mock/app-list.json','data','10OBsEAu','errorCode','utf-8','248eYRvCa','662610mIynfx','1511442WBegom'];a3_0x1357=function(){return _0x357750;};return a3_0x1357();}function a3_0x1214(_0x4bb617,_0x5f25e4){_0x4bb617=_0x4bb617-0x1a5;const _0x1357d4=a3_0x1357();let _0x1214c7=_0x1357d4[_0x4bb617];return _0x1214c7;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x1bb055=a3_0x1214,_0x519f32=join(__dirname,_0x1bb055(0x1ae)),_0x127f16=readFileSync(_0x519f32,_0x1bb055(0x1b2));return JSON[_0x1bb055(0x1aa)](_0x127f16);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x3fe3bb=a3_0x1214,_0x21757a=getMockAppList();if(!_0x21757a[_0x3fe3bb(0x1a5)])throw new Error('Mock\x20API\x20error:\x20'+_0x21757a['errorMsg']+'\x20('+_0x21757a[_0x3fe3bb(0x1b1)]+')');return _0x21757a[_0x3fe3bb(0x1af)][_0x3fe3bb(0x1a9)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27070e,_0x149c7b){const _0x458b97=a4_0x3d75,_0x319e34=_0x27070e();while(!![]){try{const _0x3110ff=parseInt(_0x458b97(0x6c))/0x1+parseInt(_0x458b97(0x73))/0x2+parseInt(_0x458b97(0x79))/0x3+parseInt(_0x458b97(0x6d))/0x4*(parseInt(_0x458b97(0x70))/0x5)+-parseInt(_0x458b97(0x74))/0x6*(-parseInt(_0x458b97(0x6b))/0x7)+parseInt(_0x458b97(0x77))/0x8+parseInt(_0x458b97(0x69))/0x9*(-parseInt(_0x458b97(0x6e))/0xa);if(_0x3110ff===_0x149c7b)break;else _0x319e34['push'](_0x319e34['shift']());}catch(_0x222ce2){_0x319e34['push'](_0x319e34['shift']());}}}(a4_0x39af,0x9b2a7));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';function a4_0x39af(){const _0x2d19d9=['122840zwtLDI','52374ZdgYAu','remote','toISOString','7539096IBfCpV','cache','1393692yVTZtP','9kKxbxJ','fetchedAt','266eALOYQ','776350IWiQmu','8TkulVg','21931180CTybZn','trim','630635WDZvTW','toLowerCase','APP_LIST_SOURCE'];a4_0x39af=function(){return _0x2d19d9;};return a4_0x39af();}import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';function a4_0x3d75(_0x3aa5e4,_0x42c826){_0x3aa5e4=_0x3aa5e4-0x69;const _0x39aff3=a4_0x39af();let _0x3d75e9=_0x39aff3[_0x3aa5e4];return _0x3d75e9;}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x5519e5=a4_0x3d75,_0x4b5b8b=(productEnv(_0x5519e5(0x72))||'')[_0x5519e5(0x6f)]()[_0x5519e5(0x71)]();return _0x4b5b8b==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x157ec1){const _0x31563a=a4_0x3d75,{env:_0x5d17f2,accessKey:_0x26008c,localOnly:localOnly=![],noCache:noCache=![]}=_0x157ec1,_0x1914a6=readCachedAppList(_0x5d17f2,_0x26008c),_0x4bdf8e=_0x26008c?.[_0x31563a(0x6f)]()?getAppCacheFilePath(_0x5d17f2,_0x26008c):null;if(localOnly)return{'items':_0x1914a6?.['items']??[],'source':'cache','fetchedAt':_0x1914a6?.[_0x31563a(0x6a)]??null,'cachePath':_0x4bdf8e};try{const _0xf87fd0=await getRemoteAppItems(),_0x3f6d47=shouldUseMockRemoteApps()?'mock':_0x31563a(0x75),_0x4a5420=new Date()[_0x31563a(0x76)](),_0x4bca4d=_0x26008c?.['trim']()?writeCachedAppList(_0x5d17f2,_0x26008c,{'env':_0x5d17f2,'fetchedAt':_0x4a5420,'source':_0x3f6d47,'items':_0xf87fd0}):null;return{'items':_0xf87fd0,'source':_0x3f6d47,'fetchedAt':_0x4a5420,'cachePath':_0x4bca4d};}catch(_0x1a4823){if(!noCache&&_0x1914a6)return{'items':_0x1914a6['items'],'source':_0x31563a(0x78),'fetchedAt':_0x1914a6[_0x31563a(0x6a)],'cachePath':_0x4bdf8e};throw _0x1a4823;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a5_0x7627(_0x4caea1,_0x560bff){_0x4caea1=_0x4caea1-0x13d;const _0x598026=a5_0x5980();let _0x7627c6=_0x598026[_0x4caea1];return _0x7627c6;}(function(_0x467550,_0x3b2887){const _0x5687f9=a5_0x7627,_0x36dea6=_0x467550();while(!![]){try{const _0x1715e3=parseInt(_0x5687f9(0x148))/0x1+parseInt(_0x5687f9(0x145))/0x2+parseInt(_0x5687f9(0x144))/0x3+-parseInt(_0x5687f9(0x143))/0x4*(-parseInt(_0x5687f9(0x13d))/0x5)+-parseInt(_0x5687f9(0x147))/0x6*(parseInt(_0x5687f9(0x149))/0x7)+parseInt(_0x5687f9(0x13f))/0x8+-parseInt(_0x5687f9(0x14d))/0x9*(parseInt(_0x5687f9(0x141))/0xa);if(_0x1715e3===_0x3b2887)break;else _0x36dea6['push'](_0x36dea6['shift']());}catch(_0x2e1d4b){_0x36dea6['push'](_0x36dea6['shift']());}}}(a5_0x5980,0xbae2d));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x496573,_0x55ae63){const _0xbc1ba=a5_0x7627;if(!_0x55ae63)return;const _0x2f0503=!!(_0x55ae63[_0xbc1ba(0x146)]??_0x55ae63[_0xbc1ba(0x14a)]);for(const _0x389e42 of _0x496573){_0x389e42['isCurrent']=![];}const _0x3c5031=_0x55ae63['appCode']!=null?String(_0x55ae63[_0xbc1ba(0x14c)])[_0xbc1ba(0x14e)]():'';if(_0x2f0503){const _0xd949b9=_0x55ae63[_0xbc1ba(0x146)]??_0x55ae63['defaultApp'];if(_0xd949b9){const _0x4ae283=_0x496573[_0xbc1ba(0x140)](_0x37f2bc=>_0x37f2bc['named']===!![]&&_0x37f2bc[_0xbc1ba(0x14b)]===_0xd949b9&&_0x37f2bc[_0xbc1ba(0x142)]==='local'),_0x3e5caf=_0x4ae283??_0x496573[_0xbc1ba(0x140)](_0x4c5ffc=>_0x4c5ffc[_0xbc1ba(0x13e)]===!![]&&_0x4c5ffc[_0xbc1ba(0x14b)]===_0xd949b9);_0x3e5caf&&(_0x3e5caf[_0xbc1ba(0x150)]=!![]);}return;}if(!_0x3c5031)return;for(const _0x13f9e9 of _0x496573){String(_0x13f9e9['appcode']??'')[_0xbc1ba(0x14e)]()===_0x3c5031&&(_0x13f9e9[_0xbc1ba(0x150)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x4d3117){const _0x4c48b6=a5_0x7627;return formatScopeLabel(_0x4d3117[_0x4c48b6(0x14f)]?'global':'project');}function a5_0x5980(){const _0x25fa46=['2689812JCDjpV','currentApp','2694wOWeAi','1210032fVGcCf','10563escJJD','defaultApp','name','appCode','7686351XFEoDI','trim','global','isCurrent','416915ulDCBo','named','5310880BLmFmd','find','40RGtVNv','definedIn','20SFfcmQ','3670407cphFjS'];a5_0x5980=function(){return _0x25fa46;};return a5_0x5980();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x24fb07=a6_0x5b27;function a6_0x5b27(_0xc565e,_0x2cba9f){_0xc565e=_0xc565e-0xb4;const _0x4d401d=a6_0x4d40();let _0x5b2720=_0x4d401d[_0xc565e];return _0x5b2720;}(function(_0x14cfe7,_0x4790e3){const _0x4d9cee=a6_0x5b27,_0x4fb945=_0x14cfe7();while(!![]){try{const _0x4a8dd2=parseInt(_0x4d9cee(0xca))/0x1*(-parseInt(_0x4d9cee(0xf1))/0x2)+parseInt(_0x4d9cee(0x10a))/0x3*(-parseInt(_0x4d9cee(0xf3))/0x4)+-parseInt(_0x4d9cee(0xda))/0x5*(parseInt(_0x4d9cee(0xb6))/0x6)+parseInt(_0x4d9cee(0x10b))/0x7+-parseInt(_0x4d9cee(0x109))/0x8*(parseInt(_0x4d9cee(0xc6))/0x9)+parseInt(_0x4d9cee(0x105))/0xa+parseInt(_0x4d9cee(0xce))/0xb*(parseInt(_0x4d9cee(0xe3))/0xc);if(_0x4a8dd2===_0x4790e3)break;else _0x4fb945['push'](_0x4fb945['shift']());}catch(_0x477493){_0x4fb945['push'](_0x4fb945['shift']());}}}(a6_0x4d40,0x7087a));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';function a6_0x4d40(){const _0x291111=['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','312584ElVRNM','831057USbCMm','2466205UKtNCr','Invalid\x20accessKey\x20format:\x20\x22','logout','validation','str','Option\x20A:\x20','6SRToiX','Missing\x20accessKey.','Then\x20verify\x20with:\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','envName','trim','status','ACCESS_KEY','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','auth','Tip:\x20you\x20can\x20also\x20run:','stdout','\x20\x20export\x20','cancelled','global','AccessKey\x20cleared\x20from\x20','81SfGxKm','AccessKey\x20(ak_xxx...)','repeat','env','698AnUeQG','Shorthand\x20for\x20--access-key','access-key','daily','11ksqQad','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20config.','info','`auth\x20login`\x20does\x20not\x20support\x20--yes.','\x20doctor','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Option\x20B:\x20apps\x20config\x20(','\x20Current\x20env:\x20','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','boolean','init','3660845gJkgkI','push','\x20config.\x20Nothing\x20to\x20clear.','Option\x20C:\x20environment\x20variable','read','AccessKey:\x20','yes','newConfigFileName','length','28886244IXQmwV','login','Auth\x20config\x20reinitialized\x20in\x20','join','accessKey','AccessKey\x20saved\x20to\x20','Show\x20current\x20authentication\x20status','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Read\x20from\x20global\x20config\x20(default)','=ak_xxx','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','project','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','2532hZDeMU','\x20auth\x20status','12BrRZTm','\x20auth\x20login\x20--access-key\x20<ak_xxx>','write','Write\x20to\x20global\x20config\x20(default)','Use\x20`','test','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','development','production','\x20(via\x20','isTTY','No\x20AccessKey\x20found\x20in\x20','\x20Verify:\x20','ClientAk','Auth\x20mode:\x20','string','stdin','\x20env\x20var','4999710ptnaXm','slice','bool'];a6_0x4d40=function(){return _0x291111;};return a6_0x4d40();}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 _0x3469bf=a6_0x5b27;writeCliSideChannelLine(_0x3469bf(0x108)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x3469bf(0xc0)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x3469bf(0xf4));}function buildAccessKeySetupGuide(){const _0x5f2283=a6_0x5b27;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x5f2283(0xcf)]['join']('\x0a');}function canPromptForAccessKey(_0x39520a){const _0x5c6f14=a6_0x5b27;return!_0x39520a['nonInteractive']&&process[_0x5c6f14(0x103)][_0x5c6f14(0xfd)]!==![]&&process[_0x5c6f14(0xc1)][_0x5c6f14(0xfd)]!==![];}function resolveAuthScopeFlags(_0x20ad7a){const _0x5964bb=a6_0x5b27;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x20ad7a[_0x5964bb(0x107)]('global'),'explicitProject':_0x20ad7a[_0x5964bb(0x107)]('project'),'policy':'global-default'}));}async function resolveAuthWriteInput(_0xeded74){const _0x1e5f9c=a6_0x5b27;let _0x4845a7=(_0xeded74[_0x1e5f9c(0xb4)]('access-key')||_0xeded74[_0x1e5f9c(0xb4)]('ak')||'')[_0x1e5f9c(0xbb)]();const _0x4373a8=(_0xeded74[_0x1e5f9c(0xb4)](_0x1e5f9c(0xc9))||'')['trim']();if(!_0x4845a7&&canPromptForAccessKey(_0xeded74))try{showAccessKeyCreateHint(),_0x4845a7=await promptAccessKey('');}catch(_0xaad5ae){if(isAbortPrompt(_0xaad5ae))throw CliErrors[_0x1e5f9c(0xc3)]();throw _0xaad5ae;}if(!_0x4845a7)throw CliErrors[_0x1e5f9c(0x10e)](_0x1e5f9c(0xb7),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x1e5f9c(0xf8)](_0x4845a7))throw CliErrors[_0x1e5f9c(0x10e)](_0x1e5f9c(0x10c)+_0x4845a7+'\x22',_0x1e5f9c(0xd4));if(!_0x4373a8)return{'accessKey':_0x4845a7};const _0x517fa0=normalizeEnv(_0x4373a8);return{'accessKey':_0x4845a7,'env':isDaily(_0x517fa0)?_0x1e5f9c(0xcd):isDev(_0x517fa0)?_0x1e5f9c(0xfa):_0x1e5f9c(0xfb)};}export const authDefinitions=[{'service':a6_0x24fb07(0xbf),'command':a6_0x24fb07(0xe4),'description':a6_0x24fb07(0xbe),'risk':a6_0x24fb07(0xf5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x24fb07(0xcc),'type':a6_0x24fb07(0x102),'description':a6_0x24fb07(0xc7)},{'name':'ak','type':a6_0x24fb07(0x102),'description':a6_0x24fb07(0xcb)},{'name':a6_0x24fb07(0xc4),'type':a6_0x24fb07(0xd8),'description':a6_0x24fb07(0xf6),'default':!![]},{'name':a6_0x24fb07(0xef),'type':a6_0x24fb07(0xd8),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3d325f){const _0x3b5427=a6_0x24fb07;if(_0x3d325f['bool'](_0x3b5427(0xe0)))throw CliErrors[_0x3b5427(0x10e)](_0x3b5427(0xd2),_0x3b5427(0xf7)+CLI_BIN_NAME+_0x3b5427(0xee)+CLI_BIN_NAME+_0x3b5427(0xf0));const _0x21b00e=(_0x3d325f[_0x3b5427(0xb4)](_0x3b5427(0xcc))||_0x3d325f['str']('ak')||'')[_0x3b5427(0xbb)]();if(!_0x21b00e&&_0x3d325f['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x2941ef=await resolveAuthWriteInput(_0x3d325f),_0x2693b9=resolveAuthScopeFlags(_0x3d325f),_0x5a2756=readScopedConfig(_0x2693b9);_0x5a2756[_0x3b5427(0xe7)]=_0x2941ef[_0x3b5427(0xe7)];_0x2941ef[_0x3b5427(0xc9)]&&(_0x5a2756[_0x3b5427(0xc9)]=_0x2941ef[_0x3b5427(0xc9)]);writeScopedConfig(_0x5a2756,_0x2693b9);const _0x278258=_0x2693b9[_0x3b5427(0xc4)]?_0x3b5427(0xc4):_0x3b5427(0xef),_0x1af91e=_0x5a2756[_0x3b5427(0xc9)]?_0x3b5427(0xd6)+_0x5a2756[_0x3b5427(0xc9)]+'.':'';return{'ok':!![],'message':_0x3b5427(0xe8)+_0x278258+_0x3b5427(0xd0)+_0x1af91e+_0x3b5427(0xff)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x24fb07(0xbf),'command':a6_0x24fb07(0xd9),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a6_0x24fb07(0xf5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':'string','description':a6_0x24fb07(0xc7)},{'name':'ak','type':a6_0x24fb07(0x102),'description':a6_0x24fb07(0xcb)},{'name':'env','type':a6_0x24fb07(0x102),'description':a6_0x24fb07(0xd7)},{'name':'global','type':a6_0x24fb07(0xd8),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x24fb07(0xef),'type':'boolean','description':a6_0x24fb07(0xea),'default':![]}],async 'execute'(_0x5a947a){const _0x19c93d=a6_0x24fb07,_0x35fbe5=await resolveAuthWriteInput(_0x5a947a),_0x9b5a58=resolveAuthScopeFlags(_0x5a947a),_0x287a61={'accessKey':_0x35fbe5[_0x19c93d(0xe7)]};_0x35fbe5['env']&&(_0x287a61[_0x19c93d(0xc9)]=_0x35fbe5[_0x19c93d(0xc9)]);writeScopedConfig(_0x287a61,_0x9b5a58);const _0x22b440=_0x9b5a58[_0x19c93d(0xc4)]?_0x19c93d(0xc4):_0x19c93d(0xef),_0x1a1915=_0x287a61['env']?'\x20Current\x20env:\x20'+_0x287a61[_0x19c93d(0xc9)]+'.':'';return{'ok':!![],'message':_0x19c93d(0xe5)+_0x22b440+'\x20scope.'+_0x1a1915+_0x19c93d(0xff)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x24fb07(0xbf),'command':a6_0x24fb07(0x10d),'description':'Clear\x20accessKey\x20from\x20config','risk':a6_0x24fb07(0xf5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x24fb07(0xc4),'type':a6_0x24fb07(0xd8),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a6_0x24fb07(0xd8),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x3a77da){const _0x188a7f=a6_0x24fb07,_0x5831a1=resolveAuthScopeFlags(_0x3a77da),_0x5a8e55=readScopedConfig(_0x5831a1),_0x14414b=!!_0x5a8e55[_0x188a7f(0xe7)];delete _0x5a8e55['accessKey'],writeScopedConfig(_0x5a8e55,_0x5831a1);const _0x371270=_0x5831a1[_0x188a7f(0xc4)]?_0x188a7f(0xc4):'project';if(_0x14414b)return{'ok':!![],'message':_0x188a7f(0xc5)+_0x371270+'\x20config.'};return{'ok':!![],'message':_0x188a7f(0xfe)+_0x371270+_0x188a7f(0xdc)};}},{'service':a6_0x24fb07(0xbf),'command':a6_0x24fb07(0xbc),'description':a6_0x24fb07(0xe9),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x24fb07(0xc4),'type':a6_0x24fb07(0xd8),'description':a6_0x24fb07(0xec),'default':!![]},{'name':a6_0x24fb07(0xef),'type':'boolean','description':a6_0x24fb07(0xb9),'default':![]}],async 'execute'(_0x134b61){const _0x2976af=a6_0x24fb07,_0x47a25a=resolveAuthScopeFlags(_0x134b61),_0x338c7d=readScopedConfig(_0x47a25a),_0x439e98=productEnvName(_0x2976af(0xbd)),_0x1e4a0e=productEnv('ACCESS_KEY')||undefined,_0x5c81f8=_0x338c7d[_0x2976af(0xe7)]||undefined,_0xe63d57=_0x1e4a0e||_0x5c81f8,_0x2a254c=_0x1e4a0e?_0x439e98+_0x2976af(0x104):_0x5c81f8?(_0x47a25a[_0x2976af(0xc4)]?_0x2976af(0xc4):_0x2976af(0xef))+'\x20config':null,_0x450010=[_0x2976af(0x101)+AUTH_MODE[_0x2976af(0x100)]];if(_0xe63d57){const _0x563f51=_0xe63d57['length']>0x8?''+_0xe63d57[_0x2976af(0x106)](0x0,0x8)+'*'[_0x2976af(0xc8)](_0xe63d57[_0x2976af(0xe2)]-0x8):_0xe63d57;_0x450010[_0x2976af(0xdb)](_0x2976af(0xdf)+_0x563f51+(_0x2a254c?_0x2976af(0xfc)+_0x2a254c+')':''));}return!_0xe63d57&&(_0x450010[_0x2976af(0xdb)](''),_0x450010[_0x2976af(0xdb)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x450010[_0x2976af(0xdb)](''),_0x450010[_0x2976af(0xdb)](_0x2976af(0xb5)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x450010['push'](''),_0x450010[_0x2976af(0xdb)](_0x2976af(0xd5)+PRODUCT_CONFIG[_0x2976af(0xe1)]+')'),_0x450010[_0x2976af(0xdb)](_0x2976af(0xf9)),_0x450010[_0x2976af(0xdb)](''),_0x450010[_0x2976af(0xdb)](_0x2976af(0xdd)),_0x450010[_0x2976af(0xdb)](_0x2976af(0xc2)+_0x439e98+_0x2976af(0xed)),_0x450010['push'](''),_0x450010[_0x2976af(0xdb)](_0x2976af(0xb8)+CLI_BIN_NAME+_0x2976af(0xf2)),_0x450010[_0x2976af(0xdb)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x2976af(0xd3))),{'ok':!![],'message':_0x450010[_0x2976af(0xe6)]('\x0a')};}},{'service':a6_0x24fb07(0xbf),'command':a6_0x24fb07(0xd1),'description':a6_0x24fb07(0xeb),'risk':a6_0x24fb07(0xde),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5d89d6){const _0x296bb6=a6_0x24fb07,_0x21a96c=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x21a96c,'meta':{'env':_0x5d89d6[_0x296bb6(0xba)]??'production'}}};}}];
|
|
1
|
+
const a6_0xff03b2=a6_0x2b7d;(function(_0x409e2d,_0x553b0c){const _0x482b0f=a6_0x2b7d,_0x1df7a=_0x409e2d();while(!![]){try{const _0x525f1c=-parseInt(_0x482b0f(0x1b2))/0x1+-parseInt(_0x482b0f(0x198))/0x2*(-parseInt(_0x482b0f(0x1a0))/0x3)+-parseInt(_0x482b0f(0x170))/0x4*(parseInt(_0x482b0f(0x175))/0x5)+-parseInt(_0x482b0f(0x186))/0x6*(parseInt(_0x482b0f(0x18f))/0x7)+-parseInt(_0x482b0f(0x193))/0x8+parseInt(_0x482b0f(0x1ba))/0x9+-parseInt(_0x482b0f(0x195))/0xa*(-parseInt(_0x482b0f(0x19b))/0xb);if(_0x525f1c===_0x553b0c)break;else _0x1df7a['push'](_0x1df7a['shift']());}catch(_0x4d4a6e){_0x1df7a['push'](_0x1df7a['shift']());}}}(a6_0xb0bb,0xa9278));import{readScopedConfig,writeScopedConfig}from'../../context.js';function a6_0x2b7d(_0x41e2e2,_0x5c7ebf){_0x41e2e2=_0x41e2e2-0x167;const _0xb0bb71=a6_0xb0bb();let _0x2b7dce=_0xb0bb71[_0x41e2e2];return _0x2b7dce;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';function a6_0xb0bb(){const _0x503834=['join','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20auth\x20login\x20--access-key\x20<ak_xxx>','AccessKey\x20(ak_xxx...)','Clear\x20from\x20global\x20config\x20(default)','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','production','525GLcptp','write','\x20(via\x20','AccessKey\x20saved\x20to\x20','1024152MlWHWq','Write\x20to\x20global\x20config\x20(default)','10ZpJUkK','yes','AccessKey\x20cleared\x20from\x20','2jXxciW','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','global','12552793UbSpMI','bool','string','auth','slice','2693427LpDpei','envName','Missing\x20accessKey.','newConfigFileName','development','Shorthand\x20for\x20--access-key','Invalid\x20accessKey\x20format:\x20\x22','Option\x20A:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','ACCESS_KEY','accessKey','\x20env\x20var','login','\x20\x20export\x20','daily','Use\x20`','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','1003867hxuwWk','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','length','isTTY','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','Then\x20verify\x20with:\x20','init','\x20scope.','8558802IwDytg','\x20config','Read\x20from\x20global\x20config\x20(default)','logout','access-key','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','userCenterDisplayName','Auth\x20mode:\x20','\x20config.','repeat','stdout','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Auth\x20config\x20reinitialized\x20in\x20','push','1124qmqUyL','\x20Verify:\x20','\x20auth\x20status','boolean','trim','9965GmPfid','Show\x20current\x20authentication\x20status','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','=ak_xxx','\x20doctor','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','project','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Clear\x20accessKey\x20from\x20config','nonInteractive','validation','`auth\x20login`\x20does\x20not\x20support\x20--yes.','env','Option\x20C:\x20environment\x20variable','str','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','48414cVhNBy','\x20config.\x20Nothing\x20to\x20clear.'];a6_0xb0bb=function(){return _0x503834;};return a6_0xb0bb();}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x21a9df=a6_0x2b7d;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x21a9df(0x168)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x21a9df(0x18a));}function buildAccessKeySetupGuide(){const _0x28fec6=a6_0x2b7d;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x28fec6(0x16d)+CLI_BIN_NAME+_0x28fec6(0x189)][_0x28fec6(0x188)]('\x0a');}function canPromptForAccessKey(_0x47c313){const _0xaed15=a6_0x2b7d;return!_0x47c313['nonInteractive']&&process['stdin']['isTTY']!==![]&&process[_0xaed15(0x16c)][_0xaed15(0x1b5)]!==![];}function resolveAuthScopeFlags(_0x3968e8){const _0x3b939c=a6_0x2b7d;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x3968e8[_0x3b939c(0x19c)](_0x3b939c(0x19a)),'explicitProject':_0x3968e8[_0x3b939c(0x19c)](_0x3b939c(0x17b)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x4d1e79){const _0x273248=a6_0x2b7d;let _0x3d1457=(_0x4d1e79['str'](_0x273248(0x1be))||_0x4d1e79[_0x273248(0x183)]('ak')||'')[_0x273248(0x174)]();const _0x1d7648=(_0x4d1e79[_0x273248(0x183)](_0x273248(0x181))||'')['trim']();if(!_0x3d1457&&canPromptForAccessKey(_0x4d1e79))try{showAccessKeyCreateHint(),_0x3d1457=await promptAccessKey('');}catch(_0xc07d9d){if(isAbortPrompt(_0xc07d9d))throw CliErrors['cancelled']();throw _0xc07d9d;}if(!_0x3d1457)throw CliErrors['validation'](_0x273248(0x1a2),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x3d1457))throw CliErrors['validation'](_0x273248(0x1a6)+_0x3d1457+'\x22',_0x273248(0x18d));if(!_0x1d7648)return{'accessKey':_0x3d1457};const _0x5658e0=normalizeEnv(_0x1d7648);return{'accessKey':_0x3d1457,'env':isDaily(_0x5658e0)?_0x273248(0x1ae):isDev(_0x5658e0)?_0x273248(0x1a4):_0x273248(0x18e)};}export const authDefinitions=[{'service':a6_0xff03b2(0x19e),'command':a6_0xff03b2(0x1ac),'description':a6_0xff03b2(0x1b6),'risk':a6_0xff03b2(0x190),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0xff03b2(0x1be),'type':a6_0xff03b2(0x19d),'description':a6_0xff03b2(0x18b)},{'name':'ak','type':a6_0xff03b2(0x19d),'description':'Shorthand\x20for\x20--access-key'},{'name':a6_0xff03b2(0x19a),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x1b1),'default':![]}],async 'execute'(_0x4f5d6c){const _0x31d174=a6_0xff03b2;if(_0x4f5d6c[_0x31d174(0x19c)](_0x31d174(0x196)))throw CliErrors[_0x31d174(0x17f)](_0x31d174(0x180),_0x31d174(0x1af)+CLI_BIN_NAME+_0x31d174(0x199)+CLI_BIN_NAME+_0x31d174(0x1a8));const _0xd89132=(_0x4f5d6c[_0x31d174(0x183)]('access-key')||_0x4f5d6c['str']('ak')||'')[_0x31d174(0x174)]();if(!_0xd89132&&_0x4f5d6c[_0x31d174(0x17e)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x15996a=await resolveAuthWriteInput(_0x4f5d6c),_0xd45f00=resolveAuthScopeFlags(_0x4f5d6c),_0x38ec1a=readScopedConfig(_0xd45f00);_0x38ec1a[_0x31d174(0x1aa)]=_0x15996a[_0x31d174(0x1aa)];_0x15996a[_0x31d174(0x181)]&&(_0x38ec1a[_0x31d174(0x181)]=_0x15996a[_0x31d174(0x181)]);writeScopedConfig(_0x38ec1a,_0xd45f00);const _0x259e51=_0xd45f00[_0x31d174(0x19a)]?_0x31d174(0x19a):'project',_0x568900=_0x38ec1a[_0x31d174(0x181)]?'\x20Current\x20env:\x20'+_0x38ec1a[_0x31d174(0x181)]+'.':'';return{'ok':!![],'message':_0x31d174(0x192)+_0x259e51+_0x31d174(0x16a)+_0x568900+_0x31d174(0x171)+CLI_BIN_NAME+_0x31d174(0x172)};}},{'service':'auth','command':a6_0xff03b2(0x1b8),'description':a6_0xff03b2(0x177),'risk':a6_0xff03b2(0x190),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a6_0xff03b2(0x19d),'description':a6_0xff03b2(0x18b)},{'name':'ak','type':a6_0xff03b2(0x19d),'description':a6_0xff03b2(0x1a5)},{'name':a6_0xff03b2(0x181),'type':a6_0xff03b2(0x19d),'description':a6_0xff03b2(0x1b0)},{'name':'global','type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x194),'default':!![]},{'name':a6_0xff03b2(0x17b),'type':a6_0xff03b2(0x173),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x4cc7b8){const _0x3bd43f=a6_0xff03b2,_0x5c8dbf=await resolveAuthWriteInput(_0x4cc7b8),_0x430074=resolveAuthScopeFlags(_0x4cc7b8),_0x45dd22={'accessKey':_0x5c8dbf[_0x3bd43f(0x1aa)]};_0x5c8dbf['env']&&(_0x45dd22[_0x3bd43f(0x181)]=_0x5c8dbf[_0x3bd43f(0x181)]);writeScopedConfig(_0x45dd22,_0x430074);const _0x36939b=_0x430074[_0x3bd43f(0x19a)]?_0x3bd43f(0x19a):_0x3bd43f(0x17b),_0x58dce9=_0x45dd22[_0x3bd43f(0x181)]?'\x20Current\x20env:\x20'+_0x45dd22[_0x3bd43f(0x181)]+'.':'';return{'ok':!![],'message':_0x3bd43f(0x16e)+_0x36939b+_0x3bd43f(0x1b9)+_0x58dce9+_0x3bd43f(0x171)+CLI_BIN_NAME+_0x3bd43f(0x172)};}},{'service':a6_0xff03b2(0x19e),'command':a6_0xff03b2(0x1bd),'description':a6_0xff03b2(0x17d),'risk':a6_0xff03b2(0x190),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0xff03b2(0x19a),'type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x18c),'default':!![]},{'name':a6_0xff03b2(0x17b),'type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x167),'default':![]}],async 'execute'(_0x427c00){const _0x416b3d=a6_0xff03b2,_0x5b47fb=resolveAuthScopeFlags(_0x427c00),_0xcb1222=readScopedConfig(_0x5b47fb),_0x3f380b=!!_0xcb1222[_0x416b3d(0x1aa)];delete _0xcb1222[_0x416b3d(0x1aa)],writeScopedConfig(_0xcb1222,_0x5b47fb);const _0x40463a=_0x5b47fb['global']?_0x416b3d(0x19a):'project';if(_0x3f380b)return{'ok':!![],'message':_0x416b3d(0x197)+_0x40463a+_0x416b3d(0x16a)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x40463a+_0x416b3d(0x187)};}},{'service':a6_0xff03b2(0x19e),'command':'status','description':a6_0xff03b2(0x176),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0xff03b2(0x19a),'type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x1bc),'default':!![]},{'name':a6_0xff03b2(0x17b),'type':a6_0xff03b2(0x173),'description':a6_0xff03b2(0x185),'default':![]}],async 'execute'(_0x1573e8){const _0x4bb733=a6_0xff03b2,_0x3f0f8c=resolveAuthScopeFlags(_0x1573e8),_0x4ef5f4=readScopedConfig(_0x3f0f8c),_0x17742b=productEnvName('ACCESS_KEY'),_0x4b0c53=productEnv(_0x4bb733(0x1a9))||undefined,_0x4fe94b=_0x4ef5f4[_0x4bb733(0x1aa)]||undefined,_0x3d9595=_0x4b0c53||_0x4fe94b,_0x27dddc=_0x4b0c53?_0x17742b+_0x4bb733(0x1ab):_0x4fe94b?(_0x3f0f8c[_0x4bb733(0x19a)]?_0x4bb733(0x19a):'project')+_0x4bb733(0x1bb):null,_0x10fd3a=[_0x4bb733(0x169)+AUTH_MODE['ClientAk']];if(_0x3d9595){const _0x2e9d24=_0x3d9595[_0x4bb733(0x1b4)]>0x8?''+_0x3d9595[_0x4bb733(0x19f)](0x0,0x8)+'*'[_0x4bb733(0x16b)](_0x3d9595[_0x4bb733(0x1b4)]-0x8):_0x3d9595;_0x10fd3a[_0x4bb733(0x16f)]('AccessKey:\x20'+_0x2e9d24+(_0x27dddc?_0x4bb733(0x191)+_0x27dddc+')':''));}return!_0x3d9595&&(_0x10fd3a['push'](''),_0x10fd3a['push'](_0x4bb733(0x17c)),_0x10fd3a[_0x4bb733(0x16f)](''),_0x10fd3a[_0x4bb733(0x16f)](_0x4bb733(0x1a7)+CLI_BIN_NAME+_0x4bb733(0x17a)),_0x10fd3a[_0x4bb733(0x16f)](''),_0x10fd3a[_0x4bb733(0x16f)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x4bb733(0x1a3)]+')'),_0x10fd3a[_0x4bb733(0x16f)](_0x4bb733(0x1b3)),_0x10fd3a['push'](''),_0x10fd3a[_0x4bb733(0x16f)](_0x4bb733(0x182)),_0x10fd3a[_0x4bb733(0x16f)](_0x4bb733(0x1ad)+_0x17742b+_0x4bb733(0x178)),_0x10fd3a[_0x4bb733(0x16f)](''),_0x10fd3a['push'](_0x4bb733(0x1b7)+CLI_BIN_NAME+_0x4bb733(0x172)),_0x10fd3a[_0x4bb733(0x16f)](_0x4bb733(0x184)+CLI_BIN_NAME+_0x4bb733(0x179))),{'ok':!![],'message':_0x10fd3a['join']('\x0a')};}},{'service':a6_0xff03b2(0x19e),'command':'info','description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4ccf01){const _0x41ff9a=a6_0xff03b2,_0x221898=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x221898,'meta':{'env':_0x4ccf01[_0x41ff9a(0x1a1)]??_0x41ff9a(0x18e)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a7_0x3052(){const _0x24ea9b=['522mLPBMi','User\x20aborted\x20prompt','stdin','1299551tUtCXB','4687434LwwhYq','6341756JJcvcZ','16285680pNUlSd','10146BGUDJA','trim','10DuZwVd','name','AbortPrompt','stdout','close','once','race','SIGINT','4414344KGiVMe','3802715UVSoCM','removeListener'];a7_0x3052=function(){return _0x24ea9b;};return a7_0x3052();}(function(_0x3b4d61,_0x3b2b69){const _0x5de9e7=a7_0x2428,_0x5f2c4e=_0x3b4d61();while(!![]){try{const _0x3393cf=parseInt(_0x5de9e7(0x150))/0x1+parseInt(_0x5de9e7(0x154))/0x2*(parseInt(_0x5de9e7(0x161))/0x3)+-parseInt(_0x5de9e7(0x152))/0x4+parseInt(_0x5de9e7(0x156))/0x5*(-parseInt(_0x5de9e7(0x151))/0x6)+parseInt(_0x5de9e7(0x15f))/0x7+-parseInt(_0x5de9e7(0x15e))/0x8+parseInt(_0x5de9e7(0x153))/0x9;if(_0x3393cf===_0x3b2b69)break;else _0x5f2c4e['push'](_0x5f2c4e['shift']());}catch(_0x375678){_0x5f2c4e['push'](_0x5f2c4e['shift']());}}}(a7_0x3052,0xcbeec));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0xfb6554=a7_0x2428;super(_0xfb6554(0x14e)),this[_0xfb6554(0x157)]=_0xfb6554(0x158);}}function createSafeRl(){const _0x26f944=a7_0x2428,_0x1284a7=createInterface({'input':process[_0x26f944(0x14f)],'output':process[_0x26f944(0x159)]});let _0x2a1ee9;const _0x4be9fd=new Promise((_0x587c0c,_0x2fb566)=>{const _0x482363=_0x26f944;_0x2a1ee9=()=>{const _0x3a2d61=a7_0x2428;_0x2a1ee9&&(_0x1284a7[_0x3a2d61(0x160)](_0x3a2d61(0x15d),_0x2a1ee9),_0x2a1ee9=undefined);try{_0x1284a7[_0x3a2d61(0x15a)]();}catch{}_0x2fb566(new AbortPrompt());},_0x1284a7[_0x482363(0x15b)]('SIGINT',_0x2a1ee9);}),_0xb586c1=()=>{const _0x1a9d8b=_0x26f944;_0x2a1ee9&&(_0x1284a7[_0x1a9d8b(0x160)](_0x1a9d8b(0x15d),_0x2a1ee9),_0x2a1ee9=undefined);try{_0x1284a7[_0x1a9d8b(0x15a)]();}catch{}};return{'rl':_0x1284a7,'abortPromise':_0x4be9fd,'disposeSuccess':_0xb586c1};}export async function promptAccessKey(_0x2df3d4=''){const _0x1163c8=a7_0x2428,{rl:_0x10e649,abortPromise:_0x5a6b1,disposeSuccess:_0x309d08}=createSafeRl(),_0x248cd0=new Promise(_0x3fff01=>{const _0xb04b85=_0x2df3d4?'AccessKey\x20('+_0x2df3d4+'):\x20':'AccessKey\x20(paste\x20ak_...):\x20';_0x10e649['question'](_0xb04b85,_0x319791=>{const _0x163224=a7_0x2428;_0x309d08(),_0x3fff01(_0x319791[_0x163224(0x155)]()||_0x2df3d4);});});return Promise[_0x1163c8(0x15c)]([_0x248cd0,_0x5a6b1]);}function a7_0x2428(_0x7b82c,_0x18495c){_0x7b82c=_0x7b82c-0x14e;const _0x305259=a7_0x3052();let _0x242807=_0x305259[_0x7b82c];return _0x242807;}export function isAbortPrompt(_0x18970c){const _0x4c475a=a7_0x2428;return _0x18970c instanceof Error&&_0x18970c[_0x4c475a(0x157)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x179cfa=a8_0x3b29;(function(_0x469308,_0x4c69e8){const _0x42ff07=a8_0x3b29,_0x38871e=_0x469308();while(!![]){try{const _0x2606d3=parseInt(_0x42ff07(0x152))/0x1+parseInt(_0x42ff07(0x15f))/0x2+-parseInt(_0x42ff07(0x159))/0x3*(parseInt(_0x42ff07(0x15c))/0x4)+-parseInt(_0x42ff07(0x155))/0x5+parseInt(_0x42ff07(0x14e))/0x6*(-parseInt(_0x42ff07(0x153))/0x7)+-parseInt(_0x42ff07(0x163))/0x8*(-parseInt(_0x42ff07(0x14d))/0x9)+parseInt(_0x42ff07(0x156))/0xa*(parseInt(_0x42ff07(0x150))/0xb);if(_0x2606d3===_0x4c69e8)break;else _0x38871e['push'](_0x38871e['shift']());}catch(_0x2e4b1d){_0x38871e['push'](_0x38871e['shift']());}}}(a8_0x2560,0x5debc));function a8_0x3b29(_0x33d62a,_0x4fc94a){_0x33d62a=_0x33d62a-0x14d;const _0x256093=a8_0x2560();let _0x3b2923=_0x256093[_0x33d62a];return _0x3b2923;}function a8_0x2560(){const _0x57f2d8=['3768310WTkMyo','3151090zzNvld','Get\x20BFF\x20script\x20details\x20by\x20ID','scriptType','6CsWqBB','Script\x20ID','bool','898264uURutL','detail','num','1075742FtMKin','createdTime','functionName','read','8MAEnsV','2452581IpfltE','6CohlBN','description','22CfxZOr','appCode','738987rQUsPW','4144637axKytB','verbose'];a8_0x2560=function(){return _0x57f2d8;};return a8_0x2560();}import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':'bff','command':a8_0x179cfa(0x15d),'description':a8_0x179cfa(0x157),'risk':a8_0x179cfa(0x162),'flags':[{...ID_FLAG,'description':a8_0x179cfa(0x15a)},VERBOSE_FLAG],async 'execute'(_0x5d631e){const _0x5aa9c4=a8_0x179cfa,_0x5b6d33=await getBffScriptInfo(_0x5d631e[_0x5aa9c4(0x15e)]('id')),_0x53243d=_0x5d631e[_0x5aa9c4(0x15b)](_0x5aa9c4(0x154));if(_0x53243d)return{'ok':!![],'data':_0x5b6d33};return{'ok':!![],'data':{'id':_0x5b6d33['id'],'appCode':_0x5b6d33[_0x5aa9c4(0x151)],'functionName':_0x5b6d33[_0x5aa9c4(0x161)]??'','scriptType':_0x5b6d33[_0x5aa9c4(0x158)],'description':_0x5b6d33[_0x5aa9c4(0x14f)]||'(none)','createdTime':_0x5b6d33[_0x5aa9c4(0x160)]??'','updatedTime':_0x5b6d33['updatedTime']??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a9_0x1e2d39=a9_0x5b55;(function(_0x27b3c4,_0x51c49e){const _0x226ab3=a9_0x5b55,_0x2a0521=_0x27b3c4();while(!![]){try{const _0x2b4d6e=-parseInt(_0x226ab3(0x149))/0x1+-parseInt(_0x226ab3(0x139))/0x2*(-parseInt(_0x226ab3(0x137))/0x3)+-parseInt(_0x226ab3(0x144))/0x4+-parseInt(_0x226ab3(0x13e))/0x5*(parseInt(_0x226ab3(0x145))/0x6)+-parseInt(_0x226ab3(0x146))/0x7*(-parseInt(_0x226ab3(0x13b))/0x8)+-parseInt(_0x226ab3(0x142))/0x9*(parseInt(_0x226ab3(0x148))/0xa)+parseInt(_0x226ab3(0x143))/0xb;if(_0x2b4d6e===_0x51c49e)break;else _0x2a0521['push'](_0x2a0521['shift']());}catch(_0x7baa2f){_0x2a0521['push'](_0x2a0521['shift']());}}}(a9_0x5b4a,0x3e9f4));function a9_0x5b4a(){const _0x39d922=['now','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','read','513ShHspA','7295926acANuL','1764452CDUQVU','6Eqeqih','63xgTaZY','exec','29930XviCGV','366500gfrFjR','15vHYzWC','bff','133420vmsRRX','name','323560MrKyIU','str','BFF\x20executed\x20in\x20','630535DVVOCG'];a9_0x5b4a=function(){return _0x39d922;};return a9_0x5b4a();}import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a9_0x5b55(_0x23c781,_0x1f12db){_0x23c781=_0x23c781-0x137;const _0x5b4aef=a9_0x5b4a();let _0x5b55af=_0x5b4aef[_0x23c781];return _0x5b55af;}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a9_0x1e2d39(0x138),'command':a9_0x1e2d39(0x147),'description':a9_0x1e2d39(0x140),'risk':a9_0x1e2d39(0x141),'flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x9bc960){const _0x16284b=a9_0x1e2d39,_0x28e809=parseJsonParams(_0x9bc960['str']('params')),_0x3beb92=Date[_0x16284b(0x13f)](),_0x451292=await executeSdkBff(_0x9bc960[_0x16284b(0x13c)](_0x16284b(0x13a)),_0x28e809),_0x526cd3=Date[_0x16284b(0x13f)]()-_0x3beb92;return{'ok':!![],'data':{'result':_0x451292,'elapsed':_0x526cd3},'message':_0x16284b(0x13d)+_0x526cd3+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x18a6a8,_0x4e4179){const _0x44e684=a10_0x370b,_0x5383b1=_0x18a6a8();while(!![]){try{const _0x5b85d2=parseInt(_0x44e684(0x1b2))/0x1*(parseInt(_0x44e684(0x1b5))/0x2)+-parseInt(_0x44e684(0x1ae))/0x3+-parseInt(_0x44e684(0x1af))/0x4+-parseInt(_0x44e684(0x1b3))/0x5+-parseInt(_0x44e684(0x1b0))/0x6+-parseInt(_0x44e684(0x1b4))/0x7*(parseInt(_0x44e684(0x1ad))/0x8)+parseInt(_0x44e684(0x1b1))/0x9;if(_0x5b85d2===_0x4e4179)break;else _0x5383b1['push'](_0x5383b1['shift']());}catch(_0x196ffa){_0x5383b1['push'](_0x5383b1['shift']());}}}(a10_0x1b13,0xec7d4));import{bffDetail}from'../../commands/bff/detail.js';function a10_0x1b13(){const _0x3ff087=['62671Ipfsqw','2gRjsGi','672nFdKSQ','535479MmPYvz','5711128AlRpFY','6202266MsKRJr','53419716TrzjBF','189791rhVJog','8823085MOMbqZ'];a10_0x1b13=function(){return _0x3ff087;};return a10_0x1b13();}function a10_0x370b(_0x613440,_0x4c6c7c){_0x613440=_0x613440-0x1ad;const _0x1b1387=a10_0x1b13();let _0x370b88=_0x1b1387[_0x613440];return _0x370b88;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46a6cc,_0x13600f){const _0xed30ae=a11_0x4f51,_0x123e44=_0x46a6cc();while(!![]){try{const _0x3d5019=-parseInt(_0xed30ae(0x102))/0x1*(-parseInt(_0xed30ae(0x10b))/0x2)+-parseInt(_0xed30ae(0x10d))/0x3*(parseInt(_0xed30ae(0xfb))/0x4)+parseInt(_0xed30ae(0x109))/0x5+-parseInt(_0xed30ae(0xfa))/0x6*(parseInt(_0xed30ae(0x101))/0x7)+-parseInt(_0xed30ae(0xff))/0x8+parseInt(_0xed30ae(0x110))/0x9+-parseInt(_0xed30ae(0x105))/0xa;if(_0x3d5019===_0x13600f)break;else _0x123e44['push'](_0x123e44['shift']());}catch(_0x36a4d9){_0x123e44['push'](_0x123e44['shift']());}}}(a11_0x31b5,0x8ac10));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';function a11_0x4f51(_0x403b28,_0x2ac707){_0x403b28=_0x403b28-0xfa;const _0x31b504=a11_0x31b5();let _0x4f5141=_0x31b504[_0x403b28];return _0x4f5141;}export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';function a11_0x31b5(){const _0x355496=['project','Use\x20only\x20one\x20config\x20scope\x20flag.','1080380KGzgpM','\x20found).','global-default',',\x20or\x20run\x20`','4231300GymjQV','Not\x20inside\x20a\x20project\x20(no\x20','2uumAiZ','global','239280kcUomc','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','validation','783621WIjdqF','project-default','2676ESndfc','24SgClBR','newConfigFileName','Add\x20--global\x20to\x20write\x20to\x20~/','\x20(global)','3848104tRZltT','\x20init`\x20first.','805pSBFqU','753908aTwrmQ'];a11_0x31b5=function(){return _0x355496;};return a11_0x31b5();}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(_0x370626){const _0x3a286d=a11_0x4f51,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x311de8}=_0x370626;if(explicitGlobal&&explicitProject)throw CliErrors[_0x3a286d(0x10f)](_0x3a286d(0x10e),_0x3a286d(0x104));if(explicitGlobal)return _0x3a286d(0x10c);if(explicitProject)return _0x3a286d(0x103);switch(_0x311de8){case _0x3a286d(0x107):return _0x3a286d(0x10c);case _0x3a286d(0x111):return _0x370626['inProject']??isInProject()?_0x3a286d(0x103):_0x3a286d(0x10c);case'project-or-global-explicit':if(!(_0x370626['inProject']??isInProject()))throw CliErrors[_0x3a286d(0x10f)](_0x3a286d(0x10a)+PRODUCT_CONFIG[_0x3a286d(0xfc)]+_0x3a286d(0x106),_0x3a286d(0xfd)+PRODUCT_CONFIG['newConfigFileName']+_0x3a286d(0x108)+CLI_BIN_NAME+_0x3a286d(0x100));return _0x3a286d(0x103);}}export function toScopeFlags(_0x4e5541){return{'global':_0x4e5541==='global'};}export function formatScopeLabel(_0x54fbfb){const _0x28da51=a11_0x4f51;return _0x54fbfb===_0x28da51(0x10c)?_0x28da51(0xfe):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x21e630,_0x380e24){const _0x859f76=a12_0x32eb,_0x2652de=_0x21e630();while(!![]){try{const _0x158f17=parseInt(_0x859f76(0x20c))/0x1*(-parseInt(_0x859f76(0x1f7))/0x2)+-parseInt(_0x859f76(0x205))/0x3+parseInt(_0x859f76(0x1f9))/0x4*(-parseInt(_0x859f76(0x1fd))/0x5)+parseInt(_0x859f76(0x20d))/0x6*(parseInt(_0x859f76(0x203))/0x7)+parseInt(_0x859f76(0x209))/0x8*(parseInt(_0x859f76(0x1f6))/0x9)+parseInt(_0x859f76(0x1f5))/0xa+parseInt(_0x859f76(0x20f))/0xb*(parseInt(_0x859f76(0x207))/0xc);if(_0x158f17===_0x380e24)break;else _0x2652de['push'](_0x2652de['shift']());}catch(_0x2be4f){_0x2652de['push'](_0x2652de['shift']());}}}(a12_0xf942,0x4236a));import{CliErrors}from'../../errors.js';function isSet(_0xbcb67b,_0x179470){const _0x1a1d76=a12_0x32eb,_0x402173=_0xbcb67b[_0x1a1d76(0x201)](_0x179470);return _0x402173!==undefined&&_0x402173!==''&&_0x402173!==![]&&_0x402173!==0x0;}function a12_0x32eb(_0x3c6831,_0x29f07d){_0x3c6831=_0x3c6831-0x1f1;const _0xf942e6=a12_0xf942();let _0x32eb3a=_0xf942e6[_0x3c6831];return _0x32eb3a;}function a12_0xf942(){const _0xfdedb7=['\x20is\x20allowed,\x20found:\x20','508268sucNsw','72paRmau','Provide\x20one\x20of:\x20','143tkHKKj','Exactly\x20one\x20of\x20',':\x20expected\x20','Invalid\x20--','Flags\x20','2761910SZjbTK','863235WKgZKP','2QktxMt','length','48fJsAsw','\x20is\x20required\x20for\x20`','some','Only\x20one\x20of\x20','108040WnDjOX','At\x20least\x20one\x20of\x20','join','str','flag','Use\x20only\x20one\x20of:\x20','83307bWdvQv','test','1457994SahsUn','map','843636uWLGpj','filter','16OhciUk','validation'];a12_0xf942=function(){return _0xfdedb7;};return a12_0xf942();}function fmtNames(_0x49486f){const _0x40e42e=a12_0x32eb;return _0x49486f[_0x40e42e(0x206)](_0x5aa9a9=>'--'+_0x5aa9a9)[_0x40e42e(0x1ff)](',\x20');}export function requireOneOf(_0x33fe4d,_0x2dd431,_0x38399c){const _0x489e58=a12_0x32eb,_0x20fa98=_0x2dd431[_0x489e58(0x208)](_0xa767b7=>isSet(_0x33fe4d,_0xa767b7));if(_0x20fa98['length']!==0x1)throw CliErrors[_0x489e58(0x20a)](_0x20fa98[_0x489e58(0x1f8)]===0x0?_0x489e58(0x1f1)+fmtNames(_0x2dd431)+'\x20is\x20required\x20for\x20`'+_0x38399c+'`.':_0x489e58(0x1fc)+fmtNames(_0x2dd431)+_0x489e58(0x20b)+fmtNames(_0x20fa98)+'.',_0x20fa98[_0x489e58(0x1f8)]===0x0?_0x489e58(0x20e)+fmtNames(_0x2dd431):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x2c52cd,_0xe18a54,_0x31b0cf){const _0x4a297f=a12_0x32eb;if(!_0xe18a54[_0x4a297f(0x1fb)](_0x351b05=>isSet(_0x2c52cd,_0x351b05)))throw CliErrors[_0x4a297f(0x20a)](_0x4a297f(0x1fe)+fmtNames(_0xe18a54)+_0x4a297f(0x1fa)+_0x31b0cf+'`.',_0x4a297f(0x20e)+fmtNames(_0xe18a54));}export function mutuallyExclusive(_0x33944b,_0x3724d3,_0x2ac51c){const _0x40824b=a12_0x32eb,_0x24e916=_0x3724d3[_0x40824b(0x208)](_0x2a56b3=>isSet(_0x33944b,_0x2a56b3));if(_0x24e916[_0x40824b(0x1f8)]>0x1)throw CliErrors['validation'](_0x40824b(0x1f4)+fmtNames(_0x24e916)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x2ac51c+'`.',_0x40824b(0x202)+fmtNames(_0x3724d3));}export function validatePattern(_0x5a9f05,_0x327580,_0x549aff,_0x3ec3ad){const _0x2b59fe=a12_0x32eb,_0x646835=_0x5a9f05[_0x2b59fe(0x200)](_0x327580);if(_0x646835&&!_0x549aff[_0x2b59fe(0x204)](_0x646835))throw CliErrors['validation'](_0x2b59fe(0x1f3)+_0x327580+_0x2b59fe(0x1f2)+_0x3ec3ad+',\x20got\x20\x22'+_0x646835+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x136414=a13_0x5753;(function(_0x512811,_0x375ead){const _0x41f4a7=a13_0x5753,_0x22c69b=_0x512811();while(!![]){try{const _0x2c99c8=parseInt(_0x41f4a7(0x1be))/0x1*(parseInt(_0x41f4a7(0x1bc))/0x2)+-parseInt(_0x41f4a7(0x1b6))/0x3+-parseInt(_0x41f4a7(0x1c3))/0x4*(-parseInt(_0x41f4a7(0x1bd))/0x5)+parseInt(_0x41f4a7(0x1b5))/0x6*(parseInt(_0x41f4a7(0x1b4))/0x7)+parseInt(_0x41f4a7(0x1c5))/0x8+-parseInt(_0x41f4a7(0x1c1))/0x9+-parseInt(_0x41f4a7(0x1c7))/0xa;if(_0x2c99c8===_0x375ead)break;else _0x22c69b['push'](_0x22c69b['shift']());}catch(_0x3e4bb4){_0x22c69b['push'](_0x22c69b['shift']());}}}(a13_0x134d,0x3c979));export const CODE_FLAG={'name':a13_0x136414(0x1ba),'type':a13_0x136414(0x1c4),'required':!![],'description':a13_0x136414(0x1c6),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x136414(0x1bf)}};export const SQLCODE_FLAG={'name':a13_0x136414(0x1b1),'type':'string','required':!![],'description':a13_0x136414(0x1b2),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a13_0x136414(0x1b3)}};export const VERBOSE_FLAG={'name':a13_0x136414(0x1c2),'type':a13_0x136414(0x1bb),'description':'Return\x20full\x20raw\x20response\x20object'};function a13_0x5753(_0x153f93,_0x309b1d){_0x153f93=_0x153f93-0x1b1;const _0x134d62=a13_0x134d();let _0x575301=_0x134d62[_0x153f93];return _0x575301;}function a13_0x134d(){const _0x28dfd7=['SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','322SdswxZ','56838JiWzon','638010KXZRaX','Resource\x20ID','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','Resource\x20name\x20for\x20lookup','code','boolean','931382SbtuAF','83705yMosEI','1LFqDWw','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','name','560025cPFrwF','verbose','8SZHBvE','string','1432808pldiyn','Dataset\x20code\x20(32-char\x20hex\x20UUID)','5909520WMUJyH','sqlcode'];a13_0x134d=function(){return _0x28dfd7;};return a13_0x134d();}export const PARAMS_FLAG={'name':'params','type':a13_0x136414(0x1c4),'description':a13_0x136414(0x1b8)};export const NAME_FLAG={'name':a13_0x136414(0x1c0),'type':a13_0x136414(0x1c4),'description':a13_0x136414(0x1b9)};export const ID_FLAG={'name':'id','type':'number','required':!![],'description':a13_0x136414(0x1b7)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0x590851=a14_0x5ce9;function a14_0x5ce9(_0x449f66,_0x3c9a3f){_0x449f66=_0x449f66-0x1c6;const _0xbf49ba=a14_0xbf49();let _0x5ce978=_0xbf49ba[_0x449f66];return _0x5ce978;}(function(_0x328309,_0x2f627a){const _0x365e5c=a14_0x5ce9,_0xc5627f=_0x328309();while(!![]){try{const _0xf8bd5e=parseInt(_0x365e5c(0x1f7))/0x1+parseInt(_0x365e5c(0x1d0))/0x2+-parseInt(_0x365e5c(0x203))/0x3*(-parseInt(_0x365e5c(0x1dc))/0x4)+-parseInt(_0x365e5c(0x1df))/0x5+-parseInt(_0x365e5c(0x1d3))/0x6+-parseInt(_0x365e5c(0x1d6))/0x7+-parseInt(_0x365e5c(0x1da))/0x8*(-parseInt(_0x365e5c(0x206))/0x9);if(_0xf8bd5e===_0x2f627a)break;else _0xc5627f['push'](_0xc5627f['shift']());}catch(_0x2cfe09){_0xc5627f['push'](_0xc5627f['shift']());}}}(a14_0xbf49,0xe254c));import{CliErrors}from'../../errors.js';function a14_0xbf49(){const _0x304c72=['Config\x20files:\x0a','stringify','log','\x22\x20not\x20found\x20at\x20top\x20level.','Write\x20to\x20global\x20config','Value\x20to\x20assign','object','includes','Settable\x20keys:\x20','\x22\x20is\x20not\x20settable.','value','field','pretty','trim','\x20(global)','\x20config\x20delete\x20<key>\x20[--global]','Invalid\x20value\x20for\x20\x22','List\x20current\x20config','bool','Usage:\x20','1246256misbye','length','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Set\x20a\x20config\x20value','alias','format','Key\x20not\x20found:\x20','global','Key\x20\x22','raw','pageSize','pageSize\x20must\x20be\x20a\x20positive\x20number','89190jOHlYt','Get\x20a\x20config\x20value','\x22.\x20Allowed:\x20','604026EZQNhx','read','Top-level\x20key\x20\x22','../../context.js','key','split','isArray','validation','Delete\x20a\x20config\x20value','Missing\x20key\x20or\x20value.','\x20config\x20get\x20<key>','(none)','2666868SdSIPN','project-or-global-explicit','keys','3650094xcOJBZ','\x20config\x20set\x20<key>\x20<value>\x20[--global]','config','10366538RyZEOK','\x20\x20global:\x20\x20','appcode','args','56elqlLA','Missing\x20key\x20argument.','28TeBlaI',';\x20apps.<alias>.appcode','Set\x20`','1206315GEfrOl','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','write','apps'];a14_0xbf49=function(){return _0x304c72;};return a14_0xbf49();}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_0x590851(0x1fe),'type':'boolean','description':a14_0x590851(0x1e7),'default':![]};function parseAliasAppcodeSetKey(_0x28f8c5){const _0x1e5800=a14_0x590851,_0x2abeb3=_0x28f8c5[_0x1e5800(0x1c9)]('.');if(_0x2abeb3[_0x1e5800(0x1f8)]!==0x3||_0x2abeb3[0x0]!==_0x1e5800(0x1e2)||_0x2abeb3[0x2]!=='appcode')return undefined;const _0x233a65=_0x2abeb3[0x1]?.[_0x1e5800(0x1f0)]();return _0x233a65?_0x233a65:undefined;}function parseAliasDeleteKey(_0x34be96){const _0x2df27c=a14_0x590851,_0x31508b=_0x34be96['split']('.');if(_0x31508b[_0x2df27c(0x1f8)]===0x2&&_0x31508b[0x0]===_0x2df27c(0x1e2)){const _0x402709=_0x31508b[0x1]?.[_0x2df27c(0x1f0)]();return _0x402709?{'alias':_0x402709}:undefined;}if(_0x31508b['length']===0x3&&_0x31508b[0x0]==='apps'&&_0x31508b[0x2]==='appcode'){const _0x4842ab=_0x31508b[0x1]?.['trim']();return _0x4842ab?{'alias':_0x4842ab,'field':_0x2df27c(0x1d8)}:undefined;}return undefined;}function setLocalAppAlias(_0x5373a6,_0x37b8d1,_0x22ad39){const _0x1eca9c=a14_0x590851,_0x2dd810=_0x5373a6['apps']&&typeof _0x5373a6[_0x1eca9c(0x1e2)]===_0x1eca9c(0x1e9)&&!Array['isArray'](_0x5373a6[_0x1eca9c(0x1e2)])?_0x5373a6['apps']:{},_0xa4260f=_0x2dd810[_0x37b8d1]&&typeof _0x2dd810[_0x37b8d1]==='object'&&!Array[_0x1eca9c(0x1ca)](_0x2dd810[_0x37b8d1])?_0x2dd810[_0x37b8d1]:{};_0xa4260f[_0x1eca9c(0x1d8)]=_0x22ad39,_0x2dd810[_0x37b8d1]=_0xa4260f,_0x5373a6[_0x1eca9c(0x1e2)]=_0x2dd810;}function deleteLocalAppAlias(_0x2dbf68,_0x2a1726){const _0x4b2ea1=a14_0x590851;if(!_0x2dbf68[_0x4b2ea1(0x1e2)]||typeof _0x2dbf68['apps']!==_0x4b2ea1(0x1e9)||Array[_0x4b2ea1(0x1ca)](_0x2dbf68[_0x4b2ea1(0x1e2)]))return![];const _0x1380cb=_0x2dbf68[_0x4b2ea1(0x1e2)],_0x301b57=_0x1380cb[_0x2a1726[_0x4b2ea1(0x1fb)]];if(!_0x301b57||typeof _0x301b57!=='object'||Array[_0x4b2ea1(0x1ca)](_0x301b57))return![];if(!_0x2a1726[_0x4b2ea1(0x1ee)])return delete _0x1380cb[_0x2a1726[_0x4b2ea1(0x1fb)]],!![];if(!(_0x2a1726['field']in _0x301b57))return![];return delete _0x301b57[_0x2a1726[_0x4b2ea1(0x1ee)]],Object[_0x4b2ea1(0x1d2)](_0x301b57)['length']===0x0&&delete _0x1380cb[_0x2a1726[_0x4b2ea1(0x1fb)]],!![];}const listDef={'service':'config','command':'list','description':a14_0x590851(0x1f4),'risk':a14_0x590851(0x207),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x38056c){const _0x520fe8=a14_0x590851,{buildConfigFromFlags:_0x5a0c39}=await import(_0x520fe8(0x1c7)),_0x32cc15=_0x5a0c39({}),_0x428e4f=getProjectConfigPath(),_0x759dae=resolveWriteConfigPath(_0x520fe8(0x1fe));if(_0x38056c[_0x520fe8(0x1fc)]===_0x520fe8(0x1ef))return{'ok':!![],'message':_0x520fe8(0x1f9)+(JSON[_0x520fe8(0x1e4)](_0x32cc15['raw'],null,0x2)+'\x0a\x0a')+_0x520fe8(0x1e3)+('\x20\x20project:\x20'+(_0x428e4f??_0x520fe8(0x1cf))+'\x0a')+(_0x520fe8(0x1d7)+_0x759dae)};return{'ok':!![],'data':{'effective':_0x32cc15[_0x520fe8(0x200)],'configFiles':{'project':_0x428e4f??null,'global':_0x759dae}}};}},getDef={'service':a14_0x590851(0x1d5),'command':'get','description':a14_0x590851(0x204),'risk':a14_0x590851(0x207),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x590851(0x1c8),'description':a14_0x590851(0x1e0),'required':!![]}],'flags':[],async 'execute'(_0x42832e){const _0x3eae64=a14_0x590851,_0x2e8d53=_0x42832e[_0x3eae64(0x1d9)][0x0];if(!_0x2e8d53)throw CliErrors['validation'](_0x3eae64(0x1db),_0x3eae64(0x1f6)+CLI_BIN_NAME+_0x3eae64(0x1ce));const {buildConfigFromFlags:_0x4b4684}=await import(_0x3eae64(0x1c7)),{raw:_0x26c68b}=_0x4b4684({});if(_0x2e8d53[_0x3eae64(0x1ea)]('.')){const _0x411b34=_0x2e8d53[_0x3eae64(0x1c9)]('.');let _0x23c3fa=_0x26c68b;for(const _0x57e547 of _0x411b34){if(_0x23c3fa==null||typeof _0x23c3fa!==_0x3eae64(0x1e9))throw CliErrors[_0x3eae64(0x1cb)](_0x3eae64(0x1fd)+_0x2e8d53);_0x23c3fa=_0x23c3fa[_0x57e547];}if(_0x23c3fa===undefined)throw CliErrors[_0x3eae64(0x1cb)](_0x3eae64(0x1fd)+_0x2e8d53);return console['log'](typeof _0x23c3fa==='object'?JSON[_0x3eae64(0x1e4)](_0x23c3fa,null,0x2):String(_0x23c3fa)),{'ok':!![]};}const _0x5d3fb3=_0x26c68b[_0x2e8d53];if(_0x5d3fb3===undefined)throw CliErrors[_0x3eae64(0x1cb)]('Key\x20not\x20found:\x20'+_0x2e8d53);return console[_0x3eae64(0x1e5)](typeof _0x5d3fb3===_0x3eae64(0x1e9)?JSON[_0x3eae64(0x1e4)](_0x5d3fb3,null,0x2):String(_0x5d3fb3)),{'ok':!![]};}},setDef={'service':'config','command':'set','description':a14_0x590851(0x1fa),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x590851(0x1c8),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x590851(0x1ed),'description':a14_0x590851(0x1e8),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x483cae){const _0x421136=a14_0x590851,_0x16e6a0=_0x483cae[_0x421136(0x1d9)][0x0],_0x3f3805=_0x483cae[_0x421136(0x1d9)][0x1];if(!_0x16e6a0||_0x3f3805===undefined)throw CliErrors['validation'](_0x421136(0x1cd),'Usage:\x20'+CLI_BIN_NAME+_0x421136(0x1d4));if(ENUM_KEYS[_0x16e6a0]&&!ENUM_KEYS[_0x16e6a0][_0x421136(0x1ea)](_0x3f3805))throw CliErrors[_0x421136(0x1cb)](_0x421136(0x1f3)+_0x16e6a0+_0x421136(0x205)+ENUM_KEYS[_0x16e6a0]['join'](',\x20'));if(_0x16e6a0==='riskLevel')throw CliErrors['validation']('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x16e6a0===_0x421136(0x201)){const _0x2a65eb=Number(_0x3f3805);if(isNaN(_0x2a65eb)||_0x2a65eb<=0x0)throw CliErrors['validation'](_0x421136(0x202));}const _0x268af5=resolveWriteScope({'explicitGlobal':_0x483cae['bool'](_0x421136(0x1fe)),'policy':'project-or-global-explicit'}),_0x295945=toScopeFlags(_0x268af5),_0x3e82bd=readScopedConfig(_0x295945),_0x18cbff=parseAliasAppcodeSetKey(_0x16e6a0);if(!_0x18cbff&&!isTopLevelConfigKey(_0x16e6a0))throw CliErrors[_0x421136(0x1cb)](_0x421136(0x1c6)+_0x16e6a0+_0x421136(0x1ec),_0x421136(0x1eb)+getTopLevelConfigKeySummary()+_0x421136(0x1dd));return _0x18cbff?setLocalAppAlias(_0x3e82bd,_0x18cbff,_0x3f3805):_0x3e82bd[_0x16e6a0]=_0x16e6a0==='pageSize'?Number(_0x3f3805):_0x3f3805,console[_0x421136(0x1e5)](_0x421136(0x1de)+_0x16e6a0+'`\x20=\x20\x22'+_0x3f3805+'\x22'+(_0x268af5===_0x421136(0x1fe)?_0x421136(0x1f1):'')),writeScopedConfig(_0x3e82bd,_0x295945),{'ok':!![]};}},deleteDef={'service':a14_0x590851(0x1d5),'command':'delete','description':a14_0x590851(0x1cc),'risk':a14_0x590851(0x1e1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x590851(0x1c8),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x3b235a){const _0x149d4b=a14_0x590851,_0x10f229=_0x3b235a[_0x149d4b(0x1d9)][0x0];if(!_0x10f229)throw CliErrors[_0x149d4b(0x1cb)]('Missing\x20key\x20argument.',_0x149d4b(0x1f6)+CLI_BIN_NAME+_0x149d4b(0x1f2));const _0x3cd90d=resolveWriteScope({'explicitGlobal':_0x3b235a[_0x149d4b(0x1f5)](_0x149d4b(0x1fe)),'policy':_0x149d4b(0x1d1)}),_0x19a9c4=toScopeFlags(_0x3cd90d),_0x14cf6f=readScopedConfig(_0x19a9c4),_0x3ecdbb=parseAliasDeleteKey(_0x10f229);if(_0x3ecdbb){if(!deleteLocalAppAlias(_0x14cf6f,_0x3ecdbb))throw CliErrors[_0x149d4b(0x1cb)](_0x149d4b(0x1fd)+_0x10f229);return console['log']('Deleted\x20`'+_0x10f229+'`'+(_0x3cd90d===_0x149d4b(0x1fe)?_0x149d4b(0x1f1):'')),writeScopedConfig(_0x14cf6f,_0x19a9c4),{'ok':!![]};}if(_0x14cf6f[_0x10f229]===undefined)throw CliErrors[_0x149d4b(0x1cb)](_0x149d4b(0x1ff)+_0x10f229+_0x149d4b(0x1e6));return delete _0x14cf6f[_0x10f229],console['log']('Deleted\x20`'+_0x10f229+'`'+(_0x3cd90d===_0x149d4b(0x1fe)?_0x149d4b(0x1f1):'')),writeScopedConfig(_0x14cf6f,_0x19a9c4),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a14_0xf0c30a=a14_0x1660;(function(_0x52ed23,_0x1b75c3){const _0x33470d=a14_0x1660,_0x5bad48=_0x52ed23();while(!![]){try{const _0x467a8e=-parseInt(_0x33470d(0x9f))/0x1+parseInt(_0x33470d(0x8d))/0x2+parseInt(_0x33470d(0x9b))/0x3*(-parseInt(_0x33470d(0x80))/0x4)+-parseInt(_0x33470d(0x7f))/0x5+parseInt(_0x33470d(0x8e))/0x6*(-parseInt(_0x33470d(0xab))/0x7)+parseInt(_0x33470d(0x8c))/0x8*(-parseInt(_0x33470d(0xa5))/0x9)+parseInt(_0x33470d(0xb9))/0xa;if(_0x467a8e===_0x1b75c3)break;else _0x5bad48['push'](_0x5bad48['shift']());}catch(_0x3ee3b7){_0x5bad48['push'](_0x5bad48['shift']());}}}(a14_0x5c5d,0x95f8b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a14_0xf0c30a(0x85),'type':'boolean','description':a14_0xf0c30a(0xac),'default':![]};function parseAliasAppcodeSetKey(_0x3113d1){const _0x1fc97c=a14_0xf0c30a,_0xba7186=_0x3113d1[_0x1fc97c(0x99)]('.');if(_0xba7186[_0x1fc97c(0xa3)]!==0x3||_0xba7186[0x0]!==_0x1fc97c(0x9e)||_0xba7186[0x2]!==_0x1fc97c(0xb5))return undefined;const _0x50c684=_0xba7186[0x1]?.[_0x1fc97c(0x81)]();return _0x50c684?_0x50c684:undefined;}function a14_0x1660(_0x163f35,_0x27ddb9){_0x163f35=_0x163f35-0x7d;const _0x5c5db7=a14_0x5c5d();let _0x16609f=_0x5c5db7[_0x163f35];return _0x16609f;}function a14_0x5c5d(){const _0x327c93=['10012qdBsQk','350970jnWuoR','pageSize\x20must\x20be\x20a\x20positive\x20number','Value\x20to\x20assign','key','Delete\x20a\x20config\x20value','value','Settable\x20keys:\x20','set','stringify','raw','field','split','Get\x20a\x20config\x20value','873Eyehfj','Set\x20`','Invalid\x20value\x20for\x20\x22','apps','450816idggeT','Set\x20a\x20config\x20value','config','validation','length','join','8012583hNOKLb','Missing\x20key\x20argument.','delete','\x20config\x20delete\x20<key>\x20[--global]','list',';\x20apps.<alias>.appcode','7cpKgpo','Write\x20to\x20global\x20config','\x20\x20project:\x20','Key\x20not\x20found:\x20','Key\x20\x22','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','pageSize','Usage:\x20','object','\x20(global)','appcode','Config\x20files:\x0a','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','isArray','39014760VvvrWP','args','Top-level\x20key\x20\x22','format','\x22\x20is\x20not\x20settable.','4267200GWhSMa','14284zjhXkg','trim','`\x20=\x20\x22','bool','Missing\x20key\x20or\x20value.','global','includes','alias','read','write','log','../../context.js','8rldNJo'];a14_0x5c5d=function(){return _0x327c93;};return a14_0x5c5d();}function parseAliasDeleteKey(_0x13851e){const _0x270af3=a14_0xf0c30a,_0x5b4efa=_0x13851e[_0x270af3(0x99)]('.');if(_0x5b4efa[_0x270af3(0xa3)]===0x2&&_0x5b4efa[0x0]==='apps'){const _0xc4d041=_0x5b4efa[0x1]?.['trim']();return _0xc4d041?{'alias':_0xc4d041}:undefined;}if(_0x5b4efa[_0x270af3(0xa3)]===0x3&&_0x5b4efa[0x0]==='apps'&&_0x5b4efa[0x2]===_0x270af3(0xb5)){const _0x750d7=_0x5b4efa[0x1]?.[_0x270af3(0x81)]();return _0x750d7?{'alias':_0x750d7,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x159851,_0x2f2355,_0x1bf77c){const _0x2629a7=a14_0xf0c30a,_0x286907=_0x159851[_0x2629a7(0x9e)]&&typeof _0x159851[_0x2629a7(0x9e)]===_0x2629a7(0xb3)&&!Array[_0x2629a7(0xb8)](_0x159851['apps'])?_0x159851[_0x2629a7(0x9e)]:{},_0x5932a8=_0x286907[_0x2f2355]&&typeof _0x286907[_0x2f2355]===_0x2629a7(0xb3)&&!Array[_0x2629a7(0xb8)](_0x286907[_0x2f2355])?_0x286907[_0x2f2355]:{};_0x5932a8['appcode']=_0x1bf77c,_0x286907[_0x2f2355]=_0x5932a8,_0x159851[_0x2629a7(0x9e)]=_0x286907;}function deleteLocalAppAlias(_0x2ad8e0,_0xf8d86){const _0x5dec96=a14_0xf0c30a;if(!_0x2ad8e0['apps']||typeof _0x2ad8e0[_0x5dec96(0x9e)]!==_0x5dec96(0xb3)||Array[_0x5dec96(0xb8)](_0x2ad8e0[_0x5dec96(0x9e)]))return![];const _0x22f98b=_0x2ad8e0[_0x5dec96(0x9e)],_0x5bc739=_0x22f98b[_0xf8d86['alias']];if(!_0x5bc739||typeof _0x5bc739!==_0x5dec96(0xb3)||Array['isArray'](_0x5bc739))return![];if(!_0xf8d86[_0x5dec96(0x98)])return delete _0x22f98b[_0xf8d86[_0x5dec96(0x87)]],!![];if(!(_0xf8d86[_0x5dec96(0x98)]in _0x5bc739))return![];return delete _0x5bc739[_0xf8d86[_0x5dec96(0x98)]],Object['keys'](_0x5bc739)[_0x5dec96(0xa3)]===0x0&&delete _0x22f98b[_0xf8d86[_0x5dec96(0x87)]],!![];}const listDef={'service':a14_0xf0c30a(0xa1),'command':a14_0xf0c30a(0xa9),'description':'List\x20current\x20config','risk':a14_0xf0c30a(0x88),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x9a49d){const _0x1b32fd=a14_0xf0c30a,{buildConfigFromFlags:_0x1af2d9}=await import(_0x1b32fd(0x8b)),_0x530360=_0x1af2d9({}),_0x4dd7ee=getProjectConfigPath(),_0x394e7d=resolveWriteConfigPath(_0x1b32fd(0x85));if(_0x9a49d[_0x1b32fd(0x7d)]==='pretty')return{'ok':!![],'message':_0x1b32fd(0xb0)+(JSON[_0x1b32fd(0x96)](_0x530360[_0x1b32fd(0x97)],null,0x2)+'\x0a\x0a')+_0x1b32fd(0xb6)+(_0x1b32fd(0xad)+(_0x4dd7ee??'(none)')+'\x0a')+('\x20\x20global:\x20\x20'+_0x394e7d)};return{'ok':!![],'data':{'effective':_0x530360[_0x1b32fd(0x97)],'configFiles':{'project':_0x4dd7ee??null,'global':_0x394e7d}}};}},getDef={'service':a14_0xf0c30a(0xa1),'command':'get','description':a14_0xf0c30a(0x9a),'risk':a14_0xf0c30a(0x88),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0xf0c30a(0x91),'description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x2a7916){const _0x3d4b4b=a14_0xf0c30a,_0x272219=_0x2a7916[_0x3d4b4b(0xba)][0x0];if(!_0x272219)throw CliErrors[_0x3d4b4b(0xa2)](_0x3d4b4b(0xa6),_0x3d4b4b(0xb2)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x44e97e}=await import(_0x3d4b4b(0x8b)),{raw:_0x54ab8d}=_0x44e97e({});if(_0x272219[_0x3d4b4b(0x86)]('.')){const _0x2777e9=_0x272219[_0x3d4b4b(0x99)]('.');let _0x1dc247=_0x54ab8d;for(const _0x266788 of _0x2777e9){if(_0x1dc247==null||typeof _0x1dc247!=='object')throw CliErrors[_0x3d4b4b(0xa2)](_0x3d4b4b(0xae)+_0x272219);_0x1dc247=_0x1dc247[_0x266788];}if(_0x1dc247===undefined)throw CliErrors[_0x3d4b4b(0xa2)]('Key\x20not\x20found:\x20'+_0x272219);return console[_0x3d4b4b(0x8a)](typeof _0x1dc247===_0x3d4b4b(0xb3)?JSON[_0x3d4b4b(0x96)](_0x1dc247,null,0x2):String(_0x1dc247)),{'ok':!![]};}const _0x270810=_0x54ab8d[_0x272219];if(_0x270810===undefined)throw CliErrors[_0x3d4b4b(0xa2)](_0x3d4b4b(0xae)+_0x272219);return console['log'](typeof _0x270810===_0x3d4b4b(0xb3)?JSON['stringify'](_0x270810,null,0x2):String(_0x270810)),{'ok':!![]};}},setDef={'service':'config','command':a14_0xf0c30a(0x95),'description':a14_0xf0c30a(0xa0),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0xf0c30a(0x93),'description':a14_0xf0c30a(0x90),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x314808){const _0x2df19c=a14_0xf0c30a,_0x2f9aff=_0x314808[_0x2df19c(0xba)][0x0],_0x472951=_0x314808['args'][0x1];if(!_0x2f9aff||_0x472951===undefined)throw CliErrors[_0x2df19c(0xa2)](_0x2df19c(0x84),_0x2df19c(0xb2)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x2f9aff]&&!ENUM_KEYS[_0x2f9aff][_0x2df19c(0x86)](_0x472951))throw CliErrors[_0x2df19c(0xa2)](_0x2df19c(0x9d)+_0x2f9aff+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x2f9aff][_0x2df19c(0xa4)](',\x20'));if(_0x2f9aff==='riskLevel')throw CliErrors[_0x2df19c(0xa2)](_0x2df19c(0xb7));if(_0x2f9aff===_0x2df19c(0xb1)){const _0x305bb7=Number(_0x472951);if(isNaN(_0x305bb7)||_0x305bb7<=0x0)throw CliErrors['validation'](_0x2df19c(0x8f));}const _0xfbeb8f=resolveWriteScope({'explicitGlobal':_0x314808[_0x2df19c(0x83)](_0x2df19c(0x85)),'policy':'project-or-global-explicit'}),_0x123414=toScopeFlags(_0xfbeb8f),_0x45865d=readScopedConfig(_0x123414),_0x3b7ad2=parseAliasAppcodeSetKey(_0x2f9aff);if(!_0x3b7ad2&&!isTopLevelConfigKey(_0x2f9aff))throw CliErrors[_0x2df19c(0xa2)](_0x2df19c(0xbb)+_0x2f9aff+_0x2df19c(0x7e),_0x2df19c(0x94)+getTopLevelConfigKeySummary()+_0x2df19c(0xaa));return _0x3b7ad2?setLocalAppAlias(_0x45865d,_0x3b7ad2,_0x472951):_0x45865d[_0x2f9aff]=_0x2f9aff===_0x2df19c(0xb1)?Number(_0x472951):_0x472951,console[_0x2df19c(0x8a)](_0x2df19c(0x9c)+_0x2f9aff+_0x2df19c(0x82)+_0x472951+'\x22'+(_0xfbeb8f==='global'?_0x2df19c(0xb4):'')),writeScopedConfig(_0x45865d,_0x123414),{'ok':!![]};}},deleteDef={'service':a14_0xf0c30a(0xa1),'command':a14_0xf0c30a(0xa7),'description':a14_0xf0c30a(0x92),'risk':a14_0xf0c30a(0x89),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0xf0c30a(0x91),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x2e23a9){const _0x5af562=a14_0xf0c30a,_0x411b6d=_0x2e23a9[_0x5af562(0xba)][0x0];if(!_0x411b6d)throw CliErrors[_0x5af562(0xa2)](_0x5af562(0xa6),_0x5af562(0xb2)+CLI_BIN_NAME+_0x5af562(0xa8));const _0x43e96c=resolveWriteScope({'explicitGlobal':_0x2e23a9[_0x5af562(0x83)]('global'),'policy':'project-or-global-explicit'}),_0x17e551=toScopeFlags(_0x43e96c),_0x2cfa4b=readScopedConfig(_0x17e551),_0x29f5f1=parseAliasDeleteKey(_0x411b6d);if(_0x29f5f1){if(!deleteLocalAppAlias(_0x2cfa4b,_0x29f5f1))throw CliErrors[_0x5af562(0xa2)](_0x5af562(0xae)+_0x411b6d);return console[_0x5af562(0x8a)]('Deleted\x20`'+_0x411b6d+'`'+(_0x43e96c==='global'?'\x20(global)':'')),writeScopedConfig(_0x2cfa4b,_0x17e551),{'ok':!![]};}if(_0x2cfa4b[_0x411b6d]===undefined)throw CliErrors['validation'](_0x5af562(0xaf)+_0x411b6d+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x2cfa4b[_0x411b6d],console[_0x5af562(0x8a)]('Deleted\x20`'+_0x411b6d+'`'+(_0x43e96c===_0x5af562(0x85)?_0x5af562(0xb4):'')),writeScopedConfig(_0x2cfa4b,_0x17e551),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x447777,_0x2eb7af){var _0x47b1af=a15_0x5aef,_0x370d88=_0x447777();while(!![]){try{var _0x3c7675=parseInt(_0x47b1af(0x1af))/0x1*(parseInt(_0x47b1af(0x1a9))/0x2)+parseInt(_0x47b1af(0x1ab))/0x3*(parseInt(_0x47b1af(0x1b2))/0x4)+-parseInt(_0x47b1af(0x1b0))/0x5+parseInt(_0x47b1af(0x1b1))/0x6+-parseInt(_0x47b1af(0x1ac))/0x7+-parseInt(_0x47b1af(0x1aa))/0x8+-parseInt(_0x47b1af(0x1ae))/0x9*(parseInt(_0x47b1af(0x1ad))/0xa);if(_0x3c7675===_0x2eb7af)break;else _0x370d88['push'](_0x370d88['shift']());}catch(_0x16fb4a){_0x370d88['push'](_0x370d88['shift']());}}}(a15_0x1510,0x27106));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x5aef(_0x4a29c1,_0x311db4){_0x4a29c1=_0x4a29c1-0x1a9;var _0x151003=a15_0x1510();var _0x5aefd2=_0x151003[_0x4a29c1];return _0x5aefd2;}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a15_0x1510(){var _0x1257c6=['308uvJnXw','388EKJqZr','22352ocpMBM','8274HIoaxI','851781KxkjWp','430FwZUjN','14211WBAVzY','419akUXhn','355680fgHSqP','779184XoNlpy'];a15_0x1510=function(){return _0x1257c6;};return a15_0x1510();}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';
|