@lovrabet/lovrabet-cli 2.0.13-beta.8 → 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 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a46_0x1bc5c2=a46_0x3dea;function a46_0x3dea(_0x3b6e85,_0x2d778e){_0x3b6e85=_0x3b6e85-0x14c;const _0x1487e9=a46_0x1487();let _0x3dea63=_0x1487e9[_0x3b6e85];return _0x3dea63;}(function(_0x747d80,_0x326e0b){const _0x7b2ee2=a46_0x3dea,_0x5d0b78=_0x747d80();while(!![]){try{const _0x50097b=-parseInt(_0x7b2ee2(0x163))/0x1+-parseInt(_0x7b2ee2(0x15e))/0x2*(-parseInt(_0x7b2ee2(0x188))/0x3)+-parseInt(_0x7b2ee2(0x17a))/0x4+parseInt(_0x7b2ee2(0x18a))/0x5*(parseInt(_0x7b2ee2(0x14f))/0x6)+-parseInt(_0x7b2ee2(0x16f))/0x7+parseInt(_0x7b2ee2(0x18d))/0x8+-parseInt(_0x7b2ee2(0x177))/0x9*(-parseInt(_0x7b2ee2(0x155))/0xa);if(_0x50097b===_0x326e0b)break;else _0x5d0b78['push'](_0x5d0b78['shift']());}catch(_0x341c33){_0x5d0b78['push'](_0x5d0b78['shift']());}}}(a46_0x1487,0xf1e57));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['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a46_0x1bc5c2(0x185)];function resolveConfigPath(_0x50a0cd){for(const _0x513002 of CONFIG_NAMES){const _0x16c8aa=resolve(_0x50a0cd,_0x513002);if(existsSync(_0x16c8aa))return _0x16c8aa;}return undefined;}export function resolveWriteConfigPath(_0x208fd4){const _0x2cd57d=a46_0x1bc5c2,_0x1a929b=_0x208fd4===_0x2cd57d(0x189)?process[_0x2cd57d(0x15a)]():homedir(),_0x383940=resolveConfigPath(_0x1a929b);return _0x383940??resolve(_0x1a929b,NEW_CONFIG_NAME);}export function readConfigFile(_0x4667d4){const _0x5e454c=a46_0x1bc5c2;try{if(existsSync(_0x4667d4)){const _0x294b65=readFileSync(_0x4667d4,{'encoding':_0x5e454c(0x159)});if(_0x294b65){const _0x59ac75=JSON[_0x5e454c(0x157)](_0x294b65);return migrateOnlineEnv(_0x4667d4,_0x59ac75),_0x59ac75;}}}catch{}return{};}function migrateOnlineEnv(_0x1a355e,_0x2f5860){const _0x51701f=a46_0x1bc5c2;let _0xe188f3=![];_0x2f5860['env']===_0x51701f(0x166)&&(_0x2f5860[_0x51701f(0x17b)]=_0x51701f(0x15d),_0xe188f3=!![]);if(_0x2f5860[_0x51701f(0x16e)]&&typeof _0x2f5860[_0x51701f(0x16e)]===_0x51701f(0x158))for(const _0x553654 of Object['values'](_0x2f5860['apps'])){_0x553654&&_0x553654[_0x51701f(0x17b)]===_0x51701f(0x166)&&(_0x553654[_0x51701f(0x17b)]=_0x51701f(0x15d),_0xe188f3=!![]);}if(_0xe188f3)try{writeConfigFile(_0x1a355e,_0x2f5860);}catch{}}export function writeConfigFile(_0xa5f233,_0x21fc39){const _0x750c56=a46_0x1bc5c2,_0x5bc0ad=dirname(_0xa5f233);!existsSync(_0x5bc0ad)&&mkdirSync(_0x5bc0ad,{'recursive':!![]});const _0x510910=_0xa5f233+'.tmp';try{writeFileSync(_0x510910,JSON['stringify'](_0x21fc39,null,0x2)+'\x0a',{'encoding':_0x750c56(0x159),'mode':0x180});try{renameSync(_0x510910,_0xa5f233);}catch(_0x3552be){if(_0x3552be[_0x750c56(0x162)]===_0x750c56(0x182)||_0x3552be[_0x750c56(0x162)]==='EXDEV'||_0x3552be[_0x750c56(0x162)]===_0x750c56(0x14c)){writeFileSync(_0xa5f233,JSON[_0x750c56(0x17d)](_0x21fc39,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x510910);}catch{}}else throw _0x3552be;}}catch(_0x5eeed8){try{unlinkSync(_0x510910);}catch{}throw _0x5eeed8;}}export function isNonInteractiveMode(_0x326c2c){const _0x1f6102=a46_0x1bc5c2;return!!(_0x326c2c['nonInteractive']||_0x326c2c['ci']||productEnvNames('CI')['some'](_0x4bf593=>process.env[_0x4bf593]===_0x1f6102(0x171))||process.env.CI==='true'||!process['stdout'][_0x1f6102(0x14e)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x353362=a46_0x1bc5c2;if(!process[_0x353362(0x156)][_0x353362(0x14e)])return![];try{const _0x3cc7ef=process[_0x353362(0x156)]['isRaw'];return process[_0x353362(0x156)]['setRawMode'](!![]),process[_0x353362(0x156)][_0x353362(0x170)](_0x3cc7ef??![]),!![];}catch{return![];}}export async function createContext(_0x5bd760){const _0x209b83=a46_0x1bc5c2,_0x4f9ed3=readRawConfig(),_0x5c0fb3=buildConfig(_0x4f9ed3,_0x5bd760);await initGlobalEnvironment(_0x5c0fb3);const {getUserDomain:_0xd92f61,getApiDomain:_0x278e96}=await import(_0x209b83(0x169)),_0x439f87={'apiDomain':_0x278e96(),'userDomain':_0xd92f61()},_0x34603e=await buildAuth(_0x5c0fb3);logger[_0x209b83(0x176)](process[_0x209b83(0x15a)]());const _0x212b4a=(CLI_BIN_NAME+'\x20'+process['argv'][_0x209b83(0x181)](0x2)[_0x209b83(0x187)]('\x20'))[_0x209b83(0x186)]();logger[_0x209b83(0x180)](_0x212b4a);const _0x52735f=isNonInteractiveMode(_0x5bd760);return{'config':_0x5c0fb3,'auth':_0x34603e,'logger':logger,'env':_0x439f87,'nonInteractive':_0x52735f};}export function buildConfigFromFlags(_0x229700){return buildConfig(readRawConfig(),_0x229700);}export function getLocalAppAliases(_0xa2a548){const _0x595b94=a46_0x1bc5c2;return _0xa2a548[_0x595b94(0x16e)]&&typeof _0xa2a548['apps']==='object'?_0xa2a548[_0x595b94(0x16e)]:{};}export function resolveLocalAppAliasCode(_0x1f0fd0,_0x2d6587){const _0x58ea1b=a46_0x1bc5c2;if(!_0x2d6587)return undefined;const _0x198bb6=getLocalAppAliases(_0x1f0fd0)[_0x2d6587],_0x4f6df6=_0x198bb6?.[_0x58ea1b(0x191)];return typeof _0x4f6df6===_0x58ea1b(0x154)&&_0x4f6df6[_0x58ea1b(0x186)]()?_0x4f6df6['trim']():undefined;}export function readAppCodeFromConfig(){const _0x2b0bcf=a46_0x1bc5c2,_0x52e10d=readRawConfig(),_0x130066=_0x52e10d[_0x2b0bcf(0x191)]??_0x52e10d[_0x2b0bcf(0x168)];if(typeof _0x130066===_0x2b0bcf(0x154)&&_0x130066[_0x2b0bcf(0x186)]())return _0x130066[_0x2b0bcf(0x186)]();const _0x47bdb7=resolveLocalAppAliasCode(_0x52e10d,typeof _0x52e10d['defaultApp']==='string'?_0x52e10d[_0x2b0bcf(0x17e)]:undefined);if(_0x47bdb7)return _0x47bdb7;const _0x5b40c5=normalizeEnv(String(_0x52e10d[_0x2b0bcf(0x17b)]||_0x2b0bcf(0x15d))),_0x404128=isDaily(_0x5b40c5)?_0x2b0bcf(0x16b):isDev(_0x5b40c5)?_0x2b0bcf(0x161):'production',_0x1b4c50=resolveCachedAppCode(typeof _0x52e10d[_0x2b0bcf(0x17e)]===_0x2b0bcf(0x154)?_0x52e10d['defaultApp']:undefined,_0x404128,typeof _0x52e10d[_0x2b0bcf(0x18c)]==='string'?_0x52e10d[_0x2b0bcf(0x18c)]:undefined);if(_0x1b4c50)return _0x1b4c50;const _0x13c9ca=Object[_0x2b0bcf(0x172)](getLocalAppAliases(_0x52e10d))[_0x2b0bcf(0x164)](_0x1729db=>_0x1729db?.['appcode']);return typeof _0x13c9ca?.[_0x2b0bcf(0x191)]===_0x2b0bcf(0x154)&&_0x13c9ca['appcode'][_0x2b0bcf(0x186)]()?_0x13c9ca['appcode']['trim']():undefined;}export function readScopedConfig(_0x53241f){const _0x539cd7=a46_0x1bc5c2,_0x3d965e=_0x53241f[_0x539cd7(0x15b)]?_0x539cd7(0x15b):_0x539cd7(0x189);return readConfigFile(resolveWriteConfigPath(_0x3d965e));}export function writeScopedConfig(_0x27d200,_0x3c6f44){const _0x51e62f=a46_0x1bc5c2,_0x530668=_0x3c6f44[_0x51e62f(0x15b)]?_0x51e62f(0x15b):_0x51e62f(0x189);writeConfigFile(resolveWriteConfigPath(_0x530668),_0x27d200);}export async function initGlobalEnvironment(_0x4649c9){const _0x6fcc1=a46_0x1bc5c2,{initEnv:_0x46f93f}=await import(_0x6fcc1(0x183));_0x46f93f(_0x4649c9[_0x6fcc1(0x17b)]);const {initDomains:_0x33b1ab}=await import(_0x6fcc1(0x169));_0x33b1ab({'apiDomain':_0x4649c9[_0x6fcc1(0x175)][_0x6fcc1(0x14d)]||_0x4649c9[_0x6fcc1(0x175)][_0x6fcc1(0x178)]||undefined,'userDomain':_0x4649c9[_0x6fcc1(0x175)]['userDomain']||undefined,'runtimeDomain':_0x4649c9[_0x6fcc1(0x175)]['runtimeDomain']||undefined});}export function getProjectConfigPath(){const _0x21a59e=a46_0x1bc5c2;return resolveConfigPath(process[_0x21a59e(0x15a)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x1a3fa3){const _0xdac237=a46_0x1bc5c2;if(!existsSync(_0x1a3fa3))return{'status':_0xdac237(0x17f)};try{const _0x2e8809=readFileSync(_0x1a3fa3,{'encoding':_0xdac237(0x159)});if(!_0x2e8809?.[_0xdac237(0x186)]())return{'status':'empty'};const _0x5daaa0=JSON['parse'](_0x2e8809);return{'status':'ok','data':_0x5daaa0};}catch(_0x1b35ac){return{'status':_0xdac237(0x16c),'message':_0x1b35ac instanceof Error?_0x1b35ac['message']:String(_0x1b35ac)};}}export function loadRawConfigLayers(_0x1532aa){const _0x4b52f=a46_0x1bc5c2;let _0x5a1589={},_0x2919fc={},_0x4bc74b,_0x337171;try{_0x4bc74b=resolveConfigPath(homedir());if(_0x4bc74b){const _0x410a43=readFileSync(_0x4bc74b,{'encoding':_0x4b52f(0x159)});if(_0x410a43)_0x5a1589=JSON[_0x4b52f(0x157)](_0x410a43);}}catch{}try{const _0x5d750b=_0x1532aa||process['cwd']();_0x337171=resolveConfigPath(_0x5d750b);if(_0x337171){const _0x2c2a55=readFileSync(_0x337171,{'encoding':_0x4b52f(0x159)});if(_0x2c2a55)_0x2919fc=JSON['parse'](_0x2c2a55);}}catch{}return{'globalPath':_0x4bc74b,'projectPath':_0x337171,'globalConfig':_0x5a1589,'projectConfig':_0x2919fc};}function mergeRawConfigLayers(_0x1ecd2c){const _0x2702ee=a46_0x1bc5c2,{globalConfig:_0x582ca8,projectConfig:_0x2c2200}=_0x1ecd2c;if(_0x2c2200[_0x2702ee(0x165)]===![]){const _0x3e0b28={..._0x2c2200};return delete _0x3e0b28[_0x2702ee(0x165)],_0x3e0b28;}const _0x5ceba1={..._0x582ca8,..._0x2c2200};if(_0x2702ee(0x17e)in _0x2c2200)_0x5ceba1['defaultApp']=_0x2c2200[_0x2702ee(0x17e)];else _0x582ca8[_0x2702ee(0x17e)]&&(_0x5ceba1[_0x2702ee(0x17e)]=_0x582ca8[_0x2702ee(0x17e)]);return _0x5ceba1;}function a46_0x1487(){const _0x43056c=['riskLevel','raw','setLogPath','2061ePixGf','host','projectConfig','1750712NxfgSo','env','authRequired','stringify','defaultApp','missing','setRawCommand','slice','EPERM','./constant/env.js','high-risk-write','newConfigFileName','trim','join','3UXozZQ','project','5zQXPjV','globalConfig','accessKey','31480wBbeCT','locale','ENV','local-alias','appcode','EACCES','apiDomain','isTTY','7813914ZgYbGa','VERBOSE','explicit','pageSize','read','string','38100TCbpnt','stdin','parse','object','utf8','cwd','global','FORMAT','production','2858642UNzBrA','format','maxRisk','development','code','783247stuIvv','find','inherit','online','ACCESS_KEY','app','./constant/domain.js','APPCODE','daily','error','write','apps','9774331TcxQHc','setRawMode','true','values','PAGE_SIZE'];a46_0x1487=function(){return _0x43056c;};return a46_0x1487();}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x52a481){return mergeRawConfigLayers(loadRawConfigLayers(_0x52a481));}export function readRawConfigWithLayers(_0x38e3b8){const _0xfa6e71=loadRawConfigLayers(_0x38e3b8);return{'config':mergeRawConfigLayers(_0xfa6e71),'layers':_0xfa6e71};}export function resolveDefaultAppSource(_0x3b7c65){const _0x506b43=a46_0x1bc5c2;if(_0x506b43(0x17e)in _0x3b7c65[_0x506b43(0x179)])return _0x506b43(0x189);if(_0x3b7c65[_0x506b43(0x179)]['inherit']===![])return null;if(_0x3b7c65[_0x506b43(0x18b)]['defaultApp'])return'global';return null;}function buildConfig(_0x467293,_0x22e0fc){const _0x42efa3=a46_0x1bc5c2,_0x5ce138=_0x467293['defaultApp']||undefined,_0x58110a=_0x22e0fc[_0x42efa3(0x168)]||env('APP')||undefined,_0x41aaa3=_0x58110a||_0x5ce138||undefined,_0x5427b8=env(_0x42efa3(0x167))||_0x467293[_0x42efa3(0x18c)]||undefined,_0x37f96f=_0x22e0fc[_0x42efa3(0x17b)]||env(_0x42efa3(0x18f))||_0x467293['env']||DEFAULT_CONFIG_VALUES[_0x42efa3(0x17b)],_0x5f0ad3=normalizeEnv(String(_0x37f96f)),_0x1b75b3=isDaily(_0x5f0ad3)?'daily':isDev(_0x5f0ad3)?_0x42efa3(0x161):_0x42efa3(0x15d),_0x1ea03e=resolveLocalAppAliasCode(_0x467293,_0x41aaa3),_0xea7653=resolveCachedAppCode(_0x41aaa3,_0x1b75b3,_0x5427b8),_0x336e56=typeof _0x22e0fc[_0x42efa3(0x191)]==='string'?_0x22e0fc[_0x42efa3(0x191)]:undefined,_0x4511f0=env(_0x42efa3(0x16a)),_0x488acb=_0x58110a?undefined:_0x467293[_0x42efa3(0x191)]||_0x467293[_0x42efa3(0x168)]||undefined,_0x1597c6=_0x336e56||_0x4511f0||_0x1ea03e||_0xea7653||_0x488acb||undefined,_0x3192a9=_0x336e56?_0x42efa3(0x151):_0x4511f0?_0x42efa3(0x17b):_0x1ea03e?_0x42efa3(0x190):_0xea7653?'cache':_0x488acb?'top-level':undefined,_0x427a21=_0x467293[_0x42efa3(0x18e)]||DEFAULT_CONFIG_VALUES[_0x42efa3(0x18e)],_0x27c0b9=undefined,_0x50bb57=_0x22e0fc[_0x42efa3(0x15f)]||env(_0x42efa3(0x15c))||_0x467293['format'],_0x47db98=normalizeLegacyOutputFormat(_0x50bb57),_0x5dcb79=env(_0x42efa3(0x173))||_0x467293[_0x42efa3(0x152)],_0x1f9815=_0x5dcb79?Number(_0x5dcb79)||undefined:undefined,_0x54a2a8=_0x467293['riskLevel']||_0x467293[_0x42efa3(0x160)],_0x1fc9a7=_0x54a2a8===_0x42efa3(0x153)||_0x54a2a8===_0x42efa3(0x16d)||_0x54a2a8===_0x42efa3(0x184)?_0x54a2a8:DEFAULT_CONFIG_VALUES[_0x42efa3(0x174)],_0x2e93a9=env(_0x42efa3(0x150)),_0x2a5f2c=_0x2e93a9==='1'||_0x2e93a9==='true';return{'appCode':typeof _0x1597c6===_0x42efa3(0x154)&&_0x1597c6['trim']()?_0x1597c6[_0x42efa3(0x186)]():undefined,'appCodeSource':_0x3192a9,'env':_0x1b75b3,'locale':_0x427a21,'cookie':_0x27c0b9,'accessKey':_0x5427b8,'format':_0x47db98,'pageSize':_0x1f9815,'riskLevel':_0x1fc9a7,'verbose':_0x2a5f2c,'defaultApp':_0x5ce138,'currentApp':typeof _0x41aaa3===_0x42efa3(0x154)?_0x41aaa3:undefined,'raw':_0x467293};}function env(_0x102a82){return productEnv(_0x102a82);}async function buildAuth(_0x532b1b){const _0x2e43d4=a46_0x1bc5c2,_0x2fea2b='',_0x5f5702=!!_0x532b1b[_0x2e43d4(0x18c)];return{'cookie':_0x2fea2b,'isLoggedIn':_0x5f5702,async 'getOrLogin'(){const _0x2ce8ec=_0x2e43d4;if(_0x5f5702)return _0x2fea2b;throw CliErrors[_0x2ce8ec(0x17c)]();}};}
|
|
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(_0x4fa71c,_0x310028){const _0x2e016b=a47_0x854a,_0x26ab9f=_0x4fa71c();while(!![]){try{const _0x529117=parseInt(_0x2e016b(0xbb))/0x1*(parseInt(_0x2e016b(0xab))/0x2)+-parseInt(_0x2e016b(0x72))/0x3+parseInt(_0x2e016b(0xa5))/0x4+parseInt(_0x2e016b(0xbd))/0x5*(-parseInt(_0x2e016b(0x93))/0x6)+-parseInt(_0x2e016b(0x76))/0x7*(parseInt(_0x2e016b(0xb8))/0x8)+-parseInt(_0x2e016b(0x9f))/0x9*(parseInt(_0x2e016b(0xc3))/0xa)+parseInt(_0x2e016b(0xa1))/0xb*(parseInt(_0x2e016b(0x84))/0xc);if(_0x529117===_0x310028)break;else _0x26ab9f['push'](_0x26ab9f['shift']());}catch(_0x85c4d4){_0x26ab9f['push'](_0x26ab9f['shift']());}}}(a47_0x2c65,0x1e395));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(_0x3d94fb){_activeAK=_0x3d94fb||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x4204a1,_0x57237e={}){const _0x491e09=a47_0x854a,{method:method=_0x491e09(0xaf),body:_0x79c303,headers:headers={},timeout:timeout=0x7530}=_0x57237e,_0x301cb6=_activeAK,_0x2697a5=getRuntimeDomain();if(!_0x301cb6)throw CliErrors[_0x491e09(0x8c)](_0x491e09(0xb1)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x8cfae=''+_0x2697a5+_0x4204a1,_0x5bc016={'X-User-AK':_0x301cb6},_0x3bd61c=new AbortController(),_0x149ca0=setTimeout(()=>_0x3bd61c[_0x491e09(0x6f)](),timeout);try{const _0x1bd4ce=await fetch(_0x8cfae,{'method':method,'headers':{'Content-Type':_0x491e09(0xb2),'X-Invoke-Source':PRODUCT_CONFIG[_0x491e09(0x6e)],..._0x5bc016,...headers},'body':_0x79c303?JSON[_0x491e09(0xa9)](_0x79c303):undefined,'signal':_0x3bd61c[_0x491e09(0x9b)]});let _0x17b799;try{_0x17b799=await _0x1bd4ce[_0x491e09(0x8a)]();}catch{throw CliErrors[_0x491e09(0x86)](_0x491e09(0xb4)+_0x1bd4ce[_0x491e09(0xaa)]+')',_0x1bd4ce[_0x491e09(0xaa)]>=0x190?_0x491e09(0x8f):undefined);}if(!_0x1bd4ce['ok']||_0x17b799[_0x491e09(0x7a)]===![])throw CliErrors[_0x491e09(0x86)](_0x17b799[_0x491e09(0x7e)]||_0x17b799[_0x491e09(0xb7)]||_0x491e09(0xba)+_0x1bd4ce[_0x491e09(0xaa)],_0x17b799[_0x491e09(0x7b)]?'API\x20error\x20code:\x20'+_0x17b799['errorCode']:undefined);return _0x17b799;}catch(_0x1bb5e1){if(_0x1bb5e1 instanceof Error&&_0x1bb5e1[_0x491e09(0x71)]===_0x491e09(0x7f))throw CliErrors[_0x491e09(0x86)](_0x491e09(0x91)+_0x8cfae);throw _0x1bb5e1;}finally{clearTimeout(_0x149ca0);}}async function apiBinaryRequest(_0x27e7b2,_0x480f78={}){const _0x581b94=a47_0x854a,{method:method=_0x581b94(0xaf),headers:headers={},timeout:timeout=0x7530}=_0x480f78,_0x50f57b=_activeAK,_0x25296=getRuntimeDomain();if(!_0x50f57b)throw CliErrors[_0x581b94(0x8c)](_0x581b94(0xb1)+PRODUCT_CONFIG[_0x581b94(0x95)]+'.');const _0x372999=''+_0x25296+_0x27e7b2,_0x257afe=new AbortController(),_0x508352=setTimeout(()=>_0x257afe[_0x581b94(0x6f)](),timeout);try{const _0x512ddf=await fetch(_0x372999,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x581b94(0x6e)],'X-User-AK':_0x50f57b,...headers},'signal':_0x257afe[_0x581b94(0x9b)]});if(!_0x512ddf['ok']){let _0x417bfb;try{const _0x5e730f=await _0x512ddf['json']();_0x417bfb=_0x5e730f['errorMsg']||_0x5e730f['message']||_0x5e730f[_0x581b94(0x7b)];}catch{_0x417bfb=await _0x512ddf[_0x581b94(0x7c)]()[_0x581b94(0x79)](()=>undefined);}throw CliErrors['apiError'](_0x417bfb||_0x581b94(0xba)+_0x512ddf[_0x581b94(0xaa)],_0x581b94(0xc5)+_0x372999);}return Buffer[_0x581b94(0x81)](await _0x512ddf['arrayBuffer']());}catch(_0x469369){if(_0x469369 instanceof Error&&_0x469369[_0x581b94(0x71)]===_0x581b94(0x7f))throw CliErrors['apiError'](_0x581b94(0x91)+_0x372999);throw _0x469369;}finally{clearTimeout(_0x508352);}}async function toolboxRequest(_0xeee8a1,_0x417bd9,_0x444d47={}){const _0x1b9b2b=a47_0x854a,{method:method=_0x1b9b2b(0xaf),headers:headers={},timeout:timeout=0x7530}=_0x444d47,_0x3f7070=_activeAK;if(!_0x3f7070)throw CliErrors['authRequired'](_0x1b9b2b(0xb1)+PRODUCT_CONFIG[_0x1b9b2b(0x95)]+'.');const _0x5dea8e=getApiDomain()[_0x1b9b2b(0x75)](/\/$/,''),_0x2e7652=new URL(_0xeee8a1,_0x5dea8e+_0x1b9b2b(0x97));if(_0x417bd9)for(const [_0x119f8f,_0x412c2f]of Object[_0x1b9b2b(0xc4)](_0x417bd9)){_0x412c2f!==undefined&&_0x412c2f!==null&&_0x2e7652[_0x1b9b2b(0xc0)][_0x1b9b2b(0x90)](_0x119f8f,String(_0x412c2f));}const _0xa8d08c=new AbortController(),_0xc8775d=setTimeout(()=>_0xa8d08c[_0x1b9b2b(0x6f)](),timeout);try{const _0x11f01f=await fetch(_0x2e7652,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x1b9b2b(0x6e)],'X-User-AK':_0x3f7070,...headers},'signal':_0xa8d08c['signal']});let _0x5a7c85;try{_0x5a7c85=await _0x11f01f['json']();}catch{throw CliErrors[_0x1b9b2b(0x86)](_0x1b9b2b(0xc7)+_0x11f01f[_0x1b9b2b(0xaa)]+')',_0x11f01f[_0x1b9b2b(0xaa)]>=0x190?_0x1b9b2b(0x8f):undefined);}if(!_0x11f01f['ok']){const _0x211693=_0x5a7c85&&typeof _0x5a7c85===_0x1b9b2b(0x87)?_0x5a7c85:{};throw CliErrors[_0x1b9b2b(0x86)](_0x211693[_0x1b9b2b(0x7e)]||_0x211693[_0x1b9b2b(0xb7)]||'Toolbox\x20API\x20error:\x20'+_0x11f01f[_0x1b9b2b(0xaa)],_0x211693[_0x1b9b2b(0x7b)]?_0x1b9b2b(0x9a)+_0x211693[_0x1b9b2b(0x7b)]:undefined);}if(_0x5a7c85&&typeof _0x5a7c85===_0x1b9b2b(0x87)&&_0x1b9b2b(0x7a)in _0x5a7c85&&typeof _0x5a7c85[_0x1b9b2b(0x7a)]===_0x1b9b2b(0xb9)){const _0x554b7a=_0x5a7c85;if(!_0x554b7a[_0x1b9b2b(0x7a)])throw CliErrors['apiError'](_0x554b7a[_0x1b9b2b(0x7e)]||_0x554b7a['message']||_0x1b9b2b(0x80),_0x554b7a[_0x1b9b2b(0x7b)]?_0x1b9b2b(0x9a)+_0x554b7a[_0x1b9b2b(0x7b)]:undefined);return _0x554b7a['data'];}return _0x5a7c85;}catch(_0x379768){if(_0x379768 instanceof Error&&_0x379768[_0x1b9b2b(0x71)]===_0x1b9b2b(0x7f))throw CliErrors[_0x1b9b2b(0x86)](_0x1b9b2b(0x91)+_0x2e7652[_0x1b9b2b(0xbc)]());throw _0x379768;}finally{clearTimeout(_0xc8775d);}}export async function getBffScriptInfo(_0x35df5d){const _0x3849b7=a47_0x854a,_0x457e98=await apiRequest(_0x3849b7(0x96)+_0x35df5d);if(!_0x457e98[_0x3849b7(0xbe)])throw CliErrors[_0x3849b7(0xb0)](_0x3849b7(0xa2)+_0x35df5d);return _0x457e98[_0x3849b7(0xbe)];}export async function getSqlQueryInfo(_0x3659ec,_0x378c2a){const _0xc77438=a47_0x854a,_0x1a0024=await apiRequest(_0xc77438(0xbf),{'method':_0xc77438(0xb6),'body':{'appCode':_0x3659ec,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x378c2a}}),_0x20e400=_0x1a0024['data'],_0x4fde71=_0x20e400&&typeof _0x20e400===_0xc77438(0x87)&&'tableData'in _0x20e400?_0x20e400[_0xc77438(0x83)]?.[0x0]:_0x20e400&&typeof _0x20e400===_0xc77438(0x87)&&_0xc77438(0xc9)in _0x20e400?_0x20e400:undefined;if(!_0x4fde71)throw CliErrors[_0xc77438(0xb0)](_0xc77438(0x8b)+_0x378c2a);return _0x4fde71;}function isRemoteAppItem(_0x971281){const _0x4cb21a=a47_0x854a;return!!_0x971281&&typeof _0x971281===_0x4cb21a(0x87)&&typeof _0x971281[_0x4cb21a(0x74)]===_0x4cb21a(0x92)&&typeof _0x971281[_0x4cb21a(0xac)]===_0x4cb21a(0x92);}function extractRemoteAppItems(_0x54d595){const _0x476f21=a47_0x854a;if(Array[_0x476f21(0xa7)](_0x54d595))return _0x54d595[_0x476f21(0xa8)](isRemoteAppItem);if(!_0x54d595||typeof _0x54d595!=='object')throw CliErrors[_0x476f21(0x86)](_0x476f21(0x77));const _0x691e1d=_0x54d595;if(Array[_0x476f21(0xa7)](_0x691e1d['tableData']))return _0x691e1d['tableData'][_0x476f21(0xa8)](isRemoteAppItem);if(_0x691e1d['data']&&typeof _0x691e1d[_0x476f21(0xbe)]===_0x476f21(0x87)){const _0x597fcb=_0x691e1d['data'];if(Array[_0x476f21(0xa7)](_0x597fcb[_0x476f21(0x83)]))return _0x597fcb[_0x476f21(0x83)][_0x476f21(0xa8)](isRemoteAppItem);}throw CliErrors[_0x476f21(0x86)]('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x505578=a47_0x854a,_0x7ba5e8=await apiRequest(_0x505578(0xc2));return extractRemoteAppItems(_0x7ba5e8[_0x505578(0xbe)]);}export async function getLoginUserInfo(){const _0x488cb6=a47_0x854a,_0x50087c=await apiRequest(_0x488cb6(0xae));if(!_0x50087c[_0x488cb6(0xbe)]||typeof _0x50087c['data']!=='object'||Array[_0x488cb6(0xa7)](_0x50087c[_0x488cb6(0xbe)]))throw CliErrors['apiError'](_0x488cb6(0x9e));return _0x50087c[_0x488cb6(0xbe)];}export async function listDatasets(_0x471eb2,_0x47929f){const _0x8546f8=a47_0x854a,_0x42319f=await apiRequest(_0x8546f8(0x82),{'method':_0x8546f8(0xb6),'body':{'appCode':_0x471eb2,..._0x47929f?.[_0x8546f8(0x89)]&&{'code':_0x47929f[_0x8546f8(0x89)]},..._0x47929f?.['name']&&{'name':_0x47929f[_0x8546f8(0x71)]}}});return extractList(_0x42319f['data']);}export async function getDatasetDetail(_0x3da6ed){const _0x4a3b58=a47_0x854a,_0x2c239c=/^\d+$/['test'](_0x3da6ed)?'id':_0x4a3b58(0x89),_0x4a3726=await apiRequest('/client/dataset/query?'+_0x2c239c+'='+_0x3da6ed);return _0x4a3726[_0x4a3b58(0xbe)];}export async function getDatasetSdkUsageDoc(_0x1d6257,_0x425317){const _0x43a553=a47_0x854a,_0x15bdda=await toolboxRequest(_0x43a553(0x98),{'datasetCode':_0x1d6257,'appCode':_0x425317});return typeof _0x15bdda?.[_0x43a553(0x6d)]===_0x43a553(0x92)?_0x15bdda[_0x43a553(0x6d)]:'';}export async function listRuntimeArtifacts(_0x382a78,_0x2ff2d4){const _0x1d9ca1=a47_0x854a,_0x43c1bc=new URLSearchParams({'appCode':_0x382a78});if(_0x2ff2d4?.[_0x1d9ca1(0xb3)])_0x43c1bc['set'](_0x1d9ca1(0xb3),_0x2ff2d4['artifactType']);if(_0x2ff2d4?.[_0x1d9ca1(0x70)])_0x43c1bc[_0x1d9ca1(0x90)]('source',_0x2ff2d4[_0x1d9ca1(0x70)]);if(_0x2ff2d4?.[_0x1d9ca1(0xc6)]!==undefined)_0x43c1bc[_0x1d9ca1(0x90)](_0x1d9ca1(0xc6),String(_0x2ff2d4[_0x1d9ca1(0xc6)]));const _0x49785b=await apiRequest(_0x1d9ca1(0xa6)+_0x43c1bc[_0x1d9ca1(0xbc)]());return Array['isArray'](_0x49785b[_0x1d9ca1(0xbe)])?_0x49785b[_0x1d9ca1(0xbe)]:[];}function a47_0x2c65(){const _0x489413=['name','47583IENpRz','/client/runtime-bff/personal/list?appCode=','appCode','replace','14fMLOII','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/execute?appCode=','catch','success','errorCode','text','/client/skill/company/list?appCode=','errorMsg','AbortError','Toolbox\x20API\x20error','from','/client/dataset/list','tableData','490128pBTqCL','/client/knowledge-base/personal/','apiError','object','/client/runtime-bff/personal/create','code','json','SQL\x20query\x20not\x20found:\x20','authRequired','/client/skill/','topK','Check\x20your\x20credentials\x20and\x20try\x20again.','set','Request\x20timeout:\x20','string','6JiGpTQ','/package?appCode=','newConfigFileName','/client/bff/query/','/api/node-toolbox/','api-doc-generator','?appCode=','Toolbox\x20error\x20code:\x20','signal','/client/skill/personal/','/client/knowledge-base/personal/create','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','18jFptuE','/update','33OboEkS','BFF\x20script\x20not\x20found:\x20id=','/client/artifact/','/client/skill/personal/list?appCode=','755848flKqEJ','/client/artifact/list?','isArray','filter','stringify','status','482842glsAJv','appName','query','/client/user/loginUserInfo','GET','validation','Configure\x20accessKey\x20in\x20','application/json','artifactType','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/skill/personal/create','POST','message','692704PpvzSV','boolean','API\x20error:\x20','1ykjMtb','toString','765575fWTYQt','data','/client/sql/query','searchParams','/client/knowledge-base/search','/client/app/my-apps','434830WbgoyZ','entries','Download\x20failed:\x20','favorite','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/runtime-bff/personal/','sqlCode','markdown','invokeSource','abort','source'];a47_0x2c65=function(){return _0x489413;};return a47_0x2c65();}export async function getRuntimeArtifact(_0x5e1da7,_0x4d8219){const _0x5cc2b7=a47_0x854a,_0x1db209=await apiRequest(_0x5cc2b7(0xa3)+_0x5e1da7+_0x5cc2b7(0x99)+encodeURIComponent(_0x4d8219));if(!_0x1db209[_0x5cc2b7(0xbe)])throw CliErrors[_0x5cc2b7(0xb0)]('Artifact\x20not\x20found:\x20id='+_0x5e1da7);return _0x1db209['data'];}export async function createRuntimeArtifact(_0x4e6aa8,_0x5d061d){const _0x38c443=a47_0x854a,_0x2cc56d=await apiRequest('/client/artifact/create',{'method':'POST','body':{'appCode':_0x4e6aa8,..._0x5d061d}});return _0x2cc56d[_0x38c443(0xbe)];}export async function updateRuntimeArtifact(_0xbdffef,_0x564bb9,_0x8268b2){const _0x154ca9=a47_0x854a,_0x98e2b5=await apiRequest(_0x154ca9(0xa3)+_0xbdffef+_0x154ca9(0xa0),{'method':_0x154ca9(0xb6),'body':{'appCode':_0x564bb9,..._0x8268b2}});return _0x98e2b5[_0x154ca9(0xbe)];}export async function listPersonalBffs(_0x5248fd){const _0x11c36f=a47_0x854a,_0x35a749=await apiRequest(_0x11c36f(0x73)+encodeURIComponent(_0x5248fd));return Array[_0x11c36f(0xa7)](_0x35a749['data'])?_0x35a749[_0x11c36f(0xbe)]:[];}export async function getPersonalBff(_0x5ea0be,_0x4e2988){const _0x340760=a47_0x854a,_0x11179b=await apiRequest(_0x340760(0xc8)+_0x5ea0be+'?appCode='+encodeURIComponent(_0x4e2988));if(!_0x11179b['data'])throw CliErrors[_0x340760(0xb0)]('Personal\x20BFF\x20not\x20found:\x20id='+_0x5ea0be);return _0x11179b[_0x340760(0xbe)];}export async function createPersonalBff(_0x5d6d16,_0x35f34e){const _0x4b06df=a47_0x854a,_0x5c980f=await apiRequest(_0x4b06df(0x88),{'method':_0x4b06df(0xb6),'body':{'appCode':_0x5d6d16,..._0x35f34e}});return _0x5c980f['data'];}export async function updatePersonalBff(_0xca90d9,_0x158634,_0x329889){const _0x2801de=a47_0x854a,_0x3f398a=await apiRequest(_0x2801de(0xc8)+_0xca90d9+'/update',{'method':_0x2801de(0xb6),'body':{'appCode':_0x158634,..._0x329889}});return _0x3f398a[_0x2801de(0xbe)];}export async function executePersonalBff(_0xa0964,_0x28d4af,_0x581520){const _0x6194ac=a47_0x854a,_0x44b84b=await apiRequest(_0x6194ac(0xc8)+_0xa0964+_0x6194ac(0x78)+encodeURIComponent(_0x28d4af),{'method':_0x6194ac(0xb6),'body':_0x581520});return _0x44b84b[_0x6194ac(0xbe)];}export async function listPersonalKnowledgeBaseItems(_0x218b18){const _0xff7317=a47_0x854a,_0x16384a=await apiRequest('/client/knowledge-base/personal/list?appCode='+encodeURIComponent(_0x218b18));return Array[_0xff7317(0xa7)](_0x16384a[_0xff7317(0xbe)])?_0x16384a[_0xff7317(0xbe)]:[];}export async function getPersonalKnowledgeBaseItem(_0x4acd5d,_0x3451af){const _0x21e25b=a47_0x854a,_0xff2bb9=await apiRequest(_0x21e25b(0x85)+_0x4acd5d+_0x21e25b(0x99)+encodeURIComponent(_0x3451af));if(!_0xff2bb9[_0x21e25b(0xbe)])throw CliErrors[_0x21e25b(0xb0)]('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0x4acd5d);return _0xff2bb9[_0x21e25b(0xbe)];}export async function createPersonalKnowledgeBaseItem(_0x339aae,_0x19cd10){const _0x38f288=a47_0x854a,_0x57201f=await apiRequest(_0x38f288(0x9d),{'method':_0x38f288(0xb6),'body':{'appCode':_0x339aae,..._0x19cd10}});return _0x57201f[_0x38f288(0xbe)];}export async function updatePersonalKnowledgeBaseItem(_0x17716a,_0x56a9e3,_0x4f2e49){const _0x115145=a47_0x854a,_0x421a48=await apiRequest(_0x115145(0x85)+_0x17716a+_0x115145(0xa0),{'method':_0x115145(0xb6),'body':{'appCode':_0x56a9e3,..._0x4f2e49}});return _0x421a48['data'];}export async function searchKnowledgeBase(_0x26f9cf,_0xd66dfb){const _0x70a89d=a47_0x854a,_0x38e43e=await apiRequest(_0x70a89d(0xc1),{'method':_0x70a89d(0xb6),'body':{'appCode':_0x26f9cf,'query':_0xd66dfb[_0x70a89d(0xad)],..._0xd66dfb['topK']!==undefined?{'topK':_0xd66dfb[_0x70a89d(0x8e)]}:{}}});return Array[_0x70a89d(0xa7)](_0x38e43e[_0x70a89d(0xbe)])?_0x38e43e[_0x70a89d(0xbe)]:[];}export async function listPersonalRuntimeSkills(_0x2b622b){const _0x45b0dd=a47_0x854a,_0x239da8=await apiRequest(_0x45b0dd(0xa4)+encodeURIComponent(_0x2b622b));return Array[_0x45b0dd(0xa7)](_0x239da8['data'])?_0x239da8[_0x45b0dd(0xbe)]:[];}export async function listCompanyRuntimeSkills(_0x428d99){const _0x39af1c=a47_0x854a,_0x58e5e3=await apiRequest(_0x39af1c(0x7d)+encodeURIComponent(_0x428d99));return Array['isArray'](_0x58e5e3[_0x39af1c(0xbe)])?_0x58e5e3[_0x39af1c(0xbe)]:[];}function a47_0x854a(_0x475a3a,_0x126360){_0x475a3a=_0x475a3a-0x6d;const _0x2c654=a47_0x2c65();let _0x854a8a=_0x2c654[_0x475a3a];return _0x854a8a;}export async function listVisibleRuntimeSkills(_0x87b30c){const _0x5dccb9=a47_0x854a,_0x3ee307=await apiRequest('/client/skill/list?appCode='+encodeURIComponent(_0x87b30c));return Array[_0x5dccb9(0xa7)](_0x3ee307[_0x5dccb9(0xbe)])?_0x3ee307[_0x5dccb9(0xbe)]:[];}export async function createPersonalRuntimeSkill(_0x4ca6c3,_0x471a28){const _0x31f035=a47_0x854a,_0x3e2c3d=await apiRequest(_0x31f035(0xb5),{'method':_0x31f035(0xb6),'body':{'appCode':_0x4ca6c3,..._0x471a28}});return _0x3e2c3d[_0x31f035(0xbe)];}export async function updatePersonalRuntimeSkill(_0x3aa999,_0x35ba06,_0x5327c4){const _0x14fe12=a47_0x854a,_0x55049=await apiRequest(_0x14fe12(0x9c)+encodeURIComponent(_0x3aa999)+_0x14fe12(0xa0),{'method':_0x14fe12(0xb6),'body':{'appCode':_0x35ba06,..._0x5327c4}});return _0x55049['data'];}export async function downloadRuntimeSkillPackage(_0x7f58b8,_0x474472,_0xf3bbf3){const _0x1e38be=a47_0x854a;return apiBinaryRequest(_0x1e38be(0x8d)+encodeURIComponent(_0x7f58b8)+'/'+encodeURIComponent(_0x474472)+_0x1e38be(0x94)+encodeURIComponent(_0xf3bbf3));}
|
|
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
|
-
(function(
|
|
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
|
-
|
|
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
|
-
(function(
|
|
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
|
-
(function(
|
|
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();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
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
|
-
(function(
|
|
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)})]})]});}
|