@lovrabet/lovrabet-cli 2.0.3 → 2.0.4
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 +6 -6
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
(function(_0x2b4748,_0x4b3f58){const _0x190287=a0_0x2777,_0x1c8d26=_0x2b4748();while(!![]){try{const _0x20ada4=-parseInt(_0x190287(0x1ae))/0x1*(-parseInt(_0x190287(0x1b1))/0x2)+-parseInt(_0x190287(0x1a4))/0x3*(parseInt(_0x190287(0x1a6))/0x4)+-parseInt(_0x190287(0x1bc))/0x5+-parseInt(_0x190287(0x1a1))/0x6*(parseInt(_0x190287(0x1c7))/0x7)+parseInt(_0x190287(0x1c5))/0x8+parseInt(_0x190287(0x1be))/0x9+-parseInt(_0x190287(0x1a9))/0xa*(-parseInt(_0x190287(0x1a7))/0xb);if(_0x20ada4===_0x4b3f58)break;else _0x1c8d26['push'](_0x1c8d26['shift']());}catch(_0x352d4c){_0x1c8d26['push'](_0x1c8d26['shift']());}}}(a0_0x33e7,0x7cccb));import{jsx as a0_0x54b882}from'react/jsx-runtime';import a0_0x3522a3 from'meow';import{render}from'ink';import{Help}from'./help.js';function a0_0x2777(_0x4d6142,_0x29eb2a){_0x4d6142=_0x4d6142-0x1a1;const _0x33e745=a0_0x33e7();let _0x27773b=_0x33e745[_0x4d6142];return _0x27773b;}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';function a0_0x33e7(){const _0x21636b=['flatMap','stderr','error','exitCode','Unexpected\x20error:','cancelled','6378208RQdegH','assign','250201QDrKwh','write','90ASFqwr','flags','defaultCommand','18TxhNGo','code','219496koBkkV','9355247QYUpGL','handler','10DZOKnN','ExitPromptError','original','corrected','Error:\x20','240689koJwvG','log','exit','2ABDsdZ','name','\x20->\x20--','help','unknownCommand','message','hint','[preparse]\x20','./framework/preparse.js','input','Hint:\x20','4799535TfAFdc','\x0aCancelled.\x0a','4032297SIpsii'];a0_0x33e7=function(){return _0x21636b;};return a0_0x33e7();}import{buildMeowFlags}from'./constant/cli.js';const helpText=generateFullHelp(),cli=a0_0x3522a3(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'autoVersion':!![]});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x420cd4){handleError(_0x420cd4);}}async function run(){const _0xd6a3be=a0_0x2777;let _0x2b5937=cli[_0xd6a3be(0x1ba)][0x0],_0x3c9345=cli[_0xd6a3be(0x1ba)][0x1];const _0x4f3119=cli['flags'];try{const {correctFlags:_0x5f2212}=await import(_0xd6a3be(0x1b9)),_0x21ade6=getAllDefinitions()[_0xd6a3be(0x1bf)](_0x328878=>_0x328878[_0xd6a3be(0x1a2)]??[]),{flags:_0x5eea75,corrections:_0x2f2826}=_0x5f2212(_0x4f3119,_0x21ade6);if(_0x2f2826['length']>0x0){for(const _0x155b70 of _0x2f2826){process[_0xd6a3be(0x1c0)][_0xd6a3be(0x1c8)](_0xd6a3be(0x1b8)+_0x155b70[_0xd6a3be(0x1a8)]+':\x20--'+_0x155b70[_0xd6a3be(0x1ab)]+_0xd6a3be(0x1b3)+_0x155b70[_0xd6a3be(0x1ac)]+'\x0a');}Object[_0xd6a3be(0x1c6)](_0x4f3119,_0x5eea75);}}catch{}if(!_0x2b5937||!isKnownService(_0x2b5937)){const {waitUntilExit:_0x4f7955}=render(a0_0x54b882(Help,{}));await _0x4f7955();return;}const _0x387824=getServiceEntry(_0x2b5937);if(!_0x3c9345){if(_0x4f3119[_0xd6a3be(0x1b4)]){console[_0xd6a3be(0x1af)](generateServiceHelp(_0x2b5937));return;}if(_0x387824[_0xd6a3be(0x1a3)])_0x3c9345=_0x387824[_0xd6a3be(0x1a3)];else{console[_0xd6a3be(0x1af)](generateServiceHelp(_0x2b5937));return;}}const _0x1e10e9=findDefinition(_0x2b5937,_0x3c9345);!_0x1e10e9&&(console[_0xd6a3be(0x1af)](generateServiceHelp(_0x2b5937)),handleError(CliErrors[_0xd6a3be(0x1b5)](_0x2b5937+'\x20'+_0x3c9345)));if(_0x4f3119[_0xd6a3be(0x1b4)]){console['log'](generateCommandHelp(_0x1e10e9));return;}const _0x5b8984=buildConfigFromFlags(_0x4f3119);await initGlobalEnvironment(_0x5b8984);const _0x56d535=createPipelineEnv(_0x5b8984,_0x4f3119);_0x56d535['args']=cli[_0xd6a3be(0x1ba)]['slice'](0x2),await runCommand(_0x1e10e9,_0x56d535);}function handleError(_0x53cc28){const _0x2c1785=a0_0x2777;if(_0x53cc28 instanceof CliError){_0x53cc28[_0x2c1785(0x1a5)]===_0x2c1785(0x1c4)&&(process['stderr'][_0x2c1785(0x1c8)](_0x2c1785(0x1bd)),process['exit'](0x0));console[_0x2c1785(0x1c1)](_0x2c1785(0x1ad)+_0x53cc28[_0x2c1785(0x1b6)]);if(_0x53cc28[_0x2c1785(0x1b7)])console[_0x2c1785(0x1c1)](_0x2c1785(0x1bb)+_0x53cc28[_0x2c1785(0x1b7)]);process[_0x2c1785(0x1b0)](_0x53cc28[_0x2c1785(0x1c2)]);}isUserCancellation(_0x53cc28)&&(process[_0x2c1785(0x1c0)]['write'](_0x2c1785(0x1bd)),process['exit'](0x0)),console[_0x2c1785(0x1c1)](_0x2c1785(0x1c3),_0x53cc28),process['exit'](0x1);}function isUserCancellation(_0x133f02){const _0xcbfc33=a0_0x2777;if(!(_0x133f02 instanceof Error))return![];if(_0x133f02[_0xcbfc33(0x1b2)]===_0xcbfc33(0x1aa))return!![];if(_0x133f02[_0xcbfc33(0x1a5)]==='ERR_USE_AFTER_CLOSE')return!![];if(_0x133f02[_0xcbfc33(0x1a5)]==='ERR_STREAM_DESTROYED')return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a1_0x45a0(_0x2d4f50,_0x216f8d){_0x2d4f50=_0x2d4f50-0x13b;const _0x52fd4b=a1_0x52fd();let _0x45a079=_0x52fd4b[_0x2d4f50];return _0x45a079;}(function(_0x19e8f2,_0x5a243d){const _0x84ea40=a1_0x45a0,_0x14b590=_0x19e8f2();while(!![]){try{const _0x371bd2=-parseInt(_0x84ea40(0x157))/0x1*(parseInt(_0x84ea40(0x149))/0x2)+parseInt(_0x84ea40(0x13c))/0x3+-parseInt(_0x84ea40(0x153))/0x4+parseInt(_0x84ea40(0x14c))/0x5+parseInt(_0x84ea40(0x141))/0x6*(-parseInt(_0x84ea40(0x14f))/0x7)+parseInt(_0x84ea40(0x13e))/0x8+parseInt(_0x84ea40(0x142))/0x9*(parseInt(_0x84ea40(0x145))/0xa);if(_0x371bd2===_0x5a243d)break;else _0x14b590['push'](_0x14b590['shift']());}catch(_0x668d47){_0x14b590['push'](_0x14b590['shift']());}}}(a1_0x52fd,0x9f5a6));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a1_0x52fd(){const _0x2f9ace=['12wsNHVf','unknown','code','1024190LbDlPE','.lovrabet','appName','213388AMbWRf','slice','utf8','items','1620012PceCET','sha256','appCode','cache','9507zZNMum','parse','hex','1929327jTOaqp','trim','2233000WxAnhF','EPERM','my-apps.json','174yCOIdK','7479bdaWDy','EXDEV','update','10490bqEbCy','ak_','stringify','EACCES'];a1_0x52fd=function(){return _0x2f9ace;};return a1_0x52fd();}import{homedir}from'node:os';import{dirname,resolve}from'node:path';function fingerprintAccessKey(_0x30aadb){const _0x3073a5=a1_0x45a0,_0x25ac83=_0x30aadb['trim'](),_0x4608d7=_0x25ac83[_0x3073a5(0x150)](-0x6)||_0x3073a5(0x14a),_0x10d4c=createHash(_0x3073a5(0x154))[_0x3073a5(0x144)](_0x25ac83)['digest'](_0x3073a5(0x13b))[_0x3073a5(0x150)](0x0,0xc);return _0x3073a5(0x146)+_0x4608d7+'_'+_0x10d4c;}export function getAppCacheFilePath(_0x399149,_0x20f729){const _0xfe3cbb=a1_0x45a0;return resolve(homedir(),_0xfe3cbb(0x14d),_0xfe3cbb(0x156),_0x399149,fingerprintAccessKey(_0x20f729),_0xfe3cbb(0x140));}export function readCachedAppList(_0x3be6ea,_0x4c89a1){const _0x56061f=a1_0x45a0;if(!_0x4c89a1?.[_0x56061f(0x13d)]())return null;const _0x1c652b=getAppCacheFilePath(_0x3be6ea,_0x4c89a1);if(!existsSync(_0x1c652b))return null;try{const _0x195ac3=readFileSync(_0x1c652b,_0x56061f(0x151));if(!_0x195ac3[_0x56061f(0x13d)]())return null;const _0x3b5ee8=JSON[_0x56061f(0x158)](_0x195ac3);if(!Array['isArray'](_0x3b5ee8[_0x56061f(0x152)]))return null;return _0x3b5ee8;}catch{return null;}}export function writeCachedAppList(_0x4ae25e,_0xa794e,_0x4327db){const _0x1dbd86=a1_0x45a0,_0x256795=getAppCacheFilePath(_0x4ae25e,_0xa794e),_0x1023ed=dirname(_0x256795);!existsSync(_0x1023ed)&&mkdirSync(_0x1023ed,{'recursive':!![]});const _0x5d3f31=_0x256795+'.tmp';try{writeFileSync(_0x5d3f31,JSON[_0x1dbd86(0x147)](_0x4327db,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x5d3f31,_0x256795);}catch(_0x2e3b88){if(_0x2e3b88['code']===_0x1dbd86(0x13f)||_0x2e3b88[_0x1dbd86(0x14b)]===_0x1dbd86(0x143)||_0x2e3b88[_0x1dbd86(0x14b)]===_0x1dbd86(0x148)){writeFileSync(_0x256795,JSON[_0x1dbd86(0x147)](_0x4327db,null,0x2)+'\x0a',{'encoding':_0x1dbd86(0x151)});try{unlinkSync(_0x5d3f31);}catch{}}else throw _0x2e3b88;}}catch(_0x4b67c5){try{unlinkSync(_0x5d3f31);}catch{}throw _0x4b67c5;}return _0x256795;}export function resolveCachedAppCode(_0x264c31,_0xe6a0b3,_0x5e6972){const _0xa0e3d5=a1_0x45a0;if(!_0x264c31)return undefined;const _0xdadd2c=readCachedAppList(_0xe6a0b3,_0x5e6972),_0x43a441=_0xdadd2c?.['items']['find'](_0x1aa96b=>_0x1aa96b[_0xa0e3d5(0x14e)]===_0x264c31);return _0x43a441?.[_0xa0e3d5(0x155)]?.[_0xa0e3d5(0x13d)]()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a2_0x2cb8(){const _0x300eeb=['9454482wxzrXl','cache','globalPath','list','import','no-cache','App\x20\x22','Default\x20app\x20set\x20to\x20\x22','write','Refreshed\x20app\x20cache\x20with\x20','\x20app\x20use\x20<name>\x20[--global]','../../commands/app/remote-source.js','\x22\x20not\x20found.','605qZUNFn','accessKey','init','mergedCli','1292522zuGclQ','appCode','use','24367qFFxaU','Missing\x20app\x20name.','envName','remote','fetchedAt','find','No\x20apps\x20found\x20on\x20the\x20platform.','nonInteractive','Remote\x20app\x20name\x20to\x20activate','Use\x20global\x20config\x20scope','isCurrent','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','\x20app\x20list`\x20to\x20discover\x20remote\x20apps.','items','40KCRNUs','104GaiMGs','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','from','env','map','validation','178521ybKCtB','Switch\x20the\x20default\x20app','app','string','pull','642ZoNdvF','args','boolean','defaultApp','Use\x20`','../../context.js','str','18710rrHKVQ','145910MQzruS','Target\x20environment\x20(default:\x20current\x20env)','4Mpyrem','Usage:\x20','production','length','projectPath','bool','read','81660ZlOEnn','Available:\x20','local','name','appName','Loaded\x20','source','146QwfBlr','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','Initialize\x20.lovrabet.json\x20config\x20file','cachePath','appPublishStatus'];a2_0x2cb8=function(){return _0x300eeb;};return a2_0x2cb8();}const a2_0x428e28=a2_0x566c;function a2_0x566c(_0x2fc22c,_0x1afcb2){_0x2fc22c=_0x2fc22c-0x11e;const _0x2cb82f=a2_0x2cb8();let _0x566c92=_0x2cb82f[_0x2fc22c];return _0x566c92;}(function(_0x14dd32,_0x4f5d9c){const _0x426f33=a2_0x566c,_0x3c1259=_0x14dd32();while(!![]){try{const _0x310408=-parseInt(_0x426f33(0x162))/0x1*(-parseInt(_0x426f33(0x149))/0x2)+parseInt(_0x426f33(0x12c))/0x3*(-parseInt(_0x426f33(0x13b))/0x4)+parseInt(_0x426f33(0x138))/0x5*(parseInt(_0x426f33(0x131))/0x6)+parseInt(_0x426f33(0x15f))/0x7*(-parseInt(_0x426f33(0x125))/0x8)+-parseInt(_0x426f33(0x14e))/0x9+-parseInt(_0x426f33(0x139))/0xa*(-parseInt(_0x426f33(0x15b))/0xb)+-parseInt(_0x426f33(0x142))/0xc*(parseInt(_0x426f33(0x126))/0xd);if(_0x310408===_0x4f5d9c)break;else _0x3c1259['push'](_0x3c1259['shift']());}catch(_0x236682){_0x3c1259['push'](_0x3c1259['shift']());}}}(a2_0x2cb8,0xda43f));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';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';const GLOBAL_FLAG={'name':'global','type':a2_0x428e28(0x133),'description':a2_0x428e28(0x120),'default':![]};function collectFlags(_0x38cc97,_0x39033d){const _0x937026=a2_0x428e28,_0x47d9a4={};for(const _0x41aa6a of _0x39033d){const _0xdbb4e=_0x41aa6a['type']==='boolean'?_0x38cc97[_0x937026(0x140)](_0x41aa6a['name']):_0x38cc97[_0x937026(0x137)](_0x41aa6a['name']);if(_0xdbb4e!==''&&_0xdbb4e!==![])_0x47d9a4[_0x41aa6a[_0x937026(0x145)]]=_0xdbb4e;}if(_0x38cc97[_0x937026(0x11e)])_0x47d9a4[_0x937026(0x11e)]=!![];return _0x47d9a4;}const initDef={'service':a2_0x428e28(0x12e),'command':a2_0x428e28(0x15d),'description':a2_0x428e28(0x14b),'risk':a2_0x428e28(0x156),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x57bb3b){return await runInit(collectFlags(_0x57bb3b,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a2_0x428e28(0x12e),'command':a2_0x428e28(0x151),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':a2_0x428e28(0x141),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':a2_0x428e28(0x12f),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a2_0x428e28(0x133),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x428e28(0x153),'type':a2_0x428e28(0x133),'description':a2_0x428e28(0x14a),'default':![]}],async 'execute'(_0x1e91db){const _0xb2f117=a2_0x428e28,_0x55828b=_0x1e91db['str'](_0xb2f117(0x129))||_0x1e91db[_0xb2f117(0x164)]||getEnv()||'production',_0x465bf4=_0x1e91db[_0xb2f117(0x140)](_0xb2f117(0x144)),_0x237d56=_0x1e91db[_0xb2f117(0x140)](_0xb2f117(0x153)),{readRawConfigWithLayers:_0x2c0262,resolveDefaultAppSource:_0x4ba1b6}=await import(_0xb2f117(0x136)),{getRemoteAppList:_0x194751}=await import(_0xb2f117(0x159)),{config:_0xb3167f,layers:_0x5501b5}=_0x2c0262(),_0x53f9d3=_0x4ba1b6(_0x5501b5),{defaultApp:_0x5056e7}=_0xb3167f,_0x465e9c=await _0x194751({'env':_0x55828b,'accessKey':_0x1e91db[_0xb2f117(0x15c)],'localOnly':_0x465bf4,'noCache':_0x237d56}),_0x100b1b=_0x465e9c[_0xb2f117(0x124)][_0xb2f117(0x12a)](_0x3c1aeb=>{const _0x24b6e=_0xb2f117;return{'name':_0x3c1aeb[_0x24b6e(0x146)],'appcode':_0x3c1aeb[_0x24b6e(0x160)],'named':!![],'definedIn':_0x24b6e(0x165),'isDefault':_0x3c1aeb[_0x24b6e(0x146)]===_0x5056e7,...buildAppProfileListFields(_0x55828b),'source':_0x465e9c[_0x24b6e(0x148)],'owner':_0x3c1aeb['appOwnerName']??null,'status':_0x3c1aeb[_0x24b6e(0x14d)]??null,'cachedAt':_0x465e9c[_0x24b6e(0x166)]};});enrichAppListItemsWithMergedSelection(_0x100b1b,_0x1e91db[_0xb2f117(0x15e)]);if(_0x100b1b['length']===0x0)return{'ok':!![],'data':[],'message':_0x465e9c[_0xb2f117(0x148)]===_0xb2f117(0x14f)?'No\x20cached\x20apps\x20found.':_0xb2f117(0x168)};const _0xeb3690=_0x100b1b[_0xb2f117(0x167)](_0xe53602=>_0xe53602[_0xb2f117(0x121)]===!![]),_0x1ebcc7=_0x5056e7??_0xeb3690?.[_0xb2f117(0x145)]??null,_0x5c4812={'env':_0x55828b,'source':_0x465e9c[_0xb2f117(0x148)],'fetchedAt':_0x465e9c[_0xb2f117(0x166)],'cachePath':_0x465e9c['cachePath'],'globalPath':_0x5501b5[_0xb2f117(0x150)]??null,'projectPath':_0x5501b5[_0xb2f117(0x13f)]??null,'defaultApp':_0x1ebcc7,'defaultAppSource':_0x5056e7!=null?_0x53f9d3:null};return{'ok':!![],'data':{'items':_0x100b1b,'meta':_0x5c4812}};}},pullDef={'service':a2_0x428e28(0x12e),'command':a2_0x428e28(0x130),'description':a2_0x428e28(0x127),'risk':a2_0x428e28(0x156),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a2_0x428e28(0x129),'type':'string','description':a2_0x428e28(0x13a),'enum':[...RUNTIME_ENV_VALUES]},{'name':a2_0x428e28(0x144),'type':'boolean','description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a2_0x428e28(0x153),'type':a2_0x428e28(0x133),'description':a2_0x428e28(0x14a),'default':![]}],async 'execute'(_0x58bb66){const _0x38212e=a2_0x428e28,_0x45545a=_0x58bb66[_0x38212e(0x137)]('env')||_0x58bb66['envName']||getEnv()||_0x38212e(0x13d),_0xc82e76=_0x58bb66[_0x38212e(0x140)](_0x38212e(0x144)),_0x13b376=_0x58bb66[_0x38212e(0x140)](_0x38212e(0x153)),{getRemoteAppList:_0x5b3597}=await import(_0x38212e(0x159)),_0x1db318=await _0x5b3597({'env':_0x45545a,'accessKey':_0x58bb66['accessKey'],'localOnly':_0xc82e76,'noCache':_0x13b376});return{'ok':!![],'data':{'total':_0x1db318[_0x38212e(0x124)][_0x38212e(0x13e)],'env':_0x45545a,'source':_0x1db318['source'],'fetchedAt':_0x1db318[_0x38212e(0x166)],'cachePath':_0x1db318[_0x38212e(0x14c)]},'message':_0x1db318[_0x38212e(0x148)]===_0x38212e(0x14f)?_0x38212e(0x147)+_0x1db318[_0x38212e(0x124)][_0x38212e(0x13e)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x45545a+'\x22.':_0x38212e(0x157)+_0x1db318[_0x38212e(0x124)]['length']+'\x20app(s)\x20for\x20env=\x22'+_0x45545a+'\x22.'};}},useDef={'service':a2_0x428e28(0x12e),'command':a2_0x428e28(0x161),'description':a2_0x428e28(0x12d),'risk':a2_0x428e28(0x156),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a2_0x428e28(0x145),'description':a2_0x428e28(0x11f),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x57b4c9){const _0x55cf3c=a2_0x428e28;if(!_0x57b4c9[_0x55cf3c(0x132)][0x0])throw CliErrors['validation'](_0x55cf3c(0x163),'Usage:\x20'+CLI_BIN_NAME+_0x55cf3c(0x158));},async 'execute'(_0x5ec7b8){const _0x187075=a2_0x428e28,_0x9891cc=_0x5ec7b8[_0x187075(0x132)][0x0];if(!_0x9891cc)throw CliErrors['validation'](_0x187075(0x163),_0x187075(0x13c)+CLI_BIN_NAME+_0x187075(0x158));const {buildConfigFromFlags:_0x1dfda0}=await import(_0x187075(0x136)),{readCachedAppList:_0x10fe6c}=await import('../../commands/app/cache.js'),_0x1b4f6e=_0x1dfda0({}),_0x13949e=_0x10fe6c(_0x1b4f6e[_0x187075(0x129)],_0x1b4f6e['accessKey']),_0x40768e=_0x13949e?.['items'][_0x187075(0x167)](_0x7dd7b5=>_0x7dd7b5[_0x187075(0x146)]===_0x9891cc);if(!_0x40768e&&_0x1b4f6e['defaultApp']!==_0x9891cc){const _0x2cf0d2=[..._0x13949e?.[_0x187075(0x124)][_0x187075(0x12a)](_0x46f47c=>_0x46f47c['appName'])??[]],_0x4c37ba=_0x2cf0d2[_0x187075(0x13e)]===0x0?_0x187075(0x135)+CLI_BIN_NAME+_0x187075(0x123):_0x187075(0x143)+Array[_0x187075(0x128)](new Set(_0x2cf0d2))['join'](',\x20');throw CliErrors[_0x187075(0x12b)](_0x187075(0x154)+_0x9891cc+_0x187075(0x15a),_0x4c37ba);}const _0x40ac95=_0x5ec7b8[_0x187075(0x140)]('global');let _0x2c096d;if(_0x40ac95)_0x2c096d={'global':!![]};else{const {isInProject:_0x5b2898}=await import(_0x187075(0x136)),_0x19b581=_0x5b2898();_0x2c096d=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x19b581}));}const _0x2ffa26=readConfig(_0x2c096d);return _0x2ffa26[_0x187075(0x134)]=_0x9891cc,writeConfig(_0x2ffa26,_0x2c096d),{'ok':!![],'message':_0x187075(0x155)+_0x9891cc+'\x22'+scopeLabel(_0x2c096d)+'.'};}},importDef={'service':a2_0x428e28(0x12e),'command':a2_0x428e28(0x152),'description':a2_0x428e28(0x122),'risk':a2_0x428e28(0x156),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x900333){return await runInitImport(collectFlags(_0x900333,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4092ec,_0x418273){const _0x3f8246=a3_0x4dc3,_0x2f7af5=_0x4092ec();while(!![]){try{const _0x416589=parseInt(_0x3f8246(0x149))/0x1+parseInt(_0x3f8246(0x143))/0x2*(-parseInt(_0x3f8246(0x13f))/0x3)+-parseInt(_0x3f8246(0x13a))/0x4*(parseInt(_0x3f8246(0x141))/0x5)+parseInt(_0x3f8246(0x144))/0x6*(-parseInt(_0x3f8246(0x14b))/0x7)+parseInt(_0x3f8246(0x13c))/0x8+parseInt(_0x3f8246(0x142))/0x9+-parseInt(_0x3f8246(0x145))/0xa;if(_0x416589===_0x418273)break;else _0x2f7af5['push'](_0x2f7af5['shift']());}catch(_0x44ea11){_0x2f7af5['push'](_0x2f7af5['shift']());}}}(a3_0xf336,0x4c795));function a3_0x4dc3(_0x169c8a,_0x3c4392){_0x169c8a=_0x169c8a-0x13a;const _0xf3365d=a3_0xf336();let _0x4dc3e0=_0xf3365d[_0x169c8a];return _0x4dc3e0;}import{fileURLToPath}from'url';import{dirname,join}from'path';function a3_0xf336(){const _0x3df353=['8RfRBiU','1218JGSXFc','346070FnehJH','errorCode','../../../mock/app-list.json','errorMsg','221562bWQkEq','success','6223sLvIpM','8umlRCt','tableData','4757520lAsgkp','utf-8','data','111909URNMpf','Mock\x20API\x20error:\x20','400865FnJFhm','194553iVXSZO'];a3_0xf336=function(){return _0x3df353;};return a3_0xf336();}import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x39ffe4=a3_0x4dc3,_0x5065fc=join(__dirname,_0x39ffe4(0x147)),_0x2318d4=readFileSync(_0x5065fc,_0x39ffe4(0x13d));return JSON['parse'](_0x2318d4);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x3496b6=a3_0x4dc3,_0x2230b6=getMockAppList();if(!_0x2230b6[_0x3496b6(0x14a)])throw new Error(_0x3496b6(0x140)+_0x2230b6[_0x3496b6(0x148)]+'\x20('+_0x2230b6[_0x3496b6(0x146)]+')');return _0x2230b6[_0x3496b6(0x13e)][_0x3496b6(0x13b)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a4_0x227c(){const _0xa13bfc=['3739465nqppCB','49LaSSae','11VtoNqk','117858aiioBg','trim','fetchedAt','8QAfuti','items','763546sNXrvf','24pKzTki','remote','toLowerCase','7378404aYnMCK','6590412CCnGAv','24VZPvXC','cache','18376dTzkjG','3795350ptxcss','toISOString','mock'];a4_0x227c=function(){return _0xa13bfc;};return a4_0x227c();}(function(_0x5b3dc4,_0x1bcdc9){const _0x3950b0=a4_0x13a6,_0x1894e6=_0x5b3dc4();while(!![]){try{const _0x3573c0=parseInt(_0x3950b0(0x8c))/0x1*(parseInt(_0x3950b0(0x87))/0x2)+-parseInt(_0x3950b0(0x8e))/0x3*(parseInt(_0x3950b0(0x85))/0x4)+parseInt(_0x3950b0(0x8b))/0x5+parseInt(_0x3950b0(0x94))/0x6*(parseInt(_0x3950b0(0x93))/0x7)+-parseInt(_0x3950b0(0x91))/0x8*(parseInt(_0x3950b0(0x84))/0x9)+parseInt(_0x3950b0(0x88))/0xa+parseInt(_0x3950b0(0x8d))/0xb*(-parseInt(_0x3950b0(0x83))/0xc);if(_0x3573c0===_0x1bcdc9)break;else _0x1894e6['push'](_0x1894e6['shift']());}catch(_0xbf9560){_0x1894e6['push'](_0x1894e6['shift']());}}}(a4_0x227c,0x693fd));function a4_0x13a6(_0x179812,_0x2ca837){_0x179812=_0x179812-0x82;const _0x227c3b=a4_0x227c();let _0x13a604=_0x227c3b[_0x179812];return _0x13a604;}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 _0x4ff8f3=a4_0x13a6,_0x10f714=(process.env.LOVRABET_APP_LIST_SOURCE||process.env.RABETBASE_APP_LIST_SOURCE||'')[_0x4ff8f3(0x8f)]()[_0x4ff8f3(0x82)]();return _0x10f714===_0x4ff8f3(0x8a);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x1b9b10){const _0x2f7e93=a4_0x13a6,{env:_0x75ae76,accessKey:_0x1738a0,localOnly:localOnly=![],noCache:noCache=![]}=_0x1b9b10,_0x434513=readCachedAppList(_0x75ae76,_0x1738a0),_0x1aac44=_0x1738a0?.[_0x2f7e93(0x8f)]()?getAppCacheFilePath(_0x75ae76,_0x1738a0):null;if(localOnly)return{'items':_0x434513?.[_0x2f7e93(0x92)]??[],'source':_0x2f7e93(0x86),'fetchedAt':_0x434513?.[_0x2f7e93(0x90)]??null,'cachePath':_0x1aac44};try{const _0x4aa6b0=await getRemoteAppItems(),_0x72d168=shouldUseMockRemoteApps()?_0x2f7e93(0x8a):_0x2f7e93(0x95),_0x29e93=new Date()[_0x2f7e93(0x89)](),_0x3e3321=_0x1738a0?.[_0x2f7e93(0x8f)]()?writeCachedAppList(_0x75ae76,_0x1738a0,{'env':_0x75ae76,'fetchedAt':_0x29e93,'source':_0x72d168,'items':_0x4aa6b0}):null;return{'items':_0x4aa6b0,'source':_0x72d168,'fetchedAt':_0x29e93,'cachePath':_0x3e3321};}catch(_0x3b5a41){if(!noCache&&_0x434513)return{'items':_0x434513[_0x2f7e93(0x92)],'source':'cache','fetchedAt':_0x434513[_0x2f7e93(0x90)],'cachePath':_0x1aac44};throw _0x3b5a41;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26b982,_0x453b32){const _0x3e8854=a5_0x5cad,_0xd788dc=_0x26b982();while(!![]){try{const _0x55cc2b=parseInt(_0x3e8854(0x1d4))/0x1*(parseInt(_0x3e8854(0x1c8))/0x2)+parseInt(_0x3e8854(0x1c0))/0x3*(parseInt(_0x3e8854(0x1c9))/0x4)+parseInt(_0x3e8854(0x1cc))/0x5*(-parseInt(_0x3e8854(0x1ca))/0x6)+parseInt(_0x3e8854(0x1d2))/0x7*(parseInt(_0x3e8854(0x1d1))/0x8)+-parseInt(_0x3e8854(0x1c4))/0x9+-parseInt(_0x3e8854(0x1c2))/0xa*(parseInt(_0x3e8854(0x1c1))/0xb)+parseInt(_0x3e8854(0x1cf))/0xc;if(_0x55cc2b===_0x453b32)break;else _0xd788dc['push'](_0xd788dc['shift']());}catch(_0x5c134c){_0xd788dc['push'](_0xd788dc['shift']());}}}(a5_0x14e0,0x3852c));import{CLI_BIN_NAME}from'../../constant/cli.js';function a5_0x5cad(_0x3a5a9d,_0x26ade8){_0x3a5a9d=_0x3a5a9d-0x1c0;const _0x14e07b=a5_0x14e0();let _0x5cad33=_0x14e07b[_0x3a5a9d];return _0x5cad33;}import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};function a5_0x14e0(){const _0x518027=['appCode','appcode','8315124XHmdzq','isCurrent','24088jYieBv','427aVUAzR','name','243oLqvrd','trim','359061evagbK','11muYsMh','3279090hxcpRS','defaultApp','1638657yHfatm','currentApp','named','project','912lPpoTo','4hrBBBr','19806OXxniB','global','555byHAzB'];a5_0x14e0=function(){return _0x518027;};return a5_0x14e0();}export function enrichAppListItemsWithMergedSelection(_0x298cc1,_0x54725b){const _0x2fa25e=a5_0x5cad;if(!_0x54725b)return;const _0x3f2c5d=!!(_0x54725b[_0x2fa25e(0x1c5)]??_0x54725b[_0x2fa25e(0x1c3)]);for(const _0x479e41 of _0x298cc1){_0x479e41['isCurrent']=![];}const _0x564874=_0x54725b['appCode']!=null?String(_0x54725b[_0x2fa25e(0x1cd)])['trim']():'';if(_0x3f2c5d){const _0x277533=_0x54725b[_0x2fa25e(0x1c5)]??_0x54725b['defaultApp'];if(_0x277533)for(const _0x3d7c47 of _0x298cc1){_0x3d7c47[_0x2fa25e(0x1c6)]===!![]&&_0x3d7c47[_0x2fa25e(0x1d3)]===_0x277533&&(_0x3d7c47[_0x2fa25e(0x1d0)]=!![]);}return;}if(!_0x564874)return;for(const _0x1535bc of _0x298cc1){String(_0x1535bc[_0x2fa25e(0x1ce)]??'')[_0x2fa25e(0x1d5)]()===_0x564874&&(_0x1535bc[_0x2fa25e(0x1d0)]=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x256ad2){const _0x1ec151=a5_0x5cad;return formatScopeLabel(_0x256ad2[_0x1ec151(0x1cb)]?_0x1ec151(0x1cb):_0x1ec151(0x1c7));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6_0x297e7b=a6_0x5bf8;(function(_0x157e29,_0x5967d8){const _0x31df72=a6_0x5bf8,_0x53ef67=_0x157e29();while(!![]){try{const _0x2e9023=parseInt(_0x31df72(0x9e))/0x1+parseInt(_0x31df72(0x6e))/0x2*(parseInt(_0x31df72(0x7c))/0x3)+-parseInt(_0x31df72(0xab))/0x4*(parseInt(_0x31df72(0x77))/0x5)+-parseInt(_0x31df72(0x75))/0x6*(parseInt(_0x31df72(0x9c))/0x7)+parseInt(_0x31df72(0x6f))/0x8+parseInt(_0x31df72(0x8e))/0x9*(-parseInt(_0x31df72(0x82))/0xa)+-parseInt(_0x31df72(0x69))/0xb;if(_0x2e9023===_0x5967d8)break;else _0x53ef67['push'](_0x53ef67['shift']());}catch(_0x5f048d){_0x53ef67['push'](_0x53ef67['shift']());}}}(a6_0x9b49,0xbd0f2));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';function a6_0x5bf8(_0x54f73e,_0xbd6c7e){_0x54f73e=_0x54f73e-0x67;const _0x9b498f=a6_0x9b49();let _0x5bf8b1=_0x9b498f[_0x54f73e];return _0x5bf8b1;}import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';function a6_0x9b49(){const _0x510c25=['AccessKey\x20(ak_xxx...)','AccessKey:\x20','trim','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','env','login','\x20scope.','push','6945862FFSkEW','access-key','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','write','\x20\x20export\x20LOVRABET_ACCESS_KEY=ak_xxx','26ofVbxP','11340944JmmrrN','validation','bool','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Option\x20B:\x20apps\x20config\x20(.lovrabet.json)','join','4208214QQtLlZ','str','345cNniwd','\x20config.\x20Nothing\x20to\x20clear.','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20Lovrabet\x20User\x20Center:','Read\x20from\x20global\x20config\x20(default)','240369zegLVi','global-default','ClientAk','global','logout','auth','2723510HYKVmN','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','envName','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','AccessKey\x20cleared\x20from\x20','\x20config.','length','Option\x20A:\x20','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','boolean','Shorthand\x20for\x20--access-key','Clear\x20accessKey\x20from\x20config','45fOyRKt','\x20Current\x20env:\x20','No\x20AccessKey\x20found\x20in\x20','string','repeat','Create\x20one\x20in\x20Lovrabet\x20User\x20Center:\x20','accessKey','production','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','\x20auth\x20status','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','development','Auth\x20config\x20reinitialized\x20in\x20','7XKcqNw','LOVRABET_ACCESS_KEY\x20env\x20var','1542898QWHhsn','slice','Write\x20to\x20global\x20config\x20(default)','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','status','\x20Verify:\x20','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Show\x20current\x20authentication\x20status','Then\x20verify\x20with:\x20','Clear\x20from\x20global\x20config\x20(default)','AccessKey\x20saved\x20to\x20','project','read','30908sjDTQw'];a6_0x9b49=function(){return _0x510c25;};return a6_0x9b49();}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 _0x2f8c0a=a6_0x5bf8;writeCliSideChannelLine(_0x2f8c0a(0x7a)),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a');}function resolveAuthScopeFlags(_0x1f009a){const _0x234005=a6_0x5bf8;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x1f009a[_0x234005(0x71)](_0x234005(0x7f)),'explicitProject':_0x1f009a[_0x234005(0x71)](_0x234005(0xa9)),'policy':_0x234005(0x7d)}));}async function resolveAuthWriteInput(_0x5d577a){const _0x243352=a6_0x5bf8;let _0x4403a9=(_0x5d577a[_0x243352(0x76)](_0x243352(0x6a))||_0x5d577a[_0x243352(0x76)]('ak')||'')[_0x243352(0xae)]();const _0x155881=(_0x5d577a[_0x243352(0x76)](_0x243352(0xb0))||'')[_0x243352(0xae)]();if(!_0x4403a9&&!_0x5d577a['nonInteractive'])try{showAccessKeyCreateHint(),_0x4403a9=await promptAccessKey('');}catch(_0x5d7828){if(isAbortPrompt(_0x5d7828))throw CliErrors['cancelled']();throw _0x5d7828;}if(!_0x4403a9)throw CliErrors[_0x243352(0x70)]('Missing\x20accessKey.',[_0x243352(0x93)+USER_ACCESS_KEY_CREATE_URL,'Then\x20run:\x20'+CLI_BIN_NAME+_0x243352(0xaf)][_0x243352(0x74)]('\x0a'));if(!ACCESS_KEY_PATTERN['test'](_0x4403a9))throw CliErrors[_0x243352(0x70)]('Invalid\x20accessKey\x20format:\x20\x22'+_0x4403a9+'\x22',_0x243352(0xa4));if(!_0x155881)return{'accessKey':_0x4403a9};const _0x255175=normalizeEnv(_0x155881);return{'accessKey':_0x4403a9,'env':isDaily(_0x255175)?'daily':isDev(_0x255175)?_0x243352(0x9a):_0x243352(0x95)};}export const authDefinitions=[{'service':'auth','command':a6_0x297e7b(0xb1),'description':a6_0x297e7b(0x97),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x297e7b(0x6a),'type':a6_0x297e7b(0x91),'description':a6_0x297e7b(0xac)},{'name':'ak','type':a6_0x297e7b(0x91),'description':a6_0x297e7b(0x8c)},{'name':a6_0x297e7b(0x7f),'type':'boolean','description':a6_0x297e7b(0xa0),'default':!![]},{'name':a6_0x297e7b(0xa9),'type':a6_0x297e7b(0x8b),'description':a6_0x297e7b(0x99),'default':![]}],async 'execute'(_0x39afbf){const _0x4e8b55=a6_0x297e7b,_0x5a5287=await resolveAuthWriteInput(_0x39afbf),_0xe06e42=resolveAuthScopeFlags(_0x39afbf),_0x41fa59=readScopedConfig(_0xe06e42);_0x41fa59[_0x4e8b55(0x94)]=_0x5a5287[_0x4e8b55(0x94)];_0x5a5287['env']&&(_0x41fa59['env']=_0x5a5287[_0x4e8b55(0xb0)]);writeScopedConfig(_0x41fa59,_0xe06e42);const _0x70e72c=_0xe06e42[_0x4e8b55(0x7f)]?_0x4e8b55(0x7f):_0x4e8b55(0xa9),_0x5a4d84=_0x41fa59[_0x4e8b55(0xb0)]?_0x4e8b55(0x8f)+_0x41fa59['env']+'.':'';return{'ok':!![],'message':_0x4e8b55(0xa8)+_0x70e72c+_0x4e8b55(0x87)+_0x5a4d84+_0x4e8b55(0xa3)+CLI_BIN_NAME+_0x4e8b55(0x98)};}},{'service':'auth','command':'init','description':a6_0x297e7b(0x72),'risk':a6_0x297e7b(0x6c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a6_0x297e7b(0x91),'description':a6_0x297e7b(0xac)},{'name':'ak','type':a6_0x297e7b(0x91),'description':a6_0x297e7b(0x8c)},{'name':'env','type':a6_0x297e7b(0x91),'description':a6_0x297e7b(0xa1)},{'name':a6_0x297e7b(0x7f),'type':'boolean','description':a6_0x297e7b(0xa0),'default':!![]},{'name':a6_0x297e7b(0xa9),'type':a6_0x297e7b(0x8b),'description':a6_0x297e7b(0x99),'default':![]}],async 'execute'(_0x1b09ff){const _0x3a58eb=a6_0x297e7b,_0x3472c8=await resolveAuthWriteInput(_0x1b09ff),_0x1d977e=resolveAuthScopeFlags(_0x1b09ff),_0x33de10={'accessKey':_0x3472c8[_0x3a58eb(0x94)]};_0x3472c8[_0x3a58eb(0xb0)]&&(_0x33de10[_0x3a58eb(0xb0)]=_0x3472c8['env']);writeScopedConfig(_0x33de10,_0x1d977e);const _0xe4139c=_0x1d977e['global']?'global':_0x3a58eb(0xa9),_0x164d2a=_0x33de10[_0x3a58eb(0xb0)]?_0x3a58eb(0x8f)+_0x33de10['env']+'.':'';return{'ok':!![],'message':_0x3a58eb(0x9b)+_0xe4139c+_0x3a58eb(0x67)+_0x164d2a+'\x20Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'};}},{'service':a6_0x297e7b(0x81),'command':a6_0x297e7b(0x80),'description':a6_0x297e7b(0x8d),'risk':a6_0x297e7b(0x6c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x297e7b(0x7f),'type':a6_0x297e7b(0x8b),'description':a6_0x297e7b(0xa7),'default':!![]},{'name':a6_0x297e7b(0xa9),'type':a6_0x297e7b(0x8b),'description':a6_0x297e7b(0x96),'default':![]}],async 'execute'(_0x8c78ba){const _0x132191=a6_0x297e7b,_0x3d568a=resolveAuthScopeFlags(_0x8c78ba),_0x42bef2=readScopedConfig(_0x3d568a),_0x19c253=!!_0x42bef2['accessKey'];delete _0x42bef2[_0x132191(0x94)],writeScopedConfig(_0x42bef2,_0x3d568a);const _0x498d7a=_0x3d568a[_0x132191(0x7f)]?_0x132191(0x7f):_0x132191(0xa9);if(_0x19c253)return{'ok':!![],'message':_0x132191(0x86)+_0x498d7a+_0x132191(0x87)};return{'ok':!![],'message':_0x132191(0x90)+_0x498d7a+_0x132191(0x78)};}},{'service':a6_0x297e7b(0x81),'command':a6_0x297e7b(0xa2),'description':a6_0x297e7b(0xa5),'risk':a6_0x297e7b(0xaa),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':'boolean','description':a6_0x297e7b(0x7b),'default':!![]},{'name':a6_0x297e7b(0xa9),'type':a6_0x297e7b(0x8b),'description':a6_0x297e7b(0x8a),'default':![]}],async 'execute'(_0x47fc33){const _0x2fdd7a=a6_0x297e7b,_0x33707b=resolveAuthScopeFlags(_0x47fc33),_0x57e9fd=readScopedConfig(_0x33707b),_0x3c136c=process.env.LOVRABET_ACCESS_KEY||undefined,_0x18ff2a=_0x57e9fd[_0x2fdd7a(0x94)]||undefined,_0x42de09=_0x3c136c||_0x18ff2a,_0x236b1c=_0x3c136c?_0x2fdd7a(0x9d):_0x18ff2a?(_0x33707b[_0x2fdd7a(0x7f)]?'global':_0x2fdd7a(0xa9))+'\x20config':null,_0x1e9cb7=['Auth\x20mode:\x20'+AUTH_MODE[_0x2fdd7a(0x7e)]];if(_0x42de09){const _0x3200d4=_0x42de09[_0x2fdd7a(0x88)]>0x8?''+_0x42de09[_0x2fdd7a(0x9f)](0x0,0x8)+'*'[_0x2fdd7a(0x92)](_0x42de09[_0x2fdd7a(0x88)]-0x8):_0x42de09;_0x1e9cb7['push'](_0x2fdd7a(0xad)+_0x3200d4+(_0x236b1c?'\x20(via\x20'+_0x236b1c+')':''));}return!_0x42de09&&(_0x1e9cb7[_0x2fdd7a(0x68)](''),_0x1e9cb7[_0x2fdd7a(0x68)](_0x2fdd7a(0x83)),_0x1e9cb7[_0x2fdd7a(0x68)](''),_0x1e9cb7[_0x2fdd7a(0x68)](_0x2fdd7a(0x89)+CLI_BIN_NAME+_0x2fdd7a(0x79)),_0x1e9cb7[_0x2fdd7a(0x68)](''),_0x1e9cb7[_0x2fdd7a(0x68)](_0x2fdd7a(0x73)),_0x1e9cb7[_0x2fdd7a(0x68)](_0x2fdd7a(0x6b)),_0x1e9cb7['push'](''),_0x1e9cb7[_0x2fdd7a(0x68)]('Option\x20C:\x20environment\x20variable'),_0x1e9cb7['push'](_0x2fdd7a(0x6d)),_0x1e9cb7['push'](''),_0x1e9cb7['push'](_0x2fdd7a(0xa6)+CLI_BIN_NAME+_0x2fdd7a(0x98)),_0x1e9cb7[_0x2fdd7a(0x68)](_0x2fdd7a(0x85)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x1e9cb7[_0x2fdd7a(0x74)]('\x0a')};}},{'service':a6_0x297e7b(0x81),'command':'info','description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':a6_0x297e7b(0xaa),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x456d39){const _0x4b044d=a6_0x297e7b,_0x4e0753=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x4e0753,'meta':{'env':_0x456d39[_0x4b044d(0x84)]??_0x4b044d(0x95)}}};}}];
|
|
1
|
+
const a6_0x4105be=a6_0x5240;function a6_0x5240(_0x41b711,_0x2c77a1){_0x41b711=_0x41b711-0x157;const _0x4be4f8=a6_0x4be4();let _0x52405d=_0x4be4f8[_0x41b711];return _0x52405d;}(function(_0x1c9d87,_0x1da64f){const _0x4c766e=a6_0x5240,_0x3dcd67=_0x1c9d87();while(!![]){try{const _0x3d3fb4=-parseInt(_0x4c766e(0x163))/0x1+parseInt(_0x4c766e(0x15a))/0x2+-parseInt(_0x4c766e(0x184))/0x3+-parseInt(_0x4c766e(0x183))/0x4+parseInt(_0x4c766e(0x173))/0x5+-parseInt(_0x4c766e(0x174))/0x6+parseInt(_0x4c766e(0x159))/0x7;if(_0x3d3fb4===_0x1da64f)break;else _0x3dcd67['push'](_0x3dcd67['shift']());}catch(_0x3b86b9){_0x3dcd67['push'](_0x3dcd67['shift']());}}}(a6_0x4be4,0x66031));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';function a6_0x4be4(){const _0x4ae0d3=['status','Shorthand\x20for\x20--access-key','Show\x20current\x20authentication\x20status','push','\x20Current\x20env:\x20','\x20\x20export\x20LOVRABET_ACCESS_KEY=ak_xxx','Option\x20A:\x20','Create\x20one\x20in\x20Lovrabet\x20User\x20Center:\x20','\x20auth\x20status','Write\x20to\x20global\x20config\x20(default)','ClientAk','trim','AccessKey\x20(ak_xxx...)','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','11651437XnnxFS','226082DVOslf','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20Lovrabet\x20User\x20Center:','env','length','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','validation','Clear\x20accessKey\x20from\x20config','string','625110FYEISI','access-key','Option\x20B:\x20apps\x20config\x20(.lovrabet.json)','Invalid\x20accessKey\x20format:\x20\x22','cancelled','Then\x20run:\x20','\x20config.\x20Nothing\x20to\x20clear.','\x20(via\x20','bool','Clear\x20from\x20global\x20config\x20(default)','project','production','Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','\x20scope.','join','2125030KdEYbT','1822680SMZjZP','No\x20AccessKey\x20found\x20in\x20','Read\x20from\x20global\x20config\x20(default)','global-default','boolean','global','\x20config.','envName','repeat','init','test','AccessKey:\x20','auth','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','Auth\x20mode:\x20','306668YJiMsD','2337420zJhCIS','login','str','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','LOVRABET_ACCESS_KEY\x20env\x20var','write','accessKey','info','AccessKey\x20cleared\x20from\x20','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars'];a6_0x4be4=function(){return _0x4ae0d3;};return a6_0x4be4();}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 _0x455375=a6_0x5240;writeCliSideChannelLine(_0x455375(0x15b)),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a');}function resolveAuthScopeFlags(_0x450307){const _0x3834e8=a6_0x5240;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x450307[_0x3834e8(0x16b)](_0x3834e8(0x179)),'explicitProject':_0x450307['bool'](_0x3834e8(0x16d)),'policy':_0x3834e8(0x177)}));}async function resolveAuthWriteInput(_0x4a489b){const _0x36d058=a6_0x5240;let _0x33737a=(_0x4a489b[_0x36d058(0x186)](_0x36d058(0x164))||_0x4a489b[_0x36d058(0x186)]('ak')||'')[_0x36d058(0x199)]();const _0x55c998=(_0x4a489b[_0x36d058(0x186)](_0x36d058(0x15c))||'')['trim']();if(!_0x33737a&&!_0x4a489b['nonInteractive'])try{showAccessKeyCreateHint(),_0x33737a=await promptAccessKey('');}catch(_0x5b6548){if(isAbortPrompt(_0x5b6548))throw CliErrors[_0x36d058(0x167)]();throw _0x5b6548;}if(!_0x33737a)throw CliErrors[_0x36d058(0x160)]('Missing\x20accessKey.',[_0x36d058(0x195)+USER_ACCESS_KEY_CREATE_URL,_0x36d058(0x168)+CLI_BIN_NAME+_0x36d058(0x15e)]['join']('\x0a'));if(!ACCESS_KEY_PATTERN[_0x36d058(0x17e)](_0x33737a))throw CliErrors['validation'](_0x36d058(0x166)+_0x33737a+'\x22',_0x36d058(0x18d));if(!_0x55c998)return{'accessKey':_0x33737a};const _0x3b9873=normalizeEnv(_0x55c998);return{'accessKey':_0x33737a,'env':isDaily(_0x3b9873)?'daily':isDev(_0x3b9873)?'development':_0x36d058(0x16e)};}export const authDefinitions=[{'service':a6_0x4105be(0x180),'command':a6_0x4105be(0x185),'description':a6_0x4105be(0x187),'risk':a6_0x4105be(0x189),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4105be(0x164),'type':a6_0x4105be(0x162),'description':a6_0x4105be(0x19a)},{'name':'ak','type':'string','description':a6_0x4105be(0x18f)},{'name':a6_0x4105be(0x179),'type':'boolean','description':a6_0x4105be(0x197),'default':!![]},{'name':'project','type':a6_0x4105be(0x178),'description':a6_0x4105be(0x157),'default':![]}],async 'execute'(_0x194f7b){const _0x30c715=a6_0x4105be,_0x490106=await resolveAuthWriteInput(_0x194f7b),_0x2cbddc=resolveAuthScopeFlags(_0x194f7b),_0x39d444=readScopedConfig(_0x2cbddc);_0x39d444[_0x30c715(0x18a)]=_0x490106[_0x30c715(0x18a)];_0x490106[_0x30c715(0x15c)]&&(_0x39d444[_0x30c715(0x15c)]=_0x490106['env']);writeScopedConfig(_0x39d444,_0x2cbddc);const _0x132956=_0x2cbddc[_0x30c715(0x179)]?'global':_0x30c715(0x16d),_0x117a5d=_0x39d444['env']?_0x30c715(0x192)+_0x39d444['env']+'.':'';return{'ok':!![],'message':'AccessKey\x20saved\x20to\x20'+_0x132956+_0x30c715(0x17a)+_0x117a5d+'\x20Verify:\x20'+CLI_BIN_NAME+_0x30c715(0x196)};}},{'service':a6_0x4105be(0x180),'command':a6_0x4105be(0x17d),'description':'Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','risk':a6_0x4105be(0x189),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4105be(0x164),'type':a6_0x4105be(0x162),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a6_0x4105be(0x162),'description':a6_0x4105be(0x18f)},{'name':a6_0x4105be(0x15c),'type':a6_0x4105be(0x162),'description':a6_0x4105be(0x16f)},{'name':a6_0x4105be(0x179),'type':'boolean','description':a6_0x4105be(0x197),'default':!![]},{'name':'project','type':a6_0x4105be(0x178),'description':a6_0x4105be(0x157),'default':![]}],async 'execute'(_0x3b6d13){const _0x61f8c2=a6_0x4105be,_0x2231ba=await resolveAuthWriteInput(_0x3b6d13),_0xc923b4=resolveAuthScopeFlags(_0x3b6d13),_0x9e204c={'accessKey':_0x2231ba[_0x61f8c2(0x18a)]};_0x2231ba['env']&&(_0x9e204c[_0x61f8c2(0x15c)]=_0x2231ba[_0x61f8c2(0x15c)]);writeScopedConfig(_0x9e204c,_0xc923b4);const _0x304691=_0xc923b4['global']?_0x61f8c2(0x179):_0x61f8c2(0x16d),_0x56312b=_0x9e204c['env']?_0x61f8c2(0x192)+_0x9e204c[_0x61f8c2(0x15c)]+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x304691+_0x61f8c2(0x171)+_0x56312b+'\x20Verify:\x20'+CLI_BIN_NAME+_0x61f8c2(0x196)};}},{'service':'auth','command':'logout','description':a6_0x4105be(0x161),'risk':a6_0x4105be(0x189),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a6_0x4105be(0x179),'type':a6_0x4105be(0x178),'description':a6_0x4105be(0x16c),'default':!![]},{'name':a6_0x4105be(0x16d),'type':a6_0x4105be(0x178),'description':a6_0x4105be(0x15f),'default':![]}],async 'execute'(_0x5e6a03){const _0x15dc43=a6_0x4105be,_0x588620=resolveAuthScopeFlags(_0x5e6a03),_0x228f7f=readScopedConfig(_0x588620),_0x2ff2fd=!!_0x228f7f[_0x15dc43(0x18a)];delete _0x228f7f[_0x15dc43(0x18a)],writeScopedConfig(_0x228f7f,_0x588620);const _0x6b6aa5=_0x588620['global']?_0x15dc43(0x179):'project';if(_0x2ff2fd)return{'ok':!![],'message':_0x15dc43(0x18c)+_0x6b6aa5+'\x20config.'};return{'ok':!![],'message':_0x15dc43(0x175)+_0x6b6aa5+_0x15dc43(0x169)};}},{'service':a6_0x4105be(0x180),'command':a6_0x4105be(0x18e),'description':a6_0x4105be(0x190),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a6_0x4105be(0x178),'description':a6_0x4105be(0x176),'default':!![]},{'name':'project','type':a6_0x4105be(0x178),'description':'Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','default':![]}],async 'execute'(_0x1b0797){const _0x39c5c6=a6_0x4105be,_0x3660e2=resolveAuthScopeFlags(_0x1b0797),_0x2f0eee=readScopedConfig(_0x3660e2),_0x391945=process.env.LOVRABET_ACCESS_KEY||undefined,_0x1d42fa=_0x2f0eee[_0x39c5c6(0x18a)]||undefined,_0x577a58=_0x391945||_0x1d42fa,_0xc1284c=_0x391945?_0x39c5c6(0x188):_0x1d42fa?(_0x3660e2['global']?'global':_0x39c5c6(0x16d))+'\x20config':null,_0x310202=[_0x39c5c6(0x182)+AUTH_MODE[_0x39c5c6(0x198)]];if(_0x577a58){const _0x4a207a=_0x577a58[_0x39c5c6(0x15d)]>0x8?''+_0x577a58['slice'](0x0,0x8)+'*'[_0x39c5c6(0x17c)](_0x577a58[_0x39c5c6(0x15d)]-0x8):_0x577a58;_0x310202[_0x39c5c6(0x191)](_0x39c5c6(0x17f)+_0x4a207a+(_0xc1284c?_0x39c5c6(0x16a)+_0xc1284c+')':''));}return!_0x577a58&&(_0x310202[_0x39c5c6(0x191)](''),_0x310202[_0x39c5c6(0x191)]('No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:'),_0x310202[_0x39c5c6(0x191)](''),_0x310202[_0x39c5c6(0x191)](_0x39c5c6(0x194)+CLI_BIN_NAME+_0x39c5c6(0x181)),_0x310202[_0x39c5c6(0x191)](''),_0x310202[_0x39c5c6(0x191)](_0x39c5c6(0x165)),_0x310202[_0x39c5c6(0x191)](_0x39c5c6(0x158)),_0x310202[_0x39c5c6(0x191)](''),_0x310202[_0x39c5c6(0x191)]('Option\x20C:\x20environment\x20variable'),_0x310202[_0x39c5c6(0x191)](_0x39c5c6(0x193)),_0x310202[_0x39c5c6(0x191)](''),_0x310202['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x39c5c6(0x196)),_0x310202['push'](_0x39c5c6(0x170)+CLI_BIN_NAME+'\x20doctor')),{'ok':!![],'message':_0x310202[_0x39c5c6(0x172)]('\x0a')};}},{'service':'auth','command':a6_0x4105be(0x18b),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x47546b){const _0x3778c3=a6_0x4105be,_0x4918d7=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x4918d7,'meta':{'env':_0x47546b[_0x3778c3(0x17b)]??'production'}}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b2ebf,_0x56b389){const _0x45fdc1=a7_0x260f,_0x52632f=_0x3b2ebf();while(!![]){try{const _0x781e65=-parseInt(_0x45fdc1(0xcd))/0x1*(-parseInt(_0x45fdc1(0xc3))/0x2)+parseInt(_0x45fdc1(0xba))/0x3*(-parseInt(_0x45fdc1(0xc4))/0x4)+-parseInt(_0x45fdc1(0xc0))/0x5+-parseInt(_0x45fdc1(0xc1))/0x6*(parseInt(_0x45fdc1(0xc8))/0x7)+parseInt(_0x45fdc1(0xb9))/0x8+-parseInt(_0x45fdc1(0xca))/0x9*(parseInt(_0x45fdc1(0xc6))/0xa)+-parseInt(_0x45fdc1(0xc5))/0xb*(-parseInt(_0x45fdc1(0xc7))/0xc);if(_0x781e65===_0x56b389)break;else _0x52632f['push'](_0x52632f['shift']());}catch(_0x4ce282){_0x52632f['push'](_0x52632f['shift']());}}}(a7_0x134d,0xba400));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0xa69340=a7_0x260f;super(_0xa69340(0xb8)),this[_0xa69340(0xc9)]=_0xa69340(0xbb);}}function createSafeRl(){const _0x55267a=createInterface({'input':process['stdin'],'output':process['stdout']});let _0x5087f8;const _0x2ba2a3=new Promise((_0x2ac17f,_0x8af796)=>{const _0x534685=a7_0x260f;_0x5087f8=()=>{const _0x7afea2=a7_0x260f;_0x5087f8&&(_0x55267a[_0x7afea2(0xbf)](_0x7afea2(0xbe),_0x5087f8),_0x5087f8=undefined);try{_0x55267a[_0x7afea2(0xcc)]();}catch{}_0x8af796(new AbortPrompt());},_0x55267a[_0x534685(0xcb)]('SIGINT',_0x5087f8);}),_0x3d4f7a=()=>{const _0x29f9af=a7_0x260f;_0x5087f8&&(_0x55267a[_0x29f9af(0xbf)](_0x29f9af(0xbe),_0x5087f8),_0x5087f8=undefined);try{_0x55267a[_0x29f9af(0xcc)]();}catch{}};return{'rl':_0x55267a,'abortPromise':_0x2ba2a3,'disposeSuccess':_0x3d4f7a};}export async function promptAccessKey(_0x1ddf9e=''){const _0x5588fa=a7_0x260f,{rl:_0xa10e77,abortPromise:_0x4fa5ec,disposeSuccess:_0x52a5c8}=createSafeRl(),_0x3fcda0=new Promise(_0x1cb095=>{const _0x42bc55=a7_0x260f,_0x214637=_0x1ddf9e?_0x42bc55(0xbd)+_0x1ddf9e+'):\x20':_0x42bc55(0xc2);_0xa10e77[_0x42bc55(0xce)](_0x214637,_0x1c146c=>{_0x52a5c8(),_0x1cb095(_0x1c146c['trim']()||_0x1ddf9e);});});return Promise[_0x5588fa(0xbc)]([_0x3fcda0,_0x4fa5ec]);}function a7_0x134d(){const _0x540c04=['AccessKey\x20(paste\x20ak_...):\x20','6yIPAQF','10344OkjGFn','22LHxvHr','11624870tKmEst','23556480bxfUrd','14FwrvBI','name','9JtaycO','once','close','503117zuAuhH','question','User\x20aborted\x20prompt','275992lITUPC','1257MFUlTZ','AbortPrompt','race','AccessKey\x20(','SIGINT','removeListener','6135255uPwrYe','3701934AnJotB'];a7_0x134d=function(){return _0x540c04;};return a7_0x134d();}function a7_0x260f(_0x478d66,_0x1dc596){_0x478d66=_0x478d66-0xb8;const _0x134de8=a7_0x134d();let _0x260f05=_0x134de8[_0x478d66];return _0x260f05;}export function isAbortPrompt(_0x573d55){const _0x1366e3=a7_0x260f;return _0x573d55 instanceof Error&&_0x573d55[_0x1366e3(0xc9)]===_0x1366e3(0xbb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a8_0x13b4(_0x55be45,_0x416afe){_0x55be45=_0x55be45-0xa6;const _0x100fbb=a8_0x100f();let _0x13b471=_0x100fbb[_0x55be45];return _0x13b471;}const a8_0x2a66b1=a8_0x13b4;(function(_0x7fbf88,_0x3ec4bf){const _0x3fb4b5=a8_0x13b4,_0x1dea6a=_0x7fbf88();while(!![]){try{const _0x517dee=parseInt(_0x3fb4b5(0xb3))/0x1+parseInt(_0x3fb4b5(0xac))/0x2+parseInt(_0x3fb4b5(0xa9))/0x3*(parseInt(_0x3fb4b5(0xaa))/0x4)+-parseInt(_0x3fb4b5(0xb0))/0x5*(parseInt(_0x3fb4b5(0xab))/0x6)+parseInt(_0x3fb4b5(0xb5))/0x7*(parseInt(_0x3fb4b5(0xb4))/0x8)+-parseInt(_0x3fb4b5(0xb9))/0x9+-parseInt(_0x3fb4b5(0xaf))/0xa*(parseInt(_0x3fb4b5(0xb2))/0xb);if(_0x517dee===_0x3ec4bf)break;else _0x1dea6a['push'](_0x1dea6a['shift']());}catch(_0x27c347){_0x1dea6a['push'](_0x1dea6a['shift']());}}}(a8_0x100f,0xf2b3b));import{getBffScriptInfo}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a8_0x2a66b1(0xb6),'command':'detail','description':a8_0x2a66b1(0xa8),'risk':a8_0x2a66b1(0xa6),'flags':[{...ID_FLAG,'description':a8_0x2a66b1(0xb8)},VERBOSE_FLAG],async 'execute'(_0x435114){const _0x387b2f=a8_0x2a66b1,_0x282c5c=await getBffScriptInfo(_0x435114['num']('id')),_0x217792=_0x435114[_0x387b2f(0xb1)](_0x387b2f(0xae));if(_0x217792)return{'ok':!![],'data':_0x282c5c};return{'ok':!![],'data':{'id':_0x282c5c['id'],'appCode':_0x282c5c[_0x387b2f(0xa7)],'functionName':_0x282c5c[_0x387b2f(0xb7)]??'','scriptType':_0x282c5c[_0x387b2f(0xba)],'description':_0x282c5c[_0x387b2f(0xad)]||'(none)','createdTime':_0x282c5c['createdTime']??'','updatedTime':_0x282c5c['updatedTime']??''}};}};function a8_0x100f(){const _0x4b00ae=['verbose','3086090cJnCuL','35RVapMZ','bool','11ozyJLu','44265IJeIju','16MJneXm','4830973SJRwdo','bff','functionName','Script\x20ID','17407440qtWgap','scriptType','read','appCode','Get\x20BFF\x20script\x20details\x20by\x20ID','51QSxQEZ','269380ONBLSf','921444BIatwE','3484972HfiLtq','description'];a8_0x100f=function(){return _0x4b00ae;};return a8_0x100f();}
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a9_0x356ca9=a9_0x139b;(function(_0x2e698e,_0x4246ef){const _0x3262e7=a9_0x139b,_0xfb7855=_0x2e698e();while(!![]){try{const _0x4dd071=parseInt(_0x3262e7(0x1b9))/0x1+-parseInt(_0x3262e7(0x1b3))/0x2*(parseInt(_0x3262e7(0x1ba))/0x3)+-parseInt(_0x3262e7(0x1b0))/0x4+parseInt(_0x3262e7(0x1b7))/0x5*(parseInt(_0x3262e7(0x1bc))/0x6)+-parseInt(_0x3262e7(0x1ad))/0x7*(-parseInt(_0x3262e7(0x1b6))/0x8)+parseInt(_0x3262e7(0x1b4))/0x9+-parseInt(_0x3262e7(0x1b8))/0xa;if(_0x4dd071===_0x4246ef)break;else _0xfb7855['push'](_0xfb7855['shift']());}catch(_0x49c3d3){_0xfb7855['push'](_0xfb7855['shift']());}}}(a9_0x409a,0x82185));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_0x356ca9(0x1b2),'command':'exec','description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a9_0x356ca9(0x1af),'flags':[{...NAME_FLAG,'required':!![],'description':a9_0x356ca9(0x1bb)},PARAMS_FLAG],async 'execute'(_0x3536f3){const _0x4667b9=a9_0x356ca9,_0x8a1eb=parseJsonParams(_0x3536f3[_0x4667b9(0x1ab)](_0x4667b9(0x1ae))),_0x1b38d9=Date[_0x4667b9(0x1b1)](),_0x52792a=await executeSdkBff(_0x3536f3[_0x4667b9(0x1ab)](_0x4667b9(0x1ac)),_0x8a1eb),_0x146ebe=Date[_0x4667b9(0x1b1)]()-_0x1b38d9;return{'ok':!![],'data':{'result':_0x52792a,'elapsed':_0x146ebe},'message':_0x4667b9(0x1b5)+_0x146ebe+'ms'};}};function a9_0x139b(_0x37a4a9,_0x346b8f){_0x37a4a9=_0x37a4a9-0x1ab;const _0x409aab=a9_0x409a();let _0x139b1d=_0x409aab[_0x37a4a9];return _0x139b1d;}function a9_0x409a(){const _0x1245af=['813312dOXFsA','now','bff','1542Gamzem','695988GbGoLA','BFF\x20executed\x20in\x20','253400GOtOFC','1129295WhIFcF','6716490cujXEh','331328bWnRjy','951QwICrK','BFF\x20function\x20name\x20to\x20execute','12wmpPxa','str','name','175AsgQja','params','read'];a9_0x409a=function(){return _0x1245af;};return a9_0x409a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5a94e6,_0x89f9ea){const _0x3ba28f=a10_0x4ae3,_0x369657=_0x5a94e6();while(!![]){try{const _0x5dd9bd=parseInt(_0x3ba28f(0xa6))/0x1+-parseInt(_0x3ba28f(0xa5))/0x2+-parseInt(_0x3ba28f(0xa9))/0x3+parseInt(_0x3ba28f(0xa4))/0x4*(parseInt(_0x3ba28f(0xa2))/0x5)+-parseInt(_0x3ba28f(0xa7))/0x6+-parseInt(_0x3ba28f(0xa3))/0x7+parseInt(_0x3ba28f(0xa8))/0x8*(parseInt(_0x3ba28f(0xa1))/0x9);if(_0x5dd9bd===_0x89f9ea)break;else _0x369657['push'](_0x369657['shift']());}catch(_0x12b5ae){_0x369657['push'](_0x369657['shift']());}}}(a10_0x21da,0xebe51));function a10_0x21da(){const _0x47965d=['8935440QJAWmT','8zzfcfh','4257792gFiDHu','51711444vsYWFP','815HfVjAg','8583253DXLcwO','17804xGdQcZ','3577638MuUqkj','418498LkkBay'];a10_0x21da=function(){return _0x47965d;};return a10_0x21da();}function a10_0x4ae3(_0x48868b,_0x5aa105){_0x48868b=_0x48868b-0xa1;const _0x21da4e=a10_0x21da();let _0x4ae358=_0x21da4e[_0x48868b];return _0x4ae358;}import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32d882,_0x2573f3){const _0x35ca0e=a11_0xc621,_0x205519=_0x32d882();while(!![]){try{const _0x2d5975=parseInt(_0x35ca0e(0x1fc))/0x1*(parseInt(_0x35ca0e(0x1f7))/0x2)+parseInt(_0x35ca0e(0x1fb))/0x3*(-parseInt(_0x35ca0e(0x1f6))/0x4)+parseInt(_0x35ca0e(0x1f9))/0x5+parseInt(_0x35ca0e(0x1f2))/0x6+parseInt(_0x35ca0e(0x1f5))/0x7+parseInt(_0x35ca0e(0x1ee))/0x8+parseInt(_0x35ca0e(0x1f0))/0x9*(-parseInt(_0x35ca0e(0x1f1))/0xa);if(_0x2d5975===_0x2573f3)break;else _0x205519['push'](_0x205519['shift']());}catch(_0x2ab4c3){_0x205519['push'](_0x205519['shift']());}}}(a11_0x5bf4,0x58575));import{CLI_BIN_NAME}from'../../constant/cli.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';function a11_0x5bf4(){const _0x5bb070=['global-default','project','4377720svcysT','inProject','27FgNtAI','4801370LMbtae','3968634gyVhfO','project-default','validation','1704738rhjtYj','1954220KrOXDb','29210BjrUup','global','980015nrkKeg','\x20(global)','3ykDRag','44sMffzd','Add\x20--global\x20to\x20write\x20to\x20~/.lovrabet.json,\x20or\x20run\x20`','project-or-global-explicit'];a11_0x5bf4=function(){return _0x5bb070;};return a11_0x5bf4();}function a11_0xc621(_0x5acc54,_0x4617db){_0x5acc54=_0x5acc54-0x1ed;const _0x5bf419=a11_0x5bf4();let _0xc621db=_0x5bf419[_0x5acc54];return _0xc621db;}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(_0x414778){const _0xd2ff38=a11_0xc621,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0xb229dd}=_0x414778;if(explicitGlobal&&explicitProject)throw CliErrors[_0xd2ff38(0x1f4)]('Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','Use\x20only\x20one\x20config\x20scope\x20flag.');if(explicitGlobal)return _0xd2ff38(0x1f8);if(explicitProject)return _0xd2ff38(0x1ed);switch(_0xb229dd){case _0xd2ff38(0x1ff):return _0xd2ff38(0x1f8);case _0xd2ff38(0x1f3):return _0x414778[_0xd2ff38(0x1ef)]??isInProject()?_0xd2ff38(0x1ed):_0xd2ff38(0x1f8);case _0xd2ff38(0x1fe):if(!(_0x414778[_0xd2ff38(0x1ef)]??isInProject()))throw CliErrors[_0xd2ff38(0x1f4)]('Not\x20inside\x20a\x20project\x20(no\x20.lovrabet.json\x20found).',_0xd2ff38(0x1fd)+CLI_BIN_NAME+'\x20init`\x20first.');return'project';}}export function toScopeFlags(_0x1edd95){const _0x1ee1ba=a11_0xc621;return{'global':_0x1edd95===_0x1ee1ba(0x1f8)};}export function formatScopeLabel(_0xbea7a9){const _0x4b38ba=a11_0xc621;return _0xbea7a9===_0x4b38ba(0x1f8)?_0x4b38ba(0x1fa):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x75f55e,_0x3a59a4){const _0x4e70b7=a12_0x482c,_0xbfd425=_0x75f55e();while(!![]){try{const _0x2d257e=parseInt(_0x4e70b7(0x14b))/0x1*(parseInt(_0x4e70b7(0x148))/0x2)+-parseInt(_0x4e70b7(0x15b))/0x3+-parseInt(_0x4e70b7(0x151))/0x4+parseInt(_0x4e70b7(0x15e))/0x5+-parseInt(_0x4e70b7(0x149))/0x6*(-parseInt(_0x4e70b7(0x15f))/0x7)+parseInt(_0x4e70b7(0x145))/0x8*(parseInt(_0x4e70b7(0x159))/0x9)+-parseInt(_0x4e70b7(0x14a))/0xa*(parseInt(_0x4e70b7(0x158))/0xb);if(_0x2d257e===_0x3a59a4)break;else _0xbfd425['push'](_0xbfd425['shift']());}catch(_0x57a5c1){_0xbfd425['push'](_0xbfd425['shift']());}}}(a12_0x2f22,0x6148f));import{CliErrors}from'../../errors.js';function isSet(_0x3454d0,_0x1e3c4c){const _0x2647d8=a12_0x482c,_0x4158de=_0x3454d0[_0x2647d8(0x157)](_0x1e3c4c);return _0x4158de!==undefined&&_0x4158de!==''&&_0x4158de!==![]&&_0x4158de!==0x0;}function a12_0x482c(_0x3c6bfa,_0x326891){_0x3c6bfa=_0x3c6bfa-0x143;const _0x2f22d9=a12_0x2f22();let _0x482c09=_0x2f22d9[_0x3c6bfa];return _0x482c09;}function fmtNames(_0x1e909c){const _0x30f03b=a12_0x482c;return _0x1e909c[_0x30f03b(0x143)](_0x3221ac=>'--'+_0x3221ac)[_0x30f03b(0x15d)](',\x20');}export function requireOneOf(_0x99df2a,_0x15f865,_0x381f46){const _0x318ea0=a12_0x482c,_0x3514fd=_0x15f865[_0x318ea0(0x14e)](_0x4c4917=>isSet(_0x99df2a,_0x4c4917));if(_0x3514fd[_0x318ea0(0x154)]!==0x1)throw CliErrors[_0x318ea0(0x152)](_0x3514fd[_0x318ea0(0x154)]===0x0?_0x318ea0(0x147)+fmtNames(_0x15f865)+_0x318ea0(0x14f)+_0x381f46+'`.':_0x318ea0(0x155)+fmtNames(_0x15f865)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x3514fd)+'.',_0x3514fd[_0x318ea0(0x154)]===0x0?_0x318ea0(0x15c)+fmtNames(_0x15f865):_0x318ea0(0x144));}export function requireAnyOf(_0x221133,_0x3b393c,_0x3bb097){const _0x1d4fc2=a12_0x482c;if(!_0x3b393c[_0x1d4fc2(0x146)](_0x1ef519=>isSet(_0x221133,_0x1ef519)))throw CliErrors[_0x1d4fc2(0x152)]('At\x20least\x20one\x20of\x20'+fmtNames(_0x3b393c)+_0x1d4fc2(0x14f)+_0x3bb097+'`.','Provide\x20one\x20of:\x20'+fmtNames(_0x3b393c));}export function mutuallyExclusive(_0x374889,_0x156788,_0x9ab98d){const _0x25d933=a12_0x482c,_0x24a029=_0x156788['filter'](_0x5aa521=>isSet(_0x374889,_0x5aa521));if(_0x24a029[_0x25d933(0x154)]>0x1)throw CliErrors['validation'](_0x25d933(0x14d)+fmtNames(_0x24a029)+'\x20are\x20mutually\x20exclusive\x20for\x20`'+_0x9ab98d+'`.',_0x25d933(0x153)+fmtNames(_0x156788));}export function validatePattern(_0x58f014,_0x5d1dbc,_0x4afaf9,_0x47c7cd){const _0x3c2575=a12_0x482c,_0x39bff2=_0x58f014[_0x3c2575(0x156)](_0x5d1dbc);if(_0x39bff2&&!_0x4afaf9[_0x3c2575(0x150)](_0x39bff2))throw CliErrors[_0x3c2575(0x152)](_0x3c2575(0x15a)+_0x5d1dbc+_0x3c2575(0x14c)+_0x47c7cd+',\x20got\x20\x22'+_0x39bff2+'\x22.');}function a12_0x2f22(){const _0x5bc517=['79497XqZopz','Invalid\x20--','705537xUKOeG','Provide\x20one\x20of:\x20','join','3942655MRRBew','1012011dETYTC','map','Remove\x20all\x20but\x20one.','376jCdqOE','some','Exactly\x20one\x20of\x20','8hLUVun','18RvxFpi','142540pQWdNr','8047lEfpTH',':\x20expected\x20','Flags\x20','filter','\x20is\x20required\x20for\x20`','test','3060420rVhpAv','validation','Use\x20only\x20one\x20of:\x20','length','Only\x20one\x20of\x20','str','flag','209ahveje'];a12_0x2f22=function(){return _0x5bc517;};return a12_0x2f22();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x1ba19f=a13_0x1dc8;(function(_0xa49939,_0x5d7620){const _0x1789b1=a13_0x1dc8,_0x426fee=_0xa49939();while(!![]){try{const _0x5d9818=parseInt(_0x1789b1(0x66))/0x1+-parseInt(_0x1789b1(0x6a))/0x2+parseInt(_0x1789b1(0x72))/0x3*(-parseInt(_0x1789b1(0x6f))/0x4)+parseInt(_0x1789b1(0x69))/0x5+-parseInt(_0x1789b1(0x71))/0x6+parseInt(_0x1789b1(0x75))/0x7+parseInt(_0x1789b1(0x73))/0x8*(parseInt(_0x1789b1(0x64))/0x9);if(_0x5d9818===_0x5d7620)break;else _0x426fee['push'](_0x426fee['shift']());}catch(_0x1d566f){_0x426fee['push'](_0x426fee['shift']());}}}(a13_0x1843,0x78005));function a13_0x1dc8(_0x5437db,_0x5316b8){_0x5437db=_0x5437db-0x64;const _0x184338=a13_0x1843();let _0x1dc855=_0x184338[_0x5437db];return _0x1dc855;}export const CODE_FLAG={'name':'code','type':a13_0x1ba19f(0x6d),'required':!![],'description':a13_0x1ba19f(0x6c),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':a13_0x1ba19f(0x67),'type':'string','required':!![],'description':a13_0x1ba19f(0x65),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a13_0x1ba19f(0x6e)}};export const VERBOSE_FLAG={'name':'verbose','type':a13_0x1ba19f(0x68),'description':a13_0x1ba19f(0x76)};export const PARAMS_FLAG={'name':'params','type':a13_0x1ba19f(0x6d),'description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':a13_0x1ba19f(0x70),'type':a13_0x1ba19f(0x6d),'description':'Resource\x20name\x20for\x20lookup'};export const ID_FLAG={'name':'id','type':a13_0x1ba19f(0x6b),'required':!![],'description':a13_0x1ba19f(0x74)};function a13_0x1843(){const _0x26fd94=['SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','555604tfwnDk','sqlcode','boolean','1837235jKuVjt','499174puwpxG','number','Dataset\x20code\x20(32-char\x20hex\x20UUID)','string','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','220adReVO','name','2474430XyioKW','33471CKzHmj','48LkqNzn','Resource\x20ID','4543623RqEfyU','Return\x20full\x20raw\x20response\x20object','292518TVZMtx'];a13_0x1843=function(){return _0x26fd94;};return a13_0x1843();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a14_0xd665dd=a14_0x2162;(function(_0x3ff124,_0x468378){const _0x14d66d=a14_0x2162,_0x5254a1=_0x3ff124();while(!![]){try{const _0x34a6a4=parseInt(_0x14d66d(0xb3))/0x1+-parseInt(_0x14d66d(0x98))/0x2+-parseInt(_0x14d66d(0x8a))/0x3+parseInt(_0x14d66d(0x96))/0x4*(-parseInt(_0x14d66d(0xa4))/0x5)+parseInt(_0x14d66d(0x82))/0x6+-parseInt(_0x14d66d(0x8f))/0x7+parseInt(_0x14d66d(0xb0))/0x8;if(_0x34a6a4===_0x468378)break;else _0x5254a1['push'](_0x5254a1['shift']());}catch(_0x58d976){_0x5254a1['push'](_0x5254a1['shift']());}}}(a14_0x2aef,0x7d6cd));import{CliErrors}from'../../errors.js';function a14_0x2162(_0x3af38b,_0x46a039){_0x3af38b=_0x3af38b-0x80;const _0x2aefd6=a14_0x2aef();let _0x216254=_0x2aefd6[_0x3af38b];return _0x216254;}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_0xd665dd(0x9f),'type':a14_0xd665dd(0x94),'description':a14_0xd665dd(0x92),'default':![]},listDef={'service':a14_0xd665dd(0x9d),'command':a14_0xd665dd(0xac),'description':'List\x20current\x20config','risk':a14_0xd665dd(0xb1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x26a8a4){const _0x3a3fd6=a14_0xd665dd,{buildConfigFromFlags:_0x896af7}=await import(_0x3a3fd6(0xb8)),_0x563951=_0x896af7({}),_0x23491c=getProjectConfigPath(),_0x30650f=resolveWriteConfigPath(_0x3a3fd6(0x9f));if(_0x26a8a4[_0x3a3fd6(0xae)]===_0x3a3fd6(0x86))return{'ok':!![],'message':_0x3a3fd6(0xa2)+(JSON[_0x3a3fd6(0x8d)](_0x563951['raw'],null,0x2)+'\x0a\x0a')+_0x3a3fd6(0x99)+(_0x3a3fd6(0xa5)+(_0x23491c??_0x3a3fd6(0xb6))+'\x0a')+(_0x3a3fd6(0x81)+_0x30650f)};return{'ok':!![],'data':{'effective':_0x563951[_0x3a3fd6(0x97)],'configFiles':{'project':_0x23491c??null,'global':_0x30650f}}};}},getDef={'service':'config','command':a14_0xd665dd(0x8e),'description':a14_0xd665dd(0x8c),'risk':a14_0xd665dd(0xb1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0xd665dd(0xa0),'description':a14_0xd665dd(0xb5),'required':!![]}],'flags':[],async 'execute'(_0x203c67){const _0xe9b0ed=a14_0xd665dd,_0x5c6172=_0x203c67[_0xe9b0ed(0xa8)][0x0];if(!_0x5c6172)throw CliErrors[_0xe9b0ed(0xb2)](_0xe9b0ed(0xab),_0xe9b0ed(0xb7)+CLI_BIN_NAME+_0xe9b0ed(0xa7));const {buildConfigFromFlags:_0x1e15d8}=await import(_0xe9b0ed(0xb8)),{raw:_0x3ad913}=_0x1e15d8({});if(_0x5c6172[_0xe9b0ed(0xad)]('.')){const _0x1a4d49=_0x5c6172['split']('.');let _0x4a855c=_0x3ad913;for(const _0x1af90d of _0x1a4d49){if(_0x4a855c==null||typeof _0x4a855c!=='object')throw CliErrors[_0xe9b0ed(0xb2)](_0xe9b0ed(0x9b)+_0x5c6172);_0x4a855c=_0x4a855c[_0x1af90d];}if(_0x4a855c===undefined)throw CliErrors[_0xe9b0ed(0xb2)](_0xe9b0ed(0x9b)+_0x5c6172);return console[_0xe9b0ed(0x9c)](typeof _0x4a855c==='object'?JSON[_0xe9b0ed(0x8d)](_0x4a855c,null,0x2):String(_0x4a855c)),{'ok':!![]};}const _0x5593ea=_0x3ad913[_0x5c6172];if(_0x5593ea===undefined)throw CliErrors[_0xe9b0ed(0xb2)](_0xe9b0ed(0x9b)+_0x5c6172);return console[_0xe9b0ed(0x9c)](typeof _0x5593ea==='object'?JSON['stringify'](_0x5593ea,null,0x2):String(_0x5593ea)),{'ok':!![]};}},setDef={'service':'config','command':a14_0xd665dd(0x95),'description':a14_0xd665dd(0x80),'risk':a14_0xd665dd(0x88),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a14_0xd665dd(0xa0),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a14_0xd665dd(0xa1),'description':a14_0xd665dd(0xa6),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x1b3171){const _0x3719bb=a14_0xd665dd,_0x1ab5f8=_0x1b3171[_0x3719bb(0xa8)][0x0],_0x426b42=_0x1b3171[_0x3719bb(0xa8)][0x1];if(!_0x1ab5f8||_0x426b42===undefined)throw CliErrors[_0x3719bb(0xb2)](_0x3719bb(0xaf),_0x3719bb(0xb7)+CLI_BIN_NAME+_0x3719bb(0x84));if(ENUM_KEYS[_0x1ab5f8]&&!ENUM_KEYS[_0x1ab5f8][_0x3719bb(0xad)](_0x426b42))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x1ab5f8+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x1ab5f8][_0x3719bb(0x9e)](',\x20'));if(_0x1ab5f8===_0x3719bb(0xa9))throw CliErrors[_0x3719bb(0xb2)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x1ab5f8===_0x3719bb(0x83)){const _0x39865e=Number(_0x426b42);if(isNaN(_0x39865e)||_0x39865e<=0x0)throw CliErrors[_0x3719bb(0xb2)]('pageSize\x20must\x20be\x20a\x20positive\x20number');}const _0x1bd200=resolveWriteScope({'explicitGlobal':_0x1b3171[_0x3719bb(0x8b)](_0x3719bb(0x9f)),'policy':'project-or-global-explicit'}),_0x29a346=toScopeFlags(_0x1bd200),_0x15a40a=readScopedConfig(_0x29a346);if(!isTopLevelConfigKey(_0x1ab5f8))throw CliErrors[_0x3719bb(0xb2)](_0x3719bb(0x87)+_0x1ab5f8+'\x22\x20is\x20not\x20settable.',_0x3719bb(0x93)+getTopLevelConfigKeySummary());return _0x15a40a[_0x1ab5f8]=_0x1ab5f8===_0x3719bb(0x83)?Number(_0x426b42):_0x426b42,console[_0x3719bb(0x9c)](_0x3719bb(0x91)+_0x1ab5f8+_0x3719bb(0x90)+_0x426b42+'\x22'+(_0x1bd200===_0x3719bb(0x9f)?'\x20(global)':'')),writeScopedConfig(_0x15a40a,_0x29a346),{'ok':!![]};}},deleteDef={'service':'config','command':a14_0xd665dd(0xb4),'description':'Delete\x20a\x20config\x20value','risk':a14_0xd665dd(0x88),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x26133f){const _0x4fc390=a14_0xd665dd,_0x3cc27b=_0x26133f['args'][0x0];if(!_0x3cc27b)throw CliErrors['validation'](_0x4fc390(0xab),_0x4fc390(0xb7)+CLI_BIN_NAME+_0x4fc390(0x85));const _0x27de13=resolveWriteScope({'explicitGlobal':_0x26133f['bool'](_0x4fc390(0x9f)),'policy':_0x4fc390(0x89)}),_0x1d3e1e=toScopeFlags(_0x27de13),_0x27892e=readScopedConfig(_0x1d3e1e);if(_0x27892e[_0x3cc27b]===undefined)throw CliErrors[_0x4fc390(0xb2)](_0x4fc390(0x9a)+_0x3cc27b+_0x4fc390(0xa3));return delete _0x27892e[_0x3cc27b],console[_0x4fc390(0x9c)](_0x4fc390(0xaa)+_0x3cc27b+'`'+(_0x27de13===_0x4fc390(0x9f)?'\x20(global)':'')),writeScopedConfig(_0x27892e,_0x1d3e1e),{'ok':!![]};}};function a14_0x2aef(){const _0x4cbd00=['get','5369854DUOnOP','`\x20=\x20\x22','Set\x20`','Write\x20to\x20global\x20config','Settable\x20top-level\x20keys:\x20','boolean','set','492164QoXvST','raw','1178064mmRxbW','Config\x20files:\x0a','Key\x20\x22','Key\x20not\x20found:\x20','log','config','join','global','key','value','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','\x22\x20not\x20found\x20at\x20top\x20level.','5LacbNC','\x20\x20project:\x20','Value\x20to\x20assign','\x20config\x20get\x20<key>','args','riskLevel','Deleted\x20`','Missing\x20key\x20argument.','list','includes','format','Missing\x20key\x20or\x20value.','5455920wglfZs','read','validation','1015914ARWQds','delete','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','(none)','Usage:\x20','../../context.js','Set\x20a\x20config\x20value','\x20\x20global:\x20\x20','4265160WZwOfv','pageSize','\x20config\x20set\x20<key>\x20<value>\x20[--global]','\x20config\x20delete\x20<key>\x20[--global]','pretty','Top-level\x20key\x20\x22','write','project-or-global-explicit','1247484SLfxWV','bool','Get\x20a\x20config\x20value','stringify'];a14_0x2aef=function(){return _0x4cbd00;};return a14_0x2aef();}export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4b9282,_0x1833ac){var _0x328b80=a15_0x1a0a,_0x3703fe=_0x4b9282();while(!![]){try{var _0xf83b19=parseInt(_0x328b80(0x176))/0x1+parseInt(_0x328b80(0x17c))/0x2+parseInt(_0x328b80(0x17b))/0x3+-parseInt(_0x328b80(0x17d))/0x4*(parseInt(_0x328b80(0x17e))/0x5)+parseInt(_0x328b80(0x178))/0x6*(-parseInt(_0x328b80(0x175))/0x7)+parseInt(_0x328b80(0x17a))/0x8+parseInt(_0x328b80(0x177))/0x9*(-parseInt(_0x328b80(0x179))/0xa);if(_0xf83b19===_0x1833ac)break;else _0x3703fe['push'](_0x3703fe['shift']());}catch(_0x1b9a74){_0x3703fe['push'](_0x3703fe['shift']());}}}(a15_0xb88e,0xcce5f));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a15_0x1a0a(_0xc1b869,_0x4a065c){_0xc1b869=_0xc1b869-0x175;var _0xb88ea8=a15_0xb88e();var _0x1a0ab1=_0xb88ea8[_0xc1b869];return _0x1a0ab1;}function a15_0xb88e(){var _0x5cb5b6=['45JHhltO','144XwMmcN','3202960QKNaax','1671760RdbabA','3760593CHWGBX','3106734UPBzQg','144GmESYL','119995MxbWqH','11746YKueFL','329111hOpWYy'];a15_0xb88e=function(){return _0x5cb5b6;};return a15_0xb88e();}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';
|