@lovrabet/lovrabet-cli 2.3.6 → 2.3.7-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/README.md +15 -11
- 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/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.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.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/region.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.d.ts +6 -6
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.d.ts +5 -3
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.d.ts +6 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.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.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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.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/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.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.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.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/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.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
- package/skills/lovrabet/SKILL.md +2 -2
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +9 -5
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a159_0x23bbb2=a159_0x428f;(function(_0x18fb87,_0x3db6ae){const _0x36d697=a159_0x428f,_0x3ba087=_0x18fb87();while(!![]){try{const _0x14548d=parseInt(_0x36d697(0x10d))/0x1+parseInt(_0x36d697(0x108))/0x2*(-parseInt(_0x36d697(0x11c))/0x3)+-parseInt(_0x36d697(0x118))/0x4+parseInt(_0x36d697(0x11b))/0x5+-parseInt(_0x36d697(0x115))/0x6+-parseInt(_0x36d697(0x10b))/0x7+parseInt(_0x36d697(0x10a))/0x8;if(_0x14548d===_0x3db6ae)break;else _0x3ba087['push'](_0x3ba087['shift']());}catch(_0x141315){_0x3ba087['push'](_0x3ba087['shift']());}}}(a159_0x4551,0x4a875));function a159_0x4551(){const _0x5c123b=['Unsafe\x20','homeDir','homeDirName','filter','396852AYPWuW','skills','workbuddySkillsDir','1371636GceguU','.claude','includes','2731595FPDgoK','6YYlCkO','claudeSkillsDir','cacheRoot','path\x20segment','\x20for\x20local\x20path:\x20','519484uXoImB','skillCode','4480120vxLTke','3359118GiDnWo','.workbuddy','607344MHrOoy','agentsSkillsDir','SKILL_ROOT','.agents'];a159_0x4551=function(){return _0x5c123b;};return a159_0x4551();}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(_0x4bde97={}){const _0x5ac1bd=a159_0x428f,_0x284469=_0x4bde97[_0x5ac1bd(0x112)]??homedir(),_0x38b4e3=resolve(_0x284469,PRODUCT_CONFIG['homeDirName'],'cache'),_0x307b03=trimmedEnv(_0x5ac1bd(0x10f)),_0x17f374=trimmedEnv('CLAUDE_SKILL_ROOT'),_0x5123e1=resolve(_0x284469,_0x5ac1bd(0x10c)),_0x40ce44=_0x4bde97[_0x5ac1bd(0x117)]??(existsSync(_0x5123e1)?resolve(_0x5123e1,'skills'):undefined);return{'homeDir':_0x284469,'cacheRoot':_0x38b4e3,'managedRoot':resolve(_0x284469,PRODUCT_CONFIG[_0x5ac1bd(0x113)]),'agentsSkillsDir':_0x4bde97[_0x5ac1bd(0x10e)]??_0x307b03??resolve(_0x284469,_0x5ac1bd(0x110),'skills'),'claudeSkillsDir':_0x4bde97[_0x5ac1bd(0x11d)]??_0x17f374??resolve(_0x284469,_0x5ac1bd(0x119),_0x5ac1bd(0x116)),'workbuddySkillsDir':_0x40ce44};}export function runtimeAgentSkillRoots(_0x25f545){const _0xf8fb8c=a159_0x428f;return[_0x25f545[_0xf8fb8c(0x10e)],_0x25f545[_0xf8fb8c(0x11d)],_0x25f545[_0xf8fb8c(0x117)]][_0xf8fb8c(0x114)](_0x35d22f=>Boolean(_0x35d22f));}export function getRuntimeSkillCacheRoot(_0x42bf50,_0xe0836e,_0x27d9c5={}){const _0x2c160c=a159_0x428f,_0x180818=resolveSkillSyncPaths(_0x27d9c5);return resolve(_0x180818[_0x2c160c(0x11e)],_0x42bf50,fingerprintAccessKey(_0xe0836e),_0x2c160c(0x116));}function a159_0x428f(_0x459299,_0x157a31){_0x459299=_0x459299-0x106;const _0x455189=a159_0x4551();let _0x428f44=_0x455189[_0x459299];return _0x428f44;}export function getRuntimeSkillDir(_0x163b39,_0x31b905,_0x172e74,_0x51e230,_0xbedbfb,_0x442436={}){const _0x21d7b4=a159_0x428f;return resolve(getRuntimeSkillCacheRoot(_0x163b39,_0x31b905,_0x442436),safePathSegment(_0x172e74,'appCode'),_0x51e230,safePathSegment(_0xbedbfb,_0x21d7b4(0x109)));}export function safePathSegment(_0x1069ed,_0x456d74=a159_0x23bbb2(0x106)){const _0x2b3c07=a159_0x23bbb2;if(!_0x1069ed||_0x1069ed[_0x2b3c07(0x11a)]('/')||_0x1069ed[_0x2b3c07(0x11a)]('\x5c')||_0x1069ed[_0x2b3c07(0x11a)]('..'))throw CliErrors['validation'](_0x2b3c07(0x111)+_0x456d74+_0x2b3c07(0x107)+_0x1069ed);return _0x1069ed;}function trimmedEnv(_0x2ada8c){const _0x46d5de=productEnv(_0x2ada8c)?.['trim']();return _0x46d5de?_0x46d5de:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2b65fc,_0x4da59d){const _0xb5406e=a160_0x2207,_0x3081dd=_0x2b65fc();while(!![]){try{const _0x1f67c5=-parseInt(_0xb5406e(0x166))/0x1+parseInt(_0xb5406e(0x156))/0x2+-parseInt(_0xb5406e(0x169))/0x3*(parseInt(_0xb5406e(0x152))/0x4)+-parseInt(_0xb5406e(0x14a))/0x5*(-parseInt(_0xb5406e(0x170))/0x6)+parseInt(_0xb5406e(0x14b))/0x7+parseInt(_0xb5406e(0x14c))/0x8*(-parseInt(_0xb5406e(0x153))/0x9)+parseInt(_0xb5406e(0x144))/0xa;if(_0x1f67c5===_0x4da59d)break;else _0x3081dd['push'](_0x3081dd['shift']());}catch(_0x6ab1cd){_0x3081dd['push'](_0x3081dd['shift']());}}}(a160_0x36c5,0xc73e7));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a160_0x50084b}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(_0xd4078f,_0x32d64e,_0x59bd61={}){const _0x1111b0=a160_0x2207,_0x4e4865=resolvePushDirectoryRoot(_0xd4078f),_0x123798=readPushMetadataIfPresent(resolve(_0x4e4865,METADATA_FILE),{'ignoreInvalidMetadata':_0x59bd61[_0x1111b0(0x150)]});if(_0x123798?.[_0x1111b0(0x165)]&&_0x123798['appCode']!==_0x32d64e&&!_0x59bd61['allowAppCodeRetarget']&&!_0x59bd61['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x1111b0(0x172)](_0x1111b0(0x155)+_0x123798[_0x1111b0(0x165)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x32d64e+'\x22.');const _0x3a3a2b=resolvePushSkillCode(_0x4e4865,_0x32d64e,_0x123798,_0x59bd61);if(!_0x3a3a2b)throw CliErrors[_0x1111b0(0x172)](_0x1111b0(0x141)+SKILL_FILE+',\x20'+METADATA_FILE+_0x1111b0(0x161));return{'dir':_0x4e4865,'skillCode':_0x3a3a2b,'metadata':_0x123798};}export function readPushDirectory(_0x9fb146,_0xb9ded0,_0x5287a4={}){const _0x3a745f=a160_0x2207,_0x226b70=resolvePushDirectoryIdentity(_0x9fb146,_0xb9ded0,_0x5287a4),_0x57deee=_0x226b70[_0x3a745f(0x168)],_0x3b0542=resolve(_0x57deee,SKILL_FILE);if(!existsSync(_0x3b0542)||!lstatSync(_0x3b0542)[_0x3a745f(0x16f)]())throw CliErrors[_0x3a745f(0x172)](_0x3a745f(0x171)+SKILL_FILE+':\x20'+_0x3b0542);const _0x5191c8=_0x226b70['metadata'],_0xd95abf=_0x5287a4[_0x3a745f(0x148)]??_0x3a745f(0x15e);if(!_0x5287a4['ignoreMetadataScope']&&_0x5191c8?.[_0x3a745f(0x163)]===_0x3a745f(0x16b))throw CliErrors[_0x3a745f(0x172)](_0x3a745f(0x158)+METADATA_FILE+_0x3a745f(0x15d)+_0x5191c8['scope']+'\x22.');if(!_0x5287a4[_0x3a745f(0x136)]&&_0xd95abf==='personal'&&_0x5191c8?.['scope']&&_0x5191c8[_0x3a745f(0x163)]!==_0x3a745f(0x15e))throw CliErrors['validation']('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x3a745f(0x15d)+_0x5191c8[_0x3a745f(0x163)]+'\x22.',_0x3a745f(0x142)+_0x57deee+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x4526b4=scanSkillDirectory(_0x57deee,{'excludedFilePaths':_0x5287a4[_0x3a745f(0x162)]}),_0x5638f2=buildSkillPackage(_0x4526b4),_0x15fd8f=readFileSync(_0x3b0542,_0x3a745f(0x151)),_0x1f9f3b=_0x226b70[_0x3a745f(0x15c)],_0x1d189d=_0x5287a4[_0x3a745f(0x13f)]?undefined:_0x5191c8,_0xc2e18d=readSkillDisplayName(_0x15fd8f);return{'skillCode':_0x1f9f3b,'metadata':_0x5191c8,'frontmatterDisplayName':_0xc2e18d,'input':{'skillCode':_0x1f9f3b,'skillName':_0xc2e18d??_0x1d189d?.[_0x3a745f(0x16a)],'description':_0x1d189d?.['description'],'content':_0x15fd8f,'files':_0x5638f2['manifest'],'packageBase64':_0x5638f2[_0x3a745f(0x147)],'tags':_0x1d189d?.[_0x3a745f(0x15f)],'version':_0x1d189d?.[_0x3a745f(0x13a)],'sourceSessionId':_0x1d189d?.[_0x3a745f(0x14e)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x2c5f0e,_0x5a4de0,_0x479ad9,_0x58210e={}){const _0x1a42b6=a160_0x2207,_0x5236ef=resolvePushDirectoryRoot(_0x2c5f0e),_0x457333=readPushMetadataIfPresent(resolve(_0x5236ef,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x4f3461=requireRemoteScope(_0x5a4de0),_0x139c1b=readLocalSkillContent(_0x5236ef),_0x5d9c1d={..._0x5a4de0,'appCode':_0x5a4de0[_0x1a42b6(0x165)]??_0x479ad9,'skillName':_0x5a4de0['skillName']??_0x457333?.['skillName'],'description':_0x5a4de0[_0x1a42b6(0x139)]??_0x457333?.[_0x1a42b6(0x139)],'example':_0x5a4de0['example']??_0x457333?.['example'],'tags':Array[_0x1a42b6(0x140)](_0x5a4de0[_0x1a42b6(0x15f)])?_0x5a4de0['tags']:_0x457333?.[_0x1a42b6(0x15f)],'sourceSessionId':_0x5a4de0[_0x1a42b6(0x14e)]??_0x457333?.[_0x1a42b6(0x14e)],'content':_0x5a4de0['content']??_0x139c1b},_0x887585=buildMetadata(_0x5d9c1d,_0x4f3461,_0x479ad9,contentHash(_0x139c1b),_0x58210e[_0x1a42b6(0x13e)]);writeJsonAtomic(resolve(_0x5236ef,METADATA_FILE),_0x887585);}export function recordPushedRuntimeSkill(_0xf33c6e,_0x20b91b,_0x45e275,_0x31269d={}){const _0x14e5af=a160_0x2207,_0x125d4a=resolvePushDirectoryRoot(_0xf33c6e),_0x10a766=scanSkillDirectory(_0x125d4a),_0x734190=_0x10a766[_0x14e5af(0x16c)](_0x11ac57=>_0x11ac57[_0x14e5af(0x173)]===SKILL_FILE),_0x3678dd=_0x734190?fileText(_0x734190):'',_0x5b16a2=tryNormalizePackageManifest(_0x20b91b[_0x14e5af(0x14f)]),_0x41a13f={..._0x20b91b,'content':_0x20b91b[_0x14e5af(0x16e)]??_0x3678dd,'files':_0x5b16a2},_0xd658d=_0x5b16a2?normalizeLocalFiles(_0x10a766)[_0x14e5af(0x137)](_0xae6e02=>_0x5b16a2[_0x14e5af(0x14f)]['some'](_0x267cac=>_0x267cac[_0x14e5af(0x173)]===_0xae6e02[_0x14e5af(0x173)])):undefined,_0x9cd1d=buildMetadata(_0x41a13f,_0x31269d['scope']??'personal',_0x45e275,contentHash(_0x41a13f[_0x14e5af(0x16e)]??''),_0x31269d[_0x14e5af(0x159)],_0xd658d);writeJsonAtomic(resolve(_0x125d4a,METADATA_FILE),_0x9cd1d);}function a160_0x2207(_0x184acf,_0x404e0c){_0x184acf=_0x184acf-0x136;const _0x36c532=a160_0x36c5();let _0x2207cf=_0x36c532[_0x184acf];return _0x2207cf;}function a160_0x36c5(){const _0x2a5906=['targetScope','ignoreMetadataSkillCode','5YlHyMB','10005611zLYKmZ','1492696NRytlR','isDirectory','sourceSessionId','files','ignoreInvalidMetadata','utf8','1553452yBPaQj','54EFvVmc','match','Skill\x20metadata\x20appCode\x20\x22','1822256hixtfk','name','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','pushedAt','string','startsWith','skillCode','\x20has\x20scope=\x22','personal','tags','(unknown)',',\x20or\x20directory\x20name.','excludedFilePaths','scope','slice','appCode','1408400WHpiVW','number','dir','9YdwJDw','skillName','builtin','find','\x20has\x20unsupported\x20scope\x20\x22','content','isFile','8007966GYkSVL','Missing\x20','validation','path','boolean','replace','ignoreMetadataScope','filter','toLowerCase','description','version','Remote\x20Skill\x20','unknown','displayName','refreshedAt','ignoreMetadataForPayload','isArray','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Skill\x20directory\x20not\x20found:\x20','8339520gVZMbz','trim','object','packageBase64'];a160_0x36c5=function(){return _0x2a5906;};return a160_0x36c5();}export function deriveSkillCodeFromDirectory(_0x4b3d68,_0x38745f){const _0x3c9b01=a160_0x2207,_0xf71cb8=basename(resolve(_0x4b3d68)),_0x29c074=_0x38745f+'--';return _0xf71cb8[_0x3c9b01(0x15b)](_0x29c074)?_0xf71cb8[_0x3c9b01(0x164)](_0x29c074['length']):_0xf71cb8;}function resolvePushSkillCode(_0x38649c,_0x4c1a3b,_0x519240,_0x3295f1){const _0x43f6de=a160_0x2207,_0x4a5f7b=deriveSkillCodeFromSkillFile(_0x38649c)||deriveSkillCodeFromDirectory(_0x38649c,_0x4c1a3b);if(_0x3295f1[_0x43f6de(0x149)])return _0x4a5f7b;return _0x519240?.[_0x43f6de(0x15c)]?.['trim']()||_0x4a5f7b;}function deriveSkillCodeFromSkillFile(_0x156683){const _0x4b803f=a160_0x2207,_0x23f909=resolve(_0x156683,SKILL_FILE);if(!existsSync(_0x23f909)||!lstatSync(_0x23f909)[_0x4b803f(0x16f)]())return undefined;const _0x2933fd=readFileSync(_0x23f909,_0x4b803f(0x151)),_0x40d5a7=_0x2933fd[_0x4b803f(0x154)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x40d5a7)return undefined;const _0x556fc8=parseFrontmatterObject(_0x40d5a7[0x1]??''),_0x36b8a8=scalarToString(_0x556fc8?.[_0x4b803f(0x157)]);return _0x36b8a8?slugifySkillName(_0x36b8a8):undefined;}function readSkillDisplayName(_0x26cd57){const _0x4316a2=a160_0x2207,_0x2c6b28=_0x26cd57['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2c6b28)return undefined;const _0x7cdb54=parseFrontmatterObject(_0x2c6b28[0x1]??'');return scalarToString(_0x7cdb54?.[_0x4316a2(0x13d)]);}function slugifySkillName(_0x1a1525){const _0x4d3b79=a160_0x2207,_0x2d72cf=_0x1a1525['trim']()[_0x4d3b79(0x138)]()[_0x4d3b79(0x175)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x4d3b79(0x175)](/^-+/,'')[_0x4d3b79(0x175)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x2d72cf)throw CliErrors[_0x4d3b79(0x172)]('Invalid\x20'+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x2d72cf;}function parseFrontmatterObject(_0x3e1478){const _0x40d436=a160_0x2207;try{const _0x4079f7=a160_0x50084b(_0x3e1478);return _0x4079f7&&typeof _0x4079f7===_0x40d436(0x146)&&!Array[_0x40d436(0x140)](_0x4079f7)?_0x4079f7:undefined;}catch{return undefined;}}function scalarToString(_0xa7b9dc){const _0x6e84c5=a160_0x2207;if(typeof _0xa7b9dc===_0x6e84c5(0x15a))return _0xa7b9dc[_0x6e84c5(0x145)]();if(typeof _0xa7b9dc===_0x6e84c5(0x167)||typeof _0xa7b9dc===_0x6e84c5(0x174))return String(_0xa7b9dc);return undefined;}function resolvePushDirectoryRoot(_0x3acad0){const _0xaeebec=a160_0x2207,_0x8b000=resolve(_0x3acad0);if(!existsSync(_0x8b000))throw CliErrors[_0xaeebec(0x172)]('Skill\x20directory\x20not\x20found:\x20'+_0x3acad0);const _0x3b7920=lstatSync(_0x8b000);if(_0x3b7920[_0xaeebec(0x14d)]())return _0x8b000;if(_0x3b7920['isSymbolicLink']()){const _0x6b0245=realpathSync(_0x8b000);if(lstatSync(_0x6b0245)[_0xaeebec(0x14d)]())return _0x6b0245;}throw CliErrors[_0xaeebec(0x172)](_0xaeebec(0x143)+_0x3acad0);}function requireRemoteScope(_0xa08b16){const _0x175be8=a160_0x2207;if(_0xa08b16[_0x175be8(0x163)]==='personal'||_0xa08b16[_0x175be8(0x163)]==='company'||_0xa08b16['scope']==='builtin')return _0xa08b16['scope'];throw CliErrors[_0x175be8(0x172)](_0x175be8(0x13b)+(_0xa08b16['skillCode']||_0x175be8(0x160))+_0x175be8(0x16d)+(_0xa08b16[_0x175be8(0x163)]??_0x175be8(0x13c))+'\x22.');}function readLocalSkillContent(_0x642e31){const _0x271584=resolve(_0x642e31,SKILL_FILE);return existsSync(_0x271584)&&lstatSync(_0x271584)['isFile']()?readFileSync(_0x271584,'utf8'):'';}function readPushMetadataIfPresent(_0x189bfa,_0x33b490={}){const _0x38dbde=a160_0x2207;try{return readMetadataIfPresent(_0x189bfa);}catch(_0x38420a){if(_0x33b490[_0x38dbde(0x150)])return undefined;throw _0x38420a;}}
|
|
1
|
+
(function(_0x44ff6f,_0x3b2fbf){const _0x40657d=a160_0x3050,_0x366f4e=_0x44ff6f();while(!![]){try{const _0x34ebda=parseInt(_0x40657d(0x19c))/0x1*(-parseInt(_0x40657d(0x1a2))/0x2)+parseInt(_0x40657d(0x1c0))/0x3*(parseInt(_0x40657d(0x1a8))/0x4)+parseInt(_0x40657d(0x199))/0x5+parseInt(_0x40657d(0x1ae))/0x6+parseInt(_0x40657d(0x19b))/0x7*(-parseInt(_0x40657d(0x1a7))/0x8)+parseInt(_0x40657d(0x1b2))/0x9+-parseInt(_0x40657d(0x1b4))/0xa;if(_0x34ebda===_0x3b2fbf)break;else _0x366f4e['push'](_0x366f4e['shift']());}catch(_0x2a8f29){_0x366f4e['push'](_0x366f4e['shift']());}}}(a160_0x3034,0x4ca71));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a160_0x38aa99}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(_0x342585,_0x153e47,_0x21225b={}){const _0x8f7979=a160_0x3050,_0x1a33ae=resolvePushDirectoryRoot(_0x342585),_0x5d0990=readPushMetadataIfPresent(resolve(_0x1a33ae,METADATA_FILE),{'ignoreInvalidMetadata':_0x21225b['ignoreInvalidMetadata']});if(_0x5d0990?.[_0x8f7979(0x189)]&&_0x5d0990[_0x8f7979(0x189)]!==_0x153e47&&!_0x21225b['allowAppCodeRetarget']&&!_0x21225b[_0x8f7979(0x194)])throw CliErrors[_0x8f7979(0x18f)](_0x8f7979(0x1a3)+_0x5d0990[_0x8f7979(0x189)]+_0x8f7979(0x1c1)+_0x153e47+'\x22.');const _0x30a091=resolvePushSkillCode(_0x1a33ae,_0x153e47,_0x5d0990,_0x21225b);if(!_0x30a091)throw CliErrors[_0x8f7979(0x18f)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x8f7979(0x1b6));return{'dir':_0x1a33ae,'skillCode':_0x30a091,'metadata':_0x5d0990};}export function readPushDirectory(_0x1aae01,_0x138d91,_0x289972={}){const _0x2e200b=a160_0x3050,_0x4032a8=resolvePushDirectoryIdentity(_0x1aae01,_0x138d91,_0x289972),_0x4724b2=_0x4032a8[_0x2e200b(0x195)],_0x2ffd2a=resolve(_0x4724b2,SKILL_FILE);if(!existsSync(_0x2ffd2a)||!lstatSync(_0x2ffd2a)[_0x2e200b(0x1a9)]())throw CliErrors[_0x2e200b(0x18f)](_0x2e200b(0x18c)+SKILL_FILE+':\x20'+_0x2ffd2a);const _0xf3a548=_0x4032a8['metadata'],_0xbb6214=_0x289972[_0x2e200b(0x186)]??_0x2e200b(0x18b);if(!_0x289972[_0x2e200b(0x191)]&&_0xf3a548?.['scope']===_0x2e200b(0x1b1))throw CliErrors[_0x2e200b(0x18f)](_0x2e200b(0x1ba)+METADATA_FILE+_0x2e200b(0x1a0)+_0xf3a548[_0x2e200b(0x1b5)]+'\x22.');if(!_0x289972[_0x2e200b(0x191)]&&_0xbb6214===_0x2e200b(0x18b)&&_0xf3a548?.[_0x2e200b(0x1b5)]&&_0xf3a548['scope']!==_0x2e200b(0x18b))throw CliErrors[_0x2e200b(0x18f)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x2e200b(0x1a0)+_0xf3a548[_0x2e200b(0x1b5)]+'\x22.',_0x2e200b(0x193)+_0x4724b2+_0x2e200b(0x1bc));const _0x562109=scanSkillDirectory(_0x4724b2,{'excludedFilePaths':_0x289972[_0x2e200b(0x1b3)]}),_0x21e932=buildSkillPackage(_0x562109),_0x3e53b1=readFileSync(_0x2ffd2a,'utf8'),_0x52eac1=_0x4032a8[_0x2e200b(0x190)],_0x3a20d1=_0x289972['ignoreMetadataForPayload']?undefined:_0xf3a548,_0x194f7c=readSkillDisplayName(_0x3e53b1);return{'skillCode':_0x52eac1,'metadata':_0xf3a548,'frontmatterDisplayName':_0x194f7c,'input':{'skillCode':_0x52eac1,'skillName':_0x194f7c??_0x3a20d1?.['skillName'],'description':_0x3a20d1?.[_0x2e200b(0x1bb)],'content':_0x3e53b1,'files':_0x21e932[_0x2e200b(0x198)],'packageBase64':_0x21e932[_0x2e200b(0x18a)],'tags':_0x3a20d1?.[_0x2e200b(0x1c2)],'version':_0x3a20d1?.[_0x2e200b(0x188)],'sourceSessionId':_0x3a20d1?.[_0x2e200b(0x187)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x28bdae,_0x555785,_0x191d84,_0x5dec4b={}){const _0x32c3e4=a160_0x3050,_0x275cc6=resolvePushDirectoryRoot(_0x28bdae),_0x4a4281=readPushMetadataIfPresent(resolve(_0x275cc6,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x18a707=requireRemoteScope(_0x555785),_0x423b6d=readLocalSkillContent(_0x275cc6),_0x45d332={..._0x555785,'appCode':_0x555785['appCode']??_0x191d84,'skillName':_0x555785[_0x32c3e4(0x1a4)]??_0x4a4281?.[_0x32c3e4(0x1a4)],'description':_0x555785[_0x32c3e4(0x1bb)]??_0x4a4281?.[_0x32c3e4(0x1bb)],'example':_0x555785[_0x32c3e4(0x1aa)]??_0x4a4281?.[_0x32c3e4(0x1aa)],'tags':Array['isArray'](_0x555785[_0x32c3e4(0x1c2)])?_0x555785[_0x32c3e4(0x1c2)]:_0x4a4281?.[_0x32c3e4(0x1c2)],'sourceSessionId':_0x555785[_0x32c3e4(0x187)]??_0x4a4281?.[_0x32c3e4(0x187)],'content':_0x555785[_0x32c3e4(0x19d)]??_0x423b6d},_0x4949f8=buildMetadata(_0x45d332,_0x18a707,_0x191d84,contentHash(_0x423b6d),_0x5dec4b['refreshedAt']);writeJsonAtomic(resolve(_0x275cc6,METADATA_FILE),_0x4949f8);}export function recordPushedRuntimeSkill(_0x1832ac,_0x344590,_0x425305,_0x1109a8={}){const _0x2a8413=a160_0x3050,_0x5c131c=resolvePushDirectoryRoot(_0x1832ac),_0x23ab95=scanSkillDirectory(_0x5c131c),_0xa21e97=_0x23ab95[_0x2a8413(0x1b9)](_0x527ad6=>_0x527ad6[_0x2a8413(0x185)]===SKILL_FILE),_0xdb8d65=_0xa21e97?fileText(_0xa21e97):'',_0x3306b0=tryNormalizePackageManifest(_0x344590[_0x2a8413(0x1ad)]),_0x144f3f={..._0x344590,'content':_0x344590[_0x2a8413(0x19d)]??_0xdb8d65,'files':_0x3306b0},_0x329634=_0x3306b0?normalizeLocalFiles(_0x23ab95)['filter'](_0x1a14f3=>_0x3306b0[_0x2a8413(0x1ad)][_0x2a8413(0x1af)](_0x2442d8=>_0x2442d8[_0x2a8413(0x185)]===_0x1a14f3[_0x2a8413(0x185)])):undefined,_0x572c64=buildMetadata(_0x144f3f,_0x1109a8[_0x2a8413(0x1b5)]??'personal',_0x425305,contentHash(_0x144f3f[_0x2a8413(0x19d)]??''),_0x1109a8[_0x2a8413(0x1b7)],_0x329634);writeJsonAtomic(resolve(_0x5c131c,METADATA_FILE),_0x572c64);}export function deriveSkillCodeFromDirectory(_0x5079cc,_0x174035){const _0x19453c=a160_0x3050,_0x374bc3=basename(resolve(_0x5079cc)),_0x58117e=_0x174035+'--';return _0x374bc3['startsWith'](_0x58117e)?_0x374bc3['slice'](_0x58117e[_0x19453c(0x1ab)]):_0x374bc3;}function resolvePushSkillCode(_0x5c5cd8,_0x2656b3,_0x16f5cc,_0x5adde0){const _0xa7904c=a160_0x3050,_0x41f195=deriveSkillCodeFromSkillFile(_0x5c5cd8)||deriveSkillCodeFromDirectory(_0x5c5cd8,_0x2656b3);if(_0x5adde0[_0xa7904c(0x19f)])return _0x41f195;return _0x16f5cc?.[_0xa7904c(0x190)]?.[_0xa7904c(0x18d)]()||_0x41f195;}function deriveSkillCodeFromSkillFile(_0x349128){const _0x350a93=a160_0x3050,_0x4ff056=resolve(_0x349128,SKILL_FILE);if(!existsSync(_0x4ff056)||!lstatSync(_0x4ff056)[_0x350a93(0x1a9)]())return undefined;const _0x3fdcb5=readFileSync(_0x4ff056,'utf8'),_0x339b20=_0x3fdcb5[_0x350a93(0x196)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x339b20)return undefined;const _0x3b6d1e=parseFrontmatterObject(_0x339b20[0x1]??''),_0x2e05e0=scalarToString(_0x3b6d1e?.[_0x350a93(0x1bd)]);return _0x2e05e0?slugifySkillName(_0x2e05e0):undefined;}function readSkillDisplayName(_0x1c67b7){const _0x4ee292=a160_0x3050,_0x38d835=_0x1c67b7[_0x4ee292(0x196)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x38d835)return undefined;const _0x128493=parseFrontmatterObject(_0x38d835[0x1]??'');return scalarToString(_0x128493?.[_0x4ee292(0x197)]);}function slugifySkillName(_0x2051f2){const _0x21e2b6=a160_0x3050,_0x1d7554=_0x2051f2[_0x21e2b6(0x18d)]()[_0x21e2b6(0x1b0)]()[_0x21e2b6(0x1b8)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x21e2b6(0x1b8)](/-+$/,'')[_0x21e2b6(0x1b8)](/-{2,}/g,'-');if(!_0x1d7554)throw CliErrors['validation'](_0x21e2b6(0x1c3)+SKILL_FILE+_0x21e2b6(0x19a));return _0x1d7554;}function parseFrontmatterObject(_0x21289a){const _0x5211a9=a160_0x3050;try{const _0x4e9516=a160_0x38aa99(_0x21289a);return _0x4e9516&&typeof _0x4e9516===_0x5211a9(0x1bf)&&!Array[_0x5211a9(0x18e)](_0x4e9516)?_0x4e9516:undefined;}catch{return undefined;}}function scalarToString(_0x423809){const _0x4e9972=a160_0x3050;if(typeof _0x423809==='string')return _0x423809[_0x4e9972(0x18d)]();if(typeof _0x423809===_0x4e9972(0x192)||typeof _0x423809==='boolean')return String(_0x423809);return undefined;}function a160_0x3034(){const _0x338cdf=['isFile','example','length','company','files','2085528HeWLOJ','some','toLowerCase','builtin','991620eEPMtn','excludedFilePaths','4232370UGUbHs','scope',',\x20or\x20directory\x20name.','pushedAt','replace','find','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','description','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','name','(unknown)','object','141BGAisH','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','tags','Invalid\x20','Remote\x20Skill\x20','path','targetScope','sourceSessionId','version','appCode','packageBase64','personal','Missing\x20','trim','isArray','validation','skillCode','ignoreMetadataScope','number','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','ignoreMetadataAppCodeMismatch','dir','match','displayName','manifest','979980CCWlhN','\x20name\x20for\x20SkillHub\x20slug\x20generation.','7mddhlF','2330HmzxAZ','content','Skill\x20directory\x20not\x20found:\x20','ignoreMetadataSkillCode','\x20has\x20scope=\x22','isDirectory','32nqEFUj','Skill\x20metadata\x20appCode\x20\x22','skillName','ignoreInvalidMetadata','utf8','3485688fVaaIJ','47356pfEVxZ'];a160_0x3034=function(){return _0x338cdf;};return a160_0x3034();}function a160_0x3050(_0x514a6c,_0x4f234e){_0x514a6c=_0x514a6c-0x185;const _0x30348e=a160_0x3034();let _0x3050ae=_0x30348e[_0x514a6c];return _0x3050ae;}function resolvePushDirectoryRoot(_0x471463){const _0x2db54e=a160_0x3050,_0x55bc27=resolve(_0x471463);if(!existsSync(_0x55bc27))throw CliErrors[_0x2db54e(0x18f)](_0x2db54e(0x19e)+_0x471463);const _0x3708cb=lstatSync(_0x55bc27);if(_0x3708cb[_0x2db54e(0x1a1)]())return _0x55bc27;if(_0x3708cb['isSymbolicLink']()){const _0x1558fa=realpathSync(_0x55bc27);if(lstatSync(_0x1558fa)['isDirectory']())return _0x1558fa;}throw CliErrors[_0x2db54e(0x18f)]('Skill\x20directory\x20not\x20found:\x20'+_0x471463);}function requireRemoteScope(_0x242333){const _0x21daa2=a160_0x3050;if(_0x242333[_0x21daa2(0x1b5)]===_0x21daa2(0x18b)||_0x242333[_0x21daa2(0x1b5)]===_0x21daa2(0x1ac)||_0x242333[_0x21daa2(0x1b5)]==='builtin')return _0x242333[_0x21daa2(0x1b5)];throw CliErrors[_0x21daa2(0x18f)](_0x21daa2(0x1c4)+(_0x242333['skillCode']||_0x21daa2(0x1be))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x242333[_0x21daa2(0x1b5)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x28e7b9){const _0x31cc1b=a160_0x3050,_0x444849=resolve(_0x28e7b9,SKILL_FILE);return existsSync(_0x444849)&&lstatSync(_0x444849)[_0x31cc1b(0x1a9)]()?readFileSync(_0x444849,_0x31cc1b(0x1a6)):'';}function readPushMetadataIfPresent(_0x1095ef,_0x216b37={}){const _0x5f2a14=a160_0x3050;try{return readMetadataIfPresent(_0x1095ef);}catch(_0x45699d){if(_0x216b37[_0x5f2a14(0x1a5)])return undefined;throw _0x45699d;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ca1cd,_0x226d19){const _0xb81c27=a161_0xe1f2,_0x34ee56=_0x1ca1cd();while(!![]){try{const _0x29091a=parseInt(_0xb81c27(0xdb))/0x1*(-parseInt(_0xb81c27(0xdf))/0x2)+parseInt(_0xb81c27(0xda))/0x3+parseInt(_0xb81c27(0xd6))/0x4+parseInt(_0xb81c27(0xe4))/0x5*(-parseInt(_0xb81c27(0xe0))/0x6)+parseInt(_0xb81c27(0xde))/0x7+-parseInt(_0xb81c27(0xdc))/0x8+-parseInt(_0xb81c27(0xd7))/0x9;if(_0x29091a===_0x226d19)break;else _0x34ee56['push'](_0x34ee56['shift']());}catch(_0x2d4fea){_0x34ee56['push'](_0x34ee56['shift']());}}}(a161_0x1f62,0x72d0b));function a161_0xe1f2(_0x2d517f,_0x53193d){_0x2d517f=_0x2d517f-0xd6;const _0x1f6260=a161_0x1f62();let _0xe1f27f=_0x1f6260[_0x2d517f];return _0xe1f27f;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x1a478c){const _0x291c65=a161_0xe1f2,_0x523fae=_0x1a478c&&_0x1a478c[_0x291c65(0xe5)]>0x0?_0x1a478c:[_0x291c65(0xe6),_0x291c65(0xe1),_0x291c65(0xd8)],_0x520560=[];for(const _0x233900 of _0x523fae){if(!isRuntimeSkillScope(_0x233900))throw CliErrors[_0x291c65(0xdd)](_0x291c65(0xe2)+_0x233900);!_0x520560[_0x291c65(0xd9)](_0x233900)&&_0x520560[_0x291c65(0xe3)](_0x233900);}return _0x520560;}function a161_0x1f62(){const _0x3fe68e=['builtin','includes','2316597XnFEZD','5395SIHcUt','1643592cZaNWZ','validation','3635520GlsTkM','290JYeTCJ','12VhXrtT','company','Unsupported\x20runtime\x20Skill\x20scope:\x20','push','1618720tuNsXi','length','personal','3478212ZTXnWH','500553Eljmgt'];a161_0x1f62=function(){return _0x3fe68e;};return a161_0x1f62();}export function isRuntimeSkillScope(_0x12d0f8){const _0x46c093=a161_0xe1f2;return _0x12d0f8===_0x46c093(0xe6)||_0x12d0f8===_0x46c093(0xe1)||_0x12d0f8===_0x46c093(0xd8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a163_0x340efa=a163_0x5009;(function(_0x4ce2f0,_0x5b7696){const _0x57503b=a163_0x5009,_0x41ead0=_0x4ce2f0();while(!![]){try{const _0x205ad3=-parseInt(_0x57503b(0x15c))/0x1+-parseInt(_0x57503b(0x152))/0x2+parseInt(_0x57503b(0x160))/0x3+parseInt(_0x57503b(0x162))/0x4*(parseInt(_0x57503b(0x14e))/0x5)+-parseInt(_0x57503b(0x161))/0x6*(parseInt(_0x57503b(0x155))/0x7)+-parseInt(_0x57503b(0x154))/0x8+parseInt(_0x57503b(0x15e))/0x9*(parseInt(_0x57503b(0x164))/0xa);if(_0x205ad3===_0x5b7696)break;else _0x41ead0['push'](_0x41ead0['shift']());}catch(_0x1c3272){_0x41ead0['push'](_0x41ead0['shift']());}}}(a163_0x241e,0xe92ea));import{unzipSync,zipSync}from'fflate';function a163_0x5009(_0x3898e4,_0x42cb32){_0x3898e4=_0x3898e4-0x14e;const _0x241e4b=a163_0x241e();let _0x500982=_0x241e4b[_0x3898e4];return _0x500982;}import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';function a163_0x241e(){const _0x2ab62c=['object','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','validation_error','code','validation','1494643OsXXIa','entries','36jwyFcV','map','36141YZJULc','12bpilMX','164HXdWvr','sort','10339870UMrNxs','84305XTIdbf','endsWith','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','length','1504902zJVVhd','name','6353360meJMrf','2950213OSBxiq','1980-01-01T00:00:00.000Z'];a163_0x241e=function(){return _0x2ab62c;};return a163_0x241e();}const ZIP_MTIME=new Date(a163_0x340efa(0x156));export function createDeterministicZipPackage(_0x3d56d0){const _0x1715e6={};for(const _0x55f2ea of normalizeLocalFiles(_0x3d56d0)){_0x1715e6[_0x55f2ea['path']]=fileContent(_0x55f2ea);}return Buffer['from'](zipSync(_0x1715e6,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x16c56f){const _0x42f6b2=a163_0x340efa;if(_0x16c56f[_0x42f6b2(0x151)]<0x16)throw CliErrors[_0x42f6b2(0x15b)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x487a1b;try{_0x487a1b=unzipSync(_0x16c56f,{'filter'(_0x3e9dd3){const _0x1d8b54=_0x42f6b2,_0x34904f=normalizeSkillRelativePath(_0x3e9dd3[_0x1d8b54(0x153)]);if(_0x34904f[_0x1d8b54(0x14f)]('/'))throw CliErrors[_0x1d8b54(0x15b)](_0x1d8b54(0x158)+_0x34904f);return!![];}});}catch(_0x32a931){if(isRuntimeSkillValidationError(_0x32a931))throw _0x32a931;throw CliErrors['validation'](_0x42f6b2(0x150));}return Object[_0x42f6b2(0x15d)](_0x487a1b)[_0x42f6b2(0x15f)](([_0x4fdd48,_0x269938])=>({'path':normalizeSkillRelativePath(_0x4fdd48),'bytes':Buffer['from'](_0x269938)}))[_0x42f6b2(0x163)](compareSkillFiles);}function isRuntimeSkillValidationError(_0xcaf36b){const _0x511f57=a163_0x340efa;return typeof _0xcaf36b===_0x511f57(0x157)&&_0xcaf36b!==null&&_0x511f57(0x15a)in _0xcaf36b&&_0xcaf36b['code']===_0x511f57(0x159);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1087c,_0x5080b8){const _0x4093ea=a164_0x58dc,_0x19e3f8=_0x1087c();while(!![]){try{const _0x3e3f44=parseInt(_0x4093ea(0x12b))/0x1+parseInt(_0x4093ea(0x115))/0x2+parseInt(_0x4093ea(0x12a))/0x3*(-parseInt(_0x4093ea(0x104))/0x4)+parseInt(_0x4093ea(0x12f))/0x5*(parseInt(_0x4093ea(0x11d))/0x6)+-parseInt(_0x4093ea(0x113))/0x7*(parseInt(_0x4093ea(0x11e))/0x8)+parseInt(_0x4093ea(0x109))/0x9*(parseInt(_0x4093ea(0x107))/0xa)+-parseInt(_0x4093ea(0x12d))/0xb*(-parseInt(_0x4093ea(0x111))/0xc);if(_0x3e3f44===_0x5080b8)break;else _0x19e3f8['push'](_0x19e3f8['shift']());}catch(_0x5a04c6){_0x19e3f8['push'](_0x19e3f8['shift']());}}}(a164_0xdcd9,0x96edd));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(_0x12160b){const _0x2854d8=a164_0x58dc,_0x10d65c=normalizeLocalFiles(_0x12160b);if(!_0x10d65c[_0x2854d8(0x127)](_0x31d915=>_0x31d915[_0x2854d8(0x12c)]===SKILL_FILE))throw CliErrors[_0x2854d8(0x10d)](_0x2854d8(0x126)+SKILL_FILE+_0x2854d8(0x122));const _0x3faf50=localFilesToManifestFiles(_0x10d65c),_0x50687b=createDeterministicZipPackage(_0x10d65c);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x3faf50),'zipSha256':bufferSha256(_0x50687b),'zipSize':_0x50687b[_0x2854d8(0x116)],'files':_0x3faf50},'packageBytes':_0x50687b,'packageBase64':_0x50687b['toString']('base64')};}export function verifyRuntimeSkillPackage(_0x32bf4a,_0x2dce42){const _0x373c23=normalizePackageManifest(_0x32bf4a,{'requireOssPath':![]});if(!_0x373c23)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x373c23,_0x2dce42);}function a164_0xdcd9(){const _0x3d6807=['object','has','Duplicate\x20Skill\x20package\x20entry:\x20','11922KHBLpc','8klqQZs','files','bytes','isArray','\x20in\x20Skill\x20file\x20package.','size','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Missing\x20','some','Runtime\x20Skill\x20package\x20is\x20missing\x20','isSafeInteger','6oKCpuA','1067527IjaTut','path','11NePndm','zipSize','1230DppCrr','ossPath','1898596UufpiX','zipSha256','requireOssPath','10sLGvFe','get','886122eONeAC','set','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','push','validation','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','toLowerCase','5519964debsis','map','7219891FTEdEw','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','968264flMlUl','length','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','sha256'];a164_0xdcd9=function(){return _0x3d6807;};return a164_0xdcd9();}export function verifyRuntimeSkillBundle(_0x5f50d6,_0x2e3cc3){const _0x337f3c=normalizePackageManifest(_0x5f50d6,{'requireOssPath':![]});if(!_0x337f3c)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x337f3c,_0x2e3cc3);}export function tryNormalizePackageManifest(_0x4dc872){return normalizePackageManifest(_0x4dc872,{'requireOssPath':![]});}export function requirePackageBytes(_0x2fec20,_0x3af09e){const _0x43fc38=a164_0x58dc;if(!_0x3af09e||_0x3af09e[_0x43fc38(0x116)]===0x0)throw CliErrors[_0x43fc38(0x10d)](_0x43fc38(0x10e)+_0x2fec20);return _0x3af09e;}export function extractDownloadedPackage(_0x5a196d){const _0x3148f9=a164_0x58dc,_0x1c774c=parseZipPackage(_0x5a196d)[_0x3148f9(0x112)](_0x46448b=>({'path':_0x46448b[_0x3148f9(0x12c)],'bytes':_0x46448b[_0x3148f9(0x120)]}));if(!_0x1c774c['some'](_0x771ceb=>_0x771ceb[_0x3148f9(0x12c)]===SKILL_FILE))throw CliErrors[_0x3148f9(0x10d)](_0x3148f9(0x128)+SKILL_FILE+'.');return normalizeLocalFiles(_0x1c774c);}export function localFilesToManifestFiles(_0x4aba09){const _0x5bf624=a164_0x58dc;return normalizeLocalFiles(_0x4aba09)[_0x5bf624(0x112)](_0x253745=>({'path':_0x253745[_0x5bf624(0x12c)],'sha256':fileHash(_0x253745),'size':fileContent(_0x253745)[_0x5bf624(0x116)]}));}function normalizePackageManifest(_0x2cb406,_0x5f537b){const _0x23f053=a164_0x58dc;if(!_0x2cb406||typeof _0x2cb406!==_0x23f053(0x11a)||Array[_0x23f053(0x121)](_0x2cb406))return undefined;const _0x3450dc=_0x2cb406,_0x22cf3f=typeof _0x3450dc['ossPath']==='string'?_0x3450dc[_0x23f053(0x103)]['trim']():undefined;if(_0x5f537b[_0x23f053(0x106)]&&!_0x22cf3f)return undefined;if(!Array[_0x23f053(0x121)](_0x3450dc[_0x23f053(0x11f)])||_0x3450dc[_0x23f053(0x11f)][_0x23f053(0x116)]===0x0)return undefined;if(!isSha256Hex(_0x3450dc['treeSha256']))throw CliErrors[_0x23f053(0x10d)](_0x23f053(0x117));if(!isSha256Hex(_0x3450dc['zipSha256']))throw CliErrors[_0x23f053(0x10d)](_0x23f053(0x10b));if(!Number['isSafeInteger'](_0x3450dc[_0x23f053(0x12e)])||_0x3450dc['zipSize']<0x0)throw CliErrors['validation'](_0x23f053(0x125));const _0x5e1125=normalizeManifestFiles(_0x3450dc[_0x23f053(0x11f)]);if(!_0x5e1125[_0x23f053(0x127)](_0x4184b1=>_0x4184b1[_0x23f053(0x12c)]===SKILL_FILE))throw CliErrors[_0x23f053(0x10d)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x2cdabd=fileTreeHash(_0x5e1125);if(_0x2cdabd!==_0x3450dc['treeSha256'][_0x23f053(0x110)]())throw CliErrors[_0x23f053(0x10d)](_0x23f053(0x118));return{'schemaVersion':Number[_0x23f053(0x129)](_0x3450dc['schemaVersion'])?_0x3450dc['schemaVersion']:0x2,'ossPath':_0x22cf3f,'treeSha256':_0x2cdabd,'zipSha256':_0x3450dc['zipSha256']['toLowerCase'](),'zipSize':_0x3450dc[_0x23f053(0x12e)],'files':_0x5e1125};}function a164_0x58dc(_0x201eab,_0x1a1d2f){_0x201eab=_0x201eab-0x103;const _0xdcd91b=a164_0xdcd9();let _0x58dcde=_0xdcd91b[_0x201eab];return _0x58dcde;}function extractAndVerifyPackage(_0x3edef0,_0x564369){const _0x12b816=a164_0x58dc,_0x592c4a=normalizePackageManifest(_0x3edef0,{'requireOssPath':![]});if(!_0x592c4a)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x564369[_0x12b816(0x116)]!==_0x592c4a[_0x12b816(0x12e)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x5c41a3=bufferSha256(_0x564369);if(_0x5c41a3!==_0x592c4a[_0x12b816(0x105)])throw CliErrors[_0x12b816(0x10d)](_0x12b816(0x114));return extractAndVerifyPackageFiles(_0x592c4a,_0x564369);}function extractAndVerifyPackageFiles(_0x92eef5,_0x22925a){const _0x41392c=a164_0x58dc,_0x34b338=parseZipPackage(_0x22925a);if(_0x34b338[_0x41392c(0x116)]!==_0x92eef5[_0x41392c(0x11f)][_0x41392c(0x116)])throw CliErrors[_0x41392c(0x10d)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x4fcace=new Map();for(const _0xa709b7 of _0x34b338){if(_0x4fcace[_0x41392c(0x11b)](_0xa709b7['path']))throw CliErrors[_0x41392c(0x10d)](_0x41392c(0x11c)+_0xa709b7['path']);_0x4fcace[_0x41392c(0x10a)](_0xa709b7[_0x41392c(0x12c)],_0xa709b7);}const _0x425b32=[];for(const _0x295ef3 of _0x92eef5[_0x41392c(0x11f)]){const _0x5d00b2=_0x4fcace[_0x41392c(0x108)](_0x295ef3[_0x41392c(0x12c)]);if(!_0x5d00b2)throw CliErrors[_0x41392c(0x10d)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x295ef3[_0x41392c(0x12c)]);if(_0x5d00b2[_0x41392c(0x120)]['length']!==_0x295ef3[_0x41392c(0x123)])throw CliErrors['validation'](_0x41392c(0x124)+_0x295ef3[_0x41392c(0x12c)]);const _0x2fa388=bufferSha256(_0x5d00b2[_0x41392c(0x120)]);if(_0x2fa388!==_0x295ef3[_0x41392c(0x119)])throw CliErrors[_0x41392c(0x10d)](_0x41392c(0x10f)+_0x295ef3[_0x41392c(0x12c)]);_0x425b32[_0x41392c(0x10c)]({'path':_0x295ef3[_0x41392c(0x12c)],'bytes':_0x5d00b2['bytes']});}return normalizeLocalFiles(_0x425b32);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58f849,_0x5845d6){var _0x5a1df2=a165_0x50c3,_0x2cec78=_0x58f849();while(!![]){try{var _0x40f063=-parseInt(_0x5a1df2(0xa0))/0x1+parseInt(_0x5a1df2(0x96))/0x2*(parseInt(_0x5a1df2(0x9e))/0x3)+-parseInt(_0x5a1df2(0x9c))/0x4*(parseInt(_0x5a1df2(0x98))/0x5)+parseInt(_0x5a1df2(0x9d))/0x6*(parseInt(_0x5a1df2(0x9b))/0x7)+parseInt(_0x5a1df2(0x9a))/0x8*(-parseInt(_0x5a1df2(0x9f))/0x9)+parseInt(_0x5a1df2(0x97))/0xa*(-parseInt(_0x5a1df2(0x99))/0xb)+parseInt(_0x5a1df2(0xa1))/0xc;if(_0x40f063===_0x5845d6)break;else _0x2cec78['push'](_0x2cec78['shift']());}catch(_0x4a9c4a){_0x2cec78['push'](_0x2cec78['shift']());}}}(a165_0x59c5,0xc22d8));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';function a165_0x59c5(){var _0x390fd9=['40qneiXR','31472aEBxZE','4MfxLrd','228tiBnoB','1590NSmXdp','2462139vBWuTB','427833aHlBCo','37442652wmmfhK','3260IDJEzs','10VpvRXg','28300hgdTmE','17140959nQaCyi'];a165_0x59c5=function(){return _0x390fd9;};return a165_0x59c5();}export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';function a165_0x50c3(_0x583983,_0x52789c){_0x583983=_0x583983-0x96;var _0x59c5d1=a165_0x59c5();var _0x50c3f9=_0x59c5d1[_0x583983];return _0x50c3f9;}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
|
-
|
|
1
|
+
function a166_0x1f16(_0x41819d,_0x3bf51e){_0x41819d=_0x41819d-0x198;const _0x3d0d18=a166_0x3d0d();let _0x1f16c2=_0x3d0d18[_0x41819d];return _0x1f16c2;}const a166_0x1927df=a166_0x1f16;(function(_0xfdb75b,_0xe33e09){const _0x2d650e=a166_0x1f16,_0xe98fc7=_0xfdb75b();while(!![]){try{const _0x4ecec9=parseInt(_0x2d650e(0x19f))/0x1*(parseInt(_0x2d650e(0x1b4))/0x2)+-parseInt(_0x2d650e(0x1b9))/0x3+parseInt(_0x2d650e(0x199))/0x4*(-parseInt(_0x2d650e(0x1a1))/0x5)+parseInt(_0x2d650e(0x198))/0x6*(parseInt(_0x2d650e(0x19b))/0x7)+-parseInt(_0x2d650e(0x19a))/0x8+parseInt(_0x2d650e(0x1a0))/0x9*(-parseInt(_0x2d650e(0x1b1))/0xa)+parseInt(_0x2d650e(0x1a9))/0xb;if(_0x4ecec9===_0xe33e09)break;else _0xe98fc7['push'](_0xe98fc7['shift']());}catch(_0x3d8819){_0xe98fc7['push'](_0xe98fc7['shift']());}}}(a166_0x3d0d,0x7387d));function a166_0x3d0d(){const _0xfb5963=['skills','unusable','17544417iJPFUD','home','number','\x20uses\x20unsupported\x20version\x20','not-recorded','.claude','absent','.skill-lock.json','2400KjIxSc','globalSkillsDirs','\x20has\x20no\x20skills\x20map','672962dxWxGN','kind','object','recorded','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','2115675GtWjur','.agents','unverifiable','reason','6tbyrEp','1572CYAYYh','284616IHryeU','174153ZFZaRB','utf8','parse','map','2ydkwjN','14796upUsio','8705rzxSXF','version','find','message','\x20is\x20unreadable:\x20','join'];a166_0x3d0d=function(){return _0xfb5963;};return a166_0x3d0d();}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a166_0x1927df(0x1ba),a166_0x1927df(0x1b0));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join('.agents',a166_0x1927df(0x1a7)),join(a166_0x1927df(0x1ae),a166_0x1927df(0x1a7))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x835fde,_0x120bd2){const _0x5be7a6=a166_0x1927df;if(!existsSync(_0x835fde))return{'kind':'not-recorded'};let _0x2824f7;try{_0x2824f7=JSON[_0x5be7a6(0x19d)](readFileSync(_0x835fde,_0x5be7a6(0x19c)));}catch(_0x485cd2){return{'kind':'unusable','reason':_0x835fde+_0x5be7a6(0x1a5)+_0x485cd2[_0x5be7a6(0x1a4)]};}const _0xcbcf2f=_0x2824f7;if(typeof _0xcbcf2f?.[_0x5be7a6(0x1a2)]!==_0x5be7a6(0x1ab)||!SUPPORTED_LOCK_VERSIONS['includes'](_0xcbcf2f['version']))return{'kind':_0x5be7a6(0x1a8),'reason':_0x835fde+_0x5be7a6(0x1ac)+String(_0xcbcf2f?.[_0x5be7a6(0x1a2)])};if(!_0xcbcf2f[_0x5be7a6(0x1a7)]||typeof _0xcbcf2f['skills']!==_0x5be7a6(0x1b6))return{'kind':_0x5be7a6(0x1a8),'reason':_0x835fde+_0x5be7a6(0x1b3)};return _0xcbcf2f[_0x5be7a6(0x1a7)][_0x120bd2]?{'kind':_0x5be7a6(0x1b7)}:{'kind':_0x5be7a6(0x1ad)};}export function resolveInstalledSkill(_0x1270a9,_0x131afa){const _0x51de10=a166_0x1927df,_0x3cd814=_0x131afa?.[_0x51de10(0x1aa)]??homedir(),_0x4c74a9=_0x131afa?.[_0x51de10(0x1b2)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x51de10(0x19e)](_0x4fb795=>join(_0x3cd814,_0x4fb795)),_0xe482a6=_0x131afa?.['lockFile']??join(_0x3cd814,SKILL_LOCK_RELATIVE_PATH),_0xf358dc=_0x4c74a9['map'](_0x17c235=>join(_0x17c235,_0x1270a9,'SKILL.md')),_0x228972=_0xf358dc[_0x51de10(0x1a3)](_0x95da41=>existsSync(_0x95da41));if(_0x228972)return{'state':'present','path':_0x228972};const _0x426fbc=readLockLookup(_0xe482a6,_0x1270a9);if(_0x426fbc[_0x51de10(0x1b5)]===_0x51de10(0x1a8))return{'state':_0x51de10(0x1bb),'reason':_0x426fbc[_0x51de10(0x1bc)]};if(_0x426fbc['kind']===_0x51de10(0x1b7))return{'state':_0x51de10(0x1bb),'reason':_0xe482a6+'\x20records\x20\x22'+_0x1270a9+_0x51de10(0x1b8)+('('+_0xf358dc[_0x51de10(0x1a6)](',\x20')+')')};return{'state':_0x51de10(0x1af),'checked':_0xf358dc};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x3e4dbf=a167_0x20b8;(function(_0x1b1c5e,_0x4dd5aa){const _0x37cbbd=a167_0x20b8,_0x2e0e5c=_0x1b1c5e();while(!![]){try{const _0x4ea74f=parseInt(_0x37cbbd(0x170))/0x1*(parseInt(_0x37cbbd(0x167))/0x2)+parseInt(_0x37cbbd(0x17d))/0x3+-parseInt(_0x37cbbd(0x178))/0x4*(parseInt(_0x37cbbd(0x17a))/0x5)+parseInt(_0x37cbbd(0x16f))/0x6+parseInt(_0x37cbbd(0x174))/0x7*(parseInt(_0x37cbbd(0x176))/0x8)+parseInt(_0x37cbbd(0x175))/0x9+-parseInt(_0x37cbbd(0x171))/0xa;if(_0x4ea74f===_0x4dd5aa)break;else _0x2e0e5c['push'](_0x2e0e5c['shift']());}catch(_0x1971fc){_0x2e0e5c['push'](_0x2e0e5c['shift']());}}}(a167_0x1ece,0x67ef9));const REDACTED_ACCESS_KEY=a167_0x3e4dbf(0x17c);export function maskCliAccessKey(_0x5cc1e0){const _0x34f9df=a167_0x3e4dbf;if(typeof _0x5cc1e0!=='string'||_0x5cc1e0[_0x34f9df(0x172)]<=0x8)return REDACTED_ACCESS_KEY;return''+_0x5cc1e0[_0x34f9df(0x179)](0x0,0x8)+'*'[_0x34f9df(0x17b)](_0x5cc1e0[_0x34f9df(0x172)]-0x8);}export function redactCliConfigCredentials(_0x41ee43){const _0x396892=a167_0x3e4dbf,_0x51ce8a={..._0x41ee43};return Object[_0x396892(0x173)][_0x396892(0x168)][_0x396892(0x16d)](_0x51ce8a,_0x396892(0x16c))&&(_0x51ce8a['accessKey']=maskCliAccessKey(_0x51ce8a[_0x396892(0x16c)])),_0x51ce8a[_0x396892(0x16b)]&&typeof _0x51ce8a[_0x396892(0x16b)]===_0x396892(0x17e)&&!Array['isArray'](_0x51ce8a[_0x396892(0x16b)])&&(_0x51ce8a['apps']=redactLegacyAppCredentials(_0x51ce8a[_0x396892(0x16b)])),_0x51ce8a;}function a167_0x20b8(_0x69941b,_0x4266dc){_0x69941b=_0x69941b-0x166;const _0x1ece63=a167_0x1ece();let _0x20b8a7=_0x1ece63[_0x69941b];return _0x20b8a7;}function a167_0x1ece(){const _0x3d04a1=['map','670McLUFx','hasOwnProperty','entries','test','apps','accessKey','call','isArray','245628UGbrZI','1648GgviXJ','3040670XaVvIZ','length','prototype','13153WMcPAb','2969019cXlwpa','976SJykYX','fromEntries','61620owxhgJ','slice','235GdBbpc','repeat','<redacted>','905028UfZJEW','object'];a167_0x1ece=function(){return _0x3d04a1;};return a167_0x1ece();}export function redactCliConfigValue(_0x3fa8d8,_0x8f85a3){const _0x315de7=a167_0x3e4dbf;if(_0x3fa8d8==='accessKey'||/^apps\.[^.]+\.accessKey$/[_0x315de7(0x16a)](_0x3fa8d8))return maskCliAccessKey(_0x8f85a3);if(_0x3fa8d8===_0x315de7(0x16b)&&_0x8f85a3&&typeof _0x8f85a3===_0x315de7(0x17e)&&!Array[_0x315de7(0x16e)](_0x8f85a3))return redactLegacyAppCredentials(_0x8f85a3);if(/^apps\.[^.]+$/[_0x315de7(0x16a)](_0x3fa8d8)&&_0x8f85a3&&typeof _0x8f85a3===_0x315de7(0x17e)&&!Array[_0x315de7(0x16e)](_0x8f85a3)){const _0x529a4f=_0x8f85a3;return Object[_0x315de7(0x173)]['hasOwnProperty'][_0x315de7(0x16d)](_0x529a4f,'accessKey')?{..._0x529a4f,'accessKey':maskCliAccessKey(_0x529a4f[_0x315de7(0x16c)])}:_0x8f85a3;}return _0x8f85a3;}function redactLegacyAppCredentials(_0x2333cc){const _0x1b21e5=a167_0x3e4dbf;return Object[_0x1b21e5(0x177)](Object[_0x1b21e5(0x169)](_0x2333cc)[_0x1b21e5(0x166)](([_0x47c1a1,_0x5944fb])=>{const _0x124914=_0x1b21e5;if(!_0x5944fb||typeof _0x5944fb!==_0x124914(0x17e)||Array[_0x124914(0x16e)](_0x5944fb))return[_0x47c1a1,_0x5944fb];const _0x582117={..._0x5944fb};return Object['prototype'][_0x124914(0x168)][_0x124914(0x16d)](_0x582117,'accessKey')&&(_0x582117[_0x124914(0x16c)]=maskCliAccessKey(_0x582117[_0x124914(0x16c)])),[_0x47c1a1,_0x582117];}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a168_0x3d9a(_0x154898,_0x1b327d){_0x154898=_0x154898-0x10b;const _0x551c73=a168_0x551c();let _0x3d9a44=_0x551c73[_0x154898];return _0x3d9a44;}(function(_0x17a06f,_0x1a56e9){const _0x3dc069=a168_0x3d9a,_0x3b7988=_0x17a06f();while(!![]){try{const _0x12508f=parseInt(_0x3dc069(0x112))/0x1+-parseInt(_0x3dc069(0x113))/0x2+-parseInt(_0x3dc069(0x10b))/0x3*(parseInt(_0x3dc069(0x111))/0x4)+-parseInt(_0x3dc069(0x10e))/0x5+parseInt(_0x3dc069(0x10c))/0x6+parseInt(_0x3dc069(0x110))/0x7+parseInt(_0x3dc069(0x10d))/0x8*(parseInt(_0x3dc069(0x10f))/0x9);if(_0x12508f===_0x1a56e9)break;else _0x3b7988['push'](_0x3b7988['shift']());}catch(_0x43bb37){_0x3b7988['push'](_0x3b7988['shift']());}}}(a168_0x551c,0x2b1ec));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a168_0x551c(){const _0x3b89cf=['24580lUVCVg','21223WgMBRj','459744OEjJBw','15ThQdYR','335844ETBJwZ','24VOmeON','1462830iZIouU','943146rFFoEJ','2367428tZVzFB'];a168_0x551c=function(){return _0x3b89cf;};return a168_0x551c();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x43bfa6,_0x3d61b9){const _0x431b50=a169_0x4c3e,_0x5f26bb=_0x43bfa6();while(!![]){try{const _0xe90483=-parseInt(_0x431b50(0xa7))/0x1+parseInt(_0x431b50(0xaf))/0x2+parseInt(_0x431b50(0xa0))/0x3+-parseInt(_0x431b50(0xb1))/0x4+parseInt(_0x431b50(0xa3))/0x5+-parseInt(_0x431b50(0xa8))/0x6+parseInt(_0x431b50(0xae))/0x7;if(_0xe90483===_0x3d61b9)break;else _0x5f26bb['push'](_0x5f26bb['shift']());}catch(_0x24601a){_0x5f26bb['push'](_0x5f26bb['shift']());}}}(a169_0xf634,0x50900));import a169_0x1c0301 from'semver';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CliErrors}from'../errors.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';function a169_0xf634(){const _0x439c28=['Upgrade\x20command:\x20','minimumVersion','1715441yeOuiL','998368GlBTWP','valid','251184noxNwA','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','Recommended\x20stable:\x20','Current\x20version:\x20','1728525tVSETq','filter','latest','1331425fKBSzB','npm\x20install\x20-g\x20','stableVersion','upgradeMessage','555544eONGoA','3830298cWXunP','minimumVersionMessage','join','Minimum\x20supported:\x20'];a169_0xf634=function(){return _0x439c28;};return a169_0xf634();}export function evaluateCliVersionPolicy(_0x4c2583,_0x727a99){const _0x3e78ff=a169_0x4c3e,_0x579e34=a169_0x1c0301[_0x3e78ff(0xb0)](_0x4c2583)===_0x4c2583,_0x89f1e8=_0x727a99?.[_0x3e78ff(0xa5)]??null,_0x4f9ca6=_0x727a99?.['minimumVersion']??null,_0x2eec4d=Boolean(_0x579e34&&_0x89f1e8&&a169_0x1c0301['lt'](_0x4c2583,_0x89f1e8)),_0xe9ce90=Boolean(_0x579e34&&_0x4f9ca6&&a169_0x1c0301['lt'](_0x4c2583,_0x4f9ca6));return{'currentVersion':_0x4c2583,'stableVersion':_0x89f1e8,'minimumVersion':_0x4f9ca6,'needsUpgrade':_0x2eec4d||_0xe9ce90,'belowMinimum':_0xe9ce90,'upgradeMessage':_0x727a99?.[_0x3e78ff(0xa6)],'minimumVersionMessage':_0x727a99?.[_0x3e78ff(0xa9)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}export function getCliUpgradeCommand(_0xe6028c){const _0x54a3e0=a169_0x4c3e;return _0x54a3e0(0xa4)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0xe6028c[_0x54a3e0(0xa5)]??_0x54a3e0(0xa2));}function a169_0x4c3e(_0x279ba2,_0x52889c){_0x279ba2=_0x279ba2-0xa0;const _0xf634bf=a169_0xf634();let _0x4c3e9e=_0xf634bf[_0x279ba2];return _0x4c3e9e;}export function assertCliVersionSupported(_0x205b8c){const _0xc5ca2=a169_0x4c3e;if(!_0x205b8c['belowMinimum'])return;const _0x15a233=[_0x205b8c[_0xc5ca2(0xa9)],_0xc5ca2(0xb4)+_0x205b8c['currentVersion'],_0xc5ca2(0xab)+_0x205b8c[_0xc5ca2(0xad)],_0xc5ca2(0xb3)+(_0x205b8c[_0xc5ca2(0xa5)]??'unavailable'),_0xc5ca2(0xac)+getCliUpgradeCommand(_0x205b8c)][_0xc5ca2(0xa1)](Boolean)[_0xc5ca2(0xaa)]('\x0a');throw CliErrors['validation'](_0xc5ca2(0xb2),_0x15a233);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fc143,_0x19ecba){const _0x231afb=a170_0x3b94,_0x5647d3=_0x2fc143();while(!![]){try{const _0x37acd8=parseInt(_0x231afb(0x15c))/0x1+-parseInt(_0x231afb(0x14d))/0x2*(parseInt(_0x231afb(0x14c))/0x3)+-parseInt(_0x231afb(0x158))/0x4+-parseInt(_0x231afb(0x14e))/0x5*(parseInt(_0x231afb(0x14f))/0x6)+-parseInt(_0x231afb(0x164))/0x7+-parseInt(_0x231afb(0x159))/0x8*(parseInt(_0x231afb(0x153))/0x9)+-parseInt(_0x231afb(0x161))/0xa*(-parseInt(_0x231afb(0x15f))/0xb);if(_0x37acd8===_0x19ecba)break;else _0x5647d3['push'](_0x5647d3['shift']());}catch(_0xaf2542){_0x5647d3['push'](_0x5647d3['shift']());}}}(a170_0x3e56,0x18caa));import a170_0x1ab70e 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(_0x16b2e6){const _0x12e18d=a170_0x3b94;return typeof _0x16b2e6===_0x12e18d(0x163)&&_0x16b2e6[_0x12e18d(0x156)]()?_0x16b2e6[_0x12e18d(0x156)]():null;}function pickStrictSemver(_0x58dd41){const _0x4a5c7e=a170_0x3b94,_0x4c76cf=pickString(_0x58dd41);return _0x4c76cf&&a170_0x1ab70e[_0x4a5c7e(0x15e)](_0x4c76cf)===_0x4c76cf?_0x4c76cf:null;}function a170_0x3e56(){const _0x290ac4=['184563tnLClS','recommendedVersion','now','trim','minimumVersionMessage','104520qAhhYp','24tKJWYa','cli','upgradeMessage','84343npQfdC','application/json','valid','252692IBDUNh','timeout','110svgDNX','object','string','682591UUrRtN','6Oieydw','2872COTdWC','5sVQyAg','284718uNVIcq','minVersion','latestVersion','stableVersion'];a170_0x3e56=function(){return _0x290ac4;};return a170_0x3e56();}export function normalizeCliVersionPolicy(_0x540f8b){const _0x71e557=a170_0x3b94;if(!_0x540f8b||typeof _0x540f8b!==_0x71e557(0x162))return null;const _0x2b4520=_0x540f8b,_0x36c2c7=_0x2b4520[_0x71e557(0x15a)]&&typeof _0x2b4520[_0x71e557(0x15a)]===_0x71e557(0x162)?_0x2b4520[_0x71e557(0x15a)]:_0x2b4520,_0x27851e=pickStrictSemver(_0x36c2c7[_0x71e557(0x152)]??_0x36c2c7[_0x71e557(0x151)]??_0x36c2c7[_0x71e557(0x154)]),_0x1e9c38=pickStrictSemver(_0x36c2c7['minimumVersion']??_0x36c2c7[_0x71e557(0x150)]);if(!_0x27851e&&!_0x1e9c38)return null;if(_0x27851e&&_0x1e9c38&&a170_0x1ab70e['gt'](_0x1e9c38,_0x27851e))return null;return{'stableVersion':_0x27851e,'minimumVersion':_0x1e9c38,'upgradeMessage':pickString(_0x36c2c7[_0x71e557(0x15b)])??undefined,'minimumVersionMessage':pickString(_0x36c2c7[_0x71e557(0x157)])??undefined};}export async function fetchCliVersionPolicy(){const _0x4aad38=a170_0x3b94;try{const _0x349464=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x4aad38(0x15d)},'signal':AbortSignal[_0x4aad38(0x160)](FETCH_TIMEOUT_MS)});if(!_0x349464['ok'])return null;return normalizeCliVersionPolicy(await _0x349464['json']());}catch{return null;}}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x512670=a170_0x3b94,_0x1c9f25=Date[_0x512670(0x155)]();if(hasCachedPolicy){const _0x108fb2=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x1c9f25-cachedAt<_0x108fb2)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()['then'](_0x4f9f08=>{const _0x2fd6a4=_0x512670;return cachedPolicy=_0x4f9f08,cachedAt=Date[_0x2fd6a4(0x155)](),hasCachedPolicy=!![],_0x4f9f08;})['finally'](()=>{pendingPolicy=null;}),pendingPolicy;}function a170_0x3b94(_0x141462,_0x1aa152){_0x141462=_0x141462-0x14c;const _0x3e5643=a170_0x3e56();let _0x3b9402=_0x3e5643[_0x141462];return _0x3b9402;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a171_0x3c7b(){const _0xc15474=['trim','logFileName','Failed\x20to\x20read\x20logs:','now','688695NMMVtX','writeFileSync','Failed:\x20','rawCommand','map','initWinstonLogger','4465764VLxaSb','2455565eNtTgm','1154936fghrOF','52ohnNzJ','toISOString','Failed\x20to\x20clear\x20logs:','level','8986850qOLiwM','success','combine','10NoGdNl','command','Completed:\x20','error','mkdirSync','logTask','winstonLogger','message','info','Starting:\x20','warn','format','File','unknown','existsSync','green','logFilePath','log','details','189009MUFjTF','getWinstonInstance','clear','readLogs','utf8','createLogger','duration','transports','split','dirname','blue','9BSFNDX','63995vdvWSE','currentRawCommand','timestamp','errors','setRawCommand','yellow'];a171_0x3c7b=function(){return _0xc15474;};return a171_0x3c7b();}const a171_0x4fe3eb=a171_0x288c;(function(_0x39a597,_0x73f579){const _0x3fbe0e=a171_0x288c,_0x1d6230=_0x39a597();while(!![]){try{const _0x1da67a=-parseInt(_0x3fbe0e(0xb6))/0x1+parseInt(_0x3fbe0e(0xc6))/0x2*(parseInt(_0x3fbe0e(0xd9))/0x3)+-parseInt(_0x3fbe0e(0xbf))/0x4*(-parseInt(_0x3fbe0e(0xe5))/0x5)+-parseInt(_0x3fbe0e(0xbc))/0x6+parseInt(_0x3fbe0e(0xbd))/0x7+parseInt(_0x3fbe0e(0xbe))/0x8+parseInt(_0x3fbe0e(0xe4))/0x9*(parseInt(_0x3fbe0e(0xc3))/0xa);if(_0x1da67a===_0x73f579)break;else _0x1d6230['push'](_0x1d6230['shift']());}catch(_0x4541fa){_0x1d6230['push'](_0x1d6230['shift']());}}}(a171_0x3c7b,0x6bf94));import a171_0x2cee21 from'winston';import a171_0x499352 from'node:fs';import a171_0x7609b1 from'node:path';function a171_0x288c(_0xb9598f,_0x3622d8){_0xb9598f=_0xb9598f-0xad;const _0x3c7b59=a171_0x3c7b();let _0x288c62=_0x3c7b59[_0xb9598f];return _0x288c62;}import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a171_0x4fe3eb(0xcc)];[a171_0x4fe3eb(0xd6)]='';[a171_0x4fe3eb(0xad)]='';constructor(){}[a171_0x4fe3eb(0xb0)](_0x385e56){this['currentRawCommand']=_0x385e56;}['setLogPath'](_0x55dbc6){const _0x15f86a=a171_0x4fe3eb;this[_0x15f86a(0xd6)]=a171_0x7609b1['join'](_0x55dbc6,PRODUCT_CONFIG[_0x15f86a(0xb3)]),this[_0x15f86a(0xcc)]&&this['winstonLogger'][_0x15f86a(0xdb)](),this[_0x15f86a(0xbb)]();}['initWinstonLogger'](){const _0x4bbe8e=a171_0x4fe3eb,_0x2d1b3a=a171_0x7609b1[_0x4bbe8e(0xe2)](this[_0x4bbe8e(0xd6)]);!a171_0x499352['existsSync'](_0x2d1b3a)&&a171_0x499352[_0x4bbe8e(0xca)](_0x2d1b3a,{'recursive':!![]});const _0x319d55=a171_0x2cee21[_0x4bbe8e(0xd1)][_0x4bbe8e(0xc5)](a171_0x2cee21[_0x4bbe8e(0xd1)][_0x4bbe8e(0xae)](),a171_0x2cee21[_0x4bbe8e(0xd1)][_0x4bbe8e(0xaf)]({'stack':!![]}),a171_0x2cee21[_0x4bbe8e(0xd1)]['printf'](_0x5941d3=>{const _0x470a69=_0x4bbe8e,_0x117dcd={'timestamp':_0x5941d3[_0x470a69(0xae)]||new Date()[_0x470a69(0xc0)](),'level':_0x5941d3[_0x470a69(0xc2)]||_0x470a69(0xce),'command':_0x5941d3[_0x470a69(0xc7)]||_0x470a69(0xd3),'rawCommand':_0x5941d3[_0x470a69(0xb9)]||this[_0x470a69(0xad)]||undefined,'message':_0x5941d3[_0x470a69(0xcd)]||'','duration':_0x5941d3[_0x470a69(0xdf)]||undefined,'details':_0x5941d3[_0x470a69(0xd8)]||undefined};return JSON['stringify'](_0x117dcd);}));this['winstonLogger']=a171_0x2cee21[_0x4bbe8e(0xde)]({'level':_0x4bbe8e(0xce),'format':_0x319d55,'transports':[new a171_0x2cee21[(_0x4bbe8e(0xe0))][(_0x4bbe8e(0xd2))]({'filename':this[_0x4bbe8e(0xd6)],'level':_0x4bbe8e(0xce)})],'silent':![]}),a171_0x2cee21['addColors']({'success':_0x4bbe8e(0xd5),'error':'red','warn':_0x4bbe8e(0xb1),'info':_0x4bbe8e(0xe3)});}[a171_0x4fe3eb(0xce)](_0x5b0be1,_0x1cbdbd,_0x68d622){const _0x4b8ca9=a171_0x4fe3eb;if(!this[_0x4b8ca9(0xd6)]||!this[_0x4b8ca9(0xcc)])return;this['winstonLogger'][_0x4b8ca9(0xce)](_0x1cbdbd,{'command':_0x5b0be1,'details':_0x68d622});}[a171_0x4fe3eb(0xc4)](_0x560b6b,_0x415163,_0x144ee1,_0x4aaec7){const _0x465a86=a171_0x4fe3eb;if(!this[_0x465a86(0xd6)]||!this[_0x465a86(0xcc)])return;this[_0x465a86(0xcc)][_0x465a86(0xd7)](_0x465a86(0xce),_0x415163,{'level':_0x465a86(0xc4),'command':_0x560b6b,'duration':_0x144ee1,'details':_0x4aaec7});}[a171_0x4fe3eb(0xc9)](_0x15a755,_0x3f5c4c,_0x3e0b61){const _0x460f5e=a171_0x4fe3eb;if(!this[_0x460f5e(0xd6)]||!this[_0x460f5e(0xcc)])return;this[_0x460f5e(0xcc)][_0x460f5e(0xc9)](_0x3f5c4c,{'command':_0x15a755,'details':_0x3e0b61});}['warn'](_0x83e1a6,_0x346d48,_0x561fb6){const _0x5b5e94=a171_0x4fe3eb;if(!this[_0x5b5e94(0xd6)]||!this['winstonLogger'])return;this[_0x5b5e94(0xcc)][_0x5b5e94(0xd0)](_0x346d48,{'command':_0x83e1a6,'details':_0x561fb6});}async[a171_0x4fe3eb(0xcb)](_0x30d0ef,_0xe68cd1,_0x282c91){const _0x3495d8=a171_0x4fe3eb,_0x40c514=Date[_0x3495d8(0xb5)]();this[_0x3495d8(0xce)](_0x30d0ef,_0x3495d8(0xcf)+_0xe68cd1);try{const _0x4af55b=await _0x282c91(),_0x1fb001=Date['now']()-_0x40c514;return this[_0x3495d8(0xc4)](_0x30d0ef,_0x3495d8(0xc8)+_0xe68cd1,_0x1fb001),_0x4af55b;}catch(_0x5a7b8f){const _0x362a12=Date['now']()-_0x40c514;this['error'](_0x30d0ef,_0x3495d8(0xb8)+_0xe68cd1,{'error':_0x5a7b8f instanceof Error?_0x5a7b8f[_0x3495d8(0xcd)]:String(_0x5a7b8f),'duration':_0x362a12});throw _0x5a7b8f;}}[a171_0x4fe3eb(0xdc)](){const _0x47c27c=a171_0x4fe3eb;try{if(!a171_0x499352[_0x47c27c(0xd4)](this[_0x47c27c(0xd6)]))return[];const _0x3fdfc8=a171_0x499352['readFileSync'](this[_0x47c27c(0xd6)],_0x47c27c(0xdd));return _0x3fdfc8[_0x47c27c(0xe1)](/\r?\n/)['filter'](_0x26c973=>_0x26c973[_0x47c27c(0xb2)]())[_0x47c27c(0xba)](_0x17d59f=>JSON['parse'](_0x17d59f));}catch(_0x11b361){return console[_0x47c27c(0xd0)](_0x47c27c(0xb4),_0x11b361),[];}}['clearLogs'](){const _0xd4de1d=a171_0x4fe3eb;try{a171_0x499352[_0xd4de1d(0xd4)](this[_0xd4de1d(0xd6)])&&a171_0x499352[_0xd4de1d(0xb7)](this[_0xd4de1d(0xd6)],'',_0xd4de1d(0xdd));}catch(_0x3d0609){console['warn'](_0xd4de1d(0xc1),_0x3d0609);}}[a171_0x4fe3eb(0xda)](){return this['winstonLogger'];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a172_0x3f256b=a172_0x505c;(function(_0x1b4683,_0x11bc38){const _0x31eb0d=a172_0x505c,_0x1dcd51=_0x1b4683();while(!![]){try{const _0x274541=-parseInt(_0x31eb0d(0x19a))/0x1*(parseInt(_0x31eb0d(0x19f))/0x2)+-parseInt(_0x31eb0d(0x194))/0x3*(parseInt(_0x31eb0d(0x19e))/0x4)+parseInt(_0x31eb0d(0x1a4))/0x5+parseInt(_0x31eb0d(0x19c))/0x6*(parseInt(_0x31eb0d(0x198))/0x7)+-parseInt(_0x31eb0d(0x1a6))/0x8*(-parseInt(_0x31eb0d(0x19b))/0x9)+parseInt(_0x31eb0d(0x1a7))/0xa*(-parseInt(_0x31eb0d(0x19d))/0xb)+parseInt(_0x31eb0d(0x199))/0xc;if(_0x274541===_0x11bc38)break;else _0x1dcd51['push'](_0x1dcd51['shift']());}catch(_0x467c45){_0x1dcd51['push'](_0x1dcd51['shift']());}}}(a172_0x5102,0x96294));function a172_0x505c(_0x165973,_0x150b57){_0x165973=_0x165973-0x192;const _0x5102c1=a172_0x5102();let _0x505c00=_0x5102c1[_0x165973];return _0x505c00;}const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a172_0x3f256b(0x192)]),MIN_SAFE_INTEGER=BigInt(Number[a172_0x3f256b(0x1a2)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x5f02c3){const _0x4dc991=a172_0x3f256b;if(_0x5f02c3['includes']('.')||_0x5f02c3[_0x4dc991(0x196)]('e')||_0x5f02c3[_0x4dc991(0x196)]('E'))return![];const _0x2f4818=BigInt(_0x5f02c3);return _0x2f4818>MAX_SAFE_INTEGER||_0x2f4818<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x6e00af){const _0xda30cd=a172_0x3f256b;let _0x284860='',_0x2fe37d=![],_0x1ab096=![];for(let _0xe82c33=0x0;_0xe82c33<_0x6e00af[_0xda30cd(0x195)];){const _0x25fc48=_0x6e00af[_0xe82c33];if(_0x2fe37d){_0x284860+=_0x25fc48,_0xe82c33+=0x1;if(_0x1ab096)_0x1ab096=![];else{if(_0x25fc48==='\x5c')_0x1ab096=!![];else _0x25fc48==='\x22'&&(_0x2fe37d=![]);}continue;}if(_0x25fc48==='\x22'){_0x2fe37d=!![],_0x284860+=_0x25fc48,_0xe82c33+=0x1;continue;}if(_0x25fc48==='-'||_0x25fc48>='0'&&_0x25fc48<='9'){const _0x241163=JSON_NUMBER_PATTERN[_0xda30cd(0x193)](_0x6e00af[_0xda30cd(0x197)](_0xe82c33))?.[0x0];if(_0x241163){_0x284860+=isUnsafeIntegerLiteral(_0x241163)?'\x22'+_0x241163+'\x22':_0x241163,_0xe82c33+=_0x241163[_0xda30cd(0x195)];continue;}}_0x284860+=_0x25fc48,_0xe82c33+=0x1;}return _0x284860;}function a172_0x5102(){const _0x31bd18=['80OmHbXR','30iWYAIg','json','MAX_SAFE_INTEGER','exec','2853267BfdNwT','length','includes','slice','764372UzvXMG','16934196QwxyCP','1EMSoJO','456363JuzEAx','18otZFYI','4274941BvDqzy','4TKURXp','1291754vIQilE','text','defineProperty','MIN_SAFE_INTEGER','parse','5660390TBiJkx','prototype'];a172_0x5102=function(){return _0x31bd18;};return a172_0x5102();}export function parseLosslessJson(_0x53d48e){const _0xcd883=a172_0x3f256b;return JSON[_0xcd883(0x1a3)](quoteUnsafeIntegerLiterals(_0x53d48e));}export function installLosslessJsonResponseParser(){const _0x43973d=a172_0x3f256b;if(typeof Response==='undefined')return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x43973d(0x1a5)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,_0x43973d(0x1a8)),Object[_0x43973d(0x1a1)](responseJsonPrototype,_0x43973d(0x1a8),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x58b594(){const _0x3c0284=_0x43973d;return parseLosslessJson(await this[_0x3c0284(0x1a0)]());}}),restoreResponseJsonParser=()=>{const _0x2cf9a9=_0x43973d;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x2cf9a9(0x1a8),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x2cf9a9(0x1a8)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a7c54,_0x182230){const _0xe155b2=a173_0xef1f,_0x1bcc35=_0x1a7c54();while(!![]){try{const _0x4fa929=parseInt(_0xe155b2(0xcf))/0x1*(parseInt(_0xe155b2(0xc8))/0x2)+-parseInt(_0xe155b2(0xd0))/0x3*(parseInt(_0xe155b2(0xc6))/0x4)+-parseInt(_0xe155b2(0xbd))/0x5*(parseInt(_0xe155b2(0xbb))/0x6)+-parseInt(_0xe155b2(0xd4))/0x7+parseInt(_0xe155b2(0xbe))/0x8*(-parseInt(_0xe155b2(0xc1))/0x9)+-parseInt(_0xe155b2(0xc4))/0xa*(parseInt(_0xe155b2(0xc7))/0xb)+parseInt(_0xe155b2(0xd5))/0xc;if(_0x4fa929===_0x182230)break;else _0x1bcc35['push'](_0x1bcc35['shift']());}catch(_0x65445a){_0x1bcc35['push'](_0x1bcc35['shift']());}}}(a173_0x2c3e,0xafcc2));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x452a79){const _0x24d850=a173_0xef1f;if(!_0x452a79)return undefined;try{return parseLosslessJson(_0x452a79);}catch{throw CliErrors[_0x24d850(0xcb)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x452a79);}}function a173_0xef1f(_0x5cb2b5,_0x17be91){_0x5cb2b5=_0x5cb2b5-0xbb;const _0x2c3e17=a173_0x2c3e();let _0xef1f0=_0x2c3e17[_0x5cb2b5];return _0xef1f0;}function a173_0x2c3e(){const _0x31326b=['map','188631frPnxx','string','Invalid\x20JSON\x20for\x20--params:\x20','6229060ssVbih','object','4QuCfNA','22eKVtPr','830Wgcsqa','test','items','validation','data\x20update\x20--params.','isSafeInteger','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','15UJsEzN','94476jxHoBM','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','join','5434793uKKxcF','50264364nCPysM','length','16836ljIrdo','isArray','2495uGDVYj','8JSMpMM','\x20records\x20per\x20call;\x20received\x20'];a173_0x2c3e=function(){return _0x31326b;};return a173_0x2c3e();}export function parseJsonParamsValue(_0x45917b){const _0x1ba128=a173_0xef1f;if(!_0x45917b)return undefined;try{return parseLosslessJson(_0x45917b);}catch{throw CliErrors[_0x1ba128(0xcb)](_0x1ba128(0xc3)+_0x45917b);}}export function parseBatchCreateItemsFromParams(_0x32a601){const _0x41359d=a173_0xef1f;if(Array[_0x41359d(0xbc)](_0x32a601))return _0x32a601;if(_0x32a601!==null&&_0x32a601!==undefined&&typeof _0x32a601==='object'&&Array[_0x41359d(0xbc)](_0x32a601[_0x41359d(0xca)]))return _0x32a601[_0x41359d(0xca)];throw CliErrors[_0x41359d(0xcb)]('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');}function parseDataUpdateId(_0x568ffc,_0x2e2a8d){const _0x14be16=a173_0xef1f;if(typeof _0x568ffc==='number'&&Number[_0x14be16(0xcd)](_0x568ffc)&&_0x568ffc>0x0)return _0x568ffc;if(typeof _0x568ffc===_0x14be16(0xc2)){if(/^[1-9]\d*$/[_0x14be16(0xc9)](_0x568ffc))return _0x568ffc;}throw CliErrors[_0x14be16(0xcb)](_0x14be16(0xcc)+_0x2e2a8d+_0x14be16(0xce));}export function parseUpdateIdsFromParams(_0x17e8d0){const _0x555c21=a173_0xef1f;if(_0x17e8d0===null||_0x17e8d0===undefined||typeof _0x17e8d0!==_0x555c21(0xc5)||Array[_0x555c21(0xbc)](_0x17e8d0))throw CliErrors['validation']('data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.',_0x555c21(0xd1));const _0x5971a3=_0x17e8d0['id'];if(_0x5971a3===undefined||_0x5971a3===null)throw CliErrors[_0x555c21(0xcb)]('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.',_0x555c21(0xd1));const _0x21b864=Array[_0x555c21(0xbc)](_0x5971a3)?_0x5971a3:[_0x5971a3];if(_0x21b864[_0x555c21(0xd6)]===0x0)throw CliErrors[_0x555c21(0xcb)](_0x555c21(0xd2));if(_0x21b864[_0x555c21(0xd6)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x555c21(0xcb)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+_0x555c21(0xbf)+_0x21b864[_0x555c21(0xd6)]+'.');return _0x21b864[_0x555c21(0xc0)]((_0x190402,_0x1ff2f8)=>parseDataUpdateId(_0x190402,Array['isArray'](_0x5971a3)?'id['+_0x1ff2f8+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x4ae44f,_0xdd439f){const _0x5d1efa=a173_0xef1f;if(Array['isArray'](_0x4ae44f['id'])&&_0xdd439f[_0x5d1efa(0xd6)]>0x1)return{..._0x4ae44f,'id':_0xdd439f[_0x5d1efa(0xd3)](',')};return _0x4ae44f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a174_0x576f(_0x555dbe,_0x3d546b){_0x555dbe=_0x555dbe-0x17e;const _0xa250e5=a174_0xa250();let _0x576f06=_0xa250e5[_0x555dbe];return _0x576f06;}(function(_0x468d97,_0x14b32a){const _0x484668=a174_0x576f,_0x5ddc1c=_0x468d97();while(!![]){try{const _0x59b409=-parseInt(_0x484668(0x185))/0x1*(-parseInt(_0x484668(0x18a))/0x2)+-parseInt(_0x484668(0x189))/0x3+parseInt(_0x484668(0x17f))/0x4+parseInt(_0x484668(0x181))/0x5*(-parseInt(_0x484668(0x183))/0x6)+-parseInt(_0x484668(0x17e))/0x7*(-parseInt(_0x484668(0x182))/0x8)+-parseInt(_0x484668(0x187))/0x9+-parseInt(_0x484668(0x180))/0xa;if(_0x59b409===_0x14b32a)break;else _0x5ddc1c['push'](_0x5ddc1c['shift']());}catch(_0x6f3b43){_0x5ddc1c['push'](_0x5ddc1c['shift']());}}}(a174_0xa250,0xc523b));export function normalizePositiveSafeInteger(_0x30d2c1){const _0x119578=a174_0x576f;if(typeof _0x30d2c1==='number')return Number[_0x119578(0x184)](_0x30d2c1)&&_0x30d2c1>0x0?_0x30d2c1:undefined;if(typeof _0x30d2c1!==_0x119578(0x186)||!/^\d+$/[_0x119578(0x188)](_0x30d2c1))return undefined;const _0x57710=Number(_0x30d2c1);return Number['isSafeInteger'](_0x57710)&&_0x57710>0x0?_0x57710:undefined;}function a174_0xa250(){const _0x3e34c4=['2835558cFjjGy','test','2063850OVcRJX','500aBPXWF','63QbNrDB','4657464ulWBZX','1757090qzfFkZ','5bwIgQD','848984Bxhxke','4981614SXlIzt','isSafeInteger','2788lFJWdQ','string'];a174_0xa250=function(){return _0x3e34c4;};return a174_0xa250();}
|
package/lib/utils/redaction.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a175_0x1d3cf4=a175_0x4371;(function(_0x25572e,_0x343a6b){const _0x5df851=a175_0x4371,_0x3b9c40=_0x25572e();while(!![]){try{const _0xcd0f86=-parseInt(_0x5df851(0xca))/0x1+-parseInt(_0x5df851(0xcc))/0x2+-parseInt(_0x5df851(0xd7))/0x3*(parseInt(_0x5df851(0xcd))/0x4)+-parseInt(_0x5df851(0xc6))/0x5*(-parseInt(_0x5df851(0xd2))/0x6)+-parseInt(_0x5df851(0xd0))/0x7+parseInt(_0x5df851(0xd4))/0x8*(-parseInt(_0x5df851(0xce))/0x9)+-parseInt(_0x5df851(0xd6))/0xa*(-parseInt(_0x5df851(0xd3))/0xb);if(_0xcd0f86===_0x343a6b)break;else _0x3b9c40['push'](_0x3b9c40['shift']());}catch(_0x3d8b5c){_0x3b9c40['push'](_0x3b9c40['shift']());}}}(a175_0x1efc,0xe4903));const REDACTED_VALUE='[REDACTED]',SENSITIVE_KEY_PATTERN=/(?:access.?key|api.?key|authorization|cookie|credential|password|passwd|private.?key|secret|token|webhook)/i,SENSITIVE_FLAG_NAMES=new Set([a175_0x1d3cf4(0xd5),a175_0x1d3cf4(0xc2)]),SENSITIVE_VALUE_KEYS=new Set(['comment']);export function isSensitiveKey(_0x3ade03){const _0x3fbc91=a175_0x1d3cf4,_0x5028ae=_0x3ade03[_0x3fbc91(0xc4)](/_/g,'-')[_0x3fbc91(0xc5)]();return SENSITIVE_KEY_PATTERN[_0x3fbc91(0xc1)](_0x5028ae);}export function isSensitiveFlagName(_0xebad1b){const _0x59eb2b=a175_0x1d3cf4,_0x5db80a=_0xebad1b['replace'](/_/g,'-')[_0x59eb2b(0xc5)]();return isSensitiveKey(_0x5db80a)||SENSITIVE_FLAG_NAMES[_0x59eb2b(0xc9)](_0x5db80a);}function a175_0x4371(_0x24ee10,_0x167de0){_0x24ee10=_0x24ee10-0xc1;const _0x1efc1e=a175_0x1efc();let _0x43717b=_0x1efc1e[_0x24ee10];return _0x43717b;}function redactVariableValues(_0x533635){const _0x59079f=a175_0x1d3cf4;if(Array[_0x59079f(0xc8)](_0x533635))return _0x533635['map'](_0x37f6a7=>redactVariableValues(_0x37f6a7));if(_0x533635&&typeof _0x533635==='object')return Object['fromEntries'](Object[_0x59079f(0xc7)](_0x533635)[_0x59079f(0xcf)](([_0x59d43b,_0x48b53b])=>[_0x59d43b,redactVariableValues(_0x48b53b)]));return REDACTED_VALUE;}export function redactSensitiveValue(_0x627a04){const _0x34e34c=a175_0x1d3cf4;if(Array[_0x34e34c(0xc8)](_0x627a04))return _0x627a04['map'](_0x362fb1=>redactSensitiveValue(_0x362fb1));if(!_0x627a04||typeof _0x627a04!==_0x34e34c(0xd1))return _0x627a04;const _0x1ab458={};for(const [_0x573c3c,_0x3222fb]of Object[_0x34e34c(0xc7)](_0x627a04)){const _0x2b5042=_0x573c3c[_0x34e34c(0xc4)](/_/g,'-')[_0x34e34c(0xc5)]();_0x1ab458[_0x573c3c]=_0x2b5042===_0x34e34c(0xc2)?redactVariableValues(_0x3222fb):SENSITIVE_VALUE_KEYS['has'](_0x2b5042)||isSensitiveKey(_0x573c3c)?REDACTED_VALUE:redactSensitiveValue(_0x3222fb);}return _0x1ab458;}export function redactCommandArgv(_0x164bd5){const _0x3252cf=a175_0x1d3cf4,_0x4afc19=[];let _0x4f85f6=![];for(const _0x1e1d04 of _0x164bd5){if(_0x4f85f6){_0x4afc19['push'](REDACTED_VALUE),_0x4f85f6=![];continue;}const _0x4ca8e3=_0x1e1d04[_0x3252cf(0xcb)](/^--([^=]+)(?:=(.*))?$/);if(!_0x4ca8e3||!isSensitiveFlagName(_0x4ca8e3[0x1]??'')){_0x4afc19[_0x3252cf(0xc3)](_0x1e1d04);continue;}_0x4afc19[_0x3252cf(0xc3)]('--'+_0x4ca8e3[0x1]+(_0x4ca8e3[0x2]===undefined?'':'='+REDACTED_VALUE)),_0x4ca8e3[0x2]===undefined&&(_0x4f85f6=!![]);}return _0x4afc19;}export{REDACTED_VALUE};function a175_0x1efc(){const _0x1ef890=['isArray','has','846010MyvCvW','match','2610094CsBbrB','4744tKXqwk','405FniXGy','map','13104483YCPyek','object','6HngFcv','9515ccNejm','2224NgStPc','comment','60850oPohpx','1797fjuKaW','test','variables','push','replace','toLowerCase','2093600rZhlvB','entries'];a175_0x1efc=function(){return _0x1ef890;};return a175_0x1efc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1901de,_0x2c12a4){const _0x284bf4=a176_0x1029,_0x2761f8=_0x1901de();while(!![]){try{const _0x8531aa=parseInt(_0x284bf4(0xd4))/0x1*(-parseInt(_0x284bf4(0xc7))/0x2)+-parseInt(_0x284bf4(0xcc))/0x3*(parseInt(_0x284bf4(0xbf))/0x4)+-parseInt(_0x284bf4(0xd2))/0x5*(parseInt(_0x284bf4(0xcf))/0x6)+parseInt(_0x284bf4(0xd5))/0x7*(-parseInt(_0x284bf4(0xd1))/0x8)+parseInt(_0x284bf4(0xc0))/0x9+-parseInt(_0x284bf4(0xca))/0xa+-parseInt(_0x284bf4(0xce))/0xb*(-parseInt(_0x284bf4(0xbd))/0xc);if(_0x8531aa===_0x2c12a4)break;else _0x2761f8['push'](_0x2761f8['shift']());}catch(_0x2a7587){_0x2761f8['push'](_0x2761f8['shift']());}}}(a176_0x4e7a,0x32403));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';function a176_0x1029(_0x15214c,_0xcd7eac){_0x15214c=_0x15214c-0xbc;const _0x4e7a25=a176_0x4e7a();let _0x1029fe=_0x4e7a25[_0x15214c];return _0x1029fe;}const UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x423872=a176_0x1029,_0x5eae94=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x423872(0xc8)]()['toLowerCase']();return _0x5eae94==='1'||_0x5eae94===_0x423872(0xc2)||_0x5eae94==='yes';}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x18367e=a176_0x1029;return join(cacheRoot(),'lovrabet-cli',_0x18367e(0xc5));}async function readUpdateNoticeCache(){const _0x17be29=a176_0x1029;try{const _0x360f57=await readFile(getUpdateNoticeCachePath(),_0x17be29(0xc4)),_0x129af5=JSON[_0x17be29(0xc9)](_0x360f57);if(!_0x129af5||typeof _0x129af5!=='object')return{};return _0x129af5;}catch{return{};}}async function writeUpdateNoticeCache(_0x5aa497){const _0x3635c5=a176_0x1029;try{const _0x58de3f=getUpdateNoticeCachePath();await mkdir(dirname(_0x58de3f),{'recursive':!![]}),await writeFile(_0x58de3f,JSON['stringify'](_0x5aa497,null,0x2)+'\x0a',_0x3635c5(0xc4));}catch{}}function a176_0x4e7a(){const _0x292007=['join','true',',\x20run:\x20','utf8','update-check.json','upgradeMessage','50322UCZtbE','trim','parse','1943020CkJcQw','/v/','3fmwGdf','\x20is\x20recommended,\x20current\x20','22Odekhw','68940haIdih','stableVersion','4872NRqIpO','25CVLCuT','belowMinimum','1TIRlwm','3794fPuOuB','https://www.npmjs.com/package/','5074044XTUGvz','lastNotifiedAt','724852egAFYV','1335213GdNGKK'];a176_0x4e7a=function(){return _0x292007;};return a176_0x4e7a();}function isRecentlyNotified(_0x3918d5,_0x272e5a,_0x576cfd){const _0x48c9f9=a176_0x1029;return _0x3918d5['lastNotifiedVersion']===_0x272e5a&&typeof _0x3918d5['lastNotifiedAt']==='number'&&_0x576cfd-_0x3918d5[_0x48c9f9(0xbe)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x261de9){const _0x55172d=a176_0x1029;return _0x55172d(0xbc)+LOVRABET_NPM_PACKAGE_NAME+_0x55172d(0xcb)+_0x261de9;}export async function resolveLatestUpdateNotice(_0x456610){const _0x5580bd=a176_0x1029;if(isUpdateNoticeDisabled())return null;try{const _0x2b9a8d=Date['now'](),_0x5cfe77=_0x456610??await checkCliVersion(),_0x3f9826=_0x5cfe77['currentVersion'],_0x35b9c8=_0x5cfe77[_0x5580bd(0xd0)],_0x331b8a=await readUpdateNoticeCache();if(!_0x35b9c8||!_0x5cfe77['needsUpgrade']||_0x5cfe77[_0x5580bd(0xd3)])return null;if(isRecentlyNotified(_0x331b8a,_0x35b9c8,_0x2b9a8d))return null;const _0x236a80=getCliUpgradeCommand(_0x5cfe77);return await writeUpdateNoticeCache({..._0x331b8a,'checkedAt':_0x2b9a8d,'latest':_0x35b9c8,'failed':![],'lastNotifiedVersion':_0x35b9c8,'lastNotifiedAt':_0x2b9a8d}),{'command':_0x236a80,'current':_0x3f9826,'latest':_0x35b9c8,'url':buildNpmVersionUrl(_0x35b9c8),'message':[_0x5cfe77[_0x5580bd(0xc6)],CLI_BIN_NAME+'\x20'+_0x35b9c8+_0x5580bd(0xcd)+_0x3f9826+_0x5580bd(0xc3)+_0x236a80]['filter'](Boolean)[_0x5580bd(0xc1)]('\x20')};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x316c4f,_0x2b2da2){const _0x50a893=a177_0x5184,_0x336ee1=_0x316c4f();while(!![]){try{const _0x44a588=parseInt(_0x50a893(0x1b9))/0x1+parseInt(_0x50a893(0x1b8))/0x2+-parseInt(_0x50a893(0x1b4))/0x3*(-parseInt(_0x50a893(0x1b1))/0x4)+-parseInt(_0x50a893(0x1b6))/0x5*(parseInt(_0x50a893(0x1bc))/0x6)+-parseInt(_0x50a893(0x1b5))/0x7+parseInt(_0x50a893(0x1b2))/0x8*(parseInt(_0x50a893(0x1bb))/0x9)+parseInt(_0x50a893(0x1b0))/0xa*(-parseInt(_0x50a893(0x1b3))/0xb);if(_0x44a588===_0x2b2da2)break;else _0x336ee1['push'](_0x336ee1['shift']());}catch(_0x46c352){_0x336ee1['push'](_0x336ee1['shift']());}}}(a177_0x4583,0xc88de));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';function a177_0x5184(_0x4d9c56,_0xd96cbb){_0x4d9c56=_0x4d9c56-0x1b0;const _0x45836f=a177_0x4583();let _0x518438=_0x45836f[_0x4d9c56];return _0x518438;}function a177_0x4583(){const _0x1460d6=['5244197MvQMCs','1157465YGZGrt','slice','2189694HyEKVB','557763RYssEz','unknown','569106nZfpsH','18IYlNsI','130JhPVVf','37004nROSdz','160WCSunn','1405063bAveZY','327VUeqUN'];a177_0x4583=function(){return _0x1460d6;};return a177_0x4583();}export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x55a6b2=a177_0x5184,_0x3508ba=String(GIT_COMMIT);return _0x3508ba&&_0x3508ba!==_0x55a6b2(0x1ba)?_0x3508ba:'';}export function getCliVersionDisplay(){const _0x146749=a177_0x5184,_0x28ecbc=getCliGitCommit(),_0x21b3c2=BUILD_TIME[_0x146749(0x1b7)](0x0,0xa);if(!_0x28ecbc||!_0x21b3c2)return VERSION;return VERSION+'\x20('+_0x28ecbc+',\x20'+_0x21b3c2+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1e1aff,_0x246097){var _0x5580f7=a178_0xd159,_0x1fe181=_0x1e1aff();while(!![]){try{var _0x51ae99=-parseInt(_0x5580f7(0x11c))/0x1+parseInt(_0x5580f7(0x11b))/0x2*(parseInt(_0x5580f7(0x116))/0x3)+-parseInt(_0x5580f7(0x11a))/0x4*(parseInt(_0x5580f7(0x118))/0x5)+-parseInt(_0x5580f7(0x115))/0x6+parseInt(_0x5580f7(0x11d))/0x7+-parseInt(_0x5580f7(0x11e))/0x8+-parseInt(_0x5580f7(0x11f))/0x9*(-parseInt(_0x5580f7(0x119))/0xa);if(_0x51ae99===_0x246097)break;else _0x1fe181['push'](_0x1fe181['shift']());}catch(_0x111a0f){_0x1fe181['push'](_0x1fe181['shift']());}}}(a178_0x1e8d,0xaf181));function a178_0xd159(_0x442269,_0x4ca4e5){_0x442269=_0x442269-0x114;var _0x1e8de3=a178_0x1e8d();var _0xd1599e=_0x1e8de3[_0x442269];return _0xd1599e;}function a178_0x1e8d(){var _0x57ff79=['8208319XGjlZV','384616RgRbnY','9mSMaAJ','stderr','1772376YeXEEj','438GiTSZz','write','8765ndkgZe','6550450nYqLlh','2348GcqsPV','18952vDyFEi','1121489EuZUxr'];a178_0x1e8d=function(){return _0x57ff79;};return a178_0x1e8d();}export function writeCliSideChannelLine(_0xbc22fa){var _0x12be39=a178_0xd159;process[_0x12be39(0x114)][_0x12be39(0x117)](_0xbc22fa+'\x0a');}
|