@lovrabet/lovrabet-cli 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/artifact/index.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/config/definitions.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/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.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 -0
- package/lib/commands/skill/commands/install.js +1 -0
- package/lib/commands/skill/commands/list.js +1 -0
- package/lib/commands/skill/commands/push.js +1 -0
- package/lib/commands/skill/commands/validate.js +1 -0
- package/lib/commands/skill/flags.js +1 -0
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -0
- package/lib/commands/skill/scopes.js +1 -0
- package/lib/commands/skill/summary.js +1 -0
- 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/workspace/index.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/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/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/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -0
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -0
- package/lib/skills/runtime-skill-sync/hashing.js +1 -0
- package/lib/skills/runtime-skill-sync/links.js +1 -0
- package/lib/skills/runtime-skill-sync/list-local.js +1 -0
- package/lib/skills/runtime-skill-sync/local-files.js +1 -0
- package/lib/skills/runtime-skill-sync/materialize.js +1 -0
- package/lib/skills/runtime-skill-sync/metadata.js +1 -0
- package/lib/skills/runtime-skill-sync/paths.js +1 -0
- package/lib/skills/runtime-skill-sync/push.js +1 -0
- package/lib/skills/runtime-skill-sync/scopes.js +1 -0
- package/lib/skills/runtime-skill-sync/types.js +1 -0
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -0
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -0
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.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 +4 -1
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a55_0x5bd78c=a55_0x38b0;(function(_0x2d2160,_0x457ca9){const _0x47a824=a55_0x38b0,_0x457ec0=_0x2d2160();while(!![]){try{const _0x44ae22=parseInt(_0x47a824(0x1ca))/0x1+-parseInt(_0x47a824(0x1b4))/0x2+-parseInt(_0x47a824(0x1a6))/0x3*(parseInt(_0x47a824(0x1cf))/0x4)+parseInt(_0x47a824(0x1c6))/0x5+parseInt(_0x47a824(0x1b6))/0x6*(parseInt(_0x47a824(0x1bb))/0x7)+parseInt(_0x47a824(0x1d6))/0x8*(parseInt(_0x47a824(0x1ae))/0x9)+parseInt(_0x47a824(0x1e9))/0xa*(-parseInt(_0x47a824(0x1ce))/0xb);if(_0x44ae22===_0x457ca9)break;else _0x457ec0['push'](_0x457ec0['shift']());}catch(_0x4c8b45){_0x457ec0['push'](_0x457ec0['shift']());}}}(a55_0x59d3,0xa3756));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a55_0x5bd78c(0x1e6)];function a55_0x38b0(_0x2e9fdf,_0x1a4984){_0x2e9fdf=_0x2e9fdf-0x1a4;const _0x59d3cf=a55_0x59d3();let _0x38b0db=_0x59d3cf[_0x2e9fdf];return _0x38b0db;}export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x57749e){for(const _0x48911a of CONFIG_NAMES){const _0x27e651=resolve(_0x57749e,_0x48911a);if(existsSync(_0x27e651))return _0x27e651;}return undefined;}export function resolveWriteConfigPath(_0x5c4964){const _0x2b64ac=a55_0x5bd78c,_0x31c2ad=_0x5c4964===_0x2b64ac(0x1c3)?process[_0x2b64ac(0x1d5)]():homedir(),_0x52c852=resolveConfigPath(_0x31c2ad);return _0x52c852??resolve(_0x31c2ad,NEW_CONFIG_NAME);}export function readConfigFile(_0x383dcf){const _0x3c4e69=a55_0x5bd78c;try{if(existsSync(_0x383dcf)){const _0x12b757=readFileSync(_0x383dcf,{'encoding':_0x3c4e69(0x1b3)});if(_0x12b757){const _0x25d6d1=JSON[_0x3c4e69(0x1ab)](_0x12b757);return migrateOnlineEnv(_0x383dcf,_0x25d6d1),_0x25d6d1;}}}catch{}return{};}function migrateOnlineEnv(_0x21b49a,_0x121e49){const _0x41aacd=a55_0x5bd78c;let _0x40e6ba=![];_0x121e49[_0x41aacd(0x1a8)]===_0x41aacd(0x1ac)&&(_0x121e49[_0x41aacd(0x1a8)]=_0x41aacd(0x1e4),_0x40e6ba=!![]);if(_0x121e49[_0x41aacd(0x1a9)]&&typeof _0x121e49[_0x41aacd(0x1a9)]===_0x41aacd(0x1b1))for(const _0x5f042b of Object[_0x41aacd(0x1e3)](_0x121e49[_0x41aacd(0x1a9)])){_0x5f042b&&_0x5f042b[_0x41aacd(0x1a8)]==='online'&&(_0x5f042b['env']=_0x41aacd(0x1e4),_0x40e6ba=!![]);}if(_0x40e6ba)try{writeConfigFile(_0x21b49a,_0x121e49);}catch{}}export function writeConfigFile(_0x2c1534,_0x657183){const _0x2a0edc=a55_0x5bd78c,_0x4ec266=dirname(_0x2c1534);!existsSync(_0x4ec266)&&mkdirSync(_0x4ec266,{'recursive':!![]});const _0x2b580d=_0x2c1534+_0x2a0edc(0x1bf);try{writeFileSync(_0x2b580d,JSON[_0x2a0edc(0x1de)](_0x657183,null,0x2)+'\x0a',{'encoding':_0x2a0edc(0x1b3),'mode':0x180});try{renameSync(_0x2b580d,_0x2c1534);}catch(_0x539f7b){if(_0x539f7b[_0x2a0edc(0x1dd)]==='EPERM'||_0x539f7b[_0x2a0edc(0x1dd)]===_0x2a0edc(0x1af)||_0x539f7b[_0x2a0edc(0x1dd)]===_0x2a0edc(0x1c9)){writeFileSync(_0x2c1534,JSON[_0x2a0edc(0x1de)](_0x657183,null,0x2)+'\x0a',{'encoding':_0x2a0edc(0x1b3)});try{unlinkSync(_0x2b580d);}catch{}}else throw _0x539f7b;}}catch(_0x53ac6c){try{unlinkSync(_0x2b580d);}catch{}throw _0x53ac6c;}}export function isNonInteractiveMode(_0x5b22a8){const _0x2c272b=a55_0x5bd78c;return!!(_0x5b22a8['nonInteractive']||_0x5b22a8['ci']||productEnvNames('CI')[_0x2c272b(0x1e1)](_0x2a62dd=>process.env[_0x2a62dd]==='true')||process.env.CI==='true'||!process[_0x2c272b(0x1c2)][_0x2c272b(0x1cc)]||!isStdinRawModeSupported());}function a55_0x59d3(){const _0x89c8ca=['some','APP','values','production','error','configFileNames','setRawCommand','authRequired','8330PLXJMr','raw','setLogPath','stdin','appcode','39EfatlJ','setRawMode','env','apps','top-level','parse','online','write','2133UQCcZN','EXDEV','isRaw','object','FORMAT','utf8','2479658DfZwwb','skillHubDomain','339114bAdyXV','riskLevel','trim','local-alias','join','105xnbCSW','string','defaultApp','ENV','.tmp','read','ACCESS_KEY','stdout','project','inherit','missing','2845605CDhHVB','./constant/domain.js','projectConfig','EACCES','1192524OLBNxh','accessKey','isTTY','empty','18359nUKmqI','80708PvvoRc','APPCODE','global','format','VERBOSE','apiDomain','cwd','32152cIhNoC','development','pageSize','true','userDomain','locale','host','code','stringify','app','runtimeDomain'];a55_0x59d3=function(){return _0x89c8ca;};return a55_0x59d3();}function isStdinRawModeSupported(){const _0x34c9f3=a55_0x5bd78c;if(!process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1cc)])return![];try{const _0x5ac4c0=process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1b0)];return process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1a7)](!![]),process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1a7)](_0x5ac4c0??![]),!![];}catch{return![];}}export async function createContext(_0x3f0a5b){const _0x44294a=a55_0x5bd78c,_0x5cb873=readRawConfig(),_0x423527=buildConfig(_0x5cb873,_0x3f0a5b);await initGlobalEnvironment(_0x423527);const {getUserDomain:_0x236f4d,getApiDomain:_0x257e92}=await import(_0x44294a(0x1c7)),_0x4180a5={'apiDomain':_0x257e92(),'userDomain':_0x236f4d()},_0xfa8401=await buildAuth(_0x423527);logger[_0x44294a(0x1eb)](process['cwd']());const _0x327b8c=(CLI_BIN_NAME+'\x20'+process['argv']['slice'](0x2)[_0x44294a(0x1ba)]('\x20'))[_0x44294a(0x1b8)]();logger[_0x44294a(0x1e7)](_0x327b8c);const _0x3f9eb8=isNonInteractiveMode(_0x3f0a5b);return{'config':_0x423527,'auth':_0xfa8401,'logger':logger,'env':_0x4180a5,'nonInteractive':_0x3f9eb8};}export function buildConfigFromFlags(_0x2eb9df){return buildConfig(readRawConfig(),_0x2eb9df);}export function getLocalAppAliases(_0x283332){const _0x1a0333=a55_0x5bd78c;return _0x283332[_0x1a0333(0x1a9)]&&typeof _0x283332[_0x1a0333(0x1a9)]===_0x1a0333(0x1b1)?_0x283332[_0x1a0333(0x1a9)]:{};}export function resolveLocalAppAliasCode(_0x31f23a,_0x169eae){const _0x5f43d9=a55_0x5bd78c;if(!_0x169eae)return undefined;const _0xe01e5b=getLocalAppAliases(_0x31f23a)[_0x169eae],_0x3de728=_0xe01e5b?.['appcode'];return typeof _0x3de728===_0x5f43d9(0x1bc)&&_0x3de728['trim']()?_0x3de728['trim']():undefined;}export function readAppCodeFromConfig(){const _0x3737fc=a55_0x5bd78c,_0x4ff1d6=readRawConfig(),_0x197ed7=_0x4ff1d6[_0x3737fc(0x1a5)]??_0x4ff1d6['app'];if(typeof _0x197ed7===_0x3737fc(0x1bc)&&_0x197ed7[_0x3737fc(0x1b8)]())return _0x197ed7[_0x3737fc(0x1b8)]();const _0xf4336b=resolveLocalAppAliasCode(_0x4ff1d6,typeof _0x4ff1d6[_0x3737fc(0x1bd)]===_0x3737fc(0x1bc)?_0x4ff1d6[_0x3737fc(0x1bd)]:undefined);if(_0xf4336b)return _0xf4336b;const _0xd86128=normalizeEnv(String(_0x4ff1d6['env']||_0x3737fc(0x1e4))),_0x3091aa=isDaily(_0xd86128)?'daily':isDev(_0xd86128)?_0x3737fc(0x1d7):'production',_0x10eb9e=resolveCachedAppCode(typeof _0x4ff1d6[_0x3737fc(0x1bd)]===_0x3737fc(0x1bc)?_0x4ff1d6[_0x3737fc(0x1bd)]:undefined,_0x3091aa,typeof _0x4ff1d6['accessKey']===_0x3737fc(0x1bc)?_0x4ff1d6[_0x3737fc(0x1cb)]:undefined);if(_0x10eb9e)return _0x10eb9e;const _0x5baab2=Object[_0x3737fc(0x1e3)](getLocalAppAliases(_0x4ff1d6))['find'](_0x4ca6ec=>_0x4ca6ec?.[_0x3737fc(0x1a5)]);return typeof _0x5baab2?.[_0x3737fc(0x1a5)]===_0x3737fc(0x1bc)&&_0x5baab2[_0x3737fc(0x1a5)]['trim']()?_0x5baab2['appcode'][_0x3737fc(0x1b8)]():undefined;}export function readScopedConfig(_0x3bec9a){const _0x472c0e=a55_0x5bd78c,_0x127178=_0x3bec9a[_0x472c0e(0x1d1)]?_0x472c0e(0x1d1):_0x472c0e(0x1c3);return readConfigFile(resolveWriteConfigPath(_0x127178));}export function writeScopedConfig(_0x4d2550,_0x5847e6){const _0x24b6f9=a55_0x5bd78c,_0x15b8e7=_0x5847e6[_0x24b6f9(0x1d1)]?_0x24b6f9(0x1d1):_0x24b6f9(0x1c3);writeConfigFile(resolveWriteConfigPath(_0x15b8e7),_0x4d2550);}export async function initGlobalEnvironment(_0x53caec){const _0xbec364=a55_0x5bd78c,{initEnv:_0x110c31}=await import('./constant/env.js');_0x110c31(_0x53caec[_0xbec364(0x1a8)]);const {initDomains:_0x2199ba}=await import(_0xbec364(0x1c7));_0x2199ba({'apiDomain':_0x53caec['raw'][_0xbec364(0x1d4)]||_0x53caec[_0xbec364(0x1ea)][_0xbec364(0x1dc)]||undefined,'userDomain':_0x53caec[_0xbec364(0x1ea)][_0xbec364(0x1da)]||undefined,'runtimeDomain':_0x53caec['raw'][_0xbec364(0x1e0)]||undefined,'skillHubDomain':_0x53caec[_0xbec364(0x1ea)][_0xbec364(0x1b5)]||undefined});}export function getProjectConfigPath(){const _0x5e5384=a55_0x5bd78c;return resolveConfigPath(process[_0x5e5384(0x1d5)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x311174){const _0x15b770=a55_0x5bd78c;if(!existsSync(_0x311174))return{'status':_0x15b770(0x1c5)};try{const _0x2c85e7=readFileSync(_0x311174,{'encoding':'utf8'});if(!_0x2c85e7?.[_0x15b770(0x1b8)]())return{'status':_0x15b770(0x1cd)};const _0x2e08d9=JSON[_0x15b770(0x1ab)](_0x2c85e7);return{'status':'ok','data':_0x2e08d9};}catch(_0x435e57){return{'status':_0x15b770(0x1e5),'message':_0x435e57 instanceof Error?_0x435e57['message']:String(_0x435e57)};}}export function loadRawConfigLayers(_0x60bd4a){const _0x246201=a55_0x5bd78c;let _0x3d2a5e={},_0x6a692={},_0x108ef1,_0x48ed78;try{_0x108ef1=resolveConfigPath(homedir());if(_0x108ef1){const _0x9f1175=readFileSync(_0x108ef1,{'encoding':'utf8'});if(_0x9f1175)_0x3d2a5e=JSON['parse'](_0x9f1175);}}catch{}try{const _0x21f366=_0x60bd4a||process[_0x246201(0x1d5)]();_0x48ed78=resolveConfigPath(_0x21f366);if(_0x48ed78){const _0x3963d0=readFileSync(_0x48ed78,{'encoding':'utf8'});if(_0x3963d0)_0x6a692=JSON[_0x246201(0x1ab)](_0x3963d0);}}catch{}return{'globalPath':_0x108ef1,'projectPath':_0x48ed78,'globalConfig':_0x3d2a5e,'projectConfig':_0x6a692};}function mergeRawConfigLayers(_0x3b10f7){const _0x5d7f21=a55_0x5bd78c,{globalConfig:_0xd4c498,projectConfig:_0x3df642}=_0x3b10f7;if(_0x3df642['inherit']===![]){const _0x761b95={..._0x3df642};return delete _0x761b95['inherit'],_0x761b95;}const _0xc1c185={..._0xd4c498,..._0x3df642};if(_0x5d7f21(0x1bd)in _0x3df642)_0xc1c185[_0x5d7f21(0x1bd)]=_0x3df642['defaultApp'];else _0xd4c498['defaultApp']&&(_0xc1c185[_0x5d7f21(0x1bd)]=_0xd4c498[_0x5d7f21(0x1bd)]);return _0xc1c185;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5f7a43){return mergeRawConfigLayers(loadRawConfigLayers(_0x5f7a43));}export function readRawConfigWithLayers(_0xd24261){const _0x4edf22=loadRawConfigLayers(_0xd24261);return{'config':mergeRawConfigLayers(_0x4edf22),'layers':_0x4edf22};}export function resolveDefaultAppSource(_0x308636){const _0x14ec0b=a55_0x5bd78c;if(_0x14ec0b(0x1bd)in _0x308636['projectConfig'])return'project';if(_0x308636[_0x14ec0b(0x1c8)][_0x14ec0b(0x1c4)]===![])return null;if(_0x308636['globalConfig'][_0x14ec0b(0x1bd)])return _0x14ec0b(0x1d1);return null;}function buildConfig(_0x20f903,_0x1f5880){const _0x17c6aa=a55_0x5bd78c,_0x561969=_0x20f903['defaultApp']||undefined,_0x4f417d=_0x1f5880['app']||env(_0x17c6aa(0x1e2))||undefined,_0x39c038=_0x4f417d||_0x561969||undefined,_0x519704=env(_0x17c6aa(0x1c1))||_0x20f903[_0x17c6aa(0x1cb)]||undefined,_0x4fb5a7=_0x1f5880[_0x17c6aa(0x1a8)]||env(_0x17c6aa(0x1be))||_0x20f903['env']||DEFAULT_CONFIG_VALUES[_0x17c6aa(0x1a8)],_0x22189a=normalizeEnv(String(_0x4fb5a7)),_0x3643e1=isDaily(_0x22189a)?'daily':isDev(_0x22189a)?_0x17c6aa(0x1d7):'production',_0xf4212c=resolveLocalAppAliasCode(_0x20f903,_0x39c038),_0x4cd0d6=resolveCachedAppCode(_0x39c038,_0x3643e1,_0x519704),_0x5704e0=typeof _0x1f5880[_0x17c6aa(0x1a5)]===_0x17c6aa(0x1bc)?_0x1f5880[_0x17c6aa(0x1a5)]:undefined,_0xd89bde=env(_0x17c6aa(0x1d0)),_0x2a7c46=_0x4f417d?undefined:_0x20f903[_0x17c6aa(0x1a5)]||_0x20f903[_0x17c6aa(0x1df)]||undefined,_0x42b288=_0x5704e0||_0xd89bde||_0xf4212c||_0x4cd0d6||_0x2a7c46||undefined,_0x22bcc3=_0x5704e0?'explicit':_0xd89bde?_0x17c6aa(0x1a8):_0xf4212c?_0x17c6aa(0x1b9):_0x4cd0d6?'cache':_0x2a7c46?_0x17c6aa(0x1aa):undefined,_0x28bfc5=_0x20f903[_0x17c6aa(0x1db)]||DEFAULT_CONFIG_VALUES[_0x17c6aa(0x1db)],_0x49b2eb=undefined,_0x454fa4=_0x1f5880[_0x17c6aa(0x1d2)]||env(_0x17c6aa(0x1b2))||_0x20f903['format'],_0x285ffb=normalizeLegacyOutputFormat(_0x454fa4),_0x64f038=env('PAGE_SIZE')||_0x20f903[_0x17c6aa(0x1d8)],_0x2d46ae=_0x64f038?Number(_0x64f038)||undefined:undefined,_0x50abc4=_0x20f903[_0x17c6aa(0x1b7)]||_0x20f903['maxRisk'],_0x74166c=_0x50abc4===_0x17c6aa(0x1c0)||_0x50abc4===_0x17c6aa(0x1ad)||_0x50abc4==='high-risk-write'?_0x50abc4:DEFAULT_CONFIG_VALUES['riskLevel'],_0x15c2ba=env(_0x17c6aa(0x1d3)),_0x2067c3=_0x15c2ba==='1'||_0x15c2ba===_0x17c6aa(0x1d9);return{'appCode':typeof _0x42b288===_0x17c6aa(0x1bc)&&_0x42b288['trim']()?_0x42b288[_0x17c6aa(0x1b8)]():undefined,'appCodeSource':_0x22bcc3,'env':_0x3643e1,'locale':_0x28bfc5,'cookie':_0x49b2eb,'accessKey':_0x519704,'format':_0x285ffb,'pageSize':_0x2d46ae,'riskLevel':_0x74166c,'verbose':_0x2067c3,'defaultApp':_0x561969,'currentApp':typeof _0x39c038===_0x17c6aa(0x1bc)?_0x39c038:undefined,'raw':_0x20f903};}function env(_0x2a2734){return productEnv(_0x2a2734);}async function buildAuth(_0x105e25){const _0xf31c58=a55_0x5bd78c,_0x54e32a='',_0x5a11cd=!!_0x105e25[_0xf31c58(0x1cb)];return{'cookie':_0x54e32a,'isLoggedIn':_0x5a11cd,async 'getOrLogin'(){const _0x1afc56=_0xf31c58;if(_0x5a11cd)return _0x54e32a;throw CliErrors[_0x1afc56(0x1e8)]();}};}
|
|
1
|
+
const a64_0x26ce9a=a64_0xd050;(function(_0x35012c,_0x295499){const _0x383f39=a64_0xd050,_0x32e642=_0x35012c();while(!![]){try{const _0x34acfe=parseInt(_0x383f39(0xcd))/0x1*(parseInt(_0x383f39(0xce))/0x2)+-parseInt(_0x383f39(0xde))/0x3+-parseInt(_0x383f39(0xe3))/0x4+-parseInt(_0x383f39(0xee))/0x5*(parseInt(_0x383f39(0xf5))/0x6)+-parseInt(_0x383f39(0xdf))/0x7+parseInt(_0x383f39(0x101))/0x8+parseInt(_0x383f39(0xca))/0x9;if(_0x34acfe===_0x295499)break;else _0x32e642['push'](_0x32e642['shift']());}catch(_0x34697d){_0x32e642['push'](_0x32e642['shift']());}}}(a64_0xcf37,0x868d2));function a64_0xcf37(){const _0x20f86a=['utf8','18cKtcIl','EPERM','global','authRequired','APP','userDomain','slice','accessKey','env','project','cache','projectConfig','2586952KUjJWU','newConfigFileName','./constant/env.js','object','FORMAT','find','inherit','raw','code','globalConfig','riskLevel','VERBOSE','configFileNames','14981985PGdoPt','nonInteractive','isRaw','1xhkXhx','404940huPNKH','join','parse','daily','apiDomain','locale','host','isTTY','write','string','appcode','high-risk-write','production','maxRisk','defaultApp','APPCODE','1387356ESjAIL','4480392bsYPHz','development','missing','cwd','1419792OHqYmv','setLogPath','.tmp','setRawMode','explicit','error','stringify','apps','online','trim','values','303210dIWitg','format','some','app','stdin','skillHubDomain'];a64_0xcf37=function(){return _0x20f86a;};return a64_0xcf37();}import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a64_0x26ce9a(0x10d)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a64_0x26ce9a(0x102)];function resolveConfigPath(_0x2e897d){for(const _0x4303f1 of CONFIG_NAMES){const _0x3346a5=resolve(_0x2e897d,_0x4303f1);if(existsSync(_0x3346a5))return _0x3346a5;}return undefined;}export function resolveWriteConfigPath(_0x47aad3){const _0x6ec644=a64_0x26ce9a,_0x4a6136=_0x47aad3===_0x6ec644(0xfe)?process[_0x6ec644(0xe2)]():homedir(),_0x5a6af0=resolveConfigPath(_0x4a6136);return _0x5a6af0??resolve(_0x4a6136,NEW_CONFIG_NAME);}export function readConfigFile(_0x512420){const _0x5dc17b=a64_0x26ce9a;try{if(existsSync(_0x512420)){const _0x5e5e45=readFileSync(_0x512420,{'encoding':_0x5dc17b(0xf4)});if(_0x5e5e45){const _0x4eb2c5=JSON[_0x5dc17b(0xd0)](_0x5e5e45);return migrateOnlineEnv(_0x512420,_0x4eb2c5),_0x4eb2c5;}}}catch{}return{};}function migrateOnlineEnv(_0x19d5e2,_0xd80897){const _0x3f5a7d=a64_0x26ce9a;let _0x56646b=![];_0xd80897[_0x3f5a7d(0xfd)]===_0x3f5a7d(0xeb)&&(_0xd80897['env']='production',_0x56646b=!![]);if(_0xd80897[_0x3f5a7d(0xea)]&&typeof _0xd80897[_0x3f5a7d(0xea)]==='object')for(const _0x319610 of Object[_0x3f5a7d(0xed)](_0xd80897[_0x3f5a7d(0xea)])){_0x319610&&_0x319610['env']==='online'&&(_0x319610[_0x3f5a7d(0xfd)]=_0x3f5a7d(0xda),_0x56646b=!![]);}if(_0x56646b)try{writeConfigFile(_0x19d5e2,_0xd80897);}catch{}}export function writeConfigFile(_0x2398e2,_0x264b11){const _0x933d6a=a64_0x26ce9a,_0x194f59=dirname(_0x2398e2);!existsSync(_0x194f59)&&mkdirSync(_0x194f59,{'recursive':!![]});const _0x31c915=_0x2398e2+_0x933d6a(0xe5);try{writeFileSync(_0x31c915,JSON[_0x933d6a(0xe9)](_0x264b11,null,0x2)+'\x0a',{'encoding':_0x933d6a(0xf4),'mode':0x180});try{renameSync(_0x31c915,_0x2398e2);}catch(_0x185a86){if(_0x185a86[_0x933d6a(0x109)]===_0x933d6a(0xf6)||_0x185a86['code']==='EXDEV'||_0x185a86[_0x933d6a(0x109)]==='EACCES'){writeFileSync(_0x2398e2,JSON['stringify'](_0x264b11,null,0x2)+'\x0a',{'encoding':_0x933d6a(0xf4)});try{unlinkSync(_0x31c915);}catch{}}else throw _0x185a86;}}catch(_0x4aaf06){try{unlinkSync(_0x31c915);}catch{}throw _0x4aaf06;}}export function isNonInteractiveMode(_0x3a339e){const _0x9979c2=a64_0x26ce9a;return!!(_0x3a339e[_0x9979c2(0xcb)]||_0x3a339e['ci']||productEnvNames('CI')[_0x9979c2(0xf0)](_0x59d7a4=>process.env[_0x59d7a4]==='true')||process.env.CI==='true'||!process['stdout']['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1a95d1=a64_0x26ce9a;if(!process[_0x1a95d1(0xf2)][_0x1a95d1(0xd5)])return![];try{const _0x19a9a5=process[_0x1a95d1(0xf2)][_0x1a95d1(0xcc)];return process[_0x1a95d1(0xf2)]['setRawMode'](!![]),process[_0x1a95d1(0xf2)][_0x1a95d1(0xe6)](_0x19a9a5??![]),!![];}catch{return![];}}function a64_0xd050(_0x3f919b,_0x5a3175){_0x3f919b=_0x3f919b-0xca;const _0xcf37e5=a64_0xcf37();let _0xd0508a=_0xcf37e5[_0x3f919b];return _0xd0508a;}export async function createContext(_0x3ed049){const _0x2efc66=a64_0x26ce9a,_0x3f5b91=readRawConfig(),_0x2c4148=buildConfig(_0x3f5b91,_0x3ed049);await initGlobalEnvironment(_0x2c4148);const {getUserDomain:_0x23ddcc,getApiDomain:_0x38fa31}=await import('./constant/domain.js'),_0x5c7a92={'apiDomain':_0x38fa31(),'userDomain':_0x23ddcc()},_0x5d281d=await buildAuth(_0x2c4148);logger[_0x2efc66(0xe4)](process['cwd']());const _0x30cf76=(CLI_BIN_NAME+'\x20'+process['argv'][_0x2efc66(0xfb)](0x2)[_0x2efc66(0xcf)]('\x20'))[_0x2efc66(0xec)]();logger['setRawCommand'](_0x30cf76);const _0xb9195b=isNonInteractiveMode(_0x3ed049);return{'config':_0x2c4148,'auth':_0x5d281d,'logger':logger,'env':_0x5c7a92,'nonInteractive':_0xb9195b};}export function buildConfigFromFlags(_0x3820fe){return buildConfig(readRawConfig(),_0x3820fe);}export function getLocalAppAliases(_0x271fbd){const _0x458b26=a64_0x26ce9a;return _0x271fbd[_0x458b26(0xea)]&&typeof _0x271fbd[_0x458b26(0xea)]===_0x458b26(0x104)?_0x271fbd['apps']:{};}export function resolveLocalAppAliasCode(_0x2649c3,_0x4dcdd0){const _0x392365=a64_0x26ce9a;if(!_0x4dcdd0)return undefined;const _0x3af41e=getLocalAppAliases(_0x2649c3)[_0x4dcdd0],_0x386c2c=_0x3af41e?.[_0x392365(0xd8)];return typeof _0x386c2c===_0x392365(0xd7)&&_0x386c2c['trim']()?_0x386c2c['trim']():undefined;}export function readAppCodeFromConfig(){const _0xbe19be=a64_0x26ce9a,_0x4df65e=readRawConfig(),_0x326f3f=_0x4df65e[_0xbe19be(0xd8)]??_0x4df65e[_0xbe19be(0xf1)];if(typeof _0x326f3f===_0xbe19be(0xd7)&&_0x326f3f[_0xbe19be(0xec)]())return _0x326f3f[_0xbe19be(0xec)]();const _0x1d05df=resolveLocalAppAliasCode(_0x4df65e,typeof _0x4df65e[_0xbe19be(0xdc)]===_0xbe19be(0xd7)?_0x4df65e['defaultApp']:undefined);if(_0x1d05df)return _0x1d05df;const _0x36c816=normalizeEnv(String(_0x4df65e['env']||_0xbe19be(0xda))),_0x57ccbf=isDaily(_0x36c816)?_0xbe19be(0xd1):isDev(_0x36c816)?'development':'production',_0x120167=resolveCachedAppCode(typeof _0x4df65e['defaultApp']===_0xbe19be(0xd7)?_0x4df65e[_0xbe19be(0xdc)]:undefined,_0x57ccbf,typeof _0x4df65e[_0xbe19be(0xfc)]===_0xbe19be(0xd7)?_0x4df65e['accessKey']:undefined);if(_0x120167)return _0x120167;const _0x574229=Object[_0xbe19be(0xed)](getLocalAppAliases(_0x4df65e))[_0xbe19be(0x106)](_0x3c3457=>_0x3c3457?.[_0xbe19be(0xd8)]);return typeof _0x574229?.[_0xbe19be(0xd8)]==='string'&&_0x574229[_0xbe19be(0xd8)][_0xbe19be(0xec)]()?_0x574229[_0xbe19be(0xd8)][_0xbe19be(0xec)]():undefined;}export function readScopedConfig(_0x52fb07){const _0x4c7896=a64_0x26ce9a,_0x12f962=_0x52fb07[_0x4c7896(0xf7)]?_0x4c7896(0xf7):'project';return readConfigFile(resolveWriteConfigPath(_0x12f962));}export function writeScopedConfig(_0x4493f8,_0x477d45){const _0x2f917d=_0x477d45['global']?'global':'project';writeConfigFile(resolveWriteConfigPath(_0x2f917d),_0x4493f8);}export async function initGlobalEnvironment(_0x14bcb9){const _0x13c59f=a64_0x26ce9a,{initEnv:_0x10a7ca}=await import(_0x13c59f(0x103));_0x10a7ca(_0x14bcb9[_0x13c59f(0xfd)]);const {initDomains:_0x2718d3}=await import('./constant/domain.js');_0x2718d3({'apiDomain':_0x14bcb9[_0x13c59f(0x108)][_0x13c59f(0xd2)]||_0x14bcb9[_0x13c59f(0x108)][_0x13c59f(0xd4)]||undefined,'userDomain':_0x14bcb9[_0x13c59f(0x108)][_0x13c59f(0xfa)]||undefined,'runtimeDomain':_0x14bcb9[_0x13c59f(0x108)]['runtimeDomain']||undefined,'skillHubDomain':_0x14bcb9[_0x13c59f(0x108)][_0x13c59f(0xf3)]||undefined});}export function getProjectConfigPath(){const _0x61083f=a64_0x26ce9a;return resolveConfigPath(process[_0x61083f(0xe2)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x4f2aa4){const _0x407282=a64_0x26ce9a;if(!existsSync(_0x4f2aa4))return{'status':_0x407282(0xe1)};try{const _0x4bc8ea=readFileSync(_0x4f2aa4,{'encoding':'utf8'});if(!_0x4bc8ea?.['trim']())return{'status':'empty'};const _0x45dec9=JSON[_0x407282(0xd0)](_0x4bc8ea);return{'status':'ok','data':_0x45dec9};}catch(_0x12f7bc){return{'status':_0x407282(0xe8),'message':_0x12f7bc instanceof Error?_0x12f7bc['message']:String(_0x12f7bc)};}}export function loadRawConfigLayers(_0x363300){const _0x430017=a64_0x26ce9a;let _0x33a1b5={},_0x44077a={},_0x58f286,_0x47b2da;try{_0x58f286=resolveConfigPath(homedir());if(_0x58f286){const _0x549408=readFileSync(_0x58f286,{'encoding':_0x430017(0xf4)});if(_0x549408)_0x33a1b5=JSON[_0x430017(0xd0)](_0x549408);}}catch{}try{const _0x4038f0=_0x363300||process[_0x430017(0xe2)]();_0x47b2da=resolveConfigPath(_0x4038f0);if(_0x47b2da){const _0x15447b=readFileSync(_0x47b2da,{'encoding':_0x430017(0xf4)});if(_0x15447b)_0x44077a=JSON[_0x430017(0xd0)](_0x15447b);}}catch{}return{'globalPath':_0x58f286,'projectPath':_0x47b2da,'globalConfig':_0x33a1b5,'projectConfig':_0x44077a};}function mergeRawConfigLayers(_0x5c0858){const _0x69c47c=a64_0x26ce9a,{globalConfig:_0x3b4938,projectConfig:_0x317e95}=_0x5c0858;if(_0x317e95['inherit']===![]){const _0x4e36aa={..._0x317e95};return delete _0x4e36aa[_0x69c47c(0x107)],_0x4e36aa;}const _0x3b9b16={..._0x3b4938,..._0x317e95};if(_0x69c47c(0xdc)in _0x317e95)_0x3b9b16[_0x69c47c(0xdc)]=_0x317e95[_0x69c47c(0xdc)];else _0x3b4938[_0x69c47c(0xdc)]&&(_0x3b9b16[_0x69c47c(0xdc)]=_0x3b4938[_0x69c47c(0xdc)]);return _0x3b9b16;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x4e0b8e){return mergeRawConfigLayers(loadRawConfigLayers(_0x4e0b8e));}export function readRawConfigWithLayers(_0x209395){const _0x414193=loadRawConfigLayers(_0x209395);return{'config':mergeRawConfigLayers(_0x414193),'layers':_0x414193};}export function resolveDefaultAppSource(_0x160d5c){const _0x48467a=a64_0x26ce9a;if(_0x48467a(0xdc)in _0x160d5c[_0x48467a(0x100)])return'project';if(_0x160d5c[_0x48467a(0x100)][_0x48467a(0x107)]===![])return null;if(_0x160d5c[_0x48467a(0x10a)][_0x48467a(0xdc)])return _0x48467a(0xf7);return null;}function buildConfig(_0x42e9c9,_0x3fcfa4){const _0x174d79=a64_0x26ce9a,_0x1b541b=_0x42e9c9[_0x174d79(0xdc)]||undefined,_0x36ea24=_0x3fcfa4['app']||env(_0x174d79(0xf9))||undefined,_0x50a5bf=_0x36ea24||_0x1b541b||undefined,_0x29cb61=env('ACCESS_KEY')||_0x42e9c9[_0x174d79(0xfc)]||undefined,_0x4a95c1=_0x3fcfa4[_0x174d79(0xfd)]||env('ENV')||_0x42e9c9[_0x174d79(0xfd)]||DEFAULT_CONFIG_VALUES[_0x174d79(0xfd)],_0x460dc3=normalizeEnv(String(_0x4a95c1)),_0x28cb49=isDaily(_0x460dc3)?_0x174d79(0xd1):isDev(_0x460dc3)?_0x174d79(0xe0):_0x174d79(0xda),_0x48a74a=resolveLocalAppAliasCode(_0x42e9c9,_0x50a5bf),_0x259485=resolveCachedAppCode(_0x50a5bf,_0x28cb49,_0x29cb61),_0x5a57a5=typeof _0x3fcfa4[_0x174d79(0xd8)]===_0x174d79(0xd7)?_0x3fcfa4[_0x174d79(0xd8)]:undefined,_0xdd4966=env(_0x174d79(0xdd)),_0x2052aa=_0x36ea24?undefined:_0x42e9c9[_0x174d79(0xd8)]||_0x42e9c9[_0x174d79(0xf1)]||undefined,_0x460861=_0x5a57a5||_0xdd4966||_0x48a74a||_0x259485||_0x2052aa||undefined,_0xdc0b5f=_0x5a57a5?_0x174d79(0xe7):_0xdd4966?_0x174d79(0xfd):_0x48a74a?'local-alias':_0x259485?_0x174d79(0xff):_0x2052aa?'top-level':undefined,_0x17d1fd=_0x42e9c9[_0x174d79(0xd3)]||DEFAULT_CONFIG_VALUES[_0x174d79(0xd3)],_0x316395=undefined,_0x248340=_0x3fcfa4[_0x174d79(0xef)]||env(_0x174d79(0x105))||_0x42e9c9[_0x174d79(0xef)],_0x1c8657=normalizeLegacyOutputFormat(_0x248340),_0x627df6=env('PAGE_SIZE')||_0x42e9c9['pageSize'],_0x5d17b2=_0x627df6?Number(_0x627df6)||undefined:undefined,_0x50ffa7=_0x42e9c9[_0x174d79(0x10b)]||_0x42e9c9[_0x174d79(0xdb)],_0x3af269=_0x50ffa7==='read'||_0x50ffa7===_0x174d79(0xd6)||_0x50ffa7===_0x174d79(0xd9)?_0x50ffa7:DEFAULT_CONFIG_VALUES['riskLevel'],_0x995cc4=env(_0x174d79(0x10c)),_0x5d5edc=_0x995cc4==='1'||_0x995cc4==='true';return{'appCode':typeof _0x460861===_0x174d79(0xd7)&&_0x460861[_0x174d79(0xec)]()?_0x460861[_0x174d79(0xec)]():undefined,'appCodeSource':_0xdc0b5f,'env':_0x28cb49,'locale':_0x17d1fd,'cookie':_0x316395,'accessKey':_0x29cb61,'format':_0x1c8657,'pageSize':_0x5d17b2,'riskLevel':_0x3af269,'verbose':_0x5d5edc,'defaultApp':_0x1b541b,'currentApp':typeof _0x50a5bf===_0x174d79(0xd7)?_0x50a5bf:undefined,'raw':_0x42e9c9};}function env(_0x4f7ed5){return productEnv(_0x4f7ed5);}async function buildAuth(_0x5caef5){const _0x2e2c39=a64_0x26ce9a,_0x15c4a5='',_0x37542d=!!_0x5caef5[_0x2e2c39(0xfc)];return{'cookie':_0x15c4a5,'isLoggedIn':_0x37542d,async 'getOrLogin'(){const _0x561ce9=_0x2e2c39;if(_0x37542d)return _0x15c4a5;throw CliErrors[_0x561ce9(0xf8)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a56_0xbb16(){const _0x54e8d6=['Configure\x20accessKey\x20in\x20','sqlCode','favorite','1hVxSyQ','/client/knowledge-base/search','Toolbox\x20API\x20error:\x20','values','object','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','api-doc-generator','summary','application/zip','/client/artifact/list?','success','/client/dataset/list','/client/artifact/create','company','source','/client/knowledge-base/personal/','description','1087504adasCM','/api/runtime/v1/namespaces/','SkillHub\x20API\x20error:\x20','all','name','tableData','filter','Download\x20failed:\x20','appCode','status','replace','slug','BFF\x20script\x20not\x20found:\x20id=','1390065nVTlke','topK','validation','appName','937300giyeGC','invokeSource','538030SePrjr','effective','56JCFSpX','SkillHub\x20error\x20code:\x20','/client/dataset/query?','file','Check\x20your\x20credentials\x20and\x20try\x20again.','2937612xGkLfW','Toolbox\x20error\x20code:\x20','/client/bff/query/','/update','apiError','trim','189483ZYvPYf','/client/app/my-apps','personal','API\x20error:\x20','skillCode','SQL\x20query\x20not\x20found:\x20','markdown','application/json','/api/cli/v1/skills/','packageBase64','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','artifactType','toString','POST','PRIVATE','text','/download','data','Request\x20timeout:\x20','undefined','AbortError','Personal\x20BFF\x20not\x20found:\x20id=','7465779HLCRGK','abort','GET','/client/artifact/','code','/client/user/loginUserInfo','/api/node-toolbox/','application/octet-stream','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/execute?appCode=','?appCode=','NAMESPACE_ONLY','skill','test','signal','/client/runtime-bff/personal/','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','displayName','headlineVersion','catch','scope','boolean','arrayBuffer','visibility','/versions/','json','msg','query','authRequired','/client/runtime-bff/personal/list?appCode=','stringify','string','namespace','/skills','from','message','isArray','version','newConfigFileName','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','errorCode','entries','.zip','/client/sql/query','set','/client/runtime-bff/personal/create','tags','errorMsg','searchParams','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'];a56_0xbb16=function(){return _0x54e8d6;};return a56_0xbb16();}(function(_0x30da45,_0x1084da){const _0x2092c7=a56_0x34e1,_0x1612b2=_0x30da45();while(!![]){try{const _0x5ce51b=parseInt(_0x2092c7(0xe7))/0x1*(-parseInt(_0x2092c7(0x10b))/0x2)+-parseInt(_0x2092c7(0x105))/0x3+parseInt(_0x2092c7(0xf8))/0x4+parseInt(_0x2092c7(0x109))/0x5+-parseInt(_0x2092c7(0x112))/0x6+-parseInt(_0x2092c7(0x118))/0x7*(-parseInt(_0x2092c7(0x10d))/0x8)+parseInt(_0x2092c7(0x12e))/0x9;if(_0x5ce51b===_0x1084da)break;else _0x1612b2['push'](_0x1612b2['shift']());}catch(_0x20cb14){_0x1612b2['push'](_0x1612b2['shift']());}}}(a56_0xbb16,0x3e97a));import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x593804){_activeAK=_0x593804||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x1757a3,_0x2b4d53={}){const _0x138fa0=a56_0x34e1,{method:method='GET',body:_0x3cbe68,headers:headers={},timeout:timeout=0x7530}=_0x2b4d53,_0x12b332=_activeAK,_0xec45a0=getRuntimeDomain();if(!_0x12b332)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x138fa0(0xd8)]+'.');const _0x431e73=''+_0xec45a0+_0x1757a3,_0x3324e2={'X-User-AK':_0x12b332},_0x4b7a6f=new AbortController(),_0x49d415=setTimeout(()=>_0x4b7a6f[_0x138fa0(0x12f)](),timeout);try{const _0x15223c=await fetch(_0x431e73,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x138fa0(0x10a)],..._0x3324e2,...headers},'body':_0x3cbe68?JSON[_0x138fa0(0xd0)](_0x3cbe68):undefined,'signal':_0x4b7a6f['signal']});let _0x4a4bb0;try{_0x4a4bb0=await _0x15223c[_0x138fa0(0xcb)]();}catch{throw CliErrors[_0x138fa0(0x116)](_0x138fa0(0xc2)+_0x15223c['status']+')',_0x15223c['status']>=0x190?_0x138fa0(0x111):undefined);}if(!_0x15223c['ok']||_0x4a4bb0[_0x138fa0(0xf1)]===![])throw CliErrors[_0x138fa0(0x116)](_0x4a4bb0['errorMsg']||_0x4a4bb0[_0x138fa0(0xd5)]||_0x138fa0(0x11b)+_0x15223c[_0x138fa0(0x101)],_0x4a4bb0['errorCode']?'API\x20error\x20code:\x20'+_0x4a4bb0[_0x138fa0(0xda)]:undefined);return _0x4a4bb0;}catch(_0x29ea41){if(_0x29ea41 instanceof Error&&_0x29ea41['name']==='AbortError')throw CliErrors[_0x138fa0(0x116)](_0x138fa0(0x12a)+_0x431e73);throw _0x29ea41;}finally{clearTimeout(_0x49d415);}}async function apiBinaryRequest(_0x41105a,_0x2b5f68={}){const _0x53d0bb=a56_0x34e1,{method:method=_0x53d0bb(0x130),headers:headers={},timeout:timeout=0x7530}=_0x2b5f68,_0x2cd4aa=_activeAK,_0x1285b1=getRuntimeDomain();if(!_0x2cd4aa)throw CliErrors['authRequired'](_0x53d0bb(0xe4)+PRODUCT_CONFIG[_0x53d0bb(0xd8)]+'.');const _0x4d0d49=''+_0x1285b1+_0x41105a,_0x2a7bdc=new AbortController(),_0x5d2f4d=setTimeout(()=>_0x2a7bdc[_0x53d0bb(0x12f)](),timeout);try{const _0x3f2082=await fetch(_0x4d0d49,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x53d0bb(0x10a)],'X-User-AK':_0x2cd4aa,...headers},'signal':_0x2a7bdc[_0x53d0bb(0xc0)]});if(!_0x3f2082['ok']){let _0x3bf50c;try{const _0x2603ab=await _0x3f2082[_0x53d0bb(0xcb)]();_0x3bf50c=_0x2603ab[_0x53d0bb(0xe1)]||_0x2603ab['message']||_0x2603ab[_0x53d0bb(0xda)];}catch{_0x3bf50c=await _0x3f2082[_0x53d0bb(0x127)]()[_0x53d0bb(0xc5)](()=>undefined);}throw CliErrors['apiError'](_0x3bf50c||_0x53d0bb(0x11b)+_0x3f2082[_0x53d0bb(0x101)],_0x53d0bb(0xff)+_0x4d0d49);}return Buffer['from'](await _0x3f2082[_0x53d0bb(0xc8)]());}catch(_0x4740ad){if(_0x4740ad instanceof Error&&_0x4740ad[_0x53d0bb(0xfc)]==='AbortError')throw CliErrors[_0x53d0bb(0x116)](_0x53d0bb(0x12a)+_0x4d0d49);throw _0x4740ad;}finally{clearTimeout(_0x5d2f4d);}}async function toolboxRequest(_0x14a5e6,_0x526518,_0x392079={}){const _0x1aff50=a56_0x34e1,{method:method=_0x1aff50(0x130),headers:headers={},timeout:timeout=0x7530}=_0x392079,_0x279b56=_activeAK;if(!_0x279b56)throw CliErrors['authRequired'](_0x1aff50(0xe4)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x531d61=getApiDomain()[_0x1aff50(0x102)](/\/$/,''),_0x3dca85=new URL(_0x14a5e6,_0x531d61+_0x1aff50(0x134));if(_0x526518)for(const [_0x506709,_0x3b15af]of Object[_0x1aff50(0xdb)](_0x526518)){_0x3b15af!==undefined&&_0x3b15af!==null&&_0x3dca85[_0x1aff50(0xe2)][_0x1aff50(0xde)](_0x506709,String(_0x3b15af));}const _0x51e879=new AbortController(),_0x5664c7=setTimeout(()=>_0x51e879[_0x1aff50(0x12f)](),timeout);try{const _0x4ec8ae=await fetch(_0x3dca85,{'method':method,'headers':{'Content-Type':_0x1aff50(0x11f),'X-Invoke-Source':PRODUCT_CONFIG[_0x1aff50(0x10a)],'X-User-AK':_0x279b56,...headers},'signal':_0x51e879[_0x1aff50(0xc0)]});let _0x60768d;try{_0x60768d=await _0x4ec8ae[_0x1aff50(0xcb)]();}catch{throw CliErrors[_0x1aff50(0x116)](_0x1aff50(0xd9)+_0x4ec8ae['status']+')',_0x4ec8ae[_0x1aff50(0x101)]>=0x190?_0x1aff50(0x111):undefined);}if(!_0x4ec8ae['ok']){const _0x2934e3=_0x60768d&&typeof _0x60768d===_0x1aff50(0xeb)?_0x60768d:{};throw CliErrors[_0x1aff50(0x116)](_0x2934e3['errorMsg']||_0x2934e3[_0x1aff50(0xd5)]||_0x1aff50(0xe9)+_0x4ec8ae['status'],_0x2934e3['errorCode']?_0x1aff50(0x113)+_0x2934e3[_0x1aff50(0xda)]:undefined);}if(_0x60768d&&typeof _0x60768d==='object'&&_0x1aff50(0xf1)in _0x60768d&&typeof _0x60768d[_0x1aff50(0xf1)]===_0x1aff50(0xc7)){const _0x325fed=_0x60768d;if(!_0x325fed[_0x1aff50(0xf1)])throw CliErrors['apiError'](_0x325fed[_0x1aff50(0xe1)]||_0x325fed['message']||'Toolbox\x20API\x20error',_0x325fed[_0x1aff50(0xda)]?_0x1aff50(0x113)+_0x325fed[_0x1aff50(0xda)]:undefined);return _0x325fed[_0x1aff50(0x129)];}return _0x60768d;}catch(_0xbeab2){if(_0xbeab2 instanceof Error&&_0xbeab2[_0x1aff50(0xfc)]===_0x1aff50(0x12c))throw CliErrors[_0x1aff50(0x116)](_0x1aff50(0x12a)+_0x3dca85['toString']());throw _0xbeab2;}finally{clearTimeout(_0x5664c7);}}async function skillHubJsonRequest(_0x3cc935,_0x4f1fac={}){const _0x354bfd=a56_0x34e1,{method:method=_0x354bfd(0x130),query:_0x22e9b1,body:_0x44a5a2,headers:headers={},timeout:timeout=0x7530}=_0x4f1fac,_0x35e3d3=_activeAK;if(!_0x35e3d3)throw CliErrors[_0x354bfd(0xce)](_0x354bfd(0xe4)+PRODUCT_CONFIG[_0x354bfd(0xd8)]+'.');const _0x584909=getSkillHubDomain()[_0x354bfd(0x102)](/\/$/,''),_0x2bd661=new URL(_0x3cc935,_0x584909+'/');if(_0x22e9b1)for(const [_0x1c2cdf,_0x1b390b]of Object[_0x354bfd(0xdb)](_0x22e9b1)){_0x1b390b!==undefined&&_0x1b390b!==null&&_0x2bd661[_0x354bfd(0xe2)][_0x354bfd(0xde)](_0x1c2cdf,String(_0x1b390b));}const _0x3191fd=new AbortController(),_0x467495=setTimeout(()=>_0x3191fd[_0x354bfd(0x12f)](),timeout);try{const _0x32841c=await fetch(_0x2bd661['toString'](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x35e3d3,...headers},'body':_0x44a5a2,'signal':_0x3191fd['signal']});let _0x28ee75;try{_0x28ee75=await _0x32841c['json']();}catch{throw CliErrors[_0x354bfd(0x116)](_0x354bfd(0xe3)+_0x32841c['status']+')',_0x32841c[_0x354bfd(0x101)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x3188b9=!_0x32841c['ok']||_0x28ee75?.['success']===![]||typeof _0x28ee75?.[_0x354bfd(0x132)]==='number'&&_0x28ee75['code']>=0x190;if(_0x3188b9)throw CliErrors[_0x354bfd(0x116)](_0x28ee75?.[_0x354bfd(0xe1)]||_0x28ee75?.[_0x354bfd(0xd5)]||_0x28ee75?.['msg']||_0x354bfd(0xfa)+_0x32841c[_0x354bfd(0x101)],_0x28ee75?.[_0x354bfd(0xda)]?_0x354bfd(0x10e)+_0x28ee75['errorCode']:undefined);return _0x28ee75?.[_0x354bfd(0x129)]??_0x28ee75;}catch(_0x44645e){if(_0x44645e instanceof Error&&_0x44645e[_0x354bfd(0xfc)]==='AbortError')throw CliErrors[_0x354bfd(0x116)](_0x354bfd(0x12a)+_0x2bd661['toString']());throw _0x44645e;}finally{clearTimeout(_0x467495);}}async function skillHubBinaryRequest(_0x38a4bd,_0x2bb6bd={}){const _0x5930e2=a56_0x34e1,{query:_0x3be6a8,headers:headers={},timeout:timeout=0x7530}=_0x2bb6bd,_0x5c55b8=_activeAK;if(!_0x5c55b8)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x5930e2(0xd8)]+'.');const _0x1d5589=getSkillHubDomain()['replace'](/\/$/,''),_0x7e0df0=new URL(_0x38a4bd,_0x1d5589+'/');if(_0x3be6a8)for(const [_0x2beb0a,_0x21603d]of Object['entries'](_0x3be6a8)){_0x21603d!==undefined&&_0x21603d!==null&&_0x7e0df0[_0x5930e2(0xe2)][_0x5930e2(0xde)](_0x2beb0a,String(_0x21603d));}const _0x1cc824=new AbortController(),_0x411c1e=setTimeout(()=>_0x1cc824[_0x5930e2(0x12f)](),timeout);try{const _0x49899f=await fetch(_0x7e0df0[_0x5930e2(0x124)](),{'method':'GET','headers':{'Accept':_0x5930e2(0x135),'X-Invoke-Source':PRODUCT_CONFIG[_0x5930e2(0x10a)],'X-User-AK':_0x5c55b8,...headers},'signal':_0x1cc824['signal']});if(!_0x49899f['ok']){let _0x2d5a19;try{const _0x1d8ab0=await _0x49899f[_0x5930e2(0xcb)]();_0x2d5a19=_0x1d8ab0['errorMsg']||_0x1d8ab0[_0x5930e2(0xd5)]||_0x1d8ab0[_0x5930e2(0xcc)]||_0x1d8ab0['errorCode'];}catch{_0x2d5a19=await _0x49899f[_0x5930e2(0x127)]()[_0x5930e2(0xc5)](()=>undefined);}throw CliErrors[_0x5930e2(0x116)](_0x2d5a19||_0x5930e2(0xfa)+_0x49899f[_0x5930e2(0x101)],_0x5930e2(0xff)+_0x7e0df0['toString']());}return Buffer[_0x5930e2(0xd4)](await _0x49899f['arrayBuffer']());}catch(_0x6ffa4c){if(_0x6ffa4c instanceof Error&&_0x6ffa4c[_0x5930e2(0xfc)]===_0x5930e2(0x12c))throw CliErrors[_0x5930e2(0x116)]('Request\x20timeout:\x20'+_0x7e0df0[_0x5930e2(0x124)]());throw _0x6ffa4c;}finally{clearTimeout(_0x411c1e);}}export async function getBffScriptInfo(_0x2a304f){const _0x3316f4=a56_0x34e1,_0x335810=await apiRequest(_0x3316f4(0x114)+_0x2a304f);if(!_0x335810[_0x3316f4(0x129)])throw CliErrors[_0x3316f4(0x107)](_0x3316f4(0x104)+_0x2a304f);return _0x335810[_0x3316f4(0x129)];}export async function getSqlQueryInfo(_0x5c0748,_0x31f092){const _0x1a68c2=a56_0x34e1,_0x2bb477=await apiRequest(_0x1a68c2(0xdd),{'method':_0x1a68c2(0x125),'body':{'appCode':_0x5c0748,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x31f092}}),_0x390f30=_0x2bb477[_0x1a68c2(0x129)],_0x59fda8=_0x390f30&&typeof _0x390f30===_0x1a68c2(0xeb)&&_0x1a68c2(0xfd)in _0x390f30?_0x390f30['tableData']?.[0x0]:_0x390f30&&typeof _0x390f30===_0x1a68c2(0xeb)&&_0x1a68c2(0xe5)in _0x390f30?_0x390f30:undefined;if(!_0x59fda8)throw CliErrors[_0x1a68c2(0x107)](_0x1a68c2(0x11d)+_0x31f092);return _0x59fda8;}function isRemoteAppItem(_0x3e1661){const _0x40a2b0=a56_0x34e1;return!!_0x3e1661&&typeof _0x3e1661===_0x40a2b0(0xeb)&&typeof _0x3e1661[_0x40a2b0(0x100)]===_0x40a2b0(0xd1)&&typeof _0x3e1661[_0x40a2b0(0x108)]==='string';}function extractRemoteAppItems(_0x1857a9){const _0x39e4aa=a56_0x34e1;if(Array['isArray'](_0x1857a9))return _0x1857a9[_0x39e4aa(0xfe)](isRemoteAppItem);if(!_0x1857a9||typeof _0x1857a9!==_0x39e4aa(0xeb))throw CliErrors[_0x39e4aa(0x116)](_0x39e4aa(0x136));const _0x59e77d=_0x1857a9;if(Array[_0x39e4aa(0xd6)](_0x59e77d[_0x39e4aa(0xfd)]))return _0x59e77d['tableData']['filter'](isRemoteAppItem);if(_0x59e77d[_0x39e4aa(0x129)]&&typeof _0x59e77d[_0x39e4aa(0x129)]===_0x39e4aa(0xeb)){const _0x435f8e=_0x59e77d[_0x39e4aa(0x129)];if(Array[_0x39e4aa(0xd6)](_0x435f8e['tableData']))return _0x435f8e['tableData'][_0x39e4aa(0xfe)](isRemoteAppItem);}throw CliErrors[_0x39e4aa(0x116)](_0x39e4aa(0x122));}export async function getMyApps(){const _0x3b1cb9=a56_0x34e1,_0x48e573=await apiRequest(_0x3b1cb9(0x119));return extractRemoteAppItems(_0x48e573[_0x3b1cb9(0x129)]);}export async function getLoginUserInfo(){const _0x4afc7c=a56_0x34e1,_0xe0468f=await apiRequest(_0x4afc7c(0x133));if(!_0xe0468f[_0x4afc7c(0x129)]||typeof _0xe0468f[_0x4afc7c(0x129)]!==_0x4afc7c(0xeb)||Array[_0x4afc7c(0xd6)](_0xe0468f['data']))throw CliErrors[_0x4afc7c(0x116)](_0x4afc7c(0xec));return _0xe0468f[_0x4afc7c(0x129)];}export async function listDatasets(_0x10731f,_0x30d706){const _0x4682e4=a56_0x34e1,_0xd251f5=await apiRequest(_0x4682e4(0xf2),{'method':_0x4682e4(0x125),'body':{'appCode':_0x10731f,..._0x30d706?.[_0x4682e4(0x132)]&&{'code':_0x30d706['code']},..._0x30d706?.['name']&&{'name':_0x30d706[_0x4682e4(0xfc)]}}});return extractList(_0xd251f5[_0x4682e4(0x129)]);}export async function getDatasetDetail(_0x4b4f45){const _0x3b38f3=a56_0x34e1,_0x724913=/^\d+$/[_0x3b38f3(0xbf)](_0x4b4f45)?'id':_0x3b38f3(0x132),_0x5114a2=await apiRequest(_0x3b38f3(0x10f)+_0x724913+'='+_0x4b4f45);return _0x5114a2['data'];}export async function getDatasetSdkUsageDoc(_0x28eee9,_0x57a1ab){const _0x5914b7=a56_0x34e1,_0x526e79=await toolboxRequest(_0x5914b7(0xed),{'datasetCode':_0x28eee9,'appCode':_0x57a1ab});return typeof _0x526e79?.[_0x5914b7(0x11e)]===_0x5914b7(0xd1)?_0x526e79['markdown']:'';}export async function listRuntimeArtifacts(_0x118418,_0x3e21f2){const _0x323f67=a56_0x34e1,_0x4189c6=new URLSearchParams({'appCode':_0x118418});if(_0x3e21f2?.['artifactType'])_0x4189c6[_0x323f67(0xde)](_0x323f67(0x123),_0x3e21f2['artifactType']);if(_0x3e21f2?.[_0x323f67(0xf5)])_0x4189c6[_0x323f67(0xde)]('source',_0x3e21f2[_0x323f67(0xf5)]);if(_0x3e21f2?.[_0x323f67(0xe6)]!==undefined)_0x4189c6[_0x323f67(0xde)]('favorite',String(_0x3e21f2[_0x323f67(0xe6)]));const _0x13f053=await apiRequest(_0x323f67(0xf0)+_0x4189c6[_0x323f67(0x124)]());return Array['isArray'](_0x13f053[_0x323f67(0x129)])?_0x13f053[_0x323f67(0x129)]:[];}export async function getRuntimeArtifact(_0x3415e9,_0x227433){const _0x29afe0=a56_0x34e1,_0x3c7f96=await apiRequest(_0x29afe0(0x131)+_0x3415e9+'?appCode='+encodeURIComponent(_0x227433));if(!_0x3c7f96[_0x29afe0(0x129)])throw CliErrors[_0x29afe0(0x107)]('Artifact\x20not\x20found:\x20id='+_0x3415e9);return _0x3c7f96[_0x29afe0(0x129)];}export async function createRuntimeArtifact(_0x2d1784,_0xc8cb75){const _0x44c76f=a56_0x34e1,_0x1118af=await apiRequest(_0x44c76f(0xf3),{'method':_0x44c76f(0x125),'body':{'appCode':_0x2d1784,..._0xc8cb75}});return _0x1118af[_0x44c76f(0x129)];}export async function updateRuntimeArtifact(_0x41a0d7,_0xaa20e,_0x20dce9){const _0x311508=a56_0x34e1,_0x5b7bf0=await apiRequest(_0x311508(0x131)+_0x41a0d7+_0x311508(0x115),{'method':'POST','body':{'appCode':_0xaa20e,..._0x20dce9}});return _0x5b7bf0['data'];}export async function listPersonalBffs(_0x2342db){const _0x24506c=a56_0x34e1,_0x75d4d8=await apiRequest(_0x24506c(0xcf)+encodeURIComponent(_0x2342db));return Array[_0x24506c(0xd6)](_0x75d4d8[_0x24506c(0x129)])?_0x75d4d8[_0x24506c(0x129)]:[];}export async function getPersonalBff(_0x2f8477,_0x286b85){const _0x189461=a56_0x34e1,_0x124739=await apiRequest('/client/runtime-bff/personal/'+_0x2f8477+_0x189461(0x138)+encodeURIComponent(_0x286b85));if(!_0x124739['data'])throw CliErrors[_0x189461(0x107)](_0x189461(0x12d)+_0x2f8477);return _0x124739['data'];}export async function createPersonalBff(_0x49373c,_0x14a474){const _0xf2e72e=a56_0x34e1,_0x408120=await apiRequest(_0xf2e72e(0xdf),{'method':'POST','body':{'appCode':_0x49373c,..._0x14a474}});return _0x408120['data'];}export async function updatePersonalBff(_0x2ac998,_0x5bd6ca,_0x1dc5b9){const _0x1bf540=a56_0x34e1,_0x566ba8=await apiRequest(_0x1bf540(0xc1)+_0x2ac998+'/update',{'method':_0x1bf540(0x125),'body':{'appCode':_0x5bd6ca,..._0x1dc5b9}});return _0x566ba8[_0x1bf540(0x129)];}export async function executePersonalBff(_0x25f096,_0x3068b0,_0x1e4e62){const _0x1d1a66=a56_0x34e1,_0x46a98d=await apiRequest('/client/runtime-bff/personal/'+_0x25f096+_0x1d1a66(0x137)+encodeURIComponent(_0x3068b0),{'method':'POST','body':_0x1e4e62});return _0x46a98d[_0x1d1a66(0x129)];}export async function listPersonalKnowledgeBaseItems(_0x343976){const _0x3f1f4a=a56_0x34e1,_0x2ccabe=await apiRequest('/client/knowledge-base/personal/list?appCode='+encodeURIComponent(_0x343976));return Array['isArray'](_0x2ccabe[_0x3f1f4a(0x129)])?_0x2ccabe[_0x3f1f4a(0x129)]:[];}export async function getPersonalKnowledgeBaseItem(_0xb8e9a3,_0x23b409){const _0x133f57=a56_0x34e1,_0x1d94af=await apiRequest(_0x133f57(0xf6)+_0xb8e9a3+_0x133f57(0x138)+encodeURIComponent(_0x23b409));if(!_0x1d94af[_0x133f57(0x129)])throw CliErrors['validation']('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0xb8e9a3);return _0x1d94af[_0x133f57(0x129)];}export async function createPersonalKnowledgeBaseItem(_0xcaac07,_0x40c6d5){const _0x4f072a=a56_0x34e1,_0x4cf085=await apiRequest('/client/knowledge-base/personal/create',{'method':_0x4f072a(0x125),'body':{'appCode':_0xcaac07,..._0x40c6d5}});return _0x4cf085[_0x4f072a(0x129)];}function a56_0x34e1(_0x5f430d,_0x218187){_0x5f430d=_0x5f430d-0xbd;const _0xbb1635=a56_0xbb16();let _0x34e1e9=_0xbb1635[_0x5f430d];return _0x34e1e9;}export async function updatePersonalKnowledgeBaseItem(_0x7b8781,_0x336db6,_0x55d74c){const _0x17fb0e=a56_0x34e1,_0xcb164=await apiRequest(_0x17fb0e(0xf6)+_0x7b8781+_0x17fb0e(0x115),{'method':_0x17fb0e(0x125),'body':{'appCode':_0x336db6,..._0x55d74c}});return _0xcb164['data'];}export async function searchKnowledgeBase(_0xa20f21,_0x48ea7b){const _0x5af233=a56_0x34e1,_0x7a93d9=await apiRequest(_0x5af233(0xe8),{'method':_0x5af233(0x125),'body':{'appCode':_0xa20f21,'query':_0x48ea7b[_0x5af233(0xcd)],..._0x48ea7b[_0x5af233(0x106)]!==undefined?{'topK':_0x48ea7b[_0x5af233(0x106)]}:{}}});return Array[_0x5af233(0xd6)](_0x7a93d9[_0x5af233(0x129)])?_0x7a93d9[_0x5af233(0x129)]:[];}export async function listRuntimeSkills(_0x348665){const _0x450f2e=a56_0x34e1,_0x52de8d=await skillHubJsonRequest(_0x450f2e(0xf9)+encodeURIComponent(_0x348665[_0x450f2e(0x100)])+_0x450f2e(0xd3),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x348665[_0x450f2e(0x100)],_0x52de8d,_0x348665['scope']??_0x450f2e(0xfb),_0x348665[_0x450f2e(0x132)]);}export async function listPersonalRuntimeSkills(_0x557e7e){const _0x4afb04=a56_0x34e1;return(await listRuntimeSkills({'appCode':_0x557e7e,'scope':_0x4afb04(0x11a)}))['personal'];}export async function listCompanyRuntimeSkills(_0x503040){const _0x17079c=a56_0x34e1;return(await listRuntimeSkills({'appCode':_0x503040,'scope':_0x17079c(0xf4)}))[_0x17079c(0xf4)];}export async function listVisibleRuntimeSkills(_0x2d388b){const _0x28a2d3=a56_0x34e1;return(await listRuntimeSkills({'appCode':_0x2d388b,'scope':_0x28a2d3(0xfb)}))[_0x28a2d3(0x10c)];}export async function createPersonalRuntimeSkill(_0x51ad25,_0x5996e0){return publishRuntimeSkill(_0x51ad25,_0x5996e0);}export async function updatePersonalRuntimeSkill(_0x316277,_0x31aec0,_0x1653ec){const _0x4ca2da=a56_0x34e1;return publishRuntimeSkill(_0x31aec0,{..._0x1653ec,'skillCode':_0x1653ec[_0x4ca2da(0x11c)]??_0x316277});}export async function downloadRuntimeSkillPackage(_0x219684,_0x3cca20,_0x54bce9,_0x2f7ff4){const _0x5b9b4d=a56_0x34e1;void _0x219684;const _0x35b476=_0x2f7ff4?'/api/cli/v1/skills/'+encodeURIComponent(_0x54bce9)+'/'+encodeURIComponent(_0x3cca20)+_0x5b9b4d(0xca)+encodeURIComponent(_0x2f7ff4)+_0x5b9b4d(0x128):_0x5b9b4d(0x120)+encodeURIComponent(_0x54bce9)+'/'+encodeURIComponent(_0x3cca20)+_0x5b9b4d(0x128);return skillHubBinaryRequest(_0x35b476);}async function publishRuntimeSkill(_0x14f6f7,_0x2905e7){const _0x370678=a56_0x34e1,_0x1ccf8a=new FormData();_0x1ccf8a['set'](_0x370678(0x110),runtimeSkillPackageFile(_0x2905e7)),_0x1ccf8a[_0x370678(0xde)](_0x370678(0xc9),'PRIVATE');const _0x3b4fa4=await skillHubJsonRequest(_0x370678(0x120)+encodeURIComponent(_0x14f6f7)+'/publish',{'method':_0x370678(0x125),'body':_0x1ccf8a});return{'appCode':_0x3b4fa4[_0x370678(0xd2)]??_0x14f6f7,'skillCode':_0x3b4fa4[_0x370678(0x103)]??_0x2905e7['skillCode']??'','skillName':_0x2905e7['skillName']??_0x3b4fa4[_0x370678(0x103)]??_0x2905e7['skillCode'],'description':_0x2905e7[_0x370678(0xf7)],'scope':skillHubVisibilityToScope(_0x3b4fa4[_0x370678(0xc9)])??'personal','version':_0x3b4fa4[_0x370678(0xd7)]??_0x2905e7['version'],'tags':_0x2905e7[_0x370678(0xe0)],'content':_0x2905e7['content']};}function runtimeSkillPackageFile(_0x3fb6d3){const _0x5b56d9=a56_0x34e1;if(!_0x3fb6d3[_0x5b56d9(0x121)])throw CliErrors['validation']('Missing\x20Skill\x20package\x20payload.');const _0x9a1e44=Buffer[_0x5b56d9(0xd4)](_0x3fb6d3[_0x5b56d9(0x121)],'base64'),_0x4abe89=new Blob([_0x9a1e44],{'type':_0x5b56d9(0xef)}),_0x534ab9=(_0x3fb6d3[_0x5b56d9(0x11c)]||_0x5b56d9(0xbe))+_0x5b56d9(0xdc);if(typeof File!==_0x5b56d9(0x12b))return new File([_0x4abe89],_0x534ab9,{'type':'application/zip'});return _0x4abe89;}function normalizeSkillHubRuntimeListResponse(_0x20e50b,_0x1e599c,_0x24182a,_0x134e5d){const _0x42571f=a56_0x34e1,_0x33dc38=Array['isArray'](_0x1e599c)?_0x1e599c:Array[_0x42571f(0xd6)](_0x1e599c?.['items'])?_0x1e599c['items']:[],_0x1fd70a=_0x134e5d?.['trim'](),_0x3b3b5a=_0x33dc38['filter'](_0xb95798=>!_0x1fd70a||_0xb95798['slug']===_0x1fd70a)['map'](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x48d2d2=>Boolean(_0x48d2d2)),_0x1e4d63=_0x3b3b5a[_0x42571f(0xfe)](_0xb699f1=>_0xb699f1[_0x42571f(0xc6)]==='personal'),_0x131176=_0x3b3b5a['filter'](_0x3e6fd6=>_0x3e6fd6['scope']==='company');return{'appCode':_0x20e50b,'personal':_0x24182a==='company'?[]:_0x1e4d63,'company':_0x24182a==='personal'?[]:_0x131176,'effective':buildEffectiveRuntimeSkills(_0x1e4d63,_0x131176,_0x24182a)};}function skillHubRuntimeItemToRuntimeSkill(_0x402ba9){const _0x53d690=a56_0x34e1,_0x31207c=_0x402ba9[_0x53d690(0x103)]?.[_0x53d690(0x117)](),_0x286339=skillHubVisibilityToScope(_0x402ba9[_0x53d690(0xc9)]);if(!_0x31207c||!_0x286339)return undefined;return{'id':_0x402ba9['id'],'appCode':_0x402ba9[_0x53d690(0xd2)],'skillCode':_0x31207c,'skillName':_0x402ba9[_0x53d690(0xc3)]??_0x31207c,'description':_0x402ba9[_0x53d690(0xee)],'scope':_0x286339,'version':skillHubRuntimeItemVersion(_0x402ba9),'status':_0x402ba9[_0x53d690(0x101)]};}function skillHubVisibilityToScope(_0x441c90){const _0x59f258=a56_0x34e1;if(_0x441c90===_0x59f258(0x126))return _0x59f258(0x11a);if(_0x441c90===_0x59f258(0xbd))return _0x59f258(0xf4);return undefined;}function skillHubRuntimeItemVersion(_0x137ebe){const _0x582430=a56_0x34e1;return _0x137ebe['publishedVersion']?.[_0x582430(0xd7)]??_0x137ebe[_0x582430(0xc4)]?.[_0x582430(0xd7)]??_0x137ebe['ownerPreviewVersion']?.[_0x582430(0xd7)];}function buildEffectiveRuntimeSkills(_0x24f145,_0x458cc5,_0x390ece){const _0x2b898c=a56_0x34e1;if(_0x390ece===_0x2b898c(0x11a))return _0x24f145;if(_0x390ece===_0x2b898c(0xf4))return _0x458cc5;const _0x49a9e2=new Map();for(const _0x13a5d1 of _0x458cc5){_0x49a9e2[_0x2b898c(0xde)](_0x13a5d1[_0x2b898c(0x11c)],_0x13a5d1);}for(const _0x524a70 of _0x24f145){_0x49a9e2[_0x2b898c(0xde)](_0x524a70['skillCode'],_0x524a70);}return Array[_0x2b898c(0xd4)](_0x49a9e2[_0x2b898c(0xea)]());}function normalizeRuntimeSkillListResponse(_0x544989,_0x55377f){const _0x11f06b=a56_0x34e1;if(Array[_0x11f06b(0xd6)](_0x55377f)){const _0x3e6f9f=_0x55377f[_0x11f06b(0xfe)](_0x1a8ded=>_0x1a8ded[_0x11f06b(0xc6)]===_0x11f06b(0x11a)),_0x2f8d19=_0x55377f[_0x11f06b(0xfe)](_0x27f8d3=>_0x27f8d3['scope']===_0x11f06b(0xf4));return{'appCode':_0x544989,'personal':_0x3e6f9f,'company':_0x2f8d19,'effective':[..._0x2f8d19,..._0x3e6f9f]};}return{'appCode':_0x55377f?.[_0x11f06b(0x100)]??_0x544989,'personal':Array[_0x11f06b(0xd6)](_0x55377f?.[_0x11f06b(0x11a)])?_0x55377f[_0x11f06b(0x11a)]:[],'company':Array[_0x11f06b(0xd6)](_0x55377f?.['company'])?_0x55377f[_0x11f06b(0xf4)]:[],'effective':Array[_0x11f06b(0xd6)](_0x55377f?.['effective'])?_0x55377f['effective']:[]};}
|
|
1
|
+
(function(_0x1762b6,_0x127f97){const _0xdba764=a65_0x3700,_0x303126=_0x1762b6();while(!![]){try{const _0x275cc5=parseInt(_0xdba764(0xe1))/0x1+parseInt(_0xdba764(0x128))/0x2*(-parseInt(_0xdba764(0xbf))/0x3)+parseInt(_0xdba764(0xb5))/0x4*(-parseInt(_0xdba764(0x102))/0x5)+-parseInt(_0xdba764(0xe2))/0x6*(-parseInt(_0xdba764(0x11f))/0x7)+parseInt(_0xdba764(0xdb))/0x8*(parseInt(_0xdba764(0x11d))/0x9)+-parseInt(_0xdba764(0xd6))/0xa*(-parseInt(_0xdba764(0xc7))/0xb)+-parseInt(_0xdba764(0x132))/0xc;if(_0x275cc5===_0x127f97)break;else _0x303126['push'](_0x303126['shift']());}catch(_0x57e756){_0x303126['push'](_0x303126['shift']());}}}(a65_0x25ec,0x47dfa));import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x39ad02){_activeAK=_0x39ad02||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x2d038e,_0x1740cd={}){const _0x40e3ce=a65_0x3700,{method:method='GET',body:_0x594f0d,headers:headers={},timeout:timeout=0x7530}=_0x1740cd,_0x3ede2a=_activeAK,_0x588f52=getRuntimeDomain();if(!_0x3ede2a)throw CliErrors[_0x40e3ce(0x10a)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x40e3ce(0x11a)]+'.');const _0x5f577f=''+_0x588f52+_0x2d038e,_0x19a0fe={'X-User-AK':_0x3ede2a},_0x40f370=new AbortController(),_0x59dde9=setTimeout(()=>_0x40f370[_0x40e3ce(0x12d)](),timeout);try{const _0x46b9dc=await fetch(_0x5f577f,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x40e3ce(0x114)],..._0x19a0fe,...headers},'body':_0x594f0d?JSON[_0x40e3ce(0xfe)](_0x594f0d):undefined,'signal':_0x40f370[_0x40e3ce(0x10f)]});let _0x296863;try{_0x296863=await _0x46b9dc[_0x40e3ce(0x130)]();}catch{throw CliErrors[_0x40e3ce(0x12a)](_0x40e3ce(0x119)+_0x46b9dc[_0x40e3ce(0x11b)]+')',_0x46b9dc[_0x40e3ce(0x11b)]>=0x190?_0x40e3ce(0xb8):undefined);}if(!_0x46b9dc['ok']||_0x296863[_0x40e3ce(0xce)]===![])throw CliErrors['apiError'](_0x296863['errorMsg']||_0x296863[_0x40e3ce(0xeb)]||_0x40e3ce(0x109)+_0x46b9dc[_0x40e3ce(0x11b)],_0x296863[_0x40e3ce(0xc0)]?_0x40e3ce(0x107)+_0x296863[_0x40e3ce(0xc0)]:undefined);return _0x296863;}catch(_0x2a40f8){if(_0x2a40f8 instanceof Error&&_0x2a40f8['name']===_0x40e3ce(0x126))throw CliErrors['apiError'](_0x40e3ce(0xd2)+_0x5f577f);throw _0x2a40f8;}finally{clearTimeout(_0x59dde9);}}async function apiBinaryRequest(_0xb418e2,_0x2959a8={}){const _0x34782c=a65_0x3700,{method:method=_0x34782c(0x122),headers:headers={},timeout:timeout=0x7530}=_0x2959a8,_0x1756b6=_activeAK,_0x5e2c07=getRuntimeDomain();if(!_0x1756b6)throw CliErrors[_0x34782c(0x10a)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x34782c(0x11a)]+'.');const _0x5a4232=''+_0x5e2c07+_0xb418e2,_0x1afba8=new AbortController(),_0x2721e5=setTimeout(()=>_0x1afba8['abort'](),timeout);try{const _0x255614=await fetch(_0x5a4232,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x1756b6,...headers},'signal':_0x1afba8[_0x34782c(0x10f)]});if(!_0x255614['ok']){let _0x55c130;try{const _0x41a4fc=await _0x255614[_0x34782c(0x130)]();_0x55c130=_0x41a4fc[_0x34782c(0x121)]||_0x41a4fc['message']||_0x41a4fc[_0x34782c(0xc0)];}catch{_0x55c130=await _0x255614[_0x34782c(0xdf)]()[_0x34782c(0xd8)](()=>undefined);}throw CliErrors[_0x34782c(0x12a)](_0x55c130||'API\x20error:\x20'+_0x255614[_0x34782c(0x11b)],'Download\x20failed:\x20'+_0x5a4232);}return Buffer[_0x34782c(0xff)](await _0x255614['arrayBuffer']());}catch(_0x4a204f){if(_0x4a204f instanceof Error&&_0x4a204f[_0x34782c(0xd0)]===_0x34782c(0x126))throw CliErrors['apiError'](_0x34782c(0xd2)+_0x5a4232);throw _0x4a204f;}finally{clearTimeout(_0x2721e5);}}async function toolboxRequest(_0x4548e5,_0x757982,_0x38fc1f={}){const _0x57a8eb=a65_0x3700,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x38fc1f,_0x3eec15=_activeAK;if(!_0x3eec15)throw CliErrors['authRequired'](_0x57a8eb(0x134)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x41ee96=getApiDomain()['replace'](/\/$/,''),_0x347ed1=new URL(_0x4548e5,_0x41ee96+_0x57a8eb(0xba));if(_0x757982)for(const [_0x2d189b,_0x2f41b4]of Object[_0x57a8eb(0xf7)](_0x757982)){_0x2f41b4!==undefined&&_0x2f41b4!==null&&_0x347ed1[_0x57a8eb(0x12e)][_0x57a8eb(0xc3)](_0x2d189b,String(_0x2f41b4));}const _0x227af6=new AbortController(),_0x20444e=setTimeout(()=>_0x227af6[_0x57a8eb(0x12d)](),timeout);try{const _0x147f34=await fetch(_0x347ed1,{'method':method,'headers':{'Content-Type':_0x57a8eb(0xf1),'X-Invoke-Source':PRODUCT_CONFIG[_0x57a8eb(0x114)],'X-User-AK':_0x3eec15,...headers},'signal':_0x227af6[_0x57a8eb(0x10f)]});let _0x451a1a;try{_0x451a1a=await _0x147f34[_0x57a8eb(0x130)]();}catch{throw CliErrors[_0x57a8eb(0x12a)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x147f34['status']+')',_0x147f34[_0x57a8eb(0x11b)]>=0x190?_0x57a8eb(0xb8):undefined);}if(!_0x147f34['ok']){const _0x423127=_0x451a1a&&typeof _0x451a1a==='object'?_0x451a1a:{};throw CliErrors[_0x57a8eb(0x12a)](_0x423127[_0x57a8eb(0x121)]||_0x423127[_0x57a8eb(0xeb)]||_0x57a8eb(0x108)+_0x147f34[_0x57a8eb(0x11b)],_0x423127[_0x57a8eb(0xc0)]?_0x57a8eb(0xc5)+_0x423127[_0x57a8eb(0xc0)]:undefined);}if(_0x451a1a&&typeof _0x451a1a==='object'&&'success'in _0x451a1a&&typeof _0x451a1a[_0x57a8eb(0xce)]===_0x57a8eb(0x12c)){const _0x5a4708=_0x451a1a;if(!_0x5a4708[_0x57a8eb(0xce)])throw CliErrors[_0x57a8eb(0x12a)](_0x5a4708[_0x57a8eb(0x121)]||_0x5a4708[_0x57a8eb(0xeb)]||_0x57a8eb(0x10c),_0x5a4708[_0x57a8eb(0xc0)]?_0x57a8eb(0xc5)+_0x5a4708['errorCode']:undefined);return _0x5a4708[_0x57a8eb(0xbe)];}return _0x451a1a;}catch(_0x51c1d1){if(_0x51c1d1 instanceof Error&&_0x51c1d1['name']===_0x57a8eb(0x126))throw CliErrors['apiError'](_0x57a8eb(0xd2)+_0x347ed1['toString']());throw _0x51c1d1;}finally{clearTimeout(_0x20444e);}}async function skillHubJsonRequest(_0x15dc41,_0xbb0750={}){const _0x44f80e=a65_0x3700,{method:method=_0x44f80e(0x122),query:_0xd05117,body:_0x1bbe3e,headers:headers={},timeout:timeout=0x7530}=_0xbb0750,_0x2f42fe=_activeAK;if(!_0x2f42fe)throw CliErrors[_0x44f80e(0x10a)](_0x44f80e(0x134)+PRODUCT_CONFIG[_0x44f80e(0x11a)]+'.');const _0xe53b0b=getSkillHubDomain()[_0x44f80e(0x111)](/\/$/,''),_0x3c9b4f=new URL(_0x15dc41,_0xe53b0b+'/');if(_0xd05117)for(const [_0x212cfc,_0x473c9d]of Object[_0x44f80e(0xf7)](_0xd05117)){_0x473c9d!==undefined&&_0x473c9d!==null&&_0x3c9b4f['searchParams'][_0x44f80e(0xc3)](_0x212cfc,String(_0x473c9d));}const _0x6fdee0=new AbortController(),_0x442a28=setTimeout(()=>_0x6fdee0[_0x44f80e(0x12d)](),timeout);try{const _0x5b790c=await fetch(_0x3c9b4f[_0x44f80e(0xb9)](),{'method':method,'headers':{'Accept':_0x44f80e(0xf1),'X-Invoke-Source':PRODUCT_CONFIG[_0x44f80e(0x114)],'X-User-AK':_0x2f42fe,...headers},'body':_0x1bbe3e,'signal':_0x6fdee0[_0x44f80e(0x10f)]});let _0x1515ce;try{_0x1515ce=await _0x5b790c[_0x44f80e(0x130)]();}catch{throw CliErrors[_0x44f80e(0x12a)](_0x44f80e(0xfd)+_0x5b790c['status']+')',_0x5b790c[_0x44f80e(0x11b)]>=0x190?_0x44f80e(0xb8):undefined);}const _0x5a4771=!_0x5b790c['ok']||_0x1515ce?.[_0x44f80e(0xce)]===![]||typeof _0x1515ce?.[_0x44f80e(0xe8)]==='number'&&_0x1515ce[_0x44f80e(0xe8)]>=0x190;if(_0x5a4771)throw CliErrors['apiError'](_0x1515ce?.['errorMsg']||_0x1515ce?.['message']||_0x1515ce?.[_0x44f80e(0xb2)]||_0x44f80e(0xed)+_0x5b790c[_0x44f80e(0x11b)],_0x1515ce?.[_0x44f80e(0xc0)]?_0x44f80e(0xf2)+_0x1515ce[_0x44f80e(0xc0)]:undefined);return _0x1515ce?.[_0x44f80e(0xbe)]??_0x1515ce;}catch(_0x1e1011){if(_0x1e1011 instanceof Error&&_0x1e1011[_0x44f80e(0xd0)]===_0x44f80e(0x126))throw CliErrors[_0x44f80e(0x12a)](_0x44f80e(0xd2)+_0x3c9b4f[_0x44f80e(0xb9)]());throw _0x1e1011;}finally{clearTimeout(_0x442a28);}}async function skillHubBinaryRequest(_0x139a72,_0x165d16={}){const _0x4f6b7f=a65_0x3700,{query:_0x22c2d0,headers:headers={},timeout:timeout=0x7530}=_0x165d16,_0x558b9d=_activeAK;if(!_0x558b9d)throw CliErrors['authRequired'](_0x4f6b7f(0x134)+PRODUCT_CONFIG[_0x4f6b7f(0x11a)]+'.');const _0x10dc99=getSkillHubDomain()[_0x4f6b7f(0x111)](/\/$/,''),_0x39b4b4=new URL(_0x139a72,_0x10dc99+'/');if(_0x22c2d0)for(const [_0xacef47,_0x5a7afa]of Object[_0x4f6b7f(0xf7)](_0x22c2d0)){_0x5a7afa!==undefined&&_0x5a7afa!==null&&_0x39b4b4[_0x4f6b7f(0x12e)]['set'](_0xacef47,String(_0x5a7afa));}const _0x5672c8=new AbortController(),_0x54dc9f=setTimeout(()=>_0x5672c8[_0x4f6b7f(0x12d)](),timeout);try{const _0x44af36=await fetch(_0x39b4b4[_0x4f6b7f(0xb9)](),{'method':_0x4f6b7f(0x122),'headers':{'Accept':_0x4f6b7f(0xf5),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x558b9d,...headers},'signal':_0x5672c8[_0x4f6b7f(0x10f)]});if(!_0x44af36['ok']){let _0x5820e3;try{const _0x15407f=await _0x44af36['json']();_0x5820e3=_0x15407f['errorMsg']||_0x15407f['message']||_0x15407f[_0x4f6b7f(0xb2)]||_0x15407f[_0x4f6b7f(0xc0)];}catch{_0x5820e3=await _0x44af36[_0x4f6b7f(0xdf)]()[_0x4f6b7f(0xd8)](()=>undefined);}throw CliErrors[_0x4f6b7f(0x12a)](_0x5820e3||'SkillHub\x20API\x20error:\x20'+_0x44af36[_0x4f6b7f(0x11b)],_0x4f6b7f(0x11e)+_0x39b4b4[_0x4f6b7f(0xb9)]());}return Buffer['from'](await _0x44af36['arrayBuffer']());}catch(_0x575723){if(_0x575723 instanceof Error&&_0x575723[_0x4f6b7f(0xd0)]===_0x4f6b7f(0x126))throw CliErrors['apiError'](_0x4f6b7f(0xd2)+_0x39b4b4['toString']());throw _0x575723;}finally{clearTimeout(_0x54dc9f);}}export async function getBffScriptInfo(_0x40bf4d){const _0x302aa2=a65_0x3700,_0x4a4fba=await apiRequest(_0x302aa2(0xbd)+_0x40bf4d);if(!_0x4a4fba[_0x302aa2(0xbe)])throw CliErrors[_0x302aa2(0xf8)](_0x302aa2(0xcc)+_0x40bf4d);return _0x4a4fba['data'];}export async function getSqlQueryInfo(_0x2115d8,_0x516d24){const _0x475e7e=a65_0x3700,_0x26bb13=await apiRequest(_0x475e7e(0xc1),{'method':'POST','body':{'appCode':_0x2115d8,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x516d24}}),_0x100ab9=_0x26bb13['data'],_0x32e7ca=_0x100ab9&&typeof _0x100ab9===_0x475e7e(0x113)&&_0x475e7e(0x131)in _0x100ab9?_0x100ab9[_0x475e7e(0x131)]?.[0x0]:_0x100ab9&&typeof _0x100ab9===_0x475e7e(0x113)&&_0x475e7e(0xf0)in _0x100ab9?_0x100ab9:undefined;if(!_0x32e7ca)throw CliErrors['validation'](_0x475e7e(0xd7)+_0x516d24);return _0x32e7ca;}function isRemoteAppItem(_0x339b93){const _0x5611dd=a65_0x3700;return!!_0x339b93&&typeof _0x339b93===_0x5611dd(0x113)&&typeof _0x339b93[_0x5611dd(0x127)]===_0x5611dd(0x100)&&typeof _0x339b93[_0x5611dd(0x11c)]===_0x5611dd(0x100);}function extractRemoteAppItems(_0x542ff2){const _0x2c5b39=a65_0x3700;if(Array[_0x2c5b39(0x125)](_0x542ff2))return _0x542ff2[_0x2c5b39(0xc6)](isRemoteAppItem);if(!_0x542ff2||typeof _0x542ff2!==_0x2c5b39(0x113))throw CliErrors['apiError'](_0x2c5b39(0xf9));const _0x1f259a=_0x542ff2;if(Array[_0x2c5b39(0x125)](_0x1f259a['tableData']))return _0x1f259a[_0x2c5b39(0x131)]['filter'](isRemoteAppItem);if(_0x1f259a[_0x2c5b39(0xbe)]&&typeof _0x1f259a[_0x2c5b39(0xbe)]==='object'){const _0x25b9c8=_0x1f259a[_0x2c5b39(0xbe)];if(Array['isArray'](_0x25b9c8[_0x2c5b39(0x131)]))return _0x25b9c8[_0x2c5b39(0x131)][_0x2c5b39(0xc6)](isRemoteAppItem);}throw CliErrors[_0x2c5b39(0x12a)](_0x2c5b39(0xca));}export async function getMyApps(){const _0x414713=a65_0x3700,_0x423389=await apiRequest(_0x414713(0xe4));return extractRemoteAppItems(_0x423389[_0x414713(0xbe)]);}export async function getLoginUserInfo(){const _0x5c6c16=a65_0x3700,_0x1a4e6d=await apiRequest('/client/user/loginUserInfo');if(!_0x1a4e6d[_0x5c6c16(0xbe)]||typeof _0x1a4e6d[_0x5c6c16(0xbe)]!==_0x5c6c16(0x113)||Array['isArray'](_0x1a4e6d['data']))throw CliErrors[_0x5c6c16(0x12a)](_0x5c6c16(0xd9));return _0x1a4e6d[_0x5c6c16(0xbe)];}export async function listDatasets(_0x3d3688,_0x460e1c){const _0xad68e1=a65_0x3700,_0x3a87df=await apiRequest(_0xad68e1(0xc4),{'method':_0xad68e1(0x10d),'body':{'appCode':_0x3d3688,..._0x460e1c?.['code']&&{'code':_0x460e1c[_0xad68e1(0xe8)]},..._0x460e1c?.[_0xad68e1(0xd0)]&&{'name':_0x460e1c[_0xad68e1(0xd0)]}}});return extractList(_0x3a87df[_0xad68e1(0xbe)]);}export async function getDatasetDetail(_0x2ed9f5){const _0x132135=a65_0x3700,_0xd5b1c7=/^\d+$/[_0x132135(0x10b)](_0x2ed9f5)?'id':'code',_0x10de28=await apiRequest('/client/dataset/query?'+_0xd5b1c7+'='+_0x2ed9f5);return _0x10de28[_0x132135(0xbe)];}export async function getDatasetSdkUsageDoc(_0x4d131c,_0xe3fc0a){const _0x48b234=a65_0x3700,_0x10ad74=await toolboxRequest(_0x48b234(0x129),{'datasetCode':_0x4d131c,'appCode':_0xe3fc0a});return typeof _0x10ad74?.[_0x48b234(0xe6)]===_0x48b234(0x100)?_0x10ad74[_0x48b234(0xe6)]:'';}export async function listRuntimeArtifacts(_0x2f7f96,_0x9c65d0){const _0x3e8ea2=a65_0x3700,_0x7af649=new URLSearchParams({'appCode':_0x2f7f96});if(_0x9c65d0?.[_0x3e8ea2(0xe3)])_0x7af649[_0x3e8ea2(0xc3)](_0x3e8ea2(0xe3),_0x9c65d0[_0x3e8ea2(0xe3)]);if(_0x9c65d0?.['source'])_0x7af649[_0x3e8ea2(0xc3)](_0x3e8ea2(0xb6),_0x9c65d0[_0x3e8ea2(0xb6)]);if(_0x9c65d0?.[_0x3e8ea2(0xe0)]!==undefined)_0x7af649['set'](_0x3e8ea2(0xe0),String(_0x9c65d0[_0x3e8ea2(0xe0)]));const _0x250503=await apiRequest(_0x3e8ea2(0x116)+_0x7af649[_0x3e8ea2(0xb9)]());return Array['isArray'](_0x250503[_0x3e8ea2(0xbe)])?_0x250503[_0x3e8ea2(0xbe)]:[];}export async function getRuntimeArtifact(_0x579ce6,_0xb15de0){const _0x50c706=a65_0x3700,_0x8c08c4=await apiRequest(_0x50c706(0x103)+_0x579ce6+_0x50c706(0x115)+encodeURIComponent(_0xb15de0));if(!_0x8c08c4[_0x50c706(0xbe)])throw CliErrors['validation'](_0x50c706(0x105)+_0x579ce6);return _0x8c08c4['data'];}export async function createRuntimeArtifact(_0x28166b,_0x36d0d8){const _0x48b126=a65_0x3700,_0x27371d=await apiRequest('/client/artifact/create',{'method':_0x48b126(0x10d),'body':{'appCode':_0x28166b,..._0x36d0d8}});return _0x27371d[_0x48b126(0xbe)];}export async function updateRuntimeArtifact(_0x544340,_0x4a5374,_0x3e7679){const _0x2901c0=a65_0x3700,_0x1f02fb=await apiRequest(_0x2901c0(0x103)+_0x544340+_0x2901c0(0xe7),{'method':_0x2901c0(0x10d),'body':{'appCode':_0x4a5374,..._0x3e7679}});return _0x1f02fb[_0x2901c0(0xbe)];}function a65_0x25ec(){const _0x356c0d=['stringify','from','string','namespace','10cnpEFT','/client/artifact/','displayName','Artifact\x20not\x20found:\x20id=','/client/knowledge-base/personal/create','API\x20error\x20code:\x20','Toolbox\x20API\x20error:\x20','API\x20error:\x20','authRequired','test','Toolbox\x20API\x20error','POST','base64','signal','description','replace','trim','object','invokeSource','?appCode=','/client/artifact/list?','tags','file','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','newConfigFileName','status','appName','9uyFmDL','Download\x20failed:\x20','701449dDPSHr','.zip','errorMsg','GET','/client/runtime-bff/personal/','PRIVATE','isArray','AbortError','appCode','878JrmHqX','api-doc-generator','apiError','topK','boolean','abort','searchParams','headlineVersion','json','tableData','5425428EZhoGj','slug','Configure\x20accessKey\x20in\x20','personal','msg','items','visibility','353796MSQQrS','source','application/zip','Check\x20your\x20credentials\x20and\x20try\x20again.','toString','/api/node-toolbox/','effective','scope','/client/bff/query/','data','1767aTXHyc','errorCode','/client/sql/query','/client/knowledge-base/search','set','/client/dataset/list','Toolbox\x20error\x20code:\x20','filter','11yuLfLc','company','content','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','ownerPreviewVersion','BFF\x20script\x20not\x20found:\x20id=','skillName','success','query','name','skill','Request\x20timeout:\x20','map','/execute?appCode=','/skills','1365370ChqJkc','SQL\x20query\x20not\x20found:\x20','catch','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','skillCode','4397336OhQNxt','/client/knowledge-base/personal/list?appCode=','summary','all','text','favorite','395571osIbAL','6fgMyXc','artifactType','/client/app/my-apps','Knowledge-base\x20entry\x20not\x20found:\x20id=','markdown','/update','code','NAMESPACE_ONLY','values','message','packageBase64','SkillHub\x20API\x20error:\x20','undefined','/client/knowledge-base/personal/','sqlCode','application/json','SkillHub\x20error\x20code:\x20','publishedVersion','/api/cli/v1/skills/','application/octet-stream','version','entries','validation','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/download','Missing\x20Skill\x20package\x20payload.','Personal\x20BFF\x20not\x20found:\x20id=','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'];a65_0x25ec=function(){return _0x356c0d;};return a65_0x25ec();}export async function listPersonalBffs(_0x474653){const _0x3b6995=a65_0x3700,_0x35b670=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x474653));return Array['isArray'](_0x35b670[_0x3b6995(0xbe)])?_0x35b670[_0x3b6995(0xbe)]:[];}export async function getPersonalBff(_0x44cbac,_0x4d91ac){const _0x4c2035=a65_0x3700,_0x7c458=await apiRequest(_0x4c2035(0x123)+_0x44cbac+_0x4c2035(0x115)+encodeURIComponent(_0x4d91ac));if(!_0x7c458[_0x4c2035(0xbe)])throw CliErrors[_0x4c2035(0xf8)](_0x4c2035(0xfc)+_0x44cbac);return _0x7c458[_0x4c2035(0xbe)];}export async function createPersonalBff(_0x28915c,_0x4c344a){const _0x339778=a65_0x3700,_0x550f8f=await apiRequest('/client/runtime-bff/personal/create',{'method':_0x339778(0x10d),'body':{'appCode':_0x28915c,..._0x4c344a}});return _0x550f8f['data'];}export async function updatePersonalBff(_0x338c83,_0x29db30,_0x3d2325){const _0x4a34dc=a65_0x3700,_0x57053b=await apiRequest('/client/runtime-bff/personal/'+_0x338c83+_0x4a34dc(0xe7),{'method':_0x4a34dc(0x10d),'body':{'appCode':_0x29db30,..._0x3d2325}});return _0x57053b[_0x4a34dc(0xbe)];}export async function executePersonalBff(_0x5aafc1,_0x2970e0,_0x258697){const _0x464aa=a65_0x3700,_0x43cf62=await apiRequest('/client/runtime-bff/personal/'+_0x5aafc1+_0x464aa(0xd4)+encodeURIComponent(_0x2970e0),{'method':'POST','body':_0x258697});return _0x43cf62['data'];}export async function listPersonalKnowledgeBaseItems(_0x1e6ca8){const _0x462f47=a65_0x3700,_0xca7d97=await apiRequest(_0x462f47(0xdc)+encodeURIComponent(_0x1e6ca8));return Array[_0x462f47(0x125)](_0xca7d97['data'])?_0xca7d97[_0x462f47(0xbe)]:[];}export async function getPersonalKnowledgeBaseItem(_0x1d309e,_0x82cbb6){const _0x1eb946=a65_0x3700,_0x355ab8=await apiRequest(_0x1eb946(0xef)+_0x1d309e+'?appCode='+encodeURIComponent(_0x82cbb6));if(!_0x355ab8[_0x1eb946(0xbe)])throw CliErrors['validation'](_0x1eb946(0xe5)+_0x1d309e);return _0x355ab8['data'];}export async function createPersonalKnowledgeBaseItem(_0x3af25a,_0x3566f6){const _0x23a585=a65_0x3700,_0x37d6ba=await apiRequest(_0x23a585(0x106),{'method':_0x23a585(0x10d),'body':{'appCode':_0x3af25a,..._0x3566f6}});return _0x37d6ba[_0x23a585(0xbe)];}export async function updatePersonalKnowledgeBaseItem(_0x49bea3,_0xb0c79e,_0x854650){const _0x3a84e7=a65_0x3700,_0x1f4afd=await apiRequest(_0x3a84e7(0xef)+_0x49bea3+_0x3a84e7(0xe7),{'method':_0x3a84e7(0x10d),'body':{'appCode':_0xb0c79e,..._0x854650}});return _0x1f4afd[_0x3a84e7(0xbe)];}export async function searchKnowledgeBase(_0xf4c16f,_0x36bc82){const _0x41931b=a65_0x3700,_0x343fc5=await apiRequest(_0x41931b(0xc2),{'method':_0x41931b(0x10d),'body':{'appCode':_0xf4c16f,'query':_0x36bc82[_0x41931b(0xcf)],..._0x36bc82['topK']!==undefined?{'topK':_0x36bc82[_0x41931b(0x12b)]}:{}}});return Array['isArray'](_0x343fc5[_0x41931b(0xbe)])?_0x343fc5['data']:[];}export async function listRuntimeSkills(_0x5df392){const _0x3264e8=a65_0x3700,_0x4552f5=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0x5df392[_0x3264e8(0x127)])+_0x3264e8(0xd5),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x5df392[_0x3264e8(0x127)],_0x4552f5,_0x5df392[_0x3264e8(0xbc)]??_0x3264e8(0xde),_0x5df392[_0x3264e8(0xe8)]);}export async function listPersonalRuntimeSkills(_0x1acbd){const _0x1d3723=a65_0x3700;return(await listRuntimeSkills({'appCode':_0x1acbd,'scope':'personal'}))[_0x1d3723(0xb1)];}export async function listCompanyRuntimeSkills(_0x5bebf3){return(await listRuntimeSkills({'appCode':_0x5bebf3,'scope':'company'}))['company'];}export async function listVisibleRuntimeSkills(_0x358a41){const _0x1ba150=a65_0x3700;return(await listRuntimeSkills({'appCode':_0x358a41,'scope':'all'}))[_0x1ba150(0xbb)];}export async function createPersonalRuntimeSkill(_0xba757e,_0x57fd70){return publishRuntimeSkill(_0xba757e,_0x57fd70);}function a65_0x3700(_0xd18229,_0x241ddd){_0xd18229=_0xd18229-0xb1;const _0x25ecc1=a65_0x25ec();let _0x370034=_0x25ecc1[_0xd18229];return _0x370034;}export async function updatePersonalRuntimeSkill(_0x527661,_0x17bbd9,_0x100f5c){const _0x550e9e=a65_0x3700;return publishRuntimeSkill(_0x17bbd9,{..._0x100f5c,'skillCode':_0x100f5c[_0x550e9e(0xda)]??_0x527661});}export async function downloadRuntimeSkillPackage(_0x1fc8af,_0x516d62,_0x5ce657,_0x733136){const _0x5b0276=a65_0x3700;void _0x1fc8af;const _0x4ab33e=_0x733136?_0x5b0276(0xf4)+encodeURIComponent(_0x5ce657)+'/'+encodeURIComponent(_0x516d62)+'/versions/'+encodeURIComponent(_0x733136)+'/download':'/api/cli/v1/skills/'+encodeURIComponent(_0x5ce657)+'/'+encodeURIComponent(_0x516d62)+_0x5b0276(0xfa);return skillHubBinaryRequest(_0x4ab33e);}async function publishRuntimeSkill(_0x2d0aee,_0x19a167){const _0x190c61=a65_0x3700,_0x1947a8=new FormData();_0x1947a8['set'](_0x190c61(0x118),runtimeSkillPackageFile(_0x19a167)),_0x1947a8[_0x190c61(0xc3)](_0x190c61(0xb4),_0x190c61(0x124));const _0x19ac95=await skillHubJsonRequest(_0x190c61(0xf4)+encodeURIComponent(_0x2d0aee)+'/publish',{'method':_0x190c61(0x10d),'body':_0x1947a8});return{'appCode':_0x19ac95[_0x190c61(0x101)]??_0x2d0aee,'skillCode':_0x19ac95[_0x190c61(0x133)]??_0x19a167[_0x190c61(0xda)]??'','skillName':_0x19a167[_0x190c61(0xcd)]??_0x19ac95['slug']??_0x19a167[_0x190c61(0xda)],'description':_0x19a167[_0x190c61(0x110)],'scope':skillHubVisibilityToScope(_0x19ac95[_0x190c61(0xb4)])??'personal','version':_0x19ac95[_0x190c61(0xf6)]??_0x19a167[_0x190c61(0xf6)],'tags':_0x19a167[_0x190c61(0x117)],'content':_0x19a167[_0x190c61(0xc9)]};}function runtimeSkillPackageFile(_0x1f78b7){const _0x45c06b=a65_0x3700;if(!_0x1f78b7['packageBase64'])throw CliErrors[_0x45c06b(0xf8)](_0x45c06b(0xfb));const _0x2a33a7=Buffer[_0x45c06b(0xff)](_0x1f78b7[_0x45c06b(0xec)],_0x45c06b(0x10e)),_0x5f3919=new Blob([_0x2a33a7],{'type':'application/zip'}),_0x19238c=(_0x1f78b7[_0x45c06b(0xda)]||_0x45c06b(0xd1))+_0x45c06b(0x120);if(typeof File!==_0x45c06b(0xee))return new File([_0x5f3919],_0x19238c,{'type':_0x45c06b(0xb7)});return _0x5f3919;}function normalizeSkillHubRuntimeListResponse(_0x4d235e,_0x3aa3f8,_0x440a20,_0x5599cd){const _0x168c4c=a65_0x3700,_0x49f8d4=Array['isArray'](_0x3aa3f8)?_0x3aa3f8:Array[_0x168c4c(0x125)](_0x3aa3f8?.[_0x168c4c(0xb3)])?_0x3aa3f8[_0x168c4c(0xb3)]:[],_0x4be92c=_0x5599cd?.[_0x168c4c(0x112)](),_0x836b8=_0x49f8d4[_0x168c4c(0xc6)](_0x556129=>!_0x4be92c||_0x556129[_0x168c4c(0x133)]===_0x4be92c)[_0x168c4c(0xd3)](skillHubRuntimeItemToRuntimeSkill)[_0x168c4c(0xc6)](_0x2e7709=>Boolean(_0x2e7709)),_0xd5b70e=_0x836b8[_0x168c4c(0xc6)](_0x3fec4f=>_0x3fec4f[_0x168c4c(0xbc)]===_0x168c4c(0xb1)),_0x1e24be=_0x836b8[_0x168c4c(0xc6)](_0x540c49=>_0x540c49[_0x168c4c(0xbc)]===_0x168c4c(0xc8));return{'appCode':_0x4d235e,'personal':_0x440a20==='company'?[]:_0xd5b70e,'company':_0x440a20===_0x168c4c(0xb1)?[]:_0x1e24be,'effective':buildEffectiveRuntimeSkills(_0xd5b70e,_0x1e24be,_0x440a20)};}function skillHubRuntimeItemToRuntimeSkill(_0x35b100){const _0x62c0f9=a65_0x3700,_0x143f11=_0x35b100[_0x62c0f9(0x133)]?.[_0x62c0f9(0x112)](),_0x16548c=skillHubVisibilityToScope(_0x35b100[_0x62c0f9(0xb4)]);if(!_0x143f11||!_0x16548c)return undefined;return{'id':_0x35b100['id'],'appCode':_0x35b100[_0x62c0f9(0x101)],'skillCode':_0x143f11,'skillName':_0x35b100[_0x62c0f9(0x104)]??_0x143f11,'description':_0x35b100[_0x62c0f9(0xdd)],'scope':_0x16548c,'version':skillHubRuntimeItemVersion(_0x35b100),'status':_0x35b100[_0x62c0f9(0x11b)]};}function skillHubVisibilityToScope(_0x251f0c){const _0xc87b40=a65_0x3700;if(_0x251f0c===_0xc87b40(0x124))return _0xc87b40(0xb1);if(_0x251f0c===_0xc87b40(0xe9))return _0xc87b40(0xc8);return undefined;}function skillHubRuntimeItemVersion(_0x1262fd){const _0x35382e=a65_0x3700;return _0x1262fd[_0x35382e(0xf3)]?.[_0x35382e(0xf6)]??_0x1262fd[_0x35382e(0x12f)]?.[_0x35382e(0xf6)]??_0x1262fd[_0x35382e(0xcb)]?.['version'];}function buildEffectiveRuntimeSkills(_0x3788c3,_0x70800a,_0x578f54){const _0xad216d=a65_0x3700;if(_0x578f54==='personal')return _0x3788c3;if(_0x578f54===_0xad216d(0xc8))return _0x70800a;const _0x17d77d=new Map();for(const _0x23514a of _0x70800a){_0x17d77d['set'](_0x23514a[_0xad216d(0xda)],_0x23514a);}for(const _0x2aa6c8 of _0x3788c3){_0x17d77d[_0xad216d(0xc3)](_0x2aa6c8['skillCode'],_0x2aa6c8);}return Array['from'](_0x17d77d[_0xad216d(0xea)]());}function normalizeRuntimeSkillListResponse(_0x25b779,_0x108040){const _0x6c0b8c=a65_0x3700;if(Array[_0x6c0b8c(0x125)](_0x108040)){const _0xd221aa=_0x108040['filter'](_0xb63471=>_0xb63471['scope']===_0x6c0b8c(0xb1)),_0x310232=_0x108040[_0x6c0b8c(0xc6)](_0xc8b107=>_0xc8b107['scope']===_0x6c0b8c(0xc8));return{'appCode':_0x25b779,'personal':_0xd221aa,'company':_0x310232,'effective':[..._0x310232,..._0xd221aa]};}return{'appCode':_0x108040?.[_0x6c0b8c(0x127)]??_0x25b779,'personal':Array[_0x6c0b8c(0x125)](_0x108040?.[_0x6c0b8c(0xb1)])?_0x108040['personal']:[],'company':Array['isArray'](_0x108040?.[_0x6c0b8c(0xc8)])?_0x108040[_0x6c0b8c(0xc8)]:[],'effective':Array[_0x6c0b8c(0x125)](_0x108040?.[_0x6c0b8c(0xbb)])?_0x108040[_0x6c0b8c(0xbb)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40d4af,_0x21fc6a){const _0x1a5c1a=a66_0x1f35,_0x79facb=_0x40d4af();while(!![]){try{const _0x59260a=parseInt(_0x1a5c1a(0x94))/0x1+parseInt(_0x1a5c1a(0x8b))/0x2*(parseInt(_0x1a5c1a(0x9a))/0x3)+parseInt(_0x1a5c1a(0x9b))/0x4+-parseInt(_0x1a5c1a(0x89))/0x5*(-parseInt(_0x1a5c1a(0x96))/0x6)+parseInt(_0x1a5c1a(0x9c))/0x7+-parseInt(_0x1a5c1a(0x95))/0x8*(-parseInt(_0x1a5c1a(0x8d))/0x9)+parseInt(_0x1a5c1a(0x90))/0xa*(-parseInt(_0x1a5c1a(0x8a))/0xb);if(_0x59260a===_0x21fc6a)break;else _0x79facb['push'](_0x79facb['shift']());}catch(_0x581feb){_0x79facb['push'](_0x79facb['shift']());}}}(a66_0x5c36,0x9a632));import{listDatasets}from'../core/api-client.js';function a66_0x5c36(){const _0x558526=['956979CjUvyB','get','dbtableConfig','10eFCVov','map','find','dbName','371120hzLuQp','88TVisdu','6HoQSmZ','entries','dbId','db-','10266ZVUcDZ','1246264ccCdOQ','1811243yLPylh','set','5484335aZJDoa','31041527ZnxMhR','144SBURQC','has'];a66_0x5c36=function(){return _0x558526;};return a66_0x5c36();}const cache=new Map();export async function listDatabases(_0x2dc9c0){const _0x2d6447=a66_0x1f35;if(cache[_0x2d6447(0x8c)](_0x2dc9c0))return cache[_0x2d6447(0x8e)](_0x2dc9c0);const _0x1c6987=await listDatasets(_0x2dc9c0),_0x2491a2=new Map();for(const _0x2cc7f of _0x1c6987){const _0x2ff3e1=_0x2cc7f[_0x2d6447(0x8f)];_0x2ff3e1?.['dbId']!=null&&_0x2491a2['set'](_0x2ff3e1[_0x2d6447(0x98)],_0x2ff3e1[_0x2d6447(0x93)]??_0x2d6447(0x99)+_0x2ff3e1['dbId']);}const _0x2ef432=[..._0x2491a2[_0x2d6447(0x97)]()][_0x2d6447(0x91)](([_0x16faca,_0x3b3693])=>({'dbId':_0x16faca,'dbName':_0x3b3693}));return cache[_0x2d6447(0x9d)](_0x2dc9c0,_0x2ef432),_0x2ef432;}function a66_0x1f35(_0x32613e,_0x936ef8){_0x32613e=_0x32613e-0x89;const _0x5c368a=a66_0x5c36();let _0x1f35bb=_0x5c368a[_0x32613e];return _0x1f35bb;}export async function getDbName(_0x3c1c8b,_0x54fc32){const _0x44b0f5=a66_0x1f35;try{const _0x498181=await listDatabases(_0x3c1c8b);return _0x498181[_0x44b0f5(0x92)](_0x33bb4d=>_0x33bb4d[_0x44b0f5(0x98)]===_0x54fc32)?.[_0x44b0f5(0x93)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ecf50,_0x44f4f1){const _0xd1dd94=a67_0x32d8,_0x489bbe=_0x3ecf50();while(!![]){try{const _0x26060a=-parseInt(_0xd1dd94(0x1c0))/0x1*(parseInt(_0xd1dd94(0x1b2))/0x2)+-parseInt(_0xd1dd94(0x1bf))/0x3*(parseInt(_0xd1dd94(0x1c5))/0x4)+-parseInt(_0xd1dd94(0x1c1))/0x5+-parseInt(_0xd1dd94(0x1a9))/0x6+-parseInt(_0xd1dd94(0x1ba))/0x7+-parseInt(_0xd1dd94(0x1af))/0x8*(-parseInt(_0xd1dd94(0x1a4))/0x9)+parseInt(_0xd1dd94(0x1a3))/0xa;if(_0x26060a===_0x44f4f1)break;else _0x489bbe['push'](_0x489bbe['shift']());}catch(_0xa34535){_0x489bbe['push'](_0x489bbe['shift']());}}}(a67_0x1ff6,0xbb7f7));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;function a67_0x32d8(_0xf79a72,_0x1d8421){_0xf79a72=_0xf79a72-0x19d;const _0x1ff68b=a67_0x1ff6();let _0x32d85e=_0x1ff68b[_0xf79a72];return _0x32d85e;}export function initSdkClient(_0x4c201c){const _0x3b88b1=a67_0x32d8;_client=createClient({'appCode':_0x4c201c[_0x3b88b1(0x19f)],'env':_0x4c201c[_0x3b88b1(0x1bd)],'authMode':_0x4c201c[_0x3b88b1(0x1a6)],..._0x4c201c[_0x3b88b1(0x19d)]?{'accessKey':_0x4c201c['accessKey']}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x3b88b1(0x1b3)]}}});}function ensureClient(){if(!_client)throw new Error('SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.');return _client;}function a67_0x1ff6(){const _0x3c65e0=['env','isArray','24324mlAmpo','665YuabsZ','7576245XYreRH','aggregate','batchCreate','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','460xGrbAr','validation','accessKey','data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.','appCode','sql','string','models','44195740jeYvPs','39213bVxglw','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','authMode',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.',']\x20must\x20be\x20an\x20object.','2990736NwQLqE','delete','object','execute','dataset_','getOne','1408ijJQXW','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','3668voPGzl','invokeSource','function','field','bff','data\x20aggregate\x20--params.aggregate[','trim','update','1768760JmeuGp','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','map'];a67_0x1ff6=function(){return _0x3c65e0;};return a67_0x1ff6();}function normalizeAggregateParams(_0x6e66f4){const _0x25bafa=a67_0x32d8,_0x6f9cc8=_0x6e66f4['aggregate'];if(_0x6f9cc8===undefined)return _0x6e66f4;if(!Array[_0x25bafa(0x1be)](_0x6f9cc8))throw CliErrors[_0x25bafa(0x1c6)](_0x25bafa(0x19e));return{..._0x6e66f4,'aggregate':_0x6f9cc8[_0x25bafa(0x1bc)]((_0x4ca450,_0x5974cf)=>{const _0x46f6ca=_0x25bafa;if(!_0x4ca450||typeof _0x4ca450!==_0x46f6ca(0x1ab)||Array[_0x46f6ca(0x1be)](_0x4ca450))throw CliErrors[_0x46f6ca(0x1c6)]('data\x20aggregate\x20--params.aggregate['+_0x5974cf+_0x46f6ca(0x1a8));const _0x4eccb5=_0x4ca450['column']??_0x4ca450[_0x46f6ca(0x1b5)];if(typeof _0x4eccb5!==_0x46f6ca(0x1a1)||_0x4eccb5[_0x46f6ca(0x1b8)]()==='')throw CliErrors['validation'](_0x46f6ca(0x1b7)+_0x5974cf+_0x46f6ca(0x1a7));const _0x8b7c={..._0x4ca450,'column':_0x4eccb5};return delete _0x8b7c['field'],_0x8b7c;})};}export async function executeData(_0x9397ba,_0x1e8b20,_0x11a85b){const _0x36b813=a67_0x32d8,_0xd5a9e9=ensureClient(),_0x21de6e=_0x36b813(0x1ad)+_0x9397ba,_0x203ee8=_0xd5a9e9[_0x36b813(0x1a2)][_0x21de6e];if(!_0x203ee8||typeof _0x203ee8[_0x1e8b20]!==_0x36b813(0x1b4))throw new Error(_0x36b813(0x1b0)+_0x1e8b20+'\x22.\x20'+_0x36b813(0x1a5));if(_0x1e8b20==='batchCreate')return _0x203ee8[_0x36b813(0x1c3)](parseBatchCreateItemsFromParams(_0x11a85b));const _0x393ad3=_0x11a85b!==undefined&&_0x11a85b!==null&&!Array[_0x36b813(0x1be)](_0x11a85b)?_0x11a85b:{};switch(_0x1e8b20){case _0x36b813(0x1ae):{const _0x51adb9=_0x393ad3['id'];if(_0x51adb9===undefined||_0x51adb9===null)throw new Error(_0x36b813(0x1bb));return _0x203ee8[_0x36b813(0x1ae)](_0x51adb9);}case _0x36b813(0x1b9):{const {id:_0x485422,..._0x21db56}=_0x393ad3;if(_0x485422===undefined||_0x485422===null)throw new Error(_0x36b813(0x1c4));return _0x203ee8[_0x36b813(0x1b9)](_0x485422,_0x21db56);}case _0x36b813(0x1aa):{const _0x53ca30=_0x393ad3['id'];if(_0x53ca30===undefined||_0x53ca30===null)throw new Error(_0x36b813(0x1b1));return _0x203ee8['delete'](_0x53ca30);}case _0x36b813(0x1c2):return _0x203ee8['aggregate'](normalizeAggregateParams(_0x393ad3));default:return _0x203ee8[_0x1e8b20](_0x393ad3);}}export async function executeSdkSql(_0xe8bc3b,_0x54f1be){const _0x2a4c68=a67_0x32d8,_0x563390=ensureClient();return _0x563390[_0x2a4c68(0x1a0)][_0x2a4c68(0x1ac)]({'sqlCode':_0xe8bc3b,'params':_0x54f1be});}export async function executeSdkBff(_0x1d5638,_0x4f37ae){const _0xcda791=a67_0x32d8,_0x5c7101=ensureClient();return _0x5c7101[_0xcda791(0x1b6)]['execute']({'scriptName':_0x1d5638,'params':_0x4f37ae});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a68_0x1370bf=a68_0x16c4;(function(_0x1b1c21,_0x588738){const _0x1b8116=a68_0x16c4,_0x18b05c=_0x1b1c21();while(!![]){try{const _0x36e678=-parseInt(_0x1b8116(0x1d5))/0x1+-parseInt(_0x1b8116(0x1d4))/0x2*(-parseInt(_0x1b8116(0x1d6))/0x3)+-parseInt(_0x1b8116(0x1cb))/0x4+-parseInt(_0x1b8116(0x1cf))/0x5*(-parseInt(_0x1b8116(0x1d1))/0x6)+-parseInt(_0x1b8116(0x1ce))/0x7*(-parseInt(_0x1b8116(0x1c8))/0x8)+parseInt(_0x1b8116(0x1d2))/0x9*(parseInt(_0x1b8116(0x1d0))/0xa)+-parseInt(_0x1b8116(0x1d3))/0xb;if(_0x36e678===_0x588738)break;else _0x18b05c['push'](_0x18b05c['shift']());}catch(_0x287651){_0x18b05c['push'](_0x18b05c['shift']());}}}(a68_0x4e17,0x823c2));function a68_0x4e17(){const _0x4b70ac=['1142205mGgLCv','9360370WWdGpI','18HlslUB','9YtIPGL','7662633BLHObI','2NSGjxR','524491ptQbhd','2087478kWYwdR','\x20file.','5512ofVYMu','\x20auth\x20login`.','Set\x20appcode\x20via\x20--appcode\x20or\x20','3047084XYTjtN','newConfigFileName','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','2023FNeSay'];a68_0x4e17=function(){return _0x4b70ac;};return a68_0x4e17();}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a68_0x16c4(_0x16c04a,_0x2fc76f){_0x16c04a=_0x16c04a-0x1c7;const _0x4e17d7=a68_0x4e17();let _0x16c4e1=_0x4e17d7[_0x16c04a];return _0x16c4e1;}import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'\x20or\x20run\x20`'+CLI_BIN_NAME+a68_0x1370bf(0x1c9),'configMissingHint':a68_0x1370bf(0x1ca)+PRODUCT_CONFIG['newConfigFileName']+'.','notInProjectHint':a68_0x1370bf(0x1cd)+PRODUCT_CONFIG[a68_0x1370bf(0x1cc)]+a68_0x1370bf(0x1c7)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1004c4,_0x18cad6){var _0x73bbf2=a69_0x2992,_0x1f0e0f=_0x1004c4();while(!![]){try{var _0x1d45ec=-parseInt(_0x73bbf2(0x1ba))/0x1*(-parseInt(_0x73bbf2(0x1bd))/0x2)+parseInt(_0x73bbf2(0x1b8))/0x3+parseInt(_0x73bbf2(0x1b6))/0x4+parseInt(_0x73bbf2(0x1bb))/0x5+parseInt(_0x73bbf2(0x1b7))/0x6+-parseInt(_0x73bbf2(0x1bc))/0x7*(-parseInt(_0x73bbf2(0x1b9))/0x8)+-parseInt(_0x73bbf2(0x1be))/0x9;if(_0x1d45ec===_0x18cad6)break;else _0x1f0e0f['push'](_0x1f0e0f['shift']());}catch(_0x88df67){_0x1f0e0f['push'](_0x1f0e0f['shift']());}}}(a69_0x22f9,0x92fcd));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a69_0x215f91}from'@lovrabet/cli-framework';function a69_0x2992(_0x112bae,_0x4f9f80){_0x112bae=_0x112bae-0x1b6;var _0x22f918=a69_0x22f9();var _0x2992b5=_0x22f918[_0x112bae];return _0x2992b5;}export function buildAllFlags(_0xcdb7f4){return a69_0x215f91(_0xcdb7f4,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}function a69_0x22f9(){var _0x5acbdb=['1861fFaRrd','3924235udcdNy','7lkHFEg','902HYbrUe','32539572gEurkc','4666644tcTjft','3345414UuwzcR','357000XOnAbJ','6001448tpLygp'];a69_0x22f9=function(){return _0x5acbdb;};return a69_0x22f9();}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2baf2a,_0x585883){const _0x3a72f8=a70_0x2b9f,_0x1be547=_0x2baf2a();while(!![]){try{const _0x35a009=parseInt(_0x3a72f8(0x91))/0x1*(-parseInt(_0x3a72f8(0x92))/0x2)+parseInt(_0x3a72f8(0x8e))/0x3+parseInt(_0x3a72f8(0x8f))/0x4+-parseInt(_0x3a72f8(0x8d))/0x5+-parseInt(_0x3a72f8(0x95))/0x6+parseInt(_0x3a72f8(0x94))/0x7*(parseInt(_0x3a72f8(0x8c))/0x8)+parseInt(_0x3a72f8(0x93))/0x9;if(_0x35a009===_0x585883)break;else _0x1be547['push'](_0x1be547['shift']());}catch(_0x5b9a32){_0x1be547['push'](_0x1be547['shift']());}}}(a70_0x5d85,0x22fb4));export function dryRun(_0x59962e,_0x431bd8){const _0x3ed156={'method':_0x59962e,'url':_0x431bd8},_0x29b14a={'body'(_0x3468d8){const _0x1c49e5=a70_0x2b9f;return _0x3ed156[_0x1c49e5(0x90)]=_0x3468d8,_0x29b14a;},'description'(_0x303fc3){const _0x3daef6=a70_0x2b9f;return _0x3ed156[_0x3daef6(0x96)]=_0x303fc3,_0x29b14a;},'build'(){return{..._0x3ed156};}};return _0x29b14a;}function a70_0x2b9f(_0x5e8a75,_0x169eff){_0x5e8a75=_0x5e8a75-0x8c;const _0x5d85d7=a70_0x5d85();let _0x2b9f2d=_0x5d85d7[_0x5e8a75];return _0x2b9f2d;}function a70_0x5d85(){const _0xe8b81c=['1376262lYadua','description','40sdIjyp','455985MoppiY','68919vPZaNq','1040144zKvbkx','body','269PRvOFp','2038aqPVop','3983625GnNIwl','17269gfzzYO'];a70_0x5d85=function(){return _0xe8b81c;};return a70_0x5d85();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a71_0x592afd=a71_0x1f27;(function(_0x1e9955,_0x2f001b){const _0x6e9bd5=a71_0x1f27,_0x3cd58b=_0x1e9955();while(!![]){try{const _0x36149d=parseInt(_0x6e9bd5(0xbd))/0x1+-parseInt(_0x6e9bd5(0xb3))/0x2+parseInt(_0x6e9bd5(0xb9))/0x3*(-parseInt(_0x6e9bd5(0xb7))/0x4)+parseInt(_0x6e9bd5(0xb5))/0x5*(parseInt(_0x6e9bd5(0xbb))/0x6)+-parseInt(_0x6e9bd5(0xb6))/0x7*(parseInt(_0x6e9bd5(0xb8))/0x8)+-parseInt(_0x6e9bd5(0xb1))/0x9*(parseInt(_0x6e9bd5(0xb2))/0xa)+parseInt(_0x6e9bd5(0xba))/0xb*(parseInt(_0x6e9bd5(0xb4))/0xc);if(_0x36149d===_0x2f001b)break;else _0x3cd58b['push'](_0x3cd58b['shift']());}catch(_0x485743){_0x3cd58b['push'](_0x3cd58b['shift']());}}}(a71_0x1d5f,0x93fd8));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a71_0x1f27(_0xcf7e45,_0x27faeb){_0xcf7e45=_0xcf7e45-0xb1;const _0x1d5f55=a71_0x1d5f();let _0x1f278f=_0x1d5f55[_0xcf7e45];return _0x1f278f;}function a71_0x1d5f(){const _0x3bf2c8=['6740CYJhTa','1284430cHmIzF','1212Oauwpi','5aMcJdY','14mrIrfd','12yizYap','127016HhzaTU','669198MhmiPh','145211rpaWau','2318586JSutXf','parseFlags','389341KSTgvN','2133oFKqZT'];a71_0x1d5f=function(){return _0x3bf2c8;};return a71_0x1d5f();}const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a71_0x592afd(0xbc)];export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x147d00,_0x338fd){const _0x5552f9=a72_0x4c0d,_0xe92e6b=_0x147d00();while(!![]){try{const _0x5b010a=parseInt(_0x5552f9(0xa0))/0x1+-parseInt(_0x5552f9(0xab))/0x2+-parseInt(_0x5552f9(0xa6))/0x3+-parseInt(_0x5552f9(0xad))/0x4+parseInt(_0x5552f9(0xaa))/0x5+-parseInt(_0x5552f9(0xac))/0x6+parseInt(_0x5552f9(0xa4))/0x7;if(_0x5b010a===_0x338fd)break;else _0xe92e6b['push'](_0xe92e6b['shift']());}catch(_0x11601b){_0xe92e6b['push'](_0xe92e6b['shift']());}}}(a72_0x2834,0xe0eb3));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{getDynamicServiceDefinitions,getDynamicServiceEntry,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a72_0x4c0d(_0x7e51fb,_0x315938){_0x7e51fb=_0x7e51fb-0x9e;const _0x28349e=a72_0x2834();let _0x4c0dd2=_0x28349e[_0x7e51fb];return _0x4c0dd2;}function createGenerators(){const _0x1e784a=a72_0x4c0d;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[...serviceRegistry,...safeListDynamicServiceEntries()],'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x1e784a(0xa2)+PRODUCT_CONFIG[_0x1e784a(0x9e)]+_0x1e784a(0xae)});}export function generateCommandHelp(_0x187cb0){const _0x18f819=a72_0x4c0d;return createGenerators()[_0x18f819(0x9f)](_0x187cb0);}export function generateServiceHelp(_0x4dc8ed){const _0x1c7578=a72_0x4c0d;return createGenerators()[_0x1c7578(0xa3)](_0x4dc8ed);}export function generateFullHelp(){return createGenerators()['generateFullHelp']();}function a72_0x2834(){const _0xc36f2c=['11190228ugSQAG','filter','978240XXwvdX','service','map','get','2448430BLaqkV','288716IIEHvy','3658776hFzbui','5680620HJYbsi','\x20or\x20--appcode).','newConfigFileName','generateCommandHelp','1333366aKYZtt','has','Requires\x20appcode\x20(set\x20via\x20','generateServiceHelp'];a72_0x2834=function(){return _0xc36f2c;};return a72_0x2834();}function getAnyServiceEntry(_0x3c3bf8){const _0x48c501=getServiceEntry(_0x3c3bf8);if(_0x48c501)return _0x48c501;try{return getDynamicServiceEntry(_0x3c3bf8);}catch{return undefined;}}function getAnyServiceDefinitions(_0x1341d2){const _0x255549=a72_0x4c0d,_0x30ae6f=serviceGroups[_0x255549(0xa9)](_0x1341d2);if(_0x30ae6f)return _0x30ae6f;try{return getDynamicServiceDefinitions(_0x1341d2);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x1162f5=a72_0x4c0d,_0x189ffd=new Set(serviceRegistry[_0x1162f5(0xa8)](_0x3ae7e5=>_0x3ae7e5[_0x1162f5(0xa7)]));try{return listDynamicServiceEntries()[_0x1162f5(0xa5)](_0x16fbe9=>!_0x189ffd[_0x1162f5(0xa1)](_0x16fbe9[_0x1162f5(0xa7)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb84b80,_0x31addc){var _0x4d5169=a73_0x1dd9,_0x5cf391=_0xb84b80();while(!![]){try{var _0x2c9bb3=-parseInt(_0x4d5169(0x162))/0x1+-parseInt(_0x4d5169(0x163))/0x2+-parseInt(_0x4d5169(0x15d))/0x3+parseInt(_0x4d5169(0x160))/0x4*(parseInt(_0x4d5169(0x15f))/0x5)+-parseInt(_0x4d5169(0x15c))/0x6+parseInt(_0x4d5169(0x15e))/0x7+parseInt(_0x4d5169(0x161))/0x8;if(_0x2c9bb3===_0x31addc)break;else _0x5cf391['push'](_0x5cf391['shift']());}catch(_0x293721){_0x5cf391['push'](_0x5cf391['shift']());}}}(a73_0x10e9,0xc77f9));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';function a73_0x1dd9(_0x54ef1d,_0x13dee2){_0x54ef1d=_0x54ef1d-0x15c;var _0x10e9c0=a73_0x10e9();var _0x1dd9f6=_0x10e9c0[_0x54ef1d];return _0x1dd9f6;}export{dryRun}from'../framework/dryrun.js';export{riskLevelOrder,isValidFormat}from'../framework/types.js';function a73_0x10e9(){var _0x1477cf=['170832qGzjWU','302202ThJULR','499396abSwum','733434Lpnqsl','871944OepoNQ','10068884lhNdsD','123910ybzqUQ','52bmHEgi'];a73_0x10e9=function(){return _0x1477cf;};return a73_0x10e9();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d26c0,_0x15bbfe){const _0x4c1289=a74_0x405e,_0x22dc13=_0x1d26c0();while(!![]){try{const _0x393d0d=parseInt(_0x4c1289(0x1be))/0x1*(parseInt(_0x4c1289(0x1b6))/0x2)+parseInt(_0x4c1289(0x1b5))/0x3+parseInt(_0x4c1289(0x1ba))/0x4*(parseInt(_0x4c1289(0x1b7))/0x5)+parseInt(_0x4c1289(0x1b4))/0x6*(-parseInt(_0x4c1289(0x1c1))/0x7)+parseInt(_0x4c1289(0x1b3))/0x8+-parseInt(_0x4c1289(0x1c2))/0x9+-parseInt(_0x4c1289(0x1b8))/0xa;if(_0x393d0d===_0x15bbfe)break;else _0x22dc13['push'](_0x22dc13['shift']());}catch(_0xd4c322){_0x22dc13['push'](_0x22dc13['shift']());}}}(a74_0x2361,0x8e94f));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a74_0x405e(_0x10ccc7,_0x13b920){_0x10ccc7=_0x10ccc7-0x1b3;const _0x23616f=a74_0x2361();let _0x405e74=_0x23616f[_0x10ccc7];return _0x405e74;}function a74_0x2361(){const _0x413207=['_notice','pretty','17Tdoalj','error','url','1645OBvCnC','8130726KkOnVO','format','4922992BHEioL','15522BFfDus','602082DEkSiQ','109014CprOro','15970ZmjTEL','7588250YLLAAt','update','1392pJojUK','message'];a74_0x2361=function(){return _0x413207;};return a74_0x2361();}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x20910d,_0x3d5ec1){const _0x13bd4c=a74_0x405e,_0x2c26a3=_0x20910d[_0x13bd4c(0x1bc)],{_notice:_0x1ac263,..._0x41d649}=_0x20910d;void _0x1ac263,baseFormatOutput(_0x41d649,_0x3d5ec1),_0x3d5ec1[_0x13bd4c(0x1c3)]===_0x13bd4c(0x1bd)&&printPrettyNotice(_0x2c26a3);}function printPrettyNotice(_0x3d70bd){const _0x5865e0=a74_0x405e;if(!_0x3d70bd?.[_0x5865e0(0x1b9)])return;console[_0x5865e0(0x1bf)](_0x3d70bd[_0x5865e0(0x1b9)][_0x5865e0(0x1bb)]+'\x20('+_0x3d70bd[_0x5865e0(0x1b9)][_0x5865e0(0x1c0)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2bb8c4,_0x48e535){const _0x51a9b6=a75_0x40a4,_0x2d1daf=_0x2bb8c4();while(!![]){try{const _0x3a63b0=-parseInt(_0x51a9b6(0x150))/0x1*(-parseInt(_0x51a9b6(0x164))/0x2)+parseInt(_0x51a9b6(0x16b))/0x3*(parseInt(_0x51a9b6(0x172))/0x4)+-parseInt(_0x51a9b6(0x14f))/0x5*(parseInt(_0x51a9b6(0x16c))/0x6)+-parseInt(_0x51a9b6(0x15b))/0x7+parseInt(_0x51a9b6(0x16f))/0x8*(parseInt(_0x51a9b6(0x171))/0x9)+-parseInt(_0x51a9b6(0x165))/0xa+parseInt(_0x51a9b6(0x16a))/0xb*(-parseInt(_0x51a9b6(0x156))/0xc);if(_0x3a63b0===_0x48e535)break;else _0x2d1daf['push'](_0x2d1daf['shift']());}catch(_0x2296a9){_0x2d1daf['push'](_0x2d1daf['shift']());}}}(a75_0x252a,0x78cca));function a75_0x252a(){const _0x42e5d1=['2936zKwlNY','string','11133BvXmny','26468dGbmqU','format','set','indexOf','boolean','entries','669145EoEMPR','203LvOZKi','keys','yes','toLowerCase','toUpperCase','slice','192540hXkoQH','name','help','app','type','3164231RtIbft','global','get','dry-run','replace','corrected','non-interactive','add','original','7018bOSqpL','2555420dpcVal','push','has','env','appcode','11umSkCH','327wzWylw','30cZZzne','length','number'];a75_0x252a=function(){return _0x42e5d1;};return a75_0x252a();}function toKebab(_0xce11fd){const _0x73398e=a75_0x40a4;return _0xce11fd['replace'](/_/g,'-')[_0x73398e(0x15f)](/-([A-Z]+)/g,(_0xd848f6,_0x6f7252)=>'-'+_0x6f7252[_0x73398e(0x153)]())[_0x73398e(0x15f)](/([a-z0-9])([A-Z])/g,(_0x3b522f,_0x3d29ff,_0x3f4d28)=>_0x3d29ff+'-'+_0x3f4d28)[_0x73398e(0x153)]();}function a75_0x40a4(_0x2920f5,_0x4bfb89){_0x2920f5=_0x2920f5-0x14c;const _0x252a64=a75_0x252a();let _0x40a4ca=_0x252a64[_0x2920f5];return _0x40a4ca;}function buildKnownFlags(_0x5c612c){const _0x2a9045=a75_0x40a4,_0x1a1488=new Set();for(const _0x2a987d of _0x5c612c){_0x1a1488[_0x2a9045(0x162)](_0x2a987d[_0x2a9045(0x157)]),_0x1a1488[_0x2a9045(0x162)](toCamelCase(_0x2a987d[_0x2a9045(0x157)]));}for(const _0xfe57d4 of[_0x2a9045(0x15e),'dryRun',_0x2a9045(0x152),_0x2a9045(0x173)]){_0x1a1488['add'](_0xfe57d4);}for(const _0x21cddf of[_0x2a9045(0x158),_0x2a9045(0x168),_0x2a9045(0x169),_0x2a9045(0x159),'nonInteractive',_0x2a9045(0x161),'ci',_0x2a9045(0x15c),'version']){_0x1a1488[_0x2a9045(0x162)](_0x21cddf);}return _0x1a1488;}function buildFlagTypeMap(_0x51a1ca){const _0x5dbe41=a75_0x40a4,_0x5cb13a=new Map();for(const _0x26584c of _0x51a1ca){_0x5cb13a['set'](_0x26584c[_0x5dbe41(0x157)],_0x26584c[_0x5dbe41(0x15a)]),_0x5cb13a[_0x5dbe41(0x174)](toCamelCase(_0x26584c['name']),_0x26584c[_0x5dbe41(0x15a)]);}return _0x5cb13a;}function toCamelCase(_0x3a6908){const _0x9a9eb=a75_0x40a4;return _0x3a6908[_0x9a9eb(0x15f)](/-([a-z])/g,(_0x4db252,_0x15714d)=>_0x15714d[_0x9a9eb(0x154)]());}function aliasHandler(_0x54674a,_0x5988c6){const _0x10c92c=a75_0x40a4,_0x1152d8=[];for(const _0x4fd2b8 of Object[_0x10c92c(0x151)](_0x54674a)){if(_0x5988c6['has'](_0x4fd2b8))continue;const _0x1eeaf5=toKebab(_0x4fd2b8);_0x1eeaf5!==_0x4fd2b8&&_0x5988c6[_0x10c92c(0x167)](_0x1eeaf5)&&_0x1152d8[_0x10c92c(0x166)]({'original':_0x4fd2b8,'corrected':_0x1eeaf5,'handler':'alias'});}return _0x1152d8;}function stickyHandler(_0x4577dd,_0x4f16ec,_0x1802e6){const _0x49dd24=a75_0x40a4,_0x539ccb=[];for(const [_0x3ff40f,_0x5a8159]of Object[_0x49dd24(0x14e)](_0x4577dd)){if(_0x5a8159!==!![])continue;for(let _0x2a444e=_0x3ff40f[_0x49dd24(0x16d)]-0x1;_0x2a444e>0x0;_0x2a444e--){const _0x568447=_0x3ff40f[_0x49dd24(0x155)](0x0,_0x2a444e),_0x7afdb1=_0x3ff40f[_0x49dd24(0x155)](_0x2a444e),_0x31812e=toKebab(_0x568447),_0x9ff947=toCamelCase(_0x568447),_0x1c7aca=_0x4f16ec[_0x49dd24(0x167)](_0x568447)?_0x568447:_0x4f16ec[_0x49dd24(0x167)](_0x31812e)?_0x31812e:_0x4f16ec[_0x49dd24(0x167)](_0x9ff947)?_0x9ff947:null;if(!_0x1c7aca)continue;const _0x54968c=_0x1802e6[_0x49dd24(0x15d)](_0x1c7aca)??'string';let _0x83b60d;if(_0x54968c===_0x49dd24(0x16e)){const _0x25dee5=Number(_0x7afdb1);if(isNaN(_0x25dee5)||_0x7afdb1==='')continue;_0x83b60d=_0x25dee5;}else{if(_0x54968c===_0x49dd24(0x14d))continue;else{if(_0x7afdb1==='')continue;_0x83b60d=_0x7afdb1;}}_0x539ccb['push']({'original':_0x3ff40f,'corrected':_0x1c7aca+'='+_0x83b60d,'handler':'sticky'});break;}}return _0x539ccb;}export function correctFlags(_0x1ad7c4,_0x2bb80b){const _0x3c2c62=a75_0x40a4,_0x3cf768=buildKnownFlags(_0x2bb80b),_0x35bfad=buildFlagTypeMap(_0x2bb80b),_0x5843d5=aliasHandler(_0x1ad7c4,_0x3cf768),_0x28b41f=stickyHandler(_0x1ad7c4,_0x3cf768,_0x35bfad),_0x4f0ead=[..._0x5843d5,..._0x28b41f];if(_0x4f0ead[_0x3c2c62(0x16d)]===0x0)return{'flags':_0x1ad7c4,'corrections':[]};const _0x19f757={..._0x1ad7c4},_0x287a38=new Set();for(const _0x8f390e of _0x5843d5){_0x19f757[_0x8f390e[_0x3c2c62(0x160)]]=_0x1ad7c4[_0x8f390e[_0x3c2c62(0x163)]],_0x287a38['add'](_0x8f390e[_0x3c2c62(0x163)]);}for(const _0x7a6a2f of _0x28b41f){const _0x51ff6b=_0x7a6a2f[_0x3c2c62(0x160)][_0x3c2c62(0x14c)]('='),_0x1fff40=_0x7a6a2f[_0x3c2c62(0x160)][_0x3c2c62(0x155)](0x0,_0x51ff6b),_0x348aef=_0x7a6a2f[_0x3c2c62(0x160)]['slice'](_0x51ff6b+0x1),_0x4773bf=_0x35bfad['get'](_0x1fff40)??_0x3c2c62(0x170);_0x4773bf==='number'?_0x19f757[_0x1fff40]=Number(_0x348aef):_0x19f757[_0x1fff40]=_0x348aef,_0x287a38[_0x3c2c62(0x162)](_0x7a6a2f[_0x3c2c62(0x163)]);}for(const _0x345ab4 of _0x287a38){delete _0x19f757[_0x345ab4];}return{'flags':_0x19f757,'corrections':_0x4f0ead};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a76_0x20ca(_0x3d1f44,_0x4f8ce3){_0x3d1f44=_0x3d1f44-0x94;var _0x17fe75=a76_0x17fe();var _0x20cab5=_0x17fe75[_0x3d1f44];return _0x20cab5;}(function(_0x46ea1a,_0x486730){var _0x26550e=a76_0x20ca,_0x4ebaef=_0x46ea1a();while(!![]){try{var _0x211465=parseInt(_0x26550e(0x9c))/0x1*(parseInt(_0x26550e(0x9e))/0x2)+parseInt(_0x26550e(0x98))/0x3*(parseInt(_0x26550e(0x9f))/0x4)+parseInt(_0x26550e(0x9a))/0x5*(parseInt(_0x26550e(0x97))/0x6)+parseInt(_0x26550e(0x95))/0x7*(parseInt(_0x26550e(0x96))/0x8)+-parseInt(_0x26550e(0x99))/0x9*(-parseInt(_0x26550e(0x9b))/0xa)+-parseInt(_0x26550e(0x94))/0xb+-parseInt(_0x26550e(0x9d))/0xc;if(_0x211465===_0x486730)break;else _0x4ebaef['push'](_0x4ebaef['shift']());}catch(_0x5c4994){_0x4ebaef['push'](_0x4ebaef['shift']());}}}(a76_0x17fe,0x4f140));export{extractList,extractPaging}from'@lovrabet/cli-framework';function a76_0x17fe(){var _0x3f9106=['58492oaPlkF','152ShuVDV','6ysZZCt','408DOUdqa','9VyDiZi','1010330VNyHga','5392770AKyKqE','197QnTLbw','17030076bqVtKz','5836bOPsnY','10316RtcFTx','908820ZQiThB'];a76_0x17fe=function(){return _0x3f9106;};return a76_0x17fe();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12f00f,_0x366e93){const _0x13654a=a77_0x1647,_0xad36ff=_0x12f00f();while(!![]){try{const _0x2827d7=parseInt(_0x13654a(0x145))/0x1+-parseInt(_0x13654a(0x13c))/0x2*(parseInt(_0x13654a(0x14a))/0x3)+-parseInt(_0x13654a(0x143))/0x4+parseInt(_0x13654a(0x130))/0x5+parseInt(_0x13654a(0x13a))/0x6*(parseInt(_0x13654a(0x148))/0x7)+parseInt(_0x13654a(0x13d))/0x8*(parseInt(_0x13654a(0x141))/0x9)+-parseInt(_0x13654a(0x12e))/0xa;if(_0x2827d7===_0x366e93)break;else _0xad36ff['push'](_0xad36ff['shift']());}catch(_0x2810f3){_0xad36ff['push'](_0xad36ff['shift']());}}}(a77_0x66b7,0x9d11a));function a77_0x1647(_0x579586,_0x6f709e){_0x579586=_0x579586-0x12e;const _0x66b78e=a77_0x66b7();let _0x164715=_0x66b78e[_0x579586];return _0x164715;}import{CLI_BIN_NAME}from'../constant/cli.js';function a77_0x66b7(){const _0x27c82c=['description','service','9vaWCzX','id=','4311028FdiSSE','name','793445ebThPo','\x20\x20\x20Continue?\x20[y/N]\x20','command','91kPcBYJ','params','818589eTAqlV','4128970mWCnYC','join','3735750ESgNaE','affectedRecords','params=','code','push','--yes','commandLabel','code=','name=','\x20\x20\x20Affected:\x20','431202yEULKq','⚠\x20\x20High-risk\x20operation:\x20','6oMgXZF','3821848iTNgjx','stringify'];a77_0x66b7=function(){return _0x27c82c;};return a77_0x66b7();}export function buildConfirmationLines(_0x3df83f,_0x59ffdc,_0x40ddbb){const _0x58d919=a77_0x1647,_0x139cac=buildConfirmationContext(_0x3df83f,_0x59ffdc,_0x40ddbb),_0x137187=[_0x58d919(0x13b)+_0x139cac[_0x58d919(0x136)]];return _0x139cac[_0x58d919(0x13f)]&&_0x137187['push']('\x20\x20\x20'+_0x139cac[_0x58d919(0x13f)]),_0x139cac[_0x58d919(0x131)]&&_0x137187[_0x58d919(0x134)](_0x58d919(0x139)+_0x139cac[_0x58d919(0x131)]),_0x137187[_0x58d919(0x134)](_0x58d919(0x146)),_0x137187;}export function reconstructCommandArgv(_0x3d2b00,_0x1daa22){const _0x17ab6e=a77_0x1647,_0x582105=[CLI_BIN_NAME,_0x3d2b00[_0x17ab6e(0x140)],_0x3d2b00[_0x17ab6e(0x147)]];for(const [_0x5e3378,_0x8f6292]of Object['entries'](_0x1daa22)){if(_0x8f6292===!![])_0x582105[_0x17ab6e(0x134)]('--'+_0x5e3378);else _0x8f6292!==![]&&_0x8f6292!==undefined&&_0x8f6292!==''&&_0x582105[_0x17ab6e(0x134)]('--'+_0x5e3378+'\x20'+JSON[_0x17ab6e(0x13e)](_0x8f6292));}return _0x582105[_0x17ab6e(0x134)](_0x17ab6e(0x135)),_0x582105[_0x17ab6e(0x12f)]('\x20');}function buildConfirmationContext(_0x2b3613,_0x26d8a4,_0x117924){const _0x15e1e2=extractAffectedRecords(_0x117924);return{'commandLabel':_0x26d8a4,'description':_0x2b3613['description'],'affectedRecords':_0x15e1e2};}function extractAffectedRecords(_0x11aacb){const _0x4306d9=a77_0x1647,_0x25f807=[];if(_0x11aacb[_0x4306d9(0x133)])_0x25f807[_0x4306d9(0x134)](_0x4306d9(0x137)+_0x11aacb[_0x4306d9(0x133)]);if(_0x11aacb['id'])_0x25f807[_0x4306d9(0x134)](_0x4306d9(0x142)+_0x11aacb['id']);if(_0x11aacb['name'])_0x25f807[_0x4306d9(0x134)](_0x4306d9(0x138)+_0x11aacb[_0x4306d9(0x144)]);if(_0x11aacb[_0x4306d9(0x149)])_0x25f807[_0x4306d9(0x134)](_0x4306d9(0x132)+_0x11aacb[_0x4306d9(0x149)]);return _0x25f807['length']>0x0?_0x25f807[_0x4306d9(0x12f)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a78_0x4229(){const _0x26e1aa=['stringify','validation','7HcGfex','1311048BsxQUZ','932kGuyqz','trim','826398gGHqLw','324492YcLyeN','string','10495DtPNVS','2AYqsMX','21014240YdGmqH','4158064lvLLaW','message','1087323MCOAbS'];a78_0x4229=function(){return _0x26e1aa;};return a78_0x4229();}(function(_0x2a2812,_0x5e36a8){const _0x21e1d5=a78_0x226a,_0x4387f1=_0x2a2812();while(!![]){try{const _0x51edf4=-parseInt(_0x21e1d5(0x117))/0x1+parseInt(_0x21e1d5(0x113))/0x2*(-parseInt(_0x21e1d5(0x10c))/0x3)+parseInt(_0x21e1d5(0x10d))/0x4*(parseInt(_0x21e1d5(0x112))/0x5)+parseInt(_0x21e1d5(0x110))/0x6+parseInt(_0x21e1d5(0x11a))/0x7*(-parseInt(_0x21e1d5(0x115))/0x8)+parseInt(_0x21e1d5(0x10f))/0x9+parseInt(_0x21e1d5(0x114))/0xa;if(_0x51edf4===_0x5e36a8)break;else _0x4387f1['push'](_0x4387f1['shift']());}catch(_0x371d71){_0x4387f1['push'](_0x4387f1['shift']());}}}(a78_0x4229,0xa904a));import{LovrabetError}from'@lovrabet/sdk';function a78_0x226a(_0x8dc00f,_0x2e9d75){_0x8dc00f=_0x8dc00f-0x10c;const _0x422925=a78_0x4229();let _0x226adf=_0x422925[_0x8dc00f];return _0x226adf;}import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x2b0867){const _0x10ef8f=a78_0x226a;if(_0x2b0867 instanceof LovrabetError)return CliErrors[_0x10ef8f(0x119)](userFacingLovrabetMessage(_0x2b0867));return _0x2b0867;}function userFacingLovrabetMessage(_0x57f17a){const _0xdf29a0=a78_0x226a,_0x35abb2=_0x57f17a['description'];if(_0x35abb2!==undefined&&_0x35abb2!==null){if(typeof _0x35abb2===_0xdf29a0(0x111)&&_0x35abb2[_0xdf29a0(0x10e)]())return _0x35abb2[_0xdf29a0(0x10e)]();try{return JSON[_0xdf29a0(0x118)](_0x35abb2);}catch{}}return _0x57f17a[_0xdf29a0(0x116)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a70_0x255ede=a70_0x5d80;(function(_0x110126,_0x4cec4e){const _0x3404ff=a70_0x5d80,_0x2dfa8c=_0x110126();while(!![]){try{const _0x40c971=parseInt(_0x3404ff(0x196))/0x1*(parseInt(_0x3404ff(0x1a0))/0x2)+parseInt(_0x3404ff(0x188))/0x3*(-parseInt(_0x3404ff(0x195))/0x4)+parseInt(_0x3404ff(0x1b6))/0x5+-parseInt(_0x3404ff(0x198))/0x6+-parseInt(_0x3404ff(0x18a))/0x7+parseInt(_0x3404ff(0x19d))/0x8+parseInt(_0x3404ff(0x17f))/0x9;if(_0x40c971===_0x4cec4e)break;else _0x2dfa8c['push'](_0x2dfa8c['shift']());}catch(_0x92af10){_0x2dfa8c['push'](_0x2dfa8c['shift']());}}}(a70_0x19f9,0xb0038));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';function a70_0x5d80(_0xa5fbb7,_0x27bd90){_0xa5fbb7=_0xa5fbb7-0x17e;const _0x19f9d7=a70_0x19f9();let _0x5d80b7=_0x19f9d7[_0xa5fbb7];return _0x5d80b7;}import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';function a70_0x19f9(){const _0x4e2366=['../commands/app/remote-source.js','755085JzKsfD','APPCODE','error','requiresAppCode','format','accessKey','apiDomain','../core/api-client.js','map','5174091bPeKiT','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','newConfigFileName','cancelled','production','currentApp','nonInteractive','appCode','15AyuccM','update','2364915HPyHvP','mergedCli','filter','schema','pretty','name','.appcode\x20to\x20','has','catch','appcode','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','356620YZNCkE','44207yXcSVW','local-alias','2770188fNqZUQ','service','execute','defaultPageSize','app','374120ZgbPwX','validation','trim','54PhtYhF','string','env','pageSize','defaultApp','includes','_notice','High-risk\x20operation\x20`','requiresAuth','rawFlags','appcode\x20\x22','object','Set\x20accessKey\x20in\x20','configMissing','command','items','\x20\x20To\x20proceed:\x20','Unknown\x20app:\x20','riskLevel','authRequired','ACCESS_KEY'];a70_0x19f9=function(){return _0x4e2366;};return a70_0x19f9();}export function resolveAuthMode(_0x1b938c){return void _0x1b938c,AUTH_MODE['ClientAk'];}export function createPipelineEnv(_0x22a08d,_0x492cb4){const _0x2662f5=a70_0x5d80,_0x39237a=typeof _0x492cb4[_0x2662f5(0x19c)]===_0x2662f5(0x1a1)&&_0x492cb4[_0x2662f5(0x19c)][_0x2662f5(0x19f)]();return{'rawFlags':_0x492cb4,'appCode':_0x22a08d[_0x2662f5(0x187)]||productEnv('APPCODE')||(_0x39237a?undefined:readAppCodeFromConfig()),'appCodeSource':_0x22a08d['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x492cb4),'defaultFormat':_0x22a08d[_0x2662f5(0x1ba)],'defaultPageSize':_0x22a08d[_0x2662f5(0x1a3)],'defaultVerbose':_0x22a08d['verbose'],'riskLevel':_0x22a08d[_0x2662f5(0x1b2)],'accessKey':_0x22a08d[_0x2662f5(0x1bb)],'env':_0x22a08d['env'],'mergedCli':{'defaultApp':_0x22a08d[_0x2662f5(0x1a4)],'currentApp':_0x22a08d['currentApp'],'appCode':_0x22a08d[_0x2662f5(0x187)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a70_0x255ede(0x18c)](_0x565641=>PIPELINE_FLAG_NAMES[a70_0x255ede(0x191)](_0x565641[a70_0x255ede(0x18f)]))[a70_0x255ede(0x17e)](({name:_0x4d4060,type:_0x4856a2,description:_0x339698})=>({'name':_0x4d4060,'type':_0x4856a2,'description':_0x339698})),'formatOutput':formatOutput,'getCommandLabel'(_0x2b5b44){const _0x593e6e=a70_0x255ede;return CLI_BIN_NAME+'\x20'+_0x2b5b44[_0x593e6e(0x199)]+'\x20'+_0x2b5b44[_0x593e6e(0x1ae)];},'riskPolicy':{'onViolation'(_0x313f55){const _0x1b87ad=a70_0x255ede;console[_0x1b87ad(0x1b8)](_0x313f55);},'createError'(_0x17b2e7){return CliErrors['cancelled'](_0x17b2e7);}},async 'prepare'(_0x20fdd4,_0x2e3216){const _0x2d5f90=a70_0x255ede,_0x15c3ec=resolveAuthMode(_0x2e3216);if(_0x20fdd4[_0x2d5f90(0x1a8)]!==![]){if(!_0x2e3216['accessKey'])throw CliErrors[_0x2d5f90(0x1b3)](_0x2d5f90(0x1ac)+PRODUCT_CONFIG['newConfigFileName']+'\x20or\x20pass\x20'+productEnvName(_0x2d5f90(0x1b4))+'.');const {setActiveAK:_0x451606}=await import(_0x2d5f90(0x1bd));_0x451606(_0x2e3216[_0x2d5f90(0x1bb)]);}let _0xf3bca8='';if(_0x20fdd4[_0x2d5f90(0x1b9)]!==![]){_0xf3bca8=_0x2e3216['appCode']??'',_0xf3bca8=await resolveExplicitAppName(_0x20fdd4,_0x2e3216,_0xf3bca8);if(!_0xf3bca8){await assertSelectedAppNameIsRuntimeAccessible(_0x20fdd4,_0x2e3216);throw CliErrors[_0x2d5f90(0x1ad)](_0x2d5f90(0x181)+PRODUCT_CONFIG[_0x2d5f90(0x182)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x20fdd4,_0x2e3216,_0xf3bca8);}if(_0xf3bca8){const {initSdkClient:_0x4ffc8e}=await import('../core/sdk-client.js');_0x4ffc8e({'appCode':_0xf3bca8,'env':_0x2e3216[_0x2d5f90(0x1a2)]??_0x2d5f90(0x184),'accessKey':_0x2e3216[_0x2d5f90(0x1bb)],'authMode':_0x15c3ec});}return{'defaults':{'booleans':{'verbose':_0x2e3216['defaultVerbose']},'numbers':{'pagesize':_0x2e3216[_0x2d5f90(0x19b)]}},'extras':{'appCode':_0xf3bca8,'cookie':'','apiDomain':_0x2e3216[_0x2d5f90(0x1bc)],'apiDir':'','accessKey':_0x2e3216['accessKey'],'envName':_0x2e3216[_0x2d5f90(0x1a2)],'mergedCli':_0x2e3216[_0x2d5f90(0x18b)]}};},async 'confirmHighRisk'({def:_0x532cfe,env:_0x495345,flags:_0x2191a3,commandLabel:_0x3876ac}){const _0x2d5871=a70_0x255ede;if(_0x495345['isNonInteractive']){const _0x4bf07d=reconstructCommandArgv(_0x532cfe,_0x2191a3);throw CliErrors[_0x2d5871(0x19e)](_0x2d5871(0x1a7)+_0x3876ac+_0x2d5871(0x180)+(_0x2d5871(0x1b0)+_0x4bf07d));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x532cfe,_0x3876ac,_0x2191a3),'createCancelledError':_0x5d9c5b=>CliErrors[_0x2d5871(0x183)](_0x5d9c5b)});},'mapDryRunError'(_0x5c90c8){return mapUserFacingExecuteError(_0x5c90c8);},'mapExecuteError'(_0x5e44ed){return mapUserFacingExecuteError(_0x5e44ed);},async 'finalize'(){const {clearActiveAK:_0x22c47e}=await import('../core/api-client.js');_0x22c47e();}};async function resolveExplicitAppName(_0x521c62,_0x3ae8b9,_0x490518){const _0x25bc3b=a70_0x255ede;if(_0x521c62[_0x25bc3b(0x1b9)]===![])return _0x490518;const _0x2e2a52=typeof _0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x19c)]==='string'?_0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x19c)]['trim']():'';if(!_0x2e2a52)return _0x490518;const _0x189c67=typeof _0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x193)]===_0x25bc3b(0x1a1)&&_0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x193)][_0x25bc3b(0x19f)]()||productEnv(_0x25bc3b(0x1b7));if(_0x189c67||_0x3ae8b9['appCodeSource']===_0x25bc3b(0x197))return _0x490518;const {getRemoteAppList:_0x4ba4dd}=await import(_0x25bc3b(0x1b5)),_0x96536f=await _0x4ba4dd({'env':_0x3ae8b9[_0x25bc3b(0x1a2)]??'production','accessKey':_0x3ae8b9[_0x25bc3b(0x1bb)]}),_0x39539f=findAppByName(_0x96536f[_0x25bc3b(0x1af)],_0x2e2a52);if(_0x39539f&&!isRuntimeAccessibleApp(_0x39539f))throw runtimeInaccessibleAppError(_0x39539f,'\x22'+_0x2e2a52+'\x22');const _0x13de07=_0x39539f?.[_0x25bc3b(0x187)]?.['trim']();if(_0x13de07)return _0x13de07;throw CliErrors[_0x25bc3b(0x19e)](_0x25bc3b(0x1b1)+_0x2e2a52,'Run\x20`'+CLI_BIN_NAME+_0x25bc3b(0x194)+_0x2e2a52+_0x25bc3b(0x190)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x438dda,_0x1e86ef){const _0x3c5edc=a70_0x255ede;if(_0x438dda[_0x3c5edc(0x1b9)]===![]||!_0x1e86ef[_0x3c5edc(0x1bb)])return;const _0xbb0c5a=(typeof _0x1e86ef[_0x3c5edc(0x1a9)][_0x3c5edc(0x19c)]===_0x3c5edc(0x1a1)&&_0x1e86ef[_0x3c5edc(0x1a9)][_0x3c5edc(0x19c)][_0x3c5edc(0x19f)]()?_0x1e86ef[_0x3c5edc(0x1a9)][_0x3c5edc(0x19c)]:_0x1e86ef[_0x3c5edc(0x18b)]?.[_0x3c5edc(0x185)]??_0x1e86ef[_0x3c5edc(0x18b)]?.[_0x3c5edc(0x1a4)])?.['trim']();if(!_0xbb0c5a)return;const {getRemoteAppList:_0x29239b}=await import('../commands/app/remote-source.js'),_0x4ab1c1=await _0x29239b({'env':_0x1e86ef['env']??'production','accessKey':_0x1e86ef[_0x3c5edc(0x1bb)]}),_0x1748ed=findAppByName(_0x4ab1c1[_0x3c5edc(0x1af)],_0xbb0c5a);if(_0x1748ed&&!isRuntimeAccessibleApp(_0x1748ed))throw runtimeInaccessibleAppError(_0x1748ed,'\x22'+_0xbb0c5a+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x5bd68e,_0x18484d,_0xb611c0){const _0x276538=a70_0x255ede;if(_0x5bd68e[_0x276538(0x1b9)]===![]||!_0x18484d['accessKey'])return;const {getRemoteAppList:_0xa65335}=await import(_0x276538(0x1b5)),_0x15c03e=await _0xa65335({'env':_0x18484d[_0x276538(0x1a2)]??_0x276538(0x184),'accessKey':_0x18484d[_0x276538(0x1bb)]}),_0x4d2fde=findAppByCode(_0x15c03e['items'],_0xb611c0);if(_0x4d2fde&&!isRuntimeAccessibleApp(_0x4d2fde))throw runtimeInaccessibleAppError(_0x4d2fde,_0x276538(0x1aa)+_0xb611c0+'\x22');}export async function runCommand(_0x505c7a,_0x220925){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x505c7a)?withUpdateNotice(_0x505c7a):_0x505c7a,_0x220925,runnerAdapter);}function shouldAttachUpdateNotice(_0x446074){const _0x546923=a70_0x255ede;return![_0x546923(0x189),_0x546923(0x18d),'doctor'][_0x546923(0x1a5)](_0x446074[_0x546923(0x199)]);}function withUpdateNotice(_0x2d5ef3){return{..._0x2d5ef3,async 'execute'(_0xc7d3f9){const _0x4e9146=a70_0x5d80,_0x1d8f00=shouldResolveUpdateNotice(_0xc7d3f9)?resolveLatestUpdateNotice()[_0x4e9146(0x192)](()=>null):Promise['resolve'](null),_0x3dab1e=await _0x2d5ef3[_0x4e9146(0x19a)](_0xc7d3f9);return attachUpdateNotice(_0x3dab1e,await _0x1d8f00);}};}function shouldResolveUpdateNotice(_0x570d28){const _0x4c0eb4=a70_0x255ede;return _0x570d28[_0x4c0eb4(0x1ba)]===_0x4c0eb4(0x18e)&&!_0x570d28[_0x4c0eb4(0x186)];}function attachUpdateNotice(_0x32cc3b,_0x22fc38){const _0x540a26=a70_0x255ede;if(!_0x22fc38||!_0x32cc3b||typeof _0x32cc3b!==_0x540a26(0x1ab))return _0x32cc3b;const _0x362460=_0x32cc3b,_0x3325da=typeof _0x362460['_notice']==='object'&&_0x362460[_0x540a26(0x1a6)]!==null?_0x362460['_notice']:{};return{..._0x362460,'_notice':{..._0x3325da,'update':_0x22fc38}};}
|
|
1
|
+
const a79_0x16ac80=a79_0x1bfb;function a79_0x1bfb(_0x2cbd3d,_0x83489f){_0x2cbd3d=_0x2cbd3d-0x1dd;const _0x269f9c=a79_0x269f();let _0x1bfbbb=_0x269f9c[_0x2cbd3d];return _0x1bfbbb;}function a79_0x269f(){const _0x3e9850=['resolve','../commands/app/remote-source.js','map','newConfigFileName','service','243890PyaiXL','nonInteractive','appcode\x20\x22','trim','requiresAppCode','954420ImIVYl','local-alias','Set\x20accessKey\x20in\x20','568VxBoeU','filter','name','env','../core/sdk-client.js','defaultVerbose','accessKey','verbose','rawFlags','228549QPXvuc','isNonInteractive','update','18hQHFIj','ClientAk','authRequired','Unknown\x20app:\x20','currentApp','catch','string','pretty','defaultPageSize','80985xrbpaO','doctor','object','apiDomain','appCodeSource','has','_notice','cancelled','configMissing','appcode','execute','error','items','3349820MFlZRo','374910ZsLjIe','appCode','../core/api-client.js','production','includes','command','\x20or\x20pass\x20','6OYzUQw','schema','defaultApp','22687HUNolO','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','validation','app','mergedCli'];a79_0x269f=function(){return _0x3e9850;};return a79_0x269f();}(function(_0x3b224f,_0x7e4aef){const _0x1698b7=a79_0x1bfb,_0x1fc42e=_0x3b224f();while(!![]){try{const _0x1dbc5a=-parseInt(_0x1698b7(0x1ea))/0x1+parseInt(_0x1698b7(0x204))/0x2+parseInt(_0x1698b7(0x1f6))/0x3+-parseInt(_0x1698b7(0x1de))/0x4+parseInt(_0x1698b7(0x218))/0x5*(-parseInt(_0x1698b7(0x20b))/0x6)+parseInt(_0x1698b7(0x20e))/0x7*(-parseInt(_0x1698b7(0x1e1))/0x8)+-parseInt(_0x1698b7(0x1ed))/0x9*(-parseInt(_0x1698b7(0x203))/0xa);if(_0x1dbc5a===_0x7e4aef)break;else _0x1fc42e['push'](_0x1fc42e['shift']());}catch(_0x14d1e2){_0x1fc42e['push'](_0x1fc42e['shift']());}}}(a79_0x269f,0x21c83));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x3dd522){const _0x48588b=a79_0x1bfb;return void _0x3dd522,AUTH_MODE[_0x48588b(0x1ee)];}export function createPipelineEnv(_0x5c82fe,_0x3a7e95){const _0x3259ac=a79_0x1bfb,_0x56b68e=typeof _0x3a7e95[_0x3259ac(0x211)]===_0x3259ac(0x1f3)&&_0x3a7e95[_0x3259ac(0x211)][_0x3259ac(0x21b)]();return{'rawFlags':_0x3a7e95,'appCode':_0x5c82fe['appCode']||productEnv('APPCODE')||(_0x56b68e?undefined:readAppCodeFromConfig()),'appCodeSource':_0x5c82fe[_0x3259ac(0x1fa)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x3a7e95),'defaultFormat':_0x5c82fe['format'],'defaultPageSize':_0x5c82fe['pageSize'],'defaultVerbose':_0x5c82fe[_0x3259ac(0x1e8)],'riskLevel':_0x5c82fe['riskLevel'],'accessKey':_0x5c82fe['accessKey'],'env':_0x5c82fe['env'],'mergedCli':{'defaultApp':_0x5c82fe['defaultApp'],'currentApp':_0x5c82fe[_0x3259ac(0x1f1)],'appCode':_0x5c82fe[_0x3259ac(0x205)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a79_0x16ac80(0x1e2)](_0x3619e6=>PIPELINE_FLAG_NAMES[a79_0x16ac80(0x1fb)](_0x3619e6[a79_0x16ac80(0x1e3)]))[a79_0x16ac80(0x215)](({name:_0x507646,type:_0x5781cf,description:_0x4c49ef})=>({'name':_0x507646,'type':_0x5781cf,'description':_0x4c49ef})),'formatOutput':formatOutput,'getCommandLabel'(_0x4aae5c){const _0xe1596d=a79_0x16ac80;return CLI_BIN_NAME+'\x20'+_0x4aae5c[_0xe1596d(0x217)]+'\x20'+_0x4aae5c[_0xe1596d(0x209)];},'riskPolicy':{'onViolation'(_0x2685bd){const _0x23379d=a79_0x16ac80;console[_0x23379d(0x201)](_0x2685bd);},'createError'(_0x3b2ee7){const _0x36178b=a79_0x16ac80;return CliErrors[_0x36178b(0x1fd)](_0x3b2ee7);}},async 'prepare'(_0x27c80e,_0x533b60){const _0x520590=a79_0x16ac80,_0x59b09f=resolveAuthMode(_0x533b60);if(_0x27c80e['requiresAuth']!==![]){if(!_0x533b60['accessKey'])throw CliErrors[_0x520590(0x1ef)](_0x520590(0x1e0)+PRODUCT_CONFIG[_0x520590(0x216)]+_0x520590(0x20a)+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0xd8d3a7}=await import(_0x520590(0x206));_0xd8d3a7(_0x533b60['accessKey']);}let _0x2a59f5='';if(_0x27c80e[_0x520590(0x1dd)]!==![]){_0x2a59f5=_0x533b60[_0x520590(0x205)]??'',_0x2a59f5=await resolveExplicitAppName(_0x27c80e,_0x533b60,_0x2a59f5);if(!_0x2a59f5){await assertSelectedAppNameIsRuntimeAccessible(_0x27c80e,_0x533b60);throw CliErrors[_0x520590(0x1fe)]('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x27c80e,_0x533b60,_0x2a59f5);}if(_0x2a59f5){const {initSdkClient:_0x355d42}=await import(_0x520590(0x1e5));_0x355d42({'appCode':_0x2a59f5,'env':_0x533b60[_0x520590(0x1e4)]??_0x520590(0x207),'accessKey':_0x533b60[_0x520590(0x1e7)],'authMode':_0x59b09f});}return{'defaults':{'booleans':{'verbose':_0x533b60[_0x520590(0x1e6)]},'numbers':{'pagesize':_0x533b60[_0x520590(0x1f5)]}},'extras':{'appCode':_0x2a59f5,'cookie':'','apiDomain':_0x533b60[_0x520590(0x1f9)],'apiDir':'','accessKey':_0x533b60[_0x520590(0x1e7)],'envName':_0x533b60['env'],'mergedCli':_0x533b60['mergedCli']}};},async 'confirmHighRisk'({def:_0x511798,env:_0x5c0d43,flags:_0x56a16e,commandLabel:_0xd72564}){const _0x5eee3d=a79_0x16ac80;if(_0x5c0d43[_0x5eee3d(0x1eb)]){const _0x5e1c37=reconstructCommandArgv(_0x511798,_0x56a16e);throw CliErrors[_0x5eee3d(0x210)]('High-risk\x20operation\x20`'+_0xd72564+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+('\x20\x20To\x20proceed:\x20'+_0x5e1c37));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x511798,_0xd72564,_0x56a16e),'createCancelledError':_0x1c3d0b=>CliErrors[_0x5eee3d(0x1fd)](_0x1c3d0b)});},'mapDryRunError'(_0x2b56ba){return mapUserFacingExecuteError(_0x2b56ba);},'mapExecuteError'(_0x3ea5d0){return mapUserFacingExecuteError(_0x3ea5d0);},async 'finalize'(){const _0x79cba4=a79_0x16ac80,{clearActiveAK:_0x143ff5}=await import(_0x79cba4(0x206));_0x143ff5();}};async function resolveExplicitAppName(_0x14e54c,_0x51937a,_0x5274af){const _0x5de196=a79_0x16ac80;if(_0x14e54c[_0x5de196(0x1dd)]===![])return _0x5274af;const _0x9134cd=typeof _0x51937a[_0x5de196(0x1e9)][_0x5de196(0x211)]==='string'?_0x51937a[_0x5de196(0x1e9)][_0x5de196(0x211)][_0x5de196(0x21b)]():'';if(!_0x9134cd)return _0x5274af;const _0x1bb64a=typeof _0x51937a[_0x5de196(0x1e9)][_0x5de196(0x1ff)]===_0x5de196(0x1f3)&&_0x51937a[_0x5de196(0x1e9)]['appcode'][_0x5de196(0x21b)]()||productEnv('APPCODE');if(_0x1bb64a||_0x51937a[_0x5de196(0x1fa)]===_0x5de196(0x1df))return _0x5274af;const {getRemoteAppList:_0x3e1811}=await import('../commands/app/remote-source.js'),_0x15c321=await _0x3e1811({'env':_0x51937a[_0x5de196(0x1e4)]??_0x5de196(0x207),'accessKey':_0x51937a[_0x5de196(0x1e7)]}),_0x33458d=findAppByName(_0x15c321[_0x5de196(0x202)],_0x9134cd);if(_0x33458d&&!isRuntimeAccessibleApp(_0x33458d))throw runtimeInaccessibleAppError(_0x33458d,'\x22'+_0x9134cd+'\x22');const _0x1ad8b4=_0x33458d?.[_0x5de196(0x205)]?.[_0x5de196(0x21b)]();if(_0x1ad8b4)return _0x1ad8b4;throw CliErrors[_0x5de196(0x210)](_0x5de196(0x1f0)+_0x9134cd,'Run\x20`'+CLI_BIN_NAME+_0x5de196(0x20f)+_0x9134cd+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x5de196(0x216)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x2b4843,_0x300c11){const _0x11d0ff=a79_0x16ac80;if(_0x2b4843[_0x11d0ff(0x1dd)]===![]||!_0x300c11[_0x11d0ff(0x1e7)])return;const _0x186798=(typeof _0x300c11[_0x11d0ff(0x1e9)][_0x11d0ff(0x211)]==='string'&&_0x300c11[_0x11d0ff(0x1e9)][_0x11d0ff(0x211)][_0x11d0ff(0x21b)]()?_0x300c11[_0x11d0ff(0x1e9)][_0x11d0ff(0x211)]:_0x300c11[_0x11d0ff(0x212)]?.[_0x11d0ff(0x1f1)]??_0x300c11[_0x11d0ff(0x212)]?.[_0x11d0ff(0x20d)])?.['trim']();if(!_0x186798)return;const {getRemoteAppList:_0x32d26b}=await import(_0x11d0ff(0x214)),_0x2fd7ef=await _0x32d26b({'env':_0x300c11[_0x11d0ff(0x1e4)]??_0x11d0ff(0x207),'accessKey':_0x300c11[_0x11d0ff(0x1e7)]}),_0xc82534=findAppByName(_0x2fd7ef[_0x11d0ff(0x202)],_0x186798);if(_0xc82534&&!isRuntimeAccessibleApp(_0xc82534))throw runtimeInaccessibleAppError(_0xc82534,'\x22'+_0x186798+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x3bf45c,_0x2370a7,_0x1c7994){const _0x8a8cf5=a79_0x16ac80;if(_0x3bf45c[_0x8a8cf5(0x1dd)]===![]||!_0x2370a7[_0x8a8cf5(0x1e7)])return;const {getRemoteAppList:_0x24060b}=await import('../commands/app/remote-source.js'),_0x1a1686=await _0x24060b({'env':_0x2370a7[_0x8a8cf5(0x1e4)]??'production','accessKey':_0x2370a7['accessKey']}),_0x492e2d=findAppByCode(_0x1a1686[_0x8a8cf5(0x202)],_0x1c7994);if(_0x492e2d&&!isRuntimeAccessibleApp(_0x492e2d))throw runtimeInaccessibleAppError(_0x492e2d,_0x8a8cf5(0x21a)+_0x1c7994+'\x22');}export async function runCommand(_0x37c7dc,_0x3f63c7){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x37c7dc)?withUpdateNotice(_0x37c7dc):_0x37c7dc,_0x3f63c7,runnerAdapter);}function shouldAttachUpdateNotice(_0x191225){const _0xbf7f59=a79_0x16ac80;return![_0xbf7f59(0x1ec),_0xbf7f59(0x20c),_0xbf7f59(0x1f7)][_0xbf7f59(0x208)](_0x191225[_0xbf7f59(0x217)]);}function withUpdateNotice(_0x20a3d5){return{..._0x20a3d5,async 'execute'(_0x331f47){const _0x43a956=a79_0x1bfb,_0x4116ec=shouldResolveUpdateNotice(_0x331f47)?resolveLatestUpdateNotice()[_0x43a956(0x1f2)](()=>null):Promise[_0x43a956(0x213)](null),_0xec64d3=await _0x20a3d5[_0x43a956(0x200)](_0x331f47);return attachUpdateNotice(_0xec64d3,await _0x4116ec);}};}function shouldResolveUpdateNotice(_0x3260fd){const _0x4720b0=a79_0x16ac80;return _0x3260fd['format']===_0x4720b0(0x1f4)&&!_0x3260fd[_0x4720b0(0x219)];}function attachUpdateNotice(_0x29e7f5,_0x3ba2b){const _0xb816e7=a79_0x16ac80;if(!_0x3ba2b||!_0x29e7f5||typeof _0x29e7f5!=='object')return _0x29e7f5;const _0x5105ef=_0x29e7f5,_0x599c84=typeof _0x5105ef['_notice']===_0xb816e7(0x1f8)&&_0x5105ef[_0xb816e7(0x1fc)]!==null?_0x5105ef[_0xb816e7(0x1fc)]:{};return{..._0x5105ef,'_notice':{..._0x599c84,'update':_0x3ba2b}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1c05c9,_0x5392d1){const _0x42da69=a80_0x151d,_0x5ee219=_0x1c05c9();while(!![]){try{const _0x22563f=-parseInt(_0x42da69(0x8d))/0x1+parseInt(_0x42da69(0x95))/0x2+parseInt(_0x42da69(0x88))/0x3*(-parseInt(_0x42da69(0x92))/0x4)+parseInt(_0x42da69(0x8b))/0x5+parseInt(_0x42da69(0x8e))/0x6+parseInt(_0x42da69(0x87))/0x7+parseInt(_0x42da69(0x8f))/0x8*(-parseInt(_0x42da69(0x91))/0x9);if(_0x22563f===_0x5392d1)break;else _0x5ee219['push'](_0x5ee219['shift']());}catch(_0x18f474){_0x5ee219['push'](_0x5ee219['shift']());}}}(a80_0x21e2,0xbdab6));function a80_0x21e2(){const _0x463c75=['1070229YppZmR','commands','../commands/registry.js','3656435YJSPBv','service','1080113yUhBLB','8959830MIQXgX','747096UMBKJC','none','63eCFddH','16abtxEH','required','requiresAuth','888364UPejqg','auth','services','map','8882342yQYJIL'];a80_0x21e2=function(){return _0x463c75;};return a80_0x21e2();}import{buildSchemaPayload as a80_0x341bb5}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';function a80_0x151d(_0x204d4d,_0x341167){_0x204d4d=_0x204d4d-0x85;const _0x21e298=a80_0x21e2();let _0x151d15=_0x21e298[_0x204d4d];return _0x151d15;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x43206a=a80_0x151d,{serviceRegistry:_0x485dfb,findDefinition:_0x2dc7f1}=await import(_0x43206a(0x8a)),_0x37952c=new Set(_0x485dfb[_0x43206a(0x86)](_0x21e836=>_0x21e836['service'])),_0x12d658=listDynamicServiceEntries()['filter'](_0x33649f=>!_0x37952c['has'](_0x33649f[_0x43206a(0x8c)])),_0x4e023c=a80_0x341bb5({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x485dfb,..._0x12d658],'buildAllFlags':buildAllFlags,'findDefinition':(_0xf17f07,_0x127007)=>_0x2dc7f1(_0xf17f07,_0x127007)??findDynamicServiceDefinition(_0xf17f07,_0x127007)});return normalizeSchemaPayload(_0x4e023c);}function normalizeSchemaPayload(_0x32e821){const _0x4463a1=a80_0x151d;return{..._0x32e821,'schemaVersion':0x2,'services':_0x32e821[_0x4463a1(0x85)]['map'](_0x5874c9=>({..._0x5874c9,'commands':_0x5874c9[_0x4463a1(0x89)][_0x4463a1(0x86)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0xdf86e6){const _0x4e0af7=a80_0x151d,_0x3ab7d7=_0xdf86e6;return{..._0xdf86e6,'auth':_0x3ab7d7[_0x4e0af7(0x96)]??(_0xdf86e6[_0x4e0af7(0x94)]?_0x4e0af7(0x93):_0x4e0af7(0x90))};}
|