@lovrabet/lovrabet-cli 2.0.10 → 2.0.11
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 +17 -3
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(function(
|
|
2
|
+
const a0_0xec6f3c=a0_0x4c00;(function(_0x42df91,_0x5c59ae){const _0x49bfc9=a0_0x4c00,_0x3a151e=_0x42df91();while(!![]){try{const _0x209b6a=-parseInt(_0x49bfc9(0x174))/0x1+-parseInt(_0x49bfc9(0x164))/0x2*(parseInt(_0x49bfc9(0x161))/0x3)+parseInt(_0x49bfc9(0x176))/0x4+-parseInt(_0x49bfc9(0x169))/0x5*(-parseInt(_0x49bfc9(0x16b))/0x6)+parseInt(_0x49bfc9(0x178))/0x7+-parseInt(_0x49bfc9(0x166))/0x8+parseInt(_0x49bfc9(0x180))/0x9*(parseInt(_0x49bfc9(0x160))/0xa);if(_0x209b6a===_0x5c59ae)break;else _0x3a151e['push'](_0x3a151e['shift']());}catch(_0x16149f){_0x3a151e['push'](_0x3a151e['shift']());}}}(a0_0x3c6e,0x25dc5));import{jsx as a0_0x4c872d}from'react/jsx-runtime';import a0_0x5d0d8d from'meow';import{render}from'ink';function a0_0x4c00(_0x2776a8,_0x32417f){_0x2776a8=_0x2776a8-0x160;const _0x3c6e45=a0_0x3c6e();let _0x4c000b=_0x3c6e45[_0x2776a8];return _0x4c000b;}import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';function a0_0x3c6e(){const _0x488413=['hint','write','ExitPromptError','error','115134rhyDVK','exitCode','155908TDoEqT','\x20->\x20--','1047179WfoFkm','cancelled','name','catch','exit','ERR_USE_AFTER_CLOSE','defaultCommand','Unexpected\x20error:','729IbBkLj','code','27580QAsjMU','22224VCdvBz','\x0aCancelled.\x0a','assign','6BrjYQr','original','1047088QuCiug','log','help','585OTgNfy','flags','582IyTuEA','stderr','unknownCommand','length','input'];a0_0x3c6e=function(){return _0x488413;};return a0_0x3c6e();}import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x5d0d8d(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()[a0_0xec6f3c(0x17b)](handleError);async function main(){try{await run();}catch(_0x3183b7){handleError(_0x3183b7);}}async function run(){const _0x5bad5c=a0_0xec6f3c;let _0x2d7606=cli[_0x5bad5c(0x16f)][0x0],_0x145349=cli[_0x5bad5c(0x16f)][0x1];const _0xcbcd92=cli[_0x5bad5c(0x16a)];try{const {correctFlags:_0x1ac17d}=await import('./framework/preparse.js'),_0x314a77=getAllDefinitions()['flatMap'](_0x32e361=>_0x32e361[_0x5bad5c(0x16a)]??[]),{flags:_0x4b851b,corrections:_0x84e856}=_0x1ac17d(_0xcbcd92,_0x314a77);if(_0x84e856[_0x5bad5c(0x16e)]>0x0){for(const _0x5e836b of _0x84e856){process[_0x5bad5c(0x16c)][_0x5bad5c(0x171)]('[preparse]\x20'+_0x5e836b['handler']+':\x20--'+_0x5e836b[_0x5bad5c(0x165)]+_0x5bad5c(0x177)+_0x5e836b['corrected']+'\x0a');}Object[_0x5bad5c(0x163)](_0xcbcd92,_0x4b851b);}}catch{}if(!_0x2d7606||!isKnownService(_0x2d7606)){const {waitUntilExit:_0x4b8626}=render(a0_0x4c872d(Help,{}));await _0x4b8626();return;}const _0x2e0629=getServiceEntry(_0x2d7606);if(!_0x145349){if(_0xcbcd92[_0x5bad5c(0x168)]){console[_0x5bad5c(0x167)](generateServiceHelp(_0x2d7606));return;}if(_0x2e0629['defaultCommand'])_0x145349=_0x2e0629[_0x5bad5c(0x17e)];else{console[_0x5bad5c(0x167)](generateServiceHelp(_0x2d7606));return;}}const _0xc4135d=findDefinition(_0x2d7606,_0x145349);!_0xc4135d&&(console[_0x5bad5c(0x167)](generateServiceHelp(_0x2d7606)),handleError(CliErrors[_0x5bad5c(0x16d)](_0x2d7606+'\x20'+_0x145349)));if(_0xcbcd92[_0x5bad5c(0x168)]){console['log'](generateCommandHelp(_0xc4135d));return;}const _0x39cacd=buildConfigFromFlags(_0xcbcd92);await initGlobalEnvironment(_0x39cacd);const _0x1fe76a=createPipelineEnv(_0x39cacd,_0xcbcd92);_0x1fe76a['args']=cli[_0x5bad5c(0x16f)]['slice'](0x2),await runCommand(_0xc4135d,_0x1fe76a);}function handleError(_0x44f071){const _0x4fbeca=a0_0xec6f3c;if(_0x44f071 instanceof CliError){_0x44f071[_0x4fbeca(0x181)]===_0x4fbeca(0x179)&&(process[_0x4fbeca(0x16c)][_0x4fbeca(0x171)]('\x0aCancelled.\x0a'),process['exit'](0x0));console[_0x4fbeca(0x173)]('Error:\x20'+_0x44f071['message']);if(_0x44f071[_0x4fbeca(0x170)])console[_0x4fbeca(0x173)]('Hint:\x20'+_0x44f071[_0x4fbeca(0x170)]);process[_0x4fbeca(0x17c)](_0x44f071[_0x4fbeca(0x175)]);}isUserCancellation(_0x44f071)&&(process[_0x4fbeca(0x16c)]['write'](_0x4fbeca(0x162)),process[_0x4fbeca(0x17c)](0x0)),console[_0x4fbeca(0x173)](_0x4fbeca(0x17f),_0x44f071),process['exit'](0x1);}function isUserCancellation(_0x12c34e){const _0x506350=a0_0xec6f3c;if(!(_0x12c34e instanceof Error))return![];if(_0x12c34e[_0x506350(0x17a)]===_0x506350(0x172))return!![];if(_0x12c34e['code']===_0x506350(0x17d))return!![];if(_0x12c34e['code']==='ERR_STREAM_DESTROYED')return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f3236,_0x4492af){const _0x2cbb6d=a1_0x5247,_0x336c12=_0x5f3236();while(!![]){try{const _0x12c3f4=parseInt(_0x2cbb6d(0xf3))/0x1*(parseInt(_0x2cbb6d(0xef))/0x2)+parseInt(_0x2cbb6d(0xfd))/0x3*(parseInt(_0x2cbb6d(0x103))/0x4)+-parseInt(_0x2cbb6d(0x10d))/0x5*(parseInt(_0x2cbb6d(0xed))/0x6)+parseInt(_0x2cbb6d(0x10a))/0x7*(-parseInt(_0x2cbb6d(0xf0))/0x8)+-parseInt(_0x2cbb6d(0x102))/0x9+-parseInt(_0x2cbb6d(0x100))/0xa+parseInt(_0x2cbb6d(0xf2))/0xb*(parseInt(_0x2cbb6d(0xf8))/0xc);if(_0x12c3f4===_0x4492af)break;else _0x336c12['push'](_0x336c12['shift']());}catch(_0x127053){_0x336c12['push'](_0x336c12['shift']());}}}(a1_0x5890,0xca6e1));import{createHash}from'node:crypto';function a1_0x5247(_0x17e7c4,_0x3aa0fb){_0x17e7c4=_0x17e7c4-0xed;const _0x589011=a1_0x5890();let _0x524772=_0x589011[_0x17e7c4];return _0x524772;}function a1_0x5890(){const _0x18ce02=['.tmp','parse','167811nMVSSC','appName','unknown','1270HgOjIB','29034NxaxOV','trim','4vRPbqb','312zYOkTQ','sha256','2252371QqKGsZ','452553OiEjQn','appCode','homeDirName','find','cache','120ZspXqx','hex','slice','items','utf8','175995oKStwc','EACCES','isArray','2471570CLVFpL','digest','5330952zSiMBm','60rxlfxq','EXDEV','stringify','update','code'];a1_0x5890=function(){return _0x18ce02;};return a1_0x5890();}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(_0xcbb4f4){const _0x35ed86=a1_0x5247,_0x48edf2=_0xcbb4f4[_0x35ed86(0xee)](),_0x4d8604=_0x48edf2[_0x35ed86(0xfa)](-0x6)||_0x35ed86(0x10c),_0x49998e=createHash(_0x35ed86(0xf1))[_0x35ed86(0x106)](_0x48edf2)[_0x35ed86(0x101)](_0x35ed86(0xf9))[_0x35ed86(0xfa)](0x0,0xc);return'ak_'+_0x4d8604+'_'+_0x49998e;}export function getAppCacheFilePath(_0x52ff0a,_0x55948c){const _0x31876a=a1_0x5247;return resolve(homedir(),PRODUCT_CONFIG[_0x31876a(0xf5)],_0x31876a(0xf7),_0x52ff0a,fingerprintAccessKey(_0x55948c),'my-apps.json');}export function readCachedAppList(_0x42cef2,_0x126e3d){const _0x45f5a4=a1_0x5247;if(!_0x126e3d?.[_0x45f5a4(0xee)]())return null;const _0x1b04cc=getAppCacheFilePath(_0x42cef2,_0x126e3d);if(!existsSync(_0x1b04cc))return null;try{const _0x4d2829=readFileSync(_0x1b04cc,_0x45f5a4(0xfc));if(!_0x4d2829[_0x45f5a4(0xee)]())return null;const _0x650c64=JSON[_0x45f5a4(0x109)](_0x4d2829);if(!Array[_0x45f5a4(0xff)](_0x650c64['items']))return null;return _0x650c64;}catch{return null;}}export function writeCachedAppList(_0x5f7d62,_0x2c3777,_0x5adf1f){const _0x587f51=a1_0x5247,_0x3a49a9=getAppCacheFilePath(_0x5f7d62,_0x2c3777),_0x96178e=dirname(_0x3a49a9);!existsSync(_0x96178e)&&mkdirSync(_0x96178e,{'recursive':!![]});const _0x56b09d=_0x3a49a9+_0x587f51(0x108);try{writeFileSync(_0x56b09d,JSON[_0x587f51(0x105)](_0x5adf1f,null,0x2)+'\x0a',{'encoding':_0x587f51(0xfc),'mode':0x180});try{renameSync(_0x56b09d,_0x3a49a9);}catch(_0x38f037){if(_0x38f037[_0x587f51(0x107)]==='EPERM'||_0x38f037['code']===_0x587f51(0x104)||_0x38f037['code']===_0x587f51(0xfe)){writeFileSync(_0x3a49a9,JSON[_0x587f51(0x105)](_0x5adf1f,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x56b09d);}catch{}}else throw _0x38f037;}}catch(_0x594d2c){try{unlinkSync(_0x56b09d);}catch{}throw _0x594d2c;}return _0x3a49a9;}export function resolveCachedAppCode(_0x4a219c,_0x3062a9,_0x384c3f){const _0x4ea12a=a1_0x5247;if(!_0x4a219c)return undefined;const _0x593779=readCachedAppList(_0x3062a9,_0x384c3f),_0x5ab936=_0x593779?.[_0x4ea12a(0xfb)][_0x4ea12a(0xf6)](_0x156d0f=>_0x156d0f[_0x4ea12a(0x10b)]===_0x4a219c);return _0x5ab936?.[_0x4ea12a(0xf4)]?.[_0x4ea12a(0xee)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x3eb605=a2_0x54f1;(function(_0x10cfe9,_0x3e9009){const _0x8597b6=a2_0x54f1,_0x2234ef=_0x10cfe9();while(!![]){try{const _0x4095b6=parseInt(_0x8597b6(0x1ea))/0x1*(-parseInt(_0x8597b6(0x1da))/0x2)+parseInt(_0x8597b6(0x1fa))/0x3+-parseInt(_0x8597b6(0x1de))/0x4*(parseInt(_0x8597b6(0x208))/0x5)+-parseInt(_0x8597b6(0x1f2))/0x6+parseInt(_0x8597b6(0x1db))/0x7*(-parseInt(_0x8597b6(0x1e9))/0x8)+parseInt(_0x8597b6(0x21f))/0x9*(-parseInt(_0x8597b6(0x219))/0xa)+parseInt(_0x8597b6(0x20a))/0xb;if(_0x4095b6===_0x3e9009)break;else _0x2234ef['push'](_0x2234ef['shift']());}catch(_0x7abfbd){_0x2234ef['push'](_0x2234ef['shift']());}}}(a2_0x9d94,0xb6426));import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';function a2_0x9d94(){const _0xadc541=['cachePath','../../context.js','Default\x20app\x20candidate\x20set\x20to\x20\x22','items','../../commands/app/remote-source.js','851346FlLLoj','find','Filter\x20by\x20environment\x20(default:\x20current\x20env)','args','import','source','entries','pull','trim','defaultApp','Available\x20remote\x20apps:\x20','\x20app\x20use\x20<name>\x20[--global]','Target\x20environment\x20(default:\x20current\x20env)','isArray','4893810htusjz','validation','50864869FWVHSD','bool','isCurrent','boolean','accessKey','list','Use\x20`','map','use','appName','App\x20\x22','Missing\x20app\x20name.','global','appOwnerName','join','2265590OFBnth','newConfigFileName','env','appcode','Loaded\x20','no-cache','18hthvlf','read','No\x20apps\x20found\x20on\x20the\x20platform.','mergedCli','local','envName','fetchedAt','Remote\x20app\x20name\x20to\x20activate','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','../../commands/app/cache.js','production','langs','write','Refreshed\x20app\x20cache\x20with\x20','10wwRibN','49ueJXzF','i18nInfo','No\x20cached\x20apps\x20found.','4eBLSiy','nonInteractive','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','enableI18n','str','name','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','app','Set\x20the\x20fallback\x20app\x20candidate','cache','\x20app(s)\x20for\x20env=\x22','1593976FbOuGM','166570Hlemyy','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','Usage:\x20','remote','length','raw','Use\x20global\x20config\x20scope','\x20config\x20file','3011208eQXnoa','from','string'];a2_0x9d94=function(){return _0xadc541;};return a2_0x9d94();}const GLOBAL_FLAG={'name':a2_0x3eb605(0x216),'type':a2_0x3eb605(0x20d),'description':a2_0x3eb605(0x1f0),'default':![]};function collectFlags(_0x2e8409,_0x4c7913){const _0x2edfee=a2_0x3eb605,_0x1f8264={};for(const _0x2e0585 of _0x4c7913){const _0x3c34cd=_0x2e0585['type']===_0x2edfee(0x20d)?_0x2e8409[_0x2edfee(0x20b)](_0x2e0585[_0x2edfee(0x1e3)]):_0x2e8409[_0x2edfee(0x1e2)](_0x2e0585[_0x2edfee(0x1e3)]);if(_0x3c34cd!==''&&_0x3c34cd!==![])_0x1f8264[_0x2e0585[_0x2edfee(0x1e3)]]=_0x3c34cd;}if(_0x2e8409['nonInteractive'])_0x1f8264[_0x2edfee(0x1df)]=!![];return _0x1f8264;}function normalizeLanguages(_0x2a812b){const _0x2d786b=a2_0x3eb605;if(!Array[_0x2d786b(0x207)](_0x2a812b))return[];return _0x2a812b['filter'](_0x2f7f57=>typeof _0x2f7f57===_0x2d786b(0x1f4))[_0x2d786b(0x211)](_0x1c95d6=>_0x1c95d6[_0x2d786b(0x202)]())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x2acc31){const _0x215e16=a2_0x3eb605,_0x2496df=normalizeLanguages(_0x2acc31[_0x215e16(0x1dc)]?.[_0x215e16(0x1d7)]);return{'enableI18n':typeof _0x2acc31['enableI18n']===_0x215e16(0x20d)?_0x2acc31[_0x215e16(0x1e1)]:null,'languages':_0x2496df,'i18nInfo':_0x2acc31[_0x215e16(0x1dc)]?{..._0x2acc31[_0x215e16(0x1dc)],'langs':_0x2496df[_0x215e16(0x1ee)]?_0x2496df:null}:null};}const initDef={'service':a2_0x3eb605(0x1e5),'command':'init','description':'Initialize\x20'+PRODUCT_CONFIG[a2_0x3eb605(0x21a)]+a2_0x3eb605(0x1f1),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x376172){return await runInit(collectFlags(_0x376172,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x3eb605(0x1e5),'command':a2_0x3eb605(0x20f),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a2_0x3eb605(0x220),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x3eb605(0x21b),'type':'string','description':a2_0x3eb605(0x1fc),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x3eb605(0x223),'type':a2_0x3eb605(0x20d),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x3eb605(0x21e),'type':'boolean','description':a2_0x3eb605(0x227),'default':![]}],async 'execute'(_0x106307){const _0x80c121=a2_0x3eb605,_0x1dca1a=_0x106307[_0x80c121(0x1e2)](_0x80c121(0x21b))||_0x106307[_0x80c121(0x224)]||getEnv()||_0x80c121(0x229),_0x17a60e=_0x106307['bool'](_0x80c121(0x223)),_0x10c4f5=_0x106307[_0x80c121(0x20b)](_0x80c121(0x21e)),{readRawConfigWithLayers:_0x5d2efb,resolveDefaultAppSource:_0x332a67,getLocalAppAliases:_0x128851}=await import(_0x80c121(0x1f6)),{getRemoteAppList:_0x18af74}=await import(_0x80c121(0x1f9)),{config:_0x1b5f0e,layers:_0x2be831}=_0x5d2efb(),_0xf1b4a2=_0x332a67(_0x2be831),{defaultApp:_0x116f07}=_0x1b5f0e,_0x5d5d73=await _0x18af74({'env':_0x1dca1a,'accessKey':_0x106307[_0x80c121(0x20e)],'localOnly':_0x17a60e,'noCache':_0x10c4f5}),_0x245ab1=_0x5d5d73[_0x80c121(0x1f8)]['map'](_0x160cb4=>{const _0x2dde83=_0x80c121;return{'name':_0x160cb4[_0x2dde83(0x213)],'appcode':_0x160cb4['appCode'],'named':!![],'definedIn':_0x2dde83(0x1ed),'isDefault':_0x160cb4[_0x2dde83(0x213)]===_0x116f07,...buildAppProfileListFields(_0x1dca1a),...buildRemoteAppI18nFields(_0x160cb4),'source':_0x5d5d73[_0x2dde83(0x1ff)],'owner':_0x160cb4[_0x2dde83(0x217)]??null,'status':_0x160cb4['appPublishStatus']??null,'cachedAt':_0x5d5d73[_0x2dde83(0x225)]};}),_0x4d5dba=_0x128851(_0x1b5f0e);let _0x527693=0x0;for(const [_0x1da743,_0x46e52c]of Object[_0x80c121(0x200)](_0x4d5dba)){const _0x453c07=typeof _0x46e52c[_0x80c121(0x21c)]===_0x80c121(0x1f4)?_0x46e52c['appcode'][_0x80c121(0x202)]():'';if(!_0x453c07)continue;_0x527693+=0x1,_0x245ab1['push']({'name':_0x1da743,'appcode':_0x453c07,'named':!![],'definedIn':_0x80c121(0x223),'isDefault':_0x1da743===_0x116f07,...buildAppProfileListFields(_0x1dca1a),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x245ab1,_0x106307[_0x80c121(0x222)]);if(_0x245ab1[_0x80c121(0x1ee)]===0x0)return{'ok':!![],'data':[],'message':_0x5d5d73[_0x80c121(0x1ff)]===_0x80c121(0x1e7)?_0x80c121(0x1dd):_0x80c121(0x221)};const _0x51befc=_0x245ab1[_0x80c121(0x1fb)](_0x2812b0=>_0x2812b0[_0x80c121(0x20c)]===!![]),_0x35caea=_0x116f07??_0x51befc?.[_0x80c121(0x1e3)]??null,_0xcf5a2d={'env':_0x1dca1a,'source':_0x5d5d73[_0x80c121(0x1ff)],'fetchedAt':_0x5d5d73['fetchedAt'],'cachePath':_0x5d5d73[_0x80c121(0x1f5)],'globalPath':_0x2be831['globalPath']??null,'projectPath':_0x2be831['projectPath']??null,'defaultApp':_0x35caea,'defaultAppSource':_0x116f07!=null?_0xf1b4a2:null,'localAliasCount':_0x527693};return{'ok':!![],'data':{'items':_0x245ab1,'meta':_0xcf5a2d}};}},pullDef={'service':'app','command':a2_0x3eb605(0x201),'description':a2_0x3eb605(0x1eb),'risk':a2_0x3eb605(0x1d8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x3eb605(0x21b),'type':a2_0x3eb605(0x1f4),'description':a2_0x3eb605(0x206),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x3eb605(0x20d),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x3eb605(0x21e),'type':a2_0x3eb605(0x20d),'description':a2_0x3eb605(0x227),'default':![]}],async 'execute'(_0x239247){const _0x18a783=a2_0x3eb605,_0x591b76=_0x239247[_0x18a783(0x1e2)](_0x18a783(0x21b))||_0x239247[_0x18a783(0x224)]||getEnv()||_0x18a783(0x229),_0xe1a03b=_0x239247[_0x18a783(0x20b)]('local'),_0x2d55ab=_0x239247[_0x18a783(0x20b)](_0x18a783(0x21e)),{getRemoteAppList:_0x4ef556}=await import('../../commands/app/remote-source.js'),_0xdc10f8=await _0x4ef556({'env':_0x591b76,'accessKey':_0x239247[_0x18a783(0x20e)],'localOnly':_0xe1a03b,'noCache':_0x2d55ab});return{'ok':!![],'data':{'total':_0xdc10f8[_0x18a783(0x1f8)][_0x18a783(0x1ee)],'env':_0x591b76,'source':_0xdc10f8[_0x18a783(0x1ff)],'fetchedAt':_0xdc10f8[_0x18a783(0x225)],'cachePath':_0xdc10f8[_0x18a783(0x1f5)]},'message':_0xdc10f8[_0x18a783(0x1ff)]===_0x18a783(0x1e7)?_0x18a783(0x21d)+_0xdc10f8['items'][_0x18a783(0x1ee)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x591b76+'\x22.':_0x18a783(0x1d9)+_0xdc10f8[_0x18a783(0x1f8)]['length']+_0x18a783(0x1e8)+_0x591b76+'\x22.'};}},useDef={'service':a2_0x3eb605(0x1e5),'command':a2_0x3eb605(0x212),'description':a2_0x3eb605(0x1e6),'risk':a2_0x3eb605(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x3eb605(0x1e3),'description':a2_0x3eb605(0x226),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x34c546){const _0x562024=a2_0x3eb605;if(!_0x34c546[_0x562024(0x1fd)][0x0])throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x562024(0x205));},async 'execute'(_0x57e240){const _0xb80206=a2_0x3eb605,_0x3951e2=_0x57e240['args'][0x0];if(!_0x3951e2)throw CliErrors[_0xb80206(0x209)](_0xb80206(0x215),_0xb80206(0x1ec)+CLI_BIN_NAME+_0xb80206(0x205));const {buildConfigFromFlags:_0x2e0903,resolveLocalAppAliasCode:_0x35d360}=await import('../../context.js'),{readCachedAppList:_0x256c09}=await import(_0xb80206(0x228)),_0x13274b=_0x57e240[_0xb80206(0x1e2)](_0xb80206(0x21b)),_0x26a301=_0x2e0903(_0x13274b?{'env':_0x13274b}:{}),_0x3ec6a8=_0x256c09(_0x26a301['env'],_0x26a301[_0xb80206(0x20e)]),_0x37b883=_0x3ec6a8?.[_0xb80206(0x1f8)]['find'](_0x1cbeee=>_0x1cbeee[_0xb80206(0x213)]===_0x3951e2),_0x2668d1=_0x35d360(_0x26a301[_0xb80206(0x1ef)]??{},_0x3951e2);if(!_0x37b883&&!_0x2668d1&&_0x26a301['defaultApp']!==_0x3951e2){const _0x592f8e=[..._0x3ec6a8?.[_0xb80206(0x1f8)][_0xb80206(0x211)](_0x4d9692=>_0x4d9692[_0xb80206(0x213)])??[]],_0x518300=_0x592f8e[_0xb80206(0x1ee)]===0x0?_0xb80206(0x210)+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x3951e2+'.appcode\x20to\x20.lovrabet.json.':_0xb80206(0x204)+Array[_0xb80206(0x1f3)](new Set(_0x592f8e))[_0xb80206(0x218)](',\x20')+_0xb80206(0x1e0);throw CliErrors['validation'](_0xb80206(0x214)+_0x3951e2+'\x22\x20not\x20found.',_0x518300);}const _0x28594f=_0x57e240['bool'](_0xb80206(0x216));let _0x696a5b;if(_0x28594f)_0x696a5b={'global':!![]};else{const {isInProject:_0x109ac6}=await import(_0xb80206(0x1f6)),_0x435e7f=_0x109ac6();_0x696a5b=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x435e7f}));}const _0x47b750=readConfig(_0x696a5b);return _0x47b750[_0xb80206(0x203)]=_0x3951e2,writeConfig(_0x47b750,_0x696a5b),{'ok':!![],'message':_0xb80206(0x1f7)+_0x3951e2+'\x22'+scopeLabel(_0x696a5b)+'.'};}},importDef={'service':a2_0x3eb605(0x1e5),'command':a2_0x3eb605(0x1fe),'description':a2_0x3eb605(0x1e4),'risk':a2_0x3eb605(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x3e272f){return await runInitImport(collectFlags(_0x3e272f,initImportFlagDefs)),{'ok':!![]};}};function a2_0x54f1(_0x5941aa,_0x23ca2d){_0x5941aa=_0x5941aa-0x1d7;const _0x9d944e=a2_0x9d94();let _0x54f179=_0x9d944e[_0x5941aa];return _0x54f179;}export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a2_0x454578=a2_0x4c80;(function(_0x412439,_0x9d167e){const _0x2e077d=a2_0x4c80,_0x48e714=_0x412439();while(!![]){try{const _0x4e5fbc=-parseInt(_0x2e077d(0x185))/0x1*(parseInt(_0x2e077d(0x177))/0x2)+parseInt(_0x2e077d(0x1bf))/0x3+parseInt(_0x2e077d(0x1a4))/0x4*(-parseInt(_0x2e077d(0x172))/0x5)+parseInt(_0x2e077d(0x19a))/0x6+parseInt(_0x2e077d(0x1bd))/0x7*(-parseInt(_0x2e077d(0x18c))/0x8)+parseInt(_0x2e077d(0x1ab))/0x9+-parseInt(_0x2e077d(0x1ae))/0xa*(-parseInt(_0x2e077d(0x1ac))/0xb);if(_0x4e5fbc===_0x9d167e)break;else _0x48e714['push'](_0x48e714['shift']());}catch(_0xaa0da4){_0x48e714['push'](_0x48e714['shift']());}}}(a2_0x158f,0xdc8f2));function a2_0x158f(){const _0x5a6d8a=['production','isArray','join','boolean','cachePath','project-default','filter','Target\x20environment\x20(default:\x20current\x20env)','global','4308564xITILa','\x20cached\x20app(s)\x20for\x20env=\x22','Missing\x20app\x20name.','push','enableI18n','Use\x20`','source','entries','args','no-cache','4474084MMiytH','isCurrent','init','items','cache','.appcode\x20to\x20.lovrabet.json.','\x22\x20not\x20found.','12431817MqKICo','77zqFWMI','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','4281380Jpdjul','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','\x20app(s)\x20for\x20env=\x22','i18nInfo','accessKey','langs','fetchedAt','name','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','pull','../../context.js','App\x20\x22','bool','appPublishStatus','../../commands/app/cache.js','9576SsnePS','Set\x20the\x20fallback\x20app\x20candidate','796341qIZfRh','list','env','Filter\x20by\x20environment\x20(default:\x20current\x20env)','appcode','appName','defaultApp','app','Read\x20app\x20list\x20from\x20local\x20cache\x20only','nonInteractive','5eEZxDG','globalPath','\x20app\x20use\x20<name>\x20[--global]','envName','from','467246kXVIHQ','type','mergedCli','../../commands/app/remote-source.js','find','local','use','Refreshed\x20app\x20cache\x20with\x20','write','appCode','Remote\x20app\x20name\x20to\x20activate','No\x20cached\x20apps\x20found.','projectPath','validation','7WTBuFN','Usage:\x20','No\x20apps\x20found\x20on\x20the\x20platform.','map','Loaded\x20','str','Default\x20app\x20candidate\x20set\x20to\x20\x22','9968kQVtTd','length','raw','string','Initialize\x20'];a2_0x158f=function(){return _0x5a6d8a;};return a2_0x158f();}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':'global','type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]};function collectFlags(_0x4c67a8,_0x1feb49){const _0x40e578=a2_0x4c80,_0x52d4af={};for(const _0x2c0221 of _0x1feb49){const _0x180240=_0x2c0221[_0x40e578(0x178)]==='boolean'?_0x4c67a8[_0x40e578(0x1ba)](_0x2c0221[_0x40e578(0x1b5)]):_0x4c67a8[_0x40e578(0x18a)](_0x2c0221[_0x40e578(0x1b5)]);if(_0x180240!==''&&_0x180240!==![])_0x52d4af[_0x2c0221[_0x40e578(0x1b5)]]=_0x180240;}if(_0x4c67a8[_0x40e578(0x171)])_0x52d4af[_0x40e578(0x171)]=!![];return _0x52d4af;}function normalizeLanguages(_0x4c1cba){const _0x2a2e6e=a2_0x4c80;if(!Array[_0x2a2e6e(0x192)](_0x4c1cba))return[];return _0x4c1cba[_0x2a2e6e(0x197)](_0x48045f=>typeof _0x48045f===_0x2a2e6e(0x18f))['map'](_0x339146=>_0x339146['trim']())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x2f0ed2){const _0x502a52=a2_0x4c80,_0x28cfb4=normalizeLanguages(_0x2f0ed2['i18nInfo']?.[_0x502a52(0x1b3)]);return{'enableI18n':typeof _0x2f0ed2[_0x502a52(0x19e)]===_0x502a52(0x194)?_0x2f0ed2[_0x502a52(0x19e)]:null,'languages':_0x28cfb4,'i18nInfo':_0x2f0ed2[_0x502a52(0x1b1)]?{..._0x2f0ed2[_0x502a52(0x1b1)],'langs':_0x28cfb4[_0x502a52(0x18d)]?_0x28cfb4:null}:null};}function a2_0x4c80(_0x33adf1,_0x1059e7){_0x33adf1=_0x33adf1-0x169;const _0x158fed=a2_0x158f();let _0x4c80f8=_0x158fed[_0x33adf1];return _0x4c80f8;}const initDef={'service':'app','command':a2_0x454578(0x1a6),'description':a2_0x454578(0x190)+PRODUCT_CONFIG['newConfigFileName']+'\x20config\x20file','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x49cfd7){return await runInit(collectFlags(_0x49cfd7,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x454578(0x16f),'command':a2_0x454578(0x169),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':'string','description':a2_0x454578(0x16b),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x454578(0x17c),'type':'boolean','description':a2_0x454578(0x170),'default':![]},{'name':a2_0x454578(0x1a3),'type':a2_0x454578(0x194),'description':a2_0x454578(0x1b6),'default':![]}],async 'execute'(_0x1dd590){const _0x32976f=a2_0x454578,_0x2abda2=_0x1dd590[_0x32976f(0x18a)](_0x32976f(0x16a))||_0x1dd590[_0x32976f(0x175)]||getEnv()||_0x32976f(0x191),_0x91af06=_0x1dd590[_0x32976f(0x1ba)](_0x32976f(0x17c)),_0x1341c8=_0x1dd590[_0x32976f(0x1ba)](_0x32976f(0x1a3)),{readRawConfigWithLayers:_0x90869e,resolveDefaultAppSource:_0x4d3828,getLocalAppAliases:_0x3e78bf}=await import(_0x32976f(0x1b8)),{getRemoteAppList:_0x4082ee}=await import(_0x32976f(0x17a)),{config:_0x335021,layers:_0xff069c}=_0x90869e(),_0x172a4a=_0x4d3828(_0xff069c),{defaultApp:_0x159e9f}=_0x335021,_0x1c6fe8=await _0x4082ee({'env':_0x2abda2,'accessKey':_0x1dd590[_0x32976f(0x1b2)],'localOnly':_0x91af06,'noCache':_0x1341c8}),_0x480a60=_0x1c6fe8[_0x32976f(0x1a7)]['map'](_0x16194b=>{const _0x216fba=_0x32976f;return{'name':_0x16194b[_0x216fba(0x16d)],'appcode':_0x16194b[_0x216fba(0x180)],'named':!![],'definedIn':'remote','isDefault':_0x16194b[_0x216fba(0x16d)]===_0x159e9f,...buildAppProfileListFields(_0x2abda2),...buildRemoteAppI18nFields(_0x16194b),'source':_0x1c6fe8[_0x216fba(0x1a0)],'owner':_0x16194b['appOwnerName']??null,'status':_0x16194b[_0x216fba(0x1bb)]??null,'cachedAt':_0x1c6fe8[_0x216fba(0x1b4)]};}),_0x1fab0f=_0x3e78bf(_0x335021);let _0x1217d9=0x0;for(const [_0x7bc0b8,_0x27a6c7]of Object[_0x32976f(0x1a1)](_0x1fab0f)){const _0x233341=typeof _0x27a6c7[_0x32976f(0x16c)]===_0x32976f(0x18f)?_0x27a6c7[_0x32976f(0x16c)]['trim']():'';if(!_0x233341)continue;_0x1217d9+=0x1,_0x480a60[_0x32976f(0x19d)]({'name':_0x7bc0b8,'appcode':_0x233341,'named':!![],'definedIn':_0x32976f(0x17c),'isDefault':_0x7bc0b8===_0x159e9f,...buildAppProfileListFields(_0x2abda2),'source':'config','owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x480a60,_0x1dd590[_0x32976f(0x179)]);if(_0x480a60['length']===0x0)return{'ok':!![],'data':[],'message':_0x1c6fe8[_0x32976f(0x1a0)]===_0x32976f(0x1a8)?_0x32976f(0x182):_0x32976f(0x187)};const _0x58bfb9=_0x480a60[_0x32976f(0x17b)](_0x9d4639=>_0x9d4639[_0x32976f(0x1a5)]===!![]),_0x1de261=_0x159e9f??_0x58bfb9?.[_0x32976f(0x1b5)]??null,_0xb64aa5={'env':_0x2abda2,'source':_0x1c6fe8[_0x32976f(0x1a0)],'fetchedAt':_0x1c6fe8[_0x32976f(0x1b4)],'cachePath':_0x1c6fe8['cachePath'],'globalPath':_0xff069c[_0x32976f(0x173)]??null,'projectPath':_0xff069c[_0x32976f(0x183)]??null,'defaultApp':_0x1de261,'defaultAppSource':_0x159e9f!=null?_0x172a4a:null,'localAliasCount':_0x1217d9};return{'ok':!![],'data':{'items':_0x480a60,'meta':_0xb64aa5}};}},pullDef={'service':a2_0x454578(0x16f),'command':a2_0x454578(0x1b7),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x454578(0x16a),'type':a2_0x454578(0x18f),'description':a2_0x454578(0x198),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x454578(0x17c),'type':a2_0x454578(0x194),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x454578(0x1a3),'type':a2_0x454578(0x194),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x33c221){const _0x27d7a1=a2_0x454578,_0x3d86d9=_0x33c221['str'](_0x27d7a1(0x16a))||_0x33c221[_0x27d7a1(0x175)]||getEnv()||_0x27d7a1(0x191),_0x7daef6=_0x33c221[_0x27d7a1(0x1ba)](_0x27d7a1(0x17c)),_0x342d92=_0x33c221[_0x27d7a1(0x1ba)](_0x27d7a1(0x1a3)),{getRemoteAppList:_0x44014e}=await import(_0x27d7a1(0x17a)),_0x18efc8=await _0x44014e({'env':_0x3d86d9,'accessKey':_0x33c221['accessKey'],'localOnly':_0x7daef6,'noCache':_0x342d92});return{'ok':!![],'data':{'total':_0x18efc8[_0x27d7a1(0x1a7)][_0x27d7a1(0x18d)],'env':_0x3d86d9,'source':_0x18efc8[_0x27d7a1(0x1a0)],'fetchedAt':_0x18efc8['fetchedAt'],'cachePath':_0x18efc8[_0x27d7a1(0x195)]},'message':_0x18efc8[_0x27d7a1(0x1a0)]===_0x27d7a1(0x1a8)?_0x27d7a1(0x189)+_0x18efc8[_0x27d7a1(0x1a7)][_0x27d7a1(0x18d)]+_0x27d7a1(0x19b)+_0x3d86d9+'\x22.':_0x27d7a1(0x17e)+_0x18efc8[_0x27d7a1(0x1a7)][_0x27d7a1(0x18d)]+_0x27d7a1(0x1b0)+_0x3d86d9+'\x22.'};}},useDef={'service':'app','command':a2_0x454578(0x17d),'description':a2_0x454578(0x1be),'risk':a2_0x454578(0x17f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x454578(0x1b5),'description':a2_0x454578(0x181),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x1b472b){const _0xbfdaa1=a2_0x454578;if(!_0x1b472b[_0xbfdaa1(0x1a2)][0x0])throw CliErrors[_0xbfdaa1(0x184)](_0xbfdaa1(0x19c),_0xbfdaa1(0x186)+CLI_BIN_NAME+_0xbfdaa1(0x174));},async 'execute'(_0xa063d4){const _0x3b3b2a=a2_0x454578,_0x18f62e=_0xa063d4['args'][0x0];if(!_0x18f62e)throw CliErrors[_0x3b3b2a(0x184)](_0x3b3b2a(0x19c),'Usage:\x20'+CLI_BIN_NAME+_0x3b3b2a(0x174));const {buildConfigFromFlags:_0x281698,resolveLocalAppAliasCode:_0x63c089}=await import('../../context.js'),{readCachedAppList:_0x566b62}=await import(_0x3b3b2a(0x1bc)),_0x49029a=_0xa063d4[_0x3b3b2a(0x18a)](_0x3b3b2a(0x16a)),_0x501726=_0x281698(_0x49029a?{'env':_0x49029a}:{}),_0x1a8268=_0x566b62(_0x501726['env'],_0x501726[_0x3b3b2a(0x1b2)]),_0x455740=_0x1a8268?.['items'][_0x3b3b2a(0x17b)](_0x27a409=>_0x27a409['appName']===_0x18f62e),_0x306ed1=_0x63c089(_0x501726[_0x3b3b2a(0x18e)]??{},_0x18f62e);if(!_0x455740&&!_0x306ed1&&_0x501726[_0x3b3b2a(0x16e)]!==_0x18f62e){const _0x4debba=[..._0x1a8268?.['items'][_0x3b3b2a(0x188)](_0x1feb7e=>_0x1feb7e[_0x3b3b2a(0x16d)])??[]],_0x48d9c1=_0x4debba[_0x3b3b2a(0x18d)]===0x0?_0x3b3b2a(0x19f)+CLI_BIN_NAME+_0x3b3b2a(0x1ad)+_0x18f62e+_0x3b3b2a(0x1a9):'Available\x20remote\x20apps:\x20'+Array[_0x3b3b2a(0x176)](new Set(_0x4debba))[_0x3b3b2a(0x193)](',\x20')+_0x3b3b2a(0x1af);throw CliErrors[_0x3b3b2a(0x184)](_0x3b3b2a(0x1b9)+_0x18f62e+_0x3b3b2a(0x1aa),_0x48d9c1);}const _0x124e63=_0xa063d4[_0x3b3b2a(0x1ba)](_0x3b3b2a(0x199));let _0x16af59;if(_0x124e63)_0x16af59={'global':!![]};else{const {isInProject:_0x1fa7ab}=await import(_0x3b3b2a(0x1b8)),_0x2d7ed3=_0x1fa7ab();_0x16af59=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x3b3b2a(0x196),'inProject':_0x2d7ed3}));}const _0x292025=readConfig(_0x16af59);return _0x292025[_0x3b3b2a(0x16e)]=_0x18f62e,writeConfig(_0x292025,_0x16af59),{'ok':!![],'message':_0x3b3b2a(0x18b)+_0x18f62e+'\x22'+scopeLabel(_0x16af59)+'.'};}},importDef={'service':a2_0x454578(0x16f),'command':'import','description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a2_0x454578(0x17f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x2b271b){return await runInitImport(collectFlags(_0x2b271b,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e91d9,_0xb7774){const _0x512b3a=a3_0x1c46,_0x5e5b4f=_0x2e91d9();while(!![]){try{const _0x12cb4a=-parseInt(_0x512b3a(0x182))/0x1*(parseInt(_0x512b3a(0x185))/0x2)+-parseInt(_0x512b3a(0x180))/0x3*(parseInt(_0x512b3a(0x178))/0x4)+-parseInt(_0x512b3a(0x184))/0x5*(parseInt(_0x512b3a(0x181))/0x6)+parseInt(_0x512b3a(0x17f))/0x7+parseInt(_0x512b3a(0x17e))/0x8*(-parseInt(_0x512b3a(0x187))/0x9)+-parseInt(_0x512b3a(0x186))/0xa+parseInt(_0x512b3a(0x179))/0xb;if(_0x12cb4a===_0xb7774)break;else _0x5e5b4f['push'](_0x5e5b4f['shift']());}catch(_0x4a95c6){_0x5e5b4f['push'](_0x5e5b4f['shift']());}}}(a3_0x2485,0x2e6fe));import{fileURLToPath}from'url';function a3_0x1c46(_0x3b4786,_0x5c95a4){_0x3b4786=_0x3b4786-0x177;const _0x2485f9=a3_0x2485();let _0x1c46f8=_0x2485f9[_0x3b4786];return _0x1c46f8;}function a3_0x2485(){const _0x15210a=['9QFoKwi','errorMsg','data','utf-8','126868HmDvNh','8641578ZMkIXv','success','tableData','parse','../../../mock/app-list.json','1990568UEgPGB','1228437GKnUrE','3itMkay','6CzjYsh','143942GYOrPb','errorCode','180965iHKlhH','2zLwSEt','3102100aehpTY'];a3_0x2485=function(){return _0x15210a;};return a3_0x2485();}import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x10a17a=a3_0x1c46,_0x4394af=join(__dirname,_0x10a17a(0x17d)),_0x4403d9=readFileSync(_0x4394af,_0x10a17a(0x177));return JSON[_0x10a17a(0x17c)](_0x4403d9);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x5a8058=a3_0x1c46,_0x59f08e=getMockAppList();if(!_0x59f08e[_0x5a8058(0x17a)])throw new Error('Mock\x20API\x20error:\x20'+_0x59f08e[_0x5a8058(0x188)]+'\x20('+_0x59f08e[_0x5a8058(0x183)]+')');return _0x59f08e[_0x5a8058(0x189)][_0x5a8058(0x17b)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13c646,_0x2b858b){const _0x163fc4=a4_0xa5e4,_0x3e98f6=_0x13c646();while(!![]){try{const _0x11251e=-parseInt(_0x163fc4(0x172))/0x1*(-parseInt(_0x163fc4(0x166))/0x2)+parseInt(_0x163fc4(0x16e))/0x3*(parseInt(_0x163fc4(0x164))/0x4)+-parseInt(_0x163fc4(0x163))/0x5*(parseInt(_0x163fc4(0x16b))/0x6)+parseInt(_0x163fc4(0x16c))/0x7*(parseInt(_0x163fc4(0x168))/0x8)+parseInt(_0x163fc4(0x16d))/0x9+-parseInt(_0x163fc4(0x162))/0xa*(-parseInt(_0x163fc4(0x165))/0xb)+parseInt(_0x163fc4(0x161))/0xc*(-parseInt(_0x163fc4(0x167))/0xd);if(_0x11251e===_0x2b858b)break;else _0x3e98f6['push'](_0x3e98f6['shift']());}catch(_0x297cf4){_0x3e98f6['push'](_0x3e98f6['shift']());}}}(a4_0x4552,0xf0be2));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';function a4_0xa5e4(_0x12c0fb,_0x1408bb){_0x12c0fb=_0x12c0fb-0x161;const _0x455284=a4_0x4552();let _0xa5e4a6=_0x455284[_0x12c0fb];return _0xa5e4a6;}import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';function a4_0x4552(){const _0x18ccc9=['cache','fetchedAt','498570dhwylq','7scGEEL','8044569aVUJyw','12JNsPbV','items','mock','toISOString','49466UfYTMG','trim','84vSkBcc','7247770MJECLx','65agxuLK','1913236cSSemr','22sigHIT','2mwsSGC','6519929BGpHss','10167608GweCYN'];a4_0x4552=function(){return _0x18ccc9;};return a4_0x4552();}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x32df5c=a4_0xa5e4,_0x188677=(productEnv('APP_LIST_SOURCE')||'')[_0x32df5c(0x173)]()['toLowerCase']();return _0x188677===_0x32df5c(0x170);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x5ae352){const _0xa1b1a4=a4_0xa5e4,{env:_0x484977,accessKey:_0x1bd0ff,localOnly:localOnly=![],noCache:noCache=![]}=_0x5ae352,_0x24e255=readCachedAppList(_0x484977,_0x1bd0ff),_0x32c393=_0x1bd0ff?.[_0xa1b1a4(0x173)]()?getAppCacheFilePath(_0x484977,_0x1bd0ff):null;if(localOnly)return{'items':_0x24e255?.['items']??[],'source':_0xa1b1a4(0x169),'fetchedAt':_0x24e255?.[_0xa1b1a4(0x16a)]??null,'cachePath':_0x32c393};try{const _0x5b2cd9=await getRemoteAppItems(),_0x37a401=shouldUseMockRemoteApps()?_0xa1b1a4(0x170):'remote',_0x253295=new Date()[_0xa1b1a4(0x171)](),_0x51a1f4=_0x1bd0ff?.[_0xa1b1a4(0x173)]()?writeCachedAppList(_0x484977,_0x1bd0ff,{'env':_0x484977,'fetchedAt':_0x253295,'source':_0x37a401,'items':_0x5b2cd9}):null;return{'items':_0x5b2cd9,'source':_0x37a401,'fetchedAt':_0x253295,'cachePath':_0x51a1f4};}catch(_0x563c13){if(!noCache&&_0x24e255)return{'items':_0x24e255[_0xa1b1a4(0x16f)],'source':'cache','fetchedAt':_0x24e255[_0xa1b1a4(0x16a)],'cachePath':_0x32c393};throw _0x563c13;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a5_0x462a(){const _0x120ec7=['3738ewTnfY','3298626rlODaF','1297380nNCgoe','1jttYKh','appCode','find','672nkDrHZ','isCurrent','1665XocRfp','local','named','759cItRfN','23149AAlMfJ','currentApp','805023VpMsuP','name','global','project','802756ieOvXc','140840XHnJlO','appcode'];a5_0x462a=function(){return _0x120ec7;};return a5_0x462a();}(function(_0x4cd091,_0x46df9b){const _0x26204f=a5_0xd583,_0x511ade=_0x4cd091();while(!![]){try{const _0x36bf3f=-parseInt(_0x26204f(0x102))/0x1*(-parseInt(_0x26204f(0x111))/0x2)+parseInt(_0x26204f(0x10d))/0x3+-parseInt(_0x26204f(0x101))/0x4+-parseInt(_0x26204f(0x107))/0x5*(-parseInt(_0x26204f(0xff))/0x6)+parseInt(_0x26204f(0x10b))/0x7*(parseInt(_0x26204f(0x105))/0x8)+parseInt(_0x26204f(0x100))/0x9+-parseInt(_0x26204f(0xfd))/0xa*(parseInt(_0x26204f(0x10a))/0xb);if(_0x36bf3f===_0x46df9b)break;else _0x511ade['push'](_0x511ade['shift']());}catch(_0x5a5c4b){_0x511ade['push'](_0x511ade['shift']());}}}(a5_0x462a,0x3703b));function a5_0xd583(_0x4ccbff,_0x438f45){_0x4ccbff=_0x4ccbff-0xfd;const _0x462a5f=a5_0x462a();let _0xd58378=_0x462a5f[_0x4ccbff];return _0xd58378;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x1fbb5a,_0x4533f1){const _0xb5db96=a5_0xd583;if(!_0x4533f1)return;const _0x1955d3=!!(_0x4533f1[_0xb5db96(0x10c)]??_0x4533f1['defaultApp']);for(const _0x505f1e of _0x1fbb5a){_0x505f1e[_0xb5db96(0x106)]=![];}const _0x5b3c34=_0x4533f1[_0xb5db96(0x103)]!=null?String(_0x4533f1[_0xb5db96(0x103)])['trim']():'';if(_0x1955d3){const _0x2c75bb=_0x4533f1['currentApp']??_0x4533f1['defaultApp'];if(_0x2c75bb){const _0x551a16=_0x1fbb5a[_0xb5db96(0x104)](_0x25a623=>_0x25a623[_0xb5db96(0x109)]===!![]&&_0x25a623[_0xb5db96(0x10e)]===_0x2c75bb&&_0x25a623['definedIn']===_0xb5db96(0x108)),_0x573454=_0x551a16??_0x1fbb5a[_0xb5db96(0x104)](_0x582e3d=>_0x582e3d[_0xb5db96(0x109)]===!![]&&_0x582e3d['name']===_0x2c75bb);_0x573454&&(_0x573454[_0xb5db96(0x106)]=!![]);}return;}if(!_0x5b3c34)return;for(const _0x11f230 of _0x1fbb5a){String(_0x11f230[_0xb5db96(0xfe)]??'')['trim']()===_0x5b3c34&&(_0x11f230[_0xb5db96(0x106)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x3cc11b){const _0x23a1eb=a5_0xd583;return formatScopeLabel(_0x3cc11b[_0x23a1eb(0x10f)]?_0x23a1eb(0x10f):_0x23a1eb(0x110));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x5016aa=a6_0x2ab9;(function(_0x2deec5,_0x118e80){const _0x4016b4=a6_0x2ab9,_0x21ed15=_0x2deec5();while(!![]){try{const _0x3f58ef=-parseInt(_0x4016b4(0xe3))/0x1*(-parseInt(_0x4016b4(0xdd))/0x2)+parseInt(_0x4016b4(0xe8))/0x3+parseInt(_0x4016b4(0x106))/0x4*(-parseInt(_0x4016b4(0x10a))/0x5)+parseInt(_0x4016b4(0xf0))/0x6*(-parseInt(_0x4016b4(0xd8))/0x7)+parseInt(_0x4016b4(0xe9))/0x8*(parseInt(_0x4016b4(0xf7))/0x9)+-parseInt(_0x4016b4(0xfe))/0xa*(parseInt(_0x4016b4(0xd9))/0xb)+parseInt(_0x4016b4(0x110))/0xc;if(_0x3f58ef===_0x118e80)break;else _0x21ed15['push'](_0x21ed15['shift']());}catch(_0x3ac30b){_0x21ed15['push'](_0x21ed15['shift']());}}}(a6_0x3e96,0xecf5e));function a6_0x3e96(){const _0x28c75f=['init','project','26570JoOllG','accessKey','boolean','Auth\x20mode:\x20','write','validation','join','cancelled','4hieRYA','stdout','envName','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','1322445FMRCYo','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20config.\x20Nothing\x20to\x20clear.','AccessKey:\x20','access-key','userCenterDisplayName','20030004DxNOQk','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','repeat','AccessKey\x20(ak_xxx...)','nonInteractive','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20config.','bool','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','`auth\x20login`\x20does\x20not\x20support\x20--yes.','logout','yes','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20Current\x20env:\x20','auth','length','newConfigFileName','Write\x20to\x20global\x20config\x20(default)','global-default','No\x20AccessKey\x20found\x20in\x20','=ak_xxx','\x20Verify:\x20','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Then\x20verify\x20with:\x20','Option\x20A:\x20','Show\x20current\x20authentication\x20status','stdin','push','2345WMwGbf','4070SMWzQR','Option\x20C:\x20environment\x20variable','\x20(via\x20','\x20config','122NihjQA','Tip:\x20you\x20can\x20also\x20run:','login','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Use\x20`','trim','3161gferBZ','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','str','AccessKey\x20cleared\x20from\x20','3201525dAjfdJ','9009168ceBKpT','\x20env\x20var','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','status','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Read\x20from\x20global\x20config\x20(default)','string','32904FpdaUG','Shorthand\x20for\x20--access-key','\x20auth\x20status','Invalid\x20accessKey\x20format:\x20\x22','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','isTTY','read','9LRSITW','global','production','env','slice'];a6_0x3e96=function(){return _0x28c75f;};return a6_0x3e96();}import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';function a6_0x2ab9(_0x27723b,_0x3622ce){_0x27723b=_0x27723b-0xbd;const _0x3e96e2=a6_0x3e96();let _0x2ab9cc=_0x3e96e2[_0x27723b];return _0x2ab9cc;}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x84758c=a6_0x2ab9;writeCliSideChannelLine(_0x84758c(0xe5)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x84758c(0xde)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x84758c(0xc1));}function buildAccessKeySetupGuide(){const _0x1e3dd0=a6_0x2ab9;return[_0x1e3dd0(0xe5)+PRODUCT_CONFIG[_0x1e3dd0(0x10f)]+':',USER_ACCESS_KEY_CREATE_URL,_0x1e3dd0(0xc8)+CLI_BIN_NAME+_0x1e3dd0(0xe4)][_0x1e3dd0(0x104)]('\x0a');}function canPromptForAccessKey(_0x5b2159){const _0x223277=a6_0x2ab9;return!_0x5b2159['nonInteractive']&&process[_0x223277(0xd6)][_0x223277(0xf5)]!==![]&&process[_0x223277(0x107)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x4b3d4b){const _0x437243=a6_0x2ab9;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4b3d4b[_0x437243(0xc3)]('global'),'explicitProject':_0x4b3d4b['bool'](_0x437243(0xfd)),'policy':_0x437243(0xce)}));}async function resolveAuthWriteInput(_0x3f983e){const _0x142ccb=a6_0x2ab9;let _0x1b4d8e=(_0x3f983e[_0x142ccb(0xe6)](_0x142ccb(0x10e))||_0x3f983e[_0x142ccb(0xe6)]('ak')||'')[_0x142ccb(0xe2)]();const _0x4c2e88=(_0x3f983e['str'](_0x142ccb(0xfa))||'')[_0x142ccb(0xe2)]();if(!_0x1b4d8e&&canPromptForAccessKey(_0x3f983e))try{showAccessKeyCreateHint(),_0x1b4d8e=await promptAccessKey('');}catch(_0x1b40d2){if(isAbortPrompt(_0x1b40d2))throw CliErrors[_0x142ccb(0x105)]();throw _0x1b40d2;}if(!_0x1b4d8e)throw CliErrors[_0x142ccb(0x103)]('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x1b4d8e))throw CliErrors['validation'](_0x142ccb(0xf3)+_0x1b4d8e+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x4c2e88)return{'accessKey':_0x1b4d8e};const _0x30b48b=normalizeEnv(_0x4c2e88);return{'accessKey':_0x1b4d8e,'env':isDaily(_0x30b48b)?'daily':isDev(_0x30b48b)?'development':_0x142ccb(0xf9)};}export const authDefinitions=[{'service':a6_0x5016aa(0xca),'command':a6_0x5016aa(0xdf),'description':a6_0x5016aa(0x112),'risk':a6_0x5016aa(0x102),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a6_0x5016aa(0xef),'description':a6_0x5016aa(0xbe)},{'name':'ak','type':a6_0x5016aa(0xef),'description':a6_0x5016aa(0xf1)},{'name':a6_0x5016aa(0xf8),'type':a6_0x5016aa(0x100),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x5016aa(0xfd),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0x111),'default':![]}],async 'execute'(_0x4823d9){const _0x474473=a6_0x5016aa;if(_0x4823d9['bool'](_0x474473(0xc7)))throw CliErrors[_0x474473(0x103)](_0x474473(0xc5),_0x474473(0xe1)+CLI_BIN_NAME+_0x474473(0x10b)+CLI_BIN_NAME+_0x474473(0xe0));const _0x3e5254=(_0x4823d9['str']('access-key')||_0x4823d9[_0x474473(0xe6)]('ak')||'')['trim']();if(!_0x3e5254&&_0x4823d9[_0x474473(0xbf)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x57f3f9=await resolveAuthWriteInput(_0x4823d9),_0x3c5e66=resolveAuthScopeFlags(_0x4823d9),_0x3d2a07=readScopedConfig(_0x3c5e66);_0x3d2a07['accessKey']=_0x57f3f9['accessKey'];_0x57f3f9[_0x474473(0xfa)]&&(_0x3d2a07[_0x474473(0xfa)]=_0x57f3f9[_0x474473(0xfa)]);writeScopedConfig(_0x3d2a07,_0x3c5e66);const _0x591172=_0x3c5e66[_0x474473(0xf8)]?_0x474473(0xf8):_0x474473(0xfd),_0x21dd50=_0x3d2a07[_0x474473(0xfa)]?_0x474473(0xc9)+_0x3d2a07[_0x474473(0xfa)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x591172+_0x474473(0xc2)+_0x21dd50+_0x474473(0xd1)+CLI_BIN_NAME+_0x474473(0xf2)};}},{'service':'auth','command':a6_0x5016aa(0xfc),'description':a6_0x5016aa(0xd2),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':'string','description':a6_0x5016aa(0xbe)},{'name':'ak','type':a6_0x5016aa(0xef),'description':a6_0x5016aa(0xf1)},{'name':a6_0x5016aa(0xfa),'type':a6_0x5016aa(0xef),'description':a6_0x5016aa(0xc0)},{'name':a6_0x5016aa(0xf8),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0xcd),'default':!![]},{'name':a6_0x5016aa(0xfd),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0x111),'default':![]}],async 'execute'(_0x914acc){const _0x4fc12b=a6_0x5016aa,_0x500ca6=await resolveAuthWriteInput(_0x914acc),_0x5bacf7=resolveAuthScopeFlags(_0x914acc),_0x507203={'accessKey':_0x500ca6[_0x4fc12b(0xff)]};_0x500ca6[_0x4fc12b(0xfa)]&&(_0x507203[_0x4fc12b(0xfa)]=_0x500ca6['env']);writeScopedConfig(_0x507203,_0x5bacf7);const _0x55e26d=_0x5bacf7[_0x4fc12b(0xf8)]?'global':_0x4fc12b(0xfd),_0x90e57f=_0x507203[_0x4fc12b(0xfa)]?_0x4fc12b(0xc9)+_0x507203['env']+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x55e26d+'\x20scope.'+_0x90e57f+_0x4fc12b(0xd1)+CLI_BIN_NAME+_0x4fc12b(0xf2)};}},{'service':a6_0x5016aa(0xca),'command':a6_0x5016aa(0xc6),'description':'Clear\x20accessKey\x20from\x20config','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x5016aa(0xf8),'type':a6_0x5016aa(0x100),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x5016aa(0xfd),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0xed),'default':![]}],async 'execute'(_0x3dea65){const _0x12c0f1=a6_0x5016aa,_0x28b965=resolveAuthScopeFlags(_0x3dea65),_0xe04a30=readScopedConfig(_0x28b965),_0x572270=!!_0xe04a30[_0x12c0f1(0xff)];delete _0xe04a30[_0x12c0f1(0xff)],writeScopedConfig(_0xe04a30,_0x28b965);const _0x1abaa7=_0x28b965[_0x12c0f1(0xf8)]?_0x12c0f1(0xf8):_0x12c0f1(0xfd);if(_0x572270)return{'ok':!![],'message':_0x12c0f1(0xe7)+_0x1abaa7+_0x12c0f1(0xc2)};return{'ok':!![],'message':_0x12c0f1(0xcf)+_0x1abaa7+_0x12c0f1(0x10c)};}},{'service':'auth','command':a6_0x5016aa(0xec),'description':a6_0x5016aa(0xd5),'risk':a6_0x5016aa(0xf6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x5016aa(0xf8),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0xee),'default':!![]},{'name':a6_0x5016aa(0xfd),'type':a6_0x5016aa(0x100),'description':a6_0x5016aa(0xc4),'default':![]}],async 'execute'(_0x403640){const _0xc9a8b0=a6_0x5016aa,_0x15ec9f=resolveAuthScopeFlags(_0x403640),_0x4c9a1a=readScopedConfig(_0x15ec9f),_0x4bf9d2=productEnvName('ACCESS_KEY'),_0x1f6801=productEnv('ACCESS_KEY')||undefined,_0x385faa=_0x4c9a1a[_0xc9a8b0(0xff)]||undefined,_0x1ef737=_0x1f6801||_0x385faa,_0x1226d1=_0x1f6801?_0x4bf9d2+_0xc9a8b0(0xea):_0x385faa?(_0x15ec9f[_0xc9a8b0(0xf8)]?_0xc9a8b0(0xf8):_0xc9a8b0(0xfd))+_0xc9a8b0(0xdc):null,_0x24c291=[_0xc9a8b0(0x101)+AUTH_MODE['ClientAk']];if(_0x1ef737){const _0x58f84e=_0x1ef737[_0xc9a8b0(0xcb)]>0x8?''+_0x1ef737[_0xc9a8b0(0xfb)](0x0,0x8)+'*'[_0xc9a8b0(0xbd)](_0x1ef737[_0xc9a8b0(0xcb)]-0x8):_0x1ef737;_0x24c291['push'](_0xc9a8b0(0x10d)+_0x58f84e+(_0x1226d1?_0xc9a8b0(0xdb)+_0x1226d1+')':''));}return!_0x1ef737&&(_0x24c291['push'](''),_0x24c291[_0xc9a8b0(0xd7)](_0xc9a8b0(0x109)),_0x24c291[_0xc9a8b0(0xd7)](''),_0x24c291[_0xc9a8b0(0xd7)](_0xc9a8b0(0xd4)+CLI_BIN_NAME+_0xc9a8b0(0xeb)),_0x24c291[_0xc9a8b0(0xd7)](''),_0x24c291['push']('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0xc9a8b0(0xcc)]+')'),_0x24c291[_0xc9a8b0(0xd7)]('{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}'),_0x24c291[_0xc9a8b0(0xd7)](''),_0x24c291[_0xc9a8b0(0xd7)](_0xc9a8b0(0xda)),_0x24c291[_0xc9a8b0(0xd7)]('\x20\x20export\x20'+_0x4bf9d2+_0xc9a8b0(0xd0)),_0x24c291[_0xc9a8b0(0xd7)](''),_0x24c291[_0xc9a8b0(0xd7)](_0xc9a8b0(0xd3)+CLI_BIN_NAME+_0xc9a8b0(0xf2)),_0x24c291[_0xc9a8b0(0xd7)](_0xc9a8b0(0xf4)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x24c291['join']('\x0a')};}},{'service':a6_0x5016aa(0xca),'command':'info','description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x263efa){const _0x467f0e=a6_0x5016aa,_0x20b99a=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x20b99a,'meta':{'env':_0x263efa[_0x467f0e(0x108)]??_0x467f0e(0xf9)}}};}}];
|
|
1
|
+
const a6_0x279288=a6_0x29fd;function a6_0x5835(){const _0x2df6f6=['Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','\x20Current\x20env:\x20','214731OqhAgF','global-default','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','string','47837CzgYwO','cancelled','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','570FjVTyc','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','58TxPqcu','Read\x20from\x20global\x20config\x20(default)','Option\x20A:\x20','repeat','access-key','slice','=ak_xxx','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Invalid\x20accessKey\x20format:\x20\x22','AccessKey:\x20','2764136vuqRGV','newConfigFileName','development','env','Auth\x20config\x20reinitialized\x20in\x20','Clear\x20from\x20global\x20config\x20(default)','\x20auth\x20login\x20--access-key\x20<ak_xxx>','init','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','\x20(via\x20','Use\x20`','\x20config.\x20Nothing\x20to\x20clear.','No\x20AccessKey\x20found\x20in\x20','bool','4736ICfDRe','Option\x20B:\x20apps\x20config\x20(','auth','Write\x20to\x20global\x20config\x20(default)','AccessKey\x20cleared\x20from\x20','validation','status','\x20env\x20var','ACCESS_KEY','join','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20config.','envName','\x20Verify:\x20','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','read','ClientAk','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Show\x20current\x20authentication\x20status','8449966liyEpl','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','global','length','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Auth\x20mode:\x20','production','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','2230CKjjEm','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','logout','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','72095LksqWd','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','push','project','12357hPqlzK','AccessKey\x20saved\x20to\x20','str','boolean','Tip:\x20you\x20can\x20also\x20run:','2804469naqxGl','trim','\x20\x20export\x20','accessKey','Shorthand\x20for\x20--access-key','AccessKey\x20(ak_xxx...)','isTTY','\x20scope.','write','\x20auth\x20status','login','Missing\x20accessKey.','stdout'];a6_0x5835=function(){return _0x2df6f6;};return a6_0x5835();}(function(_0x3a5392,_0x605a7b){const _0x36d232=a6_0x29fd,_0x3d9fa4=_0x3a5392();while(!![]){try{const _0x5563ad=-parseInt(_0x36d232(0x1d0))/0x1*(-parseInt(_0x36d232(0x1d6))/0x2)+-parseInt(_0x36d232(0x1bd))/0x3+-parseInt(_0x36d232(0x1e0))/0x4+-parseInt(_0x36d232(0x1b4))/0x5*(parseInt(_0x36d232(0x1d4))/0x6)+-parseInt(_0x36d232(0x1a7))/0x7+-parseInt(_0x36d232(0x1ee))/0x8*(parseInt(_0x36d232(0x1b8))/0x9)+-parseInt(_0x36d232(0x1b0))/0xa*(-parseInt(_0x36d232(0x1cc))/0xb);if(_0x5563ad===_0x605a7b)break;else _0x3d9fa4['push'](_0x3d9fa4['shift']());}catch(_0x1b4cfb){_0x3d9fa4['push'](_0x3d9fa4['shift']());}}}(a6_0x5835,0xb0f68));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x82fa3a=a6_0x29fd;writeCliSideChannelLine(_0x82fa3a(0x19e)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x82fa3a(0x1bc)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x82fa3a(0x1e6));}function buildAccessKeySetupGuide(){const _0xde686b=a6_0x29fd;return[_0xde686b(0x19e)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0xde686b(0x1a5)+CLI_BIN_NAME+_0xde686b(0x1dd)]['join']('\x0a');}function a6_0x29fd(_0x9feeeb,_0x5107fa){_0x9feeeb=_0x9feeeb-0x19a;const _0x583555=a6_0x5835();let _0x29fdb3=_0x583555[_0x9feeeb];return _0x29fdb3;}function canPromptForAccessKey(_0xf8a138){const _0x77ef3d=a6_0x29fd;return!_0xf8a138['nonInteractive']&&process['stdin'][_0x77ef3d(0x1c3)]!==![]&&process[_0x77ef3d(0x1c9)][_0x77ef3d(0x1c3)]!==![];}function resolveAuthScopeFlags(_0x598b86){const _0x43264d=a6_0x29fd;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x598b86[_0x43264d(0x1ed)](_0x43264d(0x1a9)),'explicitProject':_0x598b86[_0x43264d(0x1ed)](_0x43264d(0x1b7)),'policy':_0x43264d(0x1cd)}));}async function resolveAuthWriteInput(_0x2b8b59){const _0x43e014=a6_0x29fd;let _0x2694b9=(_0x2b8b59[_0x43e014(0x1ba)](_0x43e014(0x1da))||_0x2b8b59[_0x43e014(0x1ba)]('ak')||'')['trim']();const _0x3bdb33=(_0x2b8b59[_0x43e014(0x1ba)](_0x43e014(0x1e3))||'')[_0x43e014(0x1be)]();if(!_0x2694b9&&canPromptForAccessKey(_0x2b8b59))try{showAccessKeyCreateHint(),_0x2694b9=await promptAccessKey('');}catch(_0x53ffec){if(isAbortPrompt(_0x53ffec))throw CliErrors[_0x43e014(0x1d1)]();throw _0x53ffec;}if(!_0x2694b9)throw CliErrors['validation'](_0x43e014(0x1c8),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN['test'](_0x2694b9))throw CliErrors['validation'](_0x43e014(0x1de)+_0x2694b9+'\x22',_0x43e014(0x1b3));if(!_0x3bdb33)return{'accessKey':_0x2694b9};const _0x104b16=normalizeEnv(_0x3bdb33);return{'accessKey':_0x2694b9,'env':isDaily(_0x104b16)?'daily':isDev(_0x104b16)?_0x43e014(0x1e2):_0x43e014(0x1ae)};}export const authDefinitions=[{'service':a6_0x279288(0x1f0),'command':a6_0x279288(0x1c7),'description':a6_0x279288(0x1d5),'risk':a6_0x279288(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x279288(0x1da),'type':a6_0x279288(0x1cf),'description':a6_0x279288(0x1c2)},{'name':'ak','type':'string','description':a6_0x279288(0x1c1)},{'name':a6_0x279288(0x1a9),'type':a6_0x279288(0x1bb),'description':a6_0x279288(0x1f1),'default':!![]},{'name':'project','type':a6_0x279288(0x1bb),'description':a6_0x279288(0x1ce),'default':![]}],async 'execute'(_0x540056){const _0xa3e73a=a6_0x279288;if(_0x540056[_0xa3e73a(0x1ed)]('yes'))throw CliErrors[_0xa3e73a(0x1f3)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0xa3e73a(0x1ea)+CLI_BIN_NAME+_0xa3e73a(0x1e8)+CLI_BIN_NAME+_0xa3e73a(0x1d2));const _0x5c9aff=(_0x540056[_0xa3e73a(0x1ba)](_0xa3e73a(0x1da))||_0x540056['str']('ak')||'')['trim']();if(!_0x5c9aff&&_0x540056['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x510022=await resolveAuthWriteInput(_0x540056),_0x227f6d=resolveAuthScopeFlags(_0x540056),_0x4694ae=readScopedConfig(_0x227f6d);_0x4694ae[_0xa3e73a(0x1c0)]=_0x510022['accessKey'];_0x510022[_0xa3e73a(0x1e3)]&&(_0x4694ae['env']=_0x510022[_0xa3e73a(0x1e3)]);writeScopedConfig(_0x4694ae,_0x227f6d);const _0x3dcd06=_0x227f6d[_0xa3e73a(0x1a9)]?_0xa3e73a(0x1a9):_0xa3e73a(0x1b7),_0x18a56a=_0x4694ae[_0xa3e73a(0x1e3)]?_0xa3e73a(0x1cb)+_0x4694ae[_0xa3e73a(0x1e3)]+'.':'';return{'ok':!![],'message':_0xa3e73a(0x1b9)+_0x3dcd06+_0xa3e73a(0x19f)+_0x18a56a+'\x20Verify:\x20'+CLI_BIN_NAME+_0xa3e73a(0x1c6)};}},{'service':a6_0x279288(0x1f0),'command':a6_0x279288(0x1e7),'description':a6_0x279288(0x1b1),'risk':a6_0x279288(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a6_0x279288(0x1cf),'description':a6_0x279288(0x1c2)},{'name':'ak','type':a6_0x279288(0x1cf),'description':a6_0x279288(0x1c1)},{'name':'env','type':'string','description':a6_0x279288(0x1ca)},{'name':a6_0x279288(0x1a9),'type':a6_0x279288(0x1bb),'description':a6_0x279288(0x1f1),'default':!![]},{'name':'project','type':'boolean','description':a6_0x279288(0x1ce),'default':![]}],async 'execute'(_0x1b120b){const _0x58e6c8=a6_0x279288,_0x4a5731=await resolveAuthWriteInput(_0x1b120b),_0x5c23c6=resolveAuthScopeFlags(_0x1b120b),_0x389ec0={'accessKey':_0x4a5731[_0x58e6c8(0x1c0)]};_0x4a5731[_0x58e6c8(0x1e3)]&&(_0x389ec0[_0x58e6c8(0x1e3)]=_0x4a5731[_0x58e6c8(0x1e3)]);writeScopedConfig(_0x389ec0,_0x5c23c6);const _0x2e9695=_0x5c23c6['global']?_0x58e6c8(0x1a9):'project',_0x53067a=_0x389ec0[_0x58e6c8(0x1e3)]?_0x58e6c8(0x1cb)+_0x389ec0[_0x58e6c8(0x1e3)]+'.':'';return{'ok':!![],'message':_0x58e6c8(0x1e4)+_0x2e9695+_0x58e6c8(0x1c4)+_0x53067a+_0x58e6c8(0x1a1)+CLI_BIN_NAME+_0x58e6c8(0x1c6)};}},{'service':a6_0x279288(0x1f0),'command':a6_0x279288(0x1b2),'description':'Clear\x20accessKey\x20from\x20config','risk':a6_0x279288(0x1c5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x279288(0x1a9),'type':a6_0x279288(0x1bb),'description':a6_0x279288(0x1e5),'default':!![]},{'name':'project','type':a6_0x279288(0x1bb),'description':a6_0x279288(0x1a8),'default':![]}],async 'execute'(_0x39f3da){const _0x4cf54d=a6_0x279288,_0x4de7cd=resolveAuthScopeFlags(_0x39f3da),_0x1ffec8=readScopedConfig(_0x4de7cd),_0x501fbf=!!_0x1ffec8[_0x4cf54d(0x1c0)];delete _0x1ffec8['accessKey'],writeScopedConfig(_0x1ffec8,_0x4de7cd);const _0x19e9d1=_0x4de7cd['global']?_0x4cf54d(0x1a9):_0x4cf54d(0x1b7);if(_0x501fbf)return{'ok':!![],'message':_0x4cf54d(0x1f2)+_0x19e9d1+_0x4cf54d(0x19f)};return{'ok':!![],'message':_0x4cf54d(0x1ec)+_0x19e9d1+_0x4cf54d(0x1eb)};}},{'service':'auth','command':a6_0x279288(0x19a),'description':a6_0x279288(0x1a6),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x279288(0x1a9),'type':a6_0x279288(0x1bb),'description':a6_0x279288(0x1d7),'default':!![]},{'name':a6_0x279288(0x1b7),'type':'boolean','description':a6_0x279288(0x1d3),'default':![]}],async 'execute'(_0x4b8f92){const _0x4b4907=a6_0x279288,_0x279294=resolveAuthScopeFlags(_0x4b8f92),_0x5801df=readScopedConfig(_0x279294),_0x4166e7=productEnvName('ACCESS_KEY'),_0x1bc455=productEnv(_0x4b4907(0x19c))||undefined,_0x1e12c7=_0x5801df[_0x4b4907(0x1c0)]||undefined,_0x12a365=_0x1bc455||_0x1e12c7,_0x42eb85=_0x1bc455?_0x4166e7+_0x4b4907(0x19b):_0x1e12c7?(_0x279294[_0x4b4907(0x1a9)]?_0x4b4907(0x1a9):_0x4b4907(0x1b7))+'\x20config':null,_0x30084b=[_0x4b4907(0x1ad)+AUTH_MODE[_0x4b4907(0x1a4)]];if(_0x12a365){const _0x3d7a0d=_0x12a365[_0x4b4907(0x1aa)]>0x8?''+_0x12a365[_0x4b4907(0x1db)](0x0,0x8)+'*'[_0x4b4907(0x1d9)](_0x12a365[_0x4b4907(0x1aa)]-0x8):_0x12a365;_0x30084b['push'](_0x4b4907(0x1df)+_0x3d7a0d+(_0x42eb85?_0x4b4907(0x1e9)+_0x42eb85+')':''));}return!_0x12a365&&(_0x30084b['push'](''),_0x30084b[_0x4b4907(0x1b6)](_0x4b4907(0x1ac)),_0x30084b[_0x4b4907(0x1b6)](''),_0x30084b['push'](_0x4b4907(0x1d8)+CLI_BIN_NAME+_0x4b4907(0x1b5)),_0x30084b[_0x4b4907(0x1b6)](''),_0x30084b[_0x4b4907(0x1b6)](_0x4b4907(0x1ef)+PRODUCT_CONFIG[_0x4b4907(0x1e1)]+')'),_0x30084b[_0x4b4907(0x1b6)](_0x4b4907(0x1ab)),_0x30084b['push'](''),_0x30084b[_0x4b4907(0x1b6)]('Option\x20C:\x20environment\x20variable'),_0x30084b[_0x4b4907(0x1b6)](_0x4b4907(0x1bf)+_0x4166e7+_0x4b4907(0x1dc)),_0x30084b[_0x4b4907(0x1b6)](''),_0x30084b[_0x4b4907(0x1b6)]('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x4b4907(0x1c6)),_0x30084b[_0x4b4907(0x1b6)](_0x4b4907(0x1af)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x30084b[_0x4b4907(0x19d)]('\x0a')};}},{'service':a6_0x279288(0x1f0),'command':'info','description':a6_0x279288(0x1a2),'risk':a6_0x279288(0x1a3),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2a3644){const _0x52be45=a6_0x279288,_0xa2a232=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0xa2a232,'meta':{'env':_0x2a3644[_0x52be45(0x1a0)]??_0x52be45(0x1ae)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2717ad,_0x2fbd4c){const _0x5858d9=a7_0x382a,_0x405302=_0x2717ad();while(!![]){try{const _0x5a5d3d=parseInt(_0x5858d9(0xb0))/0x1+parseInt(_0x5858d9(0xb3))/0x2+-parseInt(_0x5858d9(0xba))/0x3*(-parseInt(_0x5858d9(0xbb))/0x4)+parseInt(_0x5858d9(0xac))/0x5+parseInt(_0x5858d9(0xb7))/0x6*(parseInt(_0x5858d9(0xb1))/0x7)+parseInt(_0x5858d9(0xad))/0x8*(-parseInt(_0x5858d9(0xa6))/0x9)+-parseInt(_0x5858d9(0xb4))/0xa;if(_0x5a5d3d===_0x2fbd4c)break;else _0x405302['push'](_0x405302['shift']());}catch(_0x171a9f){_0x405302['push'](_0x405302['shift']());}}}(a7_0x5ea5,0x80977));import{createInterface}from'node:readline';function a7_0x382a(_0x3df0de,_0x611ff4){_0x3df0de=_0x3df0de-0xa4;const _0x5ea587=a7_0x5ea5();let _0x382af2=_0x5ea587[_0x3df0de];return _0x382af2;}function a7_0x5ea5(){const _0x4fac4c=['2348ZAnLkN','close','race','27uuOLxy','AbortPrompt','stdin','SIGINT','stdout','trim','3681555wgJKtV','2499656bJmRpB','AccessKey\x20(','question','264996Uqkqsp','21tlZqgI','User\x20aborted\x20prompt','1874366HZpLdp','9143740lfddue','):\x20','name','141486VRvQQa','AccessKey\x20(paste\x20ak_...):\x20','removeListener','1887FhAiti'];a7_0x5ea5=function(){return _0x4fac4c;};return a7_0x5ea5();}class AbortPrompt extends Error{constructor(){const _0x2deffb=a7_0x382a;super(_0x2deffb(0xb2)),this[_0x2deffb(0xb6)]=_0x2deffb(0xa7);}}function createSafeRl(){const _0x5cc393=a7_0x382a,_0x3f14c2=createInterface({'input':process[_0x5cc393(0xa8)],'output':process[_0x5cc393(0xaa)]});let _0x3fe880;const _0x443cb7=new Promise((_0x521b38,_0x15c9d7)=>{_0x3fe880=()=>{const _0x3f56b0=a7_0x382a;_0x3fe880&&(_0x3f14c2[_0x3f56b0(0xb9)](_0x3f56b0(0xa9),_0x3fe880),_0x3fe880=undefined);try{_0x3f14c2[_0x3f56b0(0xa4)]();}catch{}_0x15c9d7(new AbortPrompt());},_0x3f14c2['once']('SIGINT',_0x3fe880);}),_0x26a21e=()=>{const _0x302ebf=_0x5cc393;_0x3fe880&&(_0x3f14c2[_0x302ebf(0xb9)](_0x302ebf(0xa9),_0x3fe880),_0x3fe880=undefined);try{_0x3f14c2[_0x302ebf(0xa4)]();}catch{}};return{'rl':_0x3f14c2,'abortPromise':_0x443cb7,'disposeSuccess':_0x26a21e};}export async function promptAccessKey(_0x1d58ef=''){const _0xc5fb9c=a7_0x382a,{rl:_0x2a8944,abortPromise:_0x16de69,disposeSuccess:_0x109f11}=createSafeRl(),_0x513aeb=new Promise(_0x18e481=>{const _0x153148=a7_0x382a,_0x31df4e=_0x1d58ef?_0x153148(0xae)+_0x1d58ef+_0x153148(0xb5):_0x153148(0xb8);_0x2a8944[_0x153148(0xaf)](_0x31df4e,_0x4dc722=>{const _0x59fea6=_0x153148;_0x109f11(),_0x18e481(_0x4dc722[_0x59fea6(0xab)]()||_0x1d58ef);});});return Promise[_0xc5fb9c(0xa5)]([_0x513aeb,_0x16de69]);}export function isAbortPrompt(_0x4449be){const _0x46d425=a7_0x382a;return _0x4449be instanceof Error&&_0x4449be[_0x46d425(0xb6)]===_0x46d425(0xa7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a8_0x57d7d0=a8_0xcba1;(function(_0x58cf1d,_0x3fce23){const _0x4a80c6=a8_0xcba1,_0x5f3d88=_0x58cf1d();while(!![]){try{const _0x3730cf=-parseInt(_0x4a80c6(0x17b))/0x1+-parseInt(_0x4a80c6(0x181))/0x2*(-parseInt(_0x4a80c6(0x171))/0x3)+parseInt(_0x4a80c6(0x175))/0x4*(parseInt(_0x4a80c6(0x17a))/0x5)+parseInt(_0x4a80c6(0x178))/0x6*(-parseInt(_0x4a80c6(0x17c))/0x7)+-parseInt(_0x4a80c6(0x16a))/0x8*(parseInt(_0x4a80c6(0x16b))/0x9)+-parseInt(_0x4a80c6(0x173))/0xa+-parseInt(_0x4a80c6(0x17e))/0xb*(-parseInt(_0x4a80c6(0x169))/0xc);if(_0x3730cf===_0x3fce23)break;else _0x5f3d88['push'](_0x5f3d88['shift']());}catch(_0x583b6f){_0x5f3d88['push'](_0x5f3d88['shift']());}}}(a8_0x6ae4,0xc57f5));function a8_0x6ae4(){const _0x23a93b=['1422868PgLwbd','functionName','verbose','4815084iDXRaZ','detail','20xyLUkw','544963llHtrQ','7RUnBKa','createdTime','9988990IFgdiG','updatedTime','Get\x20BFF\x20script\x20details\x20by\x20ID','54UpIlnW','24hDqXgy','138728RuehOU','657fmTpiZ','read','scriptType','(none)','appCode','bool','138594ULREvC','bff','10640750SgDNoC','num'];a8_0x6ae4=function(){return _0x23a93b;};return a8_0x6ae4();}import{getBffScriptInfo}from'../../core/api-client.js';function a8_0xcba1(_0x4f9fb3,_0x48ea19){_0x4f9fb3=_0x4f9fb3-0x169;const _0x6ae423=a8_0x6ae4();let _0xcba138=_0x6ae423[_0x4f9fb3];return _0xcba138;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x57d7d0(0x172),'command':a8_0x57d7d0(0x179),'description':a8_0x57d7d0(0x180),'risk':a8_0x57d7d0(0x16c),'flags':[{...ID_FLAG,'description':'Script\x20ID'},VERBOSE_FLAG],async 'execute'(_0x8e88b5){const _0x12571a=a8_0x57d7d0,_0x35e133=await getBffScriptInfo(_0x8e88b5[_0x12571a(0x174)]('id')),_0x9da9a1=_0x8e88b5[_0x12571a(0x170)](_0x12571a(0x177));if(_0x9da9a1)return{'ok':!![],'data':_0x35e133};return{'ok':!![],'data':{'id':_0x35e133['id'],'appCode':_0x35e133[_0x12571a(0x16f)],'functionName':_0x35e133[_0x12571a(0x176)]??'','scriptType':_0x35e133[_0x12571a(0x16d)],'description':_0x35e133['description']||_0x12571a(0x16e),'createdTime':_0x35e133[_0x12571a(0x17d)]??'','updatedTime':_0x35e133[_0x12571a(0x17f)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a9_0x24d0(_0x31b61e,_0x1ea93a){_0x31b61e=_0x31b61e-0x99;const _0xc340df=a9_0xc340();let _0x24d01b=_0xc340df[_0x31b61e];return _0x24d01b;}const a9_0x925783=a9_0x24d0;(function(_0x174e4e,_0x1601af){const _0x5d4cdc=a9_0x24d0,_0x343c69=_0x174e4e();while(!![]){try{const _0x503ab1=-parseInt(_0x5d4cdc(0xa6))/0x1+-parseInt(_0x5d4cdc(0x9e))/0x2+-parseInt(_0x5d4cdc(0xa8))/0x3+parseInt(_0x5d4cdc(0xa4))/0x4*(parseInt(_0x5d4cdc(0x9f))/0x5)+-parseInt(_0x5d4cdc(0xa9))/0x6*(parseInt(_0x5d4cdc(0xa0))/0x7)+-parseInt(_0x5d4cdc(0x9a))/0x8+parseInt(_0x5d4cdc(0xa7))/0x9;if(_0x503ab1===_0x1601af)break;else _0x343c69['push'](_0x343c69['shift']());}catch(_0x4e3e09){_0x343c69['push'](_0x343c69['shift']());}}}(a9_0xc340,0x75252));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a9_0xc340(){const _0x3f6723=['BFF\x20function\x20name\x20to\x20execute','7176464bSfCqV','name','BFF\x20executed\x20in\x20','str','1471446RcmAKl','505415DGwiYq','56DLozUd','bff','params','now','8ZrIENt','read','94890CfVXAv','32941485ZYwquC','2755566WcogZw','552234pTfsmM','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','exec'];a9_0xc340=function(){return _0x3f6723;};return a9_0xc340();}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a9_0x925783(0xa1),'command':a9_0x925783(0xab),'description':a9_0x925783(0xaa),'risk':a9_0x925783(0xa5),'flags':[{...NAME_FLAG,'required':!![],'description':a9_0x925783(0x99)},PARAMS_FLAG],async 'execute'(_0x51c1d2){const _0x55b2c1=a9_0x925783,_0x187e51=parseJsonParams(_0x51c1d2[_0x55b2c1(0x9d)](_0x55b2c1(0xa2))),_0x9aed76=Date['now'](),_0x529f94=await executeSdkBff(_0x51c1d2[_0x55b2c1(0x9d)](_0x55b2c1(0x9b)),_0x187e51),_0x2d4288=Date[_0x55b2c1(0xa3)]()-_0x9aed76;return{'ok':!![],'data':{'result':_0x529f94,'elapsed':_0x2d4288},'message':_0x55b2c1(0x9c)+_0x2d4288+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a10_0x443c(_0x3ed0f6,_0x42d264){_0x3ed0f6=_0x3ed0f6-0x114;const _0x53d2bb=a10_0x53d2();let _0x443c5e=_0x53d2bb[_0x3ed0f6];return _0x443c5e;}function a10_0x53d2(){const _0x1fe86b=['6801828SYJIJE','88324xLBPkT','8712HAzhVC','44360TFNRfa','275ZqntBc','10955zdsqpC','3kjPiMa','5520FvCIJC','1268470txJzEg','431675yqVYGY','3128544BQUQzi'];a10_0x53d2=function(){return _0x1fe86b;};return a10_0x53d2();}(function(_0x27155d,_0x2e2a42){const _0x2e53df=a10_0x443c,_0x2e0780=_0x27155d();while(!![]){try{const _0x301bd4=parseInt(_0x2e53df(0x114))/0x1+parseInt(_0x2e53df(0x11e))/0x2*(parseInt(_0x2e53df(0x11c))/0x3)+-parseInt(_0x2e53df(0x117))/0x4*(-parseInt(_0x2e53df(0x11a))/0x5)+parseInt(_0x2e53df(0x116))/0x6+-parseInt(_0x2e53df(0x11b))/0x7*(-parseInt(_0x2e53df(0x11d))/0x8)+-parseInt(_0x2e53df(0x115))/0x9+-parseInt(_0x2e53df(0x119))/0xa*(parseInt(_0x2e53df(0x118))/0xb);if(_0x301bd4===_0x2e2a42)break;else _0x2e0780['push'](_0x2e0780['shift']());}catch(_0x6240b7){_0x2e0780['push'](_0x2e0780['shift']());}}}(a10_0x53d2,0x9a85d));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4f760b,_0x2aeb9a){const _0x2cf95f=a11_0x50be,_0x5d3aac=_0x4f760b();while(!![]){try{const _0x424c3e=parseInt(_0x2cf95f(0x162))/0x1+parseInt(_0x2cf95f(0x167))/0x2*(-parseInt(_0x2cf95f(0x170))/0x3)+-parseInt(_0x2cf95f(0x16c))/0x4*(parseInt(_0x2cf95f(0x169))/0x5)+-parseInt(_0x2cf95f(0x168))/0x6*(-parseInt(_0x2cf95f(0x164))/0x7)+parseInt(_0x2cf95f(0x15e))/0x8*(parseInt(_0x2cf95f(0x16e))/0x9)+parseInt(_0x2cf95f(0x16d))/0xa+-parseInt(_0x2cf95f(0x15b))/0xb;if(_0x424c3e===_0x2aeb9a)break;else _0x5d3aac['push'](_0x5d3aac['shift']());}catch(_0x2a3cbb){_0x5d3aac['push'](_0x5d3aac['shift']());}}}(a11_0x4b0d,0x64267));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';function a11_0x4b0d(){const _0x5803ae=['inProject','project','702986aINhZJ','newConfigFileName','17087ObEUzJ','Use\x20only\x20one\x20config\x20scope\x20flag.','project-or-global-explicit','202cjXicK','612kWzDfK','2971365onqlGC','Not\x20inside\x20a\x20project\x20(no\x20','Add\x20--global\x20to\x20write\x20to\x20~/','4FIQViP','7353050buQiFb','9yDXgHI','validation','6867MdIrmH','\x20init`\x20first.','5251279xFJQxK',',\x20or\x20run\x20`','global','206344rztoFd','\x20(global)'];a11_0x4b0d=function(){return _0x5803ae;};return a11_0x4b0d();}function a11_0x50be(_0x3d87a2,_0x309c7d){_0x3d87a2=_0x3d87a2-0x15b;const _0x4b0d3d=a11_0x4b0d();let _0x50be26=_0x4b0d3d[_0x3d87a2];return _0x50be26;}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(_0xeaf583){const _0x1add72=a11_0x50be,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x45cb70}=_0xeaf583;if(explicitGlobal&&explicitProject)throw CliErrors[_0x1add72(0x16f)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.',_0x1add72(0x165));if(explicitGlobal)return _0x1add72(0x15d);if(explicitProject)return _0x1add72(0x161);switch(_0x45cb70){case'global-default':return'global';case'project-default':return _0xeaf583[_0x1add72(0x160)]??isInProject()?_0x1add72(0x161):_0x1add72(0x15d);case _0x1add72(0x166):if(!(_0xeaf583[_0x1add72(0x160)]??isInProject()))throw CliErrors[_0x1add72(0x16f)](_0x1add72(0x16a)+PRODUCT_CONFIG['newConfigFileName']+'\x20found).',_0x1add72(0x16b)+PRODUCT_CONFIG[_0x1add72(0x163)]+_0x1add72(0x15c)+CLI_BIN_NAME+_0x1add72(0x171));return _0x1add72(0x161);}}export function toScopeFlags(_0x197cb9){return{'global':_0x197cb9==='global'};}export function formatScopeLabel(_0x2cfcbf){const _0x50d329=a11_0x50be;return _0x2cfcbf===_0x50d329(0x15d)?_0x50d329(0x15f):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a12_0x3043(_0x2fc36a,_0x3897f8){_0x2fc36a=_0x2fc36a-0x121;const _0x52b56b=a12_0x52b5();let _0x3043fe=_0x52b56b[_0x2fc36a];return _0x3043fe;}function a12_0x52b5(){const _0x3fac00=[',\x20got\x20\x22',':\x20expected\x20','At\x20least\x20one\x20of\x20','117681rAkpTL','Exactly\x20one\x20of\x20','\x20is\x20allowed,\x20found:\x20','36ptpwgg','1368396wcjVKE','join','22ZcJrSW','filter','10ksgEhT','\x20is\x20required\x20for\x20`','502732dViBTm','length','2751600oFuISe','str','27tyRAjz','map','Invalid\x20--','4828488CnGIwk','Provide\x20one\x20of:\x20','Use\x20only\x20one\x20of:\x20','2723768wnXVue','validation','\x20are\x20mutually\x20exclusive\x20for\x20`','flag','some','Remove\x20all\x20but\x20one.','27496172vmCNIT'];a12_0x52b5=function(){return _0x3fac00;};return a12_0x52b5();}(function(_0xb9ee03,_0x227e87){const _0x287359=a12_0x3043,_0x412ecb=_0xb9ee03();while(!![]){try{const _0x5651c1=parseInt(_0x287359(0x13c))/0x1*(parseInt(_0x287359(0x124))/0x2)+parseInt(_0x287359(0x12c))/0x3*(-parseInt(_0x287359(0x128))/0x4)+parseInt(_0x287359(0x126))/0x5*(parseInt(_0x287359(0x122))/0x6)+-parseInt(_0x287359(0x12f))/0x7+parseInt(_0x287359(0x132))/0x8*(-parseInt(_0x287359(0x121))/0x9)+-parseInt(_0x287359(0x12a))/0xa+parseInt(_0x287359(0x138))/0xb;if(_0x5651c1===_0x227e87)break;else _0x412ecb['push'](_0x412ecb['shift']());}catch(_0x1f2137){_0x412ecb['push'](_0x412ecb['shift']());}}}(a12_0x52b5,0xc16ec));import{CliErrors}from'../../errors.js';function isSet(_0xc2c518,_0x255da2){const _0x23ef13=a12_0x3043,_0x32560b=_0xc2c518[_0x23ef13(0x135)](_0x255da2);return _0x32560b!==undefined&&_0x32560b!==''&&_0x32560b!==![]&&_0x32560b!==0x0;}function fmtNames(_0x5b349a){const _0x3bc0ef=a12_0x3043;return _0x5b349a[_0x3bc0ef(0x12d)](_0x383ed8=>'--'+_0x383ed8)[_0x3bc0ef(0x123)](',\x20');}export function requireOneOf(_0x439101,_0x57bcb1,_0x3bc9fb){const _0x20d22b=a12_0x3043,_0x19c133=_0x57bcb1['filter'](_0x36db84=>isSet(_0x439101,_0x36db84));if(_0x19c133[_0x20d22b(0x129)]!==0x1)throw CliErrors[_0x20d22b(0x133)](_0x19c133[_0x20d22b(0x129)]===0x0?_0x20d22b(0x13d)+fmtNames(_0x57bcb1)+_0x20d22b(0x127)+_0x3bc9fb+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x57bcb1)+_0x20d22b(0x13e)+fmtNames(_0x19c133)+'.',_0x19c133[_0x20d22b(0x129)]===0x0?_0x20d22b(0x130)+fmtNames(_0x57bcb1):_0x20d22b(0x137));}export function requireAnyOf(_0x338b66,_0xb97cf,_0x3df91f){const _0x15ebfe=a12_0x3043;if(!_0xb97cf[_0x15ebfe(0x136)](_0x341ebf=>isSet(_0x338b66,_0x341ebf)))throw CliErrors[_0x15ebfe(0x133)](_0x15ebfe(0x13b)+fmtNames(_0xb97cf)+_0x15ebfe(0x127)+_0x3df91f+'`.',_0x15ebfe(0x130)+fmtNames(_0xb97cf));}export function mutuallyExclusive(_0x3174f2,_0x2031ef,_0x378095){const _0xe93d9c=a12_0x3043,_0x30f7df=_0x2031ef[_0xe93d9c(0x125)](_0x56c49f=>isSet(_0x3174f2,_0x56c49f));if(_0x30f7df[_0xe93d9c(0x129)]>0x1)throw CliErrors[_0xe93d9c(0x133)]('Flags\x20'+fmtNames(_0x30f7df)+_0xe93d9c(0x134)+_0x378095+'`.',_0xe93d9c(0x131)+fmtNames(_0x2031ef));}export function validatePattern(_0x2aaf78,_0x5a97de,_0x17a87c,_0x26f0dc){const _0x32d1ba=a12_0x3043,_0xd74699=_0x2aaf78[_0x32d1ba(0x12b)](_0x5a97de);if(_0xd74699&&!_0x17a87c['test'](_0xd74699))throw CliErrors[_0x32d1ba(0x133)](_0x32d1ba(0x12e)+_0x5a97de+_0x32d1ba(0x13a)+_0x26f0dc+_0x32d1ba(0x139)+_0xd74699+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a13_0x4abfce=a13_0x316e;(function(_0x12115b,_0x25b59c){const _0x21ee31=a13_0x316e,_0x2ce1d2=_0x12115b();while(!![]){try{const _0x426490=parseInt(_0x21ee31(0x135))/0x1*(-parseInt(_0x21ee31(0x136))/0x2)+-parseInt(_0x21ee31(0x132))/0x3*(-parseInt(_0x21ee31(0x143))/0x4)+-parseInt(_0x21ee31(0x13d))/0x5+-parseInt(_0x21ee31(0x13a))/0x6+-parseInt(_0x21ee31(0x141))/0x7+parseInt(_0x21ee31(0x13b))/0x8*(parseInt(_0x21ee31(0x12e))/0x9)+parseInt(_0x21ee31(0x13f))/0xa;if(_0x426490===_0x25b59c)break;else _0x2ce1d2['push'](_0x2ce1d2['shift']());}catch(_0x5f534b){_0x2ce1d2['push'](_0x2ce1d2['shift']());}}}(a13_0x29ce,0x1f2f4));export const CODE_FLAG={'name':a13_0x4abfce(0x134),'type':a13_0x4abfce(0x13e),'required':!![],'description':a13_0x4abfce(0x12f),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x4abfce(0x130)}};function a13_0x29ce(){const _0x3f8d82=['number','270768jEcErb','6248GZVmQY','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','933805FJFWcZ','string','5079850tTaibT','params','1712893mlOwWn','Resource\x20name\x20for\x20lookup','1172oPTbla','name','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','1359rKtHBP','Dataset\x20code\x20(32-char\x20hex\x20UUID)','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','2319BpqbCJ','Resource\x20ID','code','6705qLEIbN','74hyhUaT','Return\x20full\x20raw\x20response\x20object','boolean'];a13_0x29ce=function(){return _0x3f8d82;};return a13_0x29ce();}export const SQLCODE_FLAG={'name':'sqlcode','type':a13_0x4abfce(0x13e),'required':!![],'description':a13_0x4abfce(0x13c),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a13_0x4abfce(0x12d)}};export const VERBOSE_FLAG={'name':'verbose','type':a13_0x4abfce(0x138),'description':a13_0x4abfce(0x137)};export const PARAMS_FLAG={'name':a13_0x4abfce(0x140),'type':a13_0x4abfce(0x13e),'description':a13_0x4abfce(0x131)};export const NAME_FLAG={'name':a13_0x4abfce(0x12c),'type':a13_0x4abfce(0x13e),'description':a13_0x4abfce(0x142)};function a13_0x316e(_0x29daaa,_0x55d4d2){_0x29daaa=_0x29daaa-0x12c;const _0x29ce21=a13_0x29ce();let _0x316ed0=_0x29ce21[_0x29daaa];return _0x316ed0;}export const ID_FLAG={'name':'id','type':a13_0x4abfce(0x139),'required':!![],'description':a13_0x4abfce(0x133)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0x92c4d8=a14_0x353e;(function(_0x57d0ac,_0x1f2b94){const _0x4ab828=a14_0x353e,_0x277e41=_0x57d0ac();while(!![]){try{const _0x54bd9a=-parseInt(_0x4ab828(0x11d))/0x1*(parseInt(_0x4ab828(0xf3))/0x2)+-parseInt(_0x4ab828(0x11b))/0x3*(parseInt(_0x4ab828(0xf1))/0x4)+parseInt(_0x4ab828(0xf4))/0x5+-parseInt(_0x4ab828(0x11f))/0x6+-parseInt(_0x4ab828(0xf7))/0x7+parseInt(_0x4ab828(0x116))/0x8*(-parseInt(_0x4ab828(0xf6))/0x9)+-parseInt(_0x4ab828(0x123))/0xa*(-parseInt(_0x4ab828(0xea))/0xb);if(_0x54bd9a===_0x1f2b94)break;else _0x277e41['push'](_0x277e41['shift']());}catch(_0xc1231a){_0x277e41['push'](_0x277e41['shift']());}}}(a14_0x1aaf,0xbc96f));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';function a14_0x353e(_0x4f928e,_0x19c00d){_0x4f928e=_0x4f928e-0xea;const _0x1aaf40=a14_0x1aaf();let _0x353eeb=_0x1aaf40[_0x4f928e];return _0x353eeb;}function a14_0x1aaf(){const _0x22bb9e=['Key\x20not\x20found:\x20','\x20\x20project:\x20','boolean','config','../../context.js','Missing\x20key\x20argument.',';\x20apps.<alias>.appcode','Value\x20to\x20assign','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','isArray','Set\x20a\x20config\x20value','key','field','value','write','bool','\x20\x20global:\x20\x20','log','appcode','join','(none)','3631024zsLolX','global','Invalid\x20value\x20for\x20\x22','format','alias','3DelnoM','\x20config\x20delete\x20<key>\x20[--global]','1039238Oiyenm','trim','4081350cURutF','Deleted\x20`','object','keys','20jgaYJa','\x22\x20is\x20not\x20settable.','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Usage:\x20','List\x20current\x20config','apps','Get\x20a\x20config\x20value','\x22.\x20Allowed:\x20','project-or-global-explicit','stringify','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','Missing\x20key\x20or\x20value.','24629121IOJJfw','raw','set','pageSize\x20must\x20be\x20a\x20positive\x20number','includes','Key\x20\x22','riskLevel','4763428SVZzKC','pageSize','2phfaEn','2437305jGvwgE','\x22\x20not\x20found\x20at\x20top\x20level.','18IXrqvs','2624608UWjwCx','\x20(global)','args','split','Delete\x20a\x20config\x20value','pretty','\x20config\x20get\x20<key>','Settable\x20keys:\x20','validation','length'];a14_0x1aaf=function(){return _0x22bb9e;};return a14_0x1aaf();}const GLOBAL_FLAG={'name':a14_0x92c4d8(0x117),'type':a14_0x92c4d8(0x103),'description':'Write\x20to\x20global\x20config','default':![]};function parseAliasAppcodeSetKey(_0x4194d3){const _0x2ce8fb=a14_0x92c4d8,_0x9dd5c0=_0x4194d3['split']('.');if(_0x9dd5c0['length']!==0x3||_0x9dd5c0[0x0]!=='apps'||_0x9dd5c0[0x2]!==_0x2ce8fb(0x113))return undefined;const _0x578aa4=_0x9dd5c0[0x1]?.[_0x2ce8fb(0x11e)]();return _0x578aa4?_0x578aa4:undefined;}function parseAliasDeleteKey(_0x318807){const _0x4b068f=a14_0x92c4d8,_0x523ef3=_0x318807[_0x4b068f(0xfa)]('.');if(_0x523ef3[_0x4b068f(0x100)]===0x2&&_0x523ef3[0x0]===_0x4b068f(0x128)){const _0x4a8502=_0x523ef3[0x1]?.[_0x4b068f(0x11e)]();return _0x4a8502?{'alias':_0x4a8502}:undefined;}if(_0x523ef3[_0x4b068f(0x100)]===0x3&&_0x523ef3[0x0]===_0x4b068f(0x128)&&_0x523ef3[0x2]==='appcode'){const _0x538025=_0x523ef3[0x1]?.[_0x4b068f(0x11e)]();return _0x538025?{'alias':_0x538025,'field':_0x4b068f(0x113)}:undefined;}return undefined;}function setLocalAppAlias(_0x5f6912,_0x27c554,_0x18cb8e){const _0x184c34=a14_0x92c4d8,_0x56e942=_0x5f6912[_0x184c34(0x128)]&&typeof _0x5f6912['apps']==='object'&&!Array['isArray'](_0x5f6912[_0x184c34(0x128)])?_0x5f6912[_0x184c34(0x128)]:{},_0x2d35f3=_0x56e942[_0x27c554]&&typeof _0x56e942[_0x27c554]===_0x184c34(0x121)&&!Array[_0x184c34(0x10a)](_0x56e942[_0x27c554])?_0x56e942[_0x27c554]:{};_0x2d35f3[_0x184c34(0x113)]=_0x18cb8e,_0x56e942[_0x27c554]=_0x2d35f3,_0x5f6912[_0x184c34(0x128)]=_0x56e942;}function deleteLocalAppAlias(_0x19ec7a,_0x4dbbac){const _0x1e1550=a14_0x92c4d8;if(!_0x19ec7a[_0x1e1550(0x128)]||typeof _0x19ec7a[_0x1e1550(0x128)]!==_0x1e1550(0x121)||Array[_0x1e1550(0x10a)](_0x19ec7a[_0x1e1550(0x128)]))return![];const _0x2679ea=_0x19ec7a[_0x1e1550(0x128)],_0x3bf28b=_0x2679ea[_0x4dbbac[_0x1e1550(0x11a)]];if(!_0x3bf28b||typeof _0x3bf28b!==_0x1e1550(0x121)||Array[_0x1e1550(0x10a)](_0x3bf28b))return![];if(!_0x4dbbac['field'])return delete _0x2679ea[_0x4dbbac['alias']],!![];if(!(_0x4dbbac[_0x1e1550(0x10d)]in _0x3bf28b))return![];return delete _0x3bf28b[_0x4dbbac['field']],Object[_0x1e1550(0x122)](_0x3bf28b)[_0x1e1550(0x100)]===0x0&&delete _0x2679ea[_0x4dbbac['alias']],!![];}const listDef={'service':'config','command':'list','description':a14_0x92c4d8(0x127),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2a4c7b){const _0x4f7891=a14_0x92c4d8,{buildConfigFromFlags:_0x20c200}=await import(_0x4f7891(0x105)),_0x206d0d=_0x20c200({}),_0x59840d=getProjectConfigPath(),_0x2b8de8=resolveWriteConfigPath(_0x4f7891(0x117));if(_0x2a4c7b[_0x4f7891(0x119)]===_0x4f7891(0xfc))return{'ok':!![],'message':_0x4f7891(0x125)+(JSON['stringify'](_0x206d0d[_0x4f7891(0xeb)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x4f7891(0x102)+(_0x59840d??_0x4f7891(0x115))+'\x0a')+(_0x4f7891(0x111)+_0x2b8de8)};return{'ok':!![],'data':{'effective':_0x206d0d[_0x4f7891(0xeb)],'configFiles':{'project':_0x59840d??null,'global':_0x2b8de8}}};}},getDef={'service':a14_0x92c4d8(0x104),'command':'get','description':a14_0x92c4d8(0x129),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x92c4d8(0x10c),'description':a14_0x92c4d8(0x12d),'required':!![]}],'flags':[],async 'execute'(_0x5f2460){const _0xf0ec50=a14_0x92c4d8,_0x21fa5a=_0x5f2460[_0xf0ec50(0xf9)][0x0];if(!_0x21fa5a)throw CliErrors[_0xf0ec50(0xff)](_0xf0ec50(0x106),_0xf0ec50(0x126)+CLI_BIN_NAME+_0xf0ec50(0xfd));const {buildConfigFromFlags:_0x36251f}=await import(_0xf0ec50(0x105)),{raw:_0x3d14d7}=_0x36251f({});if(_0x21fa5a[_0xf0ec50(0xee)]('.')){const _0x448247=_0x21fa5a[_0xf0ec50(0xfa)]('.');let _0x58540c=_0x3d14d7;for(const _0x4b60b9 of _0x448247){if(_0x58540c==null||typeof _0x58540c!==_0xf0ec50(0x121))throw CliErrors[_0xf0ec50(0xff)](_0xf0ec50(0x101)+_0x21fa5a);_0x58540c=_0x58540c[_0x4b60b9];}if(_0x58540c===undefined)throw CliErrors[_0xf0ec50(0xff)](_0xf0ec50(0x101)+_0x21fa5a);return console['log'](typeof _0x58540c==='object'?JSON['stringify'](_0x58540c,null,0x2):String(_0x58540c)),{'ok':!![]};}const _0x58cee2=_0x3d14d7[_0x21fa5a];if(_0x58cee2===undefined)throw CliErrors[_0xf0ec50(0xff)]('Key\x20not\x20found:\x20'+_0x21fa5a);return console[_0xf0ec50(0x112)](typeof _0x58cee2===_0xf0ec50(0x121)?JSON[_0xf0ec50(0x12c)](_0x58cee2,null,0x2):String(_0x58cee2)),{'ok':!![]};}},setDef={'service':a14_0x92c4d8(0x104),'command':a14_0x92c4d8(0xec),'description':a14_0x92c4d8(0x10b),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x92c4d8(0x10e),'description':a14_0x92c4d8(0x108),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x3f1c08){const _0xc4b21d=a14_0x92c4d8,_0x5acdd2=_0x3f1c08[_0xc4b21d(0xf9)][0x0],_0x58367e=_0x3f1c08[_0xc4b21d(0xf9)][0x1];if(!_0x5acdd2||_0x58367e===undefined)throw CliErrors[_0xc4b21d(0xff)](_0xc4b21d(0x12e),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x5acdd2]&&!ENUM_KEYS[_0x5acdd2][_0xc4b21d(0xee)](_0x58367e))throw CliErrors['validation'](_0xc4b21d(0x118)+_0x5acdd2+_0xc4b21d(0x12a)+ENUM_KEYS[_0x5acdd2][_0xc4b21d(0x114)](',\x20'));if(_0x5acdd2===_0xc4b21d(0xf0))throw CliErrors[_0xc4b21d(0xff)](_0xc4b21d(0x109));if(_0x5acdd2===_0xc4b21d(0xf2)){const _0x48df00=Number(_0x58367e);if(isNaN(_0x48df00)||_0x48df00<=0x0)throw CliErrors[_0xc4b21d(0xff)](_0xc4b21d(0xed));}const _0x490833=resolveWriteScope({'explicitGlobal':_0x3f1c08[_0xc4b21d(0x110)]('global'),'policy':_0xc4b21d(0x12b)}),_0x33b107=toScopeFlags(_0x490833),_0x57feed=readScopedConfig(_0x33b107),_0xd0dff9=parseAliasAppcodeSetKey(_0x5acdd2);if(!_0xd0dff9&&!isTopLevelConfigKey(_0x5acdd2))throw CliErrors[_0xc4b21d(0xff)]('Top-level\x20key\x20\x22'+_0x5acdd2+_0xc4b21d(0x124),_0xc4b21d(0xfe)+getTopLevelConfigKeySummary()+_0xc4b21d(0x107));return _0xd0dff9?setLocalAppAlias(_0x57feed,_0xd0dff9,_0x58367e):_0x57feed[_0x5acdd2]=_0x5acdd2===_0xc4b21d(0xf2)?Number(_0x58367e):_0x58367e,console[_0xc4b21d(0x112)]('Set\x20`'+_0x5acdd2+'`\x20=\x20\x22'+_0x58367e+'\x22'+(_0x490833===_0xc4b21d(0x117)?_0xc4b21d(0xf8):'')),writeScopedConfig(_0x57feed,_0x33b107),{'ok':!![]};}},deleteDef={'service':a14_0x92c4d8(0x104),'command':'delete','description':a14_0x92c4d8(0xfb),'risk':a14_0x92c4d8(0x10f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x92c4d8(0x10c),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x19573b){const _0x314b50=a14_0x92c4d8,_0x470d78=_0x19573b[_0x314b50(0xf9)][0x0];if(!_0x470d78)throw CliErrors[_0x314b50(0xff)]('Missing\x20key\x20argument.',_0x314b50(0x126)+CLI_BIN_NAME+_0x314b50(0x11c));const _0x318d43=resolveWriteScope({'explicitGlobal':_0x19573b[_0x314b50(0x110)](_0x314b50(0x117)),'policy':'project-or-global-explicit'}),_0x5cf47c=toScopeFlags(_0x318d43),_0x292c2d=readScopedConfig(_0x5cf47c),_0x48a1e4=parseAliasDeleteKey(_0x470d78);if(_0x48a1e4){if(!deleteLocalAppAlias(_0x292c2d,_0x48a1e4))throw CliErrors['validation'](_0x314b50(0x101)+_0x470d78);return console[_0x314b50(0x112)]('Deleted\x20`'+_0x470d78+'`'+(_0x318d43===_0x314b50(0x117)?_0x314b50(0xf8):'')),writeScopedConfig(_0x292c2d,_0x5cf47c),{'ok':!![]};}if(_0x292c2d[_0x470d78]===undefined)throw CliErrors[_0x314b50(0xff)](_0x314b50(0xef)+_0x470d78+_0x314b50(0xf5));return delete _0x292c2d[_0x470d78],console['log'](_0x314b50(0x120)+_0x470d78+'`'+(_0x318d43===_0x314b50(0x117)?_0x314b50(0xf8):'')),writeScopedConfig(_0x292c2d,_0x5cf47c),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a14_0x3f5895=a14_0x31b5;(function(_0x2af8e1,_0x53c94f){const _0x267c13=a14_0x31b5,_0x22fdfc=_0x2af8e1();while(!![]){try{const _0x59e1b7=-parseInt(_0x267c13(0xdc))/0x1+-parseInt(_0x267c13(0xfa))/0x2+parseInt(_0x267c13(0xd9))/0x3+-parseInt(_0x267c13(0xe2))/0x4*(parseInt(_0x267c13(0xe0))/0x5)+-parseInt(_0x267c13(0xf5))/0x6+-parseInt(_0x267c13(0xe6))/0x7+parseInt(_0x267c13(0xc3))/0x8;if(_0x59e1b7===_0x53c94f)break;else _0x22fdfc['push'](_0x22fdfc['shift']());}catch(_0x1c3274){_0x22fdfc['push'](_0x22fdfc['shift']());}}}(a14_0xa217,0x2d3e9));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';function a14_0x31b5(_0x7e189f,_0x136705){_0x7e189f=_0x7e189f-0xc0;const _0xa217bd=a14_0xa217();let _0x31b5fd=_0xa217bd[_0x7e189f];return _0x31b5fd;}const GLOBAL_FLAG={'name':'global','type':a14_0x3f5895(0xda),'description':a14_0x3f5895(0xd5),'default':![]};function a14_0xa217(){const _0x1f882a=['689549hztBds','key','split','list','Value\x20to\x20assign','join','get','\x20\x20global:\x20\x20','isArray','pretty','Get\x20a\x20config\x20value','appcode','alias','\x20\x20project:\x20','raw','1117140sBvaKT','../../context.js','length','config','global','46474nLzwzV','args','Set\x20a\x20config\x20value','write','log','trim','apps','read','\x20config\x20delete\x20<key>\x20[--global]','format','6935136SUheyv','Key\x20not\x20found:\x20','Config\x20files:\x0a','project-or-global-explicit','includes','\x22.\x20Allowed:\x20','stringify','Deleted\x20`','Usage:\x20','Missing\x20key\x20or\x20value.','field','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','pageSize\x20must\x20be\x20a\x20positive\x20number','set','(none)','`\x20=\x20\x22','object','Set\x20`','Write\x20to\x20global\x20config','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','List\x20current\x20config','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','153216qzMbBk','boolean','\x20config\x20set\x20<key>\x20<value>\x20[--global]','289089DFxnCl','Missing\x20key\x20argument.','bool','Key\x20\x22','339050Cehswc','\x20(global)','8BMojsK','validation','Invalid\x20value\x20for\x20\x22','value'];a14_0xa217=function(){return _0x1f882a;};return a14_0xa217();}function parseAliasAppcodeSetKey(_0x47ba92){const _0x125cf8=a14_0x3f5895,_0x3d5105=_0x47ba92[_0x125cf8(0xe8)]('.');if(_0x3d5105['length']!==0x3||_0x3d5105[0x0]!=='apps'||_0x3d5105[0x2]!==_0x125cf8(0xf1))return undefined;const _0x5ace8d=_0x3d5105[0x1]?.['trim']();return _0x5ace8d?_0x5ace8d:undefined;}function parseAliasDeleteKey(_0x13c0bc){const _0x5bf976=a14_0x3f5895,_0x4f68a7=_0x13c0bc['split']('.');if(_0x4f68a7[_0x5bf976(0xf7)]===0x2&&_0x4f68a7[0x0]===_0x5bf976(0x100)){const _0x4eea19=_0x4f68a7[0x1]?.[_0x5bf976(0xff)]();return _0x4eea19?{'alias':_0x4eea19}:undefined;}if(_0x4f68a7['length']===0x3&&_0x4f68a7[0x0]===_0x5bf976(0x100)&&_0x4f68a7[0x2]==='appcode'){const _0x15edf4=_0x4f68a7[0x1]?.[_0x5bf976(0xff)]();return _0x15edf4?{'alias':_0x15edf4,'field':_0x5bf976(0xf1)}:undefined;}return undefined;}function setLocalAppAlias(_0x40586d,_0x1882fe,_0x5289f3){const _0x39c6d4=a14_0x3f5895,_0x346443=_0x40586d[_0x39c6d4(0x100)]&&typeof _0x40586d['apps']==='object'&&!Array[_0x39c6d4(0xee)](_0x40586d[_0x39c6d4(0x100)])?_0x40586d[_0x39c6d4(0x100)]:{},_0x5a72ca=_0x346443[_0x1882fe]&&typeof _0x346443[_0x1882fe]===_0x39c6d4(0xd3)&&!Array[_0x39c6d4(0xee)](_0x346443[_0x1882fe])?_0x346443[_0x1882fe]:{};_0x5a72ca[_0x39c6d4(0xf1)]=_0x5289f3,_0x346443[_0x1882fe]=_0x5a72ca,_0x40586d[_0x39c6d4(0x100)]=_0x346443;}function deleteLocalAppAlias(_0x2adeec,_0x24e11d){const _0x2ab57d=a14_0x3f5895;if(!_0x2adeec[_0x2ab57d(0x100)]||typeof _0x2adeec['apps']!=='object'||Array[_0x2ab57d(0xee)](_0x2adeec[_0x2ab57d(0x100)]))return![];const _0x23daed=_0x2adeec[_0x2ab57d(0x100)],_0x36e363=_0x23daed[_0x24e11d[_0x2ab57d(0xf2)]];if(!_0x36e363||typeof _0x36e363!==_0x2ab57d(0xd3)||Array[_0x2ab57d(0xee)](_0x36e363))return![];if(!_0x24e11d[_0x2ab57d(0xcd)])return delete _0x23daed[_0x24e11d['alias']],!![];if(!(_0x24e11d['field']in _0x36e363))return![];return delete _0x36e363[_0x24e11d[_0x2ab57d(0xcd)]],Object['keys'](_0x36e363)[_0x2ab57d(0xf7)]===0x0&&delete _0x23daed[_0x24e11d[_0x2ab57d(0xf2)]],!![];}const listDef={'service':a14_0x3f5895(0xf8),'command':a14_0x3f5895(0xe9),'description':a14_0x3f5895(0xd7),'risk':a14_0x3f5895(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3d1afc){const _0x50c3ff=a14_0x3f5895,{buildConfigFromFlags:_0x3a28cc}=await import(_0x50c3ff(0xf6)),_0x3ef83e=_0x3a28cc({}),_0x597ee1=getProjectConfigPath(),_0x42b0c9=resolveWriteConfigPath(_0x50c3ff(0xf9));if(_0x3d1afc[_0x50c3ff(0xc2)]===_0x50c3ff(0xef))return{'ok':!![],'message':_0x50c3ff(0xd8)+(JSON[_0x50c3ff(0xc9)](_0x3ef83e[_0x50c3ff(0xf4)],null,0x2)+'\x0a\x0a')+_0x50c3ff(0xc5)+(_0x50c3ff(0xf3)+(_0x597ee1??_0x50c3ff(0xd1))+'\x0a')+(_0x50c3ff(0xed)+_0x42b0c9)};return{'ok':!![],'data':{'effective':_0x3ef83e[_0x50c3ff(0xf4)],'configFiles':{'project':_0x597ee1??null,'global':_0x42b0c9}}};}},getDef={'service':a14_0x3f5895(0xf8),'command':a14_0x3f5895(0xec),'description':a14_0x3f5895(0xf0),'risk':a14_0x3f5895(0xc0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x3f5895(0xe7),'description':a14_0x3f5895(0xd6),'required':!![]}],'flags':[],async 'execute'(_0x3637a3){const _0xa14b8=a14_0x3f5895,_0x418140=_0x3637a3[_0xa14b8(0xfb)][0x0];if(!_0x418140)throw CliErrors[_0xa14b8(0xe3)](_0xa14b8(0xdd),_0xa14b8(0xcb)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0xb9cb31}=await import(_0xa14b8(0xf6)),{raw:_0x34e374}=_0xb9cb31({});if(_0x418140[_0xa14b8(0xc7)]('.')){const _0x2c740f=_0x418140['split']('.');let _0x52730e=_0x34e374;for(const _0x3ce7d1 of _0x2c740f){if(_0x52730e==null||typeof _0x52730e!=='object')throw CliErrors[_0xa14b8(0xe3)](_0xa14b8(0xc4)+_0x418140);_0x52730e=_0x52730e[_0x3ce7d1];}if(_0x52730e===undefined)throw CliErrors['validation'](_0xa14b8(0xc4)+_0x418140);return console['log'](typeof _0x52730e===_0xa14b8(0xd3)?JSON[_0xa14b8(0xc9)](_0x52730e,null,0x2):String(_0x52730e)),{'ok':!![]};}const _0x5645c4=_0x34e374[_0x418140];if(_0x5645c4===undefined)throw CliErrors['validation'](_0xa14b8(0xc4)+_0x418140);return console['log'](typeof _0x5645c4===_0xa14b8(0xd3)?JSON[_0xa14b8(0xc9)](_0x5645c4,null,0x2):String(_0x5645c4)),{'ok':!![]};}},setDef={'service':a14_0x3f5895(0xf8),'command':a14_0x3f5895(0xd0),'description':a14_0x3f5895(0xfc),'risk':a14_0x3f5895(0xfd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x3f5895(0xe7),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x3f5895(0xe5),'description':a14_0x3f5895(0xea),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4ded36){const _0x4aa0c2=a14_0x3f5895,_0x12b09=_0x4ded36[_0x4aa0c2(0xfb)][0x0],_0x2b0862=_0x4ded36[_0x4aa0c2(0xfb)][0x1];if(!_0x12b09||_0x2b0862===undefined)throw CliErrors[_0x4aa0c2(0xe3)](_0x4aa0c2(0xcc),_0x4aa0c2(0xcb)+CLI_BIN_NAME+_0x4aa0c2(0xdb));if(ENUM_KEYS[_0x12b09]&&!ENUM_KEYS[_0x12b09][_0x4aa0c2(0xc7)](_0x2b0862))throw CliErrors[_0x4aa0c2(0xe3)](_0x4aa0c2(0xe4)+_0x12b09+_0x4aa0c2(0xc8)+ENUM_KEYS[_0x12b09][_0x4aa0c2(0xeb)](',\x20'));if(_0x12b09==='riskLevel')throw CliErrors[_0x4aa0c2(0xe3)](_0x4aa0c2(0xce));if(_0x12b09==='pageSize'){const _0x17ff87=Number(_0x2b0862);if(isNaN(_0x17ff87)||_0x17ff87<=0x0)throw CliErrors[_0x4aa0c2(0xe3)](_0x4aa0c2(0xcf));}const _0x382226=resolveWriteScope({'explicitGlobal':_0x4ded36['bool'](_0x4aa0c2(0xf9)),'policy':'project-or-global-explicit'}),_0x1001d1=toScopeFlags(_0x382226),_0x3af482=readScopedConfig(_0x1001d1),_0x2822f7=parseAliasAppcodeSetKey(_0x12b09);if(!_0x2822f7&&!isTopLevelConfigKey(_0x12b09))throw CliErrors[_0x4aa0c2(0xe3)]('Top-level\x20key\x20\x22'+_0x12b09+'\x22\x20is\x20not\x20settable.','Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x2822f7?setLocalAppAlias(_0x3af482,_0x2822f7,_0x2b0862):_0x3af482[_0x12b09]=_0x12b09==='pageSize'?Number(_0x2b0862):_0x2b0862,console[_0x4aa0c2(0xfe)](_0x4aa0c2(0xd4)+_0x12b09+_0x4aa0c2(0xd2)+_0x2b0862+'\x22'+(_0x382226===_0x4aa0c2(0xf9)?_0x4aa0c2(0xe1):'')),writeScopedConfig(_0x3af482,_0x1001d1),{'ok':!![]};}},deleteDef={'service':'config','command':'delete','description':'Delete\x20a\x20config\x20value','risk':a14_0x3f5895(0xfd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x3f5895(0xe7),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x53a2f2){const _0x5f40fa=a14_0x3f5895,_0x454bfa=_0x53a2f2[_0x5f40fa(0xfb)][0x0];if(!_0x454bfa)throw CliErrors['validation']('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x5f40fa(0xc1));const _0xefd426=resolveWriteScope({'explicitGlobal':_0x53a2f2[_0x5f40fa(0xde)](_0x5f40fa(0xf9)),'policy':_0x5f40fa(0xc6)}),_0x254232=toScopeFlags(_0xefd426),_0x3c787f=readScopedConfig(_0x254232),_0x717be8=parseAliasDeleteKey(_0x454bfa);if(_0x717be8){if(!deleteLocalAppAlias(_0x3c787f,_0x717be8))throw CliErrors[_0x5f40fa(0xe3)](_0x5f40fa(0xc4)+_0x454bfa);return console[_0x5f40fa(0xfe)](_0x5f40fa(0xca)+_0x454bfa+'`'+(_0xefd426===_0x5f40fa(0xf9)?_0x5f40fa(0xe1):'')),writeScopedConfig(_0x3c787f,_0x254232),{'ok':!![]};}if(_0x3c787f[_0x454bfa]===undefined)throw CliErrors[_0x5f40fa(0xe3)](_0x5f40fa(0xdf)+_0x454bfa+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x3c787f[_0x454bfa],console[_0x5f40fa(0xfe)](_0x5f40fa(0xca)+_0x454bfa+'`'+(_0xefd426==='global'?_0x5f40fa(0xe1):'')),writeScopedConfig(_0x3c787f,_0x254232),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f0b9d,_0x34f3d2){var _0x531bf0=a15_0x1888,_0x4294b8=_0x5f0b9d();while(!![]){try{var _0xa3a013=-parseInt(_0x531bf0(0x173))/0x1*(-parseInt(_0x531bf0(0x171))/0x2)+-parseInt(_0x531bf0(0x175))/0x3+-parseInt(_0x531bf0(0x16b))/0x4+parseInt(_0x531bf0(0x16e))/0x5*(-parseInt(_0x531bf0(0x16d))/0x6)+parseInt(_0x531bf0(0x16f))/0x7*(parseInt(_0x531bf0(0x172))/0x8)+parseInt(_0x531bf0(0x16c))/0x9*(-parseInt(_0x531bf0(0x170))/0xa)+parseInt(_0x531bf0(0x174))/0xb;if(_0xa3a013===_0x34f3d2)break;else _0x4294b8['push'](_0x4294b8['shift']());}catch(_0x100dbd){_0x4294b8['push'](_0x4294b8['shift']());}}}(a15_0x363e,0xc6e0a));function a15_0x1888(_0x2d59c5,_0x32ff40){_0x2d59c5=_0x2d59c5-0x16b;var _0x363e99=a15_0x363e();var _0x1888a9=_0x363e99[_0x2d59c5];return _0x1888a9;}import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x363e(){var _0x31e253=['1UAPjiR','49948932IwLBdv','4214400QICARx','3925776UyvmyA','9OVnztA','16410XWHuoW','2845xnAkNf','77168eVYETF','14620010JjkAIh','2077716neBRDy','464lTEZZy'];a15_0x363e=function(){return _0x31e253;};return a15_0x363e();}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
|