@lovrabet/lovrabet-cli 2.0.13-beta.7 → 2.0.13
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/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/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/skill/index.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/config/schema.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 -0
- 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 +8 -1
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a46_0x1c58d2=a46_0x3b63;(function(_0x3961c3,_0x2148d5){const _0xa52f9=a46_0x3b63,_0x15f4b9=_0x3961c3();while(!![]){try{const _0x232aed=-parseInt(_0xa52f9(0x19e))/0x1*(-parseInt(_0xa52f9(0x1c5))/0x2)+-parseInt(_0xa52f9(0x1a6))/0x3*(parseInt(_0xa52f9(0x1bf))/0x4)+parseInt(_0xa52f9(0x1af))/0x5+parseInt(_0xa52f9(0x17d))/0x6+-parseInt(_0xa52f9(0x1aa))/0x7*(-parseInt(_0xa52f9(0x19c))/0x8)+parseInt(_0xa52f9(0x18a))/0x9*(parseInt(_0xa52f9(0x1a7))/0xa)+-parseInt(_0xa52f9(0x17b))/0xb*(parseInt(_0xa52f9(0x1c7))/0xc);if(_0x232aed===_0x2148d5)break;else _0x15f4b9['push'](_0x15f4b9['shift']());}catch(_0x114fc9){_0x15f4b9['push'](_0x15f4b9['shift']());}}}(a46_0x2360,0x9ed0b));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[a46_0x1c58d2(0x1c0)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x54439a){for(const _0x4cecfa of CONFIG_NAMES){const _0x2b1389=resolve(_0x54439a,_0x4cecfa);if(existsSync(_0x2b1389))return _0x2b1389;}return undefined;}export function resolveWriteConfigPath(_0x5f04f4){const _0x3d8162=a46_0x1c58d2,_0x3bcc00=_0x5f04f4==='project'?process[_0x3d8162(0x1b4)]():homedir(),_0x15462f=resolveConfigPath(_0x3bcc00);return _0x15462f??resolve(_0x3bcc00,NEW_CONFIG_NAME);}export function readConfigFile(_0x4a5275){const _0x5dd1ba=a46_0x1c58d2;try{if(existsSync(_0x4a5275)){const _0xc48112=readFileSync(_0x4a5275,{'encoding':_0x5dd1ba(0x1a9)});if(_0xc48112){const _0x518079=JSON[_0x5dd1ba(0x183)](_0xc48112);return migrateOnlineEnv(_0x4a5275,_0x518079),_0x518079;}}}catch{}return{};}function migrateOnlineEnv(_0x3769f4,_0x31c8fd){const _0xd9d0b9=a46_0x1c58d2;let _0x314a65=![];_0x31c8fd['env']===_0xd9d0b9(0x18c)&&(_0x31c8fd['env']=_0xd9d0b9(0x185),_0x314a65=!![]);if(_0x31c8fd[_0xd9d0b9(0x1a8)]&&typeof _0x31c8fd[_0xd9d0b9(0x1a8)]===_0xd9d0b9(0x1b6))for(const _0x42de57 of Object[_0xd9d0b9(0x1bd)](_0x31c8fd[_0xd9d0b9(0x1a8)])){_0x42de57&&_0x42de57[_0xd9d0b9(0x193)]==='online'&&(_0x42de57[_0xd9d0b9(0x193)]=_0xd9d0b9(0x185),_0x314a65=!![]);}if(_0x314a65)try{writeConfigFile(_0x3769f4,_0x31c8fd);}catch{}}export function writeConfigFile(_0x2a8308,_0x3accad){const _0x42e70a=a46_0x1c58d2,_0x5272d4=dirname(_0x2a8308);!existsSync(_0x5272d4)&&mkdirSync(_0x5272d4,{'recursive':!![]});const _0x57582a=_0x2a8308+_0x42e70a(0x1a5);try{writeFileSync(_0x57582a,JSON['stringify'](_0x3accad,null,0x2)+'\x0a',{'encoding':_0x42e70a(0x1a9),'mode':0x180});try{renameSync(_0x57582a,_0x2a8308);}catch(_0x262de1){if(_0x262de1[_0x42e70a(0x194)]===_0x42e70a(0x191)||_0x262de1[_0x42e70a(0x194)]===_0x42e70a(0x1a0)||_0x262de1[_0x42e70a(0x194)]==='EACCES'){writeFileSync(_0x2a8308,JSON[_0x42e70a(0x184)](_0x3accad,null,0x2)+'\x0a',{'encoding':_0x42e70a(0x1a9)});try{unlinkSync(_0x57582a);}catch{}}else throw _0x262de1;}}catch(_0x799d65){try{unlinkSync(_0x57582a);}catch{}throw _0x799d65;}}export function isNonInteractiveMode(_0xb52729){const _0x3d8e23=a46_0x1c58d2;return!!(_0xb52729[_0x3d8e23(0x17a)]||_0xb52729['ci']||productEnvNames('CI')[_0x3d8e23(0x18e)](_0x428751=>process.env[_0x428751]===_0x3d8e23(0x18f))||process.env.CI==='true'||!process[_0x3d8e23(0x1b0)][_0x3d8e23(0x1c3)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x55f355=a46_0x1c58d2;if(!process[_0x55f355(0x1b5)][_0x55f355(0x1c3)])return![];try{const _0x325ae1=process[_0x55f355(0x1b5)]['isRaw'];return process[_0x55f355(0x1b5)]['setRawMode'](!![]),process[_0x55f355(0x1b5)]['setRawMode'](_0x325ae1??![]),!![];}catch{return![];}}function a46_0x2360(){const _0x2aed32=['pageSize','find','projectConfig','cwd','stdin','object','setRawCommand','trim','development','ENV','riskLevel','message','values','appcode','26504FLFfKv','configFileNames','empty','VERBOSE','isTTY','format','66058opYFHT','app','30300852ZYPjnN','nonInteractive','11sOdnlW','userDomain','4306194zTAijb','error','project','write','./constant/env.js','daily','parse','stringify','production','maxRisk','local-alias','accessKey','raw','45LIMeJK','authRequired','online','argv','some','true','runtimeDomain','EPERM','ACCESS_KEY','env','code','PAGE_SIZE','FORMAT','APP','top-level','string','high-risk-write','host','208hpZYYh','read','19zAehCy','./constant/domain.js','EXDEV','missing','global','inherit','APPCODE','.tmp','402dDgNcO','1626840cUSyGz','apps','utf8','251230xxemzq','apiDomain','locale','defaultApp','slice','4858260zCjLSh','stdout'];a46_0x2360=function(){return _0x2aed32;};return a46_0x2360();}export async function createContext(_0x5a107b){const _0x2bc08f=a46_0x1c58d2,_0x48e266=readRawConfig(),_0x3ae239=buildConfig(_0x48e266,_0x5a107b);await initGlobalEnvironment(_0x3ae239);const {getUserDomain:_0x3e6913,getApiDomain:_0x4413c0}=await import(_0x2bc08f(0x19f)),_0x1c6fbe={'apiDomain':_0x4413c0(),'userDomain':_0x3e6913()},_0x524f91=await buildAuth(_0x3ae239);logger['setLogPath'](process[_0x2bc08f(0x1b4)]());const _0x30d64b=(CLI_BIN_NAME+'\x20'+process[_0x2bc08f(0x18d)][_0x2bc08f(0x1ae)](0x2)['join']('\x20'))[_0x2bc08f(0x1b8)]();logger[_0x2bc08f(0x1b7)](_0x30d64b);const _0x3f88f5=isNonInteractiveMode(_0x5a107b);return{'config':_0x3ae239,'auth':_0x524f91,'logger':logger,'env':_0x1c6fbe,'nonInteractive':_0x3f88f5};}export function buildConfigFromFlags(_0x29644e){return buildConfig(readRawConfig(),_0x29644e);}export function getLocalAppAliases(_0x155e16){const _0xe53bd0=a46_0x1c58d2;return _0x155e16[_0xe53bd0(0x1a8)]&&typeof _0x155e16['apps']===_0xe53bd0(0x1b6)?_0x155e16[_0xe53bd0(0x1a8)]:{};}export function resolveLocalAppAliasCode(_0x587ae6,_0x43e943){const _0x5ed388=a46_0x1c58d2;if(!_0x43e943)return undefined;const _0x19935d=getLocalAppAliases(_0x587ae6)[_0x43e943],_0x5edae8=_0x19935d?.['appcode'];return typeof _0x5edae8===_0x5ed388(0x199)&&_0x5edae8[_0x5ed388(0x1b8)]()?_0x5edae8['trim']():undefined;}export function readAppCodeFromConfig(){const _0x14d105=a46_0x1c58d2,_0x336b84=readRawConfig(),_0xa45317=_0x336b84[_0x14d105(0x1be)]??_0x336b84[_0x14d105(0x1c6)];if(typeof _0xa45317===_0x14d105(0x199)&&_0xa45317['trim']())return _0xa45317[_0x14d105(0x1b8)]();const _0x2ac67f=resolveLocalAppAliasCode(_0x336b84,typeof _0x336b84[_0x14d105(0x1ad)]===_0x14d105(0x199)?_0x336b84[_0x14d105(0x1ad)]:undefined);if(_0x2ac67f)return _0x2ac67f;const _0x2d911c=normalizeEnv(String(_0x336b84[_0x14d105(0x193)]||_0x14d105(0x185))),_0x4498cc=isDaily(_0x2d911c)?_0x14d105(0x182):isDev(_0x2d911c)?_0x14d105(0x1b9):_0x14d105(0x185),_0x2a1d37=resolveCachedAppCode(typeof _0x336b84[_0x14d105(0x1ad)]===_0x14d105(0x199)?_0x336b84[_0x14d105(0x1ad)]:undefined,_0x4498cc,typeof _0x336b84[_0x14d105(0x188)]===_0x14d105(0x199)?_0x336b84['accessKey']:undefined);if(_0x2a1d37)return _0x2a1d37;const _0x2f7ce1=Object[_0x14d105(0x1bd)](getLocalAppAliases(_0x336b84))[_0x14d105(0x1b2)](_0x2579cd=>_0x2579cd?.['appcode']);return typeof _0x2f7ce1?.[_0x14d105(0x1be)]===_0x14d105(0x199)&&_0x2f7ce1[_0x14d105(0x1be)][_0x14d105(0x1b8)]()?_0x2f7ce1[_0x14d105(0x1be)][_0x14d105(0x1b8)]():undefined;}export function readScopedConfig(_0x296a7f){const _0x3e0683=a46_0x1c58d2,_0x4ee73d=_0x296a7f['global']?_0x3e0683(0x1a2):'project';return readConfigFile(resolveWriteConfigPath(_0x4ee73d));}export function writeScopedConfig(_0x4c4ad1,_0x2e2e18){const _0x4e13f0=a46_0x1c58d2,_0x29bbe6=_0x2e2e18['global']?'global':_0x4e13f0(0x17f);writeConfigFile(resolveWriteConfigPath(_0x29bbe6),_0x4c4ad1);}export async function initGlobalEnvironment(_0x38d0df){const _0x395c7c=a46_0x1c58d2,{initEnv:_0x4ff7da}=await import(_0x395c7c(0x181));_0x4ff7da(_0x38d0df[_0x395c7c(0x193)]);const {initDomains:_0x520ca2}=await import(_0x395c7c(0x19f));_0x520ca2({'apiDomain':_0x38d0df[_0x395c7c(0x189)][_0x395c7c(0x1ab)]||_0x38d0df[_0x395c7c(0x189)][_0x395c7c(0x19b)]||undefined,'userDomain':_0x38d0df['raw'][_0x395c7c(0x17c)]||undefined,'runtimeDomain':_0x38d0df['raw'][_0x395c7c(0x190)]||undefined});}function a46_0x3b63(_0x36a655,_0x1d1f33){_0x36a655=_0x36a655-0x17a;const _0x23608d=a46_0x2360();let _0x3b6307=_0x23608d[_0x36a655];return _0x3b6307;}export function getProjectConfigPath(){const _0x3c363c=a46_0x1c58d2;return resolveConfigPath(process[_0x3c363c(0x1b4)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x48acdd){const _0x226791=a46_0x1c58d2;if(!existsSync(_0x48acdd))return{'status':_0x226791(0x1a1)};try{const _0xdad3f2=readFileSync(_0x48acdd,{'encoding':_0x226791(0x1a9)});if(!_0xdad3f2?.[_0x226791(0x1b8)]())return{'status':_0x226791(0x1c1)};const _0x140d72=JSON[_0x226791(0x183)](_0xdad3f2);return{'status':'ok','data':_0x140d72};}catch(_0x341953){return{'status':_0x226791(0x17e),'message':_0x341953 instanceof Error?_0x341953[_0x226791(0x1bc)]:String(_0x341953)};}}export function loadRawConfigLayers(_0x5ce55f){const _0x38b397=a46_0x1c58d2;let _0x1de217={},_0x59acd1={},_0x2d1118,_0x445410;try{_0x2d1118=resolveConfigPath(homedir());if(_0x2d1118){const _0x2a3f82=readFileSync(_0x2d1118,{'encoding':_0x38b397(0x1a9)});if(_0x2a3f82)_0x1de217=JSON[_0x38b397(0x183)](_0x2a3f82);}}catch{}try{const _0x208eba=_0x5ce55f||process[_0x38b397(0x1b4)]();_0x445410=resolveConfigPath(_0x208eba);if(_0x445410){const _0x50ad98=readFileSync(_0x445410,{'encoding':'utf8'});if(_0x50ad98)_0x59acd1=JSON[_0x38b397(0x183)](_0x50ad98);}}catch{}return{'globalPath':_0x2d1118,'projectPath':_0x445410,'globalConfig':_0x1de217,'projectConfig':_0x59acd1};}function mergeRawConfigLayers(_0x4a2d99){const _0x8b1ec9=a46_0x1c58d2,{globalConfig:_0x5619d4,projectConfig:_0x11b8cd}=_0x4a2d99;if(_0x11b8cd[_0x8b1ec9(0x1a3)]===![]){const _0x34be27={..._0x11b8cd};return delete _0x34be27[_0x8b1ec9(0x1a3)],_0x34be27;}const _0x42bded={..._0x5619d4,..._0x11b8cd};if('defaultApp'in _0x11b8cd)_0x42bded[_0x8b1ec9(0x1ad)]=_0x11b8cd[_0x8b1ec9(0x1ad)];else _0x5619d4[_0x8b1ec9(0x1ad)]&&(_0x42bded[_0x8b1ec9(0x1ad)]=_0x5619d4[_0x8b1ec9(0x1ad)]);return _0x42bded;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x36c2b1){return mergeRawConfigLayers(loadRawConfigLayers(_0x36c2b1));}export function readRawConfigWithLayers(_0x34ae87){const _0x310f6a=loadRawConfigLayers(_0x34ae87);return{'config':mergeRawConfigLayers(_0x310f6a),'layers':_0x310f6a};}export function resolveDefaultAppSource(_0x2138fd){const _0x20846=a46_0x1c58d2;if(_0x20846(0x1ad)in _0x2138fd[_0x20846(0x1b3)])return _0x20846(0x17f);if(_0x2138fd[_0x20846(0x1b3)]['inherit']===![])return null;if(_0x2138fd['globalConfig'][_0x20846(0x1ad)])return _0x20846(0x1a2);return null;}function buildConfig(_0x20074a,_0x273a05){const _0x43108b=a46_0x1c58d2,_0x201418=_0x20074a[_0x43108b(0x1ad)]||undefined,_0x398e88=_0x273a05[_0x43108b(0x1c6)]||env(_0x43108b(0x197))||undefined,_0x242711=_0x398e88||_0x201418||undefined,_0x1e0e29=env(_0x43108b(0x192))||_0x20074a[_0x43108b(0x188)]||undefined,_0xb94277=_0x273a05[_0x43108b(0x193)]||env(_0x43108b(0x1ba))||_0x20074a[_0x43108b(0x193)]||DEFAULT_CONFIG_VALUES[_0x43108b(0x193)],_0x490b8a=normalizeEnv(String(_0xb94277)),_0x5a2140=isDaily(_0x490b8a)?_0x43108b(0x182):isDev(_0x490b8a)?_0x43108b(0x1b9):_0x43108b(0x185),_0x3db519=resolveLocalAppAliasCode(_0x20074a,_0x242711),_0x43e952=resolveCachedAppCode(_0x242711,_0x5a2140,_0x1e0e29),_0x53e894=typeof _0x273a05[_0x43108b(0x1be)]===_0x43108b(0x199)?_0x273a05[_0x43108b(0x1be)]:undefined,_0x28ad1b=env(_0x43108b(0x1a4)),_0x167f5c=_0x398e88?undefined:_0x20074a['appcode']||_0x20074a['app']||undefined,_0x10a9bd=_0x53e894||_0x28ad1b||_0x3db519||_0x43e952||_0x167f5c||undefined,_0x589bbc=_0x53e894?'explicit':_0x28ad1b?'env':_0x3db519?_0x43108b(0x187):_0x43e952?'cache':_0x167f5c?_0x43108b(0x198):undefined,_0x1453ad=_0x20074a[_0x43108b(0x1ac)]||DEFAULT_CONFIG_VALUES[_0x43108b(0x1ac)],_0x2c7488=undefined,_0xbcf78e=_0x273a05[_0x43108b(0x1c4)]||env(_0x43108b(0x196))||_0x20074a['format'],_0x18ab06=normalizeLegacyOutputFormat(_0xbcf78e),_0x2dadf4=env(_0x43108b(0x195))||_0x20074a[_0x43108b(0x1b1)],_0x34e10c=_0x2dadf4?Number(_0x2dadf4)||undefined:undefined,_0x2bfffc=_0x20074a[_0x43108b(0x1bb)]||_0x20074a[_0x43108b(0x186)],_0x52cb09=_0x2bfffc===_0x43108b(0x19d)||_0x2bfffc===_0x43108b(0x180)||_0x2bfffc===_0x43108b(0x19a)?_0x2bfffc:DEFAULT_CONFIG_VALUES[_0x43108b(0x1bb)],_0x127464=env(_0x43108b(0x1c2)),_0x32fa47=_0x127464==='1'||_0x127464===_0x43108b(0x18f);return{'appCode':typeof _0x10a9bd===_0x43108b(0x199)&&_0x10a9bd[_0x43108b(0x1b8)]()?_0x10a9bd[_0x43108b(0x1b8)]():undefined,'appCodeSource':_0x589bbc,'env':_0x5a2140,'locale':_0x1453ad,'cookie':_0x2c7488,'accessKey':_0x1e0e29,'format':_0x18ab06,'pageSize':_0x34e10c,'riskLevel':_0x52cb09,'verbose':_0x32fa47,'defaultApp':_0x201418,'currentApp':typeof _0x242711==='string'?_0x242711:undefined,'raw':_0x20074a};}function env(_0x471d46){return productEnv(_0x471d46);}async function buildAuth(_0x2a9ddc){const _0x5a095d='',_0x5720a5=!!_0x2a9ddc['accessKey'];return{'cookie':_0x5a095d,'isLoggedIn':_0x5720a5,async 'getOrLogin'(){const _0x22709a=a46_0x3b63;if(_0x5720a5)return _0x5a095d;throw CliErrors[_0x22709a(0x18b)]();}};}
|
|
1
|
+
const a46_0x3b8187=a46_0x5509;(function(_0x5e6f94,_0x53291a){const _0x2d5575=a46_0x5509,_0x22cca8=_0x5e6f94();while(!![]){try{const _0x32ec48=parseInt(_0x2d5575(0x1c3))/0x1*(-parseInt(_0x2d5575(0x1c6))/0x2)+-parseInt(_0x2d5575(0x1ac))/0x3+-parseInt(_0x2d5575(0x1d2))/0x4*(-parseInt(_0x2d5575(0x1ce))/0x5)+-parseInt(_0x2d5575(0x1a4))/0x6+-parseInt(_0x2d5575(0x1d3))/0x7+-parseInt(_0x2d5575(0x1b5))/0x8+parseInt(_0x2d5575(0x1e2))/0x9*(parseInt(_0x2d5575(0x1a3))/0xa);if(_0x32ec48===_0x53291a)break;else _0x22cca8['push'](_0x22cca8['shift']());}catch(_0x28b55f){_0x22cca8['push'](_0x22cca8['shift']());}}}(a46_0x3f05,0x9e138));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[a46_0x3b8187(0x1df)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x4b4e64){for(const _0x31ce4b of CONFIG_NAMES){const _0x20adae=resolve(_0x4b4e64,_0x31ce4b);if(existsSync(_0x20adae))return _0x20adae;}return undefined;}function a46_0x5509(_0x35a75c,_0x2c59f2){_0x35a75c=_0x35a75c-0x19d;const _0x3f05e6=a46_0x3f05();let _0x550912=_0x3f05e6[_0x35a75c];return _0x550912;}export function resolveWriteConfigPath(_0x114cd1){const _0x345ef4=a46_0x3b8187,_0x458f76=_0x114cd1==='project'?process[_0x345ef4(0x1cf)]():homedir(),_0x501304=resolveConfigPath(_0x458f76);return _0x501304??resolve(_0x458f76,NEW_CONFIG_NAME);}export function readConfigFile(_0x429061){const _0x2a35f4=a46_0x3b8187;try{if(existsSync(_0x429061)){const _0xe7acee=readFileSync(_0x429061,{'encoding':_0x2a35f4(0x1d5)});if(_0xe7acee){const _0x3eb58b=JSON['parse'](_0xe7acee);return migrateOnlineEnv(_0x429061,_0x3eb58b),_0x3eb58b;}}}catch{}return{};}function migrateOnlineEnv(_0x14a561,_0x29061c){const _0x4cd226=a46_0x3b8187;let _0x261921=![];_0x29061c[_0x4cd226(0x1bb)]===_0x4cd226(0x1bf)&&(_0x29061c[_0x4cd226(0x1bb)]=_0x4cd226(0x19d),_0x261921=!![]);if(_0x29061c[_0x4cd226(0x1aa)]&&typeof _0x29061c['apps']==='object')for(const _0x62b946 of Object['values'](_0x29061c[_0x4cd226(0x1aa)])){_0x62b946&&_0x62b946[_0x4cd226(0x1bb)]==='online'&&(_0x62b946[_0x4cd226(0x1bb)]=_0x4cd226(0x19d),_0x261921=!![]);}if(_0x261921)try{writeConfigFile(_0x14a561,_0x29061c);}catch{}}export function writeConfigFile(_0x36b5d4,_0x3df95d){const _0x2d41fc=a46_0x3b8187,_0x36a7b2=dirname(_0x36b5d4);!existsSync(_0x36a7b2)&&mkdirSync(_0x36a7b2,{'recursive':!![]});const _0x2b7bde=_0x36b5d4+'.tmp';try{writeFileSync(_0x2b7bde,JSON[_0x2d41fc(0x1ab)](_0x3df95d,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x2b7bde,_0x36b5d4);}catch(_0x3a8df7){if(_0x3a8df7[_0x2d41fc(0x1cb)]===_0x2d41fc(0x1b9)||_0x3a8df7[_0x2d41fc(0x1cb)]==='EXDEV'||_0x3a8df7[_0x2d41fc(0x1cb)]==='EACCES'){writeFileSync(_0x36b5d4,JSON['stringify'](_0x3df95d,null,0x2)+'\x0a',{'encoding':_0x2d41fc(0x1d5)});try{unlinkSync(_0x2b7bde);}catch{}}else throw _0x3a8df7;}}catch(_0x20d807){try{unlinkSync(_0x2b7bde);}catch{}throw _0x20d807;}}export function isNonInteractiveMode(_0x52bb0d){const _0xf178c1=a46_0x3b8187;return!!(_0x52bb0d[_0xf178c1(0x1a8)]||_0x52bb0d['ci']||productEnvNames('CI')[_0xf178c1(0x1db)](_0x1e1696=>process.env[_0x1e1696]===_0xf178c1(0x1cd))||process.env.CI===_0xf178c1(0x1cd)||!process[_0xf178c1(0x1cc)][_0xf178c1(0x1e0)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x312147=a46_0x3b8187;if(!process[_0x312147(0x1c4)][_0x312147(0x1e0)])return![];try{const _0x3804ab=process[_0x312147(0x1c4)][_0x312147(0x1a7)];return process[_0x312147(0x1c4)][_0x312147(0x19f)](!![]),process['stdin'][_0x312147(0x19f)](_0x3804ab??![]),!![];}catch{return![];}}function a46_0x3f05(){const _0x1aceae=['string','missing','./constant/env.js','app','project','306560yEbfJn','globalConfig','message','global','EPERM','setRawCommand','env','pageSize','daily','slice','online','runtimeDomain','explicit','ENV','2153UsYMKF','stdin','inherit','1010whoBHF','local-alias','top-level','object','cache','code','stdout','true','5PeYTwN','cwd','values','defaultApp','1438724ijVNKr','8675884IetNQk','raw','utf8','development','appcode','maxRisk','join','riskLevel','some','./constant/domain.js','trim','accessKey','configFileNames','isTTY','userDomain','15507jaSnwd','production','projectConfig','setRawMode','format','parse','read','26500nHhLrQ','6323136NoZnWZ','error','ACCESS_KEY','isRaw','nonInteractive','locale','apps','stringify','2577894KNDkPQ','VERBOSE','apiDomain','setLogPath'];a46_0x3f05=function(){return _0x1aceae;};return a46_0x3f05();}export async function createContext(_0x5f003){const _0x50c712=a46_0x3b8187,_0x528023=readRawConfig(),_0x16a33d=buildConfig(_0x528023,_0x5f003);await initGlobalEnvironment(_0x16a33d);const {getUserDomain:_0x19c236,getApiDomain:_0x4a7e51}=await import(_0x50c712(0x1dc)),_0x306ac0={'apiDomain':_0x4a7e51(),'userDomain':_0x19c236()},_0x380903=await buildAuth(_0x16a33d);logger[_0x50c712(0x1af)](process[_0x50c712(0x1cf)]());const _0x44e54d=(CLI_BIN_NAME+'\x20'+process['argv'][_0x50c712(0x1be)](0x2)[_0x50c712(0x1d9)]('\x20'))[_0x50c712(0x1dd)]();logger[_0x50c712(0x1ba)](_0x44e54d);const _0x3d6ac2=isNonInteractiveMode(_0x5f003);return{'config':_0x16a33d,'auth':_0x380903,'logger':logger,'env':_0x306ac0,'nonInteractive':_0x3d6ac2};}export function buildConfigFromFlags(_0x3fdbca){return buildConfig(readRawConfig(),_0x3fdbca);}export function getLocalAppAliases(_0x3796f4){const _0x1debd9=a46_0x3b8187;return _0x3796f4[_0x1debd9(0x1aa)]&&typeof _0x3796f4[_0x1debd9(0x1aa)]===_0x1debd9(0x1c9)?_0x3796f4[_0x1debd9(0x1aa)]:{};}export function resolveLocalAppAliasCode(_0x225051,_0x49d345){const _0x6b76ec=a46_0x3b8187;if(!_0x49d345)return undefined;const _0x49a54a=getLocalAppAliases(_0x225051)[_0x49d345],_0xc11bdc=_0x49a54a?.['appcode'];return typeof _0xc11bdc==='string'&&_0xc11bdc[_0x6b76ec(0x1dd)]()?_0xc11bdc['trim']():undefined;}export function readAppCodeFromConfig(){const _0x58318d=a46_0x3b8187,_0x3d90dd=readRawConfig(),_0xa0fefc=_0x3d90dd[_0x58318d(0x1d7)]??_0x3d90dd['app'];if(typeof _0xa0fefc==='string'&&_0xa0fefc[_0x58318d(0x1dd)]())return _0xa0fefc[_0x58318d(0x1dd)]();const _0x2140e6=resolveLocalAppAliasCode(_0x3d90dd,typeof _0x3d90dd[_0x58318d(0x1d1)]===_0x58318d(0x1b0)?_0x3d90dd['defaultApp']:undefined);if(_0x2140e6)return _0x2140e6;const _0x19f027=normalizeEnv(String(_0x3d90dd[_0x58318d(0x1bb)]||_0x58318d(0x19d))),_0x22910f=isDaily(_0x19f027)?_0x58318d(0x1bd):isDev(_0x19f027)?'development':'production',_0x1a48cc=resolveCachedAppCode(typeof _0x3d90dd[_0x58318d(0x1d1)]==='string'?_0x3d90dd[_0x58318d(0x1d1)]:undefined,_0x22910f,typeof _0x3d90dd['accessKey']===_0x58318d(0x1b0)?_0x3d90dd['accessKey']:undefined);if(_0x1a48cc)return _0x1a48cc;const _0x329144=Object[_0x58318d(0x1d0)](getLocalAppAliases(_0x3d90dd))['find'](_0x349ba=>_0x349ba?.['appcode']);return typeof _0x329144?.[_0x58318d(0x1d7)]===_0x58318d(0x1b0)&&_0x329144[_0x58318d(0x1d7)]['trim']()?_0x329144[_0x58318d(0x1d7)][_0x58318d(0x1dd)]():undefined;}export function readScopedConfig(_0x13e9b5){const _0x42c78d=a46_0x3b8187,_0x296cc4=_0x13e9b5[_0x42c78d(0x1b8)]?_0x42c78d(0x1b8):_0x42c78d(0x1b4);return readConfigFile(resolveWriteConfigPath(_0x296cc4));}export function writeScopedConfig(_0x272bad,_0x40a7af){const _0x2d4e46=a46_0x3b8187,_0x277a16=_0x40a7af[_0x2d4e46(0x1b8)]?_0x2d4e46(0x1b8):'project';writeConfigFile(resolveWriteConfigPath(_0x277a16),_0x272bad);}export async function initGlobalEnvironment(_0xa91412){const _0x2f053d=a46_0x3b8187,{initEnv:_0x10f610}=await import(_0x2f053d(0x1b2));_0x10f610(_0xa91412[_0x2f053d(0x1bb)]);const {initDomains:_0x482129}=await import('./constant/domain.js');_0x482129({'apiDomain':_0xa91412['raw'][_0x2f053d(0x1ae)]||_0xa91412['raw']['host']||undefined,'userDomain':_0xa91412['raw'][_0x2f053d(0x1e1)]||undefined,'runtimeDomain':_0xa91412[_0x2f053d(0x1d4)][_0x2f053d(0x1c0)]||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x40e03f){const _0xd3957a=a46_0x3b8187;if(!existsSync(_0x40e03f))return{'status':_0xd3957a(0x1b1)};try{const _0x23b7a4=readFileSync(_0x40e03f,{'encoding':'utf8'});if(!_0x23b7a4?.[_0xd3957a(0x1dd)]())return{'status':'empty'};const _0x20f685=JSON['parse'](_0x23b7a4);return{'status':'ok','data':_0x20f685};}catch(_0x46830a){return{'status':_0xd3957a(0x1a5),'message':_0x46830a instanceof Error?_0x46830a[_0xd3957a(0x1b7)]:String(_0x46830a)};}}export function loadRawConfigLayers(_0x403c8e){const _0x4ead6e=a46_0x3b8187;let _0x13b1a0={},_0x2b1328={},_0x446b03,_0x4ed505;try{_0x446b03=resolveConfigPath(homedir());if(_0x446b03){const _0x903dc1=readFileSync(_0x446b03,{'encoding':_0x4ead6e(0x1d5)});if(_0x903dc1)_0x13b1a0=JSON[_0x4ead6e(0x1a1)](_0x903dc1);}}catch{}try{const _0x3f996f=_0x403c8e||process['cwd']();_0x4ed505=resolveConfigPath(_0x3f996f);if(_0x4ed505){const _0x28800d=readFileSync(_0x4ed505,{'encoding':_0x4ead6e(0x1d5)});if(_0x28800d)_0x2b1328=JSON[_0x4ead6e(0x1a1)](_0x28800d);}}catch{}return{'globalPath':_0x446b03,'projectPath':_0x4ed505,'globalConfig':_0x13b1a0,'projectConfig':_0x2b1328};}function mergeRawConfigLayers(_0x303cbd){const _0x90091f=a46_0x3b8187,{globalConfig:_0x336c5f,projectConfig:_0x416140}=_0x303cbd;if(_0x416140['inherit']===![]){const _0x6d6022={..._0x416140};return delete _0x6d6022[_0x90091f(0x1c5)],_0x6d6022;}const _0x58d49d={..._0x336c5f,..._0x416140};if('defaultApp'in _0x416140)_0x58d49d['defaultApp']=_0x416140[_0x90091f(0x1d1)];else _0x336c5f[_0x90091f(0x1d1)]&&(_0x58d49d['defaultApp']=_0x336c5f['defaultApp']);return _0x58d49d;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5a55b3){return mergeRawConfigLayers(loadRawConfigLayers(_0x5a55b3));}export function readRawConfigWithLayers(_0xe95ac5){const _0x59d5f4=loadRawConfigLayers(_0xe95ac5);return{'config':mergeRawConfigLayers(_0x59d5f4),'layers':_0x59d5f4};}export function resolveDefaultAppSource(_0x25f43e){const _0x3675f8=a46_0x3b8187;if(_0x3675f8(0x1d1)in _0x25f43e[_0x3675f8(0x19e)])return _0x3675f8(0x1b4);if(_0x25f43e['projectConfig'][_0x3675f8(0x1c5)]===![])return null;if(_0x25f43e[_0x3675f8(0x1b6)]['defaultApp'])return'global';return null;}function buildConfig(_0x4fccef,_0x254a5e){const _0x2f1f28=a46_0x3b8187,_0x209416=_0x4fccef['defaultApp']||undefined,_0x54581a=_0x254a5e['app']||env('APP')||undefined,_0x293bcd=_0x54581a||_0x209416||undefined,_0x57a64f=env(_0x2f1f28(0x1a6))||_0x4fccef[_0x2f1f28(0x1de)]||undefined,_0x2772c6=_0x254a5e[_0x2f1f28(0x1bb)]||env(_0x2f1f28(0x1c2))||_0x4fccef[_0x2f1f28(0x1bb)]||DEFAULT_CONFIG_VALUES[_0x2f1f28(0x1bb)],_0x48633e=normalizeEnv(String(_0x2772c6)),_0x1e33e6=isDaily(_0x48633e)?_0x2f1f28(0x1bd):isDev(_0x48633e)?_0x2f1f28(0x1d6):_0x2f1f28(0x19d),_0x341dc2=resolveLocalAppAliasCode(_0x4fccef,_0x293bcd),_0x359d30=resolveCachedAppCode(_0x293bcd,_0x1e33e6,_0x57a64f),_0x39c9ef=typeof _0x254a5e[_0x2f1f28(0x1d7)]===_0x2f1f28(0x1b0)?_0x254a5e[_0x2f1f28(0x1d7)]:undefined,_0xdfd940=env('APPCODE'),_0x39de4d=_0x54581a?undefined:_0x4fccef[_0x2f1f28(0x1d7)]||_0x4fccef[_0x2f1f28(0x1b3)]||undefined,_0x5eddae=_0x39c9ef||_0xdfd940||_0x341dc2||_0x359d30||_0x39de4d||undefined,_0x1a1765=_0x39c9ef?_0x2f1f28(0x1c1):_0xdfd940?_0x2f1f28(0x1bb):_0x341dc2?_0x2f1f28(0x1c7):_0x359d30?_0x2f1f28(0x1ca):_0x39de4d?_0x2f1f28(0x1c8):undefined,_0x2c6cd2=_0x4fccef[_0x2f1f28(0x1a9)]||DEFAULT_CONFIG_VALUES[_0x2f1f28(0x1a9)],_0x209336=undefined,_0x5941ca=_0x254a5e[_0x2f1f28(0x1a0)]||env('FORMAT')||_0x4fccef[_0x2f1f28(0x1a0)],_0x224ff0=normalizeLegacyOutputFormat(_0x5941ca),_0x2d5b5e=env('PAGE_SIZE')||_0x4fccef[_0x2f1f28(0x1bc)],_0x44e407=_0x2d5b5e?Number(_0x2d5b5e)||undefined:undefined,_0x282bbc=_0x4fccef[_0x2f1f28(0x1da)]||_0x4fccef[_0x2f1f28(0x1d8)],_0x353747=_0x282bbc===_0x2f1f28(0x1a2)||_0x282bbc==='write'||_0x282bbc==='high-risk-write'?_0x282bbc:DEFAULT_CONFIG_VALUES[_0x2f1f28(0x1da)],_0x2594d3=env(_0x2f1f28(0x1ad)),_0x10f733=_0x2594d3==='1'||_0x2594d3==='true';return{'appCode':typeof _0x5eddae===_0x2f1f28(0x1b0)&&_0x5eddae[_0x2f1f28(0x1dd)]()?_0x5eddae['trim']():undefined,'appCodeSource':_0x1a1765,'env':_0x1e33e6,'locale':_0x2c6cd2,'cookie':_0x209336,'accessKey':_0x57a64f,'format':_0x224ff0,'pageSize':_0x44e407,'riskLevel':_0x353747,'verbose':_0x10f733,'defaultApp':_0x209416,'currentApp':typeof _0x293bcd===_0x2f1f28(0x1b0)?_0x293bcd:undefined,'raw':_0x4fccef};}function env(_0x3bdc0e){return productEnv(_0x3bdc0e);}async function buildAuth(_0x47bb18){const _0x468bda=a46_0x3b8187,_0x494bf9='',_0x39bcfa=!!_0x47bb18[_0x468bda(0x1de)];return{'cookie':_0x494bf9,'isLoggedIn':_0x39bcfa,async 'getOrLogin'(){if(_0x39bcfa)return _0x494bf9;throw CliErrors['authRequired']();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x478c2c,_0x225668){const _0x3986fa=a47_0x20e4,_0xb871dc=_0x478c2c();while(!![]){try{const _0x17f4eb=parseInt(_0x3986fa(0xd4))/0x1*(-parseInt(_0x3986fa(0xc1))/0x2)+parseInt(_0x3986fa(0xd2))/0x3+parseInt(_0x3986fa(0xe9))/0x4+parseInt(_0x3986fa(0xf7))/0x5+-parseInt(_0x3986fa(0xb9))/0x6*(-parseInt(_0x3986fa(0xad))/0x7)+parseInt(_0x3986fa(0xe4))/0x8+-parseInt(_0x3986fa(0xd6))/0x9;if(_0x17f4eb===_0x225668)break;else _0xb871dc['push'](_0xb871dc['shift']());}catch(_0x580ff7){_0xb871dc['push'](_0xb871dc['shift']());}}}(a47_0x5259,0xb3da6));import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';function a47_0x5259(){const _0x225462=['authRequired','status','/client/skill/personal/create','/client/sql/query','test','favorite','/client/skill/personal/list?appCode=','stringify','set','appCode','GET','invokeSource','/client/knowledge-base/search','abort','4172862BSwJeD','errorMsg','770HbfViV','Configure\x20accessKey\x20in\x20','27922311PFujdY','api-doc-generator','/client/skill/company/list?appCode=','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/client/app/my-apps','appName','?appCode=','Knowledge-base\x20entry\x20not\x20found:\x20id=','Download\x20failed:\x20','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','/package?appCode=','Toolbox\x20error\x20code:\x20','application/json','Personal\x20BFF\x20not\x20found:\x20id=','8676872LwzaLm','/client/runtime-bff/personal/create','/client/dataset/list','/client/bff/query/','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','523656lpkfMM','string','catch','errorCode','/client/dataset/query?','/client/knowledge-base/personal/','object','sqlCode','apiError','name','newConfigFileName','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','boolean','/update','4357640TRHBZE','Request\x20timeout:\x20','/client/artifact/','/client/runtime-bff/personal/','success','from','markdown','AbortError','validation','/api/node-toolbox/','SQL\x20query\x20not\x20found:\x20','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','API\x20error:\x20','toString','filter','/client/runtime-bff/personal/list?appCode=','signal','/client/skill/list?appCode=','14GornnA','Toolbox\x20API\x20error','replace','code','tableData','/client/skill/personal/','artifactType','Toolbox\x20API\x20error:\x20','topK','isArray','source','POST','3532056lBBJLU','BFF\x20script\x20not\x20found:\x20id=','json','arrayBuffer','message','query','/client/knowledge-base/personal/list?appCode=','data','2120DdSFWf','Check\x20your\x20credentials\x20and\x20try\x20again.','/client/user/loginUserInfo'];a47_0x5259=function(){return _0x225462;};return a47_0x5259();}let _activeAK;function a47_0x20e4(_0x4dba9e,_0xc32d1b){_0x4dba9e=_0x4dba9e-0xa2;const _0x5259f5=a47_0x5259();let _0x20e484=_0x5259f5[_0x4dba9e];return _0x20e484;}export function setActiveAK(_0x2a939c){_activeAK=_0x2a939c||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x4225ba,_0x22ce5b={}){const _0x2a4f33=a47_0x20e4,{method:method=_0x2a4f33(0xce),body:_0x5164cb,headers:headers={},timeout:timeout=0x7530}=_0x22ce5b,_0x26bb32=_activeAK,_0x18f874=getRuntimeDomain();if(!_0x26bb32)throw CliErrors[_0x2a4f33(0xc4)](_0x2a4f33(0xd5)+PRODUCT_CONFIG[_0x2a4f33(0xf3)]+'.');const _0xdfb9ad=''+_0x18f874+_0x4225ba,_0x2e6ee5={'X-User-AK':_0x26bb32},_0x1befed=new AbortController(),_0xfabb38=setTimeout(()=>_0x1befed['abort'](),timeout);try{const _0x2255e4=await fetch(_0xdfb9ad,{'method':method,'headers':{'Content-Type':_0x2a4f33(0xe2),'X-Invoke-Source':PRODUCT_CONFIG[_0x2a4f33(0xcf)],..._0x2e6ee5,...headers},'body':_0x5164cb?JSON[_0x2a4f33(0xcb)](_0x5164cb):undefined,'signal':_0x1befed['signal']});let _0x9339f1;try{_0x9339f1=await _0x2255e4[_0x2a4f33(0xbb)]();}catch{throw CliErrors[_0x2a4f33(0xf1)](_0x2a4f33(0xf4)+_0x2255e4[_0x2a4f33(0xc5)]+')',_0x2255e4[_0x2a4f33(0xc5)]>=0x190?_0x2a4f33(0xc2):undefined);}if(!_0x2255e4['ok']||_0x9339f1[_0x2a4f33(0xfb)]===![])throw CliErrors['apiError'](_0x9339f1[_0x2a4f33(0xd3)]||_0x9339f1[_0x2a4f33(0xbd)]||_0x2a4f33(0xa7)+_0x2255e4[_0x2a4f33(0xc5)],_0x9339f1['errorCode']?'API\x20error\x20code:\x20'+_0x9339f1[_0x2a4f33(0xec)]:undefined);return _0x9339f1;}catch(_0x53352d){if(_0x53352d instanceof Error&&_0x53352d[_0x2a4f33(0xf2)]===_0x2a4f33(0xa2))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0xdfb9ad);throw _0x53352d;}finally{clearTimeout(_0xfabb38);}}async function apiBinaryRequest(_0x19344c,_0x1f40ce={}){const _0x1462df=a47_0x20e4,{method:method=_0x1462df(0xce),headers:headers={},timeout:timeout=0x7530}=_0x1f40ce,_0x2777bc=_activeAK,_0x44a3ba=getRuntimeDomain();if(!_0x2777bc)throw CliErrors[_0x1462df(0xc4)](_0x1462df(0xd5)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x4a84b0=''+_0x44a3ba+_0x19344c,_0x3fd6f1=new AbortController(),_0x2f544c=setTimeout(()=>_0x3fd6f1[_0x1462df(0xd1)](),timeout);try{const _0x56474b=await fetch(_0x4a84b0,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x2777bc,...headers},'signal':_0x3fd6f1['signal']});if(!_0x56474b['ok']){let _0xf965e1;try{const _0x5605f1=await _0x56474b[_0x1462df(0xbb)]();_0xf965e1=_0x5605f1['errorMsg']||_0x5605f1['message']||_0x5605f1[_0x1462df(0xec)];}catch{_0xf965e1=await _0x56474b['text']()[_0x1462df(0xeb)](()=>undefined);}throw CliErrors[_0x1462df(0xf1)](_0xf965e1||_0x1462df(0xa7)+_0x56474b[_0x1462df(0xc5)],_0x1462df(0xde)+_0x4a84b0);}return Buffer[_0x1462df(0xfc)](await _0x56474b[_0x1462df(0xbc)]());}catch(_0x30290a){if(_0x30290a instanceof Error&&_0x30290a[_0x1462df(0xf2)]===_0x1462df(0xa2))throw CliErrors[_0x1462df(0xf1)](_0x1462df(0xf8)+_0x4a84b0);throw _0x30290a;}finally{clearTimeout(_0x2f544c);}}async function toolboxRequest(_0x209287,_0x4a5081,_0x47904e={}){const _0x3b4055=a47_0x20e4,{method:method=_0x3b4055(0xce),headers:headers={},timeout:timeout=0x7530}=_0x47904e,_0x4e2342=_activeAK;if(!_0x4e2342)throw CliErrors[_0x3b4055(0xc4)](_0x3b4055(0xd5)+PRODUCT_CONFIG[_0x3b4055(0xf3)]+'.');const _0x51f79e=getApiDomain()[_0x3b4055(0xaf)](/\/$/,''),_0x1a02bf=new URL(_0x209287,_0x51f79e+_0x3b4055(0xa4));if(_0x4a5081)for(const [_0x142eea,_0x5a0d61]of Object['entries'](_0x4a5081)){_0x5a0d61!==undefined&&_0x5a0d61!==null&&_0x1a02bf['searchParams'][_0x3b4055(0xcc)](_0x142eea,String(_0x5a0d61));}const _0x19e6ed=new AbortController(),_0x41d171=setTimeout(()=>_0x19e6ed['abort'](),timeout);try{const _0x122c59=await fetch(_0x1a02bf,{'method':method,'headers':{'Content-Type':_0x3b4055(0xe2),'X-Invoke-Source':PRODUCT_CONFIG[_0x3b4055(0xcf)],'X-User-AK':_0x4e2342,...headers},'signal':_0x19e6ed[_0x3b4055(0xab)]});let _0x2e7452;try{_0x2e7452=await _0x122c59[_0x3b4055(0xbb)]();}catch{throw CliErrors[_0x3b4055(0xf1)](_0x3b4055(0xe8)+_0x122c59['status']+')',_0x122c59[_0x3b4055(0xc5)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x122c59['ok']){const _0x2402f0=_0x2e7452&&typeof _0x2e7452===_0x3b4055(0xef)?_0x2e7452:{};throw CliErrors['apiError'](_0x2402f0[_0x3b4055(0xd3)]||_0x2402f0['message']||_0x3b4055(0xb4)+_0x122c59[_0x3b4055(0xc5)],_0x2402f0[_0x3b4055(0xec)]?_0x3b4055(0xe1)+_0x2402f0['errorCode']:undefined);}if(_0x2e7452&&typeof _0x2e7452==='object'&&_0x3b4055(0xfb)in _0x2e7452&&typeof _0x2e7452[_0x3b4055(0xfb)]===_0x3b4055(0xf5)){const _0x4fbfb2=_0x2e7452;if(!_0x4fbfb2['success'])throw CliErrors[_0x3b4055(0xf1)](_0x4fbfb2['errorMsg']||_0x4fbfb2[_0x3b4055(0xbd)]||_0x3b4055(0xae),_0x4fbfb2[_0x3b4055(0xec)]?_0x3b4055(0xe1)+_0x4fbfb2[_0x3b4055(0xec)]:undefined);return _0x4fbfb2[_0x3b4055(0xc0)];}return _0x2e7452;}catch(_0x2de5f8){if(_0x2de5f8 instanceof Error&&_0x2de5f8[_0x3b4055(0xf2)]===_0x3b4055(0xa2))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x1a02bf['toString']());throw _0x2de5f8;}finally{clearTimeout(_0x41d171);}}export async function getBffScriptInfo(_0x35a9a1){const _0x45e760=a47_0x20e4,_0xdd5cf4=await apiRequest(_0x45e760(0xe7)+_0x35a9a1);if(!_0xdd5cf4[_0x45e760(0xc0)])throw CliErrors[_0x45e760(0xa3)](_0x45e760(0xba)+_0x35a9a1);return _0xdd5cf4['data'];}export async function getSqlQueryInfo(_0xe1efe4,_0x298698){const _0x1e60ed=a47_0x20e4,_0x2f0c44=await apiRequest(_0x1e60ed(0xc7),{'method':_0x1e60ed(0xb8),'body':{'appCode':_0xe1efe4,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x298698}}),_0x24721e=_0x2f0c44['data'],_0xa7a052=_0x24721e&&typeof _0x24721e===_0x1e60ed(0xef)&&_0x1e60ed(0xb1)in _0x24721e?_0x24721e[_0x1e60ed(0xb1)]?.[0x0]:_0x24721e&&typeof _0x24721e===_0x1e60ed(0xef)&&_0x1e60ed(0xf0)in _0x24721e?_0x24721e:undefined;if(!_0xa7a052)throw CliErrors['validation'](_0x1e60ed(0xa5)+_0x298698);return _0xa7a052;}function isRemoteAppItem(_0x119118){const _0x36e0c6=a47_0x20e4;return!!_0x119118&&typeof _0x119118===_0x36e0c6(0xef)&&typeof _0x119118[_0x36e0c6(0xcd)]===_0x36e0c6(0xea)&&typeof _0x119118[_0x36e0c6(0xdb)]===_0x36e0c6(0xea);}function extractRemoteAppItems(_0x2a9b3a){const _0x530ad5=a47_0x20e4;if(Array[_0x530ad5(0xb6)](_0x2a9b3a))return _0x2a9b3a['filter'](isRemoteAppItem);if(!_0x2a9b3a||typeof _0x2a9b3a!==_0x530ad5(0xef))throw CliErrors['apiError'](_0x530ad5(0xd9));const _0x4109d3=_0x2a9b3a;if(Array[_0x530ad5(0xb6)](_0x4109d3['tableData']))return _0x4109d3['tableData'][_0x530ad5(0xa9)](isRemoteAppItem);if(_0x4109d3[_0x530ad5(0xc0)]&&typeof _0x4109d3[_0x530ad5(0xc0)]===_0x530ad5(0xef)){const _0x53a497=_0x4109d3[_0x530ad5(0xc0)];if(Array[_0x530ad5(0xb6)](_0x53a497[_0x530ad5(0xb1)]))return _0x53a497[_0x530ad5(0xb1)][_0x530ad5(0xa9)](isRemoteAppItem);}throw CliErrors[_0x530ad5(0xf1)](_0x530ad5(0xa6));}export async function getMyApps(){const _0x387a5b=a47_0x20e4,_0xeebdbf=await apiRequest(_0x387a5b(0xda));return extractRemoteAppItems(_0xeebdbf[_0x387a5b(0xc0)]);}export async function getLoginUserInfo(){const _0x13febc=a47_0x20e4,_0x539671=await apiRequest(_0x13febc(0xc3));if(!_0x539671[_0x13febc(0xc0)]||typeof _0x539671[_0x13febc(0xc0)]!==_0x13febc(0xef)||Array[_0x13febc(0xb6)](_0x539671[_0x13febc(0xc0)]))throw CliErrors[_0x13febc(0xf1)](_0x13febc(0xdf));return _0x539671[_0x13febc(0xc0)];}export async function listDatasets(_0x2ad2ae,_0x2d01ab){const _0x1751b1=a47_0x20e4,_0x6d9de3=await apiRequest(_0x1751b1(0xe6),{'method':_0x1751b1(0xb8),'body':{'appCode':_0x2ad2ae,..._0x2d01ab?.[_0x1751b1(0xb0)]&&{'code':_0x2d01ab[_0x1751b1(0xb0)]},..._0x2d01ab?.[_0x1751b1(0xf2)]&&{'name':_0x2d01ab[_0x1751b1(0xf2)]}}});return extractList(_0x6d9de3[_0x1751b1(0xc0)]);}export async function getDatasetDetail(_0x5196a9){const _0x252bc4=a47_0x20e4,_0x21b97b=/^\d+$/[_0x252bc4(0xc8)](_0x5196a9)?'id':_0x252bc4(0xb0),_0x4f7ef=await apiRequest(_0x252bc4(0xed)+_0x21b97b+'='+_0x5196a9);return _0x4f7ef['data'];}export async function getDatasetSdkUsageDoc(_0x44f3d4,_0x1cf1db){const _0x2eef7b=a47_0x20e4,_0x1e9fc4=await toolboxRequest(_0x2eef7b(0xd7),{'datasetCode':_0x44f3d4,'appCode':_0x1cf1db});return typeof _0x1e9fc4?.[_0x2eef7b(0xfd)]===_0x2eef7b(0xea)?_0x1e9fc4[_0x2eef7b(0xfd)]:'';}export async function listRuntimeArtifacts(_0x3ac8ba,_0x2a2159){const _0x3ffba2=a47_0x20e4,_0x5ae39d=new URLSearchParams({'appCode':_0x3ac8ba});if(_0x2a2159?.['artifactType'])_0x5ae39d['set'](_0x3ffba2(0xb3),_0x2a2159[_0x3ffba2(0xb3)]);if(_0x2a2159?.[_0x3ffba2(0xb7)])_0x5ae39d[_0x3ffba2(0xcc)](_0x3ffba2(0xb7),_0x2a2159[_0x3ffba2(0xb7)]);if(_0x2a2159?.['favorite']!==undefined)_0x5ae39d[_0x3ffba2(0xcc)](_0x3ffba2(0xc9),String(_0x2a2159[_0x3ffba2(0xc9)]));const _0x2011eb=await apiRequest('/client/artifact/list?'+_0x5ae39d[_0x3ffba2(0xa8)]());return Array[_0x3ffba2(0xb6)](_0x2011eb[_0x3ffba2(0xc0)])?_0x2011eb['data']:[];}export async function getRuntimeArtifact(_0x485c82,_0x56d56d){const _0x4427be=a47_0x20e4,_0x1aad52=await apiRequest(_0x4427be(0xf9)+_0x485c82+_0x4427be(0xdc)+encodeURIComponent(_0x56d56d));if(!_0x1aad52[_0x4427be(0xc0)])throw CliErrors[_0x4427be(0xa3)]('Artifact\x20not\x20found:\x20id='+_0x485c82);return _0x1aad52[_0x4427be(0xc0)];}export async function createRuntimeArtifact(_0x3eb392,_0x12f9c8){const _0x53aae0=a47_0x20e4,_0x170e8a=await apiRequest('/client/artifact/create',{'method':_0x53aae0(0xb8),'body':{'appCode':_0x3eb392,..._0x12f9c8}});return _0x170e8a[_0x53aae0(0xc0)];}export async function updateRuntimeArtifact(_0x1762a6,_0x5f5885,_0x196c26){const _0xe38c21=a47_0x20e4,_0x4bade9=await apiRequest(_0xe38c21(0xf9)+_0x1762a6+'/update',{'method':_0xe38c21(0xb8),'body':{'appCode':_0x5f5885,..._0x196c26}});return _0x4bade9['data'];}export async function listPersonalBffs(_0x5574ea){const _0x2ec887=a47_0x20e4,_0x490542=await apiRequest(_0x2ec887(0xaa)+encodeURIComponent(_0x5574ea));return Array[_0x2ec887(0xb6)](_0x490542['data'])?_0x490542[_0x2ec887(0xc0)]:[];}export async function getPersonalBff(_0x341676,_0x883079){const _0x5e1326=a47_0x20e4,_0x5f34a0=await apiRequest('/client/runtime-bff/personal/'+_0x341676+_0x5e1326(0xdc)+encodeURIComponent(_0x883079));if(!_0x5f34a0[_0x5e1326(0xc0)])throw CliErrors['validation'](_0x5e1326(0xe3)+_0x341676);return _0x5f34a0[_0x5e1326(0xc0)];}export async function createPersonalBff(_0x2c53bd,_0x1a1fd2){const _0x2a165e=a47_0x20e4,_0x52ea5e=await apiRequest(_0x2a165e(0xe5),{'method':_0x2a165e(0xb8),'body':{'appCode':_0x2c53bd,..._0x1a1fd2}});return _0x52ea5e[_0x2a165e(0xc0)];}export async function updatePersonalBff(_0x7f8f8e,_0x5d45f7,_0x2817ad){const _0x409082=a47_0x20e4,_0x51ac6e=await apiRequest('/client/runtime-bff/personal/'+_0x7f8f8e+'/update',{'method':_0x409082(0xb8),'body':{'appCode':_0x5d45f7,..._0x2817ad}});return _0x51ac6e['data'];}export async function executePersonalBff(_0x46f712,_0x33d2c8,_0x528aa0){const _0xb05d98=a47_0x20e4,_0x17e96a=await apiRequest(_0xb05d98(0xfa)+_0x46f712+'/execute?appCode='+encodeURIComponent(_0x33d2c8),{'method':_0xb05d98(0xb8),'body':_0x528aa0});return _0x17e96a[_0xb05d98(0xc0)];}export async function listPersonalKnowledgeBaseItems(_0x58ef03){const _0xc494d9=a47_0x20e4,_0x93ea0f=await apiRequest(_0xc494d9(0xbf)+encodeURIComponent(_0x58ef03));return Array[_0xc494d9(0xb6)](_0x93ea0f[_0xc494d9(0xc0)])?_0x93ea0f[_0xc494d9(0xc0)]:[];}export async function getPersonalKnowledgeBaseItem(_0x542b60,_0x1c8ca6){const _0x21bf83=a47_0x20e4,_0x416e39=await apiRequest('/client/knowledge-base/personal/'+_0x542b60+_0x21bf83(0xdc)+encodeURIComponent(_0x1c8ca6));if(!_0x416e39[_0x21bf83(0xc0)])throw CliErrors[_0x21bf83(0xa3)](_0x21bf83(0xdd)+_0x542b60);return _0x416e39[_0x21bf83(0xc0)];}export async function createPersonalKnowledgeBaseItem(_0x5e34a7,_0x130afe){const _0x145235=a47_0x20e4,_0x23134f=await apiRequest('/client/knowledge-base/personal/create',{'method':_0x145235(0xb8),'body':{'appCode':_0x5e34a7,..._0x130afe}});return _0x23134f[_0x145235(0xc0)];}export async function updatePersonalKnowledgeBaseItem(_0x483f15,_0x19bd25,_0x561622){const _0x434ceb=a47_0x20e4,_0xa5c8ed=await apiRequest(_0x434ceb(0xee)+_0x483f15+_0x434ceb(0xf6),{'method':_0x434ceb(0xb8),'body':{'appCode':_0x19bd25,..._0x561622}});return _0xa5c8ed[_0x434ceb(0xc0)];}export async function searchKnowledgeBase(_0x170432,_0x497f33){const _0x18f055=a47_0x20e4,_0x579b0e=await apiRequest(_0x18f055(0xd0),{'method':_0x18f055(0xb8),'body':{'appCode':_0x170432,'query':_0x497f33[_0x18f055(0xbe)],..._0x497f33[_0x18f055(0xb5)]!==undefined?{'topK':_0x497f33['topK']}:{}}});return Array[_0x18f055(0xb6)](_0x579b0e['data'])?_0x579b0e[_0x18f055(0xc0)]:[];}export async function listPersonalRuntimeSkills(_0x3bd56e){const _0x4799a6=a47_0x20e4,_0x4f02d4=await apiRequest(_0x4799a6(0xca)+encodeURIComponent(_0x3bd56e));return Array['isArray'](_0x4f02d4['data'])?_0x4f02d4['data']:[];}export async function listCompanyRuntimeSkills(_0x300d38){const _0x7c52f8=a47_0x20e4,_0x126ede=await apiRequest(_0x7c52f8(0xd8)+encodeURIComponent(_0x300d38));return Array[_0x7c52f8(0xb6)](_0x126ede[_0x7c52f8(0xc0)])?_0x126ede['data']:[];}export async function listVisibleRuntimeSkills(_0x145ad6){const _0x4715ee=a47_0x20e4,_0x581735=await apiRequest(_0x4715ee(0xac)+encodeURIComponent(_0x145ad6));return Array[_0x4715ee(0xb6)](_0x581735['data'])?_0x581735[_0x4715ee(0xc0)]:[];}export async function createPersonalRuntimeSkill(_0x33bbdf,_0x309857){const _0x4617a4=a47_0x20e4,_0x832e4f=await apiRequest(_0x4617a4(0xc6),{'method':'POST','body':{'appCode':_0x33bbdf,..._0x309857}});return _0x832e4f['data'];}export async function updatePersonalRuntimeSkill(_0x299ad1,_0x1950bf,_0xbeb389){const _0x302de2=a47_0x20e4,_0x5df204=await apiRequest(_0x302de2(0xb2)+encodeURIComponent(_0x299ad1)+'/update',{'method':_0x302de2(0xb8),'body':{'appCode':_0x1950bf,..._0xbeb389}});return _0x5df204[_0x302de2(0xc0)];}export async function downloadRuntimeSkillPackage(_0x425eaa,_0x4a23d8,_0x51103c){const _0x271318=a47_0x20e4;return apiBinaryRequest('/client/skill/'+encodeURIComponent(_0x425eaa)+'/'+encodeURIComponent(_0x4a23d8)+_0x271318(0xe0)+encodeURIComponent(_0x51103c));}
|
|
1
|
+
(function(_0x1321f8,_0x29d4a1){const _0x44083c=a47_0xf6fa,_0x18d2c0=_0x1321f8();while(!![]){try{const _0x310407=-parseInt(_0x44083c(0x1b3))/0x1+parseInt(_0x44083c(0x17c))/0x2+-parseInt(_0x44083c(0x17e))/0x3*(parseInt(_0x44083c(0x1aa))/0x4)+parseInt(_0x44083c(0x1ba))/0x5*(parseInt(_0x44083c(0x1b7))/0x6)+-parseInt(_0x44083c(0x1a2))/0x7+-parseInt(_0x44083c(0x1b8))/0x8+parseInt(_0x44083c(0x178))/0x9;if(_0x310407===_0x29d4a1)break;else _0x18d2c0['push'](_0x18d2c0['shift']());}catch(_0x121489){_0x18d2c0['push'](_0x18d2c0['shift']());}}}(a47_0x4822,0x74287));import{getApiDomain,getRuntimeDomain}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(_0x5666aa){_activeAK=_0x5666aa||undefined;}function a47_0xf6fa(_0x3781e0,_0x21ae43){_0x3781e0=_0x3781e0-0x16a;const _0x4822ea=a47_0x4822();let _0xf6fa2a=_0x4822ea[_0x3781e0];return _0xf6fa2a;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x11f558,_0x3c8246={}){const _0xa4347=a47_0xf6fa,{method:method='GET',body:_0x4039be,headers:headers={},timeout:timeout=0x7530}=_0x3c8246,_0x33db34=_activeAK,_0x3271ec=getRuntimeDomain();if(!_0x33db34)throw CliErrors['authRequired'](_0xa4347(0x18e)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x431bea=''+_0x3271ec+_0x11f558,_0x80c9a3={'X-User-AK':_0x33db34},_0x5b45a6=new AbortController(),_0x1f7acd=setTimeout(()=>_0x5b45a6['abort'](),timeout);try{const _0x5106a2=await fetch(_0x431bea,{'method':method,'headers':{'Content-Type':_0xa4347(0x1a1),'X-Invoke-Source':PRODUCT_CONFIG[_0xa4347(0x190)],..._0x80c9a3,...headers},'body':_0x4039be?JSON['stringify'](_0x4039be):undefined,'signal':_0x5b45a6[_0xa4347(0x18b)]});let _0xf82526;try{_0xf82526=await _0x5106a2[_0xa4347(0x1b2)]();}catch{throw CliErrors[_0xa4347(0x1ad)](_0xa4347(0x195)+_0x5106a2[_0xa4347(0x176)]+')',_0x5106a2[_0xa4347(0x176)]>=0x190?_0xa4347(0x16d):undefined);}if(!_0x5106a2['ok']||_0xf82526[_0xa4347(0x1a8)]===![])throw CliErrors['apiError'](_0xf82526[_0xa4347(0x16c)]||_0xf82526[_0xa4347(0x1a4)]||_0xa4347(0x186)+_0x5106a2[_0xa4347(0x176)],_0xf82526[_0xa4347(0x16f)]?'API\x20error\x20code:\x20'+_0xf82526[_0xa4347(0x16f)]:undefined);return _0xf82526;}catch(_0x4a00dd){if(_0x4a00dd instanceof Error&&_0x4a00dd['name']==='AbortError')throw CliErrors[_0xa4347(0x1ad)](_0xa4347(0x19c)+_0x431bea);throw _0x4a00dd;}finally{clearTimeout(_0x1f7acd);}}async function apiBinaryRequest(_0xa6802a,_0x3f25be={}){const _0x46fe54=a47_0xf6fa,{method:method=_0x46fe54(0x174),headers:headers={},timeout:timeout=0x7530}=_0x3f25be,_0x19aaac=_activeAK,_0x2d6c36=getRuntimeDomain();if(!_0x19aaac)throw CliErrors[_0x46fe54(0x19f)](_0x46fe54(0x18e)+PRODUCT_CONFIG[_0x46fe54(0x170)]+'.');const _0x2b12ed=''+_0x2d6c36+_0xa6802a,_0x550e86=new AbortController(),_0x48bd72=setTimeout(()=>_0x550e86[_0x46fe54(0x185)](),timeout);try{const _0x454fa1=await fetch(_0x2b12ed,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x46fe54(0x190)],'X-User-AK':_0x19aaac,...headers},'signal':_0x550e86[_0x46fe54(0x18b)]});if(!_0x454fa1['ok']){let _0x145775;try{const _0x3c30aa=await _0x454fa1['json']();_0x145775=_0x3c30aa[_0x46fe54(0x16c)]||_0x3c30aa['message']||_0x3c30aa[_0x46fe54(0x16f)];}catch{_0x145775=await _0x454fa1[_0x46fe54(0x192)]()['catch'](()=>undefined);}throw CliErrors[_0x46fe54(0x1ad)](_0x145775||_0x46fe54(0x186)+_0x454fa1['status'],_0x46fe54(0x198)+_0x2b12ed);}return Buffer[_0x46fe54(0x187)](await _0x454fa1[_0x46fe54(0x181)]());}catch(_0x243fa6){if(_0x243fa6 instanceof Error&&_0x243fa6['name']==='AbortError')throw CliErrors[_0x46fe54(0x1ad)](_0x46fe54(0x19c)+_0x2b12ed);throw _0x243fa6;}finally{clearTimeout(_0x48bd72);}}async function toolboxRequest(_0x25a4da,_0x586f77,_0x4952b7={}){const _0x43c334=a47_0xf6fa,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x4952b7,_0x31b287=_activeAK;if(!_0x31b287)throw CliErrors[_0x43c334(0x19f)](_0x43c334(0x18e)+PRODUCT_CONFIG[_0x43c334(0x170)]+'.');const _0x4d7e94=getApiDomain()['replace'](/\/$/,''),_0x26b6fb=new URL(_0x25a4da,_0x4d7e94+_0x43c334(0x19b));if(_0x586f77)for(const [_0x330545,_0x550154]of Object['entries'](_0x586f77)){_0x550154!==undefined&&_0x550154!==null&&_0x26b6fb[_0x43c334(0x18a)]['set'](_0x330545,String(_0x550154));}const _0x48cf24=new AbortController(),_0x3f7c68=setTimeout(()=>_0x48cf24['abort'](),timeout);try{const _0x18b79f=await fetch(_0x26b6fb,{'method':method,'headers':{'Content-Type':_0x43c334(0x1a1),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x31b287,...headers},'signal':_0x48cf24[_0x43c334(0x18b)]});let _0x8e95ed;try{_0x8e95ed=await _0x18b79f[_0x43c334(0x1b2)]();}catch{throw CliErrors[_0x43c334(0x1ad)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x18b79f[_0x43c334(0x176)]+')',_0x18b79f[_0x43c334(0x176)]>=0x190?_0x43c334(0x16d):undefined);}if(!_0x18b79f['ok']){const _0x36f0c8=_0x8e95ed&&typeof _0x8e95ed===_0x43c334(0x175)?_0x8e95ed:{};throw CliErrors['apiError'](_0x36f0c8[_0x43c334(0x16c)]||_0x36f0c8[_0x43c334(0x1a4)]||'Toolbox\x20API\x20error:\x20'+_0x18b79f['status'],_0x36f0c8[_0x43c334(0x16f)]?_0x43c334(0x19d)+_0x36f0c8[_0x43c334(0x16f)]:undefined);}if(_0x8e95ed&&typeof _0x8e95ed===_0x43c334(0x175)&&'success'in _0x8e95ed&&typeof _0x8e95ed[_0x43c334(0x1a8)]===_0x43c334(0x1ae)){const _0x1f01a4=_0x8e95ed;if(!_0x1f01a4[_0x43c334(0x1a8)])throw CliErrors[_0x43c334(0x1ad)](_0x1f01a4[_0x43c334(0x16c)]||_0x1f01a4[_0x43c334(0x1a4)]||_0x43c334(0x1a5),_0x1f01a4[_0x43c334(0x16f)]?_0x43c334(0x19d)+_0x1f01a4['errorCode']:undefined);return _0x1f01a4['data'];}return _0x8e95ed;}catch(_0x63b918){if(_0x63b918 instanceof Error&&_0x63b918[_0x43c334(0x1b4)]===_0x43c334(0x1a9))throw CliErrors['apiError'](_0x43c334(0x19c)+_0x26b6fb[_0x43c334(0x179)]());throw _0x63b918;}finally{clearTimeout(_0x3f7c68);}}export async function getBffScriptInfo(_0x3ebf5f){const _0x5123c9=a47_0xf6fa,_0x10cb4c=await apiRequest(_0x5123c9(0x18d)+_0x3ebf5f);if(!_0x10cb4c[_0x5123c9(0x180)])throw CliErrors[_0x5123c9(0x184)](_0x5123c9(0x199)+_0x3ebf5f);return _0x10cb4c[_0x5123c9(0x180)];}export async function getSqlQueryInfo(_0x4df2d7,_0x2e51e1){const _0x1fdfea=a47_0xf6fa,_0xb39ceb=await apiRequest(_0x1fdfea(0x1bd),{'method':_0x1fdfea(0x172),'body':{'appCode':_0x4df2d7,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x2e51e1}}),_0x59819c=_0xb39ceb[_0x1fdfea(0x180)],_0x4e16d6=_0x59819c&&typeof _0x59819c===_0x1fdfea(0x175)&&_0x1fdfea(0x1ac)in _0x59819c?_0x59819c[_0x1fdfea(0x1ac)]?.[0x0]:_0x59819c&&typeof _0x59819c===_0x1fdfea(0x175)&&_0x1fdfea(0x193)in _0x59819c?_0x59819c:undefined;if(!_0x4e16d6)throw CliErrors[_0x1fdfea(0x184)](_0x1fdfea(0x1af)+_0x2e51e1);return _0x4e16d6;}function isRemoteAppItem(_0x20aa3b){const _0xe48fcc=a47_0xf6fa;return!!_0x20aa3b&&typeof _0x20aa3b===_0xe48fcc(0x175)&&typeof _0x20aa3b[_0xe48fcc(0x17d)]===_0xe48fcc(0x1b6)&&typeof _0x20aa3b[_0xe48fcc(0x183)]===_0xe48fcc(0x1b6);}function extractRemoteAppItems(_0x1f2091){const _0x4c9f12=a47_0xf6fa;if(Array[_0x4c9f12(0x16b)](_0x1f2091))return _0x1f2091[_0x4c9f12(0x1b5)](isRemoteAppItem);if(!_0x1f2091||typeof _0x1f2091!=='object')throw CliErrors[_0x4c9f12(0x1ad)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x185e21=_0x1f2091;if(Array['isArray'](_0x185e21[_0x4c9f12(0x1ac)]))return _0x185e21[_0x4c9f12(0x1ac)][_0x4c9f12(0x1b5)](isRemoteAppItem);if(_0x185e21[_0x4c9f12(0x180)]&&typeof _0x185e21[_0x4c9f12(0x180)]===_0x4c9f12(0x175)){const _0x16b8b3=_0x185e21[_0x4c9f12(0x180)];if(Array[_0x4c9f12(0x16b)](_0x16b8b3[_0x4c9f12(0x1ac)]))return _0x16b8b3[_0x4c9f12(0x1ac)][_0x4c9f12(0x1b5)](isRemoteAppItem);}throw CliErrors['apiError']('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x4a2d37=a47_0xf6fa,_0xc37bfb=await apiRequest(_0x4a2d37(0x197));return extractRemoteAppItems(_0xc37bfb[_0x4a2d37(0x180)]);}export async function getLoginUserInfo(){const _0x3af202=a47_0xf6fa,_0x25525f=await apiRequest('/client/user/loginUserInfo');if(!_0x25525f[_0x3af202(0x180)]||typeof _0x25525f[_0x3af202(0x180)]!==_0x3af202(0x175)||Array['isArray'](_0x25525f[_0x3af202(0x180)]))throw CliErrors[_0x3af202(0x1ad)](_0x3af202(0x1a6));return _0x25525f[_0x3af202(0x180)];}export async function listDatasets(_0x335c8a,_0x3eafd8){const _0x3e82ab=a47_0xf6fa,_0x485d3c=await apiRequest(_0x3e82ab(0x19a),{'method':'POST','body':{'appCode':_0x335c8a,..._0x3eafd8?.[_0x3e82ab(0x1b0)]&&{'code':_0x3eafd8['code']},..._0x3eafd8?.[_0x3e82ab(0x1b4)]&&{'name':_0x3eafd8[_0x3e82ab(0x1b4)]}}});return extractList(_0x485d3c['data']);}export async function getDatasetDetail(_0x137e12){const _0x39fb3b=a47_0xf6fa,_0x4e3eb3=/^\d+$/[_0x39fb3b(0x17a)](_0x137e12)?'id':_0x39fb3b(0x1b0),_0x215477=await apiRequest('/client/dataset/query?'+_0x4e3eb3+'='+_0x137e12);return _0x215477[_0x39fb3b(0x180)];}export async function getDatasetSdkUsageDoc(_0x1f21ff,_0x263f9a){const _0x8cec96=a47_0xf6fa,_0x56101e=await toolboxRequest(_0x8cec96(0x18f),{'datasetCode':_0x1f21ff,'appCode':_0x263f9a});return typeof _0x56101e?.[_0x8cec96(0x191)]===_0x8cec96(0x1b6)?_0x56101e[_0x8cec96(0x191)]:'';}export async function listRuntimeArtifacts(_0x32cdb6,_0x5549aa){const _0x9cc7b7=a47_0xf6fa,_0x409b5d=new URLSearchParams({'appCode':_0x32cdb6});if(_0x5549aa?.[_0x9cc7b7(0x1bf)])_0x409b5d[_0x9cc7b7(0x1a3)](_0x9cc7b7(0x1bf),_0x5549aa[_0x9cc7b7(0x1bf)]);if(_0x5549aa?.[_0x9cc7b7(0x189)])_0x409b5d[_0x9cc7b7(0x1a3)](_0x9cc7b7(0x189),_0x5549aa[_0x9cc7b7(0x189)]);if(_0x5549aa?.[_0x9cc7b7(0x17f)]!==undefined)_0x409b5d[_0x9cc7b7(0x1a3)]('favorite',String(_0x5549aa[_0x9cc7b7(0x17f)]));const _0x37cc33=await apiRequest(_0x9cc7b7(0x171)+_0x409b5d[_0x9cc7b7(0x179)]());return Array['isArray'](_0x37cc33[_0x9cc7b7(0x180)])?_0x37cc33[_0x9cc7b7(0x180)]:[];}export async function getRuntimeArtifact(_0x56ecb4,_0x42d123){const _0x5f4929=a47_0xf6fa,_0x56b1ad=await apiRequest(_0x5f4929(0x173)+_0x56ecb4+'?appCode='+encodeURIComponent(_0x42d123));if(!_0x56b1ad['data'])throw CliErrors['validation'](_0x5f4929(0x1be)+_0x56ecb4);return _0x56b1ad[_0x5f4929(0x180)];}export async function createRuntimeArtifact(_0x3af4af,_0xe52b98){const _0x278214=a47_0xf6fa,_0x11efa9=await apiRequest('/client/artifact/create',{'method':_0x278214(0x172),'body':{'appCode':_0x3af4af,..._0xe52b98}});return _0x11efa9[_0x278214(0x180)];}export async function updateRuntimeArtifact(_0x4f4a25,_0x3f0e8f,_0x3ac1cf){const _0xafd501=a47_0xf6fa,_0x3f55fe=await apiRequest(_0xafd501(0x173)+_0x4f4a25+_0xafd501(0x16a),{'method':'POST','body':{'appCode':_0x3f0e8f,..._0x3ac1cf}});return _0x3f55fe[_0xafd501(0x180)];}export async function listPersonalBffs(_0x293b78){const _0x45cb83=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x293b78));return Array['isArray'](_0x45cb83['data'])?_0x45cb83['data']:[];}export async function getPersonalBff(_0x153cf5,_0x3a53af){const _0x4f5ae8=a47_0xf6fa,_0x59e566=await apiRequest('/client/runtime-bff/personal/'+_0x153cf5+_0x4f5ae8(0x1a7)+encodeURIComponent(_0x3a53af));if(!_0x59e566[_0x4f5ae8(0x180)])throw CliErrors['validation'](_0x4f5ae8(0x182)+_0x153cf5);return _0x59e566[_0x4f5ae8(0x180)];}export async function createPersonalBff(_0x409333,_0x5af0f7){const _0x268af6=a47_0xf6fa,_0x2ccd06=await apiRequest(_0x268af6(0x1ab),{'method':'POST','body':{'appCode':_0x409333,..._0x5af0f7}});return _0x2ccd06[_0x268af6(0x180)];}export async function updatePersonalBff(_0x4f7f99,_0x29d6e9,_0x9f7db8){const _0x343940=a47_0xf6fa,_0x4b4994=await apiRequest('/client/runtime-bff/personal/'+_0x4f7f99+_0x343940(0x16a),{'method':_0x343940(0x172),'body':{'appCode':_0x29d6e9,..._0x9f7db8}});return _0x4b4994['data'];}export async function executePersonalBff(_0xae5cb3,_0xb0dfa3,_0x52f495){const _0x12f525=a47_0xf6fa,_0x27ffcc=await apiRequest(_0x12f525(0x1bc)+_0xae5cb3+_0x12f525(0x1bb)+encodeURIComponent(_0xb0dfa3),{'method':'POST','body':_0x52f495});return _0x27ffcc['data'];}export async function listPersonalKnowledgeBaseItems(_0x2f54e9){const _0x3892e4=a47_0xf6fa,_0x23b157=await apiRequest(_0x3892e4(0x19e)+encodeURIComponent(_0x2f54e9));return Array['isArray'](_0x23b157['data'])?_0x23b157['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x56bacd,_0x29c6c3){const _0x80e60c=a47_0xf6fa,_0x39a986=await apiRequest(_0x80e60c(0x17b)+_0x56bacd+_0x80e60c(0x1a7)+encodeURIComponent(_0x29c6c3));if(!_0x39a986['data'])throw CliErrors['validation']('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0x56bacd);return _0x39a986[_0x80e60c(0x180)];}export async function createPersonalKnowledgeBaseItem(_0x5b6d59,_0x2fc603){const _0x2b8ead=a47_0xf6fa,_0x26db51=await apiRequest(_0x2b8ead(0x1a0),{'method':_0x2b8ead(0x172),'body':{'appCode':_0x5b6d59,..._0x2fc603}});return _0x26db51['data'];}export async function updatePersonalKnowledgeBaseItem(_0x566cc2,_0x20f34b,_0x34ae36){const _0x42a888=a47_0xf6fa,_0xae356d=await apiRequest(_0x42a888(0x17b)+_0x566cc2+'/update',{'method':'POST','body':{'appCode':_0x20f34b,..._0x34ae36}});return _0xae356d[_0x42a888(0x180)];}export async function searchKnowledgeBase(_0x33b0df,_0x526bdd){const _0x1d5db1=a47_0xf6fa,_0x469eef=await apiRequest(_0x1d5db1(0x196),{'method':_0x1d5db1(0x172),'body':{'appCode':_0x33b0df,'query':_0x526bdd[_0x1d5db1(0x1b9)],..._0x526bdd[_0x1d5db1(0x177)]!==undefined?{'topK':_0x526bdd[_0x1d5db1(0x177)]}:{}}});return Array[_0x1d5db1(0x16b)](_0x469eef[_0x1d5db1(0x180)])?_0x469eef[_0x1d5db1(0x180)]:[];}export async function listPersonalRuntimeSkills(_0x1c2db5){const _0x317659=a47_0xf6fa,_0x1da863=await apiRequest('/client/skill/personal/list?appCode='+encodeURIComponent(_0x1c2db5));return Array[_0x317659(0x16b)](_0x1da863[_0x317659(0x180)])?_0x1da863[_0x317659(0x180)]:[];}export async function listCompanyRuntimeSkills(_0x19cd73){const _0x33bd63=a47_0xf6fa,_0x4a787a=await apiRequest(_0x33bd63(0x188)+encodeURIComponent(_0x19cd73));return Array['isArray'](_0x4a787a[_0x33bd63(0x180)])?_0x4a787a[_0x33bd63(0x180)]:[];}function a47_0x4822(){const _0x218f82=['arrayBuffer','Personal\x20BFF\x20not\x20found:\x20id=','appName','validation','abort','API\x20error:\x20','from','/client/skill/company/list?appCode=','source','searchParams','signal','/client/skill/list?appCode=','/client/bff/query/','Configure\x20accessKey\x20in\x20','api-doc-generator','invokeSource','markdown','text','sqlCode','/client/skill/personal/create','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/knowledge-base/search','/client/app/my-apps','Download\x20failed:\x20','BFF\x20script\x20not\x20found:\x20id=','/client/dataset/list','/api/node-toolbox/','Request\x20timeout:\x20','Toolbox\x20error\x20code:\x20','/client/knowledge-base/personal/list?appCode=','authRequired','/client/knowledge-base/personal/create','application/json','4990643bqEjkz','set','message','Toolbox\x20API\x20error','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','?appCode=','success','AbortError','83768qUqpDv','/client/runtime-bff/personal/create','tableData','apiError','boolean','SQL\x20query\x20not\x20found:\x20','code','/client/skill/','json','494716tfrIqP','name','filter','string','2083098lkQVZs','7466296NTijQw','query','5qsKrjv','/execute?appCode=','/client/runtime-bff/personal/','/client/sql/query','Artifact\x20not\x20found:\x20id=','artifactType','/update','isArray','errorMsg','Check\x20your\x20credentials\x20and\x20try\x20again.','/client/skill/personal/','errorCode','newConfigFileName','/client/artifact/list?','POST','/client/artifact/','GET','object','status','topK','22687200fhDoxE','toString','test','/client/knowledge-base/personal/','1256632wwfcXU','appCode','126yxwSZl','favorite','data'];a47_0x4822=function(){return _0x218f82;};return a47_0x4822();}export async function listVisibleRuntimeSkills(_0xedef57){const _0x72fa97=a47_0xf6fa,_0x6bb0f1=await apiRequest(_0x72fa97(0x18c)+encodeURIComponent(_0xedef57));return Array[_0x72fa97(0x16b)](_0x6bb0f1[_0x72fa97(0x180)])?_0x6bb0f1[_0x72fa97(0x180)]:[];}export async function createPersonalRuntimeSkill(_0x39c0e0,_0x454032){const _0x11ab51=a47_0xf6fa,_0x4c5319=await apiRequest(_0x11ab51(0x194),{'method':_0x11ab51(0x172),'body':{'appCode':_0x39c0e0,..._0x454032}});return _0x4c5319[_0x11ab51(0x180)];}export async function updatePersonalRuntimeSkill(_0x3d8330,_0x3e2a23,_0x196e39){const _0x3ca7ee=a47_0xf6fa,_0x214d54=await apiRequest(_0x3ca7ee(0x16e)+encodeURIComponent(_0x3d8330)+'/update',{'method':_0x3ca7ee(0x172),'body':{'appCode':_0x3e2a23,..._0x196e39}});return _0x214d54[_0x3ca7ee(0x180)];}export async function downloadRuntimeSkillPackage(_0x15c4b9,_0x4cff49,_0x1644c6){const _0x339852=a47_0xf6fa;return apiBinaryRequest(_0x339852(0x1b1)+encodeURIComponent(_0x15c4b9)+'/'+encodeURIComponent(_0x4cff49)+'/package?appCode='+encodeURIComponent(_0x1644c6));}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x111b62,_0x3889a6){const _0x17d610=a48_0x90fe,_0x1b0051=_0x111b62();while(!![]){try{const _0x318884=parseInt(_0x17d610(0x1db))/0x1*(parseInt(_0x17d610(0x1dc))/0x2)+-parseInt(_0x17d610(0x1d8))/0x3*(-parseInt(_0x17d610(0x1e1))/0x4)+-parseInt(_0x17d610(0x1de))/0x5*(-parseInt(_0x17d610(0x1d7))/0x6)+parseInt(_0x17d610(0x1df))/0x7+-parseInt(_0x17d610(0x1e0))/0x8*(-parseInt(_0x17d610(0x1e3))/0x9)+parseInt(_0x17d610(0x1e6))/0xa*(parseInt(_0x17d610(0x1da))/0xb)+-parseInt(_0x17d610(0x1e4))/0xc;if(_0x318884===_0x3889a6)break;else _0x1b0051['push'](_0x1b0051['shift']());}catch(_0x347e65){_0x1b0051['push'](_0x1b0051['shift']());}}}(a48_0x55e6,0x1f446));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x46cf51){const _0x487184=a48_0x90fe;if(cache[_0x487184(0x1e2)](_0x46cf51))return cache[_0x487184(0x1d6)](_0x46cf51);const _0x2b5e95=await listDatasets(_0x46cf51),_0x17ab9e=new Map();for(const _0x11a3e4 of _0x2b5e95){const _0x4b32b7=_0x11a3e4['dbtableConfig'];_0x4b32b7?.[_0x487184(0x1d9)]!=null&&_0x17ab9e[_0x487184(0x1dd)](_0x4b32b7[_0x487184(0x1d9)],_0x4b32b7[_0x487184(0x1d3)]??_0x487184(0x1e5)+_0x4b32b7[_0x487184(0x1d9)]);}const _0x1edebc=[..._0x17ab9e[_0x487184(0x1d5)]()]['map'](([_0x3c6a6a,_0x294f0f])=>({'dbId':_0x3c6a6a,'dbName':_0x294f0f}));return cache['set'](_0x46cf51,_0x1edebc),_0x1edebc;}function a48_0x90fe(_0x23725f,_0x22a375){_0x23725f=_0x23725f-0x1d3;const _0x55e63f=a48_0x55e6();let _0x90fe94=_0x55e63f[_0x23725f];return _0x90fe94;}export async function getDbName(_0x5c7d4,_0x44f133){const _0x6fac4c=a48_0x90fe;try{const _0xafe69=await listDatabases(_0x5c7d4);return _0xafe69[_0x6fac4c(0x1d4)](_0x49ebe3=>_0x49ebe3['dbId']===_0x44f133)?.['dbName'];}catch{return undefined;}}function a48_0x55e6(){const _0x55118b=['57692ylsFjW','has','9LDubBE','9456744JnjYhN','db-','153770XErLsg','dbName','find','entries','get','593004gcOoCb','36DJGBKr','dbId','33LtIHJp','218143jhRZhC','2ivTfqm','set','5lBkmVY','1337147MgMRWo','1511416fbkfIN'];a48_0x55e6=function(){return _0x55118b;};return a48_0x55e6();}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x552d79,_0x358c65){const _0x1e0387=a49_0x4674,_0xf7f49f=_0x552d79();while(!![]){try{const _0x190bd3=parseInt(_0x1e0387(0xce))/0x1+-parseInt(_0x1e0387(0xcf))/0x2+parseInt(_0x1e0387(0xbe))/0x3*(parseInt(_0x1e0387(0xc7))/0x4)+-parseInt(_0x1e0387(0xcc))/0x5*(-parseInt(_0x1e0387(0xd1))/0x6)+-parseInt(_0x1e0387(0xcb))/0x7+-parseInt(_0x1e0387(0xc9))/0x8*(-parseInt(_0x1e0387(0xbf))/0x9)+parseInt(_0x1e0387(0xd4))/0xa*(-parseInt(_0x1e0387(0xbd))/0xb);if(_0x190bd3===_0x358c65)break;else _0xf7f49f['push'](_0xf7f49f['shift']());}catch(_0x27b9af){_0xf7f49f['push'](_0xf7f49f['shift']());}}}(a49_0x46fd,0x3802f));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';function a49_0x4674(_0x4bc7df,_0x2e9fd0){_0x4bc7df=_0x4bc7df-0xb9;const _0x46fd1e=a49_0x46fd();let _0x46741d=_0x46fd1e[_0x4bc7df];return _0x46741d;}import{parseBatchCreateItemsFromParams}from'../utils/params.js';function a49_0x46fd(){const _0x23ceae=['762587PjveaL','5FAeXox','authMode','402671tARZmI','112320WqsnIu','invokeSource','824052TfdnfV','accessKey','sql','30UDGsmY','execute','getOne','env','delete','\x22.\x20','1214741mOELBp','12666ycqtlR','162zsQoGG','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','update','dataset_','isArray','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','bff','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','140tGtMXv','batchCreate','16904XbTYTa','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.'];a49_0x46fd=function(){return _0x23ceae;};return a49_0x46fd();}let _client;export function initSdkClient(_0x501da9){const _0x499aa9=a49_0x4674;_client=createClient({'appCode':_0x501da9['appCode'],'env':_0x501da9[_0x499aa9(0xba)],'authMode':_0x501da9[_0x499aa9(0xcd)],..._0x501da9[_0x499aa9(0xd2)]?{'accessKey':_0x501da9[_0x499aa9(0xd2)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x499aa9(0xd0)]}}});}function ensureClient(){const _0x56392b=a49_0x4674;if(!_client)throw new Error(_0x56392b(0xc6));return _client;}export async function executeData(_0x51bfc2,_0x433884,_0x16cc91){const _0x24811d=a49_0x4674,_0x2f95ce=ensureClient(),_0x4ef8c7=_0x24811d(0xc2)+_0x51bfc2,_0x3ad0a2=_0x2f95ce['models'][_0x4ef8c7];if(!_0x3ad0a2||typeof _0x3ad0a2[_0x433884]!=='function')throw new Error(_0x24811d(0xc0)+_0x433884+_0x24811d(0xbc)+_0x24811d(0xca));if(_0x433884===_0x24811d(0xc8))return _0x3ad0a2[_0x24811d(0xc8)](parseBatchCreateItemsFromParams(_0x16cc91));const _0x5ad462=_0x16cc91!==undefined&&_0x16cc91!==null&&!Array[_0x24811d(0xc3)](_0x16cc91)?_0x16cc91:{};switch(_0x433884){case'getOne':{const _0x279534=_0x5ad462['id'];if(_0x279534===undefined||_0x279534===null)throw new Error('getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x3ad0a2[_0x24811d(0xb9)](_0x279534);}case _0x24811d(0xc1):{const {id:_0x505b50,..._0x390544}=_0x5ad462;if(_0x505b50===undefined||_0x505b50===null)throw new Error(_0x24811d(0xc4));return _0x3ad0a2['update'](_0x505b50,_0x390544);}case _0x24811d(0xbb):{const _0x49a9a0=_0x5ad462['id'];if(_0x49a9a0===undefined||_0x49a9a0===null)throw new Error('delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x3ad0a2[_0x24811d(0xbb)](_0x49a9a0);}default:return _0x3ad0a2[_0x433884](_0x5ad462);}}export async function executeSdkSql(_0x153825,_0x3dd2f7){const _0x34608c=a49_0x4674,_0x163f38=ensureClient();return _0x163f38[_0x34608c(0xd3)][_0x34608c(0xd5)]({'sqlCode':_0x153825,'params':_0x3dd2f7});}export async function executeSdkBff(_0x487218,_0x2d8f53){const _0x377151=a49_0x4674,_0x2b8dbf=ensureClient();return _0x2b8dbf[_0x377151(0xc5)][_0x377151(0xd5)]({'scriptName':_0x487218,'params':_0x2d8f53});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x3d8a76=a50_0x5d77;function a50_0x5d77(_0x5ee6a8,_0xb1d671){_0x5ee6a8=_0x5ee6a8-0x162;const _0x3dab3b=a50_0x3dab();let _0x5d77fd=_0x3dab3b[_0x5ee6a8];return _0x5d77fd;}(function(_0xe39d9a,_0x502fd3){const _0x27b08e=a50_0x5d77,_0x4cf87f=_0xe39d9a();while(!![]){try{const _0x2e09c6=-parseInt(_0x27b08e(0x164))/0x1+-parseInt(_0x27b08e(0x16c))/0x2*(parseInt(_0x27b08e(0x16b))/0x3)+-parseInt(_0x27b08e(0x16e))/0x4*(-parseInt(_0x27b08e(0x172))/0x5)+-parseInt(_0x27b08e(0x162))/0x6*(-parseInt(_0x27b08e(0x16d))/0x7)+-parseInt(_0x27b08e(0x175))/0x8*(-parseInt(_0x27b08e(0x169))/0x9)+parseInt(_0x27b08e(0x16f))/0xa*(-parseInt(_0x27b08e(0x171))/0xb)+parseInt(_0x27b08e(0x163))/0xc*(parseInt(_0x27b08e(0x168))/0xd);if(_0x2e09c6===_0x502fd3)break;else _0x4cf87f['push'](_0x4cf87f['shift']());}catch(_0x5b1ff7){_0x4cf87f['push'](_0x4cf87f['shift']());}}}(a50_0x3dab,0xc51bb));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';function a50_0x3dab(){const _0x2255e0=['105HkPDjP','164dSvUgT','10OfWfGj','\x20auth\x20login`.','10552509dRuVTs','195105tJeHuT','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','\x20or\x20run\x20`','3136DKWZJw','281124SiiFdF','876NxVmIS','1499147QLuZBR','Configure\x20accessKey\x20in\x20','Set\x20appcode\x20via\x20--appcode\x20or\x20','\x20file.','11089VhCROI','21951fpjKrS','newConfigFileName','3pqLcQH','110414pvCAbL'];a50_0x3dab=function(){return _0x2255e0;};return a50_0x3dab();}export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a50_0x3d8a76(0x165)+PRODUCT_CONFIG[a50_0x3d8a76(0x16a)]+a50_0x3d8a76(0x174)+CLI_BIN_NAME+a50_0x3d8a76(0x170),'configMissingHint':a50_0x3d8a76(0x166)+PRODUCT_CONFIG[a50_0x3d8a76(0x16a)]+'.','notInProjectHint':a50_0x3d8a76(0x173)+PRODUCT_CONFIG[a50_0x3d8a76(0x16a)]+a50_0x3d8a76(0x167)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a51_0x72a7(){var _0xc8ca3a=['7579560anYpmG','10473392ClmCBG','2161764JNacNE','31316391dKrmuq','28590LwSYjf','3uMVwOQ','959KSdTnB','179664YjWqSA','3219308KDrZpM'];a51_0x72a7=function(){return _0xc8ca3a;};return a51_0x72a7();}(function(_0x322dbb,_0x37b37f){var _0x3b3b4b=a51_0x46bd,_0xcc073=_0x322dbb();while(!![]){try{var _0x33a36d=parseInt(_0x3b3b4b(0xba))/0x1+parseInt(_0x3b3b4b(0xb5))/0x2+parseInt(_0x3b3b4b(0xb8))/0x3*(parseInt(_0x3b3b4b(0xb2))/0x4)+parseInt(_0x3b3b4b(0xb3))/0x5+-parseInt(_0x3b3b4b(0xb7))/0x6*(parseInt(_0x3b3b4b(0xb9))/0x7)+parseInt(_0x3b3b4b(0xb4))/0x8+-parseInt(_0x3b3b4b(0xb6))/0x9;if(_0x33a36d===_0x37b37f)break;else _0xcc073['push'](_0xcc073['shift']());}catch(_0x328929){_0xcc073['push'](_0xcc073['shift']());}}}(a51_0x72a7,0xb9127));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a51_0x5b50a9}from'@lovrabet/cli-framework';function a51_0x46bd(_0x37d929,_0x177300){_0x37d929=_0x37d929-0xb2;var _0x72a7ab=a51_0x72a7();var _0x46bd6c=_0x72a7ab[_0x37d929];return _0x46bd6c;}export function buildAllFlags(_0xcc6819){return a51_0x5b50a9(_0xcc6819,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x56cbc6,_0x2cd076){const _0x4c72d9=a52_0x4ea3,_0x406007=_0x56cbc6();while(!![]){try{const _0x3920af=-parseInt(_0x4c72d9(0xf0))/0x1*(-parseInt(_0x4c72d9(0xf6))/0x2)+parseInt(_0x4c72d9(0xed))/0x3*(-parseInt(_0x4c72d9(0xea))/0x4)+-parseInt(_0x4c72d9(0xec))/0x5+parseInt(_0x4c72d9(0xf2))/0x6+-parseInt(_0x4c72d9(0xf5))/0x7+parseInt(_0x4c72d9(0xf1))/0x8*(parseInt(_0x4c72d9(0xee))/0x9)+parseInt(_0x4c72d9(0xf3))/0xa*(-parseInt(_0x4c72d9(0xef))/0xb);if(_0x3920af===_0x2cd076)break;else _0x406007['push'](_0x406007['shift']());}catch(_0x47edab){_0x406007['push'](_0x406007['shift']());}}}(a52_0x52a4,0x4a780));function a52_0x52a4(){const _0x11a5eb=['1616616lLlTxH','230KPyfPT','body','1013250ivbdKg','606278LFaXTj','580BCQxnC','description','2705370ToVIdb','1830vrdbjk','9YxsFBO','122507bvnRVs','2YQEBAK','3677880MxStEF'];a52_0x52a4=function(){return _0x11a5eb;};return a52_0x52a4();}function a52_0x4ea3(_0x546e26,_0x5d79a2){_0x546e26=_0x546e26-0xea;const _0x52a4f6=a52_0x52a4();let _0x4ea317=_0x52a4f6[_0x546e26];return _0x4ea317;}export function dryRun(_0x21c295,_0x3b1b1b){const _0x48f178={'method':_0x21c295,'url':_0x3b1b1b},_0x4aa855={'body'(_0x210497){const _0x1ae6d6=a52_0x4ea3;return _0x48f178[_0x1ae6d6(0xf4)]=_0x210497,_0x4aa855;},'description'(_0x1afb93){const _0x3819ce=a52_0x4ea3;return _0x48f178[_0x3819ce(0xeb)]=_0x1afb93,_0x4aa855;},'build'(){return{..._0x48f178};}};return _0x4aa855;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0x5687ad=a53_0x5ba3;(function(_0x1bb27a,_0x495820){const _0x41f65c=a53_0x5ba3,_0x325308=_0x1bb27a();while(!![]){try{const _0x28a133=parseInt(_0x41f65c(0xd9))/0x1+parseInt(_0x41f65c(0xd0))/0x2+parseInt(_0x41f65c(0xd8))/0x3*(-parseInt(_0x41f65c(0xda))/0x4)+-parseInt(_0x41f65c(0xd6))/0x5*(-parseInt(_0x41f65c(0xdb))/0x6)+-parseInt(_0x41f65c(0xd5))/0x7*(-parseInt(_0x41f65c(0xd1))/0x8)+-parseInt(_0x41f65c(0xd4))/0x9*(-parseInt(_0x41f65c(0xd2))/0xa)+-parseInt(_0x41f65c(0xd3))/0xb;if(_0x28a133===_0x495820)break;else _0x325308['push'](_0x325308['shift']());}catch(_0x373172){_0x325308['push'](_0x325308['shift']());}}}(a53_0x5ce3,0x96b32));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers['parseFlags'];function a53_0x5ba3(_0x8c0396,_0x183133){_0x8c0396=_0x8c0396-0xd0;const _0x5ce34f=a53_0x5ce3();let _0x5ba3e7=_0x5ce34f[_0x8c0396];return _0x5ba3e7;}function a53_0x5ce3(){const _0x2ce4e2=['560wUEdev','5KiNBHB','validateFlags','633345UOYSEJ','420947oCATfZ','4wOcOup','2248338nadRmQ','1528252JBTbSu','31072mlKLrn','80PPfaVB','18291933MTtUqA','698364YKaeMT'];a53_0x5ce3=function(){return _0x2ce4e2;};return a53_0x5ce3();}export const validateFlags=helpers[a53_0x5687ad(0xd7)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x33b453=a54_0xc710;(function(_0x4b7ff8,_0x42ddec){const _0x1167b5=a54_0xc710,_0x557f42=_0x4b7ff8();while(!![]){try{const _0x5c90c1=-parseInt(_0x1167b5(0x8a))/0x1+parseInt(_0x1167b5(0x92))/0x2+-parseInt(_0x1167b5(0x8b))/0x3*(-parseInt(_0x1167b5(0x89))/0x4)+-parseInt(_0x1167b5(0x91))/0x5+-parseInt(_0x1167b5(0x93))/0x6+-parseInt(_0x1167b5(0x94))/0x7+parseInt(_0x1167b5(0x8c))/0x8;if(_0x5c90c1===_0x42ddec)break;else _0x557f42['push'](_0x557f42['shift']());}catch(_0x4b53c0){_0x557f42['push'](_0x557f42['shift']());}}}(a54_0x39c4,0xb810e));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';const generators=createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':serviceRegistry,'getServiceEntry':getServiceEntry,'getServiceDefinitions':_0x3dd936=>serviceGroups[a54_0x33b453(0x8f)](_0x3dd936),'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20'+PRODUCT_CONFIG[a54_0x33b453(0x8e)]+'\x20or\x20--appcode).'});function a54_0xc710(_0x4394dd,_0x545cc5){_0x4394dd=_0x4394dd-0x89;const _0x39c4f3=a54_0x39c4();let _0xc71069=_0x39c4f3[_0x4394dd];return _0xc71069;}export function generateCommandHelp(_0x48a743){const _0x50845a=a54_0x33b453;return generators[_0x50845a(0x8d)](_0x48a743);}export const generateServiceHelp=generators[a54_0x33b453(0x90)];export const generateFullHelp=generators['generateFullHelp'];function a54_0x39c4(){const _0x246b82=['3716517RlvprF','2182196INVzwP','965594LjCcWH','3yExRRR','21678264byAuAh','generateCommandHelp','newConfigFileName','get','generateServiceHelp','501230KgYUTL','1182914NzsEWk','8976504iUtliQ'];a54_0x39c4=function(){return _0x246b82;};return a54_0x39c4();}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x58289e,_0x4971e3){var _0x5263cf=a55_0xb2f8,_0x2a24de=_0x58289e();while(!![]){try{var _0x19065a=-parseInt(_0x5263cf(0x1b4))/0x1*(parseInt(_0x5263cf(0x1b3))/0x2)+parseInt(_0x5263cf(0x1b9))/0x3+parseInt(_0x5263cf(0x1b8))/0x4*(parseInt(_0x5263cf(0x1b6))/0x5)+-parseInt(_0x5263cf(0x1ba))/0x6+-parseInt(_0x5263cf(0x1b2))/0x7*(-parseInt(_0x5263cf(0x1b0))/0x8)+parseInt(_0x5263cf(0x1b5))/0x9*(-parseInt(_0x5263cf(0x1af))/0xa)+-parseInt(_0x5263cf(0x1b7))/0xb*(-parseInt(_0x5263cf(0x1b1))/0xc);if(_0x19065a===_0x4971e3)break;else _0x2a24de['push'](_0x2a24de['shift']());}catch(_0x25567c){_0x2a24de['push'](_0x2a24de['shift']());}}}(a55_0x5a0a,0x22070));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';export{dryRun}from'../framework/dryrun.js';function a55_0xb2f8(_0x5c0043,_0x52fe7e){_0x5c0043=_0x5c0043-0x1af;var _0x5a0a94=a55_0x5a0a();var _0xb2f817=_0x5a0a94[_0x5c0043];return _0xb2f817;}export{riskLevelOrder,isValidFormat}from'../framework/types.js';function a55_0x5a0a(){var _0x4f3767=['1766792JqGBcL','651228cLEXSi','7zUnabu','10lHCwLL','39568JbMYeQ','45ucHEWR','1131670DCJDrm','11hGFbCZ','4MOsnbl','692730PFeclZ','815346AnMUpO','518510gzgqxI'];a55_0x5a0a=function(){return _0x4f3767;};return a55_0x5a0a();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x59daaa,_0x5dc5e4){const _0x297a84=a56_0x1137,_0x1a82f8=_0x59daaa();while(!![]){try{const _0x1de135=parseInt(_0x297a84(0xa9))/0x1*(-parseInt(_0x297a84(0x9b))/0x2)+parseInt(_0x297a84(0xa5))/0x3*(parseInt(_0x297a84(0xa2))/0x4)+parseInt(_0x297a84(0x9f))/0x5+-parseInt(_0x297a84(0xa1))/0x6*(-parseInt(_0x297a84(0x9d))/0x7)+-parseInt(_0x297a84(0xa8))/0x8*(-parseInt(_0x297a84(0x9a))/0x9)+parseInt(_0x297a84(0x9c))/0xa+parseInt(_0x297a84(0xab))/0xb*(-parseInt(_0x297a84(0xa7))/0xc);if(_0x1de135===_0x5dc5e4)break;else _0x1a82f8['push'](_0x1a82f8['shift']());}catch(_0x5daacc){_0x1a82f8['push'](_0x1a82f8['shift']());}}}(a56_0xcaff,0x9d11f));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});function a56_0xcaff(){const _0x355fe7=['error','18ZVEqJI','239082EoZjRU','11886380Fcuwxo','595pJpcwX','message','3937590AvtToX','url','57960VCwlnZ','537220bzolqe','format','pretty','9UlyfxB','_notice','804uLRvPm','1004952gBgSKB','1TNXXSc','update','441397rQEwiP'];a56_0xcaff=function(){return _0x355fe7;};return a56_0xcaff();}export function formatOutput(_0x48c978,_0x276b47){const _0x59ffba=a56_0x1137,_0x4079ac=_0x48c978[_0x59ffba(0xa6)],{_notice:_0x150000,..._0x567f47}=_0x48c978;void _0x150000,baseFormatOutput(_0x567f47,_0x276b47),_0x276b47[_0x59ffba(0xa3)]===_0x59ffba(0xa4)&&printPrettyNotice(_0x4079ac);}function a56_0x1137(_0x3d6e14,_0x14c095){_0x3d6e14=_0x3d6e14-0x99;const _0xcaff95=a56_0xcaff();let _0x11379f=_0xcaff95[_0x3d6e14];return _0x11379f;}function printPrettyNotice(_0x3172c2){const _0x570514=a56_0x1137;if(!_0x3172c2?.[_0x570514(0xaa)])return;console[_0x570514(0x99)](_0x3172c2[_0x570514(0xaa)][_0x570514(0x9e)]+'\x20('+_0x3172c2['update'][_0x570514(0xa0)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2009e6,_0x132da1){const _0x5bbd9f=a57_0x192b,_0x23a759=_0x2009e6();while(!![]){try{const _0x1a4e52=parseInt(_0x5bbd9f(0xc7))/0x1*(parseInt(_0x5bbd9f(0xc3))/0x2)+parseInt(_0x5bbd9f(0xd3))/0x3+-parseInt(_0x5bbd9f(0xcf))/0x4*(-parseInt(_0x5bbd9f(0xda))/0x5)+parseInt(_0x5bbd9f(0xd2))/0x6+-parseInt(_0x5bbd9f(0xcc))/0x7+-parseInt(_0x5bbd9f(0xd0))/0x8+parseInt(_0x5bbd9f(0xdc))/0x9*(-parseInt(_0x5bbd9f(0xdd))/0xa);if(_0x1a4e52===_0x132da1)break;else _0x23a759['push'](_0x23a759['shift']());}catch(_0x1c52a0){_0x23a759['push'](_0x23a759['shift']());}}}(a57_0x3fd2,0xd0de8));function toKebab(_0x327805){const _0x5f1c10=a57_0x192b;return _0x327805[_0x5f1c10(0xd8)](/_/g,'-')[_0x5f1c10(0xd8)](/-([A-Z]+)/g,(_0x387007,_0x3bed50)=>'-'+_0x3bed50[_0x5f1c10(0xcd)]())[_0x5f1c10(0xd8)](/([a-z0-9])([A-Z])/g,(_0x6e2766,_0x37c3cb,_0x89223f)=>_0x37c3cb+'-'+_0x89223f)[_0x5f1c10(0xcd)]();}function buildKnownFlags(_0x41a598){const _0x19631d=a57_0x192b,_0xce82d3=new Set();for(const _0x22eb32 of _0x41a598){_0xce82d3[_0x19631d(0xbf)](_0x22eb32[_0x19631d(0xd7)]),_0xce82d3['add'](toCamelCase(_0x22eb32['name']));}for(const _0x6a318 of[_0x19631d(0xbb),_0x19631d(0xbd),'yes','format']){_0xce82d3['add'](_0x6a318);}for(const _0x35b396 of['help',_0x19631d(0xc6),_0x19631d(0xce),_0x19631d(0xd1),_0x19631d(0xcb),_0x19631d(0xbe),'ci','global','version']){_0xce82d3[_0x19631d(0xbf)](_0x35b396);}return _0xce82d3;}function buildFlagTypeMap(_0x367b06){const _0xf9acb1=a57_0x192b,_0x5dd503=new Map();for(const _0x53303b of _0x367b06){_0x5dd503['set'](_0x53303b[_0xf9acb1(0xd7)],_0x53303b[_0xf9acb1(0xbc)]),_0x5dd503['set'](toCamelCase(_0x53303b[_0xf9acb1(0xd7)]),_0x53303b[_0xf9acb1(0xbc)]);}return _0x5dd503;}function toCamelCase(_0x443947){const _0x48384a=a57_0x192b;return _0x443947[_0x48384a(0xd8)](/-([a-z])/g,(_0x447f9f,_0x420a4c)=>_0x420a4c[_0x48384a(0xd5)]());}function a57_0x3fd2(){const _0xe2c1f0=['keys','push','env','1473KVMPJG','get','has','sticky','nonInteractive','10173324QkWmqt','toLowerCase','appcode','3150516wwdkIe','4613784Cjgmbv','app','9200934dyAEEy','2436504dCXgEr','length','toUpperCase','entries','name','replace','alias','5EQGaPu','corrected','4787928Yiukwl','10HhUqei','number','dry-run','type','dryRun','non-interactive','add','indexOf','slice','string','386WSXyxA'];a57_0x3fd2=function(){return _0xe2c1f0;};return a57_0x3fd2();}function aliasHandler(_0x46da3f,_0x15fb30){const _0x2c8e68=a57_0x192b,_0x5871ff=[];for(const _0x481918 of Object[_0x2c8e68(0xc4)](_0x46da3f)){if(_0x15fb30[_0x2c8e68(0xc9)](_0x481918))continue;const _0x1943cc=toKebab(_0x481918);_0x1943cc!==_0x481918&&_0x15fb30[_0x2c8e68(0xc9)](_0x1943cc)&&_0x5871ff['push']({'original':_0x481918,'corrected':_0x1943cc,'handler':_0x2c8e68(0xd9)});}return _0x5871ff;}function stickyHandler(_0x3e0ce1,_0x165bb4,_0x2befa0){const _0x47c420=a57_0x192b,_0x213090=[];for(const [_0x4c93bf,_0x3071e8]of Object[_0x47c420(0xd6)](_0x3e0ce1)){if(_0x3071e8!==!![])continue;for(let _0x5dfe25=_0x4c93bf[_0x47c420(0xd4)]-0x1;_0x5dfe25>0x0;_0x5dfe25--){const _0x2fb1dd=_0x4c93bf[_0x47c420(0xc1)](0x0,_0x5dfe25),_0x3e04ef=_0x4c93bf[_0x47c420(0xc1)](_0x5dfe25),_0x3a574d=toKebab(_0x2fb1dd),_0x17f5a2=toCamelCase(_0x2fb1dd),_0xe50982=_0x165bb4[_0x47c420(0xc9)](_0x2fb1dd)?_0x2fb1dd:_0x165bb4[_0x47c420(0xc9)](_0x3a574d)?_0x3a574d:_0x165bb4['has'](_0x17f5a2)?_0x17f5a2:null;if(!_0xe50982)continue;const _0x357ca5=_0x2befa0[_0x47c420(0xc8)](_0xe50982)??_0x47c420(0xc2);let _0x56595d;if(_0x357ca5==='number'){const _0x3adced=Number(_0x3e04ef);if(isNaN(_0x3adced)||_0x3e04ef==='')continue;_0x56595d=_0x3adced;}else{if(_0x357ca5==='boolean')continue;else{if(_0x3e04ef==='')continue;_0x56595d=_0x3e04ef;}}_0x213090[_0x47c420(0xc5)]({'original':_0x4c93bf,'corrected':_0xe50982+'='+_0x56595d,'handler':_0x47c420(0xca)});break;}}return _0x213090;}function a57_0x192b(_0x3fa24d,_0x125b05){_0x3fa24d=_0x3fa24d-0xbb;const _0x3fd2ef=a57_0x3fd2();let _0x192bdd=_0x3fd2ef[_0x3fa24d];return _0x192bdd;}export function correctFlags(_0x3d4cbe,_0x1af1eb){const _0x148783=a57_0x192b,_0x1e8615=buildKnownFlags(_0x1af1eb),_0x179671=buildFlagTypeMap(_0x1af1eb),_0x539257=aliasHandler(_0x3d4cbe,_0x1e8615),_0x8a000d=stickyHandler(_0x3d4cbe,_0x1e8615,_0x179671),_0x48d290=[..._0x539257,..._0x8a000d];if(_0x48d290[_0x148783(0xd4)]===0x0)return{'flags':_0x3d4cbe,'corrections':[]};const _0x44d2bb={..._0x3d4cbe},_0x2d682b=new Set();for(const _0x138b3a of _0x539257){_0x44d2bb[_0x138b3a['corrected']]=_0x3d4cbe[_0x138b3a['original']],_0x2d682b['add'](_0x138b3a['original']);}for(const _0x260039 of _0x8a000d){const _0x3192be=_0x260039[_0x148783(0xdb)][_0x148783(0xc0)]('='),_0x3328de=_0x260039['corrected']['slice'](0x0,_0x3192be),_0x55b3ef=_0x260039['corrected']['slice'](_0x3192be+0x1),_0x4bfc42=_0x179671[_0x148783(0xc8)](_0x3328de)??'string';_0x4bfc42===_0x148783(0xde)?_0x44d2bb[_0x3328de]=Number(_0x55b3ef):_0x44d2bb[_0x3328de]=_0x55b3ef,_0x2d682b['add'](_0x260039['original']);}for(const _0x5ad134 of _0x2d682b){delete _0x44d2bb[_0x5ad134];}return{'flags':_0x44d2bb,'corrections':_0x48d290};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a58_0x52da(){var _0x4801c9=['75546sphRrS','75885LSqHNs','41432ntQSOo','5081555umdeqM','2473232ZXXBWO','99KjmbDW','3817413ULAfcu','154guhHrh','8jnbTwF','55lizZyn','460930GgHaDZ'];a58_0x52da=function(){return _0x4801c9;};return a58_0x52da();}function a58_0x8820(_0x189238,_0x5ddf54){_0x189238=_0x189238-0x111;var _0x52dae6=a58_0x52da();var _0x882098=_0x52dae6[_0x189238];return _0x882098;}(function(_0x7c1065,_0xb0ed11){var _0x205c56=a58_0x8820,_0x1e4cca=_0x7c1065();while(!![]){try{var _0x24e486=-parseInt(_0x205c56(0x111))/0x1*(-parseInt(_0x205c56(0x118))/0x2)+-parseInt(_0x205c56(0x116))/0x3+parseInt(_0x205c56(0x114))/0x4+parseInt(_0x205c56(0x113))/0x5+-parseInt(_0x205c56(0x11b))/0x6*(-parseInt(_0x205c56(0x117))/0x7)+parseInt(_0x205c56(0x112))/0x8*(-parseInt(_0x205c56(0x115))/0x9)+-parseInt(_0x205c56(0x11a))/0xa*(parseInt(_0x205c56(0x119))/0xb);if(_0x24e486===_0xb0ed11)break;else _0x1e4cca['push'](_0x1e4cca['shift']());}catch(_0x12de12){_0x1e4cca['push'](_0x1e4cca['shift']());}}}(a58_0x52da,0x9ff98));export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44658d,_0x4ef229){const _0x12bf11=a59_0x42f1,_0x43899a=_0x44658d();while(!![]){try{const _0x40be0e=-parseInt(_0x12bf11(0xb6))/0x1+-parseInt(_0x12bf11(0xbc))/0x2*(parseInt(_0x12bf11(0xbd))/0x3)+-parseInt(_0x12bf11(0xa1))/0x4*(parseInt(_0x12bf11(0xaf))/0x5)+parseInt(_0x12bf11(0xa7))/0x6*(-parseInt(_0x12bf11(0xbb))/0x7)+-parseInt(_0x12bf11(0xb8))/0x8*(-parseInt(_0x12bf11(0xae))/0x9)+-parseInt(_0x12bf11(0xb2))/0xa*(-parseInt(_0x12bf11(0xa5))/0xb)+parseInt(_0x12bf11(0xa4))/0xc;if(_0x40be0e===_0x4ef229)break;else _0x43899a['push'](_0x43899a['shift']());}catch(_0x111ccd){_0x43899a['push'](_0x43899a['shift']());}}}(a59_0x3e8b,0x2dd7d));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x5e9517,_0x8aff0a,_0x363851){const _0x1dc657=a59_0x42f1,_0x1ab80a=buildConfirmationContext(_0x5e9517,_0x8aff0a,_0x363851),_0x4df56c=['⚠\x20\x20High-risk\x20operation:\x20'+_0x1ab80a[_0x1dc657(0xb5)]];return _0x1ab80a[_0x1dc657(0xb4)]&&_0x4df56c['push'](_0x1dc657(0xba)+_0x1ab80a[_0x1dc657(0xb4)]),_0x1ab80a[_0x1dc657(0xb9)]&&_0x4df56c[_0x1dc657(0xb1)](_0x1dc657(0xa3)+_0x1ab80a['affectedRecords']),_0x4df56c['push']('\x20\x20\x20Continue?\x20[y/N]\x20'),_0x4df56c;}export function reconstructCommandArgv(_0x5e7ef1,_0x5ce039){const _0x5799e4=a59_0x42f1,_0x14f7da=[CLI_BIN_NAME,_0x5e7ef1['service'],_0x5e7ef1[_0x5799e4(0xb3)]];for(const [_0x1829fb,_0x520846]of Object[_0x5799e4(0xb7)](_0x5ce039)){if(_0x520846===!![])_0x14f7da[_0x5799e4(0xb1)]('--'+_0x1829fb);else _0x520846!==![]&&_0x520846!==undefined&&_0x520846!==''&&_0x14f7da[_0x5799e4(0xb1)]('--'+_0x1829fb+'\x20'+JSON['stringify'](_0x520846));}return _0x14f7da[_0x5799e4(0xb1)](_0x5799e4(0xac)),_0x14f7da[_0x5799e4(0xad)]('\x20');}function buildConfirmationContext(_0x4ee483,_0x2d8f8d,_0x306478){const _0x448c8f=a59_0x42f1,_0x17b5de=extractAffectedRecords(_0x306478);return{'commandLabel':_0x2d8f8d,'description':_0x4ee483[_0x448c8f(0xb4)],'affectedRecords':_0x17b5de};}function a59_0x42f1(_0x38b4ce,_0x1219fd){_0x38b4ce=_0x38b4ce-0xa1;const _0x3e8ba9=a59_0x3e8b();let _0x42f1cf=_0x3e8ba9[_0x38b4ce];return _0x42f1cf;}function a59_0x3e8b(){const _0x448c0a=['\x20\x20\x20','148043xXevTM','662aFlLln','474gRhkFv','4VxFDgM','params=','\x20\x20\x20Affected:\x20','3771912lIUwaM','11TktYQW','code','6ZKdaxD','id=','name=','name','params','--yes','join','9gBTAww','1665910ZsfweH','length','push','844670aYHOKz','command','description','commandLabel','156963axBlNZ','entries','2820576PDVlld','affectedRecords'];a59_0x3e8b=function(){return _0x448c0a;};return a59_0x3e8b();}function extractAffectedRecords(_0x1a7bff){const _0x3ffad6=a59_0x42f1,_0x4be299=[];if(_0x1a7bff[_0x3ffad6(0xa6)])_0x4be299[_0x3ffad6(0xb1)]('code='+_0x1a7bff[_0x3ffad6(0xa6)]);if(_0x1a7bff['id'])_0x4be299[_0x3ffad6(0xb1)](_0x3ffad6(0xa8)+_0x1a7bff['id']);if(_0x1a7bff['name'])_0x4be299[_0x3ffad6(0xb1)](_0x3ffad6(0xa9)+_0x1a7bff[_0x3ffad6(0xaa)]);if(_0x1a7bff['params'])_0x4be299[_0x3ffad6(0xb1)](_0x3ffad6(0xa2)+_0x1a7bff[_0x3ffad6(0xab)]);return _0x4be299[_0x3ffad6(0xb0)]>0x0?_0x4be299['join'](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a60_0x1716(_0x216cc2,_0x5f5301){_0x216cc2=_0x216cc2-0x140;const _0x4e5bd6=a60_0x4e5b();let _0x171629=_0x4e5bd6[_0x216cc2];return _0x171629;}(function(_0x2febbd,_0x1897c9){const _0x47f56c=a60_0x1716,_0x212dde=_0x2febbd();while(!![]){try{const _0x1831b3=parseInt(_0x47f56c(0x141))/0x1+parseInt(_0x47f56c(0x148))/0x2+-parseInt(_0x47f56c(0x146))/0x3+-parseInt(_0x47f56c(0x140))/0x4+-parseInt(_0x47f56c(0x144))/0x5+-parseInt(_0x47f56c(0x145))/0x6*(parseInt(_0x47f56c(0x147))/0x7)+parseInt(_0x47f56c(0x149))/0x8;if(_0x1831b3===_0x1897c9)break;else _0x212dde['push'](_0x212dde['shift']());}catch(_0x1edff6){_0x212dde['push'](_0x212dde['shift']());}}}(a60_0x4e5b,0x66056));function a60_0x4e5b(){const _0x123d28=['21469VRVBpG','799362JqFDme','12697872NBOQGU','1647472bVvfUP','749153TuvKwW','string','trim','2684735vonYZy','1626QHIVsy','1614654hHohoR'];a60_0x4e5b=function(){return _0x123d28;};return a60_0x4e5b();}import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x2d078d){if(_0x2d078d instanceof LovrabetError)return CliErrors['validation'](userFacingLovrabetMessage(_0x2d078d));return _0x2d078d;}function userFacingLovrabetMessage(_0x5f338b){const _0x418148=a60_0x1716,_0x401636=_0x5f338b['description'];if(_0x401636!==undefined&&_0x401636!==null){if(typeof _0x401636===_0x418148(0x142)&&_0x401636['trim']())return _0x401636[_0x418148(0x143)]();try{return JSON['stringify'](_0x401636);}catch{}}return _0x5f338b['message'];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x420113=a61_0x1019;(function(_0x34af5a,_0x2da12d){const _0x53021a=a61_0x1019,_0x3584ca=_0x34af5a();while(!![]){try{const _0x57ab37=parseInt(_0x53021a(0x19e))/0x1+-parseInt(_0x53021a(0x190))/0x2+parseInt(_0x53021a(0x1a1))/0x3*(parseInt(_0x53021a(0x1ba))/0x4)+parseInt(_0x53021a(0x1c7))/0x5*(-parseInt(_0x53021a(0x1bc))/0x6)+parseInt(_0x53021a(0x18d))/0x7*(parseInt(_0x53021a(0x18b))/0x8)+parseInt(_0x53021a(0x183))/0x9+parseInt(_0x53021a(0x1a9))/0xa*(parseInt(_0x53021a(0x196))/0xb);if(_0x57ab37===_0x2da12d)break;else _0x3584ca['push'](_0x3584ca['shift']());}catch(_0x32f1f1){_0x3584ca['push'](_0x3584ca['shift']());}}}(a61_0x19e7,0xe7feb));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';export function resolveAuthMode(_0x33c308){const _0x233113=a61_0x1019;return void _0x33c308,AUTH_MODE[_0x233113(0x19b)];}export function createPipelineEnv(_0x15b8e5,_0x1bad8a){const _0x2dab32=a61_0x1019,_0x44188d=typeof _0x1bad8a[_0x2dab32(0x197)]===_0x2dab32(0x194)&&_0x1bad8a['app'][_0x2dab32(0x185)]();return{'rawFlags':_0x1bad8a,'appCode':_0x15b8e5['appCode']||productEnv(_0x2dab32(0x1aa))||(_0x44188d?undefined:readAppCodeFromConfig()),'appCodeSource':_0x15b8e5[_0x2dab32(0x186)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x1bad8a),'defaultFormat':_0x15b8e5[_0x2dab32(0x1b1)],'defaultPageSize':_0x15b8e5[_0x2dab32(0x1a4)],'defaultVerbose':_0x15b8e5[_0x2dab32(0x1be)],'riskLevel':_0x15b8e5[_0x2dab32(0x1b5)],'accessKey':_0x15b8e5[_0x2dab32(0x18a)],'env':_0x15b8e5['env'],'mergedCli':{'defaultApp':_0x15b8e5['defaultApp'],'currentApp':_0x15b8e5[_0x2dab32(0x1b0)],'appCode':_0x15b8e5[_0x2dab32(0x191)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a61_0x420113(0x1a7)](_0x50b4c0=>PIPELINE_FLAG_NAMES[a61_0x420113(0x1b3)](_0x50b4c0[a61_0x420113(0x1c1)]))[a61_0x420113(0x18f)](({name:_0x20f333,type:_0x3cc85f,description:_0x49319b})=>({'name':_0x20f333,'type':_0x3cc85f,'description':_0x49319b})),'formatOutput':formatOutput,'getCommandLabel'(_0x55e3aa){const _0x4319d5=a61_0x420113;return CLI_BIN_NAME+'\x20'+_0x55e3aa[_0x4319d5(0x195)]+'\x20'+_0x55e3aa[_0x4319d5(0x1b2)];},'riskPolicy':{'onViolation'(_0x2d6589){const _0x1daa28=a61_0x420113;console[_0x1daa28(0x1ad)](_0x2d6589);},'createError'(_0x932c1a){const _0x138ca0=a61_0x420113;return CliErrors[_0x138ca0(0x1bb)](_0x932c1a);}},async 'prepare'(_0x262bad,_0x4313f8){const _0x192c9f=a61_0x420113,_0x32f4cf=resolveAuthMode(_0x4313f8);if(_0x262bad[_0x192c9f(0x1c2)]!==![]){if(!_0x4313f8['accessKey'])throw CliErrors[_0x192c9f(0x18c)](_0x192c9f(0x19f)+PRODUCT_CONFIG['newConfigFileName']+_0x192c9f(0x1a0)+productEnvName(_0x192c9f(0x188))+'.');const {setActiveAK:_0x3750db}=await import('../core/api-client.js');_0x3750db(_0x4313f8['accessKey']);}let _0x129857='';if(_0x262bad[_0x192c9f(0x187)]!==![]){_0x129857=_0x4313f8['appCode']??'',_0x129857=await resolveExplicitAppName(_0x262bad,_0x4313f8,_0x129857);if(!_0x129857)throw CliErrors[_0x192c9f(0x199)]('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG[_0x192c9f(0x1b7)]+'.');}if(_0x129857){const {initSdkClient:_0x464247}=await import(_0x192c9f(0x1b6));_0x464247({'appCode':_0x129857,'env':_0x4313f8[_0x192c9f(0x193)]??_0x192c9f(0x1c3),'accessKey':_0x4313f8[_0x192c9f(0x18a)],'authMode':_0x32f4cf});}return{'defaults':{'booleans':{'verbose':_0x4313f8[_0x192c9f(0x1a8)]},'numbers':{'pagesize':_0x4313f8['defaultPageSize']}},'extras':{'appCode':_0x129857,'cookie':'','apiDomain':_0x4313f8[_0x192c9f(0x1bf)],'apiDir':'','accessKey':_0x4313f8[_0x192c9f(0x18a)],'envName':_0x4313f8['env'],'mergedCli':_0x4313f8['mergedCli']}};},async 'confirmHighRisk'({def:_0x2ee7ea,env:_0x3f44df,flags:_0x446ec5,commandLabel:_0x5d5ed2}){const _0x320bef=a61_0x420113;if(_0x3f44df[_0x320bef(0x1c4)]){const _0x4f1daa=reconstructCommandArgv(_0x2ee7ea,_0x446ec5);throw CliErrors['validation'](_0x320bef(0x18e)+_0x5d5ed2+_0x320bef(0x1c0)+('\x20\x20To\x20proceed:\x20'+_0x4f1daa));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x2ee7ea,_0x5d5ed2,_0x446ec5),'createCancelledError':_0x4ed942=>CliErrors['cancelled'](_0x4ed942)});},'mapDryRunError'(_0x22d10e){return mapUserFacingExecuteError(_0x22d10e);},'mapExecuteError'(_0x44b29a){return mapUserFacingExecuteError(_0x44b29a);},async 'finalize'(){const _0xc05e55=a61_0x420113,{clearActiveAK:_0x20cd60}=await import(_0xc05e55(0x19a));_0x20cd60();}};function a61_0x1019(_0x46ff40,_0x1fda5f){_0x46ff40=_0x46ff40-0x183;const _0x19e7d0=a61_0x19e7();let _0x101925=_0x19e7d0[_0x46ff40];return _0x101925;}async function resolveExplicitAppName(_0x3395ca,_0x20126b,_0x1c92d1){const _0x20717d=a61_0x420113;if(_0x3395ca[_0x20717d(0x187)]===![])return _0x1c92d1;const _0x50e539=typeof _0x20126b[_0x20717d(0x1af)]['app']==='string'?_0x20126b[_0x20717d(0x1af)][_0x20717d(0x197)][_0x20717d(0x185)]():'';if(!_0x50e539)return _0x1c92d1;const _0x202b82=typeof _0x20126b[_0x20717d(0x1af)]['appcode']===_0x20717d(0x194)&&_0x20126b[_0x20717d(0x1af)][_0x20717d(0x1c6)][_0x20717d(0x185)]()||productEnv(_0x20717d(0x1aa));if(_0x202b82||_0x20126b['appCodeSource']===_0x20717d(0x1ac))return _0x1c92d1;const {getRemoteAppList:_0x49d24b}=await import(_0x20717d(0x1a3)),_0xf6290e=await _0x49d24b({'env':_0x20126b[_0x20717d(0x193)]??_0x20717d(0x1c3),'accessKey':_0x20126b[_0x20717d(0x18a)]}),_0x253ddf=_0xf6290e[_0x20717d(0x1b4)][_0x20717d(0x184)](_0x3f203d=>_0x3f203d[_0x20717d(0x1ab)]===_0x50e539),_0xe841e3=_0x253ddf?.['appCode']?.[_0x20717d(0x185)]();if(_0xe841e3)return _0xe841e3;throw CliErrors[_0x20717d(0x198)](_0x20717d(0x1c5)+_0x50e539,_0x20717d(0x1a5)+CLI_BIN_NAME+_0x20717d(0x1ae)+_0x50e539+'.appcode\x20to\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');}export async function runCommand(_0x131303,_0x517b31){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x131303)?withUpdateNotice(_0x131303):_0x131303,_0x517b31,runnerAdapter);}function shouldAttachUpdateNotice(_0x42c648){const _0x317e59=a61_0x420113;return![_0x317e59(0x1a6),_0x317e59(0x1bd),_0x317e59(0x1b9)][_0x317e59(0x1b8)](_0x42c648[_0x317e59(0x195)]);}function withUpdateNotice(_0x3d03de){return{..._0x3d03de,async 'execute'(_0x23f9ec){const _0x4f725d=a61_0x1019,_0x3273dc=shouldResolveUpdateNotice(_0x23f9ec)?resolveLatestUpdateNotice()[_0x4f725d(0x1a2)](()=>null):Promise['resolve'](null),_0x3ac1df=await _0x3d03de[_0x4f725d(0x19d)](_0x23f9ec);return attachUpdateNotice(_0x3ac1df,await _0x3273dc);}};}function shouldResolveUpdateNotice(_0x270c8f){const _0x4792ff=a61_0x420113;return _0x270c8f[_0x4792ff(0x1b1)]===_0x4792ff(0x19c)&&!_0x270c8f['nonInteractive'];}function a61_0x19e7(){const _0x560ca8=['2217FaiPVx','Set\x20accessKey\x20in\x20','\x20or\x20pass\x20','74799vUdxpO','catch','../commands/app/remote-source.js','pageSize','Run\x20`','update','filter','defaultVerbose','3190TKczmq','APPCODE','appName','local-alias','error','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','rawFlags','currentApp','format','command','has','items','riskLevel','../core/sdk-client.js','newConfigFileName','includes','doctor','212yhulbn','cancelled','5435562IWAHDN','schema','verbose','apiDomain','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','name','requiresAuth','production','isNonInteractive','Unknown\x20app:\x20','appcode','5fdZMWC','6256125EiESWE','find','trim','appCodeSource','requiresAppCode','ACCESS_KEY','_notice','accessKey','72qqODZb','authRequired','990745MfaKTT','High-risk\x20operation\x20`','map','3737346nGKHpF','appCode','object','env','string','service','14905ZrfHYZ','app','validation','configMissing','../core/api-client.js','ClientAk','pretty','execute'];a61_0x19e7=function(){return _0x560ca8;};return a61_0x19e7();}function attachUpdateNotice(_0x12dba9,_0x10492f){const _0x1fa5b7=a61_0x420113;if(!_0x10492f||!_0x12dba9||typeof _0x12dba9!=='object')return _0x12dba9;const _0x483683=_0x12dba9,_0x3fb7bc=typeof _0x483683[_0x1fa5b7(0x189)]===_0x1fa5b7(0x192)&&_0x483683[_0x1fa5b7(0x189)]!==null?_0x483683[_0x1fa5b7(0x189)]:{};return{..._0x483683,'_notice':{..._0x3fb7bc,'update':_0x10492f}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25f838,_0x56e829){const _0x1e5252=a62_0x15a1,_0x331ae8=_0x25f838();while(!![]){try{const _0x5db345=-parseInt(_0x1e5252(0xd2))/0x1+parseInt(_0x1e5252(0xd5))/0x2+parseInt(_0x1e5252(0xd9))/0x3+parseInt(_0x1e5252(0xdb))/0x4+-parseInt(_0x1e5252(0xd7))/0x5+-parseInt(_0x1e5252(0xd4))/0x6*(-parseInt(_0x1e5252(0xd8))/0x7)+parseInt(_0x1e5252(0xd3))/0x8*(-parseInt(_0x1e5252(0xda))/0x9);if(_0x5db345===_0x56e829)break;else _0x331ae8['push'](_0x331ae8['shift']());}catch(_0x5372d4){_0x331ae8['push'](_0x331ae8['shift']());}}}(a62_0x238a,0xeb8a9));function a62_0x15a1(_0x3a5c83,_0x1be055){_0x3a5c83=_0x3a5c83-0xd2;const _0x238a2a=a62_0x238a();let _0x15a1c4=_0x238a2a[_0x3a5c83];return _0x15a1c4;}function a62_0x238a(){const _0x247249=['1546132iJPGDO','5106777qTjTvQ','21537ChyfvW','3912496pQzAEr','185114NGaOuB','4888ZasmFj','18wACbbf','1002948ltdqtC','../commands/registry.js','6162355UEEarB'];a62_0x238a=function(){return _0x247249;};return a62_0x238a();}import{buildSchemaPayload as a62_0x350d39}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x27fcc5=a62_0x15a1,{serviceRegistry:_0x23dc09,findDefinition:_0x1e9020}=await import(_0x27fcc5(0xd6));return a62_0x350d39({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':_0x23dc09,'buildAllFlags':buildAllFlags,'findDefinition':_0x1e9020});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd06828,_0xb01286){var _0x13668e=a63_0x781a,_0x480bc0=_0xd06828();while(!![]){try{var _0xba03fa=-parseInt(_0x13668e(0x1eb))/0x1+parseInt(_0x13668e(0x1f0))/0x2+-parseInt(_0x13668e(0x1ed))/0x3+-parseInt(_0x13668e(0x1ef))/0x4+parseInt(_0x13668e(0x1ea))/0x5*(parseInt(_0x13668e(0x1ee))/0x6)+-parseInt(_0x13668e(0x1f1))/0x7+parseInt(_0x13668e(0x1ec))/0x8;if(_0xba03fa===_0xb01286)break;else _0x480bc0['push'](_0x480bc0['shift']());}catch(_0x51c752){_0x480bc0['push'](_0x480bc0['shift']());}}}(a63_0x12d1,0x5f0e6));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a63_0x781a(_0x523feb,_0x72080f){_0x523feb=_0x523feb-0x1ea;var _0x12d18e=a63_0x12d1();var _0x781a91=_0x12d18e[_0x523feb];return _0x781a91;}function a63_0x12d1(){var _0x4063b7=['1630566CtRJtj','201750ElUkdE','964516qDVOBE','875898ULvkob','252175uxxpif','45tFyNWA','282373CbnjMb','6014600yLSCtc'];a63_0x12d1=function(){return _0x4063b7;};return a63_0x12d1();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a64_0x47db9e=a64_0x50b1;(function(_0x59b77f,_0x235804){const _0x2b5328=a64_0x50b1,_0x3d3290=_0x59b77f();while(!![]){try{const _0x1a21f0=parseInt(_0x2b5328(0x1aa))/0x1+parseInt(_0x2b5328(0x1ab))/0x2+-parseInt(_0x2b5328(0x1a0))/0x3+-parseInt(_0x2b5328(0x1a3))/0x4+parseInt(_0x2b5328(0x1a4))/0x5+parseInt(_0x2b5328(0x1a9))/0x6*(-parseInt(_0x2b5328(0x1a5))/0x7)+parseInt(_0x2b5328(0x1a6))/0x8*(parseInt(_0x2b5328(0x1a8))/0x9);if(_0x1a21f0===_0x235804)break;else _0x3d3290['push'](_0x3d3290['shift']());}catch(_0x478879){_0x3d3290['push'](_0x3d3290['shift']());}}}(a64_0x7d9b,0x2cf85));export const VERSION=a64_0x47db9e(0x1a7);function a64_0x50b1(_0x1680aa,_0x1ac29f){_0x1680aa=_0x1680aa-0x1a0;const _0x7d9bc7=a64_0x7d9b();let _0x50b1b6=_0x7d9bc7[_0x1680aa];return _0x50b1b6;}export const GIT_TAG=a64_0x47db9e(0x1a2);export const GIT_COMMIT='ca188fe';export const BUILD_TIME=a64_0x47db9e(0x1a1);function a64_0x7d9b(){const _0x123fd2=['28152pIDuMb','44250HALogP','2026-06-11T11:24:17.120Z','v2.0.13-beta.8','1279604UVbfgE','1017320bqdMLG','63oFDaNl','217176SvoqIK','2.0.13','117uLEuNC','218754ZgZHUF','276528FSswdT'];a64_0x7d9b=function(){return _0x123fd2;};return a64_0x7d9b();}
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2b19ed,_0x2cb49b){const _0x1dc406=a65_0x1cd6,_0x8a30f3=_0x2b19ed();while(!![]){try{const _0x2839a7=-parseInt(_0x1dc406(0x104))/0x1*(parseInt(_0x1dc406(0x105))/0x2)+parseInt(_0x1dc406(0xfd))/0x3*(parseInt(_0x1dc406(0x103))/0x4)+parseInt(_0x1dc406(0x100))/0x5+-parseInt(_0x1dc406(0xfe))/0x6+parseInt(_0x1dc406(0x102))/0x7+-parseInt(_0x1dc406(0x106))/0x8*(parseInt(_0x1dc406(0x101))/0x9)+parseInt(_0x1dc406(0xfb))/0xa;if(_0x2839a7===_0x2cb49b)break;else _0x8a30f3['push'](_0x8a30f3['shift']());}catch(_0x2e71a0){_0x8a30f3['push'](_0x8a30f3['shift']());}}}(a65_0x50ce,0x3d20a));import{jsx as a65_0x3094d4,jsxs as a65_0x289c53}from'react/jsx-runtime';function a65_0x1cd6(_0x357354,_0x1e06a0){_0x357354=_0x357354-0xfb;const _0x50cecb=a65_0x50ce();let _0x1cd641=_0x50cecb[_0x357354];return _0x1cd641;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a65_0x50ce(){const _0x42bfae=['70osLVZm','3183864sGkygh','green','2775220YCySoA','\x20to\x20view\x20available\x20commands.','39UjtwwV','1613910haUreK','\x20--help','1038785AdPlDZ','9vhMiKp','2305023xrOqjG','126964HTMOBo','8853CuKBag'];a65_0x50ce=function(){return _0x42bfae;};return a65_0x50ce();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x4503cd=a65_0x1cd6,{exit:_0x21f297}=useApp();return useEffect(()=>{_0x21f297();},[_0x21f297]),a65_0x289c53(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a65_0x3094d4(Box,{'children':a65_0x3094d4(Text,{'bold':!![],'color':_0x4503cd(0x107),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a65_0x289c53(Box,{'marginTop':0x1,'children':[a65_0x3094d4(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a65_0x3094d4(Text,{'bold':!![],'color':_0x4503cd(0x107),'children':CLI_BIN_NAME+_0x4503cd(0xff)}),a65_0x3094d4(Text,{'dimColor':!![],'children':_0x4503cd(0xfc)})]})]});}
|