@lovrabet/lovrabet-cli 2.1.4 → 2.1.6-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/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
|
-
(function(
|
|
1
|
+
(function(_0x8f4d1,_0x153447){const _0x95fec7=a91_0x22f3,_0x4aa282=_0x8f4d1();while(!![]){try{const _0x5e7bbc=parseInt(_0x95fec7(0x10f))/0x1*(-parseInt(_0x95fec7(0x128))/0x2)+parseInt(_0x95fec7(0x118))/0x3+-parseInt(_0x95fec7(0x125))/0x4+parseInt(_0x95fec7(0x117))/0x5*(-parseInt(_0x95fec7(0x11d))/0x6)+-parseInt(_0x95fec7(0x10c))/0x7+parseInt(_0x95fec7(0x127))/0x8*(-parseInt(_0x95fec7(0x12a))/0x9)+parseInt(_0x95fec7(0x112))/0xa;if(_0x5e7bbc===_0x153447)break;else _0x4aa282['push'](_0x4aa282['shift']());}catch(_0x154eca){_0x4aa282['push'](_0x4aa282['shift']());}}}(a91_0x1c45,0xa1312));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x2862ff,_0x3cf1d9,_0x4cbcd1){const _0x3a6ff3=a91_0x22f3,_0x554081=requireSkillCode(_0x2862ff),_0x55e670=requirePackageBytes(_0x554081,_0x4cbcd1[_0x3a6ff3(0x12f)]),_0x5a9b9c=extractDownloadedPackage(_0x55e670),_0x377c9b=_0x5a9b9c[_0x3a6ff3(0x131)](_0xc74fde=>_0xc74fde[_0x3a6ff3(0x132)]===SKILL_FILE);if(!_0x377c9b)throw CliErrors[_0x3a6ff3(0x115)](_0x3a6ff3(0x111)+SKILL_FILE+':\x20'+_0x554081);const _0x1cf072=withMaterializedSkillFrontmatter(_0x5a9b9c,_0x2862ff,_0x554081),_0x53f30e=_0x1cf072[_0x3a6ff3(0x131)](_0x1d7f43=>_0x1d7f43['path']===SKILL_FILE),_0x436232=fileText(_0x53f30e),_0x3e838c=getRuntimeSkillDir(_0x4cbcd1['env'],_0x4cbcd1[_0x3a6ff3(0x113)],_0x4cbcd1[_0x3a6ff3(0x116)],_0x3cf1d9,_0x554081,_0x4cbcd1[_0x3a6ff3(0x114)]),_0xf66c1=resolve(_0x3e838c,SKILL_FILE),_0x1f6260=resolve(_0x3e838c,METADATA_FILE),_0x56d034=contentHash(_0x436232),_0x54fee0=readMetadataIfPresent(_0x1f6260)?.[_0x3a6ff3(0x11b)];ensurePulledFilesCanBeOverwritten(_0x3e838c,_0x1f6260,_0x1cf072,_0x4cbcd1[_0x3a6ff3(0x11e)]===!![]),mkdirSync(_0x3e838c,{'recursive':!![],'mode':0x1c0});const _0x5d3342=existsSync(_0xf66c1)?readFileSync(_0xf66c1,'utf8'):undefined;return materializeFiles(_0x3e838c,_0x1cf072),removeStaleManagedFiles(_0x3e838c,_0x54fee0,_0x1cf072),writeJsonAtomic(_0x1f6260,buildMetadata(_0x2862ff,_0x3cf1d9,_0x4cbcd1[_0x3a6ff3(0x116)],_0x56d034,_0x4cbcd1[_0x3a6ff3(0x124)],_0x1cf072,_0x55e670)),{'skill':_0x2862ff,'scope':_0x3cf1d9,'dir':_0x3e838c,'skillMdPath':_0xf66c1,'metadataPath':_0x1f6260,'contentHash':_0x56d034,'changed':_0x5d3342!==_0x436232};}function withMaterializedSkillFrontmatter(_0x43ea81,_0x47b2e5,_0x542679){const _0x29ed35=a91_0x22f3;return normalizeLocalFiles(_0x43ea81)[_0x29ed35(0x11c)](_0xa82805=>{const _0x90dd46=_0x29ed35,_0x4d6f61=fileText(_0xa82805);if(_0xa82805[_0x90dd46(0x132)]!==SKILL_FILE||hasYamlFrontmatter(_0x4d6f61))return _0xa82805;return{'path':_0xa82805[_0x90dd46(0x132)],'content':prependSkillFrontmatter(_0x4d6f61,{'name':_0x542679,'description':_0x47b2e5[_0x90dd46(0x119)]?.[_0x90dd46(0x122)]()||_0x47b2e5[_0x90dd46(0x126)]?.[_0x90dd46(0x122)]()||_0x542679})};});}function hasYamlFrontmatter(_0x1df410){return/^\uFEFF?---\s*\r?\n/['test'](_0x1df410);}function prependSkillFrontmatter(_0x1dcc38,_0x3a3834){const _0x1f7b8a=a91_0x22f3,_0x170214=_0x1dcc38[_0x1f7b8a(0x123)](/^\uFEFF/,'');return[_0x1f7b8a(0x133),'name:\x20'+yamlString(_0x3a3834['name']),_0x1f7b8a(0x12b)+yamlString(_0x3a3834['description']),_0x1f7b8a(0x133),'',_0x170214][_0x1f7b8a(0x10b)]('\x0a');}function yamlString(_0xd569c9){const _0x5c3fc2=a91_0x22f3;return JSON[_0x5c3fc2(0x11f)](_0xd569c9[_0x5c3fc2(0x123)](/\r/g,'')[_0x5c3fc2(0x122)]());}function ensurePulledFilesCanBeOverwritten(_0x350122,_0x5df43c,_0x1b594c,_0x2b6fb6){const _0x5695a7=a91_0x22f3;if(_0x2b6fb6||!existsSync(_0x5df43c))return;const _0x23812e=readMetadataIfPresent(_0x5df43c);if(!_0x23812e)return;const _0x58c74b=_0x23812e[_0x5695a7(0x11b)]&&Object[_0x5695a7(0x10d)](_0x23812e['fileHashes'])['length']>0x0?_0x23812e[_0x5695a7(0x11b)]:undefined;if(_0x58c74b)for(const [_0x537524,_0x4ed4b7]of Object[_0x5695a7(0x12e)](_0x58c74b)){const _0x2b4002=resolveManagedFilePath(_0x350122,_0x537524);if(!existsSync(_0x2b4002))throw CliErrors[_0x5695a7(0x115)](_0x5695a7(0x10e)+_0x350122,_0x5695a7(0x12c)+_0x537524);const _0x38e4ae=lstatSync(_0x2b4002);if(!_0x38e4ae[_0x5695a7(0x12d)]())throw CliErrors[_0x5695a7(0x115)](_0x5695a7(0x10e)+_0x350122,_0x5695a7(0x121)+_0x537524);const _0x48d18d=bufferSha256(readFileSync(_0x2b4002));if(_0x48d18d!==_0x4ed4b7)throw CliErrors['validation'](_0x5695a7(0x10e)+_0x350122+_0x5695a7(0x120)+_0x537524,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x537524);}else{const _0x2cfb23=resolve(_0x350122,SKILL_FILE);if(existsSync(_0x2cfb23)&&_0x23812e['contentHash']){const _0x18d4f0=contentHash(readFileSync(_0x2cfb23,_0x5695a7(0x11a)));if(_0x18d4f0!==_0x23812e[_0x5695a7(0x110)])throw CliErrors[_0x5695a7(0x115)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x2cfb23,_0x5695a7(0x129));}}for(const _0x469c5a of normalizeLocalFiles(_0x1b594c)){if(_0x58c74b?.[_0x469c5a['path']])continue;if(!_0x58c74b&&_0x469c5a[_0x5695a7(0x132)]===SKILL_FILE)continue;const _0x169852=resolveManagedFilePath(_0x350122,_0x469c5a[_0x5695a7(0x132)]);if(!existsSync(_0x169852))continue;const _0x2f32c1=lstatSync(_0x169852);if(!_0x2f32c1[_0x5695a7(0x12d)]())throw CliErrors[_0x5695a7(0x115)](_0x5695a7(0x10e)+_0x350122,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x469c5a[_0x5695a7(0x132)]);const _0x10e746=bufferSha256(readFileSync(_0x169852));if(_0x10e746!==fileHash(_0x469c5a))throw CliErrors['validation'](_0x5695a7(0x10e)+_0x350122,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x469c5a[_0x5695a7(0x132)]);}}function a91_0x22f3(_0x505ebe,_0x217d9d){_0x505ebe=_0x505ebe-0x10b;const _0x1c45fb=a91_0x1c45();let _0x22f340=_0x1c45fb[_0x505ebe];return _0x22f340;}function a91_0x1c45(){const _0x1be174=['path','---','join','3294739RyqgVM','keys','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','44449wFVCVh','contentHash','Runtime\x20Skill\x20package\x20is\x20missing\x20','25120210kCsjws','accessKey','paths','validation','appCode','82595jNimuS','1617672NzWvKC','description','utf8','fileHashes','map','246HNTImK','force','stringify','.\x20Changed\x20file:\x20','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','trim','replace','pulledAt','395096vXOMSo','skillName','16riemBR','38TrpViw','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','1348839YkIMxv','description:\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','isFile','entries','packageBytes','has','find'];a91_0x1c45=function(){return _0x1be174;};return a91_0x1c45();}function materializeFiles(_0x525eb5,_0x1b3bdb){const _0x5df5ed=a91_0x22f3;for(const _0x570de7 of normalizeLocalFiles(_0x1b3bdb)){const _0x363174=resolveManagedFilePath(_0x525eb5,_0x570de7[_0x5df5ed(0x132)]);mkdirSync(dirname(_0x363174),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x363174,fileContent(_0x570de7),0x180);}}function removeStaleManagedFiles(_0x37a9cd,_0x92cb77,_0x4e089b){const _0x54d290=a91_0x22f3;if(!_0x92cb77)return;const _0x324a64=new Set(normalizeLocalFiles(_0x4e089b)['map'](_0x93ed27=>_0x93ed27[_0x54d290(0x132)]));for(const _0x49004d of Object[_0x54d290(0x10d)](_0x92cb77)){if(_0x324a64[_0x54d290(0x130)](_0x49004d))continue;const _0x589d1f=resolveManagedFilePath(_0x37a9cd,_0x49004d);existsSync(_0x589d1f)&&lstatSync(_0x589d1f)['isFile']()&&rmSync(_0x589d1f,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a498f,_0x5189ec){const _0x423f2d=a92_0x2dbc,_0x1fa8df=_0x2a498f();while(!![]){try{const _0x3dd50b=-parseInt(_0x423f2d(0xed))/0x1+parseInt(_0x423f2d(0xe4))/0x2*(parseInt(_0x423f2d(0xee))/0x3)+-parseInt(_0x423f2d(0xeb))/0x4+-parseInt(_0x423f2d(0xf2))/0x5*(-parseInt(_0x423f2d(0xf7))/0x6)+-parseInt(_0x423f2d(0xe7))/0x7*(parseInt(_0x423f2d(0xf6))/0x8)+parseInt(_0x423f2d(0xde))/0x9+parseInt(_0x423f2d(0xda))/0xa;if(_0x3dd50b===_0x5189ec)break;else _0x1fa8df['push'](_0x1fa8df['shift']());}catch(_0x3ea76d){_0x1fa8df['push'](_0x1fa8df['shift']());}}}(a92_0x35e0,0xd6994));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x190eca,_0xe6048,_0x5f5031,_0x46da99,_0x3b7d4d,_0x2f7848,_0x49a734){const _0x6bf193=a92_0x2dbc,_0x1536e2=_0x2f7848?normalizeLocalFiles(_0x2f7848):[],_0x4b3b44=!_0x49a734&&_0x1536e2[_0x6bf193(0xdf)]>0x0?buildSkillPackage(_0x1536e2):undefined,_0xf695d4=_0x49a734?bufferSha256(_0x49a734):_0x4b3b44?.['manifest']['zipSha256'],_0x415165=_0x49a734?.[_0x6bf193(0xdf)]??_0x4b3b44?.[_0x6bf193(0xec)][_0x6bf193(0xe9)],_0x355596=_0x1536e2['length']>0x0?Object[_0x6bf193(0xef)](_0x1536e2[_0x6bf193(0xf5)](_0x26c34a=>[_0x26c34a[_0x6bf193(0xe0)],fileHash(_0x26c34a)])):undefined;return{'schemaVersion':_0x1536e2[_0x6bf193(0xdf)]>0x0?0x2:0x1,'id':_0x190eca['id'],'appCode':_0x5f5031,'skillCode':requireSkillCode(_0x190eca),'skillName':_0x190eca[_0x6bf193(0xdc)],'description':_0x190eca[_0x6bf193(0xe6)],'scope':_0xe6048,'readonly':_0xe6048!=='personal'||_0x190eca[_0x6bf193(0xf4)]===!![],'tenantCode':_0x190eca['tenantCode'],'userId':_0x190eca[_0x6bf193(0xf1)],'version':_0x190eca[_0x6bf193(0xe5)],'status':_0x190eca['status'],'tags':Array[_0x6bf193(0xf3)](_0x190eca[_0x6bf193(0xf9)])?_0x190eca[_0x6bf193(0xf9)]:[],'hasUpstreamUpdate':_0x190eca['hasUpstreamUpdate'],'forkedFromSkillId':_0x190eca['forkedFromSkillId'],'forkedFromVersion':_0x190eca[_0x6bf193(0xe2)],'sourceSessionId':_0x190eca['sourceSessionId'],'contentHash':_0x46da99,'fileHashes':_0x355596,'treeHash':_0x1536e2[_0x6bf193(0xdf)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x1536e2)):undefined,'ossPath':remoteManifestOssPath(_0x190eca[_0x6bf193(0xe3)]),'zipSha256':_0xf695d4,'zipSize':_0x415165,'files':_0x1536e2[_0x6bf193(0xdf)]>0x0?_0x1536e2[_0x6bf193(0xf5)](_0x31cedb=>({'path':_0x31cedb[_0x6bf193(0xe0)],'hash':fileHash(_0x31cedb),'size':fileContent(_0x31cedb)['length']})):undefined,'pulledAt':_0x3b7d4d??new Date()[_0x6bf193(0xdd)]()};}export function requireSkillCode(_0x331b9e){const _0x304e28=a92_0x2dbc,_0x33f240=_0x331b9e[_0x304e28(0xea)]?.['trim']();if(!_0x33f240)throw CliErrors[_0x304e28(0xdb)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x33f240;}function a92_0x2dbc(_0x2d4d8d,_0x2f2cee){_0x2d4d8d=_0x2d4d8d-0xd9;const _0x35e0ad=a92_0x35e0();let _0x2dbcb0=_0x35e0ad[_0x2d4d8d];return _0x2dbcb0;}export function readMetadataIfPresent(_0x22a3e9){const _0x52d6cf=a92_0x2dbc;if(!existsSync(_0x22a3e9))return undefined;try{const _0x4a05f1=JSON[_0x52d6cf(0xf8)](readFileSync(_0x22a3e9,_0x52d6cf(0xf0)));return _0x4a05f1;}catch{throw CliErrors[_0x52d6cf(0xdb)](_0x52d6cf(0xe1)+METADATA_FILE+':\x20'+_0x22a3e9);}}function a92_0x35e0(){const _0x516b34=['tags','string','trim','726470sYJRGX','validation','skillName','toISOString','10321803jMwXMv','length','path','Invalid\x20','forkedFromVersion','files','46ikvocr','version','description','99701PefijZ','object','zipSize','skillCode','6054660NeGNtE','manifest','939489yAFnzA','217017MzJqGk','fromEntries','utf8','userId','85FcGdKA','isArray','readonly','map','104XwwIuj','223764uGSmNx','parse'];a92_0x35e0=function(){return _0x516b34;};return a92_0x35e0();}function remoteManifestOssPath(_0x581502){const _0x5c184e=a92_0x2dbc;if(!_0x581502||typeof _0x581502!==_0x5c184e(0xe8)||Array[_0x5c184e(0xf3)](_0x581502))return undefined;const _0x57a076=_0x581502['ossPath'];return typeof _0x57a076===_0x5c184e(0xfa)&&_0x57a076[_0x5c184e(0xd9)]()?_0x57a076[_0x5c184e(0xd9)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x55f2e0,_0x559371){const _0x5d9e52=a93_0x413f,_0x624704=_0x55f2e0();while(!![]){try{const _0x333c6e=-parseInt(_0x5d9e52(0x1ab))/0x1+-parseInt(_0x5d9e52(0x198))/0x2+-parseInt(_0x5d9e52(0x1ac))/0x3+-parseInt(_0x5d9e52(0x1a3))/0x4*(-parseInt(_0x5d9e52(0x19b))/0x5)+-parseInt(_0x5d9e52(0x1a7))/0x6+-parseInt(_0x5d9e52(0x1a9))/0x7*(parseInt(_0x5d9e52(0x1a6))/0x8)+-parseInt(_0x5d9e52(0x19f))/0x9*(-parseInt(_0x5d9e52(0x1ad))/0xa);if(_0x333c6e===_0x559371)break;else _0x624704['push'](_0x624704['shift']());}catch(_0xd955fe){_0x624704['push'](_0x624704['shift']());}}}(a93_0x4d5f,0x93187));function a93_0x4d5f(){const _0x50e114=['.claude','homeDirName','56408fshHgP','6490356kZawRs','trim','658hftbom','appCode','808492xPhToo','758943cFLupM','12590FKRPho','homeDir','cacheRoot','includes','1807212CGjJGE','\x20for\x20local\x20path:\x20','.agents','5UXBBgo','validation','claudeSkillsDir','agentsSkillsDir','28629rqclck','skillCode','CLAUDE_SKILL_ROOT','skills','1228892Umorju'];a93_0x4d5f=function(){return _0x50e114;};return a93_0x4d5f();}import{homedir}from'node:os';import{resolve}from'node:path';function a93_0x413f(_0x404bc4,_0x57455b){_0x404bc4=_0x404bc4-0x197;const _0x4d5f2b=a93_0x4d5f();let _0x413fa5=_0x4d5f2b[_0x404bc4];return _0x413fa5;}import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x14554f={}){const _0xf501ce=a93_0x413f,_0x45ef2a=_0x14554f[_0xf501ce(0x1ae)]??homedir(),_0x3e2612=resolve(_0x45ef2a,PRODUCT_CONFIG['homeDirName'],'cache'),_0x4e7fb5=trimmedEnv('SKILL_ROOT'),_0x395614=trimmedEnv(_0xf501ce(0x1a1));return{'homeDir':_0x45ef2a,'cacheRoot':_0x3e2612,'managedRoot':resolve(_0x45ef2a,PRODUCT_CONFIG[_0xf501ce(0x1a5)]),'agentsSkillsDir':_0x14554f[_0xf501ce(0x19e)]??_0x4e7fb5??resolve(_0x45ef2a,_0xf501ce(0x19a),_0xf501ce(0x1a2)),'claudeSkillsDir':_0x14554f[_0xf501ce(0x19d)]??_0x395614??resolve(_0x45ef2a,_0xf501ce(0x1a4),'skills')};}export function getRuntimeSkillCacheRoot(_0x3b767d,_0x150f53,_0x5730bd={}){const _0x5de2fd=a93_0x413f,_0x4d4bcb=resolveSkillSyncPaths(_0x5730bd);return resolve(_0x4d4bcb[_0x5de2fd(0x1af)],_0x3b767d,fingerprintAccessKey(_0x150f53),_0x5de2fd(0x1a2));}export function getRuntimeSkillDir(_0x39f130,_0x326593,_0x715fe2,_0x1d6584,_0x4f9b66,_0x18cf54={}){const _0x2e12f7=a93_0x413f;return resolve(getRuntimeSkillCacheRoot(_0x39f130,_0x326593,_0x18cf54),safePathSegment(_0x715fe2,_0x2e12f7(0x1aa)),_0x1d6584,safePathSegment(_0x4f9b66,_0x2e12f7(0x1a0)));}export function safePathSegment(_0xc53bf2,_0x51b428='path\x20segment'){const _0x54abbc=a93_0x413f;if(!_0xc53bf2||_0xc53bf2[_0x54abbc(0x197)]('/')||_0xc53bf2['includes']('\x5c')||_0xc53bf2[_0x54abbc(0x197)]('..'))throw CliErrors[_0x54abbc(0x19c)]('Unsafe\x20'+_0x51b428+_0x54abbc(0x199)+_0xc53bf2);return _0xc53bf2;}function trimmedEnv(_0x52d495){const _0x11055b=a93_0x413f,_0x1f97d5=productEnv(_0x52d495)?.[_0x11055b(0x1a8)]();return _0x1f97d5?_0x1f97d5:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x532dce,_0x35a9f){const _0x4cb496=a94_0x453c,_0x25c829=_0x532dce();while(!![]){try{const _0x42ab08=-parseInt(_0x4cb496(0xd2))/0x1*(-parseInt(_0x4cb496(0xe9))/0x2)+parseInt(_0x4cb496(0xe8))/0x3+parseInt(_0x4cb496(0xe0))/0x4*(parseInt(_0x4cb496(0xd1))/0x5)+parseInt(_0x4cb496(0xde))/0x6*(parseInt(_0x4cb496(0xe2))/0x7)+parseInt(_0x4cb496(0xda))/0x8+-parseInt(_0x4cb496(0xe3))/0x9+-parseInt(_0x4cb496(0xe6))/0xa*(parseInt(_0x4cb496(0xf2))/0xb);if(_0x42ab08===_0x35a9f)break;else _0x25c829['push'](_0x25c829['shift']());}catch(_0x51bc57){_0x25c829['push'](_0x25c829['shift']());}}}(a94_0x37e9,0x1ad4f));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{CliErrors}from'../../errors.js';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';function a94_0x37e9(){const _0x35c976=['slice','some','pushedAt','581784ZtThrw','manifest','scope','appCode','6fLxfZT','sourceSessionId','200MkSovo','isFile','587083HetUOK','432000lwVLtr','Missing\x20','skillCode','10UFmbtW','validation','603012FhlFzZ','25270WuqhLP','skillName','utf8','Skill\x20metadata\x20appCode\x20\x22','isSymbolicLink','isDirectory','find','\x20or\x20directory\x20name.','Skill\x20directory\x20not\x20found:\x20','5040838cRoUcJ','files','startsWith','14485sfnDfR','9KaJkkJ','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','path','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','packageBase64'];a94_0x37e9=function(){return _0x35c976;};return a94_0x37e9();}import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function readPushDirectory(_0x687805,_0x1bc324){const _0x3ebf63=a94_0x453c,_0x273fc5=resolvePushDirectoryRoot(_0x687805),_0x89974e=resolve(_0x273fc5,SKILL_FILE);if(!existsSync(_0x89974e)||!lstatSync(_0x89974e)[_0x3ebf63(0xe1)]())throw CliErrors[_0x3ebf63(0xe7)](_0x3ebf63(0xe4)+SKILL_FILE+':\x20'+_0x89974e);const _0x15f7ca=readMetadataIfPresent(resolve(_0x273fc5,METADATA_FILE));if(_0x15f7ca?.[_0x3ebf63(0xdc)]&&_0x15f7ca[_0x3ebf63(0xdc)]!=='personal')throw CliErrors['validation'](_0x3ebf63(0xd5)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x15f7ca[_0x3ebf63(0xdc)]+'\x22.');if(_0x15f7ca?.[_0x3ebf63(0xdd)]&&_0x15f7ca['appCode']!==_0x1bc324)throw CliErrors[_0x3ebf63(0xe7)](_0x3ebf63(0xec)+_0x15f7ca[_0x3ebf63(0xdd)]+_0x3ebf63(0xd3)+_0x1bc324+'\x22.');const _0x1be045=scanSkillDirectory(_0x273fc5),_0x45e3ec=buildSkillPackage(_0x1be045),_0x15ee81=readFileSync(_0x89974e,_0x3ebf63(0xeb)),_0xb4264a=_0x15f7ca?.[_0x3ebf63(0xe5)]??deriveSkillCodeFromDirectory(_0x273fc5,_0x1bc324);if(!_0xb4264a)throw CliErrors[_0x3ebf63(0xe7)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+METADATA_FILE+_0x3ebf63(0xf0));return{'skillCode':_0xb4264a,'metadata':_0x15f7ca,'input':{'skillCode':_0xb4264a,'skillName':_0x15f7ca?.[_0x3ebf63(0xea)],'description':_0x15f7ca?.['description'],'content':_0x15ee81,'files':_0x45e3ec[_0x3ebf63(0xdb)],'packageBase64':_0x45e3ec[_0x3ebf63(0xd6)],'tags':_0x15f7ca?.['tags'],'version':_0x15f7ca?.['version'],'sourceSessionId':_0x15f7ca?.[_0x3ebf63(0xdf)]}};}function a94_0x453c(_0x4ad8b8,_0x58e1ae){_0x4ad8b8=_0x4ad8b8-0xd1;const _0x37e9fa=a94_0x37e9();let _0x453c75=_0x37e9fa[_0x4ad8b8];return _0x453c75;}export function recordPushedRuntimeSkill(_0x1a7569,_0x3150fd,_0x3929d1,_0x2e9512={}){const _0x50ec72=a94_0x453c,_0x1d9e65=resolvePushDirectoryRoot(_0x1a7569),_0x214051=scanSkillDirectory(_0x1d9e65),_0x5f4217=_0x214051[_0x50ec72(0xef)](_0x1f56a8=>_0x1f56a8[_0x50ec72(0xd4)]===SKILL_FILE),_0x35a12f=_0x5f4217?fileText(_0x5f4217):'',_0x3cc5a0=tryNormalizePackageManifest(_0x3150fd[_0x50ec72(0xf3)]),_0x229e7a={..._0x3150fd,'content':_0x3150fd['content']??_0x35a12f,'files':_0x3cc5a0},_0x2acdee=_0x3cc5a0?normalizeLocalFiles(_0x214051)['filter'](_0x353609=>_0x3cc5a0[_0x50ec72(0xf3)][_0x50ec72(0xd8)](_0x5b1810=>_0x5b1810[_0x50ec72(0xd4)]===_0x353609[_0x50ec72(0xd4)])):undefined,_0x3efc0d=buildMetadata(_0x229e7a,_0x2e9512[_0x50ec72(0xdc)]??'personal',_0x3929d1,contentHash(_0x229e7a['content']??''),_0x2e9512[_0x50ec72(0xd9)],_0x2acdee);writeJsonAtomic(resolve(_0x1d9e65,METADATA_FILE),_0x3efc0d);}export function deriveSkillCodeFromDirectory(_0x5f5a6e,_0x37961d){const _0xbc9398=a94_0x453c,_0x4551f3=basename(resolve(_0x5f5a6e)),_0x5a3b67=_0x37961d+'--';return _0x4551f3[_0xbc9398(0xf4)](_0x5a3b67)?_0x4551f3[_0xbc9398(0xd7)](_0x5a3b67['length']):_0x4551f3;}function resolvePushDirectoryRoot(_0x20e41a){const _0x494033=a94_0x453c,_0x346e32=resolve(_0x20e41a);if(!existsSync(_0x346e32))throw CliErrors['validation'](_0x494033(0xf1)+_0x20e41a);const _0x1deedc=lstatSync(_0x346e32);if(_0x1deedc['isDirectory']())return _0x346e32;if(_0x1deedc[_0x494033(0xed)]()){const _0x3599cc=realpathSync(_0x346e32);if(lstatSync(_0x3599cc)[_0x494033(0xee)]())return _0x3599cc;}throw CliErrors[_0x494033(0xe7)](_0x494033(0xf1)+_0x20e41a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a95_0x56a8(_0x14ef9f,_0x1d6b42){_0x14ef9f=_0x14ef9f-0x1cf;const _0x3e4fc2=a95_0x3e4f();let _0x56a84c=_0x3e4fc2[_0x14ef9f];return _0x56a84c;}(function(_0x5e6bdd,_0x1ca056){const _0x5bfbd2=a95_0x56a8,_0x536d9e=_0x5e6bdd();while(!![]){try{const _0x12303f=-parseInt(_0x5bfbd2(0x1d1))/0x1*(-parseInt(_0x5bfbd2(0x1d9))/0x2)+parseInt(_0x5bfbd2(0x1cf))/0x3*(parseInt(_0x5bfbd2(0x1d8))/0x4)+parseInt(_0x5bfbd2(0x1d3))/0x5*(parseInt(_0x5bfbd2(0x1dc))/0x6)+-parseInt(_0x5bfbd2(0x1d7))/0x7+parseInt(_0x5bfbd2(0x1d0))/0x8*(-parseInt(_0x5bfbd2(0x1d6))/0x9)+parseInt(_0x5bfbd2(0x1d4))/0xa*(-parseInt(_0x5bfbd2(0x1d2))/0xb)+-parseInt(_0x5bfbd2(0x1dd))/0xc*(-parseInt(_0x5bfbd2(0x1d5))/0xd);if(_0x12303f===_0x1ca056)break;else _0x536d9e['push'](_0x536d9e['shift']());}catch(_0x33d26f){_0x536d9e['push'](_0x536d9e['shift']());}}}(a95_0x3e4f,0xd40fe));function a95_0x3e4f(){const _0x117b01=['26cvjAaM','1809aFPhAv','4536903EctpKr','80WUOCfO','2yScgiW','company','builtin','6xnstIq','3381804iSFmMw','55533JuZZCy','17832wFzlNv','1645079KSDyVG','22dWlVuF','5039665vmBrfX','8110510CqoDuj'];a95_0x3e4f=function(){return _0x117b01;};return a95_0x3e4f();}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x33f492){const _0x53d792=a95_0x56a8,_0x1c84e9=_0x33f492&&_0x33f492['length']>0x0?_0x33f492:['personal',_0x53d792(0x1da),_0x53d792(0x1db)],_0xbd5586=[];for(const _0x2eb159 of _0x1c84e9){if(!isRuntimeSkillScope(_0x2eb159))throw CliErrors['validation']('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x2eb159);!_0xbd5586['includes'](_0x2eb159)&&_0xbd5586['push'](_0x2eb159);}return _0xbd5586;}export function isRuntimeSkillScope(_0xa14452){const _0x15f5b3=a95_0x56a8;return _0xa14452==='personal'||_0xa14452===_0x15f5b3(0x1da)||_0xa14452===_0x15f5b3(0x1db);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a97_0x2cc50f=a97_0x312a;(function(_0x19af32,_0x2a2f46){const _0x251414=a97_0x312a,_0x5aafb3=_0x19af32();while(!![]){try{const _0x9b0a89=parseInt(_0x251414(0x1e9))/0x1*(parseInt(_0x251414(0x1ff))/0x2)+parseInt(_0x251414(0x1f7))/0x3*(-parseInt(_0x251414(0x1ec))/0x4)+-parseInt(_0x251414(0x1ee))/0x5+-parseInt(_0x251414(0x1f8))/0x6+parseInt(_0x251414(0x1eb))/0x7+-parseInt(_0x251414(0x1fe))/0x8+parseInt(_0x251414(0x1f4))/0x9;if(_0x9b0a89===_0x2a2f46)break;else _0x5aafb3['push'](_0x5aafb3['shift']());}catch(_0x5543bd){_0x5aafb3['push'](_0x5aafb3['shift']());}}}(a97_0x2115,0x94415));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_0x2cc50f(0x1f5));export function createDeterministicZipPackage(_0x178186){const _0x58b091=a97_0x2cc50f,_0xa2d112={};for(const _0x3ab770 of normalizeLocalFiles(_0x178186)){_0xa2d112[_0x3ab770[_0x58b091(0x1e6)]]=fileContent(_0x3ab770);}const _0x469ae3=Buffer['from'](zipSync(_0xa2d112,{'level':0x0,'mtime':ZIP_MTIME}));if(_0x469ae3[_0x58b091(0x1fb)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x58b091(0x1fc)](_0x58b091(0x1fd));return _0x469ae3;}function a97_0x312a(_0x366cc6,_0xe7dc0b){_0x366cc6=_0x366cc6-0x1e5;const _0x21152f=a97_0x2115();let _0x312ac7=_0x21152f[_0x366cc6];return _0x312ac7;}export function parseZipPackage(_0x364857){const _0x1054ad=a97_0x2cc50f;if(_0x364857[_0x1054ad(0x1fb)]<0x16)throw CliErrors[_0x1054ad(0x1fc)](_0x1054ad(0x1f2));if(_0x364857[_0x1054ad(0x1fb)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x1054ad(0x1fc)](_0x1054ad(0x1f9));let _0x436eb2=0x0,_0x36d652=0x0,_0x227920;try{_0x227920=unzipSync(_0x364857,{'filter'(_0x23d897){const _0x1bbaa4=_0x1054ad,_0x29e085=normalizeSkillRelativePath(_0x23d897['name']);if(_0x29e085[_0x1bbaa4(0x1e8)]('/'))throw CliErrors[_0x1bbaa4(0x1fc)](_0x1bbaa4(0x1f0)+_0x29e085);if(_0x23d897[_0x1bbaa4(0x1f3)]>MAX_SKILL_FILE_BYTES)throw CliErrors['validation'](_0x1bbaa4(0x1e5)+_0x29e085);_0x436eb2+=0x1;if(_0x436eb2>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x1bbaa4(0x1fc)](_0x1bbaa4(0x1f6));_0x36d652+=_0x23d897['originalSize'];if(_0x36d652>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x1bbaa4(0x1fc)](_0x1bbaa4(0x1ed));return!![];}});}catch(_0x313282){if(isRuntimeSkillValidationError(_0x313282))throw _0x313282;throw CliErrors['validation'](_0x1054ad(0x1f2));}return Object[_0x1054ad(0x1ef)](_0x227920)[_0x1054ad(0x1e7)](([_0x3874c0,_0xa49172])=>({'path':normalizeSkillRelativePath(_0x3874c0),'bytes':Buffer['from'](_0xa49172)}))[_0x1054ad(0x1fa)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x228083){const _0x507e03=a97_0x2cc50f;return typeof _0x228083==='object'&&_0x228083!==null&&_0x507e03(0x1f1)in _0x228083&&_0x228083[_0x507e03(0x1f1)]===_0x507e03(0x1ea);}function a97_0x2115(){const _0x6760e0=['sort','length','validation','Skill\x20package\x20exceeds\x20size\x20limit.','1328192FOjvwM','102954SSgBjL','Runtime\x20Skill\x20package\x20file\x20exceeds\x20size\x20limit:\x20','path','map','endsWith','1TeGJhJ','validation_error','7909664XYSrzR','13452CKUGbp','Runtime\x20Skill\x20package\x20exceeds\x20total\x20file\x20size\x20limit.','342695cgtRuU','entries','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','code','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','originalSize','3181104UfYftW','1980-01-01T00:00:00.000Z','Runtime\x20Skill\x20package\x20exceeds\x20file\x20count\x20limit.','162NdrCyo','3068802KmwcHI','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.'];a97_0x2115=function(){return _0x6760e0;};return a97_0x2115();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a98_0x43f9(_0x38e13f,_0x3eb277){_0x38e13f=_0x38e13f-0x126;const _0x5f1eb7=a98_0x5f1e();let _0x43f9fb=_0x5f1eb7[_0x38e13f];return _0x43f9fb;}(function(_0x49d8be,_0x40b207){const _0x2f22ea=a98_0x43f9,_0x4519d4=_0x49d8be();while(!![]){try{const _0x4343d4=-parseInt(_0x2f22ea(0x137))/0x1+parseInt(_0x2f22ea(0x12c))/0x2+-parseInt(_0x2f22ea(0x142))/0x3*(-parseInt(_0x2f22ea(0x13c))/0x4)+parseInt(_0x2f22ea(0x131))/0x5+parseInt(_0x2f22ea(0x14d))/0x6*(parseInt(_0x2f22ea(0x13e))/0x7)+parseInt(_0x2f22ea(0x13a))/0x8+-parseInt(_0x2f22ea(0x146))/0x9;if(_0x4343d4===_0x40b207)break;else _0x4519d4['push'](_0x4519d4['shift']());}catch(_0x28cdff){_0x4519d4['push'](_0x4519d4['shift']());}}}(a98_0x5f1e,0x2a618));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(_0x4bac26){const _0x126d68=a98_0x43f9,_0x56ef52=normalizeLocalFiles(_0x4bac26);if(!_0x56ef52[_0x126d68(0x147)](_0x125a38=>_0x125a38['path']===SKILL_FILE))throw CliErrors[_0x126d68(0x12b)](_0x126d68(0x140)+SKILL_FILE+_0x126d68(0x14a));const _0x374fba=localFilesToManifestFiles(_0x56ef52),_0x5d52b2=createDeterministicZipPackage(_0x56ef52);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x374fba),'zipSha256':bufferSha256(_0x5d52b2),'zipSize':_0x5d52b2[_0x126d68(0x134)],'files':_0x374fba},'packageBytes':_0x5d52b2,'packageBase64':_0x5d52b2[_0x126d68(0x150)](_0x126d68(0x14f))};}export function verifyRuntimeSkillPackage(_0x39af99,_0x55cb77){const _0x6ab51b=a98_0x43f9,_0x4b352a=normalizePackageManifest(_0x39af99,{'requireOssPath':![]});if(!_0x4b352a)throw CliErrors[_0x6ab51b(0x12b)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x4b352a,_0x55cb77);}export function verifyRuntimeSkillBundle(_0x973674,_0x5ab5eb){const _0x4460bb=a98_0x43f9,_0x9589a5=normalizePackageManifest(_0x973674,{'requireOssPath':![]});if(!_0x9589a5)throw CliErrors[_0x4460bb(0x12b)](_0x4460bb(0x126));if(_0x5ab5eb[_0x4460bb(0x134)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation'](_0x4460bb(0x145));return extractAndVerifyPackageFiles(_0x9589a5,_0x5ab5eb);}export function tryNormalizePackageManifest(_0x30e217){return normalizePackageManifest(_0x30e217,{'requireOssPath':![]});}export function requirePackageBytes(_0x1e975a,_0x5a3c22){const _0x4e8e80=a98_0x43f9;if(!_0x5a3c22||_0x5a3c22[_0x4e8e80(0x134)]===0x0)throw CliErrors[_0x4e8e80(0x12b)](_0x4e8e80(0x143)+_0x1e975a);if(_0x5a3c22[_0x4e8e80(0x134)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x4e8e80(0x12b)]('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit:\x20'+_0x1e975a);return _0x5a3c22;}export function extractDownloadedPackage(_0x2c3b69){const _0x54d523=a98_0x43f9,_0x6e6393=parseZipPackage(_0x2c3b69)[_0x54d523(0x14c)](_0x2e4393=>({'path':_0x2e4393['path'],'bytes':_0x2e4393[_0x54d523(0x148)]}));if(!_0x6e6393[_0x54d523(0x147)](_0xd496c3=>_0xd496c3[_0x54d523(0x144)]===SKILL_FILE))throw CliErrors['validation'](_0x54d523(0x12a)+SKILL_FILE+'.');return normalizeLocalFiles(_0x6e6393);}export function localFilesToManifestFiles(_0x380feb){const _0x40b93e=a98_0x43f9;return normalizeLocalFiles(_0x380feb)[_0x40b93e(0x14c)](_0x5d35da=>({'path':_0x5d35da[_0x40b93e(0x144)],'sha256':fileHash(_0x5d35da),'size':fileContent(_0x5d35da)[_0x40b93e(0x134)]}));}function normalizePackageManifest(_0x20334b,_0x4e35df){const _0x19d284=a98_0x43f9;if(!_0x20334b||typeof _0x20334b!=='object'||Array[_0x19d284(0x14b)](_0x20334b))return undefined;const _0x4915b6=_0x20334b,_0x1b7498=typeof _0x4915b6['ossPath']===_0x19d284(0x138)?_0x4915b6['ossPath']['trim']():undefined;if(_0x4e35df[_0x19d284(0x132)]&&!_0x1b7498)return undefined;if(!Array[_0x19d284(0x14b)](_0x4915b6[_0x19d284(0x128)])||_0x4915b6[_0x19d284(0x128)]['length']===0x0)return undefined;if(!isSha256Hex(_0x4915b6[_0x19d284(0x13d)]))throw CliErrors[_0x19d284(0x12b)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.');if(!isSha256Hex(_0x4915b6['zipSha256']))throw CliErrors['validation'](_0x19d284(0x139));if(!Number[_0x19d284(0x133)](_0x4915b6[_0x19d284(0x13b)])||_0x4915b6[_0x19d284(0x13b)]<0x0)throw CliErrors[_0x19d284(0x12b)](_0x19d284(0x12d));if(_0x4915b6[_0x19d284(0x13b)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation'](_0x19d284(0x145));const _0x310348=normalizeManifestFiles(_0x4915b6[_0x19d284(0x128)]);if(!_0x310348[_0x19d284(0x147)](_0x52dbf8=>_0x52dbf8[_0x19d284(0x144)]===SKILL_FILE))throw CliErrors[_0x19d284(0x12b)](_0x19d284(0x135)+SKILL_FILE+'.');const _0x3242c5=fileTreeHash(_0x310348);if(_0x3242c5!==_0x4915b6[_0x19d284(0x13d)][_0x19d284(0x127)]())throw CliErrors['validation'](_0x19d284(0x151));return{'schemaVersion':Number[_0x19d284(0x133)](_0x4915b6['schemaVersion'])?_0x4915b6['schemaVersion']:0x2,'ossPath':_0x1b7498,'treeSha256':_0x3242c5,'zipSha256':_0x4915b6[_0x19d284(0x149)][_0x19d284(0x127)](),'zipSize':_0x4915b6[_0x19d284(0x13b)],'files':_0x310348};}function extractAndVerifyPackage(_0x2f5134,_0x167bca){const _0x1e7063=a98_0x43f9,_0x2dbae4=normalizePackageManifest(_0x2f5134,{'requireOssPath':![]});if(!_0x2dbae4)throw CliErrors[_0x1e7063(0x12b)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x167bca[_0x1e7063(0x134)]!==_0x2dbae4[_0x1e7063(0x13b)])throw CliErrors[_0x1e7063(0x12b)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x4acece=bufferSha256(_0x167bca);if(_0x4acece!==_0x2dbae4['zipSha256'])throw CliErrors[_0x1e7063(0x12b)](_0x1e7063(0x141));return extractAndVerifyPackageFiles(_0x2dbae4,_0x167bca);}function extractAndVerifyPackageFiles(_0x2e9128,_0x2da88b){const _0x4aaf42=a98_0x43f9,_0x3df65d=parseZipPackage(_0x2da88b);if(_0x3df65d[_0x4aaf42(0x134)]!==_0x2e9128[_0x4aaf42(0x128)][_0x4aaf42(0x134)])throw CliErrors[_0x4aaf42(0x12b)](_0x4aaf42(0x129));const _0x56eb2a=new Map();for(const _0x203ee3 of _0x3df65d){if(_0x56eb2a[_0x4aaf42(0x14e)](_0x203ee3[_0x4aaf42(0x144)]))throw CliErrors[_0x4aaf42(0x12b)](_0x4aaf42(0x130)+_0x203ee3[_0x4aaf42(0x144)]);_0x56eb2a[_0x4aaf42(0x12f)](_0x203ee3['path'],_0x203ee3);}const _0x5c6804=[];for(const _0x3a16d4 of _0x2e9128[_0x4aaf42(0x128)]){const _0x1ac056=_0x56eb2a['get'](_0x3a16d4[_0x4aaf42(0x144)]);if(!_0x1ac056)throw CliErrors[_0x4aaf42(0x12b)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x3a16d4[_0x4aaf42(0x144)]);if(_0x1ac056['bytes'][_0x4aaf42(0x134)]!==_0x3a16d4[_0x4aaf42(0x136)])throw CliErrors[_0x4aaf42(0x12b)](_0x4aaf42(0x13f)+_0x3a16d4[_0x4aaf42(0x144)]);const _0x48693c=bufferSha256(_0x1ac056['bytes']);if(_0x48693c!==_0x3a16d4[_0x4aaf42(0x12e)])throw CliErrors['validation'](_0x4aaf42(0x152)+_0x3a16d4[_0x4aaf42(0x144)]);_0x5c6804['push']({'path':_0x3a16d4[_0x4aaf42(0x144)],'bytes':_0x1ac056[_0x4aaf42(0x148)]});}return normalizeLocalFiles(_0x5c6804);}function a98_0x5f1e(){const _0x4f8076=['3hrxpPK','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','path','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','3569616zGrpdm','some','bytes','zipSha256','\x20in\x20Skill\x20file\x20package.','isArray','map','15156izRZPC','has','base64','toString','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','toLowerCase','files','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','Runtime\x20Skill\x20package\x20is\x20missing\x20','validation','270872sqnhYc','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','sha256','set','Duplicate\x20Skill\x20package\x20entry:\x20','90720qkmlrm','requireOssPath','isSafeInteger','length','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','size','133181yTuaCQ','string','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','1810912xFVyIh','zipSize','717884SiRWig','treeSha256','399NDySaz','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Missing\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.'];a98_0x5f1e=function(){return _0x4f8076;};return a98_0x5f1e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27cc85,_0x5c2510){var _0x31a1f7=a99_0xb780,_0x2d838d=_0x27cc85();while(!![]){try{var _0x34b177=-parseInt(_0x31a1f7(0x19e))/0x1+parseInt(_0x31a1f7(0x19b))/0x2*(parseInt(_0x31a1f7(0x1a2))/0x3)+-parseInt(_0x31a1f7(0x199))/0x4+parseInt(_0x31a1f7(0x1a1))/0x5*(parseInt(_0x31a1f7(0x198))/0x6)+parseInt(_0x31a1f7(0x19c))/0x7+parseInt(_0x31a1f7(0x19d))/0x8*(-parseInt(_0x31a1f7(0x1a0))/0x9)+-parseInt(_0x31a1f7(0x19a))/0xa*(parseInt(_0x31a1f7(0x19f))/0xb);if(_0x34b177===_0x5c2510)break;else _0x2d838d['push'](_0x2d838d['shift']());}catch(_0x18f963){_0x2d838d['push'](_0x2d838d['shift']());}}}(a99_0x55e1,0x4d227));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,recordPushedRuntimeSkill}from'./runtime-skill-sync/push.js';function a99_0x55e1(){var _0x5156fd=['2768xjamwu','301150cXuFNl','115610vFxBCd','5337zNrkMr','8245TyiuUy','3IZHEUt','2070XuDjKL','300684zZbXJj','90vkCxYg','674022FbZxQH','602812oCqiZX'];a99_0x55e1=function(){return _0x5156fd;};return a99_0x55e1();}function a99_0xb780(_0x419022,_0x11d3b2){_0x419022=_0x419022-0x198;var _0x55e1f2=a99_0x55e1();var _0xb780c5=_0x55e1f2[_0x419022];return _0xb780c5;}export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ba046,_0x1cafc5){const _0xa8a4b2=a100_0x4af2,_0x35e013=_0x2ba046();while(!![]){try{const _0x4c6b8a=parseInt(_0xa8a4b2(0x1fb))/0x1*(parseInt(_0xa8a4b2(0x1fa))/0x2)+-parseInt(_0xa8a4b2(0x1f5))/0x3*(-parseInt(_0xa8a4b2(0x1f8))/0x4)+-parseInt(_0xa8a4b2(0x1fc))/0x5*(parseInt(_0xa8a4b2(0x1fe))/0x6)+parseInt(_0xa8a4b2(0x1f6))/0x7*(parseInt(_0xa8a4b2(0x1f3))/0x8)+parseInt(_0xa8a4b2(0x1f9))/0x9*(parseInt(_0xa8a4b2(0x1f7))/0xa)+-parseInt(_0xa8a4b2(0x1f4))/0xb+-parseInt(_0xa8a4b2(0x1fd))/0xc;if(_0x4c6b8a===_0x1cafc5)break;else _0x35e013['push'](_0x35e013['shift']());}catch(_0x29baa9){_0x35e013['push'](_0x35e013['shift']());}}}(a100_0x4bd1,0x9d79f));function a100_0x4bd1(){const _0x18f3f4=['130nhmvoq','1028eGEqvT','3357wWPzee','30hEZTSI','15875JsjWOf','75Slfwhy','11760324auIrTQ','211122kwqrAu','1119856OJvyKF','3952982xtmUtF','15051BtlYNz','49QyBTAK'];a100_0x4bd1=function(){return _0x18f3f4;};return a100_0x4bd1();}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a100_0x4af2(_0x18d3aa,_0x3d0df1){_0x18d3aa=_0x18d3aa-0x1f3;const _0x4bd1c4=a100_0x4bd1();let _0x4af23e=_0x4bd1c4[_0x18d3aa];return _0x4af23e;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a101_0x1aaa(){const _0x2113c2=['currentRawCommand','104088FsNhbL','filter','rawCommand','stringify','initWinstonLogger','transports','timestamp','combine','red','addColors','trim','printf','existsSync','75ypgmRo','31348oyuTLw','logTask','blue','1475648uyYlnO','log','warn','dirname','writeFileSync','winstonLogger','949860bxvMOG','createLogger','join','10xqQeZU','info','Starting:\x20','Failed\x20to\x20read\x20logs:','clear','now','775554cGAwIc','File','logFileName','Failed\x20to\x20clear\x20logs:','getWinstonInstance','message','duration','logFilePath','clearLogs','toISOString','4082988PKjerM','errors','parse','401641FwUrUF','split','format','mkdirSync','error','success'];a101_0x1aaa=function(){return _0x2113c2;};return a101_0x1aaa();}const a101_0x5b9b41=a101_0x2700;(function(_0x57732b,_0xbd76d5){const _0x2a0e5a=a101_0x2700,_0x33d01a=_0x57732b();while(!![]){try{const _0x1ed882=parseInt(_0x2a0e5a(0x147))/0x1+parseInt(_0x2a0e5a(0x13a))/0x2+parseInt(_0x2a0e5a(0x15b))/0x3*(parseInt(_0x2a0e5a(0x15c))/0x4)+-parseInt(_0x2a0e5a(0x134))/0x5*(parseInt(_0x2a0e5a(0x14e))/0x6)+-parseInt(_0x2a0e5a(0x144))/0x7+parseInt(_0x2a0e5a(0x12b))/0x8+-parseInt(_0x2a0e5a(0x131))/0x9;if(_0x1ed882===_0xbd76d5)break;else _0x33d01a['push'](_0x33d01a['shift']());}catch(_0x195619){_0x33d01a['push'](_0x33d01a['shift']());}}}(a101_0x1aaa,0x6cf47));import a101_0xdd52fc from'winston';function a101_0x2700(_0x93f171,_0x30f76a){_0x93f171=_0x93f171-0x129;const _0x1aaa94=a101_0x1aaa();let _0x27000c=_0x1aaa94[_0x93f171];return _0x27000c;}import a101_0x326734 from'node:fs';import a101_0x4afca2 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a101_0x5b9b41(0x130)];[a101_0x5b9b41(0x141)]='';[a101_0x5b9b41(0x14d)]='';constructor(){}['setRawCommand'](_0x413036){const _0x481d54=a101_0x5b9b41;this[_0x481d54(0x14d)]=_0x413036;}['setLogPath'](_0x5da9be){const _0x4a2851=a101_0x5b9b41;this['logFilePath']=a101_0x4afca2[_0x4a2851(0x133)](_0x5da9be,PRODUCT_CONFIG[_0x4a2851(0x13c)]),this[_0x4a2851(0x130)]&&this['winstonLogger'][_0x4a2851(0x138)](),this[_0x4a2851(0x152)]();}[a101_0x5b9b41(0x152)](){const _0x278dfa=a101_0x5b9b41,_0x243053=a101_0x4afca2[_0x278dfa(0x12e)](this[_0x278dfa(0x141)]);!a101_0x326734[_0x278dfa(0x15a)](_0x243053)&&a101_0x326734[_0x278dfa(0x14a)](_0x243053,{'recursive':!![]});const _0x166e18=a101_0xdd52fc['format'][_0x278dfa(0x155)](a101_0xdd52fc['format'][_0x278dfa(0x154)](),a101_0xdd52fc[_0x278dfa(0x149)][_0x278dfa(0x145)]({'stack':!![]}),a101_0xdd52fc[_0x278dfa(0x149)][_0x278dfa(0x159)](_0x5b5712=>{const _0x126a73=_0x278dfa,_0x229f56={'timestamp':_0x5b5712['timestamp']||new Date()[_0x126a73(0x143)](),'level':_0x5b5712['level']||_0x126a73(0x135),'command':_0x5b5712['command']||'unknown','rawCommand':_0x5b5712[_0x126a73(0x150)]||this[_0x126a73(0x14d)]||undefined,'message':_0x5b5712[_0x126a73(0x13f)]||'','duration':_0x5b5712[_0x126a73(0x140)]||undefined,'details':_0x5b5712['details']||undefined};return JSON[_0x126a73(0x151)](_0x229f56);}));this[_0x278dfa(0x130)]=a101_0xdd52fc[_0x278dfa(0x132)]({'level':_0x278dfa(0x135),'format':_0x166e18,'transports':[new a101_0xdd52fc[(_0x278dfa(0x153))][(_0x278dfa(0x13b))]({'filename':this[_0x278dfa(0x141)],'level':_0x278dfa(0x135)})],'silent':![]}),a101_0xdd52fc[_0x278dfa(0x157)]({'success':'green','error':_0x278dfa(0x156),'warn':'yellow','info':_0x278dfa(0x12a)});}[a101_0x5b9b41(0x135)](_0x2b06f8,_0x1fbd30,_0xf821de){const _0x22fdab=a101_0x5b9b41;if(!this[_0x22fdab(0x141)]||!this[_0x22fdab(0x130)])return;this[_0x22fdab(0x130)]['info'](_0x1fbd30,{'command':_0x2b06f8,'details':_0xf821de});}[a101_0x5b9b41(0x14c)](_0x159611,_0x3da1ca,_0x3b0d20,_0x290263){const _0x44afdc=a101_0x5b9b41;if(!this['logFilePath']||!this[_0x44afdc(0x130)])return;this[_0x44afdc(0x130)][_0x44afdc(0x12c)]('info',_0x3da1ca,{'level':'success','command':_0x159611,'duration':_0x3b0d20,'details':_0x290263});}[a101_0x5b9b41(0x14b)](_0x4fc33e,_0x5ede2d,_0x325e4c){const _0x5cd1ad=a101_0x5b9b41;if(!this[_0x5cd1ad(0x141)]||!this['winstonLogger'])return;this['winstonLogger'][_0x5cd1ad(0x14b)](_0x5ede2d,{'command':_0x4fc33e,'details':_0x325e4c});}[a101_0x5b9b41(0x12d)](_0x4d60e5,_0xd23f49,_0x566e88){const _0xa46f14=a101_0x5b9b41;if(!this[_0xa46f14(0x141)]||!this['winstonLogger'])return;this[_0xa46f14(0x130)]['warn'](_0xd23f49,{'command':_0x4d60e5,'details':_0x566e88});}async[a101_0x5b9b41(0x129)](_0x54322e,_0x2c1792,_0x24b157){const _0x1a17cc=a101_0x5b9b41,_0x15a902=Date[_0x1a17cc(0x139)]();this['info'](_0x54322e,_0x1a17cc(0x136)+_0x2c1792);try{const _0x2389b3=await _0x24b157(),_0x2c6384=Date[_0x1a17cc(0x139)]()-_0x15a902;return this[_0x1a17cc(0x14c)](_0x54322e,'Completed:\x20'+_0x2c1792,_0x2c6384),_0x2389b3;}catch(_0x40edf2){const _0x5a4ea4=Date[_0x1a17cc(0x139)]()-_0x15a902;this[_0x1a17cc(0x14b)](_0x54322e,'Failed:\x20'+_0x2c1792,{'error':_0x40edf2 instanceof Error?_0x40edf2[_0x1a17cc(0x13f)]:String(_0x40edf2),'duration':_0x5a4ea4});throw _0x40edf2;}}['readLogs'](){const _0x3f0f0a=a101_0x5b9b41;try{if(!a101_0x326734[_0x3f0f0a(0x15a)](this[_0x3f0f0a(0x141)]))return[];const _0x37fca6=a101_0x326734['readFileSync'](this[_0x3f0f0a(0x141)],'utf8');return _0x37fca6[_0x3f0f0a(0x148)](/\r?\n/)[_0x3f0f0a(0x14f)](_0x3fe08b=>_0x3fe08b[_0x3f0f0a(0x158)]())['map'](_0x4fe2af=>JSON[_0x3f0f0a(0x146)](_0x4fe2af));}catch(_0xbcfe55){return console['warn'](_0x3f0f0a(0x137),_0xbcfe55),[];}}[a101_0x5b9b41(0x142)](){const _0x3698a8=a101_0x5b9b41;try{a101_0x326734[_0x3698a8(0x15a)](this['logFilePath'])&&a101_0x326734[_0x3698a8(0x12f)](this['logFilePath'],'','utf8');}catch(_0x416d13){console[_0x3698a8(0x12d)](_0x3698a8(0x13d),_0x416d13);}}[a101_0x5b9b41(0x13e)](){return this['winstonLogger'];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a102_0x1f11(_0x45a358,_0x2cd0a2){_0x45a358=_0x45a358-0xab;var _0x1e52a6=a102_0x1e52();var _0x1f1146=_0x1e52a6[_0x45a358];return _0x1f1146;}(function(_0x5d57d4,_0x3e9eae){var _0x2b0da9=a102_0x1f11,_0x2606bb=_0x5d57d4();while(!![]){try{var _0xc29906=-parseInt(_0x2b0da9(0xb5))/0x1*(parseInt(_0x2b0da9(0xb0))/0x2)+-parseInt(_0x2b0da9(0xbc))/0x3+parseInt(_0x2b0da9(0xb3))/0x4*(parseInt(_0x2b0da9(0xb6))/0x5)+-parseInt(_0x2b0da9(0xbb))/0x6+parseInt(_0x2b0da9(0xae))/0x7*(parseInt(_0x2b0da9(0xab))/0x8)+-parseInt(_0x2b0da9(0xb1))/0x9*(-parseInt(_0x2b0da9(0xb9))/0xa)+parseInt(_0x2b0da9(0xaf))/0xb;if(_0xc29906===_0x3e9eae)break;else _0x2606bb['push'](_0x2606bb['shift']());}catch(_0x478547){_0x2606bb['push'](_0x2606bb['shift']());}}}(a102_0x1e52,0xdcefa));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x533291){var _0x413ff1=a102_0x1f11;if(!_0x533291)return undefined;try{return JSON[_0x413ff1(0xb8)](_0x533291);}catch{throw CliErrors[_0x413ff1(0xb4)](_0x413ff1(0xba)+_0x533291);}}function a102_0x1e52(){var _0x42b5f4=['5132lcSCCp','validation','771YsuxdQ','2505lwUFXX','isArray','parse','215690WGFzIz','Invalid\x20JSON\x20for\x20--params:\x20','4219596LDqeDt','5202726JchUSX','2072848oxRfRj','object','items','21mSArUI','20165607gmqMnZ','2958ZuhvoE','513QyOGKD','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}'];a102_0x1e52=function(){return _0x42b5f4;};return a102_0x1e52();}export function parseJsonParamsValue(_0x4c5fa1){var _0x2604fc=a102_0x1f11;if(!_0x4c5fa1)return undefined;try{return JSON[_0x2604fc(0xb8)](_0x4c5fa1);}catch{throw CliErrors[_0x2604fc(0xb4)](_0x2604fc(0xba)+_0x4c5fa1);}}export function parseBatchCreateItemsFromParams(_0x43b933){var _0x494438=a102_0x1f11;if(Array[_0x494438(0xb7)](_0x43b933))return _0x43b933;if(_0x43b933!==null&&_0x43b933!==undefined&&typeof _0x43b933===_0x494438(0xac)&&Array['isArray'](_0x43b933['items']))return _0x43b933[_0x494438(0xad)];throw CliErrors[_0x494438(0xb4)](_0x494438(0xb2),'Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27');}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a103_0x3a1c(){const _0x554d2c=['12qmReJD','339114NsltEf','25301VUKfZi','platform','994140PCUZwK','9myFlbd','62OpKAVk','1095180rbGJXp','1282578KHrqut','9qccunn','55UAgiSZ','win32','3121912tfHrlZ','6418450ZCJMYx'];a103_0x3a1c=function(){return _0x554d2c;};return a103_0x3a1c();}const a103_0x4bcd58=a103_0x5f4a;function a103_0x5f4a(_0x524488,_0x415b06){_0x524488=_0x524488-0x14c;const _0x3a1c96=a103_0x3a1c();let _0x5f4abe=_0x3a1c96[_0x524488];return _0x5f4abe;}(function(_0x454163,_0x1fb2d8){const _0x3046e9=a103_0x5f4a,_0x1a3180=_0x454163();while(!![]){try{const _0x3b682d=parseInt(_0x3046e9(0x154))/0x1*(parseInt(_0x3046e9(0x158))/0x2)+parseInt(_0x3046e9(0x14d))/0x3*(-parseInt(_0x3046e9(0x159))/0x4)+parseInt(_0x3046e9(0x14e))/0x5*(parseInt(_0x3046e9(0x153))/0x6)+-parseInt(_0x3046e9(0x156))/0x7+-parseInt(_0x3046e9(0x150))/0x8+-parseInt(_0x3046e9(0x157))/0x9*(-parseInt(_0x3046e9(0x151))/0xa)+parseInt(_0x3046e9(0x14c))/0xb*(-parseInt(_0x3046e9(0x152))/0xc);if(_0x3b682d===_0x1fb2d8)break;else _0x1a3180['push'](_0x1a3180['shift']());}catch(_0x2ee249){_0x1a3180['push'](_0x1a3180['shift']());}}}(a103_0x3a1c,0x8d06b));export const isWindows=process[a103_0x4bcd58(0x155)]===a103_0x4bcd58(0x14f);export function resolveNpmBin(_0x19b9ab){return isWindows?_0x19b9ab+'.cmd':_0x19b9ab;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a104_0x2d9b(_0x237c02,_0x4f0091){_0x237c02=_0x237c02-0x74;const _0x1d0d82=a104_0x1d0d();let _0x2d9b97=_0x1d0d82[_0x237c02];return _0x2d9b97;}(function(_0x439211,_0x8003e1){const _0x33db99=a104_0x2d9b,_0x31ae2d=_0x439211();while(!![]){try{const _0x3d7b5e=-parseInt(_0x33db99(0x8c))/0x1+-parseInt(_0x33db99(0x7e))/0x2+parseInt(_0x33db99(0x98))/0x3+parseInt(_0x33db99(0x80))/0x4+-parseInt(_0x33db99(0x88))/0x5+-parseInt(_0x33db99(0x78))/0x6+-parseInt(_0x33db99(0x84))/0x7*(-parseInt(_0x33db99(0x83))/0x8);if(_0x3d7b5e===_0x8003e1)break;else _0x31ae2d['push'](_0x31ae2d['shift']());}catch(_0x5ae8bc){_0x31ae2d['push'](_0x31ae2d['shift']());}}}(a104_0x1d0d,0x34732));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(_0x403af0){const _0x2c615e=a104_0x2d9b,_0xa202d0=_0x403af0[_0x2c615e(0x8d)]()[_0x2c615e(0x85)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0xa202d0)return null;return{'major':Number(_0xa202d0[0x1]),'minor':Number(_0xa202d0[0x2]),'patch':Number(_0xa202d0[0x3]),'prerelease':_0xa202d0[0x4]};}function compareSemver(_0x277ef8,_0x426d33){const _0x347708=a104_0x2d9b,_0x52a8f6=parseSemver(_0x277ef8),_0x522682=parseSemver(_0x426d33);if(!_0x52a8f6||!_0x522682)throw new Error(_0x347708(0x96));for(const _0x1a9e50 of[_0x347708(0x97),_0x347708(0x91),_0x347708(0x8e)]){if(_0x52a8f6[_0x1a9e50]<_0x522682[_0x1a9e50])return-0x1;if(_0x52a8f6[_0x1a9e50]>_0x522682[_0x1a9e50])return 0x1;}if(!_0x52a8f6[_0x347708(0x77)]&&!_0x522682[_0x347708(0x77)])return 0x0;if(!_0x52a8f6[_0x347708(0x77)])return 0x1;if(!_0x522682[_0x347708(0x77)])return-0x1;if(_0x52a8f6[_0x347708(0x77)]===_0x522682[_0x347708(0x77)])return 0x0;return _0x52a8f6[_0x347708(0x77)]<_0x522682['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x4c1ad7=a104_0x2d9b,_0x9fce91=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x4c1ad7(0x8d)]()[_0x4c1ad7(0x89)]();return _0x9fce91==='1'||_0x9fce91==='true'||_0x9fce91===_0x4c1ad7(0x74);}function cacheRoot(){const _0x439be8=a104_0x2d9b;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x439be8(0x92));}export function getUpdateNoticeCachePath(){const _0x384d16=a104_0x2d9b;return join(cacheRoot(),_0x384d16(0x75),_0x384d16(0x7a));}async function readUpdateNoticeCache(){const _0x291c4f=a104_0x2d9b;try{const _0xf3b1f8=await readFile(getUpdateNoticeCachePath(),_0x291c4f(0x82)),_0x58364b=JSON[_0x291c4f(0x86)](_0xf3b1f8);if(!_0x58364b||typeof _0x58364b!=='object')return{};return _0x58364b;}catch{return{};}}async function writeUpdateNoticeCache(_0xcf63a3){try{const _0x3cd150=getUpdateNoticeCachePath();await mkdir(dirname(_0x3cd150),{'recursive':!![]}),await writeFile(_0x3cd150,JSON['stringify'](_0xcf63a3,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x119d28,_0x5c38ab){const _0x114d3c=a104_0x2d9b;return typeof _0x119d28[_0x114d3c(0x8a)]==='number'&&_0x5c38ab-_0x119d28[_0x114d3c(0x8a)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x1ed189,_0x30f60c,_0x49b78b){const _0x1cdc3d=a104_0x2d9b;return _0x1ed189[_0x1cdc3d(0x95)]===_0x30f60c&&typeof _0x1ed189[_0x1cdc3d(0x7b)]===_0x1cdc3d(0x79)&&_0x49b78b-_0x1ed189['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x5b4fa=0x5dc){const _0x218c22=a104_0x2d9b;try{const _0x4363de=NPM_REGISTRY_BASE_URL+_0x218c22(0x81)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x218c22(0x7c),_0x366fd7=await fetch(_0x4363de,{'signal':AbortSignal['timeout'](_0x5b4fa)});if(!_0x366fd7['ok'])return null;const _0x389895=await _0x366fd7['json']();if(!_0x389895||typeof _0x389895!==_0x218c22(0x87))return null;return Object[_0x218c22(0x94)](Object['entries'](_0x389895)[_0x218c22(0x7f)](([,_0x363241])=>typeof _0x363241===_0x218c22(0x7d)&&_0x363241[_0x218c22(0x8d)]())[_0x218c22(0x90)](([_0x5ea67f,_0x183f21])=>[_0x5ea67f,String(_0x183f21)[_0x218c22(0x8d)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x3b9af8){const _0x45cbdc=a104_0x2d9b;return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+_0x45cbdc(0x8b)+_0x3b9af8;}export async function resolveLatestUpdateNotice(){const _0x39e145=a104_0x2d9b;if(isUpdateNoticeDisabled())return null;try{const _0x4d4bf8=Date['now'](),_0x4213b6=getCliVersion(),_0x112029=await readUpdateNoticeCache();let _0x1dc9bd=isFreshCheck(_0x112029,_0x4d4bf8)?_0x112029['latest']?.[_0x39e145(0x8d)]():undefined;if(!_0x1dc9bd&&!isFreshCheck(_0x112029,_0x4d4bf8)){const _0x25f8a3=await fetchNpmDistTags();_0x1dc9bd=_0x25f8a3?.[_0x39e145(0x76)]?.['trim'](),await writeUpdateNoticeCache({..._0x112029,'checkedAt':_0x4d4bf8,'latest':_0x1dc9bd,'failed':!_0x1dc9bd});}if(!_0x1dc9bd||compareSemver(_0x4213b6,_0x1dc9bd)>=0x0)return null;if(isRecentlyNotified(_0x112029,_0x1dc9bd,_0x4d4bf8))return null;const _0x47095e=CLI_BIN_NAME+_0x39e145(0x8f);return await writeUpdateNoticeCache({..._0x112029,'checkedAt':isFreshCheck(_0x112029,_0x4d4bf8)?_0x112029[_0x39e145(0x8a)]:_0x4d4bf8,'latest':_0x1dc9bd,'failed':![],'lastNotifiedVersion':_0x1dc9bd,'lastNotifiedAt':_0x4d4bf8}),{'command':_0x47095e,'current':_0x4213b6,'latest':_0x1dc9bd,'url':buildNpmVersionUrl(_0x1dc9bd),'message':CLI_BIN_NAME+'\x20'+_0x1dc9bd+_0x39e145(0x93)+_0x4213b6+',\x20run:\x20'+_0x47095e};}catch{return null;}}function a104_0x1d0d(){const _0x34d908=['fromEntries','lastNotifiedVersion','Invalid\x20semver','major','126741WHyerk','yes','lovrabet-cli','latest','prerelease','1585806JKBIKG','number','update-check.json','lastNotifiedAt','/dist-tags','string','274862LfilmN','filter','419728GBQhik','/-/package/','utf8','1352iBwVVE','45101MsLPzD','match','parse','object','1980990Obflxz','toLowerCase','checkedAt','/v/','223282EzxTjU','trim','patch','\x20update','map','minor','.cache','\x20available,\x20current\x20'];a104_0x1d0d=function(){return _0x34d908;};return a104_0x1d0d();}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a105_0x5f5b(){const _0x3c14d3=['25iJiHOB','unknown','2962oHMVAf','90060VCkXLv','11624FHDXhp','132JradwP','61895wDxcjQ','1936960FinWIy','9frrSfJ','91TBjKVE','4319645NUACGa','46332eVyQPU'];a105_0x5f5b=function(){return _0x3c14d3;};return a105_0x5f5b();}function a105_0x1876(_0x5162f8,_0x236bf4){_0x5162f8=_0x5162f8-0x8b;const _0x5f5b92=a105_0x5f5b();let _0x187650=_0x5f5b92[_0x5162f8];return _0x187650;}(function(_0xbfdcb6,_0x4e2ce6){const _0x3403ce=a105_0x1876,_0x54420f=_0xbfdcb6();while(!![]){try{const _0x2fd5f6=parseInt(_0x3403ce(0x91))/0x1*(parseInt(_0x3403ce(0x93))/0x2)+parseInt(_0x3403ce(0x90))/0x3+parseInt(_0x3403ce(0x94))/0x4+-parseInt(_0x3403ce(0x8b))/0x5*(-parseInt(_0x3403ce(0x96))/0x6)+parseInt(_0x3403ce(0x8e))/0x7*(parseInt(_0x3403ce(0x95))/0x8)+-parseInt(_0x3403ce(0x8d))/0x9*(-parseInt(_0x3403ce(0x8c))/0xa)+-parseInt(_0x3403ce(0x8f))/0xb;if(_0x2fd5f6===_0x4e2ce6)break;else _0x54420f['push'](_0x54420f['shift']());}catch(_0x2c5c12){_0x54420f['push'](_0x54420f['shift']());}}}(a105_0x5f5b,0x28d2c));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x2ecc7c=a105_0x1876,_0x5c8bc5=String(GIT_COMMIT);return _0x5c8bc5&&_0x5c8bc5!==_0x2ecc7c(0x92)?_0x5c8bc5:'';}export function getCliVersionDisplay(){const _0x5c4e69=getCliGitCommit(),_0x363057=BUILD_TIME['slice'](0x0,0xa);if(!_0x5c4e69||!_0x363057)return VERSION;return VERSION+'\x20('+_0x5c4e69+',\x20'+_0x363057+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4106b3,_0xdf6762){var _0xeb88d=a106_0x5dd8,_0x3f8949=_0x4106b3();while(!![]){try{var _0x62e02b=parseInt(_0xeb88d(0x1f4))/0x1+-parseInt(_0xeb88d(0x1f2))/0x2+-parseInt(_0xeb88d(0x1f6))/0x3+parseInt(_0xeb88d(0x1ef))/0x4*(parseInt(_0xeb88d(0x1f5))/0x5)+-parseInt(_0xeb88d(0x1ec))/0x6*(-parseInt(_0xeb88d(0x1f1))/0x7)+parseInt(_0xeb88d(0x1f3))/0x8+-parseInt(_0xeb88d(0x1ed))/0x9;if(_0x62e02b===_0xdf6762)break;else _0x3f8949['push'](_0x3f8949['shift']());}catch(_0x1d995d){_0x3f8949['push'](_0x3f8949['shift']());}}}(a106_0x4b1a,0x26bd7));export function writeCliSideChannelLine(_0xc65103){var _0x41daf7=a106_0x5dd8;process[_0x41daf7(0x1ee)][_0x41daf7(0x1f0)](_0xc65103+'\x0a');}function a106_0x5dd8(_0x114a07,_0x8834e){_0x114a07=_0x114a07-0x1ec;var _0x4b1acf=a106_0x4b1a();var _0x5dd86e=_0x4b1acf[_0x114a07];return _0x5dd86e;}function a106_0x4b1a(){var _0x2ef58f=['write','1837808KyUCdc','50516wzbyYF','882584BJWNVi','274393EiYVTP','5EPFtSW','83235leWIly','6weduaS','4694049AThtrz','stderr','343932WuHZPJ'];a106_0x4b1a=function(){return _0x2ef58f;};return a106_0x4b1a();}
|