@lovrabet/lovrabet-cli 2.1.16-beta.2 → 2.1.16
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/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/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/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/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/rate-limit.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/lossless-json.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
|
-
|
|
1
|
+
(function(_0x528161,_0x18cca1){const _0x2e8076=a53_0x3cd2,_0x135538=_0x528161();while(!![]){try{const _0x48ec9d=-parseInt(_0x2e8076(0x1d7))/0x1+-parseInt(_0x2e8076(0x1d0))/0x2+parseInt(_0x2e8076(0x1d3))/0x3+-parseInt(_0x2e8076(0x1cd))/0x4+parseInt(_0x2e8076(0x1da))/0x5*(parseInt(_0x2e8076(0x1d8))/0x6)+parseInt(_0x2e8076(0x1d5))/0x7*(-parseInt(_0x2e8076(0x1d4))/0x8)+parseInt(_0x2e8076(0x1cf))/0x9;if(_0x48ec9d===_0x18cca1)break;else _0x135538['push'](_0x135538['shift']());}catch(_0x2fe233){_0x135538['push'](_0x135538['shift']());}}}(a53_0x2a95,0x1ac5a));function a53_0x2a95(){const _0x278b7e=['3237asnwQt','8LpnFfh','766297lbZGyy','company','156294YposzW','76476JZThtB','trim','55SWJRxM','validation','527424qsesDs','Unsupported\x20Skill\x20list\x20scope:\x20','4222692FQVYmv','206388zZXEJJ','personal','all'];a53_0x2a95=function(){return _0x278b7e;};return a53_0x2a95();}import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x8ae50f){const _0x7999e5=a53_0x3cd2,_0x5eaaa1=_0x8ae50f[_0x7999e5(0x1d9)]();if(!_0x5eaaa1||_0x5eaaa1===_0x7999e5(0x1d2))return[_0x7999e5(0x1d1),_0x7999e5(0x1d6)];if(_0x5eaaa1===_0x7999e5(0x1d1)||_0x5eaaa1==='company')return[_0x5eaaa1];throw CliErrors[_0x7999e5(0x1cc)]('Unsupported\x20Skill\x20sync\x20scope:\x20'+_0x8ae50f);}export function normalizeListScope(_0x502824){const _0x12d086=a53_0x3cd2,_0x5b4964=_0x502824[_0x12d086(0x1d9)]();if(!_0x5b4964)return'all';if(_0x5b4964===_0x12d086(0x1d1)||_0x5b4964===_0x12d086(0x1d6)||_0x5b4964==='all')return _0x5b4964;throw CliErrors[_0x12d086(0x1cc)](_0x12d086(0x1ce)+_0x502824);}function a53_0x3cd2(_0x103f3a,_0x4cd409){_0x103f3a=_0x103f3a-0x1cc;const _0x2a95d3=a53_0x2a95();let _0x3cd275=_0x2a95d3[_0x103f3a];return _0x3cd275;}export function shouldListScope(_0x31c56e,_0x1ab865){const _0x378f49=a53_0x3cd2;if(_0x31c56e===_0x378f49(0x1d2))return!![];return _0x31c56e===_0x1ab865;}export function listScopeToRuntimeScopes(_0x4936bf){const _0x467dce=a53_0x3cd2;if(_0x4936bf==='all')return['personal','company'];return[_0x4936bf===_0x467dce(0x1d6)?'company':_0x4936bf];}export function listScopeToRemoteScope(_0x44aa24){return _0x44aa24;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a54_0x1a5c(){var _0x1ad46d=['readonly','180lYSBHS','730408pwkLqQ','136650dlDdpb','2825oTKvUb','38271lRgwst','888dcCqWv','cacheDir','skillCode','7458SkncEc','treeHash','skillName','5580pxZVcz','contentHash','tags','scope','status','metadataPath','pulledAt','2UGQVdn','98872QgWFOI','linkedPaths','appCode','693712MyCyeL'];a54_0x1a5c=function(){return _0x1ad46d;};return a54_0x1a5c();}(function(_0x50f640,_0x36e84a){var _0x23ecc5=a54_0xae7e,_0x2390e3=_0x50f640();while(!![]){try{var _0x119657=-parseInt(_0x23ecc5(0x1d7))/0x1*(-parseInt(_0x23ecc5(0x1cd))/0x2)+parseInt(_0x23ecc5(0x1d5))/0x3+parseInt(_0x23ecc5(0x1d1))/0x4+-parseInt(_0x23ecc5(0x1d6))/0x5*(parseInt(_0x23ecc5(0x1d8))/0x6)+parseInt(_0x23ecc5(0x1d4))/0x7+parseInt(_0x23ecc5(0x1ce))/0x8*(parseInt(_0x23ecc5(0x1d3))/0x9)+-parseInt(_0x23ecc5(0x1c6))/0xa*(parseInt(_0x23ecc5(0x1db))/0xb);if(_0x119657===_0x36e84a)break;else _0x2390e3['push'](_0x2390e3['shift']());}catch(_0x1a95fe){_0x2390e3['push'](_0x2390e3['shift']());}}}(a54_0x1a5c,0x23d8d));export function summarizeRuntimeSkill(_0x1d6264){var _0xcaf0a2=a54_0xae7e;return{'id':_0x1d6264['id'],'skillCode':_0x1d6264[_0xcaf0a2(0x1da)],'skillName':_0x1d6264[_0xcaf0a2(0x1c5)],'scope':_0x1d6264[_0xcaf0a2(0x1c9)],'version':_0x1d6264['version'],'readonly':_0x1d6264[_0xcaf0a2(0x1d2)]};}function a54_0xae7e(_0x258ed5,_0x2d1373){_0x258ed5=_0x258ed5-0x1c4;var _0x1a5c7e=a54_0x1a5c();var _0xae7e8f=_0x1a5c7e[_0x258ed5];return _0xae7e8f;}export function summarizeLocalRuntimeSkill(_0x1ea2eb){var _0x42cd52=a54_0xae7e;return{'id':_0x1ea2eb['id'],'skillCode':_0x1ea2eb[_0x42cd52(0x1da)],'skillName':_0x1ea2eb[_0x42cd52(0x1c5)],'scope':_0x1ea2eb[_0x42cd52(0x1c9)],'appCode':_0x1ea2eb[_0x42cd52(0x1d0)],'version':_0x1ea2eb['version'],'status':_0x1ea2eb[_0x42cd52(0x1ca)],'readonly':_0x1ea2eb['readonly'],'tags':_0x1ea2eb[_0x42cd52(0x1c8)],'dir':_0x1ea2eb['dir'],'cacheDir':_0x1ea2eb[_0x42cd52(0x1d9)],'skillMdPath':_0x1ea2eb['skillMdPath'],'metadataPath':_0x1ea2eb[_0x42cd52(0x1cb)],'linkedPaths':_0x1ea2eb[_0x42cd52(0x1cf)],'contentHash':_0x1ea2eb[_0x42cd52(0x1c7)],'treeHash':_0x1ea2eb[_0x42cd52(0x1c4)],'pulledAt':_0x1ea2eb[_0x42cd52(0x1cc)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a55_0x4526e9=a55_0x1841;(function(_0x281dcc,_0x42e178){const _0x5b915a=a55_0x1841,_0x110fb3=_0x281dcc();while(!![]){try{const _0x3bff2b=parseInt(_0x5b915a(0x15e))/0x1*(-parseInt(_0x5b915a(0x178))/0x2)+parseInt(_0x5b915a(0x15d))/0x3+-parseInt(_0x5b915a(0x157))/0x4*(-parseInt(_0x5b915a(0x159))/0x5)+-parseInt(_0x5b915a(0x154))/0x6+parseInt(_0x5b915a(0x166))/0x7*(-parseInt(_0x5b915a(0x171))/0x8)+-parseInt(_0x5b915a(0x170))/0x9*(parseInt(_0x5b915a(0x16a))/0xa)+parseInt(_0x5b915a(0x158))/0xb;if(_0x3bff2b===_0x42e178)break;else _0x110fb3['push'](_0x110fb3['shift']());}catch(_0x3f7bc1){_0x110fb3['push'](_0x110fb3['shift']());}}}(a55_0x4560,0xeb99f));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=['write','read',a55_0x4526e9(0x168)];export const DEFAULT_SKILL_TARGET=a55_0x4526e9(0x174);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';export function validateSkillName(_0x1833fd){const _0x27c17a=a55_0x4526e9,_0x4f7e3d=_0x1833fd[_0x27c17a(0x167)]();if(!SKILL_NAME_PATTERN[_0x27c17a(0x16b)](_0x4f7e3d))throw CliErrors[_0x27c17a(0x161)]('Invalid\x20Skill\x20name:\x20'+_0x1833fd+_0x27c17a(0x179),_0x27c17a(0x162));return _0x4f7e3d;}export function normalizeSkillTemplateType(_0x553e47){const _0x187ed7=a55_0x4526e9,_0x1b5a8b=(_0x553e47||'write')['trim']()||_0x187ed7(0x177);if(SKILL_TYPES[_0x187ed7(0x16d)](_0x1b5a8b))return _0x1b5a8b;throw CliErrors['validation'](_0x187ed7(0x173)+_0x553e47,_0x187ed7(0x156)+SKILL_TYPES[_0x187ed7(0x16f)](',\x20')+'.');}function a55_0x4560(){const _0x5d305a=['write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','includes','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','join','18mKKcwq','29208SzwGYO','SKILL.md','Unsupported\x20Skill\x20type:\x20','.agents/skills','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\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','write','10992HAaFdu','.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','skillName','5890776YbvksK','\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','Use\x20one\x20of:\x20','39740GukjIO','26367847letnOh','325bpVDDi','\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','type','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','670992XwBPXg','173jzJyXc','\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','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','validation','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','35ekESxW','trim','trainer','timestamp','1753170owtmnz','test'];a55_0x4560=function(){return _0x5d305a;};return a55_0x4560();}export function renderSkillTemplate(_0x18434d){const _0x1f57c3=a55_0x4526e9,_0x370f09=validateSkillName(_0x18434d[_0x1f57c3(0x17b)]),_0x3efa01=normalizeSkillTemplateType(_0x18434d[_0x1f57c3(0x15b)]),_0x3528ff=_0x18434d[_0x1f57c3(0x169)]??new Date()['toISOString']();return{'skillName':_0x370f09,'type':_0x3efa01,'files':[{'path':_0x1f57c3(0x172),'content':renderSkillMd(_0x370f09,_0x3efa01,_0x3528ff)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x370f09,_0x3efa01)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x370f09,_0x3efa01)}]};}function renderSkillMd(_0x9771ff,_0x514bbd,_0x1870e9){const _0x62b184=a55_0x4526e9,_0x57b2d0=typeWorkflow(_0x514bbd);return'---\x0aname:\x20'+_0x9771ff+'\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20'+_0x514bbd+'\x0a\x20\x20created:\x20\x22'+_0x1870e9+_0x62b184(0x165)+_0x9771ff+_0x62b184(0x15a)+_0x57b2d0+'\x0a\x0a'+businessStateSection(_0x514bbd)+_0x62b184(0x155);}function renderRuntimeContract(_0x42879d,_0xd60ce4){const _0x20225d=a55_0x4526e9,_0x56adca=_0xd60ce4==='write'?'##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a':'';return _0x20225d(0x175)+_0x42879d+'\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='+_0xd60ce4+_0x20225d(0x15f)+_0x56adca+_0x20225d(0x176);}function renderOutputContract(_0x38b6a8,_0x16828c){const _0x206ce5=a55_0x4526e9,_0x279e4a=_0x16828c===_0x206ce5(0x177)?_0x206ce5(0x16c):_0x16828c+_0x206ce5(0x160);return'#\x20Output\x20Contract\x0a\x0a'+_0x38b6a8+'\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'+_0x279e4a+_0x206ce5(0x15c);}function typeWorkflow(_0x2c80b1){const _0x4d0e9f=a55_0x4526e9;if(_0x2c80b1==='read')return _0x4d0e9f(0x17a);if(_0x2c80b1==='trainer')return _0x4d0e9f(0x163);return _0x4d0e9f(0x16e);}function a55_0x1841(_0x11cb24,_0x5e7dd3){_0x11cb24=_0x11cb24-0x154;const _0x456048=a55_0x4560();let _0x1841d0=_0x456048[_0x11cb24];return _0x1841d0;}function businessStateSection(_0x5f508a){const _0x299e13=a55_0x4526e9;if(_0x5f508a!==_0x299e13(0x177))return'';return _0x299e13(0x164);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a56_0x23018b=a56_0x1f6e;(function(_0x487383,_0x1fb220){const _0x1a20b1=a56_0x1f6e,_0x26e83b=_0x487383();while(!![]){try{const _0x297027=parseInt(_0x1a20b1(0xce))/0x1*(parseInt(_0x1a20b1(0x108))/0x2)+-parseInt(_0x1a20b1(0x105))/0x3*(parseInt(_0x1a20b1(0x116))/0x4)+-parseInt(_0x1a20b1(0xe1))/0x5+parseInt(_0x1a20b1(0x104))/0x6*(parseInt(_0x1a20b1(0xfb))/0x7)+-parseInt(_0x1a20b1(0x117))/0x8*(parseInt(_0x1a20b1(0xe7))/0x9)+parseInt(_0x1a20b1(0xf4))/0xa+parseInt(_0x1a20b1(0xe2))/0xb*(parseInt(_0x1a20b1(0xd3))/0xc);if(_0x297027===_0x1fb220)break;else _0x26e83b['push'](_0x26e83b['shift']());}catch(_0x34c416){_0x26e83b['push'](_0x26e83b['shift']());}}}(a56_0x3d23,0xe9143));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a56_0x303ecf}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a56_0x23018b(0x102),SUPPORTED_SKILL_TYPES=new Set([a56_0x23018b(0x119),a56_0x23018b(0xec),a56_0x23018b(0xf6)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x1a51d7,_0x197125={}){const _0x1aa731=a56_0x23018b,_0x3b9bce=resolveSkillDirectoryRoot(_0x1a51d7),_0x55d2c8=[],_0x2a5ab5=loadRequiredSkillFile(_0x3b9bce,_0x55d2c8),_0x28c806=_0x2a5ab5?parseFrontmatter(_0x2a5ab5[_0x1aa731(0xdf)]):{'hasFrontmatter':![]};_0x2a5ab5&&validateFrontmatter(_0x2a5ab5[_0x1aa731(0x111)],_0x28c806,_0x55d2c8);validateRuntimeCliReferences(_0x3b9bce,_0x55d2c8);const _0x4e4aa6=_0x55d2c8[_0x1aa731(0x124)](_0x57bcd5=>_0x57bcd5[_0x1aa731(0x10a)]===_0x1aa731(0x12f)),_0x51c8a3=_0x55d2c8['filter'](_0x587381=>_0x587381['level']==='warning');return{'ok':_0x4e4aa6[_0x1aa731(0xd0)]===0x0,'dir':_0x3b9bce,'type':_0x28c806[_0x1aa731(0x128)],'errors':_0x4e4aa6,'warnings':_0x51c8a3};}function resolveSkillDirectoryRoot(_0xfa8bb){const _0x1abf51=a56_0x23018b,_0x40ccab=resolve(_0xfa8bb);if(!existsSync(_0x40ccab))throw CliErrors[_0x1abf51(0x110)](_0x1abf51(0xf5)+_0xfa8bb);const _0xc702cd=lstatSync(_0x40ccab);if(_0xc702cd['isDirectory']())return _0x40ccab;if(_0xc702cd[_0x1abf51(0x10d)]()){const _0x365abe=realpathSync(_0x40ccab);if(lstatSync(_0x365abe)[_0x1abf51(0xf8)]())return _0x365abe;}throw CliErrors[_0x1abf51(0x110)](_0x1abf51(0xf5)+_0xfa8bb);}export function throwIfSkillValidationFailed(_0x1eb667,_0x33fd11=![]){const _0x2ebe26=a56_0x23018b;if(_0x1eb667['ok'])return;const _0x2613e3=_0x1eb667[_0x2ebe26(0x130)][_0x2ebe26(0x126)](_0x2ff4de=>{const _0x412754=_0x2ebe26,_0x58fa1f=_0x2ff4de['section']?'#'+_0x2ff4de['section']:'';return _0x2ff4de['level'][_0x412754(0x11d)]()+'\x20'+_0x2ff4de[_0x412754(0x103)]+'\x20'+_0x2ff4de[_0x412754(0xe0)]+_0x58fa1f+':\x20'+_0x2ff4de[_0x412754(0xfd)]+_0x412754(0xff)+_0x2ff4de[_0x412754(0x10e)];});throw CliErrors[_0x2ebe26(0x110)](_0x2ebe26(0xed)+_0x2613e3['join']('\x0a'),_0x2ebe26(0xe4));}function a56_0x3d23(){const _0x44d436=['join','level','object','Frontmatter\x20displayName\x20is\x20missing.','isSymbolicLink','suggestion','project','validation','path','logs','registry','example','workspace','11600PUfQlc','16sSzWnt','display-name-recommended','write','rabetbase-cli-reference','Missing\x20SKILL.md.','boolean','toUpperCase','displayName','page','has','auth','toLowerCase','flatMap','filter','search','map','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','type','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','string','warning','push','structure-complete','sql','error','errors','Frontmatter\x20name\x20is\x20missing.','153Bpbmxq','frontmatter-required','length','number','config','36jXcVlY','metadata','utf8','SKILL.md\x20is\x20not\x20a\x20file.','match','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','isFile','Add\x20frontmatter\x20with\x20name\x20and\x20description.','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','hasFrontmatter','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','content','file','2255310tsqDtw','4476351BGyPKV','test','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','description','trim','2386161ZKLmuN','false','example-recommended','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','schema','read','Skill\x20validation\x20failed:\x0a','internal-skill','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Frontmatter\x20description\x20is\x20empty.','name','app','description-required','10655230VVNFyH','Skill\x20directory\x20not\x20found:\x20','trainer','bff','isDirectory','slice','line','14PDLvFT','raw','message','split','\x20Fix:\x20','internal','isArray','SKILL.md','ruleId','2203938RrUWbt','1221WMjiHC','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','artifact','1246lluPBr'];a56_0x3d23=function(){return _0x44d436;};return a56_0x3d23();}function loadRequiredSkillFile(_0x5c396b,_0x17afcf){const _0x3875f6=a56_0x23018b,_0xbad768=resolve(_0x5c396b,SKILL_FILE);if(!existsSync(_0xbad768))return _0x17afcf[_0x3875f6(0x12c)](issue(_0x3875f6(0x12f),_0x3875f6(0x12d),SKILL_FILE,_0x3875f6(0x11b),_0x3875f6(0xde))),undefined;const _0x5ca702=lstatSync(_0xbad768);if(_0x5ca702['isSymbolicLink']())return _0x17afcf[_0x3875f6(0x12c)](issue('error',_0x3875f6(0x12d),SKILL_FILE,_0x3875f6(0x129),'Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.')),undefined;if(!_0x5ca702[_0x3875f6(0xda)]())return _0x17afcf[_0x3875f6(0x12c)](issue(_0x3875f6(0x12f),_0x3875f6(0x12d),SKILL_FILE,_0x3875f6(0xd6),_0x3875f6(0xd9))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0xbad768,_0x3875f6(0xd5))};}function validateFrontmatter(_0x48e800,_0x1e3457,_0x514f00){const _0x50e726=a56_0x23018b;if(!_0x1e3457[_0x50e726(0xdd)]){_0x514f00[_0x50e726(0x12c)](issue(_0x50e726(0x12f),_0x50e726(0xcf),_0x48e800,'SKILL.md\x20must\x20start\x20with\x20frontmatter.',_0x50e726(0xdb)));return;}!_0x1e3457[_0x50e726(0xf1)]?.[_0x50e726(0xe6)]()&&_0x514f00[_0x50e726(0x12c)](issue(_0x50e726(0x12f),'frontmatter-required',_0x48e800,_0x50e726(0xcd),_0x50e726(0x106))),!_0x1e3457['displayName']?.[_0x50e726(0xe6)]()&&_0x514f00[_0x50e726(0x12c)](issue('warning',_0x50e726(0x118),_0x48e800,_0x50e726(0x10c),_0x50e726(0x127))),!_0x1e3457[_0x50e726(0x114)]?.[_0x50e726(0xe6)]()&&_0x514f00['push'](issue(_0x50e726(0x12b),_0x50e726(0xe9),_0x48e800,'Frontmatter\x20example\x20is\x20missing.',_0x50e726(0xdc))),!_0x1e3457[_0x50e726(0xe5)]?.['trim']()&&_0x514f00[_0x50e726(0x12c)](issue(_0x50e726(0x12f),_0x50e726(0xf3),_0x48e800,_0x50e726(0xf0),'填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。')),_0x1e3457[_0x50e726(0x100)]===!![]&&_0x514f00[_0x50e726(0x12c)](issue(_0x50e726(0x12f),_0x50e726(0xee),_0x48e800,_0x50e726(0xef),_0x50e726(0xd8))),_0x1e3457[_0x50e726(0x128)]?.[_0x50e726(0xe6)]()&&!SUPPORTED_SKILL_TYPES[_0x50e726(0x120)](_0x1e3457[_0x50e726(0x128)])&&_0x514f00['push'](issue(_0x50e726(0x12f),_0x50e726(0xcf),_0x48e800,'metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.'));}function validateRuntimeCliReferences(_0x427282,_0x22e1f1){const _0x362e1e=a56_0x23018b;for(const _0x70a86d of findRabetbaseCliInvocations(_0x427282)){_0x22e1f1[_0x362e1e(0x12c)](issue('warning',_0x362e1e(0x11a),_0x70a86d['file'],_0x362e1e(0xea),'If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','L'+_0x70a86d[_0x362e1e(0xfa)]));}}function findRabetbaseCliInvocations(_0x2f943f){const _0x55611b=a56_0x23018b;return scanSkillDirectory(_0x2f943f)['filter'](_0x50c8e2=>TEXT_SKILL_FILE_PATTERN[_0x55611b(0xe3)](_0x50c8e2[_0x55611b(0x111)]))[_0x55611b(0x123)](_0x278a11=>{const _0x2a3c96=_0x55611b,_0x507de7=fileText(_0x278a11);return _0x507de7[_0x2a3c96(0xfe)](/\r?\n/)[_0x2a3c96(0x126)]((_0x32b19c,_0x671253)=>({'file':_0x278a11[_0x2a3c96(0x111)],'line':_0x671253+0x1,'text':_0x32b19c}))[_0x2a3c96(0x124)](({text:_0x316112})=>isRabetbaseCliInvocation(_0x316112))['map'](({file:_0x1f1dd2,line:_0x3dad57})=>({'file':_0x1f1dd2,'line':_0x3dad57}));});}const RABETBASE_SUBCOMMANDS=['dataset',a56_0x23018b(0x12e),a56_0x23018b(0xf7),a56_0x23018b(0x11f),a56_0x23018b(0x10f),a56_0x23018b(0xf2),a56_0x23018b(0xeb),'service',a56_0x23018b(0x107),'kb',a56_0x23018b(0xd2),a56_0x23018b(0x115),'data',a56_0x23018b(0x121),a56_0x23018b(0x112),a56_0x23018b(0x113)],RABETBASE_INVOCATION=new RegExp(String[a56_0x23018b(0xfc)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a56_0x23018b(0x109)]('|')})\b`+String[a56_0x23018b(0xfc)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x51bade){const _0x4a3809=a56_0x23018b,_0xf9248d=_0x51bade[_0x4a3809(0x125)](/\brabetbase\b/i);if(_0xf9248d<0x0)return![];const _0x46accf=_0x51bade[_0x4a3809(0xf9)](_0xf9248d)[_0x4a3809(0xfe)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x4a3809(0xe3)](_0x46accf);}function parseFrontmatter(_0x39c04c){const _0x54098d=a56_0x23018b,_0x5b4592=_0x39c04c[_0x54098d(0xd7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5b4592)return{'hasFrontmatter':![]};const _0x21f12b=_0x5b4592[0x1]??'',_0xc90b5={'hasFrontmatter':!![]};let _0x3b648b;try{_0x3b648b=a56_0x303ecf(_0x21f12b);}catch{return _0xc90b5;}const _0x5ca80f=asRecord(_0x3b648b);if(!_0x5ca80f)return _0xc90b5;_0xc90b5[_0x54098d(0xf1)]=scalarToString(_0x5ca80f[_0x54098d(0xf1)]),_0xc90b5[_0x54098d(0x11e)]=scalarToString(_0x5ca80f[_0x54098d(0x11e)]),_0xc90b5[_0x54098d(0xe5)]=scalarToString(_0x5ca80f[_0x54098d(0xe5)]),_0xc90b5[_0x54098d(0x114)]=scalarToString(_0x5ca80f[_0x54098d(0x114)]);const _0x1b480e=asRecord(_0x5ca80f[_0x54098d(0xd4)]);return _0x1b480e&&(_0xc90b5['type']=scalarToString(_0x1b480e[_0x54098d(0x128)]),_0xc90b5[_0x54098d(0x100)]=scalarToBoolean(_0x1b480e[_0x54098d(0x100)])),_0xc90b5;}function asRecord(_0x551154){const _0x16856b=a56_0x23018b;if(_0x551154&&typeof _0x551154===_0x16856b(0x10b)&&!Array[_0x16856b(0x101)](_0x551154))return _0x551154;return undefined;}function scalarToString(_0x11790a){const _0x178ae4=a56_0x23018b;if(typeof _0x11790a==='string')return _0x11790a['trim']();if(typeof _0x11790a===_0x178ae4(0xd1)||typeof _0x11790a==='boolean')return String(_0x11790a);return undefined;}function a56_0x1f6e(_0x15a04d,_0x2feb4c){_0x15a04d=_0x15a04d-0xcd;const _0x3d23b9=a56_0x3d23();let _0x1f6e44=_0x3d23b9[_0x15a04d];return _0x1f6e44;}function scalarToBoolean(_0x2bc6e9){const _0x561773=a56_0x23018b;if(typeof _0x2bc6e9===_0x561773(0x11c))return _0x2bc6e9;if(typeof _0x2bc6e9===_0x561773(0x12a))return cleanBoolean(_0x2bc6e9);return undefined;}function cleanBoolean(_0x3928b2){const _0x201bd4=a56_0x23018b,_0x51b6d8=_0x3928b2[_0x201bd4(0xe6)]()[_0x201bd4(0x122)]();if(_0x51b6d8==='true')return!![];if(_0x51b6d8===_0x201bd4(0xe8))return![];return undefined;}function issue(_0x1d3041,_0x32cc3e,_0x48cc32,_0x3a3b4d,_0x4844a6,_0x5262bf){return{'level':_0x1d3041,'ruleId':_0x32cc3e,'file':_0x48cc32,'section':_0x5262bf,'message':_0x3a3b4d,'suggestion':_0x4844a6};}
|
|
1
|
+
const a56_0x8fec23=a56_0x45f3;(function(_0x31affb,_0x25055d){const _0x711c3d=a56_0x45f3,_0x1c9a6f=_0x31affb();while(!![]){try{const _0x4a2e39=parseInt(_0x711c3d(0x1f9))/0x1*(parseInt(_0x711c3d(0x1b8))/0x2)+-parseInt(_0x711c3d(0x1fc))/0x3+-parseInt(_0x711c3d(0x1fd))/0x4+parseInt(_0x711c3d(0x206))/0x5*(-parseInt(_0x711c3d(0x1cd))/0x6)+-parseInt(_0x711c3d(0x1c1))/0x7*(parseInt(_0x711c3d(0x1c5))/0x8)+-parseInt(_0x711c3d(0x1e8))/0x9*(parseInt(_0x711c3d(0x1ee))/0xa)+-parseInt(_0x711c3d(0x20f))/0xb*(-parseInt(_0x711c3d(0x1ba))/0xc);if(_0x4a2e39===_0x25055d)break;else _0x1c9a6f['push'](_0x1c9a6f['shift']());}catch(_0x2ec6d0){_0x1c9a6f['push'](_0x1c9a6f['shift']());}}}(a56_0x11d6,0x847a9));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';function a56_0x11d6(){const _0x43677f=['read','app','Frontmatter\x20displayName\x20is\x20missing.','structure-complete','name','279OoCpxk','SKILL.md','number','metadata','example','config','278280iFEdpp','example-recommended','data','filter','internal','object','slice','SKILL.md\x20must\x20start\x20with\x20frontmatter.','rabetbase-cli-reference','ruleId','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','14UGvwcI','sql','service','729651QdhtTr','2647016xbjpCy','internal-skill','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','content','path','flatMap','search','Frontmatter\x20example\x20is\x20missing.','38800IPmXdA','artifact','match','join','isSymbolicLink','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','type','length','auth','22pIOgPo','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','SKILL.md\x20is\x20not\x20a\x20file.','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','hasFrontmatter','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','raw','Skill\x20directory\x20not\x20found:\x20','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','description-required','39492qRttbv','errors','19793508YTvzNK','isFile','description','suggestion','message','map','frontmatter-required','21oZXdrY','Missing\x20SKILL.md.','error','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','1676720aoHbTp','trainer','workspace','page','isDirectory','registry','isArray','trim','492XsDNAF','Skill\x20validation\x20failed:\x0a','dataset','displayName','push','test','section','project','level','split','false','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','warning','file','string','Add\x20frontmatter\x20with\x20name\x20and\x20description.','toLowerCase','boolean','utf8','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','Frontmatter\x20name\x20is\x20missing.','toUpperCase'];a56_0x11d6=function(){return _0x43677f;};return a56_0x11d6();}import{resolve}from'node:path';import{parse as a56_0x2e3ed3}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a56_0x8fec23(0x1e9),SUPPORTED_SKILL_TYPES=new Set(['write',a56_0x8fec23(0x1e3),a56_0x8fec23(0x1c6)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x41e235,_0x1dbba2={}){const _0x2044c1=a56_0x8fec23,_0x43297a=resolveSkillDirectoryRoot(_0x41e235),_0x455845=[],_0xd78cd3=loadRequiredSkillFile(_0x43297a,_0x455845),_0x34f70e=_0xd78cd3?parseFrontmatter(_0xd78cd3[_0x2044c1(0x201)]):{'hasFrontmatter':![]};_0xd78cd3&&validateFrontmatter(_0xd78cd3[_0x2044c1(0x202)],_0x34f70e,_0x455845);validateRuntimeCliReferences(_0x43297a,_0x455845);const _0x5268f2=_0x455845[_0x2044c1(0x1f1)](_0x49aaa0=>_0x49aaa0[_0x2044c1(0x1d5)]===_0x2044c1(0x1c3)),_0x25ed6a=_0x455845[_0x2044c1(0x1f1)](_0x1423e3=>_0x1423e3[_0x2044c1(0x1d5)]===_0x2044c1(0x1d9));return{'ok':_0x5268f2[_0x2044c1(0x20d)]===0x0,'dir':_0x43297a,'type':_0x34f70e['type'],'errors':_0x5268f2,'warnings':_0x25ed6a};}function resolveSkillDirectoryRoot(_0xbeff04){const _0x1f9b2c=a56_0x8fec23,_0x228f26=resolve(_0xbeff04);if(!existsSync(_0x228f26))throw CliErrors['validation'](_0x1f9b2c(0x1b5)+_0xbeff04);const _0x4cd3b2=lstatSync(_0x228f26);if(_0x4cd3b2[_0x1f9b2c(0x1c9)]())return _0x228f26;if(_0x4cd3b2[_0x1f9b2c(0x20a)]()){const _0x40b0c4=realpathSync(_0x228f26);if(lstatSync(_0x40b0c4)[_0x1f9b2c(0x1c9)]())return _0x40b0c4;}throw CliErrors['validation'](_0x1f9b2c(0x1b5)+_0xbeff04);}export function throwIfSkillValidationFailed(_0x3e107f,_0x5dafc4=![]){const _0x4d2110=a56_0x8fec23;if(_0x3e107f['ok'])return;const _0x59acb0=_0x3e107f[_0x4d2110(0x1b9)][_0x4d2110(0x1bf)](_0x825c61=>{const _0x1e0ca0=_0x4d2110,_0x25a6df=_0x825c61[_0x1e0ca0(0x1d3)]?'#'+_0x825c61[_0x1e0ca0(0x1d3)]:'';return _0x825c61[_0x1e0ca0(0x1d5)][_0x1e0ca0(0x1e2)]()+'\x20'+_0x825c61[_0x1e0ca0(0x1f7)]+'\x20'+_0x825c61[_0x1e0ca0(0x1da)]+_0x25a6df+':\x20'+_0x825c61[_0x1e0ca0(0x1be)]+'\x20Fix:\x20'+_0x825c61[_0x1e0ca0(0x1bd)];});throw CliErrors['validation'](_0x4d2110(0x1ce)+_0x59acb0[_0x4d2110(0x209)]('\x0a'),_0x4d2110(0x20b));}function loadRequiredSkillFile(_0x4fff59,_0x11cf31){const _0x21c25e=a56_0x8fec23,_0x387464=resolve(_0x4fff59,SKILL_FILE);if(!existsSync(_0x387464))return _0x11cf31[_0x21c25e(0x1d1)](issue(_0x21c25e(0x1c3),_0x21c25e(0x1e6),SKILL_FILE,_0x21c25e(0x1c2),_0x21c25e(0x1b6))),undefined;const _0x4fca2b=lstatSync(_0x387464);if(_0x4fca2b[_0x21c25e(0x20a)]())return _0x11cf31['push'](issue(_0x21c25e(0x1c3),_0x21c25e(0x1e6),SKILL_FILE,_0x21c25e(0x210),_0x21c25e(0x1e0))),undefined;if(!_0x4fca2b[_0x21c25e(0x1bb)]())return _0x11cf31[_0x21c25e(0x1d1)](issue(_0x21c25e(0x1c3),_0x21c25e(0x1e6),SKILL_FILE,_0x21c25e(0x211),_0x21c25e(0x212))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x387464,_0x21c25e(0x1df))};}function validateFrontmatter(_0x5891e6,_0x4a6de0,_0x17a1be){const _0x56925a=a56_0x8fec23;if(!_0x4a6de0[_0x56925a(0x213)]){_0x17a1be[_0x56925a(0x1d1)](issue(_0x56925a(0x1c3),_0x56925a(0x1c0),_0x5891e6,_0x56925a(0x1f5),_0x56925a(0x1dc)));return;}!_0x4a6de0[_0x56925a(0x1e7)]?.['trim']()&&_0x17a1be[_0x56925a(0x1d1)](issue(_0x56925a(0x1c3),_0x56925a(0x1c0),_0x5891e6,_0x56925a(0x1e1),_0x56925a(0x200))),!_0x4a6de0[_0x56925a(0x1d0)]?.['trim']()&&_0x17a1be['push'](issue(_0x56925a(0x1d9),'display-name-recommended',_0x5891e6,_0x56925a(0x1e5),_0x56925a(0x1d8))),!_0x4a6de0['example']?.[_0x56925a(0x1cc)]()&&_0x17a1be[_0x56925a(0x1d1)](issue(_0x56925a(0x1d9),_0x56925a(0x1ef),_0x5891e6,_0x56925a(0x205),_0x56925a(0x1ff))),!_0x4a6de0[_0x56925a(0x1bc)]?.[_0x56925a(0x1cc)]()&&_0x17a1be['push'](issue('error',_0x56925a(0x1b7),_0x5891e6,'Frontmatter\x20description\x20is\x20empty.','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。')),_0x4a6de0[_0x56925a(0x1f2)]===!![]&&_0x17a1be['push'](issue(_0x56925a(0x1c3),_0x56925a(0x1fe),_0x5891e6,_0x56925a(0x214),'Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x4a6de0[_0x56925a(0x20c)]?.['trim']()&&!SUPPORTED_SKILL_TYPES['has'](_0x4a6de0[_0x56925a(0x20c)])&&_0x17a1be[_0x56925a(0x1d1)](issue(_0x56925a(0x1c3),_0x56925a(0x1c0),_0x5891e6,'metadata.type\x20must\x20be\x20one\x20of\x20write,\x20read,\x20or\x20trainer.','Set\x20metadata.type\x20to\x20write,\x20read,\x20or\x20trainer.'));}function validateRuntimeCliReferences(_0x2a5237,_0x35b56e){const _0x4007ed=a56_0x8fec23;for(const _0x3749f8 of findRabetbaseCliInvocations(_0x2a5237)){_0x35b56e[_0x4007ed(0x1d1)](issue(_0x4007ed(0x1d9),_0x4007ed(0x1f6),_0x3749f8[_0x4007ed(0x1da)],_0x4007ed(0x1c4),_0x4007ed(0x1f8),'L'+_0x3749f8['line']));}}function findRabetbaseCliInvocations(_0x2f908c){const _0x1f60ff=a56_0x8fec23;return scanSkillDirectory(_0x2f908c)[_0x1f60ff(0x1f1)](_0xea8b1e=>TEXT_SKILL_FILE_PATTERN[_0x1f60ff(0x1d2)](_0xea8b1e['path']))[_0x1f60ff(0x203)](_0x286e0d=>{const _0x7dc929=_0x1f60ff,_0x22c23e=fileText(_0x286e0d);return _0x22c23e[_0x7dc929(0x1d6)](/\r?\n/)[_0x7dc929(0x1bf)]((_0x22b61c,_0x3cd45a)=>({'file':_0x286e0d['path'],'line':_0x3cd45a+0x1,'text':_0x22b61c}))[_0x7dc929(0x1f1)](({text:_0x3e7257})=>isRabetbaseCliInvocation(_0x3e7257))['map'](({file:_0x41b94e,line:_0x44c99e})=>({'file':_0x41b94e,'line':_0x44c99e}));});}const RABETBASE_SUBCOMMANDS=[a56_0x8fec23(0x1cf),a56_0x8fec23(0x1fa),'bff',a56_0x8fec23(0x1c8),a56_0x8fec23(0x1d4),a56_0x8fec23(0x1e4),'schema',a56_0x8fec23(0x1fb),a56_0x8fec23(0x207),'kb',a56_0x8fec23(0x1ed),a56_0x8fec23(0x1c7),a56_0x8fec23(0x1f0),a56_0x8fec23(0x20e),'logs',a56_0x8fec23(0x1ca)],RABETBASE_INVOCATION=new RegExp(String[a56_0x8fec23(0x215)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS['join']('|')})\b`+String[a56_0x8fec23(0x215)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function a56_0x45f3(_0x33529c,_0x1f4e0c){_0x33529c=_0x33529c-0x1b5;const _0x11d68e=a56_0x11d6();let _0x45f328=_0x11d68e[_0x33529c];return _0x45f328;}function isRabetbaseCliInvocation(_0x4a881f){const _0x48ed2c=a56_0x8fec23,_0x31e56d=_0x4a881f[_0x48ed2c(0x204)](/\brabetbase\b/i);if(_0x31e56d<0x0)return![];const _0x216d4f=_0x4a881f[_0x48ed2c(0x1f4)](_0x31e56d)[_0x48ed2c(0x1d6)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x48ed2c(0x1d2)](_0x216d4f);}function parseFrontmatter(_0x3ead05){const _0xdeb5c0=a56_0x8fec23,_0x243f11=_0x3ead05[_0xdeb5c0(0x208)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x243f11)return{'hasFrontmatter':![]};const _0xe73549=_0x243f11[0x1]??'',_0x49afb3={'hasFrontmatter':!![]};let _0x1b8fc7;try{_0x1b8fc7=a56_0x2e3ed3(_0xe73549);}catch{return _0x49afb3;}const _0x1daa5f=asRecord(_0x1b8fc7);if(!_0x1daa5f)return _0x49afb3;_0x49afb3[_0xdeb5c0(0x1e7)]=scalarToString(_0x1daa5f[_0xdeb5c0(0x1e7)]),_0x49afb3[_0xdeb5c0(0x1d0)]=scalarToString(_0x1daa5f[_0xdeb5c0(0x1d0)]),_0x49afb3['description']=scalarToString(_0x1daa5f['description']),_0x49afb3[_0xdeb5c0(0x1ec)]=scalarToString(_0x1daa5f[_0xdeb5c0(0x1ec)]);const _0x16aca0=asRecord(_0x1daa5f[_0xdeb5c0(0x1eb)]);return _0x16aca0&&(_0x49afb3['type']=scalarToString(_0x16aca0[_0xdeb5c0(0x20c)]),_0x49afb3[_0xdeb5c0(0x1f2)]=scalarToBoolean(_0x16aca0['internal'])),_0x49afb3;}function asRecord(_0x113336){const _0x3b3208=a56_0x8fec23;if(_0x113336&&typeof _0x113336===_0x3b3208(0x1f3)&&!Array[_0x3b3208(0x1cb)](_0x113336))return _0x113336;return undefined;}function scalarToString(_0xb2911e){const _0x124f98=a56_0x8fec23;if(typeof _0xb2911e===_0x124f98(0x1db))return _0xb2911e[_0x124f98(0x1cc)]();if(typeof _0xb2911e===_0x124f98(0x1ea)||typeof _0xb2911e===_0x124f98(0x1de))return String(_0xb2911e);return undefined;}function scalarToBoolean(_0x73fcc7){const _0x2331c7=a56_0x8fec23;if(typeof _0x73fcc7===_0x2331c7(0x1de))return _0x73fcc7;if(typeof _0x73fcc7===_0x2331c7(0x1db))return cleanBoolean(_0x73fcc7);return undefined;}function cleanBoolean(_0x3f482c){const _0x218055=a56_0x8fec23,_0x1e86dc=_0x3f482c[_0x218055(0x1cc)]()[_0x218055(0x1dd)]();if(_0x1e86dc==='true')return!![];if(_0x1e86dc===_0x218055(0x1d7))return![];return undefined;}function issue(_0x109f16,_0x37586c,_0x6ccf6d,_0x9c07b6,_0x580bdc,_0x2acd01){return{'level':_0x109f16,'ruleId':_0x37586c,'file':_0x6ccf6d,'section':_0x2acd01,'message':_0x9c07b6,'suggestion':_0x580bdc};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x37d733=a57_0x255c;(function(_0x3288e2,_0x320ad0){const _0x3ce47e=a57_0x255c,_0x459d79=_0x3288e2();while(!![]){try{const _0x139c86=-parseInt(_0x3ce47e(0xf6))/0x1*(-parseInt(_0x3ce47e(0xf8))/0x2)+parseInt(_0x3ce47e(0xf1))/0x3+parseInt(_0x3ce47e(0xed))/0x4+parseInt(_0x3ce47e(0xf7))/0x5+parseInt(_0x3ce47e(0xec))/0x6*(parseInt(_0x3ce47e(0xfd))/0x7)+-parseInt(_0x3ce47e(0xf2))/0x8*(-parseInt(_0x3ce47e(0xfe))/0x9)+-parseInt(_0x3ce47e(0xf9))/0xa;if(_0x139c86===_0x320ad0)break;else _0x459d79['push'](_0x459d79['shift']());}catch(_0x361641){_0x459d79['push'](_0x459d79['shift']());}}}(a57_0x2fed,0xbdd15));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a57_0x2fed(){const _0x1afda9=['445xiicSO','6149120hzCEjp','1230DLAKfp','38084730McNWDA','bool','sqlcode','sql','3332105uDbxJq','240372uBKATM','verbose','dbId','18OtFIGk','344132MfDuEw','detail','str','read','4544919GVXmlP','16SEebQO','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','sqlContent','appCode'];a57_0x2fed=function(){return _0x1afda9;};return a57_0x2fed();}import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a57_0x255c(_0x494d93,_0x1328aa){_0x494d93=_0x494d93-0xec;const _0x2fed34=a57_0x2fed();let _0x255c12=_0x2fed34[_0x494d93];return _0x255c12;}export const sqlDetail={'service':a57_0x37d733(0xfc),'command':a57_0x37d733(0xee),'description':a57_0x37d733(0xf3),'risk':a57_0x37d733(0xf0),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x26fed5){const _0x1b1517=a57_0x37d733,_0x7b76d8=await getSqlQueryInfo(_0x26fed5[_0x1b1517(0xf5)],_0x26fed5[_0x1b1517(0xef)](_0x1b1517(0xfb))),_0x20a227=_0x26fed5[_0x1b1517(0xfa)](_0x1b1517(0xff));if(_0x20a227)return{'ok':!![],'data':_0x7b76d8};const _0x8f5d41=_0x7b76d8[_0x1b1517(0x100)]?await getDbName(_0x26fed5[_0x1b1517(0xf5)],_0x7b76d8[_0x1b1517(0x100)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x7b76d8['sqlCode'],'sqlName':_0x7b76d8['sqlName'],'db':_0x8f5d41?_0x8f5d41+'\x20('+_0x7b76d8[_0x1b1517(0x100)]+')':_0x7b76d8[_0x1b1517(0x100)]??'','description':_0x7b76d8['description']??'','sqlContent':_0x7b76d8[_0x1b1517(0xf4)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0x186314=a58_0x58ba;(function(_0x59a468,_0x41e09f){const _0x2734e2=a58_0x58ba,_0x43e102=_0x59a468();while(!![]){try{const _0xa3cbd0=-parseInt(_0x2734e2(0x134))/0x1+parseInt(_0x2734e2(0x139))/0x2+-parseInt(_0x2734e2(0x127))/0x3+-parseInt(_0x2734e2(0x138))/0x4*(parseInt(_0x2734e2(0x125))/0x5)+parseInt(_0x2734e2(0x128))/0x6+-parseInt(_0x2734e2(0x130))/0x7*(-parseInt(_0x2734e2(0x12f))/0x8)+parseInt(_0x2734e2(0x126))/0x9*(parseInt(_0x2734e2(0x12d))/0xa);if(_0xa3cbd0===_0x41e09f)break;else _0x43e102['push'](_0x43e102['shift']());}catch(_0xc52b94){_0x43e102['push'](_0x43e102['shift']());}}}(a58_0x42d1,0xd7b81));function a58_0x58ba(_0x52061e,_0x14c1fb){_0x52061e=_0x52061e-0x122;const _0x42d1d9=a58_0x42d1();let _0x58ba31=_0x42d1d9[_0x52061e];return _0x58ba31;}function a58_0x42d1(){const _0xe0389=['5IEodlE','125379uBgkZC','3516828PoIsGF','951630CWRVVI','sql','params','str','execError','970UhDsLj','length','671648gzPjjI','147JbIZCL','isArray','execResult','now','1237145cqeGdQ','exec','read','\x20row(s)\x20in\x20','2476988kQHYhk','1278530nQnkJO','execSuccess','Returned\x20','SQL\x20execution\x20failed'];a58_0x42d1=function(){return _0xe0389;};return a58_0x42d1();}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':a58_0x186314(0x129),'command':a58_0x186314(0x135),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a58_0x186314(0x136),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0xeadd24){const _0x2be955=a58_0x186314,_0x1da939=parseJsonParams(_0xeadd24[_0x2be955(0x12b)](_0x2be955(0x12a))),_0x432696=Date[_0x2be955(0x133)](),_0x24b1db=await executeSdkSql(_0xeadd24[_0x2be955(0x12b)]('sqlcode'),_0x1da939),_0x15f7d4=Date[_0x2be955(0x133)]()-_0x432696,_0x194199=_0x24b1db?.[_0x2be955(0x132)]??_0x24b1db,_0x1ead74=_0x24b1db?.[_0x2be955(0x122)]??!![];if(!_0x1ead74)return{'ok':![],'data':{'error':_0x24b1db?.[_0x2be955(0x12c)]||_0x2be955(0x124),'elapsed':_0x15f7d4},'message':'SQL\x20execution\x20failed'};const _0x491651=Array[_0x2be955(0x131)](_0x194199)?_0x194199:[];return{'ok':!![],'data':{'rows':_0x491651,'rowCount':_0x491651[_0x2be955(0x12e)],'elapsed':_0x15f7d4},'message':_0x2be955(0x123)+_0x491651[_0x2be955(0x12e)]+_0x2be955(0x137)+_0x15f7d4+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4faf3f,_0x4e7d72){const _0x123029=a59_0x506f,_0x39b9be=_0x4faf3f();while(!![]){try{const _0x3544dc=parseInt(_0x123029(0xca))/0x1+parseInt(_0x123029(0xc5))/0x2*(parseInt(_0x123029(0xc4))/0x3)+-parseInt(_0x123029(0xc9))/0x4*(-parseInt(_0x123029(0xc6))/0x5)+-parseInt(_0x123029(0xcb))/0x6+parseInt(_0x123029(0xc2))/0x7*(-parseInt(_0x123029(0xc3))/0x8)+parseInt(_0x123029(0xc7))/0x9+-parseInt(_0x123029(0xc8))/0xa;if(_0x3544dc===_0x4e7d72)break;else _0x39b9be['push'](_0x39b9be['shift']());}catch(_0x5cda0c){_0x39b9be['push'](_0x39b9be['shift']());}}}(a59_0xae4e,0x761dd));import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];function a59_0x506f(_0x309d9f,_0x402755){_0x309d9f=_0x309d9f-0xc2;const _0xae4eb=a59_0xae4e();let _0x506f0e=_0xae4eb[_0x309d9f];return _0x506f0e;}function a59_0xae4e(){const _0x4e46f8=['3566437HRZtIE','8QnLExx','14193JfkxGe','302oZLwcg','15YOhNlf','4081257jOCEOQ','6254550wwMwqr','836612NUZazt','399287imuDAX','3455094VNlqcm'];a59_0xae4e=function(){return _0x4e46f8;};return a59_0xae4e();}
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a60_0x278509=a60_0x5bba;(function(_0x29381f,_0x341ee4){const _0x278a4c=a60_0x5bba,_0x48bc03=_0x29381f();while(!![]){try{const _0x21ddf5=parseInt(_0x278a4c(0x1d2))/0x1*(-parseInt(_0x278a4c(0x1b8))/0x2)+-parseInt(_0x278a4c(0x1c9))/0x3+parseInt(_0x278a4c(0x1c4))/0x4*(-parseInt(_0x278a4c(0x1ae))/0x5)+parseInt(_0x278a4c(0x1d3))/0x6+-parseInt(_0x278a4c(0x1da))/0x7+-parseInt(_0x278a4c(0x1f4))/0x8*(-parseInt(_0x278a4c(0x1d6))/0x9)+parseInt(_0x278a4c(0x1f6))/0xa*(parseInt(_0x278a4c(0x1f3))/0xb);if(_0x21ddf5===_0x341ee4)break;else _0x48bc03['push'](_0x48bc03['shift']());}catch(_0x16beac){_0x48bc03['push'](_0x48bc03['shift']());}}}(a60_0x1127,0xe938b));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a60_0x5bba(_0x57c51a,_0x2b46ab){_0x57c51a=_0x57c51a-0x1ad;const _0x112771=a60_0x1127();let _0x5bba16=_0x112771[_0x57c51a];return _0x5bba16;}import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':'latest','type':a60_0x278509(0x1bd),'description':a60_0x278509(0x1c1),'default':![]},{'name':'beta','type':a60_0x278509(0x1bd),'description':a60_0x278509(0x1b9),'default':![]},{'name':a60_0x278509(0x1e2),'type':a60_0x278509(0x1ce),'description':a60_0x278509(0x1f5)},{'name':a60_0x278509(0x1ea),'type':a60_0x278509(0x1bd),'description':a60_0x278509(0x1b2),'default':![]},{'name':a60_0x278509(0x1c0),'type':a60_0x278509(0x1bd),'description':a60_0x278509(0x1b7),'default':!![],'hidden':!![]}];function parseSemver(_0x3809ec){const _0x2d9692=a60_0x278509,_0x188964=_0x3809ec[_0x2d9692(0x1d7)]()[_0x2d9692(0x1dd)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x188964)return null;return{'major':Number(_0x188964[0x1]),'minor':Number(_0x188964[0x2]),'patch':Number(_0x188964[0x3]),'prerelease':_0x188964[0x4]};}function a60_0x1127(){const _0x526100=['fromEntries','skipped','12829992JiQocG','status','filter','match','\x20version\x20from\x20npm.','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','nonInteractive','minor','version','Version\x20comparison\x20failed.','Unable\x20to\x20resolve\x20','Already\x20on\x20requested\x20version\x20(v','join','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','\x20->\x20','Current\x20version:\x20','no-skills','Checking\x20npm\x20dist-tags...','install','npm','/dist-tags','unknown','pipe','beta','stdout','33HIELQG','3939512jtLzmD','Install\x20a\x20specific\x20CLI\x20version','9535640xesLjJ','warn','prerelease','inherit','run','Updating\x20','message','10YAppTr','exit\x20','source','object','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','validation','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','json','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','443834LsxLNd','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','stderr','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','cwd','boolean','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','patch','skills','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','\x20CLI\x20from\x20npm','log','836984hdKHmt','update','timeout','write','latest','3541713BPcVNK','bool','Update\x20failed:\x20','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','Checking\x20CLI\x20Built-in\x20Skill...','string','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','/-/package/','6RgGcKG','11238756cacfTx','toString','error','18SaAWes','trim'];a60_0x1127=function(){return _0x526100;};return a60_0x1127();}function compareSemver(_0x34dd87,_0x302d3f){const _0x42a752=a60_0x278509,_0x5e75f2=parseSemver(_0x34dd87),_0x13f00a=parseSemver(_0x302d3f);if(!_0x5e75f2||!_0x13f00a)throw CliErrors[_0x42a752(0x1b4)](_0x42a752(0x1e3),_0x42a752(0x1cc));for(const _0xa784f0 of['major',_0x42a752(0x1e1),_0x42a752(0x1bf)]){if(_0x5e75f2[_0xa784f0]<_0x13f00a[_0xa784f0])return-0x1;if(_0x5e75f2[_0xa784f0]>_0x13f00a[_0xa784f0])return 0x1;}if(!_0x5e75f2[_0x42a752(0x1f8)]&&!_0x13f00a[_0x42a752(0x1f8)])return 0x0;if(!_0x5e75f2['prerelease'])return 0x1;if(!_0x13f00a['prerelease'])return-0x1;if(_0x5e75f2[_0x42a752(0x1f8)]===_0x13f00a['prerelease'])return 0x0;return _0x5e75f2[_0x42a752(0x1f8)]<_0x13f00a['prerelease']?-0x1:0x1;}function getRequestedVersion(_0x1b6c0d){const _0x3145f5=a60_0x278509,_0x3310b0=_0x1b6c0d['str'](_0x3145f5(0x1e2))[_0x3145f5(0x1d7)]();if(_0x3310b0)return _0x3310b0;return String(_0x1b6c0d['args']?.[0x0]??'')[_0x3145f5(0x1d7)]();}function shouldSkipCliBuiltInSkill(_0x310d1b){const _0x443e6b=a60_0x278509;return _0x310d1b[_0x443e6b(0x1ca)]('no-skills')||_0x310d1b['flag'](_0x443e6b(0x1c0))===![];}async function validateUpdateFlags(_0x4dfd64){const _0x2c711c=a60_0x278509,_0x11582b=getRequestedVersion(_0x4dfd64),_0x49b52b=[_0x4dfd64[_0x2c711c(0x1ca)](_0x2c711c(0x1c8))?_0x2c711c(0x1c8):'',_0x4dfd64['bool'](_0x2c711c(0x1f1))?_0x2c711c(0x1f1):'',_0x11582b?_0x2c711c(0x1e2):''][_0x2c711c(0x1dc)](Boolean);if(_0x49b52b['length']>0x1)throw CliErrors[_0x2c711c(0x1b4)](_0x2c711c(0x1b3),_0x2c711c(0x1cf));if(_0x11582b&&!parseSemver(_0x11582b))throw CliErrors[_0x2c711c(0x1b4)]('Invalid\x20version:\x20'+_0x11582b,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x1d63ef=a60_0x278509;try{const _0x4ab0dc=NPM_REGISTRY_BASE_URL+_0x1d63ef(0x1d1)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x1d63ef(0x1ee),_0x411205=await fetch(_0x4ab0dc,{'signal':AbortSignal[_0x1d63ef(0x1c6)](0x2710)});if(!_0x411205['ok'])return null;const _0x54bfb3=await _0x411205[_0x1d63ef(0x1b6)]();if(!_0x54bfb3||typeof _0x54bfb3!==_0x1d63ef(0x1b1))return null;return Object[_0x1d63ef(0x1d8)](Object['entries'](_0x54bfb3)['filter'](([,_0x27010e])=>typeof _0x27010e==='string'&&_0x27010e[_0x1d63ef(0x1d7)]())['map'](([_0x331bd8,_0x3ff3fe])=>[_0x331bd8,String(_0x3ff3fe)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0x4c802a){const _0x153cc2=a60_0x278509,_0x2de4cc=getRequestedVersion(_0x4c802a);if(_0x2de4cc)return{'version':_0x2de4cc,'source':'version'};const _0x53b1c1=_0x4c802a[_0x153cc2(0x1ca)](_0x153cc2(0x1f1))?_0x153cc2(0x1f1):_0x153cc2(0x1c8),_0x45ecf3=await fetchNpmDistTags(),_0x53acfc=_0x45ecf3?.[_0x53b1c1];if(!_0x53acfc)return null;return{'version':_0x53acfc,'source':_0x53b1c1};}function shouldInstallTarget(_0x450028,_0x2883ad){const _0x24b758=a60_0x278509,_0x34ce65=compareSemver(_0x450028,_0x2883ad['version']);if(_0x2883ad['source']===_0x24b758(0x1e2))return _0x34ce65!==0x0;return _0x34ce65<0x0;}function installCliPackage(_0x49c56e,_0x564551){const _0x52026f=a60_0x278509,_0x4649fd=resolveNpmBin(_0x52026f(0x1ed)),_0x517fda=[_0x52026f(0x1ec),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x49c56e];console[_0x52026f(0x1c3)]('*\x20'+[_0x4649fd,..._0x517fda][_0x52026f(0x1e6)]('\x20'));const _0x273ea6=spawnSync(_0x4649fd,_0x517fda,{'cwd':process['cwd'](),'stdio':_0x564551?'pipe':_0x52026f(0x1f9),'env':process.env,'shell':![]});if(_0x273ea6['status']===0x0)return{'ok':!![]};let _0x52d303=_0x273ea6[_0x52026f(0x1d5)]?.[_0x52026f(0x1ad)]||_0x52026f(0x1af)+(_0x273ea6[_0x52026f(0x1db)]??_0x52026f(0x1ef));if(_0x564551){const _0x188104=_0x273ea6[_0x52026f(0x1ba)]?_0x273ea6[_0x52026f(0x1ba)][_0x52026f(0x1d4)]()[_0x52026f(0x1d7)]():'',_0x1b8a9d=_0x273ea6[_0x52026f(0x1f2)]?_0x273ea6['stdout']['toString']()[_0x52026f(0x1d7)]():'';if(_0x188104)_0x52d303=_0x188104;else{if(_0x1b8a9d)_0x52d303=_0x1b8a9d;}}return{'ok':![],'error':_0x52d303};}async function installCliBuiltInSkill(_0x2d05f1){const _0x583a51=a60_0x278509;console[_0x583a51(0x1c3)](_0x583a51(0x1cd));const _0x81b530=runNpxSkillsAddGlobal(process[_0x583a51(0x1bc)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x2d05f1?_0x583a51(0x1f0):_0x583a51(0x1f9)});if(_0x81b530[_0x583a51(0x1d9)]){console[_0x583a51(0x1c3)](_0x583a51(0x1d0)+LOVRABET_SKIP_NPX_SKILLS_ENV+'=1).');return;}if(_0x81b530['ok']){console[_0x583a51(0x1c3)](_0x583a51(0x1df));return;}console['warn'](_0x583a51(0x1bb)+(_0x81b530[_0x583a51(0x1d5)]||'unknown')),console[_0x583a51(0x1c3)]('\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install');}async function execute(_0x41cb36){const _0x444bb4=a60_0x278509;await validateUpdateFlags(_0x41cb36);const _0x9ec032=getCliVersion();console[_0x444bb4(0x1c3)](_0x444bb4(0x1e9)+_0x9ec032),console[_0x444bb4(0x1c3)](_0x444bb4(0x1eb));const _0x6fad8a=await resolveTargetVersion(_0x41cb36);if(!_0x6fad8a){const _0x52a757=_0x41cb36[_0x444bb4(0x1ca)](_0x444bb4(0x1f1))?'beta':'latest',_0x639bc4=_0x444bb4(0x1e4)+_0x52a757+_0x444bb4(0x1de);return console[_0x444bb4(0x1f7)](_0x639bc4),console[_0x444bb4(0x1c3)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x52a757),{'ok':![]};}if(!shouldInstallTarget(_0x9ec032,_0x6fad8a)){const _0x24e482=_0x6fad8a[_0x444bb4(0x1b0)]===_0x444bb4(0x1e2)?_0x444bb4(0x1e5)+_0x6fad8a[_0x444bb4(0x1e2)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x6fad8a['version']+').';return console[_0x444bb4(0x1c3)](_0x24e482),shouldSkipCliBuiltInSkill(_0x41cb36)?console['log'](_0x444bb4(0x1b5)):await installCliBuiltInSkill(_0x41cb36[_0x444bb4(0x1e0)]),{'ok':!![]};}console[_0x444bb4(0x1c3)](_0x444bb4(0x1fb)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x9ec032+_0x444bb4(0x1e8)+_0x6fad8a[_0x444bb4(0x1e2)]);const _0xebc7d6=installCliPackage(_0x6fad8a[_0x444bb4(0x1e2)],_0x41cb36[_0x444bb4(0x1e0)]);if(!_0xebc7d6['ok']){const _0x580a68=_0x444bb4(0x1cb)+(_0xebc7d6[_0x444bb4(0x1d5)]||_0x444bb4(0x1ef));return console['error'](_0x580a68),console[_0x444bb4(0x1c3)](_0x444bb4(0x1e7)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x6fad8a[_0x444bb4(0x1e2)]),{'ok':![]};}return console[_0x444bb4(0x1c3)]('Updated\x20to\x20v'+_0x6fad8a['version']+'.'),console[_0x444bb4(0x1c3)](_0x444bb4(0x1be)),shouldSkipCliBuiltInSkill(_0x41cb36)?console[_0x444bb4(0x1c3)](_0x444bb4(0x1b5)):await installCliBuiltInSkill(_0x41cb36['nonInteractive']),{'ok':!![]};}export const updateDefinition={'service':a60_0x278509(0x1c5),'command':a60_0x278509(0x1fa),'description':'Update\x20'+CLI_BIN_NAME+a60_0x278509(0x1c2),'risk':a60_0x278509(0x1c7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a60_0x31bafe=a60_0xa3f8;(function(_0x10004c,_0x1c4525){const _0x4c38ca=a60_0xa3f8,_0x368116=_0x10004c();while(!![]){try{const _0x427982=-parseInt(_0x4c38ca(0xc9))/0x1*(parseInt(_0x4c38ca(0xf2))/0x2)+-parseInt(_0x4c38ca(0xfb))/0x3*(-parseInt(_0x4c38ca(0xc2))/0x4)+parseInt(_0x4c38ca(0xc0))/0x5*(parseInt(_0x4c38ca(0xd4))/0x6)+-parseInt(_0x4c38ca(0xd0))/0x7*(-parseInt(_0x4c38ca(0xcd))/0x8)+parseInt(_0x4c38ca(0xfc))/0x9+parseInt(_0x4c38ca(0xe4))/0xa+-parseInt(_0x4c38ca(0xda))/0xb;if(_0x427982===_0x1c4525)break;else _0x368116['push'](_0x368116['shift']());}catch(_0x1e6174){_0x368116['push'](_0x368116['shift']());}}}(a60_0x5109,0xf1ed7));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':'latest','type':a60_0x31bafe(0xee),'description':a60_0x31bafe(0xdd),'default':![]},{'name':a60_0x31bafe(0xe6),'type':a60_0x31bafe(0xee),'description':a60_0x31bafe(0xf3),'default':![]},{'name':'version','type':a60_0x31bafe(0xe0),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':'no-skills','type':a60_0x31bafe(0xee),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a60_0x31bafe(0xd8),'type':'boolean','description':a60_0x31bafe(0xbb),'default':!![],'hidden':!![]}];function parseSemver(_0x4e844c){const _0x5d39c5=a60_0x31bafe,_0x5de8be=_0x4e844c[_0x5d39c5(0xd9)]()[_0x5d39c5(0xf6)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x5de8be)return null;return{'major':Number(_0x5de8be[0x1]),'minor':Number(_0x5de8be[0x2]),'patch':Number(_0x5de8be[0x3]),'prerelease':_0x5de8be[0x4]};}function compareSemver(_0x3af68a,_0x192c1b){const _0x30c0ea=a60_0x31bafe,_0x20bae9=parseSemver(_0x3af68a),_0x1b2149=parseSemver(_0x192c1b);if(!_0x20bae9||!_0x1b2149)throw CliErrors[_0x30c0ea(0x100)]('Version\x20comparison\x20failed.',_0x30c0ea(0xca));for(const _0x4dd5e2 of[_0x30c0ea(0xf7),_0x30c0ea(0xc1),'patch']){if(_0x20bae9[_0x4dd5e2]<_0x1b2149[_0x4dd5e2])return-0x1;if(_0x20bae9[_0x4dd5e2]>_0x1b2149[_0x4dd5e2])return 0x1;}if(!_0x20bae9[_0x30c0ea(0xbc)]&&!_0x1b2149['prerelease'])return 0x0;if(!_0x20bae9[_0x30c0ea(0xbc)])return 0x1;if(!_0x1b2149[_0x30c0ea(0xbc)])return-0x1;if(_0x20bae9[_0x30c0ea(0xbc)]===_0x1b2149['prerelease'])return 0x0;return _0x20bae9[_0x30c0ea(0xbc)]<_0x1b2149[_0x30c0ea(0xbc)]?-0x1:0x1;}function a60_0xa3f8(_0x6f222b,_0x35fab7){_0x6f222b=_0x6f222b-0xba;const _0x51099d=a60_0x5109();let _0xa3f84b=_0x51099d[_0x6f222b];return _0xa3f84b;}function getRequestedVersion(_0x50fed6){const _0x3de9d1=a60_0x31bafe,_0x19aec7=_0x50fed6[_0x3de9d1(0xcc)](_0x3de9d1(0xbf))['trim']();if(_0x19aec7)return _0x19aec7;return String(_0x50fed6[_0x3de9d1(0xdf)]?.[0x0]??'')['trim']();}function shouldSkipCliBuiltInSkill(_0x5ed286){const _0x3598e7=a60_0x31bafe;return _0x5ed286[_0x3598e7(0xf9)](_0x3598e7(0xe5))||_0x5ed286[_0x3598e7(0xcb)](_0x3598e7(0xd8))===![];}async function validateUpdateFlags(_0x5100d1){const _0x4c2b37=a60_0x31bafe,_0x220eac=getRequestedVersion(_0x5100d1),_0x392574=[_0x5100d1[_0x4c2b37(0xf9)](_0x4c2b37(0xf0))?_0x4c2b37(0xf0):'',_0x5100d1['bool'](_0x4c2b37(0xe6))?_0x4c2b37(0xe6):'',_0x220eac?'version':''][_0x4c2b37(0xe8)](Boolean);if(_0x392574['length']>0x1)throw CliErrors[_0x4c2b37(0x100)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x220eac&&!parseSemver(_0x220eac))throw CliErrors['validation'](_0x4c2b37(0xe7)+_0x220eac,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x9b04d1=a60_0x31bafe;try{const _0x54014d=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x9b04d1(0xcf),_0x4761f3=await fetch(_0x54014d,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x4761f3['ok'])return null;const _0x29b8ba=await _0x4761f3[_0x9b04d1(0xeb)]();if(!_0x29b8ba||typeof _0x29b8ba!==_0x9b04d1(0xc7))return null;return Object[_0x9b04d1(0xbd)](Object['entries'](_0x29b8ba)['filter'](([,_0x3a4cb5])=>typeof _0x3a4cb5===_0x9b04d1(0xe0)&&_0x3a4cb5[_0x9b04d1(0xd9)]())['map'](([_0x27ce36,_0x5f3c63])=>[_0x27ce36,String(_0x5f3c63)[_0x9b04d1(0xd9)]()]));}catch{return null;}}async function resolveTargetVersion(_0x34c357){const _0x9c66e4=a60_0x31bafe,_0x33c336=getRequestedVersion(_0x34c357);if(_0x33c336)return{'version':_0x33c336,'source':_0x9c66e4(0xbf)};const _0x55fe1c=_0x34c357['bool']('beta')?_0x9c66e4(0xe6):'latest',_0x5c6e7b=await fetchNpmDistTags(),_0x2f6dc2=_0x5c6e7b?.[_0x55fe1c];if(!_0x2f6dc2)return null;return{'version':_0x2f6dc2,'source':_0x55fe1c};}function shouldInstallTarget(_0x21a5a8,_0x354ca6){const _0x3728d2=a60_0x31bafe,_0x5315e5=compareSemver(_0x21a5a8,_0x354ca6[_0x3728d2(0xbf)]);if(_0x354ca6['source']===_0x3728d2(0xbf))return _0x5315e5!==0x0;return _0x5315e5<0x0;}function installCliPackage(_0x4cf951,_0x22dd94){const _0x444802=a60_0x31bafe,_0x4efc83=resolveNpmBin('npm'),_0xdc3753=[_0x444802(0xd3),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4cf951];console[_0x444802(0xdb)]('*\x20'+[_0x4efc83,..._0xdc3753]['join']('\x20'));const _0xb80845=spawnSync(_0x4efc83,_0xdc3753,{'cwd':process[_0x444802(0xc4)](),'stdio':_0x22dd94?_0x444802(0xfa):_0x444802(0xe2),'env':process.env,'shell':![]});if(_0xb80845[_0x444802(0x102)]===0x0)return{'ok':!![]};let _0x527b68=_0xb80845[_0x444802(0xd5)]?.[_0x444802(0x104)]||_0x444802(0x101)+(_0xb80845[_0x444802(0x102)]??_0x444802(0xce));if(_0x22dd94){const _0x2d98c9=_0xb80845[_0x444802(0xec)]?_0xb80845[_0x444802(0xec)][_0x444802(0xe3)]()[_0x444802(0xd9)]():'',_0x30e2e9=_0xb80845[_0x444802(0xed)]?_0xb80845[_0x444802(0xed)][_0x444802(0xe3)]()[_0x444802(0xd9)]():'';if(_0x2d98c9)_0x527b68=_0x2d98c9;else{if(_0x30e2e9)_0x527b68=_0x30e2e9;}}return{'ok':![],'error':_0x527b68};}async function installCliBuiltInSkill(_0x55e109){const _0x57adc4=a60_0x31bafe;console['log'](_0x57adc4(0xe1));const _0x1b70b5=runNpxSkillsAddGlobal(process['cwd'](),LOVRABET_SKILL_SOURCE,{'stdio':_0x55e109?_0x57adc4(0xfa):_0x57adc4(0xe2)});if(_0x1b70b5[_0x57adc4(0xc8)]){console[_0x57adc4(0xdb)](_0x57adc4(0xc6)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x57adc4(0xd7));return;}if(_0x1b70b5['ok']){console[_0x57adc4(0xdb)](_0x57adc4(0xf5));return;}console['warn'](_0x57adc4(0xde)+(_0x1b70b5['error']||'unknown')),console[_0x57adc4(0xdb)](_0x57adc4(0xea));}async function execute(_0x2dff85){const _0x123f96=a60_0x31bafe;await validateUpdateFlags(_0x2dff85);const _0x51427d=getCliVersion();console[_0x123f96(0xdb)](_0x123f96(0xfe)+_0x51427d),console[_0x123f96(0xdb)](_0x123f96(0xd2));const _0xa1f6be=await resolveTargetVersion(_0x2dff85);if(!_0xa1f6be){const _0x3b28f1=_0x2dff85[_0x123f96(0xf9)](_0x123f96(0xe6))?_0x123f96(0xe6):'latest',_0x166658='Unable\x20to\x20resolve\x20'+_0x3b28f1+_0x123f96(0xef);return console[_0x123f96(0xdc)](_0x166658),console[_0x123f96(0xdb)](_0x123f96(0xfd)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3b28f1),{'ok':![]};}if(!shouldInstallTarget(_0x51427d,_0xa1f6be)){const _0x2d8f97=_0xa1f6be[_0x123f96(0xc3)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0xa1f6be[_0x123f96(0xbf)]+').':_0x123f96(0xd1)+_0xa1f6be['version']+').';return console[_0x123f96(0xdb)](_0x2d8f97),shouldSkipCliBuiltInSkill(_0x2dff85)?console[_0x123f96(0xdb)](_0x123f96(0xe9)):await installCliBuiltInSkill(_0x2dff85['nonInteractive']),{'ok':!![]};}console[_0x123f96(0xdb)](_0x123f96(0xff)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x51427d+_0x123f96(0xf4)+_0xa1f6be[_0x123f96(0xbf)]);const _0x34c59d=installCliPackage(_0xa1f6be[_0x123f96(0xbf)],_0x2dff85[_0x123f96(0xc5)]);if(!_0x34c59d['ok']){const _0x20fefb=_0x123f96(0xbe)+(_0x34c59d['error']||'unknown');return console[_0x123f96(0xd5)](_0x20fefb),console[_0x123f96(0xdb)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0xa1f6be[_0x123f96(0xbf)]),{'ok':![]};}return console[_0x123f96(0xdb)]('Updated\x20to\x20v'+_0xa1f6be[_0x123f96(0xbf)]+'.'),console[_0x123f96(0xdb)](_0x123f96(0xd6)),shouldSkipCliBuiltInSkill(_0x2dff85)?console[_0x123f96(0xdb)](_0x123f96(0xe9)):await installCliBuiltInSkill(_0x2dff85[_0x123f96(0xc5)]),{'ok':!![]};}export const updateDefinition={'service':a60_0x31bafe(0xba),'command':a60_0x31bafe(0xf1),'description':a60_0x31bafe(0x103)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a60_0x31bafe(0xf8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};function a60_0x5109(){const _0x3041a1=['Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','prerelease','fromEntries','Update\x20failed:\x20','version','628900WtHQnP','minor','998756zUEWQG','source','cwd','nonInteractive','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(','object','skipped','1842jDpCpD','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','flag','str','24RykRVb','unknown','/dist-tags','3639223InGhlq','Already\x20up\x20to\x20date\x20(v','Checking\x20npm\x20dist-tags...','install','60llvnwZ','error','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','=1).','skills','trim','41615684BuNzvu','log','warn','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','args','string','Checking\x20CLI\x20Built-in\x20Skill...','inherit','toString','12325860RGqUtI','no-skills','beta','Invalid\x20version:\x20','filter','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','\x20\x20Run\x20manually:\x20lovrabet\x20cli-skill\x20install','json','stderr','stdout','boolean','\x20version\x20from\x20npm.','latest','run','1890xJFhxQ','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20->\x20','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','match','major','write','bool','pipe','15BwETcr','10947339HVEncy','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Current\x20version:\x20','Updating\x20','validation','exit\x20','status','Update\x20','message','update'];a60_0x5109=function(){return _0x3041a1;};return a60_0x5109();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a61_0x5440ee=a61_0x54a3;function a61_0x5c6e(){const _0x3414e0=['\x0aAccessKey:\x20not\x20written','object','\x20workspace\x20','../../core/api-client.js','join','483644ampgLV','Target\x20environment','Usage:\x20','isArray','defaultApp','2673490oEFohV','674205FxlQfK','project','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','init','map','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','App\x20\x22','App\x20code\x20to\x20bind\x20directly','58nwNzgi','write','app','18GdTzXh','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','command','937293GHWXrF','workspace\x20','Available\x20apps:\x20','Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace','\x0aEnv:\x20','\x22\x20not\x20found.','Set\x20app\x20context\x20for\x20the\x20current\x20workspace','\x20--appcode\x20<code>\x20[--env\x20daily]','appName','\x0aDefault\x20app:\x20','string','str','5489wbEnbs','appCode','boolean','items','6FbVFyg','apps','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','trim','envName','authRequired','appcode','accessKey','644340EirfuY','filter','includes','env','validation','Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','749488XypqSX','Invalid\x20env\x20\x22'];a61_0x5c6e=function(){return _0x3414e0;};return a61_0x5c6e();}(function(_0x34c41a,_0x3c862b){const _0x4678be=a61_0x54a3,_0x2f4a8b=_0x34c41a();while(!![]){try{const _0x34688c=-parseInt(_0x4678be(0x16c))/0x1*(parseInt(_0x4678be(0x15a))/0x2)+-parseInt(_0x4678be(0x13f))/0x3+-parseInt(_0x4678be(0x14c))/0x4+parseInt(_0x4678be(0x152))/0x5+parseInt(_0x4678be(0x170))/0x6*(-parseInt(_0x4678be(0x160))/0x7)+parseInt(_0x4678be(0x145))/0x8+parseInt(_0x4678be(0x15d))/0x9*(parseInt(_0x4678be(0x151))/0xa);if(_0x34688c===_0x3c862b)break;else _0x2f4a8b['push'](_0x2f4a8b['shift']());}catch(_0x3a4c99){_0x2f4a8b['push'](_0x2f4a8b['shift']());}}}(a61_0x5c6e,0x20d36));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':a61_0x5440ee(0x15c),'type':a61_0x5440ee(0x16a),'description':a61_0x5440ee(0x154)},{'name':a61_0x5440ee(0x13d),'type':a61_0x5440ee(0x16a),'description':a61_0x5440ee(0x159)},{'name':a61_0x5440ee(0x142),'type':a61_0x5440ee(0x16a),'description':a61_0x5440ee(0x14d),'enum':[...RUNTIME_ENV_VALUES]},{'name':'yes','type':a61_0x5440ee(0x16e),'description':a61_0x5440ee(0x144),'default':![]}];async function executeWorkspaceUse(_0x8c48bd,_0x2902b1){const _0x26a8ac=a61_0x5440ee,_0x43e829=_0x8c48bd[_0x26a8ac(0x16b)]('app')[_0x26a8ac(0x13a)](),_0x5dad7=_0x8c48bd['str'](_0x26a8ac(0x13d))['trim'](),_0x29d125=_0x8c48bd[_0x26a8ac(0x16b)](_0x26a8ac(0x142))['trim'](),_0x22395b=resolveWorkspaceEnv(_0x29d125||_0x8c48bd[_0x26a8ac(0x13b)]||DEFAULT_CONFIG_VALUES['env']);if(!_0x43e829&&!_0x5dad7)throw CliErrors[_0x26a8ac(0x143)]('Missing\x20workspace\x20app\x20selector.',_0x26a8ac(0x14e)+CLI_BIN_NAME+_0x26a8ac(0x149)+_0x2902b1+_0x26a8ac(0x172)+CLI_BIN_NAME+_0x26a8ac(0x149)+_0x2902b1+_0x26a8ac(0x167));const _0x3bfe90=_0x5dad7||await resolveRemoteAppCode({'command':_0x2902b1,'appName':_0x43e829,'env':_0x22395b,'accessKey':_0x8c48bd[_0x26a8ac(0x13e)]}),_0x45ed94=writeWorkspaceConfig({'command':_0x2902b1,'appName':_0x43e829,'appcode':_0x3bfe90,'env':_0x22395b,'shouldWriteEnv':!!_0x29d125,'accessKey':_0x8c48bd[_0x26a8ac(0x13e)]});return{'ok':!![],'data':{'configPath':_0x45ed94,'app':_0x43e829||null,'appcode':_0x3bfe90,'env':_0x29d125?_0x22395b:null,'accessKeyWritten':![],'command':_0x26a8ac(0x161)+_0x2902b1},'message':buildWorkspaceMessage(_0x45ed94,_0x43e829,_0x3bfe90,_0x29d125?_0x22395b:undefined)};}async function resolveRemoteAppCode(_0x1784b4){const _0x5a4894=a61_0x5440ee;if(!_0x1784b4[_0x5a4894(0x13e)])throw CliErrors[_0x5a4894(0x13c)](_0x5a4894(0x15e)+CLI_BIN_NAME+_0x5a4894(0x149)+_0x1784b4[_0x5a4894(0x15f)]+'.');const {setActiveAK:_0x1985d0}=await import(_0x5a4894(0x14a)),{getRemoteAppList:_0x36f1c7}=await import('../../commands/app/remote-source.js');_0x1985d0(_0x1784b4[_0x5a4894(0x13e)]);const _0x1c1ef3=await _0x36f1c7({'env':_0x1784b4['env'],'accessKey':_0x1784b4[_0x5a4894(0x13e)],'noCache':![]}),_0x2b4171=findAppByName(_0x1c1ef3[_0x5a4894(0x16f)],_0x1784b4[_0x5a4894(0x168)]);if(_0x2b4171&&!isRuntimeAccessibleApp(_0x2b4171))throw runtimeInaccessibleAppError(_0x2b4171,'\x22'+_0x1784b4[_0x5a4894(0x168)]+'\x22');const _0x3d3ee4=_0x2b4171?.[_0x5a4894(0x16d)]?.['trim']();if(_0x3d3ee4)return _0x3d3ee4;const _0x29bbe5=_0x1c1ef3[_0x5a4894(0x16f)][_0x5a4894(0x156)](_0x5f5612=>_0x5f5612['appName'])[_0x5a4894(0x140)](Boolean),_0x336a8d=_0x29bbe5['length']?_0x5a4894(0x162)+Array['from'](new Set(_0x29bbe5))['join'](',\x20')+'.':'Run\x20`'+CLI_BIN_NAME+_0x5a4894(0x157);throw CliErrors[_0x5a4894(0x143)](_0x5a4894(0x158)+_0x1784b4[_0x5a4894(0x168)]+_0x5a4894(0x165),_0x336a8d);}function writeWorkspaceConfig(_0x4997d9){const _0x5223e3=a61_0x5440ee,_0x2e960f=resolveWriteConfigPath(_0x5223e3(0x153)),_0x352731=readConfigFile(_0x2e960f);_0x4997d9['shouldWriteEnv']&&(_0x352731[_0x5223e3(0x142)]=_0x4997d9[_0x5223e3(0x142)]);if(_0x4997d9[_0x5223e3(0x168)]){const _0x27e2a0=isRecord(_0x352731[_0x5223e3(0x171)])?{..._0x352731[_0x5223e3(0x171)]}:{},_0x4834d2=isRecord(_0x27e2a0[_0x4997d9[_0x5223e3(0x168)]])?_0x27e2a0[_0x4997d9[_0x5223e3(0x168)]]:{};_0x27e2a0[_0x4997d9[_0x5223e3(0x168)]]={..._0x4834d2,'appcode':_0x4997d9[_0x5223e3(0x13d)]},_0x352731[_0x5223e3(0x171)]=_0x27e2a0,_0x352731[_0x5223e3(0x150)]=_0x4997d9[_0x5223e3(0x168)];if(_0x352731[_0x5223e3(0x15c)])delete _0x352731['app'];return writeAndReturn(_0x2e960f,_0x352731);}_0x352731[_0x5223e3(0x13d)]=_0x4997d9['appcode'];if(_0x352731[_0x5223e3(0x15c)])delete _0x352731[_0x5223e3(0x15c)];return writeAndReturn(_0x2e960f,_0x352731);}function writeAndReturn(_0x22f3b3,_0x1f90eb){return writeConfigFile(_0x22f3b3,_0x1f90eb),_0x22f3b3;}function a61_0x54a3(_0x16388e,_0x5f0c02){_0x16388e=_0x16388e-0x13a;const _0x5c6e69=a61_0x5c6e();let _0x54a34f=_0x5c6e69[_0x16388e];return _0x54a34f;}function resolveWorkspaceEnv(_0x133dc6){const _0x1e6dc1=a61_0x5440ee;if(RUNTIME_ENV_VALUES[_0x1e6dc1(0x141)](_0x133dc6))return _0x133dc6;throw CliErrors[_0x1e6dc1(0x143)](_0x1e6dc1(0x146)+_0x133dc6+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x1e6dc1(0x14b)](',\x20'));}function buildWorkspaceMessage(_0x1e5e46,_0xc88198,_0x32b594,_0x504bee){const _0x558e20=a61_0x5440ee,_0x2fcd87=_0xc88198?_0xc88198+'\x20('+_0x32b594+')':_0x32b594,_0x16ba2e=_0x504bee?_0x558e20(0x164)+_0x504bee:'';return'Workspace\x20configured.\x0aConfig\x20file:\x20'+_0x1e5e46+_0x558e20(0x169)+_0x2fcd87+_0x16ba2e+_0x558e20(0x147);}function isRecord(_0x508723){const _0x4b78a1=a61_0x5440ee;return typeof _0x508723===_0x4b78a1(0x148)&&_0x508723!==null&&!Array[_0x4b78a1(0x14f)](_0x508723);}function makeWorkspaceCommand(_0x4da79b){const _0x7761e=a61_0x5440ee;return{'service':'workspace','command':_0x4da79b,'description':_0x4da79b===_0x7761e(0x155)?_0x7761e(0x163):_0x7761e(0x166),'risk':_0x7761e(0x15b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x36be4f){return executeWorkspaceUse(_0x36be4f,_0x4da79b);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a61_0x5440ee(0x155)),makeWorkspaceCommand('use')];
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x26d276=a62_0x3a1a;(function(_0x5835e9,_0x49a84a){const _0x5293d6=a62_0x3a1a,_0x539f4a=_0x5835e9();while(!![]){try{const _0x48eff0=parseInt(_0x5293d6(0x119))/0x1+parseInt(_0x5293d6(0x11a))/0x2*(parseInt(_0x5293d6(0x11d))/0x3)+parseInt(_0x5293d6(0x110))/0x4+-parseInt(_0x5293d6(0x112))/0x5+-parseInt(_0x5293d6(0x12f))/0x6*(parseInt(_0x5293d6(0x12e))/0x7)+parseInt(_0x5293d6(0x123))/0x8*(-parseInt(_0x5293d6(0x128))/0x9)+parseInt(_0x5293d6(0x116))/0xa*(-parseInt(_0x5293d6(0x11f))/0xb);if(_0x48eff0===_0x49a84a)break;else _0x539f4a['push'](_0x539f4a['shift']());}catch(_0xbbc930){_0x539f4a['push'](_0x539f4a['shift']());}}}(a62_0x3a21,0x5e774));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a62_0x3a21(){const _0x4d8af4=['8cXIidz','cliSettableTopLevel','Risk\x20level','enumValues','Default\x20output\x20format','4125177fQDxEU','importable','Access\x20key\x20(client-ak\x20auth)','join','Override\x20user\x20domain','Locale','3598eXyrhL','3888vlTbaX','filter','Target\x20environment','map','2357164CuCuvr','defaultValue','687085tmIUSb','fromEntries',';\x20local\x20alias:\x20apps.<alias>.appcode','Override\x20runtime\x20domain','1050yemwXg','legacyCompatOnly','Override\x20API\x20domain','226939AbzMwi','4eoJLjV','entries','Config\x20key.\x20Top-level:\x20','969501esAwvb','format','15378nOuVlJ','riskLevel','Default\x20page\x20size','locale'];a62_0x3a21=function(){return _0x4d8af4;};return a62_0x3a21();}import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':a62_0x26d276(0x131),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['env'],'importable':!![]},'format':{'description':a62_0x26d276(0x127),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a62_0x26d276(0x11e)],'importable':!![]},'pageSize':{'description':a62_0x26d276(0x121),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a62_0x26d276(0x118),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a62_0x26d276(0x12c),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a62_0x26d276(0x115),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':'Override\x20SkillHub\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a62_0x26d276(0x12a),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a62_0x26d276(0x125),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a62_0x26d276(0x120)],'importable':!![]},'locale':{'description':a62_0x26d276(0x12d),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a62_0x26d276(0x122)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a62_0x26d276(0x11b)](CONFIG_FIELD_SCHEMAS)[a62_0x26d276(0x130)](([,_0x3fd145])=>_0x3fd145[a62_0x26d276(0x124)])[a62_0x26d276(0x132)](([_0x5c4acd])=>_0x5c4acd));export const CONFIG_ENUM_VALUES=Object[a62_0x26d276(0x113)](Object[a62_0x26d276(0x11b)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x579073])=>_0x579073[a62_0x26d276(0x126)])[a62_0x26d276(0x132)](([_0x5901c1,_0x516013])=>[_0x5901c1,[..._0x516013[a62_0x26d276(0x126)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object['entries'](CONFIG_FIELD_SCHEMAS)[a62_0x26d276(0x130)](([,_0x36f4fd])=>_0x36f4fd[a62_0x26d276(0x129)])[a62_0x26d276(0x132)](([_0x126fbc])=>_0x126fbc);export function getConfigFieldSchema(_0x298a8a){return CONFIG_FIELD_SCHEMAS[_0x298a8a];}export function getConfigEnumValues(_0x5d9128){const _0x1c989c=a62_0x26d276;return getConfigFieldSchema(_0x5d9128)?.[_0x1c989c(0x126)];}export function getConfigDefaultValue(_0x4f9cd7){const _0x5a733f=a62_0x26d276;return getConfigFieldSchema(_0x4f9cd7)?.[_0x5a733f(0x111)];}export function isTopLevelConfigKey(_0x12fcdf){return TOP_LEVEL_CONFIG_KEYS['has'](_0x12fcdf);}export function isLegacyCompatConfigKey(_0x40c667){const _0xe251f4=a62_0x26d276;return getConfigFieldSchema(_0x40c667)?.[_0xe251f4(0x117)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x31a9d7){const _0x3b6bc5=a62_0x26d276;return[..._0x31a9d7][_0x3b6bc5(0x12b)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x3c9adb=a62_0x26d276;return _0x3c9adb(0x11c)+getTopLevelConfigKeySummary()+_0x3c9adb(0x114);}function a62_0x3a1a(_0x4bfe1e,_0x3e43d7){_0x4bfe1e=_0x4bfe1e-0x110;const _0x3a21a6=a62_0x3a21();let _0x3a1a5b=_0x3a21a6[_0x4bfe1e];return _0x3a1a5b;}export function buildAppProfileListFields(_0x3daaef){return{'env':_0x3daaef,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x10056e=a63_0x31a5;function a63_0x31a5(_0x278966,_0x75d23e){_0x278966=_0x278966-0x7a;const _0x1ed294=a63_0x1ed2();let _0x31a531=_0x1ed294[_0x278966];return _0x31a531;}(function(_0x3dfdc5,_0x5171fc){const _0x2ed1ac=a63_0x31a5,_0x1a753f=_0x3dfdc5();while(!![]){try{const _0x160d94=parseInt(_0x2ed1ac(0x7a))/0x1*(parseInt(_0x2ed1ac(0x82))/0x2)+parseInt(_0x2ed1ac(0x7f))/0x3*(-parseInt(_0x2ed1ac(0x7c))/0x4)+-parseInt(_0x2ed1ac(0x7b))/0x5+parseInt(_0x2ed1ac(0x7e))/0x6+parseInt(_0x2ed1ac(0x84))/0x7*(-parseInt(_0x2ed1ac(0x81))/0x8)+-parseInt(_0x2ed1ac(0x80))/0x9+parseInt(_0x2ed1ac(0x83))/0xa;if(_0x160d94===_0x5171fc)break;else _0x1a753f['push'](_0x1a753f['shift']());}catch(_0x21592d){_0x1a753f['push'](_0x1a753f['shift']());}}}(a63_0x1ed2,0x93c9a));export const APP_PUBLISH_STATUS={'Published':'PUBLISHED','Unpublished':a63_0x10056e(0x7d)};function a63_0x1ed2(){const _0xce4ec0=['4CHwPKW','UNPUBLISH','4058238BTqSTL','3367842ySsMJV','4191435POtiun','16ZuuhmX','2dFIbOF','12986260OEbCnG','233891zxDHJf','Published','482659TCQvsd','985825hCftMR'];a63_0x1ed2=function(){return _0xce4ec0;};return a63_0x1ed2();}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a63_0x10056e(0x85)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a64_0x3fda(){const _0x5b754f=['7627246LiOjoB','472680HHgBng','ClientAk','986481OzxMWX','30tUzUMM','3bBxhpG','922635fqxxLx','17065hKuyYX','701300gfiwWM','343fkWHbW','28FbfdjM','29360FFVdIS'];a64_0x3fda=function(){return _0x5b754f;};return a64_0x3fda();}(function(_0x3213ed,_0x869b02){const _0x37e6f6=a64_0x50b1,_0xee4549=_0x3213ed();while(!![]){try{const _0x55bd0d=-parseInt(_0x37e6f6(0x124))/0x1*(parseInt(_0x37e6f6(0x127))/0x2)+-parseInt(_0x37e6f6(0x122))/0x3*(-parseInt(_0x37e6f6(0x125))/0x4)+-parseInt(_0x37e6f6(0x123))/0x5+-parseInt(_0x37e6f6(0x12a))/0x6+parseInt(_0x37e6f6(0x126))/0x7*(parseInt(_0x37e6f6(0x128))/0x8)+-parseInt(_0x37e6f6(0x12c))/0x9*(parseInt(_0x37e6f6(0x121))/0xa)+parseInt(_0x37e6f6(0x129))/0xb;if(_0x55bd0d===_0x869b02)break;else _0xee4549['push'](_0xee4549['shift']());}catch(_0x52766f){_0xee4549['push'](_0xee4549['shift']());}}}(a64_0x3fda,0x35199));export const AUTH_MODE={'ClientAk':'client-ak'};function a64_0x50b1(_0x312abe,_0x4d0f16){_0x312abe=_0x312abe-0x121;const _0x3fda72=a64_0x3fda();let _0x50b1f1=_0x3fda72[_0x312abe];return _0x50b1f1;}export function isAuthMode(_0x2f8454){const _0x38eb50=a64_0x50b1;return _0x2f8454===AUTH_MODE[_0x38eb50(0x12b)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a65_0x4d3a(_0x5e2aa9,_0x4f0311){_0x5e2aa9=_0x5e2aa9-0x11c;const _0x421b52=a65_0x421b();let _0x4d3add=_0x421b52[_0x5e2aa9];return _0x4d3add;}const a65_0x5d66c1=a65_0x4d3a;(function(_0x5cf64,_0x3e76f2){const _0x3ee606=a65_0x4d3a,_0x5a0b4b=_0x5cf64();while(!![]){try{const _0x209e11=-parseInt(_0x3ee606(0x137))/0x1+-parseInt(_0x3ee606(0x11e))/0x2+-parseInt(_0x3ee606(0x145))/0x3+parseInt(_0x3ee606(0x149))/0x4*(parseInt(_0x3ee606(0x123))/0x5)+parseInt(_0x3ee606(0x142))/0x6+-parseInt(_0x3ee606(0x128))/0x7+parseInt(_0x3ee606(0x124))/0x8;if(_0x209e11===_0x3e76f2)break;else _0x5a0b4b['push'](_0x5a0b4b['shift']());}catch(_0x594034){_0x5a0b4b['push'](_0x5a0b4b['shift']());}}}(a65_0x421b,0x38279));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a65_0x5d66c1(0x12d)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a65_0x5d66c1(0x134)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;function a65_0x421b(){const _0x284bd2=['Skip\x20confirmation\x20for\x20high-risk\x20writes','params','format','Show\x20help','meowKey','verbose','yes','925842aDdyns','appcode','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','930201LqeoYx','production\x20|\x20development\x20|\x20daily','clear','Record\x20ID','84QBeckw','Override\x20appcode','env','help','408784asrHXo','type','map','global','boolean','88130lkxhKZ','3856688xpmySn','app','Environment','sqlcode','1450813Whcluh','nonInteractive','<name>','<expr>','non-interactive','cliBinName','name','string','Name\x20filter','Verbose\x20output','Output\x20format','<code>','cliDisplayName','Preview\x20operation\x20without\x20executing','SQL\x20query\x20code','54812MTxWii','Use\x20global\x20config\x20scope','JSON\x20params\x20for\x20execute\x20commands','dry-run'];a65_0x421b=function(){return _0x284bd2;};return a65_0x421b();}export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a65_0x5d66c1(0x143),'type':a65_0x5d66c1(0x12f),'description':a65_0x5d66c1(0x14a),'hint':a65_0x5d66c1(0x133)},{'name':a65_0x5d66c1(0x125),'meowKey':a65_0x5d66c1(0x125),'type':a65_0x5d66c1(0x12f),'description':'Select\x20app\x20profile\x20by\x20name','hint':a65_0x5d66c1(0x12a)},{'name':a65_0x5d66c1(0x11c),'meowKey':a65_0x5d66c1(0x11c),'type':'string','description':a65_0x5d66c1(0x126),'hint':a65_0x5d66c1(0x146)},{'name':'format','meowKey':a65_0x5d66c1(0x13d),'type':a65_0x5d66c1(0x12f),'description':a65_0x5d66c1(0x132),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a65_0x5d66c1(0x12f),'description':a65_0x5d66c1(0x144),'hint':a65_0x5d66c1(0x12b)},{'name':a65_0x5d66c1(0x13a),'meowKey':'dryRun','type':'boolean','description':a65_0x5d66c1(0x135)},{'name':a65_0x5d66c1(0x141),'meowKey':a65_0x5d66c1(0x141),'type':a65_0x5d66c1(0x122),'description':a65_0x5d66c1(0x13b)},{'name':a65_0x5d66c1(0x12c),'meowKey':a65_0x5d66c1(0x129),'type':'boolean','description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a65_0x5d66c1(0x121),'meowKey':'global','type':a65_0x5d66c1(0x122),'description':a65_0x5d66c1(0x138)},{'name':'ci','meowKey':'ci','type':'boolean','description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a65_0x5d66c1(0x11d),'meowKey':a65_0x5d66c1(0x11d),'type':'boolean','description':a65_0x5d66c1(0x13e)},{'name':'id','meowKey':'id','type':'string','description':a65_0x5d66c1(0x148),'hidden':!![]},{'name':a65_0x5d66c1(0x12e),'meowKey':a65_0x5d66c1(0x12e),'type':a65_0x5d66c1(0x12f),'description':a65_0x5d66c1(0x130),'hidden':!![]},{'name':a65_0x5d66c1(0x127),'meowKey':a65_0x5d66c1(0x127),'type':'string','description':a65_0x5d66c1(0x136),'hidden':!![]},{'name':a65_0x5d66c1(0x13c),'meowKey':'params','type':'string','description':a65_0x5d66c1(0x139),'hidden':!![]},{'name':a65_0x5d66c1(0x140),'meowKey':a65_0x5d66c1(0x140),'type':'boolean','description':a65_0x5d66c1(0x131),'hidden':!![]},{'name':'clear','meowKey':a65_0x5d66c1(0x147),'type':a65_0x5d66c1(0x122),'description':'Clear\x20output','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a65_0x5d66c1(0x143),a65_0x5d66c1(0x125),a65_0x5d66c1(0x11c),'format','jq',a65_0x5d66c1(0x13a),a65_0x5d66c1(0x141),a65_0x5d66c1(0x12c),'ci']);export function buildMeowFlags(){const _0x4f410d=a65_0x5d66c1;return Object['fromEntries'](GLOBAL_FLAGS[_0x4f410d(0x120)](_0x1d4ff7=>[_0x1d4ff7[_0x4f410d(0x13f)],{'type':_0x1d4ff7[_0x4f410d(0x11f)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x44f67a=a66_0x1b37;(function(_0x2b62ba,_0x253a18){const _0x301da2=a66_0x1b37,_0x306ff0=_0x2b62ba();while(!![]){try{const _0x2428cb=-parseInt(_0x301da2(0x1dc))/0x1*(-parseInt(_0x301da2(0x1e1))/0x2)+parseInt(_0x301da2(0x1de))/0x3+-parseInt(_0x301da2(0x1db))/0x4+parseInt(_0x301da2(0x1d8))/0x5+-parseInt(_0x301da2(0x1e2))/0x6+-parseInt(_0x301da2(0x1e0))/0x7+parseInt(_0x301da2(0x1e3))/0x8;if(_0x2428cb===_0x253a18)break;else _0x306ff0['push'](_0x306ff0['shift']());}catch(_0x1d1741){_0x306ff0['push'](_0x306ff0['shift']());}}}(a66_0x1c14,0xa5071));function a66_0x1b37(_0x22a272,_0x2b044b){_0x22a272=_0x22a272-0x1d8;const _0x1c1421=a66_0x1c14();let _0x1b371f=_0x1c1421[_0x22a272];return _0x1b371f;}export const DEFAULT_APP_PROFILE_NAME=a66_0x44f67a(0x1d9);export const DEFAULT_CONFIG_VALUES={'env':a66_0x44f67a(0x1dd),'format':'compress','locale':a66_0x44f67a(0x1da),'riskLevel':a66_0x44f67a(0x1df)};function a66_0x1c14(){const _0x4077c6=['2270318PqIdwM','2020470ysnAgB','4382664DIsYKV','compress','2623125WcGCGE','main','en-US','172560zmMRiQ','1RQrXIf','production','600012MjAyNi','write','9462481BAbZQD'];a66_0x1c14=function(){return _0x4077c6;};return a66_0x1c14();}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a66_0x44f67a(0x1e4);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a67_0x3af5(_0x20acba,_0x4b86b9){_0x20acba=_0x20acba-0x94;const _0x21a1b1=a67_0x21a1();let _0x3af52e=_0x21a1b1[_0x20acba];return _0x3af52e;}const a67_0x1d6dfa=a67_0x3af5;(function(_0x13c701,_0x119f7f){const _0x4b9731=a67_0x3af5,_0xc9bc17=_0x13c701();while(!![]){try{const _0x446cc4=parseInt(_0x4b9731(0x99))/0x1+-parseInt(_0x4b9731(0x9f))/0x2*(-parseInt(_0x4b9731(0x9a))/0x3)+parseInt(_0x4b9731(0x96))/0x4*(-parseInt(_0x4b9731(0x94))/0x5)+parseInt(_0x4b9731(0x97))/0x6*(parseInt(_0x4b9731(0x98))/0x7)+-parseInt(_0x4b9731(0x9e))/0x8*(-parseInt(_0x4b9731(0x9b))/0x9)+-parseInt(_0x4b9731(0xa0))/0xa+parseInt(_0x4b9731(0x9d))/0xb*(-parseInt(_0x4b9731(0xa2))/0xc);if(_0x446cc4===_0x119f7f)break;else _0xc9bc17['push'](_0xc9bc17['shift']());}catch(_0x39432f){_0xc9bc17['push'](_0xc9bc17['shift']());}}}(a67_0x21a1,0xacf52));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a67_0x1d6dfa(0x9c)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a67_0x1d6dfa(0xa1)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a67_0x1d6dfa(0x95)];function a67_0x21a1(){const _0x22d0a5=['1264850ZawHfQ','skillSource','389652pgvIZz','1567370tutGFZ','npmRegistryBaseUrl','16IrRziG','979926nhSspv','21BhKpRU','98258yyJuaL','21ZEweOr','9jhjtzm','npmPackageName','11OrWFcH','6481064nzaBsG','206552qLhnwb'];a67_0x21a1=function(){return _0x22d0a5;};return a67_0x21a1();}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x2f6bc9=a68_0x480b;(function(_0x1054d9,_0x500b45){const _0x45c3e8=a68_0x480b,_0x2580e4=_0x1054d9();while(!![]){try{const _0x2130c6=parseInt(_0x45c3e8(0xa6))/0x1*(parseInt(_0x45c3e8(0x97))/0x2)+-parseInt(_0x45c3e8(0xa0))/0x3+-parseInt(_0x45c3e8(0x9e))/0x4+-parseInt(_0x45c3e8(0xa9))/0x5*(-parseInt(_0x45c3e8(0xa7))/0x6)+parseInt(_0x45c3e8(0x95))/0x7*(parseInt(_0x45c3e8(0xa1))/0x8)+parseInt(_0x45c3e8(0xa5))/0x9*(-parseInt(_0x45c3e8(0x9b))/0xa)+parseInt(_0x45c3e8(0x9a))/0xb*(-parseInt(_0x45c3e8(0x99))/0xc);if(_0x2130c6===_0x500b45)break;else _0x2580e4['push'](_0x2580e4['shift']());}catch(_0x36d828){_0x2580e4['push'](_0x2580e4['shift']());}}}(a68_0xb2ea,0xafc14));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a68_0xb2ea(){const _0x41984c=['skillhub','runtimeDomain','585909KrqfOO','1388647XqKDgY','6NFXyOs','nonProduction','4540265datnCA','99806qUDULI','apiDomain','2DiEqkM','runtime','12kANCSZ','3530593XherWN','190lRKaTg','user','domains','4976004HjMCYT','api','602175hZZNrT','800eAelqd','production'];a68_0xb2ea=function(){return _0x41984c;};return a68_0xb2ea();}let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x6905d5){const _0x7e0321=a68_0x480b;customApiDomain=_0x6905d5?.[_0x7e0321(0x96)],customUserDomain=_0x6905d5?.['userDomain'],customRuntimeDomain=_0x6905d5?.[_0x7e0321(0xa4)],customSkillHubDomain=_0x6905d5?.['skillHubDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a68_0x2f6bc9(0x9d)][a68_0x2f6bc9(0xa2)][a68_0x2f6bc9(0x9c)]:PRODUCT_CONFIG[a68_0x2f6bc9(0x9d)][a68_0x2f6bc9(0xa8)]['user']);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a68_0x2f6bc9(0x9d)]['production']['api']:PRODUCT_CONFIG[a68_0x2f6bc9(0x9d)][a68_0x2f6bc9(0xa8)][a68_0x2f6bc9(0x9f)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a68_0x2f6bc9(0x9d)][a68_0x2f6bc9(0xa2)][a68_0x2f6bc9(0x98)]:PRODUCT_CONFIG[a68_0x2f6bc9(0x9d)][a68_0x2f6bc9(0xa8)][a68_0x2f6bc9(0x98)]);function a68_0x480b(_0x5bd8b3,_0x481d9d){_0x5bd8b3=_0x5bd8b3-0x95;const _0xb2ea5e=a68_0xb2ea();let _0x480b5f=_0xb2ea5e[_0x5bd8b3];return _0x480b5f;}export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a68_0x2f6bc9(0x9d)][a68_0x2f6bc9(0xa2)][a68_0x2f6bc9(0xa3)]:PRODUCT_CONFIG[a68_0x2f6bc9(0x9d)]['nonProduction'][a68_0x2f6bc9(0xa3)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x4821f4=a69_0x1b49;(function(_0x237c16,_0x1b7815){const _0x4aaf28=a69_0x1b49,_0x4ca4e3=_0x237c16();while(!![]){try{const _0x4cc883=-parseInt(_0x4aaf28(0x1ab))/0x1+-parseInt(_0x4aaf28(0x1a3))/0x2+-parseInt(_0x4aaf28(0x19d))/0x3*(-parseInt(_0x4aaf28(0x1aa))/0x4)+-parseInt(_0x4aaf28(0x1a4))/0x5*(parseInt(_0x4aaf28(0x1a8))/0x6)+-parseInt(_0x4aaf28(0x1ad))/0x7+-parseInt(_0x4aaf28(0x1ac))/0x8*(parseInt(_0x4aaf28(0x19f))/0x9)+-parseInt(_0x4aaf28(0x1a6))/0xa*(-parseInt(_0x4aaf28(0x1a2))/0xb);if(_0x4cc883===_0x1b7815)break;else _0x4ca4e3['push'](_0x4ca4e3['shift']());}catch(_0x2f4e61){_0x4ca4e3['push'](_0x4ca4e3['shift']());}}}(a69_0x2231,0x530ae));function a69_0x2231(){const _0x4e2465=['5097VdPFwb','development','710712tuYdsx','online','production','168817AZQNyD','1360120iwzwRp','2219175WJwgYm','daily','1780fChulp','dev','6CgBACf','ENV','80Gotdbl','492843tmihfV','56dnHhrV','1792630sFSvki'];a69_0x2231=function(){return _0x4e2465;};return a69_0x2231();}import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a69_0x4821f4(0x1a1),a69_0x4821f4(0x19e),a69_0x4821f4(0x1a5)];export function normalizeEnv(_0x1c777f){const _0x3fc831=a69_0x4821f4;return _0x1c777f===_0x3fc831(0x1a0)?_0x3fc831(0x1a1):_0x1c777f;}export function isProduction(_0x5316f1){return normalizeEnv(_0x5316f1)==='production';}export function isDaily(_0x508bc5){const _0x570254=a69_0x4821f4;return normalizeEnv(_0x508bc5)===_0x570254(0x1a5);}export function isDev(_0x401860){const _0x5e7ee5=a69_0x4821f4,_0x1a751d=normalizeEnv(_0x401860);return _0x1a751d===_0x5e7ee5(0x19e)||_0x1a751d===_0x5e7ee5(0x1a7);}let env=normalizeEnv(productEnv(a69_0x4821f4(0x1a9))||'production');function a69_0x1b49(_0x2778dc,_0x38f0e2){_0x2778dc=_0x2778dc-0x19d;const _0x2231da=a69_0x2231();let _0x1b496f=_0x2231da[_0x2778dc];return _0x1b496f;}export function getEnv(){return env;}export function initEnv(_0x217f31){env=normalizeEnv(_0x217f31);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a70_0x2205f0=a70_0x5577;(function(_0x3eb9cc,_0x282204){const _0x2c370b=a70_0x5577,_0x59d05f=_0x3eb9cc();while(!![]){try{const _0x5af7a2=-parseInt(_0x2c370b(0x1e9))/0x1*(-parseInt(_0x2c370b(0x1f1))/0x2)+parseInt(_0x2c370b(0x1ed))/0x3*(-parseInt(_0x2c370b(0x1e7))/0x4)+parseInt(_0x2c370b(0x1ee))/0x5+-parseInt(_0x2c370b(0x1e5))/0x6*(-parseInt(_0x2c370b(0x1ec))/0x7)+-parseInt(_0x2c370b(0x1e6))/0x8*(parseInt(_0x2c370b(0x1e4))/0x9)+-parseInt(_0x2c370b(0x1ea))/0xa*(-parseInt(_0x2c370b(0x1e8))/0xb)+parseInt(_0x2c370b(0x1f0))/0xc;if(_0x5af7a2===_0x282204)break;else _0x59d05f['push'](_0x59d05f['shift']());}catch(_0x232d8a){_0x59d05f['push'](_0x59d05f['shift']());}}}(a70_0x49b6,0x8ab67));export const OUTPUT_FORMAT_VALUES=[a70_0x2205f0(0x1ef),a70_0x2205f0(0x1f2),a70_0x2205f0(0x1eb)];function a70_0x5577(_0x351aef,_0x34eaaf){_0x351aef=_0x351aef-0x1e4;const _0x49b692=a70_0x49b6();let _0x55774c=_0x49b692[_0x351aef];return _0x55774c;}function a70_0x49b6(){const _0x3e9bcb=['compress','338030mEhOfS','309HTyAYl','1599580rfaPiU','json','9832560mjkkpl','172058IKIvze','pretty','18HPaknY','102EzcyBd','3750360FnvFZj','41348pDQhTL','11IcPmiC','7UuTcor','80390vaiSmg'];a70_0x49b6=function(){return _0x3e9bcb;};return a70_0x49b6();}
|