@lovrabet/lovrabet-cli 2.3.5 → 2.3.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +10 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.d.ts +3 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.d.ts +3 -0
- package/lib/services/dataset-import/image-bytes.js +1 -0
- package/lib/services/dataset-import/image-ooxml.d.ts +10 -0
- package/lib/services/dataset-import/image-ooxml.js +1 -0
- package/lib/services/dataset-import/image-runner.d.ts +48 -0
- package/lib/services/dataset-import/image-runner.js +1 -0
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.d.ts +10 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/services/dataset-import/types.d.ts +28 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/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 +4 -1
- package/skills/lovrabet/SKILL.md +3 -1
- package/skills/lovrabet/references/lovrabet-excel-import.md +19 -0
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a81_0x21c9b3=a81_0x1646;(function(_0x5167fa,_0x3b09c2){const _0x34c4ea=a81_0x1646,_0x3b041b=_0x5167fa();while(!![]){try{const _0x267e64=-parseInt(_0x34c4ea(0x1c1))/0x1*(-parseInt(_0x34c4ea(0x1bd))/0x2)+-parseInt(_0x34c4ea(0x1cf))/0x3+-parseInt(_0x34c4ea(0x1b3))/0x4*(-parseInt(_0x34c4ea(0x1c7))/0x5)+-parseInt(_0x34c4ea(0x1b0))/0x6+parseInt(_0x34c4ea(0x1cd))/0x7+parseInt(_0x34c4ea(0x1c8))/0x8*(parseInt(_0x34c4ea(0x1b9))/0x9)+-parseInt(_0x34c4ea(0x1b1))/0xa;if(_0x267e64===_0x3b09c2)break;else _0x3b041b['push'](_0x3b041b['shift']());}catch(_0x1e9a66){_0x3b041b['push'](_0x3b041b['shift']());}}}(a81_0x30d5,0x90e87));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=[a81_0x21c9b3(0x1b4),'read'];export const DEFAULT_SKILL_TARGET='.agents/skills';export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function a81_0x30d5(){const _0x581716=['\x0a#\x20displayName:\x20\x22<填写符合用户实际诉求的人类可读展示名>\x22\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20','1075494FalCKm','\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','2527983OfvFBV','trim','timestamp','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','#\x20Output\x20Contract\x0a\x0a','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','references/output-contract.md','1656228vMRAtz','8195910JrTSAO','Invalid\x20Skill\x20name:\x20','7356GBqdIF','write','includes','validation','Unsupported\x20Skill\x20type:\x20','references/runtime-contract.md','158985kApYTl','test','\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\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','1184928MeIStK','toISOString','Use\x20one\x20of:\x20','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20Backend\x20Function、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','2mMvuTi','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','\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=','\x20只作为模板选择器,不替代业务权限、风险等级和用户确认。\x0a\x0a##\x20运行态入口\x0a\x0a【填写包内说明的运行态入口、可调用脚本或人工执行边界】\x0a\x0a##\x20凭证与登录态\x0a\x0a【填写本\x20Skill\x20依赖的第三方服务凭证和登录态治理方式。强烈建议通过\x20Lovrabet\x20应用后台或平台服务端适配器做平台托管配置;开发先行阶段如存在临时明文凭证,应标注后续治理计划、适用环境和额度边界,并避免进入长期交付内容。】\x0a\x0a##\x20第三方候选资产\x0a\x0a【填写第三方生成类结果的消费边界。生成类结果仅作为候选素材;涉及商品图、客户资料、Excel\x20或业务文件上传时,必须声明授权、额度、审计、失败降级和人工审核/业务\x20Backend\x20Function\x20校验后的发布边界。】\x0a\x0a##\x20预览\x20/\x20写入\x20/\x20核对差异\x0a\x0a【填写预览、确认、正式执行和只读核对的顺序】\x0a\x0a','\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','---\x0aname:\x20','1035ODLWlh','368RsCZVg','skillName','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。'];a81_0x30d5=function(){return _0x581716;};return a81_0x30d5();}export const RUNTIME_CONTRACT_FILE=a81_0x21c9b3(0x1b8);function a81_0x1646(_0x3e21f2,_0x31f492){_0x3e21f2=_0x3e21f2-0x1b0;const _0x30d554=a81_0x30d5();let _0x16467a=_0x30d554[_0x3e21f2];return _0x16467a;}export const OUTPUT_CONTRACT_FILE=a81_0x21c9b3(0x1d5);export function validateSkillName(_0x156395){const _0x379acf=a81_0x21c9b3,_0x56e2c3=_0x156395['trim']();if(!SKILL_NAME_PATTERN[_0x379acf(0x1ba)](_0x56e2c3))throw CliErrors[_0x379acf(0x1b6)](_0x379acf(0x1b2)+_0x156395+'.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.',_0x379acf(0x1d2));return _0x56e2c3;}export function normalizeSkillTemplateType(_0xc2ec6e){const _0x32d661=a81_0x21c9b3,_0x54ea41=(_0xc2ec6e||_0x32d661(0x1b4))[_0x32d661(0x1d0)]()||_0x32d661(0x1b4);if(SKILL_TYPES[_0x32d661(0x1b5)](_0x54ea41))return _0x54ea41;throw CliErrors[_0x32d661(0x1b6)](_0x32d661(0x1b7)+_0xc2ec6e,_0x32d661(0x1bf)+SKILL_TYPES['join'](',\x20')+'.');}export function renderSkillTemplate(_0x2bdd30){const _0x46574f=a81_0x21c9b3,_0x20317a=validateSkillName(_0x2bdd30[_0x46574f(0x1c9)]),_0x382179=normalizeSkillTemplateType(_0x2bdd30['type']),_0x3ad147=_0x2bdd30[_0x46574f(0x1d1)]??new Date()[_0x46574f(0x1be)]();return{'skillName':_0x20317a,'type':_0x382179,'files':[{'path':'SKILL.md','content':renderSkillMd(_0x20317a,_0x382179,_0x3ad147)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x20317a,_0x382179)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x20317a,_0x382179)}]};}function renderSkillMd(_0xb5b21b,_0xaec99,_0x11e3d6){const _0x5ae3ef=a81_0x21c9b3,_0x1849d9=typeWorkflow(_0xaec99);return _0x5ae3ef(0x1c6)+_0xb5b21b+_0x5ae3ef(0x1cc)+_0xaec99+'\x0a\x20\x20created:\x20\x22'+_0x11e3d6+'\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20'+_0xb5b21b+'\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应用后台、Backend\x20Function\x20或平台适配器统一配置。目标治理口径是\x20Skill\x20不读取、不分发、不保存明文凭证。详细凭证、额度、审计和审核发布规则写入\x20references/runtime-contract.md。】\x0a\x0a##\x20SOP\x20工作流\x0a\x0a'+_0x1849d9+'\x0a\x0a'+businessStateSection(_0xaec99)+_0x5ae3ef(0x1c5);}function renderRuntimeContract(_0x36fadc,_0x282dda){const _0x4f08ac=a81_0x21c9b3,_0x35a4a2=_0x282dda==='write'?_0x4f08ac(0x1d4):'';return _0x4f08ac(0x1c2)+_0x36fadc+_0x4f08ac(0x1c3)+_0x282dda+_0x4f08ac(0x1c4)+_0x35a4a2+_0x4f08ac(0x1bb);}function renderOutputContract(_0x46203a,_0x185113){const _0x5a0f62=a81_0x21c9b3,_0x475282=_0x185113===_0x5a0f62(0x1b4)?_0x5a0f62(0x1bc):_0x185113+'\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。';return _0x5a0f62(0x1d3)+_0x46203a+_0x5a0f62(0x1ce)+_0x475282+_0x5a0f62(0x1ca);}function typeWorkflow(_0x6abdfc){const _0xdf6feb=a81_0x21c9b3;if(_0x6abdfc==='read')return _0xdf6feb(0x1cb);return'1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】';}function businessStateSection(_0x2b5c4f){const _0x3ab562=a81_0x21c9b3;if(_0x2b5c4f!==_0x3ab562(0x1b4))return'';return _0x3ab562(0x1c0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a82_0x462d18=a82_0x331e;(function(_0x5120eb,_0xff7678){const _0x5da6f3=a82_0x331e,_0x2e7430=_0x5120eb();while(!![]){try{const _0x113c9b=parseInt(_0x5da6f3(0xaf))/0x1+-parseInt(_0x5da6f3(0xb4))/0x2*(-parseInt(_0x5da6f3(0x91))/0x3)+-parseInt(_0x5da6f3(0x8d))/0x4+parseInt(_0x5da6f3(0x84))/0x5+parseInt(_0x5da6f3(0x9c))/0x6*(-parseInt(_0x5da6f3(0x80))/0x7)+-parseInt(_0x5da6f3(0xbd))/0x8*(-parseInt(_0x5da6f3(0xa4))/0x9)+-parseInt(_0x5da6f3(0x89))/0xa;if(_0x113c9b===_0xff7678)break;else _0x2e7430['push'](_0x2e7430['shift']());}catch(_0x299e27){_0x2e7430['push'](_0x2e7430['shift']());}}}(a82_0x55ed,0xdc598));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a82_0x2d8d18}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';function a82_0x331e(_0x236cdf,_0x137221){_0x236cdf=_0x236cdf-0x7e;const _0x55ed09=a82_0x55ed();let _0x331e93=_0x55ed09[_0x236cdf];return _0x331e93;}const SKILL_FILE='SKILL.md',SUPPORTED_SKILL_TYPES=new Set([a82_0x462d18(0xc1),a82_0x462d18(0x8e)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x5ad793,_0x56f66b={}){const _0x32c1bf=a82_0x462d18,_0x429d4f=resolveSkillDirectoryRoot(_0x5ad793),_0x2c0eec=[],_0x518f11=loadRequiredSkillFile(_0x429d4f,_0x2c0eec),_0x8822a1=_0x518f11?parseFrontmatter(_0x518f11['content']):{'hasFrontmatter':![]};_0x518f11&&validateFrontmatter(_0x518f11['path'],_0x8822a1,_0x2c0eec);validateRuntimeCliReferences(_0x429d4f,_0x2c0eec);const _0xd18cbb=_0x2c0eec[_0x32c1bf(0xb0)](_0x15d0b3=>_0x15d0b3[_0x32c1bf(0x98)]==='error'),_0x3522d5=_0x2c0eec[_0x32c1bf(0xb0)](_0x1f2e3f=>_0x1f2e3f[_0x32c1bf(0x98)]===_0x32c1bf(0x88));return{'ok':_0xd18cbb['length']===0x0,'dir':_0x429d4f,'type':_0x8822a1[_0x32c1bf(0xb6)],'errors':_0xd18cbb,'warnings':_0x3522d5};}function resolveSkillDirectoryRoot(_0x4c1924){const _0x1a65b6=a82_0x462d18,_0x2ce078=resolve(_0x4c1924);if(!existsSync(_0x2ce078))throw CliErrors['validation'](_0x1a65b6(0xbe)+_0x4c1924);const _0x493f6c=lstatSync(_0x2ce078);if(_0x493f6c['isDirectory']())return _0x2ce078;if(_0x493f6c[_0x1a65b6(0xa0)]()){const _0x36de55=realpathSync(_0x2ce078);if(lstatSync(_0x36de55)['isDirectory']())return _0x36de55;}throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x4c1924);}export function throwIfSkillValidationFailed(_0x1864bf,_0xac12ed=![]){const _0x2322bf=a82_0x462d18;if(_0x1864bf['ok'])return;const _0x5de8d4=_0x1864bf[_0x2322bf(0xc8)]['map'](_0x519974=>{const _0x458095=_0x2322bf,_0x59c3d4=_0x519974[_0x458095(0xba)]?'#'+_0x519974[_0x458095(0xba)]:'';return _0x519974[_0x458095(0x98)]['toUpperCase']()+'\x20'+_0x519974[_0x458095(0x9f)]+'\x20'+_0x519974['file']+_0x59c3d4+':\x20'+_0x519974[_0x458095(0x85)]+_0x458095(0x94)+_0x519974[_0x458095(0x97)];});throw CliErrors[_0x2322bf(0xca)]('Skill\x20validation\x20failed:\x0a'+_0x5de8d4[_0x2322bf(0x95)]('\x0a'),'Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.');}function loadRequiredSkillFile(_0x2e16ed,_0x4e6e90){const _0x1cedb0=a82_0x462d18,_0x5cb656=resolve(_0x2e16ed,SKILL_FILE);if(!existsSync(_0x5cb656))return _0x4e6e90['push'](issue('error',_0x1cedb0(0xb8),SKILL_FILE,_0x1cedb0(0xa6),'Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.')),undefined;const _0x344113=lstatSync(_0x5cb656);if(_0x344113[_0x1cedb0(0xa0)]())return _0x4e6e90['push'](issue(_0x1cedb0(0xa2),_0x1cedb0(0xb8),SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.',_0x1cedb0(0x9e))),undefined;if(!_0x344113[_0x1cedb0(0x7e)]())return _0x4e6e90[_0x1cedb0(0x81)](issue(_0x1cedb0(0xa2),_0x1cedb0(0xb8),SKILL_FILE,_0x1cedb0(0xc6),'Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.')),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x5cb656,'utf8')};}function validateFrontmatter(_0x2c27f4,_0x18a065,_0x4abea8){const _0x324435=a82_0x462d18;if(!_0x18a065[_0x324435(0x8f)]){_0x4abea8['push'](issue(_0x324435(0xa2),_0x324435(0xa9),_0x2c27f4,'SKILL.md\x20must\x20start\x20with\x20frontmatter.',_0x324435(0xa1)));return;}!_0x18a065[_0x324435(0x8c)]?.['trim']()&&_0x4abea8[_0x324435(0x81)](issue(_0x324435(0xa2),_0x324435(0xa9),_0x2c27f4,_0x324435(0xae),_0x324435(0x83))),!_0x18a065['displayName']?.['trim']()&&_0x4abea8[_0x324435(0x81)](issue('warning',_0x324435(0x86),_0x2c27f4,_0x324435(0xa7),_0x324435(0x96))),!_0x18a065[_0x324435(0xc2)]?.[_0x324435(0xc4)]()&&_0x4abea8['push'](issue('warning','example-recommended',_0x2c27f4,'Frontmatter\x20example\x20is\x20missing.',_0x324435(0xc0))),!_0x18a065[_0x324435(0x9d)]?.[_0x324435(0xc4)]()&&_0x4abea8[_0x324435(0x81)](issue(_0x324435(0xa2),'description-required',_0x2c27f4,_0x324435(0xac),'Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.')),_0x18a065[_0x324435(0xb2)]===!![]&&_0x4abea8[_0x324435(0x81)](issue(_0x324435(0xa2),_0x324435(0x99),_0x2c27f4,'metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x18a065['type']?.[_0x324435(0xc4)]()&&!SUPPORTED_SKILL_TYPES[_0x324435(0x8b)](_0x18a065['type'])&&_0x4abea8[_0x324435(0x81)](issue(_0x324435(0xa2),_0x324435(0xa9),_0x2c27f4,'metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','Set\x20metadata.type\x20to\x20write\x20or\x20read.'));}function validateRuntimeCliReferences(_0x45494c,_0x38b211){const _0x4ded7a=a82_0x462d18;for(const _0x4a5329 of findRabetbaseCliInvocations(_0x45494c)){_0x38b211['push'](issue(_0x4ded7a(0x88),'rabetbase-cli-reference',_0x4a5329['file'],_0x4ded7a(0xbc),_0x4ded7a(0x90),'L'+_0x4a5329['line']));}}function a82_0x55ed(){const _0x525a5b=['Frontmatter\x20displayName\x20is\x20missing.','string','frontmatter-required','split','data','Frontmatter\x20description\x20is\x20empty.','map','Frontmatter\x20name\x20is\x20missing.','758981DkJAcm','filter','sql','internal','test','2hKRAKk','app','type','match','structure-complete','true','section','false','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','7123144ClZDfV','Skill\x20directory\x20not\x20found:\x20','bff','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','write','example','logs','trim','slice','SKILL.md\x20is\x20not\x20a\x20file.','isArray','errors','boolean','validation','isFile','project','7arVJMJ','push','artifact','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','9000305xMuLoM','message','display-name-recommended','raw','warning','34993810lKrZPY','search','has','name','5077044GmwUyd','read','hasFrontmatter','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','4300329JymMGc','config','number','\x20Fix:\x20','join','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','suggestion','level','internal-skill','metadata','object','612462mWYcdy','description','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','ruleId','isSymbolicLink','Add\x20frontmatter\x20with\x20name\x20and\x20description.','error','displayName','18ekCRQQ','registry','Missing\x20SKILL.md.'];a82_0x55ed=function(){return _0x525a5b;};return a82_0x55ed();}function findRabetbaseCliInvocations(_0x4eeabf){const _0x478f95=a82_0x462d18;return scanSkillDirectory(_0x4eeabf)[_0x478f95(0xb0)](_0x56a78b=>TEXT_SKILL_FILE_PATTERN[_0x478f95(0xb3)](_0x56a78b['path']))['flatMap'](_0x8cc325=>{const _0x5ee597=_0x478f95,_0x52c8b9=fileText(_0x8cc325);return _0x52c8b9[_0x5ee597(0xaa)](/\r?\n/)[_0x5ee597(0xad)]((_0x368226,_0x554028)=>({'file':_0x8cc325['path'],'line':_0x554028+0x1,'text':_0x368226}))[_0x5ee597(0xb0)](({text:_0x3a7f8d})=>isRabetbaseCliInvocation(_0x3a7f8d))['map'](({file:_0x4dc356,line:_0x29459a})=>({'file':_0x4dc356,'line':_0x29459a}));});}const RABETBASE_SUBCOMMANDS=['dataset',a82_0x462d18(0xb1),a82_0x462d18(0xbf),'page',a82_0x462d18(0x7f),a82_0x462d18(0xb5),'schema','service',a82_0x462d18(0x82),'kb',a82_0x462d18(0x92),'workspace',a82_0x462d18(0xab),'auth',a82_0x462d18(0xc3),a82_0x462d18(0xa5)],RABETBASE_INVOCATION=new RegExp(String[a82_0x462d18(0x87)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a82_0x462d18(0x95)]('|')})\b`+String['raw']`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0xbed0a8){const _0x19a011=a82_0x462d18,_0x4a41a5=_0xbed0a8[_0x19a011(0x8a)](/\brabetbase\b/i);if(_0x4a41a5<0x0)return![];const _0x246d9b=_0xbed0a8[_0x19a011(0xc5)](_0x4a41a5)[_0x19a011(0xaa)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x19a011(0xb3)](_0x246d9b);}function parseFrontmatter(_0x3fc703){const _0x48459f=a82_0x462d18,_0x2e2368=_0x3fc703[_0x48459f(0xb7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2e2368)return{'hasFrontmatter':![]};const _0x243be8=_0x2e2368[0x1]??'',_0x5a3f1d={'hasFrontmatter':!![]};let _0xaf270a;try{_0xaf270a=a82_0x2d8d18(_0x243be8);}catch{return _0x5a3f1d;}const _0x55944e=asRecord(_0xaf270a);if(!_0x55944e)return _0x5a3f1d;_0x5a3f1d[_0x48459f(0x8c)]=scalarToString(_0x55944e['name']),_0x5a3f1d[_0x48459f(0xa3)]=scalarToString(_0x55944e[_0x48459f(0xa3)]),_0x5a3f1d[_0x48459f(0x9d)]=scalarToString(_0x55944e[_0x48459f(0x9d)]),_0x5a3f1d[_0x48459f(0xc2)]=scalarToString(_0x55944e[_0x48459f(0xc2)]);const _0x5cb4d3=asRecord(_0x55944e[_0x48459f(0x9a)]);return _0x5cb4d3&&(_0x5a3f1d[_0x48459f(0xb6)]=scalarToString(_0x5cb4d3[_0x48459f(0xb6)]),_0x5a3f1d[_0x48459f(0xb2)]=scalarToBoolean(_0x5cb4d3['internal'])),_0x5a3f1d;}function asRecord(_0x184821){const _0x2268c9=a82_0x462d18;if(_0x184821&&typeof _0x184821===_0x2268c9(0x9b)&&!Array[_0x2268c9(0xc7)](_0x184821))return _0x184821;return undefined;}function scalarToString(_0x1d0474){const _0x10baf3=a82_0x462d18;if(typeof _0x1d0474===_0x10baf3(0xa8))return _0x1d0474[_0x10baf3(0xc4)]();if(typeof _0x1d0474===_0x10baf3(0x93)||typeof _0x1d0474==='boolean')return String(_0x1d0474);return undefined;}function scalarToBoolean(_0x1de22c){const _0xa516a6=a82_0x462d18;if(typeof _0x1de22c===_0xa516a6(0xc9))return _0x1de22c;if(typeof _0x1de22c===_0xa516a6(0xa8))return cleanBoolean(_0x1de22c);return undefined;}function cleanBoolean(_0x27a6cc){const _0x3e4edc=a82_0x462d18,_0x7ee9da=_0x27a6cc['trim']()['toLowerCase']();if(_0x7ee9da===_0x3e4edc(0xb9))return!![];if(_0x7ee9da===_0x3e4edc(0xbb))return![];return undefined;}function issue(_0x4c9a6e,_0x2bb9fe,_0x9d390d,_0x17897f,_0x3e0867,_0x31511d){return{'level':_0x4c9a6e,'ruleId':_0x2bb9fe,'file':_0x9d390d,'section':_0x31511d,'message':_0x17897f,'suggestion':_0x3e0867};}
|
|
1
|
+
const a82_0x590fb9=a82_0x1533;function a82_0x2a14(){const _0x575233=['structure-complete','line','true','name','20032ZEzyKB','Frontmatter\x20description\x20is\x20empty.','file','toLowerCase','content','errors','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','9341721ilqGQw','displayName','trim','search','validation','SKILL.md\x20must\x20start\x20with\x20frontmatter.','toUpperCase','slice','186xMusXb','rabetbase-cli-reference','isFile','Frontmatter\x20displayName\x20is\x20missing.','message','split','SKILL.md\x20is\x20not\x20a\x20file.','path','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','raw','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','app','1464985fXKixK','metadata','error','example','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','write','suggestion','string','boolean','sql','logs','project','Frontmatter\x20name\x20is\x20missing.','number','flatMap','object','1136962upaucg','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','5603124hKiMQY','8381648xnwfGY','bff','Add\x20frontmatter\x20with\x20name\x20and\x20description.','description','map','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','read','SKILL.md','section','isDirectory','isArray','filter','warning','registry','display-name-recommended','utf8','type','frontmatter-required','join','2KwBTxR','dataset','\x20Fix:\x20','internal','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','test','level','Missing\x20SKILL.md.','description-required','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','5029626ZkjVfo','service','push','example-recommended'];a82_0x2a14=function(){return _0x575233;};return a82_0x2a14();}(function(_0x421a0b,_0x3a4e06){const _0x3ed39a=a82_0x1533,_0x4e607f=_0x421a0b();while(!![]){try{const _0x36b465=parseInt(_0x3ed39a(0x1af))/0x1*(parseInt(_0x3ed39a(0x1c5))/0x2)+parseInt(_0x3ed39a(0x1e6))/0x3*(-parseInt(_0x3ed39a(0x1d7))/0x4)+-parseInt(_0x3ed39a(0x1f2))/0x5+parseInt(_0x3ed39a(0x1b1))/0x6+-parseInt(_0x3ed39a(0x1cf))/0x7+parseInt(_0x3ed39a(0x1b2))/0x8+-parseInt(_0x3ed39a(0x1de))/0x9;if(_0x36b465===_0x3a4e06)break;else _0x4e607f['push'](_0x4e607f['shift']());}catch(_0x498b0b){_0x4e607f['push'](_0x4e607f['shift']());}}}(a82_0x2a14,0xb930e));function a82_0x1533(_0x10e857,_0x6d5905){_0x10e857=_0x10e857-0x1a8;const _0x2a1451=a82_0x2a14();let _0x153319=_0x2a1451[_0x10e857];return _0x153319;}import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a82_0x534611}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a82_0x590fb9(0x1b9),SUPPORTED_SKILL_TYPES=new Set([a82_0x590fb9(0x1f7),a82_0x590fb9(0x1b8)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x35ff5c,_0x15f5a6={}){const _0x3b219e=a82_0x590fb9,_0x2066ff=resolveSkillDirectoryRoot(_0x35ff5c),_0x391170=[],_0x469577=loadRequiredSkillFile(_0x2066ff,_0x391170),_0x1b0fcd=_0x469577?parseFrontmatter(_0x469577[_0x3b219e(0x1db)]):{'hasFrontmatter':![]};_0x469577&&validateFrontmatter(_0x469577[_0x3b219e(0x1ed)],_0x1b0fcd,_0x391170);validateRuntimeCliReferences(_0x2066ff,_0x391170);const _0x2cc591=_0x391170['filter'](_0x1dbfc4=>_0x1dbfc4[_0x3b219e(0x1cb)]===_0x3b219e(0x1f4)),_0x42633f=_0x391170[_0x3b219e(0x1bd)](_0x441a24=>_0x441a24[_0x3b219e(0x1cb)]===_0x3b219e(0x1be));return{'ok':_0x2cc591['length']===0x0,'dir':_0x2066ff,'type':_0x1b0fcd[_0x3b219e(0x1c2)],'errors':_0x2cc591,'warnings':_0x42633f};}function resolveSkillDirectoryRoot(_0x5ed225){const _0x15d958=a82_0x590fb9,_0x210069=resolve(_0x5ed225);if(!existsSync(_0x210069))throw CliErrors[_0x15d958(0x1e2)]('Skill\x20directory\x20not\x20found:\x20'+_0x5ed225);const _0x285de3=lstatSync(_0x210069);if(_0x285de3[_0x15d958(0x1bb)]())return _0x210069;if(_0x285de3['isSymbolicLink']()){const _0x440cb9=realpathSync(_0x210069);if(lstatSync(_0x440cb9)['isDirectory']())return _0x440cb9;}throw CliErrors[_0x15d958(0x1e2)]('Skill\x20directory\x20not\x20found:\x20'+_0x5ed225);}export function throwIfSkillValidationFailed(_0x2b86f4,_0x46b299=![]){const _0x2f4a5b=a82_0x590fb9;if(_0x2b86f4['ok'])return;const _0x2b496e=_0x2b86f4[_0x2f4a5b(0x1dc)][_0x2f4a5b(0x1b6)](_0x10ad50=>{const _0x3c91e9=_0x2f4a5b,_0x4b36c5=_0x10ad50[_0x3c91e9(0x1ba)]?'#'+_0x10ad50[_0x3c91e9(0x1ba)]:'';return _0x10ad50[_0x3c91e9(0x1cb)][_0x3c91e9(0x1e4)]()+'\x20'+_0x10ad50['ruleId']+'\x20'+_0x10ad50[_0x3c91e9(0x1d9)]+_0x4b36c5+':\x20'+_0x10ad50[_0x3c91e9(0x1ea)]+_0x3c91e9(0x1c7)+_0x10ad50[_0x3c91e9(0x1f8)];});throw CliErrors['validation']('Skill\x20validation\x20failed:\x0a'+_0x2b496e[_0x2f4a5b(0x1c4)]('\x0a'),_0x2f4a5b(0x1ee));}function loadRequiredSkillFile(_0x343528,_0x14295e){const _0x28556c=a82_0x590fb9,_0x3752f4=resolve(_0x343528,SKILL_FILE);if(!existsSync(_0x3752f4))return _0x14295e[_0x28556c(0x1d1)](issue(_0x28556c(0x1f4),_0x28556c(0x1d3),SKILL_FILE,_0x28556c(0x1cc),_0x28556c(0x1ce))),undefined;const _0x3a395c=lstatSync(_0x3752f4);if(_0x3a395c['isSymbolicLink']())return _0x14295e['push'](issue('error',_0x28556c(0x1d3),SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.')),undefined;if(!_0x3a395c[_0x28556c(0x1e8)]())return _0x14295e[_0x28556c(0x1d1)](issue(_0x28556c(0x1f4),_0x28556c(0x1d3),SKILL_FILE,_0x28556c(0x1ec),_0x28556c(0x1b0))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x3752f4,_0x28556c(0x1c1))};}function validateFrontmatter(_0x3d11a4,_0x417ed5,_0x15bbeb){const _0x22a514=a82_0x590fb9;if(!_0x417ed5['hasFrontmatter']){_0x15bbeb[_0x22a514(0x1d1)](issue(_0x22a514(0x1f4),_0x22a514(0x1c3),_0x3d11a4,_0x22a514(0x1e3),_0x22a514(0x1b4)));return;}!_0x417ed5[_0x22a514(0x1d6)]?.[_0x22a514(0x1e0)]()&&_0x15bbeb[_0x22a514(0x1d1)](issue(_0x22a514(0x1f4),_0x22a514(0x1c3),_0x3d11a4,_0x22a514(0x1ab),_0x22a514(0x1b7))),!_0x417ed5[_0x22a514(0x1df)]?.['trim']()&&_0x15bbeb['push'](issue('warning',_0x22a514(0x1c0),_0x3d11a4,_0x22a514(0x1e9),'Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.')),!_0x417ed5[_0x22a514(0x1f5)]?.[_0x22a514(0x1e0)]()&&_0x15bbeb[_0x22a514(0x1d1)](issue('warning',_0x22a514(0x1d2),_0x3d11a4,'Frontmatter\x20example\x20is\x20missing.','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.')),!_0x417ed5[_0x22a514(0x1b5)]?.[_0x22a514(0x1e0)]()&&_0x15bbeb['push'](issue('error',_0x22a514(0x1cd),_0x3d11a4,_0x22a514(0x1d8),_0x22a514(0x1f6))),_0x417ed5[_0x22a514(0x1c8)]===!![]&&_0x15bbeb[_0x22a514(0x1d1)](issue(_0x22a514(0x1f4),'internal-skill',_0x3d11a4,_0x22a514(0x1f0),'Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x417ed5[_0x22a514(0x1c2)]?.[_0x22a514(0x1e0)]()&&!SUPPORTED_SKILL_TYPES['has'](_0x417ed5[_0x22a514(0x1c2)])&&_0x15bbeb[_0x22a514(0x1d1)](issue(_0x22a514(0x1f4),_0x22a514(0x1c3),_0x3d11a4,_0x22a514(0x1c9),'Set\x20metadata.type\x20to\x20write\x20or\x20read.'));}function validateRuntimeCliReferences(_0x395312,_0x24ea4b){const _0x170d1f=a82_0x590fb9;for(const _0x537ab6 of findRabetbaseCliInvocations(_0x395312)){_0x24ea4b[_0x170d1f(0x1d1)](issue(_0x170d1f(0x1be),_0x170d1f(0x1e7),_0x537ab6[_0x170d1f(0x1d9)],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.',_0x170d1f(0x1dd),'L'+_0x537ab6[_0x170d1f(0x1d4)]));}}function findRabetbaseCliInvocations(_0x3510da){const _0x51d787=a82_0x590fb9;return scanSkillDirectory(_0x3510da)[_0x51d787(0x1bd)](_0x35d0f7=>TEXT_SKILL_FILE_PATTERN[_0x51d787(0x1ca)](_0x35d0f7[_0x51d787(0x1ed)]))[_0x51d787(0x1ad)](_0x394455=>{const _0x1f3183=_0x51d787,_0x993064=fileText(_0x394455);return _0x993064['split'](/\r?\n/)[_0x1f3183(0x1b6)]((_0x520b15,_0x5ca4e8)=>({'file':_0x394455[_0x1f3183(0x1ed)],'line':_0x5ca4e8+0x1,'text':_0x520b15}))[_0x1f3183(0x1bd)](({text:_0x3a8f4a})=>isRabetbaseCliInvocation(_0x3a8f4a))['map'](({file:_0x5965f1,line:_0x481262})=>({'file':_0x5965f1,'line':_0x481262}));});}const RABETBASE_SUBCOMMANDS=[a82_0x590fb9(0x1c6),a82_0x590fb9(0x1a8),a82_0x590fb9(0x1b3),'page',a82_0x590fb9(0x1aa),a82_0x590fb9(0x1f1),'schema',a82_0x590fb9(0x1d0),'artifact','kb','config','workspace','data','auth',a82_0x590fb9(0x1a9),a82_0x590fb9(0x1bf)],RABETBASE_INVOCATION=new RegExp(String['raw']`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a82_0x590fb9(0x1c4)]('|')})\b`+String[a82_0x590fb9(0x1ef)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x2d6b94){const _0x54fd98=a82_0x590fb9,_0x2e8793=_0x2d6b94[_0x54fd98(0x1e1)](/\brabetbase\b/i);if(_0x2e8793<0x0)return![];const _0x12107d=_0x2d6b94[_0x54fd98(0x1e5)](_0x2e8793)[_0x54fd98(0x1eb)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x54fd98(0x1ca)](_0x12107d);}function parseFrontmatter(_0x146ac0){const _0x50ed84=a82_0x590fb9,_0x2e9b80=_0x146ac0['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2e9b80)return{'hasFrontmatter':![]};const _0x58de6a=_0x2e9b80[0x1]??'',_0xe39598={'hasFrontmatter':!![]};let _0x5190f8;try{_0x5190f8=a82_0x534611(_0x58de6a);}catch{return _0xe39598;}const _0x18f3cc=asRecord(_0x5190f8);if(!_0x18f3cc)return _0xe39598;_0xe39598[_0x50ed84(0x1d6)]=scalarToString(_0x18f3cc['name']),_0xe39598['displayName']=scalarToString(_0x18f3cc[_0x50ed84(0x1df)]),_0xe39598['description']=scalarToString(_0x18f3cc[_0x50ed84(0x1b5)]),_0xe39598['example']=scalarToString(_0x18f3cc[_0x50ed84(0x1f5)]);const _0x3f61b7=asRecord(_0x18f3cc[_0x50ed84(0x1f3)]);return _0x3f61b7&&(_0xe39598[_0x50ed84(0x1c2)]=scalarToString(_0x3f61b7[_0x50ed84(0x1c2)]),_0xe39598['internal']=scalarToBoolean(_0x3f61b7[_0x50ed84(0x1c8)])),_0xe39598;}function asRecord(_0x41e4f7){const _0x27e3d3=a82_0x590fb9;if(_0x41e4f7&&typeof _0x41e4f7===_0x27e3d3(0x1ae)&&!Array[_0x27e3d3(0x1bc)](_0x41e4f7))return _0x41e4f7;return undefined;}function scalarToString(_0x3c9951){const _0x1c4df2=a82_0x590fb9;if(typeof _0x3c9951===_0x1c4df2(0x1f9))return _0x3c9951[_0x1c4df2(0x1e0)]();if(typeof _0x3c9951===_0x1c4df2(0x1ac)||typeof _0x3c9951===_0x1c4df2(0x1fa))return String(_0x3c9951);return undefined;}function scalarToBoolean(_0x46b7f4){if(typeof _0x46b7f4==='boolean')return _0x46b7f4;if(typeof _0x46b7f4==='string')return cleanBoolean(_0x46b7f4);return undefined;}function cleanBoolean(_0x5c5ac5){const _0x3779b3=a82_0x590fb9,_0x32d264=_0x5c5ac5[_0x3779b3(0x1e0)]()[_0x3779b3(0x1da)]();if(_0x32d264===_0x3779b3(0x1d5))return!![];if(_0x32d264==='false')return![];return undefined;}function issue(_0x355b8e,_0x3a35cf,_0x492547,_0x27cacb,_0x5da800,_0x4aaaeb){return{'level':_0x355b8e,'ruleId':_0x3a35cf,'file':_0x492547,'section':_0x4aaaeb,'message':_0x27cacb,'suggestion':_0x5da800};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a83_0x57eb(_0x3d29cb,_0x2f4c22){_0x3d29cb=_0x3d29cb-0x96;const _0x545e9f=a83_0x545e();let _0x57eb16=_0x545e9f[_0x3d29cb];return _0x57eb16;}const a83_0x544c0d=a83_0x57eb;function a83_0x545e(){const _0x37bd7f=['4532364SCIGYW','read','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','sqlName','sqlCode','20124999ezbpsA','3OPjjsH','595184rWnhFN','detail','sqlContent','7wlGPEq','dbId','1892318aOQqvH','6837932ceafct','appCode','3587695xYgCUO','sql','13839352LJrZIQ','str'];a83_0x545e=function(){return _0x37bd7f;};return a83_0x545e();}(function(_0x26f3d4,_0x44a131){const _0x49b181=a83_0x57eb,_0x46afb0=_0x26f3d4();while(!![]){try{const _0xb659c8=parseInt(_0x49b181(0xa1))/0x1+-parseInt(_0x49b181(0xa6))/0x2+parseInt(_0x49b181(0xa0))/0x3*(parseInt(_0x49b181(0xa7))/0x4)+-parseInt(_0x49b181(0x96))/0x5+-parseInt(_0x49b181(0x9a))/0x6*(-parseInt(_0x49b181(0xa4))/0x7)+parseInt(_0x49b181(0x98))/0x8+-parseInt(_0x49b181(0x9f))/0x9;if(_0xb659c8===_0x44a131)break;else _0x46afb0['push'](_0x46afb0['shift']());}catch(_0x681765){_0x46afb0['push'](_0x46afb0['shift']());}}}(a83_0x545e,0xd953b));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a83_0x544c0d(0x97),'command':a83_0x544c0d(0xa2),'description':a83_0x544c0d(0x9c),'risk':a83_0x544c0d(0x9b),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x578105){const _0x4d9bcd=a83_0x544c0d,_0xe39f83=await getSqlQueryInfo(_0x578105[_0x4d9bcd(0xa8)],_0x578105[_0x4d9bcd(0x99)]('sqlcode')),_0xd6b08d=_0x578105['bool']('verbose');if(_0xd6b08d)return{'ok':!![],'data':_0xe39f83};const _0x54857e=_0xe39f83['dbId']?await getDbName(_0x578105[_0x4d9bcd(0xa8)],_0xe39f83[_0x4d9bcd(0xa5)]):undefined;return{'ok':!![],'data':{'sqlCode':_0xe39f83[_0x4d9bcd(0x9e)],'sqlName':_0xe39f83[_0x4d9bcd(0x9d)],'db':_0x54857e?_0x54857e+'\x20('+_0xe39f83[_0x4d9bcd(0xa5)]+')':_0xe39f83[_0x4d9bcd(0xa5)]??'','sqlContent':_0xe39f83[_0x4d9bcd(0xa3)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x254e39=a84_0x13d9;(function(_0x299834,_0x497c5b){const _0xdcaa8f=a84_0x13d9,_0x16822b=_0x299834();while(!![]){try{const _0x13906b=parseInt(_0xdcaa8f(0x101))/0x1+parseInt(_0xdcaa8f(0xfd))/0x2+parseInt(_0xdcaa8f(0xf6))/0x3+parseInt(_0xdcaa8f(0x100))/0x4*(parseInt(_0xdcaa8f(0x107))/0x5)+parseInt(_0xdcaa8f(0x105))/0x6+parseInt(_0xdcaa8f(0x103))/0x7*(parseInt(_0xdcaa8f(0x106))/0x8)+-parseInt(_0xdcaa8f(0xf9))/0x9;if(_0x13906b===_0x497c5b)break;else _0x16822b['push'](_0x16822b['shift']());}catch(_0x1f1731){_0x16822b['push'](_0x16822b['shift']());}}}(a84_0x47bd,0x2f197));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a84_0x47bd(){const _0x577765=['execSuccess','sqlcode','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','733371gpzxdw','read','sql','7766757XIpHeV','Returned\x20','str','now','160798WCXWiU','exec','execError','16mbWINU','195137MzFSFm','execResult','120925YKNGwb','length','1245624Anwgad','8hYhjhD','388775OgyKdT'];a84_0x47bd=function(){return _0x577765;};return a84_0x47bd();}import{parseJsonParams}from'../../utils/params.js';function a84_0x13d9(_0x1324c8,_0x529ad3){_0x1324c8=_0x1324c8-0xf4;const _0x47bd38=a84_0x47bd();let _0x13d989=_0x47bd38[_0x1324c8];return _0x13d989;}export const sqlExec={'service':a84_0x254e39(0xf8),'command':a84_0x254e39(0xfe),'description':a84_0x254e39(0xf5),'risk':a84_0x254e39(0xf7),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x12dcda){const _0x10001c=a84_0x254e39,_0x10ecec=parseJsonParams(_0x12dcda['str']('params')),_0x48e63e=Date[_0x10001c(0xfc)](),_0x30ba29=await executeSdkSql(_0x12dcda[_0x10001c(0xfb)](_0x10001c(0xf4)),_0x10ecec),_0x135883=Date[_0x10001c(0xfc)]()-_0x48e63e,_0x5eb8e6=_0x30ba29?.[_0x10001c(0x102)]??_0x30ba29,_0x27d8fd=_0x30ba29?.[_0x10001c(0x108)]??!![];if(!_0x27d8fd)return{'ok':![],'data':{'error':_0x30ba29?.[_0x10001c(0xff)]||'SQL\x20execution\x20failed','elapsed':_0x135883},'message':'SQL\x20execution\x20failed'};const _0x81e8d2=Array['isArray'](_0x5eb8e6)?_0x5eb8e6:[];return{'ok':!![],'data':{'rows':_0x81e8d2,'rowCount':_0x81e8d2[_0x10001c(0x104)],'elapsed':_0x135883},'message':_0x10001c(0xfa)+_0x81e8d2['length']+'\x20row(s)\x20in\x20'+_0x135883+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x243f01,_0x5308ec){const _0x1cb5f5=a85_0xe170,_0x42bb6c=_0x243f01();while(!![]){try{const _0x501e98=-parseInt(_0x1cb5f5(0x1e2))/0x1*(parseInt(_0x1cb5f5(0x1df))/0x2)+-parseInt(_0x1cb5f5(0x1e6))/0x3*(-parseInt(_0x1cb5f5(0x1e8))/0x4)+-parseInt(_0x1cb5f5(0x1e1))/0x5*(-parseInt(_0x1cb5f5(0x1e4))/0x6)+parseInt(_0x1cb5f5(0x1eb))/0x7*(-parseInt(_0x1cb5f5(0x1e0))/0x8)+-parseInt(_0x1cb5f5(0x1e9))/0x9*(-parseInt(_0x1cb5f5(0x1ea))/0xa)+-parseInt(_0x1cb5f5(0x1e3))/0xb*(-parseInt(_0x1cb5f5(0x1e7))/0xc)+parseInt(_0x1cb5f5(0x1e5))/0xd;if(_0x501e98===_0x5308ec)break;else _0x42bb6c['push'](_0x42bb6c['shift']());}catch(_0x30bbd1){_0x42bb6c['push'](_0x42bb6c['shift']());}}}(a85_0x1787,0x4ae7e));function a85_0x1787(){const _0x2e3b66=['686efyvlL','16724KixNNA','33032kAKxVR','3745twSjvU','58UYQUiT','216788vwqrOX','3318eiNcLW','3717428XFxgef','2211pLXDda','24SZQhVx','656aQacNZ','135kbJTka','224010ddWrDm'];a85_0x1787=function(){return _0x2e3b66;};return a85_0x1787();}import{sqlDetail}from'../../commands/sql/detail.js';function a85_0xe170(_0x2a66ef,_0x1ab06d){_0x2a66ef=_0x2a66ef-0x1df;const _0x17874a=a85_0x1787();let _0xe170b=_0x17874a[_0x2a66ef];return _0xe170b;}import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a86_0x21f3a4=a86_0x49de;(function(_0x1ad3ed,_0x30408d){const _0x308756=a86_0x49de,_0x4a4082=_0x1ad3ed();while(!![]){try{const _0x23d078=-parseInt(_0x308756(0xe3))/0x1+parseInt(_0x308756(0xf7))/0x2*(-parseInt(_0x308756(0xd7))/0x3)+parseInt(_0x308756(0xd3))/0x4+-parseInt(_0x308756(0xcb))/0x5*(parseInt(_0x308756(0xbd))/0x6)+parseInt(_0x308756(0xad))/0x7+parseInt(_0x308756(0xf8))/0x8+parseInt(_0x308756(0xe5))/0x9;if(_0x23d078===_0x30408d)break;else _0x4a4082['push'](_0x4a4082['shift']());}catch(_0x21dbf9){_0x4a4082['push'](_0x4a4082['shift']());}}}(a86_0x350c,0x9f32e));import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a86_0x31233d from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{getCliVersion}from'../utils/version.js';function a86_0x49de(_0x16da41,_0x7b3e4b){_0x16da41=_0x16da41-0xa5;const _0x350c29=a86_0x350c();let _0x49dee5=_0x350c29[_0x16da41];return _0x49dee5;}import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a86_0x21f3a4(0xc5),'type':'boolean','description':a86_0x21f3a4(0xab),'default':![]},{'name':'beta','type':'boolean','description':a86_0x21f3a4(0xfa),'default':![]},{'name':'version','type':a86_0x21f3a4(0xa8),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function a86_0x350c(){const _0x4b8c3c=['string','node_modules','Version\x20comparison\x20failed:\x20','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','414204KYZanc','entries','Already\x20up\x20to\x20date\x20(v','args','timeout','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','validation','skillVersion','Current\x20version:\x20','shortMessage','beta','Already\x20on\x20requested\x20version\x20(v','\x20doctor','Run:\x20npm\x20view\x20','/-/package/','\x20CLI\x20from\x20npm','30rxYeNC','object',',\x20state\x20','bool','source','expected\x20',',\x20found\x20','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','latest','repairCommand','log','toLowerCase','fromEntries','CLI\x20updated\x20to\x20v','165460gXSFPR','warn','platform','Run:\x20','inherit',']:\x20','\x20version\x20from\x20npm.','read','2260576AtsnRg','INSTALL_FAILED','stdout','length','277533ehhczs','exitCode','filter','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','state','apiError','npm','Updated\x20to\x20v','trim','Checking\x20npm\x20dist-tags...','code','Update\x20the\x20','942038xSCCSx','join','9647577uaclFb','Unable\x20to\x20resolve\x20','stderr','/dist-tags','basename','\x20is\x20current.','map','Checking\x20CLI\x20Built-in\x20Skill...','@lovrabet/lovrabet-cli','\x20\x20CLI\x20Built-in\x20Skill\x20','write','nonInteractive','win32','pipe','@lovrabet\x5clovrabet-cli','exit\x20','error',',\x20then\x20verify\x20with:\x20','10cdBxeW','4206896JnPHfh','version','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','dirname','run','reason','relative','Run:\x20npm\x20install\x20-g\x20','unknown'];a86_0x350c=function(){return _0x4b8c3c;};return a86_0x350c();}function getRequestedVersion(_0x41f94a){const _0x554f5d=a86_0x21f3a4,_0x3f0631=_0x41f94a['str'](_0x554f5d(0xf9))[_0x554f5d(0xdf)]();if(_0x3f0631)return _0x3f0631;return String(_0x41f94a[_0x554f5d(0xb0)]?.[0x0]??'')[_0x554f5d(0xdf)]();}async function validateUpdateFlags(_0x30608f){const _0x309528=a86_0x21f3a4,_0x5e47fc=getRequestedVersion(_0x30608f),_0x2a6293=[_0x30608f['bool']('latest')?_0x309528(0xc5):'',_0x30608f['bool'](_0x309528(0xb7))?_0x309528(0xb7):'',_0x5e47fc?_0x309528(0xf9):''][_0x309528(0xd9)](Boolean);if(_0x2a6293[_0x309528(0xd6)]>0x1)throw CliErrors['validation']('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.',_0x309528(0xda));if(_0x5e47fc&&!a86_0x31233d['valid'](_0x5e47fc))throw CliErrors[_0x309528(0xb3)]('Invalid\x20version:\x20'+_0x5e47fc,_0x309528(0xb2));}async function fetchNpmDistTags(){const _0x155a7d=a86_0x21f3a4;try{const _0x5adfd4=NPM_REGISTRY_BASE_URL+_0x155a7d(0xbb)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x155a7d(0xe8),_0x3cd5dd=await fetch(_0x5adfd4,{'signal':AbortSignal[_0x155a7d(0xb1)](0x2710)});if(!_0x3cd5dd['ok'])return null;const _0x216cd8=await _0x3cd5dd['json']();if(!_0x216cd8||typeof _0x216cd8!==_0x155a7d(0xbe))return null;return Object[_0x155a7d(0xc9)](Object[_0x155a7d(0xae)](_0x216cd8)[_0x155a7d(0xd9)](([,_0x194f59])=>typeof _0x194f59==='string'&&_0x194f59['trim']())[_0x155a7d(0xeb)](([_0x4fc88b,_0x4e71ca])=>[_0x4fc88b,String(_0x4e71ca)[_0x155a7d(0xdf)]()]));}catch{return null;}}async function resolveTargetVersion(_0x4be6ed){const _0x4eb706=a86_0x21f3a4,_0x3df29d=getRequestedVersion(_0x4be6ed);if(_0x3df29d)return{'version':_0x3df29d,'source':'version'};const _0x4c7734=_0x4be6ed[_0x4eb706(0xc0)](_0x4eb706(0xb7))?_0x4eb706(0xb7):_0x4eb706(0xc5),_0x188aa5=await fetchNpmDistTags(),_0x34829c=_0x188aa5?.[_0x4c7734];if(!_0x34829c)return null;return{'version':_0x34829c,'source':_0x4c7734};}function shouldInstallTarget(_0x424a62,_0x5c79fc){const _0x54b95b=a86_0x21f3a4;if(_0x5c79fc[_0x54b95b(0xc1)]===_0x54b95b(0xf9)||_0x5c79fc['source']===_0x54b95b(0xb7))return!a86_0x31233d['eq'](_0x424a62,_0x5c79fc[_0x54b95b(0xf9)]);return a86_0x31233d['lt'](_0x424a62,_0x5c79fc[_0x54b95b(0xf9)]);}export function installCliPackage(_0x3df665,_0xefef2f,_0x5a887b=resolveCurrentCliNpmPrefix()){const _0x39c5ce=a86_0x21f3a4,_0x10d22c=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3df665,_0x386964=['install','-g',_0x10d22c],_0x91b25d=runNpmInstall(_0x386964,_0xefef2f);if(_0x91b25d['ok']||!isNpmPrefixPermissionError(_0x91b25d[_0x39c5ce(0xf5)]))return _0x91b25d;if(!_0x5a887b||_0x91b25d[_0x39c5ce(0xf5)]?.[_0x39c5ce(0xc8)]()['includes'](_0x5a887b[_0x39c5ce(0xc8)]()))return _0x91b25d;return console[_0x39c5ce(0xcc)](_0x39c5ce(0xac)+_0x5a887b),runNpmInstall([..._0x386964,'--prefix',_0x5a887b],_0xefef2f);}export function resolveCurrentCliNpmPrefix(_0x165049=fileURLToPath(import.meta.url),_0x477081=process[a86_0x21f3a4(0xcd)]){const _0x475aab=a86_0x21f3a4,_0x296569=_0x477081===_0x475aab(0xf1)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x423fc5=_0x296569['dirname'](_0x296569[_0x475aab(0xfb)](_0x296569[_0x475aab(0xfb)](_0x165049))),_0x1eb83f=_0x477081===_0x475aab(0xf1)?_0x475aab(0xf3):_0x475aab(0xed);let _0x179a59=_0x296569[_0x475aab(0xfb)](_0x423fc5);while(!![]){if(_0x296569[_0x475aab(0xe9)](_0x179a59)===_0x475aab(0xa9)&&_0x296569[_0x475aab(0xa5)](_0x179a59,_0x423fc5)===_0x1eb83f){const _0x523d4c=_0x296569[_0x475aab(0xfb)](_0x179a59);return _0x296569[_0x475aab(0xe9)](_0x523d4c)==='lib'?_0x296569[_0x475aab(0xfb)](_0x523d4c):_0x523d4c;}const _0x9328d3=_0x296569[_0x475aab(0xfb)](_0x179a59);if(_0x9328d3===_0x179a59)return null;_0x179a59=_0x9328d3;}}function runNpmInstall(_0x4c2a6b,_0x2627ce){const _0x2bd7c6=a86_0x21f3a4;console[_0x2bd7c6(0xc7)]('*\x20'+[_0x2bd7c6(0xdd),..._0x4c2a6b][_0x2bd7c6(0xe4)]('\x20'));const _0x3a8c50=execaSync(_0x2bd7c6(0xdd),_0x4c2a6b,{'cwd':process['cwd'](),'stdio':_0x2bd7c6(0xf2),'env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0x24721b=_0x3a8c50[_0x2bd7c6(0xe7)]?String(_0x3a8c50['stderr'])[_0x2bd7c6(0xdf)]():'',_0x44b56e=_0x3a8c50['stdout']?String(_0x3a8c50['stdout'])[_0x2bd7c6(0xdf)]():'';if(!_0x2627ce){if(_0x44b56e)process[_0x2bd7c6(0xd5)][_0x2bd7c6(0xef)](_0x44b56e+'\x0a');if(_0x24721b)process['stderr'][_0x2bd7c6(0xef)](_0x24721b+'\x0a');}if(_0x3a8c50[_0x2bd7c6(0xd8)]===0x0)return{'ok':!![]};const _0x2cc73c=_0x24721b||_0x44b56e||_0x3a8c50[_0x2bd7c6(0xb6)]||_0x2bd7c6(0xf4)+(_0x3a8c50[_0x2bd7c6(0xd8)]??_0x2bd7c6(0xa7));return{'ok':![],'error':_0x2cc73c};}function isNpmPrefixPermissionError(_0x13325e){return Boolean(_0x13325e&&/\b(?:EACCES|EPERM)\b/['test'](_0x13325e));}function repairCurrentBuiltinSkill(_0x18bfad){const _0x407291=a86_0x21f3a4;console[_0x407291(0xc7)](_0x407291(0xec));const _0x98bf18=installBuiltinSkill({'stdio':_0x18bfad?_0x407291(0xf2):_0x407291(0xcf)});if(_0x98bf18['ok']){console[_0x407291(0xc7)](_0x407291(0xee)+_0x98bf18[_0x407291(0xb4)]+_0x407291(0xea));return;}throw CliErrors[_0x407291(0xdc)](_0x407291(0xc4)+(_0x98bf18[_0x407291(0xe1)]||_0x407291(0xd4))+_0x407291(0xd0)+(_0x98bf18[_0x407291(0xf5)]||'unknown'),_0x407291(0xce)+_0x98bf18[_0x407291(0xc6)]+_0x407291(0xf6)+CLI_BIN_NAME+_0x407291(0xb9));}function verifyUpdatedBuiltinSkill(_0x46bc01){const _0x40a774=a86_0x21f3a4;console[_0x40a774(0xc7)](_0x40a774(0xec));const _0x4d1ee9=inspectInstalledBuiltinSkillVersion(_0x46bc01);if(_0x4d1ee9[_0x40a774(0xdb)]==='current'){console[_0x40a774(0xc7)](_0x40a774(0xee)+_0x46bc01+_0x40a774(0xea));return;}const _0x7a3d20=_0x4d1ee9[_0x40a774(0xb4)]?_0x40a774(0xc2)+_0x46bc01+_0x40a774(0xc3)+_0x4d1ee9[_0x40a774(0xb4)]:_0x40a774(0xc2)+_0x46bc01+_0x40a774(0xbf)+_0x4d1ee9['state'],_0x43c440=_0x4d1ee9[_0x40a774(0xfd)]?_0x7a3d20+':\x20'+_0x4d1ee9[_0x40a774(0xfd)]:_0x7a3d20;throw CliErrors[_0x40a774(0xdc)](_0x40a774(0xca)+_0x46bc01+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x43c440,'Run:\x20'+_0x4d1ee9['repairCommand']+_0x40a774(0xf6)+CLI_BIN_NAME+_0x40a774(0xb9));}async function execute(_0x4f6475){const _0x4fd28b=a86_0x21f3a4;await validateUpdateFlags(_0x4f6475);const _0x44ddfa=getCliVersion();console[_0x4fd28b(0xc7)](_0x4fd28b(0xb5)+_0x44ddfa),console[_0x4fd28b(0xc7)](_0x4fd28b(0xe0));const _0xf6b81a=await resolveTargetVersion(_0x4f6475);if(!_0xf6b81a){const _0x2fd7e2=_0x4f6475[_0x4fd28b(0xc0)](_0x4fd28b(0xb7))?_0x4fd28b(0xb7):_0x4fd28b(0xc5),_0x2fcdcb=_0x4fd28b(0xe6)+_0x2fd7e2+_0x4fd28b(0xd1);throw CliErrors['apiError'](_0x2fcdcb,_0x4fd28b(0xa6)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x2fd7e2);}const _0x54d728=[_0x44ddfa,_0xf6b81a['version']]['find'](_0x2ad20d=>!a86_0x31233d['valid'](_0x2ad20d));if(_0x54d728){const _0x3f76de=_0x4fd28b(0xaa)+_0x54d728+'.';throw CliErrors[_0x4fd28b(0xdc)](_0x3f76de,_0x4fd28b(0xba)+LOVRABET_NPM_PACKAGE_NAME+'\x20dist-tags,\x20then\x20retry.');}if(!shouldInstallTarget(_0x44ddfa,_0xf6b81a)){const _0x5cdb99=_0xf6b81a[_0x4fd28b(0xc1)]===_0x4fd28b(0xf9)?_0x4fd28b(0xb8)+_0xf6b81a[_0x4fd28b(0xf9)]+').':_0x4fd28b(0xaf)+_0xf6b81a[_0x4fd28b(0xf9)]+').';return console[_0x4fd28b(0xc7)](_0x5cdb99),repairCurrentBuiltinSkill(_0x4f6475[_0x4fd28b(0xf0)]),{'ok':!![]};}console[_0x4fd28b(0xc7)]('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x44ddfa+'\x20->\x20'+_0xf6b81a['version']);const _0x4747a6=installCliPackage(_0xf6b81a[_0x4fd28b(0xf9)],_0x4f6475['nonInteractive']);if(!_0x4747a6['ok']){const _0x19470c='Update\x20failed:\x20'+(_0x4747a6[_0x4fd28b(0xf5)]||'unknown');throw CliErrors[_0x4fd28b(0xdc)](_0x19470c,_0x4fd28b(0xa6)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0xf6b81a[_0x4fd28b(0xf9)]);}return console['log'](_0x4fd28b(0xde)+_0xf6b81a[_0x4fd28b(0xf9)]+'.'),console[_0x4fd28b(0xc7)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'),verifyUpdatedBuiltinSkill(_0xf6b81a['version']),{'ok':!![]};}export const updateDefinition={'service':'update','command':a86_0x21f3a4(0xfc),'description':a86_0x21f3a4(0xe2)+CLI_BIN_NAME+a86_0x21f3a4(0xbc),'risk':a86_0x21f3a4(0xd2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a86_0x1eee22=a86_0x4b2a;function a86_0x5d84(){const _0x5a9a0d=['relative','2790235LOiwcY','exitCode','Update\x20the\x20','error','validation','\x20\x20CLI\x20Built-in\x20Skill\x20','current','code','includes','cwd','valid','pipe','Run:\x20npm\x20install\x20-g\x20','skillVersion','install','Install\x20a\x20specific\x20CLI\x20version','Checking\x20npm\x20dist-tags...','apiError','toLowerCase','write','boolean','repairCommand','entries',',\x20then\x20verify\x20with:\x20','@lovrabet/lovrabet-cli','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','--prefix','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','node_modules','226064HgKiOX',',\x20state\x20','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.',',\x20found\x20','lib','Run:\x20npm\x20view\x20','/-/package/','string','length','platform','@lovrabet\x5clovrabet-cli','stderr','win32','unknown','source','nonInteractive','255504eIPKcR','latest','expected\x20','shortMessage','\x20version\x20from\x20npm.','Unable\x20to\x20resolve\x20','1027768VZqDjq','read','join','timeout','6640090iELcUT','Update\x20failed:\x20','warn','dirname','log','20tGtoQk','basename','27zmwhhP','bool','npm','/dist-tags','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','json','Run:\x20','version','Already\x20up\x20to\x20date\x20(v','2447080JVjbnw','6pusVBF','761130rJVXYL','Invalid\x20version:\x20','Updated\x20to\x20v','trim','\x20is\x20current.','filter','object','state','\x20doctor','update','stdout','Current\x20version:\x20','reason','\x20->\x20','Version\x20comparison\x20failed:\x20','\x20dist-tags,\x20then\x20retry.','beta'];a86_0x5d84=function(){return _0x5a9a0d;};return a86_0x5d84();}(function(_0x49e87f,_0x4ae6f5){const _0x4e59fe=a86_0x4b2a,_0x2cddbf=_0x49e87f();while(!![]){try{const _0x3acd0c=parseInt(_0x4e59fe(0x119))/0x1+parseInt(_0x4e59fe(0x12f))/0x2*(-parseInt(_0x4e59fe(0x12e))/0x3)+-parseInt(_0x4e59fe(0x103))/0x4+-parseInt(_0x4e59fe(0x122))/0x5*(-parseInt(_0x4e59fe(0x113))/0x6)+parseInt(_0x4e59fe(0x141))/0x7+-parseInt(_0x4e59fe(0x12d))/0x8*(parseInt(_0x4e59fe(0x124))/0x9)+parseInt(_0x4e59fe(0x11d))/0xa;if(_0x3acd0c===_0x4ae6f5)break;else _0x2cddbf['push'](_0x2cddbf['shift']());}catch(_0x5dd451){_0x2cddbf['push'](_0x2cddbf['shift']());}}}(a86_0x5d84,0x80469));import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a86_0x56e8de from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a86_0x1eee22(0x114),'type':a86_0x1eee22(0xfa),'description':'Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','default':![]},{'name':a86_0x1eee22(0x13f),'type':a86_0x1eee22(0xfa),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a86_0x1eee22(0x12b),'type':'string','description':a86_0x1eee22(0x150)}];function getRequestedVersion(_0x100aaa){const _0x3b434b=a86_0x1eee22,_0x58a0f1=_0x100aaa['str'](_0x3b434b(0x12b))[_0x3b434b(0x132)]();if(_0x58a0f1)return _0x58a0f1;return String(_0x100aaa['args']?.[0x0]??'')[_0x3b434b(0x132)]();}async function validateUpdateFlags(_0x38bea3){const _0x20ff70=a86_0x1eee22,_0x144237=getRequestedVersion(_0x38bea3),_0x29e4ae=[_0x38bea3[_0x20ff70(0x125)](_0x20ff70(0x114))?_0x20ff70(0x114):'',_0x38bea3[_0x20ff70(0x125)]('beta')?_0x20ff70(0x13f):'',_0x144237?_0x20ff70(0x12b):''][_0x20ff70(0x134)](Boolean);if(_0x29e4ae[_0x20ff70(0x10b)]>0x1)throw CliErrors[_0x20ff70(0x145)](_0x20ff70(0x105),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x144237&&!a86_0x56e8de[_0x20ff70(0x14b)](_0x144237))throw CliErrors[_0x20ff70(0x145)](_0x20ff70(0x130)+_0x144237,_0x20ff70(0xff));}async function fetchNpmDistTags(){const _0x5700aa=a86_0x1eee22;try{const _0x37cfc0=NPM_REGISTRY_BASE_URL+_0x5700aa(0x109)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x5700aa(0x127),_0x3ade91=await fetch(_0x37cfc0,{'signal':AbortSignal[_0x5700aa(0x11c)](0x2710)});if(!_0x3ade91['ok'])return null;const _0x393239=await _0x3ade91[_0x5700aa(0x129)]();if(!_0x393239||typeof _0x393239!==_0x5700aa(0x135))return null;return Object['fromEntries'](Object[_0x5700aa(0xfc)](_0x393239)['filter'](([,_0x1aa4ba])=>typeof _0x1aa4ba===_0x5700aa(0x10a)&&_0x1aa4ba[_0x5700aa(0x132)]())['map'](([_0x1b57b2,_0x1bc107])=>[_0x1b57b2,String(_0x1bc107)[_0x5700aa(0x132)]()]));}catch{return null;}}async function resolveTargetVersion(_0x27d8f2){const _0x1b517c=a86_0x1eee22,_0x5766b8=getRequestedVersion(_0x27d8f2);if(_0x5766b8)return{'version':_0x5766b8,'source':_0x1b517c(0x12b)};const _0x411789=_0x27d8f2['bool']('beta')?_0x1b517c(0x13f):_0x1b517c(0x114),_0x478a0c=await fetchNpmDistTags(),_0x4e9ceb=_0x478a0c?.[_0x411789];if(!_0x4e9ceb)return null;return{'version':_0x4e9ceb,'source':_0x411789};}function shouldInstallTarget(_0x3c828f,_0x447686){const _0x724859=a86_0x1eee22;if(_0x447686[_0x724859(0x111)]===_0x724859(0x12b)||_0x447686[_0x724859(0x111)]===_0x724859(0x13f))return!a86_0x56e8de['eq'](_0x3c828f,_0x447686[_0x724859(0x12b)]);return a86_0x56e8de['lt'](_0x3c828f,_0x447686[_0x724859(0x12b)]);}export function installCliPackage(_0x321a2b,_0x563bb3,_0x38ac9e=resolveCurrentCliNpmPrefix()){const _0x5c73ba=a86_0x1eee22,_0x5ef0cc=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x321a2b,_0x583cee=[_0x5c73ba(0x14f),'-g',_0x5ef0cc],_0x8da5c2=runNpmInstall(_0x583cee,_0x563bb3);if(_0x8da5c2['ok']||!isNpmPrefixPermissionError(_0x8da5c2[_0x5c73ba(0x144)]))return _0x8da5c2;if(!_0x38ac9e||_0x8da5c2[_0x5c73ba(0x144)]?.[_0x5c73ba(0xf8)]()[_0x5c73ba(0x149)](_0x38ac9e[_0x5c73ba(0xf8)]()))return _0x8da5c2;return console[_0x5c73ba(0x11f)](_0x5c73ba(0x128)+_0x38ac9e),runNpmInstall([..._0x583cee,_0x5c73ba(0x100),_0x38ac9e],_0x563bb3);}export function resolveCurrentCliNpmPrefix(_0xb5df0f=fileURLToPath(import.meta.url),_0x42d994=process[a86_0x1eee22(0x10c)]){const _0x3775cb=a86_0x1eee22,_0x1e0a9e=_0x42d994===_0x3775cb(0x10f)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x240d71=_0x1e0a9e[_0x3775cb(0x120)](_0x1e0a9e['dirname'](_0x1e0a9e[_0x3775cb(0x120)](_0xb5df0f))),_0x258325=_0x42d994===_0x3775cb(0x10f)?_0x3775cb(0x10d):_0x3775cb(0xfe);let _0x5cd6d5=_0x1e0a9e['dirname'](_0x240d71);while(!![]){if(_0x1e0a9e[_0x3775cb(0x123)](_0x5cd6d5)===_0x3775cb(0x102)&&_0x1e0a9e[_0x3775cb(0x140)](_0x5cd6d5,_0x240d71)===_0x258325){const _0xf40b72=_0x1e0a9e[_0x3775cb(0x120)](_0x5cd6d5);return _0x1e0a9e['basename'](_0xf40b72)===_0x3775cb(0x107)?_0x1e0a9e[_0x3775cb(0x120)](_0xf40b72):_0xf40b72;}const _0x28923f=_0x1e0a9e['dirname'](_0x5cd6d5);if(_0x28923f===_0x5cd6d5)return null;_0x5cd6d5=_0x28923f;}}function runNpmInstall(_0x49fca6,_0x5b1326){const _0x27f2e7=a86_0x1eee22;console[_0x27f2e7(0x121)]('*\x20'+[_0x27f2e7(0x126),..._0x49fca6][_0x27f2e7(0x11b)]('\x20'));const _0x46760d=execaSync(_0x27f2e7(0x126),_0x49fca6,{'cwd':process[_0x27f2e7(0x14a)](),'stdio':_0x27f2e7(0x14c),'env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0x44df75=_0x46760d[_0x27f2e7(0x10e)]?String(_0x46760d['stderr'])[_0x27f2e7(0x132)]():'',_0xe9b3e9=_0x46760d['stdout']?String(_0x46760d[_0x27f2e7(0x139)])[_0x27f2e7(0x132)]():'';if(!_0x5b1326){if(_0xe9b3e9)process[_0x27f2e7(0x139)][_0x27f2e7(0xf9)](_0xe9b3e9+'\x0a');if(_0x44df75)process[_0x27f2e7(0x10e)][_0x27f2e7(0xf9)](_0x44df75+'\x0a');}if(_0x46760d['exitCode']===0x0)return{'ok':!![]};const _0x5ff316=_0x44df75||_0xe9b3e9||_0x46760d[_0x27f2e7(0x116)]||'exit\x20'+(_0x46760d[_0x27f2e7(0x142)]??_0x27f2e7(0x110));return{'ok':![],'error':_0x5ff316};}function isNpmPrefixPermissionError(_0x3c19c9){return Boolean(_0x3c19c9&&/\b(?:EACCES|EPERM)\b/['test'](_0x3c19c9));}function a86_0x4b2a(_0x5291a5,_0x58e769){_0x5291a5=_0x5291a5-0xf8;const _0x5d84af=a86_0x5d84();let _0x4b2ac0=_0x5d84af[_0x5291a5];return _0x4b2ac0;}function repairCurrentBuiltinSkill(_0x359cc5){const _0x330e43=a86_0x1eee22;console[_0x330e43(0x121)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x2f57be=installBuiltinSkill({'stdio':_0x359cc5?_0x330e43(0x14c):'inherit'});if(_0x2f57be['ok']){console[_0x330e43(0x121)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x2f57be['skillVersion']+_0x330e43(0x133));return;}throw CliErrors[_0x330e43(0x152)]('CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+(_0x2f57be[_0x330e43(0x148)]||'INSTALL_FAILED')+']:\x20'+(_0x2f57be[_0x330e43(0x144)]||_0x330e43(0x110)),_0x330e43(0x12a)+_0x2f57be['repairCommand']+_0x330e43(0xfd)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x37fc81){const _0x513c4a=a86_0x1eee22;console[_0x513c4a(0x121)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x21966c=inspectInstalledBuiltinSkillVersion(_0x37fc81);if(_0x21966c[_0x513c4a(0x136)]===_0x513c4a(0x147)){console[_0x513c4a(0x121)](_0x513c4a(0x146)+_0x37fc81+'\x20is\x20current.');return;}const _0x551822=_0x21966c[_0x513c4a(0x14e)]?_0x513c4a(0x115)+_0x37fc81+_0x513c4a(0x106)+_0x21966c['skillVersion']:_0x513c4a(0x115)+_0x37fc81+_0x513c4a(0x104)+_0x21966c[_0x513c4a(0x136)],_0x8e23d2=_0x21966c[_0x513c4a(0x13b)]?_0x551822+':\x20'+_0x21966c[_0x513c4a(0x13b)]:_0x551822;throw CliErrors['apiError']('CLI\x20updated\x20to\x20v'+_0x37fc81+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x8e23d2,_0x513c4a(0x12a)+_0x21966c[_0x513c4a(0xfb)]+_0x513c4a(0xfd)+CLI_BIN_NAME+_0x513c4a(0x137));}async function execute(_0xdf5bd){const _0x423344=a86_0x1eee22;await validateUpdateFlags(_0xdf5bd);const _0x12e7d8=getCliVersion();console[_0x423344(0x121)](_0x423344(0x13a)+_0x12e7d8),console['log'](_0x423344(0x151));const _0xa22beb=await resolveTargetVersion(_0xdf5bd);if(!_0xa22beb){const _0x476c4c=_0xdf5bd[_0x423344(0x125)]('beta')?_0x423344(0x13f):_0x423344(0x114),_0x29bc92=_0x423344(0x118)+_0x476c4c+_0x423344(0x117);throw CliErrors[_0x423344(0x152)](_0x29bc92,_0x423344(0x14d)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x476c4c);}const _0x3fcead=[_0x12e7d8,_0xa22beb[_0x423344(0x12b)]]['find'](_0x136a99=>!a86_0x56e8de[_0x423344(0x14b)](_0x136a99));if(_0x3fcead){const _0x1bb179=_0x423344(0x13d)+_0x3fcead+'.';throw CliErrors[_0x423344(0x152)](_0x1bb179,_0x423344(0x108)+LOVRABET_NPM_PACKAGE_NAME+_0x423344(0x13e));}if(!shouldInstallTarget(_0x12e7d8,_0xa22beb)){const _0x1f658a=_0xa22beb[_0x423344(0x111)]===_0x423344(0x12b)?'Already\x20on\x20requested\x20version\x20(v'+_0xa22beb['version']+').':_0x423344(0x12c)+_0xa22beb[_0x423344(0x12b)]+').';return console[_0x423344(0x121)](_0x1f658a),repairCurrentBuiltinSkill(_0xdf5bd[_0x423344(0x112)]),{'ok':!![]};}console[_0x423344(0x121)]('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x12e7d8+_0x423344(0x13c)+_0xa22beb[_0x423344(0x12b)]);const _0x222b48=installCliPackage(_0xa22beb[_0x423344(0x12b)],_0xdf5bd[_0x423344(0x112)]);if(!_0x222b48['ok']){const _0x5e21d4=_0x423344(0x11e)+(_0x222b48[_0x423344(0x144)]||_0x423344(0x110));throw CliErrors[_0x423344(0x152)](_0x5e21d4,_0x423344(0x14d)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0xa22beb[_0x423344(0x12b)]);}return console[_0x423344(0x121)](_0x423344(0x131)+_0xa22beb[_0x423344(0x12b)]+'.'),console[_0x423344(0x121)](_0x423344(0x101)),verifyUpdatedBuiltinSkill(_0xa22beb[_0x423344(0x12b)]),{'ok':!![]};}export const updateDefinition={'service':a86_0x1eee22(0x138),'command':'run','description':a86_0x1eee22(0x143)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a86_0x1eee22(0x11a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x258c45=a87_0x15e9;(function(_0x12d859,_0xf9c222){const _0x19d747=a87_0x15e9,_0x5523da=_0x12d859();while(!![]){try{const _0x2d1ba9=parseInt(_0x19d747(0x170))/0x1*(-parseInt(_0x19d747(0x165))/0x2)+-parseInt(_0x19d747(0x168))/0x3*(parseInt(_0x19d747(0x180))/0x4)+-parseInt(_0x19d747(0x166))/0x5+parseInt(_0x19d747(0x164))/0x6*(-parseInt(_0x19d747(0x17d))/0x7)+-parseInt(_0x19d747(0x16d))/0x8+-parseInt(_0x19d747(0x171))/0x9*(parseInt(_0x19d747(0x177))/0xa)+parseInt(_0x19d747(0x17f))/0xb*(parseInt(_0x19d747(0x173))/0xc);if(_0x2d1ba9===_0xf9c222)break;else _0x5523da['push'](_0x5523da['shift']());}catch(_0x1322aa){_0x5523da['push'](_0x5523da['shift']());}}}(a87_0x5f28,0xc0cc8));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a87_0x258c45(0x161),SUPPORTED_PROVIDERS=[a87_0x258c45(0x172)];function readBindingInput(_0x29b339){const _0xed6e0c=a87_0x258c45,_0x53eb2e=_0x29b339['str'](_0xed6e0c(0x162))[_0xed6e0c(0x17e)]()[_0xed6e0c(0x178)]();if(!SUPPORTED_PROVIDERS['includes'](_0x53eb2e))throw CliErrors[_0xed6e0c(0x176)](_0xed6e0c(0x16e)+(_0x53eb2e||_0xed6e0c(0x179))+'.','Pass\x20one\x20of:\x20'+SUPPORTED_PROVIDERS[_0xed6e0c(0x16c)](',\x20')+'.');const _0x3bd444=_0x29b339['str']('account-id')[_0xed6e0c(0x17e)]();if(!_0x3bd444)throw CliErrors[_0xed6e0c(0x176)]('--account-id\x20cannot\x20be\x20empty.',_0xed6e0c(0x16f));return{'provider':_0x53eb2e,'accountId':_0x3bd444};}function a87_0x5f28(){const _0x5b7342=['Unsupported\x20provider:\x20','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.','264863IZMkXT','4635iGyWqT','dingtalk','45156qaemYe','apiError','bind','validation','8830RnxHag','toLowerCase','(empty)','External\x20account\x20ID\x20for\x20the\x20selected\x20provider','POST','write','21HFlGwp','trim','10417aZPjOM','277036AXhfcO','string','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','provider','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.','415776OIRKIr','2LewPak','784720HcLdly','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','54fwIgPx','External\x20account\x20binding\x20was\x20not\x20confirmed.','Binds\x20the\x20platform\x20user\x20of\x20the\x20current\x20AccessKey\x20to\x20the\x20given\x20collaboration-provider\x20account.\x20An\x20existing\x20bind\x20for\x20the\x20same\x20provider\x20may\x20be\x20replaced.','user-account','join','3542040tpSzgs'];a87_0x5f28=function(){return _0x5b7342;};return a87_0x5f28();}function a87_0x15e9(_0x324ed9,_0x18714b){_0x324ed9=_0x324ed9-0x160;const _0x5f2855=a87_0x5f28();let _0x15e9ab=_0x5f2855[_0x324ed9];return _0x15e9ab;}function buildBindingData(_0x368de2,_0x3044ae,_0x83bcf7){const _0x3b4169=a87_0x258c45;return{'operation':_0x3b4169(0x175),'selector':{'provider':_0x368de2,'accountId':_0x3044ae},'before':null,'after':{'provider':_0x368de2,'accountId':_0x3044ae,'bound':!![]},'dryRun':_0x83bcf7,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':a87_0x258c45(0x16b),'command':a87_0x258c45(0x175),'description':a87_0x258c45(0x167),'risk':a87_0x258c45(0x17c),'confirmationDescription':a87_0x258c45(0x16a),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':'provider','type':a87_0x258c45(0x181),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':'External\x20account\x20provider'},{'name':'account-id','type':a87_0x258c45(0x181),'required':!![],'description':a87_0x258c45(0x17a)}],async 'validate'(_0x74f0be){readBindingInput(_0x74f0be);},async 'dryRun'(_0xbc062f){const _0x466490=a87_0x258c45,{provider:_0xa7ae7c,accountId:_0x4262fb}=readBindingInput(_0xbc062f);return{...buildBindingData(_0xa7ae7c,_0x4262fb,!![]),'method':_0x466490(0x17b),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0xa7ae7c,'accountId':_0x4262fb}};},async 'execute'(_0x1730d){const _0x5ebcfc=a87_0x258c45,{provider:_0x4dbc98,accountId:_0x23cc0c}=readBindingInput(_0x1730d),_0x7b4642=await bindExternalUserAccount(_0x4dbc98,_0x23cc0c);if(_0x7b4642!==!![])throw CliErrors[_0x5ebcfc(0x174)](_0x5ebcfc(0x169),_0x5ebcfc(0x163));return{'ok':!![],'data':buildBindingData(_0x4dbc98,_0x23cc0c,![]),'message':_0x5ebcfc(0x160)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32bbc5,_0x55e6b1){const _0x51099d=a88_0x1467,_0x59c7e7=_0x32bbc5();while(!![]){try{const _0x1b7179=-parseInt(_0x51099d(0x1ba))/0x1*(parseInt(_0x51099d(0x1bd))/0x2)+parseInt(_0x51099d(0x1b7))/0x3+parseInt(_0x51099d(0x1b6))/0x4+parseInt(_0x51099d(0x1bc))/0x5+-parseInt(_0x51099d(0x1b8))/0x6+parseInt(_0x51099d(0x1b9))/0x7+-parseInt(_0x51099d(0x1b5))/0x8*(parseInt(_0x51099d(0x1bb))/0x9);if(_0x1b7179===_0x55e6b1)break;else _0x59c7e7['push'](_0x59c7e7['shift']());}catch(_0x4ce7ed){_0x59c7e7['push'](_0x59c7e7['shift']());}}}(a88_0x2ed9,0x3636b));function a88_0x1467(_0x33bfcc,_0x5ae422){_0x33bfcc=_0x33bfcc-0x1b5;const _0x2ed967=a88_0x2ed9();let _0x1467c6=_0x2ed967[_0x33bfcc];return _0x1467c6;}import{bindUserAccount}from'../../commands/user-account/bind.js';function a88_0x2ed9(){const _0x55e086=['1376132gQCrzy','893361CVDDye','1957926hArSZf','2380721hPdKmw','7BNqipU','207btVTtA','1148585vSIYIE','53402MhfMvk','165688IGnlYx'];a88_0x2ed9=function(){return _0x55e086;};return a88_0x2ed9();}export const userAccountDefinitions=[bindUserAccount];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x3aadb1=a89_0x4b4f;function a89_0x4b4f(_0x254de4,_0x1e7476){_0x254de4=_0x254de4-0x174;const _0x2435d5=a89_0x2435();let _0x4b4f11=_0x2435d5[_0x254de4];return _0x4b4f11;}(function(_0x481225,_0xe2058c){const _0x45db7b=a89_0x4b4f,_0x58d17b=_0x481225();while(!![]){try{const _0x3707c5=parseInt(_0x45db7b(0x18f))/0x1+-parseInt(_0x45db7b(0x183))/0x2*(parseInt(_0x45db7b(0x176))/0x3)+-parseInt(_0x45db7b(0x1a6))/0x4+parseInt(_0x45db7b(0x18d))/0x5*(parseInt(_0x45db7b(0x1b2))/0x6)+parseInt(_0x45db7b(0x19e))/0x7*(parseInt(_0x45db7b(0x1b1))/0x8)+parseInt(_0x45db7b(0x1b5))/0x9*(-parseInt(_0x45db7b(0x1ad))/0xa)+-parseInt(_0x45db7b(0x1b4))/0xb;if(_0x3707c5===_0xe2058c)break;else _0x58d17b['push'](_0x58d17b['shift']());}catch(_0x42fc34){_0x58d17b['push'](_0x58d17b['shift']());}}}(a89_0x2435,0xacd9e));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':'app','type':a89_0x3aadb1(0x175),'description':a89_0x3aadb1(0x19a)},{'name':'appcode','type':'string','description':'App\x20code\x20to\x20bind\x20directly'},{'name':a89_0x3aadb1(0x17e),'type':a89_0x3aadb1(0x175),'description':a89_0x3aadb1(0x1ac),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x4658d6,_0x809582){const _0x34120a=a89_0x3aadb1,_0x2b4fc7=_0x4658d6[_0x34120a(0x17b)](_0x34120a(0x1a2))['trim'](),_0x2974ee=_0x4658d6[_0x34120a(0x17b)](_0x34120a(0x19f))[_0x34120a(0x17a)](),_0x5e61bc=_0x4658d6[_0x34120a(0x17b)](_0x34120a(0x17e))[_0x34120a(0x17a)](),_0x2a6e65=resolveWorkspaceEnv(_0x5e61bc||_0x4658d6[_0x34120a(0x1a4)]||DEFAULT_CONFIG_VALUES[_0x34120a(0x17e)]);if(!_0x2b4fc7&&!_0x2974ee)throw CliErrors[_0x34120a(0x1b6)](_0x34120a(0x178),'Usage:\x20'+CLI_BIN_NAME+_0x34120a(0x192)+_0x809582+_0x34120a(0x184)+CLI_BIN_NAME+'\x20workspace\x20'+_0x809582+_0x34120a(0x189));if(_0x2b4fc7&&_0x2974ee)throw CliErrors[_0x34120a(0x1b6)](_0x34120a(0x1a7),_0x34120a(0x197));const _0x6868df=resolveWriteConfigPath(_0x34120a(0x18c)),_0x21a501=readConfigFile(_0x6868df);assertWorkspaceCommandState(_0x809582,_0x21a501);const _0x5d6169=_0x2974ee||await resolveRemoteAppCode({'command':_0x809582,'appName':_0x2b4fc7,'env':_0x2a6e65,'accessKey':_0x4658d6[_0x34120a(0x191)]});return writeWorkspaceConfig({'command':_0x809582,'appName':_0x2b4fc7,'appcode':_0x5d6169,'env':_0x2a6e65,'shouldWriteEnv':!!_0x5e61bc,'accessKey':_0x4658d6[_0x34120a(0x191)]},_0x6868df,_0x21a501),{'ok':!![],'data':{'configPath':_0x6868df,'app':_0x2b4fc7||null,'appcode':_0x5d6169,'env':_0x5e61bc?_0x2a6e65:null,'accessKeyWritten':![],'command':_0x34120a(0x1a5)+_0x809582},'message':buildWorkspaceMessage(_0x6868df,_0x2b4fc7,_0x5d6169,_0x5e61bc?_0x2a6e65:undefined)};}async function resolveRemoteAppCode(_0x2b9a4a){const _0x3e7919=a89_0x3aadb1;if(!_0x2b9a4a[_0x3e7919(0x191)])throw CliErrors['authRequired'](_0x3e7919(0x187)+CLI_BIN_NAME+_0x3e7919(0x192)+_0x2b9a4a[_0x3e7919(0x186)]+'.');const {setActiveAK:_0x49d957}=await import(_0x3e7919(0x179)),{getRemoteAppList:_0x9719e}=await import(_0x3e7919(0x17f));_0x49d957(_0x2b9a4a[_0x3e7919(0x191)]);const _0x5295ef=await _0x9719e({'env':_0x2b9a4a[_0x3e7919(0x17e)],'accessKey':_0x2b9a4a[_0x3e7919(0x191)],'noCache':![]}),_0x131fce=findAppByName(_0x5295ef[_0x3e7919(0x17d)],_0x2b9a4a[_0x3e7919(0x1a0)]);if(_0x131fce&&!isRuntimeAccessibleApp(_0x131fce))throw runtimeInaccessibleAppError(_0x131fce,'\x22'+_0x2b9a4a[_0x3e7919(0x1a0)]+'\x22');const _0x44d875=_0x131fce?.['appCode']?.[_0x3e7919(0x17a)]();if(_0x44d875)return _0x44d875;const _0x4aad6a=_0x5295ef['items']['map'](_0xfd199e=>_0xfd199e[_0x3e7919(0x1a0)])[_0x3e7919(0x1a8)](Boolean),_0xbcc269=_0x4aad6a[_0x3e7919(0x180)]?_0x3e7919(0x199)+Array[_0x3e7919(0x181)](new Set(_0x4aad6a))['join'](',\x20')+'.':_0x3e7919(0x18a)+CLI_BIN_NAME+_0x3e7919(0x196);throw CliErrors[_0x3e7919(0x1b6)](_0x3e7919(0x18e)+_0x2b9a4a[_0x3e7919(0x1a0)]+_0x3e7919(0x1b7),_0xbcc269);}function writeWorkspaceConfig(_0x1e292c,_0xea3ac2,_0x5b18e1){const _0x3351ec=a89_0x3aadb1;_0x1e292c[_0x3351ec(0x1a9)]&&(_0x5b18e1[_0x3351ec(0x17e)]=_0x1e292c[_0x3351ec(0x17e)]);if(_0x1e292c[_0x3351ec(0x1a0)]){const _0xe996f7=isRecord(_0x5b18e1[_0x3351ec(0x193)])?{..._0x5b18e1[_0x3351ec(0x193)]}:{},_0x449828=isRecord(_0xe996f7[_0x1e292c[_0x3351ec(0x1a0)]])?_0xe996f7[_0x1e292c[_0x3351ec(0x1a0)]]:{};return _0xe996f7[_0x1e292c['appName']]={..._0x449828,'appcode':_0x1e292c[_0x3351ec(0x19f)]},_0x5b18e1[_0x3351ec(0x193)]=_0xe996f7,_0x5b18e1[_0x3351ec(0x198)]=_0x1e292c[_0x3351ec(0x1a0)],delete _0x5b18e1[_0x3351ec(0x19f)],delete _0x5b18e1[_0x3351ec(0x1a2)],writeAndReturn(_0xea3ac2,_0x5b18e1);}return _0x5b18e1[_0x3351ec(0x19f)]=_0x1e292c[_0x3351ec(0x19f)],delete _0x5b18e1['defaultApp'],delete _0x5b18e1[_0x3351ec(0x1a2)],writeAndReturn(_0xea3ac2,_0x5b18e1);}function writeAndReturn(_0x5b8c51,_0x184b8c){return writeConfigFile(_0x5b8c51,_0x184b8c),_0x5b8c51;}function resolveWorkspaceEnv(_0x758af8){const _0x10e2fb=a89_0x3aadb1;if(RUNTIME_ENV_VALUES[_0x10e2fb(0x1ab)](_0x758af8))return _0x758af8;throw CliErrors[_0x10e2fb(0x1b6)](_0x10e2fb(0x1b3)+_0x758af8+_0x10e2fb(0x195)+RUNTIME_ENV_VALUES[_0x10e2fb(0x182)](',\x20'));}function a89_0x2435(){const _0x57a019=['\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','defaultApp','Available\x20apps:\x20','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','Updates\x20the\x20app\x20binding\x20already\x20present\x20in\x20the\x20current\x20working\x20directory\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','Writes\x20Lovrabet\x20project\x20config\x20in\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet,\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','Use\x20`','427084UraUxq','appcode','appName','Workspace\x20app\x20context\x20is\x20not\x20initialized.','app','\x0aEnv:\x20','envName','workspace\x20','2322184GjGJUa','Conflicting\x20workspace\x20app\x20selectors.','filter','shouldWriteEnv','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','includes','Target\x20environment','4846280olLEBb','use','object','Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','160sEQnHK','2064318osWnBC','Invalid\x20env\x20\x22','8288159ustTop','9QEulQt','validation','\x22\x20not\x20found.','workspace','string','819sKTqjO','Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet','Missing\x20workspace\x20app\x20selector.','../../core/api-client.js','trim','str','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','items','env','../../commands/app/remote-source.js','length','from','join','4734ATOOlX','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','Workspace\x20app\x20context\x20is\x20already\x20initialized.','command','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','\x20--appcode\x20<code>\x20[--env\x20daily]','Run\x20`','Workspace\x20configured.\x0aConfig\x20file:\x20','project','15ImcjWt','App\x20\x22','920433fJAqpb','write','accessKey','\x20workspace\x20','apps','init','\x22.\x20Allowed:\x20'];a89_0x2435=function(){return _0x57a019;};return a89_0x2435();}function buildWorkspaceMessage(_0x1983aa,_0x17b190,_0x367f71,_0x138884){const _0x3845a0=a89_0x3aadb1,_0x198833=_0x17b190?_0x17b190+'\x20('+_0x367f71+')':_0x367f71,_0x2e6ca2=_0x138884?_0x3845a0(0x1a3)+_0x138884:'';return _0x3845a0(0x18b)+_0x1983aa+'\x0aDefault\x20app:\x20'+_0x198833+_0x2e6ca2+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0x1e0e2f){const _0x5b77e1=a89_0x3aadb1;return typeof _0x1e0e2f===_0x5b77e1(0x1af)&&_0x1e0e2f!==null&&!Array['isArray'](_0x1e0e2f);}function hasWorkspaceAppBinding(_0x64e737){const _0x2b4778=a89_0x3aadb1;if(typeof _0x64e737[_0x2b4778(0x19f)]==='string'&&_0x64e737[_0x2b4778(0x19f)]['trim']()[_0x2b4778(0x180)]>0x0)return!![];if(typeof _0x64e737[_0x2b4778(0x198)]!=='string'||!_0x64e737['defaultApp']['trim']())return![];if(!isRecord(_0x64e737['apps']))return![];const _0x4ad8a4=_0x64e737[_0x2b4778(0x193)][_0x64e737[_0x2b4778(0x198)]['trim']()];return isRecord(_0x4ad8a4)&&typeof _0x4ad8a4[_0x2b4778(0x19f)]==='string'&&_0x4ad8a4[_0x2b4778(0x19f)][_0x2b4778(0x17a)]()['length']>0x0;}function assertWorkspaceCommandState(_0x474595,_0x3dccd0){const _0x1d6564=a89_0x3aadb1,_0x9cd04f=hasWorkspaceAppBinding(_0x3dccd0);if(_0x474595===_0x1d6564(0x194)&&_0x9cd04f)throw CliErrors[_0x1d6564(0x1b6)](_0x1d6564(0x185),_0x1d6564(0x19d)+CLI_BIN_NAME+_0x1d6564(0x1aa)+CLI_BIN_NAME+_0x1d6564(0x17c));if(_0x474595===_0x1d6564(0x1ae)&&!_0x9cd04f)throw CliErrors[_0x1d6564(0x1b6)](_0x1d6564(0x1a1),_0x1d6564(0x18a)+CLI_BIN_NAME+'\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+_0x1d6564(0x188));}function makeWorkspaceCommand(_0x4954b9){const _0x4c007d=a89_0x3aadb1;return{'service':_0x4c007d(0x174),'command':_0x4954b9,'description':_0x4954b9===_0x4c007d(0x194)?_0x4c007d(0x177):_0x4c007d(0x1b0),'risk':_0x4c007d(0x190),'confirmationDescription':_0x4954b9===_0x4c007d(0x194)?_0x4c007d(0x19c):_0x4c007d(0x19b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x42c911){return executeWorkspaceUse(_0x42c911,_0x4954b9);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a89_0x3aadb1(0x194)),makeWorkspaceCommand(a89_0x3aadb1(0x1ae))];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x2b15bb=a90_0x3e9c;(function(_0x394078,_0x18c3a9){const _0xa998ed=a90_0x3e9c,_0x36bc64=_0x394078();while(!![]){try{const _0xc5343c=-parseInt(_0xa998ed(0x169))/0x1*(-parseInt(_0xa998ed(0x191))/0x2)+-parseInt(_0xa998ed(0x1a4))/0x3+-parseInt(_0xa998ed(0x197))/0x4*(parseInt(_0xa998ed(0x19d))/0x5)+-parseInt(_0xa998ed(0x18b))/0x6*(-parseInt(_0xa998ed(0x16d))/0x7)+-parseInt(_0xa998ed(0x184))/0x8+parseInt(_0xa998ed(0x172))/0x9*(parseInt(_0xa998ed(0x163))/0xa)+parseInt(_0xa998ed(0x1a0))/0xb;if(_0xc5343c===_0x18c3a9)break;else _0x36bc64['push'](_0x36bc64['shift']());}catch(_0x39f668){_0x36bc64['push'](_0x36bc64['shift']());}}}(a90_0x295e,0x3f66d));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';function a90_0x295e(){const _0x5722af=['Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','skillDomain','runtimeDomain','pathname','kb-service-domain',':\x20\x22','api-domain','keys','hash',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','Allowed\x20fields:\x20','1535928TmPFIC','Invalid\x20','string','default','domain-config','apiDomain','username','12DdHEgL','utf8','agentDomain','platformDomain','kbDomain','search','262dhLTTm','skillHubDomain','https:','protocol','kbServiceDomain','user-domain','284268gdOHZZ','length','\x22\x20and\x20kind\x20\x22',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','trim','join','20CeJSpw','object','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','86108RqMHPH','Enterprise\x20','lovrabet-cli','enterprise-v1','623442relJtw','legacy','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','parse','isArray','filter','756250qzFFjw','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','skill-domain','Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.','Unsupported\x20domain\x20config\x20field(s):\x20','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','3401NYTLDf','validation','\x20and\x20has\x20no\x20default.','str','922362oPfhdj','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','mode','kind','origin','27tgIHmN','host','domains','\x22\x20is\x20not\x20a\x20valid\x20URL.','Invalid\x20domain\x20config\x20JSON:\x20','userDomain'];a90_0x295e=function(){return _0x5722af;};return a90_0x295e();}import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a90_0x2b15bb(0x177),a90_0x2b15bb(0x189),a90_0x2b15bb(0x17a),a90_0x2b15bb(0x179),a90_0x2b15bb(0x195)];const DOMAIN_FLAGS={'userDomain':a90_0x2b15bb(0x196),'apiDomain':a90_0x2b15bb(0x17e),'runtimeDomain':'runtime-domain','skillDomain':a90_0x2b15bb(0x165),'kbServiceDomain':a90_0x2b15bb(0x17c)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a90_0x2b15bb(0x173),a90_0x2b15bb(0x18d),a90_0x2b15bb(0x18e),a90_0x2b15bb(0x192),a90_0x2b15bb(0x18f)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a90_0x2b15bb(0x177),'apiDomain':a90_0x2b15bb(0x189),'runtimeDomain':'runtimeDomain','skillDomain':a90_0x2b15bb(0x179),'kbServiceDomain':a90_0x2b15bb(0x195)},ROUTING_CONSUMER=a90_0x2b15bb(0x1a2);export function normalizeDomainOrigin(_0x50eed4,_0x254521){const _0x44eeaa=a90_0x2b15bb;if(typeof _0x254521!==_0x44eeaa(0x186)||!_0x254521[_0x44eeaa(0x19b)]())throw CliErrors[_0x44eeaa(0x16a)](_0x44eeaa(0x185)+_0x50eed4+_0x44eeaa(0x181));let _0x36f8ce;try{_0x36f8ce=new URL(_0x254521[_0x44eeaa(0x19b)]());}catch{throw CliErrors[_0x44eeaa(0x16a)](_0x44eeaa(0x185)+_0x50eed4+_0x44eeaa(0x17d)+_0x254521+_0x44eeaa(0x175));}if(_0x36f8ce['protocol']!==_0x44eeaa(0x193)||_0x36f8ce[_0x44eeaa(0x18a)]||_0x36f8ce['password']||_0x36f8ce[_0x44eeaa(0x17b)]!=='/'&&_0x36f8ce[_0x44eeaa(0x17b)]!==''||_0x36f8ce[_0x44eeaa(0x190)]||_0x36f8ce[_0x44eeaa(0x180)])throw CliErrors[_0x44eeaa(0x16a)](_0x44eeaa(0x185)+_0x50eed4+_0x44eeaa(0x1a7),'For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.');return _0x36f8ce[_0x44eeaa(0x171)];}export function normalizeRoutingDomainValue(_0x46da4f,_0x2b739b){const _0x2541e9=a90_0x2b15bb;if(typeof _0x2b739b===_0x2541e9(0x186))return normalizeDomainOrigin(_0x46da4f,_0x2b739b);if(!_0x2b739b||typeof _0x2b739b!=='object'||Array['isArray'](_0x2b739b))throw CliErrors[_0x2541e9(0x16a)](_0x2541e9(0x185)+_0x46da4f+_0x2541e9(0x19a));const _0x2a84b6=_0x2b739b,_0x865da5=_0x2a84b6[ROUTING_CONSUMER]??_0x2a84b6[_0x2541e9(0x187)];if(_0x865da5===undefined)throw CliErrors[_0x2541e9(0x16a)](_0x2541e9(0x1a1)+_0x46da4f+_0x2541e9(0x164)+ROUTING_CONSUMER+_0x2541e9(0x16b));return normalizeDomainOrigin(_0x46da4f,_0x865da5);}export function resolveEnterpriseRoutingConfig(_0x1d1f2d){const _0x3f0a32=a90_0x2b15bb;if(_0x1d1f2d===undefined)return undefined;if(!_0x1d1f2d||typeof _0x1d1f2d!=='object'||Array['isArray'](_0x1d1f2d))throw CliErrors[_0x3f0a32(0x16a)](_0x3f0a32(0x166));return parseEnterpriseRoutingManifest(_0x1d1f2d)[_0x3f0a32(0x174)];}export function readDomainConfigInput(_0x162f18){const _0x15337a=a90_0x2b15bb,_0x17c228=isAbsolute(_0x162f18)?_0x162f18:resolve(process['cwd'](),_0x162f18);if(!existsSync(_0x17c228))throw CliErrors[_0x15337a(0x16a)]('Domain\x20config\x20file\x20not\x20found:\x20'+_0x17c228);let _0x3ad76f;try{_0x3ad76f=JSON[_0x15337a(0x1a8)](readFileSync(_0x17c228,_0x15337a(0x18c)));}catch{throw CliErrors[_0x15337a(0x16a)](_0x15337a(0x176)+_0x17c228);}if(!_0x3ad76f||typeof _0x3ad76f!==_0x15337a(0x19e)||Array[_0x15337a(0x1a9)](_0x3ad76f))throw CliErrors[_0x15337a(0x16a)](_0x15337a(0x16e));const _0x5cec5e=_0x3ad76f;if(_0x15337a(0x194)in _0x5cec5e)return parseEnterpriseRoutingManifest(_0x5cec5e);const _0xa6aedf=Object[_0x15337a(0x17f)](_0x5cec5e)['filter'](_0x431642=>!DOMAIN_CONFIG_FIELDS['includes'](_0x431642));if(_0xa6aedf[_0x15337a(0x198)]>0x0)throw CliErrors[_0x15337a(0x16a)](_0x15337a(0x167)+_0xa6aedf['join'](',\x20'),_0x15337a(0x183)+DOMAIN_CONFIG_FIELDS[_0x15337a(0x19c)](',\x20'));const _0x577317={};for(const _0x4a9dd6 of DOMAIN_CONFIG_FIELDS){_0x5cec5e[_0x4a9dd6]!==undefined&&(_0x577317[_0x4a9dd6]=normalizeDomainOrigin(_0x4a9dd6,_0x5cec5e[_0x4a9dd6]));}if(Object[_0x15337a(0x17f)](_0x577317)[_0x15337a(0x198)]===0x0)throw CliErrors[_0x15337a(0x16a)](_0x15337a(0x1a6));return{'mode':'legacy','domains':_0x577317};}export function readDomainConfig(_0x59a652){const _0x448f09=a90_0x2b15bb;return readDomainConfigInput(_0x59a652)[_0x448f09(0x174)];}export function resolveDomainConfigInput(_0x4ec8d0){const _0xeb67e6=a90_0x2b15bb,_0x1b6252=(_0x4ec8d0[_0xeb67e6(0x16c)](_0xeb67e6(0x188))||'')[_0xeb67e6(0x19b)](),_0x26997d=_0x1b6252?readDomainConfigInput(_0x1b6252):{'mode':_0xeb67e6(0x1a5),'domains':{}},_0x5d00ad=DOMAIN_CONFIG_FIELDS[_0xeb67e6(0x1aa)](_0x18aefc=>Boolean((_0x4ec8d0[_0xeb67e6(0x16c)](DOMAIN_FLAGS[_0x18aefc])||'')['trim']()));if(_0x26997d[_0xeb67e6(0x16f)]==='enterprise-v1'&&_0x5d00ad[_0xeb67e6(0x198)]>0x0)throw CliErrors[_0xeb67e6(0x16a)](_0xeb67e6(0x168),'Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.');for(const _0x5d8bbc of DOMAIN_CONFIG_FIELDS){const _0x244207=(_0x4ec8d0[_0xeb67e6(0x16c)](DOMAIN_FLAGS[_0x5d8bbc])||'')[_0xeb67e6(0x19b)]();if(_0x244207)_0x26997d['domains'][_0x5d8bbc]=normalizeDomainOrigin(_0x5d8bbc,_0x244207);}return _0x26997d;}function a90_0x3e9c(_0x4fed17,_0xdf7daf){_0x4fed17=_0x4fed17-0x163;const _0x295ece=a90_0x295e();let _0x3e9c21=_0x295ece[_0x4fed17];return _0x3e9c21;}export function resolveDomainFlags(_0xf7f6e8){const _0x3a42bc=a90_0x2b15bb;return resolveDomainConfigInput(_0xf7f6e8)[_0x3a42bc(0x174)];}export function parseEnterpriseRoutingManifest(_0x151d7b){const _0x466c0b=a90_0x2b15bb;if(_0x151d7b[_0x466c0b(0x194)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x151d7b[_0x466c0b(0x170)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x466c0b(0x16a)](_0x466c0b(0x19f)+ENTERPRISE_ROUTING_PROTOCOL+_0x466c0b(0x199)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x151d7b['domains']||typeof _0x151d7b[_0x466c0b(0x174)]!==_0x466c0b(0x19e)||Array[_0x466c0b(0x1a9)](_0x151d7b[_0x466c0b(0x174)]))throw CliErrors[_0x466c0b(0x16a)](_0x466c0b(0x178));const _0x44763b=_0x151d7b['domains'],_0x128098=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x466c0b(0x1aa)](_0x4e2668=>_0x44763b[_0x4e2668]===undefined);if(_0x128098[_0x466c0b(0x198)]>0x0)throw CliErrors[_0x466c0b(0x16a)](_0x466c0b(0x182)+_0x128098['join'](',\x20'));const _0x226156={},_0x4e4663={};for(const _0x3f7407 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x2d3832=_0x44763b[_0x3f7407];if(_0x2d3832===undefined)continue;const _0x4f65fc=normalizeRoutingDomainValue(_0x3f7407,_0x2d3832);_0x226156[_0x3f7407]=_0x4f65fc;const _0xb63e63=ENTERPRISE_TO_LOCAL_FIELD[_0x3f7407];_0xb63e63&&(_0x4e4663[_0xb63e63]=_0x4f65fc);}return{'mode':_0x466c0b(0x1a3),'domains':_0x4e4663,'manifestDomains':_0x226156};}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x49524f=a91_0x19f4;(function(_0x4e1c22,_0x42ee47){const _0x41ff11=a91_0x19f4,_0x4b141b=_0x4e1c22();while(!![]){try{const _0x2bbd93=-parseInt(_0x41ff11(0x13b))/0x1+-parseInt(_0x41ff11(0x132))/0x2*(parseInt(_0x41ff11(0x121))/0x3)+parseInt(_0x41ff11(0x131))/0x4+-parseInt(_0x41ff11(0x125))/0x5+parseInt(_0x41ff11(0x117))/0x6+-parseInt(_0x41ff11(0x11f))/0x7*(parseInt(_0x41ff11(0x13a))/0x8)+parseInt(_0x41ff11(0x124))/0x9;if(_0x2bbd93===_0x42ee47)break;else _0x4b141b['push'](_0x4b141b['shift']());}catch(_0x3b1aad){_0x4b141b['push'](_0x4b141b['shift']());}}}(a91_0x3784,0x99550));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export const CONFIG_FIELD_SCHEMAS={'routing':{'description':'Versioned\x20enterprise\x20routing\x20manifest','topLevel':!![]},'region':{'description':a91_0x49524f(0x11e),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':ENABLED_LOVRABET_REGION_VALUES,'defaultValue':DEFAULT_LOVRABET_REGION,'importable':!![]},'env':{'description':a91_0x49524f(0x11c),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['env'],'importable':!![]},'format':{'description':a91_0x49524f(0x122),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a91_0x49524f(0x138)],'importable':!![]},'pageSize':{'description':a91_0x49524f(0x129),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a91_0x49524f(0x12a),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a91_0x49524f(0x11a),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':'Override\x20runtime\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillDomain':{'description':a91_0x49524f(0x120),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'kbServiceDomain':{'description':a91_0x49524f(0x11d),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a91_0x49524f(0x11b),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a91_0x49524f(0x12d),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a91_0x49524f(0x134)],'importable':!![]},'nativeToolAvailable':{'description':a91_0x49524f(0x118),'topLevel':!![],'defaultValue':![]},'locale':{'description':a91_0x49524f(0x119),'topLevel':!![],'cliSettableTopLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a91_0x49524f(0x126)],'importable':!![]}};function a91_0x19f4(_0x4b91e3,_0x45d0b7){_0x4b91e3=_0x4b91e3-0x115;const _0x3784cb=a91_0x3784();let _0x19f414=_0x3784cb[_0x4b91e3];return _0x19f414;}export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a91_0x49524f(0x123)](CONFIG_FIELD_SCHEMAS)[a91_0x49524f(0x12c)](([,_0x185efa])=>_0x185efa[a91_0x49524f(0x130)])[a91_0x49524f(0x135)](([_0x169153])=>_0x169153));export const CLI_PROTECTED_CONFIG_KEYS=new Set([a91_0x49524f(0x134),a91_0x49524f(0x139)]);export const CONFIG_ENUM_VALUES=Object[a91_0x49524f(0x137)](Object['entries'](CONFIG_FIELD_SCHEMAS)[a91_0x49524f(0x12c)](([,_0x1519a9])=>_0x1519a9[a91_0x49524f(0x12e)])['map'](([_0x11ddf5,_0x15cb04])=>[_0x11ddf5,[..._0x15cb04[a91_0x49524f(0x12e)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a91_0x49524f(0x123)](CONFIG_FIELD_SCHEMAS)[a91_0x49524f(0x12c)](([,_0x34a561])=>_0x34a561[a91_0x49524f(0x136)])['map'](([_0x434f52])=>_0x434f52);export function getConfigFieldSchema(_0x32b367){return CONFIG_FIELD_SCHEMAS[_0x32b367];}export function getConfigEnumValues(_0x4ad037){const _0x572d02=a91_0x49524f;return getConfigFieldSchema(_0x4ad037)?.[_0x572d02(0x12e)];}export function getConfigDefaultValue(_0x4398a4){const _0x239171=a91_0x49524f;return getConfigFieldSchema(_0x4398a4)?.[_0x239171(0x128)];}export function isTopLevelConfigKey(_0x2dae49){const _0x180f70=a91_0x49524f;return TOP_LEVEL_CONFIG_KEYS[_0x180f70(0x12b)](_0x2dae49);}export function isCliProtectedConfigKey(_0x27b9c1){const _0x2da072=a91_0x49524f;return CLI_PROTECTED_CONFIG_KEYS[_0x2da072(0x12b)](_0x27b9c1);}const LOCALE_MAP={'zh':a91_0x49524f(0x116),'zh-cn':a91_0x49524f(0x116),'zh_cn':'zh-CN','en':'en-US','en-us':a91_0x49524f(0x13c),'en_us':a91_0x49524f(0x13c)};export function normalizeLocale(_0x3e33c4){const _0x5cf821=a91_0x49524f;if(!_0x3e33c4)return null;return LOCALE_MAP[_0x3e33c4[_0x5cf821(0x115)]()]??null;}export function isLegacyCompatConfigKey(_0xed7f4e){const _0x2a4854=a91_0x49524f;return getConfigFieldSchema(_0xed7f4e)?.[_0x2a4854(0x133)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}function a91_0x3784(){const _0xb02079=['zh-CN','4023966qPiQLJ','Native\x20Lovrabet\x20tool\x20availability\x20in\x20the\x20current\x20execution\x20host','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','Override\x20user\x20domain','Access\x20key\x20(client-ak\x20auth)','Target\x20environment','Override\x20KB\x20Service\x20domain','Lovrabet\x20region','29883ACWTVR','Override\x20SkillHub\x20domain','178185EAsQLO','Default\x20output\x20format','entries','10897578nyUuef','1069185SUlGas','locale','Config\x20key.\x20Top-level:\x20','defaultValue','Default\x20page\x20size','Override\x20API\x20domain','has','filter','Risk\x20level','enumValues','join','cliSettableTopLevel','3613804nbyFZV','14qLuggr','legacyCompatOnly','riskLevel','map','importable','fromEntries','format','nativeToolAvailable','1288beycUI','839995gCcZfT','en-US','toLowerCase'];a91_0x3784=function(){return _0xb02079;};return a91_0x3784();}export function formatConfigKeyList(_0x38e9d6){const _0x2bec35=a91_0x49524f;return[..._0x38e9d6][_0x2bec35(0x12f)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x344918=a91_0x49524f;return _0x344918(0x127)+getTopLevelConfigKeySummary()+';\x20local\x20alias:\x20apps.<alias>.appcode';}export function buildAppProfileListFields(_0x8ecda2){return{'env':_0x8ecda2,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a92_0x1433(){const _0x1c03e3=['17714988ouUxxN','Published','1920EiMcUy','12046984XGMeGq','1610343wUyQBo','20GaTcOc','PUBLISHED','1856569PzzTJO','13fxqcyF','7vEWSts','5495JfIkNj','48062zSGLHg','4wWoHgd','932826fjwCyk','UNPUBLISH','50fTscDN'];a92_0x1433=function(){return _0x1c03e3;};return a92_0x1433();}const a92_0x2e9649=a92_0x295a;(function(_0x7efa2d,_0x4d47c8){const _0x5521d2=a92_0x295a,_0x228b7b=_0x7efa2d();while(!![]){try{const _0x266ab0=-parseInt(_0x5521d2(0x1e7))/0x1*(parseInt(_0x5521d2(0x1d8))/0x2)+-parseInt(_0x5521d2(0x1d9))/0x3*(parseInt(_0x5521d2(0x1e1))/0x4)+-parseInt(_0x5521d2(0x1e6))/0x5*(-parseInt(_0x5521d2(0x1de))/0x6)+parseInt(_0x5521d2(0x1e5))/0x7*(parseInt(_0x5521d2(0x1df))/0x8)+parseInt(_0x5521d2(0x1e0))/0x9*(-parseInt(_0x5521d2(0x1db))/0xa)+parseInt(_0x5521d2(0x1e3))/0xb+-parseInt(_0x5521d2(0x1dc))/0xc*(-parseInt(_0x5521d2(0x1e4))/0xd);if(_0x266ab0===_0x4d47c8)break;else _0x228b7b['push'](_0x228b7b['shift']());}catch(_0x44c53b){_0x228b7b['push'](_0x228b7b['shift']());}}}(a92_0x1433,0xe9ab8));export const APP_PUBLISH_STATUS={'Published':a92_0x2e9649(0x1e2),'Unpublished':a92_0x2e9649(0x1da)};function a92_0x295a(_0x57cc2c,_0x63178a){_0x57cc2c=_0x57cc2c-0x1d8;const _0x143372=a92_0x1433();let _0x295a6d=_0x143372[_0x57cc2c];return _0x295a6d;}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a92_0x2e9649(0x1dd)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a93_0x12f3(){const _0x22efc2=['client-ak','1960029ZadGga','148fjiIrf','7693632QRnFuu','50qFGkok','2687861CgwHUV','4zEqhAA','9278KTesnK','2994861RAiAEt','156EHaVtH','4054216peBqLr','14YzMPSx','2902270mkJRwu'];a93_0x12f3=function(){return _0x22efc2;};return a93_0x12f3();}const a93_0x39749e=a93_0x7dc4;(function(_0x342dc0,_0x243f90){const _0x3b08de=a93_0x7dc4,_0x599d55=_0x342dc0();while(!![]){try{const _0x3fd57a=-parseInt(_0x3b08de(0xc3))/0x1*(parseInt(_0x3b08de(0xc8))/0x2)+parseInt(_0x3b08de(0xc9))/0x3+-parseInt(_0x3b08de(0xc7))/0x4*(-parseInt(_0x3b08de(0xc0))/0x5)+-parseInt(_0x3b08de(0xc4))/0x6+-parseInt(_0x3b08de(0xbf))/0x7*(parseInt(_0x3b08de(0xbe))/0x8)+parseInt(_0x3b08de(0xc2))/0x9*(-parseInt(_0x3b08de(0xc5))/0xa)+-parseInt(_0x3b08de(0xc6))/0xb*(-parseInt(_0x3b08de(0xbd))/0xc);if(_0x3fd57a===_0x243f90)break;else _0x599d55['push'](_0x599d55['shift']());}catch(_0x11da88){_0x599d55['push'](_0x599d55['shift']());}}}(a93_0x12f3,0xa6fe1));export const AUTH_MODE={'ClientAk':a93_0x39749e(0xc1)};function a93_0x7dc4(_0x44f5a0,_0x4cf13b){_0x44f5a0=_0x44f5a0-0xbd;const _0x12f3c4=a93_0x12f3();let _0x7dc4c9=_0x12f3c4[_0x44f5a0];return _0x7dc4c9;}export function isAuthMode(_0x12c153){return _0x12c153===AUTH_MODE['ClientAk'];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x5912c7=a94_0x1855;(function(_0x49bcde,_0x501383){const _0x456b1e=a94_0x1855,_0x13106f=_0x49bcde();while(!![]){try{const _0x555d61=parseInt(_0x456b1e(0xa1))/0x1+-parseInt(_0x456b1e(0x7f))/0x2*(-parseInt(_0x456b1e(0x7b))/0x3)+parseInt(_0x456b1e(0xa7))/0x4+-parseInt(_0x456b1e(0x98))/0x5+-parseInt(_0x456b1e(0x9b))/0x6*(parseInt(_0x456b1e(0xa3))/0x7)+-parseInt(_0x456b1e(0xa4))/0x8*(parseInt(_0x456b1e(0x91))/0x9)+parseInt(_0x456b1e(0x89))/0xa;if(_0x555d61===_0x501383)break;else _0x13106f['push'](_0x13106f['shift']());}catch(_0x2f0069){_0x13106f['push'](_0x13106f['shift']());}}}(a94_0x32f0,0x2cb35));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a94_0x5912c7(0x97)];function a94_0x32f0(){const _0x230c6c=['format','222629bUJEbC','Record\x20ID','116333uRxkvn','66488ujJvjB','SQL\x20query\x20code','verbose','1496aTXUWq','JSON\x20params\x20for\x20execute\x20commands','Show\x20help','global','type','22728HDRkZY','Preview\x20operation\x20without\x20executing','app','nonInteractive','62iWNKgx','boolean','Environment','name','cliDisplayName','non-interactive','params','sqlcode','<code>','yes','2858100lrgtpc','help','Name\x20filter','dry-run','<expr>','Alias\x20for\x20--non-interactive','appcode','string','9JwVCAG','clear','dryRun','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','fromEntries','<name>','cliBinName','933235qXHvgL','Force\x20non-interactive\x20mode\x20(CI)','json\x20|\x20pretty\x20|\x20compress','132cOoEjT','Clear\x20output','env','Skip\x20confirmation\x20for\x20high-risk\x20writes','Select\x20app\x20profile\x20by\x20name'];a94_0x32f0=function(){return _0x230c6c;};return a94_0x32f0();}export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a94_0x5912c7(0x83)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a94_0x5912c7(0x8f),'type':a94_0x5912c7(0x90),'description':'Override\x20appcode','hint':a94_0x5912c7(0x87)},{'name':a94_0x5912c7(0x7d),'meowKey':a94_0x5912c7(0x7d),'type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0x9f),'hint':a94_0x5912c7(0x96)},{'name':a94_0x5912c7(0x9d),'meowKey':a94_0x5912c7(0x9d),'type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0x81),'hint':'production\x20|\x20development\x20|\x20daily'},{'name':a94_0x5912c7(0xa0),'meowKey':a94_0x5912c7(0xa0),'type':a94_0x5912c7(0x90),'description':'Output\x20format','hint':a94_0x5912c7(0x9a)},{'name':'jq','meowKey':'jq','type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0x94),'hint':a94_0x5912c7(0x8d)},{'name':'dry-run','meowKey':a94_0x5912c7(0x93),'type':a94_0x5912c7(0x80),'description':a94_0x5912c7(0x7c)},{'name':a94_0x5912c7(0x88),'meowKey':a94_0x5912c7(0x88),'type':a94_0x5912c7(0x80),'description':a94_0x5912c7(0x9e)},{'name':a94_0x5912c7(0x84),'meowKey':a94_0x5912c7(0x7e),'type':a94_0x5912c7(0x80),'description':a94_0x5912c7(0x99)},{'name':a94_0x5912c7(0xaa),'meowKey':'global','type':a94_0x5912c7(0x80),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a94_0x5912c7(0x80),'description':a94_0x5912c7(0x8e),'hidden':!![]},{'name':'help','meowKey':a94_0x5912c7(0x8a),'type':'boolean','description':a94_0x5912c7(0xa9)},{'name':'id','meowKey':'id','type':'string','description':a94_0x5912c7(0xa2),'hidden':!![]},{'name':a94_0x5912c7(0x82),'meowKey':a94_0x5912c7(0x82),'type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0x8b),'hidden':!![]},{'name':'sqlcode','meowKey':a94_0x5912c7(0x86),'type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0xa5),'hidden':!![]},{'name':a94_0x5912c7(0x85),'meowKey':a94_0x5912c7(0x85),'type':a94_0x5912c7(0x90),'description':a94_0x5912c7(0xa8),'hidden':!![]},{'name':a94_0x5912c7(0xa6),'meowKey':a94_0x5912c7(0xa6),'type':'boolean','description':'Verbose\x20output','hidden':!![]},{'name':a94_0x5912c7(0x92),'meowKey':a94_0x5912c7(0x92),'type':a94_0x5912c7(0x80),'description':a94_0x5912c7(0x9c),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a94_0x5912c7(0x8f),a94_0x5912c7(0x7d),a94_0x5912c7(0x9d),a94_0x5912c7(0xa0),'jq',a94_0x5912c7(0x8c),a94_0x5912c7(0x88),'non-interactive','ci']);function a94_0x1855(_0x38dbaa,_0x1e795f){_0x38dbaa=_0x38dbaa-0x7b;const _0x32f063=a94_0x32f0();let _0x185523=_0x32f063[_0x38dbaa];return _0x185523;}export function buildMeowFlags(){const _0x36981d=a94_0x5912c7;return Object[_0x36981d(0x95)](GLOBAL_FLAGS['map'](_0x238bd6=>[_0x238bd6['meowKey'],{'type':_0x238bd6[_0x36981d(0xab)]}]));}
|