@lovrabet/lovrabet-cli 2.1.8-beta.2 → 2.1.8
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/app-config/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/common/local-file.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/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/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/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/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/service-order.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 a54_0x2af132=a54_0x9658;(function(_0x52ef7d,_0x5f0e38){const _0x5eb6e3=a54_0x9658,_0x19d3f6=_0x52ef7d();while(!![]){try{const _0x4301a5=-parseInt(_0x5eb6e3(0x1de))/0x1*(parseInt(_0x5eb6e3(0x1dd))/0x2)+-parseInt(_0x5eb6e3(0x200))/0x3*(parseInt(_0x5eb6e3(0x1fd))/0x4)+-parseInt(_0x5eb6e3(0x1dc))/0x5+-parseInt(_0x5eb6e3(0x1e3))/0x6+parseInt(_0x5eb6e3(0x1ef))/0x7+parseInt(_0x5eb6e3(0x1e0))/0x8+parseInt(_0x5eb6e3(0x1f3))/0x9;if(_0x4301a5===_0x5f0e38)break;else _0x19d3f6['push'](_0x19d3f6['shift']());}catch(_0x56178b){_0x19d3f6['push'](_0x19d3f6['shift']());}}}(a54_0x278c,0xcc84e));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=[a54_0x2af132(0x1df),a54_0x2af132(0x1f9),a54_0x2af132(0x1e9)];export const DEFAULT_SKILL_TARGET=a54_0x2af132(0x1e4);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE='references/runtime-contract.md';export const OUTPUT_CONTRACT_FILE='references/output-contract.md';function a54_0x278c(){const _0x4d84e2=['\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','timestamp','.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','6660425LAkkUI','40336RGKjUb','67BcMBBn','write','5597024luwwCD','\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=','validation','1485348PIzEJF','.agents/skills','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','\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','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】','trainer','\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0ametadata:\x0a\x20\x20type:\x20','\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','Invalid\x20Skill\x20name:\x20','\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','type','1713754KjQukj','\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','Unsupported\x20Skill\x20type:\x20','toISOString','25491870bkABtq','#\x20Output\x20Contract\x0a\x0a','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','SKILL.md','trim','includes','read','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','\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','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','33084rNfmQH','skillName','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','3VLsfGG'];a54_0x278c=function(){return _0x4d84e2;};return a54_0x278c();}export function validateSkillName(_0xfd9dd2){const _0x2b87b7=a54_0x2af132,_0x4a29ce=_0xfd9dd2['trim']();if(!SKILL_NAME_PATTERN['test'](_0x4a29ce))throw CliErrors[_0x2b87b7(0x1e2)](_0x2b87b7(0x1ec)+_0xfd9dd2+_0x2b87b7(0x203),_0x2b87b7(0x1e7));return _0x4a29ce;}function a54_0x9658(_0x28e758,_0x2d2f9a){_0x28e758=_0x28e758-0x1dc;const _0x278c5d=a54_0x278c();let _0x965886=_0x278c5d[_0x28e758];return _0x965886;}export function normalizeSkillTemplateType(_0x543538){const _0xf4327f=a54_0x2af132,_0x19719c=(_0x543538||_0xf4327f(0x1df))[_0xf4327f(0x1f7)]()||'write';if(SKILL_TYPES[_0xf4327f(0x1f8)](_0x19719c))return _0x19719c;throw CliErrors[_0xf4327f(0x1e2)](_0xf4327f(0x1f1)+_0x543538,'Use\x20one\x20of:\x20'+SKILL_TYPES['join'](',\x20')+'.');}export function renderSkillTemplate(_0x132132){const _0x43fc01=a54_0x2af132,_0x2f381e=validateSkillName(_0x132132[_0x43fc01(0x1fe)]),_0x5e826f=normalizeSkillTemplateType(_0x132132[_0x43fc01(0x1ee)]),_0x36e421=_0x132132[_0x43fc01(0x202)]??new Date()[_0x43fc01(0x1f2)]();return{'skillName':_0x2f381e,'type':_0x5e826f,'files':[{'path':_0x43fc01(0x1f6),'content':renderSkillMd(_0x2f381e,_0x5e826f,_0x36e421)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x2f381e,_0x5e826f)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x2f381e,_0x5e826f)}]};}function renderSkillMd(_0x4f44dc,_0x208d76,_0xe13362){const _0x56411c=a54_0x2af132,_0x4f32ba=typeWorkflow(_0x208d76);return'---\x0aname:\x20'+_0x4f44dc+_0x56411c(0x1ea)+_0x208d76+'\x0a\x20\x20created:\x20\x22'+_0xe13362+_0x56411c(0x1f5)+_0x4f44dc+_0x56411c(0x1e6)+_0x4f32ba+'\x0a\x0a'+businessStateSection(_0x208d76)+_0x56411c(0x1ed);}function renderRuntimeContract(_0x50b274,_0x2686be){const _0x33c2b4=a54_0x2af132,_0x2e1a3b=_0x2686be===_0x33c2b4(0x1df)?_0x33c2b4(0x204):'';return _0x33c2b4(0x1fa)+_0x50b274+_0x33c2b4(0x1e1)+_0x2686be+_0x33c2b4(0x1eb)+_0x2e1a3b+_0x33c2b4(0x1f0);}function renderOutputContract(_0xea0116,_0x268d80){const _0x2a146a=a54_0x2af132,_0x1d7596=_0x268d80===_0x2a146a(0x1df)?_0x2a146a(0x205):_0x268d80+'\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。';return _0x2a146a(0x1f4)+_0xea0116+_0x2a146a(0x1fb)+_0x1d7596+_0x2a146a(0x201);}function typeWorkflow(_0x138f6d){const _0x216301=a54_0x2af132;if(_0x138f6d===_0x216301(0x1f9))return _0x216301(0x1e5);if(_0x138f6d===_0x216301(0x1e9))return _0x216301(0x1e8);return _0x216301(0x1ff);}function businessStateSection(_0x74b6a8){const _0x1d4ddb=a54_0x2af132;if(_0x74b6a8!==_0x1d4ddb(0x1df))return'';return _0x1d4ddb(0x1fc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a55_0xe32659=a55_0x4061;(function(_0x4d2ed3,_0x22b72c){const _0x1c3423=a55_0x4061,_0x2ceb52=_0x4d2ed3();while(!![]){try{const _0xc1898f=parseInt(_0x1c3423(0x106))/0x1+-parseInt(_0x1c3423(0x130))/0x2*(-parseInt(_0x1c3423(0x12c))/0x3)+-parseInt(_0x1c3423(0x126))/0x4+parseInt(_0x1c3423(0x101))/0x5+-parseInt(_0x1c3423(0x11f))/0x6+-parseInt(_0x1c3423(0x105))/0x7*(parseInt(_0x1c3423(0xfd))/0x8)+-parseInt(_0x1c3423(0x104))/0x9;if(_0xc1898f===_0x22b72c)break;else _0x2ceb52['push'](_0x2ceb52['shift']());}catch(_0x2f0982){_0x2ceb52['push'](_0x2ceb52['shift']());}}}(a55_0x2ffc,0x63bfa));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a55_0x1f7417}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';function a55_0x4061(_0x24dab7,_0x37ebde){_0x24dab7=_0x24dab7-0xf9;const _0x2ffc1e=a55_0x2ffc();let _0x4061c3=_0x2ffc1e[_0x24dab7];return _0x4061c3;}const SKILL_FILE=a55_0xe32659(0xfe),SUPPORTED_SKILL_TYPES=new Set([a55_0xe32659(0x12a),a55_0xe32659(0x12f),a55_0xe32659(0x133)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;function a55_0x2ffc(){const _0x4443cc=['metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','filter','section','validation','description','trim','registry','ruleId','flatMap','internal','raw','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','toUpperCase','sql','isDirectory','Frontmatter\x20description\x20is\x20empty.','page','string','join','SKILL.md\x20must\x20start\x20with\x20frontmatter.','false','description-required','isFile','name','path','service','144NOmRRm','SKILL.md','workspace','app','1857200ArJdMi','slice','number','3142926MtQscC','101234NbnWYZ','153442hyGJaF','SKILL.md\x20is\x20not\x20a\x20file.','test','errors','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.','has','push','message','rabetbase-cli-reference','Skill\x20validation\x20failed:\x0a','search','structure-complete','data','error','Missing\x20SKILL.md.','boolean','project','Skill\x20directory\x20not\x20found:\x20','config','utf8','isSymbolicLink','frontmatter-required','dataset','map','file','284916uTjiLH','metadata','warning','toLowerCase','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','content','split','484960FAirQg','object','isArray','bff','write','Add\x20frontmatter\x20with\x20name\x20and\x20description.','12zBueoD','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','level','read','330972qnSyPu','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','artifact','trainer','hasFrontmatter','true','type'];a55_0x2ffc=function(){return _0x4443cc;};return a55_0x2ffc();}export function validateSkillDirectory(_0x4c774b,_0x4babca={}){const _0x33fb4b=a55_0xe32659,_0x385dc7=resolveSkillDirectoryRoot(_0x4c774b),_0x443d34=[],_0x10fc6b=loadRequiredSkillFile(_0x385dc7,_0x443d34),_0x16c88a=_0x10fc6b?parseFrontmatter(_0x10fc6b[_0x33fb4b(0x124)]):{'hasFrontmatter':![]};_0x10fc6b&&validateFrontmatter(_0x10fc6b['path'],_0x16c88a,_0x443d34);validateRuntimeCliReferences(_0x385dc7,_0x443d34);const _0x3bfbbe=_0x443d34['filter'](_0x44f240=>_0x44f240[_0x33fb4b(0x12e)]===_0x33fb4b(0x113)),_0x253a4d=_0x443d34[_0x33fb4b(0x138)](_0x3945c5=>_0x3945c5['level']===_0x33fb4b(0x121));return{'ok':_0x3bfbbe['length']===0x0,'dir':_0x385dc7,'type':_0x16c88a[_0x33fb4b(0x136)],'errors':_0x3bfbbe,'warnings':_0x253a4d};}function resolveSkillDirectoryRoot(_0x333254){const _0x1f6084=a55_0xe32659,_0x20b3ca=resolve(_0x333254);if(!existsSync(_0x20b3ca))throw CliErrors['validation'](_0x1f6084(0x117)+_0x333254);const _0x42c00b=lstatSync(_0x20b3ca);if(_0x42c00b[_0x1f6084(0x145)]())return _0x20b3ca;if(_0x42c00b[_0x1f6084(0x11a)]()){const _0xab05fd=realpathSync(_0x20b3ca);if(lstatSync(_0xab05fd)[_0x1f6084(0x145)]())return _0xab05fd;}throw CliErrors[_0x1f6084(0x13a)](_0x1f6084(0x117)+_0x333254);}export function throwIfSkillValidationFailed(_0x2456f6,_0x5cc221=![]){const _0x2da2bc=a55_0xe32659;if(_0x2456f6['ok'])return;const _0x25b861=_0x2456f6[_0x2da2bc(0x109)]['map'](_0x2bb9a7=>{const _0x4df8c4=_0x2da2bc,_0x45b445=_0x2bb9a7[_0x4df8c4(0x139)]?'#'+_0x2bb9a7[_0x4df8c4(0x139)]:'';return _0x2bb9a7[_0x4df8c4(0x12e)][_0x4df8c4(0x143)]()+'\x20'+_0x2bb9a7[_0x4df8c4(0x13e)]+'\x20'+_0x2bb9a7[_0x4df8c4(0x11e)]+_0x45b445+':\x20'+_0x2bb9a7[_0x4df8c4(0x10d)]+'\x20Fix:\x20'+_0x2bb9a7['suggestion'];});throw CliErrors[_0x2da2bc(0x13a)](_0x2da2bc(0x10f)+_0x25b861[_0x2da2bc(0x149)]('\x0a'),_0x2da2bc(0x131));}function loadRequiredSkillFile(_0x42cfc0,_0x4799c1){const _0x1a04dc=a55_0xe32659,_0x4420d1=resolve(_0x42cfc0,SKILL_FILE);if(!existsSync(_0x4420d1))return _0x4799c1[_0x1a04dc(0x10c)](issue('error','structure-complete',SKILL_FILE,_0x1a04dc(0x114),'Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.')),undefined;const _0x15184d=lstatSync(_0x4420d1);if(_0x15184d[_0x1a04dc(0x11a)]())return _0x4799c1[_0x1a04dc(0x10c)](issue(_0x1a04dc(0x113),_0x1a04dc(0x111),SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.',_0x1a04dc(0x123))),undefined;if(!_0x15184d[_0x1a04dc(0xf9)]())return _0x4799c1[_0x1a04dc(0x10c)](issue(_0x1a04dc(0x113),_0x1a04dc(0x111),SKILL_FILE,_0x1a04dc(0x107),_0x1a04dc(0x12d))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x4420d1,_0x1a04dc(0x119))};}function validateFrontmatter(_0x25fde6,_0x45d2da,_0x53f4cb){const _0x137e70=a55_0xe32659;if(!_0x45d2da[_0x137e70(0x134)]){_0x53f4cb[_0x137e70(0x10c)](issue(_0x137e70(0x113),_0x137e70(0x11b),_0x25fde6,_0x137e70(0x14a),_0x137e70(0x12b)));return;}!_0x45d2da[_0x137e70(0xfa)]?.[_0x137e70(0x13c)]()&&_0x53f4cb['push'](issue(_0x137e70(0x113),_0x137e70(0x11b),_0x25fde6,'Frontmatter\x20name\x20is\x20missing.','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.')),!_0x45d2da[_0x137e70(0x13b)]?.[_0x137e70(0x13c)]()&&_0x53f4cb[_0x137e70(0x10c)](issue(_0x137e70(0x113),_0x137e70(0x14c),_0x25fde6,_0x137e70(0x146),_0x137e70(0x142))),_0x45d2da[_0x137e70(0x140)]===!![]&&_0x53f4cb[_0x137e70(0x10c)](issue(_0x137e70(0x113),'internal-skill',_0x25fde6,_0x137e70(0x137),'Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x45d2da[_0x137e70(0x136)]?.['trim']()&&!SUPPORTED_SKILL_TYPES[_0x137e70(0x10b)](_0x45d2da[_0x137e70(0x136)])&&_0x53f4cb[_0x137e70(0x10c)](issue(_0x137e70(0x113),_0x137e70(0x11b),_0x25fde6,'metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.',_0x137e70(0x10a)));}function validateRuntimeCliReferences(_0x2cf006,_0x371eb3){const _0x506486=a55_0xe32659;for(const _0xd31a8 of findRabetbaseCliInvocations(_0x2cf006)){_0x371eb3[_0x506486(0x10c)](issue(_0x506486(0x121),_0x506486(0x10e),_0xd31a8[_0x506486(0x11e)],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','L'+_0xd31a8['line']));}}function findRabetbaseCliInvocations(_0x4f6521){const _0x1b14cb=a55_0xe32659;return scanSkillDirectory(_0x4f6521)[_0x1b14cb(0x138)](_0x1232b2=>TEXT_SKILL_FILE_PATTERN['test'](_0x1232b2[_0x1b14cb(0xfb)]))[_0x1b14cb(0x13f)](_0x40b80b=>{const _0x4f2b9a=_0x1b14cb,_0x3de0cf=fileText(_0x40b80b);return _0x3de0cf[_0x4f2b9a(0x125)](/\r?\n/)[_0x4f2b9a(0x11d)]((_0x436dde,_0x5b4b35)=>({'file':_0x40b80b[_0x4f2b9a(0xfb)],'line':_0x5b4b35+0x1,'text':_0x436dde}))['filter'](({text:_0x525048})=>isRabetbaseCliInvocation(_0x525048))[_0x4f2b9a(0x11d)](({file:_0x51bb1d,line:_0x21fc04})=>({'file':_0x51bb1d,'line':_0x21fc04}));});}const RABETBASE_SUBCOMMANDS=[a55_0xe32659(0x11c),a55_0xe32659(0x144),a55_0xe32659(0x129),a55_0xe32659(0x147),a55_0xe32659(0x116),a55_0xe32659(0x100),'schema',a55_0xe32659(0xfc),a55_0xe32659(0x132),'kb',a55_0xe32659(0x118),a55_0xe32659(0xff),a55_0xe32659(0x112),'auth','logs',a55_0xe32659(0x13d)],RABETBASE_INVOCATION=new RegExp(String[a55_0xe32659(0x141)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS['join']('|')})\b`+String[a55_0xe32659(0x141)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x8d4dac){const _0xb7ee61=a55_0xe32659,_0x21abac=_0x8d4dac[_0xb7ee61(0x110)](/\brabetbase\b/i);if(_0x21abac<0x0)return![];const _0x33dbdc=_0x8d4dac[_0xb7ee61(0x102)](_0x21abac)[_0xb7ee61(0x125)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0xb7ee61(0x108)](_0x33dbdc);}function parseFrontmatter(_0x34d415){const _0x53e5a6=a55_0xe32659,_0x5e15d4=_0x34d415['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5e15d4)return{'hasFrontmatter':![]};const _0x4e8d35=_0x5e15d4[0x1]??'',_0x3d8ba8={'hasFrontmatter':!![]};let _0x4d1bfd;try{_0x4d1bfd=a55_0x1f7417(_0x4e8d35);}catch{return _0x3d8ba8;}const _0x106117=asRecord(_0x4d1bfd);if(!_0x106117)return _0x3d8ba8;_0x3d8ba8[_0x53e5a6(0xfa)]=scalarToString(_0x106117[_0x53e5a6(0xfa)]),_0x3d8ba8['description']=scalarToString(_0x106117[_0x53e5a6(0x13b)]);const _0x3a9d17=asRecord(_0x106117[_0x53e5a6(0x120)]);return _0x3a9d17&&(_0x3d8ba8['type']=scalarToString(_0x3a9d17['type']),_0x3d8ba8['internal']=scalarToBoolean(_0x3a9d17[_0x53e5a6(0x140)])),_0x3d8ba8;}function asRecord(_0x1380f4){const _0x26c45c=a55_0xe32659;if(_0x1380f4&&typeof _0x1380f4===_0x26c45c(0x127)&&!Array[_0x26c45c(0x128)](_0x1380f4))return _0x1380f4;return undefined;}function scalarToString(_0x8c4c98){const _0x2ede64=a55_0xe32659;if(typeof _0x8c4c98===_0x2ede64(0x148))return _0x8c4c98[_0x2ede64(0x13c)]();if(typeof _0x8c4c98===_0x2ede64(0x103)||typeof _0x8c4c98===_0x2ede64(0x115))return String(_0x8c4c98);return undefined;}function scalarToBoolean(_0x3fc4c6){if(typeof _0x3fc4c6==='boolean')return _0x3fc4c6;if(typeof _0x3fc4c6==='string')return cleanBoolean(_0x3fc4c6);return undefined;}function cleanBoolean(_0x16946a){const _0x2434d4=a55_0xe32659,_0x279df5=_0x16946a['trim']()[_0x2434d4(0x122)]();if(_0x279df5===_0x2434d4(0x135))return!![];if(_0x279df5===_0x2434d4(0x14b))return![];return undefined;}function issue(_0x37faa1,_0x14b65d,_0x8ddcf1,_0x1ebab3,_0x1c92f3,_0x29e626){return{'level':_0x37faa1,'ruleId':_0x14b65d,'file':_0x8ddcf1,'section':_0x29e626,'message':_0x1ebab3,'suggestion':_0x1c92f3};}
|
|
1
|
+
const a55_0x2fff73=a55_0x5490;function a55_0x5cb1(){const _0x5d2023=['message','SKILL.md\x20is\x20not\x20a\x20file.','warning','raw','config','string','split','display-name-recommended','dataset','error','SKILL.md','suggestion','Frontmatter\x20displayName\x20is\x20missing.','schema','section','auth','toLowerCase','bff','level','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.','write','service','structure-complete','match','filter','trim','internal-skill','104504MIzLqB','path','type','frontmatter-required','isDirectory','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','search','Frontmatter\x20description\x20is\x20empty.','internal','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','Skill\x20directory\x20not\x20found:\x20','isSymbolicLink','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.','length','Add\x20frontmatter\x20with\x20name\x20and\x20description.','12whEVgz','4497245LkStxA','boolean','4letOHi','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','198LuiFfz','has','project','line','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','displayName','5854DIEChG','validation','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','description-required','push','object','hasFrontmatter','Skill\x20validation\x20failed:\x0a','name','21JIHoFL','rabetbase-cli-reference','description','artifact','join','isFile','true','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','content','file','errors','372CyeMAq','map','\x20Fix:\x20','test','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','utf8','Frontmatter\x20name\x20is\x20missing.','logs','isArray','workspace','data','5450350XmtnxM','trainer','5315321QyzytZ','786712MIxYaC','1733058AvcBUn','app','Missing\x20SKILL.md.'];a55_0x5cb1=function(){return _0x5d2023;};return a55_0x5cb1();}(function(_0x3f6df4,_0x3d098c){const _0x35a2fe=a55_0x5490,_0x48c675=_0x3f6df4();while(!![]){try{const _0x36b286=parseInt(_0x35a2fe(0x1ac))/0x1+-parseInt(_0x35a2fe(0x1e6))/0x2*(parseInt(_0x35a2fe(0x1fa))/0x3)+-parseInt(_0x35a2fe(0x1de))/0x4*(parseInt(_0x35a2fe(0x1dc))/0x5)+parseInt(_0x35a2fe(0x1ad))/0x6*(parseInt(_0x35a2fe(0x1ef))/0x7)+parseInt(_0x35a2fe(0x1cb))/0x8*(parseInt(_0x35a2fe(0x1e0))/0x9)+parseInt(_0x35a2fe(0x1a9))/0xa+-parseInt(_0x35a2fe(0x1ab))/0xb*(parseInt(_0x35a2fe(0x1db))/0xc);if(_0x36b286===_0x3d098c)break;else _0x48c675['push'](_0x48c675['shift']());}catch(_0x448b75){_0x48c675['push'](_0x48c675['shift']());}}}(a55_0x5cb1,0xb4ad6));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a55_0xf302d9}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a55_0x2fff73(0x1ba),SUPPORTED_SKILL_TYPES=new Set([a55_0x2fff73(0x1c4),'read',a55_0x2fff73(0x1aa)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x3b1081,_0x32d655={}){const _0x5571b7=a55_0x2fff73,_0x12dfd9=resolveSkillDirectoryRoot(_0x3b1081),_0x11a044=[],_0x15432c=loadRequiredSkillFile(_0x12dfd9,_0x11a044),_0x332ba1=_0x15432c?parseFrontmatter(_0x15432c[_0x5571b7(0x1f7)]):{'hasFrontmatter':![]};_0x15432c&&validateFrontmatter(_0x15432c[_0x5571b7(0x1cc)],_0x332ba1,_0x11a044);validateRuntimeCliReferences(_0x12dfd9,_0x11a044);const _0x197ad6=_0x11a044[_0x5571b7(0x1c8)](_0x27ad1b=>_0x27ad1b[_0x5571b7(0x1c2)]===_0x5571b7(0x1b9)),_0x5490a7=_0x11a044['filter'](_0x14ad1d=>_0x14ad1d['level']===_0x5571b7(0x1b2));return{'ok':_0x197ad6[_0x5571b7(0x1d9)]===0x0,'dir':_0x12dfd9,'type':_0x332ba1['type'],'errors':_0x197ad6,'warnings':_0x5490a7};}function resolveSkillDirectoryRoot(_0x3bab5b){const _0x486b65=a55_0x2fff73,_0x5eb347=resolve(_0x3bab5b);if(!existsSync(_0x5eb347))throw CliErrors[_0x486b65(0x1e7)](_0x486b65(0x1d5)+_0x3bab5b);const _0x26ad73=lstatSync(_0x5eb347);if(_0x26ad73['isDirectory']())return _0x5eb347;if(_0x26ad73[_0x486b65(0x1d6)]()){const _0xdca0c8=realpathSync(_0x5eb347);if(lstatSync(_0xdca0c8)[_0x486b65(0x1cf)]())return _0xdca0c8;}throw CliErrors[_0x486b65(0x1e7)]('Skill\x20directory\x20not\x20found:\x20'+_0x3bab5b);}export function throwIfSkillValidationFailed(_0x5a4f20,_0x28b5bd=![]){const _0x1ab3c5=a55_0x2fff73;if(_0x5a4f20['ok'])return;const _0x7e271e=_0x5a4f20[_0x1ab3c5(0x1f9)][_0x1ab3c5(0x1fb)](_0x2c77c5=>{const _0x388fcf=_0x1ab3c5,_0x53c6c2=_0x2c77c5[_0x388fcf(0x1be)]?'#'+_0x2c77c5[_0x388fcf(0x1be)]:'';return _0x2c77c5['level']['toUpperCase']()+'\x20'+_0x2c77c5['ruleId']+'\x20'+_0x2c77c5[_0x388fcf(0x1f8)]+_0x53c6c2+':\x20'+_0x2c77c5[_0x388fcf(0x1b0)]+_0x388fcf(0x1fc)+_0x2c77c5[_0x388fcf(0x1bb)];});throw CliErrors[_0x1ab3c5(0x1e7)](_0x1ab3c5(0x1ed)+_0x7e271e[_0x1ab3c5(0x1f3)]('\x0a'),_0x1ab3c5(0x1fe));}function a55_0x5490(_0x4c17f1,_0x16aa96){_0x4c17f1=_0x4c17f1-0x1a5;const _0x5cb143=a55_0x5cb1();let _0x5490d3=_0x5cb143[_0x4c17f1];return _0x5490d3;}function loadRequiredSkillFile(_0x2580a9,_0x213ee3){const _0x5054f6=a55_0x2fff73,_0x3f2aaa=resolve(_0x2580a9,SKILL_FILE);if(!existsSync(_0x3f2aaa))return _0x213ee3[_0x5054f6(0x1ea)](issue(_0x5054f6(0x1b9),_0x5054f6(0x1c6),SKILL_FILE,_0x5054f6(0x1af),_0x5054f6(0x1f6))),undefined;const _0xd2e301=lstatSync(_0x3f2aaa);if(_0xd2e301[_0x5054f6(0x1d6)]())return _0x213ee3[_0x5054f6(0x1ea)](issue(_0x5054f6(0x1b9),_0x5054f6(0x1c6),SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.',_0x5054f6(0x1df))),undefined;if(!_0xd2e301[_0x5054f6(0x1f4)]())return _0x213ee3[_0x5054f6(0x1ea)](issue(_0x5054f6(0x1b9),_0x5054f6(0x1c6),SKILL_FILE,_0x5054f6(0x1b1),_0x5054f6(0x1d0))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x3f2aaa,_0x5054f6(0x1ff))};}function validateFrontmatter(_0x1940ca,_0x30f275,_0x42dd39){const _0x3df342=a55_0x2fff73;if(!_0x30f275[_0x3df342(0x1ec)]){_0x42dd39[_0x3df342(0x1ea)](issue('error',_0x3df342(0x1ce),_0x1940ca,'SKILL.md\x20must\x20start\x20with\x20frontmatter.',_0x3df342(0x1da)));return;}!_0x30f275[_0x3df342(0x1ee)]?.['trim']()&&_0x42dd39[_0x3df342(0x1ea)](issue(_0x3df342(0x1b9),_0x3df342(0x1ce),_0x1940ca,_0x3df342(0x200),'Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.')),!_0x30f275[_0x3df342(0x1e5)]?.[_0x3df342(0x1c9)]()&&_0x42dd39[_0x3df342(0x1ea)](issue(_0x3df342(0x1b2),_0x3df342(0x1b7),_0x1940ca,_0x3df342(0x1bc),'Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.')),!_0x30f275['description']?.[_0x3df342(0x1c9)]()&&_0x42dd39[_0x3df342(0x1ea)](issue(_0x3df342(0x1b9),_0x3df342(0x1e9),_0x1940ca,_0x3df342(0x1d2),_0x3df342(0x1d7))),_0x30f275['internal']===!![]&&_0x42dd39[_0x3df342(0x1ea)](issue('error',_0x3df342(0x1ca),_0x1940ca,_0x3df342(0x1e4),_0x3df342(0x1e8))),_0x30f275[_0x3df342(0x1cd)]?.[_0x3df342(0x1c9)]()&&!SUPPORTED_SKILL_TYPES[_0x3df342(0x1e1)](_0x30f275['type'])&&_0x42dd39[_0x3df342(0x1ea)](issue(_0x3df342(0x1b9),_0x3df342(0x1ce),_0x1940ca,_0x3df342(0x1d8),_0x3df342(0x1c3)));}function validateRuntimeCliReferences(_0x17736d,_0x53da1c){const _0x26944c=a55_0x2fff73;for(const _0x5a8d84 of findRabetbaseCliInvocations(_0x17736d)){_0x53da1c['push'](issue(_0x26944c(0x1b2),_0x26944c(0x1f0),_0x5a8d84[_0x26944c(0x1f8)],_0x26944c(0x1d4),'If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','L'+_0x5a8d84[_0x26944c(0x1e3)]));}}function findRabetbaseCliInvocations(_0xa65c32){const _0x59bb51=a55_0x2fff73;return scanSkillDirectory(_0xa65c32)[_0x59bb51(0x1c8)](_0xf03c50=>TEXT_SKILL_FILE_PATTERN[_0x59bb51(0x1fd)](_0xf03c50[_0x59bb51(0x1cc)]))['flatMap'](_0x18ea33=>{const _0xfc0523=_0x59bb51,_0x42513a=fileText(_0x18ea33);return _0x42513a[_0xfc0523(0x1b6)](/\r?\n/)['map']((_0x4b4e69,_0x5700da)=>({'file':_0x18ea33['path'],'line':_0x5700da+0x1,'text':_0x4b4e69}))[_0xfc0523(0x1c8)](({text:_0x20966f})=>isRabetbaseCliInvocation(_0x20966f))[_0xfc0523(0x1fb)](({file:_0x35f515,line:_0x2867f6})=>({'file':_0x35f515,'line':_0x2867f6}));});}const RABETBASE_SUBCOMMANDS=[a55_0x2fff73(0x1b8),'sql',a55_0x2fff73(0x1c1),'page',a55_0x2fff73(0x1e2),a55_0x2fff73(0x1ae),a55_0x2fff73(0x1bd),a55_0x2fff73(0x1c5),a55_0x2fff73(0x1f2),'kb',a55_0x2fff73(0x1b4),a55_0x2fff73(0x1a7),a55_0x2fff73(0x1a8),a55_0x2fff73(0x1bf),a55_0x2fff73(0x1a5),'registry'],RABETBASE_INVOCATION=new RegExp(String['raw']`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a55_0x2fff73(0x1f3)]('|')})\b`+String[a55_0x2fff73(0x1b3)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x16d49f){const _0x22eb0c=a55_0x2fff73,_0x539894=_0x16d49f[_0x22eb0c(0x1d1)](/\brabetbase\b/i);if(_0x539894<0x0)return![];const _0x5bc36b=_0x16d49f['slice'](_0x539894)['split'](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x22eb0c(0x1fd)](_0x5bc36b);}function parseFrontmatter(_0x3a2acc){const _0x2cf25f=a55_0x2fff73,_0x266481=_0x3a2acc[_0x2cf25f(0x1c7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x266481)return{'hasFrontmatter':![]};const _0x408956=_0x266481[0x1]??'',_0x1af03c={'hasFrontmatter':!![]};let _0x9045e5;try{_0x9045e5=a55_0xf302d9(_0x408956);}catch{return _0x1af03c;}const _0x336bc6=asRecord(_0x9045e5);if(!_0x336bc6)return _0x1af03c;_0x1af03c[_0x2cf25f(0x1ee)]=scalarToString(_0x336bc6[_0x2cf25f(0x1ee)]),_0x1af03c[_0x2cf25f(0x1e5)]=scalarToString(_0x336bc6[_0x2cf25f(0x1e5)]),_0x1af03c[_0x2cf25f(0x1f1)]=scalarToString(_0x336bc6[_0x2cf25f(0x1f1)]);const _0x381c86=asRecord(_0x336bc6['metadata']);return _0x381c86&&(_0x1af03c[_0x2cf25f(0x1cd)]=scalarToString(_0x381c86['type']),_0x1af03c[_0x2cf25f(0x1d3)]=scalarToBoolean(_0x381c86[_0x2cf25f(0x1d3)])),_0x1af03c;}function asRecord(_0x56a0f1){const _0x508dd3=a55_0x2fff73;if(_0x56a0f1&&typeof _0x56a0f1===_0x508dd3(0x1eb)&&!Array[_0x508dd3(0x1a6)](_0x56a0f1))return _0x56a0f1;return undefined;}function scalarToString(_0x2cbf0f){const _0x175e58=a55_0x2fff73;if(typeof _0x2cbf0f===_0x175e58(0x1b5))return _0x2cbf0f[_0x175e58(0x1c9)]();if(typeof _0x2cbf0f==='number'||typeof _0x2cbf0f===_0x175e58(0x1dd))return String(_0x2cbf0f);return undefined;}function scalarToBoolean(_0x76bf8c){const _0x3cf7d6=a55_0x2fff73;if(typeof _0x76bf8c==='boolean')return _0x76bf8c;if(typeof _0x76bf8c===_0x3cf7d6(0x1b5))return cleanBoolean(_0x76bf8c);return undefined;}function cleanBoolean(_0x4be773){const _0x32c989=a55_0x2fff73,_0x213652=_0x4be773[_0x32c989(0x1c9)]()[_0x32c989(0x1c0)]();if(_0x213652===_0x32c989(0x1f5))return!![];if(_0x213652==='false')return![];return undefined;}function issue(_0xbe7c32,_0x8a0cc,_0xc7ee06,_0x2bbaa9,_0x11f434,_0xdd54b3){return{'level':_0xbe7c32,'ruleId':_0x8a0cc,'file':_0xc7ee06,'section':_0xdd54b3,'message':_0x2bbaa9,'suggestion':_0x11f434};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a56_0x343675=a56_0x2cb0;(function(_0x597093,_0x3d6e35){const _0x445fce=a56_0x2cb0,_0x528f5b=_0x597093();while(!![]){try{const _0x31abb1=parseInt(_0x445fce(0xa7))/0x1*(parseInt(_0x445fce(0xb7))/0x2)+parseInt(_0x445fce(0xb8))/0x3*(-parseInt(_0x445fce(0xac))/0x4)+-parseInt(_0x445fce(0xb9))/0x5+parseInt(_0x445fce(0xb6))/0x6*(-parseInt(_0x445fce(0xae))/0x7)+-parseInt(_0x445fce(0xb5))/0x8*(-parseInt(_0x445fce(0xa8))/0x9)+parseInt(_0x445fce(0xab))/0xa+parseInt(_0x445fce(0xa9))/0xb;if(_0x31abb1===_0x3d6e35)break;else _0x528f5b['push'](_0x528f5b['shift']());}catch(_0x2cbff7){_0x528f5b['push'](_0x528f5b['shift']());}}}(a56_0x3cc4,0xc689d));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a56_0x2cb0(_0x1fc417,_0x188474){_0x1fc417=_0x1fc417-0xa5;const _0x3cc4bf=a56_0x3cc4();let _0x2cb0e0=_0x3cc4bf[_0x1fc417];return _0x2cb0e0;}function a56_0x3cc4(){const _0x5eb57c=['1ZRmkGA','13491KrgGQx','8586930RrxNJE','sql','10170900fEOoMb','40ebRMFA','detail','28826IjzlWp','bool','appCode','verbose','sqlName','str','dbId','6672gBbcWN','384uYFQAr','1489522RQLZIV','446601bIWSFi','6136060QgWAbc','read','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode'];a56_0x3cc4=function(){return _0x5eb57c;};return a56_0x3cc4();}import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a56_0x343675(0xaa),'command':a56_0x343675(0xad),'description':a56_0x343675(0xa6),'risk':a56_0x343675(0xa5),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x31d494){const _0x24a494=a56_0x343675,_0x50f165=await getSqlQueryInfo(_0x31d494[_0x24a494(0xb0)],_0x31d494[_0x24a494(0xb3)]('sqlcode')),_0x41bcc3=_0x31d494[_0x24a494(0xaf)](_0x24a494(0xb1));if(_0x41bcc3)return{'ok':!![],'data':_0x50f165};const _0x41c751=_0x50f165['dbId']?await getDbName(_0x31d494[_0x24a494(0xb0)],_0x50f165[_0x24a494(0xb4)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x50f165['sqlCode'],'sqlName':_0x50f165[_0x24a494(0xb2)],'db':_0x41c751?_0x41c751+'\x20('+_0x50f165[_0x24a494(0xb4)]+')':_0x50f165[_0x24a494(0xb4)]??'','description':_0x50f165['description']??'','sqlContent':_0x50f165['sqlContent']??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a57_0xcdbbfa=a57_0x302a;(function(_0x452166,_0x3c191d){const _0x47f6ab=a57_0x302a,_0x3ed228=_0x452166();while(!![]){try{const _0x58f474=-parseInt(_0x47f6ab(0xd7))/0x1+parseInt(_0x47f6ab(0xd5))/0x2+parseInt(_0x47f6ab(0xcf))/0x3*(-parseInt(_0x47f6ab(0xc3))/0x4)+parseInt(_0x47f6ab(0xcb))/0x5*(-parseInt(_0x47f6ab(0xd0))/0x6)+parseInt(_0x47f6ab(0xd8))/0x7+parseInt(_0x47f6ab(0xcd))/0x8*(-parseInt(_0x47f6ab(0xc2))/0x9)+parseInt(_0x47f6ab(0xc8))/0xa*(parseInt(_0x47f6ab(0xc1))/0xb);if(_0x58f474===_0x3c191d)break;else _0x3ed228['push'](_0x3ed228['shift']());}catch(_0x14abf3){_0x3ed228['push'](_0x3ed228['shift']());}}}(a57_0x7517,0x4cdce));function a57_0x7517(){const _0x58b8a5=['1159048loEwyh','now','42501UDwImp','298218NKelHL','execSuccess','read','Returned\x20','execError','1117044zoOOIv','exec','366703wufNXP','902153mbMrDd','\x20row(s)\x20in\x20','552255zUZbjb','27acjBbd','164vBSiTs','params','str','SQL\x20execution\x20failed','sql','310SioKWb','length','isArray','55RcCMZu','execResult'];a57_0x7517=function(){return _0x58b8a5;};return a57_0x7517();}import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';function a57_0x302a(_0x244738,_0x15788c){_0x244738=_0x244738-0xc0;const _0x75173=a57_0x7517();let _0x302aec=_0x75173[_0x244738];return _0x302aec;}export const sqlExec={'service':a57_0xcdbbfa(0xc7),'command':a57_0xcdbbfa(0xd6),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a57_0xcdbbfa(0xd2),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x4629e8){const _0xe1ec37=a57_0xcdbbfa,_0x1afca3=parseJsonParams(_0x4629e8['str'](_0xe1ec37(0xc4))),_0x58e910=Date[_0xe1ec37(0xce)](),_0x417609=await executeSdkSql(_0x4629e8[_0xe1ec37(0xc5)]('sqlcode'),_0x1afca3),_0x54e87f=Date['now']()-_0x58e910,_0x20409f=_0x417609?.[_0xe1ec37(0xcc)]??_0x417609,_0x3633f5=_0x417609?.[_0xe1ec37(0xd1)]??!![];if(!_0x3633f5)return{'ok':![],'data':{'error':_0x417609?.[_0xe1ec37(0xd4)]||_0xe1ec37(0xc6),'elapsed':_0x54e87f},'message':_0xe1ec37(0xc6)};const _0x39820c=Array[_0xe1ec37(0xca)](_0x20409f)?_0x20409f:[];return{'ok':!![],'data':{'rows':_0x39820c,'rowCount':_0x39820c[_0xe1ec37(0xc9)],'elapsed':_0x54e87f},'message':_0xe1ec37(0xd3)+_0x39820c['length']+_0xe1ec37(0xc0)+_0x54e87f+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a58_0x4248(){const _0x470efe=['559578ZBQIkh','279wwXpNT','1808358aAvahh','1489995YmksVB','1280EpKcpx','4077LncwVa','18150VeBFYI','328727irmgMI','7vQkAbi','622912gYBMyi'];a58_0x4248=function(){return _0x470efe;};return a58_0x4248();}(function(_0x3ac797,_0x2d2e4a){const _0x10baae=a58_0x4dd5,_0x18ac59=_0x3ac797();while(!![]){try{const _0x46a435=-parseInt(_0x10baae(0x128))/0x1+parseInt(_0x10baae(0x121))/0x2+-parseInt(_0x10baae(0x122))/0x3*(-parseInt(_0x10baae(0x125))/0x4)+-parseInt(_0x10baae(0x124))/0x5+-parseInt(_0x10baae(0x123))/0x6+parseInt(_0x10baae(0x129))/0x7*(parseInt(_0x10baae(0x120))/0x8)+-parseInt(_0x10baae(0x126))/0x9*(-parseInt(_0x10baae(0x127))/0xa);if(_0x46a435===_0x2d2e4a)break;else _0x18ac59['push'](_0x18ac59['shift']());}catch(_0x203901){_0x18ac59['push'](_0x18ac59['shift']());}}}(a58_0x4248,0x44b91));function a58_0x4dd5(_0xce3fd1,_0x4f8ff2){_0xce3fd1=_0xce3fd1-0x120;const _0x424824=a58_0x4248();let _0x4dd537=_0x424824[_0xce3fd1];return _0x4dd537;}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 a59_0x9d1f70=a59_0x4628;(function(_0x37d7f7,_0x266c30){const _0x282adc=a59_0x4628,_0x5af306=_0x37d7f7();while(!![]){try{const _0x11bd0c=-parseInt(_0x282adc(0x21c))/0x1*(-parseInt(_0x282adc(0x1ee))/0x2)+-parseInt(_0x282adc(0x1e6))/0x3*(-parseInt(_0x282adc(0x1d9))/0x4)+-parseInt(_0x282adc(0x1e7))/0x5+-parseInt(_0x282adc(0x1fe))/0x6*(-parseInt(_0x282adc(0x20b))/0x7)+parseInt(_0x282adc(0x201))/0x8+parseInt(_0x282adc(0x210))/0x9+-parseInt(_0x282adc(0x21a))/0xa;if(_0x11bd0c===_0x266c30)break;else _0x5af306['push'](_0x5af306['shift']());}catch(_0x4b7e57){_0x5af306['push'](_0x5af306['shift']());}}}(a59_0x41b2,0x4ac7d));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';function a59_0x4628(_0x39b69f,_0x964ae1){_0x39b69f=_0x39b69f-0x1cf;const _0x41b200=a59_0x41b2();let _0x462860=_0x41b200[_0x39b69f];return _0x462860;}const updateFlags=[{'name':a59_0x9d1f70(0x205),'type':'boolean','description':a59_0x9d1f70(0x1e0),'default':![]},{'name':a59_0x9d1f70(0x204),'type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a59_0x9d1f70(0x1db),'type':a59_0x9d1f70(0x1e4),'description':a59_0x9d1f70(0x216)},{'name':a59_0x9d1f70(0x1ea),'type':a59_0x9d1f70(0x20c),'description':a59_0x9d1f70(0x21b),'default':![]},{'name':'skills','type':a59_0x9d1f70(0x20c),'description':a59_0x9d1f70(0x1d0),'default':!![],'hidden':!![]}];function parseSemver(_0x204a91){const _0x4c8635=a59_0x9d1f70,_0x4d66f2=_0x204a91[_0x4c8635(0x1d1)]()[_0x4c8635(0x1e9)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x4d66f2)return null;return{'major':Number(_0x4d66f2[0x1]),'minor':Number(_0x4d66f2[0x2]),'patch':Number(_0x4d66f2[0x3]),'prerelease':_0x4d66f2[0x4]};}function compareSemver(_0x4173a2,_0x3eac24){const _0xce4035=a59_0x9d1f70,_0x2f6385=parseSemver(_0x4173a2),_0xfe7ac1=parseSemver(_0x3eac24);if(!_0x2f6385||!_0xfe7ac1)throw CliErrors[_0xce4035(0x1df)](_0xce4035(0x1d2),'Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');for(const _0x2d663c of[_0xce4035(0x1f2),_0xce4035(0x203),_0xce4035(0x208)]){if(_0x2f6385[_0x2d663c]<_0xfe7ac1[_0x2d663c])return-0x1;if(_0x2f6385[_0x2d663c]>_0xfe7ac1[_0x2d663c])return 0x1;}if(!_0x2f6385[_0xce4035(0x1f0)]&&!_0xfe7ac1[_0xce4035(0x1f0)])return 0x0;if(!_0x2f6385[_0xce4035(0x1f0)])return 0x1;if(!_0xfe7ac1['prerelease'])return-0x1;if(_0x2f6385['prerelease']===_0xfe7ac1[_0xce4035(0x1f0)])return 0x0;return _0x2f6385['prerelease']<_0xfe7ac1[_0xce4035(0x1f0)]?-0x1:0x1;}function getRequestedVersion(_0x4d0128){const _0xb12b35=a59_0x9d1f70,_0x5485e0=_0x4d0128[_0xb12b35(0x1fc)](_0xb12b35(0x1db))[_0xb12b35(0x1d1)]();if(_0x5485e0)return _0x5485e0;return String(_0x4d0128['args']?.[0x0]??'')[_0xb12b35(0x1d1)]();}function shouldSkipCliBuiltInSkill(_0x15522c){const _0x286b51=a59_0x9d1f70;return _0x15522c['bool']('no-skills')||_0x15522c[_0x286b51(0x1d8)](_0x286b51(0x1e5))===![];}async function validateUpdateFlags(_0xe21c1){const _0x1350de=a59_0x9d1f70,_0x3e356a=getRequestedVersion(_0xe21c1),_0x534bb6=[_0xe21c1[_0x1350de(0x215)](_0x1350de(0x205))?'latest':'',_0xe21c1[_0x1350de(0x215)](_0x1350de(0x204))?_0x1350de(0x204):'',_0x3e356a?_0x1350de(0x1db):'']['filter'](Boolean);if(_0x534bb6[_0x1350de(0x1f4)]>0x1)throw CliErrors[_0x1350de(0x1df)](_0x1350de(0x20f),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x3e356a&&!parseSemver(_0x3e356a))throw CliErrors[_0x1350de(0x1df)](_0x1350de(0x212)+_0x3e356a,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x524855=a59_0x9d1f70;try{const _0x4c514e=NPM_REGISTRY_BASE_URL+_0x524855(0x20a)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x524855(0x1f6),_0xaf7587=await fetch(_0x4c514e,{'signal':AbortSignal['timeout'](0x2710)});if(!_0xaf7587['ok'])return null;const _0xfd7a9c=await _0xaf7587['json']();if(!_0xfd7a9c||typeof _0xfd7a9c!=='object')return null;return Object[_0x524855(0x1f5)](Object[_0x524855(0x1d4)](_0xfd7a9c)[_0x524855(0x1e8)](([,_0x115e4b])=>typeof _0x115e4b===_0x524855(0x1e4)&&_0x115e4b[_0x524855(0x1d1)]())[_0x524855(0x1e3)](([_0x30bd1f,_0x4ac279])=>[_0x30bd1f,String(_0x4ac279)[_0x524855(0x1d1)]()]));}catch{return null;}}async function resolveTargetVersion(_0x297f9e){const _0x34fdf3=a59_0x9d1f70,_0x359698=getRequestedVersion(_0x297f9e);if(_0x359698)return{'version':_0x359698,'source':_0x34fdf3(0x1db)};const _0x1e83f3=_0x297f9e['bool'](_0x34fdf3(0x204))?_0x34fdf3(0x204):_0x34fdf3(0x205),_0x136682=await fetchNpmDistTags(),_0x368257=_0x136682?.[_0x1e83f3];if(!_0x368257)return null;return{'version':_0x368257,'source':_0x1e83f3};}function shouldInstallTarget(_0x515c73,_0x50f2d4){const _0x7b9d88=a59_0x9d1f70,_0x5d2f9b=compareSemver(_0x515c73,_0x50f2d4[_0x7b9d88(0x1db)]);if(_0x50f2d4[_0x7b9d88(0x1f1)]===_0x7b9d88(0x1db))return _0x5d2f9b!==0x0;return _0x5d2f9b<0x0;}function installCliPackage(_0x416833,_0x529bcb){const _0x317e73=a59_0x9d1f70,_0x32bf06=resolveNpmBin(_0x317e73(0x1e2)),_0x3f5d5e=[_0x317e73(0x211),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x416833];console[_0x317e73(0x200)]('*\x20'+[_0x32bf06,..._0x3f5d5e][_0x317e73(0x1ef)]('\x20'));const _0x4bb6a9=spawnSync(_0x32bf06,_0x3f5d5e,{'cwd':process['cwd'](),'stdio':_0x529bcb?_0x317e73(0x1d7):_0x317e73(0x218),'env':process.env,'shell':![]});if(_0x4bb6a9[_0x317e73(0x1cf)]===0x0)return{'ok':!![]};let _0x3614a2=_0x4bb6a9[_0x317e73(0x1fa)]?.[_0x317e73(0x1fd)]||_0x317e73(0x209)+(_0x4bb6a9[_0x317e73(0x1cf)]??_0x317e73(0x1da));if(_0x529bcb){const _0x297bc4=_0x4bb6a9[_0x317e73(0x20e)]?_0x4bb6a9[_0x317e73(0x20e)][_0x317e73(0x1d6)]()[_0x317e73(0x1d1)]():'',_0x167fb5=_0x4bb6a9[_0x317e73(0x207)]?_0x4bb6a9[_0x317e73(0x207)][_0x317e73(0x1d6)]()['trim']():'';if(_0x297bc4)_0x3614a2=_0x297bc4;else{if(_0x167fb5)_0x3614a2=_0x167fb5;}}return{'ok':![],'error':_0x3614a2};}async function installCliBuiltInSkill(_0x102cea){const _0x111a7d=a59_0x9d1f70;console[_0x111a7d(0x200)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x29df0e=runNpxSkillsAddGlobal(process[_0x111a7d(0x1f3)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x102cea?_0x111a7d(0x1d7):_0x111a7d(0x218)});if(_0x29df0e[_0x111a7d(0x1eb)]){console[_0x111a7d(0x200)](_0x111a7d(0x202)+LOVRABET_SKIP_NPX_SKILLS_ENV+'=1).');return;}if(_0x29df0e['ok']){console[_0x111a7d(0x200)](_0x111a7d(0x1e1));return;}console[_0x111a7d(0x1f9)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x29df0e['error']||_0x111a7d(0x1da))),console[_0x111a7d(0x200)](_0x111a7d(0x213));}async function execute(_0x32acde){const _0x5be3ee=a59_0x9d1f70;await validateUpdateFlags(_0x32acde);const _0x206773=getCliVersion();console['log']('Current\x20version:\x20'+_0x206773),console['log']('Checking\x20npm\x20dist-tags...');const _0x10c1e7=await resolveTargetVersion(_0x32acde);if(!_0x10c1e7){const _0x21f86f=_0x32acde['bool'](_0x5be3ee(0x204))?_0x5be3ee(0x204):_0x5be3ee(0x205),_0x4436af=_0x5be3ee(0x1dc)+_0x21f86f+_0x5be3ee(0x1dd);return console[_0x5be3ee(0x1f9)](_0x4436af),console['log']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x21f86f),{'ok':![]};}if(!shouldInstallTarget(_0x206773,_0x10c1e7)){const _0x28806c=_0x10c1e7['source']===_0x5be3ee(0x1db)?_0x5be3ee(0x1f8)+_0x10c1e7[_0x5be3ee(0x1db)]+').':_0x5be3ee(0x1d5)+_0x10c1e7[_0x5be3ee(0x1db)]+').';return console[_0x5be3ee(0x200)](_0x28806c),shouldSkipCliBuiltInSkill(_0x32acde)?console[_0x5be3ee(0x200)](_0x5be3ee(0x1ec)):await installCliBuiltInSkill(_0x32acde['nonInteractive']),{'ok':!![]};}console[_0x5be3ee(0x200)](_0x5be3ee(0x1ff)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x206773+_0x5be3ee(0x1d3)+_0x10c1e7['version']);const _0x2efd14=installCliPackage(_0x10c1e7['version'],_0x32acde[_0x5be3ee(0x214)]);if(!_0x2efd14['ok']){const _0x41d22f=_0x5be3ee(0x1ed)+(_0x2efd14[_0x5be3ee(0x1fa)]||'unknown');return console[_0x5be3ee(0x1fa)](_0x41d22f),console[_0x5be3ee(0x200)](_0x5be3ee(0x219)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x10c1e7[_0x5be3ee(0x1db)]),{'ok':![]};}return console[_0x5be3ee(0x200)](_0x5be3ee(0x1f7)+_0x10c1e7[_0x5be3ee(0x1db)]+'.'),console[_0x5be3ee(0x200)](_0x5be3ee(0x1fb)),shouldSkipCliBuiltInSkill(_0x32acde)?console[_0x5be3ee(0x200)](_0x5be3ee(0x1ec)):await installCliBuiltInSkill(_0x32acde[_0x5be3ee(0x214)]),{'ok':!![]};}function a59_0x41b2(){const _0x16b93c=['match','no-skills','skipped','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Update\x20failed:\x20','2acKIpJ','join','prerelease','source','major','cwd','length','fromEntries','/dist-tags','Updated\x20to\x20v','Already\x20on\x20requested\x20version\x20(v','warn','error','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','str','message','6BHbfZY','Updating\x20','log','2278456ovayug','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','minor','beta','latest','update','stdout','patch','exit\x20','/-/package/','2275196ngPTfK','boolean','Update\x20','stderr','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','5071212YzKpwA','install','Invalid\x20version:\x20','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','nonInteractive','bool','Install\x20a\x20specific\x20CLI\x20version','write','inherit','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','12957380xKXfBu','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','408214enqBih','status','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','trim','Version\x20comparison\x20failed.','\x20->\x20','entries','Already\x20up\x20to\x20date\x20(v','toString','pipe','flag','160148QWBCwT','unknown','version','Unable\x20to\x20resolve\x20','\x20version\x20from\x20npm.','run','validation','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','npm','map','string','skills','18enCYNY','1098500NsZtgY','filter'];a59_0x41b2=function(){return _0x16b93c;};return a59_0x41b2();}export const updateDefinition={'service':a59_0x9d1f70(0x206),'command':a59_0x9d1f70(0x1de),'description':a59_0x9d1f70(0x20d)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a59_0x9d1f70(0x217),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
function a59_0x5d52(_0x2271ab,_0x535a57){_0x2271ab=_0x2271ab-0xda;const _0x3f1e35=a59_0x3f1e();let _0x5d52f6=_0x3f1e35[_0x2271ab];return _0x5d52f6;}const a59_0x5d5de1=a59_0x5d52;(function(_0x3e1d3c,_0x586ea6){const _0x482287=a59_0x5d52,_0x4de6a3=_0x3e1d3c();while(!![]){try{const _0x26e70a=parseInt(_0x482287(0xf2))/0x1+-parseInt(_0x482287(0x110))/0x2*(parseInt(_0x482287(0xfc))/0x3)+parseInt(_0x482287(0xf5))/0x4+parseInt(_0x482287(0xe2))/0x5+-parseInt(_0x482287(0x119))/0x6+-parseInt(_0x482287(0xed))/0x7+parseInt(_0x482287(0xe1))/0x8;if(_0x26e70a===_0x586ea6)break;else _0x4de6a3['push'](_0x4de6a3['shift']());}catch(_0x3a3bc9){_0x4de6a3['push'](_0x4de6a3['shift']());}}}(a59_0x3f1e,0x4ab3b));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':a59_0x5d5de1(0x111),'type':a59_0x5d5de1(0xe8),'description':'Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','default':![]},{'name':a59_0x5d5de1(0x112),'type':a59_0x5d5de1(0xe8),'description':a59_0x5d5de1(0x122),'default':![]},{'name':a59_0x5d5de1(0x121),'type':a59_0x5d5de1(0x108),'description':a59_0x5d5de1(0xde)},{'name':'no-skills','type':'boolean','description':a59_0x5d5de1(0xf0),'default':![]},{'name':a59_0x5d5de1(0x104),'type':a59_0x5d5de1(0xe8),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function parseSemver(_0x5aa489){const _0x1e6783=a59_0x5d5de1,_0xf9746d=_0x5aa489['trim']()[_0x1e6783(0xfa)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0xf9746d)return null;return{'major':Number(_0xf9746d[0x1]),'minor':Number(_0xf9746d[0x2]),'patch':Number(_0xf9746d[0x3]),'prerelease':_0xf9746d[0x4]};}function compareSemver(_0xc8885f,_0x3702f7){const _0xc9de9b=a59_0x5d5de1,_0xec7136=parseSemver(_0xc8885f),_0x2ef25b=parseSemver(_0x3702f7);if(!_0xec7136||!_0x2ef25b)throw CliErrors[_0xc9de9b(0xe7)](_0xc9de9b(0xe5),_0xc9de9b(0x116));for(const _0xe4e83e of[_0xc9de9b(0xe6),_0xc9de9b(0xf7),'patch']){if(_0xec7136[_0xe4e83e]<_0x2ef25b[_0xe4e83e])return-0x1;if(_0xec7136[_0xe4e83e]>_0x2ef25b[_0xe4e83e])return 0x1;}if(!_0xec7136[_0xc9de9b(0x117)]&&!_0x2ef25b[_0xc9de9b(0x117)])return 0x0;if(!_0xec7136[_0xc9de9b(0x117)])return 0x1;if(!_0x2ef25b['prerelease'])return-0x1;if(_0xec7136[_0xc9de9b(0x117)]===_0x2ef25b['prerelease'])return 0x0;return _0xec7136[_0xc9de9b(0x117)]<_0x2ef25b['prerelease']?-0x1:0x1;}function getRequestedVersion(_0x534e5b){const _0x5961d2=a59_0x5d5de1,_0x3ac9fa=_0x534e5b[_0x5961d2(0x109)](_0x5961d2(0x121))[_0x5961d2(0xda)]();if(_0x3ac9fa)return _0x3ac9fa;return String(_0x534e5b['args']?.[0x0]??'')[_0x5961d2(0xda)]();}function shouldSkipCliBuiltInSkill(_0x23fee9){const _0x3654f1=a59_0x5d5de1;return _0x23fee9[_0x3654f1(0x105)]('no-skills')||_0x23fee9[_0x3654f1(0xeb)](_0x3654f1(0x104))===![];}async function validateUpdateFlags(_0x5698f4){const _0x7436a3=a59_0x5d5de1,_0x528821=getRequestedVersion(_0x5698f4),_0x95ea86=[_0x5698f4['bool']('latest')?'latest':'',_0x5698f4[_0x7436a3(0x105)]('beta')?'beta':'',_0x528821?_0x7436a3(0x121):'']['filter'](Boolean);if(_0x95ea86[_0x7436a3(0xfb)]>0x1)throw CliErrors[_0x7436a3(0xe7)](_0x7436a3(0x11a),_0x7436a3(0xe9));if(_0x528821&&!parseSemver(_0x528821))throw CliErrors[_0x7436a3(0xe7)](_0x7436a3(0xf3)+_0x528821,_0x7436a3(0x126));}async function fetchNpmDistTags(){const _0x58d612=a59_0x5d5de1;try{const _0x165371=NPM_REGISTRY_BASE_URL+_0x58d612(0xee)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x58d612(0xea),_0xe3205d=await fetch(_0x165371,{'signal':AbortSignal['timeout'](0x2710)});if(!_0xe3205d['ok'])return null;const _0x57882b=await _0xe3205d[_0x58d612(0x100)]();if(!_0x57882b||typeof _0x57882b!==_0x58d612(0xdd))return null;return Object['fromEntries'](Object[_0x58d612(0x102)](_0x57882b)[_0x58d612(0x103)](([,_0x120bb6])=>typeof _0x120bb6==='string'&&_0x120bb6[_0x58d612(0xda)]())[_0x58d612(0xe3)](([_0x118461,_0x14ef2d])=>[_0x118461,String(_0x14ef2d)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0x4fa696){const _0xe2dfa7=a59_0x5d5de1,_0x3265=getRequestedVersion(_0x4fa696);if(_0x3265)return{'version':_0x3265,'source':_0xe2dfa7(0x121)};const _0x2d8d9f=_0x4fa696[_0xe2dfa7(0x105)]('beta')?'beta':_0xe2dfa7(0x111),_0x5aa128=await fetchNpmDistTags(),_0x1fede1=_0x5aa128?.[_0x2d8d9f];if(!_0x1fede1)return null;return{'version':_0x1fede1,'source':_0x2d8d9f};}function shouldInstallTarget(_0x3bc046,_0x8c78ef){const _0x1390ea=a59_0x5d5de1,_0x201da6=compareSemver(_0x3bc046,_0x8c78ef[_0x1390ea(0x121)]);if(_0x8c78ef[_0x1390ea(0x118)]==='version')return _0x201da6!==0x0;return _0x201da6<0x0;}function installCliPackage(_0x40ce33,_0x4f642d){const _0x5bf890=a59_0x5d5de1,_0x236631=resolveNpmBin(_0x5bf890(0x106)),_0x59fcaa=[_0x5bf890(0xfe),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x40ce33];console[_0x5bf890(0x11c)]('*\x20'+[_0x236631,..._0x59fcaa][_0x5bf890(0x115)]('\x20'));const _0xe09f8=spawnSync(_0x236631,_0x59fcaa,{'cwd':process[_0x5bf890(0x124)](),'stdio':_0x4f642d?'pipe':_0x5bf890(0x10b),'env':process.env,'shell':![]});if(_0xe09f8[_0x5bf890(0x120)]===0x0)return{'ok':!![]};let _0xc736bd=_0xe09f8[_0x5bf890(0x123)]?.[_0x5bf890(0xef)]||_0x5bf890(0x113)+(_0xe09f8[_0x5bf890(0x120)]??'unknown');if(_0x4f642d){const _0x1036b9=_0xe09f8[_0x5bf890(0x125)]?_0xe09f8[_0x5bf890(0x125)]['toString']()['trim']():'',_0x11a287=_0xe09f8[_0x5bf890(0x107)]?_0xe09f8[_0x5bf890(0x107)][_0x5bf890(0x10f)]()['trim']():'';if(_0x1036b9)_0xc736bd=_0x1036b9;else{if(_0x11a287)_0xc736bd=_0x11a287;}}return{'ok':![],'error':_0xc736bd};}function a59_0x3f1e(){const _0xfeff=['exit\x20','warn','join','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','prerelease','source','805998CNGEJI','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','\x20version\x20from\x20npm.','log','Update\x20failed:\x20','Update\x20','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','status','version','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','error','cwd','stderr','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','trim','=1).','\x20->\x20','object','Install\x20a\x20specific\x20CLI\x20version','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','update','3462648sHgcqg','1756690WUHvCv','map','nonInteractive','Version\x20comparison\x20failed.','major','validation','boolean','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','/dist-tags','flag','Unable\x20to\x20resolve\x20','4195828YbbwXZ','/-/package/','message','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','skipped','542766vmqwkL','Invalid\x20version:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','438524wDoseC','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','minor','pipe','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','match','length','6qMmvxt','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','install','write','json','Already\x20up\x20to\x20date\x20(v','entries','filter','skills','bool','npm','stdout','string','str','Current\x20version:\x20','inherit','Updated\x20to\x20v','Checking\x20CLI\x20Built-in\x20Skill...','Checking\x20npm\x20dist-tags...','toString','396850ViCFEk','latest','beta'];a59_0x3f1e=function(){return _0xfeff;};return a59_0x3f1e();}async function installCliBuiltInSkill(_0x245739){const _0x1e573c=a59_0x5d5de1;console[_0x1e573c(0x11c)](_0x1e573c(0x10d));const _0x67b5ed=runNpxSkillsAddGlobal(process['cwd'](),LOVRABET_SKILL_SOURCE,{'stdio':_0x245739?_0x1e573c(0xf8):_0x1e573c(0x10b)});if(_0x67b5ed[_0x1e573c(0xf1)]){console[_0x1e573c(0x11c)](_0x1e573c(0x11f)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x1e573c(0xdb));return;}if(_0x67b5ed['ok']){console[_0x1e573c(0x11c)]('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.');return;}console[_0x1e573c(0x114)](_0x1e573c(0xf6)+(_0x67b5ed[_0x1e573c(0x123)]||'unknown')),console[_0x1e573c(0x11c)](_0x1e573c(0xdf));}async function execute(_0x1fd4eb){const _0x58c1cc=a59_0x5d5de1;await validateUpdateFlags(_0x1fd4eb);const _0x25a11e=getCliVersion();console[_0x58c1cc(0x11c)](_0x58c1cc(0x10a)+_0x25a11e),console[_0x58c1cc(0x11c)](_0x58c1cc(0x10e));const _0x3178b3=await resolveTargetVersion(_0x1fd4eb);if(!_0x3178b3){const _0x319669=_0x1fd4eb[_0x58c1cc(0x105)](_0x58c1cc(0x112))?'beta':'latest',_0x2bbe08=_0x58c1cc(0xec)+_0x319669+_0x58c1cc(0x11b);return console[_0x58c1cc(0x114)](_0x2bbe08),console[_0x58c1cc(0x11c)](_0x58c1cc(0xf4)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x319669),{'ok':![]};}if(!shouldInstallTarget(_0x25a11e,_0x3178b3)){const _0x39f4bd=_0x3178b3[_0x58c1cc(0x118)]===_0x58c1cc(0x121)?'Already\x20on\x20requested\x20version\x20(v'+_0x3178b3[_0x58c1cc(0x121)]+').':_0x58c1cc(0x101)+_0x3178b3[_0x58c1cc(0x121)]+').';return console[_0x58c1cc(0x11c)](_0x39f4bd),shouldSkipCliBuiltInSkill(_0x1fd4eb)?console['log'](_0x58c1cc(0xfd)):await installCliBuiltInSkill(_0x1fd4eb[_0x58c1cc(0xe4)]),{'ok':!![]};}console['log']('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x25a11e+_0x58c1cc(0xdc)+_0x3178b3[_0x58c1cc(0x121)]);const _0xf3e551=installCliPackage(_0x3178b3[_0x58c1cc(0x121)],_0x1fd4eb[_0x58c1cc(0xe4)]);if(!_0xf3e551['ok']){const _0x69e88c=_0x58c1cc(0x11d)+(_0xf3e551['error']||'unknown');return console[_0x58c1cc(0x123)](_0x69e88c),console[_0x58c1cc(0x11c)](_0x58c1cc(0xf9)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3178b3[_0x58c1cc(0x121)]),{'ok':![]};}return console[_0x58c1cc(0x11c)](_0x58c1cc(0x10c)+_0x3178b3[_0x58c1cc(0x121)]+'.'),console[_0x58c1cc(0x11c)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'),shouldSkipCliBuiltInSkill(_0x1fd4eb)?console[_0x58c1cc(0x11c)](_0x58c1cc(0xfd)):await installCliBuiltInSkill(_0x1fd4eb[_0x58c1cc(0xe4)]),{'ok':!![]};}export const updateDefinition={'service':a59_0x5d5de1(0xe0),'command':'run','description':a59_0x5d5de1(0x11e)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a59_0x5d5de1(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x483547=a60_0xf359;(function(_0x5861c6,_0x2b085d){const _0x3b151e=a60_0xf359,_0x234563=_0x5861c6();while(!![]){try{const _0x5c66c3=-parseInt(_0x3b151e(0xf0))/0x1*(parseInt(_0x3b151e(0x112))/0x2)+parseInt(_0x3b151e(0x102))/0x3*(parseInt(_0x3b151e(0x103))/0x4)+-parseInt(_0x3b151e(0xf9))/0x5+parseInt(_0x3b151e(0xfc))/0x6*(-parseInt(_0x3b151e(0x11c))/0x7)+-parseInt(_0x3b151e(0x104))/0x8+-parseInt(_0x3b151e(0x10b))/0x9+parseInt(_0x3b151e(0x114))/0xa;if(_0x5c66c3===_0x2b085d)break;else _0x234563['push'](_0x234563['shift']());}catch(_0x463b25){_0x234563['push'](_0x234563['shift']());}}}(a60_0x3df7,0x6e817));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';function a60_0x3df7(){const _0x2b6aab=['Usage:\x20','Target\x20environment','length','\x22.\x20Allowed:\x20','2190Bsltbb','Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','authRequired','apps','env','yes','string','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','Invalid\x20env\x20\x22','77350TTTepn','workspace\x20','\x0aDefault\x20app:\x20','66xkeWCm','workspace','join','items','appName','accessKey','525738UCsSGm','8Ttpvvw','1875320LfQuCW','project','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','appCode','includes','\x22\x20not\x20found.','map','644499cRKfHW','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','boolean','write','Missing\x20workspace\x20app\x20selector.','app','appcode','106roNhmB','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','6646540xAqIEO','from','App\x20code\x20to\x20bind\x20directly','filter','\x0aAccessKey:\x20not\x20written','init','envName','trim','79513BXzuyI','Set\x20app\x20context\x20for\x20the\x20current\x20workspace','str','validation','defaultApp','\x20workspace\x20','Run\x20`','shouldWriteEnv'];a60_0x3df7=function(){return _0x2b6aab;};return a60_0x3df7();}const WORKSPACE_USE_FLAGS=[{'name':a60_0x483547(0x110),'type':a60_0x483547(0xf6),'description':a60_0x483547(0x10c)},{'name':a60_0x483547(0x111),'type':a60_0x483547(0xf6),'description':a60_0x483547(0x116)},{'name':'env','type':a60_0x483547(0xf6),'description':a60_0x483547(0x125),'enum':[...RUNTIME_ENV_VALUES]},{'name':a60_0x483547(0xf5),'type':a60_0x483547(0x10d),'description':a60_0x483547(0xf1),'default':![]}];async function executeWorkspaceUse(_0x33736d,_0x568fd6){const _0x1fa69b=a60_0x483547,_0x101061=_0x33736d[_0x1fa69b(0x11e)](_0x1fa69b(0x110))[_0x1fa69b(0x11b)](),_0x26a6c1=_0x33736d['str'](_0x1fa69b(0x111))[_0x1fa69b(0x11b)](),_0x3285ec=_0x33736d[_0x1fa69b(0x11e)](_0x1fa69b(0xf4))[_0x1fa69b(0x11b)](),_0x1d00e7=resolveWorkspaceEnv(_0x3285ec||_0x33736d[_0x1fa69b(0x11a)]||DEFAULT_CONFIG_VALUES['env']);if(!_0x101061&&!_0x26a6c1)throw CliErrors['validation'](_0x1fa69b(0x10f),_0x1fa69b(0x124)+CLI_BIN_NAME+_0x1fa69b(0x121)+_0x568fd6+_0x1fa69b(0x113)+CLI_BIN_NAME+'\x20workspace\x20'+_0x568fd6+'\x20--appcode\x20<code>\x20[--env\x20daily]');const _0x1d4a89=_0x26a6c1||await resolveRemoteAppCode({'command':_0x568fd6,'appName':_0x101061,'env':_0x1d00e7,'accessKey':_0x33736d[_0x1fa69b(0x101)]}),_0x300e63=writeWorkspaceConfig({'command':_0x568fd6,'appName':_0x101061,'appcode':_0x1d4a89,'env':_0x1d00e7,'shouldWriteEnv':!!_0x3285ec,'accessKey':_0x33736d['accessKey']});return{'ok':!![],'data':{'configPath':_0x300e63,'app':_0x101061||null,'appcode':_0x1d4a89,'env':_0x3285ec?_0x1d00e7:null,'accessKeyWritten':![],'command':_0x1fa69b(0xfa)+_0x568fd6},'message':buildWorkspaceMessage(_0x300e63,_0x101061,_0x1d4a89,_0x3285ec?_0x1d00e7:undefined)};}async function resolveRemoteAppCode(_0x465c11){const _0x55c569=a60_0x483547;if(!_0x465c11[_0x55c569(0x101)])throw CliErrors[_0x55c569(0xf2)](_0x55c569(0x106)+CLI_BIN_NAME+_0x55c569(0x121)+_0x465c11['command']+'.');const {setActiveAK:_0x59e926}=await import('../../core/api-client.js'),{getRemoteAppList:_0xaee5cf}=await import('../../commands/app/remote-source.js');_0x59e926(_0x465c11[_0x55c569(0x101)]);const _0x4a0e37=await _0xaee5cf({'env':_0x465c11[_0x55c569(0xf4)],'accessKey':_0x465c11['accessKey'],'noCache':![]}),_0x57cb7d=findAppByName(_0x4a0e37[_0x55c569(0xff)],_0x465c11[_0x55c569(0x100)]);if(_0x57cb7d&&!isRuntimeAccessibleApp(_0x57cb7d))throw runtimeInaccessibleAppError(_0x57cb7d,'\x22'+_0x465c11[_0x55c569(0x100)]+'\x22');const _0x599958=_0x57cb7d?.[_0x55c569(0x107)]?.['trim']();if(_0x599958)return _0x599958;const _0x414721=_0x4a0e37[_0x55c569(0xff)][_0x55c569(0x10a)](_0x21ba1e=>_0x21ba1e[_0x55c569(0x100)])[_0x55c569(0x117)](Boolean),_0x582647=_0x414721[_0x55c569(0x126)]?'Available\x20apps:\x20'+Array[_0x55c569(0x115)](new Set(_0x414721))[_0x55c569(0xfe)](',\x20')+'.':_0x55c569(0x122)+CLI_BIN_NAME+_0x55c569(0xf7);throw CliErrors[_0x55c569(0x11f)]('App\x20\x22'+_0x465c11[_0x55c569(0x100)]+_0x55c569(0x109),_0x582647);}function writeWorkspaceConfig(_0x250b33){const _0x5c0b6d=a60_0x483547,_0x4724d8=resolveWriteConfigPath(_0x5c0b6d(0x105)),_0x1e6db6=readConfigFile(_0x4724d8);_0x250b33[_0x5c0b6d(0x123)]&&(_0x1e6db6['env']=_0x250b33['env']);if(_0x250b33[_0x5c0b6d(0x100)]){const _0x4f9007=isRecord(_0x1e6db6[_0x5c0b6d(0xf3)])?{..._0x1e6db6[_0x5c0b6d(0xf3)]}:{},_0x2b53e9=isRecord(_0x4f9007[_0x250b33[_0x5c0b6d(0x100)]])?_0x4f9007[_0x250b33[_0x5c0b6d(0x100)]]:{};_0x4f9007[_0x250b33[_0x5c0b6d(0x100)]]={..._0x2b53e9,'appcode':_0x250b33[_0x5c0b6d(0x111)]},_0x1e6db6[_0x5c0b6d(0xf3)]=_0x4f9007,_0x1e6db6[_0x5c0b6d(0x120)]=_0x250b33[_0x5c0b6d(0x100)];if(_0x1e6db6[_0x5c0b6d(0x110)])delete _0x1e6db6[_0x5c0b6d(0x110)];return writeAndReturn(_0x4724d8,_0x1e6db6);}_0x1e6db6[_0x5c0b6d(0x111)]=_0x250b33[_0x5c0b6d(0x111)];if(_0x1e6db6['app'])delete _0x1e6db6[_0x5c0b6d(0x110)];return writeAndReturn(_0x4724d8,_0x1e6db6);}function writeAndReturn(_0x38a1be,_0x3f9ab3){return writeConfigFile(_0x38a1be,_0x3f9ab3),_0x38a1be;}function resolveWorkspaceEnv(_0x3422cd){const _0x930849=a60_0x483547;if(RUNTIME_ENV_VALUES[_0x930849(0x108)](_0x3422cd))return _0x3422cd;throw CliErrors['validation'](_0x930849(0xf8)+_0x3422cd+_0x930849(0xef)+RUNTIME_ENV_VALUES[_0x930849(0xfe)](',\x20'));}function buildWorkspaceMessage(_0x18ad61,_0x24f6aa,_0x4c2f4f,_0x34355a){const _0x35317f=a60_0x483547,_0x5d9157=_0x24f6aa?_0x24f6aa+'\x20('+_0x4c2f4f+')':_0x4c2f4f,_0x37d96d=_0x34355a?'\x0aEnv:\x20'+_0x34355a:'';return'Workspace\x20configured.\x0aConfig\x20file:\x20'+_0x18ad61+_0x35317f(0xfb)+_0x5d9157+_0x37d96d+_0x35317f(0x118);}function isRecord(_0x1d891c){return typeof _0x1d891c==='object'&&_0x1d891c!==null&&!Array['isArray'](_0x1d891c);}function makeWorkspaceCommand(_0x2f3837){const _0x453f5d=a60_0x483547;return{'service':_0x453f5d(0xfd),'command':_0x2f3837,'description':_0x2f3837==='init'?'Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace':_0x453f5d(0x11d),'risk':_0x453f5d(0x10e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x34b036){return executeWorkspaceUse(_0x34b036,_0x2f3837);}};}function a60_0xf359(_0x1fe80f,_0x357f9d){_0x1fe80f=_0x1fe80f-0xef;const _0x3df7fe=a60_0x3df7();let _0xf35967=_0x3df7fe[_0x1fe80f];return _0xf35967;}export const workspaceDefinitions=[makeWorkspaceCommand(a60_0x483547(0x119)),makeWorkspaceCommand('use')];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a61_0x293585=a61_0x5f85;(function(_0x51dce6,_0x397571){const _0x343723=a61_0x5f85,_0x435cc9=_0x51dce6();while(!![]){try{const _0x327dfb=parseInt(_0x343723(0x1d7))/0x1+-parseInt(_0x343723(0x1d8))/0x2+parseInt(_0x343723(0x1bd))/0x3+parseInt(_0x343723(0x1d9))/0x4*(-parseInt(_0x343723(0x1d0))/0x5)+-parseInt(_0x343723(0x1cc))/0x6*(-parseInt(_0x343723(0x1ce))/0x7)+parseInt(_0x343723(0x1d5))/0x8*(parseInt(_0x343723(0x1cb))/0x9)+-parseInt(_0x343723(0x1c3))/0xa*(parseInt(_0x343723(0x1da))/0xb);if(_0x327dfb===_0x397571)break;else _0x435cc9['push'](_0x435cc9['shift']());}catch(_0x58040f){_0x435cc9['push'](_0x435cc9['shift']());}}}(a61_0x1a04,0x1afed));function a61_0x1a04(){const _0x4a42be=['riskLevel','436610fLFBWi','format','Access\x20key\x20(client-ak\x20auth)','locale','join','Override\x20user\x20domain','Target\x20environment','Override\x20API\x20domain','39681EhymeR','1159974whsHEf','importable','7bPRqDq','Config\x20key.\x20Top-level:\x20','40xNYVJj','Override\x20SkillHub\x20domain','env','Risk\x20level','enumValues','72IyEMKK','Default\x20output\x20format','119787JopqKx','106392qEqwwU','99976SjyQTc','22ligygF','294738gEgoyo','map','filter','Override\x20runtime\x20domain','entries'];a61_0x1a04=function(){return _0x4a42be;};return a61_0x1a04();}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':a61_0x293585(0x1c9),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x293585(0x1d2)],'importable':!![]},'format':{'description':a61_0x293585(0x1d6),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x293585(0x1c4)],'importable':!![]},'pageSize':{'description':'Default\x20page\x20size','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a61_0x293585(0x1ca),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a61_0x293585(0x1c8),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a61_0x293585(0x1c0),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a61_0x293585(0x1d1),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a61_0x293585(0x1c5),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a61_0x293585(0x1d3),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x293585(0x1c2)],'importable':!![]},'locale':{'description':'Locale','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a61_0x293585(0x1c6)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)[a61_0x293585(0x1bf)](([,_0x280088])=>_0x280088['cliSettableTopLevel'])[a61_0x293585(0x1be)](([_0x16a9a3])=>_0x16a9a3));function a61_0x5f85(_0x22323f,_0x370a81){_0x22323f=_0x22323f-0x1bd;const _0x1a044e=a61_0x1a04();let _0x5f858e=_0x1a044e[_0x22323f];return _0x5f858e;}export const CONFIG_ENUM_VALUES=Object['fromEntries'](Object[a61_0x293585(0x1c1)](CONFIG_FIELD_SCHEMAS)[a61_0x293585(0x1bf)](([,_0x4c80e0])=>_0x4c80e0[a61_0x293585(0x1d4)])['map'](([_0x259106,_0xb5daa3])=>[_0x259106,[..._0xb5daa3['enumValues']||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object['entries'](CONFIG_FIELD_SCHEMAS)[a61_0x293585(0x1bf)](([,_0x50ead9])=>_0x50ead9[a61_0x293585(0x1cd)])[a61_0x293585(0x1be)](([_0x589544])=>_0x589544);export function getConfigFieldSchema(_0x50bf20){return CONFIG_FIELD_SCHEMAS[_0x50bf20];}export function getConfigEnumValues(_0x1acee1){return getConfigFieldSchema(_0x1acee1)?.['enumValues'];}export function getConfigDefaultValue(_0x73bcfa){return getConfigFieldSchema(_0x73bcfa)?.['defaultValue'];}export function isTopLevelConfigKey(_0x33cb07){return TOP_LEVEL_CONFIG_KEYS['has'](_0x33cb07);}export function isLegacyCompatConfigKey(_0x523730){return getConfigFieldSchema(_0x523730)?.['legacyCompatOnly']===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0xe02380){const _0xed80f=a61_0x293585;return[..._0xe02380][_0xed80f(0x1c7)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x16ab7c=a61_0x293585;return _0x16ab7c(0x1cf)+getTopLevelConfigKeySummary()+';\x20local\x20alias:\x20apps.<alias>.appcode';}export function buildAppProfileListFields(_0x20b9fb){return{'env':_0x20b9fb,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x26be43=a62_0x3b08;function a62_0x3b08(_0x3a1d54,_0x5e3272){_0x3a1d54=_0x3a1d54-0x1af;const _0x54fd23=a62_0x54fd();let _0x3b0893=_0x54fd23[_0x3a1d54];return _0x3b0893;}(function(_0x4d4ddd,_0x2e793c){const _0x5c8471=a62_0x3b08,_0xba82db=_0x4d4ddd();while(!![]){try{const _0x57bbef=-parseInt(_0x5c8471(0x1b6))/0x1+parseInt(_0x5c8471(0x1b4))/0x2*(parseInt(_0x5c8471(0x1af))/0x3)+-parseInt(_0x5c8471(0x1b1))/0x4*(parseInt(_0x5c8471(0x1b0))/0x5)+-parseInt(_0x5c8471(0x1b5))/0x6*(parseInt(_0x5c8471(0x1b9))/0x7)+parseInt(_0x5c8471(0x1b2))/0x8+parseInt(_0x5c8471(0x1bb))/0x9*(-parseInt(_0x5c8471(0x1b8))/0xa)+-parseInt(_0x5c8471(0x1bc))/0xb;if(_0x57bbef===_0x2e793c)break;else _0xba82db['push'](_0xba82db['shift']());}catch(_0x3d02e7){_0xba82db['push'](_0xba82db['shift']());}}}(a62_0x54fd,0xa47e1));export const APP_PUBLISH_STATUS={'Published':a62_0x26be43(0x1ba),'Unpublished':a62_0x26be43(0x1b3)};function a62_0x54fd(){const _0x1d037c=['801765jnLByh','16775yJtgAR','132uidzlC','9887488bnDzII','UNPUBLISH','8vbCmHc','2002854uVNeye','423455biBwoW','Published','37130PUQaIc','14HHZcJj','PUBLISHED','225wFGJGA','3702402xCBbHH'];a62_0x54fd=function(){return _0x1d037c;};return a62_0x54fd();}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a62_0x26be43(0x1b7)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a63_0x37c7(_0x45ef87,_0x5bd5a6){_0x45ef87=_0x45ef87-0x12c;const _0x2d6d6b=a63_0x2d6d();let _0x37c7f5=_0x2d6d6b[_0x45ef87];return _0x37c7f5;}const a63_0x414bc1=a63_0x37c7;(function(_0x1077f4,_0x12c65e){const _0x42b2a0=a63_0x37c7,_0x5aec87=_0x1077f4();while(!![]){try{const _0x32c675=-parseInt(_0x42b2a0(0x132))/0x1+-parseInt(_0x42b2a0(0x134))/0x2*(parseInt(_0x42b2a0(0x131))/0x3)+parseInt(_0x42b2a0(0x12e))/0x4*(-parseInt(_0x42b2a0(0x136))/0x5)+parseInt(_0x42b2a0(0x138))/0x6+parseInt(_0x42b2a0(0x12c))/0x7+parseInt(_0x42b2a0(0x135))/0x8*(-parseInt(_0x42b2a0(0x12f))/0x9)+parseInt(_0x42b2a0(0x137))/0xa*(parseInt(_0x42b2a0(0x130))/0xb);if(_0x32c675===_0x12c65e)break;else _0x5aec87['push'](_0x5aec87['shift']());}catch(_0x2c5d78){_0x5aec87['push'](_0x5aec87['shift']());}}}(a63_0x2d6d,0x2e63b));export const AUTH_MODE={'ClientAk':a63_0x414bc1(0x12d)};function a63_0x2d6d(){const _0x30b650=['57958cqYahv','ClientAk','14TiJhup','818568wUSbgW','1582505TpvTif','50CBGflW','2096886jDrWBB','171262cUquQt','client-ak','4fLbmqD','9XqaxcV','788755ZJNXIR','28149PAFJvf'];a63_0x2d6d=function(){return _0x30b650;};return a63_0x2d6d();}export function isAuthMode(_0x5d55ee){const _0x23f17f=a63_0x414bc1;return _0x5d55ee===AUTH_MODE[_0x23f17f(0x133)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a64_0x7a9932=a64_0x166a;(function(_0x12d67f,_0x3173da){const _0x374e41=a64_0x166a,_0x23d528=_0x12d67f();while(!![]){try{const _0x130327=parseInt(_0x374e41(0x105))/0x1+-parseInt(_0x374e41(0x122))/0x2*(parseInt(_0x374e41(0x10f))/0x3)+parseInt(_0x374e41(0x133))/0x4+parseInt(_0x374e41(0x12f))/0x5*(parseInt(_0x374e41(0xfe))/0x6)+-parseInt(_0x374e41(0x12a))/0x7*(parseInt(_0x374e41(0x10b))/0x8)+parseInt(_0x374e41(0x132))/0x9+-parseInt(_0x374e41(0x12c))/0xa*(parseInt(_0x374e41(0x124))/0xb);if(_0x130327===_0x3173da)break;else _0x23d528['push'](_0x23d528['shift']());}catch(_0x38f17a){_0x23d528['push'](_0x23d528['shift']());}}}(a64_0x499f,0xb6139));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';function a64_0x166a(_0x5ecb5e,_0x5ac98c){_0x5ecb5e=_0x5ecb5e-0xfe;const _0x499f26=a64_0x499f();let _0x166adf=_0x499f26[_0x5ecb5e];return _0x166adf;}export const CLI_BIN_NAME=PRODUCT_CONFIG[a64_0x7a9932(0x119)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a64_0x7a9932(0x11c)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a64_0x7a9932(0x106),'meowKey':a64_0x7a9932(0x106),'type':'string','description':a64_0x7a9932(0x114),'hint':a64_0x7a9932(0x10a)},{'name':a64_0x7a9932(0x130),'meowKey':a64_0x7a9932(0x130),'type':'string','description':a64_0x7a9932(0x104),'hint':a64_0x7a9932(0x11e)},{'name':a64_0x7a9932(0x123),'meowKey':a64_0x7a9932(0x123),'type':a64_0x7a9932(0x12b),'description':a64_0x7a9932(0x120),'hint':a64_0x7a9932(0x100)},{'name':a64_0x7a9932(0x113),'meowKey':a64_0x7a9932(0x113),'type':'string','description':a64_0x7a9932(0x125),'hint':a64_0x7a9932(0x109)},{'name':'jq','meowKey':'jq','type':a64_0x7a9932(0x12b),'description':a64_0x7a9932(0x12e),'hint':a64_0x7a9932(0x112)},{'name':a64_0x7a9932(0x118),'meowKey':a64_0x7a9932(0x126),'type':a64_0x7a9932(0x101),'description':a64_0x7a9932(0x11b)},{'name':a64_0x7a9932(0x128),'meowKey':'yes','type':a64_0x7a9932(0x101),'description':a64_0x7a9932(0x102)},{'name':'non-interactive','meowKey':a64_0x7a9932(0x10e),'type':'boolean','description':a64_0x7a9932(0x11a)},{'name':a64_0x7a9932(0x12d),'meowKey':a64_0x7a9932(0x12d),'type':a64_0x7a9932(0x101),'description':a64_0x7a9932(0x11f)},{'name':'ci','meowKey':'ci','type':a64_0x7a9932(0x101),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a64_0x7a9932(0x11d),'meowKey':'help','type':a64_0x7a9932(0x101),'description':a64_0x7a9932(0x108)},{'name':'id','meowKey':'id','type':'string','description':a64_0x7a9932(0x117),'hidden':!![]},{'name':a64_0x7a9932(0x110),'meowKey':a64_0x7a9932(0x110),'type':'string','description':a64_0x7a9932(0x10d),'hidden':!![]},{'name':'sqlcode','meowKey':'sqlcode','type':a64_0x7a9932(0x12b),'description':'SQL\x20query\x20code','hidden':!![]},{'name':'params','meowKey':a64_0x7a9932(0x103),'type':a64_0x7a9932(0x12b),'description':a64_0x7a9932(0x107),'hidden':!![]},{'name':a64_0x7a9932(0xff),'meowKey':a64_0x7a9932(0xff),'type':a64_0x7a9932(0x101),'description':a64_0x7a9932(0x127),'hidden':!![]},{'name':'clear','meowKey':a64_0x7a9932(0x10c),'type':a64_0x7a9932(0x101),'description':a64_0x7a9932(0x116),'hidden':!![]}];function a64_0x499f(){const _0x5bbcc9=['app','non-interactive','4899933GlpsMx','3789652lHLrIn','24zMTVWF','verbose','production\x20|\x20development\x20|\x20daily','boolean','Skip\x20confirmation\x20for\x20high-risk\x20writes','params','Select\x20app\x20profile\x20by\x20name','391771hEDvnf','appcode','JSON\x20params\x20for\x20execute\x20commands','Show\x20help','json\x20|\x20pretty\x20|\x20compress','<code>','32JQVpAF','clear','Name\x20filter','nonInteractive','3VrSaJJ','name','meowKey','<expr>','format','Override\x20appcode','type','Clear\x20output','Record\x20ID','dry-run','cliBinName','Force\x20non-interactive\x20mode\x20(CI)','Preview\x20operation\x20without\x20executing','cliDisplayName','help','<name>','Use\x20global\x20config\x20scope','Environment','fromEntries','1158874azEDfV','env','165Xgfexf','Output\x20format','dryRun','Verbose\x20output','yes','map','302561DlQvMw','string','546610ObZtsT','global','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','543010ckrjVm'];a64_0x499f=function(){return _0x5bbcc9;};return a64_0x499f();}export const PIPELINE_FLAG_NAMES=new Set([a64_0x7a9932(0x106),a64_0x7a9932(0x130),a64_0x7a9932(0x123),a64_0x7a9932(0x113),'jq',a64_0x7a9932(0x118),a64_0x7a9932(0x128),a64_0x7a9932(0x131),'ci']);export function buildMeowFlags(){const _0x401950=a64_0x7a9932;return Object[_0x401950(0x121)](GLOBAL_FLAGS[_0x401950(0x129)](_0x1ca8d6=>[_0x1ca8d6[_0x401950(0x111)],{'type':_0x1ca8d6[_0x401950(0x115)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a65_0x3497b3=a65_0xf0ca;function a65_0x2d8e(){const _0x156411=['main','9pzQoKB','650exeAoo','en-US','2679EMdqtw','6OjmhBA','36005472UmLUgU','compress','564860TdTfNw','4279374AbrZmB','20ljpFcm','28ZiHAuc','production','491560HkUxWQ','700550jqhMJK','6077099IhsZqi'];a65_0x2d8e=function(){return _0x156411;};return a65_0x2d8e();}(function(_0x100a09,_0x30f052){const _0x360cc2=a65_0xf0ca,_0x57aea8=_0x100a09();while(!![]){try{const _0x37a318=parseInt(_0x360cc2(0x12a))/0x1+parseInt(_0x360cc2(0x11e))/0x2*(parseInt(_0x360cc2(0x120))/0x3)+-parseInt(_0x360cc2(0x127))/0x4*(-parseInt(_0x360cc2(0x124))/0x5)+parseInt(_0x360cc2(0x121))/0x6*(parseInt(_0x360cc2(0x11b))/0x7)+parseInt(_0x360cc2(0x129))/0x8*(parseInt(_0x360cc2(0x11d))/0x9)+-parseInt(_0x360cc2(0x126))/0xa*(-parseInt(_0x360cc2(0x125))/0xb)+-parseInt(_0x360cc2(0x122))/0xc;if(_0x37a318===_0x30f052)break;else _0x57aea8['push'](_0x57aea8['shift']());}catch(_0x133ffd){_0x57aea8['push'](_0x57aea8['shift']());}}}(a65_0x2d8e,0x77559));export const DEFAULT_APP_PROFILE_NAME=a65_0x3497b3(0x11c);function a65_0xf0ca(_0x5bcaf1,_0x38653b){_0x5bcaf1=_0x5bcaf1-0x11b;const _0x2d8e69=a65_0x2d8e();let _0xf0ca43=_0x2d8e69[_0x5bcaf1];return _0xf0ca43;}export const DEFAULT_CONFIG_VALUES={'env':a65_0x3497b3(0x128),'format':a65_0x3497b3(0x123),'locale':a65_0x3497b3(0x11f),'riskLevel':'write'};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a65_0x3497b3(0x123);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a66_0x1502a2=a66_0x4c7d;(function(_0x4bc75e,_0x57d9f2){const _0x308951=a66_0x4c7d,_0x3fd67b=_0x4bc75e();while(!![]){try{const _0x2590e5=parseInt(_0x308951(0xea))/0x1*(parseInt(_0x308951(0xe6))/0x2)+-parseInt(_0x308951(0xe9))/0x3*(-parseInt(_0x308951(0xe3))/0x4)+parseInt(_0x308951(0xe8))/0x5*(parseInt(_0x308951(0xe2))/0x6)+-parseInt(_0x308951(0xe4))/0x7+parseInt(_0x308951(0xe5))/0x8*(parseInt(_0x308951(0xeb))/0x9)+parseInt(_0x308951(0xe1))/0xa*(parseInt(_0x308951(0xec))/0xb)+-parseInt(_0x308951(0xed))/0xc*(parseInt(_0x308951(0xe7))/0xd);if(_0x2590e5===_0x57d9f2)break;else _0x3fd67b['push'](_0x3fd67b['shift']());}catch(_0x28117a){_0x3fd67b['push'](_0x3fd67b['shift']());}}}(a66_0x18ce,0x96d02));function a66_0x18ce(){const _0x74611c=['24WgqFQs','npmRegistryBaseUrl','npmPackageName','10ZSLyGv','3378MKnfnE','4FnyDke','2569763GHaQEy','1282712CkZOuC','2fKqZjJ','20340151UjXQIQ','5435kWRKCk','2349231hxNhys','1120404VINAak','45KukJIx','8766296oPbieD'];a66_0x18ce=function(){return _0x74611c;};return a66_0x18ce();}function a66_0x4c7d(_0x85e730,_0x45e8d7){_0x85e730=_0x85e730-0xe1;const _0x18ce28=a66_0x18ce();let _0x4c7d38=_0x18ce28[_0x85e730];return _0x4c7d38;}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a66_0x1502a2(0xef)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a66_0x1502a2(0xee)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x3e9ad2=a67_0xc699;(function(_0x4b7a87,_0x4bd83a){const _0x48d706=a67_0xc699,_0x554097=_0x4b7a87();while(!![]){try{const _0x1cab7f=parseInt(_0x48d706(0x170))/0x1+parseInt(_0x48d706(0x181))/0x2+parseInt(_0x48d706(0x174))/0x3+parseInt(_0x48d706(0x180))/0x4+parseInt(_0x48d706(0x179))/0x5+parseInt(_0x48d706(0x17e))/0x6+-parseInt(_0x48d706(0x17a))/0x7;if(_0x1cab7f===_0x4bd83a)break;else _0x554097['push'](_0x554097['shift']());}catch(_0x5a3c34){_0x554097['push'](_0x554097['shift']());}}}(a67_0x52b7,0xd87fc));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;function a67_0xc699(_0x110a59,_0x50ebc6){_0x110a59=_0x110a59-0x170;const _0x52b7fd=a67_0x52b7();let _0xc69949=_0x52b7fd[_0x110a59];return _0xc69949;}export function initDomains(_0x1d0aa6){const _0x17100d=a67_0xc699;customApiDomain=_0x1d0aa6?.[_0x17100d(0x17c)],customUserDomain=_0x1d0aa6?.[_0x17100d(0x175)],customRuntimeDomain=_0x1d0aa6?.[_0x17100d(0x173)],customSkillHubDomain=_0x1d0aa6?.[_0x17100d(0x171)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x3e9ad2(0x172)]['production'][a67_0x3e9ad2(0x178)]:PRODUCT_CONFIG[a67_0x3e9ad2(0x172)]['nonProduction'][a67_0x3e9ad2(0x178)]);function a67_0x52b7(){const _0x3b93a0=['1247500JgUgMX','skillHubDomain','domains','runtimeDomain','5169015EprKBq','userDomain','runtime','api','user','6174350eZIDKw','45027521SHkFmd','skillhub','apiDomain','nonProduction','8844822CWOjkb','production','1377116ZKGzcG','2590984FSNhaq'];a67_0x52b7=function(){return _0x3b93a0;};return a67_0x52b7();}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x3e9ad2(0x172)][a67_0x3e9ad2(0x17f)][a67_0x3e9ad2(0x177)]:PRODUCT_CONFIG[a67_0x3e9ad2(0x172)][a67_0x3e9ad2(0x17d)][a67_0x3e9ad2(0x177)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a67_0x3e9ad2(0x17f)][a67_0x3e9ad2(0x176)]:PRODUCT_CONFIG[a67_0x3e9ad2(0x172)][a67_0x3e9ad2(0x17d)][a67_0x3e9ad2(0x176)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a67_0x3e9ad2(0x172)][a67_0x3e9ad2(0x17f)]['skillhub']:PRODUCT_CONFIG[a67_0x3e9ad2(0x172)][a67_0x3e9ad2(0x17d)][a67_0x3e9ad2(0x17b)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x2ace65=a68_0xea96;function a68_0xea96(_0x35d666,_0x3fbffe){_0x35d666=_0x35d666-0x14a;const _0x10b5f2=a68_0x10b5();let _0xea965e=_0x10b5f2[_0x35d666];return _0xea965e;}(function(_0x185226,_0x4a215e){const _0x495088=a68_0xea96,_0x1f6dc4=_0x185226();while(!![]){try{const _0x31cb19=parseInt(_0x495088(0x14f))/0x1+-parseInt(_0x495088(0x152))/0x2*(parseInt(_0x495088(0x158))/0x3)+parseInt(_0x495088(0x151))/0x4*(-parseInt(_0x495088(0x14e))/0x5)+-parseInt(_0x495088(0x14a))/0x6+parseInt(_0x495088(0x14d))/0x7*(-parseInt(_0x495088(0x156))/0x8)+-parseInt(_0x495088(0x155))/0x9+parseInt(_0x495088(0x14b))/0xa;if(_0x31cb19===_0x4a215e)break;else _0x1f6dc4['push'](_0x1f6dc4['shift']());}catch(_0x22a8f9){_0x1f6dc4['push'](_0x1f6dc4['shift']());}}}(a68_0x10b5,0xc6f40));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a68_0x2ace65(0x157),a68_0x2ace65(0x154),a68_0x2ace65(0x150)];export function normalizeEnv(_0x50ba64){const _0x3896d3=a68_0x2ace65;return _0x50ba64===_0x3896d3(0x14c)?_0x3896d3(0x157):_0x50ba64;}export function isProduction(_0x2d37cb){const _0x5960a8=a68_0x2ace65;return normalizeEnv(_0x2d37cb)===_0x5960a8(0x157);}export function isDaily(_0x2ca6e1){const _0x11bfe6=a68_0x2ace65;return normalizeEnv(_0x2ca6e1)===_0x11bfe6(0x150);}export function isDev(_0x44805d){const _0x5297e8=a68_0x2ace65,_0x13f1bb=normalizeEnv(_0x44805d);return _0x13f1bb===_0x5297e8(0x154)||_0x13f1bb===_0x5297e8(0x153);}function a68_0x10b5(){const _0x3f96f5=['13101471mmygYc','79456aRkXfd','production','3LhREyY','4357302SkEtns','31310480gdhzQT','online','371MxQXhS','22840OGMnzn','1194145fHneVh','daily','648OCMGTU','123866cgWbwR','dev','development'];a68_0x10b5=function(){return _0x3f96f5;};return a68_0x10b5();}let env=normalizeEnv(productEnv('ENV')||'production');export function getEnv(){return env;}export function initEnv(_0x33a39b){env=normalizeEnv(_0x33a39b);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a69_0x443ce4=a69_0x219c;function a69_0x219c(_0x6d881e,_0x554f8f){_0x6d881e=_0x6d881e-0x8e;const _0x216745=a69_0x2167();let _0x219c5a=_0x216745[_0x6d881e];return _0x219c5a;}function a69_0x2167(){const _0x470d6c=['10DmOgKe','pretty','79jSZVBH','6904QDxvwq','1395254IhAYez','1223271qgJejZ','16464sgKjFs','10684zQUngg','json','7766sxfZHg','6WScEju','417483yHsxhU','1416560msYPjU','265PqKESQ'];a69_0x2167=function(){return _0x470d6c;};return a69_0x2167();}(function(_0x5dd80a,_0x4a5a6d){const _0x499e51=a69_0x219c,_0x4c6542=_0x5dd80a();while(!![]){try{const _0x208343=-parseInt(_0x499e51(0x8e))/0x1*(parseInt(_0x499e51(0x93))/0x2)+-parseInt(_0x499e51(0x97))/0x3+-parseInt(_0x499e51(0x8f))/0x4*(-parseInt(_0x499e51(0x99))/0x5)+parseInt(_0x499e51(0x96))/0x6*(parseInt(_0x499e51(0x90))/0x7)+-parseInt(_0x499e51(0x98))/0x8+-parseInt(_0x499e51(0x91))/0x9*(parseInt(_0x499e51(0x9a))/0xa)+parseInt(_0x499e51(0x95))/0xb*(parseInt(_0x499e51(0x92))/0xc);if(_0x208343===_0x4a5a6d)break;else _0x4c6542['push'](_0x4c6542['shift']());}catch(_0x56fe94){_0x4c6542['push'](_0x4c6542['shift']());}}}(a69_0x2167,0x5e0f0));export const OUTPUT_FORMAT_VALUES=[a69_0x443ce4(0x94),a69_0x443ce4(0x9b),'compress'];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x3cd26a=a70_0x54df;(function(_0x43bff2,_0x1f6ae7){const _0x4d68f9=a70_0x54df,_0x1c6ad8=_0x43bff2();while(!![]){try{const _0x380afd=-parseInt(_0x4d68f9(0x1c5))/0x1*(-parseInt(_0x4d68f9(0x1b9))/0x2)+parseInt(_0x4d68f9(0x1ba))/0x3*(-parseInt(_0x4d68f9(0x1b7))/0x4)+-parseInt(_0x4d68f9(0x1bd))/0x5*(-parseInt(_0x4d68f9(0x1bb))/0x6)+parseInt(_0x4d68f9(0x1c1))/0x7+parseInt(_0x4d68f9(0x1a7))/0x8+parseInt(_0x4d68f9(0x1c4))/0x9+-parseInt(_0x4d68f9(0x1b6))/0xa;if(_0x380afd===_0x1f6ae7)break;else _0x1c6ad8['push'](_0x1c6ad8['shift']());}catch(_0x13e801){_0x1c6ad8['push'](_0x1c6ad8['shift']());}}}(a70_0x57fa,0x61e1f));export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':a70_0x3cd26a(0x1b2),'npmPackageName':a70_0x3cd26a(0x1ab),'skillSource':a70_0x3cd26a(0x1ac),'npmRegistryBaseUrl':a70_0x3cd26a(0x1ad),'envPrefix':a70_0x3cd26a(0x1b1),'legacyEnvPrefixes':[a70_0x3cd26a(0x1b5)],'configFileNames':[a70_0x3cd26a(0x1af),'.lovrabetrc'],'newConfigFileName':'.lovrabet.json','homeDirName':'.lovrabet','logFileName':a70_0x3cd26a(0x1ae),'invokeSource':a70_0x3cd26a(0x1bf),'userCenterDisplayName':a70_0x3cd26a(0x1bc),'skipNpxSkillsEnvSuffix':a70_0x3cd26a(0x1c3),'domains':{'production':{'user':a70_0x3cd26a(0x1b8),'api':a70_0x3cd26a(0x1b0),'runtime':a70_0x3cd26a(0x1c0),'skillhub':a70_0x3cd26a(0x1c6)},'nonProduction':{'user':a70_0x3cd26a(0x1a6),'api':a70_0x3cd26a(0x1a8),'runtime':a70_0x3cd26a(0x1b4),'skillhub':a70_0x3cd26a(0x1be)}},'accessKeyCreatePath':a70_0x3cd26a(0x1aa)};function a70_0x57fa(){const _0x36d7bb=['map','https://daily-runtime.lovrabet.com','RABETBASE','14250600BWJzNF','92EPSFgv','https://user.lovrabet.com','5174hAQZpH','35214zKwkqz','12rtzcro','Lovrabet\x20User\x20Center','446365baHTaw','https://skills-daily.lovrabet.com','cli:lovrabet-runtime','https://runtime.lovrabet.com','4651577cVmjju','legacyEnvPrefixes','SKIP_NPX_SKILLS','1354095HESHDF','123mYbDZN','https://skills.lovrabet.com','https://user-daily.lovrabet.com','6273984obKTmJ','https://daily-api.lovrabet.com','envPrefix','/user/ak','@lovrabet/lovrabet-cli','lovrabet/lovrabet-cli','https://registry.npmjs.org','.lovrabet-runtime.log','.lovrabet.json','https://api.lovrabet.com','LOVRABET','Lovrabet\x20Runtime\x20CLI'];a70_0x57fa=function(){return _0x36d7bb;};return a70_0x57fa();}function a70_0x54df(_0x2ce4ea,_0xc41e23){_0x2ce4ea=_0x2ce4ea-0x1a6;const _0x57faf2=a70_0x57fa();let _0x54df99=_0x57faf2[_0x2ce4ea];return _0x54df99;}export function productEnvName(_0x2815cc){const _0x1c7523=a70_0x3cd26a;return PRODUCT_CONFIG[_0x1c7523(0x1a9)]+'_'+_0x2815cc;}export function productEnvNames(_0x112dac){const _0x582286=a70_0x3cd26a;return[productEnvName(_0x112dac),...PRODUCT_CONFIG[_0x582286(0x1c2)][_0x582286(0x1b3)](_0x5e95b3=>_0x5e95b3+'_'+_0x112dac)];}export function productEnv(_0x486d31){for(const _0xc8ed91 of productEnvNames(_0x486d31)){const _0x454f97=process.env[_0xc8ed91];if(_0x454f97!==undefined)return _0x454f97;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a71_0x17c153=a71_0x428b;(function(_0x2ce793,_0x5b4dd1){const _0x14dde6=a71_0x428b,_0x220870=_0x2ce793();while(!![]){try{const _0x5da324=-parseInt(_0x14dde6(0xb2))/0x1+-parseInt(_0x14dde6(0xb0))/0x2+parseInt(_0x14dde6(0xb5))/0x3*(parseInt(_0x14dde6(0xb3))/0x4)+-parseInt(_0x14dde6(0xb9))/0x5+parseInt(_0x14dde6(0xb1))/0x6*(-parseInt(_0x14dde6(0xb8))/0x7)+parseInt(_0x14dde6(0xba))/0x8+parseInt(_0x14dde6(0xb7))/0x9;if(_0x5da324===_0x5b4dd1)break;else _0x220870['push'](_0x220870['shift']());}catch(_0x15d842){_0x220870['push'](_0x220870['shift']());}}}(a71_0x451e,0x34ec8));export const RISK_LEVEL_VALUES=[a71_0x17c153(0xb4),'write',a71_0x17c153(0xb6)];function a71_0x428b(_0x8ad886,_0x5aea6a){_0x8ad886=_0x8ad886-0xb0;const _0x451e3d=a71_0x451e();let _0x428bd6=_0x451e3d[_0x8ad886];return _0x428bd6;}function a71_0x451e(){const _0x979007=['read','929517AasSGo','high-risk-write','11023488lYxwEg','93821tMbGtV','1508280KxceOv','505368YedYrX','599266jUbbhE','174hxxLSk','391090MuOccc','4wOkNCr'];a71_0x451e=function(){return _0x979007;};return a71_0x451e();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x4b3fe9=a72_0x4f5f;(function(_0x7ffb13,_0x485bb7){const _0x5b9cf5=a72_0x4f5f,_0x43fa16=_0x7ffb13();while(!![]){try{const _0x4399d5=parseInt(_0x5b9cf5(0x67))/0x1*(-parseInt(_0x5b9cf5(0x6e))/0x2)+-parseInt(_0x5b9cf5(0x66))/0x3*(parseInt(_0x5b9cf5(0x6d))/0x4)+-parseInt(_0x5b9cf5(0x68))/0x5+parseInt(_0x5b9cf5(0x70))/0x6+parseInt(_0x5b9cf5(0x6a))/0x7+parseInt(_0x5b9cf5(0x64))/0x8*(parseInt(_0x5b9cf5(0x6f))/0x9)+-parseInt(_0x5b9cf5(0x69))/0xa;if(_0x4399d5===_0x485bb7)break;else _0x43fa16['push'](_0x43fa16['shift']());}catch(_0x4894fb){_0x43fa16['push'](_0x43fa16['shift']());}}}(a72_0x5656,0x5ca80));function a72_0x4f5f(_0x15b548,_0x177889){_0x15b548=_0x15b548-0x64;const _0x565630=a72_0x5656();let _0x4f5f03=_0x565630[_0x15b548];return _0x4f5f03;}import{PRODUCT_CONFIG}from'../constant/product.js';function a72_0x5656(){const _0xc20a8=['8onTboC','18RZhNJH','6442029lcMyAs','2777244BAEMaw','domains','8rCbbsm','user','219972ehHuIe','37783wHAXvD','540055mzkiGA','2093940lTCkxG','34755qDsxoO','production','accessKeyCreatePath'];a72_0x5656=function(){return _0xc20a8;};return a72_0x5656();}export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a72_0x4b3fe9(0x71)][a72_0x4b3fe9(0x6b)][a72_0x4b3fe9(0x65)]+PRODUCT_CONFIG[a72_0x4b3fe9(0x6c)];
|