@lovrabet/lovrabet-cli 2.0.1 → 2.0.2
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/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/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/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/lib/commands/init/index.js +0 -1
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x3dfb4a=a56_0x149e;(function(_0x3702bd,_0xee760f){const _0x398f32=a56_0x149e,_0x40157e=_0x3702bd();while(!![]){try{const _0x1656b9=parseInt(_0x398f32(0xec))/0x1*(parseInt(_0x398f32(0xf1))/0x2)+-parseInt(_0x398f32(0xc0))/0x3+parseInt(_0x398f32(0xee))/0x4+-parseInt(_0x398f32(0xc6))/0x5+-parseInt(_0x398f32(0xc7))/0x6+-parseInt(_0x398f32(0xf0))/0x7+parseInt(_0x398f32(0xe4))/0x8*(parseInt(_0x398f32(0xe7))/0x9);if(_0x1656b9===_0xee760f)break;else _0x40157e['push'](_0x40157e['shift']());}catch(_0x21f858){_0x40157e['push'](_0x40157e['shift']());}}}(a56_0x55b8,0x2aeda));import a56_0x86311a from'winston';function a56_0x149e(_0x35a2cd,_0x50ceba){_0x35a2cd=_0x35a2cd-0xbe;const _0x55b8bc=a56_0x55b8();let _0x149eb4=_0x55b8bc[_0x35a2cd];return _0x149eb4;}function a56_0x55b8(){const _0xc9d482=['filter','8741cZGhyN','winstonLogger','1009884OuqPsa','addColors','2182649itpEUx','46ldyeyz','toISOString','combine','631917ymSEme','initWinstonLogger','transports','format','timestamp','setLogPath','1085195nGsHOv','128148ryzZka','level','readLogs','currentRawCommand','now','info','error','readFileSync','logTask','rawCommand','details','File','logFilePath','message','map','log','existsSync','mkdirSync','parse','warn','split','Failed:\x20','red','utf8','blue','yellow','command','join','createLogger','3865304uMFSaf','Completed:\x20','Starting:\x20','9CcExdb','success','duration','.lovrabet-runtime.log'];a56_0x55b8=function(){return _0xc9d482;};return a56_0x55b8();}import a56_0xdff0cc from'node:fs';import a56_0x523815 from'node:path';class Logger{[a56_0x3dfb4a(0xed)];[a56_0x3dfb4a(0xd3)]='';[a56_0x3dfb4a(0xca)]='';constructor(){}['setRawCommand'](_0x329b2f){const _0x389caa=a56_0x3dfb4a;this[_0x389caa(0xca)]=_0x329b2f;}[a56_0x3dfb4a(0xc5)](_0x9b8b7f){const _0x5138d5=a56_0x3dfb4a;this['logFilePath']=a56_0x523815[_0x5138d5(0xe2)](_0x9b8b7f,_0x5138d5(0xea)),this['winstonLogger']&&this[_0x5138d5(0xed)]['clear'](),this[_0x5138d5(0xc1)]();}[a56_0x3dfb4a(0xc1)](){const _0x34ef7e=a56_0x3dfb4a,_0xc2e65f=a56_0x523815['dirname'](this[_0x34ef7e(0xd3)]);!a56_0xdff0cc[_0x34ef7e(0xd7)](_0xc2e65f)&&a56_0xdff0cc[_0x34ef7e(0xd8)](_0xc2e65f,{'recursive':!![]});const _0x3dac89=a56_0x86311a[_0x34ef7e(0xc3)][_0x34ef7e(0xbf)](a56_0x86311a[_0x34ef7e(0xc3)][_0x34ef7e(0xc4)](),a56_0x86311a[_0x34ef7e(0xc3)]['errors']({'stack':!![]}),a56_0x86311a['format']['printf'](_0x207ed0=>{const _0x3528c9=_0x34ef7e,_0x8e963c={'timestamp':_0x207ed0[_0x3528c9(0xc4)]||new Date()[_0x3528c9(0xbe)](),'level':_0x207ed0[_0x3528c9(0xc8)]||_0x3528c9(0xcc),'command':_0x207ed0[_0x3528c9(0xe1)]||'unknown','rawCommand':_0x207ed0[_0x3528c9(0xd0)]||this[_0x3528c9(0xca)]||undefined,'message':_0x207ed0['message']||'','duration':_0x207ed0[_0x3528c9(0xe9)]||undefined,'details':_0x207ed0[_0x3528c9(0xd1)]||undefined};return JSON['stringify'](_0x8e963c);}));this[_0x34ef7e(0xed)]=a56_0x86311a[_0x34ef7e(0xe3)]({'level':'info','format':_0x3dac89,'transports':[new a56_0x86311a[(_0x34ef7e(0xc2))][(_0x34ef7e(0xd2))]({'filename':this[_0x34ef7e(0xd3)],'level':_0x34ef7e(0xcc)})],'silent':![]}),a56_0x86311a[_0x34ef7e(0xef)]({'success':'green','error':_0x34ef7e(0xdd),'warn':_0x34ef7e(0xe0),'info':_0x34ef7e(0xdf)});}['info'](_0x255d09,_0x42d955,_0x392157){const _0x25c52e=a56_0x3dfb4a;if(!this[_0x25c52e(0xd3)]||!this[_0x25c52e(0xed)])return;this[_0x25c52e(0xed)]['info'](_0x42d955,{'command':_0x255d09,'details':_0x392157});}[a56_0x3dfb4a(0xe8)](_0x18e105,_0x49f9d1,_0xab9132,_0x3d8099){const _0x127330=a56_0x3dfb4a;if(!this['logFilePath']||!this[_0x127330(0xed)])return;this[_0x127330(0xed)][_0x127330(0xd6)]('info',_0x49f9d1,{'level':_0x127330(0xe8),'command':_0x18e105,'duration':_0xab9132,'details':_0x3d8099});}[a56_0x3dfb4a(0xcd)](_0x198add,_0x59a6fc,_0x54c680){const _0x111df9=a56_0x3dfb4a;if(!this[_0x111df9(0xd3)]||!this[_0x111df9(0xed)])return;this[_0x111df9(0xed)]['error'](_0x59a6fc,{'command':_0x198add,'details':_0x54c680});}[a56_0x3dfb4a(0xda)](_0x16c4be,_0x5d1d2c,_0xfa2c12){const _0x12c791=a56_0x3dfb4a;if(!this[_0x12c791(0xd3)]||!this[_0x12c791(0xed)])return;this[_0x12c791(0xed)]['warn'](_0x5d1d2c,{'command':_0x16c4be,'details':_0xfa2c12});}async[a56_0x3dfb4a(0xcf)](_0x24ee32,_0x10dc86,_0x4fb690){const _0x3b766d=a56_0x3dfb4a,_0x24059c=Date[_0x3b766d(0xcb)]();this['info'](_0x24ee32,_0x3b766d(0xe6)+_0x10dc86);try{const _0x3372b3=await _0x4fb690(),_0x5d6dfa=Date['now']()-_0x24059c;return this['success'](_0x24ee32,_0x3b766d(0xe5)+_0x10dc86,_0x5d6dfa),_0x3372b3;}catch(_0x26678d){const _0x5854ab=Date[_0x3b766d(0xcb)]()-_0x24059c;this[_0x3b766d(0xcd)](_0x24ee32,_0x3b766d(0xdc)+_0x10dc86,{'error':_0x26678d instanceof Error?_0x26678d[_0x3b766d(0xd4)]:String(_0x26678d),'duration':_0x5854ab});throw _0x26678d;}}[a56_0x3dfb4a(0xc9)](){const _0x272b13=a56_0x3dfb4a;try{if(!a56_0xdff0cc[_0x272b13(0xd7)](this[_0x272b13(0xd3)]))return[];const _0x5a157c=a56_0xdff0cc[_0x272b13(0xce)](this[_0x272b13(0xd3)],_0x272b13(0xde));return _0x5a157c[_0x272b13(0xdb)](/\r?\n/)[_0x272b13(0xeb)](_0x47e3f9=>_0x47e3f9['trim']())[_0x272b13(0xd5)](_0x539a6c=>JSON[_0x272b13(0xd9)](_0x539a6c));}catch(_0x2a00c8){return console['warn']('Failed\x20to\x20read\x20logs:',_0x2a00c8),[];}}['clearLogs'](){const _0x40ebd7=a56_0x3dfb4a;try{a56_0xdff0cc[_0x40ebd7(0xd7)](this['logFilePath'])&&a56_0xdff0cc['writeFileSync'](this[_0x40ebd7(0xd3)],'',_0x40ebd7(0xde));}catch(_0x38e85d){console[_0x40ebd7(0xda)]('Failed\x20to\x20clear\x20logs:',_0x38e85d);}}['getWinstonInstance'](){const _0xab069d=a56_0x3dfb4a;return this[_0xab069d(0xed)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a57_0x50b0(){var _0x136ab3=['17142HHrure','6Ckcqju','isArray','2117115iIIJjY','6PkbLND','object','4422560tVAgIr','Invalid\x20JSON\x20for\x20--params:\x20','validation','2302197uxoSfc','items','2305120ZoueMS','2343299GlFUjz','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','3312351pGEFxk','parse'];a57_0x50b0=function(){return _0x136ab3;};return a57_0x50b0();}(function(_0x5bb983,_0x349c9a){var _0x1cecf5=a57_0x594d,_0x540dcd=_0x5bb983();while(!![]){try{var _0x5df59c=-parseInt(_0x1cecf5(0x1ba))/0x1*(-parseInt(_0x1cecf5(0x1b6))/0x2)+parseInt(_0x1cecf5(0x1af))/0x3+-parseInt(_0x1cecf5(0x1b1))/0x4+parseInt(_0x1cecf5(0x1b9))/0x5+-parseInt(_0x1cecf5(0x1b7))/0x6*(parseInt(_0x1cecf5(0x1b2))/0x7)+parseInt(_0x1cecf5(0x1bc))/0x8+-parseInt(_0x1cecf5(0x1b4))/0x9;if(_0x5df59c===_0x349c9a)break;else _0x540dcd['push'](_0x540dcd['shift']());}catch(_0x3b8f46){_0x540dcd['push'](_0x540dcd['shift']());}}}(a57_0x50b0,0x7df98));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x3d97f9){var _0x4027a8=a57_0x594d;if(!_0x3d97f9)return undefined;try{return JSON['parse'](_0x3d97f9);}catch{throw CliErrors[_0x4027a8(0x1be)](_0x4027a8(0x1bd)+_0x3d97f9);}}function a57_0x594d(_0x3e6782,_0x5f27c5){_0x3e6782=_0x3e6782-0x1af;var _0x50b046=a57_0x50b0();var _0x594de3=_0x50b046[_0x3e6782];return _0x594de3;}export function parseJsonParamsValue(_0x1ba77a){var _0x1e0452=a57_0x594d;if(!_0x1ba77a)return undefined;try{return JSON[_0x1e0452(0x1b5)](_0x1ba77a);}catch{throw CliErrors['validation'](_0x1e0452(0x1bd)+_0x1ba77a);}}export function parseBatchCreateItemsFromParams(_0x435c59){var _0x5a4368=a57_0x594d;if(Array[_0x5a4368(0x1b8)](_0x435c59))return _0x435c59;if(_0x435c59!==null&&_0x435c59!==undefined&&typeof _0x435c59===_0x5a4368(0x1bb)&&Array[_0x5a4368(0x1b8)](_0x435c59[_0x5a4368(0x1b0)]))return _0x435c59['items'];throw CliErrors['validation']('batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}',_0x5a4368(0x1b3));}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18c5c4,_0x2bf719){const _0x33457c=a58_0x54ee,_0x373373=_0x18c5c4();while(!![]){try{const _0x1ca06d=parseInt(_0x33457c(0xfd))/0x1+-parseInt(_0x33457c(0xf5))/0x2*(parseInt(_0x33457c(0xfb))/0x3)+-parseInt(_0x33457c(0xfc))/0x4+-parseInt(_0x33457c(0xf9))/0x5*(-parseInt(_0x33457c(0xf3))/0x6)+parseInt(_0x33457c(0xfa))/0x7*(parseInt(_0x33457c(0xf7))/0x8)+-parseInt(_0x33457c(0xf4))/0x9*(parseInt(_0x33457c(0xf8))/0xa)+parseInt(_0x33457c(0xf2))/0xb*(-parseInt(_0x33457c(0xfe))/0xc);if(_0x1ca06d===_0x2bf719)break;else _0x373373['push'](_0x373373['shift']());}catch(_0x586fa6){_0x373373['push'](_0x373373['shift']());}}}(a58_0x4088,0xa3223));import{readFileSync}from'node:fs';function a58_0x4088(){const _0x4ebf8d=['3122220QNGhin','9dLgsoQ','110NpLNoh','parse','521824lVxEoD','6446870mhjspm','5VubQWH','140AtBmPH','71403PoyyBx','347336xQJeJS','954094uqlIAg','843036lEjTDQ','11ueXgjC'];a58_0x4088=function(){return _0x4ebf8d;};return a58_0x4088();}import{dirname,join}from'node:path';import{fileURLToPath}from'node:url';let cached;function a58_0x54ee(_0x50eeb2,_0xc62074){_0x50eeb2=_0x50eeb2-0xf2;const _0x408810=a58_0x4088();let _0x54ee98=_0x408810[_0x50eeb2];return _0x54ee98;}export function getCliVersion(){const _0x1d6eca=a58_0x54ee;if(cached)return cached;const _0x16e1c7=join(dirname(fileURLToPath(import.meta.url)),'..','..'),_0x2e17a2=readFileSync(join(_0x16e1c7,'package.json'),'utf8'),_0x4b4a85=JSON[_0x1d6eca(0xf6)](_0x2e17a2);return cached=_0x4b4a85['version'],cached;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd6cf8f,_0x5365af){var _0xa115b2=a59_0x5e2f,_0x273901=_0xd6cf8f();while(!![]){try{var _0x3cf83c=parseInt(_0xa115b2(0xdb))/0x1+-parseInt(_0xa115b2(0xe2))/0x2*(parseInt(_0xa115b2(0xe4))/0x3)+parseInt(_0xa115b2(0xdc))/0x4*(-parseInt(_0xa115b2(0xe1))/0x5)+-parseInt(_0xa115b2(0xdd))/0x6+parseInt(_0xa115b2(0xe3))/0x7*(parseInt(_0xa115b2(0xdf))/0x8)+-parseInt(_0xa115b2(0xda))/0x9+parseInt(_0xa115b2(0xde))/0xa;if(_0x3cf83c===_0x5365af)break;else _0x273901['push'](_0x273901['shift']());}catch(_0x134621){_0x273901['push'](_0x273901['shift']());}}}(a59_0x260c,0x7748a));function a59_0x260c(){var _0x3c6e43=['613734XmDvEH','2292sKWPSW','1958796HalqIe','7216230vavCVQ','17432QLKLAy','stderr','2480UbAiyw','60DaQzGv','2611JIAVPe','90636DmYplB','1282536tjrsOR'];a59_0x260c=function(){return _0x3c6e43;};return a59_0x260c();}function a59_0x5e2f(_0x35ef7d,_0x5c2bd3){_0x35ef7d=_0x35ef7d-0xda;var _0x260ceb=a59_0x260c();var _0x5e2f31=_0x260ceb[_0x35ef7d];return _0x5e2f31;}export function writeCliSideChannelLine(_0x29b459){var _0x324535=a59_0x5e2f;process[_0x324535(0xe0)]['write'](_0x29b459+'\x0a');}
|
package/package.json
CHANGED
|
@@ -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':!![]};}}];
|