@lovrabet/lovrabet-cli 2.1.5 → 2.1.6-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/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/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/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x38f41f=a37_0x7092;(function(_0x1450e3,_0xd7477){const _0x5930db=a37_0x7092,_0x2d9b11=_0x1450e3();while(!![]){try{const _0x1379ca=-parseInt(_0x5930db(0x1c0))/0x1+-parseInt(_0x5930db(0x1c9))/0x2+parseInt(_0x5930db(0x1cb))/0x3+-parseInt(_0x5930db(0x1c7))/0x4+-parseInt(_0x5930db(0x1b4))/0x5*(-parseInt(_0x5930db(0x1b5))/0x6)+-parseInt(_0x5930db(0x1b6))/0x7+parseInt(_0x5930db(0x1c3))/0x8;if(_0x1379ca===_0xd7477)break;else _0x2d9b11['push'](_0x2d9b11['shift']());}catch(_0x6db634){_0x2d9b11['push'](_0x2d9b11['shift']());}}}(a37_0x1f46,0x41c70));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';function a37_0x7092(_0x476ed5,_0x179a03){_0x476ed5=_0x476ed5-0x1b2;const _0x1f4623=a37_0x1f46();let _0x7092bc=_0x1f4623[_0x476ed5];return _0x7092bc;}function a37_0x1f46(){const _0x563992=['bool','length','5HVsFpk','1657374ohIVTy','1734726IVoxtV','\x20local\x20Skill(s).','scope','production','list','../../../skills/runtime-skill-sync.js','map','skill','Listed\x20','\x20remote\x20Skill(s).','525821mdnLBX','read','filter','8555240EyWwri','appCode','local','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','1858928SBYwKB','builtin','615876VYlekP','company','1410297MaLSzd','../../../core/api-client.js','personal','str','trim'];a37_0x1f46=function(){return _0x563992;};return a37_0x1f46();}import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a37_0x38f41f(0x1bd),'command':a37_0x38f41f(0x1ba),'description':a37_0x38f41f(0x1c6),'risk':a37_0x38f41f(0x1c1),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x3e2ad6){const _0x1f2144=a37_0x38f41f,_0x2ebac8=_0x3e2ad6['str']('code'),_0x34694b=normalizeListScope(_0x3e2ad6[_0x1f2144(0x1ce)](_0x1f2144(0x1b8)));if(_0x3e2ad6[_0x1f2144(0x1b2)](_0x1f2144(0x1c5))){const _0x1ee6ea=_0x3e2ad6['accessKey'];if(!_0x1ee6ea)throw CliErrors['authRequired']();const {listLocalRuntimeSkills:_0x267ecd}=await import(_0x1f2144(0x1bb)),_0x3d6da1=_0x267ecd({'env':_0x3e2ad6['envName']??_0x1f2144(0x1b9),'accessKey':_0x1ee6ea,'appCode':_0x3e2ad6[_0x1f2144(0x1c4)],'scopes':listScopeToRuntimeScopes(_0x34694b),'code':_0x2ebac8[_0x1f2144(0x1cf)]()||undefined}),_0x142364=groupLocalRuntimeSkills(_0x3d6da1);return{'ok':!![],'data':{'appCode':_0x3e2ad6[_0x1f2144(0x1c4)],'source':'local','scope':_0x34694b,'total':_0x3d6da1[_0x1f2144(0x1b3)],'personal':_0x142364[_0x1f2144(0x1cd)][_0x1f2144(0x1b3)],'company':_0x142364[_0x1f2144(0x1ca)][_0x1f2144(0x1b3)],'items':_0x3d6da1[_0x1f2144(0x1bc)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x142364[_0x1f2144(0x1cd)]['map'](summarizeLocalRuntimeSkill),'company':_0x142364['company'][_0x1f2144(0x1bc)](summarizeLocalRuntimeSkill)}},'message':'Listed\x20'+_0x3d6da1[_0x1f2144(0x1b3)]+_0x1f2144(0x1b7)};}const {listRuntimeSkills:_0x5a1e80}=await import(_0x1f2144(0x1cc)),_0x2740c6=await _0x5a1e80({'appCode':_0x3e2ad6['appCode'],'scope':listScopeToRemoteScope(_0x34694b),'code':_0x2ebac8['trim']()||undefined}),_0x3269de=shouldListScope(_0x34694b,_0x1f2144(0x1cd))?_0x2740c6[_0x1f2144(0x1cd)]??[]:[],_0x347d35=shouldListScope(_0x34694b,_0x1f2144(0x1ca))?_0x2740c6[_0x1f2144(0x1ca)]??[]:[],_0x6163b0=[..._0x3269de,..._0x347d35];return{'ok':!![],'data':{'appCode':_0x3e2ad6[_0x1f2144(0x1c4)],'source':'remote','scope':_0x34694b,'total':_0x6163b0[_0x1f2144(0x1b3)],'personal':_0x3269de[_0x1f2144(0x1b3)],'company':_0x347d35[_0x1f2144(0x1b3)],'items':_0x6163b0['map'](summarizeRuntimeSkill),'skills':{'personal':_0x3269de[_0x1f2144(0x1bc)](summarizeRuntimeSkill),'company':_0x347d35[_0x1f2144(0x1bc)](summarizeRuntimeSkill)}},'message':_0x1f2144(0x1be)+_0x6163b0[_0x1f2144(0x1b3)]+_0x1f2144(0x1bf)};}};function groupLocalRuntimeSkills(_0x3eaf62){const _0x170e9c=a37_0x38f41f;return{'personal':_0x3eaf62[_0x170e9c(0x1c2)](_0x18b065=>_0x18b065[_0x170e9c(0x1b8)]==='personal'),'company':_0x3eaf62['filter'](_0x578423=>_0x578423[_0x170e9c(0x1b8)]===_0x170e9c(0x1ca)),'builtin':_0x3eaf62['filter'](_0x2a0042=>_0x2a0042['scope']===_0x170e9c(0x1c8))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0xea8775=a38_0x57e1;(function(_0x2828d7,_0x4c1898){const _0x4d27ce=a38_0x57e1,_0x1ba07e=_0x2828d7();while(!![]){try{const _0x2ec252=parseInt(_0x4d27ce(0x1ed))/0x1*(-parseInt(_0x4d27ce(0x1e1))/0x2)+parseInt(_0x4d27ce(0x1c2))/0x3*(-parseInt(_0x4d27ce(0x1e2))/0x4)+-parseInt(_0x4d27ce(0x1dd))/0x5*(-parseInt(_0x4d27ce(0x1ef))/0x6)+-parseInt(_0x4d27ce(0x1ea))/0x7+parseInt(_0x4d27ce(0x1d1))/0x8*(-parseInt(_0x4d27ce(0x1bc))/0x9)+-parseInt(_0x4d27ce(0x1ca))/0xa*(parseInt(_0x4d27ce(0x1df))/0xb)+-parseInt(_0x4d27ce(0x1d2))/0xc*(-parseInt(_0x4d27ce(0x1d4))/0xd);if(_0x2ec252===_0x4c1898)break;else _0x1ba07e['push'](_0x1ba07e['shift']());}catch(_0x29721f){_0x1ba07e['push'](_0x1ba07e['shift']());}}}(a38_0x1c68,0x22158));import{CliErrors}from'../../../errors.js';function a38_0x1c68(){const _0x261c40=['pop','2242395WoiVpa','from','input','every','Updated\x20personal\x20Skill\x20','appCode','269397sgeDTI','dir','push','personal','stringify','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20runtime\x20Skill\x20scope','write','Skill\x20','310aPQoUa','length','\x20\x20To\x20proceed:\x20lovrabet\x20skill\x20push\x20--dir\x20','skillCode','cancelled','accessKey','find','8HWQrIR','12148392eeskrg','map','13qrNPpb','nonInteractive','\x20\x20\x20Continue\x20pushing\x20this\x20Skill?\x20[y/N]\x20','\x20appears\x20to\x20reference\x20rabetbase\x20CLI.','authRequired','../../../core/api-client.js','\x20references\x20rabetbase\x20CLI\x20and\x20requires\x20confirmation\x20before\x20push.\x0a','\x20--yes','\x20\x20\x20Runtime\x20business\x20Skills\x20should\x20normally\x20use\x20lovrabet\x20commands.','7935XJEhEI','yes','72798HfgbWS','slice','254mfbgBW','12DxTWPZ','validation','\x20\x20\x20','index','⚠\x20\x20Skill\x20','str','filter','trim','707686YKjxPm','rabetbase','split','565xWfJYA','test','90frWGxH','flatMap','files','../../../skills/runtime-skill-sync.js','skill','bool','path'];a38_0x1c68=function(){return _0x261c40;};return a38_0x1c68();}import{fileText,scanSkillDirectory}from'../../../skills/runtime-skill-sync/local-files.js';import{requireConfirmationPrompt}from'@lovrabet/cli-framework';import{DIR_FLAG}from'../flags.js';import{isMultiFileManifest,isPackageBackedManifest}from'../manifest-helpers.js';import{summarizeRuntimeSkill}from'../summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';function a38_0x57e1(_0x39cee4,_0x3eb2cd){_0x39cee4=_0x39cee4-0x1bc;const _0x1c68b0=a38_0x1c68();let _0x57e1a9=_0x1c68b0[_0x39cee4];return _0x57e1a9;}export const pushCommand={'service':a38_0xea8775(0x1f3),'command':a38_0xea8775(0x1c4),'description':a38_0xea8775(0x1c7),'risk':a38_0xea8775(0x1c8),'flags':[DIR_FLAG],async 'execute'(_0x3accb5){const _0x5ed467=a38_0xea8775,{createPersonalRuntimeSkill:_0x57f9fa,downloadRuntimeSkillPackage:_0x5e87f0,listRuntimeSkills:_0x49a4c1,updatePersonalRuntimeSkill:_0x4d3eba}=await import(_0x5ed467(0x1d9)),{verifyRuntimeSkillPackage:_0x518882,verifyRuntimeSkillBundle:_0x49215d,readPushDirectory:_0x4b38fe,recordPushedRuntimeSkill:_0x20cc95}=await import(_0x5ed467(0x1f2));if(!_0x3accb5[_0x5ed467(0x1cf)])throw CliErrors[_0x5ed467(0x1d8)]();const _0x4af801=_0x3accb5[_0x5ed467(0x1e7)](_0x5ed467(0x1c3)),_0x333828=validateSkillDirectory(_0x4af801);throwIfSkillValidationFailed(_0x333828);const _0x30e46f=_0x333828[_0x5ed467(0x1c3)],_0x56964b=_0x4b38fe(_0x30e46f,_0x3accb5[_0x5ed467(0x1c1)]);await confirmRabetbaseCliReferences(_0x3accb5,_0x30e46f,_0x56964b['skillCode']);const _0x50ec35=(await _0x49a4c1({'appCode':_0x3accb5[_0x5ed467(0x1c1)],'scope':_0x5ed467(0x1c5)}))[_0x5ed467(0x1c5)][_0x5ed467(0x1d0)](_0x36deac=>_0x36deac['skillCode']===_0x56964b[_0x5ed467(0x1cd)]),_0x5b6f34=_0x50ec35?await _0x4d3eba(_0x56964b['skillCode'],_0x3accb5[_0x5ed467(0x1c1)],_0x56964b['input']):await _0x57f9fa(_0x3accb5[_0x5ed467(0x1c1)],_0x56964b[_0x5ed467(0x1be)]);let _0x334c2d=_0x5b6f34;if(isMultiFileManifest(_0x56964b[_0x5ed467(0x1be)][_0x5ed467(0x1f1)])){const _0x35004e=await _0x5e87f0(_0x5ed467(0x1c5),_0x5b6f34['skillCode']||_0x56964b['skillCode'],_0x3accb5['appCode']);_0x49215d(_0x56964b[_0x5ed467(0x1be)][_0x5ed467(0x1f1)],_0x35004e),_0x334c2d={..._0x5b6f34,'files':_0x56964b[_0x5ed467(0x1be)][_0x5ed467(0x1f1)]};}else{if(isPackageBackedManifest(_0x5b6f34[_0x5ed467(0x1f1)])){const _0x386ea0=await _0x5e87f0('personal',_0x5b6f34['skillCode']||_0x56964b[_0x5ed467(0x1cd)],_0x3accb5[_0x5ed467(0x1c1)]);_0x518882(_0x5b6f34['files'],_0x386ea0);}}return _0x20cc95(_0x30e46f,_0x334c2d,_0x3accb5[_0x5ed467(0x1c1)]),{'ok':!![],'data':summarizeRuntimeSkill(_0x5b6f34),'message':_0x50ec35?_0x5ed467(0x1c0)+_0x56964b[_0x5ed467(0x1cd)]:'Created\x20personal\x20Skill\x20'+_0x56964b['skillCode']};}};async function confirmRabetbaseCliReferences(_0x4e1e1c,_0x379e11,_0x277b40){const _0x53573c=a38_0xea8775,_0x1b51a0=findRabetbaseCliReferences(_0x379e11);if(_0x1b51a0[_0x53573c(0x1cb)]===0x0||_0x4e1e1c[_0x53573c(0x1f4)](_0x53573c(0x1de)))return;if(_0x4e1e1c[_0x53573c(0x1d5)])throw CliErrors[_0x53573c(0x1e3)](_0x53573c(0x1c9)+_0x277b40+_0x53573c(0x1da)+(_0x53573c(0x1cc)+JSON[_0x53573c(0x1c6)](_0x4e1e1c[_0x53573c(0x1e7)]('dir'))+_0x53573c(0x1db)));await requireConfirmationPrompt({'lines':[_0x53573c(0x1e6)+_0x277b40+_0x53573c(0x1d7),_0x53573c(0x1dc),..._0x1b51a0['slice'](0x0,0x5)[_0x53573c(0x1d3)](_0x471f0c=>_0x53573c(0x1e4)+_0x471f0c),_0x53573c(0x1d6)],'createCancelledError':_0x4171c3=>CliErrors[_0x53573c(0x1ce)](_0x4171c3)});}function findRabetbaseCliReferences(_0xa2ba19){const _0x5df09d=a38_0xea8775;return scanSkillDirectory(_0xa2ba19)[_0x5df09d(0x1f0)](_0x3f701b=>{const _0x236a46=_0x5df09d,_0xaa5d25=fileText(_0x3f701b);return _0xaa5d25[_0x236a46(0x1ec)](/\r?\n/)[_0x236a46(0x1d3)]((_0x5d37fa,_0x7bc2b6)=>({'index':_0x7bc2b6,'line':_0x5d37fa[_0x236a46(0x1e9)]()}))[_0x236a46(0x1e8)](({line:_0x5e2550})=>isLikelyRabetbaseCliDependency(_0x5e2550))[_0x236a46(0x1d3)](({index:_0x104c35,line:_0x37373d})=>_0x3f701b[_0x236a46(0x1f5)]+':'+(_0x104c35+0x1)+':\x20'+_0x37373d);});}function isLikelyRabetbaseCliDependency(_0xd54477){const _0x4a795f=a38_0xea8775;if(!/\brabetbase\b/i['test'](_0xd54477))return![];if(allRabetbaseMentionsAreNegated(_0xd54477))return![];return/`?\brabetbase\b\s+(?:--|[a-z])/i['test'](_0xd54477)||/(执行|运行|调用|使用|通过).{0,16}\brabetbase\b/i[_0x4a795f(0x1ee)](_0xd54477)||/(use|run|call|execute)\s+`?\brabetbase\b/i[_0x4a795f(0x1ee)](_0xd54477)||/\brabetbase\b.{0,16}(查询|写入|同步|dataset|sql|bff|page|db|数据库)/i[_0x4a795f(0x1ee)](_0xd54477);}function allRabetbaseMentionsAreNegated(_0x5f2795){const _0x55adbc=a38_0xea8775,_0x5bd070=Array[_0x55adbc(0x1bd)](_0x5f2795['matchAll'](/\brabetbase\b/ig));return _0x5bd070[_0x55adbc(0x1cb)]>0x0&&_0x5bd070[_0x55adbc(0x1bf)](_0x2d2941=>isRabetbaseMentionNegated(_0x5f2795,_0x2d2941[_0x55adbc(0x1e5)]??0x0));}function isRabetbaseMentionNegated(_0xcc1091,_0x418129){const _0x39768d=a38_0xea8775,_0x5e3c3b=currentClauseBefore(_0xcc1091[_0x39768d(0x1e0)](0x0,_0x418129)),_0x2ddb2d=currentClauseAfter(_0xcc1091[_0x39768d(0x1e0)](_0x418129+_0x39768d(0x1eb)[_0x39768d(0x1cb)]));return isNegatedBeforeRabetbase(_0x5e3c3b)||isNegatedAfterRabetbase(_0x2ddb2d)||/\b(?:use|run|call|execute)\s+`?\blovrabet\b.{0,32}\binstead of\s*$/i['test'](_0x5e3c3b)||/改用\s*`?\blovrabet\b.{0,16}$/i['test'](_0x5e3c3b);}function currentClauseBefore(_0x1887eb){const _0x3b507d=a38_0xea8775;return _0x1887eb[_0x3b507d(0x1ec)](/[,。;;.!?]/)[_0x3b507d(0x1f6)]()??_0x1887eb;}function currentClauseAfter(_0x2e2ec4){return _0x2e2ec4['split'](/[,。;;.!?]/)[0x0]??_0x2e2ec4;}function isNegatedBeforeRabetbase(_0xe849){const _0x478357=a38_0xea8775;if(/\blovrabet\b/i[_0x478357(0x1ee)](_0xe849))return![];const _0x176f8e=_0xe849[_0x478357(0x1e0)](-0x30);return/(不要|不得|禁止|严禁|不能|不应|不可|不使用|无需|避免).{0,24}$/i[_0x478357(0x1ee)](_0x176f8e)||/\b(?:do not|don't|must not|should not|avoid)\b.{0,32}$/i['test'](_0x176f8e);}function isNegatedAfterRabetbase(_0xed1138){const _0x330c8d=a38_0xea8775,_0x59161b=_0xed1138[_0x330c8d(0x1e0)](0x0,0x30);return/^\s*(?:不要|不得|禁止|严禁|不能|不应|不可|不使用|无需|避免)/i[_0x330c8d(0x1ee)](_0x59161b)||/^\s*(?:is\s+)?(?:not\s+required|unsupported|deprecated|forbidden)\b/i[_0x330c8d(0x1ee)](_0x59161b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a39_0x5f44cf=a39_0xd03a;function a39_0x1ad4(){const _0x491877=['1508388zIpCXx','28KPCYen','2840280nVBmUS','warnings','errors','type','dir','275673TFLtyC','1381356XONyAu','2047544RhuSat','read','1467279oKcMZI','1626785OgxDEh','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','str','skill','20uuwGAn','100iYksLj','Skill\x20validation\x20passed.','bool','strict'];a39_0x1ad4=function(){return _0x491877;};return a39_0x1ad4();}(function(_0x15a3d8,_0x4c4b6f){const _0x337faa=a39_0xd03a,_0x1e75af=_0x15a3d8();while(!![]){try{const _0x88e53=-parseInt(_0x337faa(0x170))/0x1+parseInt(_0x337faa(0x167))/0x2+-parseInt(_0x337faa(0x16c))/0x3*(-parseInt(_0x337faa(0x175))/0x4)+-parseInt(_0x337faa(0x171))/0x5+parseInt(_0x337faa(0x165))/0x6+parseInt(_0x337faa(0x166))/0x7*(-parseInt(_0x337faa(0x16e))/0x8)+parseInt(_0x337faa(0x16d))/0x9*(parseInt(_0x337faa(0x176))/0xa);if(_0x88e53===_0x4c4b6f)break;else _0x1e75af['push'](_0x1e75af['shift']());}catch(_0x1d936b){_0x1e75af['push'](_0x1e75af['shift']());}}}(a39_0x1ad4,0xcf611));function a39_0xd03a(_0x3ea6c6,_0x268970){_0x3ea6c6=_0x3ea6c6-0x162;const _0x1ad4a0=a39_0x1ad4();let _0xd03a57=_0x1ad4a0[_0x3ea6c6];return _0xd03a57;}import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':a39_0x5f44cf(0x174),'command':'validate','description':a39_0x5f44cf(0x172),'risk':a39_0x5f44cf(0x16f),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x597bc7){const _0x181aec=a39_0x5f44cf,_0x5d8bb9=_0x597bc7[_0x181aec(0x163)](_0x181aec(0x164)),_0x538064=validateSkillDirectory(_0x597bc7[_0x181aec(0x173)](_0x181aec(0x16b)),{'strict':_0x5d8bb9});return throwIfSkillValidationFailed(_0x538064,_0x5d8bb9),{'ok':!![],'data':{'dir':_0x538064[_0x181aec(0x16b)],'type':_0x538064[_0x181aec(0x16a)],'errors':_0x538064[_0x181aec(0x169)],'warnings':_0x538064[_0x181aec(0x168)]},'message':_0x181aec(0x162)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a40_0x36d9fa=a40_0x1ced;(function(_0x535641,_0x19fd52){const _0x305403=a40_0x1ced,_0x292e73=_0x535641();while(!![]){try{const _0x2786cc=parseInt(_0x305403(0x1e2))/0x1+-parseInt(_0x305403(0x1e4))/0x2*(-parseInt(_0x305403(0x1ef))/0x3)+parseInt(_0x305403(0x1f8))/0x4*(parseInt(_0x305403(0x1eb))/0x5)+parseInt(_0x305403(0x1e9))/0x6*(parseInt(_0x305403(0x1e7))/0x7)+parseInt(_0x305403(0x1f3))/0x8+parseInt(_0x305403(0x1de))/0x9+parseInt(_0x305403(0x1ea))/0xa*(-parseInt(_0x305403(0x1e1))/0xb);if(_0x2786cc===_0x19fd52)break;else _0x292e73['push'](_0x292e73['shift']());}catch(_0x164fa8){_0x292e73['push'](_0x292e73['shift']());}}}(a40_0x2692,0xeaad8));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a40_0x36d9fa(0x1f5),'type':a40_0x36d9fa(0x1ed),'description':'Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code'};export const SCOPE_FLAG={'name':a40_0x36d9fa(0x1f7),'type':a40_0x36d9fa(0x1ed),'description':'Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','enum':[a40_0x36d9fa(0x1f2),'personal',a40_0x36d9fa(0x1e6)]};function a40_0x1ced(_0x2e2621,_0xdc3910){_0x2e2621=_0x2e2621-0x1dc;const _0x2692bf=a40_0x2692();let _0x1ced72=_0x2692bf[_0x2e2621];return _0x1ced72;}export const LIST_SCOPE_FLAG={'name':'scope','type':a40_0x36d9fa(0x1ed),'description':a40_0x36d9fa(0x1f4),'enum':[a40_0x36d9fa(0x1f2),a40_0x36d9fa(0x1f0),a40_0x36d9fa(0x1e6)]};export const LOCAL_FLAG={'name':a40_0x36d9fa(0x1f9),'type':a40_0x36d9fa(0x1dc),'description':a40_0x36d9fa(0x1f1)};export const DIR_FLAG={'name':a40_0x36d9fa(0x1e0),'type':a40_0x36d9fa(0x1ed),'required':!![],'description':a40_0x36d9fa(0x1ee)};function a40_0x2692(){const _0x50df1a=['6095024HHzhju','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','code','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','scope','6495444HjqaOr','local','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','boolean','name','10990746PxcMpJ','Overwrite\x20generated\x20files\x20when\x20the\x20Skill\x20directory\x20already\x20exists','dir','191609spCHli','488495CEeEuB','target','2QZZQmF','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','company','38409vXGUEb','strict','1818KzLRTR','2810PfnhCe','5TUYznj','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','string','Local\x20Skill\x20directory\x20containing\x20SKILL.md','293970pvmrli','personal','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','all'];a40_0x2692=function(){return _0x50df1a;};return a40_0x2692();}export const CREATE_NAME_FLAG={'name':a40_0x36d9fa(0x1dd),'type':a40_0x36d9fa(0x1ed),'required':!![],'description':a40_0x36d9fa(0x1ec),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a40_0x36d9fa(0x1f6)}};export const TYPE_FLAG={'name':'type','type':a40_0x36d9fa(0x1ed),'description':'Skill\x20template\x20type','default':'write','enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a40_0x36d9fa(0x1e3),'type':a40_0x36d9fa(0x1ed),'description':a40_0x36d9fa(0x1fa),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':'force','type':a40_0x36d9fa(0x1dc),'description':a40_0x36d9fa(0x1df)};export const STRICT_FLAG={'name':a40_0x36d9fa(0x1e8),'type':'boolean','description':a40_0x36d9fa(0x1e5)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a41_0x2e6a(){const _0x50eec8=['1352148PuLZkl','35250xBdSgC','5ELeXBl','42ZWQIDc','188984buqhCq','767276sRBZRZ','409890mjTzlD','336520cWirVs','72UxLHmm','114897UiIqOY'];a41_0x2e6a=function(){return _0x50eec8;};return a41_0x2e6a();}(function(_0x58d878,_0x132efb){const _0x25cee7=a41_0x2391,_0x244b54=_0x58d878();while(!![]){try{const _0x1e33e9=-parseInt(_0x25cee7(0x147))/0x1+-parseInt(_0x25cee7(0x144))/0x2+-parseInt(_0x25cee7(0x13f))/0x3+-parseInt(_0x25cee7(0x143))/0x4*(parseInt(_0x25cee7(0x140))/0x5)+parseInt(_0x25cee7(0x13e))/0x6+-parseInt(_0x25cee7(0x141))/0x7*(-parseInt(_0x25cee7(0x142))/0x8)+parseInt(_0x25cee7(0x146))/0x9*(parseInt(_0x25cee7(0x145))/0xa);if(_0x1e33e9===_0x132efb)break;else _0x244b54['push'](_0x244b54['shift']());}catch(_0x2827b1){_0x244b54['push'](_0x244b54['shift']());}}}(a41_0x2e6a,0x1b905));import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';function a41_0x2391(_0x39a2bc,_0x20249c){_0x39a2bc=_0x39a2bc-0x13e;const _0x2e6a3f=a41_0x2e6a();let _0x23916a=_0x2e6a3f[_0x39a2bc];return _0x23916a;}import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a42_0x1faa(_0x4dda21,_0x55f544){_0x4dda21=_0x4dda21-0x71;var _0x4d3ee1=a42_0x4d3e();var _0x1faa0c=_0x4d3ee1[_0x4dda21];return _0x1faa0c;}(function(_0x3d18f8,_0x123d7d){var _0x1583b7=a42_0x1faa,_0x5a0f1e=_0x3d18f8();while(!![]){try{var _0x5bd203=-parseInt(_0x1583b7(0x75))/0x1+parseInt(_0x1583b7(0x73))/0x2*(parseInt(_0x1583b7(0x7c))/0x3)+-parseInt(_0x1583b7(0x81))/0x4*(parseInt(_0x1583b7(0x7a))/0x5)+-parseInt(_0x1583b7(0x78))/0x6*(-parseInt(_0x1583b7(0x7b))/0x7)+parseInt(_0x1583b7(0x7e))/0x8*(-parseInt(_0x1583b7(0x7d))/0x9)+parseInt(_0x1583b7(0x74))/0xa+-parseInt(_0x1583b7(0x80))/0xb;if(_0x5bd203===_0x123d7d)break;else _0x5a0f1e['push'](_0x5a0f1e['shift']());}catch(_0x1f0e72){_0x5a0f1e['push'](_0x5a0f1e['shift']());}}}(a42_0x4d3e,0x539cd));export function isPackageBackedManifest(_0x3c1a4c){var _0x2a63d=a42_0x1faa;return!!_0x3c1a4c&&typeof _0x3c1a4c===_0x2a63d(0x7f)&&!Array[_0x2a63d(0x79)](_0x3c1a4c)&&typeof _0x3c1a4c[_0x2a63d(0x77)]==='string'&&_0x3c1a4c[_0x2a63d(0x77)][_0x2a63d(0x71)]>0x0&&Array[_0x2a63d(0x79)](_0x3c1a4c[_0x2a63d(0x76)]);}export function isMultiFileManifest(_0x438f54){var _0x381ee6=a42_0x1faa;return!!_0x438f54&&typeof _0x438f54==='object'&&!Array['isArray'](_0x438f54)&&Array['isArray'](_0x438f54['files'])&&_0x438f54[_0x381ee6(0x76)][_0x381ee6(0x72)](_0x1451d1=>_0x1451d1['path']!==_0x381ee6(0x82));}function a42_0x4d3e(){var _0x9be24d=['ossPath','1554762WbvFsa','isArray','20AguQjc','7plXLux','1701pthovL','9fWJjpd','1777784CFBmPh','object','853974OaNUdk','36532iqulYh','SKILL.md','length','some','142ehqEJm','6489090HpKLZu','269427UvtCwL','files'];a42_0x4d3e=function(){return _0x9be24d;};return a42_0x4d3e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a43_0x5f03(){const _0x33d3a0=['8527813tdqNwk','33462VfAsPT','all','Unsupported\x20Skill\x20sync\x20scope:\x20','3312540VNSxAp','validation','trim','personal','5669490SLpKWh','19444504jOePVH','Unsupported\x20Skill\x20list\x20scope:\x20','9IuKGKn','86TvDnEg','4231530TmHNAg','7196718BbJUBs','company'];a43_0x5f03=function(){return _0x33d3a0;};return a43_0x5f03();}(function(_0x407643,_0x37f6f9){const _0x1e3bd3=a43_0xb648,_0x4d9353=_0x407643();while(!![]){try{const _0x4950a5=-parseInt(_0x1e3bd3(0xb2))/0x1*(-parseInt(_0x1e3bd3(0xa7))/0x2)+parseInt(_0x1e3bd3(0xb3))/0x3+-parseInt(_0x1e3bd3(0xaa))/0x4+-parseInt(_0x1e3bd3(0xae))/0x5+parseInt(_0x1e3bd3(0xa4))/0x6+parseInt(_0x1e3bd3(0xa6))/0x7+-parseInt(_0x1e3bd3(0xaf))/0x8*(parseInt(_0x1e3bd3(0xb1))/0x9);if(_0x4950a5===_0x37f6f9)break;else _0x4d9353['push'](_0x4d9353['shift']());}catch(_0x45e293){_0x4d9353['push'](_0x4d9353['shift']());}}}(a43_0x5f03,0xd57fc));import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x3d60d8){const _0x24ceaf=a43_0xb648,_0x384ab4=_0x3d60d8[_0x24ceaf(0xac)]();if(!_0x384ab4||_0x384ab4==='all')return['personal',_0x24ceaf(0xa5)];if(_0x384ab4===_0x24ceaf(0xad)||_0x384ab4===_0x24ceaf(0xa5))return[_0x384ab4];throw CliErrors[_0x24ceaf(0xab)](_0x24ceaf(0xa9)+_0x3d60d8);}export function normalizeListScope(_0xc5d042){const _0x1d64f8=a43_0xb648,_0x15c773=_0xc5d042['trim']();if(!_0x15c773)return _0x1d64f8(0xa8);if(_0x15c773===_0x1d64f8(0xad)||_0x15c773==='company'||_0x15c773===_0x1d64f8(0xa8))return _0x15c773;throw CliErrors[_0x1d64f8(0xab)](_0x1d64f8(0xb0)+_0xc5d042);}export function shouldListScope(_0x1f65af,_0x2d4201){const _0x170b8c=a43_0xb648;if(_0x1f65af===_0x170b8c(0xa8))return!![];return _0x1f65af===_0x2d4201;}export function listScopeToRuntimeScopes(_0x1ce2e0){const _0x906fa9=a43_0xb648;if(_0x1ce2e0===_0x906fa9(0xa8))return[_0x906fa9(0xad),'company'];return[_0x1ce2e0===_0x906fa9(0xa5)?_0x906fa9(0xa5):_0x1ce2e0];}function a43_0xb648(_0x4b8bc0,_0x48f915){_0x4b8bc0=_0x4b8bc0-0xa4;const _0x5f031c=a43_0x5f03();let _0xb64836=_0x5f031c[_0x4b8bc0];return _0xb64836;}export function listScopeToRemoteScope(_0x265312){return _0x265312;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a44_0x48c8(_0x322a33,_0x24fd83){_0x322a33=_0x322a33-0x12d;var _0x872716=a44_0x8727();var _0x48c805=_0x872716[_0x322a33];return _0x48c805;}(function(_0x556b81,_0x42d7cf){var _0x2be792=a44_0x48c8,_0x347645=_0x556b81();while(!![]){try{var _0x328f53=parseInt(_0x2be792(0x135))/0x1+parseInt(_0x2be792(0x133))/0x2*(parseInt(_0x2be792(0x13e))/0x3)+parseInt(_0x2be792(0x130))/0x4*(-parseInt(_0x2be792(0x137))/0x5)+parseInt(_0x2be792(0x12f))/0x6*(-parseInt(_0x2be792(0x131))/0x7)+-parseInt(_0x2be792(0x141))/0x8+parseInt(_0x2be792(0x132))/0x9+-parseInt(_0x2be792(0x12d))/0xa;if(_0x328f53===_0x42d7cf)break;else _0x347645['push'](_0x347645['shift']());}catch(_0x5c4d66){_0x347645['push'](_0x347645['shift']());}}}(a44_0x8727,0x525e8));function a44_0x8727(){var _0x5794c0=['dir','33138TOGlon','skillCode','tags','1019864Kphdxn','cacheDir','415890cWQttq','status','103002jywYny','454120wDblUw','161nIgGTr','4922226XEKSji','50ISxesD','version','191763jYNKUb','contentHash','5FGibir','skillMdPath','scope','readonly','skillName','pulledAt'];a44_0x8727=function(){return _0x5794c0;};return a44_0x8727();}export function summarizeRuntimeSkill(_0x2d7585){var _0x35272d=a44_0x48c8;return{'id':_0x2d7585['id'],'skillCode':_0x2d7585[_0x35272d(0x13f)],'skillName':_0x2d7585[_0x35272d(0x13b)],'scope':_0x2d7585[_0x35272d(0x139)],'version':_0x2d7585['version'],'readonly':_0x2d7585[_0x35272d(0x13a)]};}export function summarizeLocalRuntimeSkill(_0xa6be02){var _0x487aec=a44_0x48c8;return{'id':_0xa6be02['id'],'skillCode':_0xa6be02[_0x487aec(0x13f)],'skillName':_0xa6be02[_0x487aec(0x13b)],'scope':_0xa6be02['scope'],'appCode':_0xa6be02['appCode'],'version':_0xa6be02[_0x487aec(0x134)],'status':_0xa6be02[_0x487aec(0x12e)],'readonly':_0xa6be02[_0x487aec(0x13a)],'tags':_0xa6be02[_0x487aec(0x140)],'dir':_0xa6be02[_0x487aec(0x13d)],'cacheDir':_0xa6be02[_0x487aec(0x142)],'skillMdPath':_0xa6be02[_0x487aec(0x138)],'metadataPath':_0xa6be02['metadataPath'],'linkedPaths':_0xa6be02['linkedPaths'],'contentHash':_0xa6be02[_0x487aec(0x136)],'treeHash':_0xa6be02['treeHash'],'pulledAt':_0xa6be02[_0x487aec(0x13c)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x4879df=a45_0x421e;(function(_0x4ae791,_0x4d27a0){const _0xadba8e=a45_0x421e,_0x4c64a2=_0x4ae791();while(!![]){try{const _0x402f6f=parseInt(_0xadba8e(0xe4))/0x1+parseInt(_0xadba8e(0xe3))/0x2*(parseInt(_0xadba8e(0xf8))/0x3)+parseInt(_0xadba8e(0xf3))/0x4+parseInt(_0xadba8e(0xf4))/0x5+parseInt(_0xadba8e(0xea))/0x6+parseInt(_0xadba8e(0xe5))/0x7*(-parseInt(_0xadba8e(0xdd))/0x8)+-parseInt(_0xadba8e(0xe6))/0x9;if(_0x402f6f===_0x4d27a0)break;else _0x4c64a2['push'](_0x4c64a2['shift']());}catch(_0x309db1){_0x4c64a2['push'](_0x4c64a2['shift']());}}}(a45_0x16a0,0xa7443));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=[a45_0x4879df(0x100),a45_0x4879df(0xf1),a45_0x4879df(0xf5)];function a45_0x16a0(){const _0x3f3506=['32150088DuDWzb','includes','trim','toISOString','6641028mNnUOC','references/runtime-contract.md','references/output-contract.md','#\x20Output\x20Contract\x0a\x0a','\x0a##\x20返回契约\x0a\x0a最终输出必须遵守\x20[output-contract.md](output-contract.md)。本文件只补充运行态安全约束;展示字段、状态枚举、失败暴露和人工处理项以\x20output-contract.md\x20为准。\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败状态识别、checkpoint、重试和人工接管方式】\x0a\x0a##\x20禁止事项\x0a\x0a-\x20禁止链接或读取\x20Skill\x20目录外的\x20AGENTS.md、wiki、docs、脚本或个人路径作为运行时必读依赖。\x0a-\x20禁止把说明性的缓存路径、安装路径、示例路径或排障路径包装成运行时必读依赖。\x0a-\x20禁止在未确认影响范围时执行写入。\x0a-\x20禁止隐藏失败或把未知状态描述为成功。\x0a','timestamp','\x20的所有必读规则必须位于\x20SKILL.md\x20或\x20references/\x20内。\x0a\x0a##\x20必读文档\x0a\x0a-\x20[SKILL.md](../SKILL.md)\x0a-\x20[runtime-contract.md](runtime-contract.md)\x0a-\x20[output-contract.md](output-contract.md)\x0a\x0a##\x20主边界\x0a\x0a-\x20不得依赖\x20Skill\x20目录外的仓库文件、绝对路径、file\x20URL\x20或本机专属配置。\x0a-\x20文档中的缓存路径、安装路径、示例路径或排障路径不等于运行时包外依赖;只有明确要求读取、链接或执行包外内容时才属于自包含风险。\x0a-\x20如需承接仓库规范,必须把必要规则内化到本\x20Skill\x20包内的\x20references/\x20文件中。\x0a-\x20type=','read','join','4036064GvgnaT','1634130hYOlNi','trainer','Invalid\x20Skill\x20name:\x20','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','27UdPofi','Use\x20one\x20of:\x20','1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】','validation','\x20的最终回复必须让运营人员能判断:是否执行、影响了什么、如何复核、失败后下一步做什么。\x0a\x0a##\x20状态枚举\x0a\x0astatus:\x20success\x20|\x20no_op\x20|\x20partial_success\x20|\x20blocked\x20|\x20failed\x20|\x20needs_manual_check\x0a\x0a-\x20success:动作已完成,且关键结果已核对。\x0a-\x20no_op:没有符合条件的对象或无需变更。\x0a-\x20partial_success:部分对象完成,未完成对象必须进入\x20errors\x20和\x20nextActions。\x0a-\x20blocked:缺少输入、权限、确认或平台能力,无法继续。\x0a-\x20failed:执行失败,必须说明失败阶段、错误和恢复方式。\x0a-\x20needs_manual_check:读回异常、状态未知或人工判断缺失。\x0a\x0aunknown、partial_success、failed、needs_manual_check\x20不能包装为\x20success。\x0a\x0a##\x20输出模式\x0a\x0amode:\x20dry_run\x20|\x20confirmed\x20|\x20read_only\x0a\x0a-\x20dry_run:只展示预览、影响范围和差异,不写入业务数据。\x0a-\x20confirmed:用户明确确认后的执行模式;写入后必须读回核对。\x0a-\x20read_only:只查询、汇总或核对,不触发写入。\x0a\x0a##\x20必填字段\x0a\x0a-\x20status\x0a-\x20mode\x0a-\x20summary\x0a-\x20scope\x0a-\x20changes\x0a-\x20verification\x0a-\x20warnings\x0a-\x20errors\x0a-\x20nextActions\x0a\x0a##\x20写入结果\x0a\x0a','---\x0aname:\x20','.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','write','\x0a\x0a##\x20展示规范\x0a\x0a【填写面向运营人员的展示字段、差异摘要、成功/失败状态和人工处理项;最终输出必须按\x20references/output-contract.md\x20的\x20status\x20/\x20mode\x20/\x20summary\x20/\x20errors\x20/\x20nextActions\x20返回,不能把\x20unknown、partial_success、failed\x20或\x20needs_manual_check\x20包装为\x20success。】\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败后的\x20checkpoint、重试条件、人工接管方式和避免重复写入的核对步骤】\x0a','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','type','\x0a\x0a##\x20内部要求\x0a\x0a执行前必须读取并遵守\x20[runtime-contract.md](references/runtime-contract.md)\x20和\x20[output-contract.md](references/output-contract.md)。\x0a\x0a##\x20使用边界\x0a\x0a【填写该\x20Skill\x20能做什么、不能做什么、适用业务范围和禁止扩大执行范围】\x0a\x0a##\x20输入门禁\x0a\x0a【填写必须具备的输入;缺失业务对象、执行范围、确认信息或权限上下文时必须停止】\x0a\x0a##\x20与现有能力集成\x0a\x0a【填写本\x20Skill\x20使用的\x20lovrabet\x20data、lovrabet\x20sql、lovrabet\x20bff\x20或\x20lovrabet\x20personal-bff\x20命令,以及包内\x20references/\x20中沉淀的运行态入口、脚本对接方式或人工操作边界。不得依赖\x20Skill\x20目录外文件、绝对路径或本机专属配置。】\x0a\x0a##\x20平台能力优先\x0a\x0a【填写本\x20Skill\x20优先使用的\x20Lovrabet\x20平台命令:lovrabet\x20data\x20/\x20lovrabet\x20sql\x20/\x20lovrabet\x20bff\x20/\x20lovrabet\x20personal-bff。本地脚本仅用于平台明确不覆盖的文件格式转换、静态校验、展示整理或第三方薄适配;不得用本地脚本替代平台命令承载业务写入、权限判断、状态机、审批提交或回滚。】\x0a\x0a##\x20第三方服务边界\x0a\x0a【填写是否调用第三方识别、生成、上传或行业服务;如涉及\x20API\x20Key、OAuth、Cookie、登录态或业务数据上传,必须说明由\x20Lovrabet\x20应用后台、BFF\x20或平台适配器统一配置。目标治理口径是\x20Skill\x20不读取、不分发、不保存明文凭证。详细凭证、额度、审计和审核发布规则写入\x20references/runtime-contract.md。】\x0a\x0a##\x20SOP\x20工作流\x0a\x0a','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','SKILL.md','352024LKZqMj','\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0ametadata:\x0a\x20\x20type:\x20','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','Unsupported\x20Skill\x20type:\x20','skillName','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','227144jXewoE','836530eUvPCq','7CdwQJI'];a45_0x16a0=function(){return _0x3f3506;};return a45_0x16a0();}export const DEFAULT_SKILL_TARGET='.agents/skills';export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE=a45_0x4879df(0xeb);export const OUTPUT_CONTRACT_FILE=a45_0x4879df(0xec);export function validateSkillName(_0x531a86){const _0x4bd6e0=a45_0x4879df,_0x3a2ff4=_0x531a86[_0x4bd6e0(0xe8)]();if(!SKILL_NAME_PATTERN['test'](_0x3a2ff4))throw CliErrors[_0x4bd6e0(0xfb)](_0x4bd6e0(0xf6)+_0x531a86+_0x4bd6e0(0xfe),'Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.');return _0x3a2ff4;}export function normalizeSkillTemplateType(_0x278f90){const _0x26b498=a45_0x4879df,_0x51e079=(_0x278f90||_0x26b498(0x100))[_0x26b498(0xe8)]()||'write';if(SKILL_TYPES[_0x26b498(0xe7)](_0x51e079))return _0x51e079;throw CliErrors[_0x26b498(0xfb)](_0x26b498(0xe0)+_0x278f90,_0x26b498(0xf9)+SKILL_TYPES[_0x26b498(0xf2)](',\x20')+'.');}export function renderSkillTemplate(_0x44e44e){const _0x45f9c=a45_0x4879df,_0x1176a6=validateSkillName(_0x44e44e[_0x45f9c(0xe1)]),_0x3839bb=normalizeSkillTemplateType(_0x44e44e[_0x45f9c(0x104)]),_0x3bb445=_0x44e44e[_0x45f9c(0xef)]??new Date()[_0x45f9c(0xe9)]();return{'skillName':_0x1176a6,'type':_0x3839bb,'files':[{'path':_0x45f9c(0xdc),'content':renderSkillMd(_0x1176a6,_0x3839bb,_0x3bb445)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x1176a6,_0x3839bb)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x1176a6,_0x3839bb)}]};}function renderSkillMd(_0xe4fa5b,_0x905711,_0x41a58b){const _0x323e46=a45_0x4879df,_0x478417=typeWorkflow(_0x905711);return _0x323e46(0xfd)+_0xe4fa5b+_0x323e46(0xde)+_0x905711+'\x0a\x20\x20created:\x20\x22'+_0x41a58b+_0x323e46(0x106)+_0xe4fa5b+_0x323e46(0x105)+_0x478417+'\x0a\x0a'+businessStateSection(_0x905711)+_0x323e46(0x101);}function renderRuntimeContract(_0x4209ac,_0x17af91){const _0xf3777f=a45_0x4879df,_0x3e4e63=_0x17af91===_0xf3777f(0x100)?_0xf3777f(0xf7):'';return _0xf3777f(0x103)+_0x4209ac+_0xf3777f(0xf0)+_0x17af91+'\x20只作为模板选择器,不替代业务权限、风险等级和用户确认。\x0a\x0a##\x20运行态入口\x0a\x0a【填写包内说明的运行态入口、可调用脚本或人工执行边界】\x0a\x0a##\x20凭证与登录态\x0a\x0a【填写本\x20Skill\x20依赖的第三方服务凭证和登录态治理方式。强烈建议通过\x20Lovrabet\x20应用后台或平台服务端适配器做平台托管配置;开发先行阶段如存在临时明文凭证,应标注后续治理计划、适用环境和额度边界,并避免进入长期交付内容。】\x0a\x0a##\x20第三方候选资产\x0a\x0a【填写第三方生成类结果的消费边界。生成类结果仅作为候选素材;涉及商品图、客户资料、Excel\x20或业务文件上传时,必须声明授权、额度、审计、失败降级和人工审核/业务\x20BFF\x20校验后的发布边界。】\x0a\x0a##\x20预览\x20/\x20写入\x20/\x20核对差异\x0a\x0a【填写预览、确认、正式执行和只读核对的顺序】\x0a\x0a'+_0x3e4e63+_0xf3777f(0xee);}function renderOutputContract(_0x5e3cab,_0x5f2918){const _0x4c1803=a45_0x4879df,_0x3506a3=_0x5f2918===_0x4c1803(0x100)?_0x4c1803(0xe2):_0x5f2918+'\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。';return _0x4c1803(0xed)+_0x5e3cab+_0x4c1803(0xfc)+_0x3506a3+_0x4c1803(0xff);}function typeWorkflow(_0x161b1a){const _0x338747=a45_0x4879df;if(_0x161b1a===_0x338747(0xf1))return _0x338747(0xdb);if(_0x161b1a===_0x338747(0xf5))return _0x338747(0xfa);return _0x338747(0x102);}function a45_0x421e(_0x2a05f0,_0x53dea8){_0x2a05f0=_0x2a05f0-0xdb;const _0x16a07d=a45_0x16a0();let _0x421eda=_0x16a07d[_0x2a05f0];return _0x421eda;}function businessStateSection(_0xf646a1){const _0x5d7b66=a45_0x4879df;if(_0xf646a1!==_0x5d7b66(0x100))return'';return _0x5d7b66(0xdf);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x17d652=a46_0x2bd2;(function(_0x2dabcd,_0x5cfc6f){const _0x3b1d0b=a46_0x2bd2,_0x149344=_0x2dabcd();while(!![]){try{const _0x4a5959=-parseInt(_0x3b1d0b(0x201))/0x1*(-parseInt(_0x3b1d0b(0x1d9))/0x2)+parseInt(_0x3b1d0b(0x1e9))/0x3+-parseInt(_0x3b1d0b(0x1d6))/0x4*(parseInt(_0x3b1d0b(0x1fd))/0x5)+parseInt(_0x3b1d0b(0x1d4))/0x6+-parseInt(_0x3b1d0b(0x1e1))/0x7*(parseInt(_0x3b1d0b(0x1c6))/0x8)+parseInt(_0x3b1d0b(0x202))/0x9*(-parseInt(_0x3b1d0b(0x1df))/0xa)+parseInt(_0x3b1d0b(0x1d0))/0xb*(parseInt(_0x3b1d0b(0x1e4))/0xc);if(_0x4a5959===_0x5cfc6f)break;else _0x149344['push'](_0x149344['shift']());}catch(_0x408421){_0x149344['push'](_0x149344['shift']());}}}(a46_0x28b5,0x4f56b));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';const SKILL_FILE=a46_0x17d652(0x1fc),SUPPORTED_SKILL_TYPES=new Set([a46_0x17d652(0x1f2),a46_0x17d652(0x1d2),a46_0x17d652(0x1fe)]);export function validateSkillDirectory(_0x1ac3b4,_0x20f66c={}){const _0x1e46cc=a46_0x17d652,_0x2c592d=resolveSkillDirectoryRoot(_0x1ac3b4),_0xbdb6e4=[],_0x3284e0=loadRequiredSkillFile(_0x2c592d,_0xbdb6e4),_0x44a2ee=_0x3284e0?parseFrontmatter(_0x3284e0['content']):{'hasFrontmatter':![]};_0x3284e0&&validateFrontmatter(_0x3284e0[_0x1e46cc(0x203)],_0x44a2ee,_0xbdb6e4);const _0x1ed56e=_0xbdb6e4[_0x1e46cc(0x1da)](_0x51cf33=>_0x51cf33[_0x1e46cc(0x1f4)]==='error');return{'ok':_0x1ed56e['length']===0x0,'dir':_0x2c592d,'type':_0x44a2ee['type'],'errors':_0x1ed56e,'warnings':[]};}function resolveSkillDirectoryRoot(_0x109f77){const _0x450ca5=a46_0x17d652,_0x4f5171=resolve(_0x109f77);if(!existsSync(_0x4f5171))throw CliErrors['validation'](_0x450ca5(0x1ff)+_0x109f77);const _0x2e35be=lstatSync(_0x4f5171);if(_0x2e35be['isDirectory']())return _0x4f5171;if(_0x2e35be[_0x450ca5(0x1f1)]()){const _0x5b129f=realpathSync(_0x4f5171);if(lstatSync(_0x5b129f)['isDirectory']())return _0x5b129f;}throw CliErrors[_0x450ca5(0x1ca)](_0x450ca5(0x1ff)+_0x109f77);}export function throwIfSkillValidationFailed(_0x3776b2,_0x517433=![]){const _0x326a60=a46_0x17d652;if(_0x3776b2['ok'])return;const _0x393047=_0x3776b2['errors'][_0x326a60(0x1c8)](_0x7abac1=>{const _0xadf64e=_0x326a60,_0x565c83=_0x7abac1['section']?'#'+_0x7abac1[_0xadf64e(0x200)]:'';return _0x7abac1[_0xadf64e(0x1f4)][_0xadf64e(0x1ce)]()+'\x20'+_0x7abac1['ruleId']+'\x20'+_0x7abac1['file']+_0x565c83+':\x20'+_0x7abac1['message']+'\x20Fix:\x20'+_0x7abac1[_0xadf64e(0x1e6)];});throw CliErrors['validation'](_0x326a60(0x1d5)+_0x393047[_0x326a60(0x1ed)]('\x0a'),_0x326a60(0x1d3));}function loadRequiredSkillFile(_0x59e5c2,_0x539b07){const _0x138b3a=a46_0x17d652,_0x196ecd=resolve(_0x59e5c2,SKILL_FILE);if(!existsSync(_0x196ecd))return _0x539b07[_0x138b3a(0x1f0)](issue('error',_0x138b3a(0x1ec),SKILL_FILE,'Missing\x20SKILL.md.',_0x138b3a(0x1d8))),undefined;const _0x1a7fd9=lstatSync(_0x196ecd);if(_0x1a7fd9[_0x138b3a(0x1f1)]())return _0x539b07[_0x138b3a(0x1f0)](issue('error',_0x138b3a(0x1ec),SKILL_FILE,_0x138b3a(0x1ef),_0x138b3a(0x1e3))),undefined;if(!_0x1a7fd9[_0x138b3a(0x1d1)]())return _0x539b07[_0x138b3a(0x1f0)](issue(_0x138b3a(0x1cd),_0x138b3a(0x1ec),SKILL_FILE,'SKILL.md\x20is\x20not\x20a\x20file.',_0x138b3a(0x1dc))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x196ecd,_0x138b3a(0x1f6))};}function a46_0x28b5(){const _0x5ebbe5=['endsWith','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.','46910dGwVgk','trim','2947zvSPau','metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','12kevCRd','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','suggestion','toLowerCase','Add\x20frontmatter\x20with\x20name\x20and\x20description.','36612QfvNBL','Frontmatter\x20description\x20is\x20empty.','test','structure-complete','join','split','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','push','isSymbolicLink','write','startsWith','level','Frontmatter\x20name\x20is\x20missing.','utf8','name','type','internal','description','match','SKILL.md','71915htpgNW','trainer','Skill\x20directory\x20not\x20found:\x20','section','1005opcuDi','963lOOWtB','path','11824qMfLfl','SKILL.md\x20must\x20start\x20with\x20frontmatter.','map','has','validation','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','slice','error','toUpperCase','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','10402326smNHML','isFile','read','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','2237892rpqIPn','Skill\x20validation\x20failed:\x0a','68xVzXtz','description-required','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','722tVPlsY','filter','frontmatter-required','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.'];a46_0x28b5=function(){return _0x5ebbe5;};return a46_0x28b5();}function validateFrontmatter(_0x3f2761,_0x457fd0,_0x5063a4){const _0x583903=a46_0x17d652;if(!_0x457fd0['hasFrontmatter']){_0x5063a4[_0x583903(0x1f0)](issue(_0x583903(0x1cd),'frontmatter-required',_0x3f2761,_0x583903(0x1c7),_0x583903(0x1e8)));return;}!_0x457fd0[_0x583903(0x1f7)]?.[_0x583903(0x1e0)]()&&_0x5063a4[_0x583903(0x1f0)](issue(_0x583903(0x1cd),_0x583903(0x1db),_0x3f2761,_0x583903(0x1f5),'Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.')),!_0x457fd0['description']?.[_0x583903(0x1e0)]()&&_0x5063a4[_0x583903(0x1f0)](issue(_0x583903(0x1cd),_0x583903(0x1d7),_0x3f2761,_0x583903(0x1ea),_0x583903(0x1e5))),_0x457fd0[_0x583903(0x1f9)]===!![]&&_0x5063a4['push'](issue('error','internal-skill',_0x3f2761,_0x583903(0x1cf),_0x583903(0x1cb))),_0x457fd0[_0x583903(0x1f8)]?.[_0x583903(0x1e0)]()&&!SUPPORTED_SKILL_TYPES[_0x583903(0x1c9)](_0x457fd0[_0x583903(0x1f8)])&&_0x5063a4[_0x583903(0x1f0)](issue(_0x583903(0x1cd),_0x583903(0x1db),_0x3f2761,_0x583903(0x1e2),_0x583903(0x1de)));}function a46_0x2bd2(_0x5796bb,_0x518e05){_0x5796bb=_0x5796bb-0x1c6;const _0x28b5ba=a46_0x28b5();let _0x2bd26=_0x28b5ba[_0x5796bb];return _0x2bd26;}function parseFrontmatter(_0x398788){const _0xc8264c=a46_0x17d652,_0x425e79=_0x398788[_0xc8264c(0x1fb)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x425e79)return{'hasFrontmatter':![]};const _0x331922=_0x425e79[0x1]??'',_0x268445={'hasFrontmatter':!![]};let _0x1c4c3b=![];for(const _0x189c1a of _0x331922[_0xc8264c(0x1ee)](/\r?\n/)){if(/^\s*$/[_0xc8264c(0x1eb)](_0x189c1a))continue;const _0x58c870=_0x189c1a[_0xc8264c(0x1fb)](/^([A-Za-z0-9_-]+):\s*(.*)$/);if(_0x58c870){const _0x6b28c1=_0x58c870[0x1],_0x1f69c0=cleanScalar(_0x58c870[0x2]??'');_0x1c4c3b=_0x6b28c1==='metadata';if(_0x6b28c1===_0xc8264c(0x1f7))_0x268445[_0xc8264c(0x1f7)]=_0x1f69c0;if(_0x6b28c1===_0xc8264c(0x1fa))_0x268445['description']=_0x1f69c0;continue;}const _0x14894d=_0x189c1a['match'](/^\s+type:\s*(.*)$/);if(_0x1c4c3b&&_0x14894d){_0x268445[_0xc8264c(0x1f8)]=cleanScalar(_0x14894d[0x1]??'');continue;}const _0x27588b=_0x189c1a[_0xc8264c(0x1fb)](/^\s+internal:\s*(.*)$/);_0x1c4c3b&&_0x27588b&&(_0x268445['internal']=cleanBoolean(_0x27588b[0x1]??''));}return _0x268445;}function cleanScalar(_0xf3d67e){const _0x636338=a46_0x17d652,_0x2d2d81=_0xf3d67e[_0x636338(0x1e0)]();if(_0x2d2d81[_0x636338(0x1f3)]('\x22')&&_0x2d2d81[_0x636338(0x1dd)]('\x22')||_0x2d2d81[_0x636338(0x1f3)]('\x27')&&_0x2d2d81[_0x636338(0x1dd)]('\x27'))return _0x2d2d81[_0x636338(0x1cc)](0x1,-0x1);return _0x2d2d81;}function cleanBoolean(_0x3836e5){const _0x44e265=a46_0x17d652,_0x2614f6=cleanScalar(_0x3836e5)[_0x44e265(0x1e7)]();if(_0x2614f6==='true')return!![];if(_0x2614f6==='false')return![];return undefined;}function issue(_0x4b5537,_0x5aef55,_0x4b7422,_0x24e699,_0x43c1a9,_0x54aec7){return{'level':_0x4b5537,'ruleId':_0x5aef55,'file':_0x4b7422,'section':_0x54aec7,'message':_0x24e699,'suggestion':_0x43c1a9};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a47_0x2711(_0x3ccf4c,_0x342d0d){_0x3ccf4c=_0x3ccf4c-0xbb;const _0x5daa3a=a47_0x5daa();let _0x2711f7=_0x5daa3a[_0x3ccf4c];return _0x2711f7;}function a47_0x5daa(){const _0x45e0ab=['584Ptwybr','verbose','5464921yTJBgj','448940gcUECP','sqlName','sql','description','5959485aBxazX','66KavPhi','8982fKZcdj','18966168fndvDQ','8310272spepVt','read','detail','sqlCode','sqlcode','983114GshFAJ','bool','2DHvoAS','20pfOggt','7ccCpbp','dbId'];a47_0x5daa=function(){return _0x45e0ab;};return a47_0x5daa();}const a47_0x35431e=a47_0x2711;(function(_0x81b249,_0x8331c){const _0x2a1cf7=a47_0x2711,_0x527469=_0x81b249();while(!![]){try{const _0x2822c6=-parseInt(_0x2a1cf7(0xbb))/0x1*(-parseInt(_0x2a1cf7(0xbd))/0x2)+parseInt(_0x2a1cf7(0xca))/0x3*(-parseInt(_0x2a1cf7(0xc1))/0x4)+-parseInt(_0x2a1cf7(0xc4))/0x5*(parseInt(_0x2a1cf7(0xc9))/0x6)+-parseInt(_0x2a1cf7(0xbf))/0x7*(-parseInt(_0x2a1cf7(0xcc))/0x8)+parseInt(_0x2a1cf7(0xc8))/0x9+parseInt(_0x2a1cf7(0xbe))/0xa*(parseInt(_0x2a1cf7(0xc3))/0xb)+-parseInt(_0x2a1cf7(0xcb))/0xc;if(_0x2822c6===_0x8331c)break;else _0x527469['push'](_0x527469['shift']());}catch(_0x31b1f5){_0x527469['push'](_0x527469['shift']());}}}(a47_0x5daa,0xa427b));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a47_0x35431e(0xc6),'command':a47_0x35431e(0xce),'description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a47_0x35431e(0xcd),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x4442c9){const _0x5d62cb=a47_0x35431e,_0x5bfd94=await getSqlQueryInfo(_0x4442c9['appCode'],_0x4442c9['str'](_0x5d62cb(0xd0))),_0xe866dd=_0x4442c9[_0x5d62cb(0xbc)](_0x5d62cb(0xc2));if(_0xe866dd)return{'ok':!![],'data':_0x5bfd94};const _0x1f2f98=_0x5bfd94['dbId']?await getDbName(_0x4442c9['appCode'],_0x5bfd94[_0x5d62cb(0xc0)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x5bfd94[_0x5d62cb(0xcf)],'sqlName':_0x5bfd94[_0x5d62cb(0xc5)],'db':_0x1f2f98?_0x1f2f98+'\x20('+_0x5bfd94[_0x5d62cb(0xc0)]+')':_0x5bfd94[_0x5d62cb(0xc0)]??'','description':_0x5bfd94[_0x5d62cb(0xc7)]??'','sqlContent':_0x5bfd94['sqlContent']??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a48_0x144748=a48_0x52ce;(function(_0x461e77,_0x5c2d55){const _0x42a352=a48_0x52ce,_0x586b14=_0x461e77();while(!![]){try{const _0x11675d=-parseInt(_0x42a352(0xf9))/0x1*(parseInt(_0x42a352(0xfc))/0x2)+-parseInt(_0x42a352(0x106))/0x3*(-parseInt(_0x42a352(0xff))/0x4)+parseInt(_0x42a352(0x105))/0x5+-parseInt(_0x42a352(0x10a))/0x6*(-parseInt(_0x42a352(0xfe))/0x7)+parseInt(_0x42a352(0xf7))/0x8*(parseInt(_0x42a352(0xf6))/0x9)+parseInt(_0x42a352(0x10c))/0xa*(parseInt(_0x42a352(0xf8))/0xb)+-parseInt(_0x42a352(0xfd))/0xc;if(_0x11675d===_0x5c2d55)break;else _0x586b14['push'](_0x586b14['shift']());}catch(_0x227ef1){_0x586b14['push'](_0x586b14['shift']());}}}(a48_0x55ff,0x8e443));function a48_0x55ff(){const _0x3e8e53=['exec','404OMFvMw','30011448DVQvtR','423899DDUMUX','16rLYVKm','now','\x20row(s)\x20in\x20','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','read','length','1611925pIHjpI','639339VQyyYi','params','Returned\x20','isArray','90ncvSax','SQL\x20execution\x20failed','1280QpZXcf','execResult','sqlcode','71019fHeyCo','1000vkDxAI','75042nXmFdz','4253pKdjDq','execError'];a48_0x55ff=function(){return _0x3e8e53;};return a48_0x55ff();}import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a48_0x52ce(_0x1ce02b,_0x344b82){_0x1ce02b=_0x1ce02b-0xf6;const _0x55ffeb=a48_0x55ff();let _0x52ce66=_0x55ffeb[_0x1ce02b];return _0x52ce66;}import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':'sql','command':a48_0x144748(0xfb),'description':a48_0x144748(0x102),'risk':a48_0x144748(0x103),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x4953d6){const _0x127696=a48_0x144748,_0x168cee=parseJsonParams(_0x4953d6['str'](_0x127696(0x107))),_0x1fae6b=Date[_0x127696(0x100)](),_0x4254a4=await executeSdkSql(_0x4953d6['str'](_0x127696(0x10e)),_0x168cee),_0x21e4a5=Date[_0x127696(0x100)]()-_0x1fae6b,_0x19dbdd=_0x4254a4?.[_0x127696(0x10d)]??_0x4254a4,_0x2a3639=_0x4254a4?.['execSuccess']??!![];if(!_0x2a3639)return{'ok':![],'data':{'error':_0x4254a4?.[_0x127696(0xfa)]||_0x127696(0x10b),'elapsed':_0x21e4a5},'message':_0x127696(0x10b)};const _0x4eadf7=Array[_0x127696(0x109)](_0x19dbdd)?_0x19dbdd:[];return{'ok':!![],'data':{'rows':_0x4eadf7,'rowCount':_0x4eadf7[_0x127696(0x104)],'elapsed':_0x21e4a5},'message':_0x127696(0x108)+_0x4eadf7[_0x127696(0x104)]+_0x127696(0x101)+_0x21e4a5+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x362c(_0x9c70df,_0x16c41b){_0x9c70df=_0x9c70df-0xbd;const _0x1a6ea6=a49_0x1a6e();let _0x362c13=_0x1a6ea6[_0x9c70df];return _0x362c13;}(function(_0x44824e,_0x12ada5){const _0x19f371=a49_0x362c,_0x46e65f=_0x44824e();while(!![]){try{const _0x5e29ec=parseInt(_0x19f371(0xbf))/0x1+-parseInt(_0x19f371(0xbe))/0x2*(-parseInt(_0x19f371(0xc8))/0x3)+parseInt(_0x19f371(0xc2))/0x4+parseInt(_0x19f371(0xc4))/0x5*(parseInt(_0x19f371(0xc7))/0x6)+-parseInt(_0x19f371(0xc1))/0x7*(parseInt(_0x19f371(0xc5))/0x8)+parseInt(_0x19f371(0xc0))/0x9*(-parseInt(_0x19f371(0xc6))/0xa)+parseInt(_0x19f371(0xc3))/0xb*(parseInt(_0x19f371(0xbd))/0xc);if(_0x5e29ec===_0x12ada5)break;else _0x46e65f['push'](_0x46e65f['shift']());}catch(_0xc819fd){_0x46e65f['push'](_0x46e65f['shift']());}}}(a49_0x1a6e,0x8157b));function a49_0x1a6e(){const _0x2efd87=['5465hLrSRw','7014120OaDHaT','60050wEVmyL','1992hElYIx','1091946ctdqYK','10760676womqiB','2ahMHnS','446282ddarrw','1125KrSvwd','7LHxXGq','349256IngKoy','11oJQJqw'];a49_0x1a6e=function(){return _0x2efd87;};return a49_0x1a6e();}import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a50_0x116592=a50_0x21f8;function a50_0x21f8(_0x39d06b,_0x30c798){_0x39d06b=_0x39d06b-0x15d;const _0x59d8b1=a50_0x59d8();let _0x21f81c=_0x59d8b1[_0x39d06b];return _0x21f81c;}(function(_0x538659,_0x42b132){const _0x5b6301=a50_0x21f8,_0xc64b49=_0x538659();while(!![]){try{const _0x483543=parseInt(_0x5b6301(0x164))/0x1*(parseInt(_0x5b6301(0x179))/0x2)+parseInt(_0x5b6301(0x15f))/0x3+parseInt(_0x5b6301(0x17f))/0x4*(-parseInt(_0x5b6301(0x18b))/0x5)+-parseInt(_0x5b6301(0x166))/0x6+parseInt(_0x5b6301(0x184))/0x7+-parseInt(_0x5b6301(0x188))/0x8+parseInt(_0x5b6301(0x174))/0x9*(parseInt(_0x5b6301(0x162))/0xa);if(_0x483543===_0x42b132)break;else _0xc64b49['push'](_0xc64b49['shift']());}catch(_0x47e22d){_0xc64b49['push'](_0xc64b49['shift']());}}}(a50_0x59d8,0x96e15));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';function a50_0x59d8(){const _0x218a91=['--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','object','warn','minor','log','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','join','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','unknown','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','version','bool','157644qzXnzB','Version\x20comparison\x20failed.','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','trim','boolean','477302sSmRtv','skills','error','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','major','install','4sVGDmU','Update\x20','toString','entries','pipe','4580905eULxcP','\x20CLI\x20from\x20npm','inherit','/-/package/','7186000EEFLRl','string','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','3000055OKxbWo','nonInteractive','cwd','skipped','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Updating\x20','patch','latest','args','beta','Update\x20failed:\x20','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','validation','prerelease','Updated\x20to\x20v','timeout','update','match','Current\x20version:\x20','exit\x20','map','Invalid\x20version:\x20','stdout','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','3351432AfzvOo','stderr','str','80HMRaWK','flag','1MVIgPy','source','204432gYiCEW','status'];a50_0x59d8=function(){return _0x218a91;};return a50_0x59d8();}import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':a50_0x116592(0x193),'type':a50_0x116592(0x178),'description':a50_0x116592(0x176),'default':![]},{'name':'beta','type':a50_0x116592(0x178),'description':a50_0x116592(0x16f),'default':![]},{'name':a50_0x116592(0x172),'type':'string','description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':'no-skills','type':a50_0x116592(0x178),'description':a50_0x116592(0x18f),'default':![]},{'name':a50_0x116592(0x17a),'type':a50_0x116592(0x178),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function parseSemver(_0x11b751){const _0x19de66=a50_0x116592,_0x15eaf2=_0x11b751[_0x19de66(0x177)]()[_0x19de66(0x19d)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x15eaf2)return null;return{'major':Number(_0x15eaf2[0x1]),'minor':Number(_0x15eaf2[0x2]),'patch':Number(_0x15eaf2[0x3]),'prerelease':_0x15eaf2[0x4]};}function compareSemver(_0xae019b,_0x26af69){const _0x2b1e85=a50_0x116592,_0x169e16=parseSemver(_0xae019b),_0x173425=parseSemver(_0x26af69);if(!_0x169e16||!_0x173425)throw CliErrors[_0x2b1e85(0x198)](_0x2b1e85(0x175),'Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');for(const _0x167ab2 of[_0x2b1e85(0x17d),_0x2b1e85(0x16b),_0x2b1e85(0x192)]){if(_0x169e16[_0x167ab2]<_0x173425[_0x167ab2])return-0x1;if(_0x169e16[_0x167ab2]>_0x173425[_0x167ab2])return 0x1;}if(!_0x169e16[_0x2b1e85(0x199)]&&!_0x173425[_0x2b1e85(0x199)])return 0x0;if(!_0x169e16['prerelease'])return 0x1;if(!_0x173425['prerelease'])return-0x1;if(_0x169e16[_0x2b1e85(0x199)]===_0x173425[_0x2b1e85(0x199)])return 0x0;return _0x169e16[_0x2b1e85(0x199)]<_0x173425[_0x2b1e85(0x199)]?-0x1:0x1;}function getRequestedVersion(_0xb6c3b1){const _0x516612=a50_0x116592,_0x3baf26=_0xb6c3b1[_0x516612(0x161)](_0x516612(0x172))['trim']();if(_0x3baf26)return _0x3baf26;return String(_0xb6c3b1[_0x516612(0x194)]?.[0x0]??'')[_0x516612(0x177)]();}function shouldSkipCliBuiltInSkill(_0x4a3b5b){const _0x2c3998=a50_0x116592;return _0x4a3b5b[_0x2c3998(0x173)]('no-skills')||_0x4a3b5b[_0x2c3998(0x163)](_0x2c3998(0x17a))===![];}async function validateUpdateFlags(_0x57df3d){const _0x5ba319=a50_0x116592,_0x243db4=getRequestedVersion(_0x57df3d),_0x210590=[_0x57df3d['bool'](_0x5ba319(0x193))?_0x5ba319(0x193):'',_0x57df3d[_0x5ba319(0x173)](_0x5ba319(0x195))?_0x5ba319(0x195):'',_0x243db4?_0x5ba319(0x172):'']['filter'](Boolean);if(_0x210590['length']>0x1)throw CliErrors[_0x5ba319(0x198)](_0x5ba319(0x168),_0x5ba319(0x197));if(_0x243db4&&!parseSemver(_0x243db4))throw CliErrors[_0x5ba319(0x198)](_0x5ba319(0x1a1)+_0x243db4,_0x5ba319(0x16d));}async function fetchNpmDistTags(){const _0x1aa5fc=a50_0x116592;try{const _0x34bba7=NPM_REGISTRY_BASE_URL+_0x1aa5fc(0x187)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x10926d=await fetch(_0x34bba7,{'signal':AbortSignal[_0x1aa5fc(0x19b)](0x2710)});if(!_0x10926d['ok'])return null;const _0x57eac5=await _0x10926d['json']();if(!_0x57eac5||typeof _0x57eac5!==_0x1aa5fc(0x169))return null;return Object['fromEntries'](Object[_0x1aa5fc(0x182)](_0x57eac5)['filter'](([,_0x1f4af3])=>typeof _0x1f4af3===_0x1aa5fc(0x189)&&_0x1f4af3['trim']())[_0x1aa5fc(0x1a0)](([_0x49789e,_0x3300f0])=>[_0x49789e,String(_0x3300f0)[_0x1aa5fc(0x177)]()]));}catch{return null;}}async function resolveTargetVersion(_0xeaca46){const _0x496e97=a50_0x116592,_0x1d0bd9=getRequestedVersion(_0xeaca46);if(_0x1d0bd9)return{'version':_0x1d0bd9,'source':_0x496e97(0x172)};const _0x56d6fa=_0xeaca46['bool'](_0x496e97(0x195))?'beta':'latest',_0x1dd904=await fetchNpmDistTags(),_0x53ee07=_0x1dd904?.[_0x56d6fa];if(!_0x53ee07)return null;return{'version':_0x53ee07,'source':_0x56d6fa};}function shouldInstallTarget(_0x276311,_0x355dd1){const _0x54831a=a50_0x116592,_0x1e273d=compareSemver(_0x276311,_0x355dd1[_0x54831a(0x172)]);if(_0x355dd1[_0x54831a(0x165)]===_0x54831a(0x172))return _0x1e273d!==0x0;return _0x1e273d<0x0;}function installCliPackage(_0x58dd70,_0x49096a){const _0x4584b4=a50_0x116592,_0x640394=resolveNpmBin('npm'),_0x409c2c=[_0x4584b4(0x17e),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x58dd70];console[_0x4584b4(0x16c)]('*\x20'+[_0x640394,..._0x409c2c][_0x4584b4(0x16e)]('\x20'));const _0x58342f=spawnSync(_0x640394,_0x409c2c,{'cwd':process[_0x4584b4(0x18d)](),'stdio':_0x49096a?_0x4584b4(0x183):_0x4584b4(0x186),'env':process.env,'shell':![]});if(_0x58342f[_0x4584b4(0x167)]===0x0)return{'ok':!![]};let _0x2471f9=_0x58342f[_0x4584b4(0x17b)]?.['message']||_0x4584b4(0x19f)+(_0x58342f[_0x4584b4(0x167)]??_0x4584b4(0x170));if(_0x49096a){const _0x1e6e43=_0x58342f[_0x4584b4(0x160)]?_0x58342f[_0x4584b4(0x160)][_0x4584b4(0x181)]()[_0x4584b4(0x177)]():'',_0x1844b9=_0x58342f[_0x4584b4(0x15d)]?_0x58342f[_0x4584b4(0x15d)][_0x4584b4(0x181)]()['trim']():'';if(_0x1e6e43)_0x2471f9=_0x1e6e43;else{if(_0x1844b9)_0x2471f9=_0x1844b9;}}return{'ok':![],'error':_0x2471f9};}async function installCliBuiltInSkill(_0x2cb145){const _0x407004=a50_0x116592;console['log']('Checking\x20CLI\x20Built-in\x20Skill...');const _0x4fd91d=runNpxSkillsAddGlobal(process[_0x407004(0x18d)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x2cb145?_0x407004(0x183):_0x407004(0x186)});if(_0x4fd91d[_0x407004(0x18e)]){console[_0x407004(0x16c)](_0x407004(0x15e)+LOVRABET_SKIP_NPX_SKILLS_ENV+'=1).');return;}if(_0x4fd91d['ok']){console[_0x407004(0x16c)](_0x407004(0x190));return;}console['warn'](_0x407004(0x17c)+(_0x4fd91d[_0x407004(0x17b)]||_0x407004(0x170))),console['log']('\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install');}async function execute(_0x5cce97){const _0x213efb=a50_0x116592;await validateUpdateFlags(_0x5cce97);const _0x4d31ad=getCliVersion();console[_0x213efb(0x16c)](_0x213efb(0x19e)+_0x4d31ad),console[_0x213efb(0x16c)]('Checking\x20npm\x20dist-tags...');const _0x91b636=await resolveTargetVersion(_0x5cce97);if(!_0x91b636){const _0x12a27d=_0x5cce97[_0x213efb(0x173)](_0x213efb(0x195))?'beta':_0x213efb(0x193),_0x576276='Unable\x20to\x20resolve\x20'+_0x12a27d+'\x20version\x20from\x20npm.';return console[_0x213efb(0x16a)](_0x576276),console['log']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x12a27d),{'ok':![]};}if(!shouldInstallTarget(_0x4d31ad,_0x91b636)){const _0x2b3ab1=_0x91b636['source']===_0x213efb(0x172)?'Already\x20on\x20requested\x20version\x20(v'+_0x91b636['version']+').':'Already\x20up\x20to\x20date\x20(v'+_0x91b636[_0x213efb(0x172)]+').';return console[_0x213efb(0x16c)](_0x2b3ab1),shouldSkipCliBuiltInSkill(_0x5cce97)?console['log']('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x5cce97[_0x213efb(0x18c)]),{'ok':!![]};}console[_0x213efb(0x16c)](_0x213efb(0x191)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x4d31ad+'\x20->\x20'+_0x91b636['version']);const _0x4b4f46=installCliPackage(_0x91b636[_0x213efb(0x172)],_0x5cce97[_0x213efb(0x18c)]);if(!_0x4b4f46['ok']){const _0x28c1c1=_0x213efb(0x196)+(_0x4b4f46['error']||_0x213efb(0x170));return console[_0x213efb(0x17b)](_0x28c1c1),console[_0x213efb(0x16c)](_0x213efb(0x18a)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x91b636['version']),{'ok':![]};}return console[_0x213efb(0x16c)](_0x213efb(0x19a)+_0x91b636[_0x213efb(0x172)]+'.'),console[_0x213efb(0x16c)](_0x213efb(0x171)),shouldSkipCliBuiltInSkill(_0x5cce97)?console[_0x213efb(0x16c)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x5cce97[_0x213efb(0x18c)]),{'ok':!![]};}export const updateDefinition={'service':a50_0x116592(0x19c),'command':'run','description':a50_0x116592(0x180)+CLI_BIN_NAME+a50_0x116592(0x185),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a50_0x41122c=a50_0x14af;(function(_0x570d8b,_0x38588e){const _0x283c0a=a50_0x14af,_0x33af89=_0x570d8b();while(!![]){try{const _0x748962=-parseInt(_0x283c0a(0x155))/0x1*(parseInt(_0x283c0a(0x16c))/0x2)+-parseInt(_0x283c0a(0x168))/0x3*(parseInt(_0x283c0a(0x15e))/0x4)+parseInt(_0x283c0a(0x192))/0x5+parseInt(_0x283c0a(0x176))/0x6*(-parseInt(_0x283c0a(0x17b))/0x7)+-parseInt(_0x283c0a(0x162))/0x8*(-parseInt(_0x283c0a(0x167))/0x9)+-parseInt(_0x283c0a(0x195))/0xa*(-parseInt(_0x283c0a(0x17e))/0xb)+-parseInt(_0x283c0a(0x166))/0xc;if(_0x748962===_0x38588e)break;else _0x33af89['push'](_0x33af89['shift']());}catch(_0x377796){_0x33af89['push'](_0x33af89['shift']());}}}(a50_0x30f8,0x5010a));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':'latest','type':a50_0x41122c(0x17f),'description':a50_0x41122c(0x178),'default':![]},{'name':a50_0x41122c(0x18f),'type':a50_0x41122c(0x17f),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a50_0x41122c(0x159),'type':a50_0x41122c(0x15d),'description':a50_0x41122c(0x196)},{'name':a50_0x41122c(0x19e),'type':'boolean','description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a50_0x41122c(0x181),'type':a50_0x41122c(0x17f),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function parseSemver(_0x1e48d2){const _0x5eae62=a50_0x41122c,_0x3b8059=_0x1e48d2[_0x5eae62(0x161)]()[_0x5eae62(0x158)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x3b8059)return null;return{'major':Number(_0x3b8059[0x1]),'minor':Number(_0x3b8059[0x2]),'patch':Number(_0x3b8059[0x3]),'prerelease':_0x3b8059[0x4]};}function compareSemver(_0x5b8afc,_0x5be3b5){const _0x4e3847=a50_0x41122c,_0x10ad58=parseSemver(_0x5b8afc),_0x2ce324=parseSemver(_0x5be3b5);if(!_0x10ad58||!_0x2ce324)throw CliErrors[_0x4e3847(0x15a)](_0x4e3847(0x174),_0x4e3847(0x194));for(const _0x5de22a of['major','minor',_0x4e3847(0x183)]){if(_0x10ad58[_0x5de22a]<_0x2ce324[_0x5de22a])return-0x1;if(_0x10ad58[_0x5de22a]>_0x2ce324[_0x5de22a])return 0x1;}if(!_0x10ad58[_0x4e3847(0x16e)]&&!_0x2ce324['prerelease'])return 0x0;if(!_0x10ad58[_0x4e3847(0x16e)])return 0x1;if(!_0x2ce324[_0x4e3847(0x16e)])return-0x1;if(_0x10ad58[_0x4e3847(0x16e)]===_0x2ce324[_0x4e3847(0x16e)])return 0x0;return _0x10ad58[_0x4e3847(0x16e)]<_0x2ce324[_0x4e3847(0x16e)]?-0x1:0x1;}function getRequestedVersion(_0x2f20e0){const _0xe58f1a=a50_0x41122c,_0x2ede50=_0x2f20e0[_0xe58f1a(0x19b)](_0xe58f1a(0x159))[_0xe58f1a(0x161)]();if(_0x2ede50)return _0x2ede50;return String(_0x2f20e0['args']?.[0x0]??'')['trim']();}function shouldSkipCliBuiltInSkill(_0x3b5835){const _0x135c09=a50_0x41122c;return _0x3b5835['bool'](_0x135c09(0x19e))||_0x3b5835[_0x135c09(0x15c)](_0x135c09(0x181))===![];}function a50_0x30f8(){const _0x64e746=['update','join','run','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','Unable\x20to\x20resolve\x20','Version\x20comparison\x20failed.','\x20CLI\x20from\x20npm','42eVIKSH','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','install','Update\x20','2261LiIieC','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','=1).','48004kMRzzm','boolean','Already\x20on\x20requested\x20version\x20(v','skills','stdout','patch','write','inherit','filter','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','nonInteractive','map','/dist-tags','source','Update\x20failed:\x20','length','skipped','beta','exit\x20','bool','2324635BeYzeK','stderr','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','1390wPuxWP','Install\x20a\x20specific\x20CLI\x20version','warn','object','log','\x20version\x20from\x20npm.','str','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','error','no-skills','Already\x20up\x20to\x20date\x20(v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','timeout','latest','cwd','pipe','64XIiLEM','Checking\x20CLI\x20Built-in\x20Skill...','status','match','version','validation','Updated\x20to\x20v','flag','string','4lWNXmj','toString','/-/package/','trim','62296axfVoY','Updating\x20','Current\x20version:\x20','message','8816664FlJRLl','351bOoEtF','430893WdyDJm','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','Checking\x20npm\x20dist-tags...','unknown','5208PzwICR','Invalid\x20version:\x20','prerelease'];a50_0x30f8=function(){return _0x64e746;};return a50_0x30f8();}async function validateUpdateFlags(_0x2d34c9){const _0xa686ce=a50_0x41122c,_0x5044e3=getRequestedVersion(_0x2d34c9),_0x31703e=[_0x2d34c9[_0xa686ce(0x191)](_0xa686ce(0x1a2))?_0xa686ce(0x1a2):'',_0x2d34c9[_0xa686ce(0x191)](_0xa686ce(0x18f))?_0xa686ce(0x18f):'',_0x5044e3?_0xa686ce(0x159):''][_0xa686ce(0x186)](Boolean);if(_0x31703e[_0xa686ce(0x18d)]>0x1)throw CliErrors[_0xa686ce(0x15a)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.',_0xa686ce(0x187));if(_0x5044e3&&!parseSemver(_0x5044e3))throw CliErrors[_0xa686ce(0x15a)](_0xa686ce(0x16d)+_0x5044e3,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}function a50_0x14af(_0x452448,_0x2f8a89){_0x452448=_0x452448-0x155;const _0x30f8b7=a50_0x30f8();let _0x14af4d=_0x30f8b7[_0x452448];return _0x14af4d;}async function fetchNpmDistTags(){const _0x2f80ec=a50_0x41122c;try{const _0x4abd92=NPM_REGISTRY_BASE_URL+_0x2f80ec(0x160)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x2f80ec(0x18a),_0x45c4a0=await fetch(_0x4abd92,{'signal':AbortSignal[_0x2f80ec(0x1a1)](0x2710)});if(!_0x45c4a0['ok'])return null;const _0xf7344e=await _0x45c4a0['json']();if(!_0xf7344e||typeof _0xf7344e!==_0x2f80ec(0x198))return null;return Object['fromEntries'](Object['entries'](_0xf7344e)[_0x2f80ec(0x186)](([,_0x39f946])=>typeof _0x39f946==='string'&&_0x39f946[_0x2f80ec(0x161)]())[_0x2f80ec(0x189)](([_0x334234,_0x48acff])=>[_0x334234,String(_0x48acff)[_0x2f80ec(0x161)]()]));}catch{return null;}}async function resolveTargetVersion(_0xe2dd55){const _0x533347=a50_0x41122c,_0x1c4173=getRequestedVersion(_0xe2dd55);if(_0x1c4173)return{'version':_0x1c4173,'source':_0x533347(0x159)};const _0x36d478=_0xe2dd55[_0x533347(0x191)](_0x533347(0x18f))?_0x533347(0x18f):_0x533347(0x1a2),_0x2818e8=await fetchNpmDistTags(),_0x3ca4e7=_0x2818e8?.[_0x36d478];if(!_0x3ca4e7)return null;return{'version':_0x3ca4e7,'source':_0x36d478};}function shouldInstallTarget(_0x461342,_0x331c34){const _0x25ab78=a50_0x41122c,_0x3f1d22=compareSemver(_0x461342,_0x331c34[_0x25ab78(0x159)]);if(_0x331c34[_0x25ab78(0x18b)]==='version')return _0x3f1d22!==0x0;return _0x3f1d22<0x0;}function installCliPackage(_0x1c80b7,_0x301cff){const _0x4f981e=a50_0x41122c,_0x340f02=resolveNpmBin('npm'),_0x31a964=[_0x4f981e(0x179),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1c80b7];console[_0x4f981e(0x199)]('*\x20'+[_0x340f02,..._0x31a964][_0x4f981e(0x170)]('\x20'));const _0x10c691=spawnSync(_0x340f02,_0x31a964,{'cwd':process['cwd'](),'stdio':_0x301cff?'pipe':_0x4f981e(0x185),'env':process.env,'shell':![]});if(_0x10c691['status']===0x0)return{'ok':!![]};let _0x5254da=_0x10c691[_0x4f981e(0x19d)]?.[_0x4f981e(0x165)]||_0x4f981e(0x190)+(_0x10c691[_0x4f981e(0x157)]??_0x4f981e(0x16b));if(_0x301cff){const _0x48440d=_0x10c691[_0x4f981e(0x193)]?_0x10c691[_0x4f981e(0x193)][_0x4f981e(0x15f)]()[_0x4f981e(0x161)]():'',_0x35691a=_0x10c691[_0x4f981e(0x182)]?_0x10c691[_0x4f981e(0x182)]['toString']()[_0x4f981e(0x161)]():'';if(_0x48440d)_0x5254da=_0x48440d;else{if(_0x35691a)_0x5254da=_0x35691a;}}return{'ok':![],'error':_0x5254da};}async function installCliBuiltInSkill(_0x5112f7){const _0x503569=a50_0x41122c;console[_0x503569(0x199)](_0x503569(0x156));const _0x29543a=runNpxSkillsAddGlobal(process[_0x503569(0x1a3)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x5112f7?_0x503569(0x1a4):_0x503569(0x185)});if(_0x29543a[_0x503569(0x18e)]){console[_0x503569(0x199)](_0x503569(0x169)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x503569(0x17d));return;}if(_0x29543a['ok']){console[_0x503569(0x199)]('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.');return;}console[_0x503569(0x197)](_0x503569(0x19c)+(_0x29543a[_0x503569(0x19d)]||_0x503569(0x16b))),console[_0x503569(0x199)](_0x503569(0x177));}async function execute(_0x3a8a1a){const _0x520eeb=a50_0x41122c;await validateUpdateFlags(_0x3a8a1a);const _0x74f88=getCliVersion();console[_0x520eeb(0x199)](_0x520eeb(0x164)+_0x74f88),console[_0x520eeb(0x199)](_0x520eeb(0x16a));const _0x1a8d51=await resolveTargetVersion(_0x3a8a1a);if(!_0x1a8d51){const _0x211fda=_0x3a8a1a[_0x520eeb(0x191)](_0x520eeb(0x18f))?'beta':_0x520eeb(0x1a2),_0x38e50=_0x520eeb(0x173)+_0x211fda+_0x520eeb(0x19a);return console[_0x520eeb(0x197)](_0x38e50),console[_0x520eeb(0x199)](_0x520eeb(0x17c)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x211fda),{'ok':![]};}if(!shouldInstallTarget(_0x74f88,_0x1a8d51)){const _0x5ab512=_0x1a8d51[_0x520eeb(0x18b)]===_0x520eeb(0x159)?_0x520eeb(0x180)+_0x1a8d51[_0x520eeb(0x159)]+').':_0x520eeb(0x19f)+_0x1a8d51[_0x520eeb(0x159)]+').';return console['log'](_0x5ab512),shouldSkipCliBuiltInSkill(_0x3a8a1a)?console[_0x520eeb(0x199)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x3a8a1a[_0x520eeb(0x188)]),{'ok':!![]};}console['log'](_0x520eeb(0x163)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x74f88+'\x20->\x20'+_0x1a8d51['version']);const _0xe46504=installCliPackage(_0x1a8d51[_0x520eeb(0x159)],_0x3a8a1a[_0x520eeb(0x188)]);if(!_0xe46504['ok']){const _0x18b2c7=_0x520eeb(0x18c)+(_0xe46504[_0x520eeb(0x19d)]||_0x520eeb(0x16b));return console[_0x520eeb(0x19d)](_0x18b2c7),console[_0x520eeb(0x199)](_0x520eeb(0x172)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1a8d51[_0x520eeb(0x159)]),{'ok':![]};}return console['log'](_0x520eeb(0x15b)+_0x1a8d51[_0x520eeb(0x159)]+'.'),console[_0x520eeb(0x199)](_0x520eeb(0x1a0)),shouldSkipCliBuiltInSkill(_0x3a8a1a)?console['log']('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x3a8a1a[_0x520eeb(0x188)]),{'ok':!![]};}export const updateDefinition={'service':a50_0x41122c(0x16f),'command':a50_0x41122c(0x171),'description':a50_0x41122c(0x17a)+CLI_BIN_NAME+a50_0x41122c(0x175),'risk':a50_0x41122c(0x184),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x1218c8=a51_0x397d;(function(_0x405c77,_0x4e57d4){const _0x506b4b=a51_0x397d,_0x358dc9=_0x405c77();while(!![]){try{const _0x501c32=-parseInt(_0x506b4b(0x16e))/0x1+-parseInt(_0x506b4b(0x149))/0x2+-parseInt(_0x506b4b(0x156))/0x3+-parseInt(_0x506b4b(0x167))/0x4+parseInt(_0x506b4b(0x145))/0x5+parseInt(_0x506b4b(0x175))/0x6*(-parseInt(_0x506b4b(0x163))/0x7)+-parseInt(_0x506b4b(0x172))/0x8*(-parseInt(_0x506b4b(0x152))/0x9);if(_0x501c32===_0x4e57d4)break;else _0x358dc9['push'](_0x358dc9['shift']());}catch(_0x3f1e1f){_0x358dc9['push'](_0x358dc9['shift']());}}}(a51_0x3799,0x28782));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':a51_0x1218c8(0x159),'type':a51_0x1218c8(0x14d),'description':a51_0x1218c8(0x15b)},{'name':a51_0x1218c8(0x168),'type':a51_0x1218c8(0x14d),'description':'App\x20code\x20to\x20bind\x20directly'},{'name':a51_0x1218c8(0x14a),'type':a51_0x1218c8(0x14d),'description':'Target\x20environment','enum':[...RUNTIME_ENV_VALUES]},{'name':a51_0x1218c8(0x171),'type':'boolean','description':a51_0x1218c8(0x170),'default':![]}];async function executeWorkspaceUse(_0x14d22a,_0x4ecd71){const _0x192932=a51_0x1218c8,_0x4f80c0=_0x14d22a[_0x192932(0x165)](_0x192932(0x159))[_0x192932(0x14c)](),_0x5a4805=_0x14d22a['str'](_0x192932(0x168))[_0x192932(0x14c)](),_0x157a6c=_0x14d22a[_0x192932(0x165)](_0x192932(0x14a))[_0x192932(0x14c)](),_0x6c4895=resolveWorkspaceEnv(_0x157a6c||_0x14d22a[_0x192932(0x164)]||DEFAULT_CONFIG_VALUES[_0x192932(0x14a)]);if(!_0x4f80c0&&!_0x5a4805)throw CliErrors[_0x192932(0x16f)](_0x192932(0x17b),_0x192932(0x177)+CLI_BIN_NAME+_0x192932(0x179)+_0x4ecd71+_0x192932(0x151)+CLI_BIN_NAME+_0x192932(0x179)+_0x4ecd71+_0x192932(0x14e));const _0x2f5cc8=_0x5a4805||await resolveRemoteAppCode({'command':_0x4ecd71,'appName':_0x4f80c0,'env':_0x6c4895,'accessKey':_0x14d22a['accessKey']}),_0x3246bd=writeWorkspaceConfig({'command':_0x4ecd71,'appName':_0x4f80c0,'appcode':_0x2f5cc8,'env':_0x6c4895,'shouldWriteEnv':!!_0x157a6c,'accessKey':_0x14d22a[_0x192932(0x15c)]});return{'ok':!![],'data':{'configPath':_0x3246bd,'app':_0x4f80c0||null,'appcode':_0x2f5cc8,'env':_0x157a6c?_0x6c4895:null,'accessKeyWritten':![],'command':_0x192932(0x16b)+_0x4ecd71},'message':buildWorkspaceMessage(_0x3246bd,_0x4f80c0,_0x2f5cc8,_0x157a6c?_0x6c4895:undefined)};}async function resolveRemoteAppCode(_0x3349d0){const _0x44c0d1=a51_0x1218c8;if(!_0x3349d0[_0x44c0d1(0x15c)])throw CliErrors[_0x44c0d1(0x169)]('Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20'+CLI_BIN_NAME+_0x44c0d1(0x179)+_0x3349d0['command']+'.');const {setActiveAK:_0x3ccff2}=await import(_0x44c0d1(0x15d)),{getRemoteAppList:_0x146b34}=await import('../../commands/app/remote-source.js');_0x3ccff2(_0x3349d0[_0x44c0d1(0x15c)]);const _0x129ccb=await _0x146b34({'env':_0x3349d0[_0x44c0d1(0x14a)],'accessKey':_0x3349d0['accessKey'],'noCache':![]}),_0xb5d5db=findAppByName(_0x129ccb[_0x44c0d1(0x15e)],_0x3349d0[_0x44c0d1(0x14f)]);if(_0xb5d5db&&!isRuntimeAccessibleApp(_0xb5d5db))throw runtimeInaccessibleAppError(_0xb5d5db,'\x22'+_0x3349d0[_0x44c0d1(0x14f)]+'\x22');const _0x2e9758=_0xb5d5db?.[_0x44c0d1(0x155)]?.[_0x44c0d1(0x14c)]();if(_0x2e9758)return _0x2e9758;const _0xdbad16=_0x129ccb[_0x44c0d1(0x15e)][_0x44c0d1(0x154)](_0x1501d5=>_0x1501d5[_0x44c0d1(0x14f)])[_0x44c0d1(0x15f)](Boolean),_0x399153=_0xdbad16[_0x44c0d1(0x17a)]?_0x44c0d1(0x176)+Array[_0x44c0d1(0x147)](new Set(_0xdbad16))[_0x44c0d1(0x174)](',\x20')+'.':_0x44c0d1(0x146)+CLI_BIN_NAME+_0x44c0d1(0x166);throw CliErrors[_0x44c0d1(0x16f)](_0x44c0d1(0x153)+_0x3349d0[_0x44c0d1(0x14f)]+_0x44c0d1(0x15a),_0x399153);}function a51_0x3799(){const _0x3b4ef0=['workspace\x20','init','write','325112ANSNOz','validation','Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','yes','4616ROnulJ','apps','join','84MeycXq','Available\x20apps:\x20','Usage:\x20','isArray','\x20workspace\x20','length','Missing\x20workspace\x20app\x20selector.','789175DuZJPi','Run\x20`','from','project','196644Erlgkq','env','Set\x20app\x20context\x20for\x20the\x20current\x20workspace','trim','string','\x20--appcode\x20<code>\x20[--env\x20daily]','appName','use','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','14130ZfoHcX','App\x20\x22','map','appCode','404112qKlBeg','\x22.\x20Allowed:\x20','\x0aDefault\x20app:\x20','app','\x22\x20not\x20found.','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','accessKey','../../core/api-client.js','items','filter','includes','object','defaultApp','102746eIjUNJ','envName','str','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','537332cOVsZB','appcode','authRequired','workspace'];a51_0x3799=function(){return _0x3b4ef0;};return a51_0x3799();}function writeWorkspaceConfig(_0x5b1dde){const _0x47f4e7=a51_0x1218c8,_0x4c8f95=resolveWriteConfigPath(_0x47f4e7(0x148)),_0x2cc1c7=readConfigFile(_0x4c8f95);_0x5b1dde['shouldWriteEnv']&&(_0x2cc1c7[_0x47f4e7(0x14a)]=_0x5b1dde[_0x47f4e7(0x14a)]);if(_0x5b1dde[_0x47f4e7(0x14f)]){const _0x68d412=isRecord(_0x2cc1c7['apps'])?{..._0x2cc1c7[_0x47f4e7(0x173)]}:{},_0x5ea653=isRecord(_0x68d412[_0x5b1dde['appName']])?_0x68d412[_0x5b1dde[_0x47f4e7(0x14f)]]:{};_0x68d412[_0x5b1dde['appName']]={..._0x5ea653,'appcode':_0x5b1dde['appcode']},_0x2cc1c7[_0x47f4e7(0x173)]=_0x68d412,_0x2cc1c7[_0x47f4e7(0x162)]=_0x5b1dde[_0x47f4e7(0x14f)];if(_0x2cc1c7[_0x47f4e7(0x159)])delete _0x2cc1c7[_0x47f4e7(0x159)];return writeAndReturn(_0x4c8f95,_0x2cc1c7);}_0x2cc1c7[_0x47f4e7(0x168)]=_0x5b1dde[_0x47f4e7(0x168)];if(_0x2cc1c7['app'])delete _0x2cc1c7[_0x47f4e7(0x159)];return writeAndReturn(_0x4c8f95,_0x2cc1c7);}function a51_0x397d(_0x1c6ade,_0x53a299){_0x1c6ade=_0x1c6ade-0x145;const _0x379923=a51_0x3799();let _0x397d44=_0x379923[_0x1c6ade];return _0x397d44;}function writeAndReturn(_0x2313d0,_0x4b82ee){return writeConfigFile(_0x2313d0,_0x4b82ee),_0x2313d0;}function resolveWorkspaceEnv(_0x79e56){const _0x15222c=a51_0x1218c8;if(RUNTIME_ENV_VALUES[_0x15222c(0x160)](_0x79e56))return _0x79e56;throw CliErrors['validation']('Invalid\x20env\x20\x22'+_0x79e56+_0x15222c(0x157)+RUNTIME_ENV_VALUES[_0x15222c(0x174)](',\x20'));}function buildWorkspaceMessage(_0x183043,_0x22c2a0,_0x4e372b,_0x385c16){const _0x22d867=a51_0x1218c8,_0x46d883=_0x22c2a0?_0x22c2a0+'\x20('+_0x4e372b+')':_0x4e372b,_0x2c86dc=_0x385c16?'\x0aEnv:\x20'+_0x385c16:'';return'Workspace\x20configured.\x0aConfig\x20file:\x20'+_0x183043+_0x22d867(0x158)+_0x46d883+_0x2c86dc+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0x2c90c9){const _0xf695eb=a51_0x1218c8;return typeof _0x2c90c9===_0xf695eb(0x161)&&_0x2c90c9!==null&&!Array[_0xf695eb(0x178)](_0x2c90c9);}function makeWorkspaceCommand(_0x5f03cf){const _0x5bfdf5=a51_0x1218c8;return{'service':_0x5bfdf5(0x16a),'command':_0x5f03cf,'description':_0x5f03cf===_0x5bfdf5(0x16c)?'Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace':_0x5bfdf5(0x14b),'risk':_0x5bfdf5(0x16d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x53d49e){return executeWorkspaceUse(_0x53d49e,_0x5f03cf);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a51_0x1218c8(0x16c)),makeWorkspaceCommand(a51_0x1218c8(0x150))];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a52_0x4c0f7c=a52_0xb686;function a52_0xb686(_0xbf1f7c,_0x379eb){_0xbf1f7c=_0xbf1f7c-0x1a7;const _0x301491=a52_0x3014();let _0xb686cc=_0x301491[_0xbf1f7c];return _0xb686cc;}(function(_0x582202,_0x3e3302){const _0x57d484=a52_0xb686,_0x54cea5=_0x582202();while(!![]){try{const _0x45028c=-parseInt(_0x57d484(0x1b6))/0x1+-parseInt(_0x57d484(0x1b2))/0x2*(-parseInt(_0x57d484(0x1bd))/0x3)+parseInt(_0x57d484(0x1b7))/0x4*(parseInt(_0x57d484(0x1ae))/0x5)+parseInt(_0x57d484(0x1b1))/0x6*(-parseInt(_0x57d484(0x1b3))/0x7)+-parseInt(_0x57d484(0x1be))/0x8*(parseInt(_0x57d484(0x1aa))/0x9)+-parseInt(_0x57d484(0x1b8))/0xa*(parseInt(_0x57d484(0x1ac))/0xb)+parseInt(_0x57d484(0x1bc))/0xc;if(_0x45028c===_0x3e3302)break;else _0x54cea5['push'](_0x54cea5['shift']());}catch(_0x2cae45){_0x54cea5['push'](_0x54cea5['shift']());}}}(a52_0x3014,0xcc18c));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':a52_0x4c0f7c(0x1c5),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a52_0x4c0f7c(0x1a9)],'importable':!![]},'format':{'description':a52_0x4c0f7c(0x1a7),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['format'],'importable':!![]},'pageSize':{'description':a52_0x4c0f7c(0x1c7),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':'Override\x20API\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a52_0x4c0f7c(0x1b0),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a52_0x4c0f7c(0x1c2),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a52_0x4c0f7c(0x1c4),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a52_0x4c0f7c(0x1bb),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a52_0x4c0f7c(0x1c3),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['riskLevel'],'importable':!![]},'locale':{'description':a52_0x4c0f7c(0x1ab),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a52_0x4c0f7c(0x1ad)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a52_0x4c0f7c(0x1af)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x10dc4b])=>_0x10dc4b[a52_0x4c0f7c(0x1c8)])['map'](([_0x145115])=>_0x145115));export const CONFIG_ENUM_VALUES=Object['fromEntries'](Object[a52_0x4c0f7c(0x1af)](CONFIG_FIELD_SCHEMAS)[a52_0x4c0f7c(0x1bf)](([,_0x53026f])=>_0x53026f['enumValues'])['map'](([_0x35a89a,_0x274ac3])=>[_0x35a89a,[..._0x274ac3[a52_0x4c0f7c(0x1c0)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a52_0x4c0f7c(0x1af)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x212f09])=>_0x212f09[a52_0x4c0f7c(0x1c1)])[a52_0x4c0f7c(0x1c6)](([_0x308967])=>_0x308967);export function getConfigFieldSchema(_0x146abc){return CONFIG_FIELD_SCHEMAS[_0x146abc];}export function getConfigEnumValues(_0x50538f){const _0x1b3f60=a52_0x4c0f7c;return getConfigFieldSchema(_0x50538f)?.[_0x1b3f60(0x1c0)];}export function getConfigDefaultValue(_0xcfdc9c){const _0x4cfc06=a52_0x4c0f7c;return getConfigFieldSchema(_0xcfdc9c)?.[_0x4cfc06(0x1b5)];}export function isTopLevelConfigKey(_0x1ff52b){const _0xcbc53b=a52_0x4c0f7c;return TOP_LEVEL_CONFIG_KEYS[_0xcbc53b(0x1b9)](_0x1ff52b);}export function isLegacyCompatConfigKey(_0x44a4a){return getConfigFieldSchema(_0x44a4a)?.['legacyCompatOnly']===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x23a934){const _0x426d38=a52_0x4c0f7c;return[..._0x23a934][_0x426d38(0x1a8)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}function a52_0x3014(){const _0xa10b2d=['importable','Override\x20runtime\x20domain','Risk\x20level','Override\x20SkillHub\x20domain','Target\x20environment','map','Default\x20page\x20size','cliSettableTopLevel','Default\x20output\x20format','join','env','891AiJvTK','Locale','2916881IRJYBu','locale','33845VTDDiX','entries','Override\x20user\x20domain','16086tTYVFb','5806FlzvKa','4256IuOtiU','Config\x20key.\x20Top-level:\x20','defaultValue','641141jZsdjN','596bXvEDD','10hbDzpp','has',';\x20local\x20alias:\x20apps.<alias>.appcode','Access\x20key\x20(client-ak\x20auth)','26309784NEOmJA','474ehjhTm','23224XpCsej','filter','enumValues'];a52_0x3014=function(){return _0xa10b2d;};return a52_0x3014();}export function getConfigCommandKeyDescription(){const _0xab5f69=a52_0x4c0f7c;return _0xab5f69(0x1b4)+getTopLevelConfigKeySummary()+_0xab5f69(0x1ba);}export function buildAppProfileListFields(_0x589a76){return{'env':_0x589a76,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|