@lovrabet/lovrabet-cli 2.0.12 → 2.0.13-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(function(
|
|
2
|
+
const a0_0x4f2542=a0_0x575f;function a0_0x575f(_0x540f0d,_0x35052c){_0x540f0d=_0x540f0d-0x144;const _0x5f2b39=a0_0x5f2b();let _0x575f9f=_0x5f2b39[_0x540f0d];return _0x575f9f;}(function(_0xb3830e,_0x25278f){const _0x18cf06=a0_0x575f,_0x20e941=_0xb3830e();while(!![]){try{const _0x3bc67e=-parseInt(_0x18cf06(0x14e))/0x1+parseInt(_0x18cf06(0x159))/0x2+-parseInt(_0x18cf06(0x15f))/0x3+-parseInt(_0x18cf06(0x163))/0x4+parseInt(_0x18cf06(0x149))/0x5+parseInt(_0x18cf06(0x160))/0x6+parseInt(_0x18cf06(0x15c))/0x7;if(_0x3bc67e===_0x25278f)break;else _0x20e941['push'](_0x20e941['shift']());}catch(_0x1771ef){_0x20e941['push'](_0x20e941['shift']());}}}(a0_0x5f2b,0x46343));function a0_0x5f2b(){const _0x5f2999=['\x0aCancelled.\x0a','exitCode','name',':\x20--','args','hint','length','cancelled','2259315TuFdgD','Unexpected\x20error:','message','unknownCommand','flatMap','121310iOgvee','input','stderr','./framework/preparse.js','code','original','Hint:\x20','catch','ERR_STREAM_DESTROYED','help','log','309228UxKemC','assign','write','215166WubYUh','exit','error','1040550gCsaIR','3380388RRWrNb','handler','defaultCommand','1779592JIxIGp','flags','\x20->\x20--','ExitPromptError','Error:\x20'];a0_0x5f2b=function(){return _0x5f2999;};return a0_0x5f2b();}import{jsx as a0_0x465f2f}from'react/jsx-runtime';import a0_0x302c64 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';import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x302c64(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()[a0_0x4f2542(0x155)](handleError);async function main(){try{await run();}catch(_0x15fcf9){handleError(_0x15fcf9);}}async function run(){const _0x525365=a0_0x4f2542;let _0x28056d=cli[_0x525365(0x14f)][0x0],_0x545d9c=cli[_0x525365(0x14f)][0x1];const _0x3c084e=cli[_0x525365(0x164)];try{const {correctFlags:_0x58554f}=await import(_0x525365(0x151)),_0x501f8e=getAllDefinitions()[_0x525365(0x14d)](_0x34f66c=>_0x34f66c['flags']??[]),{flags:_0x20ebcd,corrections:_0x4aa60d}=_0x58554f(_0x3c084e,_0x501f8e);if(_0x4aa60d[_0x525365(0x147)]>0x0){for(const _0x39b543 of _0x4aa60d){process[_0x525365(0x150)][_0x525365(0x15b)]('[preparse]\x20'+_0x39b543[_0x525365(0x161)]+_0x525365(0x144)+_0x39b543[_0x525365(0x153)]+_0x525365(0x165)+_0x39b543['corrected']+'\x0a');}Object[_0x525365(0x15a)](_0x3c084e,_0x20ebcd);}}catch{}if(!_0x28056d||!isKnownService(_0x28056d)){const {waitUntilExit:_0x4bbe59}=render(a0_0x465f2f(Help,{}));await _0x4bbe59();return;}const _0x57ef57=getServiceEntry(_0x28056d);if(!_0x545d9c){if(_0x3c084e[_0x525365(0x157)]){console[_0x525365(0x158)](generateServiceHelp(_0x28056d));return;}if(_0x57ef57[_0x525365(0x162)])_0x545d9c=_0x57ef57[_0x525365(0x162)];else{console[_0x525365(0x158)](generateServiceHelp(_0x28056d));return;}}const _0x242120=findDefinition(_0x28056d,_0x545d9c);!_0x242120&&(console[_0x525365(0x158)](generateServiceHelp(_0x28056d)),handleError(CliErrors[_0x525365(0x14c)](_0x28056d+'\x20'+_0x545d9c)));if(_0x3c084e['help']){console['log'](generateCommandHelp(_0x242120));return;}const _0x1d206a=buildConfigFromFlags(_0x3c084e);await initGlobalEnvironment(_0x1d206a);const _0x14fc19=createPipelineEnv(_0x1d206a,_0x3c084e);_0x14fc19[_0x525365(0x145)]=cli[_0x525365(0x14f)]['slice'](0x2),await runCommand(_0x242120,_0x14fc19);}function handleError(_0x30257f){const _0x3210f9=a0_0x4f2542;if(_0x30257f instanceof CliError){_0x30257f[_0x3210f9(0x152)]===_0x3210f9(0x148)&&(process[_0x3210f9(0x150)]['write'](_0x3210f9(0x168)),process[_0x3210f9(0x15d)](0x0));console[_0x3210f9(0x15e)](_0x3210f9(0x167)+_0x30257f[_0x3210f9(0x14b)]);if(_0x30257f['hint'])console[_0x3210f9(0x15e)](_0x3210f9(0x154)+_0x30257f[_0x3210f9(0x146)]);process['exit'](_0x30257f[_0x3210f9(0x169)]);}isUserCancellation(_0x30257f)&&(process['stderr'][_0x3210f9(0x15b)](_0x3210f9(0x168)),process[_0x3210f9(0x15d)](0x0)),console[_0x3210f9(0x15e)](_0x3210f9(0x14a),_0x30257f),process['exit'](0x1);}function isUserCancellation(_0xa9216c){const _0x2a63b=a0_0x4f2542;if(!(_0xa9216c instanceof Error))return![];if(_0xa9216c[_0x2a63b(0x16a)]===_0x2a63b(0x166))return!![];if(_0xa9216c['code']==='ERR_USE_AFTER_CLOSE')return!![];if(_0xa9216c[_0x2a63b(0x152)]===_0x2a63b(0x156))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a0da9,_0x4bdead){const _0x631d9a=a1_0x4a78,_0x37fdaa=_0x4a0da9();while(!![]){try{const _0x30fab5=parseInt(_0x631d9a(0xd8))/0x1*(-parseInt(_0x631d9a(0xc1))/0x2)+-parseInt(_0x631d9a(0xd6))/0x3+parseInt(_0x631d9a(0xd3))/0x4+-parseInt(_0x631d9a(0xcd))/0x5+-parseInt(_0x631d9a(0xd1))/0x6+-parseInt(_0x631d9a(0xd7))/0x7+parseInt(_0x631d9a(0xda))/0x8;if(_0x30fab5===_0x4bdead)break;else _0x37fdaa['push'](_0x37fdaa['shift']());}catch(_0x5375fe){_0x37fdaa['push'](_0x37fdaa['shift']());}}}(a1_0x4865,0xd4601));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a1_0x4a78(_0x182f2d,_0x12a56d){_0x182f2d=_0x182f2d-0xc0;const _0x48659a=a1_0x4865();let _0x4a7882=_0x48659a[_0x182f2d];return _0x4a7882;}import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';function a1_0x4865(){const _0x147fef=['10044846DhHDWK','isArray','3230872XOpqPn','utf8','parse','1625370QFRJQj','3616256mMZeRD','681143KUrFuN','ak_','39083904aXaDQc','.tmp','2QHPLkC','digest','EXDEV','homeDirName','trim','stringify','EPERM','items','update','unknown','cache','hex','7048175xeUZes','appName','EACCES','slice'];a1_0x4865=function(){return _0x147fef;};return a1_0x4865();}export function fingerprintAccessKey(_0x17d768){const _0x1bd2d7=a1_0x4a78,_0x312008=_0x17d768[_0x1bd2d7(0xc5)](),_0x2b7590=_0x312008[_0x1bd2d7(0xd0)](-0x6)||_0x1bd2d7(0xca),_0x16f75b=createHash('sha256')[_0x1bd2d7(0xc9)](_0x312008)[_0x1bd2d7(0xc2)](_0x1bd2d7(0xcc))[_0x1bd2d7(0xd0)](0x0,0xc);return _0x1bd2d7(0xd9)+_0x2b7590+'_'+_0x16f75b;}export function getAppCacheFilePath(_0x5b9a30,_0x556389){const _0x400af=a1_0x4a78;return resolve(homedir(),PRODUCT_CONFIG[_0x400af(0xc4)],_0x400af(0xcb),_0x5b9a30,fingerprintAccessKey(_0x556389),'my-apps.json');}export function readCachedAppList(_0x32096a,_0x5e5fb8){const _0x395f4e=a1_0x4a78;if(!_0x5e5fb8?.[_0x395f4e(0xc5)]())return null;const _0x3e8a24=getAppCacheFilePath(_0x32096a,_0x5e5fb8);if(!existsSync(_0x3e8a24))return null;try{const _0x2069c4=readFileSync(_0x3e8a24,'utf8');if(!_0x2069c4[_0x395f4e(0xc5)]())return null;const _0x7f92cf=JSON[_0x395f4e(0xd5)](_0x2069c4);if(!Array[_0x395f4e(0xd2)](_0x7f92cf[_0x395f4e(0xc8)]))return null;return _0x7f92cf;}catch{return null;}}export function writeCachedAppList(_0x559c89,_0x4620f5,_0x310bf7){const _0x4a22a0=a1_0x4a78,_0x30b03d=getAppCacheFilePath(_0x559c89,_0x4620f5),_0x5dab60=dirname(_0x30b03d);!existsSync(_0x5dab60)&&mkdirSync(_0x5dab60,{'recursive':!![]});const _0x195f95=_0x30b03d+_0x4a22a0(0xc0);try{writeFileSync(_0x195f95,JSON[_0x4a22a0(0xc6)](_0x310bf7,null,0x2)+'\x0a',{'encoding':_0x4a22a0(0xd4),'mode':0x180});try{renameSync(_0x195f95,_0x30b03d);}catch(_0x1acaf2){if(_0x1acaf2['code']===_0x4a22a0(0xc7)||_0x1acaf2['code']===_0x4a22a0(0xc3)||_0x1acaf2['code']===_0x4a22a0(0xcf)){writeFileSync(_0x30b03d,JSON[_0x4a22a0(0xc6)](_0x310bf7,null,0x2)+'\x0a',{'encoding':_0x4a22a0(0xd4)});try{unlinkSync(_0x195f95);}catch{}}else throw _0x1acaf2;}}catch(_0x527be0){try{unlinkSync(_0x195f95);}catch{}throw _0x527be0;}return _0x30b03d;}export function resolveCachedAppCode(_0x7311a7,_0x475ff2,_0x3e869c){const _0x4ebfb9=a1_0x4a78;if(!_0x7311a7)return undefined;const _0x3aa09d=readCachedAppList(_0x475ff2,_0x3e869c),_0x361d40=_0x3aa09d?.[_0x4ebfb9(0xc8)]['find'](_0x38b431=>_0x38b431[_0x4ebfb9(0xce)]===_0x7311a7);return _0x361d40?.['appCode']?.['trim']()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x47a246=a2_0x50e7;function a2_0x50e7(_0x3c3c7b,_0x39828b){_0x3c3c7b=_0x3c3c7b-0x1c6;const _0x19b3d0=a2_0x19b3();let _0x50e7de=_0x19b3d0[_0x3c3c7b];return _0x50e7de;}(function(_0x477c34,_0x4f70d4){const _0x5f4670=a2_0x50e7,_0x4f6c94=_0x477c34();while(!![]){try{const _0x25399f=parseInt(_0x5f4670(0x1e7))/0x1*(parseInt(_0x5f4670(0x217))/0x2)+parseInt(_0x5f4670(0x1d1))/0x3*(parseInt(_0x5f4670(0x1fe))/0x4)+parseInt(_0x5f4670(0x1ff))/0x5+parseInt(_0x5f4670(0x206))/0x6+-parseInt(_0x5f4670(0x208))/0x7*(-parseInt(_0x5f4670(0x1f8))/0x8)+-parseInt(_0x5f4670(0x1f3))/0x9+-parseInt(_0x5f4670(0x1da))/0xa*(parseInt(_0x5f4670(0x218))/0xb);if(_0x25399f===_0x4f70d4)break;else _0x4f6c94['push'](_0x4f6c94['shift']());}catch(_0x159b1a){_0x4f6c94['push'](_0x4f6c94['shift']());}}}(a2_0x19b3,0x83ee1));import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.js';function a2_0x19b3(){const _0x2f9fca=['project-default','cache','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','../../commands/app/remote-source.js','mergedCli','23469VLEEfS','string','read','use','trim','no-cache','Available\x20remote\x20apps:\x20','env','write','10TWiDNn','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','newConfigFileName','bool','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Default\x20app\x20candidate\x20set\x20to\x20\x22','push','Set\x20the\x20fallback\x20app\x20candidate','Loaded\x20','projectPath','init','items','Read\x20app\x20list\x20from\x20local\x20cache\x20only','193KGbEtT','\x22\x20not\x20found.','envName','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','App\x20\x22','import','validation','app','enableI18n','No\x20cached\x20apps\x20found.','str','entries','8323497luHdXJ','../../context.js','fetchedAt','raw','nonInteractive','1095064cvfBfI','length','\x20app\x20use\x20<name>\x20[--global]','type','appOwnerName','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','24SXXNKT','3122750gkFDio','map','find','.appcode\x20to\x20.lovrabet.json.','global','appName','Initialize\x20','3411300JRsKLp','config','35DbgNED','join','appPublishStatus','remote','Usage:\x20','i18nInfo','langs','boolean','globalPath','appcode','appCode','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','Missing\x20app\x20name.','isCurrent','Refreshed\x20app\x20cache\x20with\x20','1458tqPOHg','6599252JzQyvS','from','defaultApp','Remote\x20app\x20name\x20to\x20activate','../../commands/app/cache.js','\x20app(s)\x20for\x20env=\x22','production','local','name','source','Use\x20`','cachePath','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','filter'];a2_0x19b3=function(){return _0x2f9fca;};return a2_0x19b3();}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_0x47a246(0x203),'type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]};function collectFlags(_0x4794bd,_0x19b3d6){const _0x1bafee=a2_0x47a246,_0x3d033a={};for(const _0x2058f5 of _0x19b3d6){const _0x53247f=_0x2058f5[_0x1bafee(0x1fb)]===_0x1bafee(0x20f)?_0x4794bd[_0x1bafee(0x1dd)](_0x2058f5[_0x1bafee(0x1c6)]):_0x4794bd[_0x1bafee(0x1f1)](_0x2058f5['name']);if(_0x53247f!==''&&_0x53247f!==![])_0x3d033a[_0x2058f5[_0x1bafee(0x1c6)]]=_0x53247f;}if(_0x4794bd[_0x1bafee(0x1f7)])_0x3d033a[_0x1bafee(0x1f7)]=!![];return _0x3d033a;}function normalizeLanguages(_0x4b6f14){const _0x322c92=a2_0x47a246;if(!Array['isArray'](_0x4b6f14))return[];return _0x4b6f14[_0x322c92(0x1cb)](_0x403007=>typeof _0x403007===_0x322c92(0x1d2))['map'](_0x240a90=>_0x240a90[_0x322c92(0x1d5)]())[_0x322c92(0x1cb)](Boolean);}function buildRemoteAppI18nFields(_0x23a15c){const _0x3248b3=a2_0x47a246,_0x2320ec=normalizeLanguages(_0x23a15c[_0x3248b3(0x20d)]?.[_0x3248b3(0x20e)]);return{'enableI18n':typeof _0x23a15c[_0x3248b3(0x1ef)]===_0x3248b3(0x20f)?_0x23a15c[_0x3248b3(0x1ef)]:null,'languages':_0x2320ec,'i18nInfo':_0x23a15c[_0x3248b3(0x20d)]?{..._0x23a15c[_0x3248b3(0x20d)],'langs':_0x2320ec['length']?_0x2320ec:null}:null};}const initDef={'service':a2_0x47a246(0x1ee),'command':a2_0x47a246(0x1e4),'description':a2_0x47a246(0x205)+PRODUCT_CONFIG[a2_0x47a246(0x1dc)]+'\x20config\x20file','risk':a2_0x47a246(0x1d9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x4936d5){return await runInit(collectFlags(_0x4936d5,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x47a246(0x1ee),'command':'list','description':a2_0x47a246(0x1ce),'risk':a2_0x47a246(0x1d3),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x47a246(0x1d8),'type':'string','description':a2_0x47a246(0x1de),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x47a246(0x20f),'description':a2_0x47a246(0x1e6),'default':![]},{'name':'no-cache','type':a2_0x47a246(0x20f),'description':a2_0x47a246(0x1db),'default':![]}],async 'execute'(_0x1423ec){const _0x3de473=a2_0x47a246,_0x4297f5=_0x1423ec[_0x3de473(0x1f1)](_0x3de473(0x1d8))||_0x1423ec[_0x3de473(0x1e9)]||getEnv()||_0x3de473(0x21e),_0x4d91d6=_0x1423ec[_0x3de473(0x1dd)](_0x3de473(0x21f)),_0x24f77a=_0x1423ec[_0x3de473(0x1dd)](_0x3de473(0x1d6)),{readRawConfigWithLayers:_0x4ada1d,resolveDefaultAppSource:_0x5b1288,getLocalAppAliases:_0x209233}=await import(_0x3de473(0x1f4)),{getRemoteAppList:_0x595cd1}=await import(_0x3de473(0x1cf)),{config:_0x289385,layers:_0x3a7ab7}=_0x4ada1d(),_0x8fbcd6=_0x5b1288(_0x3a7ab7),{defaultApp:_0x141b5b}=_0x289385,_0xd936d1=await _0x595cd1({'env':_0x4297f5,'accessKey':_0x1423ec['accessKey'],'localOnly':_0x4d91d6,'noCache':_0x24f77a}),_0x5259e6=_0xd936d1[_0x3de473(0x1e5)][_0x3de473(0x200)](_0x54e96a=>{const _0x4d5d80=_0x3de473;return{'name':_0x54e96a[_0x4d5d80(0x204)],'appcode':_0x54e96a[_0x4d5d80(0x212)],'named':!![],'definedIn':_0x4d5d80(0x20b),'isDefault':_0x54e96a['appName']===_0x141b5b,...buildAppProfileListFields(_0x4297f5),...buildRemoteAppI18nFields(_0x54e96a),'source':_0xd936d1[_0x4d5d80(0x1c7)],'owner':_0x54e96a[_0x4d5d80(0x1fc)]??null,'status':_0x54e96a[_0x4d5d80(0x20a)]??null,'cachedAt':_0xd936d1[_0x4d5d80(0x1f5)]};}),_0x472429=_0x209233(_0x289385);let _0x15311a=0x0;for(const [_0x3b5a27,_0x53c011]of Object[_0x3de473(0x1f2)](_0x472429)){const _0x31982=typeof _0x53c011[_0x3de473(0x211)]===_0x3de473(0x1d2)?_0x53c011[_0x3de473(0x211)][_0x3de473(0x1d5)]():'';if(!_0x31982)continue;_0x15311a+=0x1,_0x5259e6[_0x3de473(0x1e0)]({'name':_0x3b5a27,'appcode':_0x31982,'named':!![],'definedIn':_0x3de473(0x21f),'isDefault':_0x3b5a27===_0x141b5b,...buildAppProfileListFields(_0x4297f5),'source':_0x3de473(0x207),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x5259e6,_0x1423ec[_0x3de473(0x1d0)]);if(_0x5259e6['length']===0x0)return{'ok':!![],'data':[],'message':_0xd936d1[_0x3de473(0x1c7)]===_0x3de473(0x1cd)?_0x3de473(0x1f0):'No\x20apps\x20found\x20on\x20the\x20platform.'};const _0x2d162a=_0x5259e6['find'](_0x378d2b=>_0x378d2b[_0x3de473(0x215)]===!![]),_0x126e96=_0x141b5b??_0x2d162a?.[_0x3de473(0x1c6)]??null,_0x528bd0={'env':_0x4297f5,'source':_0xd936d1[_0x3de473(0x1c7)],'fetchedAt':_0xd936d1['fetchedAt'],'cachePath':_0xd936d1[_0x3de473(0x1c9)],'globalPath':_0x3a7ab7[_0x3de473(0x210)]??null,'projectPath':_0x3a7ab7[_0x3de473(0x1e3)]??null,'defaultApp':_0x126e96,'defaultAppSource':_0x141b5b!=null?_0x8fbcd6:null,'localAliasCount':_0x15311a};return{'ok':!![],'data':{'items':_0x5259e6,'meta':_0x528bd0}};}},pullDef={'service':a2_0x47a246(0x1ee),'command':'pull','description':a2_0x47a246(0x1ca),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a2_0x47a246(0x1d2),'description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':'boolean','description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x47a246(0x1d6),'type':a2_0x47a246(0x20f),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x311f84){const _0x521696=a2_0x47a246,_0x1acd9c=_0x311f84[_0x521696(0x1f1)](_0x521696(0x1d8))||_0x311f84[_0x521696(0x1e9)]||getEnv()||_0x521696(0x21e),_0x31f7fe=_0x311f84[_0x521696(0x1dd)](_0x521696(0x21f)),_0x58f3f1=_0x311f84['bool']('no-cache'),{getRemoteAppList:_0x14dbe4}=await import(_0x521696(0x1cf)),_0x3f6180=await _0x14dbe4({'env':_0x1acd9c,'accessKey':_0x311f84['accessKey'],'localOnly':_0x31f7fe,'noCache':_0x58f3f1});return{'ok':!![],'data':{'total':_0x3f6180[_0x521696(0x1e5)]['length'],'env':_0x1acd9c,'source':_0x3f6180[_0x521696(0x1c7)],'fetchedAt':_0x3f6180['fetchedAt'],'cachePath':_0x3f6180['cachePath']},'message':_0x3f6180[_0x521696(0x1c7)]===_0x521696(0x1cd)?_0x521696(0x1e2)+_0x3f6180[_0x521696(0x1e5)]['length']+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x1acd9c+'\x22.':_0x521696(0x216)+_0x3f6180[_0x521696(0x1e5)][_0x521696(0x1f9)]+_0x521696(0x21d)+_0x1acd9c+'\x22.'};}},useDef={'service':a2_0x47a246(0x1ee),'command':a2_0x47a246(0x1d4),'description':a2_0x47a246(0x1e1),'risk':a2_0x47a246(0x1d9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':a2_0x47a246(0x21b),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x5d9e65){const _0x38c236=a2_0x47a246;if(!_0x5d9e65['args'][0x0])throw CliErrors[_0x38c236(0x1ed)](_0x38c236(0x214),'Usage:\x20'+CLI_BIN_NAME+_0x38c236(0x1fa));},async 'execute'(_0x47ab5f){const _0x4fd219=a2_0x47a246,_0x5230b5=_0x47ab5f['args'][0x0];if(!_0x5230b5)throw CliErrors['validation']('Missing\x20app\x20name.',_0x4fd219(0x20c)+CLI_BIN_NAME+_0x4fd219(0x1fa));const {buildConfigFromFlags:_0x380e34,resolveLocalAppAliasCode:_0x2f8e6d}=await import(_0x4fd219(0x1f4)),{readCachedAppList:_0x2c1ffa}=await import(_0x4fd219(0x21c)),_0x6a06cb=_0x47ab5f[_0x4fd219(0x1f1)](_0x4fd219(0x1d8)),_0x8db979=_0x380e34(_0x6a06cb?{'env':_0x6a06cb}:{}),_0x3c6d7e=_0x2c1ffa(_0x8db979[_0x4fd219(0x1d8)],_0x8db979['accessKey']),_0x5bbf2e=_0x3c6d7e?.['items'][_0x4fd219(0x201)](_0x41a217=>_0x41a217[_0x4fd219(0x204)]===_0x5230b5),_0x3a858b=_0x2f8e6d(_0x8db979[_0x4fd219(0x1f6)]??{},_0x5230b5);if(!_0x5bbf2e&&!_0x3a858b&&_0x8db979['defaultApp']!==_0x5230b5){const _0x20bc23=[..._0x3c6d7e?.[_0x4fd219(0x1e5)][_0x4fd219(0x200)](_0x17adba=>_0x17adba[_0x4fd219(0x204)])??[]],_0x1eda4f=_0x20bc23[_0x4fd219(0x1f9)]===0x0?_0x4fd219(0x1c8)+CLI_BIN_NAME+_0x4fd219(0x1ea)+_0x5230b5+_0x4fd219(0x202):_0x4fd219(0x1d7)+Array[_0x4fd219(0x219)](new Set(_0x20bc23))[_0x4fd219(0x209)](',\x20')+_0x4fd219(0x1fd);throw CliErrors[_0x4fd219(0x1ed)](_0x4fd219(0x1eb)+_0x5230b5+_0x4fd219(0x1e8),_0x1eda4f);}const _0x4a3da=_0x47ab5f[_0x4fd219(0x1dd)]('global');let _0x5a4c49;if(_0x4a3da)_0x5a4c49={'global':!![]};else{const {isInProject:_0x11d69a}=await import('../../context.js'),_0x40b059=_0x11d69a();_0x5a4c49=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x4fd219(0x1cc),'inProject':_0x40b059}));}const _0x4133b8=readConfig(_0x5a4c49);return _0x4133b8[_0x4fd219(0x21a)]=_0x5230b5,writeConfig(_0x4133b8,_0x5a4c49),{'ok':!![],'message':_0x4fd219(0x1df)+_0x5230b5+'\x22'+scopeLabel(_0x5a4c49)+'.'};}},importDef={'service':a2_0x47a246(0x1ee),'command':a2_0x47a246(0x1ec),'description':a2_0x47a246(0x213),'risk':a2_0x47a246(0x1d9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x52f1f1){return await runInitImport(collectFlags(_0x52f1f1,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a2_0x5404e4=a2_0x1152;(function(_0x146f19,_0x4947f7){const _0x37f823=a2_0x1152,_0x509f9d=_0x146f19();while(!![]){try{const _0x230ce1=parseInt(_0x37f823(0xf1))/0x1+-parseInt(_0x37f823(0xe4))/0x2*(-parseInt(_0x37f823(0x11a))/0x3)+parseInt(_0x37f823(0x112))/0x4*(-parseInt(_0x37f823(0x11d))/0x5)+parseInt(_0x37f823(0x109))/0x6+-parseInt(_0x37f823(0xe9))/0x7*(-parseInt(_0x37f823(0x11f))/0x8)+parseInt(_0x37f823(0xd3))/0x9*(-parseInt(_0x37f823(0x10e))/0xa)+-parseInt(_0x37f823(0x10a))/0xb;if(_0x230ce1===_0x4947f7)break;else _0x509f9d['push'](_0x509f9d['shift']());}catch(_0x157df8){_0x509f9d['push'](_0x509f9d['shift']());}}}(a2_0x1ecc,0xeeb03));import{CliErrors}from'../../errors.js';function a2_0x1152(_0x2f6b22,_0x350e83){_0x2f6b22=_0x2f6b22-0xc9;const _0x1ecc95=a2_0x1ecc();let _0x11526a=_0x1ecc95[_0x2f6b22];return _0x11526a;}import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':a2_0x5404e4(0x11e),'type':a2_0x5404e4(0x102),'description':a2_0x5404e4(0xf7),'default':![]};function collectFlags(_0x121cef,_0x468059){const _0x50bd40=a2_0x5404e4,_0x1fee1c={};for(const _0xdf205a of _0x468059){const _0xbda264=_0xdf205a[_0x50bd40(0x115)]==='boolean'?_0x121cef[_0x50bd40(0xd6)](_0xdf205a[_0x50bd40(0xe0)]):_0x121cef[_0x50bd40(0xca)](_0xdf205a['name']);if(_0xbda264!==''&&_0xbda264!==![])_0x1fee1c[_0xdf205a[_0x50bd40(0xe0)]]=_0xbda264;}if(_0x121cef[_0x50bd40(0x121)])_0x1fee1c[_0x50bd40(0x121)]=!![];return _0x1fee1c;}function normalizeLanguages(_0xcca0b1){const _0x6a923a=a2_0x5404e4;if(!Array[_0x6a923a(0x103)](_0xcca0b1))return[];return _0xcca0b1[_0x6a923a(0x110)](_0x8641b9=>typeof _0x8641b9==='string')[_0x6a923a(0x119)](_0x2a644b=>_0x2a644b[_0x6a923a(0x118)]())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x333c5e){const _0x38501b=a2_0x5404e4,_0x1a52ce=normalizeLanguages(_0x333c5e[_0x38501b(0xd5)]?.[_0x38501b(0xe8)]);return{'enableI18n':typeof _0x333c5e[_0x38501b(0x113)]===_0x38501b(0x102)?_0x333c5e[_0x38501b(0x113)]:null,'languages':_0x1a52ce,'i18nInfo':_0x333c5e[_0x38501b(0xd5)]?{..._0x333c5e[_0x38501b(0xd5)],'langs':_0x1a52ce['length']?_0x1a52ce:null}:null};}function a2_0x1ecc(){const _0x4aa1a9=['use','source','Use\x20`','accessKey','No\x20apps\x20found\x20on\x20the\x20platform.','name','No\x20cached\x20apps\x20found.','cache','Set\x20the\x20fallback\x20app\x20candidate','150326GaSqVE','project-default','appcode','list','langs','580013fVxfSP','read','../../commands/app/remote-source.js','fetchedAt','Remote\x20app\x20name\x20to\x20activate','items','Loaded\x20','\x20app(s)\x20for\x20env=\x22','1502376BfilPa','Usage:\x20','raw','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','validation','../../context.js','Use\x20global\x20config\x20scope','join','.appcode\x20to\x20.lovrabet.json.','find','args','import','Filter\x20by\x20environment\x20(default:\x20current\x20env)','string','length','Initialize\x20','no-cache','boolean','isArray','defaultApp','write','isCurrent','\x22\x20not\x20found.','entries','5276292abVKZa','15789906LeKhXD','pull','local','appCode','50uquziY','newConfigFileName','filter','Refreshed\x20app\x20cache\x20with\x20','244RtINWk','enableI18n','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','type','\x20app\x20use\x20<name>\x20[--global]','app','trim','map','57EItEbK','\x20config\x20file','Read\x20from\x20local\x20cache\x20only','149215oCfSZA','global','152qqevUj','mergedCli','nonInteractive','Read\x20app\x20list\x20from\x20local\x20cache\x20only','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','production','str','from','Missing\x20app\x20name.','../../commands/app/cache.js','remote','push','appName','App\x20\x22','appPublishStatus','2071152wqoeFj','cachePath','i18nInfo','bool','env','\x20cached\x20app(s)\x20for\x20env=\x22','envName','Target\x20environment\x20(default:\x20current\x20env)'];a2_0x1ecc=function(){return _0x4aa1a9;};return a2_0x1ecc();}const initDef={'service':a2_0x5404e4(0x117),'command':'init','description':a2_0x5404e4(0x100)+PRODUCT_CONFIG[a2_0x5404e4(0x10f)]+a2_0x5404e4(0x11b),'risk':a2_0x5404e4(0x105),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x9c5ad3){return await runInit(collectFlags(_0x9c5ad3,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x5404e4(0x117),'command':a2_0x5404e4(0xe7),'description':a2_0x5404e4(0x123),'risk':a2_0x5404e4(0xea),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x5404e4(0xd7),'type':a2_0x5404e4(0xfe),'description':a2_0x5404e4(0xfd),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x5404e4(0x102),'description':a2_0x5404e4(0x122),'default':![]},{'name':'no-cache','type':'boolean','description':a2_0x5404e4(0x114),'default':![]}],async 'execute'(_0x2e8027){const _0x3a3d7d=a2_0x5404e4,_0x2f17ca=_0x2e8027[_0x3a3d7d(0xca)](_0x3a3d7d(0xd7))||_0x2e8027[_0x3a3d7d(0xd9)]||getEnv()||_0x3a3d7d(0xc9),_0x4d883e=_0x2e8027[_0x3a3d7d(0xd6)](_0x3a3d7d(0x10c)),_0x42ee77=_0x2e8027['bool'](_0x3a3d7d(0x101)),{readRawConfigWithLayers:_0x24b795,resolveDefaultAppSource:_0x3a896c,getLocalAppAliases:_0x126635}=await import(_0x3a3d7d(0xf6)),{getRemoteAppList:_0x2983f1}=await import(_0x3a3d7d(0xeb)),{config:_0x43f3e9,layers:_0x2a2acd}=_0x24b795(),_0x231395=_0x3a896c(_0x2a2acd),{defaultApp:_0x2f577c}=_0x43f3e9,_0x28477e=await _0x2983f1({'env':_0x2f17ca,'accessKey':_0x2e8027[_0x3a3d7d(0xde)],'localOnly':_0x4d883e,'noCache':_0x42ee77}),_0x489bf4=_0x28477e['items'][_0x3a3d7d(0x119)](_0x58bd7a=>{const _0x88cca2=_0x3a3d7d;return{'name':_0x58bd7a[_0x88cca2(0xd0)],'appcode':_0x58bd7a[_0x88cca2(0x10d)],'named':!![],'definedIn':_0x88cca2(0xce),'isDefault':_0x58bd7a[_0x88cca2(0xd0)]===_0x2f577c,...buildAppProfileListFields(_0x2f17ca),...buildRemoteAppI18nFields(_0x58bd7a),'source':_0x28477e[_0x88cca2(0xdc)],'owner':_0x58bd7a['appOwnerName']??null,'status':_0x58bd7a[_0x88cca2(0xd2)]??null,'cachedAt':_0x28477e[_0x88cca2(0xec)]};}),_0x5e4e14=_0x126635(_0x43f3e9);let _0x33abbb=0x0;for(const [_0x3fc388,_0xcedb71]of Object[_0x3a3d7d(0x108)](_0x5e4e14)){const _0x416c6c=typeof _0xcedb71[_0x3a3d7d(0xe6)]===_0x3a3d7d(0xfe)?_0xcedb71[_0x3a3d7d(0xe6)][_0x3a3d7d(0x118)]():'';if(!_0x416c6c)continue;_0x33abbb+=0x1,_0x489bf4[_0x3a3d7d(0xcf)]({'name':_0x3fc388,'appcode':_0x416c6c,'named':!![],'definedIn':_0x3a3d7d(0x10c),'isDefault':_0x3fc388===_0x2f577c,...buildAppProfileListFields(_0x2f17ca),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x489bf4,_0x2e8027[_0x3a3d7d(0x120)]);if(_0x489bf4[_0x3a3d7d(0xff)]===0x0)return{'ok':!![],'data':[],'message':_0x28477e['source']===_0x3a3d7d(0xe2)?_0x3a3d7d(0xe1):_0x3a3d7d(0xdf)};const _0x511da2=_0x489bf4[_0x3a3d7d(0xfa)](_0x3969a6=>_0x3969a6[_0x3a3d7d(0x106)]===!![]),_0x36dc93=_0x2f577c??_0x511da2?.[_0x3a3d7d(0xe0)]??null,_0x2bb123={'env':_0x2f17ca,'source':_0x28477e[_0x3a3d7d(0xdc)],'fetchedAt':_0x28477e[_0x3a3d7d(0xec)],'cachePath':_0x28477e['cachePath'],'globalPath':_0x2a2acd['globalPath']??null,'projectPath':_0x2a2acd['projectPath']??null,'defaultApp':_0x36dc93,'defaultAppSource':_0x2f577c!=null?_0x231395:null,'localAliasCount':_0x33abbb};return{'ok':!![],'data':{'items':_0x489bf4,'meta':_0x2bb123}};}},pullDef={'service':a2_0x5404e4(0x117),'command':a2_0x5404e4(0x10b),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a2_0x5404e4(0x105),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x5404e4(0xd7),'type':a2_0x5404e4(0xfe),'description':a2_0x5404e4(0xda),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x5404e4(0x10c),'type':a2_0x5404e4(0x102),'description':a2_0x5404e4(0x11c),'default':![]},{'name':a2_0x5404e4(0x101),'type':a2_0x5404e4(0x102),'description':a2_0x5404e4(0x114),'default':![]}],async 'execute'(_0x4dfc87){const _0x5e6dff=a2_0x5404e4,_0x5cc67f=_0x4dfc87[_0x5e6dff(0xca)](_0x5e6dff(0xd7))||_0x4dfc87['envName']||getEnv()||_0x5e6dff(0xc9),_0x434b2e=_0x4dfc87[_0x5e6dff(0xd6)]('local'),_0x4997c2=_0x4dfc87[_0x5e6dff(0xd6)](_0x5e6dff(0x101)),{getRemoteAppList:_0x1c2e36}=await import(_0x5e6dff(0xeb)),_0x55d959=await _0x1c2e36({'env':_0x5cc67f,'accessKey':_0x4dfc87[_0x5e6dff(0xde)],'localOnly':_0x434b2e,'noCache':_0x4997c2});return{'ok':!![],'data':{'total':_0x55d959['items']['length'],'env':_0x5cc67f,'source':_0x55d959[_0x5e6dff(0xdc)],'fetchedAt':_0x55d959['fetchedAt'],'cachePath':_0x55d959[_0x5e6dff(0xd4)]},'message':_0x55d959[_0x5e6dff(0xdc)]==='cache'?_0x5e6dff(0xef)+_0x55d959[_0x5e6dff(0xee)][_0x5e6dff(0xff)]+_0x5e6dff(0xd8)+_0x5cc67f+'\x22.':_0x5e6dff(0x111)+_0x55d959['items'][_0x5e6dff(0xff)]+_0x5e6dff(0xf0)+_0x5cc67f+'\x22.'};}},useDef={'service':a2_0x5404e4(0x117),'command':a2_0x5404e4(0xdb),'description':a2_0x5404e4(0xe3),'risk':a2_0x5404e4(0x105),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x5404e4(0xe0),'description':a2_0x5404e4(0xed),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x2a6873){const _0x268063=a2_0x5404e4;if(!_0x2a6873[_0x268063(0xfb)][0x0])throw CliErrors['validation'](_0x268063(0xcc),_0x268063(0xf2)+CLI_BIN_NAME+_0x268063(0x116));},async 'execute'(_0x2c996f){const _0x19938c=a2_0x5404e4,_0x3d99dd=_0x2c996f[_0x19938c(0xfb)][0x0];if(!_0x3d99dd)throw CliErrors[_0x19938c(0xf5)]('Missing\x20app\x20name.',_0x19938c(0xf2)+CLI_BIN_NAME+_0x19938c(0x116));const {buildConfigFromFlags:_0x37bb9c,resolveLocalAppAliasCode:_0x39e988}=await import(_0x19938c(0xf6)),{readCachedAppList:_0x2bbd00}=await import(_0x19938c(0xcd)),_0x39ddab=_0x2c996f[_0x19938c(0xca)](_0x19938c(0xd7)),_0x5a4a3a=_0x37bb9c(_0x39ddab?{'env':_0x39ddab}:{}),_0x3df351=_0x2bbd00(_0x5a4a3a[_0x19938c(0xd7)],_0x5a4a3a[_0x19938c(0xde)]),_0x3ce203=_0x3df351?.[_0x19938c(0xee)]['find'](_0x2e11c7=>_0x2e11c7[_0x19938c(0xd0)]===_0x3d99dd),_0x4cdf81=_0x39e988(_0x5a4a3a[_0x19938c(0xf3)]??{},_0x3d99dd);if(!_0x3ce203&&!_0x4cdf81&&_0x5a4a3a[_0x19938c(0x104)]!==_0x3d99dd){const _0x516726=[..._0x3df351?.[_0x19938c(0xee)]['map'](_0x431bcd=>_0x431bcd['appName'])??[]],_0x4776b9=_0x516726[_0x19938c(0xff)]===0x0?_0x19938c(0xdd)+CLI_BIN_NAME+_0x19938c(0xf4)+_0x3d99dd+_0x19938c(0xf9):'Available\x20remote\x20apps:\x20'+Array[_0x19938c(0xcb)](new Set(_0x516726))[_0x19938c(0xf8)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors['validation'](_0x19938c(0xd1)+_0x3d99dd+_0x19938c(0x107),_0x4776b9);}const _0x521acb=_0x2c996f['bool'](_0x19938c(0x11e));let _0x4926ff;if(_0x521acb)_0x4926ff={'global':!![]};else{const {isInProject:_0x3dfeeb}=await import(_0x19938c(0xf6)),_0x51f98a=_0x3dfeeb();_0x4926ff=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x19938c(0xe5),'inProject':_0x51f98a}));}const _0x517be8=readConfig(_0x4926ff);return _0x517be8[_0x19938c(0x104)]=_0x3d99dd,writeConfig(_0x517be8,_0x4926ff),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0x3d99dd+'\x22'+scopeLabel(_0x4926ff)+'.'};}},importDef={'service':a2_0x5404e4(0x117),'command':a2_0x5404e4(0xfc),'description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x1a4ddf){return await runInitImport(collectFlags(_0x1a4ddf,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d6819,_0x12bed6){const _0x1f12ba=a3_0x1726,_0x468031=_0x5d6819();while(!![]){try{const _0x3f9b71=-parseInt(_0x1f12ba(0x1f1))/0x1+-parseInt(_0x1f12ba(0x1f2))/0x2*(parseInt(_0x1f12ba(0x1f4))/0x3)+parseInt(_0x1f12ba(0x1ea))/0x4*(-parseInt(_0x1f12ba(0x1e9))/0x5)+parseInt(_0x1f12ba(0x1ec))/0x6*(parseInt(_0x1f12ba(0x1eb))/0x7)+-parseInt(_0x1f12ba(0x1f6))/0x8+parseInt(_0x1f12ba(0x1f5))/0x9*(-parseInt(_0x1f12ba(0x1f0))/0xa)+parseInt(_0x1f12ba(0x1ef))/0xb;if(_0x3f9b71===_0x12bed6)break;else _0x468031['push'](_0x468031['shift']());}catch(_0x3639f5){_0x468031['push'](_0x468031['shift']());}}}(a3_0x1ab9,0xb153c));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';function a3_0x1726(_0x2b23fa,_0x10b055){_0x2b23fa=_0x2b23fa-0x1e8;const _0x1ab95e=a3_0x1ab9();let _0x1726ee=_0x1ab95e[_0x2b23fa];return _0x1726ee;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x1fe008=a3_0x1726,_0x5d2bed=join(__dirname,'../../../mock/app-list.json'),_0x1a13fb=readFileSync(_0x5d2bed,_0x1fe008(0x1f3));return JSON[_0x1fe008(0x1ed)](_0x1a13fb);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}function a3_0x1ab9(){const _0x5d5efa=['tableData','2060lYLAHu','6700BtscBI','4683XrNSVU','8838cbESBY','parse','errorMsg','24582019XnaQzq','434510PxEfgV','434587iUAHNi','245946lWRbPc','utf-8','30Gyltav','18wLVTnd','420120ZcBOZl'];a3_0x1ab9=function(){return _0x5d5efa;};return a3_0x1ab9();}export function getMockRemoteAppItems(){const _0x562ab4=a3_0x1726,_0x2c6da9=getMockAppList();if(!_0x2c6da9['success'])throw new Error('Mock\x20API\x20error:\x20'+_0x2c6da9[_0x562ab4(0x1ee)]+'\x20('+_0x2c6da9['errorCode']+')');return _0x2c6da9['data'][_0x562ab4(0x1e8)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a4_0x1200(_0x3eec4c,_0x24e96f){_0x3eec4c=_0x3eec4c-0x193;const _0x38c553=a4_0x38c5();let _0x12008c=_0x38c553[_0x3eec4c];return _0x12008c;}(function(_0x49577a,_0xe4c73b){const _0x369514=a4_0x1200,_0x1c7610=_0x49577a();while(!![]){try{const _0x36194f=-parseInt(_0x369514(0x19a))/0x1*(parseInt(_0x369514(0x19b))/0x2)+parseInt(_0x369514(0x1a6))/0x3+parseInt(_0x369514(0x19d))/0x4+parseInt(_0x369514(0x193))/0x5*(-parseInt(_0x369514(0x197))/0x6)+parseInt(_0x369514(0x19c))/0x7*(parseInt(_0x369514(0x19e))/0x8)+-parseInt(_0x369514(0x19f))/0x9*(-parseInt(_0x369514(0x194))/0xa)+-parseInt(_0x369514(0x195))/0xb*(parseInt(_0x369514(0x1a4))/0xc);if(_0x36194f===_0xe4c73b)break;else _0x1c7610['push'](_0x1c7610['shift']());}catch(_0x247823){_0x1c7610['push'](_0x1c7610['shift']());}}}(a4_0x38c5,0xa822a));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x5108cd=a4_0x1200,_0x3859c9=(productEnv(_0x5108cd(0x198))||'')['trim']()[_0x5108cd(0x199)]();return _0x3859c9==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a4_0x38c5(){const _0x3de3fa=['12444708qQaZDm','items','1462407ESiEGh','27460wYBAFj','2067100dJWTWP','11ciHiBr','fetchedAt','480IuPGeF','APP_LIST_SOURCE','toLowerCase','2227XsWiwX','6Ptlitr','7YnKVjr','158788DhWAWP','4888528YRzIxz','45mrxAvM','toISOString','cache','remote','trim'];a4_0x38c5=function(){return _0x3de3fa;};return a4_0x38c5();}export async function getRemoteAppList(_0x205701){const _0x4476a1=a4_0x1200,{env:_0x3dc368,accessKey:_0x55776c,localOnly:localOnly=![],noCache:noCache=![]}=_0x205701,_0x2f693d=readCachedAppList(_0x3dc368,_0x55776c),_0x29be3e=_0x55776c?.[_0x4476a1(0x1a3)]()?getAppCacheFilePath(_0x3dc368,_0x55776c):null;if(localOnly)return{'items':_0x2f693d?.['items']??[],'source':_0x4476a1(0x1a1),'fetchedAt':_0x2f693d?.['fetchedAt']??null,'cachePath':_0x29be3e};try{const _0x4cb6e1=await getRemoteAppItems(),_0x3104bf=shouldUseMockRemoteApps()?'mock':_0x4476a1(0x1a2),_0x2a7158=new Date()[_0x4476a1(0x1a0)](),_0xf319d1=_0x55776c?.['trim']()?writeCachedAppList(_0x3dc368,_0x55776c,{'env':_0x3dc368,'fetchedAt':_0x2a7158,'source':_0x3104bf,'items':_0x4cb6e1}):null;return{'items':_0x4cb6e1,'source':_0x3104bf,'fetchedAt':_0x2a7158,'cachePath':_0xf319d1};}catch(_0x188378){if(!noCache&&_0x2f693d)return{'items':_0x2f693d[_0x4476a1(0x1a5)],'source':_0x4476a1(0x1a1),'fetchedAt':_0x2f693d[_0x4476a1(0x196)],'cachePath':_0x29be3e};throw _0x188378;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4de625,_0x4b3bd6){const _0xb125fa=a5_0x4795,_0x3c2c18=_0x4de625();while(!![]){try{const _0x2bef70=parseInt(_0xb125fa(0x195))/0x1+parseInt(_0xb125fa(0x199))/0x2*(parseInt(_0xb125fa(0x18e))/0x3)+-parseInt(_0xb125fa(0x18a))/0x4*(-parseInt(_0xb125fa(0x191))/0x5)+parseInt(_0xb125fa(0x193))/0x6*(parseInt(_0xb125fa(0x19b))/0x7)+parseInt(_0xb125fa(0x19a))/0x8+-parseInt(_0xb125fa(0x18f))/0x9*(parseInt(_0xb125fa(0x18d))/0xa)+-parseInt(_0xb125fa(0x192))/0xb;if(_0x2bef70===_0x4b3bd6)break;else _0x3c2c18['push'](_0x3c2c18['shift']());}catch(_0x5b9d81){_0x3c2c18['push'](_0x3c2c18['shift']());}}}(a5_0x14ba,0xe9d91));function a5_0x4795(_0x2adeca,_0x432c3c){_0x2adeca=_0x2adeca-0x18a;const _0x14ba36=a5_0x14ba();let _0x4795be=_0x14ba36[_0x2adeca];return _0x4795be;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};function a5_0x14ba(){const _0x240f2b=['trim','588825ZccbLz','global','appcode','name','16396kxmeNt','6263976nfQRTn','133cSsldX','appCode','project','isCurrent','4VToZKB','currentApp','named','410XPmPhw','357YGwQSJ','3519ouKQsf','defaultApp','2582925UHnfIF','22114455nsXOuT','37992zafARG'];a5_0x14ba=function(){return _0x240f2b;};return a5_0x14ba();}export function enrichAppListItemsWithMergedSelection(_0x2f7f05,_0x272c80){const _0x5e8126=a5_0x4795;if(!_0x272c80)return;const _0x5ac06a=!!(_0x272c80[_0x5e8126(0x18b)]??_0x272c80[_0x5e8126(0x190)]);for(const _0x2ad52d of _0x2f7f05){_0x2ad52d[_0x5e8126(0x19e)]=![];}const _0x45a207=_0x272c80[_0x5e8126(0x19c)]!=null?String(_0x272c80['appCode'])[_0x5e8126(0x194)]():'';if(_0x5ac06a){const _0x2293ba=_0x272c80[_0x5e8126(0x18b)]??_0x272c80[_0x5e8126(0x190)];if(_0x2293ba){const _0x557566=_0x2f7f05['find'](_0x4e2736=>_0x4e2736[_0x5e8126(0x18c)]===!![]&&_0x4e2736[_0x5e8126(0x198)]===_0x2293ba&&_0x4e2736['definedIn']==='local'),_0x3e74b2=_0x557566??_0x2f7f05['find'](_0xca7605=>_0xca7605[_0x5e8126(0x18c)]===!![]&&_0xca7605[_0x5e8126(0x198)]===_0x2293ba);_0x3e74b2&&(_0x3e74b2['isCurrent']=!![]);}return;}if(!_0x45a207)return;for(const _0xa56243 of _0x2f7f05){String(_0xa56243[_0x5e8126(0x197)]??'')[_0x5e8126(0x194)]()===_0x45a207&&(_0xa56243[_0x5e8126(0x19e)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x1250a7){const _0x333607=a5_0x4795;return formatScopeLabel(_0x1250a7[_0x333607(0x196)]?_0x333607(0x196):_0x333607(0x19d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x4164c8=a6_0x5562;(function(_0x4947e2,_0x2e7dc8){const _0x154589=a6_0x5562,_0x2d11bf=_0x4947e2();while(!![]){try{const _0x437e25=-parseInt(_0x154589(0x1a4))/0x1+parseInt(_0x154589(0x1e4))/0x2*(parseInt(_0x154589(0x1e5))/0x3)+parseInt(_0x154589(0x1a7))/0x4+-parseInt(_0x154589(0x1b4))/0x5*(-parseInt(_0x154589(0x1c0))/0x6)+-parseInt(_0x154589(0x1e9))/0x7+-parseInt(_0x154589(0x1a0))/0x8+-parseInt(_0x154589(0x1cd))/0x9*(parseInt(_0x154589(0x19b))/0xa);if(_0x437e25===_0x2e7dc8)break;else _0x2d11bf['push'](_0x2d11bf['shift']());}catch(_0x2f3179){_0x2d11bf['push'](_0x2d11bf['shift']());}}}(a6_0x2221,0x22e9e));import{readScopedConfig,writeScopedConfig}from'../../context.js';function a6_0x5562(_0xf45361,_0x40cc23){_0xf45361=_0xf45361-0x19b;const _0x22218b=a6_0x2221();let _0x55629e=_0x22218b[_0xf45361];return _0x55629e;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x41b172=a6_0x5562;writeCliSideChannelLine(_0x41b172(0x19f)+PRODUCT_CONFIG[_0x41b172(0x1d7)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine('Tip:\x20you\x20can\x20also\x20run:'),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x41b172(0x1da));}function buildAccessKeySetupGuide(){const _0x2ecf32=a6_0x5562;return[_0x2ecf32(0x19f)+PRODUCT_CONFIG[_0x2ecf32(0x1d7)]+':',USER_ACCESS_KEY_CREATE_URL,_0x2ecf32(0x1c5)+CLI_BIN_NAME+_0x2ecf32(0x1d6)][_0x2ecf32(0x1c2)]('\x0a');}function canPromptForAccessKey(_0x5be450){const _0x3c6f20=a6_0x5562;return!_0x5be450[_0x3c6f20(0x1b0)]&&process[_0x3c6f20(0x1cf)][_0x3c6f20(0x1d4)]!==![]&&process['stdout'][_0x3c6f20(0x1d4)]!==![];}function resolveAuthScopeFlags(_0xf426c4){const _0x27eb70=a6_0x5562;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0xf426c4[_0x27eb70(0x1b5)](_0x27eb70(0x19e)),'explicitProject':_0xf426c4[_0x27eb70(0x1b5)](_0x27eb70(0x1e8)),'policy':_0x27eb70(0x1c6)}));}function a6_0x2221(){const _0x565206=['\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','userCenterDisplayName','auth','ACCESS_KEY','\x20auth\x20login\x20--access-key\x20<ak_xxx>','login','\x20scope.','\x20config','Option\x20A:\x20','AccessKey\x20(ak_xxx...)','test','write','logout','Option\x20C:\x20environment\x20variable','163538qBHNPw','9FzQVQS','production','Write\x20to\x20global\x20config\x20(default)','project','969437FBrtcl','boolean','str','trim','init','1457670EQOqqH','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','AccessKey\x20cleared\x20from\x20','global','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','351456OjUEgN','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','access-key','Clear\x20accessKey\x20from\x20config','17539ilqZdK','push','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','53332eWDPCi','validation','AccessKey\x20saved\x20to\x20','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','read','\x20auth\x20status','Auth\x20config\x20reinitialized\x20in\x20','Missing\x20accessKey.','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','nonInteractive','newConfigFileName','Show\x20current\x20authentication\x20status','\x20\x20export\x20','13535LufwQh','bool','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','Then\x20verify\x20with:\x20','development','yes','length','repeat','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','env','string','510iCIMqH','AccessKey:\x20','join','\x20env\x20var','accessKey','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','global-default','Invalid\x20accessKey\x20format:\x20\x22','Shorthand\x20for\x20--access-key','\x20doctor','info','\x20Current\x20env:\x20','\x20Verify:\x20','9eMXcXP','\x20config.','stdin','Read\x20from\x20global\x20config\x20(default)','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Use\x20`','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','isTTY'];a6_0x2221=function(){return _0x565206;};return a6_0x2221();}async function resolveAuthWriteInput(_0x48cb6a){const _0x117e3d=a6_0x5562;let _0x447648=(_0x48cb6a[_0x117e3d(0x1eb)](_0x117e3d(0x1a2))||_0x48cb6a['str']('ak')||'')[_0x117e3d(0x1ec)]();const _0x4c6487=(_0x48cb6a[_0x117e3d(0x1eb)](_0x117e3d(0x1be))||'')[_0x117e3d(0x1ec)]();if(!_0x447648&&canPromptForAccessKey(_0x48cb6a))try{showAccessKeyCreateHint(),_0x447648=await promptAccessKey('');}catch(_0x5cbb2a){if(isAbortPrompt(_0x5cbb2a))throw CliErrors['cancelled']();throw _0x5cbb2a;}if(!_0x447648)throw CliErrors[_0x117e3d(0x1a8)](_0x117e3d(0x1ae),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x117e3d(0x1e0)](_0x447648))throw CliErrors['validation'](_0x117e3d(0x1c7)+_0x447648+'\x22',_0x117e3d(0x1a1));if(!_0x4c6487)return{'accessKey':_0x447648};const _0x491e90=normalizeEnv(_0x4c6487);return{'accessKey':_0x447648,'env':isDaily(_0x491e90)?'daily':isDev(_0x491e90)?_0x117e3d(0x1b8):'production'};}export const authDefinitions=[{'service':a6_0x4164c8(0x1d8),'command':a6_0x4164c8(0x1db),'description':a6_0x4164c8(0x1aa),'risk':a6_0x4164c8(0x1e1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4164c8(0x1a2),'type':a6_0x4164c8(0x1bf),'description':a6_0x4164c8(0x1df)},{'name':'ak','type':a6_0x4164c8(0x1bf),'description':a6_0x4164c8(0x1c8)},{'name':a6_0x4164c8(0x19e),'type':a6_0x4164c8(0x1ea),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x4164c8(0x1e8),'type':'boolean','description':a6_0x4164c8(0x1bd),'default':![]}],async 'execute'(_0x397fea){const _0x57d07c=a6_0x4164c8;if(_0x397fea[_0x57d07c(0x1b5)](_0x57d07c(0x1b9)))throw CliErrors[_0x57d07c(0x1a8)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x57d07c(0x1d2)+CLI_BIN_NAME+_0x57d07c(0x1d5)+CLI_BIN_NAME+_0x57d07c(0x1d3));const _0x16148b=(_0x397fea[_0x57d07c(0x1eb)](_0x57d07c(0x1a2))||_0x397fea[_0x57d07c(0x1eb)]('ak')||'')[_0x57d07c(0x1ec)]();if(!_0x16148b&&_0x397fea[_0x57d07c(0x1b0)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x5b2c1f=await resolveAuthWriteInput(_0x397fea),_0x291f5f=resolveAuthScopeFlags(_0x397fea),_0x2b85f5=readScopedConfig(_0x291f5f);_0x2b85f5['accessKey']=_0x5b2c1f[_0x57d07c(0x1c4)];_0x5b2c1f['env']&&(_0x2b85f5[_0x57d07c(0x1be)]=_0x5b2c1f[_0x57d07c(0x1be)]);writeScopedConfig(_0x2b85f5,_0x291f5f);const _0xe4ca4=_0x291f5f[_0x57d07c(0x19e)]?'global':_0x57d07c(0x1e8),_0xa61bba=_0x2b85f5[_0x57d07c(0x1be)]?_0x57d07c(0x1cb)+_0x2b85f5['env']+'.':'';return{'ok':!![],'message':_0x57d07c(0x1a9)+_0xe4ca4+'\x20config.'+_0xa61bba+_0x57d07c(0x1cc)+CLI_BIN_NAME+_0x57d07c(0x1ac)};}},{'service':a6_0x4164c8(0x1d8),'command':a6_0x4164c8(0x1ed),'description':a6_0x4164c8(0x1a6),'risk':a6_0x4164c8(0x1e1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4164c8(0x1a2),'type':a6_0x4164c8(0x1bf),'description':a6_0x4164c8(0x1df)},{'name':'ak','type':a6_0x4164c8(0x1bf),'description':'Shorthand\x20for\x20--access-key'},{'name':a6_0x4164c8(0x1be),'type':a6_0x4164c8(0x1bf),'description':a6_0x4164c8(0x1b6)},{'name':'global','type':a6_0x4164c8(0x1ea),'description':a6_0x4164c8(0x1e7),'default':!![]},{'name':a6_0x4164c8(0x1e8),'type':'boolean','description':a6_0x4164c8(0x1bd),'default':![]}],async 'execute'(_0x2ff668){const _0x356502=a6_0x4164c8,_0x163b78=await resolveAuthWriteInput(_0x2ff668),_0x5bb6b3=resolveAuthScopeFlags(_0x2ff668),_0x5c8e0d={'accessKey':_0x163b78[_0x356502(0x1c4)]};_0x163b78[_0x356502(0x1be)]&&(_0x5c8e0d[_0x356502(0x1be)]=_0x163b78[_0x356502(0x1be)]);writeScopedConfig(_0x5c8e0d,_0x5bb6b3);const _0xca66d4=_0x5bb6b3[_0x356502(0x19e)]?_0x356502(0x19e):_0x356502(0x1e8),_0x32402f=_0x5c8e0d['env']?_0x356502(0x1cb)+_0x5c8e0d[_0x356502(0x1be)]+'.':'';return{'ok':!![],'message':_0x356502(0x1ad)+_0xca66d4+_0x356502(0x1dc)+_0x32402f+_0x356502(0x1cc)+CLI_BIN_NAME+_0x356502(0x1ac)};}},{'service':a6_0x4164c8(0x1d8),'command':a6_0x4164c8(0x1e2),'description':a6_0x4164c8(0x1a3),'risk':a6_0x4164c8(0x1e1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4164c8(0x19e),'type':a6_0x4164c8(0x1ea),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x4164c8(0x1e8),'type':a6_0x4164c8(0x1ea),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x47c1dd){const _0x56b145=a6_0x4164c8,_0x59159a=resolveAuthScopeFlags(_0x47c1dd),_0x8991a1=readScopedConfig(_0x59159a),_0x50015f=!!_0x8991a1['accessKey'];delete _0x8991a1[_0x56b145(0x1c4)],writeScopedConfig(_0x8991a1,_0x59159a);const _0x2431e0=_0x59159a[_0x56b145(0x19e)]?_0x56b145(0x19e):_0x56b145(0x1e8);if(_0x50015f)return{'ok':!![],'message':_0x56b145(0x19d)+_0x2431e0+_0x56b145(0x1ce)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0x2431e0+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a6_0x4164c8(0x1d8),'command':'status','description':a6_0x4164c8(0x1b2),'risk':a6_0x4164c8(0x1ab),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4164c8(0x19e),'type':'boolean','description':a6_0x4164c8(0x1d0),'default':!![]},{'name':a6_0x4164c8(0x1e8),'type':a6_0x4164c8(0x1ea),'description':a6_0x4164c8(0x1bc),'default':![]}],async 'execute'(_0xddad89){const _0x3ea542=a6_0x4164c8,_0x5d3333=resolveAuthScopeFlags(_0xddad89),_0xb71cf7=readScopedConfig(_0x5d3333),_0x5c5f1d=productEnvName('ACCESS_KEY'),_0x2067c4=productEnv(_0x3ea542(0x1d9))||undefined,_0x188af1=_0xb71cf7['accessKey']||undefined,_0x19f9aa=_0x2067c4||_0x188af1,_0x9d0047=_0x2067c4?_0x5c5f1d+_0x3ea542(0x1c3):_0x188af1?(_0x5d3333[_0x3ea542(0x19e)]?_0x3ea542(0x19e):'project')+_0x3ea542(0x1dd):null,_0x4fa302=['Auth\x20mode:\x20'+AUTH_MODE['ClientAk']];if(_0x19f9aa){const _0x3dcb65=_0x19f9aa[_0x3ea542(0x1ba)]>0x8?''+_0x19f9aa['slice'](0x0,0x8)+'*'[_0x3ea542(0x1bb)](_0x19f9aa['length']-0x8):_0x19f9aa;_0x4fa302[_0x3ea542(0x1a5)](_0x3ea542(0x1c1)+_0x3dcb65+(_0x9d0047?'\x20(via\x20'+_0x9d0047+')':''));}return!_0x19f9aa&&(_0x4fa302[_0x3ea542(0x1a5)](''),_0x4fa302['push'](_0x3ea542(0x1d1)),_0x4fa302[_0x3ea542(0x1a5)](''),_0x4fa302[_0x3ea542(0x1a5)](_0x3ea542(0x1de)+CLI_BIN_NAME+_0x3ea542(0x1af)),_0x4fa302[_0x3ea542(0x1a5)](''),_0x4fa302[_0x3ea542(0x1a5)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x3ea542(0x1b1)]+')'),_0x4fa302[_0x3ea542(0x1a5)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x4fa302['push'](''),_0x4fa302[_0x3ea542(0x1a5)](_0x3ea542(0x1e3)),_0x4fa302[_0x3ea542(0x1a5)](_0x3ea542(0x1b3)+_0x5c5f1d+'=ak_xxx'),_0x4fa302[_0x3ea542(0x1a5)](''),_0x4fa302[_0x3ea542(0x1a5)](_0x3ea542(0x1b7)+CLI_BIN_NAME+_0x3ea542(0x1ac)),_0x4fa302[_0x3ea542(0x1a5)](_0x3ea542(0x19c)+CLI_BIN_NAME+_0x3ea542(0x1c9))),{'ok':!![],'message':_0x4fa302[_0x3ea542(0x1c2)]('\x0a')};}},{'service':a6_0x4164c8(0x1d8),'command':a6_0x4164c8(0x1ca),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a6_0x4164c8(0x1ab),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2ab785){const _0x5ec00a=a6_0x4164c8,_0x97268d=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x97268d,'meta':{'env':_0x2ab785['envName']??_0x5ec00a(0x1e6)}}};}}];
|
|
1
|
+
const a6_0x4efe86=a6_0x3c83;(function(_0x54139a,_0x5b0e27){const _0x2a960b=a6_0x3c83,_0x52e544=_0x54139a();while(!![]){try{const _0x203f32=-parseInt(_0x2a960b(0x1a9))/0x1*(parseInt(_0x2a960b(0x172))/0x2)+parseInt(_0x2a960b(0x1ac))/0x3*(parseInt(_0x2a960b(0x18c))/0x4)+parseInt(_0x2a960b(0x193))/0x5+-parseInt(_0x2a960b(0x187))/0x6+parseInt(_0x2a960b(0x190))/0x7*(-parseInt(_0x2a960b(0x186))/0x8)+-parseInt(_0x2a960b(0x16f))/0x9*(parseInt(_0x2a960b(0x192))/0xa)+parseInt(_0x2a960b(0x163))/0xb*(parseInt(_0x2a960b(0x19c))/0xc);if(_0x203f32===_0x5b0e27)break;else _0x52e544['push'](_0x52e544['shift']());}catch(_0x4c4c35){_0x52e544['push'](_0x52e544['shift']());}}}(a6_0x4c4a,0xeb74b));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';function a6_0x4c4a(){const _0x366718=['7DvVhJe','Read\x20from\x20global\x20config\x20(default)','90neyBlJ','9242930XjWvLh','length','validation','\x20config.','Missing\x20accessKey.','Clear\x20accessKey\x20from\x20config','project','Tip:\x20you\x20can\x20also\x20run:','Option\x20B:\x20apps\x20config\x20(','24IDVDUN','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','nonInteractive','cancelled','push','\x20\x20export\x20','daily','Then\x20verify\x20with:\x20','repeat','read','AccessKey:\x20','AccessKey\x20cleared\x20from\x20','AccessKey\x20saved\x20to\x20','637cFRGrn','Auth\x20mode:\x20','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','1773156OXQJHp','logout','stdin','Show\x20current\x20authentication\x20status','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','status','\x20config.\x20Nothing\x20to\x20clear.','Auth\x20config\x20reinitialized\x20in\x20','\x20config','env','boolean','write','stdout','3352283XZatbW','Option\x20C:\x20environment\x20variable','access-key','Option\x20A:\x20','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','ACCESS_KEY','str','\x20env\x20var','trim','Clear\x20from\x20global\x20config\x20(default)','\x20Current\x20env:\x20','envName','851418EJfmTO','join','Use\x20`','926hzxcEE','Invalid\x20accessKey\x20format:\x20\x22','\x20auth\x20status','production','test','slice','global','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','development','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','auth','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','newConfigFileName','accessKey','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','bool','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20Verify:\x20','\x20scope.','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','5130184KwzGad','5328882scXWwS','userCenterDisplayName','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','Write\x20to\x20global\x20config\x20(default)','8EBznoN','global-default','string','No\x20AccessKey\x20found\x20in\x20'];a6_0x4c4a=function(){return _0x366718;};return a6_0x4c4a();}import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';function a6_0x3c83(_0x2239bf,_0x5c56f0){_0x2239bf=_0x2239bf-0x162;const _0x4c4a58=a6_0x4c4a();let _0x3c8347=_0x4c4a58[_0x2239bf];return _0x3c8347;}import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x36eba5=a6_0x3c83;writeCliSideChannelLine(_0x36eba5(0x179)+PRODUCT_CONFIG[_0x36eba5(0x188)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x36eba5(0x19a)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>');}function buildAccessKeySetupGuide(){const _0x3209c0=a6_0x3c83;return[_0x3209c0(0x179)+PRODUCT_CONFIG[_0x3209c0(0x188)]+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+_0x3209c0(0x180)][_0x3209c0(0x170)]('\x0a');}function canPromptForAccessKey(_0x287f85){const _0xbfb70a=a6_0x3c83;return!_0x287f85[_0xbfb70a(0x19e)]&&process[_0xbfb70a(0x1ae)]['isTTY']!==![]&&process[_0xbfb70a(0x162)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x599af1){const _0x46a1a6=a6_0x3c83;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x599af1[_0x46a1a6(0x181)]('global'),'explicitProject':_0x599af1[_0x46a1a6(0x181)](_0x46a1a6(0x199)),'policy':_0x46a1a6(0x18d)}));}async function resolveAuthWriteInput(_0x47a169){const _0x49a43f=a6_0x3c83;let _0x579e28=(_0x47a169['str'](_0x49a43f(0x165))||_0x47a169[_0x49a43f(0x169)]('ak')||'')['trim']();const _0x474bae=(_0x47a169[_0x49a43f(0x169)]('env')||'')[_0x49a43f(0x16b)]();if(!_0x579e28&&canPromptForAccessKey(_0x47a169))try{showAccessKeyCreateHint(),_0x579e28=await promptAccessKey('');}catch(_0x1c4e4e){if(isAbortPrompt(_0x1c4e4e))throw CliErrors[_0x49a43f(0x19f)]();throw _0x1c4e4e;}if(!_0x579e28)throw CliErrors[_0x49a43f(0x195)](_0x49a43f(0x197),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x49a43f(0x176)](_0x579e28))throw CliErrors[_0x49a43f(0x195)](_0x49a43f(0x173)+_0x579e28+'\x22',_0x49a43f(0x19d));if(!_0x474bae)return{'accessKey':_0x579e28};const _0x4df959=normalizeEnv(_0x474bae);return{'accessKey':_0x579e28,'env':isDaily(_0x4df959)?_0x49a43f(0x1a2):isDev(_0x4df959)?_0x49a43f(0x17a):_0x49a43f(0x175)};}export const authDefinitions=[{'service':a6_0x4efe86(0x17c),'command':'login','description':a6_0x4efe86(0x167),'risk':a6_0x4efe86(0x1b7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4efe86(0x165),'type':a6_0x4efe86(0x18e),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':'string','description':'Shorthand\x20for\x20--access-key'},{'name':'global','type':'boolean','description':a6_0x4efe86(0x18b),'default':!![]},{'name':a6_0x4efe86(0x199),'type':a6_0x4efe86(0x1b6),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x335ef8){const _0x40442a=a6_0x4efe86;if(_0x335ef8[_0x40442a(0x181)]('yes'))throw CliErrors[_0x40442a(0x195)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x40442a(0x171)+CLI_BIN_NAME+_0x40442a(0x182)+CLI_BIN_NAME+_0x40442a(0x189));const _0x4eea0e=(_0x335ef8['str'](_0x40442a(0x165))||_0x335ef8[_0x40442a(0x169)]('ak')||'')[_0x40442a(0x16b)]();if(!_0x4eea0e&&_0x335ef8['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x5c45ee=await resolveAuthWriteInput(_0x335ef8),_0x133c60=resolveAuthScopeFlags(_0x335ef8),_0x404510=readScopedConfig(_0x133c60);_0x404510['accessKey']=_0x5c45ee[_0x40442a(0x17f)];_0x5c45ee[_0x40442a(0x1b5)]&&(_0x404510['env']=_0x5c45ee[_0x40442a(0x1b5)]);writeScopedConfig(_0x404510,_0x133c60);const _0x1439d9=_0x133c60['global']?_0x40442a(0x178):_0x40442a(0x199),_0x3a7bb4=_0x404510[_0x40442a(0x1b5)]?'\x20Current\x20env:\x20'+_0x404510['env']+'.':'';return{'ok':!![],'message':_0x40442a(0x1a8)+_0x1439d9+_0x40442a(0x196)+_0x3a7bb4+_0x40442a(0x183)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x4efe86(0x17c),'command':'init','description':a6_0x4efe86(0x1b0),'risk':a6_0x4efe86(0x1b7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4efe86(0x165),'type':a6_0x4efe86(0x18e),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a6_0x4efe86(0x18e),'description':'Shorthand\x20for\x20--access-key'},{'name':a6_0x4efe86(0x1b5),'type':a6_0x4efe86(0x18e),'description':a6_0x4efe86(0x18a)},{'name':a6_0x4efe86(0x178),'type':'boolean','description':a6_0x4efe86(0x18b),'default':!![]},{'name':a6_0x4efe86(0x199),'type':a6_0x4efe86(0x1b6),'description':a6_0x4efe86(0x1ab),'default':![]}],async 'execute'(_0x5cd916){const _0x15fe40=a6_0x4efe86,_0x58e555=await resolveAuthWriteInput(_0x5cd916),_0x596499=resolveAuthScopeFlags(_0x5cd916),_0x27ac32={'accessKey':_0x58e555[_0x15fe40(0x17f)]};_0x58e555[_0x15fe40(0x1b5)]&&(_0x27ac32[_0x15fe40(0x1b5)]=_0x58e555[_0x15fe40(0x1b5)]);writeScopedConfig(_0x27ac32,_0x596499);const _0x4df815=_0x596499['global']?_0x15fe40(0x178):_0x15fe40(0x199),_0x350aa6=_0x27ac32[_0x15fe40(0x1b5)]?_0x15fe40(0x16d)+_0x27ac32[_0x15fe40(0x1b5)]+'.':'';return{'ok':!![],'message':_0x15fe40(0x1b3)+_0x4df815+_0x15fe40(0x184)+_0x350aa6+'\x20Verify:\x20'+CLI_BIN_NAME+_0x15fe40(0x174)};}},{'service':'auth','command':a6_0x4efe86(0x1ad),'description':a6_0x4efe86(0x198),'risk':a6_0x4efe86(0x1b7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4efe86(0x178),'type':a6_0x4efe86(0x1b6),'description':a6_0x4efe86(0x16c),'default':!![]},{'name':a6_0x4efe86(0x199),'type':a6_0x4efe86(0x1b6),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0xa90dcd){const _0x964727=a6_0x4efe86,_0x404506=resolveAuthScopeFlags(_0xa90dcd),_0x221bae=readScopedConfig(_0x404506),_0x22b97a=!!_0x221bae[_0x964727(0x17f)];delete _0x221bae[_0x964727(0x17f)],writeScopedConfig(_0x221bae,_0x404506);const _0x54d7a5=_0x404506['global']?'global':_0x964727(0x199);if(_0x22b97a)return{'ok':!![],'message':_0x964727(0x1a7)+_0x54d7a5+_0x964727(0x196)};return{'ok':!![],'message':_0x964727(0x18f)+_0x54d7a5+_0x964727(0x1b2)};}},{'service':'auth','command':a6_0x4efe86(0x1b1),'description':a6_0x4efe86(0x1af),'risk':a6_0x4efe86(0x1a5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':a6_0x4efe86(0x191),'default':!![]},{'name':a6_0x4efe86(0x199),'type':a6_0x4efe86(0x1b6),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x750da7){const _0x1016cd=a6_0x4efe86,_0x362b8f=resolveAuthScopeFlags(_0x750da7),_0x1c634a=readScopedConfig(_0x362b8f),_0x37d87a=productEnvName('ACCESS_KEY'),_0x15125f=productEnv(_0x1016cd(0x168))||undefined,_0x38863d=_0x1c634a[_0x1016cd(0x17f)]||undefined,_0xe6c500=_0x15125f||_0x38863d,_0x46b1d6=_0x15125f?_0x37d87a+_0x1016cd(0x16a):_0x38863d?(_0x362b8f[_0x1016cd(0x178)]?_0x1016cd(0x178):_0x1016cd(0x199))+_0x1016cd(0x1b4):null,_0xcb8a2e=[_0x1016cd(0x1aa)+AUTH_MODE['ClientAk']];if(_0xe6c500){const _0x354e48=_0xe6c500[_0x1016cd(0x194)]>0x8?''+_0xe6c500[_0x1016cd(0x177)](0x0,0x8)+'*'[_0x1016cd(0x1a4)](_0xe6c500[_0x1016cd(0x194)]-0x8):_0xe6c500;_0xcb8a2e[_0x1016cd(0x1a0)](_0x1016cd(0x1a6)+_0x354e48+(_0x46b1d6?'\x20(via\x20'+_0x46b1d6+')':''));}return!_0xe6c500&&(_0xcb8a2e['push'](''),_0xcb8a2e[_0x1016cd(0x1a0)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0xcb8a2e[_0x1016cd(0x1a0)](''),_0xcb8a2e['push'](_0x1016cd(0x166)+CLI_BIN_NAME+_0x1016cd(0x185)),_0xcb8a2e[_0x1016cd(0x1a0)](''),_0xcb8a2e[_0x1016cd(0x1a0)](_0x1016cd(0x19b)+PRODUCT_CONFIG[_0x1016cd(0x17e)]+')'),_0xcb8a2e['push']('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0xcb8a2e[_0x1016cd(0x1a0)](''),_0xcb8a2e[_0x1016cd(0x1a0)](_0x1016cd(0x164)),_0xcb8a2e['push'](_0x1016cd(0x1a1)+_0x37d87a+'=ak_xxx'),_0xcb8a2e[_0x1016cd(0x1a0)](''),_0xcb8a2e['push'](_0x1016cd(0x1a3)+CLI_BIN_NAME+_0x1016cd(0x174)),_0xcb8a2e[_0x1016cd(0x1a0)](_0x1016cd(0x17d)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0xcb8a2e['join']('\x0a')};}},{'service':'auth','command':'info','description':a6_0x4efe86(0x17b),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x177028){const _0xe58dbb=a6_0x4efe86,_0x3eadc8=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x3eadc8,'meta':{'env':_0x177028[_0xe58dbb(0x16e)]??_0xe58dbb(0x175)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2ef1b8,_0x2ca854){const _0x46a63f=a7_0x4310,_0x51a218=_0x2ef1b8();while(!![]){try{const _0x1e4939=parseInt(_0x46a63f(0x7a))/0x1+parseInt(_0x46a63f(0x87))/0x2+parseInt(_0x46a63f(0x79))/0x3+-parseInt(_0x46a63f(0x83))/0x4*(-parseInt(_0x46a63f(0x8c))/0x5)+-parseInt(_0x46a63f(0x86))/0x6*(-parseInt(_0x46a63f(0x7d))/0x7)+-parseInt(_0x46a63f(0x85))/0x8*(-parseInt(_0x46a63f(0x76))/0x9)+-parseInt(_0x46a63f(0x89))/0xa*(parseInt(_0x46a63f(0x77))/0xb);if(_0x1e4939===_0x2ca854)break;else _0x51a218['push'](_0x51a218['shift']());}catch(_0x114189){_0x51a218['push'](_0x51a218['shift']());}}}(a7_0x207f,0x7414f));import{createInterface}from'node:readline';function a7_0x4310(_0x1d46f6,_0xc23710){_0x1d46f6=_0x1d46f6-0x75;const _0x207f38=a7_0x207f();let _0x431047=_0x207f38[_0x1d46f6];return _0x431047;}class AbortPrompt extends Error{constructor(){const _0x76b82=a7_0x4310;super(_0x76b82(0x78)),this[_0x76b82(0x8a)]=_0x76b82(0x7e);}}function createSafeRl(){const _0x5c2e04=a7_0x4310,_0x343da2=createInterface({'input':process[_0x5c2e04(0x84)],'output':process[_0x5c2e04(0x7c)]});let _0x711e68;const _0xa29f09=new Promise((_0x585a39,_0x5ba3eb)=>{const _0x37d2c8=_0x5c2e04;_0x711e68=()=>{const _0x564874=a7_0x4310;_0x711e68&&(_0x343da2[_0x564874(0x80)]('SIGINT',_0x711e68),_0x711e68=undefined);try{_0x343da2[_0x564874(0x7b)]();}catch{}_0x5ba3eb(new AbortPrompt());},_0x343da2[_0x37d2c8(0x7f)](_0x37d2c8(0x82),_0x711e68);}),_0x869afe=()=>{const _0x351b19=_0x5c2e04;_0x711e68&&(_0x343da2[_0x351b19(0x80)](_0x351b19(0x82),_0x711e68),_0x711e68=undefined);try{_0x343da2['close']();}catch{}};return{'rl':_0x343da2,'abortPromise':_0xa29f09,'disposeSuccess':_0x869afe};}function a7_0x207f(){const _0x331258=['146899IHolII','close','stdout','196xTbCXQ','AbortPrompt','once','removeListener','trim','SIGINT','64LBIvxj','stdin','229136ZEfXyU','51048WSATCm','807670VBCHEL','question','3664520HYsULK','name','AccessKey\x20(paste\x20ak_...):\x20','17015aPkHfg','AccessKey\x20(','):\x20','9afeJjy','22WrsTkb','User\x20aborted\x20prompt','1008981aTrNBz'];a7_0x207f=function(){return _0x331258;};return a7_0x207f();}export async function promptAccessKey(_0x1ddfab=''){const {rl:_0x26bef1,abortPromise:_0x44730c,disposeSuccess:_0x3a6ece}=createSafeRl(),_0x7b8f2f=new Promise(_0x537fc9=>{const _0x404b66=a7_0x4310,_0x232027=_0x1ddfab?_0x404b66(0x8d)+_0x1ddfab+_0x404b66(0x75):_0x404b66(0x8b);_0x26bef1[_0x404b66(0x88)](_0x232027,_0x11518e=>{const _0x236faf=_0x404b66;_0x3a6ece(),_0x537fc9(_0x11518e[_0x236faf(0x81)]()||_0x1ddfab);});});return Promise['race']([_0x7b8f2f,_0x44730c]);}export function isAbortPrompt(_0x13b9bb){return _0x13b9bb instanceof Error&&_0x13b9bb['name']==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x438bd1=a8_0x44ec;function a8_0x44ec(_0x1ad201,_0x14d7fc){_0x1ad201=_0x1ad201-0x1a5;const _0x290e06=a8_0x290e();let _0x44ec15=_0x290e06[_0x1ad201];return _0x44ec15;}(function(_0x57b98f,_0x3d1a65){const _0x37cd78=a8_0x44ec,_0x4dab49=_0x57b98f();while(!![]){try{const _0x474cee=parseInt(_0x37cd78(0x1b1))/0x1*(parseInt(_0x37cd78(0x1b0))/0x2)+parseInt(_0x37cd78(0x1ac))/0x3*(parseInt(_0x37cd78(0x1bd))/0x4)+-parseInt(_0x37cd78(0x1a5))/0x5*(parseInt(_0x37cd78(0x1a7))/0x6)+parseInt(_0x37cd78(0x1ae))/0x7+-parseInt(_0x37cd78(0x1b5))/0x8+parseInt(_0x37cd78(0x1b8))/0x9+-parseInt(_0x37cd78(0x1ba))/0xa*(parseInt(_0x37cd78(0x1a6))/0xb);if(_0x474cee===_0x3d1a65)break;else _0x4dab49['push'](_0x4dab49['shift']());}catch(_0xbd92c5){_0x4dab49['push'](_0x4dab49['shift']());}}}(a8_0x290e,0x23cc5));import{getBffScriptInfo}from'../../core/api-client.js';function a8_0x290e(){const _0x336ede=['bff','description','15IhrcOE','(none)','1951180gNKdPy','bool','508940jmUMgO','1aGxRZD','createdTime','scriptType','read','1075696XMoAjj','detail','Script\x20ID','2475108NWOpER','appCode','120fLZdIn','Get\x20BFF\x20script\x20details\x20by\x20ID','num','195540HatcJI','5stGdYw','662684ReWlVx','291768MRVOkB','updatedTime','verbose'];a8_0x290e=function(){return _0x336ede;};return a8_0x290e();}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x438bd1(0x1aa),'command':a8_0x438bd1(0x1b6),'description':a8_0x438bd1(0x1bb),'risk':a8_0x438bd1(0x1b4),'flags':[{...ID_FLAG,'description':a8_0x438bd1(0x1b7)},VERBOSE_FLAG],async 'execute'(_0x3f0a70){const _0x27d14d=a8_0x438bd1,_0x25f31d=await getBffScriptInfo(_0x3f0a70[_0x27d14d(0x1bc)]('id')),_0x20bb28=_0x3f0a70[_0x27d14d(0x1af)](_0x27d14d(0x1a9));if(_0x20bb28)return{'ok':!![],'data':_0x25f31d};return{'ok':!![],'data':{'id':_0x25f31d['id'],'appCode':_0x25f31d[_0x27d14d(0x1b9)],'functionName':_0x25f31d['functionName']??'','scriptType':_0x25f31d[_0x27d14d(0x1b3)],'description':_0x25f31d[_0x27d14d(0x1ab)]||_0x27d14d(0x1ad),'createdTime':_0x25f31d[_0x27d14d(0x1b2)]??'','updatedTime':_0x25f31d[_0x27d14d(0x1a8)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a9_0x13254b=a9_0x77e2;function a9_0x903c(){const _0x481487=['222884EFuyOq','exec','str','800416lfFXrQ','2216304dXNEWF','bff','now','99JEYDtP','read','6RRdemR','122172gFpzeY','977144uBeZjR','BFF\x20executed\x20in\x20','4633665MEhdiw','176078GJRhzy','params'];a9_0x903c=function(){return _0x481487;};return a9_0x903c();}(function(_0x2c8990,_0x53415d){const _0x3bf1cf=a9_0x77e2,_0x357cfc=_0x2c8990();while(!![]){try{const _0x37b5e3=-parseInt(_0x3bf1cf(0xc9))/0x1+parseInt(_0x3bf1cf(0xcf))/0x2+parseInt(_0x3bf1cf(0xd3))/0x3+parseInt(_0x3bf1cf(0xd2))/0x4+parseInt(_0x3bf1cf(0xcc))/0x5+-parseInt(_0x3bf1cf(0xc8))/0x6*(-parseInt(_0x3bf1cf(0xcd))/0x7)+-parseInt(_0x3bf1cf(0xca))/0x8*(parseInt(_0x3bf1cf(0xc6))/0x9);if(_0x37b5e3===_0x53415d)break;else _0x357cfc['push'](_0x357cfc['shift']());}catch(_0x16e8ce){_0x357cfc['push'](_0x357cfc['shift']());}}}(a9_0x903c,0x82f88));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a9_0x77e2(_0x980753,_0xb9c15c){_0x980753=_0x980753-0xc4;const _0x903c6e=a9_0x903c();let _0x77e296=_0x903c6e[_0x980753];return _0x77e296;}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a9_0x13254b(0xc4),'command':a9_0x13254b(0xd0),'description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a9_0x13254b(0xc7),'flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x55d8f1){const _0x2cd197=a9_0x13254b,_0x11892f=parseJsonParams(_0x55d8f1[_0x2cd197(0xd1)](_0x2cd197(0xce))),_0x2caa6d=Date[_0x2cd197(0xc5)](),_0x44d5b2=await executeSdkBff(_0x55d8f1[_0x2cd197(0xd1)]('name'),_0x11892f),_0x33a8e3=Date[_0x2cd197(0xc5)]()-_0x2caa6d;return{'ok':!![],'data':{'result':_0x44d5b2,'elapsed':_0x33a8e3},'message':_0x2cd197(0xcb)+_0x33a8e3+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x37c408,_0x1a39f0){const _0x43ae9c=a10_0xe451,_0x245dbc=_0x37c408();while(!![]){try{const _0x1b66e1=parseInt(_0x43ae9c(0x1d8))/0x1+parseInt(_0x43ae9c(0x1d7))/0x2*(parseInt(_0x43ae9c(0x1d6))/0x3)+parseInt(_0x43ae9c(0x1cf))/0x4*(-parseInt(_0x43ae9c(0x1d0))/0x5)+-parseInt(_0x43ae9c(0x1d4))/0x6+parseInt(_0x43ae9c(0x1d3))/0x7*(-parseInt(_0x43ae9c(0x1d5))/0x8)+-parseInt(_0x43ae9c(0x1d2))/0x9*(-parseInt(_0x43ae9c(0x1d1))/0xa)+parseInt(_0x43ae9c(0x1d9))/0xb;if(_0x1b66e1===_0x1a39f0)break;else _0x245dbc['push'](_0x245dbc['shift']());}catch(_0xae3d6a){_0x245dbc['push'](_0x245dbc['shift']());}}}(a10_0x5392,0x3a4a3));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];function a10_0xe451(_0x402551,_0xc57bbc){_0x402551=_0x402551-0x1cf;const _0x5392c6=a10_0x5392();let _0xe451d1=_0x5392c6[_0x402551];return _0xe451d1;}function a10_0x5392(){const _0x4b4f23=['57931XGinBE','4040597llTJjn','20DcuWoQ','405070yvFQBh','4231210KSgnlz','9MOpxqG','14BTcKrL','2106420UREiWL','117328PQvJSP','153olGkOo','6896mrKIrt'];a10_0x5392=function(){return _0x4b4f23;};return a10_0x5392();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5a67a7,_0x41bbd1){const _0x58da30=a11_0xfaa0,_0x5f43e9=_0x5a67a7();while(!![]){try{const _0x12fd69=parseInt(_0x58da30(0x110))/0x1*(-parseInt(_0x58da30(0x11a))/0x2)+-parseInt(_0x58da30(0x123))/0x3+-parseInt(_0x58da30(0x112))/0x4*(-parseInt(_0x58da30(0x114))/0x5)+-parseInt(_0x58da30(0x115))/0x6+-parseInt(_0x58da30(0x117))/0x7+parseInt(_0x58da30(0x122))/0x8*(parseInt(_0x58da30(0x11f))/0x9)+-parseInt(_0x58da30(0x128))/0xa*(-parseInt(_0x58da30(0x125))/0xb);if(_0x12fd69===_0x41bbd1)break;else _0x5f43e9['push'](_0x5f43e9['shift']());}catch(_0xa45593){_0x5f43e9['push'](_0x5f43e9['shift']());}}}(a11_0x361e,0x48e82));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';function a11_0xfaa0(_0x5ee4b2,_0xe79536){_0x5ee4b2=_0x5ee4b2-0x110;const _0x361e3a=a11_0x361e();let _0xfaa002=_0x361e3a[_0x5ee4b2];return _0xfaa002;}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(_0x229420){const _0x1fa735=a11_0xfaa0,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x3fa3ed}=_0x229420;if(explicitGlobal&&explicitProject)throw CliErrors[_0x1fa735(0x11c)](_0x1fa735(0x11b),_0x1fa735(0x116));if(explicitGlobal)return _0x1fa735(0x119);if(explicitProject)return'project';switch(_0x3fa3ed){case _0x1fa735(0x126):return _0x1fa735(0x119);case _0x1fa735(0x120):return _0x229420[_0x1fa735(0x113)]??isInProject()?_0x1fa735(0x111):_0x1fa735(0x119);case _0x1fa735(0x11e):if(!(_0x229420[_0x1fa735(0x113)]??isInProject()))throw CliErrors[_0x1fa735(0x11c)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x1fa735(0x124)]+_0x1fa735(0x11d),_0x1fa735(0x129)+PRODUCT_CONFIG['newConfigFileName']+_0x1fa735(0x118)+CLI_BIN_NAME+_0x1fa735(0x121));return _0x1fa735(0x111);}}export function toScopeFlags(_0x377106){const _0x362c91=a11_0xfaa0;return{'global':_0x377106===_0x362c91(0x119)};}function a11_0x361e(){const _0x163e8f=['2mJahvU','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','validation','\x20found).','project-or-global-explicit','147465NnngcT','project-default','\x20init`\x20first.','8NqhRpX','1707411nmBGVC','newConfigFileName','132rfTFVw','global-default','\x20(global)','948650NxeYYg','Add\x20--global\x20to\x20write\x20to\x20~/','18212cBTXpV','project','4ffESrG','inProject','2977745OSQhcm','2406906wLtHHF','Use\x20only\x20one\x20config\x20scope\x20flag.','3242316BEVSHd',',\x20or\x20run\x20`','global'];a11_0x361e=function(){return _0x163e8f;};return a11_0x361e();}export function formatScopeLabel(_0x5b6c6b){const _0x2f543b=a11_0xfaa0;return _0x5b6c6b==='global'?_0x2f543b(0x127):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e5936,_0x5c6221){const _0x41aaa5=a12_0x144c,_0x2a624d=_0x3e5936();while(!![]){try{const _0x46dff5=parseInt(_0x41aaa5(0x1d9))/0x1*(parseInt(_0x41aaa5(0x1f4))/0x2)+-parseInt(_0x41aaa5(0x1d8))/0x3*(-parseInt(_0x41aaa5(0x1e5))/0x4)+parseInt(_0x41aaa5(0x1ef))/0x5+parseInt(_0x41aaa5(0x1e1))/0x6*(parseInt(_0x41aaa5(0x1da))/0x7)+parseInt(_0x41aaa5(0x1e8))/0x8+parseInt(_0x41aaa5(0x1e2))/0x9+-parseInt(_0x41aaa5(0x1de))/0xa;if(_0x46dff5===_0x5c6221)break;else _0x2a624d['push'](_0x2a624d['shift']());}catch(_0x5fee9a){_0x2a624d['push'](_0x2a624d['shift']());}}}(a12_0x1929,0x4766e));import{CliErrors}from'../../errors.js';function isSet(_0x538194,_0xa86246){const _0x528e16=a12_0x144c,_0x29c964=_0x538194[_0x528e16(0x1f1)](_0xa86246);return _0x29c964!==undefined&&_0x29c964!==''&&_0x29c964!==![]&&_0x29c964!==0x0;}function a12_0x1929(){const _0x2e3c0f=['join','validation','length','Only\x20one\x20of\x20','1874255MUtLgf','\x20are\x20mutually\x20exclusive\x20for\x20`','flag','map',',\x20got\x20\x22','26kvuDlU','3XtbRsZ','22811TnPSEa','906276RJeyrj','Use\x20only\x20one\x20of:\x20',':\x20expected\x20','filter','21618080IOQsTD','Exactly\x20one\x20of\x20','test','18HRMSRD','3409272XUYqdE','str','Remove\x20all\x20but\x20one.','2021064nJSTqT','some','At\x20least\x20one\x20of\x20','4083184BjwpqY','\x20is\x20required\x20for\x20`','Provide\x20one\x20of:\x20'];a12_0x1929=function(){return _0x2e3c0f;};return a12_0x1929();}function a12_0x144c(_0xd9f4b1,_0x3a8090){_0xd9f4b1=_0xd9f4b1-0x1d8;const _0x1929a7=a12_0x1929();let _0x144cf1=_0x1929a7[_0xd9f4b1];return _0x144cf1;}function fmtNames(_0x17ddb4){const _0x228621=a12_0x144c;return _0x17ddb4[_0x228621(0x1f2)](_0x46a8e6=>'--'+_0x46a8e6)[_0x228621(0x1eb)](',\x20');}export function requireOneOf(_0x176bdf,_0x5754c9,_0x222046){const _0x38cea8=a12_0x144c,_0x8579f0=_0x5754c9['filter'](_0x42f3cd=>isSet(_0x176bdf,_0x42f3cd));if(_0x8579f0['length']!==0x1)throw CliErrors[_0x38cea8(0x1ec)](_0x8579f0[_0x38cea8(0x1ed)]===0x0?_0x38cea8(0x1df)+fmtNames(_0x5754c9)+'\x20is\x20required\x20for\x20`'+_0x222046+'`.':_0x38cea8(0x1ee)+fmtNames(_0x5754c9)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x8579f0)+'.',_0x8579f0[_0x38cea8(0x1ed)]===0x0?_0x38cea8(0x1ea)+fmtNames(_0x5754c9):_0x38cea8(0x1e4));}export function requireAnyOf(_0x440b9a,_0x12bcad,_0x5132fd){const _0x26c946=a12_0x144c;if(!_0x12bcad[_0x26c946(0x1e6)](_0x26ba79=>isSet(_0x440b9a,_0x26ba79)))throw CliErrors[_0x26c946(0x1ec)](_0x26c946(0x1e7)+fmtNames(_0x12bcad)+_0x26c946(0x1e9)+_0x5132fd+'`.',_0x26c946(0x1ea)+fmtNames(_0x12bcad));}export function mutuallyExclusive(_0x297854,_0x19d993,_0x535e2c){const _0x2b91d8=a12_0x144c,_0x2c0606=_0x19d993[_0x2b91d8(0x1dd)](_0x384160=>isSet(_0x297854,_0x384160));if(_0x2c0606[_0x2b91d8(0x1ed)]>0x1)throw CliErrors['validation']('Flags\x20'+fmtNames(_0x2c0606)+_0x2b91d8(0x1f0)+_0x535e2c+'`.',_0x2b91d8(0x1db)+fmtNames(_0x19d993));}export function validatePattern(_0x2136c2,_0x297aec,_0x478f8f,_0x8843b){const _0x2804ce=a12_0x144c,_0x3eb0d9=_0x2136c2[_0x2804ce(0x1e3)](_0x297aec);if(_0x3eb0d9&&!_0x478f8f[_0x2804ce(0x1e0)](_0x3eb0d9))throw CliErrors['validation']('Invalid\x20--'+_0x297aec+_0x2804ce(0x1dc)+_0x8843b+_0x2804ce(0x1f3)+_0x3eb0d9+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a13_0x4ef794=a13_0x3684;function a13_0x3a34(){const _0x19c659=['Resource\x20ID','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','params','12maMRZW','string','125170NXcKqy','name','167124OShkSx','code','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','Return\x20full\x20raw\x20response\x20object','271203WYexwZ','45kMdcai','Dataset\x20code\x20(32-char\x20hex\x20UUID)','1015fUFKBA','number','11018uTWJDP','boolean','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','2fVAZlI','Resource\x20name\x20for\x20lookup','237929TwpyJI','72831oGSeWH','828gKJpdr','1729NeGiAo','207rKdfDh','sqlcode','18984opoRDF'];a13_0x3a34=function(){return _0x19c659;};return a13_0x3a34();}(function(_0x3d218b,_0x59358d){const _0x52a81c=a13_0x3684,_0x33acb3=_0x3d218b();while(!![]){try{const _0x4ab007=parseInt(_0x52a81c(0x1d0))/0x1*(-parseInt(_0x52a81c(0x1ce))/0x2)+parseInt(_0x52a81c(0x1c6))/0x3*(parseInt(_0x52a81c(0x1da))/0x4)+-parseInt(_0x52a81c(0x1c7))/0x5*(parseInt(_0x52a81c(0x1de))/0x6)+parseInt(_0x52a81c(0x1c9))/0x7*(parseInt(_0x52a81c(0x1d6))/0x8)+parseInt(_0x52a81c(0x1d4))/0x9*(-parseInt(_0x52a81c(0x1dc))/0xa)+parseInt(_0x52a81c(0x1d1))/0xb*(parseInt(_0x52a81c(0x1d2))/0xc)+-parseInt(_0x52a81c(0x1d3))/0xd*(-parseInt(_0x52a81c(0x1cb))/0xe);if(_0x4ab007===_0x59358d)break;else _0x33acb3['push'](_0x33acb3['shift']());}catch(_0x537bb6){_0x33acb3['push'](_0x33acb3['shift']());}}}(a13_0x3a34,0x61bae));export const CODE_FLAG={'name':a13_0x4ef794(0x1df),'type':a13_0x4ef794(0x1db),'required':!![],'description':a13_0x4ef794(0x1c8),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':a13_0x4ef794(0x1d5),'type':a13_0x4ef794(0x1db),'required':!![],'description':a13_0x4ef794(0x1cd),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a13_0x4ef794(0x1d8)}};function a13_0x3684(_0x5b2422,_0x2e0093){_0x5b2422=_0x5b2422-0x1c6;const _0x3a3472=a13_0x3a34();let _0x36843c=_0x3a3472[_0x5b2422];return _0x36843c;}export const VERBOSE_FLAG={'name':'verbose','type':a13_0x4ef794(0x1cc),'description':a13_0x4ef794(0x1e1)};export const PARAMS_FLAG={'name':a13_0x4ef794(0x1d9),'type':a13_0x4ef794(0x1db),'description':a13_0x4ef794(0x1e0)};export const NAME_FLAG={'name':a13_0x4ef794(0x1dd),'type':a13_0x4ef794(0x1db),'description':a13_0x4ef794(0x1cf)};export const ID_FLAG={'name':'id','type':a13_0x4ef794(0x1ca),'required':!![],'description':a13_0x4ef794(0x1d7)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0x43e9f4=a14_0x55e5;(function(_0x2d80aa,_0x58888f){const _0x4a7ba5=a14_0x55e5,_0x5b2781=_0x2d80aa();while(!![]){try{const _0x4dbffb=-parseInt(_0x4a7ba5(0xaa))/0x1*(-parseInt(_0x4a7ba5(0x86))/0x2)+-parseInt(_0x4a7ba5(0x73))/0x3+-parseInt(_0x4a7ba5(0x93))/0x4+parseInt(_0x4a7ba5(0x81))/0x5*(-parseInt(_0x4a7ba5(0xb0))/0x6)+parseInt(_0x4a7ba5(0x75))/0x7+parseInt(_0x4a7ba5(0xa8))/0x8*(-parseInt(_0x4a7ba5(0x8c))/0x9)+-parseInt(_0x4a7ba5(0x88))/0xa*(-parseInt(_0x4a7ba5(0x9f))/0xb);if(_0x4dbffb===_0x58888f)break;else _0x5b2781['push'](_0x5b2781['shift']());}catch(_0x396b87){_0x5b2781['push'](_0x5b2781['shift']());}}}(a14_0x120c,0x35159));function a14_0x55e5(_0x1f4f77,_0x5872bb){_0x1f4f77=_0x1f4f77-0x71;const _0x120c72=a14_0x120c();let _0x55e5b4=_0x120c72[_0x1f4f77];return _0x55e5b4;}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_0x43e9f4(0x95),'type':'boolean','description':a14_0x43e9f4(0x72),'default':![]};function parseAliasAppcodeSetKey(_0x367464){const _0x473da=a14_0x43e9f4,_0x2d3d44=_0x367464[_0x473da(0xb1)]('.');if(_0x2d3d44['length']!==0x3||_0x2d3d44[0x0]!=='apps'||_0x2d3d44[0x2]!==_0x473da(0x8d))return undefined;const _0x5cb3ad=_0x2d3d44[0x1]?.[_0x473da(0x9a)]();return _0x5cb3ad?_0x5cb3ad:undefined;}function parseAliasDeleteKey(_0x4fe64b){const _0x2b148c=a14_0x43e9f4,_0x4070a8=_0x4fe64b[_0x2b148c(0xb1)]('.');if(_0x4070a8[_0x2b148c(0xaf)]===0x2&&_0x4070a8[0x0]===_0x2b148c(0xad)){const _0x531fb1=_0x4070a8[0x1]?.[_0x2b148c(0x9a)]();return _0x531fb1?{'alias':_0x531fb1}:undefined;}if(_0x4070a8['length']===0x3&&_0x4070a8[0x0]==='apps'&&_0x4070a8[0x2]===_0x2b148c(0x8d)){const _0x4598b8=_0x4070a8[0x1]?.['trim']();return _0x4598b8?{'alias':_0x4598b8,'field':_0x2b148c(0x8d)}:undefined;}return undefined;}function setLocalAppAlias(_0x4a1ea6,_0xb33fa3,_0x392edf){const _0x3bb67d=a14_0x43e9f4,_0x49d6f3=_0x4a1ea6[_0x3bb67d(0xad)]&&typeof _0x4a1ea6[_0x3bb67d(0xad)]===_0x3bb67d(0xa6)&&!Array[_0x3bb67d(0x7c)](_0x4a1ea6[_0x3bb67d(0xad)])?_0x4a1ea6['apps']:{},_0x934d78=_0x49d6f3[_0xb33fa3]&&typeof _0x49d6f3[_0xb33fa3]===_0x3bb67d(0xa6)&&!Array[_0x3bb67d(0x7c)](_0x49d6f3[_0xb33fa3])?_0x49d6f3[_0xb33fa3]:{};_0x934d78[_0x3bb67d(0x8d)]=_0x392edf,_0x49d6f3[_0xb33fa3]=_0x934d78,_0x4a1ea6['apps']=_0x49d6f3;}function a14_0x120c(){const _0x31a133=['value','1206508BmzoHe','Key\x20not\x20found:\x20','global','Get\x20a\x20config\x20value','bool',';\x20apps.<alias>.appcode','delete','trim','Usage:\x20','\x22.\x20Allowed:\x20','`\x20=\x20\x22','validation','2006675cuMWKl','write','\x20config\x20set\x20<key>\x20<value>\x20[--global]','raw','log','format','List\x20current\x20config','object','Key\x20\x22','8vNdRfh','pageSize','10GnweCc','key','\x20\x20global:\x20\x20','apps','Set\x20a\x20config\x20value','length','162zZKyNM','split','includes','join','Write\x20to\x20global\x20config','15393Bkemxe','riskLevel','1034859iOURpQ','Missing\x20key\x20argument.','Deleted\x20`','\x20config\x20delete\x20<key>\x20[--global]','Settable\x20keys:\x20','pageSize\x20must\x20be\x20a\x20positive\x20number','\x20config\x20get\x20<key>','isArray','args','pretty','../../context.js','config','61015ibbqXT','read','field','Set\x20`','\x22\x20is\x20not\x20settable.','1916yDkHwz','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','50AJPIuo','alias','Delete\x20a\x20config\x20value','stringify','1942830TreefQ','appcode','get','project-or-global-explicit','\x20(global)','\x20\x20project:\x20'];a14_0x120c=function(){return _0x31a133;};return a14_0x120c();}function deleteLocalAppAlias(_0x248de7,_0x307a76){const _0x119abd=a14_0x43e9f4;if(!_0x248de7['apps']||typeof _0x248de7[_0x119abd(0xad)]!=='object'||Array['isArray'](_0x248de7['apps']))return![];const _0x560dc3=_0x248de7[_0x119abd(0xad)],_0x58f464=_0x560dc3[_0x307a76[_0x119abd(0x89)]];if(!_0x58f464||typeof _0x58f464!==_0x119abd(0xa6)||Array[_0x119abd(0x7c)](_0x58f464))return![];if(!_0x307a76['field'])return delete _0x560dc3[_0x307a76[_0x119abd(0x89)]],!![];if(!(_0x307a76[_0x119abd(0x83)]in _0x58f464))return![];return delete _0x58f464[_0x307a76['field']],Object['keys'](_0x58f464)[_0x119abd(0xaf)]===0x0&&delete _0x560dc3[_0x307a76[_0x119abd(0x89)]],!![];}const listDef={'service':a14_0x43e9f4(0x80),'command':'list','description':a14_0x43e9f4(0xa5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0xddec2d){const _0x345d21=a14_0x43e9f4,{buildConfigFromFlags:_0x1c6876}=await import(_0x345d21(0x7f)),_0x1cbc57=_0x1c6876({}),_0x1fa4e4=getProjectConfigPath(),_0x2a298e=resolveWriteConfigPath(_0x345d21(0x95));if(_0xddec2d[_0x345d21(0xa4)]===_0x345d21(0x7e))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x345d21(0x8b)](_0x1cbc57[_0x345d21(0xa2)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x345d21(0x91)+(_0x1fa4e4??'(none)')+'\x0a')+(_0x345d21(0xac)+_0x2a298e)};return{'ok':!![],'data':{'effective':_0x1cbc57[_0x345d21(0xa2)],'configFiles':{'project':_0x1fa4e4??null,'global':_0x2a298e}}};}},getDef={'service':a14_0x43e9f4(0x80),'command':a14_0x43e9f4(0x8e),'description':a14_0x43e9f4(0x96),'risk':a14_0x43e9f4(0x82),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a14_0x43e9f4(0x87),'required':!![]}],'flags':[],async 'execute'(_0x423c31){const _0x2c1638=a14_0x43e9f4,_0x4b1916=_0x423c31['args'][0x0];if(!_0x4b1916)throw CliErrors[_0x2c1638(0x9e)]('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x2c1638(0x7b));const {buildConfigFromFlags:_0x23af4f}=await import(_0x2c1638(0x7f)),{raw:_0x4110de}=_0x23af4f({});if(_0x4b1916[_0x2c1638(0xb2)]('.')){const _0x36e353=_0x4b1916[_0x2c1638(0xb1)]('.');let _0x13631d=_0x4110de;for(const _0x572543 of _0x36e353){if(_0x13631d==null||typeof _0x13631d!=='object')throw CliErrors[_0x2c1638(0x9e)](_0x2c1638(0x94)+_0x4b1916);_0x13631d=_0x13631d[_0x572543];}if(_0x13631d===undefined)throw CliErrors[_0x2c1638(0x9e)]('Key\x20not\x20found:\x20'+_0x4b1916);return console[_0x2c1638(0xa3)](typeof _0x13631d===_0x2c1638(0xa6)?JSON['stringify'](_0x13631d,null,0x2):String(_0x13631d)),{'ok':!![]};}const _0x2ab290=_0x4110de[_0x4b1916];if(_0x2ab290===undefined)throw CliErrors[_0x2c1638(0x9e)](_0x2c1638(0x94)+_0x4b1916);return console['log'](typeof _0x2ab290===_0x2c1638(0xa6)?JSON[_0x2c1638(0x8b)](_0x2ab290,null,0x2):String(_0x2ab290)),{'ok':!![]};}},setDef={'service':a14_0x43e9f4(0x80),'command':'set','description':a14_0x43e9f4(0xae),'risk':a14_0x43e9f4(0xa0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x43e9f4(0xab),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x43e9f4(0x92),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x30ef8a){const _0x5b1412=a14_0x43e9f4,_0x52d427=_0x30ef8a[_0x5b1412(0x7d)][0x0],_0x22d2ea=_0x30ef8a['args'][0x1];if(!_0x52d427||_0x22d2ea===undefined)throw CliErrors[_0x5b1412(0x9e)]('Missing\x20key\x20or\x20value.',_0x5b1412(0x9b)+CLI_BIN_NAME+_0x5b1412(0xa1));if(ENUM_KEYS[_0x52d427]&&!ENUM_KEYS[_0x52d427][_0x5b1412(0xb2)](_0x22d2ea))throw CliErrors[_0x5b1412(0x9e)]('Invalid\x20value\x20for\x20\x22'+_0x52d427+_0x5b1412(0x9c)+ENUM_KEYS[_0x52d427][_0x5b1412(0x71)](',\x20'));if(_0x52d427===_0x5b1412(0x74))throw CliErrors[_0x5b1412(0x9e)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x52d427==='pageSize'){const _0x5ded6f=Number(_0x22d2ea);if(isNaN(_0x5ded6f)||_0x5ded6f<=0x0)throw CliErrors[_0x5b1412(0x9e)](_0x5b1412(0x7a));}const _0x4f1a3c=resolveWriteScope({'explicitGlobal':_0x30ef8a[_0x5b1412(0x97)](_0x5b1412(0x95)),'policy':_0x5b1412(0x8f)}),_0x45392a=toScopeFlags(_0x4f1a3c),_0x46ad07=readScopedConfig(_0x45392a),_0x14e4fd=parseAliasAppcodeSetKey(_0x52d427);if(!_0x14e4fd&&!isTopLevelConfigKey(_0x52d427))throw CliErrors[_0x5b1412(0x9e)]('Top-level\x20key\x20\x22'+_0x52d427+_0x5b1412(0x85),_0x5b1412(0x79)+getTopLevelConfigKeySummary()+_0x5b1412(0x98));return _0x14e4fd?setLocalAppAlias(_0x46ad07,_0x14e4fd,_0x22d2ea):_0x46ad07[_0x52d427]=_0x52d427===_0x5b1412(0xa9)?Number(_0x22d2ea):_0x22d2ea,console[_0x5b1412(0xa3)](_0x5b1412(0x84)+_0x52d427+_0x5b1412(0x9d)+_0x22d2ea+'\x22'+(_0x4f1a3c===_0x5b1412(0x95)?'\x20(global)':'')),writeScopedConfig(_0x46ad07,_0x45392a),{'ok':!![]};}},deleteDef={'service':a14_0x43e9f4(0x80),'command':a14_0x43e9f4(0x99),'description':a14_0x43e9f4(0x8a),'risk':a14_0x43e9f4(0xa0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x43e9f4(0xab),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x7f96e1){const _0x41281e=a14_0x43e9f4,_0x1761b4=_0x7f96e1[_0x41281e(0x7d)][0x0];if(!_0x1761b4)throw CliErrors[_0x41281e(0x9e)](_0x41281e(0x76),_0x41281e(0x9b)+CLI_BIN_NAME+_0x41281e(0x78));const _0x50722e=resolveWriteScope({'explicitGlobal':_0x7f96e1[_0x41281e(0x97)]('global'),'policy':'project-or-global-explicit'}),_0x5cc444=toScopeFlags(_0x50722e),_0x194b66=readScopedConfig(_0x5cc444),_0x3e699f=parseAliasDeleteKey(_0x1761b4);if(_0x3e699f){if(!deleteLocalAppAlias(_0x194b66,_0x3e699f))throw CliErrors[_0x41281e(0x9e)](_0x41281e(0x94)+_0x1761b4);return console[_0x41281e(0xa3)](_0x41281e(0x77)+_0x1761b4+'`'+(_0x50722e===_0x41281e(0x95)?_0x41281e(0x90):'')),writeScopedConfig(_0x194b66,_0x5cc444),{'ok':!![]};}if(_0x194b66[_0x1761b4]===undefined)throw CliErrors[_0x41281e(0x9e)](_0x41281e(0xa7)+_0x1761b4+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x194b66[_0x1761b4],console['log'](_0x41281e(0x77)+_0x1761b4+'`'+(_0x50722e==='global'?_0x41281e(0x90):'')),writeScopedConfig(_0x194b66,_0x5cc444),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a14_0x82bfb9=a14_0x52cd;(function(_0x4fa893,_0x5ee4a3){const _0x17e893=a14_0x52cd,_0xf7c523=_0x4fa893();while(!![]){try{const _0xac93b3=-parseInt(_0x17e893(0xcd))/0x1+-parseInt(_0x17e893(0xbc))/0x2+parseInt(_0x17e893(0xe5))/0x3*(-parseInt(_0x17e893(0xbe))/0x4)+parseInt(_0x17e893(0xdb))/0x5*(parseInt(_0x17e893(0xd2))/0x6)+-parseInt(_0x17e893(0xce))/0x7*(-parseInt(_0x17e893(0xf9))/0x8)+parseInt(_0x17e893(0xf6))/0x9*(parseInt(_0x17e893(0xee))/0xa)+-parseInt(_0x17e893(0xfe))/0xb*(-parseInt(_0x17e893(0xef))/0xc);if(_0xac93b3===_0x5ee4a3)break;else _0xf7c523['push'](_0xf7c523['shift']());}catch(_0x5d7fe8){_0xf7c523['push'](_0xf7c523['shift']());}}}(a14_0x396f,0xadb9d));function a14_0x396f(){const _0x5e923a=['pretty','Key\x20not\x20found:\x20','Config\x20files:\x0a','bool','riskLevel','pageSize','Missing\x20key\x20argument.','15270bKtJNu','config','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Value\x20to\x20assign','isArray','read','trim','value','global','1049980iRLvXg','276eQdKtD','pageSize\x20must\x20be\x20a\x20positive\x20number','apps','length','field','\x20config\x20delete\x20<key>\x20[--global]','Set\x20`','72WSozYJ','Missing\x20key\x20or\x20value.','join','690968zeQMqJ','\x20(global)','raw','list','log','599478kxibWp','project-or-global-explicit','165838RyQOhj','appcode','596ibDqTP','object','\x20config\x20set\x20<key>\x20<value>\x20[--global]','delete','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','`\x20=\x20\x22','split','Deleted\x20`','boolean','get','../../context.js','Delete\x20a\x20config\x20value','write','stringify','Key\x20\x22','1230172lxZgVO','49icBwxU','validation','format','alias','18RZjygi','set','key','\x20config\x20get\x20<key>','List\x20current\x20config','Usage:\x20','keys','args','\x22\x20is\x20not\x20settable.','141745VpQsxJ','\x22.\x20Allowed:\x20','\x22\x20not\x20found\x20at\x20top\x20level.'];a14_0x396f=function(){return _0x5e923a;};return a14_0x396f();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a14_0x82bfb9(0xed),'type':a14_0x82bfb9(0xc6),'description':'Write\x20to\x20global\x20config','default':![]};function parseAliasAppcodeSetKey(_0x271f60){const _0x5eed15=a14_0x82bfb9,_0x4c2357=_0x271f60[_0x5eed15(0xc4)]('.');if(_0x4c2357['length']!==0x3||_0x4c2357[0x0]!==_0x5eed15(0xf1)||_0x4c2357[0x2]!=='appcode')return undefined;const _0x56065b=_0x4c2357[0x1]?.[_0x5eed15(0xeb)]();return _0x56065b?_0x56065b:undefined;}function parseAliasDeleteKey(_0x1b4a2c){const _0x40c7bb=a14_0x82bfb9,_0x25472e=_0x1b4a2c['split']('.');if(_0x25472e[_0x40c7bb(0xf2)]===0x2&&_0x25472e[0x0]===_0x40c7bb(0xf1)){const _0x297e0e=_0x25472e[0x1]?.[_0x40c7bb(0xeb)]();return _0x297e0e?{'alias':_0x297e0e}:undefined;}if(_0x25472e[_0x40c7bb(0xf2)]===0x3&&_0x25472e[0x0]===_0x40c7bb(0xf1)&&_0x25472e[0x2]==='appcode'){const _0x37f1a7=_0x25472e[0x1]?.['trim']();return _0x37f1a7?{'alias':_0x37f1a7,'field':_0x40c7bb(0xbd)}:undefined;}return undefined;}function setLocalAppAlias(_0x443611,_0x2bb412,_0x402a7a){const _0x192052=a14_0x82bfb9,_0x49d12a=_0x443611[_0x192052(0xf1)]&&typeof _0x443611[_0x192052(0xf1)]===_0x192052(0xbf)&&!Array['isArray'](_0x443611[_0x192052(0xf1)])?_0x443611['apps']:{},_0x22c8a5=_0x49d12a[_0x2bb412]&&typeof _0x49d12a[_0x2bb412]===_0x192052(0xbf)&&!Array[_0x192052(0xe9)](_0x49d12a[_0x2bb412])?_0x49d12a[_0x2bb412]:{};_0x22c8a5[_0x192052(0xbd)]=_0x402a7a,_0x49d12a[_0x2bb412]=_0x22c8a5,_0x443611['apps']=_0x49d12a;}function a14_0x52cd(_0x408018,_0x55d789){_0x408018=_0x408018-0xbb;const _0x396fa5=a14_0x396f();let _0x52cdbd=_0x396fa5[_0x408018];return _0x52cdbd;}function deleteLocalAppAlias(_0x523bdf,_0x2b969c){const _0x37f6bb=a14_0x82bfb9;if(!_0x523bdf[_0x37f6bb(0xf1)]||typeof _0x523bdf[_0x37f6bb(0xf1)]!=='object'||Array[_0x37f6bb(0xe9)](_0x523bdf[_0x37f6bb(0xf1)]))return![];const _0xee3ca=_0x523bdf[_0x37f6bb(0xf1)],_0x1296ff=_0xee3ca[_0x2b969c['alias']];if(!_0x1296ff||typeof _0x1296ff!=='object'||Array[_0x37f6bb(0xe9)](_0x1296ff))return![];if(!_0x2b969c['field'])return delete _0xee3ca[_0x2b969c[_0x37f6bb(0xd1)]],!![];if(!(_0x2b969c[_0x37f6bb(0xf3)]in _0x1296ff))return![];return delete _0x1296ff[_0x2b969c[_0x37f6bb(0xf3)]],Object[_0x37f6bb(0xd8)](_0x1296ff)[_0x37f6bb(0xf2)]===0x0&&delete _0xee3ca[_0x2b969c['alias']],!![];}const listDef={'service':a14_0x82bfb9(0xe6),'command':a14_0x82bfb9(0xfc),'description':a14_0x82bfb9(0xd6),'risk':a14_0x82bfb9(0xea),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x12446a){const _0x48817c=a14_0x82bfb9,{buildConfigFromFlags:_0x21d85e}=await import(_0x48817c(0xc8)),_0x7fe22f=_0x21d85e({}),_0x13da10=getProjectConfigPath(),_0x347c50=resolveWriteConfigPath('global');if(_0x12446a[_0x48817c(0xd0)]===_0x48817c(0xde))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x48817c(0xcb)](_0x7fe22f['raw'],null,0x2)+'\x0a\x0a')+_0x48817c(0xe0)+('\x20\x20project:\x20'+(_0x13da10??'(none)')+'\x0a')+('\x20\x20global:\x20\x20'+_0x347c50)};return{'ok':!![],'data':{'effective':_0x7fe22f[_0x48817c(0xfb)],'configFiles':{'project':_0x13da10??null,'global':_0x347c50}}};}},getDef={'service':a14_0x82bfb9(0xe6),'command':a14_0x82bfb9(0xc7),'description':'Get\x20a\x20config\x20value','risk':a14_0x82bfb9(0xea),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a14_0x82bfb9(0xc2),'required':!![]}],'flags':[],async 'execute'(_0x3a297e){const _0x56008a=a14_0x82bfb9,_0x1ec6d7=_0x3a297e[_0x56008a(0xd9)][0x0];if(!_0x1ec6d7)throw CliErrors['validation']('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x56008a(0xd5));const {buildConfigFromFlags:_0x10889f}=await import('../../context.js'),{raw:_0x4310f2}=_0x10889f({});if(_0x1ec6d7['includes']('.')){const _0x5dcb1a=_0x1ec6d7['split']('.');let _0x3581a4=_0x4310f2;for(const _0x29467b of _0x5dcb1a){if(_0x3581a4==null||typeof _0x3581a4!==_0x56008a(0xbf))throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x1ec6d7);_0x3581a4=_0x3581a4[_0x29467b];}if(_0x3581a4===undefined)throw CliErrors[_0x56008a(0xcf)]('Key\x20not\x20found:\x20'+_0x1ec6d7);return console['log'](typeof _0x3581a4===_0x56008a(0xbf)?JSON[_0x56008a(0xcb)](_0x3581a4,null,0x2):String(_0x3581a4)),{'ok':!![]};}const _0x25301b=_0x4310f2[_0x1ec6d7];if(_0x25301b===undefined)throw CliErrors[_0x56008a(0xcf)]('Key\x20not\x20found:\x20'+_0x1ec6d7);return console[_0x56008a(0xfd)](typeof _0x25301b===_0x56008a(0xbf)?JSON[_0x56008a(0xcb)](_0x25301b,null,0x2):String(_0x25301b)),{'ok':!![]};}},setDef={'service':a14_0x82bfb9(0xe6),'command':a14_0x82bfb9(0xd3),'description':'Set\x20a\x20config\x20value','risk':a14_0x82bfb9(0xca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x82bfb9(0xd4),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x82bfb9(0xec),'description':a14_0x82bfb9(0xe8),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x56bda1){const _0x16134e=a14_0x82bfb9,_0xb050c5=_0x56bda1[_0x16134e(0xd9)][0x0],_0x31b3e6=_0x56bda1[_0x16134e(0xd9)][0x1];if(!_0xb050c5||_0x31b3e6===undefined)throw CliErrors[_0x16134e(0xcf)](_0x16134e(0xf7),'Usage:\x20'+CLI_BIN_NAME+_0x16134e(0xc0));if(ENUM_KEYS[_0xb050c5]&&!ENUM_KEYS[_0xb050c5]['includes'](_0x31b3e6))throw CliErrors[_0x16134e(0xcf)]('Invalid\x20value\x20for\x20\x22'+_0xb050c5+_0x16134e(0xdc)+ENUM_KEYS[_0xb050c5][_0x16134e(0xf8)](',\x20'));if(_0xb050c5===_0x16134e(0xe2))throw CliErrors[_0x16134e(0xcf)](_0x16134e(0xe7));if(_0xb050c5===_0x16134e(0xe3)){const _0x24220e=Number(_0x31b3e6);if(isNaN(_0x24220e)||_0x24220e<=0x0)throw CliErrors['validation'](_0x16134e(0xf0));}const _0x14d567=resolveWriteScope({'explicitGlobal':_0x56bda1[_0x16134e(0xe1)](_0x16134e(0xed)),'policy':'project-or-global-explicit'}),_0x534996=toScopeFlags(_0x14d567),_0x35deb0=readScopedConfig(_0x534996),_0x51f49a=parseAliasAppcodeSetKey(_0xb050c5);if(!_0x51f49a&&!isTopLevelConfigKey(_0xb050c5))throw CliErrors[_0x16134e(0xcf)]('Top-level\x20key\x20\x22'+_0xb050c5+_0x16134e(0xda),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x51f49a?setLocalAppAlias(_0x35deb0,_0x51f49a,_0x31b3e6):_0x35deb0[_0xb050c5]=_0xb050c5==='pageSize'?Number(_0x31b3e6):_0x31b3e6,console[_0x16134e(0xfd)](_0x16134e(0xf5)+_0xb050c5+_0x16134e(0xc3)+_0x31b3e6+'\x22'+(_0x14d567===_0x16134e(0xed)?'\x20(global)':'')),writeScopedConfig(_0x35deb0,_0x534996),{'ok':!![]};}},deleteDef={'service':a14_0x82bfb9(0xe6),'command':a14_0x82bfb9(0xc1),'description':a14_0x82bfb9(0xc9),'risk':a14_0x82bfb9(0xca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x82bfb9(0xd4),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4b784c){const _0x1b251a=a14_0x82bfb9,_0x1d0875=_0x4b784c[_0x1b251a(0xd9)][0x0];if(!_0x1d0875)throw CliErrors['validation'](_0x1b251a(0xe4),_0x1b251a(0xd7)+CLI_BIN_NAME+_0x1b251a(0xf4));const _0x3a5e8c=resolveWriteScope({'explicitGlobal':_0x4b784c[_0x1b251a(0xe1)](_0x1b251a(0xed)),'policy':_0x1b251a(0xbb)}),_0x5238bd=toScopeFlags(_0x3a5e8c),_0x426a77=readScopedConfig(_0x5238bd),_0x11e125=parseAliasDeleteKey(_0x1d0875);if(_0x11e125){if(!deleteLocalAppAlias(_0x426a77,_0x11e125))throw CliErrors['validation'](_0x1b251a(0xdf)+_0x1d0875);return console[_0x1b251a(0xfd)](_0x1b251a(0xc5)+_0x1d0875+'`'+(_0x3a5e8c===_0x1b251a(0xed)?'\x20(global)':'')),writeScopedConfig(_0x426a77,_0x5238bd),{'ok':!![]};}if(_0x426a77[_0x1d0875]===undefined)throw CliErrors[_0x1b251a(0xcf)](_0x1b251a(0xcc)+_0x1d0875+_0x1b251a(0xdd));return delete _0x426a77[_0x1d0875],console['log']('Deleted\x20`'+_0x1d0875+'`'+(_0x3a5e8c==='global'?_0x1b251a(0xfa):'')),writeScopedConfig(_0x426a77,_0x5238bd),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa4d4a9,_0x581d6d){var _0x461fee=a15_0x18e3,_0x1ebb4d=_0xa4d4a9();while(!![]){try{var _0x364a18=-parseInt(_0x461fee(0x80))/0x1+-parseInt(_0x461fee(0x84))/0x2+-parseInt(_0x461fee(0x7e))/0x3+parseInt(_0x461fee(0x82))/0x4*(-parseInt(_0x461fee(0x83))/0x5)+parseInt(_0x461fee(0x85))/0x6+parseInt(_0x461fee(0x7f))/0x7*(-parseInt(_0x461fee(0x81))/0x8)+parseInt(_0x461fee(0x7d))/0x9*(parseInt(_0x461fee(0x86))/0xa);if(_0x364a18===_0x581d6d)break;else _0x1ebb4d['push'](_0x1ebb4d['shift']());}catch(_0x227502){_0x1ebb4d['push'](_0x1ebb4d['shift']());}}}(a15_0x1fcd,0x8f98b));function a15_0x1fcd(){var _0x106d55=['2323416NGwIFC','70DrheIM','3542967Fulxcw','2835648CdbcFB','79751evBgUw','151852OXrsSD','144QwHkjm','12VNntWy','961715fGitqM','1351070zApkPI'];a15_0x1fcd=function(){return _0x106d55;};return a15_0x1fcd();}function a15_0x18e3(_0xcec536,_0x1ae996){_0xcec536=_0xcec536-0x7d;var _0x1fcd12=a15_0x1fcd();var _0x18e347=_0x1fcd12[_0xcec536];return _0x18e347;}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
|