@lovrabet/lovrabet-cli 2.3.8-beta.6 → 2.3.8-beta.7
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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.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.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.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.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -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/runtime-user-id.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 +3 -3
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a82_0x4594(_0x54e39c,_0x2ed883){_0x54e39c=_0x54e39c-0x10d;const _0x526e7e=a82_0x526e();let _0x459493=_0x526e7e[_0x54e39c];return _0x459493;}(function(_0x5acff3,_0x5a7b17){const _0x2729e1=a82_0x4594,_0x3d61c3=_0x5acff3();while(!![]){try{const _0x8d4b73=-parseInt(_0x2729e1(0x119))/0x1*(parseInt(_0x2729e1(0x118))/0x2)+parseInt(_0x2729e1(0x115))/0x3+parseInt(_0x2729e1(0x114))/0x4+parseInt(_0x2729e1(0x117))/0x5*(parseInt(_0x2729e1(0x10f))/0x6)+parseInt(_0x2729e1(0x116))/0x7*(parseInt(_0x2729e1(0x10e))/0x8)+-parseInt(_0x2729e1(0x11f))/0x9*(parseInt(_0x2729e1(0x11c))/0xa)+parseInt(_0x2729e1(0x112))/0xb*(-parseInt(_0x2729e1(0x11b))/0xc);if(_0x8d4b73===_0x5a7b17)break;else _0x3d61c3['push'](_0x3d61c3['shift']());}catch(_0x22dbf7){_0x3d61c3['push'](_0x3d61c3['shift']());}}}(a82_0x526e,0x24c4b));import{CliErrors}from'../../errors.js';function a82_0x526e(){const _0x3c5231=['validation','personal','331479JqQRyY','Unsupported\x20Skill\x20list\x20scope:\x20','376szChpY','6LfekUt','trim','all','9273ZvuFwn','Unsupported\x20Skill\x20sync\x20scope:\x20','916484iZBLdP','289239fZsicI','14161tnECDm','1251515ziGcuQ','4906QtcIFH','29EguuCW','company','2724bGbUOr','70fSwdiT'];a82_0x526e=function(){return _0x3c5231;};return a82_0x526e();}export function normalizeSyncScopes(_0x489aef){const _0x27f236=a82_0x4594,_0x1d28ad=_0x489aef['trim']();if(!_0x1d28ad||_0x1d28ad===_0x27f236(0x111))return[_0x27f236(0x11e),_0x27f236(0x11a)];if(_0x1d28ad===_0x27f236(0x11e)||_0x1d28ad===_0x27f236(0x11a))return[_0x1d28ad];throw CliErrors[_0x27f236(0x11d)](_0x27f236(0x113)+_0x489aef);}export function normalizeListScope(_0x46fdc5){const _0x42ab6a=a82_0x4594,_0x57131b=_0x46fdc5[_0x42ab6a(0x110)]();if(!_0x57131b)return _0x42ab6a(0x111);if(_0x57131b===_0x42ab6a(0x11e)||_0x57131b==='company'||_0x57131b==='all')return _0x57131b;throw CliErrors['validation'](_0x42ab6a(0x10d)+_0x46fdc5);}export function shouldListScope(_0x26a258,_0x21b6b8){const _0x31f112=a82_0x4594;if(_0x26a258===_0x31f112(0x111))return!![];return _0x26a258===_0x21b6b8;}export function listScopeToRuntimeScopes(_0x352729){const _0x301f31=a82_0x4594;if(_0x352729===_0x301f31(0x111))return[_0x301f31(0x11e),_0x301f31(0x11a)];return[_0x352729===_0x301f31(0x11a)?'company':_0x352729];}export function listScopeToRemoteScope(_0x334b0b){return _0x334b0b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a83_0x2685(_0x10d082,_0x4bb287){_0x10d082=_0x10d082-0xa9;var _0x13cd1c=a83_0x13cd();var _0x26851f=_0x13cd1c[_0x10d082];return _0x26851f;}(function(_0x3d22f7,_0x339156){var _0x291c2a=a83_0x2685,_0x3e6db9=_0x3d22f7();while(!![]){try{var _0x28ab98=-parseInt(_0x291c2a(0xae))/0x1+-parseInt(_0x291c2a(0xb4))/0x2+-parseInt(_0x291c2a(0xb2))/0x3*(parseInt(_0x291c2a(0xad))/0x4)+parseInt(_0x291c2a(0xa9))/0x5+parseInt(_0x291c2a(0xbd))/0x6+parseInt(_0x291c2a(0xba))/0x7+parseInt(_0x291c2a(0xb8))/0x8*(parseInt(_0x291c2a(0xac))/0x9);if(_0x28ab98===_0x339156)break;else _0x3e6db9['push'](_0x3e6db9['shift']());}catch(_0x291d61){_0x3e6db9['push'](_0x3e6db9['shift']());}}}(a83_0x13cd,0xd431d));function a83_0x13cd(){var _0x1aef14=['3007324NquyFo','linkedPaths','contentHash','skillMdPath','2413240wEeyus','skillCode','764358AZPiNz','scope','treeHash','1081740gtvECL','version','6746920hdtEos','pulledAt','metadataPath','45fmfBNG','2675396fpoANT','105483HQECRR','cacheDir','readonly','dir','3Dovile','skillName'];a83_0x13cd=function(){return _0x1aef14;};return a83_0x13cd();}export function summarizeRuntimeSkill(_0x522dc4){var _0x19dba7=a83_0x2685;return{'id':_0x522dc4['id'],'skillCode':_0x522dc4['skillCode'],'skillName':_0x522dc4[_0x19dba7(0xb3)],'scope':_0x522dc4[_0x19dba7(0xbb)],'version':_0x522dc4[_0x19dba7(0xbe)],'readonly':_0x522dc4['readonly']};}export function summarizeLocalRuntimeSkill(_0x42f860){var _0x170b83=a83_0x2685;return{'id':_0x42f860['id'],'skillCode':_0x42f860[_0x170b83(0xb9)],'skillName':_0x42f860['skillName'],'scope':_0x42f860[_0x170b83(0xbb)],'appCode':_0x42f860['appCode'],'version':_0x42f860['version'],'status':_0x42f860['status'],'readonly':_0x42f860[_0x170b83(0xb0)],'tags':_0x42f860['tags'],'dir':_0x42f860[_0x170b83(0xb1)],'cacheDir':_0x42f860[_0x170b83(0xaf)],'skillMdPath':_0x42f860[_0x170b83(0xb7)],'metadataPath':_0x42f860[_0x170b83(0xab)],'linkedPaths':_0x42f860[_0x170b83(0xb5)],'contentHash':_0x42f860[_0x170b83(0xb6)],'treeHash':_0x42f860[_0x170b83(0xbc)],'pulledAt':_0x42f860[_0x170b83(0xaa)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x2537e6=a84_0x4366;(function(_0xfa97cc,_0x2012da){const _0x5714eb=a84_0x4366,_0x306b1e=_0xfa97cc();while(!![]){try{const _0x3d75e8=-parseInt(_0x5714eb(0xc1))/0x1*(parseInt(_0x5714eb(0xc7))/0x2)+-parseInt(_0x5714eb(0xa8))/0x3*(parseInt(_0x5714eb(0xa7))/0x4)+parseInt(_0x5714eb(0xc2))/0x5*(parseInt(_0x5714eb(0xbe))/0x6)+parseInt(_0x5714eb(0xb0))/0x7+-parseInt(_0x5714eb(0xbf))/0x8+parseInt(_0x5714eb(0xae))/0x9*(parseInt(_0x5714eb(0xb7))/0xa)+parseInt(_0x5714eb(0xab))/0xb*(parseInt(_0x5714eb(0xc8))/0xc);if(_0x3d75e8===_0x2012da)break;else _0x306b1e['push'](_0x306b1e['shift']());}catch(_0x5285a3){_0x306b1e['push'](_0x306b1e['shift']());}}}(a84_0x5874,0x9cf88));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=['write',a84_0x2537e6(0x9f)];export const DEFAULT_SKILL_TARGET=a84_0x2537e6(0xb8);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE=a84_0x2537e6(0xc9);export const OUTPUT_CONTRACT_FILE=a84_0x2537e6(0xc6);export function validateSkillName(_0x37d092){const _0x53f278=a84_0x2537e6,_0x1480a3=_0x37d092[_0x53f278(0xbb)]();if(!SKILL_NAME_PATTERN[_0x53f278(0xc3)](_0x1480a3))throw CliErrors[_0x53f278(0xa1)]('Invalid\x20Skill\x20name:\x20'+_0x37d092+'.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.',_0x53f278(0xbd));return _0x1480a3;}function a84_0x4366(_0x1f2ac9,_0x229a64){_0x1f2ac9=_0x1f2ac9-0x9f;const _0x587434=a84_0x5874();let _0x4366bf=_0x587434[_0x1f2ac9];return _0x4366bf;}export function normalizeSkillTemplateType(_0x521568){const _0x6ca28=a84_0x2537e6,_0x1458e6=(_0x521568||_0x6ca28(0xc5))[_0x6ca28(0xbb)]()||_0x6ca28(0xc5);if(SKILL_TYPES[_0x6ca28(0xaf)](_0x1458e6))return _0x1458e6;throw CliErrors[_0x6ca28(0xa1)](_0x6ca28(0xad)+_0x521568,_0x6ca28(0xbc)+SKILL_TYPES['join'](',\x20')+'.');}export function renderSkillTemplate(_0x5eb842){const _0x47b88e=a84_0x2537e6,_0x44030e=validateSkillName(_0x5eb842[_0x47b88e(0xb2)]),_0x269a4f=normalizeSkillTemplateType(_0x5eb842['type']),_0x419a98=_0x5eb842[_0x47b88e(0xb6)]??new Date()['toISOString']();return{'skillName':_0x44030e,'type':_0x269a4f,'files':[{'path':_0x47b88e(0xa6),'content':renderSkillMd(_0x44030e,_0x269a4f,_0x419a98)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x44030e,_0x269a4f)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x44030e,_0x269a4f)}]};}function renderSkillMd(_0x189a5b,_0x1733af,_0x2d2de7){const _0x59dbc9=a84_0x2537e6,_0x4d5db0=typeWorkflow(_0x1733af);return _0x59dbc9(0xa3)+_0x189a5b+_0x59dbc9(0xc4)+_0x1733af+_0x59dbc9(0xa5)+_0x2d2de7+_0x59dbc9(0xb5)+_0x189a5b+_0x59dbc9(0xa9)+_0x4d5db0+'\x0a\x0a'+businessStateSection(_0x1733af)+'\x0a\x0a##\x20展示规范\x0a\x0a【填写面向运营人员的展示字段、差异摘要、成功/失败状态和人工处理项;最终输出必须按\x20references/output-contract.md\x20的\x20status\x20/\x20mode\x20/\x20summary\x20/\x20errors\x20/\x20nextActions\x20返回,不能把\x20unknown、partial_success、failed\x20或\x20needs_manual_check\x20包装为\x20success。】\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败后的\x20checkpoint、重试条件、人工接管方式和避免重复写入的核对步骤】\x0a';}function renderRuntimeContract(_0x56879c,_0x2a43e9){const _0x53937e=a84_0x2537e6,_0x3b2476=_0x2a43e9===_0x53937e(0xc5)?_0x53937e(0xaa):'';return _0x53937e(0xb9)+_0x56879c+_0x53937e(0xb3)+_0x2a43e9+_0x53937e(0xa4)+_0x3b2476+'\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';}function renderOutputContract(_0x5dd8ca,_0x336564){const _0x3a7a87=a84_0x2537e6,_0x4123ef=_0x336564===_0x3a7a87(0xc5)?_0x3a7a87(0xa0):_0x336564+_0x3a7a87(0xac);return _0x3a7a87(0xa2)+_0x5dd8ca+_0x3a7a87(0xb4)+_0x4123ef+_0x3a7a87(0xc0);}function typeWorkflow(_0x5e240a){const _0x395b1a=a84_0x2537e6;if(_0x5e240a==='read')return _0x395b1a(0xba);return'1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】';}function businessStateSection(_0x5b1bed){const _0x2eda39=a84_0x2537e6;if(_0x5b1bed!=='write')return'';return _0x2eda39(0xb1);}function a84_0x5874(){const _0x3e28b5=['\x0a#\x20displayName:\x20\x22<填写符合用户实际诉求的人类可读展示名>\x22\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20','write','references/output-contract.md','222hTZqBb','3621540sjIToG','references/runtime-contract.md','read','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','validation','#\x20Output\x20Contract\x0a\x0a','---\x0aname:\x20','\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\x20\x20created:\x20\x22','SKILL.md','4sjqdUG','1784253EPTqWc','\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','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','55cZzbXf','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','Unsupported\x20Skill\x20type:\x20','250821JNGifL','includes','3710028ZOgmCo','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20Backend\x20Function、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','skillName','\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\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','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','timestamp','60OiYmrs','.agents/skills','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','trim','Use\x20one\x20of:\x20','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','6GwvSAS','5506856bIQFPw','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','9297RVuoEG','3759170RzTUln','test'];a84_0x5874=function(){return _0x3e28b5;};return a84_0x5874();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a85_0x1e2778=a85_0x200a;(function(_0x223308,_0x30700f){const _0x31d717=a85_0x200a,_0x401a53=_0x223308();while(!![]){try{const _0x449abe=parseInt(_0x31d717(0xbf))/0x1+parseInt(_0x31d717(0xbd))/0x2+-parseInt(_0x31d717(0x91))/0x3*(-parseInt(_0x31d717(0xd0))/0x4)+parseInt(_0x31d717(0xb7))/0x5+parseInt(_0x31d717(0xbb))/0x6+-parseInt(_0x31d717(0xbe))/0x7*(-parseInt(_0x31d717(0xd9))/0x8)+-parseInt(_0x31d717(0xd8))/0x9;if(_0x449abe===_0x30700f)break;else _0x401a53['push'](_0x401a53['shift']());}catch(_0xf7cf28){_0x401a53['push'](_0x401a53['shift']());}}}(a85_0x3126,0x4d203));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a85_0x2a7026}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a85_0x1e2778(0xa1),SUPPORTED_SKILL_TYPES=new Set([a85_0x1e2778(0xdd),a85_0x1e2778(0xda)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x143525,_0x1e915c={}){const _0x4977ce=a85_0x1e2778,_0x430d28=resolveSkillDirectoryRoot(_0x143525),_0x485fcb=[],_0x4345fa=loadRequiredSkillFile(_0x430d28,_0x485fcb),_0x47b896=_0x4345fa?parseFrontmatter(_0x4345fa[_0x4977ce(0xce)]):{'hasFrontmatter':![]};_0x4345fa&&validateFrontmatter(_0x4345fa['path'],_0x47b896,_0x485fcb);validateRuntimeCliReferences(_0x430d28,_0x485fcb);const _0x43fb55=_0x485fcb[_0x4977ce(0xb6)](_0x33b227=>_0x33b227['level']===_0x4977ce(0xae)),_0x2eb922=_0x485fcb[_0x4977ce(0xb6)](_0x25a51e=>_0x25a51e[_0x4977ce(0xa2)]===_0x4977ce(0xc6));return{'ok':_0x43fb55[_0x4977ce(0xcb)]===0x0,'dir':_0x430d28,'type':_0x47b896[_0x4977ce(0xc7)],'errors':_0x43fb55,'warnings':_0x2eb922};}function resolveSkillDirectoryRoot(_0x14facd){const _0x4d3e5e=a85_0x1e2778,_0x657e72=resolve(_0x14facd);if(!existsSync(_0x657e72))throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x14facd);const _0x4c6405=lstatSync(_0x657e72);if(_0x4c6405[_0x4d3e5e(0x8d)]())return _0x657e72;if(_0x4c6405['isSymbolicLink']()){const _0x23fca3=realpathSync(_0x657e72);if(lstatSync(_0x23fca3)[_0x4d3e5e(0x8d)]())return _0x23fca3;}throw CliErrors[_0x4d3e5e(0xd6)](_0x4d3e5e(0xb5)+_0x14facd);}export function throwIfSkillValidationFailed(_0x3aee0e,_0x56112b=![]){const _0x5f1e42=a85_0x1e2778;if(_0x3aee0e['ok'])return;const _0x344b43=_0x3aee0e[_0x5f1e42(0xb4)][_0x5f1e42(0xa8)](_0x331583=>{const _0xcc24ca=_0x5f1e42,_0x551a9b=_0x331583['section']?'#'+_0x331583[_0xcc24ca(0xc2)]:'';return _0x331583['level'][_0xcc24ca(0x98)]()+'\x20'+_0x331583['ruleId']+'\x20'+_0x331583[_0xcc24ca(0x8b)]+_0x551a9b+':\x20'+_0x331583[_0xcc24ca(0x90)]+'\x20Fix:\x20'+_0x331583[_0xcc24ca(0x96)];});throw CliErrors['validation'](_0x5f1e42(0xdf)+_0x344b43[_0x5f1e42(0xa3)]('\x0a'),_0x5f1e42(0xac));}function loadRequiredSkillFile(_0x2938c6,_0x397137){const _0x3cd62e=a85_0x1e2778,_0x3269df=resolve(_0x2938c6,SKILL_FILE);if(!existsSync(_0x3269df))return _0x397137['push'](issue('error',_0x3cd62e(0xad),SKILL_FILE,_0x3cd62e(0xca),_0x3cd62e(0xde))),undefined;const _0x176ee6=lstatSync(_0x3269df);if(_0x176ee6[_0x3cd62e(0x97)]())return _0x397137[_0x3cd62e(0xd2)](issue(_0x3cd62e(0xae),_0x3cd62e(0xad),SKILL_FILE,_0x3cd62e(0xb8),_0x3cd62e(0x92))),undefined;if(!_0x176ee6[_0x3cd62e(0xc9)]())return _0x397137[_0x3cd62e(0xd2)](issue(_0x3cd62e(0xae),_0x3cd62e(0xad),SKILL_FILE,_0x3cd62e(0xd1),_0x3cd62e(0xe0))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x3269df,_0x3cd62e(0x8c))};}function validateFrontmatter(_0x3321a2,_0x1abb68,_0x3652d1){const _0x3f7996=a85_0x1e2778;if(!_0x1abb68[_0x3f7996(0x89)]){_0x3652d1[_0x3f7996(0xd2)](issue('error',_0x3f7996(0xbc),_0x3321a2,'SKILL.md\x20must\x20start\x20with\x20frontmatter.',_0x3f7996(0x94)));return;}!_0x1abb68['name']?.[_0x3f7996(0xb3)]()&&_0x3652d1[_0x3f7996(0xd2)](issue('error','frontmatter-required',_0x3321a2,_0x3f7996(0x9c),_0x3f7996(0xa6))),!_0x1abb68[_0x3f7996(0xb9)]?.[_0x3f7996(0xb3)]()&&_0x3652d1[_0x3f7996(0xd2)](issue('warning',_0x3f7996(0xc5),_0x3321a2,_0x3f7996(0xa0),_0x3f7996(0xdb))),!_0x1abb68[_0x3f7996(0x88)]?.[_0x3f7996(0xb3)]()&&_0x3652d1[_0x3f7996(0xd2)](issue(_0x3f7996(0xc6),'example-recommended',_0x3321a2,_0x3f7996(0xd4),_0x3f7996(0xa9))),!_0x1abb68[_0x3f7996(0xc4)]?.[_0x3f7996(0xb3)]()&&_0x3652d1[_0x3f7996(0xd2)](issue(_0x3f7996(0xae),_0x3f7996(0xa7),_0x3321a2,'Frontmatter\x20description\x20is\x20empty.','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.')),_0x1abb68[_0x3f7996(0x95)]===!![]&&_0x3652d1[_0x3f7996(0xd2)](issue(_0x3f7996(0xae),_0x3f7996(0xab),_0x3321a2,_0x3f7996(0xaa),_0x3f7996(0xd3))),_0x1abb68['type']?.['trim']()&&!SUPPORTED_SKILL_TYPES[_0x3f7996(0xb1)](_0x1abb68[_0x3f7996(0xc7)])&&_0x3652d1['push'](issue('error',_0x3f7996(0xbc),_0x3321a2,_0x3f7996(0x93),'Set\x20metadata.type\x20to\x20write\x20or\x20read.'));}function a85_0x200a(_0x31229c,_0x1c2603){_0x31229c=_0x31229c-0x87;const _0x3126f2=a85_0x3126();let _0x200a74=_0x3126f2[_0x31229c];return _0x200a74;}function validateRuntimeCliReferences(_0x1960c8,_0x4a36f7){const _0x1d075c=a85_0x1e2778;for(const _0x543ac2 of findRabetbaseCliInvocations(_0x1960c8)){_0x4a36f7[_0x1d075c(0xd2)](issue(_0x1d075c(0xc6),'rabetbase-cli-reference',_0x543ac2[_0x1d075c(0x8b)],_0x1d075c(0x87),'If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','L'+_0x543ac2['line']));}}function findRabetbaseCliInvocations(_0x2b543b){const _0x4a82ad=a85_0x1e2778;return scanSkillDirectory(_0x2b543b)[_0x4a82ad(0xb6)](_0x2c1292=>TEXT_SKILL_FILE_PATTERN[_0x4a82ad(0xaf)](_0x2c1292['path']))[_0x4a82ad(0x9e)](_0x1a0f60=>{const _0x1b93c6=_0x4a82ad,_0x5de2f4=fileText(_0x1a0f60);return _0x5de2f4[_0x1b93c6(0xa4)](/\r?\n/)[_0x1b93c6(0xa8)]((_0x2b4365,_0x5e13d6)=>({'file':_0x1a0f60[_0x1b93c6(0xba)],'line':_0x5e13d6+0x1,'text':_0x2b4365}))[_0x1b93c6(0xb6)](({text:_0x4773cc})=>isRabetbaseCliInvocation(_0x4773cc))[_0x1b93c6(0xa8)](({file:_0x4c7297,line:_0x370855})=>({'file':_0x4c7297,'line':_0x370855}));});}const RABETBASE_SUBCOMMANDS=[a85_0x1e2778(0xb0),a85_0x1e2778(0xc1),a85_0x1e2778(0xc8),a85_0x1e2778(0xa5),a85_0x1e2778(0xc3),'app','schema',a85_0x1e2778(0xc0),a85_0x1e2778(0xdc),'kb',a85_0x1e2778(0xd7),a85_0x1e2778(0x9f),a85_0x1e2778(0x8e),a85_0x1e2778(0x9b),a85_0x1e2778(0x99),a85_0x1e2778(0xb2)],RABETBASE_INVOCATION=new RegExp(String[a85_0x1e2778(0xd5)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a85_0x1e2778(0xa3)]('|')})\b`+String['raw']`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x1909c4){const _0x493aaa=a85_0x1e2778,_0x2e613c=_0x1909c4['search'](/\brabetbase\b/i);if(_0x2e613c<0x0)return![];const _0x14c2f7=_0x1909c4[_0x493aaa(0x9d)](_0x2e613c)[_0x493aaa(0xa4)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x493aaa(0xaf)](_0x14c2f7);}function parseFrontmatter(_0x3ee44e){const _0x4cac2c=a85_0x1e2778,_0x5d3e28=_0x3ee44e['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5d3e28)return{'hasFrontmatter':![]};const _0x14c59c=_0x5d3e28[0x1]??'',_0x266f6c={'hasFrontmatter':!![]};let _0x5ddfc4;try{_0x5ddfc4=a85_0x2a7026(_0x14c59c);}catch{return _0x266f6c;}const _0x352198=asRecord(_0x5ddfc4);if(!_0x352198)return _0x266f6c;_0x266f6c['name']=scalarToString(_0x352198[_0x4cac2c(0x8f)]),_0x266f6c[_0x4cac2c(0xb9)]=scalarToString(_0x352198[_0x4cac2c(0xb9)]),_0x266f6c[_0x4cac2c(0xc4)]=scalarToString(_0x352198['description']),_0x266f6c[_0x4cac2c(0x88)]=scalarToString(_0x352198[_0x4cac2c(0x88)]);const _0x1e3f72=asRecord(_0x352198['metadata']);return _0x1e3f72&&(_0x266f6c['type']=scalarToString(_0x1e3f72[_0x4cac2c(0xc7)]),_0x266f6c['internal']=scalarToBoolean(_0x1e3f72[_0x4cac2c(0x95)])),_0x266f6c;}function asRecord(_0x319275){const _0x35901f=a85_0x1e2778;if(_0x319275&&typeof _0x319275===_0x35901f(0x9a)&&!Array[_0x35901f(0xcc)](_0x319275))return _0x319275;return undefined;}function a85_0x3126(){const _0x3ffbc8=['description','display-name-recommended','warning','type','bff','isFile','Missing\x20SKILL.md.','length','isArray','false','content','boolean','425092xsSXbQ','SKILL.md\x20is\x20not\x20a\x20file.','push','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','Frontmatter\x20example\x20is\x20missing.','raw','validation','config','17090847lkxKkJ','47896oriYgC','read','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','artifact','write','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','Skill\x20validation\x20failed:\x0a','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','example','hasFrontmatter','string','file','utf8','isDirectory','data','name','message','6pZluNk','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','Add\x20frontmatter\x20with\x20name\x20and\x20description.','internal','suggestion','isSymbolicLink','toUpperCase','logs','object','auth','Frontmatter\x20name\x20is\x20missing.','slice','flatMap','workspace','Frontmatter\x20displayName\x20is\x20missing.','SKILL.md','level','join','split','page','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','description-required','map','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','internal-skill','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','structure-complete','error','test','dataset','has','registry','trim','errors','Skill\x20directory\x20not\x20found:\x20','filter','1928340SMnzKB','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','displayName','path','2478840UGTdlR','frontmatter-required','1156472GyyZbn','7QYyCsR','619313wyODoA','service','sql','section','project'];a85_0x3126=function(){return _0x3ffbc8;};return a85_0x3126();}function scalarToString(_0x3b0f81){const _0x1bfbeb=a85_0x1e2778;if(typeof _0x3b0f81===_0x1bfbeb(0x8a))return _0x3b0f81[_0x1bfbeb(0xb3)]();if(typeof _0x3b0f81==='number'||typeof _0x3b0f81==='boolean')return String(_0x3b0f81);return undefined;}function scalarToBoolean(_0x256e6f){const _0x2b962f=a85_0x1e2778;if(typeof _0x256e6f===_0x2b962f(0xcf))return _0x256e6f;if(typeof _0x256e6f===_0x2b962f(0x8a))return cleanBoolean(_0x256e6f);return undefined;}function cleanBoolean(_0x3ad173){const _0x32d08e=a85_0x1e2778,_0x2ddb60=_0x3ad173['trim']()['toLowerCase']();if(_0x2ddb60==='true')return!![];if(_0x2ddb60===_0x32d08e(0xcd))return![];return undefined;}function issue(_0x5cea8e,_0x2d1c10,_0x2d49e7,_0x5409fc,_0x5a3913,_0x27ebb6){return{'level':_0x5cea8e,'ruleId':_0x2d1c10,'file':_0x2d49e7,'section':_0x27ebb6,'message':_0x5409fc,'suggestion':_0x5a3913};}
|
|
1
|
+
const a85_0xc79f02=a85_0x25ad;(function(_0x13a848,_0x296e44){const _0x3f7f3f=a85_0x25ad,_0x45322c=_0x13a848();while(!![]){try{const _0x17e38a=-parseInt(_0x3f7f3f(0x208))/0x1+-parseInt(_0x3f7f3f(0x21b))/0x2*(-parseInt(_0x3f7f3f(0x224))/0x3)+-parseInt(_0x3f7f3f(0x22f))/0x4+parseInt(_0x3f7f3f(0x230))/0x5*(parseInt(_0x3f7f3f(0x23f))/0x6)+-parseInt(_0x3f7f3f(0x227))/0x7+-parseInt(_0x3f7f3f(0x20f))/0x8*(-parseInt(_0x3f7f3f(0x1fd))/0x9)+-parseInt(_0x3f7f3f(0x202))/0xa;if(_0x17e38a===_0x296e44)break;else _0x45322c['push'](_0x45322c['shift']());}catch(_0x113ce9){_0x45322c['push'](_0x45322c['shift']());}}}(a85_0x6ccc,0x597c3));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a85_0x3cf65d}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a85_0xc79f02(0x20b),SUPPORTED_SKILL_TYPES=new Set(['write','read']),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x15abc1,_0x43ad02={}){const _0x1e3cac=a85_0xc79f02,_0x1f9adc=resolveSkillDirectoryRoot(_0x15abc1),_0x3d7329=[],_0x5cb076=loadRequiredSkillFile(_0x1f9adc,_0x3d7329),_0x61d0d9=_0x5cb076?parseFrontmatter(_0x5cb076[_0x1e3cac(0x21c)]):{'hasFrontmatter':![]};_0x5cb076&&validateFrontmatter(_0x5cb076[_0x1e3cac(0x21a)],_0x61d0d9,_0x3d7329);validateRuntimeCliReferences(_0x1f9adc,_0x3d7329);const _0x291a61=_0x3d7329[_0x1e3cac(0x235)](_0x86f2f5=>_0x86f2f5[_0x1e3cac(0x221)]===_0x1e3cac(0x214)),_0x3bce39=_0x3d7329[_0x1e3cac(0x235)](_0x55f885=>_0x55f885[_0x1e3cac(0x221)]===_0x1e3cac(0x1e6));return{'ok':_0x291a61[_0x1e3cac(0x237)]===0x0,'dir':_0x1f9adc,'type':_0x61d0d9[_0x1e3cac(0x1f4)],'errors':_0x291a61,'warnings':_0x3bce39};}function resolveSkillDirectoryRoot(_0x355868){const _0x30bc07=a85_0xc79f02,_0x4d9d7a=resolve(_0x355868);if(!existsSync(_0x4d9d7a))throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x355868);const _0x49fa38=lstatSync(_0x4d9d7a);if(_0x49fa38[_0x30bc07(0x238)]())return _0x4d9d7a;if(_0x49fa38['isSymbolicLink']()){const _0x3c3dd3=realpathSync(_0x4d9d7a);if(lstatSync(_0x3c3dd3)[_0x30bc07(0x238)]())return _0x3c3dd3;}throw CliErrors[_0x30bc07(0x200)](_0x30bc07(0x228)+_0x355868);}export function throwIfSkillValidationFailed(_0x395e4d,_0x3664da=![]){const _0xeaf451=a85_0xc79f02;if(_0x395e4d['ok'])return;const _0x3fe9fc=_0x395e4d['errors'][_0xeaf451(0x1e7)](_0x2df65f=>{const _0x46ff92=_0xeaf451,_0x59687d=_0x2df65f[_0x46ff92(0x1f0)]?'#'+_0x2df65f[_0x46ff92(0x1f0)]:'';return _0x2df65f['level']['toUpperCase']()+'\x20'+_0x2df65f[_0x46ff92(0x215)]+'\x20'+_0x2df65f[_0x46ff92(0x1eb)]+_0x59687d+':\x20'+_0x2df65f['message']+_0x46ff92(0x1ea)+_0x2df65f['suggestion'];});throw CliErrors[_0xeaf451(0x200)]('Skill\x20validation\x20failed:\x0a'+_0x3fe9fc[_0xeaf451(0x242)]('\x0a'),_0xeaf451(0x23b));}function a85_0x6ccc(){const _0x1faf5f=['SKILL.md\x20must\x20be\x20a\x20regular\x20file.','project','validation','SKILL.md\x20must\x20start\x20with\x20frontmatter.','4741990wzjVwP','app','sql','push','Set\x20metadata.type\x20to\x20write\x20or\x20read.','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','27237ODyuaO','internal-skill','frontmatter-required','SKILL.md','false','internal','config','8kEzHah','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','Frontmatter\x20name\x20is\x20missing.','description','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','error','ruleId','raw','hasFrontmatter','dataset','number','path','2640ZNhFph','content','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','data','description-required','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','level','split','artifact','1371ZdDBAG','match','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','3004981MIqtfZ','Skill\x20directory\x20not\x20found:\x20','rabetbase-cli-reference','logs','SKILL.md\x20is\x20not\x20a\x20file.','search','Add\x20frontmatter\x20with\x20name\x20and\x20description.','schema','252880fawCjg','5TZklpH','boolean','workspace','Frontmatter\x20example\x20is\x20missing.','Frontmatter\x20description\x20is\x20empty.','filter','object','length','isDirectory','service','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','true','structure-complete','isArray','1056522XHXond','auth','line','join','warning','map','bff','trim','\x20Fix:\x20','file','utf8','string','display-name-recommended','displayName','section','Frontmatter\x20displayName\x20is\x20missing.','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','isFile','type','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','example','has','example-recommended','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','name','test','5230287yILjDJ'];a85_0x6ccc=function(){return _0x1faf5f;};return a85_0x6ccc();}function loadRequiredSkillFile(_0x1776f1,_0x5f258f){const _0x108ae1=a85_0xc79f02,_0x34bfe3=resolve(_0x1776f1,SKILL_FILE);if(!existsSync(_0x34bfe3))return _0x5f258f[_0x108ae1(0x205)](issue(_0x108ae1(0x214),_0x108ae1(0x23d),SKILL_FILE,'Missing\x20SKILL.md.',_0x108ae1(0x220))),undefined;const _0x2da6b9=lstatSync(_0x34bfe3);if(_0x2da6b9['isSymbolicLink']())return _0x5f258f[_0x108ae1(0x205)](issue(_0x108ae1(0x214),_0x108ae1(0x23d),SKILL_FILE,_0x108ae1(0x1fe),_0x108ae1(0x210))),undefined;if(!_0x2da6b9[_0x108ae1(0x1f3)]())return _0x5f258f[_0x108ae1(0x205)](issue(_0x108ae1(0x214),_0x108ae1(0x23d),SKILL_FILE,_0x108ae1(0x22b),_0x108ae1(0x213))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x34bfe3,_0x108ae1(0x1ec))};}function validateFrontmatter(_0x251240,_0x4ab3c6,_0x68ff1d){const _0x334347=a85_0xc79f02;if(!_0x4ab3c6[_0x334347(0x217)]){_0x68ff1d[_0x334347(0x205)](issue(_0x334347(0x214),'frontmatter-required',_0x251240,_0x334347(0x201),_0x334347(0x22d)));return;}!_0x4ab3c6[_0x334347(0x1fb)]?.[_0x334347(0x1e9)]()&&_0x68ff1d[_0x334347(0x205)](issue(_0x334347(0x214),_0x334347(0x20a),_0x251240,_0x334347(0x211),_0x334347(0x1f5))),!_0x4ab3c6[_0x334347(0x1ef)]?.['trim']()&&_0x68ff1d[_0x334347(0x205)](issue(_0x334347(0x1e6),_0x334347(0x1ee),_0x251240,_0x334347(0x1f1),_0x334347(0x207))),!_0x4ab3c6['example']?.[_0x334347(0x1e9)]()&&_0x68ff1d[_0x334347(0x205)](issue('warning',_0x334347(0x1f9),_0x251240,_0x334347(0x233),_0x334347(0x1fa))),!_0x4ab3c6[_0x334347(0x212)]?.[_0x334347(0x1e9)]()&&_0x68ff1d['push'](issue(_0x334347(0x214),_0x334347(0x21f),_0x251240,_0x334347(0x234),_0x334347(0x1f2))),_0x4ab3c6[_0x334347(0x20d)]===!![]&&_0x68ff1d['push'](issue(_0x334347(0x214),_0x334347(0x209),_0x251240,_0x334347(0x23a),_0x334347(0x21d))),_0x4ab3c6[_0x334347(0x1f4)]?.[_0x334347(0x1e9)]()&&!SUPPORTED_SKILL_TYPES[_0x334347(0x1f8)](_0x4ab3c6[_0x334347(0x1f4)])&&_0x68ff1d[_0x334347(0x205)](issue('error',_0x334347(0x20a),_0x251240,'metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.',_0x334347(0x206)));}function validateRuntimeCliReferences(_0x4c5750,_0x209c5c){const _0x5c8c0b=a85_0xc79f02;for(const _0x1bf7d4 of findRabetbaseCliInvocations(_0x4c5750)){_0x209c5c[_0x5c8c0b(0x205)](issue(_0x5c8c0b(0x1e6),_0x5c8c0b(0x229),_0x1bf7d4[_0x5c8c0b(0x1eb)],_0x5c8c0b(0x226),_0x5c8c0b(0x1f6),'L'+_0x1bf7d4[_0x5c8c0b(0x241)]));}}function findRabetbaseCliInvocations(_0x2b6014){const _0x155719=a85_0xc79f02;return scanSkillDirectory(_0x2b6014)[_0x155719(0x235)](_0xe940eb=>TEXT_SKILL_FILE_PATTERN[_0x155719(0x1fc)](_0xe940eb[_0x155719(0x21a)]))['flatMap'](_0x2eeafc=>{const _0x3382d7=_0x155719,_0x32ee56=fileText(_0x2eeafc);return _0x32ee56['split'](/\r?\n/)['map']((_0x4cf31c,_0x128cc0)=>({'file':_0x2eeafc[_0x3382d7(0x21a)],'line':_0x128cc0+0x1,'text':_0x4cf31c}))['filter'](({text:_0x560373})=>isRabetbaseCliInvocation(_0x560373))[_0x3382d7(0x1e7)](({file:_0x5e34a5,line:_0x4761c6})=>({'file':_0x5e34a5,'line':_0x4761c6}));});}const RABETBASE_SUBCOMMANDS=[a85_0xc79f02(0x218),a85_0xc79f02(0x204),a85_0xc79f02(0x1e8),'page',a85_0xc79f02(0x1ff),a85_0xc79f02(0x203),a85_0xc79f02(0x22e),a85_0xc79f02(0x239),a85_0xc79f02(0x223),'kb',a85_0xc79f02(0x20e),a85_0xc79f02(0x232),a85_0xc79f02(0x21e),a85_0xc79f02(0x240),a85_0xc79f02(0x22a),'registry'],RABETBASE_INVOCATION=new RegExp(String[a85_0xc79f02(0x216)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a85_0xc79f02(0x242)]('|')})\b`+String[a85_0xc79f02(0x216)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x3fc07e){const _0x32c1cc=a85_0xc79f02,_0x18e650=_0x3fc07e[_0x32c1cc(0x22c)](/\brabetbase\b/i);if(_0x18e650<0x0)return![];const _0x3d1bbc=_0x3fc07e['slice'](_0x18e650)[_0x32c1cc(0x222)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION['test'](_0x3d1bbc);}function parseFrontmatter(_0x5c8b57){const _0x1bb529=a85_0xc79f02,_0x5d90e8=_0x5c8b57[_0x1bb529(0x225)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5d90e8)return{'hasFrontmatter':![]};const _0x361b86=_0x5d90e8[0x1]??'',_0x21f77c={'hasFrontmatter':!![]};let _0x1921df;try{_0x1921df=a85_0x3cf65d(_0x361b86);}catch{return _0x21f77c;}const _0xb1ab26=asRecord(_0x1921df);if(!_0xb1ab26)return _0x21f77c;_0x21f77c[_0x1bb529(0x1fb)]=scalarToString(_0xb1ab26['name']),_0x21f77c['displayName']=scalarToString(_0xb1ab26['displayName']),_0x21f77c[_0x1bb529(0x212)]=scalarToString(_0xb1ab26[_0x1bb529(0x212)]),_0x21f77c[_0x1bb529(0x1f7)]=scalarToString(_0xb1ab26['example']);const _0x4124e5=asRecord(_0xb1ab26['metadata']);return _0x4124e5&&(_0x21f77c[_0x1bb529(0x1f4)]=scalarToString(_0x4124e5[_0x1bb529(0x1f4)]),_0x21f77c[_0x1bb529(0x20d)]=scalarToBoolean(_0x4124e5['internal'])),_0x21f77c;}function asRecord(_0x462459){const _0x4452cd=a85_0xc79f02;if(_0x462459&&typeof _0x462459===_0x4452cd(0x236)&&!Array[_0x4452cd(0x23e)](_0x462459))return _0x462459;return undefined;}function scalarToString(_0x46d00e){const _0x78dfd5=a85_0xc79f02;if(typeof _0x46d00e===_0x78dfd5(0x1ed))return _0x46d00e[_0x78dfd5(0x1e9)]();if(typeof _0x46d00e===_0x78dfd5(0x219)||typeof _0x46d00e===_0x78dfd5(0x231))return String(_0x46d00e);return undefined;}function a85_0x25ad(_0x7de52f,_0x18b2fc){_0x7de52f=_0x7de52f-0x1e6;const _0x6ccc17=a85_0x6ccc();let _0x25adff=_0x6ccc17[_0x7de52f];return _0x25adff;}function scalarToBoolean(_0x21d660){if(typeof _0x21d660==='boolean')return _0x21d660;if(typeof _0x21d660==='string')return cleanBoolean(_0x21d660);return undefined;}function cleanBoolean(_0x4920d7){const _0xd897bf=a85_0xc79f02,_0x518bb6=_0x4920d7[_0xd897bf(0x1e9)]()['toLowerCase']();if(_0x518bb6===_0xd897bf(0x23c))return!![];if(_0x518bb6===_0xd897bf(0x20c))return![];return undefined;}function issue(_0xd86a80,_0xdc0fa0,_0x33f517,_0x1ed66f,_0x262cb5,_0x598a24){return{'level':_0xd86a80,'ruleId':_0xdc0fa0,'file':_0x33f517,'section':_0x598a24,'message':_0x1ed66f,'suggestion':_0x262cb5};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a86_0x1372(){const _0x55c982=['read','12TqYjpP','dbId','248tPCxfm','1086PDlUKJ','1116330KZXsWC','detail','appCode','6489BXsEtg','sqlName','39855OiWLnI','sqlcode','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','3939033GhSmip','verbose','sqlCode','1776245ZqOBba','sqlContent','2668016iJiaCI','1690UFopZC'];a86_0x1372=function(){return _0x55c982;};return a86_0x1372();}const a86_0x581af0=a86_0x2ecc;(function(_0x5941d9,_0x2a5964){const _0x4452a1=a86_0x2ecc,_0x2672a0=_0x5941d9();while(!![]){try{const _0x17147e=-parseInt(_0x4452a1(0x1ef))/0x1*(parseInt(_0x4452a1(0x1ee))/0x2)+-parseInt(_0x4452a1(0x1f5))/0x3*(parseInt(_0x4452a1(0x1ec))/0x4)+-parseInt(_0x4452a1(0x1e7))/0x5+-parseInt(_0x4452a1(0x1f0))/0x6+parseInt(_0x4452a1(0x1e4))/0x7+parseInt(_0x4452a1(0x1e9))/0x8+parseInt(_0x4452a1(0x1f3))/0x9*(parseInt(_0x4452a1(0x1ea))/0xa);if(_0x17147e===_0x2a5964)break;else _0x2672a0['push'](_0x2672a0['shift']());}catch(_0x3334f0){_0x2672a0['push'](_0x2672a0['shift']());}}}(a86_0x1372,0x49ca7));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a86_0x2ecc(_0x2042e3,_0x802e33){_0x2042e3=_0x2042e3-0x1e4;const _0x137244=a86_0x1372();let _0x2ecca1=_0x137244[_0x2042e3];return _0x2ecca1;}import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':'sql','command':a86_0x581af0(0x1f1),'description':a86_0x581af0(0x1f7),'risk':a86_0x581af0(0x1eb),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x329533){const _0x3a8ab2=a86_0x581af0,_0xfc1ec6=await getSqlQueryInfo(_0x329533['appCode'],_0x329533['str'](_0x3a8ab2(0x1f6))),_0x10a733=_0x329533['bool'](_0x3a8ab2(0x1e5));if(_0x10a733)return{'ok':!![],'data':_0xfc1ec6};const _0x42b622=_0xfc1ec6['dbId']?await getDbName(_0x329533[_0x3a8ab2(0x1f2)],_0xfc1ec6[_0x3a8ab2(0x1ed)]):undefined;return{'ok':!![],'data':{'sqlCode':_0xfc1ec6[_0x3a8ab2(0x1e6)],'sqlName':_0xfc1ec6[_0x3a8ab2(0x1f4)],'db':_0x42b622?_0x42b622+'\x20('+_0xfc1ec6[_0x3a8ab2(0x1ed)]+')':_0xfc1ec6[_0x3a8ab2(0x1ed)]??'','sqlContent':_0xfc1ec6[_0x3a8ab2(0x1e8)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a87_0x5c3f(_0x512784,_0x2c41cd){_0x512784=_0x512784-0x1b5;const _0x45f368=a87_0x45f3();let _0x5c3f9a=_0x45f368[_0x512784];return _0x5c3f9a;}const a87_0x1fef7c=a87_0x5c3f;(function(_0x3f650f,_0x4813ff){const _0x32fc7d=a87_0x5c3f,_0x83b25c=_0x3f650f();while(!![]){try{const _0x3352db=-parseInt(_0x32fc7d(0x1be))/0x1+-parseInt(_0x32fc7d(0x1c9))/0x2+parseInt(_0x32fc7d(0x1c1))/0x3+-parseInt(_0x32fc7d(0x1bf))/0x4+parseInt(_0x32fc7d(0x1c2))/0x5*(-parseInt(_0x32fc7d(0x1b9))/0x6)+-parseInt(_0x32fc7d(0x1bc))/0x7*(parseInt(_0x32fc7d(0x1bb))/0x8)+-parseInt(_0x32fc7d(0x1c3))/0x9*(-parseInt(_0x32fc7d(0x1b6))/0xa);if(_0x3352db===_0x4813ff)break;else _0x83b25c['push'](_0x83b25c['shift']());}catch(_0x1e07a9){_0x83b25c['push'](_0x83b25c['shift']());}}}(a87_0x45f3,0x99068));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';import{CliErrors}from'../../errors.js';function a87_0x45f3(){const _0x428284=['Invalid\x20SQL\x20execution\x20response:\x20execSuccess\x20must\x20be\x20a\x20boolean.','execResult','3996670CxFNbq','params','str','12VgIZJs','Returned\x20','88520CANeQr','91lLboOq','exec','139746IKhiQN','1377248xWolFH','read','1602741VXdwMQ','1426145HoSKEd','54UhwCTN','isArray','\x20row(s)\x20in\x20','length','SQL\x20execution\x20failed','execSuccess','2214192qskDPP','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','boolean'];a87_0x45f3=function(){return _0x428284;};return a87_0x45f3();}export const sqlExec={'service':'sql','command':a87_0x1fef7c(0x1bd),'description':a87_0x1fef7c(0x1ca),'risk':a87_0x1fef7c(0x1c0),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x1996de){const _0x10460f=a87_0x1fef7c,_0x52de73=parseJsonParams(_0x1996de[_0x10460f(0x1b8)](_0x10460f(0x1b7))),_0x3b1d8c=Date['now'](),_0xb3aaa7=await executeSdkSql(_0x1996de[_0x10460f(0x1b8)]('sqlcode'),_0x52de73),_0x43ce15=Date['now']()-_0x3b1d8c;if(!_0xb3aaa7||typeof _0xb3aaa7!=='object'||Array['isArray'](_0xb3aaa7)||typeof _0xb3aaa7[_0x10460f(0x1c8)]!==_0x10460f(0x1cb))throw CliErrors['apiError'](_0x10460f(0x1cc));if(!_0xb3aaa7[_0x10460f(0x1c8)])return{'ok':![],'data':{'error':_0x10460f(0x1c7),'elapsed':_0x43ce15},'message':_0x10460f(0x1c7)};const _0x478171=Array[_0x10460f(0x1c4)](_0xb3aaa7[_0x10460f(0x1b5)])?_0xb3aaa7[_0x10460f(0x1b5)]:[];return{'ok':!![],'data':{'rows':_0x478171,'rowCount':_0x478171['length'],'elapsed':_0x43ce15},'message':_0x10460f(0x1ba)+_0x478171[_0x10460f(0x1c6)]+_0x10460f(0x1c5)+_0x43ce15+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x485c7b,_0x200589){const _0x320c60=a88_0x2ab9,_0x4049f5=_0x485c7b();while(!![]){try{const _0x4091e8=parseInt(_0x320c60(0x187))/0x1+-parseInt(_0x320c60(0x17f))/0x2+-parseInt(_0x320c60(0x180))/0x3+-parseInt(_0x320c60(0x185))/0x4*(parseInt(_0x320c60(0x186))/0x5)+-parseInt(_0x320c60(0x188))/0x6*(parseInt(_0x320c60(0x17e))/0x7)+parseInt(_0x320c60(0x183))/0x8*(-parseInt(_0x320c60(0x184))/0x9)+-parseInt(_0x320c60(0x181))/0xa*(-parseInt(_0x320c60(0x182))/0xb);if(_0x4091e8===_0x200589)break;else _0x4049f5['push'](_0x4049f5['shift']());}catch(_0x23679e){_0x4049f5['push'](_0x4049f5['shift']());}}}(a88_0x4929,0xc2ca8));function a88_0x2ab9(_0x57b085,_0x4dfec5){_0x57b085=_0x57b085-0x17e;const _0x4929db=a88_0x4929();let _0x2ab958=_0x4929db[_0x57b085];return _0x2ab958;}import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';function a88_0x4929(){const _0x1e20ed=['9404822keFfFs','1714090eektdZ','1109574VeGSHr','25856850pNcUrp','11wPktyP','648uYJJih','297vOegGe','452844VoTeoe','5idfpsZ','898512ulfUUX','6tPtIdJ'];a88_0x4929=function(){return _0x1e20ed;};return a88_0x4929();}export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a89_0x3c1c(_0x55742f,_0x2af7c5){_0x55742f=_0x55742f-0x1de;const _0x4e5b21=a89_0x4e5b();let _0x3c1c7b=_0x4e5b21[_0x55742f];return _0x3c1c7b;}const a89_0x17f19e=a89_0x3c1c;(function(_0x3aac68,_0x5f58fa){const _0x32f44d=a89_0x3c1c,_0x46fc35=_0x3aac68();while(!![]){try{const _0x4453ae=parseInt(_0x32f44d(0x1fa))/0x1+parseInt(_0x32f44d(0x1f3))/0x2*(-parseInt(_0x32f44d(0x219))/0x3)+-parseInt(_0x32f44d(0x1e0))/0x4+parseInt(_0x32f44d(0x1de))/0x5+-parseInt(_0x32f44d(0x227))/0x6*(parseInt(_0x32f44d(0x1f8))/0x7)+-parseInt(_0x32f44d(0x1df))/0x8*(-parseInt(_0x32f44d(0x202))/0x9)+-parseInt(_0x32f44d(0x1eb))/0xa;if(_0x4453ae===_0x5f58fa)break;else _0x46fc35['push'](_0x46fc35['shift']());}catch(_0x3e35fc){_0x46fc35['push'](_0x46fc35['shift']());}}}(a89_0x4e5b,0xb2d0b));import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a89_0x5c8187 from'semver';function a89_0x4e5b(){const _0x58ce8f=['run','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','inherit','6whPxxu','unknown','apiError','\x20\x20CLI\x20Built-in\x20Skill\x20','Update\x20failed:\x20','CLI\x20updated\x20to\x20v','reason','warn','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','code','\x20version\x20from\x20npm.','shortMessage','string','object','platform','timeout','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Version\x20comparison\x20failed:\x20','Run:\x20','nonInteractive','dirname','7301335KzNDyX','1325936rtVSzP','1407832kcgmhr','validation','trim','expected\x20','@lovrabet\x5clovrabet-cli',']:\x20','--prefix','repairCommand','pipe','Update\x20the\x20','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','10925440TsRQKt','length','skillVersion','str','Run:\x20npm\x20view\x20','stderr','valid','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','2IkmISG','error','INSTALL_FAILED','state','toLowerCase','97979fpAtYB','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','19676mamjUP',',\x20then\x20verify\x20with:\x20','Checking\x20CLI\x20Built-in\x20Skill...','stdout','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Install\x20a\x20specific\x20CLI\x20version',',\x20state\x20','Invalid\x20version:\x20','63pCpZnu','test','win32','Already\x20on\x20requested\x20version\x20(v','entries','bool','version','basename','\x20doctor','args','json','join','/-/package/','filter','source','boolean','latest','map','Updating\x20',',\x20found\x20','node_modules','Run:\x20npm\x20install\x20-g\x20','fromEntries','1347633DNRcpC','exitCode','lib','Current\x20version:\x20','log','Already\x20up\x20to\x20date\x20(v','write','\x20is\x20current.','Updated\x20to\x20v','beta','find'];a89_0x4e5b=function(){return _0x58ce8f;};return a89_0x4e5b();}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':a89_0x17f19e(0x212),'type':'boolean','description':a89_0x17f19e(0x237),'default':![]},{'name':a89_0x17f19e(0x222),'type':a89_0x17f19e(0x211),'description':a89_0x17f19e(0x225),'default':![]},{'name':'version','type':a89_0x17f19e(0x233),'description':a89_0x17f19e(0x1ff)}];function getRequestedVersion(_0x5ab0e5){const _0x176377=a89_0x17f19e,_0x16a6fb=_0x5ab0e5[_0x176377(0x1ee)](_0x176377(0x208))[_0x176377(0x1e2)]();if(_0x16a6fb)return _0x16a6fb;return String(_0x5ab0e5[_0x176377(0x20b)]?.[0x0]??'')['trim']();}async function validateUpdateFlags(_0x16cd75){const _0x750893=a89_0x17f19e,_0x25e583=getRequestedVersion(_0x16cd75),_0x312d08=[_0x16cd75[_0x750893(0x207)](_0x750893(0x212))?_0x750893(0x212):'',_0x16cd75[_0x750893(0x207)](_0x750893(0x222))?'beta':'',_0x25e583?_0x750893(0x208):''][_0x750893(0x20f)](Boolean);if(_0x312d08[_0x750893(0x1ec)]>0x1)throw CliErrors[_0x750893(0x1e1)](_0x750893(0x1f2),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x25e583&&!a89_0x5c8187[_0x750893(0x1f1)](_0x25e583))throw CliErrors[_0x750893(0x1e1)](_0x750893(0x201)+_0x25e583,_0x750893(0x1ea));}async function fetchNpmDistTags(){const _0x1d845a=a89_0x17f19e;try{const _0x2aa2c4=NPM_REGISTRY_BASE_URL+_0x1d845a(0x20e)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x2a6a05=await fetch(_0x2aa2c4,{'signal':AbortSignal[_0x1d845a(0x236)](0x2710)});if(!_0x2a6a05['ok'])return null;const _0x5ceea7=await _0x2a6a05[_0x1d845a(0x20c)]();if(!_0x5ceea7||typeof _0x5ceea7!==_0x1d845a(0x234))return null;return Object[_0x1d845a(0x218)](Object[_0x1d845a(0x206)](_0x5ceea7)['filter'](([,_0x1a6f05])=>typeof _0x1a6f05===_0x1d845a(0x233)&&_0x1a6f05[_0x1d845a(0x1e2)]())[_0x1d845a(0x213)](([_0x4ea8a4,_0x2711e1])=>[_0x4ea8a4,String(_0x2711e1)[_0x1d845a(0x1e2)]()]));}catch{return null;}}async function resolveTargetVersion(_0x329eea){const _0x124b37=a89_0x17f19e,_0x1a8db1=getRequestedVersion(_0x329eea);if(_0x1a8db1)return{'version':_0x1a8db1,'source':_0x124b37(0x208)};const _0x5dbf63=_0x329eea[_0x124b37(0x207)](_0x124b37(0x222))?_0x124b37(0x222):'latest',_0x1ef5e7=await fetchNpmDistTags(),_0xd415d8=_0x1ef5e7?.[_0x5dbf63];if(!_0xd415d8)return null;return{'version':_0xd415d8,'source':_0x5dbf63};}function shouldInstallTarget(_0x5d4e22,_0x5aa17d){const _0x59793b=a89_0x17f19e;if(_0x5aa17d['source']===_0x59793b(0x208)||_0x5aa17d[_0x59793b(0x210)]===_0x59793b(0x222))return!a89_0x5c8187['eq'](_0x5d4e22,_0x5aa17d[_0x59793b(0x208)]);return a89_0x5c8187['lt'](_0x5d4e22,_0x5aa17d[_0x59793b(0x208)]);}export function installCliPackage(_0xe11c8e,_0x2bfe72,_0x3cc650=resolveCurrentCliNpmPrefix()){const _0xbf703c=a89_0x17f19e,_0x5abcc0=LOVRABET_NPM_PACKAGE_NAME+'@'+_0xe11c8e,_0x193325=['install','-g',_0x5abcc0],_0xafa2e8=runNpmInstall(_0x193325,_0x2bfe72);if(_0xafa2e8['ok']||!isNpmPrefixPermissionError(_0xafa2e8['error']))return _0xafa2e8;if(!_0x3cc650||_0xafa2e8[_0xbf703c(0x1f4)]?.[_0xbf703c(0x1f7)]()['includes'](_0x3cc650[_0xbf703c(0x1f7)]()))return _0xafa2e8;return console[_0xbf703c(0x22e)](_0xbf703c(0x1f9)+_0x3cc650),runNpmInstall([..._0x193325,_0xbf703c(0x1e6),_0x3cc650],_0x2bfe72);}export function resolveCurrentCliNpmPrefix(_0x1a4791=fileURLToPath(import.meta.url),_0xee10e8=process[a89_0x17f19e(0x235)]){const _0x38be2a=a89_0x17f19e,_0x37fe41=_0xee10e8===_0x38be2a(0x204)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x52ef50=_0x37fe41[_0x38be2a(0x23b)](_0x37fe41['dirname'](_0x37fe41[_0x38be2a(0x23b)](_0x1a4791))),_0xee8e3f=_0xee10e8===_0x38be2a(0x204)?_0x38be2a(0x1e4):'@lovrabet/lovrabet-cli';let _0x57d826=_0x37fe41[_0x38be2a(0x23b)](_0x52ef50);while(!![]){if(_0x37fe41[_0x38be2a(0x209)](_0x57d826)===_0x38be2a(0x216)&&_0x37fe41['relative'](_0x57d826,_0x52ef50)===_0xee8e3f){const _0x37d762=_0x37fe41[_0x38be2a(0x23b)](_0x57d826);return _0x37fe41['basename'](_0x37d762)===_0x38be2a(0x21b)?_0x37fe41[_0x38be2a(0x23b)](_0x37d762):_0x37d762;}const _0x16fd93=_0x37fe41[_0x38be2a(0x23b)](_0x57d826);if(_0x16fd93===_0x57d826)return null;_0x57d826=_0x16fd93;}}function runNpmInstall(_0x5a0d69,_0x42f64e){const _0x29cc23=a89_0x17f19e;console[_0x29cc23(0x21d)]('*\x20'+['npm',..._0x5a0d69][_0x29cc23(0x20d)]('\x20'));const _0x426fae=execaSync('npm',_0x5a0d69,{'cwd':process['cwd'](),'stdio':'pipe','env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0xd31c72=_0x426fae[_0x29cc23(0x1f0)]?String(_0x426fae['stderr'])[_0x29cc23(0x1e2)]():'',_0x1ec5ea=_0x426fae[_0x29cc23(0x1fd)]?String(_0x426fae[_0x29cc23(0x1fd)])[_0x29cc23(0x1e2)]():'';if(!_0x42f64e){if(_0x1ec5ea)process['stdout'][_0x29cc23(0x21f)](_0x1ec5ea+'\x0a');if(_0xd31c72)process[_0x29cc23(0x1f0)][_0x29cc23(0x21f)](_0xd31c72+'\x0a');}if(_0x426fae[_0x29cc23(0x21a)]===0x0)return{'ok':!![]};const _0x5cba09=_0xd31c72||_0x1ec5ea||_0x426fae[_0x29cc23(0x232)]||'exit\x20'+(_0x426fae[_0x29cc23(0x21a)]??'unknown');return{'ok':![],'error':_0x5cba09};}function isNpmPrefixPermissionError(_0x4e75cf){const _0x4aad02=a89_0x17f19e;return Boolean(_0x4e75cf&&/\b(?:EACCES|EPERM)\b/[_0x4aad02(0x203)](_0x4e75cf));}function repairCurrentBuiltinSkill(_0x2869bf){const _0x59af77=a89_0x17f19e;console[_0x59af77(0x21d)](_0x59af77(0x1fc));const _0x4e2b2d=installBuiltinSkill({'stdio':_0x2869bf?_0x59af77(0x1e8):_0x59af77(0x226)});if(_0x4e2b2d['ok']){console[_0x59af77(0x21d)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x4e2b2d[_0x59af77(0x1ed)]+_0x59af77(0x220));return;}throw CliErrors[_0x59af77(0x229)](_0x59af77(0x22f)+(_0x4e2b2d[_0x59af77(0x230)]||_0x59af77(0x1f5))+_0x59af77(0x1e5)+(_0x4e2b2d['error']||_0x59af77(0x228)),_0x59af77(0x239)+_0x4e2b2d[_0x59af77(0x1e7)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x59af77(0x20a));}function verifyUpdatedBuiltinSkill(_0xb8535f){const _0x283c3f=a89_0x17f19e;console[_0x283c3f(0x21d)](_0x283c3f(0x1fc));const _0x594230=inspectInstalledBuiltinSkillVersion(_0xb8535f);if(_0x594230['state']==='current'){console[_0x283c3f(0x21d)](_0x283c3f(0x22a)+_0xb8535f+_0x283c3f(0x220));return;}const _0x497376=_0x594230[_0x283c3f(0x1ed)]?'expected\x20'+_0xb8535f+_0x283c3f(0x215)+_0x594230[_0x283c3f(0x1ed)]:_0x283c3f(0x1e3)+_0xb8535f+_0x283c3f(0x200)+_0x594230[_0x283c3f(0x1f6)],_0x16b97d=_0x594230[_0x283c3f(0x22d)]?_0x497376+':\x20'+_0x594230[_0x283c3f(0x22d)]:_0x497376;throw CliErrors['apiError'](_0x283c3f(0x22c)+_0xb8535f+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x16b97d,'Run:\x20'+_0x594230[_0x283c3f(0x1e7)]+_0x283c3f(0x1fb)+CLI_BIN_NAME+_0x283c3f(0x20a));}async function execute(_0x48548d){const _0x163322=a89_0x17f19e;await validateUpdateFlags(_0x48548d);const _0x4e58ce=getCliVersion();console[_0x163322(0x21d)](_0x163322(0x21c)+_0x4e58ce),console[_0x163322(0x21d)]('Checking\x20npm\x20dist-tags...');const _0x3fee23=await resolveTargetVersion(_0x48548d);if(!_0x3fee23){const _0x37e503=_0x48548d[_0x163322(0x207)](_0x163322(0x222))?_0x163322(0x222):_0x163322(0x212),_0x1facda='Unable\x20to\x20resolve\x20'+_0x37e503+_0x163322(0x231);throw CliErrors[_0x163322(0x229)](_0x1facda,_0x163322(0x217)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x37e503);}const _0x55a56a=[_0x4e58ce,_0x3fee23[_0x163322(0x208)]][_0x163322(0x223)](_0x3e81f2=>!a89_0x5c8187[_0x163322(0x1f1)](_0x3e81f2));if(_0x55a56a){const _0x41530b=_0x163322(0x238)+_0x55a56a+'.';throw CliErrors[_0x163322(0x229)](_0x41530b,_0x163322(0x1ef)+LOVRABET_NPM_PACKAGE_NAME+'\x20dist-tags,\x20then\x20retry.');}if(!shouldInstallTarget(_0x4e58ce,_0x3fee23)){const _0x5a2516=_0x3fee23['source']===_0x163322(0x208)?_0x163322(0x205)+_0x3fee23[_0x163322(0x208)]+').':_0x163322(0x21e)+_0x3fee23['version']+').';return console['log'](_0x5a2516),repairCurrentBuiltinSkill(_0x48548d[_0x163322(0x23a)]),{'ok':!![]};}console[_0x163322(0x21d)](_0x163322(0x214)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x4e58ce+'\x20->\x20'+_0x3fee23[_0x163322(0x208)]);const _0x2282b7=installCliPackage(_0x3fee23[_0x163322(0x208)],_0x48548d['nonInteractive']);if(!_0x2282b7['ok']){const _0x1f92cd=_0x163322(0x22b)+(_0x2282b7[_0x163322(0x1f4)]||_0x163322(0x228));throw CliErrors[_0x163322(0x229)](_0x1f92cd,_0x163322(0x217)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3fee23[_0x163322(0x208)]);}return console[_0x163322(0x21d)](_0x163322(0x221)+_0x3fee23[_0x163322(0x208)]+'.'),console[_0x163322(0x21d)](_0x163322(0x1fe)),verifyUpdatedBuiltinSkill(_0x3fee23[_0x163322(0x208)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a89_0x17f19e(0x224),'description':a89_0x17f19e(0x1e9)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a89_0x4a3caf=a89_0x4ae6;(function(_0x17c6c1,_0x46847d){const _0x10627d=a89_0x4ae6,_0x34eb6a=_0x17c6c1();while(!![]){try{const _0x63286e=-parseInt(_0x10627d(0xef))/0x1*(parseInt(_0x10627d(0xf6))/0x2)+parseInt(_0x10627d(0xda))/0x3+-parseInt(_0x10627d(0x105))/0x4+-parseInt(_0x10627d(0x104))/0x5*(-parseInt(_0x10627d(0xfd))/0x6)+-parseInt(_0x10627d(0xcc))/0x7+parseInt(_0x10627d(0xdc))/0x8+parseInt(_0x10627d(0xed))/0x9*(-parseInt(_0x10627d(0x101))/0xa);if(_0x63286e===_0x46847d)break;else _0x34eb6a['push'](_0x34eb6a['shift']());}catch(_0x1bb2fb){_0x34eb6a['push'](_0x34eb6a['shift']());}}}(a89_0x95d2,0xa6e80));import{fileURLToPath}from'node:url';function a89_0x4ae6(_0x106681,_0x689bf9){_0x106681=_0x106681-0xb0;const _0x95d2b3=a89_0x95d2();let _0x4ae6e4=_0x95d2b3[_0x106681];return _0x4ae6e4;}import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a89_0x3ed1b8 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':a89_0x4a3caf(0xee),'type':a89_0x4a3caf(0xdd),'description':a89_0x4a3caf(0x10a),'default':![]},{'name':'beta','type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':'string','description':a89_0x4a3caf(0x100)}];function getRequestedVersion(_0x65b5ac){const _0x4d735b=a89_0x4a3caf,_0x21be4d=_0x65b5ac[_0x4d735b(0xc8)]('version')[_0x4d735b(0xf0)]();if(_0x21be4d)return _0x21be4d;return String(_0x65b5ac[_0x4d735b(0xc5)]?.[0x0]??'')['trim']();}async function validateUpdateFlags(_0x9bcbec){const _0x26b788=a89_0x4a3caf,_0x33a628=getRequestedVersion(_0x9bcbec),_0x586a7c=[_0x9bcbec['bool'](_0x26b788(0xee))?_0x26b788(0xee):'',_0x9bcbec[_0x26b788(0xe7)](_0x26b788(0xba))?_0x26b788(0xba):'',_0x33a628?'version':''][_0x26b788(0xe3)](Boolean);if(_0x586a7c[_0x26b788(0xe0)]>0x1)throw CliErrors[_0x26b788(0x109)](_0x26b788(0xe2),_0x26b788(0xd6));if(_0x33a628&&!a89_0x3ed1b8[_0x26b788(0xcf)](_0x33a628))throw CliErrors[_0x26b788(0x109)](_0x26b788(0xfb)+_0x33a628,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x2d5f44=a89_0x4a3caf;try{const _0x11fc99=NPM_REGISTRY_BASE_URL+_0x2d5f44(0xd5)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x3f73cc=await fetch(_0x11fc99,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x3f73cc['ok'])return null;const _0x541c6a=await _0x3f73cc['json']();if(!_0x541c6a||typeof _0x541c6a!=='object')return null;return Object[_0x2d5f44(0xfe)](Object[_0x2d5f44(0xb4)](_0x541c6a)[_0x2d5f44(0xe3)](([,_0x344065])=>typeof _0x344065===_0x2d5f44(0xc1)&&_0x344065['trim']())[_0x2d5f44(0xb9)](([_0x210bdb,_0x52e742])=>[_0x210bdb,String(_0x52e742)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0x308f15){const _0x3a12d6=a89_0x4a3caf,_0x75b2e0=getRequestedVersion(_0x308f15);if(_0x75b2e0)return{'version':_0x75b2e0,'source':_0x3a12d6(0xbb)};const _0x36526c=_0x308f15[_0x3a12d6(0xe7)](_0x3a12d6(0xba))?'beta':_0x3a12d6(0xee),_0x46697f=await fetchNpmDistTags(),_0x1aa3c0=_0x46697f?.[_0x36526c];if(!_0x1aa3c0)return null;return{'version':_0x1aa3c0,'source':_0x36526c};}function a89_0x95d2(){const _0xa68484=['fromEntries',',\x20state\x20','Install\x20a\x20specific\x20CLI\x20version','84890JLExCg',']:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','4835jJdXqr','2280548tWNYfL','\x20->\x20','expected\x20','join','validation','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','error','skillVersion','toLowerCase','node_modules','log','entries','@lovrabet\x5clovrabet-cli','source','Run:\x20npm\x20view\x20','Run:\x20','map','beta','version','repairCommand','pipe','test','CLI\x20updated\x20to\x20v','cwd','string','Checking\x20CLI\x20Built-in\x20Skill...','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','@lovrabet/lovrabet-cli','args','Checking\x20npm\x20dist-tags...','includes','str','reason','write','update','7579278YvpdfK',',\x20then\x20verify\x20with:\x20','Update\x20failed:\x20','valid','run','Updating\x20','inherit','\x20doctor','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','/-/package/','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','lib','Unable\x20to\x20resolve\x20','apiError','3966306IzXVPf','unknown','6840080nXgExg','boolean','nonInteractive','\x20is\x20current.','length','win32','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','filter','INSTALL_FAILED','stdout','warn','bool','stderr','dirname','shortMessage','Already\x20on\x20requested\x20version\x20(v','current','999eQopSI','latest','1zDKBuE','trim','basename','state','install','exitCode','Current\x20version:\x20','45830mfhwkn','find','npm','\x20CLI\x20from\x20npm','relative','Invalid\x20version:\x20','Already\x20up\x20to\x20date\x20(v','6978SVXhuW'];a89_0x95d2=function(){return _0xa68484;};return a89_0x95d2();}function shouldInstallTarget(_0x34d6d7,_0x11b3bc){const _0x29ee7b=a89_0x4a3caf;if(_0x11b3bc[_0x29ee7b(0xb6)]===_0x29ee7b(0xbb)||_0x11b3bc['source']==='beta')return!a89_0x3ed1b8['eq'](_0x34d6d7,_0x11b3bc[_0x29ee7b(0xbb)]);return a89_0x3ed1b8['lt'](_0x34d6d7,_0x11b3bc[_0x29ee7b(0xbb)]);}export function installCliPackage(_0x22f045,_0x7df20e,_0x1e3227=resolveCurrentCliNpmPrefix()){const _0xe59c93=a89_0x4a3caf,_0x33c91c=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x22f045,_0x1dbede=[_0xe59c93(0xf3),'-g',_0x33c91c],_0x4464c6=runNpmInstall(_0x1dbede,_0x7df20e);if(_0x4464c6['ok']||!isNpmPrefixPermissionError(_0x4464c6['error']))return _0x4464c6;if(!_0x1e3227||_0x4464c6[_0xe59c93(0x10c)]?.['toLowerCase']()[_0xe59c93(0xc7)](_0x1e3227[_0xe59c93(0xb1)]()))return _0x4464c6;return console[_0xe59c93(0xe6)]('Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20'+_0x1e3227),runNpmInstall([..._0x1dbede,'--prefix',_0x1e3227],_0x7df20e);}export function resolveCurrentCliNpmPrefix(_0x2d0a22=fileURLToPath(import.meta.url),_0x363e66=process['platform']){const _0x13d62=a89_0x4a3caf,_0x3d4762=_0x363e66==='win32'?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x129c41=_0x3d4762[_0x13d62(0xe9)](_0x3d4762['dirname'](_0x3d4762[_0x13d62(0xe9)](_0x2d0a22))),_0x117056=_0x363e66===_0x13d62(0xe1)?_0x13d62(0xb5):_0x13d62(0xc4);let _0x515caf=_0x3d4762[_0x13d62(0xe9)](_0x129c41);while(!![]){if(_0x3d4762['basename'](_0x515caf)===_0x13d62(0xb2)&&_0x3d4762[_0x13d62(0xfa)](_0x515caf,_0x129c41)===_0x117056){const _0x355420=_0x3d4762[_0x13d62(0xe9)](_0x515caf);return _0x3d4762[_0x13d62(0xf1)](_0x355420)===_0x13d62(0xd7)?_0x3d4762['dirname'](_0x355420):_0x355420;}const _0x41a19a=_0x3d4762[_0x13d62(0xe9)](_0x515caf);if(_0x41a19a===_0x515caf)return null;_0x515caf=_0x41a19a;}}function runNpmInstall(_0x49336c,_0x34f51a){const _0x36f12b=a89_0x4a3caf;console[_0x36f12b(0xb3)]('*\x20'+[_0x36f12b(0xf8),..._0x49336c][_0x36f12b(0x108)]('\x20'));const _0x24b424=execaSync(_0x36f12b(0xf8),_0x49336c,{'cwd':process[_0x36f12b(0xc0)](),'stdio':_0x36f12b(0xbd),'env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0x5d5462=_0x24b424[_0x36f12b(0xe8)]?String(_0x24b424[_0x36f12b(0xe8)])[_0x36f12b(0xf0)]():'',_0x3bef20=_0x24b424[_0x36f12b(0xe5)]?String(_0x24b424[_0x36f12b(0xe5)])['trim']():'';if(!_0x34f51a){if(_0x3bef20)process[_0x36f12b(0xe5)][_0x36f12b(0xca)](_0x3bef20+'\x0a');if(_0x5d5462)process[_0x36f12b(0xe8)]['write'](_0x5d5462+'\x0a');}if(_0x24b424[_0x36f12b(0xf4)]===0x0)return{'ok':!![]};const _0x434830=_0x5d5462||_0x3bef20||_0x24b424[_0x36f12b(0xea)]||'exit\x20'+(_0x24b424['exitCode']??_0x36f12b(0xdb));return{'ok':![],'error':_0x434830};}function isNpmPrefixPermissionError(_0x4d9303){const _0x3a3e9f=a89_0x4a3caf;return Boolean(_0x4d9303&&/\b(?:EACCES|EPERM)\b/[_0x3a3e9f(0xbe)](_0x4d9303));}function repairCurrentBuiltinSkill(_0x44fdea){const _0x5c55e9=a89_0x4a3caf;console[_0x5c55e9(0xb3)](_0x5c55e9(0xc2));const _0x167b9d=installBuiltinSkill({'stdio':_0x44fdea?_0x5c55e9(0xbd):_0x5c55e9(0xd2)});if(_0x167b9d['ok']){console[_0x5c55e9(0xb3)](_0x5c55e9(0x103)+_0x167b9d[_0x5c55e9(0xb0)]+_0x5c55e9(0xdf));return;}throw CliErrors[_0x5c55e9(0xd9)](_0x5c55e9(0xd4)+(_0x167b9d['code']||_0x5c55e9(0xe4))+_0x5c55e9(0x102)+(_0x167b9d['error']||_0x5c55e9(0xdb)),_0x5c55e9(0xb8)+_0x167b9d[_0x5c55e9(0xbc)]+_0x5c55e9(0xcd)+CLI_BIN_NAME+_0x5c55e9(0xd3));}function verifyUpdatedBuiltinSkill(_0x201077){const _0x40706e=a89_0x4a3caf;console[_0x40706e(0xb3)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x35e3ba=inspectInstalledBuiltinSkillVersion(_0x201077);if(_0x35e3ba[_0x40706e(0xf2)]===_0x40706e(0xec)){console[_0x40706e(0xb3)](_0x40706e(0x103)+_0x201077+_0x40706e(0xdf));return;}const _0x1db42c=_0x35e3ba[_0x40706e(0xb0)]?_0x40706e(0x107)+_0x201077+',\x20found\x20'+_0x35e3ba[_0x40706e(0xb0)]:_0x40706e(0x107)+_0x201077+_0x40706e(0xff)+_0x35e3ba[_0x40706e(0xf2)],_0x5aa4e4=_0x35e3ba[_0x40706e(0xc9)]?_0x1db42c+':\x20'+_0x35e3ba[_0x40706e(0xc9)]:_0x1db42c;throw CliErrors[_0x40706e(0xd9)](_0x40706e(0xbf)+_0x201077+_0x40706e(0x10b)+_0x5aa4e4,_0x40706e(0xb8)+_0x35e3ba[_0x40706e(0xbc)]+_0x40706e(0xcd)+CLI_BIN_NAME+_0x40706e(0xd3));}async function execute(_0x5a9519){const _0x54ef3a=a89_0x4a3caf;await validateUpdateFlags(_0x5a9519);const _0x29255d=getCliVersion();console[_0x54ef3a(0xb3)](_0x54ef3a(0xf5)+_0x29255d),console[_0x54ef3a(0xb3)](_0x54ef3a(0xc6));const _0x3c0fb9=await resolveTargetVersion(_0x5a9519);if(!_0x3c0fb9){const _0x5b836e=_0x5a9519['bool']('beta')?'beta':'latest',_0x2bc058=_0x54ef3a(0xd8)+_0x5b836e+'\x20version\x20from\x20npm.';throw CliErrors['apiError'](_0x2bc058,'Run:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x5b836e);}const _0x214393=[_0x29255d,_0x3c0fb9[_0x54ef3a(0xbb)]][_0x54ef3a(0xf7)](_0x55393f=>!a89_0x3ed1b8[_0x54ef3a(0xcf)](_0x55393f));if(_0x214393){const _0x2aa552='Version\x20comparison\x20failed:\x20'+_0x214393+'.';throw CliErrors[_0x54ef3a(0xd9)](_0x2aa552,_0x54ef3a(0xb7)+LOVRABET_NPM_PACKAGE_NAME+'\x20dist-tags,\x20then\x20retry.');}if(!shouldInstallTarget(_0x29255d,_0x3c0fb9)){const _0x53f585=_0x3c0fb9[_0x54ef3a(0xb6)]==='version'?_0x54ef3a(0xeb)+_0x3c0fb9[_0x54ef3a(0xbb)]+').':_0x54ef3a(0xfc)+_0x3c0fb9[_0x54ef3a(0xbb)]+').';return console[_0x54ef3a(0xb3)](_0x53f585),repairCurrentBuiltinSkill(_0x5a9519[_0x54ef3a(0xde)]),{'ok':!![]};}console[_0x54ef3a(0xb3)](_0x54ef3a(0xd1)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x29255d+_0x54ef3a(0x106)+_0x3c0fb9[_0x54ef3a(0xbb)]);const _0x1e95a2=installCliPackage(_0x3c0fb9['version'],_0x5a9519[_0x54ef3a(0xde)]);if(!_0x1e95a2['ok']){const _0x5e6b61=_0x54ef3a(0xce)+(_0x1e95a2[_0x54ef3a(0x10c)]||'unknown');throw CliErrors[_0x54ef3a(0xd9)](_0x5e6b61,'Run:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3c0fb9[_0x54ef3a(0xbb)]);}return console['log']('Updated\x20to\x20v'+_0x3c0fb9[_0x54ef3a(0xbb)]+'.'),console[_0x54ef3a(0xb3)](_0x54ef3a(0xc3)),verifyUpdatedBuiltinSkill(_0x3c0fb9[_0x54ef3a(0xbb)]),{'ok':!![]};}export const updateDefinition={'service':a89_0x4a3caf(0xcb),'command':a89_0x4a3caf(0xd0),'description':'Update\x20the\x20'+CLI_BIN_NAME+a89_0x4a3caf(0xf9),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x1dc021=a90_0x1efd;function a90_0x1efd(_0x28f06c,_0x399398){_0x28f06c=_0x28f06c-0x97;const _0x4debb8=a90_0x4deb();let _0x1efdc9=_0x4debb8[_0x28f06c];return _0x1efdc9;}(function(_0xb41f1d,_0x54d7bf){const _0x5dca2f=a90_0x1efd,_0x50f8d0=_0xb41f1d();while(!![]){try{const _0x414828=parseInt(_0x5dca2f(0xb1))/0x1+-parseInt(_0x5dca2f(0xa5))/0x2*(parseInt(_0x5dca2f(0xa6))/0x3)+parseInt(_0x5dca2f(0x9d))/0x4+-parseInt(_0x5dca2f(0x9c))/0x5+-parseInt(_0x5dca2f(0xb5))/0x6+parseInt(_0x5dca2f(0xb7))/0x7+parseInt(_0x5dca2f(0xab))/0x8*(-parseInt(_0x5dca2f(0xa1))/0x9);if(_0x414828===_0x54d7bf)break;else _0x50f8d0['push'](_0x50f8d0['shift']());}catch(_0x3ea2f9){_0x50f8d0['push'](_0x50f8d0['shift']());}}}(a90_0x4deb,0x5d7c7));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a90_0x1dc021(0x9b),SUPPORTED_PROVIDERS=[a90_0x1dc021(0x9f)];function a90_0x4deb(){const _0x110d9c=['484698iVwMjb','user-account','3848460xFxiGk','External\x20account\x20provider','trim','str','apiError','bind','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','20715lYHlZu','262320BgODHZ','string','dingtalk','validation','18uzpsIJ','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','External\x20account\x20ID\x20for\x20the\x20selected\x20provider','(empty)','225838VyPwHt','3eMCKQx','POST','account-id','Unsupported\x20provider:\x20','--account-id\x20cannot\x20be\x20empty.','2352784onIvpJ','write','provider','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.','join','Binds\x20the\x20platform\x20user\x20of\x20the\x20current\x20AccessKey\x20to\x20the\x20given\x20collaboration-provider\x20account.\x20An\x20existing\x20bind\x20for\x20the\x20same\x20provider\x20may\x20be\x20replaced.','553600vMpoaB','Pass\x20one\x20of:\x20','includes','toLowerCase'];a90_0x4deb=function(){return _0x110d9c;};return a90_0x4deb();}function readBindingInput(_0x1e6723){const _0x327d01=a90_0x1dc021,_0x28b7fe=_0x1e6723[_0x327d01(0x98)](_0x327d01(0xad))[_0x327d01(0x97)]()[_0x327d01(0xb4)]();if(!SUPPORTED_PROVIDERS[_0x327d01(0xb3)](_0x28b7fe))throw CliErrors[_0x327d01(0xa0)](_0x327d01(0xa9)+(_0x28b7fe||_0x327d01(0xa4))+'.',_0x327d01(0xb2)+SUPPORTED_PROVIDERS[_0x327d01(0xaf)](',\x20')+'.');const _0x4575b8=_0x1e6723[_0x327d01(0x98)](_0x327d01(0xa8))[_0x327d01(0x97)]();if(!_0x4575b8)throw CliErrors[_0x327d01(0xa0)](_0x327d01(0xaa),_0x327d01(0xae));return{'provider':_0x28b7fe,'accountId':_0x4575b8};}function buildBindingData(_0x3ce534,_0x343dfe,_0x284c41){return{'operation':'bind','selector':{'provider':_0x3ce534,'accountId':_0x343dfe},'before':null,'after':{'provider':_0x3ce534,'accountId':_0x343dfe,'bound':!![]},'dryRun':_0x284c41,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':a90_0x1dc021(0xb6),'command':a90_0x1dc021(0x9a),'description':a90_0x1dc021(0xa2),'risk':a90_0x1dc021(0xac),'confirmationDescription':a90_0x1dc021(0xb0),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':a90_0x1dc021(0xad),'type':a90_0x1dc021(0x9e),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':a90_0x1dc021(0xb8)},{'name':a90_0x1dc021(0xa8),'type':a90_0x1dc021(0x9e),'required':!![],'description':a90_0x1dc021(0xa3)}],async 'validate'(_0x3158b1){readBindingInput(_0x3158b1);},async 'dryRun'(_0x35e05b){const _0x34833f=a90_0x1dc021,{provider:_0x2b11f7,accountId:_0x58a5fa}=readBindingInput(_0x35e05b);return{...buildBindingData(_0x2b11f7,_0x58a5fa,!![]),'method':_0x34833f(0xa7),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x2b11f7,'accountId':_0x58a5fa}};},async 'execute'(_0x5b8b68){const _0x5b98d0=a90_0x1dc021,{provider:_0x14bef4,accountId:_0x38c74e}=readBindingInput(_0x5b8b68),_0x2d0949=await bindExternalUserAccount(_0x14bef4,_0x38c74e);if(_0x2d0949!==!![])throw CliErrors[_0x5b98d0(0x99)]('External\x20account\x20binding\x20was\x20not\x20confirmed.','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.');return{'ok':!![],'data':buildBindingData(_0x14bef4,_0x38c74e,![]),'message':'Bound\x20current\x20user\x20to\x20external\x20provider\x20account.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x8ea1cc,_0x22db48){const _0x236993=a91_0x5769,_0x218c4f=_0x8ea1cc();while(!![]){try{const _0x419f1e=parseInt(_0x236993(0x17e))/0x1*(parseInt(_0x236993(0x178))/0x2)+-parseInt(_0x236993(0x17a))/0x3+parseInt(_0x236993(0x17b))/0x4+parseInt(_0x236993(0x180))/0x5+parseInt(_0x236993(0x17d))/0x6*(parseInt(_0x236993(0x179))/0x7)+-parseInt(_0x236993(0x17c))/0x8+-parseInt(_0x236993(0x17f))/0x9;if(_0x419f1e===_0x22db48)break;else _0x218c4f['push'](_0x218c4f['shift']());}catch(_0x159453){_0x218c4f['push'](_0x218c4f['shift']());}}}(a91_0x2e02,0xa3212));function a91_0x2e02(){const _0x526b56=['25837PfOEno','2434137SCZAXC','1901064tOEHAE','1830824CiHbrs','48TKjxSF','2341TPekPd','5945184pNBXeV','6383005IcUWlN','502vlkTTY'];a91_0x2e02=function(){return _0x526b56;};return a91_0x2e02();}function a91_0x5769(_0x37587b,_0x385b70){_0x37587b=_0x37587b-0x178;const _0x2e02fa=a91_0x2e02();let _0x576939=_0x2e02fa[_0x37587b];return _0x576939;}import{bindUserAccount}from'../../commands/user-account/bind.js';export const userAccountDefinitions=[bindUserAccount];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x537b60=a92_0x35ca;(function(_0x4a13cc,_0x356c2e){const _0x362067=a92_0x35ca,_0x59e586=_0x4a13cc();while(!![]){try{const _0x37f3a6=-parseInt(_0x362067(0x118))/0x1+-parseInt(_0x362067(0xf0))/0x2*(-parseInt(_0x362067(0xea))/0x3)+parseInt(_0x362067(0xe9))/0x4*(parseInt(_0x362067(0x10d))/0x5)+-parseInt(_0x362067(0xe0))/0x6+-parseInt(_0x362067(0xeb))/0x7*(-parseInt(_0x362067(0xdd))/0x8)+parseInt(_0x362067(0xe1))/0x9*(-parseInt(_0x362067(0x108))/0xa)+-parseInt(_0x362067(0x11c))/0xb*(-parseInt(_0x362067(0xe3))/0xc);if(_0x37f3a6===_0x356c2e)break;else _0x59e586['push'](_0x59e586['shift']());}catch(_0x271f94){_0x59e586['push'](_0x59e586['shift']());}}}(a92_0x3c87,0x64b19));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':a92_0x537b60(0xe4),'description':a92_0x537b60(0xec)},{'name':a92_0x537b60(0xe7),'type':a92_0x537b60(0xe4),'description':a92_0x537b60(0x10e)},{'name':a92_0x537b60(0xf5),'type':'string','description':'Target\x20environment','enum':[...RUNTIME_ENV_VALUES]}];function a92_0x35ca(_0x11415c,_0x5bdf7f){_0x11415c=_0x11415c-0xdc;const _0x3c878e=a92_0x3c87();let _0x35caac=_0x3c878e[_0x11415c];return _0x35caac;}async function executeWorkspaceUse(_0x469818,_0x5e58ba){const _0x346b8c=a92_0x537b60,_0x547451=_0x469818[_0x346b8c(0x10f)]('app')['trim'](),_0x28d98b=_0x469818[_0x346b8c(0x10f)]('appcode')[_0x346b8c(0xf3)](),_0x4c2f44=_0x469818[_0x346b8c(0x10f)](_0x346b8c(0xf5))['trim'](),_0xb4edbe=resolveWorkspaceEnv(_0x4c2f44||_0x469818[_0x346b8c(0xf8)]||DEFAULT_CONFIG_VALUES[_0x346b8c(0xf5)]);if(!_0x547451&&!_0x28d98b)throw CliErrors[_0x346b8c(0xfd)](_0x346b8c(0xfa),_0x346b8c(0xe5)+CLI_BIN_NAME+'\x20workspace\x20'+_0x5e58ba+_0x346b8c(0x110)+CLI_BIN_NAME+_0x346b8c(0xde)+_0x5e58ba+_0x346b8c(0x113));if(_0x547451&&_0x28d98b)throw CliErrors[_0x346b8c(0xfd)](_0x346b8c(0x122),_0x346b8c(0xf6));const _0x228d9e=resolveWriteConfigPath('project'),_0x4e3d77=readConfigFile(_0x228d9e);assertWorkspaceCommandState(_0x5e58ba,_0x4e3d77);const _0x58d7b2=_0x28d98b||await resolveRemoteAppCode({'command':_0x5e58ba,'appName':_0x547451,'env':_0xb4edbe,'accessKey':_0x469818[_0x346b8c(0x106)]});return writeWorkspaceConfig({'command':_0x5e58ba,'appName':_0x547451,'appcode':_0x58d7b2,'env':_0xb4edbe,'shouldWriteEnv':!!_0x4c2f44,'accessKey':_0x469818['accessKey']},_0x228d9e,_0x4e3d77),{'ok':!![],'data':{'configPath':_0x228d9e,'app':_0x547451||null,'appcode':_0x58d7b2,'env':_0x4c2f44?_0xb4edbe:null,'accessKeyWritten':![],'command':_0x346b8c(0x100)+_0x5e58ba},'message':buildWorkspaceMessage(_0x228d9e,_0x547451,_0x58d7b2,_0x4c2f44?_0xb4edbe:undefined)};}async function resolveRemoteAppCode(_0x2eb533){const _0x4548c1=a92_0x537b60;if(!_0x2eb533['accessKey'])throw CliErrors[_0x4548c1(0xf2)](_0x4548c1(0xe2)+CLI_BIN_NAME+_0x4548c1(0xde)+_0x2eb533['command']+'.');const {setActiveAK:_0x113eb1}=await import(_0x4548c1(0x10a)),{getRemoteAppList:_0x5e2a04}=await import(_0x4548c1(0x109));_0x113eb1(_0x2eb533[_0x4548c1(0x106)]);const _0x2ff608=await _0x5e2a04({'env':_0x2eb533[_0x4548c1(0xf5)],'accessKey':_0x2eb533['accessKey'],'noCache':![]}),_0x267f89=findAppByName(_0x2ff608[_0x4548c1(0x107)],_0x2eb533['appName']);if(_0x267f89&&!isRuntimeAccessibleApp(_0x267f89))throw runtimeInaccessibleAppError(_0x267f89,'\x22'+_0x2eb533['appName']+'\x22');const _0x22d6b2=_0x267f89?.[_0x4548c1(0xdf)]?.[_0x4548c1(0xf3)]();if(_0x22d6b2)return _0x22d6b2;const _0x27d3d9=_0x2ff608[_0x4548c1(0x107)][_0x4548c1(0x121)](_0xe260f7=>_0xe260f7[_0x4548c1(0xfb)])[_0x4548c1(0x115)](Boolean),_0x27ffc6=_0x27d3d9['length']?_0x4548c1(0x11b)+Array[_0x4548c1(0x116)](new Set(_0x27d3d9))[_0x4548c1(0x104)](',\x20')+'.':_0x4548c1(0x10b)+CLI_BIN_NAME+_0x4548c1(0xf7);throw CliErrors[_0x4548c1(0xfd)](_0x4548c1(0x11d)+_0x2eb533['appName']+_0x4548c1(0x11a),_0x27ffc6);}function writeWorkspaceConfig(_0x2cf5f9,_0x50f719,_0x4308a3){const _0xfa2299=a92_0x537b60;_0x2cf5f9[_0xfa2299(0xe6)]&&(_0x4308a3['env']=_0x2cf5f9[_0xfa2299(0xf5)]);if(_0x2cf5f9[_0xfa2299(0xfb)]){const _0x23111d=isRecord(_0x4308a3['apps'])?{..._0x4308a3[_0xfa2299(0x117)]}:{},_0x48b933=isRecord(_0x23111d[_0x2cf5f9[_0xfa2299(0xfb)]])?_0x23111d[_0x2cf5f9[_0xfa2299(0xfb)]]:{};return _0x23111d[_0x2cf5f9[_0xfa2299(0xfb)]]={..._0x48b933,'appcode':_0x2cf5f9['appcode']},_0x4308a3[_0xfa2299(0x117)]=_0x23111d,_0x4308a3[_0xfa2299(0xee)]=_0x2cf5f9[_0xfa2299(0xfb)],delete _0x4308a3[_0xfa2299(0xe7)],delete _0x4308a3['app'],writeAndReturn(_0x50f719,_0x4308a3);}return _0x4308a3[_0xfa2299(0xe7)]=_0x2cf5f9[_0xfa2299(0xe7)],delete _0x4308a3[_0xfa2299(0xee)],delete _0x4308a3[_0xfa2299(0xed)],writeAndReturn(_0x50f719,_0x4308a3);}function a92_0x3c87(){const _0x147f0f=['Missing\x20workspace\x20app\x20selector.','appName','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','validation','init','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','workspace\x20','length','includes','Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','join','Invalid\x20env\x20\x22','accessKey','items','50GuQZrJ','../../commands/app/remote-source.js','../../core/api-client.js','Run\x20`','\x0aDefault\x20app:\x20','55sZBVfx','App\x20code\x20to\x20bind\x20directly','str','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','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.','object','\x20--appcode\x20<code>\x20[--env\x20daily]','\x22.\x20Allowed:\x20','filter','from','apps','798760kbatlw','\x0aAccessKey:\x20not\x20written','\x22\x20not\x20found.','Available\x20apps:\x20','649396WGtFjz','App\x20\x22','Workspace\x20app\x20context\x20is\x20already\x20initialized.','Workspace\x20configured.\x0aConfig\x20file:\x20','isArray','map','Conflicting\x20workspace\x20app\x20selectors.','\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`','13696Vkogxx','\x20workspace\x20','appCode','1537788qGrSfr','951651ubUoTI','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','228CPQprn','string','Usage:\x20','shouldWriteEnv','appcode','Updates\x20the\x20app\x20binding\x20already\x20present\x20in\x20the\x20current\x20working\x20directory\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','151824yaKAro','87846KGckvh','791Skupve','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','app','defaultApp','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','18liEoAv','workspace','authRequired','trim','Use\x20`','env','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','envName','use'];a92_0x3c87=function(){return _0x147f0f;};return a92_0x3c87();}function writeAndReturn(_0x16c3ef,_0xb8bb70){return writeConfigFile(_0x16c3ef,_0xb8bb70),_0x16c3ef;}function resolveWorkspaceEnv(_0x361c0c){const _0x2f151d=a92_0x537b60;if(RUNTIME_ENV_VALUES[_0x2f151d(0x102)](_0x361c0c))return _0x361c0c;throw CliErrors['validation'](_0x2f151d(0x105)+_0x361c0c+_0x2f151d(0x114)+RUNTIME_ENV_VALUES[_0x2f151d(0x104)](',\x20'));}function buildWorkspaceMessage(_0x58848d,_0x4ffa71,_0x362a9f,_0x409dcb){const _0x7d756b=a92_0x537b60,_0x433bd1=_0x4ffa71?_0x4ffa71+'\x20('+_0x362a9f+')':_0x362a9f,_0xa8e1d7=_0x409dcb?'\x0aEnv:\x20'+_0x409dcb:'';return _0x7d756b(0x11f)+_0x58848d+_0x7d756b(0x10c)+_0x433bd1+_0xa8e1d7+_0x7d756b(0x119);}function isRecord(_0x3ac76d){const _0x176ea2=a92_0x537b60;return typeof _0x3ac76d===_0x176ea2(0x112)&&_0x3ac76d!==null&&!Array[_0x176ea2(0x120)](_0x3ac76d);}function hasWorkspaceAppBinding(_0x43b38f){const _0x3923ef=a92_0x537b60;if(typeof _0x43b38f[_0x3923ef(0xe7)]===_0x3923ef(0xe4)&&_0x43b38f[_0x3923ef(0xe7)][_0x3923ef(0xf3)]()[_0x3923ef(0x101)]>0x0)return!![];if(typeof _0x43b38f[_0x3923ef(0xee)]!==_0x3923ef(0xe4)||!_0x43b38f['defaultApp'][_0x3923ef(0xf3)]())return![];if(!isRecord(_0x43b38f[_0x3923ef(0x117)]))return![];const _0x113f2b=_0x43b38f[_0x3923ef(0x117)][_0x43b38f['defaultApp'][_0x3923ef(0xf3)]()];return isRecord(_0x113f2b)&&typeof _0x113f2b[_0x3923ef(0xe7)]===_0x3923ef(0xe4)&&_0x113f2b[_0x3923ef(0xe7)][_0x3923ef(0xf3)]()[_0x3923ef(0x101)]>0x0;}function assertWorkspaceCommandState(_0x176594,_0x551ecc){const _0x193526=a92_0x537b60,_0x4cfd57=hasWorkspaceAppBinding(_0x551ecc);if(_0x176594===_0x193526(0xfe)&&_0x4cfd57)throw CliErrors[_0x193526(0xfd)](_0x193526(0x11e),_0x193526(0xf4)+CLI_BIN_NAME+_0x193526(0xfc)+CLI_BIN_NAME+_0x193526(0xff));if(_0x176594===_0x193526(0xf9)&&!_0x4cfd57)throw CliErrors[_0x193526(0xfd)]('Workspace\x20app\x20context\x20is\x20not\x20initialized.',_0x193526(0x10b)+CLI_BIN_NAME+_0x193526(0xdc)+CLI_BIN_NAME+_0x193526(0xef));}function makeWorkspaceCommand(_0x4a40e5){const _0x173e7d=a92_0x537b60;return{'service':_0x173e7d(0xf1),'command':_0x4a40e5,'description':_0x4a40e5===_0x173e7d(0xfe)?'Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet':_0x173e7d(0x103),'risk':'write','confirmationDescription':_0x4a40e5===_0x173e7d(0xfe)?_0x173e7d(0x111):_0x173e7d(0xe8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x4a9c4c){return executeWorkspaceUse(_0x4a9c4c,_0x4a40e5);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a92_0x537b60(0xfe)),makeWorkspaceCommand(a92_0x537b60(0xf9))];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x195ecd=a93_0x577e;(function(_0x4bf521,_0x49f5fe){const _0x22a300=a93_0x577e,_0x417fb8=_0x4bf521();while(!![]){try{const _0x5b10ab=parseInt(_0x22a300(0xb8))/0x1*(parseInt(_0x22a300(0xb2))/0x2)+-parseInt(_0x22a300(0xb1))/0x3+parseInt(_0x22a300(0x87))/0x4+-parseInt(_0x22a300(0xbb))/0x5*(-parseInt(_0x22a300(0x97))/0x6)+-parseInt(_0x22a300(0x89))/0x7*(parseInt(_0x22a300(0x96))/0x8)+-parseInt(_0x22a300(0xaa))/0x9+parseInt(_0x22a300(0x8c))/0xa;if(_0x5b10ab===_0x49f5fe)break;else _0x417fb8['push'](_0x417fb8['shift']());}catch(_0xd31d6e){_0x417fb8['push'](_0x417fb8['shift']());}}}(a93_0x8529,0x77745));import{existsSync,readFileSync}from'node:fs';function a93_0x577e(_0xbdd79f,_0x3ea55e){_0xbdd79f=_0xbdd79f-0x82;const _0x8529be=a93_0x8529();let _0x577ead=_0x8529be[_0xbdd79f];return _0x577ead;}import{isAbsolute,resolve}from'node:path';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';function a93_0x8529(){const _0x550740=['user-domain','userDomain','\x22\x20is\x20not\x20a\x20valid\x20URL.','string','host',':\x20\x22','enterprise-v1','Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.','isArray','domains','6576687AkgBgP','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','apiDomain','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','str','skillDomain','platformDomain','1488249OhrGiu','2470SWcdnl','kbDomain','kbServiceDomain',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','includes','default','658RejPqP','legacy','Enterprise\x20','5aKxmfv','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','runtime-domain','password','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','join','https:','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','username','kb-service-domain','search','trim','utf8',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','727100qgOInj','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','287jiXFel','Domain\x20config\x20file\x20not\x20found:\x20','pathname','11280800gCnyyn','skill-domain','length','Invalid\x20domain\x20config\x20JSON:\x20','\x20and\x20has\x20no\x20default.','lovrabet-cli','keys','runtimeDomain','object','protocol','95696xtFrVy','504408UWBWER',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','api-domain','filter','\x22\x20and\x20kind\x20\x22','validation','skillHubDomain','Invalid\x20','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.'];a93_0x8529=function(){return _0x550740;};return a93_0x8529();}export const DOMAIN_CONFIG_FIELDS=['userDomain','apiDomain',a93_0x195ecd(0x93),a93_0x195ecd(0xaf),'kbServiceDomain'];const DOMAIN_FLAGS={'userDomain':a93_0x195ecd(0xa0),'apiDomain':a93_0x195ecd(0x99),'runtimeDomain':a93_0x195ecd(0xbe),'skillDomain':a93_0x195ecd(0x8d),'kbServiceDomain':a93_0x195ecd(0x82)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a93_0x195ecd(0xa4),'agentDomain',a93_0x195ecd(0xb0),a93_0x195ecd(0x9d),a93_0x195ecd(0xb3)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a93_0x195ecd(0xa1),'apiDomain':a93_0x195ecd(0xac),'runtimeDomain':a93_0x195ecd(0x93),'skillDomain':a93_0x195ecd(0xaf),'kbServiceDomain':a93_0x195ecd(0xb4)},ROUTING_CONSUMER=a93_0x195ecd(0x91);export function normalizeDomainOrigin(_0x58fe61,_0x116c8e){const _0x465695=a93_0x195ecd;if(typeof _0x116c8e!==_0x465695(0xa3)||!_0x116c8e[_0x465695(0x84)]())throw CliErrors[_0x465695(0x9c)](_0x465695(0x9e)+_0x58fe61+_0x465695(0x98));let _0x2bebf5;try{_0x2bebf5=new URL(_0x116c8e[_0x465695(0x84)]());}catch{throw CliErrors[_0x465695(0x9c)](_0x465695(0x9e)+_0x58fe61+_0x465695(0xa5)+_0x116c8e+_0x465695(0xa2));}if(_0x2bebf5['protocol']!==_0x465695(0xc2)||_0x2bebf5[_0x465695(0xc4)]||_0x2bebf5[_0x465695(0xbf)]||_0x2bebf5[_0x465695(0x8b)]!=='/'&&_0x2bebf5[_0x465695(0x8b)]!==''||_0x2bebf5[_0x465695(0x83)]||_0x2bebf5['hash'])throw CliErrors[_0x465695(0x9c)](_0x465695(0x9e)+_0x58fe61+_0x465695(0xb5),_0x465695(0xbc));return _0x2bebf5['origin'];}export function normalizeRoutingDomainValue(_0x96d465,_0x3b9e71){const _0x2ede10=a93_0x195ecd;if(typeof _0x3b9e71===_0x2ede10(0xa3))return normalizeDomainOrigin(_0x96d465,_0x3b9e71);if(!_0x3b9e71||typeof _0x3b9e71!=='object'||Array[_0x2ede10(0xa8)](_0x3b9e71))throw CliErrors[_0x2ede10(0x9c)](_0x2ede10(0x9e)+_0x96d465+_0x2ede10(0x86));const _0x3de8c5=_0x3b9e71,_0x5b4d4d=_0x3de8c5[ROUTING_CONSUMER]??_0x3de8c5[_0x2ede10(0xb7)];if(_0x5b4d4d===undefined)throw CliErrors['validation'](_0x2ede10(0xba)+_0x96d465+'\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20'+ROUTING_CONSUMER+_0x2ede10(0x90));return normalizeDomainOrigin(_0x96d465,_0x5b4d4d);}export function resolveEnterpriseRoutingConfig(_0x1bee73){const _0x2462bb=a93_0x195ecd;if(_0x1bee73===undefined)return undefined;if(!_0x1bee73||typeof _0x1bee73!==_0x2462bb(0x94)||Array[_0x2462bb(0xa8)](_0x1bee73))throw CliErrors['validation'](_0x2462bb(0xa7));return parseEnterpriseRoutingManifest(_0x1bee73)['domains'];}export function readDomainConfigInput(_0x5a7a15){const _0x2160ba=a93_0x195ecd,_0x2ecdb9=isAbsolute(_0x5a7a15)?_0x5a7a15:resolve(process['cwd'](),_0x5a7a15);if(!existsSync(_0x2ecdb9))throw CliErrors[_0x2160ba(0x9c)](_0x2160ba(0x8a)+_0x2ecdb9);let _0xbd3d30;try{_0xbd3d30=JSON['parse'](readFileSync(_0x2ecdb9,_0x2160ba(0x85)));}catch{throw CliErrors[_0x2160ba(0x9c)](_0x2160ba(0x8f)+_0x2ecdb9);}if(!_0xbd3d30||typeof _0xbd3d30!=='object'||Array['isArray'](_0xbd3d30))throw CliErrors[_0x2160ba(0x9c)](_0x2160ba(0xc0));const _0x252f80=_0xbd3d30;if('protocol'in _0x252f80)return parseEnterpriseRoutingManifest(_0x252f80);const _0x4342a7=Object[_0x2160ba(0x92)](_0x252f80)[_0x2160ba(0x9a)](_0x52bde0=>!DOMAIN_CONFIG_FIELDS[_0x2160ba(0xb6)](_0x52bde0));if(_0x4342a7[_0x2160ba(0x8e)]>0x0)throw CliErrors[_0x2160ba(0x9c)]('Unsupported\x20domain\x20config\x20field(s):\x20'+_0x4342a7[_0x2160ba(0xc1)](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS[_0x2160ba(0xc1)](',\x20'));const _0x453d45={};for(const _0x170a13 of DOMAIN_CONFIG_FIELDS){_0x252f80[_0x170a13]!==undefined&&(_0x453d45[_0x170a13]=normalizeDomainOrigin(_0x170a13,_0x252f80[_0x170a13]));}if(Object[_0x2160ba(0x92)](_0x453d45)[_0x2160ba(0x8e)]===0x0)throw CliErrors[_0x2160ba(0x9c)](_0x2160ba(0x88));return{'mode':_0x2160ba(0xb9),'domains':_0x453d45};}export function readDomainConfig(_0x539f38){return readDomainConfigInput(_0x539f38)['domains'];}export function resolveDomainConfigInput(_0x29cd40){const _0x5e3ef1=a93_0x195ecd,_0x22b0f9=(_0x29cd40[_0x5e3ef1(0xae)]('domain-config')||'')[_0x5e3ef1(0x84)](),_0x1b3592=_0x22b0f9?readDomainConfigInput(_0x22b0f9):{'mode':_0x5e3ef1(0xb9),'domains':{}},_0x22bcba=DOMAIN_CONFIG_FIELDS[_0x5e3ef1(0x9a)](_0x26f9e6=>Boolean((_0x29cd40[_0x5e3ef1(0xae)](DOMAIN_FLAGS[_0x26f9e6])||'')[_0x5e3ef1(0x84)]()));if(_0x1b3592['mode']===_0x5e3ef1(0xa6)&&_0x22bcba['length']>0x0)throw CliErrors[_0x5e3ef1(0x9c)](_0x5e3ef1(0xab),_0x5e3ef1(0xad));for(const _0x4c5d2f of DOMAIN_CONFIG_FIELDS){const _0x4aeabe=(_0x29cd40[_0x5e3ef1(0xae)](DOMAIN_FLAGS[_0x4c5d2f])||'')[_0x5e3ef1(0x84)]();if(_0x4aeabe)_0x1b3592['domains'][_0x4c5d2f]=normalizeDomainOrigin(_0x4c5d2f,_0x4aeabe);}return _0x1b3592;}export function resolveDomainFlags(_0x44354f){return resolveDomainConfigInput(_0x44354f)['domains'];}export function parseEnterpriseRoutingManifest(_0x20e704){const _0x3d5eb4=a93_0x195ecd;if(_0x20e704[_0x3d5eb4(0x95)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x20e704['kind']!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x3d5eb4(0x9c)](_0x3d5eb4(0xc3)+ENTERPRISE_ROUTING_PROTOCOL+_0x3d5eb4(0x9b)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x20e704[_0x3d5eb4(0xa9)]||typeof _0x20e704[_0x3d5eb4(0xa9)]!==_0x3d5eb4(0x94)||Array[_0x3d5eb4(0xa8)](_0x20e704[_0x3d5eb4(0xa9)]))throw CliErrors[_0x3d5eb4(0x9c)](_0x3d5eb4(0x9f));const _0x38b555=_0x20e704[_0x3d5eb4(0xa9)],_0x536477=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x3d5eb4(0x9a)](_0x128026=>_0x38b555[_0x128026]===undefined);if(_0x536477['length']>0x0)throw CliErrors['validation'](_0x3d5eb4(0xbd)+_0x536477[_0x3d5eb4(0xc1)](',\x20'));const _0x24a13a={},_0x352aad={};for(const _0x433555 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x7c2b97=_0x38b555[_0x433555];if(_0x7c2b97===undefined)continue;const _0x50a7f3=normalizeRoutingDomainValue(_0x433555,_0x7c2b97);_0x24a13a[_0x433555]=_0x50a7f3;const _0x591dc8=ENTERPRISE_TO_LOCAL_FIELD[_0x433555];_0x591dc8&&(_0x352aad[_0x591dc8]=_0x50a7f3);}return{'mode':_0x3d5eb4(0xa6),'domains':_0x352aad,'manifestDomains':_0x24a13a};}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x36b1b3=a94_0x4f42;(function(_0x126175,_0x4e1a9c){const _0x53b284=a94_0x4f42,_0x1abc46=_0x126175();while(!![]){try{const _0x3e2113=parseInt(_0x53b284(0x6e))/0x1*(parseInt(_0x53b284(0x72))/0x2)+parseInt(_0x53b284(0x87))/0x3+parseInt(_0x53b284(0x8b))/0x4*(parseInt(_0x53b284(0x8a))/0x5)+-parseInt(_0x53b284(0x71))/0x6*(parseInt(_0x53b284(0x79))/0x7)+-parseInt(_0x53b284(0x6a))/0x8+-parseInt(_0x53b284(0x6b))/0x9+parseInt(_0x53b284(0x6d))/0xa*(parseInt(_0x53b284(0x6f))/0xb);if(_0x3e2113===_0x4e1a9c)break;else _0x1abc46['push'](_0x1abc46['shift']());}catch(_0x47a64b){_0x1abc46['push'](_0x1abc46['shift']());}}}(a94_0x3f4f,0x1e353));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';function a94_0x4f42(_0x23c74e,_0x2bb005){_0x23c74e=_0x23c74e-0x68;const _0x3f4f9b=a94_0x3f4f();let _0x4f42f4=_0x3f4f9b[_0x23c74e];return _0x4f42f4;}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':a94_0x36b1b3(0x6c),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':ENABLED_LOVRABET_REGION_VALUES,'defaultValue':DEFAULT_LOVRABET_REGION,'importable':!![]},'env':{'description':a94_0x36b1b3(0x69),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a94_0x36b1b3(0x8c)],'importable':!![]},'format':{'description':a94_0x36b1b3(0x74),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a94_0x36b1b3(0x8d)],'importable':!![]},'pageSize':{'description':a94_0x36b1b3(0x7b),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a94_0x36b1b3(0x85),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':'Override\x20user\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':'Override\x20runtime\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillDomain':{'description':a94_0x36b1b3(0x7d),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'kbServiceDomain':{'description':a94_0x36b1b3(0x83),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a94_0x36b1b3(0x7f),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a94_0x36b1b3(0x82),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['riskLevel'],'importable':!![]},'nativeToolAvailable':{'description':'Native\x20Lovrabet\x20tool\x20availability\x20in\x20the\x20current\x20execution\x20host','topLevel':!![],'defaultValue':![]},'locale':{'description':a94_0x36b1b3(0x7e),'topLevel':!![],'cliSettableTopLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a94_0x36b1b3(0x7a)],'importable':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)[a94_0x36b1b3(0x81)](([,_0x4cf1c2])=>_0x4cf1c2[a94_0x36b1b3(0x73)])[a94_0x36b1b3(0x70)](([_0x412818])=>_0x412818));export const CLI_PROTECTED_CONFIG_KEYS=new Set([a94_0x36b1b3(0x76),'nativeToolAvailable']);export const CONFIG_ENUM_VALUES=Object[a94_0x36b1b3(0x8f)](Object['entries'](CONFIG_FIELD_SCHEMAS)[a94_0x36b1b3(0x81)](([,_0x53223])=>_0x53223['enumValues'])[a94_0x36b1b3(0x70)](([_0x45cf86,_0xe2ab87])=>[_0x45cf86,[..._0xe2ab87[a94_0x36b1b3(0x78)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a94_0x36b1b3(0x8e)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x2efe12])=>_0x2efe12[a94_0x36b1b3(0x77)])['map'](([_0x3b8369])=>_0x3b8369);export function getConfigFieldSchema(_0x5bd054){return CONFIG_FIELD_SCHEMAS[_0x5bd054];}export function getConfigEnumValues(_0x49257b){const _0x119549=a94_0x36b1b3;return getConfigFieldSchema(_0x49257b)?.[_0x119549(0x78)];}function a94_0x3f4f(){const _0x3ba850=['zh-CN','324159oRLExT','join','Config\x20key.\x20Top-level:\x20','1255LWcddF','3076SBCtNP','env','format','entries','fromEntries','defaultValue','Target\x20environment','1556264yxtsLD','2142918CmlstF','Lovrabet\x20region','10cfBCTb','224883NpbJLJ','382195plTMZh','map','12OcnNlQ','2LFXhXo','cliSettableTopLevel','Default\x20output\x20format','en-US','riskLevel','importable','enumValues','15169LPDAxJ','locale','Default\x20page\x20size','has','Override\x20SkillHub\x20domain','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','Access\x20key\x20(client-ak\x20auth)',';\x20local\x20alias:\x20apps.<alias>.appcode','filter','Risk\x20level','Override\x20KB\x20Service\x20domain','legacyCompatOnly','Override\x20API\x20domain'];a94_0x3f4f=function(){return _0x3ba850;};return a94_0x3f4f();}export function getConfigDefaultValue(_0x4f3d58){const _0x29e678=a94_0x36b1b3;return getConfigFieldSchema(_0x4f3d58)?.[_0x29e678(0x68)];}export function isTopLevelConfigKey(_0x17a699){return TOP_LEVEL_CONFIG_KEYS['has'](_0x17a699);}export function isCliProtectedConfigKey(_0x536b22){const _0x3a81a3=a94_0x36b1b3;return CLI_PROTECTED_CONFIG_KEYS[_0x3a81a3(0x7c)](_0x536b22);}const LOCALE_MAP={'zh':'zh-CN','zh-cn':a94_0x36b1b3(0x86),'zh_cn':a94_0x36b1b3(0x86),'en':a94_0x36b1b3(0x75),'en-us':a94_0x36b1b3(0x75),'en_us':a94_0x36b1b3(0x75)};export function normalizeLocale(_0x3efc73){if(!_0x3efc73)return null;return LOCALE_MAP[_0x3efc73['toLowerCase']()]??null;}export function isLegacyCompatConfigKey(_0x4d2626){const _0x57542b=a94_0x36b1b3;return getConfigFieldSchema(_0x4d2626)?.[_0x57542b(0x84)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x743ffe){const _0x16f83f=a94_0x36b1b3;return[..._0x743ffe][_0x16f83f(0x88)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x58b984=a94_0x36b1b3;return _0x58b984(0x89)+getTopLevelConfigKeySummary()+_0x58b984(0x80);}export function buildAppProfileListFields(_0x16a7ed){return{'env':_0x16a7ed,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a95_0x5aaf(){const _0x1eea47=['2683308ovYXhe','321128iHndqX','520znqZtn','Published','114144DTJVMg','4572788StSYAj','7XHfoab','46571ExyyfJ','PUBLISHED','10wrnwxa','1428606ApNNfL','10GREiaD','UNPUBLISH','51494jYMvSp'];a95_0x5aaf=function(){return _0x1eea47;};return a95_0x5aaf();}const a95_0x5cb0a2=a95_0x50cc;(function(_0xd7176f,_0x4df02b){const _0x3dde48=a95_0x50cc,_0x9ab42e=_0xd7176f();while(!![]){try{const _0x592d27=-parseInt(_0x3dde48(0x1e3))/0x1*(parseInt(_0x3dde48(0x1dc))/0x2)+-parseInt(_0x3dde48(0x1e1))/0x3+-parseInt(_0x3dde48(0x1de))/0x4*(parseInt(_0x3dde48(0x1da))/0x5)+parseInt(_0x3dde48(0x1dd))/0x6+parseInt(_0x3dde48(0x1e4))/0x7*(parseInt(_0x3dde48(0x1df))/0x8)+parseInt(_0x3dde48(0x1d9))/0x9*(parseInt(_0x3dde48(0x1d8))/0xa)+-parseInt(_0x3dde48(0x1e2))/0xb;if(_0x592d27===_0x4df02b)break;else _0x9ab42e['push'](_0x9ab42e['shift']());}catch(_0x50de87){_0x9ab42e['push'](_0x9ab42e['shift']());}}}(a95_0x5aaf,0x3b888));export const APP_PUBLISH_STATUS={'Published':a95_0x5cb0a2(0x1e5),'Unpublished':a95_0x5cb0a2(0x1db)};function a95_0x50cc(_0x7da000,_0x3f118e){_0x7da000=_0x7da000-0x1d8;const _0x5aafbf=a95_0x5aaf();let _0x50cce1=_0x5aafbf[_0x7da000];return _0x50cce1;}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a95_0x5cb0a2(0x1e0)];
|