@lovrabet/lovrabet-cli 2.1.8-beta.2 → 2.1.8
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/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/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/common/local-file.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/file/index.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/ocr/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/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.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/service-order.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(_0x473b5d,_0x533235){const _0x1fc4a7=a104_0x2c0c,_0x1ec538=_0x473b5d();while(!![]){try{const _0x1ea35f=parseInt(_0x1fc4a7(0x80))/0x1+-parseInt(_0x1fc4a7(0xa1))/0x2+parseInt(_0x1fc4a7(0xa5))/0x3*(parseInt(_0x1fc4a7(0x84))/0x4)+-parseInt(_0x1fc4a7(0x7a))/0x5+parseInt(_0x1fc4a7(0x94))/0x6*(-parseInt(_0x1fc4a7(0xa2))/0x7)+-parseInt(_0x1fc4a7(0x79))/0x8+-parseInt(_0x1fc4a7(0x83))/0x9*(-parseInt(_0x1fc4a7(0x7f))/0xa);if(_0x1ea35f===_0x533235)break;else _0x1ec538['push'](_0x1ec538['shift']());}catch(_0x7aedad){_0x1ec538['push'](_0x1ec538['shift']());}}}(a104_0x5f5c,0x7b0bf));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x1aab4e}from'yaml';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';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x3215b2,_0x43ca82,_0x42dcc1={}){const _0x3e9845=a104_0x2c0c,_0x1de5cb=resolvePushDirectoryRoot(_0x3215b2),_0x52b868=readPushMetadataIfPresent(resolve(_0x1de5cb,METADATA_FILE),{'ignoreInvalidMetadata':_0x42dcc1[_0x3e9845(0xaa)]});if(_0x52b868?.[_0x3e9845(0x87)]&&_0x52b868[_0x3e9845(0x87)]!==_0x43ca82&&!_0x42dcc1[_0x3e9845(0xb0)]&&!_0x42dcc1[_0x3e9845(0x7b)])throw CliErrors['validation'](_0x3e9845(0x9a)+_0x52b868[_0x3e9845(0x87)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x43ca82+'\x22.');const _0x364d1d=resolvePushSkillCode(_0x1de5cb,_0x43ca82,_0x52b868,_0x42dcc1);if(!_0x364d1d)throw CliErrors[_0x3e9845(0x97)](_0x3e9845(0x76)+SKILL_FILE+',\x20'+METADATA_FILE+_0x3e9845(0x7c));return{'dir':_0x1de5cb,'skillCode':_0x364d1d,'metadata':_0x52b868};}export function readPushDirectory(_0x330a33,_0x3c7d5d,_0x1c6ad7={}){const _0x99e5b2=a104_0x2c0c,_0x321316=resolvePushDirectoryIdentity(_0x330a33,_0x3c7d5d,_0x1c6ad7),_0x5a1479=_0x321316['dir'],_0x59f68e=resolve(_0x5a1479,SKILL_FILE);if(!existsSync(_0x59f68e)||!lstatSync(_0x59f68e)[_0x99e5b2(0x92)]())throw CliErrors['validation']('Missing\x20'+SKILL_FILE+':\x20'+_0x59f68e);const _0x13fb9b=_0x321316['metadata'],_0x3d20a6=_0x1c6ad7[_0x99e5b2(0xad)]??_0x99e5b2(0xa9);if(!_0x1c6ad7[_0x99e5b2(0x8b)]&&_0x13fb9b?.['scope']===_0x99e5b2(0xaf))throw CliErrors[_0x99e5b2(0x97)](_0x99e5b2(0x71)+METADATA_FILE+_0x99e5b2(0xa0)+_0x13fb9b[_0x99e5b2(0xa4)]+'\x22.');if(!_0x1c6ad7['ignoreMetadataScope']&&_0x3d20a6==='personal'&&_0x13fb9b?.[_0x99e5b2(0xa4)]&&_0x13fb9b[_0x99e5b2(0xa4)]!==_0x99e5b2(0xa9))throw CliErrors[_0x99e5b2(0x97)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x99e5b2(0xa0)+_0x13fb9b[_0x99e5b2(0xa4)]+'\x22.',_0x99e5b2(0x75)+_0x5a1479+_0x99e5b2(0x93));const _0x3a9c26=scanSkillDirectory(_0x5a1479),_0x30da13=buildSkillPackage(_0x3a9c26),_0x2d7d00=readFileSync(_0x59f68e,'utf8'),_0x17a88d=_0x321316[_0x99e5b2(0x98)],_0x11ebe5=_0x1c6ad7[_0x99e5b2(0x8f)]?undefined:_0x13fb9b,_0x49545a=readSkillDisplayName(_0x2d7d00);return{'skillCode':_0x17a88d,'metadata':_0x13fb9b,'frontmatterDisplayName':_0x49545a,'input':{'skillCode':_0x17a88d,'skillName':_0x49545a??_0x11ebe5?.['skillName'],'description':_0x11ebe5?.[_0x99e5b2(0xa6)],'content':_0x2d7d00,'files':_0x30da13[_0x99e5b2(0x85)],'packageBase64':_0x30da13[_0x99e5b2(0x89)],'tags':_0x11ebe5?.[_0x99e5b2(0xa7)],'version':_0x11ebe5?.[_0x99e5b2(0x96)],'sourceSessionId':_0x11ebe5?.[_0x99e5b2(0x77)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x17f364,_0x867700,_0x49e879,_0x4e3054={}){const _0x29ba3d=a104_0x2c0c,_0x1bf098=resolvePushDirectoryRoot(_0x17f364),_0x1d82de=readPushMetadataIfPresent(resolve(_0x1bf098,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x4d3b5a=requireRemoteScope(_0x867700),_0x22fa54=readLocalSkillContent(_0x1bf098),_0x34ed95={..._0x867700,'appCode':_0x867700[_0x29ba3d(0x87)]??_0x49e879,'skillName':_0x867700[_0x29ba3d(0x88)]??_0x1d82de?.[_0x29ba3d(0x88)],'description':_0x867700['description']??_0x1d82de?.[_0x29ba3d(0xa6)],'tags':Array[_0x29ba3d(0x72)](_0x867700[_0x29ba3d(0xa7)])?_0x867700[_0x29ba3d(0xa7)]:_0x1d82de?.['tags'],'sourceSessionId':_0x867700[_0x29ba3d(0x77)]??_0x1d82de?.[_0x29ba3d(0x77)],'content':_0x867700[_0x29ba3d(0x7d)]??_0x22fa54},_0x21383e=buildMetadata(_0x34ed95,_0x4d3b5a,_0x49e879,contentHash(_0x22fa54),_0x4e3054[_0x29ba3d(0x8e)]);writeJsonAtomic(resolve(_0x1bf098,METADATA_FILE),_0x21383e);}export function recordPushedRuntimeSkill(_0x46109b,_0x4c9182,_0x3654a5,_0x47d0bd={}){const _0x2f2e56=a104_0x2c0c,_0x15e47e=resolvePushDirectoryRoot(_0x46109b),_0x354ceb=scanSkillDirectory(_0x15e47e),_0x6af6bc=_0x354ceb[_0x2f2e56(0xab)](_0x20845e=>_0x20845e[_0x2f2e56(0x9c)]===SKILL_FILE),_0x10130d=_0x6af6bc?fileText(_0x6af6bc):'',_0x3c8268=tryNormalizePackageManifest(_0x4c9182['files']),_0x50ca34={..._0x4c9182,'content':_0x4c9182['content']??_0x10130d,'files':_0x3c8268},_0xfd2ea4=_0x3c8268?normalizeLocalFiles(_0x354ceb)[_0x2f2e56(0xae)](_0x7368ae=>_0x3c8268[_0x2f2e56(0xac)][_0x2f2e56(0x9f)](_0x846630=>_0x846630[_0x2f2e56(0x9c)]===_0x7368ae[_0x2f2e56(0x9c)])):undefined,_0x372f86=buildMetadata(_0x50ca34,_0x47d0bd[_0x2f2e56(0xa4)]??_0x2f2e56(0xa9),_0x3654a5,contentHash(_0x50ca34['content']??''),_0x47d0bd[_0x2f2e56(0x90)],_0xfd2ea4);writeJsonAtomic(resolve(_0x15e47e,METADATA_FILE),_0x372f86);}export function deriveSkillCodeFromDirectory(_0x564baf,_0x43c7c3){const _0x4062d5=a104_0x2c0c,_0x597871=basename(resolve(_0x564baf)),_0x3750d6=_0x43c7c3+'--';return _0x597871[_0x4062d5(0x9d)](_0x3750d6)?_0x597871['slice'](_0x3750d6[_0x4062d5(0x82)]):_0x597871;}function resolvePushSkillCode(_0x4ecb23,_0x514176,_0x435924,_0x5d9038){const _0x3d8aed=a104_0x2c0c,_0x3c4d2c=deriveSkillCodeFromSkillFile(_0x4ecb23)||deriveSkillCodeFromDirectory(_0x4ecb23,_0x514176);if(_0x5d9038[_0x3d8aed(0x95)])return _0x3c4d2c;return _0x435924?.[_0x3d8aed(0x98)]?.['trim']()||_0x3c4d2c;}function deriveSkillCodeFromSkillFile(_0x2421fb){const _0xacda93=a104_0x2c0c,_0x6eec8c=resolve(_0x2421fb,SKILL_FILE);if(!existsSync(_0x6eec8c)||!lstatSync(_0x6eec8c)[_0xacda93(0x92)]())return undefined;const _0x241af5=readFileSync(_0x6eec8c,_0xacda93(0x8a)),_0x59d184=_0x241af5[_0xacda93(0x99)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x59d184)return undefined;const _0x1be665=parseFrontmatterObject(_0x59d184[0x1]??''),_0x15cdd6=scalarToString(_0x1be665?.[_0xacda93(0x7e)]);return _0x15cdd6?slugifySkillName(_0x15cdd6):undefined;}function readSkillDisplayName(_0x7cfc97){const _0x5a24df=a104_0x2c0c,_0x2a9130=_0x7cfc97[_0x5a24df(0x99)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2a9130)return undefined;const _0xc67290=parseFrontmatterObject(_0x2a9130[0x1]??'');return scalarToString(_0xc67290?.['displayName']);}function slugifySkillName(_0x481d6e){const _0x2cb856=a104_0x2c0c,_0x3bb782=_0x481d6e[_0x2cb856(0xa8)]()['toLowerCase']()[_0x2cb856(0x74)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2cb856(0x74)](/^-+/,'')[_0x2cb856(0x74)](/-+$/,'')[_0x2cb856(0x74)](/-{2,}/g,'-');if(!_0x3bb782)throw CliErrors[_0x2cb856(0x97)]('Invalid\x20'+SKILL_FILE+_0x2cb856(0x9e));return _0x3bb782;}function parseFrontmatterObject(_0x3c95d5){const _0x3a31bb=a104_0x2c0c;try{const _0x1af893=a104_0x1aab4e(_0x3c95d5);return _0x1af893&&typeof _0x1af893==='object'&&!Array[_0x3a31bb(0x72)](_0x1af893)?_0x1af893:undefined;}catch{return undefined;}}function scalarToString(_0xa52d4b){const _0x18837a=a104_0x2c0c;if(typeof _0xa52d4b===_0x18837a(0x86))return _0xa52d4b[_0x18837a(0xa8)]();if(typeof _0xa52d4b===_0x18837a(0x8c)||typeof _0xa52d4b==='boolean')return String(_0xa52d4b);return undefined;}function a104_0x5f5c(){const _0x1f2f43=['isSymbolicLink','isFile','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','425244bDGXuW','ignoreMetadataSkillCode','version','validation','skillCode','match','Skill\x20metadata\x20appCode\x20\x22','(unknown)','path','startsWith','\x20name\x20for\x20SkillHub\x20slug\x20generation.','some','\x20has\x20scope=\x22','1928108GSneSg','77trppey','Remote\x20Skill\x20','scope','841953UdrVaq','description','tags','trim','personal','ignoreInvalidMetadata','find','files','targetScope','filter','builtin','allowAppCodeRetarget','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','isArray','company','replace','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Unable\x20to\x20resolve\x20skillCode\x20from\x20','sourceSessionId','Skill\x20directory\x20not\x20found:\x20','4896040YACCYn','343170vwvbtm','ignoreMetadataAppCodeMismatch',',\x20or\x20directory\x20name.','content','name','380fMEhFH','675455FmYrFb','isDirectory','length','467100kpucZs','4muzdBF','manifest','string','appCode','skillName','packageBase64','utf8','ignoreMetadataScope','number','\x20has\x20unsupported\x20scope\x20\x22','refreshedAt','ignoreMetadataForPayload','pushedAt'];a104_0x5f5c=function(){return _0x1f2f43;};return a104_0x5f5c();}function resolvePushDirectoryRoot(_0x5072c5){const _0x1ae8da=a104_0x2c0c,_0x1b8b58=resolve(_0x5072c5);if(!existsSync(_0x1b8b58))throw CliErrors[_0x1ae8da(0x97)](_0x1ae8da(0x78)+_0x5072c5);const _0x428566=lstatSync(_0x1b8b58);if(_0x428566[_0x1ae8da(0x81)]())return _0x1b8b58;if(_0x428566[_0x1ae8da(0x91)]()){const _0x113b69=realpathSync(_0x1b8b58);if(lstatSync(_0x113b69)[_0x1ae8da(0x81)]())return _0x113b69;}throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x5072c5);}function requireRemoteScope(_0x2c72dc){const _0x5f0fc9=a104_0x2c0c;if(_0x2c72dc[_0x5f0fc9(0xa4)]===_0x5f0fc9(0xa9)||_0x2c72dc[_0x5f0fc9(0xa4)]===_0x5f0fc9(0x73)||_0x2c72dc[_0x5f0fc9(0xa4)]===_0x5f0fc9(0xaf))return _0x2c72dc['scope'];throw CliErrors[_0x5f0fc9(0x97)](_0x5f0fc9(0xa3)+(_0x2c72dc[_0x5f0fc9(0x98)]||_0x5f0fc9(0x9b))+_0x5f0fc9(0x8d)+(_0x2c72dc['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x2d91d1){const _0x25d788=a104_0x2c0c,_0x5eb108=resolve(_0x2d91d1,SKILL_FILE);return existsSync(_0x5eb108)&&lstatSync(_0x5eb108)[_0x25d788(0x92)]()?readFileSync(_0x5eb108,_0x25d788(0x8a)):'';}function a104_0x2c0c(_0x5852a9,_0x3db8a4){_0x5852a9=_0x5852a9-0x71;const _0x5f5c71=a104_0x5f5c();let _0x2c0c03=_0x5f5c71[_0x5852a9];return _0x2c0c03;}function readPushMetadataIfPresent(_0x899662,_0x178789={}){const _0x28c9da=a104_0x2c0c;try{return readMetadataIfPresent(_0x899662);}catch(_0x4262a1){if(_0x178789[_0x28c9da(0xaa)])return undefined;throw _0x4262a1;}}
|
|
1
|
+
(function(_0x3243a1,_0x4e5ab9){const _0x21288a=a104_0x4c3f,_0x50ca7b=_0x3243a1();while(!![]){try{const _0x2b6d39=parseInt(_0x21288a(0xac))/0x1+parseInt(_0x21288a(0xa6))/0x2+parseInt(_0x21288a(0x7a))/0x3+-parseInt(_0x21288a(0x88))/0x4+parseInt(_0x21288a(0x89))/0x5*(-parseInt(_0x21288a(0xa7))/0x6)+parseInt(_0x21288a(0x8a))/0x7*(-parseInt(_0x21288a(0xb6))/0x8)+parseInt(_0x21288a(0xba))/0x9;if(_0x2b6d39===_0x4e5ab9)break;else _0x50ca7b['push'](_0x50ca7b['shift']());}catch(_0x3b06c5){_0x50ca7b['push'](_0x50ca7b['shift']());}}}(a104_0xd8fa,0xb85ee));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x30dbdf}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a104_0xd8fa(){const _0x1a9a7c=['ignoreMetadataSkillCode','string','refreshedAt','startsWith','some','skillName','ignoreMetadataScope','8MOqZcY','Invalid\x20','version','trim','4222386iOJMDj','ignoreInvalidMetadata','595338vLuKvE','find','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','description','replace','sourceSessionId','validation','object','company','slice','toLowerCase','ignoreMetadataAppCodeMismatch','content','\x20has\x20scope=\x22','2473984oRYVAS','1139955NdDRJk','6975255zIHflA','boolean','Skill\x20metadata\x20appCode\x20\x22','filter','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','\x20has\x20unsupported\x20scope\x20\x22','scope','isArray','displayName','skillCode','match','ignoreMetadataForPayload','\x20name\x20for\x20SkillHub\x20slug\x20generation.','isSymbolicLink','path','unknown','metadata','dir','name','allowAppCodeRetarget','Missing\x20','builtin','Remote\x20Skill\x20','appCode','personal','tags','Skill\x20directory\x20not\x20found:\x20','files','2889330PzHmui','12AfDfjM','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','utf8','number',',\x20or\x20directory\x20name.','713860WifGWc','targetScope','isFile'];a104_0xd8fa=function(){return _0x1a9a7c;};return a104_0xd8fa();}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 resolvePushDirectoryIdentity(_0x28b57f,_0x34472a,_0x271008={}){const _0x466d91=a104_0x4c3f,_0x8123aa=resolvePushDirectoryRoot(_0x28b57f),_0x1435dd=readPushMetadataIfPresent(resolve(_0x8123aa,METADATA_FILE),{'ignoreInvalidMetadata':_0x271008[_0x466d91(0xbb)]});if(_0x1435dd?.[_0x466d91(0xa1)]&&_0x1435dd['appCode']!==_0x34472a&&!_0x271008[_0x466d91(0x9d)]&&!_0x271008[_0x466d91(0x85)])throw CliErrors[_0x466d91(0x80)](_0x466d91(0x8c)+_0x1435dd[_0x466d91(0xa1)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x34472a+'\x22.');const _0x29e543=resolvePushSkillCode(_0x8123aa,_0x34472a,_0x1435dd,_0x271008);if(!_0x29e543)throw CliErrors[_0x466d91(0x80)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x466d91(0xab));return{'dir':_0x8123aa,'skillCode':_0x29e543,'metadata':_0x1435dd};}export function readPushDirectory(_0x1e23de,_0x587443,_0x5e2501={}){const _0x485df3=a104_0x4c3f,_0x4b5b7c=resolvePushDirectoryIdentity(_0x1e23de,_0x587443,_0x5e2501),_0x5f0117=_0x4b5b7c[_0x485df3(0x9b)],_0x224759=resolve(_0x5f0117,SKILL_FILE);if(!existsSync(_0x224759)||!lstatSync(_0x224759)[_0x485df3(0xae)]())throw CliErrors[_0x485df3(0x80)](_0x485df3(0x9e)+SKILL_FILE+':\x20'+_0x224759);const _0x50b50d=_0x4b5b7c[_0x485df3(0x9a)],_0x193550=_0x5e2501[_0x485df3(0xad)]??'personal';if(!_0x5e2501[_0x485df3(0xb5)]&&_0x50b50d?.[_0x485df3(0x90)]===_0x485df3(0x9f))throw CliErrors[_0x485df3(0x80)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x485df3(0x87)+_0x50b50d[_0x485df3(0x90)]+'\x22.');if(!_0x5e2501['ignoreMetadataScope']&&_0x193550===_0x485df3(0xa2)&&_0x50b50d?.[_0x485df3(0x90)]&&_0x50b50d['scope']!=='personal')throw CliErrors[_0x485df3(0x80)](_0x485df3(0xa8)+METADATA_FILE+_0x485df3(0x87)+_0x50b50d[_0x485df3(0x90)]+'\x22.',_0x485df3(0x8e)+_0x5f0117+_0x485df3(0x7c));const _0x3d7a1f=scanSkillDirectory(_0x5f0117),_0x5c306d=buildSkillPackage(_0x3d7a1f),_0x511934=readFileSync(_0x224759,_0x485df3(0xa9)),_0x2261e8=_0x4b5b7c[_0x485df3(0x93)],_0x2a7c04=_0x5e2501[_0x485df3(0x95)]?undefined:_0x50b50d,_0x5876c7=readSkillDisplayName(_0x511934);return{'skillCode':_0x2261e8,'metadata':_0x50b50d,'frontmatterDisplayName':_0x5876c7,'input':{'skillCode':_0x2261e8,'skillName':_0x5876c7??_0x2a7c04?.[_0x485df3(0xb4)],'description':_0x2a7c04?.[_0x485df3(0x7d)],'content':_0x511934,'files':_0x5c306d['manifest'],'packageBase64':_0x5c306d['packageBase64'],'tags':_0x2a7c04?.[_0x485df3(0xa3)],'version':_0x2a7c04?.[_0x485df3(0xb8)],'sourceSessionId':_0x2a7c04?.[_0x485df3(0x7f)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x4e9238,_0x27bca5,_0x4254fe,_0x5a1276={}){const _0x2477c8=a104_0x4c3f,_0x358b2c=resolvePushDirectoryRoot(_0x4e9238),_0x455d58=readPushMetadataIfPresent(resolve(_0x358b2c,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x35d69a=requireRemoteScope(_0x27bca5),_0x30d480=readLocalSkillContent(_0x358b2c),_0x1d8ac2={..._0x27bca5,'appCode':_0x27bca5[_0x2477c8(0xa1)]??_0x4254fe,'skillName':_0x27bca5[_0x2477c8(0xb4)]??_0x455d58?.[_0x2477c8(0xb4)],'description':_0x27bca5[_0x2477c8(0x7d)]??_0x455d58?.[_0x2477c8(0x7d)],'tags':Array[_0x2477c8(0x91)](_0x27bca5['tags'])?_0x27bca5[_0x2477c8(0xa3)]:_0x455d58?.[_0x2477c8(0xa3)],'sourceSessionId':_0x27bca5[_0x2477c8(0x7f)]??_0x455d58?.[_0x2477c8(0x7f)],'content':_0x27bca5[_0x2477c8(0x86)]??_0x30d480},_0x4253ef=buildMetadata(_0x1d8ac2,_0x35d69a,_0x4254fe,contentHash(_0x30d480),_0x5a1276[_0x2477c8(0xb1)]);writeJsonAtomic(resolve(_0x358b2c,METADATA_FILE),_0x4253ef);}export function recordPushedRuntimeSkill(_0x25bffd,_0x5d9de2,_0x3c3f45,_0xf89bc9={}){const _0x14dea5=a104_0x4c3f,_0x5b9e8c=resolvePushDirectoryRoot(_0x25bffd),_0x1eabb7=scanSkillDirectory(_0x5b9e8c),_0x27e626=_0x1eabb7[_0x14dea5(0x7b)](_0x4cf596=>_0x4cf596[_0x14dea5(0x98)]===SKILL_FILE),_0x6392d7=_0x27e626?fileText(_0x27e626):'',_0x386ac1=tryNormalizePackageManifest(_0x5d9de2[_0x14dea5(0xa5)]),_0x4590c6={..._0x5d9de2,'content':_0x5d9de2[_0x14dea5(0x86)]??_0x6392d7,'files':_0x386ac1},_0x1018c7=_0x386ac1?normalizeLocalFiles(_0x1eabb7)[_0x14dea5(0x8d)](_0xf7e7a6=>_0x386ac1[_0x14dea5(0xa5)][_0x14dea5(0xb3)](_0x4a2ddc=>_0x4a2ddc['path']===_0xf7e7a6[_0x14dea5(0x98)])):undefined,_0x47c4bb=buildMetadata(_0x4590c6,_0xf89bc9['scope']??_0x14dea5(0xa2),_0x3c3f45,contentHash(_0x4590c6['content']??''),_0xf89bc9['pushedAt'],_0x1018c7);writeJsonAtomic(resolve(_0x5b9e8c,METADATA_FILE),_0x47c4bb);}function a104_0x4c3f(_0x2cd1dc,_0x71a22){_0x2cd1dc=_0x2cd1dc-0x7a;const _0xd8faef=a104_0xd8fa();let _0x4c3f36=_0xd8faef[_0x2cd1dc];return _0x4c3f36;}export function deriveSkillCodeFromDirectory(_0xe5f48a,_0x54d469){const _0x12d1ea=a104_0x4c3f,_0x53be8e=basename(resolve(_0xe5f48a)),_0x1edb7a=_0x54d469+'--';return _0x53be8e[_0x12d1ea(0xb2)](_0x1edb7a)?_0x53be8e[_0x12d1ea(0x83)](_0x1edb7a['length']):_0x53be8e;}function resolvePushSkillCode(_0x265916,_0x3a0257,_0x592d4f,_0x5b44d0){const _0x374f19=a104_0x4c3f,_0x125a7a=deriveSkillCodeFromSkillFile(_0x265916)||deriveSkillCodeFromDirectory(_0x265916,_0x3a0257);if(_0x5b44d0[_0x374f19(0xaf)])return _0x125a7a;return _0x592d4f?.[_0x374f19(0x93)]?.[_0x374f19(0xb9)]()||_0x125a7a;}function deriveSkillCodeFromSkillFile(_0x512cf2){const _0x15ef38=a104_0x4c3f,_0x4aafba=resolve(_0x512cf2,SKILL_FILE);if(!existsSync(_0x4aafba)||!lstatSync(_0x4aafba)[_0x15ef38(0xae)]())return undefined;const _0x1572ee=readFileSync(_0x4aafba,_0x15ef38(0xa9)),_0x422297=_0x1572ee[_0x15ef38(0x94)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x422297)return undefined;const _0x4002e2=parseFrontmatterObject(_0x422297[0x1]??''),_0xf12b1=scalarToString(_0x4002e2?.[_0x15ef38(0x9c)]);return _0xf12b1?slugifySkillName(_0xf12b1):undefined;}function readSkillDisplayName(_0x256fc1){const _0x16d0b2=a104_0x4c3f,_0x5ade5d=_0x256fc1[_0x16d0b2(0x94)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5ade5d)return undefined;const _0x5e24bf=parseFrontmatterObject(_0x5ade5d[0x1]??'');return scalarToString(_0x5e24bf?.[_0x16d0b2(0x92)]);}function slugifySkillName(_0x1e92e7){const _0x143707=a104_0x4c3f,_0x34c568=_0x1e92e7[_0x143707(0xb9)]()[_0x143707(0x84)]()[_0x143707(0x7e)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x143707(0x7e)](/-+$/,'')[_0x143707(0x7e)](/-{2,}/g,'-');if(!_0x34c568)throw CliErrors['validation'](_0x143707(0xb7)+SKILL_FILE+_0x143707(0x96));return _0x34c568;}function parseFrontmatterObject(_0x1b9827){const _0x1b49ee=a104_0x4c3f;try{const _0x1128a9=a104_0x30dbdf(_0x1b9827);return _0x1128a9&&typeof _0x1128a9===_0x1b49ee(0x81)&&!Array['isArray'](_0x1128a9)?_0x1128a9:undefined;}catch{return undefined;}}function scalarToString(_0x5cc496){const _0x17c3a2=a104_0x4c3f;if(typeof _0x5cc496===_0x17c3a2(0xb0))return _0x5cc496[_0x17c3a2(0xb9)]();if(typeof _0x5cc496===_0x17c3a2(0xaa)||typeof _0x5cc496===_0x17c3a2(0x8b))return String(_0x5cc496);return undefined;}function resolvePushDirectoryRoot(_0x653b97){const _0x4d31f3=a104_0x4c3f,_0x2155d6=resolve(_0x653b97);if(!existsSync(_0x2155d6))throw CliErrors['validation'](_0x4d31f3(0xa4)+_0x653b97);const _0x438768=lstatSync(_0x2155d6);if(_0x438768['isDirectory']())return _0x2155d6;if(_0x438768[_0x4d31f3(0x97)]()){const _0x14fd04=realpathSync(_0x2155d6);if(lstatSync(_0x14fd04)['isDirectory']())return _0x14fd04;}throw CliErrors[_0x4d31f3(0x80)](_0x4d31f3(0xa4)+_0x653b97);}function requireRemoteScope(_0x306f64){const _0x477ca6=a104_0x4c3f;if(_0x306f64[_0x477ca6(0x90)]==='personal'||_0x306f64[_0x477ca6(0x90)]===_0x477ca6(0x82)||_0x306f64[_0x477ca6(0x90)]===_0x477ca6(0x9f))return _0x306f64[_0x477ca6(0x90)];throw CliErrors[_0x477ca6(0x80)](_0x477ca6(0xa0)+(_0x306f64['skillCode']||'(unknown)')+_0x477ca6(0x8f)+(_0x306f64[_0x477ca6(0x90)]??_0x477ca6(0x99))+'\x22.');}function readLocalSkillContent(_0x876abc){const _0x388d8e=a104_0x4c3f,_0x2f6859=resolve(_0x876abc,SKILL_FILE);return existsSync(_0x2f6859)&&lstatSync(_0x2f6859)[_0x388d8e(0xae)]()?readFileSync(_0x2f6859,_0x388d8e(0xa9)):'';}function readPushMetadataIfPresent(_0x750983,_0x5db845={}){try{return readMetadataIfPresent(_0x750983);}catch(_0x85a681){if(_0x5db845['ignoreInvalidMetadata'])return undefined;throw _0x85a681;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a105_0xaff0(_0x1cc63c,_0x5aed59){_0x1cc63c=_0x1cc63c-0x165;const _0x2c37f4=a105_0x2c37();let _0xaff0a0=_0x2c37f4[_0x1cc63c];return _0xaff0a0;}(function(_0x5f10b0,_0x3d4dd4){const _0x3527d9=a105_0xaff0,_0x108510=_0x5f10b0();while(!![]){try{const _0x292838=parseInt(_0x3527d9(0x16c))/0x1+-parseInt(_0x3527d9(0x16a))/0x2+-parseInt(_0x3527d9(0x168))/0x3+-parseInt(_0x3527d9(0x167))/0x4*(-parseInt(_0x3527d9(0x169))/0x5)+-parseInt(_0x3527d9(0x173))/0x6+-parseInt(_0x3527d9(0x16b))/0x7*(parseInt(_0x3527d9(0x16d))/0x8)+parseInt(_0x3527d9(0x166))/0x9;if(_0x292838===_0x3d4dd4)break;else _0x108510['push'](_0x108510['shift']());}catch(_0x5c02e5){_0x108510['push'](_0x108510['shift']());}}}(a105_0x2c37,0x48e69));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x4b0e60){const _0x5b8d94=a105_0xaff0,_0x57c612=_0x4b0e60&&_0x4b0e60[_0x5b8d94(0x171)]>0x0?_0x4b0e60:[_0x5b8d94(0x170),_0x5b8d94(0x165),_0x5b8d94(0x174)],_0x442a06=[];for(const _0x2ee47b of _0x57c612){if(!isRuntimeSkillScope(_0x2ee47b))throw CliErrors[_0x5b8d94(0x16e)](_0x5b8d94(0x172)+_0x2ee47b);!_0x442a06[_0x5b8d94(0x16f)](_0x2ee47b)&&_0x442a06['push'](_0x2ee47b);}return _0x442a06;}function a105_0x2c37(){const _0x273b85=['16SNlpdI','validation','includes','personal','length','Unsupported\x20runtime\x20Skill\x20scope:\x20','1828074GiEddr','builtin','company','12889071vGyqnx','51412buJqrw','1617870ptoqWA','45DiLZqJ','1030098MAlamc','31143FZFFxR','118721Womdbh'];a105_0x2c37=function(){return _0x273b85;};return a105_0x2c37();}export function isRuntimeSkillScope(_0xeb2d7d){const _0x40f9a4=a105_0xaff0;return _0xeb2d7d===_0x40f9a4(0x170)||_0xeb2d7d===_0x40f9a4(0x165)||_0xeb2d7d===_0x40f9a4(0x174);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a107_0x2783(){const _0x5437d9=['1138818cBDzIj','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','entries','1209656jHWelZ','33DAwuzD','40vCoeqh','sort','207796mHIUNq','endsWith','validation','map','557625TYCdBv','1629162kpzLdg','path','object','2661778wCJQEs','validation_error','133845QXeagv','name','code','from','1980-01-01T00:00:00.000Z','length','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'];a107_0x2783=function(){return _0x5437d9;};return a107_0x2783();}const a107_0x48c1f8=a107_0x5034;(function(_0x3f938c,_0x48a419){const _0x4896ec=a107_0x5034,_0x58080e=_0x3f938c();while(!![]){try{const _0x49623e=parseInt(_0x4896ec(0xbe))/0x1+parseInt(_0x4896ec(0xb0))/0x2+-parseInt(_0x4896ec(0xb1))/0x3*(-parseInt(_0x4896ec(0xb4))/0x4)+parseInt(_0x4896ec(0xb8))/0x5+parseInt(_0x4896ec(0xad))/0x6+-parseInt(_0x4896ec(0xbc))/0x7+parseInt(_0x4896ec(0xb2))/0x8*(-parseInt(_0x4896ec(0xb9))/0x9);if(_0x49623e===_0x48a419)break;else _0x58080e['push'](_0x58080e['shift']());}catch(_0x3599df){_0x58080e['push'](_0x58080e['shift']());}}}(a107_0x2783,0x4f9d0));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a107_0x48c1f8(0xc2));function a107_0x5034(_0x2f2738,_0x3bc293){_0x2f2738=_0x2f2738-0xab;const _0x27832d=a107_0x2783();let _0x5034bb=_0x27832d[_0x2f2738];return _0x5034bb;}export function createDeterministicZipPackage(_0x9f38a6){const _0x263ce6=a107_0x48c1f8,_0x2d7dd8={};for(const _0x4e3fa9 of normalizeLocalFiles(_0x9f38a6)){_0x2d7dd8[_0x4e3fa9[_0x263ce6(0xba)]]=fileContent(_0x4e3fa9);}return Buffer[_0x263ce6(0xc1)](zipSync(_0x2d7dd8,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x265250){const _0x9e5d3f=a107_0x48c1f8;if(_0x265250[_0x9e5d3f(0xab)]<0x16)throw CliErrors[_0x9e5d3f(0xb6)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x4d7a41;try{_0x4d7a41=unzipSync(_0x265250,{'filter'(_0x1bfe50){const _0x420c55=_0x9e5d3f,_0x2c4776=normalizeSkillRelativePath(_0x1bfe50[_0x420c55(0xbf)]);if(_0x2c4776[_0x420c55(0xb5)]('/'))throw CliErrors[_0x420c55(0xb6)](_0x420c55(0xac)+_0x2c4776);return!![];}});}catch(_0x51006a){if(isRuntimeSkillValidationError(_0x51006a))throw _0x51006a;throw CliErrors['validation'](_0x9e5d3f(0xae));}return Object[_0x9e5d3f(0xaf)](_0x4d7a41)[_0x9e5d3f(0xb7)](([_0x504b71,_0x3daa2b])=>({'path':normalizeSkillRelativePath(_0x504b71),'bytes':Buffer[_0x9e5d3f(0xc1)](_0x3daa2b)}))[_0x9e5d3f(0xb3)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x49efed){const _0x475776=a107_0x48c1f8;return typeof _0x49efed===_0x475776(0xbb)&&_0x49efed!==null&&_0x475776(0xc0)in _0x49efed&&_0x49efed[_0x475776(0xc0)]===_0x475776(0xbd);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x41cbfb,_0x293376){const _0x2921f7=a108_0x10e2,_0x1fc283=_0x41cbfb();while(!![]){try{const _0x23c4f1=-parseInt(_0x2921f7(0x122))/0x1+parseInt(_0x2921f7(0x126))/0x2*(-parseInt(_0x2921f7(0x12e))/0x3)+parseInt(_0x2921f7(0x13c))/0x4+parseInt(_0x2921f7(0x13b))/0x5*(parseInt(_0x2921f7(0x148))/0x6)+parseInt(_0x2921f7(0x13f))/0x7+parseInt(_0x2921f7(0x132))/0x8*(parseInt(_0x2921f7(0x14b))/0x9)+-parseInt(_0x2921f7(0x12a))/0xa*(parseInt(_0x2921f7(0x14d))/0xb);if(_0x23c4f1===_0x293376)break;else _0x1fc283['push'](_0x1fc283['shift']());}catch(_0x17afcf){_0x1fc283['push'](_0x1fc283['shift']());}}}(a108_0x6354,0x5790c));import{CliErrors}from'../../errors.js';function a108_0x10e2(_0xa393b7,_0x328480){_0xa393b7=_0xa393b7-0x121;const _0x6354db=a108_0x6354();let _0x10e2f1=_0x6354db[_0xa393b7];return _0x10e2f1;}import{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(_0x3743ec){const _0x48700f=a108_0x10e2,_0x37793b=normalizeLocalFiles(_0x3743ec);if(!_0x37793b[_0x48700f(0x139)](_0xd1aab=>_0xd1aab['path']===SKILL_FILE))throw CliErrors[_0x48700f(0x147)](_0x48700f(0x123)+SKILL_FILE+_0x48700f(0x137));const _0x373779=localFilesToManifestFiles(_0x37793b),_0x33e324=createDeterministicZipPackage(_0x37793b);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x373779),'zipSha256':bufferSha256(_0x33e324),'zipSize':_0x33e324[_0x48700f(0x149)],'files':_0x373779},'packageBytes':_0x33e324,'packageBase64':_0x33e324[_0x48700f(0x140)](_0x48700f(0x13d))};}export function verifyRuntimeSkillPackage(_0x358de2,_0x4b6b97){const _0x9a1e10=a108_0x10e2,_0x5d53de=normalizePackageManifest(_0x358de2,{'requireOssPath':![]});if(!_0x5d53de)throw CliErrors[_0x9a1e10(0x147)](_0x9a1e10(0x135));return extractAndVerifyPackage(_0x5d53de,_0x4b6b97);}export function verifyRuntimeSkillBundle(_0x3a10a4,_0x56cb66){const _0x299be9=a108_0x10e2,_0x47c597=normalizePackageManifest(_0x3a10a4,{'requireOssPath':![]});if(!_0x47c597)throw CliErrors[_0x299be9(0x147)](_0x299be9(0x135));return extractAndVerifyPackageFiles(_0x47c597,_0x56cb66);}function a108_0x6354(){const _0xe6a616=['zipSize','zipSha256','505513jFaCMU','Missing\x20','get','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','38234dWoJRH','push','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','toLowerCase','1290kcXEOw','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','treeSha256','size','93zVmhDu','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','string','8aVUfjC','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','trim','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','requireOssPath','\x20in\x20Skill\x20file\x20package.','map','some','schemaVersion','5HQTOWU','1212360hGsVYP','base64','Runtime\x20Skill\x20package\x20size\x20mismatch.','4157811inhtMz','toString','Runtime\x20Skill\x20package\x20is\x20missing\x20','path','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','bytes','isSafeInteger','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','validation','4108602xybNlX','length','ossPath','3122901qZWVRY','files','40249kVcALH'];a108_0x6354=function(){return _0xe6a616;};return a108_0x6354();}export function tryNormalizePackageManifest(_0x4394a9){return normalizePackageManifest(_0x4394a9,{'requireOssPath':![]});}export function requirePackageBytes(_0x3c27d3,_0x155532){if(!_0x155532||_0x155532['length']===0x0)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x3c27d3);return _0x155532;}export function extractDownloadedPackage(_0x4a82ab){const _0x3a0e10=a108_0x10e2,_0x20f7ae=parseZipPackage(_0x4a82ab)[_0x3a0e10(0x138)](_0x3cb5b8=>({'path':_0x3cb5b8[_0x3a0e10(0x142)],'bytes':_0x3cb5b8[_0x3a0e10(0x144)]}));if(!_0x20f7ae[_0x3a0e10(0x139)](_0x1caf9f=>_0x1caf9f[_0x3a0e10(0x142)]===SKILL_FILE))throw CliErrors[_0x3a0e10(0x147)](_0x3a0e10(0x141)+SKILL_FILE+'.');return normalizeLocalFiles(_0x20f7ae);}export function localFilesToManifestFiles(_0x49d6d0){const _0x18a417=a108_0x10e2;return normalizeLocalFiles(_0x49d6d0)[_0x18a417(0x138)](_0x4528bb=>({'path':_0x4528bb[_0x18a417(0x142)],'sha256':fileHash(_0x4528bb),'size':fileContent(_0x4528bb)[_0x18a417(0x149)]}));}function normalizePackageManifest(_0x24e48e,_0x4420fe){const _0x314164=a108_0x10e2;if(!_0x24e48e||typeof _0x24e48e!=='object'||Array['isArray'](_0x24e48e))return undefined;const _0x14e7d2=_0x24e48e,_0x3514da=typeof _0x14e7d2[_0x314164(0x14a)]===_0x314164(0x131)?_0x14e7d2[_0x314164(0x14a)][_0x314164(0x134)]():undefined;if(_0x4420fe[_0x314164(0x136)]&&!_0x3514da)return undefined;if(!Array['isArray'](_0x14e7d2['files'])||_0x14e7d2[_0x314164(0x14c)][_0x314164(0x149)]===0x0)return undefined;if(!isSha256Hex(_0x14e7d2[_0x314164(0x12c)]))throw CliErrors[_0x314164(0x147)](_0x314164(0x130));if(!isSha256Hex(_0x14e7d2[_0x314164(0x121)]))throw CliErrors[_0x314164(0x147)](_0x314164(0x12b));if(!Number[_0x314164(0x145)](_0x14e7d2['zipSize'])||_0x14e7d2['zipSize']<0x0)throw CliErrors[_0x314164(0x147)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0x3f4fa1=normalizeManifestFiles(_0x14e7d2[_0x314164(0x14c)]);if(!_0x3f4fa1['some'](_0x3e01c7=>_0x3e01c7[_0x314164(0x142)]===SKILL_FILE))throw CliErrors[_0x314164(0x147)](_0x314164(0x143)+SKILL_FILE+'.');const _0x31c773=fileTreeHash(_0x3f4fa1);if(_0x31c773!==_0x14e7d2[_0x314164(0x12c)][_0x314164(0x129)]())throw CliErrors[_0x314164(0x147)](_0x314164(0x146));return{'schemaVersion':Number[_0x314164(0x145)](_0x14e7d2['schemaVersion'])?_0x14e7d2[_0x314164(0x13a)]:0x2,'ossPath':_0x3514da,'treeSha256':_0x31c773,'zipSha256':_0x14e7d2['zipSha256']['toLowerCase'](),'zipSize':_0x14e7d2[_0x314164(0x14e)],'files':_0x3f4fa1};}function extractAndVerifyPackage(_0x475ad2,_0x1209c7){const _0x34b93f=a108_0x10e2,_0x24ebc1=normalizePackageManifest(_0x475ad2,{'requireOssPath':![]});if(!_0x24ebc1)throw CliErrors['validation'](_0x34b93f(0x135));if(_0x1209c7[_0x34b93f(0x149)]!==_0x24ebc1[_0x34b93f(0x14e)])throw CliErrors[_0x34b93f(0x147)](_0x34b93f(0x13e));const _0x123eb9=bufferSha256(_0x1209c7);if(_0x123eb9!==_0x24ebc1[_0x34b93f(0x121)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x24ebc1,_0x1209c7);}function extractAndVerifyPackageFiles(_0x217716,_0xa962fc){const _0x4f38b6=a108_0x10e2,_0x247562=parseZipPackage(_0xa962fc);if(_0x247562[_0x4f38b6(0x149)]!==_0x217716[_0x4f38b6(0x14c)]['length'])throw CliErrors[_0x4f38b6(0x147)](_0x4f38b6(0x125));const _0x41d4d7=new Map();for(const _0x16096b of _0x247562){if(_0x41d4d7['has'](_0x16096b[_0x4f38b6(0x142)]))throw CliErrors[_0x4f38b6(0x147)]('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x16096b[_0x4f38b6(0x142)]);_0x41d4d7['set'](_0x16096b['path'],_0x16096b);}const _0x1bb585=[];for(const _0x412323 of _0x217716['files']){const _0xba52f3=_0x41d4d7[_0x4f38b6(0x124)](_0x412323[_0x4f38b6(0x142)]);if(!_0xba52f3)throw CliErrors[_0x4f38b6(0x147)](_0x4f38b6(0x12f)+_0x412323[_0x4f38b6(0x142)]);if(_0xba52f3['bytes'][_0x4f38b6(0x149)]!==_0x412323[_0x4f38b6(0x12d)])throw CliErrors['validation'](_0x4f38b6(0x128)+_0x412323[_0x4f38b6(0x142)]);const _0x9ff104=bufferSha256(_0xba52f3[_0x4f38b6(0x144)]);if(_0x9ff104!==_0x412323['sha256'])throw CliErrors[_0x4f38b6(0x147)](_0x4f38b6(0x133)+_0x412323['path']);_0x1bb585[_0x4f38b6(0x127)]({'path':_0x412323[_0x4f38b6(0x142)],'bytes':_0xba52f3[_0x4f38b6(0x144)]});}return normalizeLocalFiles(_0x1bb585);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x41d7d5,_0x54700d){var _0x1d190a=a109_0x1b75,_0x53b64f=_0x41d7d5();while(!![]){try{var _0x5ab891=parseInt(_0x1d190a(0x174))/0x1*(parseInt(_0x1d190a(0x172))/0x2)+parseInt(_0x1d190a(0x175))/0x3+-parseInt(_0x1d190a(0x173))/0x4*(-parseInt(_0x1d190a(0x16d))/0x5)+parseInt(_0x1d190a(0x16c))/0x6+-parseInt(_0x1d190a(0x176))/0x7*(-parseInt(_0x1d190a(0x171))/0x8)+-parseInt(_0x1d190a(0x16e))/0x9+-parseInt(_0x1d190a(0x170))/0xa*(parseInt(_0x1d190a(0x16f))/0xb);if(_0x5ab891===_0x54700d)break;else _0x53b64f['push'](_0x53b64f['shift']());}catch(_0x7f888f){_0x53b64f['push'](_0x53b64f['shift']());}}}(a109_0x17e3,0x383a3));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a109_0x17e3(){var _0x3d7b83=['14377mihxJv','3970vwNtcJ','270368WgHdJt','48486yRtopq','4DSVxSF','5YnGkIq','677754ruHXbK','14aOjnuA','1991016KMNTgB','1208555dljuDM','2151774lrsUIW'];a109_0x17e3=function(){return _0x3d7b83;};return a109_0x17e3();}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 a109_0x1b75(_0x452747,_0x2cdf23){_0x452747=_0x452747-0x16c;var _0x17e3d9=a109_0x17e3();var _0x1b7586=_0x17e3d9[_0x452747];return _0x1b7586;}export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x40f9a6,_0xdb2c37){const _0x5b7682=a110_0x51c4,_0x58d251=_0x40f9a6();while(!![]){try{const _0x24d4a3=parseInt(_0x5b7682(0x1f7))/0x1+-parseInt(_0x5b7682(0x1fc))/0x2*(parseInt(_0x5b7682(0x1f2))/0x3)+parseInt(_0x5b7682(0x1f4))/0x4*(parseInt(_0x5b7682(0x1f9))/0x5)+parseInt(_0x5b7682(0x1fd))/0x6*(parseInt(_0x5b7682(0x1fb))/0x7)+parseInt(_0x5b7682(0x1fa))/0x8*(parseInt(_0x5b7682(0x1f3))/0x9)+parseInt(_0x5b7682(0x1f6))/0xa*(-parseInt(_0x5b7682(0x1f5))/0xb)+-parseInt(_0x5b7682(0x1f8))/0xc;if(_0x24d4a3===_0xdb2c37)break;else _0x58d251['push'](_0x58d251['shift']());}catch(_0x23c745){_0x58d251['push'](_0x58d251['shift']());}}}(a110_0x2f9a,0x77e49));function a110_0x2f9a(){const _0x2c9859=['21VkGCSP','2WsUCdD','881718nVwewP','1207731kdxEBE','18YITMCC','4wlPzfE','913pWAULQ','115070GfaWbB','827889ZKCJoK','5020968iSqkuK','2376935Jmwaik','2092072LyDDFO'];a110_0x2f9a=function(){return _0x2c9859;};return a110_0x2f9a();}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a110_0x51c4(_0x85a1ff,_0x47aae4){_0x85a1ff=_0x85a1ff-0x1f2;const _0x2f9af6=a110_0x2f9a();let _0x51c4c9=_0x2f9af6[_0x85a1ff];return _0x51c4c9;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a111_0x954387=a111_0x1b84;(function(_0x36f358,_0x19792a){const _0x282e37=a111_0x1b84,_0x3beba4=_0x36f358();while(!![]){try{const _0x49f1a6=-parseInt(_0x282e37(0x19f))/0x1*(-parseInt(_0x282e37(0x19a))/0x2)+parseInt(_0x282e37(0x1a3))/0x3+parseInt(_0x282e37(0x1bc))/0x4*(parseInt(_0x282e37(0x1cb))/0x5)+parseInt(_0x282e37(0x1d4))/0x6*(parseInt(_0x282e37(0x1c6))/0x7)+-parseInt(_0x282e37(0x1bd))/0x8*(parseInt(_0x282e37(0x1d0))/0x9)+-parseInt(_0x282e37(0x199))/0xa*(-parseInt(_0x282e37(0x1ca))/0xb)+-parseInt(_0x282e37(0x1a1))/0xc;if(_0x49f1a6===_0x19792a)break;else _0x3beba4['push'](_0x3beba4['shift']());}catch(_0x4931dd){_0x3beba4['push'](_0x3beba4['shift']());}}}(a111_0x1905,0x5eb80));import a111_0x585f8a from'winston';function a111_0x1905(){const _0x4b2f0e=['level','logTask','Completed:\x20','now','command','map','existsSync','clear','2133740GdmRLh','32eXFxXj','writeFileSync','Failed\x20to\x20read\x20logs:','warn','setLogPath','clearLogs','dirname','format','success','7zXLSgg','filter','stringify','getWinstonInstance','503690phRiSX','5wcZtpZ','red','join','createLogger','logFileName','1381401QKYLsG','info','transports','message','489024KEaVmz','printf','150vmkcQE','13150LwotaX','split','mkdirSync','Starting:\x20','utf8','15AVearV','rawCommand','7224756BzraYO','Failed:\x20','610719vriNSN','error','blue','parse','setRawCommand','timestamp','Failed\x20to\x20clear\x20logs:','addColors','green','logFilePath','log','readLogs','yellow','details','unknown','winstonLogger','combine'];a111_0x1905=function(){return _0x4b2f0e;};return a111_0x1905();}import a111_0x36ee69 from'node:fs';import a111_0x10ab8a from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];[a111_0x954387(0x1ac)]='';['currentRawCommand']='';constructor(){}[a111_0x954387(0x1a7)](_0x1a6178){this['currentRawCommand']=_0x1a6178;}[a111_0x954387(0x1c1)](_0x58c014){const _0x556c4a=a111_0x954387;this[_0x556c4a(0x1ac)]=a111_0x10ab8a[_0x556c4a(0x1cd)](_0x58c014,PRODUCT_CONFIG[_0x556c4a(0x1cf)]),this[_0x556c4a(0x1b2)]&&this[_0x556c4a(0x1b2)][_0x556c4a(0x1bb)](),this['initWinstonLogger']();}['initWinstonLogger'](){const _0x6cb411=a111_0x954387,_0x2f7e05=a111_0x10ab8a[_0x6cb411(0x1c3)](this[_0x6cb411(0x1ac)]);!a111_0x36ee69['existsSync'](_0x2f7e05)&&a111_0x36ee69[_0x6cb411(0x19c)](_0x2f7e05,{'recursive':!![]});const _0x34092f=a111_0x585f8a[_0x6cb411(0x1c4)][_0x6cb411(0x1b3)](a111_0x585f8a[_0x6cb411(0x1c4)][_0x6cb411(0x1a8)](),a111_0x585f8a[_0x6cb411(0x1c4)]['errors']({'stack':!![]}),a111_0x585f8a[_0x6cb411(0x1c4)][_0x6cb411(0x1d5)](_0x79bf7d=>{const _0x29f502=_0x6cb411,_0xb9a97e={'timestamp':_0x79bf7d[_0x29f502(0x1a8)]||new Date()['toISOString'](),'level':_0x79bf7d[_0x29f502(0x1b4)]||_0x29f502(0x1d1),'command':_0x79bf7d[_0x29f502(0x1b8)]||_0x29f502(0x1b1),'rawCommand':_0x79bf7d[_0x29f502(0x1a0)]||this['currentRawCommand']||undefined,'message':_0x79bf7d[_0x29f502(0x1d3)]||'','duration':_0x79bf7d['duration']||undefined,'details':_0x79bf7d[_0x29f502(0x1b0)]||undefined};return JSON[_0x29f502(0x1c8)](_0xb9a97e);}));this[_0x6cb411(0x1b2)]=a111_0x585f8a[_0x6cb411(0x1ce)]({'level':_0x6cb411(0x1d1),'format':_0x34092f,'transports':[new a111_0x585f8a[(_0x6cb411(0x1d2))]['File']({'filename':this[_0x6cb411(0x1ac)],'level':_0x6cb411(0x1d1)})],'silent':![]}),a111_0x585f8a[_0x6cb411(0x1aa)]({'success':_0x6cb411(0x1ab),'error':_0x6cb411(0x1cc),'warn':_0x6cb411(0x1af),'info':_0x6cb411(0x1a5)});}[a111_0x954387(0x1d1)](_0xa8aee0,_0x1a02e5,_0x14a928){const _0xf70103=a111_0x954387;if(!this[_0xf70103(0x1ac)]||!this[_0xf70103(0x1b2)])return;this[_0xf70103(0x1b2)][_0xf70103(0x1d1)](_0x1a02e5,{'command':_0xa8aee0,'details':_0x14a928});}[a111_0x954387(0x1c5)](_0x325625,_0x148526,_0x4a6a6a,_0x5d28c1){const _0x5adb07=a111_0x954387;if(!this[_0x5adb07(0x1ac)]||!this[_0x5adb07(0x1b2)])return;this[_0x5adb07(0x1b2)][_0x5adb07(0x1ad)](_0x5adb07(0x1d1),_0x148526,{'level':_0x5adb07(0x1c5),'command':_0x325625,'duration':_0x4a6a6a,'details':_0x5d28c1});}['error'](_0x4610f0,_0x2f5bf6,_0x91f93f){const _0x115329=a111_0x954387;if(!this[_0x115329(0x1ac)]||!this['winstonLogger'])return;this[_0x115329(0x1b2)][_0x115329(0x1a4)](_0x2f5bf6,{'command':_0x4610f0,'details':_0x91f93f});}[a111_0x954387(0x1c0)](_0x3b2dad,_0x530e62,_0x170a05){const _0x445d2d=a111_0x954387;if(!this[_0x445d2d(0x1ac)]||!this[_0x445d2d(0x1b2)])return;this['winstonLogger'][_0x445d2d(0x1c0)](_0x530e62,{'command':_0x3b2dad,'details':_0x170a05});}async[a111_0x954387(0x1b5)](_0x4e00d9,_0x46d84c,_0x26d01f){const _0x5a6607=a111_0x954387,_0x2fd761=Date[_0x5a6607(0x1b7)]();this['info'](_0x4e00d9,_0x5a6607(0x19d)+_0x46d84c);try{const _0x334a77=await _0x26d01f(),_0xee51=Date['now']()-_0x2fd761;return this[_0x5a6607(0x1c5)](_0x4e00d9,_0x5a6607(0x1b6)+_0x46d84c,_0xee51),_0x334a77;}catch(_0x4561c9){const _0x478b37=Date[_0x5a6607(0x1b7)]()-_0x2fd761;this[_0x5a6607(0x1a4)](_0x4e00d9,_0x5a6607(0x1a2)+_0x46d84c,{'error':_0x4561c9 instanceof Error?_0x4561c9['message']:String(_0x4561c9),'duration':_0x478b37});throw _0x4561c9;}}[a111_0x954387(0x1ae)](){const _0x29c94c=a111_0x954387;try{if(!a111_0x36ee69['existsSync'](this['logFilePath']))return[];const _0xb3a99c=a111_0x36ee69['readFileSync'](this[_0x29c94c(0x1ac)],_0x29c94c(0x19e));return _0xb3a99c[_0x29c94c(0x19b)](/\r?\n/)[_0x29c94c(0x1c7)](_0x4f9912=>_0x4f9912['trim']())[_0x29c94c(0x1b9)](_0x12478e=>JSON[_0x29c94c(0x1a6)](_0x12478e));}catch(_0x426c25){return console[_0x29c94c(0x1c0)](_0x29c94c(0x1bf),_0x426c25),[];}}[a111_0x954387(0x1c2)](){const _0xcd5187=a111_0x954387;try{a111_0x36ee69[_0xcd5187(0x1ba)](this[_0xcd5187(0x1ac)])&&a111_0x36ee69[_0xcd5187(0x1be)](this[_0xcd5187(0x1ac)],'',_0xcd5187(0x19e));}catch(_0x20ca6a){console[_0xcd5187(0x1c0)](_0xcd5187(0x1a9),_0x20ca6a);}}[a111_0x954387(0x1c9)](){const _0x4c7c30=a111_0x954387;return this[_0x4c7c30(0x1b2)];}}function a111_0x1b84(_0x54b9c7,_0x4db7b9){_0x54b9c7=_0x54b9c7-0x199;const _0x1905d8=a111_0x1905();let _0x1b8486=_0x1905d8[_0x54b9c7];return _0x1b8486;}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d0b69,_0x146330){var _0x14dd49=a112_0x19b2,_0x11cf02=_0x2d0b69();while(!![]){try{var _0xb64b32=parseInt(_0x14dd49(0x14d))/0x1+parseInt(_0x14dd49(0x154))/0x2*(parseInt(_0x14dd49(0x151))/0x3)+parseInt(_0x14dd49(0x152))/0x4+-parseInt(_0x14dd49(0x157))/0x5*(-parseInt(_0x14dd49(0x14c))/0x6)+parseInt(_0x14dd49(0x14f))/0x7+-parseInt(_0x14dd49(0x153))/0x8+-parseInt(_0x14dd49(0x155))/0x9;if(_0xb64b32===_0x146330)break;else _0x11cf02['push'](_0x11cf02['shift']());}catch(_0x54a880){_0x11cf02['push'](_0x11cf02['shift']());}}}(a112_0x9161,0xd980b));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x342587){var _0x426b39=a112_0x19b2;if(!_0x342587)return undefined;try{return JSON[_0x426b39(0x158)](_0x342587);}catch{throw CliErrors[_0x426b39(0x14b)](_0x426b39(0x156)+_0x342587);}}function a112_0x9161(){var _0x1c77c8=['isArray','validation','2638398xgblsM','1648440uPfcUb','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','6514466GEpbbd','items','3GXGeir','2175400tVptHs','8253600ZwSYxY','1332934lfVZbp','24716430TLQrRv','Invalid\x20JSON\x20for\x20--params:\x20','10FcQGBs','parse'];a112_0x9161=function(){return _0x1c77c8;};return a112_0x9161();}function a112_0x19b2(_0x37e161,_0x5d9c78){_0x37e161=_0x37e161-0x14b;var _0x91619d=a112_0x9161();var _0x19b2f8=_0x91619d[_0x37e161];return _0x19b2f8;}export function parseJsonParamsValue(_0xf3bb0){var _0xd02103=a112_0x19b2;if(!_0xf3bb0)return undefined;try{return JSON[_0xd02103(0x158)](_0xf3bb0);}catch{throw CliErrors[_0xd02103(0x14b)](_0xd02103(0x156)+_0xf3bb0);}}export function parseBatchCreateItemsFromParams(_0x54f267){var _0x151e8b=a112_0x19b2;if(Array[_0x151e8b(0x159)](_0x54f267))return _0x54f267;if(_0x54f267!==null&&_0x54f267!==undefined&&typeof _0x54f267==='object'&&Array[_0x151e8b(0x159)](_0x54f267[_0x151e8b(0x150)]))return _0x54f267[_0x151e8b(0x150)];throw CliErrors[_0x151e8b(0x14b)]('batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}',_0x151e8b(0x14e));}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a113_0xb2ef(){const _0x18ba09=['2789508uGWgJg','9dQXioa','880664DSENjR','984108twXnYg','win32','159095IGXLae','7527450ddFSOw','44ybOgRY','3eDuWJk','8409936yuQioZ','platform','6925rWpJPp','5622ITWsef','7cfjhLJ'];a113_0xb2ef=function(){return _0x18ba09;};return a113_0xb2ef();}const a113_0x25d675=a113_0x188f;function a113_0x188f(_0x64dd23,_0x2cb074){_0x64dd23=_0x64dd23-0x72;const _0xb2efca=a113_0xb2ef();let _0x188f71=_0xb2efca[_0x64dd23];return _0x188f71;}(function(_0x1a3bef,_0x337527){const _0x1e377b=a113_0x188f,_0x1549f7=_0x1a3bef();while(!![]){try{const _0xe4eb57=parseInt(_0x1e377b(0x76))/0x1+parseInt(_0x1e377b(0x73))/0x2*(parseInt(_0x1e377b(0x79))/0x3)+parseInt(_0x1e377b(0x74))/0x4+parseInt(_0x1e377b(0x7c))/0x5*(-parseInt(_0x1e377b(0x7d))/0x6)+parseInt(_0x1e377b(0x7e))/0x7*(parseInt(_0x1e377b(0x7a))/0x8)+-parseInt(_0x1e377b(0x72))/0x9*(parseInt(_0x1e377b(0x77))/0xa)+parseInt(_0x1e377b(0x78))/0xb*(parseInt(_0x1e377b(0x7f))/0xc);if(_0xe4eb57===_0x337527)break;else _0x1549f7['push'](_0x1549f7['shift']());}catch(_0x2576f1){_0x1549f7['push'](_0x1549f7['shift']());}}}(a113_0xb2ef,0xbd76a));export const isWindows=process[a113_0x25d675(0x7b)]===a113_0x25d675(0x75);export function resolveNpmBin(_0x228ea9){return isWindows?_0x228ea9+'.cmd':_0x228ea9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a114_0x23cd(_0x30dfad,_0x455fc7){_0x30dfad=_0x30dfad-0x19a;const _0x55e92a=a114_0x55e9();let _0x23cde5=_0x55e92a[_0x30dfad];return _0x23cde5;}(function(_0x30760d,_0x4571bc){const _0x4a977a=a114_0x23cd,_0x1fbf85=_0x30760d();while(!![]){try{const _0x2e173c=parseInt(_0x4a977a(0x1b3))/0x1+parseInt(_0x4a977a(0x1a6))/0x2*(-parseInt(_0x4a977a(0x1aa))/0x3)+-parseInt(_0x4a977a(0x1a0))/0x4*(parseInt(_0x4a977a(0x1a9))/0x5)+-parseInt(_0x4a977a(0x1a4))/0x6*(parseInt(_0x4a977a(0x1bd))/0x7)+-parseInt(_0x4a977a(0x1b7))/0x8+-parseInt(_0x4a977a(0x1a3))/0x9+parseInt(_0x4a977a(0x19d))/0xa;if(_0x2e173c===_0x4571bc)break;else _0x1fbf85['push'](_0x1fbf85['shift']());}catch(_0x339f6a){_0x1fbf85['push'](_0x1fbf85['shift']());}}}(a114_0x55e9,0x3487a));function a114_0x55e9(){const _0x501b2d=['minor','/-/package/','number','fromEntries','timeout','true','toLowerCase','75033Uwnjjl','utf8','\x20available,\x20current\x20','parse','1729784GRUSGp','update-check.json','trim','major','string','object','7NmrBhH','lastNotifiedVersion','map','/dist-tags','entries','yes','latest','\x20update','checkedAt','now','13116240ZzHxfU','filter','Invalid\x20semver','52484sfRUcz','prerelease','match','2889441xfGUWk','1356858iUxklp','patch','170OPLqcJ','json','lastNotifiedAt','150DsQRMQ','510KbntqU','/v/'];a114_0x55e9=function(){return _0x501b2d;};return a114_0x55e9();}import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x6b22ad){const _0x518e3c=a114_0x23cd,_0x2aefdb=_0x6b22ad[_0x518e3c(0x1b9)]()[_0x518e3c(0x1a2)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x2aefdb)return null;return{'major':Number(_0x2aefdb[0x1]),'minor':Number(_0x2aefdb[0x2]),'patch':Number(_0x2aefdb[0x3]),'prerelease':_0x2aefdb[0x4]};}function compareSemver(_0x3a17a2,_0x4204e2){const _0xbfd7b6=a114_0x23cd,_0x1cc522=parseSemver(_0x3a17a2),_0x31e8ba=parseSemver(_0x4204e2);if(!_0x1cc522||!_0x31e8ba)throw new Error(_0xbfd7b6(0x19f));for(const _0x48c631 of[_0xbfd7b6(0x1ba),_0xbfd7b6(0x1ac),_0xbfd7b6(0x1a5)]){if(_0x1cc522[_0x48c631]<_0x31e8ba[_0x48c631])return-0x1;if(_0x1cc522[_0x48c631]>_0x31e8ba[_0x48c631])return 0x1;}if(!_0x1cc522[_0xbfd7b6(0x1a1)]&&!_0x31e8ba['prerelease'])return 0x0;if(!_0x1cc522['prerelease'])return 0x1;if(!_0x31e8ba[_0xbfd7b6(0x1a1)])return-0x1;if(_0x1cc522[_0xbfd7b6(0x1a1)]===_0x31e8ba['prerelease'])return 0x0;return _0x1cc522[_0xbfd7b6(0x1a1)]<_0x31e8ba[_0xbfd7b6(0x1a1)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x518379=a114_0x23cd,_0x54b1bc=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x518379(0x1b9)]()[_0x518379(0x1b2)]();return _0x54b1bc==='1'||_0x54b1bc===_0x518379(0x1b1)||_0x54b1bc===_0x518379(0x1c2);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x255b62=a114_0x23cd;return join(cacheRoot(),'lovrabet-cli',_0x255b62(0x1b8));}async function readUpdateNoticeCache(){const _0x253016=a114_0x23cd;try{const _0x39b937=await readFile(getUpdateNoticeCachePath(),_0x253016(0x1b4)),_0x556eb7=JSON[_0x253016(0x1b6)](_0x39b937);if(!_0x556eb7||typeof _0x556eb7!==_0x253016(0x1bc))return{};return _0x556eb7;}catch{return{};}}async function writeUpdateNoticeCache(_0x48e255){try{const _0x100640=getUpdateNoticeCachePath();await mkdir(dirname(_0x100640),{'recursive':!![]}),await writeFile(_0x100640,JSON['stringify'](_0x48e255,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x480fa9,_0x3f5bfc){const _0x3b927a=a114_0x23cd;return typeof _0x480fa9[_0x3b927a(0x19b)]===_0x3b927a(0x1ae)&&_0x3f5bfc-_0x480fa9[_0x3b927a(0x19b)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x57cbf7,_0x1ba947,_0x4e50c8){const _0x3c045f=a114_0x23cd;return _0x57cbf7[_0x3c045f(0x1be)]===_0x1ba947&&typeof _0x57cbf7[_0x3c045f(0x1a8)]===_0x3c045f(0x1ae)&&_0x4e50c8-_0x57cbf7[_0x3c045f(0x1a8)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x1d0fb5=0x5dc){const _0x3f1417=a114_0x23cd;try{const _0x586301=NPM_REGISTRY_BASE_URL+_0x3f1417(0x1ad)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x3f1417(0x1c0),_0x45b502=await fetch(_0x586301,{'signal':AbortSignal[_0x3f1417(0x1b0)](_0x1d0fb5)});if(!_0x45b502['ok'])return null;const _0x5e6ecd=await _0x45b502[_0x3f1417(0x1a7)]();if(!_0x5e6ecd||typeof _0x5e6ecd!==_0x3f1417(0x1bc))return null;return Object[_0x3f1417(0x1af)](Object[_0x3f1417(0x1c1)](_0x5e6ecd)[_0x3f1417(0x19e)](([,_0x4f172c])=>typeof _0x4f172c===_0x3f1417(0x1bb)&&_0x4f172c[_0x3f1417(0x1b9)]())[_0x3f1417(0x1bf)](([_0x2630f1,_0x5a9ca4])=>[_0x2630f1,String(_0x5a9ca4)['trim']()]));}catch{return null;}}export function buildNpmVersionUrl(_0x23f576){const _0x2921ca=a114_0x23cd;return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+_0x2921ca(0x1ab)+_0x23f576;}export async function resolveLatestUpdateNotice(){const _0x5e7146=a114_0x23cd;if(isUpdateNoticeDisabled())return null;try{const _0x5b8430=Date[_0x5e7146(0x19c)](),_0x3da75e=getCliVersion(),_0x2a128e=await readUpdateNoticeCache();let _0x5b50b5=isFreshCheck(_0x2a128e,_0x5b8430)?_0x2a128e[_0x5e7146(0x1c3)]?.[_0x5e7146(0x1b9)]():undefined;if(!_0x5b50b5&&!isFreshCheck(_0x2a128e,_0x5b8430)){const _0x19b4f5=await fetchNpmDistTags();_0x5b50b5=_0x19b4f5?.[_0x5e7146(0x1c3)]?.[_0x5e7146(0x1b9)](),await writeUpdateNoticeCache({..._0x2a128e,'checkedAt':_0x5b8430,'latest':_0x5b50b5,'failed':!_0x5b50b5});}if(!_0x5b50b5||compareSemver(_0x3da75e,_0x5b50b5)>=0x0)return null;if(isRecentlyNotified(_0x2a128e,_0x5b50b5,_0x5b8430))return null;const _0x703922=CLI_BIN_NAME+_0x5e7146(0x19a);return await writeUpdateNoticeCache({..._0x2a128e,'checkedAt':isFreshCheck(_0x2a128e,_0x5b8430)?_0x2a128e[_0x5e7146(0x19b)]:_0x5b8430,'latest':_0x5b50b5,'failed':![],'lastNotifiedVersion':_0x5b50b5,'lastNotifiedAt':_0x5b8430}),{'command':_0x703922,'current':_0x3da75e,'latest':_0x5b50b5,'url':buildNpmVersionUrl(_0x5b50b5),'message':CLI_BIN_NAME+'\x20'+_0x5b50b5+_0x5e7146(0x1b5)+_0x3da75e+',\x20run:\x20'+_0x703922};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a115_0xb1ae(_0x82911c,_0x5f54ba){_0x82911c=_0x82911c-0x1c2;const _0x1a6d76=a115_0x1a6d();let _0xb1ae6f=_0x1a6d76[_0x82911c];return _0xb1ae6f;}(function(_0x373210,_0x2f90d4){const _0x1d2e7e=a115_0xb1ae,_0x426abe=_0x373210();while(!![]){try{const _0x504496=-parseInt(_0x1d2e7e(0x1ca))/0x1+-parseInt(_0x1d2e7e(0x1c9))/0x2+parseInt(_0x1d2e7e(0x1c4))/0x3*(parseInt(_0x1d2e7e(0x1c2))/0x4)+parseInt(_0x1d2e7e(0x1c8))/0x5+parseInt(_0x1d2e7e(0x1c7))/0x6+-parseInt(_0x1d2e7e(0x1c5))/0x7*(parseInt(_0x1d2e7e(0x1cb))/0x8)+parseInt(_0x1d2e7e(0x1c6))/0x9;if(_0x504496===_0x2f90d4)break;else _0x426abe['push'](_0x426abe['shift']());}catch(_0x5ca516){_0x426abe['push'](_0x426abe['shift']());}}}(a115_0x1a6d,0x6da94));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x1dd90c=a115_0xb1ae,_0x4a5e58=String(GIT_COMMIT);return _0x4a5e58&&_0x4a5e58!==_0x1dd90c(0x1c3)?_0x4a5e58:'';}export function getCliVersionDisplay(){const _0x5e96e8=a115_0xb1ae,_0x3810d1=getCliGitCommit(),_0x50e072=BUILD_TIME[_0x5e96e8(0x1cc)](0x0,0xa);if(!_0x3810d1||!_0x50e072)return VERSION;return VERSION+'\x20('+_0x3810d1+',\x20'+_0x50e072+')';}function a115_0x1a6d(){const _0x46622c=['507374LeHfVv','4739936NDNHDH','slice','80StlYLL','unknown','85629FFvArl','7IVMswe','6056127UIJRxp','4230024qVHnyQ','1938655TyPFVd','1574920BLAJuM'];a115_0x1a6d=function(){return _0x46622c;};return a115_0x1a6d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a116_0x53ed(_0x1f4df6,_0x2d12d6){_0x1f4df6=_0x1f4df6-0xf1;var _0x41afe3=a116_0x41af();var _0x53ed77=_0x41afe3[_0x1f4df6];return _0x53ed77;}(function(_0x3879a9,_0x3066fb){var _0x188dcd=a116_0x53ed,_0x545dae=_0x3879a9();while(!![]){try{var _0x213f22=-parseInt(_0x188dcd(0xfc))/0x1*(parseInt(_0x188dcd(0xf9))/0x2)+parseInt(_0x188dcd(0xf6))/0x3+-parseInt(_0x188dcd(0xf2))/0x4+parseInt(_0x188dcd(0xfb))/0x5*(-parseInt(_0x188dcd(0xf8))/0x6)+-parseInt(_0x188dcd(0xf5))/0x7*(-parseInt(_0x188dcd(0xfa))/0x8)+parseInt(_0x188dcd(0xf4))/0x9+-parseInt(_0x188dcd(0xf3))/0xa*(-parseInt(_0x188dcd(0xf7))/0xb);if(_0x213f22===_0x3066fb)break;else _0x545dae['push'](_0x545dae['shift']());}catch(_0x563956){_0x545dae['push'](_0x545dae['shift']());}}}(a116_0x41af,0xc8193));export function writeCliSideChannelLine(_0x2b5afb){var _0x32d754=a116_0x53ed;process['stderr'][_0x32d754(0xf1)](_0x2b5afb+'\x0a');}function a116_0x41af(){var _0x3a3f40=['102326PNiCcC','1410027ogHsEv','11yhCyzd','498PWFvgq','323516VYwoWa','88LMfEmv','11855ZnOisD','2jdzgAf','write','5865896SBCLdr','18777970xURrFM','2680038APuxxt'];a116_0x41af=function(){return _0x3a3f40;};return a116_0x41af();}
|