@lovrabet/lovrabet-cli 2.3.0-beta.2 → 2.3.0-beta.4
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_0x271f66=a84_0x54f9;(function(_0x2ce126,_0x22bca1){const _0x500c8f=a84_0x54f9,_0x1f7ad8=_0x2ce126();while(!![]){try{const _0x1be1de=-parseInt(_0x500c8f(0xbc))/0x1+parseInt(_0x500c8f(0xf6))/0x2+-parseInt(_0x500c8f(0xe1))/0x3+parseInt(_0x500c8f(0xdf))/0x4+-parseInt(_0x500c8f(0xea))/0x5*(parseInt(_0x500c8f(0xd4))/0x6)+-parseInt(_0x500c8f(0xfd))/0x7+parseInt(_0x500c8f(0xe3))/0x8*(parseInt(_0x500c8f(0x105))/0x9);if(_0x1be1de===_0x22bca1)break;else _0x1f7ad8['push'](_0x1f7ad8['shift']());}catch(_0x415617){_0x1f7ad8['push'](_0x1f7ad8['shift']());}}}(a84_0x37b8,0x59385));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';import{basename,dirname,relative,win32}from'node:path';import a84_0x356d14 from'semver';import{CliErrors}from'../errors.js';function a84_0x37b8(){const _0x40674f=['\x20CLI\x20from\x20npm','421057lBuDaf','map','valid','\x20->\x20','\x20\x20Run\x20manually:\x20','relative','current','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','9PlfVrZ','exit\x20','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','platform','json','str','status','toLowerCase','--prefix','Version\x20comparison\x20failed:\x20','647884FVQLQr','\x20\x20CLI\x20Built-in\x20Skill\x20','boolean','string','dirname','includes','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','validation','Checking\x20CLI\x20Built-in\x20Skill...','node_modules','message',']:\x20','nonInteractive','@lovrabet/lovrabet-cli','length','Invalid\x20version:\x20','toString','npm','\x20is\x20current.','write','inherit','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','version','14844RDQstD','repairCommand','log','trim','latest','@lovrabet\x5clovrabet-cli','reason','error','update','bool','entries','1748912rIESOW','Update\x20the\x20','1282470slySYb','pipe','8331152TEMiFC','object','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','stderr','unknown','Updated\x20to\x20v','325Zhrkkl','win32','skillVersion','state','/dist-tags','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','beta','source','stdout','\x20version\x20from\x20npm.','warn','read','366316gAkzKZ','Current\x20version:\x20','args','install','timeout','join'];a84_0x37b8=function(){return _0x40674f;};return a84_0x37b8();}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':a84_0x271f66(0xd8),'type':'boolean','description':a84_0x271f66(0xc3),'default':![]},{'name':a84_0x271f66(0xf0),'type':a84_0x271f66(0xbe),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':a84_0x271f66(0xbf),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function a84_0x54f9(_0x226c8a,_0x4c6c04){_0x226c8a=_0x226c8a-0xba;const _0x37b865=a84_0x37b8();let _0x54f9d5=_0x37b865[_0x226c8a];return _0x54f9d5;}function getRequestedVersion(_0x149ec4){const _0x4c6bbf=a84_0x271f66,_0xfca6e0=_0x149ec4[_0x4c6bbf(0x10a)]('version')[_0x4c6bbf(0xd7)]();if(_0xfca6e0)return _0xfca6e0;return String(_0x149ec4[_0x4c6bbf(0xf8)]?.[0x0]??'')[_0x4c6bbf(0xd7)]();}async function validateUpdateFlags(_0x34564a){const _0x248790=a84_0x271f66,_0xcb605b=getRequestedVersion(_0x34564a),_0x44d783=[_0x34564a[_0x248790(0xdd)](_0x248790(0xd8))?_0x248790(0xd8):'',_0x34564a[_0x248790(0xdd)](_0x248790(0xf0))?_0x248790(0xf0):'',_0xcb605b?_0x248790(0xd3):'']['filter'](Boolean);if(_0x44d783[_0x248790(0xcb)]>0x1)throw CliErrors[_0x248790(0xc4)](_0x248790(0xe5),_0x248790(0x107));if(_0xcb605b&&!a84_0x356d14[_0x248790(0xff)](_0xcb605b))throw CliErrors[_0x248790(0xc4)](_0x248790(0xcc)+_0xcb605b,_0x248790(0xe6));}async function fetchNpmDistTags(){const _0x21e753=a84_0x271f66;try{const _0x124d45=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x21e753(0xee),_0x4a5864=await fetch(_0x124d45,{'signal':AbortSignal[_0x21e753(0xfa)](0x2710)});if(!_0x4a5864['ok'])return null;const _0xfbd827=await _0x4a5864[_0x21e753(0x109)]();if(!_0xfbd827||typeof _0xfbd827!==_0x21e753(0xe4))return null;return Object['fromEntries'](Object[_0x21e753(0xde)](_0xfbd827)['filter'](([,_0xd742ab])=>typeof _0xd742ab===_0x21e753(0xbf)&&_0xd742ab[_0x21e753(0xd7)]())[_0x21e753(0xfe)](([_0x33825b,_0x425e04])=>[_0x33825b,String(_0x425e04)['trim']()]));}catch{return null;}}async function resolveTargetVersion(_0x5d3844){const _0x13e6c2=a84_0x271f66,_0x117c4c=getRequestedVersion(_0x5d3844);if(_0x117c4c)return{'version':_0x117c4c,'source':_0x13e6c2(0xd3)};const _0x279816=_0x5d3844[_0x13e6c2(0xdd)](_0x13e6c2(0xf0))?_0x13e6c2(0xf0):_0x13e6c2(0xd8),_0x4e73ea=await fetchNpmDistTags(),_0x26ed3a=_0x4e73ea?.[_0x279816];if(!_0x26ed3a)return null;return{'version':_0x26ed3a,'source':_0x279816};}function shouldInstallTarget(_0xd3325,_0x284915){const _0x27f6a4=a84_0x271f66;if(_0x284915[_0x27f6a4(0xf1)]===_0x27f6a4(0xd3)||_0x284915['source']===_0x27f6a4(0xf0))return!a84_0x356d14['eq'](_0xd3325,_0x284915[_0x27f6a4(0xd3)]);return a84_0x356d14['lt'](_0xd3325,_0x284915[_0x27f6a4(0xd3)]);}export function installCliPackage(_0x1b7fe4,_0x1a9f43,_0x24d669=resolveCurrentCliNpmPrefix()){const _0x1007cb=a84_0x271f66,_0x22d498=resolveNpmBin(_0x1007cb(0xce)),_0x479611=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1b7fe4,_0x18a2f4=[_0x1007cb(0xf9),'-g',_0x479611],_0x7f638d=runNpmInstall(_0x22d498,_0x18a2f4,_0x1a9f43);if(_0x7f638d['ok']||!isNpmPrefixPermissionError(_0x7f638d[_0x1007cb(0xdb)]))return _0x7f638d;if(!_0x24d669||_0x7f638d['error']?.[_0x1007cb(0x10c)]()[_0x1007cb(0xc1)](_0x24d669[_0x1007cb(0x10c)]()))return _0x7f638d;return console[_0x1007cb(0xf4)](_0x1007cb(0xc2)+_0x24d669),runNpmInstall(_0x22d498,[..._0x18a2f4,_0x1007cb(0xba),_0x24d669],_0x1a9f43);}export function resolveCurrentCliNpmPrefix(_0x1d9afe=fileURLToPath(import.meta.url),_0x5552c7=process[a84_0x271f66(0x108)]){const _0x1a7687=a84_0x271f66,_0x421922=_0x5552c7==='win32'?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x52f1c9=_0x421922[_0x1a7687(0xc0)](_0x421922[_0x1a7687(0xc0)](_0x421922['dirname'](_0x1d9afe))),_0x599b72=_0x5552c7===_0x1a7687(0xeb)?_0x1a7687(0xd9):_0x1a7687(0xca);let _0x1a1d18=_0x421922[_0x1a7687(0xc0)](_0x52f1c9);while(!![]){if(_0x421922['basename'](_0x1a1d18)===_0x1a7687(0xc6)&&_0x421922[_0x1a7687(0x102)](_0x1a1d18,_0x52f1c9)===_0x599b72){const _0x26e448=_0x421922['dirname'](_0x1a1d18);return _0x421922['basename'](_0x26e448)==='lib'?_0x421922[_0x1a7687(0xc0)](_0x26e448):_0x26e448;}const _0xb2db98=_0x421922[_0x1a7687(0xc0)](_0x1a1d18);if(_0xb2db98===_0x1a1d18)return null;_0x1a1d18=_0xb2db98;}}function runNpmInstall(_0x28b924,_0x4c1fa7,_0x4b51b2){const _0x338c2f=a84_0x271f66;console['log']('*\x20'+[_0x28b924,..._0x4c1fa7][_0x338c2f(0xfb)]('\x20'));const _0x3e5a1a=spawnSync(_0x28b924,_0x4c1fa7,{'cwd':process['cwd'](),'stdio':_0x338c2f(0xe2),'env':process.env,'shell':![]}),_0x30b3df=_0x3e5a1a[_0x338c2f(0xe7)]?_0x3e5a1a[_0x338c2f(0xe7)][_0x338c2f(0xcd)]()[_0x338c2f(0xd7)]():'',_0x5bb1cb=_0x3e5a1a[_0x338c2f(0xf2)]?_0x3e5a1a[_0x338c2f(0xf2)][_0x338c2f(0xcd)]()[_0x338c2f(0xd7)]():'';if(!_0x4b51b2){if(_0x5bb1cb)process['stdout']['write'](_0x5bb1cb+'\x0a');if(_0x30b3df)process[_0x338c2f(0xe7)][_0x338c2f(0xd0)](_0x30b3df+'\x0a');}if(_0x3e5a1a[_0x338c2f(0x10b)]===0x0)return{'ok':!![]};const _0x5ef090=_0x3e5a1a['error']?.[_0x338c2f(0xc7)]||_0x30b3df||_0x5bb1cb||_0x338c2f(0x106)+(_0x3e5a1a['status']??'unknown');return{'ok':![],'error':_0x5ef090};}function isNpmPrefixPermissionError(_0x9e3b57){return Boolean(_0x9e3b57&&/\b(?:EACCES|EPERM)\b/['test'](_0x9e3b57));}function repairCurrentBuiltinSkill(_0x555024){const _0x26fc8b=a84_0x271f66;console[_0x26fc8b(0xd6)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x3b9c95=installBuiltinSkill({'stdio':_0x555024?'pipe':_0x26fc8b(0xd1)});if(_0x3b9c95['ok'])return console[_0x26fc8b(0xd6)](_0x26fc8b(0xbd)+_0x3b9c95[_0x26fc8b(0xec)]+_0x26fc8b(0xcf)),!![];return console[_0x26fc8b(0xf4)](_0x26fc8b(0x104)+(_0x3b9c95['code']||'INSTALL_FAILED')+_0x26fc8b(0xc8)+(_0x3b9c95[_0x26fc8b(0xdb)]||'unknown')),console[_0x26fc8b(0xd6)](_0x26fc8b(0x101)+_0x3b9c95[_0x26fc8b(0xd5)]),![];}function verifyUpdatedBuiltinSkill(_0x4ecd8b){const _0x2c6ca9=a84_0x271f66;console['log'](_0x2c6ca9(0xc5));const _0xfbd39=inspectInstalledBuiltinSkillVersion(_0x4ecd8b);if(_0xfbd39[_0x2c6ca9(0xed)]===_0x2c6ca9(0x103))return console[_0x2c6ca9(0xd6)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x4ecd8b+_0x2c6ca9(0xcf)),!![];console[_0x2c6ca9(0xf4)](_0x2c6ca9(0xd2)+_0xfbd39['state']+'.');if(_0xfbd39[_0x2c6ca9(0xda)])console[_0x2c6ca9(0xf4)]('\x20\x20'+_0xfbd39['reason']);return console[_0x2c6ca9(0xd6)](_0x2c6ca9(0x101)+_0xfbd39['repairCommand']),![];}async function execute(_0x155f4b){const _0x48438e=a84_0x271f66;await validateUpdateFlags(_0x155f4b);const _0x29ca10=getCliVersion();console[_0x48438e(0xd6)](_0x48438e(0xf7)+_0x29ca10),console[_0x48438e(0xd6)]('Checking\x20npm\x20dist-tags...');const _0x2eaac0=await resolveTargetVersion(_0x155f4b);if(!_0x2eaac0){const _0x4a6599=_0x155f4b[_0x48438e(0xdd)](_0x48438e(0xf0))?'beta':_0x48438e(0xd8),_0x5de95e='Unable\x20to\x20resolve\x20'+_0x4a6599+_0x48438e(0xf3);return console['warn'](_0x5de95e),console[_0x48438e(0xd6)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4a6599),{'ok':![]};}const _0x32a2d7=[_0x29ca10,_0x2eaac0[_0x48438e(0xd3)]]['find'](_0x4e7209=>!a84_0x356d14[_0x48438e(0xff)](_0x4e7209));if(_0x32a2d7)return console['warn'](_0x48438e(0xbb)+_0x32a2d7+'.'),{'ok':![]};if(!shouldInstallTarget(_0x29ca10,_0x2eaac0)){const _0x244a5e=_0x2eaac0[_0x48438e(0xf1)]===_0x48438e(0xd3)?'Already\x20on\x20requested\x20version\x20(v'+_0x2eaac0[_0x48438e(0xd3)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x2eaac0['version']+').';return console[_0x48438e(0xd6)](_0x244a5e),{'ok':repairCurrentBuiltinSkill(_0x155f4b[_0x48438e(0xc9)])};}console[_0x48438e(0xd6)]('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x29ca10+_0x48438e(0x100)+_0x2eaac0['version']);const _0x525f4e=installCliPackage(_0x2eaac0['version'],_0x155f4b[_0x48438e(0xc9)]);if(!_0x525f4e['ok']){const _0x510b58='Update\x20failed:\x20'+(_0x525f4e['error']||_0x48438e(0xe8));return console[_0x48438e(0xdb)](_0x510b58),console[_0x48438e(0xd6)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x2eaac0['version']),{'ok':![]};}return console[_0x48438e(0xd6)](_0x48438e(0xe9)+_0x2eaac0['version']+'.'),console[_0x48438e(0xd6)](_0x48438e(0xef)),{'ok':verifyUpdatedBuiltinSkill(_0x2eaac0['version'])};}export const updateDefinition={'service':a84_0x271f66(0xdc),'command':'run','description':a84_0x271f66(0xe0)+CLI_BIN_NAME+a84_0x271f66(0xfc),'risk':a84_0x271f66(0xf5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a84_0x2e1deb=a84_0x35a7;(function(_0x32869f,_0x353e25){const _0x16183f=a84_0x35a7,_0x504a6a=_0x32869f();while(!![]){try{const _0x53b823=parseInt(_0x16183f(0xb6))/0x1*(-parseInt(_0x16183f(0xb0))/0x2)+parseInt(_0x16183f(0x81))/0x3*(-parseInt(_0x16183f(0x9d))/0x4)+-parseInt(_0x16183f(0xb4))/0x5*(parseInt(_0x16183f(0x8c))/0x6)+-parseInt(_0x16183f(0x7f))/0x7+-parseInt(_0x16183f(0xab))/0x8+-parseInt(_0x16183f(0xa2))/0x9+-parseInt(_0x16183f(0x90))/0xa*(-parseInt(_0x16183f(0xaf))/0xb);if(_0x53b823===_0x353e25)break;else _0x504a6a['push'](_0x504a6a['shift']());}catch(_0x4d4b6c){_0x504a6a['push'](_0x504a6a['shift']());}}}(a84_0x1a08,0x32c6c));import{spawnSync}from'node:child_process';import{fileURLToPath}from'node:url';function a84_0x35a7(_0x53a9d9,_0x35cebb){_0x53a9d9=_0x53a9d9-0x70;const _0x1a08bd=a84_0x1a08();let _0x35a7cc=_0x1a08bd[_0x53a9d9];return _0x35a7cc;}function a84_0x1a08(){const _0x43ecee=['\x20is\x20current.','valid','Update\x20failed:\x20','run','string','validation','16476VByEcj','length','test','boolean','10rLWAyQ','trim','message','bool','\x20->\x20','Global\x20npm\x20prefix\x20is\x20not\x20writable;\x20retrying\x20in\x20the\x20current\x20CLI\x20Node\x20environment:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Update\x20the\x20','Unable\x20to\x20resolve\x20','str','Current\x20version:\x20','/dist-tags','json','236732RMXRfl','\x20CLI\x20from\x20npm','code','basename','state','2146212hQsHCY','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Checking\x20CLI\x20Built-in\x20Skill...','@lovrabet\x5clovrabet-cli','error','\x20version\x20from\x20npm.','@lovrabet/lovrabet-cli','install','\x20\x20Run\x20manually:\x20','1128488VVhjIu','read','relative','filter','16195091LKlkJd','192290UnvIcI','skillVersion','pipe','inherit','485MsxDVP','Invalid\x20version:\x20','1eBhQMK','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','entries','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','\x20\x20CLI\x20Built-in\x20Skill\x20','stdout','includes','latest','exit\x20','INSTALL_FAILED','log','object','dirname','unknown','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','cwd','beta','status','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','Already\x20on\x20requested\x20version\x20(v','stderr','Already\x20up\x20to\x20date\x20(v','nonInteractive','platform','version','toLowerCase','lib','Updating\x20','warn','toString','update','1170169VEWXri','Install\x20a\x20specific\x20CLI\x20version','18zqJDzF','Version\x20comparison\x20failed:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','source'];a84_0x1a08=function(){return _0x43ecee;};return a84_0x1a08();}import{basename,dirname,relative,win32}from'node:path';import a84_0x12ceec 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':a84_0x2e1deb(0xbd),'type':a84_0x2e1deb(0x8f),'description':a84_0x2e1deb(0xb7),'default':![]},{'name':'beta','type':a84_0x2e1deb(0x8f),'description':a84_0x2e1deb(0x96),'default':![]},{'name':a84_0x2e1deb(0x78),'type':'string','description':a84_0x2e1deb(0x80)}];function getRequestedVersion(_0x1973c6){const _0x3eb094=a84_0x2e1deb,_0x1b0b37=_0x1973c6[_0x3eb094(0x99)](_0x3eb094(0x78))['trim']();if(_0x1b0b37)return _0x1b0b37;return String(_0x1973c6['args']?.[0x0]??'')['trim']();}async function validateUpdateFlags(_0x138a5c){const _0xbc1463=a84_0x2e1deb,_0x4e0601=getRequestedVersion(_0x138a5c),_0x153320=[_0x138a5c[_0xbc1463(0x93)](_0xbc1463(0xbd))?_0xbc1463(0xbd):'',_0x138a5c[_0xbc1463(0x93)](_0xbc1463(0x70))?'beta':'',_0x4e0601?_0xbc1463(0x78):''][_0xbc1463(0xae)](Boolean);if(_0x153320[_0xbc1463(0x8d)]>0x1)throw CliErrors['validation'](_0xbc1463(0xa3),_0xbc1463(0x72));if(_0x4e0601&&!a84_0x12ceec['valid'](_0x4e0601))throw CliErrors[_0xbc1463(0x8b)](_0xbc1463(0xb5)+_0x4e0601,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x462641=a84_0x2e1deb;try{const _0x20e649=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x462641(0x9b),_0x48c72b=await fetch(_0x20e649,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x48c72b['ok'])return null;const _0x264111=await _0x48c72b[_0x462641(0x9c)]();if(!_0x264111||typeof _0x264111!==_0x462641(0xc1))return null;return Object['fromEntries'](Object[_0x462641(0xb8)](_0x264111)['filter'](([,_0x201b37])=>typeof _0x201b37===_0x462641(0x8a)&&_0x201b37[_0x462641(0x91)]())['map'](([_0x588ab5,_0x1da57c])=>[_0x588ab5,String(_0x1da57c)[_0x462641(0x91)]()]));}catch{return null;}}async function resolveTargetVersion(_0x5aaac2){const _0x4fa990=a84_0x2e1deb,_0xbe6fe=getRequestedVersion(_0x5aaac2);if(_0xbe6fe)return{'version':_0xbe6fe,'source':'version'};const _0x47efdf=_0x5aaac2[_0x4fa990(0x93)](_0x4fa990(0x70))?_0x4fa990(0x70):'latest',_0x4c9894=await fetchNpmDistTags(),_0x3e2e0e=_0x4c9894?.[_0x47efdf];if(!_0x3e2e0e)return null;return{'version':_0x3e2e0e,'source':_0x47efdf};}function shouldInstallTarget(_0x6cfa34,_0x3ab343){const _0x42b3a0=a84_0x2e1deb;if(_0x3ab343[_0x42b3a0(0x85)]===_0x42b3a0(0x78)||_0x3ab343[_0x42b3a0(0x85)]===_0x42b3a0(0x70))return!a84_0x12ceec['eq'](_0x6cfa34,_0x3ab343[_0x42b3a0(0x78)]);return a84_0x12ceec['lt'](_0x6cfa34,_0x3ab343[_0x42b3a0(0x78)]);}export function installCliPackage(_0x140128,_0x4ffa2f,_0x3b91af=resolveCurrentCliNpmPrefix()){const _0x1a9b61=a84_0x2e1deb,_0x34bb2b=resolveNpmBin('npm'),_0x5e02b3=LOVRABET_NPM_PACKAGE_NAME+'@'+_0x140128,_0x1f710e=[_0x1a9b61(0xa9),'-g',_0x5e02b3],_0x5e7550=runNpmInstall(_0x34bb2b,_0x1f710e,_0x4ffa2f);if(_0x5e7550['ok']||!isNpmPrefixPermissionError(_0x5e7550[_0x1a9b61(0xa6)]))return _0x5e7550;if(!_0x3b91af||_0x5e7550[_0x1a9b61(0xa6)]?.[_0x1a9b61(0x79)]()[_0x1a9b61(0xbc)](_0x3b91af[_0x1a9b61(0x79)]()))return _0x5e7550;return console['warn'](_0x1a9b61(0x95)+_0x3b91af),runNpmInstall(_0x34bb2b,[..._0x1f710e,'--prefix',_0x3b91af],_0x4ffa2f);}export function resolveCurrentCliNpmPrefix(_0x2e7116=fileURLToPath(import.meta.url),_0x1bd3ad=process[a84_0x2e1deb(0x77)]){const _0x503784=a84_0x2e1deb,_0x48322b=_0x1bd3ad==='win32'?win32:{'basename':basename,'dirname':dirname,'relative':relative},_0x30d7a4=_0x48322b[_0x503784(0xc2)](_0x48322b['dirname'](_0x48322b[_0x503784(0xc2)](_0x2e7116))),_0x5db44d=_0x1bd3ad==='win32'?_0x503784(0xa5):_0x503784(0xa8);let _0x36c7f5=_0x48322b['dirname'](_0x30d7a4);while(!![]){if(_0x48322b[_0x503784(0xa0)](_0x36c7f5)==='node_modules'&&_0x48322b[_0x503784(0xad)](_0x36c7f5,_0x30d7a4)===_0x5db44d){const _0x500058=_0x48322b[_0x503784(0xc2)](_0x36c7f5);return _0x48322b[_0x503784(0xa0)](_0x500058)===_0x503784(0x7a)?_0x48322b[_0x503784(0xc2)](_0x500058):_0x500058;}const _0x1701ff=_0x48322b[_0x503784(0xc2)](_0x36c7f5);if(_0x1701ff===_0x36c7f5)return null;_0x36c7f5=_0x1701ff;}}function runNpmInstall(_0x102e65,_0x286a46,_0x544da0){const _0x4a67ad=a84_0x2e1deb;console[_0x4a67ad(0xc0)]('*\x20'+[_0x102e65,..._0x286a46]['join']('\x20'));const _0x5cda46=spawnSync(_0x102e65,_0x286a46,{'cwd':process[_0x4a67ad(0xc5)](),'stdio':_0x4a67ad(0xb2),'env':process.env,'shell':![]}),_0x4aa3fc=_0x5cda46[_0x4a67ad(0x74)]?_0x5cda46[_0x4a67ad(0x74)][_0x4a67ad(0x7d)]()[_0x4a67ad(0x91)]():'',_0x30d79c=_0x5cda46[_0x4a67ad(0xbb)]?_0x5cda46[_0x4a67ad(0xbb)][_0x4a67ad(0x7d)]()[_0x4a67ad(0x91)]():'';if(!_0x544da0){if(_0x30d79c)process[_0x4a67ad(0xbb)]['write'](_0x30d79c+'\x0a');if(_0x4aa3fc)process[_0x4a67ad(0x74)]['write'](_0x4aa3fc+'\x0a');}if(_0x5cda46['status']===0x0)return{'ok':!![]};const _0x18b5e8=_0x5cda46[_0x4a67ad(0xa6)]?.[_0x4a67ad(0x92)]||_0x4aa3fc||_0x30d79c||_0x4a67ad(0xbe)+(_0x5cda46[_0x4a67ad(0x71)]??_0x4a67ad(0xc3));return{'ok':![],'error':_0x18b5e8};}function isNpmPrefixPermissionError(_0x27a41a){const _0x2d8354=a84_0x2e1deb;return Boolean(_0x27a41a&&/\b(?:EACCES|EPERM)\b/[_0x2d8354(0x8e)](_0x27a41a));}function repairCurrentBuiltinSkill(_0x150ec7){const _0x2046e2=a84_0x2e1deb;console[_0x2046e2(0xc0)](_0x2046e2(0xa4));const _0x21679d=installBuiltinSkill({'stdio':_0x150ec7?_0x2046e2(0xb2):_0x2046e2(0xb3)});if(_0x21679d['ok'])return console[_0x2046e2(0xc0)](_0x2046e2(0xba)+_0x21679d[_0x2046e2(0xb1)]+'\x20is\x20current.'),!![];return console[_0x2046e2(0x7c)](_0x2046e2(0xc4)+(_0x21679d[_0x2046e2(0x9f)]||_0x2046e2(0xbf))+']:\x20'+(_0x21679d['error']||_0x2046e2(0xc3))),console[_0x2046e2(0xc0)]('\x20\x20Run\x20manually:\x20'+_0x21679d['repairCommand']),![];}function verifyUpdatedBuiltinSkill(_0x1f5e5b){const _0x317481=a84_0x2e1deb;console['log'](_0x317481(0xa4));const _0x4986da=inspectInstalledBuiltinSkillVersion(_0x1f5e5b);if(_0x4986da[_0x317481(0xa1)]==='current')return console['log'](_0x317481(0xba)+_0x1f5e5b+_0x317481(0x86)),!![];console[_0x317481(0x7c)]('\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x4986da[_0x317481(0xa1)]+'.');if(_0x4986da['reason'])console[_0x317481(0x7c)]('\x20\x20'+_0x4986da['reason']);return console[_0x317481(0xc0)](_0x317481(0xaa)+_0x4986da['repairCommand']),![];}async function execute(_0x3e0718){const _0x569099=a84_0x2e1deb;await validateUpdateFlags(_0x3e0718);const _0xa9f595=getCliVersion();console[_0x569099(0xc0)](_0x569099(0x9a)+_0xa9f595),console[_0x569099(0xc0)]('Checking\x20npm\x20dist-tags...');const _0x4a0e21=await resolveTargetVersion(_0x3e0718);if(!_0x4a0e21){const _0x1d2efd=_0x3e0718['bool'](_0x569099(0x70))?_0x569099(0x70):_0x569099(0xbd),_0x12e533=_0x569099(0x98)+_0x1d2efd+_0x569099(0xa7);return console[_0x569099(0x7c)](_0x12e533),console['log'](_0x569099(0x83)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1d2efd),{'ok':![]};}const _0x5727c1=[_0xa9f595,_0x4a0e21[_0x569099(0x78)]]['find'](_0x5291cb=>!a84_0x12ceec[_0x569099(0x87)](_0x5291cb));if(_0x5727c1)return console['warn'](_0x569099(0x82)+_0x5727c1+'.'),{'ok':![]};if(!shouldInstallTarget(_0xa9f595,_0x4a0e21)){const _0x3f24b3=_0x4a0e21[_0x569099(0x85)]===_0x569099(0x78)?_0x569099(0x73)+_0x4a0e21['version']+').':_0x569099(0x75)+_0x4a0e21[_0x569099(0x78)]+').';return console[_0x569099(0xc0)](_0x3f24b3),{'ok':repairCurrentBuiltinSkill(_0x3e0718[_0x569099(0x76)])};}console[_0x569099(0xc0)](_0x569099(0x7b)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0xa9f595+_0x569099(0x94)+_0x4a0e21[_0x569099(0x78)]);const _0x1b2201=installCliPackage(_0x4a0e21[_0x569099(0x78)],_0x3e0718[_0x569099(0x76)]);if(!_0x1b2201['ok']){const _0x5998ec=_0x569099(0x88)+(_0x1b2201['error']||_0x569099(0xc3));return console['error'](_0x5998ec),console[_0x569099(0xc0)](_0x569099(0x84)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4a0e21[_0x569099(0x78)]),{'ok':![]};}return console['log']('Updated\x20to\x20v'+_0x4a0e21[_0x569099(0x78)]+'.'),console[_0x569099(0xc0)](_0x569099(0xb9)),{'ok':verifyUpdatedBuiltinSkill(_0x4a0e21[_0x569099(0x78)])};}export const updateDefinition={'service':a84_0x2e1deb(0x7e),'command':a84_0x2e1deb(0x89),'description':a84_0x2e1deb(0x97)+CLI_BIN_NAME+a84_0x2e1deb(0x9e),'risk':a84_0x2e1deb(0xac),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a85_0x3ec87d=a85_0x5a52;(function(_0xb84f2d,_0x19f59d){const _0x33d69d=a85_0x5a52,_0x3a72a4=_0xb84f2d();while(!![]){try{const _0x2bfea0=-parseInt(_0x33d69d(0x131))/0x1+-parseInt(_0x33d69d(0x11b))/0x2+parseInt(_0x33d69d(0x124))/0x3*(-parseInt(_0x33d69d(0x129))/0x4)+parseInt(_0x33d69d(0x117))/0x5*(parseInt(_0x33d69d(0x123))/0x6)+parseInt(_0x33d69d(0x119))/0x7+parseInt(_0x33d69d(0x11e))/0x8+parseInt(_0x33d69d(0x120))/0x9*(parseInt(_0x33d69d(0x12e))/0xa);if(_0x2bfea0===_0x19f59d)break;else _0x3a72a4['push'](_0x3a72a4['shift']());}catch(_0x3ea828){_0x3a72a4['push'](_0x3a72a4['shift']());}}}(a85_0x48e5,0x8e306));function a85_0x48e5(){const _0x384cff=['External\x20account\x20ID\x20for\x20the\x20selected\x20provider','5267800ZlsmXQ','string','Pass\x20one\x20of:\x20','1125560VMeDZH','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.','apiError','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.','bind','Binds\x20the\x20platform\x20user\x20of\x20the\x20current\x20AccessKey\x20to\x20the\x20given\x20collaboration-provider\x20account.\x20An\x20existing\x20bind\x20for\x20the\x20same\x20provider\x20may\x20be\x20replaced.','dingtalk','5jgvcWw','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','2551864tSEzXP','provider','2248066ogmzXM','Unsupported\x20provider:\x20','validation','4507984PEVPnf','trim','45mZNTml','user-account','--account-id\x20cannot\x20be\x20empty.','731526ediZTa','3deXvzW','account-id','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','str','3407488WUbOQp','External\x20account\x20provider','POST','toLowerCase'];a85_0x48e5=function(){return _0x384cff;};return a85_0x48e5();}function a85_0x5a52(_0x117b4d,_0xf20758){_0x117b4d=_0x117b4d-0x117;const _0x48e5e6=a85_0x48e5();let _0x5a520a=_0x48e5e6[_0x117b4d];return _0x5a520a;}import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a85_0x3ec87d(0x127),SUPPORTED_PROVIDERS=[a85_0x3ec87d(0x137)];function readBindingInput(_0x17e889){const _0x262aee=a85_0x3ec87d,_0x3ff393=_0x17e889[_0x262aee(0x128)](_0x262aee(0x11a))['trim']()[_0x262aee(0x12c)]();if(!SUPPORTED_PROVIDERS['includes'](_0x3ff393))throw CliErrors[_0x262aee(0x11d)](_0x262aee(0x11c)+(_0x3ff393||'(empty)')+'.',_0x262aee(0x130)+SUPPORTED_PROVIDERS['join'](',\x20')+'.');const _0x31a99c=_0x17e889[_0x262aee(0x128)](_0x262aee(0x125))[_0x262aee(0x11f)]();if(!_0x31a99c)throw CliErrors[_0x262aee(0x11d)](_0x262aee(0x122),_0x262aee(0x134));return{'provider':_0x3ff393,'accountId':_0x31a99c};}function buildBindingData(_0x9917f4,_0x1cbb29,_0x13fd80){const _0x24d03f=a85_0x3ec87d;return{'operation':_0x24d03f(0x135),'selector':{'provider':_0x9917f4,'accountId':_0x1cbb29},'before':null,'after':{'provider':_0x9917f4,'accountId':_0x1cbb29,'bound':!![]},'dryRun':_0x13fd80,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':a85_0x3ec87d(0x121),'command':a85_0x3ec87d(0x135),'description':a85_0x3ec87d(0x118),'risk':'write','confirmationDescription':a85_0x3ec87d(0x136),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':a85_0x3ec87d(0x11a),'type':a85_0x3ec87d(0x12f),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':a85_0x3ec87d(0x12a)},{'name':a85_0x3ec87d(0x125),'type':a85_0x3ec87d(0x12f),'required':!![],'description':a85_0x3ec87d(0x12d)}],async 'validate'(_0xf4c8c1){readBindingInput(_0xf4c8c1);},async 'dryRun'(_0x33fe22){const _0x4d4e53=a85_0x3ec87d,{provider:_0x1053a2,accountId:_0x177e88}=readBindingInput(_0x33fe22);return{...buildBindingData(_0x1053a2,_0x177e88,!![]),'method':_0x4d4e53(0x12b),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x1053a2,'accountId':_0x177e88}};},async 'execute'(_0x508187){const _0x106dee=a85_0x3ec87d,{provider:_0x5ec9ea,accountId:_0x4033bf}=readBindingInput(_0x508187),_0x321447=await bindExternalUserAccount(_0x5ec9ea,_0x4033bf);if(_0x321447!==!![])throw CliErrors[_0x106dee(0x133)]('External\x20account\x20binding\x20was\x20not\x20confirmed.',_0x106dee(0x132));return{'ok':!![],'data':buildBindingData(_0x5ec9ea,_0x4033bf,![]),'message':_0x106dee(0x126)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d67dd,_0x3a1c2f){const _0x151518=a86_0x9239,_0x20b28d=_0x2d67dd();while(!![]){try{const _0xc3163b=parseInt(_0x151518(0xd8))/0x1+parseInt(_0x151518(0xd9))/0x2+parseInt(_0x151518(0xdb))/0x3+parseInt(_0x151518(0xd6))/0x4+parseInt(_0x151518(0xdd))/0x5+parseInt(_0x151518(0xdc))/0x6*(parseInt(_0x151518(0xd7))/0x7)+-parseInt(_0x151518(0xda))/0x8;if(_0xc3163b===_0x3a1c2f)break;else _0x20b28d['push'](_0x20b28d['shift']());}catch(_0xd7d729){_0x20b28d['push'](_0x20b28d['shift']());}}}(a86_0x7bfd,0xee490));import{bindUserAccount}from'../../commands/user-account/bind.js';function a86_0x9239(_0x36dfda,_0x2c3120){_0x36dfda=_0x36dfda-0xd6;const _0x7bfd50=a86_0x7bfd();let _0x9239c7=_0x7bfd50[_0x36dfda];return _0x9239c7;}function a86_0x7bfd(){const _0x2f36d6=['73283qhKHzc','995883mNVsjp','1544094cRstZK','53217920HvpMuP','4613247DqvvVw','762ojhynn','7950795ODTGrs','5611420LvaPlL'];a86_0x7bfd=function(){return _0x2f36d6;};return a86_0x7bfd();}export const userAccountDefinitions=[bindUserAccount];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a87_0x4030(_0x58e1a1,_0x52a2f1){_0x58e1a1=_0x58e1a1-0xee;const _0x587bcd=a87_0x587b();let _0x4030b4=_0x587bcd[_0x58e1a1];return _0x4030b4;}const a87_0x50a150=a87_0x4030;(function(_0x3464d4,_0x4f2dfc){const _0xff1d8b=a87_0x4030,_0x46e9f1=_0x3464d4();while(!![]){try{const _0x425a4b=-parseInt(_0xff1d8b(0x106))/0x1*(parseInt(_0xff1d8b(0x123))/0x2)+parseInt(_0xff1d8b(0x11f))/0x3*(-parseInt(_0xff1d8b(0xf8))/0x4)+-parseInt(_0xff1d8b(0x111))/0x5*(-parseInt(_0xff1d8b(0x107))/0x6)+-parseInt(_0xff1d8b(0xf7))/0x7+-parseInt(_0xff1d8b(0x10a))/0x8+parseInt(_0xff1d8b(0x100))/0x9*(parseInt(_0xff1d8b(0x117))/0xa)+parseInt(_0xff1d8b(0x108))/0xb;if(_0x425a4b===_0x4f2dfc)break;else _0x46e9f1['push'](_0x46e9f1['shift']());}catch(_0x18fdd1){_0x46e9f1['push'](_0x46e9f1['shift']());}}}(a87_0x587b,0xb85f7));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_0x50a150(0x120),'type':a87_0x50a150(0x119),'description':a87_0x50a150(0xf6)},{'name':a87_0x50a150(0x105),'type':a87_0x50a150(0x119),'description':'App\x20code\x20to\x20bind\x20directly'},{'name':a87_0x50a150(0xf5),'type':a87_0x50a150(0x119),'description':a87_0x50a150(0x10b),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0xc58efa,_0x4c8f4d){const _0x415171=a87_0x50a150,_0x169a03=_0xc58efa[_0x415171(0xf2)](_0x415171(0x120))[_0x415171(0x10d)](),_0x577236=_0xc58efa['str'](_0x415171(0x105))[_0x415171(0x10d)](),_0x4167ef=_0xc58efa[_0x415171(0xf2)](_0x415171(0xf5))[_0x415171(0x10d)](),_0x1973ab=resolveWorkspaceEnv(_0x4167ef||_0xc58efa[_0x415171(0x115)]||DEFAULT_CONFIG_VALUES[_0x415171(0xf5)]);if(!_0x169a03&&!_0x577236)throw CliErrors[_0x415171(0x11d)](_0x415171(0x114),_0x415171(0x102)+CLI_BIN_NAME+'\x20workspace\x20'+_0x4c8f4d+_0x415171(0x128)+CLI_BIN_NAME+'\x20workspace\x20'+_0x4c8f4d+_0x415171(0x127));if(_0x169a03&&_0x577236)throw CliErrors[_0x415171(0x11d)]('Conflicting\x20workspace\x20app\x20selectors.',_0x415171(0xf3));const _0x42b9f8=resolveWriteConfigPath('project'),_0x35d71e=readConfigFile(_0x42b9f8);assertWorkspaceCommandState(_0x4c8f4d,_0x35d71e);const _0x25583a=_0x577236||await resolveRemoteAppCode({'command':_0x4c8f4d,'appName':_0x169a03,'env':_0x1973ab,'accessKey':_0xc58efa[_0x415171(0x11a)]});return writeWorkspaceConfig({'command':_0x4c8f4d,'appName':_0x169a03,'appcode':_0x25583a,'env':_0x1973ab,'shouldWriteEnv':!!_0x4167ef,'accessKey':_0xc58efa[_0x415171(0x11a)]},_0x42b9f8,_0x35d71e),{'ok':!![],'data':{'configPath':_0x42b9f8,'app':_0x169a03||null,'appcode':_0x25583a,'env':_0x4167ef?_0x1973ab:null,'accessKeyWritten':![],'command':'workspace\x20'+_0x4c8f4d},'message':buildWorkspaceMessage(_0x42b9f8,_0x169a03,_0x25583a,_0x4167ef?_0x1973ab:undefined)};}async function resolveRemoteAppCode(_0x443ba4){const _0x19a7c3=a87_0x50a150;if(!_0x443ba4[_0x19a7c3(0x11a)])throw CliErrors[_0x19a7c3(0x118)]('Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20'+CLI_BIN_NAME+'\x20workspace\x20'+_0x443ba4['command']+'.');const {setActiveAK:_0x2e0f11}=await import(_0x19a7c3(0x10e)),{getRemoteAppList:_0x560a2b}=await import('../../commands/app/remote-source.js');_0x2e0f11(_0x443ba4['accessKey']);const _0x5d8ad1=await _0x560a2b({'env':_0x443ba4[_0x19a7c3(0xf5)],'accessKey':_0x443ba4[_0x19a7c3(0x11a)],'noCache':![]}),_0x12d66f=findAppByName(_0x5d8ad1[_0x19a7c3(0x112)],_0x443ba4['appName']);if(_0x12d66f&&!isRuntimeAccessibleApp(_0x12d66f))throw runtimeInaccessibleAppError(_0x12d66f,'\x22'+_0x443ba4[_0x19a7c3(0x103)]+'\x22');const _0x17eae4=_0x12d66f?.[_0x19a7c3(0x11c)]?.[_0x19a7c3(0x10d)]();if(_0x17eae4)return _0x17eae4;const _0x540e8f=_0x5d8ad1[_0x19a7c3(0x112)]['map'](_0x18202a=>_0x18202a[_0x19a7c3(0x103)])[_0x19a7c3(0x110)](Boolean),_0x42b099=_0x540e8f['length']?_0x19a7c3(0x122)+Array[_0x19a7c3(0xef)](new Set(_0x540e8f))[_0x19a7c3(0xfb)](',\x20')+'.':_0x19a7c3(0x10c)+CLI_BIN_NAME+_0x19a7c3(0x11b);throw CliErrors[_0x19a7c3(0x11d)](_0x19a7c3(0x126)+_0x443ba4[_0x19a7c3(0x103)]+_0x19a7c3(0x121),_0x42b099);}function writeWorkspaceConfig(_0x33fa48,_0x542e2d,_0x41bbcf){const _0x109c48=a87_0x50a150;_0x33fa48[_0x109c48(0x116)]&&(_0x41bbcf[_0x109c48(0xf5)]=_0x33fa48[_0x109c48(0xf5)]);if(_0x33fa48[_0x109c48(0x103)]){const _0x3e3da9=isRecord(_0x41bbcf[_0x109c48(0xfc)])?{..._0x41bbcf['apps']}:{},_0x4c136a=isRecord(_0x3e3da9[_0x33fa48[_0x109c48(0x103)]])?_0x3e3da9[_0x33fa48[_0x109c48(0x103)]]:{};return _0x3e3da9[_0x33fa48[_0x109c48(0x103)]]={..._0x4c136a,'appcode':_0x33fa48[_0x109c48(0x105)]},_0x41bbcf['apps']=_0x3e3da9,_0x41bbcf[_0x109c48(0x101)]=_0x33fa48['appName'],delete _0x41bbcf['appcode'],delete _0x41bbcf[_0x109c48(0x120)],writeAndReturn(_0x542e2d,_0x41bbcf);}return _0x41bbcf[_0x109c48(0x105)]=_0x33fa48['appcode'],delete _0x41bbcf[_0x109c48(0x101)],delete _0x41bbcf[_0x109c48(0x120)],writeAndReturn(_0x542e2d,_0x41bbcf);}function writeAndReturn(_0x3be6ab,_0x2216e4){return writeConfigFile(_0x3be6ab,_0x2216e4),_0x3be6ab;}function resolveWorkspaceEnv(_0x24013c){const _0x35fb5c=a87_0x50a150;if(RUNTIME_ENV_VALUES[_0x35fb5c(0xfe)](_0x24013c))return _0x24013c;throw CliErrors['validation'](_0x35fb5c(0x10f)+_0x24013c+_0x35fb5c(0x104)+RUNTIME_ENV_VALUES['join'](',\x20'));}function a87_0x587b(){const _0x206b9e=['80cfrnXO','items','use','Missing\x20workspace\x20app\x20selector.','envName','shouldWriteEnv','3520fbyeYf','authRequired','string','accessKey','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','appCode','validation','\x0aEnv:\x20','476337Pidita','app','\x22\x20not\x20found.','Available\x20apps:\x20','8TVcOri','Use\x20`','Workspace\x20app\x20context\x20is\x20not\x20initialized.','App\x20\x22','\x20--appcode\x20<code>\x20[--env\x20daily]','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','from','workspace','length','str','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','init','env','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','2545389uKwyoc','20ekvzsl','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.','write','join','apps','Initialize\x20app\x20context\x20for\x20the\x20current\x20working\x20directory\x20when\x20no\x20app\x20is\x20bound\x20yet','includes','object','12933yeOdys','defaultApp','Usage:\x20','appName','\x22.\x20Allowed:\x20','appcode','43137JMUgHs','452418ObxOMa','15421857HfzBZy','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','8231984OLmjGb','Target\x20environment','Run\x20`','trim','../../core/api-client.js','Invalid\x20env\x20\x22','filter'];a87_0x587b=function(){return _0x206b9e;};return a87_0x587b();}function buildWorkspaceMessage(_0x7995e3,_0x204cc3,_0x8f9822,_0x5c7e14){const _0x13676f=a87_0x50a150,_0x2be507=_0x204cc3?_0x204cc3+'\x20('+_0x8f9822+')':_0x8f9822,_0xdd81bd=_0x5c7e14?_0x13676f(0x11e)+_0x5c7e14:'';return'Workspace\x20configured.\x0aConfig\x20file:\x20'+_0x7995e3+'\x0aDefault\x20app:\x20'+_0x2be507+_0xdd81bd+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0x45dfc7){const _0x125479=a87_0x50a150;return typeof _0x45dfc7===_0x125479(0xff)&&_0x45dfc7!==null&&!Array['isArray'](_0x45dfc7);}function hasWorkspaceAppBinding(_0x1fc989){const _0x1f8e7b=a87_0x50a150;if(typeof _0x1fc989[_0x1f8e7b(0x105)]===_0x1f8e7b(0x119)&&_0x1fc989[_0x1f8e7b(0x105)][_0x1f8e7b(0x10d)]()[_0x1f8e7b(0xf1)]>0x0)return!![];if(typeof _0x1fc989['defaultApp']!=='string'||!_0x1fc989[_0x1f8e7b(0x101)]['trim']())return![];if(!isRecord(_0x1fc989['apps']))return![];const _0x49eec0=_0x1fc989['apps'][_0x1fc989[_0x1f8e7b(0x101)][_0x1f8e7b(0x10d)]()];return isRecord(_0x49eec0)&&typeof _0x49eec0[_0x1f8e7b(0x105)]===_0x1f8e7b(0x119)&&_0x49eec0[_0x1f8e7b(0x105)][_0x1f8e7b(0x10d)]()[_0x1f8e7b(0xf1)]>0x0;}function assertWorkspaceCommandState(_0x5c9057,_0x19a264){const _0x1bdcaa=a87_0x50a150,_0x3d2ac1=hasWorkspaceAppBinding(_0x19a264);if(_0x5c9057===_0x1bdcaa(0xf4)&&_0x3d2ac1)throw CliErrors[_0x1bdcaa(0x11d)]('Workspace\x20app\x20context\x20is\x20already\x20initialized.',_0x1bdcaa(0x124)+CLI_BIN_NAME+_0x1bdcaa(0xee)+CLI_BIN_NAME+_0x1bdcaa(0x109));if(_0x5c9057===_0x1bdcaa(0x113)&&!_0x3d2ac1)throw CliErrors['validation'](_0x1bdcaa(0x125),_0x1bdcaa(0x10c)+CLI_BIN_NAME+'\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20first.');}function makeWorkspaceCommand(_0x3f746c){const _0xa543e1=a87_0x50a150;return{'service':_0xa543e1(0xf0),'command':_0x3f746c,'description':_0x3f746c===_0xa543e1(0xf4)?_0xa543e1(0xfd):'Change\x20the\x20app\x20context\x20already\x20bound\x20to\x20the\x20current\x20working\x20directory','risk':_0xa543e1(0xfa),'confirmationDescription':_0x3f746c===_0xa543e1(0xf4)?_0xa543e1(0xf9):'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'(_0x254e46){return executeWorkspaceUse(_0x254e46,_0x3f746c);}};}export const workspaceDefinitions=[makeWorkspaceCommand('init'),makeWorkspaceCommand(a87_0x50a150(0x113))];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a88_0x125655=a88_0x40c5;(function(_0x33009f,_0x19a730){const _0x5a72fa=a88_0x40c5,_0x2e963d=_0x33009f();while(!![]){try{const _0x18f014=-parseInt(_0x5a72fa(0x1e2))/0x1+-parseInt(_0x5a72fa(0x1f3))/0x2*(-parseInt(_0x5a72fa(0x1e7))/0x3)+-parseInt(_0x5a72fa(0x1f0))/0x4*(-parseInt(_0x5a72fa(0x1ff))/0x5)+-parseInt(_0x5a72fa(0x1f4))/0x6+parseInt(_0x5a72fa(0x1ec))/0x7*(parseInt(_0x5a72fa(0x1f2))/0x8)+parseInt(_0x5a72fa(0x1ef))/0x9+-parseInt(_0x5a72fa(0x1df))/0xa;if(_0x18f014===_0x19a730)break;else _0x2e963d['push'](_0x2e963d['shift']());}catch(_0x4330f3){_0x2e963d['push'](_0x2e963d['shift']());}}}(a88_0x5bab,0x59fd6));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';export const DOMAIN_CONFIG_FIELDS=['userDomain',a88_0x125655(0x1e9),a88_0x125655(0x1da),a88_0x125655(0x1dc),'kbDomain'];const DOMAIN_FLAGS={'userDomain':a88_0x125655(0x203),'apiDomain':a88_0x125655(0x1db),'runtimeDomain':'runtime-domain','skillDomain':a88_0x125655(0x201),'kbDomain':a88_0x125655(0x1f8)};function a88_0x5bab(){const _0x398a11=['keys','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','kb-domain','protocol','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.',':\x20\x22','Invalid\x20domain\x20config\x20JSON:\x20','object','join','1821995noCdLU','pathname','skill-domain','password','user-domain','str','cwd','length','runtimeDomain','api-domain','skillDomain','string','filter','10703600HMLFmG','isArray',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','97707ZOSuDN','validation','trim','origin','Allowed\x20fields:\x20','1718769bsOzFZ','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','apiDomain','Invalid\x20','Unsupported\x20domain\x20config\x20field(s):\x20','581KvseEV','search','includes','4370643xoEpIA','4gQBvlZ','https:','51064GuDxOu','2ERtQZO','2496438TKJMiM','username'];a88_0x5bab=function(){return _0x398a11;};return a88_0x5bab();}export const LEGACY_DOMAIN_CONFIG_FIELDS=['agentDomain','platformDomain','skillHubDomain'];export function normalizeDomainOrigin(_0x37f106,_0x44ce90){const _0x9eab9f=a88_0x125655;if(typeof _0x44ce90!==_0x9eab9f(0x1dd)||!_0x44ce90['trim']())throw CliErrors[_0x9eab9f(0x1e3)](_0x9eab9f(0x1ea)+_0x37f106+_0x9eab9f(0x1e1));let _0x441283;try{_0x441283=new URL(_0x44ce90[_0x9eab9f(0x1e4)]());}catch{throw CliErrors[_0x9eab9f(0x1e3)](_0x9eab9f(0x1ea)+_0x37f106+_0x9eab9f(0x1fb)+_0x44ce90+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x441283[_0x9eab9f(0x1f9)]!==_0x9eab9f(0x1f1)||_0x441283[_0x9eab9f(0x1f5)]||_0x441283[_0x9eab9f(0x202)]||_0x441283[_0x9eab9f(0x200)]!=='/'&&_0x441283[_0x9eab9f(0x200)]!==''||_0x441283[_0x9eab9f(0x1ed)]||_0x441283['hash'])throw CliErrors[_0x9eab9f(0x1e3)]('Invalid\x20'+_0x37f106+':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.',_0x9eab9f(0x1e8));return _0x441283[_0x9eab9f(0x1e5)];}export function readDomainConfig(_0x104922){const _0x422c62=a88_0x125655,_0x238574=isAbsolute(_0x104922)?_0x104922:resolve(process[_0x422c62(0x1d8)](),_0x104922);if(!existsSync(_0x238574))throw CliErrors[_0x422c62(0x1e3)]('Domain\x20config\x20file\x20not\x20found:\x20'+_0x238574);let _0x1f4393;try{_0x1f4393=JSON['parse'](readFileSync(_0x238574,'utf8'));}catch{throw CliErrors[_0x422c62(0x1e3)](_0x422c62(0x1fc)+_0x238574);}if(!_0x1f4393||typeof _0x1f4393!==_0x422c62(0x1fd)||Array[_0x422c62(0x1e0)](_0x1f4393))throw CliErrors[_0x422c62(0x1e3)](_0x422c62(0x1f7));const _0x5d0dfd=_0x1f4393,_0x310119=Object[_0x422c62(0x1f6)](_0x5d0dfd)[_0x422c62(0x1de)](_0x3bfd90=>!DOMAIN_CONFIG_FIELDS[_0x422c62(0x1ee)](_0x3bfd90));if(_0x310119[_0x422c62(0x1d9)]>0x0)throw CliErrors[_0x422c62(0x1e3)](_0x422c62(0x1eb)+_0x310119[_0x422c62(0x1fe)](',\x20'),_0x422c62(0x1e6)+DOMAIN_CONFIG_FIELDS['join'](',\x20'));const _0x28c463={};for(const _0x4e7799 of DOMAIN_CONFIG_FIELDS){_0x5d0dfd[_0x4e7799]!==undefined&&(_0x28c463[_0x4e7799]=normalizeDomainOrigin(_0x4e7799,_0x5d0dfd[_0x4e7799]));}if(Object['keys'](_0x28c463)[_0x422c62(0x1d9)]===0x0)throw CliErrors[_0x422c62(0x1e3)](_0x422c62(0x1fa));return _0x28c463;}function a88_0x40c5(_0x15fc3f,_0x5c7a2d){_0x15fc3f=_0x15fc3f-0x1d7;const _0x5bab34=a88_0x5bab();let _0x40c559=_0x5bab34[_0x15fc3f];return _0x40c559;}export function resolveDomainFlags(_0x191472){const _0x28af50=a88_0x125655,_0x1dd2a6=(_0x191472['str']('domain-config')||'')[_0x28af50(0x1e4)](),_0x1fcca9=_0x1dd2a6?readDomainConfig(_0x1dd2a6):{};for(const _0x90396a of DOMAIN_CONFIG_FIELDS){const _0x142a7e=(_0x191472[_0x28af50(0x1d7)](DOMAIN_FLAGS[_0x90396a])||'')[_0x28af50(0x1e4)]();if(_0x142a7e)_0x1fcca9[_0x90396a]=normalizeDomainOrigin(_0x90396a,_0x142a7e);}return _0x1fcca9;}
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x36062e=a89_0x4b80;(function(_0x649be3,_0xb4180a){const _0x14e4cb=a89_0x4b80,_0x45a2e5=_0x649be3();while(!![]){try{const _0xe41ff8=parseInt(_0x14e4cb(0x1cc))/0x1*(parseInt(_0x14e4cb(0x1b8))/0x2)+-parseInt(_0x14e4cb(0x1cf))/0x3*(-parseInt(_0x14e4cb(0x1ce))/0x4)+-parseInt(_0x14e4cb(0x1d3))/0x5*(-parseInt(_0x14e4cb(0x1b5))/0x6)+-parseInt(_0x14e4cb(0x1bc))/0x7+-parseInt(_0x14e4cb(0x1c5))/0x8+parseInt(_0x14e4cb(0x1b3))/0x9*(-parseInt(_0x14e4cb(0x1b2))/0xa)+parseInt(_0x14e4cb(0x1c3))/0xb;if(_0xe41ff8===_0xb4180a)break;else _0x45a2e5['push'](_0x45a2e5['shift']());}catch(_0x1bbfda){_0x45a2e5['push'](_0x45a2e5['shift']());}}}(a89_0x57d6,0xdfa61));function a89_0x57d6(){const _0x3ca46a=['riskLevel','map','cliSettableTopLevel','Default\x20output\x20format','fromEntries','6212NEqajV','locale','4kzOzDJ','3009507RMyZRf','Config\x20key.\x20Top-level:\x20',';\x20local\x20alias:\x20apps.<alias>.appcode','enumValues','335245pJPbUy','env','toLowerCase','legacyCompatOnly','zh-CN','defaultValue','48110XPHhkj','45DkJasr','Override\x20SkillHub\x20domain','54EDgsfq','Target\x20environment','Override\x20user\x20domain','166SdVmPW','entries','Lovrabet\x20region','format','6865075GbIuMW','Access\x20key\x20(client-ak\x20auth)','filter','Override\x20API\x20domain','Override\x20knowledge-base\x20domain','has','en-US','2013231OMxNjC','importable','3075056hYNmoN','Risk\x20level'];a89_0x57d6=function(){return _0x3ca46a;};return a89_0x57d6();}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_0x36062e(0x1ba),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':ENABLED_LOVRABET_REGION_VALUES,'defaultValue':DEFAULT_LOVRABET_REGION,'importable':!![]},'env':{'description':a89_0x36062e(0x1b6),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x36062e(0x1ad)],'importable':!![]},'format':{'description':a89_0x36062e(0x1ca),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x36062e(0x1bb)],'importable':!![]},'pageSize':{'description':'Default\x20page\x20size','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a89_0x36062e(0x1bf),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a89_0x36062e(0x1b7),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':'Override\x20runtime\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillDomain':{'description':a89_0x36062e(0x1b4),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'kbDomain':{'description':a89_0x36062e(0x1c0),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a89_0x36062e(0x1bd),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a89_0x36062e(0x1c6),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x36062e(0x1c7)],'importable':!![]},'locale':{'description':'App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','topLevel':!![],'cliSettableTopLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a89_0x36062e(0x1cd)],'importable':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a89_0x36062e(0x1b9)](CONFIG_FIELD_SCHEMAS)[a89_0x36062e(0x1be)](([,_0x58a519])=>_0x58a519[a89_0x36062e(0x1c9)])[a89_0x36062e(0x1c8)](([_0x3b2945])=>_0x3b2945));export const CLI_PROTECTED_CONFIG_KEYS=new Set([a89_0x36062e(0x1c7)]);export const CONFIG_ENUM_VALUES=Object[a89_0x36062e(0x1cb)](Object[a89_0x36062e(0x1b9)](CONFIG_FIELD_SCHEMAS)[a89_0x36062e(0x1be)](([,_0x48077d])=>_0x48077d[a89_0x36062e(0x1d2)])[a89_0x36062e(0x1c8)](([_0x40719e,_0x312db9])=>[_0x40719e,[..._0x312db9['enumValues']||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a89_0x36062e(0x1b9)](CONFIG_FIELD_SCHEMAS)[a89_0x36062e(0x1be)](([,_0x35f0f6])=>_0x35f0f6[a89_0x36062e(0x1c4)])[a89_0x36062e(0x1c8)](([_0x56cb57])=>_0x56cb57);export function getConfigFieldSchema(_0x16ca17){return CONFIG_FIELD_SCHEMAS[_0x16ca17];}export function getConfigEnumValues(_0x562e15){const _0x556f25=a89_0x36062e;return getConfigFieldSchema(_0x562e15)?.[_0x556f25(0x1d2)];}export function getConfigDefaultValue(_0x2d192){const _0x5a407e=a89_0x36062e;return getConfigFieldSchema(_0x2d192)?.[_0x5a407e(0x1b1)];}export function isTopLevelConfigKey(_0x448ae1){const _0x3bb222=a89_0x36062e;return TOP_LEVEL_CONFIG_KEYS[_0x3bb222(0x1c1)](_0x448ae1);}export function isCliProtectedConfigKey(_0x55d303){const _0x353375=a89_0x36062e;return CLI_PROTECTED_CONFIG_KEYS[_0x353375(0x1c1)](_0x55d303);}const LOCALE_MAP={'zh':a89_0x36062e(0x1b0),'zh-cn':a89_0x36062e(0x1b0),'zh_cn':'zh-CN','en':a89_0x36062e(0x1c2),'en-us':'en-US','en_us':a89_0x36062e(0x1c2)};export function normalizeLocale(_0x24dd7e){const _0x3a79d2=a89_0x36062e;if(!_0x24dd7e)return null;return LOCALE_MAP[_0x24dd7e[_0x3a79d2(0x1ae)]()]??null;}export function isLegacyCompatConfigKey(_0x3a43cc){const _0x12c2f1=a89_0x36062e;return getConfigFieldSchema(_0x3a43cc)?.[_0x12c2f1(0x1af)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}function a89_0x4b80(_0x110323,_0x3e2a5b){_0x110323=_0x110323-0x1ad;const _0x57d676=a89_0x57d6();let _0x4b80b8=_0x57d676[_0x110323];return _0x4b80b8;}export function formatConfigKeyList(_0x1c5c8e){return[..._0x1c5c8e]['join'](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x12f945=a89_0x36062e;return _0x12f945(0x1d0)+getTopLevelConfigKeySummary()+_0x12f945(0x1d1);}export function buildAppProfileListFields(_0x3da985){return{'env':_0x3da985,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a90_0x4016(){const _0x2503c1=['4816156PPoFuv','12rNknSz','UNPUBLISH','893118gLlIoP','Published','10AirdwQ','24IsTVKM','50mTDzEX','1204491qJblns','9596907jiLlQh','24853015wUKuDx','39IAFvIc','218758oSNmXg','872851hKxReH'];a90_0x4016=function(){return _0x2503c1;};return a90_0x4016();}const a90_0x4b7ac7=a90_0x191e;(function(_0x4eeaeb,_0x2da1e1){const _0x55e22a=a90_0x191e,_0x377c9a=_0x4eeaeb();while(!![]){try{const _0x41faee=parseInt(_0x55e22a(0x1ce))/0x1+-parseInt(_0x55e22a(0x1d2))/0x2*(-parseInt(_0x55e22a(0x1d1))/0x3)+-parseInt(_0x55e22a(0x1d4))/0x4+parseInt(_0x55e22a(0x1cd))/0x5*(-parseInt(_0x55e22a(0x1c9))/0x6)+-parseInt(_0x55e22a(0x1d3))/0x7*(parseInt(_0x55e22a(0x1cc))/0x8)+-parseInt(_0x55e22a(0x1cf))/0x9*(parseInt(_0x55e22a(0x1cb))/0xa)+parseInt(_0x55e22a(0x1d0))/0xb*(parseInt(_0x55e22a(0x1d5))/0xc);if(_0x41faee===_0x2da1e1)break;else _0x377c9a['push'](_0x377c9a['shift']());}catch(_0x5d8b5d){_0x377c9a['push'](_0x377c9a['shift']());}}}(a90_0x4016,0xb7cac));export const APP_PUBLISH_STATUS={'Published':'PUBLISHED','Unpublished':a90_0x4b7ac7(0x1d6)};function a90_0x191e(_0x118caa,_0x3a4cba){_0x118caa=_0x118caa-0x1c9;const _0x40163c=a90_0x4016();let _0x191ef2=_0x40163c[_0x118caa];return _0x191ef2;}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a90_0x4b7ac7(0x1ca)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x58a27f,_0x58d0af){const _0x513bdc=a91_0x6dc9,_0x17195f=_0x58a27f();while(!![]){try{const _0x2432e6=parseInt(_0x513bdc(0x1cd))/0x1*(parseInt(_0x513bdc(0x1d1))/0x2)+-parseInt(_0x513bdc(0x1d2))/0x3+parseInt(_0x513bdc(0x1d4))/0x4+parseInt(_0x513bdc(0x1d5))/0x5+parseInt(_0x513bdc(0x1d8))/0x6*(parseInt(_0x513bdc(0x1d3))/0x7)+-parseInt(_0x513bdc(0x1d0))/0x8*(parseInt(_0x513bdc(0x1ce))/0x9)+parseInt(_0x513bdc(0x1d6))/0xa*(-parseInt(_0x513bdc(0x1d7))/0xb);if(_0x2432e6===_0x58d0af)break;else _0x17195f['push'](_0x17195f['shift']());}catch(_0x1eb59f){_0x17195f['push'](_0x17195f['shift']());}}}(a91_0x3aaf,0x4cb07));export const AUTH_MODE={'ClientAk':'client-ak'};export function isAuthMode(_0x374d6b){const _0x5bbf82=a91_0x6dc9;return _0x374d6b===AUTH_MODE[_0x5bbf82(0x1cf)];}function a91_0x6dc9(_0x18281d,_0x300924){_0x18281d=_0x18281d-0x1cd;const _0x3aafc7=a91_0x3aaf();let _0x6dc90e=_0x3aafc7[_0x18281d];return _0x6dc90e;}function a91_0x3aaf(){const _0x10703e=['104tJmXDc','976935gwQIFn','7POPLQe','1333776IvewBp','2139935fsNgWk','20uqdQJh','3635852dRFxdy','1626354WGRfmT','8923StultE','1760922AwSkGF','ClientAk','8eNouyG'];a91_0x3aaf=function(){return _0x10703e;};return a91_0x3aaf();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a92_0x865a(){const _0x193cef=['JSON\x20params\x20for\x20execute\x20commands','dry-run','840822LjIulA','Name\x20filter','verbose','Verbose\x20output','Use\x20global\x20config\x20scope','meowKey','global','nonInteractive','SQL\x20query\x20code','91VsGEzo','Skip\x20confirmation\x20for\x20high-risk\x20writes','1569790sABMTa','env','sqlcode','Force\x20non-interactive\x20mode\x20(CI)','12gTMRLA','<name>','json\x20|\x20pretty\x20|\x20compress','117336pasgmw','clear','Alias\x20for\x20--non-interactive','Clear\x20output','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','Show\x20help','39623QjCFhZ','yes','Record\x20ID','Preview\x20operation\x20without\x20executing','boolean','Override\x20appcode','format','map','type','Environment','dryRun','<expr>','2414768viMjyW','7372JRSCnq','1180EzsBzt','cliBinName','app','help','params','appcode','string','1649781mFpruS'];a92_0x865a=function(){return _0x193cef;};return a92_0x865a();}const a92_0x2816aa=a92_0x21ec;(function(_0x110659,_0x2afd23){const _0x49a205=a92_0x21ec,_0x386af0=_0x110659();while(!![]){try{const _0x3b0c99=-parseInt(_0x49a205(0x170))/0x1*(-parseInt(_0x49a205(0x197))/0x2)+-parseInt(_0x49a205(0x188))/0x3+-parseInt(_0x49a205(0x17d))/0x4*(parseInt(_0x49a205(0x17e))/0x5)+parseInt(_0x49a205(0x19a))/0x6*(parseInt(_0x49a205(0x191))/0x7)+parseInt(_0x49a205(0x17c))/0x8+parseInt(_0x49a205(0x185))/0x9+parseInt(_0x49a205(0x193))/0xa;if(_0x3b0c99===_0x2afd23)break;else _0x386af0['push'](_0x386af0['shift']());}catch(_0x34ae75){_0x386af0['push'](_0x386af0['shift']());}}}(a92_0x865a,0x6643e));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';function a92_0x21ec(_0x1d908c,_0x5eaa52){_0x1d908c=_0x1d908c-0x16e;const _0x865a78=a92_0x865a();let _0x21ec57=_0x865a78[_0x1d908c];return _0x21ec57;}export const CLI_BIN_NAME=PRODUCT_CONFIG[a92_0x2816aa(0x17f)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG['cliDisplayName'];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a92_0x2816aa(0x183),'meowKey':a92_0x2816aa(0x183),'type':'string','description':a92_0x2816aa(0x175),'hint':'<code>'},{'name':'app','meowKey':'app','type':a92_0x2816aa(0x184),'description':'Select\x20app\x20profile\x20by\x20name','hint':a92_0x2816aa(0x198)},{'name':a92_0x2816aa(0x194),'meowKey':'env','type':a92_0x2816aa(0x184),'description':a92_0x2816aa(0x179),'hint':'production\x20|\x20development\x20|\x20daily'},{'name':a92_0x2816aa(0x176),'meowKey':a92_0x2816aa(0x176),'type':a92_0x2816aa(0x184),'description':'Output\x20format','hint':a92_0x2816aa(0x199)},{'name':'jq','meowKey':'jq','type':a92_0x2816aa(0x184),'description':a92_0x2816aa(0x16e),'hint':a92_0x2816aa(0x17b)},{'name':a92_0x2816aa(0x187),'meowKey':a92_0x2816aa(0x17a),'type':'boolean','description':a92_0x2816aa(0x173)},{'name':a92_0x2816aa(0x171),'meowKey':a92_0x2816aa(0x171),'type':'boolean','description':a92_0x2816aa(0x192)},{'name':'non-interactive','meowKey':a92_0x2816aa(0x18f),'type':'boolean','description':a92_0x2816aa(0x196)},{'name':a92_0x2816aa(0x18e),'meowKey':a92_0x2816aa(0x18e),'type':a92_0x2816aa(0x174),'description':a92_0x2816aa(0x18c)},{'name':'ci','meowKey':'ci','type':a92_0x2816aa(0x174),'description':a92_0x2816aa(0x19c),'hidden':!![]},{'name':'help','meowKey':a92_0x2816aa(0x181),'type':a92_0x2816aa(0x174),'description':a92_0x2816aa(0x16f)},{'name':'id','meowKey':'id','type':a92_0x2816aa(0x184),'description':a92_0x2816aa(0x172),'hidden':!![]},{'name':'name','meowKey':'name','type':a92_0x2816aa(0x184),'description':a92_0x2816aa(0x189),'hidden':!![]},{'name':a92_0x2816aa(0x195),'meowKey':a92_0x2816aa(0x195),'type':a92_0x2816aa(0x184),'description':a92_0x2816aa(0x190),'hidden':!![]},{'name':a92_0x2816aa(0x182),'meowKey':a92_0x2816aa(0x182),'type':a92_0x2816aa(0x184),'description':a92_0x2816aa(0x186),'hidden':!![]},{'name':a92_0x2816aa(0x18a),'meowKey':a92_0x2816aa(0x18a),'type':a92_0x2816aa(0x174),'description':a92_0x2816aa(0x18b),'hidden':!![]},{'name':a92_0x2816aa(0x19b),'meowKey':a92_0x2816aa(0x19b),'type':a92_0x2816aa(0x174),'description':a92_0x2816aa(0x19d),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a92_0x2816aa(0x183),a92_0x2816aa(0x180),a92_0x2816aa(0x194),a92_0x2816aa(0x176),'jq',a92_0x2816aa(0x187),'yes','non-interactive','ci']);export function buildMeowFlags(){const _0x2018e5=a92_0x2816aa;return Object['fromEntries'](GLOBAL_FLAGS[_0x2018e5(0x177)](_0xe4f5d9=>[_0xe4f5d9[_0x2018e5(0x18d)],{'type':_0xe4f5d9[_0x2018e5(0x178)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x418986=a93_0x2dd9;(function(_0x1ccb40,_0x2e8d22){const _0x1d7d38=a93_0x2dd9,_0x376b6c=_0x1ccb40();while(!![]){try{const _0x36b79f=parseInt(_0x1d7d38(0x12b))/0x1*(-parseInt(_0x1d7d38(0x12c))/0x2)+parseInt(_0x1d7d38(0x122))/0x3*(parseInt(_0x1d7d38(0x12e))/0x4)+-parseInt(_0x1d7d38(0x123))/0x5+parseInt(_0x1d7d38(0x130))/0x6*(-parseInt(_0x1d7d38(0x121))/0x7)+parseInt(_0x1d7d38(0x126))/0x8*(-parseInt(_0x1d7d38(0x127))/0x9)+-parseInt(_0x1d7d38(0x128))/0xa*(parseInt(_0x1d7d38(0x125))/0xb)+parseInt(_0x1d7d38(0x12a))/0xc;if(_0x36b79f===_0x2e8d22)break;else _0x376b6c['push'](_0x376b6c['shift']());}catch(_0x22b20d){_0x376b6c['push'](_0x376b6c['shift']());}}}(a93_0x3088,0x57202));function a93_0x2dd9(_0x1bec8e,_0x2a9588){_0x1bec8e=_0x1bec8e-0x121;const _0x30881f=a93_0x3088();let _0x2dd985=_0x30881f[_0x1bec8e];return _0x2dd985;}function a93_0x3088(){const _0x8d75d6=['1jCwewk','345868BkKBZR','write','56HxgmaT','en-US','1374DxyTWI','19383hbdJGB','34557rJxmJG','1280055VaFSkE','main','3375207HTJEzp','88QWblXC','251649cMmpYm','10WrvGTp','production','22476648IHGHku'];a93_0x3088=function(){return _0x8d75d6;};return a93_0x3088();}export const DEFAULT_APP_PROFILE_NAME=a93_0x418986(0x124);export const DEFAULT_CONFIG_VALUES={'env':a93_0x418986(0x129),'format':'compress','locale':a93_0x418986(0x12f),'riskLevel':a93_0x418986(0x12d)};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x95d95=a94_0x18af;(function(_0x5cf496,_0x488d56){const _0x2629c1=a94_0x18af,_0x11bd6b=_0x5cf496();while(!![]){try{const _0x33b857=parseInt(_0x2629c1(0x97))/0x1+-parseInt(_0x2629c1(0x95))/0x2*(-parseInt(_0x2629c1(0x9a))/0x3)+-parseInt(_0x2629c1(0xa2))/0x4*(parseInt(_0x2629c1(0xa3))/0x5)+-parseInt(_0x2629c1(0x9f))/0x6+-parseInt(_0x2629c1(0x9b))/0x7*(parseInt(_0x2629c1(0xa0))/0x8)+-parseInt(_0x2629c1(0x9c))/0x9*(parseInt(_0x2629c1(0x9e))/0xa)+parseInt(_0x2629c1(0xa1))/0xb*(parseInt(_0x2629c1(0xa4))/0xc);if(_0x33b857===_0x488d56)break;else _0x11bd6b['push'](_0x11bd6b['shift']());}catch(_0x1e0570){_0x11bd6b['push'](_0x11bd6b['shift']());}}}(a94_0x194c,0xd096d));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a94_0x95d95(0x98)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];function a94_0x18af(_0x881a44,_0x1777f6){_0x881a44=_0x881a44-0x95;const _0x194c45=a94_0x194c();let _0x18af63=_0x194c45[_0x881a44];return _0x18af63;}export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a94_0x95d95(0x9d)];function a94_0x194c(){const _0x173aed=['12zWmKWu','32Eaxrrv','cliCdnBaseUrl','780394HCIzxt','npmPackageName','/dist/lovrabet-cli/config/index.json','62526SHxgFj','175CkjJLI','9jgxsFe','npmRegistryBaseUrl','5851610QItISf','8098614zaFrzF','172440DTqwUy','29438266xhWXct','923772zpRMOo','10qOBXSO'];a94_0x194c=function(){return _0x173aed;};return a94_0x194c();}export const LOVRABET_CLI_CDN_BASE_URL=PRODUCT_CONFIG[a94_0x95d95(0x96)];export const LOVRABET_CLI_VERSION_POLICY_URL=LOVRABET_CLI_CDN_BASE_URL+a94_0x95d95(0x99);
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x5bd5da=a95_0x135b;(function(_0x1469a7,_0x1d1d83){const _0x522741=a95_0x135b,_0x5239c2=_0x1469a7();while(!![]){try{const _0x4eafa8=parseInt(_0x522741(0xc9))/0x1+parseInt(_0x522741(0xbc))/0x2+-parseInt(_0x522741(0xc0))/0x3+parseInt(_0x522741(0xbd))/0x4+parseInt(_0x522741(0xca))/0x5+parseInt(_0x522741(0xc1))/0x6+parseInt(_0x522741(0xbe))/0x7*(-parseInt(_0x522741(0xc8))/0x8);if(_0x4eafa8===_0x1d1d83)break;else _0x5239c2['push'](_0x5239c2['shift']());}catch(_0x280575){_0x5239c2['push'](_0x5239c2['shift']());}}}(a95_0x30a8,0x8e473));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(_0x20ed92){const _0x53bd83=a95_0x135b;customApiDomain=_0x20ed92?.[_0x53bd83(0xbb)],customUserDomain=_0x20ed92?.['userDomain'],customRuntimeDomain=_0x20ed92?.[_0x53bd83(0xc6)],customSkillDomain=_0x20ed92?.['skillDomain'],customKbDomain=_0x20ed92?.[_0x53bd83(0xbf)],activeRegion=_0x20ed92?.[_0x53bd83(0xc4)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>PRODUCT_CONFIG[a95_0x5bd5da(0xba)][activeRegion][isProduction(getEnv())?a95_0x5bd5da(0xc3):a95_0x5bd5da(0xb9)];function a95_0x30a8(){const _0x3ec027=['671944WhIYyg','479312CiElQz','695499vSIUOg','kbDomain','270375bMIdpo','5393274gOJraV','skill','production','region','api','runtimeDomain','user','160bXYLLD','1144477Frpshs','804400fyIjRg','nonProduction','regionDomains','apiDomain'];a95_0x30a8=function(){return _0x3ec027;};return a95_0x30a8();}export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()[a95_0x5bd5da(0xc7)];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()[a95_0x5bd5da(0xc5)];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()['runtime'];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a95_0x5bd5da(0xc2)];function a95_0x135b(_0x54d2fc,_0x47b153){_0x54d2fc=_0x54d2fc-0xb9;const _0x30a8c4=a95_0x30a8();let _0x135b96=_0x30a8c4[_0x54d2fc];return _0x135b96;}export const getKbDomain=()=>customKbDomain||getActiveRegionDomains()['kb'];
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x574f7a=a96_0x3b1c;function a96_0x5419(){const _0x177170=['dev','ENV','74799cMfaPY','development','4726XxLcLL','80gEXKfC','630lvMmSM','2798208SPnmlJ','117048CkftAM','430wDSpDK','production','2633155kLMOpb','15955hoGluK','3MovlUu','341QrFCJm','1166428MzcyqW','daily','online'];a96_0x5419=function(){return _0x177170;};return a96_0x5419();}(function(_0x2be807,_0x35faf5){const _0x1a8d1e=a96_0x3b1c,_0x3a1672=_0x2be807();while(!![]){try{const _0xc331f6=-parseInt(_0x1a8d1e(0x1bb))/0x1*(-parseInt(_0x1a8d1e(0x1ba))/0x2)+-parseInt(_0x1a8d1e(0x1c3))/0x3*(parseInt(_0x1a8d1e(0x1b3))/0x4)+-parseInt(_0x1a8d1e(0x1c2))/0x5*(parseInt(_0x1a8d1e(0x1bc))/0x6)+-parseInt(_0x1a8d1e(0x1c1))/0x7+parseInt(_0x1a8d1e(0x1bd))/0x8+-parseInt(_0x1a8d1e(0x1b8))/0x9*(-parseInt(_0x1a8d1e(0x1bf))/0xa)+parseInt(_0x1a8d1e(0x1b2))/0xb*(parseInt(_0x1a8d1e(0x1be))/0xc);if(_0xc331f6===_0x35faf5)break;else _0x3a1672['push'](_0x3a1672['shift']());}catch(_0x3523d1){_0x3a1672['push'](_0x3a1672['shift']());}}}(a96_0x5419,0x2fc98));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a96_0x574f7a(0x1c0),a96_0x574f7a(0x1b9),a96_0x574f7a(0x1b4)];export function normalizeEnv(_0x468b43){const _0xfcc04e=a96_0x574f7a;return _0x468b43===_0xfcc04e(0x1b5)?_0xfcc04e(0x1c0):_0x468b43;}export function isProduction(_0x13db83){const _0xaa611=a96_0x574f7a;return normalizeEnv(_0x13db83)===_0xaa611(0x1c0);}export function isDaily(_0x4b250a){const _0x18d926=a96_0x574f7a;return normalizeEnv(_0x4b250a)===_0x18d926(0x1b4);}export function isDev(_0x44e801){const _0x697c4e=a96_0x574f7a,_0x4b39ef=normalizeEnv(_0x44e801);return _0x4b39ef===_0x697c4e(0x1b9)||_0x4b39ef===_0x697c4e(0x1b6);}function a96_0x3b1c(_0x591d90,_0x3647b4){_0x591d90=_0x591d90-0x1b2;const _0x541996=a96_0x5419();let _0x3b1cbc=_0x541996[_0x591d90];return _0x3b1cbc;}let env=normalizeEnv(productEnv(a96_0x574f7a(0x1b7))||a96_0x574f7a(0x1c0));export function getEnv(){return env;}export function initEnv(_0x49a89c){env=normalizeEnv(_0x49a89c);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a97_0x2ca594=a97_0x4ba3;(function(_0x101287,_0x15a6fa){const _0x3fa090=a97_0x4ba3,_0x5067ea=_0x101287();while(!![]){try{const _0x1f26f8=-parseInt(_0x3fa090(0x1f3))/0x1*(parseInt(_0x3fa090(0x1ff))/0x2)+-parseInt(_0x3fa090(0x1fd))/0x3+parseInt(_0x3fa090(0x1fb))/0x4*(parseInt(_0x3fa090(0x1fa))/0x5)+-parseInt(_0x3fa090(0x200))/0x6+parseInt(_0x3fa090(0x1f5))/0x7*(-parseInt(_0x3fa090(0x1fe))/0x8)+-parseInt(_0x3fa090(0x1f8))/0x9*(-parseInt(_0x3fa090(0x1f9))/0xa)+parseInt(_0x3fa090(0x1f4))/0xb;if(_0x1f26f8===_0x15a6fa)break;else _0x5067ea['push'](_0x5067ea['shift']());}catch(_0x28676e){_0x5067ea['push'](_0x5067ea['shift']());}}}(a97_0x1625,0x1a5cf));function a97_0x1625(){const _0x30983e=['4yVFmhx','json','194430stDFCl','18488uOHEus','2MsZhUs','704280WGvUYM','139123BrhtsP','3229919kmhise','427TLuBCl','pretty','compress','1238823uRPsVD','10PfVWDQ','694955vgcNrc'];a97_0x1625=function(){return _0x30983e;};return a97_0x1625();}function a97_0x4ba3(_0x1ad7fb,_0x2946e3){_0x1ad7fb=_0x1ad7fb-0x1f3;const _0x162538=a97_0x1625();let _0x4ba305=_0x162538[_0x1ad7fb];return _0x4ba305;}export const OUTPUT_FORMAT_VALUES=[a97_0x2ca594(0x1fc),a97_0x2ca594(0x1f6),a97_0x2ca594(0x1f7)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a98_0x3b2c(_0x535a71,_0x188711){_0x535a71=_0x535a71-0x12c;const _0xb04196=a98_0xb041();let _0x3b2cc9=_0xb04196[_0x535a71];return _0x3b2cc9;}const a98_0x1465d2=a98_0x3b2c;(function(_0x243c75,_0x16753a){const _0x2e4a8f=a98_0x3b2c,_0x14339c=_0x243c75();while(!![]){try{const _0x42ccae=-parseInt(_0x2e4a8f(0x147))/0x1+-parseInt(_0x2e4a8f(0x14e))/0x2*(-parseInt(_0x2e4a8f(0x13f))/0x3)+-parseInt(_0x2e4a8f(0x131))/0x4+parseInt(_0x2e4a8f(0x14a))/0x5+-parseInt(_0x2e4a8f(0x149))/0x6+-parseInt(_0x2e4a8f(0x12d))/0x7+parseInt(_0x2e4a8f(0x146))/0x8;if(_0x42ccae===_0x16753a)break;else _0x14339c['push'](_0x14339c['shift']());}catch(_0x3bca47){_0x14339c['push'](_0x14339c['shift']());}}}(a98_0xb041,0x44fe7));function a98_0xb041(){const _0x46e760=['Lovrabet\x20Runtime\x20CLI','3364272wMLMpI','2817490pzIKQQ','lovrabet','https://daily-runtime.lovrabet.ai','git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','2QEakOA','LOVRABET','https://daily-api.lovrabet.ai','https://daily-api.lovrabet.com','https://user.lovrabet.ai','https://api.lovrabet.ai','https://user-daily.lovrabet.com','RABETBASE','https://api.lovrabet.id','legacyEnvPrefixes','387030dkJzqP','https://runtime.lovrabet.com','https://skills.lovrabet.com','https://user.lovrabet.id','88764vukuJO','https://registry.npmjs.org','https://skills-daily.lovrabet.ai','.lovrabet','https://skills-daily.lovrabet.com','https://user-daily.lovrabet.id','https://skills-daily.lovrabet.id','https://runtime.lovrabet.ai','/user/ak','https://daily-api.lovrabet.id','https://user.lovrabet.com','envPrefix','cli:lovrabet-runtime','https://runtime.lovrabet.id','716979fDOUsq','Lovrabet\x20User\x20Center','https://skills.lovrabet.id','lovrabet/lovrabet-cli','https://daily-runtime.lovrabet.com','SKIP_NPX_SKILLS','https://daily-runtime.lovrabet.id','3298008PdASil','293950lvOyEi'];a98_0xb041=function(){return _0x46e760;};return a98_0xb041();}export const PRODUCT_CONFIG={'cliBinName':a98_0x1465d2(0x14b),'cliDisplayName':a98_0x1465d2(0x148),'npmPackageName':'@lovrabet/lovrabet-cli','skillSource':a98_0x1465d2(0x142),'internalSkillSource':a98_0x1465d2(0x14d),'globalSkillName':'lovrabet','npmRegistryBaseUrl':a98_0x1465d2(0x132),'cliCdnBaseUrl':'https://g.lovrabet.com','envPrefix':a98_0x1465d2(0x14f),'legacyEnvPrefixes':[a98_0x1465d2(0x155)],'configFileNames':['.lovrabet.json'],'newConfigFileName':'.lovrabet.json','homeDirName':a98_0x1465d2(0x134),'logFileName':'.lovrabet-runtime.log','invokeSource':a98_0x1465d2(0x13d),'userCenterDisplayName':a98_0x1465d2(0x140),'skipNpxSkillsEnvSuffix':a98_0x1465d2(0x144),'regionDomains':{'cn':{'production':{'user':a98_0x1465d2(0x13b),'api':'https://api.lovrabet.com','runtime':a98_0x1465d2(0x12e),'skill':a98_0x1465d2(0x12f),'kb':a98_0x1465d2(0x12e)},'nonProduction':{'user':a98_0x1465d2(0x154),'api':a98_0x1465d2(0x151),'runtime':a98_0x1465d2(0x143),'skill':a98_0x1465d2(0x135),'kb':a98_0x1465d2(0x143)}},'id':{'production':{'user':a98_0x1465d2(0x130),'api':a98_0x1465d2(0x156),'runtime':a98_0x1465d2(0x13e),'skill':a98_0x1465d2(0x141),'kb':a98_0x1465d2(0x13e)},'nonProduction':{'user':a98_0x1465d2(0x136),'api':a98_0x1465d2(0x13a),'runtime':a98_0x1465d2(0x145),'skill':a98_0x1465d2(0x137),'kb':a98_0x1465d2(0x145)}},'global':{'production':{'user':a98_0x1465d2(0x152),'api':a98_0x1465d2(0x153),'runtime':a98_0x1465d2(0x138),'skill':'https://skills.lovrabet.ai','kb':a98_0x1465d2(0x138)},'nonProduction':{'user':'https://user-daily.lovrabet.ai','api':a98_0x1465d2(0x150),'runtime':'https://daily-runtime.lovrabet.ai','skill':a98_0x1465d2(0x133),'kb':a98_0x1465d2(0x14c)}}},'accessKeyCreatePath':a98_0x1465d2(0x139)};export function productEnvName(_0x41b132){const _0x3cf3e7=a98_0x1465d2;return PRODUCT_CONFIG[_0x3cf3e7(0x13c)]+'_'+_0x41b132;}export function productEnvNames(_0x2240c9){const _0x316f84=a98_0x1465d2;return[productEnvName(_0x2240c9),...PRODUCT_CONFIG[_0x316f84(0x12c)]['map'](_0x441739=>_0x441739+'_'+_0x2240c9)];}export function productEnv(_0x45f8cb){for(const _0x146b58 of productEnvNames(_0x45f8cb)){const _0xca19a=process.env[_0x146b58];if(_0xca19a!==undefined)return _0xca19a;}return undefined;}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a99_0x1c42(){const _0x50c243=['36234731cdrehb','indonesia','china','21mIkgxi','14iLdxhX','54BCjTAb','29590UwGTPy','4whrojo','912PDkbtH','132602IdvaWC','includes','1512312WriMIh','12MPvPNY','string','13030xsZkPW','270kgIEzT','2795529LtWisa','570580CenZsN'];a99_0x1c42=function(){return _0x50c243;};return a99_0x1c42();}(function(_0x4c5b2a,_0x19b22f){const _0x5ae4d0=a99_0x4a47,_0x12b3d0=_0x4c5b2a();while(!![]){try{const _0x1b722f=parseInt(_0x5ae4d0(0x99))/0x1*(-parseInt(_0x5ae4d0(0x9c))/0x2)+-parseInt(_0x5ae4d0(0xa0))/0x3*(parseInt(_0x5ae4d0(0xa9))/0x4)+parseInt(_0x5ae4d0(0x9e))/0x5*(-parseInt(_0x5ae4d0(0x9f))/0x6)+-parseInt(_0x5ae4d0(0xa5))/0x7*(parseInt(_0x5ae4d0(0x9b))/0x8)+parseInt(_0x5ae4d0(0xa7))/0x9*(parseInt(_0x5ae4d0(0xa1))/0xa)+-parseInt(_0x5ae4d0(0xa8))/0xb*(parseInt(_0x5ae4d0(0x98))/0xc)+parseInt(_0x5ae4d0(0xa2))/0xd*(parseInt(_0x5ae4d0(0xa6))/0xe);if(_0x1b722f===_0x19b22f)break;else _0x12b3d0['push'](_0x12b3d0['shift']());}catch(_0x3aeffc){_0x12b3d0['push'](_0x12b3d0['shift']());}}}(a99_0x1c42,0x7d549));export const LOVRABET_REGION_VALUES=['cn','id','global'];function a99_0x4a47(_0x3c8b5a,_0x307ce3){_0x3c8b5a=_0x3c8b5a-0x98;const _0x1c42be=a99_0x1c42();let _0x4a472d=_0x1c42be[_0x3c8b5a];return _0x4a472d;}export const ENABLED_LOVRABET_REGION_VALUES=['cn','id'];export const DEFAULT_LOVRABET_REGION='cn';export function isLovrabetRegion(_0x589609){const _0x5e8722=a99_0x4a47;return typeof _0x589609===_0x5e8722(0x9d)&&LOVRABET_REGION_VALUES[_0x5e8722(0x9a)](_0x589609);}export function isEnabledLovrabetRegion(_0x1a73b2){return typeof _0x1a73b2==='string'&&ENABLED_LOVRABET_REGION_VALUES['includes'](_0x1a73b2);}export function normalizeLovrabetRegion(_0x4b6da3){const _0x31a451=a99_0x4a47;if(_0x4b6da3===_0x31a451(0xa4))return'cn';if(_0x4b6da3===_0x31a451(0xa3))return'id';return isLovrabetRegion(_0x4b6da3)?_0x4b6da3:DEFAULT_LOVRABET_REGION;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a100_0x226a58=a100_0x2ef2;function a100_0x75e5(){const _0x3a833b=['8NhFAdS','7418187uuPgrO','read','2175220oJIdUA','12njqwla','486WrXdtu','2161775SUjeIW','21389196QpQnbG','1695480YsfdXi','905481BBMnEg','write','5wODEgf','11GJMzaJ','4363FVRiaF'];a100_0x75e5=function(){return _0x3a833b;};return a100_0x75e5();}(function(_0x53e714,_0x3121d5){const _0x967b04=a100_0x2ef2,_0x5ca988=_0x53e714();while(!![]){try{const _0x162df0=-parseInt(_0x967b04(0x1ae))/0x1*(-parseInt(_0x967b04(0x1b4))/0x2)+parseInt(_0x967b04(0x1b8))/0x3*(-parseInt(_0x967b04(0x1b3))/0x4)+parseInt(_0x967b04(0x1ac))/0x5*(-parseInt(_0x967b04(0x1b7))/0x6)+-parseInt(_0x967b04(0x1b5))/0x7+parseInt(_0x967b04(0x1af))/0x8*(-parseInt(_0x967b04(0x1b0))/0x9)+parseInt(_0x967b04(0x1b2))/0xa+-parseInt(_0x967b04(0x1ad))/0xb*(-parseInt(_0x967b04(0x1b6))/0xc);if(_0x162df0===_0x3121d5)break;else _0x5ca988['push'](_0x5ca988['shift']());}catch(_0x4b87fa){_0x5ca988['push'](_0x5ca988['shift']());}}}(a100_0x75e5,0xb46db));function a100_0x2ef2(_0x16c165,_0x51c85e){_0x16c165=_0x16c165-0x1ab;const _0x75e562=a100_0x75e5();let _0x2ef210=_0x75e562[_0x16c165];return _0x2ef210;}export const RISK_LEVEL_VALUES=[a100_0x226a58(0x1b1),a100_0x226a58(0x1ab),'high-risk-write'];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x195bca,_0x7c772e){const _0x3cb142=a101_0x7e4f,_0x356cf1=_0x195bca();while(!![]){try{const _0x7e68b4=parseInt(_0x3cb142(0xaf))/0x1*(parseInt(_0x3cb142(0xa5))/0x2)+parseInt(_0x3cb142(0xa8))/0x3*(parseInt(_0x3cb142(0xae))/0x4)+parseInt(_0x3cb142(0xa2))/0x5*(-parseInt(_0x3cb142(0xa9))/0x6)+-parseInt(_0x3cb142(0xad))/0x7+parseInt(_0x3cb142(0xa0))/0x8+-parseInt(_0x3cb142(0xac))/0x9*(parseInt(_0x3cb142(0xaa))/0xa)+-parseInt(_0x3cb142(0xa3))/0xb*(parseInt(_0x3cb142(0xa4))/0xc);if(_0x7e68b4===_0x7c772e)break;else _0x356cf1['push'](_0x356cf1['shift']());}catch(_0x48336f){_0x356cf1['push'](_0x356cf1['shift']());}}}(a101_0x4f63,0x72e41));import{PRODUCT_CONFIG}from'../constant/product.js';function a101_0x7e4f(_0x7b9814,_0x23c2a7){_0x7b9814=_0x7b9814-0xa0;const _0x4f63da=a101_0x4f63();let _0x7e4fd9=_0x4f63da[_0x7b9814];return _0x7e4fd9;}import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';export function getUserAccessKeyCreateUrl(_0x7a0e85=DEFAULT_LOVRABET_REGION){const _0x419f84=a101_0x7e4f,_0x366026=PRODUCT_CONFIG[_0x419f84(0xab)][_0x7a0e85][_0x419f84(0xa1)][_0x419f84(0xa6)];return''+_0x366026+PRODUCT_CONFIG[_0x419f84(0xa7)];}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();function a101_0x4f63(){const _0x59d6e0=['93281KidaOW','5907584joNrJC','production','5RSUxNQ','11sRwuGu','1391772HiXTgn','8kPxPej','user','accessKeyCreatePath','170043pVkkBT','373656YvFNDT','1118470uoosdm','regionDomains','72yLqqwL','1736826MPdfRo','48qJebad'];a101_0x4f63=function(){return _0x59d6e0;};return a101_0x4f63();}
|