@lovrabet/lovrabet-cli 2.1.6 → 2.1.7-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(_0x4e7ab3,_0x11154e){const _0xba7e8b=a91_0x2e57,_0x143cd1=_0x4e7ab3();while(!![]){try{const _0x7446b8=-parseInt(_0xba7e8b(0x10e))/0x1+-parseInt(_0xba7e8b(0xff))/0x2*(-parseInt(_0xba7e8b(0xfd))/0x3)+-parseInt(_0xba7e8b(0x10c))/0x4*(-parseInt(_0xba7e8b(0xf0))/0x5)+parseInt(_0xba7e8b(0xfe))/0x6+parseInt(_0xba7e8b(0x10f))/0x7*(parseInt(_0xba7e8b(0xfa))/0x8)+parseInt(_0xba7e8b(0x103))/0x9*(-parseInt(_0xba7e8b(0xf9))/0xa)+parseInt(_0xba7e8b(0x115))/0xb*(-parseInt(_0xba7e8b(0x111))/0xc);if(_0x7446b8===_0x11154e)break;else _0x143cd1['push'](_0x143cd1['shift']());}catch(_0x47bcc3){_0x143cd1['push'](_0x143cd1['shift']());}}}(a91_0xb18d,0x1ef43));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';function a91_0x2e57(_0x553ae,_0x233f1a){_0x553ae=_0x553ae-0xed;const _0xb18d2b=a91_0xb18d();let _0x2e5788=_0xb18d2b[_0x553ae];return _0x2e5788;}function a91_0xb18d(){const _0x12733e=['fileHashes','description:\x20','12RDJXjq','Managed\x20file\x20was\x20removed\x20locally:\x20','145755kweLQt','81739PBSJMs','Runtime\x20Skill\x20package\x20is\x20missing\x20','12sIHwsM','packageBytes','path','skillName','373879tJyrOg','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','---','.\x20Changed\x20file:\x20','keys','has','14190MVjitt','stringify','test','map','appCode','length','force','description','contentHash','10pxWTQX','120PKXyTy','validation','env','18540PMYRED','1118994guAEki','6ITcKEV','trim','utf8','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','739593DCXXJl','paths','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','replace','pulledAt'];a91_0xb18d=function(){return _0x12733e;};return a91_0xb18d();}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(_0x2ac459,_0x4bd0de,_0x10a444){const _0x488a97=a91_0x2e57,_0x3c6149=requireSkillCode(_0x2ac459),_0x2b67f5=requirePackageBytes(_0x3c6149,_0x10a444[_0x488a97(0x112)]),_0x37c570=extractDownloadedPackage(_0x2b67f5),_0x38db3f=_0x37c570['find'](_0x5aa307=>_0x5aa307[_0x488a97(0x113)]===SKILL_FILE);if(!_0x38db3f)throw CliErrors[_0x488a97(0xfb)](_0x488a97(0x110)+SKILL_FILE+':\x20'+_0x3c6149);const _0x2fd188=withMaterializedSkillFrontmatter(_0x37c570,_0x2ac459,_0x3c6149),_0x53d294=_0x2fd188['find'](_0x440053=>_0x440053[_0x488a97(0x113)]===SKILL_FILE),_0x44963a=fileText(_0x53d294),_0x36f102=getRuntimeSkillDir(_0x10a444[_0x488a97(0xfc)],_0x10a444['accessKey'],_0x10a444[_0x488a97(0xf4)],_0x4bd0de,_0x3c6149,_0x10a444[_0x488a97(0x104)]),_0x123f9=resolve(_0x36f102,SKILL_FILE),_0x4bf55e=resolve(_0x36f102,METADATA_FILE),_0x4bb5f0=contentHash(_0x44963a),_0x12e7de=readMetadataIfPresent(_0x4bf55e)?.[_0x488a97(0x10a)];ensurePulledFilesCanBeOverwritten(_0x36f102,_0x4bf55e,_0x2fd188,_0x10a444[_0x488a97(0xf6)]===!![]),mkdirSync(_0x36f102,{'recursive':!![],'mode':0x1c0});const _0x53e674=existsSync(_0x123f9)?readFileSync(_0x123f9,_0x488a97(0x101)):undefined;return materializeFiles(_0x36f102,_0x2fd188),removeStaleManagedFiles(_0x36f102,_0x12e7de,_0x2fd188),writeJsonAtomic(_0x4bf55e,buildMetadata(_0x2ac459,_0x4bd0de,_0x10a444['appCode'],_0x4bb5f0,_0x10a444[_0x488a97(0x109)],_0x2fd188,_0x2b67f5)),{'skill':_0x2ac459,'scope':_0x4bd0de,'dir':_0x36f102,'skillMdPath':_0x123f9,'metadataPath':_0x4bf55e,'contentHash':_0x4bb5f0,'changed':_0x53e674!==_0x44963a};}function withMaterializedSkillFrontmatter(_0x1bd360,_0x26a352,_0x164d2e){const _0xaadc1f=a91_0x2e57;return normalizeLocalFiles(_0x1bd360)[_0xaadc1f(0xf3)](_0x140d10=>{const _0x19e699=_0xaadc1f,_0x29a019=fileText(_0x140d10);if(_0x140d10['path']!==SKILL_FILE||hasYamlFrontmatter(_0x29a019))return _0x140d10;return{'path':_0x140d10['path'],'content':prependSkillFrontmatter(_0x29a019,{'name':_0x164d2e,'description':_0x26a352[_0x19e699(0xf7)]?.[_0x19e699(0x100)]()||_0x26a352[_0x19e699(0x114)]?.[_0x19e699(0x100)]()||_0x164d2e})};});}function hasYamlFrontmatter(_0x4b9f0b){const _0x2d9a25=a91_0x2e57;return/^\uFEFF?---\s*\r?\n/[_0x2d9a25(0xf2)](_0x4b9f0b);}function prependSkillFrontmatter(_0x1d757e,_0x5082bf){const _0x3e2e42=a91_0x2e57,_0x27b19f=_0x1d757e[_0x3e2e42(0x108)](/^\uFEFF/,'');return['---','name:\x20'+yamlString(_0x5082bf['name']),_0x3e2e42(0x10b)+yamlString(_0x5082bf[_0x3e2e42(0xf7)]),_0x3e2e42(0x117),'',_0x27b19f]['join']('\x0a');}function yamlString(_0xb019d3){const _0x217a47=a91_0x2e57;return JSON[_0x217a47(0xf1)](_0xb019d3[_0x217a47(0x108)](/\r/g,'')[_0x217a47(0x100)]());}function ensurePulledFilesCanBeOverwritten(_0x4af2bf,_0x5ec065,_0x5a6b9d,_0x4bbdf8){const _0x99ef84=a91_0x2e57;if(_0x4bbdf8||!existsSync(_0x5ec065))return;const _0xa7a2f1=readMetadataIfPresent(_0x5ec065);if(!_0xa7a2f1)return;const _0x517c3e=_0xa7a2f1[_0x99ef84(0x10a)]&&Object[_0x99ef84(0xee)](_0xa7a2f1[_0x99ef84(0x10a)])[_0x99ef84(0xf5)]>0x0?_0xa7a2f1[_0x99ef84(0x10a)]:undefined;if(_0x517c3e)for(const [_0x395924,_0x2bfe8b]of Object['entries'](_0x517c3e)){const _0x17f261=resolveManagedFilePath(_0x4af2bf,_0x395924);if(!existsSync(_0x17f261))throw CliErrors[_0x99ef84(0xfb)](_0x99ef84(0x105)+_0x4af2bf,_0x99ef84(0x10d)+_0x395924);const _0x16fa54=lstatSync(_0x17f261);if(!_0x16fa54['isFile']())throw CliErrors[_0x99ef84(0xfb)](_0x99ef84(0x105)+_0x4af2bf,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x395924);const _0x2aed27=bufferSha256(readFileSync(_0x17f261));if(_0x2aed27!==_0x2bfe8b)throw CliErrors[_0x99ef84(0xfb)](_0x99ef84(0x105)+_0x4af2bf+_0x99ef84(0xed)+_0x395924,_0x99ef84(0x106)+_0x395924);}else{const _0x44052c=resolve(_0x4af2bf,SKILL_FILE);if(existsSync(_0x44052c)&&_0xa7a2f1[_0x99ef84(0xf8)]){const _0x4943f4=contentHash(readFileSync(_0x44052c,'utf8'));if(_0x4943f4!==_0xa7a2f1[_0x99ef84(0xf8)])throw CliErrors[_0x99ef84(0xfb)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x44052c,_0x99ef84(0x107));}}for(const _0x173a66 of normalizeLocalFiles(_0x5a6b9d)){if(_0x517c3e?.[_0x173a66[_0x99ef84(0x113)]])continue;if(!_0x517c3e&&_0x173a66[_0x99ef84(0x113)]===SKILL_FILE)continue;const _0x2970f0=resolveManagedFilePath(_0x4af2bf,_0x173a66['path']);if(!existsSync(_0x2970f0))continue;const _0x381e6b=lstatSync(_0x2970f0);if(!_0x381e6b['isFile']())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x4af2bf,_0x99ef84(0x116)+_0x173a66[_0x99ef84(0x113)]);const _0x56040b=bufferSha256(readFileSync(_0x2970f0));if(_0x56040b!==fileHash(_0x173a66))throw CliErrors[_0x99ef84(0xfb)](_0x99ef84(0x105)+_0x4af2bf,_0x99ef84(0x102)+_0x173a66[_0x99ef84(0x113)]);}}function materializeFiles(_0x28e9b1,_0x2a552d){for(const _0x40f59d of normalizeLocalFiles(_0x2a552d)){const _0x4d716e=resolveManagedFilePath(_0x28e9b1,_0x40f59d['path']);mkdirSync(dirname(_0x4d716e),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x4d716e,fileContent(_0x40f59d),0x180);}}function removeStaleManagedFiles(_0x302978,_0x2aaf1b,_0x1c50f4){const _0xa8c2=a91_0x2e57;if(!_0x2aaf1b)return;const _0x448ec5=new Set(normalizeLocalFiles(_0x1c50f4)['map'](_0x22db0a=>_0x22db0a[_0xa8c2(0x113)]));for(const _0x3e70b0 of Object[_0xa8c2(0xee)](_0x2aaf1b)){if(_0x448ec5[_0xa8c2(0xef)](_0x3e70b0))continue;const _0x13505e=resolveManagedFilePath(_0x302978,_0x3e70b0);existsSync(_0x13505e)&&lstatSync(_0x13505e)['isFile']()&&rmSync(_0x13505e,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ff7ef,_0xc7c6f3){const _0x89cf35=a92_0x2149,_0x2d3f48=_0x3ff7ef();while(!![]){try{const _0x54f77a=-parseInt(_0x89cf35(0xf8))/0x1+parseInt(_0x89cf35(0x116))/0x2+-parseInt(_0x89cf35(0x107))/0x3*(parseInt(_0x89cf35(0xfb))/0x4)+parseInt(_0x89cf35(0xfc))/0x5+parseInt(_0x89cf35(0x100))/0x6*(parseInt(_0x89cf35(0x10f))/0x7)+parseInt(_0x89cf35(0x10a))/0x8+-parseInt(_0x89cf35(0xfa))/0x9;if(_0x54f77a===_0xc7c6f3)break;else _0x2d3f48['push'](_0x2d3f48['shift']());}catch(_0x3be11a){_0x2d3f48['push'](_0x2d3f48['shift']());}}}(a92_0x2d5e,0xbc0f1));function a92_0x2149(_0x45a4ef,_0x573de4){_0x45a4ef=_0x45a4ef-0xf4;const _0x2d5ed6=a92_0x2d5e();let _0x21499f=_0x2d5ed6[_0x45a4ef];return _0x21499f;}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a92_0x2d5e(){const _0x184f02=['1141475lCtbhw','Runtime\x20Skill\x20is\x20missing\x20skillCode.','5406372WbjIMv','4OryTBG','842560HtmTxk','files','validation','tags','5946UcxTAg','ossPath','skillName','path','fromEntries','trim','personal','2114916mMCQoa','length','description','10688808qBDxPt','userId','isArray','skillCode','forkedFromSkillId','2261THrNsd','utf8','Invalid\x20','readonly','toISOString','manifest','hasUpstreamUpdate','2785476UOGFjo','zipSha256','map','object','status'];a92_0x2d5e=function(){return _0x184f02;};return a92_0x2d5e();}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x309150,_0x1094a8,_0x2349d8,_0x5151cd,_0x322a26,_0x2fa112,_0x1bb831){const _0x9008cd=a92_0x2149,_0x2b2e6e=_0x2fa112?normalizeLocalFiles(_0x2fa112):[],_0x2d56a6=!_0x1bb831&&_0x2b2e6e[_0x9008cd(0x108)]>0x0?buildSkillPackage(_0x2b2e6e):undefined,_0x53195e=_0x1bb831?bufferSha256(_0x1bb831):_0x2d56a6?.[_0x9008cd(0x114)][_0x9008cd(0xf4)],_0x20a5c7=_0x1bb831?.['length']??_0x2d56a6?.[_0x9008cd(0x114)]['zipSize'],_0x23ed91=_0x2b2e6e[_0x9008cd(0x108)]>0x0?Object[_0x9008cd(0x104)](_0x2b2e6e[_0x9008cd(0xf5)](_0x3c55db=>[_0x3c55db['path'],fileHash(_0x3c55db)])):undefined;return{'schemaVersion':_0x2b2e6e[_0x9008cd(0x108)]>0x0?0x2:0x1,'id':_0x309150['id'],'appCode':_0x2349d8,'skillCode':requireSkillCode(_0x309150),'skillName':_0x309150[_0x9008cd(0x102)],'description':_0x309150[_0x9008cd(0x109)],'scope':_0x1094a8,'readonly':_0x1094a8!==_0x9008cd(0x106)||_0x309150[_0x9008cd(0x112)]===!![],'tenantCode':_0x309150['tenantCode'],'userId':_0x309150[_0x9008cd(0x10b)],'version':_0x309150['version'],'status':_0x309150[_0x9008cd(0xf7)],'tags':Array['isArray'](_0x309150[_0x9008cd(0xff)])?_0x309150[_0x9008cd(0xff)]:[],'hasUpstreamUpdate':_0x309150[_0x9008cd(0x115)],'forkedFromSkillId':_0x309150[_0x9008cd(0x10e)],'forkedFromVersion':_0x309150['forkedFromVersion'],'sourceSessionId':_0x309150['sourceSessionId'],'contentHash':_0x5151cd,'fileHashes':_0x23ed91,'treeHash':_0x2b2e6e[_0x9008cd(0x108)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x2b2e6e)):undefined,'ossPath':remoteManifestOssPath(_0x309150[_0x9008cd(0xfd)]),'zipSha256':_0x53195e,'zipSize':_0x20a5c7,'files':_0x2b2e6e[_0x9008cd(0x108)]>0x0?_0x2b2e6e[_0x9008cd(0xf5)](_0x25d921=>({'path':_0x25d921[_0x9008cd(0x103)],'hash':fileHash(_0x25d921),'size':fileContent(_0x25d921)[_0x9008cd(0x108)]})):undefined,'pulledAt':_0x322a26??new Date()[_0x9008cd(0x113)]()};}export function requireSkillCode(_0x3361c9){const _0x3660d6=a92_0x2149,_0xde8a81=_0x3361c9[_0x3660d6(0x10d)]?.[_0x3660d6(0x105)]();if(!_0xde8a81)throw CliErrors[_0x3660d6(0xfe)](_0x3660d6(0xf9));return _0xde8a81;}export function readMetadataIfPresent(_0x4ae7f0){const _0x498194=a92_0x2149;if(!existsSync(_0x4ae7f0))return undefined;try{const _0x24abc3=JSON['parse'](readFileSync(_0x4ae7f0,_0x498194(0x110)));return _0x24abc3;}catch{throw CliErrors[_0x498194(0xfe)](_0x498194(0x111)+METADATA_FILE+':\x20'+_0x4ae7f0);}}function remoteManifestOssPath(_0x2985fe){const _0x559215=a92_0x2149;if(!_0x2985fe||typeof _0x2985fe!==_0x559215(0xf6)||Array[_0x559215(0x10c)](_0x2985fe))return undefined;const _0x404f05=_0x2985fe[_0x559215(0x101)];return typeof _0x404f05==='string'&&_0x404f05[_0x559215(0x105)]()?_0x404f05[_0x559215(0x105)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a93_0x5d37(_0x228992,_0x10b914){_0x228992=_0x228992-0x10d;const _0x4212b3=a93_0x4212();let _0x5d37e7=_0x4212b3[_0x228992];return _0x5d37e7;}const a93_0x212d52=a93_0x5d37;(function(_0x3851db,_0x5a2279){const _0x10b810=a93_0x5d37,_0x308e37=_0x3851db();while(!![]){try{const _0x29272c=parseInt(_0x10b810(0x126))/0x1+-parseInt(_0x10b810(0x110))/0x2*(parseInt(_0x10b810(0x10e))/0x3)+-parseInt(_0x10b810(0x115))/0x4*(-parseInt(_0x10b810(0x112))/0x5)+-parseInt(_0x10b810(0x11a))/0x6+parseInt(_0x10b810(0x122))/0x7+-parseInt(_0x10b810(0x11f))/0x8+parseInt(_0x10b810(0x125))/0x9*(parseInt(_0x10b810(0x114))/0xa);if(_0x29272c===_0x5a2279)break;else _0x308e37['push'](_0x308e37['shift']());}catch(_0x5f3526){_0x308e37['push'](_0x308e37['shift']());}}}(a93_0x4212,0xa5bb7));import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a93_0x4212(){const _0x34c233=['Unsafe\x20','202jhESUS','CLAUDE_SKILL_ROOT','5067305CiKgSv','cache','5398220nrWpCj','4mpIJiQ','.agents','includes','appCode','trim','4484184eRRLaY','skills','.claude','agentsSkillsDir','\x20for\x20local\x20path:\x20','4183616HdjDDB','homeDir','path\x20segment','6232695SAXVxT','skillCode','homeDirName','9mseGaE','528617WZjQlM','validation','30390JMqFml'];a93_0x4212=function(){return _0x34c233;};return a93_0x4212();}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0xdd3a7d={}){const _0x4a16bc=a93_0x5d37,_0x3fb0a5=_0xdd3a7d[_0x4a16bc(0x120)]??homedir(),_0x15206f=resolve(_0x3fb0a5,PRODUCT_CONFIG[_0x4a16bc(0x124)],_0x4a16bc(0x113)),_0x48c040=trimmedEnv('SKILL_ROOT'),_0x395c52=trimmedEnv(_0x4a16bc(0x111));return{'homeDir':_0x3fb0a5,'cacheRoot':_0x15206f,'managedRoot':resolve(_0x3fb0a5,PRODUCT_CONFIG[_0x4a16bc(0x124)]),'agentsSkillsDir':_0xdd3a7d[_0x4a16bc(0x11d)]??_0x48c040??resolve(_0x3fb0a5,_0x4a16bc(0x116),_0x4a16bc(0x11b)),'claudeSkillsDir':_0xdd3a7d['claudeSkillsDir']??_0x395c52??resolve(_0x3fb0a5,_0x4a16bc(0x11c),'skills')};}export function getRuntimeSkillCacheRoot(_0x197510,_0x4307f6,_0x177e6e={}){const _0x53f4fe=a93_0x5d37,_0x335741=resolveSkillSyncPaths(_0x177e6e);return resolve(_0x335741['cacheRoot'],_0x197510,fingerprintAccessKey(_0x4307f6),_0x53f4fe(0x11b));}export function getRuntimeSkillDir(_0x3c2162,_0xa6e39a,_0x37560e,_0x9acb87,_0x139679,_0x462bb2={}){const _0x3606b7=a93_0x5d37;return resolve(getRuntimeSkillCacheRoot(_0x3c2162,_0xa6e39a,_0x462bb2),safePathSegment(_0x37560e,_0x3606b7(0x118)),_0x9acb87,safePathSegment(_0x139679,_0x3606b7(0x123)));}export function safePathSegment(_0x3b70a3,_0x56fe3f=a93_0x212d52(0x121)){const _0x5cbb09=a93_0x212d52;if(!_0x3b70a3||_0x3b70a3['includes']('/')||_0x3b70a3[_0x5cbb09(0x117)]('\x5c')||_0x3b70a3['includes']('..'))throw CliErrors[_0x5cbb09(0x10d)](_0x5cbb09(0x10f)+_0x56fe3f+_0x5cbb09(0x11e)+_0x3b70a3);return _0x3b70a3;}function trimmedEnv(_0x3d572d){const _0x12e3b6=a93_0x212d52,_0x4b9402=productEnv(_0x3d572d)?.[_0x12e3b6(0x119)]();return _0x4b9402?_0x4b9402:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2ea2ef,_0x48c169){const _0x453808=a94_0x1957,_0x570412=_0x2ea2ef();while(!![]){try{const _0x12c53e=-parseInt(_0x453808(0xc0))/0x1+parseInt(_0x453808(0xac))/0x2*(-parseInt(_0x453808(0xb1))/0x3)+parseInt(_0x453808(0xab))/0x4+parseInt(_0x453808(0xb9))/0x5*(parseInt(_0x453808(0xd5))/0x6)+-parseInt(_0x453808(0xc5))/0x7+parseInt(_0x453808(0xb5))/0x8*(parseInt(_0x453808(0xd3))/0x9)+parseInt(_0x453808(0xb4))/0xa;if(_0x12c53e===_0x48c169)break;else _0x570412['push'](_0x570412['shift']());}catch(_0x2aba0c){_0x570412['push'](_0x570412['shift']());}}}(a94_0x48f1,0xaeae8));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';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';function a94_0x48f1(){const _0x29dde3=['isDirectory','2996192NRfDIv','2AjGCtp','skillCode','unknown','refreshedAt','sourceSessionId','664161hfxTVr','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','utf8','4055830QkWBZn','4593816IsiaLj','isSymbolicLink','Missing\x20','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','44920IClCtv','tags','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','pushedAt','Unable\x20to\x20resolve\x20skillCode\x20from\x20','isArray','files','113215yoEAeI','version','\x20has\x20scope=\x22','builtin','Skill\x20directory\x20not\x20found:\x20','9090592NxqDAJ','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','targetScope','\x20or\x20directory\x20name.','trim','startsWith','path','description','find','company','Skill\x20metadata\x20appCode\x20\x22','(unknown)','content','some','9PjIPKd','length','414lidelL','scope','personal','isFile','skillName','validation','appCode','packageBase64'];a94_0x48f1=function(){return _0x29dde3;};return a94_0x48f1();}import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x4c2da7,_0x4b0684){const _0x583611=a94_0x1957,_0x282137=resolvePushDirectoryRoot(_0x4c2da7),_0x338a30=readMetadataIfPresent(resolve(_0x282137,METADATA_FILE));if(_0x338a30?.['appCode']&&_0x338a30[_0x583611(0xdb)]!==_0x4b0684)throw CliErrors['validation'](_0x583611(0xcf)+_0x338a30[_0x583611(0xdb)]+_0x583611(0xbb)+_0x4b0684+'\x22.');const _0x1c2c66=_0x338a30?.[_0x583611(0xad)]?.[_0x583611(0xc9)]()||deriveSkillCodeFromDirectory(_0x282137,_0x4b0684);if(!_0x1c2c66)throw CliErrors['validation'](_0x583611(0xbd)+METADATA_FILE+_0x583611(0xc8));return{'dir':_0x282137,'skillCode':_0x1c2c66,'metadata':_0x338a30};}export function readPushDirectory(_0x2f5ece,_0x79db88,_0x2f6ced={}){const _0x40afcb=a94_0x1957,_0x2ba109=resolvePushDirectoryIdentity(_0x2f5ece,_0x79db88),_0x261cad=_0x2ba109['dir'],_0x5e3eb2=resolve(_0x261cad,SKILL_FILE);if(!existsSync(_0x5e3eb2)||!lstatSync(_0x5e3eb2)[_0x40afcb(0xd8)]())throw CliErrors[_0x40afcb(0xda)](_0x40afcb(0xb7)+SKILL_FILE+':\x20'+_0x5e3eb2);const _0x331605=_0x2ba109['metadata'],_0x479e8d=_0x2f6ced[_0x40afcb(0xc7)]??_0x40afcb(0xd7);if(_0x331605?.[_0x40afcb(0xd6)]==='builtin')throw CliErrors['validation']('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x40afcb(0xc2)+_0x331605[_0x40afcb(0xd6)]+'\x22.');if(_0x479e8d===_0x40afcb(0xd7)&&_0x331605?.[_0x40afcb(0xd6)]&&_0x331605[_0x40afcb(0xd6)]!==_0x40afcb(0xd7))throw CliErrors[_0x40afcb(0xda)](_0x40afcb(0xc6)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x331605[_0x40afcb(0xd6)]+'\x22.',_0x40afcb(0xb2)+_0x261cad+_0x40afcb(0xb8));const _0x36f30a=scanSkillDirectory(_0x261cad),_0x1aa634=buildSkillPackage(_0x36f30a),_0x312e5f=readFileSync(_0x5e3eb2,_0x40afcb(0xb3)),_0x34dfe7=_0x2ba109[_0x40afcb(0xad)];return{'skillCode':_0x34dfe7,'metadata':_0x331605,'input':{'skillCode':_0x34dfe7,'skillName':_0x331605?.[_0x40afcb(0xd9)],'description':_0x331605?.[_0x40afcb(0xcc)],'content':_0x312e5f,'files':_0x1aa634['manifest'],'packageBase64':_0x1aa634[_0x40afcb(0xdc)],'tags':_0x331605?.[_0x40afcb(0xba)],'version':_0x331605?.[_0x40afcb(0xc1)],'sourceSessionId':_0x331605?.[_0x40afcb(0xb0)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x13f775,_0x3bfadc,_0x37d72e,_0x509223={}){const _0x27cb5a=a94_0x1957,_0x506dd7=resolvePushDirectoryRoot(_0x13f775),_0x3e47b0=readMetadataIfPresent(resolve(_0x506dd7,METADATA_FILE)),_0x26613d=requireRemoteScope(_0x3bfadc),_0x5df99d=readLocalSkillContent(_0x506dd7),_0x13a75d={..._0x3bfadc,'appCode':_0x3bfadc[_0x27cb5a(0xdb)]??_0x37d72e,'skillName':_0x3bfadc[_0x27cb5a(0xd9)]??_0x3e47b0?.[_0x27cb5a(0xd9)],'description':_0x3bfadc['description']??_0x3e47b0?.[_0x27cb5a(0xcc)],'tags':Array[_0x27cb5a(0xbe)](_0x3bfadc['tags'])?_0x3bfadc['tags']:_0x3e47b0?.[_0x27cb5a(0xba)],'sourceSessionId':_0x3bfadc[_0x27cb5a(0xb0)]??_0x3e47b0?.['sourceSessionId'],'content':_0x3bfadc[_0x27cb5a(0xd1)]??_0x5df99d},_0xd7984f=buildMetadata(_0x13a75d,_0x26613d,_0x37d72e,contentHash(_0x5df99d),_0x509223[_0x27cb5a(0xaf)]);writeJsonAtomic(resolve(_0x506dd7,METADATA_FILE),_0xd7984f);}export function recordPushedRuntimeSkill(_0xcb9af9,_0x4e597b,_0x169adb,_0x5a6d93={}){const _0x4ef423=a94_0x1957,_0x2cbc65=resolvePushDirectoryRoot(_0xcb9af9),_0x51431f=scanSkillDirectory(_0x2cbc65),_0x17e2bd=_0x51431f[_0x4ef423(0xcd)](_0x165b9a=>_0x165b9a['path']===SKILL_FILE),_0x5270ef=_0x17e2bd?fileText(_0x17e2bd):'',_0x2ca2ca=tryNormalizePackageManifest(_0x4e597b[_0x4ef423(0xbf)]),_0x517745={..._0x4e597b,'content':_0x4e597b[_0x4ef423(0xd1)]??_0x5270ef,'files':_0x2ca2ca},_0x575941=_0x2ca2ca?normalizeLocalFiles(_0x51431f)['filter'](_0x47d7f5=>_0x2ca2ca[_0x4ef423(0xbf)][_0x4ef423(0xd2)](_0x3c5ec7=>_0x3c5ec7[_0x4ef423(0xcb)]===_0x47d7f5[_0x4ef423(0xcb)])):undefined,_0xc7e906=buildMetadata(_0x517745,_0x5a6d93[_0x4ef423(0xd6)]??_0x4ef423(0xd7),_0x169adb,contentHash(_0x517745[_0x4ef423(0xd1)]??''),_0x5a6d93[_0x4ef423(0xbc)],_0x575941);writeJsonAtomic(resolve(_0x2cbc65,METADATA_FILE),_0xc7e906);}export function deriveSkillCodeFromDirectory(_0x591cbe,_0x27fe10){const _0x2a62b9=a94_0x1957,_0x1537f2=basename(resolve(_0x591cbe)),_0x4a86bc=_0x27fe10+'--';return _0x1537f2[_0x2a62b9(0xca)](_0x4a86bc)?_0x1537f2['slice'](_0x4a86bc[_0x2a62b9(0xd4)]):_0x1537f2;}function a94_0x1957(_0x1f53fc,_0x4f4130){_0x1f53fc=_0x1f53fc-0xab;const _0x48f181=a94_0x48f1();let _0x19573e=_0x48f181[_0x1f53fc];return _0x19573e;}function resolvePushDirectoryRoot(_0x262725){const _0xf37ab4=a94_0x1957,_0x27aa38=resolve(_0x262725);if(!existsSync(_0x27aa38))throw CliErrors[_0xf37ab4(0xda)](_0xf37ab4(0xc4)+_0x262725);const _0x2b5cbd=lstatSync(_0x27aa38);if(_0x2b5cbd['isDirectory']())return _0x27aa38;if(_0x2b5cbd[_0xf37ab4(0xb6)]()){const _0x5e577e=realpathSync(_0x27aa38);if(lstatSync(_0x5e577e)[_0xf37ab4(0xdd)]())return _0x5e577e;}throw CliErrors[_0xf37ab4(0xda)]('Skill\x20directory\x20not\x20found:\x20'+_0x262725);}function requireRemoteScope(_0x5f30e5){const _0x4e879d=a94_0x1957;if(_0x5f30e5[_0x4e879d(0xd6)]===_0x4e879d(0xd7)||_0x5f30e5['scope']===_0x4e879d(0xce)||_0x5f30e5[_0x4e879d(0xd6)]===_0x4e879d(0xc3))return _0x5f30e5[_0x4e879d(0xd6)];throw CliErrors[_0x4e879d(0xda)]('Remote\x20Skill\x20'+(_0x5f30e5[_0x4e879d(0xad)]||_0x4e879d(0xd0))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x5f30e5[_0x4e879d(0xd6)]??_0x4e879d(0xae))+'\x22.');}function readLocalSkillContent(_0x490bf3){const _0x4e3bf4=a94_0x1957,_0x53f614=resolve(_0x490bf3,SKILL_FILE);return existsSync(_0x53f614)&&lstatSync(_0x53f614)[_0x4e3bf4(0xd8)]()?readFileSync(_0x53f614,'utf8'):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f94b6,_0x377938){const _0x564696=a95_0x67dd,_0x1d5d10=_0x1f94b6();while(!![]){try{const _0x39d1f2=-parseInt(_0x564696(0x117))/0x1*(-parseInt(_0x564696(0x118))/0x2)+-parseInt(_0x564696(0x119))/0x3*(-parseInt(_0x564696(0x11a))/0x4)+parseInt(_0x564696(0x11c))/0x5+-parseInt(_0x564696(0x122))/0x6*(-parseInt(_0x564696(0x124))/0x7)+parseInt(_0x564696(0x126))/0x8+-parseInt(_0x564696(0x121))/0x9*(parseInt(_0x564696(0x120))/0xa)+-parseInt(_0x564696(0x116))/0xb;if(_0x39d1f2===_0x377938)break;else _0x1d5d10['push'](_0x1d5d10['shift']());}catch(_0x5d8b43){_0x1d5d10['push'](_0x1d5d10['shift']());}}}(a95_0x1202,0xcfcda));function a95_0x67dd(_0x4a3d1e,_0x2a5369){_0x4a3d1e=_0x4a3d1e-0x116;const _0x120241=a95_0x1202();let _0x67dd62=_0x120241[_0x4a3d1e];return _0x67dd62;}function a95_0x1202(){const _0xc6d04c=['length','5995490VTaoAy','push','validation','personal','100mEapIQ','614970pZWGtj','1180662BGgUIR','company','7iBIQYb','Unsupported\x20runtime\x20Skill\x20scope:\x20','4114624gfZlHM','includes','builtin','17868840wireWr','2lJizCu','490422cwFFYM','174987KcEBNz','52HgEkms'];a95_0x1202=function(){return _0xc6d04c;};return a95_0x1202();}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x2ba0db){const _0x58694b=a95_0x67dd,_0x1424eb=_0x2ba0db&&_0x2ba0db[_0x58694b(0x11b)]>0x0?_0x2ba0db:['personal','company',_0x58694b(0x128)],_0x138c72=[];for(const _0x2a0174 of _0x1424eb){if(!isRuntimeSkillScope(_0x2a0174))throw CliErrors[_0x58694b(0x11e)](_0x58694b(0x125)+_0x2a0174);!_0x138c72[_0x58694b(0x127)](_0x2a0174)&&_0x138c72[_0x58694b(0x11d)](_0x2a0174);}return _0x138c72;}export function isRuntimeSkillScope(_0x39dd8f){const _0x3aea2a=a95_0x67dd;return _0x39dd8f===_0x3aea2a(0x11f)||_0x39dd8f===_0x3aea2a(0x123)||_0x39dd8f==='builtin';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a97_0x333a(_0x2f741d,_0x53096c){_0x2f741d=_0x2f741d-0x155;const _0x23f5a2=a97_0x23f5();let _0x333a2d=_0x23f5a2[_0x2f741d];return _0x333a2d;}const a97_0x1e2e32=a97_0x333a;(function(_0xeecb42,_0x439b0f){const _0x1d86f4=a97_0x333a,_0x4a5d07=_0xeecb42();while(!![]){try{const _0x3b03bd=parseInt(_0x1d86f4(0x166))/0x1+parseInt(_0x1d86f4(0x162))/0x2*(parseInt(_0x1d86f4(0x16b))/0x3)+parseInt(_0x1d86f4(0x15e))/0x4+parseInt(_0x1d86f4(0x16a))/0x5*(-parseInt(_0x1d86f4(0x161))/0x6)+-parseInt(_0x1d86f4(0x169))/0x7+-parseInt(_0x1d86f4(0x163))/0x8*(-parseInt(_0x1d86f4(0x164))/0x9)+-parseInt(_0x1d86f4(0x159))/0xa*(parseInt(_0x1d86f4(0x158))/0xb);if(_0x3b03bd===_0x439b0f)break;else _0x4a5d07['push'](_0x4a5d07['shift']());}catch(_0x5c3063){_0x4a5d07['push'](_0x4a5d07['shift']());}}}(a97_0x23f5,0xaba67));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a97_0x1e2e32(0x15a));function a97_0x23f5(){const _0x4a8b68=['sort','from','2607668YQAIbH','6518355XtTRik','9uqIBhS','name','endsWith','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','code','24788357sEICJo','10TvNUQD','1980-01-01T00:00:00.000Z','validation','object','validation_error','4246156QtWReh','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','length','6HXdJWW','740346xJQeka','10276904DoRNgc','9xbHvah','map','1176090ZrcEvT'];a97_0x23f5=function(){return _0x4a8b68;};return a97_0x23f5();}export function createDeterministicZipPackage(_0x368a18){const _0x4b4c50=a97_0x1e2e32,_0x387397={};for(const _0x32fc18 of normalizeLocalFiles(_0x368a18)){_0x387397[_0x32fc18['path']]=fileContent(_0x32fc18);}return Buffer[_0x4b4c50(0x168)](zipSync(_0x387397,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x1c427f){const _0x1e1bea=a97_0x1e2e32;if(_0x1c427f[_0x1e1bea(0x160)]<0x16)throw CliErrors[_0x1e1bea(0x15b)](_0x1e1bea(0x156));let _0x5a733b;try{_0x5a733b=unzipSync(_0x1c427f,{'filter'(_0x5d1cff){const _0x26807b=_0x1e1bea,_0xc42cf1=normalizeSkillRelativePath(_0x5d1cff[_0x26807b(0x16c)]);if(_0xc42cf1[_0x26807b(0x155)]('/'))throw CliErrors[_0x26807b(0x15b)](_0x26807b(0x15f)+_0xc42cf1);return!![];}});}catch(_0x599a29){if(isRuntimeSkillValidationError(_0x599a29))throw _0x599a29;throw CliErrors[_0x1e1bea(0x15b)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object['entries'](_0x5a733b)[_0x1e1bea(0x165)](([_0x3ec0cd,_0x9b8fbb])=>({'path':normalizeSkillRelativePath(_0x3ec0cd),'bytes':Buffer[_0x1e1bea(0x168)](_0x9b8fbb)}))[_0x1e1bea(0x167)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x221335){const _0xcb66cd=a97_0x1e2e32;return typeof _0x221335===_0xcb66cd(0x15c)&&_0x221335!==null&&_0xcb66cd(0x157)in _0x221335&&_0x221335[_0xcb66cd(0x157)]===_0xcb66cd(0x15d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x132143,_0x479296){const _0x71b325=a98_0xfb65,_0x399f04=_0x132143();while(!![]){try{const _0x3c2c27=-parseInt(_0x71b325(0x99))/0x1*(-parseInt(_0x71b325(0x9f))/0x2)+-parseInt(_0x71b325(0x9e))/0x3+-parseInt(_0x71b325(0x92))/0x4*(parseInt(_0x71b325(0xab))/0x5)+parseInt(_0x71b325(0x8b))/0x6*(-parseInt(_0x71b325(0x9c))/0x7)+parseInt(_0x71b325(0x8c))/0x8+-parseInt(_0x71b325(0xb3))/0x9*(-parseInt(_0x71b325(0xa5))/0xa)+-parseInt(_0x71b325(0xb5))/0xb;if(_0x3c2c27===_0x479296)break;else _0x399f04['push'](_0x399f04['shift']());}catch(_0x28f750){_0x399f04['push'](_0x399f04['shift']());}}}(a98_0x30be,0xb1f94));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';function a98_0x30be(){const _0x2a3b43=['requireOssPath','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','toString','748vctKFW','some','isArray','size','treeSha256','schemaVersion','Duplicate\x20Skill\x20package\x20entry:\x20','876205SmbzGd','trim','Runtime\x20Skill\x20package\x20is\x20missing\x20','90881DOSIyv','ossPath','3528405nJFaqA','2OpASZI','base64','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','push','length','549830lqVnyP','zipSha256','files','bytes','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','validation','2930eAVwQh','isSafeInteger','toLowerCase','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','Missing\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','171GmPeZY','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','389972lBmRBk','has','\x20in\x20Skill\x20file\x20package.','zipSize','path','map','498DojPkb','9654848oGbrdZ','object','set'];a98_0x30be=function(){return _0x2a3b43;};return a98_0x30be();}function a98_0xfb65(_0x3ca7f3,_0x40c795){_0x3ca7f3=_0x3ca7f3-0x8b;const _0x30be45=a98_0x30be();let _0xfb655=_0x30be45[_0x3ca7f3];return _0xfb655;}import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x5e5d0b){const _0x3310e8=a98_0xfb65,_0xbc6932=normalizeLocalFiles(_0x5e5d0b);if(!_0xbc6932['some'](_0x4fefe5=>_0x4fefe5[_0x3310e8(0xb9)]===SKILL_FILE))throw CliErrors[_0x3310e8(0xaa)](_0x3310e8(0xaf)+SKILL_FILE+_0x3310e8(0xb7));const _0x513428=localFilesToManifestFiles(_0xbc6932),_0x2683ac=createDeterministicZipPackage(_0xbc6932);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x513428),'zipSha256':bufferSha256(_0x2683ac),'zipSize':_0x2683ac[_0x3310e8(0xa4)],'files':_0x513428},'packageBytes':_0x2683ac,'packageBase64':_0x2683ac[_0x3310e8(0x91)](_0x3310e8(0xa0))};}export function verifyRuntimeSkillPackage(_0x913c3a,_0x47b9f3){const _0x234d49=a98_0xfb65,_0xb5373d=normalizePackageManifest(_0x913c3a,{'requireOssPath':![]});if(!_0xb5373d)throw CliErrors[_0x234d49(0xaa)](_0x234d49(0x90));return extractAndVerifyPackage(_0xb5373d,_0x47b9f3);}export function verifyRuntimeSkillBundle(_0x1b7d82,_0xbdb8b2){const _0x7d550e=a98_0xfb65,_0x3b7d53=normalizePackageManifest(_0x1b7d82,{'requireOssPath':![]});if(!_0x3b7d53)throw CliErrors[_0x7d550e(0xaa)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x3b7d53,_0xbdb8b2);}export function tryNormalizePackageManifest(_0x371491){return normalizePackageManifest(_0x371491,{'requireOssPath':![]});}export function requirePackageBytes(_0xca8c37,_0x457a8c){const _0x359080=a98_0xfb65;if(!_0x457a8c||_0x457a8c[_0x359080(0xa4)]===0x0)throw CliErrors[_0x359080(0xaa)](_0x359080(0xa1)+_0xca8c37);return _0x457a8c;}export function extractDownloadedPackage(_0x383faa){const _0x16b10a=a98_0xfb65,_0x21d0c2=parseZipPackage(_0x383faa)[_0x16b10a(0xba)](_0x14bc40=>({'path':_0x14bc40['path'],'bytes':_0x14bc40['bytes']}));if(!_0x21d0c2[_0x16b10a(0x93)](_0x52a044=>_0x52a044[_0x16b10a(0xb9)]===SKILL_FILE))throw CliErrors[_0x16b10a(0xaa)](_0x16b10a(0x9b)+SKILL_FILE+'.');return normalizeLocalFiles(_0x21d0c2);}export function localFilesToManifestFiles(_0x54fab7){const _0x273466=a98_0xfb65;return normalizeLocalFiles(_0x54fab7)[_0x273466(0xba)](_0x2e4e0b=>({'path':_0x2e4e0b[_0x273466(0xb9)],'sha256':fileHash(_0x2e4e0b),'size':fileContent(_0x2e4e0b)[_0x273466(0xa4)]}));}function normalizePackageManifest(_0x5dbd94,_0x18f36d){const _0x486ae8=a98_0xfb65;if(!_0x5dbd94||typeof _0x5dbd94!==_0x486ae8(0x8d)||Array[_0x486ae8(0x94)](_0x5dbd94))return undefined;const _0x21f39a=_0x5dbd94,_0x29aa93=typeof _0x21f39a[_0x486ae8(0x9d)]==='string'?_0x21f39a['ossPath'][_0x486ae8(0x9a)]():undefined;if(_0x18f36d[_0x486ae8(0x8f)]&&!_0x29aa93)return undefined;if(!Array[_0x486ae8(0x94)](_0x21f39a[_0x486ae8(0xa7)])||_0x21f39a[_0x486ae8(0xa7)][_0x486ae8(0xa4)]===0x0)return undefined;if(!isSha256Hex(_0x21f39a[_0x486ae8(0x96)]))throw CliErrors[_0x486ae8(0xaa)](_0x486ae8(0xa9));if(!isSha256Hex(_0x21f39a['zipSha256']))throw CliErrors['validation'](_0x486ae8(0xb1));if(!Number['isSafeInteger'](_0x21f39a[_0x486ae8(0xb8)])||_0x21f39a[_0x486ae8(0xb8)]<0x0)throw CliErrors[_0x486ae8(0xaa)](_0x486ae8(0xb2));const _0x323706=normalizeManifestFiles(_0x21f39a['files']);if(!_0x323706['some'](_0xb573eb=>_0xb573eb[_0x486ae8(0xb9)]===SKILL_FILE))throw CliErrors['validation']('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x124fe6=fileTreeHash(_0x323706);if(_0x124fe6!==_0x21f39a[_0x486ae8(0x96)][_0x486ae8(0xad)]())throw CliErrors[_0x486ae8(0xaa)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x486ae8(0xac)](_0x21f39a[_0x486ae8(0x97)])?_0x21f39a[_0x486ae8(0x97)]:0x2,'ossPath':_0x29aa93,'treeSha256':_0x124fe6,'zipSha256':_0x21f39a['zipSha256'][_0x486ae8(0xad)](),'zipSize':_0x21f39a[_0x486ae8(0xb8)],'files':_0x323706};}function extractAndVerifyPackage(_0x38b3ae,_0x381541){const _0x274bc2=a98_0xfb65,_0x43969d=normalizePackageManifest(_0x38b3ae,{'requireOssPath':![]});if(!_0x43969d)throw CliErrors[_0x274bc2(0xaa)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x381541[_0x274bc2(0xa4)]!==_0x43969d[_0x274bc2(0xb8)])throw CliErrors[_0x274bc2(0xaa)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x825d3a=bufferSha256(_0x381541);if(_0x825d3a!==_0x43969d[_0x274bc2(0xa6)])throw CliErrors['validation'](_0x274bc2(0xb4));return extractAndVerifyPackageFiles(_0x43969d,_0x381541);}function extractAndVerifyPackageFiles(_0x521144,_0x28abc2){const _0x37645a=a98_0xfb65,_0x426fae=parseZipPackage(_0x28abc2);if(_0x426fae['length']!==_0x521144[_0x37645a(0xa7)]['length'])throw CliErrors[_0x37645a(0xaa)](_0x37645a(0xae));const _0x4ebadf=new Map();for(const _0x48d448 of _0x426fae){if(_0x4ebadf[_0x37645a(0xb6)](_0x48d448[_0x37645a(0xb9)]))throw CliErrors['validation'](_0x37645a(0x98)+_0x48d448['path']);_0x4ebadf[_0x37645a(0x8e)](_0x48d448['path'],_0x48d448);}const _0x22ba28=[];for(const _0x58a0b9 of _0x521144[_0x37645a(0xa7)]){const _0x2e2694=_0x4ebadf['get'](_0x58a0b9['path']);if(!_0x2e2694)throw CliErrors[_0x37645a(0xaa)](_0x37645a(0xb0)+_0x58a0b9[_0x37645a(0xb9)]);if(_0x2e2694[_0x37645a(0xa8)]['length']!==_0x58a0b9[_0x37645a(0x95)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x58a0b9[_0x37645a(0xb9)]);const _0x4ad664=bufferSha256(_0x2e2694[_0x37645a(0xa8)]);if(_0x4ad664!==_0x58a0b9['sha256'])throw CliErrors[_0x37645a(0xaa)](_0x37645a(0xa2)+_0x58a0b9[_0x37645a(0xb9)]);_0x22ba28[_0x37645a(0xa3)]({'path':_0x58a0b9['path'],'bytes':_0x2e2694[_0x37645a(0xa8)]});}return normalizeLocalFiles(_0x22ba28);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41542b,_0x17e85f){var _0x2c3d57=a99_0x4077,_0x16e055=_0x41542b();while(!![]){try{var _0x510847=parseInt(_0x2c3d57(0xf8))/0x1+-parseInt(_0x2c3d57(0xf5))/0x2*(-parseInt(_0x2c3d57(0xf3))/0x3)+-parseInt(_0x2c3d57(0xf7))/0x4+-parseInt(_0x2c3d57(0xf2))/0x5+parseInt(_0x2c3d57(0xf6))/0x6+parseInt(_0x2c3d57(0xf4))/0x7+-parseInt(_0x2c3d57(0xf9))/0x8;if(_0x510847===_0x17e85f)break;else _0x16e055['push'](_0x16e055['shift']());}catch(_0x3de02f){_0x16e055['push'](_0x16e055['shift']());}}}(a99_0x5729,0xb2052));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,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';function a99_0x5729(){var _0x3c227c=['430640OkHWzT','8679408tsujWU','77180HYoZGW','18237QVEDJG','7437290jMlDoY','282VhoGzn','4317096NAZXcJ','4960932zRZuWe'];a99_0x5729=function(){return _0x3c227c;};return a99_0x5729();}function a99_0x4077(_0x368449,_0x247014){_0x368449=_0x368449-0xf2;var _0x5729e7=a99_0x5729();var _0x407766=_0x5729e7[_0x368449];return _0x407766;}export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5a6a0d,_0x159191){const _0x1e5a11=a100_0x53dd,_0x22cd9c=_0x5a6a0d();while(!![]){try{const _0x33c7ca=parseInt(_0x1e5a11(0xfa))/0x1+parseInt(_0x1e5a11(0xfb))/0x2*(-parseInt(_0x1e5a11(0x103))/0x3)+-parseInt(_0x1e5a11(0xff))/0x4+-parseInt(_0x1e5a11(0xf9))/0x5*(parseInt(_0x1e5a11(0x102))/0x6)+parseInt(_0x1e5a11(0x101))/0x7*(-parseInt(_0x1e5a11(0x100))/0x8)+-parseInt(_0x1e5a11(0xfd))/0x9+-parseInt(_0x1e5a11(0xfe))/0xa*(-parseInt(_0x1e5a11(0xfc))/0xb);if(_0x33c7ca===_0x159191)break;else _0x22cd9c['push'](_0x22cd9c['shift']());}catch(_0x3ec4dc){_0x22cd9c['push'](_0x22cd9c['shift']());}}}(a100_0x16b0,0x53c6c));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a100_0x53dd(_0x342877,_0x598272){_0x342877=_0x342877-0xf9;const _0x16b050=a100_0x16b0();let _0x53dd82=_0x16b050[_0x342877];return _0x53dd82;}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a100_0x16b0(){const _0x4377ee=['42bnbKQa','674787RUUOxa','165865rmlUTw','205956iCTvvo','2DpeSwp','13339227LHippM','2301309gaBwmz','10ZzSELd','199712AETXRg','12384GilFXl','1414ewCXRY'];a100_0x16b0=function(){return _0x4377ee;};return a100_0x16b0();}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x543548=a101_0x472d;function a101_0x28d9(){const _0x14771e=['Failed\x20to\x20clear\x20logs:','yellow','map','4133994Vkhczq','join','readLogs','split','error','3618288hHZTdU','11587707SbieFk','winstonLogger','toISOString','clear','unknown','command','setLogPath','success','now','combine','warn','format','errors','5XpuYKe','158292fhrRjN','stringify','logFileName','writeFileSync','filter','existsSync','11199IhxNgZ','Starting:\x20','transports','red','utf8','duration','blue','readFileSync','Failed:\x20','addColors','initWinstonLogger','Failed\x20to\x20read\x20logs:','printf','trim','info','3629465VgYhFw','level','mkdirSync','log','394mwKsEH','3654808KrmiRt','logFilePath','message','parse','Completed:\x20','clearLogs','getWinstonInstance'];a101_0x28d9=function(){return _0x14771e;};return a101_0x28d9();}(function(_0x23d28c,_0x5aa752){const _0x2e7f76=a101_0x472d,_0x378b4c=_0x23d28c();while(!![]){try{const _0x4c279c=parseInt(_0x2e7f76(0x90))/0x1+-parseInt(_0x2e7f76(0x71))/0x2*(parseInt(_0x2e7f76(0x96))/0x3)+-parseInt(_0x2e7f76(0x72))/0x4*(parseInt(_0x2e7f76(0x8f))/0x5)+parseInt(_0x2e7f76(0x7c))/0x6+parseInt(_0x2e7f76(0x6d))/0x7+-parseInt(_0x2e7f76(0x81))/0x8+parseInt(_0x2e7f76(0x82))/0x9;if(_0x4c279c===_0x5aa752)break;else _0x378b4c['push'](_0x378b4c['shift']());}catch(_0x143c5a){_0x378b4c['push'](_0x378b4c['shift']());}}}(a101_0x28d9,0x86bf0));import a101_0x1ad293 from'winston';import a101_0x2b386f from'node:fs';function a101_0x472d(_0x2a6f6a,_0x298360){_0x2a6f6a=_0x2a6f6a-0x6c;const _0x28d991=a101_0x28d9();let _0x472d54=_0x28d991[_0x2a6f6a];return _0x472d54;}import a101_0x402b5e from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a101_0x543548(0x83)];[a101_0x543548(0x73)]='';['currentRawCommand']='';constructor(){}['setRawCommand'](_0x2fee04){this['currentRawCommand']=_0x2fee04;}[a101_0x543548(0x88)](_0x336522){const _0x10f117=a101_0x543548;this['logFilePath']=a101_0x402b5e[_0x10f117(0x7d)](_0x336522,PRODUCT_CONFIG[_0x10f117(0x92)]),this[_0x10f117(0x83)]&&this['winstonLogger'][_0x10f117(0x85)](),this[_0x10f117(0xa0)]();}[a101_0x543548(0xa0)](){const _0x3524ef=a101_0x543548,_0x3b6ba7=a101_0x402b5e['dirname'](this[_0x3524ef(0x73)]);!a101_0x2b386f[_0x3524ef(0x95)](_0x3b6ba7)&&a101_0x2b386f[_0x3524ef(0x6f)](_0x3b6ba7,{'recursive':!![]});const _0x67ec34=a101_0x1ad293[_0x3524ef(0x8d)][_0x3524ef(0x8b)](a101_0x1ad293['format']['timestamp'](),a101_0x1ad293[_0x3524ef(0x8d)][_0x3524ef(0x8e)]({'stack':!![]}),a101_0x1ad293[_0x3524ef(0x8d)][_0x3524ef(0xa2)](_0x40a385=>{const _0x3ac401=_0x3524ef,_0x213ff5={'timestamp':_0x40a385['timestamp']||new Date()[_0x3ac401(0x84)](),'level':_0x40a385[_0x3ac401(0x6e)]||'info','command':_0x40a385[_0x3ac401(0x87)]||_0x3ac401(0x86),'rawCommand':_0x40a385['rawCommand']||this['currentRawCommand']||undefined,'message':_0x40a385[_0x3ac401(0x74)]||'','duration':_0x40a385[_0x3ac401(0x9b)]||undefined,'details':_0x40a385['details']||undefined};return JSON[_0x3ac401(0x91)](_0x213ff5);}));this[_0x3524ef(0x83)]=a101_0x1ad293['createLogger']({'level':_0x3524ef(0x6c),'format':_0x67ec34,'transports':[new a101_0x1ad293[(_0x3524ef(0x98))]['File']({'filename':this['logFilePath'],'level':_0x3524ef(0x6c)})],'silent':![]}),a101_0x1ad293[_0x3524ef(0x9f)]({'success':'green','error':_0x3524ef(0x99),'warn':_0x3524ef(0x7a),'info':_0x3524ef(0x9c)});}[a101_0x543548(0x6c)](_0x120bf5,_0x54218a,_0x3bb220){const _0x5cb262=a101_0x543548;if(!this[_0x5cb262(0x73)]||!this['winstonLogger'])return;this['winstonLogger'][_0x5cb262(0x6c)](_0x54218a,{'command':_0x120bf5,'details':_0x3bb220});}['success'](_0x41a6ff,_0x2ead4b,_0x232fe9,_0x2d243a){const _0x6ccf5=a101_0x543548;if(!this[_0x6ccf5(0x73)]||!this[_0x6ccf5(0x83)])return;this[_0x6ccf5(0x83)][_0x6ccf5(0x70)](_0x6ccf5(0x6c),_0x2ead4b,{'level':_0x6ccf5(0x89),'command':_0x41a6ff,'duration':_0x232fe9,'details':_0x2d243a});}[a101_0x543548(0x80)](_0x42ad50,_0xd02d5,_0x31dc42){const _0x42c30d=a101_0x543548;if(!this[_0x42c30d(0x73)]||!this[_0x42c30d(0x83)])return;this[_0x42c30d(0x83)][_0x42c30d(0x80)](_0xd02d5,{'command':_0x42ad50,'details':_0x31dc42});}[a101_0x543548(0x8c)](_0x3eefdb,_0x2baf89,_0x4c474c){const _0x23ef16=a101_0x543548;if(!this[_0x23ef16(0x73)]||!this['winstonLogger'])return;this[_0x23ef16(0x83)][_0x23ef16(0x8c)](_0x2baf89,{'command':_0x3eefdb,'details':_0x4c474c});}async['logTask'](_0x3dd50b,_0x493648,_0x3c0580){const _0x8825cc=a101_0x543548,_0x3bb625=Date[_0x8825cc(0x8a)]();this[_0x8825cc(0x6c)](_0x3dd50b,_0x8825cc(0x97)+_0x493648);try{const _0x447664=await _0x3c0580(),_0x2732a2=Date[_0x8825cc(0x8a)]()-_0x3bb625;return this[_0x8825cc(0x89)](_0x3dd50b,_0x8825cc(0x76)+_0x493648,_0x2732a2),_0x447664;}catch(_0x285fdd){const _0x990619=Date['now']()-_0x3bb625;this['error'](_0x3dd50b,_0x8825cc(0x9e)+_0x493648,{'error':_0x285fdd instanceof Error?_0x285fdd[_0x8825cc(0x74)]:String(_0x285fdd),'duration':_0x990619});throw _0x285fdd;}}[a101_0x543548(0x7e)](){const _0x7a7304=a101_0x543548;try{if(!a101_0x2b386f[_0x7a7304(0x95)](this[_0x7a7304(0x73)]))return[];const _0x29ab5f=a101_0x2b386f[_0x7a7304(0x9d)](this['logFilePath'],'utf8');return _0x29ab5f[_0x7a7304(0x7f)](/\r?\n/)[_0x7a7304(0x94)](_0x3f2edd=>_0x3f2edd[_0x7a7304(0xa3)]())[_0x7a7304(0x7b)](_0x3852dc=>JSON[_0x7a7304(0x75)](_0x3852dc));}catch(_0xbb3296){return console[_0x7a7304(0x8c)](_0x7a7304(0xa1),_0xbb3296),[];}}[a101_0x543548(0x77)](){const _0x2dc75d=a101_0x543548;try{a101_0x2b386f['existsSync'](this['logFilePath'])&&a101_0x2b386f[_0x2dc75d(0x93)](this['logFilePath'],'',_0x2dc75d(0x9a));}catch(_0x9ac9f5){console[_0x2dc75d(0x8c)](_0x2dc75d(0x79),_0x9ac9f5);}}[a101_0x543548(0x78)](){const _0x39825f=a101_0x543548;return this[_0x39825f(0x83)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a102_0x4fcf(_0x1c6557,_0x4f9f3c){_0x1c6557=_0x1c6557-0x17a;var _0x1ba3ab=a102_0x1ba3();var _0x4fcf22=_0x1ba3ab[_0x1c6557];return _0x4fcf22;}(function(_0x50401b,_0x5a655f){var _0x4d8522=a102_0x4fcf,_0x83ed0a=_0x50401b();while(!![]){try{var _0x5de316=-parseInt(_0x4d8522(0x184))/0x1+-parseInt(_0x4d8522(0x182))/0x2+parseInt(_0x4d8522(0x181))/0x3*(parseInt(_0x4d8522(0x17f))/0x4)+-parseInt(_0x4d8522(0x17e))/0x5+parseInt(_0x4d8522(0x187))/0x6*(-parseInt(_0x4d8522(0x185))/0x7)+-parseInt(_0x4d8522(0x180))/0x8+parseInt(_0x4d8522(0x17a))/0x9;if(_0x5de316===_0x5a655f)break;else _0x83ed0a['push'](_0x83ed0a['shift']());}catch(_0x2d6968){_0x83ed0a['push'](_0x83ed0a['shift']());}}}(a102_0x1ba3,0xf117b));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x2a9478){var _0x32a764=a102_0x4fcf;if(!_0x2a9478)return undefined;try{return JSON[_0x32a764(0x17c)](_0x2a9478);}catch{throw CliErrors[_0x32a764(0x189)](_0x32a764(0x188)+_0x2a9478);}}export function parseJsonParamsValue(_0x4719a0){var _0x13968c=a102_0x4fcf;if(!_0x4719a0)return undefined;try{return JSON['parse'](_0x4719a0);}catch{throw CliErrors['validation'](_0x13968c(0x188)+_0x4719a0);}}export function parseBatchCreateItemsFromParams(_0x51d943){var _0x26679e=a102_0x4fcf;if(Array[_0x26679e(0x186)](_0x51d943))return _0x51d943;if(_0x51d943!==null&&_0x51d943!==undefined&&typeof _0x51d943==='object'&&Array['isArray'](_0x51d943[_0x26679e(0x17d)]))return _0x51d943[_0x26679e(0x17d)];throw CliErrors['validation'](_0x26679e(0x183),_0x26679e(0x17b));}function a102_0x1ba3(){var _0x1988c0=['batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','617936QqLIAf','2973082oeSnSS','isArray','18YddRxi','Invalid\x20JSON\x20for\x20--params:\x20','validation','48737538ZNvjFW','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','parse','items','6291470AYnStU','1084bLuBwt','9616256IPTUGP','15198ImuuoE','2896426EUvBVQ'];a102_0x1ba3=function(){return _0x1988c0;};return a102_0x1ba3();}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a103_0x27c1(_0x3ae96d,_0xadee09){_0x3ae96d=_0x3ae96d-0x104;const _0x2646a6=a103_0x2646();let _0x27c111=_0x2646a6[_0x3ae96d];return _0x27c111;}const a103_0x24c279=a103_0x27c1;(function(_0x3d4ae1,_0x9fde4c){const _0xdb82f7=a103_0x27c1,_0x25b829=_0x3d4ae1();while(!![]){try{const _0x45d2a8=-parseInt(_0xdb82f7(0x108))/0x1+parseInt(_0xdb82f7(0x111))/0x2*(parseInt(_0xdb82f7(0x109))/0x3)+parseInt(_0xdb82f7(0x106))/0x4+parseInt(_0xdb82f7(0x10a))/0x5*(parseInt(_0xdb82f7(0x110))/0x6)+-parseInt(_0xdb82f7(0x104))/0x7*(parseInt(_0xdb82f7(0x10c))/0x8)+parseInt(_0xdb82f7(0x107))/0x9*(-parseInt(_0xdb82f7(0x105))/0xa)+parseInt(_0xdb82f7(0x10f))/0xb*(parseInt(_0xdb82f7(0x10d))/0xc);if(_0x45d2a8===_0x9fde4c)break;else _0x25b829['push'](_0x25b829['shift']());}catch(_0x4adc09){_0x25b829['push'](_0x25b829['shift']());}}}(a103_0x2646,0x72bc3));function a103_0x2646(){const _0x45dd09=['412572hxxmzO','353565iEWFNH','868204DTFsqp','2004015Rjfkmx','90aBHALt','platform','3544sDSLxH','2642124VNGZst','win32','55jZhJen','133806cgpVvd','2oIkJnZ','1743LlewQh','210yvpaUi'];a103_0x2646=function(){return _0x45dd09;};return a103_0x2646();}export const isWindows=process[a103_0x24c279(0x10b)]===a103_0x24c279(0x10e);export function resolveNpmBin(_0x4ff3da){return isWindows?_0x4ff3da+'.cmd':_0x4ff3da;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d6231,_0x30372c){const _0x3bf666=a104_0x2b6f,_0x49a479=_0x5d6231();while(!![]){try{const _0x574716=-parseInt(_0x3bf666(0xde))/0x1*(-parseInt(_0x3bf666(0xd6))/0x2)+-parseInt(_0x3bf666(0xe4))/0x3*(-parseInt(_0x3bf666(0xd8))/0x4)+parseInt(_0x3bf666(0xf6))/0x5*(-parseInt(_0x3bf666(0xdc))/0x6)+parseInt(_0x3bf666(0xf0))/0x7+parseInt(_0x3bf666(0xdb))/0x8+-parseInt(_0x3bf666(0xf5))/0x9+parseInt(_0x3bf666(0xd2))/0xa*(-parseInt(_0x3bf666(0xe1))/0xb);if(_0x574716===_0x30372c)break;else _0x49a479['push'](_0x49a479['shift']());}catch(_0x28c6d2){_0x49a479['push'](_0x49a479['shift']());}}}(a104_0x7f52,0xb8ca5));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';function a104_0x7f52(){const _0x1c1519=['minor','match','3762288CekLlf','3995tOTbsC','lovrabet-cli','object','number','625750sxnlyw','\x20available,\x20current\x20',',\x20run:\x20','/-/package/','286ajcUnf','map','9668HmcbHR','/dist-tags','latest','10383616WjmIOE','5160YgYkjw','https://www.npmjs.com/package/','3459BtGuzt','trim','lastNotifiedVersion','275KvFzBz','entries','parse','933nFQhCy','checkedAt','true','timeout','prerelease','\x20update','stringify','utf8','json','toLowerCase','update-check.json','now','6175204OfWPdn','filter','major'];a104_0x7f52=function(){return _0x1c1519;};return a104_0x7f52();}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';function a104_0x2b6f(_0x344ea1,_0x3950c4){_0x344ea1=_0x344ea1-0xd2;const _0x7f52c3=a104_0x7f52();let _0x2b6f8d=_0x7f52c3[_0x344ea1];return _0x2b6f8d;}const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x4568e2){const _0xe6235=a104_0x2b6f,_0x44ac08=_0x4568e2[_0xe6235(0xdf)]()[_0xe6235(0xf4)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x44ac08)return null;return{'major':Number(_0x44ac08[0x1]),'minor':Number(_0x44ac08[0x2]),'patch':Number(_0x44ac08[0x3]),'prerelease':_0x44ac08[0x4]};}function compareSemver(_0x5e5422,_0x196b32){const _0x25bed0=a104_0x2b6f,_0x58e352=parseSemver(_0x5e5422),_0x3e84a2=parseSemver(_0x196b32);if(!_0x58e352||!_0x3e84a2)throw new Error('Invalid\x20semver');for(const _0x455b7e of[_0x25bed0(0xf2),_0x25bed0(0xf3),'patch']){if(_0x58e352[_0x455b7e]<_0x3e84a2[_0x455b7e])return-0x1;if(_0x58e352[_0x455b7e]>_0x3e84a2[_0x455b7e])return 0x1;}if(!_0x58e352[_0x25bed0(0xe8)]&&!_0x3e84a2['prerelease'])return 0x0;if(!_0x58e352[_0x25bed0(0xe8)])return 0x1;if(!_0x3e84a2[_0x25bed0(0xe8)])return-0x1;if(_0x58e352[_0x25bed0(0xe8)]===_0x3e84a2[_0x25bed0(0xe8)])return 0x0;return _0x58e352[_0x25bed0(0xe8)]<_0x3e84a2[_0x25bed0(0xe8)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x5025c1=a104_0x2b6f,_0x3c6083=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x5025c1(0xdf)]()[_0x5025c1(0xed)]();return _0x3c6083==='1'||_0x3c6083===_0x5025c1(0xe6)||_0x3c6083==='yes';}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x31fe28=a104_0x2b6f;return join(cacheRoot(),_0x31fe28(0xf7),_0x31fe28(0xee));}async function readUpdateNoticeCache(){const _0x18e73c=a104_0x2b6f;try{const _0x22f191=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x813891=JSON[_0x18e73c(0xe3)](_0x22f191);if(!_0x813891||typeof _0x813891!=='object')return{};return _0x813891;}catch{return{};}}async function writeUpdateNoticeCache(_0x433058){const _0x904ccc=a104_0x2b6f;try{const _0x1b85e4=getUpdateNoticeCachePath();await mkdir(dirname(_0x1b85e4),{'recursive':!![]}),await writeFile(_0x1b85e4,JSON[_0x904ccc(0xea)](_0x433058,null,0x2)+'\x0a',_0x904ccc(0xeb));}catch{}}function isFreshCheck(_0x421e15,_0x27c5fa){const _0x40c844=a104_0x2b6f;return typeof _0x421e15[_0x40c844(0xe5)]===_0x40c844(0xf9)&&_0x27c5fa-_0x421e15[_0x40c844(0xe5)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x515fe5,_0xdc12ac,_0x2ca22f){const _0x41da05=a104_0x2b6f;return _0x515fe5[_0x41da05(0xe0)]===_0xdc12ac&&typeof _0x515fe5['lastNotifiedAt']==='number'&&_0x2ca22f-_0x515fe5['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x4dfb4d=0x5dc){const _0xfb9c8d=a104_0x2b6f;try{const _0x8181ca=NPM_REGISTRY_BASE_URL+_0xfb9c8d(0xd5)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0xfb9c8d(0xd9),_0xbd2fae=await fetch(_0x8181ca,{'signal':AbortSignal[_0xfb9c8d(0xe7)](_0x4dfb4d)});if(!_0xbd2fae['ok'])return null;const _0x4a49fd=await _0xbd2fae[_0xfb9c8d(0xec)]();if(!_0x4a49fd||typeof _0x4a49fd!==_0xfb9c8d(0xf8))return null;return Object['fromEntries'](Object[_0xfb9c8d(0xe2)](_0x4a49fd)[_0xfb9c8d(0xf1)](([,_0x46fd78])=>typeof _0x46fd78==='string'&&_0x46fd78[_0xfb9c8d(0xdf)]())[_0xfb9c8d(0xd7)](([_0x4a6f13,_0x3300bb])=>[_0x4a6f13,String(_0x3300bb)[_0xfb9c8d(0xdf)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x5a4185){const _0x15fe67=a104_0x2b6f;return _0x15fe67(0xdd)+LOVRABET_NPM_PACKAGE_NAME+'/v/'+_0x5a4185;}export async function resolveLatestUpdateNotice(){const _0x401f15=a104_0x2b6f;if(isUpdateNoticeDisabled())return null;try{const _0x59215c=Date[_0x401f15(0xef)](),_0x481fa7=getCliVersion(),_0x56326f=await readUpdateNoticeCache();let _0xc8b47e=isFreshCheck(_0x56326f,_0x59215c)?_0x56326f[_0x401f15(0xda)]?.[_0x401f15(0xdf)]():undefined;if(!_0xc8b47e&&!isFreshCheck(_0x56326f,_0x59215c)){const _0x5deef1=await fetchNpmDistTags();_0xc8b47e=_0x5deef1?.[_0x401f15(0xda)]?.[_0x401f15(0xdf)](),await writeUpdateNoticeCache({..._0x56326f,'checkedAt':_0x59215c,'latest':_0xc8b47e,'failed':!_0xc8b47e});}if(!_0xc8b47e||compareSemver(_0x481fa7,_0xc8b47e)>=0x0)return null;if(isRecentlyNotified(_0x56326f,_0xc8b47e,_0x59215c))return null;const _0x48b1bc=CLI_BIN_NAME+_0x401f15(0xe9);return await writeUpdateNoticeCache({..._0x56326f,'checkedAt':isFreshCheck(_0x56326f,_0x59215c)?_0x56326f['checkedAt']:_0x59215c,'latest':_0xc8b47e,'failed':![],'lastNotifiedVersion':_0xc8b47e,'lastNotifiedAt':_0x59215c}),{'command':_0x48b1bc,'current':_0x481fa7,'latest':_0xc8b47e,'url':buildNpmVersionUrl(_0xc8b47e),'message':CLI_BIN_NAME+'\x20'+_0xc8b47e+_0x401f15(0xd3)+_0x481fa7+_0x401f15(0xd4)+_0x48b1bc};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a105_0x321e(_0x14b0f1,_0x2bd986){_0x14b0f1=_0x14b0f1-0x1e2;const _0x50c6fa=a105_0x50c6();let _0x321e46=_0x50c6fa[_0x14b0f1];return _0x321e46;}(function(_0x2b97d4,_0x48f523){const _0x36ec2d=a105_0x321e,_0x4d72a1=_0x2b97d4();while(!![]){try{const _0x111eb3=-parseInt(_0x36ec2d(0x1e5))/0x1+parseInt(_0x36ec2d(0x1e2))/0x2+-parseInt(_0x36ec2d(0x1ed))/0x3+parseInt(_0x36ec2d(0x1ee))/0x4*(-parseInt(_0x36ec2d(0x1e3))/0x5)+parseInt(_0x36ec2d(0x1e8))/0x6*(-parseInt(_0x36ec2d(0x1eb))/0x7)+parseInt(_0x36ec2d(0x1e7))/0x8*(-parseInt(_0x36ec2d(0x1e4))/0x9)+-parseInt(_0x36ec2d(0x1ec))/0xa*(-parseInt(_0x36ec2d(0x1ea))/0xb);if(_0x111eb3===_0x48f523)break;else _0x4d72a1['push'](_0x4d72a1['shift']());}catch(_0x29f60f){_0x4d72a1['push'](_0x4d72a1['shift']());}}}(a105_0x50c6,0x96038));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';function a105_0x50c6(){const _0x48347e=['unknown','772277tYFfkN','7710507zOzmWY','670PstBOo','1385553ZNuEdf','3874388nGPwYj','459348aYGmZy','5ELnGGK','9jjmJth','1212693PcjuGE','slice','4595560FfFmvo','6whOhpj'];a105_0x50c6=function(){return _0x48347e;};return a105_0x50c6();}export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x329846=a105_0x321e,_0x36fa51=String(GIT_COMMIT);return _0x36fa51&&_0x36fa51!==_0x329846(0x1e9)?_0x36fa51:'';}export function getCliVersionDisplay(){const _0x506750=a105_0x321e,_0xfa19e5=getCliGitCommit(),_0x449d04=BUILD_TIME[_0x506750(0x1e6)](0x0,0xa);if(!_0xfa19e5||!_0x449d04)return VERSION;return VERSION+'\x20('+_0xfa19e5+',\x20'+_0x449d04+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a106_0x263a(_0x557b8c,_0x1785df){_0x557b8c=_0x557b8c-0x8b;var _0x1e9abe=a106_0x1e9a();var _0x263ad9=_0x1e9abe[_0x557b8c];return _0x263ad9;}(function(_0x3c929f,_0x59f0dd){var _0x104787=a106_0x263a,_0x11a4cd=_0x3c929f();while(!![]){try{var _0x14a84e=parseInt(_0x104787(0x96))/0x1*(-parseInt(_0x104787(0x91))/0x2)+parseInt(_0x104787(0x94))/0x3*(parseInt(_0x104787(0x97))/0x4)+-parseInt(_0x104787(0x99))/0x5*(parseInt(_0x104787(0x8e))/0x6)+-parseInt(_0x104787(0x95))/0x7*(parseInt(_0x104787(0x93))/0x8)+parseInt(_0x104787(0x8d))/0x9*(parseInt(_0x104787(0x92))/0xa)+-parseInt(_0x104787(0x90))/0xb*(-parseInt(_0x104787(0x8f))/0xc)+-parseInt(_0x104787(0x9a))/0xd*(parseInt(_0x104787(0x8b))/0xe);if(_0x14a84e===_0x59f0dd)break;else _0x11a4cd['push'](_0x11a4cd['shift']());}catch(_0x370b1c){_0x11a4cd['push'](_0x11a4cd['shift']());}}}(a106_0x1e9a,0x69a40));function a106_0x1e9a(){var _0x542285=['14GGPkvH','stderr','63gOPHOF','2130pwzYYB','12cYoUdL','4977148ULcAYe','2HdWdYw','391480wVyxRj','400ADplzT','18nURxeh','75481EQXkeu','81163aGkInL','417336oWNyQc','write','970LLXcrV','2998073lEiEei'];a106_0x1e9a=function(){return _0x542285;};return a106_0x1e9a();}export function writeCliSideChannelLine(_0x19ec26){var _0x2b45e9=a106_0x263a;process[_0x2b45e9(0x8c)][_0x2b45e9(0x98)](_0x19ec26+'\x0a');}
|