@lovrabet/lovrabet-cli 2.1.13 → 2.1.14-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/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/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 a105_0x4e1bcc=a105_0x4812;function a105_0x5c00(){const _0xd50cb7=['agentsSkillsDir','9954HnYQjd','1585eSjzfk','.agents','2098768LLRTrN','\x20for\x20local\x20path:\x20','includes','cacheRoot','homeDirName','13868VdJxXW','7YnTXVc','skills','homeDir','SKILL_ROOT','workbuddySkillsDir','1943430WAkEUX','2710266bdXzoN','validation','claudeSkillsDir','696322CJKlGY','cache','.claude','3500nsfITg','.workbuddy','skillCode','trim','appCode','path\x20segment','129911Scdiik','filter'];a105_0x5c00=function(){return _0xd50cb7;};return a105_0x5c00();}(function(_0xec5148,_0x46bcf1){const _0x527223=a105_0x4812,_0x24e69e=_0xec5148();while(!![]){try{const _0x1ebc68=parseInt(_0x527223(0x17f))/0x1+parseInt(_0x527223(0x176))/0x2+parseInt(_0x527223(0x173))/0x3+-parseInt(_0x527223(0x18a))/0x4*(parseInt(_0x527223(0x183))/0x5)+parseInt(_0x527223(0x172))/0x6*(-parseInt(_0x527223(0x18b))/0x7)+parseInt(_0x527223(0x185))/0x8+parseInt(_0x527223(0x182))/0x9*(parseInt(_0x527223(0x179))/0xa);if(_0x1ebc68===_0x46bcf1)break;else _0x24e69e['push'](_0x24e69e['shift']());}catch(_0x491703){_0x24e69e['push'](_0x24e69e['shift']());}}}(a105_0x5c00,0x946fc));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';function a105_0x4812(_0xfe747c,_0x20a232){_0xfe747c=_0xfe747c-0x171;const _0x5c006b=a105_0x5c00();let _0x481200=_0x5c006b[_0xfe747c];return _0x481200;}import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x252fe7={}){const _0x494b9c=a105_0x4812,_0x3da28b=_0x252fe7[_0x494b9c(0x18d)]??homedir(),_0x21e3d5=resolve(_0x3da28b,PRODUCT_CONFIG[_0x494b9c(0x189)],_0x494b9c(0x177)),_0x2fae05=trimmedEnv(_0x494b9c(0x18e)),_0xe51d52=trimmedEnv('CLAUDE_SKILL_ROOT'),_0x3301ed=resolve(_0x3da28b,_0x494b9c(0x17a)),_0x55e5a7=_0x252fe7[_0x494b9c(0x171)]??(existsSync(_0x3301ed)?resolve(_0x3301ed,_0x494b9c(0x18c)):undefined);return{'homeDir':_0x3da28b,'cacheRoot':_0x21e3d5,'managedRoot':resolve(_0x3da28b,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x252fe7[_0x494b9c(0x181)]??_0x2fae05??resolve(_0x3da28b,_0x494b9c(0x184),_0x494b9c(0x18c)),'claudeSkillsDir':_0x252fe7[_0x494b9c(0x175)]??_0xe51d52??resolve(_0x3da28b,_0x494b9c(0x178),_0x494b9c(0x18c)),'workbuddySkillsDir':_0x55e5a7};}export function runtimeAgentSkillRoots(_0x1191aa){const _0x8631f6=a105_0x4812;return[_0x1191aa[_0x8631f6(0x181)],_0x1191aa[_0x8631f6(0x175)],_0x1191aa[_0x8631f6(0x171)]][_0x8631f6(0x180)](_0x1b3a7c=>Boolean(_0x1b3a7c));}export function getRuntimeSkillCacheRoot(_0x2294b3,_0xa715e4,_0x393ffb={}){const _0x390c30=a105_0x4812,_0x33829c=resolveSkillSyncPaths(_0x393ffb);return resolve(_0x33829c[_0x390c30(0x188)],_0x2294b3,fingerprintAccessKey(_0xa715e4),_0x390c30(0x18c));}export function getRuntimeSkillDir(_0x5c630d,_0x5c4d6d,_0x53b520,_0x167cc3,_0x28d457,_0x288652={}){const _0x2fb837=a105_0x4812;return resolve(getRuntimeSkillCacheRoot(_0x5c630d,_0x5c4d6d,_0x288652),safePathSegment(_0x53b520,_0x2fb837(0x17d)),_0x167cc3,safePathSegment(_0x28d457,_0x2fb837(0x17b)));}export function safePathSegment(_0x3ea0b8,_0x859b6e=a105_0x4e1bcc(0x17e)){const _0x58491f=a105_0x4e1bcc;if(!_0x3ea0b8||_0x3ea0b8[_0x58491f(0x187)]('/')||_0x3ea0b8[_0x58491f(0x187)]('\x5c')||_0x3ea0b8[_0x58491f(0x187)]('..'))throw CliErrors[_0x58491f(0x174)]('Unsafe\x20'+_0x859b6e+_0x58491f(0x186)+_0x3ea0b8);return _0x3ea0b8;}function trimmedEnv(_0xf9ce0c){const _0x4a48fd=a105_0x4e1bcc,_0x140fe0=productEnv(_0xf9ce0c)?.[_0x4a48fd(0x17c)]();return _0x140fe0?_0x140fe0:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x10db44,_0x2e775c){const _0x3785e4=a106_0x35de,_0x222d19=_0x10db44();while(!![]){try{const _0x2a78bc=parseInt(_0x3785e4(0x115))/0x1*(parseInt(_0x3785e4(0x11f))/0x2)+-parseInt(_0x3785e4(0x108))/0x3*(parseInt(_0x3785e4(0x125))/0x4)+-parseInt(_0x3785e4(0x11b))/0x5*(parseInt(_0x3785e4(0x11e))/0x6)+parseInt(_0x3785e4(0x136))/0x7*(parseInt(_0x3785e4(0x10e))/0x8)+-parseInt(_0x3785e4(0x111))/0x9+parseInt(_0x3785e4(0x103))/0xa*(-parseInt(_0x3785e4(0x129))/0xb)+parseInt(_0x3785e4(0x141))/0xc;if(_0x2a78bc===_0x2e775c)break;else _0x222d19['push'](_0x222d19['shift']());}catch(_0x3b9107){_0x222d19['push'](_0x222d19['shift']());}}}(a106_0x2081,0x3ba9c));function a106_0x35de(_0x311dcb,_0x5b8024){_0x311dcb=_0x311dcb-0x103;const _0x208173=a106_0x2081();let _0x35de9c=_0x208173[_0x311dcb];return _0x35de9c;}function a106_0x2081(){const _0x597f61=['Unable\x20to\x20resolve\x20skillCode\x20from\x20','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','slice','appCode','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Skill\x20metadata\x20appCode\x20\x22','dir','unknown','14665896CshPsf','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','files','tags','length','60DvpBOP','Invalid\x20','utf8','scope','company','282165oFGkTq','Skill\x20directory\x20not\x20found:\x20','isDirectory','skillName','boolean','ignoreMetadataScope','176WAYqxi','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','\x20has\x20scope=\x22','443997RnhCqV','pushedAt','isArray','allowAppCodeRetarget','81SxjVnk','description','filter','toLowerCase','sourceSessionId',',\x20or\x20directory\x20name.','215XOdfac','isFile','personal','67668sSuxEk','678MJpSRM','find','builtin','content','validation','path','16jddhzk','Remote\x20Skill\x20','object','manifest','201421GQWaGl','Missing\x20','skillCode','ignoreMetadataForPayload','match','metadata','replace','\x20name\x20for\x20SkillHub\x20slug\x20generation.','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','targetScope','version','\x20has\x20unsupported\x20scope\x20\x22','startsWith','4816idMpEF','(unknown)','trim'];a106_0x2081=function(){return _0x597f61;};return a106_0x2081();}import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a106_0x21443d}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(_0x1460db,_0x2ac8fe,_0x148375={}){const _0x59b231=a106_0x35de,_0x236427=resolvePushDirectoryRoot(_0x1460db),_0x5d03a6=readPushMetadataIfPresent(resolve(_0x236427,METADATA_FILE),{'ignoreInvalidMetadata':_0x148375['ignoreInvalidMetadata']});if(_0x5d03a6?.[_0x59b231(0x13c)]&&_0x5d03a6[_0x59b231(0x13c)]!==_0x2ac8fe&&!_0x148375[_0x59b231(0x114)]&&!_0x148375['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x59b231(0x123)](_0x59b231(0x13e)+_0x5d03a6[_0x59b231(0x13c)]+_0x59b231(0x142)+_0x2ac8fe+'\x22.');const _0x2e50bc=resolvePushSkillCode(_0x236427,_0x2ac8fe,_0x5d03a6,_0x148375);if(!_0x2e50bc)throw CliErrors['validation'](_0x59b231(0x139)+SKILL_FILE+',\x20'+METADATA_FILE+_0x59b231(0x11a));return{'dir':_0x236427,'skillCode':_0x2e50bc,'metadata':_0x5d03a6};}export function readPushDirectory(_0x500b3f,_0x38f8c7,_0x414498={}){const _0x36998a=a106_0x35de,_0xdda61e=resolvePushDirectoryIdentity(_0x500b3f,_0x38f8c7,_0x414498),_0x522c86=_0xdda61e[_0x36998a(0x13f)],_0x47dc4b=resolve(_0x522c86,SKILL_FILE);if(!existsSync(_0x47dc4b)||!lstatSync(_0x47dc4b)['isFile']())throw CliErrors['validation'](_0x36998a(0x12a)+SKILL_FILE+':\x20'+_0x47dc4b);const _0x2e1c7f=_0xdda61e[_0x36998a(0x12e)],_0x3dfae0=_0x414498[_0x36998a(0x132)]??_0x36998a(0x11d);if(!_0x414498['ignoreMetadataScope']&&_0x2e1c7f?.[_0x36998a(0x106)]===_0x36998a(0x121))throw CliErrors['validation'](_0x36998a(0x10f)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x2e1c7f[_0x36998a(0x106)]+'\x22.');if(!_0x414498[_0x36998a(0x10d)]&&_0x3dfae0==='personal'&&_0x2e1c7f?.[_0x36998a(0x106)]&&_0x2e1c7f[_0x36998a(0x106)]!==_0x36998a(0x11d))throw CliErrors['validation'](_0x36998a(0x13d)+METADATA_FILE+_0x36998a(0x110)+_0x2e1c7f[_0x36998a(0x106)]+'\x22.',_0x36998a(0x13a)+_0x522c86+_0x36998a(0x131));const _0x4dd3f5=scanSkillDirectory(_0x522c86),_0x28dea4=buildSkillPackage(_0x4dd3f5),_0x593be0=readFileSync(_0x47dc4b,_0x36998a(0x105)),_0x284fc9=_0xdda61e[_0x36998a(0x12b)],_0x251938=_0x414498[_0x36998a(0x12c)]?undefined:_0x2e1c7f,_0x95edca=readSkillDisplayName(_0x593be0);return{'skillCode':_0x284fc9,'metadata':_0x2e1c7f,'frontmatterDisplayName':_0x95edca,'input':{'skillCode':_0x284fc9,'skillName':_0x95edca??_0x251938?.[_0x36998a(0x10b)],'description':_0x251938?.[_0x36998a(0x116)],'content':_0x593be0,'files':_0x28dea4[_0x36998a(0x128)],'packageBase64':_0x28dea4['packageBase64'],'tags':_0x251938?.[_0x36998a(0x144)],'version':_0x251938?.[_0x36998a(0x133)],'sourceSessionId':_0x251938?.[_0x36998a(0x119)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x387874,_0x54942b,_0x26bf6f,_0x31c0e1={}){const _0x27a33=a106_0x35de,_0x326c2e=resolvePushDirectoryRoot(_0x387874),_0x1b426a=readPushMetadataIfPresent(resolve(_0x326c2e,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x4a04d4=requireRemoteScope(_0x54942b),_0x1b791d=readLocalSkillContent(_0x326c2e),_0x576582={..._0x54942b,'appCode':_0x54942b[_0x27a33(0x13c)]??_0x26bf6f,'skillName':_0x54942b[_0x27a33(0x10b)]??_0x1b426a?.[_0x27a33(0x10b)],'description':_0x54942b[_0x27a33(0x116)]??_0x1b426a?.[_0x27a33(0x116)],'tags':Array[_0x27a33(0x113)](_0x54942b['tags'])?_0x54942b[_0x27a33(0x144)]:_0x1b426a?.[_0x27a33(0x144)],'sourceSessionId':_0x54942b['sourceSessionId']??_0x1b426a?.[_0x27a33(0x119)],'content':_0x54942b[_0x27a33(0x122)]??_0x1b791d},_0x1bd0f8=buildMetadata(_0x576582,_0x4a04d4,_0x26bf6f,contentHash(_0x1b791d),_0x31c0e1['refreshedAt']);writeJsonAtomic(resolve(_0x326c2e,METADATA_FILE),_0x1bd0f8);}export function recordPushedRuntimeSkill(_0x3bba85,_0x474dde,_0x5b9b0e,_0x31295e={}){const _0x185029=a106_0x35de,_0x59db8e=resolvePushDirectoryRoot(_0x3bba85),_0x51a7f7=scanSkillDirectory(_0x59db8e),_0x5121ad=_0x51a7f7[_0x185029(0x120)](_0x32dd27=>_0x32dd27[_0x185029(0x124)]===SKILL_FILE),_0x4fb5f2=_0x5121ad?fileText(_0x5121ad):'',_0x144f70=tryNormalizePackageManifest(_0x474dde[_0x185029(0x143)]),_0x4a3d26={..._0x474dde,'content':_0x474dde['content']??_0x4fb5f2,'files':_0x144f70},_0x4427f1=_0x144f70?normalizeLocalFiles(_0x51a7f7)[_0x185029(0x117)](_0x5a0357=>_0x144f70[_0x185029(0x143)]['some'](_0x5d61bc=>_0x5d61bc[_0x185029(0x124)]===_0x5a0357[_0x185029(0x124)])):undefined,_0x289c4b=buildMetadata(_0x4a3d26,_0x31295e[_0x185029(0x106)]??_0x185029(0x11d),_0x5b9b0e,contentHash(_0x4a3d26['content']??''),_0x31295e[_0x185029(0x112)],_0x4427f1);writeJsonAtomic(resolve(_0x59db8e,METADATA_FILE),_0x289c4b);}export function deriveSkillCodeFromDirectory(_0x4d7712,_0x477a9f){const _0x2f4757=a106_0x35de,_0x954a1e=basename(resolve(_0x4d7712)),_0x3ab379=_0x477a9f+'--';return _0x954a1e[_0x2f4757(0x135)](_0x3ab379)?_0x954a1e[_0x2f4757(0x13b)](_0x3ab379[_0x2f4757(0x145)]):_0x954a1e;}function resolvePushSkillCode(_0x4e26e3,_0x4795ab,_0xf4ec87,_0x394bfd){const _0x40876b=a106_0x35de,_0x39d554=deriveSkillCodeFromSkillFile(_0x4e26e3)||deriveSkillCodeFromDirectory(_0x4e26e3,_0x4795ab);if(_0x394bfd['ignoreMetadataSkillCode'])return _0x39d554;return _0xf4ec87?.[_0x40876b(0x12b)]?.[_0x40876b(0x138)]()||_0x39d554;}function deriveSkillCodeFromSkillFile(_0x5f05cc){const _0x263b0f=a106_0x35de,_0x999373=resolve(_0x5f05cc,SKILL_FILE);if(!existsSync(_0x999373)||!lstatSync(_0x999373)['isFile']())return undefined;const _0x1d4511=readFileSync(_0x999373,_0x263b0f(0x105)),_0x4448ce=_0x1d4511[_0x263b0f(0x12d)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4448ce)return undefined;const _0x359be5=parseFrontmatterObject(_0x4448ce[0x1]??''),_0x50a613=scalarToString(_0x359be5?.['name']);return _0x50a613?slugifySkillName(_0x50a613):undefined;}function readSkillDisplayName(_0x5980cc){const _0x103de8=a106_0x35de,_0x24329e=_0x5980cc[_0x103de8(0x12d)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x24329e)return undefined;const _0x522c91=parseFrontmatterObject(_0x24329e[0x1]??'');return scalarToString(_0x522c91?.['displayName']);}function slugifySkillName(_0x16a6f5){const _0x284e51=a106_0x35de,_0x273572=_0x16a6f5[_0x284e51(0x138)]()[_0x284e51(0x118)]()[_0x284e51(0x12f)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x284e51(0x12f)](/^-+/,'')[_0x284e51(0x12f)](/-+$/,'')[_0x284e51(0x12f)](/-{2,}/g,'-');if(!_0x273572)throw CliErrors[_0x284e51(0x123)](_0x284e51(0x104)+SKILL_FILE+_0x284e51(0x130));return _0x273572;}function parseFrontmatterObject(_0x51fe1f){const _0x26eec2=a106_0x35de;try{const _0x4107b5=a106_0x21443d(_0x51fe1f);return _0x4107b5&&typeof _0x4107b5===_0x26eec2(0x127)&&!Array[_0x26eec2(0x113)](_0x4107b5)?_0x4107b5:undefined;}catch{return undefined;}}function scalarToString(_0x5615ac){const _0x113a4d=a106_0x35de;if(typeof _0x5615ac==='string')return _0x5615ac[_0x113a4d(0x138)]();if(typeof _0x5615ac==='number'||typeof _0x5615ac===_0x113a4d(0x10c))return String(_0x5615ac);return undefined;}function resolvePushDirectoryRoot(_0x547274){const _0x3e415d=a106_0x35de,_0x1696f4=resolve(_0x547274);if(!existsSync(_0x1696f4))throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x547274);const _0x2ab747=lstatSync(_0x1696f4);if(_0x2ab747['isDirectory']())return _0x1696f4;if(_0x2ab747['isSymbolicLink']()){const _0x17b79f=realpathSync(_0x1696f4);if(lstatSync(_0x17b79f)[_0x3e415d(0x10a)]())return _0x17b79f;}throw CliErrors[_0x3e415d(0x123)](_0x3e415d(0x109)+_0x547274);}function requireRemoteScope(_0x5bf53f){const _0x31b607=a106_0x35de;if(_0x5bf53f['scope']===_0x31b607(0x11d)||_0x5bf53f[_0x31b607(0x106)]===_0x31b607(0x107)||_0x5bf53f[_0x31b607(0x106)]===_0x31b607(0x121))return _0x5bf53f[_0x31b607(0x106)];throw CliErrors['validation'](_0x31b607(0x126)+(_0x5bf53f['skillCode']||_0x31b607(0x137))+_0x31b607(0x134)+(_0x5bf53f[_0x31b607(0x106)]??_0x31b607(0x140))+'\x22.');}function readLocalSkillContent(_0x9151ca){const _0x5e6e4f=a106_0x35de,_0x4b642d=resolve(_0x9151ca,SKILL_FILE);return existsSync(_0x4b642d)&&lstatSync(_0x4b642d)[_0x5e6e4f(0x11c)]()?readFileSync(_0x4b642d,_0x5e6e4f(0x105)):'';}function readPushMetadataIfPresent(_0x5a441b,_0x58decd={}){try{return readMetadataIfPresent(_0x5a441b);}catch(_0x2dbd9b){if(_0x58decd['ignoreInvalidMetadata'])return undefined;throw _0x2dbd9b;}}
|
|
1
|
+
(function(_0x1b8247,_0x1edd7){const _0x12ce9d=a106_0x4e91,_0x19eaf3=_0x1b8247();while(!![]){try{const _0x506fc4=parseInt(_0x12ce9d(0x1b2))/0x1*(-parseInt(_0x12ce9d(0x1c7))/0x2)+-parseInt(_0x12ce9d(0x1d1))/0x3+parseInt(_0x12ce9d(0x1b0))/0x4*(parseInt(_0x12ce9d(0x1ba))/0x5)+-parseInt(_0x12ce9d(0x1da))/0x6*(-parseInt(_0x12ce9d(0x1bf))/0x7)+-parseInt(_0x12ce9d(0x1b6))/0x8*(parseInt(_0x12ce9d(0x1ce))/0x9)+parseInt(_0x12ce9d(0x1e0))/0xa+-parseInt(_0x12ce9d(0x1ac))/0xb*(-parseInt(_0x12ce9d(0x1ae))/0xc);if(_0x506fc4===_0x1edd7)break;else _0x19eaf3['push'](_0x19eaf3['shift']());}catch(_0x4f4b10){_0x19eaf3['push'](_0x19eaf3['shift']());}}}(a106_0x3f4b,0xccb1e));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a106_0x1ef1a5}from'yaml';function a106_0x3f4b(){const _0x41a366=['validation','content','11379429ZMDajj','isSymbolicLink','filter','404574mhzqXt','\x20has\x20scope=\x22','trim','match','skillCode','Skill\x20directory\x20not\x20found:\x20','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','slice','Remote\x20Skill\x20','9162AIcFed','boolean','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','isArray','isFile','utf8','4975630eXXDnq','replace','path','tags','ignoreMetadataScope','toLowerCase','sourceSessionId','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','description','(unknown)','metadata','name','builtin','files','70323oQggLd','ignoreMetadataSkillCode','3252OxzJxU','allowAppCodeRetarget','56YcAAWV','ignoreMetadataForPayload','1536406jHplCg','some','personal','ignoreMetadataAppCodeMismatch','8TjhGyQ','ignoreInvalidMetadata','refreshedAt','length','380735awGHIH','startsWith','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','appCode',',\x20or\x20directory\x20name.','2191luWQBc','string','dir','unknown','isDirectory','skillName','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Skill\x20metadata\x20appCode\x20\x22','2govelm','scope','company','Unable\x20to\x20resolve\x20skillCode\x20from\x20','targetScope'];a106_0x3f4b=function(){return _0x41a366;};return a106_0x3f4b();}import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a106_0x4e91(_0x22a0e2,_0x57a31d){_0x22a0e2=_0x22a0e2-0x1a1;const _0x3f4b08=a106_0x3f4b();let _0x4e91d5=_0x3f4b08[_0x22a0e2];return _0x4e91d5;}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(_0x2ab3c0,_0x56b000,_0xbdd131={}){const _0x40fe8a=a106_0x4e91,_0x4f3801=resolvePushDirectoryRoot(_0x2ab3c0),_0x425890=readPushMetadataIfPresent(resolve(_0x4f3801,METADATA_FILE),{'ignoreInvalidMetadata':_0xbdd131[_0x40fe8a(0x1b7)]});if(_0x425890?.[_0x40fe8a(0x1bd)]&&_0x425890[_0x40fe8a(0x1bd)]!==_0x56b000&&!_0xbdd131[_0x40fe8a(0x1af)]&&!_0xbdd131[_0x40fe8a(0x1b5)])throw CliErrors['validation'](_0x40fe8a(0x1c6)+_0x425890[_0x40fe8a(0x1bd)]+_0x40fe8a(0x1d7)+_0x56b000+'\x22.');const _0x2f2962=resolvePushSkillCode(_0x4f3801,_0x56b000,_0x425890,_0xbdd131);if(!_0x2f2962)throw CliErrors[_0x40fe8a(0x1cc)](_0x40fe8a(0x1ca)+SKILL_FILE+',\x20'+METADATA_FILE+_0x40fe8a(0x1be));return{'dir':_0x4f3801,'skillCode':_0x2f2962,'metadata':_0x425890};}export function readPushDirectory(_0x579c49,_0x44e740,_0x34896d={}){const _0x520104=a106_0x4e91,_0x46f165=resolvePushDirectoryIdentity(_0x579c49,_0x44e740,_0x34896d),_0x422a3b=_0x46f165[_0x520104(0x1c1)],_0x285c5a=resolve(_0x422a3b,SKILL_FILE);if(!existsSync(_0x285c5a)||!lstatSync(_0x285c5a)[_0x520104(0x1de)]())throw CliErrors[_0x520104(0x1cc)]('Missing\x20'+SKILL_FILE+':\x20'+_0x285c5a);const _0x33d8d1=_0x46f165[_0x520104(0x1a8)],_0x36bef3=_0x34896d[_0x520104(0x1cb)]??_0x520104(0x1b4);if(!_0x34896d[_0x520104(0x1a2)]&&_0x33d8d1?.[_0x520104(0x1c8)]===_0x520104(0x1aa))throw CliErrors[_0x520104(0x1cc)](_0x520104(0x1bc)+METADATA_FILE+_0x520104(0x1d2)+_0x33d8d1[_0x520104(0x1c8)]+'\x22.');if(!_0x34896d['ignoreMetadataScope']&&_0x36bef3===_0x520104(0x1b4)&&_0x33d8d1?.[_0x520104(0x1c8)]&&_0x33d8d1['scope']!==_0x520104(0x1b4))throw CliErrors[_0x520104(0x1cc)](_0x520104(0x1c5)+METADATA_FILE+_0x520104(0x1d2)+_0x33d8d1[_0x520104(0x1c8)]+'\x22.',_0x520104(0x1a5)+_0x422a3b+_0x520104(0x1dc));const _0x3914de=scanSkillDirectory(_0x422a3b),_0x4ed0ce=buildSkillPackage(_0x3914de),_0x538f3d=readFileSync(_0x285c5a,_0x520104(0x1df)),_0xc1c9e8=_0x46f165[_0x520104(0x1d5)],_0x5d1759=_0x34896d[_0x520104(0x1b1)]?undefined:_0x33d8d1,_0x33da43=readSkillDisplayName(_0x538f3d);return{'skillCode':_0xc1c9e8,'metadata':_0x33d8d1,'frontmatterDisplayName':_0x33da43,'input':{'skillCode':_0xc1c9e8,'skillName':_0x33da43??_0x5d1759?.[_0x520104(0x1c4)],'description':_0x5d1759?.[_0x520104(0x1a6)],'content':_0x538f3d,'files':_0x4ed0ce['manifest'],'packageBase64':_0x4ed0ce['packageBase64'],'tags':_0x5d1759?.[_0x520104(0x1a1)],'version':_0x5d1759?.['version'],'sourceSessionId':_0x5d1759?.[_0x520104(0x1a4)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x5ba2d9,_0x1ffba2,_0x33084f,_0x24bf0c={}){const _0x64652e=a106_0x4e91,_0x51a9c0=resolvePushDirectoryRoot(_0x5ba2d9),_0x3fc555=readPushMetadataIfPresent(resolve(_0x51a9c0,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x38eb4c=requireRemoteScope(_0x1ffba2),_0x5db2ab=readLocalSkillContent(_0x51a9c0),_0x2a2ed3={..._0x1ffba2,'appCode':_0x1ffba2[_0x64652e(0x1bd)]??_0x33084f,'skillName':_0x1ffba2['skillName']??_0x3fc555?.[_0x64652e(0x1c4)],'description':_0x1ffba2[_0x64652e(0x1a6)]??_0x3fc555?.[_0x64652e(0x1a6)],'tags':Array[_0x64652e(0x1dd)](_0x1ffba2[_0x64652e(0x1a1)])?_0x1ffba2[_0x64652e(0x1a1)]:_0x3fc555?.[_0x64652e(0x1a1)],'sourceSessionId':_0x1ffba2['sourceSessionId']??_0x3fc555?.[_0x64652e(0x1a4)],'content':_0x1ffba2[_0x64652e(0x1cd)]??_0x5db2ab},_0x4b2c47=buildMetadata(_0x2a2ed3,_0x38eb4c,_0x33084f,contentHash(_0x5db2ab),_0x24bf0c[_0x64652e(0x1b8)]);writeJsonAtomic(resolve(_0x51a9c0,METADATA_FILE),_0x4b2c47);}export function recordPushedRuntimeSkill(_0x4904ad,_0x39afa6,_0x5ba6b9,_0xbd059c={}){const _0x30087c=a106_0x4e91,_0x513f32=resolvePushDirectoryRoot(_0x4904ad),_0x15404c=scanSkillDirectory(_0x513f32),_0x470d8f=_0x15404c['find'](_0x36dfb5=>_0x36dfb5[_0x30087c(0x1e2)]===SKILL_FILE),_0x39c2f0=_0x470d8f?fileText(_0x470d8f):'',_0x1a1d86=tryNormalizePackageManifest(_0x39afa6[_0x30087c(0x1ab)]),_0x5109ca={..._0x39afa6,'content':_0x39afa6[_0x30087c(0x1cd)]??_0x39c2f0,'files':_0x1a1d86},_0x39a2ae=_0x1a1d86?normalizeLocalFiles(_0x15404c)[_0x30087c(0x1d0)](_0x19dbd0=>_0x1a1d86[_0x30087c(0x1ab)][_0x30087c(0x1b3)](_0x4d2db0=>_0x4d2db0[_0x30087c(0x1e2)]===_0x19dbd0[_0x30087c(0x1e2)])):undefined,_0x4c1873=buildMetadata(_0x5109ca,_0xbd059c[_0x30087c(0x1c8)]??_0x30087c(0x1b4),_0x5ba6b9,contentHash(_0x5109ca[_0x30087c(0x1cd)]??''),_0xbd059c['pushedAt'],_0x39a2ae);writeJsonAtomic(resolve(_0x513f32,METADATA_FILE),_0x4c1873);}export function deriveSkillCodeFromDirectory(_0x30caa8,_0x54c56b){const _0x39ac30=a106_0x4e91,_0x4095d0=basename(resolve(_0x30caa8)),_0x2c43d6=_0x54c56b+'--';return _0x4095d0[_0x39ac30(0x1bb)](_0x2c43d6)?_0x4095d0[_0x39ac30(0x1d8)](_0x2c43d6[_0x39ac30(0x1b9)]):_0x4095d0;}function resolvePushSkillCode(_0x57e670,_0x3117e8,_0x5ac026,_0x1ba5eb){const _0x484c83=a106_0x4e91,_0x66b223=deriveSkillCodeFromSkillFile(_0x57e670)||deriveSkillCodeFromDirectory(_0x57e670,_0x3117e8);if(_0x1ba5eb[_0x484c83(0x1ad)])return _0x66b223;return _0x5ac026?.[_0x484c83(0x1d5)]?.[_0x484c83(0x1d3)]()||_0x66b223;}function deriveSkillCodeFromSkillFile(_0x474124){const _0x40f22b=a106_0x4e91,_0x4b8689=resolve(_0x474124,SKILL_FILE);if(!existsSync(_0x4b8689)||!lstatSync(_0x4b8689)[_0x40f22b(0x1de)]())return undefined;const _0x296f25=readFileSync(_0x4b8689,_0x40f22b(0x1df)),_0x416feb=_0x296f25['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x416feb)return undefined;const _0x10aa1b=parseFrontmatterObject(_0x416feb[0x1]??''),_0xb0c1e3=scalarToString(_0x10aa1b?.[_0x40f22b(0x1a9)]);return _0xb0c1e3?slugifySkillName(_0xb0c1e3):undefined;}function readSkillDisplayName(_0x39aaeb){const _0x25082a=a106_0x4e91,_0x12675f=_0x39aaeb[_0x25082a(0x1d4)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x12675f)return undefined;const _0x3ac505=parseFrontmatterObject(_0x12675f[0x1]??'');return scalarToString(_0x3ac505?.['displayName']);}function slugifySkillName(_0x35e8e4){const _0x4d59c8=a106_0x4e91,_0x4cda8b=_0x35e8e4[_0x4d59c8(0x1d3)]()[_0x4d59c8(0x1a3)]()[_0x4d59c8(0x1e1)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x4d59c8(0x1e1)](/^-+/,'')[_0x4d59c8(0x1e1)](/-+$/,'')[_0x4d59c8(0x1e1)](/-{2,}/g,'-');if(!_0x4cda8b)throw CliErrors[_0x4d59c8(0x1cc)]('Invalid\x20'+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x4cda8b;}function parseFrontmatterObject(_0x211c91){const _0x3deb31=a106_0x4e91;try{const _0x12f42b=a106_0x1ef1a5(_0x211c91);return _0x12f42b&&typeof _0x12f42b==='object'&&!Array[_0x3deb31(0x1dd)](_0x12f42b)?_0x12f42b:undefined;}catch{return undefined;}}function scalarToString(_0xe7954e){const _0x22b2e6=a106_0x4e91;if(typeof _0xe7954e===_0x22b2e6(0x1c0))return _0xe7954e[_0x22b2e6(0x1d3)]();if(typeof _0xe7954e==='number'||typeof _0xe7954e===_0x22b2e6(0x1db))return String(_0xe7954e);return undefined;}function resolvePushDirectoryRoot(_0xa35e6){const _0x333558=a106_0x4e91,_0x9cb491=resolve(_0xa35e6);if(!existsSync(_0x9cb491))throw CliErrors[_0x333558(0x1cc)](_0x333558(0x1d6)+_0xa35e6);const _0x8ee0f8=lstatSync(_0x9cb491);if(_0x8ee0f8['isDirectory']())return _0x9cb491;if(_0x8ee0f8[_0x333558(0x1cf)]()){const _0xb39331=realpathSync(_0x9cb491);if(lstatSync(_0xb39331)[_0x333558(0x1c3)]())return _0xb39331;}throw CliErrors['validation'](_0x333558(0x1d6)+_0xa35e6);}function requireRemoteScope(_0x214bf4){const _0x412746=a106_0x4e91;if(_0x214bf4[_0x412746(0x1c8)]===_0x412746(0x1b4)||_0x214bf4[_0x412746(0x1c8)]===_0x412746(0x1c9)||_0x214bf4[_0x412746(0x1c8)]==='builtin')return _0x214bf4['scope'];throw CliErrors[_0x412746(0x1cc)](_0x412746(0x1d9)+(_0x214bf4['skillCode']||_0x412746(0x1a7))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x214bf4[_0x412746(0x1c8)]??_0x412746(0x1c2))+'\x22.');}function readLocalSkillContent(_0x3301e2){const _0x4ef10b=a106_0x4e91,_0xb539e2=resolve(_0x3301e2,SKILL_FILE);return existsSync(_0xb539e2)&&lstatSync(_0xb539e2)['isFile']()?readFileSync(_0xb539e2,_0x4ef10b(0x1df)):'';}function readPushMetadataIfPresent(_0x1b7099,_0x21c855={}){const _0xfa1d78=a106_0x4e91;try{return readMetadataIfPresent(_0x1b7099);}catch(_0x37efe4){if(_0x21c855[_0xfa1d78(0x1b7)])return undefined;throw _0x37efe4;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a107_0x254d(_0x7610f2,_0x31f4d0){_0x7610f2=_0x7610f2-0x125;const _0x2e2030=a107_0x2e20();let _0x254d0d=_0x2e2030[_0x7610f2];return _0x254d0d;}(function(_0x3f0d9d,_0x7843b9){const _0x328725=a107_0x254d,_0x348f43=_0x3f0d9d();while(!![]){try{const _0x2b3dee=-parseInt(_0x328725(0x130))/0x1+-parseInt(_0x328725(0x12f))/0x2+-parseInt(_0x328725(0x127))/0x3*(parseInt(_0x328725(0x134))/0x4)+parseInt(_0x328725(0x135))/0x5*(parseInt(_0x328725(0x12d))/0x6)+parseInt(_0x328725(0x133))/0x7+parseInt(_0x328725(0x128))/0x8*(-parseInt(_0x328725(0x132))/0x9)+parseInt(_0x328725(0x12a))/0xa*(parseInt(_0x328725(0x12b))/0xb);if(_0x2b3dee===_0x7843b9)break;else _0x348f43['push'](_0x348f43['shift']());}catch(_0x509030){_0x348f43['push'](_0x348f43['shift']());}}}(a107_0x2e20,0x9b0e3));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x4adb0a){const _0x5bb5fc=a107_0x254d,_0x1dc203=_0x4adb0a&&_0x4adb0a['length']>0x0?_0x4adb0a:[_0x5bb5fc(0x126),'company','builtin'],_0xc68a4e=[];for(const _0x589055 of _0x1dc203){if(!isRuntimeSkillScope(_0x589055))throw CliErrors[_0x5bb5fc(0x12e)](_0x5bb5fc(0x131)+_0x589055);!_0xc68a4e[_0x5bb5fc(0x12c)](_0x589055)&&_0xc68a4e[_0x5bb5fc(0x129)](_0x589055);}return _0xc68a4e;}function a107_0x2e20(){const _0x3423c7=['5545932wlnfEf','33316myjfvn','685420JuRaQk','company','personal','93myptuC','291752kWzKiJ','push','1135460jEyWsf','275OxaXSt','includes','12NrIjpe','validation','1885324QpfxGk','1193870bqSYZJ','Unsupported\x20runtime\x20Skill\x20scope:\x20','216oITzaY'];a107_0x2e20=function(){return _0x3423c7;};return a107_0x2e20();}export function isRuntimeSkillScope(_0x108df3){const _0x4451b3=a107_0x254d;return _0x108df3===_0x4451b3(0x126)||_0x108df3===_0x4451b3(0x125)||_0x108df3==='builtin';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a109_0xcba55a=a109_0x4ac5;(function(_0x4c0570,_0x347f3c){const _0x1e77c1=a109_0x4ac5,_0x3aaecc=_0x4c0570();while(!![]){try{const _0xcad3c8=parseInt(_0x1e77c1(0x87))/0x1*(parseInt(_0x1e77c1(0x7f))/0x2)+-parseInt(_0x1e77c1(0x8d))/0x3*(parseInt(_0x1e77c1(0x81))/0x4)+parseInt(_0x1e77c1(0x85))/0x5*(parseInt(_0x1e77c1(0x89))/0x6)+-parseInt(_0x1e77c1(0x7e))/0x7*(parseInt(_0x1e77c1(0x7c))/0x8)+parseInt(_0x1e77c1(0x83))/0x9+-parseInt(_0x1e77c1(0x8c))/0xa*(-parseInt(_0x1e77c1(0x90))/0xb)+-parseInt(_0x1e77c1(0x7a))/0xc;if(_0xcad3c8===_0x347f3c)break;else _0x3aaecc['push'](_0x3aaecc['shift']());}catch(_0x1e38cc){_0x3aaecc['push'](_0x3aaecc['shift']());}}}(a109_0x2422,0x941f8));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a109_0x2422(){const _0x53b439=['from','sort','11294064fPAntG','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','328aNcDPj','code','163723dPPJPg','1839402QLKOlq','endsWith','346260IaoFgn','validation','7395633QoKMff','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','4144845pyRqtC','map','1oDGBza','1980-01-01T00:00:00.000Z','6jtuSAM','entries','path','10SeicCA','33ITZaoP','validation_error','length','9775051qdtYVp'];a109_0x2422=function(){return _0x53b439;};return a109_0x2422();}function a109_0x4ac5(_0x1c0f0e,_0x1f6a57){_0x1c0f0e=_0x1c0f0e-0x78;const _0x24229c=a109_0x2422();let _0x4ac555=_0x24229c[_0x1c0f0e];return _0x4ac555;}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a109_0xcba55a(0x88));export function createDeterministicZipPackage(_0x11f781){const _0x471164=a109_0xcba55a,_0x2195d4={};for(const _0x52116d of normalizeLocalFiles(_0x11f781)){_0x2195d4[_0x52116d[_0x471164(0x8b)]]=fileContent(_0x52116d);}return Buffer[_0x471164(0x78)](zipSync(_0x2195d4,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x26949e){const _0x2b6694=a109_0xcba55a;if(_0x26949e[_0x2b6694(0x8f)]<0x16)throw CliErrors[_0x2b6694(0x82)](_0x2b6694(0x7b));let _0x300f51;try{_0x300f51=unzipSync(_0x26949e,{'filter'(_0x16f1db){const _0x16e47f=_0x2b6694,_0x47680b=normalizeSkillRelativePath(_0x16f1db['name']);if(_0x47680b[_0x16e47f(0x80)]('/'))throw CliErrors[_0x16e47f(0x82)](_0x16e47f(0x84)+_0x47680b);return!![];}});}catch(_0x2aaa23){if(isRuntimeSkillValidationError(_0x2aaa23))throw _0x2aaa23;throw CliErrors[_0x2b6694(0x82)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x2b6694(0x8a)](_0x300f51)[_0x2b6694(0x86)](([_0x5d7f7b,_0x2e8154])=>({'path':normalizeSkillRelativePath(_0x5d7f7b),'bytes':Buffer[_0x2b6694(0x78)](_0x2e8154)}))[_0x2b6694(0x79)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x5da2a2){const _0x3073c7=a109_0xcba55a;return typeof _0x5da2a2==='object'&&_0x5da2a2!==null&&'code'in _0x5da2a2&&_0x5da2a2[_0x3073c7(0x7d)]===_0x3073c7(0x8e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf55d,_0x2b6a11){const _0x305f42=a110_0x1e43,_0x3da27f=_0xf55d();while(!![]){try{const _0x37d308=-parseInt(_0x305f42(0x167))/0x1+-parseInt(_0x305f42(0x157))/0x2+parseInt(_0x305f42(0x170))/0x3+-parseInt(_0x305f42(0x171))/0x4*(parseInt(_0x305f42(0x164))/0x5)+-parseInt(_0x305f42(0x175))/0x6*(parseInt(_0x305f42(0x185))/0x7)+parseInt(_0x305f42(0x163))/0x8*(-parseInt(_0x305f42(0x172))/0x9)+-parseInt(_0x305f42(0x179))/0xa*(-parseInt(_0x305f42(0x168))/0xb);if(_0x37d308===_0x2b6a11)break;else _0x3da27f['push'](_0x3da27f['shift']());}catch(_0x5675b1){_0x3da27f['push'](_0x3da27f['shift']());}}}(a110_0x36dd,0x78b3d));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(_0x5f15f4){const _0xdfc926=a110_0x1e43,_0x290e23=normalizeLocalFiles(_0x5f15f4);if(!_0x290e23['some'](_0x198090=>_0x198090[_0xdfc926(0x17d)]===SKILL_FILE))throw CliErrors[_0xdfc926(0x17c)](_0xdfc926(0x161)+SKILL_FILE+_0xdfc926(0x182));const _0x22b0f4=localFilesToManifestFiles(_0x290e23),_0x4ca3f8=createDeterministicZipPackage(_0x290e23);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x22b0f4),'zipSha256':bufferSha256(_0x4ca3f8),'zipSize':_0x4ca3f8[_0xdfc926(0x16f)],'files':_0x22b0f4},'packageBytes':_0x4ca3f8,'packageBase64':_0x4ca3f8[_0xdfc926(0x158)]('base64')};}export function verifyRuntimeSkillPackage(_0x1c902e,_0x542b5d){const _0x51c94b=a110_0x1e43,_0x4c0d34=normalizePackageManifest(_0x1c902e,{'requireOssPath':![]});if(!_0x4c0d34)throw CliErrors[_0x51c94b(0x17c)](_0x51c94b(0x173));return extractAndVerifyPackage(_0x4c0d34,_0x542b5d);}export function verifyRuntimeSkillBundle(_0x43b263,_0x46ad78){const _0x77099a=a110_0x1e43,_0x1a2d12=normalizePackageManifest(_0x43b263,{'requireOssPath':![]});if(!_0x1a2d12)throw CliErrors[_0x77099a(0x17c)](_0x77099a(0x173));return extractAndVerifyPackageFiles(_0x1a2d12,_0x46ad78);}export function tryNormalizePackageManifest(_0x45862b){return normalizePackageManifest(_0x45862b,{'requireOssPath':![]});}function a110_0x1e43(_0x15a866,_0x7fad46){_0x15a866=_0x15a866-0x157;const _0x36dd2f=a110_0x36dd();let _0x1e4372=_0x36dd2f[_0x15a866];return _0x1e4372;}export function requirePackageBytes(_0x46fce4,_0x433980){const _0xe2ce2c=a110_0x1e43;if(!_0x433980||_0x433980[_0xe2ce2c(0x16f)]===0x0)throw CliErrors['validation'](_0xe2ce2c(0x162)+_0x46fce4);return _0x433980;}export function extractDownloadedPackage(_0x3df2e7){const _0x555e96=a110_0x1e43,_0x5a743c=parseZipPackage(_0x3df2e7)[_0x555e96(0x165)](_0x4df5d9=>({'path':_0x4df5d9[_0x555e96(0x17d)],'bytes':_0x4df5d9[_0x555e96(0x17e)]}));if(!_0x5a743c['some'](_0x301364=>_0x301364[_0x555e96(0x17d)]===SKILL_FILE))throw CliErrors[_0x555e96(0x17c)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x5a743c);}export function localFilesToManifestFiles(_0x2752ec){const _0x39cee9=a110_0x1e43;return normalizeLocalFiles(_0x2752ec)['map'](_0x31bd2e=>({'path':_0x31bd2e[_0x39cee9(0x17d)],'sha256':fileHash(_0x31bd2e),'size':fileContent(_0x31bd2e)['length']}));}function normalizePackageManifest(_0x28ee3e,_0x3c2bad){const _0x40c7d8=a110_0x1e43;if(!_0x28ee3e||typeof _0x28ee3e!==_0x40c7d8(0x15e)||Array[_0x40c7d8(0x16c)](_0x28ee3e))return undefined;const _0x5f8c1e=_0x28ee3e,_0x483aec=typeof _0x5f8c1e['ossPath']===_0x40c7d8(0x174)?_0x5f8c1e[_0x40c7d8(0x16a)]['trim']():undefined;if(_0x3c2bad[_0x40c7d8(0x166)]&&!_0x483aec)return undefined;if(!Array['isArray'](_0x5f8c1e[_0x40c7d8(0x186)])||_0x5f8c1e[_0x40c7d8(0x186)][_0x40c7d8(0x16f)]===0x0)return undefined;if(!isSha256Hex(_0x5f8c1e[_0x40c7d8(0x15b)]))throw CliErrors[_0x40c7d8(0x17c)](_0x40c7d8(0x178));if(!isSha256Hex(_0x5f8c1e[_0x40c7d8(0x15d)]))throw CliErrors[_0x40c7d8(0x17c)](_0x40c7d8(0x180));if(!Number[_0x40c7d8(0x17a)](_0x5f8c1e[_0x40c7d8(0x169)])||_0x5f8c1e['zipSize']<0x0)throw CliErrors[_0x40c7d8(0x17c)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0x2058a5=normalizeManifestFiles(_0x5f8c1e[_0x40c7d8(0x186)]);if(!_0x2058a5[_0x40c7d8(0x15c)](_0x51c596=>_0x51c596[_0x40c7d8(0x17d)]===SKILL_FILE))throw CliErrors[_0x40c7d8(0x17c)](_0x40c7d8(0x15f)+SKILL_FILE+'.');const _0x4ab374=fileTreeHash(_0x2058a5);if(_0x4ab374!==_0x5f8c1e['treeSha256']['toLowerCase']())throw CliErrors[_0x40c7d8(0x17c)](_0x40c7d8(0x16b));return{'schemaVersion':Number[_0x40c7d8(0x17a)](_0x5f8c1e[_0x40c7d8(0x16e)])?_0x5f8c1e[_0x40c7d8(0x16e)]:0x2,'ossPath':_0x483aec,'treeSha256':_0x4ab374,'zipSha256':_0x5f8c1e[_0x40c7d8(0x15d)][_0x40c7d8(0x16d)](),'zipSize':_0x5f8c1e[_0x40c7d8(0x169)],'files':_0x2058a5};}function a110_0x36dd(){const _0x391309=['Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','19917830jLPdtW','isSafeInteger','Duplicate\x20Skill\x20package\x20entry:\x20','validation','path','bytes','get','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','sha256','\x20in\x20Skill\x20file\x20package.','set','push','1425928BrELwf','files','225612ShNxyw','toString','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','treeSha256','some','zipSha256','object','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Missing\x20','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','101720QpjZqM','28255lKzWnW','map','requireOssPath','230948bMohTv','11WkpGTc','zipSize','ossPath','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','isArray','toLowerCase','schemaVersion','length','326280lLiWUF','380tCYETd','81xBayyD','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','string','18JWXiJN','has','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'];a110_0x36dd=function(){return _0x391309;};return a110_0x36dd();}function extractAndVerifyPackage(_0x2af41d,_0x4fb930){const _0xc72247=a110_0x1e43,_0x603225=normalizePackageManifest(_0x2af41d,{'requireOssPath':![]});if(!_0x603225)throw CliErrors[_0xc72247(0x17c)](_0xc72247(0x173));if(_0x4fb930['length']!==_0x603225[_0xc72247(0x169)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x260adb=bufferSha256(_0x4fb930);if(_0x260adb!==_0x603225['zipSha256'])throw CliErrors[_0xc72247(0x17c)](_0xc72247(0x159));return extractAndVerifyPackageFiles(_0x603225,_0x4fb930);}function extractAndVerifyPackageFiles(_0xa84de6,_0x190c1b){const _0x46746b=a110_0x1e43,_0x11c843=parseZipPackage(_0x190c1b);if(_0x11c843[_0x46746b(0x16f)]!==_0xa84de6[_0x46746b(0x186)][_0x46746b(0x16f)])throw CliErrors['validation'](_0x46746b(0x15a));const _0x862f09=new Map();for(const _0x208b52 of _0x11c843){if(_0x862f09[_0x46746b(0x176)](_0x208b52[_0x46746b(0x17d)]))throw CliErrors['validation'](_0x46746b(0x17b)+_0x208b52[_0x46746b(0x17d)]);_0x862f09[_0x46746b(0x183)](_0x208b52[_0x46746b(0x17d)],_0x208b52);}const _0x2c29f7=[];for(const _0x177ca6 of _0xa84de6[_0x46746b(0x186)]){const _0x130122=_0x862f09[_0x46746b(0x17f)](_0x177ca6[_0x46746b(0x17d)]);if(!_0x130122)throw CliErrors[_0x46746b(0x17c)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x177ca6[_0x46746b(0x17d)]);if(_0x130122[_0x46746b(0x17e)][_0x46746b(0x16f)]!==_0x177ca6['size'])throw CliErrors[_0x46746b(0x17c)](_0x46746b(0x177)+_0x177ca6['path']);const _0x231ac8=bufferSha256(_0x130122[_0x46746b(0x17e)]);if(_0x231ac8!==_0x177ca6[_0x46746b(0x181)])throw CliErrors[_0x46746b(0x17c)](_0x46746b(0x160)+_0x177ca6[_0x46746b(0x17d)]);_0x2c29f7[_0x46746b(0x184)]({'path':_0x177ca6['path'],'bytes':_0x130122['bytes']});}return normalizeLocalFiles(_0x2c29f7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4b5a41,_0x34aa8c){var _0x183342=a111_0x1736,_0x210cd0=_0x4b5a41();while(!![]){try{var _0x4bf7e1=parseInt(_0x183342(0x13e))/0x1*(parseInt(_0x183342(0x135))/0x2)+parseInt(_0x183342(0x13b))/0x3+parseInt(_0x183342(0x134))/0x4*(parseInt(_0x183342(0x13c))/0x5)+-parseInt(_0x183342(0x136))/0x6*(-parseInt(_0x183342(0x13d))/0x7)+-parseInt(_0x183342(0x139))/0x8*(parseInt(_0x183342(0x137))/0x9)+parseInt(_0x183342(0x13a))/0xa*(parseInt(_0x183342(0x13f))/0xb)+-parseInt(_0x183342(0x138))/0xc;if(_0x4bf7e1===_0x34aa8c)break;else _0x210cd0['push'](_0x210cd0['shift']());}catch(_0x623f39){_0x210cd0['push'](_0x210cd0['shift']());}}}(a111_0x5b8d,0xa1093));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a111_0x5b8d(){var _0x2d3c49=['80dOoQOz','90zHvYUs','2530602xLXoft','5ssFAJI','858473AieUVY','627kBQmkK','1175537iBEiRF','3376552NoGJCu','3846vVvzgg','24DNFmyv','337203noaVtb','39737748MrrtgA'];a111_0x5b8d=function(){return _0x2d3c49;};return a111_0x5b8d();}export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';function a111_0x1736(_0x1ccc01,_0x35f7fa){_0x1ccc01=_0x1ccc01-0x134;var _0x5b8dc5=a111_0x5b8d();var _0x1736c2=_0x5b8dc5[_0x1ccc01];return _0x1736c2;}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(_0x457d55,_0x54f06a){const _0x1c602a=a112_0x3b77,_0x47afe0=_0x457d55();while(!![]){try{const _0x20bf09=parseInt(_0x1c602a(0xff))/0x1+-parseInt(_0x1c602a(0xfe))/0x2+-parseInt(_0x1c602a(0xfb))/0x3+-parseInt(_0x1c602a(0x100))/0x4*(parseInt(_0x1c602a(0xfd))/0x5)+parseInt(_0x1c602a(0xfa))/0x6+-parseInt(_0x1c602a(0xf9))/0x7*(-parseInt(_0x1c602a(0xfc))/0x8)+parseInt(_0x1c602a(0xf8))/0x9;if(_0x20bf09===_0x54f06a)break;else _0x47afe0['push'](_0x47afe0['shift']());}catch(_0x39b0de){_0x47afe0['push'](_0x47afe0['shift']());}}}(a112_0x1e53,0x9aa36));function a112_0x3b77(_0x1afbcf,_0x537a90){_0x1afbcf=_0x1afbcf-0xf8;const _0x1e53b7=a112_0x1e53();let _0x3b7750=_0x1e53b7[_0x1afbcf];return _0x3b7750;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a112_0x1e53(){const _0x2d8fb6=['8QyMwir','2495pMGGKb','655702nLNTRJ','17272bIKePo','8328VXdceW','7595379vfhWBU','8384432GubGSP','980958KSTRiu','666915XtoGbQ'];a112_0x1e53=function(){return _0x2d8fb6;};return a112_0x1e53();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a113_0x39da51=a113_0x5479;function a113_0x5479(_0x431bd6,_0x1238f6){_0x431bd6=_0x431bd6-0x14f;const _0x2ad351=a113_0x2ad3();let _0x54791d=_0x2ad351[_0x431bd6];return _0x54791d;}(function(_0x1a2984,_0x3e1822){const _0x4da0d9=a113_0x5479,_0x55fb6c=_0x1a2984();while(!![]){try{const _0x2d700b=parseInt(_0x4da0d9(0x153))/0x1*(-parseInt(_0x4da0d9(0x17a))/0x2)+-parseInt(_0x4da0d9(0x17c))/0x3*(parseInt(_0x4da0d9(0x178))/0x4)+parseInt(_0x4da0d9(0x14f))/0x5+-parseInt(_0x4da0d9(0x159))/0x6*(-parseInt(_0x4da0d9(0x16b))/0x7)+parseInt(_0x4da0d9(0x182))/0x8*(-parseInt(_0x4da0d9(0x17d))/0x9)+parseInt(_0x4da0d9(0x17e))/0xa+parseInt(_0x4da0d9(0x166))/0xb;if(_0x2d700b===_0x3e1822)break;else _0x55fb6c['push'](_0x55fb6c['shift']());}catch(_0x1222c0){_0x55fb6c['push'](_0x55fb6c['shift']());}}}(a113_0x2ad3,0x4c896));function a113_0x2ad3(){const _0xe8c72c=['46FVTPWg','log','printf','winstonLogger','toISOString','green','1506426AMCdaX','join','getWinstonInstance','currentRawCommand','setRawCommand','utf8','combine','clear','warn','now','setLogPath','Failed\x20to\x20read\x20logs:','logTask','6837193tHvawI','filter','existsSync','createLogger','transports','7zuUcFP','error','parse','duration','timestamp','format','yellow','Completed:\x20','Failed\x20to\x20clear\x20logs:','readLogs','logFileName','writeFileSync','info','28zyzdIr','rawCommand','12592nZpIGG','message','141585yQYDXH','9BjYzmV','733350iqLGCE','stringify','logFilePath','initWinstonLogger','1768400liBIqa','1042780InQqry','blue','addColors','success'];a113_0x2ad3=function(){return _0xe8c72c;};return a113_0x2ad3();}import a113_0x191300 from'winston';import a113_0xfcb592 from'node:fs';import a113_0x273d91 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a113_0x39da51(0x156)];[a113_0x39da51(0x180)]='';['currentRawCommand']='';constructor(){}[a113_0x39da51(0x15d)](_0x491029){const _0x4057bd=a113_0x39da51;this[_0x4057bd(0x15c)]=_0x491029;}[a113_0x39da51(0x163)](_0x39f18f){const _0x2b91d0=a113_0x39da51;this[_0x2b91d0(0x180)]=a113_0x273d91[_0x2b91d0(0x15a)](_0x39f18f,PRODUCT_CONFIG[_0x2b91d0(0x175)]),this[_0x2b91d0(0x156)]&&this['winstonLogger'][_0x2b91d0(0x160)](),this[_0x2b91d0(0x181)]();}[a113_0x39da51(0x181)](){const _0x46e858=a113_0x39da51,_0x36a3a1=a113_0x273d91['dirname'](this[_0x46e858(0x180)]);!a113_0xfcb592[_0x46e858(0x168)](_0x36a3a1)&&a113_0xfcb592['mkdirSync'](_0x36a3a1,{'recursive':!![]});const _0x15f56c=a113_0x191300['format'][_0x46e858(0x15f)](a113_0x191300[_0x46e858(0x170)][_0x46e858(0x16f)](),a113_0x191300[_0x46e858(0x170)]['errors']({'stack':!![]}),a113_0x191300['format'][_0x46e858(0x155)](_0x435b75=>{const _0x5806bc=_0x46e858,_0x4e085d={'timestamp':_0x435b75[_0x5806bc(0x16f)]||new Date()[_0x5806bc(0x157)](),'level':_0x435b75['level']||_0x5806bc(0x177),'command':_0x435b75['command']||'unknown','rawCommand':_0x435b75[_0x5806bc(0x179)]||this[_0x5806bc(0x15c)]||undefined,'message':_0x435b75[_0x5806bc(0x17b)]||'','duration':_0x435b75[_0x5806bc(0x16e)]||undefined,'details':_0x435b75['details']||undefined};return JSON[_0x5806bc(0x17f)](_0x4e085d);}));this[_0x46e858(0x156)]=a113_0x191300[_0x46e858(0x169)]({'level':_0x46e858(0x177),'format':_0x15f56c,'transports':[new a113_0x191300[(_0x46e858(0x16a))]['File']({'filename':this['logFilePath'],'level':_0x46e858(0x177)})],'silent':![]}),a113_0x191300[_0x46e858(0x151)]({'success':_0x46e858(0x158),'error':'red','warn':_0x46e858(0x171),'info':_0x46e858(0x150)});}[a113_0x39da51(0x177)](_0x18e5d9,_0x2a6ce4,_0x1f7611){const _0xa82ced=a113_0x39da51;if(!this[_0xa82ced(0x180)]||!this[_0xa82ced(0x156)])return;this['winstonLogger'][_0xa82ced(0x177)](_0x2a6ce4,{'command':_0x18e5d9,'details':_0x1f7611});}[a113_0x39da51(0x152)](_0x13a6de,_0x408101,_0x23c5dc,_0x43b560){const _0x3b5c8c=a113_0x39da51;if(!this[_0x3b5c8c(0x180)]||!this[_0x3b5c8c(0x156)])return;this[_0x3b5c8c(0x156)][_0x3b5c8c(0x154)](_0x3b5c8c(0x177),_0x408101,{'level':_0x3b5c8c(0x152),'command':_0x13a6de,'duration':_0x23c5dc,'details':_0x43b560});}['error'](_0x2b53d2,_0x175169,_0x105054){const _0x30a45b=a113_0x39da51;if(!this[_0x30a45b(0x180)]||!this[_0x30a45b(0x156)])return;this[_0x30a45b(0x156)][_0x30a45b(0x16c)](_0x175169,{'command':_0x2b53d2,'details':_0x105054});}[a113_0x39da51(0x161)](_0x5257ed,_0x16670e,_0x425b2e){const _0x5a5895=a113_0x39da51;if(!this[_0x5a5895(0x180)]||!this[_0x5a5895(0x156)])return;this['winstonLogger'][_0x5a5895(0x161)](_0x16670e,{'command':_0x5257ed,'details':_0x425b2e});}async[a113_0x39da51(0x165)](_0x2cdbc1,_0x4091e9,_0x589725){const _0x289c12=a113_0x39da51,_0x581994=Date[_0x289c12(0x162)]();this[_0x289c12(0x177)](_0x2cdbc1,'Starting:\x20'+_0x4091e9);try{const _0x3d95dc=await _0x589725(),_0x170dd7=Date['now']()-_0x581994;return this[_0x289c12(0x152)](_0x2cdbc1,_0x289c12(0x172)+_0x4091e9,_0x170dd7),_0x3d95dc;}catch(_0x1a7028){const _0x43bbc4=Date[_0x289c12(0x162)]()-_0x581994;this['error'](_0x2cdbc1,'Failed:\x20'+_0x4091e9,{'error':_0x1a7028 instanceof Error?_0x1a7028[_0x289c12(0x17b)]:String(_0x1a7028),'duration':_0x43bbc4});throw _0x1a7028;}}[a113_0x39da51(0x174)](){const _0x39292c=a113_0x39da51;try{if(!a113_0xfcb592[_0x39292c(0x168)](this[_0x39292c(0x180)]))return[];const _0x304af3=a113_0xfcb592['readFileSync'](this[_0x39292c(0x180)],_0x39292c(0x15e));return _0x304af3['split'](/\r?\n/)[_0x39292c(0x167)](_0x54e607=>_0x54e607['trim']())['map'](_0x46e5f6=>JSON[_0x39292c(0x16d)](_0x46e5f6));}catch(_0x3234cc){return console[_0x39292c(0x161)](_0x39292c(0x164),_0x3234cc),[];}}['clearLogs'](){const _0x41d0cf=a113_0x39da51;try{a113_0xfcb592['existsSync'](this[_0x41d0cf(0x180)])&&a113_0xfcb592[_0x41d0cf(0x176)](this['logFilePath'],'',_0x41d0cf(0x15e));}catch(_0x49d02f){console[_0x41d0cf(0x161)](_0x41d0cf(0x173),_0x49d02f);}}[a113_0x39da51(0x15b)](){const _0x2f2ceb=a113_0x39da51;return this[_0x2f2ceb(0x156)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a114_0x55d8f5=a114_0x49f4;(function(_0x50f66d,_0x5aa29b){const _0x290644=a114_0x49f4,_0x5d393f=_0x50f66d();while(!![]){try{const _0x3d4a6b=-parseInt(_0x290644(0x117))/0x1+parseInt(_0x290644(0x12b))/0x2*(-parseInt(_0x290644(0x122))/0x3)+-parseInt(_0x290644(0x123))/0x4*(parseInt(_0x290644(0x118))/0x5)+parseInt(_0x290644(0x126))/0x6+-parseInt(_0x290644(0x11f))/0x7+-parseInt(_0x290644(0x11a))/0x8*(-parseInt(_0x290644(0x128))/0x9)+parseInt(_0x290644(0x11c))/0xa*(parseInt(_0x290644(0x127))/0xb);if(_0x3d4a6b===_0x5aa29b)break;else _0x5d393f['push'](_0x5d393f['shift']());}catch(_0x522b06){_0x5d393f['push'](_0x5d393f['shift']());}}}(a114_0x1e58,0x1fb9f));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number[a114_0x55d8f5(0x11e)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x114f43){const _0x3fa6f7=a114_0x55d8f5;if(_0x114f43[_0x3fa6f7(0x125)]('.')||_0x114f43['includes']('e')||_0x114f43['includes']('E'))return![];const _0xd492c1=BigInt(_0x114f43);return _0xd492c1>MAX_SAFE_INTEGER||_0xd492c1<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x4f6864){const _0x3e27a2=a114_0x55d8f5;let _0xad7de9='',_0x1c2a64=![],_0x2bbbb4=![];for(let _0x22b460=0x0;_0x22b460<_0x4f6864['length'];){const _0x24f488=_0x4f6864[_0x22b460];if(_0x1c2a64){_0xad7de9+=_0x24f488,_0x22b460+=0x1;if(_0x2bbbb4)_0x2bbbb4=![];else{if(_0x24f488==='\x5c')_0x2bbbb4=!![];else _0x24f488==='\x22'&&(_0x1c2a64=![]);}continue;}if(_0x24f488==='\x22'){_0x1c2a64=!![],_0xad7de9+=_0x24f488,_0x22b460+=0x1;continue;}if(_0x24f488==='-'||_0x24f488>='0'&&_0x24f488<='9'){const _0x236e2d=JSON_NUMBER_PATTERN[_0x3e27a2(0x120)](_0x4f6864['slice'](_0x22b460))?.[0x0];if(_0x236e2d){_0xad7de9+=isUnsafeIntegerLiteral(_0x236e2d)?'\x22'+_0x236e2d+'\x22':_0x236e2d,_0x22b460+=_0x236e2d[_0x3e27a2(0x121)];continue;}}_0xad7de9+=_0x24f488,_0x22b460+=0x1;}return _0xad7de9;}export function parseLosslessJson(_0x24a984){const _0x52f048=a114_0x55d8f5;return JSON[_0x52f048(0x12a)](quoteUnsafeIntegerLiterals(_0x24a984));}function a114_0x1e58(){const _0x5e66f9=['312xxhfrk','text','127143SKXyry','110VvUnax','getOwnPropertyDescriptor','348784wXDmcg','json','66520zmHnKR','undefined','MIN_SAFE_INTEGER','123333lOsHiK','exec','length','783XNfREw','6836cQxVyC','prototype','includes','1555074UqnvjI','11pTyQRI','18rEjcCT','defineProperty','parse'];a114_0x1e58=function(){return _0x5e66f9;};return a114_0x1e58();}function a114_0x49f4(_0x482607,_0x570393){_0x482607=_0x482607-0x116;const _0x1e588e=a114_0x1e58();let _0x49f400=_0x1e588e[_0x482607];return _0x49f400;}export function installLosslessJsonResponseParser(){const _0xaac2b=a114_0x55d8f5;if(typeof Response===_0xaac2b(0x11d))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0xaac2b(0x124)],originalResponseJsonDescriptor=Object[_0xaac2b(0x119)](responseJsonPrototype,'json'),Object[_0xaac2b(0x129)](responseJsonPrototype,_0xaac2b(0x11b),{'configurable':!![],'enumerable':![],'value':async function _0x32404f(){const _0xfa06c2=_0xaac2b;return parseLosslessJson(await this[_0xfa06c2(0x116)]());},'writable':!![]}),restoreResponseJsonParser=()=>{const _0x3367a1=_0xaac2b;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x3367a1(0x11b),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x3367a1(0x11b)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a115_0xb2c2(_0x3e9601,_0xeb7b49){_0x3e9601=_0x3e9601-0x1d7;const _0x502bcd=a115_0x502b();let _0xb2c290=_0x502bcd[_0x3e9601];return _0xb2c290;}(function(_0x418964,_0x3eb0f9){const _0x398cf8=a115_0xb2c2,_0x126f3c=_0x418964();while(!![]){try{const _0x36146b=parseInt(_0x398cf8(0x1f1))/0x1*(-parseInt(_0x398cf8(0x1db))/0x2)+parseInt(_0x398cf8(0x1e2))/0x3+-parseInt(_0x398cf8(0x1dc))/0x4+parseInt(_0x398cf8(0x1df))/0x5+parseInt(_0x398cf8(0x1de))/0x6+parseInt(_0x398cf8(0x1f0))/0x7+-parseInt(_0x398cf8(0x1da))/0x8;if(_0x36146b===_0x3eb0f9)break;else _0x126f3c['push'](_0x126f3c['shift']());}catch(_0x3bce66){_0x126f3c['push'](_0x126f3c['shift']());}}}(a115_0x502b,0xd152c));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x5f0cc2){const _0x461d42=a115_0xb2c2;if(!_0x5f0cc2)return undefined;try{return parseLosslessJson(_0x5f0cc2);}catch{throw CliErrors[_0x461d42(0x1e7)](_0x461d42(0x1d8)+_0x5f0cc2);}}function a115_0x502b(){const _0x581fdd=['data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','10518312TURjaC','123571qVkznA','test','Invalid\x20JSON\x20for\x20--params:\x20','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','8314400SXTwro','6bTphyI','4352692XMBkgB','length','159924Kefzhc','2908435GxzDhn','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','string','3733851xLwWEA','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','isArray','map','id[','validation','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','items','object','isSafeInteger','number','\x20records\x20per\x20call;\x20received\x20'];a115_0x502b=function(){return _0x581fdd;};return a115_0x502b();}export function parseJsonParamsValue(_0x2cebc1){const _0x24d3b3=a115_0xb2c2;if(!_0x2cebc1)return undefined;try{return parseLosslessJson(_0x2cebc1);}catch{throw CliErrors[_0x24d3b3(0x1e7)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x2cebc1);}}export function parseBatchCreateItemsFromParams(_0x2ca898){const _0x519960=a115_0xb2c2;if(Array[_0x519960(0x1e4)](_0x2ca898))return _0x2ca898;if(_0x2ca898!==null&&_0x2ca898!==undefined&&typeof _0x2ca898===_0x519960(0x1eb)&&Array[_0x519960(0x1e4)](_0x2ca898[_0x519960(0x1ea)]))return _0x2ca898['items'];throw CliErrors[_0x519960(0x1e7)](_0x519960(0x1e3),_0x519960(0x1e0));}function parseDataUpdateId(_0x3a6014,_0x535bc2){const _0x4f010c=a115_0xb2c2;if(typeof _0x3a6014===_0x4f010c(0x1ed)&&Number[_0x4f010c(0x1ec)](_0x3a6014)&&_0x3a6014>0x0)return _0x3a6014;if(typeof _0x3a6014===_0x4f010c(0x1e1)){if(/^[1-9]\d*$/[_0x4f010c(0x1d7)](_0x3a6014))return _0x3a6014;}throw CliErrors[_0x4f010c(0x1e7)]('data\x20update\x20--params.'+_0x535bc2+_0x4f010c(0x1e8));}export function parseUpdateIdsFromParams(_0x6c2950){const _0x3b2f47=a115_0xb2c2;if(_0x6c2950===null||_0x6c2950===undefined||typeof _0x6c2950!==_0x3b2f47(0x1eb)||Array[_0x3b2f47(0x1e4)](_0x6c2950))throw CliErrors[_0x3b2f47(0x1e7)]('data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.',_0x3b2f47(0x1d9));const _0x30e5f8=_0x6c2950['id'];if(_0x30e5f8===undefined||_0x30e5f8===null)throw CliErrors[_0x3b2f47(0x1e7)](_0x3b2f47(0x1ef),_0x3b2f47(0x1d9));const _0x66c62f=Array['isArray'](_0x30e5f8)?_0x30e5f8:[_0x30e5f8];if(_0x66c62f[_0x3b2f47(0x1dd)]===0x0)throw CliErrors[_0x3b2f47(0x1e7)](_0x3b2f47(0x1e9));if(_0x66c62f['length']>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x3b2f47(0x1e7)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+_0x3b2f47(0x1ee)+_0x66c62f['length']+'.');return _0x66c62f[_0x3b2f47(0x1e5)]((_0x3edb2a,_0x4ee6d9)=>parseDataUpdateId(_0x3edb2a,Array[_0x3b2f47(0x1e4)](_0x30e5f8)?_0x3b2f47(0x1e6)+_0x4ee6d9+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x2efd80,_0x2a53ca){const _0x8d04d7=a115_0xb2c2;if(Array[_0x8d04d7(0x1e4)](_0x2efd80['id'])&&_0x2a53ca[_0x8d04d7(0x1dd)]>0x1)return{..._0x2efd80,'id':_0x2a53ca['join'](',')};return _0x2efd80;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a116_0x5f4378=a116_0x532d;function a116_0xf496(){const _0x12d4e9=['2317548Txbtec','9ZNtcAr','18OwfzCJ','95742fTfFJq','4789172RaIeiQ','.cmd','win32','3513260sDcxfk','5229360hNpyDU','platform','3399347Mufapc','8YGHFlq','6104640duUcAj'];a116_0xf496=function(){return _0x12d4e9;};return a116_0xf496();}function a116_0x532d(_0x1f3e38,_0x1dd252){_0x1f3e38=_0x1f3e38-0x96;const _0xf49645=a116_0xf496();let _0x532d5f=_0xf49645[_0x1f3e38];return _0x532d5f;}(function(_0xd0a022,_0x58e219){const _0x55dccb=a116_0x532d,_0x2218c1=_0xd0a022();while(!![]){try{const _0x39c959=parseInt(_0x55dccb(0x9f))/0x1*(-parseInt(_0x55dccb(0x9a))/0x2)+-parseInt(_0x55dccb(0x9c))/0x3+parseInt(_0x55dccb(0xa0))/0x4+parseInt(_0x55dccb(0x96))/0x5+-parseInt(_0x55dccb(0x9e))/0x6*(-parseInt(_0x55dccb(0x99))/0x7)+-parseInt(_0x55dccb(0x97))/0x8*(parseInt(_0x55dccb(0x9d))/0x9)+-parseInt(_0x55dccb(0x9b))/0xa;if(_0x39c959===_0x58e219)break;else _0x2218c1['push'](_0x2218c1['shift']());}catch(_0x3f59d4){_0x2218c1['push'](_0x2218c1['shift']());}}}(a116_0xf496,0xe4ce6));export const isWindows=process[a116_0x5f4378(0x98)]===a116_0x5f4378(0xa2);export function resolveNpmBin(_0x4cf3b5){const _0x2ff1a6=a116_0x5f4378;return isWindows?_0x4cf3b5+_0x2ff1a6(0xa1):_0x4cf3b5;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a117_0x2798(_0x1a470d,_0xda7c93){_0x1a470d=_0x1a470d-0x1e7;const _0x2a32c8=a117_0x2a32();let _0x27989d=_0x2a32c8[_0x1a470d];return _0x27989d;}function a117_0x2a32(){const _0x174233=['timeout','8503326Xowjyg','279857kCazJq','checkedAt','/dist-tags','360eQsoAk','now','3osbliI','number','18mkyFSc','object','trim','major','Invalid\x20semver','string','3465770dQKbrD','lastNotifiedAt','minor','2098104HPFIYa','match','/v/','latest','patch',',\x20run:\x20','10AGwiki','json','lovrabet-cli','true','prerelease','yes','filter','/-/package/','623854GeDXYH','390656IGPWYS','utf8','entries','stringify','5439990SmXnWA','4uExOHW','lastNotifiedVersion'];a117_0x2a32=function(){return _0x174233;};return a117_0x2a32();}(function(_0x4f6934,_0x5df3cc){const _0x15f675=a117_0x2798,_0x22a4b7=_0x4f6934();while(!![]){try{const _0x13412b=-parseInt(_0x15f675(0x206))/0x1*(parseInt(_0x15f675(0x202))/0x2)+parseInt(_0x15f675(0x20b))/0x3*(-parseInt(_0x15f675(0x1fd))/0x4)+-parseInt(_0x15f675(0x201))/0x5+-parseInt(_0x15f675(0x20d))/0x6*(-parseInt(_0x15f675(0x1eb))/0x7)+parseInt(_0x15f675(0x1ee))/0x8+parseInt(_0x15f675(0x205))/0x9*(-parseInt(_0x15f675(0x1f4))/0xa)+-parseInt(_0x15f675(0x1fc))/0xb*(-parseInt(_0x15f675(0x209))/0xc);if(_0x13412b===_0x5df3cc)break;else _0x22a4b7['push'](_0x22a4b7['shift']());}catch(_0x3b2944){_0x22a4b7['push'](_0x22a4b7['shift']());}}}(a117_0x2a32,0xb9427));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(_0x2a9ea1){const _0x1bf9b5=a117_0x2798,_0x4e361a=_0x2a9ea1[_0x1bf9b5(0x1e7)]()[_0x1bf9b5(0x1ef)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x4e361a)return null;return{'major':Number(_0x4e361a[0x1]),'minor':Number(_0x4e361a[0x2]),'patch':Number(_0x4e361a[0x3]),'prerelease':_0x4e361a[0x4]};}function compareSemver(_0x356256,_0x21535c){const _0xd4261a=a117_0x2798,_0x8ded2=parseSemver(_0x356256),_0x173cb3=parseSemver(_0x21535c);if(!_0x8ded2||!_0x173cb3)throw new Error(_0xd4261a(0x1e9));for(const _0x4fdda9 of[_0xd4261a(0x1e8),_0xd4261a(0x1ed),_0xd4261a(0x1f2)]){if(_0x8ded2[_0x4fdda9]<_0x173cb3[_0x4fdda9])return-0x1;if(_0x8ded2[_0x4fdda9]>_0x173cb3[_0x4fdda9])return 0x1;}if(!_0x8ded2[_0xd4261a(0x1f8)]&&!_0x173cb3[_0xd4261a(0x1f8)])return 0x0;if(!_0x8ded2['prerelease'])return 0x1;if(!_0x173cb3[_0xd4261a(0x1f8)])return-0x1;if(_0x8ded2[_0xd4261a(0x1f8)]===_0x173cb3['prerelease'])return 0x0;return _0x8ded2[_0xd4261a(0x1f8)]<_0x173cb3['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0xe36f9c=a117_0x2798,_0x558e29=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0xe36f9c(0x1e7)]()['toLowerCase']();return _0x558e29==='1'||_0x558e29===_0xe36f9c(0x1f7)||_0x558e29===_0xe36f9c(0x1f9);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x5de6ba=a117_0x2798;return join(cacheRoot(),_0x5de6ba(0x1f6),'update-check.json');}async function readUpdateNoticeCache(){const _0x5bb4a7=a117_0x2798;try{const _0x4e1574=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x2139ba=JSON['parse'](_0x4e1574);if(!_0x2139ba||typeof _0x2139ba!==_0x5bb4a7(0x20e))return{};return _0x2139ba;}catch{return{};}}async function writeUpdateNoticeCache(_0x428cc7){const _0x51922e=a117_0x2798;try{const _0x243e09=getUpdateNoticeCachePath();await mkdir(dirname(_0x243e09),{'recursive':!![]}),await writeFile(_0x243e09,JSON[_0x51922e(0x200)](_0x428cc7,null,0x2)+'\x0a',_0x51922e(0x1fe));}catch{}}function isFreshCheck(_0x5bf326,_0x110e13){const _0x9c084e=a117_0x2798;return typeof _0x5bf326[_0x9c084e(0x207)]===_0x9c084e(0x20c)&&_0x110e13-_0x5bf326[_0x9c084e(0x207)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x9facf,_0x34b5a0,_0x5d9b02){const _0x3461b3=a117_0x2798;return _0x9facf[_0x3461b3(0x203)]===_0x34b5a0&&typeof _0x9facf[_0x3461b3(0x1ec)]===_0x3461b3(0x20c)&&_0x5d9b02-_0x9facf['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0xeba4a2=0x5dc){const _0x254761=a117_0x2798;try{const _0x12e1bc=NPM_REGISTRY_BASE_URL+_0x254761(0x1fb)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x254761(0x208),_0x1785d0=await fetch(_0x12e1bc,{'signal':AbortSignal[_0x254761(0x204)](_0xeba4a2)});if(!_0x1785d0['ok'])return null;const _0x1f3870=await _0x1785d0[_0x254761(0x1f5)]();if(!_0x1f3870||typeof _0x1f3870!=='object')return null;return Object['fromEntries'](Object[_0x254761(0x1ff)](_0x1f3870)[_0x254761(0x1fa)](([,_0x102598])=>typeof _0x102598===_0x254761(0x1ea)&&_0x102598['trim']())['map'](([_0x3f2a9d,_0x39b973])=>[_0x3f2a9d,String(_0x39b973)[_0x254761(0x1e7)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x1bc9f4){const _0x5caea6=a117_0x2798;return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+_0x5caea6(0x1f0)+_0x1bc9f4;}export async function resolveLatestUpdateNotice(){const _0x22ceb4=a117_0x2798;if(isUpdateNoticeDisabled())return null;try{const _0x37501e=Date[_0x22ceb4(0x20a)](),_0x3ee372=getCliVersion(),_0x17525a=await readUpdateNoticeCache();let _0x6ad39=isFreshCheck(_0x17525a,_0x37501e)?_0x17525a[_0x22ceb4(0x1f1)]?.[_0x22ceb4(0x1e7)]():undefined;if(!_0x6ad39&&!isFreshCheck(_0x17525a,_0x37501e)){const _0x2d603f=await fetchNpmDistTags();_0x6ad39=_0x2d603f?.[_0x22ceb4(0x1f1)]?.[_0x22ceb4(0x1e7)](),await writeUpdateNoticeCache({..._0x17525a,'checkedAt':_0x37501e,'latest':_0x6ad39,'failed':!_0x6ad39});}if(!_0x6ad39||compareSemver(_0x3ee372,_0x6ad39)>=0x0)return null;if(isRecentlyNotified(_0x17525a,_0x6ad39,_0x37501e))return null;const _0x35f2c8=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x17525a,'checkedAt':isFreshCheck(_0x17525a,_0x37501e)?_0x17525a[_0x22ceb4(0x207)]:_0x37501e,'latest':_0x6ad39,'failed':![],'lastNotifiedVersion':_0x6ad39,'lastNotifiedAt':_0x37501e}),{'command':_0x35f2c8,'current':_0x3ee372,'latest':_0x6ad39,'url':buildNpmVersionUrl(_0x6ad39),'message':CLI_BIN_NAME+'\x20'+_0x6ad39+'\x20available,\x20current\x20'+_0x3ee372+_0x22ceb4(0x1f3)+_0x35f2c8};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a118_0xda4d(_0x299045,_0x12662c){_0x299045=_0x299045-0x198;const _0x35cb22=a118_0x35cb();let _0xda4d5f=_0x35cb22[_0x299045];return _0xda4d5f;}(function(_0x3ec6ea,_0xd3978c){const _0x5edfba=a118_0xda4d,_0x389748=_0x3ec6ea();while(!![]){try{const _0x4e3155=parseInt(_0x5edfba(0x19b))/0x1*(parseInt(_0x5edfba(0x19a))/0x2)+parseInt(_0x5edfba(0x19d))/0x3+-parseInt(_0x5edfba(0x1a2))/0x4+parseInt(_0x5edfba(0x198))/0x5+parseInt(_0x5edfba(0x19f))/0x6+parseInt(_0x5edfba(0x19e))/0x7*(parseInt(_0x5edfba(0x1a3))/0x8)+-parseInt(_0x5edfba(0x1a1))/0x9*(parseInt(_0x5edfba(0x19c))/0xa);if(_0x4e3155===_0xd3978c)break;else _0x389748['push'](_0x389748['shift']());}catch(_0x42bcdf){_0x389748['push'](_0x389748['shift']());}}}(a118_0x35cb,0x6b328));function a118_0x35cb(){const _0x1fcc4f=['1609260eZldSO','184sgyAeb','2554480PFlCNO','unknown','2UXmfoi','74279nMKWUn','1376560vubsvX','880557AZdHug','44667djOlRZ','547500RfLLPS','slice','18ZUpcTF'];a118_0x35cb=function(){return _0x1fcc4f;};return a118_0x35cb();}import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x27bcf0=a118_0xda4d,_0x22fc61=String(GIT_COMMIT);return _0x22fc61&&_0x22fc61!==_0x27bcf0(0x199)?_0x22fc61:'';}export function getCliVersionDisplay(){const _0x58caee=a118_0xda4d,_0x33955b=getCliGitCommit(),_0x1fed9a=BUILD_TIME[_0x58caee(0x1a0)](0x0,0xa);if(!_0x33955b||!_0x1fed9a)return VERSION;return VERSION+'\x20('+_0x33955b+',\x20'+_0x1fed9a+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a119_0xde97(){var _0x41d2d0=['1898935MZdZRL','2168736DQICTD','stderr','798175qPdIlK','4111911pByxtP','12PKgNGf','write','5740224mKcFkJ','2911116GbsNKo','2261388lFGqAo','21LpdwZo'];a119_0xde97=function(){return _0x41d2d0;};return a119_0xde97();}function a119_0x4d0a(_0x15e12d,_0x30d1a2){_0x15e12d=_0x15e12d-0x12b;var _0xde97c2=a119_0xde97();var _0x4d0a60=_0xde97c2[_0x15e12d];return _0x4d0a60;}(function(_0x5c1c3e,_0x50eb32){var _0x440106=a119_0x4d0a,_0x47ee72=_0x5c1c3e();while(!![]){try{var _0x5a7daf=parseInt(_0x440106(0x12f))/0x1+parseInt(_0x440106(0x12d))/0x2+-parseInt(_0x440106(0x134))/0x3+-parseInt(_0x440106(0x131))/0x4*(-parseInt(_0x440106(0x12c))/0x5)+-parseInt(_0x440106(0x135))/0x6*(parseInt(_0x440106(0x12b))/0x7)+-parseInt(_0x440106(0x133))/0x8+parseInt(_0x440106(0x130))/0x9;if(_0x5a7daf===_0x50eb32)break;else _0x47ee72['push'](_0x47ee72['shift']());}catch(_0x415e4c){_0x47ee72['push'](_0x47ee72['shift']());}}}(a119_0xde97,0xa12dd));export function writeCliSideChannelLine(_0x51d8eb){var _0x39066f=a119_0x4d0a;process[_0x39066f(0x12e)][_0x39066f(0x132)](_0x51d8eb+'\x0a');}
|