@lovrabet/lovrabet-cli 2.1.7 → 2.1.8-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -0
- 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 -0
- 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 -0
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -0
- package/lib/commands/skill/push-flow-helpers.js +1 -0
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x452d8c,_0x506995){const _0x5accf5=a69_0x1967,_0x4e9c0e=_0x452d8c();while(!![]){try{const _0x5bed0d=-parseInt(_0x5accf5(0x250))/0x1*(parseInt(_0x5accf5(0x1fd))/0x2)+-parseInt(_0x5accf5(0x223))/0x3*(-parseInt(_0x5accf5(0x238))/0x4)+-parseInt(_0x5accf5(0x233))/0x5*(-parseInt(_0x5accf5(0x205))/0x6)+parseInt(_0x5accf5(0x270))/0x7+parseInt(_0x5accf5(0x26a))/0x8*(parseInt(_0x5accf5(0x225))/0x9)+parseInt(_0x5accf5(0x1f6))/0xa+parseInt(_0x5accf5(0x269))/0xb*(-parseInt(_0x5accf5(0x1ed))/0xc);if(_0x5bed0d===_0x506995)break;else _0x4e9c0e['push'](_0x4e9c0e['shift']());}catch(_0x22ef2e){_0x4e9c0e['push'](_0x4e9c0e['shift']());}}}(a69_0x28eb,0xbf06a));import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x43a3c7){_activeAK=_0x43a3c7||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x2f6a4a,_0xb1cce0={}){const _0x5b44c7=a69_0x1967,{method:method=_0x5b44c7(0x213),body:_0x5d70c3,headers:headers={},timeout:timeout=0x7530}=_0xb1cce0,_0x29479d=_activeAK,_0x1cbb18=getRuntimeDomain();if(!_0x29479d)throw CliErrors['authRequired'](_0x5b44c7(0x1fc)+PRODUCT_CONFIG[_0x5b44c7(0x251)]+'.');const _0x120480=''+_0x1cbb18+_0x2f6a4a,_0x5107f8={'X-User-AK':_0x29479d},_0x4c1f60=new AbortController(),_0x227f08=setTimeout(()=>_0x4c1f60[_0x5b44c7(0x230)](),timeout);try{const _0x42db02=await fetch(_0x120480,{'method':method,'headers':{'Content-Type':_0x5b44c7(0x20c),'X-Invoke-Source':PRODUCT_CONFIG[_0x5b44c7(0x207)],..._0x5107f8,...headers},'body':_0x5d70c3?JSON[_0x5b44c7(0x235)](_0x5d70c3):undefined,'signal':_0x4c1f60[_0x5b44c7(0x215)]});let _0x17762e;try{_0x17762e=await _0x42db02[_0x5b44c7(0x244)]();}catch{throw CliErrors[_0x5b44c7(0x273)](_0x5b44c7(0x220)+_0x42db02[_0x5b44c7(0x22d)]+')',_0x42db02[_0x5b44c7(0x22d)]>=0x190?_0x5b44c7(0x21b):undefined);}if(!_0x42db02['ok']||_0x17762e[_0x5b44c7(0x206)]===![])throw CliErrors[_0x5b44c7(0x273)](_0x17762e[_0x5b44c7(0x1fa)]||_0x17762e['message']||_0x5b44c7(0x1f8)+_0x42db02[_0x5b44c7(0x22d)],_0x17762e[_0x5b44c7(0x259)]?'API\x20error\x20code:\x20'+_0x17762e['errorCode']:undefined);return _0x17762e;}catch(_0x49d956){if(_0x49d956 instanceof Error&&_0x49d956['name']==='AbortError')throw CliErrors[_0x5b44c7(0x273)](_0x5b44c7(0x252)+_0x120480);throw _0x49d956;}finally{clearTimeout(_0x227f08);}}async function apiBinaryRequest(_0x1ae52f,_0x3277ff={}){const _0xd64149=a69_0x1967,{method:method=_0xd64149(0x213),headers:headers={},timeout:timeout=0x7530}=_0x3277ff,_0x297227=_activeAK,_0x38234c=getRuntimeDomain();if(!_0x297227)throw CliErrors[_0xd64149(0x1f3)](_0xd64149(0x1fc)+PRODUCT_CONFIG[_0xd64149(0x251)]+'.');const _0x388dcd=''+_0x38234c+_0x1ae52f,_0x5af62d=new AbortController(),_0x22dd29=setTimeout(()=>_0x5af62d['abort'](),timeout);try{const _0x30164a=await fetch(_0x388dcd,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0xd64149(0x207)],'X-User-AK':_0x297227,...headers},'signal':_0x5af62d[_0xd64149(0x215)]});if(!_0x30164a['ok']){let _0x5ed97c;try{const _0x164490=await _0x30164a[_0xd64149(0x244)]();_0x5ed97c=_0x164490[_0xd64149(0x1fa)]||_0x164490[_0xd64149(0x1ef)]||_0x164490['errorCode'];}catch{_0x5ed97c=await _0x30164a[_0xd64149(0x234)]()[_0xd64149(0x231)](()=>undefined);}throw CliErrors[_0xd64149(0x273)](_0x5ed97c||_0xd64149(0x1f8)+_0x30164a[_0xd64149(0x22d)],_0xd64149(0x211)+_0x388dcd);}return Buffer[_0xd64149(0x255)](await _0x30164a['arrayBuffer']());}catch(_0x249ca5){if(_0x249ca5 instanceof Error&&_0x249ca5[_0xd64149(0x265)]===_0xd64149(0x258))throw CliErrors[_0xd64149(0x273)](_0xd64149(0x252)+_0x388dcd);throw _0x249ca5;}finally{clearTimeout(_0x22dd29);}}async function toolboxRequest(_0x362ace,_0x3406ee,_0xe20fa2={}){const _0x94f418=a69_0x1967,{method:method=_0x94f418(0x213),headers:headers={},timeout:timeout=0x7530}=_0xe20fa2,_0x3762f7=_activeAK;if(!_0x3762f7)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x94f418(0x251)]+'.');const _0x5e4039=getApiDomain()[_0x94f418(0x274)](/\/$/,''),_0x5c94fc=new URL(_0x362ace,_0x5e4039+_0x94f418(0x254));if(_0x3406ee)for(const [_0x1c8d9e,_0x28e84c]of Object['entries'](_0x3406ee)){_0x28e84c!==undefined&&_0x28e84c!==null&&_0x5c94fc['searchParams'][_0x94f418(0x208)](_0x1c8d9e,String(_0x28e84c));}const _0x48da55=new AbortController(),_0x2f3507=setTimeout(()=>_0x48da55[_0x94f418(0x230)](),timeout);try{const _0x5d431b=await fetch(_0x5c94fc,{'method':method,'headers':{'Content-Type':_0x94f418(0x20c),'X-Invoke-Source':PRODUCT_CONFIG[_0x94f418(0x207)],'X-User-AK':_0x3762f7,...headers},'signal':_0x48da55[_0x94f418(0x215)]});let _0x24c0a8;try{_0x24c0a8=await _0x5d431b[_0x94f418(0x244)]();}catch{throw CliErrors[_0x94f418(0x273)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x5d431b[_0x94f418(0x22d)]+')',_0x5d431b['status']>=0x190?_0x94f418(0x21b):undefined);}if(!_0x5d431b['ok']){const _0x33b69f=_0x24c0a8&&typeof _0x24c0a8===_0x94f418(0x271)?_0x24c0a8:{};throw CliErrors[_0x94f418(0x273)](_0x33b69f[_0x94f418(0x1fa)]||_0x33b69f[_0x94f418(0x1ef)]||_0x94f418(0x237)+_0x5d431b[_0x94f418(0x22d)],_0x33b69f[_0x94f418(0x259)]?_0x94f418(0x263)+_0x33b69f['errorCode']:undefined);}if(_0x24c0a8&&typeof _0x24c0a8===_0x94f418(0x271)&&_0x94f418(0x206)in _0x24c0a8&&typeof _0x24c0a8[_0x94f418(0x206)]==='boolean'){const _0xe3433f=_0x24c0a8;if(!_0xe3433f[_0x94f418(0x206)])throw CliErrors['apiError'](_0xe3433f['errorMsg']||_0xe3433f[_0x94f418(0x1ef)]||_0x94f418(0x239),_0xe3433f['errorCode']?_0x94f418(0x263)+_0xe3433f['errorCode']:undefined);return _0xe3433f[_0x94f418(0x240)];}return _0x24c0a8;}catch(_0x59a4f5){if(_0x59a4f5 instanceof Error&&_0x59a4f5[_0x94f418(0x265)]===_0x94f418(0x258))throw CliErrors[_0x94f418(0x273)](_0x94f418(0x252)+_0x5c94fc[_0x94f418(0x253)]());throw _0x59a4f5;}finally{clearTimeout(_0x2f3507);}}async function skillHubJsonRequest(_0x245d98,_0x30dd18={}){const _0x5712ea=a69_0x1967,{method:method=_0x5712ea(0x213),query:_0xa8b8a5,body:_0x38ef0a,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x30dd18,_0x1665c5=_activeAK;if(!_0x1665c5)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x8547ea=getSkillHubDomain()[_0x5712ea(0x274)](/\/$/,''),_0x39f4b7=new URL(_0x245d98,_0x8547ea+'/');if(_0xa8b8a5)for(const [_0x3100e5,_0x568fcd]of Object[_0x5712ea(0x1ee)](_0xa8b8a5)){_0x568fcd!==undefined&&_0x568fcd!==null&&_0x39f4b7[_0x5712ea(0x24a)]['set'](_0x3100e5,String(_0x568fcd));}const _0x565f4d=new AbortController(),_0x475326=setTimeout(()=>_0x565f4d[_0x5712ea(0x230)](),timeout);try{const _0x1ca66c=await fetch(_0x39f4b7[_0x5712ea(0x253)](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x5712ea(0x207)],'X-User-AK':_0x1665c5,...headers},'body':_0x38ef0a,'signal':_0x565f4d['signal']});let _0x31c7ce;try{_0x31c7ce=await _0x1ca66c[_0x5712ea(0x244)]();}catch{if(allowNotFound&&_0x1ca66c[_0x5712ea(0x22d)]===0x194)return undefined;throw CliErrors['apiError'](_0x5712ea(0x229)+_0x1ca66c['status']+')',_0x1ca66c[_0x5712ea(0x22d)]>=0x190?_0x5712ea(0x21b):undefined);}if(allowNotFound&&(_0x1ca66c[_0x5712ea(0x22d)]===0x194||_0x31c7ce?.[_0x5712ea(0x262)]===0x194))return undefined;const _0x27d9e3=!_0x1ca66c['ok']||_0x31c7ce?.[_0x5712ea(0x206)]===![]||typeof _0x31c7ce?.[_0x5712ea(0x262)]==='number'&&_0x31c7ce['code']>=0x190;if(_0x27d9e3)throw CliErrors['apiError'](_0x31c7ce?.[_0x5712ea(0x1fa)]||_0x31c7ce?.[_0x5712ea(0x1ef)]||_0x31c7ce?.[_0x5712ea(0x227)]||_0x5712ea(0x247)+_0x1ca66c[_0x5712ea(0x22d)],_0x31c7ce?.[_0x5712ea(0x259)]?_0x5712ea(0x23d)+_0x31c7ce['errorCode']:undefined);return _0x31c7ce?.[_0x5712ea(0x240)]??_0x31c7ce;}catch(_0x155718){if(_0x155718 instanceof Error&&_0x155718[_0x5712ea(0x265)]===_0x5712ea(0x258))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x39f4b7[_0x5712ea(0x253)]());throw _0x155718;}finally{clearTimeout(_0x475326);}}function a69_0x1967(_0x2ea9b9,_0x3fc3ae){_0x2ea9b9=_0x2ea9b9-0x1ed;const _0x28eb85=a69_0x28eb();let _0x1967c0=_0x28eb85[_0x2ea9b9];return _0x1967c0;}async function skillHubBinaryRequest(_0x8419f5,_0x3c001b={}){const _0x4d04c6=a69_0x1967,{query:_0x281614,headers:headers={},timeout:timeout=0x7530}=_0x3c001b,_0x4a0d6f=_activeAK;if(!_0x4a0d6f)throw CliErrors[_0x4d04c6(0x1f3)](_0x4d04c6(0x1fc)+PRODUCT_CONFIG[_0x4d04c6(0x251)]+'.');const _0x1cb6e9=getSkillHubDomain()['replace'](/\/$/,''),_0x4096e6=new URL(_0x8419f5,_0x1cb6e9+'/');if(_0x281614)for(const [_0x3668a5,_0x2757f0]of Object[_0x4d04c6(0x1ee)](_0x281614)){_0x2757f0!==undefined&&_0x2757f0!==null&&_0x4096e6[_0x4d04c6(0x24a)][_0x4d04c6(0x208)](_0x3668a5,String(_0x2757f0));}const _0x59bcb2=new AbortController(),_0x29ac8b=setTimeout(()=>_0x59bcb2[_0x4d04c6(0x230)](),timeout);try{const _0x50a191=await fetch(_0x4096e6[_0x4d04c6(0x253)](),{'method':'GET','headers':{'Accept':_0x4d04c6(0x21e),'X-Invoke-Source':PRODUCT_CONFIG[_0x4d04c6(0x207)],'X-User-AK':_0x4a0d6f,...headers},'signal':_0x59bcb2[_0x4d04c6(0x215)]});if(!_0x50a191['ok']){let _0x49f0af;try{const _0x4a23c8=await _0x50a191[_0x4d04c6(0x244)]();_0x49f0af=_0x4a23c8['errorMsg']||_0x4a23c8[_0x4d04c6(0x1ef)]||_0x4a23c8[_0x4d04c6(0x227)]||_0x4a23c8['errorCode'];}catch{_0x49f0af=await _0x50a191['text']()[_0x4d04c6(0x231)](()=>undefined);}throw CliErrors['apiError'](_0x49f0af||'SkillHub\x20API\x20error:\x20'+_0x50a191[_0x4d04c6(0x22d)],_0x4d04c6(0x211)+_0x4096e6[_0x4d04c6(0x253)]());}return Buffer[_0x4d04c6(0x255)](await _0x50a191[_0x4d04c6(0x249)]());}catch(_0x15a336){if(_0x15a336 instanceof Error&&_0x15a336[_0x4d04c6(0x265)]==='AbortError')throw CliErrors[_0x4d04c6(0x273)](_0x4d04c6(0x252)+_0x4096e6[_0x4d04c6(0x253)]());throw _0x15a336;}finally{clearTimeout(_0x29ac8b);}}export async function getBffScriptInfo(_0x39f38b){const _0xf24b02=a69_0x1967,_0x45ed1a=await apiRequest(_0xf24b02(0x25c)+_0x39f38b);if(!_0x45ed1a[_0xf24b02(0x240)])throw CliErrors['validation'](_0xf24b02(0x228)+_0x39f38b);return _0x45ed1a['data'];}export async function getSqlQueryInfo(_0x95123b,_0x5c66f0){const _0x461d01=a69_0x1967,_0x563e4f=await apiRequest('/client/sql/query',{'method':_0x461d01(0x20e),'body':{'appCode':_0x95123b,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x5c66f0}}),_0x466106=_0x563e4f['data'],_0x5b4439=_0x466106&&typeof _0x466106==='object'&&_0x461d01(0x21d)in _0x466106?_0x466106[_0x461d01(0x21d)]?.[0x0]:_0x466106&&typeof _0x466106==='object'&&_0x461d01(0x272)in _0x466106?_0x466106:undefined;if(!_0x5b4439)throw CliErrors['validation'](_0x461d01(0x21f)+_0x5c66f0);return _0x5b4439;}function isRemoteAppItem(_0x1c9a72){const _0x3f96b0=a69_0x1967;return!!_0x1c9a72&&typeof _0x1c9a72===_0x3f96b0(0x271)&&typeof _0x1c9a72[_0x3f96b0(0x209)]===_0x3f96b0(0x25f)&&typeof _0x1c9a72['appName']===_0x3f96b0(0x25f);}function extractRemoteAppItems(_0x4c2a98){const _0x187d4a=a69_0x1967;if(Array[_0x187d4a(0x219)](_0x4c2a98))return _0x4c2a98[_0x187d4a(0x241)](isRemoteAppItem);if(!_0x4c2a98||typeof _0x4c2a98!==_0x187d4a(0x271))throw CliErrors[_0x187d4a(0x273)](_0x187d4a(0x26b));const _0x35027b=_0x4c2a98;if(Array[_0x187d4a(0x219)](_0x35027b[_0x187d4a(0x21d)]))return _0x35027b[_0x187d4a(0x21d)][_0x187d4a(0x241)](isRemoteAppItem);if(_0x35027b[_0x187d4a(0x240)]&&typeof _0x35027b[_0x187d4a(0x240)]===_0x187d4a(0x271)){const _0x38dff7=_0x35027b[_0x187d4a(0x240)];if(Array[_0x187d4a(0x219)](_0x38dff7[_0x187d4a(0x21d)]))return _0x38dff7[_0x187d4a(0x21d)][_0x187d4a(0x241)](isRemoteAppItem);}throw CliErrors[_0x187d4a(0x273)](_0x187d4a(0x25a));}export async function getMyApps(){const _0x2eb065=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x2eb065['data']);}export async function getLoginUserInfo(){const _0x53f3b3=a69_0x1967,_0x63a843=await apiRequest(_0x53f3b3(0x21a));if(!_0x63a843[_0x53f3b3(0x240)]||typeof _0x63a843[_0x53f3b3(0x240)]!==_0x53f3b3(0x271)||Array[_0x53f3b3(0x219)](_0x63a843[_0x53f3b3(0x240)]))throw CliErrors['apiError'](_0x53f3b3(0x1f4));return _0x63a843[_0x53f3b3(0x240)];}export async function listDatasets(_0x42fda9,_0x3092f7){const _0x13ad15=a69_0x1967,_0x427cae=await apiRequest(_0x13ad15(0x214),{'method':_0x13ad15(0x20e),'body':{'appCode':_0x42fda9,..._0x3092f7?.[_0x13ad15(0x262)]&&{'code':_0x3092f7['code']},..._0x3092f7?.[_0x13ad15(0x265)]&&{'name':_0x3092f7[_0x13ad15(0x265)]}}});return extractList(_0x427cae[_0x13ad15(0x240)]);}export async function getDatasetDetail(_0x3db52e){const _0x5a5521=a69_0x1967,_0x150ced=await apiRequest(_0x5a5521(0x24d)+encodeURIComponent(_0x3db52e));return _0x150ced[_0x5a5521(0x240)];}export async function getDatasetSdkUsageDoc(_0x36c187,_0x20d94a){const _0x4fe8c4=a69_0x1967,_0x3c0365=await toolboxRequest(_0x4fe8c4(0x1f0),{'datasetCode':_0x36c187,'appCode':_0x20d94a});return typeof _0x3c0365?.[_0x4fe8c4(0x20f)]===_0x4fe8c4(0x25f)?_0x3c0365[_0x4fe8c4(0x20f)]:'';}export async function getRuntimeAppConfigByKey(_0x503018,_0x312493){const _0x529972=a69_0x1967,_0x15c5d6=new URLSearchParams({'appCode':_0x503018,'key':_0x312493}),_0x58cc0e=await apiRequest(_0x529972(0x23f)+_0x15c5d6['toString']());if(!_0x58cc0e[_0x529972(0x240)])throw CliErrors['validation'](_0x529972(0x222)+_0x312493);return _0x58cc0e[_0x529972(0x240)];}export async function listRuntimeArtifacts(_0x36276a,_0x42967e){const _0x166112=a69_0x1967,_0x5b3482=new URLSearchParams({'appCode':_0x36276a});if(_0x42967e?.[_0x166112(0x201)])_0x5b3482[_0x166112(0x208)]('artifactType',_0x42967e['artifactType']);if(_0x42967e?.['source'])_0x5b3482[_0x166112(0x208)](_0x166112(0x267),_0x42967e[_0x166112(0x267)]);if(_0x42967e?.[_0x166112(0x22a)]!==undefined)_0x5b3482[_0x166112(0x208)]('favorite',String(_0x42967e[_0x166112(0x22a)]));const _0x52fe56=await apiRequest(_0x166112(0x257)+_0x5b3482[_0x166112(0x253)]());return Array[_0x166112(0x219)](_0x52fe56[_0x166112(0x240)])?_0x52fe56[_0x166112(0x240)]:[];}export async function getRuntimeArtifact(_0x5a01f8,_0x214d0d){const _0x5cc359=a69_0x1967,_0xa88960=await apiRequest(_0x5cc359(0x268)+_0x5a01f8+_0x5cc359(0x26c)+encodeURIComponent(_0x214d0d));if(!_0xa88960[_0x5cc359(0x240)])throw CliErrors[_0x5cc359(0x221)]('Artifact\x20not\x20found:\x20id='+_0x5a01f8);return _0xa88960[_0x5cc359(0x240)];}export async function createRuntimeArtifact(_0x2ec980,_0x4e4de3){const _0x42eb52=a69_0x1967,_0x4593ed=await apiRequest('/client/artifact/create',{'method':_0x42eb52(0x20e),'body':{'appCode':_0x2ec980,..._0x4e4de3}});return _0x4593ed[_0x42eb52(0x240)];}export async function updateRuntimeArtifact(_0x34688b,_0x5ab4d3,_0x2c417c){const _0xf24006=a69_0x1967,_0x1c4189=await apiRequest(_0xf24006(0x268)+_0x34688b+_0xf24006(0x226),{'method':_0xf24006(0x20e),'body':{'appCode':_0x5ab4d3,..._0x2c417c}});return _0x1c4189[_0xf24006(0x240)];}function a69_0x28eb(){const _0x48d81c=['scope','SkillHub\x20API\x20error:\x20','confirmWarnings','arrayBuffer','searchParams','warnings','/versions/','/client/dataset/get-driven-data?code=','tags','/client/runtime-bff/personal/','11TrHpRl','newConfigFileName','Request\x20timeout:\x20','toString','/api/node-toolbox/','from','skillCode','/client/artifact/list?','AbortError','errorCode','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','/client/knowledge-base/personal/','/client/bff/query/','topK','Knowledge-base\x20entry\x20not\x20found:\x20id=','string','base64','file','code','Toolbox\x20error\x20code:\x20','summary','name','effective','source','/client/artifact/','1992001LHBRxR','1449096eGoiLd','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','?appCode=','skillName','/client/knowledge-base/personal/list?appCode=','all','8229039SIhnqA','object','sqlCode','apiError','replace','240XLIVof','entries','message','api-doc-generator','/client/knowledge-base/search','PRIVATE','authRequired','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','valid','13861330POfvJn','description','API\x20error:\x20','/execute?appCode=','errorMsg','/skills','Configure\x20accessKey\x20in\x20','5606ZMGwez','ownerPreviewVersion','errors','displayName','artifactType','company','items','trim','221640cEoHzy','success','invokeSource','set','appCode','application/zip','content','application/json','personal','POST','markdown','values','Download\x20failed:\x20','/client/runtime-bff/personal/create','GET','/client/dataset/list','signal','slug','Personal\x20BFF\x20not\x20found:\x20id=','packageBase64','isArray','/client/user/loginUserInfo','Check\x20your\x20credentials\x20and\x20try\x20again.','visibility','tableData','application/octet-stream','SQL\x20query\x20not\x20found:\x20','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','validation','App\x20config\x20not\x20found:\x20key=','798201BrtPgN','query','9LwqmMt','/update','msg','BFF\x20script\x20not\x20found:\x20id=','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','favorite','version','publishedVersion','status','resolvedSlug','NAMESPACE_ONLY','abort','catch','/api/v1/skills/','85qiCcUn','text','stringify','skill','Toolbox\x20API\x20error:\x20','16zVHAas','Toolbox\x20API\x20error','/client/runtime-bff/personal/list?appCode=','resolvedVersion','/client/knowledge-base/personal/create','SkillHub\x20error\x20code:\x20','/download','/client/app-config/getByKey?','data','filter','namespace','/api/cli/v1/skills/','json','.zip'];a69_0x28eb=function(){return _0x48d81c;};return a69_0x28eb();}export async function listPersonalBffs(_0xc6a62a){const _0x1e8012=a69_0x1967,_0x3a2fb5=await apiRequest(_0x1e8012(0x23a)+encodeURIComponent(_0xc6a62a));return Array['isArray'](_0x3a2fb5[_0x1e8012(0x240)])?_0x3a2fb5[_0x1e8012(0x240)]:[];}export async function getPersonalBff(_0x1fd934,_0x4736e8){const _0x4378ad=a69_0x1967,_0xd5719f=await apiRequest(_0x4378ad(0x24f)+_0x1fd934+_0x4378ad(0x26c)+encodeURIComponent(_0x4736e8));if(!_0xd5719f[_0x4378ad(0x240)])throw CliErrors[_0x4378ad(0x221)](_0x4378ad(0x217)+_0x1fd934);return _0xd5719f['data'];}export async function createPersonalBff(_0x15b100,_0x27c425){const _0x1f6a75=a69_0x1967,_0x55443f=await apiRequest(_0x1f6a75(0x212),{'method':_0x1f6a75(0x20e),'body':{'appCode':_0x15b100,..._0x27c425}});return _0x55443f[_0x1f6a75(0x240)];}export async function updatePersonalBff(_0x14e12c,_0x30a61c,_0x579cb7){const _0x5801a1=a69_0x1967,_0x2bb8c5=await apiRequest(_0x5801a1(0x24f)+_0x14e12c+_0x5801a1(0x226),{'method':_0x5801a1(0x20e),'body':{'appCode':_0x30a61c,..._0x579cb7}});return _0x2bb8c5[_0x5801a1(0x240)];}export async function executePersonalBff(_0x20b51c,_0x107c6b,_0x3b2604){const _0x55e8f0=a69_0x1967,_0x97c62c=await apiRequest(_0x55e8f0(0x24f)+_0x20b51c+_0x55e8f0(0x1f9)+encodeURIComponent(_0x107c6b),{'method':_0x55e8f0(0x20e),'body':_0x3b2604});return _0x97c62c['data'];}export async function listPersonalKnowledgeBaseItems(_0x4de5f5){const _0x38cb8a=a69_0x1967,_0x2dd5f3=await apiRequest(_0x38cb8a(0x26e)+encodeURIComponent(_0x4de5f5));return Array['isArray'](_0x2dd5f3[_0x38cb8a(0x240)])?_0x2dd5f3['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x3c1ae5,_0xd2c7ab){const _0x24b94f=a69_0x1967,_0x53d042=await apiRequest(_0x24b94f(0x25b)+_0x3c1ae5+'?appCode='+encodeURIComponent(_0xd2c7ab));if(!_0x53d042[_0x24b94f(0x240)])throw CliErrors[_0x24b94f(0x221)](_0x24b94f(0x25e)+_0x3c1ae5);return _0x53d042['data'];}export async function createPersonalKnowledgeBaseItem(_0x421d5c,_0x270d23){const _0x270e2e=a69_0x1967,_0x174854=await apiRequest(_0x270e2e(0x23c),{'method':'POST','body':{'appCode':_0x421d5c,..._0x270d23}});return _0x174854[_0x270e2e(0x240)];}export async function updatePersonalKnowledgeBaseItem(_0x885611,_0x3578d8,_0x47449f){const _0xed498=a69_0x1967,_0x13e374=await apiRequest(_0xed498(0x25b)+_0x885611+'/update',{'method':_0xed498(0x20e),'body':{'appCode':_0x3578d8,..._0x47449f}});return _0x13e374[_0xed498(0x240)];}export async function searchKnowledgeBase(_0x123a28,_0x54d2cc){const _0xd82729=a69_0x1967,_0x3bb76a=await apiRequest(_0xd82729(0x1f1),{'method':_0xd82729(0x20e),'body':{'appCode':_0x123a28,'query':_0x54d2cc[_0xd82729(0x224)],..._0x54d2cc[_0xd82729(0x25d)]!==undefined?{'topK':_0x54d2cc[_0xd82729(0x25d)]}:{}}});return Array[_0xd82729(0x219)](_0x3bb76a[_0xd82729(0x240)])?_0x3bb76a['data']:[];}export async function getRuntimeSkillByCode(_0x52386a,_0x2a1e28){const _0x2ad6a0=a69_0x1967,_0x4a8f40=await skillHubJsonRequest(_0x2ad6a0(0x232)+encodeURIComponent(_0x52386a)+'/'+encodeURIComponent(_0x2a1e28),{'allowNotFound':!![]});return _0x4a8f40?skillHubRuntimeDetailToRuntimeSkill(_0x4a8f40):undefined;}export async function listRuntimeSkills(_0x2d8dd1){const _0x53bfe6=a69_0x1967,_0x355301=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0x2d8dd1['appCode'])+_0x53bfe6(0x1fb),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x2d8dd1['appCode'],_0x355301,_0x2d8dd1[_0x53bfe6(0x246)]??_0x53bfe6(0x26f),_0x2d8dd1[_0x53bfe6(0x262)]);}export async function listPersonalRuntimeSkills(_0x9e4919){const _0x2ffef3=a69_0x1967;return(await listRuntimeSkills({'appCode':_0x9e4919,'scope':_0x2ffef3(0x20d)}))[_0x2ffef3(0x20d)];}export async function listCompanyRuntimeSkills(_0x2b86ca){const _0x38ffa3=a69_0x1967;return(await listRuntimeSkills({'appCode':_0x2b86ca,'scope':_0x38ffa3(0x202)}))[_0x38ffa3(0x202)];}export async function listVisibleRuntimeSkills(_0x3612ae){const _0x572885=a69_0x1967;return(await listRuntimeSkills({'appCode':_0x3612ae,'scope':_0x572885(0x26f)}))[_0x572885(0x266)];}export async function createPersonalRuntimeSkill(_0x151032,_0x51c5cb){const _0x41c7a8=a69_0x1967;return publishRuntimeSkill(_0x151032,_0x51c5cb,{'visibility':_0x41c7a8(0x1f2)});}export async function updatePersonalRuntimeSkill(_0x48563a,_0x7ef8c2,_0x1f2a6c){return publishRuntimeSkill(_0x7ef8c2,{..._0x1f2a6c,'skillCode':_0x1f2a6c['skillCode']??_0x48563a},{'visibility':'PRIVATE'});}export async function publishCompanyRuntimeSkill(_0x1242fa,_0x374075,_0x217a75={}){const _0x5d53a5=a69_0x1967;return publishRuntimeSkill(_0x1242fa,_0x374075,{'visibility':'NAMESPACE_ONLY','confirmWarnings':_0x217a75[_0x5d53a5(0x248)]});}export async function validateRuntimeSkillPublish(_0x114a0f,_0x2662d3,_0x3b142c){const _0x1bc913=a69_0x1967,_0x3e75d7=buildRuntimeSkillPublishForm(_0x2662d3,_0x3b142c[_0x1bc913(0x21c)]),_0x4aaeb1=await skillHubJsonRequest(_0x1bc913(0x243)+encodeURIComponent(_0x114a0f)+'/publish/validate',{'method':_0x1bc913(0x20e),'body':_0x3e75d7});return{'valid':_0x4aaeb1[_0x1bc913(0x1f5)]===!![],'errors':Array[_0x1bc913(0x219)](_0x4aaeb1[_0x1bc913(0x1ff)])?_0x4aaeb1[_0x1bc913(0x1ff)]:[],'warnings':Array[_0x1bc913(0x219)](_0x4aaeb1[_0x1bc913(0x24b)])?_0x4aaeb1['warnings']:[],'resolvedSlug':_0x4aaeb1[_0x1bc913(0x22e)],'resolvedVersion':_0x4aaeb1[_0x1bc913(0x23b)]};}export async function downloadRuntimeSkillPackage(_0x377617,_0xcbb84a,_0x39fd10,_0x320c51){const _0x495b6d=a69_0x1967;void _0x377617;const _0x3f666c=_0x320c51?_0x495b6d(0x243)+encodeURIComponent(_0x39fd10)+'/'+encodeURIComponent(_0xcbb84a)+_0x495b6d(0x24c)+encodeURIComponent(_0x320c51)+_0x495b6d(0x23e):_0x495b6d(0x243)+encodeURIComponent(_0x39fd10)+'/'+encodeURIComponent(_0xcbb84a)+_0x495b6d(0x23e);return skillHubBinaryRequest(_0x3f666c);}async function publishRuntimeSkill(_0x1e7965,_0x1338db,_0x349067){const _0x3da325=a69_0x1967,_0x52d7af=buildRuntimeSkillPublishForm(_0x1338db,_0x349067[_0x3da325(0x21c)]),_0x282a09=await skillHubJsonRequest(_0x3da325(0x243)+encodeURIComponent(_0x1e7965)+'/publish',{'method':_0x3da325(0x20e),'query':{'confirmWarnings':_0x349067[_0x3da325(0x248)]===!![]?!![]:undefined},'body':_0x52d7af});return{'appCode':_0x282a09[_0x3da325(0x242)]??_0x1e7965,'skillCode':_0x282a09[_0x3da325(0x216)]??_0x1338db['skillCode']??'','skillName':_0x1338db[_0x3da325(0x26d)]??_0x282a09['slug']??_0x1338db[_0x3da325(0x256)],'description':_0x1338db[_0x3da325(0x1f7)],'scope':skillHubVisibilityToScope(_0x282a09[_0x3da325(0x21c)]??_0x349067[_0x3da325(0x21c)])??'personal','version':_0x282a09[_0x3da325(0x22b)]??_0x1338db[_0x3da325(0x22b)],'tags':_0x1338db[_0x3da325(0x24e)],'content':_0x1338db[_0x3da325(0x20b)]};}function buildRuntimeSkillPublishForm(_0x2bfe18,_0x736b8){const _0x1284b9=a69_0x1967,_0x59231d=new FormData();return _0x59231d[_0x1284b9(0x208)](_0x1284b9(0x261),runtimeSkillPackageFile(_0x2bfe18)),_0x59231d[_0x1284b9(0x208)](_0x1284b9(0x21c),_0x736b8),_0x59231d;}function runtimeSkillPackageFile(_0x2e0eb0){const _0x5b8ca5=a69_0x1967;if(!_0x2e0eb0['packageBase64'])throw CliErrors['validation']('Missing\x20Skill\x20package\x20payload.');const _0x53e86a=Buffer[_0x5b8ca5(0x255)](_0x2e0eb0[_0x5b8ca5(0x218)],_0x5b8ca5(0x260)),_0x488b6c=new Blob([_0x53e86a],{'type':_0x5b8ca5(0x20a)}),_0x2864e4=(_0x2e0eb0['skillCode']||_0x5b8ca5(0x236))+_0x5b8ca5(0x245);if(typeof File!=='undefined')return new File([_0x488b6c],_0x2864e4,{'type':_0x5b8ca5(0x20a)});return _0x488b6c;}function normalizeSkillHubRuntimeListResponse(_0x560d33,_0x2f1701,_0xb94ee5,_0xb26808){const _0x5ef528=a69_0x1967,_0x3b6c2b=Array['isArray'](_0x2f1701)?_0x2f1701:Array[_0x5ef528(0x219)](_0x2f1701?.[_0x5ef528(0x203)])?_0x2f1701[_0x5ef528(0x203)]:[],_0x419665=_0xb26808?.[_0x5ef528(0x204)](),_0x2f4dbb=_0x3b6c2b['filter'](_0x5abdcf=>!_0x419665||_0x5abdcf['slug']===_0x419665)['map'](skillHubRuntimeItemToRuntimeSkill)[_0x5ef528(0x241)](_0x35fe32=>Boolean(_0x35fe32)),_0x1654ac=_0x2f4dbb[_0x5ef528(0x241)](_0x5eddcb=>_0x5eddcb['scope']==='personal'),_0x4de973=_0x2f4dbb[_0x5ef528(0x241)](_0x429ca7=>_0x429ca7[_0x5ef528(0x246)]===_0x5ef528(0x202));return{'appCode':_0x560d33,'personal':_0xb94ee5===_0x5ef528(0x202)?[]:_0x1654ac,'company':_0xb94ee5===_0x5ef528(0x20d)?[]:_0x4de973,'effective':buildEffectiveRuntimeSkills(_0x1654ac,_0x4de973,_0xb94ee5)};}function skillHubRuntimeItemToRuntimeSkill(_0x334573){const _0x43ed38=a69_0x1967,_0x1fe15f=_0x334573[_0x43ed38(0x216)]?.[_0x43ed38(0x204)](),_0x4fb1da=skillHubVisibilityToScope(_0x334573[_0x43ed38(0x21c)]);if(!_0x1fe15f||!_0x4fb1da)return undefined;return{'id':_0x334573['id'],'appCode':_0x334573[_0x43ed38(0x242)],'skillCode':_0x1fe15f,'skillName':_0x334573['displayName']??_0x1fe15f,'description':_0x334573[_0x43ed38(0x264)],'scope':_0x4fb1da,'version':skillHubRuntimeItemVersion(_0x334573),'status':_0x334573[_0x43ed38(0x22d)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x3d9423){const _0x4954bb=a69_0x1967,_0x596c95=_0x3d9423[_0x4954bb(0x216)]?.[_0x4954bb(0x204)]();if(!_0x596c95)return undefined;return{'id':_0x3d9423['id'],'appCode':_0x3d9423[_0x4954bb(0x242)],'skillCode':_0x596c95,'skillName':_0x3d9423[_0x4954bb(0x200)]??_0x596c95,'description':_0x3d9423[_0x4954bb(0x264)],'scope':skillHubVisibilityToScope(_0x3d9423[_0x4954bb(0x21c)])??_0x3d9423[_0x4954bb(0x21c)]?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0x3d9423),'status':_0x3d9423[_0x4954bb(0x22d)]};}function skillHubVisibilityToScope(_0xf2d3fe){const _0x2a9d12=a69_0x1967;if(_0xf2d3fe===_0x2a9d12(0x1f2))return'personal';if(_0xf2d3fe===_0x2a9d12(0x22f))return _0x2a9d12(0x202);return undefined;}function skillHubRuntimeItemVersion(_0x10f466){const _0x43c243=a69_0x1967;return _0x10f466[_0x43c243(0x22c)]?.[_0x43c243(0x22b)]??_0x10f466['headlineVersion']?.[_0x43c243(0x22b)]??_0x10f466[_0x43c243(0x1fe)]?.[_0x43c243(0x22b)];}function buildEffectiveRuntimeSkills(_0x29c28d,_0x5059eb,_0x4f46b8){const _0x3dca61=a69_0x1967;if(_0x4f46b8==='personal')return _0x29c28d;if(_0x4f46b8===_0x3dca61(0x202))return _0x5059eb;const _0x46d9ee=new Map();for(const _0x24051a of _0x5059eb){_0x46d9ee[_0x3dca61(0x208)](_0x24051a['skillCode'],_0x24051a);}for(const _0x4a685e of _0x29c28d){_0x46d9ee[_0x3dca61(0x208)](_0x4a685e['skillCode'],_0x4a685e);}return Array['from'](_0x46d9ee[_0x3dca61(0x210)]());}function normalizeRuntimeSkillListResponse(_0xcf12b7,_0xe93932){const _0x16fae1=a69_0x1967;if(Array[_0x16fae1(0x219)](_0xe93932)){const _0x5c3c53=_0xe93932[_0x16fae1(0x241)](_0x6b39b4=>_0x6b39b4[_0x16fae1(0x246)]===_0x16fae1(0x20d)),_0x4d9163=_0xe93932[_0x16fae1(0x241)](_0x5cbfb2=>_0x5cbfb2[_0x16fae1(0x246)]===_0x16fae1(0x202));return{'appCode':_0xcf12b7,'personal':_0x5c3c53,'company':_0x4d9163,'effective':[..._0x4d9163,..._0x5c3c53]};}return{'appCode':_0xe93932?.[_0x16fae1(0x209)]??_0xcf12b7,'personal':Array[_0x16fae1(0x219)](_0xe93932?.[_0x16fae1(0x20d)])?_0xe93932[_0x16fae1(0x20d)]:[],'company':Array[_0x16fae1(0x219)](_0xe93932?.[_0x16fae1(0x202)])?_0xe93932[_0x16fae1(0x202)]:[],'effective':Array[_0x16fae1(0x219)](_0xe93932?.['effective'])?_0xe93932[_0x16fae1(0x266)]:[]};}
|
|
1
|
+
(function(_0x1efa4f,_0x5db400){const _0x35e074=a74_0x1964,_0x17597c=_0x1efa4f();while(!![]){try{const _0x477087=-parseInt(_0x35e074(0x19b))/0x1*(-parseInt(_0x35e074(0x136))/0x2)+-parseInt(_0x35e074(0x154))/0x3+-parseInt(_0x35e074(0x138))/0x4+parseInt(_0x35e074(0x186))/0x5*(parseInt(_0x35e074(0x16f))/0x6)+parseInt(_0x35e074(0x152))/0x7+-parseInt(_0x35e074(0x190))/0x8+-parseInt(_0x35e074(0x140))/0x9*(-parseInt(_0x35e074(0x16d))/0xa);if(_0x477087===_0x5db400)break;else _0x17597c['push'](_0x17597c['shift']());}catch(_0x1121d3){_0x17597c['push'](_0x17597c['shift']());}}}(a74_0x440c,0x7b9c6));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{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x1e90d7){_activeAK=_0x1e90d7||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x1019e6,_0x499895={}){const _0x242fed=a74_0x1964,{method:method=_0x242fed(0x191),body:_0x5a76fe,headers:headers={},timeout:timeout=0x7530}=_0x499895,_0x64e5ce=_activeAK,_0xa61aa0=getRuntimeDomain();if(!_0x64e5ce)throw CliErrors[_0x242fed(0x12c)](_0x242fed(0x197)+PRODUCT_CONFIG[_0x242fed(0x135)]+'.');const _0x528310=''+_0xa61aa0+_0x1019e6,_0x4dfdb3={'X-User-AK':_0x64e5ce},_0x55fc10=new AbortController(),_0x4bbca3=setTimeout(()=>_0x55fc10[_0x242fed(0x15b)](),timeout);try{const _0x4d07c0=await fetch(_0x528310,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x242fed(0x175)],..._0x4dfdb3,...headers},'body':_0x5a76fe?JSON[_0x242fed(0x164)](_0x5a76fe):undefined,'signal':_0x55fc10[_0x242fed(0x13b)]});let _0x37f1fd;try{_0x37f1fd=await _0x4d07c0[_0x242fed(0x128)]();}catch{throw CliErrors[_0x242fed(0x16c)](_0x242fed(0x14f)+_0x4d07c0[_0x242fed(0x163)]+')',_0x4d07c0[_0x242fed(0x163)]>=0x190?_0x242fed(0x14b):undefined);}if(!_0x4d07c0['ok']||_0x37f1fd[_0x242fed(0x177)]===![])throw CliErrors[_0x242fed(0x16c)](_0x37f1fd[_0x242fed(0x124)]||_0x37f1fd['message']||_0x242fed(0x161)+_0x4d07c0[_0x242fed(0x163)],_0x37f1fd[_0x242fed(0x159)]?_0x242fed(0x178)+_0x37f1fd[_0x242fed(0x159)]:undefined);return _0x37f1fd;}catch(_0x127d2d){if(_0x127d2d instanceof Error&&_0x127d2d[_0x242fed(0x18a)]===_0x242fed(0x198))throw CliErrors['apiError'](_0x242fed(0x194)+_0x528310);throw _0x127d2d;}finally{clearTimeout(_0x4bbca3);}}async function apiBinaryRequest(_0x44e9d9,_0x3e3585={}){const _0x2379b6=a74_0x1964,{method:method=_0x2379b6(0x191),headers:headers={},timeout:timeout=0x7530}=_0x3e3585,_0x1faf58=_activeAK,_0x41e890=getRuntimeDomain();if(!_0x1faf58)throw CliErrors[_0x2379b6(0x12c)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x2379b6(0x135)]+'.');const _0x48878b=''+_0x41e890+_0x44e9d9,_0x1bc691=new AbortController(),_0x1bfbae=setTimeout(()=>_0x1bc691[_0x2379b6(0x15b)](),timeout);try{const _0x18cb1e=await fetch(_0x48878b,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x2379b6(0x175)],'X-User-AK':_0x1faf58,...headers},'signal':_0x1bc691['signal']});if(!_0x18cb1e['ok']){let _0x8df32c;try{const _0x54c231=await _0x18cb1e[_0x2379b6(0x128)]();_0x8df32c=_0x54c231[_0x2379b6(0x124)]||_0x54c231[_0x2379b6(0x126)]||_0x54c231[_0x2379b6(0x159)];}catch{_0x8df32c=await _0x18cb1e[_0x2379b6(0x174)]()['catch'](()=>undefined);}throw CliErrors['apiError'](_0x8df32c||_0x2379b6(0x161)+_0x18cb1e[_0x2379b6(0x163)],_0x2379b6(0x17e)+_0x48878b);}return Buffer[_0x2379b6(0x14d)](await _0x18cb1e[_0x2379b6(0x16b)]());}catch(_0x1afe79){if(_0x1afe79 instanceof Error&&_0x1afe79[_0x2379b6(0x18a)]===_0x2379b6(0x198))throw CliErrors[_0x2379b6(0x16c)](_0x2379b6(0x194)+_0x48878b);throw _0x1afe79;}finally{clearTimeout(_0x1bfbae);}}async function apiFormRequest(_0x1e2315,_0x5ed4f9,_0x40ca3c={}){const _0x2c5bcb=a74_0x1964,{timeout:timeout=0x7530}=_0x40ca3c,_0x2b8331=_activeAK,_0x4bea7c=getRuntimeDomain();if(!_0x2b8331)throw CliErrors['authRequired'](_0x2c5bcb(0x197)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x445bc4=''+_0x4bea7c+_0x1e2315,_0xf56227=new AbortController(),_0x562af7=setTimeout(()=>_0xf56227[_0x2c5bcb(0x15b)](),timeout);try{const _0x3d879b=await fetch(_0x445bc4,{'method':_0x2c5bcb(0x149),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x2c5bcb(0x175)],'X-User-AK':_0x2b8331},'body':_0x5ed4f9,'signal':_0xf56227['signal']});let _0x3d0771;try{_0x3d0771=await _0x3d879b['json']();}catch{throw CliErrors[_0x2c5bcb(0x16c)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x3d879b[_0x2c5bcb(0x163)]+')',_0x3d879b[_0x2c5bcb(0x163)]>=0x190?_0x2c5bcb(0x14b):undefined);}if(!_0x3d879b['ok']||_0x3d0771[_0x2c5bcb(0x177)]===![])throw CliErrors['apiError'](_0x3d0771[_0x2c5bcb(0x124)]||_0x3d0771['message']||_0x2c5bcb(0x161)+_0x3d879b[_0x2c5bcb(0x163)],_0x3d0771['errorCode']?_0x2c5bcb(0x178)+_0x3d0771['errorCode']:undefined);return _0x3d0771;}catch(_0x4a90ba){if(_0x4a90ba instanceof Error&&_0x4a90ba[_0x2c5bcb(0x18a)]===_0x2c5bcb(0x198))throw CliErrors[_0x2c5bcb(0x16c)]('Request\x20timeout:\x20'+_0x445bc4);throw _0x4a90ba;}finally{clearTimeout(_0x562af7);}}async function toolboxRequest(_0x47f585,_0x5ead2a,_0x30929c={}){const _0x3f832e=a74_0x1964,{method:method=_0x3f832e(0x191),headers:headers={},timeout:timeout=0x7530}=_0x30929c,_0x3c9101=_activeAK;if(!_0x3c9101)throw CliErrors[_0x3f832e(0x12c)](_0x3f832e(0x197)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x2da5d5=getApiDomain()['replace'](/\/$/,''),_0xf12a02=new URL(_0x47f585,_0x2da5d5+'/api/node-toolbox/');if(_0x5ead2a)for(const [_0x154e9f,_0xc26ba1]of Object[_0x3f832e(0x15a)](_0x5ead2a)){_0xc26ba1!==undefined&&_0xc26ba1!==null&&_0xf12a02[_0x3f832e(0x14a)][_0x3f832e(0x160)](_0x154e9f,String(_0xc26ba1));}const _0x1e0895=new AbortController(),_0xe7995d=setTimeout(()=>_0x1e0895[_0x3f832e(0x15b)](),timeout);try{const _0x7c10a7=await fetch(_0xf12a02,{'method':method,'headers':{'Content-Type':_0x3f832e(0x181),'X-Invoke-Source':PRODUCT_CONFIG[_0x3f832e(0x175)],'X-User-AK':_0x3c9101,...headers},'signal':_0x1e0895[_0x3f832e(0x13b)]});let _0x563adb;try{_0x563adb=await _0x7c10a7[_0x3f832e(0x128)]();}catch{throw CliErrors['apiError']('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x7c10a7[_0x3f832e(0x163)]+')',_0x7c10a7[_0x3f832e(0x163)]>=0x190?_0x3f832e(0x14b):undefined);}if(!_0x7c10a7['ok']){const _0xe456f0=_0x563adb&&typeof _0x563adb===_0x3f832e(0x158)?_0x563adb:{};throw CliErrors[_0x3f832e(0x16c)](_0xe456f0[_0x3f832e(0x124)]||_0xe456f0[_0x3f832e(0x126)]||'Toolbox\x20API\x20error:\x20'+_0x7c10a7['status'],_0xe456f0[_0x3f832e(0x159)]?_0x3f832e(0x172)+_0xe456f0[_0x3f832e(0x159)]:undefined);}if(_0x563adb&&typeof _0x563adb==='object'&&_0x3f832e(0x177)in _0x563adb&&typeof _0x563adb[_0x3f832e(0x177)]===_0x3f832e(0x189)){const _0x15d33b=_0x563adb;if(!_0x15d33b['success'])throw CliErrors[_0x3f832e(0x16c)](_0x15d33b[_0x3f832e(0x124)]||_0x15d33b[_0x3f832e(0x126)]||'Toolbox\x20API\x20error',_0x15d33b[_0x3f832e(0x159)]?_0x3f832e(0x172)+_0x15d33b[_0x3f832e(0x159)]:undefined);return _0x15d33b['data'];}return _0x563adb;}catch(_0x326c69){if(_0x326c69 instanceof Error&&_0x326c69[_0x3f832e(0x18a)]===_0x3f832e(0x198))throw CliErrors[_0x3f832e(0x16c)](_0x3f832e(0x194)+_0xf12a02['toString']());throw _0x326c69;}finally{clearTimeout(_0xe7995d);}}async function skillHubJsonRequest(_0x1851bb,_0x5ef288={}){const _0x35f48f=a74_0x1964,{method:method=_0x35f48f(0x191),query:_0x327671,body:_0x1c6fab,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x5ef288,_0x502f4c=_activeAK;if(!_0x502f4c)throw CliErrors[_0x35f48f(0x12c)](_0x35f48f(0x197)+PRODUCT_CONFIG[_0x35f48f(0x135)]+'.');const _0x757934=getSkillHubDomain()['replace'](/\/$/,''),_0x29cd42=new URL(_0x1851bb,_0x757934+'/');if(_0x327671)for(const [_0x445cb4,_0x6622df]of Object[_0x35f48f(0x15a)](_0x327671)){_0x6622df!==undefined&&_0x6622df!==null&&_0x29cd42[_0x35f48f(0x14a)]['set'](_0x445cb4,String(_0x6622df));}const _0x3bf227=new AbortController(),_0x42cb94=setTimeout(()=>_0x3bf227[_0x35f48f(0x15b)](),timeout);try{const _0x1dd259=await fetch(_0x29cd42[_0x35f48f(0x150)](),{'method':method,'headers':{'Accept':_0x35f48f(0x181),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x502f4c,...headers},'body':_0x1c6fab,'signal':_0x3bf227[_0x35f48f(0x13b)]});let _0x19828e;try{_0x19828e=await _0x1dd259[_0x35f48f(0x128)]();}catch{if(allowNotFound&&_0x1dd259[_0x35f48f(0x163)]===0x194)return undefined;throw CliErrors['apiError'](_0x35f48f(0x157)+_0x1dd259[_0x35f48f(0x163)]+')',_0x1dd259[_0x35f48f(0x163)]>=0x190?_0x35f48f(0x14b):undefined);}if(allowNotFound&&isSkillHubNotFoundResponse(_0x1dd259['status'],_0x19828e))return undefined;const _0x3c0b26=!_0x1dd259['ok']||_0x19828e?.['success']===![]||typeof _0x19828e?.[_0x35f48f(0x153)]===_0x35f48f(0x156)&&_0x19828e['code']>=0x190;if(_0x3c0b26)throw CliErrors[_0x35f48f(0x16c)](_0x19828e?.[_0x35f48f(0x124)]||_0x19828e?.[_0x35f48f(0x126)]||_0x19828e?.[_0x35f48f(0x18b)]||_0x35f48f(0x13d)+_0x1dd259['status'],_0x19828e?.[_0x35f48f(0x159)]?_0x35f48f(0x173)+_0x19828e['errorCode']:undefined);return _0x19828e?.[_0x35f48f(0x131)]??_0x19828e;}catch(_0x170231){if(_0x170231 instanceof Error&&_0x170231[_0x35f48f(0x18a)]===_0x35f48f(0x198))throw CliErrors['apiError'](_0x35f48f(0x194)+_0x29cd42[_0x35f48f(0x150)]());throw _0x170231;}finally{clearTimeout(_0x42cb94);}}function isSkillHubNotFoundResponse(_0x5790e3,_0x1e3b5b){const _0x38dcb5=a74_0x1964;if(_0x5790e3===0x194||_0x1e3b5b?.[_0x38dcb5(0x153)]===0x194)return!![];if(_0x5790e3!==0x190&&_0x1e3b5b?.[_0x38dcb5(0x153)]!==0x190)return![];const _0x5e5e0a=[_0x1e3b5b?.['msg'],_0x1e3b5b?.[_0x38dcb5(0x126)],_0x1e3b5b?.[_0x38dcb5(0x124)],_0x1e3b5b?.['error']][_0x38dcb5(0x195)](_0x1ab29d=>typeof _0x1ab29d===_0x38dcb5(0x1a2))[_0x38dcb5(0x16e)]('\x20');return/skill not found\b/i[_0x38dcb5(0x176)](_0x5e5e0a);}async function skillHubBinaryRequest(_0x3c7ed8,_0x8ba54={}){const _0x527cdf=a74_0x1964,{query:_0x36ee18,headers:headers={},timeout:timeout=0x7530}=_0x8ba54,_0x177f6d=_activeAK;if(!_0x177f6d)throw CliErrors['authRequired'](_0x527cdf(0x197)+PRODUCT_CONFIG[_0x527cdf(0x135)]+'.');const _0x590306=getSkillHubDomain()[_0x527cdf(0x171)](/\/$/,''),_0x2133c3=new URL(_0x3c7ed8,_0x590306+'/');if(_0x36ee18)for(const [_0x535ced,_0x43b022]of Object[_0x527cdf(0x15a)](_0x36ee18)){_0x43b022!==undefined&&_0x43b022!==null&&_0x2133c3['searchParams'][_0x527cdf(0x160)](_0x535ced,String(_0x43b022));}const _0x3432c3=new AbortController(),_0x1d4a20=setTimeout(()=>_0x3432c3[_0x527cdf(0x15b)](),timeout);try{const _0x4cf8d8=await fetch(_0x2133c3['toString'](),{'method':_0x527cdf(0x191),'headers':{'Accept':_0x527cdf(0x12a),'X-Invoke-Source':PRODUCT_CONFIG[_0x527cdf(0x175)],'X-User-AK':_0x177f6d,...headers},'signal':_0x3432c3[_0x527cdf(0x13b)]});if(!_0x4cf8d8['ok']){let _0x4a31f7;try{const _0x39a5b7=await _0x4cf8d8['json']();_0x4a31f7=_0x39a5b7[_0x527cdf(0x124)]||_0x39a5b7[_0x527cdf(0x126)]||_0x39a5b7[_0x527cdf(0x18b)]||_0x39a5b7['errorCode'];}catch{_0x4a31f7=await _0x4cf8d8['text']()['catch'](()=>undefined);}throw CliErrors['apiError'](_0x4a31f7||_0x527cdf(0x13d)+_0x4cf8d8[_0x527cdf(0x163)],_0x527cdf(0x17e)+_0x2133c3[_0x527cdf(0x150)]());}return Buffer[_0x527cdf(0x14d)](await _0x4cf8d8['arrayBuffer']());}catch(_0x493d84){if(_0x493d84 instanceof Error&&_0x493d84[_0x527cdf(0x18a)]===_0x527cdf(0x198))throw CliErrors[_0x527cdf(0x16c)](_0x527cdf(0x194)+_0x2133c3['toString']());throw _0x493d84;}finally{clearTimeout(_0x1d4a20);}}export async function getBffScriptInfo(_0x30d07d){const _0x55ece2=a74_0x1964,_0xbfab3=await apiRequest('/client/bff/query/'+_0x30d07d);if(!_0xbfab3[_0x55ece2(0x131)])throw CliErrors[_0x55ece2(0x143)](_0x55ece2(0x165)+_0x30d07d);return _0xbfab3[_0x55ece2(0x131)];}export async function getSqlQueryInfo(_0x20158c,_0x1bee51){const _0x53a002=a74_0x1964,_0x420da0=await apiRequest(_0x53a002(0x17a),{'method':_0x53a002(0x149),'body':{'appCode':_0x20158c,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x1bee51}}),_0x4fd2ca=_0x420da0[_0x53a002(0x131)],_0x28a13e=_0x4fd2ca&&typeof _0x4fd2ca==='object'&&_0x53a002(0x134)in _0x4fd2ca?_0x4fd2ca['tableData']?.[0x0]:_0x4fd2ca&&typeof _0x4fd2ca===_0x53a002(0x158)&&_0x53a002(0x148)in _0x4fd2ca?_0x4fd2ca:undefined;if(!_0x28a13e)throw CliErrors[_0x53a002(0x143)](_0x53a002(0x18c)+_0x1bee51);return _0x28a13e;}function isRemoteAppItem(_0x42c6f9){const _0x3b4177=a74_0x1964;return!!_0x42c6f9&&typeof _0x42c6f9===_0x3b4177(0x158)&&typeof _0x42c6f9[_0x3b4177(0x11e)]===_0x3b4177(0x1a2)&&typeof _0x42c6f9[_0x3b4177(0x188)]===_0x3b4177(0x1a2);}function extractRemoteAppItems(_0x520123){const _0x229c0b=a74_0x1964;if(Array[_0x229c0b(0x16a)](_0x520123))return _0x520123['filter'](isRemoteAppItem);if(!_0x520123||typeof _0x520123!==_0x229c0b(0x158))throw CliErrors[_0x229c0b(0x16c)](_0x229c0b(0x1a1));const _0x3cee0b=_0x520123;if(Array['isArray'](_0x3cee0b[_0x229c0b(0x134)]))return _0x3cee0b[_0x229c0b(0x134)][_0x229c0b(0x195)](isRemoteAppItem);if(_0x3cee0b[_0x229c0b(0x131)]&&typeof _0x3cee0b[_0x229c0b(0x131)]===_0x229c0b(0x158)){const _0x4c5bde=_0x3cee0b[_0x229c0b(0x131)];if(Array[_0x229c0b(0x16a)](_0x4c5bde[_0x229c0b(0x134)]))return _0x4c5bde[_0x229c0b(0x134)]['filter'](isRemoteAppItem);}throw CliErrors[_0x229c0b(0x16c)](_0x229c0b(0x11d));}export async function getMyApps(){const _0x389644=a74_0x1964,_0x43f2d6=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x43f2d6[_0x389644(0x131)]);}export async function getLoginUserInfo(){const _0x191bcc=a74_0x1964,_0x5abb23=await apiRequest(_0x191bcc(0x151));if(!_0x5abb23[_0x191bcc(0x131)]||typeof _0x5abb23[_0x191bcc(0x131)]!==_0x191bcc(0x158)||Array[_0x191bcc(0x16a)](_0x5abb23[_0x191bcc(0x131)]))throw CliErrors[_0x191bcc(0x16c)](_0x191bcc(0x119));return _0x5abb23[_0x191bcc(0x131)];}export async function listDatasets(_0x2982ea,_0x5b4140){const _0x19fedc=a74_0x1964,_0x13c6ea=await apiRequest(_0x19fedc(0x183),{'method':_0x19fedc(0x149),'body':{'appCode':_0x2982ea,..._0x5b4140?.[_0x19fedc(0x153)]&&{'code':_0x5b4140[_0x19fedc(0x153)]},..._0x5b4140?.['name']&&{'name':_0x5b4140['name']}}});return extractList(_0x13c6ea[_0x19fedc(0x131)]);}export async function getDatasetDetail(_0x53a2ba){const _0x5e9f72=a74_0x1964,_0x1b6ad8=await apiRequest(_0x5e9f72(0x196)+encodeURIComponent(_0x53a2ba));return _0x1b6ad8[_0x5e9f72(0x131)];}export async function getDatasetSdkUsageDoc(_0x3bda2c,_0x33c89){const _0x21857a=a74_0x1964,_0x54a345=await toolboxRequest(_0x21857a(0x122),{'datasetCode':_0x3bda2c,'appCode':_0x33c89});return typeof _0x54a345?.[_0x21857a(0x18e)]===_0x21857a(0x1a2)?_0x54a345[_0x21857a(0x18e)]:'';}export async function uploadRuntimeFile(_0x434c03,_0x6c03c0){const _0xc039ea=a74_0x1964,_0x4e0bce=await readFile(_0x6c03c0),_0x5d8922=new FormData();_0x5d8922[_0xc039ea(0x167)](_0xc039ea(0x11e),_0x434c03),_0x5d8922[_0xc039ea(0x167)](_0xc039ea(0x187),new Blob([new Uint8Array(_0x4e0bce)]),basename(_0x6c03c0));const _0x476a99=await apiFormRequest(_0xc039ea(0x166),_0x5d8922);return _0x476a99['data'];}export async function queryRuntimeFileUrl(_0x498ca2,_0x20749a={}){const _0x221b5e=a74_0x1964,_0x114e41=await apiRequest('/client/queryFileUrl',{'method':'POST','body':{'filePath':_0x498ca2,'downloadFlag':_0x20749a[_0x221b5e(0x142)]??![]}});return _0x114e41[_0x221b5e(0x131)];}export async function recognizeRuntimeOcr(_0x1927d,_0x3c60c7){const _0x53f408=a74_0x1964,_0x235f7b=await apiRequest('/client/ocr',{'method':_0x53f408(0x149),'body':{'appCode':_0x1927d,'url':_0x3c60c7[_0x53f408(0x17b)],'type':_0x3c60c7['type']}});return _0x235f7b[_0x53f408(0x131)];}export async function getRuntimeAppConfigByKey(_0x32e0eb,_0x1ddaea){const _0x976726=a74_0x1964,_0x580242=new URLSearchParams({'appCode':_0x32e0eb,'key':_0x1ddaea}),_0x9c32c8=await apiRequest(_0x976726(0x121)+_0x580242['toString']());if(!_0x9c32c8[_0x976726(0x131)])throw CliErrors[_0x976726(0x143)]('App\x20config\x20not\x20found:\x20key='+_0x1ddaea);return _0x9c32c8[_0x976726(0x131)];}export async function listRuntimeArtifacts(_0x5cec5e,_0xa38bd3){const _0x22aecb=a74_0x1964,_0x58c674=new URLSearchParams({'appCode':_0x5cec5e});if(_0xa38bd3?.[_0x22aecb(0x123)])_0x58c674[_0x22aecb(0x160)](_0x22aecb(0x123),_0xa38bd3[_0x22aecb(0x123)]);if(_0xa38bd3?.[_0x22aecb(0x11b)])_0x58c674[_0x22aecb(0x160)]('source',_0xa38bd3[_0x22aecb(0x11b)]);if(_0xa38bd3?.[_0x22aecb(0x19c)]!==undefined)_0x58c674[_0x22aecb(0x160)](_0x22aecb(0x19c),String(_0xa38bd3['favorite']));const _0x31be82=await apiRequest(_0x22aecb(0x14c)+_0x58c674['toString']());return Array[_0x22aecb(0x16a)](_0x31be82[_0x22aecb(0x131)])?_0x31be82[_0x22aecb(0x131)]:[];}export async function getRuntimeArtifact(_0xb7e00,_0x121e92){const _0x3721e4=a74_0x1964,_0x4c50a4=await apiRequest('/client/artifact/'+_0xb7e00+_0x3721e4(0x15f)+encodeURIComponent(_0x121e92));if(!_0x4c50a4[_0x3721e4(0x131)])throw CliErrors['validation']('Artifact\x20not\x20found:\x20id='+_0xb7e00);return _0x4c50a4[_0x3721e4(0x131)];}function a74_0x1964(_0x20b1c8,_0x4c7b66){_0x20b1c8=_0x20b1c8-0x119;const _0x440c53=a74_0x440c();let _0x1964c3=_0x440c53[_0x20b1c8];return _0x1964c3;}export async function createRuntimeArtifact(_0x375977,_0x497a78){const _0x19e83e=a74_0x1964,_0x8e5278=await apiRequest(_0x19e83e(0x15d),{'method':_0x19e83e(0x149),'body':{'appCode':_0x375977,..._0x497a78}});return _0x8e5278[_0x19e83e(0x131)];}export async function updateRuntimeArtifact(_0xf6f0c6,_0x522b6c,_0x17a723){const _0x3eaa4a=a74_0x1964,_0x48ba0b=await apiRequest(_0x3eaa4a(0x184)+_0xf6f0c6+'/update',{'method':'POST','body':{'appCode':_0x522b6c,..._0x17a723}});return _0x48ba0b[_0x3eaa4a(0x131)];}export async function listPersonalBffs(_0xa0603c){const _0x3e2957=a74_0x1964,_0x377d88=await apiRequest(_0x3e2957(0x18d)+encodeURIComponent(_0xa0603c));return Array[_0x3e2957(0x16a)](_0x377d88['data'])?_0x377d88['data']:[];}export async function getPersonalBff(_0x3fe333,_0x36ebb6){const _0x196763=a74_0x1964,_0xeb68bb=await apiRequest(_0x196763(0x11f)+_0x3fe333+_0x196763(0x15f)+encodeURIComponent(_0x36ebb6));if(!_0xeb68bb[_0x196763(0x131)])throw CliErrors[_0x196763(0x143)](_0x196763(0x12e)+_0x3fe333);return _0xeb68bb[_0x196763(0x131)];}export async function createPersonalBff(_0x181a12,_0x3ad804){const _0x473e2c=a74_0x1964,_0x344d0a=await apiRequest(_0x473e2c(0x18f),{'method':_0x473e2c(0x149),'body':{'appCode':_0x181a12,..._0x3ad804}});return _0x344d0a[_0x473e2c(0x131)];}export async function updatePersonalBff(_0x1fc776,_0x2b9f10,_0x195b1c){const _0xef0693=a74_0x1964,_0x254aae=await apiRequest(_0xef0693(0x11f)+_0x1fc776+'/update',{'method':_0xef0693(0x149),'body':{'appCode':_0x2b9f10,..._0x195b1c}});return _0x254aae['data'];}export async function executePersonalBff(_0x609e2a,_0x1fff39,_0x1f2eda){const _0x50f9d5=a74_0x1964,_0x26862c=await apiRequest(_0x50f9d5(0x11f)+_0x609e2a+'/execute?appCode='+encodeURIComponent(_0x1fff39),{'method':_0x50f9d5(0x149),'body':_0x1f2eda});return _0x26862c[_0x50f9d5(0x131)];}export async function listPersonalKnowledgeBaseItems(_0x334b36){const _0x29242b=a74_0x1964,_0xcb4a6e=await apiRequest(_0x29242b(0x139)+encodeURIComponent(_0x334b36));return Array['isArray'](_0xcb4a6e[_0x29242b(0x131)])?_0xcb4a6e[_0x29242b(0x131)]:[];}export async function getPersonalKnowledgeBaseItem(_0x3b30e5,_0x2cc85d){const _0x1e1d24=a74_0x1964,_0xdda36f=await apiRequest('/client/knowledge-base/personal/'+_0x3b30e5+_0x1e1d24(0x15f)+encodeURIComponent(_0x2cc85d));if(!_0xdda36f[_0x1e1d24(0x131)])throw CliErrors[_0x1e1d24(0x143)](_0x1e1d24(0x120)+_0x3b30e5);return _0xdda36f['data'];}export async function createPersonalKnowledgeBaseItem(_0x174ec6,_0x476697){const _0x47a4d6=a74_0x1964,_0x197c2d=await apiRequest(_0x47a4d6(0x19f),{'method':_0x47a4d6(0x149),'body':{'appCode':_0x174ec6,..._0x476697}});return _0x197c2d['data'];}export async function updatePersonalKnowledgeBaseItem(_0x8888fc,_0xfd8f14,_0x15dd48){const _0x19d825=a74_0x1964,_0xfd6f2f=await apiRequest(_0x19d825(0x162)+_0x8888fc+_0x19d825(0x19d),{'method':_0x19d825(0x149),'body':{'appCode':_0xfd8f14,..._0x15dd48}});return _0xfd6f2f[_0x19d825(0x131)];}export async function searchKnowledgeBase(_0x5d0fd8,_0x161fa8){const _0x282a01=a74_0x1964,_0x53442d=await apiRequest(_0x282a01(0x17f),{'method':'POST','body':{'appCode':_0x5d0fd8,'query':_0x161fa8['query'],..._0x161fa8[_0x282a01(0x12f)]!==undefined?{'topK':_0x161fa8[_0x282a01(0x12f)]}:{}}});return Array['isArray'](_0x53442d[_0x282a01(0x131)])?_0x53442d[_0x282a01(0x131)]:[];}export async function getRuntimeSkillByCode(_0x5c4dc9,_0x5cb1df){const _0x502de0=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x5c4dc9)+'/'+encodeURIComponent(_0x5cb1df),{'allowNotFound':!![]});return _0x502de0?skillHubRuntimeDetailToRuntimeSkill(_0x502de0):undefined;}export async function listRuntimeSkills(_0x2ac864){const _0x2f61b4=a74_0x1964,_0x5e1d3d=await skillHubJsonRequest(_0x2f61b4(0x13c)+encodeURIComponent(_0x2ac864[_0x2f61b4(0x11e)])+_0x2f61b4(0x15e),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x2ac864[_0x2f61b4(0x11e)],_0x5e1d3d,_0x2ac864[_0x2f61b4(0x1a3)]??_0x2f61b4(0x168),_0x2ac864[_0x2f61b4(0x153)]);}export async function listPersonalRuntimeSkills(_0x3aed3c){const _0x53aa88=a74_0x1964;return(await listRuntimeSkills({'appCode':_0x3aed3c,'scope':_0x53aa88(0x185)}))['personal'];}export async function listCompanyRuntimeSkills(_0x1b3e94){const _0x512f16=a74_0x1964;return(await listRuntimeSkills({'appCode':_0x1b3e94,'scope':_0x512f16(0x145)}))[_0x512f16(0x145)];}export async function listVisibleRuntimeSkills(_0x5e3781){const _0x1f38e1=a74_0x1964;return(await listRuntimeSkills({'appCode':_0x5e3781,'scope':'all'}))[_0x1f38e1(0x182)];}export async function createPersonalRuntimeSkill(_0x3e0258,_0x394146){return publishRuntimeSkill(_0x3e0258,_0x394146,{'visibility':'PRIVATE'});}export async function updatePersonalRuntimeSkill(_0x5e222c,_0x5e428c,_0x1eacdf){const _0x4a8cf8=a74_0x1964;return publishRuntimeSkill(_0x5e428c,{..._0x1eacdf,'skillCode':_0x1eacdf[_0x4a8cf8(0x125)]??_0x5e222c},{'visibility':_0x4a8cf8(0x13f)});}export async function publishCompanyRuntimeSkill(_0x11dedc,_0x594769,_0x5953c6={}){const _0x9f5c16=a74_0x1964;return publishRuntimeSkill(_0x11dedc,_0x594769,{'visibility':_0x9f5c16(0x19e),'confirmWarnings':_0x5953c6[_0x9f5c16(0x179)]});}export async function validateRuntimeSkillPublish(_0x4a6acf,_0x1d70a1,_0x41cb48){const _0x547c59=a74_0x1964,_0x3ab87a=buildRuntimeSkillPublishForm(_0x1d70a1,_0x41cb48[_0x547c59(0x12b)]),_0x3c31a9=await skillHubJsonRequest(_0x547c59(0x170)+encodeURIComponent(_0x4a6acf)+_0x547c59(0x141),{'method':_0x547c59(0x149),'body':_0x3ab87a});return{'valid':_0x3c31a9[_0x547c59(0x192)]===!![],'errors':Array[_0x547c59(0x16a)](_0x3c31a9[_0x547c59(0x17d)])?_0x3c31a9[_0x547c59(0x17d)]:[],'warnings':Array[_0x547c59(0x16a)](_0x3c31a9[_0x547c59(0x199)])?_0x3c31a9[_0x547c59(0x199)]:[],'resolvedSlug':_0x3c31a9[_0x547c59(0x15c)],'resolvedVersion':_0x3c31a9['resolvedVersion']};}export async function downloadRuntimeSkillPackage(_0xed7682,_0x110083,_0x1e254f,_0x1caa3a){const _0x558fed=a74_0x1964;void _0xed7682;const _0x13e9c4=_0x1caa3a?_0x558fed(0x170)+encodeURIComponent(_0x1e254f)+'/'+encodeURIComponent(_0x110083)+'/versions/'+encodeURIComponent(_0x1caa3a)+'/download':_0x558fed(0x170)+encodeURIComponent(_0x1e254f)+'/'+encodeURIComponent(_0x110083)+'/download';return skillHubBinaryRequest(_0x13e9c4);}function a74_0x440c(){const _0xc64e8d=['text','invokeSource','test','success','API\x20error\x20code:\x20','confirmWarnings','/client/sql/query','url','values','errors','Download\x20failed:\x20','/client/knowledge-base/search','content','application/json','effective','/client/dataset/list','/client/artifact/','personal','998405ySHkzY','file','appName','boolean','name','msg','SQL\x20query\x20not\x20found:\x20','/client/runtime-bff/personal/list?appCode=','markdown','/client/runtime-bff/personal/create','7271512kVDDNe','GET','valid','version','Request\x20timeout:\x20','filter','/client/dataset/get-driven-data?code=','Configure\x20accessKey\x20in\x20','AbortError','warnings','skill','22kQJqZI','favorite','/update','NAMESPACE_ONLY','/client/knowledge-base/personal/create','summary','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','string','scope','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','slug','source','/publish','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','appCode','/client/runtime-bff/personal/','Knowledge-base\x20entry\x20not\x20found:\x20id=','/client/app-config/getByKey?','api-doc-generator','artifactType','errorMsg','skillCode','message','Missing\x20Skill\x20package\x20payload.','json','items','application/octet-stream','visibility','authRequired','namespace','Personal\x20BFF\x20not\x20found:\x20id=','topK','displayName','data','tags','skillName','tableData','newConfigFileName','19016bZWcdA','base64','3626276iZnwSC','/client/knowledge-base/personal/list?appCode=','.zip','signal','/api/runtime/v1/namespaces/','SkillHub\x20API\x20error:\x20','trim','PRIVATE','232092jZzHYn','/publish/validate','download','validation','map','company','ownerPreviewVersion','description','sqlCode','POST','searchParams','Check\x20your\x20credentials\x20and\x20try\x20again.','/client/artifact/list?','from','application/zip','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','toString','/client/user/loginUserInfo','6587707fELHEM','code','795780UMtpKy','packageBase64','number','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','object','errorCode','entries','abort','resolvedSlug','/client/artifact/create','/skills','?appCode=','set','API\x20error:\x20','/client/knowledge-base/personal/','status','stringify','BFF\x20script\x20not\x20found:\x20id=','/client/uploadFile','append','all','toLowerCase','isArray','arrayBuffer','apiError','170qOMzhi','join','30iDNitn','/api/cli/v1/skills/','replace','Toolbox\x20error\x20code:\x20','SkillHub\x20error\x20code:\x20'];a74_0x440c=function(){return _0xc64e8d;};return a74_0x440c();}async function publishRuntimeSkill(_0x620c29,_0x2abeea,_0x14a7d3){const _0x3bc877=a74_0x1964,_0x3fcb18=buildRuntimeSkillPublishForm(_0x2abeea,_0x14a7d3[_0x3bc877(0x12b)]),_0x26f3eb=await skillHubJsonRequest(_0x3bc877(0x170)+encodeURIComponent(_0x620c29)+_0x3bc877(0x11c),{'method':'POST','query':{'confirmWarnings':_0x14a7d3['confirmWarnings']===!![]?!![]:undefined},'body':_0x3fcb18});return{'appCode':_0x26f3eb[_0x3bc877(0x12d)]??_0x620c29,'skillCode':_0x26f3eb[_0x3bc877(0x11a)]??_0x2abeea[_0x3bc877(0x125)]??'','skillName':_0x2abeea[_0x3bc877(0x133)]??_0x26f3eb['slug']??_0x2abeea[_0x3bc877(0x125)],'description':_0x2abeea[_0x3bc877(0x147)],'scope':skillHubVisibilityToScope(_0x26f3eb[_0x3bc877(0x12b)]??_0x14a7d3['visibility'])??_0x3bc877(0x185),'version':_0x26f3eb['version']??_0x2abeea['version'],'tags':_0x2abeea[_0x3bc877(0x132)],'content':_0x2abeea[_0x3bc877(0x180)]};}function buildRuntimeSkillPublishForm(_0x2c271a,_0x3b347b){const _0x598ea=a74_0x1964,_0x23dc76=new FormData();return _0x23dc76[_0x598ea(0x160)](_0x598ea(0x187),runtimeSkillPackageFile(_0x2c271a)),_0x2c271a['skillName']?.[_0x598ea(0x13e)]()&&_0x23dc76[_0x598ea(0x160)]('displayName',_0x2c271a[_0x598ea(0x133)][_0x598ea(0x13e)]()),_0x23dc76[_0x598ea(0x160)](_0x598ea(0x12b),_0x3b347b),_0x23dc76;}function runtimeSkillPackageFile(_0x515079){const _0xfa78a3=a74_0x1964;if(!_0x515079[_0xfa78a3(0x155)])throw CliErrors[_0xfa78a3(0x143)](_0xfa78a3(0x127));const _0x5f06b8=Buffer['from'](_0x515079[_0xfa78a3(0x155)],_0xfa78a3(0x137)),_0x1753c2=new Blob([_0x5f06b8],{'type':_0xfa78a3(0x14e)}),_0x2726db=(_0x515079[_0xfa78a3(0x125)]||_0xfa78a3(0x19a))+_0xfa78a3(0x13a);if(typeof File!=='undefined')return new File([_0x1753c2],_0x2726db,{'type':_0xfa78a3(0x14e)});return _0x1753c2;}function normalizeSkillHubRuntimeListResponse(_0x91f65c,_0x3fc8eb,_0x507cd8,_0x580b14){const _0x450140=a74_0x1964,_0x4da067=Array[_0x450140(0x16a)](_0x3fc8eb)?_0x3fc8eb:Array[_0x450140(0x16a)](_0x3fc8eb?.[_0x450140(0x129)])?_0x3fc8eb['items']:[],_0x12baa8=_0x580b14?.[_0x450140(0x13e)](),_0x465471=_0x4da067['filter'](_0x17b191=>!_0x12baa8||_0x17b191['slug']===_0x12baa8)[_0x450140(0x144)](skillHubRuntimeItemToRuntimeSkill)['filter'](_0xfcd4b2=>Boolean(_0xfcd4b2)),_0xbf03fc=_0x465471[_0x450140(0x195)](_0x2fb516=>_0x2fb516[_0x450140(0x1a3)]==='personal'),_0x3b6f4b=_0x465471[_0x450140(0x195)](_0x54db44=>_0x54db44['scope']===_0x450140(0x145));return{'appCode':_0x91f65c,'personal':_0x507cd8===_0x450140(0x145)?[]:_0xbf03fc,'company':_0x507cd8===_0x450140(0x185)?[]:_0x3b6f4b,'effective':buildEffectiveRuntimeSkills(_0xbf03fc,_0x3b6f4b,_0x507cd8)};}function skillHubRuntimeItemToRuntimeSkill(_0x158795){const _0x359ffe=a74_0x1964,_0x3596f4=_0x158795[_0x359ffe(0x11a)]?.[_0x359ffe(0x13e)](),_0x2414c1=skillHubVisibilityToScope(_0x158795[_0x359ffe(0x12b)]);if(!_0x3596f4||!_0x2414c1)return undefined;return{'id':_0x158795['id'],'appCode':_0x158795[_0x359ffe(0x12d)],'skillCode':_0x3596f4,'skillName':_0x158795[_0x359ffe(0x130)]??_0x3596f4,'description':_0x158795[_0x359ffe(0x1a0)],'scope':_0x2414c1,'version':skillHubRuntimeItemVersion(_0x158795),'status':_0x158795[_0x359ffe(0x163)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x1ced44){const _0x288fdf=a74_0x1964,_0x411fe4=_0x1ced44['slug']?.[_0x288fdf(0x13e)]();if(!_0x411fe4)return undefined;return{'id':_0x1ced44['id'],'appCode':_0x1ced44[_0x288fdf(0x12d)],'skillCode':_0x411fe4,'skillName':_0x1ced44[_0x288fdf(0x130)]??_0x411fe4,'description':_0x1ced44[_0x288fdf(0x1a0)],'scope':skillHubVisibilityToScope(_0x1ced44[_0x288fdf(0x12b)])??_0x1ced44[_0x288fdf(0x12b)]?.[_0x288fdf(0x169)](),'version':skillHubRuntimeItemVersion(_0x1ced44),'status':_0x1ced44['status']};}function skillHubVisibilityToScope(_0x2264b7){const _0x24f78d=a74_0x1964;if(_0x2264b7==='PRIVATE')return _0x24f78d(0x185);if(_0x2264b7===_0x24f78d(0x19e))return'company';return undefined;}function skillHubRuntimeItemVersion(_0x4bd7fd){const _0x4d7a04=a74_0x1964;return _0x4bd7fd['publishedVersion']?.[_0x4d7a04(0x193)]??_0x4bd7fd['headlineVersion']?.[_0x4d7a04(0x193)]??_0x4bd7fd[_0x4d7a04(0x146)]?.['version'];}function buildEffectiveRuntimeSkills(_0x2a9579,_0xb68cee,_0xe1e4d5){const _0x5cfd2a=a74_0x1964;if(_0xe1e4d5===_0x5cfd2a(0x185))return _0x2a9579;if(_0xe1e4d5===_0x5cfd2a(0x145))return _0xb68cee;const _0x1aa39c=new Map();for(const _0x1ec6ee of _0xb68cee){_0x1aa39c[_0x5cfd2a(0x160)](_0x1ec6ee[_0x5cfd2a(0x125)],_0x1ec6ee);}for(const _0x4ea06d of _0x2a9579){_0x1aa39c[_0x5cfd2a(0x160)](_0x4ea06d[_0x5cfd2a(0x125)],_0x4ea06d);}return Array[_0x5cfd2a(0x14d)](_0x1aa39c[_0x5cfd2a(0x17c)]());}function normalizeRuntimeSkillListResponse(_0x295838,_0x1b0149){const _0x18ff1c=a74_0x1964;if(Array[_0x18ff1c(0x16a)](_0x1b0149)){const _0x47e748=_0x1b0149[_0x18ff1c(0x195)](_0x4add37=>_0x4add37[_0x18ff1c(0x1a3)]===_0x18ff1c(0x185)),_0x15f9d8=_0x1b0149[_0x18ff1c(0x195)](_0x456f2f=>_0x456f2f[_0x18ff1c(0x1a3)]===_0x18ff1c(0x145));return{'appCode':_0x295838,'personal':_0x47e748,'company':_0x15f9d8,'effective':[..._0x15f9d8,..._0x47e748]};}return{'appCode':_0x1b0149?.[_0x18ff1c(0x11e)]??_0x295838,'personal':Array[_0x18ff1c(0x16a)](_0x1b0149?.[_0x18ff1c(0x185)])?_0x1b0149[_0x18ff1c(0x185)]:[],'company':Array['isArray'](_0x1b0149?.[_0x18ff1c(0x145)])?_0x1b0149[_0x18ff1c(0x145)]:[],'effective':Array[_0x18ff1c(0x16a)](_0x1b0149?.[_0x18ff1c(0x182)])?_0x1b0149[_0x18ff1c(0x182)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x24219e,_0x384d23){const _0x4b9184=a75_0xe124,_0x386a21=_0x24219e();while(!![]){try{const _0x218b2b=parseInt(_0x4b9184(0x1d1))/0x1+-parseInt(_0x4b9184(0x1d3))/0x2*(parseInt(_0x4b9184(0x1de))/0x3)+-parseInt(_0x4b9184(0x1dd))/0x4+-parseInt(_0x4b9184(0x1da))/0x5*(-parseInt(_0x4b9184(0x1ce))/0x6)+-parseInt(_0x4b9184(0x1d9))/0x7+-parseInt(_0x4b9184(0x1d5))/0x8*(parseInt(_0x4b9184(0x1d8))/0x9)+parseInt(_0x4b9184(0x1d0))/0xa*(parseInt(_0x4b9184(0x1d7))/0xb);if(_0x218b2b===_0x384d23)break;else _0x386a21['push'](_0x386a21['shift']());}catch(_0x4591f3){_0x386a21['push'](_0x386a21['shift']());}}}(a75_0x3730,0x1c575));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x21248f){const _0x161b6b=a75_0xe124;if(cache[_0x161b6b(0x1db)](_0x21248f))return cache[_0x161b6b(0x1dc)](_0x21248f);const _0x205df8=await listDatasets(_0x21248f),_0x160e63=new Map();for(const _0x36c831 of _0x205df8){const _0xd07beb=_0x36c831['dbtableConfig'];_0xd07beb?.[_0x161b6b(0x1d4)]!=null&&_0x160e63[_0x161b6b(0x1d2)](_0xd07beb[_0x161b6b(0x1d4)],_0xd07beb['dbName']??'db-'+_0xd07beb['dbId']);}const _0xd1692a=[..._0x160e63['entries']()]['map'](([_0x2f3f99,_0x149933])=>({'dbId':_0x2f3f99,'dbName':_0x149933}));return cache[_0x161b6b(0x1d2)](_0x21248f,_0xd1692a),_0xd1692a;}function a75_0x3730(){const _0x57347e=['find','11GLuERP','1854cqjpJG','288932MjBOBg','10DFfPKX','has','get','509676jtQjTg','1701UPbspE','442302PCyAsb','dbName','3081110cONquk','98012KOdkDW','set','406pyEWyN','dbId','5968GMAJWj'];a75_0x3730=function(){return _0x57347e;};return a75_0x3730();}function a75_0xe124(_0x228201,_0x1caaad){_0x228201=_0x228201-0x1ce;const _0x37303f=a75_0x3730();let _0xe12483=_0x37303f[_0x228201];return _0xe12483;}export async function getDbName(_0x4aa61b,_0x104ba0){const _0x19490b=a75_0xe124;try{const _0x515c7c=await listDatabases(_0x4aa61b);return _0x515c7c[_0x19490b(0x1d6)](_0x7cc668=>_0x7cc668['dbId']===_0x104ba0)?.[_0x19490b(0x1cf)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18a09a,_0x592479){const _0x434c4b=a76_0x3646,_0x383473=_0x18a09a();while(!![]){try{const _0x2b046f=-parseInt(_0x434c4b(0x138))/0x1+parseInt(_0x434c4b(0x139))/0x2+-parseInt(_0x434c4b(0x14c))/0x3+parseInt(_0x434c4b(0x14d))/0x4*(parseInt(_0x434c4b(0x13c))/0x5)+-parseInt(_0x434c4b(0x15a))/0x6+parseInt(_0x434c4b(0x13e))/0x7*(-parseInt(_0x434c4b(0x14a))/0x8)+parseInt(_0x434c4b(0x141))/0x9*(parseInt(_0x434c4b(0x152))/0xa);if(_0x2b046f===_0x592479)break;else _0x383473['push'](_0x383473['shift']());}catch(_0x175a4c){_0x383473['push'](_0x383473['shift']());}}}(a76_0x414b,0x83642));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';function a76_0x414b(){const _0x4f51ea=['invokeSource','6104ltmTAk','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','batchCreate','324SwHwtM','models','map','object','validation','appCode','aggregate','\x22.\x20','data\x20aggregate\x20--params.aggregate[','40XOEztG','delete','714453WmHJmf','892sNeAvl','function','env','trim','getOne','77800tXThXu','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','field','update','accessKey','authMode','isArray','2849496VAJfSv','106808CYparL','1178560CKjcxS','execute','sql','11055GTtGlh'];a76_0x414b=function(){return _0x4f51ea;};return a76_0x414b();}let _client;export function initSdkClient(_0x161243){const _0x2c1d67=a76_0x3646;_client=createClient({'appCode':_0x161243[_0x2c1d67(0x146)],'env':_0x161243[_0x2c1d67(0x14f)],'authMode':_0x161243[_0x2c1d67(0x158)],..._0x161243[_0x2c1d67(0x157)]?{'accessKey':_0x161243[_0x2c1d67(0x157)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x2c1d67(0x13d)]}}});}function ensureClient(){if(!_client)throw new Error('SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.');return _client;}function normalizeAggregateParams(_0x1701ad){const _0x32f9de=a76_0x3646,_0x4c4103=_0x1701ad[_0x32f9de(0x147)];if(_0x4c4103===undefined)return _0x1701ad;if(!Array[_0x32f9de(0x159)](_0x4c4103))throw CliErrors[_0x32f9de(0x145)]('data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.');return{..._0x1701ad,'aggregate':_0x4c4103[_0x32f9de(0x143)]((_0x3d41d6,_0x5066eb)=>{const _0x965c80=_0x32f9de;if(!_0x3d41d6||typeof _0x3d41d6!==_0x965c80(0x144)||Array[_0x965c80(0x159)](_0x3d41d6))throw CliErrors[_0x965c80(0x145)]('data\x20aggregate\x20--params.aggregate['+_0x5066eb+']\x20must\x20be\x20an\x20object.');const _0x330214=_0x3d41d6['column']??_0x3d41d6[_0x965c80(0x155)];if(typeof _0x330214!=='string'||_0x330214[_0x965c80(0x150)]()==='')throw CliErrors['validation'](_0x965c80(0x149)+_0x5066eb+']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.');const _0x503934={..._0x3d41d6,'column':_0x330214};return delete _0x503934[_0x965c80(0x155)],_0x503934;})};}function a76_0x3646(_0x12fa15,_0x409da7){_0x12fa15=_0x12fa15-0x138;const _0x414b05=a76_0x414b();let _0x364613=_0x414b05[_0x12fa15];return _0x364613;}export async function executeData(_0x262e6a,_0x779acf,_0x5f0cb9){const _0x4a3fa2=a76_0x3646,_0x111c8a=ensureClient(),_0x52b28a='dataset_'+_0x262e6a,_0x3c9856=_0x111c8a[_0x4a3fa2(0x142)][_0x52b28a];if(!_0x3c9856||typeof _0x3c9856[_0x779acf]!==_0x4a3fa2(0x14e))throw new Error('SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22'+_0x779acf+_0x4a3fa2(0x148)+_0x4a3fa2(0x154));if(_0x779acf===_0x4a3fa2(0x140))return _0x3c9856[_0x4a3fa2(0x140)](parseBatchCreateItemsFromParams(_0x5f0cb9));const _0x505369=_0x5f0cb9!==undefined&&_0x5f0cb9!==null&&!Array[_0x4a3fa2(0x159)](_0x5f0cb9)?_0x5f0cb9:{};switch(_0x779acf){case _0x4a3fa2(0x151):{const _0x2302e1=_0x505369['id'];if(_0x2302e1===undefined||_0x2302e1===null)throw new Error('getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x3c9856['getOne'](_0x2302e1);}case _0x4a3fa2(0x156):{const {id:_0x2fd062,..._0x1e0baa}=_0x505369;if(_0x2fd062===undefined||_0x2fd062===null)throw new Error(_0x4a3fa2(0x153));return _0x3c9856[_0x4a3fa2(0x156)](_0x2fd062,_0x1e0baa);}case'delete':{const _0x270c21=_0x505369['id'];if(_0x270c21===undefined||_0x270c21===null)throw new Error(_0x4a3fa2(0x13f));return _0x3c9856[_0x4a3fa2(0x14b)](_0x270c21);}case _0x4a3fa2(0x147):return _0x3c9856[_0x4a3fa2(0x147)](normalizeAggregateParams(_0x505369));default:return _0x3c9856[_0x779acf](_0x505369);}}export async function executeSdkSql(_0x2e4825,_0x1b819){const _0x2e3a24=a76_0x3646,_0x4d82b2=ensureClient();return _0x4d82b2[_0x2e3a24(0x13b)][_0x2e3a24(0x13a)]({'sqlCode':_0x2e4825,'params':_0x1b819});}export async function executeSdkBff(_0x32493b,_0x269d1b){const _0x1dbfa5=a76_0x3646,_0x4e19e6=ensureClient();return _0x4e19e6['bff'][_0x1dbfa5(0x13a)]({'scriptName':_0x32493b,'params':_0x269d1b});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0x27ad15=a77_0x2a9d;(function(_0x7ac84c,_0x4db834){const _0x34b2cf=a77_0x2a9d,_0x2be61d=_0x7ac84c();while(!![]){try{const _0x535675=-parseInt(_0x34b2cf(0x1d6))/0x1+-parseInt(_0x34b2cf(0x1cc))/0x2*(-parseInt(_0x34b2cf(0x1d9))/0x3)+-parseInt(_0x34b2cf(0x1d2))/0x4+-parseInt(_0x34b2cf(0x1d4))/0x5*(-parseInt(_0x34b2cf(0x1ca))/0x6)+parseInt(_0x34b2cf(0x1d3))/0x7*(-parseInt(_0x34b2cf(0x1da))/0x8)+parseInt(_0x34b2cf(0x1ce))/0x9*(-parseInt(_0x34b2cf(0x1cd))/0xa)+parseInt(_0x34b2cf(0x1d1))/0xb;if(_0x535675===_0x4db834)break;else _0x2be61d['push'](_0x2be61d['shift']());}catch(_0x21565a){_0x2be61d['push'](_0x2be61d['shift']());}}}(a77_0x505b,0xb6170));import{CliError,createCliErrors}from'@lovrabet/cli-framework';function a77_0x2a9d(_0xb6cdc8,_0x4a318e){_0xb6cdc8=_0xb6cdc8-0x1ca;const _0x505b55=a77_0x505b();let _0x2a9de3=_0x505b55[_0xb6cdc8];return _0x2a9de3;}import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';function a77_0x505b(){const _0x254d1e=['683977tuDrfZ','157905HVhyeo','newConfigFileName','507772eLWJBQ','\x20auth\x20login`.','\x20or\x20run\x20`','3VEIUfp','104kuyinR','210QwqzpH','Set\x20appcode\x20via\x20--appcode\x20or\x20','2449446VVOqzS','18770lbQMEl','4959PwshmW','\x20file.','Configure\x20accessKey\x20in\x20','21102906LxKlvK','2761688TarDsL'];a77_0x505b=function(){return _0x254d1e;};return a77_0x505b();}export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a77_0x27ad15(0x1d0)+PRODUCT_CONFIG[a77_0x27ad15(0x1d5)]+a77_0x27ad15(0x1d8)+CLI_BIN_NAME+a77_0x27ad15(0x1d7),'configMissingHint':a77_0x27ad15(0x1cb)+PRODUCT_CONFIG['newConfigFileName']+'.','notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20'+PRODUCT_CONFIG[a77_0x27ad15(0x1d5)]+a77_0x27ad15(0x1cf)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a78_0x4865(_0x157f06,_0x4ce887){_0x157f06=_0x157f06-0x1b7;var _0x102aef=a78_0x102a();var _0x4865a5=_0x102aef[_0x157f06];return _0x4865a5;}(function(_0x1fcb70,_0x564587){var _0xac57f9=a78_0x4865,_0x4ec1cc=_0x1fcb70();while(!![]){try{var _0x15627e=parseInt(_0xac57f9(0x1bc))/0x1*(parseInt(_0xac57f9(0x1c0))/0x2)+-parseInt(_0xac57f9(0x1be))/0x3+parseInt(_0xac57f9(0x1b8))/0x4+-parseInt(_0xac57f9(0x1bd))/0x5+parseInt(_0xac57f9(0x1bf))/0x6*(parseInt(_0xac57f9(0x1bb))/0x7)+-parseInt(_0xac57f9(0x1ba))/0x8*(-parseInt(_0xac57f9(0x1b9))/0x9)+-parseInt(_0xac57f9(0x1b7))/0xa;if(_0x15627e===_0x564587)break;else _0x4ec1cc['push'](_0x4ec1cc['shift']());}catch(_0x26940b){_0x4ec1cc['push'](_0x4ec1cc['shift']());}}}(a78_0x102a,0x1b56d));function a78_0x102a(){var _0x5daeab=['2528PEEABN','84049wvGIKF','58dSgAfM','778505mKCyQv','520143tgGxwz','96AzFUCV','7274ClgXXw','2711420VTaGKs','642508CjZTzy','4230NKIVFO'];a78_0x102a=function(){return _0x5daeab;};return a78_0x102a();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a78_0x2e9d39}from'@lovrabet/cli-framework';export function buildAllFlags(_0x39838d){return a78_0x2e9d39(_0x39838d,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3cf084,_0x1209ba){const _0x5597a9=a79_0x4318,_0x46c586=_0x3cf084();while(!![]){try{const _0x2d933a=parseInt(_0x5597a9(0x168))/0x1+-parseInt(_0x5597a9(0x166))/0x2*(parseInt(_0x5597a9(0x163))/0x3)+parseInt(_0x5597a9(0x165))/0x4+parseInt(_0x5597a9(0x15e))/0x5+parseInt(_0x5597a9(0x160))/0x6+parseInt(_0x5597a9(0x167))/0x7+parseInt(_0x5597a9(0x164))/0x8*(-parseInt(_0x5597a9(0x15f))/0x9);if(_0x2d933a===_0x1209ba)break;else _0x46c586['push'](_0x46c586['shift']());}catch(_0x1fb678){_0x46c586['push'](_0x46c586['shift']());}}}(a79_0x339c,0xd722a));function a79_0x4318(_0x955969,_0x4e73af){_0x955969=_0x955969-0x15e;const _0x339c3b=a79_0x339c();let _0x431821=_0x339c3b[_0x955969];return _0x431821;}function a79_0x339c(){const _0x9d1aee=['27OeZFrx','51328YHQitK','4759368mRKqMF','238006DixAfF','455385fKnpMc','1628238bpfreL','7941350cnbqaa','3771ADYrmX','1014720XqQSfM','body','description'];a79_0x339c=function(){return _0x9d1aee;};return a79_0x339c();}export function dryRun(_0x45c02f,_0x2af362){const _0x55ad54={'method':_0x45c02f,'url':_0x2af362},_0x53b447={'body'(_0xb60b75){const _0x52fb06=a79_0x4318;return _0x55ad54[_0x52fb06(0x161)]=_0xb60b75,_0x53b447;},'description'(_0x2448f3){const _0x24e557=a79_0x4318;return _0x55ad54[_0x24e557(0x162)]=_0x2448f3,_0x53b447;},'build'(){return{..._0x55ad54};}};return _0x53b447;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a80_0x3833(){const _0x39916a=['validateFlags','parseFlags','140774ovnnpo','1669720TYpegB','125816CQLOrv','7PpotLS','3MWpgNP','985236HMbDsO','66gPNPvD','250346uUTeXO','102155vBYHke','18zskohu','8918525EFXsjI'];a80_0x3833=function(){return _0x39916a;};return a80_0x3833();}const a80_0x15c8b0=a80_0x5252;function a80_0x5252(_0x11e5f4,_0x247d9d){_0x11e5f4=_0x11e5f4-0xf4;const _0x383312=a80_0x3833();let _0x52524e=_0x383312[_0x11e5f4];return _0x52524e;}(function(_0xceb983,_0x2e2e37){const _0x1a6cbc=a80_0x5252,_0x19ba8d=_0xceb983();while(!![]){try{const _0x258230=parseInt(_0x1a6cbc(0xf4))/0x1+-parseInt(_0x1a6cbc(0xfa))/0x2*(parseInt(_0x1a6cbc(0xfe))/0x3)+parseInt(_0x1a6cbc(0xff))/0x4+-parseInt(_0x1a6cbc(0xf5))/0x5*(-parseInt(_0x1a6cbc(0x100))/0x6)+-parseInt(_0x1a6cbc(0xfd))/0x7*(-parseInt(_0x1a6cbc(0xfc))/0x8)+-parseInt(_0x1a6cbc(0xf6))/0x9*(-parseInt(_0x1a6cbc(0xfb))/0xa)+-parseInt(_0x1a6cbc(0xf7))/0xb;if(_0x258230===_0x2e2e37)break;else _0x19ba8d['push'](_0x19ba8d['shift']());}catch(_0x5c3c6f){_0x19ba8d['push'](_0x19ba8d['shift']());}}}(a80_0x3833,0x2e5d1));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a80_0x15c8b0(0xf9)];export const validateFlags=helpers[a80_0x15c8b0(0xf8)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d50ea,_0x341958){const _0x3d4374=a81_0x1609,_0x32cb6a=_0x1d50ea();while(!![]){try{const _0x558373=-parseInt(_0x3d4374(0xaf))/0x1*(parseInt(_0x3d4374(0xb2))/0x2)+-parseInt(_0x3d4374(0xb1))/0x3+-parseInt(_0x3d4374(0xa8))/0x4*(parseInt(_0x3d4374(0xb5))/0x5)+-parseInt(_0x3d4374(0xa7))/0x6+-parseInt(_0x3d4374(0xa6))/0x7*(-parseInt(_0x3d4374(0xae))/0x8)+parseInt(_0x3d4374(0xa0))/0x9*(-parseInt(_0x3d4374(0xad))/0xa)+parseInt(_0x3d4374(0xb0))/0xb;if(_0x558373===_0x341958)break;else _0x32cb6a['push'](_0x32cb6a['shift']());}catch(_0x25a8f9){_0x32cb6a['push'](_0x32cb6a['shift']());}}}(a81_0x1b5c,0x582a8));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a81_0x1b5c(){const _0x51919f=['\x20or\x20--appcode).','newConfigFileName','has','718850jvWPmi','4098456cPOqRc','10CrPAjO','17354469GtAwgS','765021TkVrOY','97256hiWofL','service','generateServiceHelp','2275nBBnJA','9hTedsF','generateCommandHelp','map','get','Requires\x20appcode\x20(set\x20via\x20','filter','7CYUJPF','2510226NmRFyN','4372pVYlFk','generateFullHelp'];a81_0x1b5c=function(){return _0x51919f;};return a81_0x1b5c();}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 createGenerators(){const _0x47566c=a81_0x1609;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(serviceRegistry,safeListDynamicServiceEntries()),'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x47566c(0xa4)+PRODUCT_CONFIG[_0x47566c(0xab)]+_0x47566c(0xaa)});}export function generateCommandHelp(_0x13d1cd){const _0x80f52a=a81_0x1609;return createGenerators()[_0x80f52a(0xa1)](_0x13d1cd);}export function generateServiceHelp(_0xf0eca6){const _0xe343d0=a81_0x1609;return createGenerators()[_0xe343d0(0xb4)](_0xf0eca6);}function a81_0x1609(_0x4e3257,_0x4d23a2){_0x4e3257=_0x4e3257-0xa0;const _0x1b5c6a=a81_0x1b5c();let _0x160998=_0x1b5c6a[_0x4e3257];return _0x160998;}export function generateFullHelp(){const _0x27f6df=a81_0x1609;return createGenerators()[_0x27f6df(0xa9)]();}function getAnyServiceEntry(_0x1665f1){const _0x81df7d=getServiceEntry(_0x1665f1);if(_0x81df7d)return _0x81df7d;try{return getDynamicServiceEntry(_0x1665f1);}catch{return undefined;}}function getAnyServiceDefinitions(_0x2bb072){const _0x5a66d1=a81_0x1609,_0xa0d792=serviceGroups[_0x5a66d1(0xa3)](_0x2bb072);if(_0xa0d792)return _0xa0d792;try{return getDynamicServiceDefinitions(_0x2bb072);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x5c14f3=a81_0x1609,_0x3b07c7=new Set(serviceRegistry[_0x5c14f3(0xa2)](_0x429354=>_0x429354[_0x5c14f3(0xb3)]));try{return listDynamicServiceEntries()[_0x5c14f3(0xa5)](_0x335a74=>!_0x3b07c7[_0x5c14f3(0xac)](_0x335a74[_0x5c14f3(0xb3)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18fdb7,_0x1d2762){var _0x458672=a82_0x59f7,_0xebdb0=_0x18fdb7();while(!![]){try{var _0x202d57=-parseInt(_0x458672(0x133))/0x1+parseInt(_0x458672(0x12d))/0x2*(parseInt(_0x458672(0x12e))/0x3)+-parseInt(_0x458672(0x12f))/0x4*(-parseInt(_0x458672(0x130))/0x5)+parseInt(_0x458672(0x12b))/0x6*(parseInt(_0x458672(0x131))/0x7)+parseInt(_0x458672(0x134))/0x8+parseInt(_0x458672(0x132))/0x9+-parseInt(_0x458672(0x12c))/0xa;if(_0x202d57===_0x1d2762)break;else _0xebdb0['push'](_0xebdb0['shift']());}catch(_0x1d782b){_0xebdb0['push'](_0xebdb0['shift']());}}}(a82_0x47a7,0x18f36));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 a82_0x59f7(_0x4965d2,_0x374a6a){_0x4965d2=_0x4965d2-0x12b;var _0x47a7c0=a82_0x47a7();var _0x59f70f=_0x47a7c0[_0x4965d2];return _0x59f70f;}export{riskLevelOrder,isValidFormat}from'../framework/types.js';function a82_0x47a7(){var _0x5f2a14=['70468oCnVfX','20JGInXF','700LcdZiu','1190790suyXBG','188847DPNVNc','1470544UvEPbX','1878HkMdRV','1445990sXPGqg','1044jryCdE','102NPokwO'];a82_0x47a7=function(){return _0x5f2a14;};return a82_0x47a7();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4eee85,_0x50161d){const _0x5b8d98=a83_0x4ad6,_0x435c33=_0x4eee85();while(!![]){try{const _0x2cd7cc=parseInt(_0x5b8d98(0x14b))/0x1*(parseInt(_0x5b8d98(0x147))/0x2)+-parseInt(_0x5b8d98(0x144))/0x3*(-parseInt(_0x5b8d98(0x14f))/0x4)+parseInt(_0x5b8d98(0x149))/0x5*(-parseInt(_0x5b8d98(0x143))/0x6)+-parseInt(_0x5b8d98(0x146))/0x7+parseInt(_0x5b8d98(0x151))/0x8+-parseInt(_0x5b8d98(0x148))/0x9*(-parseInt(_0x5b8d98(0x14a))/0xa)+-parseInt(_0x5b8d98(0x142))/0xb;if(_0x2cd7cc===_0x50161d)break;else _0x435c33['push'](_0x435c33['shift']());}catch(_0x52d0f2){_0x435c33['push'](_0x435c33['shift']());}}}(a83_0x57fc,0x496b0));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a83_0x4ad6(_0x2c9304,_0x164f75){_0x2c9304=_0x2c9304-0x142;const _0x57fcc9=a83_0x57fc();let _0x4ad68b=_0x57fcc9[_0x2c9304];return _0x4ad68b;}import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});function a83_0x57fc(){const _0x37fc85=['6467967XVumaG','3095292GstRab','15SuPnYg','format','363566PtAauh','695146SwpCxO','9XLQktR','5rhhmNX','4220150XUydAJ','1aeOMbX','_notice','update','pretty','276856DtHLXN','message','2727032OAnODB'];a83_0x57fc=function(){return _0x37fc85;};return a83_0x57fc();}export function formatOutput(_0x22dcab,_0x5b12c4){const _0x4eab80=a83_0x4ad6,_0x3ff27e=_0x22dcab[_0x4eab80(0x14c)],{_notice:_0x1b62d7,..._0xd8a4fb}=_0x22dcab;void _0x1b62d7,baseFormatOutput(_0xd8a4fb,_0x5b12c4),_0x5b12c4[_0x4eab80(0x145)]===_0x4eab80(0x14e)&&printPrettyNotice(_0x3ff27e);}function printPrettyNotice(_0x5bee58){const _0x3ba1e1=a83_0x4ad6;if(!_0x5bee58?.[_0x3ba1e1(0x14d)])return;console['error'](_0x5bee58[_0x3ba1e1(0x14d)][_0x3ba1e1(0x150)]+'\x20('+_0x5bee58[_0x3ba1e1(0x14d)]['url']+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x596e24,_0x4782f9){const _0x290244=a84_0x2b52,_0x4d6979=_0x596e24();while(!![]){try{const _0x427859=-parseInt(_0x290244(0x1c9))/0x1+parseInt(_0x290244(0x1c2))/0x2*(parseInt(_0x290244(0x1c5))/0x3)+parseInt(_0x290244(0x1d6))/0x4+parseInt(_0x290244(0x1d9))/0x5*(parseInt(_0x290244(0x1df))/0x6)+parseInt(_0x290244(0x1c0))/0x7+parseInt(_0x290244(0x1c7))/0x8*(-parseInt(_0x290244(0x1bf))/0x9)+parseInt(_0x290244(0x1bc))/0xa*(-parseInt(_0x290244(0x1da))/0xb);if(_0x427859===_0x4782f9)break;else _0x4d6979['push'](_0x4d6979['shift']());}catch(_0xf18fbe){_0x4d6979['push'](_0x4d6979['shift']());}}}(a84_0x3ec6,0x9f21e));function toKebab(_0xdbad2b){const _0x197c87=a84_0x2b52;return _0xdbad2b['replace'](/_/g,'-')['replace'](/-([A-Z]+)/g,(_0x2b016e,_0x438c43)=>'-'+_0x438c43['toLowerCase']())[_0x197c87(0x1b8)](/([a-z0-9])([A-Z])/g,(_0x2018fb,_0x373b45,_0x2f9d75)=>_0x373b45+'-'+_0x2f9d75)[_0x197c87(0x1de)]();}function a84_0x3ec6(){const _0x2deea9=['has','keys','boolean','app','nonInteractive','get','corrected','dryRun','2929972DeVhWL','yes','name','5nanJXo','121kKcicw','push','sticky','slice','toLowerCase','7285674HqCTCC','env','replace','string','global','alias','317010ADiGsJ','help','set','9FWqybt','1506855aeInIe','entries','18jHrBtB','indexOf','length','50586gDPKNp','number','7714296eTamCj','dry-run','348991xNFijZ','type','non-interactive','add','original'];a84_0x3ec6=function(){return _0x2deea9;};return a84_0x3ec6();}function buildKnownFlags(_0x63b8cd){const _0x4da68b=a84_0x2b52,_0x39397b=new Set();for(const _0x3c895a of _0x63b8cd){_0x39397b[_0x4da68b(0x1cc)](_0x3c895a[_0x4da68b(0x1d8)]),_0x39397b['add'](toCamelCase(_0x3c895a['name']));}for(const _0x418e9a of[_0x4da68b(0x1c8),_0x4da68b(0x1d5),_0x4da68b(0x1d7),'format']){_0x39397b[_0x4da68b(0x1cc)](_0x418e9a);}for(const _0x5b7002 of[_0x4da68b(0x1bd),_0x4da68b(0x1e0),'appcode',_0x4da68b(0x1d1),_0x4da68b(0x1d2),_0x4da68b(0x1cb),'ci',_0x4da68b(0x1ba),'version']){_0x39397b[_0x4da68b(0x1cc)](_0x5b7002);}return _0x39397b;}function buildFlagTypeMap(_0x5c3003){const _0x404ef2=a84_0x2b52,_0x2792cb=new Map();for(const _0x4b98dc of _0x5c3003){_0x2792cb[_0x404ef2(0x1be)](_0x4b98dc[_0x404ef2(0x1d8)],_0x4b98dc[_0x404ef2(0x1ca)]),_0x2792cb['set'](toCamelCase(_0x4b98dc['name']),_0x4b98dc[_0x404ef2(0x1ca)]);}return _0x2792cb;}function toCamelCase(_0x32af8e){const _0x2eeec0=a84_0x2b52;return _0x32af8e[_0x2eeec0(0x1b8)](/-([a-z])/g,(_0x4a44b8,_0x5ab917)=>_0x5ab917['toUpperCase']());}function aliasHandler(_0x5e6925,_0x4a2e93){const _0x260a56=a84_0x2b52,_0x53bcc1=[];for(const _0x2873a0 of Object[_0x260a56(0x1cf)](_0x5e6925)){if(_0x4a2e93[_0x260a56(0x1ce)](_0x2873a0))continue;const _0x1c1826=toKebab(_0x2873a0);_0x1c1826!==_0x2873a0&&_0x4a2e93[_0x260a56(0x1ce)](_0x1c1826)&&_0x53bcc1[_0x260a56(0x1db)]({'original':_0x2873a0,'corrected':_0x1c1826,'handler':_0x260a56(0x1bb)});}return _0x53bcc1;}function stickyHandler(_0x34a06b,_0x468222,_0x115c26){const _0x59ff72=a84_0x2b52,_0x5d2aed=[];for(const [_0x44ab13,_0x1a4490]of Object[_0x59ff72(0x1c1)](_0x34a06b)){if(_0x1a4490!==!![])continue;for(let _0x2a5b8e=_0x44ab13[_0x59ff72(0x1c4)]-0x1;_0x2a5b8e>0x0;_0x2a5b8e--){const _0x4cc4e3=_0x44ab13[_0x59ff72(0x1dd)](0x0,_0x2a5b8e),_0xfedbbe=_0x44ab13[_0x59ff72(0x1dd)](_0x2a5b8e),_0x21afd0=toKebab(_0x4cc4e3),_0x221473=toCamelCase(_0x4cc4e3),_0x266fa5=_0x468222[_0x59ff72(0x1ce)](_0x4cc4e3)?_0x4cc4e3:_0x468222[_0x59ff72(0x1ce)](_0x21afd0)?_0x21afd0:_0x468222[_0x59ff72(0x1ce)](_0x221473)?_0x221473:null;if(!_0x266fa5)continue;const _0x47ae82=_0x115c26[_0x59ff72(0x1d3)](_0x266fa5)??_0x59ff72(0x1b9);let _0x50ad3e;if(_0x47ae82==='number'){const _0x25381b=Number(_0xfedbbe);if(isNaN(_0x25381b)||_0xfedbbe==='')continue;_0x50ad3e=_0x25381b;}else{if(_0x47ae82===_0x59ff72(0x1d0))continue;else{if(_0xfedbbe==='')continue;_0x50ad3e=_0xfedbbe;}}_0x5d2aed['push']({'original':_0x44ab13,'corrected':_0x266fa5+'='+_0x50ad3e,'handler':_0x59ff72(0x1dc)});break;}}return _0x5d2aed;}function a84_0x2b52(_0x132a12,_0xd30db6){_0x132a12=_0x132a12-0x1b8;const _0x3ec65c=a84_0x3ec6();let _0x2b52c1=_0x3ec65c[_0x132a12];return _0x2b52c1;}export function correctFlags(_0x1122bf,_0x454277){const _0x21a493=a84_0x2b52,_0x1c232d=buildKnownFlags(_0x454277),_0x5bd797=buildFlagTypeMap(_0x454277),_0x79ed60=aliasHandler(_0x1122bf,_0x1c232d),_0x2471bf=stickyHandler(_0x1122bf,_0x1c232d,_0x5bd797),_0x51b5b4=[..._0x79ed60,..._0x2471bf];if(_0x51b5b4[_0x21a493(0x1c4)]===0x0)return{'flags':_0x1122bf,'corrections':[]};const _0x4cb20f={..._0x1122bf},_0xb5e083=new Set();for(const _0x529e4e of _0x79ed60){_0x4cb20f[_0x529e4e[_0x21a493(0x1d4)]]=_0x1122bf[_0x529e4e[_0x21a493(0x1cd)]],_0xb5e083[_0x21a493(0x1cc)](_0x529e4e[_0x21a493(0x1cd)]);}for(const _0x3169b3 of _0x2471bf){const _0x55f242=_0x3169b3[_0x21a493(0x1d4)][_0x21a493(0x1c3)]('='),_0x1ebb63=_0x3169b3['corrected'][_0x21a493(0x1dd)](0x0,_0x55f242),_0x1e86cc=_0x3169b3[_0x21a493(0x1d4)][_0x21a493(0x1dd)](_0x55f242+0x1),_0x3dfb8b=_0x5bd797[_0x21a493(0x1d3)](_0x1ebb63)??_0x21a493(0x1b9);_0x3dfb8b===_0x21a493(0x1c6)?_0x4cb20f[_0x1ebb63]=Number(_0x1e86cc):_0x4cb20f[_0x1ebb63]=_0x1e86cc,_0xb5e083['add'](_0x3169b3['original']);}for(const _0x456dff of _0xb5e083){delete _0x4cb20f[_0x456dff];}return{'flags':_0x4cb20f,'corrections':_0x51b5b4};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a85_0x5c9d(_0x52db55,_0x4e065a){_0x52db55=_0x52db55-0x140;var _0xf4e8e=a85_0xf4e8();var _0x5c9d1f=_0xf4e8e[_0x52db55];return _0x5c9d1f;}function a85_0xf4e8(){var _0x51aa5c=['5467910YDylxI','14331WKfejl','21CaOJmW','180XwdxNx','48473579NVVeAW','954548LSiPUn','9369450rJGHCh','148405vGqRxT','7OvQOPc','11534248shdbEG','118TKTYJl'];a85_0xf4e8=function(){return _0x51aa5c;};return a85_0xf4e8();}(function(_0x4a17ec,_0xbbb537){var _0x2f5542=a85_0x5c9d,_0x379633=_0x4a17ec();while(!![]){try{var _0x396469=-parseInt(_0x2f5542(0x148))/0x1*(parseInt(_0x2f5542(0x146))/0x2)+-parseInt(_0x2f5542(0x149))/0x3*(parseInt(_0x2f5542(0x141))/0x4)+-parseInt(_0x2f5542(0x143))/0x5*(parseInt(_0x2f5542(0x14a))/0x6)+parseInt(_0x2f5542(0x144))/0x7*(parseInt(_0x2f5542(0x145))/0x8)+-parseInt(_0x2f5542(0x142))/0x9+-parseInt(_0x2f5542(0x147))/0xa+parseInt(_0x2f5542(0x140))/0xb;if(_0x396469===_0xbbb537)break;else _0x379633['push'](_0x379633['shift']());}catch(_0x523a57){_0x379633['push'](_0x379633['shift']());}}}(a85_0xf4e8,0xd08c3));export{extractList,extractPaging}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51ccc7,_0x311844){const _0x250085=a86_0xaffe,_0x1c7ba7=_0x51ccc7();while(!![]){try{const _0x3dca8d=parseInt(_0x250085(0xdb))/0x1*(-parseInt(_0x250085(0xdf))/0x2)+-parseInt(_0x250085(0xe6))/0x3*(-parseInt(_0x250085(0xe1))/0x4)+parseInt(_0x250085(0xd9))/0x5*(parseInt(_0x250085(0xd4))/0x6)+-parseInt(_0x250085(0xe0))/0x7*(parseInt(_0x250085(0xd5))/0x8)+parseInt(_0x250085(0xe2))/0x9+parseInt(_0x250085(0xd8))/0xa*(-parseInt(_0x250085(0xcb))/0xb)+-parseInt(_0x250085(0xd1))/0xc*(parseInt(_0x250085(0xdd))/0xd);if(_0x3dca8d===_0x311844)break;else _0x1c7ba7['push'](_0x1c7ba7['shift']());}catch(_0x1b352c){_0x1c7ba7['push'](_0x1c7ba7['shift']());}}}(a86_0x23c6,0x2405b));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x56e1d5,_0xf46d01,_0xa2ed5f){const _0x3cee67=a86_0xaffe,_0x3f212e=buildConfirmationContext(_0x56e1d5,_0xf46d01,_0xa2ed5f),_0x74d27c=[_0x3cee67(0xcd)+_0x3f212e[_0x3cee67(0xe7)]];return _0x3f212e['description']&&_0x74d27c[_0x3cee67(0xda)]('\x20\x20\x20'+_0x3f212e[_0x3cee67(0xe3)]),_0x3f212e['affectedRecords']&&_0x74d27c[_0x3cee67(0xda)]('\x20\x20\x20Affected:\x20'+_0x3f212e[_0x3cee67(0xcc)]),_0x74d27c[_0x3cee67(0xda)](_0x3cee67(0xe8)),_0x74d27c;}export function reconstructCommandArgv(_0x44b385,_0x17dd41){const _0x3ffeb9=a86_0xaffe,_0xe5d812=[CLI_BIN_NAME,_0x44b385[_0x3ffeb9(0xea)],_0x44b385[_0x3ffeb9(0xe4)]];for(const [_0x24a9cb,_0x4fa31c]of Object[_0x3ffeb9(0xdc)](_0x17dd41)){if(_0x4fa31c===!![])_0xe5d812['push']('--'+_0x24a9cb);else _0x4fa31c!==![]&&_0x4fa31c!==undefined&&_0x4fa31c!==''&&_0xe5d812[_0x3ffeb9(0xda)]('--'+_0x24a9cb+'\x20'+JSON[_0x3ffeb9(0xd7)](_0x4fa31c));}return _0xe5d812['push']('--yes'),_0xe5d812[_0x3ffeb9(0xcf)]('\x20');}function buildConfirmationContext(_0x322d09,_0x2e0dd0,_0x7f125a){const _0x442b9d=extractAffectedRecords(_0x7f125a);return{'commandLabel':_0x2e0dd0,'description':_0x322d09['description'],'affectedRecords':_0x442b9d};}function extractAffectedRecords(_0x1f0447){const _0x3e19f1=a86_0xaffe,_0x3bd017=[];if(_0x1f0447[_0x3e19f1(0xd0)])_0x3bd017[_0x3e19f1(0xda)](_0x3e19f1(0xd2)+_0x1f0447[_0x3e19f1(0xd0)]);if(_0x1f0447['id'])_0x3bd017[_0x3e19f1(0xda)](_0x3e19f1(0xce)+_0x1f0447['id']);if(_0x1f0447[_0x3e19f1(0xe9)])_0x3bd017[_0x3e19f1(0xda)](_0x3e19f1(0xd3)+_0x1f0447[_0x3e19f1(0xe9)]);if(_0x1f0447[_0x3e19f1(0xd6)])_0x3bd017[_0x3e19f1(0xda)](_0x3e19f1(0xde)+_0x1f0447[_0x3e19f1(0xd6)]);return _0x3bd017[_0x3e19f1(0xe5)]>0x0?_0x3bd017[_0x3e19f1(0xcf)](',\x20'):undefined;}function a86_0xaffe(_0x80f7e9,_0x373d94){_0x80f7e9=_0x80f7e9-0xcb;const _0x23c645=a86_0x23c6();let _0xaffee0=_0x23c645[_0x80f7e9];return _0xaffee0;}function a86_0x23c6(){const _0x121f33=['stringify','70020Jcnwyh','10JvKNrL','push','87jopulF','entries','559KSJLVf','params=','674jxUmnr','7KDqwTL','313384zyUSxR','484974TgpgOb','description','command','length','6LYWbXc','commandLabel','\x20\x20\x20Continue?\x20[y/N]\x20','name','service','275oTYTJG','affectedRecords','⚠\x20\x20High-risk\x20operation:\x20','id=','join','code','7764HCMcuw','code=','name=','541734LNmqLA','91352XTIOAL','params'];a86_0x23c6=function(){return _0x121f33;};return a86_0x23c6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xa803c8,_0xf1837f){const _0x1a8a02=a87_0x2c16,_0x4252d6=_0xa803c8();while(!![]){try{const _0x25a310=-parseInt(_0x1a8a02(0x171))/0x1*(-parseInt(_0x1a8a02(0x16d))/0x2)+-parseInt(_0x1a8a02(0x164))/0x3*(-parseInt(_0x1a8a02(0x170))/0x4)+-parseInt(_0x1a8a02(0x16f))/0x5*(-parseInt(_0x1a8a02(0x16e))/0x6)+-parseInt(_0x1a8a02(0x172))/0x7*(-parseInt(_0x1a8a02(0x162))/0x8)+parseInt(_0x1a8a02(0x16c))/0x9+parseInt(_0x1a8a02(0x16a))/0xa*(-parseInt(_0x1a8a02(0x168))/0xb)+parseInt(_0x1a8a02(0x163))/0xc*(-parseInt(_0x1a8a02(0x166))/0xd);if(_0x25a310===_0xf1837f)break;else _0x4252d6['push'](_0x4252d6['shift']());}catch(_0xb2cc4){_0x4252d6['push'](_0x4252d6['shift']());}}}(a87_0x19c5,0x590ff));import{LovrabetError}from'@lovrabet/sdk';function a87_0x19c5(){const _0x4d4d8c=['validation','3508884dvursp','2hFwjLJ','90jiePrz','129895pGFpYh','4mBLLSd','112487rOLvMa','21rvPojx','string','243728StoIzP','3324pFxaDv','555897GvVFAo','message','6799nMCmMX','stringify','2255GsnZqG','trim','32150EvtFWQ'];a87_0x19c5=function(){return _0x4d4d8c;};return a87_0x19c5();}function a87_0x2c16(_0x33db60,_0x596b6c){_0x33db60=_0x33db60-0x161;const _0x19c536=a87_0x19c5();let _0x2c165d=_0x19c536[_0x33db60];return _0x2c165d;}import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x4af12b){const _0x93b9e1=a87_0x2c16;if(_0x4af12b instanceof LovrabetError)return CliErrors[_0x93b9e1(0x16b)](userFacingLovrabetMessage(_0x4af12b));return _0x4af12b;}function userFacingLovrabetMessage(_0x45a5b2){const _0x485d7d=a87_0x2c16,_0x24d354=_0x45a5b2['description'];if(_0x24d354!==undefined&&_0x24d354!==null){if(typeof _0x24d354===_0x485d7d(0x161)&&_0x24d354['trim']())return _0x24d354[_0x485d7d(0x169)]();try{return JSON[_0x485d7d(0x167)](_0x24d354);}catch{}}return _0x45a5b2[_0x485d7d(0x165)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a83_0x1ccd79=a83_0x103a;(function(_0x1143cb,_0x1ec5e7){const _0x4bbac4=a83_0x103a,_0x2500ae=_0x1143cb();while(!![]){try{const _0x251626=-parseInt(_0x4bbac4(0x107))/0x1*(parseInt(_0x4bbac4(0xfc))/0x2)+-parseInt(_0x4bbac4(0xe3))/0x3*(parseInt(_0x4bbac4(0xf9))/0x4)+parseInt(_0x4bbac4(0x10c))/0x5*(parseInt(_0x4bbac4(0xee))/0x6)+-parseInt(_0x4bbac4(0xf5))/0x7*(-parseInt(_0x4bbac4(0xe5))/0x8)+parseInt(_0x4bbac4(0x10f))/0x9*(parseInt(_0x4bbac4(0x11a))/0xa)+-parseInt(_0x4bbac4(0x110))/0xb+-parseInt(_0x4bbac4(0xdb))/0xc;if(_0x251626===_0x1ec5e7)break;else _0x2500ae['push'](_0x2500ae['shift']());}catch(_0x37966a){_0x2500ae['push'](_0x2500ae['shift']());}}}(a83_0x739a,0xc6f78));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';function a83_0x739a(){const _0x34f258=['execute','pageSize','app','requiresAuth','ACCESS_KEY','filter','1710GAWnfe','cancelled','requiresAppCode','isNonInteractive','defaultVerbose','doctor','1488048NMbiFY','trim','string','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','has','configMissing','rawFlags','appCodeSource','82041BlcyVj','_notice','1912eqExnL','resolve','defaultPageSize','High-risk\x20operation\x20`','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','env','riskLevel','../commands/app/remote-source.js','accessKey','4865172wHlQWg','Run\x20`','appcode\x20\x22','name','error','pretty','format','22099RTwwgN','update','appcode','authRequired','4kmrPox','verbose','nonInteractive','2783866JYrCSk','../core/sdk-client.js','\x20\x20To\x20proceed:\x20','../core/api-client.js','\x20or\x20pass\x20','APPCODE','mergedCli','ClientAk','items','apiDomain','production','1UxGMOR','defaultApp','map','Unknown\x20app:\x20','currentApp','10DGfuil','object','newConfigFileName','729EFoqjh','350306lGNIos','local-alias','appCode','includes'];a83_0x739a=function(){return _0x34f258;};return a83_0x739a();}import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x2f0e3f){const _0x41a5ef=a83_0x103a;return void _0x2f0e3f,AUTH_MODE[_0x41a5ef(0x103)];}export function createPipelineEnv(_0x44ef0e,_0x3d25f6){const _0x154668=a83_0x103a,_0x650026=typeof _0x3d25f6[_0x154668(0x116)]==='string'&&_0x3d25f6[_0x154668(0x116)]['trim']();return{'rawFlags':_0x3d25f6,'appCode':_0x44ef0e['appCode']||productEnv(_0x154668(0x101))||(_0x650026?undefined:readAppCodeFromConfig()),'appCodeSource':_0x44ef0e[_0x154668(0xe2)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x3d25f6),'defaultFormat':_0x44ef0e[_0x154668(0xf4)],'defaultPageSize':_0x44ef0e[_0x154668(0x115)],'defaultVerbose':_0x44ef0e[_0x154668(0xfa)],'riskLevel':_0x44ef0e[_0x154668(0xeb)],'accessKey':_0x44ef0e[_0x154668(0xed)],'env':_0x44ef0e['env'],'mergedCli':{'defaultApp':_0x44ef0e[_0x154668(0x108)],'currentApp':_0x44ef0e[_0x154668(0x10b)],'appCode':_0x44ef0e[_0x154668(0x112)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a83_0x1ccd79(0x119)](_0x4751eb=>PIPELINE_FLAG_NAMES[a83_0x1ccd79(0xdf)](_0x4751eb[a83_0x1ccd79(0xf1)]))[a83_0x1ccd79(0x109)](({name:_0x16d9a8,type:_0x25d1cc,description:_0x45457e})=>({'name':_0x16d9a8,'type':_0x25d1cc,'description':_0x45457e})),'formatOutput':formatOutput,'getCommandLabel'(_0x22f1f6){return CLI_BIN_NAME+'\x20'+_0x22f1f6['service']+'\x20'+_0x22f1f6['command'];},'riskPolicy':{'onViolation'(_0x2b4cee){const _0x545160=a83_0x1ccd79;console[_0x545160(0xf2)](_0x2b4cee);},'createError'(_0x1f103c){const _0x3399d6=a83_0x1ccd79;return CliErrors[_0x3399d6(0x11b)](_0x1f103c);}},async 'prepare'(_0x437303,_0x310029){const _0x30760b=a83_0x1ccd79,_0x23a5ee=resolveAuthMode(_0x310029);if(_0x437303[_0x30760b(0x117)]!==![]){if(!_0x310029[_0x30760b(0xed)])throw CliErrors[_0x30760b(0xf8)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x30760b(0x10e)]+_0x30760b(0x100)+productEnvName(_0x30760b(0x118))+'.');const {setActiveAK:_0x3ac0e0}=await import(_0x30760b(0xff));_0x3ac0e0(_0x310029[_0x30760b(0xed)]);}let _0x2b48be='';if(_0x437303[_0x30760b(0xd7)]!==![]){_0x2b48be=_0x310029[_0x30760b(0x112)]??'',_0x2b48be=await resolveExplicitAppName(_0x437303,_0x310029,_0x2b48be);if(!_0x2b48be){await assertSelectedAppNameIsRuntimeAccessible(_0x437303,_0x310029);throw CliErrors[_0x30760b(0xe0)]('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG[_0x30760b(0x10e)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x437303,_0x310029,_0x2b48be);}if(_0x2b48be){const {initSdkClient:_0x39881d}=await import(_0x30760b(0xfd));_0x39881d({'appCode':_0x2b48be,'env':_0x310029[_0x30760b(0xea)]??'production','accessKey':_0x310029[_0x30760b(0xed)],'authMode':_0x23a5ee});}return{'defaults':{'booleans':{'verbose':_0x310029[_0x30760b(0xd9)]},'numbers':{'pagesize':_0x310029[_0x30760b(0xe7)]}},'extras':{'appCode':_0x2b48be,'cookie':'','apiDomain':_0x310029[_0x30760b(0x105)],'apiDir':'','accessKey':_0x310029[_0x30760b(0xed)],'envName':_0x310029[_0x30760b(0xea)],'mergedCli':_0x310029[_0x30760b(0x102)]}};},async 'confirmHighRisk'({def:_0x569ce5,env:_0x4b34d1,flags:_0x41ed76,commandLabel:_0x51174a}){const _0x48326e=a83_0x1ccd79;if(_0x4b34d1[_0x48326e(0xd8)]){const _0x42faa8=reconstructCommandArgv(_0x569ce5,_0x41ed76);throw CliErrors['validation'](_0x48326e(0xe8)+_0x51174a+_0x48326e(0xde)+(_0x48326e(0xfe)+_0x42faa8));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x569ce5,_0x51174a,_0x41ed76),'createCancelledError':_0x14d4f8=>CliErrors['cancelled'](_0x14d4f8)});},'mapDryRunError'(_0x5b965a){return mapUserFacingExecuteError(_0x5b965a);},'mapExecuteError'(_0xd12220){return mapUserFacingExecuteError(_0xd12220);},async 'finalize'(){const _0x2b22d2=a83_0x1ccd79,{clearActiveAK:_0xccb98d}=await import(_0x2b22d2(0xff));_0xccb98d();}};async function resolveExplicitAppName(_0x2b7f40,_0x23fa97,_0x52b459){const _0x157326=a83_0x1ccd79;if(_0x2b7f40['requiresAppCode']===![])return _0x52b459;const _0x4c8d31=typeof _0x23fa97[_0x157326(0xe1)][_0x157326(0x116)]===_0x157326(0xdd)?_0x23fa97[_0x157326(0xe1)][_0x157326(0x116)][_0x157326(0xdc)]():'';if(!_0x4c8d31)return _0x52b459;const _0x42b769=typeof _0x23fa97[_0x157326(0xe1)]['appcode']===_0x157326(0xdd)&&_0x23fa97[_0x157326(0xe1)][_0x157326(0xf7)][_0x157326(0xdc)]()||productEnv(_0x157326(0x101));if(_0x42b769||_0x23fa97[_0x157326(0xe2)]===_0x157326(0x111))return _0x52b459;const {getRemoteAppList:_0x41e2bb}=await import(_0x157326(0xec)),_0x388021=await _0x41e2bb({'env':_0x23fa97['env']??_0x157326(0x106),'accessKey':_0x23fa97[_0x157326(0xed)]}),_0x429497=findAppByName(_0x388021['items'],_0x4c8d31);if(_0x429497&&!isRuntimeAccessibleApp(_0x429497))throw runtimeInaccessibleAppError(_0x429497,'\x22'+_0x4c8d31+'\x22');const _0x4e44a4=_0x429497?.[_0x157326(0x112)]?.[_0x157326(0xdc)]();if(_0x4e44a4)return _0x4e44a4;throw CliErrors['validation'](_0x157326(0x10a)+_0x4c8d31,_0x157326(0xef)+CLI_BIN_NAME+_0x157326(0xe9)+_0x4c8d31+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x157326(0x10e)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0xa4a82b,_0x158f5d){const _0x1885fb=a83_0x1ccd79;if(_0xa4a82b[_0x1885fb(0xd7)]===![]||!_0x158f5d[_0x1885fb(0xed)])return;const _0x22484e=(typeof _0x158f5d[_0x1885fb(0xe1)][_0x1885fb(0x116)]===_0x1885fb(0xdd)&&_0x158f5d[_0x1885fb(0xe1)][_0x1885fb(0x116)][_0x1885fb(0xdc)]()?_0x158f5d[_0x1885fb(0xe1)][_0x1885fb(0x116)]:_0x158f5d[_0x1885fb(0x102)]?.[_0x1885fb(0x10b)]??_0x158f5d[_0x1885fb(0x102)]?.[_0x1885fb(0x108)])?.[_0x1885fb(0xdc)]();if(!_0x22484e)return;const {getRemoteAppList:_0x16cc76}=await import(_0x1885fb(0xec)),_0x43d1cd=await _0x16cc76({'env':_0x158f5d[_0x1885fb(0xea)]??_0x1885fb(0x106),'accessKey':_0x158f5d[_0x1885fb(0xed)]}),_0x2674f8=findAppByName(_0x43d1cd[_0x1885fb(0x104)],_0x22484e);if(_0x2674f8&&!isRuntimeAccessibleApp(_0x2674f8))throw runtimeInaccessibleAppError(_0x2674f8,'\x22'+_0x22484e+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x5763c3,_0x5da809,_0xafd154){const _0x553077=a83_0x1ccd79;if(_0x5763c3[_0x553077(0xd7)]===![]||!_0x5da809[_0x553077(0xed)])return;const {getRemoteAppList:_0x4cfdfd}=await import('../commands/app/remote-source.js'),_0x52eb36=await _0x4cfdfd({'env':_0x5da809[_0x553077(0xea)]??_0x553077(0x106),'accessKey':_0x5da809['accessKey']}),_0xc24dd7=findAppByCode(_0x52eb36[_0x553077(0x104)],_0xafd154);if(_0xc24dd7&&!isRuntimeAccessibleApp(_0xc24dd7))throw runtimeInaccessibleAppError(_0xc24dd7,_0x553077(0xf0)+_0xafd154+'\x22');}export async function runCommand(_0x39b4a2,_0xca0c0c){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x39b4a2)?withUpdateNotice(_0x39b4a2):_0x39b4a2,_0xca0c0c,runnerAdapter);}function a83_0x103a(_0x19f0df,_0x23c6f4){_0x19f0df=_0x19f0df-0xd7;const _0x739a63=a83_0x739a();let _0x103a3c=_0x739a63[_0x19f0df];return _0x103a3c;}function shouldAttachUpdateNotice(_0x5e9413){const _0x20aa09=a83_0x1ccd79;return![_0x20aa09(0xf6),'schema',_0x20aa09(0xda)][_0x20aa09(0x113)](_0x5e9413['service']);}function withUpdateNotice(_0x8eeb6d){return{..._0x8eeb6d,async 'execute'(_0x5b1cbb){const _0x2c5ea1=a83_0x103a,_0x37648c=shouldResolveUpdateNotice(_0x5b1cbb)?resolveLatestUpdateNotice()['catch'](()=>null):Promise[_0x2c5ea1(0xe6)](null),_0x5a33f7=await _0x8eeb6d[_0x2c5ea1(0x114)](_0x5b1cbb);return attachUpdateNotice(_0x5a33f7,await _0x37648c);}};}function shouldResolveUpdateNotice(_0x31fea8){const _0x56fbc=a83_0x1ccd79;return _0x31fea8[_0x56fbc(0xf4)]===_0x56fbc(0xf3)&&!_0x31fea8[_0x56fbc(0xfb)];}function attachUpdateNotice(_0x34b69f,_0x256631){const _0x20f8cf=a83_0x1ccd79;if(!_0x256631||!_0x34b69f||typeof _0x34b69f!==_0x20f8cf(0x10d))return _0x34b69f;const _0x283844=_0x34b69f,_0x495b3e=typeof _0x283844['_notice']===_0x20f8cf(0x10d)&&_0x283844['_notice']!==null?_0x283844[_0x20f8cf(0xe4)]:{};return{..._0x283844,'_notice':{..._0x495b3e,'update':_0x256631}};}
|
|
1
|
+
const a88_0x521ff5=a88_0x8b21;(function(_0x48f39a,_0x2e1ac7){const _0x27ecc4=a88_0x8b21,_0x34cdc2=_0x48f39a();while(!![]){try{const _0x96bb6c=-parseInt(_0x27ecc4(0x1a3))/0x1*(parseInt(_0x27ecc4(0x1ad))/0x2)+parseInt(_0x27ecc4(0x1a9))/0x3+parseInt(_0x27ecc4(0x1c3))/0x4*(-parseInt(_0x27ecc4(0x1b0))/0x5)+parseInt(_0x27ecc4(0x1b5))/0x6+-parseInt(_0x27ecc4(0x1b4))/0x7*(parseInt(_0x27ecc4(0x1bf))/0x8)+parseInt(_0x27ecc4(0x191))/0x9+parseInt(_0x27ecc4(0x1ca))/0xa*(parseInt(_0x27ecc4(0x1b2))/0xb);if(_0x96bb6c===_0x2e1ac7)break;else _0x34cdc2['push'](_0x34cdc2['shift']());}catch(_0x354bdb){_0x34cdc2['push'](_0x34cdc2['shift']());}}}(a88_0x5a44,0x8b375));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';function a88_0x5a44(){const _0x5e08ed=['update','defaultApp','app','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','production','isNonInteractive','APPCODE','../core/api-client.js','6370758XxhSlJ','ACCESS_KEY','command','requiresAuth','ClientAk','defaultPageSize','currentApp','execute','has','error','appcode','authRequired','Set\x20accessKey\x20in\x20','validation','string','nonInteractive','../core/sdk-client.js','newConfigFileName','34kRQSka','catch','resolve','appCode','includes','service','799359RjzAUX','format','cancelled','env','5868WRlSak','filter','pretty','50075ftDlBh','High-risk\x20operation\x20`','81169fSLhyC','appCodeSource','7CzNDTD','2140218dFpAra','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','pageSize','../commands/app/remote-source.js','rawFlags','Run\x20`','doctor','accessKey','name','object','7788552ChrxTK','items','mergedCli','trim','108fBgRsM','requiresAppCode','.appcode\x20to\x20','\x20or\x20pass\x20','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','configMissing','_notice','790lNOJaN','schema'];a88_0x5a44=function(){return _0x5e08ed;};return a88_0x5a44();}function a88_0x8b21(_0x5e6020,_0x5e79c7){_0x5e6020=_0x5e6020-0x18c;const _0x5a446e=a88_0x5a44();let _0x8b2192=_0x5a446e[_0x5e6020];return _0x8b2192;}import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0xf85bf1){const _0x43a605=a88_0x8b21;return void _0xf85bf1,AUTH_MODE[_0x43a605(0x195)];}export function createPipelineEnv(_0x50c67e,_0x20f057){const _0x4e5cb3=a88_0x8b21,_0x9f4ecf=typeof _0x20f057[_0x4e5cb3(0x1ce)]===_0x4e5cb3(0x19f)&&_0x20f057[_0x4e5cb3(0x1ce)][_0x4e5cb3(0x1c2)]();return{'rawFlags':_0x20f057,'appCode':_0x50c67e['appCode']||productEnv('APPCODE')||(_0x9f4ecf?undefined:readAppCodeFromConfig()),'appCodeSource':_0x50c67e['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x20f057),'defaultFormat':_0x50c67e[_0x4e5cb3(0x1aa)],'defaultPageSize':_0x50c67e[_0x4e5cb3(0x1b7)],'defaultVerbose':_0x50c67e['verbose'],'riskLevel':_0x50c67e['riskLevel'],'accessKey':_0x50c67e[_0x4e5cb3(0x1bc)],'env':_0x50c67e[_0x4e5cb3(0x1ac)],'mergedCli':{'defaultApp':_0x50c67e[_0x4e5cb3(0x1cd)],'currentApp':_0x50c67e[_0x4e5cb3(0x197)],'appCode':_0x50c67e[_0x4e5cb3(0x1a6)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a88_0x521ff5(0x1ae)](_0x29fc67=>PIPELINE_FLAG_NAMES[a88_0x521ff5(0x199)](_0x29fc67[a88_0x521ff5(0x1bd)]))['map'](({name:_0x419008,type:_0x5e6545,description:_0x412224})=>({'name':_0x419008,'type':_0x5e6545,'description':_0x412224})),'formatOutput':formatOutput,'getCommandLabel'(_0x29c2ba){const _0x249682=a88_0x521ff5;return CLI_BIN_NAME+'\x20'+_0x29c2ba[_0x249682(0x1a8)]+'\x20'+_0x29c2ba[_0x249682(0x193)];},'riskPolicy':{'onViolation'(_0x12d5ee){const _0x4d6e79=a88_0x521ff5;console[_0x4d6e79(0x19a)](_0x12d5ee);},'createError'(_0x106512){const _0x4e1f35=a88_0x521ff5;return CliErrors[_0x4e1f35(0x1ab)](_0x106512);}},async 'prepare'(_0x394e38,_0x901fe3){const _0x1b23a3=a88_0x521ff5,_0x19d20d=resolveAuthMode(_0x901fe3);if(_0x394e38[_0x1b23a3(0x194)]!==![]){if(!_0x901fe3[_0x1b23a3(0x1bc)])throw CliErrors[_0x1b23a3(0x19c)](_0x1b23a3(0x19d)+PRODUCT_CONFIG[_0x1b23a3(0x1a2)]+_0x1b23a3(0x1c6)+productEnvName(_0x1b23a3(0x192))+'.');const {setActiveAK:_0xec9c0d}=await import(_0x1b23a3(0x190));_0xec9c0d(_0x901fe3[_0x1b23a3(0x1bc)]);}let _0x25968c='';if(_0x394e38[_0x1b23a3(0x1c4)]!==![]){_0x25968c=_0x901fe3[_0x1b23a3(0x1a6)]??'',_0x25968c=await resolveExplicitAppName(_0x394e38,_0x901fe3,_0x25968c);if(!_0x25968c){await assertSelectedAppNameIsRuntimeAccessible(_0x394e38,_0x901fe3);throw CliErrors[_0x1b23a3(0x1c8)](_0x1b23a3(0x1c7)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x394e38,_0x901fe3,_0x25968c);}if(_0x25968c){const {initSdkClient:_0x3c01c9}=await import(_0x1b23a3(0x1a1));_0x3c01c9({'appCode':_0x25968c,'env':_0x901fe3[_0x1b23a3(0x1ac)]??'production','accessKey':_0x901fe3[_0x1b23a3(0x1bc)],'authMode':_0x19d20d});}return{'defaults':{'booleans':{'verbose':_0x901fe3['defaultVerbose']},'numbers':{'pagesize':_0x901fe3[_0x1b23a3(0x196)]}},'extras':{'appCode':_0x25968c,'cookie':'','apiDomain':_0x901fe3['apiDomain'],'apiDir':'','accessKey':_0x901fe3[_0x1b23a3(0x1bc)],'envName':_0x901fe3[_0x1b23a3(0x1ac)],'mergedCli':_0x901fe3[_0x1b23a3(0x1c1)]}};},async 'confirmHighRisk'({def:_0x1db501,env:_0x18ef18,flags:_0x93a3b4,commandLabel:_0x28c7cc}){const _0x5a5ba4=a88_0x521ff5;if(_0x18ef18[_0x5a5ba4(0x18e)]){const _0x382561=reconstructCommandArgv(_0x1db501,_0x93a3b4);throw CliErrors[_0x5a5ba4(0x19e)](_0x5a5ba4(0x1b1)+_0x28c7cc+_0x5a5ba4(0x18c)+('\x20\x20To\x20proceed:\x20'+_0x382561));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x1db501,_0x28c7cc,_0x93a3b4),'createCancelledError':_0x14e041=>CliErrors['cancelled'](_0x14e041)});},'mapDryRunError'(_0x101b1f){return mapUserFacingExecuteError(_0x101b1f);},'mapExecuteError'(_0xb35f9f){return mapUserFacingExecuteError(_0xb35f9f);},async 'finalize'(){const _0x1b8cf6=a88_0x521ff5,{clearActiveAK:_0x5d7e1b}=await import(_0x1b8cf6(0x190));_0x5d7e1b();}};async function resolveExplicitAppName(_0x336085,_0x2f959a,_0x198483){const _0x35e89b=a88_0x521ff5;if(_0x336085['requiresAppCode']===![])return _0x198483;const _0x123d23=typeof _0x2f959a[_0x35e89b(0x1b9)][_0x35e89b(0x1ce)]===_0x35e89b(0x19f)?_0x2f959a[_0x35e89b(0x1b9)]['app'][_0x35e89b(0x1c2)]():'';if(!_0x123d23)return _0x198483;const _0x32f3a6=typeof _0x2f959a['rawFlags']['appcode']===_0x35e89b(0x19f)&&_0x2f959a[_0x35e89b(0x1b9)][_0x35e89b(0x19b)]['trim']()||productEnv(_0x35e89b(0x18f));if(_0x32f3a6||_0x2f959a[_0x35e89b(0x1b3)]==='local-alias')return _0x198483;const {getRemoteAppList:_0x142f68}=await import(_0x35e89b(0x1b8)),_0x4b2045=await _0x142f68({'env':_0x2f959a['env']??_0x35e89b(0x18d),'accessKey':_0x2f959a[_0x35e89b(0x1bc)]}),_0x1f0de3=findAppByName(_0x4b2045['items'],_0x123d23);if(_0x1f0de3&&!isRuntimeAccessibleApp(_0x1f0de3))throw runtimeInaccessibleAppError(_0x1f0de3,'\x22'+_0x123d23+'\x22');const _0x55e655=_0x1f0de3?.['appCode']?.[_0x35e89b(0x1c2)]();if(_0x55e655)return _0x55e655;throw CliErrors[_0x35e89b(0x19e)]('Unknown\x20app:\x20'+_0x123d23,_0x35e89b(0x1ba)+CLI_BIN_NAME+_0x35e89b(0x1b6)+_0x123d23+_0x35e89b(0x1c5)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x30b8fa,_0x4fd95a){const _0x7a63f7=a88_0x521ff5;if(_0x30b8fa[_0x7a63f7(0x1c4)]===![]||!_0x4fd95a[_0x7a63f7(0x1bc)])return;const _0x106c8b=(typeof _0x4fd95a[_0x7a63f7(0x1b9)][_0x7a63f7(0x1ce)]===_0x7a63f7(0x19f)&&_0x4fd95a[_0x7a63f7(0x1b9)][_0x7a63f7(0x1ce)][_0x7a63f7(0x1c2)]()?_0x4fd95a[_0x7a63f7(0x1b9)][_0x7a63f7(0x1ce)]:_0x4fd95a[_0x7a63f7(0x1c1)]?.['currentApp']??_0x4fd95a[_0x7a63f7(0x1c1)]?.[_0x7a63f7(0x1cd)])?.[_0x7a63f7(0x1c2)]();if(!_0x106c8b)return;const {getRemoteAppList:_0x39b750}=await import(_0x7a63f7(0x1b8)),_0x4b01bb=await _0x39b750({'env':_0x4fd95a[_0x7a63f7(0x1ac)]??'production','accessKey':_0x4fd95a['accessKey']}),_0x4c3b61=findAppByName(_0x4b01bb[_0x7a63f7(0x1c0)],_0x106c8b);if(_0x4c3b61&&!isRuntimeAccessibleApp(_0x4c3b61))throw runtimeInaccessibleAppError(_0x4c3b61,'\x22'+_0x106c8b+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x21ebf8,_0x2da739,_0x805347){const _0x5111c0=a88_0x521ff5;if(_0x21ebf8[_0x5111c0(0x1c4)]===![]||!_0x2da739[_0x5111c0(0x1bc)])return;const {getRemoteAppList:_0x42716f}=await import(_0x5111c0(0x1b8)),_0x3ce0be=await _0x42716f({'env':_0x2da739['env']??_0x5111c0(0x18d),'accessKey':_0x2da739['accessKey']}),_0xb5ff55=findAppByCode(_0x3ce0be['items'],_0x805347);if(_0xb5ff55&&!isRuntimeAccessibleApp(_0xb5ff55))throw runtimeInaccessibleAppError(_0xb5ff55,'appcode\x20\x22'+_0x805347+'\x22');}export async function runCommand(_0x4f15e6,_0x22be49){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x4f15e6)?withUpdateNotice(_0x4f15e6):_0x4f15e6,_0x22be49,runnerAdapter);}function shouldAttachUpdateNotice(_0x2404af){const _0x4b44de=a88_0x521ff5;return![_0x4b44de(0x1cc),_0x4b44de(0x1cb),_0x4b44de(0x1bb)][_0x4b44de(0x1a7)](_0x2404af[_0x4b44de(0x1a8)]);}function withUpdateNotice(_0x1dd39a){return{..._0x1dd39a,async 'execute'(_0x1c1e73){const _0x639f49=a88_0x8b21,_0x8307aa=shouldResolveUpdateNotice(_0x1c1e73)?resolveLatestUpdateNotice()[_0x639f49(0x1a4)](()=>null):Promise[_0x639f49(0x1a5)](null),_0x5c6fbf=await _0x1dd39a[_0x639f49(0x198)](_0x1c1e73);return attachUpdateNotice(_0x5c6fbf,await _0x8307aa);}};}function shouldResolveUpdateNotice(_0x3e4139){const _0x238a11=a88_0x521ff5;return _0x3e4139['format']===_0x238a11(0x1af)&&!_0x3e4139[_0x238a11(0x1a0)];}function attachUpdateNotice(_0x1204dc,_0x2cef8f){const _0x472823=a88_0x521ff5;if(!_0x2cef8f||!_0x1204dc||typeof _0x1204dc!==_0x472823(0x1be))return _0x1204dc;const _0x52ec44=_0x1204dc,_0x452b23=typeof _0x52ec44[_0x472823(0x1c9)]==='object'&&_0x52ec44[_0x472823(0x1c9)]!==null?_0x52ec44['_notice']:{};return{..._0x52ec44,'_notice':{..._0x452b23,'update':_0x2cef8f}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x457a76,_0x8094bb){const _0x56539f=a89_0x2bce,_0x19b3a1=_0x457a76();while(!![]){try{const _0x3e412e=parseInt(_0x56539f(0xda))/0x1+-parseInt(_0x56539f(0xde))/0x2*(-parseInt(_0x56539f(0xe0))/0x3)+parseInt(_0x56539f(0xdd))/0x4*(-parseInt(_0x56539f(0xe8))/0x5)+parseInt(_0x56539f(0xe3))/0x6*(parseInt(_0x56539f(0xea))/0x7)+parseInt(_0x56539f(0xed))/0x8*(-parseInt(_0x56539f(0xeb))/0x9)+parseInt(_0x56539f(0xd9))/0xa+-parseInt(_0x56539f(0xe2))/0xb*(parseInt(_0x56539f(0xee))/0xc);if(_0x3e412e===_0x8094bb)break;else _0x19b3a1['push'](_0x19b3a1['shift']());}catch(_0x5215fb){_0x19b3a1['push'](_0x19b3a1['shift']());}}}(a89_0x3158,0x1b2c2));import{buildSchemaPayload as a89_0x688b52}from'@lovrabet/cli-framework';function a89_0x2bce(_0x44dd3f,_0x78b118){_0x44dd3f=_0x44dd3f-0xd8;const _0x31581f=a89_0x3158();let _0x2bcee1=_0x31581f[_0x44dd3f];return _0x2bcee1;}import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';function a89_0x3158(){const _0x5b0d4d=['85357wvoLwJ','auth','map','24QijupN','3394EwggbA','none','210EVUbzM','has','473tveSQq','444LQAggu','required','filter','service','../commands/registry.js','125955OgCnMt','requiresAuth','16051eiDaXY','392319lnpnyZ','commands','8tpJvse','61152YrGsov','services','1513340lylVax'];a89_0x3158=function(){return _0x5b0d4d;};return a89_0x3158();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x13debe=a89_0x2bce,{serviceRegistry:_0xa49945,findDefinition:_0x2a395d}=await import(_0x13debe(0xe7)),_0x3b3d24=new Set(_0xa49945[_0x13debe(0xdc)](_0x24de5a=>_0x24de5a[_0x13debe(0xe6)])),_0x469954=listDynamicServiceEntries()[_0x13debe(0xe5)](_0x3e0d80=>!_0x3b3d24[_0x13debe(0xe1)](_0x3e0d80[_0x13debe(0xe6)])),_0x2a2058=a89_0x688b52({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0xa49945,_0x469954),'buildAllFlags':buildAllFlags,'findDefinition':(_0x48f359,_0x15eead)=>_0x2a395d(_0x48f359,_0x15eead)??findDynamicServiceDefinition(_0x48f359,_0x15eead)});return normalizeSchemaPayload(_0x2a2058);}function normalizeSchemaPayload(_0x2b2e0e){const _0x431fea=a89_0x2bce;return{..._0x2b2e0e,'schemaVersion':0x2,'services':_0x2b2e0e[_0x431fea(0xd8)][_0x431fea(0xdc)](_0x1ea13b=>({..._0x1ea13b,'commands':_0x1ea13b[_0x431fea(0xec)][_0x431fea(0xdc)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x16fbe7){const _0x3533f5=a89_0x2bce,_0x3af712=_0x16fbe7;return{..._0x16fbe7,'auth':_0x3af712[_0x3533f5(0xdb)]??(_0x16fbe7[_0x3533f5(0xe9)]?_0x3533f5(0xe4):_0x3533f5(0xdf))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3d95d6,_0x376988){const _0x57cf2f=a90_0x59a2,_0x1c0700=_0x3d95d6();while(!![]){try{const _0x1f2c22=parseInt(_0x57cf2f(0x17b))/0x1+parseInt(_0x57cf2f(0x17e))/0x2*(-parseInt(_0x57cf2f(0x180))/0x3)+-parseInt(_0x57cf2f(0x17f))/0x4+parseInt(_0x57cf2f(0x178))/0x5*(parseInt(_0x57cf2f(0x179))/0x6)+-parseInt(_0x57cf2f(0x17d))/0x7*(parseInt(_0x57cf2f(0x17c))/0x8)+-parseInt(_0x57cf2f(0x175))/0x9+parseInt(_0x57cf2f(0x177))/0xa*(-parseInt(_0x57cf2f(0x17a))/0xb);if(_0x1f2c22===_0x376988)break;else _0x1c0700['push'](_0x1c0700['shift']());}catch(_0x197551){_0x1c0700['push'](_0x1c0700['shift']());}}}(a90_0x6615,0xc0345));export function insertDynamicServicesAfterServiceTree(_0x21b099,_0xb9f174){const _0xa4fd4c=a90_0x59a2;if(_0xb9f174[_0xa4fd4c(0x176)]===0x0)return[..._0x21b099];const _0xc2fac3=_0x21b099['findIndex'](_0x464181=>_0x464181[_0xa4fd4c(0x174)]===_0xa4fd4c(0x174));if(_0xc2fac3<0x0)return[..._0x21b099,..._0xb9f174];return[..._0x21b099[_0xa4fd4c(0x173)](0x0,_0xc2fac3+0x1),..._0xb9f174,..._0x21b099['slice'](_0xc2fac3+0x1)];}function a90_0x59a2(_0x56be74,_0x511ffc){_0x56be74=_0x56be74-0x173;const _0x6615ab=a90_0x6615();let _0x59a215=_0x6615ab[_0x56be74];return _0x59a215;}function a90_0x6615(){const _0x3ef072=['2709968DoREHs','21TNlPsG','1113646wsdlEe','1252212wZXcpZ','3vDchZU','slice','service','1633680tSyCTu','length','1087110YNEVOO','40025wqWyci','1146Gvlcbk','22kGTXZX','1543370XSkHIy'];a90_0x6615=function(){return _0x3ef072;};return a90_0x6615();}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9688bc,_0x99d554){var _0x7392f1=a91_0x1dd0,_0x37e1f5=_0x9688bc();while(!![]){try{var _0x562c60=parseInt(_0x7392f1(0x6d))/0x1*(parseInt(_0x7392f1(0x73))/0x2)+-parseInt(_0x7392f1(0x76))/0x3+-parseInt(_0x7392f1(0x71))/0x4*(-parseInt(_0x7392f1(0x72))/0x5)+parseInt(_0x7392f1(0x6e))/0x6+parseInt(_0x7392f1(0x74))/0x7+-parseInt(_0x7392f1(0x75))/0x8*(-parseInt(_0x7392f1(0x6c))/0x9)+parseInt(_0x7392f1(0x70))/0xa*(-parseInt(_0x7392f1(0x6f))/0xb);if(_0x562c60===_0x99d554)break;else _0x37e1f5['push'](_0x37e1f5['shift']());}catch(_0x2a18a3){_0x37e1f5['push'](_0x37e1f5['shift']());}}}(a91_0x1818,0x82df5));function a91_0x1dd0(_0x4d475e,_0x576d34){_0x4d475e=_0x4d475e-0x6c;var _0x181850=a91_0x1818();var _0x1dd0a6=_0x181850[_0x4d475e];return _0x1dd0a6;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a91_0x1818(){var _0x549183=['5MkTXQZ','1001636ZdQjoV','4455605vBuNql','47848QnupbH','1935930lRnvQz','873djciSz','1OgmeJu','6295698mlrNiI','256982ljnQIt','730VyXlXG','480064yvGuRc'];a91_0x1818=function(){return _0x549183;};return a91_0x1818();}
|