@lovrabet/lovrabet-cli 2.3.11 → 2.3.12-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.d.ts +13 -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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.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 +3 -2
- 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-sdk-errors.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/runtime-user-id.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 +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x11666e,_0x3265fe){const _0x2750f1=a161_0x44df,_0x3519b6=_0x11666e();while(!![]){try{const _0x2d2679=parseInt(_0x2750f1(0xea))/0x1*(-parseInt(_0x2750f1(0xd7))/0x2)+-parseInt(_0x2750f1(0xce))/0x3*(-parseInt(_0x2750f1(0xdf))/0x4)+parseInt(_0x2750f1(0xb5))/0x5*(parseInt(_0x2750f1(0xe4))/0x6)+parseInt(_0x2750f1(0xda))/0x7*(parseInt(_0x2750f1(0xd2))/0x8)+parseInt(_0x2750f1(0xc5))/0x9*(parseInt(_0x2750f1(0xd5))/0xa)+parseInt(_0x2750f1(0xbb))/0xb+parseInt(_0x2750f1(0xf3))/0xc*(-parseInt(_0x2750f1(0xef))/0xd);if(_0x2d2679===_0x3265fe)break;else _0x3519b6['push'](_0x3519b6['shift']());}catch(_0x5cce65){_0x3519b6['push'](_0x3519b6['shift']());}}}(a161_0x3b15,0x57191));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';function a161_0x3b15(){const _0x9b3574=['entries','2029040AxkKnO','scope','trim','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','84DPqdUT','validation','length','skillCode','keys','5vWyatA','errors','contents','skillName','---\x0a','flow','7028538ZHfCpT','.\x20Changed\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','---','status','path','delete','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','join','filter','26883yArtBk','version','toString','find','slice','description','example','hasOwn','map','18iIxlKZ','Managed\x20file\x20was\x20removed\x20locally:\x20','match','displayName:\x20','1315352pQqNrQ','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','packageBytes','860CkyFEu','test','48670YAAkmZ','utf8','\x0a---\x0a\x0a','21CqKtPs','isFile','accessKey','has','replace','60356dIvSGv','force','appCode','displayName','trimEnd','4052382cnjSmj','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','fileHashes','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','contentHash','Runtime\x20Skill\x20package\x20is\x20missing\x20','29JPHvVi','env','schemaVersion','paths'];a161_0x3b15=function(){return _0x9b3574;};return a161_0x3b15();}import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x367c94,_0x25e7e8,_0x3fa89a){const _0xaaa570=a161_0x44df,_0x37d028=requireSkillCode(_0x367c94),_0x5a1392=requirePackageBytes(_0x37d028,_0x3fa89a[_0xaaa570(0xd4)]),_0x44f1c2=extractDownloadedPackage(_0x5a1392),_0x783db2=_0x44f1c2['find'](_0x13581b=>_0x13581b[_0xaaa570(0xc0)]===SKILL_FILE);if(!_0x783db2)throw CliErrors[_0xaaa570(0xf4)](_0xaaa570(0xe9)+SKILL_FILE+':\x20'+_0x37d028);const _0x50a4ef=withMaterializedSkillFrontmatter(_0x44f1c2,_0x367c94,_0x37d028),_0x1fe124=_0x50a4ef[_0xaaa570(0xc8)](_0x3b3801=>_0x3b3801[_0xaaa570(0xc0)]===SKILL_FILE),_0x5505cc=fileText(_0x1fe124),_0x35ef33=getRuntimeSkillDir(_0x3fa89a['env'],_0x3fa89a[_0xaaa570(0xdc)],_0x3fa89a['appCode'],_0x25e7e8,_0x37d028,_0x3fa89a[_0xaaa570(0xed)]),_0xb105d8=resolve(_0x35ef33,SKILL_FILE),_0x213566=resolve(_0x35ef33,METADATA_FILE),_0x142207=contentHash(_0x5505cc),_0x22319c=readMetadataIfPresent(_0x213566)?.[_0xaaa570(0xe6)];ensurePulledFilesCanBeOverwritten(_0x35ef33,_0x213566,_0x50a4ef,_0x3fa89a[_0xaaa570(0xe0)]===!![]),mkdirSync(_0x35ef33,{'recursive':!![],'mode':0x1c0});const _0x42d3cf=existsSync(_0xb105d8)?readFileSync(_0xb105d8,_0xaaa570(0xd8)):undefined;return materializeFiles(_0x35ef33,_0x50a4ef),removeStaleManagedFiles(_0x35ef33,_0x22319c,_0x50a4ef),writeJsonAtomic(_0x213566,buildMetadata(_0x367c94,_0x25e7e8,_0x3fa89a[_0xaaa570(0xe1)],_0x142207,_0x3fa89a['pulledAt'],_0x50a4ef,_0x5a1392)),{'skill':_0x367c94,'scope':_0x25e7e8,'dir':_0x35ef33,'skillMdPath':_0xb105d8,'metadataPath':_0x213566,'contentHash':_0x142207,'changed':_0x42d3cf!==_0x5505cc};}export function reuseMaterializedRuntimeSkill(_0x136a15,_0x3ef986,_0x5186fc){const _0x1d4dba=a161_0x44df,_0xdfca90=_0x136a15[_0x1d4dba(0xc6)]?.[_0x1d4dba(0xf1)]();if(!_0xdfca90)return undefined;const _0xee21b3=requireSkillCode(_0x136a15),_0x3c9f27=getRuntimeSkillDir(_0x5186fc[_0x1d4dba(0xeb)],_0x5186fc[_0x1d4dba(0xdc)],_0x5186fc['appCode'],_0x3ef986,_0xee21b3,_0x5186fc[_0x1d4dba(0xed)]),_0x2882e9=resolve(_0x3c9f27,SKILL_FILE),_0x18233e=resolve(_0x3c9f27,METADATA_FILE),_0x5de990=readMetadataIfPresent(_0x18233e);if(!_0x5de990||_0x5de990[_0x1d4dba(0xec)]!==0x2||_0x5de990[_0x1d4dba(0xe1)]!==_0x5186fc['appCode']||_0x5de990[_0x1d4dba(0xf0)]!==_0x3ef986||_0x5de990[_0x1d4dba(0xf6)]!==_0xee21b3||_0x5de990['version']!==_0xdfca90||_0x5de990['id']!==_0x136a15['id']||_0x5de990['skillName']!==_0x136a15[_0x1d4dba(0xb8)]||_0x5de990[_0x1d4dba(0xca)]!==_0x136a15[_0x1d4dba(0xca)]||_0x5de990[_0x1d4dba(0xcb)]!==_0x136a15[_0x1d4dba(0xcb)]||_0x5de990['status']!==_0x136a15[_0x1d4dba(0xbf)]||!_0x5de990[_0x1d4dba(0xe8)]||!_0x5de990[_0x1d4dba(0xe6)]||!Object[_0x1d4dba(0xcc)](_0x5de990[_0x1d4dba(0xe6)],SKILL_FILE))return undefined;for(const [_0x185164,_0x51d08b]of Object[_0x1d4dba(0xee)](_0x5de990[_0x1d4dba(0xe6)])){if(!/^[a-f0-9]{64}$/[_0x1d4dba(0xd6)](_0x51d08b))return undefined;const _0x53c8b2=resolveManagedFilePath(_0x3c9f27,_0x185164);if(!existsSync(_0x53c8b2)||!lstatSync(_0x53c8b2)[_0x1d4dba(0xdb)]())return undefined;if(bufferSha256(readFileSync(_0x53c8b2))!==_0x51d08b)return undefined;}return{'skill':_0x136a15,'scope':_0x3ef986,'dir':_0x3c9f27,'skillMdPath':_0x2882e9,'metadataPath':_0x18233e,'contentHash':_0x5de990['contentHash'],'changed':![]};}function withMaterializedSkillFrontmatter(_0x4b92d7,_0x716a3f,_0x515a2e){const _0x3ea729=a161_0x44df,_0x13246f=skillDisplayName(_0x716a3f,_0x515a2e),_0x4f2c33=_0x716a3f[_0x3ea729(0xca)]?.[_0x3ea729(0xf1)]()||_0x13246f||_0x515a2e;return normalizeLocalFiles(_0x4b92d7)[_0x3ea729(0xcd)](_0x3cf102=>{const _0x3c8dc0=_0x3ea729,_0x2c8066=fileText(_0x3cf102);if(_0x3cf102[_0x3c8dc0(0xc0)]!==SKILL_FILE)return _0x3cf102;if(hasYamlFrontmatter(_0x2c8066))return{'path':_0x3cf102[_0x3c8dc0(0xc0)],'content':withSyncedDisplayName(_0x2c8066,_0x13246f)};return{'path':_0x3cf102[_0x3c8dc0(0xc0)],'content':prependSkillFrontmatter(_0x2c8066,{'name':_0x515a2e,'displayName':_0x13246f,'description':_0x4f2c33})};});}function hasYamlFrontmatter(_0x1b05ef){const _0x3d7385=a161_0x44df;return/^\uFEFF?---\s*\r?\n/[_0x3d7385(0xd6)](_0x1b05ef);}function prependSkillFrontmatter(_0x16986f,_0x4f1db0){const _0x251f67=a161_0x44df,_0x2b0495=_0x16986f['replace'](/^\uFEFF/,'');return[_0x251f67(0xbe),'name:\x20'+yamlString(_0x4f1db0['name']),_0x4f1db0['displayName']?_0x251f67(0xd1)+yamlString(_0x4f1db0[_0x251f67(0xe2)]):undefined,'description:\x20'+yamlString(_0x4f1db0['description']),_0x251f67(0xbe),'',_0x2b0495][_0x251f67(0xc4)](_0x575a5a=>_0x575a5a!==undefined)[_0x251f67(0xc3)]('\x0a');}function yamlString(_0xfbead5){return JSON['stringify'](_0xfbead5['replace'](/\r/g,'')['trim']());}function skillDisplayName(_0x2446ac,_0x4ded1c){const _0x2c0313=a161_0x44df,_0x3450bb=_0x2446ac[_0x2c0313(0xb8)]?.[_0x2c0313(0xf1)]();return _0x3450bb||_0x4ded1c;}function withSyncedDisplayName(_0x4a8141,_0x37f8ed){const _0x28ee18=a161_0x44df,_0x439498=_0x4a8141[_0x28ee18(0xd0)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x439498)return _0x4a8141;const _0x56a444=_0x439498[0x1]??'',_0x12a5d4=_0x439498[0x2]??'',_0x31480c=parseDocument(_0x12a5d4);if(_0x31480c[_0x28ee18(0xb6)]['length']>0x0||!isMap(_0x31480c[_0x28ee18(0xb7)]))return _0x4a8141;if(_0x37f8ed)_0x31480c['set'](_0x28ee18(0xe2),_0x37f8ed);else{if(_0x31480c[_0x28ee18(0xdd)](_0x28ee18(0xe2)))_0x31480c[_0x28ee18(0xc1)](_0x28ee18(0xe2));else return _0x4a8141;}forceBlockCollections(_0x31480c[_0x28ee18(0xb7)]);const _0x5723f5=_0x31480c[_0x28ee18(0xc7)]({'lineWidth':0x0})[_0x28ee18(0xe3)](),_0x5d0b65=_0x4a8141[_0x28ee18(0xc9)](_0x439498[0x0][_0x28ee18(0xf5)])[_0x28ee18(0xde)](/^\r?\n/,'');return _0x56a444+_0x28ee18(0xb9)+_0x5723f5+_0x28ee18(0xd9)+_0x5d0b65;}function forceBlockCollections(_0xe04af7){if(!isNode(_0xe04af7))return;visit(_0xe04af7,(_0x3e0f1f,_0x19756a)=>{const _0x4bff54=a161_0x44df;isCollection(_0x19756a)&&(_0x19756a[_0x4bff54(0xba)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x422e7a,_0x499908,_0x5221f0,_0x928580){const _0xebd506=a161_0x44df;if(_0x928580||!existsSync(_0x499908))return;const _0x28d652=readMetadataIfPresent(_0x499908);if(!_0x28d652)return;const _0x2573d3=_0x28d652[_0xebd506(0xe6)]&&Object[_0xebd506(0xb4)](_0x28d652[_0xebd506(0xe6)])[_0xebd506(0xf5)]>0x0?_0x28d652[_0xebd506(0xe6)]:undefined;if(_0x2573d3)for(const [_0x583478,_0x5f4105]of Object[_0xebd506(0xee)](_0x2573d3)){const _0x22034c=resolveManagedFilePath(_0x422e7a,_0x583478);if(!existsSync(_0x22034c))throw CliErrors[_0xebd506(0xf4)](_0xebd506(0xf2)+_0x422e7a,_0xebd506(0xcf)+_0x583478);const _0x793d14=lstatSync(_0x22034c);if(!_0x793d14[_0xebd506(0xdb)]())throw CliErrors[_0xebd506(0xf4)](_0xebd506(0xf2)+_0x422e7a,_0xebd506(0xe7)+_0x583478);const _0x5c523c=bufferSha256(readFileSync(_0x22034c));if(_0x5c523c!==_0x5f4105)throw CliErrors[_0xebd506(0xf4)](_0xebd506(0xf2)+_0x422e7a+_0xebd506(0xbc)+_0x583478,_0xebd506(0xc2)+_0x583478);}else{const _0x2acc41=resolve(_0x422e7a,SKILL_FILE);if(existsSync(_0x2acc41)&&_0x28d652[_0xebd506(0xe8)]){const _0x36a32c=contentHash(readFileSync(_0x2acc41,_0xebd506(0xd8)));if(_0x36a32c!==_0x28d652[_0xebd506(0xe8)])throw CliErrors[_0xebd506(0xf4)](_0xebd506(0xd3)+_0x2acc41,_0xebd506(0xbd));}}for(const _0x225e0e of normalizeLocalFiles(_0x5221f0)){if(_0x2573d3?.[_0x225e0e[_0xebd506(0xc0)]])continue;if(!_0x2573d3&&_0x225e0e['path']===SKILL_FILE)continue;const _0x103b48=resolveManagedFilePath(_0x422e7a,_0x225e0e[_0xebd506(0xc0)]);if(!existsSync(_0x103b48))continue;const _0x26a29d=lstatSync(_0x103b48);if(!_0x26a29d['isFile']())throw CliErrors['validation'](_0xebd506(0xf2)+_0x422e7a,_0xebd506(0xe5)+_0x225e0e['path']);const _0x227614=bufferSha256(readFileSync(_0x103b48));if(_0x227614!==fileHash(_0x225e0e))throw CliErrors[_0xebd506(0xf4)](_0xebd506(0xf2)+_0x422e7a,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x225e0e[_0xebd506(0xc0)]);}}function a161_0x44df(_0x4d516c,_0x3a853d){_0x4d516c=_0x4d516c-0xb4;const _0x3b15e1=a161_0x3b15();let _0x44dfcc=_0x3b15e1[_0x4d516c];return _0x44dfcc;}function materializeFiles(_0x2234fd,_0x403292){const _0x3c4d39=a161_0x44df;for(const _0x53967c of normalizeLocalFiles(_0x403292)){const _0x50a055=resolveManagedFilePath(_0x2234fd,_0x53967c[_0x3c4d39(0xc0)]);mkdirSync(dirname(_0x50a055),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x50a055,fileContent(_0x53967c),0x180);}}function removeStaleManagedFiles(_0x2611fc,_0x559a13,_0x4c692a){const _0x1e8e50=a161_0x44df;if(!_0x559a13)return;const _0x2b76fc=new Set(normalizeLocalFiles(_0x4c692a)['map'](_0x3a4e37=>_0x3a4e37[_0x1e8e50(0xc0)]));for(const _0x1bae86 of Object[_0x1e8e50(0xb4)](_0x559a13)){if(_0x2b76fc['has'](_0x1bae86))continue;const _0x2c5803=resolveManagedFilePath(_0x2611fc,_0x1bae86);existsSync(_0x2c5803)&&lstatSync(_0x2c5803)[_0x1e8e50(0xdb)]()&&rmSync(_0x2c5803,{'force':!![]});}}
|
|
1
|
+
(function(_0x1a8259,_0xb4baed){const _0xa6e242=a161_0x2104,_0x3c7892=_0x1a8259();while(!![]){try{const _0x114887=parseInt(_0xa6e242(0x1c6))/0x1*(-parseInt(_0xa6e242(0x1ac))/0x2)+-parseInt(_0xa6e242(0x1b7))/0x3*(parseInt(_0xa6e242(0x1a6))/0x4)+-parseInt(_0xa6e242(0x1bf))/0x5+parseInt(_0xa6e242(0x1d5))/0x6+-parseInt(_0xa6e242(0x1cb))/0x7*(parseInt(_0xa6e242(0x1d7))/0x8)+parseInt(_0xa6e242(0x1b3))/0x9+parseInt(_0xa6e242(0x1b2))/0xa;if(_0x114887===_0xb4baed)break;else _0x3c7892['push'](_0x3c7892['shift']());}catch(_0x420a7f){_0x3c7892['push'](_0x3c7892['shift']());}}}(a161_0x672c,0x3b11e));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';function a161_0x2104(_0x48be69,_0x7c01fb){_0x48be69=_0x48be69-0x1a0;const _0x672ce=a161_0x672c();let _0x21043c=_0x672ce[_0x48be69];return _0x21043c;}import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';function a161_0x672c(){const _0x3a2e03=['join','utf8','contentHash','slice','find','has','1185495xHObdQ','appCode','\x0a---\x0a\x0a','description','skillCode','set','skillName','1VpLKyc','Managed\x20file\x20was\x20removed\x20locally:\x20','version','name','---','1141zWwqeM','validation','filter','contents','flow','status','packageBytes','entries','.\x20Changed\x20file:\x20','errors','1538970hBcQLX','accessKey','11560jUHruW','length','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','force','match','pulledAt','map','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','fileHashes','replace','example','schemaVersion','keys','env','hasOwn','20IJECrN','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','path','displayName:\x20','name:\x20','stringify','89646hEEkLL','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','trim','test','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','isFile','6433430OYRrCO','331866IFsQzC','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','paths','displayName','106383zDdRwT','Runtime\x20Skill\x20package\x20is\x20missing\x20'];a161_0x672c=function(){return _0x3a2e03;};return a161_0x672c();}import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x338d20,_0x5b6df8,_0x1ec6f8){const _0x314325=a161_0x2104,_0x3b6400=requireSkillCode(_0x338d20),_0x3b2211=requirePackageBytes(_0x3b6400,_0x1ec6f8[_0x314325(0x1d1)]),_0x17e731=extractDownloadedPackage(_0x3b2211),_0xd89e3c=_0x17e731[_0x314325(0x1bd)](_0x1c648e=>_0x1c648e['path']===SKILL_FILE);if(!_0xd89e3c)throw CliErrors[_0x314325(0x1cc)](_0x314325(0x1b8)+SKILL_FILE+':\x20'+_0x3b6400);const _0x4e27af=withMaterializedSkillFrontmatter(_0x17e731,_0x338d20,_0x3b6400),_0x2e61c8=_0x4e27af[_0x314325(0x1bd)](_0x17c16e=>_0x17c16e[_0x314325(0x1a8)]===SKILL_FILE),_0x577bc8=fileText(_0x2e61c8),_0x369769=getRuntimeSkillDir(_0x1ec6f8[_0x314325(0x1a4)],_0x1ec6f8['accessKey'],_0x1ec6f8[_0x314325(0x1c0)],_0x5b6df8,_0x3b6400,_0x1ec6f8[_0x314325(0x1b5)]),_0xeb18e5=resolve(_0x369769,SKILL_FILE),_0x190b66=resolve(_0x369769,METADATA_FILE),_0x131b5=contentHash(_0x577bc8),_0x5318e4=readMetadataIfPresent(_0x190b66)?.[_0x314325(0x1df)];ensurePulledFilesCanBeOverwritten(_0x369769,_0x190b66,_0x4e27af,_0x1ec6f8[_0x314325(0x1da)]===!![]),mkdirSync(_0x369769,{'recursive':!![],'mode':0x1c0});const _0x2b5be6=existsSync(_0xeb18e5)?readFileSync(_0xeb18e5,_0x314325(0x1ba)):undefined;return materializeFiles(_0x369769,_0x4e27af),removeStaleManagedFiles(_0x369769,_0x5318e4,_0x4e27af),writeJsonAtomic(_0x190b66,buildMetadata(_0x338d20,_0x5b6df8,_0x1ec6f8['appCode'],_0x131b5,_0x1ec6f8[_0x314325(0x1dc)],_0x4e27af,_0x3b2211)),{'skill':_0x338d20,'scope':_0x5b6df8,'dir':_0x369769,'skillMdPath':_0xeb18e5,'metadataPath':_0x190b66,'contentHash':_0x131b5,'changed':_0x2b5be6!==_0x577bc8};}export function reuseMaterializedRuntimeSkill(_0x39d2a4,_0x3fbdc2,_0x41ee51){const _0x2ee854=a161_0x2104,_0x3c1b65=_0x39d2a4[_0x2ee854(0x1c8)]?.[_0x2ee854(0x1ae)]();if(!_0x3c1b65)return undefined;const _0x5370d1=requireSkillCode(_0x39d2a4),_0x50bcdf=getRuntimeSkillDir(_0x41ee51['env'],_0x41ee51[_0x2ee854(0x1d6)],_0x41ee51[_0x2ee854(0x1c0)],_0x3fbdc2,_0x5370d1,_0x41ee51[_0x2ee854(0x1b5)]),_0x1ce15f=resolve(_0x50bcdf,SKILL_FILE),_0x531554=resolve(_0x50bcdf,METADATA_FILE),_0xd345e6=readMetadataIfPresent(_0x531554);if(!_0xd345e6||_0xd345e6[_0x2ee854(0x1a2)]!==0x2||_0xd345e6[_0x2ee854(0x1c0)]!==_0x41ee51['appCode']||_0xd345e6['scope']!==_0x3fbdc2||_0xd345e6[_0x2ee854(0x1c3)]!==_0x5370d1||_0xd345e6[_0x2ee854(0x1c8)]!==_0x3c1b65||_0xd345e6['id']!==_0x39d2a4['id']||_0xd345e6[_0x2ee854(0x1c5)]!==_0x39d2a4['skillName']||_0xd345e6[_0x2ee854(0x1c2)]!==_0x39d2a4[_0x2ee854(0x1c2)]||_0xd345e6[_0x2ee854(0x1a1)]!==_0x39d2a4[_0x2ee854(0x1a1)]||_0xd345e6[_0x2ee854(0x1d0)]!==_0x39d2a4[_0x2ee854(0x1d0)]||!_0xd345e6[_0x2ee854(0x1bb)]||!_0xd345e6[_0x2ee854(0x1df)]||!Object[_0x2ee854(0x1a5)](_0xd345e6['fileHashes'],SKILL_FILE))return undefined;for(const [_0x2c1352,_0x35933a]of Object['entries'](_0xd345e6['fileHashes'])){if(!/^[a-f0-9]{64}$/[_0x2ee854(0x1af)](_0x35933a))return undefined;const _0xf67abe=resolveManagedFilePath(_0x50bcdf,_0x2c1352);if(!existsSync(_0xf67abe)||!lstatSync(_0xf67abe)[_0x2ee854(0x1b1)]())return undefined;if(bufferSha256(readFileSync(_0xf67abe))!==_0x35933a)return undefined;}return{'skill':_0x39d2a4,'scope':_0x3fbdc2,'dir':_0x50bcdf,'skillMdPath':_0x1ce15f,'metadataPath':_0x531554,'contentHash':_0xd345e6['contentHash'],'changed':![]};}function withMaterializedSkillFrontmatter(_0x57f948,_0x287f01,_0x2bf364){const _0x243673=a161_0x2104,_0x503909=skillDisplayName(_0x287f01,_0x2bf364),_0x461504=_0x287f01['description']?.[_0x243673(0x1ae)]()||_0x503909||_0x2bf364;return normalizeLocalFiles(_0x57f948)[_0x243673(0x1dd)](_0x2120de=>{const _0x187bf2=_0x243673,_0x12e3cd=fileText(_0x2120de);if(_0x2120de[_0x187bf2(0x1a8)]!==SKILL_FILE)return _0x2120de;if(hasYamlFrontmatter(_0x12e3cd))return{'path':_0x2120de[_0x187bf2(0x1a8)],'content':withSyncedDisplayName(_0x12e3cd,_0x503909)};return{'path':_0x2120de[_0x187bf2(0x1a8)],'content':prependSkillFrontmatter(_0x12e3cd,{'name':_0x2bf364,'displayName':_0x503909,'description':_0x461504})};});}function hasYamlFrontmatter(_0x1e4402){return/^\uFEFF?---\s*\r?\n/['test'](_0x1e4402);}function prependSkillFrontmatter(_0x6f33e2,_0x1996a6){const _0x5a0641=a161_0x2104,_0x1de5c5=_0x6f33e2[_0x5a0641(0x1a0)](/^\uFEFF/,'');return[_0x5a0641(0x1ca),_0x5a0641(0x1aa)+yamlString(_0x1996a6[_0x5a0641(0x1c9)]),_0x1996a6[_0x5a0641(0x1b6)]?_0x5a0641(0x1a9)+yamlString(_0x1996a6['displayName']):undefined,'description:\x20'+yamlString(_0x1996a6[_0x5a0641(0x1c2)]),_0x5a0641(0x1ca),'',_0x1de5c5][_0x5a0641(0x1cd)](_0x3e000b=>_0x3e000b!==undefined)[_0x5a0641(0x1b9)]('\x0a');}function yamlString(_0x45fc07){const _0x5a4dbd=a161_0x2104;return JSON[_0x5a4dbd(0x1ab)](_0x45fc07[_0x5a4dbd(0x1a0)](/\r/g,'')[_0x5a4dbd(0x1ae)]());}function skillDisplayName(_0xe6a625,_0x35bac5){const _0x5b4494=_0xe6a625['skillName']?.['trim']();return _0x5b4494||_0x35bac5;}function withSyncedDisplayName(_0x4de9d9,_0x5a8c95){const _0x5449d7=a161_0x2104,_0x1bce20=_0x4de9d9[_0x5449d7(0x1db)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1bce20)return _0x4de9d9;const _0x9fc81c=_0x1bce20[0x1]??'',_0x2d7100=_0x1bce20[0x2]??'',_0x33bde4=parseDocument(_0x2d7100);if(_0x33bde4[_0x5449d7(0x1d4)][_0x5449d7(0x1d8)]>0x0||!isMap(_0x33bde4[_0x5449d7(0x1ce)]))return _0x4de9d9;if(_0x5a8c95)_0x33bde4[_0x5449d7(0x1c4)](_0x5449d7(0x1b6),_0x5a8c95);else{if(_0x33bde4[_0x5449d7(0x1be)](_0x5449d7(0x1b6)))_0x33bde4['delete'](_0x5449d7(0x1b6));else return _0x4de9d9;}forceBlockCollections(_0x33bde4[_0x5449d7(0x1ce)]);const _0x4cab0e=_0x33bde4['toString']({'lineWidth':0x0})['trimEnd'](),_0x5f3a2f=_0x4de9d9[_0x5449d7(0x1bc)](_0x1bce20[0x0][_0x5449d7(0x1d8)])[_0x5449d7(0x1a0)](/^\r?\n/,'');return _0x9fc81c+'---\x0a'+_0x4cab0e+_0x5449d7(0x1c1)+_0x5f3a2f;}function forceBlockCollections(_0x2470f2){if(!isNode(_0x2470f2))return;visit(_0x2470f2,(_0x29ff69,_0x17e126)=>{const _0x4e5ada=a161_0x2104;isCollection(_0x17e126)&&(_0x17e126[_0x4e5ada(0x1cf)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x23c121,_0x20a4ee,_0x5743e0,_0x252982){const _0x126fb1=a161_0x2104;if(_0x252982||!existsSync(_0x20a4ee))return;const _0x136e3a=readMetadataIfPresent(_0x20a4ee);if(!_0x136e3a)return;const _0xd7e108=_0x136e3a['fileHashes']&&Object['keys'](_0x136e3a[_0x126fb1(0x1df)])['length']>0x0?_0x136e3a['fileHashes']:undefined;if(_0xd7e108)for(const [_0x482a8d,_0x14aed6]of Object[_0x126fb1(0x1d2)](_0xd7e108)){const _0x5dc8f2=resolveManagedFilePath(_0x23c121,_0x482a8d);if(!existsSync(_0x5dc8f2))throw CliErrors[_0x126fb1(0x1cc)](_0x126fb1(0x1de)+_0x23c121,_0x126fb1(0x1c7)+_0x482a8d);const _0x37cd4d=lstatSync(_0x5dc8f2);if(!_0x37cd4d[_0x126fb1(0x1b1)]())throw CliErrors[_0x126fb1(0x1cc)](_0x126fb1(0x1de)+_0x23c121,_0x126fb1(0x1a7)+_0x482a8d);const _0x461e4b=bufferSha256(readFileSync(_0x5dc8f2));if(_0x461e4b!==_0x14aed6)throw CliErrors[_0x126fb1(0x1cc)](_0x126fb1(0x1de)+_0x23c121+_0x126fb1(0x1d3)+_0x482a8d,_0x126fb1(0x1b4)+_0x482a8d);}else{const _0x2e5ce9=resolve(_0x23c121,SKILL_FILE);if(existsSync(_0x2e5ce9)&&_0x136e3a[_0x126fb1(0x1bb)]){const _0x4d5c90=contentHash(readFileSync(_0x2e5ce9,_0x126fb1(0x1ba)));if(_0x4d5c90!==_0x136e3a[_0x126fb1(0x1bb)])throw CliErrors[_0x126fb1(0x1cc)](_0x126fb1(0x1ad)+_0x2e5ce9,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x2f0077 of normalizeLocalFiles(_0x5743e0)){if(_0xd7e108?.[_0x2f0077[_0x126fb1(0x1a8)]])continue;if(!_0xd7e108&&_0x2f0077[_0x126fb1(0x1a8)]===SKILL_FILE)continue;const _0x4ca7c2=resolveManagedFilePath(_0x23c121,_0x2f0077['path']);if(!existsSync(_0x4ca7c2))continue;const _0x201061=lstatSync(_0x4ca7c2);if(!_0x201061[_0x126fb1(0x1b1)]())throw CliErrors[_0x126fb1(0x1cc)](_0x126fb1(0x1de)+_0x23c121,_0x126fb1(0x1d9)+_0x2f0077[_0x126fb1(0x1a8)]);const _0x3d2ea0=bufferSha256(readFileSync(_0x4ca7c2));if(_0x3d2ea0!==fileHash(_0x2f0077))throw CliErrors[_0x126fb1(0x1cc)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x23c121,_0x126fb1(0x1b0)+_0x2f0077[_0x126fb1(0x1a8)]);}}function materializeFiles(_0x357a4a,_0x5925d4){const _0x13a4e7=a161_0x2104;for(const _0x2e6515 of normalizeLocalFiles(_0x5925d4)){const _0x1c6e3e=resolveManagedFilePath(_0x357a4a,_0x2e6515[_0x13a4e7(0x1a8)]);mkdirSync(dirname(_0x1c6e3e),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x1c6e3e,fileContent(_0x2e6515),0x180);}}function removeStaleManagedFiles(_0x211073,_0x4b20b7,_0x3ef664){const _0x51a590=a161_0x2104;if(!_0x4b20b7)return;const _0x3d5968=new Set(normalizeLocalFiles(_0x3ef664)[_0x51a590(0x1dd)](_0x3b7927=>_0x3b7927['path']));for(const _0x1cea98 of Object[_0x51a590(0x1a3)](_0x4b20b7)){if(_0x3d5968[_0x51a590(0x1be)](_0x1cea98))continue;const _0x4881a5=resolveManagedFilePath(_0x211073,_0x1cea98);existsSync(_0x4881a5)&&lstatSync(_0x4881a5)[_0x51a590(0x1b1)]()&&rmSync(_0x4881a5,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a8b7c,_0x192c69){const _0x60ea4f=a162_0x5995,_0x1d9642=_0x5a8b7c();while(!![]){try{const _0x49c060=-parseInt(_0x60ea4f(0xbe))/0x1+parseInt(_0x60ea4f(0xcf))/0x2*(-parseInt(_0x60ea4f(0xdf))/0x3)+parseInt(_0x60ea4f(0xd2))/0x4+parseInt(_0x60ea4f(0xe0))/0x5*(parseInt(_0x60ea4f(0xcb))/0x6)+parseInt(_0x60ea4f(0xdb))/0x7*(-parseInt(_0x60ea4f(0xc5))/0x8)+-parseInt(_0x60ea4f(0xc0))/0x9+parseInt(_0x60ea4f(0xe2))/0xa*(parseInt(_0x60ea4f(0xd0))/0xb);if(_0x49c060===_0x192c69)break;else _0x1d9642['push'](_0x1d9642['shift']());}catch(_0x8348be){_0x1d9642['push'](_0x1d9642['shift']());}}}(a162_0x16d3,0x27053));function a162_0x16d3(){const _0x599e2d=['trim','285774fVAKDS','Invalid\x20','zipSize','isArray','133798XrwNMC','11INOcyY','forkedFromVersion','1056276GIMrAR','status','utf8','skillCode','forkedFromSkillId','personal','map','sourceSessionId','parse','154yVQlBg','manifest','readonly','fromEntries','9XJkYGZ','30axmQlY','tenantCode','2498770OSxtbR','files','length','hasUpstreamUpdate','ossPath','userId','155115dwPbTP','path','387639hvXEoW','string','zipSha256','tags','Runtime\x20Skill\x20is\x20missing\x20skillCode.','87640ROkmGW','version','description','validation','example'];a162_0x16d3=function(){return _0x599e2d;};return a162_0x16d3();}import{existsSync,readFileSync}from'node:fs';function a162_0x5995(_0x16a1b2,_0x34f520){_0x16a1b2=_0x16a1b2-0xbc;const _0x16d365=a162_0x16d3();let _0x5995ba=_0x16d365[_0x16a1b2];return _0x5995ba;}import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0xaf8946,_0x5069aa,_0x337302,_0x36ea7d,_0x3dc306,_0x3abf6b,_0x5f0be4){const _0x1349f4=a162_0x5995,_0x27b310=_0x3abf6b?normalizeLocalFiles(_0x3abf6b):[],_0x51ea65=!_0x5f0be4&&_0x27b310['length']>0x0?buildSkillPackage(_0x27b310):undefined,_0x2feb8a=_0x5f0be4?bufferSha256(_0x5f0be4):_0x51ea65?.[_0x1349f4(0xdc)][_0x1349f4(0xc2)],_0xd2a8f9=_0x5f0be4?.[_0x1349f4(0xe4)]??_0x51ea65?.[_0x1349f4(0xdc)][_0x1349f4(0xcd)],_0xfef083=_0x27b310[_0x1349f4(0xe4)]>0x0?Object[_0x1349f4(0xde)](_0x27b310[_0x1349f4(0xd8)](_0x3b830b=>[_0x3b830b[_0x1349f4(0xbf)],fileHash(_0x3b830b)])):undefined;return{'schemaVersion':_0x27b310[_0x1349f4(0xe4)]>0x0?0x2:0x1,'id':_0xaf8946['id'],'appCode':_0x337302,'skillCode':requireSkillCode(_0xaf8946),'skillName':_0xaf8946['skillName'],'description':_0xaf8946[_0x1349f4(0xc7)],'example':_0xaf8946[_0x1349f4(0xc9)],'scope':_0x5069aa,'readonly':_0x5069aa!==_0x1349f4(0xd7)||_0xaf8946[_0x1349f4(0xdd)]===!![],'tenantCode':_0xaf8946[_0x1349f4(0xe1)],'userId':_0xaf8946[_0x1349f4(0xbd)],'version':_0xaf8946[_0x1349f4(0xc6)],'status':_0xaf8946[_0x1349f4(0xd3)],'tags':Array[_0x1349f4(0xce)](_0xaf8946[_0x1349f4(0xc3)])?_0xaf8946[_0x1349f4(0xc3)]:[],'hasUpstreamUpdate':_0xaf8946[_0x1349f4(0xe5)],'forkedFromSkillId':_0xaf8946[_0x1349f4(0xd6)],'forkedFromVersion':_0xaf8946[_0x1349f4(0xd1)],'sourceSessionId':_0xaf8946[_0x1349f4(0xd9)],'contentHash':_0x36ea7d,'fileHashes':_0xfef083,'treeHash':_0x27b310['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x27b310)):undefined,'ossPath':remoteManifestOssPath(_0xaf8946[_0x1349f4(0xe3)]),'zipSha256':_0x2feb8a,'zipSize':_0xd2a8f9,'files':_0x27b310['length']>0x0?_0x27b310[_0x1349f4(0xd8)](_0x5b4878=>({'path':_0x5b4878[_0x1349f4(0xbf)],'hash':fileHash(_0x5b4878),'size':fileContent(_0x5b4878)[_0x1349f4(0xe4)]})):undefined,'pulledAt':_0x3dc306??new Date()['toISOString']()};}export function requireSkillCode(_0x551360){const _0x20b138=a162_0x5995,_0x2580dd=_0x551360[_0x20b138(0xd5)]?.['trim']();if(!_0x2580dd)throw CliErrors['validation'](_0x20b138(0xc4));return _0x2580dd;}export function readMetadataIfPresent(_0x38ae6a){const _0x5934cc=a162_0x5995;if(!existsSync(_0x38ae6a))return undefined;try{const _0x12935a=JSON[_0x5934cc(0xda)](readFileSync(_0x38ae6a,_0x5934cc(0xd4)));return _0x12935a;}catch{throw CliErrors[_0x5934cc(0xc8)](_0x5934cc(0xcc)+METADATA_FILE+':\x20'+_0x38ae6a);}}function remoteManifestOssPath(_0xa85752){const _0x3cc4b9=a162_0x5995;if(!_0xa85752||typeof _0xa85752!=='object'||Array['isArray'](_0xa85752))return undefined;const _0x1b8882=_0xa85752[_0x3cc4b9(0xbc)];return typeof _0x1b8882===_0x3cc4b9(0xc1)&&_0x1b8882[_0x3cc4b9(0xca)]()?_0x1b8882[_0x3cc4b9(0xca)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a163_0x298366=a163_0x35e5;(function(_0x197eed,_0x1a5a82){const _0x21aff4=a163_0x35e5,_0x3747c0=_0x197eed();while(!![]){try{const _0x2862c5=parseInt(_0x21aff4(0x1c1))/0x1+parseInt(_0x21aff4(0x1b9))/0x2+parseInt(_0x21aff4(0x1bf))/0x3+parseInt(_0x21aff4(0x1c9))/0x4+parseInt(_0x21aff4(0x1b7))/0x5*(parseInt(_0x21aff4(0x1c8))/0x6)+-parseInt(_0x21aff4(0x1ba))/0x7+parseInt(_0x21aff4(0x1d1))/0x8;if(_0x2862c5===_0x1a5a82)break;else _0x3747c0['push'](_0x3747c0['shift']());}catch(_0x5b7bd8){_0x3747c0['push'](_0x3747c0['shift']());}}}(a163_0x55b9,0x458cb));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';function a163_0x55b9(){const _0x4882f2=['path\x20segment','17540DtNXcx','3895178VDKzhi','claudeSkillsDir','cache','homeDir','trim','114246sXkQdq','appCode','399605UkmxTQ','Unsafe\x20','skills','agentsSkillsDir','skillCode','validation','CLAUDE_SKILL_ROOT','1653528vHnkcC','19240oXBdPE','filter','workbuddySkillsDir','\x20for\x20local\x20path:\x20','includes','.workbuddy','cacheRoot','.claude','915792voFUVX','homeDirName','SKILL_ROOT','5LJHlso'];a163_0x55b9=function(){return _0x4882f2;};return a163_0x55b9();}export function resolveSkillSyncPaths(_0x5a08a8={}){const _0x39db75=a163_0x35e5,_0xba399e=_0x5a08a8[_0x39db75(0x1bd)]??homedir(),_0x5d9296=resolve(_0xba399e,PRODUCT_CONFIG[_0x39db75(0x1d2)],_0x39db75(0x1bc)),_0x98172d=trimmedEnv(_0x39db75(0x1b6)),_0x3bada3=trimmedEnv(_0x39db75(0x1c7)),_0x9a1612=resolve(_0xba399e,_0x39db75(0x1ce)),_0x71cc55=_0x5a08a8[_0x39db75(0x1cb)]??(existsSync(_0x9a1612)?resolve(_0x9a1612,_0x39db75(0x1c3)):undefined);return{'homeDir':_0xba399e,'cacheRoot':_0x5d9296,'managedRoot':resolve(_0xba399e,PRODUCT_CONFIG[_0x39db75(0x1d2)]),'agentsSkillsDir':_0x5a08a8[_0x39db75(0x1c4)]??_0x98172d??resolve(_0xba399e,'.agents','skills'),'claudeSkillsDir':_0x5a08a8['claudeSkillsDir']??_0x3bada3??resolve(_0xba399e,_0x39db75(0x1d0),_0x39db75(0x1c3)),'workbuddySkillsDir':_0x71cc55};}export function runtimeAgentSkillRoots(_0x5da650){const _0x374132=a163_0x35e5;return[_0x5da650['agentsSkillsDir'],_0x5da650[_0x374132(0x1bb)],_0x5da650['workbuddySkillsDir']][_0x374132(0x1ca)](_0xb0b507=>Boolean(_0xb0b507));}export function getRuntimeSkillCacheRoot(_0x2d2798,_0x3331b0,_0x1a2053={}){const _0x47ef5a=a163_0x35e5,_0x11af42=resolveSkillSyncPaths(_0x1a2053);return resolve(_0x11af42[_0x47ef5a(0x1cf)],_0x2d2798,fingerprintAccessKey(_0x3331b0),'skills');}export function getRuntimeSkillDir(_0x16c3cd,_0x2f4d87,_0x8a925a,_0x95fa8e,_0x58bbf7,_0x4007c1={}){const _0x394b42=a163_0x35e5;return resolve(getRuntimeSkillCacheRoot(_0x16c3cd,_0x2f4d87,_0x4007c1),safePathSegment(_0x8a925a,_0x394b42(0x1c0)),_0x95fa8e,safePathSegment(_0x58bbf7,_0x394b42(0x1c5)));}export function safePathSegment(_0x36e8ff,_0x32276a=a163_0x298366(0x1b8)){const _0x3b9949=a163_0x298366;if(!_0x36e8ff||_0x36e8ff[_0x3b9949(0x1cd)]('/')||_0x36e8ff[_0x3b9949(0x1cd)]('\x5c')||_0x36e8ff['includes']('..'))throw CliErrors[_0x3b9949(0x1c6)](_0x3b9949(0x1c2)+_0x32276a+_0x3b9949(0x1cc)+_0x36e8ff);return _0x36e8ff;}function a163_0x35e5(_0x1fa8ba,_0x2c0bbe){_0x1fa8ba=_0x1fa8ba-0x1b6;const _0x55b90c=a163_0x55b9();let _0x35e586=_0x55b90c[_0x1fa8ba];return _0x35e586;}function trimmedEnv(_0x5f5515){const _0x3ba17b=a163_0x298366,_0xe53f02=productEnv(_0x5f5515)?.[_0x3ba17b(0x1be)]();return _0xe53f02?_0xe53f02:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4fc1d5,_0x1f34c5){const _0x4f37e9=a164_0x5ed0,_0x1cc37d=_0x4fc1d5();while(!![]){try{const _0x12c190=parseInt(_0x4f37e9(0xf1))/0x1*(parseInt(_0x4f37e9(0xca))/0x2)+parseInt(_0x4f37e9(0xfb))/0x3+-parseInt(_0x4f37e9(0xd0))/0x4+parseInt(_0x4f37e9(0xe2))/0x5*(parseInt(_0x4f37e9(0xe0))/0x6)+parseInt(_0x4f37e9(0xdf))/0x7*(parseInt(_0x4f37e9(0xf4))/0x8)+-parseInt(_0x4f37e9(0xdd))/0x9*(-parseInt(_0x4f37e9(0xc1))/0xa)+parseInt(_0x4f37e9(0xed))/0xb*(-parseInt(_0x4f37e9(0xd2))/0xc);if(_0x12c190===_0x1f34c5)break;else _0x1cc37d['push'](_0x1cc37d['shift']());}catch(_0x370629){_0x1cc37d['push'](_0x1cc37d['shift']());}}}(a164_0x1c6d,0x4d5f1));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a164_0x4e2504}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(_0x42532f,_0x330a9f,_0x176be1={}){const _0x5a9c4a=a164_0x5ed0,_0x30079d=resolvePushDirectoryRoot(_0x42532f),_0x390d14=readPushMetadataIfPresent(resolve(_0x30079d,METADATA_FILE),{'ignoreInvalidMetadata':_0x176be1[_0x5a9c4a(0xfc)]});if(_0x390d14?.[_0x5a9c4a(0xbd)]&&_0x390d14[_0x5a9c4a(0xbd)]!==_0x330a9f&&!_0x176be1[_0x5a9c4a(0xcf)]&&!_0x176be1['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x5a9c4a(0xc4)]('Skill\x20metadata\x20appCode\x20\x22'+_0x390d14[_0x5a9c4a(0xbd)]+_0x5a9c4a(0xf5)+_0x330a9f+'\x22.');const _0x4e7410=resolvePushSkillCode(_0x30079d,_0x330a9f,_0x390d14,_0x176be1);if(!_0x4e7410)throw CliErrors[_0x5a9c4a(0xc4)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x5a9c4a(0xbc));return{'dir':_0x30079d,'skillCode':_0x4e7410,'metadata':_0x390d14};}function a164_0x5ed0(_0x8de506,_0x50f928){_0x8de506=_0x8de506-0xb9;const _0x1c6dbd=a164_0x1c6d();let _0x5ed078=_0x1c6dbd[_0x8de506];return _0x5ed078;}export function readPushDirectory(_0x43641a,_0x353485,_0x56cba9={}){const _0x9f97b9=a164_0x5ed0,_0x1ccd27=resolvePushDirectoryIdentity(_0x43641a,_0x353485,_0x56cba9),_0x6f50ed=_0x1ccd27[_0x9f97b9(0xfe)],_0x1f1fba=resolve(_0x6f50ed,SKILL_FILE);if(!existsSync(_0x1f1fba)||!lstatSync(_0x1f1fba)[_0x9f97b9(0xbb)]())throw CliErrors[_0x9f97b9(0xc4)](_0x9f97b9(0xda)+SKILL_FILE+':\x20'+_0x1f1fba);const _0x283c64=_0x1ccd27[_0x9f97b9(0xe8)],_0x12738e=_0x56cba9['targetScope']??_0x9f97b9(0xd4);if(!_0x56cba9[_0x9f97b9(0xc6)]&&_0x283c64?.['scope']===_0x9f97b9(0xf9))throw CliErrors[_0x9f97b9(0xc4)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x9f97b9(0xe3)+_0x283c64[_0x9f97b9(0xc5)]+'\x22.');if(!_0x56cba9[_0x9f97b9(0xc6)]&&_0x12738e===_0x9f97b9(0xd4)&&_0x283c64?.[_0x9f97b9(0xc5)]&&_0x283c64[_0x9f97b9(0xc5)]!==_0x9f97b9(0xd4))throw CliErrors['validation'](_0x9f97b9(0xe7)+METADATA_FILE+_0x9f97b9(0xe3)+_0x283c64['scope']+'\x22.',_0x9f97b9(0xdb)+_0x6f50ed+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0xb2c1fe=scanSkillDirectory(_0x6f50ed,{'excludedFilePaths':_0x56cba9[_0x9f97b9(0xd3)]}),_0xa66f98=buildSkillPackage(_0xb2c1fe),_0x3dd5ec=readFileSync(_0x1f1fba,_0x9f97b9(0xc7)),_0x5a4c8c=_0x1ccd27[_0x9f97b9(0xe4)],_0x2d5146=_0x56cba9[_0x9f97b9(0xf0)]?undefined:_0x283c64,_0xa4c325=readSkillDisplayName(_0x3dd5ec);return{'skillCode':_0x5a4c8c,'metadata':_0x283c64,'frontmatterDisplayName':_0xa4c325,'input':{'skillCode':_0x5a4c8c,'skillName':_0xa4c325??_0x2d5146?.[_0x9f97b9(0xf6)],'description':_0x2d5146?.['description'],'content':_0x3dd5ec,'files':_0xa66f98[_0x9f97b9(0xc9)],'packageBase64':_0xa66f98[_0x9f97b9(0xd6)],'tags':_0x2d5146?.[_0x9f97b9(0xdc)],'version':_0x2d5146?.[_0x9f97b9(0xde)],'sourceSessionId':_0x2d5146?.[_0x9f97b9(0xc3)]}};}export function refreshPushDirectoryMetadataFromRemote(_0xcf1315,_0x508663,_0x418ac4,_0x5468f7={}){const _0x26c386=a164_0x5ed0,_0x2ab91a=resolvePushDirectoryRoot(_0xcf1315),_0x332447=readPushMetadataIfPresent(resolve(_0x2ab91a,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x41e0fa=requireRemoteScope(_0x508663),_0x3c8304=readLocalSkillContent(_0x2ab91a),_0x41d2ed={..._0x508663,'appCode':_0x508663[_0x26c386(0xbd)]??_0x418ac4,'skillName':_0x508663[_0x26c386(0xf6)]??_0x332447?.[_0x26c386(0xf6)],'description':_0x508663[_0x26c386(0xc0)]??_0x332447?.[_0x26c386(0xc0)],'example':_0x508663[_0x26c386(0xec)]??_0x332447?.['example'],'tags':Array['isArray'](_0x508663[_0x26c386(0xdc)])?_0x508663[_0x26c386(0xdc)]:_0x332447?.[_0x26c386(0xdc)],'sourceSessionId':_0x508663[_0x26c386(0xc3)]??_0x332447?.[_0x26c386(0xc3)],'content':_0x508663['content']??_0x3c8304},_0xeff22c=buildMetadata(_0x41d2ed,_0x41e0fa,_0x418ac4,contentHash(_0x3c8304),_0x5468f7[_0x26c386(0xee)]);writeJsonAtomic(resolve(_0x2ab91a,METADATA_FILE),_0xeff22c);}export function recordPushedRuntimeSkill(_0x1ab24d,_0x53b50a,_0x3aa567,_0x1198d0={}){const _0xe0cb32=a164_0x5ed0,_0x260fe9=resolvePushDirectoryRoot(_0x1ab24d),_0x1e0774=scanSkillDirectory(_0x260fe9),_0x56f6fa=_0x1e0774[_0xe0cb32(0xb9)](_0x6e3a14=>_0x6e3a14[_0xe0cb32(0xf3)]===SKILL_FILE),_0x265cf3=_0x56f6fa?fileText(_0x56f6fa):'',_0x16341c=tryNormalizePackageManifest(_0x53b50a[_0xe0cb32(0xce)]),_0x5d75e1={..._0x53b50a,'content':_0x53b50a['content']??_0x265cf3,'files':_0x16341c},_0x449c9f=_0x16341c?normalizeLocalFiles(_0x1e0774)[_0xe0cb32(0xe9)](_0x3e928d=>_0x16341c[_0xe0cb32(0xce)][_0xe0cb32(0xf8)](_0xa1a5de=>_0xa1a5de['path']===_0x3e928d['path'])):undefined,_0x1d63ec=buildMetadata(_0x5d75e1,_0x1198d0[_0xe0cb32(0xc5)]??_0xe0cb32(0xd4),_0x3aa567,contentHash(_0x5d75e1[_0xe0cb32(0xe5)]??''),_0x1198d0[_0xe0cb32(0xfa)],_0x449c9f);writeJsonAtomic(resolve(_0x260fe9,METADATA_FILE),_0x1d63ec);}export function deriveSkillCodeFromDirectory(_0xf3d42c,_0x1c0a02){const _0x108114=a164_0x5ed0,_0x1dfa3f=basename(resolve(_0xf3d42c)),_0x296f12=_0x1c0a02+'--';return _0x1dfa3f[_0x108114(0xd1)](_0x296f12)?_0x1dfa3f['slice'](_0x296f12[_0x108114(0xf2)]):_0x1dfa3f;}function resolvePushSkillCode(_0xb814db,_0x53428f,_0x5b5c30,_0x578757){const _0x3b9c66=a164_0x5ed0,_0xda00f6=deriveSkillCodeFromSkillFile(_0xb814db)||deriveSkillCodeFromDirectory(_0xb814db,_0x53428f);if(_0x578757['ignoreMetadataSkillCode'])return _0xda00f6;return _0x5b5c30?.[_0x3b9c66(0xe4)]?.[_0x3b9c66(0xd8)]()||_0xda00f6;}function deriveSkillCodeFromSkillFile(_0x97dc59){const _0x1ad5db=a164_0x5ed0,_0x1f6b94=resolve(_0x97dc59,SKILL_FILE);if(!existsSync(_0x1f6b94)||!lstatSync(_0x1f6b94)['isFile']())return undefined;const _0x163dc1=readFileSync(_0x1f6b94,_0x1ad5db(0xc7)),_0x17f7d0=_0x163dc1[_0x1ad5db(0xc8)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x17f7d0)return undefined;const _0x42f9cd=parseFrontmatterObject(_0x17f7d0[0x1]??''),_0x2c4047=scalarToString(_0x42f9cd?.[_0x1ad5db(0xe6)]);return _0x2c4047?slugifySkillName(_0x2c4047):undefined;}function readSkillDisplayName(_0x132bee){const _0x5ef502=a164_0x5ed0,_0x4694a4=_0x132bee[_0x5ef502(0xc8)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4694a4)return undefined;const _0x17f0cd=parseFrontmatterObject(_0x4694a4[0x1]??'');return scalarToString(_0x17f0cd?.['displayName']);}function slugifySkillName(_0x58b446){const _0x2899a0=a164_0x5ed0,_0x328c6d=_0x58b446[_0x2899a0(0xd8)]()[_0x2899a0(0xfd)]()[_0x2899a0(0xba)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x2899a0(0xba)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x328c6d)throw CliErrors[_0x2899a0(0xc4)](_0x2899a0(0xeb)+SKILL_FILE+_0x2899a0(0xc2));return _0x328c6d;}function parseFrontmatterObject(_0x413fa7){const _0x1b1062=a164_0x5ed0;try{const _0x5d5777=a164_0x4e2504(_0x413fa7);return _0x5d5777&&typeof _0x5d5777===_0x1b1062(0xe1)&&!Array[_0x1b1062(0xbe)](_0x5d5777)?_0x5d5777:undefined;}catch{return undefined;}}function scalarToString(_0x248bfe){const _0x2c59fe=a164_0x5ed0;if(typeof _0x248bfe===_0x2c59fe(0xd5))return _0x248bfe[_0x2c59fe(0xd8)]();if(typeof _0x248bfe===_0x2c59fe(0xbf)||typeof _0x248bfe===_0x2c59fe(0xd9))return String(_0x248bfe);return undefined;}function resolvePushDirectoryRoot(_0x1bd20e){const _0x342e55=a164_0x5ed0,_0x3893f6=resolve(_0x1bd20e);if(!existsSync(_0x3893f6))throw CliErrors[_0x342e55(0xc4)](_0x342e55(0xcd)+_0x1bd20e);const _0x2e8e7a=lstatSync(_0x3893f6);if(_0x2e8e7a[_0x342e55(0xd7)]())return _0x3893f6;if(_0x2e8e7a[_0x342e55(0xea)]()){const _0x5a491e=realpathSync(_0x3893f6);if(lstatSync(_0x5a491e)[_0x342e55(0xd7)]())return _0x5a491e;}throw CliErrors[_0x342e55(0xc4)]('Skill\x20directory\x20not\x20found:\x20'+_0x1bd20e);}function requireRemoteScope(_0x1a14ff){const _0x3cc82f=a164_0x5ed0;if(_0x1a14ff[_0x3cc82f(0xc5)]===_0x3cc82f(0xd4)||_0x1a14ff['scope']===_0x3cc82f(0xf7)||_0x1a14ff[_0x3cc82f(0xc5)]===_0x3cc82f(0xf9))return _0x1a14ff[_0x3cc82f(0xc5)];throw CliErrors[_0x3cc82f(0xc4)](_0x3cc82f(0xcc)+(_0x1a14ff[_0x3cc82f(0xe4)]||_0x3cc82f(0xcb))+_0x3cc82f(0xef)+(_0x1a14ff[_0x3cc82f(0xc5)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x1c5382){const _0x30198a=a164_0x5ed0,_0x49bc13=resolve(_0x1c5382,SKILL_FILE);return existsSync(_0x49bc13)&&lstatSync(_0x49bc13)[_0x30198a(0xbb)]()?readFileSync(_0x49bc13,_0x30198a(0xc7)):'';}function a164_0x1c6d(){const _0x16171c=['files','allowAppCodeRetarget','2133360kycRvf','startsWith','7765944WxzZaB','excludedFilePaths','personal','string','packageBase64','isDirectory','trim','boolean','Missing\x20','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','tags','165528ZrsHwJ','version','3941364Bsshgc','20184DmfLEL','object','785xinEVP','\x20has\x20scope=\x22','skillCode','content','name','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','metadata','filter','isSymbolicLink','Invalid\x20','example','11wKDYIC','refreshedAt','\x20has\x20unsupported\x20scope\x20\x22','ignoreMetadataForPayload','23348DfTYep','length','path','8HgUXxp','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','skillName','company','some','builtin','pushedAt','286929LONJMl','ignoreInvalidMetadata','toLowerCase','dir','find','replace','isFile',',\x20or\x20directory\x20name.','appCode','isArray','number','description','80VvqSaW','\x20name\x20for\x20SkillHub\x20slug\x20generation.','sourceSessionId','validation','scope','ignoreMetadataScope','utf8','match','manifest','14wUTSsH','(unknown)','Remote\x20Skill\x20','Skill\x20directory\x20not\x20found:\x20'];a164_0x1c6d=function(){return _0x16171c;};return a164_0x1c6d();}function readPushMetadataIfPresent(_0x39fbbf,_0x3cd41a={}){const _0x39bf00=a164_0x5ed0;try{return readMetadataIfPresent(_0x39fbbf);}catch(_0x21eeed){if(_0x3cd41a[_0x39bf00(0xfc)])return undefined;throw _0x21eeed;}}
|
|
1
|
+
(function(_0x5143d5,_0x3468a5){const _0x24e5aa=a164_0xd246,_0x329618=_0x5143d5();while(!![]){try{const _0x5aae3e=parseInt(_0x24e5aa(0x1df))/0x1*(-parseInt(_0x24e5aa(0x1cd))/0x2)+-parseInt(_0x24e5aa(0x1ed))/0x3*(-parseInt(_0x24e5aa(0x1b0))/0x4)+parseInt(_0x24e5aa(0x1c8))/0x5*(parseInt(_0x24e5aa(0x1af))/0x6)+parseInt(_0x24e5aa(0x1e2))/0x7+-parseInt(_0x24e5aa(0x1c6))/0x8+parseInt(_0x24e5aa(0x1bf))/0x9+-parseInt(_0x24e5aa(0x1d1))/0xa*(parseInt(_0x24e5aa(0x1e0))/0xb);if(_0x5aae3e===_0x3468a5)break;else _0x329618['push'](_0x329618['shift']());}catch(_0x3c2624){_0x329618['push'](_0x329618['shift']());}}}(a164_0x1033,0xa9403));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';function a164_0x1033(){const _0x194c2b=['utf8','tags','isFile','filter','478NDaJCV','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','displayName','replace','205780gyXQVp','\x20name\x20for\x20SkillHub\x20slug\x20generation.','length','isDirectory','find','Skill\x20directory\x20not\x20found:\x20','match','trim','Missing\x20','\x20has\x20scope=\x22','ignoreMetadataForPayload','Skill\x20metadata\x20appCode\x20\x22','isArray','skillCode','1109AqCsEa','737pXxSPK','personal','7837067UqtZcG','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','ignoreMetadataScope','content','name','path','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','appCode','string','validation','boolean','724158RvVJUM','skillName','scope','1169382gPqXrs','20YNbiiV','files','dir','builtin','ignoreMetadataSkillCode','manifest','excludedFilePaths','sourceSessionId','some','example','ignoreInvalidMetadata','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','object','refreshedAt','packageBase64','8168850FHiqIY','(unknown)','description','\x20has\x20unsupported\x20scope\x20\x22','isSymbolicLink','toLowerCase','Unable\x20to\x20resolve\x20skillCode\x20from\x20','10295416SysrmR','company','10rIGqaV'];a164_0x1033=function(){return _0x194c2b;};return a164_0x1033();}import{parse as a164_0x42f679}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a164_0xd246(_0x56d019,_0x506195){_0x56d019=_0x56d019-0x1af;const _0x103395=a164_0x1033();let _0xd246be=_0x103395[_0x56d019];return _0xd246be;}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(_0x2ef61a,_0x4d1cb6,_0x3f7bfd={}){const _0x20f695=a164_0xd246,_0x3df360=resolvePushDirectoryRoot(_0x2ef61a),_0x188edc=readPushMetadataIfPresent(resolve(_0x3df360,METADATA_FILE),{'ignoreInvalidMetadata':_0x3f7bfd[_0x20f695(0x1ba)]});if(_0x188edc?.[_0x20f695(0x1e9)]&&_0x188edc['appCode']!==_0x4d1cb6&&!_0x3f7bfd['allowAppCodeRetarget']&&!_0x3f7bfd['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x20f695(0x1eb)](_0x20f695(0x1dc)+_0x188edc[_0x20f695(0x1e9)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x4d1cb6+'\x22.');const _0x2fc8e8=resolvePushSkillCode(_0x3df360,_0x4d1cb6,_0x188edc,_0x3f7bfd);if(!_0x2fc8e8)throw CliErrors[_0x20f695(0x1eb)](_0x20f695(0x1c5)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x3df360,'skillCode':_0x2fc8e8,'metadata':_0x188edc};}export function readPushDirectory(_0x48b2f3,_0x4acd5d,_0x207892={}){const _0x205b30=a164_0xd246,_0x19acf0=resolvePushDirectoryIdentity(_0x48b2f3,_0x4acd5d,_0x207892),_0x5f37e0=_0x19acf0[_0x205b30(0x1b2)],_0x11f225=resolve(_0x5f37e0,SKILL_FILE);if(!existsSync(_0x11f225)||!lstatSync(_0x11f225)[_0x205b30(0x1cb)]())throw CliErrors[_0x205b30(0x1eb)](_0x205b30(0x1d9)+SKILL_FILE+':\x20'+_0x11f225);const _0xb46b2e=_0x19acf0['metadata'],_0x51af9c=_0x207892['targetScope']??_0x205b30(0x1e1);if(!_0x207892[_0x205b30(0x1e4)]&&_0xb46b2e?.[_0x205b30(0x1ef)]==='builtin')throw CliErrors['validation'](_0x205b30(0x1ce)+METADATA_FILE+_0x205b30(0x1da)+_0xb46b2e[_0x205b30(0x1ef)]+'\x22.');if(!_0x207892[_0x205b30(0x1e4)]&&_0x51af9c===_0x205b30(0x1e1)&&_0xb46b2e?.[_0x205b30(0x1ef)]&&_0xb46b2e['scope']!==_0x205b30(0x1e1))throw CliErrors[_0x205b30(0x1eb)](_0x205b30(0x1bb)+METADATA_FILE+_0x205b30(0x1da)+_0xb46b2e[_0x205b30(0x1ef)]+'\x22.',_0x205b30(0x1e3)+_0x5f37e0+_0x205b30(0x1e8));const _0x1efe9a=scanSkillDirectory(_0x5f37e0,{'excludedFilePaths':_0x207892[_0x205b30(0x1b6)]}),_0x3756f8=buildSkillPackage(_0x1efe9a),_0x400ce6=readFileSync(_0x11f225,_0x205b30(0x1c9)),_0x11d39c=_0x19acf0[_0x205b30(0x1de)],_0x58923d=_0x207892[_0x205b30(0x1db)]?undefined:_0xb46b2e,_0x58e6de=readSkillDisplayName(_0x400ce6);return{'skillCode':_0x11d39c,'metadata':_0xb46b2e,'frontmatterDisplayName':_0x58e6de,'input':{'skillCode':_0x11d39c,'skillName':_0x58e6de??_0x58923d?.[_0x205b30(0x1ee)],'description':_0x58923d?.[_0x205b30(0x1c1)],'content':_0x400ce6,'files':_0x3756f8[_0x205b30(0x1b5)],'packageBase64':_0x3756f8[_0x205b30(0x1be)],'tags':_0x58923d?.['tags'],'version':_0x58923d?.['version'],'sourceSessionId':_0x58923d?.[_0x205b30(0x1b7)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x29e128,_0x646e94,_0x3c00cc,_0x5b87c3={}){const _0x8309b3=a164_0xd246,_0x29d1d4=resolvePushDirectoryRoot(_0x29e128),_0x473c26=readPushMetadataIfPresent(resolve(_0x29d1d4,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x353d9b=requireRemoteScope(_0x646e94),_0x219e4b=readLocalSkillContent(_0x29d1d4),_0x297fbb={..._0x646e94,'appCode':_0x646e94[_0x8309b3(0x1e9)]??_0x3c00cc,'skillName':_0x646e94[_0x8309b3(0x1ee)]??_0x473c26?.['skillName'],'description':_0x646e94[_0x8309b3(0x1c1)]??_0x473c26?.[_0x8309b3(0x1c1)],'example':_0x646e94[_0x8309b3(0x1b9)]??_0x473c26?.[_0x8309b3(0x1b9)],'tags':Array[_0x8309b3(0x1dd)](_0x646e94['tags'])?_0x646e94[_0x8309b3(0x1ca)]:_0x473c26?.[_0x8309b3(0x1ca)],'sourceSessionId':_0x646e94[_0x8309b3(0x1b7)]??_0x473c26?.[_0x8309b3(0x1b7)],'content':_0x646e94['content']??_0x219e4b},_0x4a1364=buildMetadata(_0x297fbb,_0x353d9b,_0x3c00cc,contentHash(_0x219e4b),_0x5b87c3[_0x8309b3(0x1bd)]);writeJsonAtomic(resolve(_0x29d1d4,METADATA_FILE),_0x4a1364);}export function recordPushedRuntimeSkill(_0x5c3d77,_0x2dde30,_0xc7b023,_0x14e4e9={}){const _0x397128=a164_0xd246,_0x3a53c9=resolvePushDirectoryRoot(_0x5c3d77),_0x5b741e=scanSkillDirectory(_0x3a53c9),_0xe5f9dc=_0x5b741e[_0x397128(0x1d5)](_0x55104b=>_0x55104b[_0x397128(0x1e7)]===SKILL_FILE),_0x254ad6=_0xe5f9dc?fileText(_0xe5f9dc):'',_0x1fc1e6=tryNormalizePackageManifest(_0x2dde30[_0x397128(0x1b1)]),_0x42ac9a={..._0x2dde30,'content':_0x2dde30[_0x397128(0x1e5)]??_0x254ad6,'files':_0x1fc1e6},_0x32f1ce=_0x1fc1e6?normalizeLocalFiles(_0x5b741e)[_0x397128(0x1cc)](_0x330459=>_0x1fc1e6[_0x397128(0x1b1)][_0x397128(0x1b8)](_0x5bff9e=>_0x5bff9e['path']===_0x330459[_0x397128(0x1e7)])):undefined,_0x52656f=buildMetadata(_0x42ac9a,_0x14e4e9[_0x397128(0x1ef)]??_0x397128(0x1e1),_0xc7b023,contentHash(_0x42ac9a[_0x397128(0x1e5)]??''),_0x14e4e9['pushedAt'],_0x32f1ce);writeJsonAtomic(resolve(_0x3a53c9,METADATA_FILE),_0x52656f);}export function deriveSkillCodeFromDirectory(_0x3e2f33,_0x1db25c){const _0x5e60fe=a164_0xd246,_0x9fb095=basename(resolve(_0x3e2f33)),_0xe50f5a=_0x1db25c+'--';return _0x9fb095['startsWith'](_0xe50f5a)?_0x9fb095['slice'](_0xe50f5a[_0x5e60fe(0x1d3)]):_0x9fb095;}function resolvePushSkillCode(_0x164f16,_0xec2a12,_0x15ed63,_0x37a65f){const _0x5308f7=a164_0xd246,_0x48c902=deriveSkillCodeFromSkillFile(_0x164f16)||deriveSkillCodeFromDirectory(_0x164f16,_0xec2a12);if(_0x37a65f[_0x5308f7(0x1b4)])return _0x48c902;return _0x15ed63?.[_0x5308f7(0x1de)]?.[_0x5308f7(0x1d8)]()||_0x48c902;}function deriveSkillCodeFromSkillFile(_0x4b2880){const _0x531ca0=a164_0xd246,_0x494161=resolve(_0x4b2880,SKILL_FILE);if(!existsSync(_0x494161)||!lstatSync(_0x494161)['isFile']())return undefined;const _0x1207aa=readFileSync(_0x494161,_0x531ca0(0x1c9)),_0x5a3112=_0x1207aa[_0x531ca0(0x1d7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5a3112)return undefined;const _0x2abde6=parseFrontmatterObject(_0x5a3112[0x1]??''),_0x1abc6d=scalarToString(_0x2abde6?.[_0x531ca0(0x1e6)]);return _0x1abc6d?slugifySkillName(_0x1abc6d):undefined;}function readSkillDisplayName(_0x541368){const _0x32ef94=a164_0xd246,_0x346af4=_0x541368[_0x32ef94(0x1d7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x346af4)return undefined;const _0x34c2df=parseFrontmatterObject(_0x346af4[0x1]??'');return scalarToString(_0x34c2df?.[_0x32ef94(0x1cf)]);}function slugifySkillName(_0x5cc42a){const _0x2a88b9=a164_0xd246,_0x5d0e32=_0x5cc42a[_0x2a88b9(0x1d8)]()[_0x2a88b9(0x1c4)]()[_0x2a88b9(0x1d0)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2a88b9(0x1d0)](/^-+/,'')[_0x2a88b9(0x1d0)](/-+$/,'')[_0x2a88b9(0x1d0)](/-{2,}/g,'-');if(!_0x5d0e32)throw CliErrors[_0x2a88b9(0x1eb)]('Invalid\x20'+SKILL_FILE+_0x2a88b9(0x1d2));return _0x5d0e32;}function parseFrontmatterObject(_0x5461fc){const _0xeadbdb=a164_0xd246;try{const _0x598eac=a164_0x42f679(_0x5461fc);return _0x598eac&&typeof _0x598eac===_0xeadbdb(0x1bc)&&!Array[_0xeadbdb(0x1dd)](_0x598eac)?_0x598eac:undefined;}catch{return undefined;}}function scalarToString(_0x243f8b){const _0x10a034=a164_0xd246;if(typeof _0x243f8b===_0x10a034(0x1ea))return _0x243f8b[_0x10a034(0x1d8)]();if(typeof _0x243f8b==='number'||typeof _0x243f8b===_0x10a034(0x1ec))return String(_0x243f8b);return undefined;}function resolvePushDirectoryRoot(_0x1332e9){const _0x48bbf7=a164_0xd246,_0x52e94f=resolve(_0x1332e9);if(!existsSync(_0x52e94f))throw CliErrors[_0x48bbf7(0x1eb)]('Skill\x20directory\x20not\x20found:\x20'+_0x1332e9);const _0x418e2c=lstatSync(_0x52e94f);if(_0x418e2c[_0x48bbf7(0x1d4)]())return _0x52e94f;if(_0x418e2c[_0x48bbf7(0x1c3)]()){const _0xc53257=realpathSync(_0x52e94f);if(lstatSync(_0xc53257)['isDirectory']())return _0xc53257;}throw CliErrors['validation'](_0x48bbf7(0x1d6)+_0x1332e9);}function requireRemoteScope(_0x162175){const _0x5826f9=a164_0xd246;if(_0x162175['scope']===_0x5826f9(0x1e1)||_0x162175[_0x5826f9(0x1ef)]===_0x5826f9(0x1c7)||_0x162175[_0x5826f9(0x1ef)]===_0x5826f9(0x1b3))return _0x162175[_0x5826f9(0x1ef)];throw CliErrors[_0x5826f9(0x1eb)]('Remote\x20Skill\x20'+(_0x162175['skillCode']||_0x5826f9(0x1c0))+_0x5826f9(0x1c2)+(_0x162175[_0x5826f9(0x1ef)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x1b9126){const _0x1fd8e0=a164_0xd246,_0x459eae=resolve(_0x1b9126,SKILL_FILE);return existsSync(_0x459eae)&&lstatSync(_0x459eae)[_0x1fd8e0(0x1cb)]()?readFileSync(_0x459eae,'utf8'):'';}function readPushMetadataIfPresent(_0x45cb85,_0x4af6b8={}){const _0x292bba=a164_0xd246;try{return readMetadataIfPresent(_0x45cb85);}catch(_0x91bd13){if(_0x4af6b8[_0x292bba(0x1ba)])return undefined;throw _0x91bd13;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c323e,_0x23c87d){const _0x2beb21=a165_0x5a68,_0x105e8a=_0x1c323e();while(!![]){try{const _0x206a21=-parseInt(_0x2beb21(0x69))/0x1*(parseInt(_0x2beb21(0x73))/0x2)+parseInt(_0x2beb21(0x72))/0x3*(-parseInt(_0x2beb21(0x6b))/0x4)+-parseInt(_0x2beb21(0x6d))/0x5*(-parseInt(_0x2beb21(0x71))/0x6)+parseInt(_0x2beb21(0x75))/0x7*(-parseInt(_0x2beb21(0x70))/0x8)+parseInt(_0x2beb21(0x67))/0x9*(-parseInt(_0x2beb21(0x65))/0xa)+-parseInt(_0x2beb21(0x66))/0xb+parseInt(_0x2beb21(0x68))/0xc*(parseInt(_0x2beb21(0x6e))/0xd);if(_0x206a21===_0x23c87d)break;else _0x105e8a['push'](_0x105e8a['shift']());}catch(_0x17a1f2){_0x105e8a['push'](_0x105e8a['shift']());}}}(a165_0x1f5d,0x8a399));import{CliErrors}from'../../errors.js';function a165_0x1f5d(){const _0x25f177=['13bNeLUL','push','13672xzbxks','66dKUzjQ','4815RvuuwO','1306586EpcGDk','length','2506USpBvZ','includes','company','2157730piNtaX','5322658LTwJOm','27WUuIhZ','22792164mHSQhP','1DDaqZl','validation','68nwnaUM','personal','495645fpKuew'];a165_0x1f5d=function(){return _0x25f177;};return a165_0x1f5d();}export function normalizeRuntimeSkillScopes(_0x112489){const _0x214a2e=a165_0x5a68,_0x73802d=_0x112489&&_0x112489[_0x214a2e(0x74)]>0x0?_0x112489:[_0x214a2e(0x6c),'company','builtin'],_0x526199=[];for(const _0x532f70 of _0x73802d){if(!isRuntimeSkillScope(_0x532f70))throw CliErrors[_0x214a2e(0x6a)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x532f70);!_0x526199[_0x214a2e(0x76)](_0x532f70)&&_0x526199[_0x214a2e(0x6f)](_0x532f70);}return _0x526199;}function a165_0x5a68(_0x343ecd,_0x4393fb){_0x343ecd=_0x343ecd-0x64;const _0x1f5dbd=a165_0x1f5d();let _0x5a68d2=_0x1f5dbd[_0x343ecd];return _0x5a68d2;}export function isRuntimeSkillScope(_0x152545){const _0x5b2cef=a165_0x5a68;return _0x152545===_0x5b2cef(0x6c)||_0x152545===_0x5b2cef(0x64)||_0x152545==='builtin';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x189c27=a167_0x1f34;function a167_0x2879(){const _0x3f80de=['entries','760566utGwAp','4914872TNAuuU','validation','35JyKfnL','896826gcvaJM','validation_error','path','from','3281935vttxZB','name','endsWith','175618hxqeMd','17731328sLifbf','object','sort','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','code','1980-01-01T00:00:00.000Z','map','652884cxyGBk'];a167_0x2879=function(){return _0x3f80de;};return a167_0x2879();}(function(_0x6d8a07,_0xd33dee){const _0x1b08c0=a167_0x1f34,_0xf1c4a=_0x6d8a07();while(!![]){try{const _0x385c3c=parseInt(_0x1b08c0(0x1e4))/0x1+parseInt(_0x1b08c0(0x1dc))/0x2+parseInt(_0x1b08c0(0x1ea))/0x3+-parseInt(_0x1b08c0(0x1e7))/0x4+-parseInt(_0x1b08c0(0x1ee))/0x5+-parseInt(_0x1b08c0(0x1e6))/0x6*(parseInt(_0x1b08c0(0x1e9))/0x7)+parseInt(_0x1b08c0(0x1dd))/0x8;if(_0x385c3c===_0xd33dee)break;else _0xf1c4a['push'](_0xf1c4a['shift']());}catch(_0x1a9722){_0xf1c4a['push'](_0xf1c4a['shift']());}}}(a167_0x2879,0xb3f75));function a167_0x1f34(_0x46a783,_0x1baab3){_0x46a783=_0x46a783-0x1dc;const _0x2879ab=a167_0x2879();let _0x1f3473=_0x2879ab[_0x46a783];return _0x1f3473;}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a167_0x189c27(0x1e2));export function createDeterministicZipPackage(_0x5b1ed4){const _0x22e810=a167_0x189c27,_0x29478e={};for(const _0x5160d3 of normalizeLocalFiles(_0x5b1ed4)){_0x29478e[_0x5160d3[_0x22e810(0x1ec)]]=fileContent(_0x5160d3);}return Buffer[_0x22e810(0x1ed)](zipSync(_0x29478e,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x587d24){const _0x2b4f76=a167_0x189c27;if(_0x587d24['length']<0x16)throw CliErrors[_0x2b4f76(0x1e8)](_0x2b4f76(0x1e0));let _0x3d5431;try{_0x3d5431=unzipSync(_0x587d24,{'filter'(_0x4cd7bc){const _0xc9ac43=_0x2b4f76,_0xb47461=normalizeSkillRelativePath(_0x4cd7bc[_0xc9ac43(0x1ef)]);if(_0xb47461[_0xc9ac43(0x1f0)]('/'))throw CliErrors['validation']('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0xb47461);return!![];}});}catch(_0x396b1c){if(isRuntimeSkillValidationError(_0x396b1c))throw _0x396b1c;throw CliErrors[_0x2b4f76(0x1e8)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x2b4f76(0x1e5)](_0x3d5431)[_0x2b4f76(0x1e3)](([_0x2354be,_0x51b568])=>({'path':normalizeSkillRelativePath(_0x2354be),'bytes':Buffer[_0x2b4f76(0x1ed)](_0x51b568)}))[_0x2b4f76(0x1df)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x40a970){const _0xc62281=a167_0x189c27;return typeof _0x40a970===_0xc62281(0x1de)&&_0x40a970!==null&&_0xc62281(0x1e1)in _0x40a970&&_0x40a970['code']===_0xc62281(0x1eb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe6047f,_0x308cea){const _0xea670c=a168_0x24c5,_0x185527=_0xe6047f();while(!![]){try{const _0xac9065=-parseInt(_0xea670c(0xe9))/0x1*(parseInt(_0xea670c(0xe8))/0x2)+-parseInt(_0xea670c(0xec))/0x3*(-parseInt(_0xea670c(0xd8))/0x4)+parseInt(_0xea670c(0xfd))/0x5*(parseInt(_0xea670c(0xfe))/0x6)+parseInt(_0xea670c(0xe2))/0x7*(-parseInt(_0xea670c(0xf4))/0x8)+parseInt(_0xea670c(0xe1))/0x9*(parseInt(_0xea670c(0xee))/0xa)+parseInt(_0xea670c(0xfa))/0xb+-parseInt(_0xea670c(0xeb))/0xc;if(_0xac9065===_0x308cea)break;else _0x185527['push'](_0x185527['shift']());}catch(_0x251065){_0x185527['push'](_0x185527['shift']());}}}(a168_0x494b,0x1b3be));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a168_0x24c5(_0x23d599,_0x5465c4){_0x23d599=_0x23d599-0xd4;const _0x494b3a=a168_0x494b();let _0x24c567=_0x494b3a[_0x23d599];return _0x24c567;}import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x37e16b){const _0x253db1=a168_0x24c5,_0x1fa865=normalizeLocalFiles(_0x37e16b);if(!_0x1fa865[_0x253db1(0xed)](_0x4b09e4=>_0x4b09e4['path']===SKILL_FILE))throw CliErrors[_0x253db1(0x100)](_0x253db1(0xf1)+SKILL_FILE+_0x253db1(0xd9));const _0x152c82=localFilesToManifestFiles(_0x1fa865),_0x2ed64d=createDeterministicZipPackage(_0x1fa865);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x152c82),'zipSha256':bufferSha256(_0x2ed64d),'zipSize':_0x2ed64d[_0x253db1(0x101)],'files':_0x152c82},'packageBytes':_0x2ed64d,'packageBase64':_0x2ed64d['toString'](_0x253db1(0xfb))};}export function verifyRuntimeSkillPackage(_0x1548a0,_0x4261c6){const _0x39fee8=a168_0x24c5,_0x3b4926=normalizePackageManifest(_0x1548a0,{'requireOssPath':![]});if(!_0x3b4926)throw CliErrors['validation'](_0x39fee8(0xf7));return extractAndVerifyPackage(_0x3b4926,_0x4261c6);}function a168_0x494b(){const _0x5c6eb1=['Runtime\x20Skill\x20manifest\x20is\x20missing\x20','validation','length','sha256','schemaVersion','map','treeSha256','zipSize','4QOdZLS','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','get','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','set','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20size\x20mismatch.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','793017yITbDC','155708eoPjpJ','string','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','isArray','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','2862dExWxx','71awuuNe','object','708264RRuRHr','101478KTXpgV','some','10bqAfJW','isSafeInteger','push','Missing\x20','ossPath','zipSha256','8xpToiN','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','path','files','700887VdOiJc','base64','bytes','5BOTmrl','652566JzqJuy'];a168_0x494b=function(){return _0x5c6eb1;};return a168_0x494b();}export function verifyRuntimeSkillBundle(_0x660632,_0x46603d){const _0x85b3fe=a168_0x24c5,_0x2dcb0e=normalizePackageManifest(_0x660632,{'requireOssPath':![]});if(!_0x2dcb0e)throw CliErrors[_0x85b3fe(0x100)](_0x85b3fe(0xf7));return extractAndVerifyPackageFiles(_0x2dcb0e,_0x46603d);}export function tryNormalizePackageManifest(_0x3ac976){return normalizePackageManifest(_0x3ac976,{'requireOssPath':![]});}export function requirePackageBytes(_0xd7a4af,_0x3173d8){const _0x206330=a168_0x24c5;if(!_0x3173d8||_0x3173d8[_0x206330(0x101)]===0x0)throw CliErrors[_0x206330(0x100)](_0x206330(0xda)+_0xd7a4af);return _0x3173d8;}export function extractDownloadedPackage(_0x217e1a){const _0x56cbc0=a168_0x24c5,_0x2efa04=parseZipPackage(_0x217e1a)[_0x56cbc0(0xd5)](_0x55cc1e=>({'path':_0x55cc1e['path'],'bytes':_0x55cc1e[_0x56cbc0(0xfc)]}));if(!_0x2efa04[_0x56cbc0(0xed)](_0x1c9a1f=>_0x1c9a1f[_0x56cbc0(0xf8)]===SKILL_FILE))throw CliErrors[_0x56cbc0(0x100)](_0x56cbc0(0xde)+SKILL_FILE+'.');return normalizeLocalFiles(_0x2efa04);}export function localFilesToManifestFiles(_0x7b0db2){const _0x43be81=a168_0x24c5;return normalizeLocalFiles(_0x7b0db2)[_0x43be81(0xd5)](_0x51d6d8=>({'path':_0x51d6d8[_0x43be81(0xf8)],'sha256':fileHash(_0x51d6d8),'size':fileContent(_0x51d6d8)[_0x43be81(0x101)]}));}function normalizePackageManifest(_0x36a9d,_0x1e95cf){const _0x5f2fe7=a168_0x24c5;if(!_0x36a9d||typeof _0x36a9d!==_0x5f2fe7(0xea)||Array['isArray'](_0x36a9d))return undefined;const _0x4fcae8=_0x36a9d,_0x1fb302=typeof _0x4fcae8['ossPath']===_0x5f2fe7(0xe3)?_0x4fcae8[_0x5f2fe7(0xf2)]['trim']():undefined;if(_0x1e95cf['requireOssPath']&&!_0x1fb302)return undefined;if(!Array[_0x5f2fe7(0xe5)](_0x4fcae8[_0x5f2fe7(0xf9)])||_0x4fcae8[_0x5f2fe7(0xf9)]['length']===0x0)return undefined;if(!isSha256Hex(_0x4fcae8['treeSha256']))throw CliErrors[_0x5f2fe7(0x100)](_0x5f2fe7(0xe0));if(!isSha256Hex(_0x4fcae8[_0x5f2fe7(0xf3)]))throw CliErrors[_0x5f2fe7(0x100)]('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number[_0x5f2fe7(0xef)](_0x4fcae8[_0x5f2fe7(0xd7)])||_0x4fcae8[_0x5f2fe7(0xd7)]<0x0)throw CliErrors[_0x5f2fe7(0x100)](_0x5f2fe7(0xf5));const _0x1a9d35=normalizeManifestFiles(_0x4fcae8[_0x5f2fe7(0xf9)]);if(!_0x1a9d35[_0x5f2fe7(0xed)](_0x5a8f81=>_0x5a8f81[_0x5f2fe7(0xf8)]===SKILL_FILE))throw CliErrors[_0x5f2fe7(0x100)](_0x5f2fe7(0xff)+SKILL_FILE+'.');const _0x566d21=fileTreeHash(_0x1a9d35);if(_0x566d21!==_0x4fcae8[_0x5f2fe7(0xd6)]['toLowerCase']())throw CliErrors['validation']('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x5f2fe7(0xef)](_0x4fcae8[_0x5f2fe7(0xd4)])?_0x4fcae8[_0x5f2fe7(0xd4)]:0x2,'ossPath':_0x1fb302,'treeSha256':_0x566d21,'zipSha256':_0x4fcae8[_0x5f2fe7(0xf3)]['toLowerCase'](),'zipSize':_0x4fcae8[_0x5f2fe7(0xd7)],'files':_0x1a9d35};}function extractAndVerifyPackage(_0x181f2d,_0x76585c){const _0x4a5745=a168_0x24c5,_0x5b0e42=normalizePackageManifest(_0x181f2d,{'requireOssPath':![]});if(!_0x5b0e42)throw CliErrors[_0x4a5745(0x100)](_0x4a5745(0xf7));if(_0x76585c[_0x4a5745(0x101)]!==_0x5b0e42['zipSize'])throw CliErrors[_0x4a5745(0x100)](_0x4a5745(0xdf));const _0x4e5411=bufferSha256(_0x76585c);if(_0x4e5411!==_0x5b0e42['zipSha256'])throw CliErrors[_0x4a5745(0x100)](_0x4a5745(0xe4));return extractAndVerifyPackageFiles(_0x5b0e42,_0x76585c);}function extractAndVerifyPackageFiles(_0xba5464,_0x18ba75){const _0x41ee82=a168_0x24c5,_0x4291ab=parseZipPackage(_0x18ba75);if(_0x4291ab[_0x41ee82(0x101)]!==_0xba5464['files'][_0x41ee82(0x101)])throw CliErrors[_0x41ee82(0x100)](_0x41ee82(0xdc));const _0x3056b6=new Map();for(const _0x35a4d2 of _0x4291ab){if(_0x3056b6['has'](_0x35a4d2[_0x41ee82(0xf8)]))throw CliErrors['validation'](_0x41ee82(0xf6)+_0x35a4d2['path']);_0x3056b6[_0x41ee82(0xdd)](_0x35a4d2[_0x41ee82(0xf8)],_0x35a4d2);}const _0x112622=[];for(const _0x2919d9 of _0xba5464['files']){const _0x455e9f=_0x3056b6[_0x41ee82(0xdb)](_0x2919d9[_0x41ee82(0xf8)]);if(!_0x455e9f)throw CliErrors[_0x41ee82(0x100)](_0x41ee82(0xe6)+_0x2919d9[_0x41ee82(0xf8)]);if(_0x455e9f[_0x41ee82(0xfc)][_0x41ee82(0x101)]!==_0x2919d9['size'])throw CliErrors[_0x41ee82(0x100)](_0x41ee82(0xe7)+_0x2919d9[_0x41ee82(0xf8)]);const _0x1b3725=bufferSha256(_0x455e9f[_0x41ee82(0xfc)]);if(_0x1b3725!==_0x2919d9[_0x41ee82(0x102)])throw CliErrors[_0x41ee82(0x100)]('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x2919d9[_0x41ee82(0xf8)]);_0x112622[_0x41ee82(0xf0)]({'path':_0x2919d9['path'],'bytes':_0x455e9f[_0x41ee82(0xfc)]});}return normalizeLocalFiles(_0x112622);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f4881,_0x118824){var _0x2c73fa=a169_0x3fa8,_0x1e3404=_0x5f4881();while(!![]){try{var _0x1ef70c=-parseInt(_0x2c73fa(0xe2))/0x1+-parseInt(_0x2c73fa(0xdc))/0x2+parseInt(_0x2c73fa(0xde))/0x3+parseInt(_0x2c73fa(0xdf))/0x4+parseInt(_0x2c73fa(0xe0))/0x5*(-parseInt(_0x2c73fa(0xe1))/0x6)+parseInt(_0x2c73fa(0xdd))/0x7*(parseInt(_0x2c73fa(0xdb))/0x8)+-parseInt(_0x2c73fa(0xda))/0x9;if(_0x1ef70c===_0x118824)break;else _0x1e3404['push'](_0x1e3404['shift']());}catch(_0x4b4697){_0x1e3404['push'](_0x1e3404['shift']());}}}(a169_0x2087,0x94b90));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';function a169_0x3fa8(_0x4e6813,_0x1f96cd){_0x4e6813=_0x4e6813-0xda;var _0x208710=a169_0x2087();var _0x3fa82d=_0x208710[_0x4e6813];return _0x3fa82d;}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';function a169_0x2087(){var _0x2d7358=['1252044ByVzAj','255425OPSdps','1932102WScgQk','7648424ofCDML','1566432JuEmGB','7MBmCQV','992661VidsNI','4806276jgfRGP','15dpKmTe'];a169_0x2087=function(){return _0x2d7358;};return a169_0x2087();}export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a170_0x5edaac=a170_0x80f2;(function(_0x13917f,_0x24d971){const _0x353e8d=a170_0x80f2,_0x31667a=_0x13917f();while(!![]){try{const _0x5951f4=-parseInt(_0x353e8d(0x1ab))/0x1+parseInt(_0x353e8d(0x1a7))/0x2*(-parseInt(_0x353e8d(0x1bd))/0x3)+parseInt(_0x353e8d(0x1ad))/0x4+parseInt(_0x353e8d(0x1b8))/0x5+parseInt(_0x353e8d(0x1ac))/0x6+-parseInt(_0x353e8d(0x1b2))/0x7+-parseInt(_0x353e8d(0x1a4))/0x8;if(_0x5951f4===_0x24d971)break;else _0x31667a['push'](_0x31667a['shift']());}catch(_0x366d75){_0x31667a['push'](_0x31667a['shift']());}}}(a170_0x5665,0xb45eb));function a170_0x80f2(_0x5245b0,_0xfdbadd){_0x5245b0=_0x5245b0-0x1a0;const _0x56658a=a170_0x5665();let _0x80f270=_0x56658a[_0x5245b0];return _0x80f270;}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';function a170_0x5665(){const _0xc7f7b1=['lockFile','13606408ubFVuu','.claude','parse','285256afNaqp','version','\x20is\x20unreadable:\x20','\x20records\x20\x22','337938xMulej','5778348BnGNin','2652604sGfceZ','.agents','utf8','reason','message','615475zCwFWy','home','\x20uses\x20unsupported\x20version\x20','absent','find','skills','6909390fCBIuX','recorded','includes','unusable','join','3sIGdjy','not-recorded','SKILL.md','unverifiable'];a170_0x5665=function(){return _0xc7f7b1;};return a170_0x5665();}import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents','.skill-lock.json');export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a170_0x5edaac(0x1ae),a170_0x5edaac(0x1b7)),join(a170_0x5edaac(0x1a5),'skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0xfe8733,_0x345ef7){const _0x411a91=a170_0x5edaac;if(!existsSync(_0xfe8733))return{'kind':_0x411a91(0x1a0)};let _0xc12814;try{_0xc12814=JSON[_0x411a91(0x1a6)](readFileSync(_0xfe8733,_0x411a91(0x1af)));}catch(_0x463b7c){return{'kind':_0x411a91(0x1bb),'reason':_0xfe8733+_0x411a91(0x1a9)+_0x463b7c[_0x411a91(0x1b1)]};}const _0x59cf95=_0xc12814;if(typeof _0x59cf95?.[_0x411a91(0x1a8)]!=='number'||!SUPPORTED_LOCK_VERSIONS[_0x411a91(0x1ba)](_0x59cf95['version']))return{'kind':_0x411a91(0x1bb),'reason':_0xfe8733+_0x411a91(0x1b4)+String(_0x59cf95?.['version'])};if(!_0x59cf95[_0x411a91(0x1b7)]||typeof _0x59cf95[_0x411a91(0x1b7)]!=='object')return{'kind':_0x411a91(0x1bb),'reason':_0xfe8733+'\x20has\x20no\x20skills\x20map'};return _0x59cf95[_0x411a91(0x1b7)][_0x345ef7]?{'kind':_0x411a91(0x1b9)}:{'kind':_0x411a91(0x1a0)};}export function resolveInstalledSkill(_0x215dcd,_0x56fbf2){const _0xdff341=a170_0x5edaac,_0x34aea7=_0x56fbf2?.[_0xdff341(0x1b3)]??homedir(),_0xc06b5e=_0x56fbf2?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x4315ed=>join(_0x34aea7,_0x4315ed)),_0x4a0627=_0x56fbf2?.[_0xdff341(0x1a3)]??join(_0x34aea7,SKILL_LOCK_RELATIVE_PATH),_0x458956=_0xc06b5e['map'](_0x1f8bed=>join(_0x1f8bed,_0x215dcd,_0xdff341(0x1a1))),_0x318463=_0x458956[_0xdff341(0x1b6)](_0x5db40b=>existsSync(_0x5db40b));if(_0x318463)return{'state':'present','path':_0x318463};const _0x25ac54=readLockLookup(_0x4a0627,_0x215dcd);if(_0x25ac54['kind']===_0xdff341(0x1bb))return{'state':_0xdff341(0x1a2),'reason':_0x25ac54[_0xdff341(0x1b0)]};if(_0x25ac54['kind']===_0xdff341(0x1b9))return{'state':'unverifiable','reason':_0x4a0627+_0xdff341(0x1aa)+_0x215dcd+'\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20'+('('+_0x458956[_0xdff341(0x1bc)](',\x20')+')')};return{'state':_0xdff341(0x1b5),'checked':_0x458956};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a171_0x1ec232=a171_0x23ff;function a171_0x23ff(_0x5f0720,_0x4382d4){_0x5f0720=_0x5f0720-0xf0;const _0x1deb7f=a171_0x1deb();let _0x23ff88=_0x1deb7f[_0x5f0720];return _0x23ff88;}(function(_0x441edb,_0x3cf8d0){const _0x3c8c2c=a171_0x23ff,_0x2256ad=_0x441edb();while(!![]){try{const _0x44caa9=parseInt(_0x3c8c2c(0x107))/0x1*(parseInt(_0x3c8c2c(0xf1))/0x2)+parseInt(_0x3c8c2c(0xf3))/0x3*(parseInt(_0x3c8c2c(0x102))/0x4)+parseInt(_0x3c8c2c(0xf8))/0x5*(parseInt(_0x3c8c2c(0xf0))/0x6)+parseInt(_0x3c8c2c(0x104))/0x7*(parseInt(_0x3c8c2c(0xfe))/0x8)+-parseInt(_0x3c8c2c(0xf4))/0x9+-parseInt(_0x3c8c2c(0xf9))/0xa+-parseInt(_0x3c8c2c(0xfb))/0xb;if(_0x44caa9===_0x3cf8d0)break;else _0x2256ad['push'](_0x2256ad['shift']());}catch(_0x5b85fc){_0x2256ad['push'](_0x2256ad['shift']());}}}(a171_0x1deb,0xacfcf));const REDACTED_ACCESS_KEY=a171_0x1ec232(0xfa);export function maskCliAccessKey(_0x195933){const _0x12af5a=a171_0x1ec232;if(typeof _0x195933!=='string'||_0x195933['length']<=0x8)return REDACTED_ACCESS_KEY;return''+_0x195933[_0x12af5a(0xf7)](0x0,0x8)+'*'[_0x12af5a(0x105)](_0x195933[_0x12af5a(0x109)]-0x8);}export function redactCliConfigCredentials(_0x1fd452){const _0x362460=a171_0x1ec232,_0x53ad47={..._0x1fd452};return Object[_0x362460(0xf2)][_0x362460(0xfd)][_0x362460(0x108)](_0x53ad47,_0x362460(0x101))&&(_0x53ad47[_0x362460(0x101)]=maskCliAccessKey(_0x53ad47[_0x362460(0x101)])),_0x53ad47[_0x362460(0xfc)]&&typeof _0x53ad47[_0x362460(0xfc)]===_0x362460(0x100)&&!Array['isArray'](_0x53ad47[_0x362460(0xfc)])&&(_0x53ad47[_0x362460(0xfc)]=redactLegacyAppCredentials(_0x53ad47[_0x362460(0xfc)])),_0x53ad47;}export function redactCliConfigValue(_0x1244b2,_0x100a69){const _0x35fc02=a171_0x1ec232;if(_0x1244b2===_0x35fc02(0x101)||/^apps\.[^.]+\.accessKey$/['test'](_0x1244b2))return maskCliAccessKey(_0x100a69);if(_0x1244b2===_0x35fc02(0xfc)&&_0x100a69&&typeof _0x100a69===_0x35fc02(0x100)&&!Array[_0x35fc02(0x106)](_0x100a69))return redactLegacyAppCredentials(_0x100a69);if(/^apps\.[^.]+$/[_0x35fc02(0xf6)](_0x1244b2)&&_0x100a69&&typeof _0x100a69===_0x35fc02(0x100)&&!Array[_0x35fc02(0x106)](_0x100a69)){const _0x23fbc9=_0x100a69;return Object['prototype']['hasOwnProperty']['call'](_0x23fbc9,_0x35fc02(0x101))?{..._0x23fbc9,'accessKey':maskCliAccessKey(_0x23fbc9['accessKey'])}:_0x100a69;}return _0x100a69;}function redactLegacyAppCredentials(_0x285018){const _0x49f0e8=a171_0x1ec232;return Object[_0x49f0e8(0xff)](Object[_0x49f0e8(0x103)](_0x285018)[_0x49f0e8(0xf5)](([_0xbe7517,_0x2aeee3])=>{const _0x19d4ce=_0x49f0e8;if(!_0x2aeee3||typeof _0x2aeee3!=='object'||Array[_0x19d4ce(0x106)](_0x2aeee3))return[_0xbe7517,_0x2aeee3];const _0x4f72cf={..._0x2aeee3};return Object[_0x19d4ce(0xf2)][_0x19d4ce(0xfd)][_0x19d4ce(0x108)](_0x4f72cf,'accessKey')&&(_0x4f72cf[_0x19d4ce(0x101)]=maskCliAccessKey(_0x4f72cf[_0x19d4ce(0x101)])),[_0xbe7517,_0x4f72cf];}));}function a171_0x1deb(){const _0x2ad61c=['1772NyjiCc','prototype','2870691qdWlBi','1340523WUXqjr','map','test','slice','9060PjdWJg','6155830DjZLjK','<redacted>','18782478qWWYNu','apps','hasOwnProperty','158224ToIiou','fromEntries','object','accessKey','4vYqSiy','entries','322CNPUrB','repeat','isArray','1213KMrwSG','call','length','792rOEDsO'];a171_0x1deb=function(){return _0x2ad61c;};return a171_0x1deb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a172_0x49c1(){const _0x5abf89=['4474LZXpHc','9zmeKaw','95623AXruNa','1051722DxMaPQ','4697palkjf','762218WPWRhs','245kMFswQ','753NGHjad','708Jxwcaz','31532VshTET','5368grqCjP','369480Dqikgg'];a172_0x49c1=function(){return _0x5abf89;};return a172_0x49c1();}(function(_0x24c6fe,_0x2b9316){const _0x21378a=a172_0x204e,_0x4a83ea=_0x24c6fe();while(!![]){try{const _0x1384bf=parseInt(_0x21378a(0x97))/0x1+parseInt(_0x21378a(0x92))/0x2*(-parseInt(_0x21378a(0x99))/0x3)+-parseInt(_0x21378a(0x8f))/0x4*(-parseInt(_0x21378a(0x98))/0x5)+-parseInt(_0x21378a(0x95))/0x6+parseInt(_0x21378a(0x96))/0x7*(parseInt(_0x21378a(0x90))/0x8)+-parseInt(_0x21378a(0x93))/0x9*(-parseInt(_0x21378a(0x91))/0xa)+parseInt(_0x21378a(0x94))/0xb*(-parseInt(_0x21378a(0x8e))/0xc);if(_0x1384bf===_0x2b9316)break;else _0x4a83ea['push'](_0x4a83ea['shift']());}catch(_0xbca591){_0x4a83ea['push'](_0x4a83ea['shift']());}}}(a172_0x49c1,0x5e3dd));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a172_0x204e(_0x3e66e5,_0x1b4337){_0x3e66e5=_0x3e66e5-0x8e;const _0x49c173=a172_0x49c1();let _0x204e57=_0x49c173[_0x3e66e5];return _0x204e57;}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x589e5d,_0x41ced6){const _0x297d1f=a173_0x619c,_0xa738fc=_0x589e5d();while(!![]){try{const _0x280048=-parseInt(_0x297d1f(0x8b))/0x1+parseInt(_0x297d1f(0x8a))/0x2+parseInt(_0x297d1f(0x82))/0x3+parseInt(_0x297d1f(0x81))/0x4*(parseInt(_0x297d1f(0x84))/0x5)+-parseInt(_0x297d1f(0x7c))/0x6*(-parseInt(_0x297d1f(0x87))/0x7)+-parseInt(_0x297d1f(0x83))/0x8*(-parseInt(_0x297d1f(0x79))/0x9)+-parseInt(_0x297d1f(0x85))/0xa;if(_0x280048===_0x41ced6)break;else _0xa738fc['push'](_0xa738fc['shift']());}catch(_0x2e5dee){_0xa738fc['push'](_0xa738fc['shift']());}}}(a173_0x4086,0x5b000));import a173_0x5c2086 from'semver';function a173_0x4086(){const _0xf16d7d=['Recommended\x20stable:\x20','belowMinimum','minimumVersionMessage','18mYasAd','currentVersion','Upgrade\x20command:\x20','658326ZoUkKF','filter','stableVersion','npm\x20install\x20-g\x20','unavailable','16644rVQWtl','1414809sKdXfc','2623384RuQFol','305DlovUa','15413250tSSTLG','minimumVersion','14VVsSRw','upgradeMessage','Current\x20version:\x20','1434526mmBerJ','403914sAtRFH'];a173_0x4086=function(){return _0xf16d7d;};return a173_0x4086();}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(_0x572093,_0x1bfe67){const _0x23c3c1=a173_0x619c,_0x4a1bbc=a173_0x5c2086['valid'](_0x572093)===_0x572093,_0x6f0273=_0x1bfe67?.['stableVersion']??null,_0x5dedf4=_0x1bfe67?.[_0x23c3c1(0x86)]??null,_0x1e9b80=Boolean(_0x4a1bbc&&_0x6f0273&&a173_0x5c2086['lt'](_0x572093,_0x6f0273)),_0x14b268=Boolean(_0x4a1bbc&&_0x5dedf4&&a173_0x5c2086['lt'](_0x572093,_0x5dedf4));return{'currentVersion':_0x572093,'stableVersion':_0x6f0273,'minimumVersion':_0x5dedf4,'needsUpgrade':_0x1e9b80||_0x14b268,'belowMinimum':_0x14b268,'upgradeMessage':_0x1bfe67?.[_0x23c3c1(0x88)],'minimumVersionMessage':_0x1bfe67?.[_0x23c3c1(0x78)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}function a173_0x619c(_0x3af4ea,_0x9e321d){_0x3af4ea=_0x3af4ea-0x78;const _0x4086a2=a173_0x4086();let _0x619c1c=_0x4086a2[_0x3af4ea];return _0x619c1c;}export function getCliUpgradeCommand(_0x14795d){const _0x532989=a173_0x619c;return _0x532989(0x7f)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x14795d[_0x532989(0x7e)]??'latest');}export function assertCliVersionSupported(_0x4fcf48){const _0x1ebfc9=a173_0x619c;if(!_0x4fcf48[_0x1ebfc9(0x8d)])return;const _0x3a0bdc=[_0x4fcf48['minimumVersionMessage'],_0x1ebfc9(0x89)+_0x4fcf48[_0x1ebfc9(0x7a)],'Minimum\x20supported:\x20'+_0x4fcf48[_0x1ebfc9(0x86)],_0x1ebfc9(0x8c)+(_0x4fcf48['stableVersion']??_0x1ebfc9(0x80)),_0x1ebfc9(0x7b)+getCliUpgradeCommand(_0x4fcf48)][_0x1ebfc9(0x7d)](Boolean)['join']('\x0a');throw CliErrors['validation']('Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.',_0x3a0bdc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x12e786,_0x586a0b){const _0x4530f7=a174_0x4b7d,_0x10bac5=_0x12e786();while(!![]){try{const _0x11fe05=-parseInt(_0x4530f7(0x8e))/0x1*(parseInt(_0x4530f7(0x94))/0x2)+-parseInt(_0x4530f7(0x7d))/0x3*(-parseInt(_0x4530f7(0x85))/0x4)+parseInt(_0x4530f7(0x82))/0x5+-parseInt(_0x4530f7(0x84))/0x6+parseInt(_0x4530f7(0x8c))/0x7+parseInt(_0x4530f7(0x90))/0x8+-parseInt(_0x4530f7(0x8b))/0x9;if(_0x11fe05===_0x586a0b)break;else _0x10bac5['push'](_0x10bac5['shift']());}catch(_0x5df54f){_0x10bac5['push'](_0x10bac5['shift']());}}}(a174_0x5584,0xb84af));import a174_0x5fcee8 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(_0x1e18d2){const _0x528cf6=a174_0x4b7d;return typeof _0x1e18d2===_0x528cf6(0x8a)&&_0x1e18d2[_0x528cf6(0x88)]()?_0x1e18d2[_0x528cf6(0x88)]():null;}function pickStrictSemver(_0x46de87){const _0x2702e5=pickString(_0x46de87);return _0x2702e5&&a174_0x5fcee8['valid'](_0x2702e5)===_0x2702e5?_0x2702e5:null;}export function normalizeCliVersionPolicy(_0x58b2fb){const _0x51b799=a174_0x4b7d;if(!_0x58b2fb||typeof _0x58b2fb!==_0x51b799(0x8d))return null;const _0x4bc72a=_0x58b2fb,_0x2c4baa=_0x4bc72a[_0x51b799(0x7f)]&&typeof _0x4bc72a[_0x51b799(0x7f)]===_0x51b799(0x8d)?_0x4bc72a['cli']:_0x4bc72a,_0x4a1ab1=pickStrictSemver(_0x2c4baa[_0x51b799(0x81)]??_0x2c4baa[_0x51b799(0x93)]??_0x2c4baa[_0x51b799(0x86)]),_0x48470b=pickStrictSemver(_0x2c4baa[_0x51b799(0x91)]??_0x2c4baa['minVersion']);if(!_0x4a1ab1&&!_0x48470b)return null;if(_0x4a1ab1&&_0x48470b&&a174_0x5fcee8['gt'](_0x48470b,_0x4a1ab1))return null;return{'stableVersion':_0x4a1ab1,'minimumVersion':_0x48470b,'upgradeMessage':pickString(_0x2c4baa[_0x51b799(0x83)])??undefined,'minimumVersionMessage':pickString(_0x2c4baa[_0x51b799(0x89)])??undefined};}export async function fetchCliVersionPolicy(){const _0x169d10=a174_0x4b7d;try{const _0x27beec=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x169d10(0x87)},'signal':AbortSignal[_0x169d10(0x92)](FETCH_TIMEOUT_MS)});if(!_0x27beec['ok'])return null;return normalizeCliVersionPolicy(await _0x27beec[_0x169d10(0x80)]());}catch{return null;}}function a174_0x5584(){const _0x2ce1a7=['stableVersion','17310cYdFMH','upgradeMessage','6748074bzXpus','4253048WpAFqN','recommendedVersion','application/json','trim','minimumVersionMessage','string','7462989qHgpSm','9564660TBrQsP','object','10pHGAcI','finally','7381512WVDNqZ','minimumVersion','timeout','latestVersion','129406MKcCfa','3TIroPD','now','cli','json'];a174_0x5584=function(){return _0x2ce1a7;};return a174_0x5584();}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x48d2c9=a174_0x4b7d,_0x562264=Date['now']();if(hasCachedPolicy){const _0x4835ee=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x562264-cachedAt<_0x4835ee)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()['then'](_0x14ba0a=>{const _0x13039d=a174_0x4b7d;return cachedPolicy=_0x14ba0a,cachedAt=Date[_0x13039d(0x7e)](),hasCachedPolicy=!![],_0x14ba0a;})[_0x48d2c9(0x8f)](()=>{pendingPolicy=null;}),pendingPolicy;}function a174_0x4b7d(_0x271375,_0x47aa0f){_0x271375=_0x271375-0x7d;const _0x55844b=a174_0x5584();let _0x4b7d7a=_0x55844b[_0x271375];return _0x4b7d7a;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a175_0x8668(_0x32f1a9,_0x442293){_0x32f1a9=_0x32f1a9-0x1f2;const _0x1b2ca7=a175_0x1b2c();let _0x8668b2=_0x1b2ca7[_0x32f1a9];return _0x8668b2;}const a175_0x150d9c=a175_0x8668;(function(_0x5c40bb,_0x5a0f8e){const _0x3518a2=a175_0x8668,_0x10a4f1=_0x5c40bb();while(!![]){try{const _0x1f7160=-parseInt(_0x3518a2(0x20f))/0x1+-parseInt(_0x3518a2(0x1f5))/0x2+parseInt(_0x3518a2(0x212))/0x3+parseInt(_0x3518a2(0x1fe))/0x4+-parseInt(_0x3518a2(0x224))/0x5+-parseInt(_0x3518a2(0x215))/0x6*(-parseInt(_0x3518a2(0x203))/0x7)+parseInt(_0x3518a2(0x21a))/0x8;if(_0x1f7160===_0x5a0f8e)break;else _0x10a4f1['push'](_0x10a4f1['shift']());}catch(_0xc1b801){_0x10a4f1['push'](_0x10a4f1['shift']());}}}(a175_0x1b2c,0xa038e));import a175_0x2c4cc2 from'winston';import a175_0xc7d556 from'node:fs';import a175_0x4b82bc from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';function a175_0x1b2c(){const _0x55d558=['combine','warn','map','currentRawCommand','format','existsSync','Starting:\x20','306882jmwGNf','Failed\x20to\x20clear\x20logs:','createLogger','123690tnqLLI','filter','command','1722msxoHY','info','setRawCommand','timestamp','trim','10349072pKiLFZ','now','success','log','duration','readLogs','message','initWinstonLogger','parse','utf8','5290540HrbmVL','logFilePath','yellow','toISOString','524618LDacpL','red','logTask','level','blue','mkdirSync','winstonLogger','readFileSync','logFileName','958112MQkzXc','unknown','clearLogs','details','split','17297MKYCIi','error','clear','addColors','green'];a175_0x1b2c=function(){return _0x55d558;};return a175_0x1b2c();}class Logger{[a175_0x150d9c(0x1fb)];[a175_0x150d9c(0x1f2)]='';[a175_0x150d9c(0x20b)]='';constructor(){}[a175_0x150d9c(0x217)](_0x48e8ae){const _0x5eff5e=a175_0x150d9c;this[_0x5eff5e(0x20b)]=_0x48e8ae;}['setLogPath'](_0x3c366d){const _0x1016a3=a175_0x150d9c;this[_0x1016a3(0x1f2)]=a175_0x4b82bc['join'](_0x3c366d,PRODUCT_CONFIG[_0x1016a3(0x1fd)]),this[_0x1016a3(0x1fb)]&&this[_0x1016a3(0x1fb)][_0x1016a3(0x205)](),this[_0x1016a3(0x221)]();}[a175_0x150d9c(0x221)](){const _0x13c46f=a175_0x150d9c,_0x586aae=a175_0x4b82bc['dirname'](this[_0x13c46f(0x1f2)]);!a175_0xc7d556[_0x13c46f(0x20d)](_0x586aae)&&a175_0xc7d556[_0x13c46f(0x1fa)](_0x586aae,{'recursive':!![]});const _0x1a2d52=a175_0x2c4cc2['format'][_0x13c46f(0x208)](a175_0x2c4cc2[_0x13c46f(0x20c)][_0x13c46f(0x218)](),a175_0x2c4cc2[_0x13c46f(0x20c)]['errors']({'stack':!![]}),a175_0x2c4cc2[_0x13c46f(0x20c)]['printf'](_0x5b0a1f=>{const _0x1c4bb5=_0x13c46f,_0x49f8bf={'timestamp':_0x5b0a1f['timestamp']||new Date()[_0x1c4bb5(0x1f4)](),'level':_0x5b0a1f[_0x1c4bb5(0x1f8)]||'info','command':_0x5b0a1f[_0x1c4bb5(0x214)]||_0x1c4bb5(0x1ff),'rawCommand':_0x5b0a1f['rawCommand']||this[_0x1c4bb5(0x20b)]||undefined,'message':_0x5b0a1f[_0x1c4bb5(0x220)]||'','duration':_0x5b0a1f[_0x1c4bb5(0x21e)]||undefined,'details':_0x5b0a1f[_0x1c4bb5(0x201)]||undefined};return JSON['stringify'](_0x49f8bf);}));this[_0x13c46f(0x1fb)]=a175_0x2c4cc2[_0x13c46f(0x211)]({'level':_0x13c46f(0x216),'format':_0x1a2d52,'transports':[new a175_0x2c4cc2['transports']['File']({'filename':this['logFilePath'],'level':_0x13c46f(0x216)})],'silent':![]}),a175_0x2c4cc2[_0x13c46f(0x206)]({'success':_0x13c46f(0x207),'error':_0x13c46f(0x1f6),'warn':_0x13c46f(0x1f3),'info':_0x13c46f(0x1f9)});}[a175_0x150d9c(0x216)](_0xb57b8e,_0x1e206a,_0x299998){const _0x37c4a8=a175_0x150d9c;if(!this[_0x37c4a8(0x1f2)]||!this[_0x37c4a8(0x1fb)])return;this[_0x37c4a8(0x1fb)][_0x37c4a8(0x216)](_0x1e206a,{'command':_0xb57b8e,'details':_0x299998});}[a175_0x150d9c(0x21c)](_0x53f638,_0x37fd38,_0x4227a0,_0x5b6a61){const _0x4e3489=a175_0x150d9c;if(!this['logFilePath']||!this[_0x4e3489(0x1fb)])return;this[_0x4e3489(0x1fb)][_0x4e3489(0x21d)](_0x4e3489(0x216),_0x37fd38,{'level':_0x4e3489(0x21c),'command':_0x53f638,'duration':_0x4227a0,'details':_0x5b6a61});}[a175_0x150d9c(0x204)](_0x5c7e9f,_0x581ea3,_0x3dfd02){const _0x16d9fd=a175_0x150d9c;if(!this['logFilePath']||!this[_0x16d9fd(0x1fb)])return;this['winstonLogger']['error'](_0x581ea3,{'command':_0x5c7e9f,'details':_0x3dfd02});}[a175_0x150d9c(0x209)](_0x27d424,_0x1c4f47,_0x4e1532){const _0x325d25=a175_0x150d9c;if(!this[_0x325d25(0x1f2)]||!this[_0x325d25(0x1fb)])return;this['winstonLogger'][_0x325d25(0x209)](_0x1c4f47,{'command':_0x27d424,'details':_0x4e1532});}async[a175_0x150d9c(0x1f7)](_0x2db00a,_0x49720a,_0x172af5){const _0x314816=a175_0x150d9c,_0x31c3e0=Date[_0x314816(0x21b)]();this['info'](_0x2db00a,_0x314816(0x20e)+_0x49720a);try{const _0x4cbe5e=await _0x172af5(),_0x39c8ee=Date[_0x314816(0x21b)]()-_0x31c3e0;return this[_0x314816(0x21c)](_0x2db00a,'Completed:\x20'+_0x49720a,_0x39c8ee),_0x4cbe5e;}catch(_0x4db4a1){const _0x48a495=Date[_0x314816(0x21b)]()-_0x31c3e0;this[_0x314816(0x204)](_0x2db00a,'Failed:\x20'+_0x49720a,{'error':_0x4db4a1 instanceof Error?_0x4db4a1[_0x314816(0x220)]:String(_0x4db4a1),'duration':_0x48a495});throw _0x4db4a1;}}[a175_0x150d9c(0x21f)](){const _0x3c1aa8=a175_0x150d9c;try{if(!a175_0xc7d556['existsSync'](this[_0x3c1aa8(0x1f2)]))return[];const _0xb88c=a175_0xc7d556[_0x3c1aa8(0x1fc)](this[_0x3c1aa8(0x1f2)],'utf8');return _0xb88c[_0x3c1aa8(0x202)](/\r?\n/)[_0x3c1aa8(0x213)](_0x5db3df=>_0x5db3df[_0x3c1aa8(0x219)]())[_0x3c1aa8(0x20a)](_0x4fa22c=>JSON[_0x3c1aa8(0x222)](_0x4fa22c));}catch(_0x5213b6){return console[_0x3c1aa8(0x209)]('Failed\x20to\x20read\x20logs:',_0x5213b6),[];}}[a175_0x150d9c(0x200)](){const _0x48bd13=a175_0x150d9c;try{a175_0xc7d556[_0x48bd13(0x20d)](this['logFilePath'])&&a175_0xc7d556['writeFileSync'](this[_0x48bd13(0x1f2)],'',_0x48bd13(0x223));}catch(_0x10d7b4){console[_0x48bd13(0x209)](_0x48bd13(0x210),_0x10d7b4);}}['getWinstonInstance'](){const _0xf9f0bc=a175_0x150d9c;return this[_0xf9f0bc(0x1fb)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a176_0x28e59d=a176_0x3d55;(function(_0x395da1,_0x1f41af){const _0x515dba=a176_0x3d55,_0x533c5b=_0x395da1();while(!![]){try{const _0x24a199=parseInt(_0x515dba(0x87))/0x1*(parseInt(_0x515dba(0x90))/0x2)+parseInt(_0x515dba(0x91))/0x3*(-parseInt(_0x515dba(0x7f))/0x4)+parseInt(_0x515dba(0x8d))/0x5+-parseInt(_0x515dba(0x8a))/0x6*(parseInt(_0x515dba(0x92))/0x7)+-parseInt(_0x515dba(0x89))/0x8+-parseInt(_0x515dba(0x8f))/0x9+-parseInt(_0x515dba(0x82))/0xa*(-parseInt(_0x515dba(0x84))/0xb);if(_0x24a199===_0x1f41af)break;else _0x533c5b['push'](_0x533c5b['shift']());}catch(_0x130e61){_0x533c5b['push'](_0x533c5b['shift']());}}}(a176_0x1697,0xeff6a));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a176_0x28e59d(0x81)]),MIN_SAFE_INTEGER=BigInt(Number[a176_0x28e59d(0x8c)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x36c6c5){const _0x470977=a176_0x28e59d;if(_0x36c6c5[_0x470977(0x86)]('.')||_0x36c6c5[_0x470977(0x86)]('e')||_0x36c6c5['includes']('E'))return![];const _0x53976f=BigInt(_0x36c6c5);return _0x53976f>MAX_SAFE_INTEGER||_0x53976f<MIN_SAFE_INTEGER;}function a176_0x1697(){const _0x1d2f98=['prototype','8573224VWlSGI','969486OGzxVw','slice','MIN_SAFE_INTEGER','5161400BUcUGf','json','10181295HbHrzd','2094VyvpDJ','482763POfoMA','7EftLDH','defineProperty','undefined','8gdpBSQ','text','MAX_SAFE_INTEGER','700bpGIdr','length','224675iNXdbO','exec','includes','1153tXHiJb'];a176_0x1697=function(){return _0x1d2f98;};return a176_0x1697();}function quoteUnsafeIntegerLiterals(_0x9b762a){const _0x310d98=a176_0x28e59d;let _0x458bdc='',_0x2adcc2=![],_0x266da7=![];for(let _0x4efc32=0x0;_0x4efc32<_0x9b762a[_0x310d98(0x83)];){const _0x2837cf=_0x9b762a[_0x4efc32];if(_0x2adcc2){_0x458bdc+=_0x2837cf,_0x4efc32+=0x1;if(_0x266da7)_0x266da7=![];else{if(_0x2837cf==='\x5c')_0x266da7=!![];else _0x2837cf==='\x22'&&(_0x2adcc2=![]);}continue;}if(_0x2837cf==='\x22'){_0x2adcc2=!![],_0x458bdc+=_0x2837cf,_0x4efc32+=0x1;continue;}if(_0x2837cf==='-'||_0x2837cf>='0'&&_0x2837cf<='9'){const _0x3a2be2=JSON_NUMBER_PATTERN[_0x310d98(0x85)](_0x9b762a[_0x310d98(0x8b)](_0x4efc32))?.[0x0];if(_0x3a2be2){_0x458bdc+=isUnsafeIntegerLiteral(_0x3a2be2)?'\x22'+_0x3a2be2+'\x22':_0x3a2be2,_0x4efc32+=_0x3a2be2[_0x310d98(0x83)];continue;}}_0x458bdc+=_0x2837cf,_0x4efc32+=0x1;}return _0x458bdc;}function a176_0x3d55(_0x512708,_0x1725fd){_0x512708=_0x512708-0x7d;const _0x16975b=a176_0x1697();let _0x3d551b=_0x16975b[_0x512708];return _0x3d551b;}export function parseLosslessJson(_0x42b6a4){return JSON['parse'](quoteUnsafeIntegerLiterals(_0x42b6a4));}export function installLosslessJsonResponseParser(){const _0x5c87d3=a176_0x28e59d;if(typeof Response===_0x5c87d3(0x7e))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x5c87d3(0x88)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,_0x5c87d3(0x8e)),Object[_0x5c87d3(0x7d)](responseJsonPrototype,_0x5c87d3(0x8e),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x591fef(){const _0x41316e=_0x5c87d3;return parseLosslessJson(await this[_0x41316e(0x80)]());}}),restoreResponseJsonParser=()=>{const _0x2b8eac=_0x5c87d3;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x2b8eac(0x8e),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x2b8eac(0x8e)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10e1c9,_0x4e1947){const _0x1604be=a177_0x498b,_0x16e171=_0x10e1c9();while(!![]){try{const _0x4d052c=parseInt(_0x1604be(0x184))/0x1*(parseInt(_0x1604be(0x179))/0x2)+-parseInt(_0x1604be(0x183))/0x3*(parseInt(_0x1604be(0x18d))/0x4)+parseInt(_0x1604be(0x17a))/0x5+parseInt(_0x1604be(0x17c))/0x6+parseInt(_0x1604be(0x188))/0x7*(-parseInt(_0x1604be(0x18e))/0x8)+parseInt(_0x1604be(0x17b))/0x9+-parseInt(_0x1604be(0x18c))/0xa;if(_0x4d052c===_0x4e1947)break;else _0x16e171['push'](_0x16e171['shift']());}catch(_0x131889){_0x16e171['push'](_0x16e171['shift']());}}}(a177_0x2166,0xc29fe));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x3c2ad9){const _0x29253d=a177_0x498b;if(!_0x3c2ad9)return undefined;try{return parseLosslessJson(_0x3c2ad9);}catch{throw CliErrors[_0x29253d(0x190)](_0x29253d(0x17f)+_0x3c2ad9);}}function a177_0x498b(_0x14dc06,_0x3e867b){_0x14dc06=_0x14dc06-0x178;const _0x2166bf=a177_0x2166();let _0x498b78=_0x2166bf[_0x14dc06];return _0x498b78;}export function parseJsonParamsValue(_0x1afdb0){const _0x3541c9=a177_0x498b;if(!_0x1afdb0)return undefined;try{return parseLosslessJson(_0x1afdb0);}catch{throw CliErrors[_0x3541c9(0x190)](_0x3541c9(0x17f)+_0x1afdb0);}}export function parseBatchCreateItemsFromParams(_0x5c7b28){const _0x217d0f=a177_0x498b;if(Array[_0x217d0f(0x192)](_0x5c7b28))return _0x5c7b28;if(_0x5c7b28!==null&&_0x5c7b28!==undefined&&typeof _0x5c7b28==='object'&&Array[_0x217d0f(0x192)](_0x5c7b28['items']))return _0x5c7b28['items'];throw CliErrors['validation'](_0x217d0f(0x185),_0x217d0f(0x17d));}function parseDataUpdateId(_0x1874a1,_0x3704b3){const _0x15140c=a177_0x498b;if(typeof _0x1874a1===_0x15140c(0x17e)&&Number[_0x15140c(0x178)](_0x1874a1)&&_0x1874a1>0x0)return _0x1874a1;if(typeof _0x1874a1===_0x15140c(0x18a)){if(/^[1-9]\d*$/[_0x15140c(0x187)](_0x1874a1))return _0x1874a1;}throw CliErrors[_0x15140c(0x190)]('data\x20update\x20--params.'+_0x3704b3+_0x15140c(0x181));}export function parseUpdateIdsFromParams(_0x49f50d){const _0x475505=a177_0x498b;if(_0x49f50d===null||_0x49f50d===undefined||typeof _0x49f50d!=='object'||Array[_0x475505(0x192)](_0x49f50d))throw CliErrors[_0x475505(0x190)](_0x475505(0x18b),_0x475505(0x180));const _0x485865=_0x49f50d['id'];if(_0x485865===undefined||_0x485865===null)throw CliErrors[_0x475505(0x190)](_0x475505(0x18f),_0x475505(0x180));const _0x452ece=Array[_0x475505(0x192)](_0x485865)?_0x485865:[_0x485865];if(_0x452ece[_0x475505(0x189)]===0x0)throw CliErrors[_0x475505(0x190)]('data\x20update\x20id\x20array\x20cannot\x20be\x20empty.');if(_0x452ece['length']>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x475505(0x190)](_0x475505(0x182)+MAX_DATA_UPDATE_IDS+'\x20records\x20per\x20call;\x20received\x20'+_0x452ece[_0x475505(0x189)]+'.');return _0x452ece['map']((_0x595882,_0x44fc12)=>parseDataUpdateId(_0x595882,Array[_0x475505(0x192)](_0x485865)?_0x475505(0x186)+_0x44fc12+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x7bd6c0,_0x227126){const _0x1f0788=a177_0x498b;if(Array[_0x1f0788(0x192)](_0x7bd6c0['id'])&&_0x227126[_0x1f0788(0x189)]>0x1)return{..._0x7bd6c0,'id':_0x227126[_0x1f0788(0x191)](',')};return _0x7bd6c0;}function a177_0x2166(){const _0x127f6b=['string','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','32250470KligJR','100nIrJBD','144dbGUhg','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','validation','join','isArray','isSafeInteger','154006pQRDCw','3109695rbABVx','10903338GugPGS','8482170fUhfFa','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','number','Invalid\x20JSON\x20for\x20--params:\x20','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','data\x20update\x20can\x20update\x20at\x20most\x20','15699dGBwTI','20XgsEfx','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','id[','test','246603HKVPsW','length'];a177_0x2166=function(){return _0x127f6b;};return a177_0x2166();}
|