@lovrabet/lovrabet-cli 2.0.14-beta.9 → 2.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -0
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.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
|
-
function
|
|
1
|
+
function a36_0x4cbf(_0x15242e,_0x12c92d){_0x15242e=_0x15242e-0x167;const _0x4a7c66=a36_0x4a7c();let _0x4cbf52=_0x4a7c66[_0x15242e];return _0x4cbf52;}const a36_0x56d7af=a36_0x4cbf;(function(_0x47d571,_0x13178d){const _0x209bf7=a36_0x4cbf,_0x11e939=_0x47d571();while(!![]){try{const _0x5896b7=parseInt(_0x209bf7(0x175))/0x1*(-parseInt(_0x209bf7(0x184))/0x2)+parseInt(_0x209bf7(0x16c))/0x3+-parseInt(_0x209bf7(0x17a))/0x4*(-parseInt(_0x209bf7(0x16f))/0x5)+-parseInt(_0x209bf7(0x171))/0x6*(-parseInt(_0x209bf7(0x18d))/0x7)+-parseInt(_0x209bf7(0x181))/0x8+-parseInt(_0x209bf7(0x16e))/0x9+-parseInt(_0x209bf7(0x191))/0xa*(-parseInt(_0x209bf7(0x17f))/0xb);if(_0x5896b7===_0x13178d)break;else _0x11e939['push'](_0x11e939['shift']());}catch(_0x50f78d){_0x11e939['push'](_0x11e939['shift']());}}}(a36_0x4a7c,0xa29a8));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=['write',a36_0x56d7af(0x17e),'trainer'];export const DEFAULT_SKILL_TARGET=a36_0x56d7af(0x169);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE=a36_0x56d7af(0x16a);export const OUTPUT_CONTRACT_FILE='references/output-contract.md';export function validateSkillName(_0x1097ab){const _0x357948=a36_0x56d7af,_0x522ddf=_0x1097ab['trim']();if(!SKILL_NAME_PATTERN['test'](_0x522ddf))throw CliErrors[_0x357948(0x18c)](_0x357948(0x178)+_0x1097ab+'.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.',_0x357948(0x176));return _0x522ddf;}export function normalizeSkillTemplateType(_0xe3205f){const _0x255dfc=a36_0x56d7af,_0x365abf=(_0xe3205f||_0x255dfc(0x186))['trim']()||'write';if(SKILL_TYPES[_0x255dfc(0x17d)](_0x365abf))return _0x365abf;throw CliErrors[_0x255dfc(0x18c)]('Unsupported\x20Skill\x20type:\x20'+_0xe3205f,_0x255dfc(0x167)+SKILL_TYPES[_0x255dfc(0x189)](',\x20')+'.');}export function renderSkillTemplate(_0x45f11e){const _0xacd1e=a36_0x56d7af,_0x137a65=validateSkillName(_0x45f11e['skillName']),_0x51e7f2=normalizeSkillTemplateType(_0x45f11e[_0xacd1e(0x174)]),_0xef48af=_0x45f11e[_0xacd1e(0x18b)]??new Date()[_0xacd1e(0x177)]();return{'skillName':_0x137a65,'type':_0x51e7f2,'files':[{'path':_0xacd1e(0x18e),'content':renderSkillMd(_0x137a65,_0x51e7f2,_0xef48af)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x137a65,_0x51e7f2)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x137a65,_0x51e7f2)}]};}function renderSkillMd(_0x19b0f2,_0x5cbba7,_0x2f8455){const _0x21e290=a36_0x56d7af,_0x1cd657=typeWorkflow(_0x5cbba7);return _0x21e290(0x183)+_0x19b0f2+_0x21e290(0x192)+_0x5cbba7+_0x21e290(0x16d)+_0x2f8455+_0x21e290(0x17c)+_0x19b0f2+_0x21e290(0x182)+_0x1cd657+'\x0a\x0a'+businessStateSection(_0x5cbba7)+'\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';}function a36_0x4a7c(){const _0x1559b4=['Use\x20one\x20of:\x20','trainer','.agents/skills','references/runtime-contract.md','1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】','2641119TbrPHR','\x0a\x20\x20created:\x20\x22','7814007zCtLpq','1243255cDsRQk','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','70710RQpcvw','\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','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','type','155LKqKZm','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','toISOString','Invalid\x20Skill\x20name:\x20','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','8NPMoUj','#\x20Output\x20Contract\x0a\x0a','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','includes','read','11mmGXGW','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','6024816iYiQrb','\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','---\x0aname:\x20','14242NxBLaP','\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=','write','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','\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','join','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','timestamp','validation','546FGXklT','SKILL.md','\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','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','10941990YVQEhr','\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0ametadata:\x0a\x20\x20type:\x20'];a36_0x4a7c=function(){return _0x1559b4;};return a36_0x4a7c();}function renderRuntimeContract(_0x53d4f6,_0x3c311f){const _0xded246=a36_0x56d7af,_0x2e9bab=_0x3c311f===_0xded246(0x186)?'##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a':'';return _0xded246(0x18a)+_0x53d4f6+_0xded246(0x185)+_0x3c311f+_0xded246(0x172)+_0x2e9bab+_0xded246(0x188);}function renderOutputContract(_0x78fdd0,_0x43170f){const _0x3ba567=a36_0x56d7af,_0x143efa=_0x43170f===_0x3ba567(0x186)?_0x3ba567(0x170):_0x43170f+_0x3ba567(0x187);return _0x3ba567(0x17b)+_0x78fdd0+_0x3ba567(0x18f)+_0x143efa+_0x3ba567(0x179);}function typeWorkflow(_0x14e171){const _0x303c3d=a36_0x56d7af;if(_0x14e171===_0x303c3d(0x17e))return _0x303c3d(0x173);if(_0x14e171===_0x303c3d(0x168))return _0x303c3d(0x16b);return _0x303c3d(0x190);}function businessStateSection(_0x1f7c8a){const _0x4e3b53=a36_0x56d7af;if(_0x1f7c8a!==_0x4e3b53(0x186))return'';return _0x4e3b53(0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a37_0x57df8d=a37_0x4939;(function(_0x3afc59,_0x521604){const _0x7d2cf2=a37_0x4939,_0x148f25=_0x3afc59();while(!![]){try{const _0x3a2a48=-parseInt(_0x7d2cf2(0x1eb))/0x1+-parseInt(_0x7d2cf2(0x203))/0x2+-parseInt(_0x7d2cf2(0x1ff))/0x3*(parseInt(_0x7d2cf2(0x20b))/0x4)+-parseInt(_0x7d2cf2(0x1e8))/0x5+parseInt(_0x7d2cf2(0x1ed))/0x6*(parseInt(_0x7d2cf2(0x204))/0x7)+parseInt(_0x7d2cf2(0x1ee))/0x8*(parseInt(_0x7d2cf2(0x1ec))/0x9)+parseInt(_0x7d2cf2(0x1e9))/0xa*(parseInt(_0x7d2cf2(0x1f9))/0xb);if(_0x3a2a48===_0x521604)break;else _0x148f25['push'](_0x148f25['shift']());}catch(_0x1f654d){_0x148f25['push'](_0x148f25['shift']());}}}(a37_0xb7a8,0x344a0));function a37_0xb7a8(){const _0x23ffe7=['path','Fix\x20the\x20required\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','258bxJUpK','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','\x20Fix:\x20','SKILL.md\x20must\x20start\x20with\x20frontmatter.','450926eJQWMS','455XGexFU','description','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','content','endsWith','Skill\x20directory\x20not\x20found:\x20','16316JhCUFX','filter','SKILL.md','errors','Skill\x20validation\x20failed:\x0a','metadata','isFile','level','type','description-required','frontmatter-required','split','isDirectory','trainer','validation','Missing\x20SKILL.md.','read','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','Frontmatter\x20name\x20is\x20missing.','match','suggestion','file','hasFrontmatter','structure-complete','push','102035WhJtTU','20YIegAn','utf8','426406eouizA','50445ingdIO','1662rdXHgd','296OboDSz','ruleId','length','Add\x20frontmatter\x20with\x20name,\x20description,\x20and\x20metadata.type.','name','error','section','trim','message','toUpperCase','join','5565208hQnLpR','startsWith','isSymbolicLink','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.'];a37_0xb7a8=function(){return _0x23ffe7;};return a37_0xb7a8();}import{existsSync,lstatSync,readFileSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';const SKILL_FILE=a37_0x57df8d(0x20d),SUPPORTED_SKILL_TYPES=new Set(['write',a37_0x57df8d(0x1df),a37_0x57df8d(0x218)]);export function validateSkillDirectory(_0xc2560e,_0x2dd165={}){const _0x2dd9e=a37_0x57df8d,_0x5e537f=resolve(_0xc2560e),_0x35cfc5=[];if(!existsSync(_0x5e537f)||!lstatSync(_0x5e537f)[_0x2dd9e(0x217)]())throw CliErrors[_0x2dd9e(0x219)](_0x2dd9e(0x20a)+_0xc2560e);const _0x1de3ca=loadRequiredSkillFile(_0x5e537f,_0x35cfc5),_0x231edb=_0x1de3ca?parseFrontmatter(_0x1de3ca[_0x2dd9e(0x208)]):{'hasFrontmatter':![]};_0x1de3ca&&validateFrontmatter(_0x1de3ca[_0x2dd9e(0x1fd)],_0x231edb,_0x35cfc5);const _0x35800d=_0x35cfc5[_0x2dd9e(0x20c)](_0x4c9bfe=>_0x4c9bfe[_0x2dd9e(0x212)]==='error');return{'ok':_0x35800d[_0x2dd9e(0x1f0)]===0x0,'dir':_0x5e537f,'type':_0x231edb[_0x2dd9e(0x213)],'errors':_0x35800d,'warnings':[]};}export function throwIfSkillValidationFailed(_0x71caf6,_0x161a82=![]){const _0x3704ac=a37_0x57df8d;if(_0x71caf6['ok'])return;const _0x25eae4=_0x71caf6[_0x3704ac(0x20e)]['map'](_0xabe83b=>{const _0x55d524=_0x3704ac,_0x1286bf=_0xabe83b['section']?'#'+_0xabe83b[_0x55d524(0x1f4)]:'';return _0xabe83b['level'][_0x55d524(0x1f7)]()+'\x20'+_0xabe83b[_0x55d524(0x1ef)]+'\x20'+_0xabe83b[_0x55d524(0x1e4)]+_0x1286bf+':\x20'+_0xabe83b[_0x55d524(0x1f6)]+_0x55d524(0x201)+_0xabe83b[_0x55d524(0x1e3)];});throw CliErrors[_0x3704ac(0x219)](_0x3704ac(0x20f)+_0x25eae4[_0x3704ac(0x1f8)]('\x0a'),_0x3704ac(0x1fe));}function loadRequiredSkillFile(_0x52faed,_0x2666fc){const _0x334d62=a37_0x57df8d,_0x83697e=resolve(_0x52faed,SKILL_FILE);if(!existsSync(_0x83697e))return _0x2666fc[_0x334d62(0x1e7)](issue('error',_0x334d62(0x1e6),SKILL_FILE,_0x334d62(0x1de),'Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.')),undefined;const _0x1cf864=lstatSync(_0x83697e);if(_0x1cf864[_0x334d62(0x1fb)]())return _0x2666fc[_0x334d62(0x1e7)](issue(_0x334d62(0x1f3),'structure-complete',SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.',_0x334d62(0x207))),undefined;if(!_0x1cf864[_0x334d62(0x211)]())return _0x2666fc[_0x334d62(0x1e7)](issue(_0x334d62(0x1f3),_0x334d62(0x1e6),SKILL_FILE,'SKILL.md\x20is\x20not\x20a\x20file.',_0x334d62(0x1fc))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x83697e,_0x334d62(0x1ea))};}function validateFrontmatter(_0x3da9da,_0xe72f16,_0x522b8d){const _0xb420a=a37_0x57df8d;if(!_0xe72f16[_0xb420a(0x1e5)]){_0x522b8d[_0xb420a(0x1e7)](issue(_0xb420a(0x1f3),_0xb420a(0x215),_0x3da9da,_0xb420a(0x202),_0xb420a(0x1f1)));return;}!_0xe72f16[_0xb420a(0x1f2)]?.[_0xb420a(0x1f5)]()&&_0x522b8d[_0xb420a(0x1e7)](issue('error',_0xb420a(0x215),_0x3da9da,_0xb420a(0x1e1),_0xb420a(0x1e0)));!_0xe72f16[_0xb420a(0x205)]?.[_0xb420a(0x1f5)]()&&_0x522b8d['push'](issue(_0xb420a(0x1f3),_0xb420a(0x214),_0x3da9da,'Frontmatter\x20description\x20is\x20empty.',_0xb420a(0x200)));if(!_0xe72f16[_0xb420a(0x213)]?.[_0xb420a(0x1f5)]())_0x522b8d[_0xb420a(0x1e7)](issue('error',_0xb420a(0x215),_0x3da9da,'metadata.type\x20is\x20missing.',_0xb420a(0x206)));else!SUPPORTED_SKILL_TYPES['has'](_0xe72f16['type'])&&_0x522b8d[_0xb420a(0x1e7)](issue(_0xb420a(0x1f3),_0xb420a(0x215),_0x3da9da,'metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.',_0xb420a(0x206)));}function parseFrontmatter(_0x8923){const _0x3c913b=a37_0x57df8d,_0x3f9222=_0x8923[_0x3c913b(0x1e2)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3f9222)return{'hasFrontmatter':![]};const _0xdba45d=_0x3f9222[0x1]??'',_0xc6c7ea={'hasFrontmatter':!![]};let _0x5e61c1=![];for(const _0x2cfdf0 of _0xdba45d[_0x3c913b(0x216)](/\r?\n/)){if(/^\s*$/['test'](_0x2cfdf0))continue;const _0xd28bbd=_0x2cfdf0['match'](/^([A-Za-z0-9_-]+):\s*(.*)$/);if(_0xd28bbd){const _0x28c3c0=_0xd28bbd[0x1],_0x1d0349=cleanScalar(_0xd28bbd[0x2]??'');_0x5e61c1=_0x28c3c0===_0x3c913b(0x210);if(_0x28c3c0===_0x3c913b(0x1f2))_0xc6c7ea['name']=_0x1d0349;if(_0x28c3c0==='description')_0xc6c7ea['description']=_0x1d0349;continue;}const _0x490dd6=_0x2cfdf0[_0x3c913b(0x1e2)](/^\s+type:\s*(.*)$/);_0x5e61c1&&_0x490dd6&&(_0xc6c7ea[_0x3c913b(0x213)]=cleanScalar(_0x490dd6[0x1]??''));}return _0xc6c7ea;}function a37_0x4939(_0x162784,_0x477762){_0x162784=_0x162784-0x1de;const _0xb7a897=a37_0xb7a8();let _0x493944=_0xb7a897[_0x162784];return _0x493944;}function cleanScalar(_0x118cc3){const _0x31d2de=a37_0x57df8d,_0x4cdc1c=_0x118cc3[_0x31d2de(0x1f5)]();if(_0x4cdc1c['startsWith']('\x22')&&_0x4cdc1c['endsWith']('\x22')||_0x4cdc1c[_0x31d2de(0x1fa)]('\x27')&&_0x4cdc1c[_0x31d2de(0x209)]('\x27'))return _0x4cdc1c['slice'](0x1,-0x1);return _0x4cdc1c;}function issue(_0x216358,_0x22da3e,_0x5977f4,_0x5e2b5d,_0x3b5595,_0x4623f7){return{'level':_0x216358,'ruleId':_0x22da3e,'file':_0x5977f4,'section':_0x4623f7,'message':_0x5e2b5d,'suggestion':_0x3b5595};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x562723=a38_0x1386;function a38_0x1386(_0x11a638,_0xad7fbd){_0x11a638=_0x11a638-0x14f;const _0x322f96=a38_0x322f();let _0x1386b9=_0x322f96[_0x11a638];return _0x1386b9;}(function(_0x14b0e2,_0x1a0d8d){const _0x757dc9=a38_0x1386,_0x5d22f2=_0x14b0e2();while(!![]){try{const _0x5bacd4=-parseInt(_0x757dc9(0x160))/0x1*(parseInt(_0x757dc9(0x15c))/0x2)+-parseInt(_0x757dc9(0x14f))/0x3+parseInt(_0x757dc9(0x151))/0x4*(parseInt(_0x757dc9(0x159))/0x5)+-parseInt(_0x757dc9(0x150))/0x6*(parseInt(_0x757dc9(0x156))/0x7)+parseInt(_0x757dc9(0x15d))/0x8+-parseInt(_0x757dc9(0x15a))/0x9+-parseInt(_0x757dc9(0x152))/0xa*(-parseInt(_0x757dc9(0x162))/0xb);if(_0x5bacd4===_0x1a0d8d)break;else _0x5d22f2['push'](_0x5d22f2['shift']());}catch(_0x59e15f){_0x5d22f2['push'](_0x5d22f2['shift']());}}}(a38_0x322f,0x7e93b));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':'sql','command':a38_0x562723(0x154),'description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a38_0x562723(0x153),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x38489b){const _0xa30a0d=a38_0x562723,_0x328ca1=await getSqlQueryInfo(_0x38489b[_0xa30a0d(0x164)],_0x38489b[_0xa30a0d(0x158)](_0xa30a0d(0x15b))),_0x5b5aa1=_0x38489b[_0xa30a0d(0x15e)](_0xa30a0d(0x163));if(_0x5b5aa1)return{'ok':!![],'data':_0x328ca1};const _0x3b5840=_0x328ca1['dbId']?await getDbName(_0x38489b[_0xa30a0d(0x164)],_0x328ca1[_0xa30a0d(0x155)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x328ca1[_0xa30a0d(0x15f)],'sqlName':_0x328ca1[_0xa30a0d(0x157)],'db':_0x3b5840?_0x3b5840+'\x20('+_0x328ca1[_0xa30a0d(0x155)]+')':_0x328ca1[_0xa30a0d(0x155)]??'','description':_0x328ca1[_0xa30a0d(0x161)]??'','sqlContent':_0x328ca1['sqlContent']??''}};}};function a38_0x322f(){const _0x3ecab8=['299629mcTpkp','verbose','appCode','2303604LfRgCp','1042446Qvxbjk','1091692lxSkQj','310dsHtQA','read','detail','dbId','7DewPll','sqlName','str','15jMMWZU','2580687zdKuvS','sqlcode','261062XfHCiu','1713312ZRJZOs','bool','sqlCode','1OlzITW','description'];a38_0x322f=function(){return _0x3ecab8;};return a38_0x322f();}
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a39_0xd9fbde=a39_0x2e84;function a39_0x2d84(){const _0x39ad2f=['isArray','2vAVbTE','3294136QYsVNP','12AJdSXf','SQL\x20execution\x20failed','424385qcztjh','sql','27IlKBzr','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','350649kNcxaV','1798055vZzEAD','execSuccess','exec','802580EpptOG','execError','201924cKeBUV','1955448aRUHpf','params','length','str','Returned\x20','now','read'];a39_0x2d84=function(){return _0x39ad2f;};return a39_0x2d84();}function a39_0x2e84(_0x463344,_0x2ca11e){_0x463344=_0x463344-0x1cf;const _0x2d843d=a39_0x2d84();let _0x2e8422=_0x2d843d[_0x463344];return _0x2e8422;}(function(_0x86742a,_0x561a30){const _0x1abc02=a39_0x2e84,_0x3bc0d2=_0x86742a();while(!![]){try{const _0xcf5f40=-parseInt(_0x1abc02(0x1d8))/0x1*(parseInt(_0x1abc02(0x1e1))/0x2)+parseInt(_0x1abc02(0x1d2))/0x3+parseInt(_0x1abc02(0x1e3))/0x4*(parseInt(_0x1abc02(0x1e5))/0x5)+-parseInt(_0x1abc02(0x1d9))/0x6+parseInt(_0x1abc02(0x1d3))/0x7+parseInt(_0x1abc02(0x1e2))/0x8+parseInt(_0x1abc02(0x1d0))/0x9*(-parseInt(_0x1abc02(0x1d6))/0xa);if(_0xcf5f40===_0x561a30)break;else _0x3bc0d2['push'](_0x3bc0d2['shift']());}catch(_0x28ef2e){_0x3bc0d2['push'](_0x3bc0d2['shift']());}}}(a39_0x2d84,0x424b4));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a39_0xd9fbde(0x1cf),'command':a39_0xd9fbde(0x1d5),'description':a39_0xd9fbde(0x1d1),'risk':a39_0xd9fbde(0x1df),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x31d7ea){const _0xa3fd3f=a39_0xd9fbde,_0x5dcc80=parseJsonParams(_0x31d7ea[_0xa3fd3f(0x1dc)](_0xa3fd3f(0x1da))),_0x35b760=Date[_0xa3fd3f(0x1de)](),_0x5a8fb3=await executeSdkSql(_0x31d7ea[_0xa3fd3f(0x1dc)]('sqlcode'),_0x5dcc80),_0xc816b=Date[_0xa3fd3f(0x1de)]()-_0x35b760,_0x545b1d=_0x5a8fb3?.['execResult']??_0x5a8fb3,_0xe5e9bc=_0x5a8fb3?.[_0xa3fd3f(0x1d4)]??!![];if(!_0xe5e9bc)return{'ok':![],'data':{'error':_0x5a8fb3?.[_0xa3fd3f(0x1d7)]||_0xa3fd3f(0x1e4),'elapsed':_0xc816b},'message':_0xa3fd3f(0x1e4)};const _0x4c36df=Array[_0xa3fd3f(0x1e0)](_0x545b1d)?_0x545b1d:[];return{'ok':!![],'data':{'rows':_0x4c36df,'rowCount':_0x4c36df[_0xa3fd3f(0x1db)],'elapsed':_0xc816b},'message':_0xa3fd3f(0x1dd)+_0x4c36df[_0xa3fd3f(0x1db)]+'\x20row(s)\x20in\x20'+_0xc816b+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a40_0x4924(_0x41de01,_0x3ce609){_0x41de01=_0x41de01-0xf4;const _0x58be14=a40_0x58be();let _0x49245d=_0x58be14[_0x41de01];return _0x49245d;}(function(_0x4f08fb,_0x2024a0){const _0x5ec78b=a40_0x4924,_0xd7ce4e=_0x4f08fb();while(!![]){try{const _0x177bd7=parseInt(_0x5ec78b(0xf6))/0x1+-parseInt(_0x5ec78b(0xfb))/0x2*(parseInt(_0x5ec78b(0xf9))/0x3)+-parseInt(_0x5ec78b(0xfd))/0x4+-parseInt(_0x5ec78b(0xfa))/0x5*(-parseInt(_0x5ec78b(0xf7))/0x6)+parseInt(_0x5ec78b(0xf4))/0x7+-parseInt(_0x5ec78b(0xf5))/0x8*(-parseInt(_0x5ec78b(0xf8))/0x9)+-parseInt(_0x5ec78b(0xfc))/0xa;if(_0x177bd7===_0x2024a0)break;else _0xd7ce4e['push'](_0xd7ce4e['shift']());}catch(_0x2a2a5d){_0xd7ce4e['push'](_0xd7ce4e['shift']());}}}(a40_0x58be,0x9e276));function a40_0x58be(){const _0xb00d92=['732447gXacBE','1430166zsTldg','20097ChVTYM','19011Tzqzyb','20SitJHi','212tIuGUp','14380820XCSzyc','1036212vvFyVn','1515479rXXcBl','3992TwrGau'];a40_0x58be=function(){return _0xb00d92;};return a40_0x58be();}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 a40_0x4b82ff=a40_0x3573;(function(_0xead670,_0x22e878){const _0x14a349=a40_0x3573,_0x37f1b4=_0xead670();while(!![]){try{const _0x18aeb7=parseInt(_0x14a349(0xe1))/0x1+-parseInt(_0x14a349(0xf7))/0x2*(parseInt(_0x14a349(0xb4))/0x3)+parseInt(_0x14a349(0xcc))/0x4*(parseInt(_0x14a349(0xe7))/0x5)+parseInt(_0x14a349(0xde))/0x6*(parseInt(_0x14a349(0xe8))/0x7)+parseInt(_0x14a349(0xda))/0x8+-parseInt(_0x14a349(0xbf))/0x9*(-parseInt(_0x14a349(0xb0))/0xa)+-parseInt(_0x14a349(0xfb))/0xb*(parseInt(_0x14a349(0xf1))/0xc);if(_0x18aeb7===_0x22e878)break;else _0x37f1b4['push'](_0x37f1b4['shift']());}catch(_0x509d4b){_0x37f1b4['push'](_0x37f1b4['shift']());}}}(a40_0x4a79,0x43744));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':a40_0x4b82ff(0xb3),'type':a40_0x4b82ff(0xfc),'description':a40_0x4b82ff(0xae),'default':![]},{'name':a40_0x4b82ff(0xd4),'type':a40_0x4b82ff(0xfc),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a40_0x4b82ff(0xdb),'type':'string','description':a40_0x4b82ff(0xf3)},{'name':'no-skills','type':'boolean','description':a40_0x4b82ff(0xb5),'default':![]},{'name':a40_0x4b82ff(0xc8),'type':a40_0x4b82ff(0xfc),'description':a40_0x4b82ff(0xb2),'default':!![],'hidden':!![]}];function parseSemver(_0x27a9a0){const _0x3608d5=a40_0x4b82ff,_0xa099ad=_0x27a9a0[_0x3608d5(0xb1)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0xa099ad)return null;return{'major':Number(_0xa099ad[0x1]),'minor':Number(_0xa099ad[0x2]),'patch':Number(_0xa099ad[0x3]),'prerelease':_0xa099ad[0x4]};}function compareSemver(_0x5a15f0,_0x55e183){const _0x649b92=a40_0x4b82ff,_0x565ff0=parseSemver(_0x5a15f0),_0x31840c=parseSemver(_0x55e183);if(!_0x565ff0||!_0x31840c)throw CliErrors[_0x649b92(0xdc)](_0x649b92(0xeb),_0x649b92(0xb8));for(const _0x1c63bc of[_0x649b92(0xe5),_0x649b92(0xca),_0x649b92(0xf9)]){if(_0x565ff0[_0x1c63bc]<_0x31840c[_0x1c63bc])return-0x1;if(_0x565ff0[_0x1c63bc]>_0x31840c[_0x1c63bc])return 0x1;}if(!_0x565ff0[_0x649b92(0xed)]&&!_0x31840c[_0x649b92(0xed)])return 0x0;if(!_0x565ff0[_0x649b92(0xed)])return 0x1;if(!_0x31840c[_0x649b92(0xed)])return-0x1;if(_0x565ff0['prerelease']===_0x31840c['prerelease'])return 0x0;return _0x565ff0['prerelease']<_0x31840c['prerelease']?-0x1:0x1;}function a40_0x3573(_0x460243,_0x4b109c){_0x460243=_0x460243-0xae;const _0x4a798c=a40_0x4a79();let _0x357378=_0x4a798c[_0x460243];return _0x357378;}function getRequestedVersion(_0x11c2d9){const _0x35537a=a40_0x4b82ff,_0x4044f2=_0x11c2d9['str'](_0x35537a(0xdb))[_0x35537a(0xb1)]();if(_0x4044f2)return _0x4044f2;return String(_0x11c2d9['args']?.[0x0]??'')[_0x35537a(0xb1)]();}function shouldSkipOfficialSkill(_0x5a78e6){const _0x21d5f6=a40_0x4b82ff;return _0x5a78e6[_0x21d5f6(0xd8)](_0x21d5f6(0xc0))||_0x5a78e6[_0x21d5f6(0xf6)](_0x21d5f6(0xc8))===![];}async function validateUpdateFlags(_0x35829f){const _0x25159b=a40_0x4b82ff,_0x1410c6=getRequestedVersion(_0x35829f),_0x33cf23=[_0x35829f['bool'](_0x25159b(0xb3))?_0x25159b(0xb3):'',_0x35829f[_0x25159b(0xd8)](_0x25159b(0xd4))?_0x25159b(0xd4):'',_0x1410c6?_0x25159b(0xdb):''][_0x25159b(0xe9)](Boolean);if(_0x33cf23[_0x25159b(0xbe)]>0x1)throw CliErrors[_0x25159b(0xdc)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.',_0x25159b(0xd1));if(_0x1410c6&&!parseSemver(_0x1410c6))throw CliErrors[_0x25159b(0xdc)](_0x25159b(0xbb)+_0x1410c6,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x118e28=a40_0x4b82ff;try{const _0x199b6e=NPM_REGISTRY_BASE_URL+_0x118e28(0xcb)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x118e28(0xf0),_0x557e4a=await fetch(_0x199b6e,{'signal':AbortSignal[_0x118e28(0xc5)](0x2710)});if(!_0x557e4a['ok'])return null;const _0x438234=await _0x557e4a[_0x118e28(0xee)]();if(!_0x438234||typeof _0x438234!=='object')return null;return Object[_0x118e28(0xd0)](Object[_0x118e28(0xbc)](_0x438234)['filter'](([,_0x21179e])=>typeof _0x21179e===_0x118e28(0xef)&&_0x21179e[_0x118e28(0xb1)]())['map'](([_0x4bd539,_0x422fcb])=>[_0x4bd539,String(_0x422fcb)[_0x118e28(0xb1)]()]));}catch{return null;}}function a40_0x4a79(){const _0x259f99=['prerelease','json','string','/dist-tags','920316kPltHI','warn','Install\x20a\x20specific\x20CLI\x20version','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','pipe','flag','101986ORcEOz','Update\x20','patch','nonInteractive','209xFTQLd','boolean','exit\x20','unknown','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Checking\x20npm\x20dist-tags...','3057370iFjsyE','trim','Refresh\x20official\x20skill\x20package\x20after\x20updating','latest','6EjBkdT','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','stdout','\x20\x20Skipped\x20skill\x20install\x20(','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','Updated\x20to\x20v','skipped','Invalid\x20version:\x20','entries','Already\x20on\x20requested\x20version\x20(v','length','9iPUptQ','no-skills','message','write','\x20version\x20from\x20npm.','Skipping\x20official\x20skill\x20package\x20(--no-skills).','timeout','log','\x20\x20Run\x20manually:\x20npx\x20skills\x20add\x20','skills','Checking\x20official\x20skill\x20package...','minor','/-/package/','488524bqjDEW','toString','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','stderr','fromEntries','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','Unable\x20to\x20resolve\x20','=1).','beta','error','source','Current\x20version:\x20','bool','\x20->\x20','2217624KuAaaV','version','validation','inherit','318haFXuc','status','join','422521bdcSrE','npm','\x20-g\x20-y','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','major','\x20\x20Official\x20skill\x20update\x20failed:\x20','15MKGtME','61229fEmLNR','filter','Update\x20failed:\x20','Version\x20comparison\x20failed.','\x20CLI\x20from\x20npm'];a40_0x4a79=function(){return _0x259f99;};return a40_0x4a79();}async function resolveTargetVersion(_0x4fd986){const _0x1605ce=a40_0x4b82ff,_0x378eb3=getRequestedVersion(_0x4fd986);if(_0x378eb3)return{'version':_0x378eb3,'source':'version'};const _0xca461c=_0x4fd986['bool'](_0x1605ce(0xd4))?_0x1605ce(0xd4):'latest',_0x37dd7b=await fetchNpmDistTags(),_0x2784c3=_0x37dd7b?.[_0xca461c];if(!_0x2784c3)return null;return{'version':_0x2784c3,'source':_0xca461c};}function shouldInstallTarget(_0x2c8673,_0x14aba5){const _0xe16bb8=a40_0x4b82ff,_0x4cff45=compareSemver(_0x2c8673,_0x14aba5[_0xe16bb8(0xdb)]);if(_0x14aba5['source']===_0xe16bb8(0xdb))return _0x4cff45!==0x0;return _0x4cff45<0x0;}function installCliPackage(_0x1af7a6,_0x6f1631){const _0x5b4af4=a40_0x4b82ff,_0x192a1c=resolveNpmBin(_0x5b4af4(0xe2)),_0x1ebef5=['install','-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1af7a6];console[_0x5b4af4(0xc6)]('*\x20'+[_0x192a1c,..._0x1ebef5][_0x5b4af4(0xe0)]('\x20'));const _0x19df2f=spawnSync(_0x192a1c,_0x1ebef5,{'cwd':process['cwd'](),'stdio':_0x6f1631?_0x5b4af4(0xf5):_0x5b4af4(0xdd),'env':process.env,'shell':![]});if(_0x19df2f[_0x5b4af4(0xdf)]===0x0)return{'ok':!![]};let _0x3c556d=_0x19df2f[_0x5b4af4(0xd5)]?.[_0x5b4af4(0xc1)]||_0x5b4af4(0xfd)+(_0x19df2f[_0x5b4af4(0xdf)]??_0x5b4af4(0xfe));if(_0x6f1631){const _0x281a8c=_0x19df2f[_0x5b4af4(0xcf)]?_0x19df2f[_0x5b4af4(0xcf)][_0x5b4af4(0xcd)]()[_0x5b4af4(0xb1)]():'',_0x4126e4=_0x19df2f[_0x5b4af4(0xb6)]?_0x19df2f['stdout'][_0x5b4af4(0xcd)]()['trim']():'';if(_0x281a8c)_0x3c556d=_0x281a8c;else{if(_0x4126e4)_0x3c556d=_0x4126e4;}}return{'ok':![],'error':_0x3c556d};}async function installOfficialSkill(_0x413814){const _0x5db573=a40_0x4b82ff;console[_0x5db573(0xc6)](_0x5db573(0xc9));const _0x5d823a=runNpxSkillsAddGlobal(process['cwd'](),LOVRABET_SKILL_SOURCE,{'stdio':_0x413814?_0x5db573(0xf5):_0x5db573(0xdd)});if(_0x5d823a[_0x5db573(0xba)]){console[_0x5db573(0xc6)](_0x5db573(0xb7)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x5db573(0xd3));return;}if(_0x5d823a['ok']){console[_0x5db573(0xc6)](_0x5db573(0xff));return;}console[_0x5db573(0xf2)](_0x5db573(0xe6)+(_0x5d823a['error']||_0x5db573(0xfe))),console[_0x5db573(0xc6)](_0x5db573(0xc7)+LOVRABET_SKILL_SOURCE+_0x5db573(0xe3));}async function execute(_0x527054){const _0x161814=a40_0x4b82ff;await validateUpdateFlags(_0x527054);const _0x5acfcf=getCliVersion();console[_0x161814(0xc6)](_0x161814(0xd7)+_0x5acfcf),console[_0x161814(0xc6)](_0x161814(0xaf));const _0x4caa0f=await resolveTargetVersion(_0x527054);if(!_0x4caa0f){const _0x5e2de1=_0x527054[_0x161814(0xd8)](_0x161814(0xd4))?_0x161814(0xd4):_0x161814(0xb3),_0x5a79be=_0x161814(0xd2)+_0x5e2de1+_0x161814(0xc3);return console[_0x161814(0xf2)](_0x5a79be),console[_0x161814(0xc6)](_0x161814(0xce)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x5e2de1),{'ok':![]};}if(!shouldInstallTarget(_0x5acfcf,_0x4caa0f)){const _0x517bd9=_0x4caa0f[_0x161814(0xd6)]===_0x161814(0xdb)?_0x161814(0xbd)+_0x4caa0f['version']+').':'Already\x20up\x20to\x20date\x20(v'+_0x4caa0f[_0x161814(0xdb)]+').';return console[_0x161814(0xc6)](_0x517bd9),shouldSkipOfficialSkill(_0x527054)?console[_0x161814(0xc6)](_0x161814(0xc4)):await installOfficialSkill(_0x527054['nonInteractive']),{'ok':!![]};}console[_0x161814(0xc6)]('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x5acfcf+_0x161814(0xd9)+_0x4caa0f[_0x161814(0xdb)]);const _0x10699c=installCliPackage(_0x4caa0f[_0x161814(0xdb)],_0x527054[_0x161814(0xfa)]);if(!_0x10699c['ok']){const _0x4ae343=_0x161814(0xea)+(_0x10699c[_0x161814(0xd5)]||'unknown');return console[_0x161814(0xd5)](_0x4ae343),console[_0x161814(0xc6)](_0x161814(0xf4)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4caa0f[_0x161814(0xdb)]),{'ok':![]};}return console[_0x161814(0xc6)](_0x161814(0xb9)+_0x4caa0f[_0x161814(0xdb)]+'.'),console['log'](_0x161814(0xe4)),shouldSkipOfficialSkill(_0x527054)?console[_0x161814(0xc6)](_0x161814(0xc4)):await installOfficialSkill(_0x527054[_0x161814(0xfa)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':'run','description':a40_0x4b82ff(0xf8)+CLI_BIN_NAME+a40_0x4b82ff(0xec),'risk':a40_0x4b82ff(0xc2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a41_0x5befc2=a41_0x30a9;(function(_0x4989b5,_0x2b14c2){const _0x514494=a41_0x30a9,_0x46886b=_0x4989b5();while(!![]){try{const _0x522c6c=-parseInt(_0x514494(0x1e7))/0x1+-parseInt(_0x514494(0x215))/0x2*(parseInt(_0x514494(0x211))/0x3)+-parseInt(_0x514494(0x20f))/0x4+-parseInt(_0x514494(0x1ef))/0x5+parseInt(_0x514494(0x1fb))/0x6+parseInt(_0x514494(0x20a))/0x7+-parseInt(_0x514494(0x229))/0x8*(-parseInt(_0x514494(0x1fa))/0x9);if(_0x522c6c===_0x2b14c2)break;else _0x46886b['push'](_0x46886b['shift']());}catch(_0xc6dfde){_0x46886b['push'](_0x46886b['shift']());}}}(a41_0x44ff,0xa4637));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':a41_0x5befc2(0x20e),'type':'boolean','description':a41_0x5befc2(0x1fd),'default':![]},{'name':a41_0x5befc2(0x1e8),'type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a41_0x5befc2(0x1fc),'type':a41_0x5befc2(0x1ec),'description':a41_0x5befc2(0x1df)},{'name':a41_0x5befc2(0x208),'type':a41_0x5befc2(0x1f3),'description':a41_0x5befc2(0x1ea),'default':![]},{'name':a41_0x5befc2(0x219),'type':a41_0x5befc2(0x1f3),'description':a41_0x5befc2(0x1e3),'default':!![],'hidden':!![]}];function a41_0x44ff(){const _0x377498=['352686uVMgXm','beta','Update\x20failed:\x20','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','npm','string','Unable\x20to\x20resolve\x20','filter','1073290oeHJbs','args','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','unknown','boolean','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Updated\x20to\x20v','Already\x20on\x20requested\x20version\x20(v','map','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','error','15430734alyVsL','4132506VunLzP','version','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Updating\x20','\x20->\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','fromEntries','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','object','warn','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','no-skills','Current\x20version:\x20','1589721WgxxSC','bool','Invalid\x20version:\x20','trim','latest','5054380VOHvuv','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','22254rBIJLc','cwd','stdout','Version\x20comparison\x20failed.','34mlgWoD','\x20CLI\x20from\x20npm','Already\x20up\x20to\x20date\x20(v','stderr','skills','prerelease','flag','write','validation','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','inherit','source','run','install','/dist-tags','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','update','minor','nonInteractive','=1).','8yLmoBF','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','major','str','Install\x20a\x20specific\x20CLI\x20version','Update\x20','join','status','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','Checking\x20CLI\x20Built-in\x20Skill...','log','pipe'];a41_0x44ff=function(){return _0x377498;};return a41_0x44ff();}function parseSemver(_0x2fce04){const _0x408474=a41_0x5befc2,_0x5c68be=_0x2fce04[_0x408474(0x20d)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x5c68be)return null;return{'major':Number(_0x5c68be[0x1]),'minor':Number(_0x5c68be[0x2]),'patch':Number(_0x5c68be[0x3]),'prerelease':_0x5c68be[0x4]};}function compareSemver(_0x27ad5b,_0x2df2e1){const _0x425a51=a41_0x5befc2,_0x10bc28=parseSemver(_0x27ad5b),_0x36e62e=parseSemver(_0x2df2e1);if(!_0x10bc28||!_0x36e62e)throw CliErrors['validation'](_0x425a51(0x214),_0x425a51(0x207));for(const _0x22c668 of[_0x425a51(0x22b),_0x425a51(0x226),'patch']){if(_0x10bc28[_0x22c668]<_0x36e62e[_0x22c668])return-0x1;if(_0x10bc28[_0x22c668]>_0x36e62e[_0x22c668])return 0x1;}if(!_0x10bc28[_0x425a51(0x21a)]&&!_0x36e62e[_0x425a51(0x21a)])return 0x0;if(!_0x10bc28['prerelease'])return 0x1;if(!_0x36e62e[_0x425a51(0x21a)])return-0x1;if(_0x10bc28['prerelease']===_0x36e62e[_0x425a51(0x21a)])return 0x0;return _0x10bc28['prerelease']<_0x36e62e[_0x425a51(0x21a)]?-0x1:0x1;}function getRequestedVersion(_0x49cacb){const _0x2ed03d=a41_0x5befc2,_0x5d964f=_0x49cacb[_0x2ed03d(0x1de)](_0x2ed03d(0x1fc))[_0x2ed03d(0x20d)]();if(_0x5d964f)return _0x5d964f;return String(_0x49cacb[_0x2ed03d(0x1f0)]?.[0x0]??'')['trim']();}function shouldSkipCliBuiltInSkill(_0x214f00){const _0x5a1e95=a41_0x5befc2;return _0x214f00[_0x5a1e95(0x20b)](_0x5a1e95(0x208))||_0x214f00[_0x5a1e95(0x21b)](_0x5a1e95(0x219))===![];}async function validateUpdateFlags(_0x217acd){const _0x42042b=a41_0x5befc2,_0x1ff362=getRequestedVersion(_0x217acd),_0x37240f=[_0x217acd[_0x42042b(0x20b)]('latest')?'latest':'',_0x217acd[_0x42042b(0x20b)](_0x42042b(0x1e8))?_0x42042b(0x1e8):'',_0x1ff362?'version':''][_0x42042b(0x1ee)](Boolean);if(_0x37240f['length']>0x1)throw CliErrors[_0x42042b(0x21d)](_0x42042b(0x21e),_0x42042b(0x1f1));if(_0x1ff362&&!parseSemver(_0x1ff362))throw CliErrors[_0x42042b(0x21d)](_0x42042b(0x20c)+_0x1ff362,_0x42042b(0x224));}function a41_0x30a9(_0x4fed59,_0x131226){_0x4fed59=_0x4fed59-0x1de;const _0x44ffb5=a41_0x44ff();let _0x30a9c8=_0x44ffb5[_0x4fed59];return _0x30a9c8;}async function fetchNpmDistTags(){const _0x414e35=a41_0x5befc2;try{const _0x210efa=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x414e35(0x223),_0x9f514c=await fetch(_0x210efa,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x9f514c['ok'])return null;const _0xa26f1d=await _0x9f514c['json']();if(!_0xa26f1d||typeof _0xa26f1d!==_0x414e35(0x203))return null;return Object[_0x414e35(0x201)](Object['entries'](_0xa26f1d)[_0x414e35(0x1ee)](([,_0x529be7])=>typeof _0x529be7===_0x414e35(0x1ec)&&_0x529be7[_0x414e35(0x20d)]())[_0x414e35(0x1f7)](([_0x40be76,_0x539bcb])=>[_0x40be76,String(_0x539bcb)[_0x414e35(0x20d)]()]));}catch{return null;}}async function resolveTargetVersion(_0x18879e){const _0x1b0aaf=a41_0x5befc2,_0x12cdbf=getRequestedVersion(_0x18879e);if(_0x12cdbf)return{'version':_0x12cdbf,'source':_0x1b0aaf(0x1fc)};const _0x338890=_0x18879e[_0x1b0aaf(0x20b)](_0x1b0aaf(0x1e8))?_0x1b0aaf(0x1e8):'latest',_0xd8f65f=await fetchNpmDistTags(),_0x1fcd35=_0xd8f65f?.[_0x338890];if(!_0x1fcd35)return null;return{'version':_0x1fcd35,'source':_0x338890};}function shouldInstallTarget(_0xe61cc7,_0x2a218f){const _0x53407f=a41_0x5befc2,_0x5efdcd=compareSemver(_0xe61cc7,_0x2a218f[_0x53407f(0x1fc)]);if(_0x2a218f[_0x53407f(0x220)]===_0x53407f(0x1fc))return _0x5efdcd!==0x0;return _0x5efdcd<0x0;}function installCliPackage(_0x542b4f,_0x1f35df){const _0x4a4a08=a41_0x5befc2,_0x47bab4=resolveNpmBin(_0x4a4a08(0x1eb)),_0x5ecdaa=[_0x4a4a08(0x222),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x542b4f];console['log']('*\x20'+[_0x47bab4,..._0x5ecdaa][_0x4a4a08(0x1e1)]('\x20'));const _0x2ecfab=spawnSync(_0x47bab4,_0x5ecdaa,{'cwd':process[_0x4a4a08(0x212)](),'stdio':_0x1f35df?_0x4a4a08(0x1e6):'inherit','env':process.env,'shell':![]});if(_0x2ecfab['status']===0x0)return{'ok':!![]};let _0xa512db=_0x2ecfab[_0x4a4a08(0x1f9)]?.['message']||'exit\x20'+(_0x2ecfab[_0x4a4a08(0x1e2)]??_0x4a4a08(0x1f2));if(_0x1f35df){const _0x4966de=_0x2ecfab[_0x4a4a08(0x218)]?_0x2ecfab[_0x4a4a08(0x218)]['toString']()[_0x4a4a08(0x20d)]():'',_0x486a9a=_0x2ecfab[_0x4a4a08(0x213)]?_0x2ecfab[_0x4a4a08(0x213)]['toString']()['trim']():'';if(_0x4966de)_0xa512db=_0x4966de;else{if(_0x486a9a)_0xa512db=_0x486a9a;}}return{'ok':![],'error':_0xa512db};}async function installCliBuiltInSkill(_0x56baa9){const _0x475a67=a41_0x5befc2;console[_0x475a67(0x1e5)](_0x475a67(0x1e4));const _0x10eb90=runNpxSkillsAddGlobal(process['cwd'](),LOVRABET_SKILL_SOURCE,{'stdio':_0x56baa9?_0x475a67(0x1e6):_0x475a67(0x21f)});if(_0x10eb90['skipped']){console[_0x475a67(0x1e5)](_0x475a67(0x22a)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x475a67(0x228));return;}if(_0x10eb90['ok']){console[_0x475a67(0x1e5)](_0x475a67(0x210));return;}console[_0x475a67(0x204)](_0x475a67(0x1f4)+(_0x10eb90[_0x475a67(0x1f9)]||'unknown')),console['log'](_0x475a67(0x202));}async function execute(_0x4ef587){const _0xb80cb2=a41_0x5befc2;await validateUpdateFlags(_0x4ef587);const _0x281476=getCliVersion();console[_0xb80cb2(0x1e5)](_0xb80cb2(0x209)+_0x281476),console[_0xb80cb2(0x1e5)]('Checking\x20npm\x20dist-tags...');const _0x134526=await resolveTargetVersion(_0x4ef587);if(!_0x134526){const _0x5603be=_0x4ef587[_0xb80cb2(0x20b)](_0xb80cb2(0x1e8))?_0xb80cb2(0x1e8):'latest',_0x508691=_0xb80cb2(0x1ed)+_0x5603be+'\x20version\x20from\x20npm.';return console[_0xb80cb2(0x204)](_0x508691),console['log'](_0xb80cb2(0x1f8)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x5603be),{'ok':![]};}if(!shouldInstallTarget(_0x281476,_0x134526)){const _0x4a61d0=_0x134526[_0xb80cb2(0x220)]===_0xb80cb2(0x1fc)?_0xb80cb2(0x1f6)+_0x134526[_0xb80cb2(0x1fc)]+').':_0xb80cb2(0x217)+_0x134526[_0xb80cb2(0x1fc)]+').';return console[_0xb80cb2(0x1e5)](_0x4a61d0),shouldSkipCliBuiltInSkill(_0x4ef587)?console[_0xb80cb2(0x1e5)](_0xb80cb2(0x206)):await installCliBuiltInSkill(_0x4ef587[_0xb80cb2(0x227)]),{'ok':!![]};}console[_0xb80cb2(0x1e5)](_0xb80cb2(0x1fe)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x281476+_0xb80cb2(0x1ff)+_0x134526['version']);const _0xecbdd8=installCliPackage(_0x134526[_0xb80cb2(0x1fc)],_0x4ef587[_0xb80cb2(0x227)]);if(!_0xecbdd8['ok']){const _0x548017=_0xb80cb2(0x1e9)+(_0xecbdd8['error']||_0xb80cb2(0x1f2));return console[_0xb80cb2(0x1f9)](_0x548017),console[_0xb80cb2(0x1e5)](_0xb80cb2(0x205)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x134526[_0xb80cb2(0x1fc)]),{'ok':![]};}return console[_0xb80cb2(0x1e5)](_0xb80cb2(0x1f5)+_0x134526['version']+'.'),console[_0xb80cb2(0x1e5)](_0xb80cb2(0x200)),shouldSkipCliBuiltInSkill(_0x4ef587)?console['log']('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).'):await installCliBuiltInSkill(_0x4ef587[_0xb80cb2(0x227)]),{'ok':!![]};}export const updateDefinition={'service':a41_0x5befc2(0x225),'command':a41_0x5befc2(0x221),'description':a41_0x5befc2(0x1e0)+CLI_BIN_NAME+a41_0x5befc2(0x216),'risk':a41_0x5befc2(0x21c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x106521=a42_0x1bcf;(function(_0x318ba2,_0x1e2b50){const _0x3cd35c=a42_0x1bcf,_0x532a1b=_0x318ba2();while(!![]){try{const _0x2d792e=-parseInt(_0x3cd35c(0x1ba))/0x1+-parseInt(_0x3cd35c(0x1bd))/0x2+parseInt(_0x3cd35c(0x1b3))/0x3+-parseInt(_0x3cd35c(0x1a5))/0x4+-parseInt(_0x3cd35c(0x1b1))/0x5*(parseInt(_0x3cd35c(0x1a0))/0x6)+parseInt(_0x3cd35c(0x1c9))/0x7+parseInt(_0x3cd35c(0x193))/0x8;if(_0x2d792e===_0x1e2b50)break;else _0x532a1b['push'](_0x532a1b['shift']());}catch(_0x206205){_0x532a1b['push'](_0x532a1b['shift']());}}}(a42_0x4b5f,0x99221));function a42_0x1bcf(_0x417afb,_0x49cde5){_0x417afb=_0x417afb-0x191;const _0x4b5f0d=a42_0x4b5f();let _0x1bcf93=_0x4b5f0d[_0x417afb];return _0x1bcf93;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':'app','type':a42_0x106521(0x1c4),'description':a42_0x106521(0x1ac)},{'name':a42_0x106521(0x1b5),'type':'string','description':a42_0x106521(0x1a2)},{'name':a42_0x106521(0x1b8),'type':a42_0x106521(0x1c4),'description':a42_0x106521(0x195),'enum':[...RUNTIME_ENV_VALUES]},{'name':'yes','type':a42_0x106521(0x1be),'description':a42_0x106521(0x1a7),'default':![]}];async function executeWorkspaceUse(_0x465474,_0x34959a){const _0x4e950f=a42_0x106521,_0x20054d=_0x465474[_0x4e950f(0x1c3)]('app')[_0x4e950f(0x1a1)](),_0xaf77c=_0x465474[_0x4e950f(0x1c3)](_0x4e950f(0x1b5))['trim'](),_0x360c32=_0x465474[_0x4e950f(0x1c3)](_0x4e950f(0x1b8))[_0x4e950f(0x1a1)](),_0xe41d39=resolveWorkspaceEnv(_0x360c32||_0x465474[_0x4e950f(0x1a3)]||DEFAULT_CONFIG_VALUES['env']);if(!_0x20054d&&!_0xaf77c)throw CliErrors[_0x4e950f(0x1c2)](_0x4e950f(0x1ae),_0x4e950f(0x19b)+CLI_BIN_NAME+_0x4e950f(0x1ad)+_0x34959a+_0x4e950f(0x1b4)+CLI_BIN_NAME+_0x4e950f(0x1ad)+_0x34959a+_0x4e950f(0x196));const _0x35bdd0=_0xaf77c||await resolveRemoteAppCode({'command':_0x34959a,'appName':_0x20054d,'env':_0xe41d39,'accessKey':_0x465474[_0x4e950f(0x1c7)]}),_0x2763d6=writeWorkspaceConfig({'command':_0x34959a,'appName':_0x20054d,'appcode':_0x35bdd0,'env':_0xe41d39,'shouldWriteEnv':!!_0x360c32,'accessKey':_0x465474[_0x4e950f(0x1c7)]});return{'ok':!![],'data':{'configPath':_0x2763d6,'app':_0x20054d||null,'appcode':_0x35bdd0,'env':_0x360c32?_0xe41d39:null,'accessKeyWritten':![],'command':_0x4e950f(0x1b9)+_0x34959a},'message':buildWorkspaceMessage(_0x2763d6,_0x20054d,_0x35bdd0,_0x360c32?_0xe41d39:undefined)};}async function resolveRemoteAppCode(_0x5d7362){const _0xde613b=a42_0x106521;if(!_0x5d7362['accessKey'])throw CliErrors[_0xde613b(0x19a)](_0xde613b(0x191)+CLI_BIN_NAME+_0xde613b(0x1ad)+_0x5d7362['command']+'.');const {setActiveAK:_0x47b719}=await import(_0xde613b(0x1aa)),{getRemoteAppList:_0x515654}=await import(_0xde613b(0x1a4));_0x47b719(_0x5d7362[_0xde613b(0x1c7)]);const _0x5c2e17=await _0x515654({'env':_0x5d7362['env'],'accessKey':_0x5d7362[_0xde613b(0x1c7)],'noCache':![]}),_0x352a2b=findAppByName(_0x5c2e17['items'],_0x5d7362[_0xde613b(0x1bc)]);if(_0x352a2b&&!isRuntimeAccessibleApp(_0x352a2b))throw runtimeInaccessibleAppError(_0x352a2b,'\x22'+_0x5d7362[_0xde613b(0x1bc)]+'\x22');const _0x1fb30b=_0x352a2b?.[_0xde613b(0x1af)]?.[_0xde613b(0x1a1)]();if(_0x1fb30b)return _0x1fb30b;const _0x4b1c55=_0x5c2e17[_0xde613b(0x19e)][_0xde613b(0x1ab)](_0xd2d72e=>_0xd2d72e[_0xde613b(0x1bc)])[_0xde613b(0x1b2)](Boolean),_0x334aa2=_0x4b1c55[_0xde613b(0x1a8)]?_0xde613b(0x1b7)+Array['from'](new Set(_0x4b1c55))['join'](',\x20')+'.':'Run\x20`'+CLI_BIN_NAME+_0xde613b(0x1bb);throw CliErrors[_0xde613b(0x1c2)]('App\x20\x22'+_0x5d7362[_0xde613b(0x1bc)]+_0xde613b(0x19d),_0x334aa2);}function writeWorkspaceConfig(_0x24b1c8){const _0x52aa60=a42_0x106521,_0xca5e89=resolveWriteConfigPath(_0x52aa60(0x1c0)),_0x4203b1=readConfigFile(_0xca5e89);_0x24b1c8[_0x52aa60(0x1a9)]&&(_0x4203b1[_0x52aa60(0x1b8)]=_0x24b1c8[_0x52aa60(0x1b8)]);if(_0x24b1c8[_0x52aa60(0x1bc)]){const _0x1016df=isRecord(_0x4203b1[_0x52aa60(0x197)])?{..._0x4203b1[_0x52aa60(0x197)]}:{},_0x327e36=isRecord(_0x1016df[_0x24b1c8[_0x52aa60(0x1bc)]])?_0x1016df[_0x24b1c8['appName']]:{};_0x1016df[_0x24b1c8[_0x52aa60(0x1bc)]]={..._0x327e36,'appcode':_0x24b1c8['appcode']},_0x4203b1['apps']=_0x1016df,_0x4203b1[_0x52aa60(0x1bf)]=_0x24b1c8['appName'];if(_0x4203b1[_0x52aa60(0x199)])delete _0x4203b1[_0x52aa60(0x199)];return writeAndReturn(_0xca5e89,_0x4203b1);}_0x4203b1[_0x52aa60(0x1b5)]=_0x24b1c8[_0x52aa60(0x1b5)];if(_0x4203b1[_0x52aa60(0x199)])delete _0x4203b1[_0x52aa60(0x199)];return writeAndReturn(_0xca5e89,_0x4203b1);}function a42_0x4b5f(){const _0x38d5ad=['accessKey','isArray','8179304xXUGok','init','Invalid\x20env\x20\x22','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','workspace','2511672zkKQot','object','Target\x20environment','\x20--appcode\x20<code>\x20[--env\x20daily]','apps','Workspace\x20configured.\x0aConfig\x20file:\x20','app','authRequired','Usage:\x20','\x22.\x20Allowed:\x20','\x22\x20not\x20found.','items','write','6906JexPpj','trim','App\x20code\x20to\x20bind\x20directly','envName','../../commands/app/remote-source.js','2470724bwrqto','\x0aEnv:\x20','Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','length','shouldWriteEnv','../../core/api-client.js','map','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','\x20workspace\x20','Missing\x20workspace\x20app\x20selector.','appCode','includes','1690kYVfie','filter','765603kWiFuy','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','appcode','Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace','Available\x20apps:\x20','env','workspace\x20','95922YQJyZl','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','appName','15516ZrLciN','boolean','defaultApp','project','use','validation','str','string','Set\x20app\x20context\x20for\x20the\x20current\x20workspace','join'];a42_0x4b5f=function(){return _0x38d5ad;};return a42_0x4b5f();}function writeAndReturn(_0x771f08,_0x42b8bf){return writeConfigFile(_0x771f08,_0x42b8bf),_0x771f08;}function resolveWorkspaceEnv(_0x1a0f01){const _0x5ec2b2=a42_0x106521;if(RUNTIME_ENV_VALUES[_0x5ec2b2(0x1b0)](_0x1a0f01))return _0x1a0f01;throw CliErrors[_0x5ec2b2(0x1c2)](_0x5ec2b2(0x1cb)+_0x1a0f01+_0x5ec2b2(0x19c)+RUNTIME_ENV_VALUES[_0x5ec2b2(0x1c6)](',\x20'));}function buildWorkspaceMessage(_0x274a51,_0x268f16,_0x1e9514,_0x41bdc2){const _0xae1d55=a42_0x106521,_0xbef1=_0x268f16?_0x268f16+'\x20('+_0x1e9514+')':_0x1e9514,_0x164556=_0x41bdc2?_0xae1d55(0x1a6)+_0x41bdc2:'';return _0xae1d55(0x198)+_0x274a51+'\x0aDefault\x20app:\x20'+_0xbef1+_0x164556+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0xecba6b){const _0x5b18ad=a42_0x106521;return typeof _0xecba6b===_0x5b18ad(0x194)&&_0xecba6b!==null&&!Array[_0x5b18ad(0x1c8)](_0xecba6b);}function makeWorkspaceCommand(_0xe8e935){const _0x198978=a42_0x106521;return{'service':_0x198978(0x192),'command':_0xe8e935,'description':_0xe8e935==='init'?_0x198978(0x1b6):_0x198978(0x1c5),'risk':_0x198978(0x19f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x5f5812){return executeWorkspaceUse(_0x5f5812,_0xe8e935);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a42_0x106521(0x1ca)),makeWorkspaceCommand(a42_0x106521(0x1c1))];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x185a6f=a43_0x543d;(function(_0x441907,_0x355e5b){const _0xad452f=a43_0x543d,_0x54ffdf=_0x441907();while(!![]){try{const _0x5b907a=parseInt(_0xad452f(0xec))/0x1+-parseInt(_0xad452f(0xea))/0x2*(-parseInt(_0xad452f(0xf4))/0x3)+-parseInt(_0xad452f(0xe6))/0x4+parseInt(_0xad452f(0xe3))/0x5+-parseInt(_0xad452f(0xfa))/0x6*(parseInt(_0xad452f(0xf3))/0x7)+parseInt(_0xad452f(0xeb))/0x8+-parseInt(_0xad452f(0xe7))/0x9*(parseInt(_0xad452f(0xe9))/0xa);if(_0x5b907a===_0x355e5b)break;else _0x54ffdf['push'](_0x54ffdf['shift']());}catch(_0x46fc56){_0x54ffdf['push'](_0x54ffdf['shift']());}}}(a43_0x10f4,0x7f35c));function a43_0x10f4(){const _0x381e98=['Override\x20SkillHub\x20domain','1497008fXQDvR','18NMVfTC','map','6637630NliyUQ','75778vpIfWv','2370656FLosBw','818700aiuQPO','entries','defaultValue','Target\x20environment','locale','cliSettableTopLevel','Risk\x20level','290584JptgYD','78mNvetr','Default\x20page\x20size','Locale','Config\x20key.\x20Top-level:\x20','enumValues','Default\x20output\x20format','36lUdYWO','importable','has','env','Override\x20runtime\x20domain','1858780asbdyZ','filter'];a43_0x10f4=function(){return _0x381e98;};return a43_0x10f4();}function a43_0x543d(_0x5220cc,_0x25b9b9){_0x5220cc=_0x5220cc-0xe0;const _0x10f438=a43_0x10f4();let _0x543db1=_0x10f438[_0x5220cc];return _0x543db1;}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':a43_0x185a6f(0xef),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a43_0x185a6f(0xe1)],'importable':!![]},'format':{'description':a43_0x185a6f(0xf9),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['format'],'importable':!![]},'pageSize':{'description':a43_0x185a6f(0xf5),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':'Override\x20API\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':'Override\x20user\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a43_0x185a6f(0xe2),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a43_0x185a6f(0xe5),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':'Access\x20key\x20(client-ak\x20auth)','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a43_0x185a6f(0xf2),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['riskLevel'],'importable':!![]},'locale':{'description':a43_0x185a6f(0xf6),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a43_0x185a6f(0xf0)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a43_0x185a6f(0xed)](CONFIG_FIELD_SCHEMAS)[a43_0x185a6f(0xe4)](([,_0x1363b5])=>_0x1363b5[a43_0x185a6f(0xf1)])[a43_0x185a6f(0xe8)](([_0x1eaba5])=>_0x1eaba5));export const CONFIG_ENUM_VALUES=Object['fromEntries'](Object['entries'](CONFIG_FIELD_SCHEMAS)[a43_0x185a6f(0xe4)](([,_0x10f144])=>_0x10f144['enumValues'])[a43_0x185a6f(0xe8)](([_0x3a1e94,_0x10d166])=>[_0x3a1e94,[..._0x10d166['enumValues']||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a43_0x185a6f(0xed)](CONFIG_FIELD_SCHEMAS)[a43_0x185a6f(0xe4)](([,_0x2301a4])=>_0x2301a4[a43_0x185a6f(0xfb)])[a43_0x185a6f(0xe8)](([_0x36ff2d])=>_0x36ff2d);export function getConfigFieldSchema(_0x56ad51){return CONFIG_FIELD_SCHEMAS[_0x56ad51];}export function getConfigEnumValues(_0x54d27a){const _0x159a31=a43_0x185a6f;return getConfigFieldSchema(_0x54d27a)?.[_0x159a31(0xf8)];}export function getConfigDefaultValue(_0x28336b){const _0x30c215=a43_0x185a6f;return getConfigFieldSchema(_0x28336b)?.[_0x30c215(0xee)];}export function isTopLevelConfigKey(_0x112917){const _0x5e83cc=a43_0x185a6f;return TOP_LEVEL_CONFIG_KEYS[_0x5e83cc(0xe0)](_0x112917);}export function isLegacyCompatConfigKey(_0x2129bb){return getConfigFieldSchema(_0x2129bb)?.['legacyCompatOnly']===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x2b788f){return[..._0x2b788f]['join'](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x12dad4=a43_0x185a6f;return _0x12dad4(0xf7)+getTopLevelConfigKeySummary()+';\x20local\x20alias:\x20apps.<alias>.appcode';}export function buildAppProfileListFields(_0x56b407){return{'env':_0x56b407,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a44_0x375d(_0x3f7d61,_0x5d0ba6){_0x3f7d61=_0x3f7d61-0x64;const _0x19918e=a44_0x1991();let _0x375df8=_0x19918e[_0x3f7d61];return _0x375df8;}const a44_0x40c2e0=a44_0x375d;(function(_0x1263b4,_0x4041bc){const _0x6fb88c=a44_0x375d,_0x1178a7=_0x1263b4();while(!![]){try{const _0x1e2421=parseInt(_0x6fb88c(0x66))/0x1+-parseInt(_0x6fb88c(0x69))/0x2+parseInt(_0x6fb88c(0x6b))/0x3+-parseInt(_0x6fb88c(0x65))/0x4*(-parseInt(_0x6fb88c(0x6d))/0x5)+parseInt(_0x6fb88c(0x6c))/0x6+-parseInt(_0x6fb88c(0x6a))/0x7*(-parseInt(_0x6fb88c(0x68))/0x8)+-parseInt(_0x6fb88c(0x6e))/0x9;if(_0x1e2421===_0x4041bc)break;else _0x1178a7['push'](_0x1178a7['shift']());}catch(_0x57d3e0){_0x1178a7['push'](_0x1178a7['shift']());}}}(a44_0x1991,0xec36a));function a44_0x1991(){const _0x476682=['2920aJcPQt','1434195rfnWep','UNPUBLISH','8112jYHPeJ','69137SDVjVj','Published','21592PexUZO','3108548idisvU','707CCzPXL','664302Mymoat','5601822nltzlt'];a44_0x1991=function(){return _0x476682;};return a44_0x1991();}export const APP_PUBLISH_STATUS={'Published':'PUBLISHED','Unpublished':a44_0x40c2e0(0x64)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a44_0x40c2e0(0x67)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x176691,_0xb27327){const _0x4d11d3=a45_0x1a56,_0x497d44=_0x176691();while(!![]){try{const _0x42b2c4=parseInt(_0x4d11d3(0x135))/0x1+-parseInt(_0x4d11d3(0x138))/0x2*(-parseInt(_0x4d11d3(0x139))/0x3)+parseInt(_0x4d11d3(0x136))/0x4+-parseInt(_0x4d11d3(0x137))/0x5+parseInt(_0x4d11d3(0x134))/0x6+parseInt(_0x4d11d3(0x132))/0x7+parseInt(_0x4d11d3(0x131))/0x8*(-parseInt(_0x4d11d3(0x133))/0x9);if(_0x42b2c4===_0xb27327)break;else _0x497d44['push'](_0x497d44['shift']());}catch(_0x4cc275){_0x497d44['push'](_0x497d44['shift']());}}}(a45_0x284f,0xd5330));export const AUTH_MODE={'ClientAk':'client-ak'};function a45_0x1a56(_0x4ad5b2,_0x1930ce){_0x4ad5b2=_0x4ad5b2-0x131;const _0x284f65=a45_0x284f();let _0x1a56e0=_0x284f65[_0x4ad5b2];return _0x1a56e0;}export function isAuthMode(_0xaed10){const _0x2a8df0=a45_0x1a56;return _0xaed10===AUTH_MODE[_0x2a8df0(0x13a)];}function a45_0x284f(){const _0x2e0d12=['12044270LTnBGq','243KgqecA','7155306GgyLMk','579916sgbVBi','2352828ypQdks','7014080grgwuS','2kxLItB','5168901UcWssx','ClientAk','1045384PjfNYz'];a45_0x284f=function(){return _0x2e0d12;};return a45_0x284f();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a46_0x12c1(){const _0x3cf0ed=['1500100sOERTQ','SQL\x20query\x20code','boolean','1oBDGSn','JSON\x20params\x20for\x20execute\x20commands','app','Clear\x20output','clear','params','cliDisplayName','Show\x20help','env','3901872miccWz','format','dryRun','Select\x20app\x20profile\x20by\x20name','Output\x20format','non-interactive','<code>','name','Alias\x20for\x20--non-interactive','meowKey','help','verbose','6552360djnHLC','Record\x20ID','map','type','sqlcode','4089650xWKIqT','cliBinName','3831900vBycTo','Environment','appcode','2929918bEljth','yes','18zBZObR','Verbose\x20output','25fvEqJW','1111652vLmXtp','string','<name>','Override\x20appcode','Use\x20global\x20config\x20scope','<expr>','production\x20|\x20development\x20|\x20daily','global','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)'];a46_0x12c1=function(){return _0x3cf0ed;};return a46_0x12c1();}function a46_0x4830(_0x47a05f,_0x1b6ab5){_0x47a05f=_0x47a05f-0x1e3;const _0x12c141=a46_0x12c1();let _0x4830d2=_0x12c141[_0x47a05f];return _0x4830d2;}const a46_0x1bcfcd=a46_0x4830;(function(_0x479e1d,_0xcd46f4){const _0x40a41f=a46_0x4830,_0x17f381=_0x479e1d();while(!![]){try{const _0x8a8d22=parseInt(_0x40a41f(0x20a))/0x1*(-parseInt(_0x40a41f(0x1f9))/0x2)+-parseInt(_0x40a41f(0x1f6))/0x3+-parseInt(_0x40a41f(0x1fe))/0x4*(-parseInt(_0x40a41f(0x1fd))/0x5)+parseInt(_0x40a41f(0x1ef))/0x6+-parseInt(_0x40a41f(0x207))/0x7+parseInt(_0x40a41f(0x1e3))/0x8+-parseInt(_0x40a41f(0x1fb))/0x9*(-parseInt(_0x40a41f(0x1f4))/0xa);if(_0x8a8d22===_0xcd46f4)break;else _0x17f381['push'](_0x17f381['shift']());}catch(_0x410d5e){_0x17f381['push'](_0x17f381['shift']());}}}(a46_0x12c1,0xcad0a));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a46_0x1bcfcd(0x1f5)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a46_0x1bcfcd(0x210)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a46_0x1bcfcd(0x1f8),'meowKey':'appcode','type':a46_0x1bcfcd(0x1ff),'description':a46_0x1bcfcd(0x201),'hint':a46_0x1bcfcd(0x1e9)},{'name':a46_0x1bcfcd(0x20c),'meowKey':a46_0x1bcfcd(0x20c),'type':a46_0x1bcfcd(0x1ff),'description':a46_0x1bcfcd(0x1e6),'hint':a46_0x1bcfcd(0x200)},{'name':a46_0x1bcfcd(0x212),'meowKey':a46_0x1bcfcd(0x212),'type':'string','description':a46_0x1bcfcd(0x1f7),'hint':a46_0x1bcfcd(0x204)},{'name':'format','meowKey':a46_0x1bcfcd(0x1e4),'type':a46_0x1bcfcd(0x1ff),'description':a46_0x1bcfcd(0x1e7),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a46_0x1bcfcd(0x1ff),'description':a46_0x1bcfcd(0x206),'hint':a46_0x1bcfcd(0x203)},{'name':'dry-run','meowKey':a46_0x1bcfcd(0x1e5),'type':a46_0x1bcfcd(0x209),'description':'Preview\x20operation\x20without\x20executing'},{'name':a46_0x1bcfcd(0x1fa),'meowKey':'yes','type':a46_0x1bcfcd(0x209),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a46_0x1bcfcd(0x1e8),'meowKey':'nonInteractive','type':a46_0x1bcfcd(0x209),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a46_0x1bcfcd(0x205),'meowKey':'global','type':a46_0x1bcfcd(0x209),'description':a46_0x1bcfcd(0x202)},{'name':'ci','meowKey':'ci','type':a46_0x1bcfcd(0x209),'description':a46_0x1bcfcd(0x1eb),'hidden':!![]},{'name':a46_0x1bcfcd(0x1ed),'meowKey':a46_0x1bcfcd(0x1ed),'type':'boolean','description':a46_0x1bcfcd(0x211)},{'name':'id','meowKey':'id','type':'string','description':a46_0x1bcfcd(0x1f0),'hidden':!![]},{'name':a46_0x1bcfcd(0x1ea),'meowKey':a46_0x1bcfcd(0x1ea),'type':'string','description':'Name\x20filter','hidden':!![]},{'name':a46_0x1bcfcd(0x1f3),'meowKey':a46_0x1bcfcd(0x1f3),'type':a46_0x1bcfcd(0x1ff),'description':a46_0x1bcfcd(0x208),'hidden':!![]},{'name':a46_0x1bcfcd(0x20f),'meowKey':a46_0x1bcfcd(0x20f),'type':'string','description':a46_0x1bcfcd(0x20b),'hidden':!![]},{'name':'verbose','meowKey':a46_0x1bcfcd(0x1ee),'type':a46_0x1bcfcd(0x209),'description':a46_0x1bcfcd(0x1fc),'hidden':!![]},{'name':'clear','meowKey':a46_0x1bcfcd(0x20e),'type':a46_0x1bcfcd(0x209),'description':a46_0x1bcfcd(0x20d),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a46_0x1bcfcd(0x20c),a46_0x1bcfcd(0x212),a46_0x1bcfcd(0x1e4),'jq','dry-run','yes',a46_0x1bcfcd(0x1e8),'ci']);export function buildMeowFlags(){const _0xf5617e=a46_0x1bcfcd;return Object['fromEntries'](GLOBAL_FLAGS[_0xf5617e(0x1f1)](_0x31bd28=>[_0x31bd28[_0xf5617e(0x1ec)],{'type':_0x31bd28[_0xf5617e(0x1f2)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a47_0x17de(_0x58f21f,_0x458e34){_0x58f21f=_0x58f21f-0x125;const _0x16bcc1=a47_0x16bc();let _0x17de6=_0x16bcc1[_0x58f21f];return _0x17de6;}const a47_0x22e72b=a47_0x17de;function a47_0x16bc(){const _0x576fd2=['compress','32tFrrCt','440JkuRBg','805791kHquWv','36cvYKsa','455750vPJllH','385mDjysQ','153025xubzzC','4072795uSNGsO','95589CaoGND','production','176766VMlwAh','3692648OswnQR','write'];a47_0x16bc=function(){return _0x576fd2;};return a47_0x16bc();}(function(_0x1dbae2,_0x514f2d){const _0x5129e1=a47_0x17de,_0x41278a=_0x1dbae2();while(!![]){try{const _0xc3031a=-parseInt(_0x5129e1(0x129))/0x1+parseInt(_0x5129e1(0x131))/0x2*(parseInt(_0x5129e1(0x12d))/0x3)+-parseInt(_0x5129e1(0x12e))/0x4+-parseInt(_0x5129e1(0x12a))/0x5+-parseInt(_0x5129e1(0x126))/0x6*(parseInt(_0x5129e1(0x125))/0x7)+parseInt(_0x5129e1(0x132))/0x8*(parseInt(_0x5129e1(0x12b))/0x9)+parseInt(_0x5129e1(0x127))/0xa*(parseInt(_0x5129e1(0x128))/0xb);if(_0xc3031a===_0x514f2d)break;else _0x41278a['push'](_0x41278a['shift']());}catch(_0xcc5b8){_0x41278a['push'](_0x41278a['shift']());}}}(a47_0x16bc,0x83fc0));export const DEFAULT_APP_PROFILE_NAME='main';export const DEFAULT_CONFIG_VALUES={'env':a47_0x22e72b(0x12c),'format':a47_0x22e72b(0x130),'locale':'en-US','riskLevel':a47_0x22e72b(0x12f)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a47_0x22e72b(0x130);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x5d42b7=a48_0x2ad2;(function(_0x4637f1,_0x434053){const _0x2b13ed=a48_0x2ad2,_0x36c163=_0x4637f1();while(!![]){try{const _0xd21d3e=parseInt(_0x2b13ed(0x130))/0x1+parseInt(_0x2b13ed(0x136))/0x2+-parseInt(_0x2b13ed(0x131))/0x3+parseInt(_0x2b13ed(0x133))/0x4*(parseInt(_0x2b13ed(0x137))/0x5)+parseInt(_0x2b13ed(0x138))/0x6*(-parseInt(_0x2b13ed(0x135))/0x7)+-parseInt(_0x2b13ed(0x134))/0x8+parseInt(_0x2b13ed(0x139))/0x9;if(_0xd21d3e===_0x434053)break;else _0x36c163['push'](_0x36c163['shift']());}catch(_0x39c7f7){_0x36c163['push'](_0x36c163['shift']());}}}(a48_0xa3c0,0x1fd26));function a48_0x2ad2(_0x49aa56,_0x1bb47d){_0x49aa56=_0x49aa56-0x130;const _0xa3c015=a48_0xa3c0();let _0x2ad27b=_0xa3c015[_0x49aa56];return _0x2ad27b;}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a48_0x5d42b7(0x132)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];function a48_0xa3c0(){const _0xae8d20=['1421808lEhFtv','133kUXOli','385776Ovuesi','1985lsIREm','38082pSxQsr','810747gZyCxa','128368lmxPXX','374412vRwQDe','npmPackageName','1432hvDayB'];a48_0xa3c0=function(){return _0xae8d20;};return a48_0xa3c0();}export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x399fba=a49_0x1584;(function(_0x3883dd,_0x3ca4a8){const _0x50ae42=a49_0x1584,_0x235125=_0x3883dd();while(!![]){try{const _0x40ea74=parseInt(_0x50ae42(0x160))/0x1*(-parseInt(_0x50ae42(0x15a))/0x2)+parseInt(_0x50ae42(0x16a))/0x3*(parseInt(_0x50ae42(0x157))/0x4)+-parseInt(_0x50ae42(0x16c))/0x5*(-parseInt(_0x50ae42(0x16b))/0x6)+parseInt(_0x50ae42(0x168))/0x7+parseInt(_0x50ae42(0x15e))/0x8+-parseInt(_0x50ae42(0x15b))/0x9*(-parseInt(_0x50ae42(0x15f))/0xa)+-parseInt(_0x50ae42(0x163))/0xb;if(_0x40ea74===_0x3ca4a8)break;else _0x235125['push'](_0x235125['shift']());}catch(_0x3a42a3){_0x235125['push'](_0x235125['shift']());}}}(a49_0xc55e,0x24e35));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a49_0xc55e(){const _0xe1f2cd=['241720SPEYqe','1913ILFqLR','nonProduction','apiDomain','5622166LzmJjZ','production','userDomain','domains','api','1459402NWYCkF','runtimeDomain','3WhUlho','1351482lUBVJe','5uVMGsB','995308VgDrhH','runtime','user','284oyGBSx','81SxVEOf','skillHubDomain','skillhub','269896aFQnhp'];a49_0xc55e=function(){return _0xe1f2cd;};return a49_0xc55e();}let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;function a49_0x1584(_0x458dfc,_0x3ac63e){_0x458dfc=_0x458dfc-0x157;const _0xc55e08=a49_0xc55e();let _0x15841d=_0xc55e08[_0x458dfc];return _0x15841d;}export function initDomains(_0x5d5363){const _0x2f15ab=a49_0x1584;customApiDomain=_0x5d5363?.[_0x2f15ab(0x162)],customUserDomain=_0x5d5363?.[_0x2f15ab(0x165)],customRuntimeDomain=_0x5d5363?.[_0x2f15ab(0x169)],customSkillHubDomain=_0x5d5363?.[_0x2f15ab(0x15c)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a49_0x399fba(0x166)][a49_0x399fba(0x164)][a49_0x399fba(0x159)]:PRODUCT_CONFIG[a49_0x399fba(0x166)]['nonProduction']['user']);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a49_0x399fba(0x164)][a49_0x399fba(0x167)]:PRODUCT_CONFIG[a49_0x399fba(0x166)][a49_0x399fba(0x161)]['api']);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a49_0x399fba(0x166)][a49_0x399fba(0x164)][a49_0x399fba(0x158)]:PRODUCT_CONFIG['domains'][a49_0x399fba(0x161)][a49_0x399fba(0x158)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a49_0x399fba(0x166)][a49_0x399fba(0x164)]['skillhub']:PRODUCT_CONFIG[a49_0x399fba(0x166)][a49_0x399fba(0x161)][a49_0x399fba(0x15d)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a50_0xd216(){const _0x9cd64f=['online','75698akOmVW','production','1521138QgSPsW','daily','ENV','823077yUJLao','7974780nlNOIt','32zIFjOi','7AmPuXZ','dev','development','4YUfFmU','3408985JJOEYR','1959627MZBmZw','22ViKfHc','21750894fxfeqh'];a50_0xd216=function(){return _0x9cd64f;};return a50_0xd216();}const a50_0x4a2e27=a50_0xe7df;(function(_0x187b74,_0x26bf11){const _0x533d63=a50_0xe7df,_0x4e6098=_0x187b74();while(!![]){try{const _0xb68474=parseInt(_0x533d63(0x97))/0x1*(-parseInt(_0x533d63(0x94))/0x2)+parseInt(_0x533d63(0x93))/0x3*(-parseInt(_0x533d63(0x91))/0x4)+-parseInt(_0x533d63(0x92))/0x5+parseInt(_0x533d63(0x99))/0x6*(parseInt(_0x533d63(0x9f))/0x7)+parseInt(_0x533d63(0x9e))/0x8*(-parseInt(_0x533d63(0x9c))/0x9)+parseInt(_0x533d63(0x9d))/0xa+parseInt(_0x533d63(0x95))/0xb;if(_0xb68474===_0x26bf11)break;else _0x4e6098['push'](_0x4e6098['shift']());}catch(_0x419db2){_0x4e6098['push'](_0x4e6098['shift']());}}}(a50_0xd216,0x78d0b));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=['production',a50_0x4a2e27(0x90),a50_0x4a2e27(0x9a)];function a50_0xe7df(_0x5bb019,_0x3021aa){_0x5bb019=_0x5bb019-0x8f;const _0xd216ee=a50_0xd216();let _0xe7dfa1=_0xd216ee[_0x5bb019];return _0xe7dfa1;}export function normalizeEnv(_0x23e9ec){const _0x25da18=a50_0x4a2e27;return _0x23e9ec===_0x25da18(0x96)?_0x25da18(0x98):_0x23e9ec;}export function isProduction(_0x396a4f){const _0x510313=a50_0x4a2e27;return normalizeEnv(_0x396a4f)===_0x510313(0x98);}export function isDaily(_0x5f02a6){const _0x2913f8=a50_0x4a2e27;return normalizeEnv(_0x5f02a6)===_0x2913f8(0x9a);}export function isDev(_0x4fe41b){const _0x292bda=a50_0x4a2e27,_0x538bdc=normalizeEnv(_0x4fe41b);return _0x538bdc===_0x292bda(0x90)||_0x538bdc===_0x292bda(0x8f);}let env=normalizeEnv(productEnv(a50_0x4a2e27(0x9b))||a50_0x4a2e27(0x98));export function getEnv(){return env;}export function initEnv(_0x42d196){env=normalizeEnv(_0x42d196);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a51_0x4641f0=a51_0x1fa9;(function(_0x300b2c,_0x13faf6){const _0x16b7d2=a51_0x1fa9,_0x555189=_0x300b2c();while(!![]){try{const _0x3b79c4=-parseInt(_0x16b7d2(0xed))/0x1*(-parseInt(_0x16b7d2(0xf4))/0x2)+-parseInt(_0x16b7d2(0xf5))/0x3+parseInt(_0x16b7d2(0xee))/0x4+parseInt(_0x16b7d2(0xf0))/0x5+-parseInt(_0x16b7d2(0xf3))/0x6+-parseInt(_0x16b7d2(0xf2))/0x7*(parseInt(_0x16b7d2(0xf1))/0x8)+parseInt(_0x16b7d2(0xef))/0x9;if(_0x3b79c4===_0x13faf6)break;else _0x555189['push'](_0x555189['shift']());}catch(_0x1ef250){_0x555189['push'](_0x555189['shift']());}}}(a51_0x4d91,0xa289c));function a51_0x1fa9(_0x588483,_0x5d793e){_0x588483=_0x588483-0xec;const _0x4d911e=a51_0x4d91();let _0x1fa9e6=_0x4d911e[_0x588483];return _0x1fa9e6;}export const OUTPUT_FORMAT_VALUES=['json','pretty',a51_0x4641f0(0xec)];function a51_0x4d91(){const _0x257bcc=['14930739tcSzNm','2834045WwsVhn','40iYVsQe','1375507saaJGm','4631628boMrxj','2wcEoTK','3706869ffMzLd','compress','1011273wOUVwP','1675076ybZcEw'];a51_0x4d91=function(){return _0x257bcc;};return a51_0x4d91();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x469b9f=a52_0x15f3;(function(_0x17e2af,_0x8bbc9c){const _0x2d9125=a52_0x15f3,_0x11352f=_0x17e2af();while(!![]){try{const _0x18ff3c=parseInt(_0x2d9125(0xfc))/0x1+parseInt(_0x2d9125(0x106))/0x2+parseInt(_0x2d9125(0x113))/0x3*(-parseInt(_0x2d9125(0x108))/0x4)+parseInt(_0x2d9125(0xff))/0x5*(-parseInt(_0x2d9125(0x100))/0x6)+-parseInt(_0x2d9125(0xfe))/0x7+parseInt(_0x2d9125(0x110))/0x8+parseInt(_0x2d9125(0xfb))/0x9*(parseInt(_0x2d9125(0x101))/0xa);if(_0x18ff3c===_0x8bbc9c)break;else _0x11352f['push'](_0x11352f['shift']());}catch(_0x281ec2){_0x11352f['push'](_0x11352f['shift']());}}}(a52_0x34d5,0xd2027));export const PRODUCT_CONFIG={'cliBinName':a52_0x469b9f(0x10e),'cliDisplayName':a52_0x469b9f(0x103),'npmPackageName':'@lovrabet/lovrabet-cli','skillSource':'lovrabet/lovrabet-cli','npmRegistryBaseUrl':'https://registry.npmjs.org','envPrefix':a52_0x469b9f(0x114),'legacyEnvPrefixes':['RABETBASE'],'configFileNames':['.lovrabet.json',a52_0x469b9f(0x111)],'newConfigFileName':a52_0x469b9f(0x10f),'homeDirName':a52_0x469b9f(0x105),'logFileName':'.lovrabet-runtime.log','invokeSource':a52_0x469b9f(0x10b),'userCenterDisplayName':a52_0x469b9f(0x109),'skipNpxSkillsEnvSuffix':a52_0x469b9f(0x10d),'domains':{'production':{'user':a52_0x469b9f(0x10a),'api':'https://api.lovrabet.com','runtime':a52_0x469b9f(0x10c),'skillhub':'https://skills.lovrabet.com'},'nonProduction':{'user':a52_0x469b9f(0x107),'api':'https://daily-api.lovrabet.com','runtime':a52_0x469b9f(0x104),'skillhub':'https://skills-daily.lovrabet.com'}},'accessKeyCreatePath':'/user/ak'};export function productEnvName(_0x3fe1a1){const _0x24f917=a52_0x469b9f;return PRODUCT_CONFIG[_0x24f917(0x112)]+'_'+_0x3fe1a1;}export function productEnvNames(_0x13c128){const _0x4c42cf=a52_0x469b9f;return[productEnvName(_0x13c128),...PRODUCT_CONFIG[_0x4c42cf(0xfd)][_0x4c42cf(0x102)](_0x109e28=>_0x109e28+'_'+_0x13c128)];}function a52_0x15f3(_0x152a8e,_0x352796){_0x152a8e=_0x152a8e-0xfb;const _0x34d5dd=a52_0x34d5();let _0x15f398=_0x34d5dd[_0x152a8e];return _0x15f398;}function a52_0x34d5(){const _0x34b00d=['754456KobZUF','.lovrabetrc','envPrefix','12UGZhCt','LOVRABET','33131313QwxhAV','1061372jxIbpm','legacyEnvPrefixes','12016466bNRWZr','257995rEiRdq','156HeWZPU','10nnVdEt','map','Lovrabet\x20Runtime\x20CLI','https://daily-runtime.lovrabet.com','.lovrabet','745606hVRzOs','https://user-daily.lovrabet.com','1291328jbVtyC','Lovrabet\x20User\x20Center','https://user.lovrabet.com','cli:lovrabet-runtime','https://runtime.lovrabet.com','SKIP_NPX_SKILLS','lovrabet','.lovrabet.json'];a52_0x34d5=function(){return _0x34b00d;};return a52_0x34d5();}export function productEnv(_0x6746d2){for(const _0x253a59 of productEnvNames(_0x6746d2)){const _0x1218e8=process.env[_0x253a59];if(_0x1218e8!==undefined)return _0x1218e8;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a53_0x2cf3(_0x43a1f7,_0x58a81f){_0x43a1f7=_0x43a1f7-0xc0;const _0x55294a=a53_0x5529();let _0x2cf3f2=_0x55294a[_0x43a1f7];return _0x2cf3f2;}const a53_0x3eb186=a53_0x2cf3;(function(_0x1e818a,_0x45a20c){const _0x572763=a53_0x2cf3,_0x337889=_0x1e818a();while(!![]){try{const _0x23aa05=-parseInt(_0x572763(0xc8))/0x1*(parseInt(_0x572763(0xc3))/0x2)+-parseInt(_0x572763(0xc9))/0x3+-parseInt(_0x572763(0xca))/0x4*(-parseInt(_0x572763(0xc7))/0x5)+-parseInt(_0x572763(0xc1))/0x6+parseInt(_0x572763(0xc2))/0x7+parseInt(_0x572763(0xc5))/0x8+parseInt(_0x572763(0xc6))/0x9*(parseInt(_0x572763(0xc4))/0xa);if(_0x23aa05===_0x45a20c)break;else _0x337889['push'](_0x337889['shift']());}catch(_0x57179f){_0x337889['push'](_0x337889['shift']());}}}(a53_0x5529,0x81524));function a53_0x5529(){const _0x2b416e=['high-risk-write','read','3892518xHpUfa','6324192rNyydz','2ouVKCE','10UvdieC','2039464JMpzZM','5169519qrlBTF','15OyjewZ','689369yJGrOX','429363BOuMZU','370884MQyzcS'];a53_0x5529=function(){return _0x2b416e;};return a53_0x5529();}export const RISK_LEVEL_VALUES=[a53_0x3eb186(0xc0),'write',a53_0x3eb186(0xcb)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a54_0x2a88(){const _0x2c6511=['445484zRbaFU','4748412wizxva','4901491mydhpb','28RiqfCz','3078PmAFhj','5182600zNjtgc','66196BBXVOz','2470977Hlmsvu','domains','45536JsjduP'];a54_0x2a88=function(){return _0x2c6511;};return a54_0x2a88();}const a54_0x31f8dd=a54_0x1a30;function a54_0x1a30(_0x45bcd8,_0x16d443){_0x45bcd8=_0x45bcd8-0x189;const _0x2a880e=a54_0x2a88();let _0x1a30c0=_0x2a880e[_0x45bcd8];return _0x1a30c0;}(function(_0x5cea95,_0x4bd858){const _0x508257=a54_0x1a30,_0x628a5d=_0x5cea95();while(!![]){try{const _0x30f310=-parseInt(_0x508257(0x18c))/0x1*(parseInt(_0x508257(0x189))/0x2)+parseInt(_0x508257(0x18d))/0x3+parseInt(_0x508257(0x190))/0x4+parseInt(_0x508257(0x18b))/0x5+parseInt(_0x508257(0x191))/0x6+parseInt(_0x508257(0x192))/0x7+parseInt(_0x508257(0x18f))/0x8*(-parseInt(_0x508257(0x18a))/0x9);if(_0x30f310===_0x4bd858)break;else _0x628a5d['push'](_0x628a5d['shift']());}catch(_0x18c6ed){_0x628a5d['push'](_0x628a5d['shift']());}}}(a54_0x2a88,0x8ffbd));import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a54_0x31f8dd(0x18e)]['production']['user']+PRODUCT_CONFIG['accessKeyCreatePath'];
|