@lovrabet/lovrabet-cli 2.3.0-beta.3 → 2.3.0-beta.5
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.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/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/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 +1 -1
- package/skills/lovrabet.manifest.json +3 -3
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a84_0x362b72=a84_0xd65c;(function(_0x59101f,_0x10d300){const _0xfd3942=a84_0xd65c,_0x40e00f=_0x59101f();while(!![]){try{const _0x53e2f9=parseInt(_0xfd3942(0x14c))/0x1+-parseInt(_0xfd3942(0x13a))/0x2*(parseInt(_0xfd3942(0x13d))/0x3)+parseInt(_0xfd3942(0x173))/0x4*(-parseInt(_0xfd3942(0x159))/0x5)+parseInt(_0xfd3942(0x18e))/0x6+parseInt(_0xfd3942(0x155))/0x7+parseInt(_0xfd3942(0x169))/0x8+parseInt(_0xfd3942(0x17a))/0x9;if(_0x53e2f9===_0x10d300)break;else _0x40e00f['push'](_0x40e00f['shift']());}catch(_0x425a66){_0x40e00f['push'](_0x40e00f['shift']());}}}(a84_0x2128,0xa1277));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a84_0x34d186 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_0x2128(){const _0x410946=['\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','read','Already\x20on\x20requested\x20version\x20(v','\x20\x20CLI\x20Built-in\x20Skill\x20','write','\x20\x20Run\x20manually:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','json','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','289224BOKpBc','/dist-tags','node_modules','repairCommand','test','\x20CLI\x20from\x20npm','dirname','2PLkLmm','Unable\x20to\x20resolve\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','831213tJeNPx','message','status','@lovrabet\x5clovrabet-cli','args','basename','bool','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','valid','version','install','--prefix','validation','Current\x20version:\x20','code','469339yzbcKa','str','includes','Version\x20comparison\x20failed:\x20','timeout','\x20->\x20','pipe','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','state','6251756ZWEtAD','\x20is\x20current.','run','entries','3895QIqKnC','join','skillVersion','Already\x20up\x20to\x20date\x20(v','log','latest','current','update','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','toString','fromEntries','relative','trim','error','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','beta','744760mDWigR','nonInteractive','platform','lib','Update\x20the\x20','\x20version\x20from\x20npm.','source','Install\x20a\x20specific\x20CLI\x20version','unknown','Checking\x20CLI\x20Built-in\x20Skill...','5732hwHAHy','stdout','map','stderr','warn','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Updated\x20to\x20v','4947471BWvdlB','win32','toLowerCase','Invalid\x20version:\x20','length','string','inherit','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','Checking\x20npm\x20dist-tags...','object','/-/package/'];a84_0x2128=function(){return _0x410946;};return a84_0x2128();}import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':'latest','type':'boolean','description':a84_0x362b72(0x181),'default':![]},{'name':a84_0x362b72(0x168),'type':'boolean','description':a84_0x362b72(0x18d),'default':![]},{'name':'version','type':a84_0x362b72(0x17f),'description':a84_0x362b72(0x170)}];function getRequestedVersion(_0x8cd41d){const _0xec2b8f=a84_0x362b72,_0xb8bf49=_0x8cd41d[_0xec2b8f(0x14d)](_0xec2b8f(0x146))[_0xec2b8f(0x165)]();if(_0xb8bf49)return _0xb8bf49;return String(_0x8cd41d[_0xec2b8f(0x141)]?.[0x0]??'')['trim']();}async function validateUpdateFlags(_0x24b670){const _0x597599=a84_0x362b72,_0x167b0c=getRequestedVersion(_0x24b670),_0x5e0c43=[_0x24b670[_0x597599(0x143)](_0x597599(0x15e))?_0x597599(0x15e):'',_0x24b670['bool'](_0x597599(0x168))?'beta':'',_0x167b0c?_0x597599(0x146):'']['filter'](Boolean);if(_0x5e0c43[_0x597599(0x17e)]>0x1)throw CliErrors[_0x597599(0x149)](_0x597599(0x178),_0x597599(0x161));if(_0x167b0c&&!a84_0x34d186[_0x597599(0x145)](_0x167b0c))throw CliErrors['validation'](_0x597599(0x17d)+_0x167b0c,_0x597599(0x153));}async function fetchNpmDistTags(){const _0x23ee8c=a84_0x362b72;try{const _0x394bb1=NPM_REGISTRY_BASE_URL+_0x23ee8c(0x184)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x23ee8c(0x134),_0x19f1be=await fetch(_0x394bb1,{'signal':AbortSignal[_0x23ee8c(0x150)](0x2710)});if(!_0x19f1be['ok'])return null;const _0x202ea6=await _0x19f1be[_0x23ee8c(0x18c)]();if(!_0x202ea6||typeof _0x202ea6!==_0x23ee8c(0x183))return null;return Object[_0x23ee8c(0x163)](Object[_0x23ee8c(0x158)](_0x202ea6)['filter'](([,_0x3cc4a0])=>typeof _0x3cc4a0==='string'&&_0x3cc4a0[_0x23ee8c(0x165)]())[_0x23ee8c(0x175)](([_0x3c877b,_0x43d368])=>[_0x3c877b,String(_0x43d368)[_0x23ee8c(0x165)]()]));}catch{return null;}}async function resolveTargetVersion(_0x18b13e){const _0x5466e6=a84_0x362b72,_0x26dab2=getRequestedVersion(_0x18b13e);if(_0x26dab2)return{'version':_0x26dab2,'source':_0x5466e6(0x146)};const _0x2b1cce=_0x18b13e[_0x5466e6(0x143)](_0x5466e6(0x168))?'beta':_0x5466e6(0x15e),_0x17612f=await fetchNpmDistTags(),_0xa6b358=_0x17612f?.[_0x2b1cce];if(!_0xa6b358)return null;return{'version':_0xa6b358,'source':_0x2b1cce};}function shouldInstallTarget(_0x3806ae,_0x4c2a69){const _0x3f0d29=a84_0x362b72;if(_0x4c2a69[_0x3f0d29(0x16f)]===_0x3f0d29(0x146)||_0x4c2a69[_0x3f0d29(0x16f)]===_0x3f0d29(0x168))return!a84_0x34d186['eq'](_0x3806ae,_0x4c2a69[_0x3f0d29(0x146)]);return a84_0x34d186['lt'](_0x3806ae,_0x4c2a69[_0x3f0d29(0x146)]);}export function installCliPackage(_0x369014,_0x1dcd81,_0x4ede5a=resolveCurrentCliNpmPrefix()){const _0xd14588=a84_0x362b72,_0x5c2797=resolveNpmBin('npm'),_0x41c0d2=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x369014,_0xbaa5a4=[_0xd14588(0x147),'-g',_0x41c0d2],_0x1aa735=runNpmInstall(_0x5c2797,_0xbaa5a4,_0x1dcd81);if(_0x1aa735['ok']||!isNpmPrefixPermissionError(_0x1aa735[_0xd14588(0x166)]))return _0x1aa735;if(!_0x4ede5a||_0x1aa735[_0xd14588(0x166)]?.['toLowerCase']()[_0xd14588(0x14e)](_0x4ede5a[_0xd14588(0x17c)]()))return _0x1aa735;return console[_0xd14588(0x177)](_0xd14588(0x144)+_0x4ede5a),runNpmInstall(_0x5c2797,[..._0xbaa5a4,_0xd14588(0x148),_0x4ede5a],_0x1dcd81);}function a84_0xd65c(_0xb7da79,_0x56dc23){_0xb7da79=_0xb7da79-0x134;const _0x212855=a84_0x2128();let _0xd65cc1=_0x212855[_0xb7da79];return _0xd65cc1;}export function resolveCurrentCliNpmPrefix(_0x30171b=fileURLToPath(import.meta.url),_0x17b0fa=process[a84_0x362b72(0x16b)]){const _0x67efc1=a84_0x362b72,_0x21d353=_0x17b0fa==='win32'?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x11c4c5=_0x21d353[_0x67efc1(0x139)](_0x21d353[_0x67efc1(0x139)](_0x21d353[_0x67efc1(0x139)](_0x30171b))),_0x4bd1d5=_0x17b0fa===_0x67efc1(0x17b)?_0x67efc1(0x140):'@lovrabet/lovrabet-cli';let _0x117502=_0x21d353['dirname'](_0x11c4c5);while(!![]){if(_0x21d353[_0x67efc1(0x142)](_0x117502)===_0x67efc1(0x135)&&_0x21d353[_0x67efc1(0x164)](_0x117502,_0x11c4c5)===_0x4bd1d5){const _0xf2de24=_0x21d353[_0x67efc1(0x139)](_0x117502);return _0x21d353[_0x67efc1(0x142)](_0xf2de24)===_0x67efc1(0x16c)?_0x21d353[_0x67efc1(0x139)](_0xf2de24):_0xf2de24;}const _0x297424=_0x21d353[_0x67efc1(0x139)](_0x117502);if(_0x297424===_0x117502)return null;_0x117502=_0x297424;}}function runNpmInstall(_0x3ead9f,_0x10c24b,_0x136e70){const _0x1e9813=a84_0x362b72;console['log']('*\x20'+[_0x3ead9f,..._0x10c24b][_0x1e9813(0x15a)]('\x20'));const _0x1b8cbb=spawnSync(_0x3ead9f,_0x10c24b,{'cwd':process['cwd'](),'stdio':'pipe','env':process.env,'shell':![]}),_0x181588=_0x1b8cbb[_0x1e9813(0x176)]?_0x1b8cbb[_0x1e9813(0x176)]['toString']()[_0x1e9813(0x165)]():'',_0x232918=_0x1b8cbb[_0x1e9813(0x174)]?_0x1b8cbb[_0x1e9813(0x174)][_0x1e9813(0x162)]()[_0x1e9813(0x165)]():'';if(!_0x136e70){if(_0x232918)process[_0x1e9813(0x174)][_0x1e9813(0x189)](_0x232918+'\x0a');if(_0x181588)process['stderr'][_0x1e9813(0x189)](_0x181588+'\x0a');}if(_0x1b8cbb[_0x1e9813(0x13f)]===0x0)return{'ok':!![]};const _0x3ad4c6=_0x1b8cbb[_0x1e9813(0x166)]?.[_0x1e9813(0x13e)]||_0x181588||_0x232918||'exit\x20'+(_0x1b8cbb['status']??_0x1e9813(0x171));return{'ok':![],'error':_0x3ad4c6};}function isNpmPrefixPermissionError(_0xef0520){const _0x338169=a84_0x362b72;return Boolean(_0xef0520&&/\b(?:EACCES|EPERM)\b/[_0x338169(0x137)](_0xef0520));}function repairCurrentBuiltinSkill(_0x1a61e8){const _0x1a9904=a84_0x362b72;console[_0x1a9904(0x15d)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x182449=installBuiltinSkill({'stdio':_0x1a61e8?_0x1a9904(0x152):_0x1a9904(0x180)});if(_0x182449['ok'])return console[_0x1a9904(0x15d)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x182449[_0x1a9904(0x15b)]+'\x20is\x20current.'),!![];return console['warn'](_0x1a9904(0x18b)+(_0x182449[_0x1a9904(0x14b)]||'INSTALL_FAILED')+']:\x20'+(_0x182449[_0x1a9904(0x166)]||_0x1a9904(0x171))),console[_0x1a9904(0x15d)]('\x20\x20Run\x20manually:\x20'+_0x182449[_0x1a9904(0x136)]),![];}function verifyUpdatedBuiltinSkill(_0x5a41b2){const _0x19e4d2=a84_0x362b72;console[_0x19e4d2(0x15d)](_0x19e4d2(0x172));const _0x315253=inspectInstalledBuiltinSkillVersion(_0x5a41b2);if(_0x315253[_0x19e4d2(0x154)]===_0x19e4d2(0x15f))return console[_0x19e4d2(0x15d)](_0x19e4d2(0x188)+_0x5a41b2+_0x19e4d2(0x156)),!![];console['warn'](_0x19e4d2(0x185)+_0x315253[_0x19e4d2(0x154)]+'.');if(_0x315253['reason'])console[_0x19e4d2(0x177)]('\x20\x20'+_0x315253['reason']);return console[_0x19e4d2(0x15d)](_0x19e4d2(0x18a)+_0x315253['repairCommand']),![];}async function execute(_0x33aeff){const _0x3c8e7b=a84_0x362b72;await validateUpdateFlags(_0x33aeff);const _0x5a9d5d=getCliVersion();console['log'](_0x3c8e7b(0x14a)+_0x5a9d5d),console[_0x3c8e7b(0x15d)](_0x3c8e7b(0x182));const _0x1fbcd8=await resolveTargetVersion(_0x33aeff);if(!_0x1fbcd8){const _0x361310=_0x33aeff[_0x3c8e7b(0x143)](_0x3c8e7b(0x168))?_0x3c8e7b(0x168):_0x3c8e7b(0x15e),_0xc8abd7=_0x3c8e7b(0x13b)+_0x361310+_0x3c8e7b(0x16e);return console[_0x3c8e7b(0x177)](_0xc8abd7),console[_0x3c8e7b(0x15d)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x361310),{'ok':![]};}const _0x421301=[_0x5a9d5d,_0x1fbcd8[_0x3c8e7b(0x146)]]['find'](_0x52c97e=>!a84_0x34d186[_0x3c8e7b(0x145)](_0x52c97e));if(_0x421301)return console[_0x3c8e7b(0x177)](_0x3c8e7b(0x14f)+_0x421301+'.'),{'ok':![]};if(!shouldInstallTarget(_0x5a9d5d,_0x1fbcd8)){const _0x5b6c13=_0x1fbcd8[_0x3c8e7b(0x16f)]===_0x3c8e7b(0x146)?_0x3c8e7b(0x187)+_0x1fbcd8[_0x3c8e7b(0x146)]+').':_0x3c8e7b(0x15c)+_0x1fbcd8[_0x3c8e7b(0x146)]+').';return console[_0x3c8e7b(0x15d)](_0x5b6c13),{'ok':repairCurrentBuiltinSkill(_0x33aeff['nonInteractive'])};}console['log']('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x5a9d5d+_0x3c8e7b(0x151)+_0x1fbcd8['version']);const _0x25d92f=installCliPackage(_0x1fbcd8[_0x3c8e7b(0x146)],_0x33aeff[_0x3c8e7b(0x16a)]);if(!_0x25d92f['ok']){const _0x1cb4f6='Update\x20failed:\x20'+(_0x25d92f['error']||_0x3c8e7b(0x171));return console[_0x3c8e7b(0x166)](_0x1cb4f6),console[_0x3c8e7b(0x15d)](_0x3c8e7b(0x167)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1fbcd8[_0x3c8e7b(0x146)]),{'ok':![]};}return console[_0x3c8e7b(0x15d)](_0x3c8e7b(0x179)+_0x1fbcd8['version']+'.'),console['log'](_0x3c8e7b(0x13c)),{'ok':verifyUpdatedBuiltinSkill(_0x1fbcd8[_0x3c8e7b(0x146)])};}export const updateDefinition={'service':a84_0x362b72(0x160),'command':a84_0x362b72(0x157),'description':a84_0x362b72(0x16d)+CLI_BIN_NAME+a84_0x362b72(0x138),'risk':a84_0x362b72(0x186),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a84_0xbe1e73=a84_0x436c;function a84_0x2d00(){const _0x28b8a6=['21dsNrFR','Current\x20version:\x20','write','toString','Version\x20comparison\x20failed:\x20','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','warn','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','lib','platform','\x20version\x20from\x20npm.','filter','map','timeout','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','6079707slNPKU','npm','status','error','unknown','bool','21QGXMIt','join','reason','\x20is\x20current.','update','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','4044820jNUKWy','log','2352560vvETWD','latest','8XzHIuk','includes','INSTALL_FAILED','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','valid','basename','1592913JwzcIc','trim','install','find','state','Updating\x20',']:\x20','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','286526jXtcbK','run','length','/-/package/','5615808vVyomt','json','stderr','string','Already\x20up\x20to\x20date\x20(v','\x20\x20Run\x20manually:\x20','@lovrabet/lovrabet-cli','beta','test','Updated\x20to\x20v','stdout','code','Update\x20the\x20','Checking\x20CLI\x20Built-in\x20Skill...','boolean','toLowerCase','node_modules','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','nonInteractive','read','object','dirname','repairCommand','win32','Unable\x20to\x20resolve\x20','Invalid\x20version:\x20','@lovrabet\x5clovrabet-cli','\x20CLI\x20from\x20npm','version','Update\x20failed:\x20','source','fromEntries','validation','71178CTIVnk'];a84_0x2d00=function(){return _0x28b8a6;};return a84_0x2d00();}function a84_0x436c(_0x2bab06,_0x58ec5d){_0x2bab06=_0x2bab06-0x1ae;const _0x2d00a7=a84_0x2d00();let _0x436ca7=_0x2d00a7[_0x2bab06];return _0x436ca7;}(function(_0x37c9a7,_0x20093c){const _0x169619=a84_0x436c,_0x318906=_0x37c9a7();while(!![]){try{const _0x3a5553=-parseInt(_0x169619(0x1f3))/0x1+parseInt(_0x169619(0x1fb))/0x2*(parseInt(_0x169619(0x1cd))/0x3)+parseInt(_0x169619(0x1ed))/0x4*(parseInt(_0x169619(0x1e9))/0x5)+parseInt(_0x169619(0x1cc))/0x6*(parseInt(_0x169619(0x1e3))/0x7)+parseInt(_0x169619(0x1ff))/0x8+-parseInt(_0x169619(0x1dd))/0x9+-parseInt(_0x169619(0x1eb))/0xa;if(_0x3a5553===_0x20093c)break;else _0x318906['push'](_0x318906['shift']());}catch(_0x4ed14b){_0x318906['push'](_0x318906['shift']());}}}(a84_0x2d00,0xd0a72));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a84_0x30acce 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';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':'latest','type':a84_0xbe1e73(0x1b9),'description':a84_0xbe1e73(0x1dc),'default':![]},{'name':a84_0xbe1e73(0x1b2),'type':a84_0xbe1e73(0x1b9),'description':a84_0xbe1e73(0x1bc),'default':![]},{'name':'version','type':a84_0xbe1e73(0x1ae),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x58a7b3){const _0xf9e717=a84_0xbe1e73,_0x4730fc=_0x58a7b3['str']('version')[_0xf9e717(0x1f4)]();if(_0x4730fc)return _0x4730fc;return String(_0x58a7b3['args']?.[0x0]??'')[_0xf9e717(0x1f4)]();}async function validateUpdateFlags(_0x1544ef){const _0x2eba20=a84_0xbe1e73,_0xb6563a=getRequestedVersion(_0x1544ef),_0x2431ab=[_0x1544ef[_0x2eba20(0x1e2)](_0x2eba20(0x1ec))?'latest':'',_0x1544ef[_0x2eba20(0x1e2)](_0x2eba20(0x1b2))?_0x2eba20(0x1b2):'',_0xb6563a?'version':''][_0x2eba20(0x1d9)](Boolean);if(_0x2431ab[_0x2eba20(0x1fd)]>0x1)throw CliErrors[_0x2eba20(0x1cb)](_0x2eba20(0x1fa),_0x2eba20(0x1f0));if(_0xb6563a&&!a84_0x30acce[_0x2eba20(0x1f1)](_0xb6563a))throw CliErrors[_0x2eba20(0x1cb)](_0x2eba20(0x1c4)+_0xb6563a,_0x2eba20(0x1d4));}async function fetchNpmDistTags(){const _0xd57482=a84_0xbe1e73;try{const _0x138a7b=NPM_REGISTRY_BASE_URL+_0xd57482(0x1fe)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x286686=await fetch(_0x138a7b,{'signal':AbortSignal[_0xd57482(0x1db)](0x2710)});if(!_0x286686['ok'])return null;const _0x11ecf6=await _0x286686[_0xd57482(0x200)]();if(!_0x11ecf6||typeof _0x11ecf6!==_0xd57482(0x1bf))return null;return Object[_0xd57482(0x1ca)](Object['entries'](_0x11ecf6)[_0xd57482(0x1d9)](([,_0x37f82f])=>typeof _0x37f82f==='string'&&_0x37f82f[_0xd57482(0x1f4)]())[_0xd57482(0x1da)](([_0x374043,_0x3d5077])=>[_0x374043,String(_0x3d5077)[_0xd57482(0x1f4)]()]));}catch{return null;}}async function resolveTargetVersion(_0x52df0d){const _0x11963a=a84_0xbe1e73,_0x823225=getRequestedVersion(_0x52df0d);if(_0x823225)return{'version':_0x823225,'source':_0x11963a(0x1c7)};const _0x5c73f0=_0x52df0d[_0x11963a(0x1e2)]('beta')?_0x11963a(0x1b2):'latest',_0x2e1dcf=await fetchNpmDistTags(),_0x45abbd=_0x2e1dcf?.[_0x5c73f0];if(!_0x45abbd)return null;return{'version':_0x45abbd,'source':_0x5c73f0};}function shouldInstallTarget(_0x5b0849,_0x1add78){const _0x180a24=a84_0xbe1e73;if(_0x1add78['source']===_0x180a24(0x1c7)||_0x1add78['source']===_0x180a24(0x1b2))return!a84_0x30acce['eq'](_0x5b0849,_0x1add78['version']);return a84_0x30acce['lt'](_0x5b0849,_0x1add78['version']);}export function installCliPackage(_0x31f43f,_0x294c61,_0x3d87d6=resolveCurrentCliNpmPrefix()){const _0x563621=a84_0xbe1e73,_0x2f70c5=resolveNpmBin(_0x563621(0x1de)),_0x121193=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x31f43f,_0x58dcb8=[_0x563621(0x1f5),'-g',_0x121193],_0x59e31f=runNpmInstall(_0x2f70c5,_0x58dcb8,_0x294c61);if(_0x59e31f['ok']||!isNpmPrefixPermissionError(_0x59e31f['error']))return _0x59e31f;if(!_0x3d87d6||_0x59e31f[_0x563621(0x1e0)]?.[_0x563621(0x1ba)]()[_0x563621(0x1ee)](_0x3d87d6[_0x563621(0x1ba)]()))return _0x59e31f;return console[_0x563621(0x1d3)](_0x563621(0x1d2)+_0x3d87d6),runNpmInstall(_0x2f70c5,[..._0x58dcb8,'--prefix',_0x3d87d6],_0x294c61);}export function resolveCurrentCliNpmPrefix(_0x14cc44=fileURLToPath(import.meta.url),_0x1ba24f=process[a84_0xbe1e73(0x1d7)]){const _0x2c20ad=a84_0xbe1e73,_0x1deaa6=_0x1ba24f===_0x2c20ad(0x1c2)?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x35553e=_0x1deaa6[_0x2c20ad(0x1c0)](_0x1deaa6['dirname'](_0x1deaa6['dirname'](_0x14cc44))),_0x27288c=_0x1ba24f===_0x2c20ad(0x1c2)?_0x2c20ad(0x1c5):_0x2c20ad(0x1b1);let _0x58f99f=_0x1deaa6[_0x2c20ad(0x1c0)](_0x35553e);while(!![]){if(_0x1deaa6['basename'](_0x58f99f)===_0x2c20ad(0x1bb)&&_0x1deaa6['relative'](_0x58f99f,_0x35553e)===_0x27288c){const _0x498bda=_0x1deaa6[_0x2c20ad(0x1c0)](_0x58f99f);return _0x1deaa6[_0x2c20ad(0x1f2)](_0x498bda)===_0x2c20ad(0x1d6)?_0x1deaa6['dirname'](_0x498bda):_0x498bda;}const _0x2b561c=_0x1deaa6['dirname'](_0x58f99f);if(_0x2b561c===_0x58f99f)return null;_0x58f99f=_0x2b561c;}}function runNpmInstall(_0x10b1a0,_0xb6f45b,_0x20a3e3){const _0x2034e8=a84_0xbe1e73;console['log']('*\x20'+[_0x10b1a0,..._0xb6f45b][_0x2034e8(0x1e4)]('\x20'));const _0x328e0a=spawnSync(_0x10b1a0,_0xb6f45b,{'cwd':process['cwd'](),'stdio':'pipe','env':process.env,'shell':![]}),_0x470e3f=_0x328e0a['stderr']?_0x328e0a['stderr'][_0x2034e8(0x1d0)]()[_0x2034e8(0x1f4)]():'',_0x45789b=_0x328e0a['stdout']?_0x328e0a['stdout'][_0x2034e8(0x1d0)]()[_0x2034e8(0x1f4)]():'';if(!_0x20a3e3){if(_0x45789b)process[_0x2034e8(0x1b5)][_0x2034e8(0x1cf)](_0x45789b+'\x0a');if(_0x470e3f)process[_0x2034e8(0x201)][_0x2034e8(0x1cf)](_0x470e3f+'\x0a');}if(_0x328e0a[_0x2034e8(0x1df)]===0x0)return{'ok':!![]};const _0x23236d=_0x328e0a[_0x2034e8(0x1e0)]?.['message']||_0x470e3f||_0x45789b||'exit\x20'+(_0x328e0a['status']??_0x2034e8(0x1e1));return{'ok':![],'error':_0x23236d};}function isNpmPrefixPermissionError(_0x176d0d){const _0x32a062=a84_0xbe1e73;return Boolean(_0x176d0d&&/\b(?:EACCES|EPERM)\b/[_0x32a062(0x1b3)](_0x176d0d));}function repairCurrentBuiltinSkill(_0x3e77fb){const _0x52af58=a84_0xbe1e73;console[_0x52af58(0x1ea)](_0x52af58(0x1b8));const _0x556c3e=installBuiltinSkill({'stdio':_0x3e77fb?'pipe':'inherit'});if(_0x556c3e['ok'])return console['log']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x556c3e['skillVersion']+_0x52af58(0x1e6)),!![];return console['warn']('\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+(_0x556c3e[_0x52af58(0x1b6)]||_0x52af58(0x1ef))+_0x52af58(0x1f9)+(_0x556c3e[_0x52af58(0x1e0)]||_0x52af58(0x1e1))),console[_0x52af58(0x1ea)](_0x52af58(0x1b0)+_0x556c3e[_0x52af58(0x1c1)]),![];}function verifyUpdatedBuiltinSkill(_0x87e9d){const _0x33dd79=a84_0xbe1e73;console[_0x33dd79(0x1ea)](_0x33dd79(0x1b8));const _0xc7c84a=inspectInstalledBuiltinSkillVersion(_0x87e9d);if(_0xc7c84a[_0x33dd79(0x1f7)]==='current')return console['log']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x87e9d+_0x33dd79(0x1e6)),!![];console[_0x33dd79(0x1d3)](_0x33dd79(0x1d5)+_0xc7c84a['state']+'.');if(_0xc7c84a[_0x33dd79(0x1e5)])console[_0x33dd79(0x1d3)]('\x20\x20'+_0xc7c84a[_0x33dd79(0x1e5)]);return console['log'](_0x33dd79(0x1b0)+_0xc7c84a[_0x33dd79(0x1c1)]),![];}async function execute(_0x68ce43){const _0x1da344=a84_0xbe1e73;await validateUpdateFlags(_0x68ce43);const _0xb81fe=getCliVersion();console[_0x1da344(0x1ea)](_0x1da344(0x1ce)+_0xb81fe),console['log']('Checking\x20npm\x20dist-tags...');const _0x17498d=await resolveTargetVersion(_0x68ce43);if(!_0x17498d){const _0x4d793d=_0x68ce43[_0x1da344(0x1e2)](_0x1da344(0x1b2))?_0x1da344(0x1b2):_0x1da344(0x1ec),_0x1695d1=_0x1da344(0x1c3)+_0x4d793d+_0x1da344(0x1d8);return console[_0x1da344(0x1d3)](_0x1695d1),console['log'](_0x1da344(0x1e8)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4d793d),{'ok':![]};}const _0x45d6a8=[_0xb81fe,_0x17498d['version']][_0x1da344(0x1f6)](_0x38adf5=>!a84_0x30acce[_0x1da344(0x1f1)](_0x38adf5));if(_0x45d6a8)return console['warn'](_0x1da344(0x1d1)+_0x45d6a8+'.'),{'ok':![]};if(!shouldInstallTarget(_0xb81fe,_0x17498d)){const _0x2b6393=_0x17498d[_0x1da344(0x1c9)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0x17498d[_0x1da344(0x1c7)]+').':_0x1da344(0x1af)+_0x17498d[_0x1da344(0x1c7)]+').';return console['log'](_0x2b6393),{'ok':repairCurrentBuiltinSkill(_0x68ce43[_0x1da344(0x1bd)])};}console[_0x1da344(0x1ea)](_0x1da344(0x1f8)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0xb81fe+'\x20->\x20'+_0x17498d[_0x1da344(0x1c7)]);const _0x301b48=installCliPackage(_0x17498d[_0x1da344(0x1c7)],_0x68ce43['nonInteractive']);if(!_0x301b48['ok']){const _0x113824=_0x1da344(0x1c8)+(_0x301b48[_0x1da344(0x1e0)]||_0x1da344(0x1e1));return console[_0x1da344(0x1e0)](_0x113824),console[_0x1da344(0x1ea)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x17498d[_0x1da344(0x1c7)]),{'ok':![]};}return console[_0x1da344(0x1ea)](_0x1da344(0x1b4)+_0x17498d[_0x1da344(0x1c7)]+'.'),console[_0x1da344(0x1ea)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'),{'ok':verifyUpdatedBuiltinSkill(_0x17498d['version'])};}export const updateDefinition={'service':a84_0xbe1e73(0x1e7),'command':a84_0xbe1e73(0x1fc),'description':a84_0xbe1e73(0x1b7)+CLI_BIN_NAME+a84_0xbe1e73(0x1c6),'risk':a84_0xbe1e73(0x1be),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a85_0xfb4143=a85_0x54e2;(function(_0x411a74,_0x953f9a){const _0x508eac=a85_0x54e2,_0x4d2e6c=_0x411a74();while(!![]){try{const _0x43fcd7=parseInt(_0x508eac(0x1a3))/0x1*(parseInt(_0x508eac(0x190))/0x2)+parseInt(_0x508eac(0x192))/0x3+-parseInt(_0x508eac(0x196))/0x4+-parseInt(_0x508eac(0x19a))/0x5*(-parseInt(_0x508eac(0x188))/0x6)+parseInt(_0x508eac(0x19d))/0x7+-parseInt(_0x508eac(0x19e))/0x8+-parseInt(_0x508eac(0x1a4))/0x9;if(_0x43fcd7===_0x953f9a)break;else _0x4d2e6c['push'](_0x4d2e6c['shift']());}catch(_0x58ef86){_0x4d2e6c['push'](_0x4d2e6c['shift']());}}}(a85_0x37a7,0x8f43d));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a85_0xfb4143(0x18a),SUPPORTED_PROVIDERS=[a85_0xfb4143(0x199)];function readBindingInput(_0x42090a){const _0x5ccbe3=a85_0xfb4143,_0x51b120=_0x42090a['str'](_0x5ccbe3(0x18c))['trim']()['toLowerCase']();if(!SUPPORTED_PROVIDERS[_0x5ccbe3(0x198)](_0x51b120))throw CliErrors[_0x5ccbe3(0x18e)](_0x5ccbe3(0x18f)+(_0x51b120||_0x5ccbe3(0x1a1))+'.',_0x5ccbe3(0x193)+SUPPORTED_PROVIDERS[_0x5ccbe3(0x19f)](',\x20')+'.');const _0x521232=_0x42090a[_0x5ccbe3(0x189)](_0x5ccbe3(0x18d))[_0x5ccbe3(0x197)]();if(!_0x521232)throw CliErrors[_0x5ccbe3(0x18e)]('--account-id\x20cannot\x20be\x20empty.',_0x5ccbe3(0x1a0));return{'provider':_0x51b120,'accountId':_0x521232};}function buildBindingData(_0x575b9d,_0x4eea38,_0x11b349){const _0x1d15c6=a85_0xfb4143;return{'operation':_0x1d15c6(0x195),'selector':{'provider':_0x575b9d,'accountId':_0x4eea38},'before':null,'after':{'provider':_0x575b9d,'accountId':_0x4eea38,'bound':!![]},'dryRun':_0x11b349,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':'user-account','command':a85_0xfb4143(0x195),'description':a85_0xfb4143(0x1a6),'risk':a85_0xfb4143(0x194),'confirmationDescription':a85_0xfb4143(0x19b),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':'provider','type':a85_0xfb4143(0x19c),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':a85_0xfb4143(0x1a2)},{'name':a85_0xfb4143(0x18d),'type':a85_0xfb4143(0x19c),'required':!![],'description':'External\x20account\x20ID\x20for\x20the\x20selected\x20provider'}],async 'validate'(_0x5a244a){readBindingInput(_0x5a244a);},async 'dryRun'(_0x3c8cdc){const _0x307c96=a85_0xfb4143,{provider:_0x187848,accountId:_0x4b5c6d}=readBindingInput(_0x3c8cdc);return{...buildBindingData(_0x187848,_0x4b5c6d,!![]),'method':_0x307c96(0x1a5),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x187848,'accountId':_0x4b5c6d}};},async 'execute'(_0x5bfb84){const _0xad9929=a85_0xfb4143,{provider:_0x4a6f3a,accountId:_0x41292f}=readBindingInput(_0x5bfb84),_0x1e2eb6=await bindExternalUserAccount(_0x4a6f3a,_0x41292f);if(_0x1e2eb6!==!![])throw CliErrors[_0xad9929(0x191)](_0xad9929(0x18b),'Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.');return{'ok':!![],'data':buildBindingData(_0x4a6f3a,_0x41292f,![]),'message':'Bound\x20current\x20user\x20to\x20external\x20provider\x20account.'};}};function a85_0x54e2(_0x3c533b,_0x3201ff){_0x3c533b=_0x3c533b-0x188;const _0x37a739=a85_0x37a7();let _0x54e2f0=_0x37a739[_0x3c533b];return _0x54e2f0;}function a85_0x37a7(){const _0x46a218=['write','bind','415520rJYRMH','trim','includes','dingtalk','895zsDzVA','Binds\x20the\x20platform\x20user\x20of\x20the\x20current\x20AccessKey\x20to\x20the\x20given\x20collaboration-provider\x20account.\x20An\x20existing\x20bind\x20for\x20the\x20same\x20provider\x20may\x20be\x20replaced.','string','7273812LbuUvH','8132312SLeUrC','join','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.','(empty)','External\x20account\x20provider','10TkZwqT','9513765CTjyTK','POST','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','32904whMgpN','str','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','External\x20account\x20binding\x20was\x20not\x20confirmed.','provider','account-id','validation','Unsupported\x20provider:\x20','51374XnNMkC','apiError','1460085dYPNjL','Pass\x20one\x20of:\x20'];a85_0x37a7=function(){return _0x46a218;};return a85_0x37a7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a86_0x5e02(_0x2b71cd,_0x7acd95){_0x2b71cd=_0x2b71cd-0xd9;const _0x3e3765=a86_0x3e37();let _0x5e024d=_0x3e3765[_0x2b71cd];return _0x5e024d;}(function(_0x5a2b0a,_0x27a3f3){const _0x2e9108=a86_0x5e02,_0x2564ce=_0x5a2b0a();while(!![]){try{const _0x5334e1=parseInt(_0x2e9108(0xdf))/0x1*(parseInt(_0x2e9108(0xdc))/0x2)+parseInt(_0x2e9108(0xde))/0x3+parseInt(_0x2e9108(0xe2))/0x4+parseInt(_0x2e9108(0xdb))/0x5+-parseInt(_0x2e9108(0xda))/0x6*(parseInt(_0x2e9108(0xe1))/0x7)+parseInt(_0x2e9108(0xe0))/0x8*(-parseInt(_0x2e9108(0xe3))/0x9)+-parseInt(_0x2e9108(0xd9))/0xa*(-parseInt(_0x2e9108(0xdd))/0xb);if(_0x5334e1===_0x27a3f3)break;else _0x2564ce['push'](_0x2564ce['shift']());}catch(_0x2945c8){_0x2564ce['push'](_0x2564ce['shift']());}}}(a86_0x3e37,0xeaaa1));import{bindUserAccount}from'../../commands/user-account/bind.js';export const userAccountDefinitions=[bindUserAccount];function a86_0x3e37(){const _0x5fc498=['14253072VydHKi','364PlLNAl','5586564joyAHZ','9mkFgIu','10196230CYPUhf','186918YMrFeu','2124845jRdCDl','112742cqUaKL','11xQHCOS','4395513mKWBDM','1BlOIeR'];a86_0x3e37=function(){return _0x5fc498;};return a86_0x3e37();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0xd57cda=a87_0x1c5d;(function(_0x2b063d,_0x5a5589){const _0x1b2aea=a87_0x1c5d,_0x5b6f62=_0x2b063d();while(!![]){try{const _0x3dd2bf=-parseInt(_0x1b2aea(0x1ca))/0x1*(-parseInt(_0x1b2aea(0x1ba))/0x2)+parseInt(_0x1b2aea(0x18d))/0x3*(parseInt(_0x1b2aea(0x193))/0x4)+parseInt(_0x1b2aea(0x1b0))/0x5+-parseInt(_0x1b2aea(0x1a4))/0x6*(-parseInt(_0x1b2aea(0x1c3))/0x7)+parseInt(_0x1b2aea(0x1a6))/0x8+-parseInt(_0x1b2aea(0x1bf))/0x9+-parseInt(_0x1b2aea(0x1a0))/0xa;if(_0x3dd2bf===_0x5a5589)break;else _0x5b6f62['push'](_0x5b6f62['shift']());}catch(_0x4fd38b){_0x5b6f62['push'](_0x5b6f62['shift']());}}}(a87_0x2142,0x73f23));function a87_0x1c5d(_0x38ce92,_0x13168e){_0x38ce92=_0x38ce92-0x18b;const _0x2142f2=a87_0x2142();let _0x1c5dd2=_0x2142f2[_0x38ce92];return _0x1c5dd2;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':'app','type':a87_0xd57cda(0x199),'description':a87_0xd57cda(0x1b5)},{'name':'appcode','type':a87_0xd57cda(0x199),'description':a87_0xd57cda(0x1c6)},{'name':a87_0xd57cda(0x1b7),'type':'string','description':a87_0xd57cda(0x1bd),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x11c635,_0x118403){const _0x4892ad=a87_0xd57cda,_0x445c42=_0x11c635['str']('app')['trim'](),_0x5bdd65=_0x11c635[_0x4892ad(0x1a9)](_0x4892ad(0x1ac))[_0x4892ad(0x198)](),_0xeeac43=_0x11c635[_0x4892ad(0x1a9)](_0x4892ad(0x1b7))[_0x4892ad(0x198)](),_0x23d7d7=resolveWorkspaceEnv(_0xeeac43||_0x11c635[_0x4892ad(0x1a8)]||DEFAULT_CONFIG_VALUES[_0x4892ad(0x1b7)]);if(!_0x445c42&&!_0x5bdd65)throw CliErrors[_0x4892ad(0x1c4)](_0x4892ad(0x1b4),_0x4892ad(0x1c2)+CLI_BIN_NAME+_0x4892ad(0x18f)+_0x118403+_0x4892ad(0x1ab)+CLI_BIN_NAME+'\x20workspace\x20'+_0x118403+'\x20--appcode\x20<code>\x20[--env\x20daily]');if(_0x445c42&&_0x5bdd65)throw CliErrors[_0x4892ad(0x1c4)]('Conflicting\x20workspace\x20app\x20selectors.','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.');const _0x393cbe=resolveWriteConfigPath('project'),_0x18b514=readConfigFile(_0x393cbe);assertWorkspaceCommandState(_0x118403,_0x18b514);const _0x1d0b8e=_0x5bdd65||await resolveRemoteAppCode({'command':_0x118403,'appName':_0x445c42,'env':_0x23d7d7,'accessKey':_0x11c635['accessKey']});return writeWorkspaceConfig({'command':_0x118403,'appName':_0x445c42,'appcode':_0x1d0b8e,'env':_0x23d7d7,'shouldWriteEnv':!!_0xeeac43,'accessKey':_0x11c635[_0x4892ad(0x1cb)]},_0x393cbe,_0x18b514),{'ok':!![],'data':{'configPath':_0x393cbe,'app':_0x445c42||null,'appcode':_0x1d0b8e,'env':_0xeeac43?_0x23d7d7:null,'accessKeyWritten':![],'command':_0x4892ad(0x1b9)+_0x118403},'message':buildWorkspaceMessage(_0x393cbe,_0x445c42,_0x1d0b8e,_0xeeac43?_0x23d7d7:undefined)};}async function resolveRemoteAppCode(_0x2b30ad){const _0x524062=a87_0xd57cda;if(!_0x2b30ad[_0x524062(0x1cb)])throw CliErrors[_0x524062(0x1c0)](_0x524062(0x19c)+CLI_BIN_NAME+_0x524062(0x18f)+_0x2b30ad[_0x524062(0x1a7)]+'.');const {setActiveAK:_0x5d6334}=await import(_0x524062(0x1ad)),{getRemoteAppList:_0x1c6b25}=await import(_0x524062(0x19e));_0x5d6334(_0x2b30ad['accessKey']);const _0x50ace5=await _0x1c6b25({'env':_0x2b30ad['env'],'accessKey':_0x2b30ad[_0x524062(0x1cb)],'noCache':![]}),_0xe1d38e=findAppByName(_0x50ace5['items'],_0x2b30ad[_0x524062(0x1b8)]);if(_0xe1d38e&&!isRuntimeAccessibleApp(_0xe1d38e))throw runtimeInaccessibleAppError(_0xe1d38e,'\x22'+_0x2b30ad['appName']+'\x22');const _0x5aac6a=_0xe1d38e?.[_0x524062(0x1cc)]?.[_0x524062(0x198)]();if(_0x5aac6a)return _0x5aac6a;const _0x2c7a20=_0x50ace5[_0x524062(0x18e)][_0x524062(0x195)](_0xae6d8f=>_0xae6d8f[_0x524062(0x1b8)])[_0x524062(0x192)](Boolean),_0xdac7e8=_0x2c7a20[_0x524062(0x191)]?_0x524062(0x1ae)+Array['from'](new Set(_0x2c7a20))[_0x524062(0x18c)](',\x20')+'.':'Run\x20`'+CLI_BIN_NAME+_0x524062(0x19b);throw CliErrors[_0x524062(0x1c4)]('App\x20\x22'+_0x2b30ad[_0x524062(0x1b8)]+_0x524062(0x194),_0xdac7e8);}function writeWorkspaceConfig(_0x5eeb9c,_0x8610b0,_0x3ad73e){const _0x3a0c00=a87_0xd57cda;_0x5eeb9c[_0x3a0c00(0x1b1)]&&(_0x3ad73e['env']=_0x5eeb9c[_0x3a0c00(0x1b7)]);if(_0x5eeb9c[_0x3a0c00(0x1b8)]){const _0x453575=isRecord(_0x3ad73e[_0x3a0c00(0x1c8)])?{..._0x3ad73e[_0x3a0c00(0x1c8)]}:{},_0x396672=isRecord(_0x453575[_0x5eeb9c[_0x3a0c00(0x1b8)]])?_0x453575[_0x5eeb9c[_0x3a0c00(0x1b8)]]:{};return _0x453575[_0x5eeb9c[_0x3a0c00(0x1b8)]]={..._0x396672,'appcode':_0x5eeb9c[_0x3a0c00(0x1ac)]},_0x3ad73e[_0x3a0c00(0x1c8)]=_0x453575,_0x3ad73e['defaultApp']=_0x5eeb9c[_0x3a0c00(0x1b8)],delete _0x3ad73e[_0x3a0c00(0x1ac)],delete _0x3ad73e['app'],writeAndReturn(_0x8610b0,_0x3ad73e);}return _0x3ad73e[_0x3a0c00(0x1ac)]=_0x5eeb9c[_0x3a0c00(0x1ac)],delete _0x3ad73e[_0x3a0c00(0x197)],delete _0x3ad73e[_0x3a0c00(0x1a5)],writeAndReturn(_0x8610b0,_0x3ad73e);}function writeAndReturn(_0x14cd41,_0x3d547e){return writeConfigFile(_0x14cd41,_0x3d547e),_0x14cd41;}function resolveWorkspaceEnv(_0x5dbddc){const _0x42af51=a87_0xd57cda;if(RUNTIME_ENV_VALUES[_0x42af51(0x1af)](_0x5dbddc))return _0x5dbddc;throw CliErrors[_0x42af51(0x1c4)](_0x42af51(0x1c1)+_0x5dbddc+_0x42af51(0x1c5)+RUNTIME_ENV_VALUES[_0x42af51(0x18c)](',\x20'));}function buildWorkspaceMessage(_0x3be3dc,_0x5d1cdf,_0x261fb0,_0x2c669f){const _0x157114=a87_0xd57cda,_0x121d66=_0x5d1cdf?_0x5d1cdf+'\x20('+_0x261fb0+')':_0x261fb0,_0x1b4ba6=_0x2c669f?_0x157114(0x19a)+_0x2c669f:'';return _0x157114(0x1bb)+_0x3be3dc+_0x157114(0x18b)+_0x121d66+_0x1b4ba6+_0x157114(0x1c7);}function isRecord(_0x38cdb3){const _0x785f5c=a87_0xd57cda;return typeof _0x38cdb3===_0x785f5c(0x1a1)&&_0x38cdb3!==null&&!Array[_0x785f5c(0x1a3)](_0x38cdb3);}function a87_0x2142(){const _0x5b6a2b=['appcode','../../core/api-client.js','Available\x20apps:\x20','includes','1877270nwgknG','shouldWriteEnv','Workspace\x20app\x20context\x20is\x20not\x20initialized.','Workspace\x20app\x20context\x20is\x20already\x20initialized.','Missing\x20workspace\x20app\x20selector.','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','write','env','appName','workspace\x20','718ppTAYB','Workspace\x20configured.\x0aConfig\x20file:\x20','Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','Target\x20environment','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','8547507xWMeWq','authRequired','Invalid\x20env\x20\x22','Usage:\x20','42gFDxNs','validation','\x22.\x20Allowed:\x20','App\x20code\x20to\x20bind\x20directly','\x0aAccessKey:\x20not\x20written','apps','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.','1373Zvbrjb','accessKey','appCode','\x0aDefault\x20app:\x20','join','447390gXpzQq','items','\x20workspace\x20','Run\x20`','length','filter','20ssopGP','\x22\x20not\x20found.','map','init','defaultApp','trim','string','\x0aEnv:\x20','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','Use\x20`','../../commands/app/remote-source.js','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','16607340xgoGRg','object','use','isArray','832836InBalo','app','5108200PmczdU','command','envName','str','Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20'];a87_0x2142=function(){return _0x5b6a2b;};return a87_0x2142();}function hasWorkspaceAppBinding(_0xa61aff){const _0x51a113=a87_0xd57cda;if(typeof _0xa61aff['appcode']===_0x51a113(0x199)&&_0xa61aff['appcode'][_0x51a113(0x198)]()[_0x51a113(0x191)]>0x0)return!![];if(typeof _0xa61aff[_0x51a113(0x197)]!==_0x51a113(0x199)||!_0xa61aff['defaultApp'][_0x51a113(0x198)]())return![];if(!isRecord(_0xa61aff[_0x51a113(0x1c8)]))return![];const _0x59e7bc=_0xa61aff[_0x51a113(0x1c8)][_0xa61aff['defaultApp'][_0x51a113(0x198)]()];return isRecord(_0x59e7bc)&&typeof _0x59e7bc['appcode']===_0x51a113(0x199)&&_0x59e7bc[_0x51a113(0x1ac)][_0x51a113(0x198)]()[_0x51a113(0x191)]>0x0;}function assertWorkspaceCommandState(_0x568953,_0x1f4c6a){const _0x2abfc2=a87_0xd57cda,_0x2f57ae=hasWorkspaceAppBinding(_0x1f4c6a);if(_0x568953==='init'&&_0x2f57ae)throw CliErrors[_0x2abfc2(0x1c4)](_0x2abfc2(0x1b3),_0x2abfc2(0x19d)+CLI_BIN_NAME+_0x2abfc2(0x19f)+CLI_BIN_NAME+_0x2abfc2(0x1be));if(_0x568953==='use'&&!_0x2f57ae)throw CliErrors['validation'](_0x2abfc2(0x1b2),_0x2abfc2(0x190)+CLI_BIN_NAME+'\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');}function makeWorkspaceCommand(_0x5c4722){const _0x2f3a37=a87_0xd57cda;return{'service':'workspace','command':_0x5c4722,'description':_0x5c4722===_0x2f3a37(0x196)?_0x2f3a37(0x1aa):_0x2f3a37(0x1bc),'risk':_0x2f3a37(0x1b6),'confirmationDescription':_0x5c4722===_0x2f3a37(0x196)?_0x2f3a37(0x1c9):'Updates\x20the\x20app\x20binding\x20already\x20present\x20in\x20the\x20current\x20working\x20directory\x20and\x20sets\x20the\x20selected\x20app\x20as\x20the\x20directory\x20default.\x20AccessKey\x20is\x20not\x20written.','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x4e651f){return executeWorkspaceUse(_0x4e651f,_0x5c4722);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a87_0xd57cda(0x196)),makeWorkspaceCommand(a87_0xd57cda(0x1a2))];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x1e3e36=a88_0x3134;function a88_0x3134(_0x1ae33d,_0x1a2bd0){_0x1ae33d=_0x1ae33d-0x192;const _0x51eb33=a88_0x51eb();let _0x313494=_0x51eb33[_0x1ae33d];return _0x313494;}(function(_0x1141e9,_0x45207a){const _0x3cfc5a=a88_0x3134,_0x56a168=_0x1141e9();while(!![]){try{const _0x206cea=parseInt(_0x3cfc5a(0x1a4))/0x1*(parseInt(_0x3cfc5a(0x1b5))/0x2)+-parseInt(_0x3cfc5a(0x1b3))/0x3*(parseInt(_0x3cfc5a(0x1bd))/0x4)+-parseInt(_0x3cfc5a(0x1c2))/0x5+-parseInt(_0x3cfc5a(0x1bb))/0x6*(-parseInt(_0x3cfc5a(0x1a3))/0x7)+parseInt(_0x3cfc5a(0x1ad))/0x8*(-parseInt(_0x3cfc5a(0x193))/0x9)+-parseInt(_0x3cfc5a(0x1b6))/0xa+-parseInt(_0x3cfc5a(0x1bf))/0xb*(-parseInt(_0x3cfc5a(0x1ba))/0xc);if(_0x206cea===_0x45207a)break;else _0x56a168['push'](_0x56a168['shift']());}catch(_0x51769e){_0x56a168['push'](_0x56a168['shift']());}}}(a88_0x51eb,0x9f62c));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';export const DOMAIN_CONFIG_FIELDS=[a88_0x1e3e36(0x192),a88_0x1e3e36(0x1c4),a88_0x1e3e36(0x1a8),a88_0x1e3e36(0x19a),a88_0x1e3e36(0x1ae)];const DOMAIN_FLAGS={'userDomain':'user-domain','apiDomain':'api-domain','runtimeDomain':a88_0x1e3e36(0x19d),'skillDomain':'skill-domain','kbDomain':a88_0x1e3e36(0x1bc)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a88_0x1e3e36(0x1ac),a88_0x1e3e36(0x1be),a88_0x1e3e36(0x195)];export function normalizeDomainOrigin(_0x5a1036,_0x2f5b1e){const _0x54834c=a88_0x1e3e36;if(typeof _0x2f5b1e!==_0x54834c(0x19f)||!_0x2f5b1e['trim']())throw CliErrors[_0x54834c(0x197)](_0x54834c(0x1a7)+_0x5a1036+':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.');let _0x2f7260;try{_0x2f7260=new URL(_0x2f5b1e[_0x54834c(0x1b1)]());}catch{throw CliErrors[_0x54834c(0x197)](_0x54834c(0x1a7)+_0x5a1036+_0x54834c(0x198)+_0x2f5b1e+_0x54834c(0x199));}if(_0x2f7260['protocol']!==_0x54834c(0x1c3)||_0x2f7260['username']||_0x2f7260[_0x54834c(0x1b2)]||_0x2f7260[_0x54834c(0x1a6)]!=='/'&&_0x2f7260[_0x54834c(0x1a6)]!==''||_0x2f7260[_0x54834c(0x1a2)]||_0x2f7260[_0x54834c(0x1af)])throw CliErrors['validation'](_0x54834c(0x1a7)+_0x5a1036+_0x54834c(0x1a9),_0x54834c(0x19c));return _0x2f7260['origin'];}export function readDomainConfig(_0x4dc2be){const _0x15e831=a88_0x1e3e36,_0x477344=isAbsolute(_0x4dc2be)?_0x4dc2be:resolve(process[_0x15e831(0x1a0)](),_0x4dc2be);if(!existsSync(_0x477344))throw CliErrors['validation'](_0x15e831(0x1aa)+_0x477344);let _0x1d1678;try{_0x1d1678=JSON[_0x15e831(0x1c0)](readFileSync(_0x477344,_0x15e831(0x1c5)));}catch{throw CliErrors[_0x15e831(0x197)](_0x15e831(0x19b)+_0x477344);}if(!_0x1d1678||typeof _0x1d1678!==_0x15e831(0x1b4)||Array[_0x15e831(0x1ab)](_0x1d1678))throw CliErrors[_0x15e831(0x197)](_0x15e831(0x1a1));const _0x345037=_0x1d1678,_0x33c831=Object['keys'](_0x345037)['filter'](_0x31e3e8=>!DOMAIN_CONFIG_FIELDS[_0x15e831(0x1b8)](_0x31e3e8));if(_0x33c831[_0x15e831(0x194)]>0x0)throw CliErrors[_0x15e831(0x197)](_0x15e831(0x1b0)+_0x33c831[_0x15e831(0x1a5)](',\x20'),_0x15e831(0x1b9)+DOMAIN_CONFIG_FIELDS[_0x15e831(0x1a5)](',\x20'));const _0x1b04ff={};for(const _0x38e6cc of DOMAIN_CONFIG_FIELDS){_0x345037[_0x38e6cc]!==undefined&&(_0x1b04ff[_0x38e6cc]=normalizeDomainOrigin(_0x38e6cc,_0x345037[_0x38e6cc]));}if(Object[_0x15e831(0x1b7)](_0x1b04ff)[_0x15e831(0x194)]===0x0)throw CliErrors[_0x15e831(0x197)](_0x15e831(0x19e));return _0x1b04ff;}export function resolveDomainFlags(_0x3c0e74){const _0xac14b6=a88_0x1e3e36,_0x4e7d76=(_0x3c0e74[_0xac14b6(0x1c1)](_0xac14b6(0x196))||'')[_0xac14b6(0x1b1)](),_0x43ad79=_0x4e7d76?readDomainConfig(_0x4e7d76):{};for(const _0x4c2f11 of DOMAIN_CONFIG_FIELDS){const _0x38f99a=(_0x3c0e74[_0xac14b6(0x1c1)](DOMAIN_FLAGS[_0x4c2f11])||'')['trim']();if(_0x38f99a)_0x43ad79[_0x4c2f11]=normalizeDomainOrigin(_0x4c2f11,_0x38f99a);}return _0x43ad79;}function a88_0x51eb(){const _0xdd8043=['6388UfJkNM','13014330lUgLgC','keys','includes','Allowed\x20fields:\x20','394836ocbSCW','30UGRXsO','kb-domain','2409416ouduZK','platformDomain','858nXIKJJ','parse','str','5862100BovgjJ','https:','apiDomain','utf8','userDomain','2841453TkwTSq','length','skillHubDomain','domain-config','validation',':\x20\x22','\x22\x20is\x20not\x20a\x20valid\x20URL.','skillDomain','Invalid\x20domain\x20config\x20JSON:\x20','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','runtime-domain','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','string','cwd','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','search','1215592TTcCLi','191neAhRk','join','pathname','Invalid\x20','runtimeDomain',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','Domain\x20config\x20file\x20not\x20found:\x20','isArray','agentDomain','8vntfZQ','kbDomain','hash','Unsupported\x20domain\x20config\x20field(s):\x20','trim','password','3ZgGXwF','object'];a88_0x51eb=function(){return _0xdd8043;};return a88_0x51eb();}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x2738d4=a89_0x23f4;(function(_0x35d18d,_0x1c5565){const _0x3064a4=a89_0x23f4,_0x10ee15=_0x35d18d();while(!![]){try{const _0x156fe5=-parseInt(_0x3064a4(0xe5))/0x1*(-parseInt(_0x3064a4(0xfa))/0x2)+parseInt(_0x3064a4(0xf9))/0x3+parseInt(_0x3064a4(0xe2))/0x4*(-parseInt(_0x3064a4(0xee))/0x5)+parseInt(_0x3064a4(0xeb))/0x6*(parseInt(_0x3064a4(0xf0))/0x7)+parseInt(_0x3064a4(0xf3))/0x8+parseInt(_0x3064a4(0xdf))/0x9*(parseInt(_0x3064a4(0xf8))/0xa)+-parseInt(_0x3064a4(0xea))/0xb;if(_0x156fe5===_0x1c5565)break;else _0x10ee15['push'](_0x10ee15['shift']());}catch(_0x57221c){_0x10ee15['push'](_0x10ee15['shift']());}}}(a89_0x22d0,0xacd8a));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{DEFAULT_LOVRABET_REGION,ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export const CONFIG_FIELD_SCHEMAS={'region':{'description':a89_0x2738d4(0xef),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':ENABLED_LOVRABET_REGION_VALUES,'defaultValue':DEFAULT_LOVRABET_REGION,'importable':!![]},'env':{'description':a89_0x2738d4(0xf1),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x2738d4(0xd9)],'importable':!![]},'format':{'description':'Default\x20output\x20format','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x2738d4(0xe8)],'importable':!![]},'pageSize':{'description':'Default\x20page\x20size','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a89_0x2738d4(0xe6),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a89_0x2738d4(0xdd),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':'Override\x20runtime\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillDomain':{'description':a89_0x2738d4(0xf2),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'kbDomain':{'description':'Override\x20knowledge-base\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a89_0x2738d4(0xf6),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':'Risk\x20level','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x2738d4(0xf7)],'importable':!![]},'locale':{'description':a89_0x2738d4(0xd8),'topLevel':!![],'cliSettableTopLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x2738d4(0xdb)],'importable':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)[a89_0x2738d4(0xf4)](([,_0x5e990f])=>_0x5e990f[a89_0x2738d4(0xe3)])[a89_0x2738d4(0xde)](([_0x9ac861])=>_0x9ac861));export const CLI_PROTECTED_CONFIG_KEYS=new Set([a89_0x2738d4(0xf7)]);export const CONFIG_ENUM_VALUES=Object[a89_0x2738d4(0xec)](Object[a89_0x2738d4(0xdc)](CONFIG_FIELD_SCHEMAS)[a89_0x2738d4(0xf4)](([,_0xaaba2f])=>_0xaaba2f[a89_0x2738d4(0xed)])[a89_0x2738d4(0xde)](([_0x1058eb,_0x4e3fd6])=>[_0x1058eb,[..._0x4e3fd6[a89_0x2738d4(0xed)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a89_0x2738d4(0xdc)](CONFIG_FIELD_SCHEMAS)[a89_0x2738d4(0xf4)](([,_0x29f74c])=>_0x29f74c[a89_0x2738d4(0xf5)])['map'](([_0x5bca99])=>_0x5bca99);export function getConfigFieldSchema(_0x456110){return CONFIG_FIELD_SCHEMAS[_0x456110];}export function getConfigEnumValues(_0x31da56){const _0xa52727=a89_0x2738d4;return getConfigFieldSchema(_0x31da56)?.[_0xa52727(0xed)];}export function getConfigDefaultValue(_0x20e68a){return getConfigFieldSchema(_0x20e68a)?.['defaultValue'];}export function isTopLevelConfigKey(_0x3fd261){const _0x430236=a89_0x2738d4;return TOP_LEVEL_CONFIG_KEYS[_0x430236(0xe0)](_0x3fd261);}export function isCliProtectedConfigKey(_0x2a2f2f){const _0x1177fc=a89_0x2738d4;return CLI_PROTECTED_CONFIG_KEYS[_0x1177fc(0xe0)](_0x2a2f2f);}const LOCALE_MAP={'zh':a89_0x2738d4(0xe7),'zh-cn':a89_0x2738d4(0xe7),'zh_cn':'zh-CN','en':a89_0x2738d4(0xe4),'en-us':a89_0x2738d4(0xe4),'en_us':a89_0x2738d4(0xe4)};export function normalizeLocale(_0x546d79){const _0x438aa7=a89_0x2738d4;if(!_0x546d79)return null;return LOCALE_MAP[_0x546d79[_0x438aa7(0xe9)]()]??null;}export function isLegacyCompatConfigKey(_0x16e38d){return getConfigFieldSchema(_0x16e38d)?.['legacyCompatOnly']===!![];}function a89_0x22d0(){const _0x58952e=['filter','importable','Access\x20key\x20(client-ak\x20auth)','riskLevel','20CDghDC','1339818AXrFov','2NZTjDQ','Config\x20key.\x20Top-level:\x20','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','env','join','locale','entries','Override\x20user\x20domain','map','370701vOhuzn','has',';\x20local\x20alias:\x20apps.<alias>.appcode','460rsJiwd','cliSettableTopLevel','en-US','1016387kiFphv','Override\x20API\x20domain','zh-CN','format','toLowerCase','16245163sYcUdV','6CgpaMN','fromEntries','enumValues','52025TPAepk','Lovrabet\x20region','9387889dcMaYf','Target\x20environment','Override\x20SkillHub\x20domain','3959104EOEYsK'];a89_0x22d0=function(){return _0x58952e;};return a89_0x22d0();}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x4fe13f){const _0x1c84b0=a89_0x2738d4;return[..._0x4fe13f][_0x1c84b0(0xda)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x3feaa9=a89_0x2738d4;return _0x3feaa9(0xd7)+getTopLevelConfigKeySummary()+_0x3feaa9(0xe1);}function a89_0x23f4(_0x12b80b,_0x126255){_0x12b80b=_0x12b80b-0xd7;const _0x22d0ad=a89_0x22d0();let _0x23f449=_0x22d0ad[_0x12b80b];return _0x23f449;}export function buildAppProfileListFields(_0x142519){return{'env':_0x142519,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x307be8=a90_0xc267;(function(_0x4ccae6,_0x1184fb){const _0x3eb630=a90_0xc267,_0x499d63=_0x4ccae6();while(!![]){try{const _0x3be000=parseInt(_0x3eb630(0x17f))/0x1*(-parseInt(_0x3eb630(0x183))/0x2)+parseInt(_0x3eb630(0x182))/0x3*(-parseInt(_0x3eb630(0x17c))/0x4)+-parseInt(_0x3eb630(0x17b))/0x5+-parseInt(_0x3eb630(0x185))/0x6+-parseInt(_0x3eb630(0x17e))/0x7*(parseInt(_0x3eb630(0x187))/0x8)+-parseInt(_0x3eb630(0x184))/0x9*(-parseInt(_0x3eb630(0x181))/0xa)+-parseInt(_0x3eb630(0x17d))/0xb*(-parseInt(_0x3eb630(0x188))/0xc);if(_0x3be000===_0x1184fb)break;else _0x499d63['push'](_0x499d63['shift']());}catch(_0x1cb192){_0x499d63['push'](_0x499d63['shift']());}}}(a90_0x5822,0xb7d1c));export const APP_PUBLISH_STATUS={'Published':a90_0x307be8(0x180),'Unpublished':'UNPUBLISH'};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a90_0x307be8(0x186)];function a90_0xc267(_0x1130ce,_0x17b0e6){_0x1130ce=_0x1130ce-0x17b;const _0x582266=a90_0x5822();let _0xc2679=_0x582266[_0x1130ce];return _0xc2679;}function a90_0x5822(){const _0x4a2bb7=['11787ulQEVk','PUBLISHED','40HJfBlR','1703439mDmtbH','214BcgVUP','1143279ZdUJbq','1875156FMClGL','Published','90232opWUVH','552eQEKeT','3657400zTUjIr','4NcguRZ','788722MHDcAq','112XQRvVE'];a90_0x5822=function(){return _0x4a2bb7;};return a90_0x5822();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a91_0x9a8b6c=a91_0x8946;(function(_0x2487a3,_0x3d8ff0){const _0x337d13=a91_0x8946,_0x59cb3e=_0x2487a3();while(!![]){try{const _0xbc17e2=-parseInt(_0x337d13(0xcf))/0x1*(parseInt(_0x337d13(0xc5))/0x2)+parseInt(_0x337d13(0xcc))/0x3+parseInt(_0x337d13(0xc8))/0x4+parseInt(_0x337d13(0xd0))/0x5*(parseInt(_0x337d13(0xc7))/0x6)+parseInt(_0x337d13(0xca))/0x7*(-parseInt(_0x337d13(0xc9))/0x8)+-parseInt(_0x337d13(0xcb))/0x9*(-parseInt(_0x337d13(0xce))/0xa)+-parseInt(_0x337d13(0xc6))/0xb;if(_0xbc17e2===_0x3d8ff0)break;else _0x59cb3e['push'](_0x59cb3e['shift']());}catch(_0xde8164){_0x59cb3e['push'](_0x59cb3e['shift']());}}}(a91_0x2cbd,0x1ded9));function a91_0x2cbd(){const _0x26fa80=['480729iDVByM','client-ak','6310PPGfro','2rqNoGq','5NLewcd','ClientAk','108754IDdimn','3667653NlijFn','1180068IdDFPr','317220ZhTYvs','9752dyzztS','483eReEaB','3033DViwJE'];a91_0x2cbd=function(){return _0x26fa80;};return a91_0x2cbd();}function a91_0x8946(_0x27ad02,_0x35c7e0){_0x27ad02=_0x27ad02-0xc4;const _0x2cbde0=a91_0x2cbd();let _0x894698=_0x2cbde0[_0x27ad02];return _0x894698;}export const AUTH_MODE={'ClientAk':a91_0x9a8b6c(0xcd)};export function isAuthMode(_0xd92368){const _0x48de56=a91_0x9a8b6c;return _0xd92368===AUTH_MODE[_0x48de56(0xc4)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a92_0x4caa(_0x43a300,_0x20f704){_0x43a300=_0x43a300-0x97;const _0x5ca12c=a92_0x5ca1();let _0x4caaf3=_0x5ca12c[_0x43a300];return _0x4caaf3;}const a92_0x15b6d8=a92_0x4caa;(function(_0x507d80,_0x44c8c4){const _0x53ef74=a92_0x4caa,_0x271ec3=_0x507d80();while(!![]){try{const _0x349cb4=parseInt(_0x53ef74(0xa1))/0x1+parseInt(_0x53ef74(0x98))/0x2+-parseInt(_0x53ef74(0xa0))/0x3*(parseInt(_0x53ef74(0xa2))/0x4)+-parseInt(_0x53ef74(0xb7))/0x5+-parseInt(_0x53ef74(0xc1))/0x6+parseInt(_0x53ef74(0xbf))/0x7+-parseInt(_0x53ef74(0xaf))/0x8*(-parseInt(_0x53ef74(0xa5))/0x9);if(_0x349cb4===_0x44c8c4)break;else _0x271ec3['push'](_0x271ec3['shift']());}catch(_0x52811d){_0x271ec3['push'](_0x271ec3['shift']());}}}(a92_0x5ca1,0xed860));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a92_0x15b6d8(0xa8)];function a92_0x5ca1(){const _0x49da22=['cliDisplayName','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','2121342GOBZpR','nonInteractive','Override\x20appcode','Output\x20format','boolean','string','SQL\x20query\x20code','<name>','5137998nXCsik','1900104CEHGgZ','4bVGnKZ','help','name','144wSoHFv','Verbose\x20output','Skip\x20confirmation\x20for\x20high-risk\x20writes','cliBinName','Use\x20global\x20config\x20scope','dry-run','Clear\x20output','meowKey','Preview\x20operation\x20without\x20executing','global','126184sTWNqB','params','verbose','Environment','production\x20|\x20development\x20|\x20daily','JSON\x20params\x20for\x20execute\x20commands','sqlcode','Show\x20help','3801205yIekxT','<expr>','clear','type','app','yes','Name\x20filter','appcode','8915326OpuKra','dryRun','6245748JsWMvA','non-interactive','json\x20|\x20pretty\x20|\x20compress'];a92_0x5ca1=function(){return _0x49da22;};return a92_0x5ca1();}export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a92_0x15b6d8(0xc4)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a92_0x15b6d8(0xbe),'meowKey':a92_0x15b6d8(0xbe),'type':a92_0x15b6d8(0x9d),'description':a92_0x15b6d8(0x9a),'hint':'<code>'},{'name':a92_0x15b6d8(0xbb),'meowKey':'app','type':a92_0x15b6d8(0x9d),'description':'Select\x20app\x20profile\x20by\x20name','hint':a92_0x15b6d8(0x9f)},{'name':'env','meowKey':'env','type':a92_0x15b6d8(0x9d),'description':a92_0x15b6d8(0xb2),'hint':a92_0x15b6d8(0xb3)},{'name':'format','meowKey':'format','type':a92_0x15b6d8(0x9d),'description':a92_0x15b6d8(0x9b),'hint':a92_0x15b6d8(0xc3)},{'name':'jq','meowKey':'jq','type':a92_0x15b6d8(0x9d),'description':a92_0x15b6d8(0x97),'hint':a92_0x15b6d8(0xb8)},{'name':a92_0x15b6d8(0xaa),'meowKey':a92_0x15b6d8(0xc0),'type':a92_0x15b6d8(0x9c),'description':a92_0x15b6d8(0xad)},{'name':a92_0x15b6d8(0xbc),'meowKey':a92_0x15b6d8(0xbc),'type':a92_0x15b6d8(0x9c),'description':a92_0x15b6d8(0xa7)},{'name':a92_0x15b6d8(0xc2),'meowKey':a92_0x15b6d8(0x99),'type':a92_0x15b6d8(0x9c),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a92_0x15b6d8(0xae),'meowKey':a92_0x15b6d8(0xae),'type':'boolean','description':a92_0x15b6d8(0xa9)},{'name':'ci','meowKey':'ci','type':a92_0x15b6d8(0x9c),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a92_0x15b6d8(0xa3),'meowKey':a92_0x15b6d8(0xa3),'type':a92_0x15b6d8(0x9c),'description':a92_0x15b6d8(0xb6)},{'name':'id','meowKey':'id','type':a92_0x15b6d8(0x9d),'description':'Record\x20ID','hidden':!![]},{'name':a92_0x15b6d8(0xa4),'meowKey':a92_0x15b6d8(0xa4),'type':a92_0x15b6d8(0x9d),'description':a92_0x15b6d8(0xbd),'hidden':!![]},{'name':a92_0x15b6d8(0xb5),'meowKey':'sqlcode','type':'string','description':a92_0x15b6d8(0x9e),'hidden':!![]},{'name':a92_0x15b6d8(0xb0),'meowKey':'params','type':a92_0x15b6d8(0x9d),'description':a92_0x15b6d8(0xb4),'hidden':!![]},{'name':a92_0x15b6d8(0xb1),'meowKey':a92_0x15b6d8(0xb1),'type':a92_0x15b6d8(0x9c),'description':a92_0x15b6d8(0xa6),'hidden':!![]},{'name':a92_0x15b6d8(0xb9),'meowKey':a92_0x15b6d8(0xb9),'type':'boolean','description':a92_0x15b6d8(0xab),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a92_0x15b6d8(0xbe),a92_0x15b6d8(0xbb),'env','format','jq',a92_0x15b6d8(0xaa),a92_0x15b6d8(0xbc),a92_0x15b6d8(0xc2),'ci']);export function buildMeowFlags(){const _0x1e0f7e=a92_0x15b6d8;return Object['fromEntries'](GLOBAL_FLAGS['map'](_0x401a76=>[_0x401a76[_0x1e0f7e(0xac)],{'type':_0x401a76[_0x1e0f7e(0xba)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a93_0xcdfede=a93_0x5ba4;function a93_0x4ffc(){const _0x2541f6=['4089536syzXYh','7vhmrKb','984355kbLghd','504351PNaNRu','1917EHvTmF','242xOwzvp','6HCFllP','875220cFgGHC','5241730hsoFAW','en-US','1541709tqwJPA','main','production'];a93_0x4ffc=function(){return _0x2541f6;};return a93_0x4ffc();}(function(_0x1c4523,_0x40d7cc){const _0x42b83d=a93_0x5ba4,_0x6f3cb0=_0x1c4523();while(!![]){try{const _0x5316b1=parseInt(_0x42b83d(0xc0))/0x1*(parseInt(_0x42b83d(0xc1))/0x2)+parseInt(_0x42b83d(0xbf))/0x3+-parseInt(_0x42b83d(0xb6))/0x4+-parseInt(_0x42b83d(0xbe))/0x5*(-parseInt(_0x42b83d(0xc2))/0x6)+-parseInt(_0x42b83d(0xbd))/0x7*(-parseInt(_0x42b83d(0xbc))/0x8)+parseInt(_0x42b83d(0xb9))/0x9+-parseInt(_0x42b83d(0xb7))/0xa;if(_0x5316b1===_0x40d7cc)break;else _0x6f3cb0['push'](_0x6f3cb0['shift']());}catch(_0x4cb31d){_0x6f3cb0['push'](_0x6f3cb0['shift']());}}}(a93_0x4ffc,0x82f8c));export const DEFAULT_APP_PROFILE_NAME=a93_0xcdfede(0xba);export const DEFAULT_CONFIG_VALUES={'env':a93_0xcdfede(0xbb),'format':'compress','locale':a93_0xcdfede(0xb8),'riskLevel':'write'};function a93_0x5ba4(_0x1fb994,_0x39f114){_0x1fb994=_0x1fb994-0xb6;const _0x4ffccb=a93_0x4ffc();let _0x5ba43c=_0x4ffccb[_0x1fb994];return _0x5ba43c;}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a94_0xf4c9(){const _0xc90de0=['/dist/lovrabet-cli/config/index.json','1369068BBFjYE','7325505FFBueY','1475109gEJPQi','2508107ZdYNdC','cliCdnBaseUrl','3gstjKk','6NgsNKJ','87078NDFdKY','4145415IHXXOn','skillSource','npmPackageName','1WhsSNL','10174230lfkjIe','24fOMkhu','npmRegistryBaseUrl'];a94_0xf4c9=function(){return _0xc90de0;};return a94_0xf4c9();}const a94_0x1c38b4=a94_0x1f9d;(function(_0x15e1c5,_0x39924c){const _0x30be65=a94_0x1f9d,_0xd5ed18=_0x15e1c5();while(!![]){try{const _0x479e8e=parseInt(_0x30be65(0x8e))/0x1*(-parseInt(_0x30be65(0x8a))/0x2)+-parseInt(_0x30be65(0x88))/0x3*(-parseInt(_0x30be65(0x83))/0x4)+parseInt(_0x30be65(0x8b))/0x5*(-parseInt(_0x30be65(0x89))/0x6)+parseInt(_0x30be65(0x86))/0x7+parseInt(_0x30be65(0x80))/0x8*(parseInt(_0x30be65(0x85))/0x9)+parseInt(_0x30be65(0x7f))/0xa+-parseInt(_0x30be65(0x84))/0xb;if(_0x479e8e===_0x39924c)break;else _0xd5ed18['push'](_0xd5ed18['shift']());}catch(_0x155aa0){_0xd5ed18['push'](_0xd5ed18['shift']());}}}(a94_0xf4c9,0xa3d8d));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a94_0x1c38b4(0x8d)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a94_0x1c38b4(0x8c)];function a94_0x1f9d(_0x2812c2,_0x2d7a7a){_0x2812c2=_0x2812c2-0x7f;const _0xf4c945=a94_0xf4c9();let _0x1f9d1=_0xf4c945[_0x2812c2];return _0x1f9d1;}export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a94_0x1c38b4(0x81)];export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG[a94_0x1c38b4(0x87)];export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a94_0x1c38b4(0x82);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x2d7139=a95_0x5a4d;(function(_0x1ef777,_0x4fe8d8){const _0x567505=a95_0x5a4d,_0x200c9a=_0x1ef777();while(!![]){try{const _0x4a61b8=parseInt(_0x567505(0x1a3))/0x1*(-parseInt(_0x567505(0x19c))/0x2)+-parseInt(_0x567505(0x1a1))/0x3*(-parseInt(_0x567505(0x19b))/0x4)+parseInt(_0x567505(0x198))/0x5*(parseInt(_0x567505(0x195))/0x6)+-parseInt(_0x567505(0x192))/0x7+parseInt(_0x567505(0x191))/0x8+-parseInt(_0x567505(0x196))/0x9+parseInt(_0x567505(0x1a4))/0xa;if(_0x4a61b8===_0x4fe8d8)break;else _0x200c9a['push'](_0x200c9a['shift']());}catch(_0xd049d8){_0x200c9a['push'](_0x200c9a['shift']());}}}(a95_0x34f8,0xe7028));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';function a95_0x5a4d(_0x55c204,_0x1ee07e){_0x55c204=_0x55c204-0x191;const _0x34f856=a95_0x34f8();let _0x5a4dcf=_0x34f856[_0x55c204];return _0x5a4dcf;}let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,customKbDomain,activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x14d6aa){const _0x2ea765=a95_0x5a4d;customApiDomain=_0x14d6aa?.['apiDomain'],customUserDomain=_0x14d6aa?.[_0x2ea765(0x19f)],customRuntimeDomain=_0x14d6aa?.[_0x2ea765(0x19d)],customSkillDomain=_0x14d6aa?.[_0x2ea765(0x1a0)],customKbDomain=_0x14d6aa?.['kbDomain'],activeRegion=_0x14d6aa?.[_0x2ea765(0x1a2)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>PRODUCT_CONFIG[a95_0x2d7139(0x19a)][activeRegion][isProduction(getEnv())?a95_0x2d7139(0x194):a95_0x2d7139(0x19e)];export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a95_0x2d7139(0x193)];function a95_0x34f8(){const _0x4e7793=['region','348811wMOrtf','42855360frRBAF','1920808WoSLsG','10197096sQDAzg','user','production','180suMlza','14018706ASdBEb','skill','61055JAtShh','runtime','regionDomains','1855420iLQoqg','8JwMqAx','runtimeDomain','nonProduction','userDomain','skillDomain','3MeYPdw'];a95_0x34f8=function(){return _0x4e7793;};return a95_0x34f8();}export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()['api'];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a95_0x2d7139(0x199)];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a95_0x2d7139(0x197)];export const getKbDomain=()=>customKbDomain||getActiveRegionDomains()['kb'];
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a96_0x5676(_0x1d9c2f,_0xd5fd23){_0x1d9c2f=_0x1d9c2f-0xf2;const _0x1201ee=a96_0x1201();let _0x5676d6=_0x1201ee[_0x1d9c2f];return _0x5676d6;}const a96_0x38cc9b=a96_0x5676;(function(_0x4bbc31,_0x3bb252){const _0x449506=a96_0x5676,_0x595b5e=_0x4bbc31();while(!![]){try{const _0x2f114b=parseInt(_0x449506(0xf4))/0x1*(-parseInt(_0x449506(0xf8))/0x2)+-parseInt(_0x449506(0xff))/0x3+-parseInt(_0x449506(0xf3))/0x4*(-parseInt(_0x449506(0xf7))/0x5)+-parseInt(_0x449506(0xfe))/0x6+parseInt(_0x449506(0xf2))/0x7+parseInt(_0x449506(0xf9))/0x8+parseInt(_0x449506(0xf5))/0x9;if(_0x2f114b===_0x3bb252)break;else _0x595b5e['push'](_0x595b5e['shift']());}catch(_0x5bd0e4){_0x595b5e['push'](_0x595b5e['shift']());}}}(a96_0x1201,0x3f250));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a96_0x38cc9b(0xf6),a96_0x38cc9b(0xfb),a96_0x38cc9b(0xfc)];export function normalizeEnv(_0x189f52){const _0x4a30de=a96_0x38cc9b;return _0x189f52===_0x4a30de(0xfa)?'production':_0x189f52;}function a96_0x1201(){const _0x2ccc9c=['9158bzLKpg','1755344Ecsmhi','online','development','daily','ENV','2352846IYCETb','1179861TDiNXv','979258LLnKQH','1424VgAfbc','49oLNdtr','6141195QmCnpI','production','3185cllwwc'];a96_0x1201=function(){return _0x2ccc9c;};return a96_0x1201();}export function isProduction(_0x31b758){return normalizeEnv(_0x31b758)==='production';}export function isDaily(_0x1daf40){const _0x53e267=a96_0x38cc9b;return normalizeEnv(_0x1daf40)===_0x53e267(0xfc);}export function isDev(_0x2e55e6){const _0x4d28d3=normalizeEnv(_0x2e55e6);return _0x4d28d3==='development'||_0x4d28d3==='dev';}let env=normalizeEnv(productEnv(a96_0x38cc9b(0xfd))||a96_0x38cc9b(0xf6));export function getEnv(){return env;}export function initEnv(_0x78326f){env=normalizeEnv(_0x78326f);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x20fa5c=a97_0x1796;function a97_0x1796(_0x182964,_0x412e63){_0x182964=_0x182964-0x157;const _0x1e6830=a97_0x1e68();let _0x1796eb=_0x1e6830[_0x182964];return _0x1796eb;}function a97_0x1e68(){const _0x13bd31=['144Jhotuq','126265SCmaUI','5930504RJKOAE','1986783iwPELJ','2KLGENd','1761138MOfJIr','80zmMVQU','1852865sMUDtI','506819GZGAoC','640240wnbfOa','pretty'];a97_0x1e68=function(){return _0x13bd31;};return a97_0x1e68();}(function(_0x53ad14,_0x21bd1c){const _0x232b18=a97_0x1796,_0x4ed97a=_0x53ad14();while(!![]){try{const _0x48f86f=parseInt(_0x232b18(0x15f))/0x1+-parseInt(_0x232b18(0x15b))/0x2*(-parseInt(_0x232b18(0x15a))/0x3)+parseInt(_0x232b18(0x15d))/0x4*(-parseInt(_0x232b18(0x158))/0x5)+parseInt(_0x232b18(0x15c))/0x6+-parseInt(_0x232b18(0x15e))/0x7+parseInt(_0x232b18(0x159))/0x8+-parseInt(_0x232b18(0x157))/0x9*(parseInt(_0x232b18(0x160))/0xa);if(_0x48f86f===_0x21bd1c)break;else _0x4ed97a['push'](_0x4ed97a['shift']());}catch(_0x43a78a){_0x4ed97a['push'](_0x4ed97a['shift']());}}}(a97_0x1e68,0x640b1));export const OUTPUT_FORMAT_VALUES=['json',a97_0x20fa5c(0x161),'compress'];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x107b02=a98_0x5c8c;(function(_0x1e3ac8,_0x55c9d7){const _0x31a5b0=a98_0x5c8c,_0x9bbcd9=_0x1e3ac8();while(!![]){try{const _0x48ceb8=parseInt(_0x31a5b0(0xae))/0x1*(parseInt(_0x31a5b0(0xa4))/0x2)+parseInt(_0x31a5b0(0xa7))/0x3+parseInt(_0x31a5b0(0x9b))/0x4+parseInt(_0x31a5b0(0xaa))/0x5*(parseInt(_0x31a5b0(0x91))/0x6)+-parseInt(_0x31a5b0(0x98))/0x7*(-parseInt(_0x31a5b0(0x83))/0x8)+parseInt(_0x31a5b0(0x8d))/0x9+-parseInt(_0x31a5b0(0x8b))/0xa;if(_0x48ceb8===_0x55c9d7)break;else _0x9bbcd9['push'](_0x9bbcd9['shift']());}catch(_0x554c3f){_0x9bbcd9['push'](_0x9bbcd9['shift']());}}}(a98_0x5d6e,0xec9e1));function a98_0x5d6e(){const _0x14c177=['5yRASLS','https://skills.lovrabet.ai','https://user-daily.lovrabet.id','SKIP_NPX_SKILLS','67mFEVWj','lovrabet/lovrabet-cli','https://user-daily.lovrabet.ai','17616RDicAK','https://user.lovrabet.ai','https://g.lovrabet.com','.lovrabet','https://user.lovrabet.id','LOVRABET','RABETBASE','https://skills-daily.lovrabet.ai','45698270yjMOaC','https://api.lovrabet.id','16292349gaSoMm','@lovrabet/lovrabet-cli','lovrabet','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','9755286mfykdx','https://runtime.lovrabet.id','https://daily-api.lovrabet.id','https://daily-runtime.lovrabet.ai','legacyEnvPrefixes','https://user.lovrabet.com','Lovrabet\x20User\x20Center','1911PfdITn','https://registry.npmjs.org','.lovrabet.json','606520tCLPKt','https://skills.lovrabet.id','Lovrabet\x20Runtime\x20CLI','/user/ak','https://skills-daily.lovrabet.id','https://api.lovrabet.ai','https://daily-runtime.lovrabet.com','https://api.lovrabet.com','https://user-daily.lovrabet.com','9466tVnNcC','https://skills-daily.lovrabet.com','cli:lovrabet-runtime','3098949ANILAB','.lovrabet-runtime.log','https://runtime.lovrabet.com'];a98_0x5d6e=function(){return _0x14c177;};return a98_0x5d6e();}export const PRODUCT_CONFIG={'cliBinName':a98_0x107b02(0x8f),'cliDisplayName':a98_0x107b02(0x9d),'npmPackageName':a98_0x107b02(0x8e),'skillSource':a98_0x107b02(0xaf),'internalSkillSource':a98_0x107b02(0x90),'globalSkillName':a98_0x107b02(0x8f),'npmRegistryBaseUrl':a98_0x107b02(0x99),'cliCdnBaseUrl':a98_0x107b02(0x85),'envPrefix':a98_0x107b02(0x88),'legacyEnvPrefixes':[a98_0x107b02(0x89)],'configFileNames':[a98_0x107b02(0x9a)],'newConfigFileName':a98_0x107b02(0x9a),'homeDirName':a98_0x107b02(0x86),'logFileName':a98_0x107b02(0xa8),'invokeSource':a98_0x107b02(0xa6),'userCenterDisplayName':a98_0x107b02(0x97),'skipNpxSkillsEnvSuffix':a98_0x107b02(0xad),'regionDomains':{'cn':{'production':{'user':a98_0x107b02(0x96),'api':a98_0x107b02(0xa2),'runtime':a98_0x107b02(0xa9),'skill':'https://skills.lovrabet.com','kb':a98_0x107b02(0xa9)},'nonProduction':{'user':a98_0x107b02(0xa3),'api':'https://daily-api.lovrabet.com','runtime':'https://daily-runtime.lovrabet.com','skill':a98_0x107b02(0xa5),'kb':a98_0x107b02(0xa1)}},'id':{'production':{'user':a98_0x107b02(0x87),'api':a98_0x107b02(0x8c),'runtime':a98_0x107b02(0x92),'skill':a98_0x107b02(0x9c),'kb':a98_0x107b02(0x92)},'nonProduction':{'user':a98_0x107b02(0xac),'api':a98_0x107b02(0x93),'runtime':'https://daily-runtime.lovrabet.id','skill':a98_0x107b02(0x9f),'kb':'https://daily-runtime.lovrabet.id'}},'global':{'production':{'user':a98_0x107b02(0x84),'api':a98_0x107b02(0xa0),'runtime':'https://runtime.lovrabet.ai','skill':a98_0x107b02(0xab),'kb':'https://runtime.lovrabet.ai'},'nonProduction':{'user':a98_0x107b02(0xb0),'api':'https://daily-api.lovrabet.ai','runtime':a98_0x107b02(0x94),'skill':a98_0x107b02(0x8a),'kb':a98_0x107b02(0x94)}}},'accessKeyCreatePath':a98_0x107b02(0x9e)};export function productEnvName(_0x3e11d0){return PRODUCT_CONFIG['envPrefix']+'_'+_0x3e11d0;}export function productEnvNames(_0x37f179){const _0x43199a=a98_0x107b02;return[productEnvName(_0x37f179),...PRODUCT_CONFIG[_0x43199a(0x95)]['map'](_0x91af8e=>_0x91af8e+'_'+_0x37f179)];}function a98_0x5c8c(_0xb14b21,_0x3f9ad4){_0xb14b21=_0xb14b21-0x83;const _0x5d6e3b=a98_0x5d6e();let _0x5c8c07=_0x5d6e3b[_0xb14b21];return _0x5c8c07;}export function productEnv(_0xc95407){for(const _0x580600 of productEnvNames(_0xc95407)){const _0x5c1e07=process.env[_0x580600];if(_0x5c1e07!==undefined)return _0x5c1e07;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x238dc6,_0x28d2a){const _0x260cbe=a99_0x4cb1,_0x29fcf9=_0x238dc6();while(!![]){try{const _0x1a742b=-parseInt(_0x260cbe(0x6f))/0x1+-parseInt(_0x260cbe(0x6d))/0x2+-parseInt(_0x260cbe(0x67))/0x3*(parseInt(_0x260cbe(0x6b))/0x4)+parseInt(_0x260cbe(0x72))/0x5*(-parseInt(_0x260cbe(0x68))/0x6)+parseInt(_0x260cbe(0x6e))/0x7*(parseInt(_0x260cbe(0x65))/0x8)+parseInt(_0x260cbe(0x66))/0x9+parseInt(_0x260cbe(0x71))/0xa;if(_0x1a742b===_0x28d2a)break;else _0x29fcf9['push'](_0x29fcf9['shift']());}catch(_0xa28319){_0x29fcf9['push'](_0x29fcf9['shift']());}}}(a99_0x3850,0xc32a2));export const LOVRABET_REGION_VALUES=['cn','id','global'];export const ENABLED_LOVRABET_REGION_VALUES=['cn','id'];function a99_0x4cb1(_0x5789ef,_0x223d56){_0x5789ef=_0x5789ef-0x65;const _0x3850c6=a99_0x3850();let _0x4cb1c1=_0x3850c6[_0x5789ef];return _0x4cb1c1;}export const DEFAULT_LOVRABET_REGION='cn';export function isLovrabetRegion(_0x503443){const _0x24b65c=a99_0x4cb1;return typeof _0x503443===_0x24b65c(0x6a)&&LOVRABET_REGION_VALUES['includes'](_0x503443);}export function isEnabledLovrabetRegion(_0x37bd7a){const _0x210b4b=a99_0x4cb1;return typeof _0x37bd7a===_0x210b4b(0x6a)&&ENABLED_LOVRABET_REGION_VALUES[_0x210b4b(0x6c)](_0x37bd7a);}export function normalizeLovrabetRegion(_0x36e0f4){const _0x2b7a11=a99_0x4cb1;if(_0x36e0f4===_0x2b7a11(0x70))return'cn';if(_0x36e0f4===_0x2b7a11(0x69))return'id';return isLovrabetRegion(_0x36e0f4)?_0x36e0f4:DEFAULT_LOVRABET_REGION;}function a99_0x3850(){const _0x48ed46=['604bnNJfN','includes','920512zqkzLb','9590IRrXXN','568062rDeZwh','china','16256950qnJZGd','3431290wmeHvM','712Hduryd','8483058muMOQB','3501iLTpVA','6qXIIHg','indonesia','string'];a99_0x3850=function(){return _0x48ed46;};return a99_0x3850();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a100_0x224da0=a100_0x3e43;function a100_0x5c38(){const _0x386cc0=['3497502fcdher','274640FfHhIN','896016wDdCET','920003ziXhEq','2924934lHKymM','924Sqvdge','4090020RZhSFP','read','64935zBDPhF'];a100_0x5c38=function(){return _0x386cc0;};return a100_0x5c38();}function a100_0x3e43(_0x269fb2,_0x2ac62c){_0x269fb2=_0x269fb2-0x168;const _0x5c3809=a100_0x5c38();let _0x3e43a7=_0x5c3809[_0x269fb2];return _0x3e43a7;}(function(_0xf5ce09,_0x5edc41){const _0x4bff1f=a100_0x3e43,_0x1fcf5d=_0xf5ce09();while(!![]){try{const _0x174d14=-parseInt(_0x4bff1f(0x16b))/0x1+-parseInt(_0x4bff1f(0x16a))/0x2+-parseInt(_0x4bff1f(0x16c))/0x3+-parseInt(_0x4bff1f(0x16e))/0x4+parseInt(_0x4bff1f(0x170))/0x5+-parseInt(_0x4bff1f(0x168))/0x6+-parseInt(_0x4bff1f(0x16d))/0x7*(-parseInt(_0x4bff1f(0x169))/0x8);if(_0x174d14===_0x5edc41)break;else _0x1fcf5d['push'](_0x1fcf5d['shift']());}catch(_0x593571){_0x1fcf5d['push'](_0x1fcf5d['shift']());}}}(a100_0x5c38,0x918a8));export const RISK_LEVEL_VALUES=[a100_0x224da0(0x16f),'write','high-risk-write'];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a101_0x3f2e(){const _0x5e3ca5=['7087284cBmaAw','3YmqMcU','accessKeyCreatePath','3500552VhOxDr','842216oaflNo','5EBoUfG','6280782KZqEck','4169200GmEjaA','user','1043326fAsvoj','70228GMsYFQ'];a101_0x3f2e=function(){return _0x5e3ca5;};return a101_0x3f2e();}(function(_0x39d1f7,_0x557d71){const _0x1648a4=a101_0x303a,_0x34fc7e=_0x39d1f7();while(!![]){try{const _0x113752=parseInt(_0x1648a4(0x146))/0x1+parseInt(_0x1648a4(0x14b))/0x2+-parseInt(_0x1648a4(0x14e))/0x3*(parseInt(_0x1648a4(0x14c))/0x4)+-parseInt(_0x1648a4(0x147))/0x5*(parseInt(_0x1648a4(0x148))/0x6)+parseInt(_0x1648a4(0x149))/0x7+parseInt(_0x1648a4(0x145))/0x8+-parseInt(_0x1648a4(0x14d))/0x9;if(_0x113752===_0x557d71)break;else _0x34fc7e['push'](_0x34fc7e['shift']());}catch(_0x368af7){_0x34fc7e['push'](_0x34fc7e['shift']());}}}(a101_0x3f2e,0x851c2));import{PRODUCT_CONFIG}from'../constant/product.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';function a101_0x303a(_0x15cabe,_0x452c57){_0x15cabe=_0x15cabe-0x145;const _0x3f2e64=a101_0x3f2e();let _0x303abd=_0x3f2e64[_0x15cabe];return _0x303abd;}export function getUserAccessKeyCreateUrl(_0x4c5dc4=DEFAULT_LOVRABET_REGION){const _0x5f0b08=a101_0x303a,_0x312e9f=PRODUCT_CONFIG['regionDomains'][_0x4c5dc4]['production'][_0x5f0b08(0x14a)];return''+_0x312e9f+PRODUCT_CONFIG[_0x5f0b08(0x14f)];}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();
|