@lovrabet/lovrabet-cli 2.1.9-beta.3 → 2.1.9
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(_0x42b364,_0xf9220a){const _0x357767=a74_0x1231,_0x52392f=_0x42b364();while(!![]){try{const _0x1b2027=parseInt(_0x357767(0xcc))/0x1*(parseInt(_0x357767(0x128))/0x2)+parseInt(_0x357767(0x110))/0x3+parseInt(_0x357767(0xd7))/0x4+-parseInt(_0x357767(0x115))/0x5*(parseInt(_0x357767(0xa9))/0x6)+-parseInt(_0x357767(0xcf))/0x7+-parseInt(_0x357767(0xe4))/0x8*(parseInt(_0x357767(0xf1))/0x9)+-parseInt(_0x357767(0x12d))/0xa*(-parseInt(_0x357767(0xe3))/0xb);if(_0x1b2027===_0xf9220a)break;else _0x52392f['push'](_0x52392f['shift']());}catch(_0x399455){_0x52392f['push'](_0x52392f['shift']());}}}(a74_0x534b,0xda9ea));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(_0xcc4d9e){_activeAK=_0xcc4d9e||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x3884ec,_0x67ee15={}){const _0x1c73ef=a74_0x1231,{method:method=_0x1c73ef(0xca),body:_0xdcc439,headers:headers={},timeout:timeout=0x7530}=_0x67ee15,_0x39934c=_activeAK,_0x2ee8b4=getRuntimeDomain();if(!_0x39934c)throw CliErrors[_0x1c73ef(0xc0)](_0x1c73ef(0xe2)+PRODUCT_CONFIG[_0x1c73ef(0xb5)]+'.');const _0x3305a2=''+_0x2ee8b4+_0x3884ec,_0x20274b={'X-User-AK':_0x39934c},_0x2f7f63=new AbortController(),_0x322fc4=setTimeout(()=>_0x2f7f63[_0x1c73ef(0x11a)](),timeout);try{const _0x1e9358=await fetch(_0x3305a2,{'method':method,'headers':{'Content-Type':_0x1c73ef(0x117),'X-Invoke-Source':PRODUCT_CONFIG[_0x1c73ef(0x12f)],..._0x20274b,...headers},'body':_0xdcc439?JSON['stringify'](_0xdcc439):undefined,'signal':_0x2f7f63[_0x1c73ef(0x11c)]});let _0x4a7929;try{_0x4a7929=await _0x1e9358[_0x1c73ef(0x10f)]();}catch{throw CliErrors[_0x1c73ef(0xb6)](_0x1c73ef(0x127)+_0x1e9358['status']+')',_0x1e9358[_0x1c73ef(0x10d)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x1e9358['ok']||_0x4a7929[_0x1c73ef(0x119)]===![])throw CliErrors[_0x1c73ef(0xb6)](_0x4a7929[_0x1c73ef(0xfc)]||_0x4a7929[_0x1c73ef(0xaa)]||_0x1c73ef(0xa6)+_0x1e9358['status'],_0x4a7929[_0x1c73ef(0x10b)]?_0x1c73ef(0x10e)+_0x4a7929[_0x1c73ef(0x10b)]:undefined);return _0x4a7929;}catch(_0x1f1a53){if(_0x1f1a53 instanceof Error&&_0x1f1a53[_0x1c73ef(0x121)]===_0x1c73ef(0x10c))throw CliErrors[_0x1c73ef(0xb6)](_0x1c73ef(0x125)+_0x3305a2);throw _0x1f1a53;}finally{clearTimeout(_0x322fc4);}}async function apiBinaryRequest(_0x4072fd,_0x339a3b={}){const _0x4deb20=a74_0x1231,{method:method=_0x4deb20(0xca),headers:headers={},timeout:timeout=0x7530}=_0x339a3b,_0x83c671=_activeAK,_0x2d3736=getRuntimeDomain();if(!_0x83c671)throw CliErrors[_0x4deb20(0xc0)](_0x4deb20(0xe2)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x7cddff=''+_0x2d3736+_0x4072fd,_0x1564b3=new AbortController(),_0x26f6ba=setTimeout(()=>_0x1564b3[_0x4deb20(0x11a)](),timeout);try{const _0x396135=await fetch(_0x7cddff,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x4deb20(0x12f)],'X-User-AK':_0x83c671,...headers},'signal':_0x1564b3[_0x4deb20(0x11c)]});if(!_0x396135['ok']){let _0x1dfa19;try{const _0x42bd01=await _0x396135['json']();_0x1dfa19=_0x42bd01[_0x4deb20(0xfc)]||_0x42bd01[_0x4deb20(0xaa)]||_0x42bd01[_0x4deb20(0x10b)];}catch{_0x1dfa19=await _0x396135[_0x4deb20(0xf5)]()[_0x4deb20(0xbb)](()=>undefined);}throw CliErrors[_0x4deb20(0xb6)](_0x1dfa19||'API\x20error:\x20'+_0x396135[_0x4deb20(0x10d)],_0x4deb20(0xc8)+_0x7cddff);}return Buffer[_0x4deb20(0xf8)](await _0x396135['arrayBuffer']());}catch(_0x3ea431){if(_0x3ea431 instanceof Error&&_0x3ea431[_0x4deb20(0x121)]===_0x4deb20(0x10c))throw CliErrors[_0x4deb20(0xb6)]('Request\x20timeout:\x20'+_0x7cddff);throw _0x3ea431;}finally{clearTimeout(_0x26f6ba);}}async function apiFormRequest(_0x589c1b,_0x1f3783,_0xf876cb={}){const _0x41b8a9=a74_0x1231,{timeout:timeout=0x7530}=_0xf876cb,_0x6e6a59=_activeAK,_0x223e02=getRuntimeDomain();if(!_0x6e6a59)throw CliErrors['authRequired'](_0x41b8a9(0xe2)+PRODUCT_CONFIG[_0x41b8a9(0xb5)]+'.');const _0x17178c=''+_0x223e02+_0x589c1b,_0x12de7c=new AbortController(),_0x49b50b=setTimeout(()=>_0x12de7c['abort'](),timeout);try{const _0x383301=await fetch(_0x17178c,{'method':_0x41b8a9(0xb1),'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x6e6a59},'body':_0x1f3783,'signal':_0x12de7c['signal']});let _0x15ef2c;try{_0x15ef2c=await _0x383301['json']();}catch{throw CliErrors['apiError'](_0x41b8a9(0x127)+_0x383301['status']+')',_0x383301[_0x41b8a9(0x10d)]>=0x190?_0x41b8a9(0x116):undefined);}if(!_0x383301['ok']||_0x15ef2c[_0x41b8a9(0x119)]===![])throw CliErrors['apiError'](_0x15ef2c[_0x41b8a9(0xfc)]||_0x15ef2c['message']||_0x41b8a9(0xa6)+_0x383301[_0x41b8a9(0x10d)],_0x15ef2c[_0x41b8a9(0x10b)]?_0x41b8a9(0x10e)+_0x15ef2c[_0x41b8a9(0x10b)]:undefined);return _0x15ef2c;}catch(_0x3b570c){if(_0x3b570c instanceof Error&&_0x3b570c[_0x41b8a9(0x121)]===_0x41b8a9(0x10c))throw CliErrors[_0x41b8a9(0xb6)](_0x41b8a9(0x125)+_0x17178c);throw _0x3b570c;}finally{clearTimeout(_0x49b50b);}}async function toolboxRequest(_0x1b01b7,_0x1078ec,_0x5a9b98={}){const _0x37abbc=a74_0x1231,{method:method=_0x37abbc(0xca),headers:headers={},timeout:timeout=0x7530}=_0x5a9b98,_0x33cab4=_activeAK;if(!_0x33cab4)throw CliErrors[_0x37abbc(0xc0)](_0x37abbc(0xe2)+PRODUCT_CONFIG[_0x37abbc(0xb5)]+'.');const _0x6ce79a=getApiDomain()[_0x37abbc(0xae)](/\/$/,''),_0x5a2e7a=new URL(_0x1b01b7,_0x6ce79a+_0x37abbc(0xda));if(_0x1078ec)for(const [_0x4401c4,_0xdb22a3]of Object['entries'](_0x1078ec)){_0xdb22a3!==undefined&&_0xdb22a3!==null&&_0x5a2e7a[_0x37abbc(0x132)][_0x37abbc(0xb0)](_0x4401c4,String(_0xdb22a3));}const _0x58562c=new AbortController(),_0x4309ae=setTimeout(()=>_0x58562c[_0x37abbc(0x11a)](),timeout);try{const _0x1d4de5=await fetch(_0x5a2e7a,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x37abbc(0x12f)],'X-User-AK':_0x33cab4,...headers},'signal':_0x58562c['signal']});let _0x335c0b;try{_0x335c0b=await _0x1d4de5[_0x37abbc(0x10f)]();}catch{throw CliErrors[_0x37abbc(0xb6)](_0x37abbc(0xc9)+_0x1d4de5['status']+')',_0x1d4de5['status']>=0x190?_0x37abbc(0x116):undefined);}if(!_0x1d4de5['ok']){const _0x483c67=_0x335c0b&&typeof _0x335c0b===_0x37abbc(0x124)?_0x335c0b:{};throw CliErrors[_0x37abbc(0xb6)](_0x483c67[_0x37abbc(0xfc)]||_0x483c67[_0x37abbc(0xaa)]||_0x37abbc(0xc7)+_0x1d4de5[_0x37abbc(0x10d)],_0x483c67[_0x37abbc(0x10b)]?'Toolbox\x20error\x20code:\x20'+_0x483c67[_0x37abbc(0x10b)]:undefined);}if(_0x335c0b&&typeof _0x335c0b===_0x37abbc(0x124)&&_0x37abbc(0x119)in _0x335c0b&&typeof _0x335c0b[_0x37abbc(0x119)]===_0x37abbc(0x11d)){const _0x11f605=_0x335c0b;if(!_0x11f605[_0x37abbc(0x119)])throw CliErrors[_0x37abbc(0xb6)](_0x11f605['errorMsg']||_0x11f605[_0x37abbc(0xaa)]||_0x37abbc(0xab),_0x11f605[_0x37abbc(0x10b)]?_0x37abbc(0xba)+_0x11f605[_0x37abbc(0x10b)]:undefined);return _0x11f605[_0x37abbc(0x111)];}return _0x335c0b;}catch(_0x24ce57){if(_0x24ce57 instanceof Error&&_0x24ce57[_0x37abbc(0x121)]===_0x37abbc(0x10c))throw CliErrors[_0x37abbc(0xb6)](_0x37abbc(0x125)+_0x5a2e7a['toString']());throw _0x24ce57;}finally{clearTimeout(_0x4309ae);}}async function skillHubJsonRequest(_0x4ed7f7,_0xcadc1f={}){const _0x540b32=a74_0x1231,{method:method=_0x540b32(0xca),query:_0x6f6ee0,body:_0x2b63f4,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0xcadc1f,_0x2b1ae5=_activeAK;if(!_0x2b1ae5)throw CliErrors[_0x540b32(0xc0)](_0x540b32(0xe2)+PRODUCT_CONFIG[_0x540b32(0xb5)]+'.');const _0x497ef6=getSkillHubDomain()[_0x540b32(0xae)](/\/$/,''),_0xfca22b=new URL(_0x4ed7f7,_0x497ef6+'/');if(_0x6f6ee0)for(const [_0x5531e6,_0x1cc452]of Object[_0x540b32(0x11f)](_0x6f6ee0)){_0x1cc452!==undefined&&_0x1cc452!==null&&_0xfca22b[_0x540b32(0x132)]['set'](_0x5531e6,String(_0x1cc452));}const _0x416377=new AbortController(),_0x4e1895=setTimeout(()=>_0x416377[_0x540b32(0x11a)](),timeout);try{const _0xcaabcc=await fetch(_0xfca22b[_0x540b32(0x108)](),{'method':method,'headers':{'Accept':_0x540b32(0x117),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x2b1ae5,...headers},'body':_0x2b63f4,'signal':_0x416377[_0x540b32(0x11c)]});let _0x378ca0;try{_0x378ca0=await _0xcaabcc[_0x540b32(0x10f)]();}catch{if(allowNotFound&&_0xcaabcc[_0x540b32(0x10d)]===0x194)return undefined;throw CliErrors[_0x540b32(0xb6)](_0x540b32(0x131)+_0xcaabcc[_0x540b32(0x10d)]+')',_0xcaabcc[_0x540b32(0x10d)]>=0x190?_0x540b32(0x116):undefined);}if(allowNotFound&&isSkillHubNotFoundResponse(_0xcaabcc['status'],_0x378ca0))return undefined;const _0x41063b=!_0xcaabcc['ok']||_0x378ca0?.['success']===![]||typeof _0x378ca0?.[_0x540b32(0x103)]===_0x540b32(0xa5)&&_0x378ca0['code']>=0x190;if(_0x41063b)throw CliErrors[_0x540b32(0xb6)](_0x378ca0?.[_0x540b32(0xfc)]||_0x378ca0?.[_0x540b32(0xaa)]||_0x378ca0?.[_0x540b32(0x11e)]||_0x540b32(0x122)+_0xcaabcc[_0x540b32(0x10d)],_0x378ca0?.[_0x540b32(0x10b)]?_0x540b32(0xb7)+_0x378ca0['errorCode']:undefined);return _0x378ca0?.[_0x540b32(0x111)]??_0x378ca0;}catch(_0x139149){if(_0x139149 instanceof Error&&_0x139149[_0x540b32(0x121)]===_0x540b32(0x10c))throw CliErrors[_0x540b32(0xb6)](_0x540b32(0x125)+_0xfca22b['toString']());throw _0x139149;}finally{clearTimeout(_0x4e1895);}}function a74_0x534b(){const _0x11879b=['errorMsg','values','items','PRIVATE','/client/uploadFile','tags','ownerPreviewVersion','code','effective','artifactType','base64','/client/bff/query/','toString','/client/dataset/list','application/octet-stream','errorCode','AbortError','status','API\x20error\x20code:\x20','json','2830839frveZk','data','url','resolvedSlug','isArray','5KptucI','Check\x20your\x20credentials\x20and\x20try\x20again.','application/json','slug','success','abort','/client/app/my-apps','signal','boolean','msg','entries','packageBase64','name','SkillHub\x20API\x20error:\x20','/client/artifact/','object','Request\x20timeout:\x20','version','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','2fkfRsO','skill','map','sqlCode','.zip','350rYByFl','personal','invokeSource','download','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','searchParams','topK','/versions/','warnings','company','/update','number','API\x20error:\x20','/skills','/client/user/loginUserInfo','7109004zUaOhH','message','Toolbox\x20API\x20error','?appCode=','description','replace','/client/artifact/create','set','POST','summary','resolvedVersion','type','newConfigFileName','apiError','SkillHub\x20error\x20code:\x20','validation','trim','Toolbox\x20error\x20code:\x20','catch','/client/app-config/getByKey?','string','/client/runtime-bff/personal/list?appCode=','App\x20config\x20not\x20found:\x20key=','authRequired','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','/client/knowledge-base/personal/','arrayBuffer','append','file','/client/knowledge-base/search','Toolbox\x20API\x20error:\x20','Download\x20failed:\x20','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','GET','/api/cli/v1/skills/','461053tnizil','filter','/client/sql/query','2673972HeMliA','visibility','/client/runtime-bff/personal/create','test','namespace','errors','BFF\x20script\x20not\x20found:\x20id=','application/zip','4755088CrOIjw','/publish','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/api/node-toolbox/','/execute?appCode=','/client/knowledge-base/personal/list?appCode=','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','Artifact\x20not\x20found:\x20id=','error','all','confirmWarnings','Configure\x20accessKey\x20in\x20','434731LOygsP','31144RUGAlL','headlineVersion','/client/ocr','favorite','markdown','content','skillCode','source','query','skillName','/api/v1/skills/','tableData','/client/knowledge-base/personal/create','3501psRDBS','SQL\x20query\x20not\x20found:\x20','valid','/download','text','/publish/validate','/client/runtime-bff/personal/','from','appCode','scope','displayName'];a74_0x534b=function(){return _0x11879b;};return a74_0x534b();}function a74_0x1231(_0x3ed9d7,_0x30eea3){_0x3ed9d7=_0x3ed9d7-0xa4;const _0x534b85=a74_0x534b();let _0x1231b3=_0x534b85[_0x3ed9d7];return _0x1231b3;}function isSkillHubNotFoundResponse(_0x488d0,_0x40d30a){const _0x3607a6=a74_0x1231;if(_0x488d0===0x194||_0x40d30a?.['code']===0x194)return!![];if(_0x488d0!==0x190&&_0x40d30a?.[_0x3607a6(0x103)]!==0x190)return![];const _0x5ee638=[_0x40d30a?.[_0x3607a6(0x11e)],_0x40d30a?.['message'],_0x40d30a?.[_0x3607a6(0xfc)],_0x40d30a?.[_0x3607a6(0xdf)]][_0x3607a6(0xcd)](_0x40fbe5=>typeof _0x40fbe5===_0x3607a6(0xbd))['join']('\x20');return/skill not found\b/i[_0x3607a6(0xd2)](_0x5ee638);}async function skillHubBinaryRequest(_0x3249df,_0x2142a6={}){const _0x280a65=a74_0x1231,{query:_0x48a1b4,headers:headers={},timeout:timeout=0x7530}=_0x2142a6,_0x27ec14=_activeAK;if(!_0x27ec14)throw CliErrors[_0x280a65(0xc0)](_0x280a65(0xe2)+PRODUCT_CONFIG[_0x280a65(0xb5)]+'.');const _0x4f6e0d=getSkillHubDomain()[_0x280a65(0xae)](/\/$/,''),_0x2fc672=new URL(_0x3249df,_0x4f6e0d+'/');if(_0x48a1b4)for(const [_0x2bed8c,_0x359c16]of Object[_0x280a65(0x11f)](_0x48a1b4)){_0x359c16!==undefined&&_0x359c16!==null&&_0x2fc672[_0x280a65(0x132)][_0x280a65(0xb0)](_0x2bed8c,String(_0x359c16));}const _0x364bf2=new AbortController(),_0x496c98=setTimeout(()=>_0x364bf2[_0x280a65(0x11a)](),timeout);try{const _0x38a6d5=await fetch(_0x2fc672['toString'](),{'method':_0x280a65(0xca),'headers':{'Accept':_0x280a65(0x10a),'X-Invoke-Source':PRODUCT_CONFIG[_0x280a65(0x12f)],'X-User-AK':_0x27ec14,...headers},'signal':_0x364bf2['signal']});if(!_0x38a6d5['ok']){let _0x38d66d;try{const _0x469ba1=await _0x38a6d5[_0x280a65(0x10f)]();_0x38d66d=_0x469ba1[_0x280a65(0xfc)]||_0x469ba1[_0x280a65(0xaa)]||_0x469ba1[_0x280a65(0x11e)]||_0x469ba1[_0x280a65(0x10b)];}catch{_0x38d66d=await _0x38a6d5[_0x280a65(0xf5)]()['catch'](()=>undefined);}throw CliErrors[_0x280a65(0xb6)](_0x38d66d||_0x280a65(0x122)+_0x38a6d5[_0x280a65(0x10d)],_0x280a65(0xc8)+_0x2fc672[_0x280a65(0x108)]());}return Buffer[_0x280a65(0xf8)](await _0x38a6d5[_0x280a65(0xc3)]());}catch(_0x2dab9d){if(_0x2dab9d instanceof Error&&_0x2dab9d['name']===_0x280a65(0x10c))throw CliErrors[_0x280a65(0xb6)](_0x280a65(0x125)+_0x2fc672['toString']());throw _0x2dab9d;}finally{clearTimeout(_0x496c98);}}export async function getBffScriptInfo(_0x509fe6){const _0x15e906=a74_0x1231,_0x40262a=await apiRequest(_0x15e906(0x107)+_0x509fe6);if(!_0x40262a[_0x15e906(0x111)])throw CliErrors[_0x15e906(0xb8)](_0x15e906(0xd5)+_0x509fe6);return _0x40262a[_0x15e906(0x111)];}export async function getSqlQueryInfo(_0x3d82c2,_0x1f8147){const _0x5c0002=a74_0x1231,_0xf9ddf6=await apiRequest(_0x5c0002(0xce),{'method':_0x5c0002(0xb1),'body':{'appCode':_0x3d82c2,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x1f8147}}),_0xa034d8=_0xf9ddf6[_0x5c0002(0x111)],_0x4d070e=_0xa034d8&&typeof _0xa034d8===_0x5c0002(0x124)&&'tableData'in _0xa034d8?_0xa034d8[_0x5c0002(0xef)]?.[0x0]:_0xa034d8&&typeof _0xa034d8===_0x5c0002(0x124)&&_0x5c0002(0x12b)in _0xa034d8?_0xa034d8:undefined;if(!_0x4d070e)throw CliErrors['validation'](_0x5c0002(0xf2)+_0x1f8147);return _0x4d070e;}function isRemoteAppItem(_0x3bf067){const _0x1aaa8f=a74_0x1231;return!!_0x3bf067&&typeof _0x3bf067===_0x1aaa8f(0x124)&&typeof _0x3bf067[_0x1aaa8f(0xf9)]===_0x1aaa8f(0xbd)&&typeof _0x3bf067['appName']===_0x1aaa8f(0xbd);}function extractRemoteAppItems(_0xeb4064){const _0x26d080=a74_0x1231;if(Array[_0x26d080(0x114)](_0xeb4064))return _0xeb4064['filter'](isRemoteAppItem);if(!_0xeb4064||typeof _0xeb4064!=='object')throw CliErrors[_0x26d080(0xb6)](_0x26d080(0xd9));const _0x5e834a=_0xeb4064;if(Array[_0x26d080(0x114)](_0x5e834a['tableData']))return _0x5e834a['tableData'][_0x26d080(0xcd)](isRemoteAppItem);if(_0x5e834a[_0x26d080(0x111)]&&typeof _0x5e834a[_0x26d080(0x111)]==='object'){const _0x525558=_0x5e834a[_0x26d080(0x111)];if(Array[_0x26d080(0x114)](_0x525558[_0x26d080(0xef)]))return _0x525558[_0x26d080(0xef)][_0x26d080(0xcd)](isRemoteAppItem);}throw CliErrors[_0x26d080(0xb6)](_0x26d080(0xc1));}export async function getMyApps(){const _0x496c1a=a74_0x1231,_0xe5d751=await apiRequest(_0x496c1a(0x11b));return extractRemoteAppItems(_0xe5d751[_0x496c1a(0x111)]);}export async function getLoginUserInfo(){const _0xb079de=a74_0x1231,_0x2e7e36=await apiRequest(_0xb079de(0xa8));if(!_0x2e7e36['data']||typeof _0x2e7e36['data']!=='object'||Array[_0xb079de(0x114)](_0x2e7e36[_0xb079de(0x111)]))throw CliErrors[_0xb079de(0xb6)](_0xb079de(0xdd));return _0x2e7e36[_0xb079de(0x111)];}export async function listDatasets(_0x1132af,_0x57083b){const _0x5330be=a74_0x1231,_0x3616c2=await apiRequest(_0x5330be(0x109),{'method':_0x5330be(0xb1),'body':{'appCode':_0x1132af,..._0x57083b?.[_0x5330be(0x103)]&&{'code':_0x57083b[_0x5330be(0x103)]},..._0x57083b?.[_0x5330be(0x121)]&&{'name':_0x57083b['name']}}});return extractList(_0x3616c2['data']);}export async function getDatasetDetail(_0x176d40){const _0x16821f=a74_0x1231,_0x23bd41=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0x176d40));return _0x23bd41[_0x16821f(0x111)];}export async function getDatasetSdkUsageDoc(_0x40aa30,_0x51a461){const _0x1c2a15=a74_0x1231,_0x1024ef=await toolboxRequest('api-doc-generator',{'datasetCode':_0x40aa30,'appCode':_0x51a461});return typeof _0x1024ef?.[_0x1c2a15(0xe8)]===_0x1c2a15(0xbd)?_0x1024ef[_0x1c2a15(0xe8)]:'';}export async function uploadRuntimeFile(_0x302b02,_0x5be8fc){const _0x5b3d61=a74_0x1231,_0x20adf2=await readFile(_0x5be8fc),_0x4f5e2a=new FormData();_0x4f5e2a[_0x5b3d61(0xc4)]('appCode',_0x302b02),_0x4f5e2a[_0x5b3d61(0xc4)](_0x5b3d61(0xc5),new Blob([new Uint8Array(_0x20adf2)]),basename(_0x5be8fc));const _0x1120af=await apiFormRequest(_0x5b3d61(0x100),_0x4f5e2a);return _0x1120af[_0x5b3d61(0x111)];}export async function queryRuntimeFileUrl(_0x46ba6e,_0x2c761a={}){const _0xfac36=a74_0x1231,_0x540a2b=await apiRequest('/client/queryFileUrl',{'method':_0xfac36(0xb1),'body':{'filePath':_0x46ba6e,'downloadFlag':_0x2c761a[_0xfac36(0x130)]??![]}});return _0x540a2b[_0xfac36(0x111)];}export async function recognizeRuntimeOcr(_0xaec0dd,_0x76ce95){const _0xdc845=a74_0x1231,_0x54ac91=await apiRequest(_0xdc845(0xe6),{'method':_0xdc845(0xb1),'body':{'appCode':_0xaec0dd,'url':_0x76ce95[_0xdc845(0x112)],'type':_0x76ce95[_0xdc845(0xb4)]}});return _0x54ac91['data'];}export async function getRuntimeAppConfigByKey(_0x347c3c,_0x5ef773){const _0x2e3464=a74_0x1231,_0x449538=new URLSearchParams({'appCode':_0x347c3c,'key':_0x5ef773}),_0x5a14f5=await apiRequest(_0x2e3464(0xbc)+_0x449538[_0x2e3464(0x108)]());if(!_0x5a14f5[_0x2e3464(0x111)])throw CliErrors[_0x2e3464(0xb8)](_0x2e3464(0xbf)+_0x5ef773);return _0x5a14f5[_0x2e3464(0x111)];}export async function listRuntimeArtifacts(_0x2a763e,_0x383940){const _0x5f4276=a74_0x1231,_0x304291=new URLSearchParams({'appCode':_0x2a763e});if(_0x383940?.[_0x5f4276(0x105)])_0x304291[_0x5f4276(0xb0)]('artifactType',_0x383940[_0x5f4276(0x105)]);if(_0x383940?.[_0x5f4276(0xeb)])_0x304291[_0x5f4276(0xb0)](_0x5f4276(0xeb),_0x383940[_0x5f4276(0xeb)]);if(_0x383940?.[_0x5f4276(0xe7)]!==undefined)_0x304291['set']('favorite',String(_0x383940[_0x5f4276(0xe7)]));const _0x48bb4b=await apiRequest('/client/artifact/list?'+_0x304291['toString']());return Array[_0x5f4276(0x114)](_0x48bb4b[_0x5f4276(0x111)])?_0x48bb4b[_0x5f4276(0x111)]:[];}export async function getRuntimeArtifact(_0x5c0d41,_0x5d8f11){const _0xa79bfb=a74_0x1231,_0x1e155c=await apiRequest('/client/artifact/'+_0x5c0d41+'?appCode='+encodeURIComponent(_0x5d8f11));if(!_0x1e155c[_0xa79bfb(0x111)])throw CliErrors[_0xa79bfb(0xb8)](_0xa79bfb(0xde)+_0x5c0d41);return _0x1e155c[_0xa79bfb(0x111)];}export async function createRuntimeArtifact(_0x374440,_0x4495df){const _0x251fea=a74_0x1231,_0xfb1c1b=await apiRequest(_0x251fea(0xaf),{'method':_0x251fea(0xb1),'body':{'appCode':_0x374440,..._0x4495df}});return _0xfb1c1b[_0x251fea(0x111)];}export async function updateRuntimeArtifact(_0x184cce,_0x2e1db8,_0x3e159c){const _0x452e09=a74_0x1231,_0x3410d2=await apiRequest(_0x452e09(0x123)+_0x184cce+'/update',{'method':_0x452e09(0xb1),'body':{'appCode':_0x2e1db8,..._0x3e159c}});return _0x3410d2[_0x452e09(0x111)];}export async function listPersonalBffs(_0x57feb2){const _0x3aacea=a74_0x1231,_0x4f6db1=await apiRequest(_0x3aacea(0xbe)+encodeURIComponent(_0x57feb2));return Array[_0x3aacea(0x114)](_0x4f6db1['data'])?_0x4f6db1['data']:[];}export async function getPersonalBff(_0x562804,_0xc819ec){const _0xe395f1=a74_0x1231,_0x518338=await apiRequest(_0xe395f1(0xf7)+_0x562804+_0xe395f1(0xac)+encodeURIComponent(_0xc819ec));if(!_0x518338[_0xe395f1(0x111)])throw CliErrors[_0xe395f1(0xb8)]('Personal\x20BFF\x20not\x20found:\x20id='+_0x562804);return _0x518338['data'];}export async function createPersonalBff(_0x3d0569,_0x566fe2){const _0x47f9f2=a74_0x1231,_0x5c5309=await apiRequest(_0x47f9f2(0xd1),{'method':_0x47f9f2(0xb1),'body':{'appCode':_0x3d0569,..._0x566fe2}});return _0x5c5309['data'];}export async function updatePersonalBff(_0x94d62a,_0x2c1a24,_0x5e5419){const _0x386181=a74_0x1231,_0x55fbc7=await apiRequest(_0x386181(0xf7)+_0x94d62a+_0x386181(0xa4),{'method':_0x386181(0xb1),'body':{'appCode':_0x2c1a24,..._0x5e5419}});return _0x55fbc7[_0x386181(0x111)];}export async function executePersonalBff(_0xe76963,_0x10dce1,_0x2e2522){const _0x54a57c=a74_0x1231,_0x169d57=await apiRequest('/client/runtime-bff/personal/'+_0xe76963+_0x54a57c(0xdb)+encodeURIComponent(_0x10dce1),{'method':_0x54a57c(0xb1),'body':_0x2e2522});return _0x169d57[_0x54a57c(0x111)];}export async function listPersonalKnowledgeBaseItems(_0x1b6395){const _0x1a1f6e=a74_0x1231,_0x5947b8=await apiRequest(_0x1a1f6e(0xdc)+encodeURIComponent(_0x1b6395));return Array[_0x1a1f6e(0x114)](_0x5947b8[_0x1a1f6e(0x111)])?_0x5947b8[_0x1a1f6e(0x111)]:[];}export async function getPersonalKnowledgeBaseItem(_0x27b9ad,_0x45e0a7){const _0x337629=a74_0x1231,_0x3889b5=await apiRequest(_0x337629(0xc2)+_0x27b9ad+_0x337629(0xac)+encodeURIComponent(_0x45e0a7));if(!_0x3889b5['data'])throw CliErrors['validation']('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0x27b9ad);return _0x3889b5[_0x337629(0x111)];}export async function createPersonalKnowledgeBaseItem(_0xa8fde5,_0x4298b0){const _0x2cc86b=a74_0x1231,_0x29d640=await apiRequest(_0x2cc86b(0xf0),{'method':_0x2cc86b(0xb1),'body':{'appCode':_0xa8fde5,..._0x4298b0}});return _0x29d640[_0x2cc86b(0x111)];}export async function updatePersonalKnowledgeBaseItem(_0x4d4f0d,_0x512297,_0x571e39){const _0x3c05ae=a74_0x1231,_0x285659=await apiRequest('/client/knowledge-base/personal/'+_0x4d4f0d+'/update',{'method':_0x3c05ae(0xb1),'body':{'appCode':_0x512297,..._0x571e39}});return _0x285659[_0x3c05ae(0x111)];}export async function searchKnowledgeBase(_0x51e9,_0x3f9ca2){const _0x170001=a74_0x1231,_0x19c5b4=await apiRequest(_0x170001(0xc6),{'method':_0x170001(0xb1),'body':{'appCode':_0x51e9,'query':_0x3f9ca2[_0x170001(0xec)],..._0x3f9ca2[_0x170001(0x133)]!==undefined?{'topK':_0x3f9ca2['topK']}:{}}});return Array[_0x170001(0x114)](_0x19c5b4[_0x170001(0x111)])?_0x19c5b4[_0x170001(0x111)]:[];}export async function getRuntimeSkillByCode(_0x292ffc,_0x5c591c){const _0x5bc7ce=a74_0x1231,_0x161197=await skillHubJsonRequest(_0x5bc7ce(0xee)+encodeURIComponent(_0x292ffc)+'/'+encodeURIComponent(_0x5c591c),{'allowNotFound':!![]});return _0x161197?skillHubRuntimeDetailToRuntimeSkill(_0x161197):undefined;}export async function listRuntimeSkills(_0x181244){const _0x513d90=a74_0x1231,_0x58e61b=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0x181244[_0x513d90(0xf9)])+_0x513d90(0xa7),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x181244[_0x513d90(0xf9)],_0x58e61b,_0x181244['scope']??'all',_0x181244[_0x513d90(0x103)]);}export async function listPersonalRuntimeSkills(_0xc86c65){const _0x23f1f8=a74_0x1231;return(await listRuntimeSkills({'appCode':_0xc86c65,'scope':'personal'}))[_0x23f1f8(0x12e)];}export async function listCompanyRuntimeSkills(_0x39b1ac){const _0x55c3b0=a74_0x1231;return(await listRuntimeSkills({'appCode':_0x39b1ac,'scope':_0x55c3b0(0x136)}))['company'];}export async function listVisibleRuntimeSkills(_0x1973f3){const _0x5498ee=a74_0x1231;return(await listRuntimeSkills({'appCode':_0x1973f3,'scope':_0x5498ee(0xe0)}))['effective'];}export async function createPersonalRuntimeSkill(_0x3508a3,_0x3d2add){const _0x2d8fe2=a74_0x1231;return publishRuntimeSkill(_0x3508a3,_0x3d2add,{'visibility':_0x2d8fe2(0xff)});}export async function updatePersonalRuntimeSkill(_0x21840b,_0x4bb47d,_0x6613b4){const _0x5efa26=a74_0x1231;return publishRuntimeSkill(_0x4bb47d,{..._0x6613b4,'skillCode':_0x6613b4[_0x5efa26(0xea)]??_0x21840b},{'visibility':_0x5efa26(0xff)});}export async function publishCompanyRuntimeSkill(_0x184a27,_0x406e8b,_0x1095de={}){return publishRuntimeSkill(_0x184a27,_0x406e8b,{'visibility':'NAMESPACE_ONLY','confirmWarnings':_0x1095de['confirmWarnings']});}export async function validateRuntimeSkillPublish(_0x4c1a0a,_0x13fe18,_0x2e1663){const _0xde550e=a74_0x1231,_0x1c9529=buildRuntimeSkillPublishForm(_0x13fe18,_0x2e1663['visibility']),_0x468779=await skillHubJsonRequest(_0xde550e(0xcb)+encodeURIComponent(_0x4c1a0a)+_0xde550e(0xf6),{'method':_0xde550e(0xb1),'body':_0x1c9529});return{'valid':_0x468779[_0xde550e(0xf3)]===!![],'errors':Array[_0xde550e(0x114)](_0x468779[_0xde550e(0xd4)])?_0x468779[_0xde550e(0xd4)]:[],'warnings':Array[_0xde550e(0x114)](_0x468779[_0xde550e(0x135)])?_0x468779[_0xde550e(0x135)]:[],'resolvedSlug':_0x468779[_0xde550e(0x113)],'resolvedVersion':_0x468779[_0xde550e(0xb3)]};}export async function downloadRuntimeSkillPackage(_0x21023d,_0x563f4a,_0x27d2a5,_0x49e5ef){const _0x4c9270=a74_0x1231;void _0x21023d;const _0xf72e26=_0x49e5ef?_0x4c9270(0xcb)+encodeURIComponent(_0x27d2a5)+'/'+encodeURIComponent(_0x563f4a)+_0x4c9270(0x134)+encodeURIComponent(_0x49e5ef)+_0x4c9270(0xf4):'/api/cli/v1/skills/'+encodeURIComponent(_0x27d2a5)+'/'+encodeURIComponent(_0x563f4a)+_0x4c9270(0xf4);return skillHubBinaryRequest(_0xf72e26);}async function publishRuntimeSkill(_0x11ef78,_0x559cc6,_0x59f567){const _0x4a2cc4=a74_0x1231,_0xc169d3=buildRuntimeSkillPublishForm(_0x559cc6,_0x59f567[_0x4a2cc4(0xd0)]),_0x55842e=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x11ef78)+_0x4a2cc4(0xd8),{'method':_0x4a2cc4(0xb1),'query':{'confirmWarnings':_0x59f567[_0x4a2cc4(0xe1)]===!![]?!![]:undefined},'body':_0xc169d3});return{'appCode':_0x55842e[_0x4a2cc4(0xd3)]??_0x11ef78,'skillCode':_0x55842e[_0x4a2cc4(0x118)]??_0x559cc6[_0x4a2cc4(0xea)]??'','skillName':_0x559cc6[_0x4a2cc4(0xed)]??_0x55842e[_0x4a2cc4(0x118)]??_0x559cc6[_0x4a2cc4(0xea)],'description':_0x559cc6[_0x4a2cc4(0xad)],'scope':skillHubVisibilityToScope(_0x55842e[_0x4a2cc4(0xd0)]??_0x59f567[_0x4a2cc4(0xd0)])??'personal','version':_0x55842e[_0x4a2cc4(0x126)]??_0x559cc6['version'],'tags':_0x559cc6[_0x4a2cc4(0x101)],'content':_0x559cc6[_0x4a2cc4(0xe9)]};}function buildRuntimeSkillPublishForm(_0x157d0a,_0x4ac505){const _0x3534d8=a74_0x1231,_0xab1749=new FormData();return _0xab1749[_0x3534d8(0xb0)](_0x3534d8(0xc5),runtimeSkillPackageFile(_0x157d0a)),_0x157d0a[_0x3534d8(0xed)]?.[_0x3534d8(0xb9)]()&&_0xab1749[_0x3534d8(0xb0)]('displayName',_0x157d0a[_0x3534d8(0xed)][_0x3534d8(0xb9)]()),_0xab1749[_0x3534d8(0xb0)]('visibility',_0x4ac505),_0xab1749;}function runtimeSkillPackageFile(_0x4dd168){const _0x3e2ff6=a74_0x1231;if(!_0x4dd168['packageBase64'])throw CliErrors[_0x3e2ff6(0xb8)]('Missing\x20Skill\x20package\x20payload.');const _0x2053b6=Buffer['from'](_0x4dd168[_0x3e2ff6(0x120)],_0x3e2ff6(0x106)),_0xbf79c3=new Blob([_0x2053b6],{'type':_0x3e2ff6(0xd6)}),_0x573538=(_0x4dd168[_0x3e2ff6(0xea)]||_0x3e2ff6(0x129))+_0x3e2ff6(0x12c);if(typeof File!=='undefined')return new File([_0xbf79c3],_0x573538,{'type':'application/zip'});return _0xbf79c3;}function normalizeSkillHubRuntimeListResponse(_0x1cb408,_0x1075bd,_0x3584d7,_0x33c866){const _0x270e3b=a74_0x1231,_0x2cf8d8=Array[_0x270e3b(0x114)](_0x1075bd)?_0x1075bd:Array[_0x270e3b(0x114)](_0x1075bd?.[_0x270e3b(0xfe)])?_0x1075bd['items']:[],_0x5bf1dc=_0x33c866?.[_0x270e3b(0xb9)](),_0xcdaaee=_0x2cf8d8[_0x270e3b(0xcd)](_0x32a9b4=>!_0x5bf1dc||_0x32a9b4[_0x270e3b(0x118)]===_0x5bf1dc)[_0x270e3b(0x12a)](skillHubRuntimeItemToRuntimeSkill)[_0x270e3b(0xcd)](_0x1f6acb=>Boolean(_0x1f6acb)),_0x2aae2f=_0xcdaaee['filter'](_0x22da50=>_0x22da50[_0x270e3b(0xfa)]===_0x270e3b(0x12e)),_0x5a956d=_0xcdaaee[_0x270e3b(0xcd)](_0x14a0e1=>_0x14a0e1[_0x270e3b(0xfa)]===_0x270e3b(0x136));return{'appCode':_0x1cb408,'personal':_0x3584d7===_0x270e3b(0x136)?[]:_0x2aae2f,'company':_0x3584d7==='personal'?[]:_0x5a956d,'effective':buildEffectiveRuntimeSkills(_0x2aae2f,_0x5a956d,_0x3584d7)};}function skillHubRuntimeItemToRuntimeSkill(_0x56c25e){const _0x1d8652=a74_0x1231,_0x3cc246=_0x56c25e[_0x1d8652(0x118)]?.[_0x1d8652(0xb9)](),_0x3c2876=skillHubVisibilityToScope(_0x56c25e['visibility']);if(!_0x3cc246||!_0x3c2876)return undefined;return{'id':_0x56c25e['id'],'appCode':_0x56c25e['namespace'],'skillCode':_0x3cc246,'skillName':_0x56c25e['displayName']??_0x3cc246,'description':_0x56c25e[_0x1d8652(0xb2)],'scope':_0x3c2876,'version':skillHubRuntimeItemVersion(_0x56c25e),'status':_0x56c25e[_0x1d8652(0x10d)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x4f82ad){const _0x3e6766=a74_0x1231,_0x507021=_0x4f82ad[_0x3e6766(0x118)]?.[_0x3e6766(0xb9)]();if(!_0x507021)return undefined;return{'id':_0x4f82ad['id'],'appCode':_0x4f82ad[_0x3e6766(0xd3)],'skillCode':_0x507021,'skillName':_0x4f82ad[_0x3e6766(0xfb)]??_0x507021,'description':_0x4f82ad[_0x3e6766(0xb2)],'scope':skillHubVisibilityToScope(_0x4f82ad[_0x3e6766(0xd0)])??_0x4f82ad['visibility']?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0x4f82ad),'status':_0x4f82ad[_0x3e6766(0x10d)]};}function skillHubVisibilityToScope(_0x193669){const _0x2b932f=a74_0x1231;if(_0x193669===_0x2b932f(0xff))return _0x2b932f(0x12e);if(_0x193669==='NAMESPACE_ONLY')return _0x2b932f(0x136);return undefined;}function skillHubRuntimeItemVersion(_0x21ae87){const _0x1fb6b2=a74_0x1231;return _0x21ae87['publishedVersion']?.[_0x1fb6b2(0x126)]??_0x21ae87[_0x1fb6b2(0xe5)]?.[_0x1fb6b2(0x126)]??_0x21ae87[_0x1fb6b2(0x102)]?.[_0x1fb6b2(0x126)];}function buildEffectiveRuntimeSkills(_0x1d5176,_0x1ff58e,_0x3fb9d8){const _0x1e078f=a74_0x1231;if(_0x3fb9d8===_0x1e078f(0x12e))return _0x1d5176;if(_0x3fb9d8==='company')return _0x1ff58e;const _0x1df2a9=new Map();for(const _0x52ad86 of _0x1ff58e){_0x1df2a9[_0x1e078f(0xb0)](_0x52ad86['skillCode'],_0x52ad86);}for(const _0x5bf28a of _0x1d5176){_0x1df2a9['set'](_0x5bf28a[_0x1e078f(0xea)],_0x5bf28a);}return Array[_0x1e078f(0xf8)](_0x1df2a9[_0x1e078f(0xfd)]());}function normalizeRuntimeSkillListResponse(_0x1abb3c,_0x24f8d0){const _0x388e8d=a74_0x1231;if(Array[_0x388e8d(0x114)](_0x24f8d0)){const _0x390ed3=_0x24f8d0[_0x388e8d(0xcd)](_0x2731eb=>_0x2731eb[_0x388e8d(0xfa)]===_0x388e8d(0x12e)),_0x5062f4=_0x24f8d0[_0x388e8d(0xcd)](_0x4e1edb=>_0x4e1edb['scope']==='company');return{'appCode':_0x1abb3c,'personal':_0x390ed3,'company':_0x5062f4,'effective':[..._0x5062f4,..._0x390ed3]};}return{'appCode':_0x24f8d0?.[_0x388e8d(0xf9)]??_0x1abb3c,'personal':Array['isArray'](_0x24f8d0?.['personal'])?_0x24f8d0[_0x388e8d(0x12e)]:[],'company':Array['isArray'](_0x24f8d0?.[_0x388e8d(0x136)])?_0x24f8d0['company']:[],'effective':Array['isArray'](_0x24f8d0?.['effective'])?_0x24f8d0[_0x388e8d(0x104)]:[]};}
|
|
1
|
+
(function(_0x2008bd,_0x31bb84){const _0x1f906c=a74_0x4a5d,_0x575f7b=_0x2008bd();while(!![]){try{const _0x1eab50=-parseInt(_0x1f906c(0x24e))/0x1+-parseInt(_0x1f906c(0x1f7))/0x2*(parseInt(_0x1f906c(0x1ef))/0x3)+-parseInt(_0x1f906c(0x24a))/0x4+parseInt(_0x1f906c(0x22a))/0x5*(parseInt(_0x1f906c(0x232))/0x6)+-parseInt(_0x1f906c(0x1e0))/0x7*(parseInt(_0x1f906c(0x236))/0x8)+parseInt(_0x1f906c(0x242))/0x9+parseInt(_0x1f906c(0x25f))/0xa*(parseInt(_0x1f906c(0x204))/0xb);if(_0x1eab50===_0x31bb84)break;else _0x575f7b['push'](_0x575f7b['shift']());}catch(_0x529c08){_0x575f7b['push'](_0x575f7b['shift']());}}}(a74_0xc3cf,0xce6e9));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(_0x341984){_activeAK=_0x341984||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x24421e,_0x22c737={}){const _0x377452=a74_0x4a5d,{method:method=_0x377452(0x21c),body:_0x3cc6ba,headers:headers={},timeout:timeout=0x7530}=_0x22c737,_0x5724db=_activeAK,_0x4726a7=getRuntimeDomain();if(!_0x5724db)throw CliErrors[_0x377452(0x247)](_0x377452(0x220)+PRODUCT_CONFIG[_0x377452(0x20a)]+'.');const _0x4f189c=''+_0x4726a7+_0x24421e,_0xbbc93={'X-User-AK':_0x5724db},_0x1f6ea9=new AbortController(),_0x50cab7=setTimeout(()=>_0x1f6ea9['abort'](),timeout);try{const _0xc27098=await fetch(_0x4f189c,{'method':method,'headers':{'Content-Type':_0x377452(0x235),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0xbbc93,...headers},'body':_0x3cc6ba?JSON[_0x377452(0x1e1)](_0x3cc6ba):undefined,'signal':_0x1f6ea9['signal']});let _0xe32259;try{_0xe32259=await _0xc27098['json']();}catch{throw CliErrors[_0x377452(0x22f)](_0x377452(0x209)+_0xc27098[_0x377452(0x1fd)]+')',_0xc27098[_0x377452(0x1fd)]>=0x190?_0x377452(0x1e2):undefined);}if(!_0xc27098['ok']||_0xe32259['success']===![])throw CliErrors[_0x377452(0x22f)](_0xe32259[_0x377452(0x228)]||_0xe32259[_0x377452(0x1de)]||_0x377452(0x212)+_0xc27098[_0x377452(0x1fd)],_0xe32259['errorCode']?_0x377452(0x23b)+_0xe32259['errorCode']:undefined);return _0xe32259;}catch(_0x26d8b2){if(_0x26d8b2 instanceof Error&&_0x26d8b2[_0x377452(0x1f1)]===_0x377452(0x1d6))throw CliErrors[_0x377452(0x22f)](_0x377452(0x1e3)+_0x4f189c);throw _0x26d8b2;}finally{clearTimeout(_0x50cab7);}}async function apiBinaryRequest(_0x1bab3a,_0x4f1bec={}){const _0x1cb921=a74_0x4a5d,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x4f1bec,_0x3ba0fe=_activeAK,_0x180e17=getRuntimeDomain();if(!_0x3ba0fe)throw CliErrors[_0x1cb921(0x247)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x1cb921(0x20a)]+'.');const _0x495abf=''+_0x180e17+_0x1bab3a,_0x209a69=new AbortController(),_0x1930f4=setTimeout(()=>_0x209a69[_0x1cb921(0x24f)](),timeout);try{const _0x40d631=await fetch(_0x495abf,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x1cb921(0x210)],'X-User-AK':_0x3ba0fe,...headers},'signal':_0x209a69['signal']});if(!_0x40d631['ok']){let _0x342fe1;try{const _0x410819=await _0x40d631[_0x1cb921(0x1db)]();_0x342fe1=_0x410819[_0x1cb921(0x228)]||_0x410819['message']||_0x410819[_0x1cb921(0x244)];}catch{_0x342fe1=await _0x40d631[_0x1cb921(0x249)]()[_0x1cb921(0x1f3)](()=>undefined);}throw CliErrors[_0x1cb921(0x22f)](_0x342fe1||'API\x20error:\x20'+_0x40d631[_0x1cb921(0x1fd)],_0x1cb921(0x251)+_0x495abf);}return Buffer[_0x1cb921(0x254)](await _0x40d631[_0x1cb921(0x224)]());}catch(_0x5e6ef0){if(_0x5e6ef0 instanceof Error&&_0x5e6ef0[_0x1cb921(0x1f1)]===_0x1cb921(0x1d6))throw CliErrors[_0x1cb921(0x22f)]('Request\x20timeout:\x20'+_0x495abf);throw _0x5e6ef0;}finally{clearTimeout(_0x1930f4);}}async function apiFormRequest(_0x1383b5,_0x320aac,_0x4f9078={}){const _0x71bd66=a74_0x4a5d,{timeout:timeout=0x7530}=_0x4f9078,_0x296c1b=_activeAK,_0x5523c5=getRuntimeDomain();if(!_0x296c1b)throw CliErrors[_0x71bd66(0x247)](_0x71bd66(0x220)+PRODUCT_CONFIG[_0x71bd66(0x20a)]+'.');const _0x394edb=''+_0x5523c5+_0x1383b5,_0x57ae10=new AbortController(),_0x2cdacf=setTimeout(()=>_0x57ae10['abort'](),timeout);try{const _0x1c5dbf=await fetch(_0x394edb,{'method':_0x71bd66(0x20f),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x71bd66(0x210)],'X-User-AK':_0x296c1b},'body':_0x320aac,'signal':_0x57ae10['signal']});let _0x208d13;try{_0x208d13=await _0x1c5dbf[_0x71bd66(0x1db)]();}catch{throw CliErrors[_0x71bd66(0x22f)](_0x71bd66(0x209)+_0x1c5dbf[_0x71bd66(0x1fd)]+')',_0x1c5dbf[_0x71bd66(0x1fd)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x1c5dbf['ok']||_0x208d13[_0x71bd66(0x1f0)]===![])throw CliErrors['apiError'](_0x208d13[_0x71bd66(0x228)]||_0x208d13[_0x71bd66(0x1de)]||_0x71bd66(0x212)+_0x1c5dbf['status'],_0x208d13[_0x71bd66(0x244)]?_0x71bd66(0x23b)+_0x208d13[_0x71bd66(0x244)]:undefined);return _0x208d13;}catch(_0x42643c){if(_0x42643c instanceof Error&&_0x42643c[_0x71bd66(0x1f1)]===_0x71bd66(0x1d6))throw CliErrors[_0x71bd66(0x22f)](_0x71bd66(0x1e3)+_0x394edb);throw _0x42643c;}finally{clearTimeout(_0x2cdacf);}}async function toolboxRequest(_0x438a1a,_0x5ce519,_0x264c76={}){const _0x3db380=a74_0x4a5d,{method:method=_0x3db380(0x21c),headers:headers={},timeout:timeout=0x7530}=_0x264c76,_0x521045=_activeAK;if(!_0x521045)throw CliErrors[_0x3db380(0x247)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x3db380(0x20a)]+'.');const _0x59d045=getApiDomain()['replace'](/\/$/,''),_0x381396=new URL(_0x438a1a,_0x59d045+_0x3db380(0x256));if(_0x5ce519)for(const [_0x514af9,_0x153ef4]of Object[_0x3db380(0x219)](_0x5ce519)){_0x153ef4!==undefined&&_0x153ef4!==null&&_0x381396[_0x3db380(0x1ea)]['set'](_0x514af9,String(_0x153ef4));}const _0x4fa86a=new AbortController(),_0x5afad8=setTimeout(()=>_0x4fa86a[_0x3db380(0x24f)](),timeout);try{const _0x43a2a0=await fetch(_0x381396,{'method':method,'headers':{'Content-Type':_0x3db380(0x235),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x521045,...headers},'signal':_0x4fa86a[_0x3db380(0x1e4)]});let _0x550102;try{_0x550102=await _0x43a2a0[_0x3db380(0x1db)]();}catch{throw CliErrors[_0x3db380(0x22f)](_0x3db380(0x22e)+_0x43a2a0[_0x3db380(0x1fd)]+')',_0x43a2a0['status']>=0x190?_0x3db380(0x1e2):undefined);}if(!_0x43a2a0['ok']){const _0x286f69=_0x550102&&typeof _0x550102==='object'?_0x550102:{};throw CliErrors['apiError'](_0x286f69['errorMsg']||_0x286f69[_0x3db380(0x1de)]||'Toolbox\x20API\x20error:\x20'+_0x43a2a0[_0x3db380(0x1fd)],_0x286f69[_0x3db380(0x244)]?_0x3db380(0x1fc)+_0x286f69['errorCode']:undefined);}if(_0x550102&&typeof _0x550102==='object'&&_0x3db380(0x1f0)in _0x550102&&typeof _0x550102['success']===_0x3db380(0x257)){const _0x31abd8=_0x550102;if(!_0x31abd8[_0x3db380(0x1f0)])throw CliErrors[_0x3db380(0x22f)](_0x31abd8[_0x3db380(0x228)]||_0x31abd8[_0x3db380(0x1de)]||'Toolbox\x20API\x20error',_0x31abd8[_0x3db380(0x244)]?_0x3db380(0x1fc)+_0x31abd8[_0x3db380(0x244)]:undefined);return _0x31abd8[_0x3db380(0x211)];}return _0x550102;}catch(_0x3b9fab){if(_0x3b9fab instanceof Error&&_0x3b9fab[_0x3db380(0x1f1)]===_0x3db380(0x1d6))throw CliErrors[_0x3db380(0x22f)](_0x3db380(0x1e3)+_0x381396['toString']());throw _0x3b9fab;}finally{clearTimeout(_0x5afad8);}}async function skillHubJsonRequest(_0x297549,_0x3d0cf5={}){const _0x5f187c=a74_0x4a5d,{method:method=_0x5f187c(0x21c),query:_0x2ca2c4,body:_0x147bcf,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x3d0cf5,_0x808c7f=_activeAK;if(!_0x808c7f)throw CliErrors[_0x5f187c(0x247)](_0x5f187c(0x220)+PRODUCT_CONFIG[_0x5f187c(0x20a)]+'.');const _0x1c076f=getSkillHubDomain()[_0x5f187c(0x20e)](/\/$/,''),_0x120c4e=new URL(_0x297549,_0x1c076f+'/');if(_0x2ca2c4)for(const [_0x45e3d3,_0x57b524]of Object[_0x5f187c(0x219)](_0x2ca2c4)){_0x57b524!==undefined&&_0x57b524!==null&&_0x120c4e[_0x5f187c(0x1ea)]['set'](_0x45e3d3,String(_0x57b524));}const _0x91f3d0=new AbortController(),_0x158fe3=setTimeout(()=>_0x91f3d0[_0x5f187c(0x24f)](),timeout);try{const _0xbe00b5=await fetch(_0x120c4e['toString'](),{'method':method,'headers':{'Accept':_0x5f187c(0x235),'X-Invoke-Source':PRODUCT_CONFIG[_0x5f187c(0x210)],'X-User-AK':_0x808c7f,...headers},'body':_0x147bcf,'signal':_0x91f3d0['signal']});let _0x4e7638;try{_0x4e7638=await _0xbe00b5[_0x5f187c(0x1db)]();}catch{if(allowNotFound&&_0xbe00b5[_0x5f187c(0x1fd)]===0x194)return undefined;throw CliErrors[_0x5f187c(0x22f)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0xbe00b5['status']+')',_0xbe00b5[_0x5f187c(0x1fd)]>=0x190?_0x5f187c(0x1e2):undefined);}if(allowNotFound&&isSkillHubNotFoundResponse(_0xbe00b5['status'],_0x4e7638))return undefined;const _0x18dc38=!_0xbe00b5['ok']||_0x4e7638?.['success']===![]||typeof _0x4e7638?.[_0x5f187c(0x260)]===_0x5f187c(0x213)&&_0x4e7638[_0x5f187c(0x260)]>=0x190;if(_0x18dc38)throw CliErrors[_0x5f187c(0x22f)](_0x4e7638?.[_0x5f187c(0x228)]||_0x4e7638?.[_0x5f187c(0x1de)]||_0x4e7638?.[_0x5f187c(0x223)]||_0x5f187c(0x1d5)+_0xbe00b5[_0x5f187c(0x1fd)],_0x4e7638?.[_0x5f187c(0x244)]?_0x5f187c(0x217)+_0x4e7638[_0x5f187c(0x244)]:undefined);return _0x4e7638?.[_0x5f187c(0x211)]??_0x4e7638;}catch(_0x4a7210){if(_0x4a7210 instanceof Error&&_0x4a7210[_0x5f187c(0x1f1)]===_0x5f187c(0x1d6))throw CliErrors[_0x5f187c(0x22f)](_0x5f187c(0x1e3)+_0x120c4e[_0x5f187c(0x1e9)]());throw _0x4a7210;}finally{clearTimeout(_0x158fe3);}}function isSkillHubNotFoundResponse(_0x26a805,_0x1fd1fa){const _0x39c061=a74_0x4a5d;if(_0x26a805===0x194||_0x1fd1fa?.['code']===0x194)return!![];if(_0x26a805!==0x190&&_0x1fd1fa?.[_0x39c061(0x260)]!==0x190)return![];const _0x94955e=[_0x1fd1fa?.[_0x39c061(0x223)],_0x1fd1fa?.[_0x39c061(0x1de)],_0x1fd1fa?.[_0x39c061(0x228)],_0x1fd1fa?.[_0x39c061(0x218)]][_0x39c061(0x1e7)](_0x275935=>typeof _0x275935===_0x39c061(0x1ed))[_0x39c061(0x202)]('\x20');return/skill not found\b/i[_0x39c061(0x259)](_0x94955e);}async function skillHubBinaryRequest(_0x5dae8b,_0xb18f57={}){const _0x4de8ae=a74_0x4a5d,{query:_0x413e49,headers:headers={},timeout:timeout=0x7530}=_0xb18f57,_0x568e9c=_activeAK;if(!_0x568e9c)throw CliErrors['authRequired'](_0x4de8ae(0x220)+PRODUCT_CONFIG[_0x4de8ae(0x20a)]+'.');const _0x8e79a5=getSkillHubDomain()[_0x4de8ae(0x20e)](/\/$/,''),_0x3809b2=new URL(_0x5dae8b,_0x8e79a5+'/');if(_0x413e49)for(const [_0x18f6b6,_0x993c49]of Object[_0x4de8ae(0x219)](_0x413e49)){_0x993c49!==undefined&&_0x993c49!==null&&_0x3809b2['searchParams'][_0x4de8ae(0x243)](_0x18f6b6,String(_0x993c49));}const _0x5a354a=new AbortController(),_0x276519=setTimeout(()=>_0x5a354a[_0x4de8ae(0x24f)](),timeout);try{const _0x5158eb=await fetch(_0x3809b2['toString'](),{'method':_0x4de8ae(0x21c),'headers':{'Accept':_0x4de8ae(0x1d8),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x568e9c,...headers},'signal':_0x5a354a[_0x4de8ae(0x1e4)]});if(!_0x5158eb['ok']){let _0x5b79b8;try{const _0x9ec69d=await _0x5158eb['json']();_0x5b79b8=_0x9ec69d[_0x4de8ae(0x228)]||_0x9ec69d['message']||_0x9ec69d[_0x4de8ae(0x223)]||_0x9ec69d[_0x4de8ae(0x244)];}catch{_0x5b79b8=await _0x5158eb['text']()[_0x4de8ae(0x1f3)](()=>undefined);}throw CliErrors[_0x4de8ae(0x22f)](_0x5b79b8||_0x4de8ae(0x1d5)+_0x5158eb[_0x4de8ae(0x1fd)],'Download\x20failed:\x20'+_0x3809b2['toString']());}return Buffer[_0x4de8ae(0x254)](await _0x5158eb[_0x4de8ae(0x224)]());}catch(_0x59d52b){if(_0x59d52b instanceof Error&&_0x59d52b[_0x4de8ae(0x1f1)]==='AbortError')throw CliErrors[_0x4de8ae(0x22f)](_0x4de8ae(0x1e3)+_0x3809b2[_0x4de8ae(0x1e9)]());throw _0x59d52b;}finally{clearTimeout(_0x276519);}}export async function getBffScriptInfo(_0x20ad07){const _0x3b2068=a74_0x4a5d,_0x58098e=await apiRequest('/client/bff/query/'+_0x20ad07);if(!_0x58098e[_0x3b2068(0x211)])throw CliErrors[_0x3b2068(0x23c)](_0x3b2068(0x25d)+_0x20ad07);return _0x58098e[_0x3b2068(0x211)];}export async function getSqlQueryInfo(_0x82f2c,_0x25a872){const _0x374d15=a74_0x4a5d,_0x55d6df=await apiRequest(_0x374d15(0x252),{'method':'POST','body':{'appCode':_0x82f2c,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x25a872}}),_0x5ae265=_0x55d6df[_0x374d15(0x211)],_0x42a6ab=_0x5ae265&&typeof _0x5ae265===_0x374d15(0x24b)&&'tableData'in _0x5ae265?_0x5ae265[_0x374d15(0x25b)]?.[0x0]:_0x5ae265&&typeof _0x5ae265===_0x374d15(0x24b)&&_0x374d15(0x1fa)in _0x5ae265?_0x5ae265:undefined;if(!_0x42a6ab)throw CliErrors[_0x374d15(0x23c)](_0x374d15(0x201)+_0x25a872);return _0x42a6ab;}function isRemoteAppItem(_0x1ba88e){const _0xc672ae=a74_0x4a5d;return!!_0x1ba88e&&typeof _0x1ba88e===_0xc672ae(0x24b)&&typeof _0x1ba88e[_0xc672ae(0x250)]===_0xc672ae(0x1ed)&&typeof _0x1ba88e[_0xc672ae(0x20d)]===_0xc672ae(0x1ed);}function extractRemoteAppItems(_0x2e65f9){const _0x2c8dfd=a74_0x4a5d;if(Array[_0x2c8dfd(0x21d)](_0x2e65f9))return _0x2e65f9['filter'](isRemoteAppItem);if(!_0x2e65f9||typeof _0x2e65f9!==_0x2c8dfd(0x24b))throw CliErrors[_0x2c8dfd(0x22f)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x3b3412=_0x2e65f9;if(Array[_0x2c8dfd(0x21d)](_0x3b3412[_0x2c8dfd(0x25b)]))return _0x3b3412[_0x2c8dfd(0x25b)]['filter'](isRemoteAppItem);if(_0x3b3412[_0x2c8dfd(0x211)]&&typeof _0x3b3412[_0x2c8dfd(0x211)]===_0x2c8dfd(0x24b)){const _0x9ebe27=_0x3b3412[_0x2c8dfd(0x211)];if(Array['isArray'](_0x9ebe27[_0x2c8dfd(0x25b)]))return _0x9ebe27[_0x2c8dfd(0x25b)][_0x2c8dfd(0x1e7)](isRemoteAppItem);}throw CliErrors[_0x2c8dfd(0x22f)](_0x2c8dfd(0x261));}export async function getMyApps(){const _0x5323b7=a74_0x4a5d,_0x522721=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x522721[_0x5323b7(0x211)]);}export async function getLoginUserInfo(){const _0x373ecc=a74_0x4a5d,_0x2d6348=await apiRequest(_0x373ecc(0x1f2));if(!_0x2d6348[_0x373ecc(0x211)]||typeof _0x2d6348[_0x373ecc(0x211)]!==_0x373ecc(0x24b)||Array[_0x373ecc(0x21d)](_0x2d6348[_0x373ecc(0x211)]))throw CliErrors['apiError'](_0x373ecc(0x248));return _0x2d6348[_0x373ecc(0x211)];}export async function listDatasets(_0x1d38bc,_0x2b4d20){const _0x37e69c=a74_0x4a5d,_0x5894c3=await apiRequest(_0x37e69c(0x258),{'method':_0x37e69c(0x20f),'body':{'appCode':_0x1d38bc,..._0x2b4d20?.['code']&&{'code':_0x2b4d20[_0x37e69c(0x260)]},..._0x2b4d20?.['name']&&{'name':_0x2b4d20[_0x37e69c(0x1f1)]}}});return extractList(_0x5894c3[_0x37e69c(0x211)]);}export async function getDatasetDetail(_0x22d942){const _0xfaaba1=a74_0x4a5d,_0xc3aa00=await apiRequest(_0xfaaba1(0x245)+encodeURIComponent(_0x22d942));return _0xc3aa00['data'];}export async function getDatasetSdkUsageDoc(_0x42988f,_0x164fad){const _0x22d849=a74_0x4a5d,_0x422b9a=await toolboxRequest(_0x22d849(0x22b),{'datasetCode':_0x42988f,'appCode':_0x164fad});return typeof _0x422b9a?.[_0x22d849(0x1d7)]==='string'?_0x422b9a[_0x22d849(0x1d7)]:'';}export async function uploadRuntimeFile(_0x197d42,_0x35c004){const _0x48d3ce=a74_0x4a5d,_0x3d35b2=await readFile(_0x35c004),_0x3f4ff5=new FormData();_0x3f4ff5[_0x48d3ce(0x200)](_0x48d3ce(0x250),_0x197d42),_0x3f4ff5['append'](_0x48d3ce(0x229),new Blob([new Uint8Array(_0x3d35b2)]),basename(_0x35c004));const _0x1e2894=await apiFormRequest(_0x48d3ce(0x1df),_0x3f4ff5);return _0x1e2894['data'];}export async function queryRuntimeFileUrl(_0x147a54,_0x4c3d87={}){const _0x2adc90=a74_0x4a5d,_0x6ae499=await apiRequest(_0x2adc90(0x241),{'method':_0x2adc90(0x20f),'body':{'filePath':_0x147a54,'downloadFlag':_0x4c3d87['download']??![]}});return _0x6ae499[_0x2adc90(0x211)];}export async function recognizeRuntimeOcr(_0x1d1a3e,_0x111ec){const _0xc8ca54=a74_0x4a5d,_0x6f5495=await apiRequest(_0xc8ca54(0x1da),{'method':_0xc8ca54(0x20f),'body':{'appCode':_0x1d1a3e,'url':_0x111ec['url'],'type':_0x111ec[_0xc8ca54(0x25c)]}});return _0x6f5495['data'];}export async function getRuntimeAppConfigByKey(_0x201a6f,_0xc82d2e){const _0x493edb=a74_0x4a5d,_0x4a29cd=new URLSearchParams({'appCode':_0x201a6f,'key':_0xc82d2e}),_0x43663f=await apiRequest('/client/app-config/getByKey?'+_0x4a29cd[_0x493edb(0x1e9)]());if(!_0x43663f['data'])throw CliErrors['validation'](_0x493edb(0x203)+_0xc82d2e);return _0x43663f[_0x493edb(0x211)];}export async function listRuntimeArtifacts(_0x10c63f,_0x411bc2){const _0x437657=a74_0x4a5d,_0x2903b3=new URLSearchParams({'appCode':_0x10c63f});if(_0x411bc2?.['artifactType'])_0x2903b3[_0x437657(0x243)]('artifactType',_0x411bc2[_0x437657(0x23f)]);if(_0x411bc2?.[_0x437657(0x24d)])_0x2903b3['set']('source',_0x411bc2[_0x437657(0x24d)]);if(_0x411bc2?.[_0x437657(0x253)]!==undefined)_0x2903b3[_0x437657(0x243)]('favorite',String(_0x411bc2['favorite']));const _0x4ddcae=await apiRequest(_0x437657(0x1e8)+_0x2903b3[_0x437657(0x1e9)]());return Array[_0x437657(0x21d)](_0x4ddcae[_0x437657(0x211)])?_0x4ddcae['data']:[];}export async function getRuntimeArtifact(_0x1bcda7,_0x511a6e){const _0x4f0774=a74_0x4a5d,_0x35b863=await apiRequest(_0x4f0774(0x255)+_0x1bcda7+_0x4f0774(0x21e)+encodeURIComponent(_0x511a6e));if(!_0x35b863[_0x4f0774(0x211)])throw CliErrors[_0x4f0774(0x23c)]('Artifact\x20not\x20found:\x20id='+_0x1bcda7);return _0x35b863[_0x4f0774(0x211)];}export async function createRuntimeArtifact(_0x541789,_0x4a9bf9){const _0x3647bf=a74_0x4a5d,_0x5e2a25=await apiRequest(_0x3647bf(0x1dc),{'method':_0x3647bf(0x20f),'body':{'appCode':_0x541789,..._0x4a9bf9}});return _0x5e2a25['data'];}export async function updateRuntimeArtifact(_0x13b3f7,_0x52d5f7,_0x47bf01){const _0x2fe8e6=a74_0x4a5d,_0x1edb45=await apiRequest(_0x2fe8e6(0x255)+_0x13b3f7+_0x2fe8e6(0x227),{'method':_0x2fe8e6(0x20f),'body':{'appCode':_0x52d5f7,..._0x47bf01}});return _0x1edb45[_0x2fe8e6(0x211)];}export async function listPersonalBffs(_0x2ab16b){const _0xc52328=a74_0x4a5d,_0x44ee5e=await apiRequest(_0xc52328(0x1fb)+encodeURIComponent(_0x2ab16b));return Array[_0xc52328(0x21d)](_0x44ee5e[_0xc52328(0x211)])?_0x44ee5e['data']:[];}export async function getPersonalBff(_0x1beef7,_0x115412){const _0x121da9=a74_0x4a5d,_0x3c8bbe=await apiRequest(_0x121da9(0x221)+_0x1beef7+'?appCode='+encodeURIComponent(_0x115412));if(!_0x3c8bbe[_0x121da9(0x211)])throw CliErrors['validation']('Personal\x20BFF\x20not\x20found:\x20id='+_0x1beef7);return _0x3c8bbe['data'];}export async function createPersonalBff(_0x3e1236,_0x3ee784){const _0x30221c=a74_0x4a5d,_0x18f25a=await apiRequest('/client/runtime-bff/personal/create',{'method':_0x30221c(0x20f),'body':{'appCode':_0x3e1236,..._0x3ee784}});return _0x18f25a[_0x30221c(0x211)];}export async function updatePersonalBff(_0x95c15c,_0x3edef2,_0x4d5d5d){const _0x4e4426=a74_0x4a5d,_0x251f7a=await apiRequest('/client/runtime-bff/personal/'+_0x95c15c+'/update',{'method':_0x4e4426(0x20f),'body':{'appCode':_0x3edef2,..._0x4d5d5d}});return _0x251f7a[_0x4e4426(0x211)];}function a74_0x4a5d(_0x5c1dc7,_0x50a942){_0x5c1dc7=_0x5c1dc7-0x1d5;const _0xc3cf39=a74_0xc3cf();let _0x4a5d95=_0xc3cf39[_0x5c1dc7];return _0x4a5d95;}function a74_0xc3cf(){const _0x1f0104=['appCode','Download\x20failed:\x20','/client/sql/query','favorite','from','/client/artifact/','/api/node-toolbox/','boolean','/client/dataset/list','test','skillName','tableData','type','BFF\x20script\x20not\x20found:\x20id=','Missing\x20Skill\x20package\x20payload.','486270IkcAtC','code','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','SkillHub\x20API\x20error:\x20','AbortError','markdown','application/octet-stream','query','/client/ocr','json','/client/artifact/create','toLowerCase','message','/client/uploadFile','12817zdOUHG','stringify','Check\x20your\x20credentials\x20and\x20try\x20again.','Request\x20timeout:\x20','signal','/client/knowledge-base/personal/list?appCode=','application/zip','filter','/client/artifact/list?','toString','searchParams','topK','warnings','string','/api/runtime/v1/namespaces/','3PEZxvb','success','name','/client/user/loginUserInfo','catch','/client/knowledge-base/personal/','/client/knowledge-base/personal/create','values','52082TdPPSn','items','/client/knowledge-base/search','sqlCode','/client/runtime-bff/personal/list?appCode=','Toolbox\x20error\x20code:\x20','status','namespace','description','append','SQL\x20query\x20not\x20found:\x20','join','App\x20config\x20not\x20found:\x20key=','385tKWuHj','/publish/validate','/skills','summary','publishedVersion','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','newConfigFileName','base64','visibility','appName','replace','POST','invokeSource','data','API\x20error:\x20','number','all','/versions/','PRIVATE','SkillHub\x20error\x20code:\x20','error','entries','resolvedVersion','displayName','GET','isArray','?appCode=','trim','Configure\x20accessKey\x20in\x20','/client/runtime-bff/personal/','version','msg','arrayBuffer','company','/api/cli/v1/skills/','/update','errorMsg','file','145ARLTdX','api-doc-generator','/download','ownerPreviewVersion','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','apiError','NAMESPACE_ONLY','skillCode','94368RrFMyJ','map','resolvedSlug','application/json','6632CinNWo','tags','packageBase64','personal','effective','API\x20error\x20code:\x20','validation','scope','errors','artifactType','slug','/client/queryFileUrl','15012270AoWaYb','set','errorCode','/client/dataset/get-driven-data?code=','undefined','authRequired','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','text','4141504jqUFec','object','headlineVersion','source','401226XWDEsd','abort'];a74_0xc3cf=function(){return _0x1f0104;};return a74_0xc3cf();}export async function executePersonalBff(_0x1884ef,_0x48d7aa,_0x3bf95d){const _0x40a563=await apiRequest('/client/runtime-bff/personal/'+_0x1884ef+'/execute?appCode='+encodeURIComponent(_0x48d7aa),{'method':'POST','body':_0x3bf95d});return _0x40a563['data'];}export async function listPersonalKnowledgeBaseItems(_0xe91373){const _0x3bbe7c=a74_0x4a5d,_0x5198a5=await apiRequest(_0x3bbe7c(0x1e5)+encodeURIComponent(_0xe91373));return Array['isArray'](_0x5198a5['data'])?_0x5198a5['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x4bcf46,_0x5bea35){const _0x5d4b71=a74_0x4a5d,_0x4f9ee9=await apiRequest(_0x5d4b71(0x1f4)+_0x4bcf46+_0x5d4b71(0x21e)+encodeURIComponent(_0x5bea35));if(!_0x4f9ee9[_0x5d4b71(0x211)])throw CliErrors[_0x5d4b71(0x23c)]('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0x4bcf46);return _0x4f9ee9[_0x5d4b71(0x211)];}export async function createPersonalKnowledgeBaseItem(_0x49e86f,_0x24534a){const _0x4c75db=a74_0x4a5d,_0x37b842=await apiRequest(_0x4c75db(0x1f5),{'method':_0x4c75db(0x20f),'body':{'appCode':_0x49e86f,..._0x24534a}});return _0x37b842[_0x4c75db(0x211)];}export async function updatePersonalKnowledgeBaseItem(_0x4e48a7,_0x500132,_0x598800){const _0x39fd51=a74_0x4a5d,_0x54b7b4=await apiRequest(_0x39fd51(0x1f4)+_0x4e48a7+_0x39fd51(0x227),{'method':'POST','body':{'appCode':_0x500132,..._0x598800}});return _0x54b7b4[_0x39fd51(0x211)];}export async function searchKnowledgeBase(_0x5b520a,_0x277fe){const _0x5ea696=a74_0x4a5d,_0x56ce8d=await apiRequest(_0x5ea696(0x1f9),{'method':'POST','body':{'appCode':_0x5b520a,'query':_0x277fe[_0x5ea696(0x1d9)],..._0x277fe[_0x5ea696(0x1eb)]!==undefined?{'topK':_0x277fe[_0x5ea696(0x1eb)]}:{}}});return Array[_0x5ea696(0x21d)](_0x56ce8d[_0x5ea696(0x211)])?_0x56ce8d[_0x5ea696(0x211)]:[];}export async function getRuntimeSkillByCode(_0x4a48cd,_0x51581a){const _0x3afa10=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x4a48cd)+'/'+encodeURIComponent(_0x51581a),{'allowNotFound':!![]});return _0x3afa10?skillHubRuntimeDetailToRuntimeSkill(_0x3afa10):undefined;}export async function listRuntimeSkills(_0x44af4c){const _0x580cee=a74_0x4a5d,_0x3b4e71=await skillHubJsonRequest(_0x580cee(0x1ee)+encodeURIComponent(_0x44af4c[_0x580cee(0x250)])+_0x580cee(0x206),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x44af4c['appCode'],_0x3b4e71,_0x44af4c[_0x580cee(0x23d)]??'all',_0x44af4c[_0x580cee(0x260)]);}export async function listPersonalRuntimeSkills(_0x32bdc5){const _0xe8063d=a74_0x4a5d;return(await listRuntimeSkills({'appCode':_0x32bdc5,'scope':_0xe8063d(0x239)}))[_0xe8063d(0x239)];}export async function listCompanyRuntimeSkills(_0x2bdbad){const _0x46215e=a74_0x4a5d;return(await listRuntimeSkills({'appCode':_0x2bdbad,'scope':'company'}))[_0x46215e(0x225)];}export async function listVisibleRuntimeSkills(_0x1a32be){const _0x424d10=a74_0x4a5d;return(await listRuntimeSkills({'appCode':_0x1a32be,'scope':_0x424d10(0x214)}))[_0x424d10(0x23a)];}export async function createPersonalRuntimeSkill(_0x3c4707,_0x41593f){const _0x401108=a74_0x4a5d;return publishRuntimeSkill(_0x3c4707,_0x41593f,{'visibility':_0x401108(0x216)});}export async function updatePersonalRuntimeSkill(_0xdc6d4,_0x49c97e,_0x8a6352){const _0x11c8bd=a74_0x4a5d;return publishRuntimeSkill(_0x49c97e,{..._0x8a6352,'skillCode':_0x8a6352[_0x11c8bd(0x231)]??_0xdc6d4},{'visibility':_0x11c8bd(0x216)});}export async function publishCompanyRuntimeSkill(_0x23d961,_0x1dcc03,_0x462c8e={}){return publishRuntimeSkill(_0x23d961,_0x1dcc03,{'visibility':'NAMESPACE_ONLY','confirmWarnings':_0x462c8e['confirmWarnings']});}export async function validateRuntimeSkillPublish(_0x4c7654,_0x1f842c,_0x3b56b5){const _0x30f265=a74_0x4a5d,_0x5a136b=buildRuntimeSkillPublishForm(_0x1f842c,_0x3b56b5[_0x30f265(0x20c)]),_0x11a19a=await skillHubJsonRequest(_0x30f265(0x226)+encodeURIComponent(_0x4c7654)+_0x30f265(0x205),{'method':_0x30f265(0x20f),'body':_0x5a136b});return{'valid':_0x11a19a['valid']===!![],'errors':Array['isArray'](_0x11a19a[_0x30f265(0x23e)])?_0x11a19a[_0x30f265(0x23e)]:[],'warnings':Array['isArray'](_0x11a19a[_0x30f265(0x1ec)])?_0x11a19a[_0x30f265(0x1ec)]:[],'resolvedSlug':_0x11a19a[_0x30f265(0x234)],'resolvedVersion':_0x11a19a[_0x30f265(0x21a)]};}export async function downloadRuntimeSkillPackage(_0x31ef84,_0x403ef4,_0x4f0895,_0x45939e){const _0x33db71=a74_0x4a5d;void _0x31ef84;const _0x23195a=_0x45939e?_0x33db71(0x226)+encodeURIComponent(_0x4f0895)+'/'+encodeURIComponent(_0x403ef4)+_0x33db71(0x215)+encodeURIComponent(_0x45939e)+_0x33db71(0x22c):_0x33db71(0x226)+encodeURIComponent(_0x4f0895)+'/'+encodeURIComponent(_0x403ef4)+'/download';return skillHubBinaryRequest(_0x23195a);}async function publishRuntimeSkill(_0x55e4cf,_0x20e5e4,_0x4ea6de){const _0x20d05e=a74_0x4a5d,_0x4c063d=buildRuntimeSkillPublishForm(_0x20e5e4,_0x4ea6de[_0x20d05e(0x20c)]),_0x20b038=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x55e4cf)+'/publish',{'method':_0x20d05e(0x20f),'query':{'confirmWarnings':_0x4ea6de['confirmWarnings']===!![]?!![]:undefined},'body':_0x4c063d});return{'appCode':_0x20b038[_0x20d05e(0x1fe)]??_0x55e4cf,'skillCode':_0x20b038[_0x20d05e(0x240)]??_0x20e5e4[_0x20d05e(0x231)]??'','skillName':_0x20e5e4[_0x20d05e(0x25a)]??_0x20b038[_0x20d05e(0x240)]??_0x20e5e4['skillCode'],'description':_0x20e5e4[_0x20d05e(0x1ff)],'scope':skillHubVisibilityToScope(_0x20b038[_0x20d05e(0x20c)]??_0x4ea6de[_0x20d05e(0x20c)])??_0x20d05e(0x239),'version':_0x20b038[_0x20d05e(0x222)]??_0x20e5e4[_0x20d05e(0x222)],'tags':_0x20e5e4[_0x20d05e(0x237)],'content':_0x20e5e4['content']};}function buildRuntimeSkillPublishForm(_0x3399d1,_0x12614f){const _0x266298=a74_0x4a5d,_0x2492de=new FormData();return _0x2492de['set'](_0x266298(0x229),runtimeSkillPackageFile(_0x3399d1)),_0x3399d1['skillName']?.[_0x266298(0x21f)]()&&_0x2492de[_0x266298(0x243)](_0x266298(0x21b),_0x3399d1[_0x266298(0x25a)][_0x266298(0x21f)]()),_0x2492de[_0x266298(0x243)](_0x266298(0x20c),_0x12614f),_0x2492de;}function runtimeSkillPackageFile(_0x5e731f){const _0x4d19d5=a74_0x4a5d;if(!_0x5e731f[_0x4d19d5(0x238)])throw CliErrors[_0x4d19d5(0x23c)](_0x4d19d5(0x25e));const _0x133c4f=Buffer[_0x4d19d5(0x254)](_0x5e731f[_0x4d19d5(0x238)],_0x4d19d5(0x20b)),_0x14a7bd=new Blob([_0x133c4f],{'type':_0x4d19d5(0x1e6)}),_0xb3997e=(_0x5e731f['skillCode']||'skill')+'.zip';if(typeof File!==_0x4d19d5(0x246))return new File([_0x14a7bd],_0xb3997e,{'type':_0x4d19d5(0x1e6)});return _0x14a7bd;}function normalizeSkillHubRuntimeListResponse(_0x1a8b1c,_0x11c84f,_0x4b0850,_0x506bf2){const _0x4d0ee4=a74_0x4a5d,_0x4d1710=Array[_0x4d0ee4(0x21d)](_0x11c84f)?_0x11c84f:Array[_0x4d0ee4(0x21d)](_0x11c84f?.[_0x4d0ee4(0x1f8)])?_0x11c84f[_0x4d0ee4(0x1f8)]:[],_0xee76d7=_0x506bf2?.[_0x4d0ee4(0x21f)](),_0x39c1db=_0x4d1710[_0x4d0ee4(0x1e7)](_0x492981=>!_0xee76d7||_0x492981['slug']===_0xee76d7)[_0x4d0ee4(0x233)](skillHubRuntimeItemToRuntimeSkill)[_0x4d0ee4(0x1e7)](_0x5e551d=>Boolean(_0x5e551d)),_0x16071a=_0x39c1db[_0x4d0ee4(0x1e7)](_0x22a780=>_0x22a780['scope']===_0x4d0ee4(0x239)),_0x44e170=_0x39c1db['filter'](_0x381d8a=>_0x381d8a['scope']==='company');return{'appCode':_0x1a8b1c,'personal':_0x4b0850===_0x4d0ee4(0x225)?[]:_0x16071a,'company':_0x4b0850==='personal'?[]:_0x44e170,'effective':buildEffectiveRuntimeSkills(_0x16071a,_0x44e170,_0x4b0850)};}function skillHubRuntimeItemToRuntimeSkill(_0x5c42a4){const _0x101d34=a74_0x4a5d,_0x1f117c=_0x5c42a4[_0x101d34(0x240)]?.[_0x101d34(0x21f)](),_0x5a5fca=skillHubVisibilityToScope(_0x5c42a4[_0x101d34(0x20c)]);if(!_0x1f117c||!_0x5a5fca)return undefined;return{'id':_0x5c42a4['id'],'appCode':_0x5c42a4['namespace'],'skillCode':_0x1f117c,'skillName':_0x5c42a4[_0x101d34(0x21b)]??_0x1f117c,'description':_0x5c42a4[_0x101d34(0x207)],'scope':_0x5a5fca,'version':skillHubRuntimeItemVersion(_0x5c42a4),'status':_0x5c42a4[_0x101d34(0x1fd)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x5cdc91){const _0x21d455=a74_0x4a5d,_0x20ce1b=_0x5cdc91[_0x21d455(0x240)]?.[_0x21d455(0x21f)]();if(!_0x20ce1b)return undefined;return{'id':_0x5cdc91['id'],'appCode':_0x5cdc91['namespace'],'skillCode':_0x20ce1b,'skillName':_0x5cdc91[_0x21d455(0x21b)]??_0x20ce1b,'description':_0x5cdc91[_0x21d455(0x207)],'scope':skillHubVisibilityToScope(_0x5cdc91[_0x21d455(0x20c)])??_0x5cdc91[_0x21d455(0x20c)]?.[_0x21d455(0x1dd)](),'version':skillHubRuntimeItemVersion(_0x5cdc91),'status':_0x5cdc91['status']};}function skillHubVisibilityToScope(_0x209118){const _0x1daacb=a74_0x4a5d;if(_0x209118===_0x1daacb(0x216))return _0x1daacb(0x239);if(_0x209118===_0x1daacb(0x230))return _0x1daacb(0x225);return undefined;}function skillHubRuntimeItemVersion(_0x109fbb){const _0x55e2a5=a74_0x4a5d;return _0x109fbb[_0x55e2a5(0x208)]?.[_0x55e2a5(0x222)]??_0x109fbb[_0x55e2a5(0x24c)]?.[_0x55e2a5(0x222)]??_0x109fbb[_0x55e2a5(0x22d)]?.[_0x55e2a5(0x222)];}function buildEffectiveRuntimeSkills(_0x9b9cce,_0x39b7f3,_0x45f56c){const _0x154257=a74_0x4a5d;if(_0x45f56c===_0x154257(0x239))return _0x9b9cce;if(_0x45f56c===_0x154257(0x225))return _0x39b7f3;const _0x386d24=new Map();for(const _0x48ff19 of _0x39b7f3){_0x386d24[_0x154257(0x243)](_0x48ff19[_0x154257(0x231)],_0x48ff19);}for(const _0x524213 of _0x9b9cce){_0x386d24[_0x154257(0x243)](_0x524213[_0x154257(0x231)],_0x524213);}return Array['from'](_0x386d24[_0x154257(0x1f6)]());}function normalizeRuntimeSkillListResponse(_0x1e78d7,_0x1bf2b5){const _0x4ea5a6=a74_0x4a5d;if(Array[_0x4ea5a6(0x21d)](_0x1bf2b5)){const _0x1b4f30=_0x1bf2b5[_0x4ea5a6(0x1e7)](_0x1960d4=>_0x1960d4[_0x4ea5a6(0x23d)]==='personal'),_0x2efef6=_0x1bf2b5[_0x4ea5a6(0x1e7)](_0x3e3abe=>_0x3e3abe['scope']===_0x4ea5a6(0x225));return{'appCode':_0x1e78d7,'personal':_0x1b4f30,'company':_0x2efef6,'effective':[..._0x2efef6,..._0x1b4f30]};}return{'appCode':_0x1bf2b5?.[_0x4ea5a6(0x250)]??_0x1e78d7,'personal':Array['isArray'](_0x1bf2b5?.['personal'])?_0x1bf2b5[_0x4ea5a6(0x239)]:[],'company':Array[_0x4ea5a6(0x21d)](_0x1bf2b5?.[_0x4ea5a6(0x225)])?_0x1bf2b5[_0x4ea5a6(0x225)]:[],'effective':Array[_0x4ea5a6(0x21d)](_0x1bf2b5?.[_0x4ea5a6(0x23a)])?_0x1bf2b5[_0x4ea5a6(0x23a)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58d0ca,_0x1b25d3){const _0x5c4047=a75_0x37f6,_0xb5e7d5=_0x58d0ca();while(!![]){try{const _0x2a0453=-parseInt(_0x5c4047(0x1be))/0x1+parseInt(_0x5c4047(0x1c8))/0x2*(-parseInt(_0x5c4047(0x1cf))/0x3)+parseInt(_0x5c4047(0x1c5))/0x4*(parseInt(_0x5c4047(0x1cb))/0x5)+parseInt(_0x5c4047(0x1c1))/0x6*(parseInt(_0x5c4047(0x1ce))/0x7)+-parseInt(_0x5c4047(0x1c4))/0x8+-parseInt(_0x5c4047(0x1bd))/0x9*(-parseInt(_0x5c4047(0x1c9))/0xa)+parseInt(_0x5c4047(0x1c3))/0xb*(parseInt(_0x5c4047(0x1ca))/0xc);if(_0x2a0453===_0x1b25d3)break;else _0xb5e7d5['push'](_0xb5e7d5['shift']());}catch(_0x355b72){_0xb5e7d5['push'](_0xb5e7d5['shift']());}}}(a75_0x7dc2,0x7f834));function a75_0x37f6(_0x980ba9,_0x29b5af){_0x980ba9=_0x980ba9-0x1bd;const _0x7dc2e3=a75_0x7dc2();let _0x37f661=_0x7dc2e3[_0x980ba9];return _0x37f661;}import{listDatasets}from'../core/api-client.js';const cache=new Map();function a75_0x7dc2(){const _0x559fec=['set','dbId','12TtgAAf','db-','11fSAStm','2282368NhlmXt','2923124abDzsb','find','has','2qsaole','20200XuCSsx','1481544fleDlV','5UPVoCF','get','entries','3375407aCKtBU','1717137euHwAX','dbtableConfig','1467CMRbkO','767938lBMifi'];a75_0x7dc2=function(){return _0x559fec;};return a75_0x7dc2();}export async function listDatabases(_0x52b914){const _0x507d0c=a75_0x37f6;if(cache[_0x507d0c(0x1c7)](_0x52b914))return cache[_0x507d0c(0x1cc)](_0x52b914);const _0x93258b=await listDatasets(_0x52b914),_0x5819cf=new Map();for(const _0x7d990a of _0x93258b){const _0x588da3=_0x7d990a[_0x507d0c(0x1d0)];_0x588da3?.[_0x507d0c(0x1c0)]!=null&&_0x5819cf[_0x507d0c(0x1bf)](_0x588da3['dbId'],_0x588da3['dbName']??_0x507d0c(0x1c2)+_0x588da3['dbId']);}const _0x462777=[..._0x5819cf[_0x507d0c(0x1cd)]()]['map'](([_0x229f4e,_0x5c4777])=>({'dbId':_0x229f4e,'dbName':_0x5c4777}));return cache[_0x507d0c(0x1bf)](_0x52b914,_0x462777),_0x462777;}export async function getDbName(_0x39e9de,_0x3640c7){const _0x34a38e=a75_0x37f6;try{const _0x1278d9=await listDatabases(_0x39e9de);return _0x1278d9[_0x34a38e(0x1c6)](_0x4a1b30=>_0x4a1b30[_0x34a38e(0x1c0)]===_0x3640c7)?.['dbName'];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x447f76,_0x133b97){const _0x5c7f25=a76_0x4b5a,_0x554e68=_0x447f76();while(!![]){try{const _0x5e1072=parseInt(_0x5c7f25(0xcf))/0x1*(parseInt(_0x5c7f25(0xcb))/0x2)+-parseInt(_0x5c7f25(0xc5))/0x3*(parseInt(_0x5c7f25(0xea))/0x4)+-parseInt(_0x5c7f25(0xd7))/0x5*(-parseInt(_0x5c7f25(0xd2))/0x6)+parseInt(_0x5c7f25(0xe1))/0x7*(-parseInt(_0x5c7f25(0xce))/0x8)+parseInt(_0x5c7f25(0xde))/0x9+-parseInt(_0x5c7f25(0xe4))/0xa+parseInt(_0x5c7f25(0xca))/0xb*(parseInt(_0x5c7f25(0xe3))/0xc);if(_0x5e1072===_0x133b97)break;else _0x554e68['push'](_0x554e68['shift']());}catch(_0x3c418b){_0x554e68['push'](_0x554e68['shift']());}}}(a76_0x473c,0x78ae5));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x228368){const _0x88de3e=a76_0x4b5a;_client=createClient({'appCode':_0x228368[_0x88de3e(0xdf)],'env':_0x228368[_0x88de3e(0xd6)],'authMode':_0x228368[_0x88de3e(0xe7)],..._0x228368[_0x88de3e(0xcc)]?{'accessKey':_0x228368[_0x88de3e(0xcc)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource']}}});}function a76_0x473c(){const _0x1da7e0=['5462710UVAaUB','dataset_','isArray','authMode','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','trim','4rhgash','2703HwzIDt','execute','column','data\x20aggregate\x20--params.aggregate[','getOne','11DsQeFM','308030bSIqdc','accessKey','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','776zQVvem','5TmOsGK',']\x20must\x20be\x20an\x20object.','string','42mHMzfb','batchCreate','bff','field','env','163045vuEzQf','models','update','delete','aggregate','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27\x20or\x20\x27{\x22id\x22:[1,2,3],\x22name\x22:\x22new\x22}\x27','sql','1346589ciMnQK','appCode','validation','29799kqPHVc','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','3677412rPvqzg'];a76_0x473c=function(){return _0x1da7e0;};return a76_0x473c();}function ensureClient(){const _0x5f464d=a76_0x4b5a;if(!_client)throw new Error(_0x5f464d(0xe8));return _client;}function normalizeAggregateParams(_0x2bb770){const _0x1dd314=a76_0x4b5a,_0x3360eb=_0x2bb770[_0x1dd314(0xdb)];if(_0x3360eb===undefined)return _0x2bb770;if(!Array['isArray'](_0x3360eb))throw CliErrors['validation']('data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.');return{..._0x2bb770,'aggregate':_0x3360eb['map']((_0x3280fb,_0xdd8ecc)=>{const _0xefa8d5=_0x1dd314;if(!_0x3280fb||typeof _0x3280fb!=='object'||Array[_0xefa8d5(0xe6)](_0x3280fb))throw CliErrors[_0xefa8d5(0xe0)]('data\x20aggregate\x20--params.aggregate['+_0xdd8ecc+_0xefa8d5(0xd0));const _0x48cd01=_0x3280fb[_0xefa8d5(0xc7)]??_0x3280fb['field'];if(typeof _0x48cd01!==_0xefa8d5(0xd1)||_0x48cd01[_0xefa8d5(0xe9)]()==='')throw CliErrors['validation'](_0xefa8d5(0xc8)+_0xdd8ecc+']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.');const _0x48c477={..._0x3280fb,'column':_0x48cd01};return delete _0x48c477[_0xefa8d5(0xd5)],_0x48c477;})};}function a76_0x4b5a(_0x443275,_0x567eef){_0x443275=_0x443275-0xc5;const _0x473c2e=a76_0x473c();let _0x4b5aa0=_0x473c2e[_0x443275];return _0x4b5aa0;}export async function executeData(_0x25f57a,_0x27e627,_0x45cb25){const _0x32169a=a76_0x4b5a,_0x526ea2=ensureClient(),_0x595670=_0x32169a(0xe5)+_0x25f57a,_0x1357d0=_0x526ea2[_0x32169a(0xd8)][_0x595670];if(!_0x1357d0||typeof _0x1357d0[_0x27e627]!=='function')throw new Error(_0x32169a(0xe2)+_0x27e627+'\x22.\x20'+_0x32169a(0xcd));if(_0x27e627===_0x32169a(0xd3))return _0x1357d0[_0x32169a(0xd3)](parseBatchCreateItemsFromParams(_0x45cb25));const _0x4aca84=_0x45cb25!==undefined&&_0x45cb25!==null&&!Array[_0x32169a(0xe6)](_0x45cb25)?_0x45cb25:{};switch(_0x27e627){case _0x32169a(0xc9):{const _0x5023a0=_0x4aca84['id'];if(_0x5023a0===undefined||_0x5023a0===null)throw new Error('getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x1357d0['getOne'](_0x5023a0);}case _0x32169a(0xd9):{const {id:_0x44ca71,..._0x3a3ec7}=_0x4aca84;if(_0x44ca71===undefined||_0x44ca71===null)throw new Error(_0x32169a(0xdc));return _0x1357d0[_0x32169a(0xd9)](_0x44ca71,_0x3a3ec7);}case'delete':{const _0xee6273=_0x4aca84['id'];if(_0xee6273===undefined||_0xee6273===null)throw new Error('delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x1357d0[_0x32169a(0xda)](_0xee6273);}case _0x32169a(0xdb):return _0x1357d0[_0x32169a(0xdb)](normalizeAggregateParams(_0x4aca84));default:return _0x1357d0[_0x27e627](_0x4aca84);}}export async function executeSdkSql(_0x54070a,_0x2a37d1){const _0x3598f3=a76_0x4b5a,_0x44cefd=ensureClient();return _0x44cefd[_0x3598f3(0xdd)][_0x3598f3(0xc6)]({'sqlCode':_0x54070a,'params':_0x2a37d1});}export async function executeSdkBff(_0x41566b,_0x3ca93c){const _0x1a9ca5=a76_0x4b5a,_0x2e1a79=ensureClient();return _0x2e1a79[_0x1a9ca5(0xd4)]['execute']({'scriptName':_0x41566b,'params':_0x3ca93c});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0x465703=a77_0x56a6;(function(_0x10f757,_0x3289f5){const _0x4f61ee=a77_0x56a6,_0xe93293=_0x10f757();while(!![]){try{const _0x5ba662=parseInt(_0x4f61ee(0x194))/0x1+-parseInt(_0x4f61ee(0x196))/0x2*(parseInt(_0x4f61ee(0x18f))/0x3)+-parseInt(_0x4f61ee(0x195))/0x4+parseInt(_0x4f61ee(0x188))/0x5*(parseInt(_0x4f61ee(0x189))/0x6)+-parseInt(_0x4f61ee(0x18a))/0x7*(parseInt(_0x4f61ee(0x190))/0x8)+parseInt(_0x4f61ee(0x191))/0x9+parseInt(_0x4f61ee(0x18c))/0xa;if(_0x5ba662===_0x3289f5)break;else _0xe93293['push'](_0xe93293['shift']());}catch(_0x4a97c9){_0xe93293['push'](_0xe93293['shift']());}}}(a77_0xfe42,0xa88ab));import{CliError,createCliErrors}from'@lovrabet/cli-framework';function a77_0xfe42(){const _0x2eb294=['55aJIQyY','73374wtaJFD','7kdPnxr','\x20auth\x20login`.','5686640wtvcXb','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','Set\x20appcode\x20via\x20--appcode\x20or\x20','493851EQsBdU','3022688orBXgF','8635446KTeZfE','newConfigFileName','\x20or\x20run\x20`','830984uppmvI','5043444BVtstg','2EcieDX','\x20file.'];a77_0xfe42=function(){return _0x2eb294;};return a77_0xfe42();}function a77_0x56a6(_0x3c26f7,_0x49c9fb){_0x3c26f7=_0x3c26f7-0x187;const _0xfe4273=a77_0xfe42();let _0x56a628=_0xfe4273[_0x3c26f7];return _0x56a628;}import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+a77_0x465703(0x193)+CLI_BIN_NAME+a77_0x465703(0x18b),'configMissingHint':a77_0x465703(0x18e)+PRODUCT_CONFIG[a77_0x465703(0x192)]+'.','notInProjectHint':a77_0x465703(0x18d)+PRODUCT_CONFIG['newConfigFileName']+a77_0x465703(0x187)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fdc49,_0x26f23f){var _0x216cf8=a78_0x12e8,_0x2f58ae=_0x3fdc49();while(!![]){try{var _0x19d22b=-parseInt(_0x216cf8(0x135))/0x1*(-parseInt(_0x216cf8(0x131))/0x2)+parseInt(_0x216cf8(0x132))/0x3*(-parseInt(_0x216cf8(0x130))/0x4)+-parseInt(_0x216cf8(0x12b))/0x5+-parseInt(_0x216cf8(0x12e))/0x6+-parseInt(_0x216cf8(0x134))/0x7+-parseInt(_0x216cf8(0x12f))/0x8*(-parseInt(_0x216cf8(0x133))/0x9)+parseInt(_0x216cf8(0x12c))/0xa*(parseInt(_0x216cf8(0x12d))/0xb);if(_0x19d22b===_0x26f23f)break;else _0x2f58ae['push'](_0x2f58ae['shift']());}catch(_0x41f70a){_0x2f58ae['push'](_0x2f58ae['shift']());}}}(a78_0x2ed0,0xdcdd0));function a78_0x2ed0(){var _0x593567=['11jtsXgV','10127622TetOem','63944dIijvo','2206396jzgBDi','264FUjhWF','3UFuysu','1782FWieRF','10251038mtoXfa','3964bLzlIZ','6106745lTtjeI','37241130MuIVNm'];a78_0x2ed0=function(){return _0x593567;};return a78_0x2ed0();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a78_0x597cff}from'@lovrabet/cli-framework';function a78_0x12e8(_0x19b106,_0x4ef35d){_0x19b106=_0x19b106-0x12b;var _0x2ed0c0=a78_0x2ed0();var _0x12e812=_0x2ed0c0[_0x19b106];return _0x12e812;}export function buildAllFlags(_0x5906fe){return a78_0x597cff(_0x5906fe,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13fb2c,_0x2f6c24){const _0x457736=a79_0x2fc4,_0x169a8c=_0x13fb2c();while(!![]){try{const _0xf287d2=parseInt(_0x457736(0x1c4))/0x1+-parseInt(_0x457736(0x1c6))/0x2+parseInt(_0x457736(0x1bf))/0x3+parseInt(_0x457736(0x1c8))/0x4*(-parseInt(_0x457736(0x1c7))/0x5)+parseInt(_0x457736(0x1c5))/0x6+-parseInt(_0x457736(0x1c0))/0x7*(-parseInt(_0x457736(0x1be))/0x8)+parseInt(_0x457736(0x1c1))/0x9*(-parseInt(_0x457736(0x1c3))/0xa);if(_0xf287d2===_0x2f6c24)break;else _0x169a8c['push'](_0x169a8c['shift']());}catch(_0x3680fc){_0x169a8c['push'](_0x169a8c['shift']());}}}(a79_0x32c2,0x29ce1));function a79_0x32c2(){const _0x1f2f75=['221409RXwhvg','311544XKOksf','386716ejYlkV','143305ucdelF','20zSiTar','1065296MaGJRH','309987xqcMmf','14aaMtof','711ixXifG','body','17100frZNwN'];a79_0x32c2=function(){return _0x1f2f75;};return a79_0x32c2();}function a79_0x2fc4(_0x4e28f3,_0x1ad1b7){_0x4e28f3=_0x4e28f3-0x1be;const _0x32c251=a79_0x32c2();let _0x2fc45c=_0x32c251[_0x4e28f3];return _0x2fc45c;}export function dryRun(_0x30dc12,_0x1699f8){const _0x548e05={'method':_0x30dc12,'url':_0x1699f8},_0x4935c2={'body'(_0x5c5d59){const _0x1ce9da=a79_0x2fc4;return _0x548e05[_0x1ce9da(0x1c2)]=_0x5c5d59,_0x4935c2;},'description'(_0x2cb9fb){return _0x548e05['description']=_0x2cb9fb,_0x4935c2;},'build'(){return{..._0x548e05};}};return _0x4935c2;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a80_0x108b53=a80_0xbd1c;function a80_0x3084(){const _0x43a27a=['342QPzbGP','904552nZprkE','328SDhkzF','50JZpkFA','104490ulLEqE','validateFlags','10554944gvrKMH','8819027nWVhfd','822524sdqaSX','7573158qaRzFW','32001gzVDsn'];a80_0x3084=function(){return _0x43a27a;};return a80_0x3084();}(function(_0x5bf72a,_0x3b7df8){const _0x51c985=a80_0xbd1c,_0x475b33=_0x5bf72a();while(!![]){try{const _0x40e438=parseInt(_0x51c985(0x193))/0x1+parseInt(_0x51c985(0x18c))/0x2+-parseInt(_0x51c985(0x18a))/0x3*(parseInt(_0x51c985(0x18d))/0x4)+-parseInt(_0x51c985(0x18f))/0x5*(parseInt(_0x51c985(0x18b))/0x6)+-parseInt(_0x51c985(0x192))/0x7+-parseInt(_0x51c985(0x191))/0x8+-parseInt(_0x51c985(0x189))/0x9*(-parseInt(_0x51c985(0x18e))/0xa);if(_0x40e438===_0x3b7df8)break;else _0x475b33['push'](_0x475b33['shift']());}catch(_0xcf87c3){_0x475b33['push'](_0x475b33['shift']());}}}(a80_0x3084,0xcc589));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a80_0xbd1c(_0x547a7e,_0x2aa723){_0x547a7e=_0x547a7e-0x189;const _0x3084ec=a80_0x3084();let _0xbd1c50=_0x3084ec[_0x547a7e];return _0xbd1c50;}const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers['parseFlags'];export const validateFlags=helpers[a80_0x108b53(0x190)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1bad27,_0x49a483){const _0x428c50=a81_0x1a41,_0x4465c1=_0x1bad27();while(!![]){try{const _0x43fe35=-parseInt(_0x428c50(0x17c))/0x1*(parseInt(_0x428c50(0x178))/0x2)+parseInt(_0x428c50(0x185))/0x3*(-parseInt(_0x428c50(0x17b))/0x4)+parseInt(_0x428c50(0x17a))/0x5+-parseInt(_0x428c50(0x179))/0x6*(parseInt(_0x428c50(0x177))/0x7)+-parseInt(_0x428c50(0x17d))/0x8+-parseInt(_0x428c50(0x176))/0x9+-parseInt(_0x428c50(0x182))/0xa*(-parseInt(_0x428c50(0x175))/0xb);if(_0x43fe35===_0x49a483)break;else _0x4465c1['push'](_0x4465c1['shift']());}catch(_0x5a5189){_0x4465c1['push'](_0x4465c1['shift']());}}}(a81_0x3ec9,0x8558f));import{createHelpGenerators}from'@lovrabet/cli-framework';function a81_0x1a41(_0x157dd6,_0x4239d4){_0x157dd6=_0x157dd6-0x175;const _0x3ec9db=a81_0x3ec9();let _0x1a41e4=_0x3ec9db[_0x157dd6];return _0x1a41e4;}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 createGenerators(){const _0x2a624d=a81_0x1a41;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(serviceRegistry,safeListDynamicServiceEntries()),'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x2a624d(0x181)+PRODUCT_CONFIG[_0x2a624d(0x17e)]+'\x20or\x20--appcode).'});}export function generateCommandHelp(_0x3a9ce1){return createGenerators()['generateCommandHelp'](_0x3a9ce1);}export function generateServiceHelp(_0x33ba50){const _0x29a827=a81_0x1a41;return createGenerators()[_0x29a827(0x187)](_0x33ba50);}export function generateFullHelp(){const _0x41b9c1=a81_0x1a41;return createGenerators()[_0x41b9c1(0x17f)]();}function getAnyServiceEntry(_0x1fcd73){const _0x168f4a=getServiceEntry(_0x1fcd73);if(_0x168f4a)return _0x168f4a;try{return getDynamicServiceEntry(_0x1fcd73);}catch{return undefined;}}function getAnyServiceDefinitions(_0x1a497f){const _0x4efca9=a81_0x1a41,_0x3e8b10=serviceGroups[_0x4efca9(0x184)](_0x1a497f);if(_0x3e8b10)return _0x3e8b10;try{return getDynamicServiceDefinitions(_0x1a497f);}catch{return undefined;}}function a81_0x3ec9(){const _0x1b736e=['8eaqmuq','3397352UbOAFT','newConfigFileName','generateFullHelp','has','Requires\x20appcode\x20(set\x20via\x20','219860fzBTVo','service','get','6906NieAlX','map','generateServiceHelp','869rDJSkk','6852609cbWEHF','7xAwYnl','164676MeNeTP','2014020kbHNNX','5052295puoMDN','36GHCqrq'];a81_0x3ec9=function(){return _0x1b736e;};return a81_0x3ec9();}function safeListDynamicServiceEntries(){const _0x189092=a81_0x1a41,_0x392d7f=new Set(serviceRegistry[_0x189092(0x186)](_0x5bac90=>_0x5bac90['service']));try{return listDynamicServiceEntries()['filter'](_0x3afa55=>!_0x392d7f[_0x189092(0x180)](_0x3afa55[_0x189092(0x183)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a82_0x34d3(_0x3ce166,_0x4f7da9){_0x3ce166=_0x3ce166-0x1a9;var _0xc48285=a82_0xc482();var _0x34d3d0=_0xc48285[_0x3ce166];return _0x34d3d0;}(function(_0x4825ef,_0x26e4d5){var _0x349dd6=a82_0x34d3,_0x51f7b7=_0x4825ef();while(!![]){try{var _0x16c4c4=parseInt(_0x349dd6(0x1ae))/0x1+-parseInt(_0x349dd6(0x1aa))/0x2*(-parseInt(_0x349dd6(0x1b1))/0x3)+parseInt(_0x349dd6(0x1b0))/0x4+-parseInt(_0x349dd6(0x1a9))/0x5+-parseInt(_0x349dd6(0x1ad))/0x6*(parseInt(_0x349dd6(0x1ac))/0x7)+parseInt(_0x349dd6(0x1ab))/0x8*(-parseInt(_0x349dd6(0x1b2))/0x9)+-parseInt(_0x349dd6(0x1b3))/0xa*(-parseInt(_0x349dd6(0x1af))/0xb);if(_0x16c4c4===_0x26e4d5)break;else _0x51f7b7['push'](_0x51f7b7['shift']());}catch(_0x4f1b79){_0x51f7b7['push'](_0x51f7b7['shift']());}}}(a82_0xc482,0x92974));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';function a82_0xc482(){var _0x274104=['91KufsyU','400170ncAPfY','972177RObyLQ','836JLnhWj','2608392lGhXuF','108xWMhtZ','406476sYROrA','23870FwmewY','3321320AqWZlw','45714HZYGDX','88bIFzKU'];a82_0xc482=function(){return _0x274104;};return a82_0xc482();}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 a83_0x5b7f(_0x371bbc,_0x391cdd){_0x371bbc=_0x371bbc-0x129;const _0x1f2631=a83_0x1f26();let _0x5b7fd0=_0x1f2631[_0x371bbc];return _0x5b7fd0;}(function(_0x493522,_0x4ed8ab){const _0x7ee626=a83_0x5b7f,_0x1ac467=_0x493522();while(!![]){try{const _0x5378ae=-parseInt(_0x7ee626(0x12e))/0x1*(parseInt(_0x7ee626(0x133))/0x2)+parseInt(_0x7ee626(0x136))/0x3*(-parseInt(_0x7ee626(0x129))/0x4)+-parseInt(_0x7ee626(0x135))/0x5+parseInt(_0x7ee626(0x132))/0x6*(parseInt(_0x7ee626(0x134))/0x7)+parseInt(_0x7ee626(0x12f))/0x8+-parseInt(_0x7ee626(0x137))/0x9+parseInt(_0x7ee626(0x12a))/0xa;if(_0x5378ae===_0x4ed8ab)break;else _0x1ac467['push'](_0x1ac467['shift']());}catch(_0x154910){_0x1ac467['push'](_0x1ac467['shift']());}}}(a83_0x1f26,0x7b638));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a83_0x1f26(){const _0x39bce9=['update','error','78oyogwM','299756rUvDLV','100555KPcYPh','1819530WjChUK','170271bfNKhj','7009362nuvqta','40jqPFnm','20473060WFIwxi','_notice','message','pretty','2jpgiaq','2251192rMpUBU'];a83_0x1f26=function(){return _0x39bce9;};return a83_0x1f26();}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x17e20c,_0x1697bc){const _0x446c42=a83_0x5b7f,_0xbac3f0=_0x17e20c[_0x446c42(0x12b)],{_notice:_0x4fdddb,..._0x352ae7}=_0x17e20c;void _0x4fdddb,baseFormatOutput(_0x352ae7,_0x1697bc),_0x1697bc['format']===_0x446c42(0x12d)&&printPrettyNotice(_0xbac3f0);}function printPrettyNotice(_0x1444e1){const _0x5b0fc7=a83_0x5b7f;if(!_0x1444e1?.['update'])return;console[_0x5b0fc7(0x131)](_0x1444e1[_0x5b0fc7(0x130)][_0x5b0fc7(0x12c)]+'\x20('+_0x1444e1[_0x5b0fc7(0x130)]['url']+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x54396c,_0x1e3824){const _0x545998=a84_0x44f0,_0x3b5cb5=_0x54396c();while(!![]){try{const _0x29f7d4=parseInt(_0x545998(0x1a5))/0x1+parseInt(_0x545998(0x199))/0x2+parseInt(_0x545998(0x196))/0x3*(parseInt(_0x545998(0x1a2))/0x4)+-parseInt(_0x545998(0x185))/0x5+parseInt(_0x545998(0x187))/0x6*(parseInt(_0x545998(0x1a8))/0x7)+parseInt(_0x545998(0x180))/0x8+parseInt(_0x545998(0x19f))/0x9*(-parseInt(_0x545998(0x184))/0xa);if(_0x29f7d4===_0x1e3824)break;else _0x3b5cb5['push'](_0x3b5cb5['shift']());}catch(_0x299cff){_0x3b5cb5['push'](_0x3b5cb5['shift']());}}}(a84_0x2fcc,0x18b8a));function toKebab(_0x3838c7){const _0x143796=a84_0x44f0;return _0x3838c7[_0x143796(0x1a4)](/_/g,'-')[_0x143796(0x1a4)](/-([A-Z]+)/g,(_0x11c706,_0x3b92cb)=>'-'+_0x3b92cb['toLowerCase']())[_0x143796(0x1a4)](/([a-z0-9])([A-Z])/g,(_0x48ad65,_0x38cb51,_0x56f4f2)=>_0x38cb51+'-'+_0x56f4f2)[_0x143796(0x19c)]();}function buildKnownFlags(_0x4fdafc){const _0x89a069=a84_0x44f0,_0x187c95=new Set();for(const _0x3160bb of _0x4fdafc){_0x187c95[_0x89a069(0x19e)](_0x3160bb[_0x89a069(0x18e)]),_0x187c95[_0x89a069(0x19e)](toCamelCase(_0x3160bb[_0x89a069(0x18e)]));}for(const _0x39640c of[_0x89a069(0x192),_0x89a069(0x182),'yes',_0x89a069(0x198)]){_0x187c95['add'](_0x39640c);}for(const _0x3c8e9b of[_0x89a069(0x193),_0x89a069(0x197),_0x89a069(0x19d),_0x89a069(0x18f),_0x89a069(0x18c),'non-interactive','ci',_0x89a069(0x1a1),_0x89a069(0x19a)]){_0x187c95['add'](_0x3c8e9b);}return _0x187c95;}function buildFlagTypeMap(_0x3fb7eb){const _0x4348c9=a84_0x44f0,_0x1f1bc1=new Map();for(const _0x384dec of _0x3fb7eb){_0x1f1bc1[_0x4348c9(0x1a7)](_0x384dec[_0x4348c9(0x18e)],_0x384dec[_0x4348c9(0x190)]),_0x1f1bc1[_0x4348c9(0x1a7)](toCamelCase(_0x384dec['name']),_0x384dec['type']);}return _0x1f1bc1;}function a84_0x44f0(_0xe0b712,_0xef1729){_0xe0b712=_0xe0b712-0x180;const _0x2fccc6=a84_0x2fcc();let _0x44f02b=_0x2fccc6[_0xe0b712];return _0x44f02b;}function toCamelCase(_0x2911af){const _0x5a0240=a84_0x44f0;return _0x2911af[_0x5a0240(0x1a4)](/-([a-z])/g,(_0x3c04d3,_0x459dfd)=>_0x459dfd['toUpperCase']());}function aliasHandler(_0x32ae00,_0x69010e){const _0x58d098=a84_0x44f0,_0x2377ae=[];for(const _0x167edc of Object[_0x58d098(0x18b)](_0x32ae00)){if(_0x69010e[_0x58d098(0x191)](_0x167edc))continue;const _0x5442c2=toKebab(_0x167edc);_0x5442c2!==_0x167edc&&_0x69010e[_0x58d098(0x191)](_0x5442c2)&&_0x2377ae['push']({'original':_0x167edc,'corrected':_0x5442c2,'handler':_0x58d098(0x195)});}return _0x2377ae;}function a84_0x2fcc(){const _0x26c04c=['60976vIsBth','string','dryRun','entries','900GRcQpI','338660PCpEOI','length','6042tMYuQj','original','get','sticky','keys','nonInteractive','corrected','name','app','type','has','dry-run','help','slice','alias','6927UliIMW','env','format','65140pgjHcT','version','boolean','toLowerCase','appcode','add','33237YsGmeS','number','global','152TvSxkg','push','replace','178068jIaZoG','indexOf','set','1358kTDdAT'];a84_0x2fcc=function(){return _0x26c04c;};return a84_0x2fcc();}function stickyHandler(_0x5dcef4,_0x2f88c0,_0x72eedd){const _0x57daa6=a84_0x44f0,_0x5955eb=[];for(const [_0x583dd6,_0x1f03a6]of Object[_0x57daa6(0x183)](_0x5dcef4)){if(_0x1f03a6!==!![])continue;for(let _0x5e39ce=_0x583dd6[_0x57daa6(0x186)]-0x1;_0x5e39ce>0x0;_0x5e39ce--){const _0x42a1ce=_0x583dd6['slice'](0x0,_0x5e39ce),_0x36c6c1=_0x583dd6[_0x57daa6(0x194)](_0x5e39ce),_0x2caba5=toKebab(_0x42a1ce),_0x4e6d6e=toCamelCase(_0x42a1ce),_0x24a232=_0x2f88c0['has'](_0x42a1ce)?_0x42a1ce:_0x2f88c0[_0x57daa6(0x191)](_0x2caba5)?_0x2caba5:_0x2f88c0[_0x57daa6(0x191)](_0x4e6d6e)?_0x4e6d6e:null;if(!_0x24a232)continue;const _0x3b0b78=_0x72eedd[_0x57daa6(0x189)](_0x24a232)??_0x57daa6(0x181);let _0x414f6c;if(_0x3b0b78==='number'){const _0x501b4e=Number(_0x36c6c1);if(isNaN(_0x501b4e)||_0x36c6c1==='')continue;_0x414f6c=_0x501b4e;}else{if(_0x3b0b78===_0x57daa6(0x19b))continue;else{if(_0x36c6c1==='')continue;_0x414f6c=_0x36c6c1;}}_0x5955eb[_0x57daa6(0x1a3)]({'original':_0x583dd6,'corrected':_0x24a232+'='+_0x414f6c,'handler':_0x57daa6(0x18a)});break;}}return _0x5955eb;}export function correctFlags(_0x116c59,_0x245356){const _0x1d9b1b=a84_0x44f0,_0xfa6a6d=buildKnownFlags(_0x245356),_0x8d9a03=buildFlagTypeMap(_0x245356),_0x49d7bb=aliasHandler(_0x116c59,_0xfa6a6d),_0x39f0a4=stickyHandler(_0x116c59,_0xfa6a6d,_0x8d9a03),_0x302697=[..._0x49d7bb,..._0x39f0a4];if(_0x302697[_0x1d9b1b(0x186)]===0x0)return{'flags':_0x116c59,'corrections':[]};const _0x15fc22={..._0x116c59},_0x1a5fdb=new Set();for(const _0x210ae5 of _0x49d7bb){_0x15fc22[_0x210ae5[_0x1d9b1b(0x18d)]]=_0x116c59[_0x210ae5[_0x1d9b1b(0x188)]],_0x1a5fdb[_0x1d9b1b(0x19e)](_0x210ae5[_0x1d9b1b(0x188)]);}for(const _0x4ebac0 of _0x39f0a4){const _0x2d37c0=_0x4ebac0[_0x1d9b1b(0x18d)][_0x1d9b1b(0x1a6)]('='),_0x1269ad=_0x4ebac0[_0x1d9b1b(0x18d)][_0x1d9b1b(0x194)](0x0,_0x2d37c0),_0x3b8787=_0x4ebac0[_0x1d9b1b(0x18d)][_0x1d9b1b(0x194)](_0x2d37c0+0x1),_0xa60b71=_0x8d9a03['get'](_0x1269ad)??_0x1d9b1b(0x181);_0xa60b71===_0x1d9b1b(0x1a0)?_0x15fc22[_0x1269ad]=Number(_0x3b8787):_0x15fc22[_0x1269ad]=_0x3b8787,_0x1a5fdb[_0x1d9b1b(0x19e)](_0x4ebac0[_0x1d9b1b(0x188)]);}for(const _0x4a7169 of _0x1a5fdb){delete _0x15fc22[_0x4a7169];}return{'flags':_0x15fc22,'corrections':_0x302697};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2d0aab,_0x37dd9e){var _0xdaf2d8=a85_0xa516,_0x29a66f=_0x2d0aab();while(!![]){try{var _0x5ac373=-parseInt(_0xdaf2d8(0xca))/0x1+-parseInt(_0xdaf2d8(0xcb))/0x2*(parseInt(_0xdaf2d8(0xc5))/0x3)+-parseInt(_0xdaf2d8(0xc7))/0x4+-parseInt(_0xdaf2d8(0xc8))/0x5+parseInt(_0xdaf2d8(0xc4))/0x6+-parseInt(_0xdaf2d8(0xc9))/0x7*(parseInt(_0xdaf2d8(0xcc))/0x8)+parseInt(_0xdaf2d8(0xc6))/0x9;if(_0x5ac373===_0x37dd9e)break;else _0x29a66f['push'](_0x29a66f['shift']());}catch(_0x4cec75){_0x29a66f['push'](_0x29a66f['shift']());}}}(a85_0x2385,0x37913));function a85_0xa516(_0x3d5d5d,_0x2b9968){_0x3d5d5d=_0x3d5d5d-0xc4;var _0x2385ff=a85_0x2385();var _0xa516d0=_0x2385ff[_0x3d5d5d];return _0xa516d0;}export{extractList,extractPaging}from'@lovrabet/cli-framework';function a85_0x2385(){var _0x19370d=['792LMZwfl','551814piPVGz','90zqvosi','11793852hPbqTm','806968yRynRl','1500020hvzsUN','24374qIUgeQ','294100aCQfXs','2282cslVml'];a85_0x2385=function(){return _0x19370d;};return a85_0x2385();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2adac3,_0x3eca05){const _0x2193a2=a86_0x525d,_0x529dc2=_0x2adac3();while(!![]){try{const _0x432183=parseInt(_0x2193a2(0x117))/0x1+parseInt(_0x2193a2(0x119))/0x2*(-parseInt(_0x2193a2(0x11f))/0x3)+parseInt(_0x2193a2(0x120))/0x4+-parseInt(_0x2193a2(0x11e))/0x5*(parseInt(_0x2193a2(0x125))/0x6)+-parseInt(_0x2193a2(0x124))/0x7+parseInt(_0x2193a2(0x12a))/0x8*(-parseInt(_0x2193a2(0x12e))/0x9)+parseInt(_0x2193a2(0x127))/0xa;if(_0x432183===_0x3eca05)break;else _0x529dc2['push'](_0x529dc2['shift']());}catch(_0x1a5ba5){_0x529dc2['push'](_0x529dc2['shift']());}}}(a86_0x3b6c,0x84c1c));function a86_0x525d(_0x44f28b,_0x33d0c0){_0x44f28b=_0x44f28b-0x114;const _0x3b6cbe=a86_0x3b6c();let _0x525d78=_0x3b6cbe[_0x44f28b];return _0x525d78;}import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x46a338,_0x144d76,_0x29f09e){const _0x5657fe=a86_0x525d,_0x2f71e3=buildConfirmationContext(_0x46a338,_0x144d76,_0x29f09e),_0x106fa7=[_0x5657fe(0x12b)+_0x2f71e3[_0x5657fe(0x115)]];return _0x2f71e3[_0x5657fe(0x122)]&&_0x106fa7[_0x5657fe(0x118)](_0x5657fe(0x116)+_0x2f71e3[_0x5657fe(0x122)]),_0x2f71e3['affectedRecords']&&_0x106fa7['push']('\x20\x20\x20Affected:\x20'+_0x2f71e3[_0x5657fe(0x11a)]),_0x106fa7[_0x5657fe(0x118)](_0x5657fe(0x126)),_0x106fa7;}function a86_0x3b6c(){const _0x251548=['\x20\x20\x20Continue?\x20[y/N]\x20','6314820nCngRa','id=','code','1784OyIxLA','⚠\x20\x20High-risk\x20operation:\x20','params','code=','19170CBEJTM','command','commandLabel','\x20\x20\x20','831276ODEEMM','push','2fgMxQo','affectedRecords','length','entries','join','615245HNidAJ','50763wRtCbW','2523024kTlgvx','name','description','name=','6543474VkXCEd','6CJGupp'];a86_0x3b6c=function(){return _0x251548;};return a86_0x3b6c();}export function reconstructCommandArgv(_0x2b98c4,_0x15e711){const _0x3c0a80=a86_0x525d,_0x43561f=[CLI_BIN_NAME,_0x2b98c4['service'],_0x2b98c4[_0x3c0a80(0x114)]];for(const [_0x42f19e,_0x4a1fd6]of Object[_0x3c0a80(0x11c)](_0x15e711)){if(_0x4a1fd6===!![])_0x43561f['push']('--'+_0x42f19e);else _0x4a1fd6!==![]&&_0x4a1fd6!==undefined&&_0x4a1fd6!==''&&_0x43561f[_0x3c0a80(0x118)]('--'+_0x42f19e+'\x20'+JSON['stringify'](_0x4a1fd6));}return _0x43561f['push']('--yes'),_0x43561f[_0x3c0a80(0x11d)]('\x20');}function buildConfirmationContext(_0x13ce7c,_0x595b1b,_0x1132ee){const _0x3a52b8=a86_0x525d,_0x35cf79=extractAffectedRecords(_0x1132ee);return{'commandLabel':_0x595b1b,'description':_0x13ce7c[_0x3a52b8(0x122)],'affectedRecords':_0x35cf79};}function extractAffectedRecords(_0x314fef){const _0x257768=a86_0x525d,_0x2be70d=[];if(_0x314fef[_0x257768(0x129)])_0x2be70d['push'](_0x257768(0x12d)+_0x314fef[_0x257768(0x129)]);if(_0x314fef['id'])_0x2be70d[_0x257768(0x118)](_0x257768(0x128)+_0x314fef['id']);if(_0x314fef[_0x257768(0x121)])_0x2be70d['push'](_0x257768(0x123)+_0x314fef[_0x257768(0x121)]);if(_0x314fef[_0x257768(0x12c)])_0x2be70d['push']('params='+_0x314fef[_0x257768(0x12c)]);return _0x2be70d[_0x257768(0x11b)]>0x0?_0x2be70d[_0x257768(0x11d)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a87_0x52a5(_0x30f511,_0x519e86){_0x30f511=_0x30f511-0x1ec;const _0x15f43e=a87_0x15f4();let _0x52a509=_0x15f43e[_0x30f511];return _0x52a509;}(function(_0x35098b,_0x3ac192){const _0x5916f3=a87_0x52a5,_0x5b87bb=_0x35098b();while(!![]){try{const _0x2600e0=parseInt(_0x5916f3(0x1ed))/0x1*(-parseInt(_0x5916f3(0x1f0))/0x2)+-parseInt(_0x5916f3(0x1f4))/0x3+-parseInt(_0x5916f3(0x1f8))/0x4*(-parseInt(_0x5916f3(0x1f6))/0x5)+parseInt(_0x5916f3(0x1f9))/0x6*(parseInt(_0x5916f3(0x1f7))/0x7)+-parseInt(_0x5916f3(0x1fb))/0x8+parseInt(_0x5916f3(0x1fa))/0x9+parseInt(_0x5916f3(0x1f2))/0xa*(parseInt(_0x5916f3(0x1ef))/0xb);if(_0x2600e0===_0x3ac192)break;else _0x5b87bb['push'](_0x5b87bb['shift']());}catch(_0x1fea4e){_0x5b87bb['push'](_0x5b87bb['shift']());}}}(a87_0x15f4,0xdd51a));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x25af51){const _0x5926ea=a87_0x52a5;if(_0x25af51 instanceof LovrabetError)return CliErrors[_0x5926ea(0x1ec)](userFacingLovrabetMessage(_0x25af51));return _0x25af51;}function a87_0x15f4(){const _0x839b0f=['4367mgtueY','209890dhixhC','stringify','41780rsGjdp','message','3494193MTzACu','string','15layQbE','458332NAZUgt','1406552abNutQ','24POlAWL','5898132Blfcqe','1562352hiZRdP','validation','13gAESsO','description'];a87_0x15f4=function(){return _0x839b0f;};return a87_0x15f4();}function userFacingLovrabetMessage(_0x20014c){const _0x4a2671=a87_0x52a5,_0x535856=_0x20014c[_0x4a2671(0x1ee)];if(_0x535856!==undefined&&_0x535856!==null){if(typeof _0x535856===_0x4a2671(0x1f5)&&_0x535856['trim']())return _0x535856['trim']();try{return JSON[_0x4a2671(0x1f1)](_0x535856);}catch{}}return _0x20014c[_0x4a2671(0x1f3)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a88_0x2865a2=a88_0x5921;(function(_0x12fb7b,_0x512217){const _0x2f0fb0=a88_0x5921,_0x48a677=_0x12fb7b();while(!![]){try{const _0x529344=-parseInt(_0x2f0fb0(0xc4))/0x1+parseInt(_0x2f0fb0(0x87))/0x2*(-parseInt(_0x2f0fb0(0x89))/0x3)+parseInt(_0x2f0fb0(0xa2))/0x4*(parseInt(_0x2f0fb0(0x9d))/0x5)+-parseInt(_0x2f0fb0(0xaf))/0x6+-parseInt(_0x2f0fb0(0x97))/0x7+parseInt(_0x2f0fb0(0x88))/0x8+-parseInt(_0x2f0fb0(0xc1))/0x9*(-parseInt(_0x2f0fb0(0xc0))/0xa);if(_0x529344===_0x512217)break;else _0x48a677['push'](_0x48a677['shift']());}catch(_0x179a3c){_0x48a677['push'](_0x48a677['shift']());}}}(a88_0x2c41,0x2d552));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';function a88_0x5921(_0x3fc31f,_0x56c11d){_0x3fc31f=_0x3fc31f-0x82;const _0x2c418f=a88_0x2c41();let _0x5921f2=_0x2c418f[_0x3fc31f];return _0x5921f2;}import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';function a88_0x2c41(){const _0x1e06ab=['update','local-alias','.appcode\x20to\x20','pretty','items','name','accessKey','1945454sKsIOi','production','trim','service','High-risk\x20operation\x20`','app','5bvwLhv','object','apiDomain','env','mergedCli','751616LCqQnR','validation','\x20or\x20pass\x20','ACCESS_KEY','riskLevel','appCodeSource','filter','Unknown\x20app:\x20','has','catch','requiresAuth','map','verbose','1931190SpDITG','\x20\x20To\x20proceed:\x20','currentApp','newConfigFileName','../core/api-client.js','../commands/app/remote-source.js','includes','resolve','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','_notice','appCode','appcode\x20\x22','ClientAk','execute','string','Set\x20accessKey\x20in\x20','150EISbYo','293463wbemxE','authRequired','Run\x20`','7927teguLp','appcode','rawFlags','defaultVerbose','format','APPCODE','cancelled','24252rGzrZv','2483224VJHbZN','48tvdBNX','pageSize','doctor','defaultPageSize','command','../core/sdk-client.js','requiresAppCode'];a88_0x2c41=function(){return _0x1e06ab;};return a88_0x2c41();}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(_0x433770){const _0x10f7b3=a88_0x5921;return void _0x433770,AUTH_MODE[_0x10f7b3(0xbc)];}export function createPipelineEnv(_0xdad50a,_0x5b3663){const _0x37ceb8=a88_0x5921,_0x4e7621=typeof _0x5b3663[_0x37ceb8(0x9c)]===_0x37ceb8(0xbe)&&_0x5b3663[_0x37ceb8(0x9c)]['trim']();return{'rawFlags':_0x5b3663,'appCode':_0xdad50a[_0x37ceb8(0xba)]||productEnv(_0x37ceb8(0x85))||(_0x4e7621?undefined:readAppCodeFromConfig()),'appCodeSource':_0xdad50a[_0x37ceb8(0xa7)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x5b3663),'defaultFormat':_0xdad50a[_0x37ceb8(0x84)],'defaultPageSize':_0xdad50a[_0x37ceb8(0x8a)],'defaultVerbose':_0xdad50a[_0x37ceb8(0xae)],'riskLevel':_0xdad50a[_0x37ceb8(0xa6)],'accessKey':_0xdad50a[_0x37ceb8(0x96)],'env':_0xdad50a[_0x37ceb8(0xa0)],'mergedCli':{'defaultApp':_0xdad50a['defaultApp'],'currentApp':_0xdad50a[_0x37ceb8(0xb1)],'appCode':_0xdad50a[_0x37ceb8(0xba)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a88_0x2865a2(0xa8)](_0x2eb9f8=>PIPELINE_FLAG_NAMES[a88_0x2865a2(0xaa)](_0x2eb9f8[a88_0x2865a2(0x95)]))[a88_0x2865a2(0xad)](({name:_0x443c12,type:_0xed44c3,description:_0x32ea49})=>({'name':_0x443c12,'type':_0xed44c3,'description':_0x32ea49})),'formatOutput':formatOutput,'getCommandLabel'(_0x2bd8ae){const _0xb77cc0=a88_0x2865a2;return CLI_BIN_NAME+'\x20'+_0x2bd8ae[_0xb77cc0(0x9a)]+'\x20'+_0x2bd8ae[_0xb77cc0(0x8d)];},'riskPolicy':{'onViolation'(_0x4fc0f8){console['error'](_0x4fc0f8);},'createError'(_0x476cd4){const _0x1c0706=a88_0x2865a2;return CliErrors[_0x1c0706(0x86)](_0x476cd4);}},async 'prepare'(_0x3f0d5f,_0x1cc66e){const _0x24b156=a88_0x2865a2,_0x58c47d=resolveAuthMode(_0x1cc66e);if(_0x3f0d5f[_0x24b156(0xac)]!==![]){if(!_0x1cc66e[_0x24b156(0x96)])throw CliErrors[_0x24b156(0xc2)](_0x24b156(0xbf)+PRODUCT_CONFIG[_0x24b156(0xb2)]+_0x24b156(0xa4)+productEnvName(_0x24b156(0xa5))+'.');const {setActiveAK:_0x115347}=await import(_0x24b156(0xb3));_0x115347(_0x1cc66e[_0x24b156(0x96)]);}let _0x14fde6='';if(_0x3f0d5f['requiresAppCode']!==![]){_0x14fde6=_0x1cc66e[_0x24b156(0xba)]??'',_0x14fde6=await resolveExplicitAppName(_0x3f0d5f,_0x1cc66e,_0x14fde6);if(!_0x14fde6){await assertSelectedAppNameIsRuntimeAccessible(_0x3f0d5f,_0x1cc66e);throw CliErrors['configMissing'](_0x24b156(0xb8)+PRODUCT_CONFIG[_0x24b156(0xb2)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x3f0d5f,_0x1cc66e,_0x14fde6);}if(_0x14fde6){const {initSdkClient:_0x3afadf}=await import(_0x24b156(0x8e));_0x3afadf({'appCode':_0x14fde6,'env':_0x1cc66e[_0x24b156(0xa0)]??'production','accessKey':_0x1cc66e[_0x24b156(0x96)],'authMode':_0x58c47d});}return{'defaults':{'booleans':{'verbose':_0x1cc66e[_0x24b156(0x83)]},'numbers':{'pagesize':_0x1cc66e[_0x24b156(0x8c)]}},'extras':{'appCode':_0x14fde6,'cookie':'','apiDomain':_0x1cc66e[_0x24b156(0x9f)],'apiDir':'','accessKey':_0x1cc66e[_0x24b156(0x96)],'envName':_0x1cc66e['env'],'mergedCli':_0x1cc66e[_0x24b156(0xa1)]}};},async 'confirmHighRisk'({def:_0x11afe1,env:_0x3ad868,flags:_0x4ceee0,commandLabel:_0x2175cc}){const _0x1bea87=a88_0x2865a2;if(_0x3ad868['isNonInteractive']){const _0x457635=reconstructCommandArgv(_0x11afe1,_0x4ceee0);throw CliErrors['validation'](_0x1bea87(0x9b)+_0x2175cc+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x1bea87(0xb0)+_0x457635));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x11afe1,_0x2175cc,_0x4ceee0),'createCancelledError':_0x51502b=>CliErrors[_0x1bea87(0x86)](_0x51502b)});},'mapDryRunError'(_0x18d286){return mapUserFacingExecuteError(_0x18d286);},'mapExecuteError'(_0x4f2200){return mapUserFacingExecuteError(_0x4f2200);},async 'finalize'(){const _0x52016e=a88_0x2865a2,{clearActiveAK:_0x5d5b8a}=await import(_0x52016e(0xb3));_0x5d5b8a();}};async function resolveExplicitAppName(_0x42716d,_0x1c8e7d,_0x2efef2){const _0x201bf0=a88_0x2865a2;if(_0x42716d[_0x201bf0(0x8f)]===![])return _0x2efef2;const _0x107ab7=typeof _0x1c8e7d[_0x201bf0(0x82)][_0x201bf0(0x9c)]==='string'?_0x1c8e7d['rawFlags']['app'][_0x201bf0(0x99)]():'';if(!_0x107ab7)return _0x2efef2;const _0x3c609f=typeof _0x1c8e7d['rawFlags'][_0x201bf0(0xc5)]===_0x201bf0(0xbe)&&_0x1c8e7d[_0x201bf0(0x82)][_0x201bf0(0xc5)][_0x201bf0(0x99)]()||productEnv('APPCODE');if(_0x3c609f||_0x1c8e7d[_0x201bf0(0xa7)]===_0x201bf0(0x91))return _0x2efef2;const {getRemoteAppList:_0x11d79d}=await import('../commands/app/remote-source.js'),_0x304f65=await _0x11d79d({'env':_0x1c8e7d[_0x201bf0(0xa0)]??_0x201bf0(0x98),'accessKey':_0x1c8e7d[_0x201bf0(0x96)]}),_0x4b1dde=findAppByName(_0x304f65[_0x201bf0(0x94)],_0x107ab7);if(_0x4b1dde&&!isRuntimeAccessibleApp(_0x4b1dde))throw runtimeInaccessibleAppError(_0x4b1dde,'\x22'+_0x107ab7+'\x22');const _0x1ad2cb=_0x4b1dde?.[_0x201bf0(0xba)]?.[_0x201bf0(0x99)]();if(_0x1ad2cb)return _0x1ad2cb;throw CliErrors[_0x201bf0(0xa3)](_0x201bf0(0xa9)+_0x107ab7,_0x201bf0(0xc3)+CLI_BIN_NAME+_0x201bf0(0xb7)+_0x107ab7+_0x201bf0(0x92)+PRODUCT_CONFIG[_0x201bf0(0xb2)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x80dd84,_0x3a1d1c){const _0x2e77df=a88_0x2865a2;if(_0x80dd84[_0x2e77df(0x8f)]===![]||!_0x3a1d1c['accessKey'])return;const _0x3c62b6=(typeof _0x3a1d1c[_0x2e77df(0x82)][_0x2e77df(0x9c)]==='string'&&_0x3a1d1c[_0x2e77df(0x82)][_0x2e77df(0x9c)]['trim']()?_0x3a1d1c['rawFlags']['app']:_0x3a1d1c[_0x2e77df(0xa1)]?.[_0x2e77df(0xb1)]??_0x3a1d1c[_0x2e77df(0xa1)]?.['defaultApp'])?.['trim']();if(!_0x3c62b6)return;const {getRemoteAppList:_0x16dbb5}=await import(_0x2e77df(0xb4)),_0x30933b=await _0x16dbb5({'env':_0x3a1d1c[_0x2e77df(0xa0)]??_0x2e77df(0x98),'accessKey':_0x3a1d1c[_0x2e77df(0x96)]}),_0x697d51=findAppByName(_0x30933b[_0x2e77df(0x94)],_0x3c62b6);if(_0x697d51&&!isRuntimeAccessibleApp(_0x697d51))throw runtimeInaccessibleAppError(_0x697d51,'\x22'+_0x3c62b6+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x71de0b,_0x173e33,_0x254f8b){const _0xe94f51=a88_0x2865a2;if(_0x71de0b[_0xe94f51(0x8f)]===![]||!_0x173e33[_0xe94f51(0x96)])return;const {getRemoteAppList:_0xac09b7}=await import(_0xe94f51(0xb4)),_0x1575a2=await _0xac09b7({'env':_0x173e33[_0xe94f51(0xa0)]??_0xe94f51(0x98),'accessKey':_0x173e33['accessKey']}),_0x4aa1b3=findAppByCode(_0x1575a2[_0xe94f51(0x94)],_0x254f8b);if(_0x4aa1b3&&!isRuntimeAccessibleApp(_0x4aa1b3))throw runtimeInaccessibleAppError(_0x4aa1b3,_0xe94f51(0xbb)+_0x254f8b+'\x22');}export async function runCommand(_0x388827,_0x2f6cdc){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x388827)?withUpdateNotice(_0x388827):_0x388827,_0x2f6cdc,runnerAdapter);}function shouldAttachUpdateNotice(_0x3fa7cc){const _0x3249b1=a88_0x2865a2;return![_0x3249b1(0x90),'schema',_0x3249b1(0x8b)][_0x3249b1(0xb5)](_0x3fa7cc['service']);}function withUpdateNotice(_0x3aae9d){return{..._0x3aae9d,async 'execute'(_0x541ac3){const _0x52fab0=a88_0x5921,_0x54e6b2=shouldResolveUpdateNotice(_0x541ac3)?resolveLatestUpdateNotice()[_0x52fab0(0xab)](()=>null):Promise[_0x52fab0(0xb6)](null),_0x462ef5=await _0x3aae9d[_0x52fab0(0xbd)](_0x541ac3);return attachUpdateNotice(_0x462ef5,await _0x54e6b2);}};}function shouldResolveUpdateNotice(_0x41f77d){const _0x55e9d6=a88_0x2865a2;return _0x41f77d[_0x55e9d6(0x84)]===_0x55e9d6(0x93)&&!_0x41f77d['nonInteractive'];}function attachUpdateNotice(_0x3c9f05,_0x5012c1){const _0x40820e=a88_0x2865a2;if(!_0x5012c1||!_0x3c9f05||typeof _0x3c9f05!==_0x40820e(0x9e))return _0x3c9f05;const _0x15f8bd=_0x3c9f05,_0x68540c=typeof _0x15f8bd[_0x40820e(0xb9)]===_0x40820e(0x9e)&&_0x15f8bd[_0x40820e(0xb9)]!==null?_0x15f8bd['_notice']:{};return{..._0x15f8bd,'_notice':{..._0x68540c,'update':_0x5012c1}};}
|
|
1
|
+
const a88_0x32fb34=a88_0x5bed;(function(_0x1bbcb5,_0x279e45){const _0x467ada=a88_0x5bed,_0x3bcd09=_0x1bbcb5();while(!![]){try{const _0x3f88b2=parseInt(_0x467ada(0x1c8))/0x1+parseInt(_0x467ada(0x1dd))/0x2*(-parseInt(_0x467ada(0x1de))/0x3)+-parseInt(_0x467ada(0x1be))/0x4*(-parseInt(_0x467ada(0x1e3))/0x5)+-parseInt(_0x467ada(0x1ba))/0x6*(parseInt(_0x467ada(0x1d6))/0x7)+-parseInt(_0x467ada(0x1af))/0x8+parseInt(_0x467ada(0x1c3))/0x9*(parseInt(_0x467ada(0x1bc))/0xa)+-parseInt(_0x467ada(0x1ae))/0xb*(parseInt(_0x467ada(0x1d5))/0xc);if(_0x3f88b2===_0x279e45)break;else _0x3bcd09['push'](_0x3bcd09['shift']());}catch(_0x30f2ed){_0x3bcd09['push'](_0x3bcd09['shift']());}}}(a88_0x2151,0xbd1be));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(_0x1adc86){const _0x252d3c=a88_0x5bed;return void _0x1adc86,AUTH_MODE[_0x252d3c(0x1c1)];}export function createPipelineEnv(_0x11f6f1,_0x97baff){const _0x36660e=a88_0x5bed,_0xa86ac=typeof _0x97baff[_0x36660e(0x1ab)]===_0x36660e(0x1a9)&&_0x97baff[_0x36660e(0x1ab)][_0x36660e(0x1da)]();return{'rawFlags':_0x97baff,'appCode':_0x11f6f1[_0x36660e(0x1b1)]||productEnv(_0x36660e(0x1d7))||(_0xa86ac?undefined:readAppCodeFromConfig()),'appCodeSource':_0x11f6f1['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x97baff),'defaultFormat':_0x11f6f1[_0x36660e(0x1cd)],'defaultPageSize':_0x11f6f1['pageSize'],'defaultVerbose':_0x11f6f1['verbose'],'riskLevel':_0x11f6f1['riskLevel'],'accessKey':_0x11f6f1[_0x36660e(0x1cf)],'env':_0x11f6f1[_0x36660e(0x1d3)],'mergedCli':{'defaultApp':_0x11f6f1['defaultApp'],'currentApp':_0x11f6f1[_0x36660e(0x1b2)],'appCode':_0x11f6f1[_0x36660e(0x1b1)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x7faef=>PIPELINE_FLAG_NAMES[a88_0x32fb34(0x1ac)](_0x7faef['name']))[a88_0x32fb34(0x1d2)](({name:_0x35a23e,type:_0x2ad089,description:_0x26038d})=>({'name':_0x35a23e,'type':_0x2ad089,'description':_0x26038d})),'formatOutput':formatOutput,'getCommandLabel'(_0x119689){const _0x556f7d=a88_0x32fb34;return CLI_BIN_NAME+'\x20'+_0x119689[_0x556f7d(0x1e4)]+'\x20'+_0x119689[_0x556f7d(0x1e2)];},'riskPolicy':{'onViolation'(_0x37dcde){console['error'](_0x37dcde);},'createError'(_0x4d592d){const _0x19155a=a88_0x32fb34;return CliErrors[_0x19155a(0x1b3)](_0x4d592d);}},async 'prepare'(_0x4f3930,_0x535319){const _0x1a6695=a88_0x32fb34,_0x32190c=resolveAuthMode(_0x535319);if(_0x4f3930[_0x1a6695(0x1db)]!==![]){if(!_0x535319[_0x1a6695(0x1cf)])throw CliErrors[_0x1a6695(0x1ca)](_0x1a6695(0x1d8)+PRODUCT_CONFIG[_0x1a6695(0x1ce)]+_0x1a6695(0x1c0)+productEnvName(_0x1a6695(0x1b4))+'.');const {setActiveAK:_0x2a231c}=await import(_0x1a6695(0x1cb));_0x2a231c(_0x535319['accessKey']);}let _0x315784='';if(_0x4f3930[_0x1a6695(0x1aa)]!==![]){_0x315784=_0x535319[_0x1a6695(0x1b1)]??'',_0x315784=await resolveExplicitAppName(_0x4f3930,_0x535319,_0x315784);if(!_0x315784){await assertSelectedAppNameIsRuntimeAccessible(_0x4f3930,_0x535319);throw CliErrors[_0x1a6695(0x1bf)]('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x4f3930,_0x535319,_0x315784);}if(_0x315784){const {initSdkClient:_0x2e3f0b}=await import(_0x1a6695(0x1b0));_0x2e3f0b({'appCode':_0x315784,'env':_0x535319[_0x1a6695(0x1d3)]??_0x1a6695(0x1cc),'accessKey':_0x535319[_0x1a6695(0x1cf)],'authMode':_0x32190c});}return{'defaults':{'booleans':{'verbose':_0x535319[_0x1a6695(0x1a8)]},'numbers':{'pagesize':_0x535319[_0x1a6695(0x1b7)]}},'extras':{'appCode':_0x315784,'cookie':'','apiDomain':_0x535319[_0x1a6695(0x1b8)],'apiDir':'','accessKey':_0x535319[_0x1a6695(0x1cf)],'envName':_0x535319[_0x1a6695(0x1d3)],'mergedCli':_0x535319[_0x1a6695(0x1e6)]}};},async 'confirmHighRisk'({def:_0x270c04,env:_0x26be59,flags:_0x497021,commandLabel:_0x5d4d99}){const _0x2f53ed=a88_0x32fb34;if(_0x26be59[_0x2f53ed(0x1a6)]){const _0x3502e3=reconstructCommandArgv(_0x270c04,_0x497021);throw CliErrors[_0x2f53ed(0x1c5)](_0x2f53ed(0x1ad)+_0x5d4d99+_0x2f53ed(0x1c9)+(_0x2f53ed(0x1e0)+_0x3502e3));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x270c04,_0x5d4d99,_0x497021),'createCancelledError':_0x127585=>CliErrors['cancelled'](_0x127585)});},'mapDryRunError'(_0x54321b){return mapUserFacingExecuteError(_0x54321b);},'mapExecuteError'(_0x5a0a22){return mapUserFacingExecuteError(_0x5a0a22);},async 'finalize'(){const {clearActiveAK:_0x21b635}=await import('../core/api-client.js');_0x21b635();}};async function resolveExplicitAppName(_0x4643da,_0x8df302,_0x221cbf){const _0x19a6e0=a88_0x32fb34;if(_0x4643da['requiresAppCode']===![])return _0x221cbf;const _0x3c38d8=typeof _0x8df302[_0x19a6e0(0x1b6)][_0x19a6e0(0x1ab)]===_0x19a6e0(0x1a9)?_0x8df302[_0x19a6e0(0x1b6)][_0x19a6e0(0x1ab)][_0x19a6e0(0x1da)]():'';if(!_0x3c38d8)return _0x221cbf;const _0x18cc6c=typeof _0x8df302[_0x19a6e0(0x1b6)][_0x19a6e0(0x1d4)]===_0x19a6e0(0x1a9)&&_0x8df302[_0x19a6e0(0x1b6)]['appcode'][_0x19a6e0(0x1da)]()||productEnv('APPCODE');if(_0x18cc6c||_0x8df302['appCodeSource']===_0x19a6e0(0x1d9))return _0x221cbf;const {getRemoteAppList:_0x1a4c6c}=await import(_0x19a6e0(0x1b9)),_0x631dc2=await _0x1a4c6c({'env':_0x8df302[_0x19a6e0(0x1d3)]??_0x19a6e0(0x1cc),'accessKey':_0x8df302[_0x19a6e0(0x1cf)]}),_0x59e48b=findAppByName(_0x631dc2[_0x19a6e0(0x1e1)],_0x3c38d8);if(_0x59e48b&&!isRuntimeAccessibleApp(_0x59e48b))throw runtimeInaccessibleAppError(_0x59e48b,'\x22'+_0x3c38d8+'\x22');const _0x5940ed=_0x59e48b?.[_0x19a6e0(0x1b1)]?.['trim']();if(_0x5940ed)return _0x5940ed;throw CliErrors[_0x19a6e0(0x1c5)](_0x19a6e0(0x1e5)+_0x3c38d8,_0x19a6e0(0x1c6)+CLI_BIN_NAME+_0x19a6e0(0x1bb)+_0x3c38d8+_0x19a6e0(0x1c4)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x4bcf93,_0x49bb92){const _0xc2f3c4=a88_0x32fb34;if(_0x4bcf93['requiresAppCode']===![]||!_0x49bb92[_0xc2f3c4(0x1cf)])return;const _0x2f686f=(typeof _0x49bb92['rawFlags']['app']==='string'&&_0x49bb92['rawFlags'][_0xc2f3c4(0x1ab)][_0xc2f3c4(0x1da)]()?_0x49bb92[_0xc2f3c4(0x1b6)][_0xc2f3c4(0x1ab)]:_0x49bb92['mergedCli']?.[_0xc2f3c4(0x1b2)]??_0x49bb92[_0xc2f3c4(0x1e6)]?.['defaultApp'])?.['trim']();if(!_0x2f686f)return;const {getRemoteAppList:_0x3b0978}=await import(_0xc2f3c4(0x1b9)),_0x1de4ee=await _0x3b0978({'env':_0x49bb92[_0xc2f3c4(0x1d3)]??_0xc2f3c4(0x1cc),'accessKey':_0x49bb92[_0xc2f3c4(0x1cf)]}),_0x8b7241=findAppByName(_0x1de4ee[_0xc2f3c4(0x1e1)],_0x2f686f);if(_0x8b7241&&!isRuntimeAccessibleApp(_0x8b7241))throw runtimeInaccessibleAppError(_0x8b7241,'\x22'+_0x2f686f+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x1eeab4,_0x26b90f,_0x560be0){const _0x24f515=a88_0x32fb34;if(_0x1eeab4[_0x24f515(0x1aa)]===![]||!_0x26b90f['accessKey'])return;const {getRemoteAppList:_0x65febf}=await import('../commands/app/remote-source.js'),_0x124705=await _0x65febf({'env':_0x26b90f[_0x24f515(0x1d3)]??'production','accessKey':_0x26b90f[_0x24f515(0x1cf)]}),_0x511ac2=findAppByCode(_0x124705['items'],_0x560be0);if(_0x511ac2&&!isRuntimeAccessibleApp(_0x511ac2))throw runtimeInaccessibleAppError(_0x511ac2,'appcode\x20\x22'+_0x560be0+'\x22');}export async function runCommand(_0x1d8411,_0x298cd3){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x1d8411)?withUpdateNotice(_0x1d8411):_0x1d8411,_0x298cd3,runnerAdapter);}function a88_0x2151(){const _0x5794c3=['string','requiresAppCode','app','has','High-risk\x20operation\x20`','2882LOMSfJ','1299608zzdKsI','../core/sdk-client.js','appCode','currentApp','cancelled','ACCESS_KEY','nonInteractive','rawFlags','defaultPageSize','apiDomain','../commands/app/remote-source.js','6LnQNuP','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','1860MHMLna','resolve','12524gLMhnP','configMissing','\x20or\x20pass\x20','ClientAk','execute','63837cdqBkX','.appcode\x20to\x20','validation','Run\x20`','pretty','1186560qSWmAR','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','authRequired','../core/api-client.js','production','format','newConfigFileName','accessKey','schema','update','map','env','appcode','46524BUDHBW','1965719HYvWxw','APPCODE','Set\x20accessKey\x20in\x20','local-alias','trim','requiresAuth','object','2oAbdwP','1709013Kaxpax','_notice','\x20\x20To\x20proceed:\x20','items','command','475NnYuDb','service','Unknown\x20app:\x20','mergedCli','isNonInteractive','includes','defaultVerbose'];a88_0x2151=function(){return _0x5794c3;};return a88_0x2151();}function a88_0x5bed(_0x342b77,_0x264d27){_0x342b77=_0x342b77-0x1a6;const _0x215151=a88_0x2151();let _0x5bed04=_0x215151[_0x342b77];return _0x5bed04;}function shouldAttachUpdateNotice(_0x195ca4){const _0x3f0be5=a88_0x32fb34;return![_0x3f0be5(0x1d1),_0x3f0be5(0x1d0),'doctor'][_0x3f0be5(0x1a7)](_0x195ca4[_0x3f0be5(0x1e4)]);}function withUpdateNotice(_0x465a6f){return{..._0x465a6f,async 'execute'(_0x20cdc9){const _0x562b30=a88_0x5bed,_0x106656=shouldResolveUpdateNotice(_0x20cdc9)?resolveLatestUpdateNotice()['catch'](()=>null):Promise[_0x562b30(0x1bd)](null),_0x5492b9=await _0x465a6f[_0x562b30(0x1c2)](_0x20cdc9);return attachUpdateNotice(_0x5492b9,await _0x106656);}};}function shouldResolveUpdateNotice(_0x5e7f3c){const _0x221935=a88_0x32fb34;return _0x5e7f3c[_0x221935(0x1cd)]===_0x221935(0x1c7)&&!_0x5e7f3c[_0x221935(0x1b5)];}function attachUpdateNotice(_0x16eae9,_0x4ff3b4){const _0x396697=a88_0x32fb34;if(!_0x4ff3b4||!_0x16eae9||typeof _0x16eae9!=='object')return _0x16eae9;const _0x4df038=_0x16eae9,_0x334608=typeof _0x4df038[_0x396697(0x1df)]===_0x396697(0x1dc)&&_0x4df038[_0x396697(0x1df)]!==null?_0x4df038['_notice']:{};return{..._0x4df038,'_notice':{..._0x334608,'update':_0x4ff3b4}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x505744,_0x5a9e3d){const _0x2d252b=a89_0xb34e,_0x398eaf=_0x505744();while(!![]){try{const _0x3a3ac4=-parseInt(_0x2d252b(0x8c))/0x1*(-parseInt(_0x2d252b(0x83))/0x2)+-parseInt(_0x2d252b(0x7f))/0x3*(-parseInt(_0x2d252b(0x7d))/0x4)+-parseInt(_0x2d252b(0x89))/0x5+-parseInt(_0x2d252b(0x88))/0x6+parseInt(_0x2d252b(0x84))/0x7*(parseInt(_0x2d252b(0x7a))/0x8)+-parseInt(_0x2d252b(0x80))/0x9+parseInt(_0x2d252b(0x82))/0xa*(parseInt(_0x2d252b(0x87))/0xb);if(_0x3a3ac4===_0x5a9e3d)break;else _0x398eaf['push'](_0x398eaf['shift']());}catch(_0x23e1b9){_0x398eaf['push'](_0x398eaf['shift']());}}}(a89_0x1e52,0x6c113));import{buildSchemaPayload as a89_0x5e9844}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_0xb34e(_0x3f78da,_0x1ea88f){_0x3f78da=_0x3f78da-0x79;const _0x1e526d=a89_0x1e52();let _0xb34ecd=_0x1e526d[_0x3f78da];return _0xb34ecd;}export async function buildSchemaPayload(){const _0x35bc5f=a89_0xb34e,{serviceRegistry:_0xbb619c,findDefinition:_0x54ff86}=await import(_0x35bc5f(0x85)),_0x2c9ecd=new Set(_0xbb619c[_0x35bc5f(0x7c)](_0x99b924=>_0x99b924['service'])),_0x1a8fe1=listDynamicServiceEntries()[_0x35bc5f(0x86)](_0x232ee3=>!_0x2c9ecd['has'](_0x232ee3[_0x35bc5f(0x8a)])),_0x12ff6c=a89_0x5e9844({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0xbb619c,_0x1a8fe1),'buildAllFlags':buildAllFlags,'findDefinition':(_0x570671,_0x18dc82)=>_0x54ff86(_0x570671,_0x18dc82)??findDynamicServiceDefinition(_0x570671,_0x18dc82)});return normalizeSchemaPayload(_0x12ff6c);}function a89_0x1e52(){const _0x288b4e=['559jaIgfu','required','208Bbfujn','none','map','563708JKPZTE','requiresAuth','18GUjJcN','1514205QWtUYi','services','90xNZWLJ','1454sBdVEj','26026WzUgga','../commands/registry.js','filter','1075272HfWZGO','4462416qNShSh','4368835zJnylS','service','commands'];a89_0x1e52=function(){return _0x288b4e;};return a89_0x1e52();}function normalizeSchemaPayload(_0x5e8814){const _0x5281e7=a89_0xb34e;return{..._0x5e8814,'schemaVersion':0x2,'services':_0x5e8814[_0x5281e7(0x81)][_0x5281e7(0x7c)](_0x55f170=>({..._0x55f170,'commands':_0x55f170[_0x5281e7(0x8b)][_0x5281e7(0x7c)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x3b9570){const _0x454158=a89_0xb34e,_0x4c2b4b=_0x3b9570;return{..._0x3b9570,'auth':_0x4c2b4b['auth']??(_0x3b9570[_0x454158(0x7e)]?_0x454158(0x79):_0x454158(0x7b))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a90_0x40f1(){const _0x4c737b=['18606AMdQYC','1325520seaUSV','length','2968jUDBBe','5931xUejEp','slice','20zfuoww','34860YJlhaB','1466008drlMaH','277054obBUds','595GwVlqY','2538019rmkTaj','findIndex','3RyiDcM','service'];a90_0x40f1=function(){return _0x4c737b;};return a90_0x40f1();}function a90_0x2d00(_0x2e157e,_0x318310){_0x2e157e=_0x2e157e-0xcc;const _0x40f170=a90_0x40f1();let _0x2d0034=_0x40f170[_0x2e157e];return _0x2d0034;}(function(_0x23675e,_0x2d1d6d){const _0x6c8ea4=a90_0x2d00,_0x3c847d=_0x23675e();while(!![]){try{const _0x51463a=parseInt(_0x6c8ea4(0xd9))/0x1+parseInt(_0x6c8ea4(0xcc))/0x2*(parseInt(_0x6c8ea4(0xd0))/0x3)+parseInt(_0x6c8ea4(0xda))/0x4+parseInt(_0x6c8ea4(0xd3))/0x5+-parseInt(_0x6c8ea4(0xd2))/0x6*(parseInt(_0x6c8ea4(0xcd))/0x7)+parseInt(_0x6c8ea4(0xd5))/0x8*(parseInt(_0x6c8ea4(0xd6))/0x9)+parseInt(_0x6c8ea4(0xd8))/0xa*(-parseInt(_0x6c8ea4(0xce))/0xb);if(_0x51463a===_0x2d1d6d)break;else _0x3c847d['push'](_0x3c847d['shift']());}catch(_0x416e6b){_0x3c847d['push'](_0x3c847d['shift']());}}}(a90_0x40f1,0x4f357));export function insertDynamicServicesAfterServiceTree(_0x5dcfd7,_0xc572e6){const _0x6a7dd9=a90_0x2d00;if(_0xc572e6[_0x6a7dd9(0xd4)]===0x0)return[..._0x5dcfd7];const _0x1a5d44=_0x5dcfd7[_0x6a7dd9(0xcf)](_0x38bb52=>_0x38bb52['service']===_0x6a7dd9(0xd1));if(_0x1a5d44<0x0)return[..._0x5dcfd7,..._0xc572e6];return[..._0x5dcfd7[_0x6a7dd9(0xd7)](0x0,_0x1a5d44+0x1),..._0xc572e6,..._0x5dcfd7[_0x6a7dd9(0xd7)](_0x1a5d44+0x1)];}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a91_0x72b0(_0x482b97,_0x4c552e){_0x482b97=_0x482b97-0x1c2;var _0x2ad2a4=a91_0x2ad2();var _0x72b0fc=_0x2ad2a4[_0x482b97];return _0x72b0fc;}(function(_0x29e0fe,_0x5ce87b){var _0x314c6a=a91_0x72b0,_0x312488=_0x29e0fe();while(!![]){try{var _0x4cffcb=parseInt(_0x314c6a(0x1cb))/0x1*(parseInt(_0x314c6a(0x1c5))/0x2)+-parseInt(_0x314c6a(0x1ca))/0x3+parseInt(_0x314c6a(0x1c7))/0x4+parseInt(_0x314c6a(0x1c9))/0x5*(-parseInt(_0x314c6a(0x1c3))/0x6)+parseInt(_0x314c6a(0x1c4))/0x7*(parseInt(_0x314c6a(0x1c8))/0x8)+parseInt(_0x314c6a(0x1c2))/0x9+-parseInt(_0x314c6a(0x1c6))/0xa;if(_0x4cffcb===_0x5ce87b)break;else _0x312488['push'](_0x312488['shift']());}catch(_0x380f71){_0x312488['push'](_0x312488['shift']());}}}(a91_0x2ad2,0xe99d6));function a91_0x2ad2(){var _0x5f5947=['35JrMMmB','550258zYLdoA','8430860JLyiLU','2588536QTcspT','1243096HtaHek','263695wEnyLC','2810277dxJUaO','3nxsNsq','8182683lzEeFG','48NDLWkx'];a91_0x2ad2=function(){return _0x5f5947;};return a91_0x2ad2();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|