@lovrabet/lovrabet-cli 2.3.2 → 2.3.3
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.d.ts +15 -0
- package/lib/commands/approval/index.js +1 -0
- 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/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +83 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/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/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.d.ts +5 -0
- package/lib/utils/positive-safe-integer.js +1 -0
- package/lib/utils/redaction.d.ts +17 -0
- package/lib/utils/redaction.js +1 -0
- 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 +3 -2
- package/skills/lovrabet/references/lovrabet-approval-workflow.md +73 -0
- package/skills/lovrabet.manifest.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a80_0x479c1f=a80_0x10ad;(function(_0x54493d,_0x336f95){const _0x21a4ad=a80_0x10ad,_0x2eaa31=_0x54493d();while(!![]){try{const _0x690ae5=-parseInt(_0x21a4ad(0x16d))/0x1+parseInt(_0x21a4ad(0x14c))/0x2*(parseInt(_0x21a4ad(0x148))/0x3)+parseInt(_0x21a4ad(0x15a))/0x4*(-parseInt(_0x21a4ad(0x12b))/0x5)+parseInt(_0x21a4ad(0x172))/0x6*(parseInt(_0x21a4ad(0x182))/0x7)+-parseInt(_0x21a4ad(0x14f))/0x8+-parseInt(_0x21a4ad(0x163))/0x9+parseInt(_0x21a4ad(0x131))/0xa;if(_0x690ae5===_0x336f95)break;else _0x2eaa31['push'](_0x2eaa31['shift']());}catch(_0x2c2483){_0x2eaa31['push'](_0x2eaa31['shift']());}}}(a80_0x39ab,0x59181));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a80_0x44d04a}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE='SKILL.md',SUPPORTED_SKILL_TYPES=new Set([a80_0x479c1f(0x15c),a80_0x479c1f(0x159)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0x2955d7,_0x9b320d={}){const _0x5105d7=a80_0x479c1f,_0x5c9606=resolveSkillDirectoryRoot(_0x2955d7),_0x3a0093=[],_0x164894=loadRequiredSkillFile(_0x5c9606,_0x3a0093),_0x5cabb0=_0x164894?parseFrontmatter(_0x164894[_0x5105d7(0x150)]):{'hasFrontmatter':![]};_0x164894&&validateFrontmatter(_0x164894[_0x5105d7(0x15f)],_0x5cabb0,_0x3a0093);validateRuntimeCliReferences(_0x5c9606,_0x3a0093);const _0x314802=_0x3a0093[_0x5105d7(0x141)](_0x4b71c7=>_0x4b71c7[_0x5105d7(0x13e)]===_0x5105d7(0x142)),_0x2853f1=_0x3a0093['filter'](_0x2bd315=>_0x2bd315[_0x5105d7(0x13e)]===_0x5105d7(0x15e));return{'ok':_0x314802[_0x5105d7(0x16c)]===0x0,'dir':_0x5c9606,'type':_0x5cabb0[_0x5105d7(0x17d)],'errors':_0x314802,'warnings':_0x2853f1};}function resolveSkillDirectoryRoot(_0x567a1f){const _0x34b916=a80_0x479c1f,_0x352bbe=resolve(_0x567a1f);if(!existsSync(_0x352bbe))throw CliErrors[_0x34b916(0x173)](_0x34b916(0x176)+_0x567a1f);const _0x4b1628=lstatSync(_0x352bbe);if(_0x4b1628[_0x34b916(0x12e)]())return _0x352bbe;if(_0x4b1628[_0x34b916(0x154)]()){const _0x38b1c2=realpathSync(_0x352bbe);if(lstatSync(_0x38b1c2)['isDirectory']())return _0x38b1c2;}throw CliErrors[_0x34b916(0x173)]('Skill\x20directory\x20not\x20found:\x20'+_0x567a1f);}export function throwIfSkillValidationFailed(_0x959664,_0x3952f1=![]){const _0x334563=a80_0x479c1f;if(_0x959664['ok'])return;const _0x4f1af9=_0x959664['errors'][_0x334563(0x168)](_0x1a6c81=>{const _0x2fa109=_0x334563,_0x2c51d3=_0x1a6c81[_0x2fa109(0x181)]?'#'+_0x1a6c81[_0x2fa109(0x181)]:'';return _0x1a6c81[_0x2fa109(0x13e)]['toUpperCase']()+'\x20'+_0x1a6c81[_0x2fa109(0x17f)]+'\x20'+_0x1a6c81[_0x2fa109(0x164)]+_0x2c51d3+':\x20'+_0x1a6c81[_0x2fa109(0x144)]+_0x2fa109(0x160)+_0x1a6c81['suggestion'];});throw CliErrors[_0x334563(0x173)](_0x334563(0x166)+_0x4f1af9['join']('\x0a'),_0x334563(0x171));}function loadRequiredSkillFile(_0x246b53,_0x3d3b5d){const _0x49072f=a80_0x479c1f,_0xe83b5d=resolve(_0x246b53,SKILL_FILE);if(!existsSync(_0xe83b5d))return _0x3d3b5d[_0x49072f(0x14e)](issue(_0x49072f(0x142),'structure-complete',SKILL_FILE,_0x49072f(0x13a),_0x49072f(0x153))),undefined;const _0x3321dd=lstatSync(_0xe83b5d);if(_0x3321dd[_0x49072f(0x154)]())return _0x3d3b5d[_0x49072f(0x14e)](issue(_0x49072f(0x142),_0x49072f(0x129),SKILL_FILE,_0x49072f(0x151),'Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.')),undefined;if(!_0x3321dd[_0x49072f(0x13c)]())return _0x3d3b5d['push'](issue(_0x49072f(0x142),'structure-complete',SKILL_FILE,_0x49072f(0x178),_0x49072f(0x147))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0xe83b5d,'utf8')};}function validateFrontmatter(_0x5402f9,_0x347a15,_0x58507d){const _0x2cd1cb=a80_0x479c1f;if(!_0x347a15['hasFrontmatter']){_0x58507d[_0x2cd1cb(0x14e)](issue('error',_0x2cd1cb(0x155),_0x5402f9,_0x2cd1cb(0x16a),_0x2cd1cb(0x14d)));return;}!_0x347a15[_0x2cd1cb(0x170)]?.[_0x2cd1cb(0x140)]()&&_0x58507d['push'](issue('error',_0x2cd1cb(0x155),_0x5402f9,_0x2cd1cb(0x16b),_0x2cd1cb(0x146))),!_0x347a15[_0x2cd1cb(0x183)]?.[_0x2cd1cb(0x140)]()&&_0x58507d[_0x2cd1cb(0x14e)](issue(_0x2cd1cb(0x15e),_0x2cd1cb(0x177),_0x5402f9,_0x2cd1cb(0x128),_0x2cd1cb(0x13b))),!_0x347a15[_0x2cd1cb(0x14a)]?.[_0x2cd1cb(0x140)]()&&_0x58507d['push'](issue(_0x2cd1cb(0x15e),_0x2cd1cb(0x133),_0x5402f9,_0x2cd1cb(0x15d),'Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.')),!_0x347a15[_0x2cd1cb(0x143)]?.['trim']()&&_0x58507d['push'](issue(_0x2cd1cb(0x142),_0x2cd1cb(0x139),_0x5402f9,_0x2cd1cb(0x158),_0x2cd1cb(0x180))),_0x347a15['internal']===!![]&&_0x58507d[_0x2cd1cb(0x14e)](issue(_0x2cd1cb(0x142),_0x2cd1cb(0x12d),_0x5402f9,_0x2cd1cb(0x152),_0x2cd1cb(0x179))),_0x347a15['type']?.['trim']()&&!SUPPORTED_SKILL_TYPES[_0x2cd1cb(0x12a)](_0x347a15[_0x2cd1cb(0x17d)])&&_0x58507d['push'](issue(_0x2cd1cb(0x142),'frontmatter-required',_0x5402f9,_0x2cd1cb(0x14b),_0x2cd1cb(0x16f)));}function validateRuntimeCliReferences(_0x5bc4f1,_0x5ddc60){const _0x3ccd4c=a80_0x479c1f;for(const _0x5eece0 of findRabetbaseCliInvocations(_0x5bc4f1)){_0x5ddc60['push'](issue('warning',_0x3ccd4c(0x161),_0x5eece0[_0x3ccd4c(0x164)],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.',_0x3ccd4c(0x138),'L'+_0x5eece0[_0x3ccd4c(0x135)]));}}function findRabetbaseCliInvocations(_0x13531b){const _0x15095a=a80_0x479c1f;return scanSkillDirectory(_0x13531b)[_0x15095a(0x141)](_0x41eae5=>TEXT_SKILL_FILE_PATTERN[_0x15095a(0x169)](_0x41eae5[_0x15095a(0x15f)]))['flatMap'](_0x32ef53=>{const _0x1c04f0=_0x15095a,_0x144289=fileText(_0x32ef53);return _0x144289[_0x1c04f0(0x15b)](/\r?\n/)['map']((_0x293536,_0x4fad33)=>({'file':_0x32ef53[_0x1c04f0(0x15f)],'line':_0x4fad33+0x1,'text':_0x293536}))[_0x1c04f0(0x141)](({text:_0x86fe70})=>isRabetbaseCliInvocation(_0x86fe70))[_0x1c04f0(0x168)](({file:_0x5e12fb,line:_0x49d90e})=>({'file':_0x5e12fb,'line':_0x49d90e}));});}const RABETBASE_SUBCOMMANDS=[a80_0x479c1f(0x132),a80_0x479c1f(0x137),a80_0x479c1f(0x134),'page',a80_0x479c1f(0x17c),a80_0x479c1f(0x13f),'schema',a80_0x479c1f(0x12f),a80_0x479c1f(0x167),'kb',a80_0x479c1f(0x136),a80_0x479c1f(0x12c),a80_0x479c1f(0x17e),'auth','logs',a80_0x479c1f(0x17b)],RABETBASE_INVOCATION=new RegExp(String[a80_0x479c1f(0x145)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a80_0x479c1f(0x16e)]('|')})\b`+String[a80_0x479c1f(0x145)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x7b036a){const _0x4aaef1=a80_0x479c1f,_0x539eeb=_0x7b036a['search'](/\brabetbase\b/i);if(_0x539eeb<0x0)return![];const _0x198bf3=_0x7b036a[_0x4aaef1(0x149)](_0x539eeb)[_0x4aaef1(0x15b)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x4aaef1(0x169)](_0x198bf3);}function parseFrontmatter(_0x2eac9f){const _0x48bc5f=a80_0x479c1f,_0x415f76=_0x2eac9f[_0x48bc5f(0x13d)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x415f76)return{'hasFrontmatter':![]};const _0x4e4e4d=_0x415f76[0x1]??'',_0x30c92a={'hasFrontmatter':!![]};let _0x421ae8;try{_0x421ae8=a80_0x44d04a(_0x4e4e4d);}catch{return _0x30c92a;}const _0x3264c0=asRecord(_0x421ae8);if(!_0x3264c0)return _0x30c92a;_0x30c92a[_0x48bc5f(0x170)]=scalarToString(_0x3264c0[_0x48bc5f(0x170)]),_0x30c92a[_0x48bc5f(0x183)]=scalarToString(_0x3264c0[_0x48bc5f(0x183)]),_0x30c92a[_0x48bc5f(0x143)]=scalarToString(_0x3264c0[_0x48bc5f(0x143)]),_0x30c92a[_0x48bc5f(0x14a)]=scalarToString(_0x3264c0[_0x48bc5f(0x14a)]);const _0x5d08c3=asRecord(_0x3264c0[_0x48bc5f(0x175)]);return _0x5d08c3&&(_0x30c92a[_0x48bc5f(0x17d)]=scalarToString(_0x5d08c3[_0x48bc5f(0x17d)]),_0x30c92a[_0x48bc5f(0x127)]=scalarToBoolean(_0x5d08c3[_0x48bc5f(0x127)])),_0x30c92a;}function a80_0x10ad(_0x1c17fd,_0x466dda){_0x1c17fd=_0x1c17fd-0x127;const _0x39ab43=a80_0x39ab();let _0x10ad31=_0x39ab43[_0x1c17fd];return _0x10ad31;}function asRecord(_0x15291e){const _0xb4007f=a80_0x479c1f;if(_0x15291e&&typeof _0x15291e==='object'&&!Array[_0xb4007f(0x130)](_0x15291e))return _0x15291e;return undefined;}function scalarToString(_0x363750){const _0x4c89ad=a80_0x479c1f;if(typeof _0x363750==='string')return _0x363750[_0x4c89ad(0x140)]();if(typeof _0x363750===_0x4c89ad(0x162)||typeof _0x363750===_0x4c89ad(0x17a))return String(_0x363750);return undefined;}function a80_0x39ab(){const _0x466009=['has','425725wLIAKT','workspace','internal-skill','isDirectory','service','isArray','14933610yyZuxq','dataset','example-recommended','bff','line','config','sql','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','description-required','Missing\x20SKILL.md.','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','isFile','match','level','app','trim','filter','error','description','message','raw','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','39DySJth','slice','example','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','47650yntcVK','Add\x20frontmatter\x20with\x20name\x20and\x20description.','push','5572464gnoYqP','content','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','isSymbolicLink','frontmatter-required','string','true','Frontmatter\x20description\x20is\x20empty.','read','4rnuMiw','split','write','Frontmatter\x20example\x20is\x20missing.','warning','path','\x20Fix:\x20','rabetbase-cli-reference','number','2492622BjhAfr','file','toLowerCase','Skill\x20validation\x20failed:\x0a','artifact','map','test','SKILL.md\x20must\x20start\x20with\x20frontmatter.','Frontmatter\x20name\x20is\x20missing.','length','668362ImZfSQ','join','Set\x20metadata.type\x20to\x20write\x20or\x20read.','name','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','6JHyLlc','validation','false','metadata','Skill\x20directory\x20not\x20found:\x20','display-name-recommended','SKILL.md\x20is\x20not\x20a\x20file.','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','boolean','registry','project','type','data','ruleId','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','section','2022062uhWCCg','displayName','internal','Frontmatter\x20displayName\x20is\x20missing.','structure-complete'];a80_0x39ab=function(){return _0x466009;};return a80_0x39ab();}function scalarToBoolean(_0x5d4afa){const _0x10cdf7=a80_0x479c1f;if(typeof _0x5d4afa===_0x10cdf7(0x17a))return _0x5d4afa;if(typeof _0x5d4afa===_0x10cdf7(0x156))return cleanBoolean(_0x5d4afa);return undefined;}function cleanBoolean(_0x22861c){const _0x6d5b08=a80_0x479c1f,_0x9a7bcd=_0x22861c[_0x6d5b08(0x140)]()[_0x6d5b08(0x165)]();if(_0x9a7bcd===_0x6d5b08(0x157))return!![];if(_0x9a7bcd===_0x6d5b08(0x174))return![];return undefined;}function issue(_0x2c89d6,_0x278271,_0x2b65a6,_0x31f759,_0x1c4ea8,_0x539590){return{'level':_0x2c89d6,'ruleId':_0x278271,'file':_0x2b65a6,'section':_0x539590,'message':_0x31f759,'suggestion':_0x1c4ea8};}
|
|
1
|
+
const a81_0x274085=a81_0x432c;(function(_0x35097e,_0xf686ee){const _0x264a34=a81_0x432c,_0x2a5ef8=_0x35097e();while(!![]){try{const _0x521c04=parseInt(_0x264a34(0x108))/0x1+parseInt(_0x264a34(0x13b))/0x2*(parseInt(_0x264a34(0x155))/0x3)+-parseInt(_0x264a34(0x127))/0x4*(parseInt(_0x264a34(0x109))/0x5)+-parseInt(_0x264a34(0x121))/0x6+parseInt(_0x264a34(0x15e))/0x7*(-parseInt(_0x264a34(0x157))/0x8)+parseInt(_0x264a34(0x10d))/0x9*(-parseInt(_0x264a34(0x159))/0xa)+parseInt(_0x264a34(0x124))/0xb;if(_0x521c04===_0xf686ee)break;else _0x2a5ef8['push'](_0x2a5ef8['shift']());}catch(_0x1ac898){_0x2a5ef8['push'](_0x2a5ef8['shift']());}}}(a81_0x1d81,0xb0446));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a81_0x35a8a6}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a81_0x274085(0x14d),SUPPORTED_SKILL_TYPES=new Set([a81_0x274085(0x130),a81_0x274085(0x11d)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;function a81_0x1d81(){const _0x549860=['bff','SKILL.md\x20must\x20start\x20with\x20frontmatter.','registry','internal-skill','Skill\x20directory\x20not\x20found:\x20','86314RzQYsE','string','push','level','join','logs','flatMap','message','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','trim','ruleId','filter','page','raw','hasFrontmatter','line','data','Describe\x20when\x20the\x20model\x20should\x20trigger\x20this\x20Skill,\x20plus\x20out-of-scope\x20boundaries\x20and\x20keywords.','SKILL.md','split','isDirectory','false','rabetbase-cli-reference','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','true','suggestion','66ChxTXA','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','4385672bCYEZf','errors','10BwTlVB','project','path','slice','warning','14seClxL','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','metadata','Skill\x20validation\x20failed:\x0a','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','example','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','isSymbolicLink','displayName','320320FprKNW','143015uswrne','Set\x20metadata.type\x20to\x20write\x20or\x20read.','type','section','6960402jczSOc','frontmatter-required','Frontmatter\x20description\x20is\x20empty.','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','toLowerCase','SKILL.md\x20is\x20not\x20a\x20file.','service','Frontmatter\x20name\x20is\x20missing.','description','isArray','search','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','sql','number','utf8','file','read','toUpperCase','internal','content','7445142jZRgtR','\x20Fix:\x20','Add\x20frontmatter\x20with\x20name\x20and\x20description.','42664677tStMSo','map','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','184EcKDUV','name','dataset','test','schema','validation','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','description-required','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','write','object','auth','boolean','error','match'];a81_0x1d81=function(){return _0x549860;};return a81_0x1d81();}export function validateSkillDirectory(_0x519ce1,_0x55a5ad={}){const _0x179ba2=a81_0x274085,_0x35b35d=resolveSkillDirectoryRoot(_0x519ce1),_0x299f48=[],_0xd66c1f=loadRequiredSkillFile(_0x35b35d,_0x299f48),_0x54b98c=_0xd66c1f?parseFrontmatter(_0xd66c1f[_0x179ba2(0x120)]):{'hasFrontmatter':![]};_0xd66c1f&&validateFrontmatter(_0xd66c1f[_0x179ba2(0x15b)],_0x54b98c,_0x299f48);validateRuntimeCliReferences(_0x35b35d,_0x299f48);const _0x16eb15=_0x299f48[_0x179ba2(0x146)](_0x9e28d5=>_0x9e28d5[_0x179ba2(0x13e)]===_0x179ba2(0x134)),_0x45a8ce=_0x299f48['filter'](_0x389bcb=>_0x389bcb[_0x179ba2(0x13e)]===_0x179ba2(0x15d));return{'ok':_0x16eb15['length']===0x0,'dir':_0x35b35d,'type':_0x54b98c[_0x179ba2(0x10b)],'errors':_0x16eb15,'warnings':_0x45a8ce};}function resolveSkillDirectoryRoot(_0x413303){const _0x19d265=a81_0x274085,_0x3c5372=resolve(_0x413303);if(!existsSync(_0x3c5372))throw CliErrors[_0x19d265(0x12c)]('Skill\x20directory\x20not\x20found:\x20'+_0x413303);const _0xfd3848=lstatSync(_0x3c5372);if(_0xfd3848[_0x19d265(0x14f)]())return _0x3c5372;if(_0xfd3848[_0x19d265(0x165)]()){const _0x30627a=realpathSync(_0x3c5372);if(lstatSync(_0x30627a)[_0x19d265(0x14f)]())return _0x30627a;}throw CliErrors[_0x19d265(0x12c)](_0x19d265(0x13a)+_0x413303);}export function throwIfSkillValidationFailed(_0x21284a,_0x386afc=![]){const _0x4bbf20=a81_0x274085;if(_0x21284a['ok'])return;const _0x229194=_0x21284a[_0x4bbf20(0x158)][_0x4bbf20(0x125)](_0x4db7b8=>{const _0x5c60af=_0x4bbf20,_0x417f5f=_0x4db7b8[_0x5c60af(0x10c)]?'#'+_0x4db7b8['section']:'';return _0x4db7b8['level'][_0x5c60af(0x11e)]()+'\x20'+_0x4db7b8[_0x5c60af(0x145)]+'\x20'+_0x4db7b8[_0x5c60af(0x11c)]+_0x417f5f+':\x20'+_0x4db7b8[_0x5c60af(0x142)]+_0x5c60af(0x122)+_0x4db7b8[_0x5c60af(0x154)];});throw CliErrors['validation'](_0x4bbf20(0x161)+_0x229194[_0x4bbf20(0x13f)]('\x0a'),_0x4bbf20(0x12d));}function loadRequiredSkillFile(_0x23dd16,_0x1f65e6){const _0x5d0d6d=a81_0x274085,_0x33e614=resolve(_0x23dd16,SKILL_FILE);if(!existsSync(_0x33e614))return _0x1f65e6[_0x5d0d6d(0x13d)](issue(_0x5d0d6d(0x134),'structure-complete',SKILL_FILE,'Missing\x20SKILL.md.',_0x5d0d6d(0x143))),undefined;const _0x4afd10=lstatSync(_0x33e614);if(_0x4afd10['isSymbolicLink']())return _0x1f65e6['push'](issue(_0x5d0d6d(0x134),'structure-complete',SKILL_FILE,'SKILL.md\x20must\x20be\x20a\x20regular\x20file.',_0x5d0d6d(0x162))),undefined;if(!_0x4afd10['isFile']())return _0x1f65e6['push'](issue(_0x5d0d6d(0x134),'structure-complete',SKILL_FILE,_0x5d0d6d(0x112),_0x5d0d6d(0x164))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x33e614,_0x5d0d6d(0x11b))};}function validateFrontmatter(_0x259a70,_0xf38155,_0x235cce){const _0x4cde2d=a81_0x274085;if(!_0xf38155[_0x4cde2d(0x149)]){_0x235cce[_0x4cde2d(0x13d)](issue(_0x4cde2d(0x134),_0x4cde2d(0x10e),_0x259a70,_0x4cde2d(0x137),_0x4cde2d(0x123)));return;}!_0xf38155[_0x4cde2d(0x128)]?.['trim']()&&_0x235cce[_0x4cde2d(0x13d)](issue(_0x4cde2d(0x134),_0x4cde2d(0x10e),_0x259a70,_0x4cde2d(0x114),_0x4cde2d(0x156))),!_0xf38155[_0x4cde2d(0x107)]?.[_0x4cde2d(0x144)]()&&_0x235cce[_0x4cde2d(0x13d)](issue(_0x4cde2d(0x15d),'display-name-recommended',_0x259a70,'Frontmatter\x20displayName\x20is\x20missing.',_0x4cde2d(0x12f))),!_0xf38155['example']?.['trim']()&&_0x235cce[_0x4cde2d(0x13d)](issue(_0x4cde2d(0x15d),'example-recommended',_0x259a70,'Frontmatter\x20example\x20is\x20missing.',_0x4cde2d(0x152))),!_0xf38155[_0x4cde2d(0x115)]?.[_0x4cde2d(0x144)]()&&_0x235cce['push'](issue(_0x4cde2d(0x134),_0x4cde2d(0x12e),_0x259a70,_0x4cde2d(0x10f),_0x4cde2d(0x14c))),_0xf38155[_0x4cde2d(0x11f)]===!![]&&_0x235cce[_0x4cde2d(0x13d)](issue('error',_0x4cde2d(0x139),_0x259a70,'metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.',_0x4cde2d(0x110))),_0xf38155[_0x4cde2d(0x10b)]?.[_0x4cde2d(0x144)]()&&!SUPPORTED_SKILL_TYPES['has'](_0xf38155[_0x4cde2d(0x10b)])&&_0x235cce[_0x4cde2d(0x13d)](issue('error','frontmatter-required',_0x259a70,_0x4cde2d(0x118),_0x4cde2d(0x10a)));}function validateRuntimeCliReferences(_0x107ff4,_0x43bb42){const _0x3d16c2=a81_0x274085;for(const _0x4c7fd4 of findRabetbaseCliInvocations(_0x107ff4)){_0x43bb42[_0x3d16c2(0x13d)](issue(_0x3d16c2(0x15d),_0x3d16c2(0x151),_0x4c7fd4['file'],_0x3d16c2(0x15f),_0x3d16c2(0x126),'L'+_0x4c7fd4[_0x3d16c2(0x14a)]));}}function findRabetbaseCliInvocations(_0x32404a){const _0x7a93ba=a81_0x274085;return scanSkillDirectory(_0x32404a)[_0x7a93ba(0x146)](_0x436a54=>TEXT_SKILL_FILE_PATTERN[_0x7a93ba(0x12a)](_0x436a54[_0x7a93ba(0x15b)]))[_0x7a93ba(0x141)](_0x392d72=>{const _0x434295=_0x7a93ba,_0x1869cd=fileText(_0x392d72);return _0x1869cd[_0x434295(0x14e)](/\r?\n/)[_0x434295(0x125)]((_0x512acb,_0x53b729)=>({'file':_0x392d72[_0x434295(0x15b)],'line':_0x53b729+0x1,'text':_0x512acb}))['filter'](({text:_0x310fd0})=>isRabetbaseCliInvocation(_0x310fd0))['map'](({file:_0x34457c,line:_0x4873ec})=>({'file':_0x34457c,'line':_0x4873ec}));});}const RABETBASE_SUBCOMMANDS=[a81_0x274085(0x129),a81_0x274085(0x119),a81_0x274085(0x136),a81_0x274085(0x147),a81_0x274085(0x15a),'app',a81_0x274085(0x12b),a81_0x274085(0x113),'artifact','kb','config','workspace',a81_0x274085(0x14b),a81_0x274085(0x132),a81_0x274085(0x140),a81_0x274085(0x138)],RABETBASE_INVOCATION=new RegExp(String[a81_0x274085(0x148)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a81_0x274085(0x13f)]('|')})\b`+String[a81_0x274085(0x148)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x2d2c32){const _0x1e1b73=a81_0x274085,_0x532921=_0x2d2c32[_0x1e1b73(0x117)](/\brabetbase\b/i);if(_0x532921<0x0)return![];const _0x6fdae5=_0x2d2c32[_0x1e1b73(0x15c)](_0x532921)[_0x1e1b73(0x14e)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x1e1b73(0x12a)](_0x6fdae5);}function parseFrontmatter(_0x78f53){const _0x517a1d=a81_0x274085,_0x5eebb1=_0x78f53[_0x517a1d(0x135)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5eebb1)return{'hasFrontmatter':![]};const _0xa8d675=_0x5eebb1[0x1]??'',_0x5299c5={'hasFrontmatter':!![]};let _0x441e2f;try{_0x441e2f=a81_0x35a8a6(_0xa8d675);}catch{return _0x5299c5;}const _0x52b822=asRecord(_0x441e2f);if(!_0x52b822)return _0x5299c5;_0x5299c5[_0x517a1d(0x128)]=scalarToString(_0x52b822['name']),_0x5299c5[_0x517a1d(0x107)]=scalarToString(_0x52b822['displayName']),_0x5299c5['description']=scalarToString(_0x52b822[_0x517a1d(0x115)]),_0x5299c5[_0x517a1d(0x163)]=scalarToString(_0x52b822[_0x517a1d(0x163)]);const _0x375e55=asRecord(_0x52b822[_0x517a1d(0x160)]);return _0x375e55&&(_0x5299c5[_0x517a1d(0x10b)]=scalarToString(_0x375e55[_0x517a1d(0x10b)]),_0x5299c5['internal']=scalarToBoolean(_0x375e55[_0x517a1d(0x11f)])),_0x5299c5;}function asRecord(_0x3ec01f){const _0x45b1e3=a81_0x274085;if(_0x3ec01f&&typeof _0x3ec01f===_0x45b1e3(0x131)&&!Array[_0x45b1e3(0x116)](_0x3ec01f))return _0x3ec01f;return undefined;}function a81_0x432c(_0x18ed07,_0x47d1fe){_0x18ed07=_0x18ed07-0x107;const _0x1d81ee=a81_0x1d81();let _0x432c1f=_0x1d81ee[_0x18ed07];return _0x432c1f;}function scalarToString(_0x55cc3d){const _0x56c5a4=a81_0x274085;if(typeof _0x55cc3d===_0x56c5a4(0x13c))return _0x55cc3d[_0x56c5a4(0x144)]();if(typeof _0x55cc3d===_0x56c5a4(0x11a)||typeof _0x55cc3d===_0x56c5a4(0x133))return String(_0x55cc3d);return undefined;}function scalarToBoolean(_0x4b024c){const _0x4ce71b=a81_0x274085;if(typeof _0x4b024c===_0x4ce71b(0x133))return _0x4b024c;if(typeof _0x4b024c===_0x4ce71b(0x13c))return cleanBoolean(_0x4b024c);return undefined;}function cleanBoolean(_0x4979eb){const _0x486ffd=a81_0x274085,_0x58f1a3=_0x4979eb[_0x486ffd(0x144)]()[_0x486ffd(0x111)]();if(_0x58f1a3===_0x486ffd(0x153))return!![];if(_0x58f1a3===_0x486ffd(0x150))return![];return undefined;}function issue(_0x56db9d,_0x3978c0,_0xe3223e,_0x57ee9c,_0x41376f,_0x5c3713){return{'level':_0x56db9d,'ruleId':_0x3978c0,'file':_0xe3223e,'section':_0x5c3713,'message':_0x57ee9c,'suggestion':_0x41376f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x4b2caa=a82_0x505c;(function(_0x36bac4,_0x1d76d5){const _0x11742a=a82_0x505c,_0x42f30c=_0x36bac4();while(!![]){try{const _0x392eb0=parseInt(_0x11742a(0x95))/0x1+parseInt(_0x11742a(0x97))/0x2*(-parseInt(_0x11742a(0x90))/0x3)+-parseInt(_0x11742a(0x9f))/0x4+parseInt(_0x11742a(0x91))/0x5*(parseInt(_0x11742a(0xa0))/0x6)+parseInt(_0x11742a(0x9a))/0x7+parseInt(_0x11742a(0x96))/0x8+parseInt(_0x11742a(0x8f))/0x9*(parseInt(_0x11742a(0x93))/0xa);if(_0x392eb0===_0x1d76d5)break;else _0x42f30c['push'](_0x42f30c['shift']());}catch(_0x430fd1){_0x42f30c['push'](_0x42f30c['shift']());}}}(a82_0x5dcd,0x5e04e));import{getSqlQueryInfo}from'../../core/api-client.js';function a82_0x5dcd(){const _0x1f13d3=['sqlContent','verbose','bool','dbId','2024820ZedFWg','492630EEKHZY','930483dOqaLs','142320FRJyRP','45errjYL','detail','10NupjaQ','appCode','30711qJqlER','3458464mOVWNx','20Nzlvei','sqlName','sqlcode','422492MfGhyu'];a82_0x5dcd=function(){return _0x1f13d3;};return a82_0x5dcd();}import{getDbName}from'../../core/db-resolver.js';function a82_0x505c(_0x11dcb8,_0x13d00a){_0x11dcb8=_0x11dcb8-0x8f;const _0x5dcdaf=a82_0x5dcd();let _0x505c61=_0x5dcdaf[_0x11dcb8];return _0x505c61;}import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':'sql','command':a82_0x4b2caa(0x92),'description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':'read','flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x5a2387){const _0x35645f=a82_0x4b2caa,_0x3c954b=await getSqlQueryInfo(_0x5a2387[_0x35645f(0x94)],_0x5a2387['str'](_0x35645f(0x99))),_0x96ddb5=_0x5a2387[_0x35645f(0x9d)](_0x35645f(0x9c));if(_0x96ddb5)return{'ok':!![],'data':_0x3c954b};const _0x83bd43=_0x3c954b[_0x35645f(0x9e)]?await getDbName(_0x5a2387[_0x35645f(0x94)],_0x3c954b[_0x35645f(0x9e)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x3c954b['sqlCode'],'sqlName':_0x3c954b[_0x35645f(0x98)],'db':_0x83bd43?_0x83bd43+'\x20('+_0x3c954b[_0x35645f(0x9e)]+')':_0x3c954b[_0x35645f(0x9e)]??'','sqlContent':_0x3c954b[_0x35645f(0x9b)]??''}};}};
|
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x3290a7=a83_0xc228;(function(_0xde89be,_0x463ad3){const _0x2f8b16=a83_0xc228,_0x45a79e=_0xde89be();while(!![]){try{const _0x15c4dd=parseInt(_0x2f8b16(0x15d))/0x1*(parseInt(_0x2f8b16(0x15a))/0x2)+parseInt(_0x2f8b16(0x14c))/0x3+parseInt(_0x2f8b16(0x149))/0x4+-parseInt(_0x2f8b16(0x14d))/0x5+-parseInt(_0x2f8b16(0x14f))/0x6*(parseInt(_0x2f8b16(0x15b))/0x7)+-parseInt(_0x2f8b16(0x153))/0x8+parseInt(_0x2f8b16(0x14e))/0x9;if(_0x15c4dd===_0x463ad3)break;else _0x45a79e['push'](_0x45a79e['shift']());}catch(_0x58eab6){_0x45a79e['push'](_0x45a79e['shift']());}}}(a83_0x3d68,0x482df));import{executeSdkSql}from'../../core/sdk-client.js';function a83_0xc228(_0x2c4b3c,_0x324e52){_0x2c4b3c=_0x2c4b3c-0x148;const _0x3d6822=a83_0x3d68();let _0xc2283b=_0x3d6822[_0x2c4b3c];return _0xc2283b;}import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a83_0x3290a7(0x154),'command':a83_0x3290a7(0x157),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':'read','flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x3778d5){const _0x9bf640=a83_0x3290a7,_0x49114e=parseJsonParams(_0x3778d5[_0x9bf640(0x159)](_0x9bf640(0x150))),_0x431df9=Date[_0x9bf640(0x152)](),_0x16f1f4=await executeSdkSql(_0x3778d5[_0x9bf640(0x159)](_0x9bf640(0x14a)),_0x49114e),_0x55a748=Date[_0x9bf640(0x152)]()-_0x431df9,_0x4752b0=_0x16f1f4?.['execResult']??_0x16f1f4,_0x2268a3=_0x16f1f4?.[_0x9bf640(0x158)]??!![];if(!_0x2268a3)return{'ok':![],'data':{'error':_0x16f1f4?.[_0x9bf640(0x156)]||_0x9bf640(0x15c),'elapsed':_0x55a748},'message':'SQL\x20execution\x20failed'};const _0x290962=Array[_0x9bf640(0x155)](_0x4752b0)?_0x4752b0:[];return{'ok':!![],'data':{'rows':_0x290962,'rowCount':_0x290962[_0x9bf640(0x148)],'elapsed':_0x55a748},'message':_0x9bf640(0x14b)+_0x290962[_0x9bf640(0x148)]+_0x9bf640(0x151)+_0x55a748+'ms'};}};function a83_0x3d68(){const _0x5ea470=['params','\x20row(s)\x20in\x20','now','4479760LphLCe','sql','isArray','execError','exec','execSuccess','str','68ohNQzA','2856609aimpCk','SQL\x20execution\x20failed','4603jLNnBn','length','1430616NRaRJH','sqlcode','Returned\x20','1203963qhVfzq','1985790AeEfHW','6708465lfaHcb','6rbzksU'];a83_0x3d68=function(){return _0x5ea470;};return a83_0x3d68();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a84_0x4460(){const _0x3a65aa=['279DYzqBb','87261vBalSP','28488ZRzLju','291504FNtLIp','1984565iPXmsv','1061176hEPfow','259bhhAgt','1301588AaYuDR','1242135NcNKFo'];a84_0x4460=function(){return _0x3a65aa;};return a84_0x4460();}function a84_0x3b3a(_0x2c95e9,_0x534378){_0x2c95e9=_0x2c95e9-0xc3;const _0x446070=a84_0x4460();let _0x3b3ac2=_0x446070[_0x2c95e9];return _0x3b3ac2;}(function(_0x30f55b,_0x11fe66){const _0x42f440=a84_0x3b3a,_0x2826ee=_0x30f55b();while(!![]){try{const _0x49f340=parseInt(_0x42f440(0xc3))/0x1+-parseInt(_0x42f440(0xc7))/0x2+parseInt(_0x42f440(0xca))/0x3+-parseInt(_0x42f440(0xc9))/0x4+-parseInt(_0x42f440(0xc6))/0x5+parseInt(_0x42f440(0xc4))/0x6*(parseInt(_0x42f440(0xc8))/0x7)+parseInt(_0x42f440(0xc5))/0x8*(parseInt(_0x42f440(0xcb))/0x9);if(_0x49f340===_0x11fe66)break;else _0x2826ee['push'](_0x2826ee['shift']());}catch(_0x26a89b){_0x2826ee['push'](_0x2826ee['shift']());}}}(a84_0x4460,0x872be));import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a84_0x5cea06=a84_0x5404;(function(_0x3acb3a,_0x360f60){const _0x4b34ac=a84_0x5404,_0x5b16c5=_0x3acb3a();while(!![]){try{const _0x56e03a=-parseInt(_0x4b34ac(0x20d))/0x1*(-parseInt(_0x4b34ac(0x211))/0x2)+parseInt(_0x4b34ac(0x1f7))/0x3+parseInt(_0x4b34ac(0x1fd))/0x4+parseInt(_0x4b34ac(0x20c))/0x5+-parseInt(_0x4b34ac(0x225))/0x6+-parseInt(_0x4b34ac(0x212))/0x7*(parseInt(_0x4b34ac(0x207))/0x8)+-parseInt(_0x4b34ac(0x1f4))/0x9*(parseInt(_0x4b34ac(0x221))/0xa);if(_0x56e03a===_0x360f60)break;else _0x5b16c5['push'](_0x5b16c5['shift']());}catch(_0xd498c2){_0x5b16c5['push'](_0x5b16c5['shift']());}}}(a84_0x5e52,0x1c707));function a84_0x5404(_0x3bcf3b,_0x3aa146){_0x3bcf3b=_0x3bcf3b-0x1f2;const _0x5e52ab=a84_0x5e52();let _0x54048f=_0x5e52ab[_0x3bcf3b];return _0x54048f;}import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a84_0x4e9dca from'semver';import{CliErrors}from'../errors.js';function a84_0x5e52(){const _0x41ba9d=['292yXbFLM','7210Ijhiot','Already\x20on\x20requested\x20version\x20(v','platform','toLowerCase','Checking\x20npm\x20dist-tags...','Update\x20failed:\x20','source',',\x20then\x20verify\x20with:\x20','/dist-tags','unknown','log','inherit','code','stdout','length','592740zIOeaP','filter','timeout','version','208404kNGjIL','Update\x20the\x20','latest','skillVersion','warn','Version\x20comparison\x20failed:\x20','\x20CLI\x20from\x20npm','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','INSTALL_FAILED','lib','state','Run:\x20npm\x20install\x20-g\x20','Already\x20up\x20to\x20date\x20(v','--prefix',',\x20state\x20','test','reason','join','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','read','expected\x20','win32','repairCommand','@lovrabet\x5clovrabet-cli','\x20->\x20','/-/package/','entries','validation','args','relative','trim','stderr','current','run','fromEntries','\x20dist-tags,\x20then\x20retry.','basename','dirname','json',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','CLI\x20updated\x20to\x20v','Run:\x20',',\x20found\x20','map','\x20version\x20from\x20npm.','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','cwd','\x20doctor','\x20\x20CLI\x20Built-in\x20Skill\x20','install','18pVMFUK','Install\x20a\x20specific\x20CLI\x20version','Invalid\x20version:\x20','496800UXJGRx','node_modules','str','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','write','@lovrabet/lovrabet-cli','283680eAgQUI','apiError','error','nonInteractive','Updated\x20to\x20v','bool','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','update','exitCode','includes','248YWcnfz','Checking\x20CLI\x20Built-in\x20Skill...','boolean','\x20is\x20current.','beta','317865DEfDOa','11qrCQDU','Unable\x20to\x20resolve\x20','object','npm'];a84_0x5e52=function(){return _0x41ba9d;};return a84_0x5e52();}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':a84_0x5cea06(0x209),'description':a84_0x5cea06(0x1fa),'default':![]},{'name':a84_0x5cea06(0x20b),'type':a84_0x5cea06(0x209),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':'string','description':a84_0x5cea06(0x1f5)}];function getRequestedVersion(_0x30a259){const _0x12f06c=a84_0x5cea06,_0x2895c5=_0x30a259[_0x12f06c(0x1f9)](_0x12f06c(0x224))['trim']();if(_0x2895c5)return _0x2895c5;return String(_0x30a259[_0x12f06c(0x241)]?.[0x0]??'')[_0x12f06c(0x243)]();}async function validateUpdateFlags(_0x1a1d4e){const _0x2ab439=a84_0x5cea06,_0x1c0c88=getRequestedVersion(_0x1a1d4e),_0x2ffe0e=[_0x1a1d4e[_0x2ab439(0x202)](_0x2ab439(0x227))?_0x2ab439(0x227):'',_0x1a1d4e['bool'](_0x2ab439(0x20b))?_0x2ab439(0x20b):'',_0x1c0c88?_0x2ab439(0x224):''][_0x2ab439(0x222)](Boolean);if(_0x2ffe0e[_0x2ab439(0x220)]>0x1)throw CliErrors['validation'](_0x2ab439(0x22c),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x1c0c88&&!a84_0x4e9dca['valid'](_0x1c0c88))throw CliErrors[_0x2ab439(0x240)](_0x2ab439(0x1f6)+_0x1c0c88,_0x2ab439(0x252));}async function fetchNpmDistTags(){const _0x54883b=a84_0x5cea06;try{const _0x2b5f45=NPM_REGISTRY_BASE_URL+_0x54883b(0x23e)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x54883b(0x21a),_0x4b5e74=await fetch(_0x2b5f45,{'signal':AbortSignal[_0x54883b(0x223)](0x2710)});if(!_0x4b5e74['ok'])return null;const _0x27ba0e=await _0x4b5e74[_0x54883b(0x24b)]();if(!_0x27ba0e||typeof _0x27ba0e!==_0x54883b(0x20f))return null;return Object[_0x54883b(0x247)](Object[_0x54883b(0x23f)](_0x27ba0e)[_0x54883b(0x222)](([,_0x1e1f7d])=>typeof _0x1e1f7d==='string'&&_0x1e1f7d[_0x54883b(0x243)]())[_0x54883b(0x250)](([_0x12b7ee,_0x57127c])=>[_0x12b7ee,String(_0x57127c)[_0x54883b(0x243)]()]));}catch{return null;}}async function resolveTargetVersion(_0x377f15){const _0x223a2c=a84_0x5cea06,_0x521bda=getRequestedVersion(_0x377f15);if(_0x521bda)return{'version':_0x521bda,'source':_0x223a2c(0x224)};const _0x5f7989=_0x377f15['bool'](_0x223a2c(0x20b))?_0x223a2c(0x20b):_0x223a2c(0x227),_0x5cbcbf=await fetchNpmDistTags(),_0x42487f=_0x5cbcbf?.[_0x5f7989];if(!_0x42487f)return null;return{'version':_0x42487f,'source':_0x5f7989};}function shouldInstallTarget(_0x492a68,_0x4836bb){const _0x354e0d=a84_0x5cea06;if(_0x4836bb[_0x354e0d(0x218)]===_0x354e0d(0x224)||_0x4836bb['source']==='beta')return!a84_0x4e9dca['eq'](_0x492a68,_0x4836bb[_0x354e0d(0x224)]);return a84_0x4e9dca['lt'](_0x492a68,_0x4836bb[_0x354e0d(0x224)]);}export function installCliPackage(_0xc7609d,_0x2db104,_0x21625e=resolveCurrentCliNpmPrefix()){const _0x78db9b=a84_0x5cea06,_0x188186=LOVRABET_NPM_PACKAGE_NAME+'@'+_0xc7609d,_0x20a8cb=[_0x78db9b(0x1f3),'-g',_0x188186],_0x115d25=runNpmInstall(_0x20a8cb,_0x2db104);if(_0x115d25['ok']||!isNpmPrefixPermissionError(_0x115d25['error']))return _0x115d25;if(!_0x21625e||_0x115d25[_0x78db9b(0x1ff)]?.['toLowerCase']()[_0x78db9b(0x206)](_0x21625e[_0x78db9b(0x215)]()))return _0x115d25;return console[_0x78db9b(0x229)](_0x78db9b(0x203)+_0x21625e),runNpmInstall([..._0x20a8cb,_0x78db9b(0x232),_0x21625e],_0x2db104);}export function resolveCurrentCliNpmPrefix(_0x3aaae8=fileURLToPath(import.meta.url),_0x46f272=process[a84_0x5cea06(0x214)]){const _0x588e91=a84_0x5cea06,_0x5f377c=_0x46f272===_0x588e91(0x23a)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x339618=_0x5f377c['dirname'](_0x5f377c[_0x588e91(0x24a)](_0x5f377c[_0x588e91(0x24a)](_0x3aaae8))),_0x12f21a=_0x46f272===_0x588e91(0x23a)?_0x588e91(0x23c):_0x588e91(0x1fc);let _0x204544=_0x5f377c[_0x588e91(0x24a)](_0x339618);while(!![]){if(_0x5f377c[_0x588e91(0x249)](_0x204544)===_0x588e91(0x1f8)&&_0x5f377c[_0x588e91(0x242)](_0x204544,_0x339618)===_0x12f21a){const _0x76f591=_0x5f377c[_0x588e91(0x24a)](_0x204544);return _0x5f377c[_0x588e91(0x249)](_0x76f591)===_0x588e91(0x22e)?_0x5f377c[_0x588e91(0x24a)](_0x76f591):_0x76f591;}const _0x59c228=_0x5f377c[_0x588e91(0x24a)](_0x204544);if(_0x59c228===_0x204544)return null;_0x204544=_0x59c228;}}function runNpmInstall(_0x37e8c8,_0x18a47d){const _0x5436db=a84_0x5cea06;console['log']('*\x20'+['npm',..._0x37e8c8][_0x5436db(0x236)]('\x20'));const _0x155c61=execaSync(_0x5436db(0x210),_0x37e8c8,{'cwd':process[_0x5436db(0x253)](),'stdio':'pipe','env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0x4872f6=_0x155c61[_0x5436db(0x244)]?String(_0x155c61['stderr'])[_0x5436db(0x243)]():'',_0x473245=_0x155c61['stdout']?String(_0x155c61['stdout'])['trim']():'';if(!_0x18a47d){if(_0x473245)process[_0x5436db(0x21f)]['write'](_0x473245+'\x0a');if(_0x4872f6)process[_0x5436db(0x244)][_0x5436db(0x1fb)](_0x4872f6+'\x0a');}if(_0x155c61[_0x5436db(0x205)]===0x0)return{'ok':!![]};const _0x168bdf=_0x4872f6||_0x473245||_0x155c61['shortMessage']||'exit\x20'+(_0x155c61[_0x5436db(0x205)]??'unknown');return{'ok':![],'error':_0x168bdf};}function isNpmPrefixPermissionError(_0x11d815){const _0x35f61f=a84_0x5cea06;return Boolean(_0x11d815&&/\b(?:EACCES|EPERM)\b/[_0x35f61f(0x234)](_0x11d815));}function repairCurrentBuiltinSkill(_0xf94d1d){const _0x224df7=a84_0x5cea06;console[_0x224df7(0x21c)](_0x224df7(0x208));const _0x385f76=installBuiltinSkill({'stdio':_0xf94d1d?'pipe':_0x224df7(0x21d)});if(_0x385f76['ok']){console[_0x224df7(0x21c)](_0x224df7(0x1f2)+_0x385f76[_0x224df7(0x228)]+_0x224df7(0x20a));return;}throw CliErrors[_0x224df7(0x1fe)](_0x224df7(0x237)+(_0x385f76[_0x224df7(0x21e)]||_0x224df7(0x22d))+']:\x20'+(_0x385f76['error']||'unknown'),_0x224df7(0x24e)+_0x385f76[_0x224df7(0x23b)]+_0x224df7(0x219)+CLI_BIN_NAME+_0x224df7(0x254));}function verifyUpdatedBuiltinSkill(_0x222fa5){const _0x44f334=a84_0x5cea06;console[_0x44f334(0x21c)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x2039cf=inspectInstalledBuiltinSkillVersion(_0x222fa5);if(_0x2039cf[_0x44f334(0x22f)]===_0x44f334(0x245)){console['log']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x222fa5+_0x44f334(0x20a));return;}const _0x314bd1=_0x2039cf[_0x44f334(0x228)]?'expected\x20'+_0x222fa5+_0x44f334(0x24f)+_0x2039cf[_0x44f334(0x228)]:_0x44f334(0x239)+_0x222fa5+_0x44f334(0x233)+_0x2039cf[_0x44f334(0x22f)],_0x524cc2=_0x2039cf['reason']?_0x314bd1+':\x20'+_0x2039cf[_0x44f334(0x235)]:_0x314bd1;throw CliErrors[_0x44f334(0x1fe)](_0x44f334(0x24d)+_0x222fa5+_0x44f334(0x24c)+_0x524cc2,_0x44f334(0x24e)+_0x2039cf[_0x44f334(0x23b)]+_0x44f334(0x219)+CLI_BIN_NAME+_0x44f334(0x254));}async function execute(_0x54717f){const _0x56e5bf=a84_0x5cea06;await validateUpdateFlags(_0x54717f);const _0x2d4f34=getCliVersion();console[_0x56e5bf(0x21c)]('Current\x20version:\x20'+_0x2d4f34),console['log'](_0x56e5bf(0x216));const _0x1e4a6e=await resolveTargetVersion(_0x54717f);if(!_0x1e4a6e){const _0x4c07d=_0x54717f[_0x56e5bf(0x202)](_0x56e5bf(0x20b))?_0x56e5bf(0x20b):_0x56e5bf(0x227),_0x2be0f9=_0x56e5bf(0x20e)+_0x4c07d+_0x56e5bf(0x251);throw CliErrors[_0x56e5bf(0x1fe)](_0x2be0f9,_0x56e5bf(0x230)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4c07d);}const _0x517a1f=[_0x2d4f34,_0x1e4a6e[_0x56e5bf(0x224)]]['find'](_0x37fa0b=>!a84_0x4e9dca['valid'](_0x37fa0b));if(_0x517a1f){const _0x173f0f=_0x56e5bf(0x22a)+_0x517a1f+'.';throw CliErrors[_0x56e5bf(0x1fe)](_0x173f0f,'Run:\x20npm\x20view\x20'+LOVRABET_NPM_PACKAGE_NAME+_0x56e5bf(0x248));}if(!shouldInstallTarget(_0x2d4f34,_0x1e4a6e)){const _0x1cf04b=_0x1e4a6e[_0x56e5bf(0x218)]===_0x56e5bf(0x224)?_0x56e5bf(0x213)+_0x1e4a6e[_0x56e5bf(0x224)]+').':_0x56e5bf(0x231)+_0x1e4a6e[_0x56e5bf(0x224)]+').';return console['log'](_0x1cf04b),repairCurrentBuiltinSkill(_0x54717f[_0x56e5bf(0x200)]),{'ok':!![]};}console[_0x56e5bf(0x21c)]('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x2d4f34+_0x56e5bf(0x23d)+_0x1e4a6e[_0x56e5bf(0x224)]);const _0x134519=installCliPackage(_0x1e4a6e[_0x56e5bf(0x224)],_0x54717f[_0x56e5bf(0x200)]);if(!_0x134519['ok']){const _0x56ec5d=_0x56e5bf(0x217)+(_0x134519[_0x56e5bf(0x1ff)]||_0x56e5bf(0x21b));throw CliErrors[_0x56e5bf(0x1fe)](_0x56ec5d,'Run:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1e4a6e[_0x56e5bf(0x224)]);}return console['log'](_0x56e5bf(0x201)+_0x1e4a6e[_0x56e5bf(0x224)]+'.'),console['log']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'),verifyUpdatedBuiltinSkill(_0x1e4a6e[_0x56e5bf(0x224)]),{'ok':!![]};}export const updateDefinition={'service':a84_0x5cea06(0x204),'command':a84_0x5cea06(0x246),'description':a84_0x5cea06(0x226)+CLI_BIN_NAME+a84_0x5cea06(0x22b),'risk':a84_0x5cea06(0x238),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a85_0x14a5fb=a85_0x4a53;(function(_0x5903ce,_0x50f9d2){const _0x450be4=a85_0x4a53,_0x3d8b6b=_0x5903ce();while(!![]){try{const _0x1f696c=parseInt(_0x450be4(0x15d))/0x1+-parseInt(_0x450be4(0x15f))/0x2+-parseInt(_0x450be4(0x190))/0x3*(parseInt(_0x450be4(0x167))/0x4)+parseInt(_0x450be4(0x148))/0x5+-parseInt(_0x450be4(0x154))/0x6+-parseInt(_0x450be4(0x18a))/0x7+parseInt(_0x450be4(0x153))/0x8*(parseInt(_0x450be4(0x14a))/0x9);if(_0x1f696c===_0x50f9d2)break;else _0x3d8b6b['push'](_0x3d8b6b['shift']());}catch(_0x914426){_0x3d8b6b['push'](_0x3d8b6b['shift']());}}}(a85_0x4bd2,0xa674a));import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import{execaSync}from'execa';import a85_0x10eb0c from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';function a85_0x4bd2(){const _0x49ba49=['/-/package/','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','Version\x20comparison\x20failed:\x20',',\x20found\x20','dirname','\x20CLI\x20from\x20npm','reason','object','169004gOYqbI',',\x20then\x20verify\x20with:\x20','1045826RLsLoT','toLowerCase','version','cwd','length','state','source','test','76cOMHvL','includes','exitCode','\x20is\x20current.','nonInteractive','node_modules','write','\x20version\x20from\x20npm.','Already\x20on\x20requested\x20version\x20(v','Checking\x20npm\x20dist-tags...','repairCommand','\x20\x20CLI\x20Built-in\x20Skill\x20','join','timeout','filter','basename','map','unknown','inherit','npm','apiError','bool','Invalid\x20version:\x20','error',',\x20state\x20','Update\x20the\x20','log','Updated\x20to\x20v','Current\x20version:\x20','find','platform','Install\x20a\x20specific\x20CLI\x20version','fromEntries','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','boolean','6841912pYtoGL','args','exit\x20','skillVersion','trim','stdout','70497oJXqzI','beta','string','win32','\x20->\x20',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','\x20dist-tags,\x20then\x20retry.','Run:\x20npm\x20install\x20-g\x20','Updating\x20','pipe','expected\x20','json','/dist-tags','Checking\x20CLI\x20Built-in\x20Skill...','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','lib','2061975avNHmV','relative','20473740CzxGmq','validation','\x20doctor','Already\x20up\x20to\x20date\x20(v','latest','entries','valid','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','stderr','8WKSWBi','1365882lfBHIG'];a85_0x4bd2=function(){return _0x49ba49;};return a85_0x4bd2();}import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':'latest','type':a85_0x14a5fb(0x189),'description':'Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','default':![]},{'name':'beta','type':a85_0x14a5fb(0x189),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a85_0x14a5fb(0x161),'type':'string','description':a85_0x14a5fb(0x186)}];function getRequestedVersion(_0x3986fc){const _0x18e880=a85_0x14a5fb,_0xc4fe9b=_0x3986fc['str'](_0x18e880(0x161))[_0x18e880(0x18e)]();if(_0xc4fe9b)return _0xc4fe9b;return String(_0x3986fc[_0x18e880(0x18b)]?.[0x0]??'')[_0x18e880(0x18e)]();}async function validateUpdateFlags(_0x341305){const _0x4a1e43=a85_0x14a5fb,_0x3b0f18=getRequestedVersion(_0x341305),_0x4a0c41=[_0x341305[_0x4a1e43(0x17c)](_0x4a1e43(0x14e))?_0x4a1e43(0x14e):'',_0x341305[_0x4a1e43(0x17c)](_0x4a1e43(0x191))?_0x4a1e43(0x191):'',_0x3b0f18?_0x4a1e43(0x161):''][_0x4a1e43(0x175)](Boolean);if(_0x4a0c41[_0x4a1e43(0x163)]>0x1)throw CliErrors[_0x4a1e43(0x14b)](_0x4a1e43(0x146),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x3b0f18&&!a85_0x10eb0c['valid'](_0x3b0f18))throw CliErrors[_0x4a1e43(0x14b)](_0x4a1e43(0x17d)+_0x3b0f18,_0x4a1e43(0x156));}async function fetchNpmDistTags(){const _0x37e038=a85_0x14a5fb;try{const _0x5f1568=NPM_REGISTRY_BASE_URL+_0x37e038(0x155)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x37e038(0x144),_0x35cf18=await fetch(_0x5f1568,{'signal':AbortSignal[_0x37e038(0x174)](0x2710)});if(!_0x35cf18['ok'])return null;const _0x95b1b4=await _0x35cf18[_0x37e038(0x143)]();if(!_0x95b1b4||typeof _0x95b1b4!==_0x37e038(0x15c))return null;return Object[_0x37e038(0x187)](Object[_0x37e038(0x14f)](_0x95b1b4)['filter'](([,_0x51c65f])=>typeof _0x51c65f===_0x37e038(0x192)&&_0x51c65f[_0x37e038(0x18e)]())[_0x37e038(0x177)](([_0x1b8835,_0xf59629])=>[_0x1b8835,String(_0xf59629)[_0x37e038(0x18e)]()]));}catch{return null;}}async function resolveTargetVersion(_0x32a812){const _0x2fee9b=a85_0x14a5fb,_0x12d44b=getRequestedVersion(_0x32a812);if(_0x12d44b)return{'version':_0x12d44b,'source':_0x2fee9b(0x161)};const _0x2905f7=_0x32a812[_0x2fee9b(0x17c)](_0x2fee9b(0x191))?_0x2fee9b(0x191):_0x2fee9b(0x14e),_0x32eb49=await fetchNpmDistTags(),_0x127f22=_0x32eb49?.[_0x2905f7];if(!_0x127f22)return null;return{'version':_0x127f22,'source':_0x2905f7};}function a85_0x4a53(_0x53c7fa,_0x2705e8){_0x53c7fa=_0x53c7fa-0x13e;const _0x4bd2e4=a85_0x4bd2();let _0x4a5328=_0x4bd2e4[_0x53c7fa];return _0x4a5328;}function shouldInstallTarget(_0x4a0a22,_0x56456){const _0x5617c2=a85_0x14a5fb;if(_0x56456[_0x5617c2(0x165)]===_0x5617c2(0x161)||_0x56456[_0x5617c2(0x165)]===_0x5617c2(0x191))return!a85_0x10eb0c['eq'](_0x4a0a22,_0x56456['version']);return a85_0x10eb0c['lt'](_0x4a0a22,_0x56456['version']);}export function installCliPackage(_0x17cdc9,_0x394574,_0x4996fe=resolveCurrentCliNpmPrefix()){const _0x38db8c=a85_0x14a5fb,_0x4a4330=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x17cdc9,_0x47fb97=['install','-g',_0x4a4330],_0x5d2ad9=runNpmInstall(_0x47fb97,_0x394574);if(_0x5d2ad9['ok']||!isNpmPrefixPermissionError(_0x5d2ad9[_0x38db8c(0x17e)]))return _0x5d2ad9;if(!_0x4996fe||_0x5d2ad9[_0x38db8c(0x17e)]?.['toLowerCase']()[_0x38db8c(0x168)](_0x4996fe[_0x38db8c(0x160)]()))return _0x5d2ad9;return console['warn'](_0x38db8c(0x188)+_0x4996fe),runNpmInstall([..._0x47fb97,'--prefix',_0x4996fe],_0x394574);}export function resolveCurrentCliNpmPrefix(_0x4ec1eb=fileURLToPath(import.meta.url),_0xe9dd14=process[a85_0x14a5fb(0x185)]){const _0x46df55=a85_0x14a5fb,_0x3e8528=_0xe9dd14===_0x46df55(0x193)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x6b52cb=_0x3e8528[_0x46df55(0x159)](_0x3e8528['dirname'](_0x3e8528['dirname'](_0x4ec1eb))),_0x2c9823=_0xe9dd14==='win32'?'@lovrabet\x5clovrabet-cli':'@lovrabet/lovrabet-cli';let _0xfe5cd1=_0x3e8528[_0x46df55(0x159)](_0x6b52cb);while(!![]){if(_0x3e8528['basename'](_0xfe5cd1)===_0x46df55(0x16c)&&_0x3e8528[_0x46df55(0x149)](_0xfe5cd1,_0x6b52cb)===_0x2c9823){const _0xfa5d6d=_0x3e8528[_0x46df55(0x159)](_0xfe5cd1);return _0x3e8528[_0x46df55(0x176)](_0xfa5d6d)===_0x46df55(0x147)?_0x3e8528[_0x46df55(0x159)](_0xfa5d6d):_0xfa5d6d;}const _0x146a4b=_0x3e8528[_0x46df55(0x159)](_0xfe5cd1);if(_0x146a4b===_0xfe5cd1)return null;_0xfe5cd1=_0x146a4b;}}function runNpmInstall(_0x40f8ac,_0x503770){const _0x5ca1d4=a85_0x14a5fb;console['log']('*\x20'+[_0x5ca1d4(0x17a),..._0x40f8ac][_0x5ca1d4(0x173)]('\x20'));const _0x4357d6=execaSync('npm',_0x40f8ac,{'cwd':process[_0x5ca1d4(0x162)](),'stdio':'pipe','env':process.env,'extendEnv':![],'shell':![],'reject':![]}),_0x201efe=_0x4357d6[_0x5ca1d4(0x152)]?String(_0x4357d6['stderr'])[_0x5ca1d4(0x18e)]():'',_0x4d8321=_0x4357d6[_0x5ca1d4(0x18f)]?String(_0x4357d6[_0x5ca1d4(0x18f)])[_0x5ca1d4(0x18e)]():'';if(!_0x503770){if(_0x4d8321)process[_0x5ca1d4(0x18f)][_0x5ca1d4(0x16d)](_0x4d8321+'\x0a');if(_0x201efe)process[_0x5ca1d4(0x152)][_0x5ca1d4(0x16d)](_0x201efe+'\x0a');}if(_0x4357d6[_0x5ca1d4(0x169)]===0x0)return{'ok':!![]};const _0xfd081f=_0x201efe||_0x4d8321||_0x4357d6['shortMessage']||_0x5ca1d4(0x18c)+(_0x4357d6[_0x5ca1d4(0x169)]??_0x5ca1d4(0x178));return{'ok':![],'error':_0xfd081f};}function isNpmPrefixPermissionError(_0x47d859){const _0x30db36=a85_0x14a5fb;return Boolean(_0x47d859&&/\b(?:EACCES|EPERM)\b/[_0x30db36(0x166)](_0x47d859));}function repairCurrentBuiltinSkill(_0x5b30b3){const _0x545b68=a85_0x14a5fb;console['log'](_0x545b68(0x145));const _0x3a1dba=installBuiltinSkill({'stdio':_0x5b30b3?_0x545b68(0x141):_0x545b68(0x179)});if(_0x3a1dba['ok']){console[_0x545b68(0x181)](_0x545b68(0x172)+_0x3a1dba['skillVersion']+'\x20is\x20current.');return;}throw CliErrors[_0x545b68(0x17b)]('CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+(_0x3a1dba['code']||'INSTALL_FAILED')+']:\x20'+(_0x3a1dba[_0x545b68(0x17e)]||_0x545b68(0x178)),'Run:\x20'+_0x3a1dba['repairCommand']+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x540e7b){const _0xefaa36=a85_0x14a5fb;console[_0xefaa36(0x181)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x200bad=inspectInstalledBuiltinSkillVersion(_0x540e7b);if(_0x200bad[_0xefaa36(0x164)]==='current'){console[_0xefaa36(0x181)](_0xefaa36(0x172)+_0x540e7b+_0xefaa36(0x16a));return;}const _0x1d6e21=_0x200bad[_0xefaa36(0x18d)]?_0xefaa36(0x142)+_0x540e7b+_0xefaa36(0x158)+_0x200bad['skillVersion']:_0xefaa36(0x142)+_0x540e7b+_0xefaa36(0x17f)+_0x200bad[_0xefaa36(0x164)],_0x14718a=_0x200bad[_0xefaa36(0x15b)]?_0x1d6e21+':\x20'+_0x200bad[_0xefaa36(0x15b)]:_0x1d6e21;throw CliErrors[_0xefaa36(0x17b)]('CLI\x20updated\x20to\x20v'+_0x540e7b+_0xefaa36(0x195)+_0x14718a,'Run:\x20'+_0x200bad[_0xefaa36(0x171)]+_0xefaa36(0x15e)+CLI_BIN_NAME+_0xefaa36(0x14c));}async function execute(_0x172df0){const _0x477eda=a85_0x14a5fb;await validateUpdateFlags(_0x172df0);const _0x1e7a3b=getCliVersion();console[_0x477eda(0x181)](_0x477eda(0x183)+_0x1e7a3b),console[_0x477eda(0x181)](_0x477eda(0x170));const _0x1c2933=await resolveTargetVersion(_0x172df0);if(!_0x1c2933){const _0x526eef=_0x172df0[_0x477eda(0x17c)](_0x477eda(0x191))?_0x477eda(0x191):_0x477eda(0x14e),_0x243699='Unable\x20to\x20resolve\x20'+_0x526eef+_0x477eda(0x16e);throw CliErrors[_0x477eda(0x17b)](_0x243699,_0x477eda(0x13f)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x526eef);}const _0x571286=[_0x1e7a3b,_0x1c2933[_0x477eda(0x161)]][_0x477eda(0x184)](_0x142c56=>!a85_0x10eb0c[_0x477eda(0x150)](_0x142c56));if(_0x571286){const _0x48980f=_0x477eda(0x157)+_0x571286+'.';throw CliErrors['apiError'](_0x48980f,'Run:\x20npm\x20view\x20'+LOVRABET_NPM_PACKAGE_NAME+_0x477eda(0x13e));}if(!shouldInstallTarget(_0x1e7a3b,_0x1c2933)){const _0x377777=_0x1c2933[_0x477eda(0x165)]==='version'?_0x477eda(0x16f)+_0x1c2933[_0x477eda(0x161)]+').':_0x477eda(0x14d)+_0x1c2933[_0x477eda(0x161)]+').';return console[_0x477eda(0x181)](_0x377777),repairCurrentBuiltinSkill(_0x172df0[_0x477eda(0x16b)]),{'ok':!![]};}console['log'](_0x477eda(0x140)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x1e7a3b+_0x477eda(0x194)+_0x1c2933[_0x477eda(0x161)]);const _0x32799b=installCliPackage(_0x1c2933[_0x477eda(0x161)],_0x172df0[_0x477eda(0x16b)]);if(!_0x32799b['ok']){const _0x4cb822='Update\x20failed:\x20'+(_0x32799b[_0x477eda(0x17e)]||'unknown');throw CliErrors[_0x477eda(0x17b)](_0x4cb822,_0x477eda(0x13f)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1c2933[_0x477eda(0x161)]);}return console[_0x477eda(0x181)](_0x477eda(0x182)+_0x1c2933[_0x477eda(0x161)]+'.'),console[_0x477eda(0x181)](_0x477eda(0x151)),verifyUpdatedBuiltinSkill(_0x1c2933[_0x477eda(0x161)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':'run','description':a85_0x14a5fb(0x180)+CLI_BIN_NAME+a85_0x14a5fb(0x15a),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x57e19a=a86_0x5584;(function(_0x5b8c4d,_0x1f7ff9){const _0x55faae=a86_0x5584,_0x4f7a14=_0x5b8c4d();while(!![]){try{const _0x1365bd=parseInt(_0x55faae(0xe2))/0x1*(-parseInt(_0x55faae(0xd1))/0x2)+parseInt(_0x55faae(0xcf))/0x3+-parseInt(_0x55faae(0xdd))/0x4*(parseInt(_0x55faae(0xe1))/0x5)+parseInt(_0x55faae(0xd8))/0x6+-parseInt(_0x55faae(0xe5))/0x7+-parseInt(_0x55faae(0xe6))/0x8+parseInt(_0x55faae(0xcb))/0x9;if(_0x1365bd===_0x1f7ff9)break;else _0x4f7a14['push'](_0x4f7a14['shift']());}catch(_0x32dc3a){_0x4f7a14['push'](_0x4f7a14['shift']());}}}(a86_0xba41,0x87673));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a86_0x57e19a(0xce),SUPPORTED_PROVIDERS=[a86_0x57e19a(0xd3)];function readBindingInput(_0x55b23c){const _0x566fa8=a86_0x57e19a,_0x41e082=_0x55b23c[_0x566fa8(0xca)](_0x566fa8(0xd0))[_0x566fa8(0xde)]()['toLowerCase']();if(!SUPPORTED_PROVIDERS[_0x566fa8(0xd5)](_0x41e082))throw CliErrors[_0x566fa8(0xdc)](_0x566fa8(0xcd)+(_0x41e082||_0x566fa8(0xe9))+'.',_0x566fa8(0xd4)+SUPPORTED_PROVIDERS[_0x566fa8(0xdf)](',\x20')+'.');const _0x3eba14=_0x55b23c[_0x566fa8(0xca)](_0x566fa8(0xe0))[_0x566fa8(0xde)]();if(!_0x3eba14)throw CliErrors[_0x566fa8(0xdc)](_0x566fa8(0xe8),'Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.');return{'provider':_0x41e082,'accountId':_0x3eba14};}function buildBindingData(_0x878407,_0xbf0178,_0x4cab60){return{'operation':'bind','selector':{'provider':_0x878407,'accountId':_0xbf0178},'before':null,'after':{'provider':_0x878407,'accountId':_0xbf0178,'bound':!![]},'dryRun':_0x4cab60,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':'user-account','command':a86_0x57e19a(0xc9),'description':a86_0x57e19a(0xe3),'risk':a86_0x57e19a(0xdb),'confirmationDescription':a86_0x57e19a(0xe7),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':'provider','type':a86_0x57e19a(0xd9),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':a86_0x57e19a(0xcc)},{'name':a86_0x57e19a(0xe0),'type':'string','required':!![],'description':'External\x20account\x20ID\x20for\x20the\x20selected\x20provider'}],async 'validate'(_0x5a6279){readBindingInput(_0x5a6279);},async 'dryRun'(_0x30d634){const _0x354f0d=a86_0x57e19a,{provider:_0x1ec3fc,accountId:_0x2d69fb}=readBindingInput(_0x30d634);return{...buildBindingData(_0x1ec3fc,_0x2d69fb,!![]),'method':_0x354f0d(0xd7),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x1ec3fc,'accountId':_0x2d69fb}};},async 'execute'(_0xf0e5b1){const _0x304454=a86_0x57e19a,{provider:_0x511350,accountId:_0x238861}=readBindingInput(_0xf0e5b1),_0x3ceb42=await bindExternalUserAccount(_0x511350,_0x238861);if(_0x3ceb42!==!![])throw CliErrors[_0x304454(0xe4)](_0x304454(0xd6),_0x304454(0xd2));return{'ok':!![],'data':buildBindingData(_0x511350,_0x238861,![]),'message':_0x304454(0xda)};}};function a86_0x5584(_0xb8713a,_0xbe3515){_0xb8713a=_0xb8713a-0xc9;const _0xba41e5=a86_0xba41();let _0x5584d1=_0xba41e5[_0xb8713a];return _0x5584d1;}function a86_0xba41(){const _0x3821f1=['436YuPLab','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.','dingtalk','Pass\x20one\x20of:\x20','includes','External\x20account\x20binding\x20was\x20not\x20confirmed.','POST','2310288vaNieG','string','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','write','validation','554908AQyEey','trim','join','account-id','35KyIQUJ','4733UNkMLr','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','apiError','2703848JuoEIm','8625704QfUfhL','Binds\x20the\x20platform\x20user\x20of\x20the\x20current\x20AccessKey\x20to\x20the\x20given\x20collaboration-provider\x20account.\x20An\x20existing\x20bind\x20for\x20the\x20same\x20provider\x20may\x20be\x20replaced.','--account-id\x20cannot\x20be\x20empty.','(empty)','bind','str','22823361jmloCN','External\x20account\x20provider','Unsupported\x20provider:\x20','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','3302982RHiUSo','provider'];a86_0xba41=function(){return _0x3821f1;};return a86_0xba41();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x316fdd,_0x80a529){const _0x4bfe78=a87_0x4c19,_0x588507=_0x316fdd();while(!![]){try{const _0x3ae941=parseInt(_0x4bfe78(0x17f))/0x1+parseInt(_0x4bfe78(0x182))/0x2+parseInt(_0x4bfe78(0x186))/0x3+parseInt(_0x4bfe78(0x181))/0x4+parseInt(_0x4bfe78(0x184))/0x5*(-parseInt(_0x4bfe78(0x185))/0x6)+-parseInt(_0x4bfe78(0x17e))/0x7*(parseInt(_0x4bfe78(0x183))/0x8)+parseInt(_0x4bfe78(0x17d))/0x9*(-parseInt(_0x4bfe78(0x180))/0xa);if(_0x3ae941===_0x80a529)break;else _0x588507['push'](_0x588507['shift']());}catch(_0x52cb56){_0x588507['push'](_0x588507['shift']());}}}(a87_0x457e,0x37141));function a87_0x4c19(_0x28a05d,_0x516e4b){_0x28a05d=_0x28a05d-0x17d;const _0x457e30=a87_0x457e();let _0x4c1964=_0x457e30[_0x28a05d];return _0x4c1964;}function a87_0x457e(){const _0x136f78=['4110kMivGn','1380cQlVHb','1123542IPXBEo','3789810IfkmEa','295736CvoNIq','324519JVkEXl','10sLVRHS','598832aArgRL','58516kFdFPS','8KggIUC'];a87_0x457e=function(){return _0x136f78;};return a87_0x457e();}import{bindUserAccount}from'../../commands/user-account/bind.js';export const userAccountDefinitions=[bindUserAccount];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x4617b1=a88_0x1bab;(function(_0xdde6e6,_0x41d9dd){const _0x5e4ed7=a88_0x1bab,_0x3d1b34=_0xdde6e6();while(!![]){try{const _0x2f399b=-parseInt(_0x5e4ed7(0x9b))/0x1+parseInt(_0x5e4ed7(0xa1))/0x2*(parseInt(_0x5e4ed7(0xa6))/0x3)+-parseInt(_0x5e4ed7(0x94))/0x4+parseInt(_0x5e4ed7(0x8e))/0x5+-parseInt(_0x5e4ed7(0xa4))/0x6*(-parseInt(_0x5e4ed7(0x82))/0x7)+parseInt(_0x5e4ed7(0xb6))/0x8*(-parseInt(_0x5e4ed7(0x79))/0x9)+-parseInt(_0x5e4ed7(0xaf))/0xa;if(_0x2f399b===_0x41d9dd)break;else _0x3d1b34['push'](_0x3d1b34['shift']());}catch(_0x3fcd38){_0x3d1b34['push'](_0x3d1b34['shift']());}}}(a88_0xd59a,0x3ff7b));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':a88_0x4617b1(0x9f),'type':a88_0x4617b1(0x90),'description':'App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default'},{'name':a88_0x4617b1(0x9e),'type':a88_0x4617b1(0x90),'description':a88_0x4617b1(0xb2)},{'name':a88_0x4617b1(0x86),'type':a88_0x4617b1(0x90),'description':a88_0x4617b1(0xa5),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x4eec2a,_0x259f41){const _0x1806e5=a88_0x4617b1,_0x3e61f5=_0x4eec2a[_0x1806e5(0xad)](_0x1806e5(0x9f))[_0x1806e5(0xb7)](),_0x2d9072=_0x4eec2a[_0x1806e5(0xad)](_0x1806e5(0x9e))[_0x1806e5(0xb7)](),_0x5f0c2f=_0x4eec2a[_0x1806e5(0xad)](_0x1806e5(0x86))[_0x1806e5(0xb7)](),_0x232fe6=resolveWorkspaceEnv(_0x5f0c2f||_0x4eec2a[_0x1806e5(0x95)]||DEFAULT_CONFIG_VALUES['env']);if(!_0x3e61f5&&!_0x2d9072)throw CliErrors[_0x1806e5(0x7f)]('Missing\x20workspace\x20app\x20selector.',_0x1806e5(0x7b)+CLI_BIN_NAME+_0x1806e5(0x84)+_0x259f41+_0x1806e5(0x80)+CLI_BIN_NAME+'\x20workspace\x20'+_0x259f41+_0x1806e5(0x98));if(_0x3e61f5&&_0x2d9072)throw CliErrors['validation'](_0x1806e5(0x7a),'Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.');const _0x42b518=resolveWriteConfigPath(_0x1806e5(0xa2)),_0x376024=readConfigFile(_0x42b518);assertWorkspaceCommandState(_0x259f41,_0x376024);const _0x1df74e=_0x2d9072||await resolveRemoteAppCode({'command':_0x259f41,'appName':_0x3e61f5,'env':_0x232fe6,'accessKey':_0x4eec2a[_0x1806e5(0x92)]});return writeWorkspaceConfig({'command':_0x259f41,'appName':_0x3e61f5,'appcode':_0x1df74e,'env':_0x232fe6,'shouldWriteEnv':!!_0x5f0c2f,'accessKey':_0x4eec2a[_0x1806e5(0x92)]},_0x42b518,_0x376024),{'ok':!![],'data':{'configPath':_0x42b518,'app':_0x3e61f5||null,'appcode':_0x1df74e,'env':_0x5f0c2f?_0x232fe6:null,'accessKeyWritten':![],'command':_0x1806e5(0x8c)+_0x259f41},'message':buildWorkspaceMessage(_0x42b518,_0x3e61f5,_0x1df74e,_0x5f0c2f?_0x232fe6:undefined)};}async function resolveRemoteAppCode(_0x454c73){const _0x590ef2=a88_0x4617b1;if(!_0x454c73['accessKey'])throw CliErrors[_0x590ef2(0x89)](_0x590ef2(0x97)+CLI_BIN_NAME+_0x590ef2(0x84)+_0x454c73['command']+'.');const {setActiveAK:_0x5d5fc2}=await import(_0x590ef2(0xa0)),{getRemoteAppList:_0x27a668}=await import('../../commands/app/remote-source.js');_0x5d5fc2(_0x454c73['accessKey']);const _0x231486=await _0x27a668({'env':_0x454c73[_0x590ef2(0x86)],'accessKey':_0x454c73[_0x590ef2(0x92)],'noCache':![]}),_0x340d00=findAppByName(_0x231486[_0x590ef2(0xa7)],_0x454c73[_0x590ef2(0x83)]);if(_0x340d00&&!isRuntimeAccessibleApp(_0x340d00))throw runtimeInaccessibleAppError(_0x340d00,'\x22'+_0x454c73[_0x590ef2(0x83)]+'\x22');const _0x35eb01=_0x340d00?.[_0x590ef2(0x9d)]?.[_0x590ef2(0xb7)]();if(_0x35eb01)return _0x35eb01;const _0x45d7a0=_0x231486[_0x590ef2(0xa7)][_0x590ef2(0xa9)](_0x34d00e=>_0x34d00e[_0x590ef2(0x83)])[_0x590ef2(0xb1)](Boolean),_0x2a5577=_0x45d7a0[_0x590ef2(0xa8)]?_0x590ef2(0x8a)+Array[_0x590ef2(0xb0)](new Set(_0x45d7a0))['join'](',\x20')+'.':_0x590ef2(0x8f)+CLI_BIN_NAME+_0x590ef2(0x78);throw CliErrors[_0x590ef2(0x7f)](_0x590ef2(0x9a)+_0x454c73[_0x590ef2(0x83)]+_0x590ef2(0xae),_0x2a5577);}function writeWorkspaceConfig(_0x9f5e18,_0x29e078,_0xa060c9){const _0x5d3ccf=a88_0x4617b1;_0x9f5e18[_0x5d3ccf(0xb5)]&&(_0xa060c9[_0x5d3ccf(0x86)]=_0x9f5e18[_0x5d3ccf(0x86)]);if(_0x9f5e18[_0x5d3ccf(0x83)]){const _0x4fb98f=isRecord(_0xa060c9[_0x5d3ccf(0xb3)])?{..._0xa060c9[_0x5d3ccf(0xb3)]}:{},_0x1e5e84=isRecord(_0x4fb98f[_0x9f5e18[_0x5d3ccf(0x83)]])?_0x4fb98f[_0x9f5e18['appName']]:{};return _0x4fb98f[_0x9f5e18['appName']]={..._0x1e5e84,'appcode':_0x9f5e18['appcode']},_0xa060c9[_0x5d3ccf(0xb3)]=_0x4fb98f,_0xa060c9[_0x5d3ccf(0x99)]=_0x9f5e18[_0x5d3ccf(0x83)],delete _0xa060c9[_0x5d3ccf(0x9e)],delete _0xa060c9[_0x5d3ccf(0x9f)],writeAndReturn(_0x29e078,_0xa060c9);}return _0xa060c9[_0x5d3ccf(0x9e)]=_0x9f5e18[_0x5d3ccf(0x9e)],delete _0xa060c9[_0x5d3ccf(0x99)],delete _0xa060c9[_0x5d3ccf(0x9f)],writeAndReturn(_0x29e078,_0xa060c9);}function writeAndReturn(_0x10fce6,_0xace66a){return writeConfigFile(_0x10fce6,_0xace66a),_0x10fce6;}function resolveWorkspaceEnv(_0x42937f){const _0x3f93f0=a88_0x4617b1;if(RUNTIME_ENV_VALUES['includes'](_0x42937f))return _0x42937f;throw CliErrors[_0x3f93f0(0x7f)](_0x3f93f0(0x85)+_0x42937f+_0x3f93f0(0xab)+RUNTIME_ENV_VALUES['join'](',\x20'));}function buildWorkspaceMessage(_0x557183,_0x3da6d0,_0x47b2d5,_0x4f1561){const _0x21a061=a88_0x4617b1,_0x578cb1=_0x3da6d0?_0x3da6d0+'\x20('+_0x47b2d5+')':_0x47b2d5,_0x4b2785=_0x4f1561?_0x21a061(0x7c)+_0x4f1561:'';return _0x21a061(0x81)+_0x557183+_0x21a061(0x8b)+_0x578cb1+_0x4b2785+_0x21a061(0x88);}function isRecord(_0x5065d9){const _0x139b80=a88_0x4617b1;return typeof _0x5065d9==='object'&&_0x5065d9!==null&&!Array[_0x139b80(0x8d)](_0x5065d9);}function a88_0x1bab(_0x5a7072,_0x280b34){_0x5a7072=_0x5a7072-0x78;const _0xd59a99=a88_0xd59a();let _0x1babc9=_0xd59a99[_0x5a7072];return _0x1babc9;}function hasWorkspaceAppBinding(_0x7e9e41){const _0x5d8283=a88_0x4617b1;if(typeof _0x7e9e41[_0x5d8283(0x9e)]===_0x5d8283(0x90)&&_0x7e9e41[_0x5d8283(0x9e)][_0x5d8283(0xb7)]()[_0x5d8283(0xa8)]>0x0)return!![];if(typeof _0x7e9e41['defaultApp']!==_0x5d8283(0x90)||!_0x7e9e41['defaultApp'][_0x5d8283(0xb7)]())return![];if(!isRecord(_0x7e9e41['apps']))return![];const _0x5f0d28=_0x7e9e41[_0x5d8283(0xb3)][_0x7e9e41[_0x5d8283(0x99)][_0x5d8283(0xb7)]()];return isRecord(_0x5f0d28)&&typeof _0x5f0d28[_0x5d8283(0x9e)]==='string'&&_0x5f0d28['appcode'][_0x5d8283(0xb7)]()['length']>0x0;}function assertWorkspaceCommandState(_0x17782a,_0x5000f9){const _0xb56772=a88_0x4617b1,_0x3f0c69=hasWorkspaceAppBinding(_0x5000f9);if(_0x17782a===_0xb56772(0x91)&&_0x3f0c69)throw CliErrors['validation']('Workspace\x20app\x20context\x20is\x20already\x20initialized.',_0xb56772(0xaa)+CLI_BIN_NAME+_0xb56772(0x7d)+CLI_BIN_NAME+_0xb56772(0xac));if(_0x17782a===_0xb56772(0x96)&&!_0x3f0c69)throw CliErrors[_0xb56772(0x7f)](_0xb56772(0x93),_0xb56772(0x8f)+CLI_BIN_NAME+_0xb56772(0xb8)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');}function a88_0xd59a(){const _0x5d6c7c=['\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','Workspace\x20configured.\x0aConfig\x20file:\x20','7KbQuzZ','appName','\x20workspace\x20','Invalid\x20env\x20\x22','env','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.','\x0aAccessKey:\x20not\x20written','authRequired','Available\x20apps:\x20','\x0aDefault\x20app:\x20','workspace\x20','isArray','2215345nrdGVJ','Run\x20`','string','init','accessKey','Workspace\x20app\x20context\x20is\x20not\x20initialized.','1442492fcITSe','envName','use','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','\x20--appcode\x20<code>\x20[--env\x20daily]','defaultApp','App\x20\x22','208457QJYqWX','write','appCode','appcode','app','../../core/api-client.js','44974QrOsKm','project','workspace','3105174mrsKkG','Target\x20environment','45CJqczw','items','length','map','Use\x20`','\x22.\x20Allowed:\x20','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','str','\x22\x20not\x20found.','258010lxYCXc','from','filter','App\x20code\x20to\x20bind\x20directly','apps','Updates\x20the\x20app\x20binding\x20already\x20present\x20in\x20the\x20current\x20working\x20directory\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','shouldWriteEnv','3528088idDjwE','trim','\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','9JTvtwn','Conflicting\x20workspace\x20app\x20selectors.','Usage:\x20','\x0aEnv:\x20','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet','validation'];a88_0xd59a=function(){return _0x5d6c7c;};return a88_0xd59a();}function makeWorkspaceCommand(_0x25e0ff){const _0x17d391=a88_0x4617b1;return{'service':_0x17d391(0xa3),'command':_0x25e0ff,'description':_0x25e0ff===_0x17d391(0x91)?_0x17d391(0x7e):'Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','risk':_0x17d391(0x9c),'confirmationDescription':_0x25e0ff===_0x17d391(0x91)?_0x17d391(0x87):_0x17d391(0xb4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0xa96131){return executeWorkspaceUse(_0xa96131,_0x25e0ff);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a88_0x4617b1(0x91)),makeWorkspaceCommand(a88_0x4617b1(0x96))];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x34db4c=a89_0x5aa8;(function(_0x581ce8,_0x24f29a){const _0x3484a9=a89_0x5aa8,_0x4da9a0=_0x581ce8();while(!![]){try{const _0x31df98=parseInt(_0x3484a9(0xd6))/0x1*(parseInt(_0x3484a9(0xd9))/0x2)+-parseInt(_0x3484a9(0xe9))/0x3+-parseInt(_0x3484a9(0xff))/0x4+parseInt(_0x3484a9(0xdc))/0x5+-parseInt(_0x3484a9(0xd8))/0x6+-parseInt(_0x3484a9(0x108))/0x7*(-parseInt(_0x3484a9(0x102))/0x8)+-parseInt(_0x3484a9(0xf4))/0x9;if(_0x31df98===_0x24f29a)break;else _0x4da9a0['push'](_0x4da9a0['shift']());}catch(_0x2a756b){_0x4da9a0['push'](_0x4da9a0['shift']());}}}(a89_0x4d6f,0xa89b2));function a89_0x5aa8(_0x37d9c9,_0x5cb4e4){_0x37d9c9=_0x37d9c9-0xce;const _0x4d6f69=a89_0x4d6f();let _0x5aa891=_0x4d6f69[_0x37d9c9];return _0x5aa891;}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=[a89_0x34db4c(0xfd),a89_0x34db4c(0xf6),a89_0x34db4c(0xd3),a89_0x34db4c(0xec)];const DOMAIN_FLAGS={'userDomain':a89_0x34db4c(0x103),'apiDomain':a89_0x34db4c(0xeb),'runtimeDomain':a89_0x34db4c(0xee),'skillDomain':a89_0x34db4c(0xef)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a89_0x34db4c(0xe0),'platformDomain',a89_0x34db4c(0xd5),a89_0x34db4c(0xe8)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a89_0x34db4c(0xfd),'apiDomain':'apiDomain','runtimeDomain':a89_0x34db4c(0xd3),'skillDomain':'skillDomain'},ROUTING_CONSUMER='lovrabet-cli';export function normalizeDomainOrigin(_0x53cef1,_0x2907b9){const _0x9211d5=a89_0x34db4c;if(typeof _0x2907b9!=='string'||!_0x2907b9[_0x9211d5(0xe3)]())throw CliErrors[_0x9211d5(0xfc)](_0x9211d5(0xf1)+_0x53cef1+_0x9211d5(0xe7));let _0xb916d9;try{_0xb916d9=new URL(_0x2907b9[_0x9211d5(0xe3)]());}catch{throw CliErrors[_0x9211d5(0xfc)](_0x9211d5(0xf1)+_0x53cef1+_0x9211d5(0xed)+_0x2907b9+_0x9211d5(0xd7));}if(_0xb916d9[_0x9211d5(0x109)]!==_0x9211d5(0xe6)||_0xb916d9[_0x9211d5(0x104)]||_0xb916d9['password']||_0xb916d9['pathname']!=='/'&&_0xb916d9[_0x9211d5(0xce)]!==''||_0xb916d9[_0x9211d5(0xdb)]||_0xb916d9[_0x9211d5(0xe2)])throw CliErrors[_0x9211d5(0xfc)](_0x9211d5(0xf1)+_0x53cef1+_0x9211d5(0x101),_0x9211d5(0xf0));return _0xb916d9['origin'];}export function normalizeRoutingDomainValue(_0xe92b55,_0x46df8f){const _0x5982a7=a89_0x34db4c;if(typeof _0x46df8f==='string')return normalizeDomainOrigin(_0xe92b55,_0x46df8f);if(!_0x46df8f||typeof _0x46df8f!==_0x5982a7(0xd0)||Array[_0x5982a7(0xfb)](_0x46df8f))throw CliErrors[_0x5982a7(0xfc)](_0x5982a7(0xf1)+_0xe92b55+':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.');const _0x581b45=_0x46df8f,_0x3bb9af=_0x581b45[ROUTING_CONSUMER]??_0x581b45['default'];if(_0x3bb9af===undefined)throw CliErrors[_0x5982a7(0xfc)](_0x5982a7(0xe5)+_0xe92b55+'\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20'+ROUTING_CONSUMER+_0x5982a7(0xf3));return normalizeDomainOrigin(_0xe92b55,_0x3bb9af);}export function resolveEnterpriseRoutingConfig(_0x460ced){const _0xbe1fb4=a89_0x34db4c;if(_0x460ced===undefined)return undefined;if(!_0x460ced||typeof _0x460ced!==_0xbe1fb4(0xd0)||Array[_0xbe1fb4(0xfb)](_0x460ced))throw CliErrors[_0xbe1fb4(0xfc)](_0xbe1fb4(0xe1));return parseEnterpriseRoutingManifest(_0x460ced)['domains'];}export function readDomainConfigInput(_0x48f756){const _0x35dd47=a89_0x34db4c,_0x4dae4e=isAbsolute(_0x48f756)?_0x48f756:resolve(process[_0x35dd47(0xf7)](),_0x48f756);if(!existsSync(_0x4dae4e))throw CliErrors[_0x35dd47(0xfc)](_0x35dd47(0x105)+_0x4dae4e);let _0x48fdfa;try{_0x48fdfa=JSON['parse'](readFileSync(_0x4dae4e,'utf8'));}catch{throw CliErrors[_0x35dd47(0xfc)](_0x35dd47(0xf8)+_0x4dae4e);}if(!_0x48fdfa||typeof _0x48fdfa!==_0x35dd47(0xd0)||Array['isArray'](_0x48fdfa))throw CliErrors[_0x35dd47(0xfc)](_0x35dd47(0xda));const _0x319697=_0x48fdfa;if(_0x35dd47(0x109)in _0x319697)return parseEnterpriseRoutingManifest(_0x319697);const _0x135bc4=Object[_0x35dd47(0xdf)](_0x319697)[_0x35dd47(0xe4)](_0x417024=>!DOMAIN_CONFIG_FIELDS['includes'](_0x417024));if(_0x135bc4['length']>0x0)throw CliErrors[_0x35dd47(0xfc)]('Unsupported\x20domain\x20config\x20field(s):\x20'+_0x135bc4['join'](',\x20'),_0x35dd47(0x107)+DOMAIN_CONFIG_FIELDS[_0x35dd47(0xf5)](',\x20'));const _0x229eae={};for(const _0x3175ed of DOMAIN_CONFIG_FIELDS){_0x319697[_0x3175ed]!==undefined&&(_0x229eae[_0x3175ed]=normalizeDomainOrigin(_0x3175ed,_0x319697[_0x3175ed]));}if(Object[_0x35dd47(0xdf)](_0x229eae)[_0x35dd47(0x106)]===0x0)throw CliErrors[_0x35dd47(0xfc)](_0x35dd47(0xdd));return{'mode':_0x35dd47(0xfe),'domains':_0x229eae};}export function readDomainConfig(_0x113583){return readDomainConfigInput(_0x113583)['domains'];}export function resolveDomainConfigInput(_0x4cf26b){const _0x3c82aa=a89_0x34db4c,_0x243f74=(_0x4cf26b[_0x3c82aa(0xf9)](_0x3c82aa(0xd4))||'')[_0x3c82aa(0xe3)](),_0x5ab5cb=_0x243f74?readDomainConfigInput(_0x243f74):{'mode':_0x3c82aa(0xfe),'domains':{}},_0x30c836=DOMAIN_CONFIG_FIELDS[_0x3c82aa(0xe4)](_0x652267=>Boolean((_0x4cf26b[_0x3c82aa(0xf9)](DOMAIN_FLAGS[_0x652267])||'')['trim']()));if(_0x5ab5cb[_0x3c82aa(0xde)]===_0x3c82aa(0x100)&&_0x30c836[_0x3c82aa(0x106)]>0x0)throw CliErrors[_0x3c82aa(0xfc)](_0x3c82aa(0xfa),'Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.');for(const _0x1672d5 of DOMAIN_CONFIG_FIELDS){const _0x1b5da8=(_0x4cf26b[_0x3c82aa(0xf9)](DOMAIN_FLAGS[_0x1672d5])||'')[_0x3c82aa(0xe3)]();if(_0x1b5da8)_0x5ab5cb['domains'][_0x1672d5]=normalizeDomainOrigin(_0x1672d5,_0x1b5da8);}return _0x5ab5cb;}export function resolveDomainFlags(_0x560ea4){const _0x44cee4=a89_0x34db4c;return resolveDomainConfigInput(_0x560ea4)[_0x44cee4(0xd1)];}function a89_0x4d6f(){const _0x21cec9=['pathname','\x22\x20and\x20kind\x20\x22','object','domains','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','runtimeDomain','domain-config','skillHubDomain','13WmxeJJ','\x22\x20is\x20not\x20a\x20valid\x20URL.','6070098fizlSf','199942dLPsic','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','search','5134040gofdaT','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','mode','keys','agentDomain','Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.','hash','trim','filter','Enterprise\x20','https:',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','kbDomain','525762gcxGrj','kind','api-domain','skillDomain',':\x20\x22','runtime-domain','skill-domain','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','Invalid\x20','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','\x20and\x20has\x20no\x20default.','15258582WWVGAb','join','apiDomain','cwd','Invalid\x20domain\x20config\x20JSON:\x20','str','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','isArray','validation','userDomain','legacy','118900cqBBYu','enterprise-v1',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','109784ksfbmM','user-domain','username','Domain\x20config\x20file\x20not\x20found:\x20','length','Allowed\x20fields:\x20','651jSyteb','protocol'];a89_0x4d6f=function(){return _0x21cec9;};return a89_0x4d6f();}export function parseEnterpriseRoutingManifest(_0xfb34ed){const _0x16f700=a89_0x34db4c;if(_0xfb34ed[_0x16f700(0x109)]!==ENTERPRISE_ROUTING_PROTOCOL||_0xfb34ed[_0x16f700(0xea)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x16f700(0xfc)]('Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22'+ENTERPRISE_ROUTING_PROTOCOL+_0x16f700(0xcf)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0xfb34ed['domains']||typeof _0xfb34ed[_0x16f700(0xd1)]!==_0x16f700(0xd0)||Array[_0x16f700(0xfb)](_0xfb34ed['domains']))throw CliErrors[_0x16f700(0xfc)](_0x16f700(0xd2));const _0xd8507c=_0xfb34ed[_0x16f700(0xd1)],_0x5bdac4=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x16f700(0xe4)](_0xb01989=>_0xd8507c[_0xb01989]===undefined);if(_0x5bdac4[_0x16f700(0x106)]>0x0)throw CliErrors[_0x16f700(0xfc)](_0x16f700(0xf2)+_0x5bdac4[_0x16f700(0xf5)](',\x20'));const _0x2865c1={},_0x14d64e={};for(const _0x26f63a of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x15caa3=_0xd8507c[_0x26f63a];if(_0x15caa3===undefined)continue;const _0x489494=normalizeRoutingDomainValue(_0x26f63a,_0x15caa3);_0x2865c1[_0x26f63a]=_0x489494;const _0x2b8399=ENTERPRISE_TO_LOCAL_FIELD[_0x26f63a];_0x2b8399&&(_0x14d64e[_0x2b8399]=_0x489494);}return{'mode':'enterprise-v1','domains':_0x14d64e,'manifestDomains':_0x2865c1};}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a90_0xbcd07e=a90_0x4e01;(function(_0x4769e3,_0x5dba87){const _0x410cab=a90_0x4e01,_0x3e5b85=_0x4769e3();while(!![]){try{const _0x2a315a=-parseInt(_0x410cab(0x100))/0x1*(parseInt(_0x410cab(0x106))/0x2)+parseInt(_0x410cab(0xf0))/0x3+-parseInt(_0x410cab(0xf7))/0x4+-parseInt(_0x410cab(0xf1))/0x5+parseInt(_0x410cab(0x104))/0x6*(parseInt(_0x410cab(0xee))/0x7)+parseInt(_0x410cab(0xf8))/0x8+parseInt(_0x410cab(0xe7))/0x9;if(_0x2a315a===_0x5dba87)break;else _0x3e5b85['push'](_0x3e5b85['shift']());}catch(_0x207212){_0x3e5b85['push'](_0x3e5b85['shift']());}}}(a90_0x4ada,0x79ff6));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';function a90_0x4ada(){const _0x1e0d33=['fromEntries','toLowerCase','legacyCompatOnly','Versioned\x20enterprise\x20routing\x20manifest','cliSettableTopLevel','3831476SyGpEs','1339904RQqwuk','Override\x20user\x20domain','Default\x20page\x20size','map','format','importable','Default\x20output\x20format',';\x20local\x20alias:\x20apps.<alias>.appcode','7zeJwww','filter','Risk\x20level','en-US','12tODbXI','Override\x20runtime\x20domain','85334LPTfux','defaultValue','env','Override\x20API\x20domain','entries','12838590AoKQSw','riskLevel','has','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','Target\x20environment','zh-CN','enumValues','2255519TqLPMa','nativeToolAvailable','591069rQCOtL','3396075SqNfgE'];a90_0x4ada=function(){return _0x1e0d33;};return a90_0x4ada();}import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export const CONFIG_FIELD_SCHEMAS={'routing':{'description':a90_0xbcd07e(0xf5),'topLevel':!![]},'region':{'description':'Lovrabet\x20region','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':ENABLED_LOVRABET_REGION_VALUES,'defaultValue':DEFAULT_LOVRABET_REGION,'importable':!![]},'env':{'description':a90_0xbcd07e(0xeb),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a90_0xbcd07e(0x108)],'importable':!![]},'format':{'description':a90_0xbcd07e(0xfe),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a90_0xbcd07e(0xfc)],'importable':!![]},'pageSize':{'description':a90_0xbcd07e(0xfa),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a90_0xbcd07e(0x109),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a90_0xbcd07e(0xf9),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a90_0xbcd07e(0x105),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillDomain':{'description':'Override\x20SkillHub\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':'Access\x20key\x20(client-ak\x20auth)','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a90_0xbcd07e(0x102),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['riskLevel'],'importable':!![]},'nativeToolAvailable':{'description':'Native\x20Lovrabet\x20tool\x20availability\x20in\x20the\x20current\x20execution\x20host','topLevel':!![],'defaultValue':![]},'locale':{'description':a90_0xbcd07e(0xea),'topLevel':!![],'cliSettableTopLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['locale'],'importable':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a90_0xbcd07e(0xe6)](CONFIG_FIELD_SCHEMAS)[a90_0xbcd07e(0x101)](([,_0x214dcf])=>_0x214dcf[a90_0xbcd07e(0xf6)])[a90_0xbcd07e(0xfb)](([_0x3dd131])=>_0x3dd131));export const CLI_PROTECTED_CONFIG_KEYS=new Set([a90_0xbcd07e(0xe8),a90_0xbcd07e(0xef)]);export const CONFIG_ENUM_VALUES=Object[a90_0xbcd07e(0xf2)](Object[a90_0xbcd07e(0xe6)](CONFIG_FIELD_SCHEMAS)[a90_0xbcd07e(0x101)](([,_0x26c69a])=>_0x26c69a[a90_0xbcd07e(0xed)])['map'](([_0xabc4ff,_0x459d4f])=>[_0xabc4ff,[..._0x459d4f[a90_0xbcd07e(0xed)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a90_0xbcd07e(0xe6)](CONFIG_FIELD_SCHEMAS)[a90_0xbcd07e(0x101)](([,_0x2b2dad])=>_0x2b2dad[a90_0xbcd07e(0xfd)])['map'](([_0x5a368b])=>_0x5a368b);function a90_0x4e01(_0x785992,_0x1e8876){_0x785992=_0x785992-0xe6;const _0x4ada83=a90_0x4ada();let _0x4e01dc=_0x4ada83[_0x785992];return _0x4e01dc;}export function getConfigFieldSchema(_0x16c1d3){return CONFIG_FIELD_SCHEMAS[_0x16c1d3];}export function getConfigEnumValues(_0x4df9b5){const _0x2ebf19=a90_0xbcd07e;return getConfigFieldSchema(_0x4df9b5)?.[_0x2ebf19(0xed)];}export function getConfigDefaultValue(_0x32efc4){const _0x13e628=a90_0xbcd07e;return getConfigFieldSchema(_0x32efc4)?.[_0x13e628(0x107)];}export function isTopLevelConfigKey(_0x1f084e){return TOP_LEVEL_CONFIG_KEYS['has'](_0x1f084e);}export function isCliProtectedConfigKey(_0x458c34){const _0x1eecf8=a90_0xbcd07e;return CLI_PROTECTED_CONFIG_KEYS[_0x1eecf8(0xe9)](_0x458c34);}const LOCALE_MAP={'zh':a90_0xbcd07e(0xec),'zh-cn':a90_0xbcd07e(0xec),'zh_cn':a90_0xbcd07e(0xec),'en':a90_0xbcd07e(0x103),'en-us':a90_0xbcd07e(0x103),'en_us':'en-US'};export function normalizeLocale(_0x1dec5a){const _0x516d5c=a90_0xbcd07e;if(!_0x1dec5a)return null;return LOCALE_MAP[_0x1dec5a[_0x516d5c(0xf3)]()]??null;}export function isLegacyCompatConfigKey(_0x58c015){const _0x2e0f78=a90_0xbcd07e;return getConfigFieldSchema(_0x58c015)?.[_0x2e0f78(0xf4)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x45b4a8){return[..._0x45b4a8]['join'](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x4abaa5=a90_0xbcd07e;return'Config\x20key.\x20Top-level:\x20'+getTopLevelConfigKeySummary()+_0x4abaa5(0xff);}export function buildAppProfileListFields(_0x65872){return{'env':_0x65872,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x70cbce=a91_0x5ce7;function a91_0x3ea5(){const _0x26f707=['545zoCsWm','6595976SadFSS','777729uwsgHR','Published','UNPUBLISH','8612cLXUEK','660201QIBNcY','PUBLISHED','81884esToXY','458941nJNSbu','4089330MLQQHS'];a91_0x3ea5=function(){return _0x26f707;};return a91_0x3ea5();}(function(_0x13a36e,_0xee504c){const _0x33d57e=a91_0x5ce7,_0x26e303=_0x13a36e();while(!![]){try{const _0x861c8b=parseInt(_0x33d57e(0x1ad))/0x1+parseInt(_0x33d57e(0x1b3))/0x2+-parseInt(_0x33d57e(0x1b1))/0x3+-parseInt(_0x33d57e(0x1b0))/0x4*(parseInt(_0x33d57e(0x1ab))/0x5)+-parseInt(_0x33d57e(0x1b5))/0x6+-parseInt(_0x33d57e(0x1b4))/0x7+parseInt(_0x33d57e(0x1ac))/0x8;if(_0x861c8b===_0xee504c)break;else _0x26e303['push'](_0x26e303['shift']());}catch(_0x594adc){_0x26e303['push'](_0x26e303['shift']());}}}(a91_0x3ea5,0x6bbda));export const APP_PUBLISH_STATUS={'Published':a91_0x70cbce(0x1b2),'Unpublished':a91_0x70cbce(0x1af)};function a91_0x5ce7(_0x119f75,_0x4e0e43){_0x119f75=_0x119f75-0x1ab;const _0x3ea523=a91_0x3ea5();let _0x5ce73b=_0x3ea523[_0x119f75];return _0x5ce73b;}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a91_0x70cbce(0x1ae)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a92_0x575b(){const _0x15f14f=['client-ak','8366616yeXyIQ','4482eypFHj','438765haZAZr','3048104PZmhdS','ClientAk','1051217XUWBPp','3840270vzXMUY','2926EufQtc','1450488RwjqeL','2mhLSBA','8rDlTzn'];a92_0x575b=function(){return _0x15f14f;};return a92_0x575b();}function a92_0x4ebd(_0x3a0d2b,_0x5b706e){_0x3a0d2b=_0x3a0d2b-0xea;const _0x575b51=a92_0x575b();let _0x4ebd60=_0x575b51[_0x3a0d2b];return _0x4ebd60;}const a92_0x43dc7b=a92_0x4ebd;(function(_0x3f1d9f,_0x198053){const _0x20fb59=a92_0x4ebd,_0x1b2155=_0x3f1d9f();while(!![]){try{const _0xe84f30=-parseInt(_0x20fb59(0xf3))/0x1*(-parseInt(_0x20fb59(0xeb))/0x2)+-parseInt(_0x20fb59(0xea))/0x3*(parseInt(_0x20fb59(0xec))/0x4)+parseInt(_0x20fb59(0xf0))/0x5+-parseInt(_0x20fb59(0xef))/0x6*(parseInt(_0x20fb59(0xf5))/0x7)+parseInt(_0x20fb59(0xf1))/0x8+parseInt(_0x20fb59(0xee))/0x9+-parseInt(_0x20fb59(0xf4))/0xa;if(_0xe84f30===_0x198053)break;else _0x1b2155['push'](_0x1b2155['shift']());}catch(_0x40d19f){_0x1b2155['push'](_0x1b2155['shift']());}}}(a92_0x575b,0xbffa6));export const AUTH_MODE={'ClientAk':a92_0x43dc7b(0xed)};export function isAuthMode(_0x59a1f0){const _0x209890=a92_0x43dc7b;return _0x59a1f0===AUTH_MODE[_0x209890(0xf2)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x577504=a93_0x48a6;(function(_0xead0d6,_0x4d1964){const _0x5e5114=a93_0x48a6,_0x2160a6=_0xead0d6();while(!![]){try{const _0x2d9779=parseInt(_0x5e5114(0x1b7))/0x1*(parseInt(_0x5e5114(0x1d4))/0x2)+-parseInt(_0x5e5114(0x1b4))/0x3+parseInt(_0x5e5114(0x1cb))/0x4*(parseInt(_0x5e5114(0x1d0))/0x5)+parseInt(_0x5e5114(0x1bb))/0x6*(parseInt(_0x5e5114(0x1cf))/0x7)+parseInt(_0x5e5114(0x1a8))/0x8*(-parseInt(_0x5e5114(0x1be))/0x9)+-parseInt(_0x5e5114(0x1d2))/0xa+-parseInt(_0x5e5114(0x1bc))/0xb;if(_0x2d9779===_0x4d1964)break;else _0x2160a6['push'](_0x2160a6['shift']());}catch(_0x15f20a){_0x2160a6['push'](_0x2160a6['shift']());}}}(a93_0x815e,0x2153f));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';function a93_0x48a6(_0x1f5004,_0x530cce){_0x1f5004=_0x1f5004-0x1a6;const _0x815ea4=a93_0x815e();let _0x48a665=_0x815ea4[_0x1f5004];return _0x48a665;}export const CLI_BIN_NAME=PRODUCT_CONFIG[a93_0x577504(0x1af)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG['cliDisplayName'];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a93_0x577504(0x1c1),'type':a93_0x577504(0x1ad),'description':a93_0x577504(0x1ac),'hint':a93_0x577504(0x1a9)},{'name':a93_0x577504(0x1c2),'meowKey':a93_0x577504(0x1c2),'type':a93_0x577504(0x1ad),'description':'Select\x20app\x20profile\x20by\x20name','hint':a93_0x577504(0x1ae)},{'name':a93_0x577504(0x1b1),'meowKey':a93_0x577504(0x1b1),'type':a93_0x577504(0x1ad),'description':'Environment','hint':a93_0x577504(0x1b5)},{'name':'format','meowKey':a93_0x577504(0x1bf),'type':'string','description':a93_0x577504(0x1ba),'hint':a93_0x577504(0x1b2)},{'name':'jq','meowKey':'jq','type':a93_0x577504(0x1ad),'description':a93_0x577504(0x1ab),'hint':a93_0x577504(0x1c4)},{'name':a93_0x577504(0x1b3),'meowKey':a93_0x577504(0x1a6),'type':a93_0x577504(0x1c8),'description':'Preview\x20operation\x20without\x20executing'},{'name':'yes','meowKey':a93_0x577504(0x1b9),'type':'boolean','description':a93_0x577504(0x1d7)},{'name':a93_0x577504(0x1b6),'meowKey':'nonInteractive','type':'boolean','description':a93_0x577504(0x1c7)},{'name':a93_0x577504(0x1c9),'meowKey':a93_0x577504(0x1c9),'type':a93_0x577504(0x1c8),'description':a93_0x577504(0x1d1)},{'name':'ci','meowKey':'ci','type':a93_0x577504(0x1c8),'description':a93_0x577504(0x1ce),'hidden':!![]},{'name':a93_0x577504(0x1a7),'meowKey':a93_0x577504(0x1a7),'type':a93_0x577504(0x1c8),'description':a93_0x577504(0x1c0)},{'name':'id','meowKey':'id','type':a93_0x577504(0x1ad),'description':'Record\x20ID','hidden':!![]},{'name':a93_0x577504(0x1d6),'meowKey':'name','type':a93_0x577504(0x1ad),'description':a93_0x577504(0x1bd),'hidden':!![]},{'name':a93_0x577504(0x1cc),'meowKey':'sqlcode','type':a93_0x577504(0x1ad),'description':'SQL\x20query\x20code','hidden':!![]},{'name':a93_0x577504(0x1c5),'meowKey':a93_0x577504(0x1c5),'type':a93_0x577504(0x1ad),'description':a93_0x577504(0x1c6),'hidden':!![]},{'name':a93_0x577504(0x1b0),'meowKey':'verbose','type':a93_0x577504(0x1c8),'description':a93_0x577504(0x1c3),'hidden':!![]},{'name':'clear','meowKey':a93_0x577504(0x1d3),'type':a93_0x577504(0x1c8),'description':a93_0x577504(0x1ca),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a93_0x577504(0x1c2),'env',a93_0x577504(0x1bf),'jq',a93_0x577504(0x1b3),a93_0x577504(0x1b9),a93_0x577504(0x1b6),'ci']);export function buildMeowFlags(){const _0x4609dc=a93_0x577504;return Object[_0x4609dc(0x1b8)](GLOBAL_FLAGS[_0x4609dc(0x1d5)](_0x2190f6=>[_0x2190f6[_0x4609dc(0x1aa)],{'type':_0x2190f6[_0x4609dc(0x1cd)]}]));}function a93_0x815e(){const _0x5bf7c3=['Verbose\x20output','<expr>','params','JSON\x20params\x20for\x20execute\x20commands','Force\x20non-interactive\x20mode\x20(CI)','boolean','global','Clear\x20output','740632szbkQC','sqlcode','type','Alias\x20for\x20--non-interactive','424795ITjzSm','5tQNaXS','Use\x20global\x20config\x20scope','381200LnTiTE','clear','94838ttwkij','map','name','Skip\x20confirmation\x20for\x20high-risk\x20writes','dryRun','help','168488IWmBaQ','<code>','meowKey','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','Override\x20appcode','string','<name>','cliBinName','verbose','env','json\x20|\x20pretty\x20|\x20compress','dry-run','24537fwkzNO','production\x20|\x20development\x20|\x20daily','non-interactive','2Lhvyla','fromEntries','yes','Output\x20format','12ohqJva','2172445Tohmip','Name\x20filter','9WexJLs','format','Show\x20help','appcode','app'];a93_0x815e=function(){return _0x5bf7c3;};return a93_0x815e();}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a94_0xf010(){const _0x1d4b38=['184vMExmK','26610Dswmod','3530XbhWFe','142448WbfQLf','compress','3619DmWOyr','189GMIEWA','141321moOwRw','main','726102AUopaS','write','2617470ZzeqOn','1231425OvUouK','7MivsxO','en-US'];a94_0xf010=function(){return _0x1d4b38;};return a94_0xf010();}function a94_0x3681(_0xb1f15f,_0x39a904){_0xb1f15f=_0xb1f15f-0x19c;const _0xf01069=a94_0xf010();let _0x36813e=_0xf01069[_0xb1f15f];return _0x36813e;}const a94_0x41f37a=a94_0x3681;(function(_0x2c68e4,_0x272c70){const _0x4350f1=a94_0x3681,_0x170ab3=_0x2c68e4();while(!![]){try{const _0x1be2a7=parseInt(_0x4350f1(0x19f))/0x1+-parseInt(_0x4350f1(0x1a1))/0x2+-parseInt(_0x4350f1(0x1a4))/0x3+-parseInt(_0x4350f1(0x1a7))/0x4*(parseInt(_0x4350f1(0x1a9))/0x5)+parseInt(_0x4350f1(0x1a3))/0x6*(parseInt(_0x4350f1(0x1a5))/0x7)+parseInt(_0x4350f1(0x1aa))/0x8*(-parseInt(_0x4350f1(0x19e))/0x9)+-parseInt(_0x4350f1(0x1a8))/0xa*(-parseInt(_0x4350f1(0x19d))/0xb);if(_0x1be2a7===_0x272c70)break;else _0x170ab3['push'](_0x170ab3['shift']());}catch(_0x2468f7){_0x170ab3['push'](_0x170ab3['shift']());}}}(a94_0xf010,0x42ad3));export const DEFAULT_APP_PROFILE_NAME=a94_0x41f37a(0x1a0);export const DEFAULT_CONFIG_VALUES={'env':'production','format':a94_0x41f37a(0x19c),'locale':a94_0x41f37a(0x1a6),'riskLevel':a94_0x41f37a(0x1a2)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a94_0x41f37a(0x19c);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x153bc0=a95_0x18ea;function a95_0x18ea(_0x318f6f,_0x4afa6d){_0x318f6f=_0x318f6f-0x189;const _0x3732f1=a95_0x3732();let _0x18ea62=_0x3732f1[_0x318f6f];return _0x18ea62;}(function(_0x476c3d,_0x3e2baf){const _0x3fbc64=a95_0x18ea,_0x539492=_0x476c3d();while(!![]){try{const _0x2c11b7=-parseInt(_0x3fbc64(0x189))/0x1+-parseInt(_0x3fbc64(0x18f))/0x2+-parseInt(_0x3fbc64(0x191))/0x3+parseInt(_0x3fbc64(0x195))/0x4*(parseInt(_0x3fbc64(0x194))/0x5)+parseInt(_0x3fbc64(0x190))/0x6+parseInt(_0x3fbc64(0x18b))/0x7*(parseInt(_0x3fbc64(0x18e))/0x8)+-parseInt(_0x3fbc64(0x18a))/0x9*(-parseInt(_0x3fbc64(0x18c))/0xa);if(_0x2c11b7===_0x3e2baf)break;else _0x539492['push'](_0x539492['shift']());}catch(_0x3ed18c){_0x539492['push'](_0x539492['shift']());}}}(a95_0x3732,0x7114f));function a95_0x3732(){const _0x22ce63=['842509LPiWJT','4797tDrRIP','2991415GDlAtA','20110jerbJM','cliCdnBaseUrl','8IolJhg','1760434RurdxP','4420344BKwlPx','356676qfmBrG','npmRegistryBaseUrl','/dist/lovrabet-cli/config/index.json','344345hGekhb','4pPIvNs'];a95_0x3732=function(){return _0x22ce63;};return a95_0x3732();}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG['npmPackageName'];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a95_0x153bc0(0x192)];export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG[a95_0x153bc0(0x18d)];export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a95_0x153bc0(0x193);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x1aaf74=a96_0x4498;(function(_0x511333,_0x323fdb){const _0x4a9c37=a96_0x4498,_0x283efc=_0x511333();while(!![]){try{const _0x4b3b51=parseInt(_0x4a9c37(0x1a0))/0x1*(-parseInt(_0x4a9c37(0x19b))/0x2)+parseInt(_0x4a9c37(0x195))/0x3+parseInt(_0x4a9c37(0x194))/0x4*(-parseInt(_0x4a9c37(0x199))/0x5)+parseInt(_0x4a9c37(0x19d))/0x6*(parseInt(_0x4a9c37(0x197))/0x7)+-parseInt(_0x4a9c37(0x193))/0x8*(parseInt(_0x4a9c37(0x19c))/0x9)+parseInt(_0x4a9c37(0x192))/0xa*(-parseInt(_0x4a9c37(0x196))/0xb)+parseInt(_0x4a9c37(0x198))/0xc;if(_0x4b3b51===_0x323fdb)break;else _0x283efc['push'](_0x283efc['shift']());}catch(_0x1489d0){_0x283efc['push'](_0x283efc['shift']());}}}(a96_0x5e83,0x3abb5));function a96_0x4498(_0x277590,_0x4d0cd8){_0x277590=_0x277590-0x18f;const _0x5e83a2=a96_0x5e83();let _0x449881=_0x5e83a2[_0x277590];return _0x449881;}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,activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x76d076){const _0x158934=a96_0x4498;customApiDomain=_0x76d076?.[_0x158934(0x19a)],customUserDomain=_0x76d076?.[_0x158934(0x1a4)],customRuntimeDomain=_0x76d076?.[_0x158934(0x1a2)],customSkillDomain=_0x76d076?.['skillDomain'],activeRegion=_0x76d076?.['region']??DEFAULT_LOVRABET_REGION;}function a96_0x5e83(){const _0xfd6de=['3esliZX','runtime','runtimeDomain','api','userDomain','serviceDomains','user','daily','10PdiwBA','1915184BYPxLA','612356TcBfrC','1305699WVqiuC','219890CTuGhW','77WUXqAr','4900080QEQlWh','15GorDOJ','apiDomain','75494OEeHfn','9nLIjtu','124848rrQJlg','production','skill'];a96_0x5e83=function(){return _0xfd6de;};return a96_0x5e83();}const getActiveRegionDomains=()=>{const _0x7edceb=a96_0x4498,_0x81a83b=OFFICIAL_ROUTING_PROFILES[activeRegion][_0x7edceb(0x18f)];return isProduction(getEnv())?_0x81a83b[_0x7edceb(0x19e)]:_0x7edceb(0x191)in _0x81a83b?_0x81a83b[_0x7edceb(0x191)]:_0x81a83b[_0x7edceb(0x19e)];};export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a96_0x1aaf74(0x190)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a96_0x1aaf74(0x1a3)];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a96_0x1aaf74(0x1a1)];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a96_0x1aaf74(0x19f)];
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a97_0x5494fa=a97_0x33bb;(function(_0x1250b6,_0x12c04d){const _0x417d34=a97_0x33bb,_0xdf38f4=_0x1250b6();while(!![]){try{const _0x5730cf=parseInt(_0x417d34(0x137))/0x1+-parseInt(_0x417d34(0x136))/0x2+-parseInt(_0x417d34(0x138))/0x3+parseInt(_0x417d34(0x132))/0x4+parseInt(_0x417d34(0x13f))/0x5*(parseInt(_0x417d34(0x13e))/0x6)+parseInt(_0x417d34(0x134))/0x7+-parseInt(_0x417d34(0x135))/0x8;if(_0x5730cf===_0x12c04d)break;else _0xdf38f4['push'](_0xdf38f4['shift']());}catch(_0x203154){_0xdf38f4['push'](_0xdf38f4['shift']());}}}(a97_0x3555,0xee19c));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a97_0x5494fa(0x13a),a97_0x5494fa(0x13d),a97_0x5494fa(0x139)];function a97_0x3555(){const _0x1f6161=['ENV','development','1284GAbNjZ','39410umBLBN','935836nGtQqR','online','3405955jesKVm','18078936sYwwHc','1393600YjySaP','1881675tmFQta','1071060jyqrph','daily','production','dev'];a97_0x3555=function(){return _0x1f6161;};return a97_0x3555();}export function normalizeEnv(_0x2d6a3e){const _0x301b34=a97_0x5494fa;return _0x2d6a3e===_0x301b34(0x133)?_0x301b34(0x13a):_0x2d6a3e;}export function isProduction(_0x42a38a){return normalizeEnv(_0x42a38a)==='production';}export function isDaily(_0x5738b8){const _0x38281e=a97_0x5494fa;return normalizeEnv(_0x5738b8)===_0x38281e(0x139);}export function isDev(_0x82e6c4){const _0x68bcd7=a97_0x5494fa,_0x93b290=normalizeEnv(_0x82e6c4);return _0x93b290===_0x68bcd7(0x13d)||_0x93b290===_0x68bcd7(0x13b);}function a97_0x33bb(_0x303bb,_0x30d665){_0x303bb=_0x303bb-0x132;const _0x3555a7=a97_0x3555();let _0x33bb60=_0x3555a7[_0x303bb];return _0x33bb60;}let env=normalizeEnv(productEnv(a97_0x5494fa(0x13c))||a97_0x5494fa(0x13a));export function getEnv(){return env;}export function initEnv(_0x5b5dc8){env=normalizeEnv(_0x5b5dc8);}
|