@lovrabet/lovrabet-cli 2.3.7 → 2.3.8-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 +1 -1
- 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.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -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 +2 -2
- package/skills/lovrabet/SKILL.md +2 -2
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x252ec4,_0xedeac7){const _0x3d27c4=a158_0x27a0,_0x111ebf=_0x252ec4();while(!![]){try{const _0x329858=-parseInt(_0x3d27c4(0x13a))/0x1*(-parseInt(_0x3d27c4(0x130))/0x2)+-parseInt(_0x3d27c4(0x13f))/0x3+parseInt(_0x3d27c4(0x13d))/0x4*(-parseInt(_0x3d27c4(0x13c))/0x5)+-parseInt(_0x3d27c4(0x126))/0x6+parseInt(_0x3d27c4(0x133))/0x7+parseInt(_0x3d27c4(0x142))/0x8+-parseInt(_0x3d27c4(0x12b))/0x9;if(_0x329858===_0xedeac7)break;else _0x111ebf['push'](_0x111ebf['shift']());}catch(_0x4b80ae){_0x111ebf['push'](_0x111ebf['shift']());}}}(a158_0x5f26,0x73aaa));function a158_0x27a0(_0x1c01e1,_0x2769bb){_0x1c01e1=_0x1c01e1-0x122;const _0x5f26b8=a158_0x5f26();let _0x27a0e4=_0x5f26b8[_0x1c01e1];return _0x27a0e4;}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a158_0x5f26(){const _0x5d0e05=['hasUpstreamUpdate','2697328niPpir','Invalid\x20','version','Runtime\x20Skill\x20is\x20missing\x20skillCode.','toISOString','isArray','files','fromEntries','723984yfxzcB','utf8','personal','userId','trim','1680201YTYBtI','zipSize','manifest','path','skillCode','88886CZfhze','length','description','6538644PKYiNN','object','map','skillName','string','tags','zipSha256','13yVsWmq','forkedFromVersion','70Eubrqw','101672exMrhC','validation','2136126BuCoOM','ossPath'];a158_0x5f26=function(){return _0x5d0e05;};return a158_0x5f26();}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x24f3f3,_0x2ca3e7,_0x275e61,_0x3d45e5,_0x57d644,_0x395fd4,_0x2bbd7c){const _0x24d581=a158_0x27a0,_0x2ec8b7=_0x395fd4?normalizeLocalFiles(_0x395fd4):[],_0x5f55b7=!_0x2bbd7c&&_0x2ec8b7[_0x24d581(0x131)]>0x0?buildSkillPackage(_0x2ec8b7):undefined,_0x35ddd5=_0x2bbd7c?bufferSha256(_0x2bbd7c):_0x5f55b7?.[_0x24d581(0x12d)][_0x24d581(0x139)],_0x7bd8cd=_0x2bbd7c?.[_0x24d581(0x131)]??_0x5f55b7?.['manifest'][_0x24d581(0x12c)],_0x363b70=_0x2ec8b7[_0x24d581(0x131)]>0x0?Object[_0x24d581(0x125)](_0x2ec8b7[_0x24d581(0x135)](_0x428878=>[_0x428878[_0x24d581(0x12e)],fileHash(_0x428878)])):undefined;return{'schemaVersion':_0x2ec8b7['length']>0x0?0x2:0x1,'id':_0x24f3f3['id'],'appCode':_0x275e61,'skillCode':requireSkillCode(_0x24f3f3),'skillName':_0x24f3f3[_0x24d581(0x136)],'description':_0x24f3f3[_0x24d581(0x132)],'example':_0x24f3f3['example'],'scope':_0x2ca3e7,'readonly':_0x2ca3e7!==_0x24d581(0x128)||_0x24f3f3['readonly']===!![],'tenantCode':_0x24f3f3['tenantCode'],'userId':_0x24f3f3[_0x24d581(0x129)],'version':_0x24f3f3[_0x24d581(0x144)],'status':_0x24f3f3['status'],'tags':Array[_0x24d581(0x123)](_0x24f3f3[_0x24d581(0x138)])?_0x24f3f3[_0x24d581(0x138)]:[],'hasUpstreamUpdate':_0x24f3f3[_0x24d581(0x141)],'forkedFromSkillId':_0x24f3f3['forkedFromSkillId'],'forkedFromVersion':_0x24f3f3[_0x24d581(0x13b)],'sourceSessionId':_0x24f3f3['sourceSessionId'],'contentHash':_0x3d45e5,'fileHashes':_0x363b70,'treeHash':_0x2ec8b7[_0x24d581(0x131)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x2ec8b7)):undefined,'ossPath':remoteManifestOssPath(_0x24f3f3[_0x24d581(0x124)]),'zipSha256':_0x35ddd5,'zipSize':_0x7bd8cd,'files':_0x2ec8b7[_0x24d581(0x131)]>0x0?_0x2ec8b7['map'](_0x3a7c69=>({'path':_0x3a7c69[_0x24d581(0x12e)],'hash':fileHash(_0x3a7c69),'size':fileContent(_0x3a7c69)[_0x24d581(0x131)]})):undefined,'pulledAt':_0x57d644??new Date()[_0x24d581(0x122)]()};}export function requireSkillCode(_0xd95950){const _0x1e2f00=a158_0x27a0,_0x341db5=_0xd95950[_0x1e2f00(0x12f)]?.[_0x1e2f00(0x12a)]();if(!_0x341db5)throw CliErrors[_0x1e2f00(0x13e)](_0x1e2f00(0x145));return _0x341db5;}export function readMetadataIfPresent(_0x3e4b1f){const _0x5ba7b2=a158_0x27a0;if(!existsSync(_0x3e4b1f))return undefined;try{const _0x93ff99=JSON['parse'](readFileSync(_0x3e4b1f,_0x5ba7b2(0x127)));return _0x93ff99;}catch{throw CliErrors[_0x5ba7b2(0x13e)](_0x5ba7b2(0x143)+METADATA_FILE+':\x20'+_0x3e4b1f);}}function remoteManifestOssPath(_0x5c9ef7){const _0x351a26=a158_0x27a0;if(!_0x5c9ef7||typeof _0x5c9ef7!==_0x351a26(0x134)||Array[_0x351a26(0x123)](_0x5c9ef7))return undefined;const _0x2b7ba1=_0x5c9ef7[_0x351a26(0x140)];return typeof _0x2b7ba1===_0x351a26(0x137)&&_0x2b7ba1['trim']()?_0x2b7ba1[_0x351a26(0x12a)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a159_0x39df7f=a159_0x207c;(function(_0x1d678a,_0x2f4cf4){const _0x50d293=a159_0x207c,_0x166a77=_0x1d678a();while(!![]){try{const _0x401dd4=parseInt(_0x50d293(0xaa))/0x1+parseInt(_0x50d293(0xad))/0x2*(parseInt(_0x50d293(0xac))/0x3)+-parseInt(_0x50d293(0xaf))/0x4*(parseInt(_0x50d293(0x97))/0x5)+-parseInt(_0x50d293(0x9f))/0x6+-parseInt(_0x50d293(0xa4))/0x7+-parseInt(_0x50d293(0x9e))/0x8+-parseInt(_0x50d293(0xa9))/0x9*(-parseInt(_0x50d293(0x99))/0xa);if(_0x401dd4===_0x2f4cf4)break;else _0x166a77['push'](_0x166a77['shift']());}catch(_0x32e5a0){_0x166a77['push'](_0x166a77['shift']());}}}(a159_0x3ae8,0xa7329));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a159_0x3ae8(){const _0x4ee78b=['28KsCrtg','Unsafe\x20','116015zcVTqQ','homeDirName','90JNBgAS','\x20for\x20local\x20path:\x20','agentsSkillsDir','claudeSkillsDir','skillCode','8103856Gpsbxv','5035110rXrWHQ','path\x20segment','SKILL_ROOT','homeDir','.agents','8996526gXFIqA','includes','skills','workbuddySkillsDir','.claude','2629764IEUZjv','167078CwZGMD','trim','3563415FArguj','2zeHCZc','CLAUDE_SKILL_ROOT'];a159_0x3ae8=function(){return _0x4ee78b;};return a159_0x3ae8();}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x3852d5={}){const _0x2cd2aa=a159_0x207c,_0x3c1f1d=_0x3852d5[_0x2cd2aa(0xa2)]??homedir(),_0x1f691c=resolve(_0x3c1f1d,PRODUCT_CONFIG[_0x2cd2aa(0x98)],'cache'),_0x114223=trimmedEnv(_0x2cd2aa(0xa1)),_0xe54826=trimmedEnv(_0x2cd2aa(0xae)),_0x50232d=resolve(_0x3c1f1d,'.workbuddy'),_0x34d85d=_0x3852d5[_0x2cd2aa(0xa7)]??(existsSync(_0x50232d)?resolve(_0x50232d,_0x2cd2aa(0xa6)):undefined);return{'homeDir':_0x3c1f1d,'cacheRoot':_0x1f691c,'managedRoot':resolve(_0x3c1f1d,PRODUCT_CONFIG[_0x2cd2aa(0x98)]),'agentsSkillsDir':_0x3852d5['agentsSkillsDir']??_0x114223??resolve(_0x3c1f1d,_0x2cd2aa(0xa3),'skills'),'claudeSkillsDir':_0x3852d5[_0x2cd2aa(0x9c)]??_0xe54826??resolve(_0x3c1f1d,_0x2cd2aa(0xa8),_0x2cd2aa(0xa6)),'workbuddySkillsDir':_0x34d85d};}export function runtimeAgentSkillRoots(_0x21a70b){const _0x4e8a3d=a159_0x207c;return[_0x21a70b[_0x4e8a3d(0x9b)],_0x21a70b[_0x4e8a3d(0x9c)],_0x21a70b[_0x4e8a3d(0xa7)]]['filter'](_0x261e58=>Boolean(_0x261e58));}export function getRuntimeSkillCacheRoot(_0x514210,_0x5f2ce7,_0xce6fe4={}){const _0xa1495d=resolveSkillSyncPaths(_0xce6fe4);return resolve(_0xa1495d['cacheRoot'],_0x514210,fingerprintAccessKey(_0x5f2ce7),'skills');}export function getRuntimeSkillDir(_0x55b803,_0x47132c,_0x80938e,_0x5ac3cf,_0x281bc3,_0x2fbdea={}){const _0x3e15f9=a159_0x207c;return resolve(getRuntimeSkillCacheRoot(_0x55b803,_0x47132c,_0x2fbdea),safePathSegment(_0x80938e,'appCode'),_0x5ac3cf,safePathSegment(_0x281bc3,_0x3e15f9(0x9d)));}export function safePathSegment(_0x50a8a2,_0x20ac05=a159_0x39df7f(0xa0)){const _0x2b65a6=a159_0x39df7f;if(!_0x50a8a2||_0x50a8a2['includes']('/')||_0x50a8a2[_0x2b65a6(0xa5)]('\x5c')||_0x50a8a2[_0x2b65a6(0xa5)]('..'))throw CliErrors['validation'](_0x2b65a6(0x96)+_0x20ac05+_0x2b65a6(0x9a)+_0x50a8a2);return _0x50a8a2;}function a159_0x207c(_0x1bd29f,_0x100a20){_0x1bd29f=_0x1bd29f-0x96;const _0x3ae80c=a159_0x3ae8();let _0x207c71=_0x3ae80c[_0x1bd29f];return _0x207c71;}function trimmedEnv(_0x4e8485){const _0x56d2d2=a159_0x39df7f,_0x5b553d=productEnv(_0x4e8485)?.[_0x56d2d2(0xab)]();return _0x5b553d?_0x5b553d:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xefc03a,_0x1dc62f){const _0x3ba6e9=a160_0x1f5e,_0xf6c114=_0xefc03a();while(!![]){try{const _0x13c86e=parseInt(_0x3ba6e9(0xbf))/0x1+-parseInt(_0x3ba6e9(0xbc))/0x2+parseInt(_0x3ba6e9(0xa7))/0x3*(parseInt(_0x3ba6e9(0xa0))/0x4)+parseInt(_0x3ba6e9(0xa3))/0x5+-parseInt(_0x3ba6e9(0xca))/0x6+-parseInt(_0x3ba6e9(0x9e))/0x7*(-parseInt(_0x3ba6e9(0xa6))/0x8)+parseInt(_0x3ba6e9(0xb5))/0x9*(parseInt(_0x3ba6e9(0xc9))/0xa);if(_0x13c86e===_0x1dc62f)break;else _0xf6c114['push'](_0xf6c114['shift']());}catch(_0x4a5a54){_0xf6c114['push'](_0xf6c114['shift']());}}}(a160_0x2fc7,0x5a6b5));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';function a160_0x2fc7(){const _0x3a31da=['tags','filter','builtin','content','Invalid\x20','pushedAt','Skill\x20directory\x20not\x20found:\x20','trim','unknown','205299aryQXK','boolean','ignoreInvalidMetadata','isDirectory','packageBase64','allowAppCodeRetarget','Remote\x20Skill\x20','217068PkRAlz','path','skillCode','136018MVyQZf','example','files','startsWith','match','utf8','Skill\x20metadata\x20appCode\x20\x22','metadata','manifest','displayName','10NzghvJ','2852412aQhZwc','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','ignoreMetadataAppCodeMismatch','ignoreMetadataSkillCode','validation','\x20has\x20unsupported\x20scope\x20\x22','skillName','toLowerCase','length','Missing\x20','personal','sourceSessionId','version','\x20has\x20scope=\x22','find','isSymbolicLink','isFile','company','name','description','slice','70NGPSWg','number','1116xDTuPM','object','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','3122365aRimdV','replace','isArray','92376UCUsuF','597wJUEzp','Unable\x20to\x20resolve\x20skillCode\x20from\x20','appCode','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','scope'];a160_0x2fc7=function(){return _0x3a31da;};return a160_0x2fc7();}import{basename,resolve}from'node:path';import{parse as a160_0x159db6}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(_0x40a596,_0x27e9a5,_0x3947d4={}){const _0x1a9398=a160_0x1f5e,_0x14a6f6=resolvePushDirectoryRoot(_0x40a596),_0x3d9d4f=readPushMetadataIfPresent(resolve(_0x14a6f6,METADATA_FILE),{'ignoreInvalidMetadata':_0x3947d4[_0x1a9398(0xb7)]});if(_0x3d9d4f?.[_0x1a9398(0xa9)]&&_0x3d9d4f['appCode']!==_0x27e9a5&&!_0x3947d4[_0x1a9398(0xba)]&&!_0x3947d4[_0x1a9398(0xcc)])throw CliErrors[_0x1a9398(0xce)](_0x1a9398(0xc5)+_0x3d9d4f[_0x1a9398(0xa9)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x27e9a5+'\x22.');const _0x661fb1=resolvePushSkillCode(_0x14a6f6,_0x27e9a5,_0x3d9d4f,_0x3947d4);if(!_0x661fb1)throw CliErrors['validation'](_0x1a9398(0xa8)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x14a6f6,'skillCode':_0x661fb1,'metadata':_0x3d9d4f};}export function readPushDirectory(_0x5a45cc,_0x3c371d,_0x1fbd7a={}){const _0x4aba09=a160_0x1f5e,_0x4089a4=resolvePushDirectoryIdentity(_0x5a45cc,_0x3c371d,_0x1fbd7a),_0x5bb434=_0x4089a4['dir'],_0x74f88f=resolve(_0x5bb434,SKILL_FILE);if(!existsSync(_0x74f88f)||!lstatSync(_0x74f88f)[_0x4aba09(0x99)]())throw CliErrors[_0x4aba09(0xce)](_0x4aba09(0xd3)+SKILL_FILE+':\x20'+_0x74f88f);const _0x5b0d98=_0x4089a4[_0x4aba09(0xc6)],_0x312a67=_0x1fbd7a['targetScope']??_0x4aba09(0xd4);if(!_0x1fbd7a['ignoreMetadataScope']&&_0x5b0d98?.[_0x4aba09(0xab)]===_0x4aba09(0xae))throw CliErrors[_0x4aba09(0xce)](_0x4aba09(0xcb)+METADATA_FILE+_0x4aba09(0xd7)+_0x5b0d98['scope']+'\x22.');if(!_0x1fbd7a['ignoreMetadataScope']&&_0x312a67==='personal'&&_0x5b0d98?.['scope']&&_0x5b0d98[_0x4aba09(0xab)]!==_0x4aba09(0xd4))throw CliErrors[_0x4aba09(0xce)](_0x4aba09(0xa2)+METADATA_FILE+_0x4aba09(0xd7)+_0x5b0d98[_0x4aba09(0xab)]+'\x22.',_0x4aba09(0xaa)+_0x5bb434+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x2d62ec=scanSkillDirectory(_0x5bb434,{'excludedFilePaths':_0x1fbd7a['excludedFilePaths']}),_0x3e36d4=buildSkillPackage(_0x2d62ec),_0x53f456=readFileSync(_0x74f88f,_0x4aba09(0xc4)),_0x5914e4=_0x4089a4['skillCode'],_0x440f86=_0x1fbd7a['ignoreMetadataForPayload']?undefined:_0x5b0d98,_0x9ae4cc=readSkillDisplayName(_0x53f456);return{'skillCode':_0x5914e4,'metadata':_0x5b0d98,'frontmatterDisplayName':_0x9ae4cc,'input':{'skillCode':_0x5914e4,'skillName':_0x9ae4cc??_0x440f86?.[_0x4aba09(0xd0)],'description':_0x440f86?.['description'],'content':_0x53f456,'files':_0x3e36d4[_0x4aba09(0xc7)],'packageBase64':_0x3e36d4[_0x4aba09(0xb9)],'tags':_0x440f86?.[_0x4aba09(0xac)],'version':_0x440f86?.[_0x4aba09(0xd6)],'sourceSessionId':_0x440f86?.[_0x4aba09(0xd5)]}};}export function refreshPushDirectoryMetadataFromRemote(_0xc9d13d,_0x4029db,_0x1ec758,_0x45c04f={}){const _0x4f6e6c=a160_0x1f5e,_0x5bd01f=resolvePushDirectoryRoot(_0xc9d13d),_0x94e275=readPushMetadataIfPresent(resolve(_0x5bd01f,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x13daab=requireRemoteScope(_0x4029db),_0x59c72f=readLocalSkillContent(_0x5bd01f),_0xdde965={..._0x4029db,'appCode':_0x4029db[_0x4f6e6c(0xa9)]??_0x1ec758,'skillName':_0x4029db[_0x4f6e6c(0xd0)]??_0x94e275?.[_0x4f6e6c(0xd0)],'description':_0x4029db['description']??_0x94e275?.[_0x4f6e6c(0x9c)],'example':_0x4029db[_0x4f6e6c(0xc0)]??_0x94e275?.[_0x4f6e6c(0xc0)],'tags':Array[_0x4f6e6c(0xa5)](_0x4029db['tags'])?_0x4029db[_0x4f6e6c(0xac)]:_0x94e275?.[_0x4f6e6c(0xac)],'sourceSessionId':_0x4029db[_0x4f6e6c(0xd5)]??_0x94e275?.[_0x4f6e6c(0xd5)],'content':_0x4029db[_0x4f6e6c(0xaf)]??_0x59c72f},_0x3bb449=buildMetadata(_0xdde965,_0x13daab,_0x1ec758,contentHash(_0x59c72f),_0x45c04f['refreshedAt']);writeJsonAtomic(resolve(_0x5bd01f,METADATA_FILE),_0x3bb449);}export function recordPushedRuntimeSkill(_0xb2c13c,_0xf32298,_0x79e4a6,_0x262ec0={}){const _0x4f2ad5=a160_0x1f5e,_0x26f315=resolvePushDirectoryRoot(_0xb2c13c),_0x485248=scanSkillDirectory(_0x26f315),_0x59df8a=_0x485248[_0x4f2ad5(0x97)](_0x45df2f=>_0x45df2f[_0x4f2ad5(0xbd)]===SKILL_FILE),_0x38cf1a=_0x59df8a?fileText(_0x59df8a):'',_0x454ee2=tryNormalizePackageManifest(_0xf32298['files']),_0x25b01b={..._0xf32298,'content':_0xf32298[_0x4f2ad5(0xaf)]??_0x38cf1a,'files':_0x454ee2},_0x145eeb=_0x454ee2?normalizeLocalFiles(_0x485248)[_0x4f2ad5(0xad)](_0x8b874f=>_0x454ee2[_0x4f2ad5(0xc1)]['some'](_0x514997=>_0x514997['path']===_0x8b874f['path'])):undefined,_0x392240=buildMetadata(_0x25b01b,_0x262ec0[_0x4f2ad5(0xab)]??'personal',_0x79e4a6,contentHash(_0x25b01b[_0x4f2ad5(0xaf)]??''),_0x262ec0[_0x4f2ad5(0xb1)],_0x145eeb);writeJsonAtomic(resolve(_0x26f315,METADATA_FILE),_0x392240);}export function deriveSkillCodeFromDirectory(_0x560e25,_0x8c7041){const _0x519d90=a160_0x1f5e,_0x3fe3e2=basename(resolve(_0x560e25)),_0x42f27e=_0x8c7041+'--';return _0x3fe3e2[_0x519d90(0xc2)](_0x42f27e)?_0x3fe3e2[_0x519d90(0x9d)](_0x42f27e[_0x519d90(0xd2)]):_0x3fe3e2;}function resolvePushSkillCode(_0x1fec46,_0x1c25ce,_0xd508d7,_0x167272){const _0x2aa7f0=a160_0x1f5e,_0x35e374=deriveSkillCodeFromSkillFile(_0x1fec46)||deriveSkillCodeFromDirectory(_0x1fec46,_0x1c25ce);if(_0x167272[_0x2aa7f0(0xcd)])return _0x35e374;return _0xd508d7?.[_0x2aa7f0(0xbe)]?.[_0x2aa7f0(0xb3)]()||_0x35e374;}function deriveSkillCodeFromSkillFile(_0x46a7d7){const _0x58bbd7=a160_0x1f5e,_0x49cfd9=resolve(_0x46a7d7,SKILL_FILE);if(!existsSync(_0x49cfd9)||!lstatSync(_0x49cfd9)['isFile']())return undefined;const _0xfee15c=readFileSync(_0x49cfd9,'utf8'),_0x132bb7=_0xfee15c[_0x58bbd7(0xc3)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x132bb7)return undefined;const _0x581f54=parseFrontmatterObject(_0x132bb7[0x1]??''),_0xbfb946=scalarToString(_0x581f54?.[_0x58bbd7(0x9b)]);return _0xbfb946?slugifySkillName(_0xbfb946):undefined;}function readSkillDisplayName(_0x55543f){const _0x53a70b=a160_0x1f5e,_0x3d2d45=_0x55543f[_0x53a70b(0xc3)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3d2d45)return undefined;const _0x3b7d43=parseFrontmatterObject(_0x3d2d45[0x1]??'');return scalarToString(_0x3b7d43?.[_0x53a70b(0xc8)]);}function a160_0x1f5e(_0xdf3ba7,_0x5059a2){_0xdf3ba7=_0xdf3ba7-0x97;const _0x2fc765=a160_0x2fc7();let _0x1f5ed1=_0x2fc765[_0xdf3ba7];return _0x1f5ed1;}function slugifySkillName(_0x53954c){const _0xc77f73=a160_0x1f5e,_0x235da1=_0x53954c[_0xc77f73(0xb3)]()[_0xc77f73(0xd1)]()[_0xc77f73(0xa4)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0xc77f73(0xa4)](/-+$/,'')[_0xc77f73(0xa4)](/-{2,}/g,'-');if(!_0x235da1)throw CliErrors[_0xc77f73(0xce)](_0xc77f73(0xb0)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x235da1;}function parseFrontmatterObject(_0x6f733d){const _0x572c1=a160_0x1f5e;try{const _0x377c33=a160_0x159db6(_0x6f733d);return _0x377c33&&typeof _0x377c33===_0x572c1(0xa1)&&!Array[_0x572c1(0xa5)](_0x377c33)?_0x377c33:undefined;}catch{return undefined;}}function scalarToString(_0x380c0d){const _0x9dbb23=a160_0x1f5e;if(typeof _0x380c0d==='string')return _0x380c0d['trim']();if(typeof _0x380c0d===_0x9dbb23(0x9f)||typeof _0x380c0d===_0x9dbb23(0xb6))return String(_0x380c0d);return undefined;}function resolvePushDirectoryRoot(_0x413fa8){const _0x5007e0=a160_0x1f5e,_0xbc1aed=resolve(_0x413fa8);if(!existsSync(_0xbc1aed))throw CliErrors[_0x5007e0(0xce)](_0x5007e0(0xb2)+_0x413fa8);const _0x1e51ba=lstatSync(_0xbc1aed);if(_0x1e51ba[_0x5007e0(0xb8)]())return _0xbc1aed;if(_0x1e51ba[_0x5007e0(0x98)]()){const _0x4738ed=realpathSync(_0xbc1aed);if(lstatSync(_0x4738ed)[_0x5007e0(0xb8)]())return _0x4738ed;}throw CliErrors[_0x5007e0(0xce)](_0x5007e0(0xb2)+_0x413fa8);}function requireRemoteScope(_0x53b0ae){const _0x55ef16=a160_0x1f5e;if(_0x53b0ae[_0x55ef16(0xab)]===_0x55ef16(0xd4)||_0x53b0ae[_0x55ef16(0xab)]===_0x55ef16(0x9a)||_0x53b0ae[_0x55ef16(0xab)]==='builtin')return _0x53b0ae[_0x55ef16(0xab)];throw CliErrors[_0x55ef16(0xce)](_0x55ef16(0xbb)+(_0x53b0ae[_0x55ef16(0xbe)]||'(unknown)')+_0x55ef16(0xcf)+(_0x53b0ae['scope']??_0x55ef16(0xb4))+'\x22.');}function readLocalSkillContent(_0x3ac269){const _0x3a39ab=a160_0x1f5e,_0xfa56e=resolve(_0x3ac269,SKILL_FILE);return existsSync(_0xfa56e)&&lstatSync(_0xfa56e)[_0x3a39ab(0x99)]()?readFileSync(_0xfa56e,_0x3a39ab(0xc4)):'';}function readPushMetadataIfPresent(_0x262b4c,_0x35b705={}){const _0x3a79d6=a160_0x1f5e;try{return readMetadataIfPresent(_0x262b4c);}catch(_0x2f4f31){if(_0x35b705[_0x3a79d6(0xb7)])return undefined;throw _0x2f4f31;}}
|
|
1
|
+
function a160_0x477f(_0x234720,_0xbb1967){_0x234720=_0x234720-0xaa;const _0x25a98e=a160_0x25a9();let _0x477f47=_0x25a98e[_0x234720];return _0x477f47;}(function(_0x16a041,_0x122a9c){const _0x265732=a160_0x477f,_0x38953f=_0x16a041();while(!![]){try{const _0x507992=parseInt(_0x265732(0xda))/0x1+parseInt(_0x265732(0xbc))/0x2*(parseInt(_0x265732(0xd0))/0x3)+-parseInt(_0x265732(0xc5))/0x4+-parseInt(_0x265732(0xd7))/0x5*(parseInt(_0x265732(0xd1))/0x6)+parseInt(_0x265732(0xce))/0x7+-parseInt(_0x265732(0xab))/0x8+-parseInt(_0x265732(0xca))/0x9*(-parseInt(_0x265732(0xcf))/0xa);if(_0x507992===_0x122a9c)break;else _0x38953f['push'](_0x38953f['shift']());}catch(_0x239724){_0x38953f['push'](_0x38953f['shift']());}}}(a160_0x25a9,0xdb02c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a160_0x1c0ec0}from'yaml';function a160_0x25a9(){const _0x325d9b=['path','3486406ROzJea','5958780KvpIJm','918726mxqyti','2884776DOjzJx','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','filter','skillName','appCode','utf8','5SYkGnd','description','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','841846uAiwXV','ignoreMetadataScope','allowAppCodeRetarget','length','isFile','content','startsWith','builtin','sourceSessionId','ignoreMetadataAppCodeMismatch','metadata','pushedAt','number','displayName','isArray','refreshedAt','dir','validation','Missing\x20','13929552cwDwPu','name','Skill\x20directory\x20not\x20found:\x20','manifest','skillCode','trim','Remote\x20Skill\x20','find','Invalid\x20','slice','some','isSymbolicLink','example','Unable\x20to\x20resolve\x20skillCode\x20from\x20','\x20name\x20for\x20SkillHub\x20slug\x20generation.','scope','unknown','4tzRjXd','ignoreInvalidMetadata','match','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','files','packageBase64','excludedFilePaths','company','\x20has\x20scope=\x22','2483856aJyVmS','replace','personal','isDirectory','tags','27rXcSvq','\x20to\x20submit\x20company\x20Skills\x20for\x20review.',',\x20or\x20directory\x20name.'];a160_0x25a9=function(){return _0x325d9b;};return a160_0x25a9();}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(_0x4a6c0b,_0x4522fa,_0x562d04={}){const _0xb643ea=a160_0x477f,_0x463df7=resolvePushDirectoryRoot(_0x4a6c0b),_0x4ceb9a=readPushMetadataIfPresent(resolve(_0x463df7,METADATA_FILE),{'ignoreInvalidMetadata':_0x562d04[_0xb643ea(0xbd)]});if(_0x4ceb9a?.[_0xb643ea(0xd5)]&&_0x4ceb9a[_0xb643ea(0xd5)]!==_0x4522fa&&!_0x562d04[_0xb643ea(0xdc)]&&!_0x562d04[_0xb643ea(0xe3)])throw CliErrors['validation']('Skill\x20metadata\x20appCode\x20\x22'+_0x4ceb9a[_0xb643ea(0xd5)]+_0xb643ea(0xbf)+_0x4522fa+'\x22.');const _0x57c8b1=resolvePushSkillCode(_0x463df7,_0x4522fa,_0x4ceb9a,_0x562d04);if(!_0x57c8b1)throw CliErrors['validation'](_0xb643ea(0xb8)+SKILL_FILE+',\x20'+METADATA_FILE+_0xb643ea(0xcc));return{'dir':_0x463df7,'skillCode':_0x57c8b1,'metadata':_0x4ceb9a};}export function readPushDirectory(_0x383b5c,_0x4b170f,_0x4c22ce={}){const _0x112868=a160_0x477f,_0x19e752=resolvePushDirectoryIdentity(_0x383b5c,_0x4b170f,_0x4c22ce),_0x31fe8c=_0x19e752[_0x112868(0xea)],_0x426965=resolve(_0x31fe8c,SKILL_FILE);if(!existsSync(_0x426965)||!lstatSync(_0x426965)[_0x112868(0xde)]())throw CliErrors['validation'](_0x112868(0xaa)+SKILL_FILE+':\x20'+_0x426965);const _0x1158a9=_0x19e752[_0x112868(0xe4)],_0x25d74b=_0x4c22ce['targetScope']??_0x112868(0xc7);if(!_0x4c22ce[_0x112868(0xdb)]&&_0x1158a9?.[_0x112868(0xba)]===_0x112868(0xe1))throw CliErrors['validation']('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x112868(0xc4)+_0x1158a9[_0x112868(0xba)]+'\x22.');if(!_0x4c22ce[_0x112868(0xdb)]&&_0x25d74b===_0x112868(0xc7)&&_0x1158a9?.[_0x112868(0xba)]&&_0x1158a9[_0x112868(0xba)]!=='personal')throw CliErrors['validation'](_0x112868(0xd9)+METADATA_FILE+_0x112868(0xc4)+_0x1158a9[_0x112868(0xba)]+'\x22.',_0x112868(0xd2)+_0x31fe8c+_0x112868(0xcb));const _0x43b95c=scanSkillDirectory(_0x31fe8c,{'excludedFilePaths':_0x4c22ce[_0x112868(0xc2)]}),_0x44e9a7=buildSkillPackage(_0x43b95c),_0xa0bb1c=readFileSync(_0x426965,_0x112868(0xd6)),_0x56c9b5=_0x19e752[_0x112868(0xaf)],_0x2f87e4=_0x4c22ce['ignoreMetadataForPayload']?undefined:_0x1158a9,_0x1fc202=readSkillDisplayName(_0xa0bb1c);return{'skillCode':_0x56c9b5,'metadata':_0x1158a9,'frontmatterDisplayName':_0x1fc202,'input':{'skillCode':_0x56c9b5,'skillName':_0x1fc202??_0x2f87e4?.['skillName'],'description':_0x2f87e4?.['description'],'content':_0xa0bb1c,'files':_0x44e9a7[_0x112868(0xae)],'packageBase64':_0x44e9a7[_0x112868(0xc1)],'tags':_0x2f87e4?.[_0x112868(0xc9)],'version':_0x2f87e4?.['version'],'sourceSessionId':_0x2f87e4?.[_0x112868(0xe2)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x1a726f,_0xaa727a,_0x28d999,_0x369ec2={}){const _0x1c47da=a160_0x477f,_0x532b53=resolvePushDirectoryRoot(_0x1a726f),_0x4f184c=readPushMetadataIfPresent(resolve(_0x532b53,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2eba4c=requireRemoteScope(_0xaa727a),_0x4e3c85=readLocalSkillContent(_0x532b53),_0x133fb3={..._0xaa727a,'appCode':_0xaa727a[_0x1c47da(0xd5)]??_0x28d999,'skillName':_0xaa727a[_0x1c47da(0xd4)]??_0x4f184c?.['skillName'],'description':_0xaa727a[_0x1c47da(0xd8)]??_0x4f184c?.['description'],'example':_0xaa727a[_0x1c47da(0xb7)]??_0x4f184c?.[_0x1c47da(0xb7)],'tags':Array[_0x1c47da(0xe8)](_0xaa727a[_0x1c47da(0xc9)])?_0xaa727a['tags']:_0x4f184c?.[_0x1c47da(0xc9)],'sourceSessionId':_0xaa727a[_0x1c47da(0xe2)]??_0x4f184c?.[_0x1c47da(0xe2)],'content':_0xaa727a[_0x1c47da(0xdf)]??_0x4e3c85},_0xc1e0fb=buildMetadata(_0x133fb3,_0x2eba4c,_0x28d999,contentHash(_0x4e3c85),_0x369ec2[_0x1c47da(0xe9)]);writeJsonAtomic(resolve(_0x532b53,METADATA_FILE),_0xc1e0fb);}export function recordPushedRuntimeSkill(_0x211128,_0x325c39,_0x307faf,_0x311653={}){const _0x1a568b=a160_0x477f,_0x19ded9=resolvePushDirectoryRoot(_0x211128),_0x13c4a4=scanSkillDirectory(_0x19ded9),_0x56d5c7=_0x13c4a4[_0x1a568b(0xb2)](_0x2837b0=>_0x2837b0['path']===SKILL_FILE),_0x20786b=_0x56d5c7?fileText(_0x56d5c7):'',_0x59e6f3=tryNormalizePackageManifest(_0x325c39[_0x1a568b(0xc0)]),_0x1c1ce2={..._0x325c39,'content':_0x325c39[_0x1a568b(0xdf)]??_0x20786b,'files':_0x59e6f3},_0x47da1c=_0x59e6f3?normalizeLocalFiles(_0x13c4a4)[_0x1a568b(0xd3)](_0x4a0d2a=>_0x59e6f3[_0x1a568b(0xc0)][_0x1a568b(0xb5)](_0x2bcdf0=>_0x2bcdf0[_0x1a568b(0xcd)]===_0x4a0d2a[_0x1a568b(0xcd)])):undefined,_0x23b01c=buildMetadata(_0x1c1ce2,_0x311653[_0x1a568b(0xba)]??_0x1a568b(0xc7),_0x307faf,contentHash(_0x1c1ce2[_0x1a568b(0xdf)]??''),_0x311653[_0x1a568b(0xe5)],_0x47da1c);writeJsonAtomic(resolve(_0x19ded9,METADATA_FILE),_0x23b01c);}export function deriveSkillCodeFromDirectory(_0x21bb99,_0x509d11){const _0x10d0fa=a160_0x477f,_0x58d545=basename(resolve(_0x21bb99)),_0x4a68b4=_0x509d11+'--';return _0x58d545[_0x10d0fa(0xe0)](_0x4a68b4)?_0x58d545[_0x10d0fa(0xb4)](_0x4a68b4[_0x10d0fa(0xdd)]):_0x58d545;}function resolvePushSkillCode(_0x42245b,_0x327069,_0x24be39,_0x33c847){const _0x516eac=a160_0x477f,_0x4d2519=deriveSkillCodeFromSkillFile(_0x42245b)||deriveSkillCodeFromDirectory(_0x42245b,_0x327069);if(_0x33c847['ignoreMetadataSkillCode'])return _0x4d2519;return _0x24be39?.[_0x516eac(0xaf)]?.[_0x516eac(0xb0)]()||_0x4d2519;}function deriveSkillCodeFromSkillFile(_0x50fe41){const _0xdda977=a160_0x477f,_0x286be8=resolve(_0x50fe41,SKILL_FILE);if(!existsSync(_0x286be8)||!lstatSync(_0x286be8)['isFile']())return undefined;const _0xffebe8=readFileSync(_0x286be8,_0xdda977(0xd6)),_0x1a9e31=_0xffebe8[_0xdda977(0xbe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1a9e31)return undefined;const _0x2729fd=parseFrontmatterObject(_0x1a9e31[0x1]??''),_0x201e1a=scalarToString(_0x2729fd?.[_0xdda977(0xac)]);return _0x201e1a?slugifySkillName(_0x201e1a):undefined;}function readSkillDisplayName(_0x284804){const _0x2cc717=a160_0x477f,_0x4776cd=_0x284804['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4776cd)return undefined;const _0x43c000=parseFrontmatterObject(_0x4776cd[0x1]??'');return scalarToString(_0x43c000?.[_0x2cc717(0xe7)]);}function slugifySkillName(_0x5dcae9){const _0x48fc54=a160_0x477f,_0x377171=_0x5dcae9[_0x48fc54(0xb0)]()['toLowerCase']()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x48fc54(0xc6)](/^-+/,'')[_0x48fc54(0xc6)](/-+$/,'')[_0x48fc54(0xc6)](/-{2,}/g,'-');if(!_0x377171)throw CliErrors['validation'](_0x48fc54(0xb3)+SKILL_FILE+_0x48fc54(0xb9));return _0x377171;}function parseFrontmatterObject(_0x216387){const _0x2ea911=a160_0x477f;try{const _0x26c824=a160_0x1c0ec0(_0x216387);return _0x26c824&&typeof _0x26c824==='object'&&!Array[_0x2ea911(0xe8)](_0x26c824)?_0x26c824:undefined;}catch{return undefined;}}function scalarToString(_0x5a39b2){const _0x3bdaf4=a160_0x477f;if(typeof _0x5a39b2==='string')return _0x5a39b2[_0x3bdaf4(0xb0)]();if(typeof _0x5a39b2===_0x3bdaf4(0xe6)||typeof _0x5a39b2==='boolean')return String(_0x5a39b2);return undefined;}function resolvePushDirectoryRoot(_0x581074){const _0x9868e4=a160_0x477f,_0x12e72=resolve(_0x581074);if(!existsSync(_0x12e72))throw CliErrors[_0x9868e4(0xeb)](_0x9868e4(0xad)+_0x581074);const _0x50393f=lstatSync(_0x12e72);if(_0x50393f['isDirectory']())return _0x12e72;if(_0x50393f[_0x9868e4(0xb6)]()){const _0x39e8a0=realpathSync(_0x12e72);if(lstatSync(_0x39e8a0)[_0x9868e4(0xc8)]())return _0x39e8a0;}throw CliErrors['validation'](_0x9868e4(0xad)+_0x581074);}function requireRemoteScope(_0x137eda){const _0x5ae9f3=a160_0x477f;if(_0x137eda['scope']==='personal'||_0x137eda['scope']===_0x5ae9f3(0xc3)||_0x137eda[_0x5ae9f3(0xba)]===_0x5ae9f3(0xe1))return _0x137eda[_0x5ae9f3(0xba)];throw CliErrors['validation'](_0x5ae9f3(0xb1)+(_0x137eda[_0x5ae9f3(0xaf)]||'(unknown)')+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x137eda[_0x5ae9f3(0xba)]??_0x5ae9f3(0xbb))+'\x22.');}function readLocalSkillContent(_0x190d8c){const _0xcba404=a160_0x477f,_0x59a817=resolve(_0x190d8c,SKILL_FILE);return existsSync(_0x59a817)&&lstatSync(_0x59a817)['isFile']()?readFileSync(_0x59a817,_0xcba404(0xd6)):'';}function readPushMetadataIfPresent(_0x4ad920,_0x115035={}){const _0xa2ee09=a160_0x477f;try{return readMetadataIfPresent(_0x4ad920);}catch(_0x59e97f){if(_0x115035[_0xa2ee09(0xbd)])return undefined;throw _0x59e97f;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x19597f,_0x9c6d43){const _0x5a6820=a161_0x5a13,_0xeee222=_0x19597f();while(!![]){try{const _0x392f39=-parseInt(_0x5a6820(0x109))/0x1*(-parseInt(_0x5a6820(0x10d))/0x2)+-parseInt(_0x5a6820(0x10b))/0x3*(-parseInt(_0x5a6820(0x108))/0x4)+-parseInt(_0x5a6820(0x106))/0x5+-parseInt(_0x5a6820(0x10a))/0x6+parseInt(_0x5a6820(0x10c))/0x7+-parseInt(_0x5a6820(0x101))/0x8*(-parseInt(_0x5a6820(0x105))/0x9)+-parseInt(_0x5a6820(0x100))/0xa;if(_0x392f39===_0x9c6d43)break;else _0xeee222['push'](_0xeee222['shift']());}catch(_0x9e3a72){_0xeee222['push'](_0xeee222['shift']());}}}(a161_0x2d81,0x52414));import{CliErrors}from'../../errors.js';function a161_0x5a13(_0x422221,_0x5cb00c){_0x422221=_0x422221-0x100;const _0x2d8154=a161_0x2d81();let _0x5a1384=_0x2d8154[_0x422221];return _0x5a1384;}function a161_0x2d81(){const _0x502e82=['validation','includes','10109440yPETlX','80XCgFfA','length','personal','company','520110iWUhKE','347045kjwiPV','builtin','12MbIUvs','227BNlssA','2246166lKVaNV','534708CdNhaq','4332069YbvGPL','530dLqDvU'];a161_0x2d81=function(){return _0x502e82;};return a161_0x2d81();}export function normalizeRuntimeSkillScopes(_0x48e2bd){const _0x195b80=a161_0x5a13,_0x1f4174=_0x48e2bd&&_0x48e2bd[_0x195b80(0x102)]>0x0?_0x48e2bd:[_0x195b80(0x103),_0x195b80(0x104),_0x195b80(0x107)],_0x31aab5=[];for(const _0x15860d of _0x1f4174){if(!isRuntimeSkillScope(_0x15860d))throw CliErrors[_0x195b80(0x10e)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x15860d);!_0x31aab5[_0x195b80(0x10f)](_0x15860d)&&_0x31aab5['push'](_0x15860d);}return _0x31aab5;}export function isRuntimeSkillScope(_0x202d07){const _0x128110=a161_0x5a13;return _0x202d07===_0x128110(0x103)||_0x202d07==='company'||_0x202d07===_0x128110(0x107);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a163_0x1980(_0xf6f81b,_0x52e16f){_0xf6f81b=_0xf6f81b-0x15c;const _0xd8ca0e=a163_0xd8ca();let _0x1980cd=_0xd8ca0e[_0xf6f81b];return _0x1980cd;}const a163_0x103653=a163_0x1980;(function(_0x3a6000,_0x305fe5){const _0x2ee665=a163_0x1980,_0x53af65=_0x3a6000();while(!![]){try{const _0xd365c2=parseInt(_0x2ee665(0x15d))/0x1*(-parseInt(_0x2ee665(0x169))/0x2)+parseInt(_0x2ee665(0x16f))/0x3+parseInt(_0x2ee665(0x172))/0x4*(-parseInt(_0x2ee665(0x165))/0x5)+parseInt(_0x2ee665(0x16c))/0x6*(-parseInt(_0x2ee665(0x168))/0x7)+-parseInt(_0x2ee665(0x166))/0x8*(-parseInt(_0x2ee665(0x161))/0x9)+-parseInt(_0x2ee665(0x160))/0xa+parseInt(_0x2ee665(0x167))/0xb;if(_0xd365c2===_0x305fe5)break;else _0x53af65['push'](_0x53af65['shift']());}catch(_0x464d88){_0x53af65['push'](_0x53af65['shift']());}}}(a163_0xd8ca,0x5a5c5));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a163_0x103653(0x170));function a163_0xd8ca(){const _0x4cc825=['43085tMsXwI','8KSwPcq','12895498irLYJX','30499GdeHVL','33452aRlKKE','endsWith','code','588WkPaLw','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','from','384747kpggnv','1980-01-01T00:00:00.000Z','validation_error','308FtAGmD','name','entries','map','1dBdHkN','object','validation','3878380CTsUxi','5081481aloeZg','length','sort','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'];a163_0xd8ca=function(){return _0x4cc825;};return a163_0xd8ca();}export function createDeterministicZipPackage(_0x315ac9){const _0x36867e=a163_0x103653,_0x278535={};for(const _0x387342 of normalizeLocalFiles(_0x315ac9)){_0x278535[_0x387342['path']]=fileContent(_0x387342);}return Buffer[_0x36867e(0x16e)](zipSync(_0x278535,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x214e77){const _0x56d21f=a163_0x103653;if(_0x214e77[_0x56d21f(0x162)]<0x16)throw CliErrors['validation'](_0x56d21f(0x16d));let _0x559efc;try{_0x559efc=unzipSync(_0x214e77,{'filter'(_0x4e29e0){const _0x19ca23=_0x56d21f,_0x3f7e59=normalizeSkillRelativePath(_0x4e29e0[_0x19ca23(0x173)]);if(_0x3f7e59[_0x19ca23(0x16a)]('/'))throw CliErrors['validation'](_0x19ca23(0x164)+_0x3f7e59);return!![];}});}catch(_0x3940cf){if(isRuntimeSkillValidationError(_0x3940cf))throw _0x3940cf;throw CliErrors[_0x56d21f(0x15f)](_0x56d21f(0x16d));}return Object[_0x56d21f(0x174)](_0x559efc)[_0x56d21f(0x15c)](([_0x5ba932,_0x25460e])=>({'path':normalizeSkillRelativePath(_0x5ba932),'bytes':Buffer[_0x56d21f(0x16e)](_0x25460e)}))[_0x56d21f(0x163)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x188ef0){const _0x3e8bcc=a163_0x103653;return typeof _0x188ef0===_0x3e8bcc(0x15e)&&_0x188ef0!==null&&_0x3e8bcc(0x16b)in _0x188ef0&&_0x188ef0['code']===_0x3e8bcc(0x171);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ab386,_0x98646e){const _0x290c3b=a164_0x4564,_0x2a0f55=_0x5ab386();while(!![]){try{const _0x34568c=parseInt(_0x290c3b(0xa6))/0x1*(-parseInt(_0x290c3b(0xb5))/0x2)+parseInt(_0x290c3b(0xac))/0x3+-parseInt(_0x290c3b(0xa1))/0x4+-parseInt(_0x290c3b(0xc9))/0x5+-parseInt(_0x290c3b(0x9f))/0x6+parseInt(_0x290c3b(0xb9))/0x7+parseInt(_0x290c3b(0xc2))/0x8;if(_0x34568c===_0x98646e)break;else _0x2a0f55['push'](_0x2a0f55['shift']());}catch(_0x2cd60f){_0x2a0f55['push'](_0x2a0f55['shift']());}}}(a164_0x581d,0xd8907));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 a164_0x4564(_0x47007e,_0x3c177d){_0x47007e=_0x47007e-0x9c;const _0x581d1a=a164_0x581d();let _0x456487=_0x581d1a[_0x47007e];return _0x456487;}export function buildSkillPackage(_0xe86694){const _0x243223=a164_0x4564,_0x3bc5ef=normalizeLocalFiles(_0xe86694);if(!_0x3bc5ef[_0x243223(0xb6)](_0x58c8a4=>_0x58c8a4[_0x243223(0xbb)]===SKILL_FILE))throw CliErrors['validation'](_0x243223(0xa5)+SKILL_FILE+_0x243223(0xb1));const _0x2b2e4e=localFilesToManifestFiles(_0x3bc5ef),_0x141282=createDeterministicZipPackage(_0x3bc5ef);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x2b2e4e),'zipSha256':bufferSha256(_0x141282),'zipSize':_0x141282[_0x243223(0xc4)],'files':_0x2b2e4e},'packageBytes':_0x141282,'packageBase64':_0x141282['toString'](_0x243223(0xaa))};}export function verifyRuntimeSkillPackage(_0x317cbf,_0xaf8e88){const _0x5d14fb=a164_0x4564,_0x44884d=normalizePackageManifest(_0x317cbf,{'requireOssPath':![]});if(!_0x44884d)throw CliErrors[_0x5d14fb(0xa4)](_0x5d14fb(0xc7));return extractAndVerifyPackage(_0x44884d,_0xaf8e88);}export function verifyRuntimeSkillBundle(_0x1e28ee,_0x4257c1){const _0x5bffb9=a164_0x4564,_0x1ce639=normalizePackageManifest(_0x1e28ee,{'requireOssPath':![]});if(!_0x1ce639)throw CliErrors['validation'](_0x5bffb9(0xc7));return extractAndVerifyPackageFiles(_0x1ce639,_0x4257c1);}export function tryNormalizePackageManifest(_0x2d75d2){return normalizePackageManifest(_0x2d75d2,{'requireOssPath':![]});}export function requirePackageBytes(_0x4a6169,_0x47b12b){const _0x33588=a164_0x4564;if(!_0x47b12b||_0x47b12b[_0x33588(0xc4)]===0x0)throw CliErrors[_0x33588(0xa4)](_0x33588(0x9c)+_0x4a6169);return _0x47b12b;}export function extractDownloadedPackage(_0x5f4386){const _0xd202fc=a164_0x4564,_0x1af52e=parseZipPackage(_0x5f4386)[_0xd202fc(0xa3)](_0x60f491=>({'path':_0x60f491[_0xd202fc(0xbb)],'bytes':_0x60f491[_0xd202fc(0xca)]}));if(!_0x1af52e[_0xd202fc(0xb6)](_0x479e84=>_0x479e84[_0xd202fc(0xbb)]===SKILL_FILE))throw CliErrors[_0xd202fc(0xa4)](_0xd202fc(0xbc)+SKILL_FILE+'.');return normalizeLocalFiles(_0x1af52e);}export function localFilesToManifestFiles(_0x254ee7){const _0x38f3c8=a164_0x4564;return normalizeLocalFiles(_0x254ee7)['map'](_0x2d4927=>({'path':_0x2d4927['path'],'sha256':fileHash(_0x2d4927),'size':fileContent(_0x2d4927)[_0x38f3c8(0xc4)]}));}function normalizePackageManifest(_0x3c632b,_0x431096){const _0x3fcae2=a164_0x4564;if(!_0x3c632b||typeof _0x3c632b!==_0x3fcae2(0xae)||Array[_0x3fcae2(0xad)](_0x3c632b))return undefined;const _0x345904=_0x3c632b,_0x525f81=typeof _0x345904[_0x3fcae2(0xa9)]===_0x3fcae2(0xa8)?_0x345904[_0x3fcae2(0xa9)][_0x3fcae2(0xb3)]():undefined;if(_0x431096[_0x3fcae2(0xaf)]&&!_0x525f81)return undefined;if(!Array['isArray'](_0x345904[_0x3fcae2(0xc6)])||_0x345904['files'][_0x3fcae2(0xc4)]===0x0)return undefined;if(!isSha256Hex(_0x345904[_0x3fcae2(0xab)]))throw CliErrors['validation'](_0x3fcae2(0xb2));if(!isSha256Hex(_0x345904['zipSha256']))throw CliErrors['validation'](_0x3fcae2(0xc5));if(!Number['isSafeInteger'](_0x345904[_0x3fcae2(0xa2)])||_0x345904[_0x3fcae2(0xa2)]<0x0)throw CliErrors[_0x3fcae2(0xa4)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0x11796e=normalizeManifestFiles(_0x345904[_0x3fcae2(0xc6)]);if(!_0x11796e[_0x3fcae2(0xb6)](_0x2f0878=>_0x2f0878[_0x3fcae2(0xbb)]===SKILL_FILE))throw CliErrors[_0x3fcae2(0xa4)](_0x3fcae2(0xb7)+SKILL_FILE+'.');const _0xdca4ed=fileTreeHash(_0x11796e);if(_0xdca4ed!==_0x345904[_0x3fcae2(0xab)][_0x3fcae2(0x9e)]())throw CliErrors['validation'](_0x3fcae2(0xcc));return{'schemaVersion':Number[_0x3fcae2(0xa7)](_0x345904[_0x3fcae2(0xba)])?_0x345904['schemaVersion']:0x2,'ossPath':_0x525f81,'treeSha256':_0xdca4ed,'zipSha256':_0x345904['zipSha256'][_0x3fcae2(0x9e)](),'zipSize':_0x345904[_0x3fcae2(0xa2)],'files':_0x11796e};}function extractAndVerifyPackage(_0xf48973,_0x205a98){const _0x469450=a164_0x4564,_0x4b98af=normalizePackageManifest(_0xf48973,{'requireOssPath':![]});if(!_0x4b98af)throw CliErrors[_0x469450(0xa4)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x205a98[_0x469450(0xc4)]!==_0x4b98af[_0x469450(0xa2)])throw CliErrors[_0x469450(0xa4)](_0x469450(0x9d));const _0x2ba538=bufferSha256(_0x205a98);if(_0x2ba538!==_0x4b98af[_0x469450(0xbf)])throw CliErrors[_0x469450(0xa4)](_0x469450(0xc1));return extractAndVerifyPackageFiles(_0x4b98af,_0x205a98);}function extractAndVerifyPackageFiles(_0x56157c,_0x1cad49){const _0x3f15ce=a164_0x4564,_0x1414ef=parseZipPackage(_0x1cad49);if(_0x1414ef[_0x3f15ce(0xc4)]!==_0x56157c['files']['length'])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x2c764c=new Map();for(const _0x1237d5 of _0x1414ef){if(_0x2c764c[_0x3f15ce(0xc3)](_0x1237d5['path']))throw CliErrors[_0x3f15ce(0xa4)](_0x3f15ce(0xc0)+_0x1237d5[_0x3f15ce(0xbb)]);_0x2c764c[_0x3f15ce(0xb8)](_0x1237d5[_0x3f15ce(0xbb)],_0x1237d5);}const _0x4ee50c=[];for(const _0x47fb12 of _0x56157c['files']){const _0x16e026=_0x2c764c[_0x3f15ce(0xa0)](_0x47fb12['path']);if(!_0x16e026)throw CliErrors[_0x3f15ce(0xa4)](_0x3f15ce(0xbd)+_0x47fb12[_0x3f15ce(0xbb)]);if(_0x16e026[_0x3f15ce(0xca)][_0x3f15ce(0xc4)]!==_0x47fb12[_0x3f15ce(0xb4)])throw CliErrors['validation'](_0x3f15ce(0xb0)+_0x47fb12['path']);const _0x4e8192=bufferSha256(_0x16e026[_0x3f15ce(0xca)]);if(_0x4e8192!==_0x47fb12[_0x3f15ce(0xcb)])throw CliErrors['validation'](_0x3f15ce(0xc8)+_0x47fb12['path']);_0x4ee50c[_0x3f15ce(0xbe)]({'path':_0x47fb12[_0x3f15ce(0xbb)],'bytes':_0x16e026['bytes']});}return normalizeLocalFiles(_0x4ee50c);}function a164_0x581d(){const _0x5d7e49=['map','validation','Missing\x20','2WhkzwA','isSafeInteger','string','ossPath','base64','treeSha256','392892AgFcsP','isArray','object','requireOssPath','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','trim','size','1334966UegGfE','some','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','set','6066417omNXpE','schemaVersion','path','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','push','zipSha256','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','20804008RAEvsk','has','length','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','files','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','1926850yDlQvv','bytes','sha256','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20size\x20mismatch.','toLowerCase','2069508Lxkaqf','get','2583180AoWwNw','zipSize'];a164_0x581d=function(){return _0x5d7e49;};return a164_0x581d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a165_0x1560(_0x3a1092,_0x337c6b){_0x3a1092=_0x3a1092-0xb4;var _0x50f946=a165_0x50f9();var _0x156058=_0x50f946[_0x3a1092];return _0x156058;}(function(_0x3ac275,_0x2b9312){var _0x5e1eba=a165_0x1560,_0x44b81f=_0x3ac275();while(!![]){try{var _0x3ba1e4=parseInt(_0x5e1eba(0xb9))/0x1+parseInt(_0x5e1eba(0xbb))/0x2+-parseInt(_0x5e1eba(0xb6))/0x3+parseInt(_0x5e1eba(0xb4))/0x4*(parseInt(_0x5e1eba(0xbd))/0x5)+parseInt(_0x5e1eba(0xb5))/0x6*(-parseInt(_0x5e1eba(0xbe))/0x7)+parseInt(_0x5e1eba(0xb7))/0x8*(parseInt(_0x5e1eba(0xba))/0x9)+-parseInt(_0x5e1eba(0xbc))/0xa*(-parseInt(_0x5e1eba(0xb8))/0xb);if(_0x3ba1e4===_0x2b9312)break;else _0x44b81f['push'](_0x44b81f['shift']());}catch(_0x1fe9a8){_0x44b81f['push'](_0x44b81f['shift']());}}}(a165_0x50f9,0x77e57));function a165_0x50f9(){var _0x24c94f=['8536790Kpzdmz','3630GRagbU','42441vtqkwL','1348kemwXA','942UeLmNG','2397249GCXsps','8tJfKmG','11CzfyGO','698255OcIryz','3930165KZxHfw','17576sFTLPj'];a165_0x50f9=function(){return _0x24c94f;};return a165_0x50f9();}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';export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a166_0x3e5a1f=a166_0x54f4;(function(_0xd4a47c,_0x4f9e2e){const _0x167db1=a166_0x54f4,_0x2b88ed=_0xd4a47c();while(!![]){try{const _0x40e42b=-parseInt(_0x167db1(0x7c))/0x1+-parseInt(_0x167db1(0x89))/0x2+parseInt(_0x167db1(0x7a))/0x3*(-parseInt(_0x167db1(0x86))/0x4)+-parseInt(_0x167db1(0x80))/0x5*(-parseInt(_0x167db1(0x8c))/0x6)+-parseInt(_0x167db1(0x8d))/0x7*(-parseInt(_0x167db1(0x8e))/0x8)+-parseInt(_0x167db1(0x8f))/0x9*(-parseInt(_0x167db1(0x7d))/0xa)+parseInt(_0x167db1(0x85))/0xb;if(_0x40e42b===_0x4f9e2e)break;else _0x2b88ed['push'](_0x2b88ed['shift']());}catch(_0x3efeb9){_0x2b88ed['push'](_0x2b88ed['shift']());}}}(a166_0xaad7,0x57d45));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a166_0xaad7(){const _0x47275f=['.claude','.agents','\x20has\x20no\x20skills\x20map','11877CookqS','skills','611465QaCoWM','2690kthaxz','\x20is\x20unreadable:\x20','utf8','427115eVGOLg','find','object','includes','kind','5336870YFbILd','524VeuztM','\x20records\x20\x22','not-recorded','1189424cUszYy','\x20uses\x20unsupported\x20version\x20','reason','42ceYceC','11879ymcHUO','2120bVClIU','18459YBEVwJ','home','globalSkillsDirs','unusable','SKILL.md','version','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','recorded','map','lockFile','unverifiable'];a166_0xaad7=function(){return _0x47275f;};return a166_0xaad7();}export const SKILL_LOCK_RELATIVE_PATH=join('.agents','.skill-lock.json');function a166_0x54f4(_0x43014c,_0x56ddd3){_0x43014c=_0x43014c-0x6f;const _0xaad7bc=a166_0xaad7();let _0x54f45=_0xaad7bc[_0x43014c];return _0x54f45;}export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a166_0x3e5a1f(0x78),'skills'),join(a166_0x3e5a1f(0x77),a166_0x3e5a1f(0x7b))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x4c0fae,_0x14732e){const _0x5a6727=a166_0x3e5a1f;if(!existsSync(_0x4c0fae))return{'kind':_0x5a6727(0x88)};let _0x58c552;try{_0x58c552=JSON['parse'](readFileSync(_0x4c0fae,_0x5a6727(0x7f)));}catch(_0x286d3d){return{'kind':_0x5a6727(0x6f),'reason':_0x4c0fae+_0x5a6727(0x7e)+_0x286d3d['message']};}const _0x524bdd=_0x58c552;if(typeof _0x524bdd?.[_0x5a6727(0x71)]!=='number'||!SUPPORTED_LOCK_VERSIONS[_0x5a6727(0x83)](_0x524bdd['version']))return{'kind':_0x5a6727(0x6f),'reason':_0x4c0fae+_0x5a6727(0x8a)+String(_0x524bdd?.[_0x5a6727(0x71)])};if(!_0x524bdd[_0x5a6727(0x7b)]||typeof _0x524bdd[_0x5a6727(0x7b)]!==_0x5a6727(0x82))return{'kind':_0x5a6727(0x6f),'reason':_0x4c0fae+_0x5a6727(0x79)};return _0x524bdd[_0x5a6727(0x7b)][_0x14732e]?{'kind':_0x5a6727(0x73)}:{'kind':_0x5a6727(0x88)};}export function resolveInstalledSkill(_0x311679,_0x1ddb10){const _0x395ec7=a166_0x3e5a1f,_0x1f1fa7=_0x1ddb10?.[_0x395ec7(0x90)]??homedir(),_0x4fd4dc=_0x1ddb10?.[_0x395ec7(0x91)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x395ec7(0x74)](_0x1dbae7=>join(_0x1f1fa7,_0x1dbae7)),_0x1bf4b0=_0x1ddb10?.[_0x395ec7(0x75)]??join(_0x1f1fa7,SKILL_LOCK_RELATIVE_PATH),_0x1beff4=_0x4fd4dc[_0x395ec7(0x74)](_0x4bc12e=>join(_0x4bc12e,_0x311679,_0x395ec7(0x70))),_0x27bbff=_0x1beff4[_0x395ec7(0x81)](_0x74a133=>existsSync(_0x74a133));if(_0x27bbff)return{'state':'present','path':_0x27bbff};const _0x458a2b=readLockLookup(_0x1bf4b0,_0x311679);if(_0x458a2b[_0x395ec7(0x84)]===_0x395ec7(0x6f))return{'state':_0x395ec7(0x76),'reason':_0x458a2b[_0x395ec7(0x8b)]};if(_0x458a2b[_0x395ec7(0x84)]==='recorded')return{'state':_0x395ec7(0x76),'reason':_0x1bf4b0+_0x395ec7(0x87)+_0x311679+_0x395ec7(0x72)+('('+_0x1beff4['join'](',\x20')+')')};return{'state':'absent','checked':_0x1beff4};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x3caa63=a167_0x3351;(function(_0x362a12,_0x341805){const _0x4bfd18=a167_0x3351,_0x32c88b=_0x362a12();while(!![]){try{const _0x2fb26e=parseInt(_0x4bfd18(0x1db))/0x1+-parseInt(_0x4bfd18(0x1e9))/0x2+parseInt(_0x4bfd18(0x1de))/0x3*(-parseInt(_0x4bfd18(0x1dd))/0x4)+parseInt(_0x4bfd18(0x1e6))/0x5*(-parseInt(_0x4bfd18(0x1e7))/0x6)+-parseInt(_0x4bfd18(0x1df))/0x7+-parseInt(_0x4bfd18(0x1d7))/0x8*(parseInt(_0x4bfd18(0x1ec))/0x9)+parseInt(_0x4bfd18(0x1d6))/0xa;if(_0x2fb26e===_0x341805)break;else _0x32c88b['push'](_0x32c88b['shift']());}catch(_0x2abd33){_0x32c88b['push'](_0x32c88b['shift']());}}}(a167_0x189b,0x89a2e));const REDACTED_ACCESS_KEY=a167_0x3caa63(0x1ea);function a167_0x189b(){const _0x4a2147=['isArray','repeat','451865axZtRs','42fGtrTf','prototype','122452oXTTZj','<redacted>','accessKey','450ssNElR','test','string','29944850MGuBQU','10720YPUJAw','length','entries','call','200717gwShuJ','slice','64pguGGv','139647rvSVSs','7880761nUVOor','apps','fromEntries','hasOwnProperty','object'];a167_0x189b=function(){return _0x4a2147;};return a167_0x189b();}export function maskCliAccessKey(_0x15cbda){const _0x17069c=a167_0x3caa63;if(typeof _0x15cbda!==_0x17069c(0x1d5)||_0x15cbda[_0x17069c(0x1d8)]<=0x8)return REDACTED_ACCESS_KEY;return''+_0x15cbda[_0x17069c(0x1dc)](0x0,0x8)+'*'[_0x17069c(0x1e5)](_0x15cbda[_0x17069c(0x1d8)]-0x8);}export function redactCliConfigCredentials(_0x447501){const _0x53cfae=a167_0x3caa63,_0xb46612={..._0x447501};return Object['prototype'][_0x53cfae(0x1e2)][_0x53cfae(0x1da)](_0xb46612,_0x53cfae(0x1eb))&&(_0xb46612['accessKey']=maskCliAccessKey(_0xb46612['accessKey'])),_0xb46612[_0x53cfae(0x1e0)]&&typeof _0xb46612['apps']===_0x53cfae(0x1e3)&&!Array['isArray'](_0xb46612[_0x53cfae(0x1e0)])&&(_0xb46612[_0x53cfae(0x1e0)]=redactLegacyAppCredentials(_0xb46612['apps'])),_0xb46612;}function a167_0x3351(_0x3fbca6,_0x622828){_0x3fbca6=_0x3fbca6-0x1d5;const _0x189b8a=a167_0x189b();let _0x335139=_0x189b8a[_0x3fbca6];return _0x335139;}export function redactCliConfigValue(_0x58f0c6,_0x201929){const _0x4bcf0f=a167_0x3caa63;if(_0x58f0c6===_0x4bcf0f(0x1eb)||/^apps\.[^.]+\.accessKey$/[_0x4bcf0f(0x1ed)](_0x58f0c6))return maskCliAccessKey(_0x201929);if(_0x58f0c6===_0x4bcf0f(0x1e0)&&_0x201929&&typeof _0x201929===_0x4bcf0f(0x1e3)&&!Array['isArray'](_0x201929))return redactLegacyAppCredentials(_0x201929);if(/^apps\.[^.]+$/[_0x4bcf0f(0x1ed)](_0x58f0c6)&&_0x201929&&typeof _0x201929==='object'&&!Array[_0x4bcf0f(0x1e4)](_0x201929)){const _0x4d485b=_0x201929;return Object['prototype']['hasOwnProperty']['call'](_0x4d485b,_0x4bcf0f(0x1eb))?{..._0x4d485b,'accessKey':maskCliAccessKey(_0x4d485b[_0x4bcf0f(0x1eb)])}:_0x201929;}return _0x201929;}function redactLegacyAppCredentials(_0x2a6953){const _0xc66ef=a167_0x3caa63;return Object[_0xc66ef(0x1e1)](Object[_0xc66ef(0x1d9)](_0x2a6953)['map'](([_0x3480da,_0x380d11])=>{const _0x36f6c2=_0xc66ef;if(!_0x380d11||typeof _0x380d11!=='object'||Array[_0x36f6c2(0x1e4)](_0x380d11))return[_0x3480da,_0x380d11];const _0x5d6744={..._0x380d11};return Object[_0x36f6c2(0x1e8)][_0x36f6c2(0x1e2)][_0x36f6c2(0x1da)](_0x5d6744,_0x36f6c2(0x1eb))&&(_0x5d6744[_0x36f6c2(0x1eb)]=maskCliAccessKey(_0x5d6744[_0x36f6c2(0x1eb)])),[_0x3480da,_0x5d6744];}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a168_0x321a(){const _0x19d6a8=['2491115TCiQAF','1771332enOaPJ','9925576SnySXf','5211144jtoalH','1569914JAvghw','1748370dimnBA','377328jhCulL','7MaMApv'];a168_0x321a=function(){return _0x19d6a8;};return a168_0x321a();}function a168_0x4f63(_0x510aa8,_0x5642e5){_0x510aa8=_0x510aa8-0x1ad;const _0x321a59=a168_0x321a();let _0x4f6338=_0x321a59[_0x510aa8];return _0x4f6338;}(function(_0xb4c570,_0x21c2b7){const _0x2fe9fb=a168_0x4f63,_0x50b1ed=_0xb4c570();while(!![]){try{const _0x352d68=parseInt(_0x2fe9fb(0x1b4))/0x1+-parseInt(_0x2fe9fb(0x1b2))/0x2+parseInt(_0x2fe9fb(0x1b3))/0x3+parseInt(_0x2fe9fb(0x1af))/0x4+-parseInt(_0x2fe9fb(0x1ae))/0x5+-parseInt(_0x2fe9fb(0x1b1))/0x6+-parseInt(_0x2fe9fb(0x1ad))/0x7*(-parseInt(_0x2fe9fb(0x1b0))/0x8);if(_0x352d68===_0x21c2b7)break;else _0x50b1ed['push'](_0x50b1ed['shift']());}catch(_0x3f3d65){_0x50b1ed['push'](_0x50b1ed['shift']());}}}(a168_0x321a,0x781a8));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7cf387,_0x3f19fa){const _0x3b9c12=a169_0x47b3,_0x27012a=_0x7cf387();while(!![]){try{const _0x53d5a4=parseInt(_0x3b9c12(0xfc))/0x1*(-parseInt(_0x3b9c12(0xee))/0x2)+parseInt(_0x3b9c12(0xf5))/0x3*(-parseInt(_0x3b9c12(0xf1))/0x4)+parseInt(_0x3b9c12(0xfe))/0x5*(-parseInt(_0x3b9c12(0x100))/0x6)+parseInt(_0x3b9c12(0xf2))/0x7*(-parseInt(_0x3b9c12(0xf0))/0x8)+parseInt(_0x3b9c12(0xf3))/0x9+-parseInt(_0x3b9c12(0x102))/0xa+parseInt(_0x3b9c12(0xef))/0xb*(parseInt(_0x3b9c12(0xf6))/0xc);if(_0x53d5a4===_0x3f19fa)break;else _0x27012a['push'](_0x27012a['shift']());}catch(_0x2fcdd7){_0x27012a['push'](_0x27012a['shift']());}}}(a169_0x4ec6,0x4ba13));import a169_0x5baf11 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';export function evaluateCliVersionPolicy(_0xbaf32,_0x2bcb5c){const _0x292a8d=a169_0x47b3,_0x11bf35=a169_0x5baf11[_0x292a8d(0xfa)](_0xbaf32)===_0xbaf32,_0x1695f2=_0x2bcb5c?.[_0x292a8d(0x103)]??null,_0x4da68a=_0x2bcb5c?.['minimumVersion']??null,_0x38966b=Boolean(_0x11bf35&&_0x1695f2&&a169_0x5baf11['lt'](_0xbaf32,_0x1695f2)),_0x5bcbab=Boolean(_0x11bf35&&_0x4da68a&&a169_0x5baf11['lt'](_0xbaf32,_0x4da68a));return{'currentVersion':_0xbaf32,'stableVersion':_0x1695f2,'minimumVersion':_0x4da68a,'needsUpgrade':_0x38966b||_0x5bcbab,'belowMinimum':_0x5bcbab,'upgradeMessage':_0x2bcb5c?.[_0x292a8d(0xf4)],'minimumVersionMessage':_0x2bcb5c?.[_0x292a8d(0xf8)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}function a169_0x47b3(_0x42f67d,_0x571ba8){_0x42f67d=_0x42f67d-0xed;const _0x4ec631=a169_0x4ec6();let _0x47b3ff=_0x4ec631[_0x42f67d];return _0x47b3ff;}export function getCliUpgradeCommand(_0x57d11b){const _0x1b141a=a169_0x47b3;return _0x1b141a(0xf7)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x57d11b[_0x1b141a(0x103)]??_0x1b141a(0x101));}export function assertCliVersionSupported(_0x386269){const _0xa548a8=a169_0x47b3;if(!_0x386269['belowMinimum'])return;const _0x4afdef=[_0x386269[_0xa548a8(0xf8)],_0xa548a8(0xfb)+_0x386269[_0xa548a8(0xf9)],'Minimum\x20supported:\x20'+_0x386269['minimumVersion'],'Recommended\x20stable:\x20'+(_0x386269[_0xa548a8(0x103)]??_0xa548a8(0xed)),_0xa548a8(0xfd)+getCliUpgradeCommand(_0x386269)]['filter'](Boolean)['join']('\x0a');throw CliErrors[_0xa548a8(0xff)]('Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.',_0x4afdef);}function a169_0x4ec6(){const _0x2dbdb0=['Upgrade\x20command:\x20','5365uuMOVL','validation','1212YefbtH','latest','2239830YcNmxk','stableVersion','unavailable','10zrzqMh','110JKgHTL','685736DqgpEZ','12ApxVYJ','7zueOkm','948582uLNtXu','upgradeMessage','277998vYEePc','1554684wGaDLA','npm\x20install\x20-g\x20','minimumVersionMessage','currentVersion','valid','Current\x20version:\x20','57349LOmyTb'];a169_0x4ec6=function(){return _0x2dbdb0;};return a169_0x4ec6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37b966,_0x2aeda4){const _0x3994b9=a170_0x35ab,_0x14758b=_0x37b966();while(!![]){try{const _0x812cb=parseInt(_0x3994b9(0xc0))/0x1*(-parseInt(_0x3994b9(0xc6))/0x2)+parseInt(_0x3994b9(0xb1))/0x3*(parseInt(_0x3994b9(0xbc))/0x4)+-parseInt(_0x3994b9(0xc5))/0x5+parseInt(_0x3994b9(0xb4))/0x6*(parseInt(_0x3994b9(0xc3))/0x7)+parseInt(_0x3994b9(0xc7))/0x8*(parseInt(_0x3994b9(0xb8))/0x9)+-parseInt(_0x3994b9(0xbb))/0xa+-parseInt(_0x3994b9(0xb6))/0xb*(parseInt(_0x3994b9(0xc1))/0xc);if(_0x812cb===_0x2aeda4)break;else _0x14758b['push'](_0x14758b['shift']());}catch(_0x10149b){_0x14758b['push'](_0x14758b['shift']());}}}(a170_0x54d8,0x2964f));import a170_0x46281c 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(_0x53f00d){const _0x4ace65=a170_0x35ab;return typeof _0x53f00d==='string'&&_0x53f00d[_0x4ace65(0xb7)]()?_0x53f00d[_0x4ace65(0xb7)]():null;}function pickStrictSemver(_0x4cb13d){const _0x441804=a170_0x35ab,_0x31bfc5=pickString(_0x4cb13d);return _0x31bfc5&&a170_0x46281c[_0x441804(0xb2)](_0x31bfc5)===_0x31bfc5?_0x31bfc5:null;}export function normalizeCliVersionPolicy(_0x1a99c5){const _0x406a25=a170_0x35ab;if(!_0x1a99c5||typeof _0x1a99c5!==_0x406a25(0xc4))return null;const _0x3275b3=_0x1a99c5,_0xa30e24=_0x3275b3['cli']&&typeof _0x3275b3[_0x406a25(0xbd)]===_0x406a25(0xc4)?_0x3275b3[_0x406a25(0xbd)]:_0x3275b3,_0x2b66ae=pickStrictSemver(_0xa30e24[_0x406a25(0xbe)]??_0xa30e24['latestVersion']??_0xa30e24[_0x406a25(0xb0)]),_0x3ebad2=pickStrictSemver(_0xa30e24[_0x406a25(0xc2)]??_0xa30e24[_0x406a25(0xbf)]);if(!_0x2b66ae&&!_0x3ebad2)return null;if(_0x2b66ae&&_0x3ebad2&&a170_0x46281c['gt'](_0x3ebad2,_0x2b66ae))return null;return{'stableVersion':_0x2b66ae,'minimumVersion':_0x3ebad2,'upgradeMessage':pickString(_0xa30e24['upgradeMessage'])??undefined,'minimumVersionMessage':pickString(_0xa30e24['minimumVersionMessage'])??undefined};}export async function fetchCliVersionPolicy(){const _0x4ca75b=a170_0x35ab;try{const _0x261c6f=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x4ca75b(0xb5)},'signal':AbortSignal[_0x4ca75b(0xb3)](FETCH_TIMEOUT_MS)});if(!_0x261c6f['ok'])return null;return normalizeCliVersionPolicy(await _0x261c6f[_0x4ca75b(0xaf)]());}catch{return null;}}function a170_0x35ab(_0x307e0e,_0x6266be){_0x307e0e=_0x307e0e-0xaf;const _0x54d8fe=a170_0x54d8();let _0x35ab90=_0x54d8fe[_0x307e0e];return _0x35ab90;}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x18dc3a=a170_0x35ab,_0x115ca2=Date[_0x18dc3a(0xba)]();if(hasCachedPolicy){const _0x590b22=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x115ca2-cachedAt<_0x590b22)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()[_0x18dc3a(0xb9)](_0x1f92dc=>{const _0x387539=_0x18dc3a;return cachedPolicy=_0x1f92dc,cachedAt=Date[_0x387539(0xba)](),hasCachedPolicy=!![],_0x1f92dc;})['finally'](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}function a170_0x54d8(){const _0x5ad18f=['trim','1060830RabmuD','then','now','544980BWGXGW','446412XJbdOf','cli','stableVersion','minVersion','496xqyFoS','325344LkmajD','minimumVersion','21IdAWaS','object','1124295akyimQ','454VRXinP','16BJSrQA','json','recommendedVersion','6vWFmWT','valid','timeout','422004umUMmu','application/json','44SyNWkf'];a170_0x54d8=function(){return _0x5ad18f;};return a170_0x54d8();}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a171_0x3b1aef=a171_0x50bf;(function(_0x2cd2b7,_0x59b632){const _0x28b269=a171_0x50bf,_0x4dbd0e=_0x2cd2b7();while(!![]){try{const _0x346b04=-parseInt(_0x28b269(0x1f4))/0x1+-parseInt(_0x28b269(0x1e2))/0x2+parseInt(_0x28b269(0x1df))/0x3+parseInt(_0x28b269(0x1fb))/0x4*(parseInt(_0x28b269(0x1f2))/0x5)+parseInt(_0x28b269(0x1ec))/0x6*(-parseInt(_0x28b269(0x1f9))/0x7)+-parseInt(_0x28b269(0x201))/0x8*(parseInt(_0x28b269(0x203))/0x9)+parseInt(_0x28b269(0x206))/0xa*(parseInt(_0x28b269(0x207))/0xb);if(_0x346b04===_0x59b632)break;else _0x4dbd0e['push'](_0x4dbd0e['shift']());}catch(_0x3f2d87){_0x4dbd0e['push'](_0x4dbd0e['shift']());}}}(a171_0x17e1,0x9a102));import a171_0x285263 from'winston';import a171_0x31f244 from'node:fs';function a171_0x17e1(){const _0x349507=['setRawCommand','dirname','toISOString','logTask','readFileSync','transports','initWinstonLogger','logFilePath','553854qcRNvu','mkdirSync','currentRawCommand','231410nYXptO','format','parse','stringify','getWinstonInstance','message','green','join','blue','createLogger','762MVzYVM','success','winstonLogger','now','writeFileSync','printf','5KRBuJt','log','692670CMGPdY','Failed:\x20','rawCommand','addColors','utf8','62573vvFyGk','existsSync','2872732lULGDb','combine','error','info','Failed\x20to\x20read\x20logs:','errors','190360HgbbdF','split','333QqJMDn','clear','yellow','911530OMhNpF','308AatVTp','Starting:\x20','timestamp','command','warn'];a171_0x17e1=function(){return _0x349507;};return a171_0x17e1();}import a171_0x3e340c from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';function a171_0x50bf(_0xe7f365,_0x33254f){_0xe7f365=_0xe7f365-0x1d7;const _0x17e1e4=a171_0x17e1();let _0x50bf6=_0x17e1e4[_0xe7f365];return _0x50bf6;}class Logger{[a171_0x3b1aef(0x1ee)];[a171_0x3b1aef(0x1de)]='';['currentRawCommand']='';constructor(){}[a171_0x3b1aef(0x1d7)](_0x1e6aa9){const _0x8f9e80=a171_0x3b1aef;this[_0x8f9e80(0x1e1)]=_0x1e6aa9;}['setLogPath'](_0x389700){const _0x5b3ef1=a171_0x3b1aef;this[_0x5b3ef1(0x1de)]=a171_0x3e340c[_0x5b3ef1(0x1e9)](_0x389700,PRODUCT_CONFIG['logFileName']),this['winstonLogger']&&this[_0x5b3ef1(0x1ee)][_0x5b3ef1(0x204)](),this[_0x5b3ef1(0x1dd)]();}[a171_0x3b1aef(0x1dd)](){const _0x5c9e50=a171_0x3b1aef,_0x69d72d=a171_0x3e340c[_0x5c9e50(0x1d8)](this[_0x5c9e50(0x1de)]);!a171_0x31f244[_0x5c9e50(0x1fa)](_0x69d72d)&&a171_0x31f244[_0x5c9e50(0x1e0)](_0x69d72d,{'recursive':!![]});const _0x14bbbe=a171_0x285263[_0x5c9e50(0x1e3)][_0x5c9e50(0x1fc)](a171_0x285263[_0x5c9e50(0x1e3)][_0x5c9e50(0x209)](),a171_0x285263[_0x5c9e50(0x1e3)][_0x5c9e50(0x200)]({'stack':!![]}),a171_0x285263[_0x5c9e50(0x1e3)][_0x5c9e50(0x1f1)](_0xc93aa1=>{const _0x298992=_0x5c9e50,_0xdda907={'timestamp':_0xc93aa1[_0x298992(0x209)]||new Date()[_0x298992(0x1d9)](),'level':_0xc93aa1['level']||_0x298992(0x1fe),'command':_0xc93aa1[_0x298992(0x20a)]||'unknown','rawCommand':_0xc93aa1[_0x298992(0x1f6)]||this[_0x298992(0x1e1)]||undefined,'message':_0xc93aa1[_0x298992(0x1e7)]||'','duration':_0xc93aa1['duration']||undefined,'details':_0xc93aa1['details']||undefined};return JSON[_0x298992(0x1e5)](_0xdda907);}));this[_0x5c9e50(0x1ee)]=a171_0x285263[_0x5c9e50(0x1eb)]({'level':_0x5c9e50(0x1fe),'format':_0x14bbbe,'transports':[new a171_0x285263[(_0x5c9e50(0x1dc))]['File']({'filename':this[_0x5c9e50(0x1de)],'level':_0x5c9e50(0x1fe)})],'silent':![]}),a171_0x285263[_0x5c9e50(0x1f7)]({'success':_0x5c9e50(0x1e8),'error':'red','warn':_0x5c9e50(0x205),'info':_0x5c9e50(0x1ea)});}['info'](_0x146b16,_0x27243d,_0x1f4482){const _0x1beff1=a171_0x3b1aef;if(!this[_0x1beff1(0x1de)]||!this[_0x1beff1(0x1ee)])return;this['winstonLogger'][_0x1beff1(0x1fe)](_0x27243d,{'command':_0x146b16,'details':_0x1f4482});}[a171_0x3b1aef(0x1ed)](_0xf88c9b,_0x42b386,_0x2ea515,_0x3e218e){const _0x31b699=a171_0x3b1aef;if(!this[_0x31b699(0x1de)]||!this[_0x31b699(0x1ee)])return;this['winstonLogger'][_0x31b699(0x1f3)]('info',_0x42b386,{'level':_0x31b699(0x1ed),'command':_0xf88c9b,'duration':_0x2ea515,'details':_0x3e218e});}[a171_0x3b1aef(0x1fd)](_0x521636,_0x32660d,_0xe46cc7){const _0x4d9ac7=a171_0x3b1aef;if(!this['logFilePath']||!this[_0x4d9ac7(0x1ee)])return;this[_0x4d9ac7(0x1ee)][_0x4d9ac7(0x1fd)](_0x32660d,{'command':_0x521636,'details':_0xe46cc7});}[a171_0x3b1aef(0x20b)](_0xe45b32,_0x4ccffc,_0x5eef70){const _0x5c7fa8=a171_0x3b1aef;if(!this['logFilePath']||!this[_0x5c7fa8(0x1ee)])return;this[_0x5c7fa8(0x1ee)][_0x5c7fa8(0x20b)](_0x4ccffc,{'command':_0xe45b32,'details':_0x5eef70});}async[a171_0x3b1aef(0x1da)](_0x330e43,_0xcd2fca,_0x252c95){const _0x26f05b=a171_0x3b1aef,_0x5d2189=Date[_0x26f05b(0x1ef)]();this['info'](_0x330e43,_0x26f05b(0x208)+_0xcd2fca);try{const _0x255177=await _0x252c95(),_0x548365=Date[_0x26f05b(0x1ef)]()-_0x5d2189;return this['success'](_0x330e43,'Completed:\x20'+_0xcd2fca,_0x548365),_0x255177;}catch(_0x2f60e1){const _0x2fcd6f=Date[_0x26f05b(0x1ef)]()-_0x5d2189;this[_0x26f05b(0x1fd)](_0x330e43,_0x26f05b(0x1f5)+_0xcd2fca,{'error':_0x2f60e1 instanceof Error?_0x2f60e1['message']:String(_0x2f60e1),'duration':_0x2fcd6f});throw _0x2f60e1;}}['readLogs'](){const _0xebdd30=a171_0x3b1aef;try{if(!a171_0x31f244[_0xebdd30(0x1fa)](this['logFilePath']))return[];const _0x24e6d8=a171_0x31f244[_0xebdd30(0x1db)](this[_0xebdd30(0x1de)],_0xebdd30(0x1f8));return _0x24e6d8[_0xebdd30(0x202)](/\r?\n/)['filter'](_0x4a1e3c=>_0x4a1e3c['trim']())['map'](_0x51829d=>JSON[_0xebdd30(0x1e4)](_0x51829d));}catch(_0xab3e03){return console[_0xebdd30(0x20b)](_0xebdd30(0x1ff),_0xab3e03),[];}}['clearLogs'](){const _0x134c1a=a171_0x3b1aef;try{a171_0x31f244[_0x134c1a(0x1fa)](this[_0x134c1a(0x1de)])&&a171_0x31f244[_0x134c1a(0x1f0)](this[_0x134c1a(0x1de)],'',_0x134c1a(0x1f8));}catch(_0x5dad63){console[_0x134c1a(0x20b)]('Failed\x20to\x20clear\x20logs:',_0x5dad63);}}[a171_0x3b1aef(0x1e6)](){const _0x3f9c31=a171_0x3b1aef;return this[_0x3f9c31(0x1ee)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a172_0x1d58ed=a172_0x2da5;(function(_0xb8ec16,_0x4c95d6){const _0x2c973a=a172_0x2da5,_0x24abed=_0xb8ec16();while(!![]){try{const _0x31a9e3=-parseInt(_0x2c973a(0xf9))/0x1*(-parseInt(_0x2c973a(0xf6))/0x2)+-parseInt(_0x2c973a(0xef))/0x3*(parseInt(_0x2c973a(0xe7))/0x4)+parseInt(_0x2c973a(0xee))/0x5*(parseInt(_0x2c973a(0xfd))/0x6)+parseInt(_0x2c973a(0xf3))/0x7+parseInt(_0x2c973a(0xf7))/0x8+parseInt(_0x2c973a(0xfb))/0x9*(-parseInt(_0x2c973a(0xe8))/0xa)+-parseInt(_0x2c973a(0xf1))/0xb*(parseInt(_0x2c973a(0xe9))/0xc);if(_0x31a9e3===_0x4c95d6)break;else _0x24abed['push'](_0x24abed['shift']());}catch(_0x5b36e4){_0x24abed['push'](_0x24abed['shift']());}}}(a172_0x1200,0xae8f6));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a172_0x1d58ed(0xf8)]),MIN_SAFE_INTEGER=BigInt(Number[a172_0x1d58ed(0xf5)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x376bc9){const _0x20802a=a172_0x1d58ed;if(_0x376bc9[_0x20802a(0xeb)]('.')||_0x376bc9[_0x20802a(0xeb)]('e')||_0x376bc9['includes']('E'))return![];const _0x12f382=BigInt(_0x376bc9);return _0x12f382>MAX_SAFE_INTEGER||_0x12f382<MIN_SAFE_INTEGER;}function a172_0x1200(){const _0x405c80=['defineProperty','102OqiGIU','8lBYNte','20QjohhQ','348kizQdg','length','includes','parse','prototype','45905fIOBep','65127bWInCy','slice','928433JyIlhO','json','4418519brRllt','exec','MIN_SAFE_INTEGER','118xNZanr','10778856hZkjgb','MAX_SAFE_INTEGER','18806oPCkdn','getOwnPropertyDescriptor','171459hmKHEx'];a172_0x1200=function(){return _0x405c80;};return a172_0x1200();}function quoteUnsafeIntegerLiterals(_0x1efe40){const _0x1d4252=a172_0x1d58ed;let _0x16ac05='',_0x393e81=![],_0x228761=![];for(let _0x2db81e=0x0;_0x2db81e<_0x1efe40[_0x1d4252(0xea)];){const _0x472fe0=_0x1efe40[_0x2db81e];if(_0x393e81){_0x16ac05+=_0x472fe0,_0x2db81e+=0x1;if(_0x228761)_0x228761=![];else{if(_0x472fe0==='\x5c')_0x228761=!![];else _0x472fe0==='\x22'&&(_0x393e81=![]);}continue;}if(_0x472fe0==='\x22'){_0x393e81=!![],_0x16ac05+=_0x472fe0,_0x2db81e+=0x1;continue;}if(_0x472fe0==='-'||_0x472fe0>='0'&&_0x472fe0<='9'){const _0x511788=JSON_NUMBER_PATTERN[_0x1d4252(0xf4)](_0x1efe40[_0x1d4252(0xf0)](_0x2db81e))?.[0x0];if(_0x511788){_0x16ac05+=isUnsafeIntegerLiteral(_0x511788)?'\x22'+_0x511788+'\x22':_0x511788,_0x2db81e+=_0x511788[_0x1d4252(0xea)];continue;}}_0x16ac05+=_0x472fe0,_0x2db81e+=0x1;}return _0x16ac05;}function a172_0x2da5(_0x3818ca,_0x36d38e){_0x3818ca=_0x3818ca-0xe7;const _0x120046=a172_0x1200();let _0x2da5ef=_0x120046[_0x3818ca];return _0x2da5ef;}export function parseLosslessJson(_0x305112){const _0x301c09=a172_0x1d58ed;return JSON[_0x301c09(0xec)](quoteUnsafeIntegerLiterals(_0x305112));}export function installLosslessJsonResponseParser(){const _0x241670=a172_0x1d58ed;if(typeof Response==='undefined')return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x241670(0xed)],originalResponseJsonDescriptor=Object[_0x241670(0xfa)](responseJsonPrototype,'json'),Object[_0x241670(0xfc)](responseJsonPrototype,'json',{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x26aaf6(){return parseLosslessJson(await this['text']());}}),restoreResponseJsonParser=()=>{const _0x59af09=_0x241670;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x59af09(0xfc)](responseJsonPrototype,_0x59af09(0xf2),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x59af09(0xf2)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a173_0x2945(){const _0x445491=['map','3960AnJDhq','id[','object','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','828nmeSvr','124090BoLddJ','number','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','length','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','492VKjdhS','369789DDerDW','1264848dtzbcz','8mrZYZR','347djjXVs','isSafeInteger','items','1722lhUPeC','4232952yJyumQ','validation','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','Invalid\x20JSON\x20for\x20--params:\x20','121WJUqwe','11105rKerXJ','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','isArray'];a173_0x2945=function(){return _0x445491;};return a173_0x2945();}(function(_0x504dce,_0x44a4e6){const _0x25db31=a173_0x2511,_0x2f2784=_0x504dce();while(!![]){try{const _0x466fce=parseInt(_0x25db31(0x181))/0x1*(parseInt(_0x25db31(0x176))/0x2)+-parseInt(_0x25db31(0x17e))/0x3+parseInt(_0x25db31(0x17d))/0x4*(-parseInt(_0x25db31(0x16e))/0x5)+-parseInt(_0x25db31(0x172))/0x6*(parseInt(_0x25db31(0x184))/0x7)+parseInt(_0x25db31(0x180))/0x8*(parseInt(_0x25db31(0x185))/0x9)+-parseInt(_0x25db31(0x177))/0xa*(-parseInt(_0x25db31(0x16d))/0xb)+parseInt(_0x25db31(0x17f))/0xc;if(_0x466fce===_0x44a4e6)break;else _0x2f2784['push'](_0x2f2784['shift']());}catch(_0x3ab436){_0x2f2784['push'](_0x2f2784['shift']());}}}(a173_0x2945,0x4887b));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x4588bf){const _0x133648=a173_0x2511;if(!_0x4588bf)return undefined;try{return parseLosslessJson(_0x4588bf);}catch{throw CliErrors[_0x133648(0x186)](_0x133648(0x16c)+_0x4588bf);}}export function parseJsonParamsValue(_0x3c938e){const _0x29a217=a173_0x2511;if(!_0x3c938e)return undefined;try{return parseLosslessJson(_0x3c938e);}catch{throw CliErrors[_0x29a217(0x186)](_0x29a217(0x16c)+_0x3c938e);}}export function parseBatchCreateItemsFromParams(_0x521bac){const _0x137671=a173_0x2511;if(Array[_0x137671(0x170)](_0x521bac))return _0x521bac;if(_0x521bac!==null&&_0x521bac!==undefined&&typeof _0x521bac===_0x137671(0x174)&&Array[_0x137671(0x170)](_0x521bac[_0x137671(0x183)]))return _0x521bac[_0x137671(0x183)];throw CliErrors[_0x137671(0x186)](_0x137671(0x175),_0x137671(0x17a));}function parseDataUpdateId(_0x1e66c1,_0x408234){const _0x4ea373=a173_0x2511;if(typeof _0x1e66c1===_0x4ea373(0x178)&&Number[_0x4ea373(0x182)](_0x1e66c1)&&_0x1e66c1>0x0)return _0x1e66c1;if(typeof _0x1e66c1==='string'){if(/^[1-9]\d*$/['test'](_0x1e66c1))return _0x1e66c1;}throw CliErrors['validation']('data\x20update\x20--params.'+_0x408234+_0x4ea373(0x17c));}function a173_0x2511(_0x5b787d,_0x10b541){_0x5b787d=_0x5b787d-0x16c;const _0x294574=a173_0x2945();let _0x25113d=_0x294574[_0x5b787d];return _0x25113d;}export function parseUpdateIdsFromParams(_0x5adc1d){const _0x2b8cf2=a173_0x2511;if(_0x5adc1d===null||_0x5adc1d===undefined||typeof _0x5adc1d!==_0x2b8cf2(0x174)||Array[_0x2b8cf2(0x170)](_0x5adc1d))throw CliErrors[_0x2b8cf2(0x186)]('data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.',_0x2b8cf2(0x187));const _0x5bb22a=_0x5adc1d['id'];if(_0x5bb22a===undefined||_0x5bb22a===null)throw CliErrors['validation'](_0x2b8cf2(0x179),_0x2b8cf2(0x187));const _0xd1e791=Array[_0x2b8cf2(0x170)](_0x5bb22a)?_0x5bb22a:[_0x5bb22a];if(_0xd1e791['length']===0x0)throw CliErrors[_0x2b8cf2(0x186)](_0x2b8cf2(0x16f));if(_0xd1e791[_0x2b8cf2(0x17b)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x2b8cf2(0x186)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+'\x20records\x20per\x20call;\x20received\x20'+_0xd1e791[_0x2b8cf2(0x17b)]+'.');return _0xd1e791[_0x2b8cf2(0x171)]((_0x3e981f,_0x34c44a)=>parseDataUpdateId(_0x3e981f,Array[_0x2b8cf2(0x170)](_0x5bb22a)?_0x2b8cf2(0x173)+_0x34c44a+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x43a48b,_0x472fc9){const _0x2724da=a173_0x2511;if(Array[_0x2724da(0x170)](_0x43a48b['id'])&&_0x472fc9[_0x2724da(0x17b)]>0x1)return{..._0x43a48b,'id':_0x472fc9['join'](',')};return _0x43a48b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a174_0x267f(_0x7f142b,_0x3ccfbe){_0x7f142b=_0x7f142b-0xf5;const _0x2da60e=a174_0x2da6();let _0x267f07=_0x2da60e[_0x7f142b];return _0x267f07;}(function(_0x10860e,_0x4a5af3){const _0x11eba0=a174_0x267f,_0xbac10a=_0x10860e();while(!![]){try{const _0x42413f=parseInt(_0x11eba0(0x100))/0x1*(-parseInt(_0x11eba0(0xfe))/0x2)+parseInt(_0x11eba0(0x101))/0x3+-parseInt(_0x11eba0(0xff))/0x4*(-parseInt(_0x11eba0(0xf8))/0x5)+parseInt(_0x11eba0(0x102))/0x6*(parseInt(_0x11eba0(0xf6))/0x7)+-parseInt(_0x11eba0(0xfd))/0x8+parseInt(_0x11eba0(0xf9))/0x9+-parseInt(_0x11eba0(0xfc))/0xa*(parseInt(_0x11eba0(0xf5))/0xb);if(_0x42413f===_0x4a5af3)break;else _0xbac10a['push'](_0xbac10a['shift']());}catch(_0x59b75f){_0xbac10a['push'](_0xbac10a['shift']());}}}(a174_0x2da6,0xb6837));function a174_0x2da6(){const _0x3f90df=['string','100gNVpMW','2511873WxALAN','number','isSafeInteger','10AIeTqy','6276544gtPbWw','4114ClWyXk','261572qjxVze','119vCvZme','1946652QfprbX','90264gfeFfo','21100013FNPiec','679tkOLgY'];a174_0x2da6=function(){return _0x3f90df;};return a174_0x2da6();}export function normalizePositiveSafeInteger(_0x794542){const _0x258bf2=a174_0x267f;if(typeof _0x794542===_0x258bf2(0xfa))return Number[_0x258bf2(0xfb)](_0x794542)&&_0x794542>0x0?_0x794542:undefined;if(typeof _0x794542!==_0x258bf2(0xf7)||!/^\d+$/['test'](_0x794542))return undefined;const _0x835b7b=Number(_0x794542);return Number[_0x258bf2(0xfb)](_0x835b7b)&&_0x835b7b>0x0?_0x835b7b:undefined;}
|
package/lib/utils/redaction.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a175_0x77057=a175_0x32f9;function a175_0x32f9(_0x2d7114,_0x1e16e0){_0x2d7114=_0x2d7114-0x1ad;const _0x52959b=a175_0x5295();let _0x32f99e=_0x52959b[_0x2d7114];return _0x32f99e;}(function(_0x17a915,_0x250d0){const _0x3bd5a2=a175_0x32f9,_0x34da26=_0x17a915();while(!![]){try{const _0x22e644=-parseInt(_0x3bd5a2(0x1b3))/0x1+-parseInt(_0x3bd5a2(0x1bb))/0x2+-parseInt(_0x3bd5a2(0x1c0))/0x3*(-parseInt(_0x3bd5a2(0x1ad))/0x4)+-parseInt(_0x3bd5a2(0x1b6))/0x5*(parseInt(_0x3bd5a2(0x1b2))/0x6)+-parseInt(_0x3bd5a2(0x1c2))/0x7+parseInt(_0x3bd5a2(0x1be))/0x8+parseInt(_0x3bd5a2(0x1b8))/0x9*(parseInt(_0x3bd5a2(0x1b7))/0xa);if(_0x22e644===_0x250d0)break;else _0x34da26['push'](_0x34da26['shift']());}catch(_0xa33a5a){_0x34da26['push'](_0x34da26['shift']());}}}(a175_0x5295,0x50ada));const REDACTED_VALUE=a175_0x77057(0x1af),SENSITIVE_KEY_PATTERN=/(?:access.?key|api.?key|authorization|cookie|credential|password|passwd|private.?key|secret|token|webhook)/i,SENSITIVE_FLAG_NAMES=new Set([a175_0x77057(0x1c1),a175_0x77057(0x1b1)]),SENSITIVE_VALUE_KEYS=new Set([a175_0x77057(0x1c1)]);export function isSensitiveKey(_0x33ab59){const _0x43b44b=a175_0x77057,_0x7ae133=_0x33ab59[_0x43b44b(0x1bf)](/_/g,'-')[_0x43b44b(0x1b4)]();return SENSITIVE_KEY_PATTERN[_0x43b44b(0x1ae)](_0x7ae133);}export function isSensitiveFlagName(_0x4fbece){const _0x193a0c=a175_0x77057,_0xb7b7a1=_0x4fbece[_0x193a0c(0x1bf)](/_/g,'-')[_0x193a0c(0x1b4)]();return isSensitiveKey(_0xb7b7a1)||SENSITIVE_FLAG_NAMES['has'](_0xb7b7a1);}function redactVariableValues(_0x294963){const _0x546019=a175_0x77057;if(Array[_0x546019(0x1bc)](_0x294963))return _0x294963['map'](_0x30b6f1=>redactVariableValues(_0x30b6f1));if(_0x294963&&typeof _0x294963===_0x546019(0x1b0))return Object['fromEntries'](Object[_0x546019(0x1ba)](_0x294963)[_0x546019(0x1b5)](([_0x883114,_0x1354a4])=>[_0x883114,redactVariableValues(_0x1354a4)]));return REDACTED_VALUE;}export function redactSensitiveValue(_0x35676a){const _0xb9367b=a175_0x77057;if(Array[_0xb9367b(0x1bc)](_0x35676a))return _0x35676a[_0xb9367b(0x1b5)](_0x341b19=>redactSensitiveValue(_0x341b19));if(!_0x35676a||typeof _0x35676a!==_0xb9367b(0x1b0))return _0x35676a;const _0x31baa9={};for(const [_0x3fe96b,_0x2c5b66]of Object[_0xb9367b(0x1ba)](_0x35676a)){const _0xb61e76=_0x3fe96b[_0xb9367b(0x1bf)](/_/g,'-')[_0xb9367b(0x1b4)]();_0x31baa9[_0x3fe96b]=_0xb61e76===_0xb9367b(0x1b1)?redactVariableValues(_0x2c5b66):SENSITIVE_VALUE_KEYS['has'](_0xb61e76)||isSensitiveKey(_0x3fe96b)?REDACTED_VALUE:redactSensitiveValue(_0x2c5b66);}return _0x31baa9;}function a175_0x5295(){const _0x494801=['50YKFUet','2710vxvuzI','37593JgWObg','match','entries','1312268loKzPT','isArray','push','523672emUcpX','replace','1959189uzbXot','comment','1616552jJVsgX','4PKEVzH','test','[REDACTED]','object','variables','171786NfmrqI','346651lYdANN','toLowerCase','map'];a175_0x5295=function(){return _0x494801;};return a175_0x5295();}export function redactCommandArgv(_0x5b8309){const _0x3f663f=a175_0x77057,_0x3684f3=[];let _0x3bbc88=![];for(const _0x951b82 of _0x5b8309){if(_0x3bbc88){_0x3684f3[_0x3f663f(0x1bd)](REDACTED_VALUE),_0x3bbc88=![];continue;}const _0x3e0662=_0x951b82[_0x3f663f(0x1b9)](/^--([^=]+)(?:=(.*))?$/);if(!_0x3e0662||!isSensitiveFlagName(_0x3e0662[0x1]??'')){_0x3684f3[_0x3f663f(0x1bd)](_0x951b82);continue;}_0x3684f3[_0x3f663f(0x1bd)]('--'+_0x3e0662[0x1]+(_0x3e0662[0x2]===undefined?'':'='+REDACTED_VALUE)),_0x3e0662[0x2]===undefined&&(_0x3bbc88=!![]);}return _0x3684f3;}export{REDACTED_VALUE};
|