@lovrabet/lovrabet-cli 2.0.4-beta.0 → 2.0.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/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
|
-
|
|
2
|
+
(function(_0x41d88d,_0x30a2c4){const _0x36d06b=a0_0x4e7e,_0x1d12b2=_0x41d88d();while(!![]){try{const _0x440708=parseInt(_0x36d06b(0x20b))/0x1*(parseInt(_0x36d06b(0x20e))/0x2)+parseInt(_0x36d06b(0x212))/0x3*(parseInt(_0x36d06b(0x219))/0x4)+-parseInt(_0x36d06b(0x201))/0x5+parseInt(_0x36d06b(0x1f6))/0x6*(parseInt(_0x36d06b(0x208))/0x7)+-parseInt(_0x36d06b(0x20a))/0x8*(parseInt(_0x36d06b(0x211))/0x9)+parseInt(_0x36d06b(0x1fb))/0xa*(parseInt(_0x36d06b(0x1f8))/0xb)+parseInt(_0x36d06b(0x203))/0xc*(-parseInt(_0x36d06b(0x209))/0xd);if(_0x440708===_0x30a2c4)break;else _0x1d12b2['push'](_0x1d12b2['shift']());}catch(_0x27d77b){_0x1d12b2['push'](_0x1d12b2['shift']());}}}(a0_0x5e3e,0x50adc));import{jsx as a0_0x297ac5}from'react/jsx-runtime';import a0_0x46f185 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_0x46f185(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});function a0_0x4e7e(_0x258a17,_0x4f2a0e){_0x258a17=_0x258a17-0x1f4;const _0x5e3eeb=a0_0x5e3e();let _0x4e7e5f=_0x5e3eeb[_0x258a17];return _0x4e7e5f;}void main()['catch'](handleError);async function main(){try{await run();}catch(_0x1859d4){handleError(_0x1859d4);}}function a0_0x5e3e(){const _0xc252b4=['21uvqJAp','[preparse]\x20','ERR_USE_AFTER_CLOSE','19226iIIJVh','name','cancelled','36QojgZK','2379yyPwaw','unknownCommand','defaultCommand','\x0aCancelled.\x0a','flags','flatMap','stderr','284nqBrIF','input','message','write','359274eBtgUD','Hint:\x20','2500883GZRhpp','handler','Unexpected\x20error:','10KGVVYE','log','hint','\x20->\x20--',':\x20--','error','1029795ZVTMVA','length','1908woWyWQ','help','./framework/preparse.js','exit','code','77mwtLZE','24245evAOgy','622488paQfsT'];a0_0x5e3e=function(){return _0xc252b4;};return a0_0x5e3e();}async function run(){const _0x49df51=a0_0x4e7e;let _0x250e22=cli[_0x49df51(0x21a)][0x0],_0x44129c=cli[_0x49df51(0x21a)][0x1];const _0x4525fc=cli[_0x49df51(0x216)];try{const {correctFlags:_0x549fd6}=await import(_0x49df51(0x205)),_0x2aeb98=getAllDefinitions()[_0x49df51(0x217)](_0x1f1f29=>_0x1f1f29[_0x49df51(0x216)]??[]),{flags:_0x3d9672,corrections:_0x571a53}=_0x549fd6(_0x4525fc,_0x2aeb98);if(_0x571a53[_0x49df51(0x202)]>0x0){for(const _0x5b9d4c of _0x571a53){process[_0x49df51(0x218)][_0x49df51(0x1f5)](_0x49df51(0x20c)+_0x5b9d4c[_0x49df51(0x1f9)]+_0x49df51(0x1ff)+_0x5b9d4c['original']+_0x49df51(0x1fe)+_0x5b9d4c['corrected']+'\x0a');}Object['assign'](_0x4525fc,_0x3d9672);}}catch{}if(!_0x250e22||!isKnownService(_0x250e22)){const {waitUntilExit:_0x277eea}=render(a0_0x297ac5(Help,{}));await _0x277eea();return;}const _0x59faf9=getServiceEntry(_0x250e22);if(!_0x44129c){if(_0x4525fc[_0x49df51(0x204)]){console[_0x49df51(0x1fc)](generateServiceHelp(_0x250e22));return;}if(_0x59faf9[_0x49df51(0x214)])_0x44129c=_0x59faf9[_0x49df51(0x214)];else{console[_0x49df51(0x1fc)](generateServiceHelp(_0x250e22));return;}}const _0x198d42=findDefinition(_0x250e22,_0x44129c);!_0x198d42&&(console[_0x49df51(0x1fc)](generateServiceHelp(_0x250e22)),handleError(CliErrors[_0x49df51(0x213)](_0x250e22+'\x20'+_0x44129c)));if(_0x4525fc[_0x49df51(0x204)]){console[_0x49df51(0x1fc)](generateCommandHelp(_0x198d42));return;}const _0x1f4524=buildConfigFromFlags(_0x4525fc);await initGlobalEnvironment(_0x1f4524);const _0x37dc07=createPipelineEnv(_0x1f4524,_0x4525fc);_0x37dc07['args']=cli[_0x49df51(0x21a)]['slice'](0x2),await runCommand(_0x198d42,_0x37dc07);}function handleError(_0x3d2d3e){const _0xa8e1bb=a0_0x4e7e;if(_0x3d2d3e instanceof CliError){_0x3d2d3e['code']===_0xa8e1bb(0x210)&&(process['stderr']['write'](_0xa8e1bb(0x215)),process['exit'](0x0));console['error']('Error:\x20'+_0x3d2d3e[_0xa8e1bb(0x1f4)]);if(_0x3d2d3e[_0xa8e1bb(0x1fd)])console[_0xa8e1bb(0x200)](_0xa8e1bb(0x1f7)+_0x3d2d3e[_0xa8e1bb(0x1fd)]);process[_0xa8e1bb(0x206)](_0x3d2d3e['exitCode']);}isUserCancellation(_0x3d2d3e)&&(process['stderr'][_0xa8e1bb(0x1f5)](_0xa8e1bb(0x215)),process[_0xa8e1bb(0x206)](0x0)),console[_0xa8e1bb(0x200)](_0xa8e1bb(0x1fa),_0x3d2d3e),process[_0xa8e1bb(0x206)](0x1);}function isUserCancellation(_0x1a4c47){const _0x5459a4=a0_0x4e7e;if(!(_0x1a4c47 instanceof Error))return![];if(_0x1a4c47[_0x5459a4(0x20f)]==='ExitPromptError')return!![];if(_0x1a4c47[_0x5459a4(0x207)]===_0x5459a4(0x20d))return!![];if(_0x1a4c47['code']==='ERR_STREAM_DESTROYED')return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11ad50,_0x4a07a4){const _0x3e37c9=a1_0x340a,_0x475792=_0x11ad50();while(!![]){try{const _0x5a7301=parseInt(_0x3e37c9(0x1eb))/0x1*(parseInt(_0x3e37c9(0x1e7))/0x2)+-parseInt(_0x3e37c9(0x1e4))/0x3*(-parseInt(_0x3e37c9(0x1f1))/0x4)+parseInt(_0x3e37c9(0x1e0))/0x5+-parseInt(_0x3e37c9(0x1f6))/0x6+-parseInt(_0x3e37c9(0x1ea))/0x7*(parseInt(_0x3e37c9(0x1e9))/0x8)+parseInt(_0x3e37c9(0x1e2))/0x9+-parseInt(_0x3e37c9(0x1e8))/0xa;if(_0x5a7301===_0x4a07a4)break;else _0x475792['push'](_0x475792['shift']());}catch(_0x2507af){_0x475792['push'](_0x475792['shift']());}}}(a1_0x45db,0x7b8b3));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 a1_0x45db(){const _0x15fefd=['appName','items','sha256','8132SnhoVW','ak_','isArray','update','EXDEV','838212JTEcGy','appCode','2552850KelKgx','trim','4782618grvaPa','code','1326CcWYxV','slice','cache','2636EQzLDa','11816920WMelDi','7526664jPtBVF','7FvNJrf','628wLDceA','utf8','.tmp'];a1_0x45db=function(){return _0x15fefd;};return a1_0x45db();}function fingerprintAccessKey(_0x232f1d){const _0x5972b0=a1_0x340a,_0x499d3b=_0x232f1d[_0x5972b0(0x1e1)](),_0x21cad9=_0x499d3b[_0x5972b0(0x1e5)](-0x6)||'unknown',_0x3702ed=createHash(_0x5972b0(0x1f0))[_0x5972b0(0x1f4)](_0x499d3b)['digest']('hex')[_0x5972b0(0x1e5)](0x0,0xc);return _0x5972b0(0x1f2)+_0x21cad9+'_'+_0x3702ed;}export function getAppCacheFilePath(_0x443404,_0x44836f){const _0x16a234=a1_0x340a;return resolve(homedir(),'.lovrabet',_0x16a234(0x1e6),_0x443404,fingerprintAccessKey(_0x44836f),'my-apps.json');}export function readCachedAppList(_0x36c576,_0x13ba28){const _0x4b65f8=a1_0x340a;if(!_0x13ba28?.[_0x4b65f8(0x1e1)]())return null;const _0x4e2ff9=getAppCacheFilePath(_0x36c576,_0x13ba28);if(!existsSync(_0x4e2ff9))return null;try{const _0x55ecfd=readFileSync(_0x4e2ff9,'utf8');if(!_0x55ecfd['trim']())return null;const _0x5221e2=JSON['parse'](_0x55ecfd);if(!Array[_0x4b65f8(0x1f3)](_0x5221e2[_0x4b65f8(0x1ef)]))return null;return _0x5221e2;}catch{return null;}}function a1_0x340a(_0x359bde,_0x2f0c8a){_0x359bde=_0x359bde-0x1e0;const _0x45db94=a1_0x45db();let _0x340aa7=_0x45db94[_0x359bde];return _0x340aa7;}export function writeCachedAppList(_0x275ee8,_0x157ced,_0x82a6c3){const _0x564df4=a1_0x340a,_0x333c6b=getAppCacheFilePath(_0x275ee8,_0x157ced),_0x4490eb=dirname(_0x333c6b);!existsSync(_0x4490eb)&&mkdirSync(_0x4490eb,{'recursive':!![]});const _0x4dc680=_0x333c6b+_0x564df4(0x1ed);try{writeFileSync(_0x4dc680,JSON['stringify'](_0x82a6c3,null,0x2)+'\x0a',{'encoding':_0x564df4(0x1ec),'mode':0x180});try{renameSync(_0x4dc680,_0x333c6b);}catch(_0x34f012){if(_0x34f012[_0x564df4(0x1e3)]==='EPERM'||_0x34f012['code']===_0x564df4(0x1f5)||_0x34f012[_0x564df4(0x1e3)]==='EACCES'){writeFileSync(_0x333c6b,JSON['stringify'](_0x82a6c3,null,0x2)+'\x0a',{'encoding':_0x564df4(0x1ec)});try{unlinkSync(_0x4dc680);}catch{}}else throw _0x34f012;}}catch(_0x17895f){try{unlinkSync(_0x4dc680);}catch{}throw _0x17895f;}return _0x333c6b;}export function resolveCachedAppCode(_0x207abb,_0x25226a,_0x1fd4cf){const _0x489d76=a1_0x340a;if(!_0x207abb)return undefined;const _0x234ba6=readCachedAppList(_0x25226a,_0x1fd4cf),_0x32276c=_0x234ba6?.[_0x489d76(0x1ef)]['find'](_0x32ff06=>_0x32ff06[_0x489d76(0x1ee)]===_0x207abb);return _0x32276c?.[_0x489d76(0x1f7)]?.[_0x489d76(0x1e1)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a2_0x2613(){const _0x301266=['Missing\x20app\x20name.','validation','appName','\x20app\x20use\x20<name>\x20[--global]','No\x20cached\x20apps\x20found.','from','local','\x20app(s)\x20for\x20env=\x22','map','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','2752347CTBWjT','bool','3851960TDcEwV','production','../../commands/app/cache.js','Switch\x20the\x20default\x20app','app','write','args','Target\x20environment\x20(default:\x20current\x20env)','Available:\x20','131798XOsulb','isCurrent','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','7QUyfXB','Usage:\x20','init','Refreshed\x20app\x20cache\x20with\x20','mergedCli','603dzlaXi','defaultApp','remote','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','fetchedAt','cachePath','boolean','pull','nonInteractive','accessKey','App\x20\x22','appOwnerName','project-default','22SGxUMC','6766386tYoqZl','appCode','source','global','string','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','length','cache','no-cache','Remote\x20app\x20name\x20to\x20activate','appPublishStatus','globalPath','list','envName','type','items','7308785ihXaWG','projectPath','../../context.js','Filter\x20by\x20environment\x20(default:\x20current\x20env)','find','128430LlFBzo','Initialize\x20.lovrabet.json\x20config\x20file','Default\x20app\x20set\x20to\x20\x22','../../commands/app/remote-source.js','name','env','No\x20apps\x20found\x20on\x20the\x20platform.','Read\x20app\x20list\x20from\x20local\x20cache\x20only','\x22\x20not\x20found.','str','2472444PlQhiG','read'];a2_0x2613=function(){return _0x301266;};return a2_0x2613();}const a2_0x56976f=a2_0x49c2;(function(_0xe6a228,_0x2b19a6){const _0x5ec3f8=a2_0x49c2,_0x4b24ec=_0xe6a228();while(!![]){try{const _0xf679a=parseInt(_0x5ec3f8(0x1b4))/0x1*(-parseInt(_0x5ec3f8(0x1c9))/0x2)+parseInt(_0x5ec3f8(0x1f5))/0x3+parseInt(_0x5ec3f8(0x1e9))/0x4+parseInt(_0x5ec3f8(0x1da))/0x5+parseInt(_0x5ec3f8(0x1ca))/0x6*(-parseInt(_0x5ec3f8(0x1b7))/0x7)+-parseInt(_0x5ec3f8(0x1ab))/0x8+parseInt(_0x5ec3f8(0x1bc))/0x9*(parseInt(_0x5ec3f8(0x1df))/0xa);if(_0xf679a===_0x2b19a6)break;else _0x4b24ec['push'](_0x4b24ec['shift']());}catch(_0x57cf87){_0x4b24ec['push'](_0x4b24ec['shift']());}}}(a2_0x2613,0xc304a));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';function a2_0x49c2(_0xe26b04,_0x1f85ca){_0xe26b04=_0xe26b04-0x1ab;const _0x2613cf=a2_0x2613();let _0x49c217=_0x2613cf[_0xe26b04];return _0x49c217;}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_0x56976f(0x1cd),'type':a2_0x56976f(0x1c2),'description':'Use\x20global\x20config\x20scope','default':![]};function collectFlags(_0x5aecc9,_0x3389f6){const _0x6e2da=a2_0x56976f,_0x103bf1={};for(const _0x2fecc4 of _0x3389f6){const _0x3c16f9=_0x2fecc4[_0x6e2da(0x1d8)]==='boolean'?_0x5aecc9[_0x6e2da(0x1f6)](_0x2fecc4[_0x6e2da(0x1e3)]):_0x5aecc9[_0x6e2da(0x1e8)](_0x2fecc4['name']);if(_0x3c16f9!==''&&_0x3c16f9!==![])_0x103bf1[_0x2fecc4[_0x6e2da(0x1e3)]]=_0x3c16f9;}if(_0x5aecc9[_0x6e2da(0x1c4)])_0x103bf1['nonInteractive']=!![];return _0x103bf1;}const initDef={'service':a2_0x56976f(0x1af),'command':a2_0x56976f(0x1b9),'description':a2_0x56976f(0x1e0),'risk':a2_0x56976f(0x1b0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x27f1aa){return await runInit(collectFlags(_0x27f1aa,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x56976f(0x1af),'command':a2_0x56976f(0x1d6),'description':a2_0x56976f(0x1b6),'risk':a2_0x56976f(0x1ea),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a2_0x56976f(0x1e4),'type':a2_0x56976f(0x1ce),'description':a2_0x56976f(0x1dd),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x56976f(0x1f1),'type':a2_0x56976f(0x1c2),'description':a2_0x56976f(0x1e6),'default':![]},{'name':a2_0x56976f(0x1d2),'type':a2_0x56976f(0x1c2),'description':a2_0x56976f(0x1bf),'default':![]}],async 'execute'(_0x4ac5e0){const _0x94a900=a2_0x56976f,_0x37f6f9=_0x4ac5e0[_0x94a900(0x1e8)]('env')||_0x4ac5e0[_0x94a900(0x1d7)]||getEnv()||_0x94a900(0x1ac),_0x214fd5=_0x4ac5e0[_0x94a900(0x1f6)](_0x94a900(0x1f1)),_0x205505=_0x4ac5e0[_0x94a900(0x1f6)](_0x94a900(0x1d2)),{readRawConfigWithLayers:_0x1e4a0e,resolveDefaultAppSource:_0x4e70e4}=await import(_0x94a900(0x1dc)),{getRemoteAppList:_0x2e3d44}=await import(_0x94a900(0x1e2)),{config:_0x54bc23,layers:_0x2be851}=_0x1e4a0e(),_0x54bb66=_0x4e70e4(_0x2be851),{defaultApp:_0x18634d}=_0x54bc23,_0x1e00df=await _0x2e3d44({'env':_0x37f6f9,'accessKey':_0x4ac5e0[_0x94a900(0x1c5)],'localOnly':_0x214fd5,'noCache':_0x205505}),_0x35df25=_0x1e00df[_0x94a900(0x1d9)][_0x94a900(0x1f3)](_0x54c8c7=>{const _0x4739c9=_0x94a900;return{'name':_0x54c8c7[_0x4739c9(0x1ed)],'appcode':_0x54c8c7[_0x4739c9(0x1cb)],'named':!![],'definedIn':_0x4739c9(0x1be),'isDefault':_0x54c8c7[_0x4739c9(0x1ed)]===_0x18634d,...buildAppProfileListFields(_0x37f6f9),'source':_0x1e00df[_0x4739c9(0x1cc)],'owner':_0x54c8c7[_0x4739c9(0x1c7)]??null,'status':_0x54c8c7[_0x4739c9(0x1d4)]??null,'cachedAt':_0x1e00df['fetchedAt']};});enrichAppListItemsWithMergedSelection(_0x35df25,_0x4ac5e0[_0x94a900(0x1bb)]);if(_0x35df25[_0x94a900(0x1d0)]===0x0)return{'ok':!![],'data':[],'message':_0x1e00df[_0x94a900(0x1cc)]===_0x94a900(0x1d1)?_0x94a900(0x1ef):_0x94a900(0x1e5)};const _0x35b101=_0x35df25['find'](_0x31e329=>_0x31e329[_0x94a900(0x1b5)]===!![]),_0x358547=_0x18634d??_0x35b101?.[_0x94a900(0x1e3)]??null,_0x3cce07={'env':_0x37f6f9,'source':_0x1e00df[_0x94a900(0x1cc)],'fetchedAt':_0x1e00df['fetchedAt'],'cachePath':_0x1e00df[_0x94a900(0x1c1)],'globalPath':_0x2be851[_0x94a900(0x1d5)]??null,'projectPath':_0x2be851[_0x94a900(0x1db)]??null,'defaultApp':_0x358547,'defaultAppSource':_0x18634d!=null?_0x54bb66:null};return{'ok':!![],'data':{'items':_0x35df25,'meta':_0x3cce07}};}},pullDef={'service':a2_0x56976f(0x1af),'command':a2_0x56976f(0x1c3),'description':a2_0x56976f(0x1f4),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x56976f(0x1e4),'type':'string','description':a2_0x56976f(0x1b2),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x56976f(0x1f1),'type':a2_0x56976f(0x1c2),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x56976f(0x1d2),'type':a2_0x56976f(0x1c2),'description':a2_0x56976f(0x1bf),'default':![]}],async 'execute'(_0x4f9ac9){const _0x2995e0=a2_0x56976f,_0x2e3ce3=_0x4f9ac9[_0x2995e0(0x1e8)](_0x2995e0(0x1e4))||_0x4f9ac9[_0x2995e0(0x1d7)]||getEnv()||'production',_0x1ec97e=_0x4f9ac9[_0x2995e0(0x1f6)](_0x2995e0(0x1f1)),_0x2454f6=_0x4f9ac9[_0x2995e0(0x1f6)](_0x2995e0(0x1d2)),{getRemoteAppList:_0x159385}=await import(_0x2995e0(0x1e2)),_0x3803b9=await _0x159385({'env':_0x2e3ce3,'accessKey':_0x4f9ac9['accessKey'],'localOnly':_0x1ec97e,'noCache':_0x2454f6});return{'ok':!![],'data':{'total':_0x3803b9['items'][_0x2995e0(0x1d0)],'env':_0x2e3ce3,'source':_0x3803b9[_0x2995e0(0x1cc)],'fetchedAt':_0x3803b9[_0x2995e0(0x1c0)],'cachePath':_0x3803b9[_0x2995e0(0x1c1)]},'message':_0x3803b9[_0x2995e0(0x1cc)]==='cache'?'Loaded\x20'+_0x3803b9[_0x2995e0(0x1d9)]['length']+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x2e3ce3+'\x22.':_0x2995e0(0x1ba)+_0x3803b9[_0x2995e0(0x1d9)][_0x2995e0(0x1d0)]+_0x2995e0(0x1f2)+_0x2e3ce3+'\x22.'};}},useDef={'service':a2_0x56976f(0x1af),'command':'use','description':a2_0x56976f(0x1ae),'risk':a2_0x56976f(0x1b0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':a2_0x56976f(0x1d3),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x1f7a44){const _0x590b2c=a2_0x56976f;if(!_0x1f7a44[_0x590b2c(0x1b1)][0x0])throw CliErrors['validation']('Missing\x20app\x20name.',_0x590b2c(0x1b8)+CLI_BIN_NAME+_0x590b2c(0x1ee));},async 'execute'(_0x3fb19e){const _0x407351=a2_0x56976f,_0x3d70a4=_0x3fb19e['args'][0x0];if(!_0x3d70a4)throw CliErrors[_0x407351(0x1ec)](_0x407351(0x1eb),'Usage:\x20'+CLI_BIN_NAME+_0x407351(0x1ee));const {buildConfigFromFlags:_0x5494ef}=await import(_0x407351(0x1dc)),{readCachedAppList:_0x374c64}=await import(_0x407351(0x1ad)),_0x5397af=_0x5494ef({}),_0x7432de=_0x374c64(_0x5397af[_0x407351(0x1e4)],_0x5397af[_0x407351(0x1c5)]),_0x94363=_0x7432de?.[_0x407351(0x1d9)][_0x407351(0x1de)](_0x4ac5d0=>_0x4ac5d0['appName']===_0x3d70a4);if(!_0x94363&&_0x5397af[_0x407351(0x1bd)]!==_0x3d70a4){const _0x4c013e=[..._0x7432de?.[_0x407351(0x1d9)][_0x407351(0x1f3)](_0x575fbc=>_0x575fbc[_0x407351(0x1ed)])??[]],_0x5311e9=_0x4c013e[_0x407351(0x1d0)]===0x0?'Use\x20`'+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps.':_0x407351(0x1b3)+Array[_0x407351(0x1f0)](new Set(_0x4c013e))['join'](',\x20');throw CliErrors[_0x407351(0x1ec)](_0x407351(0x1c6)+_0x3d70a4+_0x407351(0x1e7),_0x5311e9);}const _0x35591a=_0x3fb19e[_0x407351(0x1f6)](_0x407351(0x1cd));let _0xd63d7f;if(_0x35591a)_0xd63d7f={'global':!![]};else{const {isInProject:_0x17270d}=await import('../../context.js'),_0x2049c1=_0x17270d();_0xd63d7f=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x407351(0x1c8),'inProject':_0x2049c1}));}const _0x1c8076=readConfig(_0xd63d7f);return _0x1c8076[_0x407351(0x1bd)]=_0x3d70a4,writeConfig(_0x1c8076,_0xd63d7f),{'ok':!![],'message':_0x407351(0x1e1)+_0x3d70a4+'\x22'+scopeLabel(_0xd63d7f)+'.'};}},importDef={'service':a2_0x56976f(0x1af),'command':'import','description':a2_0x56976f(0x1cf),'risk':a2_0x56976f(0x1b0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x5cd7e4){return await runInitImport(collectFlags(_0x5cd7e4,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5358c5,_0x45378a){const _0x44d2e8=a3_0x1e6e,_0x183424=_0x5358c5();while(!![]){try{const _0x16a045=-parseInt(_0x44d2e8(0x117))/0x1*(-parseInt(_0x44d2e8(0x111))/0x2)+-parseInt(_0x44d2e8(0x112))/0x3*(parseInt(_0x44d2e8(0x116))/0x4)+parseInt(_0x44d2e8(0x11d))/0x5*(-parseInt(_0x44d2e8(0x11b))/0x6)+parseInt(_0x44d2e8(0x123))/0x7*(parseInt(_0x44d2e8(0x122))/0x8)+parseInt(_0x44d2e8(0x119))/0x9*(-parseInt(_0x44d2e8(0x120))/0xa)+parseInt(_0x44d2e8(0x121))/0xb*(-parseInt(_0x44d2e8(0x11c))/0xc)+parseInt(_0x44d2e8(0x113))/0xd*(parseInt(_0x44d2e8(0x110))/0xe);if(_0x16a045===_0x45378a)break;else _0x183424['push'](_0x183424['shift']());}catch(_0x3f902e){_0x183424['push'](_0x183424['shift']());}}}(a3_0x550e,0x937cd));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x19d68f=a3_0x1e6e,_0x17e451=join(__dirname,_0x19d68f(0x10f)),_0x37e0a1=readFileSync(_0x17e451,_0x19d68f(0x118));return JSON[_0x19d68f(0x114)](_0x37e0a1);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}function a3_0x1e6e(_0x22ea9d,_0x1f5672){_0x22ea9d=_0x22ea9d-0x10f;const _0x550ef2=a3_0x550e();let _0x1e6e95=_0x550ef2[_0x22ea9d];return _0x1e6e95;}export function getMockRemoteAppItems(){const _0x723bd9=a3_0x1e6e,_0x274f09=getMockAppList();if(!_0x274f09[_0x723bd9(0x11a)])throw new Error(_0x723bd9(0x11f)+_0x274f09[_0x723bd9(0x115)]+'\x20('+_0x274f09['errorCode']+')');return _0x274f09['data'][_0x723bd9(0x11e)];}function a3_0x550e(){const _0x3ddb01=['2480056OaKzrI','14EBmtOn','../../../mock/app-list.json','27464570XXsWZD','449924WXGZkp','3TqUBht','13ZtrAzy','parse','errorMsg','2236412Epltof','1uCIKqX','utf-8','1341YRXgzE','success','54BStzzh','2707812JyhigW','394355EQxdzp','tableData','Mock\x20API\x20error:\x20','17230gcRABh','33aEzsoU'];a3_0x550e=function(){return _0x3ddb01;};return a3_0x550e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x106128,_0x17d5ff){const _0x45e420=a4_0x2745,_0x102c3e=_0x106128();while(!![]){try{const _0x3e51b8=parseInt(_0x45e420(0x167))/0x1*(-parseInt(_0x45e420(0x165))/0x2)+-parseInt(_0x45e420(0x16f))/0x3+-parseInt(_0x45e420(0x164))/0x4+parseInt(_0x45e420(0x166))/0x5+-parseInt(_0x45e420(0x16b))/0x6+parseInt(_0x45e420(0x163))/0x7+parseInt(_0x45e420(0x161))/0x8;if(_0x3e51b8===_0x17d5ff)break;else _0x102c3e['push'](_0x102c3e['shift']());}catch(_0x4cb4a5){_0x102c3e['push'](_0x102c3e['shift']());}}}(a4_0x3171,0xc8745));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 _0x5b4b62=a4_0x2745,_0xefd541=(process.env.LOVRABET_APP_LIST_SOURCE||process.env.RABETBASE_APP_LIST_SOURCE||'')[_0x5b4b62(0x16a)]()[_0x5b4b62(0x162)]();return _0xefd541==='mock';}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a4_0x2745(_0x35051a,_0x5ac7ac){_0x35051a=_0x35051a-0x161;const _0x3171c1=a4_0x3171();let _0x2745e1=_0x3171c1[_0x35051a];return _0x2745e1;}export async function getRemoteAppList(_0x391e1e){const _0x1ecf3e=a4_0x2745,{env:_0x223190,accessKey:_0x13d3fc,localOnly:localOnly=![],noCache:noCache=![]}=_0x391e1e,_0x58c5e2=readCachedAppList(_0x223190,_0x13d3fc),_0x3a7f23=_0x13d3fc?.[_0x1ecf3e(0x16a)]()?getAppCacheFilePath(_0x223190,_0x13d3fc):null;if(localOnly)return{'items':_0x58c5e2?.[_0x1ecf3e(0x16c)]??[],'source':_0x1ecf3e(0x16e),'fetchedAt':_0x58c5e2?.['fetchedAt']??null,'cachePath':_0x3a7f23};try{const _0x3497eb=await getRemoteAppItems(),_0x7ba3f=shouldUseMockRemoteApps()?_0x1ecf3e(0x168):_0x1ecf3e(0x16d),_0x5d7a15=new Date()[_0x1ecf3e(0x169)](),_0x29b20f=_0x13d3fc?.[_0x1ecf3e(0x16a)]()?writeCachedAppList(_0x223190,_0x13d3fc,{'env':_0x223190,'fetchedAt':_0x5d7a15,'source':_0x7ba3f,'items':_0x3497eb}):null;return{'items':_0x3497eb,'source':_0x7ba3f,'fetchedAt':_0x5d7a15,'cachePath':_0x29b20f};}catch(_0x534745){if(!noCache&&_0x58c5e2)return{'items':_0x58c5e2[_0x1ecf3e(0x16c)],'source':_0x1ecf3e(0x16e),'fetchedAt':_0x58c5e2['fetchedAt'],'cachePath':_0x3a7f23};throw _0x534745;}}function a4_0x3171(){const _0x48241e=['17780704KzwOMv','toLowerCase','6411853jwfFfl','1453092UpNUyN','452pSTvGu','3487725ntOgvc','5098xxkRAw','mock','toISOString','trim','7335354xguCkz','items','remote','cache','831213CcezTZ'];a4_0x3171=function(){return _0x48241e;};return a4_0x3171();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x177827,_0x2485d9){const _0x500100=a5_0x23ca,_0x579bbf=_0x177827();while(!![]){try{const _0x59ef7e=parseInt(_0x500100(0x16d))/0x1+-parseInt(_0x500100(0x164))/0x2+parseInt(_0x500100(0x166))/0x3+-parseInt(_0x500100(0x16e))/0x4*(parseInt(_0x500100(0x16c))/0x5)+-parseInt(_0x500100(0x165))/0x6+-parseInt(_0x500100(0x168))/0x7*(parseInt(_0x500100(0x167))/0x8)+parseInt(_0x500100(0x16f))/0x9;if(_0x59ef7e===_0x2485d9)break;else _0x579bbf['push'](_0x579bbf['shift']());}catch(_0x24ceff){_0x579bbf['push'](_0x579bbf['shift']());}}}(a5_0x5b06,0xeff50));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';function a5_0x23ca(_0x4718cd,_0x17e855){_0x4718cd=_0x4718cd-0x163;const _0x5b060b=a5_0x5b06();let _0x23ca33=_0x5b060b[_0x4718cd];return _0x23ca33;}export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x9e885c,_0x4f4a00){const _0x46c239=a5_0x23ca;if(!_0x4f4a00)return;const _0x2ff93e=!!(_0x4f4a00[_0x46c239(0x170)]??_0x4f4a00[_0x46c239(0x163)]);for(const _0x43f00c of _0x9e885c){_0x43f00c[_0x46c239(0x169)]=![];}const _0x142e2a=_0x4f4a00[_0x46c239(0x16a)]!=null?String(_0x4f4a00['appCode'])[_0x46c239(0x171)]():'';if(_0x2ff93e){const _0x86b557=_0x4f4a00[_0x46c239(0x170)]??_0x4f4a00['defaultApp'];if(_0x86b557)for(const _0x58d2b9 of _0x9e885c){_0x58d2b9[_0x46c239(0x174)]===!![]&&_0x58d2b9[_0x46c239(0x172)]===_0x86b557&&(_0x58d2b9[_0x46c239(0x169)]=!![]);}return;}if(!_0x142e2a)return;for(const _0x35164e of _0x9e885c){String(_0x35164e[_0x46c239(0x173)]??'')['trim']()===_0x142e2a&&(_0x35164e[_0x46c239(0x169)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';function a5_0x5b06(){const _0x535e12=['global','10zffwIj','1054918IdXxbi','456784utzabS','14942934ufEJpD','currentApp','trim','name','appcode','named','defaultApp','1683922uWrbis','4735998KzwveC','2555184kyKkGf','5795376NZHght','7FKUkVi','isCurrent','appCode'];a5_0x5b06=function(){return _0x535e12;};return a5_0x5b06();}export function scopeLabel(_0x2ad9ae){const _0x49737f=a5_0x23ca;return formatScopeLabel(_0x2ad9ae[_0x49737f(0x16b)]?_0x49737f(0x16b):'project');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a6_0x1061(){const _0x4865b4=['\x20doctor','No\x20AccessKey\x20found\x20in\x20','AccessKey\x20saved\x20to\x20','repeat','730717paBhoX','access-key','194696lzHDbb','AccessKey\x20(ak_xxx...)','login','10mKbRCU','LOVRABET_ACCESS_KEY\x20env\x20var','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','production','Read\x20from\x20global\x20config\x20(default)','Then\x20verify\x20with:\x20','108424MBwuYx','Option\x20C:\x20environment\x20variable','11826uxYeBf','boolean','daily','project','length','644egSUcK','trim','logout','Write\x20to\x20global\x20config\x20(default)','\x20config.','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','nonInteractive','write','15lXiHRk','env','\x20config.\x20Nothing\x20to\x20clear.','14HVDSRj','Then\x20run:\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','\x20(via\x20','validation','test','AccessKey:\x20','Show\x20current\x20authentication\x20status','\x20config','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','envName','Missing\x20accessKey.','Clear\x20accessKey\x20from\x20config','ClientAk','Auth\x20mode:\x20','Auth\x20config\x20reinitialized\x20in\x20','init','string','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','read','auth','\x20Verify:\x20','join','\x20Current\x20env:\x20','Shorthand\x20for\x20--access-key','Option\x20B:\x20apps\x20config\x20(.lovrabet.json)','721RqXOcr','Create\x20one\x20in\x20Lovrabet\x20User\x20Center:\x20','\x20auth\x20status','push','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','4117692VrZBTG','bool','info','103458MwmHjr','global','Invalid\x20accessKey\x20format:\x20\x22','accessKey','162772qxdNoM','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','str','slice','\x20scope.','22RtGUol','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Clear\x20from\x20global\x20config\x20(default)','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','4340tRFmIG'];a6_0x1061=function(){return _0x4865b4;};return a6_0x1061();}const a6_0x38d8f2=a6_0x5307;(function(_0x1aa499,_0xaf2953){const _0x36a1c8=a6_0x5307,_0x1efa86=_0x1aa499();while(!![]){try{const _0x4cdf3d=parseInt(_0x36a1c8(0xb4))/0x1*(-parseInt(_0x36a1c8(0xcf))/0x2)+-parseInt(_0x36a1c8(0xcc))/0x3*(parseInt(_0x36a1c8(0xf5))/0x4)+-parseInt(_0x36a1c8(0xb7))/0x5*(-parseInt(_0x36a1c8(0xf1))/0x6)+parseInt(_0x36a1c8(0xe9))/0x7*(-parseInt(_0x36a1c8(0xbd))/0x8)+parseInt(_0x36a1c8(0xbf))/0x9*(parseInt(_0x36a1c8(0xfe))/0xa)+-parseInt(_0x36a1c8(0xfa))/0xb*(-parseInt(_0x36a1c8(0xee))/0xc)+parseInt(_0x36a1c8(0xb2))/0xd*(parseInt(_0x36a1c8(0xc4))/0xe);if(_0x4cdf3d===_0xaf2953)break;else _0x1efa86['push'](_0x1efa86['shift']());}catch(_0x34b994){_0x1efa86['push'](_0x1efa86['shift']());}}}(a6_0x1061,0xdf3ba));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';function a6_0x5307(_0x17b767,_0x3eed80){_0x17b767=_0x17b767-0xb1;const _0x10613e=a6_0x1061();let _0x530707=_0x10613e[_0x17b767];return _0x530707;}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(){writeCliSideChannelLine('AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20Lovrabet\x20User\x20Center:'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a');}function resolveAuthScopeFlags(_0x43b6c7){const _0x4fe9f1=a6_0x5307;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x43b6c7[_0x4fe9f1(0xef)](_0x4fe9f1(0xf2)),'explicitProject':_0x43b6c7[_0x4fe9f1(0xef)]('project'),'policy':'global-default'}));}async function resolveAuthWriteInput(_0x749b49){const _0x1bd50f=a6_0x5307;let _0x3c373e=(_0x749b49['str'](_0x1bd50f(0xb3))||_0x749b49[_0x1bd50f(0xf7)]('ak')||'')[_0x1bd50f(0xc5)]();const _0x48d677=(_0x749b49[_0x1bd50f(0xf7)](_0x1bd50f(0xcd))||'')[_0x1bd50f(0xc5)]();if(!_0x3c373e&&!_0x749b49[_0x1bd50f(0xca)])try{showAccessKeyCreateHint(),_0x3c373e=await promptAccessKey('');}catch(_0x70f8e){if(isAbortPrompt(_0x70f8e))throw CliErrors['cancelled']();throw _0x70f8e;}if(!_0x3c373e)throw CliErrors[_0x1bd50f(0xd3)](_0x1bd50f(0xda),[_0x1bd50f(0xea)+USER_ACCESS_KEY_CREATE_URL,_0x1bd50f(0xd0)+CLI_BIN_NAME+_0x1bd50f(0xd1)][_0x1bd50f(0xe5)]('\x0a'));if(!ACCESS_KEY_PATTERN[_0x1bd50f(0xd4)](_0x3c373e))throw CliErrors[_0x1bd50f(0xd3)](_0x1bd50f(0xf3)+_0x3c373e+'\x22',_0x1bd50f(0xfd));if(!_0x48d677)return{'accessKey':_0x3c373e};const _0x79a1d8=normalizeEnv(_0x48d677);return{'accessKey':_0x3c373e,'env':isDaily(_0x79a1d8)?_0x1bd50f(0xc1):isDev(_0x79a1d8)?'development':'production'};}export const authDefinitions=[{'service':a6_0x38d8f2(0xe3),'command':a6_0x38d8f2(0xb6),'description':a6_0x38d8f2(0xd8),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x38d8f2(0xb3),'type':'string','description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a6_0x38d8f2(0xe0),'description':a6_0x38d8f2(0xe7)},{'name':a6_0x38d8f2(0xf2),'type':a6_0x38d8f2(0xc0),'description':a6_0x38d8f2(0xc7),'default':!![]},{'name':a6_0x38d8f2(0xc2),'type':a6_0x38d8f2(0xc0),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x5be6a6){const _0x430a42=a6_0x38d8f2,_0x32ca9c=await resolveAuthWriteInput(_0x5be6a6),_0x25a87d=resolveAuthScopeFlags(_0x5be6a6),_0x4b4a51=readScopedConfig(_0x25a87d);_0x4b4a51[_0x430a42(0xf4)]=_0x32ca9c['accessKey'];_0x32ca9c['env']&&(_0x4b4a51[_0x430a42(0xcd)]=_0x32ca9c[_0x430a42(0xcd)]);writeScopedConfig(_0x4b4a51,_0x25a87d);const _0x596cc5=_0x25a87d[_0x430a42(0xf2)]?'global':_0x430a42(0xc2),_0x2e6845=_0x4b4a51[_0x430a42(0xcd)]?'\x20Current\x20env:\x20'+_0x4b4a51[_0x430a42(0xcd)]+'.':'';return{'ok':!![],'message':_0x430a42(0x101)+_0x596cc5+_0x430a42(0xc8)+_0x2e6845+'\x20Verify:\x20'+CLI_BIN_NAME+_0x430a42(0xeb)};}},{'service':a6_0x38d8f2(0xe3),'command':a6_0x38d8f2(0xdf),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a6_0x38d8f2(0xcb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a6_0x38d8f2(0xe0),'description':a6_0x38d8f2(0xb5)},{'name':'ak','type':a6_0x38d8f2(0xe0),'description':a6_0x38d8f2(0xe7)},{'name':a6_0x38d8f2(0xcd),'type':a6_0x38d8f2(0xe0),'description':a6_0x38d8f2(0xc9)},{'name':'global','type':a6_0x38d8f2(0xc0),'description':a6_0x38d8f2(0xc7),'default':!![]},{'name':a6_0x38d8f2(0xc2),'type':a6_0x38d8f2(0xc0),'description':'Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x16c78a){const _0x502ed1=a6_0x38d8f2,_0x114b6d=await resolveAuthWriteInput(_0x16c78a),_0x5e2743=resolveAuthScopeFlags(_0x16c78a),_0x5d33fe={'accessKey':_0x114b6d[_0x502ed1(0xf4)]};_0x114b6d['env']&&(_0x5d33fe[_0x502ed1(0xcd)]=_0x114b6d['env']);writeScopedConfig(_0x5d33fe,_0x5e2743);const _0x3aebd7=_0x5e2743[_0x502ed1(0xf2)]?'global':_0x502ed1(0xc2),_0xa76485=_0x5d33fe[_0x502ed1(0xcd)]?_0x502ed1(0xe6)+_0x5d33fe[_0x502ed1(0xcd)]+'.':'';return{'ok':!![],'message':_0x502ed1(0xde)+_0x3aebd7+_0x502ed1(0xf9)+_0xa76485+_0x502ed1(0xe4)+CLI_BIN_NAME+_0x502ed1(0xeb)};}},{'service':a6_0x38d8f2(0xe3),'command':a6_0x38d8f2(0xc6),'description':a6_0x38d8f2(0xdb),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x38d8f2(0xf2),'type':'boolean','description':a6_0x38d8f2(0xfc),'default':!![]},{'name':'project','type':'boolean','description':a6_0x38d8f2(0xfb),'default':![]}],async 'execute'(_0x3b8c00){const _0x36dff1=a6_0x38d8f2,_0x1c8dbc=resolveAuthScopeFlags(_0x3b8c00),_0x5e8dd0=readScopedConfig(_0x1c8dbc),_0x8a8efa=!!_0x5e8dd0[_0x36dff1(0xf4)];delete _0x5e8dd0[_0x36dff1(0xf4)],writeScopedConfig(_0x5e8dd0,_0x1c8dbc);const _0x2cf397=_0x1c8dbc[_0x36dff1(0xf2)]?_0x36dff1(0xf2):_0x36dff1(0xc2);if(_0x8a8efa)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0x2cf397+_0x36dff1(0xc8)};return{'ok':!![],'message':_0x36dff1(0x100)+_0x2cf397+_0x36dff1(0xce)};}},{'service':'auth','command':'status','description':a6_0x38d8f2(0xd6),'risk':a6_0x38d8f2(0xe2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x38d8f2(0xf2),'type':'boolean','description':a6_0x38d8f2(0xbb),'default':!![]},{'name':a6_0x38d8f2(0xc2),'type':a6_0x38d8f2(0xc0),'description':a6_0x38d8f2(0xe1),'default':![]}],async 'execute'(_0x1bd3d3){const _0x20162d=a6_0x38d8f2,_0x3c05d2=resolveAuthScopeFlags(_0x1bd3d3),_0x5ac91b=readScopedConfig(_0x3c05d2),_0x193829=process.env.LOVRABET_ACCESS_KEY||undefined,_0x300dd1=_0x5ac91b[_0x20162d(0xf4)]||undefined,_0x659be0=_0x193829||_0x300dd1,_0x293f35=_0x193829?_0x20162d(0xb8):_0x300dd1?(_0x3c05d2[_0x20162d(0xf2)]?_0x20162d(0xf2):'project')+_0x20162d(0xd7):null,_0x2f3541=[_0x20162d(0xdd)+AUTH_MODE[_0x20162d(0xdc)]];if(_0x659be0){const _0x356a79=_0x659be0[_0x20162d(0xc3)]>0x8?''+_0x659be0[_0x20162d(0xf8)](0x0,0x8)+'*'[_0x20162d(0xb1)](_0x659be0[_0x20162d(0xc3)]-0x8):_0x659be0;_0x2f3541[_0x20162d(0xec)](_0x20162d(0xd5)+_0x356a79+(_0x293f35?_0x20162d(0xd2)+_0x293f35+')':''));}return!_0x659be0&&(_0x2f3541[_0x20162d(0xec)](''),_0x2f3541[_0x20162d(0xec)](_0x20162d(0xb9)),_0x2f3541['push'](''),_0x2f3541[_0x20162d(0xec)]('Option\x20A:\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]'),_0x2f3541[_0x20162d(0xec)](''),_0x2f3541[_0x20162d(0xec)](_0x20162d(0xe8)),_0x2f3541[_0x20162d(0xec)](_0x20162d(0xed)),_0x2f3541[_0x20162d(0xec)](''),_0x2f3541['push'](_0x20162d(0xbe)),_0x2f3541[_0x20162d(0xec)]('\x20\x20export\x20LOVRABET_ACCESS_KEY=ak_xxx'),_0x2f3541[_0x20162d(0xec)](''),_0x2f3541[_0x20162d(0xec)](_0x20162d(0xbc)+CLI_BIN_NAME+_0x20162d(0xeb)),_0x2f3541[_0x20162d(0xec)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x20162d(0xff))),{'ok':!![],'message':_0x2f3541[_0x20162d(0xe5)]('\x0a')};}},{'service':'auth','command':a6_0x38d8f2(0xf0),'description':a6_0x38d8f2(0xf6),'risk':a6_0x38d8f2(0xe2),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x880b23){const _0x58be9b=a6_0x38d8f2,_0x16e97e=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x16e97e,'meta':{'env':_0x880b23[_0x58be9b(0xd9)]??_0x58be9b(0xba)}}};}}];
|
|
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 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x560193,_0x278fa7){const _0x2f3681=a7_0x347a,_0x4b172f=_0x560193();while(!![]){try{const _0x4b72f7=parseInt(_0x2f3681(0x87))/0x1+-parseInt(_0x2f3681(0x7f))/0x2*(parseInt(_0x2f3681(0x8a))/0x3)+-parseInt(_0x2f3681(0x7c))/0x4+-parseInt(_0x2f3681(0x86))/0x5*(-parseInt(_0x2f3681(0x84))/0x6)+parseInt(_0x2f3681(0x83))/0x7*(-parseInt(_0x2f3681(0x8b))/0x8)+parseInt(_0x2f3681(0x8c))/0x9+-parseInt(_0x2f3681(0x7d))/0xa*(parseInt(_0x2f3681(0x88))/0xb);if(_0x4b72f7===_0x278fa7)break;else _0x4b172f['push'](_0x4b172f['shift']());}catch(_0x17365b){_0x4b172f['push'](_0x4b172f['shift']());}}}(a7_0x41c1,0x1ec13));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x67e00d=a7_0x347a;super('User\x20aborted\x20prompt'),this[_0x67e00d(0x7b)]=_0x67e00d(0x85);}}function createSafeRl(){const _0x436883=createInterface({'input':process['stdin'],'output':process['stdout']});let _0x5d107f;const _0x2674e9=new Promise((_0x5a63d1,_0x4efd7a)=>{const _0x178780=a7_0x347a;_0x5d107f=()=>{const _0x4c51bf=a7_0x347a;_0x5d107f&&(_0x436883[_0x4c51bf(0x90)](_0x4c51bf(0x7e),_0x5d107f),_0x5d107f=undefined);try{_0x436883['close']();}catch{}_0x4efd7a(new AbortPrompt());},_0x436883[_0x178780(0x82)](_0x178780(0x7e),_0x5d107f);}),_0x4ac34e=()=>{const _0x10fe7d=a7_0x347a;_0x5d107f&&(_0x436883[_0x10fe7d(0x90)](_0x10fe7d(0x7e),_0x5d107f),_0x5d107f=undefined);try{_0x436883[_0x10fe7d(0x80)]();}catch{}};return{'rl':_0x436883,'abortPromise':_0x2674e9,'disposeSuccess':_0x4ac34e};}function a7_0x347a(_0x371459,_0x1cec8e){_0x371459=_0x371459-0x7b;const _0x41c1cb=a7_0x41c1();let _0x347abf=_0x41c1cb[_0x371459];return _0x347abf;}function a7_0x41c1(){const _0x5869c5=['name','552112aTLrCM','58990dCKZtL','SIGINT','1438aeRrLF','close','race','once','7lAhsJE','12Kjvgfy','AbortPrompt','456385GHxdVi','242865OkjMMo','77mShaQz','AccessKey\x20(paste\x20ak_...):\x20','888MANUPW','998056bmabSh','1957086UHuQFg','question','):\x20','trim','removeListener'];a7_0x41c1=function(){return _0x5869c5;};return a7_0x41c1();}export async function promptAccessKey(_0x520432=''){const _0x51b7f5=a7_0x347a,{rl:_0x33b6dc,abortPromise:_0x448016,disposeSuccess:_0x3ad309}=createSafeRl(),_0x53372a=new Promise(_0x46cf46=>{const _0x4188ae=a7_0x347a,_0x132cc8=_0x520432?'AccessKey\x20('+_0x520432+_0x4188ae(0x8e):_0x4188ae(0x89);_0x33b6dc[_0x4188ae(0x8d)](_0x132cc8,_0x47e0ff=>{const _0x3c4e21=_0x4188ae;_0x3ad309(),_0x46cf46(_0x47e0ff[_0x3c4e21(0x8f)]()||_0x520432);});});return Promise[_0x51b7f5(0x81)]([_0x53372a,_0x448016]);}export function isAbortPrompt(_0x438139){const _0x4bcffa=a7_0x347a;return _0x438139 instanceof Error&&_0x438139[_0x4bcffa(0x7b)]==='AbortPrompt';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a8_0x2e5c(_0x13c867,_0x23ef49){_0x13c867=_0x13c867-0x157;const _0x15dcbc=a8_0x15dc();let _0x2e5c3b=_0x15dcbc[_0x13c867];return _0x2e5c3b;}const a8_0x1bf159=a8_0x2e5c;(function(_0xc8f6ce,_0x49bc15){const _0x263b9d=a8_0x2e5c,_0x3d07cf=_0xc8f6ce();while(!![]){try{const _0x2aace1=parseInt(_0x263b9d(0x163))/0x1+-parseInt(_0x263b9d(0x158))/0x2+parseInt(_0x263b9d(0x15f))/0x3+-parseInt(_0x263b9d(0x15a))/0x4+-parseInt(_0x263b9d(0x164))/0x5*(-parseInt(_0x263b9d(0x15b))/0x6)+parseInt(_0x263b9d(0x157))/0x7+-parseInt(_0x263b9d(0x168))/0x8*(-parseInt(_0x263b9d(0x161))/0x9);if(_0x2aace1===_0x49bc15)break;else _0x3d07cf['push'](_0x3d07cf['shift']());}catch(_0x55cb20){_0x3d07cf['push'](_0x3d07cf['shift']());}}}(a8_0x15dc,0x2f4ca));import{getBffScriptInfo}from'../../core/api-client.js';function a8_0x15dc(){const _0x4e1952=['createdTime','1126720fLlywU','72WhKNEh','Get\x20BFF\x20script\x20details\x20by\x20ID','functionName','num','4293srjolv','detail','9zvfREu','appCode','235218bmOIln','14680cepDlv','(none)','Script\x20ID','bff','168248wumNhJ','read','updatedTime','2200135wBnABa','263598YIIJEZ'];a8_0x15dc=function(){return _0x4e1952;};return a8_0x15dc();}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x1bf159(0x167),'command':a8_0x1bf159(0x160),'description':a8_0x1bf159(0x15c),'risk':a8_0x1bf159(0x169),'flags':[{...ID_FLAG,'description':a8_0x1bf159(0x166)},VERBOSE_FLAG],async 'execute'(_0x53b993){const _0x421856=a8_0x1bf159,_0x451a85=await getBffScriptInfo(_0x53b993[_0x421856(0x15e)]('id')),_0x17b5af=_0x53b993['bool']('verbose');if(_0x17b5af)return{'ok':!![],'data':_0x451a85};return{'ok':!![],'data':{'id':_0x451a85['id'],'appCode':_0x451a85[_0x421856(0x162)],'functionName':_0x451a85[_0x421856(0x15d)]??'','scriptType':_0x451a85['scriptType'],'description':_0x451a85['description']||_0x421856(0x165),'createdTime':_0x451a85[_0x421856(0x159)]??'','updatedTime':_0x451a85[_0x421856(0x16a)]??''}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a9_0x16af08=a9_0x258a;(function(_0x45a6ed,_0x2e6b9c){const _0x4af010=a9_0x258a,_0x4712ec=_0x45a6ed();while(!![]){try{const _0x27223b=parseInt(_0x4af010(0xa7))/0x1+parseInt(_0x4af010(0xa0))/0x2*(-parseInt(_0x4af010(0x9f))/0x3)+parseInt(_0x4af010(0xa2))/0x4+parseInt(_0x4af010(0xa3))/0x5*(-parseInt(_0x4af010(0x9e))/0x6)+-parseInt(_0x4af010(0xa4))/0x7+-parseInt(_0x4af010(0x99))/0x8+parseInt(_0x4af010(0x9c))/0x9;if(_0x27223b===_0x2e6b9c)break;else _0x4712ec['push'](_0x4712ec['shift']());}catch(_0x3dfb44){_0x4712ec['push'](_0x4712ec['shift']());}}}(a9_0x30b1,0x6663e));import{executeSdkBff}from'../../core/sdk-client.js';import{parseJsonParams}from'../../utils/params.js';function a9_0x258a(_0x5c172d,_0x71dc08){_0x5c172d=_0x5c172d-0x99;const _0x30b118=a9_0x30b1();let _0x258a02=_0x30b118[_0x5c172d];return _0x258a02;}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':'bff','command':'exec','description':a9_0x16af08(0xa1),'risk':a9_0x16af08(0x9b),'flags':[{...NAME_FLAG,'required':!![],'description':a9_0x16af08(0xa6)},PARAMS_FLAG],async 'execute'(_0x1abffb){const _0x192472=a9_0x16af08,_0x5e3997=parseJsonParams(_0x1abffb[_0x192472(0x9a)](_0x192472(0x9d))),_0x38a1f2=Date[_0x192472(0xa8)](),_0x480070=await executeSdkBff(_0x1abffb[_0x192472(0x9a)](_0x192472(0xa5)),_0x5e3997),_0x1430bd=Date[_0x192472(0xa8)]()-_0x38a1f2;return{'ok':!![],'data':{'result':_0x480070,'elapsed':_0x1430bd},'message':_0x192472(0xa9)+_0x1430bd+'ms'};}};function a9_0x30b1(){const _0x55eea2=['Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','1186692GBVMLd','15lJPDjX','608188rqjeYe','name','BFF\x20function\x20name\x20to\x20execute','476085MrNBfF','now','BFF\x20executed\x20in\x20','104152OdKNTg','str','read','3622059KVAWAZ','params','81606dCNqbm','22233GVnmTh','166ObucZe'];a9_0x30b1=function(){return _0x55eea2;};return a9_0x30b1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a10_0x515b(){const _0x754ea=['436936Nnoywm','831810PZMUDJ','2480103nzabNp','31998eCaNls','29916qNLHJN','3871800LalsOc','1345Ombnmg','34340152cSCmnK'];a10_0x515b=function(){return _0x754ea;};return a10_0x515b();}(function(_0x276d29,_0x158adc){const _0xe54d89=a10_0x1deb,_0x391a4f=_0x276d29();while(!![]){try{const _0x963381=-parseInt(_0xe54d89(0x10c))/0x1+-parseInt(_0xe54d89(0x108))/0x2+-parseInt(_0xe54d89(0x106))/0x3+-parseInt(_0xe54d89(0x109))/0x4+-parseInt(_0xe54d89(0x10a))/0x5*(parseInt(_0xe54d89(0x107))/0x6)+parseInt(_0xe54d89(0x105))/0x7+parseInt(_0xe54d89(0x10b))/0x8;if(_0x963381===_0x158adc)break;else _0x391a4f['push'](_0x391a4f['shift']());}catch(_0xf0d67a){_0x391a4f['push'](_0x391a4f['shift']());}}}(a10_0x515b,0xb2473));import{bffDetail}from'../../commands/bff/detail.js';function a10_0x1deb(_0x250f8a,_0x49d149){_0x250f8a=_0x250f8a-0x105;const _0x515b28=a10_0x515b();let _0x1deb10=_0x515b28[_0x250f8a];return _0x1deb10;}import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5700db,_0x2911ff){const _0x3f9b5c=a11_0x5ee3,_0x27a66e=_0x5700db();while(!![]){try{const _0x19c342=-parseInt(_0x3f9b5c(0x181))/0x1*(-parseInt(_0x3f9b5c(0x18c))/0x2)+parseInt(_0x3f9b5c(0x18d))/0x3+parseInt(_0x3f9b5c(0x189))/0x4*(parseInt(_0x3f9b5c(0x184))/0x5)+-parseInt(_0x3f9b5c(0x18f))/0x6*(-parseInt(_0x3f9b5c(0x192))/0x7)+parseInt(_0x3f9b5c(0x182))/0x8*(parseInt(_0x3f9b5c(0x18b))/0x9)+-parseInt(_0x3f9b5c(0x185))/0xa+-parseInt(_0x3f9b5c(0x187))/0xb;if(_0x19c342===_0x2911ff)break;else _0x27a66e['push'](_0x27a66e['shift']());}catch(_0x48003d){_0x27a66e['push'](_0x27a66e['shift']());}}}(a11_0x4145,0x8d39d));function a11_0x5ee3(_0x20fc4a,_0x7e74be){_0x20fc4a=_0x20fc4a-0x17d;const _0x414528=a11_0x4145();let _0x5ee3a7=_0x414528[_0x20fc4a];return _0x5ee3a7;}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';export function resolveConfigScope(_0x4cc4ff){const _0x3b64ad=a11_0x5ee3,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x60a25e}=_0x4cc4ff;if(explicitGlobal&&explicitProject)throw CliErrors[_0x3b64ad(0x191)](_0x3b64ad(0x180),_0x3b64ad(0x193));if(explicitGlobal)return _0x3b64ad(0x17e);if(explicitProject)return _0x3b64ad(0x188);switch(_0x60a25e){case _0x3b64ad(0x17d):return _0x3b64ad(0x17e);case _0x3b64ad(0x190):return _0x4cc4ff[_0x3b64ad(0x186)]??isInProject()?_0x3b64ad(0x188):'global';case _0x3b64ad(0x17f):if(!(_0x4cc4ff['inProject']??isInProject()))throw CliErrors['validation']('Not\x20inside\x20a\x20project\x20(no\x20.lovrabet.json\x20found).',_0x3b64ad(0x18e)+CLI_BIN_NAME+_0x3b64ad(0x183));return'project';}}export function toScopeFlags(_0xd6570b){const _0x3d0ebe=a11_0x5ee3;return{'global':_0xd6570b===_0x3d0ebe(0x17e)};}function a11_0x4145(){const _0x280458=['6375963RKPcbk','project','3572aXRNKV','\x20(global)','1049796QEEBFc','106070HeVORt','1456233FRiDoJ','Add\x20--global\x20to\x20write\x20to\x20~/.lovrabet.json,\x20or\x20run\x20`','4336842qoDxbD','project-default','validation','7QhLAKY','Use\x20only\x20one\x20config\x20scope\x20flag.','global-default','global','project-or-global-explicit','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','7KanWXB','8KjTGEe','\x20init`\x20first.','115GAZULl','5585520fzuhAo','inProject'];a11_0x4145=function(){return _0x280458;};return a11_0x4145();}export function formatScopeLabel(_0xe0bfba){const _0x366ad7=a11_0x5ee3;return _0xe0bfba===_0x366ad7(0x17e)?_0x366ad7(0x18a):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x3e1f0e,_0xba5db0){const _0x5690f6=a12_0x1c4b,_0x157a4e=_0x3e1f0e();while(!![]){try{const _0x3d4731=parseInt(_0x5690f6(0x129))/0x1*(parseInt(_0x5690f6(0x138))/0x2)+parseInt(_0x5690f6(0x11e))/0x3+parseInt(_0x5690f6(0x126))/0x4+-parseInt(_0x5690f6(0x131))/0x5+-parseInt(_0x5690f6(0x122))/0x6*(-parseInt(_0x5690f6(0x135))/0x7)+-parseInt(_0x5690f6(0x12a))/0x8+-parseInt(_0x5690f6(0x125))/0x9;if(_0x3d4731===_0xba5db0)break;else _0x157a4e['push'](_0x157a4e['shift']());}catch(_0xecd10d){_0x157a4e['push'](_0x157a4e['shift']());}}}(a12_0x311f,0x6561b));import{CliErrors}from'../../errors.js';function a12_0x311f(){const _0xc2d1c5=['18418OlPveS','635757dwdBiU','Use\x20only\x20one\x20of:\x20','Flags\x20','At\x20least\x20one\x20of\x20','108372Gipugp','filter',':\x20expected\x20','1341261VSlMDG','877664fQMbMT','Exactly\x20one\x20of\x20','validation','23CpKAyz','1413584OGSmGK','Remove\x20all\x20but\x20one.','flag','Provide\x20one\x20of:\x20','\x20are\x20mutually\x20exclusive\x20for\x20`','str','\x20is\x20required\x20for\x20`','2761940IsAeRA','map','\x20is\x20allowed,\x20found:\x20','join','252hqxOTD','Invalid\x20--','length'];a12_0x311f=function(){return _0xc2d1c5;};return a12_0x311f();}function a12_0x1c4b(_0x33e7ce,_0x3217b6){_0x33e7ce=_0x33e7ce-0x11e;const _0x311fb4=a12_0x311f();let _0x1c4bc1=_0x311fb4[_0x33e7ce];return _0x1c4bc1;}function isSet(_0x515323,_0x1ff86f){const _0x626f4d=a12_0x1c4b,_0x4e8add=_0x515323[_0x626f4d(0x12c)](_0x1ff86f);return _0x4e8add!==undefined&&_0x4e8add!==''&&_0x4e8add!==![]&&_0x4e8add!==0x0;}function fmtNames(_0x1192fc){const _0x19cedd=a12_0x1c4b;return _0x1192fc[_0x19cedd(0x132)](_0x25c295=>'--'+_0x25c295)[_0x19cedd(0x134)](',\x20');}export function requireOneOf(_0x45282c,_0x11626f,_0x2f1872){const _0x3083d0=a12_0x1c4b,_0x4da966=_0x11626f[_0x3083d0(0x123)](_0x304f47=>isSet(_0x45282c,_0x304f47));if(_0x4da966[_0x3083d0(0x137)]!==0x1)throw CliErrors[_0x3083d0(0x128)](_0x4da966['length']===0x0?_0x3083d0(0x127)+fmtNames(_0x11626f)+_0x3083d0(0x130)+_0x2f1872+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x11626f)+_0x3083d0(0x133)+fmtNames(_0x4da966)+'.',_0x4da966[_0x3083d0(0x137)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x11626f):_0x3083d0(0x12b));}export function requireAnyOf(_0x1ecc87,_0x4edb51,_0x2b9ee0){const _0x23443c=a12_0x1c4b;if(!_0x4edb51['some'](_0x17aca5=>isSet(_0x1ecc87,_0x17aca5)))throw CliErrors[_0x23443c(0x128)](_0x23443c(0x121)+fmtNames(_0x4edb51)+_0x23443c(0x130)+_0x2b9ee0+'`.',_0x23443c(0x12d)+fmtNames(_0x4edb51));}export function mutuallyExclusive(_0x30bbeb,_0x3fa2b4,_0x121b43){const _0x1da78f=a12_0x1c4b,_0x71f55e=_0x3fa2b4[_0x1da78f(0x123)](_0x18c850=>isSet(_0x30bbeb,_0x18c850));if(_0x71f55e[_0x1da78f(0x137)]>0x1)throw CliErrors['validation'](_0x1da78f(0x120)+fmtNames(_0x71f55e)+_0x1da78f(0x12e)+_0x121b43+'`.',_0x1da78f(0x11f)+fmtNames(_0x3fa2b4));}export function validatePattern(_0x5d03dd,_0x50ec76,_0x4e6a11,_0x251b15){const _0x37523c=a12_0x1c4b,_0x511525=_0x5d03dd[_0x37523c(0x12f)](_0x50ec76);if(_0x511525&&!_0x4e6a11['test'](_0x511525))throw CliErrors[_0x37523c(0x128)](_0x37523c(0x136)+_0x50ec76+_0x37523c(0x124)+_0x251b15+',\x20got\x20\x22'+_0x511525+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x308d0f=a13_0xe7cb;(function(_0x111dcf,_0x540e9a){const _0x1e705a=a13_0xe7cb,_0x42916f=_0x111dcf();while(!![]){try{const _0x2dd3f4=parseInt(_0x1e705a(0xed))/0x1+-parseInt(_0x1e705a(0xf0))/0x2*(-parseInt(_0x1e705a(0xe9))/0x3)+-parseInt(_0x1e705a(0xe1))/0x4+-parseInt(_0x1e705a(0xde))/0x5+-parseInt(_0x1e705a(0xeb))/0x6+parseInt(_0x1e705a(0xe4))/0x7*(parseInt(_0x1e705a(0xe7))/0x8)+-parseInt(_0x1e705a(0xef))/0x9*(-parseInt(_0x1e705a(0xe0))/0xa);if(_0x2dd3f4===_0x540e9a)break;else _0x42916f['push'](_0x42916f['shift']());}catch(_0x572e89){_0x42916f['push'](_0x42916f['shift']());}}}(a13_0x5cfe,0x1f167));export const CODE_FLAG={'name':a13_0x308d0f(0xe3),'type':a13_0x308d0f(0xe2),'required':!![],'description':a13_0x308d0f(0xdd),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a13_0x308d0f(0xec)}};export const SQLCODE_FLAG={'name':'sqlcode','type':a13_0x308d0f(0xe2),'required':!![],'description':a13_0x308d0f(0xea),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a13_0x308d0f(0xe8)}};export const VERBOSE_FLAG={'name':'verbose','type':a13_0x308d0f(0xdb),'description':a13_0x308d0f(0xe5)};function a13_0xe7cb(_0x2be569,_0x18763d){_0x2be569=_0x2be569-0xdb;const _0x5cfeca=a13_0x5cfe();let _0xe7cb41=_0x5cfeca[_0x2be569];return _0xe7cb41;}function a13_0x5cfe(){const _0x25f07e=['Return\x20full\x20raw\x20response\x20object','number','599792BxKyWJ','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','763311hlDzRa','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','704688itANbc','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','34289AzJHpD','params','747DgJaKs','2wEGIrZ','boolean','Resource\x20name\x20for\x20lookup','Dataset\x20code\x20(32-char\x20hex\x20UUID)','719940bdBXDI','name','9440sLezlV','513020BchLRi','string','code','14itRIBo'];a13_0x5cfe=function(){return _0x25f07e;};return a13_0x5cfe();}export const PARAMS_FLAG={'name':a13_0x308d0f(0xee),'type':a13_0x308d0f(0xe2),'description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':a13_0x308d0f(0xdf),'type':a13_0x308d0f(0xe2),'description':a13_0x308d0f(0xdc)};export const ID_FLAG={'name':'id','type':a13_0x308d0f(0xe6),'required':!![],'description':'Resource\x20ID'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x31586a=a14_0x5323;(function(_0x428bf5,_0xe8d7d5){const _0x395e94=a14_0x5323,_0x5193f9=_0x428bf5();while(!![]){try{const _0x127ff3=-parseInt(_0x395e94(0x1b2))/0x1*(parseInt(_0x395e94(0x193))/0x2)+parseInt(_0x395e94(0x183))/0x3*(-parseInt(_0x395e94(0x19c))/0x4)+parseInt(_0x395e94(0x18a))/0x5*(-parseInt(_0x395e94(0x190))/0x6)+parseInt(_0x395e94(0x191))/0x7*(parseInt(_0x395e94(0x18e))/0x8)+-parseInt(_0x395e94(0x192))/0x9*(parseInt(_0x395e94(0x1aa))/0xa)+parseInt(_0x395e94(0x1ab))/0xb+parseInt(_0x395e94(0x189))/0xc;if(_0x127ff3===_0xe8d7d5)break;else _0x5193f9['push'](_0x5193f9['shift']());}catch(_0x25ec74){_0x5193f9['push'](_0x5193f9['shift']());}}}(a14_0xdbf7,0x81be2));function a14_0x5323(_0x26f85b,_0x1df1b3){_0x26f85b=_0x26f85b-0x17b;const _0xdbf7e1=a14_0xdbf7();let _0x532371=_0xdbf7e1[_0x26f85b];return _0x532371;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a14_0x31586a(0x184),'type':a14_0x31586a(0x19b),'description':a14_0x31586a(0x1a6),'default':![]},listDef={'service':a14_0x31586a(0x185),'command':a14_0x31586a(0x1b0),'description':a14_0x31586a(0x1ac),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x4fac70){const _0x39494d=a14_0x31586a,{buildConfigFromFlags:_0x59785f}=await import(_0x39494d(0x17d)),_0x12b8ba=_0x59785f({}),_0x300cfa=getProjectConfigPath(),_0x1bd24d=resolveWriteConfigPath(_0x39494d(0x184));if(_0x4fac70['format']==='pretty')return{'ok':!![],'message':_0x39494d(0x1a4)+(JSON['stringify'](_0x12b8ba[_0x39494d(0x1b7)],null,0x2)+'\x0a\x0a')+_0x39494d(0x19a)+('\x20\x20project:\x20'+(_0x300cfa??_0x39494d(0x1a0))+'\x0a')+(_0x39494d(0x1a1)+_0x1bd24d)};return{'ok':!![],'data':{'effective':_0x12b8ba[_0x39494d(0x1b7)],'configFiles':{'project':_0x300cfa??null,'global':_0x1bd24d}}};}},getDef={'service':a14_0x31586a(0x185),'command':a14_0x31586a(0x186),'description':a14_0x31586a(0x19e),'risk':a14_0x31586a(0x17e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x31586a(0x1ae),'description':a14_0x31586a(0x1a9),'required':!![]}],'flags':[],async 'execute'(_0x524f9c){const _0x51bfca=a14_0x31586a,_0x3c77d2=_0x524f9c[_0x51bfca(0x19f)][0x0];if(!_0x3c77d2)throw CliErrors['validation'](_0x51bfca(0x17f),'Usage:\x20'+CLI_BIN_NAME+_0x51bfca(0x1a8));const {buildConfigFromFlags:_0x5e4366}=await import(_0x51bfca(0x17d)),{raw:_0x158a34}=_0x5e4366({});if(_0x3c77d2['includes']('.')){const _0x53383b=_0x3c77d2[_0x51bfca(0x1b5)]('.');let _0x2ea6da=_0x158a34;for(const _0x1371af of _0x53383b){if(_0x2ea6da==null||typeof _0x2ea6da!==_0x51bfca(0x19d))throw CliErrors[_0x51bfca(0x1a3)](_0x51bfca(0x18d)+_0x3c77d2);_0x2ea6da=_0x2ea6da[_0x1371af];}if(_0x2ea6da===undefined)throw CliErrors[_0x51bfca(0x1a3)]('Key\x20not\x20found:\x20'+_0x3c77d2);return console[_0x51bfca(0x1b3)](typeof _0x2ea6da===_0x51bfca(0x19d)?JSON['stringify'](_0x2ea6da,null,0x2):String(_0x2ea6da)),{'ok':!![]};}const _0x41d641=_0x158a34[_0x3c77d2];if(_0x41d641===undefined)throw CliErrors['validation'](_0x51bfca(0x18d)+_0x3c77d2);return console[_0x51bfca(0x1b3)](typeof _0x41d641===_0x51bfca(0x19d)?JSON[_0x51bfca(0x197)](_0x41d641,null,0x2):String(_0x41d641)),{'ok':!![]};}},setDef={'service':'config','command':a14_0x31586a(0x180),'description':'Set\x20a\x20config\x20value','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0x31586a(0x1ae),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0x31586a(0x17b),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x5247e5){const _0x4456c7=a14_0x31586a,_0x2a9d47=_0x5247e5[_0x4456c7(0x19f)][0x0],_0x2e747b=_0x5247e5[_0x4456c7(0x19f)][0x1];if(!_0x2a9d47||_0x2e747b===undefined)throw CliErrors[_0x4456c7(0x1a3)](_0x4456c7(0x195),_0x4456c7(0x188)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x2a9d47]&&!ENUM_KEYS[_0x2a9d47][_0x4456c7(0x1af)](_0x2e747b))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x2a9d47+_0x4456c7(0x18f)+ENUM_KEYS[_0x2a9d47][_0x4456c7(0x196)](',\x20'));if(_0x2a9d47===_0x4456c7(0x187))throw CliErrors[_0x4456c7(0x1a3)](_0x4456c7(0x1b6));if(_0x2a9d47===_0x4456c7(0x1a2)){const _0x56eb1b=Number(_0x2e747b);if(isNaN(_0x56eb1b)||_0x56eb1b<=0x0)throw CliErrors['validation']('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x4a8ef2=resolveWriteScope({'explicitGlobal':_0x5247e5[_0x4456c7(0x199)](_0x4456c7(0x184)),'policy':_0x4456c7(0x17c)}),_0x441ae2=toScopeFlags(_0x4a8ef2),_0x2f0578=readScopedConfig(_0x441ae2);if(!isTopLevelConfigKey(_0x2a9d47))throw CliErrors[_0x4456c7(0x1a3)](_0x4456c7(0x1ad)+_0x2a9d47+_0x4456c7(0x194),_0x4456c7(0x1a5)+getTopLevelConfigKeySummary());return _0x2f0578[_0x2a9d47]=_0x2a9d47===_0x4456c7(0x1a2)?Number(_0x2e747b):_0x2e747b,console[_0x4456c7(0x1b3)](_0x4456c7(0x181)+_0x2a9d47+'`\x20=\x20\x22'+_0x2e747b+'\x22'+(_0x4a8ef2===_0x4456c7(0x184)?_0x4456c7(0x18c):'')),writeScopedConfig(_0x2f0578,_0x441ae2),{'ok':!![]};}},deleteDef={'service':'config','command':a14_0x31586a(0x182),'description':'Delete\x20a\x20config\x20value','risk':a14_0x31586a(0x1a7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x1457db){const _0xccb4af=a14_0x31586a,_0x1825b9=_0x1457db[_0xccb4af(0x19f)][0x0];if(!_0x1825b9)throw CliErrors[_0xccb4af(0x1a3)](_0xccb4af(0x17f),'Usage:\x20'+CLI_BIN_NAME+_0xccb4af(0x198));const _0x48e9ae=resolveWriteScope({'explicitGlobal':_0x1457db[_0xccb4af(0x199)](_0xccb4af(0x184)),'policy':_0xccb4af(0x17c)}),_0x4f08cc=toScopeFlags(_0x48e9ae),_0x444a73=readScopedConfig(_0x4f08cc);if(_0x444a73[_0x1825b9]===undefined)throw CliErrors[_0xccb4af(0x1a3)](_0xccb4af(0x1b1)+_0x1825b9+_0xccb4af(0x18b));return delete _0x444a73[_0x1825b9],console[_0xccb4af(0x1b3)](_0xccb4af(0x1b4)+_0x1825b9+'`'+(_0x48e9ae===_0xccb4af(0x184)?_0xccb4af(0x18c):'')),writeScopedConfig(_0x444a73,_0x4f08cc),{'ok':!![]};}};function a14_0xdbf7(){const _0x455e6e=['(none)','\x20\x20global:\x20\x20','pageSize','validation','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Settable\x20top-level\x20keys:\x20','Write\x20to\x20global\x20config','write','\x20config\x20get\x20<key>','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','5569930FVxKRy','1406988pbLrFn','List\x20current\x20config','Top-level\x20key\x20\x22','key','includes','list','Key\x20\x22','171417LfKXKZ','log','Deleted\x20`','split','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','raw','value','project-or-global-explicit','../../context.js','read','Missing\x20key\x20argument.','set','Set\x20`','delete','45AcZdiz','global','config','get','riskLevel','Usage:\x20','25957248NtYFNW','40jmHTye','\x22\x20not\x20found\x20at\x20top\x20level.','\x20(global)','Key\x20not\x20found:\x20','5416DORVQJ','\x22.\x20Allowed:\x20','655260hrOtUw','6629AVuVVb','9FDOVZJ','2aQOUOL','\x22\x20is\x20not\x20settable.','Missing\x20key\x20or\x20value.','join','stringify','\x20config\x20delete\x20<key>\x20[--global]','bool','Config\x20files:\x0a','boolean','212964NKtQds','object','Get\x20a\x20config\x20value','args'];a14_0xdbf7=function(){return _0x455e6e;};return a14_0xdbf7();}export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47542a,_0x1d29de){var _0x356a5f=a15_0x4ec0,_0xed2ba=_0x47542a();while(!![]){try{var _0x20f84c=parseInt(_0x356a5f(0x11b))/0x1*(-parseInt(_0x356a5f(0x11c))/0x2)+parseInt(_0x356a5f(0x11e))/0x3+-parseInt(_0x356a5f(0x121))/0x4+-parseInt(_0x356a5f(0x122))/0x5*(-parseInt(_0x356a5f(0x11f))/0x6)+parseInt(_0x356a5f(0x11a))/0x7+parseInt(_0x356a5f(0x11d))/0x8+-parseInt(_0x356a5f(0x120))/0x9;if(_0x20f84c===_0x1d29de)break;else _0xed2ba['push'](_0xed2ba['shift']());}catch(_0x50fd83){_0xed2ba['push'](_0xed2ba['shift']());}}}(a15_0x5f3c,0x515e4));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x4ec0(_0x167696,_0x12797e){_0x167696=_0x167696-0x11a;var _0x5f3c99=a15_0x5f3c();var _0x4ec0d1=_0x5f3c99[_0x167696];return _0x4ec0d1;}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_0x5f3c(){var _0x159793=['4672944ngnjcu','404596KLWQMv','65GrqwyD','3668014KxbEVa','1XVyHDn','940398QKzonw','1555728iAyQxw','363519Qdhwqd','269634vSekaj'];a15_0x5f3c=function(){return _0x159793;};return a15_0x5f3c();}
|