@lovrabet/lovrabet-cli 2.0.13 → 2.0.14-beta.10
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/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -0
- 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/artifact/index.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/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -0
- package/lib/commands/service/index.js +1 -0
- package/lib/commands/service/registry.js +1 -0
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/templates.js +1 -0
- package/lib/commands/skill/validate.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/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -0
- 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/distribution.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/product.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/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.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/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +8 -6
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0x27327d=a77_0x551a;function a77_0x1457(){const _0x3bbb76=['readFileSync','map','currentRawCommand','success','mkdirSync','log','2933756iWexdR','timestamp','logFilePath','rawCommand','getWinstonInstance','error','details','7624nXmLyy','blue','info','File','now','unknown','existsSync','stringify','Failed\x20to\x20read\x20logs:','42GdFjjM','format','2JCzsPG','warn','message','split','20vnMjLh','Starting:\x20','readLogs','Failed:\x20','addColors','writeFileSync','filter','clearLogs','346025PpEddP','70vobLGC','join','winstonLogger','clear','printf','4434749OpUQXZ','initWinstonLogger','errors','logFileName','parse','utf8','yellow','command','262849IVfwuZ','5906808ToVIWv','trim','createLogger','Failed\x20to\x20clear\x20logs:','1712256EKhPgO','transports','red','green'];a77_0x1457=function(){return _0x3bbb76;};return a77_0x1457();}(function(_0x4b87ca,_0x5c7151){const _0x20cfc7=a77_0x551a,_0x9749d2=_0x4b87ca();while(!![]){try{const _0x2271bd=parseInt(_0x20cfc7(0xc3))/0x1*(-parseInt(_0x20cfc7(0xa9))/0x2)+parseInt(_0x20cfc7(0xc8))/0x3+-parseInt(_0x20cfc7(0x97))/0x4+parseInt(_0x20cfc7(0xb5))/0x5*(-parseInt(_0x20cfc7(0xa7))/0x6)+parseInt(_0x20cfc7(0xb6))/0x7*(parseInt(_0x20cfc7(0x9e))/0x8)+parseInt(_0x20cfc7(0xc4))/0x9+-parseInt(_0x20cfc7(0xad))/0xa*(-parseInt(_0x20cfc7(0xbb))/0xb);if(_0x2271bd===_0x5c7151)break;else _0x9749d2['push'](_0x9749d2['shift']());}catch(_0x181a62){_0x9749d2['push'](_0x9749d2['shift']());}}}(a77_0x1457,0x8940d));import a77_0x1ebb7a from'winston';import a77_0x5e848c from'node:fs';function a77_0x551a(_0x39ce09,_0x41a28d){_0x39ce09=_0x39ce09-0x8f;const _0x145770=a77_0x1457();let _0x551abe=_0x145770[_0x39ce09];return _0x551abe;}import a77_0x28f170 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];['logFilePath']='';[a77_0x27327d(0x93)]='';constructor(){}['setRawCommand'](_0x378c05){const _0x11273c=a77_0x27327d;this[_0x11273c(0x93)]=_0x378c05;}['setLogPath'](_0x1bb5f4){const _0x2885c1=a77_0x27327d;this[_0x2885c1(0x99)]=a77_0x28f170[_0x2885c1(0xb7)](_0x1bb5f4,PRODUCT_CONFIG[_0x2885c1(0xbe)]),this['winstonLogger']&&this[_0x2885c1(0xb8)][_0x2885c1(0xb9)](),this[_0x2885c1(0xbc)]();}[a77_0x27327d(0xbc)](){const _0x26ef36=a77_0x27327d,_0x201ad6=a77_0x28f170['dirname'](this[_0x26ef36(0x99)]);!a77_0x5e848c[_0x26ef36(0xa4)](_0x201ad6)&&a77_0x5e848c[_0x26ef36(0x95)](_0x201ad6,{'recursive':!![]});const _0x573205=a77_0x1ebb7a['format']['combine'](a77_0x1ebb7a['format'][_0x26ef36(0x98)](),a77_0x1ebb7a['format'][_0x26ef36(0xbd)]({'stack':!![]}),a77_0x1ebb7a[_0x26ef36(0xa8)][_0x26ef36(0xba)](_0x6a8055=>{const _0x500245=_0x26ef36,_0x1a844a={'timestamp':_0x6a8055[_0x500245(0x98)]||new Date()['toISOString'](),'level':_0x6a8055['level']||'info','command':_0x6a8055[_0x500245(0xc2)]||_0x500245(0xa3),'rawCommand':_0x6a8055[_0x500245(0x9a)]||this[_0x500245(0x93)]||undefined,'message':_0x6a8055[_0x500245(0xab)]||'','duration':_0x6a8055['duration']||undefined,'details':_0x6a8055[_0x500245(0x9d)]||undefined};return JSON[_0x500245(0xa5)](_0x1a844a);}));this['winstonLogger']=a77_0x1ebb7a[_0x26ef36(0xc6)]({'level':_0x26ef36(0xa0),'format':_0x573205,'transports':[new a77_0x1ebb7a[(_0x26ef36(0xc9))][(_0x26ef36(0xa1))]({'filename':this[_0x26ef36(0x99)],'level':_0x26ef36(0xa0)})],'silent':![]}),a77_0x1ebb7a[_0x26ef36(0xb1)]({'success':_0x26ef36(0x90),'error':_0x26ef36(0x8f),'warn':_0x26ef36(0xc1),'info':_0x26ef36(0x9f)});}[a77_0x27327d(0xa0)](_0x1d819b,_0x3d90e0,_0x5b393a){const _0x5be9cb=a77_0x27327d;if(!this[_0x5be9cb(0x99)]||!this[_0x5be9cb(0xb8)])return;this[_0x5be9cb(0xb8)][_0x5be9cb(0xa0)](_0x3d90e0,{'command':_0x1d819b,'details':_0x5b393a});}[a77_0x27327d(0x94)](_0x1465cf,_0x2efa8b,_0x437edc,_0x4bf9bc){const _0x3d6340=a77_0x27327d;if(!this[_0x3d6340(0x99)]||!this['winstonLogger'])return;this[_0x3d6340(0xb8)][_0x3d6340(0x96)](_0x3d6340(0xa0),_0x2efa8b,{'level':_0x3d6340(0x94),'command':_0x1465cf,'duration':_0x437edc,'details':_0x4bf9bc});}[a77_0x27327d(0x9c)](_0xef02d0,_0x2982d2,_0x305199){const _0x3eb6d7=a77_0x27327d;if(!this[_0x3eb6d7(0x99)]||!this['winstonLogger'])return;this[_0x3eb6d7(0xb8)][_0x3eb6d7(0x9c)](_0x2982d2,{'command':_0xef02d0,'details':_0x305199});}['warn'](_0x591793,_0x2afafd,_0x4fa09c){const _0x2c9042=a77_0x27327d;if(!this[_0x2c9042(0x99)]||!this[_0x2c9042(0xb8)])return;this[_0x2c9042(0xb8)][_0x2c9042(0xaa)](_0x2afafd,{'command':_0x591793,'details':_0x4fa09c});}async['logTask'](_0x2e5700,_0x447718,_0x4d2fd9){const _0x4d17d4=a77_0x27327d,_0x5507e4=Date[_0x4d17d4(0xa2)]();this['info'](_0x2e5700,_0x4d17d4(0xae)+_0x447718);try{const _0x56cf15=await _0x4d2fd9(),_0x28544a=Date[_0x4d17d4(0xa2)]()-_0x5507e4;return this[_0x4d17d4(0x94)](_0x2e5700,'Completed:\x20'+_0x447718,_0x28544a),_0x56cf15;}catch(_0x464e05){const _0x35029c=Date['now']()-_0x5507e4;this[_0x4d17d4(0x9c)](_0x2e5700,_0x4d17d4(0xb0)+_0x447718,{'error':_0x464e05 instanceof Error?_0x464e05[_0x4d17d4(0xab)]:String(_0x464e05),'duration':_0x35029c});throw _0x464e05;}}[a77_0x27327d(0xaf)](){const _0x4a241b=a77_0x27327d;try{if(!a77_0x5e848c[_0x4a241b(0xa4)](this[_0x4a241b(0x99)]))return[];const _0x67455e=a77_0x5e848c[_0x4a241b(0x91)](this[_0x4a241b(0x99)],'utf8');return _0x67455e[_0x4a241b(0xac)](/\r?\n/)[_0x4a241b(0xb3)](_0x3f229b=>_0x3f229b[_0x4a241b(0xc5)]())[_0x4a241b(0x92)](_0xc1ace4=>JSON[_0x4a241b(0xbf)](_0xc1ace4));}catch(_0x1e4e59){return console[_0x4a241b(0xaa)](_0x4a241b(0xa6),_0x1e4e59),[];}}[a77_0x27327d(0xb4)](){const _0x3aac17=a77_0x27327d;try{a77_0x5e848c['existsSync'](this[_0x3aac17(0x99)])&&a77_0x5e848c[_0x3aac17(0xb2)](this[_0x3aac17(0x99)],'',_0x3aac17(0xc0));}catch(_0x35d89f){console[_0x3aac17(0xaa)](_0x3aac17(0xc7),_0x35d89f);}}[a77_0x27327d(0x9b)](){const _0x50da76=a77_0x27327d;return this[_0x50da76(0xb8)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26f0c2,_0x2029bc){var _0x50dcac=a78_0x470c,_0x2e0681=_0x26f0c2();while(!![]){try{var _0x2d9893=parseInt(_0x50dcac(0x180))/0x1+parseInt(_0x50dcac(0x17b))/0x2+-parseInt(_0x50dcac(0x176))/0x3*(-parseInt(_0x50dcac(0x175))/0x4)+-parseInt(_0x50dcac(0x17d))/0x5*(-parseInt(_0x50dcac(0x184))/0x6)+-parseInt(_0x50dcac(0x177))/0x7*(-parseInt(_0x50dcac(0x17c))/0x8)+-parseInt(_0x50dcac(0x185))/0x9*(-parseInt(_0x50dcac(0x186))/0xa)+parseInt(_0x50dcac(0x17e))/0xb*(-parseInt(_0x50dcac(0x182))/0xc);if(_0x2d9893===_0x2029bc)break;else _0x2e0681['push'](_0x2e0681['shift']());}catch(_0x9a9738){_0x2e0681['push'](_0x2e0681['shift']());}}}(a78_0x6779,0x1e2f3));import{CliErrors}from'../errors.js';function a78_0x6779(){var _0x5367d0=['7OwbaaU','object','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','Invalid\x20JSON\x20for\x20--params:\x20','379342BbVzkF','363512ibtPTm','354265TrSXsx','154SDshpb','validation','170925IXQLNa','items','452124ICmyYB','parse','6FDDBhx','9DRJFAQ','1031740CjDmup','isArray','284204JKrBnO','3RvHgvU'];a78_0x6779=function(){return _0x5367d0;};return a78_0x6779();}export function parseJsonParams(_0x10a6ca){var _0x502599=a78_0x470c;if(!_0x10a6ca)return undefined;try{return JSON[_0x502599(0x183)](_0x10a6ca);}catch{throw CliErrors[_0x502599(0x17f)](_0x502599(0x17a)+_0x10a6ca);}}function a78_0x470c(_0x136f42,_0xa7270f){_0x136f42=_0x136f42-0x175;var _0x677900=a78_0x6779();var _0x470c9b=_0x677900[_0x136f42];return _0x470c9b;}export function parseJsonParamsValue(_0x4e33e7){var _0x4dfb1e=a78_0x470c;if(!_0x4e33e7)return undefined;try{return JSON[_0x4dfb1e(0x183)](_0x4e33e7);}catch{throw CliErrors[_0x4dfb1e(0x17f)](_0x4dfb1e(0x17a)+_0x4e33e7);}}export function parseBatchCreateItemsFromParams(_0x3e99ee){var _0x4d212c=a78_0x470c;if(Array[_0x4d212c(0x187)](_0x3e99ee))return _0x3e99ee;if(_0x3e99ee!==null&&_0x3e99ee!==undefined&&typeof _0x3e99ee===_0x4d212c(0x178)&&Array[_0x4d212c(0x187)](_0x3e99ee[_0x4d212c(0x181)]))return _0x3e99ee[_0x4d212c(0x181)];throw CliErrors[_0x4d212c(0x17f)]('batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}',_0x4d212c(0x179));}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a79_0x294a(_0x3ea2f6,_0x52b235){_0x3ea2f6=_0x3ea2f6-0x85;const _0x319754=a79_0x3197();let _0x294ac4=_0x319754[_0x3ea2f6];return _0x294ac4;}function a79_0x3197(){const _0x9a210e=['921378KXBZNK','38347398ytSjcg','.cmd','6839868fgXdCo','4002540GfJJdr','213VqnjwK','748586hGrSdo','54616jnjbKl','8mlIMdQ','3566730GqZkdg','win32'];a79_0x3197=function(){return _0x9a210e;};return a79_0x3197();}const a79_0x2e638e=a79_0x294a;(function(_0x15d0e6,_0x438619){const _0x4a00f9=a79_0x294a,_0x4c7790=_0x15d0e6();while(!![]){try{const _0xd5b832=-parseInt(_0x4a00f9(0x8c))/0x1+parseInt(_0x4a00f9(0x86))/0x2+-parseInt(_0x4a00f9(0x8b))/0x3*(parseInt(_0x4a00f9(0x8d))/0x4)+-parseInt(_0x4a00f9(0x8a))/0x5+-parseInt(_0x4a00f9(0x8f))/0x6+-parseInt(_0x4a00f9(0x89))/0x7*(parseInt(_0x4a00f9(0x8e))/0x8)+parseInt(_0x4a00f9(0x87))/0x9;if(_0xd5b832===_0x438619)break;else _0x4c7790['push'](_0x4c7790['shift']());}catch(_0x541f6b){_0x4c7790['push'](_0x4c7790['shift']());}}}(a79_0x3197,0x9a26c));export const isWindows=process['platform']===a79_0x2e638e(0x85);export function resolveNpmBin(_0x5d0273){const _0x2a6e95=a79_0x2e638e;return isWindows?_0x5d0273+_0x2a6e95(0x88):_0x5d0273;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x38f3bd,_0x56d2b7){const _0xad9bf9=a80_0x4026,_0x1c98ad=_0x38f3bd();while(!![]){try{const _0x269753=-parseInt(_0xad9bf9(0x10f))/0x1*(-parseInt(_0xad9bf9(0x118))/0x2)+-parseInt(_0xad9bf9(0x124))/0x3+-parseInt(_0xad9bf9(0x11f))/0x4*(-parseInt(_0xad9bf9(0x113))/0x5)+-parseInt(_0xad9bf9(0x126))/0x6+-parseInt(_0xad9bf9(0x11c))/0x7*(parseInt(_0xad9bf9(0x135))/0x8)+-parseInt(_0xad9bf9(0x115))/0x9*(-parseInt(_0xad9bf9(0x12d))/0xa)+-parseInt(_0xad9bf9(0x133))/0xb;if(_0x269753===_0x56d2b7)break;else _0x1c98ad['push'](_0x1c98ad['shift']());}catch(_0x2cff73){_0x1c98ad['push'](_0x1c98ad['shift']());}}}(a80_0x3108,0xe8544));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x104b88){const _0x50244a=_0x104b88['trim']()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x50244a)return null;return{'major':Number(_0x50244a[0x1]),'minor':Number(_0x50244a[0x2]),'patch':Number(_0x50244a[0x3]),'prerelease':_0x50244a[0x4]};}function compareSemver(_0x26ced2,_0x325701){const _0x181ee1=a80_0x4026,_0x39de7=parseSemver(_0x26ced2),_0x4d9a5d=parseSemver(_0x325701);if(!_0x39de7||!_0x4d9a5d)throw new Error(_0x181ee1(0x12a));for(const _0x30b19e of[_0x181ee1(0x136),_0x181ee1(0x128),_0x181ee1(0x112)]){if(_0x39de7[_0x30b19e]<_0x4d9a5d[_0x30b19e])return-0x1;if(_0x39de7[_0x30b19e]>_0x4d9a5d[_0x30b19e])return 0x1;}if(!_0x39de7[_0x181ee1(0x117)]&&!_0x4d9a5d[_0x181ee1(0x117)])return 0x0;if(!_0x39de7[_0x181ee1(0x117)])return 0x1;if(!_0x4d9a5d[_0x181ee1(0x117)])return-0x1;if(_0x39de7[_0x181ee1(0x117)]===_0x4d9a5d['prerelease'])return 0x0;return _0x39de7[_0x181ee1(0x117)]<_0x4d9a5d['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x34ee4a=a80_0x4026,_0x163540=process.env.LOVRABET_NO_UPDATE_NOTICE?.['trim']()[_0x34ee4a(0x11e)]();return _0x163540==='1'||_0x163540==='true'||_0x163540===_0x34ee4a(0x132);}function a80_0x3108(){const _0x3c53b7=['13BupXiN','\x20available,\x20current\x20','latest','patch','115410WogQCw','trim','17038044APKgcA','/-/package/','prerelease','103668qaNNfJ','now','timeout','/dist-tags','9664907YRiMAS','entries','toLowerCase','328RnPGbR','https://www.npmjs.com/package/','stringify','json','\x20update','1643214DQxROf','object','6330198BpvbDN','lovrabet-cli','minor','/v/','Invalid\x20semver','checkedAt','fromEntries','10kGgRDx','.cache','update-check.json','lastNotifiedVersion','utf8','yes','5770490OZKxBR','filter','8uSqTiL','major','lastNotifiedAt'];a80_0x3108=function(){return _0x3c53b7;};return a80_0x3108();}function cacheRoot(){const _0x28f6b9=a80_0x4026;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x28f6b9(0x12e));}export function getUpdateNoticeCachePath(){const _0x1c36ac=a80_0x4026;return join(cacheRoot(),_0x1c36ac(0x127),_0x1c36ac(0x12f));}async function readUpdateNoticeCache(){const _0x4ba109=a80_0x4026;try{const _0x23e67c=await readFile(getUpdateNoticeCachePath(),_0x4ba109(0x131)),_0x3dbbf6=JSON['parse'](_0x23e67c);if(!_0x3dbbf6||typeof _0x3dbbf6!=='object')return{};return _0x3dbbf6;}catch{return{};}}async function writeUpdateNoticeCache(_0x3b306c){const _0x2ce5c6=a80_0x4026;try{const _0x595e0c=getUpdateNoticeCachePath();await mkdir(dirname(_0x595e0c),{'recursive':!![]}),await writeFile(_0x595e0c,JSON[_0x2ce5c6(0x121)](_0x3b306c,null,0x2)+'\x0a',_0x2ce5c6(0x131));}catch{}}function isFreshCheck(_0x5cc84b,_0x13d4b1){const _0x5cec99=a80_0x4026;return typeof _0x5cc84b[_0x5cec99(0x12b)]==='number'&&_0x13d4b1-_0x5cc84b['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x25c402,_0x553fc8,_0x15598e){const _0xdaf1e9=a80_0x4026;return _0x25c402[_0xdaf1e9(0x130)]===_0x553fc8&&typeof _0x25c402[_0xdaf1e9(0x137)]==='number'&&_0x15598e-_0x25c402[_0xdaf1e9(0x137)]<UPDATE_NOTICE_TTL_MS;}function a80_0x4026(_0x53f8d8,_0x1c0d09){_0x53f8d8=_0x53f8d8-0x10f;const _0x310861=a80_0x3108();let _0x402615=_0x310861[_0x53f8d8];return _0x402615;}async function fetchNpmDistTags(_0x35687b=0x5dc){const _0x10f9dc=a80_0x4026;try{const _0xab8ba5=NPM_REGISTRY_BASE_URL+_0x10f9dc(0x116)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x10f9dc(0x11b),_0x571787=await fetch(_0xab8ba5,{'signal':AbortSignal[_0x10f9dc(0x11a)](_0x35687b)});if(!_0x571787['ok'])return null;const _0x193003=await _0x571787[_0x10f9dc(0x122)]();if(!_0x193003||typeof _0x193003!==_0x10f9dc(0x125))return null;return Object[_0x10f9dc(0x12c)](Object[_0x10f9dc(0x11d)](_0x193003)[_0x10f9dc(0x134)](([,_0x35187c])=>typeof _0x35187c==='string'&&_0x35187c[_0x10f9dc(0x114)]())['map'](([_0x4ca191,_0xb758a0])=>[_0x4ca191,String(_0xb758a0)[_0x10f9dc(0x114)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x34602d){const _0x1fc4e2=a80_0x4026;return _0x1fc4e2(0x120)+LOVRABET_NPM_PACKAGE_NAME+_0x1fc4e2(0x129)+_0x34602d;}export async function resolveLatestUpdateNotice(){const _0x4f376d=a80_0x4026;if(isUpdateNoticeDisabled())return null;try{const _0x4870d5=Date[_0x4f376d(0x119)](),_0x6dd414=getCliVersion(),_0x5abec4=await readUpdateNoticeCache();let _0x4b91c9=isFreshCheck(_0x5abec4,_0x4870d5)?_0x5abec4[_0x4f376d(0x111)]?.[_0x4f376d(0x114)]():undefined;if(!_0x4b91c9&&!isFreshCheck(_0x5abec4,_0x4870d5)){const _0xcc8024=await fetchNpmDistTags();_0x4b91c9=_0xcc8024?.[_0x4f376d(0x111)]?.[_0x4f376d(0x114)](),await writeUpdateNoticeCache({..._0x5abec4,'checkedAt':_0x4870d5,'latest':_0x4b91c9,'failed':!_0x4b91c9});}if(!_0x4b91c9||compareSemver(_0x6dd414,_0x4b91c9)>=0x0)return null;if(isRecentlyNotified(_0x5abec4,_0x4b91c9,_0x4870d5))return null;const _0xda3422=CLI_BIN_NAME+_0x4f376d(0x123);return await writeUpdateNoticeCache({..._0x5abec4,'checkedAt':isFreshCheck(_0x5abec4,_0x4870d5)?_0x5abec4[_0x4f376d(0x12b)]:_0x4870d5,'latest':_0x4b91c9,'failed':![],'lastNotifiedVersion':_0x4b91c9,'lastNotifiedAt':_0x4870d5}),{'command':_0xda3422,'current':_0x6dd414,'latest':_0x4b91c9,'url':buildNpmVersionUrl(_0x4b91c9),'message':CLI_BIN_NAME+'\x20'+_0x4b91c9+_0x4f376d(0x110)+_0x6dd414+',\x20run:\x20'+_0xda3422};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x322f6f,_0x2b5e30){const _0x535334=a81_0x4dbc,_0x744709=_0x322f6f();while(!![]){try{const _0x4d3e34=parseInt(_0x535334(0x13b))/0x1*(-parseInt(_0x535334(0x137))/0x2)+-parseInt(_0x535334(0x13e))/0x3*(parseInt(_0x535334(0x139))/0x4)+parseInt(_0x535334(0x135))/0x5*(-parseInt(_0x535334(0x133))/0x6)+parseInt(_0x535334(0x13f))/0x7*(-parseInt(_0x535334(0x134))/0x8)+parseInt(_0x535334(0x138))/0x9+-parseInt(_0x535334(0x13d))/0xa+parseInt(_0x535334(0x132))/0xb*(parseInt(_0x535334(0x13c))/0xc);if(_0x4d3e34===_0x2b5e30)break;else _0x744709['push'](_0x744709['shift']());}catch(_0x4f8b68){_0x744709['push'](_0x744709['shift']());}}}(a81_0x41ce,0xa5353));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';function a81_0x4dbc(_0x32f4b1,_0x4ea5f9){_0x32f4b1=_0x32f4b1-0x132;const _0x41ce30=a81_0x41ce();let _0x4dbc69=_0x41ce30[_0x32f4b1];return _0x4dbc69;}function a81_0x41ce(){const _0x4368ca=['376lTpedE','5EQvRna','slice','5878hMCXYC','971730gaOBFO','1352EYeBFM','unknown','23QbanZj','848604cBCwRB','2108750glOKxy','1560YqdPep','102949CmrvOf','473bKuMIu','7959894AWLOYi'];a81_0x41ce=function(){return _0x4368ca;};return a81_0x41ce();}export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x438f41=a81_0x4dbc,_0x3b97d6=String(GIT_COMMIT);return _0x3b97d6&&_0x3b97d6!==_0x438f41(0x13a)?_0x3b97d6:'';}export function getCliVersionDisplay(){const _0x464904=a81_0x4dbc,_0x5c8417=getCliGitCommit(),_0x5719ac=BUILD_TIME[_0x464904(0x136)](0x0,0xa);if(!_0x5c8417||!_0x5719ac)return VERSION;return VERSION+'\x20('+_0x5c8417+',\x20'+_0x5719ac+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a82_0x26c9(_0x499b27,_0x300d1d){_0x499b27=_0x499b27-0x94;var _0x201ef2=a82_0x201e();var _0x26c921=_0x201ef2[_0x499b27];return _0x26c921;}(function(_0x23ac91,_0x1f07e4){var _0x42eebf=a82_0x26c9,_0x5559a2=_0x23ac91();while(!![]){try{var _0x135fe8=-parseInt(_0x42eebf(0x95))/0x1+-parseInt(_0x42eebf(0x9e))/0x2*(parseInt(_0x42eebf(0x94))/0x3)+parseInt(_0x42eebf(0x9f))/0x4*(parseInt(_0x42eebf(0x9c))/0x5)+-parseInt(_0x42eebf(0x9b))/0x6+-parseInt(_0x42eebf(0x9a))/0x7*(-parseInt(_0x42eebf(0x98))/0x8)+-parseInt(_0x42eebf(0x97))/0x9+-parseInt(_0x42eebf(0x99))/0xa*(-parseInt(_0x42eebf(0x9d))/0xb);if(_0x135fe8===_0x1f07e4)break;else _0x5559a2['push'](_0x5559a2['shift']());}catch(_0x4bf148){_0x5559a2['push'](_0x5559a2['shift']());}}}(a82_0x201e,0x1dd20));export function writeCliSideChannelLine(_0x22ce64){var _0x5850ad=a82_0x26c9;process['stderr'][_0x5850ad(0x96)](_0x22ce64+'\x0a');}function a82_0x201e(){var _0x50328d=['290091sXrbUc','43348WtmDBv','write','629280nXFYxV','1934056yfkkKp','70GKnRLZ','7csaikA','978648kgyAbl','9845EKAKUs','491458NAgcaI','4fraWVc','76rzzuBu'];a82_0x201e=function(){return _0x50328d;};return a82_0x201e();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/lovrabet-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.14-beta.10",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"prebuild": "node scripts/generate-build-info.js",
|
|
23
|
-
"build": "rimraf lib && tsc && tsc-alias && javascript-obfuscator lib --output lib",
|
|
23
|
+
"build": "rimraf lib && tsc && tsc-alias && javascript-obfuscator lib --output lib && node scripts/ensure-bin-executable.mjs",
|
|
24
24
|
"prebuild:dev": "node scripts/generate-build-info.js",
|
|
25
|
-
"build:dev": "rimraf lib && tsc && tsc-alias",
|
|
25
|
+
"build:dev": "rimraf lib && tsc && tsc-alias && node scripts/ensure-bin-executable.mjs",
|
|
26
26
|
"prestart": "node scripts/generate-build-info.js",
|
|
27
27
|
"start": "tsc --watch",
|
|
28
28
|
"pretypecheck": "node scripts/generate-build-info.js",
|
|
@@ -36,9 +36,11 @@
|
|
|
36
36
|
"check:skill-version": "node scripts/check-skill-version.mjs",
|
|
37
37
|
"ci": "npm run typecheck && npm run check:skill-version && npm run check:lockfile && npm run build",
|
|
38
38
|
"pretest": "node scripts/generate-build-info.js",
|
|
39
|
-
"test": "vitest",
|
|
39
|
+
"test": "vitest run",
|
|
40
40
|
"pretest:run": "node scripts/generate-build-info.js",
|
|
41
41
|
"test:run": "vitest run",
|
|
42
|
+
"pretest:watch": "node scripts/generate-build-info.js",
|
|
43
|
+
"test:watch": "vitest",
|
|
42
44
|
"pretest:coverage": "node scripts/generate-build-info.js",
|
|
43
45
|
"test:coverage": "vitest run --coverage"
|
|
44
46
|
},
|
|
@@ -46,8 +48,8 @@
|
|
|
46
48
|
"lib"
|
|
47
49
|
],
|
|
48
50
|
"dependencies": {
|
|
49
|
-
"@lovrabet/cli-framework": "1.0.
|
|
50
|
-
"@lovrabet/sdk": "1.4.
|
|
51
|
+
"@lovrabet/cli-framework": "1.0.5",
|
|
52
|
+
"@lovrabet/sdk": "1.4.2",
|
|
51
53
|
"chalk": "^5.6.2",
|
|
52
54
|
"ink": "^6.2.3",
|
|
53
55
|
"ink-spinner": "^5.0.0",
|