@lovrabet/lovrabet-cli 2.1.15 → 2.1.16-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -0
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/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/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/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/rate-limit.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.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 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a73_0x98d7f3=a73_0x9218;(function(_0x28d52d,_0x5e0684){const _0x16be7e=a73_0x9218,_0x1541ff=_0x28d52d();while(!![]){try{const _0x872aff=parseInt(_0x16be7e(0x1d7))/0x1*(parseInt(_0x16be7e(0x1e2))/0x2)+parseInt(_0x16be7e(0x1b5))/0x3+-parseInt(_0x16be7e(0x1b8))/0x4+-parseInt(_0x16be7e(0x1be))/0x5*(-parseInt(_0x16be7e(0x1a0))/0x6)+-parseInt(_0x16be7e(0x1c2))/0x7+parseInt(_0x16be7e(0x1a5))/0x8*(-parseInt(_0x16be7e(0x1c1))/0x9)+parseInt(_0x16be7e(0x1d8))/0xa;if(_0x872aff===_0x5e0684)break;else _0x1541ff['push'](_0x1541ff['shift']());}catch(_0x3e684e){_0x1541ff['push'](_0x1541ff['shift']());}}}(a73_0x303f,0x67601));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[a73_0x98d7f3(0x19a)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a73_0x98d7f3(0x1b9)];function resolveConfigPath(_0x853d5e){for(const _0xb4b437 of CONFIG_NAMES){const _0x4c17c5=resolve(_0x853d5e,_0xb4b437);if(existsSync(_0x4c17c5))return _0x4c17c5;}return undefined;}export function resolveWriteConfigPath(_0x3e015a){const _0x297941=a73_0x98d7f3,_0x4a06f3=_0x3e015a===_0x297941(0x1d3)?process[_0x297941(0x1ae)]():homedir(),_0x10b24c=resolveConfigPath(_0x4a06f3);return _0x10b24c??resolve(_0x4a06f3,NEW_CONFIG_NAME);}export function readConfigFile(_0x1e4e56){const _0x1ed090=a73_0x98d7f3;try{if(existsSync(_0x1e4e56)){const _0x1d7f0c=readFileSync(_0x1e4e56,{'encoding':_0x1ed090(0x19d)});if(_0x1d7f0c){const _0x5c89ff=JSON[_0x1ed090(0x1a1)](_0x1d7f0c);return migrateOnlineEnv(_0x1e4e56,_0x5c89ff),_0x5c89ff;}}}catch{}return{};}function migrateOnlineEnv(_0x54118f,_0x438062){const _0x59a6aa=a73_0x98d7f3;let _0x40e018=![];_0x438062[_0x59a6aa(0x1d9)]===_0x59a6aa(0x1a9)&&(_0x438062[_0x59a6aa(0x1d9)]=_0x59a6aa(0x1c5),_0x40e018=!![]);if(_0x438062[_0x59a6aa(0x1aa)]&&typeof _0x438062[_0x59a6aa(0x1aa)]===_0x59a6aa(0x1b4))for(const _0xb2898f of Object[_0x59a6aa(0x1c8)](_0x438062[_0x59a6aa(0x1aa)])){_0xb2898f&&_0xb2898f[_0x59a6aa(0x1d9)]===_0x59a6aa(0x1a9)&&(_0xb2898f['env']=_0x59a6aa(0x1c5),_0x40e018=!![]);}if(_0x40e018)try{writeConfigFile(_0x54118f,_0x438062);}catch{}}export function writeConfigFile(_0x1c63bd,_0x5989d3){const _0x54301c=a73_0x98d7f3,_0x3f7107=dirname(_0x1c63bd);!existsSync(_0x3f7107)&&mkdirSync(_0x3f7107,{'recursive':!![]});const _0x2cb378=_0x1c63bd+_0x54301c(0x1b2);try{writeFileSync(_0x2cb378,JSON[_0x54301c(0x1ab)](_0x5989d3,null,0x2)+'\x0a',{'encoding':_0x54301c(0x19d),'mode':0x180});try{renameSync(_0x2cb378,_0x1c63bd);}catch(_0x137acd){if(_0x137acd[_0x54301c(0x1a6)]===_0x54301c(0x1d2)||_0x137acd['code']===_0x54301c(0x1db)||_0x137acd[_0x54301c(0x1a6)]==='EACCES'){writeFileSync(_0x1c63bd,JSON[_0x54301c(0x1ab)](_0x5989d3,null,0x2)+'\x0a',{'encoding':_0x54301c(0x19d)});try{unlinkSync(_0x2cb378);}catch{}}else throw _0x137acd;}}catch(_0x47f444){try{unlinkSync(_0x2cb378);}catch{}throw _0x47f444;}}export function isNonInteractiveMode(_0x2d7ddd){const _0x34c40b=a73_0x98d7f3;return!!(_0x2d7ddd[_0x34c40b(0x19e)]||_0x2d7ddd['ci']||productEnvNames('CI')['some'](_0x3c7bca=>process.env[_0x3c7bca]==='true')||process.env.CI===_0x34c40b(0x1cc)||!process[_0x34c40b(0x1cd)][_0x34c40b(0x1d0)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1377b7=a73_0x98d7f3;if(!process[_0x1377b7(0x1bb)]['isTTY'])return![];try{const _0x5dcf11=process[_0x1377b7(0x1bb)][_0x1377b7(0x1c9)];return process[_0x1377b7(0x1bb)][_0x1377b7(0x19b)](!![]),process[_0x1377b7(0x1bb)]['setRawMode'](_0x5dcf11??![]),!![];}catch{return![];}}export async function createContext(_0x3ae690){const _0xe5d526=a73_0x98d7f3,_0x442bdc=readRawConfig(),_0x3384ea=buildConfig(_0x442bdc,_0x3ae690);await initGlobalEnvironment(_0x3384ea);const {getUserDomain:_0x3ed485,getApiDomain:_0x1165cd}=await import(_0xe5d526(0x1c0)),_0x38889a={'apiDomain':_0x1165cd(),'userDomain':_0x3ed485()},_0x5a2311=await buildAuth(_0x3384ea);logger[_0xe5d526(0x1bd)](process[_0xe5d526(0x1ae)]());const _0x46a469=(CLI_BIN_NAME+'\x20'+process[_0xe5d526(0x1ad)][_0xe5d526(0x1d6)](0x2)[_0xe5d526(0x1ba)]('\x20'))['trim']();logger[_0xe5d526(0x1cb)](_0x46a469);const _0x597aaf=isNonInteractiveMode(_0x3ae690);return{'config':_0x3384ea,'auth':_0x5a2311,'logger':logger,'env':_0x38889a,'nonInteractive':_0x597aaf};}export function buildConfigFromFlags(_0x597c36){return buildConfig(readRawConfig(),_0x597c36);}export function getLocalAppAliases(_0x16df39){const _0x600178=a73_0x98d7f3;return _0x16df39[_0x600178(0x1aa)]&&typeof _0x16df39['apps']===_0x600178(0x1b4)?_0x16df39[_0x600178(0x1aa)]:{};}export function resolveLocalAppAliasCode(_0x1099a4,_0x59b995){const _0x55849d=a73_0x98d7f3;if(!_0x59b995)return undefined;const _0x29a631=getLocalAppAliases(_0x1099a4)[_0x59b995],_0x3777b4=_0x29a631?.['appcode'];return typeof _0x3777b4===_0x55849d(0x1d4)&&_0x3777b4['trim']()?_0x3777b4[_0x55849d(0x1af)]():undefined;}export function readAppCodeFromConfig(){const _0x28d5ef=a73_0x98d7f3,_0x291096=readRawConfig(),_0xc092ff=_0x291096[_0x28d5ef(0x1a7)]??_0x291096[_0x28d5ef(0x1b3)];if(typeof _0xc092ff==='string'&&_0xc092ff[_0x28d5ef(0x1af)]())return _0xc092ff['trim']();const _0x2ef433=resolveLocalAppAliasCode(_0x291096,typeof _0x291096[_0x28d5ef(0x19f)]==='string'?_0x291096['defaultApp']:undefined);if(_0x2ef433)return _0x2ef433;const _0x1826ee=normalizeEnv(String(_0x291096[_0x28d5ef(0x1d9)]||_0x28d5ef(0x1c5))),_0x262b73=isDaily(_0x1826ee)?'daily':isDev(_0x1826ee)?_0x28d5ef(0x1ac):'production',_0x385178=resolveCachedAppCode(typeof _0x291096['defaultApp']===_0x28d5ef(0x1d4)?_0x291096['defaultApp']:undefined,_0x262b73,typeof _0x291096[_0x28d5ef(0x1cf)]===_0x28d5ef(0x1d4)?_0x291096[_0x28d5ef(0x1cf)]:undefined);if(_0x385178)return _0x385178;const _0x4ee4f3=Object[_0x28d5ef(0x1c8)](getLocalAppAliases(_0x291096))['find'](_0x57b0b8=>_0x57b0b8?.['appcode']);return typeof _0x4ee4f3?.[_0x28d5ef(0x1a7)]===_0x28d5ef(0x1d4)&&_0x4ee4f3[_0x28d5ef(0x1a7)][_0x28d5ef(0x1af)]()?_0x4ee4f3[_0x28d5ef(0x1a7)][_0x28d5ef(0x1af)]():undefined;}function a73_0x303f(){const _0x333ca9=['explicit','authRequired','6lsMwSp','configFileNames','setRawMode','local-alias','utf8','nonInteractive','defaultApp','24lNfmnQ','parse','apiDomain','host','pageSize','125176TspgnJ','code','appcode','./constant/env.js','online','apps','stringify','development','argv','cwd','trim','write','inherit','.tmp','app','object','1831827aUeMlQ','raw','PAGE_SIZE','3146244LBVgSG','newConfigFileName','join','stdin','FORMAT','setLogPath','841420fKiHDY','missing','./constant/domain.js','459BKhHPz','297367rQTMRE','high-risk-write','ACCESS_KEY','production','cache','userDomain','values','isRaw','top-level','setRawCommand','true','stdout','skillHubDomain','accessKey','isTTY','locale','EPERM','project','string','global','slice','105291EqdjOq','4508460UKLZlE','env','APPCODE','EXDEV','VERBOSE','maxRisk','runtimeDomain','projectConfig'];a73_0x303f=function(){return _0x333ca9;};return a73_0x303f();}export function readScopedConfig(_0x5b7fe8){const _0x49e2e1=a73_0x98d7f3,_0x596780=_0x5b7fe8[_0x49e2e1(0x1d5)]?'global':_0x49e2e1(0x1d3);return readConfigFile(resolveWriteConfigPath(_0x596780));}export function writeScopedConfig(_0x11bc0d,_0x58839e){const _0x1f3c87=a73_0x98d7f3,_0x5d4de2=_0x58839e[_0x1f3c87(0x1d5)]?_0x1f3c87(0x1d5):_0x1f3c87(0x1d3);writeConfigFile(resolveWriteConfigPath(_0x5d4de2),_0x11bc0d);}export async function initGlobalEnvironment(_0x4246b4){const _0x2604bb=a73_0x98d7f3,{initEnv:_0x1f5027}=await import(_0x2604bb(0x1a8));_0x1f5027(_0x4246b4[_0x2604bb(0x1d9)]);const {initDomains:_0x1aa25d}=await import(_0x2604bb(0x1c0));_0x1aa25d({'apiDomain':_0x4246b4['raw'][_0x2604bb(0x1a2)]||_0x4246b4[_0x2604bb(0x1b6)][_0x2604bb(0x1a3)]||undefined,'userDomain':_0x4246b4['raw'][_0x2604bb(0x1c7)]||undefined,'runtimeDomain':_0x4246b4[_0x2604bb(0x1b6)][_0x2604bb(0x1de)]||undefined,'skillHubDomain':_0x4246b4[_0x2604bb(0x1b6)][_0x2604bb(0x1ce)]||undefined});}export function getProjectConfigPath(){const _0x308e94=a73_0x98d7f3;return resolveConfigPath(process[_0x308e94(0x1ae)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x2a1f5f){const _0x44d55a=a73_0x98d7f3;if(!existsSync(_0x2a1f5f))return{'status':_0x44d55a(0x1bf)};try{const _0x50714b=readFileSync(_0x2a1f5f,{'encoding':'utf8'});if(!_0x50714b?.[_0x44d55a(0x1af)]())return{'status':'empty'};const _0x10b48f=JSON['parse'](_0x50714b);return{'status':'ok','data':_0x10b48f};}catch(_0x28d791){return{'status':'error','message':_0x28d791 instanceof Error?_0x28d791['message']:String(_0x28d791)};}}export function loadRawConfigLayers(_0x3c5338){const _0x379d80=a73_0x98d7f3;let _0x3d3240={},_0x2292c4={},_0x492189,_0x3dca67;try{_0x492189=resolveConfigPath(homedir());if(_0x492189){const _0x171250=readFileSync(_0x492189,{'encoding':'utf8'});if(_0x171250)_0x3d3240=JSON[_0x379d80(0x1a1)](_0x171250);}}catch{}try{const _0x38c06a=_0x3c5338||process[_0x379d80(0x1ae)]();_0x3dca67=resolveConfigPath(_0x38c06a);if(_0x3dca67){const _0x1b407c=readFileSync(_0x3dca67,{'encoding':_0x379d80(0x19d)});if(_0x1b407c)_0x2292c4=JSON[_0x379d80(0x1a1)](_0x1b407c);}}catch{}return{'globalPath':_0x492189,'projectPath':_0x3dca67,'globalConfig':_0x3d3240,'projectConfig':_0x2292c4};}function a73_0x9218(_0x2840fb,_0x3234da){_0x2840fb=_0x2840fb-0x19a;const _0x303f36=a73_0x303f();let _0x921876=_0x303f36[_0x2840fb];return _0x921876;}function mergeRawConfigLayers(_0x3a537e){const _0x3c8968=a73_0x98d7f3,{globalConfig:_0x2bca91,projectConfig:_0x559924}=_0x3a537e;if(_0x559924[_0x3c8968(0x1b1)]===![]){const _0x558912={..._0x559924};return delete _0x558912[_0x3c8968(0x1b1)],_0x558912;}const _0x56449a={..._0x2bca91,..._0x559924};if(_0x3c8968(0x19f)in _0x559924)_0x56449a[_0x3c8968(0x19f)]=_0x559924[_0x3c8968(0x19f)];else _0x2bca91[_0x3c8968(0x19f)]&&(_0x56449a[_0x3c8968(0x19f)]=_0x2bca91['defaultApp']);return _0x56449a;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x194ca){return mergeRawConfigLayers(loadRawConfigLayers(_0x194ca));}export function readRawConfigWithLayers(_0x5a67e7){const _0x1de1a0=loadRawConfigLayers(_0x5a67e7);return{'config':mergeRawConfigLayers(_0x1de1a0),'layers':_0x1de1a0};}export function resolveDefaultAppSource(_0x12fe8e){const _0x387541=a73_0x98d7f3;if('defaultApp'in _0x12fe8e[_0x387541(0x1df)])return'project';if(_0x12fe8e[_0x387541(0x1df)][_0x387541(0x1b1)]===![])return null;if(_0x12fe8e['globalConfig'][_0x387541(0x19f)])return _0x387541(0x1d5);return null;}function buildConfig(_0x329235,_0x1f74d6){const _0x389067=a73_0x98d7f3,_0x2238d3=_0x329235['defaultApp']||undefined,_0x258c32=_0x1f74d6['app']||env('APP')||undefined,_0x2b16b5=_0x258c32||_0x2238d3||undefined,_0x143eae=env(_0x389067(0x1c4))||_0x329235['accessKey']||undefined,_0x2f1a30=_0x1f74d6[_0x389067(0x1d9)]||env('ENV')||_0x329235[_0x389067(0x1d9)]||DEFAULT_CONFIG_VALUES[_0x389067(0x1d9)],_0x4246b9=normalizeEnv(String(_0x2f1a30)),_0x57ad34=isDaily(_0x4246b9)?'daily':isDev(_0x4246b9)?_0x389067(0x1ac):'production',_0x9b1e05=typeof _0x1f74d6[_0x389067(0x1a7)]==='string'?_0x1f74d6[_0x389067(0x1a7)]:undefined,_0x4e6e64=env(_0x389067(0x1da)),_0x4119af=_0x258c32?undefined:_0x329235[_0x389067(0x1a7)]||_0x329235[_0x389067(0x1b3)]||undefined,_0x524e1d=_0x258c32||(_0x4119af?undefined:_0x2238d3),_0x2a9064=resolveLocalAppAliasCode(_0x329235,_0x524e1d),_0x37d535=resolveCachedAppCode(_0x524e1d,_0x57ad34,_0x143eae),_0x218602=_0x9b1e05||_0x4e6e64||_0x4119af||_0x2a9064||_0x37d535||undefined,_0x2e6fbb=_0x9b1e05?_0x389067(0x1e0):_0x4e6e64?'env':_0x4119af?_0x389067(0x1ca):_0x2a9064?_0x389067(0x19c):_0x37d535?_0x389067(0x1c6):undefined,_0x7a9552=_0x329235[_0x389067(0x1d1)]||DEFAULT_CONFIG_VALUES[_0x389067(0x1d1)],_0x56cc85=undefined,_0x122dbd=_0x1f74d6['format']||env(_0x389067(0x1bc))||_0x329235['format'],_0x3c686c=normalizeLegacyOutputFormat(_0x122dbd),_0x31695c=env(_0x389067(0x1b7))||_0x329235[_0x389067(0x1a4)],_0x3d47cd=_0x31695c?Number(_0x31695c)||undefined:undefined,_0x224349=_0x329235['riskLevel']||_0x329235[_0x389067(0x1dd)],_0x189164=_0x224349==='read'||_0x224349===_0x389067(0x1b0)||_0x224349===_0x389067(0x1c3)?_0x224349:DEFAULT_CONFIG_VALUES['riskLevel'],_0x5b4064=env(_0x389067(0x1dc)),_0x73d4d6=_0x5b4064==='1'||_0x5b4064===_0x389067(0x1cc);return{'appCode':typeof _0x218602===_0x389067(0x1d4)&&_0x218602[_0x389067(0x1af)]()?_0x218602['trim']():undefined,'appCodeSource':_0x2e6fbb,'env':_0x57ad34,'locale':_0x7a9552,'cookie':_0x56cc85,'accessKey':_0x143eae,'format':_0x3c686c,'pageSize':_0x3d47cd,'riskLevel':_0x189164,'verbose':_0x73d4d6,'defaultApp':_0x2238d3,'currentApp':typeof _0x2b16b5===_0x389067(0x1d4)?_0x2b16b5:undefined,'raw':_0x329235};}function env(_0x2e50a1){return productEnv(_0x2e50a1);}async function buildAuth(_0x215cae){const _0x21c8f3='',_0x3d5a4f=!!_0x215cae['accessKey'];return{'cookie':_0x21c8f3,'isLoggedIn':_0x3d5a4f,async 'getOrLogin'(){const _0x238675=a73_0x9218;if(_0x3d5a4f)return _0x21c8f3;throw CliErrors[_0x238675(0x1e1)]();}};}
|
|
1
|
+
const a74_0x59515e=a74_0x945c;(function(_0x91a1de,_0x171ec1){const _0x1661c7=a74_0x945c,_0x38e2fb=_0x91a1de();while(!![]){try{const _0xf76914=parseInt(_0x1661c7(0x201))/0x1*(parseInt(_0x1661c7(0x1d7))/0x2)+parseInt(_0x1661c7(0x1fb))/0x3*(parseInt(_0x1661c7(0x1c8))/0x4)+parseInt(_0x1661c7(0x1e0))/0x5*(-parseInt(_0x1661c7(0x1f1))/0x6)+-parseInt(_0x1661c7(0x1e1))/0x7*(parseInt(_0x1661c7(0x208))/0x8)+parseInt(_0x1661c7(0x1fe))/0x9*(-parseInt(_0x1661c7(0x1f9))/0xa)+parseInt(_0x1661c7(0x1cf))/0xb+-parseInt(_0x1661c7(0x1ef))/0xc;if(_0xf76914===_0x171ec1)break;else _0x38e2fb['push'](_0x38e2fb['shift']());}catch(_0x3fe7cb){_0x38e2fb['push'](_0x38e2fb['shift']());}}}(a74_0x2aff,0xa68cd));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';function a74_0x945c(_0x5f0a68,_0x2e6be4){_0x5f0a68=_0x5f0a68-0x1c6;const _0x2affe9=a74_0x2aff();let _0x945c5e=_0x2affe9[_0x5f0a68];return _0x945c5e;}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['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a74_0x59515e(0x1c7)];function resolveConfigPath(_0x5312ee){for(const _0x1aaa21 of CONFIG_NAMES){const _0x4c0b76=resolve(_0x5312ee,_0x1aaa21);if(existsSync(_0x4c0b76))return _0x4c0b76;}return undefined;}export function resolveWriteConfigPath(_0x5ba3a9){const _0x119851=a74_0x59515e,_0x5b3af9=_0x5ba3a9===_0x119851(0x205)?process[_0x119851(0x1f6)]():homedir(),_0x1747f5=resolveConfigPath(_0x5b3af9);return _0x1747f5??resolve(_0x5b3af9,NEW_CONFIG_NAME);}export function readConfigFile(_0x3b66dd){const _0x1f4f42=a74_0x59515e;try{if(existsSync(_0x3b66dd)){const _0x2d9c11=readFileSync(_0x3b66dd,{'encoding':_0x1f4f42(0x20e)});if(_0x2d9c11){const _0x32eae1=JSON[_0x1f4f42(0x1cc)](_0x2d9c11);return migrateOnlineEnv(_0x3b66dd,_0x32eae1),_0x32eae1;}}}catch{}return{};}function migrateOnlineEnv(_0x537f8a,_0xc71591){const _0x561a21=a74_0x59515e;let _0x3d3606=![];_0xc71591[_0x561a21(0x1fd)]===_0x561a21(0x1d1)&&(_0xc71591[_0x561a21(0x1fd)]=_0x561a21(0x1fa),_0x3d3606=!![]);if(_0xc71591[_0x561a21(0x1c9)]&&typeof _0xc71591[_0x561a21(0x1c9)]==='object')for(const _0x539db2 of Object[_0x561a21(0x1dc)](_0xc71591[_0x561a21(0x1c9)])){_0x539db2&&_0x539db2['env']==='online'&&(_0x539db2[_0x561a21(0x1fd)]=_0x561a21(0x1fa),_0x3d3606=!![]);}if(_0x3d3606)try{writeConfigFile(_0x537f8a,_0xc71591);}catch{}}export function writeConfigFile(_0x31b1e4,_0x99d318){const _0x9552aa=a74_0x59515e,_0x56f690=dirname(_0x31b1e4);!existsSync(_0x56f690)&&mkdirSync(_0x56f690,{'recursive':!![]});const _0x3e5100=_0x31b1e4+_0x9552aa(0x207);try{writeFileSync(_0x3e5100,JSON[_0x9552aa(0x203)](_0x99d318,null,0x2)+'\x0a',{'encoding':_0x9552aa(0x20e),'mode':0x180});try{renameSync(_0x3e5100,_0x31b1e4);}catch(_0x25ad8a){if(_0x25ad8a[_0x9552aa(0x1f3)]==='EPERM'||_0x25ad8a[_0x9552aa(0x1f3)]===_0x9552aa(0x1f8)||_0x25ad8a[_0x9552aa(0x1f3)]===_0x9552aa(0x1e2)){writeFileSync(_0x31b1e4,JSON[_0x9552aa(0x203)](_0x99d318,null,0x2)+'\x0a',{'encoding':_0x9552aa(0x20e)});try{unlinkSync(_0x3e5100);}catch{}}else throw _0x25ad8a;}}catch(_0x53c7c1){try{unlinkSync(_0x3e5100);}catch{}throw _0x53c7c1;}}export function isNonInteractiveMode(_0x4a7e8c){const _0x467cbb=a74_0x59515e;return!!(_0x4a7e8c[_0x467cbb(0x1d4)]||_0x4a7e8c['ci']||productEnvNames('CI')[_0x467cbb(0x200)](_0x470613=>process.env[_0x470613]===_0x467cbb(0x1f2))||process.env.CI==='true'||!process['stdout'][_0x467cbb(0x1e9)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x444c83=a74_0x59515e;if(!process[_0x444c83(0x209)][_0x444c83(0x1e9)])return![];try{const _0x583086=process['stdin'][_0x444c83(0x1df)];return process[_0x444c83(0x209)][_0x444c83(0x1ed)](!![]),process[_0x444c83(0x209)][_0x444c83(0x1ed)](_0x583086??![]),!![];}catch{return![];}}export async function createContext(_0x31542e){const _0x1ce83e=a74_0x59515e,_0x297f89=readRawConfig(),_0xca4a1b=buildConfig(_0x297f89,_0x31542e);await initGlobalEnvironment(_0xca4a1b);const {getUserDomain:_0x1175cb,getApiDomain:_0x40637b}=await import(_0x1ce83e(0x1ca)),_0x1a7c6c={'apiDomain':_0x40637b(),'userDomain':_0x1175cb()},_0x4f8712=await buildAuth(_0xca4a1b);logger['setLogPath'](process['cwd']());const _0x1f28df=(CLI_BIN_NAME+'\x20'+process[_0x1ce83e(0x20b)][_0x1ce83e(0x1ff)](0x2)['join']('\x20'))[_0x1ce83e(0x1cb)]();logger['setRawCommand'](_0x1f28df);const _0x51652b=isNonInteractiveMode(_0x31542e);return{'config':_0xca4a1b,'auth':_0x4f8712,'logger':logger,'env':_0x1a7c6c,'nonInteractive':_0x51652b};}function a74_0x2aff(){const _0x3eb705=['5940hzVGiN','error','format','local-alias','read','values','runtimeDomain','missing','isRaw','778095UkQFZJ','259wJXBsk','EACCES','cache','authRequired','ACCESS_KEY','explicit','APPCODE','FORMAT','isTTY','object','development','riskLevel','setRawMode','VERBOSE','8739672KuMqis','userDomain','6ysRjUO','true','code','accessKey','apiDomain','cwd','PAGE_SIZE','EXDEV','6560FMMJhe','production','193476oSaoEb','high-risk-write','env','11385MVatkB','slice','some','103KxNLkN','string','stringify','raw','project','app','.tmp','87872dnZyWj','stdin','pageSize','argv','top-level','global','utf8','daily','maxRisk','newConfigFileName','76YztvMZ','apps','./constant/domain.js','trim','parse','inherit','write','13982144aFutVn','appcode','online','defaultApp','message','nonInteractive','projectConfig','empty'];a74_0x2aff=function(){return _0x3eb705;};return a74_0x2aff();}export function buildConfigFromFlags(_0x21d5f6){return buildConfig(readRawConfig(),_0x21d5f6);}export function getLocalAppAliases(_0x26bfc0){const _0xe94f80=a74_0x59515e;return _0x26bfc0[_0xe94f80(0x1c9)]&&typeof _0x26bfc0[_0xe94f80(0x1c9)]===_0xe94f80(0x1ea)?_0x26bfc0[_0xe94f80(0x1c9)]:{};}export function resolveLocalAppAliasCode(_0x1b2d8f,_0x27b5a9){const _0x576f30=a74_0x59515e;if(!_0x27b5a9)return undefined;const _0x22c1ad=getLocalAppAliases(_0x1b2d8f)[_0x27b5a9],_0x23ac21=_0x22c1ad?.[_0x576f30(0x1d0)];return typeof _0x23ac21===_0x576f30(0x202)&&_0x23ac21['trim']()?_0x23ac21[_0x576f30(0x1cb)]():undefined;}export function readAppCodeFromConfig(){const _0x55306a=a74_0x59515e,_0x3aeee8=readRawConfig(),_0x11b6b8=_0x3aeee8[_0x55306a(0x1d0)]??_0x3aeee8['app'];if(typeof _0x11b6b8==='string'&&_0x11b6b8[_0x55306a(0x1cb)]())return _0x11b6b8[_0x55306a(0x1cb)]();const _0x5a7fdb=resolveLocalAppAliasCode(_0x3aeee8,typeof _0x3aeee8[_0x55306a(0x1d2)]===_0x55306a(0x202)?_0x3aeee8['defaultApp']:undefined);if(_0x5a7fdb)return _0x5a7fdb;const _0x313c96=normalizeEnv(String(_0x3aeee8['env']||_0x55306a(0x1fa))),_0x52a29f=isDaily(_0x313c96)?_0x55306a(0x20f):isDev(_0x313c96)?_0x55306a(0x1eb):_0x55306a(0x1fa),_0x1b68d6=resolveCachedAppCode(typeof _0x3aeee8[_0x55306a(0x1d2)]==='string'?_0x3aeee8['defaultApp']:undefined,_0x52a29f,typeof _0x3aeee8[_0x55306a(0x1f4)]==='string'?_0x3aeee8[_0x55306a(0x1f4)]:undefined);if(_0x1b68d6)return _0x1b68d6;const _0x3af37a=Object[_0x55306a(0x1dc)](getLocalAppAliases(_0x3aeee8))['find'](_0xddd94e=>_0xddd94e?.['appcode']);return typeof _0x3af37a?.['appcode']===_0x55306a(0x202)&&_0x3af37a[_0x55306a(0x1d0)][_0x55306a(0x1cb)]()?_0x3af37a[_0x55306a(0x1d0)][_0x55306a(0x1cb)]():undefined;}export function readScopedConfig(_0x2c5c09){const _0x5a9e67=a74_0x59515e,_0x53fdc5=_0x2c5c09[_0x5a9e67(0x20d)]?_0x5a9e67(0x20d):'project';return readConfigFile(resolveWriteConfigPath(_0x53fdc5));}export function writeScopedConfig(_0x39b8f0,_0x554350){const _0x1ed78e=a74_0x59515e,_0x85f92c=_0x554350[_0x1ed78e(0x20d)]?_0x1ed78e(0x20d):'project';writeConfigFile(resolveWriteConfigPath(_0x85f92c),_0x39b8f0);}export async function initGlobalEnvironment(_0x2cfb65){const _0x2237ed=a74_0x59515e,{initEnv:_0x109f06}=await import('./constant/env.js');_0x109f06(_0x2cfb65[_0x2237ed(0x1fd)]);const {initDomains:_0x1b8934}=await import(_0x2237ed(0x1ca));_0x1b8934({'apiDomain':_0x2cfb65['raw'][_0x2237ed(0x1f5)]||_0x2cfb65[_0x2237ed(0x204)]['host']||undefined,'userDomain':_0x2cfb65['raw'][_0x2237ed(0x1f0)]||undefined,'runtimeDomain':_0x2cfb65['raw'][_0x2237ed(0x1dd)]||undefined,'skillHubDomain':_0x2cfb65[_0x2237ed(0x204)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){const _0x290754=a74_0x59515e;return resolveConfigPath(process[_0x290754(0x1f6)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x465823){const _0x5f4092=a74_0x59515e;if(!existsSync(_0x465823))return{'status':_0x5f4092(0x1de)};try{const _0x1ad331=readFileSync(_0x465823,{'encoding':_0x5f4092(0x20e)});if(!_0x1ad331?.[_0x5f4092(0x1cb)]())return{'status':_0x5f4092(0x1d6)};const _0x366078=JSON[_0x5f4092(0x1cc)](_0x1ad331);return{'status':'ok','data':_0x366078};}catch(_0x9b95b6){return{'status':_0x5f4092(0x1d8),'message':_0x9b95b6 instanceof Error?_0x9b95b6[_0x5f4092(0x1d3)]:String(_0x9b95b6)};}}export function loadRawConfigLayers(_0x73cac5){const _0x476a40=a74_0x59515e;let _0xa694e7={},_0x4d3af2={},_0x3c464f,_0x5d1a5a;try{_0x3c464f=resolveConfigPath(homedir());if(_0x3c464f){const _0x43b76f=readFileSync(_0x3c464f,{'encoding':_0x476a40(0x20e)});if(_0x43b76f)_0xa694e7=JSON['parse'](_0x43b76f);}}catch{}try{const _0xa027d6=_0x73cac5||process['cwd']();_0x5d1a5a=resolveConfigPath(_0xa027d6);if(_0x5d1a5a){const _0xd3b303=readFileSync(_0x5d1a5a,{'encoding':_0x476a40(0x20e)});if(_0xd3b303)_0x4d3af2=JSON['parse'](_0xd3b303);}}catch{}return{'globalPath':_0x3c464f,'projectPath':_0x5d1a5a,'globalConfig':_0xa694e7,'projectConfig':_0x4d3af2};}function mergeRawConfigLayers(_0x593c74){const _0xea9fa2=a74_0x59515e,{globalConfig:_0x1b994a,projectConfig:_0xa42faa}=_0x593c74;if(_0xa42faa[_0xea9fa2(0x1cd)]===![]){const _0x5607e8={..._0xa42faa};return delete _0x5607e8[_0xea9fa2(0x1cd)],_0x5607e8;}const _0x1c1ec2={..._0x1b994a,..._0xa42faa};if(_0xea9fa2(0x1d2)in _0xa42faa)_0x1c1ec2['defaultApp']=_0xa42faa[_0xea9fa2(0x1d2)];else _0x1b994a['defaultApp']&&(_0x1c1ec2[_0xea9fa2(0x1d2)]=_0x1b994a[_0xea9fa2(0x1d2)]);return _0x1c1ec2;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x567120){return mergeRawConfigLayers(loadRawConfigLayers(_0x567120));}export function readRawConfigWithLayers(_0x4d92cc){const _0x658698=loadRawConfigLayers(_0x4d92cc);return{'config':mergeRawConfigLayers(_0x658698),'layers':_0x658698};}export function resolveDefaultAppSource(_0xb6e1f0){const _0x58a7a6=a74_0x59515e;if('defaultApp'in _0xb6e1f0[_0x58a7a6(0x1d5)])return _0x58a7a6(0x205);if(_0xb6e1f0[_0x58a7a6(0x1d5)][_0x58a7a6(0x1cd)]===![])return null;if(_0xb6e1f0['globalConfig'][_0x58a7a6(0x1d2)])return'global';return null;}function buildConfig(_0x3e1d10,_0x4ae630){const _0x56b5f2=a74_0x59515e,_0x47770b=_0x3e1d10[_0x56b5f2(0x1d2)]||undefined,_0x56152d=_0x4ae630[_0x56b5f2(0x206)]||env('APP')||undefined,_0x26eb71=_0x56152d||_0x47770b||undefined,_0x67869b=env(_0x56b5f2(0x1e5))||_0x3e1d10[_0x56b5f2(0x1f4)]||undefined,_0x378318=_0x4ae630['env']||env('ENV')||_0x3e1d10['env']||DEFAULT_CONFIG_VALUES[_0x56b5f2(0x1fd)],_0x33c432=normalizeEnv(String(_0x378318)),_0x316648=isDaily(_0x33c432)?_0x56b5f2(0x20f):isDev(_0x33c432)?_0x56b5f2(0x1eb):_0x56b5f2(0x1fa),_0x348f4f=typeof _0x4ae630[_0x56b5f2(0x1d0)]==='string'?_0x4ae630[_0x56b5f2(0x1d0)]:undefined,_0x14a8cd=env(_0x56b5f2(0x1e7)),_0x4c8dc5=_0x56152d?undefined:_0x3e1d10[_0x56b5f2(0x1d0)]||_0x3e1d10[_0x56b5f2(0x206)]||undefined,_0x4746b7=_0x56152d||(_0x4c8dc5?undefined:_0x47770b),_0x2ee714=resolveLocalAppAliasCode(_0x3e1d10,_0x4746b7),_0x92e789=resolveCachedAppCode(_0x4746b7,_0x316648,_0x67869b),_0x294aff=_0x348f4f||_0x14a8cd||_0x4c8dc5||_0x2ee714||_0x92e789||undefined,_0x1e7242=_0x348f4f?_0x56b5f2(0x1e6):_0x14a8cd?_0x56b5f2(0x1fd):_0x4c8dc5?_0x56b5f2(0x20c):_0x2ee714?_0x56b5f2(0x1da):_0x92e789?_0x56b5f2(0x1e3):undefined,_0x7694d9=_0x3e1d10['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x1371b2=undefined,_0x4e7b93=_0x4ae630[_0x56b5f2(0x1d9)]||env(_0x56b5f2(0x1e8))||_0x3e1d10[_0x56b5f2(0x1d9)],_0x490d9c=normalizeLegacyOutputFormat(_0x4e7b93),_0x45f266=env(_0x56b5f2(0x1f7))||_0x3e1d10[_0x56b5f2(0x20a)],_0x36671e=_0x45f266?Number(_0x45f266)||undefined:undefined,_0x5bc57d=_0x3e1d10[_0x56b5f2(0x1ec)]||_0x3e1d10[_0x56b5f2(0x1c6)],_0x4c4f35=_0x5bc57d===_0x56b5f2(0x1db)||_0x5bc57d===_0x56b5f2(0x1ce)||_0x5bc57d===_0x56b5f2(0x1fc)?_0x5bc57d:DEFAULT_CONFIG_VALUES[_0x56b5f2(0x1ec)],_0x1966c9=env(_0x56b5f2(0x1ee)),_0x3fe226=_0x1966c9==='1'||_0x1966c9===_0x56b5f2(0x1f2);return{'appCode':typeof _0x294aff===_0x56b5f2(0x202)&&_0x294aff[_0x56b5f2(0x1cb)]()?_0x294aff[_0x56b5f2(0x1cb)]():undefined,'appCodeSource':_0x1e7242,'env':_0x316648,'locale':_0x7694d9,'cookie':_0x1371b2,'accessKey':_0x67869b,'format':_0x490d9c,'pageSize':_0x36671e,'riskLevel':_0x4c4f35,'verbose':_0x3fe226,'defaultApp':_0x47770b,'currentApp':typeof _0x26eb71===_0x56b5f2(0x202)?_0x26eb71:undefined,'raw':_0x3e1d10};}function env(_0x1b6ddb){return productEnv(_0x1b6ddb);}async function buildAuth(_0x4a3812){const _0x16d559=a74_0x59515e,_0x3021a8='',_0x3355a3=!!_0x4a3812[_0x16d559(0x1f4)];return{'cookie':_0x3021a8,'isLoggedIn':_0x3355a3,async 'getOrLogin'(){const _0x428ffe=_0x16d559;if(_0x3355a3)return _0x3021a8;throw CliErrors[_0x428ffe(0x1e4)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x549ab3,_0x52c4c9){const _0x380efe=a74_0x15ef,_0x3c0011=_0x549ab3();while(!![]){try{const _0x453eb7=-parseInt(_0x380efe(0x13b))/0x1+-parseInt(_0x380efe(0xfb))/0x2*(parseInt(_0x380efe(0x138))/0x3)+-parseInt(_0x380efe(0xe1))/0x4*(-parseInt(_0x380efe(0xfa))/0x5)+-parseInt(_0x380efe(0x10d))/0x6+-parseInt(_0x380efe(0x12a))/0x7+-parseInt(_0x380efe(0xf0))/0x8*(parseInt(_0x380efe(0xc9))/0x9)+parseInt(_0x380efe(0x136))/0xa;if(_0x453eb7===_0x52c4c9)break;else _0x3c0011['push'](_0x3c0011['shift']());}catch(_0x354935){_0x3c0011['push'](_0x3c0011['shift']());}}}(a74_0x507b,0xbca6b));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x597c15){_activeAK=_0x597c15||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x124af4){const _0x5e8297=a74_0x15ef;for(const _0x5d7196 of _0x124af4){if(typeof _0x5d7196===_0x5e8297(0xd6)&&_0x5d7196[_0x5e8297(0xe0)]())return _0x5d7196['trim']();}return undefined;}async function decodeResponseBody(_0x261ee7){const _0x539145=a74_0x15ef;if(typeof _0x261ee7[_0x539145(0x12f)]==='function')try{const _0x5c8384=await _0x261ee7[_0x539145(0x12f)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x5c8384),'text':_0x5c8384};}catch{return{'isJson':![],'text':_0x5c8384[_0x539145(0xe0)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x261ee7[_0x539145(0x143)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x34a5b8,_0x4c8092,_0x37c2d4){const _0x1dbf79=a74_0x15ef,_0x1ba0c1=_0x4c8092&&typeof _0x4c8092===_0x1dbf79(0x119)?_0x4c8092:{},_0x43322f=[_0x1ba0c1['status'],_0x1ba0c1[_0x1dbf79(0x144)]][_0x1dbf79(0x145)](_0x22d83d=>Number(_0x22d83d)===0x1ad),_0x2966d1=createRateLimitError({'status':_0x34a5b8[_0x1dbf79(0x128)]===0x1ad?_0x34a5b8[_0x1dbf79(0x128)]:_0x43322f??_0x34a5b8[_0x1dbf79(0x128)],'errorCode':firstString(_0x1ba0c1['errorCode'],typeof _0x1ba0c1[_0x1dbf79(0x144)]===_0x1dbf79(0xd6)?_0x1ba0c1[_0x1dbf79(0x144)]:undefined),'message':firstString(_0x1ba0c1[_0x1dbf79(0x14c)],_0x1ba0c1[_0x1dbf79(0xfe)],_0x1ba0c1[_0x1dbf79(0xe9)],_0x37c2d4),'retryAfter':readRetryAfter(_0x34a5b8[_0x1dbf79(0x10b)])??readRetryAfterSeconds(_0x4c8092)});if(_0x2966d1)throw _0x2966d1;}async function apiRequest(_0x32d806,_0x35f984={}){const _0x14180a=a74_0x15ef,{method:method=_0x14180a(0x106),body:_0x1f85d8,headers:headers={},timeout:timeout=0x7530}=_0x35f984,_0x48a45d=_activeAK,_0x85c76d=getRuntimeDomain();if(!_0x48a45d)throw CliErrors[_0x14180a(0x111)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x55fbc2=''+_0x85c76d+_0x32d806,_0x43c981={'X-User-AK':_0x48a45d},_0x234ea6=new AbortController(),_0x54bf2f=setTimeout(()=>_0x234ea6[_0x14180a(0xe6)](),timeout);try{const _0x301348=await fetch(_0x55fbc2,{'method':method,'headers':{'Content-Type':_0x14180a(0x101),'X-Invoke-Source':PRODUCT_CONFIG[_0x14180a(0xe5)],..._0x43c981,...headers},'body':_0x1f85d8?JSON['stringify'](_0x1f85d8):undefined,'signal':_0x234ea6[_0x14180a(0x107)]}),_0x2fdb58=await decodeResponseBody(_0x301348);if(!_0x2fdb58['isJson']){throwIfRateLimited(_0x301348,undefined,_0x2fdb58['text']);throw CliErrors[_0x14180a(0x10c)](_0x14180a(0xe8)+_0x301348[_0x14180a(0x128)]+')',_0x301348[_0x14180a(0x128)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x359b44=_0x2fdb58[_0x14180a(0xf3)];throwIfRateLimited(_0x301348,_0x359b44);if(!_0x301348['ok']||_0x359b44[_0x14180a(0x126)]===![])throw CliErrors[_0x14180a(0x10c)](_0x359b44[_0x14180a(0x14c)]||_0x359b44['message']||'API\x20error:\x20'+_0x301348['status'],_0x359b44[_0x14180a(0x150)]?_0x14180a(0x139)+_0x359b44[_0x14180a(0x150)]:undefined);return _0x359b44;}catch(_0x11877c){if(_0x11877c instanceof Error&&_0x11877c['name']===_0x14180a(0xf9))throw CliErrors[_0x14180a(0x10c)](_0x14180a(0xdb)+_0x55fbc2);throw _0x11877c;}finally{clearTimeout(_0x54bf2f);}}async function apiBinaryRequest(_0x2a191b,_0x40ef38={}){const _0x12b908=a74_0x15ef,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x40ef38,_0x25b177=_activeAK,_0x3dbb9e=getRuntimeDomain();if(!_0x25b177)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x12b908(0x118)]+'.');const _0x27e2d0=''+_0x3dbb9e+_0x2a191b,_0x1d0dd2=new AbortController(),_0x1d879d=setTimeout(()=>_0x1d0dd2['abort'](),timeout);try{const _0x3aa1cf=await fetch(_0x27e2d0,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x12b908(0xe5)],'X-User-AK':_0x25b177,...headers},'signal':_0x1d0dd2[_0x12b908(0x107)]});if(!_0x3aa1cf['ok']){const _0x2743cc=await decodeResponseBody(_0x3aa1cf),_0x1d85e6=_0x2743cc[_0x12b908(0xf3)]&&typeof _0x2743cc[_0x12b908(0xf3)]===_0x12b908(0x119)?_0x2743cc[_0x12b908(0xf3)]:{},_0x5e9643=firstString(_0x1d85e6[_0x12b908(0x14c)],_0x1d85e6[_0x12b908(0xfe)],_0x1d85e6[_0x12b908(0x150)],_0x2743cc[_0x12b908(0x12f)]);throwIfRateLimited(_0x3aa1cf,_0x2743cc[_0x12b908(0xf3)],_0x5e9643);throw CliErrors['apiError'](_0x5e9643||'API\x20error:\x20'+_0x3aa1cf[_0x12b908(0x128)],_0x12b908(0x11c)+_0x27e2d0);}return Buffer[_0x12b908(0xc1)](await _0x3aa1cf[_0x12b908(0x140)]());}catch(_0x11a2c0){if(_0x11a2c0 instanceof Error&&_0x11a2c0[_0x12b908(0xd7)]===_0x12b908(0xf9))throw CliErrors[_0x12b908(0x10c)]('Request\x20timeout:\x20'+_0x27e2d0);throw _0x11a2c0;}finally{clearTimeout(_0x1d879d);}}async function apiFormRequest(_0x4813d4,_0x6d90cd,_0x7fcf4b={}){const _0x4c6f45=a74_0x15ef,{timeout:timeout=0x7530}=_0x7fcf4b,_0xd2e9ae=_activeAK,_0x53a027=getRuntimeDomain();if(!_0xd2e9ae)throw CliErrors[_0x4c6f45(0x111)](_0x4c6f45(0xd9)+PRODUCT_CONFIG[_0x4c6f45(0x118)]+'.');const _0xce0cfe=''+_0x53a027+_0x4813d4,_0x29b5aa=new AbortController(),_0x5c60e5=setTimeout(()=>_0x29b5aa['abort'](),timeout);try{const _0x59ed07=await fetch(_0xce0cfe,{'method':_0x4c6f45(0xdc),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x4c6f45(0xe5)],'X-User-AK':_0xd2e9ae},'body':_0x6d90cd,'signal':_0x29b5aa[_0x4c6f45(0x107)]}),_0x205716=await decodeResponseBody(_0x59ed07);if(!_0x205716[_0x4c6f45(0xc0)]){throwIfRateLimited(_0x59ed07,undefined,_0x205716[_0x4c6f45(0x12f)]);throw CliErrors[_0x4c6f45(0x10c)](_0x4c6f45(0xe8)+_0x59ed07[_0x4c6f45(0x128)]+')',_0x59ed07['status']>=0x190?_0x4c6f45(0xd5):undefined);}const _0x471d36=_0x205716[_0x4c6f45(0xf3)];throwIfRateLimited(_0x59ed07,_0x471d36);if(!_0x59ed07['ok']||_0x471d36[_0x4c6f45(0x126)]===![])throw CliErrors[_0x4c6f45(0x10c)](_0x471d36['errorMsg']||_0x471d36['message']||_0x4c6f45(0x13c)+_0x59ed07[_0x4c6f45(0x128)],_0x471d36[_0x4c6f45(0x150)]?_0x4c6f45(0x139)+_0x471d36[_0x4c6f45(0x150)]:undefined);return _0x471d36;}catch(_0x5d5d92){if(_0x5d5d92 instanceof Error&&_0x5d5d92[_0x4c6f45(0xd7)]===_0x4c6f45(0xf9))throw CliErrors[_0x4c6f45(0x10c)](_0x4c6f45(0xdb)+_0xce0cfe);throw _0x5d5d92;}finally{clearTimeout(_0x5c60e5);}}async function toolboxRequest(_0x176c51,_0x14f80c,_0x4b6ddc={}){const _0x2aa286=a74_0x15ef,{method:method=_0x2aa286(0x106),headers:headers={},timeout:timeout=0x7530}=_0x4b6ddc,_0x40da62=_activeAK;if(!_0x40da62)throw CliErrors[_0x2aa286(0x111)](_0x2aa286(0xd9)+PRODUCT_CONFIG[_0x2aa286(0x118)]+'.');const _0x1f53ce=getApiDomain()[_0x2aa286(0xde)](/\/$/,''),_0x5903ef=new URL(_0x176c51,_0x1f53ce+_0x2aa286(0xc7));if(_0x14f80c)for(const [_0x5ca43e,_0x261205]of Object[_0x2aa286(0x146)](_0x14f80c)){_0x261205!==undefined&&_0x261205!==null&&_0x5903ef[_0x2aa286(0x122)][_0x2aa286(0xc8)](_0x5ca43e,String(_0x261205));}const _0x2a987b=new AbortController(),_0x5ef89e=setTimeout(()=>_0x2a987b[_0x2aa286(0xe6)](),timeout);try{const _0x434576=await fetch(_0x5903ef,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x2aa286(0xe5)],'X-User-AK':_0x40da62,...headers},'signal':_0x2a987b[_0x2aa286(0x107)]}),_0x4e5b10=await decodeResponseBody(_0x434576);if(!_0x4e5b10[_0x2aa286(0xc0)]){throwIfRateLimited(_0x434576,undefined,_0x4e5b10[_0x2aa286(0x12f)]);throw CliErrors[_0x2aa286(0x10c)](_0x2aa286(0xf4)+_0x434576['status']+')',_0x434576[_0x2aa286(0x128)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x48ee45=_0x4e5b10['data'];throwIfRateLimited(_0x434576,_0x48ee45);if(!_0x434576['ok']){const _0xf554bf=_0x48ee45&&typeof _0x48ee45==='object'?_0x48ee45:{};throw CliErrors[_0x2aa286(0x10c)](_0xf554bf[_0x2aa286(0x14c)]||_0xf554bf[_0x2aa286(0xfe)]||_0x2aa286(0x13e)+_0x434576[_0x2aa286(0x128)],_0xf554bf[_0x2aa286(0x150)]?_0x2aa286(0x134)+_0xf554bf[_0x2aa286(0x150)]:undefined);}if(_0x48ee45&&typeof _0x48ee45===_0x2aa286(0x119)&&_0x2aa286(0x126)in _0x48ee45&&typeof _0x48ee45[_0x2aa286(0x126)]===_0x2aa286(0x132)){const _0x489ebe=_0x48ee45;if(!_0x489ebe[_0x2aa286(0x126)])throw CliErrors[_0x2aa286(0x10c)](_0x489ebe[_0x2aa286(0x14c)]||_0x489ebe[_0x2aa286(0xfe)]||_0x2aa286(0x127),_0x489ebe[_0x2aa286(0x150)]?_0x2aa286(0x134)+_0x489ebe[_0x2aa286(0x150)]:undefined);return _0x489ebe[_0x2aa286(0xf3)];}return _0x48ee45;}catch(_0x399330){if(_0x399330 instanceof Error&&_0x399330[_0x2aa286(0xd7)]===_0x2aa286(0xf9))throw CliErrors[_0x2aa286(0x10c)](_0x2aa286(0xdb)+_0x5903ef[_0x2aa286(0x104)]());throw _0x399330;}finally{clearTimeout(_0x5ef89e);}}async function skillHubJsonRequest(_0x3f2181,_0x4a2174={}){const _0x3eec77=a74_0x15ef,{method:method=_0x3eec77(0x106),query:_0x4127d8,body:_0x24269a,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x4a2174,_0x2a8519=_activeAK;if(!_0x2a8519)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x3eec77(0x118)]+'.');const _0x35972b=getSkillHubDomain()[_0x3eec77(0xde)](/\/$/,''),_0x3161e3=new URL(_0x3f2181,_0x35972b+'/');if(_0x4127d8)for(const [_0x2e620a,_0x8a13f8]of Object['entries'](_0x4127d8)){_0x8a13f8!==undefined&&_0x8a13f8!==null&&_0x3161e3[_0x3eec77(0x122)]['set'](_0x2e620a,String(_0x8a13f8));}const _0x526228=new AbortController(),_0x102dc6=setTimeout(()=>_0x526228[_0x3eec77(0xe6)](),timeout);try{const _0x59a78c=await fetch(_0x3161e3['toString'](),{'method':method,'headers':{'Accept':_0x3eec77(0x101),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x2a8519,...headers},'body':_0x24269a,'signal':_0x526228[_0x3eec77(0x107)]}),_0x525e5f=await decodeResponseBody(_0x59a78c);if(!_0x525e5f[_0x3eec77(0xc0)]){if(allowNotFound&&_0x59a78c[_0x3eec77(0x128)]===0x194)return undefined;throwIfRateLimited(_0x59a78c,undefined,_0x525e5f[_0x3eec77(0x12f)]);throw CliErrors['apiError'](_0x3eec77(0x133)+_0x59a78c[_0x3eec77(0x128)]+')',_0x59a78c[_0x3eec77(0x128)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x403e3d=_0x525e5f['data'];throwIfRateLimited(_0x59a78c,_0x403e3d);if(allowNotFound&&isSkillHubNotFoundResponse(_0x59a78c[_0x3eec77(0x128)],_0x403e3d))return undefined;const _0x5b77a9=!_0x59a78c['ok']||_0x403e3d?.[_0x3eec77(0x126)]===![]||typeof _0x403e3d?.[_0x3eec77(0x144)]==='number'&&_0x403e3d[_0x3eec77(0x144)]>=0x190;if(_0x5b77a9)throw CliErrors[_0x3eec77(0x10c)](_0x403e3d?.[_0x3eec77(0x14c)]||_0x403e3d?.[_0x3eec77(0xfe)]||_0x403e3d?.[_0x3eec77(0xe9)]||_0x3eec77(0x115)+_0x59a78c[_0x3eec77(0x128)],_0x403e3d?.['errorCode']?_0x3eec77(0x112)+_0x403e3d[_0x3eec77(0x150)]:undefined);return _0x403e3d?.[_0x3eec77(0xf3)]??_0x403e3d;}catch(_0x5e6c51){if(_0x5e6c51 instanceof Error&&_0x5e6c51[_0x3eec77(0xd7)]===_0x3eec77(0xf9))throw CliErrors[_0x3eec77(0x10c)]('Request\x20timeout:\x20'+_0x3161e3['toString']());throw _0x5e6c51;}finally{clearTimeout(_0x102dc6);}}function isSkillHubNotFoundResponse(_0x54e250,_0x4a76de){const _0x33e293=a74_0x15ef;if(_0x54e250===0x194||_0x4a76de?.['code']===0x194)return!![];if(_0x54e250!==0x190&&_0x4a76de?.[_0x33e293(0x144)]!==0x190)return![];const _0x5715d4=[_0x4a76de?.[_0x33e293(0xe9)],_0x4a76de?.[_0x33e293(0xfe)],_0x4a76de?.[_0x33e293(0x14c)],_0x4a76de?.[_0x33e293(0x149)]]['filter'](_0x181181=>typeof _0x181181===_0x33e293(0xd6))['join']('\x20');return/skill not found\b/i['test'](_0x5715d4);}async function skillHubBinaryRequest(_0x44b203,_0x28bf4a={}){const _0xec09ef=a74_0x15ef,{query:_0x244255,headers:headers={},timeout:timeout=0x7530}=_0x28bf4a,_0x4c559f=_activeAK;if(!_0x4c559f)throw CliErrors[_0xec09ef(0x111)](_0xec09ef(0xd9)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x53d9b7=getSkillHubDomain()[_0xec09ef(0xde)](/\/$/,''),_0x4a3ac1=new URL(_0x44b203,_0x53d9b7+'/');if(_0x244255)for(const [_0x5c8bb9,_0x5bf184]of Object[_0xec09ef(0x146)](_0x244255)){_0x5bf184!==undefined&&_0x5bf184!==null&&_0x4a3ac1[_0xec09ef(0x122)][_0xec09ef(0xc8)](_0x5c8bb9,String(_0x5bf184));}const _0x553965=new AbortController(),_0x45c74e=setTimeout(()=>_0x553965[_0xec09ef(0xe6)](),timeout);try{const _0x576472=await fetch(_0x4a3ac1['toString'](),{'method':_0xec09ef(0x106),'headers':{'Accept':_0xec09ef(0x14e),'X-Invoke-Source':PRODUCT_CONFIG[_0xec09ef(0xe5)],'X-User-AK':_0x4c559f,...headers},'signal':_0x553965['signal']});if(!_0x576472['ok']){const _0x3a0e19=await decodeResponseBody(_0x576472),_0x54e664=_0x3a0e19[_0xec09ef(0xf3)]&&typeof _0x3a0e19['data']===_0xec09ef(0x119)?_0x3a0e19[_0xec09ef(0xf3)]:{},_0x4f91f7=firstString(_0x54e664[_0xec09ef(0x14c)],_0x54e664[_0xec09ef(0xfe)],_0x54e664[_0xec09ef(0xe9)],_0x54e664[_0xec09ef(0x150)],_0x3a0e19[_0xec09ef(0x12f)]);throwIfRateLimited(_0x576472,_0x3a0e19[_0xec09ef(0xf3)],_0x4f91f7);throw CliErrors['apiError'](_0x4f91f7||_0xec09ef(0x115)+_0x576472[_0xec09ef(0x128)],_0xec09ef(0x11c)+_0x4a3ac1[_0xec09ef(0x104)]());}return Buffer[_0xec09ef(0xc1)](await _0x576472[_0xec09ef(0x140)]());}catch(_0x25c138){if(_0x25c138 instanceof Error&&_0x25c138[_0xec09ef(0xd7)]===_0xec09ef(0xf9))throw CliErrors[_0xec09ef(0x10c)](_0xec09ef(0xdb)+_0x4a3ac1[_0xec09ef(0x104)]());throw _0x25c138;}finally{clearTimeout(_0x45c74e);}}export async function getBffEndpointContract(_0x1e2a8a,_0x3b129c){const _0x482ecd=a74_0x15ef;if(_0x3b129c===_0x482ecd(0x121))throw CliErrors[_0x482ecd(0xf7)](_0x482ecd(0xf8)+_0x1e2a8a+_0x482ecd(0xff)+_0x3b129c);const _0x3535e5=await apiRequest('/client/bff/endpoint/'+encodeURIComponent(_0x1e2a8a)+'/'+encodeURIComponent(_0x3b129c)),_0x15787b=_0x3535e5['data'];if(!_0x15787b||typeof _0x15787b!=='object'||Array[_0x482ecd(0x100)](_0x15787b)||_0x15787b['appCode']!==_0x1e2a8a||_0x15787b[_0x482ecd(0x14a)]!==_0x3b129c)throw CliErrors[_0x482ecd(0xf7)](_0x482ecd(0xf8)+_0x1e2a8a+',\x20name='+_0x3b129c);return{'appCode':_0x15787b['appCode'],'functionName':_0x15787b[_0x482ecd(0x14a)],'description':_0x15787b['description'],'version':_0x15787b[_0x482ecd(0xca)],'gmtModified':_0x15787b[_0x482ecd(0x124)]};}export async function getSqlQueryInfo(_0x4cdd70,_0x3d697c){const _0x3c78dd=a74_0x15ef,_0x38c391=await apiRequest('/client/sql/query',{'method':'POST','body':{'appCode':_0x4cdd70,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x3d697c}}),_0x4aec6b=_0x38c391[_0x3c78dd(0xf3)],_0x4ed516=_0x4aec6b&&typeof _0x4aec6b===_0x3c78dd(0x119)&&_0x3c78dd(0x12b)in _0x4aec6b?_0x4aec6b[_0x3c78dd(0x12b)]?.[0x0]:_0x4aec6b&&typeof _0x4aec6b===_0x3c78dd(0x119)&&_0x3c78dd(0xc6)in _0x4aec6b?_0x4aec6b:undefined;if(!_0x4ed516)throw CliErrors['validation'](_0x3c78dd(0x135)+_0x3d697c);return _0x4ed516;}function a74_0x507b(){const _0x343ba5=['file','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','msg','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','items','scope','skillName','favorite','topK','264KfZJar','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','/client/knowledge-base/personal/','data','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/knowledge-base/personal/list?appCode=','download','validation','BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','AbortError','318765aWZIEC','2HWsatg','filter','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','message',',\x20name=','isArray','application/json','undefined','/download','toString','warnings','GET','signal','/api/runtime/v1/namespaces/','longTerm','resolvedVersion','headers','apiError','6824874DKMNcJ','effective','/client/ocr','append','authRequired','SkillHub\x20error\x20code:\x20','artifactType','appName','SkillHub\x20API\x20error:\x20','PRIVATE','?appCode=','newConfigFileName','object','all','headlineVersion','Download\x20failed:\x20','Missing\x20Skill\x20package\x20payload.','/client/knowledge-base/search','appCode','Invalid\x20app\x20config\x20value:\x20key=','functions','searchParams','Artifact\x20not\x20found:\x20id=','gmtModified','markdown','success','Toolbox\x20API\x20error','status','/client/artifact/create','4939382ZPRBkJ','tableData','values','base64','type','text','errors','/publish','boolean','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Toolbox\x20error\x20code:\x20','SQL\x20query\x20not\x20found:\x20','52114120SYoASP','/api/cli/v1/skills/','3308187swhKwy','API\x20error\x20code:\x20','/client/runtime-bff/personal/','865512ZSWaWD','API\x20error:\x20','query','Toolbox\x20API\x20error:\x20','/update','arrayBuffer','/client/queryFileUrl','slug','json','code','find','entries','map','personal','error','functionName','/client/artifact/list?','errorMsg','/client/runtime-bff/personal/list?appCode=','application/octet-stream','/client/artifact/','errorCode','isJson','from','Personal\x20BFF\x20not\x20found:\x20id=','/skills','summary','displayName','sqlCode','/api/node-toolbox/','set','292806HOODLG','version','/versions/','/execute?appCode=','/client/knowledge-base/personal/create','NAMESPACE_ONLY','confirmWarnings','company','/client/uploadFile','source','visibility','.zip','Check\x20your\x20credentials\x20and\x20try\x20again.','string','name','skillCode','Configure\x20accessKey\x20in\x20','/client/runtime-bff/personal/create','Request\x20timeout:\x20','POST','/client/dataset/get-driven-data?code=','replace','example','trim','28bfkWOJ','application/zip','api-doc-generator','Knowledge-base\x20entry\x20not\x20found:\x20id=','invokeSource','abort'];a74_0x507b=function(){return _0x343ba5;};return a74_0x507b();}function isRemoteAppItem(_0x4c454e){const _0x3e6244=a74_0x15ef;return!!_0x4c454e&&typeof _0x4c454e===_0x3e6244(0x119)&&typeof _0x4c454e['appCode']===_0x3e6244(0xd6)&&typeof _0x4c454e[_0x3e6244(0x114)]==='string';}function extractRemoteAppItems(_0x1d2e9e){const _0x2d1513=a74_0x15ef;if(Array[_0x2d1513(0x100)](_0x1d2e9e))return _0x1d2e9e[_0x2d1513(0xfc)](isRemoteAppItem);if(!_0x1d2e9e||typeof _0x1d2e9e!=='object')throw CliErrors[_0x2d1513(0x10c)](_0x2d1513(0xea));const _0x49d124=_0x1d2e9e;if(Array[_0x2d1513(0x100)](_0x49d124['tableData']))return _0x49d124['tableData'][_0x2d1513(0xfc)](isRemoteAppItem);if(_0x49d124[_0x2d1513(0xf3)]&&typeof _0x49d124[_0x2d1513(0xf3)]===_0x2d1513(0x119)){const _0x13fb4f=_0x49d124[_0x2d1513(0xf3)];if(Array[_0x2d1513(0x100)](_0x13fb4f[_0x2d1513(0x12b)]))return _0x13fb4f[_0x2d1513(0x12b)][_0x2d1513(0xfc)](isRemoteAppItem);}throw CliErrors[_0x2d1513(0x10c)](_0x2d1513(0xfd));}export async function getMyApps(){const _0x36653b=a74_0x15ef,_0x2e9f93=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x2e9f93[_0x36653b(0xf3)]);}export async function getLoginUserInfo(){const _0x4d7307=a74_0x15ef,_0x1fce33=await apiRequest('/client/user/loginUserInfo');if(!_0x1fce33[_0x4d7307(0xf3)]||typeof _0x1fce33[_0x4d7307(0xf3)]!==_0x4d7307(0x119)||Array['isArray'](_0x1fce33[_0x4d7307(0xf3)]))throw CliErrors['apiError'](_0x4d7307(0xf1));return _0x1fce33[_0x4d7307(0xf3)];}export async function listDatasets(_0x25a091,_0x1a6f53){const _0x4b6c37=a74_0x15ef,_0x59241d=await apiRequest('/client/dataset/list',{'method':_0x4b6c37(0xdc),'body':{'appCode':_0x25a091,..._0x1a6f53?.[_0x4b6c37(0x144)]&&{'code':_0x1a6f53[_0x4b6c37(0x144)]},..._0x1a6f53?.[_0x4b6c37(0xd7)]&&{'name':_0x1a6f53[_0x4b6c37(0xd7)]}}});return extractList(_0x59241d[_0x4b6c37(0xf3)]);}export async function getDatasetDetail(_0x5a040c){const _0xc12be3=a74_0x15ef,_0x4f964b=await apiRequest(_0xc12be3(0xdd)+encodeURIComponent(_0x5a040c));return _0x4f964b[_0xc12be3(0xf3)];}export async function getDatasetSdkUsageDoc(_0x152ea7,_0x1667a7){const _0x857e0=a74_0x15ef,_0x21bff5=await toolboxRequest(_0x857e0(0xe3),{'datasetCode':_0x152ea7,'appCode':_0x1667a7});return typeof _0x21bff5?.['markdown']===_0x857e0(0xd6)?_0x21bff5[_0x857e0(0x125)]:'';}export async function uploadRuntimeFile(_0x5b655a,_0x5dd9c9){const _0x151af3=a74_0x15ef,_0x28f9a1=await readFile(_0x5dd9c9),_0x4ae0d2=new FormData();_0x4ae0d2['append'](_0x151af3(0x11f),_0x5b655a),_0x4ae0d2[_0x151af3(0x110)](_0x151af3(0xe7),new Blob([new Uint8Array(_0x28f9a1)]),basename(_0x5dd9c9));const _0x7141ce=await apiFormRequest(_0x151af3(0xd1),_0x4ae0d2);return _0x7141ce[_0x151af3(0xf3)];}export async function queryRuntimeFileUrl(_0x16c154,_0x35b47e={}){const _0x19a3ba=a74_0x15ef,_0x401d05=await apiRequest(_0x19a3ba(0x141),{'method':_0x19a3ba(0xdc),'body':{'filePath':_0x16c154,'downloadFlag':_0x35b47e[_0x19a3ba(0xf6)]??![],..._0x35b47e[_0x19a3ba(0x109)]?{'longTerm':!![]}:{}}});return _0x401d05[_0x19a3ba(0xf3)];}export async function recognizeRuntimeOcr(_0x5a7638,_0x10e046){const _0x5335f3=a74_0x15ef,_0x3e2361=await apiRequest(_0x5335f3(0x10f),{'method':'POST','body':{'appCode':_0x5a7638,'url':_0x10e046['url'],'type':_0x10e046[_0x5335f3(0x12e)]}});return _0x3e2361['data'];}export async function getRuntimeAppConfigByKey(_0xf10c07,_0x46a192){const _0xa51316=a74_0x15ef,_0x574ae3=new URLSearchParams({'appCode':_0xf10c07,'key':_0x46a192}),_0x553f30=await apiRequest('/client/app-config/getByKey?'+_0x574ae3[_0xa51316(0x104)]());if(typeof _0x553f30[_0xa51316(0xf3)]!==_0xa51316(0xd6))throw CliErrors[_0xa51316(0xf7)](_0xa51316(0x120)+_0x46a192);return _0x553f30[_0xa51316(0xf3)];}export async function listRuntimeArtifacts(_0x5a6ab9,_0x17e415){const _0x5b231e=a74_0x15ef,_0x58a916=new URLSearchParams({'appCode':_0x5a6ab9});if(_0x17e415?.[_0x5b231e(0x113)])_0x58a916['set']('artifactType',_0x17e415[_0x5b231e(0x113)]);if(_0x17e415?.[_0x5b231e(0xd2)])_0x58a916[_0x5b231e(0xc8)](_0x5b231e(0xd2),_0x17e415[_0x5b231e(0xd2)]);if(_0x17e415?.[_0x5b231e(0xee)]!==undefined)_0x58a916[_0x5b231e(0xc8)](_0x5b231e(0xee),String(_0x17e415['favorite']));const _0x20473b=await apiRequest(_0x5b231e(0x14b)+_0x58a916[_0x5b231e(0x104)]());return Array[_0x5b231e(0x100)](_0x20473b['data'])?_0x20473b[_0x5b231e(0xf3)]:[];}export async function getRuntimeArtifact(_0xf1847b,_0x22396e){const _0x468afd=a74_0x15ef,_0x388ef5=await apiRequest(_0x468afd(0x14f)+_0xf1847b+_0x468afd(0x117)+encodeURIComponent(_0x22396e));if(!_0x388ef5[_0x468afd(0xf3)])throw CliErrors['validation'](_0x468afd(0x123)+_0xf1847b);return _0x388ef5[_0x468afd(0xf3)];}export async function createRuntimeArtifact(_0x56fc4a,_0x3b220b){const _0x1587a5=a74_0x15ef,_0xa01283=await apiRequest(_0x1587a5(0x129),{'method':_0x1587a5(0xdc),'body':{'appCode':_0x56fc4a,..._0x3b220b}});return _0xa01283['data'];}export async function updateRuntimeArtifact(_0xb297dc,_0x1a80e4,_0x5814b2){const _0x46e662=a74_0x15ef,_0x7afac6=await apiRequest(_0x46e662(0x14f)+_0xb297dc+_0x46e662(0x13f),{'method':_0x46e662(0xdc),'body':{'appCode':_0x1a80e4,..._0x5814b2}});return _0x7afac6[_0x46e662(0xf3)];}export async function listPersonalBffs(_0x540308){const _0x41b795=a74_0x15ef,_0x1daba3=await apiRequest(_0x41b795(0x14d)+encodeURIComponent(_0x540308));return Array[_0x41b795(0x100)](_0x1daba3['data'])?_0x1daba3[_0x41b795(0xf3)]:[];}export async function getPersonalBff(_0x58f2ae,_0x31a08e){const _0x34d1d7=a74_0x15ef,_0x594ced=await apiRequest(_0x34d1d7(0x13a)+_0x58f2ae+_0x34d1d7(0x117)+encodeURIComponent(_0x31a08e));if(!_0x594ced[_0x34d1d7(0xf3)])throw CliErrors[_0x34d1d7(0xf7)](_0x34d1d7(0xc2)+_0x58f2ae);return _0x594ced['data'];}export async function createPersonalBff(_0x2aaf61,_0x412711){const _0x515f6a=a74_0x15ef,_0x346d27=await apiRequest(_0x515f6a(0xda),{'method':_0x515f6a(0xdc),'body':{'appCode':_0x2aaf61,..._0x412711}});return _0x346d27[_0x515f6a(0xf3)];}export async function updatePersonalBff(_0x5abd32,_0xe47320,_0x5e2c05){const _0x3fef72=a74_0x15ef,_0x4248c0=await apiRequest('/client/runtime-bff/personal/'+_0x5abd32+'/update',{'method':_0x3fef72(0xdc),'body':{'appCode':_0xe47320,..._0x5e2c05}});return _0x4248c0['data'];}export async function executePersonalBff(_0x3e8fc2,_0x9a925c,_0x3f14c7){const _0x46da63=a74_0x15ef,_0x527d0c=await apiRequest(_0x46da63(0x13a)+_0x3e8fc2+_0x46da63(0xcc)+encodeURIComponent(_0x9a925c),{'method':_0x46da63(0xdc),'body':_0x3f14c7});return _0x527d0c[_0x46da63(0xf3)];}function a74_0x15ef(_0x53890d,_0x33b22d){_0x53890d=_0x53890d-0xc0;const _0x507bb3=a74_0x507b();let _0x15efa9=_0x507bb3[_0x53890d];return _0x15efa9;}export async function listPersonalKnowledgeBaseItems(_0x39dd5c){const _0x2482ea=a74_0x15ef,_0x1427d7=await apiRequest(_0x2482ea(0xf5)+encodeURIComponent(_0x39dd5c));return Array[_0x2482ea(0x100)](_0x1427d7[_0x2482ea(0xf3)])?_0x1427d7['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x339c08,_0x4d89e2){const _0xb21007=a74_0x15ef,_0xc36d55=await apiRequest(_0xb21007(0xf2)+_0x339c08+'?appCode='+encodeURIComponent(_0x4d89e2));if(!_0xc36d55[_0xb21007(0xf3)])throw CliErrors[_0xb21007(0xf7)](_0xb21007(0xe4)+_0x339c08);return _0xc36d55['data'];}export async function createPersonalKnowledgeBaseItem(_0x4f922c,_0x1b5d4c){const _0x4d9af4=a74_0x15ef,_0x4d0aac=await apiRequest(_0x4d9af4(0xcd),{'method':'POST','body':{'appCode':_0x4f922c,..._0x1b5d4c}});return _0x4d0aac[_0x4d9af4(0xf3)];}export async function updatePersonalKnowledgeBaseItem(_0x262d31,_0x133b9c,_0x34cde5){const _0x433489=a74_0x15ef,_0x94a8d=await apiRequest(_0x433489(0xf2)+_0x262d31+_0x433489(0x13f),{'method':_0x433489(0xdc),'body':{'appCode':_0x133b9c,..._0x34cde5}});return _0x94a8d[_0x433489(0xf3)];}export async function searchKnowledgeBase(_0x3ac482,_0x130193){const _0x20c00b=a74_0x15ef,_0x4393b8=await apiRequest(_0x20c00b(0x11e),{'method':_0x20c00b(0xdc),'body':{'appCode':_0x3ac482,'query':_0x130193[_0x20c00b(0x13d)],..._0x130193[_0x20c00b(0xef)]!==undefined?{'topK':_0x130193[_0x20c00b(0xef)]}:{}}});return Array[_0x20c00b(0x100)](_0x4393b8[_0x20c00b(0xf3)])?_0x4393b8['data']:[];}export async function getRuntimeSkillByCode(_0x4931da,_0x11a998){const _0x1eb588=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x4931da)+'/'+encodeURIComponent(_0x11a998),{'allowNotFound':!![]});return _0x1eb588?skillHubRuntimeDetailToRuntimeSkill(_0x1eb588):undefined;}export async function listRuntimeSkills(_0x141c99){const _0x3e823a=a74_0x15ef,_0x1eb3c8=await skillHubJsonRequest(_0x3e823a(0x108)+encodeURIComponent(_0x141c99['appCode'])+_0x3e823a(0xc3),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x141c99[_0x3e823a(0x11f)],_0x1eb3c8,_0x141c99[_0x3e823a(0xec)]??_0x3e823a(0x11a),_0x141c99[_0x3e823a(0x144)]);}export async function listPersonalRuntimeSkills(_0x29ca8f){const _0x5e6f7c=a74_0x15ef;return(await listRuntimeSkills({'appCode':_0x29ca8f,'scope':'personal'}))[_0x5e6f7c(0x148)];}export async function listCompanyRuntimeSkills(_0xe5028b){return(await listRuntimeSkills({'appCode':_0xe5028b,'scope':'company'}))['company'];}export async function listVisibleRuntimeSkills(_0x482587){const _0x1b33a5=a74_0x15ef;return(await listRuntimeSkills({'appCode':_0x482587,'scope':_0x1b33a5(0x11a)}))[_0x1b33a5(0x10e)];}export async function createPersonalRuntimeSkill(_0x1751eb,_0x51ff30,_0x5ee830={}){return publishRuntimeSkill(_0x1751eb,_0x51ff30,{'visibility':'PRIVATE','confirmWarnings':_0x5ee830['confirmWarnings']});}export async function updatePersonalRuntimeSkill(_0x336747,_0x263839,_0x3f9973,_0x1260f0={}){const _0x5d9cac=a74_0x15ef;return publishRuntimeSkill(_0x263839,{..._0x3f9973,'skillCode':_0x3f9973[_0x5d9cac(0xd8)]??_0x336747},{'visibility':_0x5d9cac(0x116),'confirmWarnings':_0x1260f0[_0x5d9cac(0xcf)]});}export async function publishCompanyRuntimeSkill(_0x28671e,_0x50e8a9,_0x56307f={}){const _0xb02b94=a74_0x15ef;return publishRuntimeSkill(_0x28671e,_0x50e8a9,{'visibility':_0xb02b94(0xce),'confirmWarnings':_0x56307f['confirmWarnings']});}export async function validateRuntimeSkillPublish(_0x46b593,_0x8b761c,_0x338980){const _0x586384=a74_0x15ef,_0xb78c7e=buildRuntimeSkillPublishForm(_0x8b761c,_0x338980[_0x586384(0xd3)]),_0x17135e=await skillHubJsonRequest(_0x586384(0x137)+encodeURIComponent(_0x46b593)+'/publish/validate',{'method':'POST','body':_0xb78c7e});return{'valid':_0x17135e['valid']===!![],'errors':Array['isArray'](_0x17135e[_0x586384(0x130)])?_0x17135e[_0x586384(0x130)]:[],'warnings':Array['isArray'](_0x17135e[_0x586384(0x105)])?_0x17135e[_0x586384(0x105)]:[],'resolvedSlug':_0x17135e['resolvedSlug'],'resolvedVersion':_0x17135e[_0x586384(0x10a)]};}export async function downloadRuntimeSkillPackage(_0x2aaeaf,_0x196124,_0x2d303f,_0x75b88){const _0x4bd2f4=a74_0x15ef;void _0x2aaeaf;const _0x3c2029=_0x75b88?_0x4bd2f4(0x137)+encodeURIComponent(_0x2d303f)+'/'+encodeURIComponent(_0x196124)+_0x4bd2f4(0xcb)+encodeURIComponent(_0x75b88)+'/download':_0x4bd2f4(0x137)+encodeURIComponent(_0x2d303f)+'/'+encodeURIComponent(_0x196124)+_0x4bd2f4(0x103);return skillHubBinaryRequest(_0x3c2029);}async function publishRuntimeSkill(_0x5b64fe,_0x10c8d0,_0x3ae9d1){const _0x110df5=a74_0x15ef,_0x2afb28=buildRuntimeSkillPublishForm(_0x10c8d0,_0x3ae9d1['visibility']),_0x250da1=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x5b64fe)+_0x110df5(0x131),{'method':'POST','query':{'confirmWarnings':_0x3ae9d1['confirmWarnings']===!![]?!![]:undefined},'body':_0x2afb28});return{'appCode':_0x250da1['namespace']??_0x5b64fe,'skillCode':_0x250da1[_0x110df5(0x142)]??_0x10c8d0['skillCode']??'','skillName':_0x10c8d0[_0x110df5(0xed)]??_0x250da1['slug']??_0x10c8d0[_0x110df5(0xd8)],'description':_0x10c8d0['description'],'scope':skillHubVisibilityToScope(_0x250da1[_0x110df5(0xd3)]??_0x3ae9d1[_0x110df5(0xd3)])??_0x110df5(0x148),'version':_0x250da1[_0x110df5(0xca)]??_0x10c8d0[_0x110df5(0xca)],'tags':_0x10c8d0['tags'],'content':_0x10c8d0['content']};}function buildRuntimeSkillPublishForm(_0xcbc3bb,_0x3f0471){const _0x5d8e80=a74_0x15ef,_0x3c3931=new FormData();return _0x3c3931[_0x5d8e80(0xc8)]('file',runtimeSkillPackageFile(_0xcbc3bb)),_0xcbc3bb[_0x5d8e80(0xed)]?.['trim']()&&_0x3c3931[_0x5d8e80(0xc8)](_0x5d8e80(0xc5),_0xcbc3bb[_0x5d8e80(0xed)][_0x5d8e80(0xe0)]()),_0x3c3931[_0x5d8e80(0xc8)](_0x5d8e80(0xd3),_0x3f0471),_0x3c3931;}function runtimeSkillPackageFile(_0x265311){const _0x4f8955=a74_0x15ef;if(!_0x265311['packageBase64'])throw CliErrors[_0x4f8955(0xf7)](_0x4f8955(0x11d));const _0x2c7076=Buffer['from'](_0x265311['packageBase64'],_0x4f8955(0x12d)),_0x528ff1=new Blob([_0x2c7076],{'type':'application/zip'}),_0x5d8361=(_0x265311[_0x4f8955(0xd8)]||'skill')+_0x4f8955(0xd4);if(typeof File!==_0x4f8955(0x102))return new File([_0x528ff1],_0x5d8361,{'type':_0x4f8955(0xe2)});return _0x528ff1;}function normalizeSkillHubRuntimeListResponse(_0x14081f,_0x246bb7,_0x5b0d07,_0x3b522c){const _0x15b329=a74_0x15ef,_0x5f4908=Array['isArray'](_0x246bb7)?_0x246bb7:Array['isArray'](_0x246bb7?.[_0x15b329(0xeb)])?_0x246bb7[_0x15b329(0xeb)]:[],_0x3ce7af=_0x3b522c?.[_0x15b329(0xe0)](),_0x3f22c5=_0x5f4908[_0x15b329(0xfc)](_0x14dde5=>!_0x3ce7af||_0x14dde5['slug']===_0x3ce7af)[_0x15b329(0x147)](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x4a6523=>Boolean(_0x4a6523)),_0x47b912=_0x3f22c5[_0x15b329(0xfc)](_0x275b2e=>_0x275b2e[_0x15b329(0xec)]===_0x15b329(0x148)),_0x50c819=_0x3f22c5[_0x15b329(0xfc)](_0x1236ac=>_0x1236ac[_0x15b329(0xec)]===_0x15b329(0xd0));return{'appCode':_0x14081f,'personal':_0x5b0d07===_0x15b329(0xd0)?[]:_0x47b912,'company':_0x5b0d07===_0x15b329(0x148)?[]:_0x50c819,'effective':buildEffectiveRuntimeSkills(_0x47b912,_0x50c819,_0x5b0d07)};}function skillHubRuntimeItemToRuntimeSkill(_0x135f3b){const _0x1c926f=a74_0x15ef,_0x2d3563=_0x135f3b[_0x1c926f(0x142)]?.[_0x1c926f(0xe0)](),_0x464e9b=skillHubVisibilityToScope(_0x135f3b[_0x1c926f(0xd3)]);if(!_0x2d3563||!_0x464e9b)return undefined;return{'id':_0x135f3b['id'],'appCode':_0x135f3b['namespace'],'skillCode':_0x2d3563,'skillName':_0x135f3b[_0x1c926f(0xc5)]??_0x2d3563,'description':_0x135f3b[_0x1c926f(0xc4)],'scope':_0x464e9b,'version':skillHubRuntimeItemVersion(_0x135f3b),'status':_0x135f3b[_0x1c926f(0x128)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x4a867b){const _0xb09606=a74_0x15ef,_0x68d182=_0x4a867b[_0xb09606(0x142)]?.[_0xb09606(0xe0)]();if(!_0x68d182)return undefined;return{'id':_0x4a867b['id'],'appCode':_0x4a867b['namespace'],'skillCode':_0x68d182,'skillName':_0x4a867b['displayName']??_0x68d182,'description':_0x4a867b[_0xb09606(0xc4)],'example':_0x4a867b[_0xb09606(0xdf)],'scope':skillHubVisibilityToScope(_0x4a867b['visibility'])??_0x4a867b[_0xb09606(0xd3)]?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0x4a867b),'status':_0x4a867b['status']};}function skillHubVisibilityToScope(_0x238adb){const _0x505f5b=a74_0x15ef;if(_0x238adb===_0x505f5b(0x116))return _0x505f5b(0x148);if(_0x238adb===_0x505f5b(0xce))return _0x505f5b(0xd0);return undefined;}function skillHubRuntimeItemVersion(_0x1b34c9){const _0x5004f7=a74_0x15ef;return _0x1b34c9['publishedVersion']?.[_0x5004f7(0xca)]??_0x1b34c9[_0x5004f7(0x11b)]?.[_0x5004f7(0xca)]??_0x1b34c9['ownerPreviewVersion']?.['version'];}function buildEffectiveRuntimeSkills(_0x287e9c,_0x21d791,_0x5a8b50){const _0x450fe3=a74_0x15ef;if(_0x5a8b50==='personal')return _0x287e9c;if(_0x5a8b50==='company')return _0x21d791;const _0x303d35=new Map();for(const _0xd010f of _0x21d791){_0x303d35[_0x450fe3(0xc8)](_0xd010f[_0x450fe3(0xd8)],_0xd010f);}for(const _0x1dfda0 of _0x287e9c){_0x303d35['set'](_0x1dfda0[_0x450fe3(0xd8)],_0x1dfda0);}return Array[_0x450fe3(0xc1)](_0x303d35[_0x450fe3(0x12c)]());}function normalizeRuntimeSkillListResponse(_0x300476,_0xf7991){const _0x417619=a74_0x15ef;if(Array['isArray'](_0xf7991)){const _0x16089a=_0xf7991[_0x417619(0xfc)](_0x275dd1=>_0x275dd1[_0x417619(0xec)]==='personal'),_0x1edfa3=_0xf7991[_0x417619(0xfc)](_0x58968a=>_0x58968a['scope']===_0x417619(0xd0));return{'appCode':_0x300476,'personal':_0x16089a,'company':_0x1edfa3,'effective':[..._0x1edfa3,..._0x16089a]};}return{'appCode':_0xf7991?.[_0x417619(0x11f)]??_0x300476,'personal':Array['isArray'](_0xf7991?.[_0x417619(0x148)])?_0xf7991[_0x417619(0x148)]:[],'company':Array[_0x417619(0x100)](_0xf7991?.['company'])?_0xf7991[_0x417619(0xd0)]:[],'effective':Array[_0x417619(0x100)](_0xf7991?.['effective'])?_0xf7991[_0x417619(0x10e)]:[]};}
|
|
1
|
+
(function(_0x301dc5,_0x4e4d87){const _0x36af33=a75_0xdadf,_0x1da53c=_0x301dc5();while(!![]){try{const _0x24fa46=parseInt(_0x36af33(0x1e5))/0x1+parseInt(_0x36af33(0x1f9))/0x2+-parseInt(_0x36af33(0x210))/0x3*(-parseInt(_0x36af33(0x1f7))/0x4)+-parseInt(_0x36af33(0x1ed))/0x5+parseInt(_0x36af33(0x1cb))/0x6*(-parseInt(_0x36af33(0x1cf))/0x7)+-parseInt(_0x36af33(0x1f6))/0x8*(parseInt(_0x36af33(0x23b))/0x9)+parseInt(_0x36af33(0x1f3))/0xa;if(_0x24fa46===_0x4e4d87)break;else _0x1da53c['push'](_0x1da53c['shift']());}catch(_0x5b7f05){_0x1da53c['push'](_0x1da53c['shift']());}}}(a75_0x5185,0x69416));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x687d4d){_activeAK=_0x687d4d||undefined;}function a75_0xdadf(_0x485fbe,_0x4cf1eb){_0x485fbe=_0x485fbe-0x1c2;const _0x5185cc=a75_0x5185();let _0xdadf18=_0x5185cc[_0x485fbe];return _0xdadf18;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x3cb794){const _0x3bf3d2=a75_0xdadf;for(const _0x16cee4 of _0x3cb794){if(typeof _0x16cee4===_0x3bf3d2(0x1ef)&&_0x16cee4[_0x3bf3d2(0x1dc)]())return _0x16cee4['trim']();}return undefined;}async function decodeResponseBody(_0x4c0097){const _0x3f66c7=a75_0xdadf;if(typeof _0x4c0097[_0x3f66c7(0x1cd)]==='function')try{const _0x189917=await _0x4c0097[_0x3f66c7(0x1cd)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x189917),'text':_0x189917};}catch{return{'isJson':![],'text':_0x189917['trim']()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x4c0097[_0x3f66c7(0x1d7)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x461f45,_0x5b0003,_0x54484b){const _0x2d2b0f=a75_0xdadf,_0x1dfea7=_0x5b0003&&typeof _0x5b0003==='object'?_0x5b0003:{},_0x243d2a=[_0x1dfea7[_0x2d2b0f(0x208)],_0x1dfea7[_0x2d2b0f(0x24d)]][_0x2d2b0f(0x1f0)](_0xa454b3=>Number(_0xa454b3)===0x1ad),_0x110466=createRateLimitError({'status':_0x461f45[_0x2d2b0f(0x208)]===0x1ad?_0x461f45[_0x2d2b0f(0x208)]:_0x243d2a??_0x461f45['status'],'errorCode':firstString(_0x1dfea7[_0x2d2b0f(0x249)],typeof _0x1dfea7['code']===_0x2d2b0f(0x1ef)?_0x1dfea7['code']:undefined),'message':firstString(_0x1dfea7['errorMsg'],_0x1dfea7[_0x2d2b0f(0x1f5)],_0x1dfea7[_0x2d2b0f(0x21e)],_0x54484b),'retryAfter':readRetryAfter(_0x461f45['headers'])??readRetryAfterSeconds(_0x5b0003)});if(_0x110466)throw _0x110466;}async function apiRequest(_0x384129,_0x2974b2={}){const _0x21c6dc=a75_0xdadf,{method:method=_0x21c6dc(0x1d1),body:_0x2863f6,headers:headers={},timeout:timeout=0x7530}=_0x2974b2,_0x33739b=_activeAK,_0x4b6b52=getRuntimeDomain();if(!_0x33739b)throw CliErrors['authRequired'](_0x21c6dc(0x1c5)+PRODUCT_CONFIG[_0x21c6dc(0x1ea)]+'.');const _0x728287=''+_0x4b6b52+_0x384129,_0x5871bf={'X-User-AK':_0x33739b},_0x50af4e=new AbortController(),_0x33f7c9=setTimeout(()=>_0x50af4e['abort'](),timeout);try{const _0x341e20=await fetch(_0x728287,{'method':method,'headers':{'Content-Type':_0x21c6dc(0x207),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x5871bf,...headers},'body':_0x2863f6?JSON['stringify'](_0x2863f6):undefined,'signal':_0x50af4e[_0x21c6dc(0x202)]}),_0x4cb552=await decodeResponseBody(_0x341e20);if(!_0x4cb552[_0x21c6dc(0x1e2)]){throwIfRateLimited(_0x341e20,undefined,_0x4cb552[_0x21c6dc(0x1cd)]);throw CliErrors[_0x21c6dc(0x230)](_0x21c6dc(0x1db)+_0x341e20[_0x21c6dc(0x208)]+')',_0x341e20[_0x21c6dc(0x208)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x11d0a1=_0x4cb552[_0x21c6dc(0x212)];throwIfRateLimited(_0x341e20,_0x11d0a1);if(!_0x341e20['ok']||_0x11d0a1['success']===![])throw CliErrors[_0x21c6dc(0x230)](_0x11d0a1[_0x21c6dc(0x1f8)]||_0x11d0a1['message']||'API\x20error:\x20'+_0x341e20[_0x21c6dc(0x208)],_0x11d0a1[_0x21c6dc(0x249)]?_0x21c6dc(0x1d6)+_0x11d0a1[_0x21c6dc(0x249)]:undefined);return _0x11d0a1;}catch(_0x22feba){if(_0x22feba instanceof Error&&_0x22feba[_0x21c6dc(0x205)]===_0x21c6dc(0x23f))throw CliErrors[_0x21c6dc(0x230)]('Request\x20timeout:\x20'+_0x728287);throw _0x22feba;}finally{clearTimeout(_0x33f7c9);}}async function apiBinaryRequest(_0x7de79e,_0x2fb8f5={}){const _0x38d0e9=a75_0xdadf,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x2fb8f5,_0x4253a4=_activeAK,_0x33e9ad=getRuntimeDomain();if(!_0x4253a4)throw CliErrors['authRequired'](_0x38d0e9(0x1c5)+PRODUCT_CONFIG[_0x38d0e9(0x1ea)]+'.');const _0xf6e4fe=''+_0x33e9ad+_0x7de79e,_0x2e14d6=new AbortController(),_0x4fa60b=setTimeout(()=>_0x2e14d6['abort'](),timeout);try{const _0x23a235=await fetch(_0xf6e4fe,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x38d0e9(0x1c2)],'X-User-AK':_0x4253a4,...headers},'signal':_0x2e14d6[_0x38d0e9(0x202)]});if(!_0x23a235['ok']){const _0x48cdfd=await decodeResponseBody(_0x23a235),_0xde919c=_0x48cdfd['data']&&typeof _0x48cdfd[_0x38d0e9(0x212)]===_0x38d0e9(0x1e0)?_0x48cdfd[_0x38d0e9(0x212)]:{},_0x1df89d=firstString(_0xde919c[_0x38d0e9(0x1f8)],_0xde919c[_0x38d0e9(0x1f5)],_0xde919c[_0x38d0e9(0x249)],_0x48cdfd['text']);throwIfRateLimited(_0x23a235,_0x48cdfd[_0x38d0e9(0x212)],_0x1df89d);throw CliErrors['apiError'](_0x1df89d||'API\x20error:\x20'+_0x23a235['status'],_0x38d0e9(0x1c3)+_0xf6e4fe);}return Buffer[_0x38d0e9(0x236)](await _0x23a235[_0x38d0e9(0x213)]());}catch(_0x4289f7){if(_0x4289f7 instanceof Error&&_0x4289f7[_0x38d0e9(0x205)]===_0x38d0e9(0x23f))throw CliErrors['apiError'](_0x38d0e9(0x24b)+_0xf6e4fe);throw _0x4289f7;}finally{clearTimeout(_0x4fa60b);}}async function apiFormRequest(_0x43ed11,_0x10c8d1,_0x50cfa6={}){const _0x501db4=a75_0xdadf,{timeout:timeout=0x7530}=_0x50cfa6,_0x59b473=_activeAK,_0x2a52e4=getRuntimeDomain();if(!_0x59b473)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x539e86=''+_0x2a52e4+_0x43ed11,_0x4834f7=new AbortController(),_0x26e94e=setTimeout(()=>_0x4834f7[_0x501db4(0x247)](),timeout);try{const _0x5462a6=await fetch(_0x539e86,{'method':'POST','headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x501db4(0x1c2)],'X-User-AK':_0x59b473},'body':_0x10c8d1,'signal':_0x4834f7['signal']}),_0x196f7c=await decodeResponseBody(_0x5462a6);if(!_0x196f7c['isJson']){throwIfRateLimited(_0x5462a6,undefined,_0x196f7c[_0x501db4(0x1cd)]);throw CliErrors[_0x501db4(0x230)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x5462a6[_0x501db4(0x208)]+')',_0x5462a6['status']>=0x190?_0x501db4(0x1eb):undefined);}const _0x395acf=_0x196f7c[_0x501db4(0x212)];throwIfRateLimited(_0x5462a6,_0x395acf);if(!_0x5462a6['ok']||_0x395acf[_0x501db4(0x227)]===![])throw CliErrors[_0x501db4(0x230)](_0x395acf['errorMsg']||_0x395acf[_0x501db4(0x1f5)]||_0x501db4(0x232)+_0x5462a6[_0x501db4(0x208)],_0x395acf['errorCode']?'API\x20error\x20code:\x20'+_0x395acf[_0x501db4(0x249)]:undefined);return _0x395acf;}catch(_0x20cd5a){if(_0x20cd5a instanceof Error&&_0x20cd5a[_0x501db4(0x205)]==='AbortError')throw CliErrors[_0x501db4(0x230)](_0x501db4(0x24b)+_0x539e86);throw _0x20cd5a;}finally{clearTimeout(_0x26e94e);}}async function toolboxRequest(_0x4fa981,_0x50b6c3,_0x342737={}){const _0x2098f3=a75_0xdadf,{method:method=_0x2098f3(0x1d1),headers:headers={},timeout:timeout=0x7530}=_0x342737,_0x5d0746=_activeAK;if(!_0x5d0746)throw CliErrors[_0x2098f3(0x225)](_0x2098f3(0x1c5)+PRODUCT_CONFIG[_0x2098f3(0x1ea)]+'.');const _0x3f942c=getApiDomain()[_0x2098f3(0x1d5)](/\/$/,''),_0x5ea949=new URL(_0x4fa981,_0x3f942c+_0x2098f3(0x1ce));if(_0x50b6c3)for(const [_0x2d0e57,_0x5cddf4]of Object['entries'](_0x50b6c3)){_0x5cddf4!==undefined&&_0x5cddf4!==null&&_0x5ea949[_0x2098f3(0x21b)][_0x2098f3(0x1f4)](_0x2d0e57,String(_0x5cddf4));}const _0x361c08=new AbortController(),_0x2fc7fa=setTimeout(()=>_0x361c08['abort'](),timeout);try{const _0x4523fe=await fetch(_0x5ea949,{'method':method,'headers':{'Content-Type':_0x2098f3(0x207),'X-Invoke-Source':PRODUCT_CONFIG[_0x2098f3(0x1c2)],'X-User-AK':_0x5d0746,...headers},'signal':_0x361c08['signal']}),_0x22d753=await decodeResponseBody(_0x4523fe);if(!_0x22d753[_0x2098f3(0x1e2)]){throwIfRateLimited(_0x4523fe,undefined,_0x22d753[_0x2098f3(0x1cd)]);throw CliErrors[_0x2098f3(0x230)](_0x2098f3(0x248)+_0x4523fe[_0x2098f3(0x208)]+')',_0x4523fe[_0x2098f3(0x208)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x4bf732=_0x22d753[_0x2098f3(0x212)];throwIfRateLimited(_0x4523fe,_0x4bf732);if(!_0x4523fe['ok']){const _0x3a2023=_0x4bf732&&typeof _0x4bf732===_0x2098f3(0x1e0)?_0x4bf732:{};throw CliErrors[_0x2098f3(0x230)](_0x3a2023[_0x2098f3(0x1f8)]||_0x3a2023[_0x2098f3(0x1f5)]||_0x2098f3(0x20b)+_0x4523fe[_0x2098f3(0x208)],_0x3a2023[_0x2098f3(0x249)]?_0x2098f3(0x237)+_0x3a2023[_0x2098f3(0x249)]:undefined);}if(_0x4bf732&&typeof _0x4bf732===_0x2098f3(0x1e0)&&'success'in _0x4bf732&&typeof _0x4bf732[_0x2098f3(0x227)]===_0x2098f3(0x1ee)){const _0x496a66=_0x4bf732;if(!_0x496a66[_0x2098f3(0x227)])throw CliErrors['apiError'](_0x496a66['errorMsg']||_0x496a66[_0x2098f3(0x1f5)]||'Toolbox\x20API\x20error',_0x496a66['errorCode']?'Toolbox\x20error\x20code:\x20'+_0x496a66[_0x2098f3(0x249)]:undefined);return _0x496a66[_0x2098f3(0x212)];}return _0x4bf732;}catch(_0x4861f4){if(_0x4861f4 instanceof Error&&_0x4861f4['name']==='AbortError')throw CliErrors['apiError'](_0x2098f3(0x24b)+_0x5ea949[_0x2098f3(0x222)]());throw _0x4861f4;}finally{clearTimeout(_0x2fc7fa);}}async function skillHubJsonRequest(_0x473e0d,_0xf9a834={}){const _0x2517ff=a75_0xdadf,{method:method=_0x2517ff(0x1d1),query:_0x537329,body:_0x641fe0,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0xf9a834,_0x3d9c6a=_activeAK;if(!_0x3d9c6a)throw CliErrors[_0x2517ff(0x225)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x2517ff(0x1ea)]+'.');const _0x1a269d=getSkillHubDomain()[_0x2517ff(0x1d5)](/\/$/,''),_0x14ad6a=new URL(_0x473e0d,_0x1a269d+'/');if(_0x537329)for(const [_0x1c47b2,_0x10f4ea]of Object[_0x2517ff(0x215)](_0x537329)){_0x10f4ea!==undefined&&_0x10f4ea!==null&&_0x14ad6a[_0x2517ff(0x21b)][_0x2517ff(0x1f4)](_0x1c47b2,String(_0x10f4ea));}const _0x2452c3=new AbortController(),_0x5bc9a6=setTimeout(()=>_0x2452c3[_0x2517ff(0x247)](),timeout);try{const _0x1f7e1c=await fetch(_0x14ad6a[_0x2517ff(0x222)](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x2517ff(0x1c2)],'X-User-AK':_0x3d9c6a,...headers},'body':_0x641fe0,'signal':_0x2452c3[_0x2517ff(0x202)]}),_0x213aae=await decodeResponseBody(_0x1f7e1c);if(!_0x213aae[_0x2517ff(0x1e2)]){if(allowNotFound&&_0x1f7e1c[_0x2517ff(0x208)]===0x194)return undefined;throwIfRateLimited(_0x1f7e1c,undefined,_0x213aae['text']);throw CliErrors[_0x2517ff(0x230)](_0x2517ff(0x240)+_0x1f7e1c[_0x2517ff(0x208)]+')',_0x1f7e1c[_0x2517ff(0x208)]>=0x190?_0x2517ff(0x1eb):undefined);}const _0x5657c3=_0x213aae[_0x2517ff(0x212)];throwIfRateLimited(_0x1f7e1c,_0x5657c3);if(allowNotFound&&isSkillHubNotFoundResponse(_0x1f7e1c[_0x2517ff(0x208)],_0x5657c3))return undefined;const _0x262884=!_0x1f7e1c['ok']||_0x5657c3?.['success']===![]||typeof _0x5657c3?.[_0x2517ff(0x24d)]===_0x2517ff(0x203)&&_0x5657c3[_0x2517ff(0x24d)]>=0x190;if(_0x262884)throw CliErrors[_0x2517ff(0x230)](_0x5657c3?.[_0x2517ff(0x1f8)]||_0x5657c3?.['message']||_0x5657c3?.[_0x2517ff(0x21e)]||_0x2517ff(0x1e7)+_0x1f7e1c[_0x2517ff(0x208)],_0x5657c3?.[_0x2517ff(0x249)]?_0x2517ff(0x1c8)+_0x5657c3[_0x2517ff(0x249)]:undefined);return _0x5657c3?.[_0x2517ff(0x212)]??_0x5657c3;}catch(_0x6a4698){if(_0x6a4698 instanceof Error&&_0x6a4698[_0x2517ff(0x205)]==='AbortError')throw CliErrors[_0x2517ff(0x230)](_0x2517ff(0x24b)+_0x14ad6a[_0x2517ff(0x222)]());throw _0x6a4698;}finally{clearTimeout(_0x5bc9a6);}}function isSkillHubNotFoundResponse(_0x6e9558,_0x4f9cee){const _0x41cbf5=a75_0xdadf;if(_0x6e9558===0x194||_0x4f9cee?.['code']===0x194)return!![];if(_0x6e9558!==0x190&&_0x4f9cee?.[_0x41cbf5(0x24d)]!==0x190)return![];const _0x53553f=[_0x4f9cee?.[_0x41cbf5(0x21e)],_0x4f9cee?.[_0x41cbf5(0x1f5)],_0x4f9cee?.['errorMsg'],_0x4f9cee?.[_0x41cbf5(0x22a)]][_0x41cbf5(0x234)](_0x4042d5=>typeof _0x4042d5===_0x41cbf5(0x1ef))[_0x41cbf5(0x1ec)]('\x20');return/skill not found\b/i['test'](_0x53553f);}async function skillHubBinaryRequest(_0x169e04,_0x4a3af3={}){const _0x1e44c3=a75_0xdadf,{query:_0x81a9d,headers:headers={},timeout:timeout=0x7530}=_0x4a3af3,_0x1662b5=_activeAK;if(!_0x1662b5)throw CliErrors[_0x1e44c3(0x225)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x435819=getSkillHubDomain()['replace'](/\/$/,''),_0x524dc7=new URL(_0x169e04,_0x435819+'/');if(_0x81a9d)for(const [_0x491cc4,_0x1982e5]of Object['entries'](_0x81a9d)){_0x1982e5!==undefined&&_0x1982e5!==null&&_0x524dc7['searchParams'][_0x1e44c3(0x1f4)](_0x491cc4,String(_0x1982e5));}const _0x4ff66f=new AbortController(),_0x2ac13a=setTimeout(()=>_0x4ff66f[_0x1e44c3(0x247)](),timeout);try{const _0x2f85c8=await fetch(_0x524dc7['toString'](),{'method':_0x1e44c3(0x1d1),'headers':{'Accept':'application/octet-stream','X-Invoke-Source':PRODUCT_CONFIG[_0x1e44c3(0x1c2)],'X-User-AK':_0x1662b5,...headers},'signal':_0x4ff66f['signal']});if(!_0x2f85c8['ok']){const _0x3351e0=await decodeResponseBody(_0x2f85c8),_0x320297=_0x3351e0[_0x1e44c3(0x212)]&&typeof _0x3351e0[_0x1e44c3(0x212)]===_0x1e44c3(0x1e0)?_0x3351e0[_0x1e44c3(0x212)]:{},_0x2df49f=firstString(_0x320297[_0x1e44c3(0x1f8)],_0x320297[_0x1e44c3(0x1f5)],_0x320297[_0x1e44c3(0x21e)],_0x320297['errorCode'],_0x3351e0[_0x1e44c3(0x1cd)]);throwIfRateLimited(_0x2f85c8,_0x3351e0[_0x1e44c3(0x212)],_0x2df49f);throw CliErrors[_0x1e44c3(0x230)](_0x2df49f||'SkillHub\x20API\x20error:\x20'+_0x2f85c8[_0x1e44c3(0x208)],_0x1e44c3(0x1c3)+_0x524dc7[_0x1e44c3(0x222)]());}return Buffer['from'](await _0x2f85c8[_0x1e44c3(0x213)]());}catch(_0x7ed42c){if(_0x7ed42c instanceof Error&&_0x7ed42c['name']===_0x1e44c3(0x23f))throw CliErrors[_0x1e44c3(0x230)](_0x1e44c3(0x24b)+_0x524dc7[_0x1e44c3(0x222)]());throw _0x7ed42c;}finally{clearTimeout(_0x2ac13a);}}export async function getBffEndpointContract(_0x25b8bc,_0x39d27e){const _0x2fe830=a75_0xdadf;if(_0x39d27e===_0x2fe830(0x22e))throw CliErrors[_0x2fe830(0x1c7)](_0x2fe830(0x24c)+_0x25b8bc+_0x2fe830(0x23c)+_0x39d27e);const _0x286f2c=await apiRequest(_0x2fe830(0x219)+encodeURIComponent(_0x25b8bc)+'/'+encodeURIComponent(_0x39d27e)),_0x196bc4=_0x286f2c[_0x2fe830(0x212)];if(!_0x196bc4||typeof _0x196bc4!==_0x2fe830(0x1e0)||Array[_0x2fe830(0x20e)](_0x196bc4)||_0x196bc4['appCode']!==_0x25b8bc||_0x196bc4[_0x2fe830(0x1fb)]!==_0x39d27e)throw CliErrors[_0x2fe830(0x1c7)]('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x25b8bc+',\x20name='+_0x39d27e);return{'appCode':_0x196bc4[_0x2fe830(0x21c)],'functionName':_0x196bc4[_0x2fe830(0x1fb)],'description':_0x196bc4[_0x2fe830(0x1e9)],'version':_0x196bc4[_0x2fe830(0x20c)],'gmtModified':_0x196bc4[_0x2fe830(0x1d2)]};}export async function getSqlQueryInfo(_0x35bbac,_0x970066){const _0x205225=a75_0xdadf,_0xc37079=await apiRequest(_0x205225(0x1e6),{'method':_0x205225(0x1fd),'body':{'appCode':_0x35bbac,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x970066}}),_0x12e86c=_0xc37079[_0x205225(0x212)],_0x3e98e1=_0x12e86c&&typeof _0x12e86c===_0x205225(0x1e0)&&_0x205225(0x1df)in _0x12e86c?_0x12e86c['tableData']?.[0x0]:_0x12e86c&&typeof _0x12e86c===_0x205225(0x1e0)&&'sqlCode'in _0x12e86c?_0x12e86c:undefined;if(!_0x3e98e1)throw CliErrors[_0x205225(0x1c7)]('SQL\x20query\x20not\x20found:\x20'+_0x970066);return _0x3e98e1;}function isRemoteAppItem(_0x5b1448){const _0x48b318=a75_0xdadf;return!!_0x5b1448&&typeof _0x5b1448===_0x48b318(0x1e0)&&typeof _0x5b1448[_0x48b318(0x21c)]===_0x48b318(0x1ef)&&typeof _0x5b1448[_0x48b318(0x22c)]===_0x48b318(0x1ef);}function extractRemoteAppItems(_0x273f34){const _0x1225b9=a75_0xdadf;if(Array[_0x1225b9(0x20e)](_0x273f34))return _0x273f34[_0x1225b9(0x234)](isRemoteAppItem);if(!_0x273f34||typeof _0x273f34!==_0x1225b9(0x1e0))throw CliErrors[_0x1225b9(0x230)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x5434ba=_0x273f34;if(Array[_0x1225b9(0x20e)](_0x5434ba[_0x1225b9(0x1df)]))return _0x5434ba[_0x1225b9(0x1df)][_0x1225b9(0x234)](isRemoteAppItem);if(_0x5434ba['data']&&typeof _0x5434ba[_0x1225b9(0x212)]==='object'){const _0xd703c=_0x5434ba['data'];if(Array[_0x1225b9(0x20e)](_0xd703c[_0x1225b9(0x1df)]))return _0xd703c[_0x1225b9(0x1df)]['filter'](isRemoteAppItem);}throw CliErrors[_0x1225b9(0x230)](_0x1225b9(0x21f));}export async function getMyApps(){const _0x3f82cb=a75_0xdadf,_0x44ef11=await apiRequest(_0x3f82cb(0x24e));return extractRemoteAppItems(_0x44ef11[_0x3f82cb(0x212)]);}export async function getLoginUserInfo(){const _0x47d037=a75_0xdadf,_0x381090=await apiRequest('/client/user/loginUserInfo');if(!_0x381090['data']||typeof _0x381090['data']!=='object'||Array[_0x47d037(0x20e)](_0x381090[_0x47d037(0x212)]))throw CliErrors['apiError'](_0x47d037(0x1ca));return _0x381090['data'];}export async function listDatasets(_0x4083c3,_0x2d86c3){const _0xea2ba=a75_0xdadf,_0x381c0c=await apiRequest('/client/dataset/list',{'method':'POST','body':{'appCode':_0x4083c3,..._0x2d86c3?.[_0xea2ba(0x24d)]&&{'code':_0x2d86c3[_0xea2ba(0x24d)]},..._0x2d86c3?.[_0xea2ba(0x205)]&&{'name':_0x2d86c3[_0xea2ba(0x205)]}}});return extractList(_0x381c0c[_0xea2ba(0x212)]);}export async function getDatasetDetail(_0x2603c5){const _0x478de6=a75_0xdadf,_0x2fc5a7=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0x2603c5));return _0x2fc5a7[_0x478de6(0x212)];}export async function getDatasetSdkUsageDoc(_0xcd933a,_0x40b141){const _0x2d3b7c=a75_0xdadf,_0x1e28b9=await toolboxRequest('api-doc-generator',{'datasetCode':_0xcd933a,'appCode':_0x40b141});return typeof _0x1e28b9?.[_0x2d3b7c(0x216)]===_0x2d3b7c(0x1ef)?_0x1e28b9[_0x2d3b7c(0x216)]:'';}export async function uploadRuntimeFile(_0x404f8e,_0xb0e189){const _0x40f8e4=a75_0xdadf,_0x1a03a5=await readFile(_0xb0e189),_0x3b33ba=new FormData();_0x3b33ba[_0x40f8e4(0x1c9)](_0x40f8e4(0x21c),_0x404f8e),_0x3b33ba[_0x40f8e4(0x1c9)](_0x40f8e4(0x20f),new Blob([new Uint8Array(_0x1a03a5)]),basename(_0xb0e189));const _0x22723b=await apiFormRequest(_0x40f8e4(0x224),_0x3b33ba);return _0x22723b[_0x40f8e4(0x212)];}export async function queryRuntimeFileUrl(_0x4045c4,_0x252032={}){const _0x4e5fd9=a75_0xdadf,_0xca97d0=await apiRequest(_0x4e5fd9(0x223),{'method':_0x4e5fd9(0x1fd),'body':{'filePath':_0x4045c4,'downloadFlag':_0x252032['download']??![],..._0x252032[_0x4e5fd9(0x1d0)]?{'longTerm':!![]}:{}}});return _0xca97d0[_0x4e5fd9(0x212)];}export async function recognizeRuntimeOcr(_0x3968d6,_0x4663ef){const _0x529260=a75_0xdadf,_0x2227fe=await apiRequest(_0x529260(0x233),{'method':_0x529260(0x1fd),'body':{'appCode':_0x3968d6,'url':_0x4663ef[_0x529260(0x23e)],'type':_0x4663ef['type']}});return _0x2227fe['data'];}export async function getRuntimeAppConfigByKey(_0x29b9fa,_0x28973b){const _0x1492e4=a75_0xdadf,_0x43047f=new URLSearchParams({'appCode':_0x29b9fa,'key':_0x28973b}),_0xe9e992=await apiRequest('/client/app-config/getByKey?'+_0x43047f[_0x1492e4(0x222)]());if(typeof _0xe9e992[_0x1492e4(0x212)]!==_0x1492e4(0x1ef))throw CliErrors[_0x1492e4(0x1c7)](_0x1492e4(0x1d9)+_0x28973b);return _0xe9e992[_0x1492e4(0x212)];}export async function listRuntimeArtifacts(_0x4c6072,_0x4ae601){const _0x2ef066=a75_0xdadf,_0x3abef4=new URLSearchParams({'appCode':_0x4c6072});if(_0x4ae601?.[_0x2ef066(0x235)])_0x3abef4[_0x2ef066(0x1f4)](_0x2ef066(0x235),_0x4ae601[_0x2ef066(0x235)]);if(_0x4ae601?.[_0x2ef066(0x220)])_0x3abef4[_0x2ef066(0x1f4)](_0x2ef066(0x220),_0x4ae601['source']);if(_0x4ae601?.[_0x2ef066(0x218)]!==undefined)_0x3abef4['set'](_0x2ef066(0x218),String(_0x4ae601[_0x2ef066(0x218)]));const _0x4f30e8=await apiRequest(_0x2ef066(0x204)+_0x3abef4[_0x2ef066(0x222)]());return Array[_0x2ef066(0x20e)](_0x4f30e8[_0x2ef066(0x212)])?_0x4f30e8[_0x2ef066(0x212)]:[];}export async function getRuntimeArtifact(_0x241114,_0x412a51){const _0x3d5956=a75_0xdadf,_0x10691c=await apiRequest(_0x3d5956(0x211)+_0x241114+'?appCode='+encodeURIComponent(_0x412a51));if(!_0x10691c[_0x3d5956(0x212)])throw CliErrors[_0x3d5956(0x1c7)](_0x3d5956(0x21d)+_0x241114);return _0x10691c[_0x3d5956(0x212)];}export async function createRuntimeArtifact(_0x511a5b,_0x4a0287){const _0x2aa08e=a75_0xdadf,_0xb8d3e=await apiRequest(_0x2aa08e(0x229),{'method':_0x2aa08e(0x1fd),'body':{'appCode':_0x511a5b,..._0x4a0287}});return _0xb8d3e['data'];}export async function updateRuntimeArtifact(_0x370edc,_0x318525,_0x1c117b){const _0x498f44=a75_0xdadf,_0x2b6549=await apiRequest(_0x498f44(0x211)+_0x370edc+'/update',{'method':'POST','body':{'appCode':_0x318525,..._0x1c117b}});return _0x2b6549[_0x498f44(0x212)];}export async function listPersonalBffs(_0x3559ec){const _0x544c3a=a75_0xdadf,_0x5a32e4=await apiRequest(_0x544c3a(0x200)+encodeURIComponent(_0x3559ec));return Array[_0x544c3a(0x20e)](_0x5a32e4[_0x544c3a(0x212)])?_0x5a32e4[_0x544c3a(0x212)]:[];}export async function getPersonalBff(_0x53b5f0,_0x3e2b5a){const _0x2a8561=a75_0xdadf,_0x4a82b8=await apiRequest(_0x2a8561(0x1e8)+_0x53b5f0+'?appCode='+encodeURIComponent(_0x3e2b5a));if(!_0x4a82b8[_0x2a8561(0x212)])throw CliErrors[_0x2a8561(0x1c7)](_0x2a8561(0x24f)+_0x53b5f0);return _0x4a82b8[_0x2a8561(0x212)];}export async function createPersonalBff(_0x49b28d,_0x583c95){const _0x5683b3=a75_0xdadf,_0xdd89e1=await apiRequest(_0x5683b3(0x1fc),{'method':'POST','body':{'appCode':_0x49b28d,..._0x583c95}});return _0xdd89e1[_0x5683b3(0x212)];}function a75_0x5185(){const _0x3b3b00=['undefined','isArray','file','3VnuSEK','/client/artifact/','data','arrayBuffer','/versions/','entries','markdown','/skills','favorite','/client/bff/endpoint/','slug','searchParams','appCode','Artifact\x20not\x20found:\x20id=','msg','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','source','/client/knowledge-base/personal/','toString','/client/queryFileUrl','/client/uploadFile','authRequired','scope','success','headlineVersion','/client/artifact/create','error','confirmWarnings','appName','/api/v1/skills/','functions','namespace','apiError','PRIVATE','API\x20error:\x20','/client/ocr','filter','artifactType','from','Toolbox\x20error\x20code:\x20','?appCode=','/api/runtime/v1/namespaces/','topK','231921iOoOPZ',',\x20name=','/publish/validate','url','AbortError','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','warnings','visibility','skillName','values','valid','summary','abort','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','errorCode','displayName','Request\x20timeout:\x20','BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','code','/client/app/my-apps','Personal\x20BFF\x20not\x20found:\x20id=','.zip','company','invokeSource','Download\x20failed:\x20','effective','Configure\x20accessKey\x20in\x20','tags','validation','SkillHub\x20error\x20code:\x20','append','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','2112wMrvKu','errors','text','/api/node-toolbox/','10822LmHcAt','longTerm','GET','gmtModified','application/zip','map','replace','API\x20error\x20code:\x20','json','Knowledge-base\x20entry\x20not\x20found:\x20id=','Invalid\x20app\x20config\x20value:\x20key=','resolvedSlug','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','trim','/client/knowledge-base/search','ownerPreviewVersion','tableData','object','/publish','isJson','/update','items','520698emNAcd','/client/sql/query','SkillHub\x20API\x20error:\x20','/client/runtime-bff/personal/','description','newConfigFileName','Check\x20your\x20credentials\x20and\x20try\x20again.','join','1462530CfzxTD','boolean','string','find','/download','personal','3059800VxZhBd','set','message','152TOZSuX','1469908yHxOcV','errorMsg','1126560aLsNXN','/api/cli/v1/skills/','functionName','/client/runtime-bff/personal/create','POST','skillCode','content','/client/runtime-bff/personal/list?appCode=','skill','signal','number','/client/artifact/list?','name','toLowerCase','application/json','status','all','/client/knowledge-base/personal/list?appCode=','Toolbox\x20API\x20error:\x20','version'];a75_0x5185=function(){return _0x3b3b00;};return a75_0x5185();}export async function updatePersonalBff(_0x1667f5,_0x1da467,_0xaa9698){const _0x351b77=a75_0xdadf,_0x3eddaf=await apiRequest(_0x351b77(0x1e8)+_0x1667f5+_0x351b77(0x1e3),{'method':_0x351b77(0x1fd),'body':{'appCode':_0x1da467,..._0xaa9698}});return _0x3eddaf[_0x351b77(0x212)];}export async function executePersonalBff(_0xfc49fe,_0x44c99c,_0x4aa5b6){const _0x5b345a=a75_0xdadf,_0x3e6dca=await apiRequest(_0x5b345a(0x1e8)+_0xfc49fe+'/execute?appCode='+encodeURIComponent(_0x44c99c),{'method':_0x5b345a(0x1fd),'body':_0x4aa5b6});return _0x3e6dca[_0x5b345a(0x212)];}export async function listPersonalKnowledgeBaseItems(_0x818814){const _0x521a60=a75_0xdadf,_0x63a51c=await apiRequest(_0x521a60(0x20a)+encodeURIComponent(_0x818814));return Array[_0x521a60(0x20e)](_0x63a51c['data'])?_0x63a51c[_0x521a60(0x212)]:[];}export async function getPersonalKnowledgeBaseItem(_0x4dfff4,_0x3b7b3c){const _0x3672ac=a75_0xdadf,_0x52650c=await apiRequest(_0x3672ac(0x221)+_0x4dfff4+_0x3672ac(0x238)+encodeURIComponent(_0x3b7b3c));if(!_0x52650c[_0x3672ac(0x212)])throw CliErrors[_0x3672ac(0x1c7)](_0x3672ac(0x1d8)+_0x4dfff4);return _0x52650c[_0x3672ac(0x212)];}export async function createPersonalKnowledgeBaseItem(_0x1bdc16,_0x2569c7){const _0x58c5b9=a75_0xdadf,_0x2d973=await apiRequest('/client/knowledge-base/personal/create',{'method':_0x58c5b9(0x1fd),'body':{'appCode':_0x1bdc16,..._0x2569c7}});return _0x2d973['data'];}export async function updatePersonalKnowledgeBaseItem(_0x2a6c44,_0x2bcca5,_0x4dc2ea){const _0xe4e4ef=a75_0xdadf,_0x4e76a3=await apiRequest(_0xe4e4ef(0x221)+_0x2a6c44+_0xe4e4ef(0x1e3),{'method':_0xe4e4ef(0x1fd),'body':{'appCode':_0x2bcca5,..._0x4dc2ea}});return _0x4e76a3[_0xe4e4ef(0x212)];}export async function searchKnowledgeBase(_0x471893,_0x44983f){const _0x30173b=a75_0xdadf,_0x1f5a31=await apiRequest(_0x30173b(0x1dd),{'method':_0x30173b(0x1fd),'body':{'appCode':_0x471893,'query':_0x44983f['query'],..._0x44983f[_0x30173b(0x23a)]!==undefined?{'topK':_0x44983f[_0x30173b(0x23a)]}:{}}});return Array[_0x30173b(0x20e)](_0x1f5a31[_0x30173b(0x212)])?_0x1f5a31[_0x30173b(0x212)]:[];}export async function getRuntimeSkillByCode(_0x3a0602,_0x41e176){const _0x28487e=a75_0xdadf,_0x3affd4=await skillHubJsonRequest(_0x28487e(0x22d)+encodeURIComponent(_0x3a0602)+'/'+encodeURIComponent(_0x41e176),{'allowNotFound':!![]});return _0x3affd4?skillHubRuntimeDetailToRuntimeSkill(_0x3affd4):undefined;}export async function listRuntimeSkills(_0x22754f){const _0x2145ed=a75_0xdadf,_0x5d2e84=await skillHubJsonRequest(_0x2145ed(0x239)+encodeURIComponent(_0x22754f[_0x2145ed(0x21c)])+_0x2145ed(0x217),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x22754f[_0x2145ed(0x21c)],_0x5d2e84,_0x22754f['scope']??_0x2145ed(0x209),_0x22754f[_0x2145ed(0x24d)]);}export async function listPersonalRuntimeSkills(_0x1007ce){const _0x4e54b5=a75_0xdadf;return(await listRuntimeSkills({'appCode':_0x1007ce,'scope':'personal'}))[_0x4e54b5(0x1f2)];}export async function listCompanyRuntimeSkills(_0x4b61cf){const _0x10b5a0=a75_0xdadf;return(await listRuntimeSkills({'appCode':_0x4b61cf,'scope':_0x10b5a0(0x251)}))['company'];}export async function listVisibleRuntimeSkills(_0x3fa56e){const _0x157a8a=a75_0xdadf;return(await listRuntimeSkills({'appCode':_0x3fa56e,'scope':'all'}))[_0x157a8a(0x1c4)];}export async function createPersonalRuntimeSkill(_0x80c5df,_0x271d47,_0x46bea9={}){const _0x4ecd50=a75_0xdadf;return publishRuntimeSkill(_0x80c5df,_0x271d47,{'visibility':_0x4ecd50(0x231),'confirmWarnings':_0x46bea9[_0x4ecd50(0x22b)]});}export async function updatePersonalRuntimeSkill(_0x2fed89,_0x435803,_0x2519f2,_0x273bca={}){const _0x795c7d=a75_0xdadf;return publishRuntimeSkill(_0x435803,{..._0x2519f2,'skillCode':_0x2519f2['skillCode']??_0x2fed89},{'visibility':'PRIVATE','confirmWarnings':_0x273bca[_0x795c7d(0x22b)]});}export async function publishCompanyRuntimeSkill(_0x3fb3ea,_0x30a510,_0x56bbe1={}){const _0x422c3b=a75_0xdadf;return publishRuntimeSkill(_0x3fb3ea,_0x30a510,{'visibility':'NAMESPACE_ONLY','confirmWarnings':_0x56bbe1[_0x422c3b(0x22b)]});}export async function validateRuntimeSkillPublish(_0xe681c0,_0x5565e0,_0x564472){const _0x48b710=a75_0xdadf,_0x3d8b6e=buildRuntimeSkillPublishForm(_0x5565e0,_0x564472[_0x48b710(0x242)]),_0x5b6746=await skillHubJsonRequest(_0x48b710(0x1fa)+encodeURIComponent(_0xe681c0)+_0x48b710(0x23d),{'method':_0x48b710(0x1fd),'body':_0x3d8b6e});return{'valid':_0x5b6746[_0x48b710(0x245)]===!![],'errors':Array[_0x48b710(0x20e)](_0x5b6746['errors'])?_0x5b6746[_0x48b710(0x1cc)]:[],'warnings':Array['isArray'](_0x5b6746[_0x48b710(0x241)])?_0x5b6746['warnings']:[],'resolvedSlug':_0x5b6746[_0x48b710(0x1da)],'resolvedVersion':_0x5b6746['resolvedVersion']};}export async function downloadRuntimeSkillPackage(_0xcc91e2,_0x263010,_0x466d78,_0xc72f50){const _0x47d055=a75_0xdadf;void _0xcc91e2;const _0xb48776=_0xc72f50?_0x47d055(0x1fa)+encodeURIComponent(_0x466d78)+'/'+encodeURIComponent(_0x263010)+_0x47d055(0x214)+encodeURIComponent(_0xc72f50)+'/download':_0x47d055(0x1fa)+encodeURIComponent(_0x466d78)+'/'+encodeURIComponent(_0x263010)+_0x47d055(0x1f1);return skillHubBinaryRequest(_0xb48776);}async function publishRuntimeSkill(_0x1ebaa7,_0x4b8f47,_0x24788b){const _0x1159db=a75_0xdadf,_0x21d612=buildRuntimeSkillPublishForm(_0x4b8f47,_0x24788b[_0x1159db(0x242)]),_0x420cbf=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x1ebaa7)+_0x1159db(0x1e1),{'method':_0x1159db(0x1fd),'query':{'confirmWarnings':_0x24788b[_0x1159db(0x22b)]===!![]?!![]:undefined},'body':_0x21d612});return{'appCode':_0x420cbf['namespace']??_0x1ebaa7,'skillCode':_0x420cbf[_0x1159db(0x21a)]??_0x4b8f47[_0x1159db(0x1fe)]??'','skillName':_0x4b8f47[_0x1159db(0x243)]??_0x420cbf[_0x1159db(0x21a)]??_0x4b8f47['skillCode'],'description':_0x4b8f47[_0x1159db(0x1e9)],'scope':skillHubVisibilityToScope(_0x420cbf[_0x1159db(0x242)]??_0x24788b[_0x1159db(0x242)])??_0x1159db(0x1f2),'version':_0x420cbf['version']??_0x4b8f47[_0x1159db(0x20c)],'tags':_0x4b8f47[_0x1159db(0x1c6)],'content':_0x4b8f47[_0x1159db(0x1ff)]};}function buildRuntimeSkillPublishForm(_0x43d959,_0x5acf50){const _0x54d60e=a75_0xdadf,_0xd7d7b6=new FormData();return _0xd7d7b6[_0x54d60e(0x1f4)](_0x54d60e(0x20f),runtimeSkillPackageFile(_0x43d959)),_0x43d959[_0x54d60e(0x243)]?.['trim']()&&_0xd7d7b6[_0x54d60e(0x1f4)](_0x54d60e(0x24a),_0x43d959[_0x54d60e(0x243)][_0x54d60e(0x1dc)]()),_0xd7d7b6['set']('visibility',_0x5acf50),_0xd7d7b6;}function runtimeSkillPackageFile(_0x168b1c){const _0x3bd84=a75_0xdadf;if(!_0x168b1c['packageBase64'])throw CliErrors[_0x3bd84(0x1c7)]('Missing\x20Skill\x20package\x20payload.');const _0x18df4b=Buffer[_0x3bd84(0x236)](_0x168b1c['packageBase64'],'base64'),_0x2c429a=new Blob([_0x18df4b],{'type':_0x3bd84(0x1d3)}),_0x4b6d14=(_0x168b1c[_0x3bd84(0x1fe)]||_0x3bd84(0x201))+_0x3bd84(0x250);if(typeof File!==_0x3bd84(0x20d))return new File([_0x2c429a],_0x4b6d14,{'type':_0x3bd84(0x1d3)});return _0x2c429a;}function normalizeSkillHubRuntimeListResponse(_0x15c45e,_0x21bbab,_0x35699b,_0x1727f4){const _0x16beea=a75_0xdadf,_0x5f1eeb=Array[_0x16beea(0x20e)](_0x21bbab)?_0x21bbab:Array[_0x16beea(0x20e)](_0x21bbab?.[_0x16beea(0x1e4)])?_0x21bbab[_0x16beea(0x1e4)]:[],_0x3d5356=_0x1727f4?.['trim'](),_0x4a3838=_0x5f1eeb['filter'](_0x5392f9=>!_0x3d5356||_0x5392f9[_0x16beea(0x21a)]===_0x3d5356)[_0x16beea(0x1d4)](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x22f223=>Boolean(_0x22f223)),_0x492a4e=_0x4a3838[_0x16beea(0x234)](_0x2e9e65=>_0x2e9e65[_0x16beea(0x226)]===_0x16beea(0x1f2)),_0x247e3e=_0x4a3838[_0x16beea(0x234)](_0x596b24=>_0x596b24[_0x16beea(0x226)]===_0x16beea(0x251));return{'appCode':_0x15c45e,'personal':_0x35699b===_0x16beea(0x251)?[]:_0x492a4e,'company':_0x35699b===_0x16beea(0x1f2)?[]:_0x247e3e,'effective':buildEffectiveRuntimeSkills(_0x492a4e,_0x247e3e,_0x35699b)};}function skillHubRuntimeItemToRuntimeSkill(_0x30cf9b){const _0xf754d3=a75_0xdadf,_0x238221=_0x30cf9b['slug']?.['trim'](),_0x5b4807=skillHubVisibilityToScope(_0x30cf9b[_0xf754d3(0x242)]);if(!_0x238221||!_0x5b4807)return undefined;return{'id':_0x30cf9b['id'],'appCode':_0x30cf9b[_0xf754d3(0x22f)],'skillCode':_0x238221,'skillName':_0x30cf9b[_0xf754d3(0x24a)]??_0x238221,'description':_0x30cf9b[_0xf754d3(0x246)],'scope':_0x5b4807,'version':skillHubRuntimeItemVersion(_0x30cf9b),'status':_0x30cf9b[_0xf754d3(0x208)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x49ea97){const _0x47d420=a75_0xdadf,_0x20d1fc=_0x49ea97['slug']?.['trim']();if(!_0x20d1fc)return undefined;return{'id':_0x49ea97['id'],'appCode':_0x49ea97[_0x47d420(0x22f)],'skillCode':_0x20d1fc,'skillName':_0x49ea97[_0x47d420(0x24a)]??_0x20d1fc,'description':_0x49ea97['summary'],'example':_0x49ea97['example'],'scope':skillHubVisibilityToScope(_0x49ea97[_0x47d420(0x242)])??_0x49ea97[_0x47d420(0x242)]?.[_0x47d420(0x206)](),'version':skillHubRuntimeItemVersion(_0x49ea97),'status':_0x49ea97[_0x47d420(0x208)]};}function skillHubVisibilityToScope(_0x56afd9){const _0x7401d2=a75_0xdadf;if(_0x56afd9===_0x7401d2(0x231))return _0x7401d2(0x1f2);if(_0x56afd9==='NAMESPACE_ONLY')return _0x7401d2(0x251);return undefined;}function skillHubRuntimeItemVersion(_0x535518){const _0x4b6a9e=a75_0xdadf;return _0x535518['publishedVersion']?.[_0x4b6a9e(0x20c)]??_0x535518[_0x4b6a9e(0x228)]?.['version']??_0x535518[_0x4b6a9e(0x1de)]?.[_0x4b6a9e(0x20c)];}function buildEffectiveRuntimeSkills(_0x13318b,_0x147c6e,_0x3e6084){const _0x1e6b97=a75_0xdadf;if(_0x3e6084===_0x1e6b97(0x1f2))return _0x13318b;if(_0x3e6084==='company')return _0x147c6e;const _0x15fc84=new Map();for(const _0xf87abd of _0x147c6e){_0x15fc84[_0x1e6b97(0x1f4)](_0xf87abd[_0x1e6b97(0x1fe)],_0xf87abd);}for(const _0x38bcbc of _0x13318b){_0x15fc84[_0x1e6b97(0x1f4)](_0x38bcbc[_0x1e6b97(0x1fe)],_0x38bcbc);}return Array['from'](_0x15fc84[_0x1e6b97(0x244)]());}function normalizeRuntimeSkillListResponse(_0x177680,_0x32a239){const _0x248bc5=a75_0xdadf;if(Array['isArray'](_0x32a239)){const _0xdde597=_0x32a239[_0x248bc5(0x234)](_0x562102=>_0x562102[_0x248bc5(0x226)]==='personal'),_0x813443=_0x32a239[_0x248bc5(0x234)](_0x557bc5=>_0x557bc5[_0x248bc5(0x226)]==='company');return{'appCode':_0x177680,'personal':_0xdde597,'company':_0x813443,'effective':[..._0x813443,..._0xdde597]};}return{'appCode':_0x32a239?.[_0x248bc5(0x21c)]??_0x177680,'personal':Array[_0x248bc5(0x20e)](_0x32a239?.['personal'])?_0x32a239['personal']:[],'company':Array[_0x248bc5(0x20e)](_0x32a239?.[_0x248bc5(0x251)])?_0x32a239['company']:[],'effective':Array[_0x248bc5(0x20e)](_0x32a239?.[_0x248bc5(0x1c4)])?_0x32a239[_0x248bc5(0x1c4)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x156017,_0x194887){const _0x4b1121=a76_0xb8fe,_0x23b944=_0x156017();while(!![]){try{const _0x421166=parseInt(_0x4b1121(0xcc))/0x1+parseInt(_0x4b1121(0xd7))/0x2*(-parseInt(_0x4b1121(0xd8))/0x3)+parseInt(_0x4b1121(0xd9))/0x4*(-parseInt(_0x4b1121(0xd6))/0x5)+parseInt(_0x4b1121(0xd1))/0x6*(-parseInt(_0x4b1121(0xd2))/0x7)+-parseInt(_0x4b1121(0xc9))/0x8*(parseInt(_0x4b1121(0xd4))/0x9)+-parseInt(_0x4b1121(0xcd))/0xa+parseInt(_0x4b1121(0xd0))/0xb;if(_0x421166===_0x194887)break;else _0x23b944['push'](_0x23b944['shift']());}catch(_0x5c9663){_0x23b944['push'](_0x23b944['shift']());}}}(a76_0x20a8,0x1ce06));function a76_0xb8fe(_0x421e7f,_0x1c7ea0){_0x421e7f=_0x421e7f-0xc9;const _0x20a8b2=a76_0x20a8();let _0xb8fe2=_0x20a8b2[_0x421e7f];return _0xb8fe2;}import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x312972){const _0x246012=a76_0xb8fe;if(cache[_0x246012(0xca)](_0x312972))return cache['get'](_0x312972);const _0x2ec393=await listDatasets(_0x312972),_0x20e8e1=new Map();for(const _0x4831a0 of _0x2ec393){const _0x232763=_0x4831a0['dbtableConfig'];_0x232763?.[_0x246012(0xce)]!=null&&_0x20e8e1[_0x246012(0xd5)](_0x232763['dbId'],_0x232763[_0x246012(0xda)]??_0x246012(0xd3)+_0x232763['dbId']);}const _0x48abbd=[..._0x20e8e1['entries']()][_0x246012(0xcf)](([_0x2d98b9,_0x10a406])=>({'dbId':_0x2d98b9,'dbName':_0x10a406}));return cache[_0x246012(0xd5)](_0x312972,_0x48abbd),_0x48abbd;}function a76_0x20a8(){const _0x32cdcf=['2889SBsTUf','set','716770oyTUpG','116sPWNft','4353DEAjzs','4xuiAzu','dbName','1984Kiibsh','has','find','161481XcGeOp','1368600IjBBNK','dbId','map','5653868LpacWF','75474YJotxC','63CORDds','db-'];a76_0x20a8=function(){return _0x32cdcf;};return a76_0x20a8();}export async function getDbName(_0x5c1d06,_0x3bf472){const _0x14971a=a76_0xb8fe;try{const _0x49391e=await listDatabases(_0x5c1d06);return _0x49391e[_0x14971a(0xcb)](_0x2a743c=>_0x2a743c[_0x14971a(0xce)]===_0x3bf472)?.[_0x14971a(0xda)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5815fd,_0x3396c5){const _0x20b7c7=a77_0x9c54,_0x138761=_0x5815fd();while(!![]){try{const _0x50ed6f=-parseInt(_0x20b7c7(0xda))/0x1+-parseInt(_0x20b7c7(0xd7))/0x2+-parseInt(_0x20b7c7(0xcf))/0x3+-parseInt(_0x20b7c7(0xd4))/0x4+-parseInt(_0x20b7c7(0xc2))/0x5+-parseInt(_0x20b7c7(0xe2))/0x6+parseInt(_0x20b7c7(0xd2))/0x7*(parseInt(_0x20b7c7(0xd5))/0x8);if(_0x50ed6f===_0x3396c5)break;else _0x138761['push'](_0x138761['shift']());}catch(_0x30f203){_0x138761['push'](_0x138761['shift']());}}}(a77_0x52b6,0xa1468));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';function a77_0x52b6(){const _0x16054a=['appCode','env','authMode',']\x20must\x20be\x20an\x20object.','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27\x20or\x20\x27{\x22id\x22:[1,2,3],\x22name\x22:\x22new\x22}\x27','field','aggregate','3180816yGxQts','string','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','update','bff','3836860ZdwHWw','trim','data\x20aggregate\x20--params.aggregate[','function','object','isArray','invokeSource','dataset_','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','accessKey','execute','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','batchCreate','457428dDQrnQ',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.','getOne','871283ChVapd','sql','2322644AdKLht','328siFkcx','validation','2531090ZpXcyN','map','delete','1146455YzLSkq'];a77_0x52b6=function(){return _0x16054a;};return a77_0x52b6();}import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';import{installLosslessJsonResponseParser}from'../utils/lossless-json.js';let _client,restoreResponseJsonParser;function a77_0x9c54(_0xd1b7c,_0x217fbd){_0xd1b7c=_0xd1b7c-0xc0;const _0x52b616=a77_0x52b6();let _0x9c5489=_0x52b616[_0xd1b7c];return _0x9c5489;}export function initSdkClient(_0x3e4059){const _0x130241=a77_0x9c54;restoreResponseJsonParser??=installLosslessJsonResponseParser();try{_client=createClient({'appCode':_0x3e4059[_0x130241(0xdb)],'env':_0x3e4059[_0x130241(0xdc)],'authMode':_0x3e4059[_0x130241(0xdd)],..._0x3e4059[_0x130241(0xcb)]?{'accessKey':_0x3e4059[_0x130241(0xcb)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x130241(0xc8)]}}});}catch(_0x12e5c2){clearSdkClient();throw _0x12e5c2;}}export function clearSdkClient(){_client=undefined,restoreResponseJsonParser?.(),restoreResponseJsonParser=undefined;}function ensureClient(){if(!_client)throw new Error('SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.');return _client;}function normalizeAggregateParams(_0x336a9d){const _0x24e946=a77_0x9c54,_0x3de0a4=_0x336a9d[_0x24e946(0xe1)];if(_0x3de0a4===undefined)return _0x336a9d;if(!Array[_0x24e946(0xc7)](_0x3de0a4))throw CliErrors[_0x24e946(0xd6)]('data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.');return{..._0x336a9d,'aggregate':_0x3de0a4[_0x24e946(0xd8)]((_0x5961ef,_0x2deebb)=>{const _0x484d63=_0x24e946;if(!_0x5961ef||typeof _0x5961ef!==_0x484d63(0xc6)||Array[_0x484d63(0xc7)](_0x5961ef))throw CliErrors['validation'](_0x484d63(0xc4)+_0x2deebb+_0x484d63(0xde));const _0x864095=_0x5961ef['column']??_0x5961ef[_0x484d63(0xe0)];if(typeof _0x864095!==_0x484d63(0xe3)||_0x864095[_0x484d63(0xc3)]()==='')throw CliErrors[_0x484d63(0xd6)](_0x484d63(0xc4)+_0x2deebb+_0x484d63(0xd0));const _0x3f9829={..._0x5961ef,'column':_0x864095};return delete _0x3f9829['field'],_0x3f9829;})};}export async function executeData(_0x39d0d2,_0x449e70,_0x12826c){const _0x125e47=a77_0x9c54,_0x3e47b4=ensureClient(),_0x172d67=_0x125e47(0xc9)+_0x39d0d2,_0x35a321=_0x3e47b4['models'][_0x172d67];if(!_0x35a321||typeof _0x35a321[_0x449e70]!==_0x125e47(0xc5))throw new Error(_0x125e47(0xca)+_0x449e70+'\x22.\x20'+_0x125e47(0xcd));if(_0x449e70===_0x125e47(0xce))return _0x35a321[_0x125e47(0xce)](parseBatchCreateItemsFromParams(_0x12826c));const _0x42c47a=_0x12826c!==undefined&&_0x12826c!==null&&!Array['isArray'](_0x12826c)?_0x12826c:{};switch(_0x449e70){case'getOne':{const _0x34a4a4=_0x42c47a['id'];if(_0x34a4a4===undefined||_0x34a4a4===null)throw new Error(_0x125e47(0xe4));return _0x35a321[_0x125e47(0xd1)](_0x34a4a4);}case _0x125e47(0xc0):{const {id:_0x51018d,..._0x51ad33}=_0x42c47a;if(_0x51018d===undefined||_0x51018d===null)throw new Error(_0x125e47(0xdf));return _0x35a321[_0x125e47(0xc0)](_0x51018d,_0x51ad33);}case'delete':{const _0x58deb4=_0x42c47a['id'];if(_0x58deb4===undefined||_0x58deb4===null)throw new Error('delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x35a321[_0x125e47(0xd9)](_0x58deb4);}case _0x125e47(0xe1):return _0x35a321[_0x125e47(0xe1)](normalizeAggregateParams(_0x42c47a));default:return _0x35a321[_0x449e70](_0x42c47a);}}export async function executeSdkSql(_0x33ef2d,_0x39c998){const _0x163536=a77_0x9c54,_0x166283=ensureClient();return _0x166283[_0x163536(0xd3)][_0x163536(0xcc)]({'sqlCode':_0x33ef2d,'params':_0x39c998});}export async function executeSdkBff(_0x2205a5,_0xa36710){const _0x40722e=a77_0x9c54,_0x70b5dd=ensureClient();return _0x70b5dd[_0x40722e(0xc1)][_0x40722e(0xcc)]({'scriptName':_0x2205a5,'params':_0xa36710});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a78_0x21284b=a78_0x3674;(function(_0x4f6614,_0x48ad89){const _0x18dee5=a78_0x3674,_0x45273d=_0x4f6614();while(!![]){try{const _0x58657b=-parseInt(_0x18dee5(0x18d))/0x1+parseInt(_0x18dee5(0x184))/0x2+-parseInt(_0x18dee5(0x189))/0x3+parseInt(_0x18dee5(0x186))/0x4+parseInt(_0x18dee5(0x183))/0x5*(parseInt(_0x18dee5(0x185))/0x6)+-parseInt(_0x18dee5(0x18e))/0x7+-parseInt(_0x18dee5(0x180))/0x8*(-parseInt(_0x18dee5(0x182))/0x9);if(_0x58657b===_0x48ad89)break;else _0x45273d['push'](_0x45273d['shift']());}catch(_0x535d6d){_0x45273d['push'](_0x45273d['shift']());}}}(a78_0x38ed,0xc3acb));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a78_0x21284b(0x188)+PRODUCT_CONFIG['newConfigFileName']+'\x20or\x20run\x20`'+CLI_BIN_NAME+a78_0x21284b(0x181),'configMissingHint':a78_0x21284b(0x18c)+PRODUCT_CONFIG[a78_0x21284b(0x18a)]+'.','notInProjectHint':a78_0x21284b(0x187)+PRODUCT_CONFIG[a78_0x21284b(0x18a)]+a78_0x21284b(0x18f)});function a78_0x3674(_0x5e0a04,_0x10579d){_0x5e0a04=_0x5e0a04-0x180;const _0x38ed7d=a78_0x38ed();let _0x36742f=_0x38ed7d[_0x5e0a04];return _0x36742f;}function a78_0x38ed(){const _0x291494=['5717424qZYeoS','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','Configure\x20accessKey\x20in\x20','3177564WDScOj','newConfigFileName','rate_limited','Set\x20appcode\x20via\x20--appcode\x20or\x20','1271399epmziY','8679615eBGwuD','\x20file.','9644296xLouuD','\x20auth\x20login`.','18rLCXZk','2635yISBEn','423392dfTFOU','3642pWeRds'];a78_0x38ed=function(){return _0x291494;};return a78_0x38ed();}export const CliErrors={...baseCliErrors,'rateLimited':(_0x48658c,_0x1a1ec0)=>new CliError(a78_0x21284b(0x18b),0x2,_0x48658c,_0x1a1ec0)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a79_0x1193(){var _0x2392e8=['1784RdYcPB','1585668zNuiWm','2507988errSIO','77scMedL','512015BOhmfc','1327668xFjVme','5AuiCTH','36uwlpJu','389970xkTIfp','56fdTtbI','5860DiQrMD','206644lbDAoO'];a79_0x1193=function(){return _0x2392e8;};return a79_0x1193();}function a79_0x8316(_0xe06f22,_0x225958){_0xe06f22=_0xe06f22-0x13c;var _0x11938d=a79_0x1193();var _0x831618=_0x11938d[_0xe06f22];return _0x831618;}(function(_0x1433e8,_0x12b9f8){var _0x1db4bc=a79_0x8316,_0x44a609=_0x1433e8();while(!![]){try{var _0x51d74a=parseInt(_0x1db4bc(0x143))/0x1*(parseInt(_0x1db4bc(0x13c))/0x2)+parseInt(_0x1db4bc(0x13e))/0x3+parseInt(_0x1db4bc(0x13d))/0x4*(parseInt(_0x1db4bc(0x147))/0x5)+-parseInt(_0x1db4bc(0x142))/0x6+-parseInt(_0x1db4bc(0x141))/0x7*(-parseInt(_0x1db4bc(0x146))/0x8)+-parseInt(_0x1db4bc(0x144))/0x9*(-parseInt(_0x1db4bc(0x145))/0xa)+-parseInt(_0x1db4bc(0x140))/0xb*(parseInt(_0x1db4bc(0x13f))/0xc);if(_0x51d74a===_0x12b9f8)break;else _0x44a609['push'](_0x44a609['shift']());}catch(_0x6084f6){_0x44a609['push'](_0x44a609['shift']());}}}(a79_0x1193,0x86aba));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a79_0x45dce5}from'@lovrabet/cli-framework';export function buildAllFlags(_0x2dbacd){return a79_0x45dce5(_0x2dbacd,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5436dd,_0x5c73ae){const _0x241f4f=a80_0x4f32,_0x281f33=_0x5436dd();while(!![]){try{const _0x1d01d2=parseInt(_0x241f4f(0x68))/0x1*(-parseInt(_0x241f4f(0x6f))/0x2)+parseInt(_0x241f4f(0x6c))/0x3+parseInt(_0x241f4f(0x6e))/0x4*(parseInt(_0x241f4f(0x6a))/0x5)+parseInt(_0x241f4f(0x6b))/0x6+-parseInt(_0x241f4f(0x6d))/0x7+parseInt(_0x241f4f(0x71))/0x8*(-parseInt(_0x241f4f(0x69))/0x9)+-parseInt(_0x241f4f(0x70))/0xa*(-parseInt(_0x241f4f(0x73))/0xb);if(_0x1d01d2===_0x5c73ae)break;else _0x281f33['push'](_0x281f33['shift']());}catch(_0x1eb6d3){_0x281f33['push'](_0x281f33['shift']());}}}(a80_0x51f2,0xa71c5));function a80_0x51f2(){const _0x2dc521=['54306clmcIv','10700010fkdauh','40BWtHqC','body','22TKDFAR','32uccRiE','1857159YmpltE','14135FNrFtK','2570916uDbynf','224691JEmRxS','981624GMqGCV','116eFEqwl'];a80_0x51f2=function(){return _0x2dc521;};return a80_0x51f2();}function a80_0x4f32(_0x4408f6,_0x1326a4){_0x4408f6=_0x4408f6-0x68;const _0x51f2b1=a80_0x51f2();let _0x4f3240=_0x51f2b1[_0x4408f6];return _0x4f3240;}export function dryRun(_0x25772f,_0x16c35b){const _0x5d29d0={'method':_0x25772f,'url':_0x16c35b},_0x3dbb11={'body'(_0x4db71b){const _0x3d88be=a80_0x4f32;return _0x5d29d0[_0x3d88be(0x72)]=_0x4db71b,_0x3dbb11;},'description'(_0x95c04){return _0x5d29d0['description']=_0x95c04,_0x3dbb11;},'build'(){return{..._0x5d29d0};}};return _0x3dbb11;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x11dd96=a81_0x3fa5;(function(_0x20813a,_0x211453){const _0x4c29a4=a81_0x3fa5,_0x2695c7=_0x20813a();while(!![]){try{const _0xeaa21b=parseInt(_0x4c29a4(0x15b))/0x1+-parseInt(_0x4c29a4(0x15e))/0x2+parseInt(_0x4c29a4(0x15a))/0x3*(-parseInt(_0x4c29a4(0x158))/0x4)+-parseInt(_0x4c29a4(0x156))/0x5+-parseInt(_0x4c29a4(0x15d))/0x6+parseInt(_0x4c29a4(0x154))/0x7+parseInt(_0x4c29a4(0x159))/0x8*(parseInt(_0x4c29a4(0x155))/0x9);if(_0xeaa21b===_0x211453)break;else _0x2695c7['push'](_0x2695c7['shift']());}catch(_0x3215e7){_0x2695c7['push'](_0x2695c7['shift']());}}}(a81_0x2d7b,0x34991));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a81_0x2d7b(){const _0x5d2ca1=['validateFlags','28vAiTcr','40FVZGYv','56751OFoHWu','259983HWMVlp','parseFlags','2039334VdUhSd','450140TiBJew','2116905rquhNd','891477hwsoOh','724220oqPSFQ'];a81_0x2d7b=function(){return _0x5d2ca1;};return a81_0x2d7b();}function a81_0x3fa5(_0x3692c0,_0x51a947){_0x3692c0=_0x3692c0-0x154;const _0x2d7b15=a81_0x2d7b();let _0x3fa555=_0x2d7b15[_0x3692c0];return _0x3fa555;}const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a81_0x11dd96(0x15c)];export const validateFlags=helpers[a81_0x11dd96(0x157)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d65c9,_0x384dd4){const _0x4c9e6b=a82_0x28f7,_0x2eebc7=_0x4d65c9();while(!![]){try{const _0x50a115=parseInt(_0x4c9e6b(0x1fa))/0x1+-parseInt(_0x4c9e6b(0x1f9))/0x2+parseInt(_0x4c9e6b(0x1f0))/0x3+-parseInt(_0x4c9e6b(0x1fd))/0x4*(-parseInt(_0x4c9e6b(0x1f1))/0x5)+parseInt(_0x4c9e6b(0x200))/0x6+parseInt(_0x4c9e6b(0x1f3))/0x7*(-parseInt(_0x4c9e6b(0x1f7))/0x8)+-parseInt(_0x4c9e6b(0x1fb))/0x9*(parseInt(_0x4c9e6b(0x1f5))/0xa);if(_0x50a115===_0x384dd4)break;else _0x2eebc7['push'](_0x2eebc7['shift']());}catch(_0x1847e5){_0x2eebc7['push'](_0x2eebc7['shift']());}}}(a82_0x3bb9,0xd7382));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';function a82_0x28f7(_0x8a03f3,_0x539757){_0x8a03f3=_0x8a03f3-0x1ed;const _0x3bb95a=a82_0x3bb9();let _0x28f773=_0x3bb95a[_0x8a03f3];return _0x28f773;}function a82_0x3bb9(){const _0x7d51dc=['8LYbNOY','generateCommandHelp','104584beSgww','84260HsJYcD','9eIhiqZ','get','80bOivUX','Requires\x20appcode\x20(set\x20via\x20','filter','5350344OEqltl','has','generateFullHelp','newConfigFileName','3503547NxosQS','193485yJMzuS','\x20or\x20--appcode).','3214358kRcwIZ','service','15247490mWTJPe','map'];a82_0x3bb9=function(){return _0x7d51dc;};return a82_0x3bb9();}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 createGenerators(){const _0x20edb2=a82_0x28f7;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(serviceRegistry,safeListDynamicServiceEntries()),'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x20edb2(0x1fe)+PRODUCT_CONFIG[_0x20edb2(0x1ef)]+_0x20edb2(0x1f2)});}export function generateCommandHelp(_0x36343d){const _0x3e891b=a82_0x28f7;return createGenerators()[_0x3e891b(0x1f8)](_0x36343d);}export function generateServiceHelp(_0xfab4e5){return createGenerators()['generateServiceHelp'](_0xfab4e5);}export function generateFullHelp(){const _0x14a076=a82_0x28f7;return createGenerators()[_0x14a076(0x1ee)]();}function getAnyServiceEntry(_0x3e31a8){const _0x2f0575=getServiceEntry(_0x3e31a8);if(_0x2f0575)return _0x2f0575;try{return getDynamicServiceEntry(_0x3e31a8);}catch{return undefined;}}function getAnyServiceDefinitions(_0x7e2c1){const _0xb198c3=a82_0x28f7,_0x2eff0c=serviceGroups[_0xb198c3(0x1fc)](_0x7e2c1);if(_0x2eff0c)return _0x2eff0c;try{return getDynamicServiceDefinitions(_0x7e2c1);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x3a4b62=a82_0x28f7,_0x156cea=new Set(serviceRegistry[_0x3a4b62(0x1f6)](_0x1d0e26=>_0x1d0e26[_0x3a4b62(0x1f4)]));try{return listDynamicServiceEntries()[_0x3a4b62(0x1ff)](_0x5df68e=>!_0x156cea[_0x3a4b62(0x1ed)](_0x5df68e['service']));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a83_0x409a(_0x57bd24,_0x5290e9){_0x57bd24=_0x57bd24-0x15f;var _0xbca5bf=a83_0xbca5();var _0x409afe=_0xbca5bf[_0x57bd24];return _0x409afe;}(function(_0x415530,_0x82fae3){var _0x5c5d82=a83_0x409a,_0x36b772=_0x415530();while(!![]){try{var _0x16912b=parseInt(_0x5c5d82(0x167))/0x1*(-parseInt(_0x5c5d82(0x169))/0x2)+-parseInt(_0x5c5d82(0x162))/0x3+-parseInt(_0x5c5d82(0x166))/0x4*(-parseInt(_0x5c5d82(0x15f))/0x5)+parseInt(_0x5c5d82(0x160))/0x6*(parseInt(_0x5c5d82(0x163))/0x7)+parseInt(_0x5c5d82(0x161))/0x8+parseInt(_0x5c5d82(0x168))/0x9*(parseInt(_0x5c5d82(0x165))/0xa)+-parseInt(_0x5c5d82(0x164))/0xb;if(_0x16912b===_0x82fae3)break;else _0x36b772['push'](_0x36b772['shift']());}catch(_0x3cfcdf){_0x36b772['push'](_0x36b772['shift']());}}}(a83_0xbca5,0xb13e1));export{runCommand}from'../framework/runner.js';function a83_0xbca5(){var _0x514991=['2028vPhBCd','892664LDnLun','1556973wBKpAt','12075aMYPgp','8961799fxcvYh','50seLfWl','4623940HjXCPK','236TqrJwo','1590399TyIIgM','5716pwTDsr','5hYPQum'];a83_0xbca5=function(){return _0x514991;};return a83_0xbca5();}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';export{dryRun}from'../framework/dryrun.js';export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3925ea,_0x45b596){const _0x33b121=a84_0x43c8,_0x368992=_0x3925ea();while(!![]){try{const _0x1fdff3=-parseInt(_0x33b121(0x1bd))/0x1+parseInt(_0x33b121(0x1b5))/0x2*(-parseInt(_0x33b121(0x1ba))/0x3)+parseInt(_0x33b121(0x1b6))/0x4+-parseInt(_0x33b121(0x1b8))/0x5+parseInt(_0x33b121(0x1bc))/0x6*(-parseInt(_0x33b121(0x1b1))/0x7)+-parseInt(_0x33b121(0x1af))/0x8*(parseInt(_0x33b121(0x1b2))/0x9)+parseInt(_0x33b121(0x1b4))/0xa*(parseInt(_0x33b121(0x1bb))/0xb);if(_0x1fdff3===_0x45b596)break;else _0x368992['push'](_0x368992['shift']());}catch(_0x1ef406){_0x368992['push'](_0x368992['shift']());}}}(a84_0x3c2b,0x91c9e));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a84_0x3c2b(){const _0x25898b=['2098130oOPvVo','format','2608707DKSGue','1199xuvmdb','6PhimUd','758108yzxDfM','message','136upNKlo','pretty','3789443ZMOPSd','389727qHfBXk','error','312450gfSJqC','2KFbJGj','2064992VIOkWk','update'];a84_0x3c2b=function(){return _0x25898b;};return a84_0x3c2b();}import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x2c2070,_0x2fb4da){const _0x55edf0=a84_0x43c8,_0x1462b8=_0x2c2070['_notice'],{_notice:_0x5ab146,..._0x19453f}=_0x2c2070;void _0x5ab146,baseFormatOutput(_0x19453f,_0x2fb4da),_0x2fb4da[_0x55edf0(0x1b9)]===_0x55edf0(0x1b0)&&printPrettyNotice(_0x1462b8);}function a84_0x43c8(_0x4d0605,_0x9fe0dd){_0x4d0605=_0x4d0605-0x1af;const _0x3c2b7c=a84_0x3c2b();let _0x43c879=_0x3c2b7c[_0x4d0605];return _0x43c879;}function printPrettyNotice(_0x1fc128){const _0x506ac1=a84_0x43c8;if(!_0x1fc128?.[_0x506ac1(0x1b7)])return;console[_0x506ac1(0x1b3)](_0x1fc128['update'][_0x506ac1(0x1be)]+'\x20('+_0x1fc128[_0x506ac1(0x1b7)]['url']+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21a29e,_0x2d6137){const _0x1c9f66=a85_0x2d82,_0x2f3fb8=_0x21a29e();while(!![]){try{const _0x47c9bc=-parseInt(_0x1c9f66(0x17e))/0x1*(parseInt(_0x1c9f66(0x17f))/0x2)+parseInt(_0x1c9f66(0x19c))/0x3*(-parseInt(_0x1c9f66(0x190))/0x4)+parseInt(_0x1c9f66(0x18d))/0x5+parseInt(_0x1c9f66(0x189))/0x6+-parseInt(_0x1c9f66(0x191))/0x7*(parseInt(_0x1c9f66(0x199))/0x8)+-parseInt(_0x1c9f66(0x18b))/0x9+parseInt(_0x1c9f66(0x187))/0xa;if(_0x47c9bc===_0x2d6137)break;else _0x2f3fb8['push'](_0x2f3fb8['shift']());}catch(_0x366c6f){_0x2f3fb8['push'](_0x2f3fb8['shift']());}}}(a85_0x1006,0xa25a8));function toKebab(_0xd95a96){const _0x1f9f28=a85_0x2d82;return _0xd95a96[_0x1f9f28(0x1a2)](/_/g,'-')[_0x1f9f28(0x1a2)](/-([A-Z]+)/g,(_0x39588b,_0x5f19e5)=>'-'+_0x5f19e5[_0x1f9f28(0x19d)]())[_0x1f9f28(0x1a2)](/([a-z0-9])([A-Z])/g,(_0x40a210,_0x5046be,_0x57ebd0)=>_0x5046be+'-'+_0x57ebd0)['toLowerCase']();}function a85_0x2d82(_0x4071e0,_0xd35211){_0x4071e0=_0x4071e0-0x17c;const _0x1006ef=a85_0x1006();let _0x2d82b1=_0x1006ef[_0x4071e0];return _0x2d82b1;}function buildKnownFlags(_0x3992b7){const _0x5d78cc=a85_0x2d82,_0x127b4a=new Set();for(const _0x5ebf20 of _0x3992b7){_0x127b4a[_0x5d78cc(0x18e)](_0x5ebf20[_0x5d78cc(0x197)]),_0x127b4a[_0x5d78cc(0x18e)](toCamelCase(_0x5ebf20['name']));}for(const _0x6e8eed of[_0x5d78cc(0x181),_0x5d78cc(0x183),_0x5d78cc(0x195),_0x5d78cc(0x18f)]){_0x127b4a[_0x5d78cc(0x18e)](_0x6e8eed);}for(const _0x32e682 of[_0x5d78cc(0x188),'env',_0x5d78cc(0x198),_0x5d78cc(0x192),_0x5d78cc(0x19a),_0x5d78cc(0x17d),'ci','global',_0x5d78cc(0x182)]){_0x127b4a[_0x5d78cc(0x18e)](_0x32e682);}return _0x127b4a;}function buildFlagTypeMap(_0x47d9f7){const _0x7d43ce=a85_0x2d82,_0x3648a1=new Map();for(const _0xb254d3 of _0x47d9f7){_0x3648a1[_0x7d43ce(0x196)](_0xb254d3[_0x7d43ce(0x197)],_0xb254d3['type']),_0x3648a1[_0x7d43ce(0x196)](toCamelCase(_0xb254d3['name']),_0xb254d3[_0x7d43ce(0x19b)]);}return _0x3648a1;}function toCamelCase(_0x58269c){const _0x55173e=a85_0x2d82;return _0x58269c[_0x55173e(0x1a2)](/-([a-z])/g,(_0x2bcc23,_0x4c8084)=>_0x4c8084[_0x55173e(0x1a0)]());}function aliasHandler(_0x3cac7a,_0x12a9b9){const _0x409b7e=a85_0x2d82,_0x1ed9f9=[];for(const _0x2d1885 of Object['keys'](_0x3cac7a)){if(_0x12a9b9['has'](_0x2d1885))continue;const _0x1c94b1=toKebab(_0x2d1885);_0x1c94b1!==_0x2d1885&&_0x12a9b9[_0x409b7e(0x184)](_0x1c94b1)&&_0x1ed9f9[_0x409b7e(0x1a1)]({'original':_0x2d1885,'corrected':_0x1c94b1,'handler':'alias'});}return _0x1ed9f9;}function a85_0x1006(){const _0x7d44cd=['284770yPBEKj','add','format','77248eMBIGp','1068487IBTsgh','app','original','number','yes','set','name','appcode','56zKJVaE','nonInteractive','type','102PSmEmg','toLowerCase','get','slice','toUpperCase','push','replace','entries','non-interactive','162688zKBdYo','16YlDHfg','corrected','dry-run','version','dryRun','has','boolean','length','27545840sFoFkh','help','7892124dzSpOC','sticky','3917637OgtcxT','string'];a85_0x1006=function(){return _0x7d44cd;};return a85_0x1006();}function stickyHandler(_0x1e1ac3,_0x2eadd7,_0x3bb169){const _0x180ce7=a85_0x2d82,_0x24b592=[];for(const [_0x2bd7b3,_0x35bb3a]of Object[_0x180ce7(0x17c)](_0x1e1ac3)){if(_0x35bb3a!==!![])continue;for(let _0x5bea39=_0x2bd7b3[_0x180ce7(0x186)]-0x1;_0x5bea39>0x0;_0x5bea39--){const _0x44d527=_0x2bd7b3[_0x180ce7(0x19f)](0x0,_0x5bea39),_0x12b4db=_0x2bd7b3['slice'](_0x5bea39),_0x292982=toKebab(_0x44d527),_0x3e6349=toCamelCase(_0x44d527),_0x3e0ef0=_0x2eadd7['has'](_0x44d527)?_0x44d527:_0x2eadd7[_0x180ce7(0x184)](_0x292982)?_0x292982:_0x2eadd7['has'](_0x3e6349)?_0x3e6349:null;if(!_0x3e0ef0)continue;const _0xbc9abc=_0x3bb169['get'](_0x3e0ef0)??_0x180ce7(0x18c);let _0x236677;if(_0xbc9abc===_0x180ce7(0x194)){const _0x155c65=Number(_0x12b4db);if(isNaN(_0x155c65)||_0x12b4db==='')continue;_0x236677=_0x155c65;}else{if(_0xbc9abc===_0x180ce7(0x185))continue;else{if(_0x12b4db==='')continue;_0x236677=_0x12b4db;}}_0x24b592[_0x180ce7(0x1a1)]({'original':_0x2bd7b3,'corrected':_0x3e0ef0+'='+_0x236677,'handler':_0x180ce7(0x18a)});break;}}return _0x24b592;}export function correctFlags(_0x113d15,_0x445c47){const _0x2a30d3=a85_0x2d82,_0x4eccb5=buildKnownFlags(_0x445c47),_0x4c7c6a=buildFlagTypeMap(_0x445c47),_0x3ef259=aliasHandler(_0x113d15,_0x4eccb5),_0x4d5a0a=stickyHandler(_0x113d15,_0x4eccb5,_0x4c7c6a),_0x44592d=[..._0x3ef259,..._0x4d5a0a];if(_0x44592d[_0x2a30d3(0x186)]===0x0)return{'flags':_0x113d15,'corrections':[]};const _0xb2c62c={..._0x113d15},_0x598883=new Set();for(const _0x341cc6 of _0x3ef259){_0xb2c62c[_0x341cc6['corrected']]=_0x113d15[_0x341cc6[_0x2a30d3(0x193)]],_0x598883[_0x2a30d3(0x18e)](_0x341cc6[_0x2a30d3(0x193)]);}for(const _0x314bd9 of _0x4d5a0a){const _0x8901a4=_0x314bd9['corrected']['indexOf']('='),_0x44af6d=_0x314bd9[_0x2a30d3(0x180)][_0x2a30d3(0x19f)](0x0,_0x8901a4),_0x13bc38=_0x314bd9[_0x2a30d3(0x180)][_0x2a30d3(0x19f)](_0x8901a4+0x1),_0x3cbda1=_0x4c7c6a[_0x2a30d3(0x19e)](_0x44af6d)??'string';_0x3cbda1===_0x2a30d3(0x194)?_0xb2c62c[_0x44af6d]=Number(_0x13bc38):_0xb2c62c[_0x44af6d]=_0x13bc38,_0x598883[_0x2a30d3(0x18e)](_0x314bd9[_0x2a30d3(0x193)]);}for(const _0x586b72 of _0x598883){delete _0xb2c62c[_0x586b72];}return{'flags':_0xb2c62c,'corrections':_0x44592d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a86_0x49a2(){const _0xd8436f=['\x20Retry\x20only\x20the\x20failed\x20item;\x20keep\x20requests\x20serial\x20and\x20preserve\x20completed\x20checkpoints.','entries','has','errorCode','MAX_QPS_LIMIT','IP_RATE_LIMIT_EXCEEDED','566RFtZcd','143555vTFbDO','toLowerCase','Retry\x20after\x20a\x20short\x20delay.','retry-after','isArray','message','1837OXHNSo','19190jTsihv','16wqHLLY','toUpperCase','rateLimited','1908627WMSKOi','test','994EaGbXh','retryAfterSeconds','number','1199826APILTY','call','retryAfter','EXCEED_MAX_QPS_LIMIT','4156470cabpPV','object','12wUYuUC','3017772GfNDBM','Request\x20rate\x20limit\x20exceeded.','string','get','function','Retry-After'];a86_0x49a2=function(){return _0xd8436f;};return a86_0x49a2();}const a86_0x34b815=a86_0x494d;(function(_0x2882b5,_0x525c11){const _0x124a27=a86_0x494d,_0x55f733=_0x2882b5();while(!![]){try{const _0x44cc64=parseInt(_0x124a27(0x119))/0x1*(-parseInt(_0x124a27(0x10b))/0x2)+parseInt(_0x124a27(0x11c))/0x3+-parseInt(_0x124a27(0x122))/0x4*(parseInt(_0x124a27(0x10c))/0x5)+parseInt(_0x124a27(0x123))/0x6+parseInt(_0x124a27(0x117))/0x7*(parseInt(_0x124a27(0x114))/0x8)+-parseInt(_0x124a27(0x120))/0x9+parseInt(_0x124a27(0x113))/0xa*(-parseInt(_0x124a27(0x112))/0xb);if(_0x44cc64===_0x525c11)break;else _0x55f733['push'](_0x55f733['shift']());}catch(_0x2cf6c3){_0x55f733['push'](_0x55f733['shift']());}}}(a86_0x49a2,0x48df8));import{CliErrors}from'../errors.js';const RATE_LIMIT_ERROR_CODES=new Set([a86_0x34b815(0x11f),a86_0x34b815(0x109),a86_0x34b815(0x10a)]);function nonEmptyString(_0x4511de){const _0x19a3f7=a86_0x34b815;if(typeof _0x4511de!==_0x19a3f7(0x125))return undefined;const _0x44ce13=_0x4511de['trim']();return _0x44ce13||undefined;}function buildRetryHint(_0x229261){const _0x19cf4d=a86_0x34b815,_0x2fbc36=nonEmptyString(_0x229261),_0x78c334=_0x2fbc36?/^\d+$/[_0x19cf4d(0x118)](_0x2fbc36)?'Wait\x20'+_0x2fbc36+'\x20seconds\x20before\x20retrying.':'Retry\x20after\x20'+_0x2fbc36+'.':_0x19cf4d(0x10e);return _0x78c334+_0x19cf4d(0x129);}export function createRateLimitError(_0x195105){const _0x1b9fb5=a86_0x34b815,_0x4258b3=nonEmptyString(_0x195105[_0x1b9fb5(0x12c)])?.[_0x1b9fb5(0x115)](),_0x15343c=Number(_0x195105['status'])===0x1ad||_0x4258b3!==undefined&&RATE_LIMIT_ERROR_CODES[_0x1b9fb5(0x12b)](_0x4258b3);if(!_0x15343c)return undefined;return CliErrors[_0x1b9fb5(0x116)](nonEmptyString(_0x195105[_0x1b9fb5(0x111)])??_0x1b9fb5(0x124),buildRetryHint(_0x195105[_0x1b9fb5(0x11e)]));}export function readRetryAfter(_0x14aad2){const _0x3a54e8=a86_0x34b815;if(!_0x14aad2||typeof _0x14aad2!==_0x3a54e8(0x121))return undefined;const _0x115d58=_0x14aad2[_0x3a54e8(0x126)];if(typeof _0x115d58===_0x3a54e8(0x127)){const _0x2456b6=_0x115d58[_0x3a54e8(0x11d)](_0x14aad2,_0x3a54e8(0x128))??_0x115d58[_0x3a54e8(0x11d)](_0x14aad2,_0x3a54e8(0x10f));return nonEmptyString(_0x2456b6);}for(const [_0x4a1eb9,_0x51be71]of Object[_0x3a54e8(0x12a)](_0x14aad2)){if(_0x4a1eb9[_0x3a54e8(0x10d)]()===_0x3a54e8(0x10f))return nonEmptyString(_0x51be71)??(typeof _0x51be71===_0x3a54e8(0x11b)?String(_0x51be71):undefined);}return undefined;}function a86_0x494d(_0x5d46f4,_0x4d532c){_0x5d46f4=_0x5d46f4-0x109;const _0x49a29b=a86_0x49a2();let _0x494da3=_0x49a29b[_0x5d46f4];return _0x494da3;}export function readRetryAfterSeconds(_0x1a7036){const _0x55b570=a86_0x34b815;if(!_0x1a7036||typeof _0x1a7036!==_0x55b570(0x121)||Array[_0x55b570(0x110)](_0x1a7036))return undefined;const _0x19f9b0=_0x1a7036[_0x55b570(0x11a)];if(typeof _0x19f9b0==='number')return Number['isInteger'](_0x19f9b0)&&_0x19f9b0>=0x0?String(_0x19f9b0):undefined;const _0x2d99ae=nonEmptyString(_0x19f9b0);return _0x2d99ae&&/^\d+$/[_0x55b570(0x118)](_0x2d99ae)?_0x2d99ae:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a87_0x480c(_0x787252,_0x238328){_0x787252=_0x787252-0xe1;var _0x30df0a=a87_0x30df();var _0x480cb9=_0x30df0a[_0x787252];return _0x480cb9;}function a87_0x30df(){var _0x1a726a=['54057QXQuyr','940076GvZNtC','912150zqlvLU','18vQKlrO','791996pqHoeu','107659hWBQLh','7180864ynycsh','1974196hUwhLA'];a87_0x30df=function(){return _0x1a726a;};return a87_0x30df();}(function(_0x5d2d6e,_0x35029d){var _0x2e290a=a87_0x480c,_0x87b16a=_0x5d2d6e();while(!![]){try{var _0x89c8f=-parseInt(_0x2e290a(0xe6))/0x1+-parseInt(_0x2e290a(0xe2))/0x2+-parseInt(_0x2e290a(0xe1))/0x3+-parseInt(_0x2e290a(0xe5))/0x4+parseInt(_0x2e290a(0xe3))/0x5*(parseInt(_0x2e290a(0xe4))/0x6)+-parseInt(_0x2e290a(0xe8))/0x7+parseInt(_0x2e290a(0xe7))/0x8;if(_0x89c8f===_0x35029d)break;else _0x87b16a['push'](_0x87b16a['shift']());}catch(_0xeb0da3){_0x87b16a['push'](_0x87b16a['shift']());}}}(a87_0x30df,0x5a203));export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a0323,_0x2d3a3c){const _0x200116=a88_0x3880,_0x592502=_0x3a0323();while(!![]){try{const _0x5d4e65=-parseInt(_0x200116(0x7f))/0x1+-parseInt(_0x200116(0x77))/0x2*(-parseInt(_0x200116(0x6f))/0x3)+-parseInt(_0x200116(0x6a))/0x4*(parseInt(_0x200116(0x7c))/0x5)+-parseInt(_0x200116(0x6b))/0x6+-parseInt(_0x200116(0x69))/0x7+parseInt(_0x200116(0x7d))/0x8+parseInt(_0x200116(0x67))/0x9;if(_0x5d4e65===_0x2d3a3c)break;else _0x592502['push'](_0x592502['shift']());}catch(_0x1d3075){_0x592502['push'](_0x592502['shift']());}}}(a88_0x1f98,0x5156a));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x3aab50,_0x2d3431,_0x2b15f8){const _0x1a62a4=a88_0x3880,_0x2225b4=buildConfirmationContext(_0x3aab50,_0x2d3431,_0x2b15f8),_0x17680d=[_0x1a62a4(0x81)+_0x2225b4[_0x1a62a4(0x7a)]];return _0x2225b4['description']&&_0x17680d[_0x1a62a4(0x76)](_0x1a62a4(0x72)+_0x2225b4['description']),_0x2225b4[_0x1a62a4(0x73)]&&_0x17680d[_0x1a62a4(0x76)](_0x1a62a4(0x7e)+_0x2225b4['affectedRecords']),_0x17680d[_0x1a62a4(0x76)](_0x1a62a4(0x6c)),_0x17680d;}export function reconstructCommandArgv(_0x49a83c,_0xf10a77){const _0x242f21=a88_0x3880,_0x16f93d=[CLI_BIN_NAME,_0x49a83c[_0x242f21(0x71)],_0x49a83c['command']];for(const [_0x119fd7,_0x1b0795]of Object[_0x242f21(0x80)](_0xf10a77)){if(_0x1b0795===!![])_0x16f93d[_0x242f21(0x76)]('--'+_0x119fd7);else _0x1b0795!==![]&&_0x1b0795!==undefined&&_0x1b0795!==''&&_0x16f93d[_0x242f21(0x76)]('--'+_0x119fd7+'\x20'+JSON['stringify'](_0x1b0795));}return _0x16f93d['push'](_0x242f21(0x70)),_0x16f93d[_0x242f21(0x79)]('\x20');}function a88_0x3880(_0x5de5ee,_0x49f3f1){_0x5de5ee=_0x5de5ee-0x67;const _0x1f98a1=a88_0x1f98();let _0x388099=_0x1f98a1[_0x5de5ee];return _0x388099;}function buildConfirmationContext(_0x15b288,_0x59da20,_0x3b2176){const _0x488457=a88_0x3880,_0x342ffc=extractAffectedRecords(_0x3b2176);return{'commandLabel':_0x59da20,'description':_0x15b288[_0x488457(0x74)],'affectedRecords':_0x342ffc};}function a88_0x1f98(){const _0xf79832=['3265VCGsSw','3481736EPmqIB','\x20\x20\x20Affected:\x20','429169rbkmQW','entries','⚠\x20\x20High-risk\x20operation:\x20','4920084meQvLe','id=','1785714AzLvZm','356LvvKhA','363378TGrugk','\x20\x20\x20Continue?\x20[y/N]\x20','params=','code','21030LMXFOG','--yes','service','\x20\x20\x20','affectedRecords','description','length','push','44CvUWlb','code=','join','commandLabel','params'];a88_0x1f98=function(){return _0xf79832;};return a88_0x1f98();}function extractAffectedRecords(_0x3be265){const _0x152382=a88_0x3880,_0x4b9e98=[];if(_0x3be265[_0x152382(0x6e)])_0x4b9e98['push'](_0x152382(0x78)+_0x3be265[_0x152382(0x6e)]);if(_0x3be265['id'])_0x4b9e98[_0x152382(0x76)](_0x152382(0x68)+_0x3be265['id']);if(_0x3be265['name'])_0x4b9e98[_0x152382(0x76)]('name='+_0x3be265['name']);if(_0x3be265[_0x152382(0x7b)])_0x4b9e98[_0x152382(0x76)](_0x152382(0x6d)+_0x3be265[_0x152382(0x7b)]);return _0x4b9e98[_0x152382(0x75)]>0x0?_0x4b9e98['join'](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54e21d,_0x4f0df0){const _0x4e0b50=a89_0x5659,_0x539294=_0x54e21d();while(!![]){try{const _0x26d263=-parseInt(_0x4e0b50(0xa9))/0x1*(-parseInt(_0x4e0b50(0xb4))/0x2)+-parseInt(_0x4e0b50(0xad))/0x3+parseInt(_0x4e0b50(0xb5))/0x4*(-parseInt(_0x4e0b50(0xb2))/0x5)+-parseInt(_0x4e0b50(0xa4))/0x6+-parseInt(_0x4e0b50(0xb6))/0x7*(-parseInt(_0x4e0b50(0xb1))/0x8)+parseInt(_0x4e0b50(0xa7))/0x9+parseInt(_0x4e0b50(0xaa))/0xa;if(_0x26d263===_0x4f0df0)break;else _0x539294['push'](_0x539294['shift']());}catch(_0x1d997f){_0x539294['push'](_0x539294['shift']());}}}(a89_0x22a6,0x7eedd));function a89_0x5659(_0x58c723,_0x37be53){_0x58c723=_0x58c723-0xa4;const _0x22a6f8=a89_0x22a6();let _0x5659ec=_0x22a6f8[_0x58c723];return _0x5659ec;}import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';function a89_0x22a6(){const _0x233487=['status','trim','3483216UMgPDr','4582475UQltiZ','message','118kClcQf','4FdmpzX','7mmPyac','1138086zquMTA','response','stringify','2373912pMgDTz','description','2636HFHoVH','12403440PKBUPG','code','string','1406883ZwaIoC','validation'];a89_0x22a6=function(){return _0x233487;};return a89_0x22a6();}export function mapUserFacingExecuteError(_0x3c16dc){const _0x29afcb=a89_0x5659;if(_0x3c16dc instanceof LovrabetError){const _0xd3a02f=userFacingLovrabetMessage(_0x3c16dc),_0x50495c=_0x3c16dc,_0x57998a=createRateLimitError({'status':_0x50495c[_0x29afcb(0xaf)],'errorCode':_0x50495c[_0x29afcb(0xab)],'message':_0xd3a02f,'retryAfter':readRetryAfter(_0x50495c[_0x29afcb(0xa5)]?.['headers'])??readRetryAfterSeconds(_0x50495c[_0x29afcb(0xa5)])});return _0x57998a??CliErrors[_0x29afcb(0xae)](_0xd3a02f);}return _0x3c16dc;}function userFacingLovrabetMessage(_0xaf44f1){const _0x1bfd93=a89_0x5659,_0x1af396=_0xaf44f1[_0x1bfd93(0xa8)];if(_0x1af396!==undefined&&_0x1af396!==null){if(typeof _0x1af396===_0x1bfd93(0xac)&&_0x1af396[_0x1bfd93(0xb0)]())return _0x1af396[_0x1bfd93(0xb0)]();try{return JSON[_0x1bfd93(0xa6)](_0x1af396);}catch{}}return _0xaf44f1[_0x1bfd93(0xb3)];}
|