@lovrabet/lovrabet-cli 2.1.22-beta.2 → 2.1.22-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/artifact/index.js +1 -1
- package/lib/commands/auth/device.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/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.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/diagram.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/diagram.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/raw-flags.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.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.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/install-target.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 a120_0x3f3a(_0x536260,_0x21054a){_0x536260=_0x536260-0x180;const _0x3d05c8=a120_0x3d05();let _0x3f3ae7=_0x3d05c8[_0x536260];return _0x3f3ae7;}(function(_0x5380ff,_0x24b68b){const _0x1944e4=a120_0x3f3a,_0x1ac5fb=_0x5380ff();while(!![]){try{const _0x420080=-parseInt(_0x1944e4(0x198))/0x1*(parseInt(_0x1944e4(0x1a7))/0x2)+parseInt(_0x1944e4(0x181))/0x3*(-parseInt(_0x1944e4(0x192))/0x4)+parseInt(_0x1944e4(0x1a0))/0x5+parseInt(_0x1944e4(0x1ac))/0x6*(-parseInt(_0x1944e4(0x19b))/0x7)+-parseInt(_0x1944e4(0x18f))/0x8*(-parseInt(_0x1944e4(0x19a))/0x9)+-parseInt(_0x1944e4(0x195))/0xa*(-parseInt(_0x1944e4(0x188))/0xb)+-parseInt(_0x1944e4(0x18a))/0xc;if(_0x420080===_0x24b68b)break;else _0x1ac5fb['push'](_0x1ac5fb['shift']());}catch(_0x3f3e99){_0x1ac5fb['push'](_0x1ac5fb['shift']());}}}(a120_0x3d05,0xf1638));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(_0x101bcf){const _0x38b146=a120_0x3f3a,_0x18a35f=normalizeLocalFiles(_0x101bcf);if(!_0x18a35f['some'](_0x313598=>_0x313598[_0x38b146(0x196)]===SKILL_FILE))throw CliErrors[_0x38b146(0x190)]('Missing\x20'+SKILL_FILE+_0x38b146(0x19c));const _0x3b63a0=localFilesToManifestFiles(_0x18a35f),_0x3f1950=createDeterministicZipPackage(_0x18a35f);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x3b63a0),'zipSha256':bufferSha256(_0x3f1950),'zipSize':_0x3f1950['length'],'files':_0x3b63a0},'packageBytes':_0x3f1950,'packageBase64':_0x3f1950[_0x38b146(0x194)]('base64')};}export function verifyRuntimeSkillPackage(_0x5dae41,_0xfc1eb1){const _0x2df16a=normalizePackageManifest(_0x5dae41,{'requireOssPath':![]});if(!_0x2df16a)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x2df16a,_0xfc1eb1);}function a120_0x3d05(){const _0x44223b=['20pmmmVV','path','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','2BFuywh','Runtime\x20Skill\x20package\x20is\x20missing\x20','2176407BJWoxB','98xftuBi','\x20in\x20Skill\x20file\x20package.','sha256','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','ossPath','4311300OSFcsQ','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','get','schemaVersion','set','isArray','size','956792NGXXzP','string','bytes','Runtime\x20Skill\x20package\x20size\x20mismatch.','map','148818KCaxEH','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','length','push','some','has','requireOssPath','2229807QgQGvk','toLowerCase','treeSha256','zipSize','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','isSafeInteger','object','4145251OQnznP','Duplicate\x20Skill\x20package\x20entry:\x20','3272064fMtJGL','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','zipSha256','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','56FogIdW','validation','files','4JoTPuc','trim','toString'];a120_0x3d05=function(){return _0x44223b;};return a120_0x3d05();}export function verifyRuntimeSkillBundle(_0x4b926b,_0x2cd1b7){const _0x215b28=a120_0x3f3a,_0x378ef7=normalizePackageManifest(_0x4b926b,{'requireOssPath':![]});if(!_0x378ef7)throw CliErrors[_0x215b28(0x190)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x378ef7,_0x2cd1b7);}export function tryNormalizePackageManifest(_0x12935b){return normalizePackageManifest(_0x12935b,{'requireOssPath':![]});}export function requirePackageBytes(_0x3ecbc2,_0x41ec5f){const _0x3f9636=a120_0x3f3a;if(!_0x41ec5f||_0x41ec5f[_0x3f9636(0x1ae)]===0x0)throw CliErrors['validation'](_0x3f9636(0x1ad)+_0x3ecbc2);return _0x41ec5f;}export function extractDownloadedPackage(_0x547ab5){const _0x232a30=a120_0x3f3a,_0x4caaf7=parseZipPackage(_0x547ab5)[_0x232a30(0x1ab)](_0xfcfa54=>({'path':_0xfcfa54['path'],'bytes':_0xfcfa54[_0x232a30(0x1a9)]}));if(!_0x4caaf7[_0x232a30(0x1b0)](_0x512cbe=>_0x512cbe[_0x232a30(0x196)]===SKILL_FILE))throw CliErrors[_0x232a30(0x190)](_0x232a30(0x199)+SKILL_FILE+'.');return normalizeLocalFiles(_0x4caaf7);}export function localFilesToManifestFiles(_0x267b23){const _0xf07bc4=a120_0x3f3a;return normalizeLocalFiles(_0x267b23)['map'](_0x368f3a=>({'path':_0x368f3a['path'],'sha256':fileHash(_0x368f3a),'size':fileContent(_0x368f3a)[_0xf07bc4(0x1ae)]}));}function normalizePackageManifest(_0x14f4d8,_0x261298){const _0x3cd3c3=a120_0x3f3a;if(!_0x14f4d8||typeof _0x14f4d8!==_0x3cd3c3(0x187)||Array[_0x3cd3c3(0x1a5)](_0x14f4d8))return undefined;const _0x37f1e4=_0x14f4d8,_0x4fa2a0=typeof _0x37f1e4[_0x3cd3c3(0x19f)]===_0x3cd3c3(0x1a8)?_0x37f1e4['ossPath'][_0x3cd3c3(0x193)]():undefined;if(_0x261298[_0x3cd3c3(0x180)]&&!_0x4fa2a0)return undefined;if(!Array[_0x3cd3c3(0x1a5)](_0x37f1e4[_0x3cd3c3(0x191)])||_0x37f1e4[_0x3cd3c3(0x191)][_0x3cd3c3(0x1ae)]===0x0)return undefined;if(!isSha256Hex(_0x37f1e4[_0x3cd3c3(0x183)]))throw CliErrors[_0x3cd3c3(0x190)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.');if(!isSha256Hex(_0x37f1e4['zipSha256']))throw CliErrors[_0x3cd3c3(0x190)](_0x3cd3c3(0x18b));if(!Number['isSafeInteger'](_0x37f1e4['zipSize'])||_0x37f1e4['zipSize']<0x0)throw CliErrors[_0x3cd3c3(0x190)](_0x3cd3c3(0x197));const _0xce5b09=normalizeManifestFiles(_0x37f1e4[_0x3cd3c3(0x191)]);if(!_0xce5b09['some'](_0x376c62=>_0x376c62[_0x3cd3c3(0x196)]===SKILL_FILE))throw CliErrors[_0x3cd3c3(0x190)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x2af63a=fileTreeHash(_0xce5b09);if(_0x2af63a!==_0x37f1e4[_0x3cd3c3(0x183)]['toLowerCase']())throw CliErrors[_0x3cd3c3(0x190)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x3cd3c3(0x186)](_0x37f1e4[_0x3cd3c3(0x1a3)])?_0x37f1e4[_0x3cd3c3(0x1a3)]:0x2,'ossPath':_0x4fa2a0,'treeSha256':_0x2af63a,'zipSha256':_0x37f1e4[_0x3cd3c3(0x18c)][_0x3cd3c3(0x182)](),'zipSize':_0x37f1e4[_0x3cd3c3(0x184)],'files':_0xce5b09};}function extractAndVerifyPackage(_0x5daeaf,_0x467727){const _0x40a759=a120_0x3f3a,_0x564a8c=normalizePackageManifest(_0x5daeaf,{'requireOssPath':![]});if(!_0x564a8c)throw CliErrors['validation'](_0x40a759(0x19e));if(_0x467727[_0x40a759(0x1ae)]!==_0x564a8c[_0x40a759(0x184)])throw CliErrors[_0x40a759(0x190)](_0x40a759(0x1aa));const _0x376581=bufferSha256(_0x467727);if(_0x376581!==_0x564a8c[_0x40a759(0x18c)])throw CliErrors[_0x40a759(0x190)](_0x40a759(0x185));return extractAndVerifyPackageFiles(_0x564a8c,_0x467727);}function extractAndVerifyPackageFiles(_0x206bb3,_0x199a2b){const _0x1a13d7=a120_0x3f3a,_0x42b7ea=parseZipPackage(_0x199a2b);if(_0x42b7ea[_0x1a13d7(0x1ae)]!==_0x206bb3['files']['length'])throw CliErrors[_0x1a13d7(0x190)](_0x1a13d7(0x1a1));const _0x538c52=new Map();for(const _0xfb77f of _0x42b7ea){if(_0x538c52[_0x1a13d7(0x1b1)](_0xfb77f['path']))throw CliErrors[_0x1a13d7(0x190)](_0x1a13d7(0x189)+_0xfb77f[_0x1a13d7(0x196)]);_0x538c52[_0x1a13d7(0x1a4)](_0xfb77f[_0x1a13d7(0x196)],_0xfb77f);}const _0xade5a6=[];for(const _0x1c1924 of _0x206bb3['files']){const _0x3fd71d=_0x538c52[_0x1a13d7(0x1a2)](_0x1c1924[_0x1a13d7(0x196)]);if(!_0x3fd71d)throw CliErrors[_0x1a13d7(0x190)](_0x1a13d7(0x18e)+_0x1c1924[_0x1a13d7(0x196)]);if(_0x3fd71d[_0x1a13d7(0x1a9)][_0x1a13d7(0x1ae)]!==_0x1c1924[_0x1a13d7(0x1a6)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x1c1924['path']);const _0x1d14f2=bufferSha256(_0x3fd71d[_0x1a13d7(0x1a9)]);if(_0x1d14f2!==_0x1c1924[_0x1a13d7(0x19d)])throw CliErrors[_0x1a13d7(0x190)](_0x1a13d7(0x18d)+_0x1c1924['path']);_0xade5a6[_0x1a13d7(0x1af)]({'path':_0x1c1924[_0x1a13d7(0x196)],'bytes':_0x3fd71d['bytes']});}return normalizeLocalFiles(_0xade5a6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a121_0x4a59(){var _0x132b14=['18GPrcof','770580JZZOBr','1809118eVoneI','108UkqlQD','6143333LbsAkb','12GhHYSA','351361LLiVHD','126892QlCVvS','18321560KzDcEm','7848568IURdtH'];a121_0x4a59=function(){return _0x132b14;};return a121_0x4a59();}(function(_0x438a37,_0x1c1b74){var _0x204cb1=a121_0x44df,_0x120196=_0x438a37();while(!![]){try{var _0x5b76ba=-parseInt(_0x204cb1(0x183))/0x1+parseInt(_0x204cb1(0x17f))/0x2+-parseInt(_0x204cb1(0x180))/0x3*(-parseInt(_0x204cb1(0x184))/0x4)+parseInt(_0x204cb1(0x188))/0x5+-parseInt(_0x204cb1(0x182))/0x6*(-parseInt(_0x204cb1(0x181))/0x7)+parseInt(_0x204cb1(0x186))/0x8+parseInt(_0x204cb1(0x187))/0x9*(-parseInt(_0x204cb1(0x185))/0xa);if(_0x5b76ba===_0x1c1b74)break;else _0x120196['push'](_0x120196['shift']());}catch(_0x1c05cf){_0x120196['push'](_0x120196['shift']());}}}(a121_0x4a59,0xe0efb));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a121_0x44df(_0x4c0381,_0x3f5ae0){_0x4c0381=_0x4c0381-0x17f;var _0x4a5976=a121_0x4a59();var _0x44dfd7=_0x4a5976[_0x4c0381];return _0x44dfd7;}export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.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';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
|
-
(function(
|
|
1
|
+
function a122_0x4998(_0x52e3ed,_0x250af2){_0x52e3ed=_0x52e3ed-0x1cd;const _0x1e56fd=a122_0x1e56();let _0x49984b=_0x1e56fd[_0x52e3ed];return _0x49984b;}(function(_0x23bc9b,_0x4819cf){const _0x53815c=a122_0x4998,_0x4b7e25=_0x23bc9b();while(!![]){try{const _0x151476=parseInt(_0x53815c(0x1d4))/0x1+parseInt(_0x53815c(0x1ce))/0x2*(parseInt(_0x53815c(0x1d6))/0x3)+-parseInt(_0x53815c(0x1d1))/0x4+parseInt(_0x53815c(0x1cf))/0x5+parseInt(_0x53815c(0x1d0))/0x6*(parseInt(_0x53815c(0x1d3))/0x7)+-parseInt(_0x53815c(0x1cd))/0x8*(parseInt(_0x53815c(0x1d5))/0x9)+-parseInt(_0x53815c(0x1d2))/0xa;if(_0x151476===_0x4819cf)break;else _0x4b7e25['push'](_0x4b7e25['shift']());}catch(_0x8007db){_0x4b7e25['push'](_0x4b7e25['shift']());}}}(a122_0x1e56,0xa8092));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a122_0x1e56(){const _0x585854=['570448lZtqqX','22381190HxfkAQ','9478xKYiXj','762533XpXZVg','1212606mLNLnh','2655957ODNwyl','56PIbfQI','2NSIxwD','5173315hxVzWP','5892FStfJc'];a122_0x1e56=function(){return _0x585854;};return a122_0x1e56();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a123_0x23e93c=a123_0x2a91;function a123_0x1f0e(){const _0x274b87=['combine','initWinstonLogger','red','clear','Failed\x20to\x20clear\x20logs:','stringify','getWinstonInstance','winstonLogger','2TdsusM','Failed:\x20','duration','existsSync','warn','5318748IiPSGV','logFilePath','utf8','Starting:\x20','log','32690ndUbTn','6919ZkpazV','921365BWWkJC','createLogger','unknown','Completed:\x20','format','4dlIvsi','logTask','blue','toISOString','addColors','trim','timestamp','readLogs','info','errors','parse','now','currentRawCommand','Failed\x20to\x20read\x20logs:','error','mkdirSync','message','success','logFileName','details','1835412MzcazO','readFileSync','1878280cakDEb','filter','rawCommand','14119BHZijo','7986519tSvgVB','setRawCommand','808dDRCmc'];a123_0x1f0e=function(){return _0x274b87;};return a123_0x1f0e();}(function(_0x1d6371,_0x40c7db){const _0x2329d0=a123_0x2a91,_0xb19ef8=_0x1d6371();while(!![]){try{const _0x29197a=-parseInt(_0x2329d0(0xbe))/0x1*(-parseInt(_0x2329d0(0xb2))/0x2)+-parseInt(_0x2329d0(0xa1))/0x3*(parseInt(_0x2329d0(0xc3))/0x4)+parseInt(_0x2329d0(0xa3))/0x5+-parseInt(_0x2329d0(0xb7))/0x6+-parseInt(_0x2329d0(0xa6))/0x7*(parseInt(_0x2329d0(0xa9))/0x8)+-parseInt(_0x2329d0(0xa7))/0x9+parseInt(_0x2329d0(0xbc))/0xa*(parseInt(_0x2329d0(0xbd))/0xb);if(_0x29197a===_0x40c7db)break;else _0xb19ef8['push'](_0xb19ef8['shift']());}catch(_0x27abc5){_0xb19ef8['push'](_0xb19ef8['shift']());}}}(a123_0x1f0e,0xba7cc));import a123_0x5e5b64 from'winston';import a123_0xb34270 from'node:fs';function a123_0x2a91(_0x3ef6f7,_0x2ae819){_0x3ef6f7=_0x3ef6f7-0xa0;const _0x1f0ee2=a123_0x1f0e();let _0x2a9195=_0x1f0ee2[_0x3ef6f7];return _0x2a9195;}import a123_0x5131df from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a123_0x23e93c(0xb1)];['logFilePath']='';[a123_0x23e93c(0xcf)]='';constructor(){}[a123_0x23e93c(0xa8)](_0x2b5222){const _0x4e72dc=a123_0x23e93c;this[_0x4e72dc(0xcf)]=_0x2b5222;}['setLogPath'](_0x3c99f5){const _0x382b8c=a123_0x23e93c;this['logFilePath']=a123_0x5131df['join'](_0x3c99f5,PRODUCT_CONFIG[_0x382b8c(0xd5)]),this[_0x382b8c(0xb1)]&&this[_0x382b8c(0xb1)][_0x382b8c(0xad)](),this['initWinstonLogger']();}[a123_0x23e93c(0xab)](){const _0x43528c=a123_0x23e93c,_0x50ad45=a123_0x5131df['dirname'](this['logFilePath']);!a123_0xb34270[_0x43528c(0xb5)](_0x50ad45)&&a123_0xb34270[_0x43528c(0xd2)](_0x50ad45,{'recursive':!![]});const _0x58e7fa=a123_0x5e5b64[_0x43528c(0xc2)][_0x43528c(0xaa)](a123_0x5e5b64[_0x43528c(0xc2)][_0x43528c(0xc9)](),a123_0x5e5b64[_0x43528c(0xc2)][_0x43528c(0xcc)]({'stack':!![]}),a123_0x5e5b64[_0x43528c(0xc2)]['printf'](_0x3b36f0=>{const _0x32aaa9=_0x43528c,_0x368d18={'timestamp':_0x3b36f0[_0x32aaa9(0xc9)]||new Date()[_0x32aaa9(0xc6)](),'level':_0x3b36f0['level']||_0x32aaa9(0xcb),'command':_0x3b36f0['command']||_0x32aaa9(0xc0),'rawCommand':_0x3b36f0[_0x32aaa9(0xa5)]||this['currentRawCommand']||undefined,'message':_0x3b36f0[_0x32aaa9(0xd3)]||'','duration':_0x3b36f0[_0x32aaa9(0xb4)]||undefined,'details':_0x3b36f0[_0x32aaa9(0xa0)]||undefined};return JSON[_0x32aaa9(0xaf)](_0x368d18);}));this[_0x43528c(0xb1)]=a123_0x5e5b64[_0x43528c(0xbf)]({'level':'info','format':_0x58e7fa,'transports':[new a123_0x5e5b64['transports']['File']({'filename':this[_0x43528c(0xb8)],'level':_0x43528c(0xcb)})],'silent':![]}),a123_0x5e5b64[_0x43528c(0xc7)]({'success':'green','error':_0x43528c(0xac),'warn':'yellow','info':_0x43528c(0xc5)});}[a123_0x23e93c(0xcb)](_0x559764,_0x519e96,_0xae5ca8){const _0x4648d2=a123_0x23e93c;if(!this[_0x4648d2(0xb8)]||!this[_0x4648d2(0xb1)])return;this[_0x4648d2(0xb1)][_0x4648d2(0xcb)](_0x519e96,{'command':_0x559764,'details':_0xae5ca8});}['success'](_0x361a47,_0x23e9ae,_0x4501e6,_0x26f873){const _0x556922=a123_0x23e93c;if(!this[_0x556922(0xb8)]||!this[_0x556922(0xb1)])return;this[_0x556922(0xb1)][_0x556922(0xbb)](_0x556922(0xcb),_0x23e9ae,{'level':_0x556922(0xd4),'command':_0x361a47,'duration':_0x4501e6,'details':_0x26f873});}[a123_0x23e93c(0xd1)](_0x28a746,_0x5ee28d,_0x588356){const _0x5314dc=a123_0x23e93c;if(!this[_0x5314dc(0xb8)]||!this[_0x5314dc(0xb1)])return;this[_0x5314dc(0xb1)]['error'](_0x5ee28d,{'command':_0x28a746,'details':_0x588356});}['warn'](_0x532e0c,_0x5dc5e0,_0x383198){const _0x93d47a=a123_0x23e93c;if(!this[_0x93d47a(0xb8)]||!this[_0x93d47a(0xb1)])return;this[_0x93d47a(0xb1)][_0x93d47a(0xb6)](_0x5dc5e0,{'command':_0x532e0c,'details':_0x383198});}async[a123_0x23e93c(0xc4)](_0x13b1a6,_0x17bfa8,_0x213c1e){const _0x44eda9=a123_0x23e93c,_0x3abc14=Date['now']();this[_0x44eda9(0xcb)](_0x13b1a6,_0x44eda9(0xba)+_0x17bfa8);try{const _0x461ba9=await _0x213c1e(),_0x267da7=Date[_0x44eda9(0xce)]()-_0x3abc14;return this[_0x44eda9(0xd4)](_0x13b1a6,_0x44eda9(0xc1)+_0x17bfa8,_0x267da7),_0x461ba9;}catch(_0x4b668a){const _0x497d46=Date[_0x44eda9(0xce)]()-_0x3abc14;this[_0x44eda9(0xd1)](_0x13b1a6,_0x44eda9(0xb3)+_0x17bfa8,{'error':_0x4b668a instanceof Error?_0x4b668a[_0x44eda9(0xd3)]:String(_0x4b668a),'duration':_0x497d46});throw _0x4b668a;}}[a123_0x23e93c(0xca)](){const _0x2d07b2=a123_0x23e93c;try{if(!a123_0xb34270[_0x2d07b2(0xb5)](this[_0x2d07b2(0xb8)]))return[];const _0x27dabc=a123_0xb34270[_0x2d07b2(0xa2)](this[_0x2d07b2(0xb8)],_0x2d07b2(0xb9));return _0x27dabc['split'](/\r?\n/)[_0x2d07b2(0xa4)](_0x3cd575=>_0x3cd575[_0x2d07b2(0xc8)]())['map'](_0x3574a0=>JSON[_0x2d07b2(0xcd)](_0x3574a0));}catch(_0x30bb5d){return console[_0x2d07b2(0xb6)](_0x2d07b2(0xd0),_0x30bb5d),[];}}['clearLogs'](){const _0x5da660=a123_0x23e93c;try{a123_0xb34270[_0x5da660(0xb5)](this[_0x5da660(0xb8)])&&a123_0xb34270['writeFileSync'](this[_0x5da660(0xb8)],'',_0x5da660(0xb9));}catch(_0x4f7422){console[_0x5da660(0xb6)](_0x5da660(0xae),_0x4f7422);}}[a123_0x23e93c(0xb0)](){const _0x3734fd=a123_0x23e93c;return this[_0x3734fd(0xb1)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a124_0x189695=a124_0x53b0;function a124_0x53b0(_0x31e504,_0x33361a){_0x31e504=_0x31e504-0xdf;const _0x37af9b=a124_0x37af();let _0x53b069=_0x37af9b[_0x31e504];return _0x53b069;}(function(_0x5f0934,_0x195fa3){const _0x567f4d=a124_0x53b0,_0x3deb65=_0x5f0934();while(!![]){try{const _0x2bcaf5=-parseInt(_0x567f4d(0xf4))/0x1+-parseInt(_0x567f4d(0xeb))/0x2*(-parseInt(_0x567f4d(0xe7))/0x3)+-parseInt(_0x567f4d(0xe3))/0x4+-parseInt(_0x567f4d(0xe2))/0x5*(-parseInt(_0x567f4d(0xe9))/0x6)+-parseInt(_0x567f4d(0xdf))/0x7+-parseInt(_0x567f4d(0xf1))/0x8+parseInt(_0x567f4d(0xf3))/0x9*(parseInt(_0x567f4d(0xed))/0xa);if(_0x2bcaf5===_0x195fa3)break;else _0x3deb65['push'](_0x3deb65['shift']());}catch(_0x146555){_0x3deb65['push'](_0x3deb65['shift']());}}}(a124_0x37af,0x42813));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a124_0x189695(0xee)]),MIN_SAFE_INTEGER=BigInt(Number[a124_0x189695(0xe8)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x1af5d9){const _0x2b04a4=a124_0x189695;if(_0x1af5d9[_0x2b04a4(0xf2)]('.')||_0x1af5d9[_0x2b04a4(0xf2)]('e')||_0x1af5d9[_0x2b04a4(0xf2)]('E'))return![];const _0x27d45e=BigInt(_0x1af5d9);return _0x27d45e>MAX_SAFE_INTEGER||_0x27d45e<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x26eed4){const _0x4f64a0=a124_0x189695;let _0x2fce9b='',_0x4c015c=![],_0x33f9ba=![];for(let _0x455951=0x0;_0x455951<_0x26eed4[_0x4f64a0(0xef)];){const _0x105f36=_0x26eed4[_0x455951];if(_0x4c015c){_0x2fce9b+=_0x105f36,_0x455951+=0x1;if(_0x33f9ba)_0x33f9ba=![];else{if(_0x105f36==='\x5c')_0x33f9ba=!![];else _0x105f36==='\x22'&&(_0x4c015c=![]);}continue;}if(_0x105f36==='\x22'){_0x4c015c=!![],_0x2fce9b+=_0x105f36,_0x455951+=0x1;continue;}if(_0x105f36==='-'||_0x105f36>='0'&&_0x105f36<='9'){const _0x2f04b5=JSON_NUMBER_PATTERN['exec'](_0x26eed4[_0x4f64a0(0xec)](_0x455951))?.[0x0];if(_0x2f04b5){_0x2fce9b+=isUnsafeIntegerLiteral(_0x2f04b5)?'\x22'+_0x2f04b5+'\x22':_0x2f04b5,_0x455951+=_0x2f04b5[_0x4f64a0(0xef)];continue;}}_0x2fce9b+=_0x105f36,_0x455951+=0x1;}return _0x2fce9b;}function a124_0x37af(){const _0xf9cb36=['217420DvXakB','undefined','getOwnPropertyDescriptor','70sTPscm','112964HuIMYs','text','defineProperty','parse','3sFjOLH','MIN_SAFE_INTEGER','95592pHvZhT','json','549908cyyfzX','slice','900mTdOqF','MAX_SAFE_INTEGER','length','prototype','3517072UVudTa','includes','60687esMTxZ','333534CqSkLS'];a124_0x37af=function(){return _0xf9cb36;};return a124_0x37af();}export function parseLosslessJson(_0x3b91af){const _0x58c8b1=a124_0x189695;return JSON[_0x58c8b1(0xe6)](quoteUnsafeIntegerLiterals(_0x3b91af));}export function installLosslessJsonResponseParser(){const _0x1ea619=a124_0x189695;if(typeof Response===_0x1ea619(0xe0))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x1ea619(0xf0)],originalResponseJsonDescriptor=Object[_0x1ea619(0xe1)](responseJsonPrototype,_0x1ea619(0xea)),Object[_0x1ea619(0xe5)](responseJsonPrototype,_0x1ea619(0xea),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x2830aa(){const _0x46388e=_0x1ea619;return parseLosslessJson(await this[_0x46388e(0xe4)]());}}),restoreResponseJsonParser=()=>{const _0x5b232e=_0x1ea619;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,'json',originalResponseJsonDescriptor):delete responseJsonPrototype[_0x5b232e(0xea)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ccc3c,_0x7d511b){const _0x4c241a=a125_0x5029,_0x39816c=_0x5ccc3c();while(!![]){try{const _0x3c1061=parseInt(_0x4c241a(0x186))/0x1*(-parseInt(_0x4c241a(0x16e))/0x2)+parseInt(_0x4c241a(0x187))/0x3+-parseInt(_0x4c241a(0x175))/0x4+parseInt(_0x4c241a(0x173))/0x5*(-parseInt(_0x4c241a(0x17e))/0x6)+parseInt(_0x4c241a(0x183))/0x7+-parseInt(_0x4c241a(0x182))/0x8*(-parseInt(_0x4c241a(0x185))/0x9)+-parseInt(_0x4c241a(0x171))/0xa;if(_0x3c1061===_0x7d511b)break;else _0x39816c['push'](_0x39816c['shift']());}catch(_0x2e0ed4){_0x39816c['push'](_0x39816c['shift']());}}}(a125_0xa59d,0xc5862));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x49c148){const _0x2bfa5e=a125_0x5029;if(!_0x49c148)return undefined;try{return parseLosslessJson(_0x49c148);}catch{throw CliErrors[_0x2bfa5e(0x180)](_0x2bfa5e(0x17d)+_0x49c148);}}function a125_0x5029(_0x59b1ad,_0x16dd0b){_0x59b1ad=_0x59b1ad-0x16e;const _0xa59d8a=a125_0xa59d();let _0x502982=_0xa59d8a[_0x59b1ad];return _0x502982;}export function parseJsonParamsValue(_0x321f10){const _0x42ad93=a125_0x5029;if(!_0x321f10)return undefined;try{return parseLosslessJson(_0x321f10);}catch{throw CliErrors[_0x42ad93(0x180)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x321f10);}}export function parseBatchCreateItemsFromParams(_0x46846f){const _0x734885=a125_0x5029;if(Array[_0x734885(0x17a)](_0x46846f))return _0x46846f;if(_0x46846f!==null&&_0x46846f!==undefined&&typeof _0x46846f==='object'&&Array[_0x734885(0x17a)](_0x46846f[_0x734885(0x181)]))return _0x46846f['items'];throw CliErrors[_0x734885(0x180)](_0x734885(0x179),'Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27');}function a125_0xa59d(){const _0x15fd3a=['map','number','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','isArray','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','Invalid\x20JSON\x20for\x20--params:\x20','1860UVLmEi','length','validation','items','328KBIuBU','2030217UaQXyB','test','210555lumlUw','373077CLrSzO','3047931sOOlIO','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','\x20records\x20per\x20call;\x20received\x20','2VSYeEM','string','object','1970640uiWJvD','join','3320ZjJfqY','data\x20update\x20--params.','2720656leVybF'];a125_0xa59d=function(){return _0x15fd3a;};return a125_0xa59d();}function parseDataUpdateId(_0x509651,_0x5a620b){const _0x4f8a2f=a125_0x5029;if(typeof _0x509651===_0x4f8a2f(0x177)&&Number['isSafeInteger'](_0x509651)&&_0x509651>0x0)return _0x509651;if(typeof _0x509651===_0x4f8a2f(0x16f)){if(/^[1-9]\d*$/[_0x4f8a2f(0x184)](_0x509651))return _0x509651;}throw CliErrors[_0x4f8a2f(0x180)](_0x4f8a2f(0x174)+_0x5a620b+_0x4f8a2f(0x17b));}export function parseUpdateIdsFromParams(_0x8e6e47){const _0x327203=a125_0x5029;if(_0x8e6e47===null||_0x8e6e47===undefined||typeof _0x8e6e47!==_0x327203(0x170)||Array[_0x327203(0x17a)](_0x8e6e47))throw CliErrors['validation'](_0x327203(0x17c),_0x327203(0x178));const _0x5ac28c=_0x8e6e47['id'];if(_0x5ac28c===undefined||_0x5ac28c===null)throw CliErrors[_0x327203(0x180)](_0x327203(0x188),_0x327203(0x178));const _0x396e79=Array[_0x327203(0x17a)](_0x5ac28c)?_0x5ac28c:[_0x5ac28c];if(_0x396e79[_0x327203(0x17f)]===0x0)throw CliErrors[_0x327203(0x180)]('data\x20update\x20id\x20array\x20cannot\x20be\x20empty.');if(_0x396e79[_0x327203(0x17f)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x327203(0x180)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+_0x327203(0x189)+_0x396e79[_0x327203(0x17f)]+'.');return _0x396e79[_0x327203(0x176)]((_0x20a314,_0x2c77db)=>parseDataUpdateId(_0x20a314,Array[_0x327203(0x17a)](_0x5ac28c)?'id['+_0x2c77db+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x47ff65,_0x2cf4ea){const _0x154d19=a125_0x5029;if(Array[_0x154d19(0x17a)](_0x47ff65['id'])&&_0x2cf4ea['length']>0x1)return{..._0x47ff65,'id':_0x2cf4ea[_0x154d19(0x172)](',')};return _0x47ff65;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a126_0x7e99(){const _0x3bca30=['6DPnXDX','platform','970656TyhpCd','679230lQWTAh','8882235qLYYfO','11370590GDVVxG','win32','30XClGHo','8tsMJnm','50919220oFmHKx','2774072rHPffV','516174ckbwPV'];a126_0x7e99=function(){return _0x3bca30;};return a126_0x7e99();}const a126_0x5f4162=a126_0x390c;(function(_0x11ecf4,_0x56f621){const _0x226b28=a126_0x390c,_0x36a09e=_0x11ecf4();while(!![]){try{const _0x65a3d4=parseInt(_0x226b28(0x12f))/0x1+parseInt(_0x226b28(0x12c))/0x2*(-parseInt(_0x226b28(0x12e))/0x3)+-parseInt(_0x226b28(0x12a))/0x4+parseInt(_0x226b28(0x133))/0x5*(-parseInt(_0x226b28(0x12b))/0x6)+-parseInt(_0x226b28(0x131))/0x7+parseInt(_0x226b28(0x134))/0x8*(-parseInt(_0x226b28(0x130))/0x9)+parseInt(_0x226b28(0x129))/0xa;if(_0x65a3d4===_0x56f621)break;else _0x36a09e['push'](_0x36a09e['shift']());}catch(_0xe724ce){_0x36a09e['push'](_0x36a09e['shift']());}}}(a126_0x7e99,0xef23f));function a126_0x390c(_0x2c702b,_0x3c4797){_0x2c702b=_0x2c702b-0x129;const _0x7e99a0=a126_0x7e99();let _0x390c88=_0x7e99a0[_0x2c702b];return _0x390c88;}export const isWindows=process[a126_0x5f4162(0x12d)]===a126_0x5f4162(0x132);export function resolveNpmBin(_0x41a8ff){return isWindows?_0x41a8ff+'.cmd':_0x41a8ff;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b2dd8,_0x4fc00b){const _0x1ec0e9=a127_0x4645,_0x25cafb=_0x5b2dd8();while(!![]){try{const _0x3c4f8d=parseInt(_0x1ec0e9(0x1e7))/0x1*(parseInt(_0x1ec0e9(0x1f0))/0x2)+parseInt(_0x1ec0e9(0x1ea))/0x3*(-parseInt(_0x1ec0e9(0x1f8))/0x4)+parseInt(_0x1ec0e9(0x1ee))/0x5+-parseInt(_0x1ec0e9(0x203))/0x6+parseInt(_0x1ec0e9(0x1f4))/0x7*(parseInt(_0x1ec0e9(0x1fc))/0x8)+parseInt(_0x1ec0e9(0x1f3))/0x9+-parseInt(_0x1ec0e9(0x1ff))/0xa*(parseInt(_0x1ec0e9(0x1e0))/0xb);if(_0x3c4f8d===_0x4fc00b)break;else _0x25cafb['push'](_0x25cafb['shift']());}catch(_0x11dd38){_0x25cafb['push'](_0x25cafb['shift']());}}}(a127_0x53e7,0x63eae));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';function a127_0x53e7(){const _0x321910=['timeout','major','toLowerCase','54974SSJmds','latest','trim','7569IINddQ','/v/','https://www.npmjs.com/package/','yes','3750220DdOyFP','/dist-tags','26ZUdfcM',',\x20run:\x20','utf8','6297534PYOPFu','2152409BSKyzl','lastNotifiedAt','stringify','object','1172YlLcvW','prerelease','now','match','8KmJRjn','number','patch','30110LjQHNa','json','lastNotifiedVersion','map','479250upaZuz','parse','string','4543HaqfRX','entries','checkedAt','minor'];a127_0x53e7=function(){return _0x321910;};return a127_0x53e7();}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(_0x2b49c3){const _0x4b9413=a127_0x4645,_0x29bd94=_0x2b49c3[_0x4b9413(0x1e9)]()[_0x4b9413(0x1fb)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x29bd94)return null;return{'major':Number(_0x29bd94[0x1]),'minor':Number(_0x29bd94[0x2]),'patch':Number(_0x29bd94[0x3]),'prerelease':_0x29bd94[0x4]};}function compareSemver(_0x54e8ea,_0x2bf097){const _0x1d4daa=a127_0x4645,_0x4690b4=parseSemver(_0x54e8ea),_0x28829c=parseSemver(_0x2bf097);if(!_0x4690b4||!_0x28829c)throw new Error('Invalid\x20semver');for(const _0x3a5e14 of[_0x1d4daa(0x1e5),_0x1d4daa(0x1e3),_0x1d4daa(0x1fe)]){if(_0x4690b4[_0x3a5e14]<_0x28829c[_0x3a5e14])return-0x1;if(_0x4690b4[_0x3a5e14]>_0x28829c[_0x3a5e14])return 0x1;}if(!_0x4690b4[_0x1d4daa(0x1f9)]&&!_0x28829c[_0x1d4daa(0x1f9)])return 0x0;if(!_0x4690b4[_0x1d4daa(0x1f9)])return 0x1;if(!_0x28829c[_0x1d4daa(0x1f9)])return-0x1;if(_0x4690b4[_0x1d4daa(0x1f9)]===_0x28829c[_0x1d4daa(0x1f9)])return 0x0;return _0x4690b4[_0x1d4daa(0x1f9)]<_0x28829c['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x4aea38=a127_0x4645,_0x2f9fe4=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x4aea38(0x1e9)]()[_0x4aea38(0x1e6)]();return _0x2f9fe4==='1'||_0x2f9fe4==='true'||_0x2f9fe4===_0x4aea38(0x1ed);}function a127_0x4645(_0x4cb9fd,_0x10fce7){_0x4cb9fd=_0x4cb9fd-0x1de;const _0x53e748=a127_0x53e7();let _0x4645bf=_0x53e748[_0x4cb9fd];return _0x4645bf;}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){return join(cacheRoot(),'lovrabet-cli','update-check.json');}async function readUpdateNoticeCache(){const _0x2c5acd=a127_0x4645;try{const _0x435dfc=await readFile(getUpdateNoticeCachePath(),_0x2c5acd(0x1f2)),_0xb7036b=JSON[_0x2c5acd(0x1de)](_0x435dfc);if(!_0xb7036b||typeof _0xb7036b!==_0x2c5acd(0x1f7))return{};return _0xb7036b;}catch{return{};}}async function writeUpdateNoticeCache(_0x1ceb6c){const _0xcfd15f=a127_0x4645;try{const _0x445d76=getUpdateNoticeCachePath();await mkdir(dirname(_0x445d76),{'recursive':!![]}),await writeFile(_0x445d76,JSON[_0xcfd15f(0x1f6)](_0x1ceb6c,null,0x2)+'\x0a',_0xcfd15f(0x1f2));}catch{}}function isFreshCheck(_0x388627,_0x326c2a){const _0x4b0c9e=a127_0x4645;return typeof _0x388627['checkedAt']===_0x4b0c9e(0x1fd)&&_0x326c2a-_0x388627[_0x4b0c9e(0x1e2)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x2b53d4,_0xe5ddb7,_0x3c076b){const _0x172b0b=a127_0x4645;return _0x2b53d4[_0x172b0b(0x201)]===_0xe5ddb7&&typeof _0x2b53d4[_0x172b0b(0x1f5)]===_0x172b0b(0x1fd)&&_0x3c076b-_0x2b53d4[_0x172b0b(0x1f5)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x166620=0x5dc){const _0x3fce30=a127_0x4645;try{const _0x5ad7a5=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x3fce30(0x1ef),_0x3bb854=await fetch(_0x5ad7a5,{'signal':AbortSignal[_0x3fce30(0x1e4)](_0x166620)});if(!_0x3bb854['ok'])return null;const _0x3c3065=await _0x3bb854[_0x3fce30(0x200)]();if(!_0x3c3065||typeof _0x3c3065!=='object')return null;return Object['fromEntries'](Object[_0x3fce30(0x1e1)](_0x3c3065)['filter'](([,_0x290c7d])=>typeof _0x290c7d===_0x3fce30(0x1df)&&_0x290c7d[_0x3fce30(0x1e9)]())[_0x3fce30(0x202)](([_0x321b4e,_0x1c3d7a])=>[_0x321b4e,String(_0x1c3d7a)[_0x3fce30(0x1e9)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x5e004a){const _0x2767de=a127_0x4645;return _0x2767de(0x1ec)+LOVRABET_NPM_PACKAGE_NAME+_0x2767de(0x1eb)+_0x5e004a;}export async function resolveLatestUpdateNotice(){const _0x32689e=a127_0x4645;if(isUpdateNoticeDisabled())return null;try{const _0x4a250b=Date[_0x32689e(0x1fa)](),_0x17eff3=getCliVersion(),_0x23383c=await readUpdateNoticeCache();let _0x2f160b=isFreshCheck(_0x23383c,_0x4a250b)?_0x23383c[_0x32689e(0x1e8)]?.[_0x32689e(0x1e9)]():undefined;if(!_0x2f160b&&!isFreshCheck(_0x23383c,_0x4a250b)){const _0x41e92e=await fetchNpmDistTags();_0x2f160b=_0x41e92e?.['latest']?.[_0x32689e(0x1e9)](),await writeUpdateNoticeCache({..._0x23383c,'checkedAt':_0x4a250b,'latest':_0x2f160b,'failed':!_0x2f160b});}if(!_0x2f160b||compareSemver(_0x17eff3,_0x2f160b)>=0x0)return null;if(isRecentlyNotified(_0x23383c,_0x2f160b,_0x4a250b))return null;const _0xae16a6=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x23383c,'checkedAt':isFreshCheck(_0x23383c,_0x4a250b)?_0x23383c[_0x32689e(0x1e2)]:_0x4a250b,'latest':_0x2f160b,'failed':![],'lastNotifiedVersion':_0x2f160b,'lastNotifiedAt':_0x4a250b}),{'command':_0xae16a6,'current':_0x17eff3,'latest':_0x2f160b,'url':buildNpmVersionUrl(_0x2f160b),'message':CLI_BIN_NAME+'\x20'+_0x2f160b+'\x20available,\x20current\x20'+_0x17eff3+_0x32689e(0x1f1)+_0xae16a6};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22583f,_0x3ff189){const _0x18f1e4=a128_0x4421,_0x775951=_0x22583f();while(!![]){try{const _0x957033=-parseInt(_0x18f1e4(0x1e5))/0x1+parseInt(_0x18f1e4(0x1e6))/0x2*(-parseInt(_0x18f1e4(0x1df))/0x3)+-parseInt(_0x18f1e4(0x1e3))/0x4+-parseInt(_0x18f1e4(0x1e4))/0x5+parseInt(_0x18f1e4(0x1de))/0x6*(-parseInt(_0x18f1e4(0x1e2))/0x7)+-parseInt(_0x18f1e4(0x1e1))/0x8+-parseInt(_0x18f1e4(0x1dd))/0x9*(-parseInt(_0x18f1e4(0x1dc))/0xa);if(_0x957033===_0x3ff189)break;else _0x775951['push'](_0x775951['shift']());}catch(_0x457841){_0x775951['push'](_0x775951['shift']());}}}(a128_0x276e,0x1d8df));function a128_0x4421(_0x340d27,_0x18c23c){_0x340d27=_0x340d27-0x1dc;const _0x276eab=a128_0x276e();let _0x4421c6=_0x276eab[_0x340d27];return _0x4421c6;}import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x102e60=a128_0x4421,_0x270e59=String(GIT_COMMIT);return _0x270e59&&_0x270e59!==_0x102e60(0x1e0)?_0x270e59:'';}export function getCliVersionDisplay(){const _0x2cb307=a128_0x4421,_0x4bccce=getCliGitCommit(),_0x171aaf=BUILD_TIME[_0x2cb307(0x1e7)](0x0,0xa);if(!_0x4bccce||!_0x171aaf)return VERSION;return VERSION+'\x20('+_0x4bccce+',\x20'+_0x171aaf+')';}function a128_0x276e(){const _0x203bcc=['21kLKjRy','441376LQUrWt','501335GGSgJh','53087ZdcTVM','27812BUjksR','slice','78850KvpFuf','747mApGnQ','71082tnlIqo','48pFyutq','unknown','93320qQDLLe'];a128_0x276e=function(){return _0x203bcc;};return a128_0x276e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a129_0x34da(_0x113dfc,_0x597e66){_0x113dfc=_0x113dfc-0x1e1;var _0x17b299=a129_0x17b2();var _0x34da7e=_0x17b299[_0x113dfc];return _0x34da7e;}(function(_0x1eb78c,_0x3996a2){var _0x54c1a2=a129_0x34da,_0x109900=_0x1eb78c();while(!![]){try{var _0x12cbd3=parseInt(_0x54c1a2(0x1e2))/0x1+-parseInt(_0x54c1a2(0x1e5))/0x2+-parseInt(_0x54c1a2(0x1e3))/0x3+parseInt(_0x54c1a2(0x1e9))/0x4+-parseInt(_0x54c1a2(0x1e4))/0x5*(parseInt(_0x54c1a2(0x1e1))/0x6)+parseInt(_0x54c1a2(0x1e7))/0x7*(parseInt(_0x54c1a2(0x1e8))/0x8)+-parseInt(_0x54c1a2(0x1e6))/0x9*(-parseInt(_0x54c1a2(0x1ea))/0xa);if(_0x12cbd3===_0x3996a2)break;else _0x109900['push'](_0x109900['shift']());}catch(_0xdcf29){_0x109900['push'](_0x109900['shift']());}}}(a129_0x17b2,0x3887e));function a129_0x17b2(){var _0x9fda13=['write','30SspnQa','389453ufmOtF','1094850kegTlh','245870ybHgjB','718106EdKygC','9VYKcms','651SzKwOR','16696SzhFQZ','464304EOMxQD','5018030jCNjrD'];a129_0x17b2=function(){return _0x9fda13;};return a129_0x17b2();}export function writeCliSideChannelLine(_0x21111d){var _0x3a16d0=a129_0x34da;process['stderr'][_0x3a16d0(0x1eb)](_0x21111d+'\x0a');}
|
package/package.json
CHANGED