@lovrabet/lovrabet-cli 2.1.8-beta.2 → 2.1.8-beta.3
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 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/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 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.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(_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)]:[]};}
|
|
1
|
+
(function(_0x2dcdcc,_0x455d89){const _0x3f2517=a74_0x1a9d,_0x3d8d4b=_0x2dcdcc();while(!![]){try{const _0x500818=parseInt(_0x3f2517(0x112))/0x1*(parseInt(_0x3f2517(0x121))/0x2)+parseInt(_0x3f2517(0x155))/0x3*(parseInt(_0x3f2517(0x141))/0x4)+-parseInt(_0x3f2517(0x162))/0x5*(-parseInt(_0x3f2517(0x101))/0x6)+parseInt(_0x3f2517(0x13f))/0x7+parseInt(_0x3f2517(0x142))/0x8*(parseInt(_0x3f2517(0xe4))/0x9)+parseInt(_0x3f2517(0x137))/0xa*(-parseInt(_0x3f2517(0x111))/0xb)+-parseInt(_0x3f2517(0x16d))/0xc;if(_0x500818===_0x455d89)break;else _0x3d8d4b['push'](_0x3d8d4b['shift']());}catch(_0x3fb158){_0x3d8d4b['push'](_0x3d8d4b['shift']());}}}(a74_0x4099,0xf0d8c));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(_0x39ae37){_activeAK=_0x39ae37||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x4228c9,_0x29c841={}){const _0x5a0989=a74_0x1a9d,{method:method='GET',body:_0x28e993,headers:headers={},timeout:timeout=0x7530}=_0x29c841,_0x3f10fc=_activeAK,_0x34f9bf=getRuntimeDomain();if(!_0x3f10fc)throw CliErrors[_0x5a0989(0xe2)](_0x5a0989(0xfb)+PRODUCT_CONFIG[_0x5a0989(0xe9)]+'.');const _0x18fbef=''+_0x34f9bf+_0x4228c9,_0x4f1019={'X-User-AK':_0x3f10fc},_0x3b8847=new AbortController(),_0x5a41fc=setTimeout(()=>_0x3b8847[_0x5a0989(0x13d)](),timeout);try{const _0x55711f=await fetch(_0x18fbef,{'method':method,'headers':{'Content-Type':_0x5a0989(0x143),'X-Invoke-Source':PRODUCT_CONFIG[_0x5a0989(0x11f)],..._0x4f1019,...headers},'body':_0x28e993?JSON[_0x5a0989(0x11a)](_0x28e993):undefined,'signal':_0x3b8847['signal']});let _0x3184fe;try{_0x3184fe=await _0x55711f[_0x5a0989(0xea)]();}catch{throw CliErrors[_0x5a0989(0xf5)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x55711f[_0x5a0989(0xfc)]+')',_0x55711f[_0x5a0989(0xfc)]>=0x190?_0x5a0989(0x119):undefined);}if(!_0x55711f['ok']||_0x3184fe[_0x5a0989(0x11b)]===![])throw CliErrors[_0x5a0989(0xf5)](_0x3184fe[_0x5a0989(0xf2)]||_0x3184fe['message']||_0x5a0989(0x131)+_0x55711f['status'],_0x3184fe[_0x5a0989(0x127)]?_0x5a0989(0xf1)+_0x3184fe[_0x5a0989(0x127)]:undefined);return _0x3184fe;}catch(_0x46f412){if(_0x46f412 instanceof Error&&_0x46f412[_0x5a0989(0x12b)]===_0x5a0989(0x156))throw CliErrors['apiError'](_0x5a0989(0xeb)+_0x18fbef);throw _0x46f412;}finally{clearTimeout(_0x5a41fc);}}async function apiBinaryRequest(_0x3094be,_0x988330={}){const _0x230bc5=a74_0x1a9d,{method:method=_0x230bc5(0x120),headers:headers={},timeout:timeout=0x7530}=_0x988330,_0x5168ee=_activeAK,_0x36a7ab=getRuntimeDomain();if(!_0x5168ee)throw CliErrors[_0x230bc5(0xe2)](_0x230bc5(0xfb)+PRODUCT_CONFIG[_0x230bc5(0xe9)]+'.');const _0x1ea032=''+_0x36a7ab+_0x3094be,_0x5abd2c=new AbortController(),_0x493335=setTimeout(()=>_0x5abd2c[_0x230bc5(0x13d)](),timeout);try{const _0x1fb326=await fetch(_0x1ea032,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x5168ee,...headers},'signal':_0x5abd2c[_0x230bc5(0x126)]});if(!_0x1fb326['ok']){let _0x2a16ea;try{const _0x5a1d56=await _0x1fb326[_0x230bc5(0xea)]();_0x2a16ea=_0x5a1d56[_0x230bc5(0xf2)]||_0x5a1d56[_0x230bc5(0xf8)]||_0x5a1d56[_0x230bc5(0x127)];}catch{_0x2a16ea=await _0x1fb326[_0x230bc5(0x122)]()[_0x230bc5(0x147)](()=>undefined);}throw CliErrors[_0x230bc5(0xf5)](_0x2a16ea||_0x230bc5(0x131)+_0x1fb326[_0x230bc5(0xfc)],'Download\x20failed:\x20'+_0x1ea032);}return Buffer[_0x230bc5(0x159)](await _0x1fb326[_0x230bc5(0x163)]());}catch(_0x1c9807){if(_0x1c9807 instanceof Error&&_0x1c9807['name']===_0x230bc5(0x156))throw CliErrors[_0x230bc5(0xf5)](_0x230bc5(0xeb)+_0x1ea032);throw _0x1c9807;}finally{clearTimeout(_0x493335);}}async function apiFormRequest(_0x42d45b,_0x19bd40,_0x7c2e2e={}){const _0x1451af=a74_0x1a9d,{timeout:timeout=0x7530}=_0x7c2e2e,_0x19f37f=_activeAK,_0x315d99=getRuntimeDomain();if(!_0x19f37f)throw CliErrors[_0x1451af(0xe2)](_0x1451af(0xfb)+PRODUCT_CONFIG[_0x1451af(0xe9)]+'.');const _0x200895=''+_0x315d99+_0x42d45b,_0x476e2a=new AbortController(),_0x1ffbce=setTimeout(()=>_0x476e2a[_0x1451af(0x13d)](),timeout);try{const _0x195995=await fetch(_0x200895,{'method':_0x1451af(0xf6),'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x19f37f},'body':_0x19bd40,'signal':_0x476e2a[_0x1451af(0x126)]});let _0x47a0bc;try{_0x47a0bc=await _0x195995[_0x1451af(0xea)]();}catch{throw CliErrors[_0x1451af(0xf5)](_0x1451af(0x16f)+_0x195995[_0x1451af(0xfc)]+')',_0x195995[_0x1451af(0xfc)]>=0x190?_0x1451af(0x119):undefined);}if(!_0x195995['ok']||_0x47a0bc['success']===![])throw CliErrors[_0x1451af(0xf5)](_0x47a0bc[_0x1451af(0xf2)]||_0x47a0bc[_0x1451af(0xf8)]||'API\x20error:\x20'+_0x195995[_0x1451af(0xfc)],_0x47a0bc[_0x1451af(0x127)]?_0x1451af(0xf1)+_0x47a0bc[_0x1451af(0x127)]:undefined);return _0x47a0bc;}catch(_0x579e31){if(_0x579e31 instanceof Error&&_0x579e31[_0x1451af(0x12b)]===_0x1451af(0x156))throw CliErrors[_0x1451af(0xf5)]('Request\x20timeout:\x20'+_0x200895);throw _0x579e31;}finally{clearTimeout(_0x1ffbce);}}async function toolboxRequest(_0x28efca,_0x5313c6,_0x1d681d={}){const _0x5a5a79=a74_0x1a9d,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x1d681d,_0x377a89=_activeAK;if(!_0x377a89)throw CliErrors['authRequired'](_0x5a5a79(0xfb)+PRODUCT_CONFIG[_0x5a5a79(0xe9)]+'.');const _0x701bd=getApiDomain()[_0x5a5a79(0x13a)](/\/$/,''),_0x4e3e08=new URL(_0x28efca,_0x701bd+_0x5a5a79(0x158));if(_0x5313c6)for(const [_0x54ae54,_0x1fa1f0]of Object['entries'](_0x5313c6)){_0x1fa1f0!==undefined&&_0x1fa1f0!==null&&_0x4e3e08['searchParams'][_0x5a5a79(0xf4)](_0x54ae54,String(_0x1fa1f0));}const _0x18abf8=new AbortController(),_0x56af13=setTimeout(()=>_0x18abf8[_0x5a5a79(0x13d)](),timeout);try{const _0x56245b=await fetch(_0x4e3e08,{'method':method,'headers':{'Content-Type':_0x5a5a79(0x143),'X-Invoke-Source':PRODUCT_CONFIG[_0x5a5a79(0x11f)],'X-User-AK':_0x377a89,...headers},'signal':_0x18abf8['signal']});let _0x372f5f;try{_0x372f5f=await _0x56245b[_0x5a5a79(0xea)]();}catch{throw CliErrors['apiError'](_0x5a5a79(0x149)+_0x56245b['status']+')',_0x56245b[_0x5a5a79(0xfc)]>=0x190?_0x5a5a79(0x119):undefined);}if(!_0x56245b['ok']){const _0x4c04ab=_0x372f5f&&typeof _0x372f5f===_0x5a5a79(0x15e)?_0x372f5f:{};throw CliErrors[_0x5a5a79(0xf5)](_0x4c04ab['errorMsg']||_0x4c04ab['message']||'Toolbox\x20API\x20error:\x20'+_0x56245b['status'],_0x4c04ab[_0x5a5a79(0x127)]?_0x5a5a79(0x14d)+_0x4c04ab['errorCode']:undefined);}if(_0x372f5f&&typeof _0x372f5f==='object'&&_0x5a5a79(0x11b)in _0x372f5f&&typeof _0x372f5f[_0x5a5a79(0x11b)]===_0x5a5a79(0x104)){const _0x1bd223=_0x372f5f;if(!_0x1bd223[_0x5a5a79(0x11b)])throw CliErrors[_0x5a5a79(0xf5)](_0x1bd223['errorMsg']||_0x1bd223[_0x5a5a79(0xf8)]||_0x5a5a79(0xe3),_0x1bd223[_0x5a5a79(0x127)]?'Toolbox\x20error\x20code:\x20'+_0x1bd223[_0x5a5a79(0x127)]:undefined);return _0x1bd223[_0x5a5a79(0xf9)];}return _0x372f5f;}catch(_0x42a6fe){if(_0x42a6fe instanceof Error&&_0x42a6fe[_0x5a5a79(0x12b)]===_0x5a5a79(0x156))throw CliErrors[_0x5a5a79(0xf5)](_0x5a5a79(0xeb)+_0x4e3e08['toString']());throw _0x42a6fe;}finally{clearTimeout(_0x56af13);}}async function skillHubJsonRequest(_0x4c8617,_0x54431b={}){const _0xb8e4f1=a74_0x1a9d,{method:method=_0xb8e4f1(0x120),query:_0x27f694,body:_0x2de966,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x54431b,_0x3b2163=_activeAK;if(!_0x3b2163)throw CliErrors[_0xb8e4f1(0xe2)](_0xb8e4f1(0xfb)+PRODUCT_CONFIG[_0xb8e4f1(0xe9)]+'.');const _0x3c07f0=getSkillHubDomain()[_0xb8e4f1(0x13a)](/\/$/,''),_0x5f2a28=new URL(_0x4c8617,_0x3c07f0+'/');if(_0x27f694)for(const [_0x3baa75,_0x2a5d01]of Object['entries'](_0x27f694)){_0x2a5d01!==undefined&&_0x2a5d01!==null&&_0x5f2a28[_0xb8e4f1(0xfe)]['set'](_0x3baa75,String(_0x2a5d01));}const _0x41126c=new AbortController(),_0x7a203e=setTimeout(()=>_0x41126c[_0xb8e4f1(0x13d)](),timeout);try{const _0x4ecdec=await fetch(_0x5f2a28[_0xb8e4f1(0x100)](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0xb8e4f1(0x11f)],'X-User-AK':_0x3b2163,...headers},'body':_0x2de966,'signal':_0x41126c[_0xb8e4f1(0x126)]});let _0x355c1e;try{_0x355c1e=await _0x4ecdec[_0xb8e4f1(0xea)]();}catch{if(allowNotFound&&_0x4ecdec[_0xb8e4f1(0xfc)]===0x194)return undefined;throw CliErrors['apiError'](_0xb8e4f1(0x107)+_0x4ecdec['status']+')',_0x4ecdec[_0xb8e4f1(0xfc)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(allowNotFound&&isSkillHubNotFoundResponse(_0x4ecdec[_0xb8e4f1(0xfc)],_0x355c1e))return undefined;const _0x374124=!_0x4ecdec['ok']||_0x355c1e?.[_0xb8e4f1(0x11b)]===![]||typeof _0x355c1e?.['code']==='number'&&_0x355c1e[_0xb8e4f1(0x138)]>=0x190;if(_0x374124)throw CliErrors['apiError'](_0x355c1e?.['errorMsg']||_0x355c1e?.[_0xb8e4f1(0xf8)]||_0x355c1e?.[_0xb8e4f1(0x124)]||_0xb8e4f1(0x123)+_0x4ecdec[_0xb8e4f1(0xfc)],_0x355c1e?.[_0xb8e4f1(0x127)]?'SkillHub\x20error\x20code:\x20'+_0x355c1e[_0xb8e4f1(0x127)]:undefined);return _0x355c1e?.['data']??_0x355c1e;}catch(_0x102776){if(_0x102776 instanceof Error&&_0x102776[_0xb8e4f1(0x12b)]===_0xb8e4f1(0x156))throw CliErrors[_0xb8e4f1(0xf5)]('Request\x20timeout:\x20'+_0x5f2a28[_0xb8e4f1(0x100)]());throw _0x102776;}finally{clearTimeout(_0x7a203e);}}function isSkillHubNotFoundResponse(_0x2fa124,_0x41655d){const _0x1d0718=a74_0x1a9d;if(_0x2fa124===0x194||_0x41655d?.[_0x1d0718(0x138)]===0x194)return!![];if(_0x2fa124!==0x190&&_0x41655d?.[_0x1d0718(0x138)]!==0x190)return![];const _0x4a2db9=[_0x41655d?.['msg'],_0x41655d?.['message'],_0x41655d?.[_0x1d0718(0xf2)],_0x41655d?.[_0x1d0718(0x167)]][_0x1d0718(0x15f)](_0xacff09=>typeof _0xacff09==='string')['join']('\x20');return/skill not found\b/i[_0x1d0718(0x11e)](_0x4a2db9);}async function skillHubBinaryRequest(_0x28adcf,_0x5aba77={}){const _0x261f3d=a74_0x1a9d,{query:_0x1bdb91,headers:headers={},timeout:timeout=0x7530}=_0x5aba77,_0x516d5a=_activeAK;if(!_0x516d5a)throw CliErrors['authRequired'](_0x261f3d(0xfb)+PRODUCT_CONFIG[_0x261f3d(0xe9)]+'.');const _0x56f90c=getSkillHubDomain()[_0x261f3d(0x13a)](/\/$/,''),_0x1106de=new URL(_0x28adcf,_0x56f90c+'/');if(_0x1bdb91)for(const [_0x327053,_0x134ad4]of Object[_0x261f3d(0x10e)](_0x1bdb91)){_0x134ad4!==undefined&&_0x134ad4!==null&&_0x1106de[_0x261f3d(0xfe)][_0x261f3d(0xf4)](_0x327053,String(_0x134ad4));}const _0x5a48bf=new AbortController(),_0x9b1be6=setTimeout(()=>_0x5a48bf['abort'](),timeout);try{const _0x55716d=await fetch(_0x1106de[_0x261f3d(0x100)](),{'method':_0x261f3d(0x120),'headers':{'Accept':_0x261f3d(0x11c),'X-Invoke-Source':PRODUCT_CONFIG[_0x261f3d(0x11f)],'X-User-AK':_0x516d5a,...headers},'signal':_0x5a48bf[_0x261f3d(0x126)]});if(!_0x55716d['ok']){let _0x1da09e;try{const _0x8536f=await _0x55716d[_0x261f3d(0xea)]();_0x1da09e=_0x8536f[_0x261f3d(0xf2)]||_0x8536f[_0x261f3d(0xf8)]||_0x8536f[_0x261f3d(0x124)]||_0x8536f['errorCode'];}catch{_0x1da09e=await _0x55716d[_0x261f3d(0x122)]()[_0x261f3d(0x147)](()=>undefined);}throw CliErrors['apiError'](_0x1da09e||_0x261f3d(0x123)+_0x55716d[_0x261f3d(0xfc)],_0x261f3d(0x106)+_0x1106de['toString']());}return Buffer[_0x261f3d(0x159)](await _0x55716d['arrayBuffer']());}catch(_0x24792f){if(_0x24792f instanceof Error&&_0x24792f['name']===_0x261f3d(0x156))throw CliErrors['apiError'](_0x261f3d(0xeb)+_0x1106de[_0x261f3d(0x100)]());throw _0x24792f;}finally{clearTimeout(_0x9b1be6);}}export async function getBffScriptInfo(_0x1005a2){const _0x5e618e=a74_0x1a9d,_0x342f7e=await apiRequest(_0x5e618e(0x170)+_0x1005a2);if(!_0x342f7e[_0x5e618e(0xf9)])throw CliErrors[_0x5e618e(0x148)](_0x5e618e(0x10f)+_0x1005a2);return _0x342f7e[_0x5e618e(0xf9)];}export async function getSqlQueryInfo(_0x590896,_0x1e071f){const _0x3abcc3=a74_0x1a9d,_0x58b8f6=await apiRequest(_0x3abcc3(0xed),{'method':'POST','body':{'appCode':_0x590896,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x1e071f}}),_0x4f274b=_0x58b8f6['data'],_0x377a3e=_0x4f274b&&typeof _0x4f274b===_0x3abcc3(0x15e)&&_0x3abcc3(0x109)in _0x4f274b?_0x4f274b[_0x3abcc3(0x109)]?.[0x0]:_0x4f274b&&typeof _0x4f274b==='object'&&_0x3abcc3(0x144)in _0x4f274b?_0x4f274b:undefined;if(!_0x377a3e)throw CliErrors[_0x3abcc3(0x148)]('SQL\x20query\x20not\x20found:\x20'+_0x1e071f);return _0x377a3e;}function isRemoteAppItem(_0x55cae0){const _0x2c4e9c=a74_0x1a9d;return!!_0x55cae0&&typeof _0x55cae0==='object'&&typeof _0x55cae0[_0x2c4e9c(0xec)]==='string'&&typeof _0x55cae0['appName']==='string';}function extractRemoteAppItems(_0x3195be){const _0x499299=a74_0x1a9d;if(Array[_0x499299(0x11d)](_0x3195be))return _0x3195be[_0x499299(0x15f)](isRemoteAppItem);if(!_0x3195be||typeof _0x3195be!==_0x499299(0x15e))throw CliErrors['apiError'](_0x499299(0x136));const _0x4ba298=_0x3195be;if(Array[_0x499299(0x11d)](_0x4ba298[_0x499299(0x109)]))return _0x4ba298['tableData'][_0x499299(0x15f)](isRemoteAppItem);if(_0x4ba298[_0x499299(0xf9)]&&typeof _0x4ba298[_0x499299(0xf9)]===_0x499299(0x15e)){const _0x10d56a=_0x4ba298['data'];if(Array['isArray'](_0x10d56a['tableData']))return _0x10d56a[_0x499299(0x109)]['filter'](isRemoteAppItem);}throw CliErrors[_0x499299(0xf5)](_0x499299(0x113));}export async function getMyApps(){const _0x4cf0e7=a74_0x1a9d,_0x2469aa=await apiRequest(_0x4cf0e7(0x118));return extractRemoteAppItems(_0x2469aa[_0x4cf0e7(0xf9)]);}export async function getLoginUserInfo(){const _0x3f6806=a74_0x1a9d,_0x4a004c=await apiRequest('/client/user/loginUserInfo');if(!_0x4a004c[_0x3f6806(0xf9)]||typeof _0x4a004c[_0x3f6806(0xf9)]!==_0x3f6806(0x15e)||Array['isArray'](_0x4a004c[_0x3f6806(0xf9)]))throw CliErrors[_0x3f6806(0xf5)](_0x3f6806(0x13b));return _0x4a004c[_0x3f6806(0xf9)];}export async function listDatasets(_0xe454b1,_0x153a48){const _0x1fe725=a74_0x1a9d,_0x1710c1=await apiRequest(_0x1fe725(0x10c),{'method':_0x1fe725(0xf6),'body':{'appCode':_0xe454b1,..._0x153a48?.[_0x1fe725(0x138)]&&{'code':_0x153a48[_0x1fe725(0x138)]},..._0x153a48?.['name']&&{'name':_0x153a48[_0x1fe725(0x12b)]}}});return extractList(_0x1710c1[_0x1fe725(0xf9)]);}export async function getDatasetDetail(_0x32c0c2){const _0x359d94=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0x32c0c2));return _0x359d94['data'];}export async function getDatasetSdkUsageDoc(_0x517094,_0x2328fc){const _0x1fd683=a74_0x1a9d,_0x52e5df=await toolboxRequest(_0x1fd683(0x10d),{'datasetCode':_0x517094,'appCode':_0x2328fc});return typeof _0x52e5df?.[_0x1fd683(0x13c)]===_0x1fd683(0x14c)?_0x52e5df[_0x1fd683(0x13c)]:'';}export async function uploadRuntimeFile(_0x3dbecc,_0x24b9aa){const _0x5abebf=a74_0x1a9d,_0xda47cd=await readFile(_0x24b9aa),_0x180429=new FormData();_0x180429[_0x5abebf(0xfa)](_0x5abebf(0xec),_0x3dbecc),_0x180429[_0x5abebf(0xfa)](_0x5abebf(0x16a),new Blob([new Uint8Array(_0xda47cd)]),basename(_0x24b9aa));const _0x538acb=await apiFormRequest(_0x5abebf(0x16c),_0x180429);return _0x538acb[_0x5abebf(0xf9)];}export async function queryRuntimeFileUrl(_0x28ab9a,_0x4fcb6b={}){const _0x2439ac=a74_0x1a9d,_0x9562a4=await apiRequest('/client/queryFileUrl',{'method':_0x2439ac(0xf6),'body':{'filePath':_0x28ab9a,'downloadFlag':_0x4fcb6b[_0x2439ac(0x139)]??![]}});return _0x9562a4['data'];}export async function recognizeRuntimeOcr(_0x1bab95,_0x3d0f79){const _0x4bc794=a74_0x1a9d,_0x2ebde5=await apiRequest(_0x4bc794(0x115),{'method':_0x4bc794(0xf6),'body':{'appCode':_0x1bab95,'url':_0x3d0f79['url'],'type':_0x3d0f79[_0x4bc794(0x14e)]}});return _0x2ebde5[_0x4bc794(0xf9)];}export async function getRuntimeAppConfigByKey(_0x16705c,_0x45d1d5){const _0x247771=a74_0x1a9d,_0x4e8341=new URLSearchParams({'appCode':_0x16705c,'key':_0x45d1d5}),_0x1ce541=await apiRequest(_0x247771(0x165)+_0x4e8341['toString']());if(!_0x1ce541[_0x247771(0xf9)])throw CliErrors['validation'](_0x247771(0x129)+_0x45d1d5);return _0x1ce541[_0x247771(0xf9)];}function a74_0x1a9d(_0x1ceb5c,_0x5ad11c){_0x1ceb5c=_0x1ceb5c-0xe1;const _0x4099ee=a74_0x4099();let _0x1a9d5f=_0x4099ee[_0x1ceb5c];return _0x1a9d5f;}export async function listRuntimeArtifacts(_0x54f836,_0x3a5769){const _0x44f726=a74_0x1a9d,_0x418c36=new URLSearchParams({'appCode':_0x54f836});if(_0x3a5769?.[_0x44f726(0x14f)])_0x418c36[_0x44f726(0xf4)](_0x44f726(0x14f),_0x3a5769[_0x44f726(0x14f)]);if(_0x3a5769?.[_0x44f726(0x12d)])_0x418c36[_0x44f726(0xf4)](_0x44f726(0x12d),_0x3a5769[_0x44f726(0x12d)]);if(_0x3a5769?.[_0x44f726(0x130)]!==undefined)_0x418c36[_0x44f726(0xf4)]('favorite',String(_0x3a5769[_0x44f726(0x130)]));const _0x21efde=await apiRequest(_0x44f726(0x103)+_0x418c36['toString']());return Array[_0x44f726(0x11d)](_0x21efde[_0x44f726(0xf9)])?_0x21efde[_0x44f726(0xf9)]:[];}export async function getRuntimeArtifact(_0x51bf69,_0x313d7c){const _0x3722a2=a74_0x1a9d,_0x3704d3=await apiRequest('/client/artifact/'+_0x51bf69+'?appCode='+encodeURIComponent(_0x313d7c));if(!_0x3704d3[_0x3722a2(0xf9)])throw CliErrors['validation']('Artifact\x20not\x20found:\x20id='+_0x51bf69);return _0x3704d3[_0x3722a2(0xf9)];}export async function createRuntimeArtifact(_0x4d7842,_0x4835ff){const _0xdf4c2e=a74_0x1a9d,_0x38a267=await apiRequest(_0xdf4c2e(0x134),{'method':'POST','body':{'appCode':_0x4d7842,..._0x4835ff}});return _0x38a267['data'];}export async function updateRuntimeArtifact(_0x1ea321,_0x9d4880,_0x5cc923){const _0x5411d6=a74_0x1a9d,_0x58f946=await apiRequest(_0x5411d6(0x132)+_0x1ea321+_0x5411d6(0x145),{'method':_0x5411d6(0xf6),'body':{'appCode':_0x9d4880,..._0x5cc923}});return _0x58f946['data'];}export async function listPersonalBffs(_0x1f5b7f){const _0x32e2b5=a74_0x1a9d,_0x5f376e=await apiRequest(_0x32e2b5(0x168)+encodeURIComponent(_0x1f5b7f));return Array['isArray'](_0x5f376e['data'])?_0x5f376e[_0x32e2b5(0xf9)]:[];}export async function getPersonalBff(_0xb60b00,_0x33c96){const _0x206772=a74_0x1a9d,_0x2d2268=await apiRequest('/client/runtime-bff/personal/'+_0xb60b00+_0x206772(0x160)+encodeURIComponent(_0x33c96));if(!_0x2d2268[_0x206772(0xf9)])throw CliErrors[_0x206772(0x148)](_0x206772(0xe5)+_0xb60b00);return _0x2d2268[_0x206772(0xf9)];}export async function createPersonalBff(_0x33123a,_0x3a51ca){const _0x216dff=a74_0x1a9d,_0x2a2566=await apiRequest(_0x216dff(0x15d),{'method':_0x216dff(0xf6),'body':{'appCode':_0x33123a,..._0x3a51ca}});return _0x2a2566[_0x216dff(0xf9)];}export async function updatePersonalBff(_0x1823fb,_0x59715c,_0x214f67){const _0x3a8276=a74_0x1a9d,_0x33a280=await apiRequest(_0x3a8276(0x102)+_0x1823fb+_0x3a8276(0x145),{'method':_0x3a8276(0xf6),'body':{'appCode':_0x59715c,..._0x214f67}});return _0x33a280['data'];}export async function executePersonalBff(_0x56766f,_0x452ab1,_0x29405b){const _0x43110f=a74_0x1a9d,_0x1e1c69=await apiRequest('/client/runtime-bff/personal/'+_0x56766f+_0x43110f(0x161)+encodeURIComponent(_0x452ab1),{'method':'POST','body':_0x29405b});return _0x1e1c69[_0x43110f(0xf9)];}export async function listPersonalKnowledgeBaseItems(_0x260102){const _0x28a36f=a74_0x1a9d,_0x51dd76=await apiRequest(_0x28a36f(0x110)+encodeURIComponent(_0x260102));return Array[_0x28a36f(0x11d)](_0x51dd76[_0x28a36f(0xf9)])?_0x51dd76['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x3727fe,_0x62850c){const _0x35aee0=a74_0x1a9d,_0x50a359=await apiRequest('/client/knowledge-base/personal/'+_0x3727fe+_0x35aee0(0x160)+encodeURIComponent(_0x62850c));if(!_0x50a359[_0x35aee0(0xf9)])throw CliErrors['validation']('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0x3727fe);return _0x50a359['data'];}export async function createPersonalKnowledgeBaseItem(_0x34e5be,_0x3a3c96){const _0x317e6a=a74_0x1a9d,_0x1b2f73=await apiRequest(_0x317e6a(0x152),{'method':_0x317e6a(0xf6),'body':{'appCode':_0x34e5be,..._0x3a3c96}});return _0x1b2f73[_0x317e6a(0xf9)];}export async function updatePersonalKnowledgeBaseItem(_0x5b9098,_0x5006ee,_0x466e08){const _0x47051a=a74_0x1a9d,_0x3952b0=await apiRequest(_0x47051a(0xee)+_0x5b9098+_0x47051a(0x145),{'method':_0x47051a(0xf6),'body':{'appCode':_0x5006ee,..._0x466e08}});return _0x3952b0[_0x47051a(0xf9)];}export async function searchKnowledgeBase(_0x43e2af,_0x1b0820){const _0xd3f46d=a74_0x1a9d,_0x8d9c76=await apiRequest(_0xd3f46d(0x12c),{'method':'POST','body':{'appCode':_0x43e2af,'query':_0x1b0820[_0xd3f46d(0xe1)],..._0x1b0820[_0xd3f46d(0x16e)]!==undefined?{'topK':_0x1b0820[_0xd3f46d(0x16e)]}:{}}});return Array['isArray'](_0x8d9c76[_0xd3f46d(0xf9)])?_0x8d9c76[_0xd3f46d(0xf9)]:[];}export async function getRuntimeSkillByCode(_0xa9dcd0,_0x32716d){const _0x417356=a74_0x1a9d,_0xd453e2=await skillHubJsonRequest(_0x417356(0x125)+encodeURIComponent(_0xa9dcd0)+'/'+encodeURIComponent(_0x32716d),{'allowNotFound':!![]});return _0xd453e2?skillHubRuntimeDetailToRuntimeSkill(_0xd453e2):undefined;}export async function listRuntimeSkills(_0x5c7910){const _0x1af1aa=a74_0x1a9d,_0x2f9300=await skillHubJsonRequest(_0x1af1aa(0x15c)+encodeURIComponent(_0x5c7910[_0x1af1aa(0xec)])+_0x1af1aa(0x108),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x5c7910[_0x1af1aa(0xec)],_0x2f9300,_0x5c7910['scope']??_0x1af1aa(0x146),_0x5c7910[_0x1af1aa(0x138)]);}export async function listPersonalRuntimeSkills(_0x5d89f4){const _0x2fdbbc=a74_0x1a9d;return(await listRuntimeSkills({'appCode':_0x5d89f4,'scope':'personal'}))[_0x2fdbbc(0x12a)];}export async function listCompanyRuntimeSkills(_0x136fdb){const _0x59bc01=a74_0x1a9d;return(await listRuntimeSkills({'appCode':_0x136fdb,'scope':_0x59bc01(0x12e)}))[_0x59bc01(0x12e)];}export async function listVisibleRuntimeSkills(_0x5813c2){const _0x116061=a74_0x1a9d;return(await listRuntimeSkills({'appCode':_0x5813c2,'scope':_0x116061(0x146)}))[_0x116061(0x15b)];}export async function createPersonalRuntimeSkill(_0xa37f4c,_0x5c4745){return publishRuntimeSkill(_0xa37f4c,_0x5c4745,{'visibility':'PRIVATE'});}export async function updatePersonalRuntimeSkill(_0x2d3f5c,_0x3a1b5c,_0x4f83ac){const _0x1858a2=a74_0x1a9d;return publishRuntimeSkill(_0x3a1b5c,{..._0x4f83ac,'skillCode':_0x4f83ac[_0x1858a2(0x105)]??_0x2d3f5c},{'visibility':_0x1858a2(0xf3)});}export async function publishCompanyRuntimeSkill(_0x5727bc,_0x4b8d08,_0x3bc3e2={}){const _0x15855f=a74_0x1a9d;return publishRuntimeSkill(_0x5727bc,_0x4b8d08,{'visibility':_0x15855f(0x135),'confirmWarnings':_0x3bc3e2[_0x15855f(0x114)]});}export async function validateRuntimeSkillPublish(_0x47ee81,_0x22b19b,_0x14fcb9){const _0xba0d0e=a74_0x1a9d,_0x26c54=buildRuntimeSkillPublishForm(_0x22b19b,_0x14fcb9['visibility']),_0x179f18=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x47ee81)+_0xba0d0e(0x164),{'method':_0xba0d0e(0xf6),'body':_0x26c54});return{'valid':_0x179f18['valid']===!![],'errors':Array[_0xba0d0e(0x11d)](_0x179f18[_0xba0d0e(0x14a)])?_0x179f18[_0xba0d0e(0x14a)]:[],'warnings':Array['isArray'](_0x179f18[_0xba0d0e(0x133)])?_0x179f18[_0xba0d0e(0x133)]:[],'resolvedSlug':_0x179f18[_0xba0d0e(0xff)],'resolvedVersion':_0x179f18['resolvedVersion']};}export async function downloadRuntimeSkillPackage(_0xcc2b54,_0x332d00,_0x8ecccd,_0x1e2401){const _0x344582=a74_0x1a9d;void _0xcc2b54;const _0x338ece=_0x1e2401?'/api/cli/v1/skills/'+encodeURIComponent(_0x8ecccd)+'/'+encodeURIComponent(_0x332d00)+_0x344582(0x140)+encodeURIComponent(_0x1e2401)+_0x344582(0xe6):'/api/cli/v1/skills/'+encodeURIComponent(_0x8ecccd)+'/'+encodeURIComponent(_0x332d00)+_0x344582(0xe6);return skillHubBinaryRequest(_0x338ece);}async function publishRuntimeSkill(_0xbceb86,_0x447361,_0x1758cb){const _0x3935db=a74_0x1a9d,_0x448fb2=buildRuntimeSkillPublishForm(_0x447361,_0x1758cb[_0x3935db(0x116)]),_0x5bf37c=await skillHubJsonRequest(_0x3935db(0xf7)+encodeURIComponent(_0xbceb86)+'/publish',{'method':'POST','query':{'confirmWarnings':_0x1758cb['confirmWarnings']===!![]?!![]:undefined},'body':_0x448fb2});return{'appCode':_0x5bf37c[_0x3935db(0x14b)]??_0xbceb86,'skillCode':_0x5bf37c['slug']??_0x447361['skillCode']??'','skillName':_0x447361[_0x3935db(0x128)]??_0x5bf37c[_0x3935db(0x157)]??_0x447361[_0x3935db(0x105)],'description':_0x447361['description'],'scope':skillHubVisibilityToScope(_0x5bf37c[_0x3935db(0x116)]??_0x1758cb[_0x3935db(0x116)])??'personal','version':_0x5bf37c[_0x3935db(0x15a)]??_0x447361[_0x3935db(0x15a)],'tags':_0x447361[_0x3935db(0x151)],'content':_0x447361['content']};}function buildRuntimeSkillPublishForm(_0x26d697,_0x9aee10){const _0x12e7bc=a74_0x1a9d,_0x5f1b87=new FormData();return _0x5f1b87[_0x12e7bc(0xf4)](_0x12e7bc(0x16a),runtimeSkillPackageFile(_0x26d697)),_0x26d697[_0x12e7bc(0x128)]?.[_0x12e7bc(0x117)]()&&_0x5f1b87[_0x12e7bc(0xf4)](_0x12e7bc(0x10a),_0x26d697[_0x12e7bc(0x128)]['trim']()),_0x5f1b87[_0x12e7bc(0xf4)](_0x12e7bc(0x116),_0x9aee10),_0x5f1b87;}function runtimeSkillPackageFile(_0x265ac5){const _0x26cd9c=a74_0x1a9d;if(!_0x265ac5['packageBase64'])throw CliErrors[_0x26cd9c(0x148)](_0x26cd9c(0x16b));const _0x563c91=Buffer[_0x26cd9c(0x159)](_0x265ac5[_0x26cd9c(0xf0)],'base64'),_0x2b82d7=new Blob([_0x563c91],{'type':_0x26cd9c(0x13e)}),_0x27c98b=(_0x265ac5[_0x26cd9c(0x105)]||_0x26cd9c(0xfd))+_0x26cd9c(0x169);if(typeof File!==_0x26cd9c(0xef))return new File([_0x2b82d7],_0x27c98b,{'type':_0x26cd9c(0x13e)});return _0x2b82d7;}function normalizeSkillHubRuntimeListResponse(_0x5b6009,_0x213383,_0x5aef50,_0x29b6aa){const _0x2e3f9c=a74_0x1a9d,_0x30299a=Array[_0x2e3f9c(0x11d)](_0x213383)?_0x213383:Array[_0x2e3f9c(0x11d)](_0x213383?.[_0x2e3f9c(0x150)])?_0x213383[_0x2e3f9c(0x150)]:[],_0x5b2118=_0x29b6aa?.['trim'](),_0x54db59=_0x30299a['filter'](_0x3328fc=>!_0x5b2118||_0x3328fc[_0x2e3f9c(0x157)]===_0x5b2118)[_0x2e3f9c(0xe7)](skillHubRuntimeItemToRuntimeSkill)[_0x2e3f9c(0x15f)](_0x41a96f=>Boolean(_0x41a96f)),_0x17247a=_0x54db59[_0x2e3f9c(0x15f)](_0x4425c5=>_0x4425c5[_0x2e3f9c(0x12f)]===_0x2e3f9c(0x12a)),_0xb5334a=_0x54db59[_0x2e3f9c(0x15f)](_0x1b892c=>_0x1b892c[_0x2e3f9c(0x12f)]==='company');return{'appCode':_0x5b6009,'personal':_0x5aef50===_0x2e3f9c(0x12e)?[]:_0x17247a,'company':_0x5aef50===_0x2e3f9c(0x12a)?[]:_0xb5334a,'effective':buildEffectiveRuntimeSkills(_0x17247a,_0xb5334a,_0x5aef50)};}function skillHubRuntimeItemToRuntimeSkill(_0x333c08){const _0xe1fee9=a74_0x1a9d,_0xdaee73=_0x333c08[_0xe1fee9(0x157)]?.[_0xe1fee9(0x117)](),_0x43bf9c=skillHubVisibilityToScope(_0x333c08[_0xe1fee9(0x116)]);if(!_0xdaee73||!_0x43bf9c)return undefined;return{'id':_0x333c08['id'],'appCode':_0x333c08['namespace'],'skillCode':_0xdaee73,'skillName':_0x333c08[_0xe1fee9(0x10a)]??_0xdaee73,'description':_0x333c08[_0xe1fee9(0x153)],'scope':_0x43bf9c,'version':skillHubRuntimeItemVersion(_0x333c08),'status':_0x333c08['status']};}function skillHubRuntimeDetailToRuntimeSkill(_0x530fbf){const _0xaca329=a74_0x1a9d,_0x3b4900=_0x530fbf['slug']?.[_0xaca329(0x117)]();if(!_0x3b4900)return undefined;return{'id':_0x530fbf['id'],'appCode':_0x530fbf['namespace'],'skillCode':_0x3b4900,'skillName':_0x530fbf[_0xaca329(0x10a)]??_0x3b4900,'description':_0x530fbf[_0xaca329(0x153)],'scope':skillHubVisibilityToScope(_0x530fbf[_0xaca329(0x116)])??_0x530fbf[_0xaca329(0x116)]?.[_0xaca329(0xe8)](),'version':skillHubRuntimeItemVersion(_0x530fbf),'status':_0x530fbf[_0xaca329(0xfc)]};}function skillHubVisibilityToScope(_0x471315){const _0x3adae3=a74_0x1a9d;if(_0x471315==='PRIVATE')return _0x3adae3(0x12a);if(_0x471315==='NAMESPACE_ONLY')return _0x3adae3(0x12e);return undefined;}function skillHubRuntimeItemVersion(_0x90388){const _0x36d775=a74_0x1a9d;return _0x90388[_0x36d775(0x166)]?.[_0x36d775(0x15a)]??_0x90388[_0x36d775(0x154)]?.[_0x36d775(0x15a)]??_0x90388[_0x36d775(0x10b)]?.[_0x36d775(0x15a)];}function buildEffectiveRuntimeSkills(_0x155c1a,_0x32297b,_0x50015f){const _0x134eeb=a74_0x1a9d;if(_0x50015f===_0x134eeb(0x12a))return _0x155c1a;if(_0x50015f===_0x134eeb(0x12e))return _0x32297b;const _0x21f3a5=new Map();for(const _0x174820 of _0x32297b){_0x21f3a5[_0x134eeb(0xf4)](_0x174820[_0x134eeb(0x105)],_0x174820);}for(const _0x5de7d7 of _0x155c1a){_0x21f3a5[_0x134eeb(0xf4)](_0x5de7d7[_0x134eeb(0x105)],_0x5de7d7);}return Array[_0x134eeb(0x159)](_0x21f3a5['values']());}function a74_0x4099(){const _0x4da765=['/execute?appCode=','485OvBtFq','arrayBuffer','/publish/validate','/client/app-config/getByKey?','publishedVersion','error','/client/runtime-bff/personal/list?appCode=','.zip','file','Missing\x20Skill\x20package\x20payload.','/client/uploadFile','29168556LsBehF','topK','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/bff/query/','query','authRequired','Toolbox\x20API\x20error','9NnwzQY','Personal\x20BFF\x20not\x20found:\x20id=','/download','map','toLowerCase','newConfigFileName','json','Request\x20timeout:\x20','appCode','/client/sql/query','/client/knowledge-base/personal/','undefined','packageBase64','API\x20error\x20code:\x20','errorMsg','PRIVATE','set','apiError','POST','/api/cli/v1/skills/','message','data','append','Configure\x20accessKey\x20in\x20','status','skill','searchParams','resolvedSlug','toString','107412gdwELc','/client/runtime-bff/personal/','/client/artifact/list?','boolean','skillCode','Download\x20failed:\x20','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/skills','tableData','displayName','ownerPreviewVersion','/client/dataset/list','api-doc-generator','entries','BFF\x20script\x20not\x20found:\x20id=','/client/knowledge-base/personal/list?appCode=','99UizNDh','1KXqNmm','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','confirmWarnings','/client/ocr','visibility','trim','/client/app/my-apps','Check\x20your\x20credentials\x20and\x20try\x20again.','stringify','success','application/octet-stream','isArray','test','invokeSource','GET','1256808scEubo','text','SkillHub\x20API\x20error:\x20','msg','/api/v1/skills/','signal','errorCode','skillName','App\x20config\x20not\x20found:\x20key=','personal','name','/client/knowledge-base/search','source','company','scope','favorite','API\x20error:\x20','/client/artifact/','warnings','/client/artifact/create','NAMESPACE_ONLY','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','1821580IWVmHh','code','download','replace','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','markdown','abort','application/zip','8310337KivWct','/versions/','4qorRRm','11464168FxGZNs','application/json','sqlCode','/update','all','catch','validation','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','errors','namespace','string','Toolbox\x20error\x20code:\x20','type','artifactType','items','tags','/client/knowledge-base/personal/create','summary','headlineVersion','214599LzkfxD','AbortError','slug','/api/node-toolbox/','from','version','effective','/api/runtime/v1/namespaces/','/client/runtime-bff/personal/create','object','filter','?appCode='];a74_0x4099=function(){return _0x4da765;};return a74_0x4099();}function normalizeRuntimeSkillListResponse(_0x123e34,_0x3c13ad){const _0x55ed97=a74_0x1a9d;if(Array['isArray'](_0x3c13ad)){const _0x574bd9=_0x3c13ad[_0x55ed97(0x15f)](_0x502839=>_0x502839[_0x55ed97(0x12f)]===_0x55ed97(0x12a)),_0x51ffd7=_0x3c13ad[_0x55ed97(0x15f)](_0x1b8131=>_0x1b8131[_0x55ed97(0x12f)]===_0x55ed97(0x12e));return{'appCode':_0x123e34,'personal':_0x574bd9,'company':_0x51ffd7,'effective':[..._0x51ffd7,..._0x574bd9]};}return{'appCode':_0x3c13ad?.[_0x55ed97(0xec)]??_0x123e34,'personal':Array['isArray'](_0x3c13ad?.['personal'])?_0x3c13ad[_0x55ed97(0x12a)]:[],'company':Array[_0x55ed97(0x11d)](_0x3c13ad?.[_0x55ed97(0x12e)])?_0x3c13ad['company']:[],'effective':Array[_0x55ed97(0x11d)](_0x3c13ad?.[_0x55ed97(0x15b)])?_0x3c13ad[_0x55ed97(0x15b)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2549cc,_0x280be7){const _0x455b05=a75_0x5463,_0x24f8bc=_0x2549cc();while(!![]){try{const _0x152584=-parseInt(_0x455b05(0x1cd))/0x1*(parseInt(_0x455b05(0x1d1))/0x2)+parseInt(_0x455b05(0x1d5))/0x3*(-parseInt(_0x455b05(0x1c4))/0x4)+-parseInt(_0x455b05(0x1ca))/0x5*(-parseInt(_0x455b05(0x1d2))/0x6)+parseInt(_0x455b05(0x1c8))/0x7+-parseInt(_0x455b05(0x1d3))/0x8+-parseInt(_0x455b05(0x1d4))/0x9*(parseInt(_0x455b05(0x1cc))/0xa)+parseInt(_0x455b05(0x1cf))/0xb*(parseInt(_0x455b05(0x1c7))/0xc);if(_0x152584===_0x280be7)break;else _0x24f8bc['push'](_0x24f8bc['shift']());}catch(_0x5d8744){_0x24f8bc['push'](_0x24f8bc['shift']());}}}(a75_0x3b11,0x4820c));function a75_0x3b11(){const _0x8ea433=['452365TpwsuQ','dbtableConfig','480bjGiKT','141583cAlzpo','set','530981dmnbfr','has','2bUALkX','24pTPIDu','1447656tAMRmV','104373UebNBx','3XaxJAo','get','find','1291676pRPpWs','db-','dbName','156DWYQKB','3556952spBWZK','dbId'];a75_0x3b11=function(){return _0x8ea433;};return a75_0x3b11();}import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x545141){const _0x2622bc=a75_0x5463;if(cache[_0x2622bc(0x1d0)](_0x545141))return cache[_0x2622bc(0x1d6)](_0x545141);const _0x503d6e=await listDatasets(_0x545141),_0x3c412f=new Map();for(const _0x21a277 of _0x503d6e){const _0x320ec9=_0x21a277[_0x2622bc(0x1cb)];_0x320ec9?.[_0x2622bc(0x1c9)]!=null&&_0x3c412f[_0x2622bc(0x1ce)](_0x320ec9[_0x2622bc(0x1c9)],_0x320ec9[_0x2622bc(0x1c6)]??_0x2622bc(0x1c5)+_0x320ec9['dbId']);}const _0x1f9a1d=[..._0x3c412f['entries']()]['map'](([_0x238821,_0x26e8a4])=>({'dbId':_0x238821,'dbName':_0x26e8a4}));return cache[_0x2622bc(0x1ce)](_0x545141,_0x1f9a1d),_0x1f9a1d;}function a75_0x5463(_0x1ed80a,_0x5f05de){_0x1ed80a=_0x1ed80a-0x1c3;const _0x3b114b=a75_0x3b11();let _0x5463ec=_0x3b114b[_0x1ed80a];return _0x5463ec;}export async function getDbName(_0x4e4334,_0x373846){const _0x3f1e32=a75_0x5463;try{const _0x476b09=await listDatabases(_0x4e4334);return _0x476b09[_0x3f1e32(0x1c3)](_0x616767=>_0x616767['dbId']===_0x373846)?.['dbName'];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5cafe6,_0x4d6209){const _0x3448bc=a76_0x4440,_0x2372d7=_0x5cafe6();while(!![]){try{const _0x58d8b4=-parseInt(_0x3448bc(0xb2))/0x1+-parseInt(_0x3448bc(0xc3))/0x2*(parseInt(_0x3448bc(0xb0))/0x3)+parseInt(_0x3448bc(0xb3))/0x4*(parseInt(_0x3448bc(0xb8))/0x5)+-parseInt(_0x3448bc(0xbf))/0x6*(parseInt(_0x3448bc(0xc6))/0x7)+-parseInt(_0x3448bc(0xb1))/0x8*(-parseInt(_0x3448bc(0xbb))/0x9)+-parseInt(_0x3448bc(0xc1))/0xa*(-parseInt(_0x3448bc(0xad))/0xb)+parseInt(_0x3448bc(0xbe))/0xc*(-parseInt(_0x3448bc(0xb6))/0xd);if(_0x58d8b4===_0x4d6209)break;else _0x2372d7['push'](_0x2372d7['shift']());}catch(_0x40b723){_0x2372d7['push'](_0x2372d7['shift']());}}}(a76_0x5462,0x43f74));function a76_0x5462(){const _0x470a1a=['95OwyOMX','aggregate','map','3080898PckXkP','getOne','models','791652ooadVW','589206SnIOAW','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','10tuxzRK','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','62158HvzZVQ','env','data\x20aggregate\x20--params.aggregate[','7uypUTF','object','delete','execute','accessKey','batchCreate','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','isArray','\x22.\x20','2539988EFixmC','bff','field','6DZDTwq','8ILIZAl','364048Hklhra','103884KIXxrf','trim','validation','52dwybpk','update'];a76_0x5462=function(){return _0x470a1a;};return a76_0x5462();}import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';function a76_0x4440(_0x3775dd,_0x5dbd30){_0x3775dd=_0x3775dd-0xad;const _0x546283=a76_0x5462();let _0x4440e2=_0x546283[_0x3775dd];return _0x4440e2;}import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x42b74b){const _0x3dc4f4=a76_0x4440;_client=createClient({'appCode':_0x42b74b['appCode'],'env':_0x42b74b[_0x3dc4f4(0xc4)],'authMode':_0x42b74b['authMode'],..._0x42b74b[_0x3dc4f4(0xca)]?{'accessKey':_0x42b74b[_0x3dc4f4(0xca)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource']}}});}function ensureClient(){const _0x4fcaf8=a76_0x4440;if(!_client)throw new Error(_0x4fcaf8(0xc2));return _client;}function normalizeAggregateParams(_0x4af326){const _0x3b57cf=a76_0x4440,_0xb35fd4=_0x4af326[_0x3b57cf(0xb9)];if(_0xb35fd4===undefined)return _0x4af326;if(!Array['isArray'](_0xb35fd4))throw CliErrors[_0x3b57cf(0xb5)]('data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.');return{..._0x4af326,'aggregate':_0xb35fd4[_0x3b57cf(0xba)]((_0x374800,_0x249c80)=>{const _0x5c30ae=_0x3b57cf;if(!_0x374800||typeof _0x374800!==_0x5c30ae(0xc7)||Array[_0x5c30ae(0xcd)](_0x374800))throw CliErrors['validation'](_0x5c30ae(0xc5)+_0x249c80+']\x20must\x20be\x20an\x20object.');const _0x317d33=_0x374800['column']??_0x374800[_0x5c30ae(0xaf)];if(typeof _0x317d33!=='string'||_0x317d33[_0x5c30ae(0xb4)]()==='')throw CliErrors[_0x5c30ae(0xb5)](_0x5c30ae(0xc5)+_0x249c80+']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.');const _0x227fad={..._0x374800,'column':_0x317d33};return delete _0x227fad['field'],_0x227fad;})};}export async function executeData(_0xcf74df,_0x19d9f6,_0x3dbffe){const _0x1ce6ea=a76_0x4440,_0x1e2760=ensureClient(),_0xc3e404='dataset_'+_0xcf74df,_0x3e043b=_0x1e2760[_0x1ce6ea(0xbd)][_0xc3e404];if(!_0x3e043b||typeof _0x3e043b[_0x19d9f6]!=='function')throw new Error('SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22'+_0x19d9f6+_0x1ce6ea(0xce)+'Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.');if(_0x19d9f6===_0x1ce6ea(0xcb))return _0x3e043b[_0x1ce6ea(0xcb)](parseBatchCreateItemsFromParams(_0x3dbffe));const _0x1bc160=_0x3dbffe!==undefined&&_0x3dbffe!==null&&!Array['isArray'](_0x3dbffe)?_0x3dbffe:{};switch(_0x19d9f6){case _0x1ce6ea(0xbc):{const _0x4dd5ac=_0x1bc160['id'];if(_0x4dd5ac===undefined||_0x4dd5ac===null)throw new Error(_0x1ce6ea(0xc0));return _0x3e043b[_0x1ce6ea(0xbc)](_0x4dd5ac);}case _0x1ce6ea(0xb7):{const {id:_0x49a10d,..._0x4e689f}=_0x1bc160;if(_0x49a10d===undefined||_0x49a10d===null)throw new Error(_0x1ce6ea(0xcc));return _0x3e043b['update'](_0x49a10d,_0x4e689f);}case _0x1ce6ea(0xc8):{const _0x3f2c9b=_0x1bc160['id'];if(_0x3f2c9b===undefined||_0x3f2c9b===null)throw new Error('delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x3e043b[_0x1ce6ea(0xc8)](_0x3f2c9b);}case _0x1ce6ea(0xb9):return _0x3e043b[_0x1ce6ea(0xb9)](normalizeAggregateParams(_0x1bc160));default:return _0x3e043b[_0x19d9f6](_0x1bc160);}}export async function executeSdkSql(_0x4086b6,_0x30ae80){const _0x3c40ba=a76_0x4440,_0x99d6cb=ensureClient();return _0x99d6cb['sql'][_0x3c40ba(0xc9)]({'sqlCode':_0x4086b6,'params':_0x30ae80});}export async function executeSdkBff(_0x345658,_0x4f6d85){const _0x4d6f2b=a76_0x4440,_0x4c3f4f=ensureClient();return _0x4c3f4f[_0x4d6f2b(0xae)][_0x4d6f2b(0xc9)]({'scriptName':_0x345658,'params':_0x4f6d85});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a77_0xaa1d(_0x41335c,_0x3895b6){_0x41335c=_0x41335c-0x92;const _0x433e87=a77_0x433e();let _0xaa1db1=_0x433e87[_0x41335c];return _0xaa1db1;}const a77_0x1230ff=a77_0xaa1d;(function(_0x478d1f,_0x5bbc05){const _0x18ea3b=a77_0xaa1d,_0x5b3ad8=_0x478d1f();while(!![]){try{const _0x47a676=-parseInt(_0x18ea3b(0x94))/0x1+parseInt(_0x18ea3b(0x92))/0x2+-parseInt(_0x18ea3b(0x9f))/0x3*(parseInt(_0x18ea3b(0x95))/0x4)+parseInt(_0x18ea3b(0x9a))/0x5+parseInt(_0x18ea3b(0x9e))/0x6*(-parseInt(_0x18ea3b(0x9d))/0x7)+-parseInt(_0x18ea3b(0x93))/0x8*(parseInt(_0x18ea3b(0x9b))/0x9)+parseInt(_0x18ea3b(0xa0))/0xa;if(_0x47a676===_0x5bbc05)break;else _0x5b3ad8['push'](_0x5b3ad8['shift']());}catch(_0x857ee4){_0x5b3ad8['push'](_0x5b3ad8['shift']());}}}(a77_0x433e,0x7ed80));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a77_0x433e(){const _0x5972ca=['635740RVtBsR','35468VRfdKj','Configure\x20accessKey\x20in\x20','\x20or\x20run\x20`','Set\x20appcode\x20via\x20--appcode\x20or\x20','\x20auth\x20login`.','3956880JdZPAJ','45fOEMsp','newConfigFileName','7epcbXq','1608972dAwqNt','261wsmiUR','4289700zqOfAY','2012204yPrwVh','50504hRkdTh'];a77_0x433e=function(){return _0x5972ca;};return a77_0x433e();}import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a77_0x1230ff(0x96)+PRODUCT_CONFIG[a77_0x1230ff(0x9c)]+a77_0x1230ff(0x97)+CLI_BIN_NAME+a77_0x1230ff(0x99),'configMissingHint':a77_0x1230ff(0x98)+PRODUCT_CONFIG[a77_0x1230ff(0x9c)]+'.','notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20'+PRODUCT_CONFIG['newConfigFileName']+'\x20file.'});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a78_0x365b(_0x2bf43c,_0x16bc3a){_0x2bf43c=_0x2bf43c-0x1a6;var _0x49f1fc=a78_0x49f1();var _0x365b2a=_0x49f1fc[_0x2bf43c];return _0x365b2a;}function a78_0x49f1(){var _0x1f8973=['1199064KLDAjQ','2tCLINv','1247568cecKlu','2326160Qdmyve','6162723gqhbhU','88032qrazBz','1320261uLyqog','306597CubkcH','35vmekSu'];a78_0x49f1=function(){return _0x1f8973;};return a78_0x49f1();}(function(_0x30306b,_0x577446){var _0x22a6a2=a78_0x365b,_0x3c9bc5=_0x30306b();while(!![]){try{var _0x6e2058=parseInt(_0x22a6a2(0x1ad))/0x1*(parseInt(_0x22a6a2(0x1a7))/0x2)+-parseInt(_0x22a6a2(0x1ac))/0x3+-parseInt(_0x22a6a2(0x1a6))/0x4+-parseInt(_0x22a6a2(0x1ae))/0x5*(-parseInt(_0x22a6a2(0x1ab))/0x6)+parseInt(_0x22a6a2(0x1a8))/0x7+-parseInt(_0x22a6a2(0x1a9))/0x8+parseInt(_0x22a6a2(0x1aa))/0x9;if(_0x6e2058===_0x577446)break;else _0x3c9bc5['push'](_0x3c9bc5['shift']());}catch(_0x39a75a){_0x3c9bc5['push'](_0x3c9bc5['shift']());}}}(a78_0x49f1,0x3aff1));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a78_0x20154a}from'@lovrabet/cli-framework';export function buildAllFlags(_0x49f5d2){return a78_0x20154a(_0x49f5d2,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x198718,_0x476fb4){const _0x3701e6=a79_0xb818,_0x15e202=_0x198718();while(!![]){try{const _0x347366=-parseInt(_0x3701e6(0x18a))/0x1*(parseInt(_0x3701e6(0x17d))/0x2)+parseInt(_0x3701e6(0x180))/0x3*(parseInt(_0x3701e6(0x188))/0x4)+parseInt(_0x3701e6(0x189))/0x5*(parseInt(_0x3701e6(0x186))/0x6)+parseInt(_0x3701e6(0x185))/0x7+parseInt(_0x3701e6(0x182))/0x8*(parseInt(_0x3701e6(0x17f))/0x9)+parseInt(_0x3701e6(0x183))/0xa+-parseInt(_0x3701e6(0x181))/0xb*(parseInt(_0x3701e6(0x187))/0xc);if(_0x347366===_0x476fb4)break;else _0x15e202['push'](_0x15e202['shift']());}catch(_0x41e5ea){_0x15e202['push'](_0x15e202['shift']());}}}(a79_0x1bca,0xa747f));export function dryRun(_0xbf5dcb,_0x1fb134){const _0x222c2a={'method':_0xbf5dcb,'url':_0x1fb134},_0x43c58e={'body'(_0x4366b0){const _0x53d5fa=a79_0xb818;return _0x222c2a[_0x53d5fa(0x17e)]=_0x4366b0,_0x43c58e;},'description'(_0x35b2f7){const _0x46b04e=a79_0xb818;return _0x222c2a[_0x46b04e(0x184)]=_0x35b2f7,_0x43c58e;},'build'(){return{..._0x222c2a};}};return _0x43c58e;}function a79_0xb818(_0x10800e,_0x35d364){_0x10800e=_0x10800e-0x17d;const _0x1bca83=a79_0x1bca();let _0xb81893=_0x1bca83[_0x10800e];return _0xb81893;}function a79_0x1bca(){const _0x35a716=['33895qhRTCA','2cRQsxw','1150918YAbQeg','body','90sYuboB','927QtLpxJ','33rwfozS','289344kkSElA','10893050bwMlfo','description','6562367EIjCOM','462ixbisL','6493764HxywYm','7108IFzaaP'];a79_0x1bca=function(){return _0x35a716;};return a79_0x1bca();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a80_0x57b81f=a80_0x8210;(function(_0x3e3a77,_0x46a6ae){const _0x570495=a80_0x8210,_0x46b684=_0x3e3a77();while(!![]){try{const _0x4d9c8a=parseInt(_0x570495(0x1e1))/0x1+parseInt(_0x570495(0x1e4))/0x2*(parseInt(_0x570495(0x1e5))/0x3)+-parseInt(_0x570495(0x1e2))/0x4+parseInt(_0x570495(0x1df))/0x5+parseInt(_0x570495(0x1de))/0x6+parseInt(_0x570495(0x1e0))/0x7+-parseInt(_0x570495(0x1e3))/0x8;if(_0x4d9c8a===_0x46a6ae)break;else _0x46b684['push'](_0x46b684['shift']());}catch(_0x4cc7ee){_0x46b684['push'](_0x46b684['shift']());}}}(a80_0xb7db,0xec6e3));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers['parseFlags'];function a80_0x8210(_0x24b46b,_0x451e2a){_0x24b46b=_0x24b46b-0x1dd;const _0xb7db0f=a80_0xb7db();let _0x821054=_0xb7db0f[_0x24b46b];return _0x821054;}function a80_0xb7db(){const _0x533ac1=['1869455mcsYJt','9735523zqWZZn','630418TVeBUe','4080812oaXyfh','16006008bfzKYA','46646DPwzgc','99cetkoa','validateFlags','4947696JMGhPx'];a80_0xb7db=function(){return _0x533ac1;};return a80_0xb7db();}export const validateFlags=helpers[a80_0x57b81f(0x1dd)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a81_0x21b0(_0x138fd0,_0x273ba5){_0x138fd0=_0x138fd0-0xbf;const _0x26df70=a81_0x26df();let _0x21b0f2=_0x26df70[_0x138fd0];return _0x21b0f2;}(function(_0x3f15d2,_0x4d93db){const _0x2d936b=a81_0x21b0,_0x4fa787=_0x3f15d2();while(!![]){try{const _0x1f1918=parseInt(_0x2d936b(0xca))/0x1*(-parseInt(_0x2d936b(0xce))/0x2)+parseInt(_0x2d936b(0xcc))/0x3+-parseInt(_0x2d936b(0xc4))/0x4*(-parseInt(_0x2d936b(0xcd))/0x5)+parseInt(_0x2d936b(0xc8))/0x6+parseInt(_0x2d936b(0xbf))/0x7+parseInt(_0x2d936b(0xcb))/0x8+-parseInt(_0x2d936b(0xcf))/0x9;if(_0x1f1918===_0x4d93db)break;else _0x4fa787['push'](_0x4fa787['shift']());}catch(_0x3deeca){_0x4fa787['push'](_0x4fa787['shift']());}}}(a81_0x26df,0x77f4b));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{getDynamicServiceDefinitions,getDynamicServiceEntry,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a81_0x26df(){const _0x3ed17d=['822500wZfvkM','filter','get','newConfigFileName','\x20or\x20--appcode).','3076VnYQLC','map','has','Requires\x20appcode\x20(set\x20via\x20','5508858QKxpvp','service','541737BICsRl','1743976uKedzH','1190721etxRbN','1295tLoepJ','2CewsKY','7349778kFQeAb','generateFullHelp'];a81_0x26df=function(){return _0x3ed17d;};return a81_0x26df();}function createGenerators(){const _0x570f5=a81_0x21b0;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(serviceRegistry,safeListDynamicServiceEntries()),'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x570f5(0xc7)+PRODUCT_CONFIG[_0x570f5(0xc2)]+_0x570f5(0xc3)});}export function generateCommandHelp(_0x419cee){return createGenerators()['generateCommandHelp'](_0x419cee);}export function generateServiceHelp(_0x5d3864){return createGenerators()['generateServiceHelp'](_0x5d3864);}export function generateFullHelp(){const _0x299871=a81_0x21b0;return createGenerators()[_0x299871(0xd0)]();}function getAnyServiceEntry(_0x487b37){const _0x54b7c9=getServiceEntry(_0x487b37);if(_0x54b7c9)return _0x54b7c9;try{return getDynamicServiceEntry(_0x487b37);}catch{return undefined;}}function getAnyServiceDefinitions(_0x90238a){const _0x506db1=a81_0x21b0,_0x2050b9=serviceGroups[_0x506db1(0xc1)](_0x90238a);if(_0x2050b9)return _0x2050b9;try{return getDynamicServiceDefinitions(_0x90238a);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0xe6feb1=a81_0x21b0,_0x3a0bf0=new Set(serviceRegistry[_0xe6feb1(0xc5)](_0x4df3be=>_0x4df3be['service']));try{return listDynamicServiceEntries()[_0xe6feb1(0xc0)](_0x23e9e1=>!_0x3a0bf0[_0xe6feb1(0xc6)](_0x23e9e1[_0xe6feb1(0xc9)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a82_0x5847(_0x17ff01,_0x4bc290){_0x17ff01=_0x17ff01-0x1bb;var _0x3581de=a82_0x3581();var _0x5847b7=_0x3581de[_0x17ff01];return _0x5847b7;}(function(_0x216b45,_0x26c277){var _0x4f10b0=a82_0x5847,_0x41562e=_0x216b45();while(!![]){try{var _0x1f0e62=-parseInt(_0x4f10b0(0x1bc))/0x1+-parseInt(_0x4f10b0(0x1c2))/0x2*(-parseInt(_0x4f10b0(0x1c0))/0x3)+-parseInt(_0x4f10b0(0x1c5))/0x4+-parseInt(_0x4f10b0(0x1c1))/0x5*(parseInt(_0x4f10b0(0x1bb))/0x6)+parseInt(_0x4f10b0(0x1bf))/0x7+-parseInt(_0x4f10b0(0x1c3))/0x8*(parseInt(_0x4f10b0(0x1bd))/0x9)+parseInt(_0x4f10b0(0x1c4))/0xa*(parseInt(_0x4f10b0(0x1be))/0xb);if(_0x1f0e62===_0x26c277)break;else _0x41562e['push'](_0x41562e['shift']());}catch(_0x5bd737){_0x41562e['push'](_0x41562e['shift']());}}}(a82_0x3581,0x88cf4));export{runCommand}from'../framework/runner.js';function a82_0x3581(){var _0x12be00=['2393520IhRxRV','6322146jyzHma','444283VOQkPN','9xzmHBE','23980olmFbL','5231471XhDRkP','2579721fRHHQK','5WmAjiL','2uOEvXr','8538512XjkOsP','9710kVgeDW'];a82_0x3581=function(){return _0x12be00;};return a82_0x3581();}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';export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3067e3,_0x489552){const _0x24082c=a83_0x109c,_0x2a9755=_0x3067e3();while(!![]){try{const _0x177c8b=-parseInt(_0x24082c(0xb2))/0x1*(-parseInt(_0x24082c(0xb0))/0x2)+-parseInt(_0x24082c(0xae))/0x3+parseInt(_0x24082c(0xa9))/0x4*(parseInt(_0x24082c(0xac))/0x5)+-parseInt(_0x24082c(0xa7))/0x6*(parseInt(_0x24082c(0xaa))/0x7)+parseInt(_0x24082c(0xa6))/0x8+parseInt(_0x24082c(0xad))/0x9*(parseInt(_0x24082c(0xa8))/0xa)+-parseInt(_0x24082c(0xb1))/0xb;if(_0x177c8b===_0x489552)break;else _0x2a9755['push'](_0x2a9755['shift']());}catch(_0x3855ab){_0x2a9755['push'](_0x2a9755['shift']());}}}(a83_0x538f,0x5c901));function a83_0x109c(_0xf9ef5d,_0x5d33c9){_0xf9ef5d=_0xf9ef5d-0xa2;const _0x538fb7=a83_0x538f();let _0x109c9f=_0x538fb7[_0xf9ef5d];return _0x109c9f;}import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a83_0x538f(){const _0x4c8fbc=['message','pretty','format','update','406592nEZvBS','60BVzXPx','1522510YHfGTs','4wxRODS','55321QgFNLR','_notice','145165tovaBd','9kQCUbN','1317987IPFzBS','error','138iJfueE','222156gtaZjQ','9936cUwDzV'];a83_0x538f=function(){return _0x4c8fbc;};return a83_0x538f();}import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0xeea882,_0x29cc76){const _0x22aee3=a83_0x109c,_0x1694fc=_0xeea882[_0x22aee3(0xab)],{_notice:_0x3dbc98,..._0x589ab5}=_0xeea882;void _0x3dbc98,baseFormatOutput(_0x589ab5,_0x29cc76),_0x29cc76[_0x22aee3(0xa4)]===_0x22aee3(0xa3)&&printPrettyNotice(_0x1694fc);}function printPrettyNotice(_0x273e52){const _0x56d431=a83_0x109c;if(!_0x273e52?.[_0x56d431(0xa5)])return;console[_0x56d431(0xaf)](_0x273e52[_0x56d431(0xa5)][_0x56d431(0xa2)]+'\x20('+_0x273e52['update']['url']+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe5eaf1,_0x26d1e0){const _0x30b9af=a84_0x5c38,_0x1bea02=_0xe5eaf1();while(!![]){try{const _0x28e03b=parseInt(_0x30b9af(0x136))/0x1+-parseInt(_0x30b9af(0x148))/0x2+parseInt(_0x30b9af(0x13c))/0x3*(parseInt(_0x30b9af(0x13a))/0x4)+-parseInt(_0x30b9af(0x13f))/0x5*(parseInt(_0x30b9af(0x146))/0x6)+parseInt(_0x30b9af(0x14d))/0x7+parseInt(_0x30b9af(0x14e))/0x8*(-parseInt(_0x30b9af(0x12d))/0x9)+parseInt(_0x30b9af(0x142))/0xa;if(_0x28e03b===_0x26d1e0)break;else _0x1bea02['push'](_0x1bea02['shift']());}catch(_0x1b665f){_0x1bea02['push'](_0x1bea02['shift']());}}}(a84_0x3169,0xc499a));function a84_0x3169(){const _0x472288=['7251352zqmtWk','replace','app','alias','sticky','version','yes','9bgmhdr','format','slice','appcode','string','env','help','global','name','86262SsAQGH','nonInteractive','toUpperCase','corrected','52xlNpTC','original','100254QbedTH','boolean','toLowerCase','20385vpwPZE','has','get','7654970UUeOnL','indexOf','type','non-interactive','306rmfmmH','entries','1657462TSWCNn','keys','push','add','set','10235106POlFKe'];a84_0x3169=function(){return _0x472288;};return a84_0x3169();}function toKebab(_0x1a115f){const _0x3af61a=a84_0x5c38;return _0x1a115f[_0x3af61a(0x14f)](/_/g,'-')['replace'](/-([A-Z]+)/g,(_0x27ccba,_0x2b1217)=>'-'+_0x2b1217[_0x3af61a(0x13e)]())[_0x3af61a(0x14f)](/([a-z0-9])([A-Z])/g,(_0x4dec03,_0x5f15ce,_0xc5fc2b)=>_0x5f15ce+'-'+_0xc5fc2b)[_0x3af61a(0x13e)]();}function buildKnownFlags(_0x326452){const _0x3d1040=a84_0x5c38,_0x22da7a=new Set();for(const _0x58a7da of _0x326452){_0x22da7a[_0x3d1040(0x14b)](_0x58a7da[_0x3d1040(0x135)]),_0x22da7a[_0x3d1040(0x14b)](toCamelCase(_0x58a7da[_0x3d1040(0x135)]));}for(const _0x54671a of['dry-run','dryRun',_0x3d1040(0x12c),_0x3d1040(0x12e)]){_0x22da7a[_0x3d1040(0x14b)](_0x54671a);}for(const _0x2f261c of[_0x3d1040(0x133),_0x3d1040(0x132),_0x3d1040(0x130),_0x3d1040(0x150),_0x3d1040(0x137),_0x3d1040(0x145),'ci',_0x3d1040(0x134),_0x3d1040(0x12b)]){_0x22da7a['add'](_0x2f261c);}return _0x22da7a;}function buildFlagTypeMap(_0x347517){const _0x542367=a84_0x5c38,_0x24c6eb=new Map();for(const _0x50957b of _0x347517){_0x24c6eb[_0x542367(0x14c)](_0x50957b[_0x542367(0x135)],_0x50957b[_0x542367(0x144)]),_0x24c6eb[_0x542367(0x14c)](toCamelCase(_0x50957b[_0x542367(0x135)]),_0x50957b[_0x542367(0x144)]);}return _0x24c6eb;}function toCamelCase(_0x2e03bf){const _0x471cdd=a84_0x5c38;return _0x2e03bf[_0x471cdd(0x14f)](/-([a-z])/g,(_0x25c3b7,_0x36f85f)=>_0x36f85f[_0x471cdd(0x138)]());}function aliasHandler(_0x115507,_0x1d792c){const _0x471c9a=a84_0x5c38,_0x7a53c4=[];for(const _0x494bd5 of Object[_0x471c9a(0x149)](_0x115507)){if(_0x1d792c['has'](_0x494bd5))continue;const _0x489aba=toKebab(_0x494bd5);_0x489aba!==_0x494bd5&&_0x1d792c['has'](_0x489aba)&&_0x7a53c4[_0x471c9a(0x14a)]({'original':_0x494bd5,'corrected':_0x489aba,'handler':_0x471c9a(0x151)});}return _0x7a53c4;}function a84_0x5c38(_0x269564,_0x34257e){_0x269564=_0x269564-0x12b;const _0x316901=a84_0x3169();let _0x5c389a=_0x316901[_0x269564];return _0x5c389a;}function stickyHandler(_0xabb699,_0x5e32fe,_0x533afe){const _0x4365d0=a84_0x5c38,_0x45aefe=[];for(const [_0x5e5408,_0x495953]of Object[_0x4365d0(0x147)](_0xabb699)){if(_0x495953!==!![])continue;for(let _0xbbee7b=_0x5e5408['length']-0x1;_0xbbee7b>0x0;_0xbbee7b--){const _0x303922=_0x5e5408['slice'](0x0,_0xbbee7b),_0x346bfd=_0x5e5408['slice'](_0xbbee7b),_0x3c9cc4=toKebab(_0x303922),_0x179f8c=toCamelCase(_0x303922),_0x82897b=_0x5e32fe['has'](_0x303922)?_0x303922:_0x5e32fe[_0x4365d0(0x140)](_0x3c9cc4)?_0x3c9cc4:_0x5e32fe[_0x4365d0(0x140)](_0x179f8c)?_0x179f8c:null;if(!_0x82897b)continue;const _0x5b102d=_0x533afe[_0x4365d0(0x141)](_0x82897b)??_0x4365d0(0x131);let _0x1fd9a8;if(_0x5b102d==='number'){const _0x287523=Number(_0x346bfd);if(isNaN(_0x287523)||_0x346bfd==='')continue;_0x1fd9a8=_0x287523;}else{if(_0x5b102d===_0x4365d0(0x13d))continue;else{if(_0x346bfd==='')continue;_0x1fd9a8=_0x346bfd;}}_0x45aefe[_0x4365d0(0x14a)]({'original':_0x5e5408,'corrected':_0x82897b+'='+_0x1fd9a8,'handler':_0x4365d0(0x152)});break;}}return _0x45aefe;}export function correctFlags(_0x4223fc,_0x40b6e8){const _0x1645a8=a84_0x5c38,_0x9df662=buildKnownFlags(_0x40b6e8),_0x1b92fb=buildFlagTypeMap(_0x40b6e8),_0x20b171=aliasHandler(_0x4223fc,_0x9df662),_0x3016b6=stickyHandler(_0x4223fc,_0x9df662,_0x1b92fb),_0x58b8ed=[..._0x20b171,..._0x3016b6];if(_0x58b8ed['length']===0x0)return{'flags':_0x4223fc,'corrections':[]};const _0x3e0293={..._0x4223fc},_0x2391c8=new Set();for(const _0x1e4766 of _0x20b171){_0x3e0293[_0x1e4766['corrected']]=_0x4223fc[_0x1e4766['original']],_0x2391c8['add'](_0x1e4766[_0x1645a8(0x13b)]);}for(const _0x227e38 of _0x3016b6){const _0x4a3178=_0x227e38[_0x1645a8(0x139)][_0x1645a8(0x143)]('='),_0xfc39d7=_0x227e38[_0x1645a8(0x139)][_0x1645a8(0x12f)](0x0,_0x4a3178),_0x2d0da4=_0x227e38[_0x1645a8(0x139)][_0x1645a8(0x12f)](_0x4a3178+0x1),_0x366a07=_0x1b92fb['get'](_0xfc39d7)??_0x1645a8(0x131);_0x366a07==='number'?_0x3e0293[_0xfc39d7]=Number(_0x2d0da4):_0x3e0293[_0xfc39d7]=_0x2d0da4,_0x2391c8[_0x1645a8(0x14b)](_0x227e38[_0x1645a8(0x13b)]);}for(const _0x448524 of _0x2391c8){delete _0x3e0293[_0x448524];}return{'flags':_0x3e0293,'corrections':_0x58b8ed};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3ad741,_0x4ee4bb){var _0x411678=a85_0x2840,_0x56db6a=_0x3ad741();while(!![]){try{var _0x203142=-parseInt(_0x411678(0x101))/0x1*(parseInt(_0x411678(0x109))/0x2)+parseInt(_0x411678(0x108))/0x3+-parseInt(_0x411678(0x103))/0x4*(-parseInt(_0x411678(0x10a))/0x5)+parseInt(_0x411678(0x107))/0x6+parseInt(_0x411678(0x104))/0x7*(parseInt(_0x411678(0x102))/0x8)+-parseInt(_0x411678(0x106))/0x9+-parseInt(_0x411678(0x105))/0xa*(parseInt(_0x411678(0x100))/0xb);if(_0x203142===_0x4ee4bb)break;else _0x56db6a['push'](_0x56db6a['shift']());}catch(_0xbdd9a){_0x56db6a['push'](_0x56db6a['shift']());}}}(a85_0x805a,0xaf3de));function a85_0x2840(_0x5527dd,_0x31cb8e){_0x5527dd=_0x5527dd-0x100;var _0x805a9d=a85_0x805a();var _0x2840d9=_0x805a9d[_0x5527dd];return _0x2840d9;}export{extractList,extractPaging}from'@lovrabet/cli-framework';function a85_0x805a(){var _0x10f0a2=['4532fgSMmP','42xvkxtm','8376980dgbfru','3363966yqhSuB','3523776CvFgge','3703998KrghaB','172JThDww','4470LvwtTh','22TRbUSF','8803yOtElk','918872oDGCvj'];a85_0x805a=function(){return _0x10f0a2;};return a85_0x805a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x481f19,_0x55503d){const _0x5148dc=a86_0x3c81,_0xfe27ed=_0x481f19();while(!![]){try{const _0x1fa47f=-parseInt(_0x5148dc(0x114))/0x1+parseInt(_0x5148dc(0x122))/0x2+-parseInt(_0x5148dc(0x112))/0x3*(-parseInt(_0x5148dc(0x10a))/0x4)+-parseInt(_0x5148dc(0x10c))/0x5+parseInt(_0x5148dc(0x11b))/0x6*(-parseInt(_0x5148dc(0x115))/0x7)+parseInt(_0x5148dc(0x10b))/0x8*(parseInt(_0x5148dc(0x113))/0x9)+-parseInt(_0x5148dc(0x10e))/0xa*(-parseInt(_0x5148dc(0x11a))/0xb);if(_0x1fa47f===_0x55503d)break;else _0xfe27ed['push'](_0xfe27ed['shift']());}catch(_0x21fdb2){_0xfe27ed['push'](_0xfe27ed['shift']());}}}(a86_0x1f31,0x86f81));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x382cd0,_0x56b28f,_0x19efda){const _0x2f9205=a86_0x3c81,_0x55ae11=buildConfirmationContext(_0x382cd0,_0x56b28f,_0x19efda),_0x4d99d3=[_0x2f9205(0x11d)+_0x55ae11['commandLabel']];return _0x55ae11[_0x2f9205(0x118)]&&_0x4d99d3['push'](_0x2f9205(0x108)+_0x55ae11[_0x2f9205(0x118)]),_0x55ae11[_0x2f9205(0x119)]&&_0x4d99d3[_0x2f9205(0x11e)](_0x2f9205(0x121)+_0x55ae11[_0x2f9205(0x119)]),_0x4d99d3[_0x2f9205(0x11e)](_0x2f9205(0x124)),_0x4d99d3;}export function reconstructCommandArgv(_0x2b3a6b,_0x2a51f6){const _0x3732d1=a86_0x3c81,_0xf008f7=[CLI_BIN_NAME,_0x2b3a6b['service'],_0x2b3a6b[_0x3732d1(0x11f)]];for(const [_0xda2a0e,_0x4a31b4]of Object[_0x3732d1(0x123)](_0x2a51f6)){if(_0x4a31b4===!![])_0xf008f7['push']('--'+_0xda2a0e);else _0x4a31b4!==![]&&_0x4a31b4!==undefined&&_0x4a31b4!==''&&_0xf008f7[_0x3732d1(0x11e)]('--'+_0xda2a0e+'\x20'+JSON[_0x3732d1(0x111)](_0x4a31b4));}return _0xf008f7['push'](_0x3732d1(0x109)),_0xf008f7['join']('\x20');}function buildConfirmationContext(_0x227cb1,_0x448228,_0x35ea52){const _0x37eb22=a86_0x3c81,_0x6ca2c1=extractAffectedRecords(_0x35ea52);return{'commandLabel':_0x448228,'description':_0x227cb1[_0x37eb22(0x118)],'affectedRecords':_0x6ca2c1};}function a86_0x3c81(_0x3d54d6,_0x179845){_0x3d54d6=_0x3d54d6-0x108;const _0x1f31ed=a86_0x1f31();let _0x3c81d6=_0x1f31ed[_0x3d54d6];return _0x3c81d6;}function a86_0x1f31(){const _0x1bf659=['params','644610Hsroiq','code=','join','stringify','851094SYZyAi','18JPwNsm','1000228nBioAi','7MfeMxY','length','name=','description','affectedRecords','11rLlfCt','26634tZSaLC','id=','⚠\x20\x20High-risk\x20operation:\x20','push','command','code','\x20\x20\x20Affected:\x20','1057286bROJmt','entries','\x20\x20\x20Continue?\x20[y/N]\x20','params=','\x20\x20\x20','--yes','12vYlvHA','848360vPwdJA','493940OLqxZT'];a86_0x1f31=function(){return _0x1bf659;};return a86_0x1f31();}function extractAffectedRecords(_0x3865de){const _0x28101b=a86_0x3c81,_0x8c72c9=[];if(_0x3865de[_0x28101b(0x120)])_0x8c72c9[_0x28101b(0x11e)](_0x28101b(0x10f)+_0x3865de[_0x28101b(0x120)]);if(_0x3865de['id'])_0x8c72c9['push'](_0x28101b(0x11c)+_0x3865de['id']);if(_0x3865de['name'])_0x8c72c9[_0x28101b(0x11e)](_0x28101b(0x117)+_0x3865de['name']);if(_0x3865de[_0x28101b(0x10d)])_0x8c72c9[_0x28101b(0x11e)](_0x28101b(0x125)+_0x3865de[_0x28101b(0x10d)]);return _0x8c72c9[_0x28101b(0x116)]>0x0?_0x8c72c9[_0x28101b(0x110)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a87_0x3515(){const _0x380d0e=['2870qqYPqq','validation','trim','1048915KiiOSI','5877KMBTZV','32mtCOuJ','452916XDJKoC','stringify','813lXpQuP','87845TOuyAw','890592eePxeE','826hKLevk','12FfsyJv','9282548VNXrXf','message','string','description'];a87_0x3515=function(){return _0x380d0e;};return a87_0x3515();}(function(_0xee6c6e,_0x51fbd1){const _0x61e05a=a87_0x2aa4,_0x471037=_0xee6c6e();while(!![]){try{const _0x204bfa=parseInt(_0x61e05a(0x135))/0x1*(-parseInt(_0x61e05a(0x138))/0x2)+parseInt(_0x61e05a(0x133))/0x3+-parseInt(_0x61e05a(0x132))/0x4*(-parseInt(_0x61e05a(0x136))/0x5)+-parseInt(_0x61e05a(0x128))/0x6*(parseInt(_0x61e05a(0x130))/0x7)+-parseInt(_0x61e05a(0x137))/0x8+parseInt(_0x61e05a(0x131))/0x9*(-parseInt(_0x61e05a(0x12d))/0xa)+parseInt(_0x61e05a(0x129))/0xb;if(_0x204bfa===_0x51fbd1)break;else _0x471037['push'](_0x471037['shift']());}catch(_0xa1e6bc){_0x471037['push'](_0x471037['shift']());}}}(a87_0x3515,0x311ee));import{LovrabetError}from'@lovrabet/sdk';function a87_0x2aa4(_0x4e21ff,_0x174dfd){_0x4e21ff=_0x4e21ff-0x128;const _0x3515c2=a87_0x3515();let _0x2aa4be=_0x3515c2[_0x4e21ff];return _0x2aa4be;}import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x537adf){const _0x5888b5=a87_0x2aa4;if(_0x537adf instanceof LovrabetError)return CliErrors[_0x5888b5(0x12e)](userFacingLovrabetMessage(_0x537adf));return _0x537adf;}function userFacingLovrabetMessage(_0x5dbe3b){const _0x188c43=a87_0x2aa4,_0x5b2542=_0x5dbe3b[_0x188c43(0x12c)];if(_0x5b2542!==undefined&&_0x5b2542!==null){if(typeof _0x5b2542===_0x188c43(0x12b)&&_0x5b2542[_0x188c43(0x12f)]())return _0x5b2542['trim']();try{return JSON[_0x188c43(0x134)](_0x5b2542);}catch{}}return _0x5dbe3b[_0x188c43(0x12a)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
+
const a88_0x12cc24=a88_0x3cc7;(function(_0x112061,_0x82d2d){const _0x325a5b=a88_0x3cc7,_0x51e0e4=_0x112061();while(!![]){try{const _0x2d38c0=parseInt(_0x325a5b(0x12f))/0x1+parseInt(_0x325a5b(0x122))/0x2+-parseInt(_0x325a5b(0x144))/0x3+parseInt(_0x325a5b(0x146))/0x4+-parseInt(_0x325a5b(0x143))/0x5+-parseInt(_0x325a5b(0x12c))/0x6*(-parseInt(_0x325a5b(0x14e))/0x7)+-parseInt(_0x325a5b(0x121))/0x8;if(_0x2d38c0===_0x82d2d)break;else _0x51e0e4['push'](_0x51e0e4['shift']());}catch(_0x469f10){_0x51e0e4['push'](_0x51e0e4['shift']());}}}(a88_0x1db2,0x31f8e));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x1014ad){const _0x135d8f=a88_0x3cc7;return void _0x1014ad,AUTH_MODE[_0x135d8f(0x130)];}export function createPipelineEnv(_0x347c43,_0x1e5dee){const _0xffba5c=a88_0x3cc7,_0x5b9978=typeof _0x1e5dee[_0xffba5c(0x153)]==='string'&&_0x1e5dee[_0xffba5c(0x153)][_0xffba5c(0x154)]();return{'rawFlags':_0x1e5dee,'appCode':_0x347c43[_0xffba5c(0x151)]||productEnv(_0xffba5c(0x137))||(_0x5b9978?undefined:readAppCodeFromConfig()),'appCodeSource':_0x347c43['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x1e5dee),'defaultFormat':_0x347c43[_0xffba5c(0x14a)],'defaultPageSize':_0x347c43['pageSize'],'defaultVerbose':_0x347c43['verbose'],'riskLevel':_0x347c43[_0xffba5c(0x123)],'accessKey':_0x347c43[_0xffba5c(0x150)],'env':_0x347c43[_0xffba5c(0x142)],'mergedCli':{'defaultApp':_0x347c43[_0xffba5c(0x13f)],'currentApp':_0x347c43[_0xffba5c(0x120)],'appCode':_0x347c43[_0xffba5c(0x151)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x4c97c3=>PIPELINE_FLAG_NAMES[a88_0x12cc24(0x11b)](_0x4c97c3[a88_0x12cc24(0x139)]))[a88_0x12cc24(0x124)](({name:_0x2d8fec,type:_0x1d9e37,description:_0x46fc98})=>({'name':_0x2d8fec,'type':_0x1d9e37,'description':_0x46fc98})),'formatOutput':formatOutput,'getCommandLabel'(_0x2a9939){const _0x57c8c3=a88_0x12cc24;return CLI_BIN_NAME+'\x20'+_0x2a9939['service']+'\x20'+_0x2a9939[_0x57c8c3(0x128)];},'riskPolicy':{'onViolation'(_0xab70b7){const _0x550c77=a88_0x12cc24;console[_0x550c77(0x11e)](_0xab70b7);},'createError'(_0x7f47fb){const _0x3a5923=a88_0x12cc24;return CliErrors[_0x3a5923(0x126)](_0x7f47fb);}},async 'prepare'(_0x33e628,_0x597e81){const _0x31efab=a88_0x12cc24,_0x14e3b9=resolveAuthMode(_0x597e81);if(_0x33e628[_0x31efab(0x157)]!==![]){if(!_0x597e81['accessKey'])throw CliErrors[_0x31efab(0x158)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x31efab(0x11f)]+_0x31efab(0x12b)+productEnvName(_0x31efab(0x135))+'.');const {setActiveAK:_0x11f871}=await import(_0x31efab(0x149));_0x11f871(_0x597e81[_0x31efab(0x150)]);}let _0x59cf68='';if(_0x33e628[_0x31efab(0x13c)]!==![]){_0x59cf68=_0x597e81['appCode']??'',_0x59cf68=await resolveExplicitAppName(_0x33e628,_0x597e81,_0x59cf68);if(!_0x59cf68){await assertSelectedAppNameIsRuntimeAccessible(_0x33e628,_0x597e81);throw CliErrors[_0x31efab(0x133)]('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG[_0x31efab(0x11f)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x33e628,_0x597e81,_0x59cf68);}if(_0x59cf68){const {initSdkClient:_0x3579e7}=await import('../core/sdk-client.js');_0x3579e7({'appCode':_0x59cf68,'env':_0x597e81[_0x31efab(0x142)]??_0x31efab(0x131),'accessKey':_0x597e81[_0x31efab(0x150)],'authMode':_0x14e3b9});}return{'defaults':{'booleans':{'verbose':_0x597e81[_0x31efab(0x140)]},'numbers':{'pagesize':_0x597e81[_0x31efab(0x138)]}},'extras':{'appCode':_0x59cf68,'cookie':'','apiDomain':_0x597e81[_0x31efab(0x136)],'apiDir':'','accessKey':_0x597e81[_0x31efab(0x150)],'envName':_0x597e81[_0x31efab(0x142)],'mergedCli':_0x597e81[_0x31efab(0x13a)]}};},async 'confirmHighRisk'({def:_0x10c36c,env:_0x27bc2c,flags:_0x404735,commandLabel:_0x5896e8}){const _0x21c325=a88_0x12cc24;if(_0x27bc2c['isNonInteractive']){const _0xe29c9=reconstructCommandArgv(_0x10c36c,_0x404735);throw CliErrors[_0x21c325(0x132)](_0x21c325(0x11c)+_0x5896e8+_0x21c325(0x134)+('\x20\x20To\x20proceed:\x20'+_0xe29c9));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x10c36c,_0x5896e8,_0x404735),'createCancelledError':_0x2e0526=>CliErrors[_0x21c325(0x126)](_0x2e0526)});},'mapDryRunError'(_0x17730f){return mapUserFacingExecuteError(_0x17730f);},'mapExecuteError'(_0x386025){return mapUserFacingExecuteError(_0x386025);},async 'finalize'(){const {clearActiveAK:_0x502c26}=await import('../core/api-client.js');_0x502c26();}};async function resolveExplicitAppName(_0x839abc,_0x430b54,_0x384dc0){const _0x4abf2d=a88_0x12cc24;if(_0x839abc[_0x4abf2d(0x13c)]===![])return _0x384dc0;const _0x182304=typeof _0x430b54[_0x4abf2d(0x147)]['app']===_0x4abf2d(0x14d)?_0x430b54[_0x4abf2d(0x147)][_0x4abf2d(0x153)][_0x4abf2d(0x154)]():'';if(!_0x182304)return _0x384dc0;const _0x81c8a3=typeof _0x430b54['rawFlags'][_0x4abf2d(0x13b)]===_0x4abf2d(0x14d)&&_0x430b54[_0x4abf2d(0x147)][_0x4abf2d(0x13b)][_0x4abf2d(0x154)]()||productEnv(_0x4abf2d(0x137));if(_0x81c8a3||_0x430b54[_0x4abf2d(0x12d)]===_0x4abf2d(0x11d))return _0x384dc0;const {getRemoteAppList:_0x48940d}=await import(_0x4abf2d(0x13d)),_0x420637=await _0x48940d({'env':_0x430b54[_0x4abf2d(0x142)]??_0x4abf2d(0x131),'accessKey':_0x430b54[_0x4abf2d(0x150)]}),_0x12a9eb=findAppByName(_0x420637[_0x4abf2d(0x14f)],_0x182304);if(_0x12a9eb&&!isRuntimeAccessibleApp(_0x12a9eb))throw runtimeInaccessibleAppError(_0x12a9eb,'\x22'+_0x182304+'\x22');const _0x51820c=_0x12a9eb?.['appCode']?.[_0x4abf2d(0x154)]();if(_0x51820c)return _0x51820c;throw CliErrors[_0x4abf2d(0x132)](_0x4abf2d(0x156)+_0x182304,'Run\x20`'+CLI_BIN_NAME+_0x4abf2d(0x14c)+_0x182304+_0x4abf2d(0x125)+PRODUCT_CONFIG[_0x4abf2d(0x11f)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x18e1ee,_0x59968e){const _0x2ce271=a88_0x12cc24;if(_0x18e1ee[_0x2ce271(0x13c)]===![]||!_0x59968e[_0x2ce271(0x150)])return;const _0x19756e=(typeof _0x59968e[_0x2ce271(0x147)][_0x2ce271(0x153)]===_0x2ce271(0x14d)&&_0x59968e[_0x2ce271(0x147)][_0x2ce271(0x153)][_0x2ce271(0x154)]()?_0x59968e[_0x2ce271(0x147)][_0x2ce271(0x153)]:_0x59968e[_0x2ce271(0x13a)]?.[_0x2ce271(0x120)]??_0x59968e[_0x2ce271(0x13a)]?.[_0x2ce271(0x13f)])?.['trim']();if(!_0x19756e)return;const {getRemoteAppList:_0x147a57}=await import(_0x2ce271(0x13d)),_0x29c1f0=await _0x147a57({'env':_0x59968e[_0x2ce271(0x142)]??_0x2ce271(0x131),'accessKey':_0x59968e[_0x2ce271(0x150)]}),_0x73159f=findAppByName(_0x29c1f0['items'],_0x19756e);if(_0x73159f&&!isRuntimeAccessibleApp(_0x73159f))throw runtimeInaccessibleAppError(_0x73159f,'\x22'+_0x19756e+'\x22');}function a88_0x3cc7(_0x37adc3,_0x2b7513){_0x37adc3=_0x37adc3-0x11b;const _0x1db274=a88_0x1db2();let _0x3cc7b2=_0x1db274[_0x37adc3];return _0x3cc7b2;}async function assertAppCodeIsRuntimeAccessible(_0xe86f19,_0x241043,_0x4c6617){const _0x1a0a72=a88_0x12cc24;if(_0xe86f19['requiresAppCode']===![]||!_0x241043[_0x1a0a72(0x150)])return;const {getRemoteAppList:_0x49aa46}=await import(_0x1a0a72(0x13d)),_0x32a34a=await _0x49aa46({'env':_0x241043['env']??_0x1a0a72(0x131),'accessKey':_0x241043[_0x1a0a72(0x150)]}),_0x56b7af=findAppByCode(_0x32a34a['items'],_0x4c6617);if(_0x56b7af&&!isRuntimeAccessibleApp(_0x56b7af))throw runtimeInaccessibleAppError(_0x56b7af,_0x1a0a72(0x129)+_0x4c6617+'\x22');}function a88_0x1db2(){const _0xd87ff=['doctor','env','1037385yAlZwM','380691YSnvGU','object','215404fToKGa','rawFlags','update','../core/api-client.js','format','catch','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','string','1106MxIzxl','items','accessKey','appCode','includes','app','trim','resolve','Unknown\x20app:\x20','requiresAuth','authRequired','has','High-risk\x20operation\x20`','local-alias','error','newConfigFileName','currentApp','3894688HqCZds','794500GVUefV','riskLevel','map','.appcode\x20to\x20','cancelled','schema','command','appcode\x20\x22','pretty','\x20or\x20pass\x20','11400CPCzTv','appCodeSource','_notice','274595nhmfOz','ClientAk','production','validation','configMissing','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','ACCESS_KEY','apiDomain','APPCODE','defaultPageSize','name','mergedCli','appcode','requiresAppCode','../commands/app/remote-source.js','execute','defaultApp','defaultVerbose'];a88_0x1db2=function(){return _0xd87ff;};return a88_0x1db2();}export async function runCommand(_0x30c8c2,_0x42db52){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x30c8c2)?withUpdateNotice(_0x30c8c2):_0x30c8c2,_0x42db52,runnerAdapter);}function shouldAttachUpdateNotice(_0x4bfd92){const _0xeef4ce=a88_0x12cc24;return![_0xeef4ce(0x148),_0xeef4ce(0x127),_0xeef4ce(0x141)][_0xeef4ce(0x152)](_0x4bfd92['service']);}function withUpdateNotice(_0x696bf4){return{..._0x696bf4,async 'execute'(_0x4163c1){const _0x1cd23b=a88_0x3cc7,_0x13d371=shouldResolveUpdateNotice(_0x4163c1)?resolveLatestUpdateNotice()[_0x1cd23b(0x14b)](()=>null):Promise[_0x1cd23b(0x155)](null),_0x48333f=await _0x696bf4[_0x1cd23b(0x13e)](_0x4163c1);return attachUpdateNotice(_0x48333f,await _0x13d371);}};}function shouldResolveUpdateNotice(_0x2dec79){const _0x287c23=a88_0x12cc24;return _0x2dec79[_0x287c23(0x14a)]===_0x287c23(0x12a)&&!_0x2dec79['nonInteractive'];}function attachUpdateNotice(_0x24e011,_0x5ba16f){const _0x22d428=a88_0x12cc24;if(!_0x5ba16f||!_0x24e011||typeof _0x24e011!==_0x22d428(0x145))return _0x24e011;const _0x23152c=_0x24e011,_0x3e912f=typeof _0x23152c['_notice']===_0x22d428(0x145)&&_0x23152c['_notice']!==null?_0x23152c[_0x22d428(0x12e)]:{};return{..._0x23152c,'_notice':{..._0x3e912f,'update':_0x5ba16f}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15b901,_0x2e1586){const _0x4c0a85=a89_0x3803,_0x5a2d50=_0x15b901();while(!![]){try{const _0x43ceec=parseInt(_0x4c0a85(0x11e))/0x1*(-parseInt(_0x4c0a85(0x115))/0x2)+-parseInt(_0x4c0a85(0x120))/0x3*(parseInt(_0x4c0a85(0x11d))/0x4)+parseInt(_0x4c0a85(0x124))/0x5*(-parseInt(_0x4c0a85(0x116))/0x6)+-parseInt(_0x4c0a85(0x110))/0x7*(-parseInt(_0x4c0a85(0x122))/0x8)+parseInt(_0x4c0a85(0x121))/0x9*(parseInt(_0x4c0a85(0x11a))/0xa)+-parseInt(_0x4c0a85(0x114))/0xb*(-parseInt(_0x4c0a85(0x11c))/0xc)+parseInt(_0x4c0a85(0x123))/0xd;if(_0x43ceec===_0x2e1586)break;else _0x5a2d50['push'](_0x5a2d50['shift']());}catch(_0x2aade3){_0x5a2d50['push'](_0x5a2d50['shift']());}}}(a89_0x2d5f,0x51382));import{buildSchemaPayload as a89_0xceab7b}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';function a89_0x2d5f(){const _0x10744a=['requiresAuth','filter','2245694gOalyV','48dnrToB','273648jtrIbm','required','service','auth','20VQEmWM','map','36uEbTel','13828PDyAkF','9314eZIZjX','services','489QKPIQf','1817712WKnckc','664XcmIxL','6895928KsqOdH','65KFraQM','13979RFibJN','commands'];a89_0x2d5f=function(){return _0x10744a;};return a89_0x2d5f();}function a89_0x3803(_0x6e816b,_0x212e69){_0x6e816b=_0x6e816b-0x110;const _0x2d5f6f=a89_0x2d5f();let _0x3803ea=_0x2d5f6f[_0x6e816b];return _0x3803ea;}export async function buildSchemaPayload(){const _0x4f486a=a89_0x3803,{serviceRegistry:_0x10cd30,findDefinition:_0x224012}=await import('../commands/registry.js'),_0x54b11c=new Set(_0x10cd30[_0x4f486a(0x11b)](_0x554b93=>_0x554b93[_0x4f486a(0x118)])),_0x154777=listDynamicServiceEntries()[_0x4f486a(0x113)](_0xef2689=>!_0x54b11c['has'](_0xef2689[_0x4f486a(0x118)])),_0x1ce8dc=a89_0xceab7b({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x10cd30,_0x154777),'buildAllFlags':buildAllFlags,'findDefinition':(_0x12b558,_0x3d89ef)=>_0x224012(_0x12b558,_0x3d89ef)??findDynamicServiceDefinition(_0x12b558,_0x3d89ef)});return normalizeSchemaPayload(_0x1ce8dc);}function normalizeSchemaPayload(_0x52d173){const _0x4176ca=a89_0x3803;return{..._0x52d173,'schemaVersion':0x2,'services':_0x52d173[_0x4176ca(0x11f)][_0x4176ca(0x11b)](_0x556b44=>({..._0x556b44,'commands':_0x556b44[_0x4176ca(0x111)][_0x4176ca(0x11b)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x3f4ff5){const _0x43dedc=a89_0x3803,_0x568301=_0x3f4ff5;return{..._0x3f4ff5,'auth':_0x568301[_0x43dedc(0x119)]??(_0x3f4ff5[_0x43dedc(0x112)]?_0x43dedc(0x117):'none')};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a90_0x9819(){const _0x1738d8=['7982320oFsvhW','service','11688750xqELQC','50ASuPBA','5173998LjOdAF','1678761TAqftC','slice','1076633SVsQCY','326085tFWNVv','20zRMiMQ','findIndex','33867HAKsnP','length'];a90_0x9819=function(){return _0x1738d8;};return a90_0x9819();}(function(_0x4c7466,_0x556ee6){const _0x4bf8f1=a90_0x14ab,_0x228856=_0x4c7466();while(!![]){try{const _0x315747=-parseInt(_0x4bf8f1(0xfc))/0x1+parseInt(_0x4bf8f1(0xf8))/0x2*(parseInt(_0x4bf8f1(0x100))/0x3)+parseInt(_0x4bf8f1(0xfe))/0x4*(-parseInt(_0x4bf8f1(0xfd))/0x5)+-parseInt(_0x4bf8f1(0xf9))/0x6+parseInt(_0x4bf8f1(0xfa))/0x7+parseInt(_0x4bf8f1(0x102))/0x8+parseInt(_0x4bf8f1(0x104))/0x9;if(_0x315747===_0x556ee6)break;else _0x228856['push'](_0x228856['shift']());}catch(_0xfd3ba9){_0x228856['push'](_0x228856['shift']());}}}(a90_0x9819,0x87241));function a90_0x14ab(_0x105877,_0x563bee){_0x105877=_0x105877-0xf8;const _0x981955=a90_0x9819();let _0x14ab7a=_0x981955[_0x105877];return _0x14ab7a;}export function insertDynamicServicesAfterServiceTree(_0x336975,_0x5ef5a8){const _0x14fb96=a90_0x14ab;if(_0x5ef5a8[_0x14fb96(0x101)]===0x0)return[..._0x336975];const _0x33d873=_0x336975[_0x14fb96(0xff)](_0x20d0e4=>_0x20d0e4[_0x14fb96(0x103)]===_0x14fb96(0x103));if(_0x33d873<0x0)return[..._0x336975,..._0x5ef5a8];return[..._0x336975['slice'](0x0,_0x33d873+0x1),..._0x5ef5a8,..._0x336975[_0x14fb96(0xfb)](_0x33d873+0x1)];}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a91_0x2e0e(){var _0x4255bc=['2955705SBxTpV','6818KUhReq','10mTpEYh','148ebfsTl','6095520WroKxi','6983532LhaxDi','1367hJbsRb','6006760RclhKz','16871643hcTBnm','10624ykMGfG'];a91_0x2e0e=function(){return _0x4255bc;};return a91_0x2e0e();}function a91_0x260a(_0x19dbde,_0x2bc571){_0x19dbde=_0x19dbde-0x197;var _0x2e0ee7=a91_0x2e0e();var _0x260a3b=_0x2e0ee7[_0x19dbde];return _0x260a3b;}(function(_0x464d0b,_0xb23793){var _0x25c26c=a91_0x260a,_0x261604=_0x464d0b();while(!![]){try{var _0x485796=parseInt(_0x25c26c(0x198))/0x1*(parseInt(_0x25c26c(0x19f))/0x2)+-parseInt(_0x25c26c(0x19c))/0x3+-parseInt(_0x25c26c(0x1a0))/0x4+parseInt(_0x25c26c(0x199))/0x5+-parseInt(_0x25c26c(0x197))/0x6+-parseInt(_0x25c26c(0x19d))/0x7*(-parseInt(_0x25c26c(0x19b))/0x8)+parseInt(_0x25c26c(0x19a))/0x9*(parseInt(_0x25c26c(0x19e))/0xa);if(_0x485796===_0xb23793)break;else _0x261604['push'](_0x261604['shift']());}catch(_0x2ce48e){_0x261604['push'](_0x261604['shift']());}}}(a91_0x2e0e,0xc2b84));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|