@lovrabet/lovrabet-cli 2.1.16 → 2.1.17
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/artifact/index.js +1 -1
- package/lib/commands/auth/device.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/function-name-adapter.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/rate-limit.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/lossless-json.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(_0xf7ac8e,_0x3dba8a){const _0x52791a=a104_0x570e,_0x51f370=_0xf7ac8e();while(!![]){try{const _0x41f78a=-parseInt(_0x52791a(0x1b5))/0x1+-parseInt(_0x52791a(0x1b7))/0x2+-parseInt(_0x52791a(0x1af))/0x3*(parseInt(_0x52791a(0x1a6))/0x4)+parseInt(_0x52791a(0x1a3))/0x5*(-parseInt(_0x52791a(0x1ba))/0x6)+-parseInt(_0x52791a(0x1a5))/0x7+-parseInt(_0x52791a(0x1b1))/0x8*(-parseInt(_0x52791a(0x199))/0x9)+-parseInt(_0x52791a(0x1a1))/0xa*(-parseInt(_0x52791a(0x1ac))/0xb);if(_0x41f78a===_0x3dba8a)break;else _0x51f370['push'](_0x51f370['shift']());}catch(_0x35db08){_0x51f370['push'](_0x51f370['shift']());}}}(a104_0x8df7,0xa3b1d));function a104_0x8df7(){const _0x2552b8=['length','version','skillCode','710VgZldK','trim','303965AAykRM','map','3455354TzLMti','1260bCGbfN','tenantCode','status','readonly','string','userId','497629aPUUHY','ossPath','zipSize','8229ebEedj','description','448VSwPVW','validation','tags','personal','41410OWEuvD','files','1922774oaDuao','manifest','object','24axuzoh','skillName','isArray','zipSha256','path','parse','9990akAwDc','Runtime\x20Skill\x20is\x20missing\x20skillCode.','utf8','forkedFromSkillId','hasUpstreamUpdate'];a104_0x8df7=function(){return _0x2552b8;};return a104_0x8df7();}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x6e09cd,_0x24ce30,_0x54fcd2,_0x47c4f6,_0x1b0996,_0x4297f8,_0x1a1b11){const _0x4a452f=a104_0x570e,_0x1751bf=_0x4297f8?normalizeLocalFiles(_0x4297f8):[],_0x278af8=!_0x1a1b11&&_0x1751bf[_0x4a452f(0x19e)]>0x0?buildSkillPackage(_0x1751bf):undefined,_0x148298=_0x1a1b11?bufferSha256(_0x1a1b11):_0x278af8?.[_0x4a452f(0x1b8)][_0x4a452f(0x196)],_0x2a0bb6=_0x1a1b11?.[_0x4a452f(0x19e)]??_0x278af8?.['manifest'][_0x4a452f(0x1ae)],_0x1c28b7=_0x1751bf['length']>0x0?Object['fromEntries'](_0x1751bf[_0x4a452f(0x1a4)](_0x1906c7=>[_0x1906c7[_0x4a452f(0x197)],fileHash(_0x1906c7)])):undefined;return{'schemaVersion':_0x1751bf[_0x4a452f(0x19e)]>0x0?0x2:0x1,'id':_0x6e09cd['id'],'appCode':_0x54fcd2,'skillCode':requireSkillCode(_0x6e09cd),'skillName':_0x6e09cd[_0x4a452f(0x1bb)],'description':_0x6e09cd[_0x4a452f(0x1b0)],'scope':_0x24ce30,'readonly':_0x24ce30!==_0x4a452f(0x1b4)||_0x6e09cd[_0x4a452f(0x1a9)]===!![],'tenantCode':_0x6e09cd[_0x4a452f(0x1a7)],'userId':_0x6e09cd[_0x4a452f(0x1ab)],'version':_0x6e09cd[_0x4a452f(0x19f)],'status':_0x6e09cd[_0x4a452f(0x1a8)],'tags':Array[_0x4a452f(0x195)](_0x6e09cd[_0x4a452f(0x1b3)])?_0x6e09cd[_0x4a452f(0x1b3)]:[],'hasUpstreamUpdate':_0x6e09cd[_0x4a452f(0x19d)],'forkedFromSkillId':_0x6e09cd[_0x4a452f(0x19c)],'forkedFromVersion':_0x6e09cd['forkedFromVersion'],'sourceSessionId':_0x6e09cd['sourceSessionId'],'contentHash':_0x47c4f6,'fileHashes':_0x1c28b7,'treeHash':_0x1751bf[_0x4a452f(0x19e)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x1751bf)):undefined,'ossPath':remoteManifestOssPath(_0x6e09cd[_0x4a452f(0x1b6)]),'zipSha256':_0x148298,'zipSize':_0x2a0bb6,'files':_0x1751bf[_0x4a452f(0x19e)]>0x0?_0x1751bf[_0x4a452f(0x1a4)](_0x201e2f=>({'path':_0x201e2f['path'],'hash':fileHash(_0x201e2f),'size':fileContent(_0x201e2f)[_0x4a452f(0x19e)]})):undefined,'pulledAt':_0x1b0996??new Date()['toISOString']()};}export function requireSkillCode(_0xd8d73a){const _0x1c3c6c=a104_0x570e,_0x3d6c6d=_0xd8d73a[_0x1c3c6c(0x1a0)]?.[_0x1c3c6c(0x1a2)]();if(!_0x3d6c6d)throw CliErrors[_0x1c3c6c(0x1b2)](_0x1c3c6c(0x19a));return _0x3d6c6d;}function a104_0x570e(_0x281ffa,_0x31e954){_0x281ffa=_0x281ffa-0x195;const _0x8df74=a104_0x8df7();let _0x570ebd=_0x8df74[_0x281ffa];return _0x570ebd;}export function readMetadataIfPresent(_0x2e76b4){const _0xc04701=a104_0x570e;if(!existsSync(_0x2e76b4))return undefined;try{const _0x338173=JSON[_0xc04701(0x198)](readFileSync(_0x2e76b4,_0xc04701(0x19b)));return _0x338173;}catch{throw CliErrors[_0xc04701(0x1b2)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x2e76b4);}}function remoteManifestOssPath(_0x328160){const _0xff40c8=a104_0x570e;if(!_0x328160||typeof _0x328160!==_0xff40c8(0x1b9)||Array['isArray'](_0x328160))return undefined;const _0x51e7f1=_0x328160[_0xff40c8(0x1ad)];return typeof _0x51e7f1===_0xff40c8(0x1aa)&&_0x51e7f1[_0xff40c8(0x1a2)]()?_0x51e7f1[_0xff40c8(0x1a2)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a105_0x1456a9=a105_0x1a34;(function(_0x15f5a7,_0x478957){const _0x156272=a105_0x1a34,_0x1dd379=_0x15f5a7();while(!![]){try{const _0x2e1b3c=-parseInt(_0x156272(0x170))/0x1*(parseInt(_0x156272(0x172))/0x2)+-parseInt(_0x156272(0x17c))/0x3*(parseInt(_0x156272(0x167))/0x4)+parseInt(_0x156272(0x176))/0x5+-parseInt(_0x156272(0x169))/0x6*(parseInt(_0x156272(0x16c))/0x7)+parseInt(_0x156272(0x166))/0x8*(-parseInt(_0x156272(0x174))/0x9)+parseInt(_0x156272(0x168))/0xa+parseInt(_0x156272(0x165))/0xb;if(_0x2e1b3c===_0x478957)break;else _0x1dd379['push'](_0x1dd379['shift']());}catch(_0x3a4625){_0x1dd379['push'](_0x1dd379['shift']());}}}(a105_0x1129,0x3c294));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a105_0x1129(){const _0x1db454=['skills','10004676gaJboi','6232NeoYYG','226524qnRBxq','2414890BuzJBH','61866xyJKyg','path\x20segment','.workbuddy','77XRXZLI','CLAUDE_SKILL_ROOT','validation','.agents','1DCUFwK','trim','919514VtOOJu','filter','5337OOsjNs','homeDirName','1502165nliEHS','appCode','Unsafe\x20','claudeSkillsDir','skillCode','workbuddySkillsDir','9ayNRhd','includes','homeDir','agentsSkillsDir'];a105_0x1129=function(){return _0x1db454;};return a105_0x1129();}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x442441={}){const _0x2b0a12=a105_0x1a34,_0x287516=_0x442441[_0x2b0a12(0x17e)]??homedir(),_0x3d154b=resolve(_0x287516,PRODUCT_CONFIG[_0x2b0a12(0x175)],'cache'),_0x57eb89=trimmedEnv('SKILL_ROOT'),_0x4b18d1=trimmedEnv(_0x2b0a12(0x16d)),_0x3acfd6=resolve(_0x287516,_0x2b0a12(0x16b)),_0x1fa0d0=_0x442441[_0x2b0a12(0x17b)]??(existsSync(_0x3acfd6)?resolve(_0x3acfd6,_0x2b0a12(0x164)):undefined);return{'homeDir':_0x287516,'cacheRoot':_0x3d154b,'managedRoot':resolve(_0x287516,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x442441[_0x2b0a12(0x163)]??_0x57eb89??resolve(_0x287516,_0x2b0a12(0x16f),_0x2b0a12(0x164)),'claudeSkillsDir':_0x442441[_0x2b0a12(0x179)]??_0x4b18d1??resolve(_0x287516,'.claude',_0x2b0a12(0x164)),'workbuddySkillsDir':_0x1fa0d0};}export function runtimeAgentSkillRoots(_0x43a9fd){const _0x5b0e0f=a105_0x1a34;return[_0x43a9fd[_0x5b0e0f(0x163)],_0x43a9fd['claudeSkillsDir'],_0x43a9fd['workbuddySkillsDir']][_0x5b0e0f(0x173)](_0x54f8ea=>Boolean(_0x54f8ea));}export function getRuntimeSkillCacheRoot(_0x23fc48,_0x21f4cd,_0x18a671={}){const _0x4b65d9=resolveSkillSyncPaths(_0x18a671);return resolve(_0x4b65d9['cacheRoot'],_0x23fc48,fingerprintAccessKey(_0x21f4cd),'skills');}export function getRuntimeSkillDir(_0x10f3c2,_0x2a055e,_0xbe4221,_0x5a85de,_0x8b9a11,_0x2637dc={}){const _0x247619=a105_0x1a34;return resolve(getRuntimeSkillCacheRoot(_0x10f3c2,_0x2a055e,_0x2637dc),safePathSegment(_0xbe4221,_0x247619(0x177)),_0x5a85de,safePathSegment(_0x8b9a11,_0x247619(0x17a)));}function a105_0x1a34(_0x92f736,_0x37df06){_0x92f736=_0x92f736-0x163;const _0x1129f9=a105_0x1129();let _0x1a3460=_0x1129f9[_0x92f736];return _0x1a3460;}export function safePathSegment(_0x5933c8,_0x9234f2=a105_0x1456a9(0x16a)){const _0x3319e6=a105_0x1456a9;if(!_0x5933c8||_0x5933c8[_0x3319e6(0x17d)]('/')||_0x5933c8['includes']('\x5c')||_0x5933c8[_0x3319e6(0x17d)]('..'))throw CliErrors[_0x3319e6(0x16e)](_0x3319e6(0x178)+_0x9234f2+'\x20for\x20local\x20path:\x20'+_0x5933c8);return _0x5933c8;}function trimmedEnv(_0x259ecf){const _0x49d87f=a105_0x1456a9,_0x355fd4=productEnv(_0x259ecf)?.[_0x49d87f(0x171)]();return _0x355fd4?_0x355fd4:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1fb808,_0x3950eb){const _0x1a848a=a106_0x5111,_0x2e0d18=_0x1fb808();while(!![]){try{const _0x194d18=parseInt(_0x1a848a(0x22d))/0x1+-parseInt(_0x1a848a(0x21e))/0x2*(parseInt(_0x1a848a(0x210))/0x3)+-parseInt(_0x1a848a(0x20f))/0x4+-parseInt(_0x1a848a(0x204))/0x5*(parseInt(_0x1a848a(0x1f5))/0x6)+parseInt(_0x1a848a(0x1fc))/0x7*(-parseInt(_0x1a848a(0x218))/0x8)+parseInt(_0x1a848a(0x21d))/0x9*(-parseInt(_0x1a848a(0x201))/0xa)+parseInt(_0x1a848a(0x215))/0xb*(parseInt(_0x1a848a(0x1fd))/0xc);if(_0x194d18===_0x3950eb)break;else _0x2e0d18['push'](_0x2e0d18['shift']());}catch(_0x4d891e){_0x2e0d18['push'](_0x2e0d18['shift']());}}}(a106_0x33e1,0xb50ac));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a106_0x2b9129}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(_0x18f15e,_0x436d22,_0x3e762a={}){const _0x554b8f=a106_0x5111,_0xb0c0d2=resolvePushDirectoryRoot(_0x18f15e),_0x204cb9=readPushMetadataIfPresent(resolve(_0xb0c0d2,METADATA_FILE),{'ignoreInvalidMetadata':_0x3e762a[_0x554b8f(0x1f3)]});if(_0x204cb9?.[_0x554b8f(0x21f)]&&_0x204cb9[_0x554b8f(0x21f)]!==_0x436d22&&!_0x3e762a[_0x554b8f(0x203)]&&!_0x3e762a[_0x554b8f(0x221)])throw CliErrors[_0x554b8f(0x217)]('Skill\x20metadata\x20appCode\x20\x22'+_0x204cb9[_0x554b8f(0x21f)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x436d22+'\x22.');const _0x36805a=resolvePushSkillCode(_0xb0c0d2,_0x436d22,_0x204cb9,_0x3e762a);if(!_0x36805a)throw CliErrors[_0x554b8f(0x217)](_0x554b8f(0x21b)+SKILL_FILE+',\x20'+METADATA_FILE+_0x554b8f(0x1f0));return{'dir':_0xb0c0d2,'skillCode':_0x36805a,'metadata':_0x204cb9};}export function readPushDirectory(_0x43344d,_0x1f5a16,_0x50acba={}){const _0x4f6dfe=a106_0x5111,_0x20faf6=resolvePushDirectoryIdentity(_0x43344d,_0x1f5a16,_0x50acba),_0x262936=_0x20faf6[_0x4f6dfe(0x1f7)],_0x2e6c7d=resolve(_0x262936,SKILL_FILE);if(!existsSync(_0x2e6c7d)||!lstatSync(_0x2e6c7d)[_0x4f6dfe(0x20b)]())throw CliErrors['validation'](_0x4f6dfe(0x1ff)+SKILL_FILE+':\x20'+_0x2e6c7d);const _0x5762eb=_0x20faf6[_0x4f6dfe(0x20d)],_0x12d828=_0x50acba[_0x4f6dfe(0x214)]??_0x4f6dfe(0x22e);if(!_0x50acba[_0x4f6dfe(0x219)]&&_0x5762eb?.[_0x4f6dfe(0x223)]===_0x4f6dfe(0x1f4))throw CliErrors[_0x4f6dfe(0x217)](_0x4f6dfe(0x209)+METADATA_FILE+_0x4f6dfe(0x231)+_0x5762eb[_0x4f6dfe(0x223)]+'\x22.');if(!_0x50acba[_0x4f6dfe(0x219)]&&_0x12d828===_0x4f6dfe(0x22e)&&_0x5762eb?.[_0x4f6dfe(0x223)]&&_0x5762eb[_0x4f6dfe(0x223)]!=='personal')throw CliErrors[_0x4f6dfe(0x217)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+'\x20has\x20scope=\x22'+_0x5762eb[_0x4f6dfe(0x223)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x262936+_0x4f6dfe(0x1fb));const _0x1d6c09=scanSkillDirectory(_0x262936),_0x5bc3cf=buildSkillPackage(_0x1d6c09),_0x4d56f2=readFileSync(_0x2e6c7d,_0x4f6dfe(0x226)),_0x5c5efb=_0x20faf6[_0x4f6dfe(0x1fa)],_0x208c91=_0x50acba['ignoreMetadataForPayload']?undefined:_0x5762eb,_0x30bbdc=readSkillDisplayName(_0x4d56f2);return{'skillCode':_0x5c5efb,'metadata':_0x5762eb,'frontmatterDisplayName':_0x30bbdc,'input':{'skillCode':_0x5c5efb,'skillName':_0x30bbdc??_0x208c91?.[_0x4f6dfe(0x224)],'description':_0x208c91?.[_0x4f6dfe(0x227)],'content':_0x4d56f2,'files':_0x5bc3cf[_0x4f6dfe(0x1f8)],'packageBase64':_0x5bc3cf[_0x4f6dfe(0x207)],'tags':_0x208c91?.[_0x4f6dfe(0x202)],'version':_0x208c91?.['version'],'sourceSessionId':_0x208c91?.[_0x4f6dfe(0x1f9)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x1e9136,_0x52c211,_0x295aea,_0x26216e={}){const _0x3706e6=a106_0x5111,_0x1cbbfe=resolvePushDirectoryRoot(_0x1e9136),_0x1e7e53=readPushMetadataIfPresent(resolve(_0x1cbbfe,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x407c43=requireRemoteScope(_0x52c211),_0x24e04c=readLocalSkillContent(_0x1cbbfe),_0x2f8468={..._0x52c211,'appCode':_0x52c211[_0x3706e6(0x21f)]??_0x295aea,'skillName':_0x52c211[_0x3706e6(0x224)]??_0x1e7e53?.[_0x3706e6(0x224)],'description':_0x52c211[_0x3706e6(0x227)]??_0x1e7e53?.['description'],'tags':Array['isArray'](_0x52c211[_0x3706e6(0x202)])?_0x52c211[_0x3706e6(0x202)]:_0x1e7e53?.[_0x3706e6(0x202)],'sourceSessionId':_0x52c211['sourceSessionId']??_0x1e7e53?.[_0x3706e6(0x1f9)],'content':_0x52c211[_0x3706e6(0x1fe)]??_0x24e04c},_0x3dacbb=buildMetadata(_0x2f8468,_0x407c43,_0x295aea,contentHash(_0x24e04c),_0x26216e['refreshedAt']);writeJsonAtomic(resolve(_0x1cbbfe,METADATA_FILE),_0x3dacbb);}export function recordPushedRuntimeSkill(_0xc97b20,_0x3db8d1,_0x5b3834,_0x2739cd={}){const _0x79a226=a106_0x5111,_0x2bbe24=resolvePushDirectoryRoot(_0xc97b20),_0x4af799=scanSkillDirectory(_0x2bbe24),_0x22bea4=_0x4af799[_0x79a226(0x220)](_0x1da3b0=>_0x1da3b0['path']===SKILL_FILE),_0xbf9cc0=_0x22bea4?fileText(_0x22bea4):'',_0x5becce=tryNormalizePackageManifest(_0x3db8d1[_0x79a226(0x225)]),_0x30d14e={..._0x3db8d1,'content':_0x3db8d1[_0x79a226(0x1fe)]??_0xbf9cc0,'files':_0x5becce},_0x1782ab=_0x5becce?normalizeLocalFiles(_0x4af799)[_0x79a226(0x208)](_0x4a179c=>_0x5becce['files'][_0x79a226(0x22c)](_0x4f8bb4=>_0x4f8bb4[_0x79a226(0x21a)]===_0x4a179c['path'])):undefined,_0x501316=buildMetadata(_0x30d14e,_0x2739cd['scope']??_0x79a226(0x22e),_0x5b3834,contentHash(_0x30d14e['content']??''),_0x2739cd[_0x79a226(0x22f)],_0x1782ab);writeJsonAtomic(resolve(_0x2bbe24,METADATA_FILE),_0x501316);}export function deriveSkillCodeFromDirectory(_0x47ec53,_0x32e414){const _0xb95e13=a106_0x5111,_0x15b608=basename(resolve(_0x47ec53)),_0x52a798=_0x32e414+'--';return _0x15b608['startsWith'](_0x52a798)?_0x15b608[_0xb95e13(0x22a)](_0x52a798[_0xb95e13(0x230)]):_0x15b608;}function resolvePushSkillCode(_0x238f62,_0x2f6393,_0x4f33be,_0x412fcf){const _0x1ce3f6=a106_0x5111,_0x3fef3d=deriveSkillCodeFromSkillFile(_0x238f62)||deriveSkillCodeFromDirectory(_0x238f62,_0x2f6393);if(_0x412fcf[_0x1ce3f6(0x200)])return _0x3fef3d;return _0x4f33be?.['skillCode']?.[_0x1ce3f6(0x22b)]()||_0x3fef3d;}function deriveSkillCodeFromSkillFile(_0x23f2ca){const _0x35a9e8=a106_0x5111,_0x4df59e=resolve(_0x23f2ca,SKILL_FILE);if(!existsSync(_0x4df59e)||!lstatSync(_0x4df59e)['isFile']())return undefined;const _0x595312=readFileSync(_0x4df59e,'utf8'),_0x43e32b=_0x595312['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x43e32b)return undefined;const _0x3a1eff=parseFrontmatterObject(_0x43e32b[0x1]??''),_0x2d77b8=scalarToString(_0x3a1eff?.[_0x35a9e8(0x1f2)]);return _0x2d77b8?slugifySkillName(_0x2d77b8):undefined;}function readSkillDisplayName(_0x4d7aa3){const _0x25e06f=a106_0x5111,_0x433a69=_0x4d7aa3[_0x25e06f(0x211)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x433a69)return undefined;const _0xeca1ac=parseFrontmatterObject(_0x433a69[0x1]??'');return scalarToString(_0xeca1ac?.[_0x25e06f(0x1f1)]);}function slugifySkillName(_0x468283){const _0x27415b=a106_0x5111,_0x150514=_0x468283['trim']()[_0x27415b(0x222)]()[_0x27415b(0x20e)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x27415b(0x20e)](/-+$/,'')[_0x27415b(0x20e)](/-{2,}/g,'-');if(!_0x150514)throw CliErrors[_0x27415b(0x217)]('Invalid\x20'+SKILL_FILE+_0x27415b(0x216));return _0x150514;}function a106_0x5111(_0x24bd0a,_0x34bd8e){_0x24bd0a=_0x24bd0a-0x1f0;const _0x33e1f2=a106_0x33e1();let _0x511127=_0x33e1f2[_0x24bd0a];return _0x511127;}function parseFrontmatterObject(_0x2a437d){const _0x4d396a=a106_0x5111;try{const _0x2f03d4=a106_0x2b9129(_0x2a437d);return _0x2f03d4&&typeof _0x2f03d4==='object'&&!Array[_0x4d396a(0x228)](_0x2f03d4)?_0x2f03d4:undefined;}catch{return undefined;}}function scalarToString(_0x48fef4){const _0x4d53b0=a106_0x5111;if(typeof _0x48fef4===_0x4d53b0(0x20c))return _0x48fef4[_0x4d53b0(0x22b)]();if(typeof _0x48fef4===_0x4d53b0(0x213)||typeof _0x48fef4===_0x4d53b0(0x1f6))return String(_0x48fef4);return undefined;}function resolvePushDirectoryRoot(_0x3902ec){const _0x3d3c41=a106_0x5111,_0x417369=resolve(_0x3902ec);if(!existsSync(_0x417369))throw CliErrors[_0x3d3c41(0x217)]('Skill\x20directory\x20not\x20found:\x20'+_0x3902ec);const _0x3e3c9b=lstatSync(_0x417369);if(_0x3e3c9b[_0x3d3c41(0x206)]())return _0x417369;if(_0x3e3c9b[_0x3d3c41(0x21c)]()){const _0x5b36fc=realpathSync(_0x417369);if(lstatSync(_0x5b36fc)['isDirectory']())return _0x5b36fc;}throw CliErrors[_0x3d3c41(0x217)](_0x3d3c41(0x205)+_0x3902ec);}function requireRemoteScope(_0x20a9a7){const _0x1ca8b6=a106_0x5111;if(_0x20a9a7[_0x1ca8b6(0x223)]==='personal'||_0x20a9a7[_0x1ca8b6(0x223)]===_0x1ca8b6(0x20a)||_0x20a9a7['scope']===_0x1ca8b6(0x1f4))return _0x20a9a7[_0x1ca8b6(0x223)];throw CliErrors[_0x1ca8b6(0x217)](_0x1ca8b6(0x212)+(_0x20a9a7[_0x1ca8b6(0x1fa)]||_0x1ca8b6(0x232))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x20a9a7[_0x1ca8b6(0x223)]??_0x1ca8b6(0x229))+'\x22.');}function readLocalSkillContent(_0x252783){const _0x2f8a39=a106_0x5111,_0x4f638e=resolve(_0x252783,SKILL_FILE);return existsSync(_0x4f638e)&&lstatSync(_0x4f638e)[_0x2f8a39(0x20b)]()?readFileSync(_0x4f638e,_0x2f8a39(0x226)):'';}function a106_0x33e1(){const _0x194632=['content','Missing\x20','ignoreMetadataSkillCode','2517010KxYwZK','tags','allowAppCodeRetarget','85GeXjBF','Skill\x20directory\x20not\x20found:\x20','isDirectory','packageBase64','filter','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','company','isFile','string','metadata','replace','2730604TSGxad','106719DoNoww','match','Remote\x20Skill\x20','number','targetScope','3355ezhOzG','\x20name\x20for\x20SkillHub\x20slug\x20generation.','validation','246952mOgcyD','ignoreMetadataScope','path','Unable\x20to\x20resolve\x20skillCode\x20from\x20','isSymbolicLink','9OiMGpc','82Eldgik','appCode','find','ignoreMetadataAppCodeMismatch','toLowerCase','scope','skillName','files','utf8','description','isArray','unknown','slice','trim','some','1293508itFZCj','personal','pushedAt','length','\x20has\x20scope=\x22','(unknown)',',\x20or\x20directory\x20name.','displayName','name','ignoreInvalidMetadata','builtin','421404zbCESy','boolean','dir','manifest','sourceSessionId','skillCode','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','21MbSgVO','123048UzMzOE'];a106_0x33e1=function(){return _0x194632;};return a106_0x33e1();}function readPushMetadataIfPresent(_0x173de9,_0x1088ab={}){const _0x42c4e8=a106_0x5111;try{return readMetadataIfPresent(_0x173de9);}catch(_0x1485f5){if(_0x1088ab[_0x42c4e8(0x1f3)])return undefined;throw _0x1485f5;}}
|
|
1
|
+
function a106_0x5f13(_0x5442b8,_0x4625ac){_0x5442b8=_0x5442b8-0xbe;const _0x3ab3cd=a106_0x3ab3();let _0x5f1382=_0x3ab3cd[_0x5442b8];return _0x5f1382;}(function(_0xf123b1,_0x1e404f){const _0x2151b6=a106_0x5f13,_0x1ae781=_0xf123b1();while(!![]){try{const _0x59d822=-parseInt(_0x2151b6(0xf8))/0x1+-parseInt(_0x2151b6(0xcf))/0x2+parseInt(_0x2151b6(0xdc))/0x3*(-parseInt(_0x2151b6(0xfc))/0x4)+-parseInt(_0x2151b6(0xbe))/0x5*(-parseInt(_0x2151b6(0xe8))/0x6)+parseInt(_0x2151b6(0xd0))/0x7*(parseInt(_0x2151b6(0xc4))/0x8)+parseInt(_0x2151b6(0xee))/0x9+parseInt(_0x2151b6(0xd1))/0xa*(parseInt(_0x2151b6(0xc3))/0xb);if(_0x59d822===_0x1e404f)break;else _0x1ae781['push'](_0x1ae781['shift']());}catch(_0x2f3d01){_0x1ae781['push'](_0x1ae781['shift']());}}}(a106_0x3ab3,0xf3304));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a106_0xde0447}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';function a106_0x3ab3(){const _0x154cea=['startsWith','skillName',',\x20or\x20directory\x20name.','builtin','number','allowAppCodeRetarget','1677921NxDDwL','filter','tags','files','Skill\x20directory\x20not\x20found:\x20','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','object','appCode','scope','manifest','isSymbolicLink','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','558aFNbdN','\x20name\x20for\x20SkillHub\x20slug\x20generation.','isArray','skillCode','ignoreMetadataSkillCode','Missing\x20','924300rVgUeP','description','boolean','trim','\x20has\x20scope=\x22','content','slice','(unknown)','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','displayName','34875lAZKso','ignoreMetadataAppCodeMismatch','metadata','Remote\x20Skill\x20','12tTbWVI','ignoreInvalidMetadata','match','42535UlazwE','Skill\x20metadata\x20appCode\x20\x22','validation','isDirectory','string','462HRBHbW','8176280ViMgty','ignoreMetadataScope','refreshedAt','length','version','Unable\x20to\x20resolve\x20skillCode\x20from\x20','personal','isFile','replace','sourceSessionId','utf8','154124XczAUg','7aEmtaP','207160wVifDR','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','targetScope','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','path'];a106_0x3ab3=function(){return _0x154cea;};return a106_0x3ab3();}import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x58d586,_0x55f695,_0x454fb0={}){const _0xd12260=a106_0x5f13,_0x36ec16=resolvePushDirectoryRoot(_0x58d586),_0x2ac901=readPushMetadataIfPresent(resolve(_0x36ec16,METADATA_FILE),{'ignoreInvalidMetadata':_0x454fb0[_0xd12260(0xfd)]});if(_0x2ac901?.['appCode']&&_0x2ac901['appCode']!==_0x55f695&&!_0x454fb0[_0xd12260(0xdb)]&&!_0x454fb0[_0xd12260(0xf9)])throw CliErrors[_0xd12260(0xc0)](_0xd12260(0xbf)+_0x2ac901[_0xd12260(0xe3)]+_0xd12260(0xd4)+_0x55f695+'\x22.');const _0x4d329e=resolvePushSkillCode(_0x36ec16,_0x55f695,_0x2ac901,_0x454fb0);if(!_0x4d329e)throw CliErrors[_0xd12260(0xc0)](_0xd12260(0xc9)+SKILL_FILE+',\x20'+METADATA_FILE+_0xd12260(0xd8));return{'dir':_0x36ec16,'skillCode':_0x4d329e,'metadata':_0x2ac901};}export function readPushDirectory(_0x38c176,_0x346535,_0x55f024={}){const _0x429c2c=a106_0x5f13,_0x7bb0db=resolvePushDirectoryIdentity(_0x38c176,_0x346535,_0x55f024),_0x4aae0f=_0x7bb0db['dir'],_0x2cfc7c=resolve(_0x4aae0f,SKILL_FILE);if(!existsSync(_0x2cfc7c)||!lstatSync(_0x2cfc7c)[_0x429c2c(0xcb)]())throw CliErrors[_0x429c2c(0xc0)](_0x429c2c(0xed)+SKILL_FILE+':\x20'+_0x2cfc7c);const _0x31a3a2=_0x7bb0db[_0x429c2c(0xfa)],_0x38b9c=_0x55f024[_0x429c2c(0xd3)]??_0x429c2c(0xca);if(!_0x55f024[_0x429c2c(0xc5)]&&_0x31a3a2?.[_0x429c2c(0xe4)]===_0x429c2c(0xd9))throw CliErrors['validation'](_0x429c2c(0xe1)+METADATA_FILE+_0x429c2c(0xf2)+_0x31a3a2[_0x429c2c(0xe4)]+'\x22.');if(!_0x55f024[_0x429c2c(0xc5)]&&_0x38b9c===_0x429c2c(0xca)&&_0x31a3a2?.[_0x429c2c(0xe4)]&&_0x31a3a2[_0x429c2c(0xe4)]!==_0x429c2c(0xca))throw CliErrors[_0x429c2c(0xc0)](_0x429c2c(0xd2)+METADATA_FILE+_0x429c2c(0xf2)+_0x31a3a2[_0x429c2c(0xe4)]+'\x22.',_0x429c2c(0xf6)+_0x4aae0f+_0x429c2c(0xe7));const _0xcaaa33=scanSkillDirectory(_0x4aae0f),_0x8f69d=buildSkillPackage(_0xcaaa33),_0x250c31=readFileSync(_0x2cfc7c,_0x429c2c(0xce)),_0x4405ac=_0x7bb0db['skillCode'],_0x304e8d=_0x55f024['ignoreMetadataForPayload']?undefined:_0x31a3a2,_0x23d161=readSkillDisplayName(_0x250c31);return{'skillCode':_0x4405ac,'metadata':_0x31a3a2,'frontmatterDisplayName':_0x23d161,'input':{'skillCode':_0x4405ac,'skillName':_0x23d161??_0x304e8d?.['skillName'],'description':_0x304e8d?.[_0x429c2c(0xef)],'content':_0x250c31,'files':_0x8f69d[_0x429c2c(0xe5)],'packageBase64':_0x8f69d['packageBase64'],'tags':_0x304e8d?.['tags'],'version':_0x304e8d?.[_0x429c2c(0xc8)],'sourceSessionId':_0x304e8d?.[_0x429c2c(0xcd)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x3ee03f,_0x147ad7,_0xd43f8e,_0x4195d0={}){const _0x3a17f9=a106_0x5f13,_0x119b43=resolvePushDirectoryRoot(_0x3ee03f),_0x363527=readPushMetadataIfPresent(resolve(_0x119b43,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2450cf=requireRemoteScope(_0x147ad7),_0x4f1659=readLocalSkillContent(_0x119b43),_0xf09870={..._0x147ad7,'appCode':_0x147ad7['appCode']??_0xd43f8e,'skillName':_0x147ad7['skillName']??_0x363527?.[_0x3a17f9(0xd7)],'description':_0x147ad7[_0x3a17f9(0xef)]??_0x363527?.['description'],'tags':Array[_0x3a17f9(0xea)](_0x147ad7['tags'])?_0x147ad7[_0x3a17f9(0xde)]:_0x363527?.[_0x3a17f9(0xde)],'sourceSessionId':_0x147ad7[_0x3a17f9(0xcd)]??_0x363527?.[_0x3a17f9(0xcd)],'content':_0x147ad7[_0x3a17f9(0xf3)]??_0x4f1659},_0x4005b1=buildMetadata(_0xf09870,_0x2450cf,_0xd43f8e,contentHash(_0x4f1659),_0x4195d0[_0x3a17f9(0xc6)]);writeJsonAtomic(resolve(_0x119b43,METADATA_FILE),_0x4005b1);}export function recordPushedRuntimeSkill(_0x5aa7c4,_0x527cb0,_0x1eaf27,_0x58b51c={}){const _0x22d082=a106_0x5f13,_0x572c7a=resolvePushDirectoryRoot(_0x5aa7c4),_0xe824a=scanSkillDirectory(_0x572c7a),_0x288cd6=_0xe824a['find'](_0xbd36a3=>_0xbd36a3['path']===SKILL_FILE),_0x157e54=_0x288cd6?fileText(_0x288cd6):'',_0x4af215=tryNormalizePackageManifest(_0x527cb0[_0x22d082(0xdf)]),_0x4da1a8={..._0x527cb0,'content':_0x527cb0[_0x22d082(0xf3)]??_0x157e54,'files':_0x4af215},_0x1e90a8=_0x4af215?normalizeLocalFiles(_0xe824a)[_0x22d082(0xdd)](_0x5316ad=>_0x4af215[_0x22d082(0xdf)]['some'](_0x331ee8=>_0x331ee8[_0x22d082(0xd5)]===_0x5316ad['path'])):undefined,_0x1aa8c5=buildMetadata(_0x4da1a8,_0x58b51c[_0x22d082(0xe4)]??_0x22d082(0xca),_0x1eaf27,contentHash(_0x4da1a8['content']??''),_0x58b51c['pushedAt'],_0x1e90a8);writeJsonAtomic(resolve(_0x572c7a,METADATA_FILE),_0x1aa8c5);}export function deriveSkillCodeFromDirectory(_0x239fc1,_0x558010){const _0x149b2a=a106_0x5f13,_0x209e6e=basename(resolve(_0x239fc1)),_0x439237=_0x558010+'--';return _0x209e6e[_0x149b2a(0xd6)](_0x439237)?_0x209e6e[_0x149b2a(0xf4)](_0x439237[_0x149b2a(0xc7)]):_0x209e6e;}function resolvePushSkillCode(_0x319921,_0x556700,_0x2ffb05,_0x53fe47){const _0x1f3d60=a106_0x5f13,_0x4959f4=deriveSkillCodeFromSkillFile(_0x319921)||deriveSkillCodeFromDirectory(_0x319921,_0x556700);if(_0x53fe47[_0x1f3d60(0xec)])return _0x4959f4;return _0x2ffb05?.[_0x1f3d60(0xeb)]?.[_0x1f3d60(0xf1)]()||_0x4959f4;}function deriveSkillCodeFromSkillFile(_0xf6e40e){const _0x367c46=a106_0x5f13,_0x1a4aff=resolve(_0xf6e40e,SKILL_FILE);if(!existsSync(_0x1a4aff)||!lstatSync(_0x1a4aff)[_0x367c46(0xcb)]())return undefined;const _0x324e70=readFileSync(_0x1a4aff,'utf8'),_0x31e540=_0x324e70[_0x367c46(0xfe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x31e540)return undefined;const _0x11c8a6=parseFrontmatterObject(_0x31e540[0x1]??''),_0x53edb8=scalarToString(_0x11c8a6?.['name']);return _0x53edb8?slugifySkillName(_0x53edb8):undefined;}function readSkillDisplayName(_0x357c6e){const _0x3a7492=a106_0x5f13,_0xd43589=_0x357c6e[_0x3a7492(0xfe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xd43589)return undefined;const _0x55cd9a=parseFrontmatterObject(_0xd43589[0x1]??'');return scalarToString(_0x55cd9a?.[_0x3a7492(0xf7)]);}function slugifySkillName(_0x3cd7a1){const _0x454cc7=a106_0x5f13,_0x1ef3b6=_0x3cd7a1['trim']()['toLowerCase']()[_0x454cc7(0xcc)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x454cc7(0xcc)](/^-+/,'')['replace'](/-+$/,'')[_0x454cc7(0xcc)](/-{2,}/g,'-');if(!_0x1ef3b6)throw CliErrors[_0x454cc7(0xc0)]('Invalid\x20'+SKILL_FILE+_0x454cc7(0xe9));return _0x1ef3b6;}function parseFrontmatterObject(_0x204429){const _0x373a53=a106_0x5f13;try{const _0x28cde0=a106_0xde0447(_0x204429);return _0x28cde0&&typeof _0x28cde0===_0x373a53(0xe2)&&!Array[_0x373a53(0xea)](_0x28cde0)?_0x28cde0:undefined;}catch{return undefined;}}function scalarToString(_0x3a3e18){const _0x4b1074=a106_0x5f13;if(typeof _0x3a3e18===_0x4b1074(0xc2))return _0x3a3e18[_0x4b1074(0xf1)]();if(typeof _0x3a3e18===_0x4b1074(0xda)||typeof _0x3a3e18===_0x4b1074(0xf0))return String(_0x3a3e18);return undefined;}function resolvePushDirectoryRoot(_0x4362ae){const _0x1d5d5f=a106_0x5f13,_0x3e446e=resolve(_0x4362ae);if(!existsSync(_0x3e446e))throw CliErrors[_0x1d5d5f(0xc0)](_0x1d5d5f(0xe0)+_0x4362ae);const _0x53c67b=lstatSync(_0x3e446e);if(_0x53c67b[_0x1d5d5f(0xc1)]())return _0x3e446e;if(_0x53c67b[_0x1d5d5f(0xe6)]()){const _0xac6faf=realpathSync(_0x3e446e);if(lstatSync(_0xac6faf)[_0x1d5d5f(0xc1)]())return _0xac6faf;}throw CliErrors['validation'](_0x1d5d5f(0xe0)+_0x4362ae);}function requireRemoteScope(_0x487bab){const _0x1cc338=a106_0x5f13;if(_0x487bab[_0x1cc338(0xe4)]==='personal'||_0x487bab['scope']==='company'||_0x487bab['scope']==='builtin')return _0x487bab[_0x1cc338(0xe4)];throw CliErrors[_0x1cc338(0xc0)](_0x1cc338(0xfb)+(_0x487bab['skillCode']||_0x1cc338(0xf5))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x487bab['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x59e987){const _0x296f0f=a106_0x5f13,_0x574251=resolve(_0x59e987,SKILL_FILE);return existsSync(_0x574251)&&lstatSync(_0x574251)[_0x296f0f(0xcb)]()?readFileSync(_0x574251,_0x296f0f(0xce)):'';}function readPushMetadataIfPresent(_0x406973,_0x120629={}){const _0x4c2a0c=a106_0x5f13;try{return readMetadataIfPresent(_0x406973);}catch(_0x2c11c2){if(_0x120629[_0x4c2a0c(0xfd)])return undefined;throw _0x2c11c2;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a107_0x2227(){const _0xe37dab=['121874OzFrOU','12987mAmlfV','5PQOKpm','includes','Unsupported\x20runtime\x20Skill\x20scope:\x20','push','13120370OgqbKO','personal','6669752hhkDpu','3655106pWpKKq','company','builtin','3EcShBL','7815402BVqoIx','500hUPQXW','3901770MeylAd','length','11LtsYSi'];a107_0x2227=function(){return _0xe37dab;};return a107_0x2227();}(function(_0x4e5a0b,_0x44bad6){const _0x3e8924=a107_0x464f,_0x51cc6e=_0x4e5a0b();while(!![]){try{const _0x93b40a=-parseInt(_0x3e8924(0x83))/0x1*(parseInt(_0x3e8924(0x89))/0x2)+-parseInt(_0x3e8924(0x8a))/0x3*(-parseInt(_0x3e8924(0x85))/0x4)+parseInt(_0x3e8924(0x8b))/0x5*(-parseInt(_0x3e8924(0x86))/0x6)+-parseInt(_0x3e8924(0x92))/0x7+parseInt(_0x3e8924(0x91))/0x8+-parseInt(_0x3e8924(0x84))/0x9+parseInt(_0x3e8924(0x8f))/0xa*(parseInt(_0x3e8924(0x88))/0xb);if(_0x93b40a===_0x44bad6)break;else _0x51cc6e['push'](_0x51cc6e['shift']());}catch(_0x4bdd93){_0x51cc6e['push'](_0x51cc6e['shift']());}}}(a107_0x2227,0x71187));function a107_0x464f(_0xfdeadd,_0x1416bf){_0xfdeadd=_0xfdeadd-0x83;const _0x222717=a107_0x2227();let _0x464fcc=_0x222717[_0xfdeadd];return _0x464fcc;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x3b302f){const _0x5e08c2=a107_0x464f,_0x598455=_0x3b302f&&_0x3b302f[_0x5e08c2(0x87)]>0x0?_0x3b302f:[_0x5e08c2(0x90),_0x5e08c2(0x93),'builtin'],_0xfbb499=[];for(const _0x30aae0 of _0x598455){if(!isRuntimeSkillScope(_0x30aae0))throw CliErrors['validation'](_0x5e08c2(0x8d)+_0x30aae0);!_0xfbb499[_0x5e08c2(0x8c)](_0x30aae0)&&_0xfbb499[_0x5e08c2(0x8e)](_0x30aae0);}return _0xfbb499;}export function isRuntimeSkillScope(_0x5af264){const _0x183473=a107_0x464f;return _0x5af264===_0x183473(0x90)||_0x5af264===_0x183473(0x93)||_0x5af264===_0x183473(0x94);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a109_0x5769(_0x24c315,_0x35619d){_0x24c315=_0x24c315-0x99;const _0x5cd55a=a109_0x5cd5();let _0x5769dc=_0x5cd55a[_0x24c315];return _0x5769dc;}(function(_0x35c7df,_0x5024a5){const _0x1068fd=a109_0x5769,_0x2b5229=_0x35c7df();while(!![]){try{const _0x326099=parseInt(_0x1068fd(0xa0))/0x1*(-parseInt(_0x1068fd(0x9a))/0x2)+-parseInt(_0x1068fd(0xa9))/0x3+-parseInt(_0x1068fd(0x9f))/0x4+-parseInt(_0x1068fd(0xaa))/0x5*(parseInt(_0x1068fd(0xa3))/0x6)+parseInt(_0x1068fd(0xab))/0x7*(parseInt(_0x1068fd(0x9e))/0x8)+parseInt(_0x1068fd(0x9c))/0x9+parseInt(_0x1068fd(0xa5))/0xa;if(_0x326099===_0x5024a5)break;else _0x2b5229['push'](_0x2b5229['shift']());}catch(_0x51d9fe){_0x2b5229['push'](_0x2b5229['shift']());}}}(a109_0x5cd5,0x3d457));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0x1a71fa){const _0x2848f2={};for(const _0x4e5d2c of normalizeLocalFiles(_0x1a71fa)){_0x2848f2[_0x4e5d2c['path']]=fileContent(_0x4e5d2c);}return Buffer['from'](zipSync(_0x2848f2,{'level':0x0,'mtime':ZIP_MTIME}));}function a109_0x5cd5(){const _0x21225a=['1343080ygsIxs','204593ekpBTM','from','sort','955752OlZvwc','object','10755780JjRVQe','map','length','validation_error','258561zSwHMf','15xjjWBh','392ehxwCn','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','endsWith','2jbTlkd','validation','2071791YePmoW','code','7088CuNlSK'];a109_0x5cd5=function(){return _0x21225a;};return a109_0x5cd5();}export function parseZipPackage(_0x1bce5b){const _0x4eb972=a109_0x5769;if(_0x1bce5b[_0x4eb972(0xa7)]<0x16)throw CliErrors[_0x4eb972(0x9b)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x366702;try{_0x366702=unzipSync(_0x1bce5b,{'filter'(_0x473971){const _0x3bfba0=_0x4eb972,_0x55d378=normalizeSkillRelativePath(_0x473971['name']);if(_0x55d378[_0x3bfba0(0x99)]('/'))throw CliErrors[_0x3bfba0(0x9b)](_0x3bfba0(0xac)+_0x55d378);return!![];}});}catch(_0x4203e2){if(isRuntimeSkillValidationError(_0x4203e2))throw _0x4203e2;throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object['entries'](_0x366702)[_0x4eb972(0xa6)](([_0x467eeb,_0x20dd35])=>({'path':normalizeSkillRelativePath(_0x467eeb),'bytes':Buffer[_0x4eb972(0xa1)](_0x20dd35)}))[_0x4eb972(0xa2)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x454108){const _0x1d3f4e=a109_0x5769;return typeof _0x454108===_0x1d3f4e(0xa4)&&_0x454108!==null&&'code'in _0x454108&&_0x454108[_0x1d3f4e(0x9d)]===_0x1d3f4e(0xa8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x536d47,_0x3e82b6){const _0x1c507f=a110_0x5646,_0x2a8c15=_0x536d47();while(!![]){try{const _0x336f9b=-parseInt(_0x1c507f(0x19c))/0x1+-parseInt(_0x1c507f(0x191))/0x2*(-parseInt(_0x1c507f(0x196))/0x3)+parseInt(_0x1c507f(0x195))/0x4+-parseInt(_0x1c507f(0x18e))/0x5+-parseInt(_0x1c507f(0x183))/0x6+-parseInt(_0x1c507f(0x181))/0x7*(-parseInt(_0x1c507f(0x192))/0x8)+parseInt(_0x1c507f(0x190))/0x9;if(_0x336f9b===_0x3e82b6)break;else _0x2a8c15['push'](_0x2a8c15['shift']());}catch(_0x475936){_0x2a8c15['push'](_0x2a8c15['shift']());}}}(a110_0xbf45,0x56561));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x3b3ac6){const _0x51baa5=a110_0x5646,_0x2c0c58=normalizeLocalFiles(_0x3b3ac6);if(!_0x2c0c58[_0x51baa5(0x197)](_0x3e35fa=>_0x3e35fa['path']===SKILL_FILE))throw CliErrors[_0x51baa5(0x1a1)]('Missing\x20'+SKILL_FILE+_0x51baa5(0x18c));const _0x50babd=localFilesToManifestFiles(_0x2c0c58),_0x63ed4b=createDeterministicZipPackage(_0x2c0c58);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x50babd),'zipSha256':bufferSha256(_0x63ed4b),'zipSize':_0x63ed4b[_0x51baa5(0x1a4)],'files':_0x50babd},'packageBytes':_0x63ed4b,'packageBase64':_0x63ed4b['toString'](_0x51baa5(0x186))};}export function verifyRuntimeSkillPackage(_0x37d771,_0x546895){const _0x59a8fb=a110_0x5646,_0x3504e2=normalizePackageManifest(_0x37d771,{'requireOssPath':![]});if(!_0x3504e2)throw CliErrors['validation'](_0x59a8fb(0x19a));return extractAndVerifyPackage(_0x3504e2,_0x546895);}export function verifyRuntimeSkillBundle(_0x743e5a,_0x52cfd6){const _0x134e67=a110_0x5646,_0x40211c=normalizePackageManifest(_0x743e5a,{'requireOssPath':![]});if(!_0x40211c)throw CliErrors[_0x134e67(0x1a1)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x40211c,_0x52cfd6);}function a110_0xbf45(){const _0x1f9dbd=['Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','string','length','toLowerCase','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','4179cQEoTQ','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','2881578Qlyyid','isArray','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','base64','files','ossPath','Runtime\x20Skill\x20package\x20is\x20missing\x20','push','Runtime\x20Skill\x20package\x20size\x20mismatch.','\x20in\x20Skill\x20file\x20package.','has','115200JMNGvR','bytes','329652pXorrl','38oMIVtw','8312ywFnoa','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','zipSize','2148156PihmsN','6666anuFuf','some','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','trim','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','zipSha256','379232DVbCui','path','treeSha256','map','isSafeInteger','validation'];a110_0xbf45=function(){return _0x1f9dbd;};return a110_0xbf45();}export function tryNormalizePackageManifest(_0x3a5952){return normalizePackageManifest(_0x3a5952,{'requireOssPath':![]});}export function requirePackageBytes(_0x2a55ae,_0x21563d){const _0xd304ef=a110_0x5646;if(!_0x21563d||_0x21563d[_0xd304ef(0x1a4)]===0x0)throw CliErrors[_0xd304ef(0x1a1)]('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x2a55ae);return _0x21563d;}export function extractDownloadedPackage(_0x441208){const _0x2984f9=a110_0x5646,_0xe88512=parseZipPackage(_0x441208)[_0x2984f9(0x19f)](_0xc0fc53=>({'path':_0xc0fc53['path'],'bytes':_0xc0fc53[_0x2984f9(0x18f)]}));if(!_0xe88512[_0x2984f9(0x197)](_0x56a196=>_0x56a196['path']===SKILL_FILE))throw CliErrors['validation'](_0x2984f9(0x189)+SKILL_FILE+'.');return normalizeLocalFiles(_0xe88512);}export function localFilesToManifestFiles(_0x246e58){const _0x15194a=a110_0x5646;return normalizeLocalFiles(_0x246e58)[_0x15194a(0x19f)](_0x323c01=>({'path':_0x323c01[_0x15194a(0x19d)],'sha256':fileHash(_0x323c01),'size':fileContent(_0x323c01)['length']}));}function normalizePackageManifest(_0x361a77,_0x1613b3){const _0x29fdd1=a110_0x5646;if(!_0x361a77||typeof _0x361a77!=='object'||Array['isArray'](_0x361a77))return undefined;const _0x5861ef=_0x361a77,_0x4448b7=typeof _0x5861ef[_0x29fdd1(0x188)]===_0x29fdd1(0x1a3)?_0x5861ef[_0x29fdd1(0x188)][_0x29fdd1(0x199)]():undefined;if(_0x1613b3['requireOssPath']&&!_0x4448b7)return undefined;if(!Array[_0x29fdd1(0x184)](_0x5861ef[_0x29fdd1(0x187)])||_0x5861ef[_0x29fdd1(0x187)]['length']===0x0)return undefined;if(!isSha256Hex(_0x5861ef['treeSha256']))throw CliErrors[_0x29fdd1(0x1a1)](_0x29fdd1(0x17f));if(!isSha256Hex(_0x5861ef[_0x29fdd1(0x19b)]))throw CliErrors[_0x29fdd1(0x1a1)](_0x29fdd1(0x180));if(!Number[_0x29fdd1(0x1a0)](_0x5861ef[_0x29fdd1(0x194)])||_0x5861ef[_0x29fdd1(0x194)]<0x0)throw CliErrors['validation'](_0x29fdd1(0x1a2));const _0x2e305c=normalizeManifestFiles(_0x5861ef['files']);if(!_0x2e305c['some'](_0x3d26ab=>_0x3d26ab[_0x29fdd1(0x19d)]===SKILL_FILE))throw CliErrors['validation'](_0x29fdd1(0x198)+SKILL_FILE+'.');const _0x4a25ec=fileTreeHash(_0x2e305c);if(_0x4a25ec!==_0x5861ef[_0x29fdd1(0x19e)]['toLowerCase']())throw CliErrors[_0x29fdd1(0x1a1)](_0x29fdd1(0x193));return{'schemaVersion':Number[_0x29fdd1(0x1a0)](_0x5861ef['schemaVersion'])?_0x5861ef['schemaVersion']:0x2,'ossPath':_0x4448b7,'treeSha256':_0x4a25ec,'zipSha256':_0x5861ef['zipSha256'][_0x29fdd1(0x17e)](),'zipSize':_0x5861ef[_0x29fdd1(0x194)],'files':_0x2e305c};}function extractAndVerifyPackage(_0x43f708,_0x229574){const _0x59bb74=a110_0x5646,_0x236834=normalizePackageManifest(_0x43f708,{'requireOssPath':![]});if(!_0x236834)throw CliErrors[_0x59bb74(0x1a1)](_0x59bb74(0x19a));if(_0x229574[_0x59bb74(0x1a4)]!==_0x236834['zipSize'])throw CliErrors[_0x59bb74(0x1a1)](_0x59bb74(0x18b));const _0x26dd11=bufferSha256(_0x229574);if(_0x26dd11!==_0x236834[_0x59bb74(0x19b)])throw CliErrors[_0x59bb74(0x1a1)]('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x236834,_0x229574);}function a110_0x5646(_0x3b74ab,_0x4c5c54){_0x3b74ab=_0x3b74ab-0x17e;const _0xbf453b=a110_0xbf45();let _0x5646e1=_0xbf453b[_0x3b74ab];return _0x5646e1;}function extractAndVerifyPackageFiles(_0x7ac61b,_0x336e7b){const _0x37a32c=a110_0x5646,_0x361a14=parseZipPackage(_0x336e7b);if(_0x361a14[_0x37a32c(0x1a4)]!==_0x7ac61b[_0x37a32c(0x187)]['length'])throw CliErrors[_0x37a32c(0x1a1)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x17851b=new Map();for(const _0x4cc45a of _0x361a14){if(_0x17851b[_0x37a32c(0x18d)](_0x4cc45a[_0x37a32c(0x19d)]))throw CliErrors[_0x37a32c(0x1a1)]('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x4cc45a['path']);_0x17851b['set'](_0x4cc45a[_0x37a32c(0x19d)],_0x4cc45a);}const _0x2ada46=[];for(const _0x34d465 of _0x7ac61b['files']){const _0x5366e1=_0x17851b['get'](_0x34d465[_0x37a32c(0x19d)]);if(!_0x5366e1)throw CliErrors[_0x37a32c(0x1a1)](_0x37a32c(0x185)+_0x34d465[_0x37a32c(0x19d)]);if(_0x5366e1['bytes'][_0x37a32c(0x1a4)]!==_0x34d465['size'])throw CliErrors['validation'](_0x37a32c(0x182)+_0x34d465['path']);const _0x2c8e0b=bufferSha256(_0x5366e1[_0x37a32c(0x18f)]);if(_0x2c8e0b!==_0x34d465['sha256'])throw CliErrors[_0x37a32c(0x1a1)]('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x34d465[_0x37a32c(0x19d)]);_0x2ada46[_0x37a32c(0x18a)]({'path':_0x34d465['path'],'bytes':_0x5366e1[_0x37a32c(0x18f)]});}return normalizeLocalFiles(_0x2ada46);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4bd59c,_0x13c7a9){var _0x1ed40b=a111_0x1f90,_0x2b60f5=_0x4bd59c();while(!![]){try{var _0x3773e0=-parseInt(_0x1ed40b(0x1d5))/0x1*(-parseInt(_0x1ed40b(0x1d7))/0x2)+parseInt(_0x1ed40b(0x1d3))/0x3*(parseInt(_0x1ed40b(0x1d2))/0x4)+parseInt(_0x1ed40b(0x1d0))/0x5*(parseInt(_0x1ed40b(0x1cb))/0x6)+-parseInt(_0x1ed40b(0x1cd))/0x7*(-parseInt(_0x1ed40b(0x1d1))/0x8)+parseInt(_0x1ed40b(0x1cf))/0x9*(-parseInt(_0x1ed40b(0x1d4))/0xa)+parseInt(_0x1ed40b(0x1ce))/0xb+parseInt(_0x1ed40b(0x1d6))/0xc*(-parseInt(_0x1ed40b(0x1cc))/0xd);if(_0x3773e0===_0x13c7a9)break;else _0x2b60f5['push'](_0x2b60f5['shift']());}catch(_0x349ae6){_0x2b60f5['push'](_0x2b60f5['shift']());}}}(a111_0x34f2,0x25ddc));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';function a111_0x34f2(){var _0x3b4874=['21fZNfQf','651970hKGOls','18xONmfZ','677595TYySuy','344944VxHCIm','789212fleqWd','3UvhuAA','1496230EqbRsD','1XfRAYJ','252aroDma','556658EPmRdW','6CFOzeH','213837MTSlOZ'];a111_0x34f2=function(){return _0x3b4874;};return a111_0x34f2();}export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a111_0x1f90(_0x52689d,_0x18ca24){_0x52689d=_0x52689d-0x1cb;var _0x34f2e6=a111_0x34f2();var _0x1f90f5=_0x34f2e6[_0x52689d];return _0x1f90f5;}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,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb680ca,_0x573af1){const _0x39eb9b=a112_0x1821,_0x2d5302=_0xb680ca();while(!![]){try{const _0x2c1c51=-parseInt(_0x39eb9b(0x140))/0x1*(parseInt(_0x39eb9b(0x145))/0x2)+-parseInt(_0x39eb9b(0x142))/0x3+parseInt(_0x39eb9b(0x13f))/0x4*(parseInt(_0x39eb9b(0x141))/0x5)+-parseInt(_0x39eb9b(0x13d))/0x6+parseInt(_0x39eb9b(0x146))/0x7*(-parseInt(_0x39eb9b(0x13e))/0x8)+parseInt(_0x39eb9b(0x144))/0x9+parseInt(_0x39eb9b(0x143))/0xa;if(_0x2c1c51===_0x573af1)break;else _0x2d5302['push'](_0x2d5302['shift']());}catch(_0x262ed3){_0x2d5302['push'](_0x2d5302['shift']());}}}(a112_0x33fa,0x65d26));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a112_0x1821(_0x12d875,_0x35b8ce){_0x12d875=_0x12d875-0x13d;const _0x33fa09=a112_0x33fa();let _0x182105=_0x33fa09[_0x12d875];return _0x182105;}function a112_0x33fa(){const _0x2be85a=['5823zTBcpR','1961585NkmdWp','579369ywRoOn','16139380DtmPtK','286227FLtNMD','140JQBYWB','3704659yBjdeR','2946156vkfbOd','8DMhpDN','4BQvOnO'];a112_0x33fa=function(){return _0x2be85a;};return a112_0x33fa();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a113_0x4216be=a113_0x1f81;(function(_0x2ec3a6,_0x5916ae){const _0x2b63e6=a113_0x1f81,_0x1b4ced=_0x2ec3a6();while(!![]){try{const _0x11bf0a=parseInt(_0x2b63e6(0x159))/0x1*(parseInt(_0x2b63e6(0x14d))/0x2)+-parseInt(_0x2b63e6(0x14c))/0x3+-parseInt(_0x2b63e6(0x16a))/0x4+parseInt(_0x2b63e6(0x16e))/0x5+parseInt(_0x2b63e6(0x167))/0x6+parseInt(_0x2b63e6(0x160))/0x7+-parseInt(_0x2b63e6(0x15b))/0x8;if(_0x11bf0a===_0x5916ae)break;else _0x1b4ced['push'](_0x1b4ced['shift']());}catch(_0x5e8bd4){_0x1b4ced['push'](_0x1b4ced['shift']());}}}(a113_0x4648,0xd4f10));import a113_0x3a6f2f from'winston';function a113_0x1f81(_0x30b5b2,_0x47a9b6){_0x30b5b2=_0x30b5b2-0x13d;const _0x464893=a113_0x4648();let _0x1f81bd=_0x464893[_0x30b5b2];return _0x1f81bd;}import a113_0x523f1a from'node:fs';function a113_0x4648(){const _0x56f661=['winstonLogger','dirname','yellow','command','1TpakSU','timestamp','2665424AiUbLH','readFileSync','printf','stringify','logTask','5809524enjudZ','clear','currentRawCommand','unknown','log','utf8','now','6612234VVVLVV','toISOString','clearLogs','6295668goHNDW','Failed\x20to\x20clear\x20logs:','message','filter','6088235yIkkko','Failed\x20to\x20read\x20logs:','addColors','parse','Completed:\x20','mkdirSync','Starting:\x20','join','red','setLogPath','getWinstonInstance','info','trim','error','details','writeFileSync','level','blue','combine','transports','warn','setRawCommand','logFileName','3433302aHCOnu','1548238wbqxOn','Failed:\x20','existsSync','format','logFilePath','initWinstonLogger','success','rawCommand'];a113_0x4648=function(){return _0x56f661;};return a113_0x4648();}import a113_0x247326 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a113_0x4216be(0x155)];[a113_0x4216be(0x151)]='';[a113_0x4216be(0x162)]='';constructor(){}[a113_0x4216be(0x14a)](_0x523ec2){const _0x5c1fa6=a113_0x4216be;this[_0x5c1fa6(0x162)]=_0x523ec2;}[a113_0x4216be(0x13e)](_0x46a9eb){const _0x5607e7=a113_0x4216be;this[_0x5607e7(0x151)]=a113_0x247326[_0x5607e7(0x175)](_0x46a9eb,PRODUCT_CONFIG[_0x5607e7(0x14b)]),this[_0x5607e7(0x155)]&&this[_0x5607e7(0x155)][_0x5607e7(0x161)](),this[_0x5607e7(0x152)]();}[a113_0x4216be(0x152)](){const _0x47b13a=a113_0x4216be,_0x5884de=a113_0x247326[_0x47b13a(0x156)](this[_0x47b13a(0x151)]);!a113_0x523f1a[_0x47b13a(0x14f)](_0x5884de)&&a113_0x523f1a[_0x47b13a(0x173)](_0x5884de,{'recursive':!![]});const _0x3b7530=a113_0x3a6f2f[_0x47b13a(0x150)][_0x47b13a(0x147)](a113_0x3a6f2f[_0x47b13a(0x150)][_0x47b13a(0x15a)](),a113_0x3a6f2f[_0x47b13a(0x150)]['errors']({'stack':!![]}),a113_0x3a6f2f[_0x47b13a(0x150)][_0x47b13a(0x15d)](_0x27dbd3=>{const _0x1f063b=_0x47b13a,_0x3be3fb={'timestamp':_0x27dbd3[_0x1f063b(0x15a)]||new Date()[_0x1f063b(0x168)](),'level':_0x27dbd3[_0x1f063b(0x145)]||_0x1f063b(0x140),'command':_0x27dbd3[_0x1f063b(0x158)]||_0x1f063b(0x163),'rawCommand':_0x27dbd3[_0x1f063b(0x154)]||this['currentRawCommand']||undefined,'message':_0x27dbd3[_0x1f063b(0x16c)]||'','duration':_0x27dbd3['duration']||undefined,'details':_0x27dbd3[_0x1f063b(0x143)]||undefined};return JSON[_0x1f063b(0x15e)](_0x3be3fb);}));this[_0x47b13a(0x155)]=a113_0x3a6f2f['createLogger']({'level':_0x47b13a(0x140),'format':_0x3b7530,'transports':[new a113_0x3a6f2f[(_0x47b13a(0x148))]['File']({'filename':this[_0x47b13a(0x151)],'level':_0x47b13a(0x140)})],'silent':![]}),a113_0x3a6f2f[_0x47b13a(0x170)]({'success':'green','error':_0x47b13a(0x13d),'warn':_0x47b13a(0x157),'info':_0x47b13a(0x146)});}[a113_0x4216be(0x140)](_0x26e590,_0x58e4d5,_0x58258e){const _0x405e46=a113_0x4216be;if(!this[_0x405e46(0x151)]||!this[_0x405e46(0x155)])return;this[_0x405e46(0x155)][_0x405e46(0x140)](_0x58e4d5,{'command':_0x26e590,'details':_0x58258e});}[a113_0x4216be(0x153)](_0xbd5258,_0x4660ec,_0x3f6f9c,_0x237910){const _0x4f8f58=a113_0x4216be;if(!this[_0x4f8f58(0x151)]||!this[_0x4f8f58(0x155)])return;this[_0x4f8f58(0x155)][_0x4f8f58(0x164)](_0x4f8f58(0x140),_0x4660ec,{'level':_0x4f8f58(0x153),'command':_0xbd5258,'duration':_0x3f6f9c,'details':_0x237910});}[a113_0x4216be(0x142)](_0x2c8766,_0x27a8a3,_0x140cb8){const _0x3fb31e=a113_0x4216be;if(!this[_0x3fb31e(0x151)]||!this['winstonLogger'])return;this[_0x3fb31e(0x155)]['error'](_0x27a8a3,{'command':_0x2c8766,'details':_0x140cb8});}[a113_0x4216be(0x149)](_0x4bb5ef,_0x2eb075,_0x29c360){const _0x22424d=a113_0x4216be;if(!this[_0x22424d(0x151)]||!this[_0x22424d(0x155)])return;this['winstonLogger'][_0x22424d(0x149)](_0x2eb075,{'command':_0x4bb5ef,'details':_0x29c360});}async[a113_0x4216be(0x15f)](_0x34660b,_0x5c949f,_0x4f4513){const _0x590e57=a113_0x4216be,_0x4be486=Date['now']();this[_0x590e57(0x140)](_0x34660b,_0x590e57(0x174)+_0x5c949f);try{const _0x497398=await _0x4f4513(),_0x486f3b=Date[_0x590e57(0x166)]()-_0x4be486;return this[_0x590e57(0x153)](_0x34660b,_0x590e57(0x172)+_0x5c949f,_0x486f3b),_0x497398;}catch(_0x35a7b4){const _0x27226c=Date[_0x590e57(0x166)]()-_0x4be486;this['error'](_0x34660b,_0x590e57(0x14e)+_0x5c949f,{'error':_0x35a7b4 instanceof Error?_0x35a7b4['message']:String(_0x35a7b4),'duration':_0x27226c});throw _0x35a7b4;}}['readLogs'](){const _0x5a553f=a113_0x4216be;try{if(!a113_0x523f1a['existsSync'](this['logFilePath']))return[];const _0x3492a1=a113_0x523f1a[_0x5a553f(0x15c)](this['logFilePath'],_0x5a553f(0x165));return _0x3492a1['split'](/\r?\n/)[_0x5a553f(0x16d)](_0x57e576=>_0x57e576[_0x5a553f(0x141)]())['map'](_0x32b1ae=>JSON[_0x5a553f(0x171)](_0x32b1ae));}catch(_0x5873a9){return console[_0x5a553f(0x149)](_0x5a553f(0x16f),_0x5873a9),[];}}[a113_0x4216be(0x169)](){const _0x2d887f=a113_0x4216be;try{a113_0x523f1a['existsSync'](this[_0x2d887f(0x151)])&&a113_0x523f1a[_0x2d887f(0x144)](this[_0x2d887f(0x151)],'',_0x2d887f(0x165));}catch(_0x4c0df3){console[_0x2d887f(0x149)](_0x2d887f(0x16b),_0x4c0df3);}}[a113_0x4216be(0x13f)](){const _0x4ebd2f=a113_0x4216be;return this[_0x4ebd2f(0x155)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x33659a=a114_0x2b8a;(function(_0x54a244,_0x2f0f73){const _0x3b3f3f=a114_0x2b8a,_0x36b7ba=_0x54a244();while(!![]){try{const _0x598d5e=parseInt(_0x3b3f3f(0x1f1))/0x1*(-parseInt(_0x3b3f3f(0x1f2))/0x2)+parseInt(_0x3b3f3f(0x1fb))/0x3*(parseInt(_0x3b3f3f(0x1e7))/0x4)+-parseInt(_0x3b3f3f(0x1ee))/0x5+-parseInt(_0x3b3f3f(0x1ef))/0x6+parseInt(_0x3b3f3f(0x1f8))/0x7+-parseInt(_0x3b3f3f(0x1ec))/0x8*(-parseInt(_0x3b3f3f(0x1f7))/0x9)+parseInt(_0x3b3f3f(0x1e8))/0xa;if(_0x598d5e===_0x2f0f73)break;else _0x36b7ba['push'](_0x36b7ba['shift']());}catch(_0x4864df){_0x36b7ba['push'](_0x36b7ba['shift']());}}}(a114_0x172b,0x947de));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a114_0x33659a(0x1fa)]),MIN_SAFE_INTEGER=BigInt(Number[a114_0x33659a(0x1f4)]);function a114_0x2b8a(_0x365105,_0x5eba68){_0x365105=_0x365105-0x1e7;const _0x172b14=a114_0x172b();let _0x2b8a04=_0x172b14[_0x365105];return _0x2b8a04;}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x2fd730){const _0x12485c=a114_0x33659a;if(_0x2fd730['includes']('.')||_0x2fd730[_0x12485c(0x1f0)]('e')||_0x2fd730['includes']('E'))return![];const _0x24c284=BigInt(_0x2fd730);return _0x24c284>MAX_SAFE_INTEGER||_0x24c284<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x63e94d){const _0x40e4a6=a114_0x33659a;let _0x13d12a='',_0x4a12d6=![],_0x266259=![];for(let _0x388f23=0x0;_0x388f23<_0x63e94d['length'];){const _0x4e72ce=_0x63e94d[_0x388f23];if(_0x4a12d6){_0x13d12a+=_0x4e72ce,_0x388f23+=0x1;if(_0x266259)_0x266259=![];else{if(_0x4e72ce==='\x5c')_0x266259=!![];else _0x4e72ce==='\x22'&&(_0x4a12d6=![]);}continue;}if(_0x4e72ce==='\x22'){_0x4a12d6=!![],_0x13d12a+=_0x4e72ce,_0x388f23+=0x1;continue;}if(_0x4e72ce==='-'||_0x4e72ce>='0'&&_0x4e72ce<='9'){const _0x121950=JSON_NUMBER_PATTERN[_0x40e4a6(0x1f6)](_0x63e94d['slice'](_0x388f23))?.[0x0];if(_0x121950){_0x13d12a+=isUnsafeIntegerLiteral(_0x121950)?'\x22'+_0x121950+'\x22':_0x121950,_0x388f23+=_0x121950[_0x40e4a6(0x1ea)];continue;}}_0x13d12a+=_0x4e72ce,_0x388f23+=0x1;}return _0x13d12a;}export function parseLosslessJson(_0x2482be){const _0x3e50ff=a114_0x33659a;return JSON[_0x3e50ff(0x1ed)](quoteUnsafeIntegerLiterals(_0x2482be));}export function installLosslessJsonResponseParser(){const _0x4567ba=a114_0x33659a;if(typeof Response===_0x4567ba(0x1e9))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response['prototype'],originalResponseJsonDescriptor=Object[_0x4567ba(0x1eb)](responseJsonPrototype,_0x4567ba(0x1f9)),Object[_0x4567ba(0x1f3)](responseJsonPrototype,_0x4567ba(0x1f9),{'configurable':!![],'enumerable':![],'value':async function _0x2ea2b7(){const _0x44a99c=_0x4567ba;return parseLosslessJson(await this[_0x44a99c(0x1f5)]());},'writable':!![]}),restoreResponseJsonParser=()=>{const _0x32677e=_0x4567ba;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x32677e(0x1f3)](responseJsonPrototype,'json',originalResponseJsonDescriptor):delete responseJsonPrototype[_0x32677e(0x1f9)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}function a114_0x172b(){const _0x1bee59=['MAX_SAFE_INTEGER','1401VzRXaz','964CfNepf','9393390PidRLe','undefined','length','getOwnPropertyDescriptor','8xDmtKU','parse','3115725JFhbqH','2354832xEXJyh','includes','99539NtHTis','2RewijZ','defineProperty','MIN_SAFE_INTEGER','text','exec','4788477DtuMGY','976073JCPkbS','json'];a114_0x172b=function(){return _0x1bee59;};return a114_0x172b();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4d544d,_0x4308fe){const _0x28e538=a115_0x3dd2,_0x14b327=_0x4d544d();while(!![]){try{const _0x37f6c2=-parseInt(_0x28e538(0xcf))/0x1+parseInt(_0x28e538(0xca))/0x2*(-parseInt(_0x28e538(0xd2))/0x3)+-parseInt(_0x28e538(0xcd))/0x4*(parseInt(_0x28e538(0xe0))/0x5)+parseInt(_0x28e538(0xde))/0x6+parseInt(_0x28e538(0xd0))/0x7+-parseInt(_0x28e538(0xd3))/0x8*(parseInt(_0x28e538(0xcc))/0x9)+parseInt(_0x28e538(0xe1))/0xa;if(_0x37f6c2===_0x4308fe)break;else _0x14b327['push'](_0x14b327['shift']());}catch(_0x5abab9){_0x14b327['push'](_0x14b327['shift']());}}}(a115_0x2de2,0x38a94));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x74685a){const _0x111b17=a115_0x3dd2;if(!_0x74685a)return undefined;try{return parseLosslessJson(_0x74685a);}catch{throw CliErrors[_0x111b17(0xd5)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x74685a);}}function a115_0x2de2(){const _0x165b29=['3170615vVLpoN','test','6QCdHzd','8FORiiT','Invalid\x20JSON\x20for\x20--params:\x20','validation','string','isSafeInteger','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','data\x20update\x20can\x20update\x20at\x20most\x20','join','\x20records\x20per\x20call;\x20received\x20','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','1524858iHiEyx','isArray','1441325BaaqcA','2844770RgtHal','id[','items','number','map','length','8882qVkxiV','object','1488663vRpKeM','4BjHqvW','data\x20update\x20--params.','296927OXfenZ'];a115_0x2de2=function(){return _0x165b29;};return a115_0x2de2();}export function parseJsonParamsValue(_0x227f57){const _0x40ce92=a115_0x3dd2;if(!_0x227f57)return undefined;try{return parseLosslessJson(_0x227f57);}catch{throw CliErrors['validation'](_0x40ce92(0xd4)+_0x227f57);}}export function parseBatchCreateItemsFromParams(_0x4ade00){const _0xc81bf4=a115_0x3dd2;if(Array[_0xc81bf4(0xdf)](_0x4ade00))return _0x4ade00;if(_0x4ade00!==null&&_0x4ade00!==undefined&&typeof _0x4ade00===_0xc81bf4(0xcb)&&Array[_0xc81bf4(0xdf)](_0x4ade00[_0xc81bf4(0xe3)]))return _0x4ade00[_0xc81bf4(0xe3)];throw CliErrors[_0xc81bf4(0xd5)]('batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}',_0xc81bf4(0xdd));}function parseDataUpdateId(_0x34b477,_0x147cc1){const _0x1f32d5=a115_0x3dd2;if(typeof _0x34b477===_0x1f32d5(0xc7)&&Number[_0x1f32d5(0xd7)](_0x34b477)&&_0x34b477>0x0)return _0x34b477;if(typeof _0x34b477===_0x1f32d5(0xd6)){if(/^[1-9]\d*$/[_0x1f32d5(0xd1)](_0x34b477))return _0x34b477;}throw CliErrors[_0x1f32d5(0xd5)](_0x1f32d5(0xce)+_0x147cc1+'\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.');}function a115_0x3dd2(_0x2692e3,_0x4901f3){_0x2692e3=_0x2692e3-0xc7;const _0x2de29c=a115_0x2de2();let _0x3dd20c=_0x2de29c[_0x2692e3];return _0x3dd20c;}export function parseUpdateIdsFromParams(_0x5af0c9){const _0x2605a4=a115_0x3dd2;if(_0x5af0c9===null||_0x5af0c9===undefined||typeof _0x5af0c9!==_0x2605a4(0xcb)||Array[_0x2605a4(0xdf)](_0x5af0c9))throw CliErrors[_0x2605a4(0xd5)](_0x2605a4(0xdc),'Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0x4b6ed9=_0x5af0c9['id'];if(_0x4b6ed9===undefined||_0x4b6ed9===null)throw CliErrors[_0x2605a4(0xd5)]('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.',_0x2605a4(0xd8));const _0x111c96=Array[_0x2605a4(0xdf)](_0x4b6ed9)?_0x4b6ed9:[_0x4b6ed9];if(_0x111c96['length']===0x0)throw CliErrors['validation']('data\x20update\x20id\x20array\x20cannot\x20be\x20empty.');if(_0x111c96[_0x2605a4(0xc9)]>MAX_DATA_UPDATE_IDS)throw CliErrors['validation'](_0x2605a4(0xd9)+MAX_DATA_UPDATE_IDS+_0x2605a4(0xdb)+_0x111c96[_0x2605a4(0xc9)]+'.');return _0x111c96[_0x2605a4(0xc8)]((_0x50e8a7,_0x578d40)=>parseDataUpdateId(_0x50e8a7,Array[_0x2605a4(0xdf)](_0x4b6ed9)?_0x2605a4(0xe2)+_0x578d40+']':'id'));}export function normalizeUpdateParamsForRuntime(_0xd1c223,_0x2e542f){const _0x4d8f94=a115_0x3dd2;if(Array[_0x4d8f94(0xdf)](_0xd1c223['id'])&&_0x2e542f[_0x4d8f94(0xc9)]>0x1)return{..._0xd1c223,'id':_0x2e542f[_0x4d8f94(0xda)](',')};return _0xd1c223;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a116_0x362d91=a116_0x3ee2;function a116_0x3ee2(_0x188162,_0x5686f7){_0x188162=_0x188162-0x1c7;const _0x328011=a116_0x3280();let _0x3ee2b9=_0x328011[_0x188162];return _0x3ee2b9;}function a116_0x3280(){const _0x17a2ce=['platform','27yRkYFM','1515732EBJPJm','1953570tWvRiG','win32','1ujGNKC','1245981cObkva','672510ROsQBd','3777160ircjOI','211908QzqNzG','.cmd','20jThDwB','6233094fDIwiB'];a116_0x3280=function(){return _0x17a2ce;};return a116_0x3280();}(function(_0x10eab8,_0x55a8aa){const _0x2761c5=a116_0x3ee2,_0x2f17a4=_0x10eab8();while(!![]){try{const _0xd7931f=-parseInt(_0x2761c5(0x1c8))/0x1*(-parseInt(_0x2761c5(0x1ca))/0x2)+parseInt(_0x2761c5(0x1c9))/0x3+-parseInt(_0x2761c5(0x1cc))/0x4*(-parseInt(_0x2761c5(0x1ce))/0x5)+-parseInt(_0x2761c5(0x1d2))/0x6+parseInt(_0x2761c5(0x1cf))/0x7+-parseInt(_0x2761c5(0x1cb))/0x8+-parseInt(_0x2761c5(0x1d1))/0x9*(parseInt(_0x2761c5(0x1d3))/0xa);if(_0xd7931f===_0x55a8aa)break;else _0x2f17a4['push'](_0x2f17a4['shift']());}catch(_0x54e9c1){_0x2f17a4['push'](_0x2f17a4['shift']());}}}(a116_0x3280,0x84976));export const isWindows=process[a116_0x362d91(0x1d0)]===a116_0x362d91(0x1c7);export function resolveNpmBin(_0x4a4710){const _0x592375=a116_0x362d91;return isWindows?_0x4a4710+_0x592375(0x1cd):_0x4a4710;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c6fec,_0x28267e){const _0x4d8b6a=a117_0x2884,_0x92d450=_0x3c6fec();while(!![]){try{const _0x2ed047=parseInt(_0x4d8b6a(0x167))/0x1*(parseInt(_0x4d8b6a(0x15e))/0x2)+-parseInt(_0x4d8b6a(0x145))/0x3+-parseInt(_0x4d8b6a(0x166))/0x4+-parseInt(_0x4d8b6a(0x155))/0x5*(parseInt(_0x4d8b6a(0x14a))/0x6)+-parseInt(_0x4d8b6a(0x15a))/0x7*(-parseInt(_0x4d8b6a(0x157))/0x8)+parseInt(_0x4d8b6a(0x164))/0x9*(parseInt(_0x4d8b6a(0x15b))/0xa)+-parseInt(_0x4d8b6a(0x160))/0xb;if(_0x2ed047===_0x28267e)break;else _0x92d450['push'](_0x92d450['shift']());}catch(_0x574e6b){_0x92d450['push'](_0x92d450['shift']());}}}(a117_0x5f45,0x92567));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(_0x213439){const _0x5a6a7a=a117_0x2884,_0x3a9921=_0x213439['trim']()[_0x5a6a7a(0x14e)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x3a9921)return null;return{'major':Number(_0x3a9921[0x1]),'minor':Number(_0x3a9921[0x2]),'patch':Number(_0x3a9921[0x3]),'prerelease':_0x3a9921[0x4]};}function compareSemver(_0x362c4d,_0x290fc2){const _0x2a6a9b=a117_0x2884,_0x53446d=parseSemver(_0x362c4d),_0x309d6d=parseSemver(_0x290fc2);if(!_0x53446d||!_0x309d6d)throw new Error(_0x2a6a9b(0x163));for(const _0x5b0bf7 of[_0x2a6a9b(0x161),_0x2a6a9b(0x143),_0x2a6a9b(0x15f)]){if(_0x53446d[_0x5b0bf7]<_0x309d6d[_0x5b0bf7])return-0x1;if(_0x53446d[_0x5b0bf7]>_0x309d6d[_0x5b0bf7])return 0x1;}if(!_0x53446d['prerelease']&&!_0x309d6d[_0x2a6a9b(0x169)])return 0x0;if(!_0x53446d[_0x2a6a9b(0x169)])return 0x1;if(!_0x309d6d['prerelease'])return-0x1;if(_0x53446d[_0x2a6a9b(0x169)]===_0x309d6d[_0x2a6a9b(0x169)])return 0x0;return _0x53446d[_0x2a6a9b(0x169)]<_0x309d6d[_0x2a6a9b(0x169)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x2c433a=a117_0x2884,_0x44b2dd=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x2c433a(0x156)]()['toLowerCase']();return _0x44b2dd==='1'||_0x44b2dd==='true'||_0x44b2dd===_0x2c433a(0x153);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x482df9=a117_0x2884;return join(cacheRoot(),'lovrabet-cli',_0x482df9(0x154));}async function readUpdateNoticeCache(){const _0x5bfe3e=a117_0x2884;try{const _0x26d1bd=await readFile(getUpdateNoticeCachePath(),_0x5bfe3e(0x150)),_0x22024f=JSON['parse'](_0x26d1bd);if(!_0x22024f||typeof _0x22024f!==_0x5bfe3e(0x165))return{};return _0x22024f;}catch{return{};}}async function writeUpdateNoticeCache(_0x38d632){const _0x13820e=a117_0x2884;try{const _0x4b1e77=getUpdateNoticeCachePath();await mkdir(dirname(_0x4b1e77),{'recursive':!![]}),await writeFile(_0x4b1e77,JSON[_0x13820e(0x14b)](_0x38d632,null,0x2)+'\x0a',_0x13820e(0x150));}catch{}}function isFreshCheck(_0x29bb8b,_0x1d13db){const _0x47cfdd=a117_0x2884;return typeof _0x29bb8b[_0x47cfdd(0x14f)]==='number'&&_0x1d13db-_0x29bb8b[_0x47cfdd(0x14f)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x4ea874,_0x5148bf,_0x848866){const _0x198076=a117_0x2884;return _0x4ea874['lastNotifiedVersion']===_0x5148bf&&typeof _0x4ea874[_0x198076(0x148)]===_0x198076(0x15d)&&_0x848866-_0x4ea874[_0x198076(0x148)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0xf7372b=0x5dc){const _0x23b145=a117_0x2884;try{const _0x49378e=NPM_REGISTRY_BASE_URL+_0x23b145(0x14d)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x23b145(0x151),_0x807fd0=await fetch(_0x49378e,{'signal':AbortSignal[_0x23b145(0x144)](_0xf7372b)});if(!_0x807fd0['ok'])return null;const _0x4e2540=await _0x807fd0[_0x23b145(0x149)]();if(!_0x4e2540||typeof _0x4e2540!==_0x23b145(0x165))return null;return Object[_0x23b145(0x159)](Object['entries'](_0x4e2540)[_0x23b145(0x168)](([,_0x422f3a])=>typeof _0x422f3a===_0x23b145(0x158)&&_0x422f3a['trim']())[_0x23b145(0x146)](([_0x496f16,_0xd73062])=>[_0x496f16,String(_0xd73062)[_0x23b145(0x156)]()]));}catch{return null;}}function a117_0x5f45(){const _0x58144c=['utf8','/dist-tags','\x20available,\x20current\x20','yes','update-check.json','2185010txavPi','trim','240616GuVAoS','string','fromEntries','84fqMwsM','10rcZVGp','/v/','number','2sDddco','patch','3809058KlTbsJ','major',',\x20run:\x20','Invalid\x20semver','7202655PjnvRS','object','1444248vmlfbV','1012507SlVfhz','filter','prerelease','\x20update','minor','timeout','1289955pfofbh','map','latest','lastNotifiedAt','json','6yznoMa','stringify','https://www.npmjs.com/package/','/-/package/','match','checkedAt'];a117_0x5f45=function(){return _0x58144c;};return a117_0x5f45();}function a117_0x2884(_0x4df919,_0x120527){_0x4df919=_0x4df919-0x143;const _0x5f455c=a117_0x5f45();let _0x2884cb=_0x5f455c[_0x4df919];return _0x2884cb;}export function buildNpmVersionUrl(_0x409ea5){const _0x499750=a117_0x2884;return _0x499750(0x14c)+LOVRABET_NPM_PACKAGE_NAME+_0x499750(0x15c)+_0x409ea5;}export async function resolveLatestUpdateNotice(){const _0x328496=a117_0x2884;if(isUpdateNoticeDisabled())return null;try{const _0x5c2001=Date['now'](),_0x277be1=getCliVersion(),_0x50cc31=await readUpdateNoticeCache();let _0x1905b0=isFreshCheck(_0x50cc31,_0x5c2001)?_0x50cc31[_0x328496(0x147)]?.[_0x328496(0x156)]():undefined;if(!_0x1905b0&&!isFreshCheck(_0x50cc31,_0x5c2001)){const _0x418750=await fetchNpmDistTags();_0x1905b0=_0x418750?.[_0x328496(0x147)]?.[_0x328496(0x156)](),await writeUpdateNoticeCache({..._0x50cc31,'checkedAt':_0x5c2001,'latest':_0x1905b0,'failed':!_0x1905b0});}if(!_0x1905b0||compareSemver(_0x277be1,_0x1905b0)>=0x0)return null;if(isRecentlyNotified(_0x50cc31,_0x1905b0,_0x5c2001))return null;const _0x303993=CLI_BIN_NAME+_0x328496(0x16a);return await writeUpdateNoticeCache({..._0x50cc31,'checkedAt':isFreshCheck(_0x50cc31,_0x5c2001)?_0x50cc31[_0x328496(0x14f)]:_0x5c2001,'latest':_0x1905b0,'failed':![],'lastNotifiedVersion':_0x1905b0,'lastNotifiedAt':_0x5c2001}),{'command':_0x303993,'current':_0x277be1,'latest':_0x1905b0,'url':buildNpmVersionUrl(_0x1905b0),'message':CLI_BIN_NAME+'\x20'+_0x1905b0+_0x328496(0x152)+_0x277be1+_0x328496(0x162)+_0x303993};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20c4d1,_0x387ed3){const _0x5ebbea=a118_0x48d3,_0x1cde10=_0x20c4d1();while(!![]){try{const _0x137097=-parseInt(_0x5ebbea(0x1cd))/0x1*(-parseInt(_0x5ebbea(0x1d2))/0x2)+-parseInt(_0x5ebbea(0x1cf))/0x3*(-parseInt(_0x5ebbea(0x1d4))/0x4)+-parseInt(_0x5ebbea(0x1cc))/0x5+parseInt(_0x5ebbea(0x1d0))/0x6+parseInt(_0x5ebbea(0x1d3))/0x7+-parseInt(_0x5ebbea(0x1ce))/0x8*(-parseInt(_0x5ebbea(0x1cb))/0x9)+-parseInt(_0x5ebbea(0x1ca))/0xa;if(_0x137097===_0x387ed3)break;else _0x1cde10['push'](_0x1cde10['shift']());}catch(_0x557ee0){_0x1cde10['push'](_0x1cde10['shift']());}}}(a118_0x5194,0x8984a));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x20e635=String(GIT_COMMIT);return _0x20e635&&_0x20e635!=='unknown'?_0x20e635:'';}function a118_0x48d3(_0x409950,_0x48dd15){_0x409950=_0x409950-0x1ca;const _0x5194ca=a118_0x5194();let _0x48d3b1=_0x5194ca[_0x409950];return _0x48d3b1;}export function getCliVersionDisplay(){const _0x55a06c=a118_0x48d3,_0x5d9786=getCliGitCommit(),_0x25c129=BUILD_TIME[_0x55a06c(0x1d1)](0x0,0xa);if(!_0x5d9786||!_0x25c129)return VERSION;return VERSION+'\x20('+_0x5d9786+',\x20'+_0x25c129+')';}function a118_0x5194(){const _0x469bea=['11VUOapZ','30872WVigrY','246rRvUeX','4316262JyaoRY','slice','77636dOxNwK','791168hqdPIp','38580CllrlG','13148690mcNmFy','63yAfJZD','995795sJZVJy'];a118_0x5194=function(){return _0x469bea;};return a118_0x5194();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a119_0x4c56(_0x2bc117,_0x51de43){_0x2bc117=_0x2bc117-0xad;var _0x518e64=a119_0x518e();var _0x4c5626=_0x518e64[_0x2bc117];return _0x4c5626;}function a119_0x518e(){var _0x1398aa=['4892956CnuOOQ','49DbXlwn','3JYOlLv','1318366eicTXP','7435715HfifkW','13rRjsAb','6xgXXRG','68710lHKjVN','6900534QiGfeZ','1991Osfial','stderr','4845660ugBLdB','56CQztFG','432WqohSi'];a119_0x518e=function(){return _0x1398aa;};return a119_0x518e();}(function(_0x2c638c,_0x586396){var _0x533ed6=a119_0x4c56,_0xa5f29c=_0x2c638c();while(!![]){try{var _0x384f08=-parseInt(_0x533ed6(0xb0))/0x1*(-parseInt(_0x533ed6(0xae))/0x2)+-parseInt(_0x533ed6(0xb1))/0x3*(-parseInt(_0x533ed6(0xaf))/0x4)+parseInt(_0x533ed6(0xb3))/0x5*(-parseInt(_0x533ed6(0xb5))/0x6)+-parseInt(_0x533ed6(0xb2))/0x7*(parseInt(_0x533ed6(0xad))/0x8)+parseInt(_0x533ed6(0xb7))/0x9+parseInt(_0x533ed6(0xb6))/0xa*(parseInt(_0x533ed6(0xb8))/0xb)+-parseInt(_0x533ed6(0xba))/0xc*(-parseInt(_0x533ed6(0xb4))/0xd);if(_0x384f08===_0x586396)break;else _0xa5f29c['push'](_0xa5f29c['shift']());}catch(_0x53886e){_0xa5f29c['push'](_0xa5f29c['shift']());}}}(a119_0x518e,0xcdb00));export function writeCliSideChannelLine(_0x9c617e){var _0x197b87=a119_0x4c56;process[_0x197b87(0xb9)]['write'](_0x9c617e+'\x0a');}
|