@lovrabet/lovrabet-cli 2.1.6-beta.2 → 2.1.6-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/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(_0x56c783,_0x36946f){const _0x231686=a91_0xa47d,_0x4acf3b=_0x56c783();while(!![]){try{const _0x11cd30=-parseInt(_0x231686(0xce))/0x1*(parseInt(_0x231686(0xee))/0x2)+parseInt(_0x231686(0xde))/0x3*(-parseInt(_0x231686(0xe0))/0x4)+-parseInt(_0x231686(0xe7))/0x5+-parseInt(_0x231686(0xe1))/0x6*(-parseInt(_0x231686(0xf5))/0x7)+-parseInt(_0x231686(0xd3))/0x8*(-parseInt(_0x231686(0xdc))/0x9)+parseInt(_0x231686(0xd5))/0xa+parseInt(_0x231686(0xf8))/0xb;if(_0x11cd30===_0x36946f)break;else _0x4acf3b['push'](_0x4acf3b['shift']());}catch(_0x2573fe){_0x4acf3b['push'](_0x4acf3b['shift']());}}}(a91_0x554f,0x36e2c));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';function a91_0xa47d(_0x2deac2,_0x185961){_0x2deac2=_0x2deac2-0xcb;const _0x554f2e=a91_0x554f();let _0xa47d24=_0x554f2e[_0x2deac2];return _0xa47d24;}import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';function a91_0x554f(){const _0x583b27=['entries','14004LgGhfc','.\x20Changed\x20file:\x20','6AQbiAf','utf8','764524YRZNvc','12LJguhT','description','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','has','accessKey','---','2097190jpsCyV','find','pulledAt','name','test','paths','force','10tsNTcf','contentHash','appCode','replace','trim','packageBytes','fileHashes','1391957ECCJSm','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','map','4614093mlOyrR','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','keys','skillName','45288mgbPjN','Runtime\x20Skill\x20package\x20is\x20missing\x20','isFile','length','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','8Gxnncb','env','4342310HJVwGC','path','stringify','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','name:\x20','validation'];a91_0x554f=function(){return _0x583b27;};return a91_0x554f();}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(_0x905c43,_0x3f90a3,_0x4e459b){const _0x5062ec=a91_0xa47d,_0x508c01=requireSkillCode(_0x905c43),_0x36c675=requirePackageBytes(_0x508c01,_0x4e459b[_0x5062ec(0xf3)]),_0x52bd9d=extractDownloadedPackage(_0x36c675),_0xb74790=_0x52bd9d[_0x5062ec(0xe8)](_0x33648f=>_0x33648f[_0x5062ec(0xd6)]===SKILL_FILE);if(!_0xb74790)throw CliErrors[_0x5062ec(0xda)](_0x5062ec(0xcf)+SKILL_FILE+':\x20'+_0x508c01);const _0xc594b2=withMaterializedSkillFrontmatter(_0x52bd9d,_0x905c43,_0x508c01),_0x270542=_0xc594b2[_0x5062ec(0xe8)](_0x20298d=>_0x20298d[_0x5062ec(0xd6)]===SKILL_FILE),_0x2cefc5=fileText(_0x270542),_0x35a66e=getRuntimeSkillDir(_0x4e459b[_0x5062ec(0xd4)],_0x4e459b[_0x5062ec(0xe5)],_0x4e459b[_0x5062ec(0xf0)],_0x3f90a3,_0x508c01,_0x4e459b[_0x5062ec(0xec)]),_0x1e9787=resolve(_0x35a66e,SKILL_FILE),_0x318d37=resolve(_0x35a66e,METADATA_FILE),_0x175d8c=contentHash(_0x2cefc5),_0x1514c5=readMetadataIfPresent(_0x318d37)?.[_0x5062ec(0xf4)];ensurePulledFilesCanBeOverwritten(_0x35a66e,_0x318d37,_0xc594b2,_0x4e459b[_0x5062ec(0xed)]===!![]),mkdirSync(_0x35a66e,{'recursive':!![],'mode':0x1c0});const _0x1e6aa6=existsSync(_0x1e9787)?readFileSync(_0x1e9787,'utf8'):undefined;return materializeFiles(_0x35a66e,_0xc594b2),removeStaleManagedFiles(_0x35a66e,_0x1514c5,_0xc594b2),writeJsonAtomic(_0x318d37,buildMetadata(_0x905c43,_0x3f90a3,_0x4e459b[_0x5062ec(0xf0)],_0x175d8c,_0x4e459b[_0x5062ec(0xe9)],_0xc594b2,_0x36c675)),{'skill':_0x905c43,'scope':_0x3f90a3,'dir':_0x35a66e,'skillMdPath':_0x1e9787,'metadataPath':_0x318d37,'contentHash':_0x175d8c,'changed':_0x1e6aa6!==_0x2cefc5};}function withMaterializedSkillFrontmatter(_0x472918,_0x13f254,_0x44d12e){const _0x23dc58=a91_0xa47d;return normalizeLocalFiles(_0x472918)[_0x23dc58(0xf7)](_0x23cf8d=>{const _0x2e611f=_0x23dc58,_0x56f891=fileText(_0x23cf8d);if(_0x23cf8d[_0x2e611f(0xd6)]!==SKILL_FILE||hasYamlFrontmatter(_0x56f891))return _0x23cf8d;return{'path':_0x23cf8d[_0x2e611f(0xd6)],'content':prependSkillFrontmatter(_0x56f891,{'name':_0x44d12e,'description':_0x13f254[_0x2e611f(0xe2)]?.['trim']()||_0x13f254[_0x2e611f(0xcd)]?.[_0x2e611f(0xf2)]()||_0x44d12e})};});}function hasYamlFrontmatter(_0x376b70){const _0x512415=a91_0xa47d;return/^\uFEFF?---\s*\r?\n/[_0x512415(0xeb)](_0x376b70);}function prependSkillFrontmatter(_0x5e4a89,_0x54e415){const _0xc264de=a91_0xa47d,_0x374ac9=_0x5e4a89[_0xc264de(0xf1)](/^\uFEFF/,'');return['---',_0xc264de(0xd9)+yamlString(_0x54e415[_0xc264de(0xea)]),'description:\x20'+yamlString(_0x54e415['description']),_0xc264de(0xe6),'',_0x374ac9]['join']('\x0a');}function yamlString(_0x54bdc3){const _0x3e8cb2=a91_0xa47d;return JSON[_0x3e8cb2(0xd7)](_0x54bdc3['replace'](/\r/g,'')[_0x3e8cb2(0xf2)]());}function ensurePulledFilesCanBeOverwritten(_0x3fe4c9,_0x222acf,_0x96379b,_0x38e933){const _0x13fdf4=a91_0xa47d;if(_0x38e933||!existsSync(_0x222acf))return;const _0x5463c3=readMetadataIfPresent(_0x222acf);if(!_0x5463c3)return;const _0x44dff9=_0x5463c3[_0x13fdf4(0xf4)]&&Object[_0x13fdf4(0xcc)](_0x5463c3[_0x13fdf4(0xf4)])[_0x13fdf4(0xd1)]>0x0?_0x5463c3[_0x13fdf4(0xf4)]:undefined;if(_0x44dff9)for(const [_0x1d5cbc,_0x5bd745]of Object[_0x13fdf4(0xdb)](_0x44dff9)){const _0x4c2d97=resolveManagedFilePath(_0x3fe4c9,_0x1d5cbc);if(!existsSync(_0x4c2d97))throw CliErrors[_0x13fdf4(0xda)](_0x13fdf4(0xcb)+_0x3fe4c9,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x1d5cbc);const _0x113bce=lstatSync(_0x4c2d97);if(!_0x113bce[_0x13fdf4(0xd0)]())throw CliErrors[_0x13fdf4(0xda)](_0x13fdf4(0xcb)+_0x3fe4c9,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x1d5cbc);const _0x1b49f0=bufferSha256(readFileSync(_0x4c2d97));if(_0x1b49f0!==_0x5bd745)throw CliErrors['validation'](_0x13fdf4(0xcb)+_0x3fe4c9+_0x13fdf4(0xdd)+_0x1d5cbc,_0x13fdf4(0xe3)+_0x1d5cbc);}else{const _0x3b0883=resolve(_0x3fe4c9,SKILL_FILE);if(existsSync(_0x3b0883)&&_0x5463c3[_0x13fdf4(0xef)]){const _0x50ddeb=contentHash(readFileSync(_0x3b0883,_0x13fdf4(0xdf)));if(_0x50ddeb!==_0x5463c3[_0x13fdf4(0xef)])throw CliErrors['validation']('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x3b0883,_0x13fdf4(0xf6));}}for(const _0xa56b2c of normalizeLocalFiles(_0x96379b)){if(_0x44dff9?.[_0xa56b2c[_0x13fdf4(0xd6)]])continue;if(!_0x44dff9&&_0xa56b2c[_0x13fdf4(0xd6)]===SKILL_FILE)continue;const _0x33dda8=resolveManagedFilePath(_0x3fe4c9,_0xa56b2c[_0x13fdf4(0xd6)]);if(!existsSync(_0x33dda8))continue;const _0x388027=lstatSync(_0x33dda8);if(!_0x388027['isFile']())throw CliErrors[_0x13fdf4(0xda)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x3fe4c9,_0x13fdf4(0xd2)+_0xa56b2c[_0x13fdf4(0xd6)]);const _0x365a75=bufferSha256(readFileSync(_0x33dda8));if(_0x365a75!==fileHash(_0xa56b2c))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x3fe4c9,_0x13fdf4(0xd8)+_0xa56b2c['path']);}}function materializeFiles(_0x54ef7c,_0x1267a5){for(const _0x204024 of normalizeLocalFiles(_0x1267a5)){const _0x1825fb=resolveManagedFilePath(_0x54ef7c,_0x204024['path']);mkdirSync(dirname(_0x1825fb),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x1825fb,fileContent(_0x204024),0x180);}}function removeStaleManagedFiles(_0x311b33,_0x22c071,_0x1ed292){const _0x212674=a91_0xa47d;if(!_0x22c071)return;const _0x5efd17=new Set(normalizeLocalFiles(_0x1ed292)[_0x212674(0xf7)](_0x549513=>_0x549513[_0x212674(0xd6)]));for(const _0x45736c of Object[_0x212674(0xcc)](_0x22c071)){if(_0x5efd17[_0x212674(0xe4)](_0x45736c))continue;const _0x147aa1=resolveManagedFilePath(_0x311b33,_0x45736c);existsSync(_0x147aa1)&&lstatSync(_0x147aa1)[_0x212674(0xd0)]()&&rmSync(_0x147aa1,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14f3b7,_0x44afb8){const _0x1c56b8=a92_0x1ae4,_0xa2ce66=_0x14f3b7();while(!![]){try{const _0x125d62=-parseInt(_0x1c56b8(0x15e))/0x1*(-parseInt(_0x1c56b8(0x159))/0x2)+parseInt(_0x1c56b8(0x15f))/0x3+-parseInt(_0x1c56b8(0x16e))/0x4+-parseInt(_0x1c56b8(0x170))/0x5+parseInt(_0x1c56b8(0x150))/0x6*(parseInt(_0x1c56b8(0x168))/0x7)+-parseInt(_0x1c56b8(0x15b))/0x8*(-parseInt(_0x1c56b8(0x165))/0x9)+-parseInt(_0x1c56b8(0x14f))/0xa;if(_0x125d62===_0x44afb8)break;else _0xa2ce66['push'](_0xa2ce66['shift']());}catch(_0x258d6f){_0xa2ce66['push'](_0xa2ce66['shift']());}}}(a92_0x448b,0x92a41));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';function a92_0x1ae4(_0x553345,_0x298b2f){_0x553345=_0x553345-0x14f;const _0x448b4c=a92_0x448b();let _0x1ae4fa=_0x448b4c[_0x553345];return _0x1ae4fa;}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';function a92_0x448b(){const _0xfa5b67=['1694uoEjKK','readonly','files','version','toISOString','trim','2723272KJXKky','skillCode','301540NPIFGT','sourceSessionId','map','Runtime\x20Skill\x20is\x20missing\x20skillCode.','9169490qYyHdM','10668nrdcZQ','description','forkedFromVersion','path','tags','ossPath','zipSha256','personal','status','2RBpCfq','parse','1259992ToCHuM','object','skillName','502079BLiAlv','2089095iBQCFI','hasUpstreamUpdate','manifest','validation','forkedFromSkillId','length','36digukY','isArray','zipSize'];a92_0x448b=function(){return _0xfa5b67;};return a92_0x448b();}export function buildMetadata(_0x545410,_0x1e28ac,_0x2aeac1,_0x134a7d,_0x38038b,_0x72b43d,_0x5f2284){const _0x300f9a=a92_0x1ae4,_0x2e4471=_0x72b43d?normalizeLocalFiles(_0x72b43d):[],_0x15cb0b=!_0x5f2284&&_0x2e4471[_0x300f9a(0x164)]>0x0?buildSkillPackage(_0x2e4471):undefined,_0x2c5e73=_0x5f2284?bufferSha256(_0x5f2284):_0x15cb0b?.[_0x300f9a(0x161)][_0x300f9a(0x156)],_0x130468=_0x5f2284?.[_0x300f9a(0x164)]??_0x15cb0b?.['manifest'][_0x300f9a(0x167)],_0x42fae8=_0x2e4471[_0x300f9a(0x164)]>0x0?Object['fromEntries'](_0x2e4471[_0x300f9a(0x172)](_0x4bce26=>[_0x4bce26[_0x300f9a(0x153)],fileHash(_0x4bce26)])):undefined;return{'schemaVersion':_0x2e4471[_0x300f9a(0x164)]>0x0?0x2:0x1,'id':_0x545410['id'],'appCode':_0x2aeac1,'skillCode':requireSkillCode(_0x545410),'skillName':_0x545410[_0x300f9a(0x15d)],'description':_0x545410[_0x300f9a(0x151)],'scope':_0x1e28ac,'readonly':_0x1e28ac!==_0x300f9a(0x157)||_0x545410[_0x300f9a(0x169)]===!![],'tenantCode':_0x545410['tenantCode'],'userId':_0x545410['userId'],'version':_0x545410[_0x300f9a(0x16b)],'status':_0x545410[_0x300f9a(0x158)],'tags':Array[_0x300f9a(0x166)](_0x545410[_0x300f9a(0x154)])?_0x545410[_0x300f9a(0x154)]:[],'hasUpstreamUpdate':_0x545410[_0x300f9a(0x160)],'forkedFromSkillId':_0x545410[_0x300f9a(0x163)],'forkedFromVersion':_0x545410[_0x300f9a(0x152)],'sourceSessionId':_0x545410[_0x300f9a(0x171)],'contentHash':_0x134a7d,'fileHashes':_0x42fae8,'treeHash':_0x2e4471[_0x300f9a(0x164)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x2e4471)):undefined,'ossPath':remoteManifestOssPath(_0x545410[_0x300f9a(0x16a)]),'zipSha256':_0x2c5e73,'zipSize':_0x130468,'files':_0x2e4471[_0x300f9a(0x164)]>0x0?_0x2e4471[_0x300f9a(0x172)](_0x2d9954=>({'path':_0x2d9954['path'],'hash':fileHash(_0x2d9954),'size':fileContent(_0x2d9954)[_0x300f9a(0x164)]})):undefined,'pulledAt':_0x38038b??new Date()[_0x300f9a(0x16c)]()};}export function requireSkillCode(_0x2dab37){const _0xa6d2b7=a92_0x1ae4,_0x2628d0=_0x2dab37[_0xa6d2b7(0x16f)]?.[_0xa6d2b7(0x16d)]();if(!_0x2628d0)throw CliErrors[_0xa6d2b7(0x162)](_0xa6d2b7(0x173));return _0x2628d0;}export function readMetadataIfPresent(_0x1cbde2){const _0x3dfde7=a92_0x1ae4;if(!existsSync(_0x1cbde2))return undefined;try{const _0x1224b4=JSON[_0x3dfde7(0x15a)](readFileSync(_0x1cbde2,'utf8'));return _0x1224b4;}catch{throw CliErrors[_0x3dfde7(0x162)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x1cbde2);}}function remoteManifestOssPath(_0x55ffa5){const _0x45eefa=a92_0x1ae4;if(!_0x55ffa5||typeof _0x55ffa5!==_0x45eefa(0x15c)||Array[_0x45eefa(0x166)](_0x55ffa5))return undefined;const _0x196b25=_0x55ffa5[_0x45eefa(0x155)];return typeof _0x196b25==='string'&&_0x196b25[_0x45eefa(0x16d)]()?_0x196b25[_0x45eefa(0x16d)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a93_0xde11(){const _0x418a8d=['validation','14999390Ewwoqt','787213RbWlSf','5376ZXtBvu','includes','10955956OoZcqQ','93151tWokKr','.agents','\x20for\x20local\x20path:\x20','skills','5WmpRkV','homeDirName','trim','8139282aXsyyr','claudeSkillsDir','appCode','2obihgy','homeDir','skillCode','SKILL_ROOT','agentsSkillsDir','76gMcQkZ','Unsafe\x20','cache','3612618cphJvI','40jbYFDZ'];a93_0xde11=function(){return _0x418a8d;};return a93_0xde11();}(function(_0x13dadf,_0x11ae28){const _0x16dc04=a93_0x2a4c,_0x820bc5=_0x13dadf();while(!![]){try{const _0x4f10dc=parseInt(_0x16dc04(0xdb))/0x1*(-parseInt(_0x16dc04(0xe5))/0x2)+parseInt(_0x16dc04(0xd8))/0x3*(-parseInt(_0x16dc04(0xd0))/0x4)+-parseInt(_0x16dc04(0xdf))/0x5*(-parseInt(_0x16dc04(0xe2))/0x6)+-parseInt(_0x16dc04(0xd7))/0x7*(parseInt(_0x16dc04(0xd4))/0x8)+-parseInt(_0x16dc04(0xd3))/0x9+parseInt(_0x16dc04(0xd6))/0xa+-parseInt(_0x16dc04(0xda))/0xb;if(_0x4f10dc===_0x11ae28)break;else _0x820bc5['push'](_0x820bc5['shift']());}catch(_0x48f8bc){_0x820bc5['push'](_0x820bc5['shift']());}}}(a93_0xde11,0xbbe3a));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_0x2a4c(_0x54eafb,_0x402d12){_0x54eafb=_0x54eafb-0xd0;const _0xde1191=a93_0xde11();let _0x2a4c3b=_0xde1191[_0x54eafb];return _0x2a4c3b;}export function resolveSkillSyncPaths(_0x3949c1={}){const _0x5567e8=a93_0x2a4c,_0x1756da=_0x3949c1[_0x5567e8(0xe6)]??homedir(),_0x505df9=resolve(_0x1756da,PRODUCT_CONFIG['homeDirName'],_0x5567e8(0xd2)),_0x42c839=trimmedEnv(_0x5567e8(0xe8)),_0x44f5cb=trimmedEnv('CLAUDE_SKILL_ROOT');return{'homeDir':_0x1756da,'cacheRoot':_0x505df9,'managedRoot':resolve(_0x1756da,PRODUCT_CONFIG[_0x5567e8(0xe0)]),'agentsSkillsDir':_0x3949c1[_0x5567e8(0xe9)]??_0x42c839??resolve(_0x1756da,_0x5567e8(0xdc),'skills'),'claudeSkillsDir':_0x3949c1[_0x5567e8(0xe3)]??_0x44f5cb??resolve(_0x1756da,'.claude',_0x5567e8(0xde))};}export function getRuntimeSkillCacheRoot(_0x212938,_0x2518e5,_0x3a7fe7={}){const _0x3a8568=a93_0x2a4c,_0x8d2980=resolveSkillSyncPaths(_0x3a7fe7);return resolve(_0x8d2980['cacheRoot'],_0x212938,fingerprintAccessKey(_0x2518e5),_0x3a8568(0xde));}export function getRuntimeSkillDir(_0x113f5a,_0x62c84c,_0x1f75b4,_0x97ef27,_0x2ee957,_0x32e99a={}){const _0x33552a=a93_0x2a4c;return resolve(getRuntimeSkillCacheRoot(_0x113f5a,_0x62c84c,_0x32e99a),safePathSegment(_0x1f75b4,_0x33552a(0xe4)),_0x97ef27,safePathSegment(_0x2ee957,_0x33552a(0xe7)));}export function safePathSegment(_0x3ea85b,_0x6bb20='path\x20segment'){const _0x3a4d79=a93_0x2a4c;if(!_0x3ea85b||_0x3ea85b[_0x3a4d79(0xd9)]('/')||_0x3ea85b[_0x3a4d79(0xd9)]('\x5c')||_0x3ea85b[_0x3a4d79(0xd9)]('..'))throw CliErrors[_0x3a4d79(0xd5)](_0x3a4d79(0xd1)+_0x6bb20+_0x3a4d79(0xdd)+_0x3ea85b);return _0x3ea85b;}function trimmedEnv(_0x3b89b1){const _0x5b3e35=a93_0x2a4c,_0x4fd137=productEnv(_0x3b89b1)?.[_0x5b3e35(0xe1)]();return _0x4fd137?_0x4fd137:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d73b1,_0x3f35e2){const _0x42b05a=a94_0x5c24,_0x5be59b=_0x3d73b1();while(!![]){try{const _0x3df4c4=parseInt(_0x42b05a(0xae))/0x1*(-parseInt(_0x42b05a(0xb6))/0x2)+-parseInt(_0x42b05a(0xba))/0x3*(parseInt(_0x42b05a(0xbc))/0x4)+parseInt(_0x42b05a(0xa9))/0x5+-parseInt(_0x42b05a(0xbb))/0x6+-parseInt(_0x42b05a(0xbf))/0x7+parseInt(_0x42b05a(0xb4))/0x8*(-parseInt(_0x42b05a(0xc1))/0x9)+parseInt(_0x42b05a(0xad))/0xa;if(_0x3df4c4===_0x3f35e2)break;else _0x5be59b['push'](_0x5be59b['shift']());}catch(_0x58b3af){_0x5be59b['push'](_0x5be59b['shift']());}}}(a94_0xbe00,0x5aa54));function a94_0x5c24(_0x5119c2,_0x424e5e){_0x5119c2=_0x5119c2-0x9f;const _0xbe00e1=a94_0xbe00();let _0x5c2407=_0xbe00e1[_0x5119c2];return _0x5c2407;}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';function a94_0xbe00(){const _0x8b0fec=['27RNcnZx','4027554UFWbrf','283416uneNjt','slice','scope','4303460qYbnru','some','1217853nrVzax','manifest','path','personal','isSymbolicLink','isDirectory','sourceSessionId','appCode','packageBase64','description','filter','isFile','2432810Qsmttm','content','files','Missing\x20','28566950QDqqPB','50698PdPbcm','\x20has\x20scope=\x22','validation','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','pushedAt','utf8','32ITlFIf','\x20or\x20directory\x20name.','20zMChRq','find','length','tags'];a94_0xbe00=function(){return _0x8b0fec;};return a94_0xbe00();}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';export function readPushDirectory(_0x8c6a42,_0x282dee){const _0x21b600=a94_0x5c24,_0x5ca640=resolvePushDirectoryRoot(_0x8c6a42),_0x11d44c=resolve(_0x5ca640,SKILL_FILE);if(!existsSync(_0x11d44c)||!lstatSync(_0x11d44c)[_0x21b600(0xa8)]())throw CliErrors[_0x21b600(0xb0)](_0x21b600(0xac)+SKILL_FILE+':\x20'+_0x11d44c);const _0x42da3b=readMetadataIfPresent(resolve(_0x5ca640,METADATA_FILE));if(_0x42da3b?.['scope']&&_0x42da3b[_0x21b600(0xbe)]!==_0x21b600(0xa0))throw CliErrors[_0x21b600(0xb0)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x21b600(0xaf)+_0x42da3b['scope']+'\x22.');if(_0x42da3b?.[_0x21b600(0xa4)]&&_0x42da3b[_0x21b600(0xa4)]!==_0x282dee)throw CliErrors['validation']('Skill\x20metadata\x20appCode\x20\x22'+_0x42da3b[_0x21b600(0xa4)]+_0x21b600(0xb1)+_0x282dee+'\x22.');const _0x5270a0=scanSkillDirectory(_0x5ca640),_0x567eb9=buildSkillPackage(_0x5270a0),_0x53412d=readFileSync(_0x11d44c,_0x21b600(0xb3)),_0x1044a2=_0x42da3b?.['skillCode']??deriveSkillCodeFromDirectory(_0x5ca640,_0x282dee);if(!_0x1044a2)throw CliErrors[_0x21b600(0xb0)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+METADATA_FILE+_0x21b600(0xb5));return{'skillCode':_0x1044a2,'metadata':_0x42da3b,'input':{'skillCode':_0x1044a2,'skillName':_0x42da3b?.['skillName'],'description':_0x42da3b?.[_0x21b600(0xa6)],'content':_0x53412d,'files':_0x567eb9[_0x21b600(0xc2)],'packageBase64':_0x567eb9[_0x21b600(0xa5)],'tags':_0x42da3b?.[_0x21b600(0xb9)],'version':_0x42da3b?.['version'],'sourceSessionId':_0x42da3b?.[_0x21b600(0xa3)]}};}export function recordPushedRuntimeSkill(_0x480327,_0x5eb72f,_0x56c98b,_0x4af5c7={}){const _0x3facb7=a94_0x5c24,_0x5b37ef=resolvePushDirectoryRoot(_0x480327),_0x15037c=scanSkillDirectory(_0x5b37ef),_0x12bd59=_0x15037c[_0x3facb7(0xb7)](_0xd18045=>_0xd18045[_0x3facb7(0x9f)]===SKILL_FILE),_0x23769e=_0x12bd59?fileText(_0x12bd59):'',_0x10a282=tryNormalizePackageManifest(_0x5eb72f['files']),_0x427f4d={..._0x5eb72f,'content':_0x5eb72f[_0x3facb7(0xaa)]??_0x23769e,'files':_0x10a282},_0x24999c=_0x10a282?normalizeLocalFiles(_0x15037c)[_0x3facb7(0xa7)](_0x279b21=>_0x10a282[_0x3facb7(0xab)][_0x3facb7(0xc0)](_0x351b55=>_0x351b55[_0x3facb7(0x9f)]===_0x279b21[_0x3facb7(0x9f)])):undefined,_0x5c9939=buildMetadata(_0x427f4d,_0x4af5c7['scope']??_0x3facb7(0xa0),_0x56c98b,contentHash(_0x427f4d[_0x3facb7(0xaa)]??''),_0x4af5c7[_0x3facb7(0xb2)],_0x24999c);writeJsonAtomic(resolve(_0x5b37ef,METADATA_FILE),_0x5c9939);}export function deriveSkillCodeFromDirectory(_0x33c3cf,_0x3dc578){const _0xa2d738=a94_0x5c24,_0x2113f0=basename(resolve(_0x33c3cf)),_0xefad7d=_0x3dc578+'--';return _0x2113f0['startsWith'](_0xefad7d)?_0x2113f0[_0xa2d738(0xbd)](_0xefad7d[_0xa2d738(0xb8)]):_0x2113f0;}function resolvePushDirectoryRoot(_0x3cbb8e){const _0x58616a=a94_0x5c24,_0x21ae94=resolve(_0x3cbb8e);if(!existsSync(_0x21ae94))throw CliErrors[_0x58616a(0xb0)]('Skill\x20directory\x20not\x20found:\x20'+_0x3cbb8e);const _0x4ee2d9=lstatSync(_0x21ae94);if(_0x4ee2d9[_0x58616a(0xa2)]())return _0x21ae94;if(_0x4ee2d9[_0x58616a(0xa1)]()){const _0x32f2c7=realpathSync(_0x21ae94);if(lstatSync(_0x32f2c7)[_0x58616a(0xa2)]())return _0x32f2c7;}throw CliErrors[_0x58616a(0xb0)]('Skill\x20directory\x20not\x20found:\x20'+_0x3cbb8e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6aa38c,_0x2cb9f1){const _0x1cffae=a95_0xeed2,_0x3d34d6=_0x6aa38c();while(!![]){try{const _0x5deeb1=-parseInt(_0x1cffae(0x76))/0x1*(parseInt(_0x1cffae(0x78))/0x2)+-parseInt(_0x1cffae(0x70))/0x3*(-parseInt(_0x1cffae(0x79))/0x4)+-parseInt(_0x1cffae(0x74))/0x5*(parseInt(_0x1cffae(0x7d))/0x6)+-parseInt(_0x1cffae(0x75))/0x7*(-parseInt(_0x1cffae(0x7a))/0x8)+parseInt(_0x1cffae(0x7c))/0x9*(parseInt(_0x1cffae(0x72))/0xa)+-parseInt(_0x1cffae(0x73))/0xb+parseInt(_0x1cffae(0x7b))/0xc;if(_0x5deeb1===_0x2cb9f1)break;else _0x3d34d6['push'](_0x3d34d6['shift']());}catch(_0x348749){_0x3d34d6['push'](_0x3d34d6['shift']());}}}(a95_0x4cc3,0xed990));function a95_0x4cc3(){const _0x21595b=['1444916omjVlM','34384YkOygD','7281252AXWDbh','77751HbbReg','7538772EwwRJc','push','builtin','Unsupported\x20runtime\x20Skill\x20scope:\x20','personal','12kCOrHq','includes','340cgNfMj','2186074sXHRcC','5EpNHBh','2632vVrqFn','5UQredl','company','613226DcOnEi'];a95_0x4cc3=function(){return _0x21595b;};return a95_0x4cc3();}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x1deb10){const _0x1dd952=a95_0xeed2,_0x4c9d73=_0x1deb10&&_0x1deb10['length']>0x0?_0x1deb10:[_0x1dd952(0x6f),_0x1dd952(0x77),'builtin'],_0x63ed41=[];for(const _0x31e1cc of _0x4c9d73){if(!isRuntimeSkillScope(_0x31e1cc))throw CliErrors['validation'](_0x1dd952(0x80)+_0x31e1cc);!_0x63ed41[_0x1dd952(0x71)](_0x31e1cc)&&_0x63ed41[_0x1dd952(0x7e)](_0x31e1cc);}return _0x63ed41;}function a95_0xeed2(_0x496f54,_0x189b69){_0x496f54=_0x496f54-0x6f;const _0x4cc324=a95_0x4cc3();let _0xeed270=_0x4cc324[_0x496f54];return _0xeed270;}export function isRuntimeSkillScope(_0x5355c7){const _0x34d899=a95_0xeed2;return _0x5355c7==='personal'||_0x5355c7===_0x34d899(0x77)||_0x5355c7===_0x34d899(0x7f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a97_0x4d36a9=a97_0x32b8;(function(_0x230448,_0x3e6187){const _0x5a2e4c=a97_0x32b8,_0x2fa8a8=_0x230448();while(!![]){try{const _0x6f54f7=-parseInt(_0x5a2e4c(0x14c))/0x1+parseInt(_0x5a2e4c(0x14a))/0x2+-parseInt(_0x5a2e4c(0x163))/0x3*(-parseInt(_0x5a2e4c(0x15d))/0x4)+parseInt(_0x5a2e4c(0x15f))/0x5+parseInt(_0x5a2e4c(0x14b))/0x6+-parseInt(_0x5a2e4c(0x14d))/0x7*(-parseInt(_0x5a2e4c(0x14f))/0x8)+parseInt(_0x5a2e4c(0x157))/0x9*(-parseInt(_0x5a2e4c(0x152))/0xa);if(_0x6f54f7===_0x3e6187)break;else _0x2fa8a8['push'](_0x2fa8a8['shift']());}catch(_0x53638d){_0x2fa8a8['push'](_0x2fa8a8['shift']());}}}(a97_0x9663,0x3a458));import{unzipSync,zipSync}from'fflate';function a97_0x32b8(_0x36e991,_0x24e194){_0x36e991=_0x36e991-0x14a;const _0x9663ad=a97_0x9663();let _0x32b88c=_0x9663ad[_0x36e991];return _0x32b88c;}function a97_0x9663(){const _0x336879=['8NMzDRu','object','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','2967290fNYLFV','validation_error','originalSize','1980-01-01T00:00:00.000Z','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','9nyrmJp','endsWith','name','path','from','code','124EHDivW','length','2207850wzaCCw','Runtime\x20Skill\x20package\x20exceeds\x20file\x20count\x20limit.','entries','sort','4758wmwAYk','validation','map','45806TJeegx','1660074zNgXPn','265440rOZXIo','73717IOjLAH','Runtime\x20Skill\x20package\x20exceeds\x20total\x20file\x20size\x20limit.'];a97_0x9663=function(){return _0x336879;};return a97_0x9663();}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_0x4d36a9(0x155));export function createDeterministicZipPackage(_0x50fb80){const _0x5d5ca2=a97_0x4d36a9,_0x3538c1={};for(const _0x5089b2 of normalizeLocalFiles(_0x50fb80)){_0x3538c1[_0x5089b2[_0x5d5ca2(0x15a)]]=fileContent(_0x5089b2);}const _0x44f545=Buffer[_0x5d5ca2(0x15b)](zipSync(_0x3538c1,{'level':0x0,'mtime':ZIP_MTIME}));if(_0x44f545[_0x5d5ca2(0x15e)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x5d5ca2(0x164)]('Skill\x20package\x20exceeds\x20size\x20limit.');return _0x44f545;}export function parseZipPackage(_0x8b97b9){const _0x5638fc=a97_0x4d36a9;if(_0x8b97b9[_0x5638fc(0x15e)]<0x16)throw CliErrors[_0x5638fc(0x164)](_0x5638fc(0x151));if(_0x8b97b9[_0x5638fc(0x15e)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x5638fc(0x164)]('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.');let _0x5bf08e=0x0,_0x4be550=0x0,_0xb0de6f;try{_0xb0de6f=unzipSync(_0x8b97b9,{'filter'(_0x3bfba8){const _0x2bf9f8=_0x5638fc,_0x61b9ac=normalizeSkillRelativePath(_0x3bfba8[_0x2bf9f8(0x159)]);if(_0x61b9ac[_0x2bf9f8(0x158)]('/'))throw CliErrors[_0x2bf9f8(0x164)](_0x2bf9f8(0x156)+_0x61b9ac);if(_0x3bfba8[_0x2bf9f8(0x154)]>MAX_SKILL_FILE_BYTES)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20exceeds\x20size\x20limit:\x20'+_0x61b9ac);_0x5bf08e+=0x1;if(_0x5bf08e>MAX_SKILL_FILE_COUNT)throw CliErrors['validation'](_0x2bf9f8(0x160));_0x4be550+=_0x3bfba8['originalSize'];if(_0x4be550>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0x2bf9f8(0x14e));return!![];}});}catch(_0x401dc6){if(isRuntimeSkillValidationError(_0x401dc6))throw _0x401dc6;throw CliErrors[_0x5638fc(0x164)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x5638fc(0x161)](_0xb0de6f)[_0x5638fc(0x165)](([_0x1d0f9c,_0x30c7c5])=>({'path':normalizeSkillRelativePath(_0x1d0f9c),'bytes':Buffer[_0x5638fc(0x15b)](_0x30c7c5)}))[_0x5638fc(0x162)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x12a572){const _0x36c325=a97_0x4d36a9;return typeof _0x12a572===_0x36c325(0x150)&&_0x12a572!==null&&_0x36c325(0x15c)in _0x12a572&&_0x12a572['code']===_0x36c325(0x153);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30c63a,_0x2f1ced){const _0x4f8411=a98_0x5cb8,_0x136e32=_0x30c63a();while(!![]){try{const _0x2a663b=-parseInt(_0x4f8411(0x7b))/0x1+parseInt(_0x4f8411(0x73))/0x2+-parseInt(_0x4f8411(0x80))/0x3+parseInt(_0x4f8411(0x7a))/0x4+-parseInt(_0x4f8411(0x8a))/0x5*(parseInt(_0x4f8411(0x8c))/0x6)+-parseInt(_0x4f8411(0x95))/0x7+parseInt(_0x4f8411(0x6d))/0x8*(parseInt(_0x4f8411(0x87))/0x9);if(_0x2a663b===_0x2f1ced)break;else _0x136e32['push'](_0x136e32['shift']());}catch(_0x3a660e){_0x136e32['push'](_0x136e32['shift']());}}}(a98_0x58a0,0x331aa));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(_0x121b94){const _0x1e6d0b=a98_0x5cb8,_0x1c7b9e=normalizeLocalFiles(_0x121b94);if(!_0x1c7b9e[_0x1e6d0b(0x82)](_0x8208c1=>_0x8208c1[_0x1e6d0b(0x75)]===SKILL_FILE))throw CliErrors[_0x1e6d0b(0x72)](_0x1e6d0b(0x6b)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x3540e5=localFilesToManifestFiles(_0x1c7b9e),_0x58722d=createDeterministicZipPackage(_0x1c7b9e);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x3540e5),'zipSha256':bufferSha256(_0x58722d),'zipSize':_0x58722d['length'],'files':_0x3540e5},'packageBytes':_0x58722d,'packageBase64':_0x58722d[_0x1e6d0b(0x8d)](_0x1e6d0b(0x76))};}function a98_0x5cb8(_0xbf335e,_0x4ddea2){_0xbf335e=_0xbf335e-0x6a;const _0x58a0e0=a98_0x58a0();let _0x5cb899=_0x58a0e0[_0xbf335e];return _0x5cb899;}export function verifyRuntimeSkillPackage(_0x39cf7a,_0x442eee){const _0x53b000=a98_0x5cb8,_0x3977fc=normalizePackageManifest(_0x39cf7a,{'requireOssPath':![]});if(!_0x3977fc)throw CliErrors[_0x53b000(0x72)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x3977fc,_0x442eee);}export function verifyRuntimeSkillBundle(_0x337b27,_0x1e1779){const _0x764bb6=a98_0x5cb8,_0x4673ce=normalizePackageManifest(_0x337b27,{'requireOssPath':![]});if(!_0x4673ce)throw CliErrors[_0x764bb6(0x72)](_0x764bb6(0x93));if(_0x1e1779['length']>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x764bb6(0x72)](_0x764bb6(0x7f));return extractAndVerifyPackageFiles(_0x4673ce,_0x1e1779);}export function tryNormalizePackageManifest(_0x624810){return normalizePackageManifest(_0x624810,{'requireOssPath':![]});}export function requirePackageBytes(_0x271e2e,_0x2a5ffa){const _0x194b1e=a98_0x5cb8;if(!_0x2a5ffa||_0x2a5ffa['length']===0x0)throw CliErrors['validation'](_0x194b1e(0x84)+_0x271e2e);if(_0x2a5ffa[_0x194b1e(0x91)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x194b1e(0x72)]('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit:\x20'+_0x271e2e);return _0x2a5ffa;}function a98_0x58a0(){const _0x297684=['length','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','2267300uaCUch','Runtime\x20Skill\x20package\x20size\x20mismatch.','has','size','Missing\x20','isSafeInteger','1208ktSOWB','treeSha256','isArray','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','bytes','validation','164350lFCEcL','ossPath','path','base64','map','get','schemaVersion','770056cQlfde','31502HQluGA','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','182397PZPhcJ','files','some','zipSize','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','21429jZvBqa','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','push','43485pHCJGY','zipSha256','6KgVYei','toString','object','trim','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.'];a98_0x58a0=function(){return _0x297684;};return a98_0x58a0();}export function extractDownloadedPackage(_0x32978e){const _0x496eb9=a98_0x5cb8,_0x49b1cd=parseZipPackage(_0x32978e)[_0x496eb9(0x77)](_0x375607=>({'path':_0x375607['path'],'bytes':_0x375607[_0x496eb9(0x71)]}));if(!_0x49b1cd[_0x496eb9(0x82)](_0xdc9d29=>_0xdc9d29['path']===SKILL_FILE))throw CliErrors[_0x496eb9(0x72)](_0x496eb9(0x86)+SKILL_FILE+'.');return normalizeLocalFiles(_0x49b1cd);}export function localFilesToManifestFiles(_0x8a09d1){const _0x33146f=a98_0x5cb8;return normalizeLocalFiles(_0x8a09d1)[_0x33146f(0x77)](_0x410be9=>({'path':_0x410be9['path'],'sha256':fileHash(_0x410be9),'size':fileContent(_0x410be9)['length']}));}function normalizePackageManifest(_0x407ada,_0x6cba07){const _0x2f970d=a98_0x5cb8;if(!_0x407ada||typeof _0x407ada!==_0x2f970d(0x8e)||Array[_0x2f970d(0x6f)](_0x407ada))return undefined;const _0x3ad54c=_0x407ada,_0x16504e=typeof _0x3ad54c[_0x2f970d(0x74)]==='string'?_0x3ad54c[_0x2f970d(0x74)][_0x2f970d(0x8f)]():undefined;if(_0x6cba07['requireOssPath']&&!_0x16504e)return undefined;if(!Array[_0x2f970d(0x6f)](_0x3ad54c[_0x2f970d(0x81)])||_0x3ad54c[_0x2f970d(0x81)][_0x2f970d(0x91)]===0x0)return undefined;if(!isSha256Hex(_0x3ad54c[_0x2f970d(0x6e)]))throw CliErrors['validation']('Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.');if(!isSha256Hex(_0x3ad54c['zipSha256']))throw CliErrors['validation'](_0x2f970d(0x7d));if(!Number[_0x2f970d(0x6c)](_0x3ad54c[_0x2f970d(0x83)])||_0x3ad54c[_0x2f970d(0x83)]<0x0)throw CliErrors[_0x2f970d(0x72)](_0x2f970d(0x90));if(_0x3ad54c[_0x2f970d(0x83)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x2f970d(0x72)]('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.');const _0x387737=normalizeManifestFiles(_0x3ad54c[_0x2f970d(0x81)]);if(!_0x387737['some'](_0xac2f42=>_0xac2f42[_0x2f970d(0x75)]===SKILL_FILE))throw CliErrors[_0x2f970d(0x72)](_0x2f970d(0x88)+SKILL_FILE+'.');const _0x3dbf1f=fileTreeHash(_0x387737);if(_0x3dbf1f!==_0x3ad54c[_0x2f970d(0x6e)]['toLowerCase']())throw CliErrors[_0x2f970d(0x72)](_0x2f970d(0x94));return{'schemaVersion':Number['isSafeInteger'](_0x3ad54c[_0x2f970d(0x79)])?_0x3ad54c[_0x2f970d(0x79)]:0x2,'ossPath':_0x16504e,'treeSha256':_0x3dbf1f,'zipSha256':_0x3ad54c[_0x2f970d(0x8b)]['toLowerCase'](),'zipSize':_0x3ad54c[_0x2f970d(0x83)],'files':_0x387737};}function extractAndVerifyPackage(_0x20898d,_0x3d85f9){const _0x40fdd0=a98_0x5cb8,_0x2cda90=normalizePackageManifest(_0x20898d,{'requireOssPath':![]});if(!_0x2cda90)throw CliErrors[_0x40fdd0(0x72)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x3d85f9['length']!==_0x2cda90['zipSize'])throw CliErrors['validation'](_0x40fdd0(0x96));const _0x1550aa=bufferSha256(_0x3d85f9);if(_0x1550aa!==_0x2cda90['zipSha256'])throw CliErrors[_0x40fdd0(0x72)](_0x40fdd0(0x7c));return extractAndVerifyPackageFiles(_0x2cda90,_0x3d85f9);}function extractAndVerifyPackageFiles(_0x4bb3cd,_0x316d86){const _0x837967=a98_0x5cb8,_0x356eb7=parseZipPackage(_0x316d86);if(_0x356eb7['length']!==_0x4bb3cd[_0x837967(0x81)][_0x837967(0x91)])throw CliErrors[_0x837967(0x72)](_0x837967(0x70));const _0xe271bd=new Map();for(const _0x14e57d of _0x356eb7){if(_0xe271bd[_0x837967(0x97)](_0x14e57d['path']))throw CliErrors['validation']('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x14e57d[_0x837967(0x75)]);_0xe271bd['set'](_0x14e57d['path'],_0x14e57d);}const _0x4187cb=[];for(const _0x15f226 of _0x4bb3cd[_0x837967(0x81)]){const _0x1a3bc8=_0xe271bd[_0x837967(0x78)](_0x15f226[_0x837967(0x75)]);if(!_0x1a3bc8)throw CliErrors['validation'](_0x837967(0x7e)+_0x15f226[_0x837967(0x75)]);if(_0x1a3bc8[_0x837967(0x71)][_0x837967(0x91)]!==_0x15f226[_0x837967(0x6a)])throw CliErrors['validation'](_0x837967(0x92)+_0x15f226[_0x837967(0x75)]);const _0x30d196=bufferSha256(_0x1a3bc8[_0x837967(0x71)]);if(_0x30d196!==_0x15f226['sha256'])throw CliErrors['validation'](_0x837967(0x85)+_0x15f226[_0x837967(0x75)]);_0x4187cb[_0x837967(0x89)]({'path':_0x15f226[_0x837967(0x75)],'bytes':_0x1a3bc8[_0x837967(0x71)]});}return normalizeLocalFiles(_0x4187cb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ea89f,_0x4ea0b6){var _0x2d4e5c=a99_0xac81,_0x454fc7=_0x1ea89f();while(!![]){try{var _0x1efebd=-parseInt(_0x2d4e5c(0x14d))/0x1*(-parseInt(_0x2d4e5c(0x14e))/0x2)+parseInt(_0x2d4e5c(0x150))/0x3+-parseInt(_0x2d4e5c(0x152))/0x4*(-parseInt(_0x2d4e5c(0x153))/0x5)+parseInt(_0x2d4e5c(0x149))/0x6*(parseInt(_0x2d4e5c(0x14a))/0x7)+-parseInt(_0x2d4e5c(0x151))/0x8*(-parseInt(_0x2d4e5c(0x14c))/0x9)+-parseInt(_0x2d4e5c(0x14f))/0xa+parseInt(_0x2d4e5c(0x154))/0xb*(-parseInt(_0x2d4e5c(0x14b))/0xc);if(_0x1efebd===_0x4ea0b6)break;else _0x454fc7['push'](_0x454fc7['shift']());}catch(_0x3606e7){_0x454fc7['push'](_0x454fc7['shift']());}}}(a99_0x5438,0xef3a0));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';function a99_0x5438(){var _0x580ce8=['4299363qJeCVL','94PzciiM','29046YGCGNg','15327760tXmHZu','4443273CslCKL','8JZyscn','5978776feghFd','5RvInrA','55VGICPg','66TsGctY','358743ZzurRT','6887388inKEqR'];a99_0x5438=function(){return _0x580ce8;};return a99_0x5438();}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';function a99_0xac81(_0x43e4ac,_0xb8d3ca){_0x43e4ac=_0x43e4ac-0x149;var _0x5438d5=a99_0x5438();var _0xac81e8=_0x5438d5[_0x43e4ac];return _0xac81e8;}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(_0x217637,_0x3db7b3){const _0x5061c5=a100_0x3789,_0x4c632c=_0x217637();while(!![]){try{const _0xe851ef=-parseInt(_0x5061c5(0x16b))/0x1+parseInt(_0x5061c5(0x16a))/0x2*(-parseInt(_0x5061c5(0x163))/0x3)+-parseInt(_0x5061c5(0x168))/0x4+parseInt(_0x5061c5(0x167))/0x5+parseInt(_0x5061c5(0x162))/0x6*(parseInt(_0x5061c5(0x165))/0x7)+-parseInt(_0x5061c5(0x166))/0x8+parseInt(_0x5061c5(0x169))/0x9*(parseInt(_0x5061c5(0x164))/0xa);if(_0xe851ef===_0x3db7b3)break;else _0x4c632c['push'](_0x4c632c['shift']());}catch(_0x3a8261){_0x4c632c['push'](_0x4c632c['shift']());}}}(a100_0x58ad,0x19521));function a100_0x58ad(){const _0x2e8007=['2507870ouHEGD','320089IGzlWD','799616DZRyTb','794540lQHjDV','613404nexAFm','9YEwCCk','32URAbEj','44630CSYiuA','6LIVtLv','10083mInxcK'];a100_0x58ad=function(){return _0x2e8007;};return a100_0x58ad();}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a100_0x3789(_0x1ea653,_0x155862){_0x1ea653=_0x1ea653-0x162;const _0x58ad0b=a100_0x58ad();let _0x3789c6=_0x58ad0b[_0x1ea653];return _0x3789c6;}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x11b644=a101_0xa03b;(function(_0x3b439d,_0x2c7f36){const _0x403dae=a101_0xa03b,_0x2befbe=_0x3b439d();while(!![]){try{const _0x9326cf=parseInt(_0x403dae(0xe1))/0x1+parseInt(_0x403dae(0xe7))/0x2*(-parseInt(_0x403dae(0xc0))/0x3)+parseInt(_0x403dae(0xe5))/0x4+-parseInt(_0x403dae(0xe4))/0x5+parseInt(_0x403dae(0xd1))/0x6+parseInt(_0x403dae(0xea))/0x7+-parseInt(_0x403dae(0xf1))/0x8;if(_0x9326cf===_0x2c7f36)break;else _0x2befbe['push'](_0x2befbe['shift']());}catch(_0x4387a9){_0x2befbe['push'](_0x2befbe['shift']());}}}(a101_0xe4b6,0x933c4));import a101_0x2f2236 from'winston';import a101_0x4055e6 from'node:fs';function a101_0xe4b6(){const _0x3e3ae9=['warn','currentRawCommand','winstonLogger','split','trim','combine','stringify','existsSync','log','timestamp','errors','success','level','red','addColors','499923wRkPsm','Starting:\x20','utf8','3494250PQqhQM','2030904lnviZY','Failed:\x20','2tUGTjj','readLogs','logTask','8329265THQiGH','initWinstonLogger','info','message','error','logFilePath','dirname','5573656bhpOpF','createLogger','join','format','mkdirSync','now','997827fbwugq','printf','duration','Failed\x20to\x20clear\x20logs:','unknown','getWinstonInstance','File','logFileName','Failed\x20to\x20read\x20logs:','filter','Completed:\x20','clear','yellow','blue','command','transports','setLogPath','802188kOHkGL'];a101_0xe4b6=function(){return _0x3e3ae9;};return a101_0xe4b6();}import a101_0xbf394 from'node:path';function a101_0xa03b(_0x4da20b,_0x5d3be8){_0x4da20b=_0x4da20b-0xbe;const _0xe4b6ca=a101_0xe4b6();let _0xa03bf0=_0xe4b6ca[_0x4da20b];return _0xa03bf0;}import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a101_0x11b644(0xd4)];[a101_0x11b644(0xef)]='';[a101_0x11b644(0xd3)]='';constructor(){}['setRawCommand'](_0x4df835){this['currentRawCommand']=_0x4df835;}[a101_0x11b644(0xd0)](_0x5d47b3){const _0x4378b2=a101_0x11b644;this[_0x4378b2(0xef)]=a101_0xbf394[_0x4378b2(0xf3)](_0x5d47b3,PRODUCT_CONFIG[_0x4378b2(0xc7)]),this[_0x4378b2(0xd4)]&&this[_0x4378b2(0xd4)][_0x4378b2(0xcb)](),this[_0x4378b2(0xeb)]();}[a101_0x11b644(0xeb)](){const _0x26d6a5=a101_0x11b644,_0x38503d=a101_0xbf394[_0x26d6a5(0xf0)](this[_0x26d6a5(0xef)]);!a101_0x4055e6['existsSync'](_0x38503d)&&a101_0x4055e6[_0x26d6a5(0xbe)](_0x38503d,{'recursive':!![]});const _0x29271e=a101_0x2f2236[_0x26d6a5(0xf4)][_0x26d6a5(0xd7)](a101_0x2f2236['format']['timestamp'](),a101_0x2f2236[_0x26d6a5(0xf4)][_0x26d6a5(0xdc)]({'stack':!![]}),a101_0x2f2236[_0x26d6a5(0xf4)][_0x26d6a5(0xc1)](_0x160a97=>{const _0x103f2a=_0x26d6a5,_0x257126={'timestamp':_0x160a97[_0x103f2a(0xdb)]||new Date()['toISOString'](),'level':_0x160a97[_0x103f2a(0xde)]||'info','command':_0x160a97[_0x103f2a(0xce)]||_0x103f2a(0xc4),'rawCommand':_0x160a97['rawCommand']||this[_0x103f2a(0xd3)]||undefined,'message':_0x160a97[_0x103f2a(0xed)]||'','duration':_0x160a97[_0x103f2a(0xc2)]||undefined,'details':_0x160a97['details']||undefined};return JSON[_0x103f2a(0xd8)](_0x257126);}));this[_0x26d6a5(0xd4)]=a101_0x2f2236[_0x26d6a5(0xf2)]({'level':_0x26d6a5(0xec),'format':_0x29271e,'transports':[new a101_0x2f2236[(_0x26d6a5(0xcf))][(_0x26d6a5(0xc6))]({'filename':this['logFilePath'],'level':_0x26d6a5(0xec)})],'silent':![]}),a101_0x2f2236[_0x26d6a5(0xe0)]({'success':'green','error':_0x26d6a5(0xdf),'warn':_0x26d6a5(0xcc),'info':_0x26d6a5(0xcd)});}['info'](_0x18a8cc,_0x2c695b,_0x2712f5){const _0x2d54a8=a101_0x11b644;if(!this['logFilePath']||!this[_0x2d54a8(0xd4)])return;this[_0x2d54a8(0xd4)][_0x2d54a8(0xec)](_0x2c695b,{'command':_0x18a8cc,'details':_0x2712f5});}[a101_0x11b644(0xdd)](_0x35d935,_0x31550a,_0x3b9df6,_0x59140b){const _0x154291=a101_0x11b644;if(!this['logFilePath']||!this[_0x154291(0xd4)])return;this['winstonLogger'][_0x154291(0xda)](_0x154291(0xec),_0x31550a,{'level':_0x154291(0xdd),'command':_0x35d935,'duration':_0x3b9df6,'details':_0x59140b});}['error'](_0x14c195,_0x4548d6,_0x5b15c0){const _0x5f06e1=a101_0x11b644;if(!this[_0x5f06e1(0xef)]||!this[_0x5f06e1(0xd4)])return;this['winstonLogger'][_0x5f06e1(0xee)](_0x4548d6,{'command':_0x14c195,'details':_0x5b15c0});}[a101_0x11b644(0xd2)](_0x3e5b09,_0x4b72f0,_0x451172){const _0x3826f3=a101_0x11b644;if(!this[_0x3826f3(0xef)]||!this['winstonLogger'])return;this[_0x3826f3(0xd4)]['warn'](_0x4b72f0,{'command':_0x3e5b09,'details':_0x451172});}async[a101_0x11b644(0xe9)](_0x11c6d4,_0x297752,_0x30cea7){const _0x5c28d9=a101_0x11b644,_0x395b57=Date[_0x5c28d9(0xbf)]();this[_0x5c28d9(0xec)](_0x11c6d4,_0x5c28d9(0xe2)+_0x297752);try{const _0x1d5cc1=await _0x30cea7(),_0xdb1679=Date['now']()-_0x395b57;return this[_0x5c28d9(0xdd)](_0x11c6d4,_0x5c28d9(0xca)+_0x297752,_0xdb1679),_0x1d5cc1;}catch(_0x41989a){const _0x3ae301=Date[_0x5c28d9(0xbf)]()-_0x395b57;this[_0x5c28d9(0xee)](_0x11c6d4,_0x5c28d9(0xe6)+_0x297752,{'error':_0x41989a instanceof Error?_0x41989a[_0x5c28d9(0xed)]:String(_0x41989a),'duration':_0x3ae301});throw _0x41989a;}}[a101_0x11b644(0xe8)](){const _0x2eac9e=a101_0x11b644;try{if(!a101_0x4055e6[_0x2eac9e(0xd9)](this['logFilePath']))return[];const _0x53407e=a101_0x4055e6['readFileSync'](this[_0x2eac9e(0xef)],_0x2eac9e(0xe3));return _0x53407e[_0x2eac9e(0xd5)](/\r?\n/)[_0x2eac9e(0xc9)](_0x424289=>_0x424289[_0x2eac9e(0xd6)]())['map'](_0x39b74a=>JSON['parse'](_0x39b74a));}catch(_0xbbe0a5){return console[_0x2eac9e(0xd2)](_0x2eac9e(0xc8),_0xbbe0a5),[];}}['clearLogs'](){const _0x4474fd=a101_0x11b644;try{a101_0x4055e6[_0x4474fd(0xd9)](this[_0x4474fd(0xef)])&&a101_0x4055e6['writeFileSync'](this[_0x4474fd(0xef)],'',_0x4474fd(0xe3));}catch(_0x4667ea){console[_0x4474fd(0xd2)](_0x4474fd(0xc3),_0x4667ea);}}[a101_0x11b644(0xc5)](){const _0x42a886=a101_0x11b644;return this[_0x42a886(0xd4)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a102_0x2eb6(){var _0x55da76=['341026cIUJcS','147753FpHBnq','validation','parse','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','40598VKHWXC','2YerFfG','32OLNCjw','isArray','737692sucqlB','1692804rumYcI','3428960TMRVTv','5xjKUUY','1278072YBNiSY','items'];a102_0x2eb6=function(){return _0x55da76;};return a102_0x2eb6();}function a102_0x28b2(_0x31f0f4,_0x3615f3){_0x31f0f4=_0x31f0f4-0xb2;var _0x2eb6b9=a102_0x2eb6();var _0x28b2a6=_0x2eb6b9[_0x31f0f4];return _0x28b2a6;}(function(_0x2be5af,_0x209aca){var _0x4e32e6=a102_0x28b2,_0x3ffa0e=_0x2be5af();while(!![]){try{var _0x211d3f=parseInt(_0x4e32e6(0xba))/0x1+parseInt(_0x4e32e6(0xbb))/0x2*(-parseInt(_0x4e32e6(0xb6))/0x3)+parseInt(_0x4e32e6(0xbe))/0x4*(parseInt(_0x4e32e6(0xb2))/0x5)+-parseInt(_0x4e32e6(0xbf))/0x6+parseInt(_0x4e32e6(0xb5))/0x7*(-parseInt(_0x4e32e6(0xbc))/0x8)+parseInt(_0x4e32e6(0xb3))/0x9+parseInt(_0x4e32e6(0xc0))/0xa;if(_0x211d3f===_0x209aca)break;else _0x3ffa0e['push'](_0x3ffa0e['shift']());}catch(_0x7c7603){_0x3ffa0e['push'](_0x3ffa0e['shift']());}}}(a102_0x2eb6,0x2cd74));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x3d749c){var _0x2d3597=a102_0x28b2;if(!_0x3d749c)return undefined;try{return JSON[_0x2d3597(0xb8)](_0x3d749c);}catch{throw CliErrors['validation']('Invalid\x20JSON\x20for\x20--params:\x20'+_0x3d749c);}}export function parseJsonParamsValue(_0x2eed93){var _0x4b6bc1=a102_0x28b2;if(!_0x2eed93)return undefined;try{return JSON[_0x4b6bc1(0xb8)](_0x2eed93);}catch{throw CliErrors[_0x4b6bc1(0xb7)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x2eed93);}}export function parseBatchCreateItemsFromParams(_0x289f4c){var _0x58d08f=a102_0x28b2;if(Array[_0x58d08f(0xbd)](_0x289f4c))return _0x289f4c;if(_0x289f4c!==null&&_0x289f4c!==undefined&&typeof _0x289f4c==='object'&&Array['isArray'](_0x289f4c[_0x58d08f(0xb4)]))return _0x289f4c['items'];throw CliErrors['validation']('batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}',_0x58d08f(0xb9));}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a103_0x27159c=a103_0x10d4;function a103_0x10d4(_0x26ec31,_0x525e5c){_0x26ec31=_0x26ec31-0x1b6;const _0x22c683=a103_0x22c6();let _0x10d432=_0x22c683[_0x26ec31];return _0x10d432;}function a103_0x22c6(){const _0x425a1d=['971064qskUJC','30845BIpSSm','3VGSuKd','133816sebRHU','1389396WlmqBp','3776004xRgpkF','.cmd','30536VregUx','77BGNrIR','1482qnmbLU','platform','5216708ChAYRy','22380YkKUMy','win32'];a103_0x22c6=function(){return _0x425a1d;};return a103_0x22c6();}(function(_0x5de0eb,_0x5e52c6){const _0x14b056=a103_0x10d4,_0x8426ed=_0x5de0eb();while(!![]){try{const _0x54da9a=-parseInt(_0x14b056(0x1c3))/0x1+parseInt(_0x14b056(0x1bf))/0x2*(-parseInt(_0x14b056(0x1c1))/0x3)+-parseInt(_0x14b056(0x1bc))/0x4+-parseInt(_0x14b056(0x1c0))/0x5*(parseInt(_0x14b056(0x1ba))/0x6)+parseInt(_0x14b056(0x1b9))/0x7*(-parseInt(_0x14b056(0x1c2))/0x8)+-parseInt(_0x14b056(0x1b6))/0x9+-parseInt(_0x14b056(0x1bd))/0xa*(-parseInt(_0x14b056(0x1b8))/0xb);if(_0x54da9a===_0x5e52c6)break;else _0x8426ed['push'](_0x8426ed['shift']());}catch(_0x378458){_0x8426ed['push'](_0x8426ed['shift']());}}}(a103_0x22c6,0xdd42f));export const isWindows=process[a103_0x27159c(0x1bb)]===a103_0x27159c(0x1be);export function resolveNpmBin(_0x3f2281){const _0x2e7ccc=a103_0x27159c;return isWindows?_0x3f2281+_0x2e7ccc(0x1b7):_0x3f2281;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x258a00,_0x338dab){const _0x4e69ea=a104_0x4a25,_0x493cd1=_0x258a00();while(!![]){try{const _0x4a132c=-parseInt(_0x4e69ea(0x144))/0x1+parseInt(_0x4e69ea(0x14f))/0x2*(-parseInt(_0x4e69ea(0x15d))/0x3)+parseInt(_0x4e69ea(0x164))/0x4+-parseInt(_0x4e69ea(0x159))/0x5+-parseInt(_0x4e69ea(0x150))/0x6*(-parseInt(_0x4e69ea(0x160))/0x7)+parseInt(_0x4e69ea(0x15a))/0x8*(parseInt(_0x4e69ea(0x146))/0x9)+parseInt(_0x4e69ea(0x157))/0xa*(-parseInt(_0x4e69ea(0x168))/0xb);if(_0x4a132c===_0x338dab)break;else _0x493cd1['push'](_0x493cd1['shift']());}catch(_0x42c8c5){_0x493cd1['push'](_0x493cd1['shift']());}}}(a104_0x45f7,0xc2710));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(_0x5d1dc0){const _0x580d5f=a104_0x4a25,_0x2a0e13=_0x5d1dc0[_0x580d5f(0x156)]()[_0x580d5f(0x152)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x2a0e13)return null;return{'major':Number(_0x2a0e13[0x1]),'minor':Number(_0x2a0e13[0x2]),'patch':Number(_0x2a0e13[0x3]),'prerelease':_0x2a0e13[0x4]};}function compareSemver(_0x51c112,_0x3409f2){const _0x1ef38f=a104_0x4a25,_0x31f5e2=parseSemver(_0x51c112),_0x4580e3=parseSemver(_0x3409f2);if(!_0x31f5e2||!_0x4580e3)throw new Error(_0x1ef38f(0x154));for(const _0x44f441 of[_0x1ef38f(0x148),_0x1ef38f(0x15f),'patch']){if(_0x31f5e2[_0x44f441]<_0x4580e3[_0x44f441])return-0x1;if(_0x31f5e2[_0x44f441]>_0x4580e3[_0x44f441])return 0x1;}if(!_0x31f5e2[_0x1ef38f(0x14e)]&&!_0x4580e3[_0x1ef38f(0x14e)])return 0x0;if(!_0x31f5e2[_0x1ef38f(0x14e)])return 0x1;if(!_0x4580e3['prerelease'])return-0x1;if(_0x31f5e2['prerelease']===_0x4580e3['prerelease'])return 0x0;return _0x31f5e2[_0x1ef38f(0x14e)]<_0x4580e3['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x129582=a104_0x4a25,_0x19e465=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x129582(0x156)]()[_0x129582(0x15b)]();return _0x19e465==='1'||_0x19e465==='true'||_0x19e465===_0x129582(0x167);}function a104_0x4a25(_0x4d415b,_0x1552a6){_0x4d415b=_0x4d415b-0x144;const _0x45f7fa=a104_0x45f7();let _0x4a25a4=_0x45f7fa[_0x4d415b];return _0x4a25a4;}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x46c575=a104_0x4a25;return join(cacheRoot(),'lovrabet-cli',_0x46c575(0x14c));}async function readUpdateNoticeCache(){const _0x222a66=a104_0x4a25;try{const _0x11b573=await readFile(getUpdateNoticeCachePath(),_0x222a66(0x169)),_0x20ad93=JSON[_0x222a66(0x147)](_0x11b573);if(!_0x20ad93||typeof _0x20ad93!=='object')return{};return _0x20ad93;}catch{return{};}}async function writeUpdateNoticeCache(_0x140956){const _0x48663f=a104_0x4a25;try{const _0x24b38b=getUpdateNoticeCachePath();await mkdir(dirname(_0x24b38b),{'recursive':!![]}),await writeFile(_0x24b38b,JSON[_0x48663f(0x15e)](_0x140956,null,0x2)+'\x0a',_0x48663f(0x169));}catch{}}function isFreshCheck(_0x264c9e,_0x5eea74){const _0x3bba04=a104_0x4a25;return typeof _0x264c9e['checkedAt']===_0x3bba04(0x163)&&_0x5eea74-_0x264c9e['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x3b1296,_0x4d2184,_0x2708d0){const _0xe55d64=a104_0x4a25;return _0x3b1296[_0xe55d64(0x153)]===_0x4d2184&&typeof _0x3b1296[_0xe55d64(0x14a)]==='number'&&_0x2708d0-_0x3b1296['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x26f224=0x5dc){const _0x43362c=a104_0x4a25;try{const _0x3d0bb5=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x43362c(0x165),_0x29f337=await fetch(_0x3d0bb5,{'signal':AbortSignal[_0x43362c(0x161)](_0x26f224)});if(!_0x29f337['ok'])return null;const _0x292577=await _0x29f337[_0x43362c(0x155)]();if(!_0x292577||typeof _0x292577!=='object')return null;return Object[_0x43362c(0x149)](Object['entries'](_0x292577)[_0x43362c(0x145)](([,_0x3ac87b])=>typeof _0x3ac87b===_0x43362c(0x151)&&_0x3ac87b[_0x43362c(0x156)]())['map'](([_0x4139ad,_0x32b1bd])=>[_0x4139ad,String(_0x32b1bd)[_0x43362c(0x156)]()]));}catch{return null;}}function a104_0x45f7(){const _0x175b3e=['https://www.npmjs.com/package/','update-check.json','now','prerelease','2YqvjkS','2818818UDlpWw','string','match','lastNotifiedVersion','Invalid\x20semver','json','trim','10DKiHUq','checkedAt','1763220fIPizX','616woccAO','toLowerCase','\x20update','536151PNsted','stringify','minor','21PcEqgN','timeout','\x20available,\x20current\x20','number','1607020kgtXJv','/dist-tags','latest','yes','84414KMqUle','utf8','1465532WeQvGR','filter','115695FIrImY','parse','major','fromEntries','lastNotifiedAt'];a104_0x45f7=function(){return _0x175b3e;};return a104_0x45f7();}export function buildNpmVersionUrl(_0x31b887){const _0x1a1698=a104_0x4a25;return _0x1a1698(0x14b)+LOVRABET_NPM_PACKAGE_NAME+'/v/'+_0x31b887;}export async function resolveLatestUpdateNotice(){const _0x59140c=a104_0x4a25;if(isUpdateNoticeDisabled())return null;try{const _0x443fa2=Date[_0x59140c(0x14d)](),_0x4a3348=getCliVersion(),_0x37dae6=await readUpdateNoticeCache();let _0x5e0edf=isFreshCheck(_0x37dae6,_0x443fa2)?_0x37dae6[_0x59140c(0x166)]?.[_0x59140c(0x156)]():undefined;if(!_0x5e0edf&&!isFreshCheck(_0x37dae6,_0x443fa2)){const _0x1d408a=await fetchNpmDistTags();_0x5e0edf=_0x1d408a?.[_0x59140c(0x166)]?.[_0x59140c(0x156)](),await writeUpdateNoticeCache({..._0x37dae6,'checkedAt':_0x443fa2,'latest':_0x5e0edf,'failed':!_0x5e0edf});}if(!_0x5e0edf||compareSemver(_0x4a3348,_0x5e0edf)>=0x0)return null;if(isRecentlyNotified(_0x37dae6,_0x5e0edf,_0x443fa2))return null;const _0x5670e1=CLI_BIN_NAME+_0x59140c(0x15c);return await writeUpdateNoticeCache({..._0x37dae6,'checkedAt':isFreshCheck(_0x37dae6,_0x443fa2)?_0x37dae6[_0x59140c(0x158)]:_0x443fa2,'latest':_0x5e0edf,'failed':![],'lastNotifiedVersion':_0x5e0edf,'lastNotifiedAt':_0x443fa2}),{'command':_0x5670e1,'current':_0x4a3348,'latest':_0x5e0edf,'url':buildNpmVersionUrl(_0x5e0edf),'message':CLI_BIN_NAME+'\x20'+_0x5e0edf+_0x59140c(0x162)+_0x4a3348+',\x20run:\x20'+_0x5670e1};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d04a9,_0x4fbcba){const _0x53e007=a105_0x1104,_0x3d0767=_0x2d04a9();while(!![]){try{const _0x35cdae=-parseInt(_0x53e007(0x1b1))/0x1+parseInt(_0x53e007(0x1b9))/0x2+parseInt(_0x53e007(0x1b5))/0x3+-parseInt(_0x53e007(0x1b4))/0x4*(-parseInt(_0x53e007(0x1ba))/0x5)+-parseInt(_0x53e007(0x1b8))/0x6*(parseInt(_0x53e007(0x1b7))/0x7)+parseInt(_0x53e007(0x1b6))/0x8+-parseInt(_0x53e007(0x1b3))/0x9;if(_0x35cdae===_0x4fbcba)break;else _0x3d0767['push'](_0x3d0767['shift']());}catch(_0x1f7b1d){_0x3d0767['push'](_0x3d0767['shift']());}}}(a105_0x440f,0x4ed5f));function a105_0x1104(_0x314763,_0x598d6c){_0x314763=_0x314763-0x1b1;const _0x440f97=a105_0x440f();let _0x1104ba=_0x440f97[_0x314763];return _0x1104ba;}import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a105_0x440f(){const _0x3e8cfe=['375GwHmVt','342437JOyTDB','unknown','6575463qJyuNc','25588KfGFCu','425460lRAIwy','4096824rSfJrM','2364845tyXSuG','6ymBcgk','1200184PInMBU'];a105_0x440f=function(){return _0x3e8cfe;};return a105_0x440f();}export function getCliGitCommit(){const _0xf3e352=a105_0x1104,_0xe926c4=String(GIT_COMMIT);return _0xe926c4&&_0xe926c4!==_0xf3e352(0x1b2)?_0xe926c4:'';}export function getCliVersionDisplay(){const _0x2a71fa=getCliGitCommit(),_0x827fdd=BUILD_TIME['slice'](0x0,0xa);if(!_0x2a71fa||!_0x827fdd)return VERSION;return VERSION+'\x20('+_0x2a71fa+',\x20'+_0x827fdd+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a50ae,_0x181f19){var _0x11a4e7=a106_0x3bf5,_0x5409e2=_0x4a50ae();while(!![]){try{var _0x91ae00=parseInt(_0x11a4e7(0x1f2))/0x1*(-parseInt(_0x11a4e7(0x1f1))/0x2)+parseInt(_0x11a4e7(0x1ec))/0x3*(-parseInt(_0x11a4e7(0x1f0))/0x4)+-parseInt(_0x11a4e7(0x1e8))/0x5*(parseInt(_0x11a4e7(0x1ed))/0x6)+-parseInt(_0x11a4e7(0x1ea))/0x7*(parseInt(_0x11a4e7(0x1e7))/0x8)+-parseInt(_0x11a4e7(0x1f3))/0x9+parseInt(_0x11a4e7(0x1ee))/0xa+parseInt(_0x11a4e7(0x1e9))/0xb*(parseInt(_0x11a4e7(0x1e6))/0xc);if(_0x91ae00===_0x181f19)break;else _0x5409e2['push'](_0x5409e2['shift']());}catch(_0x13cee1){_0x5409e2['push'](_0x5409e2['shift']());}}}(a106_0x1f01,0xae725));function a106_0x3bf5(_0x7b6581,_0x344f0b){_0x7b6581=_0x7b6581-0x1e6;var _0x1f0177=a106_0x1f01();var _0x3bf50c=_0x1f0177[_0x7b6581];return _0x3bf50c;}function a106_0x1f01(){var _0x31a89c=['2501694rWuGYn','1lgjqPC','5972526ojVtoC','12JIIrAt','281272URDjFQ','5113780pysxRr','43871487pcKRxJ','217UUhJAl','write','378IdfYlf','6weWwQI','12568580URrbge','stderr','15984bboxbd'];a106_0x1f01=function(){return _0x31a89c;};return a106_0x1f01();}export function writeCliSideChannelLine(_0x3d7a0b){var _0x35d991=a106_0x3bf5;process[_0x35d991(0x1ef)][_0x35d991(0x1eb)](_0x3d7a0b+'\x0a');}
|