@lovrabet/lovrabet-cli 2.1.7 → 2.1.8-beta.1
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 -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/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/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/cli-skill/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/common/local-file.js +1 -0
- 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/file/index.js +1 -0
- 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/ocr/index.js +1 -0
- 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 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -0
- package/lib/commands/skill/push-flow-helpers.js +1 -0
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.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/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.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/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/service-order.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/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a7608,_0x2dd578){var _0x8f7433=a109_0x4298,_0x467046=_0x2a7608();while(!![]){try{var _0x5bed04=parseInt(_0x8f7433(0xfb))/0x1+-parseInt(_0x8f7433(0xf9))/0x2+parseInt(_0x8f7433(0xf5))/0x3+parseInt(_0x8f7433(0xf7))/0x4*(parseInt(_0x8f7433(0xf6))/0x5)+parseInt(_0x8f7433(0xfc))/0x6+parseInt(_0x8f7433(0xfa))/0x7*(-parseInt(_0x8f7433(0xf4))/0x8)+-parseInt(_0x8f7433(0xfd))/0x9*(parseInt(_0x8f7433(0xf8))/0xa);if(_0x5bed04===_0x2dd578)break;else _0x467046['push'](_0x467046['shift']());}catch(_0x258667){_0x467046['push'](_0x467046['shift']());}}}(a109_0x2efe,0xa0ca8));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a109_0x4298(_0x58cc4f,_0x5b4234){_0x58cc4f=_0x58cc4f-0xf4;var _0x2efed9=a109_0x2efe();var _0x429869=_0x2efed9[_0x58cc4f];return _0x429869;}export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';function a109_0x2efe(){var _0x1b2919=['1668838DZKsWg','5828249PIyRbc','887439qSZYBz','7328880lyKuNJ','207DJGRud','8usqgIB','1611345GzwuhR','19585ILiDrK','660xJadPU','420310OpeZEj'];a109_0x2efe=function(){return _0x1b2919;};return a109_0x2efe();}export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1a8516,_0x47d447){const _0x2ebb6f=a110_0x2992,_0x416a0f=_0x1a8516();while(!![]){try{const _0x40d460=parseInt(_0x2ebb6f(0x1c5))/0x1+parseInt(_0x2ebb6f(0x1c0))/0x2*(-parseInt(_0x2ebb6f(0x1c7))/0x3)+parseInt(_0x2ebb6f(0x1c1))/0x4+parseInt(_0x2ebb6f(0x1c3))/0x5+parseInt(_0x2ebb6f(0x1c6))/0x6+-parseInt(_0x2ebb6f(0x1bf))/0x7*(-parseInt(_0x2ebb6f(0x1c4))/0x8)+parseInt(_0x2ebb6f(0x1c8))/0x9*(-parseInt(_0x2ebb6f(0x1c2))/0xa);if(_0x40d460===_0x47d447)break;else _0x416a0f['push'](_0x416a0f['shift']());}catch(_0x57cec5){_0x416a0f['push'](_0x416a0f['shift']());}}}(a110_0x3352,0xea42a));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a110_0x2992(_0x530c5a,_0x11fc68){_0x530c5a=_0x530c5a-0x1bf;const _0x335200=a110_0x3352();let _0x2992fd=_0x335200[_0x530c5a];return _0x2992fd;}function a110_0x3352(){const _0x30fec6=['3208576llZZfU','10AWfQea','7844070sOKiby','38480SgxSoM','785363qHWcjc','4933290qtGjlY','2045691XwCZhT','24713631GHxAqW','595qPQTJb','2cUAeaD'];a110_0x3352=function(){return _0x30fec6;};return a110_0x3352();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a111_0x287edf=a111_0x5610;(function(_0x3953e7,_0x2c81b7){const _0x40bd01=a111_0x5610,_0x2bd202=_0x3953e7();while(!![]){try{const _0x4fa699=-parseInt(_0x40bd01(0x116))/0x1+-parseInt(_0x40bd01(0x113))/0x2+-parseInt(_0x40bd01(0x11d))/0x3*(parseInt(_0x40bd01(0x11b))/0x4)+parseInt(_0x40bd01(0xf0))/0x5*(parseInt(_0x40bd01(0x10d))/0x6)+parseInt(_0x40bd01(0x121))/0x7*(parseInt(_0x40bd01(0x11e))/0x8)+parseInt(_0x40bd01(0x110))/0x9*(parseInt(_0x40bd01(0x114))/0xa)+parseInt(_0x40bd01(0x10a))/0xb;if(_0x4fa699===_0x2c81b7)break;else _0x2bd202['push'](_0x2bd202['shift']());}catch(_0x318293){_0x2bd202['push'](_0x2bd202['shift']());}}}(a111_0x4f2c,0x62ce0));import a111_0x262939 from'winston';import a111_0x130598 from'node:fs';import a111_0xeb4c28 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a111_0x287edf(0xee)];[a111_0x287edf(0xef)]='';[a111_0x287edf(0x10e)]='';constructor(){}[a111_0x287edf(0x119)](_0x5cc251){this['currentRawCommand']=_0x5cc251;}['setLogPath'](_0x2ef949){const _0x57ef02=a111_0x287edf;this['logFilePath']=a111_0xeb4c28['join'](_0x2ef949,PRODUCT_CONFIG['logFileName']),this['winstonLogger']&&this['winstonLogger']['clear'](),this[_0x57ef02(0xf4)]();}['initWinstonLogger'](){const _0x32bd8d=a111_0x287edf,_0x3f51e6=a111_0xeb4c28[_0x32bd8d(0x11f)](this['logFilePath']);!a111_0x130598['existsSync'](_0x3f51e6)&&a111_0x130598['mkdirSync'](_0x3f51e6,{'recursive':!![]});const _0x5c9cb1=a111_0x262939['format'][_0x32bd8d(0x109)](a111_0x262939['format']['timestamp'](),a111_0x262939[_0x32bd8d(0x108)][_0x32bd8d(0xf1)]({'stack':!![]}),a111_0x262939[_0x32bd8d(0x108)][_0x32bd8d(0x118)](_0x31db9a=>{const _0x5bbdb4=_0x32bd8d,_0x361818={'timestamp':_0x31db9a[_0x5bbdb4(0x105)]||new Date()[_0x5bbdb4(0xf3)](),'level':_0x31db9a[_0x5bbdb4(0x101)]||_0x5bbdb4(0xf5),'command':_0x31db9a[_0x5bbdb4(0x10c)]||_0x5bbdb4(0x10b),'rawCommand':_0x31db9a[_0x5bbdb4(0xfa)]||this['currentRawCommand']||undefined,'message':_0x31db9a[_0x5bbdb4(0xe8)]||'','duration':_0x31db9a['duration']||undefined,'details':_0x31db9a[_0x5bbdb4(0x11a)]||undefined};return JSON[_0x5bbdb4(0x120)](_0x361818);}));this[_0x32bd8d(0xee)]=a111_0x262939[_0x32bd8d(0xeb)]({'level':_0x32bd8d(0xf5),'format':_0x5c9cb1,'transports':[new a111_0x262939[(_0x32bd8d(0x100))][(_0x32bd8d(0xec))]({'filename':this[_0x32bd8d(0xef)],'level':_0x32bd8d(0xf5)})],'silent':![]}),a111_0x262939[_0x32bd8d(0xea)]({'success':_0x32bd8d(0xf9),'error':_0x32bd8d(0x112),'warn':_0x32bd8d(0xf7),'info':_0x32bd8d(0x103)});}[a111_0x287edf(0xf5)](_0x1f2c3f,_0x22cd20,_0xfbac6f){const _0x188f9b=a111_0x287edf;if(!this[_0x188f9b(0xef)]||!this[_0x188f9b(0xee)])return;this[_0x188f9b(0xee)][_0x188f9b(0xf5)](_0x22cd20,{'command':_0x1f2c3f,'details':_0xfbac6f});}[a111_0x287edf(0xfc)](_0x3ac723,_0x104018,_0x10f539,_0x1d1ed9){const _0x4a40e0=a111_0x287edf;if(!this[_0x4a40e0(0xef)]||!this[_0x4a40e0(0xee)])return;this[_0x4a40e0(0xee)][_0x4a40e0(0xe9)]('info',_0x104018,{'level':_0x4a40e0(0xfc),'command':_0x3ac723,'duration':_0x10f539,'details':_0x1d1ed9});}[a111_0x287edf(0xff)](_0x395dbd,_0x3a7c07,_0x4ea606){const _0x2fb3cf=a111_0x287edf;if(!this[_0x2fb3cf(0xef)]||!this['winstonLogger'])return;this[_0x2fb3cf(0xee)]['error'](_0x3a7c07,{'command':_0x395dbd,'details':_0x4ea606});}['warn'](_0x5d2383,_0x5dd646,_0xdc3488){const _0x272335=a111_0x287edf;if(!this[_0x272335(0xef)]||!this[_0x272335(0xee)])return;this[_0x272335(0xee)]['warn'](_0x5dd646,{'command':_0x5d2383,'details':_0xdc3488});}async[a111_0x287edf(0x104)](_0xde99e4,_0x26a150,_0x30d680){const _0x28fca6=a111_0x287edf,_0x1d62a9=Date['now']();this['info'](_0xde99e4,'Starting:\x20'+_0x26a150);try{const _0x5f2aa9=await _0x30d680(),_0x9140ef=Date[_0x28fca6(0xf2)]()-_0x1d62a9;return this[_0x28fca6(0xfc)](_0xde99e4,_0x28fca6(0xf8)+_0x26a150,_0x9140ef),_0x5f2aa9;}catch(_0x58a05d){const _0x49b3ec=Date[_0x28fca6(0xf2)]()-_0x1d62a9;this[_0x28fca6(0xff)](_0xde99e4,_0x28fca6(0xfd)+_0x26a150,{'error':_0x58a05d instanceof Error?_0x58a05d['message']:String(_0x58a05d),'duration':_0x49b3ec});throw _0x58a05d;}}[a111_0x287edf(0x117)](){const _0x111658=a111_0x287edf;try{if(!a111_0x130598[_0x111658(0x10f)](this[_0x111658(0xef)]))return[];const _0x3301ec=a111_0x130598[_0x111658(0x11c)](this[_0x111658(0xef)],_0x111658(0x111));return _0x3301ec['split'](/\r?\n/)['filter'](_0x4ed9cc=>_0x4ed9cc[_0x111658(0xfe)]())[_0x111658(0x107)](_0x586d5d=>JSON['parse'](_0x586d5d));}catch(_0x39af57){return console[_0x111658(0x102)](_0x111658(0xfb),_0x39af57),[];}}[a111_0x287edf(0xed)](){const _0x57d92a=a111_0x287edf;try{a111_0x130598['existsSync'](this[_0x57d92a(0xef)])&&a111_0x130598[_0x57d92a(0x106)](this[_0x57d92a(0xef)],'',_0x57d92a(0x111));}catch(_0x451f5b){console['warn'](_0x57d92a(0x115),_0x451f5b);}}[a111_0x287edf(0xf6)](){return this['winstonLogger'];}}function a111_0x5610(_0x3ead60,_0x23ec8b){_0x3ead60=_0x3ead60-0xe8;const _0x4f2c42=a111_0x4f2c();let _0x561097=_0x4f2c42[_0x3ead60];return _0x561097;}export const logger=new Logger();function a111_0x4f2c(){const _0x1352a9=['2834424hspBzM','readFileSync','3ucZyXM','2610952mtGeMP','dirname','stringify','7jITBID','message','log','addColors','createLogger','File','clearLogs','winstonLogger','logFilePath','90cPvhkJ','errors','now','toISOString','initWinstonLogger','info','getWinstonInstance','yellow','Completed:\x20','green','rawCommand','Failed\x20to\x20read\x20logs:','success','Failed:\x20','trim','error','transports','level','warn','blue','logTask','timestamp','writeFileSync','map','format','combine','12983124gAWqPF','unknown','command','47682HPOhwK','currentRawCommand','existsSync','2664orPFRk','utf8','red','1426222AGAYus','23650HWfJot','Failed\x20to\x20clear\x20logs:','523318WImoZZ','readLogs','printf','setRawCommand','details'];a111_0x4f2c=function(){return _0x1352a9;};return a111_0x4f2c();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x451fdd,_0x2260fd){var _0x2efe93=a112_0x1299,_0x231f03=_0x451fdd();while(!![]){try{var _0x2b09c6=-parseInt(_0x2efe93(0x91))/0x1*(parseInt(_0x2efe93(0xa0))/0x2)+-parseInt(_0x2efe93(0x99))/0x3*(-parseInt(_0x2efe93(0x9e))/0x4)+-parseInt(_0x2efe93(0x92))/0x5*(parseInt(_0x2efe93(0x94))/0x6)+parseInt(_0x2efe93(0x9f))/0x7+-parseInt(_0x2efe93(0x96))/0x8+parseInt(_0x2efe93(0x95))/0x9*(-parseInt(_0x2efe93(0xa1))/0xa)+parseInt(_0x2efe93(0x97))/0xb;if(_0x2b09c6===_0x2260fd)break;else _0x231f03['push'](_0x231f03['shift']());}catch(_0xb63980){_0x231f03['push'](_0x231f03['shift']());}}}(a112_0x3b8e,0xea6cf));function a112_0x3b8e(){var _0x54263c=['53601218JKbTvJ','items','94308efivCx','isArray','parse','Invalid\x20JSON\x20for\x20--params:\x20','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','68CHhEGb','3389596aSdXou','2iFWRRG','10hFwPbt','1255882zNWxWJ','8925325WmQCEp','validation','6EjMkDn','9124965XDuyiW','7011512wxNpxO'];a112_0x3b8e=function(){return _0x54263c;};return a112_0x3b8e();}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x5916c4){var _0xddbd6a=a112_0x1299;if(!_0x5916c4)return undefined;try{return JSON[_0xddbd6a(0x9b)](_0x5916c4);}catch{throw CliErrors[_0xddbd6a(0x93)](_0xddbd6a(0x9c)+_0x5916c4);}}function a112_0x1299(_0x1ad4f7,_0x2b7a3d){_0x1ad4f7=_0x1ad4f7-0x91;var _0x3b8e27=a112_0x3b8e();var _0x1299a7=_0x3b8e27[_0x1ad4f7];return _0x1299a7;}export function parseJsonParamsValue(_0x4a242f){var _0x54c3fa=a112_0x1299;if(!_0x4a242f)return undefined;try{return JSON[_0x54c3fa(0x9b)](_0x4a242f);}catch{throw CliErrors[_0x54c3fa(0x93)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x4a242f);}}export function parseBatchCreateItemsFromParams(_0x1cb300){var _0x38e668=a112_0x1299;if(Array[_0x38e668(0x9a)](_0x1cb300))return _0x1cb300;if(_0x1cb300!==null&&_0x1cb300!==undefined&&typeof _0x1cb300==='object'&&Array[_0x38e668(0x9a)](_0x1cb300[_0x38e668(0x98)]))return _0x1cb300[_0x38e668(0x98)];throw CliErrors['validation'](_0x38e668(0x9d),'Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27');}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3304d9,_0x29d636){const _0x525562=a113_0x58d7,_0x16638d=_0x3304d9();while(!![]){try{const _0x580b60=parseInt(_0x525562(0x1a4))/0x1+-parseInt(_0x525562(0x1a8))/0x2+-parseInt(_0x525562(0x1a7))/0x3+-parseInt(_0x525562(0x1a3))/0x4+parseInt(_0x525562(0x1a5))/0x5+-parseInt(_0x525562(0x1a0))/0x6*(parseInt(_0x525562(0x1a2))/0x7)+parseInt(_0x525562(0x1a1))/0x8;if(_0x580b60===_0x29d636)break;else _0x16638d['push'](_0x16638d['shift']());}catch(_0x11d6dd){_0x16638d['push'](_0x16638d['shift']());}}}(a113_0x5d20,0x74100));export const isWindows=process['platform']==='win32';function a113_0x58d7(_0x22d40a,_0x4bfc96){_0x22d40a=_0x22d40a-0x1a0;const _0x5d2039=a113_0x5d20();let _0x58d75f=_0x5d2039[_0x22d40a];return _0x58d75f;}function a113_0x5d20(){const _0x4e62bd=['362341jhYLXq','1086416lAyQth','128665ZshYbD','4293305slbjlX','.cmd','1487694vzyIlQ','1590450BTmRBL','102oMjUWh','15446112rNThAV'];a113_0x5d20=function(){return _0x4e62bd;};return a113_0x5d20();}export function resolveNpmBin(_0x10a754){const _0x2c0a18=a113_0x58d7;return isWindows?_0x10a754+_0x2c0a18(0x1a6):_0x10a754;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x15b87d,_0x3a486c){const _0x29d8cb=a114_0x3f53,_0x4c5311=_0x15b87d();while(!![]){try{const _0x4147c5=-parseInt(_0x29d8cb(0x80))/0x1*(parseInt(_0x29d8cb(0x77))/0x2)+-parseInt(_0x29d8cb(0x94))/0x3+-parseInt(_0x29d8cb(0x9a))/0x4+-parseInt(_0x29d8cb(0x8a))/0x5*(parseInt(_0x29d8cb(0x8b))/0x6)+parseInt(_0x29d8cb(0x90))/0x7*(-parseInt(_0x29d8cb(0x86))/0x8)+parseInt(_0x29d8cb(0x7c))/0x9*(-parseInt(_0x29d8cb(0x88))/0xa)+parseInt(_0x29d8cb(0x7a))/0xb;if(_0x4147c5===_0x3a486c)break;else _0x4c5311['push'](_0x4c5311['shift']());}catch(_0x224df7){_0x4c5311['push'](_0x4c5311['shift']());}}}(a114_0x38f8,0xec0c1));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(_0x1bbf8c){const _0x510423=a114_0x3f53,_0x32c695=_0x1bbf8c[_0x510423(0x98)]()[_0x510423(0x72)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x32c695)return null;return{'major':Number(_0x32c695[0x1]),'minor':Number(_0x32c695[0x2]),'patch':Number(_0x32c695[0x3]),'prerelease':_0x32c695[0x4]};}function compareSemver(_0x50f0d5,_0x5e635a){const _0x2f6d4d=a114_0x3f53,_0x325f85=parseSemver(_0x50f0d5),_0x733591=parseSemver(_0x5e635a);if(!_0x325f85||!_0x733591)throw new Error('Invalid\x20semver');for(const _0x3c300e of['major',_0x2f6d4d(0x85),_0x2f6d4d(0x7f)]){if(_0x325f85[_0x3c300e]<_0x733591[_0x3c300e])return-0x1;if(_0x325f85[_0x3c300e]>_0x733591[_0x3c300e])return 0x1;}if(!_0x325f85[_0x2f6d4d(0x97)]&&!_0x733591['prerelease'])return 0x0;if(!_0x325f85[_0x2f6d4d(0x97)])return 0x1;if(!_0x733591[_0x2f6d4d(0x97)])return-0x1;if(_0x325f85['prerelease']===_0x733591[_0x2f6d4d(0x97)])return 0x0;return _0x325f85['prerelease']<_0x733591['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x5010cc=a114_0x3f53,_0xd05a6b=process.env.LOVRABET_NO_UPDATE_NOTICE?.['trim']()[_0x5010cc(0x7e)]();return _0xd05a6b==='1'||_0xd05a6b===_0x5010cc(0x74)||_0xd05a6b===_0x5010cc(0x83);}function cacheRoot(){const _0x2fa5b2=a114_0x3f53;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x2fa5b2(0x9c));}export function getUpdateNoticeCachePath(){const _0x418faa=a114_0x3f53;return join(cacheRoot(),_0x418faa(0x82),'update-check.json');}async function readUpdateNoticeCache(){const _0x35ea6e=a114_0x3f53;try{const _0x4d989e=await readFile(getUpdateNoticeCachePath(),_0x35ea6e(0x93)),_0x4283eb=JSON[_0x35ea6e(0x78)](_0x4d989e);if(!_0x4283eb||typeof _0x4283eb!==_0x35ea6e(0x95))return{};return _0x4283eb;}catch{return{};}}function a114_0x3f53(_0x4a3221,_0x4540ed){_0x4a3221=_0x4a3221-0x70;const _0x38f898=a114_0x38f8();let _0x3f53e5=_0x38f898[_0x4a3221];return _0x3f53e5;}async function writeUpdateNoticeCache(_0x2b5bc2){const _0x4050ba=a114_0x3f53;try{const _0xb7fa29=getUpdateNoticeCachePath();await mkdir(dirname(_0xb7fa29),{'recursive':!![]}),await writeFile(_0xb7fa29,JSON[_0x4050ba(0x99)](_0x2b5bc2,null,0x2)+'\x0a',_0x4050ba(0x93));}catch{}}function isFreshCheck(_0x5b0d43,_0x580485){const _0x2e5adf=a114_0x3f53;return typeof _0x5b0d43[_0x2e5adf(0x7b)]==='number'&&_0x580485-_0x5b0d43[_0x2e5adf(0x7b)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x3dfc01,_0x4e131a,_0x1e7150){const _0x11a720=a114_0x3f53;return _0x3dfc01[_0x11a720(0x87)]===_0x4e131a&&typeof _0x3dfc01[_0x11a720(0x9b)]===_0x11a720(0x76)&&_0x1e7150-_0x3dfc01[_0x11a720(0x9b)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x2fbd0e=0x5dc){const _0x1b49f2=a114_0x3f53;try{const _0x4b21a9=NPM_REGISTRY_BASE_URL+_0x1b49f2(0x70)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x1b49f2(0x91),_0x37be26=await fetch(_0x4b21a9,{'signal':AbortSignal[_0x1b49f2(0x71)](_0x2fbd0e)});if(!_0x37be26['ok'])return null;const _0x4b7c1d=await _0x37be26[_0x1b49f2(0x92)]();if(!_0x4b7c1d||typeof _0x4b7c1d!==_0x1b49f2(0x95))return null;return Object[_0x1b49f2(0x84)](Object[_0x1b49f2(0x89)](_0x4b7c1d)[_0x1b49f2(0x79)](([,_0x29b287])=>typeof _0x29b287===_0x1b49f2(0x96)&&_0x29b287['trim']())[_0x1b49f2(0x7d)](([_0x592898,_0xaffc02])=>[_0x592898,String(_0xaffc02)['trim']()]));}catch{return null;}}export function buildNpmVersionUrl(_0x5dc073){const _0x3425e9=a114_0x3f53;return _0x3425e9(0x8c)+LOVRABET_NPM_PACKAGE_NAME+_0x3425e9(0x8e)+_0x5dc073;}function a114_0x38f8(){const _0x1b1db0=['filter','84669255eweFwF','checkedAt','15381bfknqt','map','toLowerCase','patch','68951ZNmsYo','latest','lovrabet-cli','yes','fromEntries','minor','399512zlefVe','lastNotifiedVersion','7470VFwABC','entries','5ZEKtEA','4966410uAbqAC','https://www.npmjs.com/package/',',\x20run:\x20','/v/','\x20update','133TEptmS','/dist-tags','json','utf8','3999777trdKzv','object','string','prerelease','trim','stringify','5238532hLdjun','lastNotifiedAt','.cache','/-/package/','timeout','match','now','true','\x20available,\x20current\x20','number','30PePHAz','parse'];a114_0x38f8=function(){return _0x1b1db0;};return a114_0x38f8();}export async function resolveLatestUpdateNotice(){const _0x49a7fc=a114_0x3f53;if(isUpdateNoticeDisabled())return null;try{const _0x223ebb=Date[_0x49a7fc(0x73)](),_0x207ae1=getCliVersion(),_0x1846bd=await readUpdateNoticeCache();let _0x47db99=isFreshCheck(_0x1846bd,_0x223ebb)?_0x1846bd[_0x49a7fc(0x81)]?.['trim']():undefined;if(!_0x47db99&&!isFreshCheck(_0x1846bd,_0x223ebb)){const _0x59178a=await fetchNpmDistTags();_0x47db99=_0x59178a?.['latest']?.['trim'](),await writeUpdateNoticeCache({..._0x1846bd,'checkedAt':_0x223ebb,'latest':_0x47db99,'failed':!_0x47db99});}if(!_0x47db99||compareSemver(_0x207ae1,_0x47db99)>=0x0)return null;if(isRecentlyNotified(_0x1846bd,_0x47db99,_0x223ebb))return null;const _0x5a3418=CLI_BIN_NAME+_0x49a7fc(0x8f);return await writeUpdateNoticeCache({..._0x1846bd,'checkedAt':isFreshCheck(_0x1846bd,_0x223ebb)?_0x1846bd[_0x49a7fc(0x7b)]:_0x223ebb,'latest':_0x47db99,'failed':![],'lastNotifiedVersion':_0x47db99,'lastNotifiedAt':_0x223ebb}),{'command':_0x5a3418,'current':_0x207ae1,'latest':_0x47db99,'url':buildNpmVersionUrl(_0x47db99),'message':CLI_BIN_NAME+'\x20'+_0x47db99+_0x49a7fc(0x75)+_0x207ae1+_0x49a7fc(0x8d)+_0x5a3418};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x109dc0,_0x4f7adc){const _0x439ae1=a115_0xb6f2,_0x20f043=_0x109dc0();while(!![]){try{const _0x26623e=parseInt(_0x439ae1(0x1d0))/0x1*(-parseInt(_0x439ae1(0x1d8))/0x2)+parseInt(_0x439ae1(0x1d5))/0x3+parseInt(_0x439ae1(0x1cf))/0x4*(-parseInt(_0x439ae1(0x1d2))/0x5)+-parseInt(_0x439ae1(0x1cd))/0x6*(-parseInt(_0x439ae1(0x1d1))/0x7)+-parseInt(_0x439ae1(0x1d4))/0x8*(parseInt(_0x439ae1(0x1d9))/0x9)+parseInt(_0x439ae1(0x1d7))/0xa*(parseInt(_0x439ae1(0x1d6))/0xb)+parseInt(_0x439ae1(0x1ce))/0xc;if(_0x26623e===_0x4f7adc)break;else _0x20f043['push'](_0x20f043['shift']());}catch(_0x48a71d){_0x20f043['push'](_0x20f043['shift']());}}}(a115_0x3575,0xad89a));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a115_0xb6f2(_0x17c383,_0x4b15f2){_0x17c383=_0x17c383-0x1cd;const _0x3575f1=a115_0x3575();let _0xb6f21c=_0x3575f1[_0x17c383];return _0xb6f21c;}export function getCliGitCommit(){const _0x5810cb=String(GIT_COMMIT);return _0x5810cb&&_0x5810cb!=='unknown'?_0x5810cb:'';}export function getCliVersionDisplay(){const _0x28baae=a115_0xb6f2,_0x3d2eeb=getCliGitCommit(),_0x138d99=BUILD_TIME[_0x28baae(0x1d3)](0x0,0xa);if(!_0x3d2eeb||!_0x138d99)return VERSION;return VERSION+'\x20('+_0x3d2eeb+',\x20'+_0x138d99+')';}function a115_0x3575(){const _0x5174db=['2386637pcfEQj','30ifVztO','204vPyGnn','3285MIJWjG','1993854lsyhPr','12484428cWebqv','4VjgTof','1437TvZiIz','21utGLhu','6376565oJNXMw','slice','23840JOkccm','1596600OBSiTU'];a115_0x3575=function(){return _0x5174db;};return a115_0x3575();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a116_0x7319(_0x1d5067,_0xb4797a){_0x1d5067=_0x1d5067-0x17a;var _0x1e628d=a116_0x1e62();var _0x73192b=_0x1e628d[_0x1d5067];return _0x73192b;}(function(_0x3763e1,_0x61a472){var _0x4670fc=a116_0x7319,_0x2a5aef=_0x3763e1();while(!![]){try{var _0x5c8e92=-parseInt(_0x4670fc(0x182))/0x1*(parseInt(_0x4670fc(0x17a))/0x2)+parseInt(_0x4670fc(0x185))/0x3+parseInt(_0x4670fc(0x17c))/0x4*(parseInt(_0x4670fc(0x17b))/0x5)+parseInt(_0x4670fc(0x17e))/0x6+parseInt(_0x4670fc(0x184))/0x7+parseInt(_0x4670fc(0x183))/0x8*(-parseInt(_0x4670fc(0x180))/0x9)+-parseInt(_0x4670fc(0x17d))/0xa;if(_0x5c8e92===_0x61a472)break;else _0x2a5aef['push'](_0x2a5aef['shift']());}catch(_0x55b7b4){_0x2a5aef['push'](_0x2a5aef['shift']());}}}(a116_0x1e62,0x65925));function a116_0x1e62(){var _0x5e3df9=['stderr','141JIxAUM','658808vSvZIl','556535NZEHyB','1799808MuPztc','2158tFvqLl','35cqkNsu','133092AwrxxA','1358390knsBvm','232296VAVTuL','write','27JEPqMa'];a116_0x1e62=function(){return _0x5e3df9;};return a116_0x1e62();}export function writeCliSideChannelLine(_0x34720d){var _0x5b4fa2=a116_0x7319;process[_0x5b4fa2(0x181)][_0x5b4fa2(0x17f)](_0x34720d+'\x0a');}
|