@lovrabet/lovrabet-cli 2.3.0 → 2.3.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.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.d.ts +3 -3
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.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 +0 -16
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.d.ts +30 -0
- package/lib/core/kb-search-client.js +1 -0
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.d.ts +2 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.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/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +3 -2
- package/skills/lovrabet/guides/sql-and-bff-workflow.md +1 -1
- package/skills/lovrabet/references/lovrabet-config-commands.md +2 -2
- package/skills/lovrabet/references/lovrabet-config.md +2 -2
- package/skills/lovrabet/references/lovrabet-doctor.md +2 -0
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +3 -1
- package/skills/lovrabet/references/lovrabet-personal-bff-workflow.md +32 -0
- package/skills/lovrabet.manifest.json +3 -3
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a84_0x1daedc=a84_0x4ee6;(function(_0x52cf2d,_0x13f684){const _0x14cd12=a84_0x4ee6,_0x2e6085=_0x52cf2d();while(!![]){try{const _0x39641f=-parseInt(_0x14cd12(0x12f))/0x1+parseInt(_0x14cd12(0x119))/0x2*(-parseInt(_0x14cd12(0x107))/0x3)+-parseInt(_0x14cd12(0x116))/0x4+-parseInt(_0x14cd12(0xe9))/0x5*(-parseInt(_0x14cd12(0x112))/0x6)+-parseInt(_0x14cd12(0xfb))/0x7+-parseInt(_0x14cd12(0x132))/0x8+parseInt(_0x14cd12(0xf7))/0x9;if(_0x39641f===_0x13f684)break;else _0x2e6085['push'](_0x2e6085['shift']());}catch(_0x3f3abc){_0x2e6085['push'](_0x2e6085['shift']());}}}(a84_0x2d6e,0xa20bd));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a84_0x2a3050 from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a84_0x4ee6(_0x1fecd9,_0x1aa302){_0x1fecd9=_0x1fecd9-0xda;const _0x2d6eeb=a84_0x2d6e();let _0x4ee61f=_0x2d6eeb[_0x1fecd9];return _0x4ee61f;}import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a84_0x1daedc(0xfe),'type':'boolean','description':a84_0x1daedc(0x131),'default':![]},{'name':'beta','type':a84_0x1daedc(0xe4),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a84_0x1daedc(0x130),'type':a84_0x1daedc(0x10b),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x2a6b10){const _0x2932a0=a84_0x1daedc,_0x32096a=_0x2a6b10[_0x2932a0(0xdf)](_0x2932a0(0x130))[_0x2932a0(0xff)]();if(_0x32096a)return _0x32096a;return String(_0x2a6b10[_0x2932a0(0xfc)]?.[0x0]??'')[_0x2932a0(0xff)]();}async function validateUpdateFlags(_0x48c2bc){const _0x1d971e=a84_0x1daedc,_0x1f06e8=getRequestedVersion(_0x48c2bc),_0x1aecc8=[_0x48c2bc[_0x1d971e(0xeb)](_0x1d971e(0xfe))?_0x1d971e(0xfe):'',_0x48c2bc[_0x1d971e(0xeb)](_0x1d971e(0xde))?_0x1d971e(0xde):'',_0x1f06e8?_0x1d971e(0x130):''][_0x1d971e(0x10d)](Boolean);if(_0x1aecc8[_0x1d971e(0x129)]>0x1)throw CliErrors[_0x1d971e(0x106)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x1f06e8&&!a84_0x2a3050['valid'](_0x1f06e8))throw CliErrors[_0x1d971e(0x106)](_0x1d971e(0xe6)+_0x1f06e8,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x26751f=a84_0x1daedc;try{const _0x1cb7ce=NPM_REGISTRY_BASE_URL+_0x26751f(0x118)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x2b0904=await fetch(_0x1cb7ce,{'signal':AbortSignal[_0x26751f(0x115)](0x2710)});if(!_0x2b0904['ok'])return null;const _0x2221b5=await _0x2b0904[_0x26751f(0xdd)]();if(!_0x2221b5||typeof _0x2221b5!==_0x26751f(0xee))return null;return Object['fromEntries'](Object[_0x26751f(0x11d)](_0x2221b5)[_0x26751f(0x10d)](([,_0x2fe360])=>typeof _0x2fe360===_0x26751f(0x10b)&&_0x2fe360[_0x26751f(0xff)]())[_0x26751f(0x108)](([_0x682e0f,_0x2ccc7e])=>[_0x682e0f,String(_0x2ccc7e)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0x247472){const _0x1bf9b9=a84_0x1daedc,_0x4a4c9a=getRequestedVersion(_0x247472);if(_0x4a4c9a)return{'version':_0x4a4c9a,'source':_0x1bf9b9(0x130)};const _0x27fbfb=_0x247472[_0x1bf9b9(0xeb)](_0x1bf9b9(0xde))?_0x1bf9b9(0xde):_0x1bf9b9(0xfe),_0x1b77ba=await fetchNpmDistTags(),_0x17ff86=_0x1b77ba?.[_0x27fbfb];if(!_0x17ff86)return null;return{'version':_0x17ff86,'source':_0x27fbfb};}function shouldInstallTarget(_0x127ced,_0x2c282d){const _0x323f0a=a84_0x1daedc;if(_0x2c282d['source']===_0x323f0a(0x130)||_0x2c282d[_0x323f0a(0xf3)]===_0x323f0a(0xde))return!a84_0x2a3050['eq'](_0x127ced,_0x2c282d[_0x323f0a(0x130)]);return a84_0x2a3050['lt'](_0x127ced,_0x2c282d[_0x323f0a(0x130)]);}export function installCliPackage(_0x48035d,_0x1df358,_0x180b7f=resolveCurrentCliNpmPrefix()){const _0x1fd189=a84_0x1daedc,_0x1fdc86=resolveNpmBin(_0x1fd189(0x11c)),_0x1aa506=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x48035d,_0x3f2b42=[_0x1fd189(0x11e),'-g',_0x1aa506],_0xb35445=runNpmInstall(_0x1fdc86,_0x3f2b42,_0x1df358);if(_0xb35445['ok']||!isNpmPrefixPermissionError(_0xb35445['error']))return _0xb35445;if(!_0x180b7f||_0xb35445[_0x1fd189(0x100)]?.[_0x1fd189(0xe0)]()['includes'](_0x180b7f[_0x1fd189(0xe0)]()))return _0xb35445;return console[_0x1fd189(0x124)](_0x1fd189(0xf0)+_0x180b7f),runNpmInstall(_0x1fdc86,[..._0x3f2b42,_0x1fd189(0xdb),_0x180b7f],_0x1df358);}export function resolveCurrentCliNpmPrefix(_0x181c81=fileURLToPath(import.meta.url),_0x2bd8de=process[a84_0x1daedc(0x11a)]){const _0x122354=a84_0x1daedc,_0x3bb4f5=_0x2bd8de===_0x122354(0xea)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x5271a6=_0x3bb4f5['dirname'](_0x3bb4f5['dirname'](_0x3bb4f5[_0x122354(0xdc)](_0x181c81))),_0xc1fb40=_0x2bd8de===_0x122354(0xea)?_0x122354(0x122):'@lovrabet/lovrabet-cli';let _0x106911=_0x3bb4f5[_0x122354(0xdc)](_0x5271a6);while(!![]){if(_0x3bb4f5[_0x122354(0xef)](_0x106911)===_0x122354(0x11f)&&_0x3bb4f5['relative'](_0x106911,_0x5271a6)===_0xc1fb40){const _0x4ce2c2=_0x3bb4f5[_0x122354(0xdc)](_0x106911);return _0x3bb4f5[_0x122354(0xef)](_0x4ce2c2)==='lib'?_0x3bb4f5[_0x122354(0xdc)](_0x4ce2c2):_0x4ce2c2;}const _0x146508=_0x3bb4f5[_0x122354(0xdc)](_0x106911);if(_0x146508===_0x106911)return null;_0x106911=_0x146508;}}function runNpmInstall(_0x3684f1,_0x34197d,_0x4bb2a7){const _0x403e17=a84_0x1daedc;console[_0x403e17(0xf8)]('*\x20'+[_0x3684f1,..._0x34197d]['join']('\x20'));const _0x4007dd=spawnSync(_0x3684f1,_0x34197d,{'cwd':process[_0x403e17(0xfa)](),'stdio':_0x403e17(0x111),'env':process.env,'shell':![]}),_0x2b0255=_0x4007dd[_0x403e17(0x117)]?_0x4007dd[_0x403e17(0x117)][_0x403e17(0x12a)]()[_0x403e17(0xff)]():'',_0x2e9912=_0x4007dd[_0x403e17(0x123)]?_0x4007dd[_0x403e17(0x123)][_0x403e17(0x12a)]()['trim']():'';if(!_0x4bb2a7){if(_0x2e9912)process[_0x403e17(0x123)][_0x403e17(0xe8)](_0x2e9912+'\x0a');if(_0x2b0255)process[_0x403e17(0x117)][_0x403e17(0xe8)](_0x2b0255+'\x0a');}if(_0x4007dd[_0x403e17(0xe2)]===0x0)return{'ok':!![]};const _0x4890ed=_0x4007dd[_0x403e17(0x100)]?.[_0x403e17(0x12c)]||_0x2b0255||_0x2e9912||_0x403e17(0x114)+(_0x4007dd[_0x403e17(0xe2)]??'unknown');return{'ok':![],'error':_0x4890ed};}function isNpmPrefixPermissionError(_0x3e581e){return Boolean(_0x3e581e&&/\b(?:EACCES|EPERM)\b/['test'](_0x3e581e));}function repairCurrentBuiltinSkill(_0x50ebbd){const _0x3e1466=a84_0x1daedc;console[_0x3e1466(0xf8)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x2faec4=installBuiltinSkill({'stdio':_0x50ebbd?_0x3e1466(0x111):_0x3e1466(0x120)});if(_0x2faec4['ok'])return console['log'](_0x3e1466(0x105)+_0x2faec4['skillVersion']+_0x3e1466(0x133)),!![];return console['warn'](_0x3e1466(0xe3)+(_0x2faec4[_0x3e1466(0x10f)]||_0x3e1466(0x12e))+']:\x20'+(_0x2faec4[_0x3e1466(0x100)]||_0x3e1466(0xf1))),console[_0x3e1466(0xf8)]('\x20\x20Run\x20manually:\x20'+_0x2faec4[_0x3e1466(0x10a)]),![];}function a84_0x2d6e(){const _0x163732=['Already\x20on\x20requested\x20version\x20(v','length','toString','Already\x20up\x20to\x20date\x20(v','message','Version\x20comparison\x20failed:\x20','INSTALL_FAILED','590572ijpLTs','version','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','5508200zYpAqx','\x20is\x20current.','Update\x20the\x20','--prefix','dirname','json','beta','str','toLowerCase','\x20\x20Run\x20manually:\x20','status','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','boolean','\x20CLI\x20from\x20npm','Invalid\x20version:\x20','Updated\x20to\x20v','write','15Tkzcds','win32','bool','find','reason','object','basename','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','unknown','Unable\x20to\x20resolve\x20','source','\x20->\x20','CLI\x20is\x20up\x20to\x20date,\x20but\x20Built-in\x20Skill\x20repair\x20failed.',',\x20but\x20Built-in\x20Skill\x20verification\x20failed.','34663968JcFRPF','log','Checking\x20CLI\x20Built-in\x20Skill...','cwd','4531660GasYSp','args','Updating\x20','latest','trim','error','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','state','read','valid','\x20\x20CLI\x20Built-in\x20Skill\x20','validation','219021Tgpjwh','map','run','repairCommand','string','CLI\x20updated\x20to\x20v','filter','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','code','update','pipe','535476DHVgYV','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','exit\x20','timeout','5240204AQJTFY','stderr','/-/package/','6MkVOzn','platform','Current\x20version:\x20','npm','entries','install','node_modules','inherit','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','@lovrabet\x5clovrabet-cli','stdout','warn','nonInteractive','Update\x20failed:\x20','Checking\x20npm\x20dist-tags...'];a84_0x2d6e=function(){return _0x163732;};return a84_0x2d6e();}function verifyUpdatedBuiltinSkill(_0x327c6b){const _0x3d82ab=a84_0x1daedc;console['log'](_0x3d82ab(0xf9));const _0x39db8e=inspectInstalledBuiltinSkillVersion(_0x327c6b);if(_0x39db8e[_0x3d82ab(0x102)]==='current')return console[_0x3d82ab(0xf8)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x327c6b+_0x3d82ab(0x133)),!![];console[_0x3d82ab(0x124)](_0x3d82ab(0x101)+_0x39db8e[_0x3d82ab(0x102)]+'.');if(_0x39db8e[_0x3d82ab(0xed)])console[_0x3d82ab(0x124)]('\x20\x20'+_0x39db8e[_0x3d82ab(0xed)]);return console['log'](_0x3d82ab(0xe1)+_0x39db8e[_0x3d82ab(0x10a)]),![];}async function execute(_0x3779e2){const _0xa41b45=a84_0x1daedc;await validateUpdateFlags(_0x3779e2);const _0x2171c0=getCliVersion();console[_0xa41b45(0xf8)](_0xa41b45(0x11b)+_0x2171c0),console['log'](_0xa41b45(0x127));const _0x4b277a=await resolveTargetVersion(_0x3779e2);if(!_0x4b277a){const _0x41d198=_0x3779e2[_0xa41b45(0xeb)](_0xa41b45(0xde))?_0xa41b45(0xde):_0xa41b45(0xfe),_0x28048a=_0xa41b45(0xf2)+_0x41d198+'\x20version\x20from\x20npm.';return console[_0xa41b45(0x124)](_0x28048a),console[_0xa41b45(0xf8)](_0xa41b45(0x121)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x41d198),{'ok':![],'message':_0x28048a};}const _0x1a893f=[_0x2171c0,_0x4b277a['version']][_0xa41b45(0xec)](_0x13fd4b=>!a84_0x2a3050[_0xa41b45(0x104)](_0x13fd4b));if(_0x1a893f){const _0x2645c7=_0xa41b45(0x12d)+_0x1a893f+'.';return console['warn'](_0x2645c7),{'ok':![],'message':_0x2645c7};}if(!shouldInstallTarget(_0x2171c0,_0x4b277a)){const _0x568c51=_0x4b277a[_0xa41b45(0xf3)]==='version'?_0xa41b45(0x128)+_0x4b277a[_0xa41b45(0x130)]+').':_0xa41b45(0x12b)+_0x4b277a[_0xa41b45(0x130)]+').';return console[_0xa41b45(0xf8)](_0x568c51),repairCurrentBuiltinSkill(_0x3779e2[_0xa41b45(0x125)])?{'ok':!![]}:{'ok':![],'message':_0xa41b45(0xf5)};}console[_0xa41b45(0xf8)](_0xa41b45(0xfd)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x2171c0+_0xa41b45(0xf4)+_0x4b277a[_0xa41b45(0x130)]);const _0x1f9873=installCliPackage(_0x4b277a['version'],_0x3779e2['nonInteractive']);if(!_0x1f9873['ok']){const _0x203518=_0xa41b45(0x126)+(_0x1f9873[_0xa41b45(0x100)]||_0xa41b45(0xf1));return console['error'](_0x203518),console[_0xa41b45(0xf8)](_0xa41b45(0x113)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4b277a[_0xa41b45(0x130)]),{'ok':![],'message':_0x203518};}return console[_0xa41b45(0xf8)](_0xa41b45(0xe7)+_0x4b277a['version']+'.'),console[_0xa41b45(0xf8)](_0xa41b45(0x10e)),verifyUpdatedBuiltinSkill(_0x4b277a['version'])?{'ok':!![]}:{'ok':![],'message':_0xa41b45(0x10c)+_0x4b277a[_0xa41b45(0x130)]+_0xa41b45(0xf6)};}export const updateDefinition={'service':a84_0x1daedc(0x110),'command':a84_0x1daedc(0x109),'description':a84_0x1daedc(0xda)+CLI_BIN_NAME+a84_0x1daedc(0xe5),'risk':a84_0x1daedc(0x103),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a84_0x390d7c=a84_0x2a24;(function(_0x4e0061,_0x3b4238){const _0x4a4518=a84_0x2a24,_0x5a5eed=_0x4e0061();while(!![]){try{const _0x5f391e=-parseInt(_0x4a4518(0x14d))/0x1+parseInt(_0x4a4518(0x15b))/0x2*(parseInt(_0x4a4518(0x150))/0x3)+parseInt(_0x4a4518(0x134))/0x4*(parseInt(_0x4a4518(0x16e))/0x5)+parseInt(_0x4a4518(0x143))/0x6*(parseInt(_0x4a4518(0x131))/0x7)+parseInt(_0x4a4518(0x129))/0x8+-parseInt(_0x4a4518(0x122))/0x9+parseInt(_0x4a4518(0x16f))/0xa*(-parseInt(_0x4a4518(0x15c))/0xb);if(_0x5f391e===_0x3b4238)break;else _0x5a5eed['push'](_0x5a5eed['shift']());}catch(_0x54372f){_0x5a5eed['push'](_0x5a5eed['shift']());}}}(a84_0x4530,0x4a315));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a84_0x1fc82b from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';function a84_0x2a24(_0x4a8d5c,_0x3ad095){_0x4a8d5c=_0x4a8d5c-0x120;const _0x45309a=a84_0x4530();let _0x2a2442=_0x45309a[_0x4a8d5c];return _0x2a2442;}import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a84_0x390d7c(0x13f),'type':'boolean','description':a84_0x390d7c(0x168),'default':![]},{'name':'beta','type':a84_0x390d7c(0x161),'description':a84_0x390d7c(0x157),'default':![]},{'name':a84_0x390d7c(0x13e),'type':'string','description':a84_0x390d7c(0x139)}];function getRequestedVersion(_0x147582){const _0x3f2279=a84_0x390d7c,_0x17bcaf=_0x147582[_0x3f2279(0x137)](_0x3f2279(0x13e))[_0x3f2279(0x127)]();if(_0x17bcaf)return _0x17bcaf;return String(_0x147582['args']?.[0x0]??'')[_0x3f2279(0x127)]();}async function validateUpdateFlags(_0x8cc210){const _0x2a1bce=a84_0x390d7c,_0x564215=getRequestedVersion(_0x8cc210),_0x1d2e22=[_0x8cc210[_0x2a1bce(0x144)](_0x2a1bce(0x13f))?_0x2a1bce(0x13f):'',_0x8cc210['bool']('beta')?'beta':'',_0x564215?_0x2a1bce(0x13e):''][_0x2a1bce(0x123)](Boolean);if(_0x1d2e22['length']>0x1)throw CliErrors['validation'](_0x2a1bce(0x14b),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x564215&&!a84_0x1fc82b[_0x2a1bce(0x163)](_0x564215))throw CliErrors[_0x2a1bce(0x125)]('Invalid\x20version:\x20'+_0x564215,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x3ff0ab=a84_0x390d7c;try{const _0x52aa66=NPM_REGISTRY_BASE_URL+_0x3ff0ab(0x141)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x3ff0ab(0x15f),_0x5f1b7a=await fetch(_0x52aa66,{'signal':AbortSignal[_0x3ff0ab(0x15e)](0x2710)});if(!_0x5f1b7a['ok'])return null;const _0x44571e=await _0x5f1b7a['json']();if(!_0x44571e||typeof _0x44571e!=='object')return null;return Object[_0x3ff0ab(0x16d)](Object[_0x3ff0ab(0x13d)](_0x44571e)['filter'](([,_0x2d6eb5])=>typeof _0x2d6eb5===_0x3ff0ab(0x165)&&_0x2d6eb5['trim']())[_0x3ff0ab(0x160)](([_0xef8f93,_0x492ec1])=>[_0xef8f93,String(_0x492ec1)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0xfb4bbf){const _0x5f39a3=a84_0x390d7c,_0x1f5750=getRequestedVersion(_0xfb4bbf);if(_0x1f5750)return{'version':_0x1f5750,'source':_0x5f39a3(0x13e)};const _0x381e1f=_0xfb4bbf[_0x5f39a3(0x144)]('beta')?_0x5f39a3(0x155):'latest',_0x1d09c9=await fetchNpmDistTags(),_0x31375a=_0x1d09c9?.[_0x381e1f];if(!_0x31375a)return null;return{'version':_0x31375a,'source':_0x381e1f};}function shouldInstallTarget(_0x4818d7,_0x36c9a7){const _0x5068b2=a84_0x390d7c;if(_0x36c9a7[_0x5068b2(0x164)]==='version'||_0x36c9a7[_0x5068b2(0x164)]==='beta')return!a84_0x1fc82b['eq'](_0x4818d7,_0x36c9a7[_0x5068b2(0x13e)]);return a84_0x1fc82b['lt'](_0x4818d7,_0x36c9a7[_0x5068b2(0x13e)]);}export function installCliPackage(_0x1acf43,_0x45ea85,_0x1300b3=resolveCurrentCliNpmPrefix()){const _0x413d83=a84_0x390d7c,_0x45a75f=resolveNpmBin('npm'),_0x526870=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1acf43,_0x17dd85=['install','-g',_0x526870],_0x3d29e3=runNpmInstall(_0x45a75f,_0x17dd85,_0x45ea85);if(_0x3d29e3['ok']||!isNpmPrefixPermissionError(_0x3d29e3[_0x413d83(0x12d)]))return _0x3d29e3;if(!_0x1300b3||_0x3d29e3[_0x413d83(0x12d)]?.['toLowerCase']()['includes'](_0x1300b3[_0x413d83(0x151)]()))return _0x3d29e3;return console[_0x413d83(0x121)](_0x413d83(0x170)+_0x1300b3),runNpmInstall(_0x45a75f,[..._0x17dd85,_0x413d83(0x154),_0x1300b3],_0x45ea85);}export function resolveCurrentCliNpmPrefix(_0x8583a5=fileURLToPath(import.meta.url),_0x275802=process['platform']){const _0x5c3874=a84_0x390d7c,_0x17c721=_0x275802===_0x5c3874(0x15d)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0xcb086c=_0x17c721[_0x5c3874(0x16b)](_0x17c721[_0x5c3874(0x16b)](_0x17c721[_0x5c3874(0x16b)](_0x8583a5))),_0x143fcf=_0x275802===_0x5c3874(0x15d)?'@lovrabet\x5clovrabet-cli':'@lovrabet/lovrabet-cli';let _0x5a3dfa=_0x17c721['dirname'](_0xcb086c);while(!![]){if(_0x17c721[_0x5c3874(0x135)](_0x5a3dfa)===_0x5c3874(0x126)&&_0x17c721[_0x5c3874(0x15a)](_0x5a3dfa,_0xcb086c)===_0x143fcf){const _0x386ceb=_0x17c721['dirname'](_0x5a3dfa);return _0x17c721[_0x5c3874(0x135)](_0x386ceb)===_0x5c3874(0x14f)?_0x17c721[_0x5c3874(0x16b)](_0x386ceb):_0x386ceb;}const _0x5ebfae=_0x17c721['dirname'](_0x5a3dfa);if(_0x5ebfae===_0x5a3dfa)return null;_0x5a3dfa=_0x5ebfae;}}function a84_0x4530(){const _0x4a9a39=['4223272DeyrUq','message','Unable\x20to\x20resolve\x20','inherit','error','stderr','run',',\x20but\x20Built-in\x20Skill\x20verification\x20failed.','833NRXMhL','\x20->\x20','status','395348WxRCyJ','basename','join','str','state','Install\x20a\x20specific\x20CLI\x20version','toString','repairCommand','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','entries','version','latest','log','/-/package/','CLI\x20updated\x20to\x20v','15024tWIGud','bool','reason','code','exit\x20','stdout','Updated\x20to\x20v','pipe','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Current\x20version:\x20','406587LKNQVA','CLI\x20is\x20up\x20to\x20date,\x20but\x20Built-in\x20Skill\x20repair\x20failed.','lib','6GtfMeP','toLowerCase','\x20\x20Run\x20manually:\x20','Update\x20the\x20','--prefix','beta','unknown','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','read','\x20version\x20from\x20npm.','relative','104694AYflkN','11DMoEfD','win32','timeout','/dist-tags','map','boolean','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','valid','source','string','Updating\x20','skillVersion','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag',']:\x20','\x20is\x20current.','dirname','nonInteractive','fromEntries','25SNJHPK','2173670dUiGeN','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','warn','4472253RWANMm','filter','\x20\x20CLI\x20Built-in\x20Skill\x20','validation','node_modules','trim','test'];a84_0x4530=function(){return _0x4a9a39;};return a84_0x4530();}function runNpmInstall(_0x564793,_0x289cd8,_0x17c56a){const _0x1ab480=a84_0x390d7c;console[_0x1ab480(0x140)]('*\x20'+[_0x564793,..._0x289cd8][_0x1ab480(0x136)]('\x20'));const _0x5a78bb=spawnSync(_0x564793,_0x289cd8,{'cwd':process['cwd'](),'stdio':_0x1ab480(0x14a),'env':process.env,'shell':![]}),_0x28df89=_0x5a78bb[_0x1ab480(0x12e)]?_0x5a78bb[_0x1ab480(0x12e)][_0x1ab480(0x13a)]()['trim']():'',_0x56ec86=_0x5a78bb[_0x1ab480(0x148)]?_0x5a78bb['stdout'][_0x1ab480(0x13a)]()[_0x1ab480(0x127)]():'';if(!_0x17c56a){if(_0x56ec86)process['stdout']['write'](_0x56ec86+'\x0a');if(_0x28df89)process['stderr']['write'](_0x28df89+'\x0a');}if(_0x5a78bb[_0x1ab480(0x133)]===0x0)return{'ok':!![]};const _0x277e93=_0x5a78bb[_0x1ab480(0x12d)]?.[_0x1ab480(0x12a)]||_0x28df89||_0x56ec86||_0x1ab480(0x147)+(_0x5a78bb['status']??'unknown');return{'ok':![],'error':_0x277e93};}function isNpmPrefixPermissionError(_0x3f8694){const _0x1a2f8d=a84_0x390d7c;return Boolean(_0x3f8694&&/\b(?:EACCES|EPERM)\b/[_0x1a2f8d(0x128)](_0x3f8694));}function repairCurrentBuiltinSkill(_0x13ed3c){const _0x319c9b=a84_0x390d7c;console[_0x319c9b(0x140)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x1ba275=installBuiltinSkill({'stdio':_0x13ed3c?'pipe':_0x319c9b(0x12c)});if(_0x1ba275['ok'])return console[_0x319c9b(0x140)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x1ba275[_0x319c9b(0x167)]+_0x319c9b(0x16a)),!![];return console[_0x319c9b(0x121)](_0x319c9b(0x120)+(_0x1ba275[_0x319c9b(0x146)]||'INSTALL_FAILED')+_0x319c9b(0x169)+(_0x1ba275[_0x319c9b(0x12d)]||'unknown')),console[_0x319c9b(0x140)](_0x319c9b(0x152)+_0x1ba275[_0x319c9b(0x13b)]),![];}function verifyUpdatedBuiltinSkill(_0x39180d){const _0x3f3941=a84_0x390d7c;console[_0x3f3941(0x140)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x5af3b1=inspectInstalledBuiltinSkillVersion(_0x39180d);if(_0x5af3b1[_0x3f3941(0x138)]==='current')return console['log'](_0x3f3941(0x124)+_0x39180d+_0x3f3941(0x16a)),!![];console[_0x3f3941(0x121)]('\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x5af3b1[_0x3f3941(0x138)]+'.');if(_0x5af3b1['reason'])console[_0x3f3941(0x121)]('\x20\x20'+_0x5af3b1[_0x3f3941(0x145)]);return console[_0x3f3941(0x140)](_0x3f3941(0x152)+_0x5af3b1[_0x3f3941(0x13b)]),![];}async function execute(_0x242c90){const _0x54ff30=a84_0x390d7c;await validateUpdateFlags(_0x242c90);const _0x30d4f8=getCliVersion();console[_0x54ff30(0x140)](_0x54ff30(0x14c)+_0x30d4f8),console[_0x54ff30(0x140)]('Checking\x20npm\x20dist-tags...');const _0x345ff5=await resolveTargetVersion(_0x242c90);if(!_0x345ff5){const _0x4b0f82=_0x242c90[_0x54ff30(0x144)](_0x54ff30(0x155))?_0x54ff30(0x155):'latest',_0x2b73f8=_0x54ff30(0x12b)+_0x4b0f82+_0x54ff30(0x159);return console['warn'](_0x2b73f8),console['log'](_0x54ff30(0x162)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4b0f82),{'ok':![],'message':_0x2b73f8};}const _0x2570f0=[_0x30d4f8,_0x345ff5[_0x54ff30(0x13e)]]['find'](_0x1d0881=>!a84_0x1fc82b['valid'](_0x1d0881));if(_0x2570f0){const _0x3d0cf0='Version\x20comparison\x20failed:\x20'+_0x2570f0+'.';return console[_0x54ff30(0x121)](_0x3d0cf0),{'ok':![],'message':_0x3d0cf0};}if(!shouldInstallTarget(_0x30d4f8,_0x345ff5)){const _0x423df8=_0x345ff5[_0x54ff30(0x164)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0x345ff5[_0x54ff30(0x13e)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x345ff5[_0x54ff30(0x13e)]+').';return console['log'](_0x423df8),repairCurrentBuiltinSkill(_0x242c90['nonInteractive'])?{'ok':!![]}:{'ok':![],'message':_0x54ff30(0x14e)};}console[_0x54ff30(0x140)](_0x54ff30(0x166)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x30d4f8+_0x54ff30(0x132)+_0x345ff5['version']);const _0xd711d2=installCliPackage(_0x345ff5[_0x54ff30(0x13e)],_0x242c90[_0x54ff30(0x16c)]);if(!_0xd711d2['ok']){const _0xf0486d='Update\x20failed:\x20'+(_0xd711d2[_0x54ff30(0x12d)]||_0x54ff30(0x156));return console[_0x54ff30(0x12d)](_0xf0486d),console[_0x54ff30(0x140)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x345ff5[_0x54ff30(0x13e)]),{'ok':![],'message':_0xf0486d};}return console[_0x54ff30(0x140)](_0x54ff30(0x149)+_0x345ff5[_0x54ff30(0x13e)]+'.'),console[_0x54ff30(0x140)](_0x54ff30(0x13c)),verifyUpdatedBuiltinSkill(_0x345ff5['version'])?{'ok':!![]}:{'ok':![],'message':_0x54ff30(0x142)+_0x345ff5['version']+_0x54ff30(0x130)};}export const updateDefinition={'service':'update','command':a84_0x390d7c(0x12f),'description':a84_0x390d7c(0x153)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a84_0x390d7c(0x158),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a85_0x48a0bc=a85_0x1b5a;(function(_0x1e692e,_0x140a6f){const _0x480e8f=a85_0x1b5a,_0x30f970=_0x1e692e();while(!![]){try{const _0xde94f1=parseInt(_0x480e8f(0x1bf))/0x1*(-parseInt(_0x480e8f(0x1dd))/0x2)+-parseInt(_0x480e8f(0x1dc))/0x3*(parseInt(_0x480e8f(0x1d1))/0x4)+-parseInt(_0x480e8f(0x1db))/0x5+-parseInt(_0x480e8f(0x1ce))/0x6+parseInt(_0x480e8f(0x1da))/0x7+-parseInt(_0x480e8f(0x1d4))/0x8+parseInt(_0x480e8f(0x1d6))/0x9*(parseInt(_0x480e8f(0x1c7))/0xa);if(_0xde94f1===_0x140a6f)break;else _0x30f970['push'](_0x30f970['shift']());}catch(_0x5204f4){_0x30f970['push'](_0x30f970['shift']());}}}(a85_0x2906,0x7a77a));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a85_0x48a0bc(0x1c5),SUPPORTED_PROVIDERS=['dingtalk'];function readBindingInput(_0x3a0456){const _0x1711f2=a85_0x48a0bc,_0x591d57=_0x3a0456['str'](_0x1711f2(0x1d3))['trim']()[_0x1711f2(0x1c8)]();if(!SUPPORTED_PROVIDERS[_0x1711f2(0x1d8)](_0x591d57))throw CliErrors['validation'](_0x1711f2(0x1d0)+(_0x591d57||_0x1711f2(0x1cf))+'.',_0x1711f2(0x1c6)+SUPPORTED_PROVIDERS[_0x1711f2(0x1c1)](',\x20')+'.');const _0x15e1bd=_0x3a0456['str'](_0x1711f2(0x1de))[_0x1711f2(0x1d7)]();if(!_0x15e1bd)throw CliErrors['validation']('--account-id\x20cannot\x20be\x20empty.',_0x1711f2(0x1c3));return{'provider':_0x591d57,'accountId':_0x15e1bd};}function buildBindingData(_0x9986aa,_0x17e501,_0x3a4127){return{'operation':'bind','selector':{'provider':_0x9986aa,'accountId':_0x17e501},'before':null,'after':{'provider':_0x9986aa,'accountId':_0x17e501,'bound':!![]},'dryRun':_0x3a4127,'warnings':[CURRENT_BINDING_WARNING]};}function a85_0x1b5a(_0x334dfc,_0x13a0df){_0x334dfc=_0x334dfc-0x1bf;const _0x2906a2=a85_0x2906();let _0x1b5acd=_0x2906a2[_0x334dfc];return _0x1b5acd;}function a85_0x2906(){const _0x21f097=['(empty)','Unsupported\x20provider:\x20','3521516wopfyh','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','provider','3720184wgRMNx','External\x20account\x20binding\x20was\x20not\x20confirmed.','60957mDDuaJ','trim','includes','string','6684391EolwuO','44740WPVicH','3BMwVTj','388PQHUNX','account-id','1870PSTFHT','External\x20account\x20ID\x20for\x20the\x20selected\x20provider','join','write','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.','user-account','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','Pass\x20one\x20of:\x20','2810ByTNLZ','toLowerCase','bind','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','External\x20account\x20provider','Binds\x20the\x20platform\x20user\x20of\x20the\x20current\x20AccessKey\x20to\x20the\x20given\x20collaboration-provider\x20account.\x20An\x20existing\x20bind\x20for\x20the\x20same\x20provider\x20may\x20be\x20replaced.','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.','3836220Kgkxzi'];a85_0x2906=function(){return _0x21f097;};return a85_0x2906();}export const bindUserAccount={'service':a85_0x48a0bc(0x1c4),'command':a85_0x48a0bc(0x1c9),'description':a85_0x48a0bc(0x1ca),'risk':a85_0x48a0bc(0x1c2),'confirmationDescription':a85_0x48a0bc(0x1cc),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':'provider','type':a85_0x48a0bc(0x1d9),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':a85_0x48a0bc(0x1cb)},{'name':a85_0x48a0bc(0x1de),'type':a85_0x48a0bc(0x1d9),'required':!![],'description':a85_0x48a0bc(0x1c0)}],async 'validate'(_0x281abf){readBindingInput(_0x281abf);},async 'dryRun'(_0xc5eaaf){const {provider:_0x2ce930,accountId:_0x39a461}=readBindingInput(_0xc5eaaf);return{...buildBindingData(_0x2ce930,_0x39a461,!![]),'method':'POST','url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x2ce930,'accountId':_0x39a461}};},async 'execute'(_0xf1c005){const _0x2d8368=a85_0x48a0bc,{provider:_0x11c2bf,accountId:_0x34dfc4}=readBindingInput(_0xf1c005),_0x506f62=await bindExternalUserAccount(_0x11c2bf,_0x34dfc4);if(_0x506f62!==!![])throw CliErrors['apiError'](_0x2d8368(0x1d5),_0x2d8368(0x1cd));return{'ok':!![],'data':buildBindingData(_0x11c2bf,_0x34dfc4,![]),'message':_0x2d8368(0x1d2)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x84cc85,_0x3a4f7c){const _0x4bc871=a86_0x1530,_0x26845f=_0x84cc85();while(!![]){try{const _0x59fc34=-parseInt(_0x4bc871(0x1a4))/0x1+-parseInt(_0x4bc871(0x1a1))/0x2+-parseInt(_0x4bc871(0x1a6))/0x3*(parseInt(_0x4bc871(0x1a0))/0x4)+parseInt(_0x4bc871(0x19f))/0x5+-parseInt(_0x4bc871(0x1a5))/0x6+parseInt(_0x4bc871(0x1a8))/0x7*(-parseInt(_0x4bc871(0x1a2))/0x8)+parseInt(_0x4bc871(0x1a3))/0x9*(parseInt(_0x4bc871(0x1a7))/0xa);if(_0x59fc34===_0x3a4f7c)break;else _0x26845f['push'](_0x26845f['shift']());}catch(_0x1efc8e){_0x26845f['push'](_0x26845f['shift']());}}}(a86_0x1b71,0xd811e));import{bindUserAccount}from'../../commands/user-account/bind.js';function a86_0x1530(_0x3451a9,_0x43ff1d){_0x3451a9=_0x3451a9-0x19f;const _0x1b711f=a86_0x1b71();let _0x153052=_0x1b711f[_0x3451a9];return _0x153052;}function a86_0x1b71(){const _0xe09581=['7qjEsij','6413925lFlvSz','8RgzFxx','2805910WLXzoE','5428456DLKmkb','257157aZsIiH','338651pbkJtj','9451890rtgech','303741PJhyDH','1330NWYPMc'];a86_0x1b71=function(){return _0xe09581;};return a86_0x1b71();}export const userAccountDefinitions=[bindUserAccount];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0xec442e=a87_0x484e;(function(_0x12e2ca,_0x2e41e8){const _0x3e8edd=a87_0x484e,_0x5db9a4=_0x12e2ca();while(!![]){try{const _0x44962c=parseInt(_0x3e8edd(0x193))/0x1*(-parseInt(_0x3e8edd(0x1ac))/0x2)+-parseInt(_0x3e8edd(0x1b2))/0x3+-parseInt(_0x3e8edd(0x185))/0x4+parseInt(_0x3e8edd(0x17e))/0x5+parseInt(_0x3e8edd(0x1af))/0x6*(-parseInt(_0x3e8edd(0x1a7))/0x7)+-parseInt(_0x3e8edd(0x1a4))/0x8+parseInt(_0x3e8edd(0x18b))/0x9;if(_0x44962c===_0x2e41e8)break;else _0x5db9a4['push'](_0x5db9a4['shift']());}catch(_0x169f95){_0x5db9a4['push'](_0x5db9a4['shift']());}}}(a87_0x5117,0x20cc3));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':a87_0xec442e(0x188),'type':a87_0xec442e(0x17b),'description':a87_0xec442e(0x1a6)},{'name':a87_0xec442e(0x1b5),'type':a87_0xec442e(0x17b),'description':a87_0xec442e(0x1a8)},{'name':a87_0xec442e(0x1a9),'type':a87_0xec442e(0x17b),'description':a87_0xec442e(0x19b),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x46b353,_0x565eb3){const _0x58652c=a87_0xec442e,_0x279951=_0x46b353[_0x58652c(0x17c)](_0x58652c(0x188))['trim'](),_0x7d4209=_0x46b353['str'](_0x58652c(0x1b5))[_0x58652c(0x182)](),_0x209f08=_0x46b353[_0x58652c(0x17c)](_0x58652c(0x1a9))[_0x58652c(0x182)](),_0x26930e=resolveWorkspaceEnv(_0x209f08||_0x46b353[_0x58652c(0x18e)]||DEFAULT_CONFIG_VALUES[_0x58652c(0x1a9)]);if(!_0x279951&&!_0x7d4209)throw CliErrors[_0x58652c(0x1a3)](_0x58652c(0x1b4),_0x58652c(0x18a)+CLI_BIN_NAME+_0x58652c(0x181)+_0x565eb3+_0x58652c(0x192)+CLI_BIN_NAME+_0x58652c(0x181)+_0x565eb3+_0x58652c(0x187));if(_0x279951&&_0x7d4209)throw CliErrors[_0x58652c(0x1a3)](_0x58652c(0x1aa),_0x58652c(0x1a1));const _0x14505c=resolveWriteConfigPath('project'),_0x340b95=readConfigFile(_0x14505c);assertWorkspaceCommandState(_0x565eb3,_0x340b95);const _0x313934=_0x7d4209||await resolveRemoteAppCode({'command':_0x565eb3,'appName':_0x279951,'env':_0x26930e,'accessKey':_0x46b353[_0x58652c(0x17d)]});return writeWorkspaceConfig({'command':_0x565eb3,'appName':_0x279951,'appcode':_0x313934,'env':_0x26930e,'shouldWriteEnv':!!_0x209f08,'accessKey':_0x46b353[_0x58652c(0x17d)]},_0x14505c,_0x340b95),{'ok':!![],'data':{'configPath':_0x14505c,'app':_0x279951||null,'appcode':_0x313934,'env':_0x209f08?_0x26930e:null,'accessKeyWritten':![],'command':_0x58652c(0x196)+_0x565eb3},'message':buildWorkspaceMessage(_0x14505c,_0x279951,_0x313934,_0x209f08?_0x26930e:undefined)};}async function resolveRemoteAppCode(_0x338d25){const _0x4597ea=a87_0xec442e;if(!_0x338d25['accessKey'])throw CliErrors[_0x4597ea(0x195)](_0x4597ea(0x1b0)+CLI_BIN_NAME+'\x20workspace\x20'+_0x338d25[_0x4597ea(0x191)]+'.');const {setActiveAK:_0x5786e2}=await import(_0x4597ea(0x180)),{getRemoteAppList:_0x183a3f}=await import(_0x4597ea(0x18d));_0x5786e2(_0x338d25[_0x4597ea(0x17d)]);const _0x584104=await _0x183a3f({'env':_0x338d25[_0x4597ea(0x1a9)],'accessKey':_0x338d25[_0x4597ea(0x17d)],'noCache':![]}),_0x4a383c=findAppByName(_0x584104[_0x4597ea(0x197)],_0x338d25[_0x4597ea(0x179)]);if(_0x4a383c&&!isRuntimeAccessibleApp(_0x4a383c))throw runtimeInaccessibleAppError(_0x4a383c,'\x22'+_0x338d25['appName']+'\x22');const _0x19ebd4=_0x4a383c?.[_0x4597ea(0x198)]?.[_0x4597ea(0x182)]();if(_0x19ebd4)return _0x19ebd4;const _0x1cb7bc=_0x584104['items']['map'](_0x434ac8=>_0x434ac8['appName'])['filter'](Boolean),_0xf6cd14=_0x1cb7bc['length']?'Available\x20apps:\x20'+Array[_0x4597ea(0x19a)](new Set(_0x1cb7bc))[_0x4597ea(0x1b1)](',\x20')+'.':_0x4597ea(0x17f)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.';throw CliErrors[_0x4597ea(0x1a3)](_0x4597ea(0x19e)+_0x338d25[_0x4597ea(0x179)]+_0x4597ea(0x1ad),_0xf6cd14);}function writeWorkspaceConfig(_0x3ed736,_0x4bf81c,_0x52f990){const _0x5357b0=a87_0xec442e;_0x3ed736['shouldWriteEnv']&&(_0x52f990[_0x5357b0(0x1a9)]=_0x3ed736[_0x5357b0(0x1a9)]);if(_0x3ed736[_0x5357b0(0x179)]){const _0x5e7f0f=isRecord(_0x52f990['apps'])?{..._0x52f990[_0x5357b0(0x18f)]}:{},_0x22a68d=isRecord(_0x5e7f0f[_0x3ed736[_0x5357b0(0x179)]])?_0x5e7f0f[_0x3ed736['appName']]:{};return _0x5e7f0f[_0x3ed736[_0x5357b0(0x179)]]={..._0x22a68d,'appcode':_0x3ed736[_0x5357b0(0x1b5)]},_0x52f990[_0x5357b0(0x18f)]=_0x5e7f0f,_0x52f990[_0x5357b0(0x190)]=_0x3ed736[_0x5357b0(0x179)],delete _0x52f990['appcode'],delete _0x52f990[_0x5357b0(0x188)],writeAndReturn(_0x4bf81c,_0x52f990);}return _0x52f990[_0x5357b0(0x1b5)]=_0x3ed736['appcode'],delete _0x52f990[_0x5357b0(0x190)],delete _0x52f990['app'],writeAndReturn(_0x4bf81c,_0x52f990);}function writeAndReturn(_0x1b2820,_0x39a361){return writeConfigFile(_0x1b2820,_0x39a361),_0x1b2820;}function resolveWorkspaceEnv(_0x306379){const _0x47f918=a87_0xec442e;if(RUNTIME_ENV_VALUES['includes'](_0x306379))return _0x306379;throw CliErrors['validation']('Invalid\x20env\x20\x22'+_0x306379+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x47f918(0x1b1)](',\x20'));}function buildWorkspaceMessage(_0x48ec04,_0xfb211c,_0x2a2dae,_0x5322db){const _0x4c4862=a87_0xec442e,_0xe805a9=_0xfb211c?_0xfb211c+'\x20('+_0x2a2dae+')':_0x2a2dae,_0x75aa46=_0x5322db?_0x4c4862(0x1a5)+_0x5322db:'';return _0x4c4862(0x1ae)+_0x48ec04+_0x4c4862(0x1a2)+_0xe805a9+_0x75aa46+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0x158259){const _0x312b1f=a87_0xec442e;return typeof _0x158259===_0x312b1f(0x1b3)&&_0x158259!==null&&!Array[_0x312b1f(0x183)](_0x158259);}function hasWorkspaceAppBinding(_0x307eda){const _0x327819=a87_0xec442e;if(typeof _0x307eda['appcode']==='string'&&_0x307eda[_0x327819(0x1b5)][_0x327819(0x182)]()['length']>0x0)return!![];if(typeof _0x307eda['defaultApp']!==_0x327819(0x17b)||!_0x307eda[_0x327819(0x190)][_0x327819(0x182)]())return![];if(!isRecord(_0x307eda[_0x327819(0x18f)]))return![];const _0x3fd46b=_0x307eda['apps'][_0x307eda[_0x327819(0x190)][_0x327819(0x182)]()];return isRecord(_0x3fd46b)&&typeof _0x3fd46b[_0x327819(0x1b5)]==='string'&&_0x3fd46b[_0x327819(0x1b5)]['trim']()[_0x327819(0x189)]>0x0;}function a87_0x484e(_0x1740ab,_0x6fc8e0){_0x1740ab=_0x1740ab-0x179;const _0x5117ff=a87_0x5117();let _0x484e4a=_0x5117ff[_0x1740ab];return _0x484e4a;}function assertWorkspaceCommandState(_0x42e477,_0x23b594){const _0xa4d51=a87_0xec442e,_0x1d76bf=hasWorkspaceAppBinding(_0x23b594);if(_0x42e477===_0xa4d51(0x194)&&_0x1d76bf)throw CliErrors['validation'](_0xa4d51(0x1ab),'Use\x20`'+CLI_BIN_NAME+_0xa4d51(0x19d)+CLI_BIN_NAME+'\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.');if(_0x42e477==='use'&&!_0x1d76bf)throw CliErrors[_0xa4d51(0x1a3)](_0xa4d51(0x1a0),_0xa4d51(0x17f)+CLI_BIN_NAME+'\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+_0xa4d51(0x186));}function makeWorkspaceCommand(_0x45624d){const _0xeedfea=a87_0xec442e;return{'service':'workspace','command':_0x45624d,'description':_0x45624d===_0xeedfea(0x194)?_0xeedfea(0x184):_0xeedfea(0x19f),'risk':_0xeedfea(0x18c),'confirmationDescription':_0x45624d===_0xeedfea(0x194)?_0xeedfea(0x17a):_0xeedfea(0x19c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x2c9409){return executeWorkspaceUse(_0x2c9409,_0x45624d);}};}function a87_0x5117(){const _0x1a44dd=['apps','defaultApp','command','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','1ocnUHp','init','authRequired','workspace\x20','items','appCode','use','from','Target\x20environment','Updates\x20the\x20app\x20binding\x20already\x20present\x20in\x20the\x20current\x20working\x20directory\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','App\x20\x22','Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','Workspace\x20app\x20context\x20is\x20not\x20initialized.','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','\x0aDefault\x20app:\x20','validation','619808IwmKEZ','\x0aEnv:\x20','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','58751qFoiZo','App\x20code\x20to\x20bind\x20directly','env','Conflicting\x20workspace\x20app\x20selectors.','Workspace\x20app\x20context\x20is\x20already\x20initialized.','47330aTaFTT','\x22\x20not\x20found.','Workspace\x20configured.\x0aConfig\x20file:\x20','42ynGNuq','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','join','506277rJNRAL','object','Missing\x20workspace\x20app\x20selector.','appcode','appName','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.','string','str','accessKey','1143570btDrLN','Run\x20`','../../core/api-client.js','\x20workspace\x20','trim','isArray','Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet','594816cdcEeQ','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','\x20--appcode\x20<code>\x20[--env\x20daily]','app','length','Usage:\x20','3446820fZBemk','write','../../commands/app/remote-source.js','envName'];a87_0x5117=function(){return _0x1a44dd;};return a87_0x5117();}export const workspaceDefinitions=[makeWorkspaceCommand(a87_0xec442e(0x194)),makeWorkspaceCommand(a87_0xec442e(0x199))];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x593c14=a88_0x290d;(function(_0x431f6b,_0x40b441){const _0x81d503=a88_0x290d,_0x33f8dd=_0x431f6b();while(!![]){try{const _0x47af73=-parseInt(_0x81d503(0xf1))/0x1*(parseInt(_0x81d503(0xe5))/0x2)+parseInt(_0x81d503(0x100))/0x3*(parseInt(_0x81d503(0xea))/0x4)+-parseInt(_0x81d503(0xf9))/0x5*(parseInt(_0x81d503(0x10a))/0x6)+parseInt(_0x81d503(0xf2))/0x7*(-parseInt(_0x81d503(0xfa))/0x8)+parseInt(_0x81d503(0xf7))/0x9*(-parseInt(_0x81d503(0xf6))/0xa)+parseInt(_0x81d503(0x10d))/0xb+parseInt(_0x81d503(0xe3))/0xc*(parseInt(_0x81d503(0x10c))/0xd);if(_0x47af73===_0x40b441)break;else _0x33f8dd['push'](_0x33f8dd['shift']());}catch(_0x5681b3){_0x33f8dd['push'](_0x33f8dd['shift']());}}}(a88_0x4067,0x91793));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';function a88_0x290d(_0x38c95b,_0x5ee765){_0x38c95b=_0x38c95b-0xe2;const _0x406744=a88_0x4067();let _0x290d99=_0x406744[_0x38c95b];return _0x290d99;}import{CliErrors}from'../errors.js';export const DOMAIN_CONFIG_FIELDS=[a88_0x593c14(0x115),a88_0x593c14(0xe9),a88_0x593c14(0x116),a88_0x593c14(0xff),a88_0x593c14(0xf3)];const DOMAIN_FLAGS={'userDomain':a88_0x593c14(0x102),'apiDomain':a88_0x593c14(0x10f),'runtimeDomain':a88_0x593c14(0xeb),'skillDomain':'skill-domain','kbDomain':a88_0x593c14(0x114)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a88_0x593c14(0xf4),'platformDomain',a88_0x593c14(0xec)];export function normalizeDomainOrigin(_0x3f21b1,_0x51ad36){const _0x163fd7=a88_0x593c14;if(typeof _0x51ad36!==_0x163fd7(0xef)||!_0x51ad36[_0x163fd7(0x117)]())throw CliErrors[_0x163fd7(0x10b)](_0x163fd7(0xfd)+_0x3f21b1+_0x163fd7(0xe4));let _0x3be51a;try{_0x3be51a=new URL(_0x51ad36['trim']());}catch{throw CliErrors['validation'](_0x163fd7(0xfd)+_0x3f21b1+_0x163fd7(0xfc)+_0x51ad36+_0x163fd7(0xfe));}if(_0x3be51a[_0x163fd7(0xed)]!==_0x163fd7(0xe6)||_0x3be51a[_0x163fd7(0xf0)]||_0x3be51a[_0x163fd7(0x108)]||_0x3be51a[_0x163fd7(0xe8)]!=='/'&&_0x3be51a[_0x163fd7(0xe8)]!==''||_0x3be51a[_0x163fd7(0xee)]||_0x3be51a['hash'])throw CliErrors[_0x163fd7(0x10b)](_0x163fd7(0xfd)+_0x3f21b1+_0x163fd7(0xf5),_0x163fd7(0x109));return _0x3be51a[_0x163fd7(0x112)];}function a88_0x4067(){const _0x36f1a5=['str','password','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','63090pXcYaN','validation','39305045rIcPhT','2948880dXMAFj','Invalid\x20domain\x20config\x20JSON:\x20','api-domain','keys','Domain\x20config\x20file\x20not\x20found:\x20','origin','domain-config','kb-domain','userDomain','runtimeDomain','trim','utf8','12vYzxFR',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','40812FPkiqK','https:','join','pathname','apiDomain','949692VJuFxt','runtime-domain','skillHubDomain','protocol','search','string','username','1mIJQTZ','106477uTCpjA','kbDomain','agentDomain',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','8890260iHTSzx','9tvElfv','length','550zUTqQN','456neOiCg','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.',':\x20\x22','Invalid\x20','\x22\x20is\x20not\x20a\x20valid\x20URL.','skillDomain','3pKDdbl','cwd','user-domain','isArray','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','object','includes'];a88_0x4067=function(){return _0x36f1a5;};return a88_0x4067();}export function readDomainConfig(_0x28e8ee){const _0x4ed727=a88_0x593c14,_0x552fb6=isAbsolute(_0x28e8ee)?_0x28e8ee:resolve(process[_0x4ed727(0x101)](),_0x28e8ee);if(!existsSync(_0x552fb6))throw CliErrors[_0x4ed727(0x10b)](_0x4ed727(0x111)+_0x552fb6);let _0x17d53a;try{_0x17d53a=JSON['parse'](readFileSync(_0x552fb6,_0x4ed727(0xe2)));}catch{throw CliErrors[_0x4ed727(0x10b)](_0x4ed727(0x10e)+_0x552fb6);}if(!_0x17d53a||typeof _0x17d53a!==_0x4ed727(0x105)||Array[_0x4ed727(0x103)](_0x17d53a))throw CliErrors[_0x4ed727(0x10b)](_0x4ed727(0x104));const _0x49ea9b=_0x17d53a,_0x29d6a9=Object[_0x4ed727(0x110)](_0x49ea9b)['filter'](_0x1212cf=>!DOMAIN_CONFIG_FIELDS[_0x4ed727(0x106)](_0x1212cf));if(_0x29d6a9[_0x4ed727(0xf8)]>0x0)throw CliErrors['validation']('Unsupported\x20domain\x20config\x20field(s):\x20'+_0x29d6a9['join'](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS[_0x4ed727(0xe7)](',\x20'));const _0x5f4838={};for(const _0x3cf7fb of DOMAIN_CONFIG_FIELDS){_0x49ea9b[_0x3cf7fb]!==undefined&&(_0x5f4838[_0x3cf7fb]=normalizeDomainOrigin(_0x3cf7fb,_0x49ea9b[_0x3cf7fb]));}if(Object[_0x4ed727(0x110)](_0x5f4838)[_0x4ed727(0xf8)]===0x0)throw CliErrors[_0x4ed727(0x10b)](_0x4ed727(0xfb));return _0x5f4838;}export function resolveDomainFlags(_0x185985){const _0x1ef5c8=a88_0x593c14,_0x5f3c30=(_0x185985['str'](_0x1ef5c8(0x113))||'')[_0x1ef5c8(0x117)](),_0x23f70f=_0x5f3c30?readDomainConfig(_0x5f3c30):{};for(const _0x26d96d of DOMAIN_CONFIG_FIELDS){const _0x2c48d9=(_0x185985[_0x1ef5c8(0x107)](DOMAIN_FLAGS[_0x26d96d])||'')['trim']();if(_0x2c48d9)_0x23f70f[_0x26d96d]=normalizeDomainOrigin(_0x26d96d,_0x2c48d9);}return _0x23f70f;}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x41ed90=a89_0x9b84;(function(_0x118f2f,_0x132eb8){const _0xda61e5=a89_0x9b84,_0x4f6945=_0x118f2f();while(!![]){try{const _0x5856fa=-parseInt(_0xda61e5(0x1de))/0x1*(parseInt(_0xda61e5(0x1e4))/0x2)+parseInt(_0xda61e5(0x1d9))/0x3+parseInt(_0xda61e5(0x1e3))/0x4*(parseInt(_0xda61e5(0x1f1))/0x5)+parseInt(_0xda61e5(0x1eb))/0x6+-parseInt(_0xda61e5(0x1f2))/0x7*(parseInt(_0xda61e5(0x1f3))/0x8)+-parseInt(_0xda61e5(0x1d1))/0x9*(-parseInt(_0xda61e5(0x1ec))/0xa)+-parseInt(_0xda61e5(0x1df))/0xb;if(_0x5856fa===_0x132eb8)break;else _0x4f6945['push'](_0x4f6945['shift']());}catch(_0x1ccc1c){_0x4f6945['push'](_0x4f6945['shift']());}}}(a89_0x1e3b,0x1f2c5));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export const CONFIG_FIELD_SCHEMAS={'region':{'description':'Lovrabet\x20region','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':ENABLED_LOVRABET_REGION_VALUES,'defaultValue':DEFAULT_LOVRABET_REGION,'importable':!![]},'env':{'description':a89_0x41ed90(0x1dc),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x41ed90(0x1f5)],'importable':!![]},'format':{'description':'Default\x20output\x20format','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x41ed90(0x1d3)],'importable':!![]},'pageSize':{'description':a89_0x41ed90(0x1f0),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a89_0x41ed90(0x1ee),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':'Override\x20user\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a89_0x41ed90(0x1e1),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillDomain':{'description':a89_0x41ed90(0x1d6),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'kbDomain':{'description':'Override\x20knowledge-base\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a89_0x41ed90(0x1ea),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a89_0x41ed90(0x1ed),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x41ed90(0x1ef)],'importable':!![]},'nativeToolAvailable':{'description':a89_0x41ed90(0x1e0),'topLevel':!![],'defaultValue':![]},'locale':{'description':a89_0x41ed90(0x1d8),'topLevel':!![],'cliSettableTopLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x41ed90(0x1dd)],'importable':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a89_0x41ed90(0x1e9)](CONFIG_FIELD_SCHEMAS)[a89_0x41ed90(0x1d4)](([,_0x42d3af])=>_0x42d3af[a89_0x41ed90(0x1da)])[a89_0x41ed90(0x1d2)](([_0x3b6b3d])=>_0x3b6b3d));export const CLI_PROTECTED_CONFIG_KEYS=new Set([a89_0x41ed90(0x1ef),'nativeToolAvailable']);export const CONFIG_ENUM_VALUES=Object[a89_0x41ed90(0x1f4)](Object[a89_0x41ed90(0x1e9)](CONFIG_FIELD_SCHEMAS)[a89_0x41ed90(0x1d4)](([,_0xac4db4])=>_0xac4db4[a89_0x41ed90(0x1d7)])[a89_0x41ed90(0x1d2)](([_0x206b2f,_0x482ca0])=>[_0x206b2f,[..._0x482ca0[a89_0x41ed90(0x1d7)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a89_0x41ed90(0x1e9)](CONFIG_FIELD_SCHEMAS)[a89_0x41ed90(0x1d4)](([,_0x2a3c6a])=>_0x2a3c6a[a89_0x41ed90(0x1e7)])[a89_0x41ed90(0x1d2)](([_0x126093])=>_0x126093);export function getConfigFieldSchema(_0x3b310c){return CONFIG_FIELD_SCHEMAS[_0x3b310c];}export function getConfigEnumValues(_0x27141b){const _0x301a95=a89_0x41ed90;return getConfigFieldSchema(_0x27141b)?.[_0x301a95(0x1d7)];}export function getConfigDefaultValue(_0x483df1){return getConfigFieldSchema(_0x483df1)?.['defaultValue'];}export function isTopLevelConfigKey(_0x2b830e){const _0xb55424=a89_0x41ed90;return TOP_LEVEL_CONFIG_KEYS[_0xb55424(0x1d5)](_0x2b830e);}export function isCliProtectedConfigKey(_0xdaf991){const _0x4293de=a89_0x41ed90;return CLI_PROTECTED_CONFIG_KEYS[_0x4293de(0x1d5)](_0xdaf991);}const LOCALE_MAP={'zh':a89_0x41ed90(0x1e8),'zh-cn':a89_0x41ed90(0x1e8),'zh_cn':a89_0x41ed90(0x1e8),'en':a89_0x41ed90(0x1e5),'en-us':a89_0x41ed90(0x1e5),'en_us':a89_0x41ed90(0x1e5)};export function normalizeLocale(_0x48bf84){const _0x17b38f=a89_0x41ed90;if(!_0x48bf84)return null;return LOCALE_MAP[_0x48bf84[_0x17b38f(0x1e6)]()]??null;}export function isLegacyCompatConfigKey(_0x520605){return getConfigFieldSchema(_0x520605)?.['legacyCompatOnly']===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x4ef28c){const _0x8914d1=a89_0x41ed90;return[..._0x4ef28c][_0x8914d1(0x1db)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x2c7869=a89_0x41ed90;return'Config\x20key.\x20Top-level:\x20'+getTopLevelConfigKeySummary()+_0x2c7869(0x1e2);}function a89_0x9b84(_0x4c5c5a,_0x2982aa){_0x4c5c5a=_0x4c5c5a-0x1d1;const _0x1e3bb=a89_0x1e3b();let _0x9b8499=_0x1e3bb[_0x4c5c5a];return _0x9b8499;}export function buildAppProfileListFields(_0x589af2){return{'env':_0x589af2,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}function a89_0x1e3b(){const _0x32aecd=['en-US','toLowerCase','importable','zh-CN','entries','Access\x20key\x20(client-ak\x20auth)','696258NRhvYj','2479160tTYkPl','Risk\x20level','Override\x20API\x20domain','riskLevel','Default\x20page\x20size','102470gaAhlk','49KQvOlG','9080crriBh','fromEntries','env','9lUbCsn','map','format','filter','has','Override\x20SkillHub\x20domain','enumValues','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','374097UskNue','cliSettableTopLevel','join','Target\x20environment','locale','12861EMjTmH','4020181TgngFu','Native\x20Lovrabet\x20tool\x20availability\x20in\x20the\x20current\x20execution\x20host','Override\x20runtime\x20domain',';\x20local\x20alias:\x20apps.<alias>.appcode','20RglWTh','14kQaXQq'];a89_0x1e3b=function(){return _0x32aecd;};return a89_0x1e3b();}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a90_0x346160=a90_0x5e36;(function(_0x3e1fea,_0x4bf1a6){const _0xfa94fb=a90_0x5e36,_0x212c88=_0x3e1fea();while(!![]){try{const _0xff08d1=-parseInt(_0xfa94fb(0x80))/0x1*(-parseInt(_0xfa94fb(0x81))/0x2)+parseInt(_0xfa94fb(0x78))/0x3*(parseInt(_0xfa94fb(0x7c))/0x4)+parseInt(_0xfa94fb(0x7e))/0x5*(-parseInt(_0xfa94fb(0x76))/0x6)+parseInt(_0xfa94fb(0x7a))/0x7*(parseInt(_0xfa94fb(0x77))/0x8)+parseInt(_0xfa94fb(0x7f))/0x9*(parseInt(_0xfa94fb(0x79))/0xa)+parseInt(_0xfa94fb(0x7d))/0xb+-parseInt(_0xfa94fb(0x7b))/0xc;if(_0xff08d1===_0x4bf1a6)break;else _0x212c88['push'](_0x212c88['shift']());}catch(_0x56b3d5){_0x212c88['push'](_0x212c88['shift']());}}}(a90_0x4f7c,0xc9ac9));function a90_0x4f7c(){const _0x29a928=['2dTVljH','UNPUBLISH','4536bNveMM','258144SbuAth','4399986uvYlpv','40CHnjGg','35wpeOfx','13731816yVUPiG','4TokJNn','2421034upKyWu','10020lIzlkJ','3142431PQbxUL','240667xsvAye'];a90_0x4f7c=function(){return _0x29a928;};return a90_0x4f7c();}export const APP_PUBLISH_STATUS={'Published':'PUBLISHED','Unpublished':a90_0x346160(0x75)};function a90_0x5e36(_0x5e6503,_0x23f337){_0x5e6503=_0x5e6503-0x75;const _0x4f7c24=a90_0x4f7c();let _0x5e3621=_0x4f7c24[_0x5e6503];return _0x5e3621;}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS['Published'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a91_0x3324(){const _0x2f2087=['ClientAk','549euUEPL','189638hYEgKp','9272zyAdQJ','19715pNBVzw','75317ZMAzjX','153560pgyFPq','client-ak','396EFFjar','880775JxMveF','1IJdeeL','4qzVUSA','696759cUQuYP','516zLZXCL'];a91_0x3324=function(){return _0x2f2087;};return a91_0x3324();}const a91_0x4a15b6=a91_0x322f;(function(_0x14e708,_0x438539){const _0x4a60ed=a91_0x322f,_0x2fac13=_0x14e708();while(!![]){try{const _0x14a322=parseInt(_0x4a60ed(0x150))/0x1*(-parseInt(_0x4a60ed(0x148))/0x2)+parseInt(_0x4a60ed(0x144))/0x3*(parseInt(_0x4a60ed(0x151))/0x4)+parseInt(_0x4a60ed(0x14a))/0x5*(parseInt(_0x4a60ed(0x14e))/0x6)+parseInt(_0x4a60ed(0x14f))/0x7+-parseInt(_0x4a60ed(0x149))/0x8*(parseInt(_0x4a60ed(0x147))/0x9)+-parseInt(_0x4a60ed(0x14c))/0xa+parseInt(_0x4a60ed(0x14b))/0xb*(-parseInt(_0x4a60ed(0x145))/0xc);if(_0x14a322===_0x438539)break;else _0x2fac13['push'](_0x2fac13['shift']());}catch(_0x58dc4b){_0x2fac13['push'](_0x2fac13['shift']());}}}(a91_0x3324,0x22ead));function a91_0x322f(_0x524655,_0x436562){_0x524655=_0x524655-0x144;const _0x3324d7=a91_0x3324();let _0x322f38=_0x3324d7[_0x524655];return _0x322f38;}export const AUTH_MODE={'ClientAk':a91_0x4a15b6(0x14d)};export function isAuthMode(_0x3d97c4){const _0x4cadc0=a91_0x4a15b6;return _0x3d97c4===AUTH_MODE[_0x4cadc0(0x146)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x373096=a92_0x4444;(function(_0x588856,_0x13c950){const _0x42cd68=a92_0x4444,_0x3aaa53=_0x588856();while(!![]){try{const _0x315180=parseInt(_0x42cd68(0x1ef))/0x1*(parseInt(_0x42cd68(0x1ce))/0x2)+-parseInt(_0x42cd68(0x1d2))/0x3*(parseInt(_0x42cd68(0x1eb))/0x4)+-parseInt(_0x42cd68(0x1df))/0x5+parseInt(_0x42cd68(0x1e5))/0x6+-parseInt(_0x42cd68(0x1ca))/0x7+-parseInt(_0x42cd68(0x1d8))/0x8*(-parseInt(_0x42cd68(0x1f2))/0x9)+parseInt(_0x42cd68(0x1e6))/0xa;if(_0x315180===_0x13c950)break;else _0x3aaa53['push'](_0x3aaa53['shift']());}catch(_0x561bdf){_0x3aaa53['push'](_0x3aaa53['shift']());}}}(a92_0x9e13,0xe6497));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a92_0x373096(0x1e4)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a92_0x373096(0x1ea)];function a92_0x4444(_0x200fd3,_0x56698e){_0x200fd3=_0x200fd3-0x1ca;const _0x9e13db=a92_0x9e13();let _0x44440d=_0x9e13db[_0x200fd3];return _0x44440d;}export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a92_0x373096(0x1e2),'meowKey':a92_0x373096(0x1e2),'type':a92_0x373096(0x1de),'description':a92_0x373096(0x1f3),'hint':'<code>'},{'name':a92_0x373096(0x1f4),'meowKey':a92_0x373096(0x1f4),'type':a92_0x373096(0x1de),'description':'Select\x20app\x20profile\x20by\x20name','hint':'<name>'},{'name':a92_0x373096(0x1dc),'meowKey':'env','type':a92_0x373096(0x1de),'description':'Environment','hint':a92_0x373096(0x1d0)},{'name':'format','meowKey':a92_0x373096(0x1e8),'type':a92_0x373096(0x1de),'description':'Output\x20format','hint':a92_0x373096(0x1f7)},{'name':'jq','meowKey':'jq','type':a92_0x373096(0x1de),'description':a92_0x373096(0x1f6),'hint':a92_0x373096(0x1e9)},{'name':a92_0x373096(0x1cc),'meowKey':a92_0x373096(0x1db),'type':a92_0x373096(0x1d3),'description':a92_0x373096(0x1d7)},{'name':a92_0x373096(0x1cb),'meowKey':a92_0x373096(0x1cb),'type':a92_0x373096(0x1d3),'description':a92_0x373096(0x1ec)},{'name':a92_0x373096(0x1e3),'meowKey':a92_0x373096(0x1f0),'type':'boolean','description':a92_0x373096(0x1f5)},{'name':a92_0x373096(0x1dd),'meowKey':a92_0x373096(0x1dd),'type':a92_0x373096(0x1d3),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':'boolean','description':a92_0x373096(0x1e0),'hidden':!![]},{'name':a92_0x373096(0x1da),'meowKey':a92_0x373096(0x1da),'type':a92_0x373096(0x1d3),'description':'Show\x20help'},{'name':'id','meowKey':'id','type':a92_0x373096(0x1de),'description':a92_0x373096(0x1ee),'hidden':!![]},{'name':'name','meowKey':a92_0x373096(0x1d9),'type':a92_0x373096(0x1de),'description':a92_0x373096(0x1cd),'hidden':!![]},{'name':'sqlcode','meowKey':'sqlcode','type':a92_0x373096(0x1de),'description':a92_0x373096(0x1e7),'hidden':!![]},{'name':a92_0x373096(0x1d6),'meowKey':'params','type':a92_0x373096(0x1de),'description':a92_0x373096(0x1ed),'hidden':!![]},{'name':a92_0x373096(0x1e1),'meowKey':a92_0x373096(0x1e1),'type':a92_0x373096(0x1d3),'description':'Verbose\x20output','hidden':!![]},{'name':'clear','meowKey':a92_0x373096(0x1f1),'type':a92_0x373096(0x1d3),'description':a92_0x373096(0x1cf),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a92_0x373096(0x1e2),a92_0x373096(0x1f4),a92_0x373096(0x1dc),'format','jq',a92_0x373096(0x1cc),a92_0x373096(0x1cb),a92_0x373096(0x1e3),'ci']);function a92_0x9e13(){const _0x13b392=['string','1222860raofsB','Alias\x20for\x20--non-interactive','verbose','appcode','non-interactive','cliBinName','1665474rxIsdF','2444570AjhFHN','SQL\x20query\x20code','format','<expr>','cliDisplayName','947480CDyBCf','Skip\x20confirmation\x20for\x20high-risk\x20writes','JSON\x20params\x20for\x20execute\x20commands','Record\x20ID','6sGgpwu','nonInteractive','clear','1728hxXkad','Override\x20appcode','app','Force\x20non-interactive\x20mode\x20(CI)','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','json\x20|\x20pretty\x20|\x20compress','6074999JQhxud','yes','dry-run','Name\x20filter','213814CUBDIw','Clear\x20output','production\x20|\x20development\x20|\x20daily','fromEntries','9HWXHbJ','boolean','meowKey','type','params','Preview\x20operation\x20without\x20executing','66784yOgCBe','name','help','dryRun','env','global'];a92_0x9e13=function(){return _0x13b392;};return a92_0x9e13();}export function buildMeowFlags(){const _0x142939=a92_0x373096;return Object[_0x142939(0x1d1)](GLOBAL_FLAGS['map'](_0x540c6f=>[_0x540c6f[_0x142939(0x1d4)],{'type':_0x540c6f[_0x142939(0x1d5)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a93_0x2c7b(){const _0x238496=['320105CnvZQS','write','4209129FmrkUG','4ggLkqr','2602368FDhtnQ','26142057GRAKGe','6985695utSrXt','production','9733688JKHLWU','compress','9217390UPGRhO','main','2pDSqtI'];a93_0x2c7b=function(){return _0x238496;};return a93_0x2c7b();}const a93_0x55a4ed=a93_0x3b56;function a93_0x3b56(_0x3f17c1,_0x1a1f36){_0x3f17c1=_0x3f17c1-0x1e9;const _0x2c7b2a=a93_0x2c7b();let _0x3b5672=_0x2c7b2a[_0x3f17c1];return _0x3b5672;}(function(_0x50c98e,_0x456421){const _0xddfc5d=a93_0x3b56,_0x22a8c6=_0x50c98e();while(!![]){try{const _0x5aed3e=parseInt(_0xddfc5d(0x1f4))/0x1*(parseInt(_0xddfc5d(0x1f3))/0x2)+-parseInt(_0xddfc5d(0x1e9))/0x3*(-parseInt(_0xddfc5d(0x1ea))/0x4)+parseInt(_0xddfc5d(0x1ed))/0x5+parseInt(_0xddfc5d(0x1eb))/0x6+parseInt(_0xddfc5d(0x1f1))/0x7+-parseInt(_0xddfc5d(0x1ef))/0x8+-parseInt(_0xddfc5d(0x1ec))/0x9;if(_0x5aed3e===_0x456421)break;else _0x22a8c6['push'](_0x22a8c6['shift']());}catch(_0x58c31c){_0x22a8c6['push'](_0x22a8c6['shift']());}}}(a93_0x2c7b,0xb6f59));export const DEFAULT_APP_PROFILE_NAME=a93_0x55a4ed(0x1f2);export const DEFAULT_CONFIG_VALUES={'env':a93_0x55a4ed(0x1ee),'format':a93_0x55a4ed(0x1f0),'locale':'en-US','riskLevel':a93_0x55a4ed(0x1f5)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a93_0x55a4ed(0x1f0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x596980=a94_0x4169;(function(_0xfa873,_0x313c71){const _0x32ea5a=a94_0x4169,_0x2330f7=_0xfa873();while(!![]){try{const _0x4bf4e4=parseInt(_0x32ea5a(0x195))/0x1*(parseInt(_0x32ea5a(0x191))/0x2)+-parseInt(_0x32ea5a(0x18d))/0x3*(parseInt(_0x32ea5a(0x18e))/0x4)+parseInt(_0x32ea5a(0x198))/0x5+parseInt(_0x32ea5a(0x196))/0x6+-parseInt(_0x32ea5a(0x18f))/0x7+parseInt(_0x32ea5a(0x192))/0x8+parseInt(_0x32ea5a(0x197))/0x9*(-parseInt(_0x32ea5a(0x18c))/0xa);if(_0x4bf4e4===_0x313c71)break;else _0x2330f7['push'](_0x2330f7['shift']());}catch(_0x3e4dc2){_0x2330f7['push'](_0x2330f7['shift']());}}}(a94_0x2c35,0xd28fa));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a94_0x596980(0x194)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a94_0x596980(0x193)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];function a94_0x2c35(){const _0x43cec7=['2941368EYmWXr','skillSource','npmPackageName','59MnsTUn','9663474WOMxkX','660069SIPqpy','7816200TIDvnT','/dist/lovrabet-cli/config/index.json','170PPgzDa','698484WlUIZn','20AmkHzJ','8181110qomJOv','cliCdnBaseUrl','30530AdZFBV'];a94_0x2c35=function(){return _0x43cec7;};return a94_0x2c35();}export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG[a94_0x596980(0x190)];function a94_0x4169(_0x1a266c,_0x11f37b){_0x1a266c=_0x1a266c-0x18c;const _0x2c35df=a94_0x2c35();let _0x4169d1=_0x2c35df[_0x1a266c];return _0x4169d1;}export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a94_0x596980(0x199);
|
package/lib/constant/domain.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Why domain resolution is centralized here: the CLI makes HTTP requests to multiple
|
|
5
5
|
* backend services, each with its own domain. Rather than hard-coding URLs or
|
|
6
|
-
* duplicating the env-based selection logic, we expose
|
|
7
|
-
*
|
|
6
|
+
* duplicating the env-based selection logic, we expose one getter per service that
|
|
7
|
+
* encapsulates the rule:
|
|
8
8
|
*
|
|
9
9
|
* - production env → production domains
|
|
10
10
|
* - daily (staging) env → daily-prefixed domains
|
|
@@ -19,7 +19,7 @@ import { type LovrabetRegion } from "../constant/region.js";
|
|
|
19
19
|
/**
|
|
20
20
|
* Sets custom domain overrides read from the config file.
|
|
21
21
|
*
|
|
22
|
-
* Why pass an options object instead of
|
|
22
|
+
* Why pass an options object instead of positional parameters: future-proofing.
|
|
23
23
|
* Adding a new domain type (e.g. `authDomain`) only requires adding a field here,
|
|
24
24
|
* not changing every call site. Typed `undefined` fields mean "use the default".
|
|
25
25
|
*
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a95_0x4639b3=a95_0x9418;(function(_0x13e0c5,_0xe52f4b){const _0x4e9986=a95_0x9418,_0x4c81b7=_0x13e0c5();while(!![]){try{const _0x54cf77=parseInt(_0x4e9986(0x79))/0x1*(parseInt(_0x4e9986(0x64))/0x2)+parseInt(_0x4e9986(0x75))/0x3*(parseInt(_0x4e9986(0x72))/0x4)+-parseInt(_0x4e9986(0x6a))/0x5+-parseInt(_0x4e9986(0x6c))/0x6*(parseInt(_0x4e9986(0x66))/0x7)+-parseInt(_0x4e9986(0x65))/0x8+parseInt(_0x4e9986(0x67))/0x9+-parseInt(_0x4e9986(0x70))/0xa*(-parseInt(_0x4e9986(0x76))/0xb);if(_0x54cf77===_0xe52f4b)break;else _0x4c81b7['push'](_0x4c81b7['shift']());}catch(_0x19e87c){_0x4c81b7['push'](_0x4c81b7['shift']());}}}(a95_0x2fe0,0xdf1cc));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,customKbDomain,activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x6dbc56){const _0x3e702a=a95_0x9418;customApiDomain=_0x6dbc56?.[_0x3e702a(0x6b)],customUserDomain=_0x6dbc56?.[_0x3e702a(0x74)],customRuntimeDomain=_0x6dbc56?.['runtimeDomain'],customSkillDomain=_0x6dbc56?.[_0x3e702a(0x6d)],customKbDomain=_0x6dbc56?.['kbDomain'],activeRegion=_0x6dbc56?.[_0x3e702a(0x71)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>PRODUCT_CONFIG[a95_0x4639b3(0x73)][activeRegion][isProduction(getEnv())?a95_0x4639b3(0x69):a95_0x4639b3(0x77)];export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a95_0x4639b3(0x68)];function a95_0x2fe0(){const _0x705846=['apiDomain','8510118UujfTT','skillDomain','skill','api','21600790qSgsSc','region','4kgkPTY','regionDomains','userDomain','4916541AzRBtw','11TRdneP','nonProduction','runtime','2KIeAdz','94936asbeNA','8250904qPYYOI','7hUHCuq','3410667moIfLO','user','production','4546205Ctfioh'];a95_0x2fe0=function(){return _0x705846;};return a95_0x2fe0();}export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a95_0x4639b3(0x6f)];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a95_0x4639b3(0x78)];function a95_0x9418(_0x3824e1,_0x8ea6a5){_0x3824e1=_0x3824e1-0x64;const _0x2fe036=a95_0x2fe0();let _0x94186b=_0x2fe036[_0x3824e1];return _0x94186b;}export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a95_0x4639b3(0x6e)];export const getKbDomain=()=>customKbDomain||getActiveRegionDomains()['kb'];
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x1d0b2a=a96_0xa2a5;(function(_0x11fd55,_0x11c9c5){const _0x273b0f=a96_0xa2a5,_0x2f8152=_0x11fd55();while(!![]){try{const _0x5e3358=-parseInt(_0x273b0f(0x16b))/0x1+parseInt(_0x273b0f(0x16c))/0x2*(parseInt(_0x273b0f(0x16d))/0x3)+parseInt(_0x273b0f(0x170))/0x4*(-parseInt(_0x273b0f(0x175))/0x5)+parseInt(_0x273b0f(0x16a))/0x6+-parseInt(_0x273b0f(0x167))/0x7+parseInt(_0x273b0f(0x16f))/0x8*(parseInt(_0x273b0f(0x168))/0x9)+parseInt(_0x273b0f(0x173))/0xa;if(_0x5e3358===_0x11c9c5)break;else _0x2f8152['push'](_0x2f8152['shift']());}catch(_0x5f18f3){_0x2f8152['push'](_0x2f8152['shift']());}}}(a96_0xa98d,0x74160));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a96_0x1d0b2a(0x16e),'development',a96_0x1d0b2a(0x171)];export function normalizeEnv(_0x14bc2d){return _0x14bc2d==='online'?'production':_0x14bc2d;}export function isProduction(_0x5f0c83){return normalizeEnv(_0x5f0c83)==='production';}export function isDaily(_0x4e28d3){return normalizeEnv(_0x4e28d3)==='daily';}function a96_0xa2a5(_0x11a8f8,_0x418520){_0x11a8f8=_0x11a8f8-0x167;const _0xa98d71=a96_0xa98d();let _0xa2a524=_0xa98d71[_0x11a8f8];return _0xa2a524;}export function isDev(_0x2dabd2){const _0x2d7d0a=a96_0x1d0b2a,_0x159720=normalizeEnv(_0x2dabd2);return _0x159720===_0x2d7d0a(0x174)||_0x159720===_0x2d7d0a(0x169);}function a96_0xa98d(){const _0x3804c2=['7938190kCscQz','development','15wAiJWV','6158215YTqrxS','1449YUsdYJ','dev','5258448OhIMAT','212417GBJesD','9488OeXaBx','372jhJKTV','production','1432WjziPv','959536uMgCZy','daily','ENV'];a96_0xa98d=function(){return _0x3804c2;};return a96_0xa98d();}let env=normalizeEnv(productEnv(a96_0x1d0b2a(0x172))||a96_0x1d0b2a(0x16e));export function getEnv(){return env;}export function initEnv(_0x8a6c91){env=normalizeEnv(_0x8a6c91);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a97_0x502b74=a97_0x37a2;function a97_0xcaf6(){const _0x483042=['10282110VAPgLV','5yaCDTJ','json','91ZOeIZa','152187NbeabV','2442834hDRmEZ','compress','22vJKwYV','152584OhqDxw','10698FmsdHn','2309820zXMaAW','pretty','708JkDyAl','5276139RCvTuh'];a97_0xcaf6=function(){return _0x483042;};return a97_0xcaf6();}function a97_0x37a2(_0x305e45,_0x23efca){_0x305e45=_0x305e45-0x1ac;const _0xcaf61d=a97_0xcaf6();let _0x37a2e5=_0xcaf61d[_0x305e45];return _0x37a2e5;}(function(_0x116904,_0x4f9b4){const _0x11797f=a97_0x37a2,_0x71e897=_0x116904();while(!![]){try{const _0x40fb6e=parseInt(_0x11797f(0x1ad))/0x1*(-parseInt(_0x11797f(0x1b0))/0x2)+parseInt(_0x11797f(0x1b2))/0x3*(parseInt(_0x11797f(0x1b5))/0x4)+parseInt(_0x11797f(0x1b8))/0x5*(parseInt(_0x11797f(0x1b7))/0x6)+-parseInt(_0x11797f(0x1ac))/0x7*(-parseInt(_0x11797f(0x1b1))/0x8)+parseInt(_0x11797f(0x1ae))/0x9+parseInt(_0x11797f(0x1b3))/0xa+-parseInt(_0x11797f(0x1b6))/0xb;if(_0x40fb6e===_0x4f9b4)break;else _0x71e897['push'](_0x71e897['shift']());}catch(_0x2d9fdb){_0x71e897['push'](_0x71e897['shift']());}}}(a97_0xcaf6,0xe5dce));export const OUTPUT_FORMAT_VALUES=[a97_0x502b74(0x1b9),a97_0x502b74(0x1b4),a97_0x502b74(0x1af)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x34cc00=a98_0x1ecc;function a98_0x4895(){const _0x3ff640=['Lovrabet\x20Runtime\x20CLI','@lovrabet/lovrabet-cli','https://api.lovrabet.com','13237cjNWaP','https://api.lovrabet.id','https://daily-api.lovrabet.id','935686bagUJL','https://g.lovrabet.com','4233618EiXvKd','https://daily-api.lovrabet.com','https://skills-daily.lovrabet.id','https://user-daily.lovrabet.id','11yGAHTd','LOVRABET','https://api.lovrabet.ai','1336iTgqDg','Lovrabet\x20User\x20Center','https://user.lovrabet.id','1Snbytn','https://daily-runtime.lovrabet.ai','lovrabet','https://runtime.lovrabet.ai','321jrnsHe','https://user.lovrabet.ai','/user/ak','https://daily-runtime.lovrabet.com','https://skills-daily.lovrabet.com','8827260oYInkN','.lovrabet','3652cACjEo','https://daily-api.lovrabet.ai','https://skills.lovrabet.ai','https://runtime.lovrabet.id','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','https://registry.npmjs.org','4917180cqbMyQ','362886HyLyqA','.lovrabet-runtime.log','.lovrabet.json','envPrefix','https://user-daily.lovrabet.ai','https://skills.lovrabet.id','https://runtime.lovrabet.com','https://user.lovrabet.com','10cDoYcP','https://daily-runtime.lovrabet.id'];a98_0x4895=function(){return _0x3ff640;};return a98_0x4895();}(function(_0x5538a4,_0x426d18){const _0x6860bb=a98_0x1ecc,_0x21a542=_0x5538a4();while(!![]){try{const _0x289331=-parseInt(_0x6860bb(0x15e))/0x1*(parseInt(_0x6860bb(0x152))/0x2)+-parseInt(_0x6860bb(0x162))/0x3*(-parseInt(_0x6860bb(0x169))/0x4)+parseInt(_0x6860bb(0x14a))/0x5*(parseInt(_0x6860bb(0x170))/0x6)+parseInt(_0x6860bb(0x14f))/0x7*(parseInt(_0x6860bb(0x15b))/0x8)+parseInt(_0x6860bb(0x154))/0x9+parseInt(_0x6860bb(0x16f))/0xa*(parseInt(_0x6860bb(0x158))/0xb)+-parseInt(_0x6860bb(0x167))/0xc;if(_0x289331===_0x426d18)break;else _0x21a542['push'](_0x21a542['shift']());}catch(_0x234e66){_0x21a542['push'](_0x21a542['shift']());}}}(a98_0x4895,0x47902));export const PRODUCT_CONFIG={'cliBinName':a98_0x34cc00(0x160),'cliDisplayName':a98_0x34cc00(0x14c),'npmPackageName':a98_0x34cc00(0x14d),'skillSource':'lovrabet/lovrabet-cli','internalSkillSource':a98_0x34cc00(0x16d),'globalSkillName':a98_0x34cc00(0x160),'npmRegistryBaseUrl':a98_0x34cc00(0x16e),'cliCdnBaseUrl':a98_0x34cc00(0x153),'envPrefix':a98_0x34cc00(0x159),'legacyEnvPrefixes':['RABETBASE'],'configFileNames':[a98_0x34cc00(0x172)],'newConfigFileName':'.lovrabet.json','homeDirName':a98_0x34cc00(0x168),'logFileName':a98_0x34cc00(0x171),'invokeSource':'cli:lovrabet-runtime','userCenterDisplayName':a98_0x34cc00(0x15c),'skipNpxSkillsEnvSuffix':'SKIP_NPX_SKILLS','regionDomains':{'cn':{'production':{'user':a98_0x34cc00(0x149),'api':a98_0x34cc00(0x14e),'runtime':'https://runtime.lovrabet.com','skill':'https://skills.lovrabet.com','kb':a98_0x34cc00(0x148)},'nonProduction':{'user':'https://user-daily.lovrabet.com','api':a98_0x34cc00(0x155),'runtime':a98_0x34cc00(0x165),'skill':a98_0x34cc00(0x166),'kb':'https://daily-runtime.lovrabet.com'}},'id':{'production':{'user':a98_0x34cc00(0x15d),'api':a98_0x34cc00(0x150),'runtime':a98_0x34cc00(0x16c),'skill':a98_0x34cc00(0x147),'kb':'https://runtime.lovrabet.id'},'nonProduction':{'user':a98_0x34cc00(0x157),'api':a98_0x34cc00(0x151),'runtime':a98_0x34cc00(0x14b),'skill':a98_0x34cc00(0x156),'kb':'https://daily-runtime.lovrabet.id'}},'global':{'production':{'user':a98_0x34cc00(0x163),'api':a98_0x34cc00(0x15a),'runtime':a98_0x34cc00(0x161),'skill':a98_0x34cc00(0x16b),'kb':a98_0x34cc00(0x161)},'nonProduction':{'user':a98_0x34cc00(0x146),'api':a98_0x34cc00(0x16a),'runtime':a98_0x34cc00(0x15f),'skill':'https://skills-daily.lovrabet.ai','kb':'https://daily-runtime.lovrabet.ai'}}},'accessKeyCreatePath':a98_0x34cc00(0x164)};function a98_0x1ecc(_0x78a307,_0x36f38b){_0x78a307=_0x78a307-0x146;const _0x48953c=a98_0x4895();let _0x1ecc99=_0x48953c[_0x78a307];return _0x1ecc99;}export function productEnvName(_0x3ce122){const _0x58eb16=a98_0x34cc00;return PRODUCT_CONFIG[_0x58eb16(0x173)]+'_'+_0x3ce122;}export function productEnvNames(_0x100164){return[productEnvName(_0x100164),...PRODUCT_CONFIG['legacyEnvPrefixes']['map'](_0x50df5d=>_0x50df5d+'_'+_0x100164)];}export function productEnv(_0x5dfc24){for(const _0x360ae7 of productEnvNames(_0x5dfc24)){const _0x5162f4=process.env[_0x360ae7];if(_0x5162f4!==undefined)return _0x5162f4;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a99_0x50b087=a99_0x35b7;(function(_0x28041f,_0x43bc87){const _0x211f39=a99_0x35b7,_0x4b22e0=_0x28041f();while(!![]){try{const _0x43883b=parseInt(_0x211f39(0xee))/0x1+parseInt(_0x211f39(0xf7))/0x2*(parseInt(_0x211f39(0xf0))/0x3)+-parseInt(_0x211f39(0xf9))/0x4*(-parseInt(_0x211f39(0xf6))/0x5)+-parseInt(_0x211f39(0xf3))/0x6*(-parseInt(_0x211f39(0xfe))/0x7)+-parseInt(_0x211f39(0xf1))/0x8*(-parseInt(_0x211f39(0xf5))/0x9)+parseInt(_0x211f39(0xf2))/0xa*(parseInt(_0x211f39(0xef))/0xb)+-parseInt(_0x211f39(0xf4))/0xc*(parseInt(_0x211f39(0xfb))/0xd);if(_0x43883b===_0x43bc87)break;else _0x4b22e0['push'](_0x4b22e0['shift']());}catch(_0xa7c5fb){_0x4b22e0['push'](_0x4b22e0['shift']());}}}(a99_0x5cb8,0xbb150));function a99_0x5cb8(){const _0x25ca6a=['130hZpyMB','229428ksTMwl','108948iySXRI','164574NuwXkz','883270rNaTty','513684livYnf','includes','4WaLNWY','china','3237HkqCYr','indonesia','string','28jyEctx','global','193805YBYsuP','275000IlQcnB','9rnTjdV','616piDofs'];a99_0x5cb8=function(){return _0x25ca6a;};return a99_0x5cb8();}function a99_0x35b7(_0x1ef721,_0x6365c7){_0x1ef721=_0x1ef721-0xee;const _0x5cb810=a99_0x5cb8();let _0x35b7dd=_0x5cb810[_0x1ef721];return _0x35b7dd;}export const LOVRABET_REGION_VALUES=['cn','id',a99_0x50b087(0xff)];export const ENABLED_LOVRABET_REGION_VALUES=['cn','id'];export const DEFAULT_LOVRABET_REGION='cn';export function isLovrabetRegion(_0xbc14e7){const _0x1d77b1=a99_0x50b087;return typeof _0xbc14e7===_0x1d77b1(0xfd)&&LOVRABET_REGION_VALUES[_0x1d77b1(0xf8)](_0xbc14e7);}export function isEnabledLovrabetRegion(_0x2374a8){const _0x52e6fc=a99_0x50b087;return typeof _0x2374a8===_0x52e6fc(0xfd)&&ENABLED_LOVRABET_REGION_VALUES[_0x52e6fc(0xf8)](_0x2374a8);}export function normalizeLovrabetRegion(_0x101b1d){const _0x9dfdb8=a99_0x50b087;if(_0x101b1d===_0x9dfdb8(0xfa))return'cn';if(_0x101b1d===_0x9dfdb8(0xfc))return'id';return isLovrabetRegion(_0x101b1d)?_0x101b1d:DEFAULT_LOVRABET_REGION;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a100_0x1a49(_0x233fda,_0x4742a5){_0x233fda=_0x233fda-0x1b9;const _0x4cf016=a100_0x4cf0();let _0x1a496e=_0x4cf016[_0x233fda];return _0x1a496e;}const a100_0x88bf2a=a100_0x1a49;function a100_0x4cf0(){const _0x378bdd=['3897464fQOMFO','high-risk-write','2780742PalQkj','read','135348cQQxsp','3396948rjonlb','478532KgBFol','10VOysXp','write','2724654iWqOsQ','13463820oiSijv','7ikLdOZ'];a100_0x4cf0=function(){return _0x378bdd;};return a100_0x4cf0();}(function(_0x53691d,_0x330995){const _0x25781a=a100_0x1a49,_0x247f3a=_0x53691d();while(!![]){try{const _0x44422e=parseInt(_0x25781a(0x1b9))/0x1+parseInt(_0x25781a(0x1c3))/0x2+parseInt(_0x25781a(0x1be))/0x3+parseInt(_0x25781a(0x1bb))/0x4*(-parseInt(_0x25781a(0x1bc))/0x5)+parseInt(_0x25781a(0x1ba))/0x6+parseInt(_0x25781a(0x1c0))/0x7*(-parseInt(_0x25781a(0x1c1))/0x8)+-parseInt(_0x25781a(0x1bf))/0x9;if(_0x44422e===_0x330995)break;else _0x247f3a['push'](_0x247f3a['shift']());}catch(_0x1e3523){_0x247f3a['push'](_0x247f3a['shift']());}}}(a100_0x4cf0,0xbddc2));export const RISK_LEVEL_VALUES=[a100_0x88bf2a(0x1c4),a100_0x88bf2a(0x1bd),a100_0x88bf2a(0x1c2)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a5152,_0x479d0c){const _0x2877b9=a101_0x1c56,_0x321b75=_0x3a5152();while(!![]){try{const _0x57f8cf=-parseInt(_0x2877b9(0x9b))/0x1*(-parseInt(_0x2877b9(0x98))/0x2)+parseInt(_0x2877b9(0x9a))/0x3*(-parseInt(_0x2877b9(0x96))/0x4)+parseInt(_0x2877b9(0xa0))/0x5*(-parseInt(_0x2877b9(0x9c))/0x6)+-parseInt(_0x2877b9(0x92))/0x7+parseInt(_0x2877b9(0x95))/0x8*(-parseInt(_0x2877b9(0x97))/0x9)+-parseInt(_0x2877b9(0xa1))/0xa*(-parseInt(_0x2877b9(0x99))/0xb)+parseInt(_0x2877b9(0x9f))/0xc*(parseInt(_0x2877b9(0x93))/0xd);if(_0x57f8cf===_0x479d0c)break;else _0x321b75['push'](_0x321b75['shift']());}catch(_0x42cc83){_0x321b75['push'](_0x321b75['shift']());}}}(a101_0x1e61,0xec057));import{PRODUCT_CONFIG}from'../constant/product.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';function a101_0x1c56(_0x4ff2b3,_0x19a055){_0x4ff2b3=_0x4ff2b3-0x92;const _0x1e6169=a101_0x1e61();let _0x1c5682=_0x1e6169[_0x4ff2b3];return _0x1c5682;}export function getUserAccessKeyCreateUrl(_0x567bb9=DEFAULT_LOVRABET_REGION){const _0x29b7e6=a101_0x1c56,_0x546b18=PRODUCT_CONFIG[_0x29b7e6(0x94)][_0x567bb9][_0x29b7e6(0x9e)]['user'];return''+_0x546b18+PRODUCT_CONFIG[_0x29b7e6(0x9d)];}function a101_0x1e61(){const _0x11f335=['regionDomains','8kJeYjr','21688ZDZGcF','592479uwdxhL','4tRgnMR','143EfFtnF','678fFDfqL','920067twIXQi','18894iDDDHb','accessKeyCreatePath','production','12VyfWEQ','235ILxjEV','1365370LtKpTP','12704601FqKRvQ','7875101YvWmzm'];a101_0x1e61=function(){return _0x11f335;};return a101_0x1e61();}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();
|