@lovrabet/lovrabet-cli 2.0.13-beta.1 → 2.0.13-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -3
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
function
|
|
2
|
+
function a0_0x4b95(_0x37e4d7,_0x553b11){_0x37e4d7=_0x37e4d7-0x9b;const _0x1e8113=a0_0x1e81();let _0x4b9578=_0x1e8113[_0x37e4d7];return _0x4b9578;}const a0_0x532496=a0_0x4b95;(function(_0x21598b,_0x17ac96){const _0xf8319e=a0_0x4b95,_0x1272d0=_0x21598b();while(!![]){try{const _0x591456=parseInt(_0xf8319e(0xbe))/0x1+-parseInt(_0xf8319e(0x9e))/0x2*(-parseInt(_0xf8319e(0xba))/0x3)+parseInt(_0xf8319e(0xbb))/0x4+-parseInt(_0xf8319e(0xad))/0x5*(-parseInt(_0xf8319e(0x9f))/0x6)+parseInt(_0xf8319e(0x9d))/0x7+parseInt(_0xf8319e(0xb0))/0x8+-parseInt(_0xf8319e(0xb6))/0x9;if(_0x591456===_0x17ac96)break;else _0x1272d0['push'](_0x1272d0['shift']());}catch(_0x212ad6){_0x1272d0['push'](_0x1272d0['shift']());}}}(a0_0x1e81,0xc6be1));import{jsx as a0_0x3900b6}from'react/jsx-runtime';import a0_0x1b7cb0 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x1b7cb0(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});function a0_0x1e81(){const _0x192c72=['error','log','./framework/preparse.js','exit','10PsxstT','corrected','code','4841792ttaOXw','original','ERR_STREAM_DESTROYED','args','ERR_USE_AFTER_CLOSE','stderr','50173776ynyKQh','[preparse]\x20','ExitPromptError','Hint:\x20','3UiFcmU','5180984USyBWb','hint','defaultCommand','148395szbIbi','assign','\x20->\x20--','unknownCommand','name','help','exitCode','length','9425465gJmLxD','3089462fsxnYH','4346466lsvLIp','\x0aCancelled.\x0a','flags','Error:\x20','input','flatMap','cancelled','catch','write','message'];a0_0x1e81=function(){return _0x192c72;};return a0_0x1e81();}void main()[a0_0x532496(0xa6)](handleError);async function main(){try{await run();}catch(_0x34b4d7){handleError(_0x34b4d7);}}async function run(){const _0x4e0fe6=a0_0x532496;let _0x1a88d6=cli['input'][0x0],_0xd1ea46=cli[_0x4e0fe6(0xa3)][0x1];const _0x565c31=cli[_0x4e0fe6(0xa1)];try{const {correctFlags:_0x4998ab}=await import(_0x4e0fe6(0xab)),_0x30b5cf=getAllDefinitions()[_0x4e0fe6(0xa4)](_0x4320e7=>_0x4320e7['flags']??[]),{flags:_0x4dab9e,corrections:_0x5b64e6}=_0x4998ab(_0x565c31,_0x30b5cf);if(_0x5b64e6[_0x4e0fe6(0x9c)]>0x0){for(const _0x325fc3 of _0x5b64e6){process[_0x4e0fe6(0xb5)][_0x4e0fe6(0xa7)](_0x4e0fe6(0xb7)+_0x325fc3['handler']+':\x20--'+_0x325fc3[_0x4e0fe6(0xb1)]+_0x4e0fe6(0xc0)+_0x325fc3[_0x4e0fe6(0xae)]+'\x0a');}Object[_0x4e0fe6(0xbf)](_0x565c31,_0x4dab9e);}}catch{}if(!_0x1a88d6||!isKnownService(_0x1a88d6)){const {waitUntilExit:_0x4dd153}=render(a0_0x3900b6(Help,{}));await _0x4dd153();return;}const _0x29122b=getServiceEntry(_0x1a88d6);if(!_0xd1ea46){if(_0x565c31[_0x4e0fe6(0xc3)]){console[_0x4e0fe6(0xaa)](generateServiceHelp(_0x1a88d6));return;}if(_0x29122b[_0x4e0fe6(0xbd)])_0xd1ea46=_0x29122b['defaultCommand'];else{console['log'](generateServiceHelp(_0x1a88d6));return;}}const _0x199e3a=findDefinition(_0x1a88d6,_0xd1ea46);!_0x199e3a&&(console[_0x4e0fe6(0xaa)](generateServiceHelp(_0x1a88d6)),handleError(CliErrors[_0x4e0fe6(0xc1)](_0x1a88d6+'\x20'+_0xd1ea46)));if(_0x565c31[_0x4e0fe6(0xc3)]){console['log'](generateCommandHelp(_0x199e3a));return;}const _0x450fad=buildConfigFromFlags(_0x565c31);await initGlobalEnvironment(_0x450fad);const _0x200e1f=createPipelineEnv(_0x450fad,_0x565c31);_0x200e1f[_0x4e0fe6(0xb3)]=cli[_0x4e0fe6(0xa3)]['slice'](0x2),await runCommand(_0x199e3a,_0x200e1f);}function handleError(_0x4eba77){const _0x11b73b=a0_0x532496;if(_0x4eba77 instanceof CliError){_0x4eba77[_0x11b73b(0xaf)]===_0x11b73b(0xa5)&&(process[_0x11b73b(0xb5)][_0x11b73b(0xa7)](_0x11b73b(0xa0)),process['exit'](0x0));console[_0x11b73b(0xa9)](_0x11b73b(0xa2)+_0x4eba77[_0x11b73b(0xa8)]);if(_0x4eba77[_0x11b73b(0xbc)])console[_0x11b73b(0xa9)](_0x11b73b(0xb9)+_0x4eba77[_0x11b73b(0xbc)]);process['exit'](_0x4eba77[_0x11b73b(0x9b)]);}isUserCancellation(_0x4eba77)&&(process[_0x11b73b(0xb5)][_0x11b73b(0xa7)]('\x0aCancelled.\x0a'),process['exit'](0x0)),console[_0x11b73b(0xa9)]('Unexpected\x20error:',_0x4eba77),process[_0x11b73b(0xac)](0x1);}function isUserCancellation(_0x188e28){const _0x12a37a=a0_0x532496;if(!(_0x188e28 instanceof Error))return![];if(_0x188e28[_0x12a37a(0xc2)]===_0x12a37a(0xb8))return!![];if(_0x188e28[_0x12a37a(0xaf)]===_0x12a37a(0xb4))return!![];if(_0x188e28[_0x12a37a(0xaf)]===_0x12a37a(0xb2))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e40d3,_0x4473c1){const _0x1664bd=a1_0x1aeb,_0x1f5c1e=_0x1e40d3();while(!![]){try{const _0x18d48d=parseInt(_0x1664bd(0x1db))/0x1*(-parseInt(_0x1664bd(0x1d2))/0x2)+-parseInt(_0x1664bd(0x1da))/0x3+parseInt(_0x1664bd(0x1d5))/0x4*(parseInt(_0x1664bd(0x1ce))/0x5)+parseInt(_0x1664bd(0x1d0))/0x6*(parseInt(_0x1664bd(0x1de))/0x7)+-parseInt(_0x1664bd(0x1bf))/0x8*(-parseInt(_0x1664bd(0x1c7))/0x9)+parseInt(_0x1664bd(0x1c1))/0xa+parseInt(_0x1664bd(0x1c8))/0xb*(parseInt(_0x1664bd(0x1c0))/0xc);if(_0x18d48d===_0x4473c1)break;else _0x1f5c1e['push'](_0x1f5c1e['shift']());}catch(_0x5a03ef){_0x1f5c1e['push'](_0x1f5c1e['shift']());}}}(a1_0x5a35,0x6f69b));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';export function fingerprintAccessKey(_0x31a449){const _0x1d5fdd=a1_0x1aeb,_0x59a16f=_0x31a449[_0x1d5fdd(0x1d9)](),_0x1db69d=_0x59a16f[_0x1d5fdd(0x1cd)](-0x6)||_0x1d5fdd(0x1d6),_0x217541=createHash('sha256')[_0x1d5fdd(0x1d3)](_0x59a16f)['digest'](_0x1d5fdd(0x1dc))[_0x1d5fdd(0x1cd)](0x0,0xc);return _0x1d5fdd(0x1c4)+_0x1db69d+'_'+_0x217541;}export function getAppCacheFilePath(_0x550553,_0x107660){const _0xdace06=a1_0x1aeb;return resolve(homedir(),PRODUCT_CONFIG[_0xdace06(0x1d7)],_0xdace06(0x1c9),_0x550553,fingerprintAccessKey(_0x107660),'my-apps.json');}function a1_0x1aeb(_0xe1930a,_0x3f6319){_0xe1930a=_0xe1930a-0x1bf;const _0x5a35d3=a1_0x5a35();let _0x1aebbd=_0x5a35d3[_0xe1930a];return _0x1aebbd;}export function readCachedAppList(_0x274546,_0x47e846){const _0x2d7cd5=a1_0x1aeb;if(!_0x47e846?.[_0x2d7cd5(0x1d9)]())return null;const _0x162911=getAppCacheFilePath(_0x274546,_0x47e846);if(!existsSync(_0x162911))return null;try{const _0x4dc4fe=readFileSync(_0x162911,_0x2d7cd5(0x1c6));if(!_0x4dc4fe[_0x2d7cd5(0x1d9)]())return null;const _0x18c470=JSON[_0x2d7cd5(0x1c5)](_0x4dc4fe);if(!Array[_0x2d7cd5(0x1d4)](_0x18c470[_0x2d7cd5(0x1cb)]))return null;return _0x18c470;}catch{return null;}}function a1_0x5a35(){const _0x5c4d72=['2712342kxtPCz','1350HUXWpx','hex','.tmp','25151hWuNfm','424xwSIjy','72umYxxU','4110100pqAALB','appCode','EACCES','ak_','parse','utf8','23121PyoQyt','559361QcLUMY','cache','find','items','EXDEV','slice','45OlKaMx','code','738xiCrTJ','appName','600DUVtCF','update','isArray','209444oOEPqt','unknown','homeDirName','stringify','trim'];a1_0x5a35=function(){return _0x5c4d72;};return a1_0x5a35();}export function writeCachedAppList(_0x159113,_0x20ca3d,_0x6b7c32){const _0x534e1b=a1_0x1aeb,_0x4b0ec9=getAppCacheFilePath(_0x159113,_0x20ca3d),_0x43acbf=dirname(_0x4b0ec9);!existsSync(_0x43acbf)&&mkdirSync(_0x43acbf,{'recursive':!![]});const _0x28e9d4=_0x4b0ec9+_0x534e1b(0x1dd);try{writeFileSync(_0x28e9d4,JSON[_0x534e1b(0x1d8)](_0x6b7c32,null,0x2)+'\x0a',{'encoding':_0x534e1b(0x1c6),'mode':0x180});try{renameSync(_0x28e9d4,_0x4b0ec9);}catch(_0x3596dc){if(_0x3596dc[_0x534e1b(0x1cf)]==='EPERM'||_0x3596dc[_0x534e1b(0x1cf)]===_0x534e1b(0x1cc)||_0x3596dc['code']===_0x534e1b(0x1c3)){writeFileSync(_0x4b0ec9,JSON[_0x534e1b(0x1d8)](_0x6b7c32,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x28e9d4);}catch{}}else throw _0x3596dc;}}catch(_0xb023d0){try{unlinkSync(_0x28e9d4);}catch{}throw _0xb023d0;}return _0x4b0ec9;}export function resolveCachedAppCode(_0x42e6f2,_0x1b3597,_0x3765a8){const _0x2ae7ef=a1_0x1aeb;if(!_0x42e6f2)return undefined;const _0x261526=readCachedAppList(_0x1b3597,_0x3765a8),_0x42f37f=_0x261526?.[_0x2ae7ef(0x1cb)][_0x2ae7ef(0x1ca)](_0x4afd4f=>_0x4afd4f[_0x2ae7ef(0x1d1)]===_0x42e6f2);return _0x42f37f?.[_0x2ae7ef(0x1c2)]?.[_0x2ae7ef(0x1d9)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0xab65ca=a2_0x2010;(function(_0x4e0042,_0x2df3cd){const _0x1e47eb=a2_0x2010,_0x150b91=_0x4e0042();while(!![]){try{const _0x3f85ad=-parseInt(_0x1e47eb(0xba))/0x1*(-parseInt(_0x1e47eb(0x99))/0x2)+parseInt(_0x1e47eb(0xaf))/0x3*(-parseInt(_0x1e47eb(0x86))/0x4)+-parseInt(_0x1e47eb(0xb7))/0x5+-parseInt(_0x1e47eb(0xa4))/0x6+-parseInt(_0x1e47eb(0x8c))/0x7*(parseInt(_0x1e47eb(0xc5))/0x8)+-parseInt(_0x1e47eb(0xbf))/0x9*(-parseInt(_0x1e47eb(0x90))/0xa)+-parseInt(_0x1e47eb(0x8d))/0xb*(-parseInt(_0x1e47eb(0xc2))/0xc);if(_0x3f85ad===_0x2df3cd)break;else _0x150b91['push'](_0x150b91['shift']());}catch(_0x2546a5){_0x150b91['push'](_0x150b91['shift']());}}}(a2_0x3396,0x476dc));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';function a2_0x3396(){const _0x21ffcf=['langs','\x22\x20not\x20found.','appPublishStatus','\x20app(s)\x20for\x20env=\x22','3tBpupA','list','find','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','join','Read\x20from\x20local\x20cache\x20only','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','../../commands/app/cache.js','2924285nMTWJz','appcode','../../commands/app/remote-source.js','229kmlrTh','use','length','validation','accessKey','91791NkJBrQ','env','Missing\x20app\x20name.','10109688BrrHjH','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','isArray','116576dBDrnq','.appcode\x20to\x20.lovrabet.json.','envName','fetchedAt','defaultApp','str','cache','name','source','app','Target\x20environment\x20(default:\x20current\x20env)','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','args','global','isCurrent','filter','Use\x20`','production','string','App\x20\x22','bool','nonInteractive','1864396cBcIxg','Usage:\x20','../../context.js','raw','newConfigFileName','appName','35IAKGqN','11faWeyb','enableI18n','config','440oAKmPz','local','Refreshed\x20app\x20cache\x20with\x20','i18nInfo','mergedCli','No\x20cached\x20apps\x20found.','appCode','map','project-default','3266IlAtxW','\x20cached\x20app(s)\x20for\x20env=\x22','boolean','import','Filter\x20by\x20environment\x20(default:\x20current\x20env)','no-cache','Initialize\x20','Read\x20app\x20list\x20from\x20local\x20cache\x20only','cachePath','trim','appOwnerName','1492794SDJIUy','\x20app\x20use\x20<name>\x20[--global]','projectPath','Available\x20remote\x20apps:\x20','items','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','globalPath'];a2_0x3396=function(){return _0x21ffcf;};return a2_0x3396();}import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':a2_0xab65ca(0xd2),'type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]};function a2_0x2010(_0x4acc75,_0x5d2a0a){_0x4acc75=_0x4acc75-0x80;const _0x339650=a2_0x3396();let _0x201097=_0x339650[_0x4acc75];return _0x201097;}function collectFlags(_0x477654,_0x497002){const _0x51c5dc=a2_0xab65ca,_0x58e3fd={};for(const _0x32398c of _0x497002){const _0x55e356=_0x32398c['type']===_0x51c5dc(0x9b)?_0x477654[_0x51c5dc(0x84)](_0x32398c[_0x51c5dc(0xcc)]):_0x477654[_0x51c5dc(0xca)](_0x32398c[_0x51c5dc(0xcc)]);if(_0x55e356!==''&&_0x55e356!==![])_0x58e3fd[_0x32398c[_0x51c5dc(0xcc)]]=_0x55e356;}if(_0x477654[_0x51c5dc(0x85)])_0x58e3fd[_0x51c5dc(0x85)]=!![];return _0x58e3fd;}function normalizeLanguages(_0x3e7b93){const _0x3e8ee3=a2_0xab65ca;if(!Array[_0x3e8ee3(0xc4)](_0x3e7b93))return[];return _0x3e7b93[_0x3e8ee3(0xd4)](_0x533e55=>typeof _0x533e55===_0x3e8ee3(0x82))[_0x3e8ee3(0x97)](_0x431e50=>_0x431e50[_0x3e8ee3(0xa2)]())['filter'](Boolean);}function buildRemoteAppI18nFields(_0xc38e09){const _0x1ed0d6=a2_0xab65ca,_0x302aad=normalizeLanguages(_0xc38e09[_0x1ed0d6(0x93)]?.[_0x1ed0d6(0xab)]);return{'enableI18n':typeof _0xc38e09[_0x1ed0d6(0x8e)]==='boolean'?_0xc38e09['enableI18n']:null,'languages':_0x302aad,'i18nInfo':_0xc38e09[_0x1ed0d6(0x93)]?{..._0xc38e09['i18nInfo'],'langs':_0x302aad[_0x1ed0d6(0xbc)]?_0x302aad:null}:null};}const initDef={'service':a2_0xab65ca(0xce),'command':'init','description':a2_0xab65ca(0x9f)+PRODUCT_CONFIG[a2_0xab65ca(0x8a)]+'\x20config\x20file','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x4f2cbb){return await runInit(collectFlags(_0x4f2cbb,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':'app','command':a2_0xab65ca(0xb0),'description':a2_0xab65ca(0xa9),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0xab65ca(0xc0),'type':a2_0xab65ca(0x82),'description':a2_0xab65ca(0x9d),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0xab65ca(0x9b),'description':a2_0xab65ca(0xa0),'default':![]},{'name':a2_0xab65ca(0x9e),'type':a2_0xab65ca(0x9b),'description':a2_0xab65ca(0xb2),'default':![]}],async 'execute'(_0xad7f4f){const _0x49171f=a2_0xab65ca,_0x4f2ba7=_0xad7f4f[_0x49171f(0xca)](_0x49171f(0xc0))||_0xad7f4f[_0x49171f(0xc7)]||getEnv()||'production',_0x5dca1a=_0xad7f4f['bool'](_0x49171f(0x91)),_0x18124c=_0xad7f4f[_0x49171f(0x84)](_0x49171f(0x9e)),{readRawConfigWithLayers:_0x28b865,resolveDefaultAppSource:_0x54240e,getLocalAppAliases:_0x280e64}=await import(_0x49171f(0x88)),{getRemoteAppList:_0x49eafa}=await import(_0x49171f(0xb9)),{config:_0x29ff30,layers:_0x3929ae}=_0x28b865(),_0x195b27=_0x54240e(_0x3929ae),{defaultApp:_0x724383}=_0x29ff30,_0x454a56=await _0x49eafa({'env':_0x4f2ba7,'accessKey':_0xad7f4f[_0x49171f(0xbe)],'localOnly':_0x5dca1a,'noCache':_0x18124c}),_0x1b7396=_0x454a56[_0x49171f(0xa8)][_0x49171f(0x97)](_0x3fa4e0=>{const _0x5d60af=_0x49171f;return{'name':_0x3fa4e0['appName'],'appcode':_0x3fa4e0[_0x5d60af(0x96)],'named':!![],'definedIn':'remote','isDefault':_0x3fa4e0['appName']===_0x724383,...buildAppProfileListFields(_0x4f2ba7),...buildRemoteAppI18nFields(_0x3fa4e0),'source':_0x454a56[_0x5d60af(0xcd)],'owner':_0x3fa4e0[_0x5d60af(0xa3)]??null,'status':_0x3fa4e0[_0x5d60af(0xad)]??null,'cachedAt':_0x454a56[_0x5d60af(0xc8)]};}),_0x295f89=_0x280e64(_0x29ff30);let _0x599f24=0x0;for(const [_0x5d0d7e,_0x2e25f4]of Object['entries'](_0x295f89)){const _0x3c2c3e=typeof _0x2e25f4[_0x49171f(0xb8)]===_0x49171f(0x82)?_0x2e25f4[_0x49171f(0xb8)][_0x49171f(0xa2)]():'';if(!_0x3c2c3e)continue;_0x599f24+=0x1,_0x1b7396['push']({'name':_0x5d0d7e,'appcode':_0x3c2c3e,'named':!![],'definedIn':'local','isDefault':_0x5d0d7e===_0x724383,...buildAppProfileListFields(_0x4f2ba7),'source':_0x49171f(0x8f),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x1b7396,_0xad7f4f[_0x49171f(0x94)]);if(_0x1b7396[_0x49171f(0xbc)]===0x0)return{'ok':!![],'data':[],'message':_0x454a56['source']==='cache'?_0x49171f(0x95):'No\x20apps\x20found\x20on\x20the\x20platform.'};const _0xebc3e5=_0x1b7396[_0x49171f(0xb1)](_0xeab959=>_0xeab959[_0x49171f(0xd3)]===!![]),_0x5ba278=_0x724383??_0xebc3e5?.[_0x49171f(0xcc)]??null,_0x3952ba={'env':_0x4f2ba7,'source':_0x454a56['source'],'fetchedAt':_0x454a56[_0x49171f(0xc8)],'cachePath':_0x454a56[_0x49171f(0xa1)],'globalPath':_0x3929ae[_0x49171f(0xaa)]??null,'projectPath':_0x3929ae[_0x49171f(0xa6)]??null,'defaultApp':_0x5ba278,'defaultAppSource':_0x724383!=null?_0x195b27:null,'localAliasCount':_0x599f24};return{'ok':!![],'data':{'items':_0x1b7396,'meta':_0x3952ba}};}},pullDef={'service':a2_0xab65ca(0xce),'command':'pull','description':a2_0xab65ca(0xb5),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0xab65ca(0xc0),'type':a2_0xab65ca(0x82),'description':a2_0xab65ca(0xcf),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0xab65ca(0x91),'type':a2_0xab65ca(0x9b),'description':a2_0xab65ca(0xb4),'default':![]},{'name':'no-cache','type':'boolean','description':a2_0xab65ca(0xb2),'default':![]}],async 'execute'(_0x27a927){const _0x1f09c3=a2_0xab65ca,_0x22f9a7=_0x27a927[_0x1f09c3(0xca)](_0x1f09c3(0xc0))||_0x27a927[_0x1f09c3(0xc7)]||getEnv()||_0x1f09c3(0x81),_0x31a3dd=_0x27a927[_0x1f09c3(0x84)](_0x1f09c3(0x91)),_0x1d0054=_0x27a927[_0x1f09c3(0x84)](_0x1f09c3(0x9e)),{getRemoteAppList:_0x24a094}=await import(_0x1f09c3(0xb9)),_0x2ec715=await _0x24a094({'env':_0x22f9a7,'accessKey':_0x27a927[_0x1f09c3(0xbe)],'localOnly':_0x31a3dd,'noCache':_0x1d0054});return{'ok':!![],'data':{'total':_0x2ec715[_0x1f09c3(0xa8)][_0x1f09c3(0xbc)],'env':_0x22f9a7,'source':_0x2ec715[_0x1f09c3(0xcd)],'fetchedAt':_0x2ec715[_0x1f09c3(0xc8)],'cachePath':_0x2ec715[_0x1f09c3(0xa1)]},'message':_0x2ec715[_0x1f09c3(0xcd)]===_0x1f09c3(0xcb)?'Loaded\x20'+_0x2ec715[_0x1f09c3(0xa8)]['length']+_0x1f09c3(0x9a)+_0x22f9a7+'\x22.':_0x1f09c3(0x92)+_0x2ec715[_0x1f09c3(0xa8)]['length']+_0x1f09c3(0xae)+_0x22f9a7+'\x22.'};}},useDef={'service':a2_0xab65ca(0xce),'command':a2_0xab65ca(0xbb),'description':'Set\x20the\x20fallback\x20app\x20candidate','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x5ef9f5){const _0x51c204=a2_0xab65ca;if(!_0x5ef9f5[_0x51c204(0xd1)][0x0])throw CliErrors[_0x51c204(0xbd)]('Missing\x20app\x20name.',_0x51c204(0x87)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');},async 'execute'(_0x3b10de){const _0x1db1b5=a2_0xab65ca,_0x62b6df=_0x3b10de[_0x1db1b5(0xd1)][0x0];if(!_0x62b6df)throw CliErrors[_0x1db1b5(0xbd)](_0x1db1b5(0xc1),_0x1db1b5(0x87)+CLI_BIN_NAME+_0x1db1b5(0xa5));const {buildConfigFromFlags:_0x3cddf6,resolveLocalAppAliasCode:_0x4c7676}=await import('../../context.js'),{readCachedAppList:_0x815c8c}=await import(_0x1db1b5(0xb6)),_0x63f516=_0x3b10de[_0x1db1b5(0xca)]('env'),_0x19a68c=_0x3cddf6(_0x63f516?{'env':_0x63f516}:{}),_0x1c1133=_0x815c8c(_0x19a68c[_0x1db1b5(0xc0)],_0x19a68c[_0x1db1b5(0xbe)]),_0xc46225=_0x1c1133?.[_0x1db1b5(0xa8)][_0x1db1b5(0xb1)](_0x2fc22c=>_0x2fc22c[_0x1db1b5(0x8b)]===_0x62b6df),_0x16de2a=_0x4c7676(_0x19a68c[_0x1db1b5(0x89)]??{},_0x62b6df);if(!_0xc46225&&!_0x16de2a&&_0x19a68c[_0x1db1b5(0xc9)]!==_0x62b6df){const _0x5e67ec=[..._0x1c1133?.[_0x1db1b5(0xa8)][_0x1db1b5(0x97)](_0x4d9fa5=>_0x4d9fa5['appName'])??[]],_0x58b7a1=_0x5e67ec[_0x1db1b5(0xbc)]===0x0?_0x1db1b5(0x80)+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x62b6df+_0x1db1b5(0xc6):_0x1db1b5(0xa7)+Array['from'](new Set(_0x5e67ec))[_0x1db1b5(0xb3)](',\x20')+_0x1db1b5(0xc3);throw CliErrors[_0x1db1b5(0xbd)](_0x1db1b5(0x83)+_0x62b6df+_0x1db1b5(0xac),_0x58b7a1);}const _0x2713de=_0x3b10de[_0x1db1b5(0x84)](_0x1db1b5(0xd2));let _0x3a94f1;if(_0x2713de)_0x3a94f1={'global':!![]};else{const {isInProject:_0x3d8366}=await import(_0x1db1b5(0x88)),_0x39cb7a=_0x3d8366();_0x3a94f1=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x1db1b5(0x98),'inProject':_0x39cb7a}));}const _0x2b347b=readConfig(_0x3a94f1);return _0x2b347b['defaultApp']=_0x62b6df,writeConfig(_0x2b347b,_0x3a94f1),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0x62b6df+'\x22'+scopeLabel(_0x3a94f1)+'.'};}},importDef={'service':'app','command':a2_0xab65ca(0x9c),'description':a2_0xab65ca(0xd0),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x4cd4c9){return await runInitImport(collectFlags(_0x4cd4c9,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
1
|
+
const a2_0x243027=a2_0x3fca;function a2_0x3fca(_0xf77fb4,_0x24ccf4){_0xf77fb4=_0xf77fb4-0x1b0;const _0xb5823b=a2_0xb582();let _0x3fcaed=_0xb5823b[_0xf77fb4];return _0x3fcaed;}(function(_0x1d440c,_0x995326){const _0x5e1a4e=a2_0x3fca,_0x88b901=_0x1d440c();while(!![]){try{const _0x2e1b09=parseInt(_0x5e1a4e(0x201))/0x1*(-parseInt(_0x5e1a4e(0x1c3))/0x2)+-parseInt(_0x5e1a4e(0x1fa))/0x3+parseInt(_0x5e1a4e(0x1be))/0x4*(-parseInt(_0x5e1a4e(0x1b4))/0x5)+parseInt(_0x5e1a4e(0x1b3))/0x6+parseInt(_0x5e1a4e(0x1e3))/0x7+parseInt(_0x5e1a4e(0x1f0))/0x8*(-parseInt(_0x5e1a4e(0x1bc))/0x9)+parseInt(_0x5e1a4e(0x1ef))/0xa;if(_0x2e1b09===_0x995326)break;else _0x88b901['push'](_0x88b901['shift']());}catch(_0xffcd70){_0x88b901['push'](_0x88b901['shift']());}}}(a2_0xb582,0xcc39a));import{CliErrors}from'../../errors.js';import{PRODUCT_CONFIG}from'../../constant/product.js';function a2_0xb582(){const _0xf56d0c=['args','find','../../commands/app/cache.js','appName','map','isArray','11850410iCiAAD','8trqTzR','name','source','\x22\x20not\x20found.','Read\x20app\x20list\x20from\x20local\x20cache\x20only','use','appOwnerName','Usage:\x20','nonInteractive','enableI18n','4428099nmBtJJ','No\x20apps\x20found\x20on\x20the\x20platform.','cachePath','length','list','push','\x20app\x20use\x20<name>\x20[--global]','208724DAoSaF','env','App\x20\x22','Loaded\x20','boolean','Refreshed\x20app\x20cache\x20with\x20','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','no-cache','3287772pMDjzN','120yImxPC','Missing\x20app\x20name.','Filter\x20by\x20environment\x20(default:\x20current\x20env)','project-default','Read\x20from\x20local\x20cache\x20only','remote','type','read','2802546TyjSCQ','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','12424FkOLdF','mergedCli','No\x20cached\x20apps\x20found.','\x20app(s)\x20for\x20env=\x22','fetchedAt','4AanWWN','import','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','str','bool','Use\x20`','validation','local','pull','langs','appCode','newConfigFileName','global','write','production','config','envName','app','../../commands/app/remote-source.js','Use\x20global\x20config\x20scope','cache','Set\x20the\x20fallback\x20app\x20candidate','trim','Initialize\x20','init','appcode','items','.appcode\x20to\x20.lovrabet.json.','string','entries','join','Default\x20app\x20candidate\x20set\x20to\x20\x22','9680454awRBCX','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','../../context.js','globalPath','isCurrent','i18nInfo'];a2_0xb582=function(){return _0xf56d0c;};return a2_0xb582();}import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':a2_0x243027(0x1cf),'type':'boolean','description':a2_0x243027(0x1d6),'default':![]};function collectFlags(_0x222856,_0x4d7024){const _0x37d741=a2_0x243027,_0x859f37={};for(const _0x17c8f0 of _0x4d7024){const _0x3b8eb8=_0x17c8f0[_0x37d741(0x1ba)]==='boolean'?_0x222856[_0x37d741(0x1c7)](_0x17c8f0[_0x37d741(0x1f1)]):_0x222856[_0x37d741(0x1c6)](_0x17c8f0[_0x37d741(0x1f1)]);if(_0x3b8eb8!==''&&_0x3b8eb8!==![])_0x859f37[_0x17c8f0['name']]=_0x3b8eb8;}if(_0x222856[_0x37d741(0x1f8)])_0x859f37[_0x37d741(0x1f8)]=!![];return _0x859f37;}function normalizeLanguages(_0xf2f4ff){const _0x10d624=a2_0x243027;if(!Array[_0x10d624(0x1ee)](_0xf2f4ff))return[];return _0xf2f4ff['filter'](_0x50cf9b=>typeof _0x50cf9b===_0x10d624(0x1df))['map'](_0x44eb38=>_0x44eb38['trim']())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x6fce63){const _0xecfa2=a2_0x243027,_0x2709b2=normalizeLanguages(_0x6fce63['i18nInfo']?.[_0xecfa2(0x1cc)]);return{'enableI18n':typeof _0x6fce63['enableI18n']===_0xecfa2(0x205)?_0x6fce63[_0xecfa2(0x1f9)]:null,'languages':_0x2709b2,'i18nInfo':_0x6fce63[_0xecfa2(0x1e8)]?{..._0x6fce63['i18nInfo'],'langs':_0x2709b2[_0xecfa2(0x1fd)]?_0x2709b2:null}:null};}const initDef={'service':'app','command':a2_0x243027(0x1db),'description':a2_0x243027(0x1da)+PRODUCT_CONFIG[a2_0x243027(0x1ce)]+'\x20config\x20file','risk':a2_0x243027(0x1d0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x309f83){return await runInit(collectFlags(_0x309f83,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x243027(0x1d4),'command':a2_0x243027(0x1fe),'description':a2_0x243027(0x1b1),'risk':a2_0x243027(0x1bb),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':a2_0x243027(0x1df),'description':a2_0x243027(0x1b6),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x243027(0x1ca),'type':a2_0x243027(0x205),'description':a2_0x243027(0x1f4),'default':![]},{'name':a2_0x243027(0x1b2),'type':a2_0x243027(0x205),'description':a2_0x243027(0x1bd),'default':![]}],async 'execute'(_0x24cfd8){const _0x504116=a2_0x243027,_0x5f4a0d=_0x24cfd8[_0x504116(0x1c6)](_0x504116(0x202))||_0x24cfd8[_0x504116(0x1d3)]||getEnv()||_0x504116(0x1d1),_0x3c9b95=_0x24cfd8[_0x504116(0x1c7)](_0x504116(0x1ca)),_0x13934c=_0x24cfd8['bool'](_0x504116(0x1b2)),{readRawConfigWithLayers:_0x4dba29,resolveDefaultAppSource:_0xf42c72,getLocalAppAliases:_0x4bbdb3}=await import('../../context.js'),{getRemoteAppList:_0x479f3a}=await import(_0x504116(0x1d5)),{config:_0x5a0584,layers:_0x3d22a0}=_0x4dba29(),_0x1722a2=_0xf42c72(_0x3d22a0),{defaultApp:_0x67d583}=_0x5a0584,_0x3a335d=await _0x479f3a({'env':_0x5f4a0d,'accessKey':_0x24cfd8['accessKey'],'localOnly':_0x3c9b95,'noCache':_0x13934c}),_0x4a82d7=_0x3a335d[_0x504116(0x1dd)][_0x504116(0x1ed)](_0x266bdf=>{const _0x459adb=_0x504116;return{'name':_0x266bdf[_0x459adb(0x1ec)],'appcode':_0x266bdf[_0x459adb(0x1cd)],'named':!![],'definedIn':_0x459adb(0x1b9),'isDefault':_0x266bdf['appName']===_0x67d583,...buildAppProfileListFields(_0x5f4a0d),...buildRemoteAppI18nFields(_0x266bdf),'source':_0x3a335d[_0x459adb(0x1f2)],'owner':_0x266bdf[_0x459adb(0x1f6)]??null,'status':_0x266bdf['appPublishStatus']??null,'cachedAt':_0x3a335d[_0x459adb(0x1c2)]};}),_0x1f695f=_0x4bbdb3(_0x5a0584);let _0x31218c=0x0;for(const [_0x40ed96,_0x3d1788]of Object[_0x504116(0x1e0)](_0x1f695f)){const _0x368f15=typeof _0x3d1788[_0x504116(0x1dc)]===_0x504116(0x1df)?_0x3d1788[_0x504116(0x1dc)][_0x504116(0x1d9)]():'';if(!_0x368f15)continue;_0x31218c+=0x1,_0x4a82d7[_0x504116(0x1ff)]({'name':_0x40ed96,'appcode':_0x368f15,'named':!![],'definedIn':'local','isDefault':_0x40ed96===_0x67d583,...buildAppProfileListFields(_0x5f4a0d),'source':_0x504116(0x1d2),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x4a82d7,_0x24cfd8[_0x504116(0x1bf)]);if(_0x4a82d7[_0x504116(0x1fd)]===0x0)return{'ok':!![],'data':[],'message':_0x3a335d[_0x504116(0x1f2)]===_0x504116(0x1d7)?_0x504116(0x1c0):_0x504116(0x1fb)};const _0x2c6fc1=_0x4a82d7[_0x504116(0x1ea)](_0x2fb8ad=>_0x2fb8ad[_0x504116(0x1e7)]===!![]),_0x4ae46b=_0x67d583??_0x2c6fc1?.[_0x504116(0x1f1)]??null,_0x15c5f4={'env':_0x5f4a0d,'source':_0x3a335d[_0x504116(0x1f2)],'fetchedAt':_0x3a335d[_0x504116(0x1c2)],'cachePath':_0x3a335d[_0x504116(0x1fc)],'globalPath':_0x3d22a0[_0x504116(0x1e6)]??null,'projectPath':_0x3d22a0['projectPath']??null,'defaultApp':_0x4ae46b,'defaultAppSource':_0x67d583!=null?_0x1722a2:null,'localAliasCount':_0x31218c};return{'ok':!![],'data':{'items':_0x4a82d7,'meta':_0x15c5f4}};}},pullDef={'service':'app','command':a2_0x243027(0x1cb),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x243027(0x202),'type':a2_0x243027(0x1df),'description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x243027(0x205),'description':a2_0x243027(0x1b8),'default':![]},{'name':a2_0x243027(0x1b2),'type':a2_0x243027(0x205),'description':a2_0x243027(0x1bd),'default':![]}],async 'execute'(_0x2b9cc6){const _0xe6d970=a2_0x243027,_0x46e991=_0x2b9cc6[_0xe6d970(0x1c6)](_0xe6d970(0x202))||_0x2b9cc6[_0xe6d970(0x1d3)]||getEnv()||_0xe6d970(0x1d1),_0x3c754b=_0x2b9cc6[_0xe6d970(0x1c7)](_0xe6d970(0x1ca)),_0x5c04c3=_0x2b9cc6[_0xe6d970(0x1c7)](_0xe6d970(0x1b2)),{getRemoteAppList:_0x3e7ded}=await import(_0xe6d970(0x1d5)),_0x192c56=await _0x3e7ded({'env':_0x46e991,'accessKey':_0x2b9cc6['accessKey'],'localOnly':_0x3c754b,'noCache':_0x5c04c3});return{'ok':!![],'data':{'total':_0x192c56[_0xe6d970(0x1dd)][_0xe6d970(0x1fd)],'env':_0x46e991,'source':_0x192c56['source'],'fetchedAt':_0x192c56['fetchedAt'],'cachePath':_0x192c56[_0xe6d970(0x1fc)]},'message':_0x192c56[_0xe6d970(0x1f2)]===_0xe6d970(0x1d7)?_0xe6d970(0x204)+_0x192c56['items'][_0xe6d970(0x1fd)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x46e991+'\x22.':_0xe6d970(0x1b0)+_0x192c56[_0xe6d970(0x1dd)][_0xe6d970(0x1fd)]+_0xe6d970(0x1c1)+_0x46e991+'\x22.'};}},useDef={'service':a2_0x243027(0x1d4),'command':a2_0x243027(0x1f5),'description':a2_0x243027(0x1d8),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x243027(0x1f1),'description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x364d6b){const _0xeadb63=a2_0x243027;if(!_0x364d6b['args'][0x0])throw CliErrors[_0xeadb63(0x1c9)](_0xeadb63(0x1b5),_0xeadb63(0x1f7)+CLI_BIN_NAME+_0xeadb63(0x200));},async 'execute'(_0x4efb27){const _0x253531=a2_0x243027,_0x40e896=_0x4efb27[_0x253531(0x1e9)][0x0];if(!_0x40e896)throw CliErrors[_0x253531(0x1c9)](_0x253531(0x1b5),_0x253531(0x1f7)+CLI_BIN_NAME+_0x253531(0x200));const {buildConfigFromFlags:_0x12c98f,resolveLocalAppAliasCode:_0x3120c3}=await import(_0x253531(0x1e5)),{readCachedAppList:_0x132c5c}=await import(_0x253531(0x1eb)),_0x1ccc59=_0x4efb27[_0x253531(0x1c6)](_0x253531(0x202)),_0x56fd5f=_0x12c98f(_0x1ccc59?{'env':_0x1ccc59}:{}),_0x150f3a=_0x132c5c(_0x56fd5f['env'],_0x56fd5f['accessKey']),_0x3d670e=_0x150f3a?.['items']['find'](_0x6786b=>_0x6786b[_0x253531(0x1ec)]===_0x40e896),_0x31fb27=_0x3120c3(_0x56fd5f['raw']??{},_0x40e896);if(!_0x3d670e&&!_0x31fb27&&_0x56fd5f['defaultApp']!==_0x40e896){const _0x43d182=[..._0x150f3a?.['items']['map'](_0x25c477=>_0x25c477[_0x253531(0x1ec)])??[]],_0x342321=_0x43d182['length']===0x0?_0x253531(0x1c8)+CLI_BIN_NAME+_0x253531(0x1c5)+_0x40e896+_0x253531(0x1de):'Available\x20remote\x20apps:\x20'+Array['from'](new Set(_0x43d182))[_0x253531(0x1e1)](',\x20')+_0x253531(0x1e4);throw CliErrors[_0x253531(0x1c9)](_0x253531(0x203)+_0x40e896+_0x253531(0x1f3),_0x342321);}const _0x4c9dd4=_0x4efb27['bool']('global');let _0x2230b2;if(_0x4c9dd4)_0x2230b2={'global':!![]};else{const {isInProject:_0x1ef739}=await import(_0x253531(0x1e5)),_0x4cd632=_0x1ef739();_0x2230b2=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x253531(0x1b7),'inProject':_0x4cd632}));}const _0x25244e=readConfig(_0x2230b2);return _0x25244e['defaultApp']=_0x40e896,writeConfig(_0x25244e,_0x2230b2),{'ok':!![],'message':_0x253531(0x1e2)+_0x40e896+'\x22'+scopeLabel(_0x2230b2)+'.'};}},importDef={'service':a2_0x243027(0x1d4),'command':a2_0x243027(0x1c4),'description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a2_0x243027(0x1d0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x195f0c){return await runInitImport(collectFlags(_0x195f0c,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33a05a,_0x112dbc){const _0x6a8401=a3_0x1b9f,_0x56ed67=_0x33a05a();while(!![]){try{const _0x56e320=-parseInt(_0x6a8401(0x1ab))/0x1+-parseInt(_0x6a8401(0x1a8))/0x2*(-parseInt(_0x6a8401(0x1a6))/0x3)+parseInt(_0x6a8401(0x1a9))/0x4*(-parseInt(_0x6a8401(0x19e))/0x5)+parseInt(_0x6a8401(0x1a1))/0x6+-parseInt(_0x6a8401(0x19f))/0x7+-parseInt(_0x6a8401(0x1a4))/0x8*(parseInt(_0x6a8401(0x1a2))/0x9)+-parseInt(_0x6a8401(0x1aa))/0xa*(-parseInt(_0x6a8401(0x1a5))/0xb);if(_0x56e320===_0x112dbc)break;else _0x56ed67['push'](_0x56ed67['shift']());}catch(_0xc4c898){_0x56ed67['push'](_0x56ed67['shift']());}}}(a3_0x2cfd,0xd6552));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';function a3_0x2cfd(){const _0x1c0789=['2891476Ouaiyy','parse','8855046gqhbcg','9QngUpQ','utf-8','5813344zrBKZQ','92114WwNnxu','3AOQOgo','../../../mock/app-list.json','56452bRqsRJ','8332tRTSuv','2590jiBiNy','1536560TnzOjz','Mock\x20API\x20error:\x20','errorMsg','285JjXXKs'];a3_0x2cfd=function(){return _0x1c0789;};return a3_0x2cfd();}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x510f1a=a3_0x1b9f,_0x19b93a=join(__dirname,_0x510f1a(0x1a7)),_0x5f38d1=readFileSync(_0x19b93a,_0x510f1a(0x1a3));return JSON[_0x510f1a(0x1a0)](_0x5f38d1);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}function a3_0x1b9f(_0x14243f,_0x1de265){_0x14243f=_0x14243f-0x19d;const _0x2cfde7=a3_0x2cfd();let _0x1b9f03=_0x2cfde7[_0x14243f];return _0x1b9f03;}export function getMockRemoteAppItems(){const _0x558bef=a3_0x1b9f,_0x5d3096=getMockAppList();if(!_0x5d3096['success'])throw new Error(_0x558bef(0x1ac)+_0x5d3096[_0x558bef(0x19d)]+'\x20('+_0x5d3096['errorCode']+')');return _0x5d3096['data']['tableData'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c0ace,_0x685ddd){const _0x205e0e=a4_0x404f,_0x288c4e=_0x5c0ace();while(!![]){try{const _0x6c9059=parseInt(_0x205e0e(0xc3))/0x1*(-parseInt(_0x205e0e(0xcd))/0x2)+parseInt(_0x205e0e(0xbf))/0x3*(-parseInt(_0x205e0e(0xca))/0x4)+parseInt(_0x205e0e(0xc0))/0x5+-parseInt(_0x205e0e(0xc2))/0x6*(-parseInt(_0x205e0e(0xc7))/0x7)+-parseInt(_0x205e0e(0xd0))/0x8+parseInt(_0x205e0e(0xc8))/0x9*(parseInt(_0x205e0e(0xbe))/0xa)+-parseInt(_0x205e0e(0xce))/0xb*(-parseInt(_0x205e0e(0xc5))/0xc);if(_0x6c9059===_0x685ddd)break;else _0x288c4e['push'](_0x288c4e['shift']());}catch(_0x22af68){_0x288c4e['push'](_0x288c4e['shift']());}}}(a4_0x289d,0x589c2));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x4e267b=a4_0x404f,_0x2fc054=(productEnv(_0x4e267b(0xc1))||'')['trim']()['toLowerCase']();return _0x2fc054===_0x4e267b(0xcf);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a4_0x289d(){const _0x3693b1=['mock','3940848balCNL','5790fRaxFr','114REkpac','1831835BTCOct','APP_LIST_SOURCE','2672658RsjGuY','12395qaLduS','fetchedAt','36XYiTFD','cache','7jXQKLr','7101SMmjki','items','64408TvKSKH','trim','toISOString','2NcNVXk','774334UjwyFj'];a4_0x289d=function(){return _0x3693b1;};return a4_0x289d();}function a4_0x404f(_0x14fb13,_0x1033cf){_0x14fb13=_0x14fb13-0xbe;const _0x289db3=a4_0x289d();let _0x404f00=_0x289db3[_0x14fb13];return _0x404f00;}export async function getRemoteAppList(_0x5bb427){const _0x1ef8a3=a4_0x404f,{env:_0x1263ef,accessKey:_0x4e9b1a,localOnly:localOnly=![],noCache:noCache=![]}=_0x5bb427,_0x532fa2=readCachedAppList(_0x1263ef,_0x4e9b1a),_0x5c8b10=_0x4e9b1a?.[_0x1ef8a3(0xcb)]()?getAppCacheFilePath(_0x1263ef,_0x4e9b1a):null;if(localOnly)return{'items':_0x532fa2?.[_0x1ef8a3(0xc9)]??[],'source':_0x1ef8a3(0xc6),'fetchedAt':_0x532fa2?.['fetchedAt']??null,'cachePath':_0x5c8b10};try{const _0x3d8081=await getRemoteAppItems(),_0x28e3cd=shouldUseMockRemoteApps()?_0x1ef8a3(0xcf):'remote',_0x6f9301=new Date()[_0x1ef8a3(0xcc)](),_0x2ad4b7=_0x4e9b1a?.[_0x1ef8a3(0xcb)]()?writeCachedAppList(_0x1263ef,_0x4e9b1a,{'env':_0x1263ef,'fetchedAt':_0x6f9301,'source':_0x28e3cd,'items':_0x3d8081}):null;return{'items':_0x3d8081,'source':_0x28e3cd,'fetchedAt':_0x6f9301,'cachePath':_0x2ad4b7};}catch(_0x15cde7){if(!noCache&&_0x532fa2)return{'items':_0x532fa2[_0x1ef8a3(0xc9)],'source':_0x1ef8a3(0xc6),'fetchedAt':_0x532fa2[_0x1ef8a3(0xc4)],'cachePath':_0x5c8b10};throw _0x15cde7;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a5_0x5a80(_0x2501e2,_0x53242c){_0x2501e2=_0x2501e2-0x1bf;const _0x3c86f5=a5_0x3c86();let _0x5a807d=_0x3c86f5[_0x2501e2];return _0x5a807d;}(function(_0x4d8b07,_0x19442b){const _0xc7c4fe=a5_0x5a80,_0x5608c8=_0x4d8b07();while(!![]){try{const _0x217c47=parseInt(_0xc7c4fe(0x1cd))/0x1+-parseInt(_0xc7c4fe(0x1c4))/0x2*(parseInt(_0xc7c4fe(0x1c7))/0x3)+parseInt(_0xc7c4fe(0x1ca))/0x4*(-parseInt(_0xc7c4fe(0x1c0))/0x5)+-parseInt(_0xc7c4fe(0x1ce))/0x6*(-parseInt(_0xc7c4fe(0x1bf))/0x7)+-parseInt(_0xc7c4fe(0x1d2))/0x8+parseInt(_0xc7c4fe(0x1cb))/0x9+parseInt(_0xc7c4fe(0x1d0))/0xa*(parseInt(_0xc7c4fe(0x1c5))/0xb);if(_0x217c47===_0x19442b)break;else _0x5608c8['push'](_0x5608c8['shift']());}catch(_0x561d83){_0x5608c8['push'](_0x5608c8['shift']());}}}(a5_0x3c86,0x7dd3d));import{CLI_BIN_NAME}from'../../constant/cli.js';function a5_0x3c86(){const _0x39a661=['appcode','definedIn','262610vxkYSg','629431CXMXSX','find','3xAnBVe','isCurrent','local','2077156rcSMHo','5420079PnMjmL','global','1030734ZOfmnd','26778NeCqKN','trim','60ODrUxK','named','7517880OOSdmp','project','appCode','currentApp','203PzJCia','5WstfCm','defaultApp'];a5_0x3c86=function(){return _0x39a661;};return a5_0x3c86();}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x4f89b7,_0x5bca1e){const _0x1165cb=a5_0x5a80;if(!_0x5bca1e)return;const _0x5ceb1b=!!(_0x5bca1e[_0x1165cb(0x1d5)]??_0x5bca1e['defaultApp']);for(const _0x4017b7 of _0x4f89b7){_0x4017b7[_0x1165cb(0x1c8)]=![];}const _0x42def4=_0x5bca1e[_0x1165cb(0x1d4)]!=null?String(_0x5bca1e[_0x1165cb(0x1d4)])[_0x1165cb(0x1cf)]():'';if(_0x5ceb1b){const _0x27a7b2=_0x5bca1e[_0x1165cb(0x1d5)]??_0x5bca1e[_0x1165cb(0x1c1)];if(_0x27a7b2){const _0x43b839=_0x4f89b7[_0x1165cb(0x1c6)](_0x178951=>_0x178951[_0x1165cb(0x1d1)]===!![]&&_0x178951['name']===_0x27a7b2&&_0x178951[_0x1165cb(0x1c3)]===_0x1165cb(0x1c9)),_0x161f65=_0x43b839??_0x4f89b7['find'](_0x2e8318=>_0x2e8318[_0x1165cb(0x1d1)]===!![]&&_0x2e8318['name']===_0x27a7b2);_0x161f65&&(_0x161f65[_0x1165cb(0x1c8)]=!![]);}return;}if(!_0x42def4)return;for(const _0x284167 of _0x4f89b7){String(_0x284167[_0x1165cb(0x1c2)]??'')['trim']()===_0x42def4&&(_0x284167[_0x1165cb(0x1c8)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x289573){const _0x3a16dd=a5_0x5a80;return formatScopeLabel(_0x289573[_0x3a16dd(0x1cc)]?_0x3a16dd(0x1cc):_0x3a16dd(0x1d3));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x1213b5=a6_0x5e69;(function(_0x189f39,_0x5cc746){const _0x15e642=a6_0x5e69,_0x1624a7=_0x189f39();while(!![]){try{const _0x398729=-parseInt(_0x15e642(0xfc))/0x1+parseInt(_0x15e642(0x138))/0x2+-parseInt(_0x15e642(0x12b))/0x3*(-parseInt(_0x15e642(0x134))/0x4)+-parseInt(_0x15e642(0x119))/0x5+parseInt(_0x15e642(0x126))/0x6+-parseInt(_0x15e642(0x141))/0x7+parseInt(_0x15e642(0xf4))/0x8*(parseInt(_0x15e642(0x11d))/0x9);if(_0x398729===_0x5cc746)break;else _0x1624a7['push'](_0x1624a7['shift']());}catch(_0x2aede2){_0x1624a7['push'](_0x1624a7['shift']());}}}(a6_0x36a7,0x4cdc8));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';function a6_0x36a7(){const _0x9b299a=['read','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','=ak_xxx','validation','Shorthand\x20for\x20--access-key','test','auth','length','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','\x20Verify:\x20','Option\x20C:\x20environment\x20variable','AccessKey\x20(ak_xxx...)','boolean','accessKey','\x20Current\x20env:\x20','cancelled','logout','project','\x20(via\x20','production','string','slice','stdout','Clear\x20from\x20global\x20config\x20(default)','Auth\x20mode:\x20','trim','\x20doctor','3064505xtPudw','Auth\x20config\x20reinitialized\x20in\x20','Write\x20to\x20global\x20config\x20(default)','access-key','2489202RiwfFJ','isTTY','init','Invalid\x20accessKey\x20format:\x20\x22','login','Then\x20verify\x20with:\x20','userCenterDisplayName','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','env','2065530JcgVMa','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','daily','ACCESS_KEY','\x20auth\x20login\x20--access-key\x20<ak_xxx>','3309sJTvsI','nonInteractive','global-default','Tip:\x20you\x20can\x20also\x20run:','str','\x20config.','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','AccessKey\x20saved\x20to\x20','join','804xeuSfb','AccessKey:\x20','newConfigFileName','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','396584hKffjh','info','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','repeat','\x20\x20export\x20','write','push','\x20config.\x20Nothing\x20to\x20clear.','1633506JWcErp','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','status','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','bool','16uGFcsP','\x20auth\x20status','stdin','\x20config','Clear\x20accessKey\x20from\x20config','yes','global','Show\x20current\x20authentication\x20status','156323eBGgxJ'];a6_0x36a7=function(){return _0x9b299a;};return a6_0x36a7();}function a6_0x5e69(_0x6251a8,_0x599fa6){_0x6251a8=_0x6251a8-0xf1;const _0x36a7d5=a6_0x36a7();let _0x5e69ce=_0x36a7d5[_0x6251a8];return _0x5e69ce;}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 _0x23e540=a6_0x5e69;writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0x23e540(0x123)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x23e540(0x12e)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x23e540(0x12a));}function buildAccessKeySetupGuide(){const _0x421398=a6_0x5e69;return[_0x421398(0x106)+PRODUCT_CONFIG['userCenterDisplayName']+':',USER_ACCESS_KEY_CREATE_URL,_0x421398(0x13a)+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]']['join']('\x0a');}function canPromptForAccessKey(_0x3ac918){const _0x3ed3c3=a6_0x5e69;return!_0x3ac918[_0x3ed3c3(0x12c)]&&process[_0x3ed3c3(0xf6)][_0x3ed3c3(0x11e)]!==![]&&process[_0x3ed3c3(0x114)][_0x3ed3c3(0x11e)]!==![];}function resolveAuthScopeFlags(_0x24fc0a){const _0x558415=a6_0x5e69;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x24fc0a[_0x558415(0xf3)](_0x558415(0xfa)),'explicitProject':_0x24fc0a[_0x558415(0xf3)](_0x558415(0x10f)),'policy':_0x558415(0x12d)}));}async function resolveAuthWriteInput(_0x3d66db){const _0x2c7c03=a6_0x5e69;let _0x3a50d5=(_0x3d66db[_0x2c7c03(0x12f)](_0x2c7c03(0x11c))||_0x3d66db[_0x2c7c03(0x12f)]('ak')||'')[_0x2c7c03(0x117)]();const _0x565aad=(_0x3d66db['str'](_0x2c7c03(0x125))||'')[_0x2c7c03(0x117)]();if(!_0x3a50d5&&canPromptForAccessKey(_0x3d66db))try{showAccessKeyCreateHint(),_0x3a50d5=await promptAccessKey('');}catch(_0x2bc1d9){if(isAbortPrompt(_0x2bc1d9))throw CliErrors[_0x2c7c03(0x10d)]();throw _0x2bc1d9;}if(!_0x3a50d5)throw CliErrors[_0x2c7c03(0x101)]('Missing\x20accessKey.',buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x2c7c03(0x103)](_0x3a50d5))throw CliErrors['validation'](_0x2c7c03(0x120)+_0x3a50d5+'\x22',_0x2c7c03(0x124));if(!_0x565aad)return{'accessKey':_0x3a50d5};const _0x437f21=normalizeEnv(_0x565aad);return{'accessKey':_0x3a50d5,'env':isDaily(_0x437f21)?_0x2c7c03(0x128):isDev(_0x437f21)?'development':_0x2c7c03(0x111)};}export const authDefinitions=[{'service':a6_0x1213b5(0x104),'command':a6_0x1213b5(0x121),'description':a6_0x1213b5(0x127),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1213b5(0x11c),'type':a6_0x1213b5(0x112),'description':a6_0x1213b5(0x109)},{'name':'ak','type':a6_0x1213b5(0x112),'description':a6_0x1213b5(0x102)},{'name':'global','type':a6_0x1213b5(0x10a),'description':a6_0x1213b5(0x11b),'default':!![]},{'name':a6_0x1213b5(0x10f),'type':a6_0x1213b5(0x10a),'description':a6_0x1213b5(0x131),'default':![]}],async 'execute'(_0x140ed1){const _0x17ccb7=a6_0x1213b5;if(_0x140ed1[_0x17ccb7(0xf3)](_0x17ccb7(0xf9)))throw CliErrors[_0x17ccb7(0x101)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.','Use\x20`'+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x17ccb7(0x13b));const _0x55671e=(_0x140ed1['str'](_0x17ccb7(0x11c))||_0x140ed1[_0x17ccb7(0x12f)]('ak')||'')[_0x17ccb7(0x117)]();if(!_0x55671e&&_0x140ed1['nonInteractive'])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x277965=await resolveAuthWriteInput(_0x140ed1),_0x2b84fc=resolveAuthScopeFlags(_0x140ed1),_0x262633=readScopedConfig(_0x2b84fc);_0x262633[_0x17ccb7(0x10b)]=_0x277965[_0x17ccb7(0x10b)];_0x277965[_0x17ccb7(0x125)]&&(_0x262633[_0x17ccb7(0x125)]=_0x277965[_0x17ccb7(0x125)]);writeScopedConfig(_0x262633,_0x2b84fc);const _0x2a0b52=_0x2b84fc[_0x17ccb7(0xfa)]?_0x17ccb7(0xfa):_0x17ccb7(0x10f),_0x3eaf8b=_0x262633[_0x17ccb7(0x125)]?_0x17ccb7(0x10c)+_0x262633[_0x17ccb7(0x125)]+'.':'';return{'ok':!![],'message':_0x17ccb7(0x132)+_0x2a0b52+_0x17ccb7(0x130)+_0x3eaf8b+_0x17ccb7(0x107)+CLI_BIN_NAME+_0x17ccb7(0xf5)};}},{'service':'auth','command':a6_0x1213b5(0x11f),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a6_0x1213b5(0x13e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1213b5(0x11c),'type':'string','description':a6_0x1213b5(0x109)},{'name':'ak','type':a6_0x1213b5(0x112),'description':a6_0x1213b5(0x102)},{'name':'env','type':'string','description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':a6_0x1213b5(0xfa),'type':a6_0x1213b5(0x10a),'description':a6_0x1213b5(0x11b),'default':!![]},{'name':a6_0x1213b5(0x10f),'type':'boolean','description':a6_0x1213b5(0x131),'default':![]}],async 'execute'(_0x54a669){const _0x5f5b48=a6_0x1213b5,_0x3c5d9c=await resolveAuthWriteInput(_0x54a669),_0x26391f=resolveAuthScopeFlags(_0x54a669),_0x14d7f9={'accessKey':_0x3c5d9c[_0x5f5b48(0x10b)]};_0x3c5d9c['env']&&(_0x14d7f9[_0x5f5b48(0x125)]=_0x3c5d9c[_0x5f5b48(0x125)]);writeScopedConfig(_0x14d7f9,_0x26391f);const _0x31f782=_0x26391f[_0x5f5b48(0xfa)]?_0x5f5b48(0xfa):_0x5f5b48(0x10f),_0x3e6238=_0x14d7f9['env']?'\x20Current\x20env:\x20'+_0x14d7f9[_0x5f5b48(0x125)]+'.':'';return{'ok':!![],'message':_0x5f5b48(0x11a)+_0x31f782+'\x20scope.'+_0x3e6238+_0x5f5b48(0x107)+CLI_BIN_NAME+_0x5f5b48(0xf5)};}},{'service':a6_0x1213b5(0x104),'command':a6_0x1213b5(0x10e),'description':a6_0x1213b5(0xf8),'risk':a6_0x1213b5(0x13e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1213b5(0xfa),'type':a6_0x1213b5(0x10a),'description':a6_0x1213b5(0x115),'default':!![]},{'name':'project','type':a6_0x1213b5(0x10a),'description':a6_0x1213b5(0x137),'default':![]}],async 'execute'(_0x3d7069){const _0x329539=a6_0x1213b5,_0x5def0e=resolveAuthScopeFlags(_0x3d7069),_0x480f6b=readScopedConfig(_0x5def0e),_0x369c2a=!!_0x480f6b[_0x329539(0x10b)];delete _0x480f6b[_0x329539(0x10b)],writeScopedConfig(_0x480f6b,_0x5def0e);const _0xb6a97e=_0x5def0e[_0x329539(0xfa)]?_0x329539(0xfa):_0x329539(0x10f);if(_0x369c2a)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0xb6a97e+_0x329539(0x130)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0xb6a97e+_0x329539(0x140)};}},{'service':a6_0x1213b5(0x104),'command':a6_0x1213b5(0xf1),'description':a6_0x1213b5(0xfb),'risk':a6_0x1213b5(0xfd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x1213b5(0xfa),'type':a6_0x1213b5(0x10a),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x1213b5(0x10f),'type':a6_0x1213b5(0x10a),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x2b4912){const _0x12b241=a6_0x1213b5,_0x3c1057=resolveAuthScopeFlags(_0x2b4912),_0xccc244=readScopedConfig(_0x3c1057),_0x2b0aa=productEnvName(_0x12b241(0x129)),_0x2f398f=productEnv('ACCESS_KEY')||undefined,_0x15c0b9=_0xccc244[_0x12b241(0x10b)]||undefined,_0x46b150=_0x2f398f||_0x15c0b9,_0x431ed1=_0x2f398f?_0x2b0aa+'\x20env\x20var':_0x15c0b9?(_0x3c1057['global']?_0x12b241(0xfa):_0x12b241(0x10f))+_0x12b241(0xf7):null,_0x165c78=[_0x12b241(0x116)+AUTH_MODE['ClientAk']];if(_0x46b150){const _0x453d22=_0x46b150['length']>0x8?''+_0x46b150[_0x12b241(0x113)](0x0,0x8)+'*'[_0x12b241(0x13c)](_0x46b150[_0x12b241(0x105)]-0x8):_0x46b150;_0x165c78[_0x12b241(0x13f)](_0x12b241(0x135)+_0x453d22+(_0x431ed1?_0x12b241(0x110)+_0x431ed1+')':''));}return!_0x46b150&&(_0x165c78['push'](''),_0x165c78[_0x12b241(0x13f)](_0x12b241(0xf2)),_0x165c78[_0x12b241(0x13f)](''),_0x165c78['push']('Option\x20A:\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x165c78[_0x12b241(0x13f)](''),_0x165c78[_0x12b241(0x13f)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x12b241(0x136)]+')'),_0x165c78[_0x12b241(0x13f)](_0x12b241(0xfe)),_0x165c78['push'](''),_0x165c78['push'](_0x12b241(0x108)),_0x165c78[_0x12b241(0x13f)](_0x12b241(0x13d)+_0x2b0aa+_0x12b241(0x100)),_0x165c78['push'](''),_0x165c78[_0x12b241(0x13f)](_0x12b241(0x122)+CLI_BIN_NAME+'\x20auth\x20status'),_0x165c78[_0x12b241(0x13f)](_0x12b241(0x142)+CLI_BIN_NAME+_0x12b241(0x118))),{'ok':!![],'message':_0x165c78[_0x12b241(0x133)]('\x0a')};}},{'service':a6_0x1213b5(0x104),'command':a6_0x1213b5(0x139),'description':a6_0x1213b5(0xff),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4f03f6){const _0x265fda=a6_0x1213b5,_0x38972c=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x38972c,'meta':{'env':_0x4f03f6['envName']??_0x265fda(0x111)}}};}}];
|
|
1
|
+
const a6_0x2d3f3b=a6_0x3192;(function(_0x28d95f,_0x580bcd){const _0x5f3c25=a6_0x3192,_0x6f69a6=_0x28d95f();while(!![]){try{const _0x3794ec=-parseInt(_0x5f3c25(0x228))/0x1+parseInt(_0x5f3c25(0x21f))/0x2*(-parseInt(_0x5f3c25(0x215))/0x3)+-parseInt(_0x5f3c25(0x225))/0x4*(-parseInt(_0x5f3c25(0x22a))/0x5)+-parseInt(_0x5f3c25(0x21a))/0x6+parseInt(_0x5f3c25(0x1e5))/0x7*(-parseInt(_0x5f3c25(0x1f9))/0x8)+-parseInt(_0x5f3c25(0x1e3))/0x9+-parseInt(_0x5f3c25(0x1fe))/0xa*(-parseInt(_0x5f3c25(0x1ef))/0xb);if(_0x3794ec===_0x580bcd)break;else _0x6f69a6['push'](_0x6f69a6['shift']());}catch(_0x4cea4b){_0x6f69a6['push'](_0x6f69a6['shift']());}}}(a6_0x5eff,0x73343));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';function a6_0x3192(_0x4b97d6,_0x18cd9b){_0x4b97d6=_0x4b97d6-0x1e0;const _0x5effe7=a6_0x5eff();let _0x319213=_0x5effe7[_0x4b97d6];return _0x319213;}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 _0x2f1929=a6_0x3192;writeCliSideChannelLine(_0x2f1929(0x1f3)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x2f1929(0x237)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x2f1929(0x20b));}function buildAccessKeySetupGuide(){const _0x4d7417=a6_0x3192;return[_0x4d7417(0x1f3)+PRODUCT_CONFIG[_0x4d7417(0x1ea)]+':',USER_ACCESS_KEY_CREATE_URL,_0x4d7417(0x223)+CLI_BIN_NAME+_0x4d7417(0x22e)]['join']('\x0a');}function a6_0x5eff(){const _0x7049bc=['bool','2409858bJlyjm','ClientAk','production','\x20(via\x20','=ak_xxx','3070CtuJcx','nonInteractive','`auth\x20login`\x20does\x20not\x20support\x20--yes.','login','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','Write\x20to\x20global\x20config\x20(default)','532heAZyZ','Clear\x20from\x20global\x20config\x20(default)','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','59608JklnKc','No\x20AccessKey\x20found\x20in\x20','4920wuhwvf','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','yes','\x20Current\x20env:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Then\x20verify\x20with:\x20','AccessKey\x20cleared\x20from\x20','Clear\x20accessKey\x20from\x20config','daily','\x20env\x20var','isTTY','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','newConfigFileName','Tip:\x20you\x20can\x20also\x20run:','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Invalid\x20accessKey\x20format:\x20\x22','accessKey','push','5231826zoqscg','init','14eZOgJQ','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','AccessKey\x20(ak_xxx...)','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','global','userCenterDisplayName','read','stdout','test','global-default','30614936SRmouC','\x20scope.','length','AccessKey\x20saved\x20to\x20','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','validation','Option\x20C:\x20environment\x20variable','\x20auth\x20status','info','\x20config.\x20Nothing\x20to\x20clear.','1853032GtyWem','access-key','\x20Verify:\x20','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','\x20\x20export\x20','10oQqDWd','trim','development','write','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','ACCESS_KEY','Show\x20current\x20authentication\x20status','string','\x20config','auth','env','repeat','stdin','\x20auth\x20login\x20--access-key\x20<ak_xxx>','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','boolean','Option\x20A:\x20','slice','status','str','\x20config.','1830vFFNnH','Missing\x20accessKey.','project','\x20doctor'];a6_0x5eff=function(){return _0x7049bc;};return a6_0x5eff();}function canPromptForAccessKey(_0x4525bd){const _0x3033ac=a6_0x3192;return!_0x4525bd[_0x3033ac(0x220)]&&process[_0x3033ac(0x20a)][_0x3033ac(0x234)]!==![]&&process[_0x3033ac(0x1ec)][_0x3033ac(0x234)]!==![];}function resolveAuthScopeFlags(_0x151269){const _0x17ce0e=a6_0x3192;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x151269[_0x17ce0e(0x219)](_0x17ce0e(0x1e9)),'explicitProject':_0x151269[_0x17ce0e(0x219)]('project'),'policy':_0x17ce0e(0x1ee)}));}async function resolveAuthWriteInput(_0x5c2f70){const _0x30feb8=a6_0x3192;let _0x54e24d=(_0x5c2f70[_0x30feb8(0x213)](_0x30feb8(0x1fa))||_0x5c2f70['str']('ak')||'')[_0x30feb8(0x1ff)]();const _0x205aab=(_0x5c2f70[_0x30feb8(0x213)](_0x30feb8(0x208))||'')[_0x30feb8(0x1ff)]();if(!_0x54e24d&&canPromptForAccessKey(_0x5c2f70))try{showAccessKeyCreateHint(),_0x54e24d=await promptAccessKey('');}catch(_0x3c7e81){if(isAbortPrompt(_0x3c7e81))throw CliErrors['cancelled']();throw _0x3c7e81;}if(!_0x54e24d)throw CliErrors[_0x30feb8(0x1f4)](_0x30feb8(0x216),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x30feb8(0x1ed)](_0x54e24d))throw CliErrors[_0x30feb8(0x1f4)](_0x30feb8(0x1e0)+_0x54e24d+'\x22',_0x30feb8(0x235));if(!_0x205aab)return{'accessKey':_0x54e24d};const _0x533247=normalizeEnv(_0x205aab);return{'accessKey':_0x54e24d,'env':isDaily(_0x533247)?_0x30feb8(0x232):isDev(_0x533247)?_0x30feb8(0x200):_0x30feb8(0x21c)};}export const authDefinitions=[{'service':a6_0x2d3f3b(0x207),'command':a6_0x2d3f3b(0x222),'description':'Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','risk':a6_0x2d3f3b(0x201),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x2d3f3b(0x1fa),'type':a6_0x2d3f3b(0x205),'description':a6_0x2d3f3b(0x1e7)},{'name':'ak','type':a6_0x2d3f3b(0x205),'description':'Shorthand\x20for\x20--access-key'},{'name':a6_0x2d3f3b(0x1e9),'type':a6_0x2d3f3b(0x20f),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x2d3f3b(0x217),'type':'boolean','description':a6_0x2d3f3b(0x20d),'default':![]}],async 'execute'(_0x5205ee){const _0x5721f4=a6_0x2d3f3b;if(_0x5205ee[_0x5721f4(0x219)](_0x5721f4(0x22c)))throw CliErrors[_0x5721f4(0x1f4)](_0x5721f4(0x221),'Use\x20`'+CLI_BIN_NAME+_0x5721f4(0x22b)+CLI_BIN_NAME+_0x5721f4(0x238));const _0xefb4e3=(_0x5205ee[_0x5721f4(0x213)](_0x5721f4(0x1fa))||_0x5205ee[_0x5721f4(0x213)]('ak')||'')[_0x5721f4(0x1ff)]();if(!_0xefb4e3&&_0x5205ee[_0x5721f4(0x220)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x58bd8c=await resolveAuthWriteInput(_0x5205ee),_0x33fd59=resolveAuthScopeFlags(_0x5205ee),_0x5ea2c2=readScopedConfig(_0x33fd59);_0x5ea2c2[_0x5721f4(0x1e1)]=_0x58bd8c[_0x5721f4(0x1e1)];_0x58bd8c[_0x5721f4(0x208)]&&(_0x5ea2c2[_0x5721f4(0x208)]=_0x58bd8c[_0x5721f4(0x208)]);writeScopedConfig(_0x5ea2c2,_0x33fd59);const _0x4861ba=_0x33fd59[_0x5721f4(0x1e9)]?'global':_0x5721f4(0x217),_0x3fce57=_0x5ea2c2['env']?_0x5721f4(0x22d)+_0x5ea2c2[_0x5721f4(0x208)]+'.':'';return{'ok':!![],'message':_0x5721f4(0x1f2)+_0x4861ba+_0x5721f4(0x214)+_0x3fce57+'\x20Verify:\x20'+CLI_BIN_NAME+_0x5721f4(0x1f6)};}},{'service':a6_0x2d3f3b(0x207),'command':a6_0x2d3f3b(0x1e4),'description':a6_0x2d3f3b(0x20e),'risk':a6_0x2d3f3b(0x201),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x2d3f3b(0x1fa),'type':'string','description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a6_0x2d3f3b(0x205),'description':'Shorthand\x20for\x20--access-key'},{'name':a6_0x2d3f3b(0x208),'type':a6_0x2d3f3b(0x205),'description':a6_0x2d3f3b(0x1fc)},{'name':'global','type':'boolean','description':a6_0x2d3f3b(0x224),'default':!![]},{'name':a6_0x2d3f3b(0x217),'type':a6_0x2d3f3b(0x20f),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x5d5ecd){const _0x162720=a6_0x2d3f3b,_0x34d5b8=await resolveAuthWriteInput(_0x5d5ecd),_0x228a24=resolveAuthScopeFlags(_0x5d5ecd),_0x5cca00={'accessKey':_0x34d5b8[_0x162720(0x1e1)]};_0x34d5b8[_0x162720(0x208)]&&(_0x5cca00['env']=_0x34d5b8[_0x162720(0x208)]);writeScopedConfig(_0x5cca00,_0x228a24);const _0x507943=_0x228a24[_0x162720(0x1e9)]?'global':_0x162720(0x217),_0x3a9c11=_0x5cca00[_0x162720(0x208)]?_0x162720(0x22d)+_0x5cca00[_0x162720(0x208)]+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x507943+_0x162720(0x1f0)+_0x3a9c11+_0x162720(0x1fb)+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x2d3f3b(0x207),'command':'logout','description':a6_0x2d3f3b(0x231),'risk':a6_0x2d3f3b(0x201),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x2d3f3b(0x1e9),'type':'boolean','description':a6_0x2d3f3b(0x226),'default':!![]},{'name':a6_0x2d3f3b(0x217),'type':a6_0x2d3f3b(0x20f),'description':a6_0x2d3f3b(0x20c),'default':![]}],async 'execute'(_0x5925cb){const _0x35d40e=a6_0x2d3f3b,_0xad5e05=resolveAuthScopeFlags(_0x5925cb),_0x21c7cb=readScopedConfig(_0xad5e05),_0x521e6e=!!_0x21c7cb['accessKey'];delete _0x21c7cb['accessKey'],writeScopedConfig(_0x21c7cb,_0xad5e05);const _0x3ac4c5=_0xad5e05[_0x35d40e(0x1e9)]?_0x35d40e(0x1e9):_0x35d40e(0x217);if(_0x521e6e)return{'ok':!![],'message':_0x35d40e(0x230)+_0x3ac4c5+_0x35d40e(0x214)};return{'ok':!![],'message':_0x35d40e(0x229)+_0x3ac4c5+_0x35d40e(0x1f8)};}},{'service':a6_0x2d3f3b(0x207),'command':a6_0x2d3f3b(0x212),'description':a6_0x2d3f3b(0x204),'risk':a6_0x2d3f3b(0x1eb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x2d3f3b(0x217),'type':a6_0x2d3f3b(0x20f),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0xf0ced9){const _0x3b8a5d=a6_0x2d3f3b,_0x37afd8=resolveAuthScopeFlags(_0xf0ced9),_0x3120d8=readScopedConfig(_0x37afd8),_0x449dc4=productEnvName(_0x3b8a5d(0x203)),_0x5546b1=productEnv('ACCESS_KEY')||undefined,_0x4f8c4e=_0x3120d8[_0x3b8a5d(0x1e1)]||undefined,_0x46af42=_0x5546b1||_0x4f8c4e,_0x3c1e98=_0x5546b1?_0x449dc4+_0x3b8a5d(0x233):_0x4f8c4e?(_0x37afd8[_0x3b8a5d(0x1e9)]?_0x3b8a5d(0x1e9):_0x3b8a5d(0x217))+_0x3b8a5d(0x206):null,_0x439096=['Auth\x20mode:\x20'+AUTH_MODE[_0x3b8a5d(0x21b)]];if(_0x46af42){const _0x23a0e2=_0x46af42[_0x3b8a5d(0x1f1)]>0x8?''+_0x46af42[_0x3b8a5d(0x211)](0x0,0x8)+'*'[_0x3b8a5d(0x209)](_0x46af42[_0x3b8a5d(0x1f1)]-0x8):_0x46af42;_0x439096[_0x3b8a5d(0x1e2)]('AccessKey:\x20'+_0x23a0e2+(_0x3c1e98?_0x3b8a5d(0x21d)+_0x3c1e98+')':''));}return!_0x46af42&&(_0x439096['push'](''),_0x439096[_0x3b8a5d(0x1e2)](_0x3b8a5d(0x227)),_0x439096['push'](''),_0x439096[_0x3b8a5d(0x1e2)](_0x3b8a5d(0x210)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x439096[_0x3b8a5d(0x1e2)](''),_0x439096[_0x3b8a5d(0x1e2)]('Option\x20B:\x20apps\x20config\x20('+PRODUCT_CONFIG[_0x3b8a5d(0x236)]+')'),_0x439096[_0x3b8a5d(0x1e2)](_0x3b8a5d(0x1e8)),_0x439096[_0x3b8a5d(0x1e2)](''),_0x439096[_0x3b8a5d(0x1e2)](_0x3b8a5d(0x1f5)),_0x439096['push'](_0x3b8a5d(0x1fd)+_0x449dc4+_0x3b8a5d(0x21e)),_0x439096[_0x3b8a5d(0x1e2)](''),_0x439096[_0x3b8a5d(0x1e2)](_0x3b8a5d(0x22f)+CLI_BIN_NAME+_0x3b8a5d(0x1f6)),_0x439096[_0x3b8a5d(0x1e2)](_0x3b8a5d(0x202)+CLI_BIN_NAME+_0x3b8a5d(0x218))),{'ok':!![],'message':_0x439096['join']('\x0a')};}},{'service':'auth','command':a6_0x2d3f3b(0x1f7),'description':a6_0x2d3f3b(0x1e6),'risk':a6_0x2d3f3b(0x1eb),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4d746f){const _0x4c4a4e=a6_0x2d3f3b,_0x149681=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x149681,'meta':{'env':_0x4d746f['envName']??_0x4c4a4e(0x21c)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa6787c,_0x4117b2){const _0xa4a5b2=a7_0x3f2c,_0x56f908=_0xa6787c();while(!![]){try{const _0x4e7f11=-parseInt(_0xa4a5b2(0x11b))/0x1+-parseInt(_0xa4a5b2(0x121))/0x2*(-parseInt(_0xa4a5b2(0x125))/0x3)+-parseInt(_0xa4a5b2(0x12c))/0x4+-parseInt(_0xa4a5b2(0x128))/0x5*(parseInt(_0xa4a5b2(0x123))/0x6)+-parseInt(_0xa4a5b2(0x11f))/0x7*(-parseInt(_0xa4a5b2(0x12b))/0x8)+parseInt(_0xa4a5b2(0x12e))/0x9*(-parseInt(_0xa4a5b2(0x126))/0xa)+-parseInt(_0xa4a5b2(0x118))/0xb*(-parseInt(_0xa4a5b2(0x12a))/0xc);if(_0x4e7f11===_0x4117b2)break;else _0x56f908['push'](_0x56f908['shift']());}catch(_0x3c2465){_0x56f908['push'](_0x56f908['shift']());}}}(a7_0x3997,0x22526));import{createInterface}from'node:readline';function a7_0x3f2c(_0x436125,_0x4e4f7c){_0x436125=_0x436125-0x118;const _0x399761=a7_0x3997();let _0x3f2caf=_0x399761[_0x436125];return _0x3f2caf;}class AbortPrompt extends Error{constructor(){const _0x41aed9=a7_0x3f2c;super(_0x41aed9(0x127)),this[_0x41aed9(0x12d)]=_0x41aed9(0x11e);}}function createSafeRl(){const _0x34999b=a7_0x3f2c,_0x25d4fc=createInterface({'input':process[_0x34999b(0x129)],'output':process[_0x34999b(0x11a)]});let _0x4fb03b;const _0x55b22f=new Promise((_0x3bedb4,_0xcbd9b8)=>{const _0x4378de=_0x34999b;_0x4fb03b=()=>{const _0x56f6ef=a7_0x3f2c;_0x4fb03b&&(_0x25d4fc[_0x56f6ef(0x120)](_0x56f6ef(0x11d),_0x4fb03b),_0x4fb03b=undefined);try{_0x25d4fc[_0x56f6ef(0x124)]();}catch{}_0xcbd9b8(new AbortPrompt());},_0x25d4fc[_0x4378de(0x12f)](_0x4378de(0x11d),_0x4fb03b);}),_0x520fdf=()=>{const _0x3a6ad1=_0x34999b;_0x4fb03b&&(_0x25d4fc[_0x3a6ad1(0x120)](_0x3a6ad1(0x11d),_0x4fb03b),_0x4fb03b=undefined);try{_0x25d4fc[_0x3a6ad1(0x124)]();}catch{}};return{'rl':_0x25d4fc,'abortPromise':_0x55b22f,'disposeSuccess':_0x520fdf};}function a7_0x3997(){const _0x1f206c=['once','11mYCWJt','):\x20','stdout','173771ZWuaVc','AccessKey\x20(paste\x20ak_...):\x20','SIGINT','AbortPrompt','287ZdYcQV','removeListener','408nRZOjq','trim','2298HGhUVU','close','1683oiFtXV','730MBGwEx','User\x20aborted\x20prompt','205hIVkrr','stdin','2070156ddHiHo','23336OVKloo','268908pnXgYn','name','1143hJOopa'];a7_0x3997=function(){return _0x1f206c;};return a7_0x3997();}export async function promptAccessKey(_0x49e186=''){const {rl:_0x3c3563,abortPromise:_0x1fdaaf,disposeSuccess:_0x52e508}=createSafeRl(),_0x3f3412=new Promise(_0x433fa3=>{const _0x112a9a=a7_0x3f2c,_0x358f50=_0x49e186?'AccessKey\x20('+_0x49e186+_0x112a9a(0x119):_0x112a9a(0x11c);_0x3c3563['question'](_0x358f50,_0x3e3b6c=>{const _0xf2f3d1=_0x112a9a;_0x52e508(),_0x433fa3(_0x3e3b6c[_0xf2f3d1(0x122)]()||_0x49e186);});});return Promise['race']([_0x3f3412,_0x1fdaaf]);}export function isAbortPrompt(_0x3f3117){const _0x192de9=a7_0x3f2c;return _0x3f3117 instanceof Error&&_0x3f3117[_0x192de9(0x12d)]===_0x192de9(0x11e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x19ad56=a8_0xfcd0;(function(_0x6f0cb3,_0x1c2520){const _0x1af9d6=a8_0xfcd0,_0x39087e=_0x6f0cb3();while(!![]){try{const _0xf506ef=-parseInt(_0x1af9d6(0x1b9))/0x1+parseInt(_0x1af9d6(0x1ab))/0x2+parseInt(_0x1af9d6(0x1b7))/0x3+parseInt(_0x1af9d6(0x1ac))/0x4*(parseInt(_0x1af9d6(0x1bf))/0x5)+parseInt(_0x1af9d6(0x1af))/0x6*(-parseInt(_0x1af9d6(0x1bc))/0x7)+parseInt(_0x1af9d6(0x1b5))/0x8*(parseInt(_0x1af9d6(0x1be))/0x9)+parseInt(_0x1af9d6(0x1aa))/0xa*(-parseInt(_0x1af9d6(0x1ba))/0xb);if(_0xf506ef===_0x1c2520)break;else _0x39087e['push'](_0x39087e['shift']());}catch(_0x104e00){_0x39087e['push'](_0x39087e['shift']());}}}(a8_0x44f9,0x3d32a));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a8_0xfcd0(_0x52243e,_0x43e673){_0x52243e=_0x52243e-0x1a9;const _0x44f91a=a8_0x44f9();let _0xfcd0e1=_0x44f91a[_0x52243e];return _0xfcd0e1;}function a8_0x44f9(){const _0x2a2e45=['createdTime','365688BstyxU','description','29839LfTMSP','176VNTngd','detail','1768641cQscIq','bff','9EhKHVE','5oBQtUr','Get\x20BFF\x20script\x20details\x20by\x20ID','73060VefDoO','618016VQGiEt','426252QCMAst','read','bool','6ZPqWiO','(none)','verbose','functionName','appCode','Script\x20ID','900776PcvwUe'];a8_0x44f9=function(){return _0x2a2e45;};return a8_0x44f9();}export const bffDetail={'service':a8_0x19ad56(0x1bd),'command':a8_0x19ad56(0x1bb),'description':a8_0x19ad56(0x1a9),'risk':a8_0x19ad56(0x1ad),'flags':[{...ID_FLAG,'description':a8_0x19ad56(0x1b4)},VERBOSE_FLAG],async 'execute'(_0x3cbce4){const _0x4b1ec2=a8_0x19ad56,_0x5667b5=await getBffScriptInfo(_0x3cbce4['num']('id')),_0x5a4579=_0x3cbce4[_0x4b1ec2(0x1ae)](_0x4b1ec2(0x1b1));if(_0x5a4579)return{'ok':!![],'data':_0x5667b5};return{'ok':!![],'data':{'id':_0x5667b5['id'],'appCode':_0x5667b5[_0x4b1ec2(0x1b3)],'functionName':_0x5667b5[_0x4b1ec2(0x1b2)]??'','scriptType':_0x5667b5['scriptType'],'description':_0x5667b5[_0x4b1ec2(0x1b8)]||_0x4b1ec2(0x1b0),'createdTime':_0x5667b5[_0x4b1ec2(0x1b6)]??'','updatedTime':_0x5667b5['updatedTime']??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a9_0x7bed(_0x3ee274,_0x2113f5){_0x3ee274=_0x3ee274-0x171;const _0x9fd358=a9_0x9fd3();let _0x7bedd8=_0x9fd358[_0x3ee274];return _0x7bedd8;}const a9_0x3d8ce7=a9_0x7bed;(function(_0x19e1fd,_0x543c3f){const _0x25c2a4=a9_0x7bed,_0x3141e0=_0x19e1fd();while(!![]){try{const _0x262b73=-parseInt(_0x25c2a4(0x17b))/0x1*(parseInt(_0x25c2a4(0x178))/0x2)+-parseInt(_0x25c2a4(0x17c))/0x3+-parseInt(_0x25c2a4(0x171))/0x4*(-parseInt(_0x25c2a4(0x182))/0x5)+-parseInt(_0x25c2a4(0x176))/0x6*(-parseInt(_0x25c2a4(0x174))/0x7)+parseInt(_0x25c2a4(0x184))/0x8*(parseInt(_0x25c2a4(0x175))/0x9)+parseInt(_0x25c2a4(0x173))/0xa*(parseInt(_0x25c2a4(0x183))/0xb)+parseInt(_0x25c2a4(0x180))/0xc;if(_0x262b73===_0x543c3f)break;else _0x3141e0['push'](_0x3141e0['shift']());}catch(_0x4d7654){_0x3141e0['push'](_0x3141e0['shift']());}}}(a9_0x9fd3,0x67e4e));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a9_0x9fd3(){const _0x112c48=['name','bff','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','14585616DIWxAb','read','5qKLusY','11pmkxkI','328aLePJs','402988tkmdHv','str','531940txhuse','1605380prtBot','69021PASEba','6EtLNtK','BFF\x20executed\x20in\x20','1638934pEWqdL','now','params','1LPezKS','2004483FRiZdu'];a9_0x9fd3=function(){return _0x112c48;};return a9_0x9fd3();}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a9_0x3d8ce7(0x17e),'command':'exec','description':a9_0x3d8ce7(0x17f),'risk':a9_0x3d8ce7(0x181),'flags':[{...NAME_FLAG,'required':!![],'description':'BFF\x20function\x20name\x20to\x20execute'},PARAMS_FLAG],async 'execute'(_0x110e0f){const _0x1b189f=a9_0x3d8ce7,_0x1d1499=parseJsonParams(_0x110e0f[_0x1b189f(0x172)](_0x1b189f(0x17a))),_0x519ab1=Date[_0x1b189f(0x179)](),_0x57d21a=await executeSdkBff(_0x110e0f['str'](_0x1b189f(0x17d)),_0x1d1499),_0x4ff347=Date[_0x1b189f(0x179)]()-_0x519ab1;return{'ok':!![],'data':{'result':_0x57d21a,'elapsed':_0x4ff347},'message':_0x1b189f(0x177)+_0x4ff347+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x394db7,_0x2a6428){const _0x4202b1=a10_0x50aa,_0x9a93dc=_0x394db7();while(!![]){try{const _0x2c9876=parseInt(_0x4202b1(0x81))/0x1+parseInt(_0x4202b1(0x86))/0x2+-parseInt(_0x4202b1(0x7e))/0x3*(parseInt(_0x4202b1(0x80))/0x4)+parseInt(_0x4202b1(0x7f))/0x5*(parseInt(_0x4202b1(0x88))/0x6)+-parseInt(_0x4202b1(0x87))/0x7*(-parseInt(_0x4202b1(0x82))/0x8)+-parseInt(_0x4202b1(0x85))/0x9*(-parseInt(_0x4202b1(0x83))/0xa)+-parseInt(_0x4202b1(0x84))/0xb*(parseInt(_0x4202b1(0x7d))/0xc);if(_0x2c9876===_0x2a6428)break;else _0x9a93dc['push'](_0x9a93dc['shift']());}catch(_0x206a96){_0x9a93dc['push'](_0x9a93dc['shift']());}}}(a10_0xc6ca,0x32950));import{bffDetail}from'../../commands/bff/detail.js';function a10_0x50aa(_0x327bbb,_0x593e22){_0x327bbb=_0x327bbb-0x7d;const _0xc6cafd=a10_0xc6ca();let _0x50aa0b=_0xc6cafd[_0x327bbb];return _0x50aa0b;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];function a10_0xc6ca(){const _0x3f3c4a=['11zjVtMk','1812231JCZlvn','190136GJCOcl','7iYFNyw','232146vNUEaR','7327020NmLJIp','9DaBDSE','10haNumJ','440540KKCJCd','340135vvWPaG','1862968KvtQVc','20pKbbIJ'];a10_0xc6ca=function(){return _0x3f3c4a;};return a10_0xc6ca();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a11_0x3b4f(_0x4bba4e,_0x239a25){_0x4bba4e=_0x4bba4e-0x1ad;const _0x1d0671=a11_0x1d06();let _0x3b4f58=_0x1d0671[_0x4bba4e];return _0x3b4f58;}(function(_0x2b1961,_0x58b9f2){const _0x25cd32=a11_0x3b4f,_0x5ba8ae=_0x2b1961();while(!![]){try{const _0x18eb1a=parseInt(_0x25cd32(0x1c1))/0x1+-parseInt(_0x25cd32(0x1b0))/0x2+parseInt(_0x25cd32(0x1af))/0x3+parseInt(_0x25cd32(0x1be))/0x4*(parseInt(_0x25cd32(0x1b4))/0x5)+parseInt(_0x25cd32(0x1b1))/0x6*(parseInt(_0x25cd32(0x1bd))/0x7)+parseInt(_0x25cd32(0x1c3))/0x8+parseInt(_0x25cd32(0x1ba))/0x9*(-parseInt(_0x25cd32(0x1b5))/0xa);if(_0x18eb1a===_0x58b9f2)break;else _0x5ba8ae['push'](_0x5ba8ae['shift']());}catch(_0x4d3592){_0x5ba8ae['push'](_0x5ba8ae['shift']());}}}(a11_0x1d06,0x789c5));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x3a96e9){const _0x513400=a11_0x3b4f,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x130a05}=_0x3a96e9;if(explicitGlobal&&explicitProject)throw CliErrors[_0x513400(0x1bc)](_0x513400(0x1b3),'Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return _0x513400(0x1b9);if(explicitProject)return'project';switch(_0x130a05){case'global-default':return _0x513400(0x1b9);case _0x513400(0x1b7):return _0x3a96e9[_0x513400(0x1b6)]??isInProject()?_0x513400(0x1ae):'global';case _0x513400(0x1bf):if(!(_0x3a96e9[_0x513400(0x1b6)]??isInProject()))throw CliErrors['validation'](_0x513400(0x1b8)+PRODUCT_CONFIG[_0x513400(0x1ad)]+'\x20found).',_0x513400(0x1b2)+PRODUCT_CONFIG['newConfigFileName']+_0x513400(0x1c2)+CLI_BIN_NAME+_0x513400(0x1c0));return'project';}}export function toScopeFlags(_0x25a573){const _0x3729c8=a11_0x3b4f;return{'global':_0x25a573===_0x3729c8(0x1b9)};}function a11_0x1d06(){const _0x37b5a3=['7bkoZxv','168XiNjRf','project-or-global-explicit','\x20init`\x20first.','149992QAQuMy',',\x20or\x20run\x20`','200424cRKaOK','newConfigFileName','project','1208730ODQPiw','1572064tMHlGN','1258554eVgVaO','Add\x20--global\x20to\x20write\x20to\x20~/','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','85760dxOkyl','152030FnsVnb','inProject','project-default','Not\x20inside\x20a\x20project\x20(no\x20','global','135QoDwlS','\x20(global)','validation'];a11_0x1d06=function(){return _0x37b5a3;};return a11_0x1d06();}export function formatScopeLabel(_0x30f859){const _0x263511=a11_0x3b4f;return _0x30f859===_0x263511(0x1b9)?_0x263511(0x1bb):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a12_0xfc26(){const _0x2b5055=['Flags\x20','28062xPIGIK','50262eLLDpr','14055skrHBB','Invalid\x20--','map','At\x20least\x20one\x20of\x20','Remove\x20all\x20but\x20one.','filter','validation',',\x20got\x20\x22','test','Provide\x20one\x20of:\x20','2853HTLnrM','\x20is\x20required\x20for\x20`','str','2971332FBhYnp','\x20is\x20allowed,\x20found:\x20','\x20are\x20mutually\x20exclusive\x20for\x20`','3100JpdZnI','Only\x20one\x20of\x20','829408ARIxPN','length','2527000hmtlFd','Use\x20only\x20one\x20of:\x20','335IZzkpx','Exactly\x20one\x20of\x20','166pfZYIq','some'];a12_0xfc26=function(){return _0x2b5055;};return a12_0xfc26();}(function(_0x1d3537,_0x495430){const _0x3c7dc5=a12_0x77e7,_0x1b7b24=_0x1d3537();while(!![]){try{const _0x12698a=-parseInt(_0x3c7dc5(0xfc))/0x1+parseInt(_0x3c7dc5(0xf8))/0x2*(parseInt(_0x3c7dc5(0xfd))/0x3)+parseInt(_0x3c7dc5(0xf2))/0x4+-parseInt(_0x3c7dc5(0xf6))/0x5*(parseInt(_0x3c7dc5(0xfb))/0x6)+-parseInt(_0x3c7dc5(0xed))/0x7+parseInt(_0x3c7dc5(0xf4))/0x8+-parseInt(_0x3c7dc5(0xea))/0x9*(-parseInt(_0x3c7dc5(0xf0))/0xa);if(_0x12698a===_0x495430)break;else _0x1b7b24['push'](_0x1b7b24['shift']());}catch(_0x2a6f89){_0x1b7b24['push'](_0x1b7b24['shift']());}}}(a12_0xfc26,0x3642f));import{CliErrors}from'../../errors.js';function isSet(_0x37adf7,_0x5b7775){const _0x35132c=_0x37adf7['flag'](_0x5b7775);return _0x35132c!==undefined&&_0x35132c!==''&&_0x35132c!==![]&&_0x35132c!==0x0;}function fmtNames(_0x49eb40){const _0x1a2cb5=a12_0x77e7;return _0x49eb40[_0x1a2cb5(0xff)](_0x406268=>'--'+_0x406268)['join'](',\x20');}export function requireOneOf(_0x31eeaa,_0x529502,_0x3c9f95){const _0x144cd1=a12_0x77e7,_0x1c9ec4=_0x529502[_0x144cd1(0xe5)](_0x49cd94=>isSet(_0x31eeaa,_0x49cd94));if(_0x1c9ec4[_0x144cd1(0xf3)]!==0x1)throw CliErrors[_0x144cd1(0xe6)](_0x1c9ec4[_0x144cd1(0xf3)]===0x0?_0x144cd1(0xf7)+fmtNames(_0x529502)+'\x20is\x20required\x20for\x20`'+_0x3c9f95+'`.':_0x144cd1(0xf1)+fmtNames(_0x529502)+_0x144cd1(0xee)+fmtNames(_0x1c9ec4)+'.',_0x1c9ec4[_0x144cd1(0xf3)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x529502):_0x144cd1(0xe4));}function a12_0x77e7(_0xc7ae4,_0xaa68f7){_0xc7ae4=_0xc7ae4-0xe3;const _0xfc26f3=a12_0xfc26();let _0x77e7c4=_0xfc26f3[_0xc7ae4];return _0x77e7c4;}export function requireAnyOf(_0x3aff78,_0x29d512,_0xfe8f32){const _0x574584=a12_0x77e7;if(!_0x29d512[_0x574584(0xf9)](_0x48a049=>isSet(_0x3aff78,_0x48a049)))throw CliErrors['validation'](_0x574584(0xe3)+fmtNames(_0x29d512)+_0x574584(0xeb)+_0xfe8f32+'`.',_0x574584(0xe9)+fmtNames(_0x29d512));}export function mutuallyExclusive(_0xdd07de,_0x2bfc54,_0x3e7342){const _0x1e91b3=a12_0x77e7,_0x34667e=_0x2bfc54[_0x1e91b3(0xe5)](_0x4bab14=>isSet(_0xdd07de,_0x4bab14));if(_0x34667e['length']>0x1)throw CliErrors['validation'](_0x1e91b3(0xfa)+fmtNames(_0x34667e)+_0x1e91b3(0xef)+_0x3e7342+'`.',_0x1e91b3(0xf5)+fmtNames(_0x2bfc54));}export function validatePattern(_0x1429ce,_0x254552,_0x5c77ed,_0x1c4517){const _0x2bce22=a12_0x77e7,_0x271ba8=_0x1429ce[_0x2bce22(0xec)](_0x254552);if(_0x271ba8&&!_0x5c77ed[_0x2bce22(0xe8)](_0x271ba8))throw CliErrors['validation'](_0x2bce22(0xfe)+_0x254552+':\x20expected\x20'+_0x1c4517+_0x2bce22(0xe7)+_0x271ba8+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a13_0x55e9(){const _0x4a4e09=['string','code','2669331VSoPTN','11025441wEbVDA','Resource\x20name\x20for\x20lookup','Return\x20full\x20raw\x20response\x20object','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','5832920yFzodv','6436KqgmuZ','number','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','verbose','8075646ezNriA','1739595aADpJb','68248qBdHgK','sqlcode','name','204EwuDTX','230ODwsmC','Resource\x20ID'];a13_0x55e9=function(){return _0x4a4e09;};return a13_0x55e9();}const a13_0x396ef9=a13_0x415f;function a13_0x415f(_0x370b86,_0x3c14a5){_0x370b86=_0x370b86-0x156;const _0x55e9e0=a13_0x55e9();let _0x415fac=_0x55e9e0[_0x370b86];return _0x415fac;}(function(_0x1722c7,_0x14b4fc){const _0x1817c5=a13_0x415f,_0x4633e6=_0x1722c7();while(!![]){try{const _0x18d18e=parseInt(_0x1817c5(0x163))/0x1*(parseInt(_0x1817c5(0x15a))/0x2)+-parseInt(_0x1817c5(0x15f))/0x3+parseInt(_0x1817c5(0x160))/0x4*(-parseInt(_0x1817c5(0x164))/0x5)+parseInt(_0x1817c5(0x15e))/0x6+-parseInt(_0x1817c5(0x168))/0x7+-parseInt(_0x1817c5(0x159))/0x8+parseInt(_0x1817c5(0x169))/0x9;if(_0x18d18e===_0x14b4fc)break;else _0x4633e6['push'](_0x4633e6['shift']());}catch(_0x3421b2){_0x4633e6['push'](_0x4633e6['shift']());}}}(a13_0x55e9,0xb7aa9));export const CODE_FLAG={'name':a13_0x396ef9(0x167),'type':a13_0x396ef9(0x166),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x396ef9(0x158)}};export const SQLCODE_FLAG={'name':a13_0x396ef9(0x161),'type':a13_0x396ef9(0x166),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':a13_0x396ef9(0x15d),'type':'boolean','description':a13_0x396ef9(0x157)};export const PARAMS_FLAG={'name':'params','type':a13_0x396ef9(0x166),'description':a13_0x396ef9(0x15c)};export const NAME_FLAG={'name':a13_0x396ef9(0x162),'type':a13_0x396ef9(0x166),'description':a13_0x396ef9(0x156)};export const ID_FLAG={'name':'id','type':a13_0x396ef9(0x15b),'required':!![],'description':a13_0x396ef9(0x165)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0x18fed0=a14_0x20f4;(function(_0x1f8daf,_0x1ee864){const _0x3b7083=a14_0x20f4,_0x2c8f4d=_0x1f8daf();while(!![]){try{const _0x4cb76c=-parseInt(_0x3b7083(0xc6))/0x1+parseInt(_0x3b7083(0xc1))/0x2+-parseInt(_0x3b7083(0xcb))/0x3+-parseInt(_0x3b7083(0xb8))/0x4*(-parseInt(_0x3b7083(0xd6))/0x5)+parseInt(_0x3b7083(0xe5))/0x6*(parseInt(_0x3b7083(0xae))/0x7)+-parseInt(_0x3b7083(0xa6))/0x8*(parseInt(_0x3b7083(0xd1))/0x9)+-parseInt(_0x3b7083(0xb4))/0xa;if(_0x4cb76c===_0x1ee864)break;else _0x2c8f4d['push'](_0x2c8f4d['shift']());}catch(_0x822456){_0x2c8f4d['push'](_0x2c8f4d['shift']());}}}(a14_0x3872,0x34621));import{CliErrors}from'../../errors.js';function a14_0x20f4(_0xde1d29,_0x940612){_0xde1d29=_0xde1d29-0xa6;const _0x387253=a14_0x3872();let _0x20f4cf=_0x387253[_0xde1d29];return _0x20f4cf;}import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a14_0x18fed0(0xac),'type':a14_0x18fed0(0xb5),'description':a14_0x18fed0(0xce),'default':![]};function parseAliasAppcodeSetKey(_0x5e7ea4){const _0x44ec03=a14_0x18fed0,_0x190e50=_0x5e7ea4[_0x44ec03(0xd7)]('.');if(_0x190e50[_0x44ec03(0xb6)]!==0x3||_0x190e50[0x0]!==_0x44ec03(0xd5)||_0x190e50[0x2]!==_0x44ec03(0xbd))return undefined;const _0x2309e4=_0x190e50[0x1]?.['trim']();return _0x2309e4?_0x2309e4:undefined;}function parseAliasDeleteKey(_0x21ad5a){const _0x54e74c=a14_0x18fed0,_0x45ee75=_0x21ad5a['split']('.');if(_0x45ee75['length']===0x2&&_0x45ee75[0x0]===_0x54e74c(0xd5)){const _0x3d5da8=_0x45ee75[0x1]?.[_0x54e74c(0xbc)]();return _0x3d5da8?{'alias':_0x3d5da8}:undefined;}if(_0x45ee75[_0x54e74c(0xb6)]===0x3&&_0x45ee75[0x0]===_0x54e74c(0xd5)&&_0x45ee75[0x2]===_0x54e74c(0xbd)){const _0x52f9ba=_0x45ee75[0x1]?.[_0x54e74c(0xbc)]();return _0x52f9ba?{'alias':_0x52f9ba,'field':_0x54e74c(0xbd)}:undefined;}return undefined;}function setLocalAppAlias(_0x4b43cf,_0x36cc17,_0x4a96e5){const _0x2af157=a14_0x18fed0,_0x5c6b03=_0x4b43cf['apps']&&typeof _0x4b43cf[_0x2af157(0xd5)]===_0x2af157(0xa7)&&!Array['isArray'](_0x4b43cf[_0x2af157(0xd5)])?_0x4b43cf[_0x2af157(0xd5)]:{},_0x526a3=_0x5c6b03[_0x36cc17]&&typeof _0x5c6b03[_0x36cc17]===_0x2af157(0xa7)&&!Array[_0x2af157(0xcd)](_0x5c6b03[_0x36cc17])?_0x5c6b03[_0x36cc17]:{};_0x526a3['appcode']=_0x4a96e5,_0x5c6b03[_0x36cc17]=_0x526a3,_0x4b43cf['apps']=_0x5c6b03;}function deleteLocalAppAlias(_0x233234,_0x2bb946){const _0x3ca464=a14_0x18fed0;if(!_0x233234[_0x3ca464(0xd5)]||typeof _0x233234[_0x3ca464(0xd5)]!==_0x3ca464(0xa7)||Array[_0x3ca464(0xcd)](_0x233234[_0x3ca464(0xd5)]))return![];const _0x45eaff=_0x233234['apps'],_0x5e3e78=_0x45eaff[_0x2bb946[_0x3ca464(0xb3)]];if(!_0x5e3e78||typeof _0x5e3e78!==_0x3ca464(0xa7)||Array['isArray'](_0x5e3e78))return![];if(!_0x2bb946['field'])return delete _0x45eaff[_0x2bb946[_0x3ca464(0xb3)]],!![];if(!(_0x2bb946[_0x3ca464(0xdb)]in _0x5e3e78))return![];return delete _0x5e3e78[_0x2bb946[_0x3ca464(0xdb)]],Object[_0x3ca464(0xd3)](_0x5e3e78)['length']===0x0&&delete _0x45eaff[_0x2bb946[_0x3ca464(0xb3)]],!![];}function a14_0x3872(){const _0x286d8c=['set','\x20(global)','`\x20=\x20\x22','trim','appcode','Config\x20files:\x0a','\x22.\x20Allowed:\x20','Get\x20a\x20config\x20value','607146ESQeqS','includes','config','Key\x20\x22','read','45533YlyVoM','riskLevel','Settable\x20keys:\x20','pageSize','project-or-global-explicit','84768zFZAHY','Usage:\x20','isArray','Write\x20to\x20global\x20config','Set\x20a\x20config\x20value','validation','117ZRUXzi','stringify','keys','\x22\x20is\x20not\x20settable.','apps','2165qFjoKR','split','Key\x20not\x20found:\x20','value','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','field','raw','Top-level\x20key\x20\x22','Invalid\x20value\x20for\x20\x22','\x22\x20not\x20found\x20at\x20top\x20level.','(none)','List\x20current\x20config','Delete\x20a\x20config\x20value','Missing\x20key\x20or\x20value.','join','6RYyplj','write','format','25896GmNGTJ','object','delete','Missing\x20key\x20argument.','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','log','global','\x20config\x20get\x20<key>','737723BJomrZ','pretty','../../context.js','args','Deleted\x20`','alias','3240420lTnJGz','boolean','length','key','2268guCpZS'];a14_0x3872=function(){return _0x286d8c;};return a14_0x3872();}const listDef={'service':a14_0x18fed0(0xc3),'command':'list','description':a14_0x18fed0(0xe1),'risk':a14_0x18fed0(0xc5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2aea2c){const _0x45be27=a14_0x18fed0,{buildConfigFromFlags:_0x1ec4d7}=await import(_0x45be27(0xb0)),_0x213ba8=_0x1ec4d7({}),_0x3070bd=getProjectConfigPath(),_0x24536b=resolveWriteConfigPath(_0x45be27(0xac));if(_0x2aea2c[_0x45be27(0xe7)]===_0x45be27(0xaf))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x45be27(0xd2)](_0x213ba8['raw'],null,0x2)+'\x0a\x0a')+_0x45be27(0xbe)+('\x20\x20project:\x20'+(_0x3070bd??_0x45be27(0xe0))+'\x0a')+('\x20\x20global:\x20\x20'+_0x24536b)};return{'ok':!![],'data':{'effective':_0x213ba8[_0x45be27(0xdc)],'configFiles':{'project':_0x3070bd??null,'global':_0x24536b}}};}},getDef={'service':'config','command':'get','description':a14_0x18fed0(0xc0),'risk':a14_0x18fed0(0xc5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x18fed0(0xb7),'description':a14_0x18fed0(0xaa),'required':!![]}],'flags':[],async 'execute'(_0x55612e){const _0x2ca3b6=a14_0x18fed0,_0x1f257f=_0x55612e['args'][0x0];if(!_0x1f257f)throw CliErrors[_0x2ca3b6(0xd0)](_0x2ca3b6(0xa9),_0x2ca3b6(0xcc)+CLI_BIN_NAME+_0x2ca3b6(0xad));const {buildConfigFromFlags:_0x420f0a}=await import(_0x2ca3b6(0xb0)),{raw:_0x585ba3}=_0x420f0a({});if(_0x1f257f[_0x2ca3b6(0xc2)]('.')){const _0x27b2ae=_0x1f257f[_0x2ca3b6(0xd7)]('.');let _0x23eba9=_0x585ba3;for(const _0x111751 of _0x27b2ae){if(_0x23eba9==null||typeof _0x23eba9!==_0x2ca3b6(0xa7))throw CliErrors[_0x2ca3b6(0xd0)]('Key\x20not\x20found:\x20'+_0x1f257f);_0x23eba9=_0x23eba9[_0x111751];}if(_0x23eba9===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x1f257f);return console['log'](typeof _0x23eba9===_0x2ca3b6(0xa7)?JSON[_0x2ca3b6(0xd2)](_0x23eba9,null,0x2):String(_0x23eba9)),{'ok':!![]};}const _0x45ac58=_0x585ba3[_0x1f257f];if(_0x45ac58===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x1f257f);return console[_0x2ca3b6(0xab)](typeof _0x45ac58===_0x2ca3b6(0xa7)?JSON['stringify'](_0x45ac58,null,0x2):String(_0x45ac58)),{'ok':!![]};}},setDef={'service':'config','command':a14_0x18fed0(0xb9),'description':a14_0x18fed0(0xcf),'risk':a14_0x18fed0(0xe6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x18fed0(0xb7),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x18fed0(0xd9),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x371be7){const _0x59b206=a14_0x18fed0,_0x21162a=_0x371be7[_0x59b206(0xb1)][0x0],_0x2588e1=_0x371be7[_0x59b206(0xb1)][0x1];if(!_0x21162a||_0x2588e1===undefined)throw CliErrors[_0x59b206(0xd0)](_0x59b206(0xe3),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x21162a]&&!ENUM_KEYS[_0x21162a][_0x59b206(0xc2)](_0x2588e1))throw CliErrors[_0x59b206(0xd0)](_0x59b206(0xde)+_0x21162a+_0x59b206(0xbf)+ENUM_KEYS[_0x21162a][_0x59b206(0xe4)](',\x20'));if(_0x21162a===_0x59b206(0xc7))throw CliErrors[_0x59b206(0xd0)](_0x59b206(0xda));if(_0x21162a===_0x59b206(0xc9)){const _0x4bd8c8=Number(_0x2588e1);if(isNaN(_0x4bd8c8)||_0x4bd8c8<=0x0)throw CliErrors[_0x59b206(0xd0)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x491986=resolveWriteScope({'explicitGlobal':_0x371be7['bool'](_0x59b206(0xac)),'policy':_0x59b206(0xca)}),_0x45d9d1=toScopeFlags(_0x491986),_0x258ae8=readScopedConfig(_0x45d9d1),_0x37d94d=parseAliasAppcodeSetKey(_0x21162a);if(!_0x37d94d&&!isTopLevelConfigKey(_0x21162a))throw CliErrors['validation'](_0x59b206(0xdd)+_0x21162a+_0x59b206(0xd4),_0x59b206(0xc8)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x37d94d?setLocalAppAlias(_0x258ae8,_0x37d94d,_0x2588e1):_0x258ae8[_0x21162a]=_0x21162a===_0x59b206(0xc9)?Number(_0x2588e1):_0x2588e1,console[_0x59b206(0xab)]('Set\x20`'+_0x21162a+_0x59b206(0xbb)+_0x2588e1+'\x22'+(_0x491986===_0x59b206(0xac)?_0x59b206(0xba):'')),writeScopedConfig(_0x258ae8,_0x45d9d1),{'ok':!![]};}},deleteDef={'service':'config','command':a14_0x18fed0(0xa8),'description':a14_0x18fed0(0xe2),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x56c746){const _0x69d988=a14_0x18fed0,_0x275374=_0x56c746[_0x69d988(0xb1)][0x0];if(!_0x275374)throw CliErrors[_0x69d988(0xd0)](_0x69d988(0xa9),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x5c748a=resolveWriteScope({'explicitGlobal':_0x56c746['bool']('global'),'policy':_0x69d988(0xca)}),_0xaefebe=toScopeFlags(_0x5c748a),_0x7bd54=readScopedConfig(_0xaefebe),_0x4cdf3c=parseAliasDeleteKey(_0x275374);if(_0x4cdf3c){if(!deleteLocalAppAlias(_0x7bd54,_0x4cdf3c))throw CliErrors['validation'](_0x69d988(0xd8)+_0x275374);return console[_0x69d988(0xab)](_0x69d988(0xb2)+_0x275374+'`'+(_0x5c748a===_0x69d988(0xac)?_0x69d988(0xba):'')),writeScopedConfig(_0x7bd54,_0xaefebe),{'ok':!![]};}if(_0x7bd54[_0x275374]===undefined)throw CliErrors[_0x69d988(0xd0)](_0x69d988(0xc4)+_0x275374+_0x69d988(0xdf));return delete _0x7bd54[_0x275374],console[_0x69d988(0xab)](_0x69d988(0xb2)+_0x275374+'`'+(_0x5c748a===_0x69d988(0xac)?'\x20(global)':'')),writeScopedConfig(_0x7bd54,_0xaefebe),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a14_0x1d6864=a14_0x167d;(function(_0x16dc59,_0xf8a2e5){const _0x115c69=a14_0x167d,_0x5e4638=_0x16dc59();while(!![]){try{const _0x16d00c=parseInt(_0x115c69(0x1c9))/0x1*(parseInt(_0x115c69(0x1cf))/0x2)+-parseInt(_0x115c69(0x1d6))/0x3*(-parseInt(_0x115c69(0x1db))/0x4)+-parseInt(_0x115c69(0x1bf))/0x5*(parseInt(_0x115c69(0x1bb))/0x6)+parseInt(_0x115c69(0x1a1))/0x7+parseInt(_0x115c69(0x1a2))/0x8+parseInt(_0x115c69(0x1b2))/0x9*(parseInt(_0x115c69(0x1c8))/0xa)+-parseInt(_0x115c69(0x1d5))/0xb;if(_0x16d00c===_0xf8a2e5)break;else _0x5e4638['push'](_0x5e4638['shift']());}catch(_0x1eb533){_0x5e4638['push'](_0x5e4638['shift']());}}}(a14_0x434a,0xb0193));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_0x434a(){const _0x17fa3c=['delete','Top-level\x20key\x20\x22','4472174sTuetM','1947232GrYTdt','pageSize','pretty','project-or-global-explicit','args','\x22\x20not\x20found\x20at\x20top\x20level.','key','bool','field','Usage:\x20','get','write','stringify','keys','\x20config\x20get\x20<key>','Missing\x20key\x20argument.','9kmKqHB','Delete\x20a\x20config\x20value','Config\x20files:\x0a','Get\x20a\x20config\x20value','Deleted\x20`','list','value','`\x20=\x20\x22','apps','72mkXrJq','log','boolean','Missing\x20key\x20or\x20value.','535105CpeeIl','includes','global','split','config','Write\x20to\x20global\x20config','raw','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','validation','5964760bRZZTr','1FgzRCR','Set\x20`','isArray','set','List\x20current\x20config','\x22\x20is\x20not\x20settable.','689504FIkMCR','../../context.js','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20config\x20delete\x20<key>\x20[--global]','\x20\x20project:\x20','appcode','9779440ZzeoCY','459033aKCuaP','Key\x20not\x20found:\x20','alias','read','\x20(global)','28BhRDxY','trim','\x20\x20global:\x20\x20','length','Value\x20to\x20assign','join','object'];a14_0x434a=function(){return _0x17fa3c;};return a14_0x434a();}const GLOBAL_FLAG={'name':a14_0x1d6864(0x1c1),'type':a14_0x1d6864(0x1bd),'description':a14_0x1d6864(0x1c4),'default':![]};function parseAliasAppcodeSetKey(_0x516fb8){const _0x392db4=a14_0x1d6864,_0x3ec15f=_0x516fb8[_0x392db4(0x1c2)]('.');if(_0x3ec15f[_0x392db4(0x19b)]!==0x3||_0x3ec15f[0x0]!=='apps'||_0x3ec15f[0x2]!==_0x392db4(0x1d4))return undefined;const _0x1209fd=_0x3ec15f[0x1]?.['trim']();return _0x1209fd?_0x1209fd:undefined;}function parseAliasDeleteKey(_0x304663){const _0x37b6bb=a14_0x1d6864,_0x226542=_0x304663[_0x37b6bb(0x1c2)]('.');if(_0x226542[_0x37b6bb(0x19b)]===0x2&&_0x226542[0x0]===_0x37b6bb(0x1ba)){const _0x5f2fc6=_0x226542[0x1]?.[_0x37b6bb(0x1dc)]();return _0x5f2fc6?{'alias':_0x5f2fc6}:undefined;}if(_0x226542[_0x37b6bb(0x19b)]===0x3&&_0x226542[0x0]===_0x37b6bb(0x1ba)&&_0x226542[0x2]===_0x37b6bb(0x1d4)){const _0x2f97bc=_0x226542[0x1]?.['trim']();return _0x2f97bc?{'alias':_0x2f97bc,'field':'appcode'}:undefined;}return undefined;}function a14_0x167d(_0x2be72e,_0x3a4cfa){_0x2be72e=_0x2be72e-0x19b;const _0x434a29=a14_0x434a();let _0x167d65=_0x434a29[_0x2be72e];return _0x167d65;}function setLocalAppAlias(_0x1f0b64,_0x3a9510,_0x4a69cd){const _0x16a16c=a14_0x1d6864,_0x21acca=_0x1f0b64[_0x16a16c(0x1ba)]&&typeof _0x1f0b64['apps']===_0x16a16c(0x19e)&&!Array[_0x16a16c(0x1cb)](_0x1f0b64['apps'])?_0x1f0b64['apps']:{},_0x3c7713=_0x21acca[_0x3a9510]&&typeof _0x21acca[_0x3a9510]===_0x16a16c(0x19e)&&!Array[_0x16a16c(0x1cb)](_0x21acca[_0x3a9510])?_0x21acca[_0x3a9510]:{};_0x3c7713[_0x16a16c(0x1d4)]=_0x4a69cd,_0x21acca[_0x3a9510]=_0x3c7713,_0x1f0b64[_0x16a16c(0x1ba)]=_0x21acca;}function deleteLocalAppAlias(_0x2b3ebd,_0x5d3df4){const _0x56e013=a14_0x1d6864;if(!_0x2b3ebd[_0x56e013(0x1ba)]||typeof _0x2b3ebd[_0x56e013(0x1ba)]!==_0x56e013(0x19e)||Array[_0x56e013(0x1cb)](_0x2b3ebd[_0x56e013(0x1ba)]))return![];const _0x42bfd3=_0x2b3ebd[_0x56e013(0x1ba)],_0x1cbc68=_0x42bfd3[_0x5d3df4[_0x56e013(0x1d8)]];if(!_0x1cbc68||typeof _0x1cbc68!==_0x56e013(0x19e)||Array[_0x56e013(0x1cb)](_0x1cbc68))return![];if(!_0x5d3df4[_0x56e013(0x1aa)])return delete _0x42bfd3[_0x5d3df4['alias']],!![];if(!(_0x5d3df4[_0x56e013(0x1aa)]in _0x1cbc68))return![];return delete _0x1cbc68[_0x5d3df4[_0x56e013(0x1aa)]],Object[_0x56e013(0x1af)](_0x1cbc68)[_0x56e013(0x19b)]===0x0&&delete _0x42bfd3[_0x5d3df4[_0x56e013(0x1d8)]],!![];}const listDef={'service':a14_0x1d6864(0x1c3),'command':a14_0x1d6864(0x1b7),'description':a14_0x1d6864(0x1cd),'risk':a14_0x1d6864(0x1d9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x5a6602){const _0x49379=a14_0x1d6864,{buildConfigFromFlags:_0x263b1e}=await import(_0x49379(0x1d0)),_0x2b0fea=_0x263b1e({}),_0x4af2b2=getProjectConfigPath(),_0x2531a4=resolveWriteConfigPath('global');if(_0x5a6602['format']===_0x49379(0x1a4))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x49379(0x1ae)](_0x2b0fea[_0x49379(0x1c5)],null,0x2)+'\x0a\x0a')+_0x49379(0x1b4)+(_0x49379(0x1d3)+(_0x4af2b2??'(none)')+'\x0a')+(_0x49379(0x1dd)+_0x2531a4)};return{'ok':!![],'data':{'effective':_0x2b0fea[_0x49379(0x1c5)],'configFiles':{'project':_0x4af2b2??null,'global':_0x2531a4}}};}},getDef={'service':a14_0x1d6864(0x1c3),'command':a14_0x1d6864(0x1ac),'description':a14_0x1d6864(0x1b5),'risk':a14_0x1d6864(0x1d9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x1d6864(0x1a8),'description':a14_0x1d6864(0x1c6),'required':!![]}],'flags':[],async 'execute'(_0x52f4d1){const _0x7cc3c8=a14_0x1d6864,_0x47eeb1=_0x52f4d1[_0x7cc3c8(0x1a6)][0x0];if(!_0x47eeb1)throw CliErrors[_0x7cc3c8(0x1c7)](_0x7cc3c8(0x1b1),'Usage:\x20'+CLI_BIN_NAME+_0x7cc3c8(0x1b0));const {buildConfigFromFlags:_0x47f421}=await import(_0x7cc3c8(0x1d0)),{raw:_0x5de541}=_0x47f421({});if(_0x47eeb1[_0x7cc3c8(0x1c0)]('.')){const _0x70908d=_0x47eeb1['split']('.');let _0x46a2a7=_0x5de541;for(const _0x4d84b0 of _0x70908d){if(_0x46a2a7==null||typeof _0x46a2a7!=='object')throw CliErrors['validation'](_0x7cc3c8(0x1d7)+_0x47eeb1);_0x46a2a7=_0x46a2a7[_0x4d84b0];}if(_0x46a2a7===undefined)throw CliErrors['validation'](_0x7cc3c8(0x1d7)+_0x47eeb1);return console['log'](typeof _0x46a2a7==='object'?JSON[_0x7cc3c8(0x1ae)](_0x46a2a7,null,0x2):String(_0x46a2a7)),{'ok':!![]};}const _0x1e8c83=_0x5de541[_0x47eeb1];if(_0x1e8c83===undefined)throw CliErrors[_0x7cc3c8(0x1c7)](_0x7cc3c8(0x1d7)+_0x47eeb1);return console[_0x7cc3c8(0x1bc)](typeof _0x1e8c83===_0x7cc3c8(0x19e)?JSON[_0x7cc3c8(0x1ae)](_0x1e8c83,null,0x2):String(_0x1e8c83)),{'ok':!![]};}},setDef={'service':a14_0x1d6864(0x1c3),'command':a14_0x1d6864(0x1cc),'description':'Set\x20a\x20config\x20value','risk':a14_0x1d6864(0x1ad),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x1d6864(0x1b8),'description':a14_0x1d6864(0x19c),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4a30e0){const _0x916cf7=a14_0x1d6864,_0xef9b79=_0x4a30e0[_0x916cf7(0x1a6)][0x0],_0x3a39d2=_0x4a30e0[_0x916cf7(0x1a6)][0x1];if(!_0xef9b79||_0x3a39d2===undefined)throw CliErrors['validation'](_0x916cf7(0x1be),_0x916cf7(0x1ab)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0xef9b79]&&!ENUM_KEYS[_0xef9b79]['includes'](_0x3a39d2))throw CliErrors[_0x916cf7(0x1c7)]('Invalid\x20value\x20for\x20\x22'+_0xef9b79+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0xef9b79][_0x916cf7(0x19d)](',\x20'));if(_0xef9b79==='riskLevel')throw CliErrors['validation'](_0x916cf7(0x1d1));if(_0xef9b79===_0x916cf7(0x1a3)){const _0x3c9192=Number(_0x3a39d2);if(isNaN(_0x3c9192)||_0x3c9192<=0x0)throw CliErrors[_0x916cf7(0x1c7)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x22baef=resolveWriteScope({'explicitGlobal':_0x4a30e0['bool'](_0x916cf7(0x1c1)),'policy':_0x916cf7(0x1a5)}),_0x1b6076=toScopeFlags(_0x22baef),_0x13d4f2=readScopedConfig(_0x1b6076),_0xad7fe4=parseAliasAppcodeSetKey(_0xef9b79);if(!_0xad7fe4&&!isTopLevelConfigKey(_0xef9b79))throw CliErrors[_0x916cf7(0x1c7)](_0x916cf7(0x1a0)+_0xef9b79+_0x916cf7(0x1ce),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0xad7fe4?setLocalAppAlias(_0x13d4f2,_0xad7fe4,_0x3a39d2):_0x13d4f2[_0xef9b79]=_0xef9b79===_0x916cf7(0x1a3)?Number(_0x3a39d2):_0x3a39d2,console[_0x916cf7(0x1bc)](_0x916cf7(0x1ca)+_0xef9b79+_0x916cf7(0x1b9)+_0x3a39d2+'\x22'+(_0x22baef===_0x916cf7(0x1c1)?_0x916cf7(0x1da):'')),writeScopedConfig(_0x13d4f2,_0x1b6076),{'ok':!![]};}},deleteDef={'service':a14_0x1d6864(0x1c3),'command':a14_0x1d6864(0x19f),'description':a14_0x1d6864(0x1b3),'risk':a14_0x1d6864(0x1ad),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x22b669){const _0x38088b=a14_0x1d6864,_0x13a9b1=_0x22b669['args'][0x0];if(!_0x13a9b1)throw CliErrors['validation']('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x38088b(0x1d2));const _0x4d0b9d=resolveWriteScope({'explicitGlobal':_0x22b669[_0x38088b(0x1a9)]('global'),'policy':_0x38088b(0x1a5)}),_0x35e278=toScopeFlags(_0x4d0b9d),_0x2624ed=readScopedConfig(_0x35e278),_0x317d52=parseAliasDeleteKey(_0x13a9b1);if(_0x317d52){if(!deleteLocalAppAlias(_0x2624ed,_0x317d52))throw CliErrors[_0x38088b(0x1c7)](_0x38088b(0x1d7)+_0x13a9b1);return console['log'](_0x38088b(0x1b6)+_0x13a9b1+'`'+(_0x4d0b9d==='global'?_0x38088b(0x1da):'')),writeScopedConfig(_0x2624ed,_0x35e278),{'ok':!![]};}if(_0x2624ed[_0x13a9b1]===undefined)throw CliErrors['validation']('Key\x20\x22'+_0x13a9b1+_0x38088b(0x1a7));return delete _0x2624ed[_0x13a9b1],console[_0x38088b(0x1bc)](_0x38088b(0x1b6)+_0x13a9b1+'`'+(_0x4d0b9d==='global'?_0x38088b(0x1da):'')),writeScopedConfig(_0x2624ed,_0x35e278),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5ee47e,_0x31d663){var _0x3c2ea7=a15_0x14c9,_0x4f1aea=_0x5ee47e();while(!![]){try{var _0x4db805=-parseInt(_0x3c2ea7(0x1fb))/0x1*(-parseInt(_0x3c2ea7(0x1ff))/0x2)+parseInt(_0x3c2ea7(0x1fe))/0x3*(-parseInt(_0x3c2ea7(0x1fa))/0x4)+parseInt(_0x3c2ea7(0x1f3))/0x5+parseInt(_0x3c2ea7(0x1fc))/0x6*(-parseInt(_0x3c2ea7(0x1f7))/0x7)+parseInt(_0x3c2ea7(0x1f6))/0x8*(parseInt(_0x3c2ea7(0x1f9))/0x9)+parseInt(_0x3c2ea7(0x1fd))/0xa*(-parseInt(_0x3c2ea7(0x1f8))/0xb)+parseInt(_0x3c2ea7(0x1f4))/0xc*(-parseInt(_0x3c2ea7(0x1f5))/0xd);if(_0x4db805===_0x31d663)break;else _0x4f1aea['push'](_0x4f1aea['shift']());}catch(_0x42f7ea){_0x4f1aea['push'](_0x4f1aea['shift']());}}}(a15_0x5101,0xbe005));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x5101(){var _0x2abff1=['150140eqGDMC','3JfENKg','179338DujkRY','6954440BXZOoF','266388xEyLeu','637GzUDHe','104goEVzI','1267wROtZF','209RjYxQM','820971pSAhJF','3971432FpUxOK','14SbjqUb','22806aIIIBW'];a15_0x5101=function(){return _0x2abff1;};return a15_0x5101();}function a15_0x14c9(_0x3a9b65,_0x4bf31d){_0x3a9b65=_0x3a9b65-0x1f3;var _0x510199=a15_0x5101();var _0x14c9fc=_0x510199[_0x3a9b65];return _0x14c9fc;}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';
|