@lovrabet/lovrabet-cli 2.1.11 → 2.1.12-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 -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/file/index.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/ocr/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 -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 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- 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/rate-limit.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/lossless-json.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 a108_0x531a(){const _0x2b8f1d=['name','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','496084SHOpPK','length','1980-01-01T00:00:00.000Z','endsWith','235478QahtlV','object','328nfsRqV','415pdlMvu','27OGhGIV','1424687ZhLnWU','36rJYWjq','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','code','9333506NnMSKu','13614EmhNpx','validation_error','11260ZNfNpk','176127oJlXdX','validation','5nIcfoR','from','1809xVXIrO','map'];a108_0x531a=function(){return _0x2b8f1d;};return a108_0x531a();}const a108_0x52284f=a108_0x5a79;function a108_0x5a79(_0x4b29ef,_0xcf199e){_0x4b29ef=_0x4b29ef-0xa5;const _0x531ade=a108_0x531a();let _0x5a79ae=_0x531ade[_0x4b29ef];return _0x5a79ae;}(function(_0x8b14,_0x217b37){const _0x46c1eb=a108_0x5a79,_0x32cf56=_0x8b14();while(!![]){try{const _0x90d53a=-parseInt(_0x46c1eb(0xb5))/0x1*(parseInt(_0x46c1eb(0xa6))/0x2)+parseInt(_0x46c1eb(0xaa))/0x3*(-parseInt(_0x46c1eb(0xbb))/0x4)+parseInt(_0x46c1eb(0xa9))/0x5*(parseInt(_0x46c1eb(0xb0))/0x6)+parseInt(_0x46c1eb(0xb3))/0x7*(parseInt(_0x46c1eb(0xa8))/0x8)+-parseInt(_0x46c1eb(0xb7))/0x9*(-parseInt(_0x46c1eb(0xb2))/0xa)+-parseInt(_0x46c1eb(0xab))/0xb*(-parseInt(_0x46c1eb(0xac))/0xc)+parseInt(_0x46c1eb(0xaf))/0xd;if(_0x90d53a===_0x217b37)break;else _0x32cf56['push'](_0x32cf56['shift']());}catch(_0xf881aa){_0x32cf56['push'](_0x32cf56['shift']());}}}(a108_0x531a,0xcf00b));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a108_0x52284f(0xbd));export function createDeterministicZipPackage(_0x2a3e78){const _0x59c358={};for(const _0x56c6a5 of normalizeLocalFiles(_0x2a3e78)){_0x59c358[_0x56c6a5['path']]=fileContent(_0x56c6a5);}return Buffer['from'](zipSync(_0x59c358,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x2aeb09){const _0x50be65=a108_0x52284f;if(_0x2aeb09[_0x50be65(0xbc)]<0x16)throw CliErrors[_0x50be65(0xb4)](_0x50be65(0xba));let _0x3e4e21;try{_0x3e4e21=unzipSync(_0x2aeb09,{'filter'(_0x5c248d){const _0x501b43=_0x50be65,_0x24f1a1=normalizeSkillRelativePath(_0x5c248d[_0x501b43(0xb9)]);if(_0x24f1a1[_0x501b43(0xa5)]('/'))throw CliErrors[_0x501b43(0xb4)](_0x501b43(0xad)+_0x24f1a1);return!![];}});}catch(_0x538472){if(isRuntimeSkillValidationError(_0x538472))throw _0x538472;throw CliErrors[_0x50be65(0xb4)](_0x50be65(0xba));}return Object['entries'](_0x3e4e21)[_0x50be65(0xb8)](([_0x5dbc76,_0x30e3f0])=>({'path':normalizeSkillRelativePath(_0x5dbc76),'bytes':Buffer[_0x50be65(0xb6)](_0x30e3f0)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x23329b){const _0x4b1d9b=a108_0x52284f;return typeof _0x23329b===_0x4b1d9b(0xa7)&&_0x23329b!==null&&_0x4b1d9b(0xae)in _0x23329b&&_0x23329b[_0x4b1d9b(0xae)]===_0x4b1d9b(0xb1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ab866,_0x4575c1){const _0x4fabf6=a109_0x1a28,_0x340190=_0x5ab866();while(!![]){try{const _0x49a8b6=-parseInt(_0x4fabf6(0x116))/0x1*(parseInt(_0x4fabf6(0x10f))/0x2)+parseInt(_0x4fabf6(0x132))/0x3*(-parseInt(_0x4fabf6(0x12e))/0x4)+parseInt(_0x4fabf6(0x134))/0x5+parseInt(_0x4fabf6(0x12b))/0x6+parseInt(_0x4fabf6(0x12a))/0x7*(-parseInt(_0x4fabf6(0x137))/0x8)+-parseInt(_0x4fabf6(0x138))/0x9+parseInt(_0x4fabf6(0x11a))/0xa*(parseInt(_0x4fabf6(0x130))/0xb);if(_0x49a8b6===_0x4575c1)break;else _0x340190['push'](_0x340190['shift']());}catch(_0x28ed34){_0x340190['push'](_0x340190['shift']());}}}(a109_0x589f,0x6a0cc));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x4a219b){const _0x263ba0=a109_0x1a28,_0x52a49a=normalizeLocalFiles(_0x4a219b);if(!_0x52a49a['some'](_0x2780cc=>_0x2780cc['path']===SKILL_FILE))throw CliErrors[_0x263ba0(0x123)](_0x263ba0(0x136)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x58c68f=localFilesToManifestFiles(_0x52a49a),_0x2b6319=createDeterministicZipPackage(_0x52a49a);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x58c68f),'zipSha256':bufferSha256(_0x2b6319),'zipSize':_0x2b6319[_0x263ba0(0x11d)],'files':_0x58c68f},'packageBytes':_0x2b6319,'packageBase64':_0x2b6319['toString'](_0x263ba0(0x125))};}export function verifyRuntimeSkillPackage(_0x45bed7,_0x2f6d94){const _0x298035=a109_0x1a28,_0x4f5f9=normalizePackageManifest(_0x45bed7,{'requireOssPath':![]});if(!_0x4f5f9)throw CliErrors[_0x298035(0x123)](_0x298035(0x121));return extractAndVerifyPackage(_0x4f5f9,_0x2f6d94);}export function verifyRuntimeSkillBundle(_0x3da7cf,_0x59f7b2){const _0x2d671f=a109_0x1a28,_0x15d5d1=normalizePackageManifest(_0x3da7cf,{'requireOssPath':![]});if(!_0x15d5d1)throw CliErrors[_0x2d671f(0x123)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x15d5d1,_0x59f7b2);}function a109_0x1a28(_0x15d332,_0x5f1057){_0x15d332=_0x15d332-0x10e;const _0x589f78=a109_0x589f();let _0x1a2828=_0x589f78[_0x15d332];return _0x1a2828;}export function tryNormalizePackageManifest(_0x231f8a){return normalizePackageManifest(_0x231f8a,{'requireOssPath':![]});}export function requirePackageBytes(_0x3ad43c,_0x5ca28f){const _0x130a41=a109_0x1a28;if(!_0x5ca28f||_0x5ca28f[_0x130a41(0x11d)]===0x0)throw CliErrors[_0x130a41(0x123)]('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x3ad43c);return _0x5ca28f;}export function extractDownloadedPackage(_0x58d74e){const _0x4a2302=a109_0x1a28,_0x17ff10=parseZipPackage(_0x58d74e)[_0x4a2302(0x139)](_0x3e81d4=>({'path':_0x3e81d4['path'],'bytes':_0x3e81d4[_0x4a2302(0x124)]}));if(!_0x17ff10['some'](_0x5c4917=>_0x5c4917[_0x4a2302(0x111)]===SKILL_FILE))throw CliErrors[_0x4a2302(0x123)](_0x4a2302(0x11c)+SKILL_FILE+'.');return normalizeLocalFiles(_0x17ff10);}export function localFilesToManifestFiles(_0x230731){const _0x120984=a109_0x1a28;return normalizeLocalFiles(_0x230731)[_0x120984(0x139)](_0x1ee253=>({'path':_0x1ee253[_0x120984(0x111)],'sha256':fileHash(_0x1ee253),'size':fileContent(_0x1ee253)[_0x120984(0x11d)]}));}function normalizePackageManifest(_0x2a67b1,_0x174a2d){const _0xb590df=a109_0x1a28;if(!_0x2a67b1||typeof _0x2a67b1!=='object'||Array['isArray'](_0x2a67b1))return undefined;const _0x4c987d=_0x2a67b1,_0x5afb18=typeof _0x4c987d[_0xb590df(0x128)]==='string'?_0x4c987d[_0xb590df(0x128)][_0xb590df(0x119)]():undefined;if(_0x174a2d[_0xb590df(0x117)]&&!_0x5afb18)return undefined;if(!Array[_0xb590df(0x133)](_0x4c987d['files'])||_0x4c987d['files'][_0xb590df(0x11d)]===0x0)return undefined;if(!isSha256Hex(_0x4c987d[_0xb590df(0x131)]))throw CliErrors[_0xb590df(0x123)](_0xb590df(0x11b));if(!isSha256Hex(_0x4c987d['zipSha256']))throw CliErrors[_0xb590df(0x123)](_0xb590df(0x135));if(!Number[_0xb590df(0x120)](_0x4c987d[_0xb590df(0x12f)])||_0x4c987d[_0xb590df(0x12f)]<0x0)throw CliErrors[_0xb590df(0x123)](_0xb590df(0x12d));const _0x43a3ce=normalizeManifestFiles(_0x4c987d[_0xb590df(0x11e)]);if(!_0x43a3ce[_0xb590df(0x126)](_0x3f1a0d=>_0x3f1a0d[_0xb590df(0x111)]===SKILL_FILE))throw CliErrors[_0xb590df(0x123)](_0xb590df(0x122)+SKILL_FILE+'.');const _0x2a10f1=fileTreeHash(_0x43a3ce);if(_0x2a10f1!==_0x4c987d['treeSha256'][_0xb590df(0x10e)]())throw CliErrors[_0xb590df(0x123)](_0xb590df(0x11f));return{'schemaVersion':Number[_0xb590df(0x120)](_0x4c987d[_0xb590df(0x13c)])?_0x4c987d[_0xb590df(0x13c)]:0x2,'ossPath':_0x5afb18,'treeSha256':_0x2a10f1,'zipSha256':_0x4c987d['zipSha256'][_0xb590df(0x10e)](),'zipSize':_0x4c987d[_0xb590df(0x12f)],'files':_0x43a3ce};}function a109_0x589f(){const _0x5f0452=['2505474MkmDej','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','201944VHiVrO','zipSize','19470NIoGeM','treeSha256','27yuMfUa','isArray','238145orGjwj','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Missing\x20','2643536WVEzTx','3559626pfEelF','map','Runtime\x20Skill\x20package\x20size\x20mismatch.','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','schemaVersion','toLowerCase','73954Rzohcz','get','path','zipSha256','push','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','4YMJiBE','requireOssPath','set','trim','7330tfxFsj','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20is\x20missing\x20','length','files','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','isSafeInteger','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','validation','bytes','base64','some','sha256','ossPath','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','7JNkmAV'];a109_0x589f=function(){return _0x5f0452;};return a109_0x589f();}function extractAndVerifyPackage(_0xc8ddd7,_0x1e0f11){const _0x215b82=a109_0x1a28,_0x1af001=normalizePackageManifest(_0xc8ddd7,{'requireOssPath':![]});if(!_0x1af001)throw CliErrors[_0x215b82(0x123)](_0x215b82(0x121));if(_0x1e0f11[_0x215b82(0x11d)]!==_0x1af001[_0x215b82(0x12f)])throw CliErrors[_0x215b82(0x123)](_0x215b82(0x13a));const _0x345f72=bufferSha256(_0x1e0f11);if(_0x345f72!==_0x1af001[_0x215b82(0x112)])throw CliErrors['validation'](_0x215b82(0x115));return extractAndVerifyPackageFiles(_0x1af001,_0x1e0f11);}function extractAndVerifyPackageFiles(_0x261569,_0x5327c3){const _0x3272b1=a109_0x1a28,_0x236360=parseZipPackage(_0x5327c3);if(_0x236360[_0x3272b1(0x11d)]!==_0x261569['files'][_0x3272b1(0x11d)])throw CliErrors[_0x3272b1(0x123)](_0x3272b1(0x13b));const _0x829b93=new Map();for(const _0x2e8ad3 of _0x236360){if(_0x829b93['has'](_0x2e8ad3[_0x3272b1(0x111)]))throw CliErrors[_0x3272b1(0x123)](_0x3272b1(0x114)+_0x2e8ad3['path']);_0x829b93[_0x3272b1(0x118)](_0x2e8ad3[_0x3272b1(0x111)],_0x2e8ad3);}const _0x4b7bf2=[];for(const _0x463d77 of _0x261569[_0x3272b1(0x11e)]){const _0x53975f=_0x829b93[_0x3272b1(0x110)](_0x463d77[_0x3272b1(0x111)]);if(!_0x53975f)throw CliErrors[_0x3272b1(0x123)](_0x3272b1(0x12c)+_0x463d77[_0x3272b1(0x111)]);if(_0x53975f[_0x3272b1(0x124)][_0x3272b1(0x11d)]!==_0x463d77['size'])throw CliErrors[_0x3272b1(0x123)](_0x3272b1(0x129)+_0x463d77['path']);const _0x5d58dd=bufferSha256(_0x53975f[_0x3272b1(0x124)]);if(_0x5d58dd!==_0x463d77[_0x3272b1(0x127)])throw CliErrors[_0x3272b1(0x123)]('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x463d77[_0x3272b1(0x111)]);_0x4b7bf2[_0x3272b1(0x113)]({'path':_0x463d77['path'],'bytes':_0x53975f[_0x3272b1(0x124)]});}return normalizeLocalFiles(_0x4b7bf2);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d8056,_0x2eb1cd){var _0x42da3c=a110_0x102c,_0x1fdd7d=_0x2d8056();while(!![]){try{var _0x1b18ae=parseInt(_0x42da3c(0x177))/0x1*(parseInt(_0x42da3c(0x17c))/0x2)+parseInt(_0x42da3c(0x176))/0x3+-parseInt(_0x42da3c(0x17f))/0x4*(parseInt(_0x42da3c(0x17a))/0x5)+parseInt(_0x42da3c(0x17d))/0x6*(-parseInt(_0x42da3c(0x180))/0x7)+-parseInt(_0x42da3c(0x17b))/0x8*(parseInt(_0x42da3c(0x179))/0x9)+parseInt(_0x42da3c(0x17e))/0xa+parseInt(_0x42da3c(0x175))/0xb*(parseInt(_0x42da3c(0x178))/0xc);if(_0x1b18ae===_0x2eb1cd)break;else _0x1fdd7d['push'](_0x1fdd7d['shift']());}catch(_0x1cd462){_0x1fdd7d['push'](_0x1fdd7d['shift']());}}}(a110_0x21b6,0x73642));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';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';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';function a110_0x102c(_0x567471,_0x3c236c){_0x567471=_0x567471-0x175;var _0x21b675=a110_0x21b6();var _0x102cbe=_0x21b675[_0x567471];return _0x102cbe;}export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';function a110_0x21b6(){var _0x1dc930=['4557630oFTsyI','4VnXYdp','319851vSUFJz','99vqgJfO','138480aPqQhe','475312kePjIc','1124016lQUonh','834615rqANNO','1933515vBMfql','8WWkjcm','2FmjfwV','114SqHkOP'];a110_0x21b6=function(){return _0x1dc930;};return a110_0x21b6();}export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x29e958,_0x29093f){const _0x5af330=a111_0x575f,_0x3bd8b7=_0x29e958();while(!![]){try{const _0x1c1d5d=parseInt(_0x5af330(0x16b))/0x1*(-parseInt(_0x5af330(0x165))/0x2)+-parseInt(_0x5af330(0x169))/0x3*(-parseInt(_0x5af330(0x164))/0x4)+parseInt(_0x5af330(0x168))/0x5+-parseInt(_0x5af330(0x166))/0x6+parseInt(_0x5af330(0x16a))/0x7+parseInt(_0x5af330(0x16e))/0x8*(parseInt(_0x5af330(0x167))/0x9)+-parseInt(_0x5af330(0x16c))/0xa*(parseInt(_0x5af330(0x16d))/0xb);if(_0x1c1d5d===_0x29093f)break;else _0x3bd8b7['push'](_0x3bd8b7['shift']());}catch(_0x4af840){_0x3bd8b7['push'](_0x3bd8b7['shift']());}}}(a111_0x1d0b,0x93702));function a111_0x1d0b(){const _0x195b71=['557532LpakpM','54yPgJPl','3677335fJisTv','3JCXxns','5229903iRJclV','1nFYhnj','631860znfwHY','154QYgvje','91808zwdLDP','585712oClKpU','232896YTApuh'];a111_0x1d0b=function(){return _0x195b71;};return a111_0x1d0b();}function a111_0x575f(_0x369120,_0x107765){_0x369120=_0x369120-0x164;const _0x1d0b1a=a111_0x1d0b();let _0x575ffa=_0x1d0b1a[_0x369120];return _0x575ffa;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a112_0x54c6f9=a112_0x3bc1;(function(_0x3a202a,_0x5c531f){const _0x10322e=a112_0x3bc1,_0x450f79=_0x3a202a();while(!![]){try{const _0x37c331=-parseInt(_0x10322e(0xe9))/0x1*(parseInt(_0x10322e(0xea))/0x2)+-parseInt(_0x10322e(0xfe))/0x3*(parseInt(_0x10322e(0x10a))/0x4)+parseInt(_0x10322e(0x101))/0x5+-parseInt(_0x10322e(0xeb))/0x6*(-parseInt(_0x10322e(0xf7))/0x7)+parseInt(_0x10322e(0x102))/0x8+-parseInt(_0x10322e(0x103))/0x9+parseInt(_0x10322e(0xf5))/0xa;if(_0x37c331===_0x5c531f)break;else _0x450f79['push'](_0x450f79['shift']());}catch(_0x4233aa){_0x450f79['push'](_0x450f79['shift']());}}}(a112_0x19fa,0xbcd19));import a112_0x3070f7 from'winston';import a112_0x1aa785 from'node:fs';function a112_0x19fa(){const _0xba5093=['filter','details','red','1107714pOqGRg','setRawCommand','initWinstonLogger','355315TJPclV','1017976KBIGwD','1147149pepBtk','currentRawCommand','File','mkdirSync','timestamp','Failed\x20to\x20clear\x20logs:','trim','16ZtQySK','stringify','now','unknown','createLogger','log','winstonLogger','existsSync','logFilePath','format','error','map','Failed:\x20','success','command','level','blue','utf8','printf','logFileName','writeFileSync','Completed:\x20','info','Starting:\x20','939VVDVLh','2218rnryjd','342ZKuDXS','combine','clear','green','yellow','addColors','setLogPath','Failed\x20to\x20read\x20logs:','split','duration','20149060fdTaag','clearLogs','148099zVUfcP','warn','readFileSync','errors'];a112_0x19fa=function(){return _0xba5093;};return a112_0x19fa();}import a112_0xd22994 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a112_0x54c6f9(0x110)];[a112_0x54c6f9(0x112)]='';[a112_0x54c6f9(0x104)]='';constructor(){}[a112_0x54c6f9(0xff)](_0x4b477a){const _0x3a1ba3=a112_0x54c6f9;this[_0x3a1ba3(0x104)]=_0x4b477a;}[a112_0x54c6f9(0xf1)](_0x1683cc){const _0x1b8c96=a112_0x54c6f9;this[_0x1b8c96(0x112)]=a112_0xd22994['join'](_0x1683cc,PRODUCT_CONFIG[_0x1b8c96(0xe4)]),this[_0x1b8c96(0x110)]&&this['winstonLogger'][_0x1b8c96(0xed)](),this[_0x1b8c96(0x100)]();}[a112_0x54c6f9(0x100)](){const _0x31516d=a112_0x54c6f9,_0x56367b=a112_0xd22994['dirname'](this[_0x31516d(0x112)]);!a112_0x1aa785['existsSync'](_0x56367b)&&a112_0x1aa785[_0x31516d(0x106)](_0x56367b,{'recursive':!![]});const _0x274049=a112_0x3070f7[_0x31516d(0x113)][_0x31516d(0xec)](a112_0x3070f7[_0x31516d(0x113)]['timestamp'](),a112_0x3070f7[_0x31516d(0x113)][_0x31516d(0xfa)]({'stack':!![]}),a112_0x3070f7['format'][_0x31516d(0xe3)](_0x939835=>{const _0x30def6=_0x31516d,_0x537332={'timestamp':_0x939835[_0x30def6(0x107)]||new Date()['toISOString'](),'level':_0x939835[_0x30def6(0xe0)]||_0x30def6(0xe7),'command':_0x939835[_0x30def6(0xdf)]||_0x30def6(0x10d),'rawCommand':_0x939835['rawCommand']||this['currentRawCommand']||undefined,'message':_0x939835['message']||'','duration':_0x939835[_0x30def6(0xf4)]||undefined,'details':_0x939835[_0x30def6(0xfc)]||undefined};return JSON[_0x30def6(0x10b)](_0x537332);}));this[_0x31516d(0x110)]=a112_0x3070f7[_0x31516d(0x10e)]({'level':_0x31516d(0xe7),'format':_0x274049,'transports':[new a112_0x3070f7['transports'][(_0x31516d(0x105))]({'filename':this['logFilePath'],'level':_0x31516d(0xe7)})],'silent':![]}),a112_0x3070f7[_0x31516d(0xf0)]({'success':_0x31516d(0xee),'error':_0x31516d(0xfd),'warn':_0x31516d(0xef),'info':_0x31516d(0xe1)});}[a112_0x54c6f9(0xe7)](_0x1fb637,_0x3f74fd,_0x5921d7){const _0x4600e9=a112_0x54c6f9;if(!this[_0x4600e9(0x112)]||!this[_0x4600e9(0x110)])return;this[_0x4600e9(0x110)][_0x4600e9(0xe7)](_0x3f74fd,{'command':_0x1fb637,'details':_0x5921d7});}[a112_0x54c6f9(0xde)](_0x5a522e,_0x417526,_0x9ce7c7,_0x212eaf){const _0x6b6a45=a112_0x54c6f9;if(!this[_0x6b6a45(0x112)]||!this[_0x6b6a45(0x110)])return;this['winstonLogger'][_0x6b6a45(0x10f)]('info',_0x417526,{'level':'success','command':_0x5a522e,'duration':_0x9ce7c7,'details':_0x212eaf});}[a112_0x54c6f9(0x114)](_0x2e16ef,_0x5d9743,_0x1d4900){const _0x317971=a112_0x54c6f9;if(!this[_0x317971(0x112)]||!this['winstonLogger'])return;this[_0x317971(0x110)][_0x317971(0x114)](_0x5d9743,{'command':_0x2e16ef,'details':_0x1d4900});}['warn'](_0x5324f9,_0x1e7fc3,_0x19a72c){const _0x50aefe=a112_0x54c6f9;if(!this[_0x50aefe(0x112)]||!this[_0x50aefe(0x110)])return;this[_0x50aefe(0x110)][_0x50aefe(0xf8)](_0x1e7fc3,{'command':_0x5324f9,'details':_0x19a72c});}async['logTask'](_0x304547,_0xb5830,_0x31f5c4){const _0x184998=a112_0x54c6f9,_0x390419=Date[_0x184998(0x10c)]();this[_0x184998(0xe7)](_0x304547,_0x184998(0xe8)+_0xb5830);try{const _0x2e5b19=await _0x31f5c4(),_0xf2b888=Date[_0x184998(0x10c)]()-_0x390419;return this[_0x184998(0xde)](_0x304547,_0x184998(0xe6)+_0xb5830,_0xf2b888),_0x2e5b19;}catch(_0x13d5ce){const _0x3ede08=Date[_0x184998(0x10c)]()-_0x390419;this[_0x184998(0x114)](_0x304547,_0x184998(0xdd)+_0xb5830,{'error':_0x13d5ce instanceof Error?_0x13d5ce['message']:String(_0x13d5ce),'duration':_0x3ede08});throw _0x13d5ce;}}['readLogs'](){const _0x5cc5ac=a112_0x54c6f9;try{if(!a112_0x1aa785[_0x5cc5ac(0x111)](this[_0x5cc5ac(0x112)]))return[];const _0x2853d9=a112_0x1aa785[_0x5cc5ac(0xf9)](this[_0x5cc5ac(0x112)],_0x5cc5ac(0xe2));return _0x2853d9[_0x5cc5ac(0xf3)](/\r?\n/)[_0x5cc5ac(0xfb)](_0x559f44=>_0x559f44[_0x5cc5ac(0x109)]())[_0x5cc5ac(0xdc)](_0x5bc376=>JSON['parse'](_0x5bc376));}catch(_0x2b3344){return console['warn'](_0x5cc5ac(0xf2),_0x2b3344),[];}}[a112_0x54c6f9(0xf6)](){const _0x1bf321=a112_0x54c6f9;try{a112_0x1aa785[_0x1bf321(0x111)](this[_0x1bf321(0x112)])&&a112_0x1aa785[_0x1bf321(0xe5)](this[_0x1bf321(0x112)],'',_0x1bf321(0xe2));}catch(_0x22313f){console[_0x1bf321(0xf8)](_0x1bf321(0x108),_0x22313f);}}['getWinstonInstance'](){const _0x495032=a112_0x54c6f9;return this[_0x495032(0x110)];}}function a112_0x3bc1(_0x5d111d,_0x2d8a94){_0x5d111d=_0x5d111d-0xdc;const _0x19fa23=a112_0x19fa();let _0x3bc14a=_0x19fa23[_0x5d111d];return _0x3bc14a;}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a113_0x4ea638=a113_0x211c;function a113_0x3baf(){const _0x2c748d=['json','405ljckSO','4386732kSMIQR','text','2626014jifvSq','exec','558588kDdTKR','16favMYc','undefined','447460JcTUXF','330130QfxiTL','11OlNEPt','8324UfnLAB','parse','MIN_SAFE_INTEGER','1OXTGQC','length','includes','slice','36221292lVVFgW','2965dkbdGd'];a113_0x3baf=function(){return _0x2c748d;};return a113_0x3baf();}(function(_0x34ed4c,_0x4accbd){const _0x522a7c=a113_0x211c,_0x52550b=_0x34ed4c();while(!![]){try{const _0x232aa7=parseInt(_0x522a7c(0x134))/0x1*(parseInt(_0x522a7c(0x143))/0x2)+-parseInt(_0x522a7c(0x13e))/0x3+parseInt(_0x522a7c(0x131))/0x4*(parseInt(_0x522a7c(0x139))/0x5)+-parseInt(_0x522a7c(0x140))/0x6+-parseInt(_0x522a7c(0x13c))/0x7*(parseInt(_0x522a7c(0x141))/0x8)+-parseInt(_0x522a7c(0x13b))/0x9*(parseInt(_0x522a7c(0x144))/0xa)+parseInt(_0x522a7c(0x130))/0xb*(parseInt(_0x522a7c(0x138))/0xc);if(_0x232aa7===_0x4accbd)break;else _0x52550b['push'](_0x52550b['shift']());}catch(_0x539eeb){_0x52550b['push'](_0x52550b['shift']());}}}(a113_0x3baf,0xbbb3f));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number[a113_0x4ea638(0x133)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x50c48f){const _0x3488f7=a113_0x4ea638;if(_0x50c48f['includes']('.')||_0x50c48f[_0x3488f7(0x136)]('e')||_0x50c48f[_0x3488f7(0x136)]('E'))return![];const _0x51fe31=BigInt(_0x50c48f);return _0x51fe31>MAX_SAFE_INTEGER||_0x51fe31<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x38160b){const _0x506b86=a113_0x4ea638;let _0x2c72a5='',_0x3d6be3=![],_0x503d4a=![];for(let _0x4726f8=0x0;_0x4726f8<_0x38160b['length'];){const _0x54dc40=_0x38160b[_0x4726f8];if(_0x3d6be3){_0x2c72a5+=_0x54dc40,_0x4726f8+=0x1;if(_0x503d4a)_0x503d4a=![];else{if(_0x54dc40==='\x5c')_0x503d4a=!![];else _0x54dc40==='\x22'&&(_0x3d6be3=![]);}continue;}if(_0x54dc40==='\x22'){_0x3d6be3=!![],_0x2c72a5+=_0x54dc40,_0x4726f8+=0x1;continue;}if(_0x54dc40==='-'||_0x54dc40>='0'&&_0x54dc40<='9'){const _0x128d0b=JSON_NUMBER_PATTERN[_0x506b86(0x13f)](_0x38160b[_0x506b86(0x137)](_0x4726f8))?.[0x0];if(_0x128d0b){_0x2c72a5+=isUnsafeIntegerLiteral(_0x128d0b)?'\x22'+_0x128d0b+'\x22':_0x128d0b,_0x4726f8+=_0x128d0b[_0x506b86(0x135)];continue;}}_0x2c72a5+=_0x54dc40,_0x4726f8+=0x1;}return _0x2c72a5;}export function parseLosslessJson(_0xa1b23c){const _0x56efa1=a113_0x4ea638;return JSON[_0x56efa1(0x132)](quoteUnsafeIntegerLiterals(_0xa1b23c));}export function installLosslessJsonResponseParser(){const _0x3e9208=a113_0x4ea638;if(typeof Response===_0x3e9208(0x142))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response['prototype'],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,_0x3e9208(0x13a)),Object['defineProperty'](responseJsonPrototype,_0x3e9208(0x13a),{'configurable':!![],'enumerable':![],'value':async function _0x1a2ed6(){const _0x3302ee=_0x3e9208;return parseLosslessJson(await this[_0x3302ee(0x13d)]());},'writable':!![]}),restoreResponseJsonParser=()=>{const _0x3c46e9=_0x3e9208;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x3c46e9(0x13a),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x3c46e9(0x13a)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}function a113_0x211c(_0x32990f,_0x18fddc){_0x32990f=_0x32990f-0x130;const _0x3baf02=a113_0x3baf();let _0x211c72=_0x3baf02[_0x32990f];return _0x211c72;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3f2422,_0x3906ec){const _0x1dd56d=a114_0x4c98,_0x34fc01=_0x3f2422();while(!![]){try{const _0x23fa06=-parseInt(_0x1dd56d(0x142))/0x1*(parseInt(_0x1dd56d(0x150))/0x2)+-parseInt(_0x1dd56d(0x143))/0x3*(parseInt(_0x1dd56d(0x14b))/0x4)+parseInt(_0x1dd56d(0x146))/0x5+parseInt(_0x1dd56d(0x151))/0x6+parseInt(_0x1dd56d(0x149))/0x7+-parseInt(_0x1dd56d(0x13c))/0x8*(-parseInt(_0x1dd56d(0x13e))/0x9)+-parseInt(_0x1dd56d(0x141))/0xa;if(_0x23fa06===_0x3906ec)break;else _0x34fc01['push'](_0x34fc01['shift']());}catch(_0x46f53c){_0x34fc01['push'](_0x34fc01['shift']());}}}(a114_0x572a,0xe775c));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';function a114_0x4c98(_0x4b6b08,_0x13801c){_0x4b6b08=_0x4b6b08-0x13a;const _0x572a1b=a114_0x572a();let _0x4c98d1=_0x572a1b[_0x4b6b08];return _0x4c98d1;}export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x493713){const _0x4022bd=a114_0x4c98;if(!_0x493713)return undefined;try{return parseLosslessJson(_0x493713);}catch{throw CliErrors['validation'](_0x4022bd(0x14f)+_0x493713);}}export function parseJsonParamsValue(_0x3efebd){const _0x357bc4=a114_0x4c98;if(!_0x3efebd)return undefined;try{return parseLosslessJson(_0x3efebd);}catch{throw CliErrors[_0x357bc4(0x155)](_0x357bc4(0x14f)+_0x3efebd);}}export function parseBatchCreateItemsFromParams(_0x45a37e){const _0x40ec80=a114_0x4c98;if(Array['isArray'](_0x45a37e))return _0x45a37e;if(_0x45a37e!==null&&_0x45a37e!==undefined&&typeof _0x45a37e===_0x40ec80(0x13b)&&Array[_0x40ec80(0x145)](_0x45a37e[_0x40ec80(0x14c)]))return _0x45a37e[_0x40ec80(0x14c)];throw CliErrors['validation']('batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}',_0x40ec80(0x14d));}function parseDataUpdateId(_0x22d8d7,_0x490ee4){const _0xfe37d6=a114_0x4c98;if(typeof _0x22d8d7===_0xfe37d6(0x13a)&&Number[_0xfe37d6(0x147)](_0x22d8d7)&&_0x22d8d7>0x0)return _0x22d8d7;if(typeof _0x22d8d7==='string'){if(/^[1-9]\d*$/[_0xfe37d6(0x140)](_0x22d8d7))return _0x22d8d7;}throw CliErrors['validation']('data\x20update\x20--params.'+_0x490ee4+_0xfe37d6(0x154));}export function parseUpdateIdsFromParams(_0x57781a){const _0x3eb497=a114_0x4c98;if(_0x57781a===null||_0x57781a===undefined||typeof _0x57781a!==_0x3eb497(0x13b)||Array[_0x3eb497(0x145)](_0x57781a))throw CliErrors[_0x3eb497(0x155)](_0x3eb497(0x14a),_0x3eb497(0x156));const _0x19ebbc=_0x57781a['id'];if(_0x19ebbc===undefined||_0x19ebbc===null)throw CliErrors['validation'](_0x3eb497(0x13d),_0x3eb497(0x156));const _0x674097=Array[_0x3eb497(0x145)](_0x19ebbc)?_0x19ebbc:[_0x19ebbc];if(_0x674097[_0x3eb497(0x13f)]===0x0)throw CliErrors[_0x3eb497(0x155)](_0x3eb497(0x14e));if(_0x674097[_0x3eb497(0x13f)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x3eb497(0x155)](_0x3eb497(0x144)+MAX_DATA_UPDATE_IDS+'\x20records\x20per\x20call;\x20received\x20'+_0x674097['length']+'.');return _0x674097[_0x3eb497(0x153)]((_0x31ac15,_0x36e4c3)=>parseDataUpdateId(_0x31ac15,Array['isArray'](_0x19ebbc)?_0x3eb497(0x148)+_0x36e4c3+']':'id'));}function a114_0x572a(){const _0x4f665f=['validation','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','number','object','40wPgQNH','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','2567259XVFDCN','length','test','30729790gAsHlG','272515TkKtqa','116988ZhVWPm','data\x20update\x20can\x20update\x20at\x20most\x20','isArray','7986265fcouna','isSafeInteger','id[','10347911bhjHdC','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','180ULRJcs','items','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','Invalid\x20JSON\x20for\x20--params:\x20','2ZKWQAE','9279558IKplfy','join','map','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.'];a114_0x572a=function(){return _0x4f665f;};return a114_0x572a();}export function normalizeUpdateParamsForRuntime(_0x5231cd,_0x24bbd5){const _0x137887=a114_0x4c98;if(Array['isArray'](_0x5231cd['id'])&&_0x24bbd5[_0x137887(0x13f)]>0x1)return{..._0x5231cd,'id':_0x24bbd5[_0x137887(0x152)](',')};return _0x5231cd;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a115_0x27bd(){const _0x5fc36b=['8ZqQQBA','3168260QxUARp','5221884VkUsXx','265832QgJwVZ','win32','.cmd','552198xQZKaD','1112930PWaCso','8892674UnNfMa','2093502qtmSiH'];a115_0x27bd=function(){return _0x5fc36b;};return a115_0x27bd();}const a115_0x14c590=a115_0x31be;(function(_0x79c0ba,_0xc90244){const _0x10374d=a115_0x31be,_0x42d12e=_0x79c0ba();while(!![]){try{const _0x511da6=-parseInt(_0x10374d(0xe4))/0x1+parseInt(_0x10374d(0xeb))/0x2+parseInt(_0x10374d(0xe7))/0x3+parseInt(_0x10374d(0xe9))/0x4+-parseInt(_0x10374d(0xe5))/0x5+parseInt(_0x10374d(0xea))/0x6+-parseInt(_0x10374d(0xe6))/0x7*(parseInt(_0x10374d(0xe8))/0x8);if(_0x511da6===_0xc90244)break;else _0x42d12e['push'](_0x42d12e['shift']());}catch(_0x37476f){_0x42d12e['push'](_0x42d12e['shift']());}}}(a115_0x27bd,0x6d5db));export const isWindows=process['platform']===a115_0x14c590(0xec);function a115_0x31be(_0x2f10ad,_0x13cc86){_0x2f10ad=_0x2f10ad-0xe3;const _0x27bd35=a115_0x27bd();let _0x31be4d=_0x27bd35[_0x2f10ad];return _0x31be4d;}export function resolveNpmBin(_0x2735c6){const _0x26058b=a115_0x14c590;return isWindows?_0x2735c6+_0x26058b(0xe3):_0x2735c6;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d557d,_0x4b4af4){const _0x34d220=a116_0x4375,_0x32049b=_0x3d557d();while(!![]){try{const _0x3e65f3=parseInt(_0x34d220(0xcb))/0x1+-parseInt(_0x34d220(0xc8))/0x2+parseInt(_0x34d220(0xb3))/0x3+-parseInt(_0x34d220(0xb9))/0x4*(parseInt(_0x34d220(0xcd))/0x5)+-parseInt(_0x34d220(0xcf))/0x6*(parseInt(_0x34d220(0xbe))/0x7)+-parseInt(_0x34d220(0xb4))/0x8*(parseInt(_0x34d220(0xc3))/0x9)+-parseInt(_0x34d220(0xc9))/0xa*(-parseInt(_0x34d220(0xcc))/0xb);if(_0x3e65f3===_0x4b4af4)break;else _0x32049b['push'](_0x32049b['shift']());}catch(_0x197849){_0x32049b['push'](_0x32049b['shift']());}}}(a116_0xdf15,0xcf088));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';function a116_0x4375(_0x1d5685,_0x3d76d9){_0x1d5685=_0x1d5685-0xae;const _0xdf156=a116_0xdf15();let _0x4375b7=_0xdf156[_0x1d5685];return _0x4375b7;}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(_0x46908a){const _0x4313f9=a116_0x4375,_0x503ecb=_0x46908a['trim']()[_0x4313f9(0xb8)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x503ecb)return null;return{'major':Number(_0x503ecb[0x1]),'minor':Number(_0x503ecb[0x2]),'patch':Number(_0x503ecb[0x3]),'prerelease':_0x503ecb[0x4]};}function compareSemver(_0x3dcffd,_0x46f65e){const _0x1d7a81=a116_0x4375,_0x40c5ec=parseSemver(_0x3dcffd),_0x2eaea7=parseSemver(_0x46f65e);if(!_0x40c5ec||!_0x2eaea7)throw new Error(_0x1d7a81(0xbf));for(const _0x170724 of[_0x1d7a81(0xbb),_0x1d7a81(0xd1),_0x1d7a81(0xbd)]){if(_0x40c5ec[_0x170724]<_0x2eaea7[_0x170724])return-0x1;if(_0x40c5ec[_0x170724]>_0x2eaea7[_0x170724])return 0x1;}if(!_0x40c5ec[_0x1d7a81(0xd2)]&&!_0x2eaea7[_0x1d7a81(0xd2)])return 0x0;if(!_0x40c5ec['prerelease'])return 0x1;if(!_0x2eaea7['prerelease'])return-0x1;if(_0x40c5ec[_0x1d7a81(0xd2)]===_0x2eaea7[_0x1d7a81(0xd2)])return 0x0;return _0x40c5ec[_0x1d7a81(0xd2)]<_0x2eaea7['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0xdfdff4=a116_0x4375,_0x2c1ced=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0xdfdff4(0xaf)]()[_0xdfdff4(0xca)]();return _0x2c1ced==='1'||_0x2c1ced==='true'||_0x2c1ced===_0xdfdff4(0xc1);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x460fdf=a116_0x4375;return join(cacheRoot(),'lovrabet-cli',_0x460fdf(0xc2));}async function readUpdateNoticeCache(){const _0x2f0918=a116_0x4375;try{const _0x3c981e=await readFile(getUpdateNoticeCachePath(),_0x2f0918(0xc6)),_0x5956c5=JSON['parse'](_0x3c981e);if(!_0x5956c5||typeof _0x5956c5!==_0x2f0918(0xbc))return{};return _0x5956c5;}catch{return{};}}async function writeUpdateNoticeCache(_0x1173a0){const _0x35c9c7=a116_0x4375;try{const _0x253bb8=getUpdateNoticeCachePath();await mkdir(dirname(_0x253bb8),{'recursive':!![]}),await writeFile(_0x253bb8,JSON['stringify'](_0x1173a0,null,0x2)+'\x0a',_0x35c9c7(0xc6));}catch{}}function isFreshCheck(_0x1b91e3,_0x35acbc){const _0x4142d9=a116_0x4375;return typeof _0x1b91e3[_0x4142d9(0xc0)]===_0x4142d9(0xae)&&_0x35acbc-_0x1b91e3[_0x4142d9(0xc0)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x1bcdf0,_0x327da0,_0x4bcad0){const _0xf10820=a116_0x4375;return _0x1bcdf0[_0xf10820(0xd3)]===_0x327da0&&typeof _0x1bcdf0[_0xf10820(0xc4)]===_0xf10820(0xae)&&_0x4bcad0-_0x1bcdf0['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}function a116_0xdf15(){const _0x2e828a=['77Rvadzw','Invalid\x20semver','checkedAt','yes','update-check.json','863658hQtcmH','lastNotifiedAt','/v/','utf8','map','314054EaqyFc','1186180lYfCfW','toLowerCase','1499666hNNWGK','44qyxezc','5jxcfLh','latest','433182gCFqSi','timeout','minor','prerelease','lastNotifiedVersion','number','trim','/-/package/','entries','fromEntries','2206413OeXUpa','48ChUsYG','json','\x20available,\x20current\x20','https://www.npmjs.com/package/','match','1338540kZFhLo','/dist-tags','major','object','patch'];a116_0xdf15=function(){return _0x2e828a;};return a116_0xdf15();}async function fetchNpmDistTags(_0x3d9c43=0x5dc){const _0x2dcb08=a116_0x4375;try{const _0x192f8c=NPM_REGISTRY_BASE_URL+_0x2dcb08(0xb0)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x2dcb08(0xba),_0x1560c6=await fetch(_0x192f8c,{'signal':AbortSignal[_0x2dcb08(0xd0)](_0x3d9c43)});if(!_0x1560c6['ok'])return null;const _0x3623ea=await _0x1560c6[_0x2dcb08(0xb5)]();if(!_0x3623ea||typeof _0x3623ea!==_0x2dcb08(0xbc))return null;return Object[_0x2dcb08(0xb2)](Object[_0x2dcb08(0xb1)](_0x3623ea)['filter'](([,_0x935c2b])=>typeof _0x935c2b==='string'&&_0x935c2b[_0x2dcb08(0xaf)]())[_0x2dcb08(0xc7)](([_0x13e6af,_0x45bf39])=>[_0x13e6af,String(_0x45bf39)[_0x2dcb08(0xaf)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x70134){const _0x3515e7=a116_0x4375;return _0x3515e7(0xb7)+LOVRABET_NPM_PACKAGE_NAME+_0x3515e7(0xc5)+_0x70134;}export async function resolveLatestUpdateNotice(){const _0x262353=a116_0x4375;if(isUpdateNoticeDisabled())return null;try{const _0x580183=Date['now'](),_0x2f12d3=getCliVersion(),_0x30e92f=await readUpdateNoticeCache();let _0x3a91d6=isFreshCheck(_0x30e92f,_0x580183)?_0x30e92f[_0x262353(0xce)]?.['trim']():undefined;if(!_0x3a91d6&&!isFreshCheck(_0x30e92f,_0x580183)){const _0xfcac99=await fetchNpmDistTags();_0x3a91d6=_0xfcac99?.[_0x262353(0xce)]?.[_0x262353(0xaf)](),await writeUpdateNoticeCache({..._0x30e92f,'checkedAt':_0x580183,'latest':_0x3a91d6,'failed':!_0x3a91d6});}if(!_0x3a91d6||compareSemver(_0x2f12d3,_0x3a91d6)>=0x0)return null;if(isRecentlyNotified(_0x30e92f,_0x3a91d6,_0x580183))return null;const _0x17c614=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x30e92f,'checkedAt':isFreshCheck(_0x30e92f,_0x580183)?_0x30e92f[_0x262353(0xc0)]:_0x580183,'latest':_0x3a91d6,'failed':![],'lastNotifiedVersion':_0x3a91d6,'lastNotifiedAt':_0x580183}),{'command':_0x17c614,'current':_0x2f12d3,'latest':_0x3a91d6,'url':buildNpmVersionUrl(_0x3a91d6),'message':CLI_BIN_NAME+'\x20'+_0x3a91d6+_0x262353(0xb6)+_0x2f12d3+',\x20run:\x20'+_0x17c614};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xbce80b,_0x53ba1b){const _0x1d9024=a117_0x3307,_0x1b08f1=_0xbce80b();while(!![]){try{const _0x4d9279=-parseInt(_0x1d9024(0x97))/0x1+-parseInt(_0x1d9024(0x99))/0x2*(parseInt(_0x1d9024(0x9a))/0x3)+parseInt(_0x1d9024(0x9e))/0x4*(-parseInt(_0x1d9024(0x98))/0x5)+-parseInt(_0x1d9024(0x9c))/0x6+parseInt(_0x1d9024(0x9d))/0x7*(parseInt(_0x1d9024(0x9b))/0x8)+-parseInt(_0x1d9024(0x95))/0x9+parseInt(_0x1d9024(0x96))/0xa;if(_0x4d9279===_0x53ba1b)break;else _0x1b08f1['push'](_0x1b08f1['shift']());}catch(_0x3a7a3){_0x1b08f1['push'](_0x1b08f1['shift']());}}}(a117_0x107d,0xf1391));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a117_0x3307(_0x5ec4d4,_0xafc90){_0x5ec4d4=_0x5ec4d4-0x93;const _0x107dad=a117_0x107d();let _0x3307d8=_0x107dad[_0x5ec4d4];return _0x3307d8;}export function getCliGitCommit(){const _0x28e0a3=a117_0x3307,_0x16e0e1=String(GIT_COMMIT);return _0x16e0e1&&_0x16e0e1!==_0x28e0a3(0x94)?_0x16e0e1:'';}function a117_0x107d(){const _0x1493eb=['21fqGjlf','1361944wCojcM','2548320orQkdB','35iPqnyS','1250336hJmrif','slice','unknown','10999476ZGsqrd','54201570nnRazP','1652822cwHOgM','5Qbftqg','477438eVTcPV'];a117_0x107d=function(){return _0x1493eb;};return a117_0x107d();}export function getCliVersionDisplay(){const _0x290e13=a117_0x3307,_0x3ed185=getCliGitCommit(),_0x5cf4ea=BUILD_TIME[_0x290e13(0x93)](0x0,0xa);if(!_0x3ed185||!_0x5cf4ea)return VERSION;return VERSION+'\x20('+_0x3ed185+',\x20'+_0x5cf4ea+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a118_0xe53e(){var _0x328ac2=['2962842mDnoxT','4193478UwhkWe','177640okTSlD','175ckzwAD','stderr','88uRFzwY','12GUGUlc','76215PjNQEm','1945755rhwqaj','67903KyqxtK','2690190DLmsMD','write'];a118_0xe53e=function(){return _0x328ac2;};return a118_0xe53e();}function a118_0x20a8(_0x44ca94,_0x4f93c3){_0x44ca94=_0x44ca94-0x7a;var _0xe53e7e=a118_0xe53e();var _0x20a8af=_0xe53e7e[_0x44ca94];return _0x20a8af;}(function(_0x2a8e26,_0x4f3274){var _0x278e68=a118_0x20a8,_0x526cf8=_0x2a8e26();while(!![]){try{var _0x457b85=-parseInt(_0x278e68(0x80))/0x1*(parseInt(_0x278e68(0x7d))/0x2)+-parseInt(_0x278e68(0x7e))/0x3*(-parseInt(_0x278e68(0x7c))/0x4)+parseInt(_0x278e68(0x7f))/0x5+parseInt(_0x278e68(0x83))/0x6+-parseInt(_0x278e68(0x7a))/0x7*(parseInt(_0x278e68(0x85))/0x8)+-parseInt(_0x278e68(0x84))/0x9+parseInt(_0x278e68(0x81))/0xa;if(_0x457b85===_0x4f3274)break;else _0x526cf8['push'](_0x526cf8['shift']());}catch(_0x2db62b){_0x526cf8['push'](_0x526cf8['shift']());}}}(a118_0xe53e,0x44f22));export function writeCliSideChannelLine(_0x53e84f){var _0x5ad7fd=a118_0x20a8;process[_0x5ad7fd(0x7b)][_0x5ad7fd(0x82)](_0x53e84f+'\x0a');}
|