@lovrabet/lovrabet-cli 2.3.6-beta.3 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/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 +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a82_0x1b4a64=a82_0x29b6;(function(_0x5dab93,_0x483296){const _0x4e9e01=a82_0x29b6,_0x14ba63=_0x5dab93();while(!![]){try{const _0x2c0efa=-parseInt(_0x4e9e01(0xb2))/0x1+parseInt(_0x4e9e01(0xc3))/0x2*(-parseInt(_0x4e9e01(0xc1))/0x3)+parseInt(_0x4e9e01(0xbe))/0x4+parseInt(_0x4e9e01(0x9e))/0x5+parseInt(_0x4e9e01(0xcb))/0x6+-parseInt(_0x4e9e01(0xef))/0x7+-parseInt(_0x4e9e01(0xdb))/0x8*(-parseInt(_0x4e9e01(0x9c))/0x9);if(_0x2c0efa===_0x483296)break;else _0x14ba63['push'](_0x14ba63['shift']());}catch(_0x590f14){_0x14ba63['push'](_0x14ba63['shift']());}}}(a82_0x3ef3,0xb4c3c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';function a82_0x29b6(_0x1d9fd8,_0x417741){_0x1d9fd8=_0x1d9fd8-0x9a;const _0x3ef3c6=a82_0x3ef3();let _0x29b6b5=_0x3ef3c6[_0x1d9fd8];return _0x29b6b5;}function a82_0x3ef3(){const _0x15f63c=['name','utf8','sql','SKILL.md\x20is\x20not\x20a\x20file.','isFile','slice','SKILL.md\x20must\x20start\x20with\x20frontmatter.','path','isDirectory','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','description','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','80QCaJhx','example','Add\x20frontmatter\x20with\x20name\x20and\x20description.','raw','section','toLowerCase','isArray','ruleId','trim','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','string','registry','read','map','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','validation','hasFrontmatter','SKILL.md','Set\x20metadata.type\x20to\x20write\x20or\x20read.','4691470VVxuen','schema','error','project','1383255CrTbIK','line','2096890MDEQhS','warning','Frontmatter\x20example\x20is\x20missing.','level','workspace','data','suggestion','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','\x20Fix:\x20','false','structure-complete','filter','number','push','write','logs','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','displayName','config','rabetbase-cli-reference','1404515PgYUDA','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','Missing\x20SKILL.md.','example-recommended','type','Skill\x20validation\x20failed:\x0a','isSymbolicLink','artifact','length','boolean','flatMap','description-required','2803460eDtqHU','true','auth','573621ajKgWx','internal','10GAPvFQ','has','page','errors','Skill\x20directory\x20not\x20found:\x20','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','test','message','6683874ImkLOf','frontmatter-required','split','object'];a82_0x3ef3=function(){return _0x15f63c;};return a82_0x3ef3();}import{parse as a82_0x603a79}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a82_0x1b4a64(0xed),SUPPORTED_SKILL_TYPES=new Set([a82_0x1b4a64(0xac),a82_0x1b4a64(0xe8)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x529eea,_0x521ae9={}){const _0x5ae4df=a82_0x1b4a64,_0x239fef=resolveSkillDirectoryRoot(_0x529eea),_0x236a51=[],_0x510429=loadRequiredSkillFile(_0x239fef,_0x236a51),_0x4e0d2d=_0x510429?parseFrontmatter(_0x510429['content']):{'hasFrontmatter':![]};_0x510429&&validateFrontmatter(_0x510429['path'],_0x4e0d2d,_0x236a51);validateRuntimeCliReferences(_0x239fef,_0x236a51);const _0x80f296=_0x236a51[_0x5ae4df(0xa9)](_0x28a86b=>_0x28a86b[_0x5ae4df(0xa1)]==='error'),_0x1a9623=_0x236a51[_0x5ae4df(0xa9)](_0x48d250=>_0x48d250['level']===_0x5ae4df(0x9f));return{'ok':_0x80f296[_0x5ae4df(0xba)]===0x0,'dir':_0x239fef,'type':_0x4e0d2d['type'],'errors':_0x80f296,'warnings':_0x1a9623};}function resolveSkillDirectoryRoot(_0x55f3b9){const _0x5528d2=a82_0x1b4a64,_0x49b10d=resolve(_0x55f3b9);if(!existsSync(_0x49b10d))throw CliErrors[_0x5528d2(0xeb)](_0x5528d2(0xc7)+_0x55f3b9);const _0x2033d4=lstatSync(_0x49b10d);if(_0x2033d4[_0x5528d2(0xd7)]())return _0x49b10d;if(_0x2033d4[_0x5528d2(0xb8)]()){const _0x23d90b=realpathSync(_0x49b10d);if(lstatSync(_0x23d90b)[_0x5528d2(0xd7)]())return _0x23d90b;}throw CliErrors[_0x5528d2(0xeb)](_0x5528d2(0xc7)+_0x55f3b9);}export function throwIfSkillValidationFailed(_0x3bbc49,_0x4b4c78=![]){const _0x766b82=a82_0x1b4a64;if(_0x3bbc49['ok'])return;const _0x98862b=_0x3bbc49[_0x766b82(0xc6)][_0x766b82(0xe9)](_0xfc3a5f=>{const _0x202fee=_0x766b82,_0x2404f2=_0xfc3a5f[_0x202fee(0xdf)]?'#'+_0xfc3a5f['section']:'';return _0xfc3a5f[_0x202fee(0xa1)]['toUpperCase']()+'\x20'+_0xfc3a5f[_0x202fee(0xe2)]+'\x20'+_0xfc3a5f['file']+_0x2404f2+':\x20'+_0xfc3a5f[_0x202fee(0xca)]+_0x202fee(0xa6)+_0xfc3a5f[_0x202fee(0xa4)];});throw CliErrors[_0x766b82(0xeb)](_0x766b82(0xb7)+_0x98862b['join']('\x0a'),'Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.');}function loadRequiredSkillFile(_0x3c1c84,_0x2b7903){const _0x4826f9=a82_0x1b4a64,_0x24cb3e=resolve(_0x3c1c84,SKILL_FILE);if(!existsSync(_0x24cb3e))return _0x2b7903[_0x4826f9(0xab)](issue('error',_0x4826f9(0xa8),SKILL_FILE,_0x4826f9(0xb4),_0x4826f9(0xb3))),undefined;const _0x4123c0=lstatSync(_0x24cb3e);if(_0x4123c0[_0x4826f9(0xb8)]())return _0x2b7903[_0x4826f9(0xab)](issue('error',_0x4826f9(0xa8),SKILL_FILE,_0x4826f9(0xea),_0x4826f9(0xc8))),undefined;if(!_0x4123c0[_0x4826f9(0xd3)]())return _0x2b7903[_0x4826f9(0xab)](issue('error',_0x4826f9(0xa8),SKILL_FILE,_0x4826f9(0xd2),'Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.')),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x24cb3e,_0x4826f9(0xd0))};}function validateFrontmatter(_0x4294b6,_0x24fff0,_0x33cfa1){const _0xd4560c=a82_0x1b4a64;if(!_0x24fff0[_0xd4560c(0xec)]){_0x33cfa1['push'](issue('error',_0xd4560c(0xcc),_0x4294b6,_0xd4560c(0xd5),_0xd4560c(0xdd)));return;}!_0x24fff0[_0xd4560c(0xcf)]?.[_0xd4560c(0xe3)]()&&_0x33cfa1[_0xd4560c(0xab)](issue('error',_0xd4560c(0xcc),_0x4294b6,'Frontmatter\x20name\x20is\x20missing.',_0xd4560c(0xe4))),!_0x24fff0[_0xd4560c(0xaf)]?.[_0xd4560c(0xe3)]()&&_0x33cfa1[_0xd4560c(0xab)](issue('warning','display-name-recommended',_0x4294b6,'Frontmatter\x20displayName\x20is\x20missing.',_0xd4560c(0xda))),!_0x24fff0[_0xd4560c(0xdc)]?.[_0xd4560c(0xe3)]()&&_0x33cfa1['push'](issue('warning',_0xd4560c(0xb5),_0x4294b6,_0xd4560c(0xa0),_0xd4560c(0xe5))),!_0x24fff0[_0xd4560c(0xd9)]?.[_0xd4560c(0xe3)]()&&_0x33cfa1['push'](issue(_0xd4560c(0x9a),_0xd4560c(0xbd),_0x4294b6,'Frontmatter\x20description\x20is\x20empty.',_0xd4560c(0xd8))),_0x24fff0[_0xd4560c(0xc2)]===!![]&&_0x33cfa1[_0xd4560c(0xab)](issue(_0xd4560c(0x9a),'internal-skill',_0x4294b6,'metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.',_0xd4560c(0xa5))),_0x24fff0[_0xd4560c(0xb6)]?.[_0xd4560c(0xe3)]()&&!SUPPORTED_SKILL_TYPES[_0xd4560c(0xc4)](_0x24fff0[_0xd4560c(0xb6)])&&_0x33cfa1[_0xd4560c(0xab)](issue(_0xd4560c(0x9a),_0xd4560c(0xcc),_0x4294b6,'metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.',_0xd4560c(0xee)));}function validateRuntimeCliReferences(_0x3e6eba,_0x24b039){const _0x1cdb47=a82_0x1b4a64;for(const _0x4fc304 of findRabetbaseCliInvocations(_0x3e6eba)){_0x24b039[_0x1cdb47(0xab)](issue(_0x1cdb47(0x9f),_0x1cdb47(0xb1),_0x4fc304['file'],_0x1cdb47(0xae),'If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','L'+_0x4fc304[_0x1cdb47(0x9d)]));}}function findRabetbaseCliInvocations(_0x401ec4){const _0xb5fb31=a82_0x1b4a64;return scanSkillDirectory(_0x401ec4)['filter'](_0x1fa77c=>TEXT_SKILL_FILE_PATTERN[_0xb5fb31(0xc9)](_0x1fa77c[_0xb5fb31(0xd6)]))[_0xb5fb31(0xbc)](_0x181b4d=>{const _0x2a23b3=_0xb5fb31,_0x4b9c40=fileText(_0x181b4d);return _0x4b9c40[_0x2a23b3(0xcd)](/\r?\n/)[_0x2a23b3(0xe9)]((_0x529e42,_0x1cd5e5)=>({'file':_0x181b4d[_0x2a23b3(0xd6)],'line':_0x1cd5e5+0x1,'text':_0x529e42}))[_0x2a23b3(0xa9)](({text:_0x12dccc})=>isRabetbaseCliInvocation(_0x12dccc))[_0x2a23b3(0xe9)](({file:_0x874286,line:_0x1f4274})=>({'file':_0x874286,'line':_0x1f4274}));});}const RABETBASE_SUBCOMMANDS=['dataset',a82_0x1b4a64(0xd1),'bff',a82_0x1b4a64(0xc5),a82_0x1b4a64(0x9b),'app',a82_0x1b4a64(0xf0),'service',a82_0x1b4a64(0xb9),'kb',a82_0x1b4a64(0xb0),a82_0x1b4a64(0xa2),a82_0x1b4a64(0xa3),a82_0x1b4a64(0xc0),a82_0x1b4a64(0xad),a82_0x1b4a64(0xe7)],RABETBASE_INVOCATION=new RegExp(String['raw']`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS['join']('|')})\b`+String[a82_0x1b4a64(0xde)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x126d39){const _0x3baff5=a82_0x1b4a64,_0x4348de=_0x126d39['search'](/\brabetbase\b/i);if(_0x4348de<0x0)return![];const _0x520427=_0x126d39[_0x3baff5(0xd4)](_0x4348de)[_0x3baff5(0xcd)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x3baff5(0xc9)](_0x520427);}function parseFrontmatter(_0xafd083){const _0x17a265=a82_0x1b4a64,_0x2efcdd=_0xafd083['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2efcdd)return{'hasFrontmatter':![]};const _0x36fbb7=_0x2efcdd[0x1]??'',_0x430fd6={'hasFrontmatter':!![]};let _0x13e2c8;try{_0x13e2c8=a82_0x603a79(_0x36fbb7);}catch{return _0x430fd6;}const _0x39c1d0=asRecord(_0x13e2c8);if(!_0x39c1d0)return _0x430fd6;_0x430fd6['name']=scalarToString(_0x39c1d0['name']),_0x430fd6[_0x17a265(0xaf)]=scalarToString(_0x39c1d0[_0x17a265(0xaf)]),_0x430fd6[_0x17a265(0xd9)]=scalarToString(_0x39c1d0[_0x17a265(0xd9)]),_0x430fd6[_0x17a265(0xdc)]=scalarToString(_0x39c1d0[_0x17a265(0xdc)]);const _0x2aa100=asRecord(_0x39c1d0['metadata']);return _0x2aa100&&(_0x430fd6[_0x17a265(0xb6)]=scalarToString(_0x2aa100['type']),_0x430fd6['internal']=scalarToBoolean(_0x2aa100[_0x17a265(0xc2)])),_0x430fd6;}function asRecord(_0x4f3a16){const _0x1d1076=a82_0x1b4a64;if(_0x4f3a16&&typeof _0x4f3a16===_0x1d1076(0xce)&&!Array[_0x1d1076(0xe1)](_0x4f3a16))return _0x4f3a16;return undefined;}function scalarToString(_0x4a444b){const _0x526e81=a82_0x1b4a64;if(typeof _0x4a444b===_0x526e81(0xe6))return _0x4a444b[_0x526e81(0xe3)]();if(typeof _0x4a444b===_0x526e81(0xaa)||typeof _0x4a444b==='boolean')return String(_0x4a444b);return undefined;}function scalarToBoolean(_0x5473ea){const _0x40cde1=a82_0x1b4a64;if(typeof _0x5473ea===_0x40cde1(0xbb))return _0x5473ea;if(typeof _0x5473ea==='string')return cleanBoolean(_0x5473ea);return undefined;}function cleanBoolean(_0x17426c){const _0xf1298d=a82_0x1b4a64,_0x5926fe=_0x17426c[_0xf1298d(0xe3)]()[_0xf1298d(0xe0)]();if(_0x5926fe===_0xf1298d(0xbf))return!![];if(_0x5926fe===_0xf1298d(0xa7))return![];return undefined;}function issue(_0x1f726e,_0x3a9a3c,_0x3801b4,_0x3caa3a,_0x3e1b9a,_0xef86c){return{'level':_0x1f726e,'ruleId':_0x3a9a3c,'file':_0x3801b4,'section':_0xef86c,'message':_0x3caa3a,'suggestion':_0x3e1b9a};}
|
|
1
|
+
const a82_0x4289ed=a82_0x4561;(function(_0x43f752,_0x5b1721){const _0x503d17=a82_0x4561,_0x4fcf3e=_0x43f752();while(!![]){try{const _0x5ca0a6=parseInt(_0x503d17(0x16e))/0x1*(-parseInt(_0x503d17(0x156))/0x2)+-parseInt(_0x503d17(0x186))/0x3*(parseInt(_0x503d17(0x178))/0x4)+parseInt(_0x503d17(0x17b))/0x5*(-parseInt(_0x503d17(0x15f))/0x6)+-parseInt(_0x503d17(0x150))/0x7*(-parseInt(_0x503d17(0x15c))/0x8)+parseInt(_0x503d17(0x140))/0x9+parseInt(_0x503d17(0x15a))/0xa+parseInt(_0x503d17(0x14c))/0xb*(parseInt(_0x503d17(0x131))/0xc);if(_0x5ca0a6===_0x5b1721)break;else _0x4fcf3e['push'](_0x4fcf3e['shift']());}catch(_0x586b5a){_0x4fcf3e['push'](_0x4fcf3e['shift']());}}}(a82_0x9dca,0xb5904));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a82_0x4852b2}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';function a82_0x4561(_0x2221b9,_0x55ce1d){_0x2221b9=_0x2221b9-0x130;const _0x9dca5f=a82_0x9dca();let _0x456147=_0x9dca5f[_0x2221b9];return _0x456147;}const SKILL_FILE=a82_0x4289ed(0x166),SUPPORTED_SKILL_TYPES=new Set(['write',a82_0x4289ed(0x189)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x5393df,_0x500f04={}){const _0x101026=a82_0x4289ed,_0x8f90d2=resolveSkillDirectoryRoot(_0x5393df),_0x1605a5=[],_0x1728b8=loadRequiredSkillFile(_0x8f90d2,_0x1605a5),_0x433d83=_0x1728b8?parseFrontmatter(_0x1728b8[_0x101026(0x14d)]):{'hasFrontmatter':![]};_0x1728b8&&validateFrontmatter(_0x1728b8[_0x101026(0x14b)],_0x433d83,_0x1605a5);validateRuntimeCliReferences(_0x8f90d2,_0x1605a5);const _0x37519c=_0x1605a5['filter'](_0x23dc94=>_0x23dc94['level']===_0x101026(0x16b)),_0xfb8b48=_0x1605a5[_0x101026(0x149)](_0x5b1e22=>_0x5b1e22[_0x101026(0x15d)]===_0x101026(0x16a));return{'ok':_0x37519c['length']===0x0,'dir':_0x8f90d2,'type':_0x433d83[_0x101026(0x172)],'errors':_0x37519c,'warnings':_0xfb8b48};}function resolveSkillDirectoryRoot(_0x25253f){const _0x3279cc=a82_0x4289ed,_0x58cfca=resolve(_0x25253f);if(!existsSync(_0x58cfca))throw CliErrors[_0x3279cc(0x17c)](_0x3279cc(0x14e)+_0x25253f);const _0x3ff5cd=lstatSync(_0x58cfca);if(_0x3ff5cd[_0x3279cc(0x17a)]())return _0x58cfca;if(_0x3ff5cd['isSymbolicLink']()){const _0x384f3b=realpathSync(_0x58cfca);if(lstatSync(_0x384f3b)[_0x3279cc(0x17a)]())return _0x384f3b;}throw CliErrors[_0x3279cc(0x17c)](_0x3279cc(0x14e)+_0x25253f);}export function throwIfSkillValidationFailed(_0x39f3b3,_0x823744=![]){const _0x5e0e62=a82_0x4289ed;if(_0x39f3b3['ok'])return;const _0x1351bf=_0x39f3b3[_0x5e0e62(0x146)][_0x5e0e62(0x14f)](_0x2e453c=>{const _0x14034b=_0x5e0e62,_0x4bb94f=_0x2e453c[_0x14034b(0x145)]?'#'+_0x2e453c[_0x14034b(0x145)]:'';return _0x2e453c['level'][_0x14034b(0x15b)]()+'\x20'+_0x2e453c['ruleId']+'\x20'+_0x2e453c[_0x14034b(0x13b)]+_0x4bb94f+':\x20'+_0x2e453c[_0x14034b(0x18c)]+_0x14034b(0x161)+_0x2e453c[_0x14034b(0x16f)];});throw CliErrors[_0x5e0e62(0x17c)](_0x5e0e62(0x148)+_0x1351bf[_0x5e0e62(0x144)]('\x0a'),_0x5e0e62(0x160));}function loadRequiredSkillFile(_0x13b6ca,_0x2563f1){const _0x451551=a82_0x4289ed,_0x1c129f=resolve(_0x13b6ca,SKILL_FILE);if(!existsSync(_0x1c129f))return _0x2563f1[_0x451551(0x158)](issue(_0x451551(0x16b),_0x451551(0x138),SKILL_FILE,_0x451551(0x134),_0x451551(0x184))),undefined;const _0x4d12c6=lstatSync(_0x1c129f);if(_0x4d12c6[_0x451551(0x163)]())return _0x2563f1[_0x451551(0x158)](issue(_0x451551(0x16b),'structure-complete',SKILL_FILE,_0x451551(0x13c),'Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.')),undefined;if(!_0x4d12c6['isFile']())return _0x2563f1['push'](issue(_0x451551(0x16b),_0x451551(0x138),SKILL_FILE,_0x451551(0x141),_0x451551(0x168))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x1c129f,_0x451551(0x165))};}function validateFrontmatter(_0x1d7e2f,_0x6a60ca,_0x1287dd){const _0x53ee6c=a82_0x4289ed;if(!_0x6a60ca['hasFrontmatter']){_0x1287dd[_0x53ee6c(0x158)](issue('error',_0x53ee6c(0x13a),_0x1d7e2f,_0x53ee6c(0x162),_0x53ee6c(0x159)));return;}!_0x6a60ca[_0x53ee6c(0x137)]?.[_0x53ee6c(0x181)]()&&_0x1287dd[_0x53ee6c(0x158)](issue(_0x53ee6c(0x16b),_0x53ee6c(0x13a),_0x1d7e2f,_0x53ee6c(0x167),_0x53ee6c(0x136))),!_0x6a60ca[_0x53ee6c(0x16d)]?.[_0x53ee6c(0x181)]()&&_0x1287dd['push'](issue('warning',_0x53ee6c(0x153),_0x1d7e2f,_0x53ee6c(0x182),'Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.')),!_0x6a60ca['example']?.[_0x53ee6c(0x181)]()&&_0x1287dd[_0x53ee6c(0x158)](issue('warning',_0x53ee6c(0x154),_0x1d7e2f,_0x53ee6c(0x147),_0x53ee6c(0x14a))),!_0x6a60ca[_0x53ee6c(0x177)]?.['trim']()&&_0x1287dd[_0x53ee6c(0x158)](issue(_0x53ee6c(0x16b),_0x53ee6c(0x171),_0x1d7e2f,_0x53ee6c(0x179),_0x53ee6c(0x15e))),_0x6a60ca['internal']===!![]&&_0x1287dd[_0x53ee6c(0x158)](issue(_0x53ee6c(0x16b),_0x53ee6c(0x142),_0x1d7e2f,_0x53ee6c(0x183),_0x53ee6c(0x16c))),_0x6a60ca[_0x53ee6c(0x172)]?.[_0x53ee6c(0x181)]()&&!SUPPORTED_SKILL_TYPES[_0x53ee6c(0x139)](_0x6a60ca[_0x53ee6c(0x172)])&&_0x1287dd[_0x53ee6c(0x158)](issue(_0x53ee6c(0x16b),_0x53ee6c(0x13a),_0x1d7e2f,_0x53ee6c(0x13f),'Set\x20metadata.type\x20to\x20write\x20or\x20read.'));}function validateRuntimeCliReferences(_0x3fc438,_0x26a71d){const _0x178baa=a82_0x4289ed;for(const _0x5e0b1c of findRabetbaseCliInvocations(_0x3fc438)){_0x26a71d['push'](issue(_0x178baa(0x16a),'rabetbase-cli-reference',_0x5e0b1c[_0x178baa(0x13b)],_0x178baa(0x185),_0x178baa(0x143),'L'+_0x5e0b1c[_0x178baa(0x133)]));}}function findRabetbaseCliInvocations(_0x47728e){const _0x687168=a82_0x4289ed;return scanSkillDirectory(_0x47728e)[_0x687168(0x149)](_0x1133e7=>TEXT_SKILL_FILE_PATTERN[_0x687168(0x18a)](_0x1133e7[_0x687168(0x14b)]))[_0x687168(0x175)](_0x49c21a=>{const _0x271f72=_0x687168,_0x1e86d3=fileText(_0x49c21a);return _0x1e86d3['split'](/\r?\n/)[_0x271f72(0x14f)]((_0x454378,_0x179884)=>({'file':_0x49c21a[_0x271f72(0x14b)],'line':_0x179884+0x1,'text':_0x454378}))[_0x271f72(0x149)](({text:_0x37f0e0})=>isRabetbaseCliInvocation(_0x37f0e0))[_0x271f72(0x14f)](({file:_0x260753,line:_0x3d3a6e})=>({'file':_0x260753,'line':_0x3d3a6e}));});}const RABETBASE_SUBCOMMANDS=[a82_0x4289ed(0x164),a82_0x4289ed(0x13d),a82_0x4289ed(0x132),a82_0x4289ed(0x157),'project',a82_0x4289ed(0x18b),'schema',a82_0x4289ed(0x152),a82_0x4289ed(0x17e),'kb',a82_0x4289ed(0x174),a82_0x4289ed(0x155),a82_0x4289ed(0x176),a82_0x4289ed(0x13e),a82_0x4289ed(0x170),'registry'],RABETBASE_INVOCATION=new RegExp(String[a82_0x4289ed(0x173)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a82_0x4289ed(0x144)]('|')})\b`+String[a82_0x4289ed(0x173)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x19db26){const _0x88407=a82_0x4289ed,_0x1f1410=_0x19db26[_0x88407(0x169)](/\brabetbase\b/i);if(_0x1f1410<0x0)return![];const _0x4d920f=_0x19db26['slice'](_0x1f1410)['split'](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x88407(0x18a)](_0x4d920f);}function parseFrontmatter(_0x41a72c){const _0x3f9679=a82_0x4289ed,_0x4bafd4=_0x41a72c[_0x3f9679(0x135)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4bafd4)return{'hasFrontmatter':![]};const _0x37570f=_0x4bafd4[0x1]??'',_0x14c29c={'hasFrontmatter':!![]};let _0x447614;try{_0x447614=a82_0x4852b2(_0x37570f);}catch{return _0x14c29c;}const _0x1af439=asRecord(_0x447614);if(!_0x1af439)return _0x14c29c;_0x14c29c['name']=scalarToString(_0x1af439['name']),_0x14c29c[_0x3f9679(0x16d)]=scalarToString(_0x1af439[_0x3f9679(0x16d)]),_0x14c29c[_0x3f9679(0x177)]=scalarToString(_0x1af439['description']),_0x14c29c[_0x3f9679(0x17d)]=scalarToString(_0x1af439[_0x3f9679(0x17d)]);const _0x2b6f8e=asRecord(_0x1af439['metadata']);return _0x2b6f8e&&(_0x14c29c[_0x3f9679(0x172)]=scalarToString(_0x2b6f8e[_0x3f9679(0x172)]),_0x14c29c['internal']=scalarToBoolean(_0x2b6f8e['internal'])),_0x14c29c;}function a82_0x9dca(){const _0xd9160d=['metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','32766uqHuci','toLowerCase','boolean','read','test','app','message','string','888204WNxAYN','bff','line','Missing\x20SKILL.md.','match','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','name','structure-complete','has','frontmatter-required','file','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','sql','auth','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','7282521QrSsdq','SKILL.md\x20is\x20not\x20a\x20file.','internal-skill','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','join','section','errors','Frontmatter\x20example\x20is\x20missing.','Skill\x20validation\x20failed:\x0a','filter','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','path','77MWmUIf','content','Skill\x20directory\x20not\x20found:\x20','map','1337vzPWRB','true','service','display-name-recommended','example-recommended','workspace','4TeTKJy','page','push','Add\x20frontmatter\x20with\x20name\x20and\x20description.','4332220kQCyPy','toUpperCase','61688uVwukl','level','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','18VEoRQz','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','\x20Fix:\x20','SKILL.md\x20must\x20start\x20with\x20frontmatter.','isSymbolicLink','dataset','utf8','SKILL.md','Frontmatter\x20name\x20is\x20missing.','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','search','warning','error','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','displayName','189845XJpGfd','suggestion','logs','description-required','type','raw','config','flatMap','data','description','236hvHgVe','Frontmatter\x20description\x20is\x20empty.','isDirectory','2442565BGqaSf','validation','example','artifact','object','number','trim','Frontmatter\x20displayName\x20is\x20missing.'];a82_0x9dca=function(){return _0xd9160d;};return a82_0x9dca();}function asRecord(_0x58569b){const _0x58fec4=a82_0x4289ed;if(_0x58569b&&typeof _0x58569b===_0x58fec4(0x17f)&&!Array['isArray'](_0x58569b))return _0x58569b;return undefined;}function scalarToString(_0x47789d){const _0x9685c6=a82_0x4289ed;if(typeof _0x47789d===_0x9685c6(0x130))return _0x47789d[_0x9685c6(0x181)]();if(typeof _0x47789d===_0x9685c6(0x180)||typeof _0x47789d==='boolean')return String(_0x47789d);return undefined;}function scalarToBoolean(_0x2740a4){const _0x18266e=a82_0x4289ed;if(typeof _0x2740a4===_0x18266e(0x188))return _0x2740a4;if(typeof _0x2740a4==='string')return cleanBoolean(_0x2740a4);return undefined;}function cleanBoolean(_0x121ae){const _0x560d37=a82_0x4289ed,_0xc99c83=_0x121ae[_0x560d37(0x181)]()[_0x560d37(0x187)]();if(_0xc99c83===_0x560d37(0x151))return!![];if(_0xc99c83==='false')return![];return undefined;}function issue(_0x359b3b,_0x27a49a,_0xbd09b1,_0x255faa,_0x2a0a1c,_0x3ee181){return{'level':_0x359b3b,'ruleId':_0x27a49a,'file':_0xbd09b1,'section':_0x3ee181,'message':_0x255faa,'suggestion':_0x2a0a1c};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x282146=a83_0x1772;(function(_0x51558a,_0x323373){const _0x521b0d=a83_0x1772,_0x3279a3=_0x51558a();while(!![]){try{const _0x2f4874=parseInt(_0x521b0d(0x1fc))/0x1+parseInt(_0x521b0d(0x1f6))/0x2*(-parseInt(_0x521b0d(0x1f5))/0x3)+-parseInt(_0x521b0d(0x1f8))/0x4*(parseInt(_0x521b0d(0x1fb))/0x5)+-parseInt(_0x521b0d(0x1f3))/0x6+-parseInt(_0x521b0d(0x201))/0x7+parseInt(_0x521b0d(0x203))/0x8*(-parseInt(_0x521b0d(0x202))/0x9)+parseInt(_0x521b0d(0x1fd))/0xa;if(_0x2f4874===_0x323373)break;else _0x3279a3['push'](_0x3279a3['shift']());}catch(_0x16a66d){_0x3279a3['push'](_0x3279a3['shift']());}}}(a83_0x4ea3,0x4a066));import{getSqlQueryInfo}from'../../core/api-client.js';function a83_0x1772(_0x446a4e,_0x5d1229){_0x446a4e=_0x446a4e-0x1f1;const _0x4ea316=a83_0x4ea3();let _0x177286=_0x4ea316[_0x446a4e];return _0x177286;}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a83_0x4ea3(){const _0x2835d2=['3628800EpBGPG','bool','47202zDoFYE','10ReqDTs','verbose','392UEZuci','read','str','1445DJINlk','300694ooxPXV','14917910irBhIV','detail','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','appCode','3395322oyigix','9ejronm','2339528npbOpt','dbId','sql','sqlName','sqlcode'];a83_0x4ea3=function(){return _0x2835d2;};return a83_0x4ea3();}export const sqlDetail={'service':a83_0x282146(0x205),'command':a83_0x282146(0x1fe),'description':a83_0x282146(0x1ff),'risk':a83_0x282146(0x1f9),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x208a46){const _0x145dd7=a83_0x282146,_0x478d51=await getSqlQueryInfo(_0x208a46[_0x145dd7(0x200)],_0x208a46[_0x145dd7(0x1fa)](_0x145dd7(0x1f2))),_0x3be294=_0x208a46[_0x145dd7(0x1f4)](_0x145dd7(0x1f7));if(_0x3be294)return{'ok':!![],'data':_0x478d51};const _0x2def18=_0x478d51['dbId']?await getDbName(_0x208a46[_0x145dd7(0x200)],_0x478d51[_0x145dd7(0x204)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x478d51['sqlCode'],'sqlName':_0x478d51[_0x145dd7(0x1f1)],'db':_0x2def18?_0x2def18+'\x20('+_0x478d51[_0x145dd7(0x204)]+')':_0x478d51[_0x145dd7(0x204)]??'','sqlContent':_0x478d51['sqlContent']??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x409626=a84_0x25f9;(function(_0x59ed00,_0x2ae239){const _0x7899fb=a84_0x25f9,_0x120d94=_0x59ed00();while(!![]){try{const _0x28a137=-parseInt(_0x7899fb(0x165))/0x1+parseInt(_0x7899fb(0x16e))/0x2*(parseInt(_0x7899fb(0x15d))/0x3)+-parseInt(_0x7899fb(0x16b))/0x4*(-parseInt(_0x7899fb(0x161))/0x5)+-parseInt(_0x7899fb(0x160))/0x6+parseInt(_0x7899fb(0x16d))/0x7*(-parseInt(_0x7899fb(0x15a))/0x8)+-parseInt(_0x7899fb(0x167))/0x9*(-parseInt(_0x7899fb(0x15f))/0xa)+-parseInt(_0x7899fb(0x15b))/0xb*(-parseInt(_0x7899fb(0x163))/0xc);if(_0x28a137===_0x2ae239)break;else _0x120d94['push'](_0x120d94['shift']());}catch(_0x9ec581){_0x120d94['push'](_0x120d94['shift']());}}}(a84_0x21a0,0x70190));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';function a84_0x25f9(_0x5cdc68,_0x1077a3){_0x5cdc68=_0x5cdc68-0x156;const _0x21a045=a84_0x21a0();let _0x25f981=_0x21a045[_0x5cdc68];return _0x25f981;}function a84_0x21a0(){const _0x48acd8=['Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','7ItfoWX','168158bUmVTX','exec','execError','now','isArray','length','Returned\x20','6463984NZSmJX','84447iPdrWy','sql','6HyNGeS','read','1433880QSEwjt','1091154buNtdW','5405IqLglJ','execSuccess','2532rAJeSS','params','600213vjGtbE','str','9rTiGpJ','sqlcode','\x20row(s)\x20in\x20','SQL\x20execution\x20failed','436YbIorX'];a84_0x21a0=function(){return _0x48acd8;};return a84_0x21a0();}export const sqlExec={'service':a84_0x409626(0x15c),'command':a84_0x409626(0x16f),'description':a84_0x409626(0x16c),'risk':a84_0x409626(0x15e),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x2efcf2){const _0x165cf8=a84_0x409626,_0x184eb9=parseJsonParams(_0x2efcf2['str'](_0x165cf8(0x164))),_0x59199a=Date[_0x165cf8(0x156)](),_0x49643e=await executeSdkSql(_0x2efcf2[_0x165cf8(0x166)](_0x165cf8(0x168)),_0x184eb9),_0xd69166=Date['now']()-_0x59199a,_0x903a96=_0x49643e?.['execResult']??_0x49643e,_0x5ecb46=_0x49643e?.[_0x165cf8(0x162)]??!![];if(!_0x5ecb46)return{'ok':![],'data':{'error':_0x49643e?.[_0x165cf8(0x170)]||_0x165cf8(0x16a),'elapsed':_0xd69166},'message':_0x165cf8(0x16a)};const _0x489378=Array[_0x165cf8(0x157)](_0x903a96)?_0x903a96:[];return{'ok':!![],'data':{'rows':_0x489378,'rowCount':_0x489378[_0x165cf8(0x158)],'elapsed':_0xd69166},'message':_0x165cf8(0x159)+_0x489378[_0x165cf8(0x158)]+_0x165cf8(0x169)+_0xd69166+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c5cfc,_0x52c050){const _0x2878e5=a85_0x1d96,_0x41355f=_0x5c5cfc();while(!![]){try{const _0x146cf0=-parseInt(_0x2878e5(0x1cd))/0x1+-parseInt(_0x2878e5(0x1cb))/0x2+parseInt(_0x2878e5(0x1c9))/0x3+-parseInt(_0x2878e5(0x1cc))/0x4+parseInt(_0x2878e5(0x1c8))/0x5+-parseInt(_0x2878e5(0x1ca))/0x6+parseInt(_0x2878e5(0x1c7))/0x7;if(_0x146cf0===_0x52c050)break;else _0x41355f['push'](_0x41355f['shift']());}catch(_0xcc1203){_0x41355f['push'](_0x41355f['shift']());}}}(a85_0x2c14,0x41647));import{sqlDetail}from'../../commands/sql/detail.js';function a85_0x2c14(){const _0x213679=['8151626dqMRRW','316440nwdcDF','772962JqHMUM','2088690nEbWfy','89090lpXTOy','1278100UFzlaU','505428tfWHeB'];a85_0x2c14=function(){return _0x213679;};return a85_0x2c14();}import{sqlExec}from'../../commands/sql/exec.js';function a85_0x1d96(_0x4d9ef8,_0x45eda6){_0x4d9ef8=_0x4d9ef8-0x1c7;const _0x2c1482=a85_0x2c14();let _0x1d962c=_0x2c1482[_0x4d9ef8];return _0x1d962c;}export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a86_0x2a8eba=a86_0x1f9a;(function(_0x4669c6,_0x3eb639){const _0x4ade5e=a86_0x1f9a,_0x17173c=_0x4669c6();while(!![]){try{const _0x16624b=parseInt(_0x4ade5e(0xe9))/0x1*(-parseInt(_0x4ade5e(0x110))/0x2)+-parseInt(_0x4ade5e(0xd6))/0x3*(-parseInt(_0x4ade5e(0xfc))/0x4)+parseInt(_0x4ade5e(0xe6))/0x5*(parseInt(_0x4ade5e(0xf6))/0x6)+parseInt(_0x4ade5e(0xf0))/0x7+-parseInt(_0x4ade5e(0x11d))/0x8+parseInt(_0x4ade5e(0x116))/0x9*(-parseInt(_0x4ade5e(0xc1))/0xa)+-parseInt(_0x4ade5e(0x104))/0xb*(parseInt(_0x4ade5e(0xdd))/0xc);if(_0x16624b===_0x3eb639)break;else _0x17173c['push'](_0x17173c['shift']());}catch(_0x40882b){_0x17173c['push'](_0x17173c['shift']());}}}(a86_0x4752,0xb349c));import{fileURLToPath}from'node:url';function a86_0x1f9a(_0x394c49,_0x38d80d){_0x394c49=_0x394c49-0xc1;const _0x47524f=a86_0x4752();let _0x1f9a0f=_0x47524f[_0x394c49];return _0x1f9a0f;}import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a86_0x77bc37 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':'latest','type':a86_0x2a8eba(0xdb),'description':a86_0x2a8eba(0xf4),'default':![]},{'name':a86_0x2a8eba(0xc8),'type':a86_0x2a8eba(0xdb),'description':a86_0x2a8eba(0xdf),'default':![]},{'name':'version','type':'string','description':a86_0x2a8eba(0xc6)}];function getRequestedVersion(_0x2492a3){const _0x36b0c7=a86_0x2a8eba,_0x17e551=_0x2492a3['str'](_0x36b0c7(0xd9))['trim']();if(_0x17e551)return _0x17e551;return String(_0x2492a3[_0x36b0c7(0xc2)]?.[0x0]??'')['trim']();}async function validateUpdateFlags(_0x5b99fd){const _0x13e936=a86_0x2a8eba,_0xfed670=getRequestedVersion(_0x5b99fd),_0x548997=[_0x5b99fd[_0x13e936(0xe8)](_0x13e936(0xcc))?_0x13e936(0xcc):'',_0x5b99fd[_0x13e936(0xe8)](_0x13e936(0xc8))?_0x13e936(0xc8):'',_0xfed670?_0x13e936(0xd9):''][_0x13e936(0xcd)](Boolean);if(_0x548997['length']>0x1)throw CliErrors[_0x13e936(0xf8)](_0x13e936(0x100),_0x13e936(0xfb));if(_0xfed670&&!a86_0x77bc37[_0x13e936(0xde)](_0xfed670))throw CliErrors[_0x13e936(0xf8)](_0x13e936(0xeb)+_0xfed670,_0x13e936(0xed));}async function fetchNpmDistTags(){const _0x311d2d=a86_0x2a8eba;try{const _0x45f097=NPM_REGISTRY_BASE_URL+_0x311d2d(0xe2)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x5c94ea=await fetch(_0x45f097,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x5c94ea['ok'])return null;const _0x5e99d6=await _0x5c94ea[_0x311d2d(0xf3)]();if(!_0x5e99d6||typeof _0x5e99d6!=='object')return null;return Object[_0x311d2d(0x118)](Object[_0x311d2d(0x108)](_0x5e99d6)['filter'](([,_0x26ab5e])=>typeof _0x26ab5e===_0x311d2d(0x102)&&_0x26ab5e[_0x311d2d(0xf5)]())[_0x311d2d(0xcf)](([_0x5729c9,_0xdd8a85])=>[_0x5729c9,String(_0xdd8a85)[_0x311d2d(0xf5)]()]));}catch{return null;}}async function resolveTargetVersion(_0x333798){const _0x5addc0=a86_0x2a8eba,_0x4702e6=getRequestedVersion(_0x333798);if(_0x4702e6)return{'version':_0x4702e6,'source':'version'};const _0x2d40a7=_0x333798[_0x5addc0(0xe8)](_0x5addc0(0xc8))?_0x5addc0(0xc8):'latest',_0x1a3928=await fetchNpmDistTags(),_0x2a6429=_0x1a3928?.[_0x2d40a7];if(!_0x2a6429)return null;return{'version':_0x2a6429,'source':_0x2d40a7};}function shouldInstallTarget(_0x3e4abc,_0x559e49){const _0x369f75=a86_0x2a8eba;if(_0x559e49[_0x369f75(0xc7)]===_0x369f75(0xd9)||_0x559e49[_0x369f75(0xc7)]==='beta')return!a86_0x77bc37['eq'](_0x3e4abc,_0x559e49[_0x369f75(0xd9)]);return a86_0x77bc37['lt'](_0x3e4abc,_0x559e49[_0x369f75(0xd9)]);}function a86_0x4752(){const _0x2021a1=['\x20version\x20from\x20npm.','node_modules','/-/package/','Checking\x20npm\x20dist-tags...','basename','cwd','2155765dzZfOU',']:\x20','bool','19863SPdezn','INSTALL_FAILED','Invalid\x20version:\x20','write','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','relative','exit\x20','6157963Fibqrj','Update\x20failed:\x20','read','json','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','trim','18qawwYU','run','validation','--prefix','Updating\x20','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','303828GqzGRq','pipe','stderr','Current\x20version:\x20','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','platform','string','Checking\x20CLI\x20Built-in\x20Skill...','37620YtwDzZ','Unable\x20to\x20resolve\x20',',\x20found\x20','Run:\x20','entries','\x20\x20CLI\x20Built-in\x20Skill\x20',',\x20state\x20','nonInteractive','reason','\x20->\x20','Run:\x20npm\x20view\x20','Updated\x20to\x20v','52DWuQQF','find','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','dirname','win32','423PeOmrJ','log','fromEntries','npm','error','Run:\x20npm\x20install\x20-g\x20','Already\x20up\x20to\x20date\x20(v','6265048QuCeAn','@lovrabet\x5clovrabet-cli','19390FrAsDV','args','Version\x20comparison\x20failed:\x20','\x20is\x20current.','expected\x20','Install\x20a\x20specific\x20CLI\x20version','source','beta','stdout',',\x20then\x20verify\x20with:\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','latest','filter','exitCode','map','\x20dist-tags,\x20then\x20retry.','unknown','inherit','Update\x20the\x20','repairCommand','\x20doctor','42HrZAFj','apiError','current','version','skillVersion','boolean','install','3900IvyZtt','valid','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag'];a86_0x4752=function(){return _0x2021a1;};return a86_0x4752();}export function installCliPackage(_0x3882fa,_0x31d02a,_0x1feb07=resolveCurrentCliNpmPrefix()){const _0x3ba423=a86_0x2a8eba,_0x925fc1=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3882fa,_0x364445=[_0x3ba423(0xdc),'-g',_0x925fc1],_0x2fc55b=runNpmInstall(_0x364445,_0x31d02a);if(_0x2fc55b['ok']||!isNpmPrefixPermissionError(_0x2fc55b['error']))return _0x2fc55b;if(!_0x1feb07||_0x2fc55b['error']?.['toLowerCase']()['includes'](_0x1feb07['toLowerCase']()))return _0x2fc55b;return console['warn'](_0x3ba423(0x112)+_0x1feb07),runNpmInstall([..._0x364445,_0x3ba423(0xf9),_0x1feb07],_0x31d02a);}export function resolveCurrentCliNpmPrefix(_0x3ac44a=fileURLToPath(import.meta.url),_0x58f87d=process[a86_0x2a8eba(0x101)]){const _0x2cfd9f=a86_0x2a8eba,_0x5e0da6=_0x58f87d==='win32'?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x4916a5=_0x5e0da6[_0x2cfd9f(0x114)](_0x5e0da6[_0x2cfd9f(0x114)](_0x5e0da6[_0x2cfd9f(0x114)](_0x3ac44a))),_0x4abf2c=_0x58f87d===_0x2cfd9f(0x115)?_0x2cfd9f(0x11e):'@lovrabet/lovrabet-cli';let _0x112b87=_0x5e0da6['dirname'](_0x4916a5);while(!![]){if(_0x5e0da6['basename'](_0x112b87)===_0x2cfd9f(0xe1)&&_0x5e0da6[_0x2cfd9f(0xee)](_0x112b87,_0x4916a5)===_0x4abf2c){const _0x3d6c29=_0x5e0da6[_0x2cfd9f(0x114)](_0x112b87);return _0x5e0da6[_0x2cfd9f(0xe4)](_0x3d6c29)==='lib'?_0x5e0da6[_0x2cfd9f(0x114)](_0x3d6c29):_0x3d6c29;}const _0x3682c1=_0x5e0da6['dirname'](_0x112b87);if(_0x3682c1===_0x112b87)return null;_0x112b87=_0x3682c1;}}function runNpmInstall(_0x4acf49,_0x1e8f42){const _0x242149=a86_0x2a8eba;console[_0x242149(0x117)]('*\x20'+[_0x242149(0x119),..._0x4acf49]['join']('\x20'));const _0x5a3bbf=execaSync('npm',_0x4acf49,{'cwd':process[_0x242149(0xe5)](),'stdio':_0x242149(0xfd),'env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0x4ff7b4=_0x5a3bbf[_0x242149(0xfe)]?String(_0x5a3bbf[_0x242149(0xfe)])['trim']():'',_0x15e51b=_0x5a3bbf['stdout']?String(_0x5a3bbf[_0x242149(0xc9)])[_0x242149(0xf5)]():'';if(!_0x1e8f42){if(_0x15e51b)process[_0x242149(0xc9)][_0x242149(0xec)](_0x15e51b+'\x0a');if(_0x4ff7b4)process['stderr'][_0x242149(0xec)](_0x4ff7b4+'\x0a');}if(_0x5a3bbf[_0x242149(0xce)]===0x0)return{'ok':!![]};const _0x290e7a=_0x4ff7b4||_0x15e51b||_0x5a3bbf['shortMessage']||_0x242149(0xef)+(_0x5a3bbf[_0x242149(0xce)]??_0x242149(0xd1));return{'ok':![],'error':_0x290e7a};}function isNpmPrefixPermissionError(_0x4586b7){return Boolean(_0x4586b7&&/\b(?:EACCES|EPERM)\b/['test'](_0x4586b7));}function repairCurrentBuiltinSkill(_0x53002c){const _0x184e39=a86_0x2a8eba;console[_0x184e39(0x117)](_0x184e39(0x103));const _0x5b25e8=installBuiltinSkill({'stdio':_0x53002c?'pipe':_0x184e39(0xd2)});if(_0x5b25e8['ok']){console['log'](_0x184e39(0x109)+_0x5b25e8[_0x184e39(0xda)]+_0x184e39(0xc4));return;}throw CliErrors['apiError']('CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+(_0x5b25e8['code']||_0x184e39(0xea))+_0x184e39(0xe7)+(_0x5b25e8[_0x184e39(0x11a)]||'unknown'),_0x184e39(0x107)+_0x5b25e8[_0x184e39(0xd4)]+_0x184e39(0xca)+CLI_BIN_NAME+_0x184e39(0xd5));}function verifyUpdatedBuiltinSkill(_0x36bdc3){const _0x2fc04e=a86_0x2a8eba;console[_0x2fc04e(0x117)](_0x2fc04e(0x103));const _0x556a8c=inspectInstalledBuiltinSkillVersion(_0x36bdc3);if(_0x556a8c['state']===_0x2fc04e(0xd8)){console['log'](_0x2fc04e(0x109)+_0x36bdc3+_0x2fc04e(0xc4));return;}const _0x5cff95=_0x556a8c['skillVersion']?_0x2fc04e(0xc5)+_0x36bdc3+_0x2fc04e(0x106)+_0x556a8c[_0x2fc04e(0xda)]:_0x2fc04e(0xc5)+_0x36bdc3+_0x2fc04e(0x10a)+_0x556a8c['state'],_0x4d090f=_0x556a8c[_0x2fc04e(0x10c)]?_0x5cff95+':\x20'+_0x556a8c[_0x2fc04e(0x10c)]:_0x5cff95;throw CliErrors[_0x2fc04e(0xd7)]('CLI\x20updated\x20to\x20v'+_0x36bdc3+_0x2fc04e(0x113)+_0x4d090f,'Run:\x20'+_0x556a8c[_0x2fc04e(0xd4)]+_0x2fc04e(0xca)+CLI_BIN_NAME+_0x2fc04e(0xd5));}async function execute(_0x29a821){const _0x26601e=a86_0x2a8eba;await validateUpdateFlags(_0x29a821);const _0x125508=getCliVersion();console[_0x26601e(0x117)](_0x26601e(0xff)+_0x125508),console['log'](_0x26601e(0xe3));const _0x1691d0=await resolveTargetVersion(_0x29a821);if(!_0x1691d0){const _0x2d0646=_0x29a821['bool']('beta')?_0x26601e(0xc8):_0x26601e(0xcc),_0x4a875d=_0x26601e(0x105)+_0x2d0646+_0x26601e(0xe0);throw CliErrors[_0x26601e(0xd7)](_0x4a875d,_0x26601e(0x11b)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x2d0646);}const _0x1226bc=[_0x125508,_0x1691d0[_0x26601e(0xd9)]][_0x26601e(0x111)](_0x139cf6=>!a86_0x77bc37['valid'](_0x139cf6));if(_0x1226bc){const _0x3b26a2=_0x26601e(0xc3)+_0x1226bc+'.';throw CliErrors[_0x26601e(0xd7)](_0x3b26a2,_0x26601e(0x10e)+LOVRABET_NPM_PACKAGE_NAME+_0x26601e(0xd0));}if(!shouldInstallTarget(_0x125508,_0x1691d0)){const _0x31c4da=_0x1691d0[_0x26601e(0xc7)]===_0x26601e(0xd9)?'Already\x20on\x20requested\x20version\x20(v'+_0x1691d0['version']+').':_0x26601e(0x11c)+_0x1691d0[_0x26601e(0xd9)]+').';return console[_0x26601e(0x117)](_0x31c4da),repairCurrentBuiltinSkill(_0x29a821[_0x26601e(0x10b)]),{'ok':!![]};}console[_0x26601e(0x117)](_0x26601e(0xfa)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x125508+_0x26601e(0x10d)+_0x1691d0['version']);const _0x515879=installCliPackage(_0x1691d0[_0x26601e(0xd9)],_0x29a821[_0x26601e(0x10b)]);if(!_0x515879['ok']){const _0x26936c=_0x26601e(0xf1)+(_0x515879[_0x26601e(0x11a)]||'unknown');throw CliErrors[_0x26601e(0xd7)](_0x26936c,_0x26601e(0x11b)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1691d0[_0x26601e(0xd9)]);}return console[_0x26601e(0x117)](_0x26601e(0x10f)+_0x1691d0[_0x26601e(0xd9)]+'.'),console[_0x26601e(0x117)](_0x26601e(0xcb)),verifyUpdatedBuiltinSkill(_0x1691d0[_0x26601e(0xd9)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a86_0x2a8eba(0xf7),'description':a86_0x2a8eba(0xd3)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a86_0x2a8eba(0xf2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a86_0x261baf=a86_0x3c64;(function(_0x1d7462,_0x203ede){const _0x233777=a86_0x3c64,_0x10f7e5=_0x1d7462();while(!![]){try{const _0x4e17a2=parseInt(_0x233777(0x147))/0x1+parseInt(_0x233777(0x15c))/0x2*(parseInt(_0x233777(0x155))/0x3)+-parseInt(_0x233777(0x16d))/0x4*(-parseInt(_0x233777(0x13e))/0x5)+parseInt(_0x233777(0x141))/0x6*(parseInt(_0x233777(0x129))/0x7)+-parseInt(_0x233777(0x13f))/0x8+parseInt(_0x233777(0x172))/0x9+-parseInt(_0x233777(0x157))/0xa*(parseInt(_0x233777(0x164))/0xb);if(_0x4e17a2===_0x203ede)break;else _0x10f7e5['push'](_0x10f7e5['shift']());}catch(_0x318428){_0x10f7e5['push'](_0x10f7e5['shift']());}}}(a86_0x5dc1,0x936d0));import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a86_0x3d28a4 from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a86_0x3c64(_0x52bc30,_0x58de44){_0x52bc30=_0x52bc30-0x127;const _0x5dc114=a86_0x5dc1();let _0x3c645f=_0x5dc114[_0x52bc30];return _0x3c645f;}import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a86_0x261baf(0x16b),'type':'boolean','description':a86_0x261baf(0x12e),'default':![]},{'name':'beta','type':a86_0x261baf(0x131),'description':a86_0x261baf(0x156),'default':![]},{'name':a86_0x261baf(0x130),'type':a86_0x261baf(0x153),'description':a86_0x261baf(0x145)}];function getRequestedVersion(_0xccd2fd){const _0x646103=a86_0x261baf,_0x2b9f53=_0xccd2fd['str'](_0x646103(0x130))[_0x646103(0x173)]();if(_0x2b9f53)return _0x2b9f53;return String(_0xccd2fd[_0x646103(0x13a)]?.[0x0]??'')[_0x646103(0x173)]();}async function validateUpdateFlags(_0x12ce54){const _0x173120=a86_0x261baf,_0x8d0d9a=getRequestedVersion(_0x12ce54),_0x149cc2=[_0x12ce54[_0x173120(0x13c)](_0x173120(0x16b))?'latest':'',_0x12ce54['bool'](_0x173120(0x12f))?_0x173120(0x12f):'',_0x8d0d9a?_0x173120(0x130):''][_0x173120(0x15a)](Boolean);if(_0x149cc2[_0x173120(0x15e)]>0x1)throw CliErrors[_0x173120(0x174)](_0x173120(0x128),_0x173120(0x16f));if(_0x8d0d9a&&!a86_0x3d28a4[_0x173120(0x15f)](_0x8d0d9a))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x8d0d9a,_0x173120(0x17b));}function a86_0x5dc1(){const _0x4034cc=['Install\x20a\x20specific\x20CLI\x20version',',\x20then\x20verify\x20with:\x20','539337ovnurn','Current\x20version:\x20','lib','Update\x20the\x20','\x20doctor','Checking\x20CLI\x20Built-in\x20Skill...','find','/dist-tags','exit\x20','Checking\x20npm\x20dist-tags...','--prefix','node_modules','string','skillVersion','6RQYycn','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','10pKeAKE',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','pipe','filter','unknown','422902MvuYgV','reason','length','valid','Run:\x20npm\x20view\x20','Already\x20on\x20requested\x20version\x20(v','entries','exitCode','8181789uXuCOy','Run:\x20','\x20is\x20current.','basename','INSTALL_FAILED','platform','warn','latest','read','2034460NtZrER','Already\x20up\x20to\x20date\x20(v','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','relative','inherit','70884dzytLj','trim','validation','Unable\x20to\x20resolve\x20','fromEntries','dirname','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','\x20\x20CLI\x20Built-in\x20Skill\x20','write','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','error','source','test','stderr','toLowerCase','\x20->\x20','apiError','CLI\x20updated\x20to\x20v','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','63HuLGMj','nonInteractive','state','log','update','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','beta','version','boolean','\x20version\x20from\x20npm.','@lovrabet\x5clovrabet-cli',',\x20found\x20','Update\x20failed:\x20','json','repairCommand','\x20dist-tags,\x20then\x20retry.','code','args','/-/package/','bool','win32','5kWKovE','7533640rBUggM','current','540420wowGBO','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','expected\x20','cwd'];a86_0x5dc1=function(){return _0x4034cc;};return a86_0x5dc1();}async function fetchNpmDistTags(){const _0x1c3b64=a86_0x261baf;try{const _0x5a5603=NPM_REGISTRY_BASE_URL+_0x1c3b64(0x13b)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x1c3b64(0x14e),_0xf6b4ec=await fetch(_0x5a5603,{'signal':AbortSignal['timeout'](0x2710)});if(!_0xf6b4ec['ok'])return null;const _0xe9bc64=await _0xf6b4ec[_0x1c3b64(0x136)]();if(!_0xe9bc64||typeof _0xe9bc64!=='object')return null;return Object[_0x1c3b64(0x176)](Object[_0x1c3b64(0x162)](_0xe9bc64)['filter'](([,_0x11428e])=>typeof _0x11428e===_0x1c3b64(0x153)&&_0x11428e['trim']())['map'](([_0x5702cf,_0x2ef41b])=>[_0x5702cf,String(_0x2ef41b)[_0x1c3b64(0x173)]()]));}catch{return null;}}async function resolveTargetVersion(_0x4cdf3b){const _0x463f29=a86_0x261baf,_0x1ce9ab=getRequestedVersion(_0x4cdf3b);if(_0x1ce9ab)return{'version':_0x1ce9ab,'source':'version'};const _0x8972e8=_0x4cdf3b[_0x463f29(0x13c)](_0x463f29(0x12f))?'beta':'latest',_0x43b961=await fetchNpmDistTags(),_0x16c9d2=_0x43b961?.[_0x8972e8];if(!_0x16c9d2)return null;return{'version':_0x16c9d2,'source':_0x8972e8};}function shouldInstallTarget(_0x163e13,_0xfa9757){const _0x570d55=a86_0x261baf;if(_0xfa9757[_0x570d55(0x17d)]==='version'||_0xfa9757[_0x570d55(0x17d)]==='beta')return!a86_0x3d28a4['eq'](_0x163e13,_0xfa9757[_0x570d55(0x130)]);return a86_0x3d28a4['lt'](_0x163e13,_0xfa9757[_0x570d55(0x130)]);}export function installCliPackage(_0x5b06f0,_0x165309,_0x4ddbac=resolveCurrentCliNpmPrefix()){const _0x353256=a86_0x261baf,_0x26ecff=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x5b06f0,_0x5b8e91=['install','-g',_0x26ecff],_0x50247c=runNpmInstall(_0x5b8e91,_0x165309);if(_0x50247c['ok']||!isNpmPrefixPermissionError(_0x50247c[_0x353256(0x17c)]))return _0x50247c;if(!_0x4ddbac||_0x50247c['error']?.[_0x353256(0x180)]()['includes'](_0x4ddbac[_0x353256(0x180)]()))return _0x50247c;return console[_0x353256(0x16a)](_0x353256(0x142)+_0x4ddbac),runNpmInstall([..._0x5b8e91,_0x353256(0x151),_0x4ddbac],_0x165309);}export function resolveCurrentCliNpmPrefix(_0x38ed06=fileURLToPath(import.meta.url),_0xd85775=process[a86_0x261baf(0x169)]){const _0x12efb4=a86_0x261baf,_0x42c49e=_0xd85775===_0x12efb4(0x13d)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x480bc7=_0x42c49e[_0x12efb4(0x177)](_0x42c49e[_0x12efb4(0x177)](_0x42c49e['dirname'](_0x38ed06))),_0x92093f=_0xd85775===_0x12efb4(0x13d)?_0x12efb4(0x133):'@lovrabet/lovrabet-cli';let _0x1b22a6=_0x42c49e[_0x12efb4(0x177)](_0x480bc7);while(!![]){if(_0x42c49e[_0x12efb4(0x167)](_0x1b22a6)===_0x12efb4(0x152)&&_0x42c49e[_0x12efb4(0x170)](_0x1b22a6,_0x480bc7)===_0x92093f){const _0x3f2061=_0x42c49e[_0x12efb4(0x177)](_0x1b22a6);return _0x42c49e[_0x12efb4(0x167)](_0x3f2061)===_0x12efb4(0x149)?_0x42c49e[_0x12efb4(0x177)](_0x3f2061):_0x3f2061;}const _0x5eef75=_0x42c49e[_0x12efb4(0x177)](_0x1b22a6);if(_0x5eef75===_0x1b22a6)return null;_0x1b22a6=_0x5eef75;}}function runNpmInstall(_0x5bed47,_0x22e6e9){const _0x3e0934=a86_0x261baf;console[_0x3e0934(0x12c)]('*\x20'+['npm',..._0x5bed47]['join']('\x20'));const _0x27eb97=execaSync('npm',_0x5bed47,{'cwd':process[_0x3e0934(0x144)](),'stdio':_0x3e0934(0x159),'env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0x55a36a=_0x27eb97[_0x3e0934(0x17f)]?String(_0x27eb97[_0x3e0934(0x17f)])['trim']():'',_0x4b49f3=_0x27eb97['stdout']?String(_0x27eb97['stdout'])['trim']():'';if(!_0x22e6e9){if(_0x4b49f3)process['stdout'][_0x3e0934(0x17a)](_0x4b49f3+'\x0a');if(_0x55a36a)process[_0x3e0934(0x17f)]['write'](_0x55a36a+'\x0a');}if(_0x27eb97[_0x3e0934(0x163)]===0x0)return{'ok':!![]};const _0x83d92e=_0x55a36a||_0x4b49f3||_0x27eb97['shortMessage']||_0x3e0934(0x14f)+(_0x27eb97[_0x3e0934(0x163)]??_0x3e0934(0x15b));return{'ok':![],'error':_0x83d92e};}function isNpmPrefixPermissionError(_0x275373){const _0x1c3569=a86_0x261baf;return Boolean(_0x275373&&/\b(?:EACCES|EPERM)\b/[_0x1c3569(0x17e)](_0x275373));}function repairCurrentBuiltinSkill(_0x85d6ad){const _0x13d57b=a86_0x261baf;console[_0x13d57b(0x12c)](_0x13d57b(0x14c));const _0x5289a2=installBuiltinSkill({'stdio':_0x85d6ad?_0x13d57b(0x159):_0x13d57b(0x171)});if(_0x5289a2['ok']){console[_0x13d57b(0x12c)](_0x13d57b(0x179)+_0x5289a2['skillVersion']+_0x13d57b(0x166));return;}throw CliErrors[_0x13d57b(0x182)](_0x13d57b(0x178)+(_0x5289a2[_0x13d57b(0x139)]||_0x13d57b(0x168))+']:\x20'+(_0x5289a2['error']||_0x13d57b(0x15b)),_0x13d57b(0x165)+_0x5289a2[_0x13d57b(0x137)]+_0x13d57b(0x146)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x279010){const _0x1705a7=a86_0x261baf;console[_0x1705a7(0x12c)](_0x1705a7(0x14c));const _0x34f694=inspectInstalledBuiltinSkillVersion(_0x279010);if(_0x34f694[_0x1705a7(0x12b)]===_0x1705a7(0x140)){console['log']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x279010+_0x1705a7(0x166));return;}const _0x312050=_0x34f694[_0x1705a7(0x154)]?_0x1705a7(0x143)+_0x279010+_0x1705a7(0x134)+_0x34f694[_0x1705a7(0x154)]:_0x1705a7(0x143)+_0x279010+',\x20state\x20'+_0x34f694[_0x1705a7(0x12b)],_0x1a6fb3=_0x34f694[_0x1705a7(0x15d)]?_0x312050+':\x20'+_0x34f694['reason']:_0x312050;throw CliErrors[_0x1705a7(0x182)](_0x1705a7(0x127)+_0x279010+_0x1705a7(0x158)+_0x1a6fb3,'Run:\x20'+_0x34f694[_0x1705a7(0x137)]+_0x1705a7(0x146)+CLI_BIN_NAME+_0x1705a7(0x14b));}async function execute(_0x26a493){const _0x110963=a86_0x261baf;await validateUpdateFlags(_0x26a493);const _0x2a6056=getCliVersion();console[_0x110963(0x12c)](_0x110963(0x148)+_0x2a6056),console['log'](_0x110963(0x150));const _0x2af868=await resolveTargetVersion(_0x26a493);if(!_0x2af868){const _0x53d091=_0x26a493['bool'](_0x110963(0x12f))?'beta':_0x110963(0x16b),_0x912954=_0x110963(0x175)+_0x53d091+_0x110963(0x132);throw CliErrors[_0x110963(0x182)](_0x912954,'Run:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x53d091);}const _0x4e2199=[_0x2a6056,_0x2af868[_0x110963(0x130)]][_0x110963(0x14d)](_0x5e75d4=>!a86_0x3d28a4[_0x110963(0x15f)](_0x5e75d4));if(_0x4e2199){const _0x23cdbf='Version\x20comparison\x20failed:\x20'+_0x4e2199+'.';throw CliErrors[_0x110963(0x182)](_0x23cdbf,_0x110963(0x160)+LOVRABET_NPM_PACKAGE_NAME+_0x110963(0x138));}if(!shouldInstallTarget(_0x2a6056,_0x2af868)){const _0x32044d=_0x2af868[_0x110963(0x17d)]===_0x110963(0x130)?_0x110963(0x161)+_0x2af868[_0x110963(0x130)]+').':_0x110963(0x16e)+_0x2af868[_0x110963(0x130)]+').';return console[_0x110963(0x12c)](_0x32044d),repairCurrentBuiltinSkill(_0x26a493['nonInteractive']),{'ok':!![]};}console['log']('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x2a6056+_0x110963(0x181)+_0x2af868['version']);const _0x3647e3=installCliPackage(_0x2af868['version'],_0x26a493[_0x110963(0x12a)]);if(!_0x3647e3['ok']){const _0x4af2ad=_0x110963(0x135)+(_0x3647e3[_0x110963(0x17c)]||_0x110963(0x15b));throw CliErrors[_0x110963(0x182)](_0x4af2ad,'Run:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x2af868['version']);}return console[_0x110963(0x12c)]('Updated\x20to\x20v'+_0x2af868['version']+'.'),console['log']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'),verifyUpdatedBuiltinSkill(_0x2af868[_0x110963(0x130)]),{'ok':!![]};}export const updateDefinition={'service':a86_0x261baf(0x12d),'command':'run','description':a86_0x261baf(0x14a)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a86_0x261baf(0x16c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a87_0x138c(_0x3887eb,_0x47792a){_0x3887eb=_0x3887eb-0xc3;const _0x5d546f=a87_0x5d54();let _0x138c38=_0x5d546f[_0x3887eb];return _0x138c38;}const a87_0x5d4dd6=a87_0x138c;(function(_0xa07855,_0x40d3eb){const _0x24cd83=a87_0x138c,_0x5aa2ed=_0xa07855();while(!![]){try{const _0x2d6820=-parseInt(_0x24cd83(0xd1))/0x1*(parseInt(_0x24cd83(0xd0))/0x2)+-parseInt(_0x24cd83(0xe1))/0x3+-parseInt(_0x24cd83(0xd5))/0x4*(-parseInt(_0x24cd83(0xdf))/0x5)+parseInt(_0x24cd83(0xe4))/0x6*(parseInt(_0x24cd83(0xc3))/0x7)+-parseInt(_0x24cd83(0xc6))/0x8*(parseInt(_0x24cd83(0xce))/0x9)+-parseInt(_0x24cd83(0xe2))/0xa+parseInt(_0x24cd83(0xc4))/0xb*(parseInt(_0x24cd83(0xc8))/0xc);if(_0x2d6820===_0x40d3eb)break;else _0x5aa2ed['push'](_0x5aa2ed['shift']());}catch(_0x1862d7){_0x5aa2ed['push'](_0x5aa2ed['shift']());}}}(a87_0x5d54,0xf10c9));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a87_0x5d4dd6(0xd6),SUPPORTED_PROVIDERS=[a87_0x5d4dd6(0xda)];function readBindingInput(_0x3b474d){const _0x4ba86e=a87_0x5d4dd6,_0x4ecc98=_0x3b474d['str']('provider')[_0x4ba86e(0xd2)]()['toLowerCase']();if(!SUPPORTED_PROVIDERS[_0x4ba86e(0xc5)](_0x4ecc98))throw CliErrors[_0x4ba86e(0xd9)](_0x4ba86e(0xd7)+(_0x4ecc98||_0x4ba86e(0xe5))+'.',_0x4ba86e(0xd8)+SUPPORTED_PROVIDERS[_0x4ba86e(0xdb)](',\x20')+'.');const _0x4ff5db=_0x3b474d[_0x4ba86e(0xca)](_0x4ba86e(0xd4))[_0x4ba86e(0xd2)]();if(!_0x4ff5db)throw CliErrors[_0x4ba86e(0xd9)]('--account-id\x20cannot\x20be\x20empty.',_0x4ba86e(0xe0));return{'provider':_0x4ecc98,'accountId':_0x4ff5db};}function buildBindingData(_0x1c61b0,_0x2a0d50,_0x56769d){const _0x10ea4e=a87_0x5d4dd6;return{'operation':_0x10ea4e(0xdd),'selector':{'provider':_0x1c61b0,'accountId':_0x2a0d50},'before':null,'after':{'provider':_0x1c61b0,'accountId':_0x2a0d50,'bound':!![]},'dryRun':_0x56769d,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':a87_0x5d4dd6(0xcf),'command':a87_0x5d4dd6(0xdd),'description':a87_0x5d4dd6(0xde),'risk':'write','confirmationDescription':a87_0x5d4dd6(0xcb),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':a87_0x5d4dd6(0xe6),'type':'string','required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':a87_0x5d4dd6(0xcd)},{'name':a87_0x5d4dd6(0xd4),'type':a87_0x5d4dd6(0xe3),'required':!![],'description':a87_0x5d4dd6(0xc7)}],async 'validate'(_0x13f3de){readBindingInput(_0x13f3de);},async 'dryRun'(_0x597e72){const _0x37f079=a87_0x5d4dd6,{provider:_0x58628d,accountId:_0x152bda}=readBindingInput(_0x597e72);return{...buildBindingData(_0x58628d,_0x152bda,!![]),'method':_0x37f079(0xdc),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x58628d,'accountId':_0x152bda}};},async 'execute'(_0x175e84){const _0x133293=a87_0x5d4dd6,{provider:_0x53e6cd,accountId:_0x56fbb5}=readBindingInput(_0x175e84),_0x12a732=await bindExternalUserAccount(_0x53e6cd,_0x56fbb5);if(_0x12a732!==!![])throw CliErrors[_0x133293(0xc9)]('External\x20account\x20binding\x20was\x20not\x20confirmed.',_0x133293(0xd3));return{'ok':!![],'data':buildBindingData(_0x53e6cd,_0x56fbb5,![]),'message':_0x133293(0xcc)};}};function a87_0x5d54(){const _0x262292=['Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','External\x20account\x20provider','1939149ORCERn','user-account','4JYhMDx','214723GKwinp','trim','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.','account-id','4JkXxpM','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','Unsupported\x20provider:\x20','Pass\x20one\x20of:\x20','validation','dingtalk','join','POST','bind','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','8798380wotdzm','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.','5896890pOhyrI','18899560YyynkF','string','4316382pRFoYS','(empty)','provider','7srvvhN','653774pOweef','includes','64gDRrfo','External\x20account\x20ID\x20for\x20the\x20selected\x20provider','912hjkSsq','apiError','str','Binds\x20the\x20platform\x20user\x20of\x20the\x20current\x20AccessKey\x20to\x20the\x20given\x20collaboration-provider\x20account.\x20An\x20existing\x20bind\x20for\x20the\x20same\x20provider\x20may\x20be\x20replaced.'];a87_0x5d54=function(){return _0x262292;};return a87_0x5d54();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2eabae,_0x24d7cc){const _0x589d28=a88_0x276c,_0x1c6e25=_0x2eabae();while(!![]){try{const _0x1b314b=parseInt(_0x589d28(0x1a4))/0x1+-parseInt(_0x589d28(0x1a3))/0x2+parseInt(_0x589d28(0x1a0))/0x3*(-parseInt(_0x589d28(0x1a1))/0x4)+parseInt(_0x589d28(0x19c))/0x5+-parseInt(_0x589d28(0x1a5))/0x6*(parseInt(_0x589d28(0x19e))/0x7)+-parseInt(_0x589d28(0x19d))/0x8*(-parseInt(_0x589d28(0x19f))/0x9)+parseInt(_0x589d28(0x1a2))/0xa;if(_0x1b314b===_0x24d7cc)break;else _0x1c6e25['push'](_0x1c6e25['shift']());}catch(_0x5b1ccd){_0x1c6e25['push'](_0x1c6e25['shift']());}}}(a88_0x23ca,0x7fb17));import{bindUserAccount}from'../../commands/user-account/bind.js';function a88_0x23ca(){const _0x53b67a=['4220850cPWcMv','161340lRmYoB','144029pvbWic','51666RoWDAg','4508630TcNkPG','824HYAUAh','581tQawoX','19071teZrpY','9emcibf','490244qlMjOp'];a88_0x23ca=function(){return _0x53b67a;};return a88_0x23ca();}function a88_0x276c(_0x4043d0,_0x4e8402){_0x4043d0=_0x4043d0-0x19c;const _0x23ca63=a88_0x23ca();let _0x276c84=_0x23ca63[_0x4043d0];return _0x276c84;}export const userAccountDefinitions=[bindUserAccount];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x25a45e=a89_0x1a7c;(function(_0x279b93,_0x129d44){const _0xbd4533=a89_0x1a7c,_0x518cec=_0x279b93();while(!![]){try{const _0x3e9c07=-parseInt(_0xbd4533(0x19c))/0x1+-parseInt(_0xbd4533(0x17e))/0x2+-parseInt(_0xbd4533(0x19e))/0x3*(-parseInt(_0xbd4533(0x186))/0x4)+-parseInt(_0xbd4533(0x193))/0x5*(-parseInt(_0xbd4533(0x1a0))/0x6)+-parseInt(_0xbd4533(0x1ab))/0x7+-parseInt(_0xbd4533(0x17a))/0x8+-parseInt(_0xbd4533(0x1b3))/0x9*(-parseInt(_0xbd4533(0x1b4))/0xa);if(_0x3e9c07===_0x129d44)break;else _0x518cec['push'](_0x518cec['shift']());}catch(_0x1e65d8){_0x518cec['push'](_0x518cec['shift']());}}}(a89_0x4ee1,0x96d29));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':a89_0x25a45e(0x19f),'type':a89_0x25a45e(0x18a),'description':a89_0x25a45e(0x1af)},{'name':'appcode','type':a89_0x25a45e(0x18a),'description':a89_0x25a45e(0x197)},{'name':'env','type':a89_0x25a45e(0x18a),'description':a89_0x25a45e(0x1a5),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x2ce89b,_0x3bd3e6){const _0x143807=a89_0x25a45e,_0x56df8a=_0x2ce89b[_0x143807(0x19a)](_0x143807(0x19f))[_0x143807(0x1b5)](),_0x18f105=_0x2ce89b[_0x143807(0x19a)]('appcode')[_0x143807(0x1b5)](),_0x11c433=_0x2ce89b['str'](_0x143807(0x187))[_0x143807(0x1b5)](),_0x5cd4b8=resolveWorkspaceEnv(_0x11c433||_0x2ce89b[_0x143807(0x1a2)]||DEFAULT_CONFIG_VALUES[_0x143807(0x187)]);if(!_0x56df8a&&!_0x18f105)throw CliErrors[_0x143807(0x1a3)](_0x143807(0x191),_0x143807(0x1b0)+CLI_BIN_NAME+_0x143807(0x1a4)+_0x3bd3e6+_0x143807(0x1a6)+CLI_BIN_NAME+_0x143807(0x1a4)+_0x3bd3e6+_0x143807(0x185));if(_0x56df8a&&_0x18f105)throw CliErrors['validation'](_0x143807(0x189),_0x143807(0x1b1));const _0x164d4b=resolveWriteConfigPath('project'),_0x13d63d=readConfigFile(_0x164d4b);assertWorkspaceCommandState(_0x3bd3e6,_0x13d63d);const _0x54707c=_0x18f105||await resolveRemoteAppCode({'command':_0x3bd3e6,'appName':_0x56df8a,'env':_0x5cd4b8,'accessKey':_0x2ce89b[_0x143807(0x17c)]});return writeWorkspaceConfig({'command':_0x3bd3e6,'appName':_0x56df8a,'appcode':_0x54707c,'env':_0x5cd4b8,'shouldWriteEnv':!!_0x11c433,'accessKey':_0x2ce89b[_0x143807(0x17c)]},_0x164d4b,_0x13d63d),{'ok':!![],'data':{'configPath':_0x164d4b,'app':_0x56df8a||null,'appcode':_0x54707c,'env':_0x11c433?_0x5cd4b8:null,'accessKeyWritten':![],'command':'workspace\x20'+_0x3bd3e6},'message':buildWorkspaceMessage(_0x164d4b,_0x56df8a,_0x54707c,_0x11c433?_0x5cd4b8:undefined)};}async function resolveRemoteAppCode(_0x9ba5fe){const _0x30ad58=a89_0x25a45e;if(!_0x9ba5fe['accessKey'])throw CliErrors['authRequired'](_0x30ad58(0x196)+CLI_BIN_NAME+_0x30ad58(0x1a4)+_0x9ba5fe[_0x30ad58(0x18c)]+'.');const {setActiveAK:_0x48f375}=await import(_0x30ad58(0x192)),{getRemoteAppList:_0xc61ed6}=await import(_0x30ad58(0x17d));_0x48f375(_0x9ba5fe[_0x30ad58(0x17c)]);const _0x24c170=await _0xc61ed6({'env':_0x9ba5fe[_0x30ad58(0x187)],'accessKey':_0x9ba5fe['accessKey'],'noCache':![]}),_0x4261ce=findAppByName(_0x24c170[_0x30ad58(0x1ad)],_0x9ba5fe[_0x30ad58(0x198)]);if(_0x4261ce&&!isRuntimeAccessibleApp(_0x4261ce))throw runtimeInaccessibleAppError(_0x4261ce,'\x22'+_0x9ba5fe['appName']+'\x22');const _0x4fcb56=_0x4261ce?.[_0x30ad58(0x1a9)]?.[_0x30ad58(0x1b5)]();if(_0x4fcb56)return _0x4fcb56;const _0x52f7cf=_0x24c170[_0x30ad58(0x1ad)]['map'](_0x3bd37b=>_0x3bd37b[_0x30ad58(0x198)])[_0x30ad58(0x1b2)](Boolean),_0x23ae41=_0x52f7cf['length']?'Available\x20apps:\x20'+Array[_0x30ad58(0x178)](new Set(_0x52f7cf))['join'](',\x20')+'.':_0x30ad58(0x182)+CLI_BIN_NAME+_0x30ad58(0x176);throw CliErrors['validation'](_0x30ad58(0x194)+_0x9ba5fe['appName']+'\x22\x20not\x20found.',_0x23ae41);}function writeWorkspaceConfig(_0x138416,_0x57daf8,_0x46e808){const _0x6de5a6=a89_0x25a45e;_0x138416[_0x6de5a6(0x17f)]&&(_0x46e808[_0x6de5a6(0x187)]=_0x138416[_0x6de5a6(0x187)]);if(_0x138416[_0x6de5a6(0x198)]){const _0x30a582=isRecord(_0x46e808['apps'])?{..._0x46e808[_0x6de5a6(0x1aa)]}:{},_0x4045bf=isRecord(_0x30a582[_0x138416[_0x6de5a6(0x198)]])?_0x30a582[_0x138416[_0x6de5a6(0x198)]]:{};return _0x30a582[_0x138416[_0x6de5a6(0x198)]]={..._0x4045bf,'appcode':_0x138416[_0x6de5a6(0x179)]},_0x46e808[_0x6de5a6(0x1aa)]=_0x30a582,_0x46e808[_0x6de5a6(0x1a7)]=_0x138416[_0x6de5a6(0x198)],delete _0x46e808[_0x6de5a6(0x179)],delete _0x46e808[_0x6de5a6(0x19f)],writeAndReturn(_0x57daf8,_0x46e808);}return _0x46e808['appcode']=_0x138416[_0x6de5a6(0x179)],delete _0x46e808['defaultApp'],delete _0x46e808[_0x6de5a6(0x19f)],writeAndReturn(_0x57daf8,_0x46e808);}function a89_0x1a7c(_0x249d34,_0x5dac5b){_0x249d34=_0x249d34-0x176;const _0x4ee1d7=a89_0x4ee1();let _0x1a7cea=_0x4ee1d7[_0x249d34];return _0x1a7cea;}function writeAndReturn(_0x51a4fe,_0x2064ff){return writeConfigFile(_0x51a4fe,_0x2064ff),_0x51a4fe;}function resolveWorkspaceEnv(_0x33bde7){const _0x1030a3=a89_0x25a45e;if(RUNTIME_ENV_VALUES[_0x1030a3(0x18d)](_0x33bde7))return _0x33bde7;throw CliErrors[_0x1030a3(0x1a3)](_0x1030a3(0x18e)+_0x33bde7+_0x1030a3(0x177)+RUNTIME_ENV_VALUES[_0x1030a3(0x190)](',\x20'));}function buildWorkspaceMessage(_0x598112,_0x2bd987,_0x5bce94,_0x32c49e){const _0x2f151a=a89_0x25a45e,_0x2257bb=_0x2bd987?_0x2bd987+'\x20('+_0x5bce94+')':_0x5bce94,_0x310ccb=_0x32c49e?_0x2f151a(0x184)+_0x32c49e:'';return _0x2f151a(0x17b)+_0x598112+'\x0aDefault\x20app:\x20'+_0x2257bb+_0x310ccb+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0x20407e){const _0xf506df=a89_0x25a45e;return typeof _0x20407e===_0xf506df(0x183)&&_0x20407e!==null&&!Array['isArray'](_0x20407e);}function hasWorkspaceAppBinding(_0x16d58d){const _0x442488=a89_0x25a45e;if(typeof _0x16d58d[_0x442488(0x179)]==='string'&&_0x16d58d['appcode'][_0x442488(0x1b5)]()[_0x442488(0x19b)]>0x0)return!![];if(typeof _0x16d58d[_0x442488(0x1a7)]!=='string'||!_0x16d58d['defaultApp'][_0x442488(0x1b5)]())return![];if(!isRecord(_0x16d58d[_0x442488(0x1aa)]))return![];const _0x4df7e3=_0x16d58d[_0x442488(0x1aa)][_0x16d58d[_0x442488(0x1a7)][_0x442488(0x1b5)]()];return isRecord(_0x4df7e3)&&typeof _0x4df7e3[_0x442488(0x179)]==='string'&&_0x4df7e3['appcode'][_0x442488(0x1b5)]()[_0x442488(0x19b)]>0x0;}function assertWorkspaceCommandState(_0x1bc316,_0x5a9100){const _0xae8ce8=a89_0x25a45e,_0x273b8d=hasWorkspaceAppBinding(_0x5a9100);if(_0x1bc316===_0xae8ce8(0x18b)&&_0x273b8d)throw CliErrors[_0xae8ce8(0x1a3)](_0xae8ce8(0x199),'Use\x20`'+CLI_BIN_NAME+_0xae8ce8(0x19d)+CLI_BIN_NAME+_0xae8ce8(0x18f));if(_0x1bc316===_0xae8ce8(0x1a1)&&!_0x273b8d)throw CliErrors[_0xae8ce8(0x1a3)](_0xae8ce8(0x1ac),_0xae8ce8(0x182)+CLI_BIN_NAME+_0xae8ce8(0x195)+CLI_BIN_NAME+_0xae8ce8(0x1a8));}function makeWorkspaceCommand(_0x348a20){const _0x13d89c=a89_0x25a45e;return{'service':_0x13d89c(0x180),'command':_0x348a20,'description':_0x348a20===_0x13d89c(0x18b)?'Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet':_0x13d89c(0x188),'risk':'write','confirmationDescription':_0x348a20===_0x13d89c(0x18b)?_0x13d89c(0x1ae):_0x13d89c(0x181),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0xb38d8f){return executeWorkspaceUse(_0xb38d8f,_0x348a20);}};}function a89_0x4ee1(){const _0x20b7aa=['length','142707cMbxvC','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','885JKKHff','app','6372CCaaKN','use','envName','validation','\x20workspace\x20','Target\x20environment','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','defaultApp','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','appCode','apps','6158663Xcvhmj','Workspace\x20app\x20context\x20is\x20not\x20initialized.','items','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.','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','Usage:\x20','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','filter','2593278hkzrom','20iAaBNH','trim','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','\x22.\x20Allowed:\x20','from','appcode','7797248nxHLNF','Workspace\x20configured.\x0aConfig\x20file:\x20','accessKey','../../commands/app/remote-source.js','201248gjWvxZ','shouldWriteEnv','workspace','Updates\x20the\x20app\x20binding\x20already\x20present\x20in\x20the\x20current\x20working\x20directory\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','Run\x20`','object','\x0aEnv:\x20','\x20--appcode\x20<code>\x20[--env\x20daily]','15212mdQMeQ','env','Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','Conflicting\x20workspace\x20app\x20selectors.','string','init','command','includes','Invalid\x20env\x20\x22','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','join','Missing\x20workspace\x20app\x20selector.','../../core/api-client.js','4790ANnmkp','App\x20\x22','\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','App\x20code\x20to\x20bind\x20directly','appName','Workspace\x20app\x20context\x20is\x20already\x20initialized.','str'];a89_0x4ee1=function(){return _0x20b7aa;};return a89_0x4ee1();}export const workspaceDefinitions=[makeWorkspaceCommand(a89_0x25a45e(0x18b)),makeWorkspaceCommand('use')];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x2a5660=a90_0x171b;(function(_0x59b563,_0x366921){const _0x23faf2=a90_0x171b,_0x372fdf=_0x59b563();while(!![]){try{const _0x5b1bf4=parseInt(_0x23faf2(0x199))/0x1*(parseInt(_0x23faf2(0x1a8))/0x2)+-parseInt(_0x23faf2(0x181))/0x3*(parseInt(_0x23faf2(0x1b5))/0x4)+-parseInt(_0x23faf2(0x1b6))/0x5*(parseInt(_0x23faf2(0x17f))/0x6)+-parseInt(_0x23faf2(0x186))/0x7*(-parseInt(_0x23faf2(0x191))/0x8)+-parseInt(_0x23faf2(0x17a))/0x9+-parseInt(_0x23faf2(0x1a2))/0xa*(-parseInt(_0x23faf2(0x19f))/0xb)+-parseInt(_0x23faf2(0x1a9))/0xc*(-parseInt(_0x23faf2(0x1af))/0xd);if(_0x5b1bf4===_0x366921)break;else _0x372fdf['push'](_0x372fdf['shift']());}catch(_0x57c5df){_0x372fdf['push'](_0x372fdf['shift']());}}}(a90_0x1956,0xe52ce));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=['userDomain',a90_0x2a5660(0x1b0),a90_0x2a5660(0x1b2),'skillDomain',a90_0x2a5660(0x19a)];const DOMAIN_FLAGS={'userDomain':a90_0x2a5660(0x1a6),'apiDomain':a90_0x2a5660(0x1bb),'runtimeDomain':'runtime-domain','skillDomain':'skill-domain','kbServiceDomain':a90_0x2a5660(0x188)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a90_0x2a5660(0x19d),a90_0x2a5660(0x187),a90_0x2a5660(0x190),a90_0x2a5660(0x19b),a90_0x2a5660(0x196)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':'userDomain','apiDomain':a90_0x2a5660(0x1b0),'runtimeDomain':'runtimeDomain','skillDomain':'skillDomain','kbServiceDomain':'kbServiceDomain'},ROUTING_CONSUMER=a90_0x2a5660(0x18c);function a90_0x1956(){const _0x4f0f87=['Allowed\x20fields:\x20','1067833diwRMv','apiDomain',':\x20\x22','runtimeDomain','legacy','parse','1355636TlGDja','14540brbFKb','search','Invalid\x20domain\x20config\x20JSON:\x20','\x22\x20and\x20kind\x20\x22',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','api-domain','9662814vKlrEn','includes','Enterprise\x20','pathname','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','1266SKYWvn','join','6HIullO','Unsupported\x20domain\x20config\x20field(s):\x20','trim','domain-config','https:','63BzTcMr','agentDomain','kb-service-domain','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','\x20and\x20has\x20no\x20default.','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','lovrabet-cli','filter','object','origin','platformDomain','1513912InsGzg','length','string','cwd','enterprise-v1','kbDomain','protocol','hash','2DiDGbc','kbServiceDomain','skillHubDomain','default','host',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','88VjDwNy','Invalid\x20','str','1399280GkdjWN','Domain\x20config\x20file\x20not\x20found:\x20','password','domains','user-domain','isArray','399038JuxMBs','12VUrJmt','keys','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','validation'];a90_0x1956=function(){return _0x4f0f87;};return a90_0x1956();}export function normalizeDomainOrigin(_0x316ad0,_0x5b2417){const _0x5186ec=a90_0x2a5660;if(typeof _0x5b2417!=='string'||!_0x5b2417[_0x5186ec(0x183)]())throw CliErrors[_0x5186ec(0x1ad)]('Invalid\x20'+_0x316ad0+_0x5186ec(0x1ba));let _0x34a371;try{_0x34a371=new URL(_0x5b2417[_0x5186ec(0x183)]());}catch{throw CliErrors[_0x5186ec(0x1ad)](_0x5186ec(0x1a0)+_0x316ad0+_0x5186ec(0x1b1)+_0x5b2417+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x34a371[_0x5186ec(0x197)]!==_0x5186ec(0x185)||_0x34a371['username']||_0x34a371[_0x5186ec(0x1a4)]||_0x34a371['pathname']!=='/'&&_0x34a371[_0x5186ec(0x17d)]!==''||_0x34a371[_0x5186ec(0x1b7)]||_0x34a371[_0x5186ec(0x198)])throw CliErrors[_0x5186ec(0x1ad)](_0x5186ec(0x1a0)+_0x316ad0+':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.',_0x5186ec(0x17e));return _0x34a371[_0x5186ec(0x18f)];}function a90_0x171b(_0x1d9b1d,_0xfd7fc8){_0x1d9b1d=_0x1d9b1d-0x17a;const _0x19569a=a90_0x1956();let _0x171ba6=_0x19569a[_0x1d9b1d];return _0x171ba6;}export function normalizeRoutingDomainValue(_0x49145a,_0x51c31e){const _0x57ffc9=a90_0x2a5660;if(typeof _0x51c31e===_0x57ffc9(0x193))return normalizeDomainOrigin(_0x49145a,_0x51c31e);if(!_0x51c31e||typeof _0x51c31e!==_0x57ffc9(0x18e)||Array[_0x57ffc9(0x1a7)](_0x51c31e))throw CliErrors['validation'](_0x57ffc9(0x1a0)+_0x49145a+_0x57ffc9(0x19e));const _0x47ace1=_0x51c31e,_0x3a60e8=_0x47ace1[ROUTING_CONSUMER]??_0x47ace1[_0x57ffc9(0x19c)];if(_0x3a60e8===undefined)throw CliErrors['validation'](_0x57ffc9(0x17c)+_0x49145a+'\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20'+ROUTING_CONSUMER+_0x57ffc9(0x18a));return normalizeDomainOrigin(_0x49145a,_0x3a60e8);}export function resolveEnterpriseRoutingConfig(_0x14c5eb){const _0x507736=a90_0x2a5660;if(_0x14c5eb===undefined)return undefined;if(!_0x14c5eb||typeof _0x14c5eb!==_0x507736(0x18e)||Array[_0x507736(0x1a7)](_0x14c5eb))throw CliErrors['validation']('Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.');return parseEnterpriseRoutingManifest(_0x14c5eb)['domains'];}export function readDomainConfigInput(_0x4a9b28){const _0x5dd75d=a90_0x2a5660,_0x4f67d6=isAbsolute(_0x4a9b28)?_0x4a9b28:resolve(process[_0x5dd75d(0x194)](),_0x4a9b28);if(!existsSync(_0x4f67d6))throw CliErrors[_0x5dd75d(0x1ad)](_0x5dd75d(0x1a3)+_0x4f67d6);let _0x4eb135;try{_0x4eb135=JSON[_0x5dd75d(0x1b4)](readFileSync(_0x4f67d6,'utf8'));}catch{throw CliErrors[_0x5dd75d(0x1ad)](_0x5dd75d(0x1b8)+_0x4f67d6);}if(!_0x4eb135||typeof _0x4eb135!=='object'||Array[_0x5dd75d(0x1a7)](_0x4eb135))throw CliErrors[_0x5dd75d(0x1ad)]('Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.');const _0x36cb59=_0x4eb135;if(_0x5dd75d(0x197)in _0x36cb59)return parseEnterpriseRoutingManifest(_0x36cb59);const _0x5a3b16=Object[_0x5dd75d(0x1aa)](_0x36cb59)['filter'](_0x1d9cce=>!DOMAIN_CONFIG_FIELDS[_0x5dd75d(0x17b)](_0x1d9cce));if(_0x5a3b16[_0x5dd75d(0x192)]>0x0)throw CliErrors[_0x5dd75d(0x1ad)](_0x5dd75d(0x182)+_0x5a3b16[_0x5dd75d(0x180)](',\x20'),_0x5dd75d(0x1ae)+DOMAIN_CONFIG_FIELDS[_0x5dd75d(0x180)](',\x20'));const _0xbc1f5c={};for(const _0x2e72ec of DOMAIN_CONFIG_FIELDS){_0x36cb59[_0x2e72ec]!==undefined&&(_0xbc1f5c[_0x2e72ec]=normalizeDomainOrigin(_0x2e72ec,_0x36cb59[_0x2e72ec]));}if(Object[_0x5dd75d(0x1aa)](_0xbc1f5c)['length']===0x0)throw CliErrors[_0x5dd75d(0x1ad)]('Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.');return{'mode':_0x5dd75d(0x1b3),'domains':_0xbc1f5c};}export function readDomainConfig(_0x593290){const _0x218c59=a90_0x2a5660;return readDomainConfigInput(_0x593290)[_0x218c59(0x1a5)];}export function resolveDomainConfigInput(_0x1fe6c3){const _0x2ee9bc=a90_0x2a5660,_0x3a9b52=(_0x1fe6c3[_0x2ee9bc(0x1a1)](_0x2ee9bc(0x184))||'')[_0x2ee9bc(0x183)](),_0x350b83=_0x3a9b52?readDomainConfigInput(_0x3a9b52):{'mode':_0x2ee9bc(0x1b3),'domains':{}},_0x31384e=DOMAIN_CONFIG_FIELDS[_0x2ee9bc(0x18d)](_0x39aa5a=>Boolean((_0x1fe6c3[_0x2ee9bc(0x1a1)](DOMAIN_FLAGS[_0x39aa5a])||'')['trim']()));if(_0x350b83['mode']===_0x2ee9bc(0x195)&&_0x31384e['length']>0x0)throw CliErrors['validation'](_0x2ee9bc(0x1ab),_0x2ee9bc(0x189));for(const _0x5edc15 of DOMAIN_CONFIG_FIELDS){const _0xf8f97=(_0x1fe6c3[_0x2ee9bc(0x1a1)](DOMAIN_FLAGS[_0x5edc15])||'')['trim']();if(_0xf8f97)_0x350b83[_0x2ee9bc(0x1a5)][_0x5edc15]=normalizeDomainOrigin(_0x5edc15,_0xf8f97);}return _0x350b83;}export function resolveDomainFlags(_0x3dbdf7){const _0x2af1cd=a90_0x2a5660;return resolveDomainConfigInput(_0x3dbdf7)[_0x2af1cd(0x1a5)];}export function parseEnterpriseRoutingManifest(_0x3190c0){const _0x4458f5=a90_0x2a5660;if(_0x3190c0['protocol']!==ENTERPRISE_ROUTING_PROTOCOL||_0x3190c0['kind']!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x4458f5(0x1ad)](_0x4458f5(0x18b)+ENTERPRISE_ROUTING_PROTOCOL+_0x4458f5(0x1b9)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x3190c0[_0x4458f5(0x1a5)]||typeof _0x3190c0['domains']!==_0x4458f5(0x18e)||Array[_0x4458f5(0x1a7)](_0x3190c0[_0x4458f5(0x1a5)]))throw CliErrors[_0x4458f5(0x1ad)]('Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.');const _0x32f21a=_0x3190c0['domains'],_0x3608d2=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS['filter'](_0x42282d=>_0x32f21a[_0x42282d]===undefined);if(_0x3608d2['length']>0x0)throw CliErrors[_0x4458f5(0x1ad)](_0x4458f5(0x1ac)+_0x3608d2[_0x4458f5(0x180)](',\x20'));const _0x188148={},_0x40d9a5={};for(const _0x562784 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x147fb5=_0x32f21a[_0x562784];if(_0x147fb5===undefined)continue;const _0x145a4c=normalizeRoutingDomainValue(_0x562784,_0x147fb5);_0x188148[_0x562784]=_0x145a4c;const _0x2a2847=ENTERPRISE_TO_LOCAL_FIELD[_0x562784];_0x2a2847&&(_0x40d9a5[_0x2a2847]=_0x145a4c);}return{'mode':_0x4458f5(0x195),'domains':_0x40d9a5,'manifestDomains':_0x188148};}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x32d201=a91_0x2c26;(function(_0x49d4af,_0x363ba1){const _0x339ec5=a91_0x2c26,_0x41c80b=_0x49d4af();while(!![]){try{const _0x355e57=-parseInt(_0x339ec5(0x1e1))/0x1+parseInt(_0x339ec5(0x1de))/0x2*(-parseInt(_0x339ec5(0x1f9))/0x3)+parseInt(_0x339ec5(0x200))/0x4*(parseInt(_0x339ec5(0x1e4))/0x5)+parseInt(_0x339ec5(0x1f2))/0x6+parseInt(_0x339ec5(0x1ec))/0x7+-parseInt(_0x339ec5(0x1fd))/0x8*(parseInt(_0x339ec5(0x1f5))/0x9)+parseInt(_0x339ec5(0x1e6))/0xa;if(_0x355e57===_0x363ba1)break;else _0x41c80b['push'](_0x41c80b['shift']());}catch(_0xb21d38){_0x41c80b['push'](_0x41c80b['shift']());}}}(a91_0x6d0a,0xf13d5));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':a91_0x32d201(0x1eb),'topLevel':!![]},'region':{'description':a91_0x32d201(0x1d9),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':ENABLED_LOVRABET_REGION_VALUES,'defaultValue':DEFAULT_LOVRABET_REGION,'importable':!![]},'env':{'description':a91_0x32d201(0x1ea),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a91_0x32d201(0x1e9)],'importable':!![]},'format':{'description':a91_0x32d201(0x1fb),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a91_0x32d201(0x1e2)],'importable':!![]},'pageSize':{'description':a91_0x32d201(0x1d8),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a91_0x32d201(0x1ed),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a91_0x32d201(0x1f8),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a91_0x32d201(0x1f4),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillDomain':{'description':a91_0x32d201(0x1ee),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'kbServiceDomain':{'description':'Override\x20KB\x20Service\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':'Access\x20key\x20(client-ak\x20auth)','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a91_0x32d201(0x1f3),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['riskLevel'],'importable':!![]},'nativeToolAvailable':{'description':a91_0x32d201(0x1e0),'topLevel':!![],'defaultValue':![]},'locale':{'description':a91_0x32d201(0x1db),'topLevel':!![],'cliSettableTopLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a91_0x32d201(0x1fa)],'importable':!![]}};function a91_0x2c26(_0x3d5c34,_0x1534a3){_0x3d5c34=_0x3d5c34-0x1d8;const _0x6d0a42=a91_0x6d0a();let _0x2c265f=_0x6d0a42[_0x3d5c34];return _0x2c265f;}export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)[a91_0x32d201(0x1fc)](([,_0x4f9d15])=>_0x4f9d15[a91_0x32d201(0x1e8)])[a91_0x32d201(0x1e3)](([_0xdc802e])=>_0xdc802e));export const CLI_PROTECTED_CONFIG_KEYS=new Set([a91_0x32d201(0x1da),a91_0x32d201(0x1e7)]);export const CONFIG_ENUM_VALUES=Object[a91_0x32d201(0x1f7)](Object[a91_0x32d201(0x1df)](CONFIG_FIELD_SCHEMAS)[a91_0x32d201(0x1fc)](([,_0x1e0ebb])=>_0x1e0ebb[a91_0x32d201(0x1f0)])[a91_0x32d201(0x1e3)](([_0x534079,_0x346256])=>[_0x534079,[..._0x346256['enumValues']||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a91_0x32d201(0x1df)](CONFIG_FIELD_SCHEMAS)[a91_0x32d201(0x1fc)](([,_0x38a99a])=>_0x38a99a[a91_0x32d201(0x202)])[a91_0x32d201(0x1e3)](([_0x3b41db])=>_0x3b41db);export function getConfigFieldSchema(_0x238c82){return CONFIG_FIELD_SCHEMAS[_0x238c82];}export function getConfigEnumValues(_0x4d5751){const _0x410fb0=a91_0x32d201;return getConfigFieldSchema(_0x4d5751)?.[_0x410fb0(0x1f0)];}export function getConfigDefaultValue(_0x24b46a){const _0x8b2d7=a91_0x32d201;return getConfigFieldSchema(_0x24b46a)?.[_0x8b2d7(0x1ef)];}export function isTopLevelConfigKey(_0x156f53){return TOP_LEVEL_CONFIG_KEYS['has'](_0x156f53);}export function isCliProtectedConfigKey(_0x27342d){const _0x2a4a8=a91_0x32d201;return CLI_PROTECTED_CONFIG_KEYS[_0x2a4a8(0x1f1)](_0x27342d);}const LOCALE_MAP={'zh':a91_0x32d201(0x1ff),'zh-cn':a91_0x32d201(0x1ff),'zh_cn':a91_0x32d201(0x1ff),'en':a91_0x32d201(0x1e5),'en-us':a91_0x32d201(0x1e5),'en_us':a91_0x32d201(0x1e5)};export function normalizeLocale(_0x559616){const _0x4e98c9=a91_0x32d201;if(!_0x559616)return null;return LOCALE_MAP[_0x559616[_0x4e98c9(0x201)]()]??null;}export function isLegacyCompatConfigKey(_0x29d56f){const _0x5a0f17=a91_0x32d201;return getConfigFieldSchema(_0x29d56f)?.[_0x5a0f17(0x1fe)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x37eb87){const _0x58492e=a91_0x32d201;return[..._0x37eb87][_0x58492e(0x1dd)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x231feb=a91_0x32d201;return _0x231feb(0x1f6)+getTopLevelConfigKeySummary()+_0x231feb(0x1dc);}function a91_0x6d0a(){const _0x6cadcf=['20ZaXFko','toLowerCase','importable','Default\x20page\x20size','Lovrabet\x20region','riskLevel','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)',';\x20local\x20alias:\x20apps.<alias>.appcode','join','117516haHbzp','entries','Native\x20Lovrabet\x20tool\x20availability\x20in\x20the\x20current\x20execution\x20host','1414039BWTAdt','format','map','267690gmNTAi','en-US','17877110qtFFRO','nativeToolAvailable','cliSettableTopLevel','env','Target\x20environment','Versioned\x20enterprise\x20routing\x20manifest','8504615yDWOxD','Override\x20API\x20domain','Override\x20SkillHub\x20domain','defaultValue','enumValues','has','6798540IhLcyi','Risk\x20level','Override\x20runtime\x20domain','360nCxrLO','Config\x20key.\x20Top-level:\x20','fromEntries','Override\x20user\x20domain','60aGIeBX','locale','Default\x20output\x20format','filter','165224VnAkIg','legacyCompatOnly','zh-CN'];a91_0x6d0a=function(){return _0x6cadcf;};return a91_0x6d0a();}export function buildAppProfileListFields(_0x4e1afb){return{'env':_0x4e1afb,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x31ec52=a92_0x2616;(function(_0xd64b49,_0x2172e5){const _0x1daa17=a92_0x2616,_0x138130=_0xd64b49();while(!![]){try{const _0x428e0a=-parseInt(_0x1daa17(0x8b))/0x1+-parseInt(_0x1daa17(0x86))/0x2+parseInt(_0x1daa17(0x88))/0x3+-parseInt(_0x1daa17(0x8a))/0x4+parseInt(_0x1daa17(0x87))/0x5+parseInt(_0x1daa17(0x89))/0x6*(-parseInt(_0x1daa17(0x84))/0x7)+-parseInt(_0x1daa17(0x85))/0x8*(-parseInt(_0x1daa17(0x83))/0x9);if(_0x428e0a===_0x2172e5)break;else _0x138130['push'](_0x138130['shift']());}catch(_0x4face3){_0x138130['push'](_0x138130['shift']());}}}(a92_0x43e1,0x599e7));export const APP_PUBLISH_STATUS={'Published':'PUBLISHED','Unpublished':a92_0x31ec52(0x8c)};function a92_0x43e1(){const _0xcccbfb=['584679YIlaid','UNPUBLISH','Published','3552651hCkiKJ','77CKvXaV','40jzldbf','1220666dZpwRE','600475EqnqhU','770340guCGJq','141306aVYXBI','2117672FXxshr'];a92_0x43e1=function(){return _0xcccbfb;};return a92_0x43e1();}function a92_0x2616(_0x388648,_0x65c08b){_0x388648=_0x388648-0x82;const _0x43e1f2=a92_0x43e1();let _0x2616d9=_0x43e1f2[_0x388648];return _0x2616d9;}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a92_0x31ec52(0x82)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a93_0x47fd6f=a93_0x2749;(function(_0x370e9f,_0x8fd421){const _0x4ce1f7=a93_0x2749,_0xa5e85=_0x370e9f();while(!![]){try{const _0xb4ade6=parseInt(_0x4ce1f7(0x13f))/0x1+-parseInt(_0x4ce1f7(0x146))/0x2+-parseInt(_0x4ce1f7(0x144))/0x3*(-parseInt(_0x4ce1f7(0x141))/0x4)+-parseInt(_0x4ce1f7(0x142))/0x5+-parseInt(_0x4ce1f7(0x143))/0x6+-parseInt(_0x4ce1f7(0x13e))/0x7+parseInt(_0x4ce1f7(0x148))/0x8*(parseInt(_0x4ce1f7(0x145))/0x9);if(_0xb4ade6===_0x8fd421)break;else _0xa5e85['push'](_0xa5e85['shift']());}catch(_0x379dee){_0xa5e85['push'](_0xa5e85['shift']());}}}(a93_0x3da1,0xda346));function a93_0x2749(_0xeb2971,_0x2ddea6){_0xeb2971=_0xeb2971-0x13e;const _0x3da11c=a93_0x3da1();let _0x27498d=_0x3da11c[_0xeb2971];return _0x27498d;}export const AUTH_MODE={'ClientAk':a93_0x47fd6f(0x140)};export function isAuthMode(_0x2f9f87){const _0x1e25ad=a93_0x47fd6f;return _0x2f9f87===AUTH_MODE[_0x1e25ad(0x147)];}function a93_0x3da1(){const _0x344377=['9PThYzn','1401304auWplF','ClientAk','19235768NSfKbl','10400845rPDAlx','1717553zvZRhw','client-ak','12oooVUR','7479895hnjAoZ','103596zfUhhy','471474CgYIgg'];a93_0x3da1=function(){return _0x344377;};return a93_0x3da1();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x4caa3b=a94_0x258b;(function(_0xfc510a,_0x2efe10){const _0x105e62=a94_0x258b,_0x148ded=_0xfc510a();while(!![]){try{const _0x51e4c0=-parseInt(_0x105e62(0x19a))/0x1*(-parseInt(_0x105e62(0x1a0))/0x2)+-parseInt(_0x105e62(0x1ab))/0x3*(parseInt(_0x105e62(0x189))/0x4)+-parseInt(_0x105e62(0x17d))/0x5*(-parseInt(_0x105e62(0x19d))/0x6)+parseInt(_0x105e62(0x190))/0x7+parseInt(_0x105e62(0x183))/0x8+-parseInt(_0x105e62(0x196))/0x9+parseInt(_0x105e62(0x193))/0xa;if(_0x51e4c0===_0x2efe10)break;else _0x148ded['push'](_0x148ded['shift']());}catch(_0x3303ca){_0x148ded['push'](_0x148ded['shift']());}}}(a94_0x4abe,0x675ce));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a94_0x4caa3b(0x1a3)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG['cliDisplayName'];function a94_0x258b(_0x5cbfba,_0x1fca3f){_0x5cbfba=_0x5cbfba-0x17c;const _0x4abe39=a94_0x4abe();let _0x258b4c=_0x4abe39[_0x5cbfba];return _0x258b4c;}export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a94_0x4caa3b(0x1aa),'meowKey':a94_0x4caa3b(0x1aa),'type':a94_0x4caa3b(0x17c),'description':a94_0x4caa3b(0x1a2),'hint':a94_0x4caa3b(0x1a7)},{'name':'app','meowKey':a94_0x4caa3b(0x1a8),'type':a94_0x4caa3b(0x17c),'description':a94_0x4caa3b(0x184),'hint':a94_0x4caa3b(0x199)},{'name':a94_0x4caa3b(0x180),'meowKey':a94_0x4caa3b(0x180),'type':a94_0x4caa3b(0x17c),'description':a94_0x4caa3b(0x18d),'hint':a94_0x4caa3b(0x187)},{'name':a94_0x4caa3b(0x182),'meowKey':a94_0x4caa3b(0x182),'type':a94_0x4caa3b(0x17c),'description':a94_0x4caa3b(0x1ac),'hint':a94_0x4caa3b(0x195)},{'name':'jq','meowKey':'jq','type':a94_0x4caa3b(0x17c),'description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','hint':a94_0x4caa3b(0x194)},{'name':a94_0x4caa3b(0x1a5),'meowKey':a94_0x4caa3b(0x1a1),'type':a94_0x4caa3b(0x18f),'description':a94_0x4caa3b(0x191)},{'name':a94_0x4caa3b(0x19f),'meowKey':a94_0x4caa3b(0x19f),'type':a94_0x4caa3b(0x18f),'description':a94_0x4caa3b(0x18b)},{'name':'non-interactive','meowKey':a94_0x4caa3b(0x18a),'type':'boolean','description':a94_0x4caa3b(0x181)},{'name':a94_0x4caa3b(0x18e),'meowKey':a94_0x4caa3b(0x18e),'type':a94_0x4caa3b(0x18f),'description':a94_0x4caa3b(0x19e)},{'name':'ci','meowKey':'ci','type':a94_0x4caa3b(0x18f),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':'help','meowKey':'help','type':'boolean','description':'Show\x20help'},{'name':'id','meowKey':'id','type':a94_0x4caa3b(0x17c),'description':a94_0x4caa3b(0x198),'hidden':!![]},{'name':a94_0x4caa3b(0x17f),'meowKey':'name','type':'string','description':a94_0x4caa3b(0x1a4),'hidden':!![]},{'name':a94_0x4caa3b(0x197),'meowKey':'sqlcode','type':a94_0x4caa3b(0x17c),'description':'SQL\x20query\x20code','hidden':!![]},{'name':a94_0x4caa3b(0x18c),'meowKey':a94_0x4caa3b(0x18c),'type':a94_0x4caa3b(0x17c),'description':a94_0x4caa3b(0x186),'hidden':!![]},{'name':a94_0x4caa3b(0x1a6),'meowKey':a94_0x4caa3b(0x1a6),'type':a94_0x4caa3b(0x18f),'description':a94_0x4caa3b(0x1a9),'hidden':!![]},{'name':a94_0x4caa3b(0x17e),'meowKey':a94_0x4caa3b(0x17e),'type':a94_0x4caa3b(0x18f),'description':a94_0x4caa3b(0x188),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a94_0x4caa3b(0x1aa),a94_0x4caa3b(0x1a8),'env',a94_0x4caa3b(0x182),'jq',a94_0x4caa3b(0x1a5),a94_0x4caa3b(0x19f),a94_0x4caa3b(0x19c),'ci']);export function buildMeowFlags(){const _0x45ecac=a94_0x4caa3b;return Object[_0x45ecac(0x185)](GLOBAL_FLAGS[_0x45ecac(0x19b)](_0x334d9a=>[_0x334d9a['meowKey'],{'type':_0x334d9a[_0x45ecac(0x192)]}]));}function a94_0x4abe(){const _0x2e2699=['Preview\x20operation\x20without\x20executing','type','11296650epYMOt','<expr>','json\x20|\x20pretty\x20|\x20compress','6094890wpyQcY','sqlcode','Record\x20ID','<name>','1bpnxiv','map','non-interactive','24LggKSV','Use\x20global\x20config\x20scope','yes','21194DErLLa','dryRun','Override\x20appcode','cliBinName','Name\x20filter','dry-run','verbose','<code>','app','Verbose\x20output','appcode','6CrKesY','Output\x20format','string','69865lkCoWE','clear','name','env','Force\x20non-interactive\x20mode\x20(CI)','format','1990216IruCRm','Select\x20app\x20profile\x20by\x20name','fromEntries','JSON\x20params\x20for\x20execute\x20commands','production\x20|\x20development\x20|\x20daily','Clear\x20output','1220452WqjYAx','nonInteractive','Skip\x20confirmation\x20for\x20high-risk\x20writes','params','Environment','global','boolean','1861153wGwArQ'];a94_0x4abe=function(){return _0x2e2699;};return a94_0x4abe();}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x164eb9=a95_0x152d;(function(_0xbb4998,_0x374285){const _0x4eaa39=a95_0x152d,_0x5d47df=_0xbb4998();while(!![]){try{const _0x1adf80=parseInt(_0x4eaa39(0x1a6))/0x1+-parseInt(_0x4eaa39(0x1b0))/0x2+parseInt(_0x4eaa39(0x1b3))/0x3+-parseInt(_0x4eaa39(0x1b4))/0x4*(parseInt(_0x4eaa39(0x1ad))/0x5)+parseInt(_0x4eaa39(0x1ab))/0x6+parseInt(_0x4eaa39(0x1b2))/0x7*(parseInt(_0x4eaa39(0x1b1))/0x8)+parseInt(_0x4eaa39(0x1af))/0x9*(-parseInt(_0x4eaa39(0x1ae))/0xa);if(_0x1adf80===_0x374285)break;else _0x5d47df['push'](_0x5d47df['shift']());}catch(_0x3afe4d){_0x5d47df['push'](_0x5d47df['shift']());}}}(a95_0x4d3e,0x8c822));export const DEFAULT_APP_PROFILE_NAME=a95_0x164eb9(0x1a8);function a95_0x152d(_0x2843cc,_0x15a00c){_0x2843cc=_0x2843cc-0x1a6;const _0x4d3e5e=a95_0x4d3e();let _0x152d05=_0x4d3e5e[_0x2843cc];return _0x152d05;}function a95_0x4d3e(){const _0x33cfe5=['490326PLtfsc','production','862705FDFzsV','46590yyZHWz','108okVqcA','336504mIdKjg','9592ZZlFNK','2667AHCwqG','497943csMTqT','12MWRzWc','612784rgFALf','en-US','main','write','compress'];a95_0x4d3e=function(){return _0x33cfe5;};return a95_0x4d3e();}export const DEFAULT_CONFIG_VALUES={'env':a95_0x164eb9(0x1ac),'format':a95_0x164eb9(0x1aa),'locale':a95_0x164eb9(0x1a7),'riskLevel':a95_0x164eb9(0x1a9)};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x48ffc5=a96_0x175a;(function(_0x32c5d8,_0x4fd00e){const _0x483809=a96_0x175a,_0x3ddf4f=_0x32c5d8();while(!![]){try{const _0xfd281c=-parseInt(_0x483809(0x169))/0x1*(parseInt(_0x483809(0x15d))/0x2)+parseInt(_0x483809(0x168))/0x3*(-parseInt(_0x483809(0x164))/0x4)+parseInt(_0x483809(0x16a))/0x5*(-parseInt(_0x483809(0x161))/0x6)+parseInt(_0x483809(0x163))/0x7+parseInt(_0x483809(0x167))/0x8*(parseInt(_0x483809(0x162))/0x9)+-parseInt(_0x483809(0x166))/0xa+parseInt(_0x483809(0x15e))/0xb*(parseInt(_0x483809(0x165))/0xc);if(_0xfd281c===_0x4fd00e)break;else _0x3ddf4f['push'](_0x3ddf4f['shift']());}catch(_0x4a121e){_0x3ddf4f['push'](_0x3ddf4f['shift']());}}}(a96_0xedcf,0x9cdeb));import{PRODUCT_CONFIG}from'../constant/product.js';function a96_0xedcf(){const _0x5b947a=['89116ibxITc','355yBwJRx','cliCdnBaseUrl','npmRegistryBaseUrl','8mlcIQf','259237bQWEaP','/dist/lovrabet-cli/config/index.json','npmPackageName','71124hwDgeu','36ZYZtfe','7009499oVUDsM','16WhatId','660OcmFYF','10920890eRSmFG','1346776GrHqeX','28653HWVudj'];a96_0xedcf=function(){return _0x5b947a;};return a96_0xedcf();}export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a96_0x48ffc5(0x160)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a96_0x48ffc5(0x16c)];export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG[a96_0x48ffc5(0x16b)];function a96_0x175a(_0x1f759e,_0x2d3103){_0x1f759e=_0x1f759e-0x15d;const _0xedcfc8=a96_0xedcf();let _0x175a22=_0xedcfc8[_0x1f759e];return _0x175a22;}export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a96_0x48ffc5(0x15f);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a97_0x399126=a97_0x45a5;function a97_0x45a5(_0x10b685,_0x259c5){_0x10b685=_0x10b685-0x15f;const _0x4d08d0=a97_0x4d08();let _0x45a592=_0x4d08d0[_0x10b685];return _0x45a592;}(function(_0x66a3bf,_0x3ddfff){const _0x438553=a97_0x45a5,_0x4d8b83=_0x66a3bf();while(!![]){try{const _0x2138b7=parseInt(_0x438553(0x173))/0x1*(-parseInt(_0x438553(0x16c))/0x2)+parseInt(_0x438553(0x16d))/0x3+-parseInt(_0x438553(0x165))/0x4*(parseInt(_0x438553(0x16a))/0x5)+parseInt(_0x438553(0x169))/0x6+parseInt(_0x438553(0x15f))/0x7*(-parseInt(_0x438553(0x163))/0x8)+parseInt(_0x438553(0x16e))/0x9+parseInt(_0x438553(0x164))/0xa*(parseInt(_0x438553(0x16f))/0xb);if(_0x2138b7===_0x3ddfff)break;else _0x4d8b83['push'](_0x4d8b83['shift']());}catch(_0x43cad2){_0x4d8b83['push'](_0x4d8b83['shift']());}}}(a97_0x4d08,0xe6e30));import{getEnv,isProduction}from'../constant/env.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,customKbServiceDomain,allowOfficialKbServiceDefault=!![],activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x48759c){const _0xbdac12=a97_0x45a5;customApiDomain=_0x48759c?.[_0xbdac12(0x167)],customUserDomain=_0x48759c?.[_0xbdac12(0x162)],customRuntimeDomain=_0x48759c?.[_0xbdac12(0x166)],customSkillDomain=_0x48759c?.[_0xbdac12(0x172)],customKbServiceDomain=_0x48759c?.[_0xbdac12(0x160)],allowOfficialKbServiceDefault=_0x48759c?.['allowOfficialKbServiceDefault']??!![],activeRegion=_0x48759c?.[_0xbdac12(0x170)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>{const _0x4be054=a97_0x45a5,_0x39b2da=OFFICIAL_ROUTING_PROFILES[activeRegion][_0x4be054(0x16b)];return isProduction(getEnv())?_0x39b2da[_0x4be054(0x176)]:'daily'in _0x39b2da?_0x39b2da['daily']:_0x39b2da[_0x4be054(0x176)];};export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a97_0x399126(0x168)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a97_0x399126(0x175)];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a97_0x399126(0x171)];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a97_0x399126(0x161)];export const getKbServiceDomain=()=>{const _0xcf282a=a97_0x399126;if(customKbServiceDomain)return customKbServiceDomain;if(!allowOfficialKbServiceDefault)return undefined;const _0x51bc3e=getActiveRegionDomains();return _0xcf282a(0x174)in _0x51bc3e?_0x51bc3e[_0xcf282a(0x174)]:undefined;};function a97_0x4d08(){const _0x38aac1=['2001753vkmvJB','22zIhhqJ','region','runtime','skillDomain','44mxetdx','kbService','api','production','1737022AwqtVM','kbServiceDomain','skill','userDomain','48jZxrUz','14190810AiaKLC','4hwnfjd','runtimeDomain','apiDomain','user','9517746BJUOVR','9092635OeMOrG','serviceDomains','52856khUZMj','2307231eDAkut'];a97_0x4d08=function(){return _0x38aac1;};return a97_0x4d08();}
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a98_0x247e(_0x1cf8cb,_0x38b5cb){_0x1cf8cb=_0x1cf8cb-0x84;const _0x35a131=a98_0x35a1();let _0x247e8f=_0x35a131[_0x1cf8cb];return _0x247e8f;}const a98_0x5177e0=a98_0x247e;(function(_0x3b6484,_0x9764ba){const _0x5ce435=a98_0x247e,_0x1525fb=_0x3b6484();while(!![]){try{const _0x5de979=parseInt(_0x5ce435(0x86))/0x1+-parseInt(_0x5ce435(0x8b))/0x2*(-parseInt(_0x5ce435(0x88))/0x3)+parseInt(_0x5ce435(0x92))/0x4*(-parseInt(_0x5ce435(0x8e))/0x5)+parseInt(_0x5ce435(0x8c))/0x6*(-parseInt(_0x5ce435(0x90))/0x7)+parseInt(_0x5ce435(0x8a))/0x8+-parseInt(_0x5ce435(0x89))/0x9+parseInt(_0x5ce435(0x87))/0xa*(parseInt(_0x5ce435(0x8f))/0xb);if(_0x5de979===_0x9764ba)break;else _0x1525fb['push'](_0x1525fb['shift']());}catch(_0xa426e0){_0x1525fb['push'](_0x1525fb['shift']());}}}(a98_0x35a1,0xba6d2));import{productEnv}from'../constant/product.js';function a98_0x35a1(){const _0x4184df=['8860456PrGAMY','907594ftkTUD','510oTkRpC','production','5ZlmcbX','267773UJFtiC','81823aSYOxi','online','1723132LscbSF','development','ENV','926791OxmUTV','320zZCOtB','3KWvRze','9712539UvvcJz'];a98_0x35a1=function(){return _0x4184df;};return a98_0x35a1();}export const RUNTIME_ENV_VALUES=['production',a98_0x5177e0(0x84),'daily'];export function normalizeEnv(_0xbe883a){const _0x2c536d=a98_0x5177e0;return _0xbe883a===_0x2c536d(0x91)?_0x2c536d(0x8d):_0xbe883a;}export function isProduction(_0x4af512){const _0x23c2ee=a98_0x5177e0;return normalizeEnv(_0x4af512)===_0x23c2ee(0x8d);}export function isDaily(_0x694d1e){return normalizeEnv(_0x694d1e)==='daily';}export function isDev(_0x12c3fc){const _0x3c914a=normalizeEnv(_0x12c3fc);return _0x3c914a==='development'||_0x3c914a==='dev';}let env=normalizeEnv(productEnv(a98_0x5177e0(0x85))||a98_0x5177e0(0x8d));export function getEnv(){return env;}export function initEnv(_0x4b26f2){env=normalizeEnv(_0x4b26f2);}
|