@lovrabet/lovrabet-cli 2.1.12 → 2.1.13-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/function-name-adapter.js +1 -0
- 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(_0x3fd729,_0x393ea3){const _0x2a0c66=a107_0x1a09,_0x12d93d=_0x3fd729();while(!![]){try{const _0x7f7c01=-parseInt(_0x2a0c66(0x121))/0x1+parseInt(_0x2a0c66(0x11f))/0x2+parseInt(_0x2a0c66(0x11b))/0x3*(parseInt(_0x2a0c66(0x120))/0x4)+-parseInt(_0x2a0c66(0x11e))/0x5*(parseInt(_0x2a0c66(0x117))/0x6)+-parseInt(_0x2a0c66(0x116))/0x7+-parseInt(_0x2a0c66(0x112))/0x8*(-parseInt(_0x2a0c66(0x11c))/0x9)+parseInt(_0x2a0c66(0x118))/0xa*(parseInt(_0x2a0c66(0x115))/0xb);if(_0x7f7c01===_0x393ea3)break;else _0x12d93d['push'](_0x12d93d['shift']());}catch(_0x2f8e33){_0x12d93d['push'](_0x12d93d['shift']());}}}(a107_0xf2f7,0x456c8));import{CliErrors}from'../../errors.js';function a107_0x1a09(_0x50ecee,_0x5239f7){_0x50ecee=_0x50ecee-0x112;const _0xf2f766=a107_0xf2f7();let _0x1a0982=_0xf2f766[_0x50ecee];return _0x1a0982;}export function normalizeRuntimeSkillScopes(_0xe365f6){const _0x20d628=a107_0x1a09,_0x403445=_0xe365f6&&_0xe365f6['length']>0x0?_0xe365f6:['personal',_0x20d628(0x114),'builtin'],_0x395d4c=[];for(const _0xcb780a of _0x403445){if(!isRuntimeSkillScope(_0xcb780a))throw CliErrors[_0x20d628(0x11a)](_0x20d628(0x113)+_0xcb780a);!_0x395d4c[_0x20d628(0x119)](_0xcb780a)&&_0x395d4c['push'](_0xcb780a);}return _0x395d4c;}function a107_0xf2f7(){const _0x3b19b8=['566946GiJfNw','685624Analum','Unsupported\x20runtime\x20Skill\x20scope:\x20','company','11PGimgo','1561406TjvHbh','1052358XJUmOY','7255070NiiRlj','includes','validation','231711AhApRn','18CiLzET','builtin','10AUoTZf','438578sXaYVW','16oHbfOt'];a107_0xf2f7=function(){return _0x3b19b8;};return a107_0xf2f7();}export function isRuntimeSkillScope(_0xbf871){const _0x3bdcde=a107_0x1a09;return _0xbf871==='personal'||_0xbf871===_0x3bdcde(0x114)||_0xbf871===_0x3bdcde(0x11d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a109_0x3db711=a109_0x280b;(function(_0x5199ba,_0x736494){const _0x238277=a109_0x280b,_0x1f654e=_0x5199ba();while(!![]){try{const _0x2f0118=-parseInt(_0x238277(0x138))/0x1*(-parseInt(_0x238277(0x139))/0x2)+-parseInt(_0x238277(0x12f))/0x3*(-parseInt(_0x238277(0x12a))/0x4)+-parseInt(_0x238277(0x126))/0x5+-parseInt(_0x238277(0x129))/0x6*(parseInt(_0x238277(0x134))/0x7)+parseInt(_0x238277(0x136))/0x8+-parseInt(_0x238277(0x12b))/0x9+parseInt(_0x238277(0x137))/0xa*(parseInt(_0x238277(0x128))/0xb);if(_0x2f0118===_0x736494)break;else _0x1f654e['push'](_0x1f654e['shift']());}catch(_0x242ad2){_0x1f654e['push'](_0x1f654e['shift']());}}}(a109_0x9315,0x1fc97));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a109_0x3db711(0x13a));function a109_0x280b(_0x51eee8,_0x1ac4d9){_0x51eee8=_0x51eee8-0x126;const _0x931582=a109_0x9315();let _0x280b41=_0x931582[_0x51eee8];return _0x280b41;}export function createDeterministicZipPackage(_0x368db2){const _0x50e3f3=a109_0x3db711,_0x4b4ae6={};for(const _0x25f5e2 of normalizeLocalFiles(_0x368db2)){_0x4b4ae6[_0x25f5e2[_0x50e3f3(0x12c)]]=fileContent(_0x25f5e2);}return Buffer[_0x50e3f3(0x12d)](zipSync(_0x4b4ae6,{'level':0x0,'mtime':ZIP_MTIME}));}function a109_0x9315(){const _0x344fc8=['21qWOZLL','sort','822680bLyzyO','16270dPAuvf','7797KuuvRc','62BAaGco','1980-01-01T00:00:00.000Z','954520wXtrkx','entries','330eidaZw','33606hKUhnf','525268MmozxQ','1680867OxMayn','path','from','endsWith','3QYcgdg','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','code','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','validation'];a109_0x9315=function(){return _0x344fc8;};return a109_0x9315();}export function parseZipPackage(_0x2d1d0f){const _0x49a7fd=a109_0x3db711;if(_0x2d1d0f['length']<0x16)throw CliErrors[_0x49a7fd(0x133)](_0x49a7fd(0x130));let _0x3cb510;try{_0x3cb510=unzipSync(_0x2d1d0f,{'filter'(_0x3444dd){const _0x154c46=_0x49a7fd,_0x46ded9=normalizeSkillRelativePath(_0x3444dd['name']);if(_0x46ded9[_0x154c46(0x12e)]('/'))throw CliErrors[_0x154c46(0x133)](_0x154c46(0x132)+_0x46ded9);return!![];}});}catch(_0x2f8436){if(isRuntimeSkillValidationError(_0x2f8436))throw _0x2f8436;throw CliErrors['validation'](_0x49a7fd(0x130));}return Object[_0x49a7fd(0x127)](_0x3cb510)['map'](([_0x13a0be,_0x45b5f2])=>({'path':normalizeSkillRelativePath(_0x13a0be),'bytes':Buffer['from'](_0x45b5f2)}))[_0x49a7fd(0x135)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x514276){const _0x3ee680=a109_0x3db711;return typeof _0x514276==='object'&&_0x514276!==null&&_0x3ee680(0x131)in _0x514276&&_0x514276[_0x3ee680(0x131)]==='validation_error';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a110_0x2f42(_0x11832f,_0x416814){_0x11832f=_0x11832f-0xa7;const _0x207ac7=a110_0x207a();let _0x2f4219=_0x207ac7[_0x11832f];return _0x2f4219;}(function(_0x2e2286,_0x341c17){const _0x4c075e=a110_0x2f42,_0x9008fc=_0x2e2286();while(!![]){try{const _0x1f78c6=parseInt(_0x4c075e(0xb4))/0x1+-parseInt(_0x4c075e(0xc7))/0x2*(-parseInt(_0x4c075e(0xba))/0x3)+-parseInt(_0x4c075e(0xd3))/0x4+parseInt(_0x4c075e(0xb5))/0x5+-parseInt(_0x4c075e(0xd1))/0x6*(-parseInt(_0x4c075e(0xb1))/0x7)+-parseInt(_0x4c075e(0xcf))/0x8*(-parseInt(_0x4c075e(0xa9))/0x9)+-parseInt(_0x4c075e(0xbc))/0xa;if(_0x1f78c6===_0x341c17)break;else _0x9008fc['push'](_0x9008fc['shift']());}catch(_0x280762){_0x9008fc['push'](_0x9008fc['shift']());}}}(a110_0x207a,0x98264));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(_0x2fe3c5){const _0x449e39=a110_0x2f42,_0x4e2288=normalizeLocalFiles(_0x2fe3c5);if(!_0x4e2288['some'](_0x2c6ae2=>_0x2c6ae2[_0x449e39(0xad)]===SKILL_FILE))throw CliErrors[_0x449e39(0xc5)](_0x449e39(0xb8)+SKILL_FILE+_0x449e39(0xcc));const _0x8c72cf=localFilesToManifestFiles(_0x4e2288),_0x55aada=createDeterministicZipPackage(_0x4e2288);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x8c72cf),'zipSha256':bufferSha256(_0x55aada),'zipSize':_0x55aada[_0x449e39(0xaa)],'files':_0x8c72cf},'packageBytes':_0x55aada,'packageBase64':_0x55aada[_0x449e39(0xac)](_0x449e39(0xc9))};}export function verifyRuntimeSkillPackage(_0x2543b3,_0x411528){const _0x3bd468=a110_0x2f42,_0x175ed9=normalizePackageManifest(_0x2543b3,{'requireOssPath':![]});if(!_0x175ed9)throw CliErrors[_0x3bd468(0xc5)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x175ed9,_0x411528);}export function verifyRuntimeSkillBundle(_0x1bd6b6,_0x5a5878){const _0x59cd51=a110_0x2f42,_0x2d96f4=normalizePackageManifest(_0x1bd6b6,{'requireOssPath':![]});if(!_0x2d96f4)throw CliErrors[_0x59cd51(0xc5)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x2d96f4,_0x5a5878);}export function tryNormalizePackageManifest(_0x3efd7e){return normalizePackageManifest(_0x3efd7e,{'requireOssPath':![]});}export function requirePackageBytes(_0x1939d6,_0x54a1a8){const _0x1b04b3=a110_0x2f42;if(!_0x54a1a8||_0x54a1a8[_0x1b04b3(0xaa)]===0x0)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x1939d6);return _0x54a1a8;}export function extractDownloadedPackage(_0x50cbf5){const _0x161017=a110_0x2f42,_0x44a48e=parseZipPackage(_0x50cbf5)[_0x161017(0xd0)](_0x1901fd=>({'path':_0x1901fd[_0x161017(0xad)],'bytes':_0x1901fd[_0x161017(0xce)]}));if(!_0x44a48e[_0x161017(0xab)](_0x626de6=>_0x626de6[_0x161017(0xad)]===SKILL_FILE))throw CliErrors[_0x161017(0xc5)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x44a48e);}export function localFilesToManifestFiles(_0x3455c7){const _0x54d358=a110_0x2f42;return normalizeLocalFiles(_0x3455c7)[_0x54d358(0xd0)](_0x24f26b=>({'path':_0x24f26b[_0x54d358(0xad)],'sha256':fileHash(_0x24f26b),'size':fileContent(_0x24f26b)[_0x54d358(0xaa)]}));}function normalizePackageManifest(_0x94e6ce,_0xd41eb8){const _0x341360=a110_0x2f42;if(!_0x94e6ce||typeof _0x94e6ce!==_0x341360(0xcb)||Array['isArray'](_0x94e6ce))return undefined;const _0x4fa1e4=_0x94e6ce,_0x3da7bb=typeof _0x4fa1e4[_0x341360(0xc3)]===_0x341360(0xb7)?_0x4fa1e4[_0x341360(0xc3)][_0x341360(0xb2)]():undefined;if(_0xd41eb8[_0x341360(0xbd)]&&!_0x3da7bb)return undefined;if(!Array[_0x341360(0xa8)](_0x4fa1e4[_0x341360(0xae)])||_0x4fa1e4['files'][_0x341360(0xaa)]===0x0)return undefined;if(!isSha256Hex(_0x4fa1e4[_0x341360(0xbb)]))throw CliErrors[_0x341360(0xc5)](_0x341360(0xc1));if(!isSha256Hex(_0x4fa1e4[_0x341360(0xbe)]))throw CliErrors[_0x341360(0xc5)]('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number['isSafeInteger'](_0x4fa1e4['zipSize'])||_0x4fa1e4[_0x341360(0xcd)]<0x0)throw CliErrors[_0x341360(0xc5)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0x42177d=normalizeManifestFiles(_0x4fa1e4['files']);if(!_0x42177d[_0x341360(0xab)](_0x312bd8=>_0x312bd8[_0x341360(0xad)]===SKILL_FILE))throw CliErrors[_0x341360(0xc5)](_0x341360(0xc6)+SKILL_FILE+'.');const _0x3ece07=fileTreeHash(_0x42177d);if(_0x3ece07!==_0x4fa1e4['treeSha256'][_0x341360(0xb0)]())throw CliErrors[_0x341360(0xc5)](_0x341360(0xc0));return{'schemaVersion':Number[_0x341360(0xca)](_0x4fa1e4[_0x341360(0xc2)])?_0x4fa1e4[_0x341360(0xc2)]:0x2,'ossPath':_0x3da7bb,'treeSha256':_0x3ece07,'zipSha256':_0x4fa1e4[_0x341360(0xbe)][_0x341360(0xb0)](),'zipSize':_0x4fa1e4['zipSize'],'files':_0x42177d};}function a110_0x207a(){const _0x4e5ea5=['zipSize','bytes','16pHnpQp','map','282TNatIG','push','698588CMWxmQ','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','isArray','4028931CXcJzP','length','some','toString','path','files','sha256','toLowerCase','10423fmSHKr','trim','has','317351xzfRcH','3099000gcKFJG','get','string','Missing\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','1088874ZxmQYp','treeSha256','18305170vAOocd','requireOssPath','zipSha256','size','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','schemaVersion','ossPath','set','validation','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','4vMWwfc','Duplicate\x20Skill\x20package\x20entry:\x20','base64','isSafeInteger','object','\x20in\x20Skill\x20file\x20package.'];a110_0x207a=function(){return _0x4e5ea5;};return a110_0x207a();}function extractAndVerifyPackage(_0x4addd0,_0x2c4cef){const _0x41aa6d=a110_0x2f42,_0x1c0c4b=normalizePackageManifest(_0x4addd0,{'requireOssPath':![]});if(!_0x1c0c4b)throw CliErrors[_0x41aa6d(0xc5)](_0x41aa6d(0xa7));if(_0x2c4cef[_0x41aa6d(0xaa)]!==_0x1c0c4b[_0x41aa6d(0xcd)])throw CliErrors[_0x41aa6d(0xc5)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0xb68034=bufferSha256(_0x2c4cef);if(_0xb68034!==_0x1c0c4b[_0x41aa6d(0xbe)])throw CliErrors[_0x41aa6d(0xc5)](_0x41aa6d(0xb9));return extractAndVerifyPackageFiles(_0x1c0c4b,_0x2c4cef);}function extractAndVerifyPackageFiles(_0x4dd50d,_0x45e7f2){const _0x2b6d14=a110_0x2f42,_0x106dc8=parseZipPackage(_0x45e7f2);if(_0x106dc8[_0x2b6d14(0xaa)]!==_0x4dd50d['files'][_0x2b6d14(0xaa)])throw CliErrors['validation'](_0x2b6d14(0xd4));const _0x167e01=new Map();for(const _0x376ef9 of _0x106dc8){if(_0x167e01[_0x2b6d14(0xb3)](_0x376ef9[_0x2b6d14(0xad)]))throw CliErrors[_0x2b6d14(0xc5)](_0x2b6d14(0xc8)+_0x376ef9['path']);_0x167e01[_0x2b6d14(0xc4)](_0x376ef9[_0x2b6d14(0xad)],_0x376ef9);}const _0x5ce5d3=[];for(const _0x5a56b1 of _0x4dd50d[_0x2b6d14(0xae)]){const _0x5258b3=_0x167e01[_0x2b6d14(0xb6)](_0x5a56b1[_0x2b6d14(0xad)]);if(!_0x5258b3)throw CliErrors[_0x2b6d14(0xc5)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x5a56b1[_0x2b6d14(0xad)]);if(_0x5258b3[_0x2b6d14(0xce)][_0x2b6d14(0xaa)]!==_0x5a56b1[_0x2b6d14(0xbf)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x5a56b1[_0x2b6d14(0xad)]);const _0x13e208=bufferSha256(_0x5258b3[_0x2b6d14(0xce)]);if(_0x13e208!==_0x5a56b1[_0x2b6d14(0xaf)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x5a56b1[_0x2b6d14(0xad)]);_0x5ce5d3[_0x2b6d14(0xd2)]({'path':_0x5a56b1['path'],'bytes':_0x5258b3[_0x2b6d14(0xce)]});}return normalizeLocalFiles(_0x5ce5d3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x56572e,_0x5f06d4){var _0x44e511=a111_0xd01a,_0x81f1c3=_0x56572e();while(!![]){try{var _0x4b5b56=parseInt(_0x44e511(0x143))/0x1*(parseInt(_0x44e511(0x140))/0x2)+-parseInt(_0x44e511(0x14a))/0x3*(-parseInt(_0x44e511(0x146))/0x4)+parseInt(_0x44e511(0x14b))/0x5*(-parseInt(_0x44e511(0x148))/0x6)+parseInt(_0x44e511(0x147))/0x7*(parseInt(_0x44e511(0x149))/0x8)+-parseInt(_0x44e511(0x141))/0x9+parseInt(_0x44e511(0x145))/0xa*(-parseInt(_0x44e511(0x142))/0xb)+parseInt(_0x44e511(0x144))/0xc*(parseInt(_0x44e511(0x14c))/0xd);if(_0x4b5b56===_0x5f06d4)break;else _0x81f1c3['push'](_0x81f1c3['shift']());}catch(_0x25af13){_0x81f1c3['push'](_0x81f1c3['shift']());}}}(a111_0xe405,0x51cc0));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';function a111_0xd01a(_0xad80f5,_0x25d236){_0xad80f5=_0xad80f5-0x140;var _0xe405b6=a111_0xe405();var _0xd01a1f=_0xe405b6[_0xad80f5];return _0xd01a1f;}export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a111_0xe405(){var _0x570c45=['39GwHVsy','85734zmHYfK','4853070hTVkyg','888239zPYzoc','3aGohTd','4914324jMfWOI','60tBqKBX','4jWRxZL','755776LmCxMO','924954NzWtod','24FzeZPB','420465HmMuIl','15PfzKEq'];a111_0xe405=function(){return _0x570c45;};return a111_0xe405();}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(_0x442ec6,_0x168e4d){const _0x14777b=a112_0x5ced,_0x3b98e4=_0x442ec6();while(!![]){try{const _0x454460=parseInt(_0x14777b(0x189))/0x1*(-parseInt(_0x14777b(0x183))/0x2)+parseInt(_0x14777b(0x18b))/0x3+-parseInt(_0x14777b(0x184))/0x4+parseInt(_0x14777b(0x18a))/0x5*(-parseInt(_0x14777b(0x188))/0x6)+parseInt(_0x14777b(0x187))/0x7*(parseInt(_0x14777b(0x186))/0x8)+-parseInt(_0x14777b(0x185))/0x9+parseInt(_0x14777b(0x182))/0xa;if(_0x454460===_0x168e4d)break;else _0x3b98e4['push'](_0x3b98e4['shift']());}catch(_0x22a7e9){_0x3b98e4['push'](_0x3b98e4['shift']());}}}(a112_0xdd76,0xd668f));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a112_0x5ced(_0xb171e4,_0x50b979){_0xb171e4=_0xb171e4-0x182;const _0xdd7613=a112_0xdd76();let _0x5cedc7=_0xdd7613[_0xb171e4];return _0x5cedc7;}function a112_0xdd76(){const _0xb55437=['15401466IGaTha','638704KuMJQm','133MNcTrl','6uCNvfy','2EoVbxn','1801670rPLYFv','4569753AmrAOl','20029170JCYhaf','691568VnIpdg','5606764usJeoP'];a112_0xdd76=function(){return _0xb55437;};return a112_0xdd76();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a113_0x6cc845=a113_0x12a5;(function(_0x237234,_0x15daa9){const _0xf3e2b2=a113_0x12a5,_0x6a1b9a=_0x237234();while(!![]){try{const _0x59131f=parseInt(_0xf3e2b2(0xa6))/0x1+parseInt(_0xf3e2b2(0x86))/0x2+-parseInt(_0xf3e2b2(0xa2))/0x3*(parseInt(_0xf3e2b2(0x96))/0x4)+parseInt(_0xf3e2b2(0x9a))/0x5+parseInt(_0xf3e2b2(0x7f))/0x6*(-parseInt(_0xf3e2b2(0x7d))/0x7)+-parseInt(_0xf3e2b2(0x7e))/0x8*(parseInt(_0xf3e2b2(0xa0))/0x9)+-parseInt(_0xf3e2b2(0x9d))/0xa;if(_0x59131f===_0x15daa9)break;else _0x6a1b9a['push'](_0x6a1b9a['shift']());}catch(_0x5ea14e){_0x6a1b9a['push'](_0x6a1b9a['shift']());}}}(a113_0x1c3b,0x898b1));import a113_0x375d from'winston';import a113_0x399b24 from'node:fs';import a113_0x29f8d6 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a113_0x6cc845(0x8e)];[a113_0x6cc845(0x81)]='';[a113_0x6cc845(0x9c)]='';constructor(){}[a113_0x6cc845(0x79)](_0x57839f){const _0x2417b8=a113_0x6cc845;this[_0x2417b8(0x9c)]=_0x57839f;}[a113_0x6cc845(0x97)](_0x274f7c){const _0xfbefd3=a113_0x6cc845;this[_0xfbefd3(0x81)]=a113_0x29f8d6[_0xfbefd3(0x9e)](_0x274f7c,PRODUCT_CONFIG[_0xfbefd3(0x7a)]),this['winstonLogger']&&this[_0xfbefd3(0x8e)]['clear'](),this[_0xfbefd3(0x87)]();}[a113_0x6cc845(0x87)](){const _0x4abde3=a113_0x6cc845,_0x4d9fb6=a113_0x29f8d6['dirname'](this['logFilePath']);!a113_0x399b24[_0x4abde3(0x73)](_0x4d9fb6)&&a113_0x399b24[_0x4abde3(0x99)](_0x4d9fb6,{'recursive':!![]});const _0x3c43bf=a113_0x375d[_0x4abde3(0x89)][_0x4abde3(0x98)](a113_0x375d[_0x4abde3(0x89)][_0x4abde3(0x8b)](),a113_0x375d['format'][_0x4abde3(0xab)]({'stack':!![]}),a113_0x375d[_0x4abde3(0x89)]['printf'](_0x43f760=>{const _0x1e0819=_0x4abde3,_0x279a6d={'timestamp':_0x43f760[_0x1e0819(0x8b)]||new Date()[_0x1e0819(0x80)](),'level':_0x43f760[_0x1e0819(0xa7)]||_0x1e0819(0x85),'command':_0x43f760[_0x1e0819(0xa5)]||_0x1e0819(0x7c),'rawCommand':_0x43f760[_0x1e0819(0x84)]||this[_0x1e0819(0x9c)]||undefined,'message':_0x43f760[_0x1e0819(0x9b)]||'','duration':_0x43f760[_0x1e0819(0x88)]||undefined,'details':_0x43f760[_0x1e0819(0xa3)]||undefined};return JSON['stringify'](_0x279a6d);}));this[_0x4abde3(0x8e)]=a113_0x375d[_0x4abde3(0x8c)]({'level':_0x4abde3(0x85),'format':_0x3c43bf,'transports':[new a113_0x375d[(_0x4abde3(0x76))][(_0x4abde3(0xa9))]({'filename':this[_0x4abde3(0x81)],'level':_0x4abde3(0x85)})],'silent':![]}),a113_0x375d[_0x4abde3(0xa1)]({'success':_0x4abde3(0x77),'error':_0x4abde3(0xa4),'warn':'yellow','info':'blue'});}[a113_0x6cc845(0x85)](_0x30b640,_0x3deca6,_0x4db453){const _0x1c409b=a113_0x6cc845;if(!this[_0x1c409b(0x81)]||!this['winstonLogger'])return;this['winstonLogger'][_0x1c409b(0x85)](_0x3deca6,{'command':_0x30b640,'details':_0x4db453});}[a113_0x6cc845(0x8d)](_0x238ac0,_0x399f26,_0xb49556,_0x393409){const _0xb390ce=a113_0x6cc845;if(!this[_0xb390ce(0x81)]||!this[_0xb390ce(0x8e)])return;this[_0xb390ce(0x8e)][_0xb390ce(0x8a)](_0xb390ce(0x85),_0x399f26,{'level':_0xb390ce(0x8d),'command':_0x238ac0,'duration':_0xb49556,'details':_0x393409});}['error'](_0x4b0ef7,_0x3c9769,_0x551129){const _0x69a758=a113_0x6cc845;if(!this[_0x69a758(0x81)]||!this[_0x69a758(0x8e)])return;this[_0x69a758(0x8e)]['error'](_0x3c9769,{'command':_0x4b0ef7,'details':_0x551129});}['warn'](_0x1c023f,_0x13fbdc,_0x209c7f){const _0x30a999=a113_0x6cc845;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x30a999(0x8e)][_0x30a999(0x8f)](_0x13fbdc,{'command':_0x1c023f,'details':_0x209c7f});}async[a113_0x6cc845(0x90)](_0x111bd7,_0x5aff66,_0x1e13bb){const _0x2ac750=a113_0x6cc845,_0x19b1b0=Date[_0x2ac750(0xa8)]();this[_0x2ac750(0x85)](_0x111bd7,_0x2ac750(0x92)+_0x5aff66);try{const _0x1b7fee=await _0x1e13bb(),_0x54f9bd=Date[_0x2ac750(0xa8)]()-_0x19b1b0;return this[_0x2ac750(0x8d)](_0x111bd7,'Completed:\x20'+_0x5aff66,_0x54f9bd),_0x1b7fee;}catch(_0x54bde0){const _0x2fa65c=Date[_0x2ac750(0xa8)]()-_0x19b1b0;this[_0x2ac750(0x9f)](_0x111bd7,'Failed:\x20'+_0x5aff66,{'error':_0x54bde0 instanceof Error?_0x54bde0[_0x2ac750(0x9b)]:String(_0x54bde0),'duration':_0x2fa65c});throw _0x54bde0;}}['readLogs'](){const _0x47c9b8=a113_0x6cc845;try{if(!a113_0x399b24['existsSync'](this['logFilePath']))return[];const _0x50790e=a113_0x399b24[_0x47c9b8(0xac)](this[_0x47c9b8(0x81)],_0x47c9b8(0x74));return _0x50790e[_0x47c9b8(0xaa)](/\r?\n/)[_0x47c9b8(0x75)](_0x3bd761=>_0x3bd761[_0x47c9b8(0x7b)]())[_0x47c9b8(0x78)](_0x3e9fd8=>JSON[_0x47c9b8(0x93)](_0x3e9fd8));}catch(_0x4b03ab){return console['warn'](_0x47c9b8(0x82),_0x4b03ab),[];}}[a113_0x6cc845(0x91)](){const _0x20b135=a113_0x6cc845;try{a113_0x399b24['existsSync'](this['logFilePath'])&&a113_0x399b24[_0x20b135(0x94)](this[_0x20b135(0x81)],'',_0x20b135(0x74));}catch(_0x267afd){console[_0x20b135(0x8f)](_0x20b135(0x95),_0x267afd);}}[a113_0x6cc845(0x83)](){const _0x1f03bd=a113_0x6cc845;return this[_0x1f03bd(0x8e)];}}function a113_0x12a5(_0x382b5c,_0x7d053b){_0x382b5c=_0x382b5c-0x73;const _0x1c3b8b=a113_0x1c3b();let _0x12a58c=_0x1c3b8b[_0x382b5c];return _0x12a58c;}function a113_0x1c3b(){const _0x2b83da=['133OTRNNt','16PVsOSz','97530rxzcpV','toISOString','logFilePath','Failed\x20to\x20read\x20logs:','getWinstonInstance','rawCommand','info','2013434DitjVn','initWinstonLogger','duration','format','log','timestamp','createLogger','success','winstonLogger','warn','logTask','clearLogs','Starting:\x20','parse','writeFileSync','Failed\x20to\x20clear\x20logs:','1561708HVRAXk','setLogPath','combine','mkdirSync','2112110wbUOfX','message','currentRawCommand','2207920RCkhwJ','join','error','94707eAAEAA','addColors','6sehssV','details','red','command','465775QgSewI','level','now','File','split','errors','readFileSync','existsSync','utf8','filter','transports','green','map','setRawCommand','logFileName','trim','unknown'];a113_0x1c3b=function(){return _0x2b83da;};return a113_0x1c3b();}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x257c4e=a114_0x263c;(function(_0x3b0d66,_0x46e5a0){const _0x30a232=a114_0x263c,_0x3bce9f=_0x3b0d66();while(!![]){try{const _0x5aa323=parseInt(_0x30a232(0xdf))/0x1+parseInt(_0x30a232(0xdd))/0x2*(parseInt(_0x30a232(0xec))/0x3)+parseInt(_0x30a232(0xe0))/0x4*(-parseInt(_0x30a232(0xe6))/0x5)+parseInt(_0x30a232(0xe3))/0x6+-parseInt(_0x30a232(0xef))/0x7*(-parseInt(_0x30a232(0xf0))/0x8)+parseInt(_0x30a232(0xea))/0x9+-parseInt(_0x30a232(0xe8))/0xa*(parseInt(_0x30a232(0xe5))/0xb);if(_0x5aa323===_0x46e5a0)break;else _0x3bce9f['push'](_0x3bce9f['shift']());}catch(_0x2d2c79){_0x3bce9f['push'](_0x3bce9f['shift']());}}}(a114_0x40e6,0x2b073));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a114_0x257c4e(0xe4)]),MIN_SAFE_INTEGER=BigInt(Number[a114_0x257c4e(0xde)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x436af5){const _0x3e97a4=a114_0x257c4e;if(_0x436af5[_0x3e97a4(0xe7)]('.')||_0x436af5['includes']('e')||_0x436af5[_0x3e97a4(0xe7)]('E'))return![];const _0x240638=BigInt(_0x436af5);return _0x240638>MAX_SAFE_INTEGER||_0x240638<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x501236){const _0x2df35f=a114_0x257c4e;let _0x45e57c='',_0xcfeb99=![],_0x41bebf=![];for(let _0x348dda=0x0;_0x348dda<_0x501236[_0x2df35f(0xed)];){const _0x207f5f=_0x501236[_0x348dda];if(_0xcfeb99){_0x45e57c+=_0x207f5f,_0x348dda+=0x1;if(_0x41bebf)_0x41bebf=![];else{if(_0x207f5f==='\x5c')_0x41bebf=!![];else _0x207f5f==='\x22'&&(_0xcfeb99=![]);}continue;}if(_0x207f5f==='\x22'){_0xcfeb99=!![],_0x45e57c+=_0x207f5f,_0x348dda+=0x1;continue;}if(_0x207f5f==='-'||_0x207f5f>='0'&&_0x207f5f<='9'){const _0x46c0fa=JSON_NUMBER_PATTERN['exec'](_0x501236['slice'](_0x348dda))?.[0x0];if(_0x46c0fa){_0x45e57c+=isUnsafeIntegerLiteral(_0x46c0fa)?'\x22'+_0x46c0fa+'\x22':_0x46c0fa,_0x348dda+=_0x46c0fa[_0x2df35f(0xed)];continue;}}_0x45e57c+=_0x207f5f,_0x348dda+=0x1;}return _0x45e57c;}function a114_0x263c(_0x469655,_0x468f70){_0x469655=_0x469655-0xdd;const _0x40e626=a114_0x40e6();let _0x263c5e=_0x40e626[_0x469655];return _0x263c5e;}function a114_0x40e6(){const _0x20a911=['214364cIlWIT','defineProperty','json','872244qJWnvV','MAX_SAFE_INTEGER','9955sJRsRz','10BPbfDL','includes','7470JLWYvZ','undefined','849708DcOYTx','parse','3uxGDNS','length','prototype','56vrWthJ','268384vIQMgi','text','301772CaGBbr','MIN_SAFE_INTEGER','300404WXIwDU'];a114_0x40e6=function(){return _0x20a911;};return a114_0x40e6();}export function parseLosslessJson(_0x34aa72){const _0x27ca5c=a114_0x257c4e;return JSON[_0x27ca5c(0xeb)](quoteUnsafeIntegerLiterals(_0x34aa72));}export function installLosslessJsonResponseParser(){const _0x3c4243=a114_0x257c4e;if(typeof Response===_0x3c4243(0xe9))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x3c4243(0xee)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,_0x3c4243(0xe2)),Object[_0x3c4243(0xe1)](responseJsonPrototype,_0x3c4243(0xe2),{'configurable':!![],'enumerable':![],'value':async function _0x3e9cd0(){const _0x4e4c20=_0x3c4243;return parseLosslessJson(await this[_0x4e4c20(0xf1)]());},'writable':!![]}),restoreResponseJsonParser=()=>{if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,'json',originalResponseJsonDescriptor):delete responseJsonPrototype['json'],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fb470,_0x123b3b){const _0x124231=a115_0x62e7,_0x4910bd=_0x3fb470();while(!![]){try{const _0x3a1da1=-parseInt(_0x124231(0x137))/0x1+-parseInt(_0x124231(0x149))/0x2+-parseInt(_0x124231(0x144))/0x3+parseInt(_0x124231(0x14e))/0x4+parseInt(_0x124231(0x142))/0x5+-parseInt(_0x124231(0x136))/0x6*(parseInt(_0x124231(0x14c))/0x7)+parseInt(_0x124231(0x13c))/0x8*(parseInt(_0x124231(0x13b))/0x9);if(_0x3a1da1===_0x123b3b)break;else _0x4910bd['push'](_0x4910bd['shift']());}catch(_0xe6de1c){_0x4910bd['push'](_0x4910bd['shift']());}}}(a115_0x393c,0xdb2ee));import{CliErrors}from'../errors.js';function a115_0x393c(){const _0x2bc682=['string','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','1210478DEJaUV','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','map','515851HghpaA','isArray','4946068MgwVrR','length','6eYdpvg','1312012hNkSOO','items','object','test','887805DvxmLO','136hNrwqt','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','validation','join','Invalid\x20JSON\x20for\x20--params:\x20','6770040bojzUO','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','4136316oHcavm','\x20records\x20per\x20call;\x20received\x20','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'];a115_0x393c=function(){return _0x2bc682;};return a115_0x393c();}function a115_0x62e7(_0x17c325,_0x5d668c){_0x17c325=_0x17c325-0x136;const _0x393c66=a115_0x393c();let _0x62e7b7=_0x393c66[_0x17c325];return _0x62e7b7;}import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x2e1a78){const _0x5dcb39=a115_0x62e7;if(!_0x2e1a78)return undefined;try{return parseLosslessJson(_0x2e1a78);}catch{throw CliErrors['validation'](_0x5dcb39(0x141)+_0x2e1a78);}}export function parseJsonParamsValue(_0x65e1c6){const _0xf1cb2=a115_0x62e7;if(!_0x65e1c6)return undefined;try{return parseLosslessJson(_0x65e1c6);}catch{throw CliErrors[_0xf1cb2(0x13f)](_0xf1cb2(0x141)+_0x65e1c6);}}export function parseBatchCreateItemsFromParams(_0x5d1d62){const _0x265a48=a115_0x62e7;if(Array['isArray'](_0x5d1d62))return _0x5d1d62;if(_0x5d1d62!==null&&_0x5d1d62!==undefined&&typeof _0x5d1d62==='object'&&Array[_0x265a48(0x14d)](_0x5d1d62[_0x265a48(0x138)]))return _0x5d1d62[_0x265a48(0x138)];throw CliErrors[_0x265a48(0x13f)](_0x265a48(0x13e),_0x265a48(0x146));}function parseDataUpdateId(_0x510c37,_0x3ac7c1){const _0x5dfcd9=a115_0x62e7;if(typeof _0x510c37==='number'&&Number['isSafeInteger'](_0x510c37)&&_0x510c37>0x0)return _0x510c37;if(typeof _0x510c37===_0x5dfcd9(0x147)){if(/^[1-9]\d*$/[_0x5dfcd9(0x13a)](_0x510c37))return _0x510c37;}throw CliErrors[_0x5dfcd9(0x13f)]('data\x20update\x20--params.'+_0x3ac7c1+'\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.');}export function parseUpdateIdsFromParams(_0x23e022){const _0x3b437c=a115_0x62e7;if(_0x23e022===null||_0x23e022===undefined||typeof _0x23e022!==_0x3b437c(0x139)||Array[_0x3b437c(0x14d)](_0x23e022))throw CliErrors[_0x3b437c(0x13f)](_0x3b437c(0x143),_0x3b437c(0x14a));const _0x53c853=_0x23e022['id'];if(_0x53c853===undefined||_0x53c853===null)throw CliErrors[_0x3b437c(0x13f)](_0x3b437c(0x148),_0x3b437c(0x14a));const _0x4554c3=Array[_0x3b437c(0x14d)](_0x53c853)?_0x53c853:[_0x53c853];if(_0x4554c3['length']===0x0)throw CliErrors[_0x3b437c(0x13f)](_0x3b437c(0x13d));if(_0x4554c3[_0x3b437c(0x14f)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x3b437c(0x13f)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+_0x3b437c(0x145)+_0x4554c3['length']+'.');return _0x4554c3[_0x3b437c(0x14b)]((_0xa7db9e,_0x30dd31)=>parseDataUpdateId(_0xa7db9e,Array['isArray'](_0x53c853)?'id['+_0x30dd31+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x451eba,_0x145410){const _0x4df11b=a115_0x62e7;if(Array['isArray'](_0x451eba['id'])&&_0x145410[_0x4df11b(0x14f)]>0x1)return{..._0x451eba,'id':_0x145410[_0x4df11b(0x140)](',')};return _0x451eba;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a116_0x253b(_0x38f8f2,_0x53d7bf){_0x38f8f2=_0x38f8f2-0x1e4;const _0x4324de=a116_0x4324();let _0x253bc9=_0x4324de[_0x38f8f2];return _0x253bc9;}const a116_0x38a7c0=a116_0x253b;(function(_0x48d731,_0x5bfa29){const _0x5b9165=a116_0x253b,_0x5a71d5=_0x48d731();while(!![]){try{const _0x2e3b2f=-parseInt(_0x5b9165(0x1f1))/0x1*(-parseInt(_0x5b9165(0x1f2))/0x2)+parseInt(_0x5b9165(0x1e5))/0x3*(parseInt(_0x5b9165(0x1e4))/0x4)+parseInt(_0x5b9165(0x1eb))/0x5*(parseInt(_0x5b9165(0x1e7))/0x6)+-parseInt(_0x5b9165(0x1f0))/0x7*(-parseInt(_0x5b9165(0x1ed))/0x8)+-parseInt(_0x5b9165(0x1e6))/0x9*(parseInt(_0x5b9165(0x1ec))/0xa)+-parseInt(_0x5b9165(0x1e8))/0xb+-parseInt(_0x5b9165(0x1ef))/0xc*(-parseInt(_0x5b9165(0x1ee))/0xd);if(_0x2e3b2f===_0x5bfa29)break;else _0x5a71d5['push'](_0x5a71d5['shift']());}catch(_0x434e78){_0x5a71d5['push'](_0x5a71d5['shift']());}}}(a116_0x4324,0x71e44));export const isWindows=process[a116_0x38a7c0(0x1e9)]===a116_0x38a7c0(0x1ea);function a116_0x4324(){const _0x20cfeb=['35421SeSHCr','9cIIjvO','151068GPqRWT','5809936XqJnJr','platform','win32','45wGPBBS','642670xuspSl','8OHMxTd','704535xlBOCi','12UuXqSJ','3596278qNGisT','193550xEDjrx','2CHyhwd','24sdxAFk'];a116_0x4324=function(){return _0x20cfeb;};return a116_0x4324();}export function resolveNpmBin(_0x516cf3){return isWindows?_0x516cf3+'.cmd':_0x516cf3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52d232,_0xec7f8f){const _0x4db545=a117_0x2961,_0x202223=_0x52d232();while(!![]){try{const _0xfb53b=parseInt(_0x4db545(0x18d))/0x1+parseInt(_0x4db545(0x177))/0x2+-parseInt(_0x4db545(0x180))/0x3+parseInt(_0x4db545(0x18e))/0x4+parseInt(_0x4db545(0x17b))/0x5+-parseInt(_0x4db545(0x178))/0x6*(parseInt(_0x4db545(0x17e))/0x7)+-parseInt(_0x4db545(0x17f))/0x8;if(_0xfb53b===_0xec7f8f)break;else _0x202223['push'](_0x202223['shift']());}catch(_0xa039ab){_0x202223['push'](_0x202223['shift']());}}}(a117_0x3ce0,0x5e184));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';function a117_0x2961(_0x33d0a2,_0x37a159){_0x33d0a2=_0x33d0a2-0x176;const _0x3ce0ad=a117_0x3ce0();let _0x29614c=_0x3ce0ad[_0x33d0a2];return _0x29614c;}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(_0x91a20d){const _0x3290d5=a117_0x2961,_0x5cef2c=_0x91a20d['trim']()[_0x3290d5(0x18a)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x5cef2c)return null;return{'major':Number(_0x5cef2c[0x1]),'minor':Number(_0x5cef2c[0x2]),'patch':Number(_0x5cef2c[0x3]),'prerelease':_0x5cef2c[0x4]};}function compareSemver(_0x26e0ed,_0x391284){const _0x445968=a117_0x2961,_0x242400=parseSemver(_0x26e0ed),_0x553802=parseSemver(_0x391284);if(!_0x242400||!_0x553802)throw new Error('Invalid\x20semver');for(const _0x5bbee9 of[_0x445968(0x19a),'minor',_0x445968(0x18c)]){if(_0x242400[_0x5bbee9]<_0x553802[_0x5bbee9])return-0x1;if(_0x242400[_0x5bbee9]>_0x553802[_0x5bbee9])return 0x1;}if(!_0x242400[_0x445968(0x17a)]&&!_0x553802[_0x445968(0x17a)])return 0x0;if(!_0x242400[_0x445968(0x17a)])return 0x1;if(!_0x553802[_0x445968(0x17a)])return-0x1;if(_0x242400[_0x445968(0x17a)]===_0x553802[_0x445968(0x17a)])return 0x0;return _0x242400[_0x445968(0x17a)]<_0x553802[_0x445968(0x17a)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x43e0ec=a117_0x2961,_0x518be6=process.env.LOVRABET_NO_UPDATE_NOTICE?.['trim']()[_0x43e0ec(0x194)]();return _0x518be6==='1'||_0x518be6===_0x43e0ec(0x183)||_0x518be6===_0x43e0ec(0x191);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x50a8b9=a117_0x2961;return join(cacheRoot(),_0x50a8b9(0x187),_0x50a8b9(0x17c));}function a117_0x3ce0(){const _0x9c4419=['number','/dist-tags','match','lastNotifiedAt','patch','252568DVchHB','2689496VSFzPX','timeout','map','yes','entries','utf8','toLowerCase','checkedAt',',\x20run:\x20','parse','now','object','major','filter','1394354MixqCt','221514PkTzqw','\x20update','prerelease','460460WdcDtp','update-check.json','fromEntries','14QpNrEn','8636008plBjAs','526380PBSDxc','https://www.npmjs.com/package/','latest','true','lastNotifiedVersion','trim','string','lovrabet-cli'];a117_0x3ce0=function(){return _0x9c4419;};return a117_0x3ce0();}async function readUpdateNoticeCache(){const _0x569558=a117_0x2961;try{const _0x4dcff9=await readFile(getUpdateNoticeCachePath(),_0x569558(0x193)),_0x3dca72=JSON[_0x569558(0x197)](_0x4dcff9);if(!_0x3dca72||typeof _0x3dca72!=='object')return{};return _0x3dca72;}catch{return{};}}async function writeUpdateNoticeCache(_0x983254){try{const _0x3add58=getUpdateNoticeCachePath();await mkdir(dirname(_0x3add58),{'recursive':!![]}),await writeFile(_0x3add58,JSON['stringify'](_0x983254,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x19c60b,_0x2b6429){const _0x33dda5=a117_0x2961;return typeof _0x19c60b[_0x33dda5(0x195)]===_0x33dda5(0x188)&&_0x2b6429-_0x19c60b[_0x33dda5(0x195)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x531883,_0x216e33,_0x1ef805){const _0x6225d7=a117_0x2961;return _0x531883[_0x6225d7(0x184)]===_0x216e33&&typeof _0x531883[_0x6225d7(0x18b)]===_0x6225d7(0x188)&&_0x1ef805-_0x531883[_0x6225d7(0x18b)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x2bf298=0x5dc){const _0x5569d0=a117_0x2961;try{const _0x27af26=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x5569d0(0x189),_0x11d9da=await fetch(_0x27af26,{'signal':AbortSignal[_0x5569d0(0x18f)](_0x2bf298)});if(!_0x11d9da['ok'])return null;const _0x1f57ba=await _0x11d9da['json']();if(!_0x1f57ba||typeof _0x1f57ba!==_0x5569d0(0x199))return null;return Object[_0x5569d0(0x17d)](Object[_0x5569d0(0x192)](_0x1f57ba)[_0x5569d0(0x176)](([,_0x33c1b7])=>typeof _0x33c1b7===_0x5569d0(0x186)&&_0x33c1b7[_0x5569d0(0x185)]())[_0x5569d0(0x190)](([_0x4168df,_0x1f1d37])=>[_0x4168df,String(_0x1f1d37)[_0x5569d0(0x185)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x87565f){const _0x2a4e5e=a117_0x2961;return _0x2a4e5e(0x181)+LOVRABET_NPM_PACKAGE_NAME+'/v/'+_0x87565f;}export async function resolveLatestUpdateNotice(){const _0x878a66=a117_0x2961;if(isUpdateNoticeDisabled())return null;try{const _0x1eaeee=Date[_0x878a66(0x198)](),_0x52355a=getCliVersion(),_0x15c6fd=await readUpdateNoticeCache();let _0x26ebd1=isFreshCheck(_0x15c6fd,_0x1eaeee)?_0x15c6fd[_0x878a66(0x182)]?.[_0x878a66(0x185)]():undefined;if(!_0x26ebd1&&!isFreshCheck(_0x15c6fd,_0x1eaeee)){const _0x4ee704=await fetchNpmDistTags();_0x26ebd1=_0x4ee704?.[_0x878a66(0x182)]?.[_0x878a66(0x185)](),await writeUpdateNoticeCache({..._0x15c6fd,'checkedAt':_0x1eaeee,'latest':_0x26ebd1,'failed':!_0x26ebd1});}if(!_0x26ebd1||compareSemver(_0x52355a,_0x26ebd1)>=0x0)return null;if(isRecentlyNotified(_0x15c6fd,_0x26ebd1,_0x1eaeee))return null;const _0x260e85=CLI_BIN_NAME+_0x878a66(0x179);return await writeUpdateNoticeCache({..._0x15c6fd,'checkedAt':isFreshCheck(_0x15c6fd,_0x1eaeee)?_0x15c6fd[_0x878a66(0x195)]:_0x1eaeee,'latest':_0x26ebd1,'failed':![],'lastNotifiedVersion':_0x26ebd1,'lastNotifiedAt':_0x1eaeee}),{'command':_0x260e85,'current':_0x52355a,'latest':_0x26ebd1,'url':buildNpmVersionUrl(_0x26ebd1),'message':CLI_BIN_NAME+'\x20'+_0x26ebd1+'\x20available,\x20current\x20'+_0x52355a+_0x878a66(0x196)+_0x260e85};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f55af,_0x2bbc86){const _0x3ebff4=a118_0x1aa1,_0x511c79=_0x4f55af();while(!![]){try{const _0x1d4788=parseInt(_0x3ebff4(0x110))/0x1*(-parseInt(_0x3ebff4(0x107))/0x2)+parseInt(_0x3ebff4(0x104))/0x3+-parseInt(_0x3ebff4(0x109))/0x4+parseInt(_0x3ebff4(0x10d))/0x5*(parseInt(_0x3ebff4(0x10a))/0x6)+parseInt(_0x3ebff4(0x10b))/0x7*(-parseInt(_0x3ebff4(0x10e))/0x8)+parseInt(_0x3ebff4(0x106))/0x9*(parseInt(_0x3ebff4(0x10c))/0xa)+-parseInt(_0x3ebff4(0x108))/0xb*(-parseInt(_0x3ebff4(0x105))/0xc);if(_0x1d4788===_0x2bbc86)break;else _0x511c79['push'](_0x511c79['shift']());}catch(_0x16a497){_0x511c79['push'](_0x511c79['shift']());}}}(a118_0x35a9,0x9ea18));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';function a118_0x1aa1(_0x22d2d1,_0x49a006){_0x22d2d1=_0x22d2d1-0x104;const _0x35a9d5=a118_0x35a9();let _0x1aa11d=_0x35a9d5[_0x22d2d1];return _0x1aa11d;}export function getCliVersion(){return VERSION;}function a118_0x35a9(){const _0xb0414=['360360dJwcEE','15RVdXey','4360CObFIN','slice','1uPJhiB','1266744iXWbPr','1284108pWrATG','63yYskUQ','467252WJiqGt','88TNvhjM','1039820hUgzyE','168372ZxBagv','6055TDCcVA'];a118_0x35a9=function(){return _0xb0414;};return a118_0x35a9();}export function getCliGitCommit(){const _0x40246c=String(GIT_COMMIT);return _0x40246c&&_0x40246c!=='unknown'?_0x40246c:'';}export function getCliVersionDisplay(){const _0x343be2=a118_0x1aa1,_0x3be5dd=getCliGitCommit(),_0xfe8c9=BUILD_TIME[_0x343be2(0x10f)](0x0,0xa);if(!_0x3be5dd||!_0xfe8c9)return VERSION;return VERSION+'\x20('+_0x3be5dd+',\x20'+_0xfe8c9+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b99e6,_0x485bf4){var _0x1685e3=a119_0x1c73,_0x38d403=_0x1b99e6();while(!![]){try{var _0x27d436=parseInt(_0x1685e3(0x155))/0x1*(parseInt(_0x1685e3(0x14f))/0x2)+parseInt(_0x1685e3(0x156))/0x3*(parseInt(_0x1685e3(0x150))/0x4)+-parseInt(_0x1685e3(0x159))/0x5+parseInt(_0x1685e3(0x14c))/0x6+-parseInt(_0x1685e3(0x158))/0x7*(parseInt(_0x1685e3(0x152))/0x8)+-parseInt(_0x1685e3(0x14d))/0x9*(-parseInt(_0x1685e3(0x154))/0xa)+-parseInt(_0x1685e3(0x153))/0xb*(parseInt(_0x1685e3(0x151))/0xc);if(_0x27d436===_0x485bf4)break;else _0x38d403['push'](_0x38d403['shift']());}catch(_0x4c30b8){_0x38d403['push'](_0x38d403['shift']());}}}(a119_0xe04f,0xdcbfa));function a119_0x1c73(_0x4c83e5,_0x49d232){_0x4c83e5=_0x4c83e5-0x14c;var _0xe04f26=a119_0xe04f();var _0x1c737a=_0xe04f26[_0x4c83e5];return _0x1c737a;}export function writeCliSideChannelLine(_0x107fb6){var _0x3a59b1=a119_0x1c73;process[_0x3a59b1(0x157)][_0x3a59b1(0x14e)](_0x107fb6+'\x0a');}function a119_0xe04f(){var _0x2d9e6c=['stderr','397355CrktrL','1004815lSxONi','2108514iyUILy','1376595daLBtX','write','745222tduhLZ','4199444lgQygV','12msvCUA','16qwyIWu','24614887DUqiMc','110OJMUFO','1uBSTUD','3dHzRnw'];a119_0xe04f=function(){return _0x2d9e6c;};return a119_0xe04f();}
|