@lovrabet/lovrabet-cli 2.1.1 → 2.1.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/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/index.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/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x2aaeee=a54_0x1ea5;(function(_0x4ff9ae,_0x431e72){const _0x196ae5=a54_0x1ea5,_0x3f433b=_0x4ff9ae();while(!![]){try{const _0x2354c5=-parseInt(_0x196ae5(0xb0))/0x1+-parseInt(_0x196ae5(0xaa))/0x2*(parseInt(_0x196ae5(0xa7))/0x3)+-parseInt(_0x196ae5(0xb1))/0x4+-parseInt(_0x196ae5(0xb3))/0x5*(parseInt(_0x196ae5(0xac))/0x6)+parseInt(_0x196ae5(0xaf))/0x7*(-parseInt(_0x196ae5(0xa8))/0x8)+parseInt(_0x196ae5(0xae))/0x9*(-parseInt(_0x196ae5(0xb2))/0xa)+parseInt(_0x196ae5(0xa5))/0xb*(parseInt(_0x196ae5(0xad))/0xc);if(_0x2354c5===_0x431e72)break;else _0x3f433b['push'](_0x3f433b['shift']());}catch(_0x33cc75){_0x3f433b['push'](_0x3f433b['shift']());}}}(a54_0x252e,0x6f8cc));function a54_0x1ea5(_0x5c38ad,_0xf1e249){_0x5c38ad=_0x5c38ad-0xa5;const _0x252e3e=a54_0x252e();let _0x1ea507=_0x252e3e[_0x5c38ad];return _0x1ea507;}import{PRODUCT_CONFIG}from'../constant/product.js';function a54_0x252e(){const _0x4c9c97=['production','3SvYdKJ','8mWhNAm','accessKeyCreatePath','845408TyIggw','user','678036nxRRCV','19416JXTGTo','261jNuuPQ','4832247AHjgWH','23339YHHMwv','3524860DBXTen','38270JKpLDj','30UFCczM','22187VDvdYg'];a54_0x252e=function(){return _0x4c9c97;};return a54_0x252e();}export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG['domains'][a54_0x2aaeee(0xa6)][a54_0x2aaeee(0xab)]+PRODUCT_CONFIG[a54_0x2aaeee(0xa9)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a55_0x3de67e=a55_0xc765;(function(_0x4fc328,_0x1cd826){const _0x1e414b=a55_0xc765,_0x4835b0=_0x4fc328();while(!![]){try{const _0x379159=parseInt(_0x1e414b(0x13b))/0x1*(parseInt(_0x1e414b(0x117))/0x2)+parseInt(_0x1e414b(0x154))/0x3*(parseInt(_0x1e414b(0x12f))/0x4)+-parseInt(_0x1e414b(0x131))/0x5*(-parseInt(_0x1e414b(0x12e))/0x6)+parseInt(_0x1e414b(0x11c))/0x7+-parseInt(_0x1e414b(0x138))/0x8*(-parseInt(_0x1e414b(0x159))/0x9)+parseInt(_0x1e414b(0x12b))/0xa*(-parseInt(_0x1e414b(0x13d))/0xb)+-parseInt(_0x1e414b(0x143))/0xc;if(_0x379159===_0x1cd826)break;else _0x4835b0['push'](_0x4835b0['shift']());}catch(_0x475060){_0x4835b0['push'](_0x4835b0['shift']());}}}(a55_0x361e,0x4f1ed));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';function a55_0xc765(_0x457956,_0x365b23){_0x457956=_0x457956-0x10d;const _0x361e7c=a55_0x361e();let _0xc765c1=_0x361e7c[_0x457956];return _0xc765c1;}import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a55_0x3de67e(0x114)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a55_0x3de67e(0x137)];function resolveConfigPath(_0x3ea93e){for(const _0x49a311 of CONFIG_NAMES){const _0x41590d=resolve(_0x3ea93e,_0x49a311);if(existsSync(_0x41590d))return _0x41590d;}return undefined;}export function resolveWriteConfigPath(_0x230baa){const _0x9f789e=_0x230baa==='project'?process['cwd']():homedir(),_0x237caa=resolveConfigPath(_0x9f789e);return _0x237caa??resolve(_0x9f789e,NEW_CONFIG_NAME);}export function readConfigFile(_0x1ceba1){const _0x42a001=a55_0x3de67e;try{if(existsSync(_0x1ceba1)){const _0x3cf952=readFileSync(_0x1ceba1,{'encoding':_0x42a001(0x120)});if(_0x3cf952){const _0x1f245e=JSON['parse'](_0x3cf952);return migrateOnlineEnv(_0x1ceba1,_0x1f245e),_0x1f245e;}}}catch{}return{};}function migrateOnlineEnv(_0x4eeb03,_0x39dce6){const _0x51e3c4=a55_0x3de67e;let _0x39b6e5=![];_0x39dce6[_0x51e3c4(0x13c)]===_0x51e3c4(0x142)&&(_0x39dce6[_0x51e3c4(0x13c)]=_0x51e3c4(0x123),_0x39b6e5=!![]);if(_0x39dce6[_0x51e3c4(0x156)]&&typeof _0x39dce6[_0x51e3c4(0x156)]==='object')for(const _0x564000 of Object[_0x51e3c4(0x11b)](_0x39dce6[_0x51e3c4(0x156)])){_0x564000&&_0x564000['env']===_0x51e3c4(0x142)&&(_0x564000[_0x51e3c4(0x13c)]=_0x51e3c4(0x123),_0x39b6e5=!![]);}if(_0x39b6e5)try{writeConfigFile(_0x4eeb03,_0x39dce6);}catch{}}export function writeConfigFile(_0x5903f1,_0x75f526){const _0x2e64e2=a55_0x3de67e,_0x3323a4=dirname(_0x5903f1);!existsSync(_0x3323a4)&&mkdirSync(_0x3323a4,{'recursive':!![]});const _0x8772f4=_0x5903f1+_0x2e64e2(0x157);try{writeFileSync(_0x8772f4,JSON['stringify'](_0x75f526,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x8772f4,_0x5903f1);}catch(_0x50295c){if(_0x50295c[_0x2e64e2(0x155)]==='EPERM'||_0x50295c[_0x2e64e2(0x155)]===_0x2e64e2(0x126)||_0x50295c[_0x2e64e2(0x155)]===_0x2e64e2(0x14f)){writeFileSync(_0x5903f1,JSON[_0x2e64e2(0x139)](_0x75f526,null,0x2)+'\x0a',{'encoding':_0x2e64e2(0x120)});try{unlinkSync(_0x8772f4);}catch{}}else throw _0x50295c;}}catch(_0x3fa194){try{unlinkSync(_0x8772f4);}catch{}throw _0x3fa194;}}export function isNonInteractiveMode(_0x35cf3c){const _0x153268=a55_0x3de67e;return!!(_0x35cf3c[_0x153268(0x15a)]||_0x35cf3c['ci']||productEnvNames('CI')[_0x153268(0x127)](_0x5a4ee5=>process.env[_0x5a4ee5]===_0x153268(0x153))||process.env.CI===_0x153268(0x153)||!process['stdout'][_0x153268(0x136)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x43772d=a55_0x3de67e;if(!process[_0x43772d(0x11e)][_0x43772d(0x136)])return![];try{const _0x2c459a=process['stdin']['isRaw'];return process[_0x43772d(0x11e)][_0x43772d(0x13f)](!![]),process[_0x43772d(0x11e)]['setRawMode'](_0x2c459a??![]),!![];}catch{return![];}}export async function createContext(_0x373e3b){const _0x134726=a55_0x3de67e,_0x513ebb=readRawConfig(),_0x43a7b7=buildConfig(_0x513ebb,_0x373e3b);await initGlobalEnvironment(_0x43a7b7);const {getUserDomain:_0x32d0fd,getApiDomain:_0x3d7d8d}=await import('./constant/domain.js'),_0x4823dd={'apiDomain':_0x3d7d8d(),'userDomain':_0x32d0fd()},_0x21dfb4=await buildAuth(_0x43a7b7);logger['setLogPath'](process[_0x134726(0x132)]());const _0x455b76=(CLI_BIN_NAME+'\x20'+process[_0x134726(0x13e)][_0x134726(0x111)](0x2)[_0x134726(0x11a)]('\x20'))[_0x134726(0x122)]();logger[_0x134726(0x144)](_0x455b76);const _0x4e2f09=isNonInteractiveMode(_0x373e3b);return{'config':_0x43a7b7,'auth':_0x21dfb4,'logger':logger,'env':_0x4823dd,'nonInteractive':_0x4e2f09};}export function buildConfigFromFlags(_0x12f44a){return buildConfig(readRawConfig(),_0x12f44a);}export function getLocalAppAliases(_0x5cd60a){const _0x2b9136=a55_0x3de67e;return _0x5cd60a['apps']&&typeof _0x5cd60a[_0x2b9136(0x156)]==='object'?_0x5cd60a['apps']:{};}export function resolveLocalAppAliasCode(_0x3e88a9,_0x4d2949){const _0x36c2bf=a55_0x3de67e;if(!_0x4d2949)return undefined;const _0x104a05=getLocalAppAliases(_0x3e88a9)[_0x4d2949],_0x597a3b=_0x104a05?.[_0x36c2bf(0x14c)];return typeof _0x597a3b===_0x36c2bf(0x14b)&&_0x597a3b[_0x36c2bf(0x122)]()?_0x597a3b[_0x36c2bf(0x122)]():undefined;}export function readAppCodeFromConfig(){const _0x3a0eb9=a55_0x3de67e,_0x2bb0cd=readRawConfig(),_0x50f0de=_0x2bb0cd['appcode']??_0x2bb0cd['app'];if(typeof _0x50f0de===_0x3a0eb9(0x14b)&&_0x50f0de[_0x3a0eb9(0x122)]())return _0x50f0de['trim']();const _0x269a04=resolveLocalAppAliasCode(_0x2bb0cd,typeof _0x2bb0cd[_0x3a0eb9(0x14d)]==='string'?_0x2bb0cd[_0x3a0eb9(0x14d)]:undefined);if(_0x269a04)return _0x269a04;const _0x11c344=normalizeEnv(String(_0x2bb0cd[_0x3a0eb9(0x13c)]||_0x3a0eb9(0x123))),_0x11d68c=isDaily(_0x11c344)?_0x3a0eb9(0x151):isDev(_0x11c344)?_0x3a0eb9(0x129):'production',_0x447b90=resolveCachedAppCode(typeof _0x2bb0cd[_0x3a0eb9(0x14d)]===_0x3a0eb9(0x14b)?_0x2bb0cd['defaultApp']:undefined,_0x11d68c,typeof _0x2bb0cd[_0x3a0eb9(0x124)]===_0x3a0eb9(0x14b)?_0x2bb0cd[_0x3a0eb9(0x124)]:undefined);if(_0x447b90)return _0x447b90;const _0x79f5ee=Object[_0x3a0eb9(0x11b)](getLocalAppAliases(_0x2bb0cd))[_0x3a0eb9(0x119)](_0x5bb5cd=>_0x5bb5cd?.[_0x3a0eb9(0x14c)]);return typeof _0x79f5ee?.[_0x3a0eb9(0x14c)]===_0x3a0eb9(0x14b)&&_0x79f5ee[_0x3a0eb9(0x14c)][_0x3a0eb9(0x122)]()?_0x79f5ee[_0x3a0eb9(0x14c)][_0x3a0eb9(0x122)]():undefined;}export function readScopedConfig(_0x488bf3){const _0x2db3d2=a55_0x3de67e,_0x5dcb7c=_0x488bf3['global']?_0x2db3d2(0x150):_0x2db3d2(0x110);return readConfigFile(resolveWriteConfigPath(_0x5dcb7c));}function a55_0x361e(){const _0x272293=['empty','EXDEV','some','ENV','development','top-level','14870vSgBCE','missing','VERBOSE','6VwJvrE','128636QPBwvC','read','3141445QNwEKf','cwd','./constant/env.js','ACCESS_KEY','message','isTTY','newConfigFileName','105976zKzxxj','stringify','APPCODE','368339VpfWvN','env','11nCzMkS','argv','setRawMode','app','runtimeDomain','online','17431248EyfvrV','setRawCommand','explicit','high-risk-write','./constant/domain.js','riskLevel','local-alias','raw','string','appcode','defaultApp','skillHubDomain','EACCES','global','daily','userDomain','true','36OiZRCV','code','apps','.tmp','globalConfig','153gQLYFD','nonInteractive','format','parse','PAGE_SIZE','project','slice','inherit','locale','configFileNames','projectConfig','pageSize','2RoCUSB','authRequired','find','join','values','1193031EwpDSP','error','stdin','apiDomain','utf8','cache','trim','production','accessKey'];a55_0x361e=function(){return _0x272293;};return a55_0x361e();}export function writeScopedConfig(_0x31f058,_0xdaf36b){const _0x2a85ca=a55_0x3de67e,_0x3dae96=_0xdaf36b[_0x2a85ca(0x150)]?_0x2a85ca(0x150):_0x2a85ca(0x110);writeConfigFile(resolveWriteConfigPath(_0x3dae96),_0x31f058);}export async function initGlobalEnvironment(_0x5ab30c){const _0xd45781=a55_0x3de67e,{initEnv:_0x27fdfe}=await import(_0xd45781(0x133));_0x27fdfe(_0x5ab30c['env']);const {initDomains:_0x3d4234}=await import(_0xd45781(0x147));_0x3d4234({'apiDomain':_0x5ab30c['raw'][_0xd45781(0x11f)]||_0x5ab30c['raw']['host']||undefined,'userDomain':_0x5ab30c['raw'][_0xd45781(0x152)]||undefined,'runtimeDomain':_0x5ab30c[_0xd45781(0x14a)][_0xd45781(0x141)]||undefined,'skillHubDomain':_0x5ab30c[_0xd45781(0x14a)][_0xd45781(0x14e)]||undefined});}export function getProjectConfigPath(){const _0x110a3a=a55_0x3de67e;return resolveConfigPath(process[_0x110a3a(0x132)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x1421d8){const _0x69edb2=a55_0x3de67e;if(!existsSync(_0x1421d8))return{'status':_0x69edb2(0x12c)};try{const _0x567993=readFileSync(_0x1421d8,{'encoding':_0x69edb2(0x120)});if(!_0x567993?.[_0x69edb2(0x122)]())return{'status':_0x69edb2(0x125)};const _0x37053d=JSON[_0x69edb2(0x10e)](_0x567993);return{'status':'ok','data':_0x37053d};}catch(_0x49a667){return{'status':_0x69edb2(0x11d),'message':_0x49a667 instanceof Error?_0x49a667[_0x69edb2(0x135)]:String(_0x49a667)};}}export function loadRawConfigLayers(_0x527ea1){const _0x277df9=a55_0x3de67e;let _0x4be8bf={},_0xe5830a={},_0x434f75,_0x14553e;try{_0x434f75=resolveConfigPath(homedir());if(_0x434f75){const _0xacc9a9=readFileSync(_0x434f75,{'encoding':_0x277df9(0x120)});if(_0xacc9a9)_0x4be8bf=JSON['parse'](_0xacc9a9);}}catch{}try{const _0x55db5c=_0x527ea1||process[_0x277df9(0x132)]();_0x14553e=resolveConfigPath(_0x55db5c);if(_0x14553e){const _0x5d88dd=readFileSync(_0x14553e,{'encoding':_0x277df9(0x120)});if(_0x5d88dd)_0xe5830a=JSON[_0x277df9(0x10e)](_0x5d88dd);}}catch{}return{'globalPath':_0x434f75,'projectPath':_0x14553e,'globalConfig':_0x4be8bf,'projectConfig':_0xe5830a};}function mergeRawConfigLayers(_0x6fad97){const _0x1ad3d9=a55_0x3de67e,{globalConfig:_0x57e4fa,projectConfig:_0x4a3a3e}=_0x6fad97;if(_0x4a3a3e[_0x1ad3d9(0x112)]===![]){const _0x3edb1a={..._0x4a3a3e};return delete _0x3edb1a[_0x1ad3d9(0x112)],_0x3edb1a;}const _0x5a05f5={..._0x57e4fa,..._0x4a3a3e};if(_0x1ad3d9(0x14d)in _0x4a3a3e)_0x5a05f5['defaultApp']=_0x4a3a3e['defaultApp'];else _0x57e4fa[_0x1ad3d9(0x14d)]&&(_0x5a05f5[_0x1ad3d9(0x14d)]=_0x57e4fa[_0x1ad3d9(0x14d)]);return _0x5a05f5;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x42a4f5){return mergeRawConfigLayers(loadRawConfigLayers(_0x42a4f5));}export function readRawConfigWithLayers(_0x2b0f47){const _0x4abd5d=loadRawConfigLayers(_0x2b0f47);return{'config':mergeRawConfigLayers(_0x4abd5d),'layers':_0x4abd5d};}export function resolveDefaultAppSource(_0x5b10a8){const _0x38a7d9=a55_0x3de67e;if(_0x38a7d9(0x14d)in _0x5b10a8[_0x38a7d9(0x115)])return'project';if(_0x5b10a8['projectConfig'][_0x38a7d9(0x112)]===![])return null;if(_0x5b10a8[_0x38a7d9(0x158)][_0x38a7d9(0x14d)])return _0x38a7d9(0x150);return null;}function buildConfig(_0x2795b2,_0x1a5f55){const _0x18e052=a55_0x3de67e,_0x7ad74a=_0x2795b2[_0x18e052(0x14d)]||undefined,_0x26e218=_0x1a5f55[_0x18e052(0x140)]||env('APP')||undefined,_0x259da0=_0x26e218||_0x7ad74a||undefined,_0x610b5f=env(_0x18e052(0x134))||_0x2795b2[_0x18e052(0x124)]||undefined,_0x2873d9=_0x1a5f55['env']||env(_0x18e052(0x128))||_0x2795b2[_0x18e052(0x13c)]||DEFAULT_CONFIG_VALUES[_0x18e052(0x13c)],_0x27e2cd=normalizeEnv(String(_0x2873d9)),_0x5c8dde=isDaily(_0x27e2cd)?'daily':isDev(_0x27e2cd)?_0x18e052(0x129):_0x18e052(0x123),_0x39045d=resolveLocalAppAliasCode(_0x2795b2,_0x259da0),_0x92171a=resolveCachedAppCode(_0x259da0,_0x5c8dde,_0x610b5f),_0x449129=typeof _0x1a5f55[_0x18e052(0x14c)]==='string'?_0x1a5f55[_0x18e052(0x14c)]:undefined,_0x45b380=env(_0x18e052(0x13a)),_0x3f0a78=_0x26e218?undefined:_0x2795b2[_0x18e052(0x14c)]||_0x2795b2[_0x18e052(0x140)]||undefined,_0x566d68=_0x449129||_0x45b380||_0x39045d||_0x92171a||_0x3f0a78||undefined,_0x2d6760=_0x449129?_0x18e052(0x145):_0x45b380?'env':_0x39045d?_0x18e052(0x149):_0x92171a?_0x18e052(0x121):_0x3f0a78?_0x18e052(0x12a):undefined,_0x33e6e2=_0x2795b2['locale']||DEFAULT_CONFIG_VALUES[_0x18e052(0x113)],_0x3ca650=undefined,_0x35efbb=_0x1a5f55[_0x18e052(0x10d)]||env('FORMAT')||_0x2795b2['format'],_0x21863b=normalizeLegacyOutputFormat(_0x35efbb),_0x2e9703=env(_0x18e052(0x10f))||_0x2795b2[_0x18e052(0x116)],_0x3348b4=_0x2e9703?Number(_0x2e9703)||undefined:undefined,_0x22748b=_0x2795b2[_0x18e052(0x148)]||_0x2795b2['maxRisk'],_0x47f6d6=_0x22748b===_0x18e052(0x130)||_0x22748b==='write'||_0x22748b===_0x18e052(0x146)?_0x22748b:DEFAULT_CONFIG_VALUES[_0x18e052(0x148)],_0x5650b2=env(_0x18e052(0x12d)),_0x40ff6f=_0x5650b2==='1'||_0x5650b2===_0x18e052(0x153);return{'appCode':typeof _0x566d68===_0x18e052(0x14b)&&_0x566d68['trim']()?_0x566d68[_0x18e052(0x122)]():undefined,'appCodeSource':_0x2d6760,'env':_0x5c8dde,'locale':_0x33e6e2,'cookie':_0x3ca650,'accessKey':_0x610b5f,'format':_0x21863b,'pageSize':_0x3348b4,'riskLevel':_0x47f6d6,'verbose':_0x40ff6f,'defaultApp':_0x7ad74a,'currentApp':typeof _0x259da0===_0x18e052(0x14b)?_0x259da0:undefined,'raw':_0x2795b2};}function env(_0xc65dca){return productEnv(_0xc65dca);}async function buildAuth(_0x4b2e77){const _0x25bfdd='',_0x446bda=!!_0x4b2e77['accessKey'];return{'cookie':_0x25bfdd,'isLoggedIn':_0x446bda,async 'getOrLogin'(){const _0x2abca4=a55_0xc765;if(_0x446bda)return _0x25bfdd;throw CliErrors[_0x2abca4(0x118)]();}};}
|
|
1
|
+
const a55_0x5bd78c=a55_0x38b0;(function(_0x2d2160,_0x457ca9){const _0x47a824=a55_0x38b0,_0x457ec0=_0x2d2160();while(!![]){try{const _0x44ae22=parseInt(_0x47a824(0x1ca))/0x1+-parseInt(_0x47a824(0x1b4))/0x2+-parseInt(_0x47a824(0x1a6))/0x3*(parseInt(_0x47a824(0x1cf))/0x4)+parseInt(_0x47a824(0x1c6))/0x5+parseInt(_0x47a824(0x1b6))/0x6*(parseInt(_0x47a824(0x1bb))/0x7)+parseInt(_0x47a824(0x1d6))/0x8*(parseInt(_0x47a824(0x1ae))/0x9)+parseInt(_0x47a824(0x1e9))/0xa*(-parseInt(_0x47a824(0x1ce))/0xb);if(_0x44ae22===_0x457ca9)break;else _0x457ec0['push'](_0x457ec0['shift']());}catch(_0x4c8b45){_0x457ec0['push'](_0x457ec0['shift']());}}}(a55_0x59d3,0xa3756));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a55_0x5bd78c(0x1e6)];function a55_0x38b0(_0x2e9fdf,_0x1a4984){_0x2e9fdf=_0x2e9fdf-0x1a4;const _0x59d3cf=a55_0x59d3();let _0x38b0db=_0x59d3cf[_0x2e9fdf];return _0x38b0db;}export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x57749e){for(const _0x48911a of CONFIG_NAMES){const _0x27e651=resolve(_0x57749e,_0x48911a);if(existsSync(_0x27e651))return _0x27e651;}return undefined;}export function resolveWriteConfigPath(_0x5c4964){const _0x2b64ac=a55_0x5bd78c,_0x31c2ad=_0x5c4964===_0x2b64ac(0x1c3)?process[_0x2b64ac(0x1d5)]():homedir(),_0x52c852=resolveConfigPath(_0x31c2ad);return _0x52c852??resolve(_0x31c2ad,NEW_CONFIG_NAME);}export function readConfigFile(_0x383dcf){const _0x3c4e69=a55_0x5bd78c;try{if(existsSync(_0x383dcf)){const _0x12b757=readFileSync(_0x383dcf,{'encoding':_0x3c4e69(0x1b3)});if(_0x12b757){const _0x25d6d1=JSON[_0x3c4e69(0x1ab)](_0x12b757);return migrateOnlineEnv(_0x383dcf,_0x25d6d1),_0x25d6d1;}}}catch{}return{};}function migrateOnlineEnv(_0x21b49a,_0x121e49){const _0x41aacd=a55_0x5bd78c;let _0x40e6ba=![];_0x121e49[_0x41aacd(0x1a8)]===_0x41aacd(0x1ac)&&(_0x121e49[_0x41aacd(0x1a8)]=_0x41aacd(0x1e4),_0x40e6ba=!![]);if(_0x121e49[_0x41aacd(0x1a9)]&&typeof _0x121e49[_0x41aacd(0x1a9)]===_0x41aacd(0x1b1))for(const _0x5f042b of Object[_0x41aacd(0x1e3)](_0x121e49[_0x41aacd(0x1a9)])){_0x5f042b&&_0x5f042b[_0x41aacd(0x1a8)]==='online'&&(_0x5f042b['env']=_0x41aacd(0x1e4),_0x40e6ba=!![]);}if(_0x40e6ba)try{writeConfigFile(_0x21b49a,_0x121e49);}catch{}}export function writeConfigFile(_0x2c1534,_0x657183){const _0x2a0edc=a55_0x5bd78c,_0x4ec266=dirname(_0x2c1534);!existsSync(_0x4ec266)&&mkdirSync(_0x4ec266,{'recursive':!![]});const _0x2b580d=_0x2c1534+_0x2a0edc(0x1bf);try{writeFileSync(_0x2b580d,JSON[_0x2a0edc(0x1de)](_0x657183,null,0x2)+'\x0a',{'encoding':_0x2a0edc(0x1b3),'mode':0x180});try{renameSync(_0x2b580d,_0x2c1534);}catch(_0x539f7b){if(_0x539f7b[_0x2a0edc(0x1dd)]==='EPERM'||_0x539f7b[_0x2a0edc(0x1dd)]===_0x2a0edc(0x1af)||_0x539f7b[_0x2a0edc(0x1dd)]===_0x2a0edc(0x1c9)){writeFileSync(_0x2c1534,JSON[_0x2a0edc(0x1de)](_0x657183,null,0x2)+'\x0a',{'encoding':_0x2a0edc(0x1b3)});try{unlinkSync(_0x2b580d);}catch{}}else throw _0x539f7b;}}catch(_0x53ac6c){try{unlinkSync(_0x2b580d);}catch{}throw _0x53ac6c;}}export function isNonInteractiveMode(_0x5b22a8){const _0x2c272b=a55_0x5bd78c;return!!(_0x5b22a8['nonInteractive']||_0x5b22a8['ci']||productEnvNames('CI')[_0x2c272b(0x1e1)](_0x2a62dd=>process.env[_0x2a62dd]==='true')||process.env.CI==='true'||!process[_0x2c272b(0x1c2)][_0x2c272b(0x1cc)]||!isStdinRawModeSupported());}function a55_0x59d3(){const _0x89c8ca=['some','APP','values','production','error','configFileNames','setRawCommand','authRequired','8330PLXJMr','raw','setLogPath','stdin','appcode','39EfatlJ','setRawMode','env','apps','top-level','parse','online','write','2133UQCcZN','EXDEV','isRaw','object','FORMAT','utf8','2479658DfZwwb','skillHubDomain','339114bAdyXV','riskLevel','trim','local-alias','join','105xnbCSW','string','defaultApp','ENV','.tmp','read','ACCESS_KEY','stdout','project','inherit','missing','2845605CDhHVB','./constant/domain.js','projectConfig','EACCES','1192524OLBNxh','accessKey','isTTY','empty','18359nUKmqI','80708PvvoRc','APPCODE','global','format','VERBOSE','apiDomain','cwd','32152cIhNoC','development','pageSize','true','userDomain','locale','host','code','stringify','app','runtimeDomain'];a55_0x59d3=function(){return _0x89c8ca;};return a55_0x59d3();}function isStdinRawModeSupported(){const _0x34c9f3=a55_0x5bd78c;if(!process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1cc)])return![];try{const _0x5ac4c0=process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1b0)];return process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1a7)](!![]),process[_0x34c9f3(0x1a4)][_0x34c9f3(0x1a7)](_0x5ac4c0??![]),!![];}catch{return![];}}export async function createContext(_0x3f0a5b){const _0x44294a=a55_0x5bd78c,_0x5cb873=readRawConfig(),_0x423527=buildConfig(_0x5cb873,_0x3f0a5b);await initGlobalEnvironment(_0x423527);const {getUserDomain:_0x236f4d,getApiDomain:_0x257e92}=await import(_0x44294a(0x1c7)),_0x4180a5={'apiDomain':_0x257e92(),'userDomain':_0x236f4d()},_0xfa8401=await buildAuth(_0x423527);logger[_0x44294a(0x1eb)](process['cwd']());const _0x327b8c=(CLI_BIN_NAME+'\x20'+process['argv']['slice'](0x2)[_0x44294a(0x1ba)]('\x20'))[_0x44294a(0x1b8)]();logger[_0x44294a(0x1e7)](_0x327b8c);const _0x3f9eb8=isNonInteractiveMode(_0x3f0a5b);return{'config':_0x423527,'auth':_0xfa8401,'logger':logger,'env':_0x4180a5,'nonInteractive':_0x3f9eb8};}export function buildConfigFromFlags(_0x2eb9df){return buildConfig(readRawConfig(),_0x2eb9df);}export function getLocalAppAliases(_0x283332){const _0x1a0333=a55_0x5bd78c;return _0x283332[_0x1a0333(0x1a9)]&&typeof _0x283332[_0x1a0333(0x1a9)]===_0x1a0333(0x1b1)?_0x283332[_0x1a0333(0x1a9)]:{};}export function resolveLocalAppAliasCode(_0x31f23a,_0x169eae){const _0x5f43d9=a55_0x5bd78c;if(!_0x169eae)return undefined;const _0xe01e5b=getLocalAppAliases(_0x31f23a)[_0x169eae],_0x3de728=_0xe01e5b?.['appcode'];return typeof _0x3de728===_0x5f43d9(0x1bc)&&_0x3de728['trim']()?_0x3de728['trim']():undefined;}export function readAppCodeFromConfig(){const _0x3737fc=a55_0x5bd78c,_0x4ff1d6=readRawConfig(),_0x197ed7=_0x4ff1d6[_0x3737fc(0x1a5)]??_0x4ff1d6['app'];if(typeof _0x197ed7===_0x3737fc(0x1bc)&&_0x197ed7[_0x3737fc(0x1b8)]())return _0x197ed7[_0x3737fc(0x1b8)]();const _0xf4336b=resolveLocalAppAliasCode(_0x4ff1d6,typeof _0x4ff1d6[_0x3737fc(0x1bd)]===_0x3737fc(0x1bc)?_0x4ff1d6[_0x3737fc(0x1bd)]:undefined);if(_0xf4336b)return _0xf4336b;const _0xd86128=normalizeEnv(String(_0x4ff1d6['env']||_0x3737fc(0x1e4))),_0x3091aa=isDaily(_0xd86128)?'daily':isDev(_0xd86128)?_0x3737fc(0x1d7):'production',_0x10eb9e=resolveCachedAppCode(typeof _0x4ff1d6[_0x3737fc(0x1bd)]===_0x3737fc(0x1bc)?_0x4ff1d6[_0x3737fc(0x1bd)]:undefined,_0x3091aa,typeof _0x4ff1d6['accessKey']===_0x3737fc(0x1bc)?_0x4ff1d6[_0x3737fc(0x1cb)]:undefined);if(_0x10eb9e)return _0x10eb9e;const _0x5baab2=Object[_0x3737fc(0x1e3)](getLocalAppAliases(_0x4ff1d6))['find'](_0x4ca6ec=>_0x4ca6ec?.[_0x3737fc(0x1a5)]);return typeof _0x5baab2?.[_0x3737fc(0x1a5)]===_0x3737fc(0x1bc)&&_0x5baab2[_0x3737fc(0x1a5)]['trim']()?_0x5baab2['appcode'][_0x3737fc(0x1b8)]():undefined;}export function readScopedConfig(_0x3bec9a){const _0x472c0e=a55_0x5bd78c,_0x127178=_0x3bec9a[_0x472c0e(0x1d1)]?_0x472c0e(0x1d1):_0x472c0e(0x1c3);return readConfigFile(resolveWriteConfigPath(_0x127178));}export function writeScopedConfig(_0x4d2550,_0x5847e6){const _0x24b6f9=a55_0x5bd78c,_0x15b8e7=_0x5847e6[_0x24b6f9(0x1d1)]?_0x24b6f9(0x1d1):_0x24b6f9(0x1c3);writeConfigFile(resolveWriteConfigPath(_0x15b8e7),_0x4d2550);}export async function initGlobalEnvironment(_0x53caec){const _0xbec364=a55_0x5bd78c,{initEnv:_0x110c31}=await import('./constant/env.js');_0x110c31(_0x53caec[_0xbec364(0x1a8)]);const {initDomains:_0x2199ba}=await import(_0xbec364(0x1c7));_0x2199ba({'apiDomain':_0x53caec['raw'][_0xbec364(0x1d4)]||_0x53caec[_0xbec364(0x1ea)][_0xbec364(0x1dc)]||undefined,'userDomain':_0x53caec[_0xbec364(0x1ea)][_0xbec364(0x1da)]||undefined,'runtimeDomain':_0x53caec['raw'][_0xbec364(0x1e0)]||undefined,'skillHubDomain':_0x53caec[_0xbec364(0x1ea)][_0xbec364(0x1b5)]||undefined});}export function getProjectConfigPath(){const _0x5e5384=a55_0x5bd78c;return resolveConfigPath(process[_0x5e5384(0x1d5)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x311174){const _0x15b770=a55_0x5bd78c;if(!existsSync(_0x311174))return{'status':_0x15b770(0x1c5)};try{const _0x2c85e7=readFileSync(_0x311174,{'encoding':'utf8'});if(!_0x2c85e7?.[_0x15b770(0x1b8)]())return{'status':_0x15b770(0x1cd)};const _0x2e08d9=JSON[_0x15b770(0x1ab)](_0x2c85e7);return{'status':'ok','data':_0x2e08d9};}catch(_0x435e57){return{'status':_0x15b770(0x1e5),'message':_0x435e57 instanceof Error?_0x435e57['message']:String(_0x435e57)};}}export function loadRawConfigLayers(_0x60bd4a){const _0x246201=a55_0x5bd78c;let _0x3d2a5e={},_0x6a692={},_0x108ef1,_0x48ed78;try{_0x108ef1=resolveConfigPath(homedir());if(_0x108ef1){const _0x9f1175=readFileSync(_0x108ef1,{'encoding':'utf8'});if(_0x9f1175)_0x3d2a5e=JSON['parse'](_0x9f1175);}}catch{}try{const _0x21f366=_0x60bd4a||process[_0x246201(0x1d5)]();_0x48ed78=resolveConfigPath(_0x21f366);if(_0x48ed78){const _0x3963d0=readFileSync(_0x48ed78,{'encoding':'utf8'});if(_0x3963d0)_0x6a692=JSON[_0x246201(0x1ab)](_0x3963d0);}}catch{}return{'globalPath':_0x108ef1,'projectPath':_0x48ed78,'globalConfig':_0x3d2a5e,'projectConfig':_0x6a692};}function mergeRawConfigLayers(_0x3b10f7){const _0x5d7f21=a55_0x5bd78c,{globalConfig:_0xd4c498,projectConfig:_0x3df642}=_0x3b10f7;if(_0x3df642['inherit']===![]){const _0x761b95={..._0x3df642};return delete _0x761b95['inherit'],_0x761b95;}const _0xc1c185={..._0xd4c498,..._0x3df642};if(_0x5d7f21(0x1bd)in _0x3df642)_0xc1c185[_0x5d7f21(0x1bd)]=_0x3df642['defaultApp'];else _0xd4c498['defaultApp']&&(_0xc1c185[_0x5d7f21(0x1bd)]=_0xd4c498[_0x5d7f21(0x1bd)]);return _0xc1c185;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5f7a43){return mergeRawConfigLayers(loadRawConfigLayers(_0x5f7a43));}export function readRawConfigWithLayers(_0xd24261){const _0x4edf22=loadRawConfigLayers(_0xd24261);return{'config':mergeRawConfigLayers(_0x4edf22),'layers':_0x4edf22};}export function resolveDefaultAppSource(_0x308636){const _0x14ec0b=a55_0x5bd78c;if(_0x14ec0b(0x1bd)in _0x308636['projectConfig'])return'project';if(_0x308636[_0x14ec0b(0x1c8)][_0x14ec0b(0x1c4)]===![])return null;if(_0x308636['globalConfig'][_0x14ec0b(0x1bd)])return _0x14ec0b(0x1d1);return null;}function buildConfig(_0x20f903,_0x1f5880){const _0x17c6aa=a55_0x5bd78c,_0x561969=_0x20f903['defaultApp']||undefined,_0x4f417d=_0x1f5880['app']||env(_0x17c6aa(0x1e2))||undefined,_0x39c038=_0x4f417d||_0x561969||undefined,_0x519704=env(_0x17c6aa(0x1c1))||_0x20f903[_0x17c6aa(0x1cb)]||undefined,_0x4fb5a7=_0x1f5880[_0x17c6aa(0x1a8)]||env(_0x17c6aa(0x1be))||_0x20f903['env']||DEFAULT_CONFIG_VALUES[_0x17c6aa(0x1a8)],_0x22189a=normalizeEnv(String(_0x4fb5a7)),_0x3643e1=isDaily(_0x22189a)?'daily':isDev(_0x22189a)?_0x17c6aa(0x1d7):'production',_0xf4212c=resolveLocalAppAliasCode(_0x20f903,_0x39c038),_0x4cd0d6=resolveCachedAppCode(_0x39c038,_0x3643e1,_0x519704),_0x5704e0=typeof _0x1f5880[_0x17c6aa(0x1a5)]===_0x17c6aa(0x1bc)?_0x1f5880[_0x17c6aa(0x1a5)]:undefined,_0xd89bde=env(_0x17c6aa(0x1d0)),_0x2a7c46=_0x4f417d?undefined:_0x20f903[_0x17c6aa(0x1a5)]||_0x20f903[_0x17c6aa(0x1df)]||undefined,_0x42b288=_0x5704e0||_0xd89bde||_0xf4212c||_0x4cd0d6||_0x2a7c46||undefined,_0x22bcc3=_0x5704e0?'explicit':_0xd89bde?_0x17c6aa(0x1a8):_0xf4212c?_0x17c6aa(0x1b9):_0x4cd0d6?'cache':_0x2a7c46?_0x17c6aa(0x1aa):undefined,_0x28bfc5=_0x20f903[_0x17c6aa(0x1db)]||DEFAULT_CONFIG_VALUES[_0x17c6aa(0x1db)],_0x49b2eb=undefined,_0x454fa4=_0x1f5880[_0x17c6aa(0x1d2)]||env(_0x17c6aa(0x1b2))||_0x20f903['format'],_0x285ffb=normalizeLegacyOutputFormat(_0x454fa4),_0x64f038=env('PAGE_SIZE')||_0x20f903[_0x17c6aa(0x1d8)],_0x2d46ae=_0x64f038?Number(_0x64f038)||undefined:undefined,_0x50abc4=_0x20f903[_0x17c6aa(0x1b7)]||_0x20f903['maxRisk'],_0x74166c=_0x50abc4===_0x17c6aa(0x1c0)||_0x50abc4===_0x17c6aa(0x1ad)||_0x50abc4==='high-risk-write'?_0x50abc4:DEFAULT_CONFIG_VALUES['riskLevel'],_0x15c2ba=env(_0x17c6aa(0x1d3)),_0x2067c3=_0x15c2ba==='1'||_0x15c2ba===_0x17c6aa(0x1d9);return{'appCode':typeof _0x42b288===_0x17c6aa(0x1bc)&&_0x42b288['trim']()?_0x42b288[_0x17c6aa(0x1b8)]():undefined,'appCodeSource':_0x22bcc3,'env':_0x3643e1,'locale':_0x28bfc5,'cookie':_0x49b2eb,'accessKey':_0x519704,'format':_0x285ffb,'pageSize':_0x2d46ae,'riskLevel':_0x74166c,'verbose':_0x2067c3,'defaultApp':_0x561969,'currentApp':typeof _0x39c038===_0x17c6aa(0x1bc)?_0x39c038:undefined,'raw':_0x20f903};}function env(_0x2a2734){return productEnv(_0x2a2734);}async function buildAuth(_0x105e25){const _0xf31c58=a55_0x5bd78c,_0x54e32a='',_0x5a11cd=!!_0x105e25[_0xf31c58(0x1cb)];return{'cookie':_0x54e32a,'isLoggedIn':_0x5a11cd,async 'getOrLogin'(){const _0x1afc56=_0xf31c58;if(_0x5a11cd)return _0x54e32a;throw CliErrors[_0x1afc56(0x1e8)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x6bdc30,_0x3ac6cc){const _0x36a5fc=a56_0x5f01,_0x27bfee=_0x6bdc30();while(!![]){try{const _0x26bd72=parseInt(_0x36a5fc(0x157))/0x1+parseInt(_0x36a5fc(0x148))/0x2*(parseInt(_0x36a5fc(0x158))/0x3)+parseInt(_0x36a5fc(0x160))/0x4+parseInt(_0x36a5fc(0x1a5))/0x5*(parseInt(_0x36a5fc(0x163))/0x6)+-parseInt(_0x36a5fc(0x192))/0x7+parseInt(_0x36a5fc(0x193))/0x8*(-parseInt(_0x36a5fc(0x15c))/0x9)+parseInt(_0x36a5fc(0x182))/0xa*(-parseInt(_0x36a5fc(0x135))/0xb);if(_0x26bd72===_0x3ac6cc)break;else _0x27bfee['push'](_0x27bfee['shift']());}catch(_0x1df2b1){_0x27bfee['push'](_0x27bfee['shift']());}}}(a56_0x1f49,0x4ac91));import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';function a56_0x5f01(_0x23a3fb,_0x38c0e1){_0x23a3fb=_0x23a3fb-0x130;const _0x1f4986=a56_0x1f49();let _0x5f015b=_0x1f4986[_0x23a3fb];return _0x5f015b;}import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;function a56_0x1f49(){const _0x467206=['/api/runtime/v1/namespaces/','appCode','/client/user/loginUserInfo','map','packageBase64','user','abort','194930WTwEWj','/download','text','/skills','Toolbox\x20error\x20code:\x20','errorMsg','Check\x20your\x20credentials\x20and\x20try\x20again.','status','artifactType','.zip','query','SQL\x20query\x20not\x20found:\x20','isArray','application/zip','favorite','signal','1411599jaldfm','269888CVmzPK','skillCode','/publish','msg','/client/dataset/query?','POST','/client/sql/query','filter','/client/knowledge-base/personal/list?appCode=','items','application/octet-stream','string','/client/knowledge-base/search','/client/dataset/list','Knowledge-base\x20entry\x20not\x20found:\x20id=','name','errorCode','/client/runtime-bff/personal/create','415QmTjyk','from','/update','trim','Missing\x20Skill\x20package\x20payload.','data','/client/artifact/list?','tableData','source','apiError','SkillHub\x20API\x20error:\x20','/client/knowledge-base/personal/create','summary','/api/node-toolbox/','stringify','toString','message','object','242NbfhEb','slug','Configure\x20accessKey\x20in\x20','version','set','/execute?appCode=','catch','personal','Request\x20timeout:\x20','scope','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','base64','public','api-doc-generator','authRequired','invokeSource','publishedVersion','?appCode=','PUBLIC','38tdgsnN','/client/runtime-bff/personal/','topK','/client/knowledge-base/personal/','SkillHub\x20error\x20code:\x20','validation','number','AbortError','headlineVersion','ownerPreviewVersion','/client/app/my-apps','Toolbox\x20API\x20error:\x20','replace','/client/artifact/','entries','263068BXOjzW','45606YykliS','namespace','file','application/json','126KcORhf','undefined','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','displayName','2222732wTAbfU','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','PRIVATE','21798FLgZIG','Personal\x20BFF\x20not\x20found:\x20id=','company','success','json','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','visibility','searchParams','code','/client/runtime-bff/personal/list?appCode=','skillName','BFF\x20script\x20not\x20found:\x20id=','/api/cli/v1/skills/','newConfigFileName','/versions/','markdown','API\x20error:\x20','appName','sqlCode','values','effective','Artifact\x20not\x20found:\x20id=','GET','tags'];a56_0x1f49=function(){return _0x467206;};return a56_0x1f49();}export function setActiveAK(_0x3b578c){_activeAK=_0x3b578c||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0xfb8488,_0xfe9d57={}){const _0x51659b=a56_0x5f01,{method:method=_0x51659b(0x179),body:_0x25e92d,headers:headers={},timeout:timeout=0x7530}=_0xfe9d57,_0x49cea5=_activeAK,_0xfb1d00=getRuntimeDomain();if(!_0x49cea5)throw CliErrors[_0x51659b(0x143)](_0x51659b(0x137)+PRODUCT_CONFIG[_0x51659b(0x170)]+'.');const _0x3137fb=''+_0xfb1d00+_0xfb8488,_0xf798b4={'X-User-AK':_0x49cea5},_0x571215=new AbortController(),_0x32f71f=setTimeout(()=>_0x571215[_0x51659b(0x181)](),timeout);try{const _0x32e79a=await fetch(_0x3137fb,{'method':method,'headers':{'Content-Type':_0x51659b(0x15b),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0xf798b4,...headers},'body':_0x25e92d?JSON[_0x51659b(0x131)](_0x25e92d):undefined,'signal':_0x571215[_0x51659b(0x191)]});let _0x457b6b;try{_0x457b6b=await _0x32e79a['json']();}catch{throw CliErrors[_0x51659b(0x1ae)](_0x51659b(0x168)+_0x32e79a['status']+')',_0x32e79a['status']>=0x190?_0x51659b(0x188):undefined);}if(!_0x32e79a['ok']||_0x457b6b[_0x51659b(0x166)]===![])throw CliErrors[_0x51659b(0x1ae)](_0x457b6b['errorMsg']||_0x457b6b[_0x51659b(0x133)]||_0x51659b(0x173)+_0x32e79a[_0x51659b(0x189)],_0x457b6b[_0x51659b(0x1a3)]?'API\x20error\x20code:\x20'+_0x457b6b['errorCode']:undefined);return _0x457b6b;}catch(_0xc02706){if(_0xc02706 instanceof Error&&_0xc02706[_0x51659b(0x1a2)]===_0x51659b(0x14f))throw CliErrors[_0x51659b(0x1ae)](_0x51659b(0x13d)+_0x3137fb);throw _0xc02706;}finally{clearTimeout(_0x32f71f);}}async function apiBinaryRequest(_0x2b1f96,_0xa2423a={}){const _0x364381=a56_0x5f01,{method:method=_0x364381(0x179),headers:headers={},timeout:timeout=0x7530}=_0xa2423a,_0x24af66=_activeAK,_0x539976=getRuntimeDomain();if(!_0x24af66)throw CliErrors[_0x364381(0x143)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0xb483c1=''+_0x539976+_0x2b1f96,_0x64f714=new AbortController(),_0x26f1dd=setTimeout(()=>_0x64f714[_0x364381(0x181)](),timeout);try{const _0x503b67=await fetch(_0xb483c1,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x364381(0x144)],'X-User-AK':_0x24af66,...headers},'signal':_0x64f714[_0x364381(0x191)]});if(!_0x503b67['ok']){let _0x10453e;try{const _0x44f096=await _0x503b67[_0x364381(0x167)]();_0x10453e=_0x44f096['errorMsg']||_0x44f096['message']||_0x44f096[_0x364381(0x1a3)];}catch{_0x10453e=await _0x503b67[_0x364381(0x184)]()[_0x364381(0x13b)](()=>undefined);}throw CliErrors[_0x364381(0x1ae)](_0x10453e||'API\x20error:\x20'+_0x503b67[_0x364381(0x189)],'Download\x20failed:\x20'+_0xb483c1);}return Buffer[_0x364381(0x1a6)](await _0x503b67['arrayBuffer']());}catch(_0x2ff97f){if(_0x2ff97f instanceof Error&&_0x2ff97f['name']==='AbortError')throw CliErrors[_0x364381(0x1ae)](_0x364381(0x13d)+_0xb483c1);throw _0x2ff97f;}finally{clearTimeout(_0x26f1dd);}}async function toolboxRequest(_0x1e9c00,_0x1b7193,_0x31a263={}){const _0x42adcf=a56_0x5f01,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x31a263,_0x46415f=_activeAK;if(!_0x46415f)throw CliErrors['authRequired'](_0x42adcf(0x137)+PRODUCT_CONFIG[_0x42adcf(0x170)]+'.');const _0x112a4a=getApiDomain()['replace'](/\/$/,''),_0x44cec3=new URL(_0x1e9c00,_0x112a4a+_0x42adcf(0x130));if(_0x1b7193)for(const [_0x54e757,_0x400b89]of Object[_0x42adcf(0x156)](_0x1b7193)){_0x400b89!==undefined&&_0x400b89!==null&&_0x44cec3[_0x42adcf(0x16a)][_0x42adcf(0x139)](_0x54e757,String(_0x400b89));}const _0x40f084=new AbortController(),_0x2e4e30=setTimeout(()=>_0x40f084[_0x42adcf(0x181)](),timeout);try{const _0xb39f5b=await fetch(_0x44cec3,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x46415f,...headers},'signal':_0x40f084[_0x42adcf(0x191)]});let _0x132be4;try{_0x132be4=await _0xb39f5b[_0x42adcf(0x167)]();}catch{throw CliErrors[_0x42adcf(0x1ae)](_0x42adcf(0x13f)+_0xb39f5b[_0x42adcf(0x189)]+')',_0xb39f5b['status']>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0xb39f5b['ok']){const _0x36e164=_0x132be4&&typeof _0x132be4===_0x42adcf(0x134)?_0x132be4:{};throw CliErrors[_0x42adcf(0x1ae)](_0x36e164[_0x42adcf(0x187)]||_0x36e164[_0x42adcf(0x133)]||_0x42adcf(0x153)+_0xb39f5b[_0x42adcf(0x189)],_0x36e164[_0x42adcf(0x1a3)]?_0x42adcf(0x186)+_0x36e164[_0x42adcf(0x1a3)]:undefined);}if(_0x132be4&&typeof _0x132be4===_0x42adcf(0x134)&&_0x42adcf(0x166)in _0x132be4&&typeof _0x132be4[_0x42adcf(0x166)]==='boolean'){const _0x5e1b3c=_0x132be4;if(!_0x5e1b3c[_0x42adcf(0x166)])throw CliErrors[_0x42adcf(0x1ae)](_0x5e1b3c['errorMsg']||_0x5e1b3c[_0x42adcf(0x133)]||'Toolbox\x20API\x20error',_0x5e1b3c[_0x42adcf(0x1a3)]?_0x42adcf(0x186)+_0x5e1b3c[_0x42adcf(0x1a3)]:undefined);return _0x5e1b3c['data'];}return _0x132be4;}catch(_0x35bd21){if(_0x35bd21 instanceof Error&&_0x35bd21[_0x42adcf(0x1a2)]==='AbortError')throw CliErrors[_0x42adcf(0x1ae)]('Request\x20timeout:\x20'+_0x44cec3[_0x42adcf(0x132)]());throw _0x35bd21;}finally{clearTimeout(_0x2e4e30);}}async function skillHubJsonRequest(_0x2fb504,_0x2bd83c={}){const _0x21817b=a56_0x5f01,{method:method='GET',query:_0xde72d7,body:_0x435150,headers:headers={},timeout:timeout=0x7530}=_0x2bd83c,_0x3b2c95=_activeAK;if(!_0x3b2c95)throw CliErrors[_0x21817b(0x143)](_0x21817b(0x137)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x5ed5be=getSkillHubDomain()[_0x21817b(0x154)](/\/$/,''),_0x20721c=new URL(_0x2fb504,_0x5ed5be+'/');if(_0xde72d7)for(const [_0x5801d3,_0x3b799d]of Object[_0x21817b(0x156)](_0xde72d7)){_0x3b799d!==undefined&&_0x3b799d!==null&&_0x20721c[_0x21817b(0x16a)][_0x21817b(0x139)](_0x5801d3,String(_0x3b799d));}const _0x1140b8=new AbortController(),_0x2f1a98=setTimeout(()=>_0x1140b8[_0x21817b(0x181)](),timeout);try{const _0x6419f3=await fetch(_0x20721c[_0x21817b(0x132)](),{'method':method,'headers':{'Accept':_0x21817b(0x15b),'X-Invoke-Source':PRODUCT_CONFIG[_0x21817b(0x144)],'X-User-AK':_0x3b2c95,...headers},'body':_0x435150,'signal':_0x1140b8[_0x21817b(0x191)]});let _0x2d667d;try{_0x2d667d=await _0x6419f3[_0x21817b(0x167)]();}catch{throw CliErrors[_0x21817b(0x1ae)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x6419f3['status']+')',_0x6419f3[_0x21817b(0x189)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x454534=!_0x6419f3['ok']||_0x2d667d?.[_0x21817b(0x166)]===![]||typeof _0x2d667d?.[_0x21817b(0x16b)]===_0x21817b(0x14e)&&_0x2d667d[_0x21817b(0x16b)]>=0x190;if(_0x454534)throw CliErrors['apiError'](_0x2d667d?.[_0x21817b(0x187)]||_0x2d667d?.[_0x21817b(0x133)]||_0x2d667d?.[_0x21817b(0x196)]||'SkillHub\x20API\x20error:\x20'+_0x6419f3[_0x21817b(0x189)],_0x2d667d?.['errorCode']?_0x21817b(0x14c)+_0x2d667d['errorCode']:undefined);return _0x2d667d?.[_0x21817b(0x1aa)]??_0x2d667d;}catch(_0x410241){if(_0x410241 instanceof Error&&_0x410241[_0x21817b(0x1a2)]===_0x21817b(0x14f))throw CliErrors[_0x21817b(0x1ae)](_0x21817b(0x13d)+_0x20721c['toString']());throw _0x410241;}finally{clearTimeout(_0x2f1a98);}}async function skillHubBinaryRequest(_0x33c8b9,_0x719c2c={}){const _0x67fcc3=a56_0x5f01,{query:_0x3f114f,headers:headers={},timeout:timeout=0x7530}=_0x719c2c,_0x19e60a=_activeAK;if(!_0x19e60a)throw CliErrors['authRequired'](_0x67fcc3(0x137)+PRODUCT_CONFIG[_0x67fcc3(0x170)]+'.');const _0x4eda25=getSkillHubDomain()[_0x67fcc3(0x154)](/\/$/,''),_0x3c67f3=new URL(_0x33c8b9,_0x4eda25+'/');if(_0x3f114f)for(const [_0x202511,_0x5d8ff0]of Object[_0x67fcc3(0x156)](_0x3f114f)){_0x5d8ff0!==undefined&&_0x5d8ff0!==null&&_0x3c67f3[_0x67fcc3(0x16a)][_0x67fcc3(0x139)](_0x202511,String(_0x5d8ff0));}const _0x5b9f90=new AbortController(),_0x2f3f47=setTimeout(()=>_0x5b9f90['abort'](),timeout);try{const _0x519b61=await fetch(_0x3c67f3[_0x67fcc3(0x132)](),{'method':_0x67fcc3(0x179),'headers':{'Accept':_0x67fcc3(0x19d),'X-Invoke-Source':PRODUCT_CONFIG[_0x67fcc3(0x144)],'X-User-AK':_0x19e60a,...headers},'signal':_0x5b9f90[_0x67fcc3(0x191)]});if(!_0x519b61['ok']){let _0x174a61;try{const _0x3e7dea=await _0x519b61[_0x67fcc3(0x167)]();_0x174a61=_0x3e7dea[_0x67fcc3(0x187)]||_0x3e7dea[_0x67fcc3(0x133)]||_0x3e7dea['msg']||_0x3e7dea['errorCode'];}catch{_0x174a61=await _0x519b61[_0x67fcc3(0x184)]()[_0x67fcc3(0x13b)](()=>undefined);}throw CliErrors[_0x67fcc3(0x1ae)](_0x174a61||_0x67fcc3(0x1af)+_0x519b61[_0x67fcc3(0x189)],'Download\x20failed:\x20'+_0x3c67f3['toString']());}return Buffer[_0x67fcc3(0x1a6)](await _0x519b61['arrayBuffer']());}catch(_0x5a9834){if(_0x5a9834 instanceof Error&&_0x5a9834[_0x67fcc3(0x1a2)]===_0x67fcc3(0x14f))throw CliErrors['apiError'](_0x67fcc3(0x13d)+_0x3c67f3[_0x67fcc3(0x132)]());throw _0x5a9834;}finally{clearTimeout(_0x2f3f47);}}export async function getBffScriptInfo(_0x209f03){const _0x427fdd=a56_0x5f01,_0x2902c0=await apiRequest('/client/bff/query/'+_0x209f03);if(!_0x2902c0['data'])throw CliErrors[_0x427fdd(0x14d)](_0x427fdd(0x16e)+_0x209f03);return _0x2902c0[_0x427fdd(0x1aa)];}export async function getSqlQueryInfo(_0x4ecd6e,_0x2d9d2b){const _0x255bc6=a56_0x5f01,_0x3f0162=await apiRequest(_0x255bc6(0x199),{'method':_0x255bc6(0x198),'body':{'appCode':_0x4ecd6e,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x2d9d2b}}),_0x13da9b=_0x3f0162[_0x255bc6(0x1aa)],_0x1c9768=_0x13da9b&&typeof _0x13da9b===_0x255bc6(0x134)&&'tableData'in _0x13da9b?_0x13da9b[_0x255bc6(0x1ac)]?.[0x0]:_0x13da9b&&typeof _0x13da9b===_0x255bc6(0x134)&&_0x255bc6(0x175)in _0x13da9b?_0x13da9b:undefined;if(!_0x1c9768)throw CliErrors[_0x255bc6(0x14d)](_0x255bc6(0x18d)+_0x2d9d2b);return _0x1c9768;}function isRemoteAppItem(_0x1db585){const _0x33e580=a56_0x5f01;return!!_0x1db585&&typeof _0x1db585==='object'&&typeof _0x1db585[_0x33e580(0x17c)]===_0x33e580(0x19e)&&typeof _0x1db585[_0x33e580(0x174)]===_0x33e580(0x19e);}function extractRemoteAppItems(_0x2e8ec6){const _0x15541e=a56_0x5f01;if(Array[_0x15541e(0x18e)](_0x2e8ec6))return _0x2e8ec6['filter'](isRemoteAppItem);if(!_0x2e8ec6||typeof _0x2e8ec6!==_0x15541e(0x134))throw CliErrors['apiError'](_0x15541e(0x161));const _0x42d0a2=_0x2e8ec6;if(Array[_0x15541e(0x18e)](_0x42d0a2[_0x15541e(0x1ac)]))return _0x42d0a2[_0x15541e(0x1ac)]['filter'](isRemoteAppItem);if(_0x42d0a2[_0x15541e(0x1aa)]&&typeof _0x42d0a2[_0x15541e(0x1aa)]===_0x15541e(0x134)){const _0xc34f87=_0x42d0a2[_0x15541e(0x1aa)];if(Array[_0x15541e(0x18e)](_0xc34f87[_0x15541e(0x1ac)]))return _0xc34f87['tableData'][_0x15541e(0x19a)](isRemoteAppItem);}throw CliErrors[_0x15541e(0x1ae)]('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x547897=a56_0x5f01,_0x372914=await apiRequest(_0x547897(0x152));return extractRemoteAppItems(_0x372914['data']);}export async function getLoginUserInfo(){const _0xd4782d=a56_0x5f01,_0x5a4106=await apiRequest(_0xd4782d(0x17d));if(!_0x5a4106['data']||typeof _0x5a4106[_0xd4782d(0x1aa)]!==_0xd4782d(0x134)||Array[_0xd4782d(0x18e)](_0x5a4106['data']))throw CliErrors[_0xd4782d(0x1ae)](_0xd4782d(0x15e));return _0x5a4106[_0xd4782d(0x1aa)];}export async function listDatasets(_0xe70493,_0x224806){const _0x1e85b3=a56_0x5f01,_0x279fb2=await apiRequest(_0x1e85b3(0x1a0),{'method':'POST','body':{'appCode':_0xe70493,..._0x224806?.[_0x1e85b3(0x16b)]&&{'code':_0x224806['code']},..._0x224806?.[_0x1e85b3(0x1a2)]&&{'name':_0x224806['name']}}});return extractList(_0x279fb2[_0x1e85b3(0x1aa)]);}export async function getDatasetDetail(_0x1cf618){const _0x5bfaf9=a56_0x5f01,_0x32686e=/^\d+$/['test'](_0x1cf618)?'id':'code',_0x37c6ea=await apiRequest(_0x5bfaf9(0x197)+_0x32686e+'='+_0x1cf618);return _0x37c6ea[_0x5bfaf9(0x1aa)];}export async function getDatasetSdkUsageDoc(_0x150612,_0x17ac53){const _0x1f0450=a56_0x5f01,_0x24ab15=await toolboxRequest(_0x1f0450(0x142),{'datasetCode':_0x150612,'appCode':_0x17ac53});return typeof _0x24ab15?.[_0x1f0450(0x172)]===_0x1f0450(0x19e)?_0x24ab15[_0x1f0450(0x172)]:'';}export async function listRuntimeArtifacts(_0x2acbdf,_0x3c74c7){const _0x13f0da=a56_0x5f01,_0x57805a=new URLSearchParams({'appCode':_0x2acbdf});if(_0x3c74c7?.[_0x13f0da(0x18a)])_0x57805a[_0x13f0da(0x139)](_0x13f0da(0x18a),_0x3c74c7[_0x13f0da(0x18a)]);if(_0x3c74c7?.[_0x13f0da(0x1ad)])_0x57805a[_0x13f0da(0x139)](_0x13f0da(0x1ad),_0x3c74c7[_0x13f0da(0x1ad)]);if(_0x3c74c7?.['favorite']!==undefined)_0x57805a[_0x13f0da(0x139)](_0x13f0da(0x190),String(_0x3c74c7['favorite']));const _0x5811bd=await apiRequest(_0x13f0da(0x1ab)+_0x57805a[_0x13f0da(0x132)]());return Array[_0x13f0da(0x18e)](_0x5811bd[_0x13f0da(0x1aa)])?_0x5811bd['data']:[];}export async function getRuntimeArtifact(_0x14840f,_0x532f70){const _0x403536=a56_0x5f01,_0x51535d=await apiRequest(_0x403536(0x155)+_0x14840f+_0x403536(0x146)+encodeURIComponent(_0x532f70));if(!_0x51535d['data'])throw CliErrors['validation'](_0x403536(0x178)+_0x14840f);return _0x51535d['data'];}export async function createRuntimeArtifact(_0x27f0d9,_0x77f477){const _0x20f5e8=a56_0x5f01,_0x34f709=await apiRequest('/client/artifact/create',{'method':'POST','body':{'appCode':_0x27f0d9,..._0x77f477}});return _0x34f709[_0x20f5e8(0x1aa)];}export async function updateRuntimeArtifact(_0xd996b1,_0x38b68e,_0x5b1871){const _0x265fe4=a56_0x5f01,_0x554a57=await apiRequest(_0x265fe4(0x155)+_0xd996b1+_0x265fe4(0x1a7),{'method':'POST','body':{'appCode':_0x38b68e,..._0x5b1871}});return _0x554a57[_0x265fe4(0x1aa)];}export async function listPersonalBffs(_0x592390){const _0x149597=a56_0x5f01,_0x3c343b=await apiRequest(_0x149597(0x16c)+encodeURIComponent(_0x592390));return Array['isArray'](_0x3c343b[_0x149597(0x1aa)])?_0x3c343b[_0x149597(0x1aa)]:[];}export async function getPersonalBff(_0xc12719,_0x30d74e){const _0x489161=a56_0x5f01,_0xa1a7a4=await apiRequest(_0x489161(0x149)+_0xc12719+'?appCode='+encodeURIComponent(_0x30d74e));if(!_0xa1a7a4[_0x489161(0x1aa)])throw CliErrors[_0x489161(0x14d)](_0x489161(0x164)+_0xc12719);return _0xa1a7a4[_0x489161(0x1aa)];}export async function createPersonalBff(_0x77661d,_0x38f838){const _0x446785=a56_0x5f01,_0x445932=await apiRequest(_0x446785(0x1a4),{'method':_0x446785(0x198),'body':{'appCode':_0x77661d,..._0x38f838}});return _0x445932[_0x446785(0x1aa)];}export async function updatePersonalBff(_0x172a18,_0x410fb5,_0x4a20c5){const _0x413465=a56_0x5f01,_0x3628bf=await apiRequest(_0x413465(0x149)+_0x172a18+_0x413465(0x1a7),{'method':_0x413465(0x198),'body':{'appCode':_0x410fb5,..._0x4a20c5}});return _0x3628bf[_0x413465(0x1aa)];}export async function executePersonalBff(_0x228b5a,_0x5235e7,_0x1fe689){const _0x47b252=a56_0x5f01,_0x33a8e1=await apiRequest(_0x47b252(0x149)+_0x228b5a+_0x47b252(0x13a)+encodeURIComponent(_0x5235e7),{'method':_0x47b252(0x198),'body':_0x1fe689});return _0x33a8e1[_0x47b252(0x1aa)];}export async function listPersonalKnowledgeBaseItems(_0x54589a){const _0x394b97=a56_0x5f01,_0x302f12=await apiRequest(_0x394b97(0x19b)+encodeURIComponent(_0x54589a));return Array['isArray'](_0x302f12[_0x394b97(0x1aa)])?_0x302f12[_0x394b97(0x1aa)]:[];}export async function getPersonalKnowledgeBaseItem(_0xb753c1,_0x5a5b87){const _0x2431db=a56_0x5f01,_0x19c4b9=await apiRequest('/client/knowledge-base/personal/'+_0xb753c1+'?appCode='+encodeURIComponent(_0x5a5b87));if(!_0x19c4b9[_0x2431db(0x1aa)])throw CliErrors['validation'](_0x2431db(0x1a1)+_0xb753c1);return _0x19c4b9[_0x2431db(0x1aa)];}export async function createPersonalKnowledgeBaseItem(_0x3773a3,_0x547ff1){const _0x2d6e47=a56_0x5f01,_0x2f3145=await apiRequest(_0x2d6e47(0x1b0),{'method':_0x2d6e47(0x198),'body':{'appCode':_0x3773a3,..._0x547ff1}});return _0x2f3145[_0x2d6e47(0x1aa)];}export async function updatePersonalKnowledgeBaseItem(_0x134a5d,_0x4c9fdf,_0x54d557){const _0x452f0b=a56_0x5f01,_0x446455=await apiRequest(_0x452f0b(0x14b)+_0x134a5d+'/update',{'method':_0x452f0b(0x198),'body':{'appCode':_0x4c9fdf,..._0x54d557}});return _0x446455[_0x452f0b(0x1aa)];}export async function searchKnowledgeBase(_0x5b2c65,_0x516611){const _0xf2d452=a56_0x5f01,_0x1fe50d=await apiRequest(_0xf2d452(0x19f),{'method':_0xf2d452(0x198),'body':{'appCode':_0x5b2c65,'query':_0x516611[_0xf2d452(0x18c)],..._0x516611['topK']!==undefined?{'topK':_0x516611[_0xf2d452(0x14a)]}:{}}});return Array[_0xf2d452(0x18e)](_0x1fe50d[_0xf2d452(0x1aa)])?_0x1fe50d[_0xf2d452(0x1aa)]:[];}export async function listRuntimeSkills(_0x39fbbe){const _0x56420c=a56_0x5f01,_0x50f8a1=await skillHubJsonRequest(_0x56420c(0x17b)+encodeURIComponent(_0x39fbbe[_0x56420c(0x17c)])+_0x56420c(0x185),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x39fbbe[_0x56420c(0x17c)],_0x50f8a1,_0x39fbbe['scope']??'user',_0x39fbbe[_0x56420c(0x16b)]);}export async function listPersonalRuntimeSkills(_0xbff641){const _0x2f498f=a56_0x5f01;return(await listRuntimeSkills({'appCode':_0xbff641,'scope':_0x2f498f(0x13c)}))['personal'];}export async function listCompanyRuntimeSkills(_0x4d74e9){const _0xa5bc94=a56_0x5f01;return(await listRuntimeSkills({'appCode':_0x4d74e9,'scope':_0xa5bc94(0x165)}))[_0xa5bc94(0x165)];}export async function listVisibleRuntimeSkills(_0xa9232d){const _0x2f2027=a56_0x5f01;return(await listRuntimeSkills({'appCode':_0xa9232d,'scope':_0x2f2027(0x180)}))[_0x2f2027(0x177)];}export async function createPersonalRuntimeSkill(_0x4e5d40,_0x2f3711){return publishRuntimeSkill(_0x4e5d40,_0x2f3711);}export async function updatePersonalRuntimeSkill(_0x33fa37,_0x1ef60b,_0x3ac182){const _0x59179e=a56_0x5f01;return publishRuntimeSkill(_0x1ef60b,{..._0x3ac182,'skillCode':_0x3ac182[_0x59179e(0x194)]??_0x33fa37});}export async function downloadRuntimeSkillPackage(_0xf79df1,_0x56d92d,_0x5aa1ef,_0x2bca0b){const _0x1313d0=a56_0x5f01;void _0xf79df1;const _0x128f05=_0x2bca0b?'/api/cli/v1/skills/'+encodeURIComponent(_0x5aa1ef)+'/'+encodeURIComponent(_0x56d92d)+_0x1313d0(0x171)+encodeURIComponent(_0x2bca0b)+_0x1313d0(0x183):_0x1313d0(0x16f)+encodeURIComponent(_0x5aa1ef)+'/'+encodeURIComponent(_0x56d92d)+_0x1313d0(0x183);return skillHubBinaryRequest(_0x128f05);}async function publishRuntimeSkill(_0x4e8e6c,_0x437f7f){const _0x54fd11=a56_0x5f01,_0x42bc49=new FormData();_0x42bc49['set'](_0x54fd11(0x15a),runtimeSkillPackageFile(_0x437f7f)),_0x42bc49[_0x54fd11(0x139)](_0x54fd11(0x169),_0x54fd11(0x162));const _0x49638c=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x4e8e6c)+_0x54fd11(0x195),{'method':_0x54fd11(0x198),'body':_0x42bc49});return{'appCode':_0x49638c[_0x54fd11(0x159)]??_0x4e8e6c,'skillCode':_0x49638c[_0x54fd11(0x136)]??_0x437f7f[_0x54fd11(0x194)]??'','skillName':_0x437f7f[_0x54fd11(0x16d)]??_0x49638c[_0x54fd11(0x136)]??_0x437f7f[_0x54fd11(0x194)],'description':_0x437f7f['description'],'scope':skillHubVisibilityToScope(_0x49638c[_0x54fd11(0x169)])??_0x54fd11(0x13c),'version':_0x49638c['version']??_0x437f7f['version'],'tags':_0x437f7f[_0x54fd11(0x17a)],'content':_0x437f7f['content']};}function runtimeSkillPackageFile(_0x4ec044){const _0x24a098=a56_0x5f01;if(!_0x4ec044[_0x24a098(0x17f)])throw CliErrors['validation'](_0x24a098(0x1a9));const _0x2da3bd=Buffer['from'](_0x4ec044[_0x24a098(0x17f)],_0x24a098(0x140)),_0x5f3509=new Blob([_0x2da3bd],{'type':_0x24a098(0x18f)}),_0xf1d28d=(_0x4ec044[_0x24a098(0x194)]||'skill')+_0x24a098(0x18b);if(typeof File!==_0x24a098(0x15d))return new File([_0x5f3509],_0xf1d28d,{'type':_0x24a098(0x18f)});return _0x5f3509;}function normalizeSkillHubRuntimeListResponse(_0xe5871b,_0x4704b4,_0x5e1faf,_0x4f33ef){const _0x36dc38=a56_0x5f01,_0x1d3a50=Array[_0x36dc38(0x18e)](_0x4704b4)?_0x4704b4:Array[_0x36dc38(0x18e)](_0x4704b4?.[_0x36dc38(0x19c)])?_0x4704b4['items']:[],_0x492b74=_0x4f33ef?.[_0x36dc38(0x1a8)](),_0x56b98b=_0x1d3a50[_0x36dc38(0x19a)](_0x4784da=>!_0x492b74||_0x4784da[_0x36dc38(0x136)]===_0x492b74)[_0x36dc38(0x17e)](skillHubRuntimeItemToRuntimeSkill)[_0x36dc38(0x19a)](_0x35613a=>Boolean(_0x35613a)),_0x3b4da3=_0x56b98b[_0x36dc38(0x19a)](_0x3dd2ac=>_0x3dd2ac[_0x36dc38(0x13e)]===_0x36dc38(0x13c)),_0x15377c=_0x56b98b['filter'](_0x53be81=>_0x53be81[_0x36dc38(0x13e)]===_0x36dc38(0x165)),_0x482a99=_0x56b98b[_0x36dc38(0x19a)](_0x59cf3c=>_0x59cf3c[_0x36dc38(0x13e)]==='public');return{'appCode':_0xe5871b,'personal':_0x5e1faf===_0x36dc38(0x165)||_0x5e1faf===_0x36dc38(0x141)?[]:_0x3b4da3,'company':_0x5e1faf===_0x36dc38(0x13c)||_0x5e1faf===_0x36dc38(0x141)?[]:_0x15377c,'public':_0x5e1faf===_0x36dc38(0x13c)||_0x5e1faf===_0x36dc38(0x165)?[]:_0x482a99,'effective':buildEffectiveRuntimeSkills(_0x3b4da3,_0x15377c,_0x482a99,_0x5e1faf)};}function skillHubRuntimeItemToRuntimeSkill(_0x2aa1e0){const _0x2332c7=a56_0x5f01,_0x44655c=_0x2aa1e0['slug']?.['trim'](),_0x3720fc=skillHubVisibilityToScope(_0x2aa1e0[_0x2332c7(0x169)]);if(!_0x44655c||!_0x3720fc)return undefined;return{'id':_0x2aa1e0['id'],'appCode':_0x2aa1e0[_0x2332c7(0x159)],'skillCode':_0x44655c,'skillName':_0x2aa1e0[_0x2332c7(0x15f)]??_0x44655c,'description':_0x2aa1e0[_0x2332c7(0x1b1)],'scope':_0x3720fc,'version':skillHubRuntimeItemVersion(_0x2aa1e0),'status':_0x2aa1e0[_0x2332c7(0x189)]};}function skillHubVisibilityToScope(_0x4df746){const _0x59630f=a56_0x5f01;if(_0x4df746===_0x59630f(0x162))return _0x59630f(0x13c);if(_0x4df746==='NAMESPACE_ONLY')return _0x59630f(0x165);if(_0x4df746===_0x59630f(0x147))return _0x59630f(0x141);return undefined;}function skillHubRuntimeItemVersion(_0x347b62){const _0x4cd0db=a56_0x5f01;return _0x347b62[_0x4cd0db(0x145)]?.[_0x4cd0db(0x138)]??_0x347b62[_0x4cd0db(0x150)]?.[_0x4cd0db(0x138)]??_0x347b62[_0x4cd0db(0x151)]?.['version'];}function buildEffectiveRuntimeSkills(_0x54e826,_0x17686b,_0x157c4f,_0x56c89a){const _0x3934db=a56_0x5f01;if(_0x56c89a===_0x3934db(0x13c))return _0x54e826;if(_0x56c89a===_0x3934db(0x165))return _0x17686b;if(_0x56c89a===_0x3934db(0x141))return _0x157c4f;const _0x377507=new Map();for(const _0x11f6bf of _0x157c4f){_0x377507[_0x3934db(0x139)](_0x11f6bf[_0x3934db(0x194)],_0x11f6bf);}for(const _0x20a013 of _0x17686b){_0x377507['set'](_0x20a013[_0x3934db(0x194)],_0x20a013);}for(const _0x3e5dfd of _0x54e826){_0x377507[_0x3934db(0x139)](_0x3e5dfd[_0x3934db(0x194)],_0x3e5dfd);}return Array[_0x3934db(0x1a6)](_0x377507[_0x3934db(0x176)]());}function normalizeRuntimeSkillListResponse(_0x96ba08,_0x31288f){const _0x15c6c5=a56_0x5f01;if(Array[_0x15c6c5(0x18e)](_0x31288f)){const _0x4c7ecb=_0x31288f['filter'](_0x1ca9fe=>_0x1ca9fe[_0x15c6c5(0x13e)]==='personal'),_0x335f59=_0x31288f['filter'](_0x213cdb=>_0x213cdb[_0x15c6c5(0x13e)]==='company'),_0x3d203b=_0x31288f[_0x15c6c5(0x19a)](_0xc2fcca=>_0xc2fcca[_0x15c6c5(0x13e)]===_0x15c6c5(0x141));return{'appCode':_0x96ba08,'personal':_0x4c7ecb,'company':_0x335f59,'public':_0x3d203b,'effective':_0x31288f['filter'](_0x417f22=>_0x417f22[_0x15c6c5(0x13e)]!=='builtin')};}return{'appCode':_0x31288f?.[_0x15c6c5(0x17c)]??_0x96ba08,'personal':Array[_0x15c6c5(0x18e)](_0x31288f?.[_0x15c6c5(0x13c)])?_0x31288f[_0x15c6c5(0x13c)]:[],'company':Array[_0x15c6c5(0x18e)](_0x31288f?.[_0x15c6c5(0x165)])?_0x31288f[_0x15c6c5(0x165)]:[],'public':Array[_0x15c6c5(0x18e)](_0x31288f?.[_0x15c6c5(0x141)])?_0x31288f[_0x15c6c5(0x141)]:[],'effective':Array[_0x15c6c5(0x18e)](_0x31288f?.[_0x15c6c5(0x177)])?_0x31288f['effective']:[]};}
|
|
1
|
+
function a56_0xbb16(){const _0x54e8d6=['Configure\x20accessKey\x20in\x20','sqlCode','favorite','1hVxSyQ','/client/knowledge-base/search','Toolbox\x20API\x20error:\x20','values','object','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','api-doc-generator','summary','application/zip','/client/artifact/list?','success','/client/dataset/list','/client/artifact/create','company','source','/client/knowledge-base/personal/','description','1087504adasCM','/api/runtime/v1/namespaces/','SkillHub\x20API\x20error:\x20','all','name','tableData','filter','Download\x20failed:\x20','appCode','status','replace','slug','BFF\x20script\x20not\x20found:\x20id=','1390065nVTlke','topK','validation','appName','937300giyeGC','invokeSource','538030SePrjr','effective','56JCFSpX','SkillHub\x20error\x20code:\x20','/client/dataset/query?','file','Check\x20your\x20credentials\x20and\x20try\x20again.','2937612xGkLfW','Toolbox\x20error\x20code:\x20','/client/bff/query/','/update','apiError','trim','189483ZYvPYf','/client/app/my-apps','personal','API\x20error:\x20','skillCode','SQL\x20query\x20not\x20found:\x20','markdown','application/json','/api/cli/v1/skills/','packageBase64','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','artifactType','toString','POST','PRIVATE','text','/download','data','Request\x20timeout:\x20','undefined','AbortError','Personal\x20BFF\x20not\x20found:\x20id=','7465779HLCRGK','abort','GET','/client/artifact/','code','/client/user/loginUserInfo','/api/node-toolbox/','application/octet-stream','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/execute?appCode=','?appCode=','NAMESPACE_ONLY','skill','test','signal','/client/runtime-bff/personal/','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','displayName','headlineVersion','catch','scope','boolean','arrayBuffer','visibility','/versions/','json','msg','query','authRequired','/client/runtime-bff/personal/list?appCode=','stringify','string','namespace','/skills','from','message','isArray','version','newConfigFileName','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','errorCode','entries','.zip','/client/sql/query','set','/client/runtime-bff/personal/create','tags','errorMsg','searchParams','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'];a56_0xbb16=function(){return _0x54e8d6;};return a56_0xbb16();}(function(_0x30da45,_0x1084da){const _0x2092c7=a56_0x34e1,_0x1612b2=_0x30da45();while(!![]){try{const _0x5ce51b=parseInt(_0x2092c7(0xe7))/0x1*(-parseInt(_0x2092c7(0x10b))/0x2)+-parseInt(_0x2092c7(0x105))/0x3+parseInt(_0x2092c7(0xf8))/0x4+parseInt(_0x2092c7(0x109))/0x5+-parseInt(_0x2092c7(0x112))/0x6+-parseInt(_0x2092c7(0x118))/0x7*(-parseInt(_0x2092c7(0x10d))/0x8)+parseInt(_0x2092c7(0x12e))/0x9;if(_0x5ce51b===_0x1084da)break;else _0x1612b2['push'](_0x1612b2['shift']());}catch(_0x20cb14){_0x1612b2['push'](_0x1612b2['shift']());}}}(a56_0xbb16,0x3e97a));import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x593804){_activeAK=_0x593804||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x1757a3,_0x2b4d53={}){const _0x138fa0=a56_0x34e1,{method:method='GET',body:_0x3cbe68,headers:headers={},timeout:timeout=0x7530}=_0x2b4d53,_0x12b332=_activeAK,_0xec45a0=getRuntimeDomain();if(!_0x12b332)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x138fa0(0xd8)]+'.');const _0x431e73=''+_0xec45a0+_0x1757a3,_0x3324e2={'X-User-AK':_0x12b332},_0x4b7a6f=new AbortController(),_0x49d415=setTimeout(()=>_0x4b7a6f[_0x138fa0(0x12f)](),timeout);try{const _0x15223c=await fetch(_0x431e73,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x138fa0(0x10a)],..._0x3324e2,...headers},'body':_0x3cbe68?JSON[_0x138fa0(0xd0)](_0x3cbe68):undefined,'signal':_0x4b7a6f['signal']});let _0x4a4bb0;try{_0x4a4bb0=await _0x15223c[_0x138fa0(0xcb)]();}catch{throw CliErrors[_0x138fa0(0x116)](_0x138fa0(0xc2)+_0x15223c['status']+')',_0x15223c['status']>=0x190?_0x138fa0(0x111):undefined);}if(!_0x15223c['ok']||_0x4a4bb0[_0x138fa0(0xf1)]===![])throw CliErrors[_0x138fa0(0x116)](_0x4a4bb0['errorMsg']||_0x4a4bb0[_0x138fa0(0xd5)]||_0x138fa0(0x11b)+_0x15223c[_0x138fa0(0x101)],_0x4a4bb0['errorCode']?'API\x20error\x20code:\x20'+_0x4a4bb0[_0x138fa0(0xda)]:undefined);return _0x4a4bb0;}catch(_0x29ea41){if(_0x29ea41 instanceof Error&&_0x29ea41['name']==='AbortError')throw CliErrors[_0x138fa0(0x116)](_0x138fa0(0x12a)+_0x431e73);throw _0x29ea41;}finally{clearTimeout(_0x49d415);}}async function apiBinaryRequest(_0x41105a,_0x2b5f68={}){const _0x53d0bb=a56_0x34e1,{method:method=_0x53d0bb(0x130),headers:headers={},timeout:timeout=0x7530}=_0x2b5f68,_0x2cd4aa=_activeAK,_0x1285b1=getRuntimeDomain();if(!_0x2cd4aa)throw CliErrors['authRequired'](_0x53d0bb(0xe4)+PRODUCT_CONFIG[_0x53d0bb(0xd8)]+'.');const _0x4d0d49=''+_0x1285b1+_0x41105a,_0x2a7bdc=new AbortController(),_0x5d2f4d=setTimeout(()=>_0x2a7bdc[_0x53d0bb(0x12f)](),timeout);try{const _0x3f2082=await fetch(_0x4d0d49,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x53d0bb(0x10a)],'X-User-AK':_0x2cd4aa,...headers},'signal':_0x2a7bdc[_0x53d0bb(0xc0)]});if(!_0x3f2082['ok']){let _0x3bf50c;try{const _0x2603ab=await _0x3f2082[_0x53d0bb(0xcb)]();_0x3bf50c=_0x2603ab[_0x53d0bb(0xe1)]||_0x2603ab['message']||_0x2603ab[_0x53d0bb(0xda)];}catch{_0x3bf50c=await _0x3f2082[_0x53d0bb(0x127)]()[_0x53d0bb(0xc5)](()=>undefined);}throw CliErrors['apiError'](_0x3bf50c||_0x53d0bb(0x11b)+_0x3f2082[_0x53d0bb(0x101)],_0x53d0bb(0xff)+_0x4d0d49);}return Buffer['from'](await _0x3f2082[_0x53d0bb(0xc8)]());}catch(_0x4740ad){if(_0x4740ad instanceof Error&&_0x4740ad[_0x53d0bb(0xfc)]==='AbortError')throw CliErrors[_0x53d0bb(0x116)](_0x53d0bb(0x12a)+_0x4d0d49);throw _0x4740ad;}finally{clearTimeout(_0x5d2f4d);}}async function toolboxRequest(_0x14a5e6,_0x526518,_0x392079={}){const _0x1aff50=a56_0x34e1,{method:method=_0x1aff50(0x130),headers:headers={},timeout:timeout=0x7530}=_0x392079,_0x279b56=_activeAK;if(!_0x279b56)throw CliErrors['authRequired'](_0x1aff50(0xe4)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x531d61=getApiDomain()[_0x1aff50(0x102)](/\/$/,''),_0x3dca85=new URL(_0x14a5e6,_0x531d61+_0x1aff50(0x134));if(_0x526518)for(const [_0x506709,_0x3b15af]of Object[_0x1aff50(0xdb)](_0x526518)){_0x3b15af!==undefined&&_0x3b15af!==null&&_0x3dca85[_0x1aff50(0xe2)][_0x1aff50(0xde)](_0x506709,String(_0x3b15af));}const _0x51e879=new AbortController(),_0x5664c7=setTimeout(()=>_0x51e879[_0x1aff50(0x12f)](),timeout);try{const _0x4ec8ae=await fetch(_0x3dca85,{'method':method,'headers':{'Content-Type':_0x1aff50(0x11f),'X-Invoke-Source':PRODUCT_CONFIG[_0x1aff50(0x10a)],'X-User-AK':_0x279b56,...headers},'signal':_0x51e879[_0x1aff50(0xc0)]});let _0x60768d;try{_0x60768d=await _0x4ec8ae[_0x1aff50(0xcb)]();}catch{throw CliErrors[_0x1aff50(0x116)](_0x1aff50(0xd9)+_0x4ec8ae['status']+')',_0x4ec8ae[_0x1aff50(0x101)]>=0x190?_0x1aff50(0x111):undefined);}if(!_0x4ec8ae['ok']){const _0x2934e3=_0x60768d&&typeof _0x60768d===_0x1aff50(0xeb)?_0x60768d:{};throw CliErrors[_0x1aff50(0x116)](_0x2934e3['errorMsg']||_0x2934e3[_0x1aff50(0xd5)]||_0x1aff50(0xe9)+_0x4ec8ae['status'],_0x2934e3['errorCode']?_0x1aff50(0x113)+_0x2934e3[_0x1aff50(0xda)]:undefined);}if(_0x60768d&&typeof _0x60768d==='object'&&_0x1aff50(0xf1)in _0x60768d&&typeof _0x60768d[_0x1aff50(0xf1)]===_0x1aff50(0xc7)){const _0x325fed=_0x60768d;if(!_0x325fed[_0x1aff50(0xf1)])throw CliErrors['apiError'](_0x325fed[_0x1aff50(0xe1)]||_0x325fed['message']||'Toolbox\x20API\x20error',_0x325fed[_0x1aff50(0xda)]?_0x1aff50(0x113)+_0x325fed[_0x1aff50(0xda)]:undefined);return _0x325fed[_0x1aff50(0x129)];}return _0x60768d;}catch(_0xbeab2){if(_0xbeab2 instanceof Error&&_0xbeab2[_0x1aff50(0xfc)]===_0x1aff50(0x12c))throw CliErrors[_0x1aff50(0x116)](_0x1aff50(0x12a)+_0x3dca85['toString']());throw _0xbeab2;}finally{clearTimeout(_0x5664c7);}}async function skillHubJsonRequest(_0x3cc935,_0x4f1fac={}){const _0x354bfd=a56_0x34e1,{method:method=_0x354bfd(0x130),query:_0x22e9b1,body:_0x44a5a2,headers:headers={},timeout:timeout=0x7530}=_0x4f1fac,_0x35e3d3=_activeAK;if(!_0x35e3d3)throw CliErrors[_0x354bfd(0xce)](_0x354bfd(0xe4)+PRODUCT_CONFIG[_0x354bfd(0xd8)]+'.');const _0x584909=getSkillHubDomain()[_0x354bfd(0x102)](/\/$/,''),_0x2bd661=new URL(_0x3cc935,_0x584909+'/');if(_0x22e9b1)for(const [_0x1c2cdf,_0x1b390b]of Object[_0x354bfd(0xdb)](_0x22e9b1)){_0x1b390b!==undefined&&_0x1b390b!==null&&_0x2bd661[_0x354bfd(0xe2)][_0x354bfd(0xde)](_0x1c2cdf,String(_0x1b390b));}const _0x3191fd=new AbortController(),_0x467495=setTimeout(()=>_0x3191fd[_0x354bfd(0x12f)](),timeout);try{const _0x32841c=await fetch(_0x2bd661['toString'](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x35e3d3,...headers},'body':_0x44a5a2,'signal':_0x3191fd['signal']});let _0x28ee75;try{_0x28ee75=await _0x32841c['json']();}catch{throw CliErrors[_0x354bfd(0x116)](_0x354bfd(0xe3)+_0x32841c['status']+')',_0x32841c[_0x354bfd(0x101)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x3188b9=!_0x32841c['ok']||_0x28ee75?.['success']===![]||typeof _0x28ee75?.[_0x354bfd(0x132)]==='number'&&_0x28ee75['code']>=0x190;if(_0x3188b9)throw CliErrors[_0x354bfd(0x116)](_0x28ee75?.[_0x354bfd(0xe1)]||_0x28ee75?.[_0x354bfd(0xd5)]||_0x28ee75?.['msg']||_0x354bfd(0xfa)+_0x32841c[_0x354bfd(0x101)],_0x28ee75?.[_0x354bfd(0xda)]?_0x354bfd(0x10e)+_0x28ee75['errorCode']:undefined);return _0x28ee75?.[_0x354bfd(0x129)]??_0x28ee75;}catch(_0x44645e){if(_0x44645e instanceof Error&&_0x44645e[_0x354bfd(0xfc)]==='AbortError')throw CliErrors[_0x354bfd(0x116)](_0x354bfd(0x12a)+_0x2bd661['toString']());throw _0x44645e;}finally{clearTimeout(_0x467495);}}async function skillHubBinaryRequest(_0x38a4bd,_0x2bb6bd={}){const _0x5930e2=a56_0x34e1,{query:_0x3be6a8,headers:headers={},timeout:timeout=0x7530}=_0x2bb6bd,_0x5c55b8=_activeAK;if(!_0x5c55b8)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x5930e2(0xd8)]+'.');const _0x1d5589=getSkillHubDomain()['replace'](/\/$/,''),_0x7e0df0=new URL(_0x38a4bd,_0x1d5589+'/');if(_0x3be6a8)for(const [_0x2beb0a,_0x21603d]of Object['entries'](_0x3be6a8)){_0x21603d!==undefined&&_0x21603d!==null&&_0x7e0df0[_0x5930e2(0xe2)][_0x5930e2(0xde)](_0x2beb0a,String(_0x21603d));}const _0x1cc824=new AbortController(),_0x411c1e=setTimeout(()=>_0x1cc824[_0x5930e2(0x12f)](),timeout);try{const _0x49899f=await fetch(_0x7e0df0[_0x5930e2(0x124)](),{'method':'GET','headers':{'Accept':_0x5930e2(0x135),'X-Invoke-Source':PRODUCT_CONFIG[_0x5930e2(0x10a)],'X-User-AK':_0x5c55b8,...headers},'signal':_0x1cc824['signal']});if(!_0x49899f['ok']){let _0x2d5a19;try{const _0x1d8ab0=await _0x49899f[_0x5930e2(0xcb)]();_0x2d5a19=_0x1d8ab0['errorMsg']||_0x1d8ab0[_0x5930e2(0xd5)]||_0x1d8ab0[_0x5930e2(0xcc)]||_0x1d8ab0['errorCode'];}catch{_0x2d5a19=await _0x49899f[_0x5930e2(0x127)]()[_0x5930e2(0xc5)](()=>undefined);}throw CliErrors[_0x5930e2(0x116)](_0x2d5a19||_0x5930e2(0xfa)+_0x49899f[_0x5930e2(0x101)],_0x5930e2(0xff)+_0x7e0df0['toString']());}return Buffer[_0x5930e2(0xd4)](await _0x49899f['arrayBuffer']());}catch(_0x6ffa4c){if(_0x6ffa4c instanceof Error&&_0x6ffa4c[_0x5930e2(0xfc)]===_0x5930e2(0x12c))throw CliErrors[_0x5930e2(0x116)]('Request\x20timeout:\x20'+_0x7e0df0[_0x5930e2(0x124)]());throw _0x6ffa4c;}finally{clearTimeout(_0x411c1e);}}export async function getBffScriptInfo(_0x2a304f){const _0x3316f4=a56_0x34e1,_0x335810=await apiRequest(_0x3316f4(0x114)+_0x2a304f);if(!_0x335810[_0x3316f4(0x129)])throw CliErrors[_0x3316f4(0x107)](_0x3316f4(0x104)+_0x2a304f);return _0x335810[_0x3316f4(0x129)];}export async function getSqlQueryInfo(_0x5c0748,_0x31f092){const _0x1a68c2=a56_0x34e1,_0x2bb477=await apiRequest(_0x1a68c2(0xdd),{'method':_0x1a68c2(0x125),'body':{'appCode':_0x5c0748,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x31f092}}),_0x390f30=_0x2bb477[_0x1a68c2(0x129)],_0x59fda8=_0x390f30&&typeof _0x390f30===_0x1a68c2(0xeb)&&_0x1a68c2(0xfd)in _0x390f30?_0x390f30['tableData']?.[0x0]:_0x390f30&&typeof _0x390f30===_0x1a68c2(0xeb)&&_0x1a68c2(0xe5)in _0x390f30?_0x390f30:undefined;if(!_0x59fda8)throw CliErrors[_0x1a68c2(0x107)](_0x1a68c2(0x11d)+_0x31f092);return _0x59fda8;}function isRemoteAppItem(_0x3e1661){const _0x40a2b0=a56_0x34e1;return!!_0x3e1661&&typeof _0x3e1661===_0x40a2b0(0xeb)&&typeof _0x3e1661[_0x40a2b0(0x100)]===_0x40a2b0(0xd1)&&typeof _0x3e1661[_0x40a2b0(0x108)]==='string';}function extractRemoteAppItems(_0x1857a9){const _0x39e4aa=a56_0x34e1;if(Array['isArray'](_0x1857a9))return _0x1857a9[_0x39e4aa(0xfe)](isRemoteAppItem);if(!_0x1857a9||typeof _0x1857a9!==_0x39e4aa(0xeb))throw CliErrors[_0x39e4aa(0x116)](_0x39e4aa(0x136));const _0x59e77d=_0x1857a9;if(Array[_0x39e4aa(0xd6)](_0x59e77d[_0x39e4aa(0xfd)]))return _0x59e77d['tableData']['filter'](isRemoteAppItem);if(_0x59e77d[_0x39e4aa(0x129)]&&typeof _0x59e77d[_0x39e4aa(0x129)]===_0x39e4aa(0xeb)){const _0x435f8e=_0x59e77d[_0x39e4aa(0x129)];if(Array[_0x39e4aa(0xd6)](_0x435f8e['tableData']))return _0x435f8e['tableData'][_0x39e4aa(0xfe)](isRemoteAppItem);}throw CliErrors[_0x39e4aa(0x116)](_0x39e4aa(0x122));}export async function getMyApps(){const _0x3b1cb9=a56_0x34e1,_0x48e573=await apiRequest(_0x3b1cb9(0x119));return extractRemoteAppItems(_0x48e573[_0x3b1cb9(0x129)]);}export async function getLoginUserInfo(){const _0x4afc7c=a56_0x34e1,_0xe0468f=await apiRequest(_0x4afc7c(0x133));if(!_0xe0468f[_0x4afc7c(0x129)]||typeof _0xe0468f[_0x4afc7c(0x129)]!==_0x4afc7c(0xeb)||Array[_0x4afc7c(0xd6)](_0xe0468f['data']))throw CliErrors[_0x4afc7c(0x116)](_0x4afc7c(0xec));return _0xe0468f[_0x4afc7c(0x129)];}export async function listDatasets(_0x10731f,_0x30d706){const _0x4682e4=a56_0x34e1,_0xd251f5=await apiRequest(_0x4682e4(0xf2),{'method':_0x4682e4(0x125),'body':{'appCode':_0x10731f,..._0x30d706?.[_0x4682e4(0x132)]&&{'code':_0x30d706['code']},..._0x30d706?.['name']&&{'name':_0x30d706[_0x4682e4(0xfc)]}}});return extractList(_0xd251f5[_0x4682e4(0x129)]);}export async function getDatasetDetail(_0x4b4f45){const _0x3b38f3=a56_0x34e1,_0x724913=/^\d+$/[_0x3b38f3(0xbf)](_0x4b4f45)?'id':_0x3b38f3(0x132),_0x5114a2=await apiRequest(_0x3b38f3(0x10f)+_0x724913+'='+_0x4b4f45);return _0x5114a2['data'];}export async function getDatasetSdkUsageDoc(_0x28eee9,_0x57a1ab){const _0x5914b7=a56_0x34e1,_0x526e79=await toolboxRequest(_0x5914b7(0xed),{'datasetCode':_0x28eee9,'appCode':_0x57a1ab});return typeof _0x526e79?.[_0x5914b7(0x11e)]===_0x5914b7(0xd1)?_0x526e79['markdown']:'';}export async function listRuntimeArtifacts(_0x118418,_0x3e21f2){const _0x323f67=a56_0x34e1,_0x4189c6=new URLSearchParams({'appCode':_0x118418});if(_0x3e21f2?.['artifactType'])_0x4189c6[_0x323f67(0xde)](_0x323f67(0x123),_0x3e21f2['artifactType']);if(_0x3e21f2?.[_0x323f67(0xf5)])_0x4189c6[_0x323f67(0xde)]('source',_0x3e21f2[_0x323f67(0xf5)]);if(_0x3e21f2?.[_0x323f67(0xe6)]!==undefined)_0x4189c6[_0x323f67(0xde)]('favorite',String(_0x3e21f2[_0x323f67(0xe6)]));const _0x13f053=await apiRequest(_0x323f67(0xf0)+_0x4189c6[_0x323f67(0x124)]());return Array['isArray'](_0x13f053[_0x323f67(0x129)])?_0x13f053[_0x323f67(0x129)]:[];}export async function getRuntimeArtifact(_0x3415e9,_0x227433){const _0x29afe0=a56_0x34e1,_0x3c7f96=await apiRequest(_0x29afe0(0x131)+_0x3415e9+'?appCode='+encodeURIComponent(_0x227433));if(!_0x3c7f96[_0x29afe0(0x129)])throw CliErrors[_0x29afe0(0x107)]('Artifact\x20not\x20found:\x20id='+_0x3415e9);return _0x3c7f96[_0x29afe0(0x129)];}export async function createRuntimeArtifact(_0x2d1784,_0xc8cb75){const _0x44c76f=a56_0x34e1,_0x1118af=await apiRequest(_0x44c76f(0xf3),{'method':_0x44c76f(0x125),'body':{'appCode':_0x2d1784,..._0xc8cb75}});return _0x1118af[_0x44c76f(0x129)];}export async function updateRuntimeArtifact(_0x41a0d7,_0xaa20e,_0x20dce9){const _0x311508=a56_0x34e1,_0x5b7bf0=await apiRequest(_0x311508(0x131)+_0x41a0d7+_0x311508(0x115),{'method':'POST','body':{'appCode':_0xaa20e,..._0x20dce9}});return _0x5b7bf0['data'];}export async function listPersonalBffs(_0x2342db){const _0x24506c=a56_0x34e1,_0x75d4d8=await apiRequest(_0x24506c(0xcf)+encodeURIComponent(_0x2342db));return Array[_0x24506c(0xd6)](_0x75d4d8[_0x24506c(0x129)])?_0x75d4d8[_0x24506c(0x129)]:[];}export async function getPersonalBff(_0x2f8477,_0x286b85){const _0x189461=a56_0x34e1,_0x124739=await apiRequest('/client/runtime-bff/personal/'+_0x2f8477+_0x189461(0x138)+encodeURIComponent(_0x286b85));if(!_0x124739['data'])throw CliErrors[_0x189461(0x107)](_0x189461(0x12d)+_0x2f8477);return _0x124739['data'];}export async function createPersonalBff(_0x49373c,_0x14a474){const _0xf2e72e=a56_0x34e1,_0x408120=await apiRequest(_0xf2e72e(0xdf),{'method':'POST','body':{'appCode':_0x49373c,..._0x14a474}});return _0x408120['data'];}export async function updatePersonalBff(_0x2ac998,_0x5bd6ca,_0x1dc5b9){const _0x1bf540=a56_0x34e1,_0x566ba8=await apiRequest(_0x1bf540(0xc1)+_0x2ac998+'/update',{'method':_0x1bf540(0x125),'body':{'appCode':_0x5bd6ca,..._0x1dc5b9}});return _0x566ba8[_0x1bf540(0x129)];}export async function executePersonalBff(_0x25f096,_0x3068b0,_0x1e4e62){const _0x1d1a66=a56_0x34e1,_0x46a98d=await apiRequest('/client/runtime-bff/personal/'+_0x25f096+_0x1d1a66(0x137)+encodeURIComponent(_0x3068b0),{'method':'POST','body':_0x1e4e62});return _0x46a98d[_0x1d1a66(0x129)];}export async function listPersonalKnowledgeBaseItems(_0x343976){const _0x3f1f4a=a56_0x34e1,_0x2ccabe=await apiRequest('/client/knowledge-base/personal/list?appCode='+encodeURIComponent(_0x343976));return Array['isArray'](_0x2ccabe[_0x3f1f4a(0x129)])?_0x2ccabe[_0x3f1f4a(0x129)]:[];}export async function getPersonalKnowledgeBaseItem(_0xb8e9a3,_0x23b409){const _0x133f57=a56_0x34e1,_0x1d94af=await apiRequest(_0x133f57(0xf6)+_0xb8e9a3+_0x133f57(0x138)+encodeURIComponent(_0x23b409));if(!_0x1d94af[_0x133f57(0x129)])throw CliErrors['validation']('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0xb8e9a3);return _0x1d94af[_0x133f57(0x129)];}export async function createPersonalKnowledgeBaseItem(_0xcaac07,_0x40c6d5){const _0x4f072a=a56_0x34e1,_0x4cf085=await apiRequest('/client/knowledge-base/personal/create',{'method':_0x4f072a(0x125),'body':{'appCode':_0xcaac07,..._0x40c6d5}});return _0x4cf085[_0x4f072a(0x129)];}function a56_0x34e1(_0x5f430d,_0x218187){_0x5f430d=_0x5f430d-0xbd;const _0xbb1635=a56_0xbb16();let _0x34e1e9=_0xbb1635[_0x5f430d];return _0x34e1e9;}export async function updatePersonalKnowledgeBaseItem(_0x7b8781,_0x336db6,_0x55d74c){const _0x17fb0e=a56_0x34e1,_0xcb164=await apiRequest(_0x17fb0e(0xf6)+_0x7b8781+_0x17fb0e(0x115),{'method':_0x17fb0e(0x125),'body':{'appCode':_0x336db6,..._0x55d74c}});return _0xcb164['data'];}export async function searchKnowledgeBase(_0xa20f21,_0x48ea7b){const _0x5af233=a56_0x34e1,_0x7a93d9=await apiRequest(_0x5af233(0xe8),{'method':_0x5af233(0x125),'body':{'appCode':_0xa20f21,'query':_0x48ea7b[_0x5af233(0xcd)],..._0x48ea7b[_0x5af233(0x106)]!==undefined?{'topK':_0x48ea7b[_0x5af233(0x106)]}:{}}});return Array[_0x5af233(0xd6)](_0x7a93d9[_0x5af233(0x129)])?_0x7a93d9[_0x5af233(0x129)]:[];}export async function listRuntimeSkills(_0x348665){const _0x450f2e=a56_0x34e1,_0x52de8d=await skillHubJsonRequest(_0x450f2e(0xf9)+encodeURIComponent(_0x348665[_0x450f2e(0x100)])+_0x450f2e(0xd3),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x348665[_0x450f2e(0x100)],_0x52de8d,_0x348665['scope']??_0x450f2e(0xfb),_0x348665[_0x450f2e(0x132)]);}export async function listPersonalRuntimeSkills(_0x557e7e){const _0x4afb04=a56_0x34e1;return(await listRuntimeSkills({'appCode':_0x557e7e,'scope':_0x4afb04(0x11a)}))['personal'];}export async function listCompanyRuntimeSkills(_0x503040){const _0x17079c=a56_0x34e1;return(await listRuntimeSkills({'appCode':_0x503040,'scope':_0x17079c(0xf4)}))[_0x17079c(0xf4)];}export async function listVisibleRuntimeSkills(_0x2d388b){const _0x28a2d3=a56_0x34e1;return(await listRuntimeSkills({'appCode':_0x2d388b,'scope':_0x28a2d3(0xfb)}))[_0x28a2d3(0x10c)];}export async function createPersonalRuntimeSkill(_0x51ad25,_0x5996e0){return publishRuntimeSkill(_0x51ad25,_0x5996e0);}export async function updatePersonalRuntimeSkill(_0x316277,_0x31aec0,_0x1653ec){const _0x4ca2da=a56_0x34e1;return publishRuntimeSkill(_0x31aec0,{..._0x1653ec,'skillCode':_0x1653ec[_0x4ca2da(0x11c)]??_0x316277});}export async function downloadRuntimeSkillPackage(_0x219684,_0x3cca20,_0x54bce9,_0x2f7ff4){const _0x5b9b4d=a56_0x34e1;void _0x219684;const _0x35b476=_0x2f7ff4?'/api/cli/v1/skills/'+encodeURIComponent(_0x54bce9)+'/'+encodeURIComponent(_0x3cca20)+_0x5b9b4d(0xca)+encodeURIComponent(_0x2f7ff4)+_0x5b9b4d(0x128):_0x5b9b4d(0x120)+encodeURIComponent(_0x54bce9)+'/'+encodeURIComponent(_0x3cca20)+_0x5b9b4d(0x128);return skillHubBinaryRequest(_0x35b476);}async function publishRuntimeSkill(_0x14f6f7,_0x2905e7){const _0x370678=a56_0x34e1,_0x1ccf8a=new FormData();_0x1ccf8a['set'](_0x370678(0x110),runtimeSkillPackageFile(_0x2905e7)),_0x1ccf8a[_0x370678(0xde)](_0x370678(0xc9),'PRIVATE');const _0x3b4fa4=await skillHubJsonRequest(_0x370678(0x120)+encodeURIComponent(_0x14f6f7)+'/publish',{'method':_0x370678(0x125),'body':_0x1ccf8a});return{'appCode':_0x3b4fa4[_0x370678(0xd2)]??_0x14f6f7,'skillCode':_0x3b4fa4[_0x370678(0x103)]??_0x2905e7['skillCode']??'','skillName':_0x2905e7['skillName']??_0x3b4fa4[_0x370678(0x103)]??_0x2905e7['skillCode'],'description':_0x2905e7[_0x370678(0xf7)],'scope':skillHubVisibilityToScope(_0x3b4fa4[_0x370678(0xc9)])??'personal','version':_0x3b4fa4[_0x370678(0xd7)]??_0x2905e7['version'],'tags':_0x2905e7[_0x370678(0xe0)],'content':_0x2905e7['content']};}function runtimeSkillPackageFile(_0x3fb6d3){const _0x5b56d9=a56_0x34e1;if(!_0x3fb6d3[_0x5b56d9(0x121)])throw CliErrors['validation']('Missing\x20Skill\x20package\x20payload.');const _0x9a1e44=Buffer[_0x5b56d9(0xd4)](_0x3fb6d3[_0x5b56d9(0x121)],'base64'),_0x4abe89=new Blob([_0x9a1e44],{'type':_0x5b56d9(0xef)}),_0x534ab9=(_0x3fb6d3[_0x5b56d9(0x11c)]||_0x5b56d9(0xbe))+_0x5b56d9(0xdc);if(typeof File!==_0x5b56d9(0x12b))return new File([_0x4abe89],_0x534ab9,{'type':'application/zip'});return _0x4abe89;}function normalizeSkillHubRuntimeListResponse(_0x20e50b,_0x1e599c,_0x24182a,_0x134e5d){const _0x42571f=a56_0x34e1,_0x33dc38=Array['isArray'](_0x1e599c)?_0x1e599c:Array[_0x42571f(0xd6)](_0x1e599c?.['items'])?_0x1e599c['items']:[],_0x1fd70a=_0x134e5d?.['trim'](),_0x3b3b5a=_0x33dc38['filter'](_0xb95798=>!_0x1fd70a||_0xb95798['slug']===_0x1fd70a)['map'](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x48d2d2=>Boolean(_0x48d2d2)),_0x1e4d63=_0x3b3b5a[_0x42571f(0xfe)](_0xb699f1=>_0xb699f1[_0x42571f(0xc6)]==='personal'),_0x131176=_0x3b3b5a['filter'](_0x3e6fd6=>_0x3e6fd6['scope']==='company');return{'appCode':_0x20e50b,'personal':_0x24182a==='company'?[]:_0x1e4d63,'company':_0x24182a==='personal'?[]:_0x131176,'effective':buildEffectiveRuntimeSkills(_0x1e4d63,_0x131176,_0x24182a)};}function skillHubRuntimeItemToRuntimeSkill(_0x402ba9){const _0x53d690=a56_0x34e1,_0x31207c=_0x402ba9[_0x53d690(0x103)]?.[_0x53d690(0x117)](),_0x286339=skillHubVisibilityToScope(_0x402ba9[_0x53d690(0xc9)]);if(!_0x31207c||!_0x286339)return undefined;return{'id':_0x402ba9['id'],'appCode':_0x402ba9[_0x53d690(0xd2)],'skillCode':_0x31207c,'skillName':_0x402ba9[_0x53d690(0xc3)]??_0x31207c,'description':_0x402ba9[_0x53d690(0xee)],'scope':_0x286339,'version':skillHubRuntimeItemVersion(_0x402ba9),'status':_0x402ba9[_0x53d690(0x101)]};}function skillHubVisibilityToScope(_0x441c90){const _0x59f258=a56_0x34e1;if(_0x441c90===_0x59f258(0x126))return _0x59f258(0x11a);if(_0x441c90===_0x59f258(0xbd))return _0x59f258(0xf4);return undefined;}function skillHubRuntimeItemVersion(_0x137ebe){const _0x582430=a56_0x34e1;return _0x137ebe['publishedVersion']?.[_0x582430(0xd7)]??_0x137ebe[_0x582430(0xc4)]?.[_0x582430(0xd7)]??_0x137ebe['ownerPreviewVersion']?.[_0x582430(0xd7)];}function buildEffectiveRuntimeSkills(_0x24f145,_0x458cc5,_0x390ece){const _0x2b898c=a56_0x34e1;if(_0x390ece===_0x2b898c(0x11a))return _0x24f145;if(_0x390ece===_0x2b898c(0xf4))return _0x458cc5;const _0x49a9e2=new Map();for(const _0x13a5d1 of _0x458cc5){_0x49a9e2[_0x2b898c(0xde)](_0x13a5d1[_0x2b898c(0x11c)],_0x13a5d1);}for(const _0x524a70 of _0x24f145){_0x49a9e2[_0x2b898c(0xde)](_0x524a70['skillCode'],_0x524a70);}return Array[_0x2b898c(0xd4)](_0x49a9e2[_0x2b898c(0xea)]());}function normalizeRuntimeSkillListResponse(_0x544989,_0x55377f){const _0x11f06b=a56_0x34e1;if(Array[_0x11f06b(0xd6)](_0x55377f)){const _0x3e6f9f=_0x55377f[_0x11f06b(0xfe)](_0x1a8ded=>_0x1a8ded[_0x11f06b(0xc6)]===_0x11f06b(0x11a)),_0x2f8d19=_0x55377f[_0x11f06b(0xfe)](_0x27f8d3=>_0x27f8d3['scope']===_0x11f06b(0xf4));return{'appCode':_0x544989,'personal':_0x3e6f9f,'company':_0x2f8d19,'effective':[..._0x2f8d19,..._0x3e6f9f]};}return{'appCode':_0x55377f?.[_0x11f06b(0x100)]??_0x544989,'personal':Array[_0x11f06b(0xd6)](_0x55377f?.[_0x11f06b(0x11a)])?_0x55377f[_0x11f06b(0x11a)]:[],'company':Array[_0x11f06b(0xd6)](_0x55377f?.['company'])?_0x55377f[_0x11f06b(0xf4)]:[],'effective':Array[_0x11f06b(0xd6)](_0x55377f?.['effective'])?_0x55377f['effective']:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3908d1,_0x11eec6){const _0x1362be=a57_0x2dd6,_0x19266d=_0x3908d1();while(!![]){try{const _0x309d20=parseInt(_0x1362be(0x1cc))/0x1*(parseInt(_0x1362be(0x1cb))/0x2)+-parseInt(_0x1362be(0x1d3))/0x3*(-parseInt(_0x1362be(0x1ce))/0x4)+parseInt(_0x1362be(0x1d0))/0x5*(-parseInt(_0x1362be(0x1cf))/0x6)+-parseInt(_0x1362be(0x1da))/0x7*(parseInt(_0x1362be(0x1cd))/0x8)+parseInt(_0x1362be(0x1d7))/0x9*(parseInt(_0x1362be(0x1d1))/0xa)+parseInt(_0x1362be(0x1d8))/0xb*(-parseInt(_0x1362be(0x1ca))/0xc)+-parseInt(_0x1362be(0x1d5))/0xd*(-parseInt(_0x1362be(0x1db))/0xe);if(_0x309d20===_0x11eec6)break;else _0x19266d['push'](_0x19266d['shift']());}catch(_0x3fd48e){_0x19266d['push'](_0x19266d['shift']());}}}(a57_0x52bb,0x6cc99));import{listDatasets}from'../core/api-client.js';const cache=new Map();function a57_0x2dd6(_0x16068a,_0x4e305b){_0x16068a=_0x16068a-0x1c7;const _0x52bbab=a57_0x52bb();let _0x2dd651=_0x52bbab[_0x16068a];return _0x2dd651;}export async function listDatabases(_0x5c838e){const _0x328e9b=a57_0x2dd6;if(cache['has'](_0x5c838e))return cache[_0x328e9b(0x1c8)](_0x5c838e);const _0xcdc4e1=await listDatasets(_0x5c838e),_0x509112=new Map();for(const _0x266db9 of _0xcdc4e1){const _0x182175=_0x266db9['dbtableConfig'];_0x182175?.[_0x328e9b(0x1d6)]!=null&&_0x509112[_0x328e9b(0x1d4)](_0x182175[_0x328e9b(0x1d6)],_0x182175[_0x328e9b(0x1c7)]??_0x328e9b(0x1d2)+_0x182175[_0x328e9b(0x1d6)]);}const _0x284756=[..._0x509112['entries']()][_0x328e9b(0x1c9)](([_0x2cf932,_0x39cbeb])=>({'dbId':_0x2cf932,'dbName':_0x39cbeb}));return cache[_0x328e9b(0x1d4)](_0x5c838e,_0x284756),_0x284756;}export async function getDbName(_0x4ce77c,_0x5c083f){const _0x8c1d53=a57_0x2dd6;try{const _0x263787=await listDatabases(_0x4ce77c);return _0x263787[_0x8c1d53(0x1d9)](_0x4ad80a=>_0x4ad80a[_0x8c1d53(0x1d6)]===_0x5c083f)?.[_0x8c1d53(0x1c7)];}catch{return undefined;}}function a57_0x52bb(){const _0x551077=['db-','30906Xntcbw','set','2483RiuSEB','dbId','167472LBpLkA','4191ukMJWk','find','7231wInaWC','19558SaaNzv','dbName','get','map','7044XNvNHd','788682FSaWzX','1MXOyld','1352XLUTuw','172IaZJIc','186UNUYYF','53995bBKBCW','40hLmHts'];a57_0x52bb=function(){return _0x551077;};return a57_0x52bb();}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x516f97,_0x1f2468){const _0x23c6d0=a58_0x2755,_0x4a25fd=_0x516f97();while(!![]){try{const _0xeab785=parseInt(_0x23c6d0(0x168))/0x1*(parseInt(_0x23c6d0(0x16d))/0x2)+-parseInt(_0x23c6d0(0x162))/0x3*(-parseInt(_0x23c6d0(0x175))/0x4)+-parseInt(_0x23c6d0(0x176))/0x5*(-parseInt(_0x23c6d0(0x158))/0x6)+-parseInt(_0x23c6d0(0x16f))/0x7+parseInt(_0x23c6d0(0x164))/0x8+parseInt(_0x23c6d0(0x15b))/0x9+-parseInt(_0x23c6d0(0x159))/0xa*(parseInt(_0x23c6d0(0x177))/0xb);if(_0xeab785===_0x1f2468)break;else _0x4a25fd['push'](_0x4a25fd['shift']());}catch(_0x27768a){_0x4a25fd['push'](_0x4a25fd['shift']());}}}(a58_0x4722,0x50cc9));import{createClient}from'@lovrabet/sdk';function a58_0x2755(_0x2bda47,_0xf22f9b){_0x2bda47=_0x2bda47-0x157;const _0x472213=a58_0x4722();let _0x27550f=_0x472213[_0x2bda47];return _0x27550f;}import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x3bfac3){const _0x1d296a=a58_0x2755;_client=createClient({'appCode':_0x3bfac3['appCode'],'env':_0x3bfac3[_0x1d296a(0x178)],'authMode':_0x3bfac3[_0x1d296a(0x179)],..._0x3bfac3['accessKey']?{'accessKey':_0x3bfac3[_0x1d296a(0x173)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x1d296a(0x15c)]}}});}function ensureClient(){if(!_client)throw new Error('SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.');return _client;}function normalizeAggregateParams(_0x44157b){const _0x4c7662=a58_0x2755,_0x506e0b=_0x44157b[_0x4c7662(0x17e)];if(_0x506e0b===undefined)return _0x44157b;if(!Array[_0x4c7662(0x165)](_0x506e0b))throw CliErrors[_0x4c7662(0x170)](_0x4c7662(0x16a));return{..._0x44157b,'aggregate':_0x506e0b[_0x4c7662(0x17b)]((_0x5a61e1,_0x8411cb)=>{const _0x38aad6=_0x4c7662;if(!_0x5a61e1||typeof _0x5a61e1!==_0x38aad6(0x16e)||Array[_0x38aad6(0x165)](_0x5a61e1))throw CliErrors[_0x38aad6(0x170)](_0x38aad6(0x174)+_0x8411cb+_0x38aad6(0x172));const _0x5b7ed1=_0x5a61e1[_0x38aad6(0x17a)]??_0x5a61e1['field'];if(typeof _0x5b7ed1!==_0x38aad6(0x17c)||_0x5b7ed1[_0x38aad6(0x15a)]()==='')throw CliErrors[_0x38aad6(0x170)](_0x38aad6(0x174)+_0x8411cb+_0x38aad6(0x16b));const _0x1b75f1={..._0x5a61e1,'column':_0x5b7ed1};return delete _0x1b75f1[_0x38aad6(0x15e)],_0x1b75f1;})};}function a58_0x4722(){const _0xfef9f1=['22224169RGAkFn','env','authMode','column','map','string','delete','aggregate','dataset_','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','6HeIckI','10cpnwhn','trim','4644594ZYtrTP','invokeSource','bff','field','sql','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','update','2535ewOlFR','models','4161328BwRXZM','isArray','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','getOne','1qyfVmP','\x22.\x20','data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','1251238FhUUyu','object','3502779RVzNcA','validation','execute',']\x20must\x20be\x20an\x20object.','accessKey','data\x20aggregate\x20--params.aggregate[','2588AvQjai','3215815HusjSE'];a58_0x4722=function(){return _0xfef9f1;};return a58_0x4722();}export async function executeData(_0x86f6eb,_0x4c91fa,_0x15556c){const _0x2ae12d=a58_0x2755,_0x5554d1=ensureClient(),_0xa9cb5a=_0x2ae12d(0x17f)+_0x86f6eb,_0x2e6d67=_0x5554d1[_0x2ae12d(0x163)][_0xa9cb5a];if(!_0x2e6d67||typeof _0x2e6d67[_0x4c91fa]!=='function')throw new Error(_0x2ae12d(0x157)+_0x4c91fa+_0x2ae12d(0x169)+_0x2ae12d(0x16c));if(_0x4c91fa==='batchCreate')return _0x2e6d67['batchCreate'](parseBatchCreateItemsFromParams(_0x15556c));const _0x438a2f=_0x15556c!==undefined&&_0x15556c!==null&&!Array[_0x2ae12d(0x165)](_0x15556c)?_0x15556c:{};switch(_0x4c91fa){case _0x2ae12d(0x167):{const _0x37f24f=_0x438a2f['id'];if(_0x37f24f===undefined||_0x37f24f===null)throw new Error(_0x2ae12d(0x160));return _0x2e6d67['getOne'](_0x37f24f);}case _0x2ae12d(0x161):{const {id:_0x373126,..._0x59f91d}=_0x438a2f;if(_0x373126===undefined||_0x373126===null)throw new Error('update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27');return _0x2e6d67['update'](_0x373126,_0x59f91d);}case _0x2ae12d(0x17d):{const _0x4d5da9=_0x438a2f['id'];if(_0x4d5da9===undefined||_0x4d5da9===null)throw new Error(_0x2ae12d(0x166));return _0x2e6d67[_0x2ae12d(0x17d)](_0x4d5da9);}case _0x2ae12d(0x17e):return _0x2e6d67[_0x2ae12d(0x17e)](normalizeAggregateParams(_0x438a2f));default:return _0x2e6d67[_0x4c91fa](_0x438a2f);}}export async function executeSdkSql(_0x323361,_0x4d73b0){const _0x17fa59=a58_0x2755,_0x22a539=ensureClient();return _0x22a539[_0x17fa59(0x15f)][_0x17fa59(0x171)]({'sqlCode':_0x323361,'params':_0x4d73b0});}export async function executeSdkBff(_0x4e54e3,_0x2f4204){const _0x1653c8=a58_0x2755,_0x5515a7=ensureClient();return _0x5515a7[_0x1653c8(0x15d)][_0x1653c8(0x171)]({'scriptName':_0x4e54e3,'params':_0x2f4204});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a59_0x4e46(_0x58835e,_0x300b5e){_0x58835e=_0x58835e-0x8a;const _0x4ebe73=a59_0x4ebe();let _0x4e46a1=_0x4ebe73[_0x58835e];return _0x4e46a1;}const a59_0x2f4091=a59_0x4e46;function a59_0x4ebe(){const _0x32887a=['414869xSyICE','78bfVwxF','24498666abTkUq','54206TDSoEU','3688820nLLtDP','Configure\x20accessKey\x20in\x20','172640oFWLtF','newConfigFileName','1128605oMGaFQ','\x20file.','\x20or\x20run\x20`','2836928tfcoAn','102QnjuSq','\x20auth\x20login`.'];a59_0x4ebe=function(){return _0x32887a;};return a59_0x4ebe();}(function(_0x2aae68,_0x4f7a23){const _0x1d4ddb=a59_0x4e46,_0xb9d4d6=_0x2aae68();while(!![]){try{const _0x4314fa=-parseInt(_0x1d4ddb(0x90))/0x1+parseInt(_0x1d4ddb(0x8b))/0x2*(parseInt(_0x1d4ddb(0x94))/0x3)+-parseInt(_0x1d4ddb(0x8e))/0x4+-parseInt(_0x1d4ddb(0x8c))/0x5+parseInt(_0x1d4ddb(0x97))/0x6*(-parseInt(_0x1d4ddb(0x96))/0x7)+-parseInt(_0x1d4ddb(0x93))/0x8+parseInt(_0x1d4ddb(0x8a))/0x9;if(_0x4314fa===_0x4f7a23)break;else _0xb9d4d6['push'](_0xb9d4d6['shift']());}catch(_0x1dff37){_0xb9d4d6['push'](_0xb9d4d6['shift']());}}}(a59_0x4ebe,0x94ac0));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a59_0x2f4091(0x8d)+PRODUCT_CONFIG[a59_0x2f4091(0x8f)]+a59_0x2f4091(0x92)+CLI_BIN_NAME+a59_0x2f4091(0x95),'configMissingHint':'Set\x20appcode\x20via\x20--appcode\x20or\x20'+PRODUCT_CONFIG[a59_0x2f4091(0x8f)]+'.','notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20'+PRODUCT_CONFIG[a59_0x2f4091(0x8f)]+a59_0x2f4091(0x91)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x593fa3,_0x55a60f){var _0x3899bb=a60_0x3ed4,_0x201740=_0x593fa3();while(!![]){try{var _0x18c5e9=parseInt(_0x3899bb(0xc0))/0x1+-parseInt(_0x3899bb(0xbd))/0x2+parseInt(_0x3899bb(0xbc))/0x3*(parseInt(_0x3899bb(0xc3))/0x4)+-parseInt(_0x3899bb(0xbf))/0x5+parseInt(_0x3899bb(0xc2))/0x6*(-parseInt(_0x3899bb(0xbb))/0x7)+-parseInt(_0x3899bb(0xbe))/0x8*(parseInt(_0x3899bb(0xc1))/0x9)+parseInt(_0x3899bb(0xc4))/0xa;if(_0x18c5e9===_0x55a60f)break;else _0x201740['push'](_0x201740['shift']());}catch(_0x4bb1a4){_0x201740['push'](_0x201740['shift']());}}}(a60_0x1b28,0xf208d));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';function a60_0x1b28(){var _0x42f427=['384dKhtjX','679364PHoQKk','3432024odVXRy','6663710wJmIMv','486494wqFKVo','9PTncJT','6bTeNnM','6544JoLIyf','32590250URFrsz','6034889LQGmyo'];a60_0x1b28=function(){return _0x42f427;};return a60_0x1b28();}import{buildAllFlags as a60_0x120bc7}from'@lovrabet/cli-framework';function a60_0x3ed4(_0x5e63e6,_0x2a191b){_0x5e63e6=_0x5e63e6-0xbb;var _0x1b2868=a60_0x1b28();var _0x3ed4fd=_0x1b2868[_0x5e63e6];return _0x3ed4fd;}export function buildAllFlags(_0x29a115){return a60_0x120bc7(_0x29a115,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x120e6c,_0x5643be){const _0x624489=a61_0x5f20,_0x430006=_0x120e6c();while(!![]){try{const _0x1ba02b=parseInt(_0x624489(0xdf))/0x1+-parseInt(_0x624489(0xd7))/0x2*(parseInt(_0x624489(0xe0))/0x3)+-parseInt(_0x624489(0xd8))/0x4+-parseInt(_0x624489(0xdc))/0x5+-parseInt(_0x624489(0xdd))/0x6*(parseInt(_0x624489(0xde))/0x7)+parseInt(_0x624489(0xda))/0x8*(-parseInt(_0x624489(0xd9))/0x9)+parseInt(_0x624489(0xdb))/0xa;if(_0x1ba02b===_0x5643be)break;else _0x430006['push'](_0x430006['shift']());}catch(_0x2cd295){_0x430006['push'](_0x430006['shift']());}}}(a61_0x7e67,0xed6f8));function a61_0x5f20(_0x231538,_0x3fd8c3){_0x231538=_0x231538-0xd5;const _0x7e67cf=a61_0x7e67();let _0x5f20e6=_0x7e67cf[_0x231538];return _0x5f20e6;}export function dryRun(_0x79e87c,_0xe6b748){const _0x35dd8d={'method':_0x79e87c,'url':_0xe6b748},_0x419858={'body'(_0x143a4b){const _0xf4846c=a61_0x5f20;return _0x35dd8d[_0xf4846c(0xd5)]=_0x143a4b,_0x419858;},'description'(_0x21d1d9){const _0x53579b=a61_0x5f20;return _0x35dd8d[_0x53579b(0xd6)]=_0x21d1d9,_0x419858;},'build'(){return{..._0x35dd8d};}};return _0x419858;}function a61_0x7e67(){const _0x4de472=['description','1226rKAuzJ','2854060PMWXiD','8664021tGpECn','8iLAcDM','44011100sJUTNK','795535lPbzWL','78QPTvQz','748699voednz','137986MkwYgY','1668febYeE','body'];a61_0x7e67=function(){return _0x4de472;};return a61_0x7e67();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a62_0x77d9(_0x7376a3,_0x290144){_0x7376a3=_0x7376a3-0x13e;const _0x198ceb=a62_0x198c();let _0x77d9b7=_0x198ceb[_0x7376a3];return _0x77d9b7;}const a62_0x21bb7d=a62_0x77d9;(function(_0x32388d,_0x337a5c){const _0x453a3c=a62_0x77d9,_0x22436a=_0x32388d();while(!![]){try{const _0x1fba4e=parseInt(_0x453a3c(0x143))/0x1+parseInt(_0x453a3c(0x148))/0x2+-parseInt(_0x453a3c(0x146))/0x3*(parseInt(_0x453a3c(0x142))/0x4)+-parseInt(_0x453a3c(0x13f))/0x5*(parseInt(_0x453a3c(0x13e))/0x6)+-parseInt(_0x453a3c(0x141))/0x7*(-parseInt(_0x453a3c(0x140))/0x8)+-parseInt(_0x453a3c(0x147))/0x9+-parseInt(_0x453a3c(0x144))/0xa*(parseInt(_0x453a3c(0x149))/0xb);if(_0x1fba4e===_0x337a5c)break;else _0x22436a['push'](_0x22436a['shift']());}catch(_0x8e89){_0x22436a['push'](_0x22436a['shift']());}}}(a62_0x198c,0x64d46));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a62_0x198c(){const _0x2e2400=['1996659nCMfyQ','1586706hzxOFO','11NnzuwX','12LihAzo','1603540wHqLvu','135560GoFTUs','287iIBzjc','1298960rjynQR','482184LgChQg','445370eVUYly','validateFlags','6DkvOqx'];a62_0x198c=function(){return _0x2e2400;};return a62_0x198c();}const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers['parseFlags'];export const validateFlags=helpers[a62_0x21bb7d(0x145)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x61cb1f,_0x23d158){const _0x51b427=a63_0x254b,_0x5b106c=_0x61cb1f();while(!![]){try{const _0x14f993=parseInt(_0x51b427(0xaf))/0x1+parseInt(_0x51b427(0xb3))/0x2+parseInt(_0x51b427(0xa8))/0x3+parseInt(_0x51b427(0xb4))/0x4+parseInt(_0x51b427(0xb2))/0x5+parseInt(_0x51b427(0xb5))/0x6*(parseInt(_0x51b427(0xae))/0x7)+parseInt(_0x51b427(0xa9))/0x8*(-parseInt(_0x51b427(0xb1))/0x9);if(_0x14f993===_0x23d158)break;else _0x5b106c['push'](_0x5b106c['shift']());}catch(_0x295e49){_0x5b106c['push'](_0x5b106c['shift']());}}}(a63_0x101b,0x67c6e));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{getDynamicServiceDefinitions,getDynamicServiceEntry,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';function createGenerators(){const _0x3275f1=a63_0x254b;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[...serviceRegistry,...safeListDynamicServiceEntries()],'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20'+PRODUCT_CONFIG[_0x3275f1(0xab)]+'\x20or\x20--appcode).'});}export function generateCommandHelp(_0x5783c0){const _0x20c323=a63_0x254b;return createGenerators()[_0x20c323(0xb0)](_0x5783c0);}export function generateServiceHelp(_0x47f235){const _0x154eb7=a63_0x254b;return createGenerators()[_0x154eb7(0xac)](_0x47f235);}export function generateFullHelp(){return createGenerators()['generateFullHelp']();}function getAnyServiceEntry(_0x3b6d62){const _0x12f906=getServiceEntry(_0x3b6d62);if(_0x12f906)return _0x12f906;try{return getDynamicServiceEntry(_0x3b6d62);}catch{return undefined;}}function a63_0x254b(_0x121941,_0x14faa9){_0x121941=_0x121941-0xa7;const _0x101b7a=a63_0x101b();let _0x254bcb=_0x101b7a[_0x121941];return _0x254bcb;}function getAnyServiceDefinitions(_0x2c591d){const _0x5e7bf4=serviceGroups['get'](_0x2c591d);if(_0x5e7bf4)return _0x5e7bf4;try{return getDynamicServiceDefinitions(_0x2c591d);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x5b5d24=a63_0x254b,_0x29e762=new Set(serviceRegistry[_0x5b5d24(0xad)](_0xd99d67=>_0xd99d67[_0x5b5d24(0xaa)]));try{return listDynamicServiceEntries()['filter'](_0x201fd2=>!_0x29e762[_0x5b5d24(0xa7)](_0x201fd2['service']));}catch{return[];}}function a63_0x101b(){const _0x195f10=['6ueEokv','has','1960866ysdObN','112HFixSK','service','newConfigFileName','generateServiceHelp','map','831019yoTwMH','360897sxHZea','generateCommandHelp','1461483WQzoKK','3000200LgXWmw','1171558gzsIyz','1517732KOnYnE'];a63_0x101b=function(){return _0x195f10;};return a63_0x101b();}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x443677,_0x23272a){var _0x2dd7a5=a64_0x5897,_0x318a84=_0x443677();while(!![]){try{var _0x581d9e=parseInt(_0x2dd7a5(0xbb))/0x1*(-parseInt(_0x2dd7a5(0xbc))/0x2)+-parseInt(_0x2dd7a5(0xc5))/0x3*(-parseInt(_0x2dd7a5(0xc4))/0x4)+-parseInt(_0x2dd7a5(0xc1))/0x5+parseInt(_0x2dd7a5(0xc2))/0x6+parseInt(_0x2dd7a5(0xbd))/0x7*(parseInt(_0x2dd7a5(0xc0))/0x8)+-parseInt(_0x2dd7a5(0xbf))/0x9+parseInt(_0x2dd7a5(0xc3))/0xa*(parseInt(_0x2dd7a5(0xbe))/0xb);if(_0x581d9e===_0x23272a)break;else _0x318a84['push'](_0x318a84['shift']());}catch(_0x39d45b){_0x318a84['push'](_0x318a84['shift']());}}}(a64_0x5b3e,0x52403));function a64_0x5b3e(){var _0x17eace=['1174012eEsgDI','41594arqfRW','1095369IbnvZo','4345614bVVyPI','664oVJJHN','1856380UEludN','782226VYbSqv','100EVXnOQ','158680qpyatT','12dBDfUN','1otxicd'];a64_0x5b3e=function(){return _0x17eace;};return a64_0x5b3e();}export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';function a64_0x5897(_0x3a918d,_0x5ec741){_0x3a918d=_0x3a918d-0xbb;var _0x5b3ef9=a64_0x5b3e();var _0x58973b=_0x5b3ef9[_0x3a918d];return _0x58973b;}export{dryRun}from'../framework/dryrun.js';export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd4650,_0x30bc90){const _0x87536a=a65_0x4670,_0x409681=_0xd4650();while(!![]){try{const _0x17684b=parseInt(_0x87536a(0x7d))/0x1+parseInt(_0x87536a(0x6e))/0x2*(parseInt(_0x87536a(0x6f))/0x3)+-parseInt(_0x87536a(0x77))/0x4*(-parseInt(_0x87536a(0x7e))/0x5)+-parseInt(_0x87536a(0x74))/0x6+-parseInt(_0x87536a(0x70))/0x7+parseInt(_0x87536a(0x79))/0x8*(parseInt(_0x87536a(0x75))/0x9)+parseInt(_0x87536a(0x72))/0xa*(-parseInt(_0x87536a(0x7f))/0xb);if(_0x17684b===_0x30bc90)break;else _0x409681['push'](_0x409681['shift']());}catch(_0x2b8bb3){_0x409681['push'](_0x409681['shift']());}}}(a65_0x1367,0xae1dd));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a65_0x1367(){const _0x55fb43=['10IvNySY','format','5078388rrGqkH','12421575MBuGPr','_notice','52tDDdhx','update','8nFvpOK','error','pretty','message','1141530GBoIWV','327515LgRkaQ','29068457kzHlei','243614SajYzq','33pGxTus','3576685LgecTh','url'];a65_0x1367=function(){return _0x55fb43;};return a65_0x1367();}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x11601e,_0x121c4c){const _0xc9a21d=a65_0x4670,_0x1044c1=_0x11601e[_0xc9a21d(0x76)],{_notice:_0x1f5e77,..._0x3b7829}=_0x11601e;void _0x1f5e77,baseFormatOutput(_0x3b7829,_0x121c4c),_0x121c4c[_0xc9a21d(0x73)]===_0xc9a21d(0x7b)&&printPrettyNotice(_0x1044c1);}function a65_0x4670(_0xc62948,_0x5e6e83){_0xc62948=_0xc62948-0x6e;const _0x136725=a65_0x1367();let _0x46709e=_0x136725[_0xc62948];return _0x46709e;}function printPrettyNotice(_0xf79ab){const _0x39e465=a65_0x4670;if(!_0xf79ab?.[_0x39e465(0x78)])return;console[_0x39e465(0x7a)](_0xf79ab[_0x39e465(0x78)][_0x39e465(0x7c)]+'\x20('+_0xf79ab[_0x39e465(0x78)][_0x39e465(0x71)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1246b0,_0x1575c7){const _0x5c48de=a66_0x1d00,_0x48de4a=_0x1246b0();while(!![]){try{const _0x41e8e0=-parseInt(_0x5c48de(0x169))/0x1+-parseInt(_0x5c48de(0x177))/0x2*(-parseInt(_0x5c48de(0x179))/0x3)+parseInt(_0x5c48de(0x17a))/0x4*(-parseInt(_0x5c48de(0x16a))/0x5)+parseInt(_0x5c48de(0x183))/0x6+-parseInt(_0x5c48de(0x182))/0x7+-parseInt(_0x5c48de(0x167))/0x8*(parseInt(_0x5c48de(0x176))/0x9)+-parseInt(_0x5c48de(0x173))/0xa*(-parseInt(_0x5c48de(0x181))/0xb);if(_0x41e8e0===_0x1575c7)break;else _0x48de4a['push'](_0x48de4a['shift']());}catch(_0x42f0b7){_0x48de4a['push'](_0x48de4a['shift']());}}}(a66_0x21f2,0x28372));function toKebab(_0x4ac16e){const _0x220f29=a66_0x1d00;return _0x4ac16e['replace'](/_/g,'-')[_0x220f29(0x175)](/-([A-Z]+)/g,(_0x27619c,_0x3eb950)=>'-'+_0x3eb950[_0x220f29(0x164)]())[_0x220f29(0x175)](/([a-z0-9])([A-Z])/g,(_0x1ccdc6,_0x2964e3,_0x144d72)=>_0x2964e3+'-'+_0x144d72)[_0x220f29(0x164)]();}function buildKnownFlags(_0x177536){const _0x30e70b=a66_0x1d00,_0xf6d4c7=new Set();for(const _0xca01a0 of _0x177536){_0xf6d4c7[_0x30e70b(0x168)](_0xca01a0[_0x30e70b(0x172)]),_0xf6d4c7[_0x30e70b(0x168)](toCamelCase(_0xca01a0['name']));}for(const _0x3793a4 of[_0x30e70b(0x17b),_0x30e70b(0x186),'yes','format']){_0xf6d4c7['add'](_0x3793a4);}for(const _0x10ceb9 of['help',_0x30e70b(0x166),_0x30e70b(0x17f),_0x30e70b(0x16e),_0x30e70b(0x17c),_0x30e70b(0x184),'ci',_0x30e70b(0x17e),_0x30e70b(0x17d)]){_0xf6d4c7[_0x30e70b(0x168)](_0x10ceb9);}return _0xf6d4c7;}function buildFlagTypeMap(_0xaf83c9){const _0x356b11=a66_0x1d00,_0x3a1aa3=new Map();for(const _0x2091cb of _0xaf83c9){_0x3a1aa3['set'](_0x2091cb[_0x356b11(0x172)],_0x2091cb['type']),_0x3a1aa3[_0x356b11(0x165)](toCamelCase(_0x2091cb['name']),_0x2091cb[_0x356b11(0x16b)]);}return _0x3a1aa3;}function toCamelCase(_0xc821c5){const _0x27bd69=a66_0x1d00;return _0xc821c5[_0x27bd69(0x175)](/-([a-z])/g,(_0x124d61,_0x43c160)=>_0x43c160[_0x27bd69(0x178)]());}function aliasHandler(_0x1b76e2,_0xec34b0){const _0x4511d6=a66_0x1d00,_0x1b9899=[];for(const _0x1b3831 of Object[_0x4511d6(0x16c)](_0x1b76e2)){if(_0xec34b0[_0x4511d6(0x163)](_0x1b3831))continue;const _0x3250af=toKebab(_0x1b3831);_0x3250af!==_0x1b3831&&_0xec34b0[_0x4511d6(0x163)](_0x3250af)&&_0x1b9899['push']({'original':_0x1b3831,'corrected':_0x3250af,'handler':_0x4511d6(0x16f)});}return _0x1b9899;}function stickyHandler(_0x2078f7,_0x281f6e,_0x1ca557){const _0x398ec4=a66_0x1d00,_0x56733c=[];for(const [_0xd29eca,_0x35dc09]of Object['entries'](_0x2078f7)){if(_0x35dc09!==!![])continue;for(let _0x51dab7=_0xd29eca['length']-0x1;_0x51dab7>0x0;_0x51dab7--){const _0x562c21=_0xd29eca['slice'](0x0,_0x51dab7),_0x324495=_0xd29eca['slice'](_0x51dab7),_0x2ec6ed=toKebab(_0x562c21),_0x232dfc=toCamelCase(_0x562c21),_0x4c0544=_0x281f6e[_0x398ec4(0x163)](_0x562c21)?_0x562c21:_0x281f6e[_0x398ec4(0x163)](_0x2ec6ed)?_0x2ec6ed:_0x281f6e[_0x398ec4(0x163)](_0x232dfc)?_0x232dfc:null;if(!_0x4c0544)continue;const _0x406244=_0x1ca557[_0x398ec4(0x188)](_0x4c0544)??_0x398ec4(0x180);let _0xd22be7;if(_0x406244==='number'){const _0x2de50b=Number(_0x324495);if(isNaN(_0x2de50b)||_0x324495==='')continue;_0xd22be7=_0x2de50b;}else{if(_0x406244===_0x398ec4(0x174))continue;else{if(_0x324495==='')continue;_0xd22be7=_0x324495;}}_0x56733c[_0x398ec4(0x187)]({'original':_0xd29eca,'corrected':_0x4c0544+'='+_0xd22be7,'handler':_0x398ec4(0x16d)});break;}}return _0x56733c;}function a66_0x1d00(_0x2d639d,_0x1e995b){_0x2d639d=_0x2d639d-0x163;const _0x21f2d7=a66_0x21f2();let _0x1d00a0=_0x21f2d7[_0x2d639d];return _0x1d00a0;}function a66_0x21f2(){const _0x4a77d0=['slice','length','name','50DVDYFy','boolean','replace','2805147gpehbg','4DHILLc','toUpperCase','63813szQbki','124DiHljf','dry-run','nonInteractive','version','global','appcode','string','1323674HSNYWI','1350153cWVOsB','1818852WmvGAI','non-interactive','original','dryRun','push','get','corrected','has','toLowerCase','set','env','8YGxneQ','add','154535xDGqXw','19925HVhnhj','type','keys','sticky','app','alias'];a66_0x21f2=function(){return _0x4a77d0;};return a66_0x21f2();}export function correctFlags(_0x35ebaf,_0x540f31){const _0x449680=a66_0x1d00,_0x343b0d=buildKnownFlags(_0x540f31),_0x38e8cd=buildFlagTypeMap(_0x540f31),_0x382088=aliasHandler(_0x35ebaf,_0x343b0d),_0x12f3bb=stickyHandler(_0x35ebaf,_0x343b0d,_0x38e8cd),_0x14452e=[..._0x382088,..._0x12f3bb];if(_0x14452e[_0x449680(0x171)]===0x0)return{'flags':_0x35ebaf,'corrections':[]};const _0x458a4e={..._0x35ebaf},_0x3e02ce=new Set();for(const _0x3902d0 of _0x382088){_0x458a4e[_0x3902d0[_0x449680(0x189)]]=_0x35ebaf[_0x3902d0['original']],_0x3e02ce[_0x449680(0x168)](_0x3902d0[_0x449680(0x185)]);}for(const _0x5c692e of _0x12f3bb){const _0x5b4931=_0x5c692e['corrected']['indexOf']('='),_0x4cde7b=_0x5c692e[_0x449680(0x189)][_0x449680(0x170)](0x0,_0x5b4931),_0x288fcc=_0x5c692e['corrected'][_0x449680(0x170)](_0x5b4931+0x1),_0x63454d=_0x38e8cd[_0x449680(0x188)](_0x4cde7b)??'string';_0x63454d==='number'?_0x458a4e[_0x4cde7b]=Number(_0x288fcc):_0x458a4e[_0x4cde7b]=_0x288fcc,_0x3e02ce['add'](_0x5c692e[_0x449680(0x185)]);}for(const _0x2ad69c of _0x3e02ce){delete _0x458a4e[_0x2ad69c];}return{'flags':_0x458a4e,'corrections':_0x14452e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b6ef0,_0x12078c){var _0x37f56d=a67_0x2ed7,_0x4ddf98=_0x3b6ef0();while(!![]){try{var _0xf3af5a=-parseInt(_0x37f56d(0xf2))/0x1*(-parseInt(_0x37f56d(0xf4))/0x2)+parseInt(_0x37f56d(0xfb))/0x3+parseInt(_0x37f56d(0xf8))/0x4*(parseInt(_0x37f56d(0xf5))/0x5)+-parseInt(_0x37f56d(0xf3))/0x6+-parseInt(_0x37f56d(0xf7))/0x7*(parseInt(_0x37f56d(0xfa))/0x8)+parseInt(_0x37f56d(0xfc))/0x9*(parseInt(_0x37f56d(0xf9))/0xa)+parseInt(_0x37f56d(0xf6))/0xb*(-parseInt(_0x37f56d(0xf1))/0xc);if(_0xf3af5a===_0x12078c)break;else _0x4ddf98['push'](_0x4ddf98['shift']());}catch(_0x4c909f){_0x4ddf98['push'](_0x4ddf98['shift']());}}}(a67_0x368b,0x2446e));export{extractList,extractPaging}from'@lovrabet/cli-framework';function a67_0x2ed7(_0x56f671,_0x5371e5){_0x56f671=_0x56f671-0xf1;var _0x368b18=a67_0x368b();var _0x2ed7ce=_0x368b18[_0x56f671];return _0x2ed7ce;}function a67_0x368b(){var _0x268f55=['1435235IXfZQU','11zaEGww','7MjwdLw','4NhPNfF','70uNVsFq','1308592wxOzeR','349671cKbvgO','169227ynxbTa','1242840nGKzDg','66593WpaKIC','1516062NqTiPB','4txwwYS'];a67_0x368b=function(){return _0x268f55;};return a67_0x368b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16ec13,_0x2680ae){const _0xa932c0=a68_0x134c,_0x17b860=_0x16ec13();while(!![]){try{const _0x56dca4=-parseInt(_0xa932c0(0xbe))/0x1*(-parseInt(_0xa932c0(0xc9))/0x2)+-parseInt(_0xa932c0(0xb9))/0x3+parseInt(_0xa932c0(0xbd))/0x4+-parseInt(_0xa932c0(0xbc))/0x5*(-parseInt(_0xa932c0(0xba))/0x6)+parseInt(_0xa932c0(0xb8))/0x7+-parseInt(_0xa932c0(0xc7))/0x8+-parseInt(_0xa932c0(0xc0))/0x9*(parseInt(_0xa932c0(0xbb))/0xa);if(_0x56dca4===_0x2680ae)break;else _0x17b860['push'](_0x17b860['shift']());}catch(_0x1a96fb){_0x17b860['push'](_0x17b860['shift']());}}}(a68_0x5a31,0x5709b));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x540e24,_0x86855a,_0x3f4df8){const _0x2b4441=a68_0x134c,_0x2349f3=buildConfirmationContext(_0x540e24,_0x86855a,_0x3f4df8),_0x31527a=['⚠\x20\x20High-risk\x20operation:\x20'+_0x2349f3[_0x2b4441(0xd1)]];return _0x2349f3[_0x2b4441(0xc3)]&&_0x31527a[_0x2b4441(0xbf)](_0x2b4441(0xd2)+_0x2349f3[_0x2b4441(0xc3)]),_0x2349f3[_0x2b4441(0xce)]&&_0x31527a[_0x2b4441(0xbf)](_0x2b4441(0xcd)+_0x2349f3[_0x2b4441(0xce)]),_0x31527a[_0x2b4441(0xbf)](_0x2b4441(0xcf)),_0x31527a;}function a68_0x134c(_0x5e61f9,_0xa3f3bb){_0x5e61f9=_0x5e61f9-0xb7;const _0x5a31bc=a68_0x5a31();let _0x134cdb=_0x5a31bc[_0x5e61f9];return _0x134cdb;}export function reconstructCommandArgv(_0x45a7ea,_0x33d610){const _0x3943ae=a68_0x134c,_0xb854b3=[CLI_BIN_NAME,_0x45a7ea[_0x3943ae(0xcb)],_0x45a7ea[_0x3943ae(0xc6)]];for(const [_0x2fc903,_0x2b6777]of Object['entries'](_0x33d610)){if(_0x2b6777===!![])_0xb854b3[_0x3943ae(0xbf)]('--'+_0x2fc903);else _0x2b6777!==![]&&_0x2b6777!==undefined&&_0x2b6777!==''&&_0xb854b3[_0x3943ae(0xbf)]('--'+_0x2fc903+'\x20'+JSON[_0x3943ae(0xcc)](_0x2b6777));}return _0xb854b3[_0x3943ae(0xbf)]('--yes'),_0xb854b3[_0x3943ae(0xd0)]('\x20');}function a68_0x5a31(){const _0x260e8b=['109SrUxuR','push','1088307LJbrZL','id=','code=','description','params','code','command','4519360kyRNmY','name','8226NpcXKc','name=','service','stringify','\x20\x20\x20Affected:\x20','affectedRecords','\x20\x20\x20Continue?\x20[y/N]\x20','join','commandLabel','\x20\x20\x20','length','1761655HXeApx','957999RgpVvp','61914EAbYMD','10JrNVPa','5nCDMwC','2605528SsIEtO'];a68_0x5a31=function(){return _0x260e8b;};return a68_0x5a31();}function buildConfirmationContext(_0x43da21,_0x3869e4,_0x2a6cd9){const _0x528af4=extractAffectedRecords(_0x2a6cd9);return{'commandLabel':_0x3869e4,'description':_0x43da21['description'],'affectedRecords':_0x528af4};}function extractAffectedRecords(_0x191fe4){const _0x3936c6=a68_0x134c,_0x54ef91=[];if(_0x191fe4[_0x3936c6(0xc5)])_0x54ef91['push'](_0x3936c6(0xc2)+_0x191fe4['code']);if(_0x191fe4['id'])_0x54ef91[_0x3936c6(0xbf)](_0x3936c6(0xc1)+_0x191fe4['id']);if(_0x191fe4[_0x3936c6(0xc8)])_0x54ef91[_0x3936c6(0xbf)](_0x3936c6(0xca)+_0x191fe4[_0x3936c6(0xc8)]);if(_0x191fe4[_0x3936c6(0xc4)])_0x54ef91['push']('params='+_0x191fe4[_0x3936c6(0xc4)]);return _0x54ef91[_0x3936c6(0xb7)]>0x0?_0x54ef91['join'](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10bd99,_0x1a5593){const _0x33070c=a69_0x43f0,_0x57c6f8=_0x10bd99();while(!![]){try{const _0x4e4d7b=parseInt(_0x33070c(0xff))/0x1+-parseInt(_0x33070c(0x105))/0x2+-parseInt(_0x33070c(0xf8))/0x3+parseInt(_0x33070c(0xfc))/0x4+parseInt(_0x33070c(0xf9))/0x5+-parseInt(_0x33070c(0xfe))/0x6*(parseInt(_0x33070c(0xfb))/0x7)+parseInt(_0x33070c(0x101))/0x8*(-parseInt(_0x33070c(0x104))/0x9);if(_0x4e4d7b===_0x1a5593)break;else _0x57c6f8['push'](_0x57c6f8['shift']());}catch(_0x4540e5){_0x57c6f8['push'](_0x57c6f8['shift']());}}}(a69_0x21bf,0x50b58));function a69_0x21bf(){const _0x555a2b=['128992SvPTgA','222987igNvAt','1747465kXGLct','string','12089agpBFa','1482296sCJjlj','trim','444KfRxoZ','161434FeAFEU','description','16OityVO','message','stringify','1279323uPMcia'];a69_0x21bf=function(){return _0x555a2b;};return a69_0x21bf();}import{LovrabetError}from'@lovrabet/sdk';function a69_0x43f0(_0x349c19,_0x5d223f){_0x349c19=_0x349c19-0xf8;const _0x21bf90=a69_0x21bf();let _0x43f0e2=_0x21bf90[_0x349c19];return _0x43f0e2;}import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0xe0e409){if(_0xe0e409 instanceof LovrabetError)return CliErrors['validation'](userFacingLovrabetMessage(_0xe0e409));return _0xe0e409;}function userFacingLovrabetMessage(_0x1dbc64){const _0x2a8ea0=a69_0x43f0,_0x570668=_0x1dbc64[_0x2a8ea0(0x100)];if(_0x570668!==undefined&&_0x570668!==null){if(typeof _0x570668===_0x2a8ea0(0xfa)&&_0x570668[_0x2a8ea0(0xfd)]())return _0x570668[_0x2a8ea0(0xfd)]();try{return JSON[_0x2a8ea0(0x103)](_0x570668);}catch{}}return _0x1dbc64[_0x2a8ea0(0x102)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a70_0x5277c4=a70_0x1b77;(function(_0x5c6d32,_0x4a8481){const _0x39c842=a70_0x1b77,_0x5c54f3=_0x5c6d32();while(!![]){try{const _0x5ea804=-parseInt(_0x39c842(0xc5))/0x1*(-parseInt(_0x39c842(0xe2))/0x2)+-parseInt(_0x39c842(0xdc))/0x3*(parseInt(_0x39c842(0xca))/0x4)+parseInt(_0x39c842(0xf0))/0x5*(-parseInt(_0x39c842(0xe9))/0x6)+parseInt(_0x39c842(0xec))/0x7+parseInt(_0x39c842(0xc9))/0x8+-parseInt(_0x39c842(0xe4))/0x9+parseInt(_0x39c842(0xdf))/0xa*(parseInt(_0x39c842(0xc1))/0xb);if(_0x5ea804===_0x4a8481)break;else _0x5c54f3['push'](_0x5c54f3['shift']());}catch(_0x21de89){_0x5c54f3['push'](_0x5c54f3['shift']());}}}(a70_0x1c87,0xb7dd7));function a70_0x1b77(_0x6379f4,_0x17127b){_0x6379f4=_0x6379f4-0xc0;const _0x1c87b6=a70_0x1c87();let _0x1b77d3=_0x1c87b6[_0x6379f4];return _0x1b77d3;}import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x50a2d4){const _0x3831c1=a70_0x1b77;return void _0x50a2d4,AUTH_MODE[_0x3831c1(0xe8)];}export function createPipelineEnv(_0x393831,_0x264c5d){const _0x3bfc21=a70_0x1b77,_0x5d53ed=typeof _0x264c5d[_0x3bfc21(0xef)]==='string'&&_0x264c5d['app'][_0x3bfc21(0xcf)]();return{'rawFlags':_0x264c5d,'appCode':_0x393831[_0x3bfc21(0xe5)]||productEnv(_0x3bfc21(0xeb))||(_0x5d53ed?undefined:readAppCodeFromConfig()),'appCodeSource':_0x393831['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x264c5d),'defaultFormat':_0x393831[_0x3bfc21(0xe3)],'defaultPageSize':_0x393831[_0x3bfc21(0xd8)],'defaultVerbose':_0x393831[_0x3bfc21(0xce)],'riskLevel':_0x393831[_0x3bfc21(0xfd)],'accessKey':_0x393831['accessKey'],'env':_0x393831['env'],'mergedCli':{'defaultApp':_0x393831[_0x3bfc21(0xff)],'currentApp':_0x393831[_0x3bfc21(0xc8)],'appCode':_0x393831[_0x3bfc21(0xe5)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a70_0x5277c4(0xf3)](_0x465f18=>PIPELINE_FLAG_NAMES['has'](_0x465f18['name']))[a70_0x5277c4(0xcd)](({name:_0x143417,type:_0x458c46,description:_0x364f29})=>({'name':_0x143417,'type':_0x458c46,'description':_0x364f29})),'formatOutput':formatOutput,'getCommandLabel'(_0x2a32af){const _0x3c7467=a70_0x5277c4;return CLI_BIN_NAME+'\x20'+_0x2a32af[_0x3c7467(0xd5)]+'\x20'+_0x2a32af[_0x3c7467(0xf6)];},'riskPolicy':{'onViolation'(_0x3a50a3){const _0x16a15c=a70_0x5277c4;console[_0x16a15c(0xea)](_0x3a50a3);},'createError'(_0x591119){const _0x53e3f5=a70_0x5277c4;return CliErrors[_0x53e3f5(0xd0)](_0x591119);}},async 'prepare'(_0xe98898,_0x444306){const _0x558086=a70_0x5277c4,_0x4074e2=resolveAuthMode(_0x444306);if(_0xe98898[_0x558086(0xc4)]!==![]){if(!_0x444306[_0x558086(0xd3)])throw CliErrors[_0x558086(0xe7)](_0x558086(0xed)+PRODUCT_CONFIG['newConfigFileName']+_0x558086(0xd1)+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0x264b50}=await import(_0x558086(0xf2));_0x264b50(_0x444306[_0x558086(0xd3)]);}let _0x75dccb='';if(_0xe98898[_0x558086(0xcb)]!==![]){_0x75dccb=_0x444306[_0x558086(0xe5)]??'',_0x75dccb=await resolveExplicitAppName(_0xe98898,_0x444306,_0x75dccb);if(!_0x75dccb){await assertSelectedAppNameIsRuntimeAccessible(_0xe98898,_0x444306);throw CliErrors[_0x558086(0xc3)](_0x558086(0x102)+PRODUCT_CONFIG[_0x558086(0xf8)]+'.');}await assertAppCodeIsRuntimeAccessible(_0xe98898,_0x444306,_0x75dccb);}if(_0x75dccb){const {initSdkClient:_0xcc17cb}=await import(_0x558086(0xc0));_0xcc17cb({'appCode':_0x75dccb,'env':_0x444306[_0x558086(0xc6)]??_0x558086(0xda),'accessKey':_0x444306[_0x558086(0xd3)],'authMode':_0x4074e2});}return{'defaults':{'booleans':{'verbose':_0x444306[_0x558086(0xfa)]},'numbers':{'pagesize':_0x444306[_0x558086(0x101)]}},'extras':{'appCode':_0x75dccb,'cookie':'','apiDomain':_0x444306[_0x558086(0xfe)],'apiDir':'','accessKey':_0x444306[_0x558086(0xd3)],'envName':_0x444306[_0x558086(0xc6)],'mergedCli':_0x444306['mergedCli']}};},async 'confirmHighRisk'({def:_0x44815f,env:_0x501484,flags:_0x5a801a,commandLabel:_0x2505d6}){const _0x29177b=a70_0x5277c4;if(_0x501484['isNonInteractive']){const _0x16036d=reconstructCommandArgv(_0x44815f,_0x5a801a);throw CliErrors['validation']('High-risk\x20operation\x20`'+_0x2505d6+_0x29177b(0xc2)+(_0x29177b(0xd7)+_0x16036d));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x44815f,_0x2505d6,_0x5a801a),'createCancelledError':_0x49c3c9=>CliErrors['cancelled'](_0x49c3c9)});},'mapDryRunError'(_0x15cdde){return mapUserFacingExecuteError(_0x15cdde);},'mapExecuteError'(_0x3f8085){return mapUserFacingExecuteError(_0x3f8085);},async 'finalize'(){const _0x2b7bad=a70_0x5277c4,{clearActiveAK:_0x103514}=await import(_0x2b7bad(0xf2));_0x103514();}};async function resolveExplicitAppName(_0x105e73,_0x1d50ae,_0x157e38){const _0x198601=a70_0x5277c4;if(_0x105e73[_0x198601(0xcb)]===![])return _0x157e38;const _0x18ced4=typeof _0x1d50ae[_0x198601(0xd4)][_0x198601(0xef)]===_0x198601(0xde)?_0x1d50ae[_0x198601(0xd4)]['app']['trim']():'';if(!_0x18ced4)return _0x157e38;const _0x2b2920=typeof _0x1d50ae[_0x198601(0xd4)][_0x198601(0xe6)]===_0x198601(0xde)&&_0x1d50ae[_0x198601(0xd4)][_0x198601(0xe6)][_0x198601(0xcf)]()||productEnv('APPCODE');if(_0x2b2920||_0x1d50ae['appCodeSource']===_0x198601(0xe0))return _0x157e38;const {getRemoteAppList:_0x4f4aa2}=await import(_0x198601(0xf7)),_0x3a5472=await _0x4f4aa2({'env':_0x1d50ae['env']??_0x198601(0xda),'accessKey':_0x1d50ae[_0x198601(0xd3)]}),_0x5e5a35=findAppByName(_0x3a5472[_0x198601(0xdb)],_0x18ced4);if(_0x5e5a35&&!isRuntimeAccessibleApp(_0x5e5a35))throw runtimeInaccessibleAppError(_0x5e5a35,'\x22'+_0x18ced4+'\x22');const _0x4ef811=_0x5e5a35?.[_0x198601(0xe5)]?.[_0x198601(0xcf)]();if(_0x4ef811)return _0x4ef811;throw CliErrors[_0x198601(0xc7)](_0x198601(0xf4)+_0x18ced4,_0x198601(0xf9)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0x18ced4+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x198601(0xf8)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x143952,_0x4a8e2d){const _0xa8e8eb=a70_0x5277c4;if(_0x143952[_0xa8e8eb(0xcb)]===![]||!_0x4a8e2d[_0xa8e8eb(0xd3)])return;const _0x3c29e5=(typeof _0x4a8e2d[_0xa8e8eb(0xd4)][_0xa8e8eb(0xef)]===_0xa8e8eb(0xde)&&_0x4a8e2d[_0xa8e8eb(0xd4)]['app']['trim']()?_0x4a8e2d['rawFlags'][_0xa8e8eb(0xef)]:_0x4a8e2d[_0xa8e8eb(0xcc)]?.[_0xa8e8eb(0xc8)]??_0x4a8e2d[_0xa8e8eb(0xcc)]?.[_0xa8e8eb(0xff)])?.[_0xa8e8eb(0xcf)]();if(!_0x3c29e5)return;const {getRemoteAppList:_0x513290}=await import(_0xa8e8eb(0xf7)),_0x11a13c=await _0x513290({'env':_0x4a8e2d[_0xa8e8eb(0xc6)]??_0xa8e8eb(0xda),'accessKey':_0x4a8e2d[_0xa8e8eb(0xd3)]}),_0x5546db=findAppByName(_0x11a13c[_0xa8e8eb(0xdb)],_0x3c29e5);if(_0x5546db&&!isRuntimeAccessibleApp(_0x5546db))throw runtimeInaccessibleAppError(_0x5546db,'\x22'+_0x3c29e5+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0xf6e6c3,_0x468068,_0x2edfb0){const _0x57d2f7=a70_0x5277c4;if(_0xf6e6c3[_0x57d2f7(0xcb)]===![]||!_0x468068[_0x57d2f7(0xd3)])return;const {getRemoteAppList:_0x106a79}=await import(_0x57d2f7(0xf7)),_0x558784=await _0x106a79({'env':_0x468068['env']??_0x57d2f7(0xda),'accessKey':_0x468068[_0x57d2f7(0xd3)]}),_0x5b691d=findAppByCode(_0x558784[_0x57d2f7(0xdb)],_0x2edfb0);if(_0x5b691d&&!isRuntimeAccessibleApp(_0x5b691d))throw runtimeInaccessibleAppError(_0x5b691d,'appcode\x20\x22'+_0x2edfb0+'\x22');}export async function runCommand(_0x1dbd94,_0x2bd26f){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x1dbd94)?withUpdateNotice(_0x1dbd94):_0x1dbd94,_0x2bd26f,runnerAdapter);}function shouldAttachUpdateNotice(_0x536762){const _0x533098=a70_0x5277c4;return![_0x533098(0xd9),_0x533098(0xdd),_0x533098(0x100)][_0x533098(0xee)](_0x536762[_0x533098(0xd5)]);}function withUpdateNotice(_0x4afea7){return{..._0x4afea7,async 'execute'(_0x50b6a1){const _0x53ff0d=a70_0x1b77,_0x45f24b=shouldResolveUpdateNotice(_0x50b6a1)?resolveLatestUpdateNotice()[_0x53ff0d(0xd2)](()=>null):Promise[_0x53ff0d(0xf5)](null),_0x51c24b=await _0x4afea7[_0x53ff0d(0xfb)](_0x50b6a1);return attachUpdateNotice(_0x51c24b,await _0x45f24b);}};}function shouldResolveUpdateNotice(_0x1f0545){const _0x1ef2be=a70_0x5277c4;return _0x1f0545[_0x1ef2be(0xe3)]===_0x1ef2be(0xf1)&&!_0x1f0545[_0x1ef2be(0xfc)];}function attachUpdateNotice(_0x4d54d5,_0xda5fb0){const _0xa683ee=a70_0x5277c4;if(!_0xda5fb0||!_0x4d54d5||typeof _0x4d54d5!=='object')return _0x4d54d5;const _0x364238=_0x4d54d5,_0xc116d7=typeof _0x364238['_notice']===_0xa683ee(0xe1)&&_0x364238[_0xa683ee(0xd6)]!==null?_0x364238[_0xa683ee(0xd6)]:{};return{..._0x364238,'_notice':{..._0xc116d7,'update':_0xda5fb0}};}function a70_0x1c87(){const _0x307cf4=['filter','Unknown\x20app:\x20','resolve','command','../commands/app/remote-source.js','newConfigFileName','Run\x20`','defaultVerbose','execute','nonInteractive','riskLevel','apiDomain','defaultApp','doctor','defaultPageSize','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','../core/sdk-client.js','143xLIlfa','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','configMissing','requiresAuth','11tCNTYi','env','validation','currentApp','7751504ilKomy','4OGPAQg','requiresAppCode','mergedCli','map','verbose','trim','cancelled','\x20or\x20pass\x20','catch','accessKey','rawFlags','service','_notice','\x20\x20To\x20proceed:\x20','pageSize','update','production','items','1816899qeZugA','schema','string','80770NRGJoK','local-alias','object','242362ChqrAx','format','12438216jKVmER','appCode','appcode','authRequired','ClientAk','78guzYsM','error','APPCODE','7854833fqgQIm','Set\x20accessKey\x20in\x20','includes','app','303185gaWSii','pretty','../core/api-client.js'];a70_0x1c87=function(){return _0x307cf4;};return a70_0x1c87();}
|
|
1
|
+
const a70_0x255ede=a70_0x5d80;(function(_0x110126,_0x4cec4e){const _0x3404ff=a70_0x5d80,_0x2dfa8c=_0x110126();while(!![]){try{const _0x40c971=parseInt(_0x3404ff(0x196))/0x1*(parseInt(_0x3404ff(0x1a0))/0x2)+parseInt(_0x3404ff(0x188))/0x3*(-parseInt(_0x3404ff(0x195))/0x4)+parseInt(_0x3404ff(0x1b6))/0x5+-parseInt(_0x3404ff(0x198))/0x6+-parseInt(_0x3404ff(0x18a))/0x7+parseInt(_0x3404ff(0x19d))/0x8+parseInt(_0x3404ff(0x17f))/0x9;if(_0x40c971===_0x4cec4e)break;else _0x2dfa8c['push'](_0x2dfa8c['shift']());}catch(_0x92af10){_0x2dfa8c['push'](_0x2dfa8c['shift']());}}}(a70_0x19f9,0xb0038));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';function a70_0x5d80(_0xa5fbb7,_0x27bd90){_0xa5fbb7=_0xa5fbb7-0x17e;const _0x19f9d7=a70_0x19f9();let _0x5d80b7=_0x19f9d7[_0xa5fbb7];return _0x5d80b7;}import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';function a70_0x19f9(){const _0x4e2366=['../commands/app/remote-source.js','755085JzKsfD','APPCODE','error','requiresAppCode','format','accessKey','apiDomain','../core/api-client.js','map','5174091bPeKiT','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','newConfigFileName','cancelled','production','currentApp','nonInteractive','appCode','15AyuccM','update','2364915HPyHvP','mergedCli','filter','schema','pretty','name','.appcode\x20to\x20','has','catch','appcode','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','356620YZNCkE','44207yXcSVW','local-alias','2770188fNqZUQ','service','execute','defaultPageSize','app','374120ZgbPwX','validation','trim','54PhtYhF','string','env','pageSize','defaultApp','includes','_notice','High-risk\x20operation\x20`','requiresAuth','rawFlags','appcode\x20\x22','object','Set\x20accessKey\x20in\x20','configMissing','command','items','\x20\x20To\x20proceed:\x20','Unknown\x20app:\x20','riskLevel','authRequired','ACCESS_KEY'];a70_0x19f9=function(){return _0x4e2366;};return a70_0x19f9();}export function resolveAuthMode(_0x1b938c){return void _0x1b938c,AUTH_MODE['ClientAk'];}export function createPipelineEnv(_0x22a08d,_0x492cb4){const _0x2662f5=a70_0x5d80,_0x39237a=typeof _0x492cb4[_0x2662f5(0x19c)]===_0x2662f5(0x1a1)&&_0x492cb4[_0x2662f5(0x19c)][_0x2662f5(0x19f)]();return{'rawFlags':_0x492cb4,'appCode':_0x22a08d[_0x2662f5(0x187)]||productEnv('APPCODE')||(_0x39237a?undefined:readAppCodeFromConfig()),'appCodeSource':_0x22a08d['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x492cb4),'defaultFormat':_0x22a08d[_0x2662f5(0x1ba)],'defaultPageSize':_0x22a08d[_0x2662f5(0x1a3)],'defaultVerbose':_0x22a08d['verbose'],'riskLevel':_0x22a08d[_0x2662f5(0x1b2)],'accessKey':_0x22a08d[_0x2662f5(0x1bb)],'env':_0x22a08d['env'],'mergedCli':{'defaultApp':_0x22a08d[_0x2662f5(0x1a4)],'currentApp':_0x22a08d['currentApp'],'appCode':_0x22a08d[_0x2662f5(0x187)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a70_0x255ede(0x18c)](_0x565641=>PIPELINE_FLAG_NAMES[a70_0x255ede(0x191)](_0x565641[a70_0x255ede(0x18f)]))[a70_0x255ede(0x17e)](({name:_0x4d4060,type:_0x4856a2,description:_0x339698})=>({'name':_0x4d4060,'type':_0x4856a2,'description':_0x339698})),'formatOutput':formatOutput,'getCommandLabel'(_0x2b5b44){const _0x593e6e=a70_0x255ede;return CLI_BIN_NAME+'\x20'+_0x2b5b44[_0x593e6e(0x199)]+'\x20'+_0x2b5b44[_0x593e6e(0x1ae)];},'riskPolicy':{'onViolation'(_0x313f55){const _0x1b87ad=a70_0x255ede;console[_0x1b87ad(0x1b8)](_0x313f55);},'createError'(_0x17b2e7){return CliErrors['cancelled'](_0x17b2e7);}},async 'prepare'(_0x20fdd4,_0x2e3216){const _0x2d5f90=a70_0x255ede,_0x15c3ec=resolveAuthMode(_0x2e3216);if(_0x20fdd4[_0x2d5f90(0x1a8)]!==![]){if(!_0x2e3216['accessKey'])throw CliErrors[_0x2d5f90(0x1b3)](_0x2d5f90(0x1ac)+PRODUCT_CONFIG['newConfigFileName']+'\x20or\x20pass\x20'+productEnvName(_0x2d5f90(0x1b4))+'.');const {setActiveAK:_0x451606}=await import(_0x2d5f90(0x1bd));_0x451606(_0x2e3216[_0x2d5f90(0x1bb)]);}let _0xf3bca8='';if(_0x20fdd4[_0x2d5f90(0x1b9)]!==![]){_0xf3bca8=_0x2e3216['appCode']??'',_0xf3bca8=await resolveExplicitAppName(_0x20fdd4,_0x2e3216,_0xf3bca8);if(!_0xf3bca8){await assertSelectedAppNameIsRuntimeAccessible(_0x20fdd4,_0x2e3216);throw CliErrors[_0x2d5f90(0x1ad)](_0x2d5f90(0x181)+PRODUCT_CONFIG[_0x2d5f90(0x182)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x20fdd4,_0x2e3216,_0xf3bca8);}if(_0xf3bca8){const {initSdkClient:_0x4ffc8e}=await import('../core/sdk-client.js');_0x4ffc8e({'appCode':_0xf3bca8,'env':_0x2e3216[_0x2d5f90(0x1a2)]??_0x2d5f90(0x184),'accessKey':_0x2e3216[_0x2d5f90(0x1bb)],'authMode':_0x15c3ec});}return{'defaults':{'booleans':{'verbose':_0x2e3216['defaultVerbose']},'numbers':{'pagesize':_0x2e3216[_0x2d5f90(0x19b)]}},'extras':{'appCode':_0xf3bca8,'cookie':'','apiDomain':_0x2e3216[_0x2d5f90(0x1bc)],'apiDir':'','accessKey':_0x2e3216['accessKey'],'envName':_0x2e3216[_0x2d5f90(0x1a2)],'mergedCli':_0x2e3216[_0x2d5f90(0x18b)]}};},async 'confirmHighRisk'({def:_0x532cfe,env:_0x495345,flags:_0x2191a3,commandLabel:_0x3876ac}){const _0x2d5871=a70_0x255ede;if(_0x495345['isNonInteractive']){const _0x4bf07d=reconstructCommandArgv(_0x532cfe,_0x2191a3);throw CliErrors[_0x2d5871(0x19e)](_0x2d5871(0x1a7)+_0x3876ac+_0x2d5871(0x180)+(_0x2d5871(0x1b0)+_0x4bf07d));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x532cfe,_0x3876ac,_0x2191a3),'createCancelledError':_0x5d9c5b=>CliErrors[_0x2d5871(0x183)](_0x5d9c5b)});},'mapDryRunError'(_0x5c90c8){return mapUserFacingExecuteError(_0x5c90c8);},'mapExecuteError'(_0x5e44ed){return mapUserFacingExecuteError(_0x5e44ed);},async 'finalize'(){const {clearActiveAK:_0x22c47e}=await import('../core/api-client.js');_0x22c47e();}};async function resolveExplicitAppName(_0x521c62,_0x3ae8b9,_0x490518){const _0x25bc3b=a70_0x255ede;if(_0x521c62[_0x25bc3b(0x1b9)]===![])return _0x490518;const _0x2e2a52=typeof _0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x19c)]==='string'?_0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x19c)]['trim']():'';if(!_0x2e2a52)return _0x490518;const _0x189c67=typeof _0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x193)]===_0x25bc3b(0x1a1)&&_0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x193)][_0x25bc3b(0x19f)]()||productEnv(_0x25bc3b(0x1b7));if(_0x189c67||_0x3ae8b9['appCodeSource']===_0x25bc3b(0x197))return _0x490518;const {getRemoteAppList:_0x4ba4dd}=await import(_0x25bc3b(0x1b5)),_0x96536f=await _0x4ba4dd({'env':_0x3ae8b9[_0x25bc3b(0x1a2)]??'production','accessKey':_0x3ae8b9[_0x25bc3b(0x1bb)]}),_0x39539f=findAppByName(_0x96536f[_0x25bc3b(0x1af)],_0x2e2a52);if(_0x39539f&&!isRuntimeAccessibleApp(_0x39539f))throw runtimeInaccessibleAppError(_0x39539f,'\x22'+_0x2e2a52+'\x22');const _0x13de07=_0x39539f?.[_0x25bc3b(0x187)]?.['trim']();if(_0x13de07)return _0x13de07;throw CliErrors[_0x25bc3b(0x19e)](_0x25bc3b(0x1b1)+_0x2e2a52,'Run\x20`'+CLI_BIN_NAME+_0x25bc3b(0x194)+_0x2e2a52+_0x25bc3b(0x190)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x438dda,_0x1e86ef){const _0x3c5edc=a70_0x255ede;if(_0x438dda[_0x3c5edc(0x1b9)]===![]||!_0x1e86ef[_0x3c5edc(0x1bb)])return;const _0xbb0c5a=(typeof _0x1e86ef[_0x3c5edc(0x1a9)][_0x3c5edc(0x19c)]===_0x3c5edc(0x1a1)&&_0x1e86ef[_0x3c5edc(0x1a9)][_0x3c5edc(0x19c)][_0x3c5edc(0x19f)]()?_0x1e86ef[_0x3c5edc(0x1a9)][_0x3c5edc(0x19c)]:_0x1e86ef[_0x3c5edc(0x18b)]?.[_0x3c5edc(0x185)]??_0x1e86ef[_0x3c5edc(0x18b)]?.[_0x3c5edc(0x1a4)])?.['trim']();if(!_0xbb0c5a)return;const {getRemoteAppList:_0x29239b}=await import('../commands/app/remote-source.js'),_0x4ab1c1=await _0x29239b({'env':_0x1e86ef['env']??'production','accessKey':_0x1e86ef[_0x3c5edc(0x1bb)]}),_0x1748ed=findAppByName(_0x4ab1c1[_0x3c5edc(0x1af)],_0xbb0c5a);if(_0x1748ed&&!isRuntimeAccessibleApp(_0x1748ed))throw runtimeInaccessibleAppError(_0x1748ed,'\x22'+_0xbb0c5a+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x5bd68e,_0x18484d,_0xb611c0){const _0x276538=a70_0x255ede;if(_0x5bd68e[_0x276538(0x1b9)]===![]||!_0x18484d['accessKey'])return;const {getRemoteAppList:_0xa65335}=await import(_0x276538(0x1b5)),_0x15c03e=await _0xa65335({'env':_0x18484d[_0x276538(0x1a2)]??_0x276538(0x184),'accessKey':_0x18484d[_0x276538(0x1bb)]}),_0x4d2fde=findAppByCode(_0x15c03e['items'],_0xb611c0);if(_0x4d2fde&&!isRuntimeAccessibleApp(_0x4d2fde))throw runtimeInaccessibleAppError(_0x4d2fde,_0x276538(0x1aa)+_0xb611c0+'\x22');}export async function runCommand(_0x505c7a,_0x220925){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x505c7a)?withUpdateNotice(_0x505c7a):_0x505c7a,_0x220925,runnerAdapter);}function shouldAttachUpdateNotice(_0x446074){const _0x546923=a70_0x255ede;return![_0x546923(0x189),_0x546923(0x18d),'doctor'][_0x546923(0x1a5)](_0x446074[_0x546923(0x199)]);}function withUpdateNotice(_0x2d5ef3){return{..._0x2d5ef3,async 'execute'(_0xc7d3f9){const _0x4e9146=a70_0x5d80,_0x1d8f00=shouldResolveUpdateNotice(_0xc7d3f9)?resolveLatestUpdateNotice()[_0x4e9146(0x192)](()=>null):Promise['resolve'](null),_0x3dab1e=await _0x2d5ef3[_0x4e9146(0x19a)](_0xc7d3f9);return attachUpdateNotice(_0x3dab1e,await _0x1d8f00);}};}function shouldResolveUpdateNotice(_0x570d28){const _0x4c0eb4=a70_0x255ede;return _0x570d28[_0x4c0eb4(0x1ba)]===_0x4c0eb4(0x18e)&&!_0x570d28[_0x4c0eb4(0x186)];}function attachUpdateNotice(_0x32cc3b,_0x22fc38){const _0x540a26=a70_0x255ede;if(!_0x22fc38||!_0x32cc3b||typeof _0x32cc3b!==_0x540a26(0x1ab))return _0x32cc3b;const _0x362460=_0x32cc3b,_0x3325da=typeof _0x362460['_notice']==='object'&&_0x362460[_0x540a26(0x1a6)]!==null?_0x362460['_notice']:{};return{..._0x362460,'_notice':{..._0x3325da,'update':_0x22fc38}};}
|