@lovrabet/lovrabet-cli 2.1.5 → 2.1.6-beta.2
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(_0x50f9a2,_0x2e0a8d){const _0x92c4e9=a91_0x19de,_0x5dec58=_0x50f9a2();while(!![]){try{const _0x2e331e=-parseInt(_0x92c4e9(0x10c))/0x1+parseInt(_0x92c4e9(0x108))/0x2*(parseInt(_0x92c4e9(0x11b))/0x3)+parseInt(_0x92c4e9(0xfd))/0x4+parseInt(_0x92c4e9(0xff))/0x5*(-parseInt(_0x92c4e9(0xf5))/0x6)+parseInt(_0x92c4e9(0x11a))/0x7+-parseInt(_0x92c4e9(0x10e))/0x8+parseInt(_0x92c4e9(0x109))/0x9*(-parseInt(_0x92c4e9(0x101))/0xa);if(_0x2e331e===_0x2e0a8d)break;else _0x5dec58['push'](_0x5dec58['shift']());}catch(_0x2597d1){_0x5dec58['push'](_0x5dec58['shift']());}}}(a91_0x3deb,0xd3b7e));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';function a91_0x19de(_0x39b57b,_0x1d2370){_0x39b57b=_0x39b57b-0xf5;const _0x3deb2a=a91_0x3deb();let _0x19de3e=_0x3deb2a[_0x39b57b];return _0x19de3e;}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(_0x2a26cf,_0x123e52,_0x25f169){const _0x4d5efb=a91_0x19de,_0x499f0d=requireSkillCode(_0x2a26cf),_0x230be2=requirePackageBytes(_0x499f0d,_0x25f169[_0x4d5efb(0x105)]),_0x1b81d0=extractDownloadedPackage(_0x230be2),_0x26a0da=_0x1b81d0[_0x4d5efb(0x106)](_0x35779f=>_0x35779f[_0x4d5efb(0x10a)]===SKILL_FILE);if(!_0x26a0da)throw CliErrors['validation'](_0x4d5efb(0x10f)+SKILL_FILE+':\x20'+_0x499f0d);const _0x34e2b5=withMaterializedSkillFrontmatter(_0x1b81d0,_0x2a26cf,_0x499f0d),_0x552d6=_0x34e2b5[_0x4d5efb(0x106)](_0x40aa35=>_0x40aa35[_0x4d5efb(0x10a)]===SKILL_FILE),_0x15107b=fileText(_0x552d6),_0x303d52=getRuntimeSkillDir(_0x25f169[_0x4d5efb(0x119)],_0x25f169[_0x4d5efb(0x100)],_0x25f169[_0x4d5efb(0xf9)],_0x123e52,_0x499f0d,_0x25f169['paths']),_0x2d96e2=resolve(_0x303d52,SKILL_FILE),_0x2b8863=resolve(_0x303d52,METADATA_FILE),_0x3e5475=contentHash(_0x15107b),_0x1eb9a7=readMetadataIfPresent(_0x2b8863)?.[_0x4d5efb(0x103)];ensurePulledFilesCanBeOverwritten(_0x303d52,_0x2b8863,_0x34e2b5,_0x25f169['force']===!![]),mkdirSync(_0x303d52,{'recursive':!![],'mode':0x1c0});const _0x40a990=existsSync(_0x2d96e2)?readFileSync(_0x2d96e2,_0x4d5efb(0x113)):undefined;return materializeFiles(_0x303d52,_0x34e2b5),removeStaleManagedFiles(_0x303d52,_0x1eb9a7,_0x34e2b5),writeJsonAtomic(_0x2b8863,buildMetadata(_0x2a26cf,_0x123e52,_0x25f169[_0x4d5efb(0xf9)],_0x3e5475,_0x25f169[_0x4d5efb(0x11c)],_0x34e2b5,_0x230be2)),{'skill':_0x2a26cf,'scope':_0x123e52,'dir':_0x303d52,'skillMdPath':_0x2d96e2,'metadataPath':_0x2b8863,'contentHash':_0x3e5475,'changed':_0x40a990!==_0x15107b};}function withMaterializedSkillFrontmatter(_0x251a5a,_0x38f45b,_0x37b584){const _0xd2d68b=a91_0x19de;return normalizeLocalFiles(_0x251a5a)[_0xd2d68b(0x117)](_0x2e509c=>{const _0x467eec=_0xd2d68b,_0x38d8c5=fileText(_0x2e509c);if(_0x2e509c[_0x467eec(0x10a)]!==SKILL_FILE||hasYamlFrontmatter(_0x38d8c5))return _0x2e509c;return{'path':_0x2e509c[_0x467eec(0x10a)],'content':prependSkillFrontmatter(_0x38d8c5,{'name':_0x37b584,'description':_0x38f45b[_0x467eec(0x115)]?.[_0x467eec(0x11d)]()||_0x38f45b[_0x467eec(0xfb)]?.['trim']()||_0x37b584})};});}function hasYamlFrontmatter(_0x4081b5){const _0x17382d=a91_0x19de;return/^\uFEFF?---\s*\r?\n/[_0x17382d(0xf8)](_0x4081b5);}function a91_0x3deb(){const _0x5788ab=['1284968MtURYF','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','7316312vAaSOY','Runtime\x20Skill\x20package\x20is\x20missing\x20','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','.\x20Changed\x20file:\x20','keys','utf8','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','description','replace','map','isFile','env','9704296MmZBdF','6JIJCXI','pulledAt','trim','18sFfJPk','has','length','test','appCode','name:\x20','skillName','contentHash','6427572VacmeX','---','356910tkJHiW','accessKey','160670qCTmJI','validation','fileHashes','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','packageBytes','find','entries','1026712WWmtOd','414tvAwMp','path','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'];a91_0x3deb=function(){return _0x5788ab;};return a91_0x3deb();}function prependSkillFrontmatter(_0x316c80,_0x658ec){const _0x220c81=a91_0x19de,_0x45f962=_0x316c80[_0x220c81(0x116)](/^\uFEFF/,'');return[_0x220c81(0xfe),_0x220c81(0xfa)+yamlString(_0x658ec['name']),'description:\x20'+yamlString(_0x658ec[_0x220c81(0x115)]),_0x220c81(0xfe),'',_0x45f962]['join']('\x0a');}function yamlString(_0x59a2d0){const _0x254e5d=a91_0x19de;return JSON['stringify'](_0x59a2d0[_0x254e5d(0x116)](/\r/g,'')[_0x254e5d(0x11d)]());}function ensurePulledFilesCanBeOverwritten(_0x38902a,_0x5c2a1c,_0x314695,_0x4da31c){const _0x42098e=a91_0x19de;if(_0x4da31c||!existsSync(_0x5c2a1c))return;const _0x61de5d=readMetadataIfPresent(_0x5c2a1c);if(!_0x61de5d)return;const _0x2609c2=_0x61de5d[_0x42098e(0x103)]&&Object['keys'](_0x61de5d[_0x42098e(0x103)])[_0x42098e(0xf7)]>0x0?_0x61de5d[_0x42098e(0x103)]:undefined;if(_0x2609c2)for(const [_0x3681fb,_0x3b0f21]of Object[_0x42098e(0x107)](_0x2609c2)){const _0x580d64=resolveManagedFilePath(_0x38902a,_0x3681fb);if(!existsSync(_0x580d64))throw CliErrors[_0x42098e(0x102)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x38902a,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x3681fb);const _0x12bbb4=lstatSync(_0x580d64);if(!_0x12bbb4['isFile']())throw CliErrors[_0x42098e(0x102)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x38902a,_0x42098e(0x110)+_0x3681fb);const _0x25cd4c=bufferSha256(readFileSync(_0x580d64));if(_0x25cd4c!==_0x3b0f21)throw CliErrors[_0x42098e(0x102)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x38902a+_0x42098e(0x111)+_0x3681fb,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x3681fb);}else{const _0x5bd96a=resolve(_0x38902a,SKILL_FILE);if(existsSync(_0x5bd96a)&&_0x61de5d[_0x42098e(0xfc)]){const _0x3fa4b3=contentHash(readFileSync(_0x5bd96a,_0x42098e(0x113)));if(_0x3fa4b3!==_0x61de5d[_0x42098e(0xfc)])throw CliErrors[_0x42098e(0x102)](_0x42098e(0x10d)+_0x5bd96a,_0x42098e(0x104));}}for(const _0xbf9a06 of normalizeLocalFiles(_0x314695)){if(_0x2609c2?.[_0xbf9a06[_0x42098e(0x10a)]])continue;if(!_0x2609c2&&_0xbf9a06[_0x42098e(0x10a)]===SKILL_FILE)continue;const _0x4a1504=resolveManagedFilePath(_0x38902a,_0xbf9a06[_0x42098e(0x10a)]);if(!existsSync(_0x4a1504))continue;const _0x4f29e7=lstatSync(_0x4a1504);if(!_0x4f29e7[_0x42098e(0x118)]())throw CliErrors[_0x42098e(0x102)](_0x42098e(0x114)+_0x38902a,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0xbf9a06[_0x42098e(0x10a)]);const _0x13ae69=bufferSha256(readFileSync(_0x4a1504));if(_0x13ae69!==fileHash(_0xbf9a06))throw CliErrors[_0x42098e(0x102)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x38902a,_0x42098e(0x10b)+_0xbf9a06[_0x42098e(0x10a)]);}}function materializeFiles(_0x50f055,_0x170ad1){const _0x278601=a91_0x19de;for(const _0x55c550 of normalizeLocalFiles(_0x170ad1)){const _0x127c39=resolveManagedFilePath(_0x50f055,_0x55c550[_0x278601(0x10a)]);mkdirSync(dirname(_0x127c39),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x127c39,fileContent(_0x55c550),0x180);}}function removeStaleManagedFiles(_0x159f81,_0x385319,_0x38da2c){const _0x2d75e5=a91_0x19de;if(!_0x385319)return;const _0x34af85=new Set(normalizeLocalFiles(_0x38da2c)[_0x2d75e5(0x117)](_0x2b3b3d=>_0x2b3b3d[_0x2d75e5(0x10a)]));for(const _0xdcfb8b of Object[_0x2d75e5(0x112)](_0x385319)){if(_0x34af85[_0x2d75e5(0xf6)](_0xdcfb8b))continue;const _0x3d3d16=resolveManagedFilePath(_0x159f81,_0xdcfb8b);existsSync(_0x3d3d16)&&lstatSync(_0x3d3d16)['isFile']()&&rmSync(_0x3d3d16,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f807d,_0x399120){const _0x337b65=a92_0x2f95,_0x30c1f7=_0x1f807d();while(!![]){try{const _0x2555e9=-parseInt(_0x337b65(0xbb))/0x1+-parseInt(_0x337b65(0xc8))/0x2+-parseInt(_0x337b65(0xb6))/0x3*(-parseInt(_0x337b65(0xdf))/0x4)+parseInt(_0x337b65(0xcb))/0x5*(parseInt(_0x337b65(0xc1))/0x6)+-parseInt(_0x337b65(0xd4))/0x7*(-parseInt(_0x337b65(0xbe))/0x8)+-parseInt(_0x337b65(0xd9))/0x9*(-parseInt(_0x337b65(0xb7))/0xa)+parseInt(_0x337b65(0xbf))/0xb*(-parseInt(_0x337b65(0xd2))/0xc);if(_0x2555e9===_0x399120)break;else _0x30c1f7['push'](_0x30c1f7['shift']());}catch(_0x38a237){_0x30c1f7['push'](_0x30c1f7['shift']());}}}(a92_0x35ec,0xd7fdb));import{existsSync,readFileSync}from'node:fs';function a92_0x2f95(_0x218e8b,_0x4a601d){_0x218e8b=_0x218e8b-0xb6;const _0x35ec69=a92_0x35ec();let _0x2f9545=_0x35ec69[_0x218e8b];return _0x2f9545;}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_0x35ec(){const _0x43bd5a=['sourceSessionId','description','status','forkedFromSkillId','2310792aYNmQw','tenantCode','5339999yXYImm','skillName','skillCode','parse','Invalid\x20','5718546xninMc','fromEntries','readonly','object','map','string','8MpyWcf','1787904pZqtnQ','20MmToHK','utf8','tags','hasUpstreamUpdate','1149291jAItQU','path','forkedFromVersion','8HBxjOI','55PSMpKG','toISOString','18IuGXDR','personal','userId','length','manifest','ossPath','version','2451028LXXWGE','zipSha256','isArray','1661255cqRXVT','trim','validation'];a92_0x35ec=function(){return _0x43bd5a;};return a92_0x35ec();}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x45e184,_0x702b9f,_0x5b6062,_0x160ad9,_0x1440ba,_0x350a68,_0x175055){const _0x206917=a92_0x2f95,_0x48bae6=_0x350a68?normalizeLocalFiles(_0x350a68):[],_0x7053d6=!_0x175055&&_0x48bae6[_0x206917(0xc4)]>0x0?buildSkillPackage(_0x48bae6):undefined,_0x2a2bef=_0x175055?bufferSha256(_0x175055):_0x7053d6?.[_0x206917(0xc5)][_0x206917(0xc9)],_0x28697e=_0x175055?.['length']??_0x7053d6?.[_0x206917(0xc5)]['zipSize'],_0x318d7c=_0x48bae6['length']>0x0?Object[_0x206917(0xda)](_0x48bae6[_0x206917(0xdd)](_0x305951=>[_0x305951[_0x206917(0xbc)],fileHash(_0x305951)])):undefined;return{'schemaVersion':_0x48bae6[_0x206917(0xc4)]>0x0?0x2:0x1,'id':_0x45e184['id'],'appCode':_0x5b6062,'skillCode':requireSkillCode(_0x45e184),'skillName':_0x45e184[_0x206917(0xd5)],'description':_0x45e184[_0x206917(0xcf)],'scope':_0x702b9f,'readonly':_0x702b9f!==_0x206917(0xc2)||_0x45e184[_0x206917(0xdb)]===!![],'tenantCode':_0x45e184[_0x206917(0xd3)],'userId':_0x45e184[_0x206917(0xc3)],'version':_0x45e184[_0x206917(0xc7)],'status':_0x45e184[_0x206917(0xd0)],'tags':Array['isArray'](_0x45e184[_0x206917(0xb9)])?_0x45e184[_0x206917(0xb9)]:[],'hasUpstreamUpdate':_0x45e184[_0x206917(0xba)],'forkedFromSkillId':_0x45e184[_0x206917(0xd1)],'forkedFromVersion':_0x45e184[_0x206917(0xbd)],'sourceSessionId':_0x45e184[_0x206917(0xce)],'contentHash':_0x160ad9,'fileHashes':_0x318d7c,'treeHash':_0x48bae6['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x48bae6)):undefined,'ossPath':remoteManifestOssPath(_0x45e184['files']),'zipSha256':_0x2a2bef,'zipSize':_0x28697e,'files':_0x48bae6[_0x206917(0xc4)]>0x0?_0x48bae6['map'](_0x585a3a=>({'path':_0x585a3a['path'],'hash':fileHash(_0x585a3a),'size':fileContent(_0x585a3a)[_0x206917(0xc4)]})):undefined,'pulledAt':_0x1440ba??new Date()[_0x206917(0xc0)]()};}export function requireSkillCode(_0x548599){const _0x3d0b00=a92_0x2f95,_0x1454b3=_0x548599[_0x3d0b00(0xd6)]?.['trim']();if(!_0x1454b3)throw CliErrors[_0x3d0b00(0xcd)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x1454b3;}export function readMetadataIfPresent(_0x3f3106){const _0x4e114d=a92_0x2f95;if(!existsSync(_0x3f3106))return undefined;try{const _0x41daab=JSON[_0x4e114d(0xd7)](readFileSync(_0x3f3106,_0x4e114d(0xb8)));return _0x41daab;}catch{throw CliErrors['validation'](_0x4e114d(0xd8)+METADATA_FILE+':\x20'+_0x3f3106);}}function remoteManifestOssPath(_0x6cb3a5){const _0x42f1b2=a92_0x2f95;if(!_0x6cb3a5||typeof _0x6cb3a5!==_0x42f1b2(0xdc)||Array[_0x42f1b2(0xca)](_0x6cb3a5))return undefined;const _0x55bc89=_0x6cb3a5[_0x42f1b2(0xc6)];return typeof _0x55bc89===_0x42f1b2(0xde)&&_0x55bc89[_0x42f1b2(0xcc)]()?_0x55bc89[_0x42f1b2(0xcc)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5f4082,_0x1510d9){const _0x42ca64=a93_0x2c96,_0x110bc3=_0x5f4082();while(!![]){try{const _0x4e612e=-parseInt(_0x42ca64(0xf1))/0x1*(-parseInt(_0x42ca64(0xe5))/0x2)+parseInt(_0x42ca64(0xe8))/0x3+parseInt(_0x42ca64(0xee))/0x4*(parseInt(_0x42ca64(0xf9))/0x5)+parseInt(_0x42ca64(0xed))/0x6+-parseInt(_0x42ca64(0xe9))/0x7+parseInt(_0x42ca64(0xfa))/0x8*(parseInt(_0x42ca64(0xeb))/0x9)+-parseInt(_0x42ca64(0xf6))/0xa;if(_0x4e612e===_0x1510d9)break;else _0x110bc3['push'](_0x110bc3['shift']());}catch(_0x56820c){_0x110bc3['push'](_0x110bc3['shift']());}}}(a93_0x4d09,0x1d32c));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';function a93_0x2c96(_0x4b83ac,_0x4d7a57){_0x4b83ac=_0x4b83ac-0xe4;const _0x4d095e=a93_0x4d09();let _0x2c96ea=_0x4d095e[_0x4b83ac];return _0x2c96ea;}import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x32c045={}){const _0x1e742c=a93_0x2c96,_0x1a8c32=_0x32c045[_0x1e742c(0xe7)]??homedir(),_0x5eb9ba=resolve(_0x1a8c32,PRODUCT_CONFIG[_0x1e742c(0xf7)],'cache'),_0x2eaac9=trimmedEnv('SKILL_ROOT'),_0x183673=trimmedEnv(_0x1e742c(0xe4));return{'homeDir':_0x1a8c32,'cacheRoot':_0x5eb9ba,'managedRoot':resolve(_0x1a8c32,PRODUCT_CONFIG[_0x1e742c(0xf7)]),'agentsSkillsDir':_0x32c045[_0x1e742c(0xec)]??_0x2eaac9??resolve(_0x1a8c32,_0x1e742c(0xea),_0x1e742c(0xf0)),'claudeSkillsDir':_0x32c045['claudeSkillsDir']??_0x183673??resolve(_0x1a8c32,_0x1e742c(0xf3),'skills')};}export function getRuntimeSkillCacheRoot(_0x2da5a8,_0x1eb3bb,_0x3a11f7={}){const _0x4ce941=a93_0x2c96,_0x1aa404=resolveSkillSyncPaths(_0x3a11f7);return resolve(_0x1aa404[_0x4ce941(0xf2)],_0x2da5a8,fingerprintAccessKey(_0x1eb3bb),_0x4ce941(0xf0));}export function getRuntimeSkillDir(_0x305943,_0x4770bd,_0xe32189,_0x33569d,_0x578fde,_0x272725={}){const _0x15edec=a93_0x2c96;return resolve(getRuntimeSkillCacheRoot(_0x305943,_0x4770bd,_0x272725),safePathSegment(_0xe32189,'appCode'),_0x33569d,safePathSegment(_0x578fde,_0x15edec(0xf4)));}export function safePathSegment(_0x2717b7,_0x36c9f3='path\x20segment'){const _0x1943a6=a93_0x2c96;if(!_0x2717b7||_0x2717b7['includes']('/')||_0x2717b7['includes']('\x5c')||_0x2717b7[_0x1943a6(0xe6)]('..'))throw CliErrors['validation'](_0x1943a6(0xef)+_0x36c9f3+_0x1943a6(0xf8)+_0x2717b7);return _0x2717b7;}function a93_0x4d09(){const _0x153c49=['24678ziDNdy','cacheRoot','.claude','skillCode','trim','4289670SZDyIl','homeDirName','\x20for\x20local\x20path:\x20','20030lPiQwg','3760JVmWcS','CLAUDE_SKILL_ROOT','14OzqOZY','includes','homeDir','394512XqyVZr','55496jDUmVh','.agents','954SdSnWe','agentsSkillsDir','781878LQSMRJ','72iYCdja','Unsafe\x20','skills'];a93_0x4d09=function(){return _0x153c49;};return a93_0x4d09();}function trimmedEnv(_0x4ef3bd){const _0x232106=a93_0x2c96,_0xa3ea0b=productEnv(_0x4ef3bd)?.[_0x232106(0xf5)]();return _0xa3ea0b?_0xa3ea0b:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48f90b,_0x44220d){const _0xa0f81c=a94_0x2c3f,_0x40b2fd=_0x48f90b();while(!![]){try{const _0x4f7b3d=parseInt(_0xa0f81c(0x12f))/0x1*(parseInt(_0xa0f81c(0x126))/0x2)+-parseInt(_0xa0f81c(0x125))/0x3*(parseInt(_0xa0f81c(0x144))/0x4)+parseInt(_0xa0f81c(0x12b))/0x5*(-parseInt(_0xa0f81c(0x140))/0x6)+-parseInt(_0xa0f81c(0x142))/0x7+-parseInt(_0xa0f81c(0x131))/0x8*(-parseInt(_0xa0f81c(0x141))/0x9)+-parseInt(_0xa0f81c(0x133))/0xa+parseInt(_0xa0f81c(0x13d))/0xb;if(_0x4f7b3d===_0x44220d)break;else _0x40b2fd['push'](_0x40b2fd['shift']());}catch(_0x34d071){_0x40b2fd['push'](_0x40b2fd['shift']());}}}(a94_0x3354,0x831b8));function a94_0x2c3f(_0x49111f,_0x53d6b6){_0x49111f=_0x49111f-0x125;const _0x3354c9=a94_0x3354();let _0x2c3f9d=_0x3354c9[_0x49111f];return _0x2c3f9d;}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_0x3354(){const _0x554f2d=['Skill\x20directory\x20not\x20found:\x20','some','validation','24210989FbkYFF','isFile','description','5833398tpOJKq','7317513nkwchX','6166314bSBLof','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','33328GWpVxu','\x20has\x20scope=\x22','skillCode','slice','pushedAt','339BgzNHs','6EgriZz','length','isDirectory','Skill\x20metadata\x20appCode\x20\x22','sourceSessionId','5ASJVgl','files','find','Missing\x20','281963vJrlUY','Unable\x20to\x20resolve\x20skillCode\x20from\x20','8zwOrgp','content','5282780KOZaya','manifest','scope','appCode','\x20or\x20directory\x20name.','path','version'];a94_0x3354=function(){return _0x554f2d;};return a94_0x3354();}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(_0x7ac523,_0x4b8941){const _0x3acb03=a94_0x2c3f,_0x5c6dab=resolvePushDirectoryRoot(_0x7ac523),_0x3133ad=resolve(_0x5c6dab,SKILL_FILE);if(!existsSync(_0x3133ad)||!lstatSync(_0x3133ad)[_0x3acb03(0x13e)]())throw CliErrors[_0x3acb03(0x13c)](_0x3acb03(0x12e)+SKILL_FILE+':\x20'+_0x3133ad);const _0x402b69=readMetadataIfPresent(resolve(_0x5c6dab,METADATA_FILE));if(_0x402b69?.[_0x3acb03(0x135)]&&_0x402b69[_0x3acb03(0x135)]!=='personal')throw CliErrors['validation'](_0x3acb03(0x143)+METADATA_FILE+_0x3acb03(0x145)+_0x402b69['scope']+'\x22.');if(_0x402b69?.[_0x3acb03(0x136)]&&_0x402b69[_0x3acb03(0x136)]!==_0x4b8941)throw CliErrors[_0x3acb03(0x13c)](_0x3acb03(0x129)+_0x402b69[_0x3acb03(0x136)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x4b8941+'\x22.');const _0xf41e1a=scanSkillDirectory(_0x5c6dab),_0x57aa5e=buildSkillPackage(_0xf41e1a),_0x5b1f80=readFileSync(_0x3133ad,'utf8'),_0xca30d6=_0x402b69?.[_0x3acb03(0x146)]??deriveSkillCodeFromDirectory(_0x5c6dab,_0x4b8941);if(!_0xca30d6)throw CliErrors[_0x3acb03(0x13c)](_0x3acb03(0x130)+METADATA_FILE+_0x3acb03(0x137));return{'skillCode':_0xca30d6,'metadata':_0x402b69,'input':{'skillCode':_0xca30d6,'skillName':_0x402b69?.['skillName'],'description':_0x402b69?.[_0x3acb03(0x13f)],'content':_0x5b1f80,'files':_0x57aa5e[_0x3acb03(0x134)],'packageBase64':_0x57aa5e['packageBase64'],'tags':_0x402b69?.['tags'],'version':_0x402b69?.[_0x3acb03(0x139)],'sourceSessionId':_0x402b69?.[_0x3acb03(0x12a)]}};}export function recordPushedRuntimeSkill(_0x45e96e,_0x514313,_0x34d1ca,_0x1546bc={}){const _0x40a2f9=a94_0x2c3f,_0x4c6582=resolvePushDirectoryRoot(_0x45e96e),_0x9db326=scanSkillDirectory(_0x4c6582),_0x543f64=_0x9db326[_0x40a2f9(0x12d)](_0x38745a=>_0x38745a[_0x40a2f9(0x138)]===SKILL_FILE),_0x4fc013=_0x543f64?fileText(_0x543f64):'',_0xe1f1d8=tryNormalizePackageManifest(_0x514313[_0x40a2f9(0x12c)]),_0x301b13={..._0x514313,'content':_0x514313[_0x40a2f9(0x132)]??_0x4fc013,'files':_0xe1f1d8},_0x2fbe40=_0xe1f1d8?normalizeLocalFiles(_0x9db326)['filter'](_0x1a960c=>_0xe1f1d8[_0x40a2f9(0x12c)][_0x40a2f9(0x13b)](_0x247dce=>_0x247dce[_0x40a2f9(0x138)]===_0x1a960c['path'])):undefined,_0x269256=buildMetadata(_0x301b13,_0x1546bc[_0x40a2f9(0x135)]??'personal',_0x34d1ca,contentHash(_0x301b13[_0x40a2f9(0x132)]??''),_0x1546bc[_0x40a2f9(0x148)],_0x2fbe40);writeJsonAtomic(resolve(_0x4c6582,METADATA_FILE),_0x269256);}export function deriveSkillCodeFromDirectory(_0x1b1702,_0x27c475){const _0x25e82d=a94_0x2c3f,_0x589ef5=basename(resolve(_0x1b1702)),_0x40fe6c=_0x27c475+'--';return _0x589ef5['startsWith'](_0x40fe6c)?_0x589ef5[_0x25e82d(0x147)](_0x40fe6c[_0x25e82d(0x127)]):_0x589ef5;}function resolvePushDirectoryRoot(_0x3d0910){const _0x29eca7=a94_0x2c3f,_0x1e6a23=resolve(_0x3d0910);if(!existsSync(_0x1e6a23))throw CliErrors[_0x29eca7(0x13c)](_0x29eca7(0x13a)+_0x3d0910);const _0x26100e=lstatSync(_0x1e6a23);if(_0x26100e[_0x29eca7(0x128)]())return _0x1e6a23;if(_0x26100e['isSymbolicLink']()){const _0x272d3b=realpathSync(_0x1e6a23);if(lstatSync(_0x272d3b)[_0x29eca7(0x128)]())return _0x272d3b;}throw CliErrors[_0x29eca7(0x13c)](_0x29eca7(0x13a)+_0x3d0910);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41681b,_0x45e102){const _0x5af251=a95_0x4f41,_0x442843=_0x41681b();while(!![]){try{const _0x469d0f=-parseInt(_0x5af251(0xcf))/0x1+-parseInt(_0x5af251(0xd3))/0x2+parseInt(_0x5af251(0xda))/0x3*(parseInt(_0x5af251(0xce))/0x4)+-parseInt(_0x5af251(0xd7))/0x5+parseInt(_0x5af251(0xd2))/0x6+-parseInt(_0x5af251(0xdc))/0x7*(-parseInt(_0x5af251(0xd9))/0x8)+-parseInt(_0x5af251(0xcc))/0x9*(-parseInt(_0x5af251(0xd8))/0xa);if(_0x469d0f===_0x45e102)break;else _0x442843['push'](_0x442843['shift']());}catch(_0x198aa4){_0x442843['push'](_0x442843['shift']());}}}(a95_0x485d,0x6a032));import{CliErrors}from'../../errors.js';function a95_0x4f41(_0x4e4a68,_0x341222){_0x4e4a68=_0x4e4a68-0xcb;const _0x485d73=a95_0x485d();let _0x4f41df=_0x485d73[_0x4e4a68];return _0x4f41df;}export function normalizeRuntimeSkillScopes(_0x2d4106){const _0xc7d0c3=a95_0x4f41,_0x40577e=_0x2d4106&&_0x2d4106[_0xc7d0c3(0xd6)]>0x0?_0x2d4106:[_0xc7d0c3(0xd5),_0xc7d0c3(0xd0),_0xc7d0c3(0xcd)],_0x2aafb6=[];for(const _0x21171f of _0x40577e){if(!isRuntimeSkillScope(_0x21171f))throw CliErrors[_0xc7d0c3(0xd4)](_0xc7d0c3(0xcb)+_0x21171f);!_0x2aafb6[_0xc7d0c3(0xd1)](_0x21171f)&&_0x2aafb6[_0xc7d0c3(0xdb)](_0x21171f);}return _0x2aafb6;}export function isRuntimeSkillScope(_0xe9f0e1){const _0x4330c8=a95_0x4f41;return _0xe9f0e1==='personal'||_0xe9f0e1===_0x4330c8(0xd0)||_0xe9f0e1===_0x4330c8(0xcd);}function a95_0x485d(){const _0x75d22a=['1135310sGGjPG','136832otHkIn','24042rvTUkg','push','105rzaMQx','Unsupported\x20runtime\x20Skill\x20scope:\x20','81JzsNJd','builtin','20kEHTxr','717581bcXyUB','company','includes','4409898cLIOwG','1060496xeTrIY','validation','personal','length','1856685TQHwNm'];a95_0x485d=function(){return _0x75d22a;};return a95_0x485d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a97_0x75c1(_0x7aa5c,_0xac7135){_0x7aa5c=_0x7aa5c-0x177;const _0x5c4706=a97_0x5c47();let _0x75c161=_0x5c4706[_0x7aa5c];return _0x75c161;}function a97_0x5c47(){const _0xdf5f77=['endsWith','Runtime\x20Skill\x20package\x20exceeds\x20file\x20count\x20limit.','path','Runtime\x20Skill\x20package\x20file\x20exceeds\x20size\x20limit:\x20','2153512DpGDvJ','entries','56apIeNU','name','map','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','validation_error','1597770FcBXDc','68463xHOyDU','1980-01-01T00:00:00.000Z','340237hjJHjq','object','104640ojYiYZ','1173114LtXBGe','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','77CzgakW','code','sort','validation','Skill\x20package\x20exceeds\x20size\x20limit.','2973490rgETSE','originalSize','length','5BfPwXN'];a97_0x5c47=function(){return _0xdf5f77;};return a97_0x5c47();}const a97_0x2d02c2=a97_0x75c1;(function(_0x3fe1c0,_0x568a10){const _0x1374be=a97_0x75c1,_0x13b8de=_0x3fe1c0();while(!![]){try{const _0x47a92c=-parseInt(_0x1374be(0x189))/0x1+parseInt(_0x1374be(0x18c))/0x2+-parseInt(_0x1374be(0x186))/0x3+-parseInt(_0x1374be(0x17f))/0x4*(-parseInt(_0x1374be(0x17a))/0x5)+-parseInt(_0x1374be(0x18b))/0x6*(parseInt(_0x1374be(0x18e))/0x7)+parseInt(_0x1374be(0x181))/0x8*(-parseInt(_0x1374be(0x187))/0x9)+parseInt(_0x1374be(0x177))/0xa;if(_0x47a92c===_0x568a10)break;else _0x13b8de['push'](_0x13b8de['shift']());}catch(_0x183ae7){_0x13b8de['push'](_0x13b8de['shift']());}}}(a97_0x5c47,0x4a4f0));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{MAX_SKILL_FILE_BYTES,MAX_SKILL_FILE_COUNT,MAX_SKILL_PACKAGE_BYTES,MAX_SKILL_TOTAL_BYTES}from'./constants.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a97_0x2d02c2(0x188));export function createDeterministicZipPackage(_0x136110){const _0x428ee1=a97_0x2d02c2,_0x58f394={};for(const _0x3c7066 of normalizeLocalFiles(_0x136110)){_0x58f394[_0x3c7066[_0x428ee1(0x17d)]]=fileContent(_0x3c7066);}const _0x4349a9=Buffer['from'](zipSync(_0x58f394,{'level':0x0,'mtime':ZIP_MTIME}));if(_0x4349a9['length']>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x428ee1(0x191)](_0x428ee1(0x192));return _0x4349a9;}export function parseZipPackage(_0x4609b6){const _0x3e6bca=a97_0x2d02c2;if(_0x4609b6[_0x3e6bca(0x179)]<0x16)throw CliErrors[_0x3e6bca(0x191)](_0x3e6bca(0x18d));if(_0x4609b6[_0x3e6bca(0x179)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.');let _0x57a692=0x0,_0x29bd18=0x0,_0x12e4ef;try{_0x12e4ef=unzipSync(_0x4609b6,{'filter'(_0xbc0c9f){const _0x117a69=_0x3e6bca,_0xb2b12b=normalizeSkillRelativePath(_0xbc0c9f[_0x117a69(0x182)]);if(_0xb2b12b[_0x117a69(0x17b)]('/'))throw CliErrors[_0x117a69(0x191)](_0x117a69(0x184)+_0xb2b12b);if(_0xbc0c9f[_0x117a69(0x178)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x117a69(0x191)](_0x117a69(0x17e)+_0xb2b12b);_0x57a692+=0x1;if(_0x57a692>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x117a69(0x191)](_0x117a69(0x17c));_0x29bd18+=_0xbc0c9f['originalSize'];if(_0x29bd18>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x117a69(0x191)]('Runtime\x20Skill\x20package\x20exceeds\x20total\x20file\x20size\x20limit.');return!![];}});}catch(_0x1fb082){if(isRuntimeSkillValidationError(_0x1fb082))throw _0x1fb082;throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x3e6bca(0x180)](_0x12e4ef)[_0x3e6bca(0x183)](([_0x4d7040,_0x3c3361])=>({'path':normalizeSkillRelativePath(_0x4d7040),'bytes':Buffer['from'](_0x3c3361)}))[_0x3e6bca(0x190)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x19513c){const _0x1d21f3=a97_0x2d02c2;return typeof _0x19513c===_0x1d21f3(0x18a)&&_0x19513c!==null&&_0x1d21f3(0x18f)in _0x19513c&&_0x19513c[_0x1d21f3(0x18f)]===_0x1d21f3(0x185);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c7be1,_0x54abde){const _0x2a9583=a98_0x81a5,_0x2d241d=_0x1c7be1();while(!![]){try{const _0x38e139=parseInt(_0x2a9583(0x1de))/0x1*(parseInt(_0x2a9583(0x1eb))/0x2)+-parseInt(_0x2a9583(0x1d3))/0x3*(parseInt(_0x2a9583(0x1d2))/0x4)+-parseInt(_0x2a9583(0x1f3))/0x5*(-parseInt(_0x2a9583(0x1f0))/0x6)+-parseInt(_0x2a9583(0x1ed))/0x7+parseInt(_0x2a9583(0x1ea))/0x8+-parseInt(_0x2a9583(0x1e3))/0x9+-parseInt(_0x2a9583(0x1d0))/0xa*(parseInt(_0x2a9583(0x1cd))/0xb);if(_0x38e139===_0x54abde)break;else _0x2d241d['push'](_0x2d241d['shift']());}catch(_0x3fc79b){_0x2d241d['push'](_0x2d241d['shift']());}}}(a98_0x167f,0x26cbc));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(_0x3860d7){const _0x26a211=a98_0x81a5,_0x273a7d=normalizeLocalFiles(_0x3860d7);if(!_0x273a7d[_0x26a211(0x1dc)](_0x1d3be0=>_0x1d3be0['path']===SKILL_FILE))throw CliErrors['validation'](_0x26a211(0x1cc)+SKILL_FILE+_0x26a211(0x1f4));const _0x48b8fc=localFilesToManifestFiles(_0x273a7d),_0x1d1df2=createDeterministicZipPackage(_0x273a7d);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x48b8fc),'zipSha256':bufferSha256(_0x1d1df2),'zipSize':_0x1d1df2['length'],'files':_0x48b8fc},'packageBytes':_0x1d1df2,'packageBase64':_0x1d1df2[_0x26a211(0x1e6)](_0x26a211(0x1e9))};}function a98_0x167f(){const _0x327c12=['1057165SDNXgD','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit:\x20','object','length','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','zipSize','Missing\x20','627638FunveB','validation','string','20vSKXfW','path','388264NtTnHw','6FGQagt','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','toLowerCase','trim','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','sha256','isArray','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','some','set','900UMNagM','zipSha256','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','ossPath','files','1469979SdWJps','has','size','toString','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','base64','1882712ZBxqCx','626TFqlBN','Runtime\x20Skill\x20package\x20is\x20missing\x20','685895QCeDQK','bytes','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','6RQERdI','isSafeInteger','get'];a98_0x167f=function(){return _0x327c12;};return a98_0x167f();}export function verifyRuntimeSkillPackage(_0x3b84d1,_0x2e6953){const _0x55c873=a98_0x81a5,_0x44674f=normalizePackageManifest(_0x3b84d1,{'requireOssPath':![]});if(!_0x44674f)throw CliErrors[_0x55c873(0x1ce)](_0x55c873(0x1db));return extractAndVerifyPackage(_0x44674f,_0x2e6953);}export function verifyRuntimeSkillBundle(_0x592d8a,_0x3dd38d){const _0x11f22f=a98_0x81a5,_0x41e857=normalizePackageManifest(_0x592d8a,{'requireOssPath':![]});if(!_0x41e857)throw CliErrors['validation'](_0x11f22f(0x1db));if(_0x3dd38d[_0x11f22f(0x1f9)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x11f22f(0x1ce)](_0x11f22f(0x1e0));return extractAndVerifyPackageFiles(_0x41e857,_0x3dd38d);}export function tryNormalizePackageManifest(_0xd67cbc){return normalizePackageManifest(_0xd67cbc,{'requireOssPath':![]});}export function requirePackageBytes(_0x1bef68,_0x452015){const _0x2ea2bb=a98_0x81a5;if(!_0x452015||_0x452015[_0x2ea2bb(0x1f9)]===0x0)throw CliErrors[_0x2ea2bb(0x1ce)](_0x2ea2bb(0x1ef)+_0x1bef68);if(_0x452015['length']>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation'](_0x2ea2bb(0x1f7)+_0x1bef68);return _0x452015;}export function extractDownloadedPackage(_0x34db69){const _0x3719f3=a98_0x81a5,_0x288787=parseZipPackage(_0x34db69)['map'](_0xb595db=>({'path':_0xb595db[_0x3719f3(0x1d1)],'bytes':_0xb595db[_0x3719f3(0x1ee)]}));if(!_0x288787[_0x3719f3(0x1dc)](_0x4d1ed6=>_0x4d1ed6[_0x3719f3(0x1d1)]===SKILL_FILE))throw CliErrors[_0x3719f3(0x1ce)](_0x3719f3(0x1ec)+SKILL_FILE+'.');return normalizeLocalFiles(_0x288787);}export function localFilesToManifestFiles(_0x1ed80d){return normalizeLocalFiles(_0x1ed80d)['map'](_0x10619d=>({'path':_0x10619d['path'],'sha256':fileHash(_0x10619d),'size':fileContent(_0x10619d)['length']}));}function normalizePackageManifest(_0x54ae71,_0x2eb5d9){const _0x5b1351=a98_0x81a5;if(!_0x54ae71||typeof _0x54ae71!==_0x5b1351(0x1f8)||Array[_0x5b1351(0x1da)](_0x54ae71))return undefined;const _0x45d3c7=_0x54ae71,_0x5019aa=typeof _0x45d3c7['ossPath']===_0x5b1351(0x1cf)?_0x45d3c7[_0x5b1351(0x1e1)][_0x5b1351(0x1d6)]():undefined;if(_0x2eb5d9['requireOssPath']&&!_0x5019aa)return undefined;if(!Array['isArray'](_0x45d3c7[_0x5b1351(0x1e2)])||_0x45d3c7[_0x5b1351(0x1e2)][_0x5b1351(0x1f9)]===0x0)return undefined;if(!isSha256Hex(_0x45d3c7['treeSha256']))throw CliErrors[_0x5b1351(0x1ce)](_0x5b1351(0x1fa));if(!isSha256Hex(_0x45d3c7[_0x5b1351(0x1df)]))throw CliErrors[_0x5b1351(0x1ce)](_0x5b1351(0x1fb));if(!Number['isSafeInteger'](_0x45d3c7['zipSize'])||_0x45d3c7[_0x5b1351(0x1fc)]<0x0)throw CliErrors[_0x5b1351(0x1ce)](_0x5b1351(0x1d4));if(_0x45d3c7['zipSize']>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x5b1351(0x1ce)]('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.');const _0x254b8b=normalizeManifestFiles(_0x45d3c7['files']);if(!_0x254b8b[_0x5b1351(0x1dc)](_0xde643a=>_0xde643a[_0x5b1351(0x1d1)]===SKILL_FILE))throw CliErrors[_0x5b1351(0x1ce)](_0x5b1351(0x1e7)+SKILL_FILE+'.');const _0x56e48e=fileTreeHash(_0x254b8b);if(_0x56e48e!==_0x45d3c7['treeSha256'][_0x5b1351(0x1d5)]())throw CliErrors[_0x5b1351(0x1ce)](_0x5b1351(0x1f5));return{'schemaVersion':Number[_0x5b1351(0x1f1)](_0x45d3c7['schemaVersion'])?_0x45d3c7['schemaVersion']:0x2,'ossPath':_0x5019aa,'treeSha256':_0x56e48e,'zipSha256':_0x45d3c7[_0x5b1351(0x1df)][_0x5b1351(0x1d5)](),'zipSize':_0x45d3c7[_0x5b1351(0x1fc)],'files':_0x254b8b};}function extractAndVerifyPackage(_0xc39819,_0x162bda){const _0x4c13c3=a98_0x81a5,_0x167a69=normalizePackageManifest(_0xc39819,{'requireOssPath':![]});if(!_0x167a69)throw CliErrors[_0x4c13c3(0x1ce)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x162bda['length']!==_0x167a69['zipSize'])throw CliErrors[_0x4c13c3(0x1ce)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x1f09ea=bufferSha256(_0x162bda);if(_0x1f09ea!==_0x167a69[_0x4c13c3(0x1df)])throw CliErrors['validation'](_0x4c13c3(0x1d8));return extractAndVerifyPackageFiles(_0x167a69,_0x162bda);}function a98_0x81a5(_0x293023,_0x4ddcea){_0x293023=_0x293023-0x1cc;const _0x167f02=a98_0x167f();let _0x81a560=_0x167f02[_0x293023];return _0x81a560;}function extractAndVerifyPackageFiles(_0x46c318,_0x31b4cd){const _0xe0a5a1=a98_0x81a5,_0x5582e7=parseZipPackage(_0x31b4cd);if(_0x5582e7['length']!==_0x46c318[_0xe0a5a1(0x1e2)][_0xe0a5a1(0x1f9)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x41479a=new Map();for(const _0x59fb99 of _0x5582e7){if(_0x41479a[_0xe0a5a1(0x1e4)](_0x59fb99[_0xe0a5a1(0x1d1)]))throw CliErrors[_0xe0a5a1(0x1ce)](_0xe0a5a1(0x1f6)+_0x59fb99['path']);_0x41479a[_0xe0a5a1(0x1dd)](_0x59fb99[_0xe0a5a1(0x1d1)],_0x59fb99);}const _0x57e4d7=[];for(const _0x4bb124 of _0x46c318['files']){const _0x533a12=_0x41479a[_0xe0a5a1(0x1f2)](_0x4bb124['path']);if(!_0x533a12)throw CliErrors[_0xe0a5a1(0x1ce)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x4bb124[_0xe0a5a1(0x1d1)]);if(_0x533a12[_0xe0a5a1(0x1ee)][_0xe0a5a1(0x1f9)]!==_0x4bb124[_0xe0a5a1(0x1e5)])throw CliErrors[_0xe0a5a1(0x1ce)](_0xe0a5a1(0x1e8)+_0x4bb124[_0xe0a5a1(0x1d1)]);const _0x5024bf=bufferSha256(_0x533a12[_0xe0a5a1(0x1ee)]);if(_0x5024bf!==_0x4bb124[_0xe0a5a1(0x1d9)])throw CliErrors[_0xe0a5a1(0x1ce)](_0xe0a5a1(0x1d7)+_0x4bb124[_0xe0a5a1(0x1d1)]);_0x57e4d7['push']({'path':_0x4bb124[_0xe0a5a1(0x1d1)],'bytes':_0x533a12[_0xe0a5a1(0x1ee)]});}return normalizeLocalFiles(_0x57e4d7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x98802c,_0x11f9e2){var _0x3609a3=a99_0x4576,_0x1df494=_0x98802c();while(!![]){try{var _0x2ba27d=parseInt(_0x3609a3(0x13b))/0x1*(-parseInt(_0x3609a3(0x139))/0x2)+parseInt(_0x3609a3(0x136))/0x3*(parseInt(_0x3609a3(0x13c))/0x4)+parseInt(_0x3609a3(0x13d))/0x5+parseInt(_0x3609a3(0x138))/0x6*(-parseInt(_0x3609a3(0x137))/0x7)+parseInt(_0x3609a3(0x134))/0x8+parseInt(_0x3609a3(0x135))/0x9+parseInt(_0x3609a3(0x133))/0xa*(-parseInt(_0x3609a3(0x13a))/0xb);if(_0x2ba27d===_0x11f9e2)break;else _0x1df494['push'](_0x1df494['shift']());}catch(_0x2da28e){_0x1df494['push'](_0x1df494['shift']());}}}(a99_0x53ee,0xa13de));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';function a99_0x4576(_0x1b21ae,_0x1e9a42){_0x1b21ae=_0x1b21ae-0x133;var _0x53ee68=a99_0x53ee();var _0x4576dd=_0x53ee68[_0x1b21ae];return _0x4576dd;}export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,recordPushedRuntimeSkill}from'./runtime-skill-sync/push.js';function a99_0x53ee(){var _0x365946=['82743NRAdwo','7jUPomv','6362094rCajEN','18xUkUWe','48642OrzPeW','106662vSAETo','92jRTxPw','4701275KwibQJ','710ApbNVi','4494256QpwYmP','7724835fzWLqu'];a99_0x53ee=function(){return _0x365946;};return a99_0x53ee();}export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf1e0,_0x2d95ed){const _0x530bf9=a100_0x770d,_0x3718a2=_0xf1e0();while(!![]){try{const _0x472dc8=parseInt(_0x530bf9(0x16e))/0x1+parseInt(_0x530bf9(0x171))/0x2*(-parseInt(_0x530bf9(0x173))/0x3)+parseInt(_0x530bf9(0x16c))/0x4*(-parseInt(_0x530bf9(0x172))/0x5)+-parseInt(_0x530bf9(0x16f))/0x6+-parseInt(_0x530bf9(0x170))/0x7+parseInt(_0x530bf9(0x16b))/0x8+parseInt(_0x530bf9(0x16d))/0x9*(parseInt(_0x530bf9(0x16a))/0xa);if(_0x472dc8===_0x2d95ed)break;else _0x3718a2['push'](_0x3718a2['shift']());}catch(_0x4a3ce5){_0x3718a2['push'](_0x3718a2['shift']());}}}(a100_0x4238,0x58a06));function a100_0x4238(){const _0x577e75=['3892lQaOGk','2090088VDGitm','3331923sRPOcd','321596HJqqji','3356385mJzqfm','6YPOFMf','19333850HecNah','1943576GZyVyK','4nunoCT','9VTMnjY'];a100_0x4238=function(){return _0x577e75;};return a100_0x4238();}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a100_0x770d(_0x257d3a,_0x1db54d){_0x257d3a=_0x257d3a-0x16a;const _0x42387c=a100_0x4238();let _0x770d05=_0x42387c[_0x257d3a];return _0x770d05;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a101_0x382eea=a101_0x5e7d;(function(_0x28f3a4,_0x164706){const _0xff788c=a101_0x5e7d,_0xc5799c=_0x28f3a4();while(!![]){try{const _0x3384d3=parseInt(_0xff788c(0x1c8))/0x1+-parseInt(_0xff788c(0x1e9))/0x2*(-parseInt(_0xff788c(0x1ec))/0x3)+-parseInt(_0xff788c(0x1d6))/0x4+parseInt(_0xff788c(0x1dd))/0x5+parseInt(_0xff788c(0x1e5))/0x6+parseInt(_0xff788c(0x1d2))/0x7+-parseInt(_0xff788c(0x1c7))/0x8*(parseInt(_0xff788c(0x1e0))/0x9);if(_0x3384d3===_0x164706)break;else _0xc5799c['push'](_0xc5799c['shift']());}catch(_0x21bed1){_0xc5799c['push'](_0xc5799c['shift']());}}}(a101_0x5439,0x764ca));function a101_0x5e7d(_0x43ccab,_0x14db30){_0x43ccab=_0x43ccab-0x1bc;const _0x543938=a101_0x5439();let _0x5e7dc1=_0x543938[_0x43ccab];return _0x5e7dc1;}import a101_0x23c7d1 from'winston';import a101_0x1d0b10 from'node:fs';import a101_0x2f8837 from'node:path';function a101_0x5439(){const _0x2d0d70=['parse','command','8ICzpPR','875941cDOVnr','format','duration','getWinstonInstance','error','unknown','blue','readFileSync','Failed\x20to\x20clear\x20logs:','utf8','4030971BpghXw','Failed\x20to\x20read\x20logs:','printf','now','1447332vrJikr','warn','join','writeFileSync','File','setRawCommand','toISOString','2944865IMxPnR','details','Starting:\x20','18200205TQKfYe','logFilePath','info','transports','logTask','1701834IYIDeN','Failed:\x20','addColors','readLogs','4VLLLfe','winstonLogger','trim','816339UYBvSK','logFileName','yellow','existsSync','mkdirSync','stringify','timestamp','initWinstonLogger','map','currentRawCommand','dirname','Completed:\x20','message','rawCommand','red','createLogger','success'];a101_0x5439=function(){return _0x2d0d70;};return a101_0x5439();}import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a101_0x382eea(0x1ea)];['logFilePath']='';[a101_0x382eea(0x1bd)]='';constructor(){}[a101_0x382eea(0x1db)](_0x5626b9){this['currentRawCommand']=_0x5626b9;}['setLogPath'](_0x362c28){const _0x3fea1a=a101_0x382eea;this['logFilePath']=a101_0x2f8837[_0x3fea1a(0x1d8)](_0x362c28,PRODUCT_CONFIG[_0x3fea1a(0x1ed)]),this[_0x3fea1a(0x1ea)]&&this[_0x3fea1a(0x1ea)]['clear'](),this['initWinstonLogger']();}[a101_0x382eea(0x1f3)](){const _0x3439ba=a101_0x382eea,_0x125796=a101_0x2f8837[_0x3439ba(0x1be)](this['logFilePath']);!a101_0x1d0b10['existsSync'](_0x125796)&&a101_0x1d0b10[_0x3439ba(0x1f0)](_0x125796,{'recursive':!![]});const _0x2da871=a101_0x23c7d1['format']['combine'](a101_0x23c7d1[_0x3439ba(0x1c9)]['timestamp'](),a101_0x23c7d1[_0x3439ba(0x1c9)]['errors']({'stack':!![]}),a101_0x23c7d1[_0x3439ba(0x1c9)][_0x3439ba(0x1d4)](_0x23a82e=>{const _0x48ca89=_0x3439ba,_0x18ad37={'timestamp':_0x23a82e[_0x48ca89(0x1f2)]||new Date()[_0x48ca89(0x1dc)](),'level':_0x23a82e['level']||'info','command':_0x23a82e[_0x48ca89(0x1c6)]||_0x48ca89(0x1cd),'rawCommand':_0x23a82e[_0x48ca89(0x1c1)]||this[_0x48ca89(0x1bd)]||undefined,'message':_0x23a82e[_0x48ca89(0x1c0)]||'','duration':_0x23a82e[_0x48ca89(0x1ca)]||undefined,'details':_0x23a82e[_0x48ca89(0x1de)]||undefined};return JSON[_0x48ca89(0x1f1)](_0x18ad37);}));this[_0x3439ba(0x1ea)]=a101_0x23c7d1[_0x3439ba(0x1c3)]({'level':_0x3439ba(0x1e2),'format':_0x2da871,'transports':[new a101_0x23c7d1[(_0x3439ba(0x1e3))][(_0x3439ba(0x1da))]({'filename':this['logFilePath'],'level':_0x3439ba(0x1e2)})],'silent':![]}),a101_0x23c7d1[_0x3439ba(0x1e7)]({'success':'green','error':_0x3439ba(0x1c2),'warn':_0x3439ba(0x1ee),'info':_0x3439ba(0x1ce)});}[a101_0x382eea(0x1e2)](_0x401b08,_0x49daa9,_0xf02f54){const _0x5b879a=a101_0x382eea;if(!this['logFilePath']||!this[_0x5b879a(0x1ea)])return;this[_0x5b879a(0x1ea)][_0x5b879a(0x1e2)](_0x49daa9,{'command':_0x401b08,'details':_0xf02f54});}[a101_0x382eea(0x1c4)](_0x2eab32,_0x5a0212,_0x44540e,_0x5deb7e){const _0x4addd0=a101_0x382eea;if(!this[_0x4addd0(0x1e1)]||!this[_0x4addd0(0x1ea)])return;this['winstonLogger']['log'](_0x4addd0(0x1e2),_0x5a0212,{'level':_0x4addd0(0x1c4),'command':_0x2eab32,'duration':_0x44540e,'details':_0x5deb7e});}['error'](_0x2a6fd8,_0x3a2d9a,_0x2bc02e){const _0x5c400a=a101_0x382eea;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x5c400a(0x1ea)]['error'](_0x3a2d9a,{'command':_0x2a6fd8,'details':_0x2bc02e});}[a101_0x382eea(0x1d7)](_0x3dc29e,_0x49ac5f,_0x2d0e36){const _0x1dbc62=a101_0x382eea;if(!this[_0x1dbc62(0x1e1)]||!this[_0x1dbc62(0x1ea)])return;this[_0x1dbc62(0x1ea)]['warn'](_0x49ac5f,{'command':_0x3dc29e,'details':_0x2d0e36});}async[a101_0x382eea(0x1e4)](_0x3273d6,_0x248fa6,_0x56cdb0){const _0x489ed0=a101_0x382eea,_0x4e74b9=Date['now']();this[_0x489ed0(0x1e2)](_0x3273d6,_0x489ed0(0x1df)+_0x248fa6);try{const _0x32f9c8=await _0x56cdb0(),_0x2d4134=Date[_0x489ed0(0x1d5)]()-_0x4e74b9;return this[_0x489ed0(0x1c4)](_0x3273d6,_0x489ed0(0x1bf)+_0x248fa6,_0x2d4134),_0x32f9c8;}catch(_0x439110){const _0x5b21ac=Date['now']()-_0x4e74b9;this[_0x489ed0(0x1cc)](_0x3273d6,_0x489ed0(0x1e6)+_0x248fa6,{'error':_0x439110 instanceof Error?_0x439110[_0x489ed0(0x1c0)]:String(_0x439110),'duration':_0x5b21ac});throw _0x439110;}}[a101_0x382eea(0x1e8)](){const _0x3eb11f=a101_0x382eea;try{if(!a101_0x1d0b10[_0x3eb11f(0x1ef)](this[_0x3eb11f(0x1e1)]))return[];const _0x5c9a1d=a101_0x1d0b10[_0x3eb11f(0x1cf)](this[_0x3eb11f(0x1e1)],_0x3eb11f(0x1d1));return _0x5c9a1d['split'](/\r?\n/)['filter'](_0x435575=>_0x435575[_0x3eb11f(0x1eb)]())[_0x3eb11f(0x1bc)](_0x56ff74=>JSON[_0x3eb11f(0x1c5)](_0x56ff74));}catch(_0x245185){return console['warn'](_0x3eb11f(0x1d3),_0x245185),[];}}['clearLogs'](){const _0x2f791f=a101_0x382eea;try{a101_0x1d0b10[_0x2f791f(0x1ef)](this[_0x2f791f(0x1e1)])&&a101_0x1d0b10[_0x2f791f(0x1d9)](this[_0x2f791f(0x1e1)],'','utf8');}catch(_0x3d1de4){console['warn'](_0x2f791f(0x1d0),_0x3d1de4);}}[a101_0x382eea(0x1cb)](){return this['winstonLogger'];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3c0f7f,_0x175a16){var _0x2e8102=a102_0x4a87,_0x223902=_0x3c0f7f();while(!![]){try{var _0x605f77=-parseInt(_0x2e8102(0x194))/0x1*(-parseInt(_0x2e8102(0x19a))/0x2)+parseInt(_0x2e8102(0x1a0))/0x3*(-parseInt(_0x2e8102(0x190))/0x4)+-parseInt(_0x2e8102(0x1a1))/0x5*(-parseInt(_0x2e8102(0x1a2))/0x6)+-parseInt(_0x2e8102(0x19d))/0x7*(-parseInt(_0x2e8102(0x199))/0x8)+parseInt(_0x2e8102(0x19b))/0x9*(parseInt(_0x2e8102(0x197))/0xa)+-parseInt(_0x2e8102(0x192))/0xb*(parseInt(_0x2e8102(0x19c))/0xc)+-parseInt(_0x2e8102(0x196))/0xd;if(_0x605f77===_0x175a16)break;else _0x223902['push'](_0x223902['shift']());}catch(_0xd357ef){_0x223902['push'](_0x223902['shift']());}}}(a102_0x22b6,0x2514c));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x328f84){var _0x1b476b=a102_0x4a87;if(!_0x328f84)return undefined;try{return JSON[_0x1b476b(0x195)](_0x328f84);}catch{throw CliErrors[_0x1b476b(0x19e)](_0x1b476b(0x198)+_0x328f84);}}export function parseJsonParamsValue(_0x585131){var _0x10a547=a102_0x4a87;if(!_0x585131)return undefined;try{return JSON[_0x10a547(0x195)](_0x585131);}catch{throw CliErrors['validation'](_0x10a547(0x198)+_0x585131);}}function a102_0x4a87(_0x4338c8,_0x5778c5){_0x4338c8=_0x4338c8-0x18f;var _0x22b693=a102_0x22b6();var _0x4a87f3=_0x22b693[_0x4338c8];return _0x4a87f3;}export function parseBatchCreateItemsFromParams(_0x368daa){var _0x6523a3=a102_0x4a87;if(Array[_0x6523a3(0x193)](_0x368daa))return _0x368daa;if(_0x368daa!==null&&_0x368daa!==undefined&&typeof _0x368daa===_0x6523a3(0x191)&&Array[_0x6523a3(0x193)](_0x368daa['items']))return _0x368daa[_0x6523a3(0x19f)];throw CliErrors['validation'](_0x6523a3(0x18f),'Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27');}function a102_0x22b6(){var _0x4f43c4=['batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','116TszNTN','object','748QSOkaf','isArray','2726wPXZUh','parse','3500354KRUqMJ','774310wcICtq','Invalid\x20JSON\x20for\x20--params:\x20','312RWnSfX','188IEsfcd','9ifARKQ','39660KhTsKV','35686jXZlvq','validation','items','19599slMCXG','530JqozoN','17142wblmTk'];a102_0x22b6=function(){return _0x4f43c4;};return a102_0x22b6();}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a103_0x3691(){const _0x56ea7a=['180867DxomTY','4004294WXeXHP','28mbZJmQ','platform','.cmd','25713xpbKhp','4690NoZXGS','3444790BmflZd','4656896zcjOci','1077164WFRoxv','6ckqIQg','win32','962509ywiRCE'];a103_0x3691=function(){return _0x56ea7a;};return a103_0x3691();}function a103_0x2e9d(_0x3977da,_0x488329){_0x3977da=_0x3977da-0x74;const _0x3691b7=a103_0x3691();let _0x2e9da6=_0x3691b7[_0x3977da];return _0x2e9da6;}const a103_0x22aa44=a103_0x2e9d;(function(_0x1b8221,_0x2e2fb9){const _0x5b7dcc=a103_0x2e9d,_0x341dbf=_0x1b8221();while(!![]){try{const _0x214df6=-parseInt(_0x5b7dcc(0x77))/0x1+parseInt(_0x5b7dcc(0x7a))/0x2*(parseInt(_0x5b7dcc(0x78))/0x3)+parseInt(_0x5b7dcc(0x74))/0x4+parseInt(_0x5b7dcc(0x7f))/0x5+-parseInt(_0x5b7dcc(0x75))/0x6*(-parseInt(_0x5b7dcc(0x79))/0x7)+parseInt(_0x5b7dcc(0x80))/0x8+parseInt(_0x5b7dcc(0x7d))/0x9*(-parseInt(_0x5b7dcc(0x7e))/0xa);if(_0x214df6===_0x2e2fb9)break;else _0x341dbf['push'](_0x341dbf['shift']());}catch(_0x2c7261){_0x341dbf['push'](_0x341dbf['shift']());}}}(a103_0x3691,0x9fab7));export const isWindows=process[a103_0x22aa44(0x7b)]===a103_0x22aa44(0x76);export function resolveNpmBin(_0x420521){const _0x590bd2=a103_0x22aa44;return isWindows?_0x420521+_0x590bd2(0x7c):_0x420521;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44a5b,_0x1a7b6e){const _0x5f2cbe=a104_0x77ad,_0x271215=_0x44a5b();while(!![]){try{const _0x402f95=-parseInt(_0x5f2cbe(0x10d))/0x1*(parseInt(_0x5f2cbe(0x10c))/0x2)+parseInt(_0x5f2cbe(0x12c))/0x3*(-parseInt(_0x5f2cbe(0x126))/0x4)+parseInt(_0x5f2cbe(0x129))/0x5*(parseInt(_0x5f2cbe(0x113))/0x6)+-parseInt(_0x5f2cbe(0x10b))/0x7+-parseInt(_0x5f2cbe(0x11d))/0x8*(parseInt(_0x5f2cbe(0x124))/0x9)+parseInt(_0x5f2cbe(0x118))/0xa*(parseInt(_0x5f2cbe(0x110))/0xb)+parseInt(_0x5f2cbe(0x127))/0xc;if(_0x402f95===_0x1a7b6e)break;else _0x271215['push'](_0x271215['shift']());}catch(_0x5ef2c7){_0x271215['push'](_0x271215['shift']());}}}(a104_0x2aa1,0x72327));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';function a104_0x77ad(_0x349bbd,_0x5bdd82){_0x349bbd=_0x349bbd-0x10a;const _0x2aa1b5=a104_0x2aa1();let _0x77add7=_0x2aa1b5[_0x349bbd];return _0x77add7;}function a104_0x2aa1(){const _0x508572=['6nrUEYj','57485geHdEn','timeout','minor','209VEHQKF','json','update-check.json','528wuUJAp','lastNotifiedAt','prerelease','Invalid\x20semver','patch','430270wnfmKG','string','map','number','/v/','1086480OTcPia','latest','trim','checkedAt','stringify','parse','utf8','45PwkOJz','object','3688lKwIFF','10753140ilSsSR','major','52205fWIHZj','https://www.npmjs.com/package/','fromEntries','2175kdgbKw','\x20available,\x20current\x20','lastNotifiedVersion','match','true','4512970unxkWO'];a104_0x2aa1=function(){return _0x508572;};return a104_0x2aa1();}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(_0x412843){const _0xf93185=a104_0x77ad,_0x9d8661=_0x412843['trim']()[_0xf93185(0x12f)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x9d8661)return null;return{'major':Number(_0x9d8661[0x1]),'minor':Number(_0x9d8661[0x2]),'patch':Number(_0x9d8661[0x3]),'prerelease':_0x9d8661[0x4]};}function compareSemver(_0x456b8b,_0x19e897){const _0x25b1e2=a104_0x77ad,_0x23a198=parseSemver(_0x456b8b),_0x2de944=parseSemver(_0x19e897);if(!_0x23a198||!_0x2de944)throw new Error(_0x25b1e2(0x116));for(const _0x181722 of[_0x25b1e2(0x128),_0x25b1e2(0x10f),_0x25b1e2(0x117)]){if(_0x23a198[_0x181722]<_0x2de944[_0x181722])return-0x1;if(_0x23a198[_0x181722]>_0x2de944[_0x181722])return 0x1;}if(!_0x23a198[_0x25b1e2(0x115)]&&!_0x2de944[_0x25b1e2(0x115)])return 0x0;if(!_0x23a198[_0x25b1e2(0x115)])return 0x1;if(!_0x2de944[_0x25b1e2(0x115)])return-0x1;if(_0x23a198['prerelease']===_0x2de944[_0x25b1e2(0x115)])return 0x0;return _0x23a198[_0x25b1e2(0x115)]<_0x2de944[_0x25b1e2(0x115)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x1a9141=a104_0x77ad,_0x361cf0=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x1a9141(0x11f)]()['toLowerCase']();return _0x361cf0==='1'||_0x361cf0===_0x1a9141(0x10a)||_0x361cf0==='yes';}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x472c76=a104_0x77ad;return join(cacheRoot(),'lovrabet-cli',_0x472c76(0x112));}async function readUpdateNoticeCache(){const _0x2bf482=a104_0x77ad;try{const _0x4b87e2=await readFile(getUpdateNoticeCachePath(),_0x2bf482(0x123)),_0x1ebca0=JSON[_0x2bf482(0x122)](_0x4b87e2);if(!_0x1ebca0||typeof _0x1ebca0!==_0x2bf482(0x125))return{};return _0x1ebca0;}catch{return{};}}async function writeUpdateNoticeCache(_0x59856c){const _0x5b6dd8=a104_0x77ad;try{const _0x5a8c50=getUpdateNoticeCachePath();await mkdir(dirname(_0x5a8c50),{'recursive':!![]}),await writeFile(_0x5a8c50,JSON[_0x5b6dd8(0x121)](_0x59856c,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x476ce9,_0x1798f7){const _0x32bb00=a104_0x77ad;return typeof _0x476ce9[_0x32bb00(0x120)]===_0x32bb00(0x11b)&&_0x1798f7-_0x476ce9[_0x32bb00(0x120)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x46d792,_0x3c0f7f,_0x35a863){const _0x4b4939=a104_0x77ad;return _0x46d792[_0x4b4939(0x12e)]===_0x3c0f7f&&typeof _0x46d792[_0x4b4939(0x114)]===_0x4b4939(0x11b)&&_0x35a863-_0x46d792[_0x4b4939(0x114)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x445cd8=0x5dc){const _0x35ab34=a104_0x77ad;try{const _0x4e04b7=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x4f6080=await fetch(_0x4e04b7,{'signal':AbortSignal[_0x35ab34(0x10e)](_0x445cd8)});if(!_0x4f6080['ok'])return null;const _0x343f96=await _0x4f6080[_0x35ab34(0x111)]();if(!_0x343f96||typeof _0x343f96!==_0x35ab34(0x125))return null;return Object[_0x35ab34(0x12b)](Object['entries'](_0x343f96)['filter'](([,_0x54975e])=>typeof _0x54975e===_0x35ab34(0x119)&&_0x54975e[_0x35ab34(0x11f)]())[_0x35ab34(0x11a)](([_0x532d14,_0x36f93b])=>[_0x532d14,String(_0x36f93b)[_0x35ab34(0x11f)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x2871bc){const _0x588a8b=a104_0x77ad;return _0x588a8b(0x12a)+LOVRABET_NPM_PACKAGE_NAME+_0x588a8b(0x11c)+_0x2871bc;}export async function resolveLatestUpdateNotice(){const _0x19aa50=a104_0x77ad;if(isUpdateNoticeDisabled())return null;try{const _0x16bb28=Date['now'](),_0x1bfbf1=getCliVersion(),_0x227684=await readUpdateNoticeCache();let _0x331da3=isFreshCheck(_0x227684,_0x16bb28)?_0x227684['latest']?.[_0x19aa50(0x11f)]():undefined;if(!_0x331da3&&!isFreshCheck(_0x227684,_0x16bb28)){const _0x306f43=await fetchNpmDistTags();_0x331da3=_0x306f43?.[_0x19aa50(0x11e)]?.[_0x19aa50(0x11f)](),await writeUpdateNoticeCache({..._0x227684,'checkedAt':_0x16bb28,'latest':_0x331da3,'failed':!_0x331da3});}if(!_0x331da3||compareSemver(_0x1bfbf1,_0x331da3)>=0x0)return null;if(isRecentlyNotified(_0x227684,_0x331da3,_0x16bb28))return null;const _0x2973f1=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x227684,'checkedAt':isFreshCheck(_0x227684,_0x16bb28)?_0x227684['checkedAt']:_0x16bb28,'latest':_0x331da3,'failed':![],'lastNotifiedVersion':_0x331da3,'lastNotifiedAt':_0x16bb28}),{'command':_0x2973f1,'current':_0x1bfbf1,'latest':_0x331da3,'url':buildNpmVersionUrl(_0x331da3),'message':CLI_BIN_NAME+'\x20'+_0x331da3+_0x19aa50(0x12d)+_0x1bfbf1+',\x20run:\x20'+_0x2973f1};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x37dbb6,_0x1cea22){const _0x507e1d=a105_0x4724,_0x47c10f=_0x37dbb6();while(!![]){try{const _0x5dd5c6=parseInt(_0x507e1d(0x166))/0x1*(parseInt(_0x507e1d(0x169))/0x2)+parseInt(_0x507e1d(0x164))/0x3+-parseInt(_0x507e1d(0x163))/0x4+-parseInt(_0x507e1d(0x165))/0x5+-parseInt(_0x507e1d(0x168))/0x6+parseInt(_0x507e1d(0x16a))/0x7+-parseInt(_0x507e1d(0x16b))/0x8;if(_0x5dd5c6===_0x1cea22)break;else _0x47c10f['push'](_0x47c10f['shift']());}catch(_0x248147){_0x47c10f['push'](_0x47c10f['shift']());}}}(a105_0x40da,0xc8602));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x1629de=a105_0x4724,_0x14e1ed=String(GIT_COMMIT);return _0x14e1ed&&_0x14e1ed!==_0x1629de(0x162)?_0x14e1ed:'';}function a105_0x4724(_0xea5cdd,_0x25a61e){_0xea5cdd=_0xea5cdd-0x162;const _0x40da8a=a105_0x40da();let _0x47242f=_0x40da8a[_0xea5cdd];return _0x47242f;}export function getCliVersionDisplay(){const _0x1813e1=a105_0x4724,_0x80add6=getCliGitCommit(),_0x37ac6e=BUILD_TIME[_0x1813e1(0x167)](0x0,0xa);if(!_0x80add6||!_0x37ac6e)return VERSION;return VERSION+'\x20('+_0x80add6+',\x20'+_0x37ac6e+')';}function a105_0x40da(){const _0x2cb7fe=['1234384upkVlF','unknown','3871300NQapZJ','4821168rrzumD','5569890UndQwh','63828UTUnzj','slice','914634hBSLwF','6Pxzsds','9875166seQrms'];a105_0x40da=function(){return _0x2cb7fe;};return a105_0x40da();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3dbb78,_0x2e479a){var _0x1d1829=a106_0x3c77,_0x979593=_0x3dbb78();while(!![]){try{var _0x252d45=parseInt(_0x1d1829(0x7e))/0x1*(-parseInt(_0x1d1829(0x83))/0x2)+parseInt(_0x1d1829(0x80))/0x3*(parseInt(_0x1d1829(0x87))/0x4)+parseInt(_0x1d1829(0x81))/0x5*(-parseInt(_0x1d1829(0x8a))/0x6)+parseInt(_0x1d1829(0x86))/0x7*(-parseInt(_0x1d1829(0x85))/0x8)+parseInt(_0x1d1829(0x89))/0x9*(parseInt(_0x1d1829(0x82))/0xa)+-parseInt(_0x1d1829(0x7f))/0xb*(-parseInt(_0x1d1829(0x84))/0xc)+parseInt(_0x1d1829(0x88))/0xd;if(_0x252d45===_0x2e479a)break;else _0x979593['push'](_0x979593['shift']());}catch(_0x52470e){_0x979593['push'](_0x979593['shift']());}}}(a106_0x3173,0x76f90));function a106_0x3c77(_0x4c6160,_0x432ef8){_0x4c6160=_0x4c6160-0x7e;var _0x317338=a106_0x3173();var _0x3c7799=_0x317338[_0x4c6160];return _0x3c7799;}function a106_0x3173(){var _0x571a93=['14450gZFaXf','2798kUkhNz','1725312YjfBkP','16vmWhZe','2652979YrvcFa','656036kbVigB','1611155Vzpdbe','1143ZkqDgW','259674FOOBPj','stderr','265zdHjCH','44TPSiYs','15cTEUBx','10LfEfjW'];a106_0x3173=function(){return _0x571a93;};return a106_0x3173();}export function writeCliSideChannelLine(_0x3246e5){var _0x343778=a106_0x3c77;process[_0x343778(0x8b)]['write'](_0x3246e5+'\x0a');}
|