@lovrabet/lovrabet-cli 2.1.3 → 2.1.4
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/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/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -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/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x275381=a93_0x5584;(function(_0x3f2884,_0x1aa04f){const _0x2f9253=a93_0x5584,_0x282349=_0x3f2884();while(!![]){try{const _0xe2e1a3=-parseInt(_0x2f9253(0x16c))/0x1*(parseInt(_0x2f9253(0x165))/0x2)+-parseInt(_0x2f9253(0x16b))/0x3*(parseInt(_0x2f9253(0x16e))/0x4)+-parseInt(_0x2f9253(0x15f))/0x5*(parseInt(_0x2f9253(0x171))/0x6)+parseInt(_0x2f9253(0x16a))/0x7*(parseInt(_0x2f9253(0x160))/0x8)+-parseInt(_0x2f9253(0x161))/0x9*(-parseInt(_0x2f9253(0x169))/0xa)+-parseInt(_0x2f9253(0x170))/0xb+parseInt(_0x2f9253(0x172))/0xc;if(_0xe2e1a3===_0x1aa04f)break;else _0x282349['push'](_0x282349['shift']());}catch(_0x961e54){_0x282349['push'](_0x282349['shift']());}}}(a93_0x142f,0x6e64c));import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';function a93_0x5584(_0x46ef1a,_0x5693d3){_0x46ef1a=_0x46ef1a-0x159;const _0x142fad=a93_0x142f();let _0x55848b=_0x142fad[_0x46ef1a];return _0x55848b;}export function resolveSkillSyncPaths(_0x2f848c={}){const _0x40a2e5=a93_0x5584,_0x27dfb7=_0x2f848c[_0x40a2e5(0x16d)]??homedir(),_0x3b6994=resolve(_0x27dfb7,PRODUCT_CONFIG['homeDirName'],'cache'),_0x46d202=trimmedEnv(_0x40a2e5(0x166)),_0x20d935=trimmedEnv('CLAUDE_SKILL_ROOT');return{'homeDir':_0x27dfb7,'cacheRoot':_0x3b6994,'managedRoot':resolve(_0x27dfb7,PRODUCT_CONFIG[_0x40a2e5(0x159)]),'agentsSkillsDir':_0x2f848c[_0x40a2e5(0x15c)]??_0x46d202??resolve(_0x27dfb7,'.agents',_0x40a2e5(0x15e)),'claudeSkillsDir':_0x2f848c[_0x40a2e5(0x16f)]??_0x20d935??resolve(_0x27dfb7,_0x40a2e5(0x163),_0x40a2e5(0x15e))};}export function getRuntimeSkillCacheRoot(_0x46d3bc,_0x515932,_0x5c3bfa={}){const _0x156d2d=a93_0x5584,_0x1fe578=resolveSkillSyncPaths(_0x5c3bfa);return resolve(_0x1fe578[_0x156d2d(0x15a)],_0x46d3bc,fingerprintAccessKey(_0x515932),_0x156d2d(0x15e));}export function getRuntimeSkillDir(_0x4523e1,_0xd53084,_0x2d06e0,_0x47a191,_0x63a93d,_0x24aa97={}){const _0xf1b27c=a93_0x5584;return resolve(getRuntimeSkillCacheRoot(_0x4523e1,_0xd53084,_0x24aa97),safePathSegment(_0x2d06e0,_0xf1b27c(0x15b)),_0x47a191,safePathSegment(_0x63a93d,'skillCode'));}export function safePathSegment(_0x5b8d2f,_0x12e306=a93_0x275381(0x168)){const _0x259638=a93_0x275381;if(!_0x5b8d2f||_0x5b8d2f[_0x259638(0x15d)]('/')||_0x5b8d2f[_0x259638(0x15d)]('\x5c')||_0x5b8d2f[_0x259638(0x15d)]('..'))throw CliErrors[_0x259638(0x162)]('Unsafe\x20'+_0x12e306+_0x259638(0x164)+_0x5b8d2f);return _0x5b8d2f;}function trimmedEnv(_0x1da448){const _0x4bb764=a93_0x275381,_0x419480=productEnv(_0x1da448)?.[_0x4bb764(0x167)]();return _0x419480?_0x419480:undefined;}function a93_0x142f(){const _0x1c79cd=['cacheRoot','appCode','agentsSkillsDir','includes','skills','25RLwYDX','168FQAJQe','981EDNGzF','validation','.claude','\x20for\x20local\x20path:\x20','92MIRKRY','SKILL_ROOT','trim','path\x20segment','57970zUMDtL','107177hluYiU','3YvXePC','13564ktSsTl','homeDir','965988UXxfSE','claudeSkillsDir','323829dqrxuA','540534nliSGK','10129116MGAevy','homeDirName'];a93_0x142f=function(){return _0x1c79cd;};return a93_0x142f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x564b47,_0x3dabcb){const _0x98fc0c=a94_0x4e96,_0x410598=_0x564b47();while(!![]){try{const _0xec1363=parseInt(_0x98fc0c(0xb9))/0x1+-parseInt(_0x98fc0c(0xb1))/0x2+parseInt(_0x98fc0c(0xca))/0x3*(parseInt(_0x98fc0c(0xaf))/0x4)+parseInt(_0x98fc0c(0xae))/0x5*(parseInt(_0x98fc0c(0xb4))/0x6)+-parseInt(_0x98fc0c(0xaa))/0x7*(-parseInt(_0x98fc0c(0xa9))/0x8)+-parseInt(_0x98fc0c(0xc6))/0x9*(parseInt(_0x98fc0c(0xb8))/0xa)+parseInt(_0x98fc0c(0xc5))/0xb;if(_0xec1363===_0x3dabcb)break;else _0x410598['push'](_0x410598['shift']());}catch(_0x1137fe){_0x410598['push'](_0x410598['shift']());}}}(a94_0x5b0e,0x4b346));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{CliErrors}from'../../errors.js';function a94_0x4e96(_0x2ffa27,_0x557c52){_0x2ffa27=_0x2ffa27-0xa5;const _0x5b0e99=a94_0x5b0e();let _0x4e961d=_0x5b0e99[_0x2ffa27];return _0x4e961d;}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';function a94_0x5b0e(){const _0x39eb7a=['sourceSessionId','Skill\x20metadata\x20appCode\x20\x22','description','4699893rHOzlj','185706abodBr','\x20or\x20directory\x20name.','packageBase64','filter','153JLOJws','appCode','\x20has\x20scope=\x22','isFile','slice','1765528mTVjcs','7DKPPyw','files','path','startsWith','1130lbdadf','2960TMmMii','find','699174BbdJSk','isSymbolicLink','manifest','2526uGWLyP','validation','personal','scope','100wxnhxv','83125fOVPbq','Missing\x20','skillName','utf8','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','pushedAt','Skill\x20directory\x20not\x20found:\x20','content','isDirectory'];a94_0x5b0e=function(){return _0x39eb7a;};return a94_0x5b0e();}export function readPushDirectory(_0x31810c,_0x176534){const _0x524122=a94_0x4e96,_0x5b29bf=resolvePushDirectoryRoot(_0x31810c),_0x1eab0a=resolve(_0x5b29bf,SKILL_FILE);if(!existsSync(_0x1eab0a)||!lstatSync(_0x1eab0a)[_0x524122(0xa7)]())throw CliErrors['validation'](_0x524122(0xba)+SKILL_FILE+':\x20'+_0x1eab0a);const _0x17d1b5=readMetadataIfPresent(resolve(_0x5b29bf,METADATA_FILE));if(_0x17d1b5?.[_0x524122(0xb7)]&&_0x17d1b5[_0x524122(0xb7)]!=='personal')throw CliErrors[_0x524122(0xb5)](_0x524122(0xbd)+METADATA_FILE+_0x524122(0xa6)+_0x17d1b5[_0x524122(0xb7)]+'\x22.');if(_0x17d1b5?.[_0x524122(0xa5)]&&_0x17d1b5[_0x524122(0xa5)]!==_0x176534)throw CliErrors[_0x524122(0xb5)](_0x524122(0xc3)+_0x17d1b5[_0x524122(0xa5)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x176534+'\x22.');const _0xf41075=scanSkillDirectory(_0x5b29bf),_0x1715bc=buildSkillPackage(_0xf41075),_0x487752=readFileSync(_0x1eab0a,_0x524122(0xbc)),_0x595b87=_0x17d1b5?.['skillCode']??deriveSkillCodeFromDirectory(_0x5b29bf,_0x176534);if(!_0x595b87)throw CliErrors[_0x524122(0xb5)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+METADATA_FILE+_0x524122(0xc7));return{'skillCode':_0x595b87,'metadata':_0x17d1b5,'input':{'skillCode':_0x595b87,'skillName':_0x17d1b5?.[_0x524122(0xbb)],'description':_0x17d1b5?.[_0x524122(0xc4)],'content':_0x487752,'files':_0x1715bc[_0x524122(0xb3)],'packageBase64':_0x1715bc[_0x524122(0xc8)],'tags':_0x17d1b5?.['tags'],'version':_0x17d1b5?.['version'],'sourceSessionId':_0x17d1b5?.[_0x524122(0xc2)]}};}export function recordPushedRuntimeSkill(_0x2c2454,_0x30f739,_0x2df8bf,_0x2121e6={}){const _0x1720da=a94_0x4e96,_0x530926=resolvePushDirectoryRoot(_0x2c2454),_0xb5193f=scanSkillDirectory(_0x530926),_0x2bbda5=_0xb5193f[_0x1720da(0xb0)](_0x2342b9=>_0x2342b9[_0x1720da(0xac)]===SKILL_FILE),_0x57baab=_0x2bbda5?fileText(_0x2bbda5):'',_0x45cc3a=tryNormalizePackageManifest(_0x30f739['files']),_0x487d2c={..._0x30f739,'content':_0x30f739[_0x1720da(0xc0)]??_0x57baab,'files':_0x45cc3a},_0x3507fc=_0x45cc3a?normalizeLocalFiles(_0xb5193f)[_0x1720da(0xc9)](_0x3a43e7=>_0x45cc3a[_0x1720da(0xab)]['some'](_0x51e89a=>_0x51e89a[_0x1720da(0xac)]===_0x3a43e7[_0x1720da(0xac)])):undefined,_0x34f9b5=buildMetadata(_0x487d2c,_0x2121e6[_0x1720da(0xb7)]??_0x1720da(0xb6),_0x2df8bf,contentHash(_0x487d2c['content']??''),_0x2121e6[_0x1720da(0xbe)],_0x3507fc);writeJsonAtomic(resolve(_0x530926,METADATA_FILE),_0x34f9b5);}export function deriveSkillCodeFromDirectory(_0x35d07d,_0x4306fe){const _0x27e487=a94_0x4e96,_0x3d09e0=basename(resolve(_0x35d07d)),_0x50b35d=_0x4306fe+'--';return _0x3d09e0[_0x27e487(0xad)](_0x50b35d)?_0x3d09e0[_0x27e487(0xa8)](_0x50b35d['length']):_0x3d09e0;}function resolvePushDirectoryRoot(_0x257fc4){const _0x4d5fbd=a94_0x4e96,_0x289dfc=resolve(_0x257fc4);if(!existsSync(_0x289dfc))throw CliErrors['validation'](_0x4d5fbd(0xbf)+_0x257fc4);const _0x28aa84=lstatSync(_0x289dfc);if(_0x28aa84[_0x4d5fbd(0xc1)]())return _0x289dfc;if(_0x28aa84[_0x4d5fbd(0xb2)]()){const _0x253c00=realpathSync(_0x289dfc);if(lstatSync(_0x253c00)[_0x4d5fbd(0xc1)]())return _0x253c00;}throw CliErrors[_0x4d5fbd(0xb5)](_0x4d5fbd(0xbf)+_0x257fc4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a95_0x1c43(_0x29b4a1,_0xe1b0b0){_0x29b4a1=_0x29b4a1-0x1a0;const _0x40607d=a95_0x4060();let _0x1c4391=_0x40607d[_0x29b4a1];return _0x1c4391;}(function(_0x5a50ba,_0x29cf38){const _0x45524e=a95_0x1c43,_0x114d49=_0x5a50ba();while(!![]){try{const _0x27ffb1=-parseInt(_0x45524e(0x1ad))/0x1*(parseInt(_0x45524e(0x1a1))/0x2)+-parseInt(_0x45524e(0x1aa))/0x3+-parseInt(_0x45524e(0x1a2))/0x4*(parseInt(_0x45524e(0x1b0))/0x5)+parseInt(_0x45524e(0x1af))/0x6*(parseInt(_0x45524e(0x1b2))/0x7)+-parseInt(_0x45524e(0x1a0))/0x8*(-parseInt(_0x45524e(0x1a4))/0x9)+-parseInt(_0x45524e(0x1b1))/0xa*(-parseInt(_0x45524e(0x1a7))/0xb)+parseInt(_0x45524e(0x1ae))/0xc*(parseInt(_0x45524e(0x1ab))/0xd);if(_0x27ffb1===_0x29cf38)break;else _0x114d49['push'](_0x114d49['shift']());}catch(_0x5387c9){_0x114d49['push'](_0x114d49['shift']());}}}(a95_0x4060,0x6df40));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x39337b){const _0x2b9dc5=a95_0x1c43,_0x15ac57=_0x39337b&&_0x39337b['length']>0x0?_0x39337b:[_0x2b9dc5(0x1a8),_0x2b9dc5(0x1ac),_0x2b9dc5(0x1a9)],_0x49b809=[];for(const _0x386611 of _0x15ac57){if(!isRuntimeSkillScope(_0x386611))throw CliErrors[_0x2b9dc5(0x1a3)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x386611);!_0x49b809[_0x2b9dc5(0x1a5)](_0x386611)&&_0x49b809[_0x2b9dc5(0x1a6)](_0x386611);}return _0x49b809;}function a95_0x4060(){const _0x253131=['company','405017kBtXad','7348200ohndlL','6sokCsm','35dSSnUw','10GaYZdL','5348714cJVDzF','2568qbFRqN','4pmAeHs','341416eAMMhC','validation','25083iTusnv','includes','push','57530JVdrBK','personal','builtin','1255287vCtHXa','13rCtuiD'];a95_0x4060=function(){return _0x253131;};return a95_0x4060();}export function isRuntimeSkillScope(_0x2f5c40){const _0x53227b=a95_0x1c43;return _0x2f5c40==='personal'||_0x2f5c40===_0x53227b(0x1ac)||_0x2f5c40===_0x53227b(0x1a9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a97_0x27f9(_0x27d66a,_0x2901b7){_0x27d66a=_0x27d66a-0xe4;const _0x47c203=a97_0x47c2();let _0x27f940=_0x47c203[_0x27d66a];return _0x27f940;}const a97_0x3c266b=a97_0x27f9;(function(_0x2b1123,_0x3f1781){const _0x402e8d=a97_0x27f9,_0x3aac81=_0x2b1123();while(!![]){try{const _0x46de0f=parseInt(_0x402e8d(0xee))/0x1*(parseInt(_0x402e8d(0xf2))/0x2)+parseInt(_0x402e8d(0xe6))/0x3+parseInt(_0x402e8d(0xf4))/0x4+-parseInt(_0x402e8d(0xeb))/0x5+parseInt(_0x402e8d(0xfc))/0x6*(parseInt(_0x402e8d(0xe8))/0x7)+parseInt(_0x402e8d(0xe4))/0x8+-parseInt(_0x402e8d(0xf8))/0x9;if(_0x46de0f===_0x3f1781)break;else _0x3aac81['push'](_0x3aac81['shift']());}catch(_0x702e){_0x3aac81['push'](_0x3aac81['shift']());}}}(a97_0x47c2,0x540bd));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{MAX_SKILL_FILE_BYTES,MAX_SKILL_FILE_COUNT,MAX_SKILL_PACKAGE_BYTES,MAX_SKILL_TOTAL_BYTES}from'./constants.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a97_0x3c266b(0xf1));export function createDeterministicZipPackage(_0x1e43bf){const _0x2778cf=a97_0x3c266b,_0x50bf99={};for(const _0x4bf0ce of normalizeLocalFiles(_0x1e43bf)){_0x50bf99[_0x4bf0ce[_0x2778cf(0xfd)]]=fileContent(_0x4bf0ce);}const _0x5447ea=Buffer['from'](zipSync(_0x50bf99,{'level':0x0,'mtime':ZIP_MTIME}));if(_0x5447ea[_0x2778cf(0xe9)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x2778cf(0xea)](_0x2778cf(0xf9));return _0x5447ea;}export function parseZipPackage(_0x438648){const _0x262d05=a97_0x3c266b;if(_0x438648['length']<0x16)throw CliErrors[_0x262d05(0xea)](_0x262d05(0xe5));if(_0x438648['length']>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation'](_0x262d05(0xf7));let _0x560116=0x0,_0x379621=0x0,_0x24c28b;try{_0x24c28b=unzipSync(_0x438648,{'filter'(_0x3edabd){const _0x557ddc=_0x262d05,_0x25a3d3=normalizeSkillRelativePath(_0x3edabd['name']);if(_0x25a3d3[_0x557ddc(0xec)]('/'))throw CliErrors[_0x557ddc(0xea)](_0x557ddc(0xff)+_0x25a3d3);if(_0x3edabd[_0x557ddc(0xed)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x557ddc(0xea)](_0x557ddc(0xf3)+_0x25a3d3);_0x560116+=0x1;if(_0x560116>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x557ddc(0xea)](_0x557ddc(0xf5));_0x379621+=_0x3edabd[_0x557ddc(0xed)];if(_0x379621>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x557ddc(0xea)](_0x557ddc(0xf6));return!![];}});}catch(_0x45002d){if(isRuntimeSkillValidationError(_0x45002d))throw _0x45002d;throw CliErrors[_0x262d05(0xea)](_0x262d05(0xe5));}return Object['entries'](_0x24c28b)[_0x262d05(0xfe)](([_0x173891,_0x5920c0])=>({'path':normalizeSkillRelativePath(_0x173891),'bytes':Buffer[_0x262d05(0xfb)](_0x5920c0)}))[_0x262d05(0xf0)](compareSkillFiles);}function a97_0x47c2(){const _0x488e93=['Runtime\x20Skill\x20package\x20exceeds\x20total\x20file\x20size\x20limit.','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','5554890KkBAmY','Skill\x20package\x20exceeds\x20size\x20limit.','object','from','54lYIkqY','path','map','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','1302728lLdgDN','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','536631aPZubv','code','188783qbTAOQ','length','validation','998040VOYXLd','endsWith','originalSize','3zSmsRG','validation_error','sort','1980-01-01T00:00:00.000Z','222598uqWYyw','Runtime\x20Skill\x20package\x20file\x20exceeds\x20size\x20limit:\x20','970940LIeLkr','Runtime\x20Skill\x20package\x20exceeds\x20file\x20count\x20limit.'];a97_0x47c2=function(){return _0x488e93;};return a97_0x47c2();}function isRuntimeSkillValidationError(_0x546bb7){const _0x119025=a97_0x3c266b;return typeof _0x546bb7===_0x119025(0xfa)&&_0x546bb7!==null&&'code'in _0x546bb7&&_0x546bb7[_0x119025(0xe7)]===_0x119025(0xef);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b7aa5,_0x5c5cc0){const _0x3526cb=a98_0x4830,_0x279393=_0x5b7aa5();while(!![]){try{const _0x15680c=-parseInt(_0x3526cb(0x198))/0x1+parseInt(_0x3526cb(0x192))/0x2+-parseInt(_0x3526cb(0x18a))/0x3*(parseInt(_0x3526cb(0x1a3))/0x4)+parseInt(_0x3526cb(0x19a))/0x5*(-parseInt(_0x3526cb(0x18f))/0x6)+-parseInt(_0x3526cb(0x17b))/0x7+parseInt(_0x3526cb(0x1a4))/0x8*(parseInt(_0x3526cb(0x183))/0x9)+-parseInt(_0x3526cb(0x19b))/0xa*(-parseInt(_0x3526cb(0x17e))/0xb);if(_0x15680c===_0x5c5cc0)break;else _0x279393['push'](_0x279393['shift']());}catch(_0x2f3318){_0x279393['push'](_0x279393['shift']());}}}(a98_0xd710,0xbcebe));import{CliErrors}from'../../errors.js';import{MAX_SKILL_PACKAGE_BYTES,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(_0xefeb1a){const _0x4a0e5c=a98_0x4830,_0x5514a8=normalizeLocalFiles(_0xefeb1a);if(!_0x5514a8['some'](_0x41f3de=>_0x41f3de[_0x4a0e5c(0x1a2)]===SKILL_FILE))throw CliErrors[_0x4a0e5c(0x191)]('Missing\x20'+SKILL_FILE+_0x4a0e5c(0x194));const _0xa40e28=localFilesToManifestFiles(_0x5514a8),_0x313ae1=createDeterministicZipPackage(_0x5514a8);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0xa40e28),'zipSha256':bufferSha256(_0x313ae1),'zipSize':_0x313ae1[_0x4a0e5c(0x185)],'files':_0xa40e28},'packageBytes':_0x313ae1,'packageBase64':_0x313ae1[_0x4a0e5c(0x196)]('base64')};}export function verifyRuntimeSkillPackage(_0x21b1c1,_0x121279){const _0x2f6fc0=a98_0x4830,_0x5e5887=normalizePackageManifest(_0x21b1c1,{'requireOssPath':![]});if(!_0x5e5887)throw CliErrors[_0x2f6fc0(0x191)](_0x2f6fc0(0x186));return extractAndVerifyPackage(_0x5e5887,_0x121279);}export function verifyRuntimeSkillBundle(_0x49a0d7,_0x27ed2e){const _0x3f27bd=a98_0x4830,_0x572853=normalizePackageManifest(_0x49a0d7,{'requireOssPath':![]});if(!_0x572853)throw CliErrors[_0x3f27bd(0x191)](_0x3f27bd(0x186));if(_0x27ed2e[_0x3f27bd(0x185)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x3f27bd(0x191)](_0x3f27bd(0x1a5));return extractAndVerifyPackageFiles(_0x572853,_0x27ed2e);}function a98_0x4830(_0x4564e7,_0x25a138){_0x4564e7=_0x4564e7-0x17b;const _0xd71051=a98_0xd710();let _0x48307a=_0xd71051[_0x4564e7];return _0x48307a;}function a98_0xd710(){const _0x5724bf=['bytes','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','toLowerCase','size','path','4RQqzUn','5125544pcdbTG','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','isArray','schemaVersion','6502734ESdqul','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','treeSha256','11tTdoxz','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','object','has','zipSize','9BTsNHp','sha256','length','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','files','ossPath','1855866xWMJwG','some','isSafeInteger','trim','Duplicate\x20Skill\x20package\x20entry:\x20','24ZbWAGK','map','validation','2135974xdlCPU','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','\x20in\x20Skill\x20file\x20package.','zipSha256','toString','string','367261CBObhl','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','1314605VPTkPm','20316710EkcRnz','Runtime\x20Skill\x20package\x20size\x20mismatch.','set'];a98_0xd710=function(){return _0x5724bf;};return a98_0xd710();}export function tryNormalizePackageManifest(_0x570977){return normalizePackageManifest(_0x570977,{'requireOssPath':![]});}export function requirePackageBytes(_0x27183b,_0x30d35d){const _0x1af53e=a98_0x4830;if(!_0x30d35d||_0x30d35d[_0x1af53e(0x185)]===0x0)throw CliErrors[_0x1af53e(0x191)]('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x27183b);if(_0x30d35d[_0x1af53e(0x185)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x1af53e(0x191)]('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit:\x20'+_0x27183b);return _0x30d35d;}export function extractDownloadedPackage(_0x150dfc){const _0x1de453=a98_0x4830,_0x480e1c=parseZipPackage(_0x150dfc)['map'](_0xcc4987=>({'path':_0xcc4987[_0x1de453(0x1a2)],'bytes':_0xcc4987[_0x1de453(0x19e)]}));if(!_0x480e1c['some'](_0x298d9d=>_0x298d9d[_0x1de453(0x1a2)]===SKILL_FILE))throw CliErrors[_0x1de453(0x191)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x480e1c);}export function localFilesToManifestFiles(_0x1cb412){const _0x4bbb85=a98_0x4830;return normalizeLocalFiles(_0x1cb412)[_0x4bbb85(0x190)](_0x4ad218=>({'path':_0x4ad218[_0x4bbb85(0x1a2)],'sha256':fileHash(_0x4ad218),'size':fileContent(_0x4ad218)[_0x4bbb85(0x185)]}));}function normalizePackageManifest(_0x458aab,_0x77d0e7){const _0x423c1b=a98_0x4830;if(!_0x458aab||typeof _0x458aab!==_0x423c1b(0x180)||Array[_0x423c1b(0x1a6)](_0x458aab))return undefined;const _0x512d18=_0x458aab,_0x476773=typeof _0x512d18[_0x423c1b(0x189)]===_0x423c1b(0x197)?_0x512d18[_0x423c1b(0x189)][_0x423c1b(0x18d)]():undefined;if(_0x77d0e7['requireOssPath']&&!_0x476773)return undefined;if(!Array[_0x423c1b(0x1a6)](_0x512d18[_0x423c1b(0x188)])||_0x512d18['files'][_0x423c1b(0x185)]===0x0)return undefined;if(!isSha256Hex(_0x512d18[_0x423c1b(0x17d)]))throw CliErrors[_0x423c1b(0x191)](_0x423c1b(0x19f));if(!isSha256Hex(_0x512d18[_0x423c1b(0x195)]))throw CliErrors[_0x423c1b(0x191)](_0x423c1b(0x193));if(!Number[_0x423c1b(0x18c)](_0x512d18[_0x423c1b(0x182)])||_0x512d18[_0x423c1b(0x182)]<0x0)throw CliErrors['validation'](_0x423c1b(0x17f));if(_0x512d18[_0x423c1b(0x182)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x423c1b(0x191)]('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.');const _0xc1cb9c=normalizeManifestFiles(_0x512d18[_0x423c1b(0x188)]);if(!_0xc1cb9c[_0x423c1b(0x18b)](_0x26392a=>_0x26392a[_0x423c1b(0x1a2)]===SKILL_FILE))throw CliErrors['validation']('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x24e02e=fileTreeHash(_0xc1cb9c);if(_0x24e02e!==_0x512d18[_0x423c1b(0x17d)][_0x423c1b(0x1a0)]())throw CliErrors[_0x423c1b(0x191)](_0x423c1b(0x187));return{'schemaVersion':Number[_0x423c1b(0x18c)](_0x512d18[_0x423c1b(0x1a7)])?_0x512d18[_0x423c1b(0x1a7)]:0x2,'ossPath':_0x476773,'treeSha256':_0x24e02e,'zipSha256':_0x512d18[_0x423c1b(0x195)]['toLowerCase'](),'zipSize':_0x512d18[_0x423c1b(0x182)],'files':_0xc1cb9c};}function extractAndVerifyPackage(_0x55edbe,_0x58cf59){const _0x531eac=a98_0x4830,_0x242054=normalizePackageManifest(_0x55edbe,{'requireOssPath':![]});if(!_0x242054)throw CliErrors[_0x531eac(0x191)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x58cf59[_0x531eac(0x185)]!==_0x242054[_0x531eac(0x182)])throw CliErrors['validation'](_0x531eac(0x19c));const _0x40550d=bufferSha256(_0x58cf59);if(_0x40550d!==_0x242054['zipSha256'])throw CliErrors[_0x531eac(0x191)](_0x531eac(0x17c));return extractAndVerifyPackageFiles(_0x242054,_0x58cf59);}function extractAndVerifyPackageFiles(_0x3a0b7d,_0x48ac87){const _0x32daed=a98_0x4830,_0x217ed1=parseZipPackage(_0x48ac87);if(_0x217ed1['length']!==_0x3a0b7d[_0x32daed(0x188)][_0x32daed(0x185)])throw CliErrors[_0x32daed(0x191)](_0x32daed(0x199));const _0x5997d5=new Map();for(const _0x4487fd of _0x217ed1){if(_0x5997d5[_0x32daed(0x181)](_0x4487fd[_0x32daed(0x1a2)]))throw CliErrors['validation'](_0x32daed(0x18e)+_0x4487fd['path']);_0x5997d5[_0x32daed(0x19d)](_0x4487fd[_0x32daed(0x1a2)],_0x4487fd);}const _0x4174ed=[];for(const _0x4ac1e1 of _0x3a0b7d['files']){const _0x41348b=_0x5997d5['get'](_0x4ac1e1[_0x32daed(0x1a2)]);if(!_0x41348b)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x4ac1e1[_0x32daed(0x1a2)]);if(_0x41348b[_0x32daed(0x19e)][_0x32daed(0x185)]!==_0x4ac1e1[_0x32daed(0x1a1)])throw CliErrors[_0x32daed(0x191)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x4ac1e1[_0x32daed(0x1a2)]);const _0x3caa74=bufferSha256(_0x41348b['bytes']);if(_0x3caa74!==_0x4ac1e1[_0x32daed(0x184)])throw CliErrors[_0x32daed(0x191)]('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x4ac1e1[_0x32daed(0x1a2)]);_0x4174ed['push']({'path':_0x4ac1e1[_0x32daed(0x1a2)],'bytes':_0x41348b[_0x32daed(0x19e)]});}return normalizeLocalFiles(_0x4174ed);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x91b662,_0x276677){var _0x26a3c7=a99_0x3da7,_0x5c5e70=_0x91b662();while(!![]){try{var _0x55492e=-parseInt(_0x26a3c7(0x1ca))/0x1*(-parseInt(_0x26a3c7(0x1c9))/0x2)+-parseInt(_0x26a3c7(0x1cf))/0x3+-parseInt(_0x26a3c7(0x1cb))/0x4*(parseInt(_0x26a3c7(0x1cc))/0x5)+-parseInt(_0x26a3c7(0x1c7))/0x6+-parseInt(_0x26a3c7(0x1d0))/0x7*(-parseInt(_0x26a3c7(0x1ce))/0x8)+parseInt(_0x26a3c7(0x1c8))/0x9+parseInt(_0x26a3c7(0x1cd))/0xa;if(_0x55492e===_0x276677)break;else _0x5c5e70['push'](_0x5c5e70['shift']());}catch(_0x558b2b){_0x5c5e70['push'](_0x5c5e70['shift']());}}}(a99_0x1600,0x8ede7));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a99_0x1600(){var _0x9e2ef0=['60805xKvJDo','108660VmZTXV','8PYkNQM','2484774yHgrGQ','7571081aXcNzn','1913022FMpbFB','7645716oJiFHl','1258844juHKvR','1dQJDbd','276GuKhyP'];a99_0x1600=function(){return _0x9e2ef0;};return a99_0x1600();}export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';function a99_0x3da7(_0x46c2c9,_0xebae0c){_0x46c2c9=_0x46c2c9-0x1c7;var _0x160083=a99_0x1600();var _0x3da709=_0x160083[_0x46c2c9];return _0x3da709;}export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,recordPushedRuntimeSkill}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x127fff,_0x2abec6){const _0x40b3a0=a100_0xd84a,_0xcff11e=_0x127fff();while(!![]){try{const _0x50e389=-parseInt(_0x40b3a0(0x137))/0x1+-parseInt(_0x40b3a0(0x138))/0x2*(parseInt(_0x40b3a0(0x135))/0x3)+-parseInt(_0x40b3a0(0x13d))/0x4+-parseInt(_0x40b3a0(0x13b))/0x5*(parseInt(_0x40b3a0(0x13a))/0x6)+-parseInt(_0x40b3a0(0x139))/0x7*(-parseInt(_0x40b3a0(0x13f))/0x8)+parseInt(_0x40b3a0(0x13e))/0x9+-parseInt(_0x40b3a0(0x13c))/0xa*(-parseInt(_0x40b3a0(0x136))/0xb);if(_0x50e389===_0x2abec6)break;else _0xcff11e['push'](_0xcff11e['shift']());}catch(_0x2de93b){_0xcff11e['push'](_0xcff11e['shift']());}}}(a100_0x4751,0x48873));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a100_0xd84a(_0x2037ff,_0x359c29){_0x2037ff=_0x2037ff-0x135;const _0x475172=a100_0x4751();let _0xd84a35=_0x475172[_0x2037ff];return _0xd84a35;}function a100_0x4751(){const _0x34232b=['1376zQGaud','29823nVuBPP','53185HvTjvR','494124JOXHlT','10kCSEsD','18515DpYOIg','6TLdYcs','1296775jEhbyd','1450YfheMW','629460pHZyOA','914481gnuQpc'];a100_0x4751=function(){return _0x34232b;};return a100_0x4751();}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x119b78=a101_0x47ee;function a101_0x47ee(_0x49e459,_0x40fde8){_0x49e459=_0x49e459-0x1a0;const _0x235ce9=a101_0x235c();let _0x47eedb=_0x235ce9[_0x49e459];return _0x47eedb;}(function(_0x2c3968,_0x1cac7a){const _0x12b04a=a101_0x47ee,_0x1a55c2=_0x2c3968();while(!![]){try{const _0xc7faff=-parseInt(_0x12b04a(0x1c7))/0x1*(parseInt(_0x12b04a(0x1a7))/0x2)+-parseInt(_0x12b04a(0x1a0))/0x3*(-parseInt(_0x12b04a(0x1b6))/0x4)+parseInt(_0x12b04a(0x1b1))/0x5+parseInt(_0x12b04a(0x1ce))/0x6+parseInt(_0x12b04a(0x1a8))/0x7*(parseInt(_0x12b04a(0x1d0))/0x8)+-parseInt(_0x12b04a(0x1d6))/0x9*(parseInt(_0x12b04a(0x1af))/0xa)+parseInt(_0x12b04a(0x1b0))/0xb*(-parseInt(_0x12b04a(0x1a3))/0xc);if(_0xc7faff===_0x1cac7a)break;else _0x1a55c2['push'](_0x1a55c2['shift']());}catch(_0x158543){_0x1a55c2['push'](_0x1a55c2['shift']());}}}(a101_0x235c,0x8770e));import a101_0x12d558 from'winston';import a101_0x54a958 from'node:fs';import a101_0xa53d25 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];[a101_0x119b78(0x1b9)]='';[a101_0x119b78(0x1c4)]='';constructor(){}[a101_0x119b78(0x1b2)](_0x5dfef5){this['currentRawCommand']=_0x5dfef5;}[a101_0x119b78(0x1be)](_0xb4d496){const _0x112f6f=a101_0x119b78;this[_0x112f6f(0x1b9)]=a101_0xa53d25[_0x112f6f(0x1a9)](_0xb4d496,PRODUCT_CONFIG[_0x112f6f(0x1b7)]),this[_0x112f6f(0x1cc)]&&this[_0x112f6f(0x1cc)][_0x112f6f(0x1a2)](),this[_0x112f6f(0x1d2)]();}['initWinstonLogger'](){const _0x4c0a99=a101_0x119b78,_0x3465dd=a101_0xa53d25[_0x4c0a99(0x1d4)](this[_0x4c0a99(0x1b9)]);!a101_0x54a958[_0x4c0a99(0x1a5)](_0x3465dd)&&a101_0x54a958[_0x4c0a99(0x1d7)](_0x3465dd,{'recursive':!![]});const _0x2ecb1c=a101_0x12d558[_0x4c0a99(0x1d3)]['combine'](a101_0x12d558[_0x4c0a99(0x1d3)][_0x4c0a99(0x1ad)](),a101_0x12d558[_0x4c0a99(0x1d3)][_0x4c0a99(0x1bf)]({'stack':!![]}),a101_0x12d558[_0x4c0a99(0x1d3)]['printf'](_0x5e7461=>{const _0x5dcc25=_0x4c0a99,_0x2bca3e={'timestamp':_0x5e7461[_0x5dcc25(0x1ad)]||new Date()['toISOString'](),'level':_0x5e7461[_0x5dcc25(0x1d1)]||'info','command':_0x5e7461['command']||_0x5dcc25(0x1d5),'rawCommand':_0x5e7461['rawCommand']||this[_0x5dcc25(0x1c4)]||undefined,'message':_0x5e7461[_0x5dcc25(0x1aa)]||'','duration':_0x5e7461['duration']||undefined,'details':_0x5e7461[_0x5dcc25(0x1cb)]||undefined};return JSON[_0x5dcc25(0x1b4)](_0x2bca3e);}));this[_0x4c0a99(0x1cc)]=a101_0x12d558[_0x4c0a99(0x1ab)]({'level':_0x4c0a99(0x1bb),'format':_0x2ecb1c,'transports':[new a101_0x12d558[(_0x4c0a99(0x1c6))][(_0x4c0a99(0x1ac))]({'filename':this[_0x4c0a99(0x1b9)],'level':'info'})],'silent':![]}),a101_0x12d558[_0x4c0a99(0x1a6)]({'success':'green','error':_0x4c0a99(0x1c5),'warn':'yellow','info':'blue'});}[a101_0x119b78(0x1bb)](_0xf8f6c2,_0x302abc,_0x23da8e){const _0x68510=a101_0x119b78;if(!this[_0x68510(0x1b9)]||!this[_0x68510(0x1cc)])return;this['winstonLogger']['info'](_0x302abc,{'command':_0xf8f6c2,'details':_0x23da8e});}['success'](_0xd2cff2,_0x4823f6,_0x497d7d,_0x424780){const _0x34dd00=a101_0x119b78;if(!this[_0x34dd00(0x1b9)]||!this['winstonLogger'])return;this[_0x34dd00(0x1cc)][_0x34dd00(0x1cf)]('info',_0x4823f6,{'level':_0x34dd00(0x1b5),'command':_0xd2cff2,'duration':_0x497d7d,'details':_0x424780});}['error'](_0x2ddb9f,_0x4ca462,_0x111b86){const _0x232273=a101_0x119b78;if(!this[_0x232273(0x1b9)]||!this[_0x232273(0x1cc)])return;this[_0x232273(0x1cc)][_0x232273(0x1b3)](_0x4ca462,{'command':_0x2ddb9f,'details':_0x111b86});}['warn'](_0x2e1d43,_0x544d5e,_0x4b49e0){const _0x45b123=a101_0x119b78;if(!this[_0x45b123(0x1b9)]||!this[_0x45b123(0x1cc)])return;this[_0x45b123(0x1cc)][_0x45b123(0x1c2)](_0x544d5e,{'command':_0x2e1d43,'details':_0x4b49e0});}async[a101_0x119b78(0x1a1)](_0x29549f,_0x483ec3,_0x5a6c65){const _0x430581=a101_0x119b78,_0x2c3e80=Date[_0x430581(0x1ba)]();this[_0x430581(0x1bb)](_0x29549f,'Starting:\x20'+_0x483ec3);try{const _0x334b8e=await _0x5a6c65(),_0x31f407=Date['now']()-_0x2c3e80;return this['success'](_0x29549f,_0x430581(0x1a4)+_0x483ec3,_0x31f407),_0x334b8e;}catch(_0x1c1459){const _0x24e56b=Date[_0x430581(0x1ba)]()-_0x2c3e80;this[_0x430581(0x1b3)](_0x29549f,'Failed:\x20'+_0x483ec3,{'error':_0x1c1459 instanceof Error?_0x1c1459[_0x430581(0x1aa)]:String(_0x1c1459),'duration':_0x24e56b});throw _0x1c1459;}}[a101_0x119b78(0x1c8)](){const _0x55f205=a101_0x119b78;try{if(!a101_0x54a958['existsSync'](this[_0x55f205(0x1b9)]))return[];const _0x5d4da7=a101_0x54a958[_0x55f205(0x1c1)](this[_0x55f205(0x1b9)],_0x55f205(0x1c0));return _0x5d4da7[_0x55f205(0x1bd)](/\r?\n/)[_0x55f205(0x1cd)](_0x2972d2=>_0x2972d2[_0x55f205(0x1ae)]())[_0x55f205(0x1bc)](_0x66b5c3=>JSON[_0x55f205(0x1c3)](_0x66b5c3));}catch(_0x5e601f){return console['warn']('Failed\x20to\x20read\x20logs:',_0x5e601f),[];}}[a101_0x119b78(0x1b8)](){const _0x282656=a101_0x119b78;try{a101_0x54a958[_0x282656(0x1a5)](this[_0x282656(0x1b9)])&&a101_0x54a958['writeFileSync'](this['logFilePath'],'',_0x282656(0x1c0));}catch(_0x59a08f){console[_0x282656(0x1c2)](_0x282656(0x1ca),_0x59a08f);}}[a101_0x119b78(0x1c9)](){const _0x2e5388=a101_0x119b78;return this[_0x2e5388(0x1cc)];}}function a101_0x235c(){const _0x154a93=['timestamp','trim','70QXulUQ','2480236GnCPWU','2930765ONwMpM','setRawCommand','error','stringify','success','4oKHOdl','logFileName','clearLogs','logFilePath','now','info','map','split','setLogPath','errors','utf8','readFileSync','warn','parse','currentRawCommand','red','transports','2956tiFNIw','readLogs','getWinstonInstance','Failed\x20to\x20clear\x20logs:','details','winstonLogger','filter','6070392RosbwX','log','312cYAZun','level','initWinstonLogger','format','dirname','unknown','996606qyIBsF','mkdirSync','1836534xLVDQc','logTask','clear','24Vkrkqz','Completed:\x20','existsSync','addColors','582mMxMoL','77357jKOXfh','join','message','createLogger','File'];a101_0x235c=function(){return _0x154a93;};return a101_0x235c();}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a102_0x1c60(_0x262498,_0x5ef642){_0x262498=_0x262498-0x121;var _0x7cc609=a102_0x7cc6();var _0x1c606e=_0x7cc609[_0x262498];return _0x1c606e;}(function(_0x39f648,_0x4370bc){var _0x71b303=a102_0x1c60,_0x47fe06=_0x39f648();while(!![]){try{var _0x108571=parseInt(_0x71b303(0x12d))/0x1+parseInt(_0x71b303(0x125))/0x2*(-parseInt(_0x71b303(0x122))/0x3)+-parseInt(_0x71b303(0x121))/0x4+-parseInt(_0x71b303(0x12e))/0x5*(parseInt(_0x71b303(0x127))/0x6)+parseInt(_0x71b303(0x12a))/0x7+-parseInt(_0x71b303(0x12b))/0x8+parseInt(_0x71b303(0x126))/0x9;if(_0x108571===_0x4370bc)break;else _0x47fe06['push'](_0x47fe06['shift']());}catch(_0x4ce94f){_0x47fe06['push'](_0x47fe06['shift']());}}}(a102_0x7cc6,0xcd58f));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x36ce7e){var _0x3acff0=a102_0x1c60;if(!_0x36ce7e)return undefined;try{return JSON['parse'](_0x36ce7e);}catch{throw CliErrors[_0x3acff0(0x124)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x36ce7e);}}export function parseJsonParamsValue(_0x51c524){var _0x4c6eeb=a102_0x1c60;if(!_0x51c524)return undefined;try{return JSON['parse'](_0x51c524);}catch{throw CliErrors['validation'](_0x4c6eeb(0x129)+_0x51c524);}}export function parseBatchCreateItemsFromParams(_0x83b4b3){var _0x525415=a102_0x1c60;if(Array['isArray'](_0x83b4b3))return _0x83b4b3;if(_0x83b4b3!==null&&_0x83b4b3!==undefined&&typeof _0x83b4b3==='object'&&Array[_0x525415(0x128)](_0x83b4b3[_0x525415(0x123)]))return _0x83b4b3[_0x525415(0x123)];throw CliErrors['validation'](_0x525415(0x12c),'Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27');}function a102_0x7cc6(){var _0x1907d3=['6366126dgWlZa','isArray','Invalid\x20JSON\x20for\x20--params:\x20','1017338lWeWGV','1725288yOFLyl','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','1035419hXSORQ','5JJBlcp','5385432CiCJol','3nHatqT','items','validation','1910696CZJBwJ','29148642nUnovd'];a102_0x7cc6=function(){return _0x1907d3;};return a102_0x7cc6();}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a103_0x186b(){const _0x36bb2f=['54CuXlLY','4467654mxTVBP','platform','643568CppaDQ','285755qJDcCg','3BnYdZJ','win32','4149460fAUEYz','20dKqorm','338848CGknEs','.cmd','839412DQZjGW','2647468xLFkUM'];a103_0x186b=function(){return _0x36bb2f;};return a103_0x186b();}function a103_0x4196(_0x241567,_0x5808b0){_0x241567=_0x241567-0x12d;const _0x186b88=a103_0x186b();let _0x419691=_0x186b88[_0x241567];return _0x419691;}const a103_0x5a035b=a103_0x4196;(function(_0x37a09e,_0x56aa99){const _0x3528d6=a103_0x4196,_0x45eae6=_0x37a09e();while(!![]){try{const _0x1b32ca=parseInt(_0x3528d6(0x12e))/0x1+parseInt(_0x3528d6(0x130))/0x2+-parseInt(_0x3528d6(0x137))/0x3*(-parseInt(_0x3528d6(0x131))/0x4)+parseInt(_0x3528d6(0x136))/0x5*(-parseInt(_0x3528d6(0x132))/0x6)+parseInt(_0x3528d6(0x139))/0x7+-parseInt(_0x3528d6(0x135))/0x8+parseInt(_0x3528d6(0x133))/0x9*(-parseInt(_0x3528d6(0x12d))/0xa);if(_0x1b32ca===_0x56aa99)break;else _0x45eae6['push'](_0x45eae6['shift']());}catch(_0x133206){_0x45eae6['push'](_0x45eae6['shift']());}}}(a103_0x186b,0x67e70));export const isWindows=process[a103_0x5a035b(0x134)]===a103_0x5a035b(0x138);export function resolveNpmBin(_0x51db72){const _0x32d9e7=a103_0x5a035b;return isWindows?_0x51db72+_0x32d9e7(0x12f):_0x51db72;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a104_0x3274(){const _0x529405=['toLowerCase','lovrabet-cli','timeout','stringify','12fYHwgI','match','\x20available,\x20current\x20','object','3jVtWbT','621882ZXAKeV','filter','entries','yes','number','\x20update','10496WmzLpa','json','lastNotifiedVersion','25373740VBxkqF','latest','/-/package/','1930wJPsYY','map','3085074UMNOHq','minor','2208143nolKlw','checkedAt','2368857ZJNYAN','prerelease','update-check.json','/dist-tags','/v/','utf8','6821816MmtDwN','true','string','now','trim',',\x20run:\x20','patch','Invalid\x20semver','.cache'];a104_0x3274=function(){return _0x529405;};return a104_0x3274();}(function(_0x23110e,_0x18629b){const _0x55385a=a104_0x50d3,_0x2bff31=_0x23110e();while(!![]){try{const _0x5387a4=parseInt(_0x55385a(0xf3))/0x1*(parseInt(_0x55385a(0xf4))/0x2)+parseInt(_0x55385a(0x106))/0x3+-parseInt(_0x55385a(0xfa))/0x4*(-parseInt(_0x55385a(0x100))/0x5)+-parseInt(_0x55385a(0xef))/0x6*(parseInt(_0x55385a(0x104))/0x7)+parseInt(_0x55385a(0x10c))/0x8+parseInt(_0x55385a(0x102))/0x9+-parseInt(_0x55385a(0xfd))/0xa;if(_0x5387a4===_0x18629b)break;else _0x2bff31['push'](_0x2bff31['shift']());}catch(_0x3d646c){_0x2bff31['push'](_0x2bff31['shift']());}}}(a104_0x3274,0xba2b3));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x49ff15){const _0x414cfe=a104_0x50d3,_0x4c090a=_0x49ff15[_0x414cfe(0x110)]()[_0x414cfe(0xf0)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x4c090a)return null;return{'major':Number(_0x4c090a[0x1]),'minor':Number(_0x4c090a[0x2]),'patch':Number(_0x4c090a[0x3]),'prerelease':_0x4c090a[0x4]};}function compareSemver(_0x5abc5e,_0x310cbf){const _0x3fe2f3=a104_0x50d3,_0x5de651=parseSemver(_0x5abc5e),_0x24dd3d=parseSemver(_0x310cbf);if(!_0x5de651||!_0x24dd3d)throw new Error(_0x3fe2f3(0x113));for(const _0xa0ed40 of['major',_0x3fe2f3(0x103),_0x3fe2f3(0x112)]){if(_0x5de651[_0xa0ed40]<_0x24dd3d[_0xa0ed40])return-0x1;if(_0x5de651[_0xa0ed40]>_0x24dd3d[_0xa0ed40])return 0x1;}if(!_0x5de651[_0x3fe2f3(0x107)]&&!_0x24dd3d[_0x3fe2f3(0x107)])return 0x0;if(!_0x5de651[_0x3fe2f3(0x107)])return 0x1;if(!_0x24dd3d[_0x3fe2f3(0x107)])return-0x1;if(_0x5de651[_0x3fe2f3(0x107)]===_0x24dd3d[_0x3fe2f3(0x107)])return 0x0;return _0x5de651['prerelease']<_0x24dd3d['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x314c96=a104_0x50d3,_0x4db32e=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x314c96(0x110)]()[_0x314c96(0x115)]();return _0x4db32e==='1'||_0x4db32e===_0x314c96(0x10d)||_0x4db32e===_0x314c96(0xf7);}function cacheRoot(){const _0x3d589f=a104_0x50d3;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x3d589f(0x114));}export function getUpdateNoticeCachePath(){const _0x572eab=a104_0x50d3;return join(cacheRoot(),_0x572eab(0x116),_0x572eab(0x108));}async function readUpdateNoticeCache(){const _0x568d69=a104_0x50d3;try{const _0xe3616d=await readFile(getUpdateNoticeCachePath(),_0x568d69(0x10b)),_0x4f26da=JSON['parse'](_0xe3616d);if(!_0x4f26da||typeof _0x4f26da!==_0x568d69(0xf2))return{};return _0x4f26da;}catch{return{};}}async function writeUpdateNoticeCache(_0x56c186){const _0x14745a=a104_0x50d3;try{const _0x537063=getUpdateNoticeCachePath();await mkdir(dirname(_0x537063),{'recursive':!![]}),await writeFile(_0x537063,JSON[_0x14745a(0x118)](_0x56c186,null,0x2)+'\x0a',_0x14745a(0x10b));}catch{}}function a104_0x50d3(_0xe56e95,_0x4aeb83){_0xe56e95=_0xe56e95-0xef;const _0x327468=a104_0x3274();let _0x50d3c1=_0x327468[_0xe56e95];return _0x50d3c1;}function isFreshCheck(_0x2653aa,_0x20c443){const _0x48c947=a104_0x50d3;return typeof _0x2653aa['checkedAt']===_0x48c947(0xf8)&&_0x20c443-_0x2653aa[_0x48c947(0x105)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x515ba0,_0x39f9ea,_0x3a1f1d){const _0x4a32f7=a104_0x50d3;return _0x515ba0[_0x4a32f7(0xfc)]===_0x39f9ea&&typeof _0x515ba0['lastNotifiedAt']===_0x4a32f7(0xf8)&&_0x3a1f1d-_0x515ba0['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x266488=0x5dc){const _0x33b29d=a104_0x50d3;try{const _0x1dbaaf=NPM_REGISTRY_BASE_URL+_0x33b29d(0xff)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x33b29d(0x109),_0x253cea=await fetch(_0x1dbaaf,{'signal':AbortSignal[_0x33b29d(0x117)](_0x266488)});if(!_0x253cea['ok'])return null;const _0x46d655=await _0x253cea[_0x33b29d(0xfb)]();if(!_0x46d655||typeof _0x46d655!=='object')return null;return Object['fromEntries'](Object[_0x33b29d(0xf6)](_0x46d655)[_0x33b29d(0xf5)](([,_0x17be7d])=>typeof _0x17be7d===_0x33b29d(0x10e)&&_0x17be7d[_0x33b29d(0x110)]())[_0x33b29d(0x101)](([_0x2e35e6,_0xbb4734])=>[_0x2e35e6,String(_0xbb4734)['trim']()]));}catch{return null;}}export function buildNpmVersionUrl(_0x90d365){const _0x4b60a4=a104_0x50d3;return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+_0x4b60a4(0x10a)+_0x90d365;}export async function resolveLatestUpdateNotice(){const _0x4a510a=a104_0x50d3;if(isUpdateNoticeDisabled())return null;try{const _0x5a1e6d=Date[_0x4a510a(0x10f)](),_0x43460c=getCliVersion(),_0x573927=await readUpdateNoticeCache();let _0x2e06c9=isFreshCheck(_0x573927,_0x5a1e6d)?_0x573927[_0x4a510a(0xfe)]?.[_0x4a510a(0x110)]():undefined;if(!_0x2e06c9&&!isFreshCheck(_0x573927,_0x5a1e6d)){const _0x2055f5=await fetchNpmDistTags();_0x2e06c9=_0x2055f5?.['latest']?.[_0x4a510a(0x110)](),await writeUpdateNoticeCache({..._0x573927,'checkedAt':_0x5a1e6d,'latest':_0x2e06c9,'failed':!_0x2e06c9});}if(!_0x2e06c9||compareSemver(_0x43460c,_0x2e06c9)>=0x0)return null;if(isRecentlyNotified(_0x573927,_0x2e06c9,_0x5a1e6d))return null;const _0x5734fd=CLI_BIN_NAME+_0x4a510a(0xf9);return await writeUpdateNoticeCache({..._0x573927,'checkedAt':isFreshCheck(_0x573927,_0x5a1e6d)?_0x573927[_0x4a510a(0x105)]:_0x5a1e6d,'latest':_0x2e06c9,'failed':![],'lastNotifiedVersion':_0x2e06c9,'lastNotifiedAt':_0x5a1e6d}),{'command':_0x5734fd,'current':_0x43460c,'latest':_0x2e06c9,'url':buildNpmVersionUrl(_0x2e06c9),'message':CLI_BIN_NAME+'\x20'+_0x2e06c9+_0x4a510a(0xf1)+_0x43460c+_0x4a510a(0x111)+_0x5734fd};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6f3bd8,_0x2fc235){const _0x320f74=a105_0x5e6b,_0x35d135=_0x6f3bd8();while(!![]){try{const _0x311f5e=parseInt(_0x320f74(0x1bb))/0x1+parseInt(_0x320f74(0x1b6))/0x2*(-parseInt(_0x320f74(0x1b7))/0x3)+parseInt(_0x320f74(0x1bc))/0x4+-parseInt(_0x320f74(0x1ba))/0x5+parseInt(_0x320f74(0x1b8))/0x6*(-parseInt(_0x320f74(0x1c0))/0x7)+parseInt(_0x320f74(0x1c1))/0x8*(-parseInt(_0x320f74(0x1be))/0x9)+parseInt(_0x320f74(0x1bd))/0xa;if(_0x311f5e===_0x2fc235)break;else _0x35d135['push'](_0x35d135['shift']());}catch(_0x186417){_0x35d135['push'](_0x35d135['shift']());}}}(a105_0xa469,0x3cfc3));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a105_0x5e6b(_0x51c9df,_0x48db20){_0x51c9df=_0x51c9df-0x1b6;const _0xa4691d=a105_0xa469();let _0x5e6b0e=_0xa4691d[_0x51c9df];return _0x5e6b0e;}export function getCliGitCommit(){const _0x9aba38=a105_0x5e6b,_0x753efa=String(GIT_COMMIT);return _0x753efa&&_0x753efa!==_0x9aba38(0x1bf)?_0x753efa:'';}function a105_0xa469(){const _0x3722c8=['unknown','1696597JlIUsW','748048gZUiDC','3218TxPntC','750BSVOZu','12TuhzmW','slice','1184655rnxxyP','310976vblgpq','985804IBPifI','12838210WBHiPX','45IcwrJE'];a105_0xa469=function(){return _0x3722c8;};return a105_0xa469();}export function getCliVersionDisplay(){const _0x2c29c5=a105_0x5e6b,_0x3751bb=getCliGitCommit(),_0x49349c=BUILD_TIME[_0x2c29c5(0x1b9)](0x0,0xa);if(!_0x3751bb||!_0x49349c)return VERSION;return VERSION+'\x20('+_0x3751bb+',\x20'+_0x49349c+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a106_0x845d(_0x1cd2d9,_0x46e317){_0x1cd2d9=_0x1cd2d9-0x76;var _0x3fce40=a106_0x3fce();var _0x845d42=_0x3fce40[_0x1cd2d9];return _0x845d42;}function a106_0x3fce(){var _0x55b11a=['363454fOYXle','3WysnuC','write','2867648eeWqni','14666069FwkJeS','740277wqcMXs','18wymEtf','5131570ITJuZJ','9vPXRiV','1930887CpvCSy','15iiuzKI','515652KhauNo','stderr'];a106_0x3fce=function(){return _0x55b11a;};return a106_0x3fce();}(function(_0x2a9df0,_0x9d9ca){var _0x579e51=a106_0x845d,_0x5d2e49=_0x2a9df0();while(!![]){try{var _0x553633=parseInt(_0x579e51(0x7f))/0x1*(-parseInt(_0x579e51(0x7e))/0x2)+parseInt(_0x579e51(0x76))/0x3+-parseInt(_0x579e51(0x7c))/0x4*(-parseInt(_0x579e51(0x7b))/0x5)+-parseInt(_0x579e51(0x77))/0x6*(-parseInt(_0x579e51(0x7a))/0x7)+parseInt(_0x579e51(0x81))/0x8+parseInt(_0x579e51(0x79))/0x9*(parseInt(_0x579e51(0x78))/0xa)+-parseInt(_0x579e51(0x82))/0xb;if(_0x553633===_0x9d9ca)break;else _0x5d2e49['push'](_0x5d2e49['shift']());}catch(_0x301e87){_0x5d2e49['push'](_0x5d2e49['shift']());}}}(a106_0x3fce,0x6ee1e));export function writeCliSideChannelLine(_0x524577){var _0x2a9793=a106_0x845d;process[_0x2a9793(0x7d)][_0x2a9793(0x80)](_0x524577+'\x0a');}
|