@lovrabet/lovrabet-cli 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +184 -0
- 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 -0
- 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 -0
- 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 -0
- 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 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -2
- package/lib/commands/init/index.js +0 -1
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0xec64c8=a53_0x1b80;(function(_0x373997,_0x334dd3){const _0x387b63=a53_0x1b80,_0x4adcc5=_0x373997();while(!![]){try{const _0x444e67=-parseInt(_0x387b63(0x1bc))/0x1+-parseInt(_0x387b63(0x1a1))/0x2*(-parseInt(_0x387b63(0x1ad))/0x3)+parseInt(_0x387b63(0x19b))/0x4*(-parseInt(_0x387b63(0x1a0))/0x5)+parseInt(_0x387b63(0x19d))/0x6*(-parseInt(_0x387b63(0x1b5))/0x7)+parseInt(_0x387b63(0x1aa))/0x8+parseInt(_0x387b63(0x1b3))/0x9*(-parseInt(_0x387b63(0x1b7))/0xa)+-parseInt(_0x387b63(0x1ae))/0xb*(-parseInt(_0x387b63(0x1b8))/0xc);if(_0x444e67===_0x334dd3)break;else _0x4adcc5['push'](_0x4adcc5['shift']());}catch(_0x95714b){_0x4adcc5['push'](_0x4adcc5['shift']());}}}(a53_0x29a5,0xca7d4));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';function a53_0x29a5(){const _0x11988b=['`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','10tvDuaZ','2hmgNFP','env','format','riskLevel','\x20\x20To\x20proceed:\x20','../core/api-client.js','filter','authRequired','currentApp','13154352WxihiT','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20.lovrabet.json.','defaultVerbose','19911fVlOXS','904706CaeYcv','name','High-risk\x20operation\x20`','appCode','isNonInteractive','63RtJGUF','pageSize','399biPSaU','../core/sdk-client.js','2172710ztASrA','252WwyunP','configMissing','defaultApp','cancelled','92459ylFBBm','apiDomain','verbose','map','Set\x20accessKey\x20in\x20.lovrabet.json\x20or\x20pass\x20LOVRABET_ACCESS_KEY.','error','validation','defaultPageSize','75076hInfET','mergedCli','94506JCCBUW','accessKey'];a53_0x29a5=function(){return _0x11988b;};return a53_0x29a5();}import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';function a53_0x1b80(_0x1c9ee3,_0x239a2d){_0x1c9ee3=_0x1c9ee3-0x19a;const _0x29a5a9=a53_0x29a5();let _0x1b80dd=_0x29a5a9[_0x1c9ee3];return _0x1b80dd;}import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';export function resolveAuthMode(_0x216f9a){return void _0x216f9a,AUTH_MODE['ClientAk'];}export function createPipelineEnv(_0x37d9e1,_0x115043){const _0x3222cc=a53_0x1b80;return{'rawFlags':_0x115043,'appCode':_0x37d9e1['appCode']||process.env.RABETBASE_APPCODE||readAppCodeFromConfig(),'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x115043),'defaultFormat':_0x37d9e1[_0x3222cc(0x1a3)],'defaultPageSize':_0x37d9e1[_0x3222cc(0x1b4)],'defaultVerbose':_0x37d9e1[_0x3222cc(0x1be)],'riskLevel':_0x37d9e1[_0x3222cc(0x1a4)],'accessKey':_0x37d9e1['accessKey'],'env':_0x37d9e1[_0x3222cc(0x1a2)],'mergedCli':{'defaultApp':_0x37d9e1[_0x3222cc(0x1ba)],'currentApp':_0x37d9e1[_0x3222cc(0x1a9)],'appCode':_0x37d9e1[_0x3222cc(0x1b1)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a53_0xec64c8(0x1a7)](_0xfefbd3=>PIPELINE_FLAG_NAMES['has'](_0xfefbd3[a53_0xec64c8(0x1af)]))[a53_0xec64c8(0x1bf)](({name:_0x1b5a7e,type:_0x4d841d,description:_0x801c5d})=>({'name':_0x1b5a7e,'type':_0x4d841d,'description':_0x801c5d})),'formatOutput':formatOutput,'getCommandLabel'(_0x471bad){return CLI_BIN_NAME+'\x20'+_0x471bad['service']+'\x20'+_0x471bad['command'];},'riskPolicy':{'onViolation'(_0x2d3db1){const _0x3a32d2=a53_0xec64c8;console[_0x3a32d2(0x1c1)](_0x2d3db1);},'createError'(_0x100f96){const _0x97df80=a53_0xec64c8;return CliErrors[_0x97df80(0x1bb)](_0x100f96);}},async 'prepare'(_0xcf12b0,_0x253f20){const _0x39d0a1=a53_0xec64c8,_0x101eba=resolveAuthMode(_0x253f20);if(_0xcf12b0['requiresAuth']!==![]){if(!_0x253f20[_0x39d0a1(0x19e)])throw CliErrors[_0x39d0a1(0x1a8)](_0x39d0a1(0x1c0));const {setActiveAK:_0x4f1498}=await import(_0x39d0a1(0x1a6));_0x4f1498(_0x253f20['accessKey']);}let _0x2e24bc='';if(_0xcf12b0['requiresAppCode']!==![]){_0x2e24bc=_0x253f20[_0x39d0a1(0x1b1)]??'';if(!_0x2e24bc)throw CliErrors[_0x39d0a1(0x1b9)](_0x39d0a1(0x1ab));}if(_0x2e24bc){const {initSdkClient:_0x1a9ba7}=await import(_0x39d0a1(0x1b6));_0x1a9ba7({'appCode':_0x2e24bc,'env':_0x253f20[_0x39d0a1(0x1a2)]??'production','accessKey':_0x253f20[_0x39d0a1(0x19e)],'authMode':_0x101eba});}return{'defaults':{'booleans':{'verbose':_0x253f20[_0x39d0a1(0x1ac)]},'numbers':{'pagesize':_0x253f20[_0x39d0a1(0x19a)]}},'extras':{'appCode':_0x2e24bc,'cookie':'','apiDomain':_0x253f20[_0x39d0a1(0x1bd)],'apiDir':'','accessKey':_0x253f20[_0x39d0a1(0x19e)],'envName':_0x253f20[_0x39d0a1(0x1a2)],'mergedCli':_0x253f20[_0x39d0a1(0x19c)]}};},async 'confirmHighRisk'({def:_0x3cd3da,env:_0x377bbe,flags:_0x59d485,commandLabel:_0x4021cc}){const _0xfeab12=a53_0xec64c8;if(_0x377bbe[_0xfeab12(0x1b2)]){const _0x19d77e=reconstructCommandArgv(_0x3cd3da,_0x59d485);throw CliErrors[_0xfeab12(0x1c2)](_0xfeab12(0x1b0)+_0x4021cc+_0xfeab12(0x19f)+(_0xfeab12(0x1a5)+_0x19d77e));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x3cd3da,_0x4021cc,_0x59d485),'createCancelledError':_0x3dc9dc=>CliErrors[_0xfeab12(0x1bb)](_0x3dc9dc)});},'mapDryRunError'(_0x382f44){return mapUserFacingExecuteError(_0x382f44);},'mapExecuteError'(_0x2e7a65){return mapUserFacingExecuteError(_0x2e7a65);},async 'finalize'(){const _0x4e39e1=a53_0xec64c8,{clearActiveAK:_0x19c974}=await import(_0x4e39e1(0x1a6));_0x19c974();}};export async function runCommand(_0x439df2,_0x876823){await runCommandWithAdapter(_0x439df2,_0x876823,runnerAdapter);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x34c2f1,_0x9183b8){const _0x39a2f1=a54_0x50b9,_0x511425=_0x34c2f1();while(!![]){try{const _0x1ff1b0=-parseInt(_0x39a2f1(0x158))/0x1+parseInt(_0x39a2f1(0x156))/0x2+-parseInt(_0x39a2f1(0x15c))/0x3+-parseInt(_0x39a2f1(0x157))/0x4+parseInt(_0x39a2f1(0x159))/0x5*(-parseInt(_0x39a2f1(0x15a))/0x6)+-parseInt(_0x39a2f1(0x15e))/0x7*(parseInt(_0x39a2f1(0x15b))/0x8)+parseInt(_0x39a2f1(0x15d))/0x9;if(_0x1ff1b0===_0x9183b8)break;else _0x511425['push'](_0x511425['shift']());}catch(_0x304c60){_0x511425['push'](_0x511425['shift']());}}}(a54_0x3c08,0x508f7));function a54_0x50b9(_0x44190e,_0x43d361){_0x44190e=_0x44190e-0x156;const _0x3c0810=a54_0x3c08();let _0x50b980=_0x3c0810[_0x44190e];return _0x50b980;}import{buildSchemaPayload as a54_0x588065}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a54_0x3c08(){const _0x3788c6=['1153125SCDAPZ','13745187qZfUtY','21MaIKDb','1032414dMSJva','2282092dtChKX','156356hoCExT','250dsUTEB','33240NktUSO','867256hcTQnY'];a54_0x3c08=function(){return _0x3788c6;};return a54_0x3c08();}import{getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const {serviceRegistry:_0x283de1,findDefinition:_0x31f5bc}=await import('../commands/registry.js');return a54_0x588065({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':process.env.GIT_COMMIT??'','globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x283de1,'buildAllFlags':buildAllFlags,'findDefinition':_0x31f5bc});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2c782f,_0x4b4f5c){var _0x204bcc=a55_0x1d45,_0x4bcb52=_0x2c782f();while(!![]){try{var _0x5913f8=-parseInt(_0x204bcc(0x17d))/0x1*(-parseInt(_0x204bcc(0x17a))/0x2)+parseInt(_0x204bcc(0x181))/0x3*(-parseInt(_0x204bcc(0x17e))/0x4)+parseInt(_0x204bcc(0x17b))/0x5+parseInt(_0x204bcc(0x17f))/0x6*(-parseInt(_0x204bcc(0x184))/0x7)+-parseInt(_0x204bcc(0x17c))/0x8+parseInt(_0x204bcc(0x180))/0x9+-parseInt(_0x204bcc(0x182))/0xa*(-parseInt(_0x204bcc(0x183))/0xb);if(_0x5913f8===_0x4b4f5c)break;else _0x4bcb52['push'](_0x4bcb52['shift']());}catch(_0x29901d){_0x4bcb52['push'](_0x4bcb52['shift']());}}}(a55_0x371b,0x8161c));function a55_0x1d45(_0x23ba4a,_0x16d535){_0x23ba4a=_0x23ba4a-0x17a;var _0x371b73=a55_0x371b();var _0x1d4534=_0x371b73[_0x23ba4a];return _0x1d4534;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a55_0x371b(){var _0x3750a6=['4514296idenIQ','667736YivilM','8IWQRKv','2439858siIbdH','2079657umsWeV','1419780rpsSBo','10OwQfCM','21454994GmpsRy','14WtygdS','2nfBlYr','23890EAtwcV'];a55_0x371b=function(){return _0x3750a6;};return a55_0x371b();}
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ee85d,_0x3d0683){const _0x383960=a56_0x2561,_0x5a1333=_0x2ee85d();while(!![]){try{const _0x4bbe1a=parseInt(_0x383960(0x203))/0x1*(-parseInt(_0x383960(0x1f4))/0x2)+parseInt(_0x383960(0x1f6))/0x3+-parseInt(_0x383960(0x1f8))/0x4*(-parseInt(_0x383960(0x1fe))/0x5)+-parseInt(_0x383960(0x200))/0x6+parseInt(_0x383960(0x1f5))/0x7+-parseInt(_0x383960(0x1fa))/0x8*(-parseInt(_0x383960(0x1f7))/0x9)+parseInt(_0x383960(0x1fb))/0xa*(-parseInt(_0x383960(0x1ff))/0xb);if(_0x4bbe1a===_0x3d0683)break;else _0x5a1333['push'](_0x5a1333['shift']());}catch(_0x1cf61c){_0x5a1333['push'](_0x5a1333['shift']());}}}(a56_0x44e3,0x63019));import{jsx as a56_0x710166,jsxs as a56_0x239e7a}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a56_0x44e3(){const _0x4188b6=['\x20--help','2170XLFKsy','7667DUfoTW','4213002rRDhsN','green','\x20\x20Use\x20','19656hUKReW','34XBYPhK','4971708vBprct','1085184NnKOSq','387odqZwI','3728gNllBB','\x20to\x20view\x20available\x20commands.','952PcMRdk','570JcVKbW','column'];a56_0x44e3=function(){return _0x4188b6;};return a56_0x44e3();}function a56_0x2561(_0x5b6540,_0x529a82){_0x5b6540=_0x5b6540-0x1f4;const _0x44e3bb=a56_0x44e3();let _0x256172=_0x44e3bb[_0x5b6540];return _0x256172;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x9e3e1b=a56_0x2561,{exit:_0x1813d2}=useApp();return useEffect(()=>{_0x1813d2();},[_0x1813d2]),a56_0x239e7a(Box,{'flexDirection':_0x9e3e1b(0x1fc),'marginTop':0x1,'marginBottom':0x1,'children':[a56_0x710166(Box,{'children':a56_0x710166(Text,{'bold':!![],'color':_0x9e3e1b(0x201),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a56_0x239e7a(Box,{'marginTop':0x1,'children':[a56_0x710166(Text,{'dimColor':!![],'children':_0x9e3e1b(0x202)}),a56_0x710166(Text,{'bold':!![],'color':_0x9e3e1b(0x201),'children':CLI_BIN_NAME+_0x9e3e1b(0x1fd)}),a56_0x710166(Text,{'dimColor':!![],'children':_0x9e3e1b(0x1f9)})]})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a57_0x16bece=a57_0x369e;(function(_0x48b30f,_0x397d34){const _0x5248fa=a57_0x369e,_0x1250fb=_0x48b30f();while(!![]){try{const _0x483899=parseInt(_0x5248fa(0x1cb))/0x1*(parseInt(_0x5248fa(0x1dd))/0x2)+-parseInt(_0x5248fa(0x1ce))/0x3*(-parseInt(_0x5248fa(0x1d3))/0x4)+parseInt(_0x5248fa(0x1de))/0x5+-parseInt(_0x5248fa(0x1c6))/0x6+-parseInt(_0x5248fa(0x1d7))/0x7*(parseInt(_0x5248fa(0x1db))/0x8)+-parseInt(_0x5248fa(0x1d9))/0x9*(parseInt(_0x5248fa(0x1dc))/0xa)+-parseInt(_0x5248fa(0x1df))/0xb*(-parseInt(_0x5248fa(0x1d5))/0xc);if(_0x483899===_0x397d34)break;else _0x1250fb['push'](_0x1250fb['shift']());}catch(_0x207066){_0x1250fb['push'](_0x1250fb['shift']());}}}(a57_0x5bb6,0x49989));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a57_0x369e(_0x296533,_0x106551){_0x296533=_0x296533-0x1c6;const _0x5bb603=a57_0x5bb6();let _0x369eb5=_0x5bb603[_0x296533];return _0x369eb5;}export const LOVRABET_SKILL_SOURCE=a57_0x16bece(0x1cd);export const LOVRABET_SKIP_NPX_SKILLS_ENV=a57_0x16bece(0x1d0);function a57_0x5bb6(){const _0x1e0bd5=['lovrabet/lovrabet-cli','39tFJWiM','toString','LOVRABET_SKIP_NPX_SKILLS','exit\x20','skills','117692CEfRDV','npx','72kpUBEK','unknown','28xxiMSz','stdout','738efcaNQ','stderr','564944uYrEaz','39070BRgUmm','422QrOUyI','636075sVnHNd','665335KGvQwF','1224096oGWbYk','status','add','trim','join','1117tCYuMM','inherit'];a57_0x5bb6=function(){return _0x1e0bd5;};return a57_0x5bb6();}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x5a9d7c,_0x3be9b0=LOVRABET_SKILL_SOURCE,_0x2e8c15){const _0x540c94=a57_0x16bece;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x4dd10b=_0x2e8c15?.['stdio']??_0x540c94(0x1cc),_0x420d3f=resolveNpmBin(_0x540c94(0x1d4)),_0x205c4f=[_0x540c94(0x1d2),_0x540c94(0x1c8),_0x3be9b0,'-g','-y'],_0x3aade0=[_0x420d3f,..._0x205c4f][_0x540c94(0x1ca)]('\x20');console['log']('*\x20'+_0x3aade0);const _0x1543b3=spawnSync(_0x420d3f,_0x205c4f,{'cwd':_0x5a9d7c,'stdio':_0x4dd10b,'env':process.env,'shell':![]});if(_0x1543b3[_0x540c94(0x1c7)]===0x0)return{'ok':!![],'status':0x0};let _0x4bee8b=_0x540c94(0x1d1)+(_0x1543b3['status']??_0x540c94(0x1d6));if(_0x4dd10b==='pipe'){const _0x4f6a5e=_0x1543b3[_0x540c94(0x1da)]?_0x1543b3[_0x540c94(0x1da)][_0x540c94(0x1cf)]()[_0x540c94(0x1c9)]():'',_0x50720a=_0x1543b3[_0x540c94(0x1d8)]?_0x1543b3[_0x540c94(0x1d8)][_0x540c94(0x1cf)]()[_0x540c94(0x1c9)]():'';if(_0x4f6a5e)_0x4bee8b=_0x4f6a5e;else{if(_0x50720a)_0x4bee8b=_0x50720a;}}return{'ok':![],'status':_0x1543b3[_0x540c94(0x1c7)]??null,'error':_0x4bee8b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x42f6a1,_0x11a427){const _0x5ef103=a58_0x24f7,_0x30b444=_0x42f6a1();while(!![]){try{const _0x36c1bd=-parseInt(_0x5ef103(0x7d))/0x1*(parseInt(_0x5ef103(0x79))/0x2)+-parseInt(_0x5ef103(0x7c))/0x3+parseInt(_0x5ef103(0x76))/0x4*(-parseInt(_0x5ef103(0x78))/0x5)+-parseInt(_0x5ef103(0x7a))/0x6*(-parseInt(_0x5ef103(0x7e))/0x7)+parseInt(_0x5ef103(0x7f))/0x8+parseInt(_0x5ef103(0x7b))/0x9*(-parseInt(_0x5ef103(0x80))/0xa)+parseInt(_0x5ef103(0x75))/0xb*(parseInt(_0x5ef103(0x77))/0xc);if(_0x36c1bd===_0x11a427)break;else _0x30b444['push'](_0x30b444['shift']());}catch(_0x36835a){_0x30b444['push'](_0x30b444['shift']());}}}(a58_0x1b0c,0x6d4e4));function a58_0x24f7(_0x2d8aa9,_0x4490d7){_0x2d8aa9=_0x2d8aa9-0x75;const _0x1b0c75=a58_0x1b0c();let _0x24f7bf=_0x1b0c75[_0x2d8aa9];return _0x24f7bf;}import{createJqFilter}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a58_0x1b0c(){const _0x30a0c0=['437153UVDHnu','7VcnRRI','5101096yGtDpA','10BFOcJc','27786ZLuQjh','230820teRYLi','6552UkcKWI','65ADNHoO','2ISazsg','901206ktluRH','180333CkXTqm','1535889PsCfnK'];a58_0x1b0c=function(){return _0x30a0c0;};return a58_0x1b0c();}export const applyJqFilter=createJqFilter(CliErrors);
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x544bf5=a59_0xcab1;(function(_0x5e0676,_0x4960df){const _0x501461=a59_0xcab1,_0x2355bf=_0x5e0676();while(!![]){try{const _0x5ab552=parseInt(_0x501461(0x201))/0x1*(parseInt(_0x501461(0x21b))/0x2)+-parseInt(_0x501461(0x1fb))/0x3+parseInt(_0x501461(0x208))/0x4+-parseInt(_0x501461(0x1f5))/0x5*(parseInt(_0x501461(0x1f7))/0x6)+-parseInt(_0x501461(0x206))/0x7+-parseInt(_0x501461(0x21c))/0x8+parseInt(_0x501461(0x1ff))/0x9;if(_0x5ab552===_0x4960df)break;else _0x2355bf['push'](_0x2355bf['shift']());}catch(_0x46b848){_0x2355bf['push'](_0x2355bf['shift']());}}}(a59_0x451a,0xcfd2b));function a59_0xcab1(_0xa32b9e,_0x2b640c){_0xa32b9e=_0xa32b9e-0x1ef;const _0x451a39=a59_0x451a();let _0xcab17a=_0x451a39[_0xa32b9e];return _0xcab17a;}import a59_0x2fa18a from'winston';import a59_0x4a6933 from'node:fs';import a59_0x13ef6a from'node:path';class Logger{[a59_0x544bf5(0x222)];[a59_0x544bf5(0x202)]='';[a59_0x544bf5(0x21d)]='';constructor(){}['setRawCommand'](_0x1aed52){const _0x293dd3=a59_0x544bf5;this[_0x293dd3(0x21d)]=_0x1aed52;}['setLogPath'](_0x3643a6){const _0x1ff582=a59_0x544bf5;this[_0x1ff582(0x202)]=a59_0x13ef6a[_0x1ff582(0x215)](_0x3643a6,_0x1ff582(0x211)),this[_0x1ff582(0x222)]&&this[_0x1ff582(0x222)][_0x1ff582(0x1fe)](),this[_0x1ff582(0x1ef)]();}['initWinstonLogger'](){const _0x7bcb8f=a59_0x544bf5,_0x5a7e45=a59_0x13ef6a[_0x7bcb8f(0x20f)](this['logFilePath']);!a59_0x4a6933[_0x7bcb8f(0x200)](_0x5a7e45)&&a59_0x4a6933['mkdirSync'](_0x5a7e45,{'recursive':!![]});const _0x291279=a59_0x2fa18a[_0x7bcb8f(0x214)][_0x7bcb8f(0x1f0)](a59_0x2fa18a[_0x7bcb8f(0x214)][_0x7bcb8f(0x1f6)](),a59_0x2fa18a['format'][_0x7bcb8f(0x20b)]({'stack':!![]}),a59_0x2fa18a[_0x7bcb8f(0x214)][_0x7bcb8f(0x20d)](_0x38fc1d=>{const _0x230243=_0x7bcb8f,_0x15e238={'timestamp':_0x38fc1d[_0x230243(0x1f6)]||new Date()['toISOString'](),'level':_0x38fc1d['level']||_0x230243(0x212),'command':_0x38fc1d['command']||_0x230243(0x20e),'rawCommand':_0x38fc1d['rawCommand']||this['currentRawCommand']||undefined,'message':_0x38fc1d[_0x230243(0x213)]||'','duration':_0x38fc1d['duration']||undefined,'details':_0x38fc1d[_0x230243(0x21e)]||undefined};return JSON['stringify'](_0x15e238);}));this[_0x7bcb8f(0x222)]=a59_0x2fa18a[_0x7bcb8f(0x219)]({'level':'info','format':_0x291279,'transports':[new a59_0x2fa18a[(_0x7bcb8f(0x220))][(_0x7bcb8f(0x1fd))]({'filename':this['logFilePath'],'level':_0x7bcb8f(0x212)})],'silent':![]}),a59_0x2fa18a['addColors']({'success':'green','error':_0x7bcb8f(0x205),'warn':'yellow','info':_0x7bcb8f(0x1fc)});}[a59_0x544bf5(0x212)](_0x24b5be,_0xb5e31f,_0x136f00){const _0x3e537f=a59_0x544bf5;if(!this[_0x3e537f(0x202)]||!this[_0x3e537f(0x222)])return;this['winstonLogger'][_0x3e537f(0x212)](_0xb5e31f,{'command':_0x24b5be,'details':_0x136f00});}[a59_0x544bf5(0x1f4)](_0x38711e,_0x267ee9,_0x3776c3,_0x168c9c){const _0x50cdd9=a59_0x544bf5;if(!this['logFilePath']||!this[_0x50cdd9(0x222)])return;this['winstonLogger'][_0x50cdd9(0x20a)](_0x50cdd9(0x212),_0x267ee9,{'level':'success','command':_0x38711e,'duration':_0x3776c3,'details':_0x168c9c});}['error'](_0x55f00a,_0x21fd38,_0x2426f6){const _0x5512ac=a59_0x544bf5;if(!this[_0x5512ac(0x202)]||!this[_0x5512ac(0x222)])return;this[_0x5512ac(0x222)]['error'](_0x21fd38,{'command':_0x55f00a,'details':_0x2426f6});}[a59_0x544bf5(0x204)](_0x5835af,_0x53e003,_0x10a6d6){if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger']['warn'](_0x53e003,{'command':_0x5835af,'details':_0x10a6d6});}async[a59_0x544bf5(0x207)](_0x358a7d,_0x581335,_0x440589){const _0x52d4af=a59_0x544bf5,_0x385b07=Date[_0x52d4af(0x1fa)]();this[_0x52d4af(0x212)](_0x358a7d,_0x52d4af(0x218)+_0x581335);try{const _0x5745f8=await _0x440589(),_0x594178=Date[_0x52d4af(0x1fa)]()-_0x385b07;return this[_0x52d4af(0x1f4)](_0x358a7d,_0x52d4af(0x216)+_0x581335,_0x594178),_0x5745f8;}catch(_0x2193f5){const _0x3c1924=Date[_0x52d4af(0x1fa)]()-_0x385b07;this[_0x52d4af(0x223)](_0x358a7d,_0x52d4af(0x210)+_0x581335,{'error':_0x2193f5 instanceof Error?_0x2193f5[_0x52d4af(0x213)]:String(_0x2193f5),'duration':_0x3c1924});throw _0x2193f5;}}[a59_0x544bf5(0x1f9)](){const _0x2abb78=a59_0x544bf5;try{if(!a59_0x4a6933['existsSync'](this[_0x2abb78(0x202)]))return[];const _0xf8c105=a59_0x4a6933[_0x2abb78(0x203)](this[_0x2abb78(0x202)],_0x2abb78(0x217));return _0xf8c105[_0x2abb78(0x1f3)](/\r?\n/)[_0x2abb78(0x221)](_0x1318f1=>_0x1318f1[_0x2abb78(0x1f2)]())[_0x2abb78(0x1f8)](_0x51f62a=>JSON['parse'](_0x51f62a));}catch(_0x1c7a94){return console['warn'](_0x2abb78(0x21f),_0x1c7a94),[];}}[a59_0x544bf5(0x209)](){const _0x1d04bd=a59_0x544bf5;try{a59_0x4a6933[_0x1d04bd(0x200)](this[_0x1d04bd(0x202)])&&a59_0x4a6933[_0x1d04bd(0x20c)](this[_0x1d04bd(0x202)],'',_0x1d04bd(0x217));}catch(_0x2dc065){console[_0x1d04bd(0x204)](_0x1d04bd(0x21a),_0x2dc065);}}[a59_0x544bf5(0x1f1)](){const _0x4f299d=a59_0x544bf5;return this[_0x4f299d(0x222)];}}function a59_0x451a(){const _0x56a380=['now','1812564uYEPqc','blue','File','clear','13711779wOxRlO','existsSync','261131UaXreY','logFilePath','readFileSync','warn','red','9754773RpgZbX','logTask','5707532VBoaWe','clearLogs','log','errors','writeFileSync','printf','unknown','dirname','Failed:\x20','.lovrabet-runtime.log','info','message','format','join','Completed:\x20','utf8','Starting:\x20','createLogger','Failed\x20to\x20clear\x20logs:','10WbiDzx','9675608gwmxFl','currentRawCommand','details','Failed\x20to\x20read\x20logs:','transports','filter','winstonLogger','error','initWinstonLogger','combine','getWinstonInstance','trim','split','success','80cMJpew','timestamp','74118OaCUGi','map','readLogs'];a59_0x451a=function(){return _0x56a380;};return a59_0x451a();}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5090e4,_0x305c84){var _0x105a76=a60_0x1e80,_0xbccd70=_0x5090e4();while(!![]){try{var _0x2466f1=-parseInt(_0x105a76(0xc3))/0x1+-parseInt(_0x105a76(0xc1))/0x2*(-parseInt(_0x105a76(0xca))/0x3)+parseInt(_0x105a76(0xc8))/0x4+parseInt(_0x105a76(0xc0))/0x5*(-parseInt(_0x105a76(0xc9))/0x6)+parseInt(_0x105a76(0xbe))/0x7*(-parseInt(_0x105a76(0xc6))/0x8)+-parseInt(_0x105a76(0xbd))/0x9+parseInt(_0x105a76(0xc4))/0xa;if(_0x2466f1===_0x305c84)break;else _0xbccd70['push'](_0xbccd70['shift']());}catch(_0x54f293){_0xbccd70['push'](_0xbccd70['shift']());}}}(a60_0x1043,0xcd970));function a60_0x1e80(_0x12c0d6,_0x34f29b){_0x12c0d6=_0x12c0d6-0xbd;var _0x104334=a60_0x1043();var _0x1e8054=_0x104334[_0x12c0d6];return _0x1e8054;}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x1cc2dd){var _0x442276=a60_0x1e80;if(!_0x1cc2dd)return undefined;try{return JSON[_0x442276(0xc5)](_0x1cc2dd);}catch{throw CliErrors[_0x442276(0xcd)](_0x442276(0xcc)+_0x1cc2dd);}}function a60_0x1043(){var _0x2c9904=['5UrvMTr','718RtXamG','items','374963EzogQk','23186120HmlRte','parse','223464gRePRf','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','4466312PipeGP','8181918tflbmb','5121BQggBK','isArray','Invalid\x20JSON\x20for\x20--params:\x20','validation','8931870GyyKjE','119yYDffr','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}'];a60_0x1043=function(){return _0x2c9904;};return a60_0x1043();}export function parseJsonParamsValue(_0x4ce2bc){var _0x4f31c3=a60_0x1e80;if(!_0x4ce2bc)return undefined;try{return JSON[_0x4f31c3(0xc5)](_0x4ce2bc);}catch{throw CliErrors[_0x4f31c3(0xcd)](_0x4f31c3(0xcc)+_0x4ce2bc);}}export function parseBatchCreateItemsFromParams(_0x408a01){var _0x4e7366=a60_0x1e80;if(Array[_0x4e7366(0xcb)](_0x408a01))return _0x408a01;if(_0x408a01!==null&&_0x408a01!==undefined&&typeof _0x408a01==='object'&&Array[_0x4e7366(0xcb)](_0x408a01[_0x4e7366(0xc2)]))return _0x408a01[_0x4e7366(0xc2)];throw CliErrors[_0x4e7366(0xcd)](_0x4e7366(0xbf),_0x4e7366(0xc7));}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a61_0xbd9826=a61_0x524e;function a61_0x2999(){const _0x113742=['11142615ETqjPM','platform','90GDgFqD','436805loWOlx','win32','179736OjMeOW','3358800besMLz','377473eqrmgG','750597PeITAz','6WgJeuO','203EMzGMz','6OdaenD','.cmd','293031KuFEIj'];a61_0x2999=function(){return _0x113742;};return a61_0x2999();}(function(_0x2d1646,_0x3b47ae){const _0x2352b5=a61_0x524e,_0x1bce07=_0x2d1646();while(!![]){try{const _0x4cf796=parseInt(_0x2352b5(0x19b))/0x1+-parseInt(_0x2352b5(0x19f))/0x2*(parseInt(_0x2352b5(0x19c))/0x3)+parseInt(_0x2352b5(0x19a))/0x4+parseInt(_0x2352b5(0x1a5))/0x5*(parseInt(_0x2352b5(0x19d))/0x6)+parseInt(_0x2352b5(0x19e))/0x7*(parseInt(_0x2352b5(0x199))/0x8)+-parseInt(_0x2352b5(0x1a1))/0x9*(-parseInt(_0x2352b5(0x1a4))/0xa)+-parseInt(_0x2352b5(0x1a2))/0xb;if(_0x4cf796===_0x3b47ae)break;else _0x1bce07['push'](_0x1bce07['shift']());}catch(_0x1b758d){_0x1bce07['push'](_0x1bce07['shift']());}}}(a61_0x2999,0x768aa));export const isWindows=process[a61_0xbd9826(0x1a3)]===a61_0xbd9826(0x1a6);function a61_0x524e(_0x37b7c6,_0x33affc){_0x37b7c6=_0x37b7c6-0x199;const _0x2999d7=a61_0x2999();let _0x524ec6=_0x2999d7[_0x37b7c6];return _0x524ec6;}export function resolveNpmBin(_0x312a34){const _0x1a25dc=a61_0xbd9826;return isWindows?_0x312a34+_0x1a25dc(0x1a0):_0x312a34;}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52ccc3,_0x285f0f){const _0x46992b=a62_0x260d,_0x4cabf3=_0x52ccc3();while(!![]){try{const _0x31b669=-parseInt(_0x46992b(0xd1))/0x1+-parseInt(_0x46992b(0xce))/0x2*(parseInt(_0x46992b(0xc9))/0x3)+-parseInt(_0x46992b(0xc8))/0x4+parseInt(_0x46992b(0xc7))/0x5*(parseInt(_0x46992b(0xcd))/0x6)+-parseInt(_0x46992b(0xcb))/0x7+-parseInt(_0x46992b(0xca))/0x8*(parseInt(_0x46992b(0xcc))/0x9)+parseInt(_0x46992b(0xc5))/0xa;if(_0x31b669===_0x285f0f)break;else _0x4cabf3['push'](_0x4cabf3['shift']());}catch(_0x48879e){_0x4cabf3['push'](_0x4cabf3['shift']());}}}(a62_0xf663,0x8ba3d));import{readFileSync}from'node:fs';import{dirname,join}from'node:path';import{fileURLToPath}from'node:url';let cached;function a62_0xf663(){const _0x1d4ed9=['363647Hdmcoh','29997720DkNAbh','parse','50nTPqMZ','911712vVRLlr','2609034VoLdGU','127240DOrHhm','7497938tqFsYE','450HfRDPN','539898IpWaeO','2YDihvq','version','utf8'];a62_0xf663=function(){return _0x1d4ed9;};return a62_0xf663();}function a62_0x260d(_0x2a1210,_0x3bc46b){_0x2a1210=_0x2a1210-0xc5;const _0xf663b6=a62_0xf663();let _0x260da8=_0xf663b6[_0x2a1210];return _0x260da8;}export function getCliVersion(){const _0x243bf0=a62_0x260d;if(cached)return cached;const _0x2cdef7=join(dirname(fileURLToPath(import.meta.url)),'..','..'),_0x52c8af=readFileSync(join(_0x2cdef7,'package.json'),_0x243bf0(0xd0)),_0x355403=JSON[_0x243bf0(0xc6)](_0x52c8af);return cached=_0x355403[_0x243bf0(0xcf)],cached;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a63_0x5674(_0x5cee49,_0x55d4f3){_0x5cee49=_0x5cee49-0x115;var _0x40afe1=a63_0x40af();var _0x5674d7=_0x40afe1[_0x5cee49];return _0x5674d7;}(function(_0x595ad1,_0x5460c2){var _0x3a00b7=a63_0x5674,_0x43acb2=_0x595ad1();while(!![]){try{var _0x3f9672=parseInt(_0x3a00b7(0x115))/0x1*(-parseInt(_0x3a00b7(0x11a))/0x2)+parseInt(_0x3a00b7(0x117))/0x3+-parseInt(_0x3a00b7(0x11d))/0x4*(-parseInt(_0x3a00b7(0x121))/0x5)+parseInt(_0x3a00b7(0x11b))/0x6+-parseInt(_0x3a00b7(0x11c))/0x7*(parseInt(_0x3a00b7(0x119))/0x8)+parseInt(_0x3a00b7(0x118))/0x9+parseInt(_0x3a00b7(0x11f))/0xa*(-parseInt(_0x3a00b7(0x120))/0xb);if(_0x3f9672===_0x5460c2)break;else _0x43acb2['push'](_0x43acb2['shift']());}catch(_0x541b6a){_0x43acb2['push'](_0x43acb2['shift']());}}}(a63_0x40af,0xbe2e5));export function writeCliSideChannelLine(_0x3672f8){var _0x21923d=a63_0x5674;process[_0x21923d(0x116)][_0x21923d(0x11e)](_0x3672f8+'\x0a');}function a63_0x40af(){var _0x24a19d=['write','140DRUvWD','70125zFXSsR','5arKsQj','3shEchT','stderr','645798MweazS','2786832GBVEFs','328AJppdK','25276TXZCBr','1088958xVeYRL','180397JTeiJD','5025396BJWeSQ'];a63_0x40af=function(){return _0x24a19d;};return a63_0x40af();}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/lovrabet-cli",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"license": "
|
|
3
|
+
"version": "2.0.3",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git"
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"build:dev": "rimraf lib && tsc && tsc-alias",
|
|
24
24
|
"start": "tsc --watch",
|
|
25
25
|
"typecheck": "tsc --noEmit",
|
|
26
|
+
"publish:github": "node scripts/publish-github.mjs",
|
|
26
27
|
"lint": "echo 'No linter configured yet'",
|
|
27
28
|
"beta-release": "sh scripts/update-beta-version.sh && bun run build && git push && git push origin --tag && bun publish --tag beta",
|
|
28
29
|
"release": "sh scripts/update-latest-version.sh && bun run build && git push && git push origin --tag && bun publish",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a21_0x5dc489=a21_0xfb55;(function(_0x1a0ddd,_0x3d69db){const _0x1f1986=a21_0xfb55,_0xe48c1e=_0x1a0ddd();while(!![]){try{const _0x6226c5=-parseInt(_0x1f1986(0x1a6))/0x1*(parseInt(_0x1f1986(0x19f))/0x2)+parseInt(_0x1f1986(0x1a5))/0x3*(-parseInt(_0x1f1986(0x19c))/0x4)+-parseInt(_0x1f1986(0x19a))/0x5+parseInt(_0x1f1986(0x1a4))/0x6*(-parseInt(_0x1f1986(0x1a7))/0x7)+-parseInt(_0x1f1986(0x196))/0x8+-parseInt(_0x1f1986(0x197))/0x9*(-parseInt(_0x1f1986(0x19d))/0xa)+parseInt(_0x1f1986(0x1a1))/0xb;if(_0x6226c5===_0x3d69db)break;else _0xe48c1e['push'](_0xe48c1e['shift']());}catch(_0x3b115f){_0xe48c1e['push'](_0xe48c1e['shift']());}}}(a21_0x4e55,0xaa2bf));import{runInit,initCreateFlagDefs}from'../../commands/init.js';function a21_0xfb55(_0x442464,_0x1214e2){_0x442464=_0x442464-0x195;const _0x4e55f2=a21_0x4e55();let _0xfb5597=_0x4e55f2[_0x442464];return _0xfb5597;}function a21_0x4e55(){const _0x50ef59=['6630360WDaVau','171MrLqJj','Initialize\x20.lovrabet.json\x20config\x20file','boolean','2131330szLAvb','bool','16LWMntL','388820PzZDrJ','create','15412mOipFB','write','30811979hvekNG','type','str','37002KUkvsF','611619nRSEHt','53eFeDFC','413QAvnoA','name'];a21_0x4e55=function(){return _0x50ef59;};return a21_0x4e55();}function collectFlags(_0x36f4fc,_0x73e0a9){const _0x1bb101=a21_0xfb55,_0x7684f7={};for(const _0x4fc1e0 of _0x73e0a9){const _0x365f43=_0x4fc1e0[_0x1bb101(0x1a2)]===_0x1bb101(0x199)?_0x36f4fc[_0x1bb101(0x19b)](_0x4fc1e0[_0x1bb101(0x195)]):_0x36f4fc[_0x1bb101(0x1a3)](_0x4fc1e0['name']);if(_0x365f43!==''&&_0x365f43!==![])_0x7684f7[_0x4fc1e0['name']]=_0x365f43;}if(_0x36f4fc['nonInteractive'])_0x7684f7['nonInteractive']=!![];return _0x7684f7;}export const initDefinitions=[{'service':'init','command':a21_0x5dc489(0x19e),'description':a21_0x5dc489(0x198),'risk':a21_0x5dc489(0x1a0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x4a83e3){return await runInit(collectFlags(_0x4a83e3,initCreateFlagDefs)),{'ok':!![]};}}];
|