@lovrabet/lovrabet-cli 2.0.5-beta.0 → 2.0.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/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/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/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.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/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(function(
|
|
2
|
+
const a0_0x1c0ee6=a0_0x4bff;(function(_0x5d16e9,_0x458afa){const _0x25ab36=a0_0x4bff,_0x53da52=_0x5d16e9();while(!![]){try{const _0x1cf372=-parseInt(_0x25ab36(0x83))/0x1+-parseInt(_0x25ab36(0x9c))/0x2*(parseInt(_0x25ab36(0x94))/0x3)+-parseInt(_0x25ab36(0x9e))/0x4*(parseInt(_0x25ab36(0xa4))/0x5)+parseInt(_0x25ab36(0xa1))/0x6*(-parseInt(_0x25ab36(0x86))/0x7)+-parseInt(_0x25ab36(0x90))/0x8+-parseInt(_0x25ab36(0x91))/0x9+parseInt(_0x25ab36(0x93))/0xa;if(_0x1cf372===_0x458afa)break;else _0x53da52['push'](_0x53da52['shift']());}catch(_0xe0294e){_0x53da52['push'](_0x53da52['shift']());}}}(a0_0x5cfb,0xc21bf));import{jsx as a0_0x3fcbc0}from'react/jsx-runtime';import a0_0x5081cd from'meow';import{render}from'ink';function a0_0x4bff(_0x3e0ce7,_0x17882f){_0x3e0ce7=_0x3e0ce7-0x83;const _0x5cfb5d=a0_0x5cfb();let _0x4bff11=_0x5cfb5d[_0x3e0ce7];return _0x4bff11;}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';function a0_0x5cfb(){const _0x160bf5=['code','958726zXrJcb','hint','flags','1384621wvQFVY','help','\x0aCancelled.\x0a','assign','ERR_STREAM_DESTROYED','exitCode','error','flatMap','ERR_USE_AFTER_CLOSE','original','11888112KaTbTu','6104628CoQkeD','catch','75488430sdiwPa','4176309JxOWvR','./framework/preparse.js','unknownCommand','defaultCommand','slice','args','log','Hint:\x20','2yEwDGj','write','4096oEQziN','Unexpected\x20error:',':\x20--','42fsglzd','exit','input','4170nfxFrX','handler','stderr'];a0_0x5cfb=function(){return _0x160bf5;};return a0_0x5cfb();}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_0x5081cd(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()[a0_0x1c0ee6(0x92)](handleError);async function main(){try{await run();}catch(_0x18c64a){handleError(_0x18c64a);}}async function run(){const _0x20b097=a0_0x1c0ee6;let _0x534065=cli['input'][0x0],_0x134ff5=cli['input'][0x1];const _0x18fa11=cli[_0x20b097(0x85)];try{const {correctFlags:_0x5670aa}=await import(_0x20b097(0x95)),_0x1e1cb8=getAllDefinitions()[_0x20b097(0x8d)](_0x432f5c=>_0x432f5c['flags']??[]),{flags:_0x569691,corrections:_0x3f57a9}=_0x5670aa(_0x18fa11,_0x1e1cb8);if(_0x3f57a9['length']>0x0){for(const _0x4a7b8a of _0x3f57a9){process[_0x20b097(0xa6)][_0x20b097(0x9d)]('[preparse]\x20'+_0x4a7b8a[_0x20b097(0xa5)]+_0x20b097(0xa0)+_0x4a7b8a[_0x20b097(0x8f)]+'\x20->\x20--'+_0x4a7b8a['corrected']+'\x0a');}Object[_0x20b097(0x89)](_0x18fa11,_0x569691);}}catch{}if(!_0x534065||!isKnownService(_0x534065)){const {waitUntilExit:_0x1020dd}=render(a0_0x3fcbc0(Help,{}));await _0x1020dd();return;}const _0xf9a9b0=getServiceEntry(_0x534065);if(!_0x134ff5){if(_0x18fa11['help']){console['log'](generateServiceHelp(_0x534065));return;}if(_0xf9a9b0[_0x20b097(0x97)])_0x134ff5=_0xf9a9b0[_0x20b097(0x97)];else{console[_0x20b097(0x9a)](generateServiceHelp(_0x534065));return;}}const _0x3f2795=findDefinition(_0x534065,_0x134ff5);!_0x3f2795&&(console[_0x20b097(0x9a)](generateServiceHelp(_0x534065)),handleError(CliErrors[_0x20b097(0x96)](_0x534065+'\x20'+_0x134ff5)));if(_0x18fa11[_0x20b097(0x87)]){console[_0x20b097(0x9a)](generateCommandHelp(_0x3f2795));return;}const _0x26e745=buildConfigFromFlags(_0x18fa11);await initGlobalEnvironment(_0x26e745);const _0x34dd36=createPipelineEnv(_0x26e745,_0x18fa11);_0x34dd36[_0x20b097(0x99)]=cli[_0x20b097(0xa3)][_0x20b097(0x98)](0x2),await runCommand(_0x3f2795,_0x34dd36);}function handleError(_0x4d75a0){const _0x2829da=a0_0x1c0ee6;if(_0x4d75a0 instanceof CliError){_0x4d75a0[_0x2829da(0xa7)]==='cancelled'&&(process[_0x2829da(0xa6)][_0x2829da(0x9d)](_0x2829da(0x88)),process[_0x2829da(0xa2)](0x0));console[_0x2829da(0x8c)]('Error:\x20'+_0x4d75a0['message']);if(_0x4d75a0[_0x2829da(0x84)])console[_0x2829da(0x8c)](_0x2829da(0x9b)+_0x4d75a0[_0x2829da(0x84)]);process[_0x2829da(0xa2)](_0x4d75a0[_0x2829da(0x8b)]);}isUserCancellation(_0x4d75a0)&&(process[_0x2829da(0xa6)]['write']('\x0aCancelled.\x0a'),process[_0x2829da(0xa2)](0x0)),console[_0x2829da(0x8c)](_0x2829da(0x9f),_0x4d75a0),process['exit'](0x1);}function isUserCancellation(_0x14b76b){const _0x2ab9c4=a0_0x1c0ee6;if(!(_0x14b76b instanceof Error))return![];if(_0x14b76b['name']==='ExitPromptError')return!![];if(_0x14b76b[_0x2ab9c4(0xa7)]===_0x2ab9c4(0x8e))return!![];if(_0x14b76b['code']===_0x2ab9c4(0x8a))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5448a9,_0x419168){const _0x4e1199=a1_0x19b8,_0x25ddea=_0x5448a9();while(!![]){try{const _0x1a8950=-parseInt(_0x4e1199(0x81))/0x1*(-parseInt(_0x4e1199(0x74))/0x2)+parseInt(_0x4e1199(0x8c))/0x3+parseInt(_0x4e1199(0x80))/0x4*(-parseInt(_0x4e1199(0x7a))/0x5)+-parseInt(_0x4e1199(0x82))/0x6+-parseInt(_0x4e1199(0x7d))/0x7*(-parseInt(_0x4e1199(0x7b))/0x8)+-parseInt(_0x4e1199(0x6d))/0x9*(parseInt(_0x4e1199(0x85))/0xa)+-parseInt(_0x4e1199(0x87))/0xb*(-parseInt(_0x4e1199(0x88))/0xc);if(_0x1a8950===_0x419168)break;else _0x25ddea['push'](_0x25ddea['shift']());}catch(_0x2350f7){_0x25ddea['push'](_0x25ddea['shift']());}}}(a1_0x3369,0x78892));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';function fingerprintAccessKey(_0x12b032){const _0x517efe=a1_0x19b8,_0xe99237=_0x12b032['trim'](),_0x1df58d=_0xe99237[_0x517efe(0x7f)](-0x6)||_0x517efe(0x6f),_0x422e32=createHash(_0x517efe(0x83))[_0x517efe(0x84)](_0xe99237)[_0x517efe(0x75)]('hex')[_0x517efe(0x7f)](0x0,0xc);return _0x517efe(0x76)+_0x1df58d+'_'+_0x422e32;}export function getAppCacheFilePath(_0x192c71,_0x1c0a97){const _0x4ac84d=a1_0x19b8;return resolve(homedir(),_0x4ac84d(0x86),_0x4ac84d(0x78),_0x192c71,fingerprintAccessKey(_0x1c0a97),'my-apps.json');}function a1_0x3369(){const _0x5144f1=['sha256','update','125970NcYADW','.lovrabet','549483icVDBv','12xasNlw','trim','find','utf8','2511951WlxWjl','EXDEV','144VOAqPf','stringify','unknown','.tmp','isArray','EACCES','code','16LNqdxM','digest','ak_','appName','cache','EPERM','470pvVgoC','238768hooxDo','appCode','77onzApg','items','slice','10816eUiyVv','75727nCRDrl','5231700EdyREk'];a1_0x3369=function(){return _0x5144f1;};return a1_0x3369();}export function readCachedAppList(_0x1043f2,_0x19ffaa){const _0x4f822b=a1_0x19b8;if(!_0x19ffaa?.['trim']())return null;const _0x50ba01=getAppCacheFilePath(_0x1043f2,_0x19ffaa);if(!existsSync(_0x50ba01))return null;try{const _0x555314=readFileSync(_0x50ba01,'utf8');if(!_0x555314[_0x4f822b(0x89)]())return null;const _0xa60a60=JSON['parse'](_0x555314);if(!Array[_0x4f822b(0x71)](_0xa60a60['items']))return null;return _0xa60a60;}catch{return null;}}export function writeCachedAppList(_0x1c9a47,_0x22d628,_0x24e8c8){const _0x313e38=a1_0x19b8,_0x123d5f=getAppCacheFilePath(_0x1c9a47,_0x22d628),_0x18c394=dirname(_0x123d5f);!existsSync(_0x18c394)&&mkdirSync(_0x18c394,{'recursive':!![]});const _0x2d4bf9=_0x123d5f+_0x313e38(0x70);try{writeFileSync(_0x2d4bf9,JSON[_0x313e38(0x6e)](_0x24e8c8,null,0x2)+'\x0a',{'encoding':_0x313e38(0x8b),'mode':0x180});try{renameSync(_0x2d4bf9,_0x123d5f);}catch(_0x5dac81){if(_0x5dac81[_0x313e38(0x73)]===_0x313e38(0x79)||_0x5dac81[_0x313e38(0x73)]===_0x313e38(0x8d)||_0x5dac81[_0x313e38(0x73)]===_0x313e38(0x72)){writeFileSync(_0x123d5f,JSON[_0x313e38(0x6e)](_0x24e8c8,null,0x2)+'\x0a',{'encoding':_0x313e38(0x8b)});try{unlinkSync(_0x2d4bf9);}catch{}}else throw _0x5dac81;}}catch(_0x5f491f){try{unlinkSync(_0x2d4bf9);}catch{}throw _0x5f491f;}return _0x123d5f;}function a1_0x19b8(_0x2bf1a3,_0xff382e){_0x2bf1a3=_0x2bf1a3-0x6d;const _0x3369cd=a1_0x3369();let _0x19b8ea=_0x3369cd[_0x2bf1a3];return _0x19b8ea;}export function resolveCachedAppCode(_0x4b5516,_0x5daed9,_0x55ed5b){const _0x1b1922=a1_0x19b8;if(!_0x4b5516)return undefined;const _0x597a99=readCachedAppList(_0x5daed9,_0x55ed5b),_0x4f1316=_0x597a99?.[_0x1b1922(0x7e)][_0x1b1922(0x8a)](_0x5ad806=>_0x5ad806[_0x1b1922(0x77)]===_0x4b5516);return _0x4f1316?.[_0x1b1922(0x7c)]?.[_0x1b1922(0x89)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a2_0x4dfddf=a2_0x169d;(function(_0x1aebb7,_0x31776f){const _0x5ea53e=a2_0x169d,_0x40e624=_0x1aebb7();while(!![]){try{const _0x44cabe=parseInt(_0x5ea53e(0x1fa))/0x1*(parseInt(_0x5ea53e(0x1ef))/0x2)+-parseInt(_0x5ea53e(0x221))/0x3+parseInt(_0x5ea53e(0x212))/0x4+-parseInt(_0x5ea53e(0x206))/0x5*(parseInt(_0x5ea53e(0x1dc))/0x6)+parseInt(_0x5ea53e(0x1dd))/0x7+-parseInt(_0x5ea53e(0x1f4))/0x8*(parseInt(_0x5ea53e(0x1f2))/0x9)+parseInt(_0x5ea53e(0x1e6))/0xa*(parseInt(_0x5ea53e(0x207))/0xb);if(_0x44cabe===_0x31776f)break;else _0x40e624['push'](_0x40e624['shift']());}catch(_0x261907){_0x40e624['push'](_0x40e624['shift']());}}}(a2_0x43e1,0x3d277));import{CliErrors}from'../../errors.js';function a2_0x169d(_0x22b912,_0x16f05e){_0x22b912=_0x22b912-0x1dc;const _0x43e18c=a2_0x43e1();let _0x169d58=_0x43e18c[_0x22b912];return _0x169d58;}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_0x4dfddf(0x1e4),'type':a2_0x4dfddf(0x225),'description':'Use\x20global\x20config\x20scope','default':![]};function collectFlags(_0xeb878d,_0x221438){const _0x5d1974=a2_0x4dfddf,_0x7cf69c={};for(const _0x56feb4 of _0x221438){const _0x1c0440=_0x56feb4[_0x5d1974(0x208)]===_0x5d1974(0x225)?_0xeb878d[_0x5d1974(0x20a)](_0x56feb4[_0x5d1974(0x1eb)]):_0xeb878d[_0x5d1974(0x1f1)](_0x56feb4[_0x5d1974(0x1eb)]);if(_0x1c0440!==''&&_0x1c0440!==![])_0x7cf69c[_0x56feb4[_0x5d1974(0x1eb)]]=_0x1c0440;}if(_0xeb878d['nonInteractive'])_0x7cf69c[_0x5d1974(0x223)]=!![];return _0x7cf69c;}function a2_0x43e1(){const _0xffa4a7=['Missing\x20app\x20name.','Usage:\x20','defaultApp','read','No\x20cached\x20apps\x20found.','7hmdQIe','write','Read\x20from\x20local\x20cache\x20only','Switch\x20the\x20default\x20app','local','Target\x20environment\x20(default:\x20current\x20env)','appCode','app','no-cache','Read\x20app\x20list\x20from\x20local\x20cache\x20only','length','projectPath','3490MZMucZ','8834529XdWiEA','type','mergedCli','bool','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','appOwnerName','list','items','Available:\x20','project-default','cache','1443528RWOQUj','args','globalPath','source','Loaded\x20','production','string','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','fetchedAt','cachePath','Filter\x20by\x20environment\x20(default:\x20current\x20env)','env','from','appPublishStatus','1128147fakufN','validation','nonInteractive','appName','boolean','isCurrent','3396HOuLez','779695KSITGL','join','use','envName','\x22\x20not\x20found.','map','App\x20\x22','global','../../commands/app/remote-source.js','10bhtWZF','find','import','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','Use\x20`','name','../../context.js','\x20app(s)\x20for\x20env=\x22','\x20cached\x20app(s)\x20for\x20env=\x22','62026HGoZiO','accessKey','str','387HgaKbj','\x20app\x20use\x20<name>\x20[--global]','87608PNdGZM'];a2_0x43e1=function(){return _0xffa4a7;};return a2_0x43e1();}const initDef={'service':a2_0x4dfddf(0x201),'command':'init','description':'Initialize\x20.lovrabet.json\x20config\x20file','risk':a2_0x4dfddf(0x1fb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x802a91){return await runInit(collectFlags(_0x802a91,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x4dfddf(0x201),'command':a2_0x4dfddf(0x20d),'description':a2_0x4dfddf(0x219),'risk':a2_0x4dfddf(0x1f8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x4dfddf(0x21e),'type':'string','description':a2_0x4dfddf(0x21d),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x4dfddf(0x225),'description':a2_0x4dfddf(0x203),'default':![]},{'name':a2_0x4dfddf(0x202),'type':a2_0x4dfddf(0x225),'description':a2_0x4dfddf(0x1e9),'default':![]}],async 'execute'(_0x13ac84){const _0x5d3cf4=a2_0x4dfddf,_0x56ab1e=_0x13ac84['str']('env')||_0x13ac84['envName']||getEnv()||_0x5d3cf4(0x217),_0x34eaf6=_0x13ac84[_0x5d3cf4(0x20a)](_0x5d3cf4(0x1fe)),_0x88c49=_0x13ac84[_0x5d3cf4(0x20a)](_0x5d3cf4(0x202)),{readRawConfigWithLayers:_0x10b6dc,resolveDefaultAppSource:_0x23bdac}=await import(_0x5d3cf4(0x1ec)),{getRemoteAppList:_0x34aa0b}=await import('../../commands/app/remote-source.js'),{config:_0x14dcec,layers:_0x53a015}=_0x10b6dc(),_0x19d1eb=_0x23bdac(_0x53a015),{defaultApp:_0x3a7dd1}=_0x14dcec,_0x5b6514=await _0x34aa0b({'env':_0x56ab1e,'accessKey':_0x13ac84[_0x5d3cf4(0x1f0)],'localOnly':_0x34eaf6,'noCache':_0x88c49}),_0x3adf3a=_0x5b6514['items'][_0x5d3cf4(0x1e2)](_0x1c551a=>{const _0x582ea5=_0x5d3cf4;return{'name':_0x1c551a[_0x582ea5(0x224)],'appcode':_0x1c551a[_0x582ea5(0x200)],'named':!![],'definedIn':'remote','isDefault':_0x1c551a[_0x582ea5(0x224)]===_0x3a7dd1,...buildAppProfileListFields(_0x56ab1e),'source':_0x5b6514[_0x582ea5(0x215)],'owner':_0x1c551a[_0x582ea5(0x20c)]??null,'status':_0x1c551a[_0x582ea5(0x220)]??null,'cachedAt':_0x5b6514[_0x582ea5(0x21b)]};});enrichAppListItemsWithMergedSelection(_0x3adf3a,_0x13ac84[_0x5d3cf4(0x209)]);if(_0x3adf3a[_0x5d3cf4(0x204)]===0x0)return{'ok':!![],'data':[],'message':_0x5b6514[_0x5d3cf4(0x215)]===_0x5d3cf4(0x211)?_0x5d3cf4(0x1f9):'No\x20apps\x20found\x20on\x20the\x20platform.'};const _0x207df0=_0x3adf3a[_0x5d3cf4(0x1e7)](_0x33661b=>_0x33661b[_0x5d3cf4(0x226)]===!![]),_0x376bf6=_0x3a7dd1??_0x207df0?.[_0x5d3cf4(0x1eb)]??null,_0x45fbab={'env':_0x56ab1e,'source':_0x5b6514[_0x5d3cf4(0x215)],'fetchedAt':_0x5b6514[_0x5d3cf4(0x21b)],'cachePath':_0x5b6514['cachePath'],'globalPath':_0x53a015[_0x5d3cf4(0x214)]??null,'projectPath':_0x53a015[_0x5d3cf4(0x205)]??null,'defaultApp':_0x376bf6,'defaultAppSource':_0x3a7dd1!=null?_0x19d1eb:null};return{'ok':!![],'data':{'items':_0x3adf3a,'meta':_0x45fbab}};}},pullDef={'service':a2_0x4dfddf(0x201),'command':'pull','description':a2_0x4dfddf(0x21a),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a2_0x4dfddf(0x218),'description':a2_0x4dfddf(0x1ff),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x4dfddf(0x225),'description':a2_0x4dfddf(0x1fc),'default':![]},{'name':a2_0x4dfddf(0x202),'type':a2_0x4dfddf(0x225),'description':a2_0x4dfddf(0x1e9),'default':![]}],async 'execute'(_0x162236){const _0x359994=a2_0x4dfddf,_0x56c784=_0x162236[_0x359994(0x1f1)](_0x359994(0x21e))||_0x162236[_0x359994(0x1e0)]||getEnv()||'production',_0x46e20a=_0x162236['bool'](_0x359994(0x1fe)),_0x343aa8=_0x162236[_0x359994(0x20a)]('no-cache'),{getRemoteAppList:_0x23e198}=await import(_0x359994(0x1e5)),_0x7279f=await _0x23e198({'env':_0x56c784,'accessKey':_0x162236[_0x359994(0x1f0)],'localOnly':_0x46e20a,'noCache':_0x343aa8});return{'ok':!![],'data':{'total':_0x7279f[_0x359994(0x20e)][_0x359994(0x204)],'env':_0x56c784,'source':_0x7279f[_0x359994(0x215)],'fetchedAt':_0x7279f[_0x359994(0x21b)],'cachePath':_0x7279f[_0x359994(0x21c)]},'message':_0x7279f[_0x359994(0x215)]==='cache'?_0x359994(0x216)+_0x7279f[_0x359994(0x20e)][_0x359994(0x204)]+_0x359994(0x1ee)+_0x56c784+'\x22.':'Refreshed\x20app\x20cache\x20with\x20'+_0x7279f[_0x359994(0x20e)][_0x359994(0x204)]+_0x359994(0x1ed)+_0x56c784+'\x22.'};}},useDef={'service':'app','command':a2_0x4dfddf(0x1df),'description':a2_0x4dfddf(0x1fd),'risk':a2_0x4dfddf(0x1fb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x4dfddf(0x1eb),'description':'Remote\x20app\x20name\x20to\x20activate','required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x4db245){const _0x1ff991=a2_0x4dfddf;if(!_0x4db245[_0x1ff991(0x213)][0x0])throw CliErrors['validation'](_0x1ff991(0x1f5),'Usage:\x20'+CLI_BIN_NAME+_0x1ff991(0x1f3));},async 'execute'(_0x583f75){const _0x4d77a2=a2_0x4dfddf,_0xacc9e7=_0x583f75[_0x4d77a2(0x213)][0x0];if(!_0xacc9e7)throw CliErrors[_0x4d77a2(0x222)](_0x4d77a2(0x1f5),_0x4d77a2(0x1f6)+CLI_BIN_NAME+_0x4d77a2(0x1f3));const {buildConfigFromFlags:_0x29959f}=await import(_0x4d77a2(0x1ec)),{readCachedAppList:_0x162002}=await import('../../commands/app/cache.js'),_0x2f75f6=_0x29959f({}),_0x5e9523=_0x162002(_0x2f75f6[_0x4d77a2(0x21e)],_0x2f75f6['accessKey']),_0xb0d719=_0x5e9523?.['items'][_0x4d77a2(0x1e7)](_0x49a809=>_0x49a809['appName']===_0xacc9e7);if(!_0xb0d719&&_0x2f75f6['defaultApp']!==_0xacc9e7){const _0x24e660=[..._0x5e9523?.['items'][_0x4d77a2(0x1e2)](_0x4d675e=>_0x4d675e[_0x4d77a2(0x224)])??[]],_0x481053=_0x24e660[_0x4d77a2(0x204)]===0x0?_0x4d77a2(0x1ea)+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps.':_0x4d77a2(0x20f)+Array[_0x4d77a2(0x21f)](new Set(_0x24e660))[_0x4d77a2(0x1de)](',\x20');throw CliErrors['validation'](_0x4d77a2(0x1e3)+_0xacc9e7+_0x4d77a2(0x1e1),_0x481053);}const _0x398184=_0x583f75[_0x4d77a2(0x20a)](_0x4d77a2(0x1e4));let _0x488bdb;if(_0x398184)_0x488bdb={'global':!![]};else{const {isInProject:_0x3a89d3}=await import(_0x4d77a2(0x1ec)),_0x448e02=_0x3a89d3();_0x488bdb=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x4d77a2(0x210),'inProject':_0x448e02}));}const _0x18f2d7=readConfig(_0x488bdb);return _0x18f2d7[_0x4d77a2(0x1f7)]=_0xacc9e7,writeConfig(_0x18f2d7,_0x488bdb),{'ok':!![],'message':'Default\x20app\x20set\x20to\x20\x22'+_0xacc9e7+'\x22'+scopeLabel(_0x488bdb)+'.'};}},importDef={'service':a2_0x4dfddf(0x201),'command':a2_0x4dfddf(0x1e8),'description':a2_0x4dfddf(0x20b),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x10b3f7){return await runInitImport(collectFlags(_0x10b3f7,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa0e548,_0x373c98){const _0x4c4fbf=a3_0x27a5,_0xe21ffc=_0xa0e548();while(!![]){try{const _0x2e296d=parseInt(_0x4c4fbf(0x154))/0x1*(-parseInt(_0x4c4fbf(0x150))/0x2)+-parseInt(_0x4c4fbf(0x151))/0x3*(-parseInt(_0x4c4fbf(0x14d))/0x4)+parseInt(_0x4c4fbf(0x152))/0x5+parseInt(_0x4c4fbf(0x147))/0x6*(parseInt(_0x4c4fbf(0x14f))/0x7)+-parseInt(_0x4c4fbf(0x149))/0x8+parseInt(_0x4c4fbf(0x14a))/0x9+-parseInt(_0x4c4fbf(0x155))/0xa;if(_0x2e296d===_0x373c98)break;else _0xe21ffc['push'](_0xe21ffc['shift']());}catch(_0x1891c4){_0xe21ffc['push'](_0xe21ffc['shift']());}}}(a3_0xae3e,0x79e5d));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a3_0xae3e(){const _0x259252=['625780lOfRta','tableData','3707VdXfIZ','3690370zMHxIw','utf-8','errorMsg','3121608uwJsQi','success','4967256AaFyhL','1105947EGKQGP','parse','errorCode','4IppGFU','data','7byIZZJ','34WWgeQw','2351847PAkaNR'];a3_0xae3e=function(){return _0x259252;};return a3_0xae3e();}function loadMockAppList(){const _0x897aaf=a3_0x27a5,_0x3b9c79=join(__dirname,'../../../mock/app-list.json'),_0x5a4ee6=readFileSync(_0x3b9c79,_0x897aaf(0x156));return JSON[_0x897aaf(0x14b)](_0x5a4ee6);}function a3_0x27a5(_0x4f0c3b,_0x3d4980){_0x4f0c3b=_0x4f0c3b-0x146;const _0xae3e50=a3_0xae3e();let _0x27a53b=_0xae3e50[_0x4f0c3b];return _0x27a53b;}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x202779=a3_0x27a5,_0x514b92=getMockAppList();if(!_0x514b92[_0x202779(0x148)])throw new Error('Mock\x20API\x20error:\x20'+_0x514b92[_0x202779(0x146)]+'\x20('+_0x514b92[_0x202779(0x14c)]+')');return _0x514b92[_0x202779(0x14e)][_0x202779(0x153)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x427897,_0x4cff1c){const _0x56af76=a4_0x3260,_0x3c5881=_0x427897();while(!![]){try{const _0x9c8f1e=-parseInt(_0x56af76(0x95))/0x1+-parseInt(_0x56af76(0x9d))/0x2+-parseInt(_0x56af76(0x97))/0x3+-parseInt(_0x56af76(0x9e))/0x4*(-parseInt(_0x56af76(0x99))/0x5)+parseInt(_0x56af76(0x96))/0x6+-parseInt(_0x56af76(0x98))/0x7+parseInt(_0x56af76(0xa0))/0x8;if(_0x9c8f1e===_0x4cff1c)break;else _0x3c5881['push'](_0x3c5881['shift']());}catch(_0x664820){_0x3c5881['push'](_0x3c5881['shift']());}}}(a4_0x351e,0x39752));function a4_0x351e(){const _0x52b6e8=['trim','mock','330356KggOqw','2612370QvvEbQ','397008RVzdDF','2454781BmvGoe','15FMKVHQ','toISOString','cache','fetchedAt','53460QKNybO','541380fagPGj','toLowerCase','1872168ENxMeF','items'];a4_0x351e=function(){return _0x52b6e8;};return a4_0x351e();}function a4_0x3260(_0x263544,_0x5f1c25){_0x263544=_0x263544-0x92;const _0x351e81=a4_0x351e();let _0x326011=_0x351e81[_0x263544];return _0x326011;}import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';export function shouldUseMockRemoteApps(){const _0x23ba4e=a4_0x3260,_0xac429d=(process.env.LOVRABET_APP_LIST_SOURCE||process.env.RABETBASE_APP_LIST_SOURCE||'')[_0x23ba4e(0x93)]()[_0x23ba4e(0x9f)]();return _0xac429d==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x52bc52){const _0xd51515=a4_0x3260,{env:_0x40dc71,accessKey:_0x408d84,localOnly:localOnly=![],noCache:noCache=![]}=_0x52bc52,_0x3fe368=readCachedAppList(_0x40dc71,_0x408d84),_0x45cca1=_0x408d84?.['trim']()?getAppCacheFilePath(_0x40dc71,_0x408d84):null;if(localOnly)return{'items':_0x3fe368?.[_0xd51515(0x92)]??[],'source':_0xd51515(0x9b),'fetchedAt':_0x3fe368?.[_0xd51515(0x9c)]??null,'cachePath':_0x45cca1};try{const _0x49ece6=await getRemoteAppItems(),_0x14a011=shouldUseMockRemoteApps()?_0xd51515(0x94):'remote',_0x2bec1b=new Date()[_0xd51515(0x9a)](),_0x126aa3=_0x408d84?.['trim']()?writeCachedAppList(_0x40dc71,_0x408d84,{'env':_0x40dc71,'fetchedAt':_0x2bec1b,'source':_0x14a011,'items':_0x49ece6}):null;return{'items':_0x49ece6,'source':_0x14a011,'fetchedAt':_0x2bec1b,'cachePath':_0x126aa3};}catch(_0x42d764){if(!noCache&&_0x3fe368)return{'items':_0x3fe368[_0xd51515(0x92)],'source':_0xd51515(0x9b),'fetchedAt':_0x3fe368[_0xd51515(0x9c)],'cachePath':_0x45cca1};throw _0x42d764;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3390e2,_0x1e7461){const _0x43f322=a5_0xbfe6,_0x2c3a44=_0x3390e2();while(!![]){try{const _0x465ab0=-parseInt(_0x43f322(0x125))/0x1+parseInt(_0x43f322(0x122))/0x2*(parseInt(_0x43f322(0x12f))/0x3)+parseInt(_0x43f322(0x124))/0x4*(parseInt(_0x43f322(0x12b))/0x5)+parseInt(_0x43f322(0x126))/0x6*(parseInt(_0x43f322(0x129))/0x7)+-parseInt(_0x43f322(0x132))/0x8+parseInt(_0x43f322(0x12e))/0x9+parseInt(_0x43f322(0x123))/0xa*(-parseInt(_0x43f322(0x12c))/0xb);if(_0x465ab0===_0x1e7461)break;else _0x2c3a44['push'](_0x2c3a44['shift']());}catch(_0x163f9a){_0x2c3a44['push'](_0x2c3a44['shift']());}}}(a5_0x5d5f,0xe3fdb));import{CLI_BIN_NAME}from'../../constant/cli.js';function a5_0x5d5f(){const _0x354cb2=['global','appCode','4393512ZOZsGE','named','isCurrent','currentApp','1604xYlNoj','27910KJAcJt','21592qFLOYL','1813145ifwhZi','12RQKGPt','name','trim','4266045UrRqrl','project','170sJwVtB','5753monEZi','appcode','15637014JeQTBx','6045pWBOCn'];a5_0x5d5f=function(){return _0x354cb2;};return a5_0x5d5f();}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x18ad24,_0x231162){const _0x4ef376=a5_0xbfe6;if(!_0x231162)return;const _0x2822eb=!!(_0x231162[_0x4ef376(0x121)]??_0x231162['defaultApp']);for(const _0x36d82e of _0x18ad24){_0x36d82e[_0x4ef376(0x134)]=![];}const _0x49698e=_0x231162[_0x4ef376(0x131)]!=null?String(_0x231162[_0x4ef376(0x131)])[_0x4ef376(0x128)]():'';if(_0x2822eb){const _0x1e1c5d=_0x231162[_0x4ef376(0x121)]??_0x231162['defaultApp'];if(_0x1e1c5d)for(const _0x462a0a of _0x18ad24){_0x462a0a[_0x4ef376(0x133)]===!![]&&_0x462a0a[_0x4ef376(0x127)]===_0x1e1c5d&&(_0x462a0a[_0x4ef376(0x134)]=!![]);}return;}if(!_0x49698e)return;for(const _0xea42cf of _0x18ad24){String(_0xea42cf[_0x4ef376(0x12d)]??'')['trim']()===_0x49698e&&(_0xea42cf['isCurrent']=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';function a5_0xbfe6(_0x2b6c4f,_0x3d5315){_0x2b6c4f=_0x2b6c4f-0x121;const _0x5d5f87=a5_0x5d5f();let _0xbfe65c=_0x5d5f87[_0x2b6c4f];return _0xbfe65c;}export function scopeLabel(_0x87b66){const _0x1991a7=a5_0xbfe6;return formatScopeLabel(_0x87b66['global']?_0x1991a7(0x130):_0x1991a7(0x12a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x134926=a6_0x4455;function a6_0x4455(_0x1eb311,_0x5b061a){_0x1eb311=_0x1eb311-0x1ba;const _0x59f8b1=a6_0x59f8();let _0x445583=_0x59f8b1[_0x1eb311];return _0x445583;}(function(_0x39515c,_0x4df684){const _0x52dd11=a6_0x4455,_0x54f198=_0x39515c();while(!![]){try{const _0x527412=-parseInt(_0x52dd11(0x1f1))/0x1+parseInt(_0x52dd11(0x1d3))/0x2+parseInt(_0x52dd11(0x1dc))/0x3*(-parseInt(_0x52dd11(0x1f3))/0x4)+-parseInt(_0x52dd11(0x1f4))/0x5*(parseInt(_0x52dd11(0x1c4))/0x6)+-parseInt(_0x52dd11(0x1d5))/0x7+parseInt(_0x52dd11(0x1f7))/0x8*(parseInt(_0x52dd11(0x1fa))/0x9)+parseInt(_0x52dd11(0x1bb))/0xa;if(_0x527412===_0x4df684)break;else _0x54f198['push'](_0x54f198['shift']());}catch(_0x14acfc){_0x54f198['push'](_0x54f198['shift']());}}}(a6_0x59f8,0xbb7a1));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a6_0x59f8(){const _0x3feff7=['519510qCBYLT','\x20config.','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','slice','AccessKey\x20cleared\x20from\x20','Create\x20one\x20in\x20Lovrabet\x20User\x20Center:\x20','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Write\x20to\x20global\x20config\x20(default)','AccessKey\x20saved\x20to\x20','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','Option\x20A:\x20','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','Clear\x20from\x20global\x20config\x20(default)','\x20\x20export\x20LOVRABET_ACCESS_KEY=ak_xxx','\x20scope.','332056cNWfBN','cancelled','9498972ENeUYp','nonInteractive','global','write','Shorthand\x20for\x20--access-key','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20Lovrabet\x20User\x20Center:','3972723GpmZTO','access-key','Missing\x20accessKey.','join','production','No\x20AccessKey\x20found\x20in\x20','trim','validation','init','\x20auth\x20status','env','Clear\x20accessKey\x20from\x20config','str','push','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','status','LOVRABET_ACCESS_KEY\x20env\x20var','AccessKey:\x20','\x20config.\x20Nothing\x20to\x20clear.','bool','1421674opdxsR','\x20doctor','4tinioR','30zdWlrs','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','test','712rCZOhy','boolean','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','91503MpxbSe','\x20Verify:\x20','Auth\x20mode:\x20','login','info','accessKey','Read\x20from\x20global\x20config\x20(default)','43194350xVDPDG','Then\x20run:\x20','\x20config','AccessKey\x20(ak_xxx...)','string','length','Option\x20C:\x20environment\x20variable','auth','project'];a6_0x59f8=function(){return _0x3feff7;};return a6_0x59f8();}import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x1308e1=a6_0x4455;writeCliSideChannelLine(_0x1308e1(0x1db)),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a');}function resolveAuthScopeFlags(_0x26f3ac){const _0x14b88b=a6_0x4455;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x26f3ac[_0x14b88b(0x1f0)]('global'),'explicitProject':_0x26f3ac[_0x14b88b(0x1f0)](_0x14b88b(0x1c3)),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x1c5e07){const _0x4b8cc7=a6_0x4455;let _0x58d50a=(_0x1c5e07[_0x4b8cc7(0x1e8)](_0x4b8cc7(0x1dd))||_0x1c5e07[_0x4b8cc7(0x1e8)]('ak')||'')[_0x4b8cc7(0x1e2)]();const _0x402b73=(_0x1c5e07[_0x4b8cc7(0x1e8)](_0x4b8cc7(0x1e6))||'')[_0x4b8cc7(0x1e2)]();if(!_0x58d50a&&!_0x1c5e07[_0x4b8cc7(0x1d6)])try{showAccessKeyCreateHint(),_0x58d50a=await promptAccessKey('');}catch(_0x16c563){if(isAbortPrompt(_0x16c563))throw CliErrors[_0x4b8cc7(0x1d4)]();throw _0x16c563;}if(!_0x58d50a)throw CliErrors['validation'](_0x4b8cc7(0x1de),[_0x4b8cc7(0x1c9)+USER_ACCESS_KEY_CREATE_URL,_0x4b8cc7(0x1bc)+CLI_BIN_NAME+_0x4b8cc7(0x1eb)]['join']('\x0a'));if(!ACCESS_KEY_PATTERN[_0x4b8cc7(0x1f6)](_0x58d50a))throw CliErrors[_0x4b8cc7(0x1e3)]('Invalid\x20accessKey\x20format:\x20\x22'+_0x58d50a+'\x22','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars');if(!_0x402b73)return{'accessKey':_0x58d50a};const _0x5db4f2=normalizeEnv(_0x402b73);return{'accessKey':_0x58d50a,'env':isDaily(_0x5db4f2)?'daily':isDev(_0x5db4f2)?'development':_0x4b8cc7(0x1e0)};}export const authDefinitions=[{'service':a6_0x134926(0x1c2),'command':a6_0x134926(0x1fd),'description':a6_0x134926(0x1c6),'risk':a6_0x134926(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x134926(0x1dd),'type':a6_0x134926(0x1bf),'description':a6_0x134926(0x1be)},{'name':'ak','type':a6_0x134926(0x1bf),'description':a6_0x134926(0x1d9)},{'name':a6_0x134926(0x1d7),'type':'boolean','description':a6_0x134926(0x1cb),'default':!![]},{'name':a6_0x134926(0x1c3),'type':a6_0x134926(0x1f8),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x396a36){const _0x1df643=a6_0x134926,_0x6d287c=await resolveAuthWriteInput(_0x396a36),_0x2bb954=resolveAuthScopeFlags(_0x396a36),_0x44a127=readScopedConfig(_0x2bb954);_0x44a127['accessKey']=_0x6d287c['accessKey'];_0x6d287c[_0x1df643(0x1e6)]&&(_0x44a127[_0x1df643(0x1e6)]=_0x6d287c[_0x1df643(0x1e6)]);writeScopedConfig(_0x44a127,_0x2bb954);const _0x1fc2c3=_0x2bb954[_0x1df643(0x1d7)]?'global':_0x1df643(0x1c3),_0x52ea0d=_0x44a127['env']?'\x20Current\x20env:\x20'+_0x44a127[_0x1df643(0x1e6)]+'.':'';return{'ok':!![],'message':_0x1df643(0x1cc)+_0x1fc2c3+_0x1df643(0x1c5)+_0x52ea0d+'\x20Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x134926(0x1c2),'command':a6_0x134926(0x1e4),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a6_0x134926(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':'string','description':a6_0x134926(0x1be)},{'name':'ak','type':a6_0x134926(0x1bf),'description':a6_0x134926(0x1d9)},{'name':a6_0x134926(0x1e6),'type':a6_0x134926(0x1bf),'description':a6_0x134926(0x1ea)},{'name':a6_0x134926(0x1d7),'type':a6_0x134926(0x1f8),'description':a6_0x134926(0x1cb),'default':!![]},{'name':a6_0x134926(0x1c3),'type':a6_0x134926(0x1f8),'description':a6_0x134926(0x1ca),'default':![]}],async 'execute'(_0x4953ea){const _0x421387=a6_0x134926,_0x22c874=await resolveAuthWriteInput(_0x4953ea),_0x559ba1=resolveAuthScopeFlags(_0x4953ea),_0x115b01={'accessKey':_0x22c874[_0x421387(0x1ff)]};_0x22c874['env']&&(_0x115b01[_0x421387(0x1e6)]=_0x22c874[_0x421387(0x1e6)]);writeScopedConfig(_0x115b01,_0x559ba1);const _0x2b203a=_0x559ba1[_0x421387(0x1d7)]?_0x421387(0x1d7):_0x421387(0x1c3),_0xf2d6bd=_0x115b01['env']?'\x20Current\x20env:\x20'+_0x115b01[_0x421387(0x1e6)]+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x2b203a+_0x421387(0x1d2)+_0xf2d6bd+_0x421387(0x1fb)+CLI_BIN_NAME+_0x421387(0x1e5)};}},{'service':'auth','command':'logout','description':a6_0x134926(0x1e7),'risk':a6_0x134926(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x134926(0x1d7),'type':'boolean','description':a6_0x134926(0x1d0),'default':!![]},{'name':a6_0x134926(0x1c3),'type':'boolean','description':a6_0x134926(0x1f5),'default':![]}],async 'execute'(_0x4c9a61){const _0x29b269=a6_0x134926,_0x2ef9a3=resolveAuthScopeFlags(_0x4c9a61),_0x1785d6=readScopedConfig(_0x2ef9a3),_0x357f9c=!!_0x1785d6[_0x29b269(0x1ff)];delete _0x1785d6['accessKey'],writeScopedConfig(_0x1785d6,_0x2ef9a3);const _0xac6e61=_0x2ef9a3[_0x29b269(0x1d7)]?_0x29b269(0x1d7):_0x29b269(0x1c3);if(_0x357f9c)return{'ok':!![],'message':_0x29b269(0x1c8)+_0xac6e61+_0x29b269(0x1c5)};return{'ok':!![],'message':_0x29b269(0x1e1)+_0xac6e61+_0x29b269(0x1ef)};}},{'service':'auth','command':a6_0x134926(0x1ec),'description':'Show\x20current\x20authentication\x20status','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x134926(0x1d7),'type':a6_0x134926(0x1f8),'description':a6_0x134926(0x1ba),'default':!![]},{'name':a6_0x134926(0x1c3),'type':a6_0x134926(0x1f8),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x2b52af){const _0x21ea13=a6_0x134926,_0x2fa8c9=resolveAuthScopeFlags(_0x2b52af),_0x494e5f=readScopedConfig(_0x2fa8c9),_0x1eed7c=process.env.LOVRABET_ACCESS_KEY||undefined,_0x3a2aa4=_0x494e5f[_0x21ea13(0x1ff)]||undefined,_0x6e6a7a=_0x1eed7c||_0x3a2aa4,_0x1b9127=_0x1eed7c?_0x21ea13(0x1ed):_0x3a2aa4?(_0x2fa8c9['global']?_0x21ea13(0x1d7):'project')+_0x21ea13(0x1bd):null,_0x3e9e0b=[_0x21ea13(0x1fc)+AUTH_MODE['ClientAk']];if(_0x6e6a7a){const _0x3d9ad3=_0x6e6a7a[_0x21ea13(0x1c0)]>0x8?''+_0x6e6a7a[_0x21ea13(0x1c7)](0x0,0x8)+'*'['repeat'](_0x6e6a7a['length']-0x8):_0x6e6a7a;_0x3e9e0b[_0x21ea13(0x1e9)](_0x21ea13(0x1ee)+_0x3d9ad3+(_0x1b9127?'\x20(via\x20'+_0x1b9127+')':''));}return!_0x6e6a7a&&(_0x3e9e0b['push'](''),_0x3e9e0b[_0x21ea13(0x1e9)](_0x21ea13(0x1da)),_0x3e9e0b[_0x21ea13(0x1e9)](''),_0x3e9e0b[_0x21ea13(0x1e9)](_0x21ea13(0x1ce)+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x3e9e0b[_0x21ea13(0x1e9)](''),_0x3e9e0b[_0x21ea13(0x1e9)]('Option\x20B:\x20apps\x20config\x20(.lovrabet.json)'),_0x3e9e0b[_0x21ea13(0x1e9)](_0x21ea13(0x1f9)),_0x3e9e0b['push'](''),_0x3e9e0b[_0x21ea13(0x1e9)](_0x21ea13(0x1c1)),_0x3e9e0b[_0x21ea13(0x1e9)](_0x21ea13(0x1d1)),_0x3e9e0b[_0x21ea13(0x1e9)](''),_0x3e9e0b['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20auth\x20status'),_0x3e9e0b[_0x21ea13(0x1e9)](_0x21ea13(0x1cd)+CLI_BIN_NAME+_0x21ea13(0x1f2))),{'ok':!![],'message':_0x3e9e0b[_0x21ea13(0x1df)]('\x0a')};}},{'service':a6_0x134926(0x1c2),'command':a6_0x134926(0x1fe),'description':a6_0x134926(0x1cf),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0xcdbda0){const _0x201bcd=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x201bcd,'meta':{'env':_0xcdbda0['envName']??'production'}}};}}];
|
|
1
|
+
function a6_0x3eb8(_0x1da845,_0x17071c){_0x1da845=_0x1da845-0x12e;const _0x6962e0=a6_0x6962();let _0x3eb889=_0x6962e0[_0x1da845];return _0x3eb889;}const a6_0x44ae2d=a6_0x3eb8;(function(_0x3bea73,_0x14511b){const _0x441a74=a6_0x3eb8,_0x212f1d=_0x3bea73();while(!![]){try{const _0x24e8f5=-parseInt(_0x441a74(0x167))/0x1*(parseInt(_0x441a74(0x178))/0x2)+parseInt(_0x441a74(0x14e))/0x3+parseInt(_0x441a74(0x176))/0x4+-parseInt(_0x441a74(0x13a))/0x5+parseInt(_0x441a74(0x161))/0x6*(-parseInt(_0x441a74(0x14b))/0x7)+-parseInt(_0x441a74(0x141))/0x8*(parseInt(_0x441a74(0x15b))/0x9)+parseInt(_0x441a74(0x137))/0xa;if(_0x24e8f5===_0x14511b)break;else _0x212f1d['push'](_0x212f1d['shift']());}catch(_0x156ff2){_0x212f1d['push'](_0x212f1d['shift']());}}}(a6_0x6962,0xb9faa));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';function a6_0x6962(){const _0x317c8e=['Write\x20to\x20global\x20config\x20(default)','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','\x20config.','push','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','3754366lyAsYV','accessKey','project','2000379UJjAQs','\x20auth\x20status','test','Auth\x20config\x20reinitialized\x20in\x20','join','trim','info','\x20Current\x20env:\x20','str','Option\x20A:\x20','Then\x20run:\x20','AccessKey\x20cleared\x20from\x20','logout','1737efshvJ','init','status','write','Shorthand\x20for\x20--access-key','length','6wfTQza','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','production','validation','No\x20AccessKey\x20found\x20in\x20','\x20\x20export\x20LOVRABET_ACCESS_KEY=ak_xxx','8NadNWC','ClientAk','AccessKey\x20(ak_xxx...)','\x20config.\x20Nothing\x20to\x20clear.','Auth\x20mode:\x20','access-key','Tip:\x20you\x20can\x20also\x20run:','\x20config','read','auth','boolean','cancelled','Create\x20one\x20in\x20Lovrabet\x20User\x20Center:\x20','\x20Verify:\x20','envName','4359764JCBwjk','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','96138hXEOLf','Invalid\x20accessKey\x20format:\x20\x22','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','nonInteractive','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20Lovrabet\x20User\x20Center:','development','slice','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','\x20auth\x20login\x20--access-key\x20<ak_xxx>','global-default','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Show\x20current\x20authentication\x20status','24736280EbxSjo','string','Option\x20C:\x20environment\x20variable','6368545tgikgF','global','env','LOVRABET_ACCESS_KEY\x20env\x20var','\x20(via\x20','bool','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','52808PLoWjM','Option\x20B:\x20apps\x20config\x20(.lovrabet.json)','daily','Then\x20verify\x20with:\x20','repeat'];a6_0x6962=function(){return _0x317c8e;};return a6_0x6962();}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 _0x3f6d5b=a6_0x3eb8;writeCliSideChannelLine(_0x3f6d5b(0x17c)),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x3f6d5b(0x16d)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x3f6d5b(0x133));}function resolveAuthScopeFlags(_0x4dfdb8){const _0x45e2a3=a6_0x3eb8;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4dfdb8[_0x45e2a3(0x13f)](_0x45e2a3(0x13b)),'explicitProject':_0x4dfdb8[_0x45e2a3(0x13f)]('project'),'policy':_0x45e2a3(0x134)}));}async function resolveAuthWriteInput(_0x586d05){const _0x1c0376=a6_0x3eb8;let _0x379c87=(_0x586d05[_0x1c0376(0x156)](_0x1c0376(0x16c))||_0x586d05[_0x1c0376(0x156)]('ak')||'')[_0x1c0376(0x153)]();const _0x411044=(_0x586d05[_0x1c0376(0x156)](_0x1c0376(0x13c))||'')[_0x1c0376(0x153)]();if(!_0x379c87&&!_0x586d05[_0x1c0376(0x17b)])try{showAccessKeyCreateHint(),_0x379c87=await promptAccessKey('');}catch(_0xdc6f9b){if(isAbortPrompt(_0xdc6f9b))throw CliErrors[_0x1c0376(0x172)]();throw _0xdc6f9b;}if(!_0x379c87)throw CliErrors['validation']('Missing\x20accessKey.',[_0x1c0376(0x173)+USER_ACCESS_KEY_CREATE_URL,_0x1c0376(0x158)+CLI_BIN_NAME+_0x1c0376(0x12f)][_0x1c0376(0x152)]('\x0a'));if(!ACCESS_KEY_PATTERN[_0x1c0376(0x150)](_0x379c87))throw CliErrors[_0x1c0376(0x164)](_0x1c0376(0x179)+_0x379c87+'\x22',_0x1c0376(0x135));if(!_0x411044)return{'accessKey':_0x379c87};const _0xbd40b3=normalizeEnv(_0x411044);return{'accessKey':_0x379c87,'env':isDaily(_0xbd40b3)?_0x1c0376(0x143):isDev(_0xbd40b3)?_0x1c0376(0x17d):_0x1c0376(0x163)};}export const authDefinitions=[{'service':'auth','command':'login','description':a6_0x44ae2d(0x130),'risk':a6_0x44ae2d(0x15e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x44ae2d(0x16c),'type':a6_0x44ae2d(0x138),'description':a6_0x44ae2d(0x169)},{'name':'ak','type':a6_0x44ae2d(0x138),'description':a6_0x44ae2d(0x15f)},{'name':a6_0x44ae2d(0x13b),'type':a6_0x44ae2d(0x171),'description':a6_0x44ae2d(0x146),'default':!![]},{'name':a6_0x44ae2d(0x14d),'type':a6_0x44ae2d(0x171),'description':a6_0x44ae2d(0x17a),'default':![]}],async 'execute'(_0x1c33db){const _0x346650=a6_0x44ae2d,_0x403e53=await resolveAuthWriteInput(_0x1c33db),_0x5783ab=resolveAuthScopeFlags(_0x1c33db),_0x23e395=readScopedConfig(_0x5783ab);_0x23e395[_0x346650(0x14c)]=_0x403e53[_0x346650(0x14c)];_0x403e53[_0x346650(0x13c)]&&(_0x23e395[_0x346650(0x13c)]=_0x403e53[_0x346650(0x13c)]);writeScopedConfig(_0x23e395,_0x5783ab);const _0x3e3b6c=_0x5783ab['global']?_0x346650(0x13b):'project',_0x478023=_0x23e395['env']?_0x346650(0x155)+_0x23e395[_0x346650(0x13c)]+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x3e3b6c+_0x346650(0x148)+_0x478023+_0x346650(0x174)+CLI_BIN_NAME+_0x346650(0x14f)};}},{'service':a6_0x44ae2d(0x170),'command':a6_0x44ae2d(0x15c),'description':a6_0x44ae2d(0x177),'risk':a6_0x44ae2d(0x15e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x44ae2d(0x16c),'type':'string','description':a6_0x44ae2d(0x169)},{'name':'ak','type':a6_0x44ae2d(0x138),'description':'Shorthand\x20for\x20--access-key'},{'name':a6_0x44ae2d(0x13c),'type':a6_0x44ae2d(0x138),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':a6_0x44ae2d(0x13b),'type':a6_0x44ae2d(0x171),'description':a6_0x44ae2d(0x146),'default':!![]},{'name':a6_0x44ae2d(0x14d),'type':a6_0x44ae2d(0x171),'description':a6_0x44ae2d(0x17a),'default':![]}],async 'execute'(_0x3d3f76){const _0x2f7530=a6_0x44ae2d,_0x444305=await resolveAuthWriteInput(_0x3d3f76),_0x408a00=resolveAuthScopeFlags(_0x3d3f76),_0x326280={'accessKey':_0x444305[_0x2f7530(0x14c)]};_0x444305['env']&&(_0x326280[_0x2f7530(0x13c)]=_0x444305[_0x2f7530(0x13c)]);writeScopedConfig(_0x326280,_0x408a00);const _0x5c37b1=_0x408a00[_0x2f7530(0x13b)]?'global':'project',_0x4f8f67=_0x326280[_0x2f7530(0x13c)]?_0x2f7530(0x155)+_0x326280[_0x2f7530(0x13c)]+'.':'';return{'ok':!![],'message':_0x2f7530(0x151)+_0x5c37b1+'\x20scope.'+_0x4f8f67+'\x20Verify:\x20'+CLI_BIN_NAME+_0x2f7530(0x14f)};}},{'service':'auth','command':a6_0x44ae2d(0x15a),'description':'Clear\x20accessKey\x20from\x20config','risk':a6_0x44ae2d(0x15e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x44ae2d(0x13b),'type':a6_0x44ae2d(0x171),'description':'Clear\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x44ae2d(0x14d),'type':a6_0x44ae2d(0x171),'description':'Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x933640){const _0x594cf0=a6_0x44ae2d,_0x23f82b=resolveAuthScopeFlags(_0x933640),_0x34925e=readScopedConfig(_0x23f82b),_0x2b59e8=!!_0x34925e[_0x594cf0(0x14c)];delete _0x34925e['accessKey'],writeScopedConfig(_0x34925e,_0x23f82b);const _0x4ed748=_0x23f82b['global']?_0x594cf0(0x13b):_0x594cf0(0x14d);if(_0x2b59e8)return{'ok':!![],'message':_0x594cf0(0x159)+_0x4ed748+_0x594cf0(0x148)};return{'ok':!![],'message':_0x594cf0(0x165)+_0x4ed748+_0x594cf0(0x16a)};}},{'service':a6_0x44ae2d(0x170),'command':a6_0x44ae2d(0x15d),'description':a6_0x44ae2d(0x136),'risk':a6_0x44ae2d(0x16f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x44ae2d(0x13b),'type':a6_0x44ae2d(0x171),'description':'Read\x20from\x20global\x20config\x20(default)','default':!![]},{'name':a6_0x44ae2d(0x14d),'type':a6_0x44ae2d(0x171),'description':a6_0x44ae2d(0x140),'default':![]}],async 'execute'(_0x1a072f){const _0x1d7346=a6_0x44ae2d,_0x5b8a98=resolveAuthScopeFlags(_0x1a072f),_0x53a8ce=readScopedConfig(_0x5b8a98),_0x4b1be=process.env.LOVRABET_ACCESS_KEY||undefined,_0x5c2a9f=_0x53a8ce[_0x1d7346(0x14c)]||undefined,_0x10e124=_0x4b1be||_0x5c2a9f,_0xdbfe62=_0x4b1be?_0x1d7346(0x13d):_0x5c2a9f?(_0x5b8a98[_0x1d7346(0x13b)]?_0x1d7346(0x13b):_0x1d7346(0x14d))+_0x1d7346(0x16e):null,_0x501e74=[_0x1d7346(0x16b)+AUTH_MODE[_0x1d7346(0x168)]];if(_0x10e124){const _0x4b7ce1=_0x10e124['length']>0x8?''+_0x10e124[_0x1d7346(0x12e)](0x0,0x8)+'*'[_0x1d7346(0x145)](_0x10e124[_0x1d7346(0x160)]-0x8):_0x10e124;_0x501e74[_0x1d7346(0x149)]('AccessKey:\x20'+_0x4b7ce1+(_0xdbfe62?_0x1d7346(0x13e)+_0xdbfe62+')':''));}return!_0x10e124&&(_0x501e74[_0x1d7346(0x149)](''),_0x501e74[_0x1d7346(0x149)](_0x1d7346(0x147)),_0x501e74[_0x1d7346(0x149)](''),_0x501e74['push'](_0x1d7346(0x157)+CLI_BIN_NAME+_0x1d7346(0x131)),_0x501e74[_0x1d7346(0x149)](''),_0x501e74[_0x1d7346(0x149)](_0x1d7346(0x142)),_0x501e74[_0x1d7346(0x149)](_0x1d7346(0x14a)),_0x501e74[_0x1d7346(0x149)](''),_0x501e74['push'](_0x1d7346(0x139)),_0x501e74[_0x1d7346(0x149)](_0x1d7346(0x166)),_0x501e74[_0x1d7346(0x149)](''),_0x501e74[_0x1d7346(0x149)](_0x1d7346(0x144)+CLI_BIN_NAME+_0x1d7346(0x14f)),_0x501e74[_0x1d7346(0x149)](_0x1d7346(0x162)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x501e74[_0x1d7346(0x152)]('\x0a')};}},{'service':a6_0x44ae2d(0x170),'command':a6_0x44ae2d(0x154),'description':a6_0x44ae2d(0x132),'risk':a6_0x44ae2d(0x16f),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x52e96e){const _0xc1a986=a6_0x44ae2d,_0x2ccd16=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x2ccd16,'meta':{'env':_0x52e96e[_0xc1a986(0x175)]??_0xc1a986(0x163)}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49ddf7,_0x516a6a){const _0x3e486d=a7_0x359e,_0x1cf4ec=_0x49ddf7();while(!![]){try{const _0x134b94=-parseInt(_0x3e486d(0x147))/0x1+-parseInt(_0x3e486d(0x146))/0x2+-parseInt(_0x3e486d(0x13e))/0x3*(parseInt(_0x3e486d(0x148))/0x4)+-parseInt(_0x3e486d(0x139))/0x5+parseInt(_0x3e486d(0x144))/0x6+parseInt(_0x3e486d(0x13f))/0x7+parseInt(_0x3e486d(0x13a))/0x8;if(_0x134b94===_0x516a6a)break;else _0x1cf4ec['push'](_0x1cf4ec['shift']());}catch(_0x2a8b99){_0x1cf4ec['push'](_0x1cf4ec['shift']());}}}(a7_0x520d,0x2aeef));function a7_0x359e(_0x434367,_0x2b9db2){_0x434367=_0x434367-0x135;const _0x520dd1=a7_0x520d();let _0x359eb0=_0x520dd1[_0x434367];return _0x359eb0;}function a7_0x520d(){const _0x284609=['question','AccessKey\x20(','1413528NhAFzx','AccessKey\x20(paste\x20ak_...):\x20','477150aUAfEB','48171teWPsU','2304pcJIfk','name','removeListener','AbortPrompt','SIGINT','708685OgaSSX','4425000GenWWn','once','trim','stdout','1197GQFwun','318143jCgtvM','):\x20','close'];a7_0x520d=function(){return _0x284609;};return a7_0x520d();}import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x41ba66=a7_0x359e;super('User\x20aborted\x20prompt'),this[_0x41ba66(0x135)]=_0x41ba66(0x137);}}function createSafeRl(){const _0x13db5f=a7_0x359e,_0x1e09ef=createInterface({'input':process['stdin'],'output':process[_0x13db5f(0x13d)]});let _0x8fbefe;const _0x37c896=new Promise((_0x1183e8,_0x25f039)=>{const _0x156bff=_0x13db5f;_0x8fbefe=()=>{const _0x5475f3=a7_0x359e;_0x8fbefe&&(_0x1e09ef[_0x5475f3(0x136)](_0x5475f3(0x138),_0x8fbefe),_0x8fbefe=undefined);try{_0x1e09ef['close']();}catch{}_0x25f039(new AbortPrompt());},_0x1e09ef[_0x156bff(0x13b)](_0x156bff(0x138),_0x8fbefe);}),_0x48a676=()=>{const _0x580f6a=_0x13db5f;_0x8fbefe&&(_0x1e09ef['removeListener'](_0x580f6a(0x138),_0x8fbefe),_0x8fbefe=undefined);try{_0x1e09ef[_0x580f6a(0x141)]();}catch{}};return{'rl':_0x1e09ef,'abortPromise':_0x37c896,'disposeSuccess':_0x48a676};}export async function promptAccessKey(_0x25a174=''){const {rl:_0x233b54,abortPromise:_0x5cecc9,disposeSuccess:_0x577161}=createSafeRl(),_0x3c8c5e=new Promise(_0x469cb3=>{const _0x2c7070=a7_0x359e,_0x40777d=_0x25a174?_0x2c7070(0x143)+_0x25a174+_0x2c7070(0x140):_0x2c7070(0x145);_0x233b54[_0x2c7070(0x142)](_0x40777d,_0x48d908=>{const _0x1007c6=_0x2c7070;_0x577161(),_0x469cb3(_0x48d908[_0x1007c6(0x13c)]()||_0x25a174);});});return Promise['race']([_0x3c8c5e,_0x5cecc9]);}export function isAbortPrompt(_0x4fa6cd){const _0x235efa=a7_0x359e;return _0x4fa6cd instanceof Error&&_0x4fa6cd[_0x235efa(0x135)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a8_0x3dc3f1=a8_0x16e3;function a8_0x237d(){const _0x5814dc=['Script\x20ID','33qdYRMW','8pCMoCV','bff','1215tGohpU','(none)','functionName','scriptType','388050HchkOQ','createdTime','detail','29520zhNqtb','123qYHHqj','updatedTime','read','bool','1443113ilrxkp','10116vJoNfu','5vqVZLR','appCode','4112664hgAFcJ','2298196nyyFtr','3852BZdETV','description','num'];a8_0x237d=function(){return _0x5814dc;};return a8_0x237d();}(function(_0x4d07d7,_0x328470){const _0x435500=a8_0x16e3,_0x42ad5e=_0x4d07d7();while(!![]){try{const _0x4a501b=-parseInt(_0x435500(0x178))/0x1+-parseInt(_0x435500(0x173))/0x2*(-parseInt(_0x435500(0x16e))/0x3)+-parseInt(_0x435500(0x177))/0x4*(parseInt(_0x435500(0x174))/0x5)+-parseInt(_0x435500(0x16a))/0x6+-parseInt(_0x435500(0x172))/0x7*(-parseInt(_0x435500(0x164))/0x8)+-parseInt(_0x435500(0x166))/0x9*(parseInt(_0x435500(0x16d))/0xa)+parseInt(_0x435500(0x163))/0xb*(parseInt(_0x435500(0x176))/0xc);if(_0x4a501b===_0x328470)break;else _0x42ad5e['push'](_0x42ad5e['shift']());}catch(_0x56e580){_0x42ad5e['push'](_0x42ad5e['shift']());}}}(a8_0x237d,0x61aeb));import{getBffScriptInfo}from'../../core/api-client.js';function a8_0x16e3(_0x456df5,_0x2b3653){_0x456df5=_0x456df5-0x160;const _0x237d97=a8_0x237d();let _0x16e360=_0x237d97[_0x456df5];return _0x16e360;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x3dc3f1(0x165),'command':a8_0x3dc3f1(0x16c),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a8_0x3dc3f1(0x170),'flags':[{...ID_FLAG,'description':a8_0x3dc3f1(0x162)},VERBOSE_FLAG],async 'execute'(_0x51891c){const _0x51cb78=a8_0x3dc3f1,_0x210b9f=await getBffScriptInfo(_0x51891c[_0x51cb78(0x161)]('id')),_0x432f83=_0x51891c[_0x51cb78(0x171)]('verbose');if(_0x432f83)return{'ok':!![],'data':_0x210b9f};return{'ok':!![],'data':{'id':_0x210b9f['id'],'appCode':_0x210b9f[_0x51cb78(0x175)],'functionName':_0x210b9f[_0x51cb78(0x168)]??'','scriptType':_0x210b9f[_0x51cb78(0x169)],'description':_0x210b9f[_0x51cb78(0x160)]||_0x51cb78(0x167),'createdTime':_0x210b9f[_0x51cb78(0x16b)]??'','updatedTime':_0x210b9f[_0x51cb78(0x16f)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a9_0x42cd(_0x350711,_0x4193ad){_0x350711=_0x350711-0x137;const _0x590356=a9_0x5903();let _0x42cd27=_0x590356[_0x350711];return _0x42cd27;}function a9_0x5903(){const _0x409d69=['376647HxMxti','3641ULDPXo','6759NkTzPY','62GlOQQi','2496Zrkywo','now','7MZpTxh','str','bff','707964rmJGVY','12ItLRpo','read','425070OHuFRb','6436CWzQCN','Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','2340240UsGyWJ','1830WENbyP','BFF\x20function\x20name\x20to\x20execute'];a9_0x5903=function(){return _0x409d69;};return a9_0x5903();}const a9_0x194793=a9_0x42cd;(function(_0x24eba3,_0x46cd36){const _0x3a2346=a9_0x42cd,_0x107d1a=_0x24eba3();while(!![]){try{const _0xcdceb0=parseInt(_0x3a2346(0x147))/0x1*(parseInt(_0x3a2346(0x13d))/0x2)+parseInt(_0x3a2346(0x13a))/0x3+-parseInt(_0x3a2346(0x144))/0x4*(-parseInt(_0x3a2346(0x146))/0x5)+parseInt(_0x3a2346(0x143))/0x6*(parseInt(_0x3a2346(0x140))/0x7)+-parseInt(_0x3a2346(0x137))/0x8+parseInt(_0x3a2346(0x13c))/0x9*(-parseInt(_0x3a2346(0x138))/0xa)+parseInt(_0x3a2346(0x13b))/0xb*(-parseInt(_0x3a2346(0x13e))/0xc);if(_0xcdceb0===_0x46cd36)break;else _0x107d1a['push'](_0x107d1a['shift']());}catch(_0x249dc8){_0x107d1a['push'](_0x107d1a['shift']());}}}(a9_0x5903,0x30a7a));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':a9_0x194793(0x142),'command':'exec','description':a9_0x194793(0x148),'risk':a9_0x194793(0x145),'flags':[{...NAME_FLAG,'required':!![],'description':a9_0x194793(0x139)},PARAMS_FLAG],async 'execute'(_0x285cb7){const _0x2eaafb=a9_0x194793,_0x3c51cc=parseJsonParams(_0x285cb7[_0x2eaafb(0x141)]('params')),_0x54cc3f=Date[_0x2eaafb(0x13f)](),_0x190f4e=await executeSdkBff(_0x285cb7[_0x2eaafb(0x141)]('name'),_0x3c51cc),_0x49867f=Date[_0x2eaafb(0x13f)]()-_0x54cc3f;return{'ok':!![],'data':{'result':_0x190f4e,'elapsed':_0x49867f},'message':'BFF\x20executed\x20in\x20'+_0x49867f+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x246ff9,_0x561fda){const _0x421824=a10_0x4b39,_0xad057d=_0x246ff9();while(!![]){try{const _0x45c07a=parseInt(_0x421824(0x135))/0x1*(-parseInt(_0x421824(0x12f))/0x2)+parseInt(_0x421824(0x12b))/0x3*(parseInt(_0x421824(0x130))/0x4)+-parseInt(_0x421824(0x12d))/0x5*(-parseInt(_0x421824(0x136))/0x6)+parseInt(_0x421824(0x134))/0x7*(parseInt(_0x421824(0x132))/0x8)+-parseInt(_0x421824(0x12e))/0x9+-parseInt(_0x421824(0x133))/0xa*(-parseInt(_0x421824(0x131))/0xb)+-parseInt(_0x421824(0x12c))/0xc;if(_0x45c07a===_0x561fda)break;else _0xad057d['push'](_0xad057d['shift']());}catch(_0x4d32aa){_0xad057d['push'](_0xad057d['shift']());}}}(a10_0x1232,0x3bd91));function a10_0x4b39(_0x5c3770,_0x192d71){_0x5c3770=_0x5c3770-0x12b;const _0x1232dd=a10_0x1232();let _0x4b3980=_0x1232dd[_0x5c3770];return _0x4b3980;}import{bffDetail}from'../../commands/bff/detail.js';function a10_0x1232(){const _0x53fb14=['15AFIotm','280143FYtaqP','231204WoerVq','56TMxSKv','6424ZfXXFK','8qrznJB','7420ajUDvm','2452961gqnhOh','2qvgGUf','772410XZUZSZ','55449emQDUK','11055000OPiHve'];a10_0x1232=function(){return _0x53fb14;};return a10_0x1232();}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a11_0x45b0(){const _0x574ed1=['project-or-global-explicit','8XKsCdl','2ZDqwAv','556122UDCWqY','1713520VwqqKD','project','Use\x20only\x20one\x20config\x20scope\x20flag.','2863615XubBzI','validation','334614EImSma','634409LmxLlh','global-default','\x20init`\x20first.','8798904ykbFvm','inProject','10AYuTwd','global','Add\x20--global\x20to\x20write\x20to\x20~/.lovrabet.json,\x20or\x20run\x20`','545364apkpIG','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.'];a11_0x45b0=function(){return _0x574ed1;};return a11_0x45b0();}(function(_0x36c542,_0x2a653e){const _0x404297=a11_0x464b,_0x45229a=_0x36c542();while(!![]){try{const _0x1935a0=-parseInt(_0x404297(0x85))/0x1+-parseInt(_0x404297(0x7d))/0x2*(-parseInt(_0x404297(0x79))/0x3)+parseInt(_0x404297(0x7f))/0x4+-parseInt(_0x404297(0x82))/0x5+-parseInt(_0x404297(0x7e))/0x6+parseInt(_0x404297(0x84))/0x7*(parseInt(_0x404297(0x7c))/0x8)+parseInt(_0x404297(0x88))/0x9*(parseInt(_0x404297(0x8a))/0xa);if(_0x1935a0===_0x2a653e)break;else _0x45229a['push'](_0x45229a['shift']());}catch(_0x2923d0){_0x45229a['push'](_0x45229a['shift']());}}}(a11_0x45b0,0x51fbf));import{CLI_BIN_NAME}from'../../constant/cli.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';function a11_0x464b(_0x4a8cb5,_0x4dbece){_0x4a8cb5=_0x4a8cb5-0x78;const _0x45b079=a11_0x45b0();let _0x464bd5=_0x45b079[_0x4a8cb5];return _0x464bd5;}export function resolveConfigScope(_0x4f49d9){const _0x317b53=a11_0x464b,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x52fbd6}=_0x4f49d9;if(explicitGlobal&&explicitProject)throw CliErrors[_0x317b53(0x83)](_0x317b53(0x7a),_0x317b53(0x81));if(explicitGlobal)return _0x317b53(0x8b);if(explicitProject)return _0x317b53(0x80);switch(_0x52fbd6){case _0x317b53(0x86):return'global';case'project-default':return _0x4f49d9[_0x317b53(0x89)]??isInProject()?'project':_0x317b53(0x8b);case _0x317b53(0x7b):if(!(_0x4f49d9[_0x317b53(0x89)]??isInProject()))throw CliErrors['validation']('Not\x20inside\x20a\x20project\x20(no\x20.lovrabet.json\x20found).',_0x317b53(0x78)+CLI_BIN_NAME+_0x317b53(0x87));return _0x317b53(0x80);}}export function toScopeFlags(_0x98b1e3){const _0x123f2a=a11_0x464b;return{'global':_0x98b1e3===_0x123f2a(0x8b)};}export function formatScopeLabel(_0x4f6cc8){return _0x4f6cc8==='global'?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ef231,_0x1c828e){const _0xe975d6=a12_0x5cc6,_0x1d6d05=_0x2ef231();while(!![]){try{const _0x760598=parseInt(_0xe975d6(0x15d))/0x1+parseInt(_0xe975d6(0x159))/0x2*(-parseInt(_0xe975d6(0x15e))/0x3)+parseInt(_0xe975d6(0x14e))/0x4+parseInt(_0xe975d6(0x152))/0x5+-parseInt(_0xe975d6(0x151))/0x6+parseInt(_0xe975d6(0x14b))/0x7*(parseInt(_0xe975d6(0x14f))/0x8)+-parseInt(_0xe975d6(0x154))/0x9;if(_0x760598===_0x1c828e)break;else _0x1d6d05['push'](_0x1d6d05['shift']());}catch(_0x441098){_0x1d6d05['push'](_0x1d6d05['shift']());}}}(a12_0x9b1c,0xf09b4));import{CliErrors}from'../../errors.js';function a12_0x5cc6(_0x1b6bf5,_0x331a4d){_0x1b6bf5=_0x1b6bf5-0x147;const _0x9b1c28=a12_0x9b1c();let _0x5cc6e7=_0x9b1c28[_0x1b6bf5];return _0x5cc6e7;}function isSet(_0x4763e3,_0xc747ef){const _0x953987=_0x4763e3['flag'](_0xc747ef);return _0x953987!==undefined&&_0x953987!==''&&_0x953987!==![]&&_0x953987!==0x0;}function fmtNames(_0x1d6fd7){const _0x320746=a12_0x5cc6;return _0x1d6fd7[_0x320746(0x155)](_0x1525d9=>'--'+_0x1525d9)[_0x320746(0x147)](',\x20');}function a12_0x9b1c(){const _0x410a94=['join',',\x20got\x20\x22','Invalid\x20--','Provide\x20one\x20of:\x20','35pJdaMj','str','length','4274116OutXnh','840248gxorBZ','Flags\x20','8376330ApVBCR','7297490nRtmgO','\x20is\x20allowed,\x20found:\x20','2373399NSEEFv','map','Use\x20only\x20one\x20of:\x20','filter','Exactly\x20one\x20of\x20','258302waEEbr','\x20are\x20mutually\x20exclusive\x20for\x20`','validation','test','1271071rvcwza','39KaAdwX','Only\x20one\x20of\x20'];a12_0x9b1c=function(){return _0x410a94;};return a12_0x9b1c();}export function requireOneOf(_0xbcd580,_0x519e4a,_0x4cd8e9){const _0x1120a0=a12_0x5cc6,_0x52bed5=_0x519e4a['filter'](_0x393343=>isSet(_0xbcd580,_0x393343));if(_0x52bed5[_0x1120a0(0x14d)]!==0x1)throw CliErrors[_0x1120a0(0x15b)](_0x52bed5[_0x1120a0(0x14d)]===0x0?_0x1120a0(0x158)+fmtNames(_0x519e4a)+'\x20is\x20required\x20for\x20`'+_0x4cd8e9+'`.':_0x1120a0(0x15f)+fmtNames(_0x519e4a)+_0x1120a0(0x153)+fmtNames(_0x52bed5)+'.',_0x52bed5[_0x1120a0(0x14d)]===0x0?_0x1120a0(0x14a)+fmtNames(_0x519e4a):'Remove\x20all\x20but\x20one.');}export function requireAnyOf(_0x55395d,_0x3c1c1e,_0x56b835){const _0xb66634=a12_0x5cc6;if(!_0x3c1c1e['some'](_0x41034f=>isSet(_0x55395d,_0x41034f)))throw CliErrors[_0xb66634(0x15b)]('At\x20least\x20one\x20of\x20'+fmtNames(_0x3c1c1e)+'\x20is\x20required\x20for\x20`'+_0x56b835+'`.',_0xb66634(0x14a)+fmtNames(_0x3c1c1e));}export function mutuallyExclusive(_0x13d4aa,_0x469cb7,_0x56864d){const _0xf57db2=a12_0x5cc6,_0x3d6d81=_0x469cb7[_0xf57db2(0x157)](_0x12ea88=>isSet(_0x13d4aa,_0x12ea88));if(_0x3d6d81[_0xf57db2(0x14d)]>0x1)throw CliErrors[_0xf57db2(0x15b)](_0xf57db2(0x150)+fmtNames(_0x3d6d81)+_0xf57db2(0x15a)+_0x56864d+'`.',_0xf57db2(0x156)+fmtNames(_0x469cb7));}export function validatePattern(_0x88e199,_0x5c391a,_0x2a3d59,_0x2e818e){const _0x429cec=a12_0x5cc6,_0x4d5d5b=_0x88e199[_0x429cec(0x14c)](_0x5c391a);if(_0x4d5d5b&&!_0x2a3d59[_0x429cec(0x15c)](_0x4d5d5b))throw CliErrors[_0x429cec(0x15b)](_0x429cec(0x149)+_0x5c391a+':\x20expected\x20'+_0x2e818e+_0x429cec(0x148)+_0x4d5d5b+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x534202=a13_0x104e;(function(_0x289935,_0x57f918){const _0xa0ee31=a13_0x104e,_0x2ffff4=_0x289935();while(!![]){try{const _0x2a2842=-parseInt(_0xa0ee31(0x165))/0x1*(-parseInt(_0xa0ee31(0x179))/0x2)+parseInt(_0xa0ee31(0x16a))/0x3*(parseInt(_0xa0ee31(0x170))/0x4)+parseInt(_0xa0ee31(0x169))/0x5+-parseInt(_0xa0ee31(0x16f))/0x6*(-parseInt(_0xa0ee31(0x174))/0x7)+-parseInt(_0xa0ee31(0x16c))/0x8+-parseInt(_0xa0ee31(0x178))/0x9*(-parseInt(_0xa0ee31(0x177))/0xa)+-parseInt(_0xa0ee31(0x176))/0xb;if(_0x2a2842===_0x57f918)break;else _0x2ffff4['push'](_0x2ffff4['shift']());}catch(_0x5a6429){_0x2ffff4['push'](_0x2ffff4['shift']());}}}(a13_0x3c7b,0xd9e1c));export const CODE_FLAG={'name':'code','type':a13_0x534202(0x16e),'required':!![],'description':a13_0x534202(0x166),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':a13_0x534202(0x171),'type':'string','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':a13_0x534202(0x16b)}};function a13_0x3c7b(){const _0x3f31b1=['SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','1641640BGfRoE','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','string','6lWaXKo','4XRAxVZ','sqlcode','params','Return\x20full\x20raw\x20response\x20object','7882161kPOmMQ','boolean','42471110hIyfiC','7158290mbORLn','18qnKUYA','15178OYrVjg','121VEXvOp','Dataset\x20code\x20(32-char\x20hex\x20UUID)','verbose','number','3235230AgyCjs','2506989cSEDim'];a13_0x3c7b=function(){return _0x3f31b1;};return a13_0x3c7b();}export const VERBOSE_FLAG={'name':a13_0x534202(0x167),'type':a13_0x534202(0x175),'description':a13_0x534202(0x173)};function a13_0x104e(_0x1e9ebd,_0x3e844b){_0x1e9ebd=_0x1e9ebd-0x165;const _0x3c7b2f=a13_0x3c7b();let _0x104e48=_0x3c7b2f[_0x1e9ebd];return _0x104e48;}export const PARAMS_FLAG={'name':a13_0x534202(0x172),'type':'string','description':a13_0x534202(0x16d)};export const NAME_FLAG={'name':'name','type':a13_0x534202(0x16e),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':a13_0x534202(0x168),'required':!![],'description':'Resource\x20ID'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x1ce4ce=a14_0x2c4a;(function(_0x166129,_0x42cf3e){const _0x31f56f=a14_0x2c4a,_0x5d0f0f=_0x166129();while(!![]){try{const _0x6872d0=parseInt(_0x31f56f(0x155))/0x1*(parseInt(_0x31f56f(0x166))/0x2)+parseInt(_0x31f56f(0x13b))/0x3+parseInt(_0x31f56f(0x16e))/0x4*(parseInt(_0x31f56f(0x160))/0x5)+parseInt(_0x31f56f(0x14f))/0x6*(-parseInt(_0x31f56f(0x157))/0x7)+-parseInt(_0x31f56f(0x13d))/0x8*(-parseInt(_0x31f56f(0x133))/0x9)+-parseInt(_0x31f56f(0x16c))/0xa+-parseInt(_0x31f56f(0x13e))/0xb;if(_0x6872d0===_0x42cf3e)break;else _0x5d0f0f['push'](_0x5d0f0f['shift']());}catch(_0x1b2d93){_0x5d0f0f['push'](_0x5d0f0f['shift']());}}}(a14_0x5295,0x971f7));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';function a14_0x2c4a(_0x16b717,_0xaaab82){_0x16b717=_0x16b717-0x130;const _0x5295f3=a14_0x5295();let _0x2c4afd=_0x5295f3[_0x16b717];return _0x2c4afd;}import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':'global','type':a14_0x1ce4ce(0x15d),'description':a14_0x1ce4ce(0x13f),'default':![]},listDef={'service':a14_0x1ce4ce(0x15f),'command':a14_0x1ce4ce(0x131),'description':a14_0x1ce4ce(0x143),'risk':a14_0x1ce4ce(0x132),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2d5649){const _0x3de1d3=a14_0x1ce4ce,{buildConfigFromFlags:_0x3f442f}=await import(_0x3de1d3(0x139)),_0x26e9bc=_0x3f442f({}),_0x11f220=getProjectConfigPath(),_0x4237d9=resolveWriteConfigPath('global');if(_0x2d5649[_0x3de1d3(0x15b)]===_0x3de1d3(0x168))return{'ok':!![],'message':_0x3de1d3(0x140)+(JSON['stringify'](_0x26e9bc[_0x3de1d3(0x152)],null,0x2)+'\x0a\x0a')+_0x3de1d3(0x136)+(_0x3de1d3(0x158)+(_0x11f220??_0x3de1d3(0x149))+'\x0a')+(_0x3de1d3(0x16d)+_0x4237d9)};return{'ok':!![],'data':{'effective':_0x26e9bc[_0x3de1d3(0x152)],'configFiles':{'project':_0x11f220??null,'global':_0x4237d9}}};}},getDef={'service':a14_0x1ce4ce(0x15f),'command':a14_0x1ce4ce(0x13c),'description':a14_0x1ce4ce(0x167),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a14_0x1ce4ce(0x148),'required':!![]}],'flags':[],async 'execute'(_0x40b65e){const _0x4d83e8=a14_0x1ce4ce,_0x5180fe=_0x40b65e[_0x4d83e8(0x134)][0x0];if(!_0x5180fe)throw CliErrors['validation'](_0x4d83e8(0x13a),_0x4d83e8(0x15a)+CLI_BIN_NAME+'\x20config\x20get\x20<key>');const {buildConfigFromFlags:_0x100023}=await import('../../context.js'),{raw:_0x594022}=_0x100023({});if(_0x5180fe['includes']('.')){const _0x32a8af=_0x5180fe[_0x4d83e8(0x14c)]('.');let _0xb3df2a=_0x594022;for(const _0x22c7f1 of _0x32a8af){if(_0xb3df2a==null||typeof _0xb3df2a!=='object')throw CliErrors[_0x4d83e8(0x16b)](_0x4d83e8(0x15c)+_0x5180fe);_0xb3df2a=_0xb3df2a[_0x22c7f1];}if(_0xb3df2a===undefined)throw CliErrors[_0x4d83e8(0x16b)](_0x4d83e8(0x15c)+_0x5180fe);return console[_0x4d83e8(0x14b)](typeof _0xb3df2a===_0x4d83e8(0x169)?JSON[_0x4d83e8(0x138)](_0xb3df2a,null,0x2):String(_0xb3df2a)),{'ok':!![]};}const _0x1e1fd6=_0x594022[_0x5180fe];if(_0x1e1fd6===undefined)throw CliErrors[_0x4d83e8(0x16b)]('Key\x20not\x20found:\x20'+_0x5180fe);return console[_0x4d83e8(0x14b)](typeof _0x1e1fd6===_0x4d83e8(0x169)?JSON[_0x4d83e8(0x138)](_0x1e1fd6,null,0x2):String(_0x1e1fd6)),{'ok':!![]};}},setDef={'service':a14_0x1ce4ce(0x15f),'command':a14_0x1ce4ce(0x135),'description':a14_0x1ce4ce(0x153),'risk':a14_0x1ce4ce(0x145),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x1ce4ce(0x159),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x1ce4ce(0x154),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x5be344){const _0x50e27b=a14_0x1ce4ce,_0x170167=_0x5be344[_0x50e27b(0x134)][0x0],_0x54ecb0=_0x5be344['args'][0x1];if(!_0x170167||_0x54ecb0===undefined)throw CliErrors['validation']('Missing\x20key\x20or\x20value.',_0x50e27b(0x15a)+CLI_BIN_NAME+_0x50e27b(0x15e));if(ENUM_KEYS[_0x170167]&&!ENUM_KEYS[_0x170167][_0x50e27b(0x156)](_0x54ecb0))throw CliErrors[_0x50e27b(0x16b)](_0x50e27b(0x130)+_0x170167+_0x50e27b(0x137)+ENUM_KEYS[_0x170167][_0x50e27b(0x147)](',\x20'));if(_0x170167===_0x50e27b(0x161))throw CliErrors['validation'](_0x50e27b(0x150));if(_0x170167===_0x50e27b(0x141)){const _0x5a1598=Number(_0x54ecb0);if(isNaN(_0x5a1598)||_0x5a1598<=0x0)throw CliErrors[_0x50e27b(0x16b)](_0x50e27b(0x146));}const _0x141066=resolveWriteScope({'explicitGlobal':_0x5be344['bool'](_0x50e27b(0x163)),'policy':_0x50e27b(0x14e)}),_0x19945f=toScopeFlags(_0x141066),_0xd3b5e1=readScopedConfig(_0x19945f);if(!isTopLevelConfigKey(_0x170167))throw CliErrors['validation'](_0x50e27b(0x162)+_0x170167+_0x50e27b(0x142),_0x50e27b(0x16a)+getTopLevelConfigKeySummary());return _0xd3b5e1[_0x170167]=_0x170167===_0x50e27b(0x141)?Number(_0x54ecb0):_0x54ecb0,console[_0x50e27b(0x14b)](_0x50e27b(0x151)+_0x170167+_0x50e27b(0x14a)+_0x54ecb0+'\x22'+(_0x141066===_0x50e27b(0x163)?_0x50e27b(0x144):'')),writeScopedConfig(_0xd3b5e1,_0x19945f),{'ok':!![]};}},deleteDef={'service':a14_0x1ce4ce(0x15f),'command':a14_0x1ce4ce(0x14d),'description':'Delete\x20a\x20config\x20value','risk':a14_0x1ce4ce(0x145),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x1ce4ce(0x159),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x431ce){const _0x204957=a14_0x1ce4ce,_0x355990=_0x431ce[_0x204957(0x134)][0x0];if(!_0x355990)throw CliErrors[_0x204957(0x16b)](_0x204957(0x13a),'Usage:\x20'+CLI_BIN_NAME+_0x204957(0x170));const _0x4f6e25=resolveWriteScope({'explicitGlobal':_0x431ce[_0x204957(0x165)](_0x204957(0x163)),'policy':_0x204957(0x14e)}),_0x890a48=toScopeFlags(_0x4f6e25),_0x41ad4a=readScopedConfig(_0x890a48);if(_0x41ad4a[_0x355990]===undefined)throw CliErrors[_0x204957(0x16b)](_0x204957(0x16f)+_0x355990+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x41ad4a[_0x355990],console[_0x204957(0x14b)](_0x204957(0x164)+_0x355990+'`'+(_0x4f6e25===_0x204957(0x163)?_0x204957(0x144):'')),writeScopedConfig(_0x41ad4a,_0x890a48),{'ok':!![]};}};function a14_0x5295(){const _0x1c0f86=['join','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','(none)','`\x20=\x20\x22','log','split','delete','project-or-global-explicit','6IutUEd','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Set\x20`','raw','Set\x20a\x20config\x20value','value','112247dEhwce','includes','6703207eHspas','\x20\x20project:\x20','key','Usage:\x20','format','Key\x20not\x20found:\x20','boolean','\x20config\x20set\x20<key>\x20<value>\x20[--global]','config','5gQHhiJ','riskLevel','Top-level\x20key\x20\x22','global','Deleted\x20`','bool','22czWuUo','Get\x20a\x20config\x20value','pretty','object','Settable\x20top-level\x20keys:\x20','validation','7188040otlcRI','\x20\x20global:\x20\x20','1072028NEsGMv','Key\x20\x22','\x20config\x20delete\x20<key>\x20[--global]','Invalid\x20value\x20for\x20\x22','list','read','9dOcUHW','args','set','Config\x20files:\x0a','\x22.\x20Allowed:\x20','stringify','../../context.js','Missing\x20key\x20argument.','2517333Ifjmlc','get','6228152BYNcLh','9074450kLhoxq','Write\x20to\x20global\x20config','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','pageSize','\x22\x20is\x20not\x20settable.','List\x20current\x20config','\x20(global)','write','pageSize\x20must\x20be\x20a\x20positive\x20number'];a14_0x5295=function(){return _0x1c0f86;};return a14_0x5295();}export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5dbdb5,_0x50fd99){var _0x556783=a15_0x4d8f,_0x27def2=_0x5dbdb5();while(!![]){try{var _0x3d87f3=-parseInt(_0x556783(0x1d3))/0x1+-parseInt(_0x556783(0x1d8))/0x2*(parseInt(_0x556783(0x1db))/0x3)+parseInt(_0x556783(0x1d4))/0x4+-parseInt(_0x556783(0x1da))/0x5+-parseInt(_0x556783(0x1d9))/0x6*(-parseInt(_0x556783(0x1d6))/0x7)+parseInt(_0x556783(0x1d7))/0x8*(-parseInt(_0x556783(0x1dc))/0x9)+parseInt(_0x556783(0x1dd))/0xa*(parseInt(_0x556783(0x1d5))/0xb);if(_0x3d87f3===_0x50fd99)break;else _0x27def2['push'](_0x27def2['shift']());}catch(_0x3d2703){_0x27def2['push'](_0x27def2['shift']());}}}(a15_0x308e,0x514e3));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x4d8f(_0x3bd717,_0x82f881){_0x3bd717=_0x3bd717-0x1d3;var _0x308ee7=a15_0x308e();var _0x4d8f32=_0x308ee7[_0x3bd717];return _0x4d8f32;}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';function a15_0x308e(){var _0x6cbb36=['14982MBcleS','47637FNiwAP','110NVeBih','487633vhFIGE','1383416SJCHdX','1615625eNawHK','54229yhvNge','760wgwiCr','264sDfTdN','426PvCBJw','2644065fZMBIb'];a15_0x308e=function(){return _0x6cbb36;};return a15_0x308e();}
|