@lovrabet/lovrabet-cli 2.3.3 → 2.3.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -3
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.d.ts +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/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 +2 -2
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.d.ts +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.d.ts +4 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.d.ts +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.d.ts +7 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +12 -3
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +5 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +4 -2
- package/skills/lovrabet/guides/troubleshooting.md +1 -1
- package/skills/lovrabet/references/lovrabet-config-commands.md +8 -7
- package/skills/lovrabet/references/lovrabet-config.md +4 -3
- package/skills/lovrabet/references/lovrabet-doctor.md +1 -1
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +14 -2
- package/skills/lovrabet/references/lovrabet-service-tree.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a81_0x274085=a81_0x432c;(function(_0x35097e,_0xf686ee){const _0x264a34=a81_0x432c,_0x2a5ef8=_0x35097e();while(!![]){try{const _0x521c04=parseInt(_0x264a34(0x108))/0x1+parseInt(_0x264a34(0x13b))/0x2*(parseInt(_0x264a34(0x155))/0x3)+-parseInt(_0x264a34(0x127))/0x4*(parseInt(_0x264a34(0x109))/0x5)+-parseInt(_0x264a34(0x121))/0x6+parseInt(_0x264a34(0x15e))/0x7*(-parseInt(_0x264a34(0x157))/0x8)+parseInt(_0x264a34(0x10d))/0x9*(-parseInt(_0x264a34(0x159))/0xa)+parseInt(_0x264a34(0x124))/0xb;if(_0x521c04===_0xf686ee)break;else _0x2a5ef8['push'](_0x2a5ef8['shift']());}catch(_0x1ac898){_0x2a5ef8['push'](_0x2a5ef8['shift']());}}}(a81_0x1d81,0xb0446));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a81_0x35a8a6}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a81_0x274085(0x14d),SUPPORTED_SKILL_TYPES=new Set([a81_0x274085(0x130),a81_0x274085(0x11d)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;function a81_0x1d81(){const _0x549860=['bff','SKILL.md\x20must\x20start\x20with\x20frontmatter.','registry','internal-skill','Skill\x20directory\x20not\x20found:\x20','86314RzQYsE','string','push','level','join','logs','flatMap','message','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','trim','ruleId','filter','page','raw','hasFrontmatter','line','data','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','SKILL.md','split','isDirectory','false','rabetbase-cli-reference','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','true','suggestion','66ChxTXA','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','4385672bCYEZf','errors','10BwTlVB','project','path','slice','warning','14seClxL','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','metadata','Skill\x20validation\x20failed:\x0a','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','example','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','isSymbolicLink','displayName','320320FprKNW','143015uswrne','Set\x20metadata.type\x20to\x20write\x20or\x20read.','type','section','6960402jczSOc','frontmatter-required','Frontmatter\x20description\x20is\x20empty.','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','toLowerCase','SKILL.md\x20is\x20not\x20a\x20file.','service','Frontmatter\x20name\x20is\x20missing.','description','isArray','search','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','sql','number','utf8','file','read','toUpperCase','internal','content','7445142jZRgtR','\x20Fix:\x20','Add\x20frontmatter\x20with\x20name\x20and\x20description.','42664677tStMSo','map','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','184EcKDUV','name','dataset','test','schema','validation','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','description-required','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','write','object','auth','boolean','error','match'];a81_0x1d81=function(){return _0x549860;};return a81_0x1d81();}export function validateSkillDirectory(_0x519ce1,_0x55a5ad={}){const _0x179ba2=a81_0x274085,_0x35b35d=resolveSkillDirectoryRoot(_0x519ce1),_0x299f48=[],_0xd66c1f=loadRequiredSkillFile(_0x35b35d,_0x299f48),_0x54b98c=_0xd66c1f?parseFrontmatter(_0xd66c1f[_0x179ba2(0x120)]):{'hasFrontmatter':![]};_0xd66c1f&&validateFrontmatter(_0xd66c1f[_0x179ba2(0x15b)],_0x54b98c,_0x299f48);validateRuntimeCliReferences(_0x35b35d,_0x299f48);const _0x16eb15=_0x299f48[_0x179ba2(0x146)](_0x9e28d5=>_0x9e28d5[_0x179ba2(0x13e)]===_0x179ba2(0x134)),_0x45a8ce=_0x299f48['filter'](_0x389bcb=>_0x389bcb[_0x179ba2(0x13e)]===_0x179ba2(0x15d));return{'ok':_0x16eb15['length']===0x0,'dir':_0x35b35d,'type':_0x54b98c[_0x179ba2(0x10b)],'errors':_0x16eb15,'warnings':_0x45a8ce};}function resolveSkillDirectoryRoot(_0x413303){const _0x19d265=a81_0x274085,_0x3c5372=resolve(_0x413303);if(!existsSync(_0x3c5372))throw CliErrors[_0x19d265(0x12c)]('Skill\x20directory\x20not\x20found:\x20'+_0x413303);const _0xfd3848=lstatSync(_0x3c5372);if(_0xfd3848[_0x19d265(0x14f)]())return _0x3c5372;if(_0xfd3848[_0x19d265(0x165)]()){const _0x30627a=realpathSync(_0x3c5372);if(lstatSync(_0x30627a)[_0x19d265(0x14f)]())return _0x30627a;}throw CliErrors[_0x19d265(0x12c)](_0x19d265(0x13a)+_0x413303);}export function throwIfSkillValidationFailed(_0x21284a,_0x386afc=![]){const _0x4bbf20=a81_0x274085;if(_0x21284a['ok'])return;const _0x229194=_0x21284a[_0x4bbf20(0x158)][_0x4bbf20(0x125)](_0x4db7b8=>{const _0x5c60af=_0x4bbf20,_0x417f5f=_0x4db7b8[_0x5c60af(0x10c)]?'#'+_0x4db7b8['section']:'';return _0x4db7b8['level'][_0x5c60af(0x11e)]()+'\x20'+_0x4db7b8[_0x5c60af(0x145)]+'\x20'+_0x4db7b8[_0x5c60af(0x11c)]+_0x417f5f+':\x20'+_0x4db7b8[_0x5c60af(0x142)]+_0x5c60af(0x122)+_0x4db7b8[_0x5c60af(0x154)];});throw CliErrors['validation'](_0x4bbf20(0x161)+_0x229194[_0x4bbf20(0x13f)]('\x0a'),_0x4bbf20(0x12d));}function loadRequiredSkillFile(_0x23dd16,_0x1f65e6){const _0x5d0d6d=a81_0x274085,_0x33e614=resolve(_0x23dd16,SKILL_FILE);if(!existsSync(_0x33e614))return _0x1f65e6[_0x5d0d6d(0x13d)](issue(_0x5d0d6d(0x134),'structure-complete',SKILL_FILE,'Missing\x20SKILL.md.',_0x5d0d6d(0x143))),undefined;const _0x4afd10=lstatSync(_0x33e614);if(_0x4afd10['isSymbolicLink']())return _0x1f65e6['push'](issue(_0x5d0d6d(0x134),'structure-complete',SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.',_0x5d0d6d(0x162))),undefined;if(!_0x4afd10['isFile']())return _0x1f65e6['push'](issue(_0x5d0d6d(0x134),'structure-complete',SKILL_FILE,_0x5d0d6d(0x112),_0x5d0d6d(0x164))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x33e614,_0x5d0d6d(0x11b))};}function validateFrontmatter(_0x259a70,_0xf38155,_0x235cce){const _0x4cde2d=a81_0x274085;if(!_0xf38155[_0x4cde2d(0x149)]){_0x235cce[_0x4cde2d(0x13d)](issue(_0x4cde2d(0x134),_0x4cde2d(0x10e),_0x259a70,_0x4cde2d(0x137),_0x4cde2d(0x123)));return;}!_0xf38155[_0x4cde2d(0x128)]?.['trim']()&&_0x235cce[_0x4cde2d(0x13d)](issue(_0x4cde2d(0x134),_0x4cde2d(0x10e),_0x259a70,_0x4cde2d(0x114),_0x4cde2d(0x156))),!_0xf38155[_0x4cde2d(0x107)]?.[_0x4cde2d(0x144)]()&&_0x235cce[_0x4cde2d(0x13d)](issue(_0x4cde2d(0x15d),'display-name-recommended',_0x259a70,'Frontmatter\x20displayName\x20is\x20missing.',_0x4cde2d(0x12f))),!_0xf38155['example']?.['trim']()&&_0x235cce[_0x4cde2d(0x13d)](issue(_0x4cde2d(0x15d),'example-recommended',_0x259a70,'Frontmatter\x20example\x20is\x20missing.',_0x4cde2d(0x152))),!_0xf38155[_0x4cde2d(0x115)]?.[_0x4cde2d(0x144)]()&&_0x235cce['push'](issue(_0x4cde2d(0x134),_0x4cde2d(0x12e),_0x259a70,_0x4cde2d(0x10f),_0x4cde2d(0x14c))),_0xf38155[_0x4cde2d(0x11f)]===!![]&&_0x235cce[_0x4cde2d(0x13d)](issue('error',_0x4cde2d(0x139),_0x259a70,'metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.',_0x4cde2d(0x110))),_0xf38155[_0x4cde2d(0x10b)]?.[_0x4cde2d(0x144)]()&&!SUPPORTED_SKILL_TYPES['has'](_0xf38155[_0x4cde2d(0x10b)])&&_0x235cce[_0x4cde2d(0x13d)](issue('error','frontmatter-required',_0x259a70,_0x4cde2d(0x118),_0x4cde2d(0x10a)));}function validateRuntimeCliReferences(_0x107ff4,_0x43bb42){const _0x3d16c2=a81_0x274085;for(const _0x4c7fd4 of findRabetbaseCliInvocations(_0x107ff4)){_0x43bb42[_0x3d16c2(0x13d)](issue(_0x3d16c2(0x15d),_0x3d16c2(0x151),_0x4c7fd4['file'],_0x3d16c2(0x15f),_0x3d16c2(0x126),'L'+_0x4c7fd4[_0x3d16c2(0x14a)]));}}function findRabetbaseCliInvocations(_0x32404a){const _0x7a93ba=a81_0x274085;return scanSkillDirectory(_0x32404a)[_0x7a93ba(0x146)](_0x436a54=>TEXT_SKILL_FILE_PATTERN[_0x7a93ba(0x12a)](_0x436a54[_0x7a93ba(0x15b)]))[_0x7a93ba(0x141)](_0x392d72=>{const _0x434295=_0x7a93ba,_0x1869cd=fileText(_0x392d72);return _0x1869cd[_0x434295(0x14e)](/\r?\n/)[_0x434295(0x125)]((_0x512acb,_0x53b729)=>({'file':_0x392d72[_0x434295(0x15b)],'line':_0x53b729+0x1,'text':_0x512acb}))['filter'](({text:_0x310fd0})=>isRabetbaseCliInvocation(_0x310fd0))['map'](({file:_0x34457c,line:_0x4873ec})=>({'file':_0x34457c,'line':_0x4873ec}));});}const RABETBASE_SUBCOMMANDS=[a81_0x274085(0x129),a81_0x274085(0x119),a81_0x274085(0x136),a81_0x274085(0x147),a81_0x274085(0x15a),'app',a81_0x274085(0x12b),a81_0x274085(0x113),'artifact','kb','config','workspace',a81_0x274085(0x14b),a81_0x274085(0x132),a81_0x274085(0x140),a81_0x274085(0x138)],RABETBASE_INVOCATION=new RegExp(String[a81_0x274085(0x148)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a81_0x274085(0x13f)]('|')})\b`+String[a81_0x274085(0x148)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x2d2c32){const _0x1e1b73=a81_0x274085,_0x532921=_0x2d2c32[_0x1e1b73(0x117)](/\brabetbase\b/i);if(_0x532921<0x0)return![];const _0x6fdae5=_0x2d2c32[_0x1e1b73(0x15c)](_0x532921)[_0x1e1b73(0x14e)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x1e1b73(0x12a)](_0x6fdae5);}function parseFrontmatter(_0x78f53){const _0x517a1d=a81_0x274085,_0x5eebb1=_0x78f53[_0x517a1d(0x135)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5eebb1)return{'hasFrontmatter':![]};const _0xa8d675=_0x5eebb1[0x1]??'',_0x5299c5={'hasFrontmatter':!![]};let _0x441e2f;try{_0x441e2f=a81_0x35a8a6(_0xa8d675);}catch{return _0x5299c5;}const _0x52b822=asRecord(_0x441e2f);if(!_0x52b822)return _0x5299c5;_0x5299c5[_0x517a1d(0x128)]=scalarToString(_0x52b822['name']),_0x5299c5[_0x517a1d(0x107)]=scalarToString(_0x52b822['displayName']),_0x5299c5['description']=scalarToString(_0x52b822[_0x517a1d(0x115)]),_0x5299c5[_0x517a1d(0x163)]=scalarToString(_0x52b822[_0x517a1d(0x163)]);const _0x375e55=asRecord(_0x52b822[_0x517a1d(0x160)]);return _0x375e55&&(_0x5299c5[_0x517a1d(0x10b)]=scalarToString(_0x375e55[_0x517a1d(0x10b)]),_0x5299c5['internal']=scalarToBoolean(_0x375e55[_0x517a1d(0x11f)])),_0x5299c5;}function asRecord(_0x3ec01f){const _0x45b1e3=a81_0x274085;if(_0x3ec01f&&typeof _0x3ec01f===_0x45b1e3(0x131)&&!Array[_0x45b1e3(0x116)](_0x3ec01f))return _0x3ec01f;return undefined;}function a81_0x432c(_0x18ed07,_0x47d1fe){_0x18ed07=_0x18ed07-0x107;const _0x1d81ee=a81_0x1d81();let _0x432c1f=_0x1d81ee[_0x18ed07];return _0x432c1f;}function scalarToString(_0x55cc3d){const _0x56c5a4=a81_0x274085;if(typeof _0x55cc3d===_0x56c5a4(0x13c))return _0x55cc3d[_0x56c5a4(0x144)]();if(typeof _0x55cc3d===_0x56c5a4(0x11a)||typeof _0x55cc3d===_0x56c5a4(0x133))return String(_0x55cc3d);return undefined;}function scalarToBoolean(_0x4b024c){const _0x4ce71b=a81_0x274085;if(typeof _0x4b024c===_0x4ce71b(0x133))return _0x4b024c;if(typeof _0x4b024c===_0x4ce71b(0x13c))return cleanBoolean(_0x4b024c);return undefined;}function cleanBoolean(_0x4979eb){const _0x486ffd=a81_0x274085,_0x58f1a3=_0x4979eb[_0x486ffd(0x144)]()[_0x486ffd(0x111)]();if(_0x58f1a3===_0x486ffd(0x153))return!![];if(_0x58f1a3===_0x486ffd(0x150))return![];return undefined;}function issue(_0x56db9d,_0x3978c0,_0xe3223e,_0x57ee9c,_0x41376f,_0x5c3713){return{'level':_0x56db9d,'ruleId':_0x3978c0,'file':_0xe3223e,'section':_0x5c3713,'message':_0x57ee9c,'suggestion':_0x41376f};}
|
|
1
|
+
const a81_0x9239d0=a81_0x5f3c;(function(_0x167f1c,_0x5166c9){const _0x3ca14b=a81_0x5f3c,_0x19255c=_0x167f1c();while(!![]){try{const _0x3b8ddc=-parseInt(_0x3ca14b(0x18c))/0x1*(parseInt(_0x3ca14b(0x180))/0x2)+parseInt(_0x3ca14b(0x16b))/0x3*(parseInt(_0x3ca14b(0x185))/0x4)+-parseInt(_0x3ca14b(0x190))/0x5+parseInt(_0x3ca14b(0x1a0))/0x6*(parseInt(_0x3ca14b(0x15d))/0x7)+-parseInt(_0x3ca14b(0x198))/0x8+-parseInt(_0x3ca14b(0x1a5))/0x9+parseInt(_0x3ca14b(0x191))/0xa;if(_0x3b8ddc===_0x5166c9)break;else _0x19255c['push'](_0x19255c['shift']());}catch(_0x172390){_0x19255c['push'](_0x19255c['shift']());}}}(a81_0x5a93,0xcfb3c));function a81_0x5a93(){const _0x23f51c=['length','hasFrontmatter','match','1kIeAkI','level','displayName','false','6511970ZKOEiA','25012590GKpBMp','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','trim','toLowerCase','errors','Set\x20metadata.type\x20to\x20write\x20or\x20read.','Add\x20frontmatter\x20with\x20name\x20and\x20description.','921688WRUvgE','description','name','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','isSymbolicLink','service','object','78LDBIKg','suggestion','description-required','flatMap','section','6824655JkSEGL','utf8','map','validation','example','app','slice','schema','frontmatter-required','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','rabetbase-cli-reference','read','isArray','bff','Missing\x20SKILL.md.','error','SKILL.md\x20must\x20start\x20with\x20frontmatter.','warning','test','number','344323lvHydK','structure-complete','path','isFile','true','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','push','display-name-recommended','Frontmatter\x20example\x20is\x20missing.','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Skill\x20directory\x20not\x20found:\x20','join','Frontmatter\x20name\x20is\x20missing.','project','3ysvQKT','raw','toUpperCase','isDirectory','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','auth','type','data','file','content','internal','ruleId','internal-skill','metadata','search','SKILL.md\x20is\x20not\x20a\x20file.','sql','line','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','has','dataset','2923702YKzJxu','example-recommended','write','artifact','boolean','5391132yBrIFK','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','filter','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.'];a81_0x5a93=function(){return _0x23f51c;};return a81_0x5a93();}import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a81_0x59a043}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([a81_0x9239d0(0x182),a81_0x9239d0(0x1b0)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x462c67,_0x5f5ae5={}){const _0x6a4fa4=a81_0x9239d0,_0x25f51e=resolveSkillDirectoryRoot(_0x462c67),_0x1de1aa=[],_0x233734=loadRequiredSkillFile(_0x25f51e,_0x1de1aa),_0xadc64=_0x233734?parseFrontmatter(_0x233734[_0x6a4fa4(0x174)]):{'hasFrontmatter':![]};_0x233734&&validateFrontmatter(_0x233734[_0x6a4fa4(0x15f)],_0xadc64,_0x1de1aa);validateRuntimeCliReferences(_0x25f51e,_0x1de1aa);const _0x8ff6b2=_0x1de1aa[_0x6a4fa4(0x187)](_0x744177=>_0x744177[_0x6a4fa4(0x18d)]===_0x6a4fa4(0x158)),_0xa9cf2f=_0x1de1aa['filter'](_0x293488=>_0x293488['level']==='warning');return{'ok':_0x8ff6b2[_0x6a4fa4(0x189)]===0x0,'dir':_0x25f51e,'type':_0xadc64[_0x6a4fa4(0x171)],'errors':_0x8ff6b2,'warnings':_0xa9cf2f};}function resolveSkillDirectoryRoot(_0x5c4ab0){const _0x58ab89=a81_0x9239d0,_0x917c1b=resolve(_0x5c4ab0);if(!existsSync(_0x917c1b))throw CliErrors[_0x58ab89(0x1a8)](_0x58ab89(0x167)+_0x5c4ab0);const _0x4bdc24=lstatSync(_0x917c1b);if(_0x4bdc24[_0x58ab89(0x16e)]())return _0x917c1b;if(_0x4bdc24[_0x58ab89(0x19d)]()){const _0x4126ca=realpathSync(_0x917c1b);if(lstatSync(_0x4126ca)[_0x58ab89(0x16e)]())return _0x4126ca;}throw CliErrors[_0x58ab89(0x1a8)](_0x58ab89(0x167)+_0x5c4ab0);}export function throwIfSkillValidationFailed(_0x5ceb8c,_0x39c370=![]){const _0x32e9a9=a81_0x9239d0;if(_0x5ceb8c['ok'])return;const _0x3bf2ce=_0x5ceb8c[_0x32e9a9(0x195)]['map'](_0x5cece5=>{const _0x497929=_0x32e9a9,_0x463513=_0x5cece5[_0x497929(0x1a4)]?'#'+_0x5cece5[_0x497929(0x1a4)]:'';return _0x5cece5[_0x497929(0x18d)][_0x497929(0x16d)]()+'\x20'+_0x5cece5[_0x497929(0x176)]+'\x20'+_0x5cece5[_0x497929(0x173)]+_0x463513+':\x20'+_0x5cece5['message']+'\x20Fix:\x20'+_0x5cece5[_0x497929(0x1a1)];});throw CliErrors['validation']('Skill\x20validation\x20failed:\x0a'+_0x3bf2ce[_0x32e9a9(0x168)]('\x0a'),_0x32e9a9(0x19b));}function a81_0x5f3c(_0x52a697,_0x481ce6){_0x52a697=_0x52a697-0x156;const _0x5a9396=a81_0x5a93();let _0x5f3c62=_0x5a9396[_0x52a697];return _0x5f3c62;}function loadRequiredSkillFile(_0xea1ab6,_0x44f765){const _0x2a0d19=a81_0x9239d0,_0x14b559=resolve(_0xea1ab6,SKILL_FILE);if(!existsSync(_0x14b559))return _0x44f765[_0x2a0d19(0x163)](issue(_0x2a0d19(0x158),_0x2a0d19(0x15e),SKILL_FILE,_0x2a0d19(0x157),_0x2a0d19(0x162))),undefined;const _0xba2fce=lstatSync(_0x14b559);if(_0xba2fce[_0x2a0d19(0x19d)]())return _0x44f765[_0x2a0d19(0x163)](issue('error',_0x2a0d19(0x15e),SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.',_0x2a0d19(0x19c))),undefined;if(!_0xba2fce[_0x2a0d19(0x160)]())return _0x44f765[_0x2a0d19(0x163)](issue(_0x2a0d19(0x158),_0x2a0d19(0x15e),SKILL_FILE,_0x2a0d19(0x17a),'Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.')),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x14b559,_0x2a0d19(0x1a6))};}function validateFrontmatter(_0x36ee6a,_0x59069a,_0x20aa35){const _0xbb68cd=a81_0x9239d0;if(!_0x59069a[_0xbb68cd(0x18a)]){_0x20aa35[_0xbb68cd(0x163)](issue('error',_0xbb68cd(0x1ad),_0x36ee6a,_0xbb68cd(0x159),_0xbb68cd(0x197)));return;}!_0x59069a['name']?.['trim']()&&_0x20aa35[_0xbb68cd(0x163)](issue(_0xbb68cd(0x158),_0xbb68cd(0x1ad),_0x36ee6a,_0xbb68cd(0x169),_0xbb68cd(0x17d))),!_0x59069a[_0xbb68cd(0x18e)]?.[_0xbb68cd(0x193)]()&&_0x20aa35[_0xbb68cd(0x163)](issue(_0xbb68cd(0x15a),_0xbb68cd(0x164),_0x36ee6a,'Frontmatter\x20displayName\x20is\x20missing.',_0xbb68cd(0x192))),!_0x59069a[_0xbb68cd(0x1a9)]?.[_0xbb68cd(0x193)]()&&_0x20aa35[_0xbb68cd(0x163)](issue(_0xbb68cd(0x15a),_0xbb68cd(0x181),_0x36ee6a,_0xbb68cd(0x165),'Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.')),!_0x59069a[_0xbb68cd(0x199)]?.[_0xbb68cd(0x193)]()&&_0x20aa35[_0xbb68cd(0x163)](issue(_0xbb68cd(0x158),_0xbb68cd(0x1a2),_0x36ee6a,'Frontmatter\x20description\x20is\x20empty.',_0xbb68cd(0x16f))),_0x59069a['internal']===!![]&&_0x20aa35['push'](issue(_0xbb68cd(0x158),_0xbb68cd(0x177),_0x36ee6a,_0xbb68cd(0x166),'Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x59069a['type']?.[_0xbb68cd(0x193)]()&&!SUPPORTED_SKILL_TYPES[_0xbb68cd(0x17e)](_0x59069a[_0xbb68cd(0x171)])&&_0x20aa35[_0xbb68cd(0x163)](issue(_0xbb68cd(0x158),_0xbb68cd(0x1ad),_0x36ee6a,_0xbb68cd(0x188),_0xbb68cd(0x196)));}function validateRuntimeCliReferences(_0x1ca731,_0x3ec369){const _0x364483=a81_0x9239d0;for(const _0x4d57d9 of findRabetbaseCliInvocations(_0x1ca731)){_0x3ec369[_0x364483(0x163)](issue(_0x364483(0x15a),_0x364483(0x1af),_0x4d57d9[_0x364483(0x173)],_0x364483(0x1ae),_0x364483(0x186),'L'+_0x4d57d9[_0x364483(0x17c)]));}}function findRabetbaseCliInvocations(_0x49b534){const _0x42d5e3=a81_0x9239d0;return scanSkillDirectory(_0x49b534)[_0x42d5e3(0x187)](_0x49b3f0=>TEXT_SKILL_FILE_PATTERN['test'](_0x49b3f0[_0x42d5e3(0x15f)]))[_0x42d5e3(0x1a3)](_0x12696f=>{const _0x341959=_0x42d5e3,_0x394ce1=fileText(_0x12696f);return _0x394ce1['split'](/\r?\n/)[_0x341959(0x1a7)]((_0x2d1dcf,_0x20d3ab)=>({'file':_0x12696f[_0x341959(0x15f)],'line':_0x20d3ab+0x1,'text':_0x2d1dcf}))[_0x341959(0x187)](({text:_0x36de17})=>isRabetbaseCliInvocation(_0x36de17))[_0x341959(0x1a7)](({file:_0x1e8110,line:_0x159bc1})=>({'file':_0x1e8110,'line':_0x159bc1}));});}const RABETBASE_SUBCOMMANDS=[a81_0x9239d0(0x17f),a81_0x9239d0(0x17b),a81_0x9239d0(0x156),'page',a81_0x9239d0(0x16a),a81_0x9239d0(0x1aa),a81_0x9239d0(0x1ac),a81_0x9239d0(0x19e),a81_0x9239d0(0x183),'kb','config','workspace',a81_0x9239d0(0x172),a81_0x9239d0(0x170),'logs','registry'],RABETBASE_INVOCATION=new RegExp(String['raw']`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a81_0x9239d0(0x168)]('|')})\b`+String[a81_0x9239d0(0x16c)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x97895d){const _0x5dd073=a81_0x9239d0,_0x47bb06=_0x97895d[_0x5dd073(0x179)](/\brabetbase\b/i);if(_0x47bb06<0x0)return![];const _0x5aa038=_0x97895d[_0x5dd073(0x1ab)](_0x47bb06)['split'](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x5dd073(0x15b)](_0x5aa038);}function parseFrontmatter(_0x30df36){const _0x1c0f39=a81_0x9239d0,_0x2af130=_0x30df36[_0x1c0f39(0x18b)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2af130)return{'hasFrontmatter':![]};const _0x2e336f=_0x2af130[0x1]??'',_0x3aff9c={'hasFrontmatter':!![]};let _0x8d22bc;try{_0x8d22bc=a81_0x59a043(_0x2e336f);}catch{return _0x3aff9c;}const _0x525006=asRecord(_0x8d22bc);if(!_0x525006)return _0x3aff9c;_0x3aff9c['name']=scalarToString(_0x525006[_0x1c0f39(0x19a)]),_0x3aff9c['displayName']=scalarToString(_0x525006[_0x1c0f39(0x18e)]),_0x3aff9c['description']=scalarToString(_0x525006[_0x1c0f39(0x199)]),_0x3aff9c['example']=scalarToString(_0x525006[_0x1c0f39(0x1a9)]);const _0x2c7b01=asRecord(_0x525006[_0x1c0f39(0x178)]);return _0x2c7b01&&(_0x3aff9c[_0x1c0f39(0x171)]=scalarToString(_0x2c7b01['type']),_0x3aff9c[_0x1c0f39(0x175)]=scalarToBoolean(_0x2c7b01[_0x1c0f39(0x175)])),_0x3aff9c;}function asRecord(_0x1c1a99){const _0x967bd=a81_0x9239d0;if(_0x1c1a99&&typeof _0x1c1a99===_0x967bd(0x19f)&&!Array[_0x967bd(0x1b1)](_0x1c1a99))return _0x1c1a99;return undefined;}function scalarToString(_0x211b1a){const _0x543838=a81_0x9239d0;if(typeof _0x211b1a==='string')return _0x211b1a[_0x543838(0x193)]();if(typeof _0x211b1a===_0x543838(0x15c)||typeof _0x211b1a===_0x543838(0x184))return String(_0x211b1a);return undefined;}function scalarToBoolean(_0x4f17c9){const _0x2f181e=a81_0x9239d0;if(typeof _0x4f17c9===_0x2f181e(0x184))return _0x4f17c9;if(typeof _0x4f17c9==='string')return cleanBoolean(_0x4f17c9);return undefined;}function cleanBoolean(_0x348dc2){const _0x5c5a8a=a81_0x9239d0,_0x2b78ac=_0x348dc2[_0x5c5a8a(0x193)]()[_0x5c5a8a(0x194)]();if(_0x2b78ac===_0x5c5a8a(0x161))return!![];if(_0x2b78ac===_0x5c5a8a(0x18f))return![];return undefined;}function issue(_0x39e79f,_0x3b149e,_0x410374,_0x11c441,_0x52104d,_0x5bad01){return{'level':_0x39e79f,'ruleId':_0x3b149e,'file':_0x410374,'section':_0x5bad01,'message':_0x11c441,'suggestion':_0x52104d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a82_0x373e(_0xf98414,_0x20a22e){_0xf98414=_0xf98414-0x1a5;const _0x5edb2f=a82_0x5edb();let _0x373e66=_0x5edb2f[_0xf98414];return _0x373e66;}const a82_0x1f4c09=a82_0x373e;(function(_0x57b14d,_0x2e464c){const _0x46da2f=a82_0x373e,_0x5ccf5d=_0x57b14d();while(!![]){try{const _0x29b4c2=-parseInt(_0x46da2f(0x1b3))/0x1*(parseInt(_0x46da2f(0x1af))/0x2)+-parseInt(_0x46da2f(0x1ac))/0x3+parseInt(_0x46da2f(0x1a9))/0x4*(parseInt(_0x46da2f(0x1b6))/0x5)+parseInt(_0x46da2f(0x1a7))/0x6+-parseInt(_0x46da2f(0x1ad))/0x7*(parseInt(_0x46da2f(0x1ae))/0x8)+parseInt(_0x46da2f(0x1b7))/0x9+parseInt(_0x46da2f(0x1b5))/0xa;if(_0x29b4c2===_0x2e464c)break;else _0x5ccf5d['push'](_0x5ccf5d['shift']());}catch(_0x4acc8d){_0x5ccf5d['push'](_0x5ccf5d['shift']());}}}(a82_0x5edb,0x5c70f));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a82_0x5edb(){const _0x114ec=['7080tjkWJb','2ajOFvQ','appCode','dbId','str','351713TFgiTq','sqlcode','1309910uXNcWR','5rehrUR','4503438DifTkb','verbose','sql','1576746rhKYyn','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','2510252qQQAzM','bool','sqlCode','2212170IrKUGI','427fvTrRq'];a82_0x5edb=function(){return _0x114ec;};return a82_0x5edb();}export const sqlDetail={'service':a82_0x1f4c09(0x1a6),'command':'detail','description':a82_0x1f4c09(0x1a8),'risk':'read','flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x31d97b){const _0x4dfe2a=a82_0x1f4c09,_0xe07737=await getSqlQueryInfo(_0x31d97b[_0x4dfe2a(0x1b0)],_0x31d97b[_0x4dfe2a(0x1b2)](_0x4dfe2a(0x1b4))),_0x2dbfec=_0x31d97b[_0x4dfe2a(0x1aa)](_0x4dfe2a(0x1a5));if(_0x2dbfec)return{'ok':!![],'data':_0xe07737};const _0x4dba2e=_0xe07737['dbId']?await getDbName(_0x31d97b['appCode'],_0xe07737[_0x4dfe2a(0x1b1)]):undefined;return{'ok':!![],'data':{'sqlCode':_0xe07737[_0x4dfe2a(0x1ab)],'sqlName':_0xe07737['sqlName'],'db':_0x4dba2e?_0x4dba2e+'\x20('+_0xe07737[_0x4dfe2a(0x1b1)]+')':_0xe07737[_0x4dfe2a(0x1b1)]??'','sqlContent':_0xe07737['sqlContent']??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x2857ca=a83_0x3533;(function(_0x4737d9,_0x38706f){const _0x453ae9=a83_0x3533,_0x51f9be=_0x4737d9();while(!![]){try{const _0x2d6999=parseInt(_0x453ae9(0x145))/0x1+parseInt(_0x453ae9(0x151))/0x2*(parseInt(_0x453ae9(0x14d))/0x3)+-parseInt(_0x453ae9(0x14f))/0x4*(-parseInt(_0x453ae9(0x148))/0x5)+parseInt(_0x453ae9(0x156))/0x6*(-parseInt(_0x453ae9(0x158))/0x7)+parseInt(_0x453ae9(0x155))/0x8+parseInt(_0x453ae9(0x154))/0x9+-parseInt(_0x453ae9(0x159))/0xa*(parseInt(_0x453ae9(0x143))/0xb);if(_0x2d6999===_0x38706f)break;else _0x51f9be['push'](_0x51f9be['shift']());}catch(_0x4efaca){_0x51f9be['push'](_0x51f9be['shift']());}}}(a83_0x5b61,0xc1a60));import{executeSdkSql}from'../../core/sdk-client.js';function a83_0x3533(_0x54d95e,_0x10a270){_0x54d95e=_0x54d95e-0x143;const _0x5b610e=a83_0x5b61();let _0x35339d=_0x5b610e[_0x54d95e];return _0x35339d;}import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a83_0x5b61(){const _0x1db0a1=['3358023AkZttJ','Returned\x20','1435872jkkXCp','read','2pswrhz','execError','params','10297332GHlIps','1844528PXJotd','2718rnktee','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','7182myONGG','3216590NHPXvD','sql','110ZAvdJx','execResult','544625wDhnKf','now','exec','20lGBFDJ','str','isArray','SQL\x20execution\x20failed','length'];a83_0x5b61=function(){return _0x1db0a1;};return a83_0x5b61();}import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a83_0x2857ca(0x15a),'command':a83_0x2857ca(0x147),'description':a83_0x2857ca(0x157),'risk':a83_0x2857ca(0x150),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x2d953c){const _0x4b338f=a83_0x2857ca,_0x4d59f2=parseJsonParams(_0x2d953c[_0x4b338f(0x149)](_0x4b338f(0x153))),_0xb354aa=Date[_0x4b338f(0x146)](),_0x285146=await executeSdkSql(_0x2d953c[_0x4b338f(0x149)]('sqlcode'),_0x4d59f2),_0x49de44=Date[_0x4b338f(0x146)]()-_0xb354aa,_0x2a2167=_0x285146?.[_0x4b338f(0x144)]??_0x285146,_0x2f25dd=_0x285146?.['execSuccess']??!![];if(!_0x2f25dd)return{'ok':![],'data':{'error':_0x285146?.[_0x4b338f(0x152)]||_0x4b338f(0x14b),'elapsed':_0x49de44},'message':'SQL\x20execution\x20failed'};const _0x37f5df=Array[_0x4b338f(0x14a)](_0x2a2167)?_0x2a2167:[];return{'ok':!![],'data':{'rows':_0x37f5df,'rowCount':_0x37f5df[_0x4b338f(0x14c)],'elapsed':_0x49de44},'message':_0x4b338f(0x14e)+_0x37f5df[_0x4b338f(0x14c)]+'\x20row(s)\x20in\x20'+_0x49de44+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x26fb5b,_0x2b9c81){const _0xc9de9b=a84_0x5b60,_0x4ac65c=_0x26fb5b();while(!![]){try{const _0x523960=parseInt(_0xc9de9b(0x78))/0x1*(parseInt(_0xc9de9b(0x7f))/0x2)+parseInt(_0xc9de9b(0x7c))/0x3+parseInt(_0xc9de9b(0x73))/0x4*(-parseInt(_0xc9de9b(0x79))/0x5)+parseInt(_0xc9de9b(0x7a))/0x6*(-parseInt(_0xc9de9b(0x74))/0x7)+-parseInt(_0xc9de9b(0x7d))/0x8*(-parseInt(_0xc9de9b(0x76))/0x9)+parseInt(_0xc9de9b(0x77))/0xa*(parseInt(_0xc9de9b(0x75))/0xb)+parseInt(_0xc9de9b(0x7b))/0xc*(-parseInt(_0xc9de9b(0x7e))/0xd);if(_0x523960===_0x2b9c81)break;else _0x4ac65c['push'](_0x4ac65c['shift']());}catch(_0x2f683b){_0x4ac65c['push'](_0x4ac65c['shift']());}}}(a84_0x4097,0x67c4c));function a84_0x5b60(_0x4b32d0,_0xc062a7){_0x4b32d0=_0x4b32d0-0x73;const _0x409744=a84_0x4097();let _0x5b6011=_0x409744[_0x4b32d0];return _0x5b6011;}function a84_0x4097(){const _0x864b5e=['464aKNNDW','2144051NjvPQY','11671MywCRK','1145079dQceVw','690ovIFOm','446098YOJnVs','16870RUKUjo','12HvAbeU','17964TFCQPL','2113914cokGXc','16XnpSAz','429tOSCSi','2ccmzzD'];a84_0x4097=function(){return _0x864b5e;};return a84_0x4097();}import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a85_0x14a5fb=a85_0x4a53;(function(_0x5903ce,_0x50f9d2){const _0x450be4=a85_0x4a53,_0x3d8b6b=_0x5903ce();while(!![]){try{const _0x1f696c=parseInt(_0x450be4(0x15d))/0x1+-parseInt(_0x450be4(0x15f))/0x2+-parseInt(_0x450be4(0x190))/0x3*(parseInt(_0x450be4(0x167))/0x4)+parseInt(_0x450be4(0x148))/0x5+-parseInt(_0x450be4(0x154))/0x6+-parseInt(_0x450be4(0x18a))/0x7+parseInt(_0x450be4(0x153))/0x8*(parseInt(_0x450be4(0x14a))/0x9);if(_0x1f696c===_0x50f9d2)break;else _0x3d8b6b['push'](_0x3d8b6b['shift']());}catch(_0x914426){_0x3d8b6b['push'](_0x3d8b6b['shift']());}}}(a85_0x4bd2,0xa674a));import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a85_0x10eb0c from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';function a85_0x4bd2(){const _0x49ba49=['/-/package/','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','Version\x20comparison\x20failed:\x20',',\x20found\x20','dirname','\x20CLI\x20from\x20npm','reason','object','169004gOYqbI',',\x20then\x20verify\x20with:\x20','1045826RLsLoT','toLowerCase','version','cwd','length','state','source','test','76cOMHvL','includes','exitCode','\x20is\x20current.','nonInteractive','node_modules','write','\x20version\x20from\x20npm.','Already\x20on\x20requested\x20version\x20(v','Checking\x20npm\x20dist-tags...','repairCommand','\x20\x20CLI\x20Built-in\x20Skill\x20','join','timeout','filter','basename','map','unknown','inherit','npm','apiError','bool','Invalid\x20version:\x20','error',',\x20state\x20','Update\x20the\x20','log','Updated\x20to\x20v','Current\x20version:\x20','find','platform','Install\x20a\x20specific\x20CLI\x20version','fromEntries','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','boolean','6841912pYtoGL','args','exit\x20','skillVersion','trim','stdout','70497oJXqzI','beta','string','win32','\x20->\x20',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','\x20dist-tags,\x20then\x20retry.','Run:\x20npm\x20install\x20-g\x20','Updating\x20','pipe','expected\x20','json','/dist-tags','Checking\x20CLI\x20Built-in\x20Skill...','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','lib','2061975avNHmV','relative','20473740CzxGmq','validation','\x20doctor','Already\x20up\x20to\x20date\x20(v','latest','entries','valid','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','stderr','8WKSWBi','1365882lfBHIG'];a85_0x4bd2=function(){return _0x49ba49;};return a85_0x4bd2();}import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':'latest','type':a85_0x14a5fb(0x189),'description':'Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','default':![]},{'name':'beta','type':a85_0x14a5fb(0x189),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a85_0x14a5fb(0x161),'type':'string','description':a85_0x14a5fb(0x186)}];function getRequestedVersion(_0x3986fc){const _0x18e880=a85_0x14a5fb,_0xc4fe9b=_0x3986fc['str'](_0x18e880(0x161))[_0x18e880(0x18e)]();if(_0xc4fe9b)return _0xc4fe9b;return String(_0x3986fc[_0x18e880(0x18b)]?.[0x0]??'')[_0x18e880(0x18e)]();}async function validateUpdateFlags(_0x341305){const _0x4a1e43=a85_0x14a5fb,_0x3b0f18=getRequestedVersion(_0x341305),_0x4a0c41=[_0x341305[_0x4a1e43(0x17c)](_0x4a1e43(0x14e))?_0x4a1e43(0x14e):'',_0x341305[_0x4a1e43(0x17c)](_0x4a1e43(0x191))?_0x4a1e43(0x191):'',_0x3b0f18?_0x4a1e43(0x161):''][_0x4a1e43(0x175)](Boolean);if(_0x4a0c41[_0x4a1e43(0x163)]>0x1)throw CliErrors[_0x4a1e43(0x14b)](_0x4a1e43(0x146),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x3b0f18&&!a85_0x10eb0c['valid'](_0x3b0f18))throw CliErrors[_0x4a1e43(0x14b)](_0x4a1e43(0x17d)+_0x3b0f18,_0x4a1e43(0x156));}async function fetchNpmDistTags(){const _0x37e038=a85_0x14a5fb;try{const _0x5f1568=NPM_REGISTRY_BASE_URL+_0x37e038(0x155)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x37e038(0x144),_0x35cf18=await fetch(_0x5f1568,{'signal':AbortSignal[_0x37e038(0x174)](0x2710)});if(!_0x35cf18['ok'])return null;const _0x95b1b4=await _0x35cf18[_0x37e038(0x143)]();if(!_0x95b1b4||typeof _0x95b1b4!==_0x37e038(0x15c))return null;return Object[_0x37e038(0x187)](Object[_0x37e038(0x14f)](_0x95b1b4)['filter'](([,_0x51c65f])=>typeof _0x51c65f===_0x37e038(0x192)&&_0x51c65f[_0x37e038(0x18e)]())[_0x37e038(0x177)](([_0x1b8835,_0xf59629])=>[_0x1b8835,String(_0xf59629)[_0x37e038(0x18e)]()]));}catch{return null;}}async function resolveTargetVersion(_0x32a812){const _0x2fee9b=a85_0x14a5fb,_0x12d44b=getRequestedVersion(_0x32a812);if(_0x12d44b)return{'version':_0x12d44b,'source':_0x2fee9b(0x161)};const _0x2905f7=_0x32a812[_0x2fee9b(0x17c)](_0x2fee9b(0x191))?_0x2fee9b(0x191):_0x2fee9b(0x14e),_0x32eb49=await fetchNpmDistTags(),_0x127f22=_0x32eb49?.[_0x2905f7];if(!_0x127f22)return null;return{'version':_0x127f22,'source':_0x2905f7};}function a85_0x4a53(_0x53c7fa,_0x2705e8){_0x53c7fa=_0x53c7fa-0x13e;const _0x4bd2e4=a85_0x4bd2();let _0x4a5328=_0x4bd2e4[_0x53c7fa];return _0x4a5328;}function shouldInstallTarget(_0x4a0a22,_0x56456){const _0x5617c2=a85_0x14a5fb;if(_0x56456[_0x5617c2(0x165)]===_0x5617c2(0x161)||_0x56456[_0x5617c2(0x165)]===_0x5617c2(0x191))return!a85_0x10eb0c['eq'](_0x4a0a22,_0x56456['version']);return a85_0x10eb0c['lt'](_0x4a0a22,_0x56456['version']);}export function installCliPackage(_0x17cdc9,_0x394574,_0x4996fe=resolveCurrentCliNpmPrefix()){const _0x38db8c=a85_0x14a5fb,_0x4a4330=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x17cdc9,_0x47fb97=['install','-g',_0x4a4330],_0x5d2ad9=runNpmInstall(_0x47fb97,_0x394574);if(_0x5d2ad9['ok']||!isNpmPrefixPermissionError(_0x5d2ad9[_0x38db8c(0x17e)]))return _0x5d2ad9;if(!_0x4996fe||_0x5d2ad9[_0x38db8c(0x17e)]?.['toLowerCase']()[_0x38db8c(0x168)](_0x4996fe[_0x38db8c(0x160)]()))return _0x5d2ad9;return console['warn'](_0x38db8c(0x188)+_0x4996fe),runNpmInstall([..._0x47fb97,'--prefix',_0x4996fe],_0x394574);}export function resolveCurrentCliNpmPrefix(_0x4ec1eb=fileURLToPath(import.meta.url),_0xe9dd14=process[a85_0x14a5fb(0x185)]){const _0x46df55=a85_0x14a5fb,_0x3e8528=_0xe9dd14===_0x46df55(0x193)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x6b52cb=_0x3e8528[_0x46df55(0x159)](_0x3e8528['dirname'](_0x3e8528['dirname'](_0x4ec1eb))),_0x2c9823=_0xe9dd14==='win32'?'@lovrabet\x5clovrabet-cli':'@lovrabet/lovrabet-cli';let _0xfe5cd1=_0x3e8528[_0x46df55(0x159)](_0x6b52cb);while(!![]){if(_0x3e8528['basename'](_0xfe5cd1)===_0x46df55(0x16c)&&_0x3e8528[_0x46df55(0x149)](_0xfe5cd1,_0x6b52cb)===_0x2c9823){const _0xfa5d6d=_0x3e8528[_0x46df55(0x159)](_0xfe5cd1);return _0x3e8528[_0x46df55(0x176)](_0xfa5d6d)===_0x46df55(0x147)?_0x3e8528[_0x46df55(0x159)](_0xfa5d6d):_0xfa5d6d;}const _0x146a4b=_0x3e8528[_0x46df55(0x159)](_0xfe5cd1);if(_0x146a4b===_0xfe5cd1)return null;_0xfe5cd1=_0x146a4b;}}function runNpmInstall(_0x40f8ac,_0x503770){const _0x5ca1d4=a85_0x14a5fb;console['log']('*\x20'+[_0x5ca1d4(0x17a),..._0x40f8ac][_0x5ca1d4(0x173)]('\x20'));const _0x4357d6=execaSync('npm',_0x40f8ac,{'cwd':process[_0x5ca1d4(0x162)](),'stdio':'pipe','env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0x201efe=_0x4357d6[_0x5ca1d4(0x152)]?String(_0x4357d6['stderr'])[_0x5ca1d4(0x18e)]():'',_0x4d8321=_0x4357d6[_0x5ca1d4(0x18f)]?String(_0x4357d6[_0x5ca1d4(0x18f)])[_0x5ca1d4(0x18e)]():'';if(!_0x503770){if(_0x4d8321)process[_0x5ca1d4(0x18f)][_0x5ca1d4(0x16d)](_0x4d8321+'\x0a');if(_0x201efe)process[_0x5ca1d4(0x152)][_0x5ca1d4(0x16d)](_0x201efe+'\x0a');}if(_0x4357d6[_0x5ca1d4(0x169)]===0x0)return{'ok':!![]};const _0xfd081f=_0x201efe||_0x4d8321||_0x4357d6['shortMessage']||_0x5ca1d4(0x18c)+(_0x4357d6[_0x5ca1d4(0x169)]??_0x5ca1d4(0x178));return{'ok':![],'error':_0xfd081f};}function isNpmPrefixPermissionError(_0x47d859){const _0x30db36=a85_0x14a5fb;return Boolean(_0x47d859&&/\b(?:EACCES|EPERM)\b/[_0x30db36(0x166)](_0x47d859));}function repairCurrentBuiltinSkill(_0x5b30b3){const _0x545b68=a85_0x14a5fb;console['log'](_0x545b68(0x145));const _0x3a1dba=installBuiltinSkill({'stdio':_0x5b30b3?_0x545b68(0x141):_0x545b68(0x179)});if(_0x3a1dba['ok']){console[_0x545b68(0x181)](_0x545b68(0x172)+_0x3a1dba['skillVersion']+'\x20is\x20current.');return;}throw CliErrors[_0x545b68(0x17b)]('CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+(_0x3a1dba['code']||'INSTALL_FAILED')+']:\x20'+(_0x3a1dba[_0x545b68(0x17e)]||_0x545b68(0x178)),'Run:\x20'+_0x3a1dba['repairCommand']+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x540e7b){const _0xefaa36=a85_0x14a5fb;console[_0xefaa36(0x181)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x200bad=inspectInstalledBuiltinSkillVersion(_0x540e7b);if(_0x200bad[_0xefaa36(0x164)]==='current'){console[_0xefaa36(0x181)](_0xefaa36(0x172)+_0x540e7b+_0xefaa36(0x16a));return;}const _0x1d6e21=_0x200bad[_0xefaa36(0x18d)]?_0xefaa36(0x142)+_0x540e7b+_0xefaa36(0x158)+_0x200bad['skillVersion']:_0xefaa36(0x142)+_0x540e7b+_0xefaa36(0x17f)+_0x200bad[_0xefaa36(0x164)],_0x14718a=_0x200bad[_0xefaa36(0x15b)]?_0x1d6e21+':\x20'+_0x200bad[_0xefaa36(0x15b)]:_0x1d6e21;throw CliErrors[_0xefaa36(0x17b)]('CLI\x20updated\x20to\x20v'+_0x540e7b+_0xefaa36(0x195)+_0x14718a,'Run:\x20'+_0x200bad[_0xefaa36(0x171)]+_0xefaa36(0x15e)+CLI_BIN_NAME+_0xefaa36(0x14c));}async function execute(_0x172df0){const _0x477eda=a85_0x14a5fb;await validateUpdateFlags(_0x172df0);const _0x1e7a3b=getCliVersion();console[_0x477eda(0x181)](_0x477eda(0x183)+_0x1e7a3b),console[_0x477eda(0x181)](_0x477eda(0x170));const _0x1c2933=await resolveTargetVersion(_0x172df0);if(!_0x1c2933){const _0x526eef=_0x172df0[_0x477eda(0x17c)](_0x477eda(0x191))?_0x477eda(0x191):_0x477eda(0x14e),_0x243699='Unable\x20to\x20resolve\x20'+_0x526eef+_0x477eda(0x16e);throw CliErrors[_0x477eda(0x17b)](_0x243699,_0x477eda(0x13f)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x526eef);}const _0x571286=[_0x1e7a3b,_0x1c2933[_0x477eda(0x161)]][_0x477eda(0x184)](_0x142c56=>!a85_0x10eb0c[_0x477eda(0x150)](_0x142c56));if(_0x571286){const _0x48980f=_0x477eda(0x157)+_0x571286+'.';throw CliErrors['apiError'](_0x48980f,'Run:\x20npm\x20view\x20'+LOVRABET_NPM_PACKAGE_NAME+_0x477eda(0x13e));}if(!shouldInstallTarget(_0x1e7a3b,_0x1c2933)){const _0x377777=_0x1c2933[_0x477eda(0x165)]==='version'?_0x477eda(0x16f)+_0x1c2933[_0x477eda(0x161)]+').':_0x477eda(0x14d)+_0x1c2933[_0x477eda(0x161)]+').';return console[_0x477eda(0x181)](_0x377777),repairCurrentBuiltinSkill(_0x172df0[_0x477eda(0x16b)]),{'ok':!![]};}console['log'](_0x477eda(0x140)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x1e7a3b+_0x477eda(0x194)+_0x1c2933[_0x477eda(0x161)]);const _0x32799b=installCliPackage(_0x1c2933[_0x477eda(0x161)],_0x172df0[_0x477eda(0x16b)]);if(!_0x32799b['ok']){const _0x4cb822='Update\x20failed:\x20'+(_0x32799b[_0x477eda(0x17e)]||'unknown');throw CliErrors[_0x477eda(0x17b)](_0x4cb822,_0x477eda(0x13f)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1c2933[_0x477eda(0x161)]);}return console[_0x477eda(0x181)](_0x477eda(0x182)+_0x1c2933[_0x477eda(0x161)]+'.'),console[_0x477eda(0x181)](_0x477eda(0x151)),verifyUpdatedBuiltinSkill(_0x1c2933[_0x477eda(0x161)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':'run','description':a85_0x14a5fb(0x180)+CLI_BIN_NAME+a85_0x14a5fb(0x15a),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a85_0x52460b=a85_0xd393;(function(_0x49979b,_0x5912a4){const _0x5906f9=a85_0xd393,_0xc6fc1a=_0x49979b();while(!![]){try{const _0x5029ae=-parseInt(_0x5906f9(0x190))/0x1*(parseInt(_0x5906f9(0x1c0))/0x2)+-parseInt(_0x5906f9(0x193))/0x3+parseInt(_0x5906f9(0x1e5))/0x4+-parseInt(_0x5906f9(0x1de))/0x5+parseInt(_0x5906f9(0x1af))/0x6+-parseInt(_0x5906f9(0x1a0))/0x7+parseInt(_0x5906f9(0x1ac))/0x8;if(_0x5029ae===_0x5912a4)break;else _0xc6fc1a['push'](_0xc6fc1a['shift']());}catch(_0x5f3b08){_0xc6fc1a['push'](_0xc6fc1a['shift']());}}}(a85_0x1316,0xba8b7));import{fileURLToPath}from'node:url';function a85_0x1316(){const _0x43f034=['\x20CLI\x20from\x20npm','Checking\x20npm\x20dist-tags...','win32','npm','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Updating\x20','12621888dydfhE',']:\x20','\x20->\x20','8622144NiIhPP','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Run:\x20npm\x20view\x20','node_modules','version','update','join','--prefix','beta','Install\x20a\x20specific\x20CLI\x20version','bool','stderr','\x20is\x20current.','lib','exit\x20','INSTALL_FAILED','/-/package/','4YeEJux','cwd','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','test','object','find','warn','error','log','exitCode',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','latest','state',',\x20then\x20verify\x20with:\x20','source','Update\x20the\x20','relative','str','platform','entries','@lovrabet\x5clovrabet-cli','Checking\x20CLI\x20Built-in\x20Skill...','timeout','Version\x20comparison\x20failed:\x20','includes','@lovrabet/lovrabet-cli','validation','read','Unable\x20to\x20resolve\x20','/dist-tags','435905aUZJzn','map','trim',',\x20found\x20','stdout','apiError','nonInteractive','5442192ifwLgc','reason','expected\x20','boolean','install','Updated\x20to\x20v','valid','run','Already\x20on\x20requested\x20version\x20(v','\x20version\x20from\x20npm.','529892yNOYLS','skillVersion','unknown','3525705NgnTgL','Run:\x20npm\x20install\x20-g\x20','CLI\x20updated\x20to\x20v','Current\x20version:\x20','repairCommand','dirname','\x20doctor','Run:\x20','fromEntries','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','string','current','filter','9023147GspTBf','code','length','args'];a85_0x1316=function(){return _0x43f034;};return a85_0x1316();}import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a85_0x111dab from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a85_0x52460b(0x1cb),'type':a85_0x52460b(0x1e8),'description':a85_0x52460b(0x1b0),'default':![]},{'name':a85_0x52460b(0x1b7),'type':a85_0x52460b(0x1e8),'description':a85_0x52460b(0x1aa),'default':![]},{'name':a85_0x52460b(0x1b3),'type':a85_0x52460b(0x19d),'description':a85_0x52460b(0x1b8)}];function getRequestedVersion(_0x380301){const _0xc2d99=a85_0x52460b,_0x24fc47=_0x380301[_0xc2d99(0x1d1)](_0xc2d99(0x1b3))[_0xc2d99(0x1e0)]();if(_0x24fc47)return _0x24fc47;return String(_0x380301[_0xc2d99(0x1a3)]?.[0x0]??'')[_0xc2d99(0x1e0)]();}async function validateUpdateFlags(_0x21accf){const _0x511fb3=a85_0x52460b,_0xba3f4d=getRequestedVersion(_0x21accf),_0x559b6c=[_0x21accf[_0x511fb3(0x1b9)](_0x511fb3(0x1cb))?_0x511fb3(0x1cb):'',_0x21accf[_0x511fb3(0x1b9)](_0x511fb3(0x1b7))?'beta':'',_0xba3f4d?'version':''][_0x511fb3(0x19f)](Boolean);if(_0x559b6c[_0x511fb3(0x1a2)]>0x1)throw CliErrors['validation'](_0x511fb3(0x1a9),_0x511fb3(0x1c2));if(_0xba3f4d&&!a85_0x111dab[_0x511fb3(0x18c)](_0xba3f4d))throw CliErrors[_0x511fb3(0x1da)]('Invalid\x20version:\x20'+_0xba3f4d,_0x511fb3(0x19c));}async function fetchNpmDistTags(){const _0x10974a=a85_0x52460b;try{const _0x25d12d=NPM_REGISTRY_BASE_URL+_0x10974a(0x1bf)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x10974a(0x1dd),_0x4dce8c=await fetch(_0x25d12d,{'signal':AbortSignal[_0x10974a(0x1d6)](0x2710)});if(!_0x4dce8c['ok'])return null;const _0x417ace=await _0x4dce8c['json']();if(!_0x417ace||typeof _0x417ace!==_0x10974a(0x1c4))return null;return Object[_0x10974a(0x19b)](Object[_0x10974a(0x1d3)](_0x417ace)[_0x10974a(0x19f)](([,_0x20e678])=>typeof _0x20e678===_0x10974a(0x19d)&&_0x20e678[_0x10974a(0x1e0)]())[_0x10974a(0x1df)](([_0x3cf6ba,_0x4bad43])=>[_0x3cf6ba,String(_0x4bad43)[_0x10974a(0x1e0)]()]));}catch{return null;}}function a85_0xd393(_0x196898,_0x1cb3a1){_0x196898=_0x196898-0x18c;const _0x131615=a85_0x1316();let _0xd39388=_0x131615[_0x196898];return _0xd39388;}async function resolveTargetVersion(_0x5c4f6c){const _0xc2546d=a85_0x52460b,_0x57c4dd=getRequestedVersion(_0x5c4f6c);if(_0x57c4dd)return{'version':_0x57c4dd,'source':_0xc2546d(0x1b3)};const _0x5bf3ef=_0x5c4f6c[_0xc2546d(0x1b9)](_0xc2546d(0x1b7))?_0xc2546d(0x1b7):_0xc2546d(0x1cb),_0x260dc2=await fetchNpmDistTags(),_0x3fed51=_0x260dc2?.[_0x5bf3ef];if(!_0x3fed51)return null;return{'version':_0x3fed51,'source':_0x5bf3ef};}function shouldInstallTarget(_0x4e1f4d,_0x4fed5c){const _0x1a0fed=a85_0x52460b;if(_0x4fed5c[_0x1a0fed(0x1ce)]===_0x1a0fed(0x1b3)||_0x4fed5c['source']==='beta')return!a85_0x111dab['eq'](_0x4e1f4d,_0x4fed5c['version']);return a85_0x111dab['lt'](_0x4e1f4d,_0x4fed5c['version']);}export function installCliPackage(_0x167a41,_0x409add,_0x3a06d7=resolveCurrentCliNpmPrefix()){const _0x323caa=a85_0x52460b,_0x4337cd=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x167a41,_0x1fceae=[_0x323caa(0x1e9),'-g',_0x4337cd],_0x565eb9=runNpmInstall(_0x1fceae,_0x409add);if(_0x565eb9['ok']||!isNpmPrefixPermissionError(_0x565eb9[_0x323caa(0x1c7)]))return _0x565eb9;if(!_0x3a06d7||_0x565eb9['error']?.['toLowerCase']()[_0x323caa(0x1d8)](_0x3a06d7['toLowerCase']()))return _0x565eb9;return console[_0x323caa(0x1c6)]('Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20'+_0x3a06d7),runNpmInstall([..._0x1fceae,_0x323caa(0x1b6),_0x3a06d7],_0x409add);}export function resolveCurrentCliNpmPrefix(_0xf873dd=fileURLToPath(import.meta.url),_0x4cae0e=process[a85_0x52460b(0x1d2)]){const _0x294f51=a85_0x52460b,_0x245d93=_0x4cae0e===_0x294f51(0x1a6)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x467293=_0x245d93[_0x294f51(0x198)](_0x245d93[_0x294f51(0x198)](_0x245d93[_0x294f51(0x198)](_0xf873dd))),_0x14e015=_0x4cae0e===_0x294f51(0x1a6)?_0x294f51(0x1d4):_0x294f51(0x1d9);let _0x542743=_0x245d93['dirname'](_0x467293);while(!![]){if(_0x245d93['basename'](_0x542743)===_0x294f51(0x1b2)&&_0x245d93[_0x294f51(0x1d0)](_0x542743,_0x467293)===_0x14e015){const _0x35785a=_0x245d93[_0x294f51(0x198)](_0x542743);return _0x245d93['basename'](_0x35785a)===_0x294f51(0x1bc)?_0x245d93[_0x294f51(0x198)](_0x35785a):_0x35785a;}const _0x578503=_0x245d93[_0x294f51(0x198)](_0x542743);if(_0x578503===_0x542743)return null;_0x542743=_0x578503;}}function runNpmInstall(_0x4c1ec7,_0x6bbcca){const _0x41a118=a85_0x52460b;console[_0x41a118(0x1c8)]('*\x20'+[_0x41a118(0x1a7),..._0x4c1ec7][_0x41a118(0x1b5)]('\x20'));const _0x4ccfd4=execaSync('npm',_0x4c1ec7,{'cwd':process[_0x41a118(0x1c1)](),'stdio':'pipe','env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0x419859=_0x4ccfd4[_0x41a118(0x1ba)]?String(_0x4ccfd4[_0x41a118(0x1ba)])[_0x41a118(0x1e0)]():'',_0x1b2850=_0x4ccfd4[_0x41a118(0x1e2)]?String(_0x4ccfd4[_0x41a118(0x1e2)])['trim']():'';if(!_0x6bbcca){if(_0x1b2850)process[_0x41a118(0x1e2)]['write'](_0x1b2850+'\x0a');if(_0x419859)process[_0x41a118(0x1ba)]['write'](_0x419859+'\x0a');}if(_0x4ccfd4[_0x41a118(0x1c9)]===0x0)return{'ok':!![]};const _0x3bd420=_0x419859||_0x1b2850||_0x4ccfd4['shortMessage']||_0x41a118(0x1bd)+(_0x4ccfd4[_0x41a118(0x1c9)]??'unknown');return{'ok':![],'error':_0x3bd420};}function isNpmPrefixPermissionError(_0x554293){const _0x44670c=a85_0x52460b;return Boolean(_0x554293&&/\b(?:EACCES|EPERM)\b/[_0x44670c(0x1c3)](_0x554293));}function repairCurrentBuiltinSkill(_0x1dc578){const _0x183254=a85_0x52460b;console['log'](_0x183254(0x1d5));const _0x288dbe=installBuiltinSkill({'stdio':_0x1dc578?'pipe':'inherit'});if(_0x288dbe['ok']){console['log']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x288dbe[_0x183254(0x191)]+_0x183254(0x1bb));return;}throw CliErrors[_0x183254(0x1e3)]('CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+(_0x288dbe[_0x183254(0x1a1)]||_0x183254(0x1be))+_0x183254(0x1ad)+(_0x288dbe[_0x183254(0x1c7)]||_0x183254(0x192)),'Run:\x20'+_0x288dbe['repairCommand']+_0x183254(0x1cd)+CLI_BIN_NAME+_0x183254(0x199));}function verifyUpdatedBuiltinSkill(_0x2b7306){const _0x18a3bf=a85_0x52460b;console[_0x18a3bf(0x1c8)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x36bc64=inspectInstalledBuiltinSkillVersion(_0x2b7306);if(_0x36bc64[_0x18a3bf(0x1cc)]===_0x18a3bf(0x19e)){console[_0x18a3bf(0x1c8)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x2b7306+_0x18a3bf(0x1bb));return;}const _0x55fbc5=_0x36bc64['skillVersion']?_0x18a3bf(0x1e7)+_0x2b7306+_0x18a3bf(0x1e1)+_0x36bc64[_0x18a3bf(0x191)]:'expected\x20'+_0x2b7306+',\x20state\x20'+_0x36bc64[_0x18a3bf(0x1cc)],_0x222738=_0x36bc64[_0x18a3bf(0x1e6)]?_0x55fbc5+':\x20'+_0x36bc64[_0x18a3bf(0x1e6)]:_0x55fbc5;throw CliErrors[_0x18a3bf(0x1e3)](_0x18a3bf(0x195)+_0x2b7306+_0x18a3bf(0x1ca)+_0x222738,_0x18a3bf(0x19a)+_0x36bc64[_0x18a3bf(0x197)]+_0x18a3bf(0x1cd)+CLI_BIN_NAME+'\x20doctor');}async function execute(_0x141210){const _0x1be9f5=a85_0x52460b;await validateUpdateFlags(_0x141210);const _0x24717c=getCliVersion();console[_0x1be9f5(0x1c8)](_0x1be9f5(0x196)+_0x24717c),console[_0x1be9f5(0x1c8)](_0x1be9f5(0x1a5));const _0x5ebea3=await resolveTargetVersion(_0x141210);if(!_0x5ebea3){const _0x15c4e3=_0x141210[_0x1be9f5(0x1b9)](_0x1be9f5(0x1b7))?_0x1be9f5(0x1b7):_0x1be9f5(0x1cb),_0x5d768f=_0x1be9f5(0x1dc)+_0x15c4e3+_0x1be9f5(0x18f);throw CliErrors['apiError'](_0x5d768f,_0x1be9f5(0x194)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x15c4e3);}const _0x45a18e=[_0x24717c,_0x5ebea3[_0x1be9f5(0x1b3)]][_0x1be9f5(0x1c5)](_0x3a4bd5=>!a85_0x111dab[_0x1be9f5(0x18c)](_0x3a4bd5));if(_0x45a18e){const _0x275345=_0x1be9f5(0x1d7)+_0x45a18e+'.';throw CliErrors[_0x1be9f5(0x1e3)](_0x275345,_0x1be9f5(0x1b1)+LOVRABET_NPM_PACKAGE_NAME+'\x20dist-tags,\x20then\x20retry.');}if(!shouldInstallTarget(_0x24717c,_0x5ebea3)){const _0xfafcc7=_0x5ebea3[_0x1be9f5(0x1ce)]==='version'?_0x1be9f5(0x18e)+_0x5ebea3[_0x1be9f5(0x1b3)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x5ebea3[_0x1be9f5(0x1b3)]+').';return console[_0x1be9f5(0x1c8)](_0xfafcc7),repairCurrentBuiltinSkill(_0x141210['nonInteractive']),{'ok':!![]};}console[_0x1be9f5(0x1c8)](_0x1be9f5(0x1ab)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x24717c+_0x1be9f5(0x1ae)+_0x5ebea3[_0x1be9f5(0x1b3)]);const _0x5964d8=installCliPackage(_0x5ebea3[_0x1be9f5(0x1b3)],_0x141210[_0x1be9f5(0x1e4)]);if(!_0x5964d8['ok']){const _0x2c1fb0='Update\x20failed:\x20'+(_0x5964d8['error']||_0x1be9f5(0x192));throw CliErrors[_0x1be9f5(0x1e3)](_0x2c1fb0,_0x1be9f5(0x194)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x5ebea3[_0x1be9f5(0x1b3)]);}return console[_0x1be9f5(0x1c8)](_0x1be9f5(0x1ea)+_0x5ebea3[_0x1be9f5(0x1b3)]+'.'),console['log'](_0x1be9f5(0x1a8)),verifyUpdatedBuiltinSkill(_0x5ebea3[_0x1be9f5(0x1b3)]),{'ok':!![]};}export const updateDefinition={'service':a85_0x52460b(0x1b4),'command':a85_0x52460b(0x18d),'description':a85_0x52460b(0x1cf)+CLI_BIN_NAME+a85_0x52460b(0x1a4),'risk':a85_0x52460b(0x1db),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x5afffc=a86_0x5b81;(function(_0x466cd0,_0x1db373){const _0x1c9b16=a86_0x5b81,_0x4e0821=_0x466cd0();while(!![]){try{const _0x18895f=parseInt(_0x1c9b16(0x18a))/0x1+parseInt(_0x1c9b16(0x18b))/0x2*(-parseInt(_0x1c9b16(0x195))/0x3)+parseInt(_0x1c9b16(0x190))/0x4*(-parseInt(_0x1c9b16(0x17d))/0x5)+parseInt(_0x1c9b16(0x19b))/0x6*(parseInt(_0x1c9b16(0x184))/0x7)+-parseInt(_0x1c9b16(0x188))/0x8+parseInt(_0x1c9b16(0x183))/0x9*(parseInt(_0x1c9b16(0x180))/0xa)+-parseInt(_0x1c9b16(0x18c))/0xb*(-parseInt(_0x1c9b16(0x18d))/0xc);if(_0x18895f===_0x1db373)break;else _0x4e0821['push'](_0x4e0821['shift']());}catch(_0x177e6f){_0x4e0821['push'](_0x4e0821['shift']());}}}(a86_0x5dcc,0x4c84a));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';function a86_0x5b81(_0x8ce153,_0x39507f){_0x8ce153=_0x8ce153-0x17d;const _0x5dcce7=a86_0x5dcc();let _0x5b812e=_0x5dcce7[_0x8ce153];return _0x5b812e;}import{CliErrors}from'../../errors.js';function a86_0x5dcc(){const _0x29476b=['169454vMFqIr','64lsrZFu','9100938EdhOju','12rMkEOb','write','string','68FzStai','(empty)','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','account-id','str','46353DAvFOd','provider','External\x20account\x20ID\x20for\x20the\x20selected\x20provider','Unsupported\x20provider:\x20','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','Binds\x20the\x20platform\x20user\x20of\x20the\x20current\x20AccessKey\x20to\x20the\x20given\x20collaboration-provider\x20account.\x20An\x20existing\x20bind\x20for\x20the\x20same\x20provider\x20may\x20be\x20replaced.','30iMPZJP','validation','user-account','123855oTtqqc','includes','toLowerCase','30brHGFM','External\x20account\x20binding\x20was\x20not\x20confirmed.','bind','827289AGJIjB','431235XqgoXb','dingtalk','POST','trim','2813144ldqZVQ','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.'];a86_0x5dcc=function(){return _0x29476b;};return a86_0x5dcc();}const CURRENT_BINDING_WARNING=a86_0x5afffc(0x192),SUPPORTED_PROVIDERS=[a86_0x5afffc(0x185)];function readBindingInput(_0x4180e2){const _0x27f891=a86_0x5afffc,_0x18c2f4=_0x4180e2[_0x27f891(0x194)](_0x27f891(0x196))[_0x27f891(0x187)]()[_0x27f891(0x17f)]();if(!SUPPORTED_PROVIDERS[_0x27f891(0x17e)](_0x18c2f4))throw CliErrors[_0x27f891(0x19c)](_0x27f891(0x198)+(_0x18c2f4||_0x27f891(0x191))+'.','Pass\x20one\x20of:\x20'+SUPPORTED_PROVIDERS['join'](',\x20')+'.');const _0x19f9a6=_0x4180e2[_0x27f891(0x194)](_0x27f891(0x193))[_0x27f891(0x187)]();if(!_0x19f9a6)throw CliErrors[_0x27f891(0x19c)]('--account-id\x20cannot\x20be\x20empty.','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.');return{'provider':_0x18c2f4,'accountId':_0x19f9a6};}function buildBindingData(_0x1fec46,_0x4cceb3,_0x19d274){const _0x3f164e=a86_0x5afffc;return{'operation':_0x3f164e(0x182),'selector':{'provider':_0x1fec46,'accountId':_0x4cceb3},'before':null,'after':{'provider':_0x1fec46,'accountId':_0x4cceb3,'bound':!![]},'dryRun':_0x19d274,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':a86_0x5afffc(0x19d),'command':a86_0x5afffc(0x182),'description':a86_0x5afffc(0x199),'risk':a86_0x5afffc(0x18e),'confirmationDescription':a86_0x5afffc(0x19a),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':a86_0x5afffc(0x196),'type':a86_0x5afffc(0x18f),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':'External\x20account\x20provider'},{'name':a86_0x5afffc(0x193),'type':a86_0x5afffc(0x18f),'required':!![],'description':a86_0x5afffc(0x197)}],async 'validate'(_0x160610){readBindingInput(_0x160610);},async 'dryRun'(_0x28d823){const _0x953dfb=a86_0x5afffc,{provider:_0x3b5279,accountId:_0x168d2b}=readBindingInput(_0x28d823);return{...buildBindingData(_0x3b5279,_0x168d2b,!![]),'method':_0x953dfb(0x186),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x3b5279,'accountId':_0x168d2b}};},async 'execute'(_0x375df2){const _0x51e09d=a86_0x5afffc,{provider:_0x573f8e,accountId:_0x537e02}=readBindingInput(_0x375df2),_0x1c3774=await bindExternalUserAccount(_0x573f8e,_0x537e02);if(_0x1c3774!==!![])throw CliErrors['apiError'](_0x51e09d(0x181),'Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.');return{'ok':!![],'data':buildBindingData(_0x573f8e,_0x537e02,![]),'message':_0x51e09d(0x189)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a87_0x2241(){const _0x40ed14=['5910888jTqKum','99896IuIOmQ','82776ETJYlt','82aetxVa','69CybZle','132980PTHxuN','979uVypJj','42ioCKjR','1231804bmvwGp','414Etgkqu','496085zjwdTh','7471SIwgmn'];a87_0x2241=function(){return _0x40ed14;};return a87_0x2241();}(function(_0x1cba62,_0x5ae57b){const _0x5aa8a6=a87_0x2cfc,_0x40f9af=_0x1cba62();while(!![]){try{const _0x3b4c81=-parseInt(_0x5aa8a6(0xf6))/0x1*(-parseInt(_0x5aa8a6(0xfa))/0x2)+-parseInt(_0x5aa8a6(0xfb))/0x3*(-parseInt(_0x5aa8a6(0xf8))/0x4)+parseInt(_0x5aa8a6(0xf5))/0x5*(parseInt(_0x5aa8a6(0xfe))/0x6)+-parseInt(_0x5aa8a6(0xf3))/0x7+-parseInt(_0x5aa8a6(0xf7))/0x8+parseInt(_0x5aa8a6(0xf4))/0x9*(-parseInt(_0x5aa8a6(0xfc))/0xa)+-parseInt(_0x5aa8a6(0xfd))/0xb*(-parseInt(_0x5aa8a6(0xf9))/0xc);if(_0x3b4c81===_0x5ae57b)break;else _0x40f9af['push'](_0x40f9af['shift']());}catch(_0x104d29){_0x40f9af['push'](_0x40f9af['shift']());}}}(a87_0x2241,0xa1c55));import{bindUserAccount}from'../../commands/user-account/bind.js';function a87_0x2cfc(_0x2eb96b,_0x5789f4){_0x2eb96b=_0x2eb96b-0xf3;const _0x22411c=a87_0x2241();let _0x2cfce=_0x22411c[_0x2eb96b];return _0x2cfce;}export const userAccountDefinitions=[bindUserAccount];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a88_0x31b2(_0x25b9b0,_0x4584bd){_0x25b9b0=_0x25b9b0-0x1a0;const _0xd849b3=a88_0xd849();let _0x31b217=_0xd849b3[_0x25b9b0];return _0x31b217;}const a88_0x37501b=a88_0x31b2;(function(_0x17f866,_0x2928b2){const _0x3b5905=a88_0x31b2,_0x20d681=_0x17f866();while(!![]){try{const _0x4b95e4=-parseInt(_0x3b5905(0x1c2))/0x1+-parseInt(_0x3b5905(0x1b3))/0x2+-parseInt(_0x3b5905(0x1dc))/0x3*(-parseInt(_0x3b5905(0x1bf))/0x4)+parseInt(_0x3b5905(0x1d3))/0x5*(parseInt(_0x3b5905(0x1b0))/0x6)+-parseInt(_0x3b5905(0x1bd))/0x7+-parseInt(_0x3b5905(0x1c0))/0x8*(-parseInt(_0x3b5905(0x1d2))/0x9)+parseInt(_0x3b5905(0x1d7))/0xa;if(_0x4b95e4===_0x2928b2)break;else _0x20d681['push'](_0x20d681['shift']());}catch(_0x170ee4){_0x20d681['push'](_0x20d681['shift']());}}}(a88_0xd849,0x3778a));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':a88_0x37501b(0x1d0),'type':a88_0x37501b(0x1bb),'description':'App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default'},{'name':a88_0x37501b(0x1c9),'type':'string','description':a88_0x37501b(0x1ac)},{'name':a88_0x37501b(0x1b7),'type':'string','description':a88_0x37501b(0x1a5),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x5d1bb5,_0x533929){const _0xf0115b=a88_0x37501b,_0x254266=_0x5d1bb5[_0xf0115b(0x1d1)](_0xf0115b(0x1d0))[_0xf0115b(0x1db)](),_0x404aa2=_0x5d1bb5[_0xf0115b(0x1d1)]('appcode')[_0xf0115b(0x1db)](),_0x4fe281=_0x5d1bb5[_0xf0115b(0x1d1)]('env')['trim'](),_0xa99771=resolveWorkspaceEnv(_0x4fe281||_0x5d1bb5['envName']||DEFAULT_CONFIG_VALUES[_0xf0115b(0x1b7)]);if(!_0x254266&&!_0x404aa2)throw CliErrors[_0xf0115b(0x1ab)]('Missing\x20workspace\x20app\x20selector.',_0xf0115b(0x1cb)+CLI_BIN_NAME+_0xf0115b(0x1c7)+_0x533929+_0xf0115b(0x1ad)+CLI_BIN_NAME+_0xf0115b(0x1c7)+_0x533929+_0xf0115b(0x1a9));if(_0x254266&&_0x404aa2)throw CliErrors[_0xf0115b(0x1ab)](_0xf0115b(0x1b1),'Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.');const _0x1ae58f=resolveWriteConfigPath(_0xf0115b(0x1c5)),_0x49f478=readConfigFile(_0x1ae58f);assertWorkspaceCommandState(_0x533929,_0x49f478);const _0x28e628=_0x404aa2||await resolveRemoteAppCode({'command':_0x533929,'appName':_0x254266,'env':_0xa99771,'accessKey':_0x5d1bb5[_0xf0115b(0x1c1)]});return writeWorkspaceConfig({'command':_0x533929,'appName':_0x254266,'appcode':_0x28e628,'env':_0xa99771,'shouldWriteEnv':!!_0x4fe281,'accessKey':_0x5d1bb5[_0xf0115b(0x1c1)]},_0x1ae58f,_0x49f478),{'ok':!![],'data':{'configPath':_0x1ae58f,'app':_0x254266||null,'appcode':_0x28e628,'env':_0x4fe281?_0xa99771:null,'accessKeyWritten':![],'command':_0xf0115b(0x1cc)+_0x533929},'message':buildWorkspaceMessage(_0x1ae58f,_0x254266,_0x28e628,_0x4fe281?_0xa99771:undefined)};}async function resolveRemoteAppCode(_0x3d0d0d){const _0x43a5ca=a88_0x37501b;if(!_0x3d0d0d['accessKey'])throw CliErrors[_0x43a5ca(0x1b8)](_0x43a5ca(0x1d8)+CLI_BIN_NAME+_0x43a5ca(0x1c7)+_0x3d0d0d['command']+'.');const {setActiveAK:_0x3690c2}=await import(_0x43a5ca(0x1a0)),{getRemoteAppList:_0x429891}=await import(_0x43a5ca(0x1ba));_0x3690c2(_0x3d0d0d[_0x43a5ca(0x1c1)]);const _0x37d391=await _0x429891({'env':_0x3d0d0d[_0x43a5ca(0x1b7)],'accessKey':_0x3d0d0d[_0x43a5ca(0x1c1)],'noCache':![]}),_0x182b28=findAppByName(_0x37d391['items'],_0x3d0d0d[_0x43a5ca(0x1bc)]);if(_0x182b28&&!isRuntimeAccessibleApp(_0x182b28))throw runtimeInaccessibleAppError(_0x182b28,'\x22'+_0x3d0d0d[_0x43a5ca(0x1bc)]+'\x22');const _0x337ec0=_0x182b28?.[_0x43a5ca(0x1b9)]?.[_0x43a5ca(0x1db)]();if(_0x337ec0)return _0x337ec0;const _0x379c08=_0x37d391['items'][_0x43a5ca(0x1b4)](_0x2cf05d=>_0x2cf05d[_0x43a5ca(0x1bc)])[_0x43a5ca(0x1ae)](Boolean),_0x5b78cf=_0x379c08['length']?'Available\x20apps:\x20'+Array[_0x43a5ca(0x1d9)](new Set(_0x379c08))['join'](',\x20')+'.':_0x43a5ca(0x1ce)+CLI_BIN_NAME+_0x43a5ca(0x1aa);throw CliErrors[_0x43a5ca(0x1ab)](_0x43a5ca(0x1b2)+_0x3d0d0d[_0x43a5ca(0x1bc)]+_0x43a5ca(0x1a6),_0x5b78cf);}function writeWorkspaceConfig(_0x18e148,_0xd7f96f,_0x548cd5){const _0x432ec2=a88_0x37501b;_0x18e148['shouldWriteEnv']&&(_0x548cd5[_0x432ec2(0x1b7)]=_0x18e148[_0x432ec2(0x1b7)]);if(_0x18e148[_0x432ec2(0x1bc)]){const _0x151556=isRecord(_0x548cd5[_0x432ec2(0x1a8)])?{..._0x548cd5['apps']}:{},_0x194798=isRecord(_0x151556[_0x18e148[_0x432ec2(0x1bc)]])?_0x151556[_0x18e148[_0x432ec2(0x1bc)]]:{};return _0x151556[_0x18e148[_0x432ec2(0x1bc)]]={..._0x194798,'appcode':_0x18e148[_0x432ec2(0x1c9)]},_0x548cd5['apps']=_0x151556,_0x548cd5['defaultApp']=_0x18e148['appName'],delete _0x548cd5[_0x432ec2(0x1c9)],delete _0x548cd5[_0x432ec2(0x1d0)],writeAndReturn(_0xd7f96f,_0x548cd5);}return _0x548cd5['appcode']=_0x18e148[_0x432ec2(0x1c9)],delete _0x548cd5[_0x432ec2(0x1be)],delete _0x548cd5['app'],writeAndReturn(_0xd7f96f,_0x548cd5);}function writeAndReturn(_0x3d786a,_0x2b0920){return writeConfigFile(_0x3d786a,_0x2b0920),_0x3d786a;}function resolveWorkspaceEnv(_0x1fcf04){const _0x5cace5=a88_0x37501b;if(RUNTIME_ENV_VALUES[_0x5cace5(0x1b5)](_0x1fcf04))return _0x1fcf04;throw CliErrors[_0x5cace5(0x1ab)](_0x5cace5(0x1a7)+_0x1fcf04+_0x5cace5(0x1c6)+RUNTIME_ENV_VALUES[_0x5cace5(0x1c8)](',\x20'));}function buildWorkspaceMessage(_0x334353,_0x339258,_0x5e963e,_0x2b64f8){const _0x54fbcf=a88_0x37501b,_0x29f4f8=_0x339258?_0x339258+'\x20('+_0x5e963e+')':_0x5e963e,_0x449322=_0x2b64f8?_0x54fbcf(0x1ca)+_0x2b64f8:'';return _0x54fbcf(0x1cf)+_0x334353+'\x0aDefault\x20app:\x20'+_0x29f4f8+_0x449322+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0x5d13c8){const _0xd96a42=a88_0x37501b;return typeof _0x5d13c8===_0xd96a42(0x1a4)&&_0x5d13c8!==null&&!Array[_0xd96a42(0x1d4)](_0x5d13c8);}function hasWorkspaceAppBinding(_0x45fb30){const _0x999709=a88_0x37501b;if(typeof _0x45fb30[_0x999709(0x1c9)]===_0x999709(0x1bb)&&_0x45fb30['appcode'][_0x999709(0x1db)]()[_0x999709(0x1c4)]>0x0)return!![];if(typeof _0x45fb30[_0x999709(0x1be)]!==_0x999709(0x1bb)||!_0x45fb30[_0x999709(0x1be)]['trim']())return![];if(!isRecord(_0x45fb30[_0x999709(0x1a8)]))return![];const _0x2b8d29=_0x45fb30[_0x999709(0x1a8)][_0x45fb30[_0x999709(0x1be)][_0x999709(0x1db)]()];return isRecord(_0x2b8d29)&&typeof _0x2b8d29[_0x999709(0x1c9)]==='string'&&_0x2b8d29[_0x999709(0x1c9)][_0x999709(0x1db)]()[_0x999709(0x1c4)]>0x0;}function assertWorkspaceCommandState(_0x3bc146,_0x7d4d97){const _0x561a5b=a88_0x37501b,_0x456596=hasWorkspaceAppBinding(_0x7d4d97);if(_0x3bc146==='init'&&_0x456596)throw CliErrors[_0x561a5b(0x1ab)]('Workspace\x20app\x20context\x20is\x20already\x20initialized.',_0x561a5b(0x1d5)+CLI_BIN_NAME+_0x561a5b(0x1a2)+CLI_BIN_NAME+'\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.');if(_0x3bc146===_0x561a5b(0x1b6)&&!_0x456596)throw CliErrors[_0x561a5b(0x1ab)](_0x561a5b(0x1af),'Run\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+_0x561a5b(0x1cd));}function makeWorkspaceCommand(_0x35c759){const _0x189b32=a88_0x37501b;return{'service':_0x189b32(0x1a1),'command':_0x35c759,'description':_0x35c759===_0x189b32(0x1d6)?_0x189b32(0x1a3):'Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','risk':_0x189b32(0x1da),'confirmationDescription':_0x35c759===_0x189b32(0x1d6)?'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.':_0x189b32(0x1c3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x12e7db){return executeWorkspaceUse(_0x12e7db,_0x35c759);}};}function a88_0xd849(){const _0x3f3fff=['Run\x20`','Workspace\x20configured.\x0aConfig\x20file:\x20','app','str','63vFwzsP','5GImqYi','isArray','Use\x20`','init','462060DDciZU','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','from','write','trim','21DeXRzJ','../../core/api-client.js','workspace','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet','object','Target\x20environment','\x22\x20not\x20found.','Invalid\x20env\x20\x22','apps','\x20--appcode\x20<code>\x20[--env\x20daily]','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','validation','App\x20code\x20to\x20bind\x20directly','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','filter','Workspace\x20app\x20context\x20is\x20not\x20initialized.','221772jGKGoZ','Conflicting\x20workspace\x20app\x20selectors.','App\x20\x22','232654EZRGtT','map','includes','use','env','authRequired','appCode','../../commands/app/remote-source.js','string','appName','1827798szcECE','defaultApp','155404pLWdwp','466968sodniq','accessKey','159071wFmPHd','Updates\x20the\x20app\x20binding\x20already\x20present\x20in\x20the\x20current\x20working\x20directory\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','length','project','\x22.\x20Allowed:\x20','\x20workspace\x20','join','appcode','\x0aEnv:\x20','Usage:\x20','workspace\x20','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.'];a88_0xd849=function(){return _0x3f3fff;};return a88_0xd849();}export const workspaceDefinitions=[makeWorkspaceCommand(a88_0x37501b(0x1d6)),makeWorkspaceCommand(a88_0x37501b(0x1b6))];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ENTERPRISE_ROUTING_DOMAIN_FIELDS } from "../generated/routing-contract.js";
|
|
2
|
-
export declare const DOMAIN_CONFIG_FIELDS: readonly ["userDomain", "apiDomain", "runtimeDomain", "skillDomain"];
|
|
2
|
+
export declare const DOMAIN_CONFIG_FIELDS: readonly ["userDomain", "apiDomain", "runtimeDomain", "skillDomain", "kbServiceDomain"];
|
|
3
3
|
export type DomainConfigField = (typeof DOMAIN_CONFIG_FIELDS)[number];
|
|
4
4
|
export type DomainConfig = Partial<Record<DomainConfigField, string>>;
|
|
5
5
|
export type EnterpriseRoutingDomainField = (typeof ENTERPRISE_ROUTING_DOMAIN_FIELDS)[number];
|
|
@@ -13,7 +13,7 @@ export type DomainConfigInput = {
|
|
|
13
13
|
manifestDomains: EnterpriseRoutingDomains;
|
|
14
14
|
};
|
|
15
15
|
/** Old domain keys removed when connection routing is reinitialized. */
|
|
16
|
-
export declare const LEGACY_DOMAIN_CONFIG_FIELDS: readonly ["agentDomain", "platformDomain", "skillHubDomain", "kbDomain"];
|
|
16
|
+
export declare const LEGACY_DOMAIN_CONFIG_FIELDS: readonly ["host", "agentDomain", "platformDomain", "skillHubDomain", "kbDomain"];
|
|
17
17
|
/** Validates and normalizes an exact HTTPS origin used for authenticated requests. */
|
|
18
18
|
export declare function normalizeDomainOrigin(field: DomainConfigField | EnterpriseRoutingDomainField, input: unknown): string;
|
|
19
19
|
export declare function normalizeRoutingDomainValue(field: EnterpriseRoutingDomainField, input: unknown): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x4111c2=a89_0x4c54;(function(_0x111337,_0x3b871a){const _0x45a65f=a89_0x4c54,_0x34c15e=_0x111337();while(!![]){try{const _0x428f7b=parseInt(_0x45a65f(0x174))/0x1+-parseInt(_0x45a65f(0x14d))/0x2+parseInt(_0x45a65f(0x153))/0x3*(parseInt(_0x45a65f(0x167))/0x4)+-parseInt(_0x45a65f(0x158))/0x5*(parseInt(_0x45a65f(0x175))/0x6)+-parseInt(_0x45a65f(0x150))/0x7+-parseInt(_0x45a65f(0x17e))/0x8*(-parseInt(_0x45a65f(0x173))/0x9)+parseInt(_0x45a65f(0x15c))/0xa;if(_0x428f7b===_0x3b871a)break;else _0x34c15e['push'](_0x34c15e['shift']());}catch(_0x56bccc){_0x34c15e['push'](_0x34c15e['shift']());}}}(a89_0x2146,0xa6484));function a89_0x2146(){const _0x32454c=['agentDomain','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','length','304BOIFWN','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','user-domain',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','Invalid\x20','kbDomain','domains','validation','Enterprise\x20','apiDomain','pathname','object','9HtFveA','65704JhmjSO','72pQkhlY','isArray','lovrabet-cli','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','legacy','enterprise-v1','trim','platformDomain','Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.','9398544uxkhDO','password','kbServiceDomain','runtimeDomain','userDomain','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','join','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','\x22\x20is\x20not\x20a\x20valid\x20URL.','parse','includes','cwd','string','hash','skillHubDomain','881266LnbGoo','search','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','7738619CjpNKg','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','skillDomain','34245yeEEeY','str','host','\x22\x20and\x20kind\x20\x22','runtime-domain','159730gLgWni','kind','mode',':\x20\x22','5025320UDBrCN','Invalid\x20domain\x20config\x20JSON:\x20','origin','Unsupported\x20domain\x20config\x20field(s):\x20','filter','keys','domain-config','protocol'];a89_0x2146=function(){return _0x32454c;};return a89_0x2146();}import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';function a89_0x4c54(_0x38354a,_0x3dfcf3){_0x38354a=_0x38354a-0x145;const _0x2146d7=a89_0x2146();let _0x4c54b4=_0x2146d7[_0x38354a];return _0x4c54b4;}import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a89_0x4111c2(0x182),a89_0x4111c2(0x170),a89_0x4111c2(0x181),a89_0x4111c2(0x152),'kbServiceDomain'];const DOMAIN_FLAGS={'userDomain':a89_0x4111c2(0x169),'apiDomain':'api-domain','runtimeDomain':a89_0x4111c2(0x157),'skillDomain':'skill-domain','kbServiceDomain':'kb-service-domain'};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a89_0x4111c2(0x155),a89_0x4111c2(0x164),a89_0x4111c2(0x17c),a89_0x4111c2(0x14c),a89_0x4111c2(0x16c)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a89_0x4111c2(0x182),'apiDomain':a89_0x4111c2(0x170),'runtimeDomain':a89_0x4111c2(0x181),'skillDomain':a89_0x4111c2(0x152),'kbServiceDomain':a89_0x4111c2(0x180)},ROUTING_CONSUMER=a89_0x4111c2(0x177);export function normalizeDomainOrigin(_0x576ff8,_0x52aa19){const _0x406b0=a89_0x4111c2;if(typeof _0x52aa19!==_0x406b0(0x14a)||!_0x52aa19[_0x406b0(0x17b)]())throw CliErrors[_0x406b0(0x16e)](_0x406b0(0x16b)+_0x576ff8+_0x406b0(0x16a));let _0x22ade7;try{_0x22ade7=new URL(_0x52aa19[_0x406b0(0x17b)]());}catch{throw CliErrors[_0x406b0(0x16e)](_0x406b0(0x16b)+_0x576ff8+_0x406b0(0x15b)+_0x52aa19+_0x406b0(0x146));}if(_0x22ade7['protocol']!=='https:'||_0x22ade7['username']||_0x22ade7[_0x406b0(0x17f)]||_0x22ade7[_0x406b0(0x171)]!=='/'&&_0x22ade7[_0x406b0(0x171)]!==''||_0x22ade7[_0x406b0(0x14e)]||_0x22ade7[_0x406b0(0x14b)])throw CliErrors[_0x406b0(0x16e)](_0x406b0(0x16b)+_0x576ff8+':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.',_0x406b0(0x165));return _0x22ade7[_0x406b0(0x15e)];}export function normalizeRoutingDomainValue(_0x3c4e8d,_0x4233f0){const _0x2d054b=a89_0x4111c2;if(typeof _0x4233f0===_0x2d054b(0x14a))return normalizeDomainOrigin(_0x3c4e8d,_0x4233f0);if(!_0x4233f0||typeof _0x4233f0!==_0x2d054b(0x172)||Array[_0x2d054b(0x176)](_0x4233f0))throw CliErrors[_0x2d054b(0x16e)](_0x2d054b(0x16b)+_0x3c4e8d+':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.');const _0x2823b8=_0x4233f0,_0x5249ba=_0x2823b8[ROUTING_CONSUMER]??_0x2823b8['default'];if(_0x5249ba===undefined)throw CliErrors[_0x2d054b(0x16e)](_0x2d054b(0x16f)+_0x3c4e8d+_0x2d054b(0x14f)+ROUTING_CONSUMER+'\x20and\x20has\x20no\x20default.');return normalizeDomainOrigin(_0x3c4e8d,_0x5249ba);}export function resolveEnterpriseRoutingConfig(_0xe463ee){const _0x284f65=a89_0x4111c2;if(_0xe463ee===undefined)return undefined;if(!_0xe463ee||typeof _0xe463ee!=='object'||Array['isArray'](_0xe463ee))throw CliErrors[_0x284f65(0x16e)](_0x284f65(0x17d));return parseEnterpriseRoutingManifest(_0xe463ee)[_0x284f65(0x16d)];}export function readDomainConfigInput(_0x3ddc89){const _0x1c17bf=a89_0x4111c2,_0x121f17=isAbsolute(_0x3ddc89)?_0x3ddc89:resolve(process[_0x1c17bf(0x149)](),_0x3ddc89);if(!existsSync(_0x121f17))throw CliErrors['validation']('Domain\x20config\x20file\x20not\x20found:\x20'+_0x121f17);let _0x391e22;try{_0x391e22=JSON[_0x1c17bf(0x147)](readFileSync(_0x121f17,'utf8'));}catch{throw CliErrors[_0x1c17bf(0x16e)](_0x1c17bf(0x15d)+_0x121f17);}if(!_0x391e22||typeof _0x391e22!=='object'||Array[_0x1c17bf(0x176)](_0x391e22))throw CliErrors[_0x1c17bf(0x16e)](_0x1c17bf(0x178));const _0x4bf0dc=_0x391e22;if(_0x1c17bf(0x163)in _0x4bf0dc)return parseEnterpriseRoutingManifest(_0x4bf0dc);const _0x2b4030=Object[_0x1c17bf(0x161)](_0x4bf0dc)['filter'](_0x4f8863=>!DOMAIN_CONFIG_FIELDS[_0x1c17bf(0x148)](_0x4f8863));if(_0x2b4030['length']>0x0)throw CliErrors[_0x1c17bf(0x16e)](_0x1c17bf(0x15f)+_0x2b4030[_0x1c17bf(0x184)](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS['join'](',\x20'));const _0x319a98={};for(const _0x14ce19 of DOMAIN_CONFIG_FIELDS){_0x4bf0dc[_0x14ce19]!==undefined&&(_0x319a98[_0x14ce19]=normalizeDomainOrigin(_0x14ce19,_0x4bf0dc[_0x14ce19]));}if(Object[_0x1c17bf(0x161)](_0x319a98)['length']===0x0)throw CliErrors[_0x1c17bf(0x16e)]('Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.');return{'mode':'legacy','domains':_0x319a98};}export function readDomainConfig(_0x45baa2){const _0x41c1fd=a89_0x4111c2;return readDomainConfigInput(_0x45baa2)[_0x41c1fd(0x16d)];}export function resolveDomainConfigInput(_0x4249f4){const _0x139cdf=a89_0x4111c2,_0x581aa6=(_0x4249f4[_0x139cdf(0x154)](_0x139cdf(0x162))||'')['trim'](),_0x35a677=_0x581aa6?readDomainConfigInput(_0x581aa6):{'mode':_0x139cdf(0x179),'domains':{}},_0x5cbd9a=DOMAIN_CONFIG_FIELDS[_0x139cdf(0x160)](_0x35e55d=>Boolean((_0x4249f4[_0x139cdf(0x154)](DOMAIN_FLAGS[_0x35e55d])||'')[_0x139cdf(0x17b)]()));if(_0x35a677[_0x139cdf(0x15a)]===_0x139cdf(0x17a)&&_0x5cbd9a[_0x139cdf(0x166)]>0x0)throw CliErrors[_0x139cdf(0x16e)](_0x139cdf(0x183),_0x139cdf(0x151));for(const _0x5663c1 of DOMAIN_CONFIG_FIELDS){const _0x4f1764=(_0x4249f4['str'](DOMAIN_FLAGS[_0x5663c1])||'')['trim']();if(_0x4f1764)_0x35a677[_0x139cdf(0x16d)][_0x5663c1]=normalizeDomainOrigin(_0x5663c1,_0x4f1764);}return _0x35a677;}export function resolveDomainFlags(_0x5023c4){const _0x27816a=a89_0x4111c2;return resolveDomainConfigInput(_0x5023c4)[_0x27816a(0x16d)];}export function parseEnterpriseRoutingManifest(_0x535305){const _0x2fdd66=a89_0x4111c2;if(_0x535305[_0x2fdd66(0x163)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x535305[_0x2fdd66(0x159)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x2fdd66(0x16e)]('Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22'+ENTERPRISE_ROUTING_PROTOCOL+_0x2fdd66(0x156)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x535305[_0x2fdd66(0x16d)]||typeof _0x535305[_0x2fdd66(0x16d)]!=='object'||Array[_0x2fdd66(0x176)](_0x535305[_0x2fdd66(0x16d)]))throw CliErrors[_0x2fdd66(0x16e)](_0x2fdd66(0x145));const _0x1645b4=_0x535305['domains'],_0x4f0bc6=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x2fdd66(0x160)](_0x3ec0b9=>_0x1645b4[_0x3ec0b9]===undefined);if(_0x4f0bc6[_0x2fdd66(0x166)]>0x0)throw CliErrors['validation'](_0x2fdd66(0x168)+_0x4f0bc6['join'](',\x20'));const _0xf31eb={},_0x4ba50b={};for(const _0x36e628 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x59a6fb=_0x1645b4[_0x36e628];if(_0x59a6fb===undefined)continue;const _0x240de3=normalizeRoutingDomainValue(_0x36e628,_0x59a6fb);_0xf31eb[_0x36e628]=_0x240de3;const _0x6bc4b3=ENTERPRISE_TO_LOCAL_FIELD[_0x36e628];_0x6bc4b3&&(_0x4ba50b[_0x6bc4b3]=_0x240de3);}return{'mode':'enterprise-v1','domains':_0x4ba50b,'manifestDomains':_0xf31eb};}
|
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" | "region" | "routing" | "format" | "pageSize" | "apiDomain" | "userDomain" | "runtimeDomain" | "skillDomain" | "accessKey" | "riskLevel" | "nativeToolAvailable" | "locale";
|
|
22
|
+
type ConfigFieldName = "env" | "region" | "routing" | "format" | "pageSize" | "apiDomain" | "userDomain" | "runtimeDomain" | "skillDomain" | "kbServiceDomain" | "accessKey" | "riskLevel" | "nativeToolAvailable" | "locale";
|
|
23
23
|
/**
|
|
24
24
|
* Schema for a single configuration field.
|
|
25
25
|
*
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0xb28c3=a90_0x271d;(function(_0x1cf490,_0x1fddf9){const _0x4e74ee=a90_0x271d,_0x54a328=_0x1cf490();while(!![]){try{const _0x192290=parseInt(_0x4e74ee(0x1c9))/0x1*(parseInt(_0x4e74ee(0x1c2))/0x2)+-parseInt(_0x4e74ee(0x1cf))/0x3+parseInt(_0x4e74ee(0x1bd))/0x4+-parseInt(_0x4e74ee(0x1b8))/0x5*(parseInt(_0x4e74ee(0x1ca))/0x6)+-parseInt(_0x4e74ee(0x1d1))/0x7*(parseInt(_0x4e74ee(0x1b7))/0x8)+-parseInt(_0x4e74ee(0x1b0))/0x9+parseInt(_0x4e74ee(0x1cb))/0xa*(parseInt(_0x4e74ee(0x1af))/0xb);if(_0x192290===_0x1fddf9)break;else _0x54a328['push'](_0x54a328['shift']());}catch(_0x7a16a3){_0x54a328['push'](_0x54a328['shift']());}}}(a90_0x235d,0x4cb5d));function a90_0x235d(){const _0x37687c=['map','Override\x20runtime\x20domain',';\x20local\x20alias:\x20apps.<alias>.appcode','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','Override\x20KB\x20Service\x20domain','filter','616WEzRpg','3711591YmFFYC','Config\x20key.\x20Top-level:\x20','toLowerCase','Native\x20Lovrabet\x20tool\x20availability\x20in\x20the\x20current\x20execution\x20host','Default\x20output\x20format','env','has','3137576OtHAwK','5exhUFL','locale','Target\x20environment','zh-CN','importable','2266816JTlnDL','Override\x20SkillHub\x20domain','entries','cliSettableTopLevel','Versioned\x20enterprise\x20routing\x20manifest','3902WITTbW','Default\x20page\x20size','fromEntries','legacyCompatOnly','Override\x20API\x20domain','riskLevel','format','84xPejKA','1284738SETSMb','202070zDlZTg','en-US','enumValues','defaultValue','1587768kkRSRS','Override\x20user\x20domain','7MGhJAj'];a90_0x235d=function(){return _0x37687c;};return a90_0x235d();}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export const CONFIG_FIELD_SCHEMAS={'routing':{'description':a90_0xb28c3(0x1c1),'topLevel':!![]},'region':{'description':'Lovrabet\x20region','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':ENABLED_LOVRABET_REGION_VALUES,'defaultValue':DEFAULT_LOVRABET_REGION,'importable':!![]},'env':{'description':a90_0xb28c3(0x1ba),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a90_0xb28c3(0x1b5)],'importable':!![]},'format':{'description':a90_0xb28c3(0x1b4),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a90_0xb28c3(0x1c8)],'importable':!![]},'pageSize':{'description':a90_0xb28c3(0x1c3),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a90_0xb28c3(0x1c6),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a90_0xb28c3(0x1d0),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a90_0xb28c3(0x1d3),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillDomain':{'description':a90_0xb28c3(0x1be),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'kbServiceDomain':{'description':a90_0xb28c3(0x1ad),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':'Access\x20key\x20(client-ak\x20auth)','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':'Risk\x20level','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a90_0xb28c3(0x1c7)],'importable':!![]},'nativeToolAvailable':{'description':a90_0xb28c3(0x1b3),'topLevel':!![],'defaultValue':![]},'locale':{'description':a90_0xb28c3(0x1ac),'topLevel':!![],'cliSettableTopLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a90_0xb28c3(0x1b9)],'importable':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a90_0xb28c3(0x1bf)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x3638d4])=>_0x3638d4[a90_0xb28c3(0x1c0)])[a90_0xb28c3(0x1d2)](([_0x1b69da])=>_0x1b69da));export const CLI_PROTECTED_CONFIG_KEYS=new Set(['riskLevel','nativeToolAvailable']);export const CONFIG_ENUM_VALUES=Object[a90_0xb28c3(0x1c4)](Object['entries'](CONFIG_FIELD_SCHEMAS)[a90_0xb28c3(0x1ae)](([,_0xa6d823])=>_0xa6d823[a90_0xb28c3(0x1cd)])[a90_0xb28c3(0x1d2)](([_0xb9601a,_0x35f131])=>[_0xb9601a,[..._0x35f131['enumValues']||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a90_0xb28c3(0x1bf)](CONFIG_FIELD_SCHEMAS)[a90_0xb28c3(0x1ae)](([,_0x3b1815])=>_0x3b1815[a90_0xb28c3(0x1bc)])[a90_0xb28c3(0x1d2)](([_0x4fed2a])=>_0x4fed2a);export function getConfigFieldSchema(_0xbd4c1d){return CONFIG_FIELD_SCHEMAS[_0xbd4c1d];}export function getConfigEnumValues(_0x1c1f6d){const _0x525f1e=a90_0xb28c3;return getConfigFieldSchema(_0x1c1f6d)?.[_0x525f1e(0x1cd)];}export function getConfigDefaultValue(_0x122904){const _0x18ad8a=a90_0xb28c3;return getConfigFieldSchema(_0x122904)?.[_0x18ad8a(0x1ce)];}export function isTopLevelConfigKey(_0x422857){const _0x1e9baa=a90_0xb28c3;return TOP_LEVEL_CONFIG_KEYS[_0x1e9baa(0x1b6)](_0x422857);}function a90_0x271d(_0x6d0481,_0x3081ad){_0x6d0481=_0x6d0481-0x1ab;const _0x235d81=a90_0x235d();let _0x271d4f=_0x235d81[_0x6d0481];return _0x271d4f;}export function isCliProtectedConfigKey(_0x4a9f12){return CLI_PROTECTED_CONFIG_KEYS['has'](_0x4a9f12);}const LOCALE_MAP={'zh':a90_0xb28c3(0x1bb),'zh-cn':a90_0xb28c3(0x1bb),'zh_cn':a90_0xb28c3(0x1bb),'en':a90_0xb28c3(0x1cc),'en-us':a90_0xb28c3(0x1cc),'en_us':a90_0xb28c3(0x1cc)};export function normalizeLocale(_0xd6f3a){const _0x3c5ae7=a90_0xb28c3;if(!_0xd6f3a)return null;return LOCALE_MAP[_0xd6f3a[_0x3c5ae7(0x1b2)]()]??null;}export function isLegacyCompatConfigKey(_0x522e3a){const _0x587b2f=a90_0xb28c3;return getConfigFieldSchema(_0x522e3a)?.[_0x587b2f(0x1c5)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x1aa735){return[..._0x1aa735]['join'](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x4debf7=a90_0xb28c3;return _0x4debf7(0x1b1)+getTopLevelConfigKeySummary()+_0x4debf7(0x1ab);}export function buildAppProfileListFields(_0x1b426c){return{'env':_0x1b426c,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a91_0x16b7(_0x2a9942,_0x2b0ce7){_0x2a9942=_0x2a9942-0x1b6;const _0x49b2e0=a91_0x49b2();let _0x16b704=_0x49b2e0[_0x2a9942];return _0x16b704;}function a91_0x49b2(){const _0x5b6858=['11ybdYIU','2628890KdfePe','PUBLISHED','1935SUgmOx','19456iqmzbb','5244936VAvQwy','269134bgmYXP','Published','2nEzAFX','1426617GJdLqh','2199VQQrBr','UNPUBLISH','4434hDoFZM','1668vJQdDi','455TGqeoi'];a91_0x49b2=function(){return _0x5b6858;};return a91_0x49b2();}const a91_0xd5ff09=a91_0x16b7;(function(_0xfb53f0,_0x50ebe9){const _0x47d14e=a91_0x16b7,_0x34c5ac=_0xfb53f0();while(!![]){try{const _0x1aaf90=-parseInt(_0x47d14e(0x1c2))/0x1*(-parseInt(_0x47d14e(0x1c0))/0x2)+-parseInt(_0x47d14e(0x1c4))/0x3*(parseInt(_0x47d14e(0x1b8))/0x4)+-parseInt(_0x47d14e(0x1bd))/0x5*(parseInt(_0x47d14e(0x1b7))/0x6)+parseInt(_0x47d14e(0x1b9))/0x7*(parseInt(_0x47d14e(0x1be))/0x8)+parseInt(_0x47d14e(0x1c3))/0x9+parseInt(_0x47d14e(0x1bb))/0xa*(-parseInt(_0x47d14e(0x1ba))/0xb)+parseInt(_0x47d14e(0x1bf))/0xc;if(_0x1aaf90===_0x50ebe9)break;else _0x34c5ac['push'](_0x34c5ac['shift']());}catch(_0x4bdef3){_0x34c5ac['push'](_0x34c5ac['shift']());}}}(a91_0x49b2,0x29146));export const APP_PUBLISH_STATUS={'Published':a91_0xd5ff09(0x1bc),'Unpublished':a91_0xd5ff09(0x1b6)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a91_0xd5ff09(0x1c1)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a92_0x27b9b6=a92_0x1f77;function a92_0x1f77(_0x3d89d7,_0x23e5d9){_0x3d89d7=_0x3d89d7-0x186;const _0x3163e0=a92_0x3163();let _0x1f77a2=_0x3163e0[_0x3d89d7];return _0x1f77a2;}function a92_0x3163(){const _0x4cbc63=['1946520eCejhp','3019161MeVAPk','31221sGdpiK','1894394FzDTVZ','client-ak','21QrljmN','2170UBWyrL','152trPwNE','1291196VtFZcY','ClientAk','35bIxnqR','81235pvOALA','682828LJTxNU'];a92_0x3163=function(){return _0x4cbc63;};return a92_0x3163();}(function(_0x38dc5d,_0x53f4cb){const _0x4d08ba=a92_0x1f77,_0x12b9b0=_0x38dc5d();while(!![]){try{const _0x177b37=parseInt(_0x4d08ba(0x186))/0x1+-parseInt(_0x4d08ba(0x18e))/0x2+-parseInt(_0x4d08ba(0x18c))/0x3+-parseInt(_0x4d08ba(0x18a))/0x4*(parseInt(_0x4d08ba(0x188))/0x5)+-parseInt(_0x4d08ba(0x18b))/0x6*(-parseInt(_0x4d08ba(0x190))/0x7)+-parseInt(_0x4d08ba(0x192))/0x8*(parseInt(_0x4d08ba(0x18d))/0x9)+-parseInt(_0x4d08ba(0x191))/0xa*(-parseInt(_0x4d08ba(0x189))/0xb);if(_0x177b37===_0x53f4cb)break;else _0x12b9b0['push'](_0x12b9b0['shift']());}catch(_0x5553c4){_0x12b9b0['push'](_0x12b9b0['shift']());}}}(a92_0x3163,0x9f50d));export const AUTH_MODE={'ClientAk':a92_0x27b9b6(0x18f)};export function isAuthMode(_0x3d66e3){const _0xf8eaf8=a92_0x27b9b6;return _0x3d66e3===AUTH_MODE[_0xf8eaf8(0x187)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x4d36b4=a93_0x519d;(function(_0x1cba42,_0x1cef0c){const _0x12ce3e=a93_0x519d,_0x5e8f39=_0x1cba42();while(!![]){try{const _0x5622db=parseInt(_0x12ce3e(0x1a7))/0x1+parseInt(_0x12ce3e(0x1ae))/0x2*(-parseInt(_0x12ce3e(0x1a1))/0x3)+parseInt(_0x12ce3e(0x1a3))/0x4*(parseInt(_0x12ce3e(0x19b))/0x5)+-parseInt(_0x12ce3e(0x19e))/0x6*(-parseInt(_0x12ce3e(0x1a0))/0x7)+parseInt(_0x12ce3e(0x1ab))/0x8*(-parseInt(_0x12ce3e(0x197))/0x9)+parseInt(_0x12ce3e(0x1a2))/0xa*(parseInt(_0x12ce3e(0x19d))/0xb)+-parseInt(_0x12ce3e(0x18f))/0xc;if(_0x5622db===_0x1cef0c)break;else _0x5e8f39['push'](_0x5e8f39['shift']());}catch(_0x47d53b){_0x5e8f39['push'](_0x5e8f39['shift']());}}}(a93_0x123d,0xa38af));function a93_0x123d(){const _0x281b0e=['app','2918556arNCss','yes','fromEntries','non-interactive','708835soLgjn','Environment','11FIJGXC','11586RtzbOg','<code>','1169VWJuji','658263nIWbvC','1831180uHcybQ','36EZnrFc','Record\x20ID','json\x20|\x20pretty\x20|\x20compress','Use\x20global\x20config\x20scope','630125YrOSwY','<expr>','<name>','boolean','8pudYRk','Preview\x20operation\x20without\x20executing','dryRun','6ZgLEIg','appcode','params','env','string','format','sqlcode','Name\x20filter','name','help','Select\x20app\x20profile\x20by\x20name','Alias\x20for\x20--non-interactive','production\x20|\x20development\x20|\x20daily','dry-run','type','9110460iNzwMf','global','Clear\x20output','map','verbose','Show\x20help','JSON\x20params\x20for\x20execute\x20commands'];a93_0x123d=function(){return _0x281b0e;};return a93_0x123d();}import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG['cliBinName'];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG['cliDisplayName'];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;function a93_0x519d(_0x1515ff,_0x8930a6){_0x1515ff=_0x1515ff-0x186;const _0x123d05=a93_0x123d();let _0x519d79=_0x123d05[_0x1515ff];return _0x519d79;}export const GLOBAL_FLAGS=[{'name':a93_0x4d36b4(0x1af),'meowKey':a93_0x4d36b4(0x1af),'type':a93_0x4d36b4(0x1b2),'description':'Override\x20appcode','hint':a93_0x4d36b4(0x19f)},{'name':a93_0x4d36b4(0x196),'meowKey':'app','type':a93_0x4d36b4(0x1b2),'description':a93_0x4d36b4(0x18a),'hint':a93_0x4d36b4(0x1a9)},{'name':'env','meowKey':a93_0x4d36b4(0x1b1),'type':a93_0x4d36b4(0x1b2),'description':a93_0x4d36b4(0x19c),'hint':a93_0x4d36b4(0x18c)},{'name':a93_0x4d36b4(0x1b3),'meowKey':'format','type':a93_0x4d36b4(0x1b2),'description':'Output\x20format','hint':a93_0x4d36b4(0x1a5)},{'name':'jq','meowKey':'jq','type':a93_0x4d36b4(0x1b2),'description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','hint':a93_0x4d36b4(0x1a8)},{'name':a93_0x4d36b4(0x18d),'meowKey':a93_0x4d36b4(0x1ad),'type':a93_0x4d36b4(0x1aa),'description':a93_0x4d36b4(0x1ac)},{'name':a93_0x4d36b4(0x198),'meowKey':a93_0x4d36b4(0x198),'type':'boolean','description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a93_0x4d36b4(0x19a),'meowKey':'nonInteractive','type':a93_0x4d36b4(0x1aa),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':'global','meowKey':a93_0x4d36b4(0x190),'type':'boolean','description':a93_0x4d36b4(0x1a6)},{'name':'ci','meowKey':'ci','type':a93_0x4d36b4(0x1aa),'description':a93_0x4d36b4(0x18b),'hidden':!![]},{'name':'help','meowKey':a93_0x4d36b4(0x189),'type':a93_0x4d36b4(0x1aa),'description':a93_0x4d36b4(0x194)},{'name':'id','meowKey':'id','type':a93_0x4d36b4(0x1b2),'description':a93_0x4d36b4(0x1a4),'hidden':!![]},{'name':a93_0x4d36b4(0x188),'meowKey':'name','type':a93_0x4d36b4(0x1b2),'description':a93_0x4d36b4(0x187),'hidden':!![]},{'name':'sqlcode','meowKey':a93_0x4d36b4(0x186),'type':a93_0x4d36b4(0x1b2),'description':'SQL\x20query\x20code','hidden':!![]},{'name':'params','meowKey':a93_0x4d36b4(0x1b0),'type':a93_0x4d36b4(0x1b2),'description':a93_0x4d36b4(0x195),'hidden':!![]},{'name':a93_0x4d36b4(0x193),'meowKey':a93_0x4d36b4(0x193),'type':a93_0x4d36b4(0x1aa),'description':'Verbose\x20output','hidden':!![]},{'name':'clear','meowKey':'clear','type':'boolean','description':a93_0x4d36b4(0x191),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode','app','env',a93_0x4d36b4(0x1b3),'jq','dry-run',a93_0x4d36b4(0x198),'non-interactive','ci']);export function buildMeowFlags(){const _0x4e5e6e=a93_0x4d36b4;return Object[_0x4e5e6e(0x199)](GLOBAL_FLAGS[_0x4e5e6e(0x192)](_0x4be8d0=>[_0x4be8d0['meowKey'],{'type':_0x4be8d0[_0x4e5e6e(0x18e)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a94_0x2dbdfe=a94_0x1631;function a94_0x1631(_0x9a074f,_0x35c65a){_0x9a074f=_0x9a074f-0xf1;const _0x55fbb9=a94_0x55fb();let _0x1631d5=_0x55fbb9[_0x9a074f];return _0x1631d5;}(function(_0x1a7a5b,_0x381a1a){const _0x22794b=a94_0x1631,_0x58f502=_0x1a7a5b();while(!![]){try{const _0x41af87=-parseInt(_0x22794b(0xfe))/0x1+-parseInt(_0x22794b(0xf6))/0x2+parseInt(_0x22794b(0xf3))/0x3+-parseInt(_0x22794b(0xfd))/0x4*(parseInt(_0x22794b(0xf5))/0x5)+parseInt(_0x22794b(0xf7))/0x6*(-parseInt(_0x22794b(0xf9))/0x7)+parseInt(_0x22794b(0xf4))/0x8*(parseInt(_0x22794b(0xf2))/0x9)+parseInt(_0x22794b(0xfa))/0xa;if(_0x41af87===_0x381a1a)break;else _0x58f502['push'](_0x58f502['shift']());}catch(_0x41be10){_0x58f502['push'](_0x58f502['shift']());}}}(a94_0x55fb,0xc7fac));export const DEFAULT_APP_PROFILE_NAME='main';export const DEFAULT_CONFIG_VALUES={'env':a94_0x2dbdfe(0xfc),'format':a94_0x2dbdfe(0xf1),'locale':a94_0x2dbdfe(0xfb),'riskLevel':a94_0x2dbdfe(0xf8)};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';function a94_0x55fb(){const _0x51507b=['write','9737938AFCazT','43175370TniWTH','en-US','production','1821892TVHCZB','547373ejUMWv','compress','1118781fEZRlH','680523aVyRuw','32eqiRwH','15ymbjIS','1835144mFnCUK','6IKnmeH'];a94_0x55fb=function(){return _0x51507b;};return a94_0x55fb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0xfd07f8=a95_0x4582;(function(_0x34a33e,_0x51edee){const _0x24a866=a95_0x4582,_0x4e5ce0=_0x34a33e();while(!![]){try{const _0x3be911=parseInt(_0x24a866(0x10a))/0x1+parseInt(_0x24a866(0x105))/0x2*(-parseInt(_0x24a866(0x101))/0x3)+-parseInt(_0x24a866(0x106))/0x4+-parseInt(_0x24a866(0x100))/0x5+parseInt(_0x24a866(0x103))/0x6+parseInt(_0x24a866(0x10c))/0x7*(parseInt(_0x24a866(0x102))/0x8)+-parseInt(_0x24a866(0x104))/0x9*(-parseInt(_0x24a866(0x109))/0xa);if(_0x3be911===_0x51edee)break;else _0x4e5ce0['push'](_0x4e5ce0['shift']());}catch(_0x2899bb){_0x4e5ce0['push'](_0x4e5ce0['shift']());}}}(a95_0x3906,0xbcaa8));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG['npmPackageName'];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a95_0xfd07f8(0x108)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a95_0xfd07f8(0x107)];export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG['cliCdnBaseUrl'];export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a95_0xfd07f8(0x10b);function a95_0x4582(_0xccae40,_0x2b0e2c){_0xccae40=_0xccae40-0x100;const _0x390629=a95_0x3906();let _0x458257=_0x390629[_0xccae40];return _0x458257;}function a95_0x3906(){const _0x43da4f=['3496000gyiQRC','npmRegistryBaseUrl','skillSource','37430cUmscZ','307111khEkNB','/dist/lovrabet-cli/config/index.json','42763GiILON','6244690SjugvT','261FjCUpb','1304NnqCSA','8407842zaVLCQ','2538EvauAq','19862FzsRUR'];a95_0x3906=function(){return _0x43da4f;};return a95_0x3906();}
|
package/lib/constant/domain.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export declare function initDomains(domains?: {
|
|
|
30
30
|
userDomain?: string;
|
|
31
31
|
runtimeDomain?: string;
|
|
32
32
|
skillDomain?: string;
|
|
33
|
+
kbServiceDomain?: string;
|
|
34
|
+
allowOfficialKbServiceDefault?: boolean;
|
|
33
35
|
region?: LovrabetRegion;
|
|
34
36
|
}): void;
|
|
35
37
|
/**
|
|
@@ -59,3 +61,5 @@ export declare const getRuntimeDomain: () => string;
|
|
|
59
61
|
* Returns the SkillHub domain used by native Skill management APIs.
|
|
60
62
|
*/
|
|
61
63
|
export declare const getSkillDomain: () => string;
|
|
64
|
+
/** Returns the independently routed KB Service origin, when configured. */
|
|
65
|
+
export declare const getKbServiceDomain: () => string | undefined;
|