@lovrabet/lovrabet-cli 2.1.17 → 2.1.18-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/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/schedule/index.js +1 -0
- 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
|
-
const
|
|
1
|
+
const a106_0x189ed6=a106_0x1bfa;(function(_0x320a16,_0x133e64){const _0x23f1b6=a106_0x1bfa,_0x27ad78=_0x320a16();while(!![]){try{const _0x254a70=-parseInt(_0x23f1b6(0x119))/0x1+parseInt(_0x23f1b6(0x114))/0x2*(-parseInt(_0x23f1b6(0x101))/0x3)+-parseInt(_0x23f1b6(0x106))/0x4*(parseInt(_0x23f1b6(0x118))/0x5)+parseInt(_0x23f1b6(0x11b))/0x6+-parseInt(_0x23f1b6(0x115))/0x7+-parseInt(_0x23f1b6(0x111))/0x8+parseInt(_0x23f1b6(0x11a))/0x9*(parseInt(_0x23f1b6(0x103))/0xa);if(_0x254a70===_0x133e64)break;else _0x27ad78['push'](_0x27ad78['shift']());}catch(_0x6ad324){_0x27ad78['push'](_0x27ad78['shift']());}}}(a106_0x2f04,0x64a24));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';function a106_0x2f04(){const _0x554a14=['claudeSkillsDir','appCode','1405nwqalC','816272oIOXWp','270YwYiWY','3365418cKiVVd','homeDirName','2787zYcIHw','path\x20segment','600830hrJhRz','filter','Unsafe\x20','2476STLbZI','agentsSkillsDir','.agents','workbuddySkillsDir','CLAUDE_SKILL_ROOT','validation','includes','SKILL_ROOT','.claude','trim','homeDir','2214048SNGnth','.workbuddy','skills','58sLLGtE','4601023dCQWfL'];a106_0x2f04=function(){return _0x554a14;};return a106_0x2f04();}import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x4af8db={}){const _0x4d0dd5=a106_0x1bfa,_0x5409e9=_0x4af8db[_0x4d0dd5(0x110)]??homedir(),_0x407b1d=resolve(_0x5409e9,PRODUCT_CONFIG[_0x4d0dd5(0x11c)],'cache'),_0x58cfc8=trimmedEnv(_0x4d0dd5(0x10d)),_0x117aac=trimmedEnv(_0x4d0dd5(0x10a)),_0x516ae1=resolve(_0x5409e9,_0x4d0dd5(0x112)),_0x4245a7=_0x4af8db[_0x4d0dd5(0x109)]??(existsSync(_0x516ae1)?resolve(_0x516ae1,_0x4d0dd5(0x113)):undefined);return{'homeDir':_0x5409e9,'cacheRoot':_0x407b1d,'managedRoot':resolve(_0x5409e9,PRODUCT_CONFIG[_0x4d0dd5(0x11c)]),'agentsSkillsDir':_0x4af8db[_0x4d0dd5(0x107)]??_0x58cfc8??resolve(_0x5409e9,_0x4d0dd5(0x108),_0x4d0dd5(0x113)),'claudeSkillsDir':_0x4af8db[_0x4d0dd5(0x116)]??_0x117aac??resolve(_0x5409e9,_0x4d0dd5(0x10e),_0x4d0dd5(0x113)),'workbuddySkillsDir':_0x4245a7};}export function runtimeAgentSkillRoots(_0x1b882f){const _0x14cd8d=a106_0x1bfa;return[_0x1b882f['agentsSkillsDir'],_0x1b882f['claudeSkillsDir'],_0x1b882f[_0x14cd8d(0x109)]][_0x14cd8d(0x104)](_0x271bb6=>Boolean(_0x271bb6));}export function getRuntimeSkillCacheRoot(_0x1f9a12,_0x28f8e7,_0xe190a3={}){const _0xabc45c=a106_0x1bfa,_0x3d9432=resolveSkillSyncPaths(_0xe190a3);return resolve(_0x3d9432['cacheRoot'],_0x1f9a12,fingerprintAccessKey(_0x28f8e7),_0xabc45c(0x113));}export function getRuntimeSkillDir(_0x262e90,_0x579ca4,_0x759d7d,_0x22c1fc,_0x4ad866,_0x2a7b93={}){const _0x4ef95f=a106_0x1bfa;return resolve(getRuntimeSkillCacheRoot(_0x262e90,_0x579ca4,_0x2a7b93),safePathSegment(_0x759d7d,_0x4ef95f(0x117)),_0x22c1fc,safePathSegment(_0x4ad866,'skillCode'));}export function safePathSegment(_0x9dca6,_0x442c04=a106_0x189ed6(0x102)){const _0x320d24=a106_0x189ed6;if(!_0x9dca6||_0x9dca6[_0x320d24(0x10c)]('/')||_0x9dca6[_0x320d24(0x10c)]('\x5c')||_0x9dca6[_0x320d24(0x10c)]('..'))throw CliErrors[_0x320d24(0x10b)](_0x320d24(0x105)+_0x442c04+'\x20for\x20local\x20path:\x20'+_0x9dca6);return _0x9dca6;}function a106_0x1bfa(_0x16799c,_0x44cd49){_0x16799c=_0x16799c-0x101;const _0x2f04c8=a106_0x2f04();let _0x1bfa93=_0x2f04c8[_0x16799c];return _0x1bfa93;}function trimmedEnv(_0x283b8e){const _0x448cfc=a106_0x189ed6,_0x396392=productEnv(_0x283b8e)?.[_0x448cfc(0x10f)]();return _0x396392?_0x396392:undefined;}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
(function(_0x52a211,_0x39ac62){const _0x4cf414=a107_0x3cb2,_0x2c7bf2=_0x52a211();while(!![]){try{const _0x1a925d=-parseInt(_0x4cf414(0xb5))/0x1*(-parseInt(_0x4cf414(0xcc))/0x2)+-parseInt(_0x4cf414(0xd9))/0x3*(-parseInt(_0x4cf414(0xcd))/0x4)+-parseInt(_0x4cf414(0xc4))/0x5+-parseInt(_0x4cf414(0xca))/0x6+parseInt(_0x4cf414(0xc3))/0x7*(-parseInt(_0x4cf414(0xd7))/0x8)+parseInt(_0x4cf414(0xbf))/0x9+-parseInt(_0x4cf414(0xcb))/0xa*(-parseInt(_0x4cf414(0xc9))/0xb);if(_0x1a925d===_0x39ac62)break;else _0x2c7bf2['push'](_0x2c7bf2['shift']());}catch(_0x5b03de){_0x2c7bf2['push'](_0x2c7bf2['shift']());}}}(a107_0x58a9,0x5faea));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a107_0x3db131}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(_0x5363cc,_0x6e02fc,_0x21f73e={}){const _0xf71107=a107_0x3cb2,_0x5c1179=resolvePushDirectoryRoot(_0x5363cc),_0x2e36ed=readPushMetadataIfPresent(resolve(_0x5c1179,METADATA_FILE),{'ignoreInvalidMetadata':_0x21f73e['ignoreInvalidMetadata']});if(_0x2e36ed?.['appCode']&&_0x2e36ed[_0xf71107(0xd6)]!==_0x6e02fc&&!_0x21f73e['allowAppCodeRetarget']&&!_0x21f73e[_0xf71107(0xc5)])throw CliErrors['validation']('Skill\x20metadata\x20appCode\x20\x22'+_0x2e36ed[_0xf71107(0xd6)]+_0xf71107(0xd1)+_0x6e02fc+'\x22.');const _0x4c2652=resolvePushSkillCode(_0x5c1179,_0x6e02fc,_0x2e36ed,_0x21f73e);if(!_0x4c2652)throw CliErrors[_0xf71107(0xdb)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0xf71107(0xe5));return{'dir':_0x5c1179,'skillCode':_0x4c2652,'metadata':_0x2e36ed};}function a107_0x3cb2(_0x51a7d4,_0x18831e){_0x51a7d4=_0x51a7d4-0xaa;const _0x58a973=a107_0x58a9();let _0x3cb22b=_0x58a973[_0x51a7d4];return _0x3cb22b;}export function readPushDirectory(_0x28cdf3,_0x52e237,_0xbdeec4={}){const _0x163837=a107_0x3cb2,_0x12ed56=resolvePushDirectoryIdentity(_0x28cdf3,_0x52e237,_0xbdeec4),_0xc8127d=_0x12ed56[_0x163837(0xb3)],_0x5ecd12=resolve(_0xc8127d,SKILL_FILE);if(!existsSync(_0x5ecd12)||!lstatSync(_0x5ecd12)['isFile']())throw CliErrors['validation'](_0x163837(0xe2)+SKILL_FILE+':\x20'+_0x5ecd12);const _0x9eede6=_0x12ed56[_0x163837(0xc1)],_0x5d21a4=_0xbdeec4[_0x163837(0xd8)]??_0x163837(0xc7);if(!_0xbdeec4[_0x163837(0xce)]&&_0x9eede6?.['scope']===_0x163837(0xe3))throw CliErrors[_0x163837(0xdb)](_0x163837(0xab)+METADATA_FILE+_0x163837(0xc2)+_0x9eede6[_0x163837(0xaa)]+'\x22.');if(!_0xbdeec4[_0x163837(0xce)]&&_0x5d21a4===_0x163837(0xc7)&&_0x9eede6?.[_0x163837(0xaa)]&&_0x9eede6[_0x163837(0xaa)]!==_0x163837(0xc7))throw CliErrors[_0x163837(0xdb)](_0x163837(0xad)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x9eede6[_0x163837(0xaa)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0xc8127d+_0x163837(0xe4));const _0x8f8f6e=scanSkillDirectory(_0xc8127d),_0x5443d7=buildSkillPackage(_0x8f8f6e),_0x422173=readFileSync(_0x5ecd12,_0x163837(0xbc)),_0x4afda3=_0x12ed56['skillCode'],_0x3e4b44=_0xbdeec4[_0x163837(0xe6)]?undefined:_0x9eede6,_0x215eda=readSkillDisplayName(_0x422173);return{'skillCode':_0x4afda3,'metadata':_0x9eede6,'frontmatterDisplayName':_0x215eda,'input':{'skillCode':_0x4afda3,'skillName':_0x215eda??_0x3e4b44?.[_0x163837(0xb2)],'description':_0x3e4b44?.[_0x163837(0xb6)],'content':_0x422173,'files':_0x5443d7[_0x163837(0xdf)],'packageBase64':_0x5443d7['packageBase64'],'tags':_0x3e4b44?.['tags'],'version':_0x3e4b44?.[_0x163837(0xe8)],'sourceSessionId':_0x3e4b44?.[_0x163837(0xb4)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x10271a,_0x5ca7f9,_0x4f2239,_0xb038e5={}){const _0x4aabe3=a107_0x3cb2,_0x30fcb3=resolvePushDirectoryRoot(_0x10271a),_0x1d700f=readPushMetadataIfPresent(resolve(_0x30fcb3,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x33a6ad=requireRemoteScope(_0x5ca7f9),_0x369821=readLocalSkillContent(_0x30fcb3),_0x536273={..._0x5ca7f9,'appCode':_0x5ca7f9['appCode']??_0x4f2239,'skillName':_0x5ca7f9['skillName']??_0x1d700f?.['skillName'],'description':_0x5ca7f9[_0x4aabe3(0xb6)]??_0x1d700f?.['description'],'tags':Array[_0x4aabe3(0xc0)](_0x5ca7f9[_0x4aabe3(0xea)])?_0x5ca7f9[_0x4aabe3(0xea)]:_0x1d700f?.[_0x4aabe3(0xea)],'sourceSessionId':_0x5ca7f9[_0x4aabe3(0xb4)]??_0x1d700f?.[_0x4aabe3(0xb4)],'content':_0x5ca7f9['content']??_0x369821},_0x7bf469=buildMetadata(_0x536273,_0x33a6ad,_0x4f2239,contentHash(_0x369821),_0xb038e5[_0x4aabe3(0xb1)]);writeJsonAtomic(resolve(_0x30fcb3,METADATA_FILE),_0x7bf469);}function a107_0x58a9(){const _0x3e0579=['3071480IFLBon','ignoreMetadataAppCodeMismatch','files','personal','isFile','242SOIXfG','3425976iXJeZm','430330vVONsQ','8558xSRlXR','28JQAtDF','ignoreMetadataScope','replace','name','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','string','length','pushedAt','skillCode','appCode','182560XIewtY','targetScope','221385GAzonh','\x20name\x20for\x20SkillHub\x20slug\x20generation.','validation','isDirectory','Remote\x20Skill\x20','displayName','manifest','path','content','Missing\x20','builtin','\x20to\x20submit\x20company\x20Skills\x20for\x20review.',',\x20or\x20directory\x20name.','ignoreMetadataForPayload','object','version','boolean','tags','scope','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','ignoreMetadataSkillCode','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','unknown','isSymbolicLink','trim','refreshedAt','skillName','dir','sourceSessionId','57oLHoNo','description','toLowerCase','find','startsWith','slice','number','utf8','\x20has\x20unsupported\x20scope\x20\x22','Skill\x20directory\x20not\x20found:\x20','1294668nTzKsg','isArray','metadata','\x20has\x20scope=\x22','84boangP'];a107_0x58a9=function(){return _0x3e0579;};return a107_0x58a9();}export function recordPushedRuntimeSkill(_0x416749,_0x35f04c,_0x5334b4,_0x434f0c={}){const _0x4d4229=a107_0x3cb2,_0x476eeb=resolvePushDirectoryRoot(_0x416749),_0x53fff6=scanSkillDirectory(_0x476eeb),_0x1c87b3=_0x53fff6[_0x4d4229(0xb8)](_0x4f8c55=>_0x4f8c55[_0x4d4229(0xe0)]===SKILL_FILE),_0x3a52ce=_0x1c87b3?fileText(_0x1c87b3):'',_0xf4a417=tryNormalizePackageManifest(_0x35f04c[_0x4d4229(0xc6)]),_0x3ff7df={..._0x35f04c,'content':_0x35f04c['content']??_0x3a52ce,'files':_0xf4a417},_0x41cc9a=_0xf4a417?normalizeLocalFiles(_0x53fff6)['filter'](_0x586afa=>_0xf4a417[_0x4d4229(0xc6)]['some'](_0x3cc8a7=>_0x3cc8a7[_0x4d4229(0xe0)]===_0x586afa['path'])):undefined,_0x288028=buildMetadata(_0x3ff7df,_0x434f0c[_0x4d4229(0xaa)]??_0x4d4229(0xc7),_0x5334b4,contentHash(_0x3ff7df[_0x4d4229(0xe1)]??''),_0x434f0c[_0x4d4229(0xd4)],_0x41cc9a);writeJsonAtomic(resolve(_0x476eeb,METADATA_FILE),_0x288028);}export function deriveSkillCodeFromDirectory(_0x1000a0,_0x283601){const _0x8e79f0=a107_0x3cb2,_0x1c5fd2=basename(resolve(_0x1000a0)),_0x51ca89=_0x283601+'--';return _0x1c5fd2[_0x8e79f0(0xb9)](_0x51ca89)?_0x1c5fd2[_0x8e79f0(0xba)](_0x51ca89[_0x8e79f0(0xd3)]):_0x1c5fd2;}function resolvePushSkillCode(_0x34d6f4,_0xdb4c78,_0x5aebfd,_0x2adc63){const _0xd60313=a107_0x3cb2,_0x58c0fd=deriveSkillCodeFromSkillFile(_0x34d6f4)||deriveSkillCodeFromDirectory(_0x34d6f4,_0xdb4c78);if(_0x2adc63[_0xd60313(0xac)])return _0x58c0fd;return _0x5aebfd?.['skillCode']?.[_0xd60313(0xb0)]()||_0x58c0fd;}function deriveSkillCodeFromSkillFile(_0x3aa6c2){const _0x49ebec=a107_0x3cb2,_0xa8fc9f=resolve(_0x3aa6c2,SKILL_FILE);if(!existsSync(_0xa8fc9f)||!lstatSync(_0xa8fc9f)['isFile']())return undefined;const _0x201df1=readFileSync(_0xa8fc9f,_0x49ebec(0xbc)),_0x470aff=_0x201df1['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x470aff)return undefined;const _0x348490=parseFrontmatterObject(_0x470aff[0x1]??''),_0x126915=scalarToString(_0x348490?.[_0x49ebec(0xd0)]);return _0x126915?slugifySkillName(_0x126915):undefined;}function readSkillDisplayName(_0x281f9f){const _0x405e99=a107_0x3cb2,_0x328b58=_0x281f9f['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x328b58)return undefined;const _0x2ea09c=parseFrontmatterObject(_0x328b58[0x1]??'');return scalarToString(_0x2ea09c?.[_0x405e99(0xde)]);}function slugifySkillName(_0x30a037){const _0x38b13f=a107_0x3cb2,_0x2b046c=_0x30a037['trim']()[_0x38b13f(0xb7)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x38b13f(0xcf)](/^-+/,'')[_0x38b13f(0xcf)](/-+$/,'')[_0x38b13f(0xcf)](/-{2,}/g,'-');if(!_0x2b046c)throw CliErrors[_0x38b13f(0xdb)]('Invalid\x20'+SKILL_FILE+_0x38b13f(0xda));return _0x2b046c;}function parseFrontmatterObject(_0x202e43){const _0x26df19=a107_0x3cb2;try{const _0xd590eb=a107_0x3db131(_0x202e43);return _0xd590eb&&typeof _0xd590eb===_0x26df19(0xe7)&&!Array[_0x26df19(0xc0)](_0xd590eb)?_0xd590eb:undefined;}catch{return undefined;}}function scalarToString(_0x3581bb){const _0x449014=a107_0x3cb2;if(typeof _0x3581bb===_0x449014(0xd2))return _0x3581bb[_0x449014(0xb0)]();if(typeof _0x3581bb===_0x449014(0xbb)||typeof _0x3581bb===_0x449014(0xe9))return String(_0x3581bb);return undefined;}function resolvePushDirectoryRoot(_0x55c638){const _0x465be4=a107_0x3cb2,_0x4b4102=resolve(_0x55c638);if(!existsSync(_0x4b4102))throw CliErrors[_0x465be4(0xdb)](_0x465be4(0xbe)+_0x55c638);const _0x54f90c=lstatSync(_0x4b4102);if(_0x54f90c['isDirectory']())return _0x4b4102;if(_0x54f90c[_0x465be4(0xaf)]()){const _0x2c16e5=realpathSync(_0x4b4102);if(lstatSync(_0x2c16e5)[_0x465be4(0xdc)]())return _0x2c16e5;}throw CliErrors[_0x465be4(0xdb)]('Skill\x20directory\x20not\x20found:\x20'+_0x55c638);}function requireRemoteScope(_0x3d39ba){const _0x16170f=a107_0x3cb2;if(_0x3d39ba['scope']===_0x16170f(0xc7)||_0x3d39ba[_0x16170f(0xaa)]==='company'||_0x3d39ba[_0x16170f(0xaa)]===_0x16170f(0xe3))return _0x3d39ba[_0x16170f(0xaa)];throw CliErrors[_0x16170f(0xdb)](_0x16170f(0xdd)+(_0x3d39ba[_0x16170f(0xd5)]||'(unknown)')+_0x16170f(0xbd)+(_0x3d39ba[_0x16170f(0xaa)]??_0x16170f(0xae))+'\x22.');}function readLocalSkillContent(_0x490d2e){const _0x4b527f=a107_0x3cb2,_0x6e800c=resolve(_0x490d2e,SKILL_FILE);return existsSync(_0x6e800c)&&lstatSync(_0x6e800c)[_0x4b527f(0xc8)]()?readFileSync(_0x6e800c,_0x4b527f(0xbc)):'';}function readPushMetadataIfPresent(_0x3a262a,_0x2fbdbe={}){try{return readMetadataIfPresent(_0x3a262a);}catch(_0xac12b8){if(_0x2fbdbe['ignoreInvalidMetadata'])return undefined;throw _0xac12b8;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5bcace,_0xb98572){const _0x10e576=a108_0x1aa1,_0x4a3d9a=_0x5bcace();while(!![]){try{const _0x39915f=parseInt(_0x10e576(0x13e))/0x1+-parseInt(_0x10e576(0x14d))/0x2+parseInt(_0x10e576(0x149))/0x3+-parseInt(_0x10e576(0x145))/0x4*(parseInt(_0x10e576(0x140))/0x5)+-parseInt(_0x10e576(0x14c))/0x6+parseInt(_0x10e576(0x142))/0x7*(-parseInt(_0x10e576(0x146))/0x8)+parseInt(_0x10e576(0x144))/0x9;if(_0x39915f===_0xb98572)break;else _0x4a3d9a['push'](_0x4a3d9a['shift']());}catch(_0x48352f){_0x4a3d9a['push'](_0x4a3d9a['shift']());}}}(a108_0x147c,0x6dc2e));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x233c11){const _0x128900=a108_0x1aa1,_0x4b3b07=_0x233c11&&_0x233c11[_0x128900(0x147)]>0x0?_0x233c11:[_0x128900(0x141),_0x128900(0x14a),_0x128900(0x13f)],_0x12800b=[];for(const _0x2d0327 of _0x4b3b07){if(!isRuntimeSkillScope(_0x2d0327))throw CliErrors[_0x128900(0x13d)](_0x128900(0x14b)+_0x2d0327);!_0x12800b[_0x128900(0x143)](_0x2d0327)&&_0x12800b[_0x128900(0x148)](_0x2d0327);}return _0x12800b;}function a108_0x1aa1(_0x400972,_0x570102){_0x400972=_0x400972-0x13d;const _0x147ce0=a108_0x147c();let _0x1aa1d0=_0x147ce0[_0x400972];return _0x1aa1d0;}export function isRuntimeSkillScope(_0x3ef646){const _0x595763=a108_0x1aa1;return _0x3ef646===_0x595763(0x141)||_0x3ef646===_0x595763(0x14a)||_0x3ef646===_0x595763(0x13f);}function a108_0x147c(){const _0x468a61=['length','push','1761423lIKaTs','company','Unsupported\x20runtime\x20Skill\x20scope:\x20','2713302IXOHgb','226452pFnHah','validation','795231yJsjUC','builtin','6885CkgFNk','personal','9751lSqwzd','includes','4541922toIytj','1048IwjvpU','2936sARRsu'];a108_0x147c=function(){return _0x468a61;};return a108_0x147c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a110_0x25094a=a110_0x1bd4;(function(_0x404b4a,_0x5c2784){const _0x5cd474=a110_0x1bd4,_0x93cd31=_0x404b4a();while(!![]){try{const _0x48ea8b=parseInt(_0x5cd474(0x8a))/0x1+parseInt(_0x5cd474(0x76))/0x2*(-parseInt(_0x5cd474(0x89))/0x3)+-parseInt(_0x5cd474(0x85))/0x4*(parseInt(_0x5cd474(0x8b))/0x5)+parseInt(_0x5cd474(0x77))/0x6*(parseInt(_0x5cd474(0x83))/0x7)+parseInt(_0x5cd474(0x7f))/0x8+-parseInt(_0x5cd474(0x7b))/0x9*(-parseInt(_0x5cd474(0x7a))/0xa)+parseInt(_0x5cd474(0x84))/0xb*(-parseInt(_0x5cd474(0x79))/0xc);if(_0x48ea8b===_0x5c2784)break;else _0x93cd31['push'](_0x93cd31['shift']());}catch(_0x5b290b){_0x93cd31['push'](_0x93cd31['shift']());}}}(a110_0x1005,0x29067));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';function a110_0x1005(){const _0x48b1aa=['1564904GBAWJd','entries','sort','path','3227MfxYyp','770YrcIZE','44chQznD','1980-01-01T00:00:00.000Z','validation','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','48732TJRpjU','5840fgzzbd','75945tRbeQn','object','22zIZMpY','1566Tpnfbk','name','17916JphnNk','44930YRWMPk','594shRwIZ','code','length','from'];a110_0x1005=function(){return _0x48b1aa;};return a110_0x1005();}function a110_0x1bd4(_0x2e1093,_0x292331){_0x2e1093=_0x2e1093-0x75;const _0x100549=a110_0x1005();let _0x1bd4e4=_0x100549[_0x2e1093];return _0x1bd4e4;}const ZIP_MTIME=new Date(a110_0x25094a(0x86));export function createDeterministicZipPackage(_0xf9079f){const _0x2f94c1=a110_0x25094a,_0x517499={};for(const _0x13bad4 of normalizeLocalFiles(_0xf9079f)){_0x517499[_0x13bad4[_0x2f94c1(0x82)]]=fileContent(_0x13bad4);}return Buffer[_0x2f94c1(0x7e)](zipSync(_0x517499,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x4ed21c){const _0x2157f1=a110_0x25094a;if(_0x4ed21c[_0x2157f1(0x7d)]<0x16)throw CliErrors[_0x2157f1(0x87)](_0x2157f1(0x88));let _0x53f014;try{_0x53f014=unzipSync(_0x4ed21c,{'filter'(_0x41f886){const _0x188f29=_0x2157f1,_0x1f6cb6=normalizeSkillRelativePath(_0x41f886[_0x188f29(0x78)]);if(_0x1f6cb6['endsWith']('/'))throw CliErrors['validation']('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0x1f6cb6);return!![];}});}catch(_0x23df84){if(isRuntimeSkillValidationError(_0x23df84))throw _0x23df84;throw CliErrors[_0x2157f1(0x87)](_0x2157f1(0x88));}return Object[_0x2157f1(0x80)](_0x53f014)['map'](([_0x50e80a,_0x21f174])=>({'path':normalizeSkillRelativePath(_0x50e80a),'bytes':Buffer[_0x2157f1(0x7e)](_0x21f174)}))[_0x2157f1(0x81)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x5ace0d){const _0x5a959c=a110_0x25094a;return typeof _0x5ace0d===_0x5a959c(0x75)&&_0x5ace0d!==null&&_0x5a959c(0x7c)in _0x5ace0d&&_0x5ace0d['code']==='validation_error';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1429b8,_0x7793c6){const _0x194be0=a111_0x4b9c,_0x332422=_0x1429b8();while(!![]){try{const _0x11432d=parseInt(_0x194be0(0x18e))/0x1*(-parseInt(_0x194be0(0x16f))/0x2)+parseInt(_0x194be0(0x189))/0x3*(parseInt(_0x194be0(0x187))/0x4)+parseInt(_0x194be0(0x177))/0x5+-parseInt(_0x194be0(0x16e))/0x6+parseInt(_0x194be0(0x169))/0x7+-parseInt(_0x194be0(0x179))/0x8*(-parseInt(_0x194be0(0x191))/0x9)+parseInt(_0x194be0(0x167))/0xa*(-parseInt(_0x194be0(0x178))/0xb);if(_0x11432d===_0x7793c6)break;else _0x332422['push'](_0x332422['shift']());}catch(_0x3c6752){_0x332422['push'](_0x332422['shift']());}}}(a111_0x3e09,0x9e768));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';function a111_0x3e09(){const _0x90d003=['Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','zipSha256','sha256','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','isArray','zipSize','8mbGfMV','length','218019ddDKGR','requireOssPath','has','size','validation','2HNxhMH','base64','get','9rdClkR','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Missing\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','path','Duplicate\x20Skill\x20package\x20entry:\x20','294530gbbWjn','set','1828862GKzdzT','ossPath','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','bytes','813780GLbZVF','577636MmkDlf','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20size\x20mismatch.','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','treeSha256','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','isSafeInteger','schemaVersion','5467760AKSiSQ','495WGuECI','9500408TdYrFV','some','\x20in\x20Skill\x20file\x20package.','files','toLowerCase','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','toString'];a111_0x3e09=function(){return _0x90d003;};return a111_0x3e09();}function a111_0x4b9c(_0x34362b,_0x3b44c7){_0x34362b=_0x34362b-0x163;const _0x3e098c=a111_0x3e09();let _0x4b9c62=_0x3e098c[_0x34362b];return _0x4b9c62;}import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x45dd8d){const _0x52dbf5=a111_0x4b9c,_0x383ec5=normalizeLocalFiles(_0x45dd8d);if(!_0x383ec5[_0x52dbf5(0x17a)](_0x1000bc=>_0x1000bc['path']===SKILL_FILE))throw CliErrors[_0x52dbf5(0x18d)](_0x52dbf5(0x163)+SKILL_FILE+_0x52dbf5(0x17b));const _0x25e8ef=localFilesToManifestFiles(_0x383ec5),_0x1e9742=createDeterministicZipPackage(_0x383ec5);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x25e8ef),'zipSha256':bufferSha256(_0x1e9742),'zipSize':_0x1e9742[_0x52dbf5(0x188)],'files':_0x25e8ef},'packageBytes':_0x1e9742,'packageBase64':_0x1e9742[_0x52dbf5(0x17f)](_0x52dbf5(0x18f))};}export function verifyRuntimeSkillPackage(_0x222ac6,_0x5a3350){const _0x226de0=a111_0x4b9c,_0x5ef0df=normalizePackageManifest(_0x222ac6,{'requireOssPath':![]});if(!_0x5ef0df)throw CliErrors[_0x226de0(0x18d)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x5ef0df,_0x5a3350);}export function verifyRuntimeSkillBundle(_0x389db1,_0x35e0b4){const _0x5da19a=a111_0x4b9c,_0x491ec5=normalizePackageManifest(_0x389db1,{'requireOssPath':![]});if(!_0x491ec5)throw CliErrors[_0x5da19a(0x18d)](_0x5da19a(0x16b));return extractAndVerifyPackageFiles(_0x491ec5,_0x35e0b4);}export function tryNormalizePackageManifest(_0x5efbe8){return normalizePackageManifest(_0x5efbe8,{'requireOssPath':![]});}export function requirePackageBytes(_0x4bea01,_0x5970bd){const _0x1144d0=a111_0x4b9c;if(!_0x5970bd||_0x5970bd[_0x1144d0(0x188)]===0x0)throw CliErrors[_0x1144d0(0x18d)](_0x1144d0(0x184)+_0x4bea01);return _0x5970bd;}export function extractDownloadedPackage(_0x16ecfb){const _0x158205=a111_0x4b9c,_0x1bcf35=parseZipPackage(_0x16ecfb)['map'](_0x1dce5e=>({'path':_0x1dce5e[_0x158205(0x165)],'bytes':_0x1dce5e[_0x158205(0x16d)]}));if(!_0x1bcf35[_0x158205(0x17a)](_0x1ca410=>_0x1ca410[_0x158205(0x165)]===SKILL_FILE))throw CliErrors[_0x158205(0x18d)](_0x158205(0x164)+SKILL_FILE+'.');return normalizeLocalFiles(_0x1bcf35);}export function localFilesToManifestFiles(_0x2e8e34){const _0x548d47=a111_0x4b9c;return normalizeLocalFiles(_0x2e8e34)['map'](_0x566500=>({'path':_0x566500[_0x548d47(0x165)],'sha256':fileHash(_0x566500),'size':fileContent(_0x566500)[_0x548d47(0x188)]}));}function normalizePackageManifest(_0x217330,_0x4e7f24){const _0x43e76b=a111_0x4b9c;if(!_0x217330||typeof _0x217330!=='object'||Array[_0x43e76b(0x185)](_0x217330))return undefined;const _0x195806=_0x217330,_0x25877=typeof _0x195806['ossPath']==='string'?_0x195806[_0x43e76b(0x16a)]['trim']():undefined;if(_0x4e7f24[_0x43e76b(0x18a)]&&!_0x25877)return undefined;if(!Array[_0x43e76b(0x185)](_0x195806['files'])||_0x195806[_0x43e76b(0x17c)]['length']===0x0)return undefined;if(!isSha256Hex(_0x195806[_0x43e76b(0x173)]))throw CliErrors[_0x43e76b(0x18d)](_0x43e76b(0x192));if(!isSha256Hex(_0x195806['zipSha256']))throw CliErrors['validation'](_0x43e76b(0x180));if(!Number['isSafeInteger'](_0x195806['zipSize'])||_0x195806[_0x43e76b(0x186)]<0x0)throw CliErrors[_0x43e76b(0x18d)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0xfcafa1=normalizeManifestFiles(_0x195806[_0x43e76b(0x17c)]);if(!_0xfcafa1[_0x43e76b(0x17a)](_0x27eaa7=>_0x27eaa7[_0x43e76b(0x165)]===SKILL_FILE))throw CliErrors['validation'](_0x43e76b(0x170)+SKILL_FILE+'.');const _0xfb5f9d=fileTreeHash(_0xfcafa1);if(_0xfb5f9d!==_0x195806[_0x43e76b(0x173)][_0x43e76b(0x17d)]())throw CliErrors[_0x43e76b(0x18d)](_0x43e76b(0x17e));return{'schemaVersion':Number[_0x43e76b(0x175)](_0x195806[_0x43e76b(0x176)])?_0x195806[_0x43e76b(0x176)]:0x2,'ossPath':_0x25877,'treeSha256':_0xfb5f9d,'zipSha256':_0x195806[_0x43e76b(0x182)][_0x43e76b(0x17d)](),'zipSize':_0x195806['zipSize'],'files':_0xfcafa1};}function extractAndVerifyPackage(_0x2ca398,_0x378247){const _0x195b53=a111_0x4b9c,_0x44ba20=normalizePackageManifest(_0x2ca398,{'requireOssPath':![]});if(!_0x44ba20)throw CliErrors[_0x195b53(0x18d)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x378247[_0x195b53(0x188)]!==_0x44ba20['zipSize'])throw CliErrors['validation'](_0x195b53(0x171));const _0x2f842e=bufferSha256(_0x378247);if(_0x2f842e!==_0x44ba20[_0x195b53(0x182)])throw CliErrors[_0x195b53(0x18d)](_0x195b53(0x16c));return extractAndVerifyPackageFiles(_0x44ba20,_0x378247);}function extractAndVerifyPackageFiles(_0x10944c,_0x472d94){const _0x1c758d=a111_0x4b9c,_0x2fd535=parseZipPackage(_0x472d94);if(_0x2fd535[_0x1c758d(0x188)]!==_0x10944c[_0x1c758d(0x17c)][_0x1c758d(0x188)])throw CliErrors[_0x1c758d(0x18d)](_0x1c758d(0x181));const _0x3682ba=new Map();for(const _0x5ecacb of _0x2fd535){if(_0x3682ba[_0x1c758d(0x18b)](_0x5ecacb[_0x1c758d(0x165)]))throw CliErrors[_0x1c758d(0x18d)](_0x1c758d(0x166)+_0x5ecacb[_0x1c758d(0x165)]);_0x3682ba[_0x1c758d(0x168)](_0x5ecacb['path'],_0x5ecacb);}const _0x402071=[];for(const _0x50335b of _0x10944c['files']){const _0x4bac1b=_0x3682ba[_0x1c758d(0x190)](_0x50335b[_0x1c758d(0x165)]);if(!_0x4bac1b)throw CliErrors['validation'](_0x1c758d(0x174)+_0x50335b['path']);if(_0x4bac1b[_0x1c758d(0x16d)]['length']!==_0x50335b[_0x1c758d(0x18c)])throw CliErrors[_0x1c758d(0x18d)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x50335b[_0x1c758d(0x165)]);const _0x2f10cf=bufferSha256(_0x4bac1b[_0x1c758d(0x16d)]);if(_0x2f10cf!==_0x50335b[_0x1c758d(0x183)])throw CliErrors[_0x1c758d(0x18d)](_0x1c758d(0x172)+_0x50335b[_0x1c758d(0x165)]);_0x402071['push']({'path':_0x50335b[_0x1c758d(0x165)],'bytes':_0x4bac1b['bytes']});}return normalizeLocalFiles(_0x402071);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52db11,_0x177ed5){var _0xe079ca=a112_0x37a8,_0x5a4dde=_0x52db11();while(!![]){try{var _0x2a98c9=-parseInt(_0xe079ca(0xf2))/0x1*(parseInt(_0xe079ca(0xf5))/0x2)+parseInt(_0xe079ca(0xf9))/0x3*(-parseInt(_0xe079ca(0xf7))/0x4)+-parseInt(_0xe079ca(0xfb))/0x5+parseInt(_0xe079ca(0xf6))/0x6*(parseInt(_0xe079ca(0xfc))/0x7)+parseInt(_0xe079ca(0xf8))/0x8+parseInt(_0xe079ca(0xfd))/0x9*(parseInt(_0xe079ca(0xf3))/0xa)+-parseInt(_0xe079ca(0xfa))/0xb*(-parseInt(_0xe079ca(0xf4))/0xc);if(_0x2a98c9===_0x177ed5)break;else _0x5a4dde['push'](_0x5a4dde['shift']());}catch(_0x4b8bd0){_0x5a4dde['push'](_0x5a4dde['shift']());}}}(a112_0x5259,0xda86d));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a112_0x5259(){var _0x3c1900=['32fRZXaM','42XFttjJ','122852nOnFgm','2807376qxwKXW','57WvbmCn','7641579YoReKt','1721345QgZzfJ','346759BxXYYS','181899bCqnzg','34988fLKBnW','490tDPenP','12ctVikC'];a112_0x5259=function(){return _0x3c1900;};return a112_0x5259();}function a112_0x37a8(_0xa673fc,_0x12b678){_0xa673fc=_0xa673fc-0xf2;var _0x5259a3=a112_0x5259();var _0x37a88a=_0x5259a3[_0xa673fc];return _0x37a88a;}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(_0x3d4574,_0x2f44aa){const _0x4e7909=a113_0x65e6,_0x5263fa=_0x3d4574();while(!![]){try{const _0xcdb60e=parseInt(_0x4e7909(0x9e))/0x1*(parseInt(_0x4e7909(0x9d))/0x2)+parseInt(_0x4e7909(0xa1))/0x3*(parseInt(_0x4e7909(0x9c))/0x4)+parseInt(_0x4e7909(0xa0))/0x5+parseInt(_0x4e7909(0xa2))/0x6+parseInt(_0x4e7909(0xa3))/0x7+parseInt(_0x4e7909(0x9f))/0x8+-parseInt(_0x4e7909(0xa4))/0x9;if(_0xcdb60e===_0x2f44aa)break;else _0x5263fa['push'](_0x5263fa['shift']());}catch(_0x3667e8){_0x5263fa['push'](_0x5263fa['shift']());}}}(a113_0x33b7,0x8fcf4));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a113_0x65e6(_0x377804,_0x3bec7a){_0x377804=_0x377804-0x9c;const _0x33b77d=a113_0x33b7();let _0x65e69f=_0x33b77d[_0x377804];return _0x65e69f;}function a113_0x33b7(){const _0x4a7425=['7726208QejYQx','3248950uNjEEd','54579DciAEv','2433384IlQJeY','4094384SZpjxO','27616536WTOrEW','220PCXJMG','101782PzdUKD','1qjHZCy'];a113_0x33b7=function(){return _0x4a7425;};return a113_0x33b7();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x252ca1=a114_0x52a6;(function(_0x5df69b,_0xe0085a){const _0x5f0aa6=a114_0x52a6,_0x27345f=_0x5df69b();while(!![]){try{const _0x4aa0d7=parseInt(_0x5f0aa6(0xe6))/0x1+parseInt(_0x5f0aa6(0xe2))/0x2+parseInt(_0x5f0aa6(0xdd))/0x3+parseInt(_0x5f0aa6(0xfa))/0x4*(-parseInt(_0x5f0aa6(0xfc))/0x5)+-parseInt(_0x5f0aa6(0xe1))/0x6+-parseInt(_0x5f0aa6(0x100))/0x7*(parseInt(_0x5f0aa6(0xca))/0x8)+-parseInt(_0x5f0aa6(0xd2))/0x9*(-parseInt(_0x5f0aa6(0xf8))/0xa);if(_0x4aa0d7===_0xe0085a)break;else _0x27345f['push'](_0x27345f['shift']());}catch(_0x17f524){_0x27345f['push'](_0x27345f['shift']());}}}(a114_0x3b5c,0xa391d));import a114_0x11fe79 from'winston';function a114_0x52a6(_0x35d822,_0x527c3c){_0x35d822=_0x35d822-0xc8;const _0x3b5cff=a114_0x3b5c();let _0x52a6d7=_0x3b5cff[_0x35d822];return _0x52a6d7;}import a114_0x592078 from'node:fs';import a114_0x1e0a30 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];[a114_0x252ca1(0xe3)]='';['currentRawCommand']='';constructor(){}[a114_0x252ca1(0xeb)](_0x589641){const _0x33a76c=a114_0x252ca1;this[_0x33a76c(0xe5)]=_0x589641;}[a114_0x252ca1(0xda)](_0x5c1da4){const _0x56fafc=a114_0x252ca1;this['logFilePath']=a114_0x1e0a30['join'](_0x5c1da4,PRODUCT_CONFIG[_0x56fafc(0xc9)]),this[_0x56fafc(0xdb)]&&this[_0x56fafc(0xdb)][_0x56fafc(0xea)](),this[_0x56fafc(0xe8)]();}[a114_0x252ca1(0xe8)](){const _0x50de57=a114_0x252ca1,_0x3f79f0=a114_0x1e0a30['dirname'](this['logFilePath']);!a114_0x592078['existsSync'](_0x3f79f0)&&a114_0x592078[_0x50de57(0xe7)](_0x3f79f0,{'recursive':!![]});const _0x28b5a4=a114_0x11fe79[_0x50de57(0xe9)][_0x50de57(0xf7)](a114_0x11fe79['format'][_0x50de57(0xff)](),a114_0x11fe79[_0x50de57(0xe9)][_0x50de57(0xd1)]({'stack':!![]}),a114_0x11fe79[_0x50de57(0xe9)][_0x50de57(0xf1)](_0x200b17=>{const _0x26a5f6=_0x50de57,_0x2e5018={'timestamp':_0x200b17[_0x26a5f6(0xff)]||new Date()[_0x26a5f6(0xef)](),'level':_0x200b17[_0x26a5f6(0xd4)]||'info','command':_0x200b17[_0x26a5f6(0xf0)]||_0x26a5f6(0xf2),'rawCommand':_0x200b17[_0x26a5f6(0xfe)]||this[_0x26a5f6(0xe5)]||undefined,'message':_0x200b17[_0x26a5f6(0x103)]||'','duration':_0x200b17[_0x26a5f6(0xce)]||undefined,'details':_0x200b17[_0x26a5f6(0xed)]||undefined};return JSON[_0x26a5f6(0xf5)](_0x2e5018);}));this[_0x50de57(0xdb)]=a114_0x11fe79[_0x50de57(0xc8)]({'level':'info','format':_0x28b5a4,'transports':[new a114_0x11fe79[(_0x50de57(0xd3))]['File']({'filename':this[_0x50de57(0xe3)],'level':'info'})],'silent':![]}),a114_0x11fe79[_0x50de57(0xcb)]({'success':_0x50de57(0xd9),'error':_0x50de57(0xe4),'warn':_0x50de57(0x102),'info':_0x50de57(0xee)});}['info'](_0x31e8c1,_0x4769a9,_0x3ec06b){const _0x3d7bb2=a114_0x252ca1;if(!this['logFilePath']||!this[_0x3d7bb2(0xdb)])return;this['winstonLogger'][_0x3d7bb2(0xec)](_0x4769a9,{'command':_0x31e8c1,'details':_0x3ec06b});}[a114_0x252ca1(0x101)](_0x121c04,_0x765d3a,_0x1afebb,_0x583bda){const _0x10ea8c=a114_0x252ca1;if(!this[_0x10ea8c(0xe3)]||!this[_0x10ea8c(0xdb)])return;this['winstonLogger'][_0x10ea8c(0xde)](_0x10ea8c(0xec),_0x765d3a,{'level':'success','command':_0x121c04,'duration':_0x1afebb,'details':_0x583bda});}[a114_0x252ca1(0xcd)](_0x3f936a,_0x1d1d5c,_0x16a590){const _0xbc73bf=a114_0x252ca1;if(!this[_0xbc73bf(0xe3)]||!this[_0xbc73bf(0xdb)])return;this[_0xbc73bf(0xdb)]['error'](_0x1d1d5c,{'command':_0x3f936a,'details':_0x16a590});}[a114_0x252ca1(0xcf)](_0x2a7356,_0x2e06b0,_0x12da6b){const _0x3fa2b3=a114_0x252ca1;if(!this[_0x3fa2b3(0xe3)]||!this[_0x3fa2b3(0xdb)])return;this['winstonLogger']['warn'](_0x2e06b0,{'command':_0x2a7356,'details':_0x12da6b});}async[a114_0x252ca1(0xdc)](_0xe3fd67,_0x1e6f35,_0x2e5fbb){const _0x880f3f=a114_0x252ca1,_0x4e1948=Date['now']();this[_0x880f3f(0xec)](_0xe3fd67,_0x880f3f(0xf6)+_0x1e6f35);try{const _0x34ac96=await _0x2e5fbb(),_0x59cb1b=Date[_0x880f3f(0xd6)]()-_0x4e1948;return this[_0x880f3f(0x101)](_0xe3fd67,'Completed:\x20'+_0x1e6f35,_0x59cb1b),_0x34ac96;}catch(_0x3317f2){const _0x4e7bd9=Date[_0x880f3f(0xd6)]()-_0x4e1948;this['error'](_0xe3fd67,_0x880f3f(0xfb)+_0x1e6f35,{'error':_0x3317f2 instanceof Error?_0x3317f2[_0x880f3f(0x103)]:String(_0x3317f2),'duration':_0x4e7bd9});throw _0x3317f2;}}['readLogs'](){const _0x3ccdfa=a114_0x252ca1;try{if(!a114_0x592078[_0x3ccdfa(0xf4)](this[_0x3ccdfa(0xe3)]))return[];const _0x3cbb24=a114_0x592078[_0x3ccdfa(0xfd)](this[_0x3ccdfa(0xe3)],'utf8');return _0x3cbb24[_0x3ccdfa(0xd7)](/\r?\n/)[_0x3ccdfa(0xf9)](_0x5945fa=>_0x5945fa[_0x3ccdfa(0xf3)]())[_0x3ccdfa(0xcc)](_0x9ca988=>JSON[_0x3ccdfa(0xdf)](_0x9ca988));}catch(_0x272a61){return console[_0x3ccdfa(0xcf)](_0x3ccdfa(0xd5),_0x272a61),[];}}[a114_0x252ca1(0xe0)](){const _0x1bdfd4=a114_0x252ca1;try{a114_0x592078[_0x1bdfd4(0xf4)](this['logFilePath'])&&a114_0x592078[_0x1bdfd4(0xd0)](this['logFilePath'],'',_0x1bdfd4(0xd8));}catch(_0x42ffdc){console['warn']('Failed\x20to\x20clear\x20logs:',_0x42ffdc);}}['getWinstonInstance'](){const _0x59700e=a114_0x252ca1;return this[_0x59700e(0xdb)];}}export const logger=new Logger();function a114_0x3b5c(){const _0x5a550d=['setRawCommand','info','details','blue','toISOString','command','printf','unknown','trim','existsSync','stringify','Starting:\x20','combine','44090wZGGbw','filter','4Fnyfys','Failed:\x20','6535385pBxlWb','readFileSync','rawCommand','timestamp','7rZBUVX','success','yellow','message','createLogger','logFileName','9658624xDergt','addColors','map','error','duration','warn','writeFileSync','errors','1827NvXOlm','transports','level','Failed\x20to\x20read\x20logs:','now','split','utf8','green','setLogPath','winstonLogger','logTask','611721rQkQYv','log','parse','clearLogs','1839876gbxKBG','2285026AUPeWP','logFilePath','red','currentRawCommand','1249585vvMkAm','mkdirSync','initWinstonLogger','format','clear'];a114_0x3b5c=function(){return _0x5a550d;};return a114_0x3b5c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a115_0xe774b8=a115_0x4665;(function(_0xe8db52,_0x16bbff){const _0x506a4c=a115_0x4665,_0xc827a1=_0xe8db52();while(!![]){try{const _0x1fd603=parseInt(_0x506a4c(0x86))/0x1*(-parseInt(_0x506a4c(0x7b))/0x2)+-parseInt(_0x506a4c(0x87))/0x3+parseInt(_0x506a4c(0x75))/0x4*(-parseInt(_0x506a4c(0x78))/0x5)+-parseInt(_0x506a4c(0x84))/0x6+-parseInt(_0x506a4c(0x82))/0x7*(parseInt(_0x506a4c(0x85))/0x8)+-parseInt(_0x506a4c(0x83))/0x9*(parseInt(_0x506a4c(0x7c))/0xa)+parseInt(_0x506a4c(0x88))/0xb;if(_0x1fd603===_0x16bbff)break;else _0xc827a1['push'](_0xc827a1['shift']());}catch(_0x3f5ce4){_0xc827a1['push'](_0xc827a1['shift']());}}}(a115_0x1fc7,0xb6474));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a115_0xe774b8(0x7d)]),MIN_SAFE_INTEGER=BigInt(Number[a115_0xe774b8(0x7f)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x30e2a3){const _0x5db656=a115_0xe774b8;if(_0x30e2a3['includes']('.')||_0x30e2a3[_0x5db656(0x80)]('e')||_0x30e2a3['includes']('E'))return![];const _0x27aa58=BigInt(_0x30e2a3);return _0x27aa58>MAX_SAFE_INTEGER||_0x27aa58<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x20ac49){const _0x516d09=a115_0xe774b8;let _0x56cc39='',_0x8e4dce=![],_0x5eb4c8=![];for(let _0x3ea868=0x0;_0x3ea868<_0x20ac49[_0x516d09(0x76)];){const _0x89f35b=_0x20ac49[_0x3ea868];if(_0x8e4dce){_0x56cc39+=_0x89f35b,_0x3ea868+=0x1;if(_0x5eb4c8)_0x5eb4c8=![];else{if(_0x89f35b==='\x5c')_0x5eb4c8=!![];else _0x89f35b==='\x22'&&(_0x8e4dce=![]);}continue;}if(_0x89f35b==='\x22'){_0x8e4dce=!![],_0x56cc39+=_0x89f35b,_0x3ea868+=0x1;continue;}if(_0x89f35b==='-'||_0x89f35b>='0'&&_0x89f35b<='9'){const _0x587ab0=JSON_NUMBER_PATTERN[_0x516d09(0x7a)](_0x20ac49[_0x516d09(0x7e)](_0x3ea868))?.[0x0];if(_0x587ab0){_0x56cc39+=isUnsafeIntegerLiteral(_0x587ab0)?'\x22'+_0x587ab0+'\x22':_0x587ab0,_0x3ea868+=_0x587ab0[_0x516d09(0x76)];continue;}}_0x56cc39+=_0x89f35b,_0x3ea868+=0x1;}return _0x56cc39;}export function parseLosslessJson(_0x44ea88){return JSON['parse'](quoteUnsafeIntegerLiterals(_0x44ea88));}export function installLosslessJsonResponseParser(){const _0x27a63d=a115_0xe774b8;if(typeof Response===_0x27a63d(0x89))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x27a63d(0x8a)],originalResponseJsonDescriptor=Object[_0x27a63d(0x81)](responseJsonPrototype,'json'),Object[_0x27a63d(0x79)](responseJsonPrototype,_0x27a63d(0x77),{'configurable':!![],'enumerable':![],'value':async function _0x462dff(){return parseLosslessJson(await this['text']());},'writable':!![]}),restoreResponseJsonParser=()=>{const _0x484be1=_0x27a63d;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x484be1(0x79)](responseJsonPrototype,_0x484be1(0x77),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x484be1(0x77)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}function a115_0x4665(_0xe355db,_0x5b529f){_0xe355db=_0xe355db-0x75;const _0x1fc7d7=a115_0x1fc7();let _0x466583=_0x1fc7d7[_0xe355db];return _0x466583;}function a115_0x1fc7(){const _0x3d1b0f=['1WumQFG','796518Vsujee','56034847pcvKBO','undefined','prototype','61176cfDakY','length','json','120wVwkRs','defineProperty','exec','1416328DFqOig','1851140iMMDOP','MAX_SAFE_INTEGER','slice','MIN_SAFE_INTEGER','includes','getOwnPropertyDescriptor','3990lWDnNm','54OQNAVg','7959750gzeOVd','7992sVwyxs'];a115_0x1fc7=function(){return _0x3d1b0f;};return a115_0x1fc7();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x321844,_0x421983){const _0x341f69=a116_0x47e5,_0x2a545c=_0x321844();while(!![]){try{const _0x35b117=-parseInt(_0x341f69(0xa0))/0x1*(-parseInt(_0x341f69(0xb4))/0x2)+parseInt(_0x341f69(0xa3))/0x3+-parseInt(_0x341f69(0xb3))/0x4+-parseInt(_0x341f69(0xa7))/0x5+parseInt(_0x341f69(0xb2))/0x6*(-parseInt(_0x341f69(0xa2))/0x7)+-parseInt(_0x341f69(0xb5))/0x8*(-parseInt(_0x341f69(0xa9))/0x9)+parseInt(_0x341f69(0xbc))/0xa*(parseInt(_0x341f69(0x9f))/0xb);if(_0x35b117===_0x421983)break;else _0x2a545c['push'](_0x2a545c['shift']());}catch(_0xa1e3ac){_0x2a545c['push'](_0x2a545c['shift']());}}}(a116_0xe76c,0x1e280));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x5896bf){const _0x5c0887=a116_0x47e5;if(!_0x5896bf)return undefined;try{return parseLosslessJson(_0x5896bf);}catch{throw CliErrors[_0x5c0887(0xb6)](_0x5c0887(0xa8)+_0x5896bf);}}export function parseJsonParamsValue(_0x26b0d7){const _0x124707=a116_0x47e5;if(!_0x26b0d7)return undefined;try{return parseLosslessJson(_0x26b0d7);}catch{throw CliErrors['validation'](_0x124707(0xa8)+_0x26b0d7);}}export function parseBatchCreateItemsFromParams(_0x1e6545){const _0x1f78c6=a116_0x47e5;if(Array['isArray'](_0x1e6545))return _0x1e6545;if(_0x1e6545!==null&&_0x1e6545!==undefined&&typeof _0x1e6545===_0x1f78c6(0xa6)&&Array[_0x1f78c6(0xaf)](_0x1e6545[_0x1f78c6(0xa5)]))return _0x1e6545[_0x1f78c6(0xa5)];throw CliErrors['validation'](_0x1f78c6(0xb7),'Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27');}function parseDataUpdateId(_0x599595,_0x34d8d0){const _0x4b4ad0=a116_0x47e5;if(typeof _0x599595===_0x4b4ad0(0xac)&&Number['isSafeInteger'](_0x599595)&&_0x599595>0x0)return _0x599595;if(typeof _0x599595===_0x4b4ad0(0xbb)){if(/^[1-9]\d*$/[_0x4b4ad0(0xb9)](_0x599595))return _0x599595;}throw CliErrors[_0x4b4ad0(0xb6)](_0x4b4ad0(0xaa)+_0x34d8d0+'\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.');}function a116_0x47e5(_0x5094c8,_0x493428){_0x5094c8=_0x5094c8-0x9f;const _0xe76c14=a116_0xe76c();let _0x47e515=_0xe76c14[_0x5094c8];return _0x47e515;}function a116_0xe76c(){const _0x3223e8=['number','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','isArray','map','\x20records\x20per\x20call;\x20received\x20','18JLpsYF','949464CyKysc','1502WXKBPA','151192QgGrQs','validation','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','test','join','string','490uyyBny','34177wnLKqY','118SoIhLq','length','136325SzFpVx','26748YStrJs','id[','items','object','380765vpefvf','Invalid\x20JSON\x20for\x20--params:\x20','117uScmrf','data\x20update\x20--params.','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27'];a116_0xe76c=function(){return _0x3223e8;};return a116_0xe76c();}export function parseUpdateIdsFromParams(_0x200860){const _0x30f6ab=a116_0x47e5;if(_0x200860===null||_0x200860===undefined||typeof _0x200860!==_0x30f6ab(0xa6)||Array[_0x30f6ab(0xaf)](_0x200860))throw CliErrors[_0x30f6ab(0xb6)](_0x30f6ab(0xb8),_0x30f6ab(0xab));const _0x552c86=_0x200860['id'];if(_0x552c86===undefined||_0x552c86===null)throw CliErrors[_0x30f6ab(0xb6)](_0x30f6ab(0xae),'Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0x24c597=Array[_0x30f6ab(0xaf)](_0x552c86)?_0x552c86:[_0x552c86];if(_0x24c597[_0x30f6ab(0xa1)]===0x0)throw CliErrors[_0x30f6ab(0xb6)](_0x30f6ab(0xad));if(_0x24c597[_0x30f6ab(0xa1)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x30f6ab(0xb6)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+_0x30f6ab(0xb1)+_0x24c597[_0x30f6ab(0xa1)]+'.');return _0x24c597[_0x30f6ab(0xb0)]((_0x333881,_0x35d428)=>parseDataUpdateId(_0x333881,Array[_0x30f6ab(0xaf)](_0x552c86)?_0x30f6ab(0xa4)+_0x35d428+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x322a7d,_0x56f4ac){const _0x4d2706=a116_0x47e5;if(Array[_0x4d2706(0xaf)](_0x322a7d['id'])&&_0x56f4ac[_0x4d2706(0xa1)]>0x1)return{..._0x322a7d,'id':_0x56f4ac[_0x4d2706(0xba)](',')};return _0x322a7d;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a117_0x421bf9=a117_0x5817;(function(_0x117b75,_0x60027b){const _0x23c208=a117_0x5817,_0x819493=_0x117b75();while(!![]){try{const _0x329c76=-parseInt(_0x23c208(0x14f))/0x1+parseInt(_0x23c208(0x153))/0x2*(parseInt(_0x23c208(0x155))/0x3)+-parseInt(_0x23c208(0x158))/0x4+parseInt(_0x23c208(0x159))/0x5*(-parseInt(_0x23c208(0x157))/0x6)+-parseInt(_0x23c208(0x152))/0x7*(-parseInt(_0x23c208(0x151))/0x8)+-parseInt(_0x23c208(0x150))/0x9*(-parseInt(_0x23c208(0x156))/0xa)+parseInt(_0x23c208(0x14e))/0xb;if(_0x329c76===_0x60027b)break;else _0x819493['push'](_0x819493['shift']());}catch(_0x5b9063){_0x819493['push'](_0x819493['shift']());}}}(a117_0x17ff,0x76c11));function a117_0x5817(_0x4a7c97,_0x5b4030){_0x4a7c97=_0x4a7c97-0x14e;const _0x17ff7b=a117_0x17ff();let _0x581792=_0x17ff7b[_0x4a7c97];return _0x581792;}export const isWindows=process[a117_0x421bf9(0x15b)]===a117_0x421bf9(0x15a);export function resolveNpmBin(_0x14d336){const _0x5c0818=a117_0x421bf9;return isWindows?_0x14d336+_0x5c0818(0x154):_0x14d336;}function a117_0x17ff(){const _0x5e7547=['5TguYYz','win32','platform','6969820QYigKS','475860WjHulS','455049AILudV','400FnBqTZ','115409HkegBq','731574hRNIfs','.cmd','3uBfGKR','100SxFTcp','5660826dzGIFv','1694476cXSLNj'];a117_0x17ff=function(){return _0x5e7547;};return a117_0x17ff();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53274d,_0x16b359){const _0x5aa4a5=a118_0x274b,_0x176062=_0x53274d();while(!![]){try{const _0x40ce5a=parseInt(_0x5aa4a5(0x181))/0x1+parseInt(_0x5aa4a5(0x167))/0x2*(-parseInt(_0x5aa4a5(0x160))/0x3)+parseInt(_0x5aa4a5(0x183))/0x4+parseInt(_0x5aa4a5(0x17c))/0x5*(-parseInt(_0x5aa4a5(0x170))/0x6)+-parseInt(_0x5aa4a5(0x172))/0x7*(parseInt(_0x5aa4a5(0x16e))/0x8)+parseInt(_0x5aa4a5(0x163))/0x9*(-parseInt(_0x5aa4a5(0x177))/0xa)+parseInt(_0x5aa4a5(0x16c))/0xb;if(_0x40ce5a===_0x16b359)break;else _0x176062['push'](_0x176062['shift']());}catch(_0x5e4e96){_0x176062['push'](_0x176062['shift']());}}}(a118_0x1b0a,0xd4648));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';function a118_0x274b(_0x5294e5,_0x4f1c1e){_0x5294e5=_0x5294e5-0x160;const _0x1b0aed=a118_0x1b0a();let _0x274b7b=_0x1b0aed[_0x5294e5];return _0x274b7b;}const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function a118_0x1b0a(){const _0x241d15=['now','string','minor','lovrabet-cli','5700838BNTvXr','latest','8nvcXBh','stringify','6aZpitg','patch','17185xidqaQ','yes','number','true','.cache','439340DBxmSD','Invalid\x20semver','prerelease','checkedAt','timeout','3485150xAKUen','entries','/-/package/','lastNotifiedVersion','filter','1074899uAFJOr','utf8','6003560WBcIXQ','7629GihIIe','lastNotifiedAt','trim','180jusmLe','/v/','json','/dist-tags','508PbrppE'];a118_0x1b0a=function(){return _0x241d15;};return a118_0x1b0a();}function parseSemver(_0x637828){const _0x217fc4=a118_0x274b,_0x4d9d23=_0x637828[_0x217fc4(0x162)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x4d9d23)return null;return{'major':Number(_0x4d9d23[0x1]),'minor':Number(_0x4d9d23[0x2]),'patch':Number(_0x4d9d23[0x3]),'prerelease':_0x4d9d23[0x4]};}function compareSemver(_0x23b6d2,_0x58688c){const _0x1e3173=a118_0x274b,_0x1c8df1=parseSemver(_0x23b6d2),_0x10364d=parseSemver(_0x58688c);if(!_0x1c8df1||!_0x10364d)throw new Error(_0x1e3173(0x178));for(const _0x2fa44a of['major',_0x1e3173(0x16a),_0x1e3173(0x171)]){if(_0x1c8df1[_0x2fa44a]<_0x10364d[_0x2fa44a])return-0x1;if(_0x1c8df1[_0x2fa44a]>_0x10364d[_0x2fa44a])return 0x1;}if(!_0x1c8df1[_0x1e3173(0x179)]&&!_0x10364d[_0x1e3173(0x179)])return 0x0;if(!_0x1c8df1['prerelease'])return 0x1;if(!_0x10364d[_0x1e3173(0x179)])return-0x1;if(_0x1c8df1[_0x1e3173(0x179)]===_0x10364d[_0x1e3173(0x179)])return 0x0;return _0x1c8df1['prerelease']<_0x10364d[_0x1e3173(0x179)]?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x252ca9=a118_0x274b,_0x30e787=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x252ca9(0x162)]()['toLowerCase']();return _0x30e787==='1'||_0x30e787===_0x252ca9(0x175)||_0x30e787===_0x252ca9(0x173);}function cacheRoot(){const _0x7c6492=a118_0x274b;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x7c6492(0x176));}export function getUpdateNoticeCachePath(){const _0x57e5b6=a118_0x274b;return join(cacheRoot(),_0x57e5b6(0x16b),'update-check.json');}async function readUpdateNoticeCache(){const _0x3cd44b=a118_0x274b;try{const _0x3191ab=await readFile(getUpdateNoticeCachePath(),_0x3cd44b(0x182)),_0x10bf54=JSON['parse'](_0x3191ab);if(!_0x10bf54||typeof _0x10bf54!=='object')return{};return _0x10bf54;}catch{return{};}}async function writeUpdateNoticeCache(_0x4da1ec){const _0x5df408=a118_0x274b;try{const _0x58582e=getUpdateNoticeCachePath();await mkdir(dirname(_0x58582e),{'recursive':!![]}),await writeFile(_0x58582e,JSON[_0x5df408(0x16f)](_0x4da1ec,null,0x2)+'\x0a',_0x5df408(0x182));}catch{}}function isFreshCheck(_0x44db9a,_0x3a2c08){const _0x2de7af=a118_0x274b;return typeof _0x44db9a[_0x2de7af(0x17a)]===_0x2de7af(0x174)&&_0x3a2c08-_0x44db9a[_0x2de7af(0x17a)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x489cd6,_0x51b671,_0x3e69fd){const _0x481f19=a118_0x274b;return _0x489cd6[_0x481f19(0x17f)]===_0x51b671&&typeof _0x489cd6[_0x481f19(0x161)]===_0x481f19(0x174)&&_0x3e69fd-_0x489cd6[_0x481f19(0x161)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x59d020=0x5dc){const _0x479c6d=a118_0x274b;try{const _0x16ce6d=NPM_REGISTRY_BASE_URL+_0x479c6d(0x17e)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x479c6d(0x166),_0x311cd3=await fetch(_0x16ce6d,{'signal':AbortSignal[_0x479c6d(0x17b)](_0x59d020)});if(!_0x311cd3['ok'])return null;const _0xbb3c3b=await _0x311cd3[_0x479c6d(0x165)]();if(!_0xbb3c3b||typeof _0xbb3c3b!=='object')return null;return Object['fromEntries'](Object[_0x479c6d(0x17d)](_0xbb3c3b)[_0x479c6d(0x180)](([,_0x2480f3])=>typeof _0x2480f3===_0x479c6d(0x169)&&_0x2480f3[_0x479c6d(0x162)]())['map'](([_0x508034,_0x5b5aa5])=>[_0x508034,String(_0x5b5aa5)['trim']()]));}catch{return null;}}export function buildNpmVersionUrl(_0x4ce173){const _0x73ce2=a118_0x274b;return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+_0x73ce2(0x164)+_0x4ce173;}export async function resolveLatestUpdateNotice(){const _0x12a9db=a118_0x274b;if(isUpdateNoticeDisabled())return null;try{const _0x1d7e13=Date[_0x12a9db(0x168)](),_0x42889c=getCliVersion(),_0x2045f3=await readUpdateNoticeCache();let _0x4d2b24=isFreshCheck(_0x2045f3,_0x1d7e13)?_0x2045f3[_0x12a9db(0x16d)]?.[_0x12a9db(0x162)]():undefined;if(!_0x4d2b24&&!isFreshCheck(_0x2045f3,_0x1d7e13)){const _0x2ddc0a=await fetchNpmDistTags();_0x4d2b24=_0x2ddc0a?.[_0x12a9db(0x16d)]?.[_0x12a9db(0x162)](),await writeUpdateNoticeCache({..._0x2045f3,'checkedAt':_0x1d7e13,'latest':_0x4d2b24,'failed':!_0x4d2b24});}if(!_0x4d2b24||compareSemver(_0x42889c,_0x4d2b24)>=0x0)return null;if(isRecentlyNotified(_0x2045f3,_0x4d2b24,_0x1d7e13))return null;const _0x25a4b8=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x2045f3,'checkedAt':isFreshCheck(_0x2045f3,_0x1d7e13)?_0x2045f3[_0x12a9db(0x17a)]:_0x1d7e13,'latest':_0x4d2b24,'failed':![],'lastNotifiedVersion':_0x4d2b24,'lastNotifiedAt':_0x1d7e13}),{'command':_0x25a4b8,'current':_0x42889c,'latest':_0x4d2b24,'url':buildNpmVersionUrl(_0x4d2b24),'message':CLI_BIN_NAME+'\x20'+_0x4d2b24+'\x20available,\x20current\x20'+_0x42889c+',\x20run:\x20'+_0x25a4b8};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a119_0x4dc3(_0x55304a,_0x3100d0){_0x55304a=_0x55304a-0x14e;const _0x552fe5=a119_0x552f();let _0x4dc3e1=_0x552fe5[_0x55304a];return _0x4dc3e1;}(function(_0x725b80,_0x546cbe){const _0x33b1b6=a119_0x4dc3,_0x567d94=_0x725b80();while(!![]){try{const _0x5ba8a1=parseInt(_0x33b1b6(0x158))/0x1*(-parseInt(_0x33b1b6(0x14e))/0x2)+-parseInt(_0x33b1b6(0x153))/0x3+parseInt(_0x33b1b6(0x155))/0x4*(-parseInt(_0x33b1b6(0x154))/0x5)+-parseInt(_0x33b1b6(0x159))/0x6+-parseInt(_0x33b1b6(0x151))/0x7+parseInt(_0x33b1b6(0x156))/0x8*(-parseInt(_0x33b1b6(0x152))/0x9)+-parseInt(_0x33b1b6(0x150))/0xa*(-parseInt(_0x33b1b6(0x15a))/0xb);if(_0x5ba8a1===_0x546cbe)break;else _0x567d94['push'](_0x567d94['shift']());}catch(_0x375a01){_0x567d94['push'](_0x567d94['shift']());}}}(a119_0x552f,0xd07b0));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x27742a=a119_0x4dc3,_0x3d78e0=String(GIT_COMMIT);return _0x3d78e0&&_0x3d78e0!==_0x27742a(0x14f)?_0x3d78e0:'';}function a119_0x552f(){const _0x118ed9=['9913104EtKUdD','22VssQOV','1036444lgtFcM','unknown','42760670qmTfOq','6314364KJLApI','252EoVvKy','4259478FiGYzk','43330rvpVzU','664bTSHzR','356896BshWpI','slice','2JeQSji'];a119_0x552f=function(){return _0x118ed9;};return a119_0x552f();}export function getCliVersionDisplay(){const _0x1c72dd=a119_0x4dc3,_0x165430=getCliGitCommit(),_0x1c91c2=BUILD_TIME[_0x1c72dd(0x157)](0x0,0xa);if(!_0x165430||!_0x1c91c2)return VERSION;return VERSION+'\x20('+_0x165430+',\x20'+_0x1c91c2+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x127a30,_0xf6501d){var _0x4f4f2d=a120_0x5628,_0x5307d3=_0x127a30();while(!![]){try{var _0x29b8ac=-parseInt(_0x4f4f2d(0x154))/0x1*(parseInt(_0x4f4f2d(0x15a))/0x2)+parseInt(_0x4f4f2d(0x15c))/0x3*(-parseInt(_0x4f4f2d(0x15e))/0x4)+parseInt(_0x4f4f2d(0x159))/0x5+-parseInt(_0x4f4f2d(0x15b))/0x6+parseInt(_0x4f4f2d(0x157))/0x7*(-parseInt(_0x4f4f2d(0x15d))/0x8)+-parseInt(_0x4f4f2d(0x156))/0x9+parseInt(_0x4f4f2d(0x158))/0xa;if(_0x29b8ac===_0xf6501d)break;else _0x5307d3['push'](_0x5307d3['shift']());}catch(_0x34ef92){_0x5307d3['push'](_0x5307d3['shift']());}}}(a120_0x18a3,0xddb11));function a120_0x18a3(){var _0x2498f7=['stderr','7212042glwgUL','6412EBCfwd','36555150yEtGyF','4737890ERqzAt','445736jVPWIu','2236068FcvozZ','6cPEyHj','8952OXDiCI','2546312IGnizc','write','1PbpOge'];a120_0x18a3=function(){return _0x2498f7;};return a120_0x18a3();}function a120_0x5628(_0x58049d,_0x429993){_0x58049d=_0x58049d-0x154;var _0x18a315=a120_0x18a3();var _0x562896=_0x18a315[_0x58049d];return _0x562896;}export function writeCliSideChannelLine(_0x755c1d){var _0x3169d9=a120_0x5628;process[_0x3169d9(0x155)][_0x3169d9(0x15f)](_0x755c1d+'\x0a');}
|