@lovrabet/lovrabet-cli 2.0.9-beta.2 → 2.0.9-beta.3
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 -2
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
(function(_0xec9b65,_0xca220c){const _0x19a3ee=a0_0x4332,_0x5226e9=_0xec9b65();while(!![]){try{const _0x5f3d3d=parseInt(_0x19a3ee(0x1dc))/0x1+-parseInt(_0x19a3ee(0x1fb))/0x2+-parseInt(_0x19a3ee(0x1ea))/0x3*(-parseInt(_0x19a3ee(0x1f0))/0x4)+parseInt(_0x19a3ee(0x1f2))/0x5+-parseInt(_0x19a3ee(0x1ee))/0x6+-parseInt(_0x19a3ee(0x1f1))/0x7+-parseInt(_0x19a3ee(0x1fc))/0x8*(-parseInt(_0x19a3ee(0x1f7))/0x9);if(_0x5f3d3d===_0xca220c)break;else _0x5226e9['push'](_0x5226e9['shift']());}catch(_0x290770){_0x5226e9['push'](_0x5226e9['shift']());}}}(a0_0x2bba,0x220f9));import{jsx as a0_0x237b34}from'react/jsx-runtime';import a0_0x47989c 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';function a0_0x2bba(){const _0x2a0916=['flatMap','handler','508863aWGBgr','defaultCommand','./framework/preparse.js',':\x20--','952740cQRTdk','[preparse]\x20','4ALFtUT','251440whmluQ','715835XgnzNV','code','original','Hint:\x20','stderr','909txaFRS','Unexpected\x20error:','args','exit','554970lxIjHg','18584CKDLZb','name','length','ERR_STREAM_DESTROYED','log','64297NFmShu','error','write','slice','input','help','assign','hint','Error:\x20','unknownCommand','ERR_USE_AFTER_CLOSE','exitCode'];a0_0x2bba=function(){return _0x2a0916;};return a0_0x2bba();}import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x47989c(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x44a129){handleError(_0x44a129);}}function a0_0x4332(_0x1d7c42,_0x17f07c){_0x1d7c42=_0x1d7c42-0x1dc;const _0x2bbaac=a0_0x2bba();let _0x4332d7=_0x2bbaac[_0x1d7c42];return _0x4332d7;}async function run(){const _0x38a02b=a0_0x4332;let _0x14e93a=cli[_0x38a02b(0x1e0)][0x0],_0x41ed17=cli[_0x38a02b(0x1e0)][0x1];const _0x17a20f=cli['flags'];try{const {correctFlags:_0x8840ae}=await import(_0x38a02b(0x1ec)),_0x10375a=getAllDefinitions()[_0x38a02b(0x1e8)](_0x152b51=>_0x152b51['flags']??[]),{flags:_0x356817,corrections:_0x2fa037}=_0x8840ae(_0x17a20f,_0x10375a);if(_0x2fa037[_0x38a02b(0x1fe)]>0x0){for(const _0x293e89 of _0x2fa037){process[_0x38a02b(0x1f6)][_0x38a02b(0x1de)](_0x38a02b(0x1ef)+_0x293e89[_0x38a02b(0x1e9)]+_0x38a02b(0x1ed)+_0x293e89[_0x38a02b(0x1f4)]+'\x20->\x20--'+_0x293e89['corrected']+'\x0a');}Object[_0x38a02b(0x1e2)](_0x17a20f,_0x356817);}}catch{}if(!_0x14e93a||!isKnownService(_0x14e93a)){const {waitUntilExit:_0x10e41d}=render(a0_0x237b34(Help,{}));await _0x10e41d();return;}const _0x283f1a=getServiceEntry(_0x14e93a);if(!_0x41ed17){if(_0x17a20f[_0x38a02b(0x1e1)]){console[_0x38a02b(0x200)](generateServiceHelp(_0x14e93a));return;}if(_0x283f1a[_0x38a02b(0x1eb)])_0x41ed17=_0x283f1a['defaultCommand'];else{console[_0x38a02b(0x200)](generateServiceHelp(_0x14e93a));return;}}const _0x229069=findDefinition(_0x14e93a,_0x41ed17);!_0x229069&&(console[_0x38a02b(0x200)](generateServiceHelp(_0x14e93a)),handleError(CliErrors[_0x38a02b(0x1e5)](_0x14e93a+'\x20'+_0x41ed17)));if(_0x17a20f[_0x38a02b(0x1e1)]){console[_0x38a02b(0x200)](generateCommandHelp(_0x229069));return;}const _0x3eb0cd=buildConfigFromFlags(_0x17a20f);await initGlobalEnvironment(_0x3eb0cd);const _0x3879a9=createPipelineEnv(_0x3eb0cd,_0x17a20f);_0x3879a9[_0x38a02b(0x1f9)]=cli[_0x38a02b(0x1e0)][_0x38a02b(0x1df)](0x2),await runCommand(_0x229069,_0x3879a9);}function handleError(_0x462652){const _0x521202=a0_0x4332;if(_0x462652 instanceof CliError){_0x462652[_0x521202(0x1f3)]==='cancelled'&&(process[_0x521202(0x1f6)]['write']('\x0aCancelled.\x0a'),process[_0x521202(0x1fa)](0x0));console[_0x521202(0x1dd)](_0x521202(0x1e4)+_0x462652['message']);if(_0x462652[_0x521202(0x1e3)])console[_0x521202(0x1dd)](_0x521202(0x1f5)+_0x462652[_0x521202(0x1e3)]);process[_0x521202(0x1fa)](_0x462652[_0x521202(0x1e7)]);}isUserCancellation(_0x462652)&&(process['stderr']['write']('\x0aCancelled.\x0a'),process[_0x521202(0x1fa)](0x0)),console[_0x521202(0x1dd)](_0x521202(0x1f8),_0x462652),process[_0x521202(0x1fa)](0x1);}function isUserCancellation(_0x23c69e){const _0x4ea85=a0_0x4332;if(!(_0x23c69e instanceof Error))return![];if(_0x23c69e[_0x4ea85(0x1fd)]==='ExitPromptError')return!![];if(_0x23c69e[_0x4ea85(0x1f3)]===_0x4ea85(0x1e6))return!![];if(_0x23c69e[_0x4ea85(0x1f3)]===_0x4ea85(0x1ff))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a1_0x457d(_0x38375b,_0x549734){_0x38375b=_0x38375b-0x15e;const _0x57beb4=a1_0x57be();let _0x457d61=_0x57beb4[_0x38375b];return _0x457d61;}(function(_0x3026dc,_0x5e80e3){const _0x52d446=a1_0x457d,_0x51bea2=_0x3026dc();while(!![]){try{const _0x4c94e8=-parseInt(_0x52d446(0x171))/0x1+-parseInt(_0x52d446(0x177))/0x2*(parseInt(_0x52d446(0x17c))/0x3)+parseInt(_0x52d446(0x173))/0x4*(parseInt(_0x52d446(0x175))/0x5)+-parseInt(_0x52d446(0x178))/0x6*(-parseInt(_0x52d446(0x16c))/0x7)+-parseInt(_0x52d446(0x15f))/0x8+parseInt(_0x52d446(0x172))/0x9+parseInt(_0x52d446(0x16d))/0xa*(parseInt(_0x52d446(0x169))/0xb);if(_0x4c94e8===_0x5e80e3)break;else _0x51bea2['push'](_0x51bea2['shift']());}catch(_0xf8c64b){_0x51bea2['push'](_0x51bea2['shift']());}}}(a1_0x57be,0x8d649));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';export function fingerprintAccessKey(_0x2375ce){const _0x2729a7=a1_0x457d,_0x4cb956=_0x2375ce['trim'](),_0x366521=_0x4cb956[_0x2729a7(0x179)](-0x6)||_0x2729a7(0x165),_0x4639b9=createHash(_0x2729a7(0x174))[_0x2729a7(0x17a)](_0x4cb956)[_0x2729a7(0x16f)](_0x2729a7(0x161))[_0x2729a7(0x179)](0x0,0xc);return _0x2729a7(0x168)+_0x366521+'_'+_0x4639b9;}function a1_0x57be(){const _0xe539b2=['EPERM','digest','EACCES','897296UCoOUg','7344009DKEeht','2848bGwwpo','sha256','6490qchksm','stringify','172284ftWmrJ','2051190Ootclo','slice','update','my-apps.json','30fgUjUs','code','homeDirName','3576400AARQxD','appCode','hex','EXDEV','items','trim','unknown','cache','utf8','ak_','3971044AmKJGl','.tmp','appName','14mGdWoo','10HyApGj'];a1_0x57be=function(){return _0xe539b2;};return a1_0x57be();}export function getAppCacheFilePath(_0x2d771d,_0x479404){const _0x5924b0=a1_0x457d;return resolve(homedir(),PRODUCT_CONFIG[_0x5924b0(0x15e)],_0x5924b0(0x166),_0x2d771d,fingerprintAccessKey(_0x479404),_0x5924b0(0x17b));}export function readCachedAppList(_0xc490d5,_0xc5d005){const _0x2d3008=a1_0x457d;if(!_0xc5d005?.[_0x2d3008(0x164)]())return null;const _0x5d5e0d=getAppCacheFilePath(_0xc490d5,_0xc5d005);if(!existsSync(_0x5d5e0d))return null;try{const _0x274e1a=readFileSync(_0x5d5e0d,_0x2d3008(0x167));if(!_0x274e1a[_0x2d3008(0x164)]())return null;const _0x5366b6=JSON['parse'](_0x274e1a);if(!Array['isArray'](_0x5366b6[_0x2d3008(0x163)]))return null;return _0x5366b6;}catch{return null;}}export function writeCachedAppList(_0x356707,_0xe7ab,_0x583d05){const _0x45b37f=a1_0x457d,_0x39beb3=getAppCacheFilePath(_0x356707,_0xe7ab),_0x19f498=dirname(_0x39beb3);!existsSync(_0x19f498)&&mkdirSync(_0x19f498,{'recursive':!![]});const _0xda2a52=_0x39beb3+_0x45b37f(0x16a);try{writeFileSync(_0xda2a52,JSON[_0x45b37f(0x176)](_0x583d05,null,0x2)+'\x0a',{'encoding':_0x45b37f(0x167),'mode':0x180});try{renameSync(_0xda2a52,_0x39beb3);}catch(_0x3c723e){if(_0x3c723e['code']===_0x45b37f(0x16e)||_0x3c723e[_0x45b37f(0x17d)]===_0x45b37f(0x162)||_0x3c723e[_0x45b37f(0x17d)]===_0x45b37f(0x170)){writeFileSync(_0x39beb3,JSON[_0x45b37f(0x176)](_0x583d05,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0xda2a52);}catch{}}else throw _0x3c723e;}}catch(_0xa0692){try{unlinkSync(_0xda2a52);}catch{}throw _0xa0692;}return _0x39beb3;}export function resolveCachedAppCode(_0x3e9f72,_0x471c7b,_0x2cd2b7){const _0x48eee2=a1_0x457d;if(!_0x3e9f72)return undefined;const _0x364745=readCachedAppList(_0x471c7b,_0x2cd2b7),_0x2a36b7=_0x364745?.[_0x48eee2(0x163)]['find'](_0x280785=>_0x280785[_0x48eee2(0x16b)]===_0x3e9f72);return _0x2a36b7?.[_0x48eee2(0x160)]?.[_0x48eee2(0x164)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x1fbf87=a2_0x3cc3;(function(_0x3989ef,_0x20a215){const _0x35fe0f=a2_0x3cc3,_0x52a0cf=_0x3989ef();while(!![]){try{const _0xc29b9=parseInt(_0x35fe0f(0x143))/0x1+-parseInt(_0x35fe0f(0x11b))/0x2+parseInt(_0x35fe0f(0x13c))/0x3*(parseInt(_0x35fe0f(0x15f))/0x4)+parseInt(_0x35fe0f(0x160))/0x5*(-parseInt(_0x35fe0f(0x166))/0x6)+parseInt(_0x35fe0f(0x120))/0x7*(-parseInt(_0x35fe0f(0x158))/0x8)+parseInt(_0x35fe0f(0x152))/0x9+parseInt(_0x35fe0f(0x12c))/0xa;if(_0xc29b9===_0x20a215)break;else _0x52a0cf['push'](_0x52a0cf['shift']());}catch(_0x2db103){_0x52a0cf['push'](_0x52a0cf['shift']());}}}(a2_0x4246,0x7851e));import{CliErrors}from'../../errors.js';function a2_0x4246(){const _0x35053f=['appName','Initialize\x20','pull','appPublishStatus','No\x20apps\x20found\x20on\x20the\x20platform.','Set\x20the\x20fallback\x20app\x20candidate','items','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','appCode','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','2482803FIIxDf','envName','\x22\x20not\x20found.','Use\x20global\x20config\x20scope','name','bool','1160rPnkcZ','init','projectPath','newConfigFileName','App\x20\x22','validation','write','53260JVIkgY','298525apbRmH','Usage:\x20','../../context.js','str','Target\x20environment\x20(default:\x20current\x20env)','\x20app(s)\x20for\x20env=\x22','30RznLEE','source','Missing\x20app\x20name.','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','local','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Remote\x20app\x20name\x20to\x20activate','map','\x20cached\x20app(s)\x20for\x20env=\x22','.appcode\x20to\x20.lovrabet.json.','env','\x20app\x20use\x20<name>\x20[--global]','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','push','from','366636LGlomD','../../commands/app/remote-source.js','args','app','project-default','33992dYUMnD','raw','boolean','fetchedAt','no-cache','join','../../commands/app/cache.js','length','defaultApp','isCurrent','type','appcode','7572350WyZLmR','\x20config\x20file','Use\x20`','Default\x20app\x20candidate\x20set\x20to\x20\x22','Available\x20remote\x20apps:\x20','string','list','trim','nonInteractive','find','cache','globalPath','production','global','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','config','111NxQJQo','import','appOwnerName','entries','accessKey','No\x20cached\x20apps\x20found.','Read\x20app\x20list\x20from\x20local\x20cache\x20only','153036GHZWVA','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','remote','mergedCli','Refreshed\x20app\x20cache\x20with\x20'];a2_0x4246=function(){return _0x35053f;};return a2_0x4246();}import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';function a2_0x3cc3(_0x42f081,_0x4be601){_0x42f081=_0x42f081-0x10d;const _0x4246f5=a2_0x4246();let _0x3cc342=_0x4246f5[_0x42f081];return _0x3cc342;}import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':a2_0x1fbf87(0x139),'type':a2_0x1fbf87(0x122),'description':a2_0x1fbf87(0x155),'default':![]};function collectFlags(_0x2b547f,_0x4d0da5){const _0x57e909=a2_0x1fbf87,_0x11231c={};for(const _0x3040f9 of _0x4d0da5){const _0x21e138=_0x3040f9[_0x57e909(0x12a)]===_0x57e909(0x122)?_0x2b547f[_0x57e909(0x157)](_0x3040f9[_0x57e909(0x156)]):_0x2b547f[_0x57e909(0x163)](_0x3040f9[_0x57e909(0x156)]);if(_0x21e138!==''&&_0x21e138!==![])_0x11231c[_0x3040f9['name']]=_0x21e138;}if(_0x2b547f[_0x57e909(0x134)])_0x11231c['nonInteractive']=!![];return _0x11231c;}const initDef={'service':'app','command':a2_0x1fbf87(0x159),'description':a2_0x1fbf87(0x149)+PRODUCT_CONFIG[a2_0x1fbf87(0x15b)]+a2_0x1fbf87(0x12d),'risk':a2_0x1fbf87(0x15e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x2d05b9){return await runInit(collectFlags(_0x2d05b9,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x1fbf87(0x11e),'command':a2_0x1fbf87(0x132),'description':a2_0x1fbf87(0x10f),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x1fbf87(0x116),'type':'string','description':a2_0x1fbf87(0x111),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x1fbf87(0x110),'type':a2_0x1fbf87(0x122),'description':a2_0x1fbf87(0x142),'default':![]},{'name':a2_0x1fbf87(0x124),'type':a2_0x1fbf87(0x122),'description':a2_0x1fbf87(0x144),'default':![]}],async 'execute'(_0x142c58){const _0x1dbb6e=a2_0x1fbf87,_0x2ba2bd=_0x142c58[_0x1dbb6e(0x163)](_0x1dbb6e(0x116))||_0x142c58[_0x1dbb6e(0x153)]||getEnv()||_0x1dbb6e(0x138),_0x2be729=_0x142c58[_0x1dbb6e(0x157)](_0x1dbb6e(0x110)),_0x57e01e=_0x142c58[_0x1dbb6e(0x157)](_0x1dbb6e(0x124)),{readRawConfigWithLayers:_0x13e2c0,resolveDefaultAppSource:_0x1e26f2,getLocalAppAliases:_0x2ce305}=await import(_0x1dbb6e(0x162)),{getRemoteAppList:_0xe31e84}=await import(_0x1dbb6e(0x11c)),{config:_0xb43d51,layers:_0x5a2e41}=_0x13e2c0(),_0x26871a=_0x1e26f2(_0x5a2e41),{defaultApp:_0x4ac8fa}=_0xb43d51,_0x38c0a7=await _0xe31e84({'env':_0x2ba2bd,'accessKey':_0x142c58['accessKey'],'localOnly':_0x2be729,'noCache':_0x57e01e}),_0x52dd65=_0x38c0a7[_0x1dbb6e(0x14e)][_0x1dbb6e(0x113)](_0x1f5fa2=>{const _0x3b7f55=_0x1dbb6e;return{'name':_0x1f5fa2[_0x3b7f55(0x148)],'appcode':_0x1f5fa2[_0x3b7f55(0x150)],'named':!![],'definedIn':_0x3b7f55(0x145),'isDefault':_0x1f5fa2[_0x3b7f55(0x148)]===_0x4ac8fa,...buildAppProfileListFields(_0x2ba2bd),'source':_0x38c0a7[_0x3b7f55(0x10d)],'owner':_0x1f5fa2[_0x3b7f55(0x13e)]??null,'status':_0x1f5fa2[_0x3b7f55(0x14b)]??null,'cachedAt':_0x38c0a7['fetchedAt']};}),_0x1aaeb6=_0x2ce305(_0xb43d51);let _0xa50320=0x0;for(const [_0x91d7d2,_0x19a40b]of Object[_0x1dbb6e(0x13f)](_0x1aaeb6)){const _0x28e2a=typeof _0x19a40b[_0x1dbb6e(0x12b)]===_0x1dbb6e(0x131)?_0x19a40b[_0x1dbb6e(0x12b)][_0x1dbb6e(0x133)]():'';if(!_0x28e2a)continue;_0xa50320+=0x1,_0x52dd65[_0x1dbb6e(0x119)]({'name':_0x91d7d2,'appcode':_0x28e2a,'named':!![],'definedIn':_0x1dbb6e(0x110),'isDefault':_0x91d7d2===_0x4ac8fa,...buildAppProfileListFields(_0x2ba2bd),'source':_0x1dbb6e(0x13b),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x52dd65,_0x142c58[_0x1dbb6e(0x146)]);if(_0x52dd65['length']===0x0)return{'ok':!![],'data':[],'message':_0x38c0a7['source']===_0x1dbb6e(0x136)?_0x1dbb6e(0x141):_0x1dbb6e(0x14c)};const _0x55828f=_0x52dd65[_0x1dbb6e(0x135)](_0x10d839=>_0x10d839[_0x1dbb6e(0x129)]===!![]),_0x5f3fa2=_0x4ac8fa??_0x55828f?.[_0x1dbb6e(0x156)]??null,_0x8f80a2={'env':_0x2ba2bd,'source':_0x38c0a7['source'],'fetchedAt':_0x38c0a7[_0x1dbb6e(0x123)],'cachePath':_0x38c0a7['cachePath'],'globalPath':_0x5a2e41[_0x1dbb6e(0x137)]??null,'projectPath':_0x5a2e41[_0x1dbb6e(0x15a)]??null,'defaultApp':_0x5f3fa2,'defaultAppSource':_0x4ac8fa!=null?_0x26871a:null,'localAliasCount':_0xa50320};return{'ok':!![],'data':{'items':_0x52dd65,'meta':_0x8f80a2}};}},pullDef={'service':a2_0x1fbf87(0x11e),'command':a2_0x1fbf87(0x14a),'description':a2_0x1fbf87(0x151),'risk':a2_0x1fbf87(0x15e),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x1fbf87(0x116),'type':'string','description':a2_0x1fbf87(0x164),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x1fbf87(0x110),'type':a2_0x1fbf87(0x122),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x1fbf87(0x124),'type':a2_0x1fbf87(0x122),'description':a2_0x1fbf87(0x144),'default':![]}],async 'execute'(_0x581348){const _0x838236=a2_0x1fbf87,_0x559260=_0x581348[_0x838236(0x163)](_0x838236(0x116))||_0x581348[_0x838236(0x153)]||getEnv()||_0x838236(0x138),_0x420cd1=_0x581348['bool']('local'),_0x34447c=_0x581348[_0x838236(0x157)](_0x838236(0x124)),{getRemoteAppList:_0x5df4f6}=await import('../../commands/app/remote-source.js'),_0x419a47=await _0x5df4f6({'env':_0x559260,'accessKey':_0x581348[_0x838236(0x140)],'localOnly':_0x420cd1,'noCache':_0x34447c});return{'ok':!![],'data':{'total':_0x419a47[_0x838236(0x14e)][_0x838236(0x127)],'env':_0x559260,'source':_0x419a47[_0x838236(0x10d)],'fetchedAt':_0x419a47[_0x838236(0x123)],'cachePath':_0x419a47['cachePath']},'message':_0x419a47[_0x838236(0x10d)]===_0x838236(0x136)?'Loaded\x20'+_0x419a47[_0x838236(0x14e)]['length']+_0x838236(0x114)+_0x559260+'\x22.':_0x838236(0x147)+_0x419a47[_0x838236(0x14e)][_0x838236(0x127)]+_0x838236(0x165)+_0x559260+'\x22.'};}},useDef={'service':a2_0x1fbf87(0x11e),'command':'use','description':a2_0x1fbf87(0x14d),'risk':a2_0x1fbf87(0x15e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x1fbf87(0x156),'description':a2_0x1fbf87(0x112),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x37257d){const _0x557e9f=a2_0x1fbf87;if(!_0x37257d[_0x557e9f(0x11d)][0x0])throw CliErrors['validation'](_0x557e9f(0x10e),_0x557e9f(0x161)+CLI_BIN_NAME+_0x557e9f(0x117));},async 'execute'(_0x17e1e1){const _0x4034eb=a2_0x1fbf87,_0x42771c=_0x17e1e1[_0x4034eb(0x11d)][0x0];if(!_0x42771c)throw CliErrors[_0x4034eb(0x15d)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x4034eb(0x117));const {buildConfigFromFlags:_0x1e038e,resolveLocalAppAliasCode:_0x150373}=await import(_0x4034eb(0x162)),{readCachedAppList:_0x127cb7}=await import(_0x4034eb(0x126)),_0x124c99=_0x17e1e1[_0x4034eb(0x163)](_0x4034eb(0x116)),_0x51e715=_0x1e038e(_0x124c99?{'env':_0x124c99}:{}),_0x169c07=_0x127cb7(_0x51e715[_0x4034eb(0x116)],_0x51e715['accessKey']),_0x21bce8=_0x169c07?.[_0x4034eb(0x14e)][_0x4034eb(0x135)](_0x545c8c=>_0x545c8c[_0x4034eb(0x148)]===_0x42771c),_0x856eb=_0x150373(_0x51e715[_0x4034eb(0x121)]??{},_0x42771c);if(!_0x21bce8&&!_0x856eb&&_0x51e715['defaultApp']!==_0x42771c){const _0x5e4a2d=[..._0x169c07?.[_0x4034eb(0x14e)][_0x4034eb(0x113)](_0x25c5e1=>_0x25c5e1[_0x4034eb(0x148)])??[]],_0x40bb5b=_0x5e4a2d[_0x4034eb(0x127)]===0x0?_0x4034eb(0x12e)+CLI_BIN_NAME+_0x4034eb(0x13a)+_0x42771c+_0x4034eb(0x115):_0x4034eb(0x130)+Array[_0x4034eb(0x11a)](new Set(_0x5e4a2d))[_0x4034eb(0x125)](',\x20')+_0x4034eb(0x14f);throw CliErrors['validation'](_0x4034eb(0x15c)+_0x42771c+_0x4034eb(0x154),_0x40bb5b);}const _0x3d07c8=_0x17e1e1['bool'](_0x4034eb(0x139));let _0x396386;if(_0x3d07c8)_0x396386={'global':!![]};else{const {isInProject:_0x473b2d}=await import(_0x4034eb(0x162)),_0x5529e3=_0x473b2d();_0x396386=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x4034eb(0x11f),'inProject':_0x5529e3}));}const _0x325cde=readConfig(_0x396386);return _0x325cde[_0x4034eb(0x128)]=_0x42771c,writeConfig(_0x325cde,_0x396386),{'ok':!![],'message':_0x4034eb(0x12f)+_0x42771c+'\x22'+scopeLabel(_0x396386)+'.'};}},importDef={'service':a2_0x1fbf87(0x11e),'command':a2_0x1fbf87(0x13d),'description':a2_0x1fbf87(0x118),'risk':a2_0x1fbf87(0x15e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x22a198){return await runInitImport(collectFlags(_0x22a198,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a2_0x496a1b=a2_0x44f9;(function(_0x123d0a,_0x5ded3e){const _0x1588a7=a2_0x44f9,_0x488822=_0x123d0a();while(!![]){try{const _0x712f9=-parseInt(_0x1588a7(0x128))/0x1*(parseInt(_0x1588a7(0x135))/0x2)+-parseInt(_0x1588a7(0x157))/0x3*(-parseInt(_0x1588a7(0x125))/0x4)+parseInt(_0x1588a7(0x141))/0x5+parseInt(_0x1588a7(0x11c))/0x6+-parseInt(_0x1588a7(0x11b))/0x7+parseInt(_0x1588a7(0x124))/0x8+-parseInt(_0x1588a7(0x116))/0x9;if(_0x712f9===_0x5ded3e)break;else _0x488822['push'](_0x488822['shift']());}catch(_0x1ca801){_0x488822['push'](_0x488822['shift']());}}}(a2_0xea6c,0xd9b75));import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':a2_0x496a1b(0x11f),'type':'boolean','description':a2_0x496a1b(0x118),'default':![]};function a2_0xea6c(){const _0x1a1cd2=['appName','push','read','12921boyrTa','write','items','args','\x20config\x20file','bool','\x20cached\x20app(s)\x20for\x20env=\x22','find','boolean','from','map','no-cache','Loaded\x20','Default\x20app\x20candidate\x20set\x20to\x20\x22','pull','6093909CjyZcM','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','Use\x20global\x20config\x20scope','Usage:\x20','join','7032683idenOL','3196104JfNyJf','trim','projectPath','global','length','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','mergedCli','source','12453800jCryXn','292SVdNtW','env','Set\x20the\x20fallback\x20app\x20candidate','2eIcmhM','Target\x20environment\x20(default:\x20current\x20env)','appOwnerName','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','import','Filter\x20by\x20environment\x20(default:\x20current\x20env)','nonInteractive','name','str','app','../../commands/app/remote-source.js','isCurrent','cache','601976SqDJdj','entries','accessKey','.appcode\x20to\x20.lovrabet.json.','defaultApp','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','list','App\x20\x22','envName','config','No\x20cached\x20apps\x20found.','use','3858455BzAuoe','local','validation','Available\x20remote\x20apps:\x20','\x20app(s)\x20for\x20env=\x22','fetchedAt','Missing\x20app\x20name.','production','No\x20apps\x20found\x20on\x20the\x20platform.','cachePath','init','../../context.js','\x20app\x20use\x20<name>\x20[--global]','Use\x20`','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','appcode','string','Read\x20from\x20local\x20cache\x20only','Refreshed\x20app\x20cache\x20with\x20'];a2_0xea6c=function(){return _0x1a1cd2;};return a2_0xea6c();}function collectFlags(_0x22b537,_0x30c39d){const _0xbd7960=a2_0x496a1b,_0x3ed2d3={};for(const _0x85d4ba of _0x30c39d){const _0x5310da=_0x85d4ba['type']===_0xbd7960(0x10f)?_0x22b537[_0xbd7960(0x15c)](_0x85d4ba[_0xbd7960(0x12f)]):_0x22b537[_0xbd7960(0x130)](_0x85d4ba['name']);if(_0x5310da!==''&&_0x5310da!==![])_0x3ed2d3[_0x85d4ba[_0xbd7960(0x12f)]]=_0x5310da;}if(_0x22b537[_0xbd7960(0x12e)])_0x3ed2d3[_0xbd7960(0x12e)]=!![];return _0x3ed2d3;}function a2_0x44f9(_0x262d26,_0x11ccda){_0x262d26=_0x262d26-0x10f;const _0xea6cf0=a2_0xea6c();let _0x44f9a9=_0xea6cf0[_0x262d26];return _0x44f9a9;}const initDef={'service':a2_0x496a1b(0x131),'command':a2_0x496a1b(0x14b),'description':'Initialize\x20'+PRODUCT_CONFIG['newConfigFileName']+a2_0x496a1b(0x15b),'risk':a2_0x496a1b(0x158),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x20bd03){return await runInit(collectFlags(_0x20bd03,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x496a1b(0x131),'command':a2_0x496a1b(0x13b),'description':a2_0x496a1b(0x13a),'risk':a2_0x496a1b(0x156),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':'string','description':a2_0x496a1b(0x12d),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x496a1b(0x142),'type':'boolean','description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x496a1b(0x112),'type':a2_0x496a1b(0x10f),'description':a2_0x496a1b(0x121),'default':![]}],async 'execute'(_0x16c1bd){const _0xfad3b0=a2_0x496a1b,_0x23d17e=_0x16c1bd[_0xfad3b0(0x130)]('env')||_0x16c1bd[_0xfad3b0(0x13d)]||getEnv()||_0xfad3b0(0x148),_0x1b5784=_0x16c1bd['bool'](_0xfad3b0(0x142)),_0x163995=_0x16c1bd['bool'](_0xfad3b0(0x112)),{readRawConfigWithLayers:_0x3bdc96,resolveDefaultAppSource:_0x1d53ac,getLocalAppAliases:_0x504211}=await import(_0xfad3b0(0x14c)),{getRemoteAppList:_0x581491}=await import('../../commands/app/remote-source.js'),{config:_0x9e4de3,layers:_0x21d8d7}=_0x3bdc96(),_0x4549a4=_0x1d53ac(_0x21d8d7),{defaultApp:_0xac3141}=_0x9e4de3,_0xfe3097=await _0x581491({'env':_0x23d17e,'accessKey':_0x16c1bd[_0xfad3b0(0x137)],'localOnly':_0x1b5784,'noCache':_0x163995}),_0x335dc0=_0xfe3097[_0xfad3b0(0x159)]['map'](_0xa51140=>{const _0x781941=_0xfad3b0;return{'name':_0xa51140[_0x781941(0x154)],'appcode':_0xa51140['appCode'],'named':!![],'definedIn':'remote','isDefault':_0xa51140[_0x781941(0x154)]===_0xac3141,...buildAppProfileListFields(_0x23d17e),'source':_0xfe3097[_0x781941(0x123)],'owner':_0xa51140[_0x781941(0x12a)]??null,'status':_0xa51140['appPublishStatus']??null,'cachedAt':_0xfe3097[_0x781941(0x146)]};}),_0x162985=_0x504211(_0x9e4de3);let _0x313df4=0x0;for(const [_0x75a1e,_0x3df61a]of Object[_0xfad3b0(0x136)](_0x162985)){const _0x4468d5=typeof _0x3df61a[_0xfad3b0(0x150)]===_0xfad3b0(0x151)?_0x3df61a[_0xfad3b0(0x150)][_0xfad3b0(0x11d)]():'';if(!_0x4468d5)continue;_0x313df4+=0x1,_0x335dc0[_0xfad3b0(0x155)]({'name':_0x75a1e,'appcode':_0x4468d5,'named':!![],'definedIn':_0xfad3b0(0x142),'isDefault':_0x75a1e===_0xac3141,...buildAppProfileListFields(_0x23d17e),'source':_0xfad3b0(0x13e),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x335dc0,_0x16c1bd[_0xfad3b0(0x122)]);if(_0x335dc0['length']===0x0)return{'ok':!![],'data':[],'message':_0xfe3097[_0xfad3b0(0x123)]===_0xfad3b0(0x134)?_0xfad3b0(0x13f):_0xfad3b0(0x149)};const _0x51cc9f=_0x335dc0[_0xfad3b0(0x15e)](_0x4abcc3=>_0x4abcc3[_0xfad3b0(0x133)]===!![]),_0x392b1e=_0xac3141??_0x51cc9f?.[_0xfad3b0(0x12f)]??null,_0x5a284c={'env':_0x23d17e,'source':_0xfe3097['source'],'fetchedAt':_0xfe3097['fetchedAt'],'cachePath':_0xfe3097[_0xfad3b0(0x14a)],'globalPath':_0x21d8d7['globalPath']??null,'projectPath':_0x21d8d7[_0xfad3b0(0x11e)]??null,'defaultApp':_0x392b1e,'defaultAppSource':_0xac3141!=null?_0x4549a4:null,'localAliasCount':_0x313df4};return{'ok':!![],'data':{'items':_0x335dc0,'meta':_0x5a284c}};}},pullDef={'service':a2_0x496a1b(0x131),'command':a2_0x496a1b(0x115),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a2_0x496a1b(0x151),'description':a2_0x496a1b(0x129),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x496a1b(0x142),'type':a2_0x496a1b(0x10f),'description':a2_0x496a1b(0x152),'default':![]},{'name':'no-cache','type':'boolean','description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x13c89b){const _0x668faa=a2_0x496a1b,_0x58aeea=_0x13c89b[_0x668faa(0x130)]('env')||_0x13c89b[_0x668faa(0x13d)]||getEnv()||_0x668faa(0x148),_0x262940=_0x13c89b['bool'](_0x668faa(0x142)),_0x351696=_0x13c89b[_0x668faa(0x15c)]('no-cache'),{getRemoteAppList:_0x3704cd}=await import(_0x668faa(0x132)),_0x360c0a=await _0x3704cd({'env':_0x58aeea,'accessKey':_0x13c89b[_0x668faa(0x137)],'localOnly':_0x262940,'noCache':_0x351696});return{'ok':!![],'data':{'total':_0x360c0a[_0x668faa(0x159)]['length'],'env':_0x58aeea,'source':_0x360c0a['source'],'fetchedAt':_0x360c0a['fetchedAt'],'cachePath':_0x360c0a['cachePath']},'message':_0x360c0a[_0x668faa(0x123)]===_0x668faa(0x134)?_0x668faa(0x113)+_0x360c0a[_0x668faa(0x159)][_0x668faa(0x120)]+_0x668faa(0x15d)+_0x58aeea+'\x22.':_0x668faa(0x153)+_0x360c0a[_0x668faa(0x159)][_0x668faa(0x120)]+_0x668faa(0x145)+_0x58aeea+'\x22.'};}},useDef={'service':a2_0x496a1b(0x131),'command':a2_0x496a1b(0x140),'description':a2_0x496a1b(0x127),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x496a1b(0x12f),'description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x19952b){const _0x2c8847=a2_0x496a1b;if(!_0x19952b[_0x2c8847(0x15a)][0x0])throw CliErrors[_0x2c8847(0x143)](_0x2c8847(0x147),_0x2c8847(0x119)+CLI_BIN_NAME+_0x2c8847(0x14d));},async 'execute'(_0x27ebda){const _0x57c651=a2_0x496a1b,_0x59f69f=_0x27ebda[_0x57c651(0x15a)][0x0];if(!_0x59f69f)throw CliErrors['validation'](_0x57c651(0x147),_0x57c651(0x119)+CLI_BIN_NAME+_0x57c651(0x14d));const {buildConfigFromFlags:_0x5b26d2,resolveLocalAppAliasCode:_0x1f4544}=await import(_0x57c651(0x14c)),{readCachedAppList:_0x457538}=await import('../../commands/app/cache.js'),_0x463fcf=_0x27ebda[_0x57c651(0x130)](_0x57c651(0x126)),_0x6d9951=_0x5b26d2(_0x463fcf?{'env':_0x463fcf}:{}),_0x3081a1=_0x457538(_0x6d9951['env'],_0x6d9951[_0x57c651(0x137)]),_0xfe8bcf=_0x3081a1?.['items'][_0x57c651(0x15e)](_0x3244e7=>_0x3244e7[_0x57c651(0x154)]===_0x59f69f),_0x1686df=_0x1f4544(_0x6d9951['raw']??{},_0x59f69f);if(!_0xfe8bcf&&!_0x1686df&&_0x6d9951[_0x57c651(0x139)]!==_0x59f69f){const _0x25fea2=[..._0x3081a1?.[_0x57c651(0x159)][_0x57c651(0x111)](_0x332a0a=>_0x332a0a[_0x57c651(0x154)])??[]],_0x3841a3=_0x25fea2[_0x57c651(0x120)]===0x0?_0x57c651(0x14e)+CLI_BIN_NAME+_0x57c651(0x117)+_0x59f69f+_0x57c651(0x138):_0x57c651(0x144)+Array[_0x57c651(0x110)](new Set(_0x25fea2))[_0x57c651(0x11a)](',\x20')+_0x57c651(0x14f);throw CliErrors['validation'](_0x57c651(0x13c)+_0x59f69f+'\x22\x20not\x20found.',_0x3841a3);}const _0x2970e3=_0x27ebda[_0x57c651(0x15c)]('global');let _0x5b9860;if(_0x2970e3)_0x5b9860={'global':!![]};else{const {isInProject:_0x3921ec}=await import(_0x57c651(0x14c)),_0x2588f6=_0x3921ec();_0x5b9860=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x2588f6}));}const _0x3557c8=readConfig(_0x5b9860);return _0x3557c8[_0x57c651(0x139)]=_0x59f69f,writeConfig(_0x3557c8,_0x5b9860),{'ok':!![],'message':_0x57c651(0x114)+_0x59f69f+'\x22'+scopeLabel(_0x5b9860)+'.'};}},importDef={'service':a2_0x496a1b(0x131),'command':a2_0x496a1b(0x12c),'description':a2_0x496a1b(0x12b),'risk':a2_0x496a1b(0x158),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x195495){return await runInitImport(collectFlags(_0x195495,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a69a7,_0x3e92fd){const _0x46281f=a3_0x4eeb,_0x5682b0=_0x2a69a7();while(!![]){try{const _0xd1512d=-parseInt(_0x46281f(0xe2))/0x1*(-parseInt(_0x46281f(0xdd))/0x2)+-parseInt(_0x46281f(0xd4))/0x3+-parseInt(_0x46281f(0xd7))/0x4+parseInt(_0x46281f(0xde))/0x5*(parseInt(_0x46281f(0xdb))/0x6)+-parseInt(_0x46281f(0xe0))/0x7+parseInt(_0x46281f(0xdc))/0x8+parseInt(_0x46281f(0xd2))/0x9;if(_0xd1512d===_0x3e92fd)break;else _0x5682b0['push'](_0x5682b0['shift']());}catch(_0x4ac703){_0x5682b0['push'](_0x5682b0['shift']());}}}(a3_0x43a3,0xc9dc1));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a3_0x43a3(){const _0x3321a2=['2309244hMARgp','Mock\x20API\x20error:\x20','errorCode','2656560BdWlod','parse','data','tableData','645234DTSAvC','10036760gatlEd','3522FZDunu','10NchrcU','utf-8','7448504uoUZET','../../../mock/app-list.json','827jfjUxw','3588813eAIYpR','success'];a3_0x43a3=function(){return _0x3321a2;};return a3_0x43a3();}function loadMockAppList(){const _0x133c07=a3_0x4eeb,_0xb47faf=join(__dirname,_0x133c07(0xe1)),_0x47c72c=readFileSync(_0xb47faf,_0x133c07(0xdf));return JSON[_0x133c07(0xd8)](_0x47c72c);}function a3_0x4eeb(_0x2f6f27,_0x11ba44){_0x2f6f27=_0x2f6f27-0xd2;const _0x43a347=a3_0x43a3();let _0x4eebef=_0x43a347[_0x2f6f27];return _0x4eebef;}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x5e427e=a3_0x4eeb,_0x388618=getMockAppList();if(!_0x388618[_0x5e427e(0xd3)])throw new Error(_0x5e427e(0xd5)+_0x388618['errorMsg']+'\x20('+_0x388618[_0x5e427e(0xd6)]+')');return _0x388618[_0x5e427e(0xd9)][_0x5e427e(0xda)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46ecfd,_0x2b64b6){const _0x56fee8=a4_0x5dd2,_0x4e52d6=_0x46ecfd();while(!![]){try{const _0x22d678=-parseInt(_0x56fee8(0x1dd))/0x1+-parseInt(_0x56fee8(0x1de))/0x2+parseInt(_0x56fee8(0x1d3))/0x3*(parseInt(_0x56fee8(0x1d8))/0x4)+-parseInt(_0x56fee8(0x1d7))/0x5*(-parseInt(_0x56fee8(0x1d5))/0x6)+-parseInt(_0x56fee8(0x1d9))/0x7+-parseInt(_0x56fee8(0x1d6))/0x8*(-parseInt(_0x56fee8(0x1da))/0x9)+parseInt(_0x56fee8(0x1e1))/0xa;if(_0x22d678===_0x2b64b6)break;else _0x4e52d6['push'](_0x4e52d6['shift']());}catch(_0x33bda4){_0x4e52d6['push'](_0x4e52d6['shift']());}}}(a4_0x5a40,0x52431));import{getMyApps}from'../../core/api-client.js';function a4_0x5a40(){const _0x2f904d=['cache','mock','267017ZmyYaV','416762uQtUUi','toLowerCase','remote','1312810WVHtbX','fetchedAt','items','trim','629745RsPvdQ','APP_LIST_SOURCE','18792TQLJWX','8xFcdWF','445SexkFg','8UseuTg','4347252UgLGva','5431680pPWFAf'];a4_0x5a40=function(){return _0x2f904d;};return a4_0x5a40();}import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';function a4_0x5dd2(_0x8bc4a0,_0x9369c5){_0x8bc4a0=_0x8bc4a0-0x1d3;const _0x5a408a=a4_0x5a40();let _0x5dd2b=_0x5a408a[_0x8bc4a0];return _0x5dd2b;}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x2d2576=a4_0x5dd2,_0x5a3f2c=(productEnv(_0x2d2576(0x1d4))||'')[_0x2d2576(0x1e4)]()[_0x2d2576(0x1df)]();return _0x5a3f2c===_0x2d2576(0x1dc);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x3ea454){const _0x544461=a4_0x5dd2,{env:_0x226699,accessKey:_0x5d61ed,localOnly:localOnly=![],noCache:noCache=![]}=_0x3ea454,_0x50d581=readCachedAppList(_0x226699,_0x5d61ed),_0x22db40=_0x5d61ed?.[_0x544461(0x1e4)]()?getAppCacheFilePath(_0x226699,_0x5d61ed):null;if(localOnly)return{'items':_0x50d581?.[_0x544461(0x1e3)]??[],'source':_0x544461(0x1db),'fetchedAt':_0x50d581?.[_0x544461(0x1e2)]??null,'cachePath':_0x22db40};try{const _0x30b312=await getRemoteAppItems(),_0x2c708c=shouldUseMockRemoteApps()?_0x544461(0x1dc):_0x544461(0x1e0),_0x49938c=new Date()['toISOString'](),_0x49dff1=_0x5d61ed?.[_0x544461(0x1e4)]()?writeCachedAppList(_0x226699,_0x5d61ed,{'env':_0x226699,'fetchedAt':_0x49938c,'source':_0x2c708c,'items':_0x30b312}):null;return{'items':_0x30b312,'source':_0x2c708c,'fetchedAt':_0x49938c,'cachePath':_0x49dff1};}catch(_0x3be0a6){if(!noCache&&_0x50d581)return{'items':_0x50d581[_0x544461(0x1e3)],'source':'cache','fetchedAt':_0x50d581[_0x544461(0x1e2)],'cachePath':_0x22db40};throw _0x3be0a6;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c8db5,_0x9e53e8){const _0x1c498a=a5_0x4143,_0x419f7b=_0x5c8db5();while(!![]){try{const _0x3b0994=-parseInt(_0x1c498a(0x1c0))/0x1*(-parseInt(_0x1c498a(0x1c6))/0x2)+parseInt(_0x1c498a(0x1b4))/0x3*(-parseInt(_0x1c498a(0x1b8))/0x4)+parseInt(_0x1c498a(0x1c5))/0x5+-parseInt(_0x1c498a(0x1ba))/0x6+-parseInt(_0x1c498a(0x1ca))/0x7*(-parseInt(_0x1c498a(0x1be))/0x8)+parseInt(_0x1c498a(0x1c4))/0x9*(parseInt(_0x1c498a(0x1c1))/0xa)+parseInt(_0x1c498a(0x1b6))/0xb*(-parseInt(_0x1c498a(0x1b7))/0xc);if(_0x3b0994===_0x9e53e8)break;else _0x419f7b['push'](_0x419f7b['shift']());}catch(_0xafa7aa){_0x419f7b['push'](_0x419f7b['shift']());}}}(a5_0x3593,0x439b8));import{CLI_BIN_NAME}from'../../constant/cli.js';function a5_0x3593(){const _0x167054=['find','40AYIHJi','definedIn','4694jrIjsW','5250370DbNPVU','name','defaultApp','9DEPhYH','1850950WmwwVy','62UecplW','global','named','trim','276437ZQPFex','312SGnJTe','isCurrent','1287JehUgR','66156HvepRW','2584HSKRac','currentApp','1494426BzwpmY','appcode','appCode'];a5_0x3593=function(){return _0x167054;};return a5_0x3593();}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x2df8c9,_0x603aaf){const _0x3a0e5a=a5_0x4143;if(!_0x603aaf)return;const _0x4db433=!!(_0x603aaf[_0x3a0e5a(0x1b9)]??_0x603aaf[_0x3a0e5a(0x1c3)]);for(const _0x441ebf of _0x2df8c9){_0x441ebf[_0x3a0e5a(0x1b5)]=![];}const _0x47f01f=_0x603aaf[_0x3a0e5a(0x1bc)]!=null?String(_0x603aaf[_0x3a0e5a(0x1bc)])[_0x3a0e5a(0x1c9)]():'';if(_0x4db433){const _0x337929=_0x603aaf['currentApp']??_0x603aaf['defaultApp'];if(_0x337929){const _0x39814b=_0x2df8c9[_0x3a0e5a(0x1bd)](_0x4821d6=>_0x4821d6[_0x3a0e5a(0x1c8)]===!![]&&_0x4821d6[_0x3a0e5a(0x1c2)]===_0x337929&&_0x4821d6[_0x3a0e5a(0x1bf)]==='local'),_0x4def98=_0x39814b??_0x2df8c9['find'](_0x4c29e4=>_0x4c29e4[_0x3a0e5a(0x1c8)]===!![]&&_0x4c29e4['name']===_0x337929);_0x4def98&&(_0x4def98[_0x3a0e5a(0x1b5)]=!![]);}return;}if(!_0x47f01f)return;for(const _0x144fd5 of _0x2df8c9){String(_0x144fd5[_0x3a0e5a(0x1bb)]??'')[_0x3a0e5a(0x1c9)]()===_0x47f01f&&(_0x144fd5['isCurrent']=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';function a5_0x4143(_0x56a895,_0xeeb4e4){_0x56a895=_0x56a895-0x1b4;const _0x35931f=a5_0x3593();let _0x414317=_0x35931f[_0x56a895];return _0x414317;}export function scopeLabel(_0x24c8ad){const _0x212aeb=a5_0x4143;return formatScopeLabel(_0x24c8ad[_0x212aeb(0x1c7)]?_0x212aeb(0x1c7):'project');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x587b22=a6_0x1bbf;(function(_0x13bb26,_0x3854db){const _0x7899f1=a6_0x1bbf,_0x41526f=_0x13bb26();while(!![]){try{const _0x1c01ec=-parseInt(_0x7899f1(0x1ba))/0x1+-parseInt(_0x7899f1(0x1b4))/0x2*(-parseInt(_0x7899f1(0x1d7))/0x3)+parseInt(_0x7899f1(0x1f5))/0x4*(-parseInt(_0x7899f1(0x200))/0x5)+parseInt(_0x7899f1(0x1d1))/0x6+parseInt(_0x7899f1(0x1c0))/0x7+-parseInt(_0x7899f1(0x1b9))/0x8*(parseInt(_0x7899f1(0x1f7))/0x9)+parseInt(_0x7899f1(0x1e3))/0xa*(parseInt(_0x7899f1(0x1e1))/0xb);if(_0x1c01ec===_0x3854db)break;else _0x41526f['push'](_0x41526f['shift']());}catch(_0x1e3fef){_0x41526f['push'](_0x41526f['shift']());}}}(a6_0x443a,0x27a47));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function a6_0x443a(){const _0x40f43d=['global-default','Show\x20current\x20authentication\x20status','bool','\x20config','Tip:\x20you\x20can\x20also\x20run:','104daGtbK','join','36ZbPxLn','logout','Clear\x20from\x20global\x20config\x20(default)','\x20\x20export\x20','Shorthand\x20for\x20--access-key','AccessKey\x20cleared\x20from\x20','userCenterDisplayName','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Missing\x20accessKey.','50335nBxlXI','string','daily','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','length','read','accessKey','cancelled','env','isTTY','\x20Verify:\x20','Clear\x20accessKey\x20from\x20config','237284wuhmXY','write','global','newConfigFileName','login','87688ByPlSH','117615sMokWl','Write\x20to\x20global\x20config\x20(default)','Auth\x20mode:\x20','AccessKey\x20(ak_xxx...)','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','Auth\x20config\x20reinitialized\x20in\x20','1620570tKFgHu','trim','push','\x20auth\x20login\x20--access-key\x20<ak_xxx>','project','validation','\x20doctor','AccessKey:\x20','yes','slice','Option\x20C:\x20environment\x20variable','stdout','info','Read\x20from\x20global\x20config\x20(default)','\x20env\x20var','test','Then\x20verify\x20with:\x20','303870GYjwkM','\x20config.\x20Nothing\x20to\x20clear.','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','\x20Current\x20env:\x20','boolean','3WOaStS','str','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','production','status','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','No\x20AccessKey\x20found\x20in\x20','ACCESS_KEY','\x20scope.','Invalid\x20accessKey\x20format:\x20\x22','539McRsIh','nonInteractive','37710RIEWKN','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','repeat','envName','auth','\x20auth\x20status','\x20config.','development','access-key','Option\x20B:\x20apps\x20config\x20(','\x20(via\x20','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'];a6_0x443a=function(){return _0x40f43d;};return a6_0x443a();}function a6_0x1bbf(_0xc688c,_0x29f6ab){_0xc688c=_0xc688c-0x1b1;const _0x443a8c=a6_0x443a();let _0x1bbfbe=_0x443a8c[_0xc688c];return _0x1bbfbe;}function showAccessKeyCreateHint(){const _0x66fd3e=a6_0x1bbf;writeCliSideChannelLine(_0x66fd3e(0x1be)+PRODUCT_CONFIG[_0x66fd3e(0x1fd)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x66fd3e(0x1f4)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x66fd3e(0x1c3));}function buildAccessKeySetupGuide(){const _0x4bba30=a6_0x1bbf;return[_0x4bba30(0x1be)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x4bba30(0x1d9)+CLI_BIN_NAME+_0x4bba30(0x1e5)][_0x4bba30(0x1f6)]('\x0a');}function canPromptForAccessKey(_0x16abe9){const _0xa75e8c=a6_0x1bbf;return!_0x16abe9[_0xa75e8c(0x1e2)]&&process['stdin']['isTTY']!==![]&&process[_0xa75e8c(0x1cb)][_0xa75e8c(0x1b1)]!==![];}function resolveAuthScopeFlags(_0x3f6b71){const _0x4e3cca=a6_0x1bbf;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x3f6b71[_0x4e3cca(0x1f2)](_0x4e3cca(0x1b6)),'explicitProject':_0x3f6b71[_0x4e3cca(0x1f2)]('project'),'policy':_0x4e3cca(0x1f0)}));}async function resolveAuthWriteInput(_0x33f7ca){const _0x39f509=a6_0x1bbf;let _0x51bec7=(_0x33f7ca[_0x39f509(0x1d8)]('access-key')||_0x33f7ca[_0x39f509(0x1d8)]('ak')||'')[_0x39f509(0x1c1)]();const _0x975521=(_0x33f7ca['str'](_0x39f509(0x209))||'')[_0x39f509(0x1c1)]();if(!_0x51bec7&&canPromptForAccessKey(_0x33f7ca))try{showAccessKeyCreateHint(),_0x51bec7=await promptAccessKey('');}catch(_0x110edb){if(isAbortPrompt(_0x110edb))throw CliErrors[_0x39f509(0x208)]();throw _0x110edb;}if(!_0x51bec7)throw CliErrors['validation'](_0x39f509(0x1ff),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x39f509(0x1cf)](_0x51bec7))throw CliErrors['validation'](_0x39f509(0x1e0)+_0x51bec7+'\x22',_0x39f509(0x1dc));if(!_0x975521)return{'accessKey':_0x51bec7};const _0x2d0639=normalizeEnv(_0x975521);return{'accessKey':_0x51bec7,'env':isDaily(_0x2d0639)?_0x39f509(0x202):isDev(_0x2d0639)?_0x39f509(0x1eb):_0x39f509(0x1da)};}export const authDefinitions=[{'service':a6_0x587b22(0x1e8),'command':a6_0x587b22(0x1b8),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':a6_0x587b22(0x1b5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x587b22(0x1ec),'type':a6_0x587b22(0x201),'description':a6_0x587b22(0x1bd)},{'name':'ak','type':a6_0x587b22(0x201),'description':a6_0x587b22(0x1fb)},{'name':a6_0x587b22(0x1b6),'type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1bb),'default':!![]},{'name':a6_0x587b22(0x1c4),'type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1d4),'default':![]}],async 'execute'(_0x2d00a2){const _0x1f147b=a6_0x587b22;if(_0x2d00a2['bool'](_0x1f147b(0x1c8)))throw CliErrors[_0x1f147b(0x1c5)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.','Use\x20`'+CLI_BIN_NAME+_0x1f147b(0x1e4)+CLI_BIN_NAME+_0x1f147b(0x1d3));const _0x3235e2=(_0x2d00a2[_0x1f147b(0x1d8)](_0x1f147b(0x1ec))||_0x2d00a2[_0x1f147b(0x1d8)]('ak')||'')[_0x1f147b(0x1c1)]();if(!_0x3235e2&&_0x2d00a2[_0x1f147b(0x1e2)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x11b7d9=await resolveAuthWriteInput(_0x2d00a2),_0x3695df=resolveAuthScopeFlags(_0x2d00a2),_0x4e9e2e=readScopedConfig(_0x3695df);_0x4e9e2e[_0x1f147b(0x207)]=_0x11b7d9['accessKey'];_0x11b7d9['env']&&(_0x4e9e2e['env']=_0x11b7d9['env']);writeScopedConfig(_0x4e9e2e,_0x3695df);const _0x2ec8d5=_0x3695df[_0x1f147b(0x1b6)]?_0x1f147b(0x1b6):_0x1f147b(0x1c4),_0x57fd5f=_0x4e9e2e[_0x1f147b(0x209)]?_0x1f147b(0x1d5)+_0x4e9e2e[_0x1f147b(0x209)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x2ec8d5+_0x1f147b(0x1ea)+_0x57fd5f+_0x1f147b(0x1b2)+CLI_BIN_NAME+_0x1f147b(0x1e9)};}},{'service':a6_0x587b22(0x1e8),'command':'init','description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a6_0x587b22(0x1b5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x587b22(0x1ec),'type':a6_0x587b22(0x201),'description':a6_0x587b22(0x1bd)},{'name':'ak','type':a6_0x587b22(0x201),'description':a6_0x587b22(0x1fb)},{'name':a6_0x587b22(0x209),'type':a6_0x587b22(0x201),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':'global','type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1bb),'default':!![]},{'name':a6_0x587b22(0x1c4),'type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1d4),'default':![]}],async 'execute'(_0x3d5aa6){const _0xd3bed5=a6_0x587b22,_0xb4ffee=await resolveAuthWriteInput(_0x3d5aa6),_0x1f4776=resolveAuthScopeFlags(_0x3d5aa6),_0x134f8d={'accessKey':_0xb4ffee[_0xd3bed5(0x207)]};_0xb4ffee['env']&&(_0x134f8d[_0xd3bed5(0x209)]=_0xb4ffee[_0xd3bed5(0x209)]);writeScopedConfig(_0x134f8d,_0x1f4776);const _0x5c9507=_0x1f4776[_0xd3bed5(0x1b6)]?_0xd3bed5(0x1b6):_0xd3bed5(0x1c4),_0x4f9458=_0x134f8d[_0xd3bed5(0x209)]?_0xd3bed5(0x1d5)+_0x134f8d[_0xd3bed5(0x209)]+'.':'';return{'ok':!![],'message':_0xd3bed5(0x1bf)+_0x5c9507+_0xd3bed5(0x1df)+_0x4f9458+'\x20Verify:\x20'+CLI_BIN_NAME+_0xd3bed5(0x1e9)};}},{'service':'auth','command':a6_0x587b22(0x1f8),'description':a6_0x587b22(0x1b3),'risk':a6_0x587b22(0x1b5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x587b22(0x1b6),'type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1f9),'default':!![]},{'name':'project','type':a6_0x587b22(0x1d6),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x52ab97){const _0x45dcd2=a6_0x587b22,_0x3cf61c=resolveAuthScopeFlags(_0x52ab97),_0xb5b1b=readScopedConfig(_0x3cf61c),_0x5570fc=!!_0xb5b1b['accessKey'];delete _0xb5b1b[_0x45dcd2(0x207)],writeScopedConfig(_0xb5b1b,_0x3cf61c);const _0x378bcd=_0x3cf61c[_0x45dcd2(0x1b6)]?_0x45dcd2(0x1b6):_0x45dcd2(0x1c4);if(_0x5570fc)return{'ok':!![],'message':_0x45dcd2(0x1fc)+_0x378bcd+_0x45dcd2(0x1ea)};return{'ok':!![],'message':_0x45dcd2(0x1dd)+_0x378bcd+_0x45dcd2(0x1d2)};}},{'service':'auth','command':a6_0x587b22(0x1db),'description':a6_0x587b22(0x1f1),'risk':a6_0x587b22(0x206),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x587b22(0x1b6),'type':a6_0x587b22(0x1d6),'description':a6_0x587b22(0x1cd),'default':!![]},{'name':a6_0x587b22(0x1c4),'type':'boolean','description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x453d17){const _0x40c0ee=a6_0x587b22,_0x23dd82=resolveAuthScopeFlags(_0x453d17),_0x204a3a=readScopedConfig(_0x23dd82),_0xb9b27f=productEnvName(_0x40c0ee(0x1de)),_0x39783a=productEnv(_0x40c0ee(0x1de))||undefined,_0x34cb0e=_0x204a3a[_0x40c0ee(0x207)]||undefined,_0x459142=_0x39783a||_0x34cb0e,_0x3fbea6=_0x39783a?_0xb9b27f+_0x40c0ee(0x1ce):_0x34cb0e?(_0x23dd82[_0x40c0ee(0x1b6)]?_0x40c0ee(0x1b6):_0x40c0ee(0x1c4))+_0x40c0ee(0x1f3):null,_0x3a8e22=[_0x40c0ee(0x1bc)+AUTH_MODE['ClientAk']];if(_0x459142){const _0x309a05=_0x459142[_0x40c0ee(0x205)]>0x8?''+_0x459142[_0x40c0ee(0x1c9)](0x0,0x8)+'*'[_0x40c0ee(0x1e6)](_0x459142['length']-0x8):_0x459142;_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1c7)+_0x309a05+(_0x3fbea6?_0x40c0ee(0x1ee)+_0x3fbea6+')':''));}return!_0x459142&&(_0x3a8e22[_0x40c0ee(0x1c2)](''),_0x3a8e22['push']('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x3a8e22[_0x40c0ee(0x1c2)](''),_0x3a8e22[_0x40c0ee(0x1c2)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x40c0ee(0x1fe)),_0x3a8e22[_0x40c0ee(0x1c2)](''),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1ed)+PRODUCT_CONFIG[_0x40c0ee(0x1b7)]+')'),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1ef)),_0x3a8e22[_0x40c0ee(0x1c2)](''),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1ca)),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1fa)+_0xb9b27f+'=ak_xxx'),_0x3a8e22[_0x40c0ee(0x1c2)](''),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x1d0)+CLI_BIN_NAME+_0x40c0ee(0x1e9)),_0x3a8e22[_0x40c0ee(0x1c2)](_0x40c0ee(0x203)+CLI_BIN_NAME+_0x40c0ee(0x1c6))),{'ok':!![],'message':_0x3a8e22[_0x40c0ee(0x1f6)]('\x0a')};}},{'service':a6_0x587b22(0x1e8),'command':a6_0x587b22(0x1cc),'description':a6_0x587b22(0x204),'risk':a6_0x587b22(0x206),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x208267){const _0x3cca12=a6_0x587b22,_0x2f608e=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x2f608e,'meta':{'env':_0x208267[_0x3cca12(0x1e7)]??_0x3cca12(0x1da)}}};}}];
|
|
1
|
+
function a6_0x3178(_0x520b60,_0x44dd91){_0x520b60=_0x520b60-0x146;const _0x386ffc=a6_0x386f();let _0x317893=_0x386ffc[_0x520b60];return _0x317893;}const a6_0x196d90=a6_0x3178;(function(_0x4484c9,_0x7a5168){const _0x165a2b=a6_0x3178,_0x180362=_0x4484c9();while(!![]){try{const _0x4d4c97=parseInt(_0x165a2b(0x148))/0x1+-parseInt(_0x165a2b(0x15b))/0x2*(parseInt(_0x165a2b(0x17f))/0x3)+-parseInt(_0x165a2b(0x168))/0x4+parseInt(_0x165a2b(0x154))/0x5+parseInt(_0x165a2b(0x194))/0x6+parseInt(_0x165a2b(0x147))/0x7*(parseInt(_0x165a2b(0x15f))/0x8)+-parseInt(_0x165a2b(0x16d))/0x9;if(_0x4d4c97===_0x7a5168)break;else _0x180362['push'](_0x180362['shift']());}catch(_0x2ce86b){_0x180362['push'](_0x180362['shift']());}}}(a6_0x386f,0xb8a6c));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a6_0x386f(){const _0x11348b=['\x20config.','length','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','env','cancelled','Shorthand\x20for\x20--access-key','global','info','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','No\x20AccessKey\x20found\x20in\x20','yes','Show\x20current\x20authentication\x20status','\x20config.\x20Nothing\x20to\x20clear.','str','78681BXBoJC','=ak_xxx','Use\x20`','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','\x20Current\x20env:\x20','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Then\x20verify\x20with:\x20','Clear\x20from\x20global\x20config\x20(default)','\x20env\x20var','ClientAk','string','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Write\x20to\x20global\x20config\x20(default)','auth','repeat','access-key','validation','AccessKey:\x20','envName','bool','write','5781120awMjfs','logout','Tip:\x20you\x20can\x20also\x20run:','trim','daily','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','14QdtJak','895550rzfpvu','`auth\x20login`\x20does\x20not\x20support\x20--yes.','userCenterDisplayName','init','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','global-default','slice','push','read','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','ACCESS_KEY','\x20Verify:\x20','2928060ICPtWF','production','Missing\x20accessKey.','AccessKey\x20(ak_xxx...)','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','test','Option\x20C:\x20environment\x20variable','44CPGkkI','AccessKey\x20cleared\x20from\x20','Auth\x20config\x20reinitialized\x20in\x20','Auth\x20mode:\x20','1914064qxPuXU','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','\x20auth\x20status','project','status','accessKey','boolean','\x20auth\x20login\x20--access-key\x20<ak_xxx>','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','1752804bsaTVI','Invalid\x20accessKey\x20format:\x20\x22','login','isTTY','nonInteractive','10365039ZWFMvT','Clear\x20accessKey\x20from\x20config'];a6_0x386f=function(){return _0x11348b;};return a6_0x386f();}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 _0x1133fe=a6_0x3178;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x1133fe(0x14a)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x1133fe(0x196)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x1133fe(0x166));}function buildAccessKeySetupGuide(){const _0x3e049e=a6_0x3178;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x3e049e(0x14a)]+':',USER_ACCESS_KEY_CREATE_URL,_0x3e049e(0x18a)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]']['join']('\x0a');}function canPromptForAccessKey(_0x27f2bf){const _0x1b9e94=a6_0x3178;return!_0x27f2bf[_0x1b9e94(0x16c)]&&process['stdin']['isTTY']!==![]&&process['stdout'][_0x1b9e94(0x16b)]!==![];}function resolveAuthScopeFlags(_0x5edcb9){const _0xac824c=a6_0x3178;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x5edcb9[_0xac824c(0x192)]('global'),'explicitProject':_0x5edcb9['bool'](_0xac824c(0x162)),'policy':_0xac824c(0x14d)}));}async function resolveAuthWriteInput(_0x36dd8d){const _0x40c46b=a6_0x3178;let _0x4d7149=(_0x36dd8d[_0x40c46b(0x17e)](_0x40c46b(0x18e))||_0x36dd8d[_0x40c46b(0x17e)]('ak')||'')['trim']();const _0x4db497=(_0x36dd8d[_0x40c46b(0x17e)](_0x40c46b(0x173))||'')[_0x40c46b(0x197)]();if(!_0x4d7149&&canPromptForAccessKey(_0x36dd8d))try{showAccessKeyCreateHint(),_0x4d7149=await promptAccessKey('');}catch(_0x30c232){if(isAbortPrompt(_0x30c232))throw CliErrors[_0x40c46b(0x174)]();throw _0x30c232;}if(!_0x4d7149)throw CliErrors[_0x40c46b(0x18f)](_0x40c46b(0x156),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x40c46b(0x159)](_0x4d7149))throw CliErrors[_0x40c46b(0x18f)](_0x40c46b(0x169)+_0x4d7149+'\x22',_0x40c46b(0x184));if(!_0x4db497)return{'accessKey':_0x4d7149};const _0x38bd6b=normalizeEnv(_0x4db497);return{'accessKey':_0x4d7149,'env':isDaily(_0x38bd6b)?_0x40c46b(0x198):isDev(_0x38bd6b)?'development':'production'};}export const authDefinitions=[{'service':'auth','command':a6_0x196d90(0x16a),'description':a6_0x196d90(0x14c),'risk':a6_0x196d90(0x193),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x196d90(0x18e),'type':a6_0x196d90(0x189),'description':a6_0x196d90(0x157)},{'name':'ak','type':a6_0x196d90(0x189),'description':a6_0x196d90(0x175)},{'name':a6_0x196d90(0x176),'type':a6_0x196d90(0x165),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':'boolean','description':a6_0x196d90(0x172),'default':![]}],async 'execute'(_0x4d2861){const _0x32a679=a6_0x196d90;if(_0x4d2861['bool'](_0x32a679(0x17b)))throw CliErrors['validation'](_0x32a679(0x149),_0x32a679(0x181)+CLI_BIN_NAME+_0x32a679(0x178)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.');const _0x11f9dc=(_0x4d2861[_0x32a679(0x17e)](_0x32a679(0x18e))||_0x4d2861[_0x32a679(0x17e)]('ak')||'')[_0x32a679(0x197)]();if(!_0x11f9dc&&_0x4d2861[_0x32a679(0x16c)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x362b66=await resolveAuthWriteInput(_0x4d2861),_0x36d3c0=resolveAuthScopeFlags(_0x4d2861),_0x299ae7=readScopedConfig(_0x36d3c0);_0x299ae7[_0x32a679(0x164)]=_0x362b66[_0x32a679(0x164)];_0x362b66['env']&&(_0x299ae7[_0x32a679(0x173)]=_0x362b66[_0x32a679(0x173)]);writeScopedConfig(_0x299ae7,_0x36d3c0);const _0x47c191=_0x36d3c0[_0x32a679(0x176)]?_0x32a679(0x176):'project',_0x18e01d=_0x299ae7[_0x32a679(0x173)]?'\x20Current\x20env:\x20'+_0x299ae7['env']+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x47c191+_0x32a679(0x16f)+_0x18e01d+'\x20Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x196d90(0x18c),'command':a6_0x196d90(0x14b),'description':a6_0x196d90(0x158),'risk':a6_0x196d90(0x193),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x196d90(0x18e),'type':a6_0x196d90(0x189),'description':a6_0x196d90(0x157)},{'name':'ak','type':a6_0x196d90(0x189),'description':a6_0x196d90(0x175)},{'name':a6_0x196d90(0x173),'type':a6_0x196d90(0x189),'description':a6_0x196d90(0x171)},{'name':'global','type':'boolean','description':a6_0x196d90(0x18b),'default':!![]},{'name':'project','type':'boolean','description':a6_0x196d90(0x172),'default':![]}],async 'execute'(_0x22abbf){const _0xf81631=a6_0x196d90,_0x23acab=await resolveAuthWriteInput(_0x22abbf),_0x2cb17d=resolveAuthScopeFlags(_0x22abbf),_0x495826={'accessKey':_0x23acab[_0xf81631(0x164)]};_0x23acab[_0xf81631(0x173)]&&(_0x495826[_0xf81631(0x173)]=_0x23acab[_0xf81631(0x173)]);writeScopedConfig(_0x495826,_0x2cb17d);const _0x173984=_0x2cb17d[_0xf81631(0x176)]?_0xf81631(0x176):'project',_0x405d10=_0x495826[_0xf81631(0x173)]?_0xf81631(0x183)+_0x495826[_0xf81631(0x173)]+'.':'';return{'ok':!![],'message':_0xf81631(0x15d)+_0x173984+'\x20scope.'+_0x405d10+_0xf81631(0x153)+CLI_BIN_NAME+_0xf81631(0x161)};}},{'service':a6_0x196d90(0x18c),'command':a6_0x196d90(0x195),'description':a6_0x196d90(0x16e),'risk':a6_0x196d90(0x193),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x196d90(0x176),'type':a6_0x196d90(0x165),'description':a6_0x196d90(0x186),'default':!![]},{'name':'project','type':a6_0x196d90(0x165),'description':a6_0x196d90(0x182),'default':![]}],async 'execute'(_0x38dfa0){const _0x32e35c=a6_0x196d90,_0x519fb4=resolveAuthScopeFlags(_0x38dfa0),_0x1499be=readScopedConfig(_0x519fb4),_0x3c8d19=!!_0x1499be[_0x32e35c(0x164)];delete _0x1499be['accessKey'],writeScopedConfig(_0x1499be,_0x519fb4);const _0x5a4403=_0x519fb4[_0x32e35c(0x176)]?'global':'project';if(_0x3c8d19)return{'ok':!![],'message':_0x32e35c(0x15c)+_0x5a4403+_0x32e35c(0x16f)};return{'ok':!![],'message':_0x32e35c(0x17a)+_0x5a4403+_0x32e35c(0x17d)};}},{'service':a6_0x196d90(0x18c),'command':a6_0x196d90(0x163),'description':a6_0x196d90(0x17c),'risk':a6_0x196d90(0x150),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x196d90(0x176),'type':a6_0x196d90(0x165),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':'project','type':a6_0x196d90(0x165),'description':a6_0x196d90(0x179),'default':![]}],async 'execute'(_0x51a430){const _0x1564b9=a6_0x196d90,_0x567e7c=resolveAuthScopeFlags(_0x51a430),_0x51a22d=readScopedConfig(_0x567e7c),_0x3f3375=productEnvName(_0x1564b9(0x152)),_0x22bc5a=productEnv(_0x1564b9(0x152))||undefined,_0x1692dd=_0x51a22d[_0x1564b9(0x164)]||undefined,_0x3303fc=_0x22bc5a||_0x1692dd,_0x3ba19d=_0x22bc5a?_0x3f3375+_0x1564b9(0x187):_0x1692dd?(_0x567e7c['global']?'global':_0x1564b9(0x162))+'\x20config':null,_0x260d0b=[_0x1564b9(0x15e)+AUTH_MODE[_0x1564b9(0x188)]];if(_0x3303fc){const _0x2357d2=_0x3303fc[_0x1564b9(0x170)]>0x8?''+_0x3303fc[_0x1564b9(0x14e)](0x0,0x8)+'*'[_0x1564b9(0x18d)](_0x3303fc[_0x1564b9(0x170)]-0x8):_0x3303fc;_0x260d0b['push'](_0x1564b9(0x190)+_0x2357d2+(_0x3ba19d?'\x20(via\x20'+_0x3ba19d+')':''));}return!_0x3303fc&&(_0x260d0b[_0x1564b9(0x14f)](''),_0x260d0b['push'](_0x1564b9(0x167)),_0x260d0b['push'](''),_0x260d0b[_0x1564b9(0x14f)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x1564b9(0x146)),_0x260d0b[_0x1564b9(0x14f)](''),_0x260d0b[_0x1564b9(0x14f)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG['newConfigFileName']+')'),_0x260d0b['push'](_0x1564b9(0x151)),_0x260d0b[_0x1564b9(0x14f)](''),_0x260d0b[_0x1564b9(0x14f)](_0x1564b9(0x15a)),_0x260d0b['push']('\x20\x20export\x20'+_0x3f3375+_0x1564b9(0x180)),_0x260d0b['push'](''),_0x260d0b[_0x1564b9(0x14f)](_0x1564b9(0x185)+CLI_BIN_NAME+'\x20auth\x20status'),_0x260d0b['push'](_0x1564b9(0x160)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x260d0b['join']('\x0a')};}},{'service':a6_0x196d90(0x18c),'command':a6_0x196d90(0x177),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a6_0x196d90(0x150),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x6107b3){const _0x5016d2=a6_0x196d90,_0x5eb11b=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x5eb11b,'meta':{'env':_0x6107b3[_0x5016d2(0x191)]??_0x5016d2(0x155)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a7_0x235e(_0x20e366,_0x449560){_0x20e366=_0x20e366-0x118;const _0x5f11f1=a7_0x5f11();let _0x235ef6=_0x5f11f1[_0x20e366];return _0x235ef6;}(function(_0x1a9a73,_0x1742a3){const _0x23d37e=a7_0x235e,_0x38d68f=_0x1a9a73();while(!![]){try{const _0x7799b=-parseInt(_0x23d37e(0x123))/0x1+-parseInt(_0x23d37e(0x129))/0x2*(-parseInt(_0x23d37e(0x11f))/0x3)+parseInt(_0x23d37e(0x120))/0x4*(-parseInt(_0x23d37e(0x12e))/0x5)+-parseInt(_0x23d37e(0x125))/0x6*(parseInt(_0x23d37e(0x124))/0x7)+-parseInt(_0x23d37e(0x12d))/0x8+-parseInt(_0x23d37e(0x118))/0x9+parseInt(_0x23d37e(0x12c))/0xa;if(_0x7799b===_0x1742a3)break;else _0x38d68f['push'](_0x38d68f['shift']());}catch(_0x2b567f){_0x38d68f['push'](_0x38d68f['shift']());}}}(a7_0x5f11,0x63ecc));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x48c3bc=a7_0x235e;super(_0x48c3bc(0x128)),this['name']=_0x48c3bc(0x12a);}}function createSafeRl(){const _0x4e7ccc=a7_0x235e,_0x28a334=createInterface({'input':process['stdin'],'output':process[_0x4e7ccc(0x126)]});let _0x2680df;const _0x301893=new Promise((_0x3e2eba,_0x48f9f7)=>{const _0x32d0f9=_0x4e7ccc;_0x2680df=()=>{const _0x533d23=a7_0x235e;_0x2680df&&(_0x28a334[_0x533d23(0x127)]('SIGINT',_0x2680df),_0x2680df=undefined);try{_0x28a334[_0x533d23(0x121)]();}catch{}_0x48f9f7(new AbortPrompt());},_0x28a334[_0x32d0f9(0x11b)](_0x32d0f9(0x11e),_0x2680df);}),_0x121680=()=>{const _0x324a36=_0x4e7ccc;_0x2680df&&(_0x28a334[_0x324a36(0x127)](_0x324a36(0x11e),_0x2680df),_0x2680df=undefined);try{_0x28a334[_0x324a36(0x121)]();}catch{}};return{'rl':_0x28a334,'abortPromise':_0x301893,'disposeSuccess':_0x121680};}export async function promptAccessKey(_0x585085=''){const _0x6fd9fa=a7_0x235e,{rl:_0x3795f9,abortPromise:_0x47b1b2,disposeSuccess:_0x1f8da3}=createSafeRl(),_0x9ef63f=new Promise(_0x83764b=>{const _0x323853=a7_0x235e,_0x53b9da=_0x585085?_0x323853(0x11c)+_0x585085+_0x323853(0x119):_0x323853(0x12b);_0x3795f9['question'](_0x53b9da,_0x416ab7=>{const _0x302f9d=_0x323853;_0x1f8da3(),_0x83764b(_0x416ab7[_0x302f9d(0x11a)]()||_0x585085);});});return Promise[_0x6fd9fa(0x11d)]([_0x9ef63f,_0x47b1b2]);}function a7_0x5f11(){const _0x39177b=['AccessKey\x20(paste\x20ak_...):\x20','20173430aLrJMJ','5000512ffklqM','16505cTuOUz','2304441kQTgii','):\x20','trim','once','AccessKey\x20(','race','SIGINT','435JGEEvc','24WMpCTm','close','name','595543TdATBX','357ziRgXJ','54564eYcymR','stdout','removeListener','User\x20aborted\x20prompt','4858hurPuw','AbortPrompt'];a7_0x5f11=function(){return _0x39177b;};return a7_0x5f11();}export function isAbortPrompt(_0xcf2b7f){const _0x4271c4=a7_0x235e;return _0xcf2b7f instanceof Error&&_0xcf2b7f[_0x4271c4(0x122)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a8_0x3556(_0x15151a,_0x2dbc8a){_0x15151a=_0x15151a-0x9a;const _0x435890=a8_0x4358();let _0x3556ad=_0x435890[_0x15151a];return _0x3556ad;}const a8_0x7d06fa=a8_0x3556;(function(_0x44f2bf,_0x19fc71){const _0x48ae53=a8_0x3556,_0x2bc55e=_0x44f2bf();while(!![]){try{const _0x52c948=-parseInt(_0x48ae53(0x9d))/0x1*(parseInt(_0x48ae53(0xa1))/0x2)+parseInt(_0x48ae53(0xa9))/0x3*(-parseInt(_0x48ae53(0xa4))/0x4)+-parseInt(_0x48ae53(0xa0))/0x5+-parseInt(_0x48ae53(0xa2))/0x6+parseInt(_0x48ae53(0x9e))/0x7*(parseInt(_0x48ae53(0xa5))/0x8)+parseInt(_0x48ae53(0x9b))/0x9+parseInt(_0x48ae53(0xa3))/0xa;if(_0x52c948===_0x19fc71)break;else _0x2bc55e['push'](_0x2bc55e['shift']());}catch(_0x522330){_0x2bc55e['push'](_0x2bc55e['shift']());}}}(a8_0x4358,0xb12ed));function a8_0x4358(){const _0x66920e=['(none)','read','10013688AMtNdO','detail','555257aDsrYr','7krYSej','Script\x20ID','454700oeoenu','2UAZPnm','3332418oEIRph','10979150ofskqN','100EPCqaT','8691752iwPZbN','appCode','verbose','functionName','164361tzFBhm','num','scriptType','bff'];a8_0x4358=function(){return _0x66920e;};return a8_0x4358();}import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x7d06fa(0xac),'command':a8_0x7d06fa(0x9c),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a8_0x7d06fa(0x9a),'flags':[{...ID_FLAG,'description':a8_0x7d06fa(0x9f)},VERBOSE_FLAG],async 'execute'(_0x3a6132){const _0x540ec2=a8_0x7d06fa,_0x4dbe32=await getBffScriptInfo(_0x3a6132[_0x540ec2(0xaa)]('id')),_0x182192=_0x3a6132['bool'](_0x540ec2(0xa7));if(_0x182192)return{'ok':!![],'data':_0x4dbe32};return{'ok':!![],'data':{'id':_0x4dbe32['id'],'appCode':_0x4dbe32[_0x540ec2(0xa6)],'functionName':_0x4dbe32[_0x540ec2(0xa8)]??'','scriptType':_0x4dbe32[_0x540ec2(0xab)],'description':_0x4dbe32['description']||_0x540ec2(0xad),'createdTime':_0x4dbe32['createdTime']??'','updatedTime':_0x4dbe32['updatedTime']??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a9_0x120897=a9_0xdadf;(function(_0x3dd8ad,_0x265405){const _0x221e0b=a9_0xdadf,_0x11f668=_0x3dd8ad();while(!![]){try{const _0x2dcf3b=-parseInt(_0x221e0b(0x17d))/0x1+parseInt(_0x221e0b(0x178))/0x2*(-parseInt(_0x221e0b(0x17c))/0x3)+parseInt(_0x221e0b(0x184))/0x4*(-parseInt(_0x221e0b(0x179))/0x5)+parseInt(_0x221e0b(0x187))/0x6+-parseInt(_0x221e0b(0x180))/0x7+-parseInt(_0x221e0b(0x182))/0x8+-parseInt(_0x221e0b(0x186))/0x9*(-parseInt(_0x221e0b(0x176))/0xa);if(_0x2dcf3b===_0x265405)break;else _0x11f668['push'](_0x11f668['shift']());}catch(_0x3a8280){_0x11f668['push'](_0x11f668['shift']());}}}(a9_0xd97d,0xbb25a));function a9_0xdadf(_0x2575a3,_0x45bb20){_0x2575a3=_0x2575a3-0x176;const _0xd97d1=a9_0xd97d();let _0xdadf5=_0xd97d1[_0x2575a3];return _0xdadf5;}import{executeSdkBff}from'../../core/sdk-client.js';function a9_0xd97d(){const _0x57d904=['bff','2861336kPmAlG','BFF\x20function\x20name\x20to\x20execute','6684gnnBno','now','7502499CATqIs','4148796bkCKct','50IjHiie','BFF\x20executed\x20in\x20','4AiDAKc','1425kzRjvC','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','str','1575087Brwdes','1373851uvXvvz','exec','read','5846092JWjbuZ'];a9_0xd97d=function(){return _0x57d904;};return a9_0xd97d();}import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a9_0x120897(0x181),'command':a9_0x120897(0x17e),'description':a9_0x120897(0x17a),'risk':a9_0x120897(0x17f),'flags':[{...NAME_FLAG,'required':!![],'description':a9_0x120897(0x183)},PARAMS_FLAG],async 'execute'(_0xb847df){const _0x5555b9=a9_0x120897,_0x26521f=parseJsonParams(_0xb847df[_0x5555b9(0x17b)]('params')),_0x29842b=Date[_0x5555b9(0x185)](),_0x2b35f2=await executeSdkBff(_0xb847df[_0x5555b9(0x17b)]('name'),_0x26521f),_0x55ff76=Date[_0x5555b9(0x185)]()-_0x29842b;return{'ok':!![],'data':{'result':_0x2b35f2,'elapsed':_0x55ff76},'message':_0x5555b9(0x177)+_0x55ff76+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28a3fc,_0x223741){const _0xe0dc73=a10_0x19bc,_0xed1ccd=_0x28a3fc();while(!![]){try{const _0x2b6137=parseInt(_0xe0dc73(0xd8))/0x1+parseInt(_0xe0dc73(0xda))/0x2+-parseInt(_0xe0dc73(0xde))/0x3+parseInt(_0xe0dc73(0xdc))/0x4*(-parseInt(_0xe0dc73(0xdd))/0x5)+-parseInt(_0xe0dc73(0xd7))/0x6*(parseInt(_0xe0dc73(0xdb))/0x7)+parseInt(_0xe0dc73(0xdf))/0x8+-parseInt(_0xe0dc73(0xd9))/0x9;if(_0x2b6137===_0x223741)break;else _0xed1ccd['push'](_0xed1ccd['shift']());}catch(_0x35339d){_0xed1ccd['push'](_0xed1ccd['shift']());}}}(a10_0x44d4,0x72880));function a10_0x44d4(){const _0x3022ad=['520wsPSTg','1070UKLdTE','151380ZTYDWG','6002176xOxZTb','205566AmYjbR','934457yyMNFK','7333056WeGSOY','245696qmqsdE','91fDySlW'];a10_0x44d4=function(){return _0x3022ad;};return a10_0x44d4();}function a10_0x19bc(_0x268f15,_0x53f30a){_0x268f15=_0x268f15-0xd7;const _0x44d43c=a10_0x44d4();let _0x19bc0f=_0x44d43c[_0x268f15];return _0x19bc0f;}import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c8712,_0x41ed5a){const _0xf76b8e=a11_0x4fc4,_0x3c8c85=_0x3c8712();while(!![]){try{const _0x58bec5=parseInt(_0xf76b8e(0x12d))/0x1+parseInt(_0xf76b8e(0x139))/0x2+-parseInt(_0xf76b8e(0x138))/0x3+-parseInt(_0xf76b8e(0x12c))/0x4*(parseInt(_0xf76b8e(0x127))/0x5)+parseInt(_0xf76b8e(0x130))/0x6*(parseInt(_0xf76b8e(0x128))/0x7)+parseInt(_0xf76b8e(0x135))/0x8+-parseInt(_0xf76b8e(0x13a))/0x9;if(_0x58bec5===_0x41ed5a)break;else _0x3c8c85['push'](_0x3c8c85['shift']());}catch(_0x55d75f){_0x3c8c85['push'](_0x3c8c85['shift']());}}}(a11_0x415c,0xce2a0));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x702aef){const _0x1d3edc=a11_0x4fc4,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x52bba6}=_0x702aef;if(explicitGlobal&&explicitProject)throw CliErrors[_0x1d3edc(0x134)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',_0x1d3edc(0x12e));if(explicitGlobal)return _0x1d3edc(0x131);if(explicitProject)return'project';switch(_0x52bba6){case _0x1d3edc(0x133):return'global';case _0x1d3edc(0x137):return _0x702aef[_0x1d3edc(0x12b)]??isInProject()?'project':_0x1d3edc(0x131);case _0x1d3edc(0x136):if(!(_0x702aef['inProject']??isInProject()))throw CliErrors[_0x1d3edc(0x134)]('Not\x20inside\x20a\x20project\x20(no\x20'+PRODUCT_CONFIG[_0x1d3edc(0x126)]+_0x1d3edc(0x129),_0x1d3edc(0x12a)+PRODUCT_CONFIG[_0x1d3edc(0x126)]+_0x1d3edc(0x132)+CLI_BIN_NAME+'\x20init`\x20first.');return _0x1d3edc(0x12f);}}function a11_0x415c(){const _0x2338e4=['5638960uBfdGc','project-or-global-explicit','project-default','3507174fuwqfH','2873434DhOdfF','12478401VJTCLC','newConfigFileName','196865mOFwSS','2723ijIYop','\x20found).','Add\x20--global\x20to\x20write\x20to\x20~/','inProject','28xRxqRW','693001ftVhYG','Use\x20only\x20one\x20config\x20scope\x20flag.','project','12972PqyzrO','global',',\x20or\x20run\x20`','global-default','validation'];a11_0x415c=function(){return _0x2338e4;};return a11_0x415c();}export function toScopeFlags(_0x13e9b3){const _0x18fbec=a11_0x4fc4;return{'global':_0x13e9b3===_0x18fbec(0x131)};}function a11_0x4fc4(_0x8f5483,_0x5e3e8b){_0x8f5483=_0x8f5483-0x126;const _0x415c20=a11_0x415c();let _0x4fc4f4=_0x415c20[_0x8f5483];return _0x4fc4f4;}export function formatScopeLabel(_0x5b89bf){const _0x1554f8=a11_0x4fc4;return _0x5b89bf===_0x1554f8(0x131)?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x404397,_0x342b18){const _0x42fa8e=a12_0x29c7,_0x5c24de=_0x404397();while(!![]){try{const _0x599582=parseInt(_0x42fa8e(0x1b2))/0x1+-parseInt(_0x42fa8e(0x1ad))/0x2*(parseInt(_0x42fa8e(0x1c0))/0x3)+-parseInt(_0x42fa8e(0x1c3))/0x4*(-parseInt(_0x42fa8e(0x1ac))/0x5)+parseInt(_0x42fa8e(0x1c7))/0x6*(-parseInt(_0x42fa8e(0x1be))/0x7)+-parseInt(_0x42fa8e(0x1c5))/0x8*(-parseInt(_0x42fa8e(0x1c4))/0x9)+-parseInt(_0x42fa8e(0x1bf))/0xa+parseInt(_0x42fa8e(0x1b4))/0xb*(-parseInt(_0x42fa8e(0x1c2))/0xc);if(_0x599582===_0x342b18)break;else _0x5c24de['push'](_0x5c24de['shift']());}catch(_0x80d4b6){_0x5c24de['push'](_0x5c24de['shift']());}}}(a12_0x575c,0x4c884));import{CliErrors}from'../../errors.js';function isSet(_0xac4c0a,_0x37daf8){const _0x13f579=a12_0x29c7,_0x539fd8=_0xac4c0a[_0x13f579(0x1ae)](_0x37daf8);return _0x539fd8!==undefined&&_0x539fd8!==''&&_0x539fd8!==![]&&_0x539fd8!==0x0;}function fmtNames(_0x4f0f4e){const _0x224526=a12_0x29c7;return _0x4f0f4e['map'](_0x5b9f32=>'--'+_0x5b9f32)[_0x224526(0x1b9)](',\x20');}function a12_0x575c(){const _0x283c43=['Provide\x20one\x20of:\x20','Invalid\x20--','\x20is\x20allowed,\x20found:\x20','\x20are\x20mutually\x20exclusive\x20for\x20`','join','Exactly\x20one\x20of\x20','Only\x20one\x20of\x20','test','Flags\x20','7NILlja','1974790ZvNsqU','2019MqObWc','validation','1236dVQzHQ','684256qzENZm','632754vVuoAR','56vvJaaX','length','3118530uXMtnz','10kYehdY','362MDTxIf','flag','filter','At\x20least\x20one\x20of\x20','some','367178QrmmWa','\x20is\x20required\x20for\x20`','5225RuLOuC'];a12_0x575c=function(){return _0x283c43;};return a12_0x575c();}function a12_0x29c7(_0x543bd9,_0x1d1e5a){_0x543bd9=_0x543bd9-0x1ac;const _0x575c56=a12_0x575c();let _0x29c7f9=_0x575c56[_0x543bd9];return _0x29c7f9;}export function requireOneOf(_0x4f1e6d,_0x451d67,_0x23885a){const _0x254b6a=a12_0x29c7,_0x5dc2d4=_0x451d67['filter'](_0x5773df=>isSet(_0x4f1e6d,_0x5773df));if(_0x5dc2d4[_0x254b6a(0x1c6)]!==0x1)throw CliErrors[_0x254b6a(0x1c1)](_0x5dc2d4[_0x254b6a(0x1c6)]===0x0?_0x254b6a(0x1ba)+fmtNames(_0x451d67)+_0x254b6a(0x1b3)+_0x23885a+'`.':_0x254b6a(0x1bb)+fmtNames(_0x451d67)+_0x254b6a(0x1b7)+fmtNames(_0x5dc2d4)+'.',_0x5dc2d4[_0x254b6a(0x1c6)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x451d67):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x5909ed,_0x2014cb,_0x20680a){const _0x20c388=a12_0x29c7;if(!_0x2014cb[_0x20c388(0x1b1)](_0x2e2887=>isSet(_0x5909ed,_0x2e2887)))throw CliErrors[_0x20c388(0x1c1)](_0x20c388(0x1b0)+fmtNames(_0x2014cb)+_0x20c388(0x1b3)+_0x20680a+'`.',_0x20c388(0x1b5)+fmtNames(_0x2014cb));}export function mutuallyExclusive(_0xfa05d0,_0x3a19f4,_0x359238){const _0x59e44d=a12_0x29c7,_0x468a6e=_0x3a19f4[_0x59e44d(0x1af)](_0x40e053=>isSet(_0xfa05d0,_0x40e053));if(_0x468a6e[_0x59e44d(0x1c6)]>0x1)throw CliErrors[_0x59e44d(0x1c1)](_0x59e44d(0x1bd)+fmtNames(_0x468a6e)+_0x59e44d(0x1b8)+_0x359238+'`.','Use\x20only\x20one\x20of:\x20'+fmtNames(_0x3a19f4));}export function validatePattern(_0x40cf16,_0x596b8d,_0x5c303a,_0x2dc838){const _0x4d048e=a12_0x29c7,_0x3cc262=_0x40cf16['str'](_0x596b8d);if(_0x3cc262&&!_0x5c303a[_0x4d048e(0x1bc)](_0x3cc262))throw CliErrors[_0x4d048e(0x1c1)](_0x4d048e(0x1b6)+_0x596b8d+':\x20expected\x20'+_0x2dc838+',\x20got\x20\x22'+_0x3cc262+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a13_0x5dfcf0=a13_0x356f;function a13_0x3c2f(){const _0x254ddf=['1341SpvkIH','4eENZWY','9609NeJnGI','number','Return\x20full\x20raw\x20response\x20object','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','17870fQhwST','sqlcode','boolean','48EQHWnX','Resource\x20name\x20for\x20lookup','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','2200855vAifDU','2061003gprZBg','code','Resource\x20ID','string','114oLqSko','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','344302AFHYyY','971982RjjOBS','2574528nsyhQv','verbose'];a13_0x3c2f=function(){return _0x254ddf;};return a13_0x3c2f();}(function(_0x133385,_0x215229){const _0x40b3a8=a13_0x356f,_0x162516=_0x133385();while(!![]){try{const _0x4b9249=-parseInt(_0x40b3a8(0x15b))/0x1*(-parseInt(_0x40b3a8(0x153))/0x2)+-parseInt(_0x40b3a8(0x166))/0x3*(parseInt(_0x40b3a8(0x15a))/0x4)+parseInt(_0x40b3a8(0x165))/0x5+-parseInt(_0x40b3a8(0x157))/0x6+parseInt(_0x40b3a8(0x155))/0x7*(parseInt(_0x40b3a8(0x162))/0x8)+parseInt(_0x40b3a8(0x159))/0x9*(parseInt(_0x40b3a8(0x15f))/0xa)+-parseInt(_0x40b3a8(0x156))/0xb;if(_0x4b9249===_0x215229)break;else _0x162516['push'](_0x162516['shift']());}catch(_0x529b68){_0x162516['push'](_0x162516['shift']());}}}(a13_0x3c2f,0x542ec));export const CODE_FLAG={'name':a13_0x5dfcf0(0x150),'type':a13_0x5dfcf0(0x152),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x5dfcf0(0x154)}};export const SQLCODE_FLAG={'name':a13_0x5dfcf0(0x160),'type':a13_0x5dfcf0(0x152),'required':!![],'description':a13_0x5dfcf0(0x15e),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':a13_0x5dfcf0(0x158),'type':a13_0x5dfcf0(0x161),'description':a13_0x5dfcf0(0x15d)};export const PARAMS_FLAG={'name':'params','type':a13_0x5dfcf0(0x152),'description':a13_0x5dfcf0(0x164)};export const NAME_FLAG={'name':'name','type':'string','description':a13_0x5dfcf0(0x163)};function a13_0x356f(_0x2a5300,_0x55639b){_0x2a5300=_0x2a5300-0x150;const _0x3c2f45=a13_0x3c2f();let _0x356fa4=_0x3c2f45[_0x2a5300];return _0x356fa4;}export const ID_FLAG={'name':'id','type':a13_0x5dfcf0(0x15c),'required':!![],'description':a13_0x5dfcf0(0x151)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0x3994b8=a14_0x23f3;(function(_0x40a56f,_0x122528){const _0x4affb3=a14_0x23f3,_0x35555b=_0x40a56f();while(!![]){try{const _0x1ab1ed=parseInt(_0x4affb3(0x17a))/0x1*(parseInt(_0x4affb3(0x166))/0x2)+parseInt(_0x4affb3(0x19a))/0x3+parseInt(_0x4affb3(0x19d))/0x4*(parseInt(_0x4affb3(0x169))/0x5)+parseInt(_0x4affb3(0x16a))/0x6+-parseInt(_0x4affb3(0x172))/0x7*(-parseInt(_0x4affb3(0x180))/0x8)+-parseInt(_0x4affb3(0x168))/0x9+-parseInt(_0x4affb3(0x18d))/0xa;if(_0x1ab1ed===_0x122528)break;else _0x35555b['push'](_0x35555b['shift']());}catch(_0x2ed5a8){_0x35555b['push'](_0x35555b['shift']());}}}(a14_0x2be1,0x88fe1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';function a14_0x23f3(_0x32db7a,_0x240e55){_0x32db7a=_0x32db7a-0x160;const _0x2be1b3=a14_0x2be1();let _0x23f339=_0x2be1b3[_0x32db7a];return _0x23f339;}import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';function a14_0x2be1(){const _0x529f64=['46TPwoqp','\x20config\x20get\x20<key>','3854403inDvIK','88390ucjvKZ','340938YGEngK','validation','object','join','pretty','boolean','List\x20current\x20config','list','518PMZcIW','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','split','Key\x20\x22','key','Value\x20to\x20assign','log','alias','46547txJnvg','global','Settable\x20keys:\x20','Key\x20not\x20found:\x20','project-or-global-explicit','../../context.js','60472QiZWtE','write','read','riskLevel','\x20config\x20delete\x20<key>\x20[--global]','`\x20=\x20\x22','config','stringify','\x22\x20is\x20not\x20settable.','get','apps','\x20\x20global:\x20\x20','appcode','20534770naSlIG','Missing\x20key\x20or\x20value.','Top-level\x20key\x20\x22','\x22\x20not\x20found\x20at\x20top\x20level.','trim','Delete\x20a\x20config\x20value','field','Write\x20to\x20global\x20config','args','raw','keys','(none)','value','2742435XETaJB','\x20\x20project:\x20','length','100kxZIvt','Deleted\x20`','Missing\x20key\x20argument.','includes','Usage:\x20','bool','\x20config\x20set\x20<key>\x20<value>\x20[--global]','delete','Set\x20a\x20config\x20value','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','pageSize','Invalid\x20value\x20for\x20\x22','Config\x20files:\x0a','\x20(global)','isArray'];a14_0x2be1=function(){return _0x529f64;};return a14_0x2be1();}const GLOBAL_FLAG={'name':a14_0x3994b8(0x17b),'type':a14_0x3994b8(0x16f),'description':a14_0x3994b8(0x194),'default':![]};function parseAliasAppcodeSetKey(_0x17c7bc){const _0x1adaaf=a14_0x3994b8,_0x3c2a87=_0x17c7bc[_0x1adaaf(0x174)]('.');if(_0x3c2a87[_0x1adaaf(0x19c)]!==0x3||_0x3c2a87[0x0]!==_0x1adaaf(0x18a)||_0x3c2a87[0x2]!==_0x1adaaf(0x18c))return undefined;const _0x50a776=_0x3c2a87[0x1]?.['trim']();return _0x50a776?_0x50a776:undefined;}function parseAliasDeleteKey(_0x49a4c1){const _0x326f30=a14_0x3994b8,_0x225157=_0x49a4c1[_0x326f30(0x174)]('.');if(_0x225157[_0x326f30(0x19c)]===0x2&&_0x225157[0x0]==='apps'){const _0x45c869=_0x225157[0x1]?.[_0x326f30(0x191)]();return _0x45c869?{'alias':_0x45c869}:undefined;}if(_0x225157['length']===0x3&&_0x225157[0x0]==='apps'&&_0x225157[0x2]==='appcode'){const _0x40d940=_0x225157[0x1]?.[_0x326f30(0x191)]();return _0x40d940?{'alias':_0x40d940,'field':_0x326f30(0x18c)}:undefined;}return undefined;}function setLocalAppAlias(_0x1e6824,_0x557643,_0x46fe6f){const _0xbcc9f=a14_0x3994b8,_0x1ebe59=_0x1e6824[_0xbcc9f(0x18a)]&&typeof _0x1e6824[_0xbcc9f(0x18a)]===_0xbcc9f(0x16c)&&!Array[_0xbcc9f(0x165)](_0x1e6824[_0xbcc9f(0x18a)])?_0x1e6824['apps']:{},_0x1038cc=_0x1ebe59[_0x557643]&&typeof _0x1ebe59[_0x557643]===_0xbcc9f(0x16c)&&!Array[_0xbcc9f(0x165)](_0x1ebe59[_0x557643])?_0x1ebe59[_0x557643]:{};_0x1038cc['appcode']=_0x46fe6f,_0x1ebe59[_0x557643]=_0x1038cc,_0x1e6824[_0xbcc9f(0x18a)]=_0x1ebe59;}function deleteLocalAppAlias(_0x5c4a50,_0x2df94d){const _0x18948e=a14_0x3994b8;if(!_0x5c4a50[_0x18948e(0x18a)]||typeof _0x5c4a50[_0x18948e(0x18a)]!==_0x18948e(0x16c)||Array['isArray'](_0x5c4a50[_0x18948e(0x18a)]))return![];const _0x4cb11a=_0x5c4a50[_0x18948e(0x18a)],_0x23aa44=_0x4cb11a[_0x2df94d[_0x18948e(0x179)]];if(!_0x23aa44||typeof _0x23aa44!==_0x18948e(0x16c)||Array[_0x18948e(0x165)](_0x23aa44))return![];if(!_0x2df94d[_0x18948e(0x193)])return delete _0x4cb11a[_0x2df94d[_0x18948e(0x179)]],!![];if(!(_0x2df94d[_0x18948e(0x193)]in _0x23aa44))return![];return delete _0x23aa44[_0x2df94d['field']],Object[_0x18948e(0x197)](_0x23aa44)[_0x18948e(0x19c)]===0x0&&delete _0x4cb11a[_0x2df94d[_0x18948e(0x179)]],!![];}const listDef={'service':a14_0x3994b8(0x186),'command':a14_0x3994b8(0x171),'description':a14_0x3994b8(0x170),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1c3b64){const _0x4d5160=a14_0x3994b8,{buildConfigFromFlags:_0x432ce3}=await import(_0x4d5160(0x17f)),_0x4dfb0c=_0x432ce3({}),_0x315562=getProjectConfigPath(),_0x14c4ff=resolveWriteConfigPath(_0x4d5160(0x17b));if(_0x1c3b64['format']===_0x4d5160(0x16e))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON['stringify'](_0x4dfb0c[_0x4d5160(0x196)],null,0x2)+'\x0a\x0a')+_0x4d5160(0x163)+(_0x4d5160(0x19b)+(_0x315562??_0x4d5160(0x198))+'\x0a')+(_0x4d5160(0x18b)+_0x14c4ff)};return{'ok':!![],'data':{'effective':_0x4dfb0c['raw'],'configFiles':{'project':_0x315562??null,'global':_0x14c4ff}}};}},getDef={'service':a14_0x3994b8(0x186),'command':a14_0x3994b8(0x189),'description':'Get\x20a\x20config\x20value','risk':a14_0x3994b8(0x182),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a14_0x3994b8(0x173),'required':!![]}],'flags':[],async 'execute'(_0x31beed){const _0xbce361=a14_0x3994b8,_0x3acd99=_0x31beed[_0xbce361(0x195)][0x0];if(!_0x3acd99)throw CliErrors[_0xbce361(0x16b)](_0xbce361(0x19f),_0xbce361(0x1a1)+CLI_BIN_NAME+_0xbce361(0x167));const {buildConfigFromFlags:_0x200ff6}=await import('../../context.js'),{raw:_0x496dfd}=_0x200ff6({});if(_0x3acd99[_0xbce361(0x1a0)]('.')){const _0x2a1bc5=_0x3acd99['split']('.');let _0x3999bd=_0x496dfd;for(const _0x47cf4c of _0x2a1bc5){if(_0x3999bd==null||typeof _0x3999bd!=='object')throw CliErrors['validation'](_0xbce361(0x17d)+_0x3acd99);_0x3999bd=_0x3999bd[_0x47cf4c];}if(_0x3999bd===undefined)throw CliErrors[_0xbce361(0x16b)]('Key\x20not\x20found:\x20'+_0x3acd99);return console[_0xbce361(0x178)](typeof _0x3999bd===_0xbce361(0x16c)?JSON['stringify'](_0x3999bd,null,0x2):String(_0x3999bd)),{'ok':!![]};}const _0x32371c=_0x496dfd[_0x3acd99];if(_0x32371c===undefined)throw CliErrors[_0xbce361(0x16b)](_0xbce361(0x17d)+_0x3acd99);return console['log'](typeof _0x32371c==='object'?JSON[_0xbce361(0x187)](_0x32371c,null,0x2):String(_0x32371c)),{'ok':!![]};}},setDef={'service':a14_0x3994b8(0x186),'command':'set','description':a14_0x3994b8(0x1a5),'risk':a14_0x3994b8(0x181),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x3994b8(0x176),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x3994b8(0x199),'description':a14_0x3994b8(0x177),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x2fa847){const _0x4bbe53=a14_0x3994b8,_0x40ed87=_0x2fa847['args'][0x0],_0x548744=_0x2fa847[_0x4bbe53(0x195)][0x1];if(!_0x40ed87||_0x548744===undefined)throw CliErrors['validation'](_0x4bbe53(0x18e),_0x4bbe53(0x1a1)+CLI_BIN_NAME+_0x4bbe53(0x1a3));if(ENUM_KEYS[_0x40ed87]&&!ENUM_KEYS[_0x40ed87][_0x4bbe53(0x1a0)](_0x548744))throw CliErrors[_0x4bbe53(0x16b)](_0x4bbe53(0x162)+_0x40ed87+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x40ed87][_0x4bbe53(0x16d)](',\x20'));if(_0x40ed87===_0x4bbe53(0x183))throw CliErrors[_0x4bbe53(0x16b)](_0x4bbe53(0x160));if(_0x40ed87===_0x4bbe53(0x161)){const _0xc6db34=Number(_0x548744);if(isNaN(_0xc6db34)||_0xc6db34<=0x0)throw CliErrors['validation']('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x51af44=resolveWriteScope({'explicitGlobal':_0x2fa847['bool'](_0x4bbe53(0x17b)),'policy':_0x4bbe53(0x17e)}),_0x8ba79e=toScopeFlags(_0x51af44),_0x443a08=readScopedConfig(_0x8ba79e),_0x335336=parseAliasAppcodeSetKey(_0x40ed87);if(!_0x335336&&!isTopLevelConfigKey(_0x40ed87))throw CliErrors[_0x4bbe53(0x16b)](_0x4bbe53(0x18f)+_0x40ed87+_0x4bbe53(0x188),_0x4bbe53(0x17c)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x335336?setLocalAppAlias(_0x443a08,_0x335336,_0x548744):_0x443a08[_0x40ed87]=_0x40ed87===_0x4bbe53(0x161)?Number(_0x548744):_0x548744,console[_0x4bbe53(0x178)]('Set\x20`'+_0x40ed87+_0x4bbe53(0x185)+_0x548744+'\x22'+(_0x51af44===_0x4bbe53(0x17b)?_0x4bbe53(0x164):'')),writeScopedConfig(_0x443a08,_0x8ba79e),{'ok':!![]};}},deleteDef={'service':a14_0x3994b8(0x186),'command':a14_0x3994b8(0x1a4),'description':a14_0x3994b8(0x192),'risk':a14_0x3994b8(0x181),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x3994b8(0x176),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x118822){const _0x15ee37=a14_0x3994b8,_0x31bc5f=_0x118822[_0x15ee37(0x195)][0x0];if(!_0x31bc5f)throw CliErrors[_0x15ee37(0x16b)](_0x15ee37(0x19f),'Usage:\x20'+CLI_BIN_NAME+_0x15ee37(0x184));const _0x15e029=resolveWriteScope({'explicitGlobal':_0x118822[_0x15ee37(0x1a2)](_0x15ee37(0x17b)),'policy':_0x15ee37(0x17e)}),_0xcf337b=toScopeFlags(_0x15e029),_0x30ead9=readScopedConfig(_0xcf337b),_0x48ece2=parseAliasDeleteKey(_0x31bc5f);if(_0x48ece2){if(!deleteLocalAppAlias(_0x30ead9,_0x48ece2))throw CliErrors[_0x15ee37(0x16b)]('Key\x20not\x20found:\x20'+_0x31bc5f);return console[_0x15ee37(0x178)]('Deleted\x20`'+_0x31bc5f+'`'+(_0x15e029===_0x15ee37(0x17b)?_0x15ee37(0x164):'')),writeScopedConfig(_0x30ead9,_0xcf337b),{'ok':!![]};}if(_0x30ead9[_0x31bc5f]===undefined)throw CliErrors['validation'](_0x15ee37(0x175)+_0x31bc5f+_0x15ee37(0x190));return delete _0x30ead9[_0x31bc5f],console[_0x15ee37(0x178)](_0x15ee37(0x19e)+_0x31bc5f+'`'+(_0x15e029==='global'?'\x20(global)':'')),writeScopedConfig(_0x30ead9,_0xcf337b),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
function a14_0x3090(){const _0x17a8a3=['isArray','Missing\x20key\x20or\x20value.','1274jmlZri','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Config\x20files:\x0a','set','split','Get\x20a\x20config\x20value','get','trim','delete','object','read','Missing\x20key\x20argument.','args','write','format','\x20(global)','Write\x20to\x20global\x20config','raw','15162XodcrY','../../context.js','Settable\x20keys:\x20','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','pretty','length','Usage:\x20','pageSize\x20must\x20be\x20a\x20positive\x20number','\x20\x20project:\x20','\x22.\x20Allowed:\x20','global','Key\x20\x22','\x22\x20is\x20not\x20settable.','Delete\x20a\x20config\x20value','Key\x20not\x20found:\x20','pageSize','log','Invalid\x20value\x20for\x20\x22','\x22\x20not\x20found\x20at\x20top\x20level.','784430IPyUUt','78584RnNaUB','bool','Set\x20`','includes','key','config','field','Value\x20to\x20assign','641yDEuKp','1966371vXjAXR','1520230WsJQko','List\x20current\x20config','`\x20=\x20\x22','1025523XkuPBo','project-or-global-explicit','\x20config\x20set\x20<key>\x20<value>\x20[--global]',';\x20apps.<alias>.appcode','16gYFwMm','validation','87LWOaRv','598IVjKKC','stringify','\x20\x20global:\x20\x20','keys','alias','boolean','Deleted\x20`','apps','appcode'];a14_0x3090=function(){return _0x17a8a3;};return a14_0x3090();}const a14_0x7fff7b=a14_0xfbf8;(function(_0x4890a0,_0x38fe07){const _0x255b38=a14_0xfbf8,_0x17cd71=_0x4890a0();while(!![]){try{const _0x5add08=parseInt(_0x255b38(0xe1))/0x1*(-parseInt(_0x255b38(0xed))/0x2)+parseInt(_0x255b38(0xec))/0x3*(parseInt(_0x255b38(0xd9))/0x4)+-parseInt(_0x255b38(0xd8))/0x5+parseInt(_0x255b38(0xc5))/0x6*(-parseInt(_0x255b38(0xb3))/0x7)+-parseInt(_0x255b38(0xea))/0x8*(-parseInt(_0x255b38(0xe6))/0x9)+parseInt(_0x255b38(0xe3))/0xa+parseInt(_0x255b38(0xe2))/0xb;if(_0x5add08===_0x38fe07)break;else _0x17cd71['push'](_0x17cd71['shift']());}catch(_0x315154){_0x17cd71['push'](_0x17cd71['shift']());}}}(a14_0x3090,0x4e1d1));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_0x7fff7b(0xcf),'type':a14_0x7fff7b(0xf2),'description':a14_0x7fff7b(0xc3),'default':![]};function parseAliasAppcodeSetKey(_0x3def80){const _0x2fa669=a14_0x7fff7b,_0x3867a8=_0x3def80[_0x2fa669(0xb7)]('.');if(_0x3867a8[_0x2fa669(0xca)]!==0x3||_0x3867a8[0x0]!==_0x2fa669(0xf4)||_0x3867a8[0x2]!==_0x2fa669(0xb0))return undefined;const _0x16d0ae=_0x3867a8[0x1]?.['trim']();return _0x16d0ae?_0x16d0ae:undefined;}function a14_0xfbf8(_0xf9846c,_0x3cb4d2){_0xf9846c=_0xf9846c-0xb0;const _0x309053=a14_0x3090();let _0xfbf835=_0x309053[_0xf9846c];return _0xfbf835;}function parseAliasDeleteKey(_0x1ad979){const _0x317736=a14_0x7fff7b,_0x4e07a9=_0x1ad979[_0x317736(0xb7)]('.');if(_0x4e07a9[_0x317736(0xca)]===0x2&&_0x4e07a9[0x0]===_0x317736(0xf4)){const _0x46c63b=_0x4e07a9[0x1]?.[_0x317736(0xba)]();return _0x46c63b?{'alias':_0x46c63b}:undefined;}if(_0x4e07a9[_0x317736(0xca)]===0x3&&_0x4e07a9[0x0]==='apps'&&_0x4e07a9[0x2]===_0x317736(0xb0)){const _0x2e1cf7=_0x4e07a9[0x1]?.[_0x317736(0xba)]();return _0x2e1cf7?{'alias':_0x2e1cf7,'field':_0x317736(0xb0)}:undefined;}return undefined;}function setLocalAppAlias(_0x21ad26,_0x472ec3,_0x33cfea){const _0x321bac=a14_0x7fff7b,_0x34cc71=_0x21ad26[_0x321bac(0xf4)]&&typeof _0x21ad26[_0x321bac(0xf4)]===_0x321bac(0xbc)&&!Array[_0x321bac(0xb1)](_0x21ad26[_0x321bac(0xf4)])?_0x21ad26['apps']:{},_0x55e2fd=_0x34cc71[_0x472ec3]&&typeof _0x34cc71[_0x472ec3]==='object'&&!Array[_0x321bac(0xb1)](_0x34cc71[_0x472ec3])?_0x34cc71[_0x472ec3]:{};_0x55e2fd[_0x321bac(0xb0)]=_0x33cfea,_0x34cc71[_0x472ec3]=_0x55e2fd,_0x21ad26[_0x321bac(0xf4)]=_0x34cc71;}function deleteLocalAppAlias(_0x3be762,_0x5d8ed9){const _0x4224e5=a14_0x7fff7b;if(!_0x3be762['apps']||typeof _0x3be762[_0x4224e5(0xf4)]!=='object'||Array[_0x4224e5(0xb1)](_0x3be762['apps']))return![];const _0x488920=_0x3be762[_0x4224e5(0xf4)],_0x1e379c=_0x488920[_0x5d8ed9[_0x4224e5(0xf1)]];if(!_0x1e379c||typeof _0x1e379c!==_0x4224e5(0xbc)||Array[_0x4224e5(0xb1)](_0x1e379c))return![];if(!_0x5d8ed9[_0x4224e5(0xdf)])return delete _0x488920[_0x5d8ed9[_0x4224e5(0xf1)]],!![];if(!(_0x5d8ed9['field']in _0x1e379c))return![];return delete _0x1e379c[_0x5d8ed9[_0x4224e5(0xdf)]],Object[_0x4224e5(0xf0)](_0x1e379c)[_0x4224e5(0xca)]===0x0&&delete _0x488920[_0x5d8ed9[_0x4224e5(0xf1)]],!![];}const listDef={'service':'config','command':'list','description':a14_0x7fff7b(0xe4),'risk':a14_0x7fff7b(0xbd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x187924){const _0x4ed99e=a14_0x7fff7b,{buildConfigFromFlags:_0x489758}=await import(_0x4ed99e(0xc6)),_0x5f1767=_0x489758({}),_0x348510=getProjectConfigPath(),_0x2b09c7=resolveWriteConfigPath('global');if(_0x187924[_0x4ed99e(0xc1)]===_0x4ed99e(0xc9))return{'ok':!![],'message':_0x4ed99e(0xb4)+(JSON['stringify'](_0x5f1767[_0x4ed99e(0xc4)],null,0x2)+'\x0a\x0a')+_0x4ed99e(0xb5)+(_0x4ed99e(0xcd)+(_0x348510??'(none)')+'\x0a')+(_0x4ed99e(0xef)+_0x2b09c7)};return{'ok':!![],'data':{'effective':_0x5f1767[_0x4ed99e(0xc4)],'configFiles':{'project':_0x348510??null,'global':_0x2b09c7}}};}},getDef={'service':'config','command':a14_0x7fff7b(0xb9),'description':a14_0x7fff7b(0xb8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x7fff7b(0xdd),'description':a14_0x7fff7b(0xc8),'required':!![]}],'flags':[],async 'execute'(_0x481138){const _0x11b3e3=a14_0x7fff7b,_0x22e85e=_0x481138[_0x11b3e3(0xbf)][0x0];if(!_0x22e85e)throw CliErrors[_0x11b3e3(0xeb)](_0x11b3e3(0xbe),_0x11b3e3(0xcb)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x35eb53}=await import(_0x11b3e3(0xc6)),{raw:_0x2fa67a}=_0x35eb53({});if(_0x22e85e['includes']('.')){const _0xd545d=_0x22e85e[_0x11b3e3(0xb7)]('.');let _0x5c8ed2=_0x2fa67a;for(const _0x74642c of _0xd545d){if(_0x5c8ed2==null||typeof _0x5c8ed2!=='object')throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x22e85e);_0x5c8ed2=_0x5c8ed2[_0x74642c];}if(_0x5c8ed2===undefined)throw CliErrors[_0x11b3e3(0xeb)](_0x11b3e3(0xd3)+_0x22e85e);return console[_0x11b3e3(0xd5)](typeof _0x5c8ed2===_0x11b3e3(0xbc)?JSON[_0x11b3e3(0xee)](_0x5c8ed2,null,0x2):String(_0x5c8ed2)),{'ok':!![]};}const _0x5ad6a5=_0x2fa67a[_0x22e85e];if(_0x5ad6a5===undefined)throw CliErrors[_0x11b3e3(0xeb)](_0x11b3e3(0xd3)+_0x22e85e);return console['log'](typeof _0x5ad6a5==='object'?JSON[_0x11b3e3(0xee)](_0x5ad6a5,null,0x2):String(_0x5ad6a5)),{'ok':!![]};}},setDef={'service':a14_0x7fff7b(0xde),'command':a14_0x7fff7b(0xb6),'description':'Set\x20a\x20config\x20value','risk':a14_0x7fff7b(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x7fff7b(0xdd),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':a14_0x7fff7b(0xe0),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4e8b84){const _0x571462=a14_0x7fff7b,_0x2c2a18=_0x4e8b84[_0x571462(0xbf)][0x0],_0x3f5ba1=_0x4e8b84['args'][0x1];if(!_0x2c2a18||_0x3f5ba1===undefined)throw CliErrors[_0x571462(0xeb)](_0x571462(0xb2),'Usage:\x20'+CLI_BIN_NAME+_0x571462(0xe8));if(ENUM_KEYS[_0x2c2a18]&&!ENUM_KEYS[_0x2c2a18][_0x571462(0xdc)](_0x3f5ba1))throw CliErrors[_0x571462(0xeb)](_0x571462(0xd6)+_0x2c2a18+_0x571462(0xce)+ENUM_KEYS[_0x2c2a18]['join'](',\x20'));if(_0x2c2a18==='riskLevel')throw CliErrors['validation']('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x2c2a18===_0x571462(0xd4)){const _0x3e629d=Number(_0x3f5ba1);if(isNaN(_0x3e629d)||_0x3e629d<=0x0)throw CliErrors['validation'](_0x571462(0xcc));}const _0x5aeb30=resolveWriteScope({'explicitGlobal':_0x4e8b84[_0x571462(0xda)](_0x571462(0xcf)),'policy':_0x571462(0xe7)}),_0x2b2467=toScopeFlags(_0x5aeb30),_0x598a47=readScopedConfig(_0x2b2467),_0x222e1b=parseAliasAppcodeSetKey(_0x2c2a18);if(!_0x222e1b&&!isTopLevelConfigKey(_0x2c2a18))throw CliErrors[_0x571462(0xeb)]('Top-level\x20key\x20\x22'+_0x2c2a18+_0x571462(0xd1),_0x571462(0xc7)+getTopLevelConfigKeySummary()+_0x571462(0xe9));return _0x222e1b?setLocalAppAlias(_0x598a47,_0x222e1b,_0x3f5ba1):_0x598a47[_0x2c2a18]=_0x2c2a18===_0x571462(0xd4)?Number(_0x3f5ba1):_0x3f5ba1,console['log'](_0x571462(0xdb)+_0x2c2a18+_0x571462(0xe5)+_0x3f5ba1+'\x22'+(_0x5aeb30===_0x571462(0xcf)?_0x571462(0xc2):'')),writeScopedConfig(_0x598a47,_0x2b2467),{'ok':!![]};}},deleteDef={'service':a14_0x7fff7b(0xde),'command':a14_0x7fff7b(0xbb),'description':a14_0x7fff7b(0xd2),'risk':a14_0x7fff7b(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x7fff7b(0xdd),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x15df42){const _0xb4d107=a14_0x7fff7b,_0x4fce42=_0x15df42[_0xb4d107(0xbf)][0x0];if(!_0x4fce42)throw CliErrors[_0xb4d107(0xeb)]('Missing\x20key\x20argument.',_0xb4d107(0xcb)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x33996d=resolveWriteScope({'explicitGlobal':_0x15df42['bool'](_0xb4d107(0xcf)),'policy':_0xb4d107(0xe7)}),_0x29b496=toScopeFlags(_0x33996d),_0xc162f1=readScopedConfig(_0x29b496),_0x23ef01=parseAliasDeleteKey(_0x4fce42);if(_0x23ef01){if(!deleteLocalAppAlias(_0xc162f1,_0x23ef01))throw CliErrors['validation'](_0xb4d107(0xd3)+_0x4fce42);return console['log'](_0xb4d107(0xf3)+_0x4fce42+'`'+(_0x33996d===_0xb4d107(0xcf)?_0xb4d107(0xc2):'')),writeScopedConfig(_0xc162f1,_0x29b496),{'ok':!![]};}if(_0xc162f1[_0x4fce42]===undefined)throw CliErrors['validation'](_0xb4d107(0xd0)+_0x4fce42+_0xb4d107(0xd7));return delete _0xc162f1[_0x4fce42],console[_0xb4d107(0xd5)](_0xb4d107(0xf3)+_0x4fce42+'`'+(_0x33996d===_0xb4d107(0xcf)?'\x20(global)':'')),writeScopedConfig(_0xc162f1,_0x29b496),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x18a6a,_0x1a2efa){var _0x42ce2a=a15_0x3888,_0x1c8729=_0x18a6a();while(!![]){try{var _0x286907=-parseInt(_0x42ce2a(0x9e))/0x1*(parseInt(_0x42ce2a(0xa4))/0x2)+parseInt(_0x42ce2a(0xa2))/0x3*(parseInt(_0x42ce2a(0x9d))/0x4)+parseInt(_0x42ce2a(0xa5))/0x5*(-parseInt(_0x42ce2a(0xa0))/0x6)+parseInt(_0x42ce2a(0x9b))/0x7*(-parseInt(_0x42ce2a(0x9f))/0x8)+parseInt(_0x42ce2a(0x9c))/0x9+parseInt(_0x42ce2a(0xa3))/0xa+-parseInt(_0x42ce2a(0xa1))/0xb*(parseInt(_0x42ce2a(0x9a))/0xc);if(_0x286907===_0x1a2efa)break;else _0x1c8729['push'](_0x1c8729['shift']());}catch(_0x3ff761){_0x1c8729['push'](_0x1c8729['shift']());}}}(a15_0x4eb5,0x50993));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x4eb5(){var _0x5d2abd=['1165219RZTbLb','3htwerv','4766570FXgubv','8336fftkwH','83560FdgivC','12kGHvEt','476HRHDei','1020546RiJpJB','635092xZlCJp','27haLsZV','19624SVjwSD','12zsGmGs'];a15_0x4eb5=function(){return _0x5d2abd;};return a15_0x4eb5();}export{CLI_BIN_NAME};function a15_0x3888(_0x116cf2,_0x42bca2){_0x116cf2=_0x116cf2-0x9a;var _0x4eb507=a15_0x4eb5();var _0x388871=_0x4eb507[_0x116cf2];return _0x388871;}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';
|