@lovrabet/lovrabet-cli 2.2.7 → 2.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/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.d.ts +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.d.ts +12 -0
- package/lib/commands/config/init.js +1 -0
- package/lib/commands/config/shared.d.ts +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/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.d.ts +11 -0
- package/lib/config/domain-config.js +1 -0
- package/lib/config/schema.d.ts +7 -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.d.ts +4 -0
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.d.ts +10 -3
- 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.d.ts +52 -14
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.d.ts +15 -0
- package/lib/constant/region.js +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.d.ts +2 -0
- package/lib/constant/url.js +1 -1
- package/lib/context.d.ts +2 -6
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.d.ts +2 -0
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/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.d.ts +3 -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/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/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.d.ts +15 -0
- package/lib/utils/access-key-redaction.js +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.d.ts +12 -0
- package/lib/utils/cli-version-check.js +1 -0
- package/lib/utils/cli-version-policy.d.ts +12 -0
- package/lib/utils/cli-version-policy.js +1 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.d.ts +2 -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 -1
- package/skills/lovrabet/SKILL.md +11 -12
- package/skills/lovrabet/guides/troubleshooting.md +12 -8
- package/skills/lovrabet/references/lovrabet-app.md +1 -1
- package/skills/lovrabet/references/lovrabet-auth.md +7 -25
- package/skills/lovrabet/references/lovrabet-config-commands.md +42 -5
- package/skills/lovrabet/references/lovrabet-config.md +25 -5
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a79_0x48de55=a79_0x4a44;function a79_0x4a44(_0x434f36,_0x5e357d){_0x434f36=_0x434f36-0x115;const _0x3143fe=a79_0x3143();let _0x4a4488=_0x3143fe[_0x434f36];return _0x4a4488;}(function(_0x2df003,_0x3217ca){const _0x109137=a79_0x4a44,_0xf26b4=_0x2df003();while(!![]){try{const _0x50426a=-parseInt(_0x109137(0x158))/0x1*(-parseInt(_0x109137(0x15b))/0x2)+parseInt(_0x109137(0x124))/0x3*(-parseInt(_0x109137(0x169))/0x4)+parseInt(_0x109137(0x11e))/0x5*(-parseInt(_0x109137(0x119))/0x6)+-parseInt(_0x109137(0x116))/0x7+-parseInt(_0x109137(0x134))/0x8+-parseInt(_0x109137(0x144))/0x9*(parseInt(_0x109137(0x16f))/0xa)+parseInt(_0x109137(0x132))/0xb*(parseInt(_0x109137(0x153))/0xc);if(_0x50426a===_0x3217ca)break;else _0xf26b4['push'](_0xf26b4['shift']());}catch(_0x2d413e){_0xf26b4['push'](_0xf26b4['shift']());}}}(a79_0x3143,0xcc682));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a79_0x2abd82}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE='SKILL.md',SUPPORTED_SKILL_TYPES=new Set([a79_0x48de55(0x159),'read']),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x3c6a29,_0x487063={}){const _0x213fbd=a79_0x48de55,_0x38fbfa=resolveSkillDirectoryRoot(_0x3c6a29),_0x2bbf30=[],_0x387324=loadRequiredSkillFile(_0x38fbfa,_0x2bbf30),_0x33b35b=_0x387324?parseFrontmatter(_0x387324[_0x213fbd(0x115)]):{'hasFrontmatter':![]};_0x387324&&validateFrontmatter(_0x387324[_0x213fbd(0x13e)],_0x33b35b,_0x2bbf30);validateRuntimeCliReferences(_0x38fbfa,_0x2bbf30);const _0x183538=_0x2bbf30[_0x213fbd(0x128)](_0x137d32=>_0x137d32[_0x213fbd(0x15d)]===_0x213fbd(0x14f)),_0x169bc1=_0x2bbf30[_0x213fbd(0x128)](_0x3139f9=>_0x3139f9['level']===_0x213fbd(0x161));return{'ok':_0x183538[_0x213fbd(0x15e)]===0x0,'dir':_0x38fbfa,'type':_0x33b35b[_0x213fbd(0x147)],'errors':_0x183538,'warnings':_0x169bc1};}function resolveSkillDirectoryRoot(_0x42123d){const _0xc13fd0=a79_0x48de55,_0x5b3b2c=resolve(_0x42123d);if(!existsSync(_0x5b3b2c))throw CliErrors[_0xc13fd0(0x151)](_0xc13fd0(0x14c)+_0x42123d);const _0x5afe60=lstatSync(_0x5b3b2c);if(_0x5afe60['isDirectory']())return _0x5b3b2c;if(_0x5afe60[_0xc13fd0(0x11c)]()){const _0x3f0000=realpathSync(_0x5b3b2c);if(lstatSync(_0x3f0000)[_0xc13fd0(0x12e)]())return _0x3f0000;}throw CliErrors[_0xc13fd0(0x151)](_0xc13fd0(0x14c)+_0x42123d);}export function throwIfSkillValidationFailed(_0x155ab6,_0x5a8c9f=![]){const _0xe991ad=a79_0x48de55;if(_0x155ab6['ok'])return;const _0x13d4b6=_0x155ab6[_0xe991ad(0x120)][_0xe991ad(0x140)](_0x24e7bc=>{const _0x3b998e=_0xe991ad,_0x142bcf=_0x24e7bc[_0x3b998e(0x157)]?'#'+_0x24e7bc[_0x3b998e(0x157)]:'';return _0x24e7bc[_0x3b998e(0x15d)][_0x3b998e(0x123)]()+'\x20'+_0x24e7bc[_0x3b998e(0x133)]+'\x20'+_0x24e7bc['file']+_0x142bcf+':\x20'+_0x24e7bc[_0x3b998e(0x11a)]+_0x3b998e(0x16e)+_0x24e7bc[_0x3b998e(0x122)];});throw CliErrors[_0xe991ad(0x151)](_0xe991ad(0x168)+_0x13d4b6['join']('\x0a'),_0xe991ad(0x149));}function loadRequiredSkillFile(_0x4617be,_0x552d53){const _0xd3b3eb=a79_0x48de55,_0x5a7b40=resolve(_0x4617be,SKILL_FILE);if(!existsSync(_0x5a7b40))return _0x552d53[_0xd3b3eb(0x156)](issue(_0xd3b3eb(0x14f),'structure-complete',SKILL_FILE,_0xd3b3eb(0x16d),_0xd3b3eb(0x166))),undefined;const _0x4bcaf8=lstatSync(_0x5a7b40);if(_0x4bcaf8[_0xd3b3eb(0x11c)]())return _0x552d53[_0xd3b3eb(0x156)](issue(_0xd3b3eb(0x14f),_0xd3b3eb(0x13d),SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.',_0xd3b3eb(0x118))),undefined;if(!_0x4bcaf8['isFile']())return _0x552d53[_0xd3b3eb(0x156)](issue(_0xd3b3eb(0x14f),_0xd3b3eb(0x13d),SKILL_FILE,_0xd3b3eb(0x137),'Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.')),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x5a7b40,_0xd3b3eb(0x139))};}function validateFrontmatter(_0x38c83b,_0x20ce7e,_0x1c010c){const _0x3cd5c3=a79_0x48de55;if(!_0x20ce7e['hasFrontmatter']){_0x1c010c['push'](issue('error',_0x3cd5c3(0x15a),_0x38c83b,_0x3cd5c3(0x130),_0x3cd5c3(0x129)));return;}!_0x20ce7e['name']?.[_0x3cd5c3(0x14a)]()&&_0x1c010c[_0x3cd5c3(0x156)](issue(_0x3cd5c3(0x14f),_0x3cd5c3(0x15a),_0x38c83b,'Frontmatter\x20name\x20is\x20missing.',_0x3cd5c3(0x16a))),!_0x20ce7e[_0x3cd5c3(0x146)]?.[_0x3cd5c3(0x14a)]()&&_0x1c010c['push'](issue(_0x3cd5c3(0x161),_0x3cd5c3(0x145),_0x38c83b,_0x3cd5c3(0x162),_0x3cd5c3(0x135))),!_0x20ce7e[_0x3cd5c3(0x170)]?.['trim']()&&_0x1c010c['push'](issue(_0x3cd5c3(0x161),_0x3cd5c3(0x121),_0x38c83b,_0x3cd5c3(0x16c),_0x3cd5c3(0x14e))),!_0x20ce7e[_0x3cd5c3(0x131)]?.[_0x3cd5c3(0x14a)]()&&_0x1c010c[_0x3cd5c3(0x156)](issue('error',_0x3cd5c3(0x13a),_0x38c83b,_0x3cd5c3(0x12f),'填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。')),_0x20ce7e[_0x3cd5c3(0x136)]===!![]&&_0x1c010c[_0x3cd5c3(0x156)](issue(_0x3cd5c3(0x14f),'internal-skill',_0x38c83b,_0x3cd5c3(0x167),_0x3cd5c3(0x142))),_0x20ce7e['type']?.[_0x3cd5c3(0x14a)]()&&!SUPPORTED_SKILL_TYPES[_0x3cd5c3(0x15f)](_0x20ce7e['type'])&&_0x1c010c[_0x3cd5c3(0x156)](issue(_0x3cd5c3(0x14f),'frontmatter-required',_0x38c83b,_0x3cd5c3(0x13f),_0x3cd5c3(0x16b)));}function validateRuntimeCliReferences(_0x127e5f,_0x104b08){const _0x508e52=a79_0x48de55;for(const _0x2b06cc of findRabetbaseCliInvocations(_0x127e5f)){_0x104b08[_0x508e52(0x156)](issue(_0x508e52(0x161),'rabetbase-cli-reference',_0x2b06cc[_0x508e52(0x143)],_0x508e52(0x15c),_0x508e52(0x164),'L'+_0x2b06cc[_0x508e52(0x14b)]));}}function findRabetbaseCliInvocations(_0x535451){const _0x32ea15=a79_0x48de55;return scanSkillDirectory(_0x535451)[_0x32ea15(0x128)](_0x16ebff=>TEXT_SKILL_FILE_PATTERN[_0x32ea15(0x148)](_0x16ebff[_0x32ea15(0x13e)]))[_0x32ea15(0x138)](_0x1de928=>{const _0x411a3d=_0x32ea15,_0x42000a=fileText(_0x1de928);return _0x42000a['split'](/\r?\n/)[_0x411a3d(0x140)]((_0x14ddf6,_0x4484d6)=>({'file':_0x1de928[_0x411a3d(0x13e)],'line':_0x4484d6+0x1,'text':_0x14ddf6}))[_0x411a3d(0x128)](({text:_0x32a762})=>isRabetbaseCliInvocation(_0x32a762))['map'](({file:_0xde3bf1,line:_0x17542c})=>({'file':_0xde3bf1,'line':_0x17542c}));});}function a79_0x3143(){const _0x2e0ce1=['If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','number','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Skill\x20validation\x20failed:\x0a','298252VsCVzB','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','Set\x20metadata.type\x20to\x20write\x20or\x20read.','Frontmatter\x20example\x20is\x20missing.','Missing\x20SKILL.md.','\x20Fix:\x20','150qzRhkr','example','sql','content','3223388kcrMUf','search','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','474bZhfHe','message','string','isSymbolicLink','project','91555WocJyy','dataset','errors','example-recommended','suggestion','toUpperCase','54AGmMyp','name','isArray','artifact','filter','Add\x20frontmatter\x20with\x20name\x20and\x20description.','toLowerCase','page','workspace','config','isDirectory','Frontmatter\x20description\x20is\x20empty.','SKILL.md\x20must\x20start\x20with\x20frontmatter.','description','642301ZydYcp','ruleId','2314056OPFskE','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','internal','SKILL.md\x20is\x20not\x20a\x20file.','flatMap','utf8','description-required','raw','data','structure-complete','path','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','map','metadata','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','file','20943ldpZsF','display-name-recommended','displayName','type','test','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','trim','line','Skill\x20directory\x20not\x20found:\x20','schema','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','error','auth','validation','object','708OuwoCT','app','boolean','push','section','2jSqPZi','write','frontmatter-required','965530PJUogy','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','level','length','has','false','warning','Frontmatter\x20displayName\x20is\x20missing.','match'];a79_0x3143=function(){return _0x2e0ce1;};return a79_0x3143();}const RABETBASE_SUBCOMMANDS=[a79_0x48de55(0x11f),a79_0x48de55(0x171),'bff',a79_0x48de55(0x12b),a79_0x48de55(0x11d),a79_0x48de55(0x154),a79_0x48de55(0x14d),'service',a79_0x48de55(0x127),'kb',a79_0x48de55(0x12d),a79_0x48de55(0x12c),a79_0x48de55(0x13c),a79_0x48de55(0x150),'logs','registry'],RABETBASE_INVOCATION=new RegExp(String[a79_0x48de55(0x13b)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS['join']('|')})\b`+String[a79_0x48de55(0x13b)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x21d4cd){const _0x2d3175=a79_0x48de55,_0x40f01f=_0x21d4cd[_0x2d3175(0x117)](/\brabetbase\b/i);if(_0x40f01f<0x0)return![];const _0x15b77a=_0x21d4cd['slice'](_0x40f01f)['split'](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x2d3175(0x148)](_0x15b77a);}function parseFrontmatter(_0x5b3adf){const _0x49bc84=a79_0x48de55,_0x2a9ddb=_0x5b3adf[_0x49bc84(0x163)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2a9ddb)return{'hasFrontmatter':![]};const _0x43141e=_0x2a9ddb[0x1]??'',_0x36cdeb={'hasFrontmatter':!![]};let _0x201821;try{_0x201821=a79_0x2abd82(_0x43141e);}catch{return _0x36cdeb;}const _0xe215ae=asRecord(_0x201821);if(!_0xe215ae)return _0x36cdeb;_0x36cdeb[_0x49bc84(0x125)]=scalarToString(_0xe215ae['name']),_0x36cdeb[_0x49bc84(0x146)]=scalarToString(_0xe215ae['displayName']),_0x36cdeb[_0x49bc84(0x131)]=scalarToString(_0xe215ae['description']),_0x36cdeb['example']=scalarToString(_0xe215ae['example']);const _0x50f808=asRecord(_0xe215ae[_0x49bc84(0x141)]);return _0x50f808&&(_0x36cdeb[_0x49bc84(0x147)]=scalarToString(_0x50f808['type']),_0x36cdeb[_0x49bc84(0x136)]=scalarToBoolean(_0x50f808[_0x49bc84(0x136)])),_0x36cdeb;}function asRecord(_0x33c717){const _0xd7e4af=a79_0x48de55;if(_0x33c717&&typeof _0x33c717===_0xd7e4af(0x152)&&!Array[_0xd7e4af(0x126)](_0x33c717))return _0x33c717;return undefined;}function scalarToString(_0x3d4072){const _0x59339a=a79_0x48de55;if(typeof _0x3d4072===_0x59339a(0x11b))return _0x3d4072['trim']();if(typeof _0x3d4072===_0x59339a(0x165)||typeof _0x3d4072===_0x59339a(0x155))return String(_0x3d4072);return undefined;}function scalarToBoolean(_0x1d49c7){const _0x24c89f=a79_0x48de55;if(typeof _0x1d49c7===_0x24c89f(0x155))return _0x1d49c7;if(typeof _0x1d49c7===_0x24c89f(0x11b))return cleanBoolean(_0x1d49c7);return undefined;}function cleanBoolean(_0x43284f){const _0xfb330f=a79_0x48de55,_0x206366=_0x43284f[_0xfb330f(0x14a)]()[_0xfb330f(0x12a)]();if(_0x206366==='true')return!![];if(_0x206366===_0xfb330f(0x160))return![];return undefined;}function issue(_0x54c3f3,_0x1df5a4,_0x1db35f,_0x2cc042,_0x335bcc,_0x336f8f){return{'level':_0x54c3f3,'ruleId':_0x1df5a4,'file':_0x1db35f,'section':_0x336f8f,'message':_0x2cc042,'suggestion':_0x335bcc};}
|
|
1
|
+
const a80_0x1bacb4=a80_0x2a92;(function(_0xb62c72,_0x48d2e7){const _0x39a2e1=a80_0x2a92,_0x3afefe=_0xb62c72();while(!![]){try{const _0x46e4a0=-parseInt(_0x39a2e1(0x222))/0x1+-parseInt(_0x39a2e1(0x227))/0x2+parseInt(_0x39a2e1(0x210))/0x3+-parseInt(_0x39a2e1(0x1f7))/0x4+parseInt(_0x39a2e1(0x1f4))/0x5+-parseInt(_0x39a2e1(0x1f3))/0x6+-parseInt(_0x39a2e1(0x201))/0x7*(-parseInt(_0x39a2e1(0x1e3))/0x8);if(_0x46e4a0===_0x48d2e7)break;else _0x3afefe['push'](_0x3afefe['shift']());}catch(_0x5c6947){_0x3afefe['push'](_0x3afefe['shift']());}}}(a80_0x9125,0xb82b0));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a80_0x63a847}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE='SKILL.md',SUPPORTED_SKILL_TYPES=new Set([a80_0x1bacb4(0x1f8),a80_0x1bacb4(0x1fc)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;function a80_0x9125(){const _0xc3372b=['message','error','false','Skill\x20validation\x20failed:\x0a','file','number','suggestion','toLowerCase','true','filter','schema','registry','has','2115705igSAip','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','path','raw','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','page','isArray','Frontmatter\x20displayName\x20is\x20missing.','utf8','toUpperCase','description-required','ruleId','auth','boolean','trim','object','slice','409968SiRomZ','bff','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','description','Frontmatter\x20example\x20is\x20missing.','2851580ZEiYLW','map','string','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','test','level','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','push','structure-complete','\x20Fix:\x20','Add\x20frontmatter\x20with\x20name\x20and\x20description.','line','warning','validation','frontmatter-required','section','service','display-name-recommended','Skill\x20directory\x20not\x20found:\x20','SKILL.md\x20is\x20not\x20a\x20file.','artifact','Frontmatter\x20description\x20is\x20empty.','48lMZpJk','flatMap','config','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','isSymbolicLink','type','SKILL.md\x20must\x20start\x20with\x20frontmatter.','length','split','displayName','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','isFile','dataset','content','app','7391148rbzRLI','1439130xRfcgn','isDirectory','match','4115964SLGNya','write','join','internal','logs','read','workspace','name','Frontmatter\x20name\x20is\x20missing.','data','4500881RHQrac','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.'];a80_0x9125=function(){return _0xc3372b;};return a80_0x9125();}export function validateSkillDirectory(_0x3ee89c,_0x4151b7={}){const _0x349c9f=a80_0x1bacb4,_0x87998c=resolveSkillDirectoryRoot(_0x3ee89c),_0x4b0f72=[],_0xc5f862=loadRequiredSkillFile(_0x87998c,_0x4b0f72),_0x31db57=_0xc5f862?parseFrontmatter(_0xc5f862[_0x349c9f(0x1f1)]):{'hasFrontmatter':![]};_0xc5f862&&validateFrontmatter(_0xc5f862['path'],_0x31db57,_0x4b0f72);validateRuntimeCliReferences(_0x87998c,_0x4b0f72);const _0x20277e=_0x4b0f72['filter'](_0x1fc18d=>_0x1fc18d[_0x349c9f(0x22c)]==='error'),_0x1191fc=_0x4b0f72['filter'](_0x1918fc=>_0x1918fc['level']===_0x349c9f(0x1d9));return{'ok':_0x20277e[_0x349c9f(0x1ea)]===0x0,'dir':_0x87998c,'type':_0x31db57[_0x349c9f(0x1e8)],'errors':_0x20277e,'warnings':_0x1191fc};}function a80_0x2a92(_0x19b5f0,_0x43433b){_0x19b5f0=_0x19b5f0-0x1d8;const _0x912592=a80_0x9125();let _0x2a923d=_0x912592[_0x19b5f0];return _0x2a923d;}function resolveSkillDirectoryRoot(_0x1d64a9){const _0x4e2200=a80_0x1bacb4,_0x549d0b=resolve(_0x1d64a9);if(!existsSync(_0x549d0b))throw CliErrors[_0x4e2200(0x1da)](_0x4e2200(0x1df)+_0x1d64a9);const _0x3ac338=lstatSync(_0x549d0b);if(_0x3ac338['isDirectory']())return _0x549d0b;if(_0x3ac338[_0x4e2200(0x1e7)]()){const _0x414ac8=realpathSync(_0x549d0b);if(lstatSync(_0x414ac8)[_0x4e2200(0x1f5)]())return _0x414ac8;}throw CliErrors[_0x4e2200(0x1da)]('Skill\x20directory\x20not\x20found:\x20'+_0x1d64a9);}export function throwIfSkillValidationFailed(_0x2bd4e7,_0x1d6f5b=![]){const _0x4d5e70=a80_0x1bacb4;if(_0x2bd4e7['ok'])return;const _0x9a89ad=_0x2bd4e7['errors'][_0x4d5e70(0x228)](_0x5544fd=>{const _0x3e606e=_0x4d5e70,_0x197957=_0x5544fd[_0x3e606e(0x1dc)]?'#'+_0x5544fd[_0x3e606e(0x1dc)]:'';return _0x5544fd[_0x3e606e(0x22c)][_0x3e606e(0x21a)]()+'\x20'+_0x5544fd[_0x3e606e(0x21c)]+'\x20'+_0x5544fd[_0x3e606e(0x207)]+_0x197957+':\x20'+_0x5544fd[_0x3e606e(0x203)]+_0x3e606e(0x230)+_0x5544fd[_0x3e606e(0x209)];});throw CliErrors[_0x4d5e70(0x1da)](_0x4d5e70(0x206)+_0x9a89ad[_0x4d5e70(0x1f9)]('\x0a'),'Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.');}function loadRequiredSkillFile(_0x2cc2e4,_0x3261c5){const _0x2defb0=a80_0x1bacb4,_0xb0719=resolve(_0x2cc2e4,SKILL_FILE);if(!existsSync(_0xb0719))return _0x3261c5['push'](issue(_0x2defb0(0x204),_0x2defb0(0x22f),SKILL_FILE,'Missing\x20SKILL.md.',_0x2defb0(0x215))),undefined;const _0x23748f=lstatSync(_0xb0719);if(_0x23748f['isSymbolicLink']())return _0x3261c5[_0x2defb0(0x22e)](issue(_0x2defb0(0x204),_0x2defb0(0x22f),SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.')),undefined;if(!_0x23748f[_0x2defb0(0x1ef)]())return _0x3261c5[_0x2defb0(0x22e)](issue(_0x2defb0(0x204),_0x2defb0(0x22f),SKILL_FILE,_0x2defb0(0x1e0),_0x2defb0(0x1e6))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0xb0719,_0x2defb0(0x219))};}function validateFrontmatter(_0x3dc84d,_0x47c784,_0x36891e){const _0x175950=a80_0x1bacb4;if(!_0x47c784['hasFrontmatter']){_0x36891e[_0x175950(0x22e)](issue(_0x175950(0x204),_0x175950(0x1db),_0x3dc84d,_0x175950(0x1e9),_0x175950(0x231)));return;}!_0x47c784[_0x175950(0x1fe)]?.[_0x175950(0x21f)]()&&_0x36891e[_0x175950(0x22e)](issue(_0x175950(0x204),'frontmatter-required',_0x3dc84d,_0x175950(0x1ff),_0x175950(0x1ee))),!_0x47c784[_0x175950(0x1ec)]?.['trim']()&&_0x36891e['push'](issue('warning',_0x175950(0x1de),_0x3dc84d,_0x175950(0x218),_0x175950(0x202))),!_0x47c784['example']?.[_0x175950(0x21f)]()&&_0x36891e[_0x175950(0x22e)](issue(_0x175950(0x1d9),'example-recommended',_0x3dc84d,_0x175950(0x226),_0x175950(0x1ed))),!_0x47c784[_0x175950(0x225)]?.[_0x175950(0x21f)]()&&_0x36891e['push'](issue(_0x175950(0x204),_0x175950(0x21b),_0x3dc84d,_0x175950(0x1e2),_0x175950(0x214))),_0x47c784[_0x175950(0x1fa)]===!![]&&_0x36891e['push'](issue(_0x175950(0x204),'internal-skill',_0x3dc84d,_0x175950(0x22d),_0x175950(0x22a))),_0x47c784[_0x175950(0x1e8)]?.[_0x175950(0x21f)]()&&!SUPPORTED_SKILL_TYPES[_0x175950(0x20f)](_0x47c784['type'])&&_0x36891e[_0x175950(0x22e)](issue(_0x175950(0x204),'frontmatter-required',_0x3dc84d,_0x175950(0x224),'Set\x20metadata.type\x20to\x20write\x20or\x20read.'));}function validateRuntimeCliReferences(_0x20ad7f,_0x4a91f9){const _0x2ee899=a80_0x1bacb4;for(const _0x552584 of findRabetbaseCliInvocations(_0x20ad7f)){_0x4a91f9[_0x2ee899(0x22e)](issue(_0x2ee899(0x1d9),'rabetbase-cli-reference',_0x552584['file'],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.',_0x2ee899(0x211),'L'+_0x552584[_0x2ee899(0x1d8)]));}}function findRabetbaseCliInvocations(_0x16a086){const _0x26c5e1=a80_0x1bacb4;return scanSkillDirectory(_0x16a086)['filter'](_0x33749a=>TEXT_SKILL_FILE_PATTERN[_0x26c5e1(0x22b)](_0x33749a['path']))[_0x26c5e1(0x1e4)](_0x4936cc=>{const _0x5874cb=_0x26c5e1,_0x23458c=fileText(_0x4936cc);return _0x23458c[_0x5874cb(0x1eb)](/\r?\n/)[_0x5874cb(0x228)]((_0x246b99,_0x226c99)=>({'file':_0x4936cc[_0x5874cb(0x212)],'line':_0x226c99+0x1,'text':_0x246b99}))[_0x5874cb(0x20c)](({text:_0x3614f6})=>isRabetbaseCliInvocation(_0x3614f6))[_0x5874cb(0x228)](({file:_0x452d54,line:_0x3ba9db})=>({'file':_0x452d54,'line':_0x3ba9db}));});}const RABETBASE_SUBCOMMANDS=[a80_0x1bacb4(0x1f0),'sql',a80_0x1bacb4(0x223),a80_0x1bacb4(0x216),'project',a80_0x1bacb4(0x1f2),a80_0x1bacb4(0x20d),a80_0x1bacb4(0x1dd),a80_0x1bacb4(0x1e1),'kb',a80_0x1bacb4(0x1e5),a80_0x1bacb4(0x1fd),a80_0x1bacb4(0x200),a80_0x1bacb4(0x21d),a80_0x1bacb4(0x1fb),a80_0x1bacb4(0x20e)],RABETBASE_INVOCATION=new RegExp(String[a80_0x1bacb4(0x213)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a80_0x1bacb4(0x1f9)]('|')})\b`+String[a80_0x1bacb4(0x213)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x2e222e){const _0x2dcb93=a80_0x1bacb4,_0x27ca8a=_0x2e222e['search'](/\brabetbase\b/i);if(_0x27ca8a<0x0)return![];const _0x246ea8=_0x2e222e[_0x2dcb93(0x221)](_0x27ca8a)['split'](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x2dcb93(0x22b)](_0x246ea8);}function parseFrontmatter(_0x4a11aa){const _0x1ea6ab=a80_0x1bacb4,_0x33ca8a=_0x4a11aa[_0x1ea6ab(0x1f6)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x33ca8a)return{'hasFrontmatter':![]};const _0xefb9f8=_0x33ca8a[0x1]??'',_0x57176d={'hasFrontmatter':!![]};let _0x5134a6;try{_0x5134a6=a80_0x63a847(_0xefb9f8);}catch{return _0x57176d;}const _0x59a64b=asRecord(_0x5134a6);if(!_0x59a64b)return _0x57176d;_0x57176d['name']=scalarToString(_0x59a64b[_0x1ea6ab(0x1fe)]),_0x57176d[_0x1ea6ab(0x1ec)]=scalarToString(_0x59a64b[_0x1ea6ab(0x1ec)]),_0x57176d[_0x1ea6ab(0x225)]=scalarToString(_0x59a64b[_0x1ea6ab(0x225)]),_0x57176d['example']=scalarToString(_0x59a64b['example']);const _0x2c88ca=asRecord(_0x59a64b['metadata']);return _0x2c88ca&&(_0x57176d['type']=scalarToString(_0x2c88ca[_0x1ea6ab(0x1e8)]),_0x57176d[_0x1ea6ab(0x1fa)]=scalarToBoolean(_0x2c88ca[_0x1ea6ab(0x1fa)])),_0x57176d;}function asRecord(_0x37bb0e){const _0x2a5a56=a80_0x1bacb4;if(_0x37bb0e&&typeof _0x37bb0e===_0x2a5a56(0x220)&&!Array[_0x2a5a56(0x217)](_0x37bb0e))return _0x37bb0e;return undefined;}function scalarToString(_0x4aa29d){const _0x468add=a80_0x1bacb4;if(typeof _0x4aa29d===_0x468add(0x229))return _0x4aa29d['trim']();if(typeof _0x4aa29d===_0x468add(0x208)||typeof _0x4aa29d==='boolean')return String(_0x4aa29d);return undefined;}function scalarToBoolean(_0x181c89){const _0x2bb8ac=a80_0x1bacb4;if(typeof _0x181c89===_0x2bb8ac(0x21e))return _0x181c89;if(typeof _0x181c89===_0x2bb8ac(0x229))return cleanBoolean(_0x181c89);return undefined;}function cleanBoolean(_0x10c023){const _0x46a159=a80_0x1bacb4,_0x49285a=_0x10c023[_0x46a159(0x21f)]()[_0x46a159(0x20a)]();if(_0x49285a===_0x46a159(0x20b))return!![];if(_0x49285a===_0x46a159(0x205))return![];return undefined;}function issue(_0x1f7cc9,_0xb971ff,_0xd736bb,_0x2944bf,_0x570889,_0x1031ce){return{'level':_0x1f7cc9,'ruleId':_0xb971ff,'file':_0xd736bb,'section':_0x1031ce,'message':_0x2944bf,'suggestion':_0x570889};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a81_0x5289(){const _0x2e4079=['bool','sqlContent','72536QoYQxU','read','1034316cUSEbt','sqlcode','798mKQxxr','appCode','sqlCode','sql','sqlName','1485423FzfUcT','252nRRjrj','30530CUoUCs','53548gxiYxv','572MajOjh','7280kgxXCm','2qgbHFr','verbose','str','dbId','157311hVRPTR'];a81_0x5289=function(){return _0x2e4079;};return a81_0x5289();}const a81_0x104300=a81_0x4fa7;(function(_0x5e459b,_0x5ed44f){const _0x229304=a81_0x4fa7,_0x1a37c8=_0x5e459b();while(!![]){try{const _0x97f745=parseInt(_0x229304(0x177))/0x1*(-parseInt(_0x229304(0x174))/0x2)+parseInt(_0x229304(0x17b))/0x3+-parseInt(_0x229304(0x16a))/0x4+-parseInt(_0x229304(0x176))/0x5*(parseInt(_0x229304(0x16c))/0x6)+parseInt(_0x229304(0x172))/0x7*(parseInt(_0x229304(0x168))/0x8)+parseInt(_0x229304(0x171))/0x9+parseInt(_0x229304(0x173))/0xa*(parseInt(_0x229304(0x175))/0xb);if(_0x97f745===_0x5ed44f)break;else _0x1a37c8['push'](_0x1a37c8['shift']());}catch(_0xe56f5f){_0x1a37c8['push'](_0x1a37c8['shift']());}}}(a81_0x5289,0x3010d));function a81_0x4fa7(_0x4a3a2a,_0x23dec8){_0x4a3a2a=_0x4a3a2a-0x168;const _0x52899b=a81_0x5289();let _0x4fa76d=_0x52899b[_0x4a3a2a];return _0x4fa76d;}import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a81_0x104300(0x16f),'command':'detail','description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a81_0x104300(0x169),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x5202bc){const _0x399af8=a81_0x104300,_0x43f918=await getSqlQueryInfo(_0x5202bc[_0x399af8(0x16d)],_0x5202bc[_0x399af8(0x179)](_0x399af8(0x16b))),_0x401344=_0x5202bc[_0x399af8(0x17c)](_0x399af8(0x178));if(_0x401344)return{'ok':!![],'data':_0x43f918};const _0x4f44ff=_0x43f918[_0x399af8(0x17a)]?await getDbName(_0x5202bc[_0x399af8(0x16d)],_0x43f918['dbId']):undefined;return{'ok':!![],'data':{'sqlCode':_0x43f918[_0x399af8(0x16e)],'sqlName':_0x43f918[_0x399af8(0x170)],'db':_0x4f44ff?_0x4f44ff+'\x20('+_0x43f918[_0x399af8(0x17a)]+')':_0x43f918[_0x399af8(0x17a)]??'','sqlContent':_0x43f918[_0x399af8(0x17d)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a82_0x1d440e=a82_0x5b85;(function(_0x5083d6,_0x426ba1){const _0x1ef0fa=a82_0x5b85,_0xc9a2e5=_0x5083d6();while(!![]){try{const _0x4df4d7=parseInt(_0x1ef0fa(0x189))/0x1+parseInt(_0x1ef0fa(0x18e))/0x2+parseInt(_0x1ef0fa(0x18b))/0x3*(parseInt(_0x1ef0fa(0x18f))/0x4)+parseInt(_0x1ef0fa(0x194))/0x5*(-parseInt(_0x1ef0fa(0x18a))/0x6)+-parseInt(_0x1ef0fa(0x191))/0x7+-parseInt(_0x1ef0fa(0x192))/0x8*(-parseInt(_0x1ef0fa(0x186))/0x9)+-parseInt(_0x1ef0fa(0x198))/0xa*(-parseInt(_0x1ef0fa(0x197))/0xb);if(_0x4df4d7===_0x426ba1)break;else _0xc9a2e5['push'](_0xc9a2e5['shift']());}catch(_0x4c69c0){_0xc9a2e5['push'](_0xc9a2e5['shift']());}}}(a82_0x1feb,0x67e7c));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';function a82_0x5b85(_0x53dbd5,_0x4782c3){_0x53dbd5=_0x53dbd5-0x180;const _0x1febe1=a82_0x1feb();let _0x5b8591=_0x1febe1[_0x53dbd5];return _0x5b8591;}export const sqlExec={'service':a82_0x1d440e(0x190),'command':a82_0x1d440e(0x180),'description':a82_0x1d440e(0x181),'risk':a82_0x1d440e(0x195),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x528e98){const _0x29c7fc=a82_0x1d440e,_0x53fe54=parseJsonParams(_0x528e98[_0x29c7fc(0x193)](_0x29c7fc(0x188))),_0x4eec39=Date[_0x29c7fc(0x182)](),_0x1da1c7=await executeSdkSql(_0x528e98[_0x29c7fc(0x193)](_0x29c7fc(0x184)),_0x53fe54),_0x545e31=Date[_0x29c7fc(0x182)]()-_0x4eec39,_0x559510=_0x1da1c7?.['execResult']??_0x1da1c7,_0x48935b=_0x1da1c7?.[_0x29c7fc(0x196)]??!![];if(!_0x48935b)return{'ok':![],'data':{'error':_0x1da1c7?.[_0x29c7fc(0x187)]||'SQL\x20execution\x20failed','elapsed':_0x545e31},'message':_0x29c7fc(0x183)};const _0x3e3e4e=Array[_0x29c7fc(0x18d)](_0x559510)?_0x559510:[];return{'ok':!![],'data':{'rows':_0x3e3e4e,'rowCount':_0x3e3e4e[_0x29c7fc(0x185)],'elapsed':_0x545e31},'message':_0x29c7fc(0x18c)+_0x3e3e4e[_0x29c7fc(0x185)]+'\x20row(s)\x20in\x20'+_0x545e31+'ms'};}};function a82_0x1feb(){const _0xd58ace=['exec','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','now','SQL\x20execution\x20failed','sqlcode','length','907263XRGBLk','execError','params','213095oORiXq','147228AVPTvN','96417SYCExO','Returned\x20','isArray','283982sSnaFb','4FCBDsm','sql','4084423LSvNQs','24nTMsKf','str','95yuXwlV','read','execSuccess','11GYsvbi','7856610EwigyW'];a82_0x1feb=function(){return _0xd58ace;};return a82_0x1feb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40d104,_0x22ba9d){const _0x355385=a83_0x5c22,_0x479cdd=_0x40d104();while(!![]){try{const _0x241d00=parseInt(_0x355385(0xd8))/0x1*(parseInt(_0x355385(0xd3))/0x2)+-parseInt(_0x355385(0xda))/0x3+parseInt(_0x355385(0xd5))/0x4+parseInt(_0x355385(0xd2))/0x5*(parseInt(_0x355385(0xd4))/0x6)+-parseInt(_0x355385(0xdc))/0x7*(-parseInt(_0x355385(0xd6))/0x8)+parseInt(_0x355385(0xdb))/0x9*(parseInt(_0x355385(0xd9))/0xa)+-parseInt(_0x355385(0xd7))/0xb;if(_0x241d00===_0x22ba9d)break;else _0x479cdd['push'](_0x479cdd['shift']());}catch(_0x9a20e6){_0x479cdd['push'](_0x479cdd['shift']());}}}(a83_0x3f7f,0x8c63a));import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];function a83_0x5c22(_0xa2b4ad,_0x266637){_0xa2b4ad=_0xa2b4ad-0xd2;const _0x3f7f19=a83_0x3f7f();let _0x5c223f=_0x3f7f19[_0xa2b4ad];return _0x5c223f;}function a83_0x3f7f(){const _0x3d3069=['7277CVepDg','550rcipkW','173811AmDdBx','175374VHzAlz','7MACUEu','410pfeVjw','82ayPlvD','49170jAUGti','3252756cMZueI','267008ZAbEUI','24812381wSHKSx'];a83_0x3f7f=function(){return _0x3d3069;};return a83_0x3f7f();}
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a83_0x280284=a83_0x1fbc;(function(_0x4b63ca,_0x1367fa){const _0x1a0b77=a83_0x1fbc,_0xcb7ed5=_0x4b63ca();while(!![]){try{const _0x14df4b=-parseInt(_0x1a0b77(0xff))/0x1+-parseInt(_0x1a0b77(0xc8))/0x2*(parseInt(_0x1a0b77(0xc6))/0x3)+parseInt(_0x1a0b77(0x116))/0x4+-parseInt(_0x1a0b77(0x113))/0x5*(parseInt(_0x1a0b77(0x10a))/0x6)+-parseInt(_0x1a0b77(0x109))/0x7+parseInt(_0x1a0b77(0xdd))/0x8+-parseInt(_0x1a0b77(0xe4))/0x9*(-parseInt(_0x1a0b77(0xd8))/0xa);if(_0x14df4b===_0x1367fa)break;else _0xcb7ed5['push'](_0xcb7ed5['shift']());}catch(_0x387b96){_0xcb7ed5['push'](_0xcb7ed5['shift']());}}}(a83_0x53b4,0x40c54));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a83_0x50d6bf from'semver';import{CliErrors}from'../errors.js';function a83_0x53b4(){const _0x2df703=['Checking\x20npm\x20dist-tags...','dirname','str','beta','map','25rOuNEZ','\x20\x20Run\x20manually:\x20','valid','1133148RvIpyK','win32','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','lib','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','message','warn','test','read','1851vFUioI','Updating\x20','358gBiTCN','repairCommand','Already\x20up\x20to\x20date\x20(v','\x20->\x20','object','Update\x20failed:\x20','pipe','Current\x20version:\x20','\x20is\x20current.','@lovrabet\x5clovrabet-cli','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','stdout','state','timeout','current','trim','200470RlOJmk','validation','entries','platform','error','2950920ADaChW','Checking\x20CLI\x20Built-in\x20Skill...','node_modules','relative','--prefix','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','@lovrabet/lovrabet-cli','297TJaZgj','Unable\x20to\x20resolve\x20','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','Updated\x20to\x20v','run','toString','Install\x20a\x20specific\x20CLI\x20version','latest','string','stderr','boolean','find','\x20version\x20from\x20npm.','log','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','basename','filter','toLowerCase','write','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','unknown','length','\x20CLI','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','cwd','nonInteractive','fromEntries','78849nieVSl','inherit','bool','version','source','update','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','从\x20npm\x20更新\x20','reason','includes','3437812hdYAUr','441594PvqUQn','status','Already\x20on\x20requested\x20version\x20(v','\x20\x20CLI\x20Built-in\x20Skill\x20'];a83_0x53b4=function(){return _0x2df703;};return a83_0x53b4();}import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':'latest','type':a83_0x280284(0xee),'description':'Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','default':![]},{'name':a83_0x280284(0x111),'type':a83_0x280284(0xee),'description':a83_0x280284(0xf2),'default':![]},{'name':'version','type':a83_0x280284(0xec),'description':a83_0x280284(0xea)}];function getRequestedVersion(_0x29afad){const _0x538af1=a83_0x280284,_0x69779d=_0x29afad[_0x538af1(0x110)](_0x538af1(0x102))['trim']();if(_0x69779d)return _0x69779d;return String(_0x29afad['args']?.[0x0]??'')[_0x538af1(0xd7)]();}async function validateUpdateFlags(_0x3ae14a){const _0x46541f=a83_0x280284,_0x47e36f=getRequestedVersion(_0x3ae14a),_0x2390c8=[_0x3ae14a[_0x46541f(0x101)](_0x46541f(0xeb))?_0x46541f(0xeb):'',_0x3ae14a['bool']('beta')?_0x46541f(0x111):'',_0x47e36f?_0x46541f(0x102):''][_0x46541f(0xf4)](Boolean);if(_0x2390c8[_0x46541f(0xf9)]>0x1)throw CliErrors[_0x46541f(0xd9)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.',_0x46541f(0xfb));if(_0x47e36f&&!a83_0x50d6bf[_0x46541f(0x115)](_0x47e36f))throw CliErrors[_0x46541f(0xd9)]('Invalid\x20version:\x20'+_0x47e36f,_0x46541f(0x11a));}async function fetchNpmDistTags(){const _0x2a2b54=a83_0x280284;try{const _0x142efd=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x2192b9=await fetch(_0x142efd,{'signal':AbortSignal[_0x2a2b54(0xd5)](0x2710)});if(!_0x2192b9['ok'])return null;const _0x1f3cd4=await _0x2192b9['json']();if(!_0x1f3cd4||typeof _0x1f3cd4!==_0x2a2b54(0xcc))return null;return Object[_0x2a2b54(0xfe)](Object[_0x2a2b54(0xda)](_0x1f3cd4)[_0x2a2b54(0xf4)](([,_0x71f633])=>typeof _0x71f633===_0x2a2b54(0xec)&&_0x71f633[_0x2a2b54(0xd7)]())[_0x2a2b54(0x112)](([_0x7ca650,_0x2fb654])=>[_0x7ca650,String(_0x2fb654)[_0x2a2b54(0xd7)]()]));}catch{return null;}}async function resolveTargetVersion(_0x51bc0d){const _0x423782=a83_0x280284,_0x5d0715=getRequestedVersion(_0x51bc0d);if(_0x5d0715)return{'version':_0x5d0715,'source':'version'};const _0x1ecdad=_0x51bc0d[_0x423782(0x101)]('beta')?_0x423782(0x111):_0x423782(0xeb),_0x57ed1f=await fetchNpmDistTags(),_0x22d21f=_0x57ed1f?.[_0x1ecdad];if(!_0x22d21f)return null;return{'version':_0x22d21f,'source':_0x1ecdad};}function shouldInstallTarget(_0x4b0e68,_0x474ad9){const _0x24c226=a83_0x280284;if(_0x474ad9[_0x24c226(0x103)]===_0x24c226(0x102)||_0x474ad9[_0x24c226(0x103)]===_0x24c226(0x111))return!a83_0x50d6bf['eq'](_0x4b0e68,_0x474ad9[_0x24c226(0x102)]);return a83_0x50d6bf['lt'](_0x4b0e68,_0x474ad9[_0x24c226(0x102)]);}export function installCliPackage(_0x22136a,_0x381aab,_0x1adf16=resolveCurrentCliNpmPrefix()){const _0x2af068=a83_0x280284,_0xb18240=resolveNpmBin('npm'),_0x58d6eb=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x22136a,_0x1b23e0=['install','-g',_0x58d6eb],_0x3eafc1=runNpmInstall(_0xb18240,_0x1b23e0,_0x381aab);if(_0x3eafc1['ok']||!isNpmPrefixPermissionError(_0x3eafc1[_0x2af068(0xdc)]))return _0x3eafc1;if(!_0x1adf16||_0x3eafc1['error']?.[_0x2af068(0xf5)]()[_0x2af068(0x108)](_0x1adf16[_0x2af068(0xf5)]()))return _0x3eafc1;return console[_0x2af068(0xc3)](_0x2af068(0xe6)+_0x1adf16),runNpmInstall(_0xb18240,[..._0x1b23e0,_0x2af068(0xe1),_0x1adf16],_0x381aab);}function a83_0x1fbc(_0x46ce67,_0x144f14){_0x46ce67=_0x46ce67-0xc2;const _0x53b465=a83_0x53b4();let _0x1fbc24=_0x53b465[_0x46ce67];return _0x1fbc24;}export function resolveCurrentCliNpmPrefix(_0x5991e9=fileURLToPath(import.meta.url),_0x2a752b=process[a83_0x280284(0xdb)]){const _0x1cd8b3=a83_0x280284,_0x45e149=_0x2a752b===_0x1cd8b3(0x117)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x5f5d30=_0x45e149[_0x1cd8b3(0x10f)](_0x45e149['dirname'](_0x45e149[_0x1cd8b3(0x10f)](_0x5991e9))),_0x52e16e=_0x2a752b==='win32'?_0x1cd8b3(0xd1):_0x1cd8b3(0xe3);let _0x2c3243=_0x45e149[_0x1cd8b3(0x10f)](_0x5f5d30);while(!![]){if(_0x45e149[_0x1cd8b3(0xf3)](_0x2c3243)===_0x1cd8b3(0xdf)&&_0x45e149[_0x1cd8b3(0xe0)](_0x2c3243,_0x5f5d30)===_0x52e16e){const _0x15dab5=_0x45e149[_0x1cd8b3(0x10f)](_0x2c3243);return _0x45e149[_0x1cd8b3(0xf3)](_0x15dab5)===_0x1cd8b3(0x119)?_0x45e149[_0x1cd8b3(0x10f)](_0x15dab5):_0x15dab5;}const _0x1a5a83=_0x45e149['dirname'](_0x2c3243);if(_0x1a5a83===_0x2c3243)return null;_0x2c3243=_0x1a5a83;}}function runNpmInstall(_0x217af3,_0x197804,_0x22786d){const _0x7bc064=a83_0x280284;console[_0x7bc064(0xf1)]('*\x20'+[_0x217af3,..._0x197804]['join']('\x20'));const _0x2d0218=spawnSync(_0x217af3,_0x197804,{'cwd':process[_0x7bc064(0xfc)](),'stdio':_0x7bc064(0xce),'env':process.env,'shell':![]}),_0x3aac2e=_0x2d0218[_0x7bc064(0xed)]?_0x2d0218[_0x7bc064(0xed)][_0x7bc064(0xe9)]()[_0x7bc064(0xd7)]():'',_0x1d274d=_0x2d0218[_0x7bc064(0xd3)]?_0x2d0218['stdout']['toString']()[_0x7bc064(0xd7)]():'';if(!_0x22786d){if(_0x1d274d)process[_0x7bc064(0xd3)][_0x7bc064(0xf6)](_0x1d274d+'\x0a');if(_0x3aac2e)process[_0x7bc064(0xed)][_0x7bc064(0xf6)](_0x3aac2e+'\x0a');}if(_0x2d0218[_0x7bc064(0x10b)]===0x0)return{'ok':!![]};const _0x1a110b=_0x2d0218[_0x7bc064(0xdc)]?.[_0x7bc064(0xc2)]||_0x3aac2e||_0x1d274d||'exit\x20'+(_0x2d0218['status']??_0x7bc064(0xf8));return{'ok':![],'error':_0x1a110b};}function isNpmPrefixPermissionError(_0x1881fc){const _0x32b16e=a83_0x280284;return Boolean(_0x1881fc&&/\b(?:EACCES|EPERM)\b/[_0x32b16e(0xc4)](_0x1881fc));}function repairCurrentBuiltinSkill(_0x3d5230){const _0x43700c=a83_0x280284;console[_0x43700c(0xf1)](_0x43700c(0xde));const _0x33a5b2=installBuiltinSkill({'stdio':_0x3d5230?_0x43700c(0xce):_0x43700c(0x100)});if(_0x33a5b2['ok'])return console[_0x43700c(0xf1)](_0x43700c(0x10d)+_0x33a5b2['skillVersion']+'\x20is\x20current.'),!![];return console['warn'](_0x43700c(0x118)+(_0x33a5b2['code']||'INSTALL_FAILED')+']:\x20'+(_0x33a5b2[_0x43700c(0xdc)]||_0x43700c(0xf8))),console[_0x43700c(0xf1)](_0x43700c(0x114)+_0x33a5b2[_0x43700c(0xc9)]),![];}function verifyUpdatedBuiltinSkill(_0x7f25c5){const _0x59a1a6=a83_0x280284;console[_0x59a1a6(0xf1)](_0x59a1a6(0xde));const _0x3236b3=inspectInstalledBuiltinSkillVersion(_0x7f25c5);if(_0x3236b3[_0x59a1a6(0xd4)]===_0x59a1a6(0xd6))return console[_0x59a1a6(0xf1)](_0x59a1a6(0x10d)+_0x7f25c5+_0x59a1a6(0xd0)),!![];console[_0x59a1a6(0xc3)](_0x59a1a6(0xd2)+_0x3236b3['state']+'.');if(_0x3236b3[_0x59a1a6(0x107)])console[_0x59a1a6(0xc3)]('\x20\x20'+_0x3236b3[_0x59a1a6(0x107)]);return console[_0x59a1a6(0xf1)](_0x59a1a6(0x114)+_0x3236b3[_0x59a1a6(0xc9)]),![];}async function execute(_0xbc4e88){const _0x9ee002=a83_0x280284;await validateUpdateFlags(_0xbc4e88);const _0x5e7812=getCliVersion();console[_0x9ee002(0xf1)](_0x9ee002(0xcf)+_0x5e7812),console[_0x9ee002(0xf1)](_0x9ee002(0x10e));const _0x36d628=await resolveTargetVersion(_0xbc4e88);if(!_0x36d628){const _0x30e291=_0xbc4e88['bool'](_0x9ee002(0x111))?'beta':'latest',_0x549b60=_0x9ee002(0xe5)+_0x30e291+_0x9ee002(0xf0);return console[_0x9ee002(0xc3)](_0x549b60),console[_0x9ee002(0xf1)](_0x9ee002(0xf7)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x30e291),{'ok':![]};}const _0x197685=[_0x5e7812,_0x36d628[_0x9ee002(0x102)]][_0x9ee002(0xef)](_0x4cac45=>!a83_0x50d6bf['valid'](_0x4cac45));if(_0x197685)return console[_0x9ee002(0xc3)]('Version\x20comparison\x20failed:\x20'+_0x197685+'.'),{'ok':![]};if(!shouldInstallTarget(_0x5e7812,_0x36d628)){const _0x421baa=_0x36d628['source']===_0x9ee002(0x102)?_0x9ee002(0x10c)+_0x36d628[_0x9ee002(0x102)]+').':_0x9ee002(0xca)+_0x36d628[_0x9ee002(0x102)]+').';return console[_0x9ee002(0xf1)](_0x421baa),{'ok':repairCurrentBuiltinSkill(_0xbc4e88[_0x9ee002(0xfd)])};}console[_0x9ee002(0xf1)](_0x9ee002(0xc7)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x5e7812+_0x9ee002(0xcb)+_0x36d628[_0x9ee002(0x102)]);const _0x42bba6=installCliPackage(_0x36d628[_0x9ee002(0x102)],_0xbc4e88[_0x9ee002(0xfd)]);if(!_0x42bba6['ok']){const _0x5d0c0e=_0x9ee002(0xcd)+(_0x42bba6['error']||_0x9ee002(0xf8));return console[_0x9ee002(0xdc)](_0x5d0c0e),console['log'](_0x9ee002(0x105)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x36d628[_0x9ee002(0x102)]),{'ok':![]};}return console['log'](_0x9ee002(0xe7)+_0x36d628[_0x9ee002(0x102)]+'.'),console[_0x9ee002(0xf1)](_0x9ee002(0xe2)),{'ok':verifyUpdatedBuiltinSkill(_0x36d628['version'])};}export const updateDefinition={'service':a83_0x280284(0x104),'command':a83_0x280284(0xe8),'description':a83_0x280284(0x106)+CLI_BIN_NAME+a83_0x280284(0xfa),'risk':a83_0x280284(0xc5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a84_0x42cbf6=a84_0x504d;(function(_0x3ab67e,_0x58ebe8){const _0x2e027e=a84_0x504d,_0x4c3388=_0x3ab67e();while(!![]){try{const _0x2e1406=parseInt(_0x2e027e(0x13c))/0x1+parseInt(_0x2e027e(0x163))/0x2*(-parseInt(_0x2e027e(0x14d))/0x3)+-parseInt(_0x2e027e(0x177))/0x4*(-parseInt(_0x2e027e(0x167))/0x5)+-parseInt(_0x2e027e(0x18e))/0x6*(-parseInt(_0x2e027e(0x18d))/0x7)+-parseInt(_0x2e027e(0x192))/0x8+parseInt(_0x2e027e(0x13b))/0x9*(parseInt(_0x2e027e(0x184))/0xa)+-parseInt(_0x2e027e(0x182))/0xb;if(_0x2e1406===_0x58ebe8)break;else _0x4c3388['push'](_0x4c3388['shift']());}catch(_0x426219){_0x4c3388['push'](_0x4c3388['shift']());}}}(a84_0x9d17,0x95159));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a84_0x3fad26 from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a84_0x504d(_0x2e3997,_0xeb5802){_0x2e3997=_0x2e3997-0x13a;const _0x9d1727=a84_0x9d17();let _0x504dc4=_0x9d1727[_0x2e3997];return _0x504dc4;}import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a84_0x42cbf6(0x150),'type':a84_0x42cbf6(0x162),'description':a84_0x42cbf6(0x14a),'default':![]},{'name':a84_0x42cbf6(0x157),'type':a84_0x42cbf6(0x162),'description':a84_0x42cbf6(0x158),'default':![]},{'name':a84_0x42cbf6(0x164),'type':a84_0x42cbf6(0x17b),'description':a84_0x42cbf6(0x149)}];function getRequestedVersion(_0x1526d6){const _0x4489cb=a84_0x42cbf6,_0x3f1206=_0x1526d6[_0x4489cb(0x159)](_0x4489cb(0x164))[_0x4489cb(0x160)]();if(_0x3f1206)return _0x3f1206;return String(_0x1526d6['args']?.[0x0]??'')['trim']();}async function validateUpdateFlags(_0x2eacf3){const _0x214c9b=a84_0x42cbf6,_0x30ae12=getRequestedVersion(_0x2eacf3),_0x17de3f=[_0x2eacf3[_0x214c9b(0x16e)]('latest')?'latest':'',_0x2eacf3[_0x214c9b(0x16e)]('beta')?_0x214c9b(0x157):'',_0x30ae12?'version':''][_0x214c9b(0x165)](Boolean);if(_0x17de3f[_0x214c9b(0x15d)]>0x1)throw CliErrors[_0x214c9b(0x13f)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.',_0x214c9b(0x172));if(_0x30ae12&&!a84_0x3fad26[_0x214c9b(0x156)](_0x30ae12))throw CliErrors['validation'](_0x214c9b(0x153)+_0x30ae12,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x3ea2d4=a84_0x42cbf6;try{const _0xc0e6d5=NPM_REGISTRY_BASE_URL+_0x3ea2d4(0x180)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x3ea2d4(0x140),_0x3af270=await fetch(_0xc0e6d5,{'signal':AbortSignal[_0x3ea2d4(0x178)](0x2710)});if(!_0x3af270['ok'])return null;const _0x467f49=await _0x3af270[_0x3ea2d4(0x15f)]();if(!_0x467f49||typeof _0x467f49!==_0x3ea2d4(0x13e))return null;return Object[_0x3ea2d4(0x174)](Object[_0x3ea2d4(0x15e)](_0x467f49)[_0x3ea2d4(0x165)](([,_0x42abea])=>typeof _0x42abea===_0x3ea2d4(0x17b)&&_0x42abea[_0x3ea2d4(0x160)]())['map'](([_0xfbc321,_0x11a9bc])=>[_0xfbc321,String(_0x11a9bc)[_0x3ea2d4(0x160)]()]));}catch{return null;}}function a84_0x9d17(){const _0x156f9c=['npm','read','6972lNVuOZ','7278gLFakP','Checking\x20CLI\x20Built-in\x20Skill...','@lovrabet/lovrabet-cli','code','1279792KuPkuU','Update\x20failed:\x20','18jEoYVT','653067enkMYO','exit\x20','object','validation','/dist-tags','dirname','cwd','relative','win32','nonInteractive','message','Updating\x20','update','Install\x20a\x20specific\x20CLI\x20version','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','\x20\x20Run\x20manually:\x20','test','72456WLUZDM','Updated\x20to\x20v','skillVersion','latest','state','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Invalid\x20version:\x20','source','stderr','valid','beta','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','str','log',']:\x20','inherit','length','entries','json','trim','\x20\x20CLI\x20Built-in\x20Skill\x20','boolean','44CkEfTG','version','filter','Already\x20on\x20requested\x20version\x20(v','5XCFOLy','install','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','stdout','repairCommand','write','\x20CLI\x20from\x20npm','bool','Version\x20comparison\x20failed:\x20','\x20is\x20current.','unknown','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','includes','fromEntries','basename','Unable\x20to\x20resolve\x20','640748mCHSLQ','timeout','current','platform','string','--prefix','@lovrabet\x5clovrabet-cli','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','INSTALL_FAILED','/-/package/','warn','14203409AlOBzQ','toString','2858920nXuFRP','Already\x20up\x20to\x20date\x20(v','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','Current\x20version:\x20','pipe','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','error'];a84_0x9d17=function(){return _0x156f9c;};return a84_0x9d17();}async function resolveTargetVersion(_0x11e5f2){const _0x252026=a84_0x42cbf6,_0x510cae=getRequestedVersion(_0x11e5f2);if(_0x510cae)return{'version':_0x510cae,'source':_0x252026(0x164)};const _0x36d998=_0x11e5f2['bool'](_0x252026(0x157))?_0x252026(0x157):'latest',_0xeb13b8=await fetchNpmDistTags(),_0x14e1e3=_0xeb13b8?.[_0x36d998];if(!_0x14e1e3)return null;return{'version':_0x14e1e3,'source':_0x36d998};}function shouldInstallTarget(_0x4329e6,_0x3fa0a3){const _0x2add1c=a84_0x42cbf6;if(_0x3fa0a3[_0x2add1c(0x154)]===_0x2add1c(0x164)||_0x3fa0a3['source']==='beta')return!a84_0x3fad26['eq'](_0x4329e6,_0x3fa0a3['version']);return a84_0x3fad26['lt'](_0x4329e6,_0x3fa0a3[_0x2add1c(0x164)]);}export function installCliPackage(_0x857f06,_0x233170,_0x2117e1=resolveCurrentCliNpmPrefix()){const _0x465294=a84_0x42cbf6,_0x136217=resolveNpmBin(_0x465294(0x18b)),_0x50dcd8=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x857f06,_0x3abe2c=[_0x465294(0x168),'-g',_0x50dcd8],_0x4a9158=runNpmInstall(_0x136217,_0x3abe2c,_0x233170);if(_0x4a9158['ok']||!isNpmPrefixPermissionError(_0x4a9158[_0x465294(0x18a)]))return _0x4a9158;if(!_0x2117e1||_0x4a9158[_0x465294(0x18a)]?.['toLowerCase']()[_0x465294(0x173)](_0x2117e1['toLowerCase']()))return _0x4a9158;return console[_0x465294(0x181)](_0x465294(0x189)+_0x2117e1),runNpmInstall(_0x136217,[..._0x3abe2c,_0x465294(0x17c),_0x2117e1],_0x233170);}export function resolveCurrentCliNpmPrefix(_0x2993de=fileURLToPath(import.meta.url),_0xd4dd04=process[a84_0x42cbf6(0x17a)]){const _0x5a7297=a84_0x42cbf6,_0x502eb9=_0xd4dd04==='win32'?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x289085=_0x502eb9[_0x5a7297(0x141)](_0x502eb9[_0x5a7297(0x141)](_0x502eb9[_0x5a7297(0x141)](_0x2993de))),_0x327f3b=_0xd4dd04===_0x5a7297(0x144)?_0x5a7297(0x17d):_0x5a7297(0x190);let _0x5c7094=_0x502eb9['dirname'](_0x289085);while(!![]){if(_0x502eb9[_0x5a7297(0x175)](_0x5c7094)==='node_modules'&&_0x502eb9[_0x5a7297(0x143)](_0x5c7094,_0x289085)===_0x327f3b){const _0x24e492=_0x502eb9['dirname'](_0x5c7094);return _0x502eb9['basename'](_0x24e492)==='lib'?_0x502eb9[_0x5a7297(0x141)](_0x24e492):_0x24e492;}const _0x319c18=_0x502eb9[_0x5a7297(0x141)](_0x5c7094);if(_0x319c18===_0x5c7094)return null;_0x5c7094=_0x319c18;}}function runNpmInstall(_0x11680a,_0x20c99b,_0xac7db5){const _0x2f0fa6=a84_0x42cbf6;console[_0x2f0fa6(0x15a)]('*\x20'+[_0x11680a,..._0x20c99b]['join']('\x20'));const _0x4dcb87=spawnSync(_0x11680a,_0x20c99b,{'cwd':process[_0x2f0fa6(0x142)](),'stdio':_0x2f0fa6(0x188),'env':process.env,'shell':![]}),_0x19b618=_0x4dcb87[_0x2f0fa6(0x155)]?_0x4dcb87[_0x2f0fa6(0x155)]['toString']()['trim']():'',_0x8bdac6=_0x4dcb87[_0x2f0fa6(0x16a)]?_0x4dcb87['stdout'][_0x2f0fa6(0x183)]()['trim']():'';if(!_0xac7db5){if(_0x8bdac6)process[_0x2f0fa6(0x16a)][_0x2f0fa6(0x16c)](_0x8bdac6+'\x0a');if(_0x19b618)process['stderr'][_0x2f0fa6(0x16c)](_0x19b618+'\x0a');}if(_0x4dcb87['status']===0x0)return{'ok':!![]};const _0x376817=_0x4dcb87[_0x2f0fa6(0x18a)]?.[_0x2f0fa6(0x146)]||_0x19b618||_0x8bdac6||_0x2f0fa6(0x13d)+(_0x4dcb87['status']??_0x2f0fa6(0x171));return{'ok':![],'error':_0x376817};}function isNpmPrefixPermissionError(_0x41aa0d){const _0x5e7bfa=a84_0x42cbf6;return Boolean(_0x41aa0d&&/\b(?:EACCES|EPERM)\b/[_0x5e7bfa(0x14c)](_0x41aa0d));}function repairCurrentBuiltinSkill(_0x38419b){const _0x487c5a=a84_0x42cbf6;console[_0x487c5a(0x15a)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0xd354bb=installBuiltinSkill({'stdio':_0x38419b?_0x487c5a(0x188):_0x487c5a(0x15c)});if(_0xd354bb['ok'])return console['log'](_0x487c5a(0x161)+_0xd354bb[_0x487c5a(0x14f)]+_0x487c5a(0x170)),!![];return console[_0x487c5a(0x181)](_0x487c5a(0x169)+(_0xd354bb[_0x487c5a(0x191)]||_0x487c5a(0x17f))+_0x487c5a(0x15b)+(_0xd354bb[_0x487c5a(0x18a)]||'unknown')),console[_0x487c5a(0x15a)]('\x20\x20Run\x20manually:\x20'+_0xd354bb[_0x487c5a(0x16b)]),![];}function verifyUpdatedBuiltinSkill(_0x5e1935){const _0x23222a=a84_0x42cbf6;console['log'](_0x23222a(0x18f));const _0x3b3ccb=inspectInstalledBuiltinSkillVersion(_0x5e1935);if(_0x3b3ccb[_0x23222a(0x151)]===_0x23222a(0x179))return console[_0x23222a(0x15a)](_0x23222a(0x161)+_0x5e1935+'\x20is\x20current.'),!![];console['warn'](_0x23222a(0x186)+_0x3b3ccb['state']+'.');if(_0x3b3ccb['reason'])console[_0x23222a(0x181)]('\x20\x20'+_0x3b3ccb['reason']);return console[_0x23222a(0x15a)](_0x23222a(0x14b)+_0x3b3ccb['repairCommand']),![];}async function execute(_0x2c5ed8){const _0x13b72a=a84_0x42cbf6;await validateUpdateFlags(_0x2c5ed8);const _0x57b31e=getCliVersion();console[_0x13b72a(0x15a)](_0x13b72a(0x187)+_0x57b31e),console[_0x13b72a(0x15a)]('Checking\x20npm\x20dist-tags...');const _0x41a55f=await resolveTargetVersion(_0x2c5ed8);if(!_0x41a55f){const _0x2ffc6=_0x2c5ed8['bool']('beta')?_0x13b72a(0x157):_0x13b72a(0x150),_0x43a2ce=_0x13b72a(0x176)+_0x2ffc6+'\x20version\x20from\x20npm.';return console[_0x13b72a(0x181)](_0x43a2ce),console[_0x13b72a(0x15a)](_0x13b72a(0x152)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x2ffc6),{'ok':![]};}const _0x1c47e3=[_0x57b31e,_0x41a55f[_0x13b72a(0x164)]]['find'](_0x4c3d2e=>!a84_0x3fad26[_0x13b72a(0x156)](_0x4c3d2e));if(_0x1c47e3)return console[_0x13b72a(0x181)](_0x13b72a(0x16f)+_0x1c47e3+'.'),{'ok':![]};if(!shouldInstallTarget(_0x57b31e,_0x41a55f)){const _0x5556be=_0x41a55f[_0x13b72a(0x154)]===_0x13b72a(0x164)?_0x13b72a(0x166)+_0x41a55f['version']+').':_0x13b72a(0x185)+_0x41a55f['version']+').';return console['log'](_0x5556be),{'ok':repairCurrentBuiltinSkill(_0x2c5ed8[_0x13b72a(0x145)])};}console['log'](_0x13b72a(0x147)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x57b31e+'\x20->\x20'+_0x41a55f['version']);const _0x4e33a5=installCliPackage(_0x41a55f[_0x13b72a(0x164)],_0x2c5ed8[_0x13b72a(0x145)]);if(!_0x4e33a5['ok']){const _0x532696=_0x13b72a(0x13a)+(_0x4e33a5[_0x13b72a(0x18a)]||'unknown');return console[_0x13b72a(0x18a)](_0x532696),console[_0x13b72a(0x15a)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x41a55f['version']),{'ok':![]};}return console['log'](_0x13b72a(0x14e)+_0x41a55f['version']+'.'),console[_0x13b72a(0x15a)](_0x13b72a(0x17e)),{'ok':verifyUpdatedBuiltinSkill(_0x41a55f['version'])};}export const updateDefinition={'service':a84_0x42cbf6(0x148),'command':'run','description':'Update\x20the\x20'+CLI_BIN_NAME+a84_0x42cbf6(0x16d),'risk':a84_0x42cbf6(0x18c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a85_0x5133c4=a85_0x45ee;(function(_0x5d3947,_0x24c3c9){const _0x45ab29=a85_0x45ee,_0x5ae14b=_0x5d3947();while(!![]){try{const _0x3210e5=parseInt(_0x45ab29(0xeb))/0x1+parseInt(_0x45ab29(0xe0))/0x2+-parseInt(_0x45ab29(0xe7))/0x3+-parseInt(_0x45ab29(0xe8))/0x4+-parseInt(_0x45ab29(0xe6))/0x5*(-parseInt(_0x45ab29(0xdb))/0x6)+parseInt(_0x45ab29(0xee))/0x7*(parseInt(_0x45ab29(0xf4))/0x8)+parseInt(_0x45ab29(0xd9))/0x9*(-parseInt(_0x45ab29(0xf7))/0xa);if(_0x3210e5===_0x24c3c9)break;else _0x5ae14b['push'](_0x5ae14b['shift']());}catch(_0x57c29f){_0x5ae14b['push'](_0x5ae14b['shift']());}}}(a85_0x4435,0x9e718));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING='The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.',SUPPORTED_PROVIDERS=[a85_0x5133c4(0xf0)];function readBindingInput(_0x4a5568){const _0x2fdbe8=a85_0x5133c4,_0x55768e=_0x4a5568['str']('provider')[_0x2fdbe8(0xed)]()['toLowerCase']();if(!SUPPORTED_PROVIDERS[_0x2fdbe8(0xdc)](_0x55768e))throw CliErrors[_0x2fdbe8(0xf6)](_0x2fdbe8(0xf2)+(_0x55768e||_0x2fdbe8(0xef))+'.',_0x2fdbe8(0xe3)+SUPPORTED_PROVIDERS[_0x2fdbe8(0xe1)](',\x20')+'.');const _0x4e0000=_0x4a5568['str'](_0x2fdbe8(0xdd))[_0x2fdbe8(0xed)]();if(!_0x4e0000)throw CliErrors[_0x2fdbe8(0xf6)](_0x2fdbe8(0xe2),_0x2fdbe8(0xe5));return{'provider':_0x55768e,'accountId':_0x4e0000};}function buildBindingData(_0x27dad8,_0x5698e4,_0x392d52){const _0x4e497=a85_0x5133c4;return{'operation':_0x4e497(0xec),'selector':{'provider':_0x27dad8,'accountId':_0x5698e4},'before':null,'after':{'provider':_0x27dad8,'accountId':_0x5698e4,'bound':!![]},'dryRun':_0x392d52,'warnings':[CURRENT_BINDING_WARNING]};}function a85_0x45ee(_0x3b357e,_0x3b7f6c){_0x3b357e=_0x3b357e-0xd9;const _0x44357c=a85_0x4435();let _0x45ee4a=_0x44357c[_0x3b357e];return _0x45ee4a;}function a85_0x4435(){const _0x48f1ca=['POST','1097847MNufJd','bind','trim','925092vwFRgL','(empty)','dingtalk','string','Unsupported\x20provider:\x20','provider','56xchnUm','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.','validation','710ooScjC','Binds\x20the\x20platform\x20user\x20of\x20the\x20current\x20AccessKey\x20to\x20the\x20given\x20collaboration-provider\x20account.\x20An\x20existing\x20bind\x20for\x20the\x20same\x20provider\x20may\x20be\x20replaced.','83646IYFdAT','External\x20account\x20ID\x20for\x20the\x20selected\x20provider','30OdHguR','includes','account-id','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','439628AfcTRq','join','--account-id\x20cannot\x20be\x20empty.','Pass\x20one\x20of:\x20','user-account','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.','228815NEPgwS','1919889UfHeqQ','2090988imoNTw','write'];a85_0x4435=function(){return _0x48f1ca;};return a85_0x4435();}export const bindUserAccount={'service':a85_0x5133c4(0xe4),'command':a85_0x5133c4(0xec),'description':a85_0x5133c4(0xde),'risk':a85_0x5133c4(0xe9),'confirmationDescription':a85_0x5133c4(0xf8),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':a85_0x5133c4(0xf3),'type':a85_0x5133c4(0xf1),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':'External\x20account\x20provider'},{'name':a85_0x5133c4(0xdd),'type':a85_0x5133c4(0xf1),'required':!![],'description':a85_0x5133c4(0xda)}],async 'validate'(_0x499ed0){readBindingInput(_0x499ed0);},async 'dryRun'(_0x54f76b){const _0x33e030=a85_0x5133c4,{provider:_0x47f286,accountId:_0x39d134}=readBindingInput(_0x54f76b);return{...buildBindingData(_0x47f286,_0x39d134,!![]),'method':_0x33e030(0xea),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x47f286,'accountId':_0x39d134}};},async 'execute'(_0xead88f){const _0x50ab33=a85_0x5133c4,{provider:_0x2a89b1,accountId:_0x180b1c}=readBindingInput(_0xead88f),_0x5729c0=await bindExternalUserAccount(_0x2a89b1,_0x180b1c);if(_0x5729c0!==!![])throw CliErrors['apiError']('External\x20account\x20binding\x20was\x20not\x20confirmed.',_0x50ab33(0xf5));return{'ok':!![],'data':buildBindingData(_0x2a89b1,_0x180b1c,![]),'message':_0x50ab33(0xdf)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a86_0x43ff(_0x443e05,_0x401aaf){_0x443e05=_0x443e05-0x1d4;const _0x5cbfc7=a86_0x5cbf();let _0x43ffd2=_0x5cbfc7[_0x443e05];return _0x43ffd2;}(function(_0x24251d,_0x2ae073){const _0x308cda=a86_0x43ff,_0x5f2a58=_0x24251d();while(!![]){try{const _0x2f8072=parseInt(_0x308cda(0x1d5))/0x1*(-parseInt(_0x308cda(0x1de))/0x2)+parseInt(_0x308cda(0x1da))/0x3+-parseInt(_0x308cda(0x1d7))/0x4+-parseInt(_0x308cda(0x1d8))/0x5*(parseInt(_0x308cda(0x1df))/0x6)+-parseInt(_0x308cda(0x1d9))/0x7*(parseInt(_0x308cda(0x1d4))/0x8)+parseInt(_0x308cda(0x1dd))/0x9*(parseInt(_0x308cda(0x1dc))/0xa)+parseInt(_0x308cda(0x1db))/0xb*(parseInt(_0x308cda(0x1d6))/0xc);if(_0x2f8072===_0x2ae073)break;else _0x5f2a58['push'](_0x5f2a58['shift']());}catch(_0x1fe245){_0x5f2a58['push'](_0x5f2a58['shift']());}}}(a86_0x5cbf,0xbf665));import{bindUserAccount}from'../../commands/user-account/bind.js';export const userAccountDefinitions=[bindUserAccount];function a86_0x5cbf(){const _0x27d5e9=['9709931jZqlfs','106323kmiSRM','5962ypuzbm','10VFYEkx','3152205upNRtp','358886IynjCj','18iPDMti','8YjgFkz','2XFfEnn','88596LvNdRY','3494248PfwyOW','1639530rZtWFa'];a86_0x5cbf=function(){return _0x27d5e9;};return a86_0x5cbf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x457069=a87_0x5d27;(function(_0x3c8140,_0xebaa29){const _0x37309c=a87_0x5d27,_0x56c7ac=_0x3c8140();while(!![]){try{const _0x4094cb=-parseInt(_0x37309c(0x146))/0x1*(parseInt(_0x37309c(0x171))/0x2)+-parseInt(_0x37309c(0x145))/0x3*(parseInt(_0x37309c(0x16e))/0x4)+-parseInt(_0x37309c(0x151))/0x5+-parseInt(_0x37309c(0x153))/0x6+-parseInt(_0x37309c(0x160))/0x7*(-parseInt(_0x37309c(0x16f))/0x8)+parseInt(_0x37309c(0x143))/0x9*(parseInt(_0x37309c(0x158))/0xa)+parseInt(_0x37309c(0x13c))/0xb;if(_0x4094cb===_0xebaa29)break;else _0x56c7ac['push'](_0x56c7ac['shift']());}catch(_0x3f82a7){_0x56c7ac['push'](_0x56c7ac['shift']());}}}(a87_0x4042,0xdc0e4));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':a87_0x457069(0x147),'description':a87_0x457069(0x150)},{'name':a87_0x457069(0x142),'type':a87_0x457069(0x147),'description':a87_0x457069(0x137)},{'name':a87_0x457069(0x15f),'type':a87_0x457069(0x147),'description':'Target\x20environment','enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x38fb41,_0x9e22d7){const _0x42221d=a87_0x457069,_0x4c4ee9=_0x38fb41['str']('app')[_0x42221d(0x167)](),_0x5e6d00=_0x38fb41[_0x42221d(0x144)](_0x42221d(0x142))[_0x42221d(0x167)](),_0x435567=_0x38fb41[_0x42221d(0x144)](_0x42221d(0x15f))[_0x42221d(0x167)](),_0x1307e5=resolveWorkspaceEnv(_0x435567||_0x38fb41[_0x42221d(0x165)]||DEFAULT_CONFIG_VALUES[_0x42221d(0x15f)]);if(!_0x4c4ee9&&!_0x5e6d00)throw CliErrors['validation'](_0x42221d(0x16d),_0x42221d(0x157)+CLI_BIN_NAME+_0x42221d(0x172)+_0x9e22d7+_0x42221d(0x13b)+CLI_BIN_NAME+_0x42221d(0x172)+_0x9e22d7+'\x20--appcode\x20<code>\x20[--env\x20daily]');if(_0x4c4ee9&&_0x5e6d00)throw CliErrors[_0x42221d(0x166)](_0x42221d(0x13a),'Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.');const _0x1ab3ee=resolveWriteConfigPath(_0x42221d(0x15e)),_0xa449e9=readConfigFile(_0x1ab3ee);assertWorkspaceCommandState(_0x9e22d7,_0xa449e9);const _0x3fb5ac=_0x5e6d00||await resolveRemoteAppCode({'command':_0x9e22d7,'appName':_0x4c4ee9,'env':_0x1307e5,'accessKey':_0x38fb41[_0x42221d(0x15c)]});return writeWorkspaceConfig({'command':_0x9e22d7,'appName':_0x4c4ee9,'appcode':_0x3fb5ac,'env':_0x1307e5,'shouldWriteEnv':!!_0x435567,'accessKey':_0x38fb41[_0x42221d(0x15c)]},_0x1ab3ee,_0xa449e9),{'ok':!![],'data':{'configPath':_0x1ab3ee,'app':_0x4c4ee9||null,'appcode':_0x3fb5ac,'env':_0x435567?_0x1307e5:null,'accessKeyWritten':![],'command':_0x42221d(0x15d)+_0x9e22d7},'message':buildWorkspaceMessage(_0x1ab3ee,_0x4c4ee9,_0x3fb5ac,_0x435567?_0x1307e5:undefined)};}async function resolveRemoteAppCode(_0xc1545f){const _0xef963a=a87_0x457069;if(!_0xc1545f[_0xef963a(0x15c)])throw CliErrors[_0xef963a(0x16b)](_0xef963a(0x14d)+CLI_BIN_NAME+_0xef963a(0x172)+_0xc1545f[_0xef963a(0x136)]+'.');const {setActiveAK:_0x487a64}=await import('../../core/api-client.js'),{getRemoteAppList:_0x3d7608}=await import(_0xef963a(0x173));_0x487a64(_0xc1545f[_0xef963a(0x15c)]);const _0x40677a=await _0x3d7608({'env':_0xc1545f[_0xef963a(0x15f)],'accessKey':_0xc1545f[_0xef963a(0x15c)],'noCache':![]}),_0x46c3e2=findAppByName(_0x40677a[_0xef963a(0x16c)],_0xc1545f[_0xef963a(0x15b)]);if(_0x46c3e2&&!isRuntimeAccessibleApp(_0x46c3e2))throw runtimeInaccessibleAppError(_0x46c3e2,'\x22'+_0xc1545f[_0xef963a(0x15b)]+'\x22');const _0x4b29e0=_0x46c3e2?.['appCode']?.[_0xef963a(0x167)]();if(_0x4b29e0)return _0x4b29e0;const _0x58e2e5=_0x40677a['items'][_0xef963a(0x159)](_0xbe01a7=>_0xbe01a7[_0xef963a(0x15b)])['filter'](Boolean),_0x146209=_0x58e2e5[_0xef963a(0x140)]?'Available\x20apps:\x20'+Array[_0xef963a(0x161)](new Set(_0x58e2e5))[_0xef963a(0x149)](',\x20')+'.':_0xef963a(0x14e)+CLI_BIN_NAME+_0xef963a(0x139);throw CliErrors[_0xef963a(0x166)]('App\x20\x22'+_0xc1545f[_0xef963a(0x15b)]+_0xef963a(0x15a),_0x146209);}function writeWorkspaceConfig(_0x153530,_0x56b8fd,_0x282d47){const _0x576158=a87_0x457069;_0x153530[_0x576158(0x13f)]&&(_0x282d47[_0x576158(0x15f)]=_0x153530[_0x576158(0x15f)]);if(_0x153530[_0x576158(0x15b)]){const _0x60be1f=isRecord(_0x282d47[_0x576158(0x141)])?{..._0x282d47['apps']}:{},_0x3c0525=isRecord(_0x60be1f[_0x153530['appName']])?_0x60be1f[_0x153530[_0x576158(0x15b)]]:{};return _0x60be1f[_0x153530['appName']]={..._0x3c0525,'appcode':_0x153530[_0x576158(0x142)]},_0x282d47['apps']=_0x60be1f,_0x282d47['defaultApp']=_0x153530[_0x576158(0x15b)],delete _0x282d47[_0x576158(0x142)],delete _0x282d47[_0x576158(0x14b)],writeAndReturn(_0x56b8fd,_0x282d47);}return _0x282d47[_0x576158(0x142)]=_0x153530['appcode'],delete _0x282d47[_0x576158(0x162)],delete _0x282d47[_0x576158(0x14b)],writeAndReturn(_0x56b8fd,_0x282d47);}function writeAndReturn(_0xb258d8,_0x5f3c4b){return writeConfigFile(_0xb258d8,_0x5f3c4b),_0xb258d8;}function resolveWorkspaceEnv(_0x46b285){const _0x19cbfc=a87_0x457069;if(RUNTIME_ENV_VALUES[_0x19cbfc(0x13d)](_0x46b285))return _0x46b285;throw CliErrors[_0x19cbfc(0x166)]('Invalid\x20env\x20\x22'+_0x46b285+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x19cbfc(0x149)](',\x20'));}function a87_0x5d27(_0x39b17a,_0x40ea5d){_0x39b17a=_0x39b17a-0x136;const _0x404287=a87_0x4042();let _0x5d271a=_0x404287[_0x39b17a];return _0x5d271a;}function buildWorkspaceMessage(_0xe8b0db,_0x158e18,_0x4492bd,_0x10acdb){const _0x5b941f=a87_0x457069,_0x18719d=_0x158e18?_0x158e18+'\x20('+_0x4492bd+')':_0x4492bd,_0x1100d8=_0x10acdb?_0x5b941f(0x163)+_0x10acdb:'';return _0x5b941f(0x13e)+_0xe8b0db+_0x5b941f(0x14a)+_0x18719d+_0x1100d8+_0x5b941f(0x155);}function isRecord(_0x571911){const _0x54499f=a87_0x457069;return typeof _0x571911==='object'&&_0x571911!==null&&!Array[_0x54499f(0x14c)](_0x571911);}function hasWorkspaceAppBinding(_0x1de83e){const _0x5640b1=a87_0x457069;if(typeof _0x1de83e[_0x5640b1(0x142)]===_0x5640b1(0x147)&&_0x1de83e['appcode'][_0x5640b1(0x167)]()[_0x5640b1(0x140)]>0x0)return!![];if(typeof _0x1de83e[_0x5640b1(0x162)]!==_0x5640b1(0x147)||!_0x1de83e[_0x5640b1(0x162)][_0x5640b1(0x167)]())return![];if(!isRecord(_0x1de83e[_0x5640b1(0x141)]))return![];const _0x4de46f=_0x1de83e[_0x5640b1(0x141)][_0x1de83e[_0x5640b1(0x162)][_0x5640b1(0x167)]()];return isRecord(_0x4de46f)&&typeof _0x4de46f[_0x5640b1(0x142)]==='string'&&_0x4de46f[_0x5640b1(0x142)][_0x5640b1(0x167)]()['length']>0x0;}function a87_0x4042(){const _0x3a7ef7=['App\x20code\x20to\x20bind\x20directly','Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','Conflicting\x20workspace\x20app\x20selectors.','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','20317330RwkgQa','includes','Workspace\x20configured.\x0aConfig\x20file:\x20','shouldWriteEnv','length','apps','appcode','9frPOoV','str','3LQqFhM','49TDOcCv','string','workspace','join','\x0aDefault\x20app:\x20','app','isArray','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','Run\x20`','Updates\x20the\x20app\x20binding\x20already\x20present\x20in\x20the\x20current\x20working\x20directory\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','5923890AYsQTZ','Workspace\x20app\x20context\x20is\x20not\x20initialized.','565272igsYtr','Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet','\x0aAccessKey:\x20not\x20written','\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`','Usage:\x20','17569430nMDnEI','map','\x22\x20not\x20found.','appName','accessKey','workspace\x20','project','env','2373fdTbfl','from','defaultApp','\x0aEnv:\x20','init','envName','validation','trim','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','use','Workspace\x20app\x20context\x20is\x20already\x20initialized.','authRequired','items','Missing\x20workspace\x20app\x20selector.','4977828iDksRf','15160VyNVgE','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','33534waqWLZ','\x20workspace\x20','../../commands/app/remote-source.js','command'];a87_0x4042=function(){return _0x3a7ef7;};return a87_0x4042();}function assertWorkspaceCommandState(_0xbe3e7c,_0x322224){const _0xa11225=a87_0x457069,_0x4aaeca=hasWorkspaceAppBinding(_0x322224);if(_0xbe3e7c===_0xa11225(0x164)&&_0x4aaeca)throw CliErrors[_0xa11225(0x166)](_0xa11225(0x16a),'Use\x20`'+CLI_BIN_NAME+_0xa11225(0x168)+CLI_BIN_NAME+'\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.');if(_0xbe3e7c==='use'&&!_0x4aaeca)throw CliErrors[_0xa11225(0x166)](_0xa11225(0x152),_0xa11225(0x14e)+CLI_BIN_NAME+_0xa11225(0x156)+CLI_BIN_NAME+_0xa11225(0x170));}function makeWorkspaceCommand(_0x230757){const _0x14741a=a87_0x457069;return{'service':_0x14741a(0x148),'command':_0x230757,'description':_0x230757==='init'?_0x14741a(0x154):_0x14741a(0x138),'risk':'write','confirmationDescription':_0x230757===_0x14741a(0x164)?'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.':_0x14741a(0x14f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x5bf466){return executeWorkspaceUse(_0x5bf466,_0x230757);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a87_0x457069(0x164)),makeWorkspaceCommand(a87_0x457069(0x169))];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DOMAIN_CONFIG_FIELDS: readonly ["userDomain", "apiDomain", "runtimeDomain", "skillDomain", "kbDomain"];
|
|
2
|
+
export type DomainConfigField = (typeof DOMAIN_CONFIG_FIELDS)[number];
|
|
3
|
+
export type DomainConfig = Partial<Record<DomainConfigField, string>>;
|
|
4
|
+
/** Old domain keys accepted only while reading existing configuration. */
|
|
5
|
+
export declare const LEGACY_DOMAIN_CONFIG_FIELDS: readonly ["agentDomain", "platformDomain", "skillHubDomain"];
|
|
6
|
+
/** Validates and normalizes an exact HTTPS origin used for authenticated requests. */
|
|
7
|
+
export declare function normalizeDomainOrigin(field: DomainConfigField, input: unknown): string;
|
|
8
|
+
export declare function readDomainConfig(filePath: string): DomainConfig;
|
|
9
|
+
export declare function resolveDomainFlags(ctx: {
|
|
10
|
+
str(name: string): string;
|
|
11
|
+
}): DomainConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a88_0x5ced67=a88_0x23b7;(function(_0x15bb45,_0x56fcbf){const _0x36e2ad=a88_0x23b7,_0x52ff9a=_0x15bb45();while(!![]){try{const _0x1f60b2=parseInt(_0x36e2ad(0x179))/0x1+-parseInt(_0x36e2ad(0x187))/0x2+parseInt(_0x36e2ad(0x186))/0x3+parseInt(_0x36e2ad(0x18c))/0x4*(parseInt(_0x36e2ad(0x17a))/0x5)+-parseInt(_0x36e2ad(0x16c))/0x6*(parseInt(_0x36e2ad(0x178))/0x7)+-parseInt(_0x36e2ad(0x180))/0x8*(parseInt(_0x36e2ad(0x15e))/0x9)+parseInt(_0x36e2ad(0x183))/0xa*(parseInt(_0x36e2ad(0x162))/0xb);if(_0x1f60b2===_0x56fcbf)break;else _0x52ff9a['push'](_0x52ff9a['shift']());}catch(_0x27acdb){_0x52ff9a['push'](_0x52ff9a['shift']());}}}(a88_0x198b,0x5f4f9));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';function a88_0x198b(){const _0x1544bb=[':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','https:','length','7GqXvOq','248616iGkqss','50UseOzD','password','filter','includes','Domain\x20config\x20file\x20not\x20found:\x20','agentDomain','199384pkjqcx','kb-domain','parse','9446290ysfAdN','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','isArray','22917YXDkMN','889834MZOdrw','Unsupported\x20domain\x20config\x20field(s):\x20','skill-domain','Invalid\x20','trim','3332kfYbqk','pathname','runtime-domain','Invalid\x20domain\x20config\x20JSON:\x20','object','99Bjckkd','origin','user-domain','kbDomain','11QnCkHT','skillHubDomain',':\x20\x22','string','cwd','userDomain','str','apiDomain','platformDomain','validation','598506Tjdtop','utf8','keys','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','Allowed\x20fields:\x20','join','hash','\x22\x20is\x20not\x20a\x20valid\x20URL.','search'];a88_0x198b=function(){return _0x1544bb;};return a88_0x198b();}export const DOMAIN_CONFIG_FIELDS=[a88_0x5ced67(0x167),a88_0x5ced67(0x169),'runtimeDomain','skillDomain',a88_0x5ced67(0x161)];const DOMAIN_FLAGS={'userDomain':a88_0x5ced67(0x160),'apiDomain':'api-domain','runtimeDomain':a88_0x5ced67(0x18e),'skillDomain':a88_0x5ced67(0x189),'kbDomain':a88_0x5ced67(0x181)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a88_0x5ced67(0x17f),a88_0x5ced67(0x16a),a88_0x5ced67(0x163)];function a88_0x23b7(_0x4d9910,_0x35612b){_0x4d9910=_0x4d9910-0x15d;const _0x198b3f=a88_0x198b();let _0x23b7bb=_0x198b3f[_0x4d9910];return _0x23b7bb;}export function normalizeDomainOrigin(_0x1a8e29,_0x37fd68){const _0x274ae5=a88_0x5ced67;if(typeof _0x37fd68!==_0x274ae5(0x165)||!_0x37fd68['trim']())throw CliErrors['validation']('Invalid\x20'+_0x1a8e29+_0x274ae5(0x175));let _0x40b123;try{_0x40b123=new URL(_0x37fd68[_0x274ae5(0x18b)]());}catch{throw CliErrors[_0x274ae5(0x16b)]('Invalid\x20'+_0x1a8e29+_0x274ae5(0x164)+_0x37fd68+_0x274ae5(0x173));}if(_0x40b123['protocol']!==_0x274ae5(0x176)||_0x40b123['username']||_0x40b123[_0x274ae5(0x17b)]||_0x40b123[_0x274ae5(0x18d)]!=='/'&&_0x40b123['pathname']!==''||_0x40b123[_0x274ae5(0x174)]||_0x40b123[_0x274ae5(0x172)])throw CliErrors['validation'](_0x274ae5(0x18a)+_0x1a8e29+':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.');return _0x40b123[_0x274ae5(0x15f)];}export function readDomainConfig(_0x128857){const _0x297bc9=a88_0x5ced67,_0x29d599=isAbsolute(_0x128857)?_0x128857:resolve(process[_0x297bc9(0x166)](),_0x128857);if(!existsSync(_0x29d599))throw CliErrors[_0x297bc9(0x16b)](_0x297bc9(0x17e)+_0x29d599);let _0xe59b41;try{_0xe59b41=JSON[_0x297bc9(0x182)](readFileSync(_0x29d599,_0x297bc9(0x16d)));}catch{throw CliErrors[_0x297bc9(0x16b)](_0x297bc9(0x18f)+_0x29d599);}if(!_0xe59b41||typeof _0xe59b41!==_0x297bc9(0x15d)||Array[_0x297bc9(0x185)](_0xe59b41))throw CliErrors[_0x297bc9(0x16b)](_0x297bc9(0x16f));const _0x46dfce=_0xe59b41,_0x4a372e=Object[_0x297bc9(0x16e)](_0x46dfce)[_0x297bc9(0x17c)](_0x4d6397=>!DOMAIN_CONFIG_FIELDS[_0x297bc9(0x17d)](_0x4d6397));if(_0x4a372e['length']>0x0)throw CliErrors['validation'](_0x297bc9(0x188)+_0x4a372e[_0x297bc9(0x171)](',\x20'),_0x297bc9(0x170)+DOMAIN_CONFIG_FIELDS[_0x297bc9(0x171)](',\x20'));const _0x2c5017={};for(const _0x2b7f38 of DOMAIN_CONFIG_FIELDS){_0x46dfce[_0x2b7f38]!==undefined&&(_0x2c5017[_0x2b7f38]=normalizeDomainOrigin(_0x2b7f38,_0x46dfce[_0x2b7f38]));}if(Object['keys'](_0x2c5017)[_0x297bc9(0x177)]===0x0)throw CliErrors['validation'](_0x297bc9(0x184));return _0x2c5017;}export function resolveDomainFlags(_0x29c1fc){const _0x20f8ee=a88_0x5ced67,_0x515bbe=(_0x29c1fc[_0x20f8ee(0x168)]('domain-config')||'')[_0x20f8ee(0x18b)](),_0x373ad9=_0x515bbe?readDomainConfig(_0x515bbe):{};for(const _0x15d3da of DOMAIN_CONFIG_FIELDS){const _0xd71d1e=(_0x29c1fc[_0x20f8ee(0x168)](DOMAIN_FLAGS[_0x15d3da])||'')['trim']();if(_0xd71d1e)_0x373ad9[_0x15d3da]=normalizeDomainOrigin(_0x15d3da,_0xd71d1e);}return _0x373ad9;}
|
package/lib/config/schema.d.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
import { RUNTIME_ENV_VALUES } from "../constant/env.js";
|
|
20
20
|
export type RuntimeEnv = (typeof RUNTIME_ENV_VALUES)[number];
|
|
21
21
|
/** All configuration field names recognized by the runtime CLI. */
|
|
22
|
-
type ConfigFieldName = "env" | "format" | "pageSize" | "apiDomain" | "userDomain" | "runtimeDomain" | "
|
|
22
|
+
type ConfigFieldName = "env" | "region" | "format" | "pageSize" | "apiDomain" | "userDomain" | "runtimeDomain" | "skillDomain" | "kbDomain" | "accessKey" | "riskLevel" | "locale";
|
|
23
23
|
/**
|
|
24
24
|
* Schema for a single configuration field.
|
|
25
25
|
*
|
|
@@ -58,6 +58,8 @@ interface ConfigFieldSchema {
|
|
|
58
58
|
export declare const CONFIG_FIELD_SCHEMAS: Record<ConfigFieldName, ConfigFieldSchema>;
|
|
59
59
|
/** Set of top-level CLI-settable keys. */
|
|
60
60
|
export declare const TOP_LEVEL_CONFIG_KEYS: Set<string>;
|
|
61
|
+
/** Fields that config mutation commands must never change. */
|
|
62
|
+
export declare const CLI_PROTECTED_CONFIG_KEYS: Set<ConfigFieldName>;
|
|
61
63
|
/** Map of field name → permitted enum values (only for fields with `enumValues`). */
|
|
62
64
|
export declare const CONFIG_ENUM_VALUES: Record<string, string[]>;
|
|
63
65
|
/** All fields that can be imported from `.rabetbase.json`. */
|
|
@@ -70,6 +72,10 @@ export declare function getConfigEnumValues(key: string): readonly string[] | un
|
|
|
70
72
|
export declare function getConfigDefaultValue(key: string): string | number | boolean | undefined;
|
|
71
73
|
/** @returns true if the key is a recognized top-level config field. */
|
|
72
74
|
export declare function isTopLevelConfigKey(key: string): boolean;
|
|
75
|
+
/** @returns true when CLI set/delete must reject the key. */
|
|
76
|
+
export declare function isCliProtectedConfigKey(key: string): boolean;
|
|
77
|
+
/** Normalize app-locale aliases. Does not change CLI language. */
|
|
78
|
+
export declare function normalizeLocale(value: string): "zh-CN" | "en-US" | null;
|
|
73
79
|
/**
|
|
74
80
|
* @returns true if the field exists only for backward compatibility.
|
|
75
81
|
* Legacy fields are readable but not acted upon by the runtime CLI.
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a89_0x4da1c7=a89_0x5035;(function(_0x188d13,_0x15eee2){const _0x3a8ce3=a89_0x5035,_0x40c4ef=_0x188d13();while(!![]){try{const _0x3dd45f=parseInt(_0x3a8ce3(0x202))/0x1+parseInt(_0x3a8ce3(0x1ec))/0x2*(-parseInt(_0x3a8ce3(0x204))/0x3)+-parseInt(_0x3a8ce3(0x1fb))/0x4+-parseInt(_0x3a8ce3(0x200))/0x5*(parseInt(_0x3a8ce3(0x1fa))/0x6)+-parseInt(_0x3a8ce3(0x1f1))/0x7+parseInt(_0x3a8ce3(0x1fe))/0x8+parseInt(_0x3a8ce3(0x1fd))/0x9;if(_0x3dd45f===_0x15eee2)break;else _0x40c4ef['push'](_0x40c4ef['shift']());}catch(_0x2424ff){_0x40c4ef['push'](_0x40c4ef['shift']());}}}(a89_0xe3de,0xe038c));function a89_0xe3de(){const _0x50e1d2=['entries','783MCLGgO','Default\x20page\x20size','defaultValue','Access\x20key\x20(client-ak\x20auth)','Lovrabet\x20region','legacyCompatOnly','Target\x20environment','riskLevel','5436vNTftk','Risk\x20level','Override\x20SkillHub\x20domain','map','locale','11863397QzxnDU','has','filter',';\x20local\x20alias:\x20apps.<alias>.appcode','Override\x20knowledge-base\x20domain','cliSettableTopLevel','Override\x20user\x20domain','enumValues','importable','6jcSwbn','1968324lOHrwS','zh-CN','31224240WIITLY','679680IQOjBt','Config\x20key.\x20Top-level:\x20','6082085AdlYzM','Default\x20output\x20format','1476759GCpmfK'];a89_0xe3de=function(){return _0x50e1d2;};return a89_0xe3de();}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export const CONFIG_FIELD_SCHEMAS={'region':{'description':a89_0x4da1c7(0x208),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':ENABLED_LOVRABET_REGION_VALUES,'defaultValue':DEFAULT_LOVRABET_REGION,'importable':!![]},'env':{'description':a89_0x4da1c7(0x1ea),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['env'],'importable':!![]},'format':{'description':a89_0x4da1c7(0x201),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['format'],'importable':!![]},'pageSize':{'description':a89_0x4da1c7(0x205),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':'Override\x20API\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a89_0x4da1c7(0x1f7),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':'Override\x20runtime\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillDomain':{'description':a89_0x4da1c7(0x1ee),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'kbDomain':{'description':a89_0x4da1c7(0x1f5),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a89_0x4da1c7(0x207),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a89_0x4da1c7(0x1ed),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x4da1c7(0x1eb)],'importable':!![]},'locale':{'description':'App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','topLevel':!![],'cliSettableTopLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x4da1c7(0x1f0)],'importable':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a89_0x4da1c7(0x203)](CONFIG_FIELD_SCHEMAS)[a89_0x4da1c7(0x1f3)](([,_0x19a358])=>_0x19a358[a89_0x4da1c7(0x1f6)])[a89_0x4da1c7(0x1ef)](([_0x332a5d])=>_0x332a5d));export const CLI_PROTECTED_CONFIG_KEYS=new Set([a89_0x4da1c7(0x1eb)]);export const CONFIG_ENUM_VALUES=Object['fromEntries'](Object[a89_0x4da1c7(0x203)](CONFIG_FIELD_SCHEMAS)[a89_0x4da1c7(0x1f3)](([,_0x5ea889])=>_0x5ea889[a89_0x4da1c7(0x1f8)])[a89_0x4da1c7(0x1ef)](([_0x32120d,_0x97a3ee])=>[_0x32120d,[..._0x97a3ee[a89_0x4da1c7(0x1f8)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a89_0x4da1c7(0x203)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x4b739f])=>_0x4b739f[a89_0x4da1c7(0x1f9)])['map'](([_0x20d61a])=>_0x20d61a);export function getConfigFieldSchema(_0x1d30ef){return CONFIG_FIELD_SCHEMAS[_0x1d30ef];}export function getConfigEnumValues(_0x292a77){return getConfigFieldSchema(_0x292a77)?.['enumValues'];}export function getConfigDefaultValue(_0x5796a0){const _0x5625b6=a89_0x4da1c7;return getConfigFieldSchema(_0x5796a0)?.[_0x5625b6(0x206)];}function a89_0x5035(_0x2e246,_0x878d7){_0x2e246=_0x2e246-0x1e9;const _0xe3def8=a89_0xe3de();let _0x503546=_0xe3def8[_0x2e246];return _0x503546;}export function isTopLevelConfigKey(_0x531df3){const _0x2106c0=a89_0x4da1c7;return TOP_LEVEL_CONFIG_KEYS[_0x2106c0(0x1f2)](_0x531df3);}export function isCliProtectedConfigKey(_0x500c62){return CLI_PROTECTED_CONFIG_KEYS['has'](_0x500c62);}const LOCALE_MAP={'zh':a89_0x4da1c7(0x1fc),'zh-cn':a89_0x4da1c7(0x1fc),'zh_cn':a89_0x4da1c7(0x1fc),'en':'en-US','en-us':'en-US','en_us':'en-US'};export function normalizeLocale(_0x4f7cea){if(!_0x4f7cea)return null;return LOCALE_MAP[_0x4f7cea['toLowerCase']()]??null;}export function isLegacyCompatConfigKey(_0x3a7286){const _0x5eaca7=a89_0x4da1c7;return getConfigFieldSchema(_0x3a7286)?.[_0x5eaca7(0x1e9)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x585b7a){return[..._0x585b7a]['join'](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x49ada1=a89_0x4da1c7;return _0x49ada1(0x1ff)+getTopLevelConfigKeySummary()+_0x49ada1(0x1f4);}export function buildAppProfileListFields(_0x2862c2){return{'env':_0x2862c2,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x10e343=a90_0x23d0;(function(_0x4f8e67,_0x13086a){const _0x40df34=a90_0x23d0,_0x5d235c=_0x4f8e67();while(!![]){try{const _0x20ea64=parseInt(_0x40df34(0x1bf))/0x1*(parseInt(_0x40df34(0x1cb))/0x2)+parseInt(_0x40df34(0x1c4))/0x3*(parseInt(_0x40df34(0x1c8))/0x4)+-parseInt(_0x40df34(0x1c7))/0x5+-parseInt(_0x40df34(0x1c1))/0x6*(parseInt(_0x40df34(0x1c9))/0x7)+-parseInt(_0x40df34(0x1c5))/0x8+parseInt(_0x40df34(0x1c2))/0x9*(-parseInt(_0x40df34(0x1ca))/0xa)+parseInt(_0x40df34(0x1c3))/0xb*(parseInt(_0x40df34(0x1c0))/0xc);if(_0x20ea64===_0x13086a)break;else _0x5d235c['push'](_0x5d235c['shift']());}catch(_0x3b8e22){_0x5d235c['push'](_0x5d235c['shift']());}}}(a90_0x554b,0x77cf8));export const APP_PUBLISH_STATUS={'Published':a90_0x10e343(0x1be),'Unpublished':'UNPUBLISH'};function a90_0x554b(){const _0x53148c=['3395MwNkCV','1894660ssJZhU','5332DqxzZZ','PUBLISHED','358DqVuzw','1639140SSFctH','6978gcPNdJ','9PjpIbb','33wzNLth','30147GRrlQD','3647256fJibuv','Published','1385150ZIZRUY','244daukDb'];a90_0x554b=function(){return _0x53148c;};return a90_0x554b();}function a90_0x23d0(_0x2e7389,_0x45d0bb){_0x2e7389=_0x2e7389-0x1be;const _0x554bea=a90_0x554b();let _0x23d0e6=_0x554bea[_0x2e7389];return _0x23d0e6;}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a90_0x10e343(0x1c6)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x2c1aba=a91_0x3a15;(function(_0x90ea11,_0x23e565){const _0x2b03ba=a91_0x3a15,_0x54e440=_0x90ea11();while(!![]){try{const _0x3f0c73=-parseInt(_0x2b03ba(0x14c))/0x1*(-parseInt(_0x2b03ba(0x148))/0x2)+-parseInt(_0x2b03ba(0x149))/0x3+-parseInt(_0x2b03ba(0x147))/0x4*(-parseInt(_0x2b03ba(0x145))/0x5)+-parseInt(_0x2b03ba(0x150))/0x6*(parseInt(_0x2b03ba(0x14b))/0x7)+-parseInt(_0x2b03ba(0x151))/0x8+parseInt(_0x2b03ba(0x146))/0x9*(-parseInt(_0x2b03ba(0x14f))/0xa)+-parseInt(_0x2b03ba(0x14d))/0xb*(-parseInt(_0x2b03ba(0x152))/0xc);if(_0x3f0c73===_0x23e565)break;else _0x54e440['push'](_0x54e440['shift']());}catch(_0x211ee3){_0x54e440['push'](_0x54e440['shift']());}}}(a91_0x106c,0x6165d));function a91_0x3a15(_0x3708e1,_0x12d8ce){_0x3708e1=_0x3708e1-0x145;const _0x106cf9=a91_0x106c();let _0x3a1589=_0x106cf9[_0x3708e1];return _0x3a1589;}export const AUTH_MODE={'ClientAk':a91_0x2c1aba(0x14e)};function a91_0x106c(){const _0xddbd26=['client-ak','10gedxwV','83982YtvXxu','1345912WxRhZD','12kFREJj','63725OOOwsF','6543729FCxZga','4AGBuYj','10vcHMxZ','1465251vBEkZp','ClientAk','14zmdWwN','66545YAzvsP','16117222jpoojA'];a91_0x106c=function(){return _0xddbd26;};return a91_0x106c();}export function isAuthMode(_0x3c6f){const _0x388960=a91_0x2c1aba;return _0x3c6f===AUTH_MODE[_0x388960(0x14a)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a92_0x5d02(_0x5f3de8,_0x4d322f){_0x5f3de8=_0x5f3de8-0x149;const _0x528d14=a92_0x528d();let _0x5d020e=_0x528d14[_0x5f3de8];return _0x5d020e;}const a92_0x468936=a92_0x5d02;(function(_0xe7bd06,_0x3091b7){const _0x26eef8=a92_0x5d02,_0x30950f=_0xe7bd06();while(!![]){try{const _0x24cfb5=-parseInt(_0x26eef8(0x179))/0x1+-parseInt(_0x26eef8(0x157))/0x2*(parseInt(_0x26eef8(0x151))/0x3)+-parseInt(_0x26eef8(0x150))/0x4+-parseInt(_0x26eef8(0x149))/0x5+parseInt(_0x26eef8(0x159))/0x6+-parseInt(_0x26eef8(0x161))/0x7*(-parseInt(_0x26eef8(0x162))/0x8)+parseInt(_0x26eef8(0x15f))/0x9;if(_0x24cfb5===_0x3091b7)break;else _0x30950f['push'](_0x30950f['shift']());}catch(_0x1a7e6a){_0x30950f['push'](_0x30950f['shift']());}}}(a92_0x528d,0x20768));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a92_0x468936(0x17a)];function a92_0x528d(){const _0x37b96d=['1566fxiaaX','params','yes','global','env','<expr>','7698285PCrxlh','<name>','14eGAHUL','302552KiPqsO','Clear\x20output','non-interactive','dry-run','Record\x20ID','production\x20|\x20development\x20|\x20daily','string','verbose','Preview\x20operation\x20without\x20executing','Name\x20filter','name','map','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','SQL\x20query\x20code','fromEntries','format','help','nonInteractive','meowKey','json\x20|\x20pretty\x20|\x20compress','JSON\x20params\x20for\x20execute\x20commands','app','type','187323TNxwtK','cliBinName','1186200BCtHQM','Use\x20global\x20config\x20scope','dryRun','boolean','Override\x20appcode','Output\x20format','Verbose\x20output','532600IDgChT','721749EDEHnD','appcode','Force\x20non-interactive\x20mode\x20(CI)','sqlcode','Show\x20help','Select\x20app\x20profile\x20by\x20name','2MugJPC','cliDisplayName'];a92_0x528d=function(){return _0x37b96d;};return a92_0x528d();}export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a92_0x468936(0x158)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a92_0x468936(0x152),'meowKey':a92_0x468936(0x152),'type':'string','description':a92_0x468936(0x14d),'hint':'<code>'},{'name':a92_0x468936(0x177),'meowKey':a92_0x468936(0x177),'type':a92_0x468936(0x168),'description':a92_0x468936(0x156),'hint':a92_0x468936(0x160)},{'name':a92_0x468936(0x15d),'meowKey':'env','type':'string','description':'Environment','hint':a92_0x468936(0x167)},{'name':'format','meowKey':'format','type':a92_0x468936(0x168),'description':a92_0x468936(0x14e),'hint':a92_0x468936(0x175)},{'name':'jq','meowKey':'jq','type':a92_0x468936(0x168),'description':a92_0x468936(0x16e),'hint':a92_0x468936(0x15e)},{'name':a92_0x468936(0x165),'meowKey':a92_0x468936(0x14b),'type':a92_0x468936(0x14c),'description':a92_0x468936(0x16a)},{'name':a92_0x468936(0x15b),'meowKey':a92_0x468936(0x15b),'type':'boolean','description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a92_0x468936(0x164),'meowKey':a92_0x468936(0x173),'type':'boolean','description':a92_0x468936(0x153)},{'name':a92_0x468936(0x15c),'meowKey':'global','type':a92_0x468936(0x14c),'description':a92_0x468936(0x14a)},{'name':'ci','meowKey':'ci','type':a92_0x468936(0x14c),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a92_0x468936(0x172),'meowKey':'help','type':a92_0x468936(0x14c),'description':a92_0x468936(0x155)},{'name':'id','meowKey':'id','type':a92_0x468936(0x168),'description':a92_0x468936(0x166),'hidden':!![]},{'name':a92_0x468936(0x16c),'meowKey':'name','type':a92_0x468936(0x168),'description':a92_0x468936(0x16b),'hidden':!![]},{'name':a92_0x468936(0x154),'meowKey':'sqlcode','type':a92_0x468936(0x168),'description':a92_0x468936(0x16f),'hidden':!![]},{'name':a92_0x468936(0x15a),'meowKey':'params','type':a92_0x468936(0x168),'description':a92_0x468936(0x176),'hidden':!![]},{'name':a92_0x468936(0x169),'meowKey':a92_0x468936(0x169),'type':a92_0x468936(0x14c),'description':a92_0x468936(0x14f),'hidden':!![]},{'name':'clear','meowKey':'clear','type':a92_0x468936(0x14c),'description':a92_0x468936(0x163),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a92_0x468936(0x152),'app',a92_0x468936(0x15d),a92_0x468936(0x171),'jq',a92_0x468936(0x165),a92_0x468936(0x15b),a92_0x468936(0x164),'ci']);export function buildMeowFlags(){const _0x37390d=a92_0x468936;return Object[_0x37390d(0x170)](GLOBAL_FLAGS[_0x37390d(0x16d)](_0x38f295=>[_0x38f295[_0x37390d(0x174)],{'type':_0x38f295[_0x37390d(0x178)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x88b5ee=a93_0x38c4;(function(_0x8653d4,_0xc2696c){const _0x9e0148=a93_0x38c4,_0x2ae6b1=_0x8653d4();while(!![]){try{const _0x247bdf=-parseInt(_0x9e0148(0x18e))/0x1+parseInt(_0x9e0148(0x18b))/0x2+-parseInt(_0x9e0148(0x18c))/0x3+-parseInt(_0x9e0148(0x18f))/0x4*(parseInt(_0x9e0148(0x18d))/0x5)+-parseInt(_0x9e0148(0x190))/0x6*(-parseInt(_0x9e0148(0x191))/0x7)+-parseInt(_0x9e0148(0x197))/0x8+-parseInt(_0x9e0148(0x198))/0x9*(-parseInt(_0x9e0148(0x192))/0xa);if(_0x247bdf===_0xc2696c)break;else _0x2ae6b1['push'](_0x2ae6b1['shift']());}catch(_0x2cc911){_0x2ae6b1['push'](_0x2ae6b1['shift']());}}}(a93_0x4a8b,0x882a9));export const DEFAULT_APP_PROFILE_NAME=a93_0x88b5ee(0x195);function a93_0x4a8b(){const _0x5ccab7=['2356264XdQXUI','27gNCDxl','write','770262ewybYE','432186EsxyIm','21405cShyMR','873123FTDpBm','428JmIUWF','427746PMlMHe','70oVSpna','4098270EcgloS','compress','production','main','en-US'];a93_0x4a8b=function(){return _0x5ccab7;};return a93_0x4a8b();}function a93_0x38c4(_0x3cd15c,_0x32718b){_0x3cd15c=_0x3cd15c-0x18a;const _0x4a8be9=a93_0x4a8b();let _0x38c4cb=_0x4a8be9[_0x3cd15c];return _0x38c4cb;}export const DEFAULT_CONFIG_VALUES={'env':a93_0x88b5ee(0x194),'format':a93_0x88b5ee(0x193),'locale':a93_0x88b5ee(0x196),'riskLevel':a93_0x88b5ee(0x18a)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a93_0x88b5ee(0x193);
|
|
@@ -10,3 +10,7 @@ export declare const LOVRABET_NPM_PACKAGE_NAME: "@lovrabet/lovrabet-cli";
|
|
|
10
10
|
export declare const LOVRABET_SKILL_SOURCE: "lovrabet/lovrabet-cli";
|
|
11
11
|
/** Npm registry base URL used only for dist-tag resolution. */
|
|
12
12
|
export declare const NPM_REGISTRY_BASE_URL: "https://registry.npmjs.org";
|
|
13
|
+
/** Public CDN origin for Runtime CLI operational policy files. */
|
|
14
|
+
export declare const LOVRABET_CLI_CDN_BASE_URL: "https://g.lovrabet.com";
|
|
15
|
+
/** Independent Runtime CLI stable/minimum version policy. */
|
|
16
|
+
export declare const LOVRABET_CLI_VERSION_POLICY_URL: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x21871a=a94_0x4b5e;function a94_0x4b5e(_0x4ba515,_0x40e7cc){_0x4ba515=_0x4ba515-0x177;const _0x3cb650=a94_0x3cb6();let _0x4b5e93=_0x3cb650[_0x4ba515];return _0x4b5e93;}(function(_0x203278,_0x49ef8a){const _0xc955cb=a94_0x4b5e,_0x5636de=_0x203278();while(!![]){try{const _0x2758e2=-parseInt(_0xc955cb(0x181))/0x1*(parseInt(_0xc955cb(0x180))/0x2)+parseInt(_0xc955cb(0x178))/0x3+parseInt(_0xc955cb(0x17f))/0x4*(parseInt(_0xc955cb(0x177))/0x5)+parseInt(_0xc955cb(0x17b))/0x6+parseInt(_0xc955cb(0x17c))/0x7+-parseInt(_0xc955cb(0x179))/0x8*(parseInt(_0xc955cb(0x17d))/0x9)+-parseInt(_0xc955cb(0x17e))/0xa*(parseInt(_0xc955cb(0x17a))/0xb);if(_0x2758e2===_0x49ef8a)break;else _0x5636de['push'](_0x5636de['shift']());}catch(_0x51bf1f){_0x5636de['push'](_0x5636de['shift']());}}}(a94_0x3cb6,0xbf596));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG['npmPackageName'];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a94_0x21871a(0x183)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG[a94_0x21871a(0x182)];export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+'/dist/lovrabet-cli/config/index.json';function a94_0x3cb6(){const _0x35ba4b=['286wrOjvw','5479ZPsLZv','cliCdnBaseUrl','skillSource','42235YlFxIx','2630580wqhjYH','112jGMZeG','649XgfKma','7737900fYLZaF','10124982nzpdoO','124839excGAN','567220zOCHfe','708GUSFoL'];a94_0x3cb6=function(){return _0x35ba4b;};return a94_0x3cb6();}
|
package/lib/constant/domain.d.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* at a custom backend without changing environment variables. The overrides are applied
|
|
16
16
|
* once at startup and used throughout the process.
|
|
17
17
|
*/
|
|
18
|
+
import { type LovrabetRegion } from "../constant/region.js";
|
|
18
19
|
/**
|
|
19
20
|
* Sets custom domain overrides read from the config file.
|
|
20
21
|
*
|
|
@@ -28,7 +29,9 @@ export declare function initDomains(domains?: {
|
|
|
28
29
|
apiDomain?: string;
|
|
29
30
|
userDomain?: string;
|
|
30
31
|
runtimeDomain?: string;
|
|
31
|
-
|
|
32
|
+
skillDomain?: string;
|
|
33
|
+
kbDomain?: string;
|
|
34
|
+
region?: LovrabetRegion;
|
|
32
35
|
}): void;
|
|
33
36
|
/**
|
|
34
37
|
* Returns the user-facing domain (used for OAuth, user profile, etc.).
|
|
@@ -53,5 +56,9 @@ export declare const getApiDomain: () => string;
|
|
|
53
56
|
* but they hit different hosts.
|
|
54
57
|
*/
|
|
55
58
|
export declare const getRuntimeDomain: () => string;
|
|
56
|
-
/**
|
|
57
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Returns the SkillHub domain used by native Skill management APIs.
|
|
61
|
+
*/
|
|
62
|
+
export declare const getSkillDomain: () => string;
|
|
63
|
+
/** Returns the knowledge-base domain used by personal and company KB APIs. */
|
|
64
|
+
export declare const getKbDomain: () => string;
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x2d99b5=a95_0x3ce7;(function(_0x2659be,_0x310b2b){const _0x3ffcb1=a95_0x3ce7,_0x3a1e5f=_0x2659be();while(!![]){try{const _0x2357a4=parseInt(_0x3ffcb1(0xa3))/0x1*(parseInt(_0x3ffcb1(0xa7))/0x2)+parseInt(_0x3ffcb1(0xa2))/0x3*(parseInt(_0x3ffcb1(0xa1))/0x4)+-parseInt(_0x3ffcb1(0xa0))/0x5+parseInt(_0x3ffcb1(0xa5))/0x6*(-parseInt(_0x3ffcb1(0xa6))/0x7)+-parseInt(_0x3ffcb1(0xa4))/0x8*(-parseInt(_0x3ffcb1(0xad))/0x9)+-parseInt(_0x3ffcb1(0xac))/0xa+parseInt(_0x3ffcb1(0xae))/0xb*(parseInt(_0x3ffcb1(0xa8))/0xc);if(_0x2357a4===_0x310b2b)break;else _0x3a1e5f['push'](_0x3a1e5f['shift']());}catch(_0x20914a){_0x3a1e5f['push'](_0x3a1e5f['shift']());}}}(a95_0x56f5,0xacfe7));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,customKbDomain,activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x119b4b){const _0x149699=a95_0x3ce7;customApiDomain=_0x119b4b?.[_0x149699(0x9f)],customUserDomain=_0x119b4b?.[_0x149699(0xaa)],customRuntimeDomain=_0x119b4b?.['runtimeDomain'],customSkillDomain=_0x119b4b?.[_0x149699(0x9c)],customKbDomain=_0x119b4b?.[_0x149699(0xa9)],activeRegion=_0x119b4b?.[_0x149699(0xab)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>PRODUCT_CONFIG[a95_0x2d99b5(0xaf)][activeRegion][isProduction(getEnv())?'production':'nonProduction'];export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a95_0x2d99b5(0x9e)];function a95_0x56f5(){const _0x103028=['14BQlxCF','2dtYzJK','3614328znpsLW','kbDomain','userDomain','region','13897210eyhQIa','234hjWqqJ','55JheNND','regionDomains','skillDomain','api','user','apiDomain','5606735NgrgfF','8BdEabu','2047416sIcYaa','406117hcNOXt','75608wERvqf','909318yIbUtL'];a95_0x56f5=function(){return _0x103028;};return a95_0x56f5();}export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a95_0x2d99b5(0x9d)];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()['runtime'];function a95_0x3ce7(_0x38c9de,_0x18552a){_0x38c9de=_0x38c9de-0x9c;const _0x56f5cc=a95_0x56f5();let _0x3ce79b=_0x56f5cc[_0x38c9de];return _0x3ce79b;}export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()['skill'];export const getKbDomain=()=>customKbDomain||getActiveRegionDomains()['kb'];
|