@lovrabet/lovrabet-cli 2.2.7-beta.1 → 2.3.0-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.d.ts +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/init.d.ts +12 -0
- package/lib/commands/config/init.js +1 -0
- package/lib/commands/config/shared.d.ts +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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.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/diagram.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/diagram.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/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.d.ts +11 -0
- package/lib/config/domain-config.js +1 -0
- package/lib/config/schema.d.ts +7 -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.d.ts +4 -0
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.d.ts +10 -3
- 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.d.ts +52 -14
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.d.ts +15 -0
- package/lib/constant/region.js +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.d.ts +2 -0
- package/lib/constant/url.js +1 -1
- package/lib/context.d.ts +2 -6
- 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.d.ts +2 -0
- 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/raw-flags.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.d.ts +3 -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.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.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/install-target.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/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.d.ts +15 -0
- package/lib/utils/access-key-redaction.js +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.d.ts +12 -0
- package/lib/utils/cli-version-check.js +1 -0
- package/lib/utils/cli-version-policy.d.ts +12 -0
- package/lib/utils/cli-version-policy.js +1 -0
- 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.d.ts +2 -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 +3 -1
- package/skills/lovrabet/SKILL.md +11 -12
- package/skills/lovrabet/guides/troubleshooting.md +12 -8
- package/skills/lovrabet/references/lovrabet-app.md +1 -1
- package/skills/lovrabet/references/lovrabet-auth.md +7 -25
- package/skills/lovrabet/references/lovrabet-config-commands.md +42 -5
- package/skills/lovrabet/references/lovrabet-config.md +25 -5
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0xfbacd7=a143_0x31b9;(function(_0xc703ef,_0xca9d27){const _0x2b2741=a143_0x31b9,_0x1d176e=_0xc703ef();while(!![]){try{const _0x19d5ab=parseInt(_0x2b2741(0x16c))/0x1*(parseInt(_0x2b2741(0x164))/0x2)+-parseInt(_0x2b2741(0x15a))/0x3+-parseInt(_0x2b2741(0x167))/0x4+parseInt(_0x2b2741(0x16f))/0x5*(-parseInt(_0x2b2741(0x16e))/0x6)+parseInt(_0x2b2741(0x163))/0x7+-parseInt(_0x2b2741(0x165))/0x8+parseInt(_0x2b2741(0x15e))/0x9*(parseInt(_0x2b2741(0x159))/0xa);if(_0x19d5ab===_0xca9d27)break;else _0x1d176e['push'](_0x1d176e['shift']());}catch(_0x15fd13){_0x1d176e['push'](_0x1d176e['shift']());}}}(a143_0x460e,0x749d9));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x192d14={}){const _0x473b8b=a143_0x31b9,_0xb88e37=_0x192d14['homeDir']??homedir(),_0x37b808=resolve(_0xb88e37,PRODUCT_CONFIG[_0x473b8b(0x155)],_0x473b8b(0x168)),_0x57a378=trimmedEnv('SKILL_ROOT'),_0x1e548a=trimmedEnv('CLAUDE_SKILL_ROOT'),_0x59ee29=resolve(_0xb88e37,_0x473b8b(0x16d)),_0x51e0e5=_0x192d14[_0x473b8b(0x162)]??(existsSync(_0x59ee29)?resolve(_0x59ee29,_0x473b8b(0x170)):undefined);return{'homeDir':_0xb88e37,'cacheRoot':_0x37b808,'managedRoot':resolve(_0xb88e37,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x192d14[_0x473b8b(0x15d)]??_0x57a378??resolve(_0xb88e37,_0x473b8b(0x158),'skills'),'claudeSkillsDir':_0x192d14[_0x473b8b(0x16b)]??_0x1e548a??resolve(_0xb88e37,_0x473b8b(0x156),_0x473b8b(0x170)),'workbuddySkillsDir':_0x51e0e5};}export function runtimeAgentSkillRoots(_0xa6fd34){const _0x4c97fc=a143_0x31b9;return[_0xa6fd34['agentsSkillsDir'],_0xa6fd34[_0x4c97fc(0x16b)],_0xa6fd34[_0x4c97fc(0x162)]][_0x4c97fc(0x15f)](_0x3adb1c=>Boolean(_0x3adb1c));}export function getRuntimeSkillCacheRoot(_0x523dff,_0x3da433,_0x1c5dea={}){const _0x431d80=a143_0x31b9,_0x19033b=resolveSkillSyncPaths(_0x1c5dea);return resolve(_0x19033b[_0x431d80(0x160)],_0x523dff,fingerprintAccessKey(_0x3da433),'skills');}function a143_0x31b9(_0x4029df,_0x113aec){_0x4029df=_0x4029df-0x155;const _0x460e17=a143_0x460e();let _0x31b979=_0x460e17[_0x4029df];return _0x31b979;}export function getRuntimeSkillDir(_0x3a3f63,_0x424ea7,_0x525778,_0x216b8e,_0x436f04,_0x187c43={}){const _0x1b1c08=a143_0x31b9;return resolve(getRuntimeSkillCacheRoot(_0x3a3f63,_0x424ea7,_0x187c43),safePathSegment(_0x525778,_0x1b1c08(0x169)),_0x216b8e,safePathSegment(_0x436f04,_0x1b1c08(0x166)));}export function safePathSegment(_0x189d5b,_0x465a3c=a143_0xfbacd7(0x15b)){const _0x2194c0=a143_0xfbacd7;if(!_0x189d5b||_0x189d5b[_0x2194c0(0x15c)]('/')||_0x189d5b[_0x2194c0(0x15c)]('\x5c')||_0x189d5b[_0x2194c0(0x15c)]('..'))throw CliErrors['validation'](_0x2194c0(0x161)+_0x465a3c+_0x2194c0(0x157)+_0x189d5b);return _0x189d5b;}function a143_0x460e(){const _0x15a9b8=['30042TWhKDz','filter','cacheRoot','Unsafe\x20','workbuddySkillsDir','193914qLooCR','87378eaqfVH','3812088clBwZx','skillCode','2553328JiKUSG','cache','appCode','trim','claudeSkillsDir','11iPttvv','.workbuddy','156tsZXUW','32465eJkPkj','skills','homeDirName','.claude','\x20for\x20local\x20path:\x20','.agents','6410aoSadn','2659863FZNZhH','path\x20segment','includes','agentsSkillsDir'];a143_0x460e=function(){return _0x15a9b8;};return a143_0x460e();}function trimmedEnv(_0xdd2f35){const _0x3504a4=a143_0xfbacd7,_0x9e5ac8=productEnv(_0xdd2f35)?.[_0x3504a4(0x16a)]();return _0x9e5ac8?_0x9e5ac8:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x282992,_0x24713c){const _0x49fe9c=a141_0x4ea4,_0x366b8c=_0x282992();while(!![]){try{const _0x496fa8=parseInt(_0x49fe9c(0x10d))/0x1*(parseInt(_0x49fe9c(0x123))/0x2)+parseInt(_0x49fe9c(0x115))/0x3*(-parseInt(_0x49fe9c(0xef))/0x4)+-parseInt(_0x49fe9c(0x124))/0x5+parseInt(_0x49fe9c(0xfd))/0x6*(-parseInt(_0x49fe9c(0x121))/0x7)+parseInt(_0x49fe9c(0xf1))/0x8*(-parseInt(_0x49fe9c(0x122))/0x9)+parseInt(_0x49fe9c(0x11c))/0xa*(parseInt(_0x49fe9c(0xfb))/0xb)+-parseInt(_0x49fe9c(0xf2))/0xc*(-parseInt(_0x49fe9c(0x105))/0xd);if(_0x496fa8===_0x24713c)break;else _0x366b8c['push'](_0x366b8c['shift']());}catch(_0x597d77){_0x366b8c['push'](_0x366b8c['shift']());}}}(a141_0x1032,0x5407c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a141_0x533297}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 a141_0x4ea4(_0x178e77,_0x5b751f){_0x178e77=_0x178e77-0xe1;const _0x1032ab=a141_0x1032();let _0x4ea4eb=_0x1032ab[_0x178e77];return _0x4ea4eb;}import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x562205,_0xeffeba,_0x4d8cec={}){const _0x2b9270=a141_0x4ea4,_0x18f0ed=resolvePushDirectoryRoot(_0x562205),_0x51c6d4=readPushMetadataIfPresent(resolve(_0x18f0ed,METADATA_FILE),{'ignoreInvalidMetadata':_0x4d8cec['ignoreInvalidMetadata']});if(_0x51c6d4?.[_0x2b9270(0x110)]&&_0x51c6d4[_0x2b9270(0x110)]!==_0xeffeba&&!_0x4d8cec[_0x2b9270(0xf4)]&&!_0x4d8cec[_0x2b9270(0x11a)])throw CliErrors['validation'](_0x2b9270(0xfe)+_0x51c6d4[_0x2b9270(0x110)]+_0x2b9270(0x116)+_0xeffeba+'\x22.');const _0x13b281=resolvePushSkillCode(_0x18f0ed,_0xeffeba,_0x51c6d4,_0x4d8cec);if(!_0x13b281)throw CliErrors[_0x2b9270(0xf7)](_0x2b9270(0x118)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x18f0ed,'skillCode':_0x13b281,'metadata':_0x51c6d4};}export function readPushDirectory(_0x4e2f00,_0x3f6f86,_0x118f29={}){const _0x1e3364=a141_0x4ea4,_0x25ad50=resolvePushDirectoryIdentity(_0x4e2f00,_0x3f6f86,_0x118f29),_0x146c06=_0x25ad50[_0x1e3364(0xf0)],_0x1251d5=resolve(_0x146c06,SKILL_FILE);if(!existsSync(_0x1251d5)||!lstatSync(_0x1251d5)[_0x1e3364(0xf8)]())throw CliErrors[_0x1e3364(0xf7)](_0x1e3364(0x119)+SKILL_FILE+':\x20'+_0x1251d5);const _0xee903d=_0x25ad50['metadata'],_0x1bf252=_0x118f29['targetScope']??_0x1e3364(0x10f);if(!_0x118f29[_0x1e3364(0x11f)]&&_0xee903d?.['scope']==='builtin')throw CliErrors['validation'](_0x1e3364(0x11b)+METADATA_FILE+_0x1e3364(0x125)+_0xee903d['scope']+'\x22.');if(!_0x118f29[_0x1e3364(0x11f)]&&_0x1bf252===_0x1e3364(0x10f)&&_0xee903d?.[_0x1e3364(0x117)]&&_0xee903d['scope']!==_0x1e3364(0x10f))throw CliErrors[_0x1e3364(0xf7)](_0x1e3364(0xec)+METADATA_FILE+_0x1e3364(0x125)+_0xee903d[_0x1e3364(0x117)]+'\x22.',_0x1e3364(0xee)+_0x146c06+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x488728=scanSkillDirectory(_0x146c06,{'excludedFilePaths':_0x118f29['excludedFilePaths']}),_0x43d8b7=buildSkillPackage(_0x488728),_0x55e76f=readFileSync(_0x1251d5,_0x1e3364(0xfc)),_0x510429=_0x25ad50['skillCode'],_0x1a9464=_0x118f29['ignoreMetadataForPayload']?undefined:_0xee903d,_0x15f0a4=readSkillDisplayName(_0x55e76f);return{'skillCode':_0x510429,'metadata':_0xee903d,'frontmatterDisplayName':_0x15f0a4,'input':{'skillCode':_0x510429,'skillName':_0x15f0a4??_0x1a9464?.[_0x1e3364(0x120)],'description':_0x1a9464?.[_0x1e3364(0xe9)],'content':_0x55e76f,'files':_0x43d8b7['manifest'],'packageBase64':_0x43d8b7[_0x1e3364(0xfa)],'tags':_0x1a9464?.[_0x1e3364(0x10c)],'version':_0x1a9464?.[_0x1e3364(0xe5)],'sourceSessionId':_0x1a9464?.[_0x1e3364(0x10a)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x5826f4,_0x2db2db,_0xdabaa7,_0x4a2743={}){const _0x57fe83=a141_0x4ea4,_0x49c58f=resolvePushDirectoryRoot(_0x5826f4),_0x51467d=readPushMetadataIfPresent(resolve(_0x49c58f,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x548c43=requireRemoteScope(_0x2db2db),_0x1ada32=readLocalSkillContent(_0x49c58f),_0x8a2bc9={..._0x2db2db,'appCode':_0x2db2db[_0x57fe83(0x110)]??_0xdabaa7,'skillName':_0x2db2db[_0x57fe83(0x120)]??_0x51467d?.[_0x57fe83(0x120)],'description':_0x2db2db[_0x57fe83(0xe9)]??_0x51467d?.[_0x57fe83(0xe9)],'example':_0x2db2db[_0x57fe83(0x109)]??_0x51467d?.[_0x57fe83(0x109)],'tags':Array['isArray'](_0x2db2db[_0x57fe83(0x10c)])?_0x2db2db['tags']:_0x51467d?.['tags'],'sourceSessionId':_0x2db2db[_0x57fe83(0x10a)]??_0x51467d?.[_0x57fe83(0x10a)],'content':_0x2db2db[_0x57fe83(0x111)]??_0x1ada32},_0x4ccbd9=buildMetadata(_0x8a2bc9,_0x548c43,_0xdabaa7,contentHash(_0x1ada32),_0x4a2743[_0x57fe83(0x104)]);writeJsonAtomic(resolve(_0x49c58f,METADATA_FILE),_0x4ccbd9);}export function recordPushedRuntimeSkill(_0x378a66,_0x5e7306,_0x46c498,_0x3f7d82={}){const _0x112c58=a141_0x4ea4,_0x15182b=resolvePushDirectoryRoot(_0x378a66),_0x21b8f2=scanSkillDirectory(_0x15182b),_0x2ecc5d=_0x21b8f2['find'](_0x412d08=>_0x412d08[_0x112c58(0xe2)]===SKILL_FILE),_0x7c6e3c=_0x2ecc5d?fileText(_0x2ecc5d):'',_0x184450=tryNormalizePackageManifest(_0x5e7306[_0x112c58(0xe6)]),_0x288e15={..._0x5e7306,'content':_0x5e7306[_0x112c58(0x111)]??_0x7c6e3c,'files':_0x184450},_0x45e7dc=_0x184450?normalizeLocalFiles(_0x21b8f2)[_0x112c58(0x114)](_0x3a2224=>_0x184450['files'][_0x112c58(0x102)](_0x2f9f3d=>_0x2f9f3d[_0x112c58(0xe2)]===_0x3a2224[_0x112c58(0xe2)])):undefined,_0x15e186=buildMetadata(_0x288e15,_0x3f7d82[_0x112c58(0x117)]??_0x112c58(0x10f),_0x46c498,contentHash(_0x288e15[_0x112c58(0x111)]??''),_0x3f7d82[_0x112c58(0x100)],_0x45e7dc);writeJsonAtomic(resolve(_0x15182b,METADATA_FILE),_0x15e186);}export function deriveSkillCodeFromDirectory(_0x5ef49f,_0x461984){const _0x314021=a141_0x4ea4,_0x2c108a=basename(resolve(_0x5ef49f)),_0x45d0ec=_0x461984+'--';return _0x2c108a[_0x314021(0x106)](_0x45d0ec)?_0x2c108a[_0x314021(0xea)](_0x45d0ec[_0x314021(0xe7)]):_0x2c108a;}function resolvePushSkillCode(_0x2973dc,_0x27bb0a,_0x241dad,_0x26a4ab){const _0x25abd1=a141_0x4ea4,_0x440d01=deriveSkillCodeFromSkillFile(_0x2973dc)||deriveSkillCodeFromDirectory(_0x2973dc,_0x27bb0a);if(_0x26a4ab[_0x25abd1(0xf6)])return _0x440d01;return _0x241dad?.[_0x25abd1(0xe1)]?.['trim']()||_0x440d01;}function a141_0x1032(){const _0x220638=['packageBase64','2838DStYrI','utf8','6AstQvS','Skill\x20metadata\x20appCode\x20\x22','isArray','pushedAt','Skill\x20directory\x20not\x20found:\x20','some','(unknown)','refreshedAt','26DTwUzI','startsWith','isDirectory','toLowerCase','example','sourceSessionId','isSymbolicLink','tags','83753HVXUmW','trim','personal','appCode','content','Invalid\x20','string','filter','553581nJNteT','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','scope','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Missing\x20','ignoreMetadataAppCodeMismatch','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','4230kLItlM','number','boolean','ignoreMetadataScope','skillName','4009243LAjkhB','8631EPUfGX','10Jywnop','3421215HbbJQR','\x20has\x20scope=\x22','skillCode','path','\x20name\x20for\x20SkillHub\x20slug\x20generation.','\x20has\x20unsupported\x20scope\x20\x22','version','files','length','match','description','slice','replace','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','builtin','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','4IhqlPq','dir','480shkFsm','7892088JCHxUa','unknown','allowAppCodeRetarget','company','ignoreMetadataSkillCode','validation','isFile','displayName'];a141_0x1032=function(){return _0x220638;};return a141_0x1032();}function deriveSkillCodeFromSkillFile(_0x254736){const _0xb91b54=a141_0x4ea4,_0x63b56=resolve(_0x254736,SKILL_FILE);if(!existsSync(_0x63b56)||!lstatSync(_0x63b56)[_0xb91b54(0xf8)]())return undefined;const _0x3ed29d=readFileSync(_0x63b56,_0xb91b54(0xfc)),_0x25dab8=_0x3ed29d['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x25dab8)return undefined;const _0x3437e2=parseFrontmatterObject(_0x25dab8[0x1]??''),_0x38bab0=scalarToString(_0x3437e2?.['name']);return _0x38bab0?slugifySkillName(_0x38bab0):undefined;}function readSkillDisplayName(_0x2d2465){const _0x32b8c3=a141_0x4ea4,_0x18bb08=_0x2d2465[_0x32b8c3(0xe8)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x18bb08)return undefined;const _0x16cd31=parseFrontmatterObject(_0x18bb08[0x1]??'');return scalarToString(_0x16cd31?.[_0x32b8c3(0xf9)]);}function slugifySkillName(_0x214750){const _0xad3200=a141_0x4ea4,_0x2e8040=_0x214750[_0xad3200(0x10e)]()[_0xad3200(0x108)]()[_0xad3200(0xeb)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0xad3200(0xeb)](/^-+/,'')[_0xad3200(0xeb)](/-+$/,'')[_0xad3200(0xeb)](/-{2,}/g,'-');if(!_0x2e8040)throw CliErrors[_0xad3200(0xf7)](_0xad3200(0x112)+SKILL_FILE+_0xad3200(0xe3));return _0x2e8040;}function parseFrontmatterObject(_0x26d37f){const _0x2de3ff=a141_0x4ea4;try{const _0x419aea=a141_0x533297(_0x26d37f);return _0x419aea&&typeof _0x419aea==='object'&&!Array[_0x2de3ff(0xff)](_0x419aea)?_0x419aea:undefined;}catch{return undefined;}}function scalarToString(_0x1b7250){const _0x20a33f=a141_0x4ea4;if(typeof _0x1b7250===_0x20a33f(0x113))return _0x1b7250[_0x20a33f(0x10e)]();if(typeof _0x1b7250===_0x20a33f(0x11d)||typeof _0x1b7250===_0x20a33f(0x11e))return String(_0x1b7250);return undefined;}function resolvePushDirectoryRoot(_0x15e2d3){const _0x26e5e3=a141_0x4ea4,_0xa85076=resolve(_0x15e2d3);if(!existsSync(_0xa85076))throw CliErrors[_0x26e5e3(0xf7)](_0x26e5e3(0x101)+_0x15e2d3);const _0x4078cb=lstatSync(_0xa85076);if(_0x4078cb[_0x26e5e3(0x107)]())return _0xa85076;if(_0x4078cb[_0x26e5e3(0x10b)]()){const _0x578474=realpathSync(_0xa85076);if(lstatSync(_0x578474)['isDirectory']())return _0x578474;}throw CliErrors['validation'](_0x26e5e3(0x101)+_0x15e2d3);}function requireRemoteScope(_0x227590){const _0x2f088e=a141_0x4ea4;if(_0x227590[_0x2f088e(0x117)]==='personal'||_0x227590[_0x2f088e(0x117)]===_0x2f088e(0xf5)||_0x227590['scope']===_0x2f088e(0xed))return _0x227590['scope'];throw CliErrors[_0x2f088e(0xf7)]('Remote\x20Skill\x20'+(_0x227590[_0x2f088e(0xe1)]||_0x2f088e(0x103))+_0x2f088e(0xe4)+(_0x227590[_0x2f088e(0x117)]??_0x2f088e(0xf3))+'\x22.');}function readLocalSkillContent(_0x56a266){const _0x47f609=a141_0x4ea4,_0x5f3688=resolve(_0x56a266,SKILL_FILE);return existsSync(_0x5f3688)&&lstatSync(_0x5f3688)[_0x47f609(0xf8)]()?readFileSync(_0x5f3688,_0x47f609(0xfc)):'';}function readPushMetadataIfPresent(_0x529a17,_0x1ba30d={}){try{return readMetadataIfPresent(_0x529a17);}catch(_0x26f2cb){if(_0x1ba30d['ignoreInvalidMetadata'])return undefined;throw _0x26f2cb;}}
|
|
1
|
+
(function(_0x18955f,_0x20cb51){const _0x169c3b=a144_0x9a42,_0x3ef25b=_0x18955f();while(!![]){try{const _0x2bce2c=-parseInt(_0x169c3b(0x164))/0x1*(-parseInt(_0x169c3b(0x173))/0x2)+-parseInt(_0x169c3b(0x1a4))/0x3+-parseInt(_0x169c3b(0x1a5))/0x4+-parseInt(_0x169c3b(0x17f))/0x5*(parseInt(_0x169c3b(0x1a3))/0x6)+-parseInt(_0x169c3b(0x16b))/0x7+parseInt(_0x169c3b(0x168))/0x8+parseInt(_0x169c3b(0x16e))/0x9*(parseInt(_0x169c3b(0x198))/0xa);if(_0x2bce2c===_0x20cb51)break;else _0x3ef25b['push'](_0x3ef25b['shift']());}catch(_0x581a4c){_0x3ef25b['push'](_0x3ef25b['shift']());}}}(a144_0x1ee6,0x78a6c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a144_0x5cf3d0}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(_0x2ff145,_0x41b155,_0x4c116d={}){const _0x121d6d=a144_0x9a42,_0x2b2182=resolvePushDirectoryRoot(_0x2ff145),_0xf08570=readPushMetadataIfPresent(resolve(_0x2b2182,METADATA_FILE),{'ignoreInvalidMetadata':_0x4c116d['ignoreInvalidMetadata']});if(_0xf08570?.['appCode']&&_0xf08570['appCode']!==_0x41b155&&!_0x4c116d[_0x121d6d(0x19c)]&&!_0x4c116d[_0x121d6d(0x162)])throw CliErrors[_0x121d6d(0x167)](_0x121d6d(0x180)+_0xf08570[_0x121d6d(0x1a2)]+_0x121d6d(0x1a0)+_0x41b155+'\x22.');const _0x31c392=resolvePushSkillCode(_0x2b2182,_0x41b155,_0xf08570,_0x4c116d);if(!_0x31c392)throw CliErrors['validation'](_0x121d6d(0x16c)+SKILL_FILE+',\x20'+METADATA_FILE+_0x121d6d(0x18d));return{'dir':_0x2b2182,'skillCode':_0x31c392,'metadata':_0xf08570};}export function readPushDirectory(_0x21aa71,_0x69f6c2,_0x5b30b8={}){const _0x3df8a1=a144_0x9a42,_0x1df8fe=resolvePushDirectoryIdentity(_0x21aa71,_0x69f6c2,_0x5b30b8),_0x4a4a15=_0x1df8fe[_0x3df8a1(0x192)],_0x458b11=resolve(_0x4a4a15,SKILL_FILE);if(!existsSync(_0x458b11)||!lstatSync(_0x458b11)[_0x3df8a1(0x17a)]())throw CliErrors['validation'](_0x3df8a1(0x189)+SKILL_FILE+':\x20'+_0x458b11);const _0x32bf52=_0x1df8fe[_0x3df8a1(0x181)],_0x39f5b9=_0x5b30b8[_0x3df8a1(0x16f)]??_0x3df8a1(0x186);if(!_0x5b30b8['ignoreMetadataScope']&&_0x32bf52?.['scope']===_0x3df8a1(0x19e))throw CliErrors['validation'](_0x3df8a1(0x178)+METADATA_FILE+_0x3df8a1(0x197)+_0x32bf52[_0x3df8a1(0x17b)]+'\x22.');if(!_0x5b30b8[_0x3df8a1(0x199)]&&_0x39f5b9===_0x3df8a1(0x186)&&_0x32bf52?.['scope']&&_0x32bf52[_0x3df8a1(0x17b)]!==_0x3df8a1(0x186))throw CliErrors[_0x3df8a1(0x167)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x3df8a1(0x197)+_0x32bf52[_0x3df8a1(0x17b)]+'\x22.',_0x3df8a1(0x191)+_0x4a4a15+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x4cf60b=scanSkillDirectory(_0x4a4a15,{'excludedFilePaths':_0x5b30b8[_0x3df8a1(0x177)]}),_0x5290ea=buildSkillPackage(_0x4cf60b),_0x1febec=readFileSync(_0x458b11,_0x3df8a1(0x170)),_0x322269=_0x1df8fe[_0x3df8a1(0x19f)],_0x1255ba=_0x5b30b8['ignoreMetadataForPayload']?undefined:_0x32bf52,_0xb04aab=readSkillDisplayName(_0x1febec);return{'skillCode':_0x322269,'metadata':_0x32bf52,'frontmatterDisplayName':_0xb04aab,'input':{'skillCode':_0x322269,'skillName':_0xb04aab??_0x1255ba?.[_0x3df8a1(0x18a)],'description':_0x1255ba?.[_0x3df8a1(0x182)],'content':_0x1febec,'files':_0x5290ea[_0x3df8a1(0x19b)],'packageBase64':_0x5290ea[_0x3df8a1(0x1a1)],'tags':_0x1255ba?.[_0x3df8a1(0x17d)],'version':_0x1255ba?.['version'],'sourceSessionId':_0x1255ba?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x42c209,_0x2a1072,_0x1a1853,_0x2b85fd={}){const _0x2ad410=a144_0x9a42,_0x3e7852=resolvePushDirectoryRoot(_0x42c209),_0x6bc5a2=readPushMetadataIfPresent(resolve(_0x3e7852,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x5449b8=requireRemoteScope(_0x2a1072),_0x3b70b2=readLocalSkillContent(_0x3e7852),_0x3cfc6c={..._0x2a1072,'appCode':_0x2a1072['appCode']??_0x1a1853,'skillName':_0x2a1072[_0x2ad410(0x18a)]??_0x6bc5a2?.[_0x2ad410(0x18a)],'description':_0x2a1072[_0x2ad410(0x182)]??_0x6bc5a2?.[_0x2ad410(0x182)],'example':_0x2a1072[_0x2ad410(0x171)]??_0x6bc5a2?.['example'],'tags':Array[_0x2ad410(0x19a)](_0x2a1072[_0x2ad410(0x17d)])?_0x2a1072[_0x2ad410(0x17d)]:_0x6bc5a2?.['tags'],'sourceSessionId':_0x2a1072[_0x2ad410(0x184)]??_0x6bc5a2?.[_0x2ad410(0x184)],'content':_0x2a1072[_0x2ad410(0x172)]??_0x3b70b2},_0x3bb1da=buildMetadata(_0x3cfc6c,_0x5449b8,_0x1a1853,contentHash(_0x3b70b2),_0x2b85fd[_0x2ad410(0x18e)]);writeJsonAtomic(resolve(_0x3e7852,METADATA_FILE),_0x3bb1da);}export function recordPushedRuntimeSkill(_0x34c767,_0x338114,_0x167052,_0xb56e15={}){const _0x150818=a144_0x9a42,_0x2e2bde=resolvePushDirectoryRoot(_0x34c767),_0x5474ee=scanSkillDirectory(_0x2e2bde),_0x3d8ace=_0x5474ee[_0x150818(0x169)](_0xc943c8=>_0xc943c8[_0x150818(0x17c)]===SKILL_FILE),_0xe7e1c7=_0x3d8ace?fileText(_0x3d8ace):'',_0xc5eb01=tryNormalizePackageManifest(_0x338114[_0x150818(0x17e)]),_0x81f58d={..._0x338114,'content':_0x338114[_0x150818(0x172)]??_0xe7e1c7,'files':_0xc5eb01},_0x31483b=_0xc5eb01?normalizeLocalFiles(_0x5474ee)['filter'](_0x497290=>_0xc5eb01['files']['some'](_0x5a1a5c=>_0x5a1a5c[_0x150818(0x17c)]===_0x497290[_0x150818(0x17c)])):undefined,_0x1e0563=buildMetadata(_0x81f58d,_0xb56e15[_0x150818(0x17b)]??_0x150818(0x186),_0x167052,contentHash(_0x81f58d['content']??''),_0xb56e15[_0x150818(0x175)],_0x31483b);writeJsonAtomic(resolve(_0x2e2bde,METADATA_FILE),_0x1e0563);}function a144_0x1ee6(){const _0x20a751=['excludedFilePaths','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','(unknown)','isFile','scope','path','tags','files','3187165KEeFAH','Skill\x20metadata\x20appCode\x20\x22','metadata','description','Skill\x20directory\x20not\x20found:\x20','sourceSessionId','boolean','personal','trim','isSymbolicLink','Missing\x20','skillName','match','Remote\x20Skill\x20',',\x20or\x20directory\x20name.','refreshedAt','length','Invalid\x20','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','dir','toLowerCase','ignoreMetadataSkillCode','number','displayName','\x20has\x20scope=\x22','70aWWFiZ','ignoreMetadataScope','isArray','manifest','allowAppCodeRetarget','startsWith','builtin','skillCode','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','packageBase64','appCode','6andyDe','1292307vElNmO','674492dGRzBx','ignoreMetadataAppCodeMismatch','slice','81cpFtlm','object','name','validation','2235504WShUcI','find','replace','409822ZAoVnI','Unable\x20to\x20resolve\x20skillCode\x20from\x20','isDirectory','1242369XHbSjm','targetScope','utf8','example','content','13428jfZNWx','ignoreInvalidMetadata','pushedAt','\x20has\x20unsupported\x20scope\x20\x22'];a144_0x1ee6=function(){return _0x20a751;};return a144_0x1ee6();}export function deriveSkillCodeFromDirectory(_0x1a9dde,_0x38a3b1){const _0x27de5c=a144_0x9a42,_0x816683=basename(resolve(_0x1a9dde)),_0x1e9851=_0x38a3b1+'--';return _0x816683[_0x27de5c(0x19d)](_0x1e9851)?_0x816683[_0x27de5c(0x163)](_0x1e9851[_0x27de5c(0x18f)]):_0x816683;}function resolvePushSkillCode(_0x4e8596,_0x55b3c8,_0x1f02b9,_0x259876){const _0x4e2fd7=a144_0x9a42,_0x2cb8d0=deriveSkillCodeFromSkillFile(_0x4e8596)||deriveSkillCodeFromDirectory(_0x4e8596,_0x55b3c8);if(_0x259876[_0x4e2fd7(0x194)])return _0x2cb8d0;return _0x1f02b9?.[_0x4e2fd7(0x19f)]?.['trim']()||_0x2cb8d0;}function deriveSkillCodeFromSkillFile(_0xd9e17f){const _0x129f7a=a144_0x9a42,_0x48b527=resolve(_0xd9e17f,SKILL_FILE);if(!existsSync(_0x48b527)||!lstatSync(_0x48b527)[_0x129f7a(0x17a)]())return undefined;const _0x59ff81=readFileSync(_0x48b527,'utf8'),_0x210b88=_0x59ff81[_0x129f7a(0x18b)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x210b88)return undefined;const _0x2d1c5a=parseFrontmatterObject(_0x210b88[0x1]??''),_0x26fba2=scalarToString(_0x2d1c5a?.[_0x129f7a(0x166)]);return _0x26fba2?slugifySkillName(_0x26fba2):undefined;}function readSkillDisplayName(_0x5aec5e){const _0x2da282=a144_0x9a42,_0x5d957f=_0x5aec5e[_0x2da282(0x18b)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5d957f)return undefined;const _0x176abd=parseFrontmatterObject(_0x5d957f[0x1]??'');return scalarToString(_0x176abd?.[_0x2da282(0x196)]);}function slugifySkillName(_0x1fa643){const _0x29d79c=a144_0x9a42,_0x2f1a6a=_0x1fa643[_0x29d79c(0x187)]()[_0x29d79c(0x193)]()[_0x29d79c(0x16a)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x29d79c(0x16a)](/^-+/,'')[_0x29d79c(0x16a)](/-+$/,'')[_0x29d79c(0x16a)](/-{2,}/g,'-');if(!_0x2f1a6a)throw CliErrors[_0x29d79c(0x167)](_0x29d79c(0x190)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x2f1a6a;}function parseFrontmatterObject(_0xa935f1){const _0x2ca856=a144_0x9a42;try{const _0x3f040b=a144_0x5cf3d0(_0xa935f1);return _0x3f040b&&typeof _0x3f040b===_0x2ca856(0x165)&&!Array[_0x2ca856(0x19a)](_0x3f040b)?_0x3f040b:undefined;}catch{return undefined;}}function scalarToString(_0x4ce8f4){const _0x4ef7ea=a144_0x9a42;if(typeof _0x4ce8f4==='string')return _0x4ce8f4[_0x4ef7ea(0x187)]();if(typeof _0x4ce8f4===_0x4ef7ea(0x195)||typeof _0x4ce8f4===_0x4ef7ea(0x185))return String(_0x4ce8f4);return undefined;}function resolvePushDirectoryRoot(_0x5cf562){const _0x4319d4=a144_0x9a42,_0x1a33c9=resolve(_0x5cf562);if(!existsSync(_0x1a33c9))throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x5cf562);const _0x404a3c=lstatSync(_0x1a33c9);if(_0x404a3c[_0x4319d4(0x16d)]())return _0x1a33c9;if(_0x404a3c[_0x4319d4(0x188)]()){const _0x31e7db=realpathSync(_0x1a33c9);if(lstatSync(_0x31e7db)[_0x4319d4(0x16d)]())return _0x31e7db;}throw CliErrors[_0x4319d4(0x167)](_0x4319d4(0x183)+_0x5cf562);}function a144_0x9a42(_0x1f45f7,_0xd35843){_0x1f45f7=_0x1f45f7-0x162;const _0x1ee62b=a144_0x1ee6();let _0x9a429e=_0x1ee62b[_0x1f45f7];return _0x9a429e;}function requireRemoteScope(_0x3f3877){const _0x23a17d=a144_0x9a42;if(_0x3f3877[_0x23a17d(0x17b)]===_0x23a17d(0x186)||_0x3f3877['scope']==='company'||_0x3f3877['scope']==='builtin')return _0x3f3877[_0x23a17d(0x17b)];throw CliErrors[_0x23a17d(0x167)](_0x23a17d(0x18c)+(_0x3f3877[_0x23a17d(0x19f)]||_0x23a17d(0x179))+_0x23a17d(0x176)+(_0x3f3877[_0x23a17d(0x17b)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x31a703){const _0x44deda=a144_0x9a42,_0x27d685=resolve(_0x31a703,SKILL_FILE);return existsSync(_0x27d685)&&lstatSync(_0x27d685)[_0x44deda(0x17a)]()?readFileSync(_0x27d685,_0x44deda(0x170)):'';}function readPushMetadataIfPresent(_0x5e3c44,_0x41f413={}){const _0x207cc2=a144_0x9a42;try{return readMetadataIfPresent(_0x5e3c44);}catch(_0x3e1ebd){if(_0x41f413[_0x207cc2(0x174)])return undefined;throw _0x3e1ebd;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a145_0x2f8f(){const _0x5513e4=['210GjiGCM','6LNWfRI','3LDgnSy','validation','push','172iXmECj','11255712bjmFiN','Unsupported\x20runtime\x20Skill\x20scope:\x20','17272pJssdb','210309GcidfV','3734822iUiCnW','9huwrzh','company','includes','2210740yHTQZn','172428wnzTCG','164RRbHUc','length','personal','builtin'];a145_0x2f8f=function(){return _0x5513e4;};return a145_0x2f8f();}(function(_0x5b2529,_0x29f824){const _0x47067b=a145_0x3510,_0x3cab64=_0x5b2529();while(!![]){try{const _0x22af02=parseInt(_0x47067b(0x146))/0x1*(parseInt(_0x47067b(0x151))/0x2)+parseInt(_0x47067b(0x143))/0x3*(-parseInt(_0x47067b(0x150))/0x4)+-parseInt(_0x47067b(0x14f))/0x5*(-parseInt(_0x47067b(0x142))/0x6)+-parseInt(_0x47067b(0x14b))/0x7+parseInt(_0x47067b(0x149))/0x8*(parseInt(_0x47067b(0x14c))/0x9)+-parseInt(_0x47067b(0x155))/0xa*(parseInt(_0x47067b(0x14a))/0xb)+parseInt(_0x47067b(0x147))/0xc;if(_0x22af02===_0x29f824)break;else _0x3cab64['push'](_0x3cab64['shift']());}catch(_0x2cbd1c){_0x3cab64['push'](_0x3cab64['shift']());}}}(a145_0x2f8f,0x661bb));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x490ebe){const _0x101494=a145_0x3510,_0x3643ac=_0x490ebe&&_0x490ebe[_0x101494(0x152)]>0x0?_0x490ebe:['personal',_0x101494(0x14d),_0x101494(0x154)],_0x15035f=[];for(const _0x4551a6 of _0x3643ac){if(!isRuntimeSkillScope(_0x4551a6))throw CliErrors[_0x101494(0x144)](_0x101494(0x148)+_0x4551a6);!_0x15035f[_0x101494(0x14e)](_0x4551a6)&&_0x15035f[_0x101494(0x145)](_0x4551a6);}return _0x15035f;}function a145_0x3510(_0x39594f,_0x4dc4f2){_0x39594f=_0x39594f-0x142;const _0x2f8f96=a145_0x2f8f();let _0x351019=_0x2f8f96[_0x39594f];return _0x351019;}export function isRuntimeSkillScope(_0x3a80db){const _0x45eaaf=a145_0x3510;return _0x3a80db===_0x45eaaf(0x153)||_0x3a80db===_0x45eaaf(0x14d)||_0x3a80db===_0x45eaaf(0x154);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a147_0x6dc9(_0x5ab981,_0x219085){_0x5ab981=_0x5ab981-0xb1;const _0x343c34=a147_0x343c();let _0x6dc942=_0x343c34[_0x5ab981];return _0x6dc942;}const a147_0x440cc0=a147_0x6dc9;(function(_0x3bea1c,_0x2cb9c8){const _0x58cd34=a147_0x6dc9,_0x2a78c0=_0x3bea1c();while(!![]){try{const _0xf04dde=-parseInt(_0x58cd34(0xbe))/0x1+parseInt(_0x58cd34(0xc0))/0x2+-parseInt(_0x58cd34(0xb5))/0x3*(-parseInt(_0x58cd34(0xb8))/0x4)+parseInt(_0x58cd34(0xb1))/0x5+parseInt(_0x58cd34(0xc5))/0x6+parseInt(_0x58cd34(0xb3))/0x7*(-parseInt(_0x58cd34(0xc6))/0x8)+parseInt(_0x58cd34(0xc4))/0x9*(-parseInt(_0x58cd34(0xbb))/0xa);if(_0xf04dde===_0x2cb9c8)break;else _0x2a78c0['push'](_0x2a78c0['shift']());}catch(_0x33e967){_0x2a78c0['push'](_0x2a78c0['shift']());}}}(a147_0x343c,0x3d1a8));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a147_0x440cc0(0xbd));export function createDeterministicZipPackage(_0x21223c){const _0x167a73=a147_0x440cc0,_0x1263d4={};for(const _0x2d870c of normalizeLocalFiles(_0x21223c)){_0x1263d4[_0x2d870c[_0x167a73(0xba)]]=fileContent(_0x2d870c);}return Buffer[_0x167a73(0xc3)](zipSync(_0x1263d4,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x10b191){const _0x22e873=a147_0x440cc0;if(_0x10b191['length']<0x16)throw CliErrors[_0x22e873(0xc2)](_0x22e873(0xc1));let _0xb5b8bf;try{_0xb5b8bf=unzipSync(_0x10b191,{'filter'(_0x5606d4){const _0x2008b0=_0x22e873,_0x543afa=normalizeSkillRelativePath(_0x5606d4[_0x2008b0(0xb9)]);if(_0x543afa[_0x2008b0(0xb6)]('/'))throw CliErrors[_0x2008b0(0xc2)]('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0x543afa);return!![];}});}catch(_0x2b145b){if(isRuntimeSkillValidationError(_0x2b145b))throw _0x2b145b;throw CliErrors[_0x22e873(0xc2)](_0x22e873(0xc1));}return Object[_0x22e873(0xbc)](_0xb5b8bf)[_0x22e873(0xb4)](([_0x12b222,_0x89b302])=>({'path':normalizeSkillRelativePath(_0x12b222),'bytes':Buffer[_0x22e873(0xc3)](_0x89b302)}))[_0x22e873(0xb7)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x359b4c){const _0x453584=a147_0x440cc0;return typeof _0x359b4c===_0x453584(0xb2)&&_0x359b4c!==null&&_0x453584(0xbf)in _0x359b4c&&_0x359b4c[_0x453584(0xbf)]==='validation_error';}function a147_0x343c(){const _0x3ee22a=['map','9UOrcTM','endsWith','sort','422792oZgprg','name','path','721220OHjzXP','entries','1980-01-01T00:00:00.000Z','27162jLkFef','code','247894mPwTKA','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','validation','from','63aVFaXk','592002yVbrOM','7456BDyCbI','1250220IGjSJV','object','56fDnUSO'];a147_0x343c=function(){return _0x3ee22a;};return a147_0x343c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x443e1d,_0x15f332){const _0x5aacf3=a148_0xb748,_0x44688a=_0x443e1d();while(!![]){try{const _0x30a58b=-parseInt(_0x5aacf3(0x12e))/0x1*(parseInt(_0x5aacf3(0x11c))/0x2)+-parseInt(_0x5aacf3(0x134))/0x3*(-parseInt(_0x5aacf3(0x113))/0x4)+parseInt(_0x5aacf3(0x12a))/0x5+parseInt(_0x5aacf3(0x109))/0x6+-parseInt(_0x5aacf3(0x132))/0x7*(parseInt(_0x5aacf3(0x11e))/0x8)+-parseInt(_0x5aacf3(0x127))/0x9*(-parseInt(_0x5aacf3(0x116))/0xa)+-parseInt(_0x5aacf3(0x117))/0xb*(parseInt(_0x5aacf3(0x10b))/0xc);if(_0x30a58b===_0x15f332)break;else _0x44688a['push'](_0x44688a['shift']());}catch(_0x4e2241){_0x44688a['push'](_0x44688a['shift']());}}}(a148_0x8607,0x18cb2));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';function a148_0x8607(){const _0x1caaf1=['string','files','263421TIJLFd','size','get','397555Gqzmnk','zipSize','Missing\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','3533ZqIHdI','push','trim','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','521787fyTLBA','path','306354SrUiyn','isArray','Duplicate\x20Skill\x20package\x20entry:\x20','sha256','has','821196QmJsjq','toString','36EPLxpf','zipSha256','validation','treeSha256','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','4mQJRwT','map','some','50iqIneM','254287llUmjq','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','toLowerCase','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','82gmgSTM','isSafeInteger','16uiHfaR','length','bytes','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','base64','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20manifest\x20is\x20missing\x20'];a148_0x8607=function(){return _0x1caaf1;};return a148_0x8607();}export function buildSkillPackage(_0x42b7e2){const _0x18d945=a148_0xb748,_0x3137ef=normalizeLocalFiles(_0x42b7e2);if(!_0x3137ef[_0x18d945(0x115)](_0x4f334a=>_0x4f334a[_0x18d945(0x133)]===SKILL_FILE))throw CliErrors['validation'](_0x18d945(0x12c)+SKILL_FILE+_0x18d945(0x11a));const _0x239394=localFilesToManifestFiles(_0x3137ef),_0xfc59a2=createDeterministicZipPackage(_0x3137ef);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x239394),'zipSha256':bufferSha256(_0xfc59a2),'zipSize':_0xfc59a2['length'],'files':_0x239394},'packageBytes':_0xfc59a2,'packageBase64':_0xfc59a2[_0x18d945(0x10a)](_0x18d945(0x122))};}export function verifyRuntimeSkillPackage(_0x5dba62,_0x3a476b){const _0x54c64d=normalizePackageManifest(_0x5dba62,{'requireOssPath':![]});if(!_0x54c64d)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x54c64d,_0x3a476b);}export function verifyRuntimeSkillBundle(_0x3f0bf1,_0x2a79c0){const _0x345841=a148_0xb748,_0x465b96=normalizePackageManifest(_0x3f0bf1,{'requireOssPath':![]});if(!_0x465b96)throw CliErrors[_0x345841(0x10d)](_0x345841(0x110));return extractAndVerifyPackageFiles(_0x465b96,_0x2a79c0);}function a148_0xb748(_0x17ffe7,_0x561b03){_0x17ffe7=_0x17ffe7-0x106;const _0x8607b8=a148_0x8607();let _0xb7480f=_0x8607b8[_0x17ffe7];return _0xb7480f;}export function tryNormalizePackageManifest(_0x123485){return normalizePackageManifest(_0x123485,{'requireOssPath':![]});}export function requirePackageBytes(_0x3845ec,_0x994979){const _0x5833fe=a148_0xb748;if(!_0x994979||_0x994979['length']===0x0)throw CliErrors[_0x5833fe(0x10d)](_0x5833fe(0x10f)+_0x3845ec);return _0x994979;}export function extractDownloadedPackage(_0x27450e){const _0x47bc35=a148_0xb748,_0x3c177e=parseZipPackage(_0x27450e)[_0x47bc35(0x114)](_0x401b39=>({'path':_0x401b39['path'],'bytes':_0x401b39['bytes']}));if(!_0x3c177e[_0x47bc35(0x115)](_0x158d3c=>_0x158d3c[_0x47bc35(0x133)]===SKILL_FILE))throw CliErrors[_0x47bc35(0x10d)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x3c177e);}export function localFilesToManifestFiles(_0x31ca5c){const _0xb3c2d1=a148_0xb748;return normalizeLocalFiles(_0x31ca5c)[_0xb3c2d1(0x114)](_0x5d8422=>({'path':_0x5d8422['path'],'sha256':fileHash(_0x5d8422),'size':fileContent(_0x5d8422)[_0xb3c2d1(0x11f)]}));}function normalizePackageManifest(_0x5980a9,_0x242b8b){const _0x1603f3=a148_0xb748;if(!_0x5980a9||typeof _0x5980a9!=='object'||Array[_0x1603f3(0x135)](_0x5980a9))return undefined;const _0x4a9320=_0x5980a9,_0x47a3c8=typeof _0x4a9320['ossPath']===_0x1603f3(0x125)?_0x4a9320['ossPath'][_0x1603f3(0x130)]():undefined;if(_0x242b8b['requireOssPath']&&!_0x47a3c8)return undefined;if(!Array[_0x1603f3(0x135)](_0x4a9320[_0x1603f3(0x126)])||_0x4a9320[_0x1603f3(0x126)][_0x1603f3(0x11f)]===0x0)return undefined;if(!isSha256Hex(_0x4a9320['treeSha256']))throw CliErrors[_0x1603f3(0x10d)](_0x1603f3(0x118));if(!isSha256Hex(_0x4a9320[_0x1603f3(0x10c)]))throw CliErrors[_0x1603f3(0x10d)](_0x1603f3(0x123));if(!Number[_0x1603f3(0x11d)](_0x4a9320[_0x1603f3(0x12b)])||_0x4a9320[_0x1603f3(0x12b)]<0x0)throw CliErrors[_0x1603f3(0x10d)](_0x1603f3(0x11b));const _0x5e1f36=normalizeManifestFiles(_0x4a9320[_0x1603f3(0x126)]);if(!_0x5e1f36[_0x1603f3(0x115)](_0xa8de07=>_0xa8de07[_0x1603f3(0x133)]===SKILL_FILE))throw CliErrors[_0x1603f3(0x10d)](_0x1603f3(0x124)+SKILL_FILE+'.');const _0x4702f0=fileTreeHash(_0x5e1f36);if(_0x4702f0!==_0x4a9320[_0x1603f3(0x10e)]['toLowerCase']())throw CliErrors['validation'](_0x1603f3(0x111));return{'schemaVersion':Number[_0x1603f3(0x11d)](_0x4a9320['schemaVersion'])?_0x4a9320['schemaVersion']:0x2,'ossPath':_0x47a3c8,'treeSha256':_0x4702f0,'zipSha256':_0x4a9320[_0x1603f3(0x10c)][_0x1603f3(0x119)](),'zipSize':_0x4a9320['zipSize'],'files':_0x5e1f36};}function extractAndVerifyPackage(_0x36860c,_0x1a4277){const _0x182a21=a148_0xb748,_0x372ecc=normalizePackageManifest(_0x36860c,{'requireOssPath':![]});if(!_0x372ecc)throw CliErrors[_0x182a21(0x10d)](_0x182a21(0x110));if(_0x1a4277[_0x182a21(0x11f)]!==_0x372ecc[_0x182a21(0x12b)])throw CliErrors[_0x182a21(0x10d)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x37fd07=bufferSha256(_0x1a4277);if(_0x37fd07!==_0x372ecc[_0x182a21(0x10c)])throw CliErrors['validation'](_0x182a21(0x112));return extractAndVerifyPackageFiles(_0x372ecc,_0x1a4277);}function extractAndVerifyPackageFiles(_0xfb8529,_0x3014d8){const _0x42f3d2=a148_0xb748,_0x4d6740=parseZipPackage(_0x3014d8);if(_0x4d6740[_0x42f3d2(0x11f)]!==_0xfb8529[_0x42f3d2(0x126)][_0x42f3d2(0x11f)])throw CliErrors[_0x42f3d2(0x10d)](_0x42f3d2(0x121));const _0x2d6697=new Map();for(const _0x34699d of _0x4d6740){if(_0x2d6697[_0x42f3d2(0x108)](_0x34699d[_0x42f3d2(0x133)]))throw CliErrors[_0x42f3d2(0x10d)](_0x42f3d2(0x106)+_0x34699d[_0x42f3d2(0x133)]);_0x2d6697['set'](_0x34699d[_0x42f3d2(0x133)],_0x34699d);}const _0x589735=[];for(const _0x28add5 of _0xfb8529[_0x42f3d2(0x126)]){const _0x17eca1=_0x2d6697[_0x42f3d2(0x129)](_0x28add5[_0x42f3d2(0x133)]);if(!_0x17eca1)throw CliErrors['validation'](_0x42f3d2(0x131)+_0x28add5['path']);if(_0x17eca1[_0x42f3d2(0x120)][_0x42f3d2(0x11f)]!==_0x28add5[_0x42f3d2(0x128)])throw CliErrors[_0x42f3d2(0x10d)](_0x42f3d2(0x12d)+_0x28add5[_0x42f3d2(0x133)]);const _0x38aa6d=bufferSha256(_0x17eca1[_0x42f3d2(0x120)]);if(_0x38aa6d!==_0x28add5[_0x42f3d2(0x107)])throw CliErrors[_0x42f3d2(0x10d)]('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x28add5[_0x42f3d2(0x133)]);_0x589735[_0x42f3d2(0x12f)]({'path':_0x28add5['path'],'bytes':_0x17eca1[_0x42f3d2(0x120)]});}return normalizeLocalFiles(_0x589735);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ec96b,_0xb2c6bf){var _0x46e2c8=a149_0x2614,_0x1a15fd=_0x5ec96b();while(!![]){try{var _0x399145=parseInt(_0x46e2c8(0xde))/0x1*(parseInt(_0x46e2c8(0xdc))/0x2)+-parseInt(_0x46e2c8(0xe0))/0x3+-parseInt(_0x46e2c8(0xdb))/0x4*(-parseInt(_0x46e2c8(0xe2))/0x5)+parseInt(_0x46e2c8(0xe3))/0x6+-parseInt(_0x46e2c8(0xe1))/0x7*(parseInt(_0x46e2c8(0xe4))/0x8)+parseInt(_0x46e2c8(0xe5))/0x9+-parseInt(_0x46e2c8(0xdf))/0xa*(-parseInt(_0x46e2c8(0xdd))/0xb);if(_0x399145===_0xb2c6bf)break;else _0x1a15fd['push'](_0x1a15fd['shift']());}catch(_0x22f38d){_0x1a15fd['push'](_0x1a15fd['shift']());}}}(a149_0x3a3d,0xd34a5));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a149_0x3a3d(){var _0x4aee5=['49zfTDBt','1795NdAyWC','666318NPLtFb','277432JhioFa','4597722ouAeeB','9056GRNcew','4682QWiRLg','11PRAFLr','111IvhPZx','492280tzewDb','1906704wQxZrG'];a149_0x3a3d=function(){return _0x4aee5;};return a149_0x3a3d();}export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';function a149_0x2614(_0x26d38f,_0x20366d){_0x26d38f=_0x26d38f-0xdb;var _0x3a3d63=a149_0x3a3d();var _0x2614f8=_0x3a3d63[_0x26d38f];return _0x2614f8;}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
|
-
const
|
|
1
|
+
const a150_0x16ab57=a150_0x4552;function a150_0x4911(){const _0x202709=['51724KPreCv','33CMAwHJ','recorded','430crSOpc','71154RhlMeW','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','includes','197048VGTKpb','\x20is\x20unreadable:\x20','6ZbTzdL','find','68088SPZUvC','present','parse','5826000fvZPbv','join','absent','kind','\x20records\x20\x22','lockFile','\x20uses\x20unsupported\x20version\x20','.agents','home','map','296755AMuwUZ','not-recorded','message','2640ZmHTkG','reason','unusable','6015233SyKDIv','SKILL.md','skills','version','.claude','18mGRhVC'];a150_0x4911=function(){return _0x202709;};return a150_0x4911();}(function(_0x7e86f8,_0x373ce5){const _0x1e496f=a150_0x4552,_0x552728=_0x7e86f8();while(!![]){try{const _0x14ee1c=parseInt(_0x1e496f(0x1a4))/0x1*(-parseInt(_0x1e496f(0x1ad))/0x2)+-parseInt(_0x1e496f(0x1a5))/0x3*(-parseInt(_0x1e496f(0x1ab))/0x4)+parseInt(_0x1e496f(0x198))/0x5*(parseInt(_0x1e496f(0x1a3))/0x6)+parseInt(_0x1e496f(0x19e))/0x7+parseInt(_0x1e496f(0x18e))/0x8+-parseInt(_0x1e496f(0x1a8))/0x9*(parseInt(_0x1e496f(0x1a7))/0xa)+parseInt(_0x1e496f(0x19b))/0xb*(-parseInt(_0x1e496f(0x1af))/0xc);if(_0x14ee1c===_0x373ce5)break;else _0x552728['push'](_0x552728['shift']());}catch(_0x537176){_0x552728['push'](_0x552728['shift']());}}}(a150_0x4911,0x6e036));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a150_0x16ab57(0x195),'.skill-lock.json');export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a150_0x16ab57(0x195),a150_0x16ab57(0x1a0)),join(a150_0x16ab57(0x1a2),a150_0x16ab57(0x1a0))];function a150_0x4552(_0x169b3c,_0x519e77){_0x169b3c=_0x169b3c-0x18c;const _0x4911ed=a150_0x4911();let _0x4552b7=_0x4911ed[_0x169b3c];return _0x4552b7;}const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x24520b,_0x433cd8){const _0x46570a=a150_0x16ab57;if(!existsSync(_0x24520b))return{'kind':'not-recorded'};let _0x5aaa3c;try{_0x5aaa3c=JSON[_0x46570a(0x18d)](readFileSync(_0x24520b,'utf8'));}catch(_0x2ee9fc){return{'kind':_0x46570a(0x19d),'reason':_0x24520b+_0x46570a(0x1ac)+_0x2ee9fc[_0x46570a(0x19a)]};}const _0x819acf=_0x5aaa3c;if(typeof _0x819acf?.[_0x46570a(0x1a1)]!=='number'||!SUPPORTED_LOCK_VERSIONS[_0x46570a(0x1aa)](_0x819acf[_0x46570a(0x1a1)]))return{'kind':'unusable','reason':_0x24520b+_0x46570a(0x194)+String(_0x819acf?.[_0x46570a(0x1a1)])};if(!_0x819acf[_0x46570a(0x1a0)]||typeof _0x819acf['skills']!=='object')return{'kind':_0x46570a(0x19d),'reason':_0x24520b+'\x20has\x20no\x20skills\x20map'};return _0x819acf['skills'][_0x433cd8]?{'kind':_0x46570a(0x1a6)}:{'kind':_0x46570a(0x199)};}export function resolveInstalledSkill(_0x480422,_0x28eedd){const _0x1827c8=a150_0x16ab57,_0x13fda6=_0x28eedd?.[_0x1827c8(0x196)]??homedir(),_0x1aa82b=_0x28eedd?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x1d0fbe=>join(_0x13fda6,_0x1d0fbe)),_0x2f7367=_0x28eedd?.[_0x1827c8(0x193)]??join(_0x13fda6,SKILL_LOCK_RELATIVE_PATH),_0x2ae861=_0x1aa82b[_0x1827c8(0x197)](_0x25b394=>join(_0x25b394,_0x480422,_0x1827c8(0x19f))),_0x4af7b1=_0x2ae861[_0x1827c8(0x1ae)](_0x5e5211=>existsSync(_0x5e5211));if(_0x4af7b1)return{'state':_0x1827c8(0x18c),'path':_0x4af7b1};const _0x3dd1b8=readLockLookup(_0x2f7367,_0x480422);if(_0x3dd1b8[_0x1827c8(0x191)]===_0x1827c8(0x19d))return{'state':'unverifiable','reason':_0x3dd1b8[_0x1827c8(0x19c)]};if(_0x3dd1b8[_0x1827c8(0x191)]===_0x1827c8(0x1a6))return{'state':'unverifiable','reason':_0x2f7367+_0x1827c8(0x192)+_0x480422+_0x1827c8(0x1a9)+('('+_0x2ae861[_0x1827c8(0x18f)](',\x20')+')')};return{'state':_0x1827c8(0x190),'checked':_0x2ae861};}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Masks a CLI AccessKey for user-visible authentication output.
|
|
3
|
+
* Short or malformed values are fully redacted so invalid secrets are never echoed.
|
|
4
|
+
*/
|
|
5
|
+
export declare function maskCliAccessKey(value: unknown): string;
|
|
6
|
+
/**
|
|
7
|
+
* Creates a display-only copy of CLI config with credentials redacted.
|
|
8
|
+
*
|
|
9
|
+
* This intentionally handles only known CLI authentication paths. It must not
|
|
10
|
+
* recursively scan arbitrary objects because those may contain business data
|
|
11
|
+
* whose field happens to be named `accessKey`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function redactCliConfigCredentials(config: Record<string, unknown>): Record<string, unknown>;
|
|
14
|
+
/** Redacts a value only when it came from a known CLI credential config path. */
|
|
15
|
+
export declare function redactCliConfigValue(path: string, value: unknown): unknown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a151_0x1d6c4a=a151_0x1602;(function(_0x26cf41,_0x59b8ad){const _0x58c94f=a151_0x1602,_0x3b8aa2=_0x26cf41();while(!![]){try{const _0x5a628c=-parseInt(_0x58c94f(0x12d))/0x1+parseInt(_0x58c94f(0x129))/0x2+-parseInt(_0x58c94f(0x131))/0x3*(-parseInt(_0x58c94f(0x127))/0x4)+parseInt(_0x58c94f(0x128))/0x5*(-parseInt(_0x58c94f(0x121))/0x6)+-parseInt(_0x58c94f(0x125))/0x7*(parseInt(_0x58c94f(0x12c))/0x8)+-parseInt(_0x58c94f(0x123))/0x9*(parseInt(_0x58c94f(0x11e))/0xa)+-parseInt(_0x58c94f(0x11d))/0xb*(-parseInt(_0x58c94f(0x120))/0xc);if(_0x5a628c===_0x59b8ad)break;else _0x3b8aa2['push'](_0x3b8aa2['shift']());}catch(_0x2d24db){_0x3b8aa2['push'](_0x3b8aa2['shift']());}}}(a151_0x4971,0xedf70));const REDACTED_ACCESS_KEY=a151_0x1d6c4a(0x124);function a151_0x1602(_0x347f3f,_0x32b862){_0x347f3f=_0x347f3f-0x118;const _0x497175=a151_0x4971();let _0x16027c=_0x497175[_0x347f3f];return _0x16027c;}export function maskCliAccessKey(_0x1b15bb){const _0x3eea21=a151_0x1d6c4a;if(typeof _0x1b15bb!==_0x3eea21(0x126)||_0x1b15bb['length']<=0x8)return REDACTED_ACCESS_KEY;return''+_0x1b15bb[_0x3eea21(0x12a)](0x0,0x8)+'*'['repeat'](_0x1b15bb[_0x3eea21(0x119)]-0x8);}export function redactCliConfigCredentials(_0x3ded4c){const _0x34bfad=a151_0x1d6c4a,_0x15c898={..._0x3ded4c};return Object[_0x34bfad(0x12e)][_0x34bfad(0x12b)]['call'](_0x15c898,_0x34bfad(0x11c))&&(_0x15c898[_0x34bfad(0x11c)]=maskCliAccessKey(_0x15c898['accessKey'])),_0x15c898['apps']&&typeof _0x15c898[_0x34bfad(0x11b)]===_0x34bfad(0x122)&&!Array['isArray'](_0x15c898[_0x34bfad(0x11b)])&&(_0x15c898[_0x34bfad(0x11b)]=redactLegacyAppCredentials(_0x15c898[_0x34bfad(0x11b)])),_0x15c898;}export function redactCliConfigValue(_0xd7b7ad,_0x1773c9){const _0x557677=a151_0x1d6c4a;if(_0xd7b7ad===_0x557677(0x11c)||/^apps\.[^.]+\.accessKey$/[_0x557677(0x118)](_0xd7b7ad))return maskCliAccessKey(_0x1773c9);if(_0xd7b7ad===_0x557677(0x11b)&&_0x1773c9&&typeof _0x1773c9===_0x557677(0x122)&&!Array[_0x557677(0x11f)](_0x1773c9))return redactLegacyAppCredentials(_0x1773c9);if(/^apps\.[^.]+$/[_0x557677(0x118)](_0xd7b7ad)&&_0x1773c9&&typeof _0x1773c9===_0x557677(0x122)&&!Array['isArray'](_0x1773c9)){const _0x5c6d69=_0x1773c9;return Object[_0x557677(0x12e)][_0x557677(0x12b)][_0x557677(0x130)](_0x5c6d69,_0x557677(0x11c))?{..._0x5c6d69,'accessKey':maskCliAccessKey(_0x5c6d69[_0x557677(0x11c)])}:_0x1773c9;}return _0x1773c9;}function redactLegacyAppCredentials(_0x59dbdb){const _0x1df5ca=a151_0x1d6c4a;return Object[_0x1df5ca(0x11a)](Object[_0x1df5ca(0x12f)](_0x59dbdb)['map'](([_0x17334f,_0x492a54])=>{const _0xc610d0=_0x1df5ca;if(!_0x492a54||typeof _0x492a54!==_0xc610d0(0x122)||Array[_0xc610d0(0x11f)](_0x492a54))return[_0x17334f,_0x492a54];const _0x304fce={..._0x492a54};return Object[_0xc610d0(0x12e)][_0xc610d0(0x12b)][_0xc610d0(0x130)](_0x304fce,_0xc610d0(0x11c))&&(_0x304fce[_0xc610d0(0x11c)]=maskCliAccessKey(_0x304fce[_0xc610d0(0x11c)])),[_0x17334f,_0x304fce];}));}function a151_0x4971(){const _0x57dbdd=['117036rlLWaW','<redacted>','373765kwpniq','string','4lJsvix','1898915xILkrF','5456WNwtie','slice','hasOwnProperty','80baEQcF','689878gEFHxg','prototype','entries','call','3285876LwAeaa','test','length','fromEntries','apps','accessKey','24167Ewarlu','590FJHPJD','isArray','12276DJdiTF','6mKJfMK','object'];a151_0x4971=function(){return _0x57dbdd;};return a151_0x4971();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5da297,_0x4b71f8){const _0x79471b=a152_0xf055,_0x3ae3bb=_0x5da297();while(!![]){try{const _0x145f6d=-parseInt(_0x79471b(0x98))/0x1+-parseInt(_0x79471b(0x9c))/0x2*(parseInt(_0x79471b(0x99))/0x3)+parseInt(_0x79471b(0x9b))/0x4+-parseInt(_0x79471b(0x9f))/0x5+-parseInt(_0x79471b(0x96))/0x6*(-parseInt(_0x79471b(0x9a))/0x7)+-parseInt(_0x79471b(0xa0))/0x8*(-parseInt(_0x79471b(0x9e))/0x9)+-parseInt(_0x79471b(0x9d))/0xa*(-parseInt(_0x79471b(0x97))/0xb);if(_0x145f6d===_0x4b71f8)break;else _0x3ae3bb['push'](_0x3ae3bb['shift']());}catch(_0xf930b9){_0x3ae3bb['push'](_0x3ae3bb['shift']());}}}(a152_0x267c,0x6272c));function a152_0xf055(_0x14e0b5,_0x415e83){_0x14e0b5=_0x14e0b5-0x96;const _0x267ca4=a152_0x267c();let _0xf055ec=_0x267ca4[_0x14e0b5];return _0xf055ec;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a152_0x267c(){const _0x1a474c=['8236660ErdhBd','145989ebahXG','2578740cOYgkO','88CGCtoA','6MqEERo','11jVyGjJ','551442GGuIBw','4329opSnSG','5608995TxWxeq','590284zCLPYm','666eFfznf'];a152_0x267c=function(){return _0x1a474c;};return a152_0x267c();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type CliVersionPolicy } from "../utils/cli-version-policy.js";
|
|
2
|
+
export interface CliVersionCheckResult extends CliVersionPolicy {
|
|
3
|
+
currentVersion: string;
|
|
4
|
+
needsUpgrade: boolean;
|
|
5
|
+
belowMinimum: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Strictly evaluate a current version against an already normalized policy. */
|
|
8
|
+
export declare function evaluateCliVersionPolicy(currentVersion: string, policy: CliVersionPolicy | null): CliVersionCheckResult;
|
|
9
|
+
export declare function checkCliVersion(): Promise<CliVersionCheckResult>;
|
|
10
|
+
export declare function getCliUpgradeCommand(result: Pick<CliVersionCheckResult, "stableVersion">): string;
|
|
11
|
+
/** Block unsupported clients before the target command's execute function runs. */
|
|
12
|
+
export declare function assertCliVersionSupported(result: CliVersionCheckResult): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x41c1bb,_0x3b660e){const _0x3df138=a153_0x415c,_0x2f3684=_0x41c1bb();while(!![]){try{const _0x1f3e21=-parseInt(_0x3df138(0x113))/0x1*(-parseInt(_0x3df138(0x112))/0x2)+parseInt(_0x3df138(0x110))/0x3*(parseInt(_0x3df138(0x105))/0x4)+parseInt(_0x3df138(0x103))/0x5+-parseInt(_0x3df138(0x106))/0x6+parseInt(_0x3df138(0xff))/0x7*(parseInt(_0x3df138(0x102))/0x8)+-parseInt(_0x3df138(0x10f))/0x9+-parseInt(_0x3df138(0x101))/0xa;if(_0x1f3e21===_0x3b660e)break;else _0x2f3684['push'](_0x2f3684['shift']());}catch(_0x2291b1){_0x2f3684['push'](_0x2f3684['shift']());}}}(a153_0x32ed,0x91db3));import a153_0x2c5157 from'semver';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CliErrors}from'../errors.js';function a153_0x415c(_0x418ceb,_0x3f6a41){_0x418ceb=_0x418ceb-0xfe;const _0x32ed30=a153_0x32ed();let _0x415c74=_0x32ed30[_0x418ceb];return _0x415c74;}import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';export function evaluateCliVersionPolicy(_0xb6a2a8,_0x59a417){const _0x1f85ed=a153_0x415c,_0x10da12=a153_0x2c5157[_0x1f85ed(0x104)](_0xb6a2a8)===_0xb6a2a8,_0x39c9a5=_0x59a417?.[_0x1f85ed(0x10b)]??null,_0x2e6bb8=_0x59a417?.[_0x1f85ed(0xfe)]??null,_0x37750b=Boolean(_0x10da12&&_0x39c9a5&&a153_0x2c5157['lt'](_0xb6a2a8,_0x39c9a5)),_0x2e8ccc=Boolean(_0x10da12&&_0x2e6bb8&&a153_0x2c5157['lt'](_0xb6a2a8,_0x2e6bb8));return{'currentVersion':_0xb6a2a8,'stableVersion':_0x39c9a5,'minimumVersion':_0x2e6bb8,'needsUpgrade':_0x37750b||_0x2e8ccc,'belowMinimum':_0x2e8ccc,'upgradeMessage':_0x59a417?.[_0x1f85ed(0x116)],'minimumVersionMessage':_0x59a417?.[_0x1f85ed(0x109)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}function a153_0x32ed(){const _0x43ddc5=['validation','stableVersion','join','npm\x20install\x20-g\x20','latest','9686052FxhKTN','97377wKZRxt','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','2nNFXFt','1118078PLVCnA','filter','currentVersion','upgradeMessage','minimumVersion','2624118iMpuWj','unavailable','8625420cQVofl','16CsfDHp','1934315atNDhR','valid','56PeGIkV','1037508pslIrO','Recommended\x20stable:\x20','belowMinimum','minimumVersionMessage'];a153_0x32ed=function(){return _0x43ddc5;};return a153_0x32ed();}export function getCliUpgradeCommand(_0x3fffab){const _0x4a4b8b=a153_0x415c;return _0x4a4b8b(0x10d)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x3fffab[_0x4a4b8b(0x10b)]??_0x4a4b8b(0x10e));}export function assertCliVersionSupported(_0x456336){const _0x315a1f=a153_0x415c;if(!_0x456336[_0x315a1f(0x108)])return;const _0x288d09=[_0x456336['minimumVersionMessage'],'Current\x20version:\x20'+_0x456336[_0x315a1f(0x115)],'Minimum\x20supported:\x20'+_0x456336[_0x315a1f(0xfe)],_0x315a1f(0x107)+(_0x456336['stableVersion']??_0x315a1f(0x100)),'Upgrade\x20command:\x20'+getCliUpgradeCommand(_0x456336)][_0x315a1f(0x114)](Boolean)[_0x315a1f(0x10c)]('\x0a');throw CliErrors[_0x315a1f(0x10a)](_0x315a1f(0x111),_0x288d09);}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CliVersionPolicy {
|
|
2
|
+
stableVersion: string | null;
|
|
3
|
+
minimumVersion: string | null;
|
|
4
|
+
upgradeMessage?: string;
|
|
5
|
+
minimumVersionMessage?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Normalize the CDN document while accepting historical field aliases. */
|
|
8
|
+
export declare function normalizeCliVersionPolicy(raw: unknown): CliVersionPolicy | null;
|
|
9
|
+
export declare function fetchCliVersionPolicy(): Promise<CliVersionPolicy | null>;
|
|
10
|
+
/** Read the policy with process-local success/failure TTLs and request coalescing. */
|
|
11
|
+
export declare function getCliVersionPolicy(): Promise<CliVersionPolicy | null>;
|
|
12
|
+
export declare function clearCliVersionPolicyCache(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x14081a,_0x169f05){const _0x2a2f23=a154_0x1af4,_0x199bd6=_0x14081a();while(!![]){try{const _0x6e2bf6=-parseInt(_0x2a2f23(0x186))/0x1*(parseInt(_0x2a2f23(0x197))/0x2)+parseInt(_0x2a2f23(0x182))/0x3*(parseInt(_0x2a2f23(0x188))/0x4)+parseInt(_0x2a2f23(0x196))/0x5+parseInt(_0x2a2f23(0x17d))/0x6*(parseInt(_0x2a2f23(0x192))/0x7)+-parseInt(_0x2a2f23(0x191))/0x8+-parseInt(_0x2a2f23(0x189))/0x9*(-parseInt(_0x2a2f23(0x17e))/0xa)+-parseInt(_0x2a2f23(0x18d))/0xb*(-parseInt(_0x2a2f23(0x180))/0xc);if(_0x6e2bf6===_0x169f05)break;else _0x199bd6['push'](_0x199bd6['shift']());}catch(_0x2dde31){_0x199bd6['push'](_0x199bd6['shift']());}}}(a154_0x54ab,0x3368a));function a154_0x54ab(){const _0x131b68=['finally','timeout','545446NVWjps','string','object','latestVersion','308888BBjhDQ','7aZlFtc','minimumVersion','json','cli','314825LpXDbT','392990vnzmSD','minimumVersionMessage','valid','244386LOsosA','10KcANab','recommendedVersion','12IkgygY','now','94254RDdIbB','then','application/json','minVersion','2frZrKP','upgradeMessage','52evNmXa','724095gWHIVu','trim'];a154_0x54ab=function(){return _0x131b68;};return a154_0x54ab();}import a154_0x536f34 from'semver';import{LOVRABET_CLI_VERSION_POLICY_URL}from'../constant/distribution.js';const SUCCESS_CACHE_TTL_MS=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL_MS=0x3c*0x3e8,FETCH_TIMEOUT_MS=0x5dc;function pickString(_0x453af0){const _0x272cc6=a154_0x1af4;return typeof _0x453af0===_0x272cc6(0x18e)&&_0x453af0[_0x272cc6(0x18a)]()?_0x453af0['trim']():null;}function pickStrictSemver(_0xcc621e){const _0x1034da=a154_0x1af4,_0x125020=pickString(_0xcc621e);return _0x125020&&a154_0x536f34[_0x1034da(0x199)](_0x125020)===_0x125020?_0x125020:null;}export function normalizeCliVersionPolicy(_0x277af6){const _0x22a7f9=a154_0x1af4;if(!_0x277af6||typeof _0x277af6!==_0x22a7f9(0x18f))return null;const _0x2514ed=_0x277af6,_0x3798ed=_0x2514ed[_0x22a7f9(0x195)]&&typeof _0x2514ed[_0x22a7f9(0x195)]==='object'?_0x2514ed[_0x22a7f9(0x195)]:_0x2514ed,_0x2fa6f1=pickStrictSemver(_0x3798ed['stableVersion']??_0x3798ed[_0x22a7f9(0x190)]??_0x3798ed[_0x22a7f9(0x17f)]),_0x5d3ad0=pickStrictSemver(_0x3798ed[_0x22a7f9(0x193)]??_0x3798ed[_0x22a7f9(0x185)]);if(!_0x2fa6f1&&!_0x5d3ad0)return null;if(_0x2fa6f1&&_0x5d3ad0&&a154_0x536f34['gt'](_0x5d3ad0,_0x2fa6f1))return null;return{'stableVersion':_0x2fa6f1,'minimumVersion':_0x5d3ad0,'upgradeMessage':pickString(_0x3798ed[_0x22a7f9(0x187)])??undefined,'minimumVersionMessage':pickString(_0x3798ed[_0x22a7f9(0x198)])??undefined};}export async function fetchCliVersionPolicy(){const _0x10aba5=a154_0x1af4;try{const _0x2da518=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x10aba5(0x184)},'signal':AbortSignal[_0x10aba5(0x18c)](FETCH_TIMEOUT_MS)});if(!_0x2da518['ok'])return null;return normalizeCliVersionPolicy(await _0x2da518[_0x10aba5(0x194)]());}catch{return null;}}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;function a154_0x1af4(_0x44bece,_0x204469){_0x44bece=_0x44bece-0x17d;const _0x54abb1=a154_0x54ab();let _0x1af4b5=_0x54abb1[_0x44bece];return _0x1af4b5;}export async function getCliVersionPolicy(){const _0x12ed6b=a154_0x1af4,_0x444d0f=Date[_0x12ed6b(0x181)]();if(hasCachedPolicy){const _0x4dbfd0=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x444d0f-cachedAt<_0x4dbfd0)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()[_0x12ed6b(0x183)](_0x3a2857=>{const _0x585d80=_0x12ed6b;return cachedPolicy=_0x3a2857,cachedAt=Date[_0x585d80(0x181)](),hasCachedPolicy=!![],_0x3a2857;})[_0x12ed6b(0x18b)](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a155_0x26f21b=a155_0x3486;function a155_0x3486(_0x1268a1,_0x125f17){_0x1268a1=_0x1268a1-0xe1;const _0x48a281=a155_0x48a2();let _0x34869c=_0x48a281[_0x1268a1];return _0x34869c;}(function(_0x383bf7,_0x739648){const _0x38d468=a155_0x3486,_0x549648=_0x383bf7();while(!![]){try{const _0x42f4a1=parseInt(_0x38d468(0xf9))/0x1+-parseInt(_0x38d468(0x110))/0x2*(parseInt(_0x38d468(0xee))/0x3)+parseInt(_0x38d468(0x10f))/0x4+parseInt(_0x38d468(0x109))/0x5+-parseInt(_0x38d468(0xf3))/0x6*(-parseInt(_0x38d468(0xfd))/0x7)+-parseInt(_0x38d468(0xe6))/0x8+-parseInt(_0x38d468(0xe7))/0x9;if(_0x42f4a1===_0x739648)break;else _0x549648['push'](_0x549648['shift']());}catch(_0x5316b8){_0x549648['push'](_0x549648['shift']());}}}(a155_0x48a2,0x3aa80));import a155_0x3beb0c from'winston';function a155_0x48a2(){const _0x32822b=['success','log','164836MnQztT','615324hSNZLS','dirname','utf8','existsSync','currentRawCommand','message','Failed\x20to\x20clear\x20logs:','level','addColors','File','3173504KdzewN','501147EpYfSQ','parse','clear','unknown','getWinstonInstance','mkdirSync','combine','3AoZSLC','transports','info','join','duration','2190xpakUq','readFileSync','details','rawCommand','logFilePath','warn','377569WqMUwo','errors','writeFileSync','format','5313VpsDDq','printf','logTask','now','Completed:\x20','blue','setRawCommand','winstonLogger','toISOString','trim','red','initWinstonLogger','1522380QrExpf','split','stringify','green'];a155_0x48a2=function(){return _0x32822b;};return a155_0x48a2();}import a155_0x1b0c82 from'node:fs';import a155_0x3ce451 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a155_0x26f21b(0x104)];[a155_0x26f21b(0xf7)]='';[a155_0x26f21b(0x114)]='';constructor(){}[a155_0x26f21b(0x103)](_0x268268){this['currentRawCommand']=_0x268268;}['setLogPath'](_0x4dc5e8){const _0x1fc07f=a155_0x26f21b;this[_0x1fc07f(0xf7)]=a155_0x3ce451[_0x1fc07f(0xf1)](_0x4dc5e8,PRODUCT_CONFIG['logFileName']),this[_0x1fc07f(0x104)]&&this[_0x1fc07f(0x104)][_0x1fc07f(0xe9)](),this['initWinstonLogger']();}[a155_0x26f21b(0x108)](){const _0x2b569f=a155_0x26f21b,_0x3e2f0c=a155_0x3ce451[_0x2b569f(0x111)](this[_0x2b569f(0xf7)]);!a155_0x1b0c82[_0x2b569f(0x113)](_0x3e2f0c)&&a155_0x1b0c82[_0x2b569f(0xec)](_0x3e2f0c,{'recursive':!![]});const _0x55b647=a155_0x3beb0c[_0x2b569f(0xfc)][_0x2b569f(0xed)](a155_0x3beb0c[_0x2b569f(0xfc)]['timestamp'](),a155_0x3beb0c[_0x2b569f(0xfc)][_0x2b569f(0xfa)]({'stack':!![]}),a155_0x3beb0c['format'][_0x2b569f(0xfe)](_0x3ad1a5=>{const _0x332111=_0x2b569f,_0x12ce96={'timestamp':_0x3ad1a5['timestamp']||new Date()[_0x332111(0x105)](),'level':_0x3ad1a5[_0x332111(0xe3)]||_0x332111(0xf0),'command':_0x3ad1a5['command']||_0x332111(0xea),'rawCommand':_0x3ad1a5[_0x332111(0xf6)]||this['currentRawCommand']||undefined,'message':_0x3ad1a5[_0x332111(0xe1)]||'','duration':_0x3ad1a5[_0x332111(0xf2)]||undefined,'details':_0x3ad1a5[_0x332111(0xf5)]||undefined};return JSON[_0x332111(0x10b)](_0x12ce96);}));this[_0x2b569f(0x104)]=a155_0x3beb0c['createLogger']({'level':'info','format':_0x55b647,'transports':[new a155_0x3beb0c[(_0x2b569f(0xef))][(_0x2b569f(0xe5))]({'filename':this[_0x2b569f(0xf7)],'level':'info'})],'silent':![]}),a155_0x3beb0c[_0x2b569f(0xe4)]({'success':_0x2b569f(0x10c),'error':_0x2b569f(0x107),'warn':'yellow','info':_0x2b569f(0x102)});}[a155_0x26f21b(0xf0)](_0x30fac9,_0x48c2ac,_0x186e40){const _0x2a0514=a155_0x26f21b;if(!this[_0x2a0514(0xf7)]||!this[_0x2a0514(0x104)])return;this[_0x2a0514(0x104)][_0x2a0514(0xf0)](_0x48c2ac,{'command':_0x30fac9,'details':_0x186e40});}[a155_0x26f21b(0x10d)](_0x5bebb4,_0xcafdba,_0x1ed2c8,_0x50be79){const _0x462fc2=a155_0x26f21b;if(!this[_0x462fc2(0xf7)]||!this[_0x462fc2(0x104)])return;this[_0x462fc2(0x104)][_0x462fc2(0x10e)]('info',_0xcafdba,{'level':_0x462fc2(0x10d),'command':_0x5bebb4,'duration':_0x1ed2c8,'details':_0x50be79});}['error'](_0x4a1ec3,_0x1e0dec,_0x5c9d15){const _0x57530e=a155_0x26f21b;if(!this['logFilePath']||!this[_0x57530e(0x104)])return;this['winstonLogger']['error'](_0x1e0dec,{'command':_0x4a1ec3,'details':_0x5c9d15});}[a155_0x26f21b(0xf8)](_0xf4cb18,_0x2c7ae3,_0x1dae35){const _0x1f1642=a155_0x26f21b;if(!this[_0x1f1642(0xf7)]||!this[_0x1f1642(0x104)])return;this[_0x1f1642(0x104)][_0x1f1642(0xf8)](_0x2c7ae3,{'command':_0xf4cb18,'details':_0x1dae35});}async[a155_0x26f21b(0xff)](_0x577938,_0x50b943,_0x3970ed){const _0x17b675=a155_0x26f21b,_0x33d78a=Date[_0x17b675(0x100)]();this['info'](_0x577938,'Starting:\x20'+_0x50b943);try{const _0x43f71d=await _0x3970ed(),_0x487667=Date[_0x17b675(0x100)]()-_0x33d78a;return this['success'](_0x577938,_0x17b675(0x101)+_0x50b943,_0x487667),_0x43f71d;}catch(_0x3db0a8){const _0x517d93=Date[_0x17b675(0x100)]()-_0x33d78a;this['error'](_0x577938,'Failed:\x20'+_0x50b943,{'error':_0x3db0a8 instanceof Error?_0x3db0a8[_0x17b675(0xe1)]:String(_0x3db0a8),'duration':_0x517d93});throw _0x3db0a8;}}['readLogs'](){const _0x4d908a=a155_0x26f21b;try{if(!a155_0x1b0c82[_0x4d908a(0x113)](this['logFilePath']))return[];const _0x33836c=a155_0x1b0c82[_0x4d908a(0xf4)](this['logFilePath'],_0x4d908a(0x112));return _0x33836c[_0x4d908a(0x10a)](/\r?\n/)['filter'](_0xe2043a=>_0xe2043a[_0x4d908a(0x106)]())['map'](_0x1e789f=>JSON[_0x4d908a(0xe8)](_0x1e789f));}catch(_0x4098e1){return console['warn']('Failed\x20to\x20read\x20logs:',_0x4098e1),[];}}['clearLogs'](){const _0x2dad90=a155_0x26f21b;try{a155_0x1b0c82[_0x2dad90(0x113)](this[_0x2dad90(0xf7)])&&a155_0x1b0c82[_0x2dad90(0xfb)](this[_0x2dad90(0xf7)],'',_0x2dad90(0x112));}catch(_0x2fccd6){console[_0x2dad90(0xf8)](_0x2dad90(0xe2),_0x2fccd6);}}[a155_0x26f21b(0xeb)](){const _0x5d5866=a155_0x26f21b;return this[_0x5d5866(0x104)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a156_0x4ce0e0=a156_0x2437;(function(_0x152998,_0x2a33f8){const _0x117ec1=a156_0x2437,_0x149692=_0x152998();while(!![]){try{const _0x495059=parseInt(_0x117ec1(0x1fb))/0x1+parseInt(_0x117ec1(0x1f8))/0x2*(parseInt(_0x117ec1(0x201))/0x3)+-parseInt(_0x117ec1(0x1f5))/0x4+parseInt(_0x117ec1(0x1f0))/0x5*(parseInt(_0x117ec1(0x203))/0x6)+parseInt(_0x117ec1(0x1ef))/0x7*(-parseInt(_0x117ec1(0x1ee))/0x8)+parseInt(_0x117ec1(0x1f1))/0x9*(-parseInt(_0x117ec1(0x1f4))/0xa)+parseInt(_0x117ec1(0x1f3))/0xb;if(_0x495059===_0x2a33f8)break;else _0x149692['push'](_0x149692['shift']());}catch(_0x1687d1){_0x149692['push'](_0x149692['shift']());}}}(a156_0x4974,0xee7e6));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number[a156_0x4ce0e0(0x200)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x40864d){const _0x5a884f=a156_0x4ce0e0;if(_0x40864d[_0x5a884f(0x1f2)]('.')||_0x40864d[_0x5a884f(0x1f2)]('e')||_0x40864d[_0x5a884f(0x1f2)]('E'))return![];const _0x1db42d=BigInt(_0x40864d);return _0x1db42d>MAX_SAFE_INTEGER||_0x1db42d<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x56f831){const _0x2144a7=a156_0x4ce0e0;let _0x3da03a='',_0x348eea=![],_0x188dea=![];for(let _0x4f95fe=0x0;_0x4f95fe<_0x56f831[_0x2144a7(0x1f6)];){const _0x1c8bbf=_0x56f831[_0x4f95fe];if(_0x348eea){_0x3da03a+=_0x1c8bbf,_0x4f95fe+=0x1;if(_0x188dea)_0x188dea=![];else{if(_0x1c8bbf==='\x5c')_0x188dea=!![];else _0x1c8bbf==='\x22'&&(_0x348eea=![]);}continue;}if(_0x1c8bbf==='\x22'){_0x348eea=!![],_0x3da03a+=_0x1c8bbf,_0x4f95fe+=0x1;continue;}if(_0x1c8bbf==='-'||_0x1c8bbf>='0'&&_0x1c8bbf<='9'){const _0x34cf71=JSON_NUMBER_PATTERN[_0x2144a7(0x1fe)](_0x56f831[_0x2144a7(0x1f7)](_0x4f95fe))?.[0x0];if(_0x34cf71){_0x3da03a+=isUnsafeIntegerLiteral(_0x34cf71)?'\x22'+_0x34cf71+'\x22':_0x34cf71,_0x4f95fe+=_0x34cf71[_0x2144a7(0x1f6)];continue;}}_0x3da03a+=_0x1c8bbf,_0x4f95fe+=0x1;}return _0x3da03a;}export function parseLosslessJson(_0x42149c){const _0x1d8ac1=a156_0x4ce0e0;return JSON[_0x1d8ac1(0x1fd)](quoteUnsafeIntegerLiterals(_0x42149c));}export function installLosslessJsonResponseParser(){const _0x2e1306=a156_0x4ce0e0;if(typeof Response===_0x2e1306(0x1fa))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x2e1306(0x1fc)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,_0x2e1306(0x1f9)),Object[_0x2e1306(0x202)](responseJsonPrototype,_0x2e1306(0x1f9),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x422953(){const _0x48000c=_0x2e1306;return parseLosslessJson(await this[_0x48000c(0x1ff)]());}}),restoreResponseJsonParser=()=>{const _0x261615=_0x2e1306;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x261615(0x202)](responseJsonPrototype,_0x261615(0x1f9),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x261615(0x1f9)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}function a156_0x2437(_0x11088d,_0x1dc50a){_0x11088d=_0x11088d-0x1ee;const _0x497445=a156_0x4974();let _0x243764=_0x497445[_0x11088d];return _0x243764;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}function a156_0x4974(){const _0x26b2a4=['34688170obdAUt','14890vEDDSX','5343024xAYnpd','length','slice','3022pxqfSR','json','undefined','289511gdJBaY','prototype','parse','exec','text','MIN_SAFE_INTEGER','921Vkzole','defineProperty','5669430dMmrUB','704lAXQAc','142163soUsBi','5rPAfcD','4545kNzYPJ','includes'];a156_0x4974=function(){return _0x26b2a4;};return a156_0x4974();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a815c,_0x304c36){const _0x4d7ea3=a157_0x6979,_0x5c59ff=_0x1a815c();while(!![]){try{const _0x5c07d9=-parseInt(_0x4d7ea3(0x143))/0x1*(-parseInt(_0x4d7ea3(0x14b))/0x2)+parseInt(_0x4d7ea3(0x151))/0x3+-parseInt(_0x4d7ea3(0x153))/0x4*(-parseInt(_0x4d7ea3(0x148))/0x5)+parseInt(_0x4d7ea3(0x14c))/0x6+parseInt(_0x4d7ea3(0x13f))/0x7+-parseInt(_0x4d7ea3(0x14a))/0x8+-parseInt(_0x4d7ea3(0x152))/0x9;if(_0x5c07d9===_0x304c36)break;else _0x5c59ff['push'](_0x5c59ff['shift']());}catch(_0x2bb8b4){_0x5c59ff['push'](_0x5c59ff['shift']());}}}(a157_0x5857,0x9d6fe));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;function a157_0x5857(){const _0x32faf4=['3355170XGZPEa','38093814eGVzzG','32ihCoCT','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','string','map','join','length','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','5366816aAXCef','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','object','data\x20update\x20can\x20update\x20at\x20most\x20','4wwFkCl','Invalid\x20JSON\x20for\x20--params:\x20','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','validation','number','580795WuUwrA','isArray','666224HgrrcE','481070EDzVuL','7105776YEbNsR','data\x20update\x20--params.','isSafeInteger','items','\x20records\x20per\x20call;\x20received\x20'];a157_0x5857=function(){return _0x32faf4;};return a157_0x5857();}export function parseJsonParams(_0x366e45){const _0x2642d2=a157_0x6979;if(!_0x366e45)return undefined;try{return parseLosslessJson(_0x366e45);}catch{throw CliErrors[_0x2642d2(0x146)](_0x2642d2(0x144)+_0x366e45);}}function a157_0x6979(_0x31780f,_0x56b6fe){_0x31780f=_0x31780f-0x136;const _0x585703=a157_0x5857();let _0x6979b7=_0x585703[_0x31780f];return _0x6979b7;}export function parseJsonParamsValue(_0xf4dfe9){const _0x3f9fbb=a157_0x6979;if(!_0xf4dfe9)return undefined;try{return parseLosslessJson(_0xf4dfe9);}catch{throw CliErrors[_0x3f9fbb(0x146)](_0x3f9fbb(0x144)+_0xf4dfe9);}}export function parseBatchCreateItemsFromParams(_0x1a5359){const _0x53bcf9=a157_0x6979;if(Array['isArray'](_0x1a5359))return _0x1a5359;if(_0x1a5359!==null&&_0x1a5359!==undefined&&typeof _0x1a5359===_0x53bcf9(0x141)&&Array[_0x53bcf9(0x149)](_0x1a5359['items']))return _0x1a5359[_0x53bcf9(0x14f)];throw CliErrors[_0x53bcf9(0x146)](_0x53bcf9(0x136),_0x53bcf9(0x137));}function parseDataUpdateId(_0x56a01b,_0x2dca3b){const _0x5f0efa=a157_0x6979;if(typeof _0x56a01b===_0x5f0efa(0x147)&&Number[_0x5f0efa(0x14e)](_0x56a01b)&&_0x56a01b>0x0)return _0x56a01b;if(typeof _0x56a01b===_0x5f0efa(0x139)){if(/^[1-9]\d*$/['test'](_0x56a01b))return _0x56a01b;}throw CliErrors['validation'](_0x5f0efa(0x14d)+_0x2dca3b+_0x5f0efa(0x140));}export function parseUpdateIdsFromParams(_0x3b26c1){const _0x2c4a35=a157_0x6979;if(_0x3b26c1===null||_0x3b26c1===undefined||typeof _0x3b26c1!=='object'||Array[_0x2c4a35(0x149)](_0x3b26c1))throw CliErrors['validation'](_0x2c4a35(0x145),'Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0xae1523=_0x3b26c1['id'];if(_0xae1523===undefined||_0xae1523===null)throw CliErrors[_0x2c4a35(0x146)](_0x2c4a35(0x13e),_0x2c4a35(0x138));const _0x191edf=Array['isArray'](_0xae1523)?_0xae1523:[_0xae1523];if(_0x191edf['length']===0x0)throw CliErrors['validation'](_0x2c4a35(0x13d));if(_0x191edf['length']>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x2c4a35(0x146)](_0x2c4a35(0x142)+MAX_DATA_UPDATE_IDS+_0x2c4a35(0x150)+_0x191edf[_0x2c4a35(0x13c)]+'.');return _0x191edf[_0x2c4a35(0x13a)]((_0x1b9433,_0x2055f3)=>parseDataUpdateId(_0x1b9433,Array[_0x2c4a35(0x149)](_0xae1523)?'id['+_0x2055f3+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x25da33,_0x46a429){const _0x5d9c53=a157_0x6979;if(Array[_0x5d9c53(0x149)](_0x25da33['id'])&&_0x46a429['length']>0x1)return{..._0x25da33,'id':_0x46a429[_0x5d9c53(0x13b)](',')};return _0x25da33;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a158_0x9a9a(){const _0x48586a=['6566448TLoGqm','1017310mtUavP','82ZQVvGV','platform','2857740NUMTkS','1836024MiiOdQ','.cmd','1270YyADNu','396744rPwxsF','154065gZimdS'];a158_0x9a9a=function(){return _0x48586a;};return a158_0x9a9a();}const a158_0x504b04=a158_0x4174;(function(_0x61ce25,_0x550982){const _0x920ec2=a158_0x4174,_0x59932b=_0x61ce25();while(!![]){try{const _0x4a2596=-parseInt(_0x920ec2(0x1d1))/0x1*(parseInt(_0x920ec2(0x1d6))/0x2)+parseInt(_0x920ec2(0x1d7))/0x3+parseInt(_0x920ec2(0x1d4))/0x4+parseInt(_0x920ec2(0x1d8))/0x5+parseInt(_0x920ec2(0x1d3))/0x6+parseInt(_0x920ec2(0x1d0))/0x7+-parseInt(_0x920ec2(0x1d9))/0x8;if(_0x4a2596===_0x550982)break;else _0x59932b['push'](_0x59932b['shift']());}catch(_0x275127){_0x59932b['push'](_0x59932b['shift']());}}}(a158_0x9a9a,0x5a87b));function a158_0x4174(_0x160504,_0x1ce05f){_0x160504=_0x160504-0x1d0;const _0x9a9af4=a158_0x9a9a();let _0x41741e=_0x9a9af4[_0x160504];return _0x41741e;}export const isWindows=process[a158_0x504b04(0x1d2)]==='win32';export function resolveNpmBin(_0x342089){const _0x5bd564=a158_0x504b04;return isWindows?_0x342089+_0x5bd564(0x1d5):_0x342089;}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CliVersionCheckResult } from "../utils/cli-version-check.js";
|
|
1
2
|
export interface UpdateNotice {
|
|
2
3
|
command: string;
|
|
3
4
|
current: string;
|
|
@@ -7,4 +8,4 @@ export interface UpdateNotice {
|
|
|
7
8
|
}
|
|
8
9
|
export declare function getUpdateNoticeCachePath(): string;
|
|
9
10
|
export declare function buildNpmVersionUrl(version: string): string;
|
|
10
|
-
export declare function resolveLatestUpdateNotice(): Promise<UpdateNotice | null>;
|
|
11
|
+
export declare function resolveLatestUpdateNotice(checked?: CliVersionCheckResult): Promise<UpdateNotice | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e4134,_0x614e0f){const _0x40838a=a159_0x4eb1,_0x2db008=_0x3e4134();while(!![]){try{const _0x437a6a=-parseInt(_0x40838a(0x9b))/0x1*(-parseInt(_0x40838a(0x95))/0x2)+parseInt(_0x40838a(0x89))/0x3+-parseInt(_0x40838a(0x92))/0x4*(-parseInt(_0x40838a(0x9d))/0x5)+-parseInt(_0x40838a(0x91))/0x6*(-parseInt(_0x40838a(0x7f))/0x7)+parseInt(_0x40838a(0x97))/0x8+-parseInt(_0x40838a(0x90))/0x9*(parseInt(_0x40838a(0x96))/0xa)+-parseInt(_0x40838a(0x8f))/0xb*(parseInt(_0x40838a(0x9a))/0xc);if(_0x437a6a===_0x614e0f)break;else _0x2db008['push'](_0x2db008['shift']());}catch(_0x297945){_0x2db008['push'](_0x2db008['shift']());}}}(a159_0x27c1,0x66712));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{checkCliVersion,getCliUpgradeCommand}from'../utils/cli-version-check.js';const UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x3eb371=a159_0x4eb1,_0x12f659=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x3eb371(0x98)]()[_0x3eb371(0x83)]();return _0x12f659==='1'||_0x12f659===_0x3eb371(0x99)||_0x12f659==='yes';}function cacheRoot(){const _0x2cd1c8=a159_0x4eb1;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x2cd1c8(0x8b));}export function getUpdateNoticeCachePath(){const _0x4ab4c1=a159_0x4eb1;return join(cacheRoot(),_0x4ab4c1(0x8e),_0x4ab4c1(0x8c));}function a159_0x4eb1(_0x32b604,_0x904fc8){_0x32b604=_0x32b604-0x7f;const _0x27c164=a159_0x27c1();let _0x4eb117=_0x27c164[_0x32b604];return _0x4eb117;}function a159_0x27c1(){const _0x480352=['325866pbTZdk','2530gnsdZN','4578400LhTXwC','trim','true','477168BTiNlG','3ZMYfic','/v/','263040XubwfE','parse','122353sjwmRM','\x20is\x20recommended,\x20current\x20','needsUpgrade','number','toLowerCase','upgradeMessage','now','utf8','currentVersion','filter','2175144YTQcpK',',\x20run:\x20','.cache','update-check.json','lastNotifiedAt','lovrabet-cli','308uswGYP','16479WtKWgi','36lcPRiU','8fLfsyN','https://www.npmjs.com/package/','stableVersion'];a159_0x27c1=function(){return _0x480352;};return a159_0x27c1();}async function readUpdateNoticeCache(){const _0x53f141=a159_0x4eb1;try{const _0x276d50=await readFile(getUpdateNoticeCachePath(),_0x53f141(0x86)),_0x475f57=JSON[_0x53f141(0x9e)](_0x276d50);if(!_0x475f57||typeof _0x475f57!=='object')return{};return _0x475f57;}catch{return{};}}async function writeUpdateNoticeCache(_0x5f58e0){const _0x546034=a159_0x4eb1;try{const _0x39475b=getUpdateNoticeCachePath();await mkdir(dirname(_0x39475b),{'recursive':!![]}),await writeFile(_0x39475b,JSON['stringify'](_0x5f58e0,null,0x2)+'\x0a',_0x546034(0x86));}catch{}}function isRecentlyNotified(_0x24363e,_0x59440f,_0x5c4b95){const _0x56303d=a159_0x4eb1;return _0x24363e['lastNotifiedVersion']===_0x59440f&&typeof _0x24363e[_0x56303d(0x8d)]===_0x56303d(0x82)&&_0x5c4b95-_0x24363e[_0x56303d(0x8d)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x3cb7c0){const _0x19a71e=a159_0x4eb1;return _0x19a71e(0x93)+LOVRABET_NPM_PACKAGE_NAME+_0x19a71e(0x9c)+_0x3cb7c0;}export async function resolveLatestUpdateNotice(_0x10ab3e){const _0x42be3f=a159_0x4eb1;if(isUpdateNoticeDisabled())return null;try{const _0x55b169=Date[_0x42be3f(0x85)](),_0x86af13=_0x10ab3e??await checkCliVersion(),_0xca43fe=_0x86af13[_0x42be3f(0x87)],_0x81af38=_0x86af13[_0x42be3f(0x94)],_0x58a34a=await readUpdateNoticeCache();if(!_0x81af38||!_0x86af13[_0x42be3f(0x81)]||_0x86af13['belowMinimum'])return null;if(isRecentlyNotified(_0x58a34a,_0x81af38,_0x55b169))return null;const _0xe446c=getCliUpgradeCommand(_0x86af13);return await writeUpdateNoticeCache({..._0x58a34a,'checkedAt':_0x55b169,'latest':_0x81af38,'failed':![],'lastNotifiedVersion':_0x81af38,'lastNotifiedAt':_0x55b169}),{'command':_0xe446c,'current':_0xca43fe,'latest':_0x81af38,'url':buildNpmVersionUrl(_0x81af38),'message':[_0x86af13[_0x42be3f(0x84)],CLI_BIN_NAME+'\x20'+_0x81af38+_0x42be3f(0x80)+_0xca43fe+_0x42be3f(0x8a)+_0xe446c][_0x42be3f(0x88)](Boolean)['join']('\x20')};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7d12f0,_0x262b2a){const _0x516f47=a160_0x54da,_0x442e1d=_0x7d12f0();while(!![]){try{const _0x2577cf=-parseInt(_0x516f47(0x1ec))/0x1+parseInt(_0x516f47(0x1ef))/0x2*(-parseInt(_0x516f47(0x1f1))/0x3)+parseInt(_0x516f47(0x1f0))/0x4*(parseInt(_0x516f47(0x1f7))/0x5)+parseInt(_0x516f47(0x1f2))/0x6+parseInt(_0x516f47(0x1f6))/0x7*(parseInt(_0x516f47(0x1ee))/0x8)+parseInt(_0x516f47(0x1ed))/0x9*(parseInt(_0x516f47(0x1f5))/0xa)+parseInt(_0x516f47(0x1eb))/0xb*(-parseInt(_0x516f47(0x1f8))/0xc);if(_0x2577cf===_0x262b2a)break;else _0x442e1d['push'](_0x442e1d['shift']());}catch(_0x5290f3){_0x442e1d['push'](_0x442e1d['shift']());}}}(a160_0x390e,0x493ed));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';function a160_0x54da(_0x5aa127,_0x29db6a){_0x5aa127=_0x5aa127-0x1eb;const _0x390ef2=a160_0x390e();let _0x54dafd=_0x390ef2[_0x5aa127];return _0x54dafd;}function a160_0x390e(){const _0x4b9246=['1586263FHDRuf','116295gKYnIs','12KqJFmn','1032361JPMIOJ','52977PcWoqZ','54asuksF','8zVtKsu','152pNcAKy','44McobuL','5493rShzLM','26298UCwAah','unknown','slice','165260vtIKiv'];a160_0x390e=function(){return _0x4b9246;};return a160_0x390e();}export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x48941d=a160_0x54da,_0x5907eb=String(GIT_COMMIT);return _0x5907eb&&_0x5907eb!==_0x48941d(0x1f3)?_0x5907eb:'';}export function getCliVersionDisplay(){const _0x80f9c2=a160_0x54da,_0x445673=getCliGitCommit(),_0x5ea600=BUILD_TIME[_0x80f9c2(0x1f4)](0x0,0xa);if(!_0x445673||!_0x5ea600)return VERSION;return VERSION+'\x20('+_0x445673+',\x20'+_0x5ea600+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b56df,_0x51b786){var _0x66e9df=a161_0x4699,_0x5ec1cb=_0x2b56df();while(!![]){try{var _0x3ae965=parseInt(_0x66e9df(0x199))/0x1*(-parseInt(_0x66e9df(0x193))/0x2)+-parseInt(_0x66e9df(0x198))/0x3+-parseInt(_0x66e9df(0x191))/0x4+-parseInt(_0x66e9df(0x192))/0x5+parseInt(_0x66e9df(0x18f))/0x6*(parseInt(_0x66e9df(0x195))/0x7)+-parseInt(_0x66e9df(0x190))/0x8+parseInt(_0x66e9df(0x197))/0x9;if(_0x3ae965===_0x51b786)break;else _0x5ec1cb['push'](_0x5ec1cb['shift']());}catch(_0x3095ff){_0x5ec1cb['push'](_0x5ec1cb['shift']());}}}(a161_0xa06f,0x8c02a));function a161_0x4699(_0x1d2dcd,_0x45fe4e){_0x1d2dcd=_0x1d2dcd-0x18f;var _0xa06f5d=a161_0xa06f();var _0x46993e=_0xa06f5d[_0x1d2dcd];return _0x46993e;}export function writeCliSideChannelLine(_0x1699dd){var _0x119b3b=a161_0x4699;process[_0x119b3b(0x196)][_0x119b3b(0x194)](_0x1699dd+'\x0a');}function a161_0xa06f(){var _0x19e877=['stderr','27043227yAwCRk','283071dlNbqw','1npgNbL','6vVbaet','7290128nvIyWq','1096876GRNNSg','5148280HUkHQD','927004CdnagN','write','2391753IXOhBl'];a161_0xa06f=function(){return _0x19e877;};return a161_0xa06f();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/lovrabet-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-beta.1",
|
|
4
4
|
"description": "Runtime CLI for Lovrabet apps, datasets, SQL, Backend Function, skills, and AI agent workflows.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"pretypecheck": "node scripts/generate-build-info.js",
|
|
50
50
|
"typecheck": "tsc --noEmit",
|
|
51
51
|
"verify:bundled-jq": "node scripts/verify-bundled-jq.mjs",
|
|
52
|
+
"validate:cli-version-policy": "node scripts/validate-cli-version-policy.mjs",
|
|
52
53
|
"regression:release-smoke": "node scripts/regression-release-smoke.mjs",
|
|
53
54
|
"deploy:verify": "node scripts/deploy-verify.mjs",
|
|
54
55
|
"pack:dry-run-summary": "node scripts/package-dry-run-summary.mjs",
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
"NOTICE"
|
|
83
84
|
],
|
|
84
85
|
"dependencies": {
|
|
86
|
+
"@inquirer/prompts": "^8.6.0",
|
|
85
87
|
"@lovrabet/cli-framework": "1.0.5",
|
|
86
88
|
"@lovrabet/sdk": "1.4.2",
|
|
87
89
|
"chalk": "^5.6.2",
|