@lovrabet/lovrabet-cli 2.1.21 → 2.1.22-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.d.ts +4 -0
- package/lib/commands/skill/commands/diagram.js +1 -0
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.d.ts +5 -0
- package/lib/commands/skill/diagram.js +1 -0
- package/lib/commands/skill/flags.d.ts +6 -0
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.d.ts +4 -0
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +52 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -1
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x547fbb,_0x532d36){const _0x3ca6f9=a76_0x2466,_0x43cc17=_0x547fbb();while(!![]){try{const _0x246764=-parseInt(_0x3ca6f9(0xbf))/0x1*(-parseInt(_0x3ca6f9(0xf2))/0x2)+-parseInt(_0x3ca6f9(0xcc))/0x3*(parseInt(_0x3ca6f9(0x112))/0x4)+parseInt(_0x3ca6f9(0xe3))/0x5*(parseInt(_0x3ca6f9(0xb2))/0x6)+parseInt(_0x3ca6f9(0xfa))/0x7+parseInt(_0x3ca6f9(0x9e))/0x8*(parseInt(_0x3ca6f9(0x110))/0x9)+parseInt(_0x3ca6f9(0x9c))/0xa*(-parseInt(_0x3ca6f9(0xdc))/0xb)+-parseInt(_0x3ca6f9(0x124))/0xc*(parseInt(_0x3ca6f9(0xcb))/0xd);if(_0x246764===_0x532d36)break;else _0x43cc17['push'](_0x43cc17['shift']());}catch(_0x31ae0d){_0x43cc17['push'](_0x43cc17['shift']());}}}(a76_0xd2b1,0xadcbc));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x12e0f3){_activeAK=_0x12e0f3||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x1dd335){const _0x465deb=a76_0x2466;for(const _0xf7f9bf of _0x1dd335){if(typeof _0xf7f9bf===_0x465deb(0x10a)&&_0xf7f9bf[_0x465deb(0xc5)]())return _0xf7f9bf['trim']();}return undefined;}async function decodeResponseBody(_0x3b1e22){const _0x2db338=a76_0x2466;if(typeof _0x3b1e22[_0x2db338(0xa0)]===_0x2db338(0xf0))try{const _0x50836c=await _0x3b1e22[_0x2db338(0xa0)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x50836c),'text':_0x50836c};}catch{return{'isJson':![],'text':_0x50836c[_0x2db338(0xc5)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x3b1e22[_0x2db338(0xa4)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x99bd61,_0x181fd5,_0x208b41){const _0x4615f9=a76_0x2466,_0x41458c=_0x181fd5&&typeof _0x181fd5===_0x4615f9(0x111)?_0x181fd5:{},_0x264564=[_0x41458c['status'],_0x41458c[_0x4615f9(0x102)]][_0x4615f9(0xc9)](_0x4d25f5=>Number(_0x4d25f5)===0x1ad),_0x2b7204=createRateLimitError({'status':_0x99bd61[_0x4615f9(0x11d)]===0x1ad?_0x99bd61['status']:_0x264564??_0x99bd61[_0x4615f9(0x11d)],'errorCode':firstString(_0x41458c['errorCode'],typeof _0x41458c['code']===_0x4615f9(0x10a)?_0x41458c['code']:undefined),'message':firstString(_0x41458c[_0x4615f9(0x115)],_0x41458c[_0x4615f9(0xb1)],_0x41458c[_0x4615f9(0xb8)],_0x208b41),'retryAfter':readRetryAfter(_0x99bd61[_0x4615f9(0xde)])??readRetryAfterSeconds(_0x181fd5)});if(_0x2b7204)throw _0x2b7204;}async function apiRequest(_0x1c6798,_0x9ea0ac={}){const _0x193f1f=a76_0x2466,{method:method=_0x193f1f(0x96),body:_0x26d6ad,headers:headers={},timeout:timeout=0x7530}=_0x9ea0ac,_0x1ae2b5=_activeAK,_0x47b049=getRuntimeDomain();if(!_0x1ae2b5)throw CliErrors[_0x193f1f(0x9b)](_0x193f1f(0xe6)+PRODUCT_CONFIG[_0x193f1f(0xae)]+'.');const _0xa822af=''+_0x47b049+_0x1c6798,_0x506020={'X-User-AK':_0x1ae2b5},_0x34c5e9=new AbortController(),_0x5a130f=setTimeout(()=>_0x34c5e9[_0x193f1f(0xfe)](),timeout);try{const _0x9417b1=await fetch(_0xa822af,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x193f1f(0x117)],..._0x506020,...headers},'body':_0x26d6ad?JSON['stringify'](_0x26d6ad):undefined,'signal':_0x34c5e9['signal']}),_0x3c2cfb=await decodeResponseBody(_0x9417b1);if(!_0x3c2cfb[_0x193f1f(0xa1)]){throwIfRateLimited(_0x9417b1,undefined,_0x3c2cfb[_0x193f1f(0xa0)]);throw CliErrors[_0x193f1f(0xa5)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x9417b1['status']+')',_0x9417b1[_0x193f1f(0x11d)]>=0x190?_0x193f1f(0xea):undefined);}const _0x11e306=_0x3c2cfb[_0x193f1f(0xb9)];throwIfRateLimited(_0x9417b1,_0x11e306);if(!_0x9417b1['ok']||_0x11e306[_0x193f1f(0x128)]===![])throw CliErrors[_0x193f1f(0xa5)](_0x11e306['errorMsg']||_0x11e306['message']||_0x193f1f(0xa2)+_0x9417b1[_0x193f1f(0x11d)],_0x11e306[_0x193f1f(0xb7)]?_0x193f1f(0xd5)+_0x11e306[_0x193f1f(0xb7)]:undefined);return _0x11e306;}catch(_0x2b9515){if(_0x2b9515 instanceof Error&&_0x2b9515[_0x193f1f(0xc1)]===_0x193f1f(0xd8))throw CliErrors[_0x193f1f(0xa5)]('Request\x20timeout:\x20'+_0xa822af);throw _0x2b9515;}finally{clearTimeout(_0x5a130f);}}async function apiBinaryRequest(_0x3bab0a,_0x41d06f={}){const _0x14ea95=a76_0x2466,{method:method=_0x14ea95(0x96),headers:headers={},timeout:timeout=0x7530}=_0x41d06f,_0x36f921=_activeAK,_0x42b55a=getRuntimeDomain();if(!_0x36f921)throw CliErrors[_0x14ea95(0x9b)](_0x14ea95(0xe6)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x3d7908=''+_0x42b55a+_0x3bab0a,_0x25f3bc=new AbortController(),_0x2e10ec=setTimeout(()=>_0x25f3bc[_0x14ea95(0xfe)](),timeout);try{const _0x2dfec0=await fetch(_0x3d7908,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x14ea95(0x117)],'X-User-AK':_0x36f921,...headers},'signal':_0x25f3bc['signal']});if(!_0x2dfec0['ok']){const _0x947328=await decodeResponseBody(_0x2dfec0),_0x4b2122=_0x947328[_0x14ea95(0xb9)]&&typeof _0x947328[_0x14ea95(0xb9)]===_0x14ea95(0x111)?_0x947328[_0x14ea95(0xb9)]:{},_0x4c11ba=firstString(_0x4b2122['errorMsg'],_0x4b2122[_0x14ea95(0xb1)],_0x4b2122[_0x14ea95(0xb7)],_0x947328[_0x14ea95(0xa0)]);throwIfRateLimited(_0x2dfec0,_0x947328['data'],_0x4c11ba);throw CliErrors[_0x14ea95(0xa5)](_0x4c11ba||_0x14ea95(0xa2)+_0x2dfec0[_0x14ea95(0x11d)],'Download\x20failed:\x20'+_0x3d7908);}return Buffer[_0x14ea95(0x10d)](await _0x2dfec0[_0x14ea95(0xf1)]());}catch(_0x485733){if(_0x485733 instanceof Error&&_0x485733[_0x14ea95(0xc1)]===_0x14ea95(0xd8))throw CliErrors['apiError'](_0x14ea95(0x11b)+_0x3d7908);throw _0x485733;}finally{clearTimeout(_0x2e10ec);}}async function apiFormRequest(_0x325af1,_0x130881,_0x29539e={}){const _0x1ddd4f=a76_0x2466,{timeout:timeout=0x7530}=_0x29539e,_0x56431c=_activeAK,_0x19e8f9=getRuntimeDomain();if(!_0x56431c)throw CliErrors[_0x1ddd4f(0x9b)](_0x1ddd4f(0xe6)+PRODUCT_CONFIG[_0x1ddd4f(0xae)]+'.');const _0x4b9463=''+_0x19e8f9+_0x325af1,_0x3654df=new AbortController(),_0x1e709a=setTimeout(()=>_0x3654df['abort'](),timeout);try{const _0x1d0d8c=await fetch(_0x4b9463,{'method':_0x1ddd4f(0xa3),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x1ddd4f(0x117)],'X-User-AK':_0x56431c},'body':_0x130881,'signal':_0x3654df[_0x1ddd4f(0xfb)]}),_0x29abe8=await decodeResponseBody(_0x1d0d8c);if(!_0x29abe8[_0x1ddd4f(0xa1)]){throwIfRateLimited(_0x1d0d8c,undefined,_0x29abe8[_0x1ddd4f(0xa0)]);throw CliErrors[_0x1ddd4f(0xa5)](_0x1ddd4f(0x11f)+_0x1d0d8c['status']+')',_0x1d0d8c[_0x1ddd4f(0x11d)]>=0x190?_0x1ddd4f(0xea):undefined);}const _0x2c5932=_0x29abe8[_0x1ddd4f(0xb9)];throwIfRateLimited(_0x1d0d8c,_0x2c5932);if(!_0x1d0d8c['ok']||_0x2c5932[_0x1ddd4f(0x128)]===![])throw CliErrors[_0x1ddd4f(0xa5)](_0x2c5932[_0x1ddd4f(0x115)]||_0x2c5932['message']||_0x1ddd4f(0xa2)+_0x1d0d8c['status'],_0x2c5932[_0x1ddd4f(0xb7)]?'API\x20error\x20code:\x20'+_0x2c5932[_0x1ddd4f(0xb7)]:undefined);return _0x2c5932;}catch(_0x1741ab){if(_0x1741ab instanceof Error&&_0x1741ab[_0x1ddd4f(0xc1)]===_0x1ddd4f(0xd8))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x4b9463);throw _0x1741ab;}finally{clearTimeout(_0x1e709a);}}async function toolboxRequest(_0x2f557a,_0x58e6ed,_0x145c49={}){const _0x4c8d25=a76_0x2466,{method:method=_0x4c8d25(0x96),headers:headers={},timeout:timeout=0x7530}=_0x145c49,_0x17dea0=_activeAK;if(!_0x17dea0)throw CliErrors['authRequired'](_0x4c8d25(0xe6)+PRODUCT_CONFIG[_0x4c8d25(0xae)]+'.');const _0xeb6756=getApiDomain()[_0x4c8d25(0xa8)](/\/$/,''),_0x118253=new URL(_0x2f557a,_0xeb6756+_0x4c8d25(0xf5));if(_0x58e6ed)for(const [_0x4557af,_0x2b78eb]of Object['entries'](_0x58e6ed)){_0x2b78eb!==undefined&&_0x2b78eb!==null&&_0x118253[_0x4c8d25(0x95)][_0x4c8d25(0xac)](_0x4557af,String(_0x2b78eb));}const _0x47c9a1=new AbortController(),_0x15adcb=setTimeout(()=>_0x47c9a1[_0x4c8d25(0xfe)](),timeout);try{const _0x2fbc76=await fetch(_0x118253,{'method':method,'headers':{'Content-Type':_0x4c8d25(0xa9),'X-Invoke-Source':PRODUCT_CONFIG[_0x4c8d25(0x117)],'X-User-AK':_0x17dea0,...headers},'signal':_0x47c9a1[_0x4c8d25(0xfb)]}),_0x14c964=await decodeResponseBody(_0x2fbc76);if(!_0x14c964[_0x4c8d25(0xa1)]){throwIfRateLimited(_0x2fbc76,undefined,_0x14c964[_0x4c8d25(0xa0)]);throw CliErrors[_0x4c8d25(0xa5)](_0x4c8d25(0x127)+_0x2fbc76[_0x4c8d25(0x11d)]+')',_0x2fbc76[_0x4c8d25(0x11d)]>=0x190?_0x4c8d25(0xea):undefined);}const _0x3617cb=_0x14c964[_0x4c8d25(0xb9)];throwIfRateLimited(_0x2fbc76,_0x3617cb);if(!_0x2fbc76['ok']){const _0x21bbc3=_0x3617cb&&typeof _0x3617cb==='object'?_0x3617cb:{};throw CliErrors[_0x4c8d25(0xa5)](_0x21bbc3[_0x4c8d25(0x115)]||_0x21bbc3[_0x4c8d25(0xb1)]||_0x4c8d25(0xc7)+_0x2fbc76[_0x4c8d25(0x11d)],_0x21bbc3[_0x4c8d25(0xb7)]?'Toolbox\x20error\x20code:\x20'+_0x21bbc3[_0x4c8d25(0xb7)]:undefined);}if(_0x3617cb&&typeof _0x3617cb===_0x4c8d25(0x111)&&_0x4c8d25(0x128)in _0x3617cb&&typeof _0x3617cb[_0x4c8d25(0x128)]===_0x4c8d25(0xb0)){const _0x446874=_0x3617cb;if(!_0x446874[_0x4c8d25(0x128)])throw CliErrors[_0x4c8d25(0xa5)](_0x446874['errorMsg']||_0x446874[_0x4c8d25(0xb1)]||_0x4c8d25(0x10c),_0x446874[_0x4c8d25(0xb7)]?_0x4c8d25(0x11a)+_0x446874['errorCode']:undefined);return _0x446874[_0x4c8d25(0xb9)];}return _0x3617cb;}catch(_0x57f379){if(_0x57f379 instanceof Error&&_0x57f379['name']===_0x4c8d25(0xd8))throw CliErrors[_0x4c8d25(0xa5)](_0x4c8d25(0x11b)+_0x118253[_0x4c8d25(0x101)]());throw _0x57f379;}finally{clearTimeout(_0x15adcb);}}async function skillHubJsonRequest(_0x453acc,_0x70dd8e={}){const _0xc64a78=a76_0x2466,{method:method=_0xc64a78(0x96),query:_0x4da413,body:_0x42f94d,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x70dd8e,_0x3d8fc7=_activeAK;if(!_0x3d8fc7)throw CliErrors['authRequired'](_0xc64a78(0xe6)+PRODUCT_CONFIG[_0xc64a78(0xae)]+'.');const _0x1d568e=getSkillHubDomain()[_0xc64a78(0xa8)](/\/$/,''),_0x1b4253=new URL(_0x453acc,_0x1d568e+'/');if(_0x4da413)for(const [_0xaa9f5c,_0x40e07c]of Object[_0xc64a78(0xe8)](_0x4da413)){_0x40e07c!==undefined&&_0x40e07c!==null&&_0x1b4253[_0xc64a78(0x95)][_0xc64a78(0xac)](_0xaa9f5c,String(_0x40e07c));}const _0x4c5f63=new AbortController(),_0x450ca0=setTimeout(()=>_0x4c5f63[_0xc64a78(0xfe)](),timeout);try{const _0x25c44c=await fetch(_0x1b4253[_0xc64a78(0x101)](),{'method':method,'headers':{'Accept':_0xc64a78(0xa9),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x3d8fc7,...headers},'body':_0x42f94d,'signal':_0x4c5f63[_0xc64a78(0xfb)]}),_0x3f6644=await decodeResponseBody(_0x25c44c);if(!_0x3f6644['isJson']){if(allowNotFound&&_0x25c44c['status']===0x194)return undefined;throwIfRateLimited(_0x25c44c,undefined,_0x3f6644['text']);throw CliErrors[_0xc64a78(0xa5)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x25c44c[_0xc64a78(0x11d)]+')',_0x25c44c['status']>=0x190?_0xc64a78(0xea):undefined);}const _0x56cbd9=_0x3f6644['data'];throwIfRateLimited(_0x25c44c,_0x56cbd9);if(allowNotFound&&isSkillHubNotFoundResponse(_0x25c44c[_0xc64a78(0x11d)],_0x56cbd9))return undefined;const _0x2def2e=!_0x25c44c['ok']||_0x56cbd9?.[_0xc64a78(0x128)]===![]||typeof _0x56cbd9?.['code']===_0xc64a78(0xf3)&&_0x56cbd9['code']>=0x190;if(_0x2def2e)throw CliErrors[_0xc64a78(0xa5)](_0x56cbd9?.['errorMsg']||_0x56cbd9?.[_0xc64a78(0xb1)]||_0x56cbd9?.[_0xc64a78(0xb8)]||'SkillHub\x20API\x20error:\x20'+_0x25c44c['status'],_0x56cbd9?.[_0xc64a78(0xb7)]?_0xc64a78(0x118)+_0x56cbd9[_0xc64a78(0xb7)]:undefined);return _0x56cbd9?.[_0xc64a78(0xb9)]??_0x56cbd9;}catch(_0x3415b9){if(_0x3415b9 instanceof Error&&_0x3415b9[_0xc64a78(0xc1)]===_0xc64a78(0xd8))throw CliErrors[_0xc64a78(0xa5)](_0xc64a78(0x11b)+_0x1b4253[_0xc64a78(0x101)]());throw _0x3415b9;}finally{clearTimeout(_0x450ca0);}}function isSkillHubNotFoundResponse(_0x8a1e1d,_0x22230e){const _0x8c0687=a76_0x2466;if(_0x8a1e1d===0x194||_0x22230e?.[_0x8c0687(0x102)]===0x194)return!![];if(_0x8a1e1d!==0x190&&_0x22230e?.[_0x8c0687(0x102)]!==0x190)return![];const _0x1fbecb=[_0x22230e?.[_0x8c0687(0xb8)],_0x22230e?.['message'],_0x22230e?.[_0x8c0687(0x115)],_0x22230e?.['error']]['filter'](_0x3c3fe4=>typeof _0x3c3fe4===_0x8c0687(0x10a))[_0x8c0687(0xe5)]('\x20');return/skill not found\b/i['test'](_0x1fbecb);}async function skillHubBinaryRequest(_0x75a65d,_0x432f9e={}){const _0x65353d=a76_0x2466,{query:_0x3332e8,headers:headers={},timeout:timeout=0x7530}=_0x432f9e,_0x3d7a66=_activeAK;if(!_0x3d7a66)throw CliErrors[_0x65353d(0x9b)](_0x65353d(0xe6)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x5ac3e2=getSkillHubDomain()[_0x65353d(0xa8)](/\/$/,''),_0x123a5f=new URL(_0x75a65d,_0x5ac3e2+'/');if(_0x3332e8)for(const [_0x4955d6,_0x4fff64]of Object[_0x65353d(0xe8)](_0x3332e8)){_0x4fff64!==undefined&&_0x4fff64!==null&&_0x123a5f[_0x65353d(0x95)][_0x65353d(0xac)](_0x4955d6,String(_0x4fff64));}const _0x1c7d24=new AbortController(),_0x28ff0b=setTimeout(()=>_0x1c7d24[_0x65353d(0xfe)](),timeout);try{const _0x365e22=await fetch(_0x123a5f[_0x65353d(0x101)](),{'method':'GET','headers':{'Accept':'application/octet-stream','X-Invoke-Source':PRODUCT_CONFIG[_0x65353d(0x117)],'X-User-AK':_0x3d7a66,...headers},'signal':_0x1c7d24[_0x65353d(0xfb)]});if(!_0x365e22['ok']){const _0x2c9e30=await decodeResponseBody(_0x365e22),_0x54b4e7=_0x2c9e30[_0x65353d(0xb9)]&&typeof _0x2c9e30[_0x65353d(0xb9)]==='object'?_0x2c9e30[_0x65353d(0xb9)]:{},_0xd16e65=firstString(_0x54b4e7['errorMsg'],_0x54b4e7[_0x65353d(0xb1)],_0x54b4e7['msg'],_0x54b4e7['errorCode'],_0x2c9e30[_0x65353d(0xa0)]);throwIfRateLimited(_0x365e22,_0x2c9e30[_0x65353d(0xb9)],_0xd16e65);throw CliErrors[_0x65353d(0xa5)](_0xd16e65||'SkillHub\x20API\x20error:\x20'+_0x365e22[_0x65353d(0x11d)],_0x65353d(0xf6)+_0x123a5f['toString']());}return Buffer[_0x65353d(0x10d)](await _0x365e22[_0x65353d(0xf1)]());}catch(_0x619daa){if(_0x619daa instanceof Error&&_0x619daa['name']==='AbortError')throw CliErrors[_0x65353d(0xa5)]('Request\x20timeout:\x20'+_0x123a5f['toString']());throw _0x619daa;}finally{clearTimeout(_0x28ff0b);}}export async function getBffEndpointContract(_0x3bd9fa,_0x4d2daa){const _0x135e9e=a76_0x2466;if(_0x4d2daa===_0x135e9e(0xe2))throw CliErrors['validation']('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x3bd9fa+_0x135e9e(0xcd)+_0x4d2daa);const _0x2536e9=await apiRequest(_0x135e9e(0x106)+encodeURIComponent(_0x3bd9fa)+'/'+encodeURIComponent(_0x4d2daa)),_0x143ac3=_0x2536e9[_0x135e9e(0xb9)];if(!_0x143ac3||typeof _0x143ac3!==_0x135e9e(0x111)||Array[_0x135e9e(0x119)](_0x143ac3)||_0x143ac3['appCode']!==_0x3bd9fa||_0x143ac3[_0x135e9e(0x12a)]!==_0x4d2daa)throw CliErrors['validation']('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x3bd9fa+_0x135e9e(0xcd)+_0x4d2daa);return{'appCode':_0x143ac3[_0x135e9e(0xed)],'functionName':_0x143ac3['functionName'],'description':_0x143ac3['description'],'version':_0x143ac3[_0x135e9e(0xef)],'gmtModified':_0x143ac3[_0x135e9e(0xee)]};}export async function getSqlQueryInfo(_0x49caea,_0x394d7f){const _0x3be5d6=a76_0x2466,_0x44d1e5=await apiRequest('/client/sql/query',{'method':_0x3be5d6(0xa3),'body':{'appCode':_0x49caea,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x394d7f}}),_0x2e5fa6=_0x44d1e5[_0x3be5d6(0xb9)],_0x1192a7=_0x2e5fa6&&typeof _0x2e5fa6===_0x3be5d6(0x111)&&_0x3be5d6(0xf9)in _0x2e5fa6?_0x2e5fa6[_0x3be5d6(0xf9)]?.[0x0]:_0x2e5fa6&&typeof _0x2e5fa6===_0x3be5d6(0x111)&&_0x3be5d6(0xaf)in _0x2e5fa6?_0x2e5fa6:undefined;if(!_0x1192a7)throw CliErrors['validation']('SQL\x20query\x20not\x20found:\x20'+_0x394d7f);return _0x1192a7;}function a76_0x2466(_0x899b78,_0x13362d){_0x899b78=_0x899b78-0x94;const _0xd2b182=a76_0xd2b1();let _0x2466aa=_0xd2b182[_0x899b78];return _0x2466aa;}function isRemoteAppItem(_0x154e23){const _0x27638c=a76_0x2466;return!!_0x154e23&&typeof _0x154e23===_0x27638c(0x111)&&typeof _0x154e23['appCode']===_0x27638c(0x10a)&&typeof _0x154e23[_0x27638c(0xbc)]===_0x27638c(0x10a);}function extractRemoteAppItems(_0x231a03){const _0x44065c=a76_0x2466;if(Array[_0x44065c(0x119)](_0x231a03))return _0x231a03['filter'](isRemoteAppItem);if(!_0x231a03||typeof _0x231a03!=='object')throw CliErrors[_0x44065c(0xa5)](_0x44065c(0xdf));const _0x419c0c=_0x231a03;if(Array['isArray'](_0x419c0c[_0x44065c(0xf9)]))return _0x419c0c['tableData'][_0x44065c(0xe1)](isRemoteAppItem);if(_0x419c0c[_0x44065c(0xb9)]&&typeof _0x419c0c['data']==='object'){const _0x59aebf=_0x419c0c['data'];if(Array['isArray'](_0x59aebf[_0x44065c(0xf9)]))return _0x59aebf[_0x44065c(0xf9)][_0x44065c(0xe1)](isRemoteAppItem);}throw CliErrors[_0x44065c(0xa5)](_0x44065c(0xab));}export async function getMyApps(){const _0x12021d=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x12021d['data']);}export async function getLoginUserInfo(){const _0x88e587=a76_0x2466,_0x1b6ed9=await apiRequest(_0x88e587(0x10b));if(!_0x1b6ed9[_0x88e587(0xb9)]||typeof _0x1b6ed9[_0x88e587(0xb9)]!==_0x88e587(0x111)||Array['isArray'](_0x1b6ed9['data']))throw CliErrors[_0x88e587(0xa5)]('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x1b6ed9['data'];}function runtimeSchedulePath(_0x5578a9,_0x3b168a=''){const _0x1d5b52=a76_0x2466;return _0x1d5b52(0x10e)+encodeURIComponent(_0x5578a9)+_0x1d5b52(0xf8)+_0x3b168a;}export async function validateRuntimeSchedule(_0x358e6d,_0x5a62aa){const _0x31970e=a76_0x2466,_0x5c5964=await apiRequest(runtimeSchedulePath(_0x358e6d,_0x31970e(0x98)),{'method':_0x31970e(0xa3),'body':_0x5a62aa});return _0x5c5964[_0x31970e(0xb9)];}export async function createRuntimeSchedule(_0x278ca1,_0x3e5fde){const _0x26a88b=a76_0x2466,_0x1c07fb=await apiRequest(runtimeSchedulePath(_0x278ca1),{'method':_0x26a88b(0xa3),'body':_0x3e5fde});return _0x1c07fb[_0x26a88b(0xb9)];}export async function listRuntimeSchedules(_0x3677ff,_0x204a41={}){const _0x18f0a1=a76_0x2466,_0x56944b=new URLSearchParams();if(_0x204a41['limit']!==undefined)_0x56944b[_0x18f0a1(0xac)](_0x18f0a1(0x109),String(_0x204a41[_0x18f0a1(0x109)]));if(_0x204a41[_0x18f0a1(0x11c)])_0x56944b['set'](_0x18f0a1(0x11c),_0x204a41['cursor']);const _0x1888fc=_0x56944b[_0x18f0a1(0xb4)]>0x0?'?'+_0x56944b['toString']():'',_0x45a0fc=await apiRequest(''+runtimeSchedulePath(_0x3677ff)+_0x1888fc);return _0x45a0fc[_0x18f0a1(0xb9)];}export async function getRuntimeSchedule(_0x5d88f7,_0x5496ae){const _0x3172b0=a76_0x2466,_0x3b53d3=await apiRequest(runtimeSchedulePath(_0x5d88f7,'/'+encodeURIComponent(_0x5496ae)));return _0x3b53d3[_0x3172b0(0xb9)];}export async function deleteRuntimeSchedule(_0x2d52a9,_0x3f212b){const _0x57ef62=a76_0x2466,_0x3eb2fc=await apiRequest(runtimeSchedulePath(_0x2d52a9,'/'+encodeURIComponent(_0x3f212b)),{'method':'DELETE'});return _0x3eb2fc[_0x57ef62(0xb9)];}export async function runRuntimeSchedule(_0x1ea3e4,_0x3229de){const _0x1beeaf=a76_0x2466,_0x407db2=await apiRequest(runtimeSchedulePath(_0x1ea3e4,'/'+encodeURIComponent(_0x3229de)+_0x1beeaf(0xc2)),{'method':_0x1beeaf(0xa3)});return _0x407db2['data'];}export async function listDatasets(_0x256515,_0x5b137c){const _0x26498c=a76_0x2466,_0x352bd2=await apiRequest('/client/dataset/list',{'method':'POST','body':{'appCode':_0x256515,..._0x5b137c?.[_0x26498c(0x102)]&&{'code':_0x5b137c[_0x26498c(0x102)]},..._0x5b137c?.['name']&&{'name':_0x5b137c[_0x26498c(0xc1)]}}});return extractList(_0x352bd2['data']);}export async function getDatasetDetail(_0x4ed013){const _0x5ce75e=a76_0x2466,_0xafc0a5=await apiRequest(_0x5ce75e(0xf7)+encodeURIComponent(_0x4ed013));return _0xafc0a5[_0x5ce75e(0xb9)];}export async function getDatasetSdkUsageDoc(_0x3e144f,_0x3550d8){const _0x5d63ab=a76_0x2466,_0x5551ba=await toolboxRequest(_0x5d63ab(0xfc),{'datasetCode':_0x3e144f,'appCode':_0x3550d8});return typeof _0x5551ba?.[_0x5d63ab(0xd4)]===_0x5d63ab(0x10a)?_0x5551ba[_0x5d63ab(0xd4)]:'';}export async function uploadRuntimeFile(_0x25a347,_0x36b929){const _0x703498=a76_0x2466,_0x9fd480=await readFile(_0x36b929),_0x55f7bf=new FormData();_0x55f7bf[_0x703498(0xd7)](_0x703498(0xed),_0x25a347),_0x55f7bf['append']('file',new Blob([new Uint8Array(_0x9fd480)]),basename(_0x36b929));const _0x180769=await apiFormRequest('/client/uploadFile',_0x55f7bf);return _0x180769[_0x703498(0xb9)];}export async function queryRuntimeFileUrl(_0x1d4a89,_0x26714c={}){const _0x32d763=a76_0x2466,_0x2fadb5=await apiRequest('/client/queryFileUrl',{'method':_0x32d763(0xa3),'body':{'filePath':_0x1d4a89,'downloadFlag':_0x26714c[_0x32d763(0x121)]??![],..._0x26714c['longTerm']?{'longTerm':!![]}:{}}});return _0x2fadb5['data'];}export async function recognizeRuntimeOcr(_0x547f33,_0x2467d6){const _0x59042b=a76_0x2466,_0x4d70a3=await apiRequest(_0x59042b(0x10f),{'method':_0x59042b(0xa3),'body':{'appCode':_0x547f33,'url':_0x2467d6[_0x59042b(0x114)],'type':_0x2467d6['type']}});return _0x4d70a3[_0x59042b(0xb9)];}export async function getRuntimeAppConfigByKey(_0x13c1a3,_0x412038){const _0x2cf23d=a76_0x2466,_0x3dafc9=new URLSearchParams({'appCode':_0x13c1a3,'key':_0x412038}),_0x861ff3=await apiRequest(_0x2cf23d(0xc0)+_0x3dafc9[_0x2cf23d(0x101)]());if(typeof _0x861ff3[_0x2cf23d(0xb9)]!=='string')throw CliErrors[_0x2cf23d(0x123)](_0x2cf23d(0xd9)+_0x412038);return _0x861ff3['data'];}export async function listRuntimeArtifacts(_0x50a189,_0x34ce4f){const _0x5864c9=a76_0x2466,_0x110e66=new URLSearchParams({'appCode':_0x50a189});if(_0x34ce4f?.[_0x5864c9(0xd3)])_0x110e66[_0x5864c9(0xac)]('artifactType',_0x34ce4f[_0x5864c9(0xd3)]);if(_0x34ce4f?.[_0x5864c9(0xb3)])_0x110e66[_0x5864c9(0xac)](_0x5864c9(0xb3),_0x34ce4f[_0x5864c9(0xb3)]);if(_0x34ce4f?.[_0x5864c9(0xe9)]!==undefined)_0x110e66[_0x5864c9(0xac)](_0x5864c9(0xe9),String(_0x34ce4f[_0x5864c9(0xe9)]));const _0x4faa91=await apiRequest(_0x5864c9(0x129)+_0x110e66[_0x5864c9(0x101)]());return Array[_0x5864c9(0x119)](_0x4faa91[_0x5864c9(0xb9)])?_0x4faa91[_0x5864c9(0xb9)]:[];}export async function getRuntimeArtifact(_0x4f2c12,_0xfab5d2){const _0x19d4dc=a76_0x2466,_0x24a533=await apiRequest(_0x19d4dc(0x104)+_0x4f2c12+_0x19d4dc(0x9d)+encodeURIComponent(_0xfab5d2));if(!_0x24a533[_0x19d4dc(0xb9)])throw CliErrors[_0x19d4dc(0x123)](_0x19d4dc(0xce)+_0x4f2c12);return _0x24a533[_0x19d4dc(0xb9)];}export async function createRuntimeArtifact(_0x5acef6,_0x34723f){const _0x5971f4=a76_0x2466,_0x2479d3=await apiRequest(_0x5971f4(0x100),{'method':_0x5971f4(0xa3),'body':{'appCode':_0x5acef6,..._0x34723f}});return _0x2479d3[_0x5971f4(0xb9)];}export async function updateRuntimeArtifact(_0x3c9629,_0x231c48,_0x2046b7){const _0x577ec3=a76_0x2466,_0xe6a4e3=await apiRequest(_0x577ec3(0x104)+_0x3c9629+_0x577ec3(0x11e),{'method':'POST','body':{'appCode':_0x231c48,..._0x2046b7}});return _0xe6a4e3[_0x577ec3(0xb9)];}export async function listPersonalBffs(_0xe7844d){const _0x531801=a76_0x2466,_0x357f39=await apiRequest(_0x531801(0x99)+encodeURIComponent(_0xe7844d));return Array['isArray'](_0x357f39['data'])?_0x357f39[_0x531801(0xb9)]:[];}export async function getPersonalBff(_0x4f75b7,_0xd7779c){const _0x56c2cf=a76_0x2466,_0x4f9a22=await apiRequest(_0x56c2cf(0x103)+_0x4f75b7+_0x56c2cf(0x9d)+encodeURIComponent(_0xd7779c));if(!_0x4f9a22[_0x56c2cf(0xb9)])throw CliErrors[_0x56c2cf(0x123)]('Personal\x20BFF\x20not\x20found:\x20id='+_0x4f75b7);return _0x4f9a22['data'];}export async function createPersonalBff(_0x2d09b5,_0x38be85){const _0x118cb8=a76_0x2466,_0x5f11a1=await apiRequest('/client/runtime-bff/personal/create',{'method':_0x118cb8(0xa3),'body':{'appCode':_0x2d09b5,..._0x38be85}});return _0x5f11a1[_0x118cb8(0xb9)];}export async function updatePersonalBff(_0x7c9747,_0x3ec418,_0x2bc2f7){const _0x146872=a76_0x2466,_0x12ec0c=await apiRequest('/client/runtime-bff/personal/'+_0x7c9747+_0x146872(0x11e),{'method':_0x146872(0xa3),'body':{'appCode':_0x3ec418,..._0x2bc2f7}});return _0x12ec0c[_0x146872(0xb9)];}export async function executePersonalBff(_0x1e4c9f,_0x10c852,_0x4cc3a7){const _0x24e1ef=a76_0x2466,_0x342925=await apiRequest('/client/runtime-bff/personal/'+_0x1e4c9f+_0x24e1ef(0xc3)+encodeURIComponent(_0x10c852),{'method':_0x24e1ef(0xa3),'body':_0x4cc3a7});return _0x342925[_0x24e1ef(0xb9)];}export async function listPersonalKnowledgeBaseItems(_0x1d9973){const _0x4f9b23=a76_0x2466,_0x4190c3=await apiRequest(_0x4f9b23(0xad)+encodeURIComponent(_0x1d9973));return Array[_0x4f9b23(0x119)](_0x4190c3[_0x4f9b23(0xb9)])?_0x4190c3[_0x4f9b23(0xb9)]:[];}export async function getPersonalKnowledgeBaseItem(_0x3691b6,_0x1291e6){const _0x27f660=a76_0x2466,_0x11cfc3=await apiRequest('/client/knowledge-base/personal/'+_0x3691b6+_0x27f660(0x9d)+encodeURIComponent(_0x1291e6));if(!_0x11cfc3[_0x27f660(0xb9)])throw CliErrors[_0x27f660(0x123)](_0x27f660(0xec)+_0x3691b6);return _0x11cfc3['data'];}export async function createPersonalKnowledgeBaseItem(_0x3c9897,_0x27134a){const _0x2cf48e=a76_0x2466,_0x4d9f15=await apiRequest(_0x2cf48e(0xaa),{'method':_0x2cf48e(0xa3),'body':{'appCode':_0x3c9897,..._0x27134a}});return _0x4d9f15[_0x2cf48e(0xb9)];}export async function updatePersonalKnowledgeBaseItem(_0x57d125,_0x538a06,_0x294642){const _0x27ff6c=a76_0x2466,_0x34880d=await apiRequest(_0x27ff6c(0xc4)+_0x57d125+_0x27ff6c(0x11e),{'method':'POST','body':{'appCode':_0x538a06,..._0x294642}});return _0x34880d['data'];}export async function searchKnowledgeBase(_0x491ca8,_0x3ec014){const _0x74b028=a76_0x2466,_0x48eaf9=await apiRequest('/client/knowledge-base/search',{'method':'POST','body':{'appCode':_0x491ca8,'query':_0x3ec014['query'],..._0x3ec014[_0x74b028(0xda)]!==undefined?{'topK':_0x3ec014[_0x74b028(0xda)]}:{}}});return Array['isArray'](_0x48eaf9[_0x74b028(0xb9)])?_0x48eaf9[_0x74b028(0xb9)]:[];}export async function getRuntimeSkillByCode(_0x4e849c,_0x28cd6d){const _0x927a5d=a76_0x2466,_0x455a80=await skillHubJsonRequest(_0x927a5d(0xcf)+encodeURIComponent(_0x4e849c)+'/'+encodeURIComponent(_0x28cd6d),{'allowNotFound':!![]});return _0x455a80?skillHubRuntimeDetailToRuntimeSkill(_0x455a80):undefined;}export async function listRuntimeSkills(_0x217d58){const _0x2ad228=a76_0x2466,_0x7d1f2a=await skillHubJsonRequest(_0x2ad228(0xe4)+encodeURIComponent(_0x217d58[_0x2ad228(0xed)])+_0x2ad228(0x125),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x217d58['appCode'],_0x7d1f2a,_0x217d58[_0x2ad228(0xc6)]??_0x2ad228(0xd1),_0x217d58[_0x2ad228(0x102)]);}export async function listPersonalRuntimeSkills(_0x15635f){return(await listRuntimeSkills({'appCode':_0x15635f,'scope':'personal'}))['personal'];}export async function listCompanyRuntimeSkills(_0x13e16d){const _0x48b713=a76_0x2466;return(await listRuntimeSkills({'appCode':_0x13e16d,'scope':_0x48b713(0xdd)}))[_0x48b713(0xdd)];}export async function listVisibleRuntimeSkills(_0x32dbdb){const _0x231e3b=a76_0x2466;return(await listRuntimeSkills({'appCode':_0x32dbdb,'scope':_0x231e3b(0xd1)}))[_0x231e3b(0xd6)];}export async function createPersonalRuntimeSkill(_0x2b27be,_0x3dfb91,_0x581255={}){const _0x266f93=a76_0x2466;return publishRuntimeSkill(_0x2b27be,_0x3dfb91,{'visibility':_0x266f93(0x107),'confirmWarnings':_0x581255[_0x266f93(0xba)]});}export async function updatePersonalRuntimeSkill(_0xedcce5,_0x40c33f,_0xab6f06,_0x1e160a={}){const _0x552a48=a76_0x2466;return publishRuntimeSkill(_0x40c33f,{..._0xab6f06,'skillCode':_0xab6f06[_0x552a48(0x122)]??_0xedcce5},{'visibility':'PRIVATE','confirmWarnings':_0x1e160a[_0x552a48(0xba)]});}export async function publishCompanyRuntimeSkill(_0x5b2375,_0x1ab848,_0xf51f3d={}){const _0x5f594f=a76_0x2466;return publishRuntimeSkill(_0x5b2375,_0x1ab848,{'visibility':'NAMESPACE_ONLY','confirmWarnings':_0xf51f3d[_0x5f594f(0xba)]});}function a76_0xd2b1(){const _0x312c46=['invokeSource','SkillHub\x20error\x20code:\x20','isArray','Toolbox\x20error\x20code:\x20','Request\x20timeout:\x20','cursor','status','/update','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','slug','download','skillCode','validation','3900EwxOdp','/skills','base64','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','success','/client/artifact/list?','functionName','resolvedSlug','searchParams','GET','ownerPreviewVersion','/validate','/client/runtime-bff/personal/list?appCode=','NAMESPACE_ONLY','authRequired','20IBQjsu','?appCode=','5976616JQfDiq','/api/cli/v1/skills/','text','isJson','API\x20error:\x20','POST','json','apiError','map','visibility','replace','application/json','/client/knowledge-base/personal/create','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','set','/client/knowledge-base/personal/list?appCode=','newConfigFileName','sqlCode','boolean','message','17622ryqtcI','source','size','headlineVersion','personal','errorCode','msg','data','confirmWarnings','packageBase64','appName','application/zip','/download','119606CiLBsn','/client/app-config/getByKey?','name','/run','/execute?appCode=','/client/knowledge-base/personal/','trim','scope','Toolbox\x20API\x20error:\x20','summary','find','values','79989LpLljZ','96969PVaShZ',',\x20name=','Artifact\x20not\x20found:\x20id=','/api/v1/skills/','description','all','undefined','artifactType','markdown','API\x20error\x20code:\x20','effective','append','AbortError','Invalid\x20app\x20config\x20value:\x20key=','topK','example','1690161hmjcbh','company','headers','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','namespace','filter','functions','1515uYriVr','/api/runtime/v1/namespaces/','join','Configure\x20accessKey\x20in\x20','items','entries','favorite','Check\x20your\x20credentials\x20and\x20try\x20again.','skillName','Knowledge-base\x20entry\x20not\x20found:\x20id=','appCode','gmtModified','version','function','arrayBuffer','22SkKJWo','number','warnings','/api/node-toolbox/','Download\x20failed:\x20','/client/dataset/get-driven-data?code=','/schedules','tableData','2047514XxyINc','signal','api-doc-generator','errors','abort','displayName','/client/artifact/create','toString','code','/client/runtime-bff/personal/','/client/artifact/','resolvedVersion','/client/bff/endpoint/','PRIVATE','valid','limit','string','/client/user/loginUserInfo','Toolbox\x20API\x20error','from','/api/harness/apps/','/client/ocr','9snXlYn','object','28TzUeYI','tags','url','errorMsg','toLowerCase'];a76_0xd2b1=function(){return _0x312c46;};return a76_0xd2b1();}export async function validateRuntimeSkillPublish(_0x3fdea2,_0x22e9a1,_0x1017f1){const _0x2a6532=a76_0x2466,_0x255097=buildRuntimeSkillPublishForm(_0x22e9a1,_0x1017f1['visibility']),_0x2ebc38=await skillHubJsonRequest(_0x2a6532(0x9f)+encodeURIComponent(_0x3fdea2)+'/publish/validate',{'method':_0x2a6532(0xa3),'body':_0x255097});return{'valid':_0x2ebc38[_0x2a6532(0x108)]===!![],'errors':Array['isArray'](_0x2ebc38[_0x2a6532(0xfd)])?_0x2ebc38[_0x2a6532(0xfd)]:[],'warnings':Array[_0x2a6532(0x119)](_0x2ebc38[_0x2a6532(0xf4)])?_0x2ebc38[_0x2a6532(0xf4)]:[],'resolvedSlug':_0x2ebc38[_0x2a6532(0x94)],'resolvedVersion':_0x2ebc38[_0x2a6532(0x105)]};}export async function downloadRuntimeSkillPackage(_0x28c04b,_0x41ed6b,_0x4c379f,_0x5e3ab6){const _0x4da2b5=a76_0x2466;void _0x28c04b;const _0x5954fb=_0x5e3ab6?'/api/cli/v1/skills/'+encodeURIComponent(_0x4c379f)+'/'+encodeURIComponent(_0x41ed6b)+'/versions/'+encodeURIComponent(_0x5e3ab6)+_0x4da2b5(0xbe):'/api/cli/v1/skills/'+encodeURIComponent(_0x4c379f)+'/'+encodeURIComponent(_0x41ed6b)+'/download';return skillHubBinaryRequest(_0x5954fb);}async function publishRuntimeSkill(_0x4b09c1,_0x4670b9,_0x16875e){const _0x580b43=a76_0x2466,_0x502f77=buildRuntimeSkillPublishForm(_0x4670b9,_0x16875e[_0x580b43(0xa7)]),_0x97ac09=await skillHubJsonRequest(_0x580b43(0x9f)+encodeURIComponent(_0x4b09c1)+'/publish',{'method':_0x580b43(0xa3),'query':{'confirmWarnings':_0x16875e[_0x580b43(0xba)]===!![]?!![]:undefined},'body':_0x502f77});return{'appCode':_0x97ac09[_0x580b43(0xe0)]??_0x4b09c1,'skillCode':_0x97ac09[_0x580b43(0x120)]??_0x4670b9['skillCode']??'','skillName':_0x4670b9[_0x580b43(0xeb)]??_0x97ac09[_0x580b43(0x120)]??_0x4670b9[_0x580b43(0x122)],'description':_0x4670b9[_0x580b43(0xd0)],'scope':skillHubVisibilityToScope(_0x97ac09[_0x580b43(0xa7)]??_0x16875e[_0x580b43(0xa7)])??_0x580b43(0xb6),'version':_0x97ac09['version']??_0x4670b9[_0x580b43(0xef)],'tags':_0x4670b9[_0x580b43(0x113)],'content':_0x4670b9['content']};}function buildRuntimeSkillPublishForm(_0x59f55d,_0x3bf66b){const _0x3c65b4=a76_0x2466,_0x59ff52=new FormData();return _0x59ff52[_0x3c65b4(0xac)]('file',runtimeSkillPackageFile(_0x59f55d)),_0x59f55d[_0x3c65b4(0xeb)]?.['trim']()&&_0x59ff52[_0x3c65b4(0xac)](_0x3c65b4(0xff),_0x59f55d[_0x3c65b4(0xeb)]['trim']()),_0x59ff52[_0x3c65b4(0xac)](_0x3c65b4(0xa7),_0x3bf66b),_0x59ff52;}function runtimeSkillPackageFile(_0x315797){const _0x13e1fe=a76_0x2466;if(!_0x315797[_0x13e1fe(0xbb)])throw CliErrors[_0x13e1fe(0x123)]('Missing\x20Skill\x20package\x20payload.');const _0xbc3ca1=Buffer['from'](_0x315797['packageBase64'],_0x13e1fe(0x126)),_0x307ec1=new Blob([_0xbc3ca1],{'type':_0x13e1fe(0xbd)}),_0x137259=(_0x315797[_0x13e1fe(0x122)]||'skill')+'.zip';if(typeof File!==_0x13e1fe(0xd2))return new File([_0x307ec1],_0x137259,{'type':_0x13e1fe(0xbd)});return _0x307ec1;}function normalizeSkillHubRuntimeListResponse(_0x4948f2,_0x27a9c8,_0x12fd56,_0x28b1f6){const _0x23f5c5=a76_0x2466,_0x49af16=Array['isArray'](_0x27a9c8)?_0x27a9c8:Array['isArray'](_0x27a9c8?.[_0x23f5c5(0xe7)])?_0x27a9c8['items']:[],_0xf876f7=_0x28b1f6?.[_0x23f5c5(0xc5)](),_0x325425=_0x49af16[_0x23f5c5(0xe1)](_0xd2801d=>!_0xf876f7||_0xd2801d[_0x23f5c5(0x120)]===_0xf876f7)[_0x23f5c5(0xa6)](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x285ab7=>Boolean(_0x285ab7)),_0x72870=_0x325425['filter'](_0x30db2f=>_0x30db2f[_0x23f5c5(0xc6)]===_0x23f5c5(0xb6)),_0x3dc81=_0x325425[_0x23f5c5(0xe1)](_0x4b4d50=>_0x4b4d50[_0x23f5c5(0xc6)]===_0x23f5c5(0xdd));return{'appCode':_0x4948f2,'personal':_0x12fd56===_0x23f5c5(0xdd)?[]:_0x72870,'company':_0x12fd56===_0x23f5c5(0xb6)?[]:_0x3dc81,'effective':buildEffectiveRuntimeSkills(_0x72870,_0x3dc81,_0x12fd56)};}function skillHubRuntimeItemToRuntimeSkill(_0x493e8b){const _0x7dfa90=a76_0x2466,_0x2f74ab=_0x493e8b[_0x7dfa90(0x120)]?.['trim'](),_0x32466a=skillHubVisibilityToScope(_0x493e8b[_0x7dfa90(0xa7)]);if(!_0x2f74ab||!_0x32466a)return undefined;return{'id':_0x493e8b['id'],'appCode':_0x493e8b[_0x7dfa90(0xe0)],'skillCode':_0x2f74ab,'skillName':_0x493e8b[_0x7dfa90(0xff)]??_0x2f74ab,'description':_0x493e8b[_0x7dfa90(0xc8)],'scope':_0x32466a,'version':skillHubRuntimeItemVersion(_0x493e8b),'status':_0x493e8b[_0x7dfa90(0x11d)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x15ce75){const _0x22955a=a76_0x2466,_0x2a581c=_0x15ce75['slug']?.[_0x22955a(0xc5)]();if(!_0x2a581c)return undefined;return{'id':_0x15ce75['id'],'appCode':_0x15ce75[_0x22955a(0xe0)],'skillCode':_0x2a581c,'skillName':_0x15ce75[_0x22955a(0xff)]??_0x2a581c,'description':_0x15ce75[_0x22955a(0xc8)],'example':_0x15ce75[_0x22955a(0xdb)],'scope':skillHubVisibilityToScope(_0x15ce75[_0x22955a(0xa7)])??_0x15ce75[_0x22955a(0xa7)]?.[_0x22955a(0x116)](),'version':skillHubRuntimeItemVersion(_0x15ce75),'status':_0x15ce75['status']};}function skillHubVisibilityToScope(_0x479158){const _0x48bc46=a76_0x2466;if(_0x479158===_0x48bc46(0x107))return _0x48bc46(0xb6);if(_0x479158===_0x48bc46(0x9a))return _0x48bc46(0xdd);return undefined;}function skillHubRuntimeItemVersion(_0x3fcd1b){const _0x436bec=a76_0x2466;return _0x3fcd1b['publishedVersion']?.[_0x436bec(0xef)]??_0x3fcd1b[_0x436bec(0xb5)]?.['version']??_0x3fcd1b[_0x436bec(0x97)]?.[_0x436bec(0xef)];}function buildEffectiveRuntimeSkills(_0xc369e,_0x6e7651,_0x48096a){const _0x31c75b=a76_0x2466;if(_0x48096a===_0x31c75b(0xb6))return _0xc369e;if(_0x48096a===_0x31c75b(0xdd))return _0x6e7651;const _0x2061da=new Map();for(const _0x11b3fd of _0x6e7651){_0x2061da['set'](_0x11b3fd[_0x31c75b(0x122)],_0x11b3fd);}for(const _0x4f5b02 of _0xc369e){_0x2061da[_0x31c75b(0xac)](_0x4f5b02['skillCode'],_0x4f5b02);}return Array[_0x31c75b(0x10d)](_0x2061da[_0x31c75b(0xca)]());}function normalizeRuntimeSkillListResponse(_0x52e9ec,_0x1fb9f2){const _0x547e86=a76_0x2466;if(Array[_0x547e86(0x119)](_0x1fb9f2)){const _0x3cd28a=_0x1fb9f2[_0x547e86(0xe1)](_0x57ccef=>_0x57ccef[_0x547e86(0xc6)]===_0x547e86(0xb6)),_0x451798=_0x1fb9f2[_0x547e86(0xe1)](_0x919688=>_0x919688[_0x547e86(0xc6)]==='company');return{'appCode':_0x52e9ec,'personal':_0x3cd28a,'company':_0x451798,'effective':[..._0x451798,..._0x3cd28a]};}return{'appCode':_0x1fb9f2?.[_0x547e86(0xed)]??_0x52e9ec,'personal':Array[_0x547e86(0x119)](_0x1fb9f2?.[_0x547e86(0xb6)])?_0x1fb9f2[_0x547e86(0xb6)]:[],'company':Array['isArray'](_0x1fb9f2?.[_0x547e86(0xdd)])?_0x1fb9f2['company']:[],'effective':Array[_0x547e86(0x119)](_0x1fb9f2?.[_0x547e86(0xd6)])?_0x1fb9f2[_0x547e86(0xd6)]:[]};}
|
|
1
|
+
(function(_0x3a96aa,_0x3351aa){const _0x2a0fc7=a78_0x1a9b,_0xc1babd=_0x3a96aa();while(!![]){try{const _0x54a72d=-parseInt(_0x2a0fc7(0x12d))/0x1+-parseInt(_0x2a0fc7(0xad))/0x2*(-parseInt(_0x2a0fc7(0xbb))/0x3)+parseInt(_0x2a0fc7(0xc8))/0x4*(-parseInt(_0x2a0fc7(0xb0))/0x5)+-parseInt(_0x2a0fc7(0xa2))/0x6*(-parseInt(_0x2a0fc7(0x12a))/0x7)+parseInt(_0x2a0fc7(0xcf))/0x8*(parseInt(_0x2a0fc7(0xf8))/0x9)+-parseInt(_0x2a0fc7(0x129))/0xa+parseInt(_0x2a0fc7(0x125))/0xb*(parseInt(_0x2a0fc7(0xf7))/0xc);if(_0x54a72d===_0x3351aa)break;else _0xc1babd['push'](_0xc1babd['shift']());}catch(_0x8a7799){_0xc1babd['push'](_0xc1babd['shift']());}}}(a78_0x2dbb,0xc8ab4));function a78_0x2dbb(){const _0x5361ac=['Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','name','/client/knowledge-base/search','errorCode','/skills','function','SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.','string','Invalid\x20app\x20config\x20value:\x20key=','/update','/publish/validate','effective','2876292JhmEor','117pfMChh','download','errorMsg','PRIVATE','msg','description','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','publish','Check\x20your\x20credentials\x20and\x20try\x20again.','diagram','items','valid','/client/runtime-bff/personal/create','authRequired','resolvedSlug','packageBase64','application/json','/api/cli/v1/skills/','/schedules','namespace','GET','/versions/','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','values','summary','/client/app/my-apps','/publish','searchParams','newConfigFileName','replace','/execute?appCode=','code','appName','find','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','text','/validate','type','/client/uploadFile','toLowerCase','Toolbox\x20error\x20code:\x20','arrayBuffer','headers','content','/download','11gVYpft','cursor','sqlCode','json','11266250OwReal','1818831BeLHHY','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','slug','290750uPwaOX','visibility','tags','api-doc-generator','/api/v1/skills/','validation','gmtModified','/client/artifact/','isArray','file','skillCode','trim','/api/harness/apps/','limit','/client/runtime-bff/personal/','isJson','success','functionName','headlineVersion','SkillHub\x20API\x20error:\x20','from','favorite','status','API\x20error:\x20','error','tableData','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.','filter','Toolbox\x20API\x20error:\x20','/client/knowledge-base/personal/list?appCode=','Configure\x20accessKey\x20in\x20','displayName','skillName','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','object','30oUtZmh','artifactType','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','PUT','join','personal','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','diagramBound','all','ownerPreviewVersion','set','38sYmbEF','stringify','Artifact\x20not\x20found:\x20id=','20YUcclo','scope','topK','abort','source','markdown','SkillHub\x20error\x20code:\x20','message','appCode','sourceFingerprint','/api/node-toolbox/','183261vAXEWm','diagramValidated','found','company','AbortError','signal','POST','/client/ocr','API\x20error\x20code:\x20','Request\x20timeout:\x20','errors','/client/knowledge-base/personal/create','invokeSource','1434856tTqbLy','data','entries','boolean','base64','/client/queryFileUrl','isInteger','599792cTpFAf','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','warnings','map','apiError','skill','/run','BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','test','version','/client/knowledge-base/personal/','Download\x20failed:\x20','/diagram','number','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','confirmWarnings','toString','publishedVersion','Knowledge-base\x20entry\x20not\x20found:\x20id=','undefined','NAMESPACE_ONLY','functions','/api/runtime/v1/namespaces/','DELETE','/client/bff/endpoint/','Personal\x20BFF\x20not\x20found:\x20id=','query',',\x20name='];a78_0x2dbb=function(){return _0x5361ac;};return a78_0x2dbb();}import{readFile}from'node:fs/promises';function a78_0x1a9b(_0x2b1815,_0x5bc8fc){_0x2b1815=_0x2b1815-0x9b;const _0x2dbb7f=a78_0x2dbb();let _0x1a9b1f=_0x2dbb7f[_0x2b1815];return _0x1a9b1f;}import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x2719b7){_activeAK=_0x2719b7||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x46d402){const _0x47606f=a78_0x1a9b;for(const _0x175c87 of _0x46d402){if(typeof _0x175c87===_0x47606f(0xf2)&&_0x175c87[_0x47606f(0x138)]())return _0x175c87['trim']();}return undefined;}async function decodeResponseBody(_0x2efdb6){const _0x2c04ae=a78_0x1a9b;if(typeof _0x2efdb6[_0x2c04ae(0x11b)]===_0x2c04ae(0xf0))try{const _0x100048=await _0x2efdb6[_0x2c04ae(0x11b)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x100048),'text':_0x100048};}catch{return{'isJson':![],'text':_0x100048['trim']()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x2efdb6[_0x2c04ae(0x128)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x22d52a,_0x5dba5d,_0x38ae75){const _0x94de0=a78_0x1a9b,_0x3d7c09=_0x5dba5d&&typeof _0x5dba5d===_0x94de0(0xa1)?_0x5dba5d:{},_0x5f3819=[_0x3d7c09[_0x94de0(0x143)],_0x3d7c09[_0x94de0(0x117)]][_0x94de0(0x119)](_0x33e14a=>Number(_0x33e14a)===0x1ad),_0x179872=createRateLimitError({'status':_0x22d52a[_0x94de0(0x143)]===0x1ad?_0x22d52a[_0x94de0(0x143)]:_0x5f3819??_0x22d52a[_0x94de0(0x143)],'errorCode':firstString(_0x3d7c09['errorCode'],typeof _0x3d7c09[_0x94de0(0x117)]==='string'?_0x3d7c09['code']:undefined),'message':firstString(_0x3d7c09[_0x94de0(0xfa)],_0x3d7c09[_0x94de0(0xb7)],_0x3d7c09[_0x94de0(0xfc)],_0x38ae75),'retryAfter':readRetryAfter(_0x22d52a[_0x94de0(0x122)])??readRetryAfterSeconds(_0x5dba5d)});if(_0x179872)throw _0x179872;}async function apiRequest(_0x37b9a5,_0x4e3098={}){const _0x442e1b=a78_0x1a9b,{method:method=_0x442e1b(0x10c),body:_0x2c0156,headers:headers={},timeout:timeout=0x7530}=_0x4e3098,_0x53b751=_activeAK,_0x5da425=getRuntimeDomain();if(!_0x53b751)throw CliErrors[_0x442e1b(0x105)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x31cc6b=''+_0x5da425+_0x37b9a5,_0x599e69={'X-User-AK':_0x53b751},_0x19440e=new AbortController(),_0x2fe642=setTimeout(()=>_0x19440e[_0x442e1b(0xb3)](),timeout);try{const _0x58cb60=await fetch(_0x31cc6b,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x442e1b(0xc7)],..._0x599e69,...headers},'body':_0x2c0156?JSON[_0x442e1b(0xae)](_0x2c0156):undefined,'signal':_0x19440e[_0x442e1b(0xc0)]}),_0x3e71c8=await decodeResponseBody(_0x58cb60);if(!_0x3e71c8['isJson']){throwIfRateLimited(_0x58cb60,undefined,_0x3e71c8[_0x442e1b(0x11b)]);throw CliErrors[_0x442e1b(0xd3)](_0x442e1b(0x11a)+_0x58cb60[_0x442e1b(0x143)]+')',_0x58cb60[_0x442e1b(0x143)]>=0x190?_0x442e1b(0x100):undefined);}const _0x34164f=_0x3e71c8[_0x442e1b(0xc9)];throwIfRateLimited(_0x58cb60,_0x34164f);if(!_0x58cb60['ok']||_0x34164f[_0x442e1b(0x13d)]===![])throw CliErrors[_0x442e1b(0xd3)](_0x34164f[_0x442e1b(0xfa)]||_0x34164f[_0x442e1b(0xb7)]||_0x442e1b(0x144)+_0x58cb60[_0x442e1b(0x143)],_0x34164f[_0x442e1b(0xee)]?_0x442e1b(0xc3)+_0x34164f[_0x442e1b(0xee)]:undefined);return _0x34164f;}catch(_0x19fc60){if(_0x19fc60 instanceof Error&&_0x19fc60[_0x442e1b(0xec)]==='AbortError')throw CliErrors[_0x442e1b(0xd3)](_0x442e1b(0xc4)+_0x31cc6b);throw _0x19fc60;}finally{clearTimeout(_0x2fe642);}}async function apiBinaryRequest(_0x25544b,_0x10c7c7={}){const _0x17fe8c=a78_0x1a9b,{method:method=_0x17fe8c(0x10c),headers:headers={},timeout:timeout=0x7530}=_0x10c7c7,_0x3e4210=_activeAK,_0x149363=getRuntimeDomain();if(!_0x3e4210)throw CliErrors[_0x17fe8c(0x105)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x384c48=''+_0x149363+_0x25544b,_0x42c649=new AbortController(),_0x87eb0c=setTimeout(()=>_0x42c649[_0x17fe8c(0xb3)](),timeout);try{const _0x2f0256=await fetch(_0x384c48,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x17fe8c(0xc7)],'X-User-AK':_0x3e4210,...headers},'signal':_0x42c649[_0x17fe8c(0xc0)]});if(!_0x2f0256['ok']){const _0x284905=await decodeResponseBody(_0x2f0256),_0x510764=_0x284905[_0x17fe8c(0xc9)]&&typeof _0x284905[_0x17fe8c(0xc9)]===_0x17fe8c(0xa1)?_0x284905[_0x17fe8c(0xc9)]:{},_0x380234=firstString(_0x510764[_0x17fe8c(0xfa)],_0x510764[_0x17fe8c(0xb7)],_0x510764['errorCode'],_0x284905[_0x17fe8c(0x11b)]);throwIfRateLimited(_0x2f0256,_0x284905[_0x17fe8c(0xc9)],_0x380234);throw CliErrors['apiError'](_0x380234||'API\x20error:\x20'+_0x2f0256['status'],_0x17fe8c(0xda)+_0x384c48);}return Buffer[_0x17fe8c(0x141)](await _0x2f0256['arrayBuffer']());}catch(_0x4d13d3){if(_0x4d13d3 instanceof Error&&_0x4d13d3['name']==='AbortError')throw CliErrors[_0x17fe8c(0xd3)](_0x17fe8c(0xc4)+_0x384c48);throw _0x4d13d3;}finally{clearTimeout(_0x87eb0c);}}async function apiFormRequest(_0x32c831,_0x533778,_0x2fe515={}){const _0x595c82=a78_0x1a9b,{timeout:timeout=0x7530}=_0x2fe515,_0x4eeba3=_activeAK,_0x2cac31=getRuntimeDomain();if(!_0x4eeba3)throw CliErrors['authRequired'](_0x595c82(0x9d)+PRODUCT_CONFIG[_0x595c82(0x114)]+'.');const _0x38d166=''+_0x2cac31+_0x32c831,_0x1404d1=new AbortController(),_0xbde8b0=setTimeout(()=>_0x1404d1['abort'](),timeout);try{const _0x57ed59=await fetch(_0x38d166,{'method':_0x595c82(0xc1),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x595c82(0xc7)],'X-User-AK':_0x4eeba3},'body':_0x533778,'signal':_0x1404d1['signal']}),_0x2c8933=await decodeResponseBody(_0x57ed59);if(!_0x2c8933[_0x595c82(0x13c)]){throwIfRateLimited(_0x57ed59,undefined,_0x2c8933['text']);throw CliErrors[_0x595c82(0xd3)](_0x595c82(0x11a)+_0x57ed59[_0x595c82(0x143)]+')',_0x57ed59[_0x595c82(0x143)]>=0x190?_0x595c82(0x100):undefined);}const _0x3ad5ed=_0x2c8933[_0x595c82(0xc9)];throwIfRateLimited(_0x57ed59,_0x3ad5ed);if(!_0x57ed59['ok']||_0x3ad5ed[_0x595c82(0x13d)]===![])throw CliErrors[_0x595c82(0xd3)](_0x3ad5ed['errorMsg']||_0x3ad5ed[_0x595c82(0xb7)]||_0x595c82(0x144)+_0x57ed59[_0x595c82(0x143)],_0x3ad5ed[_0x595c82(0xee)]?'API\x20error\x20code:\x20'+_0x3ad5ed[_0x595c82(0xee)]:undefined);return _0x3ad5ed;}catch(_0x5cd947){if(_0x5cd947 instanceof Error&&_0x5cd947[_0x595c82(0xec)]===_0x595c82(0xbf))throw CliErrors['apiError'](_0x595c82(0xc4)+_0x38d166);throw _0x5cd947;}finally{clearTimeout(_0xbde8b0);}}async function toolboxRequest(_0x56e14b,_0x38b8e1,_0x431ca3={}){const _0x189fb8=a78_0x1a9b,{method:method=_0x189fb8(0x10c),headers:headers={},timeout:timeout=0x7530}=_0x431ca3,_0x345e8b=_activeAK;if(!_0x345e8b)throw CliErrors[_0x189fb8(0x105)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x2cc86b=getApiDomain()[_0x189fb8(0x115)](/\/$/,''),_0x166b5c=new URL(_0x56e14b,_0x2cc86b+_0x189fb8(0xba));if(_0x38b8e1)for(const [_0x21b33f,_0xd68cad]of Object[_0x189fb8(0xca)](_0x38b8e1)){_0xd68cad!==undefined&&_0xd68cad!==null&&_0x166b5c[_0x189fb8(0x113)][_0x189fb8(0xac)](_0x21b33f,String(_0xd68cad));}const _0x54ce73=new AbortController(),_0x3ecd7f=setTimeout(()=>_0x54ce73[_0x189fb8(0xb3)](),timeout);try{const _0x3468cd=await fetch(_0x166b5c,{'method':method,'headers':{'Content-Type':_0x189fb8(0x108),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x345e8b,...headers},'signal':_0x54ce73['signal']}),_0x2b7371=await decodeResponseBody(_0x3468cd);if(!_0x2b7371['isJson']){throwIfRateLimited(_0x3468cd,undefined,_0x2b7371[_0x189fb8(0x11b)]);throw CliErrors[_0x189fb8(0xd3)](_0x189fb8(0xeb)+_0x3468cd[_0x189fb8(0x143)]+')',_0x3468cd[_0x189fb8(0x143)]>=0x190?_0x189fb8(0x100):undefined);}const _0xe2d664=_0x2b7371[_0x189fb8(0xc9)];throwIfRateLimited(_0x3468cd,_0xe2d664);if(!_0x3468cd['ok']){const _0xcf8765=_0xe2d664&&typeof _0xe2d664===_0x189fb8(0xa1)?_0xe2d664:{};throw CliErrors[_0x189fb8(0xd3)](_0xcf8765['errorMsg']||_0xcf8765[_0x189fb8(0xb7)]||_0x189fb8(0x9b)+_0x3468cd[_0x189fb8(0x143)],_0xcf8765[_0x189fb8(0xee)]?_0x189fb8(0x120)+_0xcf8765[_0x189fb8(0xee)]:undefined);}if(_0xe2d664&&typeof _0xe2d664===_0x189fb8(0xa1)&&_0x189fb8(0x13d)in _0xe2d664&&typeof _0xe2d664[_0x189fb8(0x13d)]===_0x189fb8(0xcb)){const _0x2b6768=_0xe2d664;if(!_0x2b6768[_0x189fb8(0x13d)])throw CliErrors['apiError'](_0x2b6768[_0x189fb8(0xfa)]||_0x2b6768[_0x189fb8(0xb7)]||'Toolbox\x20API\x20error',_0x2b6768['errorCode']?_0x189fb8(0x120)+_0x2b6768[_0x189fb8(0xee)]:undefined);return _0x2b6768['data'];}return _0xe2d664;}catch(_0xe90ccc){if(_0xe90ccc instanceof Error&&_0xe90ccc['name']===_0x189fb8(0xbf))throw CliErrors['apiError'](_0x189fb8(0xc4)+_0x166b5c['toString']());throw _0xe90ccc;}finally{clearTimeout(_0x3ecd7f);}}async function skillHubJsonRequest(_0x9224ad,_0x3aca51={}){const _0x446ccc=a78_0x1a9b,{method:method=_0x446ccc(0x10c),query:_0x36693f,body:_0x5e4559,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x3aca51,_0x45560c=_activeAK;if(!_0x45560c)throw CliErrors[_0x446ccc(0x105)](_0x446ccc(0x9d)+PRODUCT_CONFIG[_0x446ccc(0x114)]+'.');const _0x168eda=getSkillHubDomain()[_0x446ccc(0x115)](/\/$/,''),_0x33f304=new URL(_0x9224ad,_0x168eda+'/');if(_0x36693f)for(const [_0x24ba20,_0x20ce66]of Object[_0x446ccc(0xca)](_0x36693f)){_0x20ce66!==undefined&&_0x20ce66!==null&&_0x33f304['searchParams'][_0x446ccc(0xac)](_0x24ba20,String(_0x20ce66));}const _0x4739e2=new AbortController(),_0x5dba6f=setTimeout(()=>_0x4739e2[_0x446ccc(0xb3)](),timeout);try{const _0x5a4c83=await fetch(_0x33f304[_0x446ccc(0xdf)](),{'method':method,'headers':{'Accept':_0x446ccc(0x108),'X-Invoke-Source':PRODUCT_CONFIG[_0x446ccc(0xc7)],'X-User-AK':_0x45560c,...headers},'body':_0x5e4559,'signal':_0x4739e2[_0x446ccc(0xc0)]}),_0x58b6e2=await decodeResponseBody(_0x5a4c83);if(!_0x58b6e2[_0x446ccc(0x13c)]){if(allowNotFound&&_0x5a4c83['status']===0x194)return undefined;throwIfRateLimited(_0x5a4c83,undefined,_0x58b6e2['text']);throw CliErrors[_0x446ccc(0xd3)](_0x446ccc(0xd0)+_0x5a4c83[_0x446ccc(0x143)]+')',_0x5a4c83[_0x446ccc(0x143)]>=0x190?_0x446ccc(0x100):undefined);}const _0x295a0b=_0x58b6e2[_0x446ccc(0xc9)];throwIfRateLimited(_0x5a4c83,_0x295a0b);if(allowNotFound&&isSkillHubNotFoundResponse(_0x5a4c83[_0x446ccc(0x143)],_0x295a0b))return undefined;const _0xdb1dcf=!_0x5a4c83['ok']||_0x295a0b?.[_0x446ccc(0x13d)]===![]||typeof _0x295a0b?.[_0x446ccc(0x117)]===_0x446ccc(0xdc)&&_0x295a0b[_0x446ccc(0x117)]>=0x190;if(_0xdb1dcf)throw CliErrors['apiError'](_0x295a0b?.[_0x446ccc(0xfa)]||_0x295a0b?.[_0x446ccc(0xb7)]||_0x295a0b?.[_0x446ccc(0xfc)]||_0x446ccc(0x140)+_0x5a4c83[_0x446ccc(0x143)],_0x295a0b?.['errorCode']?_0x446ccc(0xb6)+_0x295a0b[_0x446ccc(0xee)]:undefined);return _0x295a0b?.[_0x446ccc(0xc9)]??_0x295a0b;}catch(_0xe6461e){if(_0xe6461e instanceof Error&&_0xe6461e[_0x446ccc(0xec)]==='AbortError')throw CliErrors[_0x446ccc(0xd3)](_0x446ccc(0xc4)+_0x33f304[_0x446ccc(0xdf)]());throw _0xe6461e;}finally{clearTimeout(_0x5dba6f);}}function isSkillHubNotFoundResponse(_0x5378e9,_0x254fef){const _0x57fe90=a78_0x1a9b;if(_0x5378e9===0x194||_0x254fef?.['code']===0x194)return!![];if(_0x5378e9!==0x190&&_0x254fef?.['code']!==0x190)return![];const _0x49d4d9=[_0x254fef?.['msg'],_0x254fef?.[_0x57fe90(0xb7)],_0x254fef?.[_0x57fe90(0xfa)],_0x254fef?.[_0x57fe90(0x145)]][_0x57fe90(0x148)](_0x9b515f=>typeof _0x9b515f===_0x57fe90(0xf2))[_0x57fe90(0xa6)]('\x20');return/skill not found\b/i[_0x57fe90(0xd7)](_0x49d4d9);}async function skillHubBinaryRequest(_0xe208e2,_0x49bd1b={}){const _0xe3c5c3=a78_0x1a9b,{query:_0x4c630d,headers:headers={},timeout:timeout=0x7530}=_0x49bd1b,_0x1da6a8=_activeAK;if(!_0x1da6a8)throw CliErrors[_0xe3c5c3(0x105)](_0xe3c5c3(0x9d)+PRODUCT_CONFIG[_0xe3c5c3(0x114)]+'.');const _0x50e4af=getSkillHubDomain()[_0xe3c5c3(0x115)](/\/$/,''),_0x24f0b8=new URL(_0xe208e2,_0x50e4af+'/');if(_0x4c630d)for(const [_0x486564,_0x59c003]of Object['entries'](_0x4c630d)){_0x59c003!==undefined&&_0x59c003!==null&&_0x24f0b8[_0xe3c5c3(0x113)]['set'](_0x486564,String(_0x59c003));}const _0x1e79f9=new AbortController(),_0x41998b=setTimeout(()=>_0x1e79f9['abort'](),timeout);try{const _0x13a226=await fetch(_0x24f0b8['toString'](),{'method':_0xe3c5c3(0x10c),'headers':{'Accept':'application/octet-stream','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x1da6a8,...headers},'signal':_0x1e79f9[_0xe3c5c3(0xc0)]});if(!_0x13a226['ok']){const _0x2ca2bf=await decodeResponseBody(_0x13a226),_0x21657c=_0x2ca2bf['data']&&typeof _0x2ca2bf['data']===_0xe3c5c3(0xa1)?_0x2ca2bf[_0xe3c5c3(0xc9)]:{},_0x158e61=firstString(_0x21657c['errorMsg'],_0x21657c['message'],_0x21657c['msg'],_0x21657c[_0xe3c5c3(0xee)],_0x2ca2bf[_0xe3c5c3(0x11b)]);throwIfRateLimited(_0x13a226,_0x2ca2bf[_0xe3c5c3(0xc9)],_0x158e61);throw CliErrors[_0xe3c5c3(0xd3)](_0x158e61||'SkillHub\x20API\x20error:\x20'+_0x13a226['status'],'Download\x20failed:\x20'+_0x24f0b8[_0xe3c5c3(0xdf)]());}return Buffer[_0xe3c5c3(0x141)](await _0x13a226[_0xe3c5c3(0x121)]());}catch(_0x405ede){if(_0x405ede instanceof Error&&_0x405ede['name']===_0xe3c5c3(0xbf))throw CliErrors[_0xe3c5c3(0xd3)](_0xe3c5c3(0xc4)+_0x24f0b8[_0xe3c5c3(0xdf)]());throw _0x405ede;}finally{clearTimeout(_0x41998b);}}export async function getBffEndpointContract(_0x30a3a0,_0x136108){const _0x8258dc=a78_0x1a9b;if(_0x136108===_0x8258dc(0xe4))throw CliErrors[_0x8258dc(0x132)](_0x8258dc(0xd6)+_0x30a3a0+_0x8258dc(0xea)+_0x136108);const _0x1e44cd=await apiRequest(_0x8258dc(0xe7)+encodeURIComponent(_0x30a3a0)+'/'+encodeURIComponent(_0x136108)),_0x3de547=_0x1e44cd[_0x8258dc(0xc9)];if(!_0x3de547||typeof _0x3de547!==_0x8258dc(0xa1)||Array[_0x8258dc(0x135)](_0x3de547)||_0x3de547[_0x8258dc(0xb8)]!==_0x30a3a0||_0x3de547[_0x8258dc(0x13e)]!==_0x136108)throw CliErrors[_0x8258dc(0x132)]('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x30a3a0+',\x20name='+_0x136108);return{'appCode':_0x3de547[_0x8258dc(0xb8)],'functionName':_0x3de547[_0x8258dc(0x13e)],'description':_0x3de547[_0x8258dc(0xfd)],'version':_0x3de547[_0x8258dc(0xd8)],'gmtModified':_0x3de547[_0x8258dc(0x133)]};}export async function getSqlQueryInfo(_0x8b1ed4,_0x43e83e){const _0x44e731=a78_0x1a9b,_0x1b0bbd=await apiRequest('/client/sql/query',{'method':'POST','body':{'appCode':_0x8b1ed4,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x43e83e}}),_0x17eba0=_0x1b0bbd[_0x44e731(0xc9)],_0x34db44=_0x17eba0&&typeof _0x17eba0===_0x44e731(0xa1)&&_0x44e731(0x146)in _0x17eba0?_0x17eba0[_0x44e731(0x146)]?.[0x0]:_0x17eba0&&typeof _0x17eba0===_0x44e731(0xa1)&&_0x44e731(0x127)in _0x17eba0?_0x17eba0:undefined;if(!_0x34db44)throw CliErrors[_0x44e731(0x132)]('SQL\x20query\x20not\x20found:\x20'+_0x43e83e);return _0x34db44;}function isRemoteAppItem(_0x593e93){const _0x3a6105=a78_0x1a9b;return!!_0x593e93&&typeof _0x593e93==='object'&&typeof _0x593e93['appCode']==='string'&&typeof _0x593e93[_0x3a6105(0x118)]===_0x3a6105(0xf2);}function extractRemoteAppItems(_0x192fc6){const _0xf3cc6a=a78_0x1a9b;if(Array['isArray'](_0x192fc6))return _0x192fc6[_0xf3cc6a(0x148)](isRemoteAppItem);if(!_0x192fc6||typeof _0x192fc6!=='object')throw CliErrors[_0xf3cc6a(0xd3)](_0xf3cc6a(0xa8));const _0x3156f5=_0x192fc6;if(Array[_0xf3cc6a(0x135)](_0x3156f5[_0xf3cc6a(0x146)]))return _0x3156f5[_0xf3cc6a(0x146)][_0xf3cc6a(0x148)](isRemoteAppItem);if(_0x3156f5[_0xf3cc6a(0xc9)]&&typeof _0x3156f5[_0xf3cc6a(0xc9)]===_0xf3cc6a(0xa1)){const _0x37ed87=_0x3156f5['data'];if(Array[_0xf3cc6a(0x135)](_0x37ed87['tableData']))return _0x37ed87[_0xf3cc6a(0x146)][_0xf3cc6a(0x148)](isRemoteAppItem);}throw CliErrors[_0xf3cc6a(0xd3)](_0xf3cc6a(0x10e));}export async function getMyApps(){const _0x29fc54=a78_0x1a9b,_0x16b687=await apiRequest(_0x29fc54(0x111));return extractRemoteAppItems(_0x16b687[_0x29fc54(0xc9)]);}export async function getLoginUserInfo(){const _0x28e8a3=a78_0x1a9b,_0x564fa8=await apiRequest('/client/user/loginUserInfo');if(!_0x564fa8[_0x28e8a3(0xc9)]||typeof _0x564fa8['data']!==_0x28e8a3(0xa1)||Array['isArray'](_0x564fa8['data']))throw CliErrors[_0x28e8a3(0xd3)](_0x28e8a3(0x12b));return _0x564fa8[_0x28e8a3(0xc9)];}function runtimeSchedulePath(_0x436a7f,_0x131c99=''){const _0x2fa764=a78_0x1a9b;return _0x2fa764(0x139)+encodeURIComponent(_0x436a7f)+_0x2fa764(0x10a)+_0x131c99;}export async function validateRuntimeSchedule(_0x1034cc,_0x4dfcae){const _0xf0bd46=a78_0x1a9b,_0xb80d3d=await apiRequest(runtimeSchedulePath(_0x1034cc,_0xf0bd46(0x11c)),{'method':_0xf0bd46(0xc1),'body':_0x4dfcae});return _0xb80d3d[_0xf0bd46(0xc9)];}export async function createRuntimeSchedule(_0x2437a2,_0x369ef0){const _0x575034=a78_0x1a9b,_0x14228d=await apiRequest(runtimeSchedulePath(_0x2437a2),{'method':_0x575034(0xc1),'body':_0x369ef0});return _0x14228d[_0x575034(0xc9)];}export async function listRuntimeSchedules(_0x434733,_0x35d0b1={}){const _0x575fdc=a78_0x1a9b,_0x414860=new URLSearchParams();if(_0x35d0b1['limit']!==undefined)_0x414860[_0x575fdc(0xac)](_0x575fdc(0x13a),String(_0x35d0b1[_0x575fdc(0x13a)]));if(_0x35d0b1['cursor'])_0x414860[_0x575fdc(0xac)](_0x575fdc(0x126),_0x35d0b1[_0x575fdc(0x126)]);const _0x55c370=_0x414860['size']>0x0?'?'+_0x414860[_0x575fdc(0xdf)]():'',_0x5f3e29=await apiRequest(''+runtimeSchedulePath(_0x434733)+_0x55c370);return _0x5f3e29[_0x575fdc(0xc9)];}export async function getRuntimeSchedule(_0x127746,_0x418ded){const _0x3c0649=a78_0x1a9b,_0x2f30fb=await apiRequest(runtimeSchedulePath(_0x127746,'/'+encodeURIComponent(_0x418ded)));return _0x2f30fb[_0x3c0649(0xc9)];}export async function deleteRuntimeSchedule(_0x53109c,_0x15345a){const _0x41c11e=a78_0x1a9b,_0x2ebef7=await apiRequest(runtimeSchedulePath(_0x53109c,'/'+encodeURIComponent(_0x15345a)),{'method':_0x41c11e(0xe6)});return _0x2ebef7['data'];}export async function runRuntimeSchedule(_0x4a287e,_0x453c5f){const _0x2cbc88=a78_0x1a9b,_0x498328=await apiRequest(runtimeSchedulePath(_0x4a287e,'/'+encodeURIComponent(_0x453c5f)+_0x2cbc88(0xd5)),{'method':_0x2cbc88(0xc1)});return _0x498328[_0x2cbc88(0xc9)];}export async function listDatasets(_0x241dfe,_0x23dc41){const _0x1fd443=a78_0x1a9b,_0x24c957=await apiRequest('/client/dataset/list',{'method':_0x1fd443(0xc1),'body':{'appCode':_0x241dfe,..._0x23dc41?.[_0x1fd443(0x117)]&&{'code':_0x23dc41[_0x1fd443(0x117)]},..._0x23dc41?.[_0x1fd443(0xec)]&&{'name':_0x23dc41[_0x1fd443(0xec)]}}});return extractList(_0x24c957[_0x1fd443(0xc9)]);}export async function getDatasetDetail(_0x3534d8){const _0x10f4eb=a78_0x1a9b,_0xb1104e=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0x3534d8));return _0xb1104e[_0x10f4eb(0xc9)];}export async function getDatasetSdkUsageDoc(_0x2abcdc,_0x4b00f0){const _0x6a0798=a78_0x1a9b,_0x5252d9=await toolboxRequest(_0x6a0798(0x130),{'datasetCode':_0x2abcdc,'appCode':_0x4b00f0});return typeof _0x5252d9?.[_0x6a0798(0xb5)]===_0x6a0798(0xf2)?_0x5252d9['markdown']:'';}export async function uploadRuntimeFile(_0x2a2a69,_0x2f054d){const _0x195622=a78_0x1a9b,_0x5b3323=await readFile(_0x2f054d),_0x51a12d=new FormData();_0x51a12d['append']('appCode',_0x2a2a69),_0x51a12d['append']('file',new Blob([new Uint8Array(_0x5b3323)]),basename(_0x2f054d));const _0x7c3e0a=await apiFormRequest(_0x195622(0x11e),_0x51a12d);return _0x7c3e0a['data'];}export async function queryRuntimeFileUrl(_0x2696d1,_0x4a125b={}){const _0x43893a=a78_0x1a9b,_0x22ad4e=await apiRequest(_0x43893a(0xcd),{'method':_0x43893a(0xc1),'body':{'filePath':_0x2696d1,'downloadFlag':_0x4a125b[_0x43893a(0xf9)]??![],..._0x4a125b['longTerm']?{'longTerm':!![]}:{}}});return _0x22ad4e[_0x43893a(0xc9)];}export async function recognizeRuntimeOcr(_0x29a586,_0x4fd288){const _0x577504=a78_0x1a9b,_0x17d4d3=await apiRequest(_0x577504(0xc2),{'method':_0x577504(0xc1),'body':{'appCode':_0x29a586,'url':_0x4fd288['url'],'type':_0x4fd288[_0x577504(0x11d)]}});return _0x17d4d3['data'];}export async function getRuntimeAppConfigByKey(_0x3c175c,_0x583672){const _0x1abeb9=a78_0x1a9b,_0x21861f=new URLSearchParams({'appCode':_0x3c175c,'key':_0x583672}),_0x356c52=await apiRequest('/client/app-config/getByKey?'+_0x21861f[_0x1abeb9(0xdf)]());if(typeof _0x356c52[_0x1abeb9(0xc9)]!==_0x1abeb9(0xf2))throw CliErrors[_0x1abeb9(0x132)](_0x1abeb9(0xf3)+_0x583672);return _0x356c52[_0x1abeb9(0xc9)];}export async function listRuntimeArtifacts(_0x556bc5,_0x535368){const _0x3de470=a78_0x1a9b,_0x31d284=new URLSearchParams({'appCode':_0x556bc5});if(_0x535368?.[_0x3de470(0xa3)])_0x31d284[_0x3de470(0xac)](_0x3de470(0xa3),_0x535368[_0x3de470(0xa3)]);if(_0x535368?.[_0x3de470(0xb4)])_0x31d284[_0x3de470(0xac)](_0x3de470(0xb4),_0x535368[_0x3de470(0xb4)]);if(_0x535368?.[_0x3de470(0x142)]!==undefined)_0x31d284[_0x3de470(0xac)](_0x3de470(0x142),String(_0x535368['favorite']));const _0x35903a=await apiRequest('/client/artifact/list?'+_0x31d284[_0x3de470(0xdf)]());return Array['isArray'](_0x35903a[_0x3de470(0xc9)])?_0x35903a[_0x3de470(0xc9)]:[];}export async function getRuntimeArtifact(_0x4bea10,_0x2fc20b){const _0x4f9c90=a78_0x1a9b,_0x1b6bd4=await apiRequest(_0x4f9c90(0x134)+_0x4bea10+'?appCode='+encodeURIComponent(_0x2fc20b));if(!_0x1b6bd4[_0x4f9c90(0xc9)])throw CliErrors['validation'](_0x4f9c90(0xaf)+_0x4bea10);return _0x1b6bd4[_0x4f9c90(0xc9)];}export async function createRuntimeArtifact(_0x5072dc,_0x16803d){const _0x25f671=a78_0x1a9b,_0x257c0f=await apiRequest('/client/artifact/create',{'method':_0x25f671(0xc1),'body':{'appCode':_0x5072dc,..._0x16803d}});return _0x257c0f[_0x25f671(0xc9)];}export async function updateRuntimeArtifact(_0x2ebb03,_0x1213ac,_0x13f215){const _0x5b4eba=a78_0x1a9b,_0x555ef2=await apiRequest(_0x5b4eba(0x134)+_0x2ebb03+'/update',{'method':_0x5b4eba(0xc1),'body':{'appCode':_0x1213ac,..._0x13f215}});return _0x555ef2[_0x5b4eba(0xc9)];}export async function listPersonalBffs(_0x45aa13){const _0x5c1eeb=a78_0x1a9b,_0x54f917=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x45aa13));return Array[_0x5c1eeb(0x135)](_0x54f917['data'])?_0x54f917[_0x5c1eeb(0xc9)]:[];}export async function getPersonalBff(_0x516c8e,_0x30d265){const _0xc1470c=a78_0x1a9b,_0x5807e2=await apiRequest(_0xc1470c(0x13b)+_0x516c8e+'?appCode='+encodeURIComponent(_0x30d265));if(!_0x5807e2[_0xc1470c(0xc9)])throw CliErrors[_0xc1470c(0x132)](_0xc1470c(0xe8)+_0x516c8e);return _0x5807e2['data'];}export async function createPersonalBff(_0x412774,_0x101743){const _0x5ed473=a78_0x1a9b,_0x143b01=await apiRequest(_0x5ed473(0x104),{'method':_0x5ed473(0xc1),'body':{'appCode':_0x412774,..._0x101743}});return _0x143b01[_0x5ed473(0xc9)];}export async function updatePersonalBff(_0x365153,_0x603d53,_0xf5fcd4){const _0x39ad69=a78_0x1a9b,_0x3b6b3d=await apiRequest('/client/runtime-bff/personal/'+_0x365153+_0x39ad69(0xf4),{'method':_0x39ad69(0xc1),'body':{'appCode':_0x603d53,..._0xf5fcd4}});return _0x3b6b3d[_0x39ad69(0xc9)];}export async function executePersonalBff(_0x85301a,_0x3f926f,_0xf3a27a){const _0x211a6c=a78_0x1a9b,_0x39b36b=await apiRequest('/client/runtime-bff/personal/'+_0x85301a+_0x211a6c(0x116)+encodeURIComponent(_0x3f926f),{'method':_0x211a6c(0xc1),'body':_0xf3a27a});return _0x39b36b['data'];}export async function listPersonalKnowledgeBaseItems(_0x396dab){const _0x448d7b=a78_0x1a9b,_0x30bb2c=await apiRequest(_0x448d7b(0x9c)+encodeURIComponent(_0x396dab));return Array[_0x448d7b(0x135)](_0x30bb2c['data'])?_0x30bb2c[_0x448d7b(0xc9)]:[];}export async function getPersonalKnowledgeBaseItem(_0x560055,_0x5b1ac9){const _0x211c52=a78_0x1a9b,_0xc3cb6c=await apiRequest(_0x211c52(0xd9)+_0x560055+'?appCode='+encodeURIComponent(_0x5b1ac9));if(!_0xc3cb6c['data'])throw CliErrors[_0x211c52(0x132)](_0x211c52(0xe1)+_0x560055);return _0xc3cb6c[_0x211c52(0xc9)];}export async function createPersonalKnowledgeBaseItem(_0x21a98b,_0x1db8ea){const _0x229789=a78_0x1a9b,_0x1589b2=await apiRequest(_0x229789(0xc6),{'method':_0x229789(0xc1),'body':{'appCode':_0x21a98b,..._0x1db8ea}});return _0x1589b2[_0x229789(0xc9)];}export async function updatePersonalKnowledgeBaseItem(_0x1e6e00,_0x45bd16,_0x2eb1d9){const _0x3cb3c7=a78_0x1a9b,_0x522454=await apiRequest(_0x3cb3c7(0xd9)+_0x1e6e00+_0x3cb3c7(0xf4),{'method':'POST','body':{'appCode':_0x45bd16,..._0x2eb1d9}});return _0x522454[_0x3cb3c7(0xc9)];}export async function searchKnowledgeBase(_0x370199,_0x4e860b){const _0xe6b7c8=a78_0x1a9b,_0x2813be=await apiRequest(_0xe6b7c8(0xed),{'method':_0xe6b7c8(0xc1),'body':{'appCode':_0x370199,'query':_0x4e860b[_0xe6b7c8(0xe9)],..._0x4e860b[_0xe6b7c8(0xb2)]!==undefined?{'topK':_0x4e860b['topK']}:{}}});return Array[_0xe6b7c8(0x135)](_0x2813be['data'])?_0x2813be[_0xe6b7c8(0xc9)]:[];}export async function getRuntimeSkillByCode(_0x54e8cc,_0x5b74ee){const _0x1c4256=a78_0x1a9b,_0x2e1fbf=await skillHubJsonRequest(_0x1c4256(0x131)+encodeURIComponent(_0x54e8cc)+'/'+encodeURIComponent(_0x5b74ee),{'allowNotFound':!![]});return _0x2e1fbf?skillHubRuntimeDetailToRuntimeSkill(_0x2e1fbf):undefined;}export async function listRuntimeSkills(_0x4edc49){const _0x128c68=a78_0x1a9b,_0x57cf0e=await skillHubJsonRequest(_0x128c68(0xe5)+encodeURIComponent(_0x4edc49[_0x128c68(0xb8)])+_0x128c68(0xef),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x4edc49[_0x128c68(0xb8)],_0x57cf0e,_0x4edc49[_0x128c68(0xb1)]??_0x128c68(0xaa),_0x4edc49[_0x128c68(0x117)]);}export async function listPersonalRuntimeSkills(_0x3a8100){const _0x2ff81b=a78_0x1a9b;return(await listRuntimeSkills({'appCode':_0x3a8100,'scope':_0x2ff81b(0xa7)}))[_0x2ff81b(0xa7)];}export async function listCompanyRuntimeSkills(_0x22a430){const _0x49a455=a78_0x1a9b;return(await listRuntimeSkills({'appCode':_0x22a430,'scope':_0x49a455(0xbe)}))[_0x49a455(0xbe)];}export async function listVisibleRuntimeSkills(_0x388f95){const _0x588f42=a78_0x1a9b;return(await listRuntimeSkills({'appCode':_0x388f95,'scope':_0x588f42(0xaa)}))[_0x588f42(0xf6)];}export async function createPersonalRuntimeSkill(_0x3818ce,_0x44ef28,_0x5a9a4b={}){const _0x2d0070=a78_0x1a9b;return publishRuntimeSkill(_0x3818ce,_0x44ef28,{'visibility':'PRIVATE','confirmWarnings':_0x5a9a4b[_0x2d0070(0xde)]});}export async function updatePersonalRuntimeSkill(_0x1929cc,_0x9082cc,_0x4c9395,_0xad081c={}){const _0x24a273=a78_0x1a9b;return publishRuntimeSkill(_0x9082cc,{..._0x4c9395,'skillCode':_0x4c9395[_0x24a273(0x137)]??_0x1929cc},{'visibility':_0x24a273(0xfb),'confirmWarnings':_0xad081c[_0x24a273(0xde)]});}export async function publishCompanyRuntimeSkill(_0x363d0a,_0x176c7e,_0x4bf6d7={}){const _0x5eefa8=a78_0x1a9b;return publishRuntimeSkill(_0x363d0a,_0x176c7e,{'visibility':_0x5eefa8(0xe3),'confirmWarnings':_0x4bf6d7[_0x5eefa8(0xde)]});}export async function validateRuntimeSkillPublish(_0x479cd6,_0x289a6a,_0x5878e8){const _0x261294=a78_0x1a9b,_0x10ba57=buildRuntimeSkillPublishForm(_0x289a6a,_0x5878e8[_0x261294(0x12e)]),_0x28fc9b=await skillHubJsonRequest(_0x261294(0x109)+encodeURIComponent(_0x479cd6)+_0x261294(0xf5),{'method':_0x261294(0xc1),'body':_0x10ba57});return assertJointDiagramAcknowledged(_0x289a6a['diagram'],_0x28fc9b['diagramValidated'],'validation'),{'valid':_0x28fc9b[_0x261294(0x103)]===!![],'errors':Array[_0x261294(0x135)](_0x28fc9b['errors'])?_0x28fc9b[_0x261294(0xc5)]:[],'warnings':Array[_0x261294(0x135)](_0x28fc9b['warnings'])?_0x28fc9b[_0x261294(0xd1)]:[],'resolvedSlug':_0x28fc9b[_0x261294(0x106)],'resolvedVersion':_0x28fc9b['resolvedVersion'],'diagramValidated':_0x28fc9b[_0x261294(0xbc)]===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x405678,_0x29e9d8,_0x5b42b2,_0x1040b3,_0x538804){const _0x5aab37=a78_0x1a9b;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x405678,_0x29e9d8,_0x5b42b2,_0x5aab37(0x11c)),{'method':_0x5aab37(0xc1),'query':{'scope':_0x1040b3},'headers':{'Content-Type':_0x5aab37(0x108)},'body':JSON[_0x5aab37(0xae)](_0x538804)});}export async function putRuntimeSkillVersionDiagram(_0xcebeba,_0xed811d,_0x4fa3b0,_0x28ca9a,_0x1fbfd6){const _0x4966fa=a78_0x1a9b;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0xcebeba,_0xed811d,_0x4fa3b0),{'method':_0x4966fa(0xa5),'query':{'scope':_0x28ca9a},'headers':{'Content-Type':_0x4966fa(0x108)},'body':JSON[_0x4966fa(0xae)](_0x1fbfd6)});}export async function getRuntimeSkillVersionDiagram(_0x48d632,_0x5d61e4,_0x348e3a,_0x2e52f3){const _0x491f83=a78_0x1a9b,_0x2421dc=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x48d632,_0x5d61e4,_0x348e3a),{'query':{'scope':_0x2e52f3}});if(typeof _0x2421dc[_0x491f83(0xbd)]!==_0x491f83(0xcb))throw CliErrors[_0x491f83(0xd3)](_0x491f83(0x147));const _0x31f4c4=_0x2421dc[_0x491f83(0xb9)];if(typeof _0x31f4c4!==_0x491f83(0xf2)||!/^sha256:[0-9a-f]{64}$/[_0x491f83(0xd7)](_0x31f4c4))throw CliErrors[_0x491f83(0xd3)](_0x491f83(0xa4),_0x491f83(0xf1));const _0x3cc9ff=_0x2421dc['diagramRevision'];if(_0x2421dc['found']&&(!Number[_0x491f83(0xce)](_0x3cc9ff)||Number(_0x3cc9ff)<0x1))throw CliErrors[_0x491f83(0xd3)](_0x491f83(0xfe));if(!_0x2421dc[_0x491f83(0xbd)]&&_0x3cc9ff!==undefined&&_0x3cc9ff!==null)throw CliErrors[_0x491f83(0xd3)]('Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.');const _0x27eb9b=_0x2421dc[_0x491f83(0xbd)]?Number(_0x3cc9ff):null;return{..._0x2421dc,'sourceFingerprint':_0x31f4c4,'diagramRevision':_0x27eb9b,'expectedDiagramRevision':_0x27eb9b??0x0};}export async function downloadRuntimeSkillPackage(_0x5acd36,_0x5cb197,_0x3d17cf,_0x8e70d2){const _0xef1701=a78_0x1a9b;void _0x5acd36;const _0x2c7e21=_0x8e70d2?_0xef1701(0x109)+encodeURIComponent(_0x3d17cf)+'/'+encodeURIComponent(_0x5cb197)+_0xef1701(0x10d)+encodeURIComponent(_0x8e70d2)+_0xef1701(0x124):_0xef1701(0x109)+encodeURIComponent(_0x3d17cf)+'/'+encodeURIComponent(_0x5cb197)+_0xef1701(0x124);return skillHubBinaryRequest(_0x2c7e21);}async function publishRuntimeSkill(_0x5392b4,_0x5e43cc,_0x3ca637){const _0x269cc9=a78_0x1a9b,_0x518091=buildRuntimeSkillPublishForm(_0x5e43cc,_0x3ca637[_0x269cc9(0x12e)]),_0x1ee7bf=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x5392b4)+_0x269cc9(0x112),{'method':_0x269cc9(0xc1),'query':{'confirmWarnings':_0x3ca637[_0x269cc9(0xde)]===!![]?!![]:undefined},'body':_0x518091});return assertJointDiagramAcknowledged(_0x5e43cc['diagram'],_0x1ee7bf[_0x269cc9(0xa9)],_0x269cc9(0xff)),{'appCode':_0x1ee7bf[_0x269cc9(0x10b)]??_0x5392b4,'skillCode':_0x1ee7bf[_0x269cc9(0x12c)]??_0x5e43cc[_0x269cc9(0x137)]??'','skillName':_0x5e43cc[_0x269cc9(0x9f)]??_0x1ee7bf[_0x269cc9(0x12c)]??_0x5e43cc[_0x269cc9(0x137)],'description':_0x5e43cc[_0x269cc9(0xfd)],'scope':skillHubVisibilityToScope(_0x1ee7bf[_0x269cc9(0x12e)]??_0x3ca637['visibility'])??'personal','version':_0x1ee7bf[_0x269cc9(0xd8)]??_0x5e43cc[_0x269cc9(0xd8)],'tags':_0x5e43cc[_0x269cc9(0x12f)],'content':_0x5e43cc[_0x269cc9(0x123)],'diagramBound':_0x1ee7bf[_0x269cc9(0xa9)]===!![]};}function assertJointDiagramAcknowledged(_0x40b5ee,_0x4001b3,_0x443fd2){const _0x26ce2b=a78_0x1a9b;if(!_0x40b5ee||_0x4001b3===!![])return;throw CliErrors[_0x26ce2b(0xd3)](_0x26ce2b(0xdd)+_0x443fd2+'.',_0x26ce2b(0xa0));}function buildRuntimeSkillPublishForm(_0x30d56f,_0x363b1c){const _0x341034=a78_0x1a9b,_0x2882b4=new FormData();return _0x2882b4[_0x341034(0xac)](_0x341034(0x136),runtimeSkillPackageFile(_0x30d56f)),_0x30d56f[_0x341034(0x9f)]?.[_0x341034(0x138)]()&&_0x2882b4[_0x341034(0xac)](_0x341034(0x9e),_0x30d56f[_0x341034(0x9f)]['trim']()),_0x2882b4[_0x341034(0xac)](_0x341034(0x12e),_0x363b1c),_0x30d56f[_0x341034(0x101)]&&_0x2882b4[_0x341034(0xac)]('diagram',new Blob([JSON[_0x341034(0xae)](_0x30d56f[_0x341034(0x101)])],{'type':'application/json'})),_0x2882b4;}function runtimeSkillVersionDiagramPath(_0x58e183,_0x1b293c,_0x46e940,_0x2ddfcf=''){const _0x9f3f08=a78_0x1a9b;return _0x9f3f08(0x109)+encodeURIComponent(_0x58e183)+'/'+encodeURIComponent(_0x1b293c)+_0x9f3f08(0x10d)+encodeURIComponent(_0x46e940)+_0x9f3f08(0xdb)+_0x2ddfcf;}function runtimeSkillPackageFile(_0x16d185){const _0x49ecd2=a78_0x1a9b;if(!_0x16d185[_0x49ecd2(0x107)])throw CliErrors[_0x49ecd2(0x132)]('Missing\x20Skill\x20package\x20payload.');const _0x1166f2=Buffer['from'](_0x16d185[_0x49ecd2(0x107)],_0x49ecd2(0xcc)),_0x2b76ab=new Blob([_0x1166f2],{'type':'application/zip'}),_0x508d99=(_0x16d185[_0x49ecd2(0x137)]||_0x49ecd2(0xd4))+'.zip';if(typeof File!==_0x49ecd2(0xe2))return new File([_0x2b76ab],_0x508d99,{'type':'application/zip'});return _0x2b76ab;}function normalizeSkillHubRuntimeListResponse(_0x1dde96,_0x31e9ce,_0x2bc5b4,_0x246df0){const _0x2f37f7=a78_0x1a9b,_0x18b649=Array[_0x2f37f7(0x135)](_0x31e9ce)?_0x31e9ce:Array[_0x2f37f7(0x135)](_0x31e9ce?.[_0x2f37f7(0x102)])?_0x31e9ce['items']:[],_0x389458=_0x246df0?.[_0x2f37f7(0x138)](),_0x56c6c7=_0x18b649[_0x2f37f7(0x148)](_0xd0db4d=>!_0x389458||_0xd0db4d[_0x2f37f7(0x12c)]===_0x389458)[_0x2f37f7(0xd2)](skillHubRuntimeItemToRuntimeSkill)[_0x2f37f7(0x148)](_0x3ac8fb=>Boolean(_0x3ac8fb)),_0x58d402=_0x56c6c7[_0x2f37f7(0x148)](_0x3df8c7=>_0x3df8c7[_0x2f37f7(0xb1)]==='personal'),_0x115df8=_0x56c6c7['filter'](_0x254bd6=>_0x254bd6[_0x2f37f7(0xb1)]===_0x2f37f7(0xbe));return{'appCode':_0x1dde96,'personal':_0x2bc5b4==='company'?[]:_0x58d402,'company':_0x2bc5b4===_0x2f37f7(0xa7)?[]:_0x115df8,'effective':buildEffectiveRuntimeSkills(_0x58d402,_0x115df8,_0x2bc5b4)};}function skillHubRuntimeItemToRuntimeSkill(_0x1a88d5){const _0xd15066=a78_0x1a9b,_0x215e6c=_0x1a88d5[_0xd15066(0x12c)]?.['trim'](),_0x2ed628=skillHubVisibilityToScope(_0x1a88d5[_0xd15066(0x12e)]);if(!_0x215e6c||!_0x2ed628)return undefined;return{'id':_0x1a88d5['id'],'appCode':_0x1a88d5['namespace'],'skillCode':_0x215e6c,'skillName':_0x1a88d5[_0xd15066(0x9e)]??_0x215e6c,'description':_0x1a88d5['summary'],'scope':_0x2ed628,'version':skillHubRuntimeItemVersion(_0x1a88d5),'status':_0x1a88d5['status']};}function skillHubRuntimeDetailToRuntimeSkill(_0x13245d){const _0x219ab4=a78_0x1a9b,_0x3cc00c=_0x13245d['slug']?.[_0x219ab4(0x138)]();if(!_0x3cc00c)return undefined;return{'id':_0x13245d['id'],'appCode':_0x13245d[_0x219ab4(0x10b)],'skillCode':_0x3cc00c,'skillName':_0x13245d[_0x219ab4(0x9e)]??_0x3cc00c,'description':_0x13245d[_0x219ab4(0x110)],'example':_0x13245d['example'],'scope':skillHubVisibilityToScope(_0x13245d[_0x219ab4(0x12e)])??_0x13245d[_0x219ab4(0x12e)]?.[_0x219ab4(0x11f)](),'version':skillHubRuntimeItemVersion(_0x13245d),'status':_0x13245d[_0x219ab4(0x143)]};}function skillHubVisibilityToScope(_0x20fdcc){const _0x47098a=a78_0x1a9b;if(_0x20fdcc==='PRIVATE')return _0x47098a(0xa7);if(_0x20fdcc===_0x47098a(0xe3))return _0x47098a(0xbe);return undefined;}function skillHubRuntimeItemVersion(_0x494cea){const _0x1fb7e3=a78_0x1a9b;return _0x494cea[_0x1fb7e3(0xe0)]?.[_0x1fb7e3(0xd8)]??_0x494cea[_0x1fb7e3(0x13f)]?.[_0x1fb7e3(0xd8)]??_0x494cea[_0x1fb7e3(0xab)]?.[_0x1fb7e3(0xd8)];}function buildEffectiveRuntimeSkills(_0x4916d8,_0x17cc00,_0x582d8f){const _0x499583=a78_0x1a9b;if(_0x582d8f===_0x499583(0xa7))return _0x4916d8;if(_0x582d8f===_0x499583(0xbe))return _0x17cc00;const _0x3496c6=new Map();for(const _0x15f6e9 of _0x17cc00){_0x3496c6[_0x499583(0xac)](_0x15f6e9[_0x499583(0x137)],_0x15f6e9);}for(const _0x308d6d of _0x4916d8){_0x3496c6[_0x499583(0xac)](_0x308d6d[_0x499583(0x137)],_0x308d6d);}return Array['from'](_0x3496c6[_0x499583(0x10f)]());}function normalizeRuntimeSkillListResponse(_0x1670c7,_0x4cb489){const _0x1b721f=a78_0x1a9b;if(Array[_0x1b721f(0x135)](_0x4cb489)){const _0x2593d4=_0x4cb489[_0x1b721f(0x148)](_0xb4d31e=>_0xb4d31e[_0x1b721f(0xb1)]===_0x1b721f(0xa7)),_0x2610d0=_0x4cb489[_0x1b721f(0x148)](_0x164a4a=>_0x164a4a[_0x1b721f(0xb1)]==='company');return{'appCode':_0x1670c7,'personal':_0x2593d4,'company':_0x2610d0,'effective':[..._0x2610d0,..._0x2593d4]};}return{'appCode':_0x4cb489?.[_0x1b721f(0xb8)]??_0x1670c7,'personal':Array[_0x1b721f(0x135)](_0x4cb489?.[_0x1b721f(0xa7)])?_0x4cb489[_0x1b721f(0xa7)]:[],'company':Array[_0x1b721f(0x135)](_0x4cb489?.[_0x1b721f(0xbe)])?_0x4cb489[_0x1b721f(0xbe)]:[],'effective':Array[_0x1b721f(0x135)](_0x4cb489?.['effective'])?_0x4cb489[_0x1b721f(0xf6)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x272c70,_0x48a03d){const _0x1bee5a=a79_0x95d9,_0x2bd5c0=_0x272c70();while(!![]){try{const _0x3b55f0=parseInt(_0x1bee5a(0x1ce))/0x1*(parseInt(_0x1bee5a(0x1d0))/0x2)+parseInt(_0x1bee5a(0x1d5))/0x3+parseInt(_0x1bee5a(0x1d3))/0x4+-parseInt(_0x1bee5a(0x1d2))/0x5*(-parseInt(_0x1bee5a(0x1c9))/0x6)+parseInt(_0x1bee5a(0x1cf))/0x7+parseInt(_0x1bee5a(0x1c7))/0x8*(-parseInt(_0x1bee5a(0x1d1))/0x9)+-parseInt(_0x1bee5a(0x1c8))/0xa;if(_0x3b55f0===_0x48a03d)break;else _0x2bd5c0['push'](_0x2bd5c0['shift']());}catch(_0xcae0ff){_0x2bd5c0['push'](_0x2bd5c0['shift']());}}}(a79_0x18d2,0x50a16));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0xb5ec94){const _0x172a88=a79_0x95d9;if(cache['has'](_0xb5ec94))return cache['get'](_0xb5ec94);const _0x128024=await listDatasets(_0xb5ec94),_0x3e6335=new Map();for(const _0x1be5ed of _0x128024){const _0x181bcf=_0x1be5ed[_0x172a88(0x1c6)];_0x181bcf?.[_0x172a88(0x1cd)]!=null&&_0x3e6335[_0x172a88(0x1ca)](_0x181bcf['dbId'],_0x181bcf[_0x172a88(0x1cc)]??_0x172a88(0x1cb)+_0x181bcf[_0x172a88(0x1cd)]);}const _0x10a6b0=[..._0x3e6335[_0x172a88(0x1d4)]()]['map'](([_0xa78d73,_0x35edc8])=>({'dbId':_0xa78d73,'dbName':_0x35edc8}));return cache[_0x172a88(0x1ca)](_0xb5ec94,_0x10a6b0),_0x10a6b0;}function a79_0x95d9(_0x5d5c26,_0x2f216f){_0x5d5c26=_0x5d5c26-0x1c6;const _0x18d2b4=a79_0x18d2();let _0x95d979=_0x18d2b4[_0x5d5c26];return _0x95d979;}function a79_0x18d2(){const _0x5218bb=['40uFQDHq','15747460zYIlPf','102XXzGIW','set','db-','dbName','dbId','424171mlDVYM','1510880JcWxHN','2UagCpB','377289aguJqk','142945HMVugi','1480768ybyhOL','entries','1855191CBMHIH','dbtableConfig'];a79_0x18d2=function(){return _0x5218bb;};return a79_0x18d2();}export async function getDbName(_0x2180cc,_0x504ca8){const _0x2471ec=a79_0x95d9;try{const _0x48ed6b=await listDatabases(_0x2180cc);return _0x48ed6b['find'](_0x1aecd7=>_0x1aecd7[_0x2471ec(0x1cd)]===_0x504ca8)?.[_0x2471ec(0x1cc)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x435bdf,_0x2f31e0){const _0x163dc1=a80_0xd399,_0x1ebee9=_0x435bdf();while(!![]){try{const _0x59ce6d=-parseInt(_0x163dc1(0xc4))/0x1+-parseInt(_0x163dc1(0xc7))/0x2+parseInt(_0x163dc1(0xc8))/0x3+-parseInt(_0x163dc1(0xbb))/0x4+-parseInt(_0x163dc1(0xaa))/0x5*(parseInt(_0x163dc1(0xaf))/0x6)+-parseInt(_0x163dc1(0xb6))/0x7*(parseInt(_0x163dc1(0xbd))/0x8)+parseInt(_0x163dc1(0xb8))/0x9*(parseInt(_0x163dc1(0xac))/0xa);if(_0x59ce6d===_0x2f31e0)break;else _0x1ebee9['push'](_0x1ebee9['shift']());}catch(_0x2e21e0){_0x1ebee9['push'](_0x1ebee9['shift']());}}}(a80_0x2191,0x61079));import{createClient}from'@lovrabet/sdk';function a80_0x2191(){const _0x18bae2=['delete','map','accessKey','appCode','595jqVhpF','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','6571116AvjwWv','\x22.\x20','authMode','1522920WAcShW','string','9480bKXNqT','bff',']\x20must\x20be\x20an\x20object.','data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.','update','function','field','239442imrmxi',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.','validation','1476526qarRTZ','435921IGtSNR','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','invokeSource','models','data\x20aggregate\x20--params.aggregate[','getOne','object','column','aggregate','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27\x20or\x20\x27{\x22id\x22:[1,2,3],\x22name\x22:\x22new\x22}\x27','env','1197715PsVdmV','trim','30pTchEI','execute','isArray','12MZGLrX','dataset_','batchCreate'];a80_0x2191=function(){return _0x18bae2;};return a80_0x2191();}function a80_0xd399(_0x3bf024,_0xb2037d){_0x3bf024=_0x3bf024-0xa4;const _0x2191be=a80_0x2191();let _0xd39971=_0x2191be[_0x3bf024];return _0xd39971;}import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';import{installLosslessJsonResponseParser}from'../utils/lossless-json.js';let _client,restoreResponseJsonParser;export function initSdkClient(_0x4223f7){const _0x1254ba=a80_0xd399;restoreResponseJsonParser??=installLosslessJsonResponseParser();try{_client=createClient({'appCode':_0x4223f7[_0x1254ba(0xb5)],'env':_0x4223f7[_0x1254ba(0xa9)],'authMode':_0x4223f7[_0x1254ba(0xba)],..._0x4223f7[_0x1254ba(0xb4)]?{'accessKey':_0x4223f7[_0x1254ba(0xb4)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x1254ba(0xca)]}}});}catch(_0x59ab47){clearSdkClient();throw _0x59ab47;}}export function clearSdkClient(){_client=undefined,restoreResponseJsonParser?.(),restoreResponseJsonParser=undefined;}function ensureClient(){if(!_client)throw new Error('SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.');return _client;}function normalizeAggregateParams(_0x483689){const _0x293aea=a80_0xd399,_0x8be84a=_0x483689[_0x293aea(0xa7)];if(_0x8be84a===undefined)return _0x483689;if(!Array[_0x293aea(0xae)](_0x8be84a))throw CliErrors[_0x293aea(0xc6)](_0x293aea(0xc0));return{..._0x483689,'aggregate':_0x8be84a[_0x293aea(0xb3)]((_0x481686,_0x3a6cf1)=>{const _0x39d3ad=_0x293aea;if(!_0x481686||typeof _0x481686!==_0x39d3ad(0xa5)||Array[_0x39d3ad(0xae)](_0x481686))throw CliErrors[_0x39d3ad(0xc6)](_0x39d3ad(0xcc)+_0x3a6cf1+_0x39d3ad(0xbf));const _0x478599=_0x481686[_0x39d3ad(0xa6)]??_0x481686['field'];if(typeof _0x478599!==_0x39d3ad(0xbc)||_0x478599[_0x39d3ad(0xab)]()==='')throw CliErrors['validation']('data\x20aggregate\x20--params.aggregate['+_0x3a6cf1+_0x39d3ad(0xc5));const _0x4e776c={..._0x481686,'column':_0x478599};return delete _0x4e776c[_0x39d3ad(0xc3)],_0x4e776c;})};}export async function executeData(_0x4eb9ec,_0x4ebdbd,_0x2fe297){const _0xcc6fa0=a80_0xd399,_0x280492=ensureClient(),_0x5db9b4=_0xcc6fa0(0xb0)+_0x4eb9ec,_0xd3a944=_0x280492[_0xcc6fa0(0xcb)][_0x5db9b4];if(!_0xd3a944||typeof _0xd3a944[_0x4ebdbd]!==_0xcc6fa0(0xc2))throw new Error(_0xcc6fa0(0xc9)+_0x4ebdbd+_0xcc6fa0(0xb9)+_0xcc6fa0(0xb7));if(_0x4ebdbd==='batchCreate')return _0xd3a944[_0xcc6fa0(0xb1)](parseBatchCreateItemsFromParams(_0x2fe297));const _0x1e74d9=_0x2fe297!==undefined&&_0x2fe297!==null&&!Array[_0xcc6fa0(0xae)](_0x2fe297)?_0x2fe297:{};switch(_0x4ebdbd){case'getOne':{const _0x44ca33=_0x1e74d9['id'];if(_0x44ca33===undefined||_0x44ca33===null)throw new Error('getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0xd3a944[_0xcc6fa0(0xa4)](_0x44ca33);}case _0xcc6fa0(0xc1):{const {id:_0x2c2789,..._0x699753}=_0x1e74d9;if(_0x2c2789===undefined||_0x2c2789===null)throw new Error(_0xcc6fa0(0xa8));return _0xd3a944[_0xcc6fa0(0xc1)](_0x2c2789,_0x699753);}case'delete':{const _0x13698b=_0x1e74d9['id'];if(_0x13698b===undefined||_0x13698b===null)throw new Error('delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0xd3a944[_0xcc6fa0(0xb2)](_0x13698b);}case'aggregate':return _0xd3a944[_0xcc6fa0(0xa7)](normalizeAggregateParams(_0x1e74d9));default:return _0xd3a944[_0x4ebdbd](_0x1e74d9);}}export async function executeSdkSql(_0x460553,_0xb18524){const _0x55d772=a80_0xd399,_0x3d9e23=ensureClient();return _0x3d9e23['sql'][_0x55d772(0xad)]({'sqlCode':_0x460553,'params':_0xb18524});}export async function executeSdkBff(_0x121f89,_0x2750c9){const _0x4c0819=a80_0xd399,_0x91bed2=ensureClient();return _0x91bed2[_0x4c0819(0xbe)][_0x4c0819(0xad)]({'scriptName':_0x121f89,'params':_0x2750c9});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x22f2eb=a81_0x2cfc;function a81_0x2cfc(_0x2e33bb,_0x409de0){_0x2e33bb=_0x2e33bb-0xd8;const _0x4db5c0=a81_0x4db5();let _0x2cfca9=_0x4db5c0[_0x2e33bb];return _0x2cfca9;}(function(_0x2f94cd,_0x441e85){const _0x176a52=a81_0x2cfc,_0x4e3057=_0x2f94cd();while(!![]){try{const _0x62528=parseInt(_0x176a52(0xe5))/0x1*(-parseInt(_0x176a52(0xe0))/0x2)+parseInt(_0x176a52(0xde))/0x3*(-parseInt(_0x176a52(0xe1))/0x4)+parseInt(_0x176a52(0xda))/0x5+-parseInt(_0x176a52(0xd9))/0x6*(parseInt(_0x176a52(0xe7))/0x7)+parseInt(_0x176a52(0xe4))/0x8+-parseInt(_0x176a52(0xdf))/0x9+-parseInt(_0x176a52(0xd8))/0xa*(-parseInt(_0x176a52(0xe8))/0xb);if(_0x62528===_0x441e85)break;else _0x4e3057['push'](_0x4e3057['shift']());}catch(_0x3058be){_0x4e3057['push'](_0x4e3057['shift']());}}}(a81_0x4db5,0x19831));function a81_0x4db5(){const _0x25085d=['Configure\x20accessKey\x20in\x20','\x20or\x20run\x20`','918800VTdMTz','13439LHzJOX','\x20auth\x20login`.','4228CoYbxq','1903duCIQK','\x20file.','27730dGgoqW','1926wTAnRi','955905afOzTk','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','rate_limited','newConfigFileName','3RAZeTc','1779075bSdJTv','22htUlbY','567500vRhquD'];a81_0x4db5=function(){return _0x25085d;};return a81_0x4db5();}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a81_0x22f2eb(0xe2)+PRODUCT_CONFIG[a81_0x22f2eb(0xdd)]+a81_0x22f2eb(0xe3)+CLI_BIN_NAME+a81_0x22f2eb(0xe6),'configMissingHint':'Set\x20appcode\x20via\x20--appcode\x20or\x20'+PRODUCT_CONFIG['newConfigFileName']+'.','notInProjectHint':a81_0x22f2eb(0xdb)+PRODUCT_CONFIG[a81_0x22f2eb(0xdd)]+a81_0x22f2eb(0xe9)});export const CliErrors={...baseCliErrors,'rateLimited':(_0x2b40ee,_0x2ce378)=>new CliError(a81_0x22f2eb(0xdc),0x2,_0x2b40ee,_0x2ce378)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d8f25,_0x542be9){var _0x49fc86=a82_0x3501,_0x24c3d4=_0x2d8f25();while(!![]){try{var _0x26e8c0=-parseInt(_0x49fc86(0x84))/0x1+parseInt(_0x49fc86(0x7e))/0x2+parseInt(_0x49fc86(0x81))/0x3+parseInt(_0x49fc86(0x83))/0x4+parseInt(_0x49fc86(0x7c))/0x5*(parseInt(_0x49fc86(0x7f))/0x6)+parseInt(_0x49fc86(0x80))/0x7+parseInt(_0x49fc86(0x82))/0x8*(-parseInt(_0x49fc86(0x7d))/0x9);if(_0x26e8c0===_0x542be9)break;else _0x24c3d4['push'](_0x24c3d4['shift']());}catch(_0x9d712c){_0x24c3d4['push'](_0x24c3d4['shift']());}}}(a82_0x118f,0x8cbce));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';function a82_0x118f(){var _0xca79e0=['1044QVYlwQ','5223771iWhnGp','2909181NPHFhn','18002024vfyaoy','969368QxzzNP','426180EwmQCW','14975xgXfix','9TcjlAk','1546886YbdRkp'];a82_0x118f=function(){return _0xca79e0;};return a82_0x118f();}function a82_0x3501(_0x5fda61,_0x59772e){_0x5fda61=_0x5fda61-0x7c;var _0x118f4d=a82_0x118f();var _0x3501c=_0x118f4d[_0x5fda61];return _0x3501c;}import{buildAllFlags as a82_0xcd0181}from'@lovrabet/cli-framework';export function buildAllFlags(_0x37e18e){return a82_0xcd0181(_0x37e18e,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a83_0x15fa(_0x2df7c9,_0x181308){_0x2df7c9=_0x2df7c9-0xd5;const _0x5bcd60=a83_0x5bcd();let _0x15fa1f=_0x5bcd60[_0x2df7c9];return _0x15fa1f;}(function(_0x7ad81d,_0x481e2a){const _0xa069fb=a83_0x15fa,_0x25de15=_0x7ad81d();while(!![]){try{const _0x178472=parseInt(_0xa069fb(0xd6))/0x1*(-parseInt(_0xa069fb(0xdd))/0x2)+parseInt(_0xa069fb(0xe1))/0x3*(-parseInt(_0xa069fb(0xd5))/0x4)+-parseInt(_0xa069fb(0xdf))/0x5+-parseInt(_0xa069fb(0xde))/0x6*(parseInt(_0xa069fb(0xd7))/0x7)+parseInt(_0xa069fb(0xda))/0x8+parseInt(_0xa069fb(0xd9))/0x9*(-parseInt(_0xa069fb(0xe0))/0xa)+-parseInt(_0xa069fb(0xd8))/0xb*(-parseInt(_0xa069fb(0xdb))/0xc);if(_0x178472===_0x481e2a)break;else _0x25de15['push'](_0x25de15['shift']());}catch(_0x7d1869){_0x25de15['push'](_0x25de15['shift']());}}}(a83_0x5bcd,0x48da7));function a83_0x5bcd(){const _0x4a41ed=['1190rZuEXc','3AMBAuD','2049692sCygcr','163vkdPhH','521276gubvbF','320133gPVFiK','33012XUSSnT','1997496caQcjW','924RkoZsU','description','3062ieyPKn','42bnTxCI','2362335bgwVuY'];a83_0x5bcd=function(){return _0x4a41ed;};return a83_0x5bcd();}export function dryRun(_0x1aef00,_0x4019ac){const _0x2a00c8={'method':_0x1aef00,'url':_0x4019ac},_0x58bf15={'body'(_0x424ff8){return _0x2a00c8['body']=_0x424ff8,_0x58bf15;},'description'(_0x4bbb25){const _0x20a377=a83_0x15fa;return _0x2a00c8[_0x20a377(0xdc)]=_0x4bbb25,_0x58bf15;},'build'(){return{..._0x2a00c8};}};return _0x58bf15;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x5d3e97=a84_0x452b;(function(_0x517c01,_0x1eb37b){const _0x29836f=a84_0x452b,_0x4262c9=_0x517c01();while(!![]){try{const _0xba43c4=-parseInt(_0x29836f(0x11b))/0x1+parseInt(_0x29836f(0x116))/0x2+-parseInt(_0x29836f(0x117))/0x3+parseInt(_0x29836f(0x113))/0x4*(parseInt(_0x29836f(0x118))/0x5)+parseInt(_0x29836f(0x11d))/0x6*(-parseInt(_0x29836f(0x119))/0x7)+-parseInt(_0x29836f(0x11c))/0x8+parseInt(_0x29836f(0x11a))/0x9;if(_0xba43c4===_0x1eb37b)break;else _0x4262c9['push'](_0x4262c9['shift']());}catch(_0x24b114){_0x4262c9['push'](_0x4262c9['shift']());}}}(a84_0x5200,0x78e3e));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a84_0x452b(_0x2d0960,_0x15f081){_0x2d0960=_0x2d0960-0x113;const _0x520070=a84_0x5200();let _0x452b86=_0x520070[_0x2d0960];return _0x452b86;}const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a84_0x5d3e97(0x114)];function a84_0x5200(){const _0x31e779=['2511507YGZqUr','5AdTAUE','126UWvVUm','14526117Kosegn','585912hJejeJ','3576856fwNNFR','144492HgQDwz','1916324NPeRiQ','parseFlags','validateFlags','1411472haWKUY'];a84_0x5200=function(){return _0x31e779;};return a84_0x5200();}export const validateFlags=helpers[a84_0x5d3e97(0x115)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29f72d,_0x32cfd0){const _0x7916a4=a85_0x5d00,_0xcb38=_0x29f72d();while(!![]){try{const _0x32d1cc=parseInt(_0x7916a4(0xd6))/0x1+-parseInt(_0x7916a4(0xe2))/0x2+-parseInt(_0x7916a4(0xd8))/0x3*(parseInt(_0x7916a4(0xe6))/0x4)+-parseInt(_0x7916a4(0xdc))/0x5*(parseInt(_0x7916a4(0xdf))/0x6)+-parseInt(_0x7916a4(0xe4))/0x7*(parseInt(_0x7916a4(0xe9))/0x8)+parseInt(_0x7916a4(0xdd))/0x9+-parseInt(_0x7916a4(0xd4))/0xa*(-parseInt(_0x7916a4(0xe0))/0xb);if(_0x32d1cc===_0x32cfd0)break;else _0xcb38['push'](_0xcb38['shift']());}catch(_0x2de2d2){_0xcb38['push'](_0xcb38['shift']());}}}(a85_0x43bd,0xbda66));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{getDynamicServiceDefinitions,getDynamicServiceEntry,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a85_0x5d00(_0x23b973,_0x412206){_0x23b973=_0x23b973-0xd4;const _0x43bded=a85_0x43bd();let _0x5d00bf=_0x43bded[_0x23b973];return _0x5d00bf;}function a85_0x43bd(){const _0x45e1b3=['generateFullHelp','1503765CgGjRE','has','14409czrJEV','map','generateServiceHelp','\x20or\x20--appcode).','5218815ofOAAO','1367973kXGgKW','get','6PgnGkf','321882VpNfQa','filter','1945526cHqKAw','newConfigFileName','273nUatbc','generateCommandHelp','916qFLEDO','Requires\x20appcode\x20(set\x20via\x20','service','81256cJLKiO','900fOMass'];a85_0x43bd=function(){return _0x45e1b3;};return a85_0x43bd();}function createGenerators(){const _0x485d4e=a85_0x5d00;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(serviceRegistry,safeListDynamicServiceEntries()),'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x485d4e(0xe7)+PRODUCT_CONFIG[_0x485d4e(0xe3)]+_0x485d4e(0xdb)});}export function generateCommandHelp(_0x53a79b){const _0x933c42=a85_0x5d00;return createGenerators()[_0x933c42(0xe5)](_0x53a79b);}export function generateServiceHelp(_0x38c601){const _0x3af4e2=a85_0x5d00;return createGenerators()[_0x3af4e2(0xda)](_0x38c601);}export function generateFullHelp(){const _0x20b7b7=a85_0x5d00;return createGenerators()[_0x20b7b7(0xd5)]();}function getAnyServiceEntry(_0xd9daf){const _0x187e63=getServiceEntry(_0xd9daf);if(_0x187e63)return _0x187e63;try{return getDynamicServiceEntry(_0xd9daf);}catch{return undefined;}}function getAnyServiceDefinitions(_0x387acc){const _0x1b197e=a85_0x5d00,_0x2a8117=serviceGroups[_0x1b197e(0xde)](_0x387acc);if(_0x2a8117)return _0x2a8117;try{return getDynamicServiceDefinitions(_0x387acc);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x23799d=a85_0x5d00,_0xc9bc3c=new Set(serviceRegistry[_0x23799d(0xd9)](_0x2d73b3=>_0x2d73b3['service']));try{return listDynamicServiceEntries()[_0x23799d(0xe1)](_0x3510db=>!_0xc9bc3c[_0x23799d(0xd7)](_0x3510db[_0x23799d(0xe8)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a86_0x38eb(_0x250c9b,_0x1e4fe6){_0x250c9b=_0x250c9b-0x16f;var _0x325cc1=a86_0x325c();var _0x38eb72=_0x325cc1[_0x250c9b];return _0x38eb72;}(function(_0x3717e6,_0x7534ac){var _0x5dade5=a86_0x38eb,_0x1d2aad=_0x3717e6();while(!![]){try{var _0x59ef7f=parseInt(_0x5dade5(0x16f))/0x1*(-parseInt(_0x5dade5(0x173))/0x2)+parseInt(_0x5dade5(0x172))/0x3*(-parseInt(_0x5dade5(0x176))/0x4)+parseInt(_0x5dade5(0x17a))/0x5*(-parseInt(_0x5dade5(0x175))/0x6)+parseInt(_0x5dade5(0x171))/0x7+parseInt(_0x5dade5(0x179))/0x8*(parseInt(_0x5dade5(0x177))/0x9)+-parseInt(_0x5dade5(0x174))/0xa+-parseInt(_0x5dade5(0x170))/0xb*(-parseInt(_0x5dade5(0x178))/0xc);if(_0x59ef7f===_0x7534ac)break;else _0x1d2aad['push'](_0x1d2aad['shift']());}catch(_0x94d4b6){_0x1d2aad['push'](_0x1d2aad['shift']());}}}(a86_0x325c,0xcbb6b));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 a86_0x325c(){var _0x49fd95=['6590658itrnXh','2556724AgnnJj','27180abaFJT','11400xRgiVD','1240bGWutE','5hjKwGS','287081xkwJdr','47223pxfQDY','3570021AqkSri','6KwQzUc','10NKREEZ','4098320jxjUbH'];a86_0x325c=function(){return _0x49fd95;};return a86_0x325c();}export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x595ac4,_0x50debe){const _0x1480c0=a87_0x4326,_0x3a9ed4=_0x595ac4();while(!![]){try{const _0x3818c8=parseInt(_0x1480c0(0x171))/0x1+parseInt(_0x1480c0(0x16a))/0x2*(-parseInt(_0x1480c0(0x16e))/0x3)+-parseInt(_0x1480c0(0x169))/0x4+parseInt(_0x1480c0(0x168))/0x5*(-parseInt(_0x1480c0(0x166))/0x6)+parseInt(_0x1480c0(0x16b))/0x7*(parseInt(_0x1480c0(0x16f))/0x8)+parseInt(_0x1480c0(0x164))/0x9*(-parseInt(_0x1480c0(0x16c))/0xa)+-parseInt(_0x1480c0(0x162))/0xb*(-parseInt(_0x1480c0(0x160))/0xc);if(_0x3818c8===_0x50debe)break;else _0x3a9ed4['push'](_0x3a9ed4['shift']());}catch(_0x4915bb){_0x3a9ed4['push'](_0x3a9ed4['shift']());}}}(a87_0x3d04,0x4a911));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a87_0x3d04(){const _0x433c30=['message','581317novnJh','pretty','12hlbGca','_notice','8184506TrzuGg','format','9JWAALc','update','90888AYzuXF','url','160hACKfb','155164ZtnOaV','15002ZDQRoE','273ZYmQDG','5066290VCVEbj','error','189iCGJPQ','99032mszdNt'];a87_0x3d04=function(){return _0x433c30;};return a87_0x3d04();}function a87_0x4326(_0x390122,_0x567cd7){_0x390122=_0x390122-0x15f;const _0x3d04f7=a87_0x3d04();let _0x432638=_0x3d04f7[_0x390122];return _0x432638;}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x5aaadf,_0x59bd0a){const _0x5a11b6=a87_0x4326,_0x11b39c=_0x5aaadf[_0x5a11b6(0x161)],{_notice:_0x3bc0d4,..._0x2f2a6c}=_0x5aaadf;void _0x3bc0d4,baseFormatOutput(_0x2f2a6c,_0x59bd0a),_0x59bd0a[_0x5a11b6(0x163)]===_0x5a11b6(0x15f)&&printPrettyNotice(_0x11b39c);}function printPrettyNotice(_0x32a47e){const _0xfef768=a87_0x4326;if(!_0x32a47e?.[_0xfef768(0x165)])return;console[_0xfef768(0x16d)](_0x32a47e[_0xfef768(0x165)][_0xfef768(0x170)]+'\x20('+_0x32a47e[_0xfef768(0x165)][_0xfef768(0x167)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1708a2,_0x24eaf3){const _0x61bc19=a88_0x5795,_0x318e55=_0x1708a2();while(!![]){try{const _0xd80f8b=-parseInt(_0x61bc19(0x1f5))/0x1*(-parseInt(_0x61bc19(0x1f9))/0x2)+-parseInt(_0x61bc19(0x1fb))/0x3*(parseInt(_0x61bc19(0x1ff))/0x4)+-parseInt(_0x61bc19(0x213))/0x5+-parseInt(_0x61bc19(0x1f8))/0x6+-parseInt(_0x61bc19(0x1fa))/0x7*(-parseInt(_0x61bc19(0x1f6))/0x8)+-parseInt(_0x61bc19(0x20b))/0x9*(parseInt(_0x61bc19(0x205))/0xa)+parseInt(_0x61bc19(0x215))/0xb*(parseInt(_0x61bc19(0x1ee))/0xc);if(_0xd80f8b===_0x24eaf3)break;else _0x318e55['push'](_0x318e55['shift']());}catch(_0x469bef){_0x318e55['push'](_0x318e55['shift']());}}}(a88_0xa0e6,0x2ec5f));export function toKebab(_0x4daed9){const _0x308d98=a88_0x5795;return _0x4daed9[_0x308d98(0x1f1)](/_/g,'-')[_0x308d98(0x1f1)](/-([A-Z]+)/g,(_0x55997d,_0x58a1ac)=>'-'+_0x58a1ac[_0x308d98(0x204)]())[_0x308d98(0x1f1)](/([a-z0-9])([A-Z])/g,(_0x583d8a,_0x381170,_0xbd6e49)=>_0x381170+'-'+_0xbd6e49)[_0x308d98(0x204)]();}function a88_0xa0e6(){const _0x150362=['dry-run','add','get','nonInteractive','sticky','alias','1392650NRujkZ','non-interactive','964887aabAKm','indexOf','slice','84rtOrMT','appcode','format','replace','app','dryRun','push','1YNyRna','16BHfLWq','corrected','1617726VWbsxN','274878qMNwfN','924077IkyMDd','3NdrEIH','boolean','number','env','682008amfDqa','yes','type','entries','set','toLowerCase','830WNfrBA','version','original','has','length','global','11412hcZSjh','name'];a88_0xa0e6=function(){return _0x150362;};return a88_0xa0e6();}function buildKnownFlags(_0x41b229){const _0x49d5a5=a88_0x5795,_0x3b9811=new Set();for(const _0x1f017b of _0x41b229){_0x3b9811[_0x49d5a5(0x20e)](_0x1f017b[_0x49d5a5(0x20c)]),_0x3b9811[_0x49d5a5(0x20e)](toCamelCase(_0x1f017b[_0x49d5a5(0x20c)]));}for(const _0x16e71b of[_0x49d5a5(0x20d),_0x49d5a5(0x1f3),_0x49d5a5(0x200),_0x49d5a5(0x1f0)]){_0x3b9811[_0x49d5a5(0x20e)](_0x16e71b);}for(const _0x413fe6 of['help',_0x49d5a5(0x1fe),_0x49d5a5(0x1ef),_0x49d5a5(0x1f2),_0x49d5a5(0x210),_0x49d5a5(0x214),'ci',_0x49d5a5(0x20a),_0x49d5a5(0x206)]){_0x3b9811[_0x49d5a5(0x20e)](_0x413fe6);}return _0x3b9811;}function buildFlagTypeMap(_0x32e4b1){const _0x482363=a88_0x5795,_0x5ce934=new Map();for(const _0x3ca886 of _0x32e4b1){_0x5ce934[_0x482363(0x203)](_0x3ca886['name'],_0x3ca886[_0x482363(0x201)]),_0x5ce934['set'](toCamelCase(_0x3ca886[_0x482363(0x20c)]),_0x3ca886[_0x482363(0x201)]);}return _0x5ce934;}function toCamelCase(_0x4dfac7){const _0x4d8c58=a88_0x5795;return _0x4dfac7[_0x4d8c58(0x1f1)](/-([a-z])/g,(_0xa0ddc,_0x56a0dd)=>_0x56a0dd['toUpperCase']());}function a88_0x5795(_0x342337,_0x374750){_0x342337=_0x342337-0x1ec;const _0xa0e6e7=a88_0xa0e6();let _0x5795c5=_0xa0e6e7[_0x342337];return _0x5795c5;}function aliasHandler(_0x4d03ce,_0x4c2899){const _0xccd3a8=a88_0x5795,_0xbae036=[];for(const _0x1a86b3 of Object['keys'](_0x4d03ce)){if(_0x4c2899[_0xccd3a8(0x208)](_0x1a86b3))continue;const _0x14d7aa=toKebab(_0x1a86b3);_0x14d7aa!==_0x1a86b3&&_0x4c2899['has'](_0x14d7aa)&&_0xbae036[_0xccd3a8(0x1f4)]({'original':_0x1a86b3,'corrected':_0x14d7aa,'handler':_0xccd3a8(0x212)});}return _0xbae036;}function stickyHandler(_0x22e925,_0x54cc44,_0xf6af34){const _0x267e27=a88_0x5795,_0x5d96e9=[];for(const [_0x1a99f3,_0x3572af]of Object[_0x267e27(0x202)](_0x22e925)){if(_0x3572af!==!![])continue;for(let _0x4059f5=_0x1a99f3['length']-0x1;_0x4059f5>0x0;_0x4059f5--){const _0x2912b0=_0x1a99f3[_0x267e27(0x1ed)](0x0,_0x4059f5),_0x455772=_0x1a99f3['slice'](_0x4059f5),_0x1c92d8=toKebab(_0x2912b0),_0x1520fb=toCamelCase(_0x2912b0),_0x11a686=_0x54cc44[_0x267e27(0x208)](_0x2912b0)?_0x2912b0:_0x54cc44[_0x267e27(0x208)](_0x1c92d8)?_0x1c92d8:_0x54cc44['has'](_0x1520fb)?_0x1520fb:null;if(!_0x11a686)continue;const _0x259964=_0xf6af34[_0x267e27(0x20f)](_0x11a686)??'string';let _0x20f5a2;if(_0x259964===_0x267e27(0x1fd)){const _0x92f974=Number(_0x455772);if(isNaN(_0x92f974)||_0x455772==='')continue;_0x20f5a2=_0x92f974;}else{if(_0x259964===_0x267e27(0x1fc))continue;else{if(_0x455772==='')continue;_0x20f5a2=_0x455772;}}_0x5d96e9[_0x267e27(0x1f4)]({'original':_0x1a99f3,'corrected':_0x11a686+'='+_0x20f5a2,'handler':_0x267e27(0x211)});break;}}return _0x5d96e9;}export function correctFlags(_0x1056c1,_0x4c5eb6){const _0x4dabd2=a88_0x5795,_0x540393=buildKnownFlags(_0x4c5eb6),_0x1688e8=buildFlagTypeMap(_0x4c5eb6),_0x32d5f9=aliasHandler(_0x1056c1,_0x540393),_0x3bff7c=stickyHandler(_0x1056c1,_0x540393,_0x1688e8),_0x484c94=[..._0x32d5f9,..._0x3bff7c];if(_0x484c94[_0x4dabd2(0x209)]===0x0)return{'flags':_0x1056c1,'corrections':[]};const _0x94ced8={..._0x1056c1},_0x3b5f76=new Set();for(const _0x90eaf4 of _0x32d5f9){_0x94ced8[_0x90eaf4[_0x4dabd2(0x1f7)]]=_0x1056c1[_0x90eaf4[_0x4dabd2(0x207)]],_0x3b5f76[_0x4dabd2(0x20e)](_0x90eaf4[_0x4dabd2(0x207)]);}for(const _0x19dc53 of _0x3bff7c){const _0x2ea2dc=_0x19dc53[_0x4dabd2(0x1f7)][_0x4dabd2(0x1ec)]('='),_0x350320=_0x19dc53[_0x4dabd2(0x1f7)]['slice'](0x0,_0x2ea2dc),_0x5e3fca=_0x19dc53[_0x4dabd2(0x1f7)][_0x4dabd2(0x1ed)](_0x2ea2dc+0x1),_0x1e184a=_0x1688e8[_0x4dabd2(0x20f)](_0x350320)??'string';_0x1e184a==='number'?_0x94ced8[_0x350320]=Number(_0x5e3fca):_0x94ced8[_0x350320]=_0x5e3fca,_0x3b5f76[_0x4dabd2(0x20e)](_0x19dc53[_0x4dabd2(0x207)]);}for(const _0x58facc of _0x3b5f76){delete _0x94ced8[_0x58facc];}return{'flags':_0x94ced8,'corrections':_0x484c94};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a89_0x1719(_0x2e1058,_0x7f0507){_0x2e1058=_0x2e1058-0x78;const _0x4b817a=a89_0x4b81();let _0x1719f2=_0x4b817a[_0x2e1058];return _0x1719f2;}const a89_0x3326bd=a89_0x1719;function a89_0x4b81(){const _0x50ae72=['number','21UoTXEr','\x20seconds\x20before\x20retrying.','get','526796ngToyn','function','11344869kJGsWf','message','452484NRPmDR','724OzkROi','retryAfterSeconds','test','status','\x20Retry\x20only\x20the\x20failed\x20item;\x20keep\x20requests\x20serial\x20and\x20preserve\x20completed\x20checkpoints.','7884024ndQrky','14754WecfrG','call','378156jBDBBk','isInteger','errorCode','retryAfter','has','Retry\x20after\x20a\x20short\x20delay.','Retry-After','IP_RATE_LIMIT_EXCEEDED','EXCEED_MAX_QPS_LIMIT','retry-after','string','toUpperCase','5197185aNttPD','Retry\x20after\x20','object','Wait\x20'];a89_0x4b81=function(){return _0x50ae72;};return a89_0x4b81();}(function(_0x2dbc54,_0x553b75){const _0xaa4b89=a89_0x1719,_0x26de69=_0x2dbc54();while(!![]){try{const _0x2f0d66=-parseInt(_0xaa4b89(0x91))/0x1+parseInt(_0xaa4b89(0x84))/0x2+parseInt(_0xaa4b89(0x8f))/0x3*(-parseInt(_0xaa4b89(0x89))/0x4)+parseInt(_0xaa4b89(0x7c))/0x5+-parseInt(_0xaa4b89(0x88))/0x6*(-parseInt(_0xaa4b89(0x81))/0x7)+-parseInt(_0xaa4b89(0x8e))/0x8+parseInt(_0xaa4b89(0x86))/0x9;if(_0x2f0d66===_0x553b75)break;else _0x26de69['push'](_0x26de69['shift']());}catch(_0x26fb4a){_0x26de69['push'](_0x26de69['shift']());}}}(a89_0x4b81,0x82cf9));import{CliErrors}from'../errors.js';const RATE_LIMIT_ERROR_CODES=new Set([a89_0x3326bd(0x78),'MAX_QPS_LIMIT',a89_0x3326bd(0x98)]);function nonEmptyString(_0x3829c4){const _0x4e7270=a89_0x3326bd;if(typeof _0x3829c4!==_0x4e7270(0x7a))return undefined;const _0xdf4b9a=_0x3829c4['trim']();return _0xdf4b9a||undefined;}function buildRetryHint(_0x175e1b){const _0x325e1a=a89_0x3326bd,_0x2644bc=nonEmptyString(_0x175e1b),_0x2e5584=_0x2644bc?/^\d+$/['test'](_0x2644bc)?_0x325e1a(0x7f)+_0x2644bc+_0x325e1a(0x82):_0x325e1a(0x7d)+_0x2644bc+'.':_0x325e1a(0x96);return _0x2e5584+_0x325e1a(0x8d);}export function createRateLimitError(_0x456988){const _0x223d44=a89_0x3326bd,_0x3628f4=nonEmptyString(_0x456988[_0x223d44(0x93)])?.[_0x223d44(0x7b)](),_0x391f3c=Number(_0x456988[_0x223d44(0x8c)])===0x1ad||_0x3628f4!==undefined&&RATE_LIMIT_ERROR_CODES[_0x223d44(0x95)](_0x3628f4);if(!_0x391f3c)return undefined;return CliErrors['rateLimited'](nonEmptyString(_0x456988[_0x223d44(0x87)])??'Request\x20rate\x20limit\x20exceeded.',buildRetryHint(_0x456988[_0x223d44(0x94)]));}export function readRetryAfter(_0x1e2b72){const _0x547230=a89_0x3326bd;if(!_0x1e2b72||typeof _0x1e2b72!=='object')return undefined;const _0x1cc002=_0x1e2b72[_0x547230(0x83)];if(typeof _0x1cc002===_0x547230(0x85)){const _0x43ca53=_0x1cc002[_0x547230(0x90)](_0x1e2b72,_0x547230(0x97))??_0x1cc002[_0x547230(0x90)](_0x1e2b72,_0x547230(0x79));return nonEmptyString(_0x43ca53);}for(const [_0x27f25f,_0x585f6b]of Object['entries'](_0x1e2b72)){if(_0x27f25f['toLowerCase']()===_0x547230(0x79))return nonEmptyString(_0x585f6b)??(typeof _0x585f6b==='number'?String(_0x585f6b):undefined);}return undefined;}export function readRetryAfterSeconds(_0x22c690){const _0x3c7e65=a89_0x3326bd;if(!_0x22c690||typeof _0x22c690!==_0x3c7e65(0x7e)||Array['isArray'](_0x22c690))return undefined;const _0xc522ab=_0x22c690[_0x3c7e65(0x8a)];if(typeof _0xc522ab===_0x3c7e65(0x80))return Number[_0x3c7e65(0x92)](_0xc522ab)&&_0xc522ab>=0x0?String(_0xc522ab):undefined;const _0x25ed43=nonEmptyString(_0xc522ab);return _0x25ed43&&/^\d+$/[_0x3c7e65(0x8b)](_0x25ed43)?_0x25ed43:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a90_0x5d9adb=a90_0x1b78;function a90_0x1104(){const _0x1d525e=['552AmLhWS','\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20','version','validation','1055HiNIpR','active','stringify','orderby','no-','where','\x20is\x20not\x20a\x20CLI\x20flag\x20for\x20`','add','meowKey','order-by','select','83825eJDDWW','entries','Unknown\x20flag\x20--','4271022hhPDUK','Run\x20`','3106660jMudGS','data','page-size','currentpage','has','command','\x20data\x20filter`.','126370aehgkT','3sqrlFk','filter','service','62NJxSwM','42555095cfmETw','1251nrFKDr','3608824oEKEwb','Example:\x20'];a90_0x1104=function(){return _0x1d525e;};return a90_0x1104();}(function(_0x1630e1,_0x272cfb){const _0x1a1e1d=a90_0x1b78,_0x41faa6=_0x1630e1();while(!![]){try{const _0x4ecd85=parseInt(_0x1a1e1d(0x86))/0x1*(parseInt(_0x1a1e1d(0x7d))/0x2)+parseInt(_0x1a1e1d(0x7a))/0x3*(parseInt(_0x1a1e1d(0x80))/0x4)+-parseInt(_0x1a1e1d(0x72))/0x5+-parseInt(_0x1a1e1d(0x94))/0x6+-parseInt(_0x1a1e1d(0x91))/0x7*(parseInt(_0x1a1e1d(0x82))/0x8)+parseInt(_0x1a1e1d(0x7f))/0x9*(-parseInt(_0x1a1e1d(0x79))/0xa)+parseInt(_0x1a1e1d(0x7e))/0xb;if(_0x4ecd85===_0x272cfb)break;else _0x41faa6['push'](_0x41faa6['shift']());}catch(_0x3f86c2){_0x41faa6['push'](_0x41faa6['shift']());}}}(a90_0x1104,0xd8b11));import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{toKebab}from'../framework/preparse.js';const FILTER_BODY_FIELDS=new Set([a90_0x5d9adb(0x8b),a90_0x5d9adb(0x90),a90_0x5d9adb(0x8f),a90_0x5d9adb(0x89),'current-page',a90_0x5d9adb(0x75),'page',a90_0x5d9adb(0x74),'pagesize']);function a90_0x1b78(_0x1f63db,_0x205e93){_0x1f63db=_0x1f63db-0x72;const _0x110457=a90_0x1104();let _0x1b7801=_0x110457[_0x1f63db];return _0x1b7801;}export function assertKnownCommandFlags(_0x639906,_0x2742e5){const _0x56bb59=a90_0x5d9adb,_0x3fd849=new Set([_0x56bb59(0x84)]);for(const _0x34ed92 of GLOBAL_FLAGS){_0x3fd849['add'](_0x34ed92['name']),_0x3fd849[_0x56bb59(0x8d)](toKebab(_0x34ed92[_0x56bb59(0x8e)]));}for(const _0x3b4465 of _0x639906['flags']??[]){_0x3fd849[_0x56bb59(0x8d)](_0x3b4465['name']);}for(const [_0x18f15b,_0x22c670]of Object[_0x56bb59(0x92)](_0x2742e5)){const _0x486f08=toKebab(_0x18f15b);if(_0x3fd849[_0x56bb59(0x76)](_0x486f08))continue;if(_0x22c670===![]&&_0x3fd849[_0x56bb59(0x76)](_0x56bb59(0x8a)+_0x486f08))continue;if(_0x639906[_0x56bb59(0x7c)]===_0x56bb59(0x73)&&_0x639906[_0x56bb59(0x77)]===_0x56bb59(0x7b)&&FILTER_BODY_FIELDS[_0x56bb59(0x76)](_0x486f08))throw CliErrors['validation']('--'+_0x486f08+_0x56bb59(0x8c)+CLI_BIN_NAME+_0x56bb59(0x78),'Put\x20where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20inside\x20one\x20--params\x20JSON\x20object.\x20'+(_0x56bb59(0x81)+CLI_BIN_NAME+_0x56bb59(0x83))+('\x27'+JSON[_0x56bb59(0x88)]({'where':{'status':{'$eq':_0x56bb59(0x87)}},'orderBy':[{'id':'asc'}],'currentPage':0x1,'pageSize':0x14})+'\x27'));throw CliErrors[_0x56bb59(0x85)](_0x56bb59(0x93)+_0x486f08+'\x20for\x20`'+CLI_BIN_NAME+'\x20'+_0x639906['service']+'\x20'+_0x639906['command']+'`.',_0x56bb59(0x95)+CLI_BIN_NAME+'\x20'+_0x639906[_0x56bb59(0x7c)]+'\x20'+_0x639906[_0x56bb59(0x77)]+'\x20--help`\x20to\x20see\x20accepted\x20flags.');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a91_0x422f(){var _0x3c8ab6=['2548377mpCUCs','13384tOJYyo','648100DBZmDM','272660KixfOp','1418466RDdJKr','2395100oEzOAU','25OXbNFC','8XvUQLX','3Wndhwk','779989LMaKho'];a91_0x422f=function(){return _0x3c8ab6;};return a91_0x422f();}function a91_0x46fe(_0xa8c70,_0x37fd6d){_0xa8c70=_0xa8c70-0xc9;var _0x422f05=a91_0x422f();var _0x46fea2=_0x422f05[_0xa8c70];return _0x46fea2;}(function(_0x2dd725,_0x104842){var _0x5adebb=a91_0x46fe,_0x393ffb=_0x2dd725();while(!![]){try{var _0x24e8e5=parseInt(_0x5adebb(0xcd))/0x1+-parseInt(_0x5adebb(0xce))/0x2*(parseInt(_0x5adebb(0xca))/0x3)+-parseInt(_0x5adebb(0xcf))/0x4*(-parseInt(_0x5adebb(0xd2))/0x5)+-parseInt(_0x5adebb(0xd0))/0x6+parseInt(_0x5adebb(0xcb))/0x7*(-parseInt(_0x5adebb(0xc9))/0x8)+parseInt(_0x5adebb(0xcc))/0x9+parseInt(_0x5adebb(0xd1))/0xa;if(_0x24e8e5===_0x104842)break;else _0x393ffb['push'](_0x393ffb['shift']());}catch(_0x2eb44d){_0x393ffb['push'](_0x393ffb['shift']());}}}(a91_0x422f,0x320b8));export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a92_0x1d3e(_0x232a38,_0x3e7cbd){_0x232a38=_0x232a38-0x10c;const _0x302aa5=a92_0x302a();let _0x1d3e4c=_0x302aa5[_0x232a38];return _0x1d3e4c;}(function(_0x5291b,_0x2201ad){const _0x242a67=a92_0x1d3e,_0x29e8dc=_0x5291b();while(!![]){try{const _0x452d00=-parseInt(_0x242a67(0x11b))/0x1*(parseInt(_0x242a67(0x119))/0x2)+-parseInt(_0x242a67(0x127))/0x3+parseInt(_0x242a67(0x118))/0x4*(-parseInt(_0x242a67(0x123))/0x5)+-parseInt(_0x242a67(0x12c))/0x6*(-parseInt(_0x242a67(0x120))/0x7)+-parseInt(_0x242a67(0x111))/0x8*(-parseInt(_0x242a67(0x113))/0x9)+-parseInt(_0x242a67(0x11c))/0xa+parseInt(_0x242a67(0x126))/0xb;if(_0x452d00===_0x2201ad)break;else _0x29e8dc['push'](_0x29e8dc['shift']());}catch(_0x124c61){_0x29e8dc['push'](_0x29e8dc['shift']());}}}(a92_0x302a,0xa79b8));function a92_0x302a(){const _0x123242=['2092839oAWOdY','join','id=','entries','title=','6FKvesp','affectedRecords','command','kind=','cron','cron=','scheduled-at=','\x20\x20\x20','⚠\x20\x20High-risk\x20operation:\x20','\x20\x20\x20Continue?\x20[y/N]\x20','8YzoHQy','scheduled-at','2377161WYaHFT','schedule-id','\x20\x20\x20Affected:\x20','push','description','2068Bpuzfq','27848Nsiiiy','code','3jLHUmx','6418450UGbsog','kind','name','params','3859541vTLgmk','channel=','channel','5795iqyqeD','title','params=','20366071KjMrPP'];a92_0x302a=function(){return _0x123242;};return a92_0x302a();}import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x4123f3,_0x4e0a13,_0x17eb40){const _0x42be7e=a92_0x1d3e,_0x41fbc5=buildConfirmationContext(_0x4123f3,_0x4e0a13,_0x17eb40),_0x2ff9d8=[_0x42be7e(0x10f)+_0x41fbc5['commandLabel']];return _0x41fbc5['description']&&_0x2ff9d8[_0x42be7e(0x116)](_0x42be7e(0x10e)+_0x41fbc5[_0x42be7e(0x117)]),_0x41fbc5['affectedRecords']&&_0x2ff9d8[_0x42be7e(0x116)](_0x42be7e(0x115)+_0x41fbc5[_0x42be7e(0x12d)]),_0x2ff9d8[_0x42be7e(0x116)](_0x42be7e(0x110)),_0x2ff9d8;}export function reconstructCommandArgv(_0x2f40e4,_0x5b7f57){const _0x22e1ee=a92_0x1d3e,_0xa20849=[CLI_BIN_NAME,_0x2f40e4['service'],_0x2f40e4[_0x22e1ee(0x12e)]];for(const [_0x39dd61,_0x4750d8]of Object[_0x22e1ee(0x12a)](_0x5b7f57)){if(_0x4750d8===!![])_0xa20849[_0x22e1ee(0x116)]('--'+_0x39dd61);else _0x4750d8!==![]&&_0x4750d8!==undefined&&_0x4750d8!==''&&_0xa20849[_0x22e1ee(0x116)]('--'+_0x39dd61+'\x20'+JSON['stringify'](_0x4750d8));}return _0xa20849[_0x22e1ee(0x116)]('--yes'),_0xa20849['join']('\x20');}function buildConfirmationContext(_0x4cec95,_0x4ed4ab,_0x1adb18){const _0x1d5d10=a92_0x1d3e,_0x341b86=extractAffectedRecords(_0x1adb18);return{'commandLabel':_0x4ed4ab,'description':_0x4cec95[_0x1d5d10(0x117)],'affectedRecords':_0x341b86};}function extractAffectedRecords(_0x4d63da){const _0x1d11c6=a92_0x1d3e,_0x414efb=[];if(_0x4d63da['code'])_0x414efb[_0x1d11c6(0x116)]('code='+_0x4d63da[_0x1d11c6(0x11a)]);if(_0x4d63da['id'])_0x414efb[_0x1d11c6(0x116)](_0x1d11c6(0x129)+_0x4d63da['id']);if(_0x4d63da[_0x1d11c6(0x114)])_0x414efb[_0x1d11c6(0x116)]('schedule-id='+_0x4d63da[_0x1d11c6(0x114)]);if(_0x4d63da['name'])_0x414efb['push']('name='+_0x4d63da[_0x1d11c6(0x11e)]);if(_0x4d63da[_0x1d11c6(0x124)])_0x414efb[_0x1d11c6(0x116)](_0x1d11c6(0x12b)+_0x4d63da['title']);if(_0x4d63da[_0x1d11c6(0x11d)])_0x414efb[_0x1d11c6(0x116)](_0x1d11c6(0x12f)+_0x4d63da[_0x1d11c6(0x11d)]);if(_0x4d63da['cron'])_0x414efb[_0x1d11c6(0x116)](_0x1d11c6(0x10c)+_0x4d63da[_0x1d11c6(0x130)]);if(_0x4d63da[_0x1d11c6(0x112)])_0x414efb[_0x1d11c6(0x116)](_0x1d11c6(0x10d)+_0x4d63da['scheduled-at']);if(_0x4d63da[_0x1d11c6(0x122)])_0x414efb[_0x1d11c6(0x116)](_0x1d11c6(0x121)+_0x4d63da[_0x1d11c6(0x122)]);if(_0x4d63da[_0x1d11c6(0x11f)])_0x414efb[_0x1d11c6(0x116)](_0x1d11c6(0x125)+_0x4d63da[_0x1d11c6(0x11f)]);return _0x414efb['length']>0x0?_0x414efb[_0x1d11c6(0x128)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x384fbc,_0xe60cd5){const _0xc057e1=a93_0x2de4,_0x4ed248=_0x384fbc();while(!![]){try{const _0x2d1332=parseInt(_0xc057e1(0x163))/0x1*(parseInt(_0xc057e1(0x171))/0x2)+parseInt(_0xc057e1(0x16b))/0x3+-parseInt(_0xc057e1(0x166))/0x4+parseInt(_0xc057e1(0x16f))/0x5+parseInt(_0xc057e1(0x170))/0x6+parseInt(_0xc057e1(0x169))/0x7+-parseInt(_0xc057e1(0x16e))/0x8;if(_0x2d1332===_0xe60cd5)break;else _0x4ed248['push'](_0x4ed248['shift']());}catch(_0x47b454){_0x4ed248['push'](_0x4ed248['shift']());}}}(a93_0x27c4,0x191f1));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';export function mapUserFacingExecuteError(_0xc13dc){const _0x72c092=a93_0x2de4;if(_0xc13dc instanceof LovrabetError){const _0x546a50=userFacingLovrabetMessage(_0xc13dc),_0x521b88=_0xc13dc,_0x30b488=createRateLimitError({'status':_0x521b88[_0x72c092(0x165)],'errorCode':_0x521b88['code'],'message':_0x546a50,'retryAfter':readRetryAfter(_0x521b88[_0x72c092(0x168)]?.[_0x72c092(0x167)])??readRetryAfterSeconds(_0x521b88[_0x72c092(0x168)])});return _0x30b488??CliErrors[_0x72c092(0x16c)](_0x546a50);}return _0xc13dc;}function userFacingLovrabetMessage(_0x3b7bbf){const _0xc4dbc8=a93_0x2de4,_0x862827=_0x3b7bbf[_0xc4dbc8(0x164)];if(_0x862827!==undefined&&_0x862827!==null){if(typeof _0x862827===_0xc4dbc8(0x16d)&&_0x862827[_0xc4dbc8(0x16a)]())return _0x862827[_0xc4dbc8(0x16a)]();try{return JSON[_0xc4dbc8(0x162)](_0x862827);}catch{}}return _0x3b7bbf['message'];}function a93_0x2de4(_0x640415,_0x82764){_0x640415=_0x640415-0x162;const _0x27c459=a93_0x27c4();let _0x2de473=_0x27c459[_0x640415];return _0x2de473;}function a93_0x27c4(){const _0x2eeff0=['response','123599vrzwAv','trim','356145ZJMwMu','validation','string','3255304SrDVZS','516380hPVawN','795474oCnRcv','285542SbSYkt','stringify','1kpMSDs','description','status','20752ndijRm','headers'];a93_0x27c4=function(){return _0x2eeff0;};return a93_0x27c4();}
|