@lovrabet/lovrabet-cli 2.1.9-beta.2 → 2.1.9-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +5 -0
- package/README.md +156 -0
- 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 +18 -2
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0xa76e50=a69_0x4557;(function(_0x19d159,_0x421421){const _0x437a2d=a69_0x4557,_0x3b25c1=_0x19d159();while(!![]){try{const _0x188a80=-parseInt(_0x437a2d(0x1c9))/0x1*(parseInt(_0x437a2d(0x1cc))/0x2)+-parseInt(_0x437a2d(0x1c8))/0x3+parseInt(_0x437a2d(0x1c0))/0x4*(-parseInt(_0x437a2d(0x1c1))/0x5)+parseInt(_0x437a2d(0x1c2))/0x6*(-parseInt(_0x437a2d(0x1c4))/0x7)+parseInt(_0x437a2d(0x1cd))/0x8*(-parseInt(_0x437a2d(0x1c6))/0x9)+-parseInt(_0x437a2d(0x1c3))/0xa+parseInt(_0x437a2d(0x1ca))/0xb*(parseInt(_0x437a2d(0x1c7))/0xc);if(_0x188a80===_0x421421)break;else _0x3b25c1['push'](_0x3b25c1['shift']());}catch(_0x5cd06d){_0x3b25c1['push'](_0x3b25c1['shift']());}}}(a69_0x1b6b,0x97ef4));export const OUTPUT_FORMAT_VALUES=['json',a69_0xa76e50(0x1cb),a69_0xa76e50(0x1c5)];function a69_0x4557(_0x45d986,_0x570216){_0x45d986=_0x45d986-0x1c0;const _0x1b6b13=a69_0x1b6b();let _0x4557f5=_0x1b6b13[_0x45d986];return _0x4557f5;}function a69_0x1b6b(){const _0x330b0b=['2429556xTdszU','73zgSUQp','14180001VlyMZX','pretty','29192jrtvID','168OntMUC','179992MIYGpK','40NhVhZN','120zbtDTY','2405960ldnpMF','19922hUsDgM','compress','305181ymAgNh','36jSnhRl'];a69_0x1b6b=function(){return _0x330b0b;};return a69_0x1b6b();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x49627f=a70_0x5ba6;(function(_0x44d50e,_0x47b249){const _0x596aad=a70_0x5ba6,_0x3dabcc=_0x44d50e();while(!![]){try{const _0x3a86ad=parseInt(_0x596aad(0x157))/0x1*(parseInt(_0x596aad(0x151))/0x2)+parseInt(_0x596aad(0x15d))/0x3+parseInt(_0x596aad(0x14b))/0x4*(-parseInt(_0x596aad(0x153))/0x5)+parseInt(_0x596aad(0x14e))/0x6+-parseInt(_0x596aad(0x145))/0x7+-parseInt(_0x596aad(0x14d))/0x8+parseInt(_0x596aad(0x149))/0x9;if(_0x3a86ad===_0x47b249)break;else _0x3dabcc['push'](_0x3dabcc['shift']());}catch(_0x2f310e){_0x3dabcc['push'](_0x3dabcc['shift']());}}}(a70_0x3692,0x3e9a5));export const PRODUCT_CONFIG={'cliBinName':a70_0x49627f(0x158),'cliDisplayName':a70_0x49627f(0x14f),'npmPackageName':a70_0x49627f(0x152),'skillSource':'lovrabet/lovrabet-cli','npmRegistryBaseUrl':a70_0x49627f(0x159),'envPrefix':a70_0x49627f(0x15a),'legacyEnvPrefixes':['RABETBASE'],'configFileNames':[a70_0x49627f(0x146),a70_0x49627f(0x156)],'newConfigFileName':a70_0x49627f(0x146),'homeDirName':a70_0x49627f(0x15b),'logFileName':a70_0x49627f(0x154),'invokeSource':'cli:lovrabet-runtime','userCenterDisplayName':'Lovrabet\x20User\x20Center','skipNpxSkillsEnvSuffix':a70_0x49627f(0x14a),'domains':{'production':{'user':a70_0x49627f(0x15c),'api':'https://api.lovrabet.com','runtime':a70_0x49627f(0x148),'skillhub':'https://skills.lovrabet.com'},'nonProduction':{'user':a70_0x49627f(0x144),'api':'https://daily-api.lovrabet.com','runtime':a70_0x49627f(0x147),'skillhub':a70_0x49627f(0x143)}},'accessKeyCreatePath':a70_0x49627f(0x14c)};export function productEnvName(_0x4b1b24){const _0x47ec58=a70_0x49627f;return PRODUCT_CONFIG[_0x47ec58(0x150)]+'_'+_0x4b1b24;}export function productEnvNames(_0x47f62c){const _0x137a30=a70_0x49627f;return[productEnvName(_0x47f62c),...PRODUCT_CONFIG[_0x137a30(0x155)]['map'](_0x47a034=>_0x47a034+'_'+_0x47f62c)];}function a70_0x3692(){const _0x13167a=['https://daily-runtime.lovrabet.com','https://runtime.lovrabet.com','6377832evJnAd','SKIP_NPX_SKILLS','8oJBENX','/user/ak','3231576QLeDQR','357912CBwHnp','Lovrabet\x20Runtime\x20CLI','envPrefix','2kKunJl','@lovrabet/lovrabet-cli','877265xtzMxN','.lovrabet-runtime.log','legacyEnvPrefixes','.lovrabetrc','5485yNTnDm','lovrabet','https://registry.npmjs.org','LOVRABET','.lovrabet','https://user.lovrabet.com','1500837thlvqX','https://skills-daily.lovrabet.com','https://user-daily.lovrabet.com','1839530emjdnt','.lovrabet.json'];a70_0x3692=function(){return _0x13167a;};return a70_0x3692();}function a70_0x5ba6(_0x50c072,_0x253d9c){_0x50c072=_0x50c072-0x143;const _0x36922e=a70_0x3692();let _0x5ba68e=_0x36922e[_0x50c072];return _0x5ba68e;}export function productEnv(_0xcc525a){for(const _0x34cbcd of productEnvNames(_0xcc525a)){const _0x200cee=process.env[_0x34cbcd];if(_0x200cee!==undefined)return _0x200cee;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a71_0x1425(){const _0x4fd22f=['high-risk-write','84AQOoun','read','18zAPoLO','write','187048myYtDi','481500tsTCSu','140027qgaWDI','56157vjaUMz','661780pGZqzs','26lIWPTE','1635991SsZbGp','45585tzlXgW'];a71_0x1425=function(){return _0x4fd22f;};return a71_0x1425();}const a71_0x4983d7=a71_0x583f;(function(_0x3e0e64,_0x5783de){const _0x3d5dc8=a71_0x583f,_0x89e0ca=_0x3e0e64();while(!![]){try{const _0x3762fb=parseInt(_0x3d5dc8(0x1c3))/0x1+-parseInt(_0x3d5dc8(0x1b9))/0x2*(parseInt(_0x3d5dc8(0x1c4))/0x3)+parseInt(_0x3d5dc8(0x1bd))/0x4*(-parseInt(_0x3d5dc8(0x1bb))/0x5)+parseInt(_0x3d5dc8(0x1c2))/0x6+parseInt(_0x3d5dc8(0x1ba))/0x7+-parseInt(_0x3d5dc8(0x1c1))/0x8+-parseInt(_0x3d5dc8(0x1bf))/0x9*(-parseInt(_0x3d5dc8(0x1b8))/0xa);if(_0x3762fb===_0x5783de)break;else _0x89e0ca['push'](_0x89e0ca['shift']());}catch(_0x36b9a1){_0x89e0ca['push'](_0x89e0ca['shift']());}}}(a71_0x1425,0x1f4a1));function a71_0x583f(_0x37913b,_0x3d2973){_0x37913b=_0x37913b-0x1b8;const _0x1425be=a71_0x1425();let _0x583f63=_0x1425be[_0x37913b];return _0x583f63;}export const RISK_LEVEL_VALUES=[a71_0x4983d7(0x1be),a71_0x4983d7(0x1c0),a71_0x4983d7(0x1bc)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x389dbe=a72_0x4e9e;function a72_0x5a49(){const _0x4365aa=['domains','2627787ehYBDj','477744ghbtXa','23744AntUcZ','2525948xRftVq','3185140zMImUH','2148450yhPxoM','accessKeyCreatePath','6692sswzZE','4411896TFuhHG'];a72_0x5a49=function(){return _0x4365aa;};return a72_0x5a49();}(function(_0x2d1411,_0x37a85c){const _0x2c3523=a72_0x4e9e,_0x2966c7=_0x2d1411();while(!![]){try{const _0x225bb9=-parseInt(_0x2c3523(0x10c))/0x1+parseInt(_0x2c3523(0x110))/0x2+-parseInt(_0x2c3523(0x10b))/0x3+-parseInt(_0x2c3523(0x10e))/0x4+-parseInt(_0x2c3523(0x10f))/0x5+-parseInt(_0x2c3523(0x109))/0x6+-parseInt(_0x2c3523(0x112))/0x7*(-parseInt(_0x2c3523(0x10d))/0x8);if(_0x225bb9===_0x37a85c)break;else _0x2966c7['push'](_0x2966c7['shift']());}catch(_0x29b3f0){_0x2966c7['push'](_0x2966c7['shift']());}}}(a72_0x5a49,0x87491));function a72_0x4e9e(_0x55cdd0,_0x4c1204){_0x55cdd0=_0x55cdd0-0x109;const _0x5a495c=a72_0x5a49();let _0x4e9ee2=_0x5a495c[_0x55cdd0];return _0x4e9ee2;}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a72_0x389dbe(0x10a)]['production']['user']+PRODUCT_CONFIG[a72_0x389dbe(0x111)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a73_0x2254ff=a73_0x3194;(function(_0x4538b3,_0x398116){const _0x39dc09=a73_0x3194,_0x339f4d=_0x4538b3();while(!![]){try{const _0x125ebe=-parseInt(_0x39dc09(0x15e))/0x1+parseInt(_0x39dc09(0x16e))/0x2*(-parseInt(_0x39dc09(0x150))/0x3)+-parseInt(_0x39dc09(0x191))/0x4+-parseInt(_0x39dc09(0x14a))/0x5+-parseInt(_0x39dc09(0x171))/0x6+parseInt(_0x39dc09(0x151))/0x7*(-parseInt(_0x39dc09(0x14c))/0x8)+parseInt(_0x39dc09(0x188))/0x9*(parseInt(_0x39dc09(0x16b))/0xa);if(_0x125ebe===_0x398116)break;else _0x339f4d['push'](_0x339f4d['shift']());}catch(_0x33bc5a){_0x339f4d['push'](_0x339f4d['shift']());}}}(a73_0x4d97,0xdd483));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';function a73_0x4d97(){const _0x593383=['maxRisk','utf8','EPERM','cwd','pageSize','env','EACCES','isRaw','parse','isTTY','826235gUUbpP','apps','runtimeDomain','projectConfig','values','daily','empty','some','local-alias','FORMAT','defaultApp','trim','missing','580CcGVvr','object','authRequired','46KofmgQ','string','stdin','9337080QyGSrN','nonInteractive','globalConfig','global','cache','app','setRawCommand','read','raw','./constant/domain.js','project','userDomain','./constant/env.js','stdout','format','ENV','stringify','inherit','skillHubDomain','setLogPath','apiDomain','argv','newConfigFileName','968949PGZABx','APP','locale','online','accessKey','message','production','development','slice','488496JOppbd','setRawMode','error','7028335lJBZrX','code','3176qomqYN','VERBOSE','true','EXDEV','25134zpqppo','21777aKmZak','appcode','PAGE_SIZE'];a73_0x4d97=function(){return _0x593383;};return a73_0x4d97();}function a73_0x3194(_0x4fc7c2,_0x56e430){_0x4fc7c2=_0x4fc7c2-0x148;const _0x4d9739=a73_0x4d97();let _0x3194eb=_0x4d9739[_0x4fc7c2];return _0x3194eb;}import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a73_0x2254ff(0x187)];function resolveConfigPath(_0x1da66){for(const _0x27975f of CONFIG_NAMES){const _0x26ae31=resolve(_0x1da66,_0x27975f);if(existsSync(_0x26ae31))return _0x26ae31;}return undefined;}export function resolveWriteConfigPath(_0x327787){const _0x1d3d80=a73_0x2254ff,_0x2eed78=_0x327787==='project'?process[_0x1d3d80(0x157)]():homedir(),_0x2812ea=resolveConfigPath(_0x2eed78);return _0x2812ea??resolve(_0x2eed78,NEW_CONFIG_NAME);}export function readConfigFile(_0x5a72fb){const _0x5a6633=a73_0x2254ff;try{if(existsSync(_0x5a72fb)){const _0x42b53c=readFileSync(_0x5a72fb,{'encoding':_0x5a6633(0x155)});if(_0x42b53c){const _0xdbb446=JSON[_0x5a6633(0x15c)](_0x42b53c);return migrateOnlineEnv(_0x5a72fb,_0xdbb446),_0xdbb446;}}}catch{}return{};}function migrateOnlineEnv(_0x1ef8ac,_0x373aeb){const _0x490fc1=a73_0x2254ff;let _0x22a828=![];_0x373aeb[_0x490fc1(0x159)]==='online'&&(_0x373aeb[_0x490fc1(0x159)]='production',_0x22a828=!![]);if(_0x373aeb['apps']&&typeof _0x373aeb[_0x490fc1(0x15f)]==='object')for(const _0x2309da of Object[_0x490fc1(0x162)](_0x373aeb['apps'])){_0x2309da&&_0x2309da[_0x490fc1(0x159)]===_0x490fc1(0x18b)&&(_0x2309da[_0x490fc1(0x159)]=_0x490fc1(0x18e),_0x22a828=!![]);}if(_0x22a828)try{writeConfigFile(_0x1ef8ac,_0x373aeb);}catch{}}export function writeConfigFile(_0xcb6b30,_0xc3a1c1){const _0x33e962=a73_0x2254ff,_0x3356de=dirname(_0xcb6b30);!existsSync(_0x3356de)&&mkdirSync(_0x3356de,{'recursive':!![]});const _0x1469cf=_0xcb6b30+'.tmp';try{writeFileSync(_0x1469cf,JSON[_0x33e962(0x181)](_0xc3a1c1,null,0x2)+'\x0a',{'encoding':_0x33e962(0x155),'mode':0x180});try{renameSync(_0x1469cf,_0xcb6b30);}catch(_0x3435dc){if(_0x3435dc[_0x33e962(0x14b)]===_0x33e962(0x156)||_0x3435dc[_0x33e962(0x14b)]===_0x33e962(0x14f)||_0x3435dc[_0x33e962(0x14b)]===_0x33e962(0x15a)){writeFileSync(_0xcb6b30,JSON[_0x33e962(0x181)](_0xc3a1c1,null,0x2)+'\x0a',{'encoding':_0x33e962(0x155)});try{unlinkSync(_0x1469cf);}catch{}}else throw _0x3435dc;}}catch(_0x1e3752){try{unlinkSync(_0x1469cf);}catch{}throw _0x1e3752;}}export function isNonInteractiveMode(_0x59b7f0){const _0x54d091=a73_0x2254ff;return!!(_0x59b7f0[_0x54d091(0x172)]||_0x59b7f0['ci']||productEnvNames('CI')[_0x54d091(0x165)](_0x4dbbeb=>process.env[_0x4dbbeb]===_0x54d091(0x14e))||process.env.CI==='true'||!process[_0x54d091(0x17e)][_0x54d091(0x15d)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x5f142c=a73_0x2254ff;if(!process[_0x5f142c(0x170)][_0x5f142c(0x15d)])return![];try{const _0x2cfae7=process[_0x5f142c(0x170)][_0x5f142c(0x15b)];return process[_0x5f142c(0x170)][_0x5f142c(0x148)](!![]),process['stdin']['setRawMode'](_0x2cfae7??![]),!![];}catch{return![];}}export async function createContext(_0x34ecce){const _0x19b079=a73_0x2254ff,_0x1fa322=readRawConfig(),_0x5bf270=buildConfig(_0x1fa322,_0x34ecce);await initGlobalEnvironment(_0x5bf270);const {getUserDomain:_0x2e5a12,getApiDomain:_0x219361}=await import(_0x19b079(0x17a)),_0x476727={'apiDomain':_0x219361(),'userDomain':_0x2e5a12()},_0x4a3619=await buildAuth(_0x5bf270);logger[_0x19b079(0x184)](process[_0x19b079(0x157)]());const _0xbb5653=(CLI_BIN_NAME+'\x20'+process[_0x19b079(0x186)][_0x19b079(0x190)](0x2)['join']('\x20'))[_0x19b079(0x169)]();logger[_0x19b079(0x177)](_0xbb5653);const _0x1d99ff=isNonInteractiveMode(_0x34ecce);return{'config':_0x5bf270,'auth':_0x4a3619,'logger':logger,'env':_0x476727,'nonInteractive':_0x1d99ff};}export function buildConfigFromFlags(_0x1d405b){return buildConfig(readRawConfig(),_0x1d405b);}export function getLocalAppAliases(_0x387c13){const _0x1e6167=a73_0x2254ff;return _0x387c13['apps']&&typeof _0x387c13[_0x1e6167(0x15f)]===_0x1e6167(0x16c)?_0x387c13[_0x1e6167(0x15f)]:{};}export function resolveLocalAppAliasCode(_0x1e15c4,_0x43be17){const _0x20c6bb=a73_0x2254ff;if(!_0x43be17)return undefined;const _0x5c3f6e=getLocalAppAliases(_0x1e15c4)[_0x43be17],_0x457c9f=_0x5c3f6e?.['appcode'];return typeof _0x457c9f===_0x20c6bb(0x16f)&&_0x457c9f[_0x20c6bb(0x169)]()?_0x457c9f[_0x20c6bb(0x169)]():undefined;}export function readAppCodeFromConfig(){const _0x3800f6=a73_0x2254ff,_0x40568b=readRawConfig(),_0x2752b5=_0x40568b[_0x3800f6(0x152)]??_0x40568b[_0x3800f6(0x176)];if(typeof _0x2752b5===_0x3800f6(0x16f)&&_0x2752b5[_0x3800f6(0x169)]())return _0x2752b5[_0x3800f6(0x169)]();const _0x4b9f86=resolveLocalAppAliasCode(_0x40568b,typeof _0x40568b[_0x3800f6(0x168)]===_0x3800f6(0x16f)?_0x40568b[_0x3800f6(0x168)]:undefined);if(_0x4b9f86)return _0x4b9f86;const _0x124750=normalizeEnv(String(_0x40568b[_0x3800f6(0x159)]||_0x3800f6(0x18e))),_0x3b3551=isDaily(_0x124750)?_0x3800f6(0x163):isDev(_0x124750)?_0x3800f6(0x18f):_0x3800f6(0x18e),_0x4a8f75=resolveCachedAppCode(typeof _0x40568b['defaultApp']===_0x3800f6(0x16f)?_0x40568b['defaultApp']:undefined,_0x3b3551,typeof _0x40568b['accessKey']==='string'?_0x40568b[_0x3800f6(0x18c)]:undefined);if(_0x4a8f75)return _0x4a8f75;const _0x5d59b0=Object[_0x3800f6(0x162)](getLocalAppAliases(_0x40568b))['find'](_0x53be3a=>_0x53be3a?.[_0x3800f6(0x152)]);return typeof _0x5d59b0?.['appcode']===_0x3800f6(0x16f)&&_0x5d59b0[_0x3800f6(0x152)]['trim']()?_0x5d59b0[_0x3800f6(0x152)][_0x3800f6(0x169)]():undefined;}export function readScopedConfig(_0x56eede){const _0x2e949b=a73_0x2254ff,_0x4ca960=_0x56eede[_0x2e949b(0x174)]?_0x2e949b(0x174):_0x2e949b(0x17b);return readConfigFile(resolveWriteConfigPath(_0x4ca960));}export function writeScopedConfig(_0x53de10,_0xfb1949){const _0x5f180d=a73_0x2254ff,_0x85bd4d=_0xfb1949['global']?_0x5f180d(0x174):_0x5f180d(0x17b);writeConfigFile(resolveWriteConfigPath(_0x85bd4d),_0x53de10);}export async function initGlobalEnvironment(_0x322958){const _0x3ecd67=a73_0x2254ff,{initEnv:_0x44361e}=await import(_0x3ecd67(0x17d));_0x44361e(_0x322958[_0x3ecd67(0x159)]);const {initDomains:_0x4432a3}=await import('./constant/domain.js');_0x4432a3({'apiDomain':_0x322958[_0x3ecd67(0x179)][_0x3ecd67(0x185)]||_0x322958[_0x3ecd67(0x179)]['host']||undefined,'userDomain':_0x322958[_0x3ecd67(0x179)][_0x3ecd67(0x17c)]||undefined,'runtimeDomain':_0x322958[_0x3ecd67(0x179)][_0x3ecd67(0x160)]||undefined,'skillHubDomain':_0x322958[_0x3ecd67(0x179)][_0x3ecd67(0x183)]||undefined});}export function getProjectConfigPath(){const _0x53f892=a73_0x2254ff;return resolveConfigPath(process[_0x53f892(0x157)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x16abaa){const _0x2a6f21=a73_0x2254ff;if(!existsSync(_0x16abaa))return{'status':_0x2a6f21(0x16a)};try{const _0x247f8e=readFileSync(_0x16abaa,{'encoding':'utf8'});if(!_0x247f8e?.[_0x2a6f21(0x169)]())return{'status':_0x2a6f21(0x164)};const _0x30ea90=JSON['parse'](_0x247f8e);return{'status':'ok','data':_0x30ea90};}catch(_0x1d00d3){return{'status':_0x2a6f21(0x149),'message':_0x1d00d3 instanceof Error?_0x1d00d3[_0x2a6f21(0x18d)]:String(_0x1d00d3)};}}export function loadRawConfigLayers(_0x91a0bd){const _0x4a8189=a73_0x2254ff;let _0x1dafa1={},_0x28385f={},_0x39e378,_0x47a33b;try{_0x39e378=resolveConfigPath(homedir());if(_0x39e378){const _0x319f89=readFileSync(_0x39e378,{'encoding':_0x4a8189(0x155)});if(_0x319f89)_0x1dafa1=JSON['parse'](_0x319f89);}}catch{}try{const _0x19778a=_0x91a0bd||process[_0x4a8189(0x157)]();_0x47a33b=resolveConfigPath(_0x19778a);if(_0x47a33b){const _0x3c9812=readFileSync(_0x47a33b,{'encoding':_0x4a8189(0x155)});if(_0x3c9812)_0x28385f=JSON['parse'](_0x3c9812);}}catch{}return{'globalPath':_0x39e378,'projectPath':_0x47a33b,'globalConfig':_0x1dafa1,'projectConfig':_0x28385f};}function mergeRawConfigLayers(_0x2d210c){const _0x47339b=a73_0x2254ff,{globalConfig:_0x451036,projectConfig:_0x4f22db}=_0x2d210c;if(_0x4f22db['inherit']===![]){const _0xbe22d4={..._0x4f22db};return delete _0xbe22d4[_0x47339b(0x182)],_0xbe22d4;}const _0x9bee71={..._0x451036,..._0x4f22db};if(_0x47339b(0x168)in _0x4f22db)_0x9bee71[_0x47339b(0x168)]=_0x4f22db[_0x47339b(0x168)];else _0x451036[_0x47339b(0x168)]&&(_0x9bee71[_0x47339b(0x168)]=_0x451036[_0x47339b(0x168)]);return _0x9bee71;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x1908b5){return mergeRawConfigLayers(loadRawConfigLayers(_0x1908b5));}export function readRawConfigWithLayers(_0x3bc9e8){const _0x545954=loadRawConfigLayers(_0x3bc9e8);return{'config':mergeRawConfigLayers(_0x545954),'layers':_0x545954};}export function resolveDefaultAppSource(_0x408a6f){const _0x1aad88=a73_0x2254ff;if(_0x1aad88(0x168)in _0x408a6f[_0x1aad88(0x161)])return _0x1aad88(0x17b);if(_0x408a6f[_0x1aad88(0x161)][_0x1aad88(0x182)]===![])return null;if(_0x408a6f[_0x1aad88(0x173)][_0x1aad88(0x168)])return _0x1aad88(0x174);return null;}function buildConfig(_0x486b2f,_0x3ad787){const _0xfec8b=a73_0x2254ff,_0x1e96df=_0x486b2f[_0xfec8b(0x168)]||undefined,_0x1308e9=_0x3ad787[_0xfec8b(0x176)]||env(_0xfec8b(0x189))||undefined,_0x3e1c54=_0x1308e9||_0x1e96df||undefined,_0x1b4d36=env('ACCESS_KEY')||_0x486b2f['accessKey']||undefined,_0x107be0=_0x3ad787[_0xfec8b(0x159)]||env(_0xfec8b(0x180))||_0x486b2f[_0xfec8b(0x159)]||DEFAULT_CONFIG_VALUES[_0xfec8b(0x159)],_0x20b04a=normalizeEnv(String(_0x107be0)),_0x38dc48=isDaily(_0x20b04a)?_0xfec8b(0x163):isDev(_0x20b04a)?'development':'production',_0x4aa817=typeof _0x3ad787[_0xfec8b(0x152)]===_0xfec8b(0x16f)?_0x3ad787['appcode']:undefined,_0x3bb99b=env('APPCODE'),_0x2081cb=_0x1308e9?undefined:_0x486b2f['appcode']||_0x486b2f['app']||undefined,_0x5dafdc=_0x1308e9||(_0x2081cb?undefined:_0x1e96df),_0x4be5df=resolveLocalAppAliasCode(_0x486b2f,_0x5dafdc),_0x4dbb06=resolveCachedAppCode(_0x5dafdc,_0x38dc48,_0x1b4d36),_0x3282d4=_0x4aa817||_0x3bb99b||_0x2081cb||_0x4be5df||_0x4dbb06||undefined,_0x1c3105=_0x4aa817?'explicit':_0x3bb99b?_0xfec8b(0x159):_0x2081cb?'top-level':_0x4be5df?_0xfec8b(0x166):_0x4dbb06?_0xfec8b(0x175):undefined,_0x229738=_0x486b2f[_0xfec8b(0x18a)]||DEFAULT_CONFIG_VALUES[_0xfec8b(0x18a)],_0x3212e0=undefined,_0x13850d=_0x3ad787[_0xfec8b(0x17f)]||env(_0xfec8b(0x167))||_0x486b2f['format'],_0x43e095=normalizeLegacyOutputFormat(_0x13850d),_0x199a8c=env(_0xfec8b(0x153))||_0x486b2f[_0xfec8b(0x158)],_0x302653=_0x199a8c?Number(_0x199a8c)||undefined:undefined,_0xf2a686=_0x486b2f['riskLevel']||_0x486b2f[_0xfec8b(0x154)],_0x3e852e=_0xf2a686===_0xfec8b(0x178)||_0xf2a686==='write'||_0xf2a686==='high-risk-write'?_0xf2a686:DEFAULT_CONFIG_VALUES['riskLevel'],_0x3516b2=env(_0xfec8b(0x14d)),_0x1c0749=_0x3516b2==='1'||_0x3516b2===_0xfec8b(0x14e);return{'appCode':typeof _0x3282d4===_0xfec8b(0x16f)&&_0x3282d4[_0xfec8b(0x169)]()?_0x3282d4[_0xfec8b(0x169)]():undefined,'appCodeSource':_0x1c3105,'env':_0x38dc48,'locale':_0x229738,'cookie':_0x3212e0,'accessKey':_0x1b4d36,'format':_0x43e095,'pageSize':_0x302653,'riskLevel':_0x3e852e,'verbose':_0x1c0749,'defaultApp':_0x1e96df,'currentApp':typeof _0x3e1c54==='string'?_0x3e1c54:undefined,'raw':_0x486b2f};}function env(_0x26772d){return productEnv(_0x26772d);}async function buildAuth(_0x5a4940){const _0x418710=a73_0x2254ff,_0x2cc502='',_0xdf22af=!!_0x5a4940[_0x418710(0x18c)];return{'cookie':_0x2cc502,'isLoggedIn':_0xdf22af,async 'getOrLogin'(){const _0x14d599=_0x418710;if(_0xdf22af)return _0x2cc502;throw CliErrors[_0x14d599(0x16d)]();}};}
|
|
1
|
+
const a73_0x3d8d73=a73_0x50fd;(function(_0x478b39,_0x334c2b){const _0x3499ce=a73_0x50fd,_0x2fdf66=_0x478b39();while(!![]){try{const _0x1ac6b5=parseInt(_0x3499ce(0x118))/0x1+-parseInt(_0x3499ce(0x128))/0x2+-parseInt(_0x3499ce(0x112))/0x3+parseInt(_0x3499ce(0xfe))/0x4+parseInt(_0x3499ce(0xf0))/0x5*(parseInt(_0x3499ce(0x110))/0x6)+parseInt(_0x3499ce(0xf8))/0x7+parseInt(_0x3499ce(0x10b))/0x8*(-parseInt(_0x3499ce(0x113))/0x9);if(_0x1ac6b5===_0x334c2b)break;else _0x2fdf66['push'](_0x2fdf66['shift']());}catch(_0xeaf184){_0x2fdf66['push'](_0x2fdf66['shift']());}}}(a73_0x21a6,0x3b678));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a73_0x3d8d73(0x130)];function a73_0x21a6(){const _0x1defb6=['global','find','apps','raw','nonInteractive','pageSize','EACCES','message','VERBOSE','daily','isTTY','785162MZLLOB','true','PAGE_SIZE','projectConfig','values','defaultApp','read','trim','newConfigFileName','setLogPath','missing','explicit','ACCESS_KEY','utf8','format','stdout','string','top-level','5fpjguo','production','high-risk-write','accessKey','skillHubDomain','FORMAT','runtimeDomain','join','2524788xfaAYa','online','code','some','./constant/env.js','isRaw','742732EcmIOC','.tmp','write','env','./constant/domain.js','host','stdin','authRequired','argv','appcode','APP','object','app','8CbKbQO','apiDomain','project','inherit','EPERM','707424VLkSgy','error','69459jFVaZA','3341997kbsIVb','slice','stringify','riskLevel','setRawCommand','366116lAObKQ','empty','setRawMode','parse','cwd'];a73_0x21a6=function(){return _0x1defb6;};return a73_0x21a6();}function resolveConfigPath(_0x425732){for(const _0x4a7e59 of CONFIG_NAMES){const _0x10dc0d=resolve(_0x425732,_0x4a7e59);if(existsSync(_0x10dc0d))return _0x10dc0d;}return undefined;}export function resolveWriteConfigPath(_0x5d66be){const _0x368311=a73_0x3d8d73,_0x291460=_0x5d66be===_0x368311(0x10d)?process[_0x368311(0x11c)]():homedir(),_0x595ba0=resolveConfigPath(_0x291460);return _0x595ba0??resolve(_0x291460,NEW_CONFIG_NAME);}export function readConfigFile(_0x1a755c){const _0x1be661=a73_0x3d8d73;try{if(existsSync(_0x1a755c)){const _0x273908=readFileSync(_0x1a755c,{'encoding':'utf8'});if(_0x273908){const _0x3c9f86=JSON[_0x1be661(0x11b)](_0x273908);return migrateOnlineEnv(_0x1a755c,_0x3c9f86),_0x3c9f86;}}}catch{}return{};}function migrateOnlineEnv(_0x2d8779,_0x1d2645){const _0x3f8847=a73_0x3d8d73;let _0x85bac1=![];_0x1d2645['env']==='online'&&(_0x1d2645['env']='production',_0x85bac1=!![]);if(_0x1d2645[_0x3f8847(0x11f)]&&typeof _0x1d2645[_0x3f8847(0x11f)]===_0x3f8847(0x109))for(const _0xa8d665 of Object[_0x3f8847(0x12c)](_0x1d2645[_0x3f8847(0x11f)])){_0xa8d665&&_0xa8d665[_0x3f8847(0x101)]===_0x3f8847(0xf9)&&(_0xa8d665[_0x3f8847(0x101)]=_0x3f8847(0xf1),_0x85bac1=!![]);}if(_0x85bac1)try{writeConfigFile(_0x2d8779,_0x1d2645);}catch{}}export function writeConfigFile(_0x30cda9,_0x12f76c){const _0x285a11=a73_0x3d8d73,_0x208c29=dirname(_0x30cda9);!existsSync(_0x208c29)&&mkdirSync(_0x208c29,{'recursive':!![]});const _0x318595=_0x30cda9+_0x285a11(0xff);try{writeFileSync(_0x318595,JSON['stringify'](_0x12f76c,null,0x2)+'\x0a',{'encoding':_0x285a11(0xeb),'mode':0x180});try{renameSync(_0x318595,_0x30cda9);}catch(_0x5221fb){if(_0x5221fb[_0x285a11(0xfa)]===_0x285a11(0x10f)||_0x5221fb['code']==='EXDEV'||_0x5221fb[_0x285a11(0xfa)]===_0x285a11(0x123)){writeFileSync(_0x30cda9,JSON[_0x285a11(0x115)](_0x12f76c,null,0x2)+'\x0a',{'encoding':_0x285a11(0xeb)});try{unlinkSync(_0x318595);}catch{}}else throw _0x5221fb;}}catch(_0x2e79ce){try{unlinkSync(_0x318595);}catch{}throw _0x2e79ce;}}export function isNonInteractiveMode(_0x1231ad){const _0x2709aa=a73_0x3d8d73;return!!(_0x1231ad[_0x2709aa(0x121)]||_0x1231ad['ci']||productEnvNames('CI')[_0x2709aa(0xfb)](_0x142b47=>process.env[_0x142b47]===_0x2709aa(0x129))||process.env.CI===_0x2709aa(0x129)||!process[_0x2709aa(0xed)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1a1a1c=a73_0x3d8d73;if(!process['stdin'][_0x1a1a1c(0x127)])return![];try{const _0x3bba68=process[_0x1a1a1c(0x104)][_0x1a1a1c(0xfd)];return process['stdin'][_0x1a1a1c(0x11a)](!![]),process['stdin'][_0x1a1a1c(0x11a)](_0x3bba68??![]),!![];}catch{return![];}}export async function createContext(_0x4cffca){const _0x2e8403=a73_0x3d8d73,_0x18491f=readRawConfig(),_0x4b79a7=buildConfig(_0x18491f,_0x4cffca);await initGlobalEnvironment(_0x4b79a7);const {getUserDomain:_0x73d84c,getApiDomain:_0x2305b8}=await import(_0x2e8403(0x102)),_0x4d8715={'apiDomain':_0x2305b8(),'userDomain':_0x73d84c()},_0x33da22=await buildAuth(_0x4b79a7);logger[_0x2e8403(0x131)](process['cwd']());const _0x1f6bd7=(CLI_BIN_NAME+'\x20'+process[_0x2e8403(0x106)][_0x2e8403(0x114)](0x2)[_0x2e8403(0xf7)]('\x20'))[_0x2e8403(0x12f)]();logger[_0x2e8403(0x117)](_0x1f6bd7);const _0x4794cd=isNonInteractiveMode(_0x4cffca);return{'config':_0x4b79a7,'auth':_0x33da22,'logger':logger,'env':_0x4d8715,'nonInteractive':_0x4794cd};}export function buildConfigFromFlags(_0x1faa62){return buildConfig(readRawConfig(),_0x1faa62);}export function getLocalAppAliases(_0x460885){const _0x4b9666=a73_0x3d8d73;return _0x460885[_0x4b9666(0x11f)]&&typeof _0x460885['apps']===_0x4b9666(0x109)?_0x460885[_0x4b9666(0x11f)]:{};}export function resolveLocalAppAliasCode(_0x402a5a,_0x329cd6){const _0x1a3fae=a73_0x3d8d73;if(!_0x329cd6)return undefined;const _0x5256b8=getLocalAppAliases(_0x402a5a)[_0x329cd6],_0x4ac484=_0x5256b8?.[_0x1a3fae(0x107)];return typeof _0x4ac484===_0x1a3fae(0xee)&&_0x4ac484[_0x1a3fae(0x12f)]()?_0x4ac484['trim']():undefined;}export function readAppCodeFromConfig(){const _0x351493=a73_0x3d8d73,_0x114490=readRawConfig(),_0xac833b=_0x114490[_0x351493(0x107)]??_0x114490[_0x351493(0x10a)];if(typeof _0xac833b===_0x351493(0xee)&&_0xac833b[_0x351493(0x12f)]())return _0xac833b['trim']();const _0x15c2e1=resolveLocalAppAliasCode(_0x114490,typeof _0x114490['defaultApp']===_0x351493(0xee)?_0x114490[_0x351493(0x12d)]:undefined);if(_0x15c2e1)return _0x15c2e1;const _0x1e55ee=normalizeEnv(String(_0x114490[_0x351493(0x101)]||_0x351493(0xf1))),_0x416413=isDaily(_0x1e55ee)?_0x351493(0x126):isDev(_0x1e55ee)?'development':'production',_0x42a6ef=resolveCachedAppCode(typeof _0x114490[_0x351493(0x12d)]===_0x351493(0xee)?_0x114490[_0x351493(0x12d)]:undefined,_0x416413,typeof _0x114490[_0x351493(0xf3)]===_0x351493(0xee)?_0x114490['accessKey']:undefined);if(_0x42a6ef)return _0x42a6ef;const _0x5645c2=Object[_0x351493(0x12c)](getLocalAppAliases(_0x114490))[_0x351493(0x11e)](_0x24003b=>_0x24003b?.[_0x351493(0x107)]);return typeof _0x5645c2?.['appcode']===_0x351493(0xee)&&_0x5645c2['appcode']['trim']()?_0x5645c2[_0x351493(0x107)][_0x351493(0x12f)]():undefined;}export function readScopedConfig(_0x4b518a){const _0x5b3a09=a73_0x3d8d73,_0x1d0de1=_0x4b518a[_0x5b3a09(0x11d)]?_0x5b3a09(0x11d):_0x5b3a09(0x10d);return readConfigFile(resolveWriteConfigPath(_0x1d0de1));}export function writeScopedConfig(_0x301c39,_0x1846e3){const _0x54a21f=a73_0x3d8d73,_0x39a176=_0x1846e3[_0x54a21f(0x11d)]?_0x54a21f(0x11d):'project';writeConfigFile(resolveWriteConfigPath(_0x39a176),_0x301c39);}export async function initGlobalEnvironment(_0x4f3eed){const _0x50c121=a73_0x3d8d73,{initEnv:_0x46796d}=await import(_0x50c121(0xfc));_0x46796d(_0x4f3eed['env']);const {initDomains:_0x1c0255}=await import('./constant/domain.js');_0x1c0255({'apiDomain':_0x4f3eed[_0x50c121(0x120)][_0x50c121(0x10c)]||_0x4f3eed['raw'][_0x50c121(0x103)]||undefined,'userDomain':_0x4f3eed[_0x50c121(0x120)]['userDomain']||undefined,'runtimeDomain':_0x4f3eed['raw'][_0x50c121(0xf6)]||undefined,'skillHubDomain':_0x4f3eed[_0x50c121(0x120)][_0x50c121(0xf4)]||undefined});}export function getProjectConfigPath(){const _0x48882f=a73_0x3d8d73;return resolveConfigPath(process[_0x48882f(0x11c)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x42475c){const _0x3807dc=a73_0x3d8d73;if(!existsSync(_0x42475c))return{'status':_0x3807dc(0x132)};try{const _0x13b7d1=readFileSync(_0x42475c,{'encoding':_0x3807dc(0xeb)});if(!_0x13b7d1?.['trim']())return{'status':_0x3807dc(0x119)};const _0x2ef429=JSON[_0x3807dc(0x11b)](_0x13b7d1);return{'status':'ok','data':_0x2ef429};}catch(_0x3d5cf6){return{'status':_0x3807dc(0x111),'message':_0x3d5cf6 instanceof Error?_0x3d5cf6[_0x3807dc(0x124)]:String(_0x3d5cf6)};}}export function loadRawConfigLayers(_0x20d0fa){const _0x6d9a38=a73_0x3d8d73;let _0xd56d5={},_0xddae3c={},_0x31f3c7,_0x23d436;try{_0x31f3c7=resolveConfigPath(homedir());if(_0x31f3c7){const _0x166115=readFileSync(_0x31f3c7,{'encoding':'utf8'});if(_0x166115)_0xd56d5=JSON[_0x6d9a38(0x11b)](_0x166115);}}catch{}try{const _0x3f617c=_0x20d0fa||process[_0x6d9a38(0x11c)]();_0x23d436=resolveConfigPath(_0x3f617c);if(_0x23d436){const _0x360100=readFileSync(_0x23d436,{'encoding':_0x6d9a38(0xeb)});if(_0x360100)_0xddae3c=JSON[_0x6d9a38(0x11b)](_0x360100);}}catch{}return{'globalPath':_0x31f3c7,'projectPath':_0x23d436,'globalConfig':_0xd56d5,'projectConfig':_0xddae3c};}function mergeRawConfigLayers(_0x31d14d){const _0x5695d9=a73_0x3d8d73,{globalConfig:_0x3fea5f,projectConfig:_0x323f57}=_0x31d14d;if(_0x323f57[_0x5695d9(0x10e)]===![]){const _0x207b38={..._0x323f57};return delete _0x207b38[_0x5695d9(0x10e)],_0x207b38;}const _0x1813fa={..._0x3fea5f,..._0x323f57};if(_0x5695d9(0x12d)in _0x323f57)_0x1813fa[_0x5695d9(0x12d)]=_0x323f57[_0x5695d9(0x12d)];else _0x3fea5f[_0x5695d9(0x12d)]&&(_0x1813fa['defaultApp']=_0x3fea5f[_0x5695d9(0x12d)]);return _0x1813fa;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5ec3b3){return mergeRawConfigLayers(loadRawConfigLayers(_0x5ec3b3));}export function readRawConfigWithLayers(_0x5bc200){const _0x3affb8=loadRawConfigLayers(_0x5bc200);return{'config':mergeRawConfigLayers(_0x3affb8),'layers':_0x3affb8};}export function resolveDefaultAppSource(_0x1bd963){const _0x8bb8c8=a73_0x3d8d73;if(_0x8bb8c8(0x12d)in _0x1bd963[_0x8bb8c8(0x12b)])return _0x8bb8c8(0x10d);if(_0x1bd963[_0x8bb8c8(0x12b)][_0x8bb8c8(0x10e)]===![])return null;if(_0x1bd963['globalConfig']['defaultApp'])return _0x8bb8c8(0x11d);return null;}function buildConfig(_0x5df033,_0x55048a){const _0x4e5735=a73_0x3d8d73,_0x1a6573=_0x5df033['defaultApp']||undefined,_0x2dcf07=_0x55048a[_0x4e5735(0x10a)]||env(_0x4e5735(0x108))||undefined,_0x402736=_0x2dcf07||_0x1a6573||undefined,_0x124f2a=env(_0x4e5735(0x134))||_0x5df033[_0x4e5735(0xf3)]||undefined,_0x165246=_0x55048a[_0x4e5735(0x101)]||env('ENV')||_0x5df033[_0x4e5735(0x101)]||DEFAULT_CONFIG_VALUES[_0x4e5735(0x101)],_0x24c329=normalizeEnv(String(_0x165246)),_0x4d9b27=isDaily(_0x24c329)?_0x4e5735(0x126):isDev(_0x24c329)?'development':_0x4e5735(0xf1),_0x1a0cd1=typeof _0x55048a[_0x4e5735(0x107)]===_0x4e5735(0xee)?_0x55048a[_0x4e5735(0x107)]:undefined,_0x3295cf=env('APPCODE'),_0x5de0c2=_0x2dcf07?undefined:_0x5df033[_0x4e5735(0x107)]||_0x5df033[_0x4e5735(0x10a)]||undefined,_0x458b11=_0x2dcf07||(_0x5de0c2?undefined:_0x1a6573),_0x4a70a6=resolveLocalAppAliasCode(_0x5df033,_0x458b11),_0x2264b3=resolveCachedAppCode(_0x458b11,_0x4d9b27,_0x124f2a),_0x418415=_0x1a0cd1||_0x3295cf||_0x5de0c2||_0x4a70a6||_0x2264b3||undefined,_0x37d2d4=_0x1a0cd1?_0x4e5735(0x133):_0x3295cf?'env':_0x5de0c2?_0x4e5735(0xef):_0x4a70a6?'local-alias':_0x2264b3?'cache':undefined,_0x2931b3=_0x5df033['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x3d1f78=undefined,_0x1d0cd9=_0x55048a[_0x4e5735(0xec)]||env(_0x4e5735(0xf5))||_0x5df033[_0x4e5735(0xec)],_0x1cc5eb=normalizeLegacyOutputFormat(_0x1d0cd9),_0x11fa6f=env(_0x4e5735(0x12a))||_0x5df033[_0x4e5735(0x122)],_0x2b9abe=_0x11fa6f?Number(_0x11fa6f)||undefined:undefined,_0x36a1a3=_0x5df033['riskLevel']||_0x5df033['maxRisk'],_0x45db39=_0x36a1a3===_0x4e5735(0x12e)||_0x36a1a3===_0x4e5735(0x100)||_0x36a1a3===_0x4e5735(0xf2)?_0x36a1a3:DEFAULT_CONFIG_VALUES[_0x4e5735(0x116)],_0x7f1e27=env(_0x4e5735(0x125)),_0x496961=_0x7f1e27==='1'||_0x7f1e27===_0x4e5735(0x129);return{'appCode':typeof _0x418415===_0x4e5735(0xee)&&_0x418415[_0x4e5735(0x12f)]()?_0x418415['trim']():undefined,'appCodeSource':_0x37d2d4,'env':_0x4d9b27,'locale':_0x2931b3,'cookie':_0x3d1f78,'accessKey':_0x124f2a,'format':_0x1cc5eb,'pageSize':_0x2b9abe,'riskLevel':_0x45db39,'verbose':_0x496961,'defaultApp':_0x1a6573,'currentApp':typeof _0x402736===_0x4e5735(0xee)?_0x402736:undefined,'raw':_0x5df033};}function env(_0x4682c1){return productEnv(_0x4682c1);}function a73_0x50fd(_0x3957d2,_0x406895){_0x3957d2=_0x3957d2-0xeb;const _0x21a61c=a73_0x21a6();let _0x50fd24=_0x21a61c[_0x3957d2];return _0x50fd24;}async function buildAuth(_0xa215d2){const _0x44b2db='',_0x558e43=!!_0xa215d2['accessKey'];return{'cookie':_0x44b2db,'isLoggedIn':_0x558e43,async 'getOrLogin'(){const _0x24135a=a73_0x50fd;if(_0x558e43)return _0x44b2db;throw CliErrors[_0x24135a(0x105)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x30a2c1,_0x558bb7){const _0x5b7965=a74_0x5cd9,_0x21a3ef=_0x30a2c1();while(!![]){try{const _0x302e07=-parseInt(_0x5b7965(0xeb))/0x1+parseInt(_0x5b7965(0xf7))/0x2*(parseInt(_0x5b7965(0x9b))/0x3)+parseInt(_0x5b7965(0xdf))/0x4+-parseInt(_0x5b7965(0x96))/0x5+parseInt(_0x5b7965(0xf8))/0x6+-parseInt(_0x5b7965(0xb9))/0x7*(-parseInt(_0x5b7965(0xea))/0x8)+parseInt(_0x5b7965(0xe8))/0x9*(-parseInt(_0x5b7965(0x92))/0xa);if(_0x302e07===_0x558bb7)break;else _0x21a3ef['push'](_0x21a3ef['shift']());}catch(_0x44d5c9){_0x21a3ef['push'](_0x21a3ef['shift']());}}}(a74_0x4d58,0x714a9));import{readFile}from'node:fs/promises';import{basename}from'node:path';function a74_0x4d58(){const _0x50d375=['base64','data','invokeSource','/publish','/download','SkillHub\x20API\x20error:\x20','API\x20error:\x20','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','application/json','message','/client/runtime-bff/personal/','application/octet-stream','API\x20error\x20code:\x20','Configure\x20accessKey\x20in\x20','/skills','AbortError','/client/sql/query','GET','all','values','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','items','/client/dataset/get-driven-data?code=','NAMESPACE_ONLY','url','trim','/execute?appCode=','toLowerCase','errorMsg','valid','arrayBuffer','/client/artifact/create','download','newConfigFileName','name','/client/dataset/list','publishedVersion','5050mngfiW','status','error','Request\x20timeout:\x20','1079105TUZvjx','/api/cli/v1/skills/','POST','scope','map','6YHvYuf','boolean','errorCode','undefined','packageBase64','api-doc-generator','warnings','abort','/client/bff/query/','authRequired','application/zip','company','/api/runtime/v1/namespaces/','/client/knowledge-base/personal/list?appCode=','append','summary','string','.zip','skillCode','join','errors','version','success','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','Toolbox\x20error\x20code:\x20','tableData','/client/runtime-bff/personal/create','file','/client/app/my-apps','3370283bMuBnR','favorite','SQL\x20query\x20not\x20found:\x20','/client/knowledge-base/search','Check\x20your\x20credentials\x20and\x20try\x20again.','appCode','apiError','text','confirmWarnings','filter','slug','markdown','/versions/','Knowledge-base\x20entry\x20not\x20found:\x20id=','json','headlineVersion','tags','Toolbox\x20API\x20error:\x20','/client/artifact/list?','/client/user/loginUserInfo','replace','from','/client/uploadFile','type','isArray','test','validation','code','entries','App\x20config\x20not\x20found:\x20key=','catch','source','signal','skillName','PRIVATE','skill','appName','displayName','249048LzKScn','Artifact\x20not\x20found:\x20id=','Personal\x20BFF\x20not\x20found:\x20id=','artifactType','/client/ocr','content','effective','/client/queryFileUrl','object','5580bQjDnb','personal','8fdsdff','181746KqDMoE','visibility','number','searchParams','/client/knowledge-base/personal/create','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','namespace','/client/artifact/','msg','/api/v1/skills/','toString','327034GSvLku','1823658OAlgUN','ownerPreviewVersion','set','/api/node-toolbox/'];a74_0x4d58=function(){return _0x50d375;};return a74_0x4d58();}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(_0x5ba192){_activeAK=_0x5ba192||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x2ec0bf,_0x351969={}){const _0x378318=a74_0x5cd9,{method:method='GET',body:_0x417ef7,headers:headers={},timeout:timeout=0x7530}=_0x351969,_0x368e00=_activeAK,_0x27e425=getRuntimeDomain();if(!_0x368e00)throw CliErrors[_0x378318(0xa4)](_0x378318(0x7a)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x37689e=''+_0x27e425+_0x2ec0bf,_0x20c982={'X-User-AK':_0x368e00},_0x3b22d5=new AbortController(),_0xea65fc=setTimeout(()=>_0x3b22d5['abort'](),timeout);try{const _0x3b2777=await fetch(_0x37689e,{'method':method,'headers':{'Content-Type':_0x378318(0x75),'X-Invoke-Source':PRODUCT_CONFIG[_0x378318(0x6f)],..._0x20c982,...headers},'body':_0x417ef7?JSON['stringify'](_0x417ef7):undefined,'signal':_0x3b22d5[_0x378318(0xd9)]});let _0x44744b;try{_0x44744b=await _0x3b2777[_0x378318(0xc7)]();}catch{throw CliErrors[_0x378318(0xbf)](_0x378318(0xb2)+_0x3b2777[_0x378318(0x93)]+')',_0x3b2777['status']>=0x190?_0x378318(0xbd):undefined);}if(!_0x3b2777['ok']||_0x44744b[_0x378318(0xb1)]===![])throw CliErrors[_0x378318(0xbf)](_0x44744b['errorMsg']||_0x44744b[_0x378318(0x76)]||_0x378318(0x73)+_0x3b2777[_0x378318(0x93)],_0x44744b[_0x378318(0x9d)]?_0x378318(0x79)+_0x44744b[_0x378318(0x9d)]:undefined);return _0x44744b;}catch(_0x26ba00){if(_0x26ba00 instanceof Error&&_0x26ba00[_0x378318(0x8f)]==='AbortError')throw CliErrors[_0x378318(0xbf)](_0x378318(0x95)+_0x37689e);throw _0x26ba00;}finally{clearTimeout(_0xea65fc);}}async function apiBinaryRequest(_0x54ee90,_0x4949ff={}){const _0x2f1e72=a74_0x5cd9,{method:method=_0x2f1e72(0x7e),headers:headers={},timeout:timeout=0x7530}=_0x4949ff,_0x413c8f=_activeAK,_0x50db0f=getRuntimeDomain();if(!_0x413c8f)throw CliErrors[_0x2f1e72(0xa4)](_0x2f1e72(0x7a)+PRODUCT_CONFIG[_0x2f1e72(0x8e)]+'.');const _0x442ae9=''+_0x50db0f+_0x54ee90,_0x5118fc=new AbortController(),_0x4ebd1a=setTimeout(()=>_0x5118fc['abort'](),timeout);try{const _0x11e699=await fetch(_0x442ae9,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x2f1e72(0x6f)],'X-User-AK':_0x413c8f,...headers},'signal':_0x5118fc[_0x2f1e72(0xd9)]});if(!_0x11e699['ok']){let _0x4a75cd;try{const _0x51ecd3=await _0x11e699[_0x2f1e72(0xc7)]();_0x4a75cd=_0x51ecd3[_0x2f1e72(0x89)]||_0x51ecd3[_0x2f1e72(0x76)]||_0x51ecd3[_0x2f1e72(0x9d)];}catch{_0x4a75cd=await _0x11e699[_0x2f1e72(0xc0)]()[_0x2f1e72(0xd7)](()=>undefined);}throw CliErrors['apiError'](_0x4a75cd||_0x2f1e72(0x73)+_0x11e699[_0x2f1e72(0x93)],'Download\x20failed:\x20'+_0x442ae9);}return Buffer[_0x2f1e72(0xce)](await _0x11e699[_0x2f1e72(0x8b)]());}catch(_0x1f250a){if(_0x1f250a instanceof Error&&_0x1f250a['name']==='AbortError')throw CliErrors[_0x2f1e72(0xbf)](_0x2f1e72(0x95)+_0x442ae9);throw _0x1f250a;}finally{clearTimeout(_0x4ebd1a);}}async function apiFormRequest(_0x4ff459,_0x505056,_0x24859e={}){const _0x21d2b3=a74_0x5cd9,{timeout:timeout=0x7530}=_0x24859e,_0x4bb8c3=_activeAK,_0x3d67ee=getRuntimeDomain();if(!_0x4bb8c3)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x21d2b3(0x8e)]+'.');const _0x32be1d=''+_0x3d67ee+_0x4ff459,_0x169ac6=new AbortController(),_0x1d7d7d=setTimeout(()=>_0x169ac6[_0x21d2b3(0xa2)](),timeout);try{const _0x300121=await fetch(_0x32be1d,{'method':_0x21d2b3(0x98),'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x4bb8c3},'body':_0x505056,'signal':_0x169ac6[_0x21d2b3(0xd9)]});let _0x2806ec;try{_0x2806ec=await _0x300121[_0x21d2b3(0xc7)]();}catch{throw CliErrors[_0x21d2b3(0xbf)](_0x21d2b3(0xb2)+_0x300121['status']+')',_0x300121[_0x21d2b3(0x93)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x300121['ok']||_0x2806ec[_0x21d2b3(0xb1)]===![])throw CliErrors[_0x21d2b3(0xbf)](_0x2806ec[_0x21d2b3(0x89)]||_0x2806ec['message']||'API\x20error:\x20'+_0x300121['status'],_0x2806ec[_0x21d2b3(0x9d)]?_0x21d2b3(0x79)+_0x2806ec[_0x21d2b3(0x9d)]:undefined);return _0x2806ec;}catch(_0x38664b){if(_0x38664b instanceof Error&&_0x38664b[_0x21d2b3(0x8f)]===_0x21d2b3(0x7c))throw CliErrors[_0x21d2b3(0xbf)]('Request\x20timeout:\x20'+_0x32be1d);throw _0x38664b;}finally{clearTimeout(_0x1d7d7d);}}async function toolboxRequest(_0x5abe65,_0x5bcb6a,_0x2cc0d9={}){const _0x152340=a74_0x5cd9,{method:method=_0x152340(0x7e),headers:headers={},timeout:timeout=0x7530}=_0x2cc0d9,_0x1eaa23=_activeAK;if(!_0x1eaa23)throw CliErrors['authRequired'](_0x152340(0x7a)+PRODUCT_CONFIG[_0x152340(0x8e)]+'.');const _0xfb03f8=getApiDomain()[_0x152340(0xcd)](/\/$/,''),_0x5f197b=new URL(_0x5abe65,_0xfb03f8+_0x152340(0x6c));if(_0x5bcb6a)for(const [_0x4f1b65,_0x1c29cb]of Object['entries'](_0x5bcb6a)){_0x1c29cb!==undefined&&_0x1c29cb!==null&&_0x5f197b[_0x152340(0xee)]['set'](_0x4f1b65,String(_0x1c29cb));}const _0x40116e=new AbortController(),_0x314a71=setTimeout(()=>_0x40116e[_0x152340(0xa2)](),timeout);try{const _0xf9e147=await fetch(_0x5f197b,{'method':method,'headers':{'Content-Type':_0x152340(0x75),'X-Invoke-Source':PRODUCT_CONFIG[_0x152340(0x6f)],'X-User-AK':_0x1eaa23,...headers},'signal':_0x40116e['signal']});let _0x34c2e0;try{_0x34c2e0=await _0xf9e147[_0x152340(0xc7)]();}catch{throw CliErrors[_0x152340(0xbf)](_0x152340(0xf0)+_0xf9e147['status']+')',_0xf9e147[_0x152340(0x93)]>=0x190?_0x152340(0xbd):undefined);}if(!_0xf9e147['ok']){const _0x1b51ee=_0x34c2e0&&typeof _0x34c2e0===_0x152340(0xe7)?_0x34c2e0:{};throw CliErrors[_0x152340(0xbf)](_0x1b51ee[_0x152340(0x89)]||_0x1b51ee['message']||_0x152340(0xca)+_0xf9e147[_0x152340(0x93)],_0x1b51ee['errorCode']?'Toolbox\x20error\x20code:\x20'+_0x1b51ee[_0x152340(0x9d)]:undefined);}if(_0x34c2e0&&typeof _0x34c2e0==='object'&&_0x152340(0xb1)in _0x34c2e0&&typeof _0x34c2e0[_0x152340(0xb1)]===_0x152340(0x9c)){const _0x11cc52=_0x34c2e0;if(!_0x11cc52[_0x152340(0xb1)])throw CliErrors['apiError'](_0x11cc52['errorMsg']||_0x11cc52[_0x152340(0x76)]||'Toolbox\x20API\x20error',_0x11cc52['errorCode']?_0x152340(0xb4)+_0x11cc52[_0x152340(0x9d)]:undefined);return _0x11cc52[_0x152340(0x6e)];}return _0x34c2e0;}catch(_0x19e262){if(_0x19e262 instanceof Error&&_0x19e262[_0x152340(0x8f)]===_0x152340(0x7c))throw CliErrors[_0x152340(0xbf)](_0x152340(0x95)+_0x5f197b['toString']());throw _0x19e262;}finally{clearTimeout(_0x314a71);}}async function skillHubJsonRequest(_0x438262,_0x5c443f={}){const _0x32473d=a74_0x5cd9,{method:method=_0x32473d(0x7e),query:_0xea06c0,body:_0x48c3ba,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x5c443f,_0x4df2bd=_activeAK;if(!_0x4df2bd)throw CliErrors[_0x32473d(0xa4)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x32473d(0x8e)]+'.');const _0x5d0193=getSkillHubDomain()[_0x32473d(0xcd)](/\/$/,''),_0x5cc3f3=new URL(_0x438262,_0x5d0193+'/');if(_0xea06c0)for(const [_0x1fa319,_0x12eb8e]of Object[_0x32473d(0xd5)](_0xea06c0)){_0x12eb8e!==undefined&&_0x12eb8e!==null&&_0x5cc3f3[_0x32473d(0xee)][_0x32473d(0x6b)](_0x1fa319,String(_0x12eb8e));}const _0x5cbdbe=new AbortController(),_0x48be4c=setTimeout(()=>_0x5cbdbe[_0x32473d(0xa2)](),timeout);try{const _0x2d3c00=await fetch(_0x5cc3f3[_0x32473d(0xf6)](),{'method':method,'headers':{'Accept':_0x32473d(0x75),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x4df2bd,...headers},'body':_0x48c3ba,'signal':_0x5cbdbe[_0x32473d(0xd9)]});let _0xa750da;try{_0xa750da=await _0x2d3c00[_0x32473d(0xc7)]();}catch{if(allowNotFound&&_0x2d3c00[_0x32473d(0x93)]===0x194)return undefined;throw CliErrors[_0x32473d(0xbf)](_0x32473d(0xf1)+_0x2d3c00[_0x32473d(0x93)]+')',_0x2d3c00['status']>=0x190?_0x32473d(0xbd):undefined);}if(allowNotFound&&isSkillHubNotFoundResponse(_0x2d3c00['status'],_0xa750da))return undefined;const _0x53fea7=!_0x2d3c00['ok']||_0xa750da?.[_0x32473d(0xb1)]===![]||typeof _0xa750da?.[_0x32473d(0xd4)]===_0x32473d(0xed)&&_0xa750da['code']>=0x190;if(_0x53fea7)throw CliErrors[_0x32473d(0xbf)](_0xa750da?.['errorMsg']||_0xa750da?.['message']||_0xa750da?.[_0x32473d(0xf4)]||_0x32473d(0x72)+_0x2d3c00[_0x32473d(0x93)],_0xa750da?.[_0x32473d(0x9d)]?'SkillHub\x20error\x20code:\x20'+_0xa750da[_0x32473d(0x9d)]:undefined);return _0xa750da?.['data']??_0xa750da;}catch(_0x5a0732){if(_0x5a0732 instanceof Error&&_0x5a0732[_0x32473d(0x8f)]==='AbortError')throw CliErrors[_0x32473d(0xbf)](_0x32473d(0x95)+_0x5cc3f3[_0x32473d(0xf6)]());throw _0x5a0732;}finally{clearTimeout(_0x48be4c);}}function isSkillHubNotFoundResponse(_0x11b79c,_0x8cda00){const _0x2c785c=a74_0x5cd9;if(_0x11b79c===0x194||_0x8cda00?.['code']===0x194)return!![];if(_0x11b79c!==0x190&&_0x8cda00?.['code']!==0x190)return![];const _0xe00481=[_0x8cda00?.[_0x2c785c(0xf4)],_0x8cda00?.[_0x2c785c(0x76)],_0x8cda00?.[_0x2c785c(0x89)],_0x8cda00?.[_0x2c785c(0x94)]][_0x2c785c(0xc2)](_0x47091e=>typeof _0x47091e===_0x2c785c(0xab))[_0x2c785c(0xae)]('\x20');return/skill not found\b/i[_0x2c785c(0xd2)](_0xe00481);}function a74_0x5cd9(_0x1aaa18,_0x4e3d33){_0x1aaa18=_0x1aaa18-0x6b;const _0x4d5877=a74_0x4d58();let _0x5cd917=_0x4d5877[_0x1aaa18];return _0x5cd917;}async function skillHubBinaryRequest(_0x14eb9e,_0x2b6124={}){const _0x5b9892=a74_0x5cd9,{query:_0x465e72,headers:headers={},timeout:timeout=0x7530}=_0x2b6124,_0x3d18fb=_activeAK;if(!_0x3d18fb)throw CliErrors[_0x5b9892(0xa4)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0xa987bb=getSkillHubDomain()[_0x5b9892(0xcd)](/\/$/,''),_0x31a623=new URL(_0x14eb9e,_0xa987bb+'/');if(_0x465e72)for(const [_0x1fe172,_0x5e1e2c]of Object[_0x5b9892(0xd5)](_0x465e72)){_0x5e1e2c!==undefined&&_0x5e1e2c!==null&&_0x31a623[_0x5b9892(0xee)][_0x5b9892(0x6b)](_0x1fe172,String(_0x5e1e2c));}const _0x431592=new AbortController(),_0x5958b5=setTimeout(()=>_0x431592['abort'](),timeout);try{const _0x26cc0c=await fetch(_0x31a623[_0x5b9892(0xf6)](),{'method':_0x5b9892(0x7e),'headers':{'Accept':_0x5b9892(0x78),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x3d18fb,...headers},'signal':_0x431592['signal']});if(!_0x26cc0c['ok']){let _0x25499d;try{const _0x343538=await _0x26cc0c['json']();_0x25499d=_0x343538[_0x5b9892(0x89)]||_0x343538[_0x5b9892(0x76)]||_0x343538[_0x5b9892(0xf4)]||_0x343538[_0x5b9892(0x9d)];}catch{_0x25499d=await _0x26cc0c['text']()['catch'](()=>undefined);}throw CliErrors['apiError'](_0x25499d||_0x5b9892(0x72)+_0x26cc0c[_0x5b9892(0x93)],'Download\x20failed:\x20'+_0x31a623[_0x5b9892(0xf6)]());}return Buffer[_0x5b9892(0xce)](await _0x26cc0c[_0x5b9892(0x8b)]());}catch(_0x4d437a){if(_0x4d437a instanceof Error&&_0x4d437a[_0x5b9892(0x8f)]===_0x5b9892(0x7c))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x31a623[_0x5b9892(0xf6)]());throw _0x4d437a;}finally{clearTimeout(_0x5958b5);}}export async function getBffScriptInfo(_0x29a457){const _0x33b638=a74_0x5cd9,_0x203f75=await apiRequest(_0x33b638(0xa3)+_0x29a457);if(!_0x203f75[_0x33b638(0x6e)])throw CliErrors[_0x33b638(0xd3)]('BFF\x20script\x20not\x20found:\x20id='+_0x29a457);return _0x203f75[_0x33b638(0x6e)];}export async function getSqlQueryInfo(_0x8d3e26,_0xf18c6){const _0x4e6108=a74_0x5cd9,_0x3c2b0e=await apiRequest(_0x4e6108(0x7d),{'method':_0x4e6108(0x98),'body':{'appCode':_0x8d3e26,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0xf18c6}}),_0x5b9710=_0x3c2b0e[_0x4e6108(0x6e)],_0x17cc0a=_0x5b9710&&typeof _0x5b9710===_0x4e6108(0xe7)&&_0x4e6108(0xb5)in _0x5b9710?_0x5b9710['tableData']?.[0x0]:_0x5b9710&&typeof _0x5b9710==='object'&&'sqlCode'in _0x5b9710?_0x5b9710:undefined;if(!_0x17cc0a)throw CliErrors['validation'](_0x4e6108(0xbb)+_0xf18c6);return _0x17cc0a;}function isRemoteAppItem(_0x546382){const _0x5aac32=a74_0x5cd9;return!!_0x546382&&typeof _0x546382===_0x5aac32(0xe7)&&typeof _0x546382[_0x5aac32(0xbe)]===_0x5aac32(0xab)&&typeof _0x546382[_0x5aac32(0xdd)]==='string';}function extractRemoteAppItems(_0x85b1ac){const _0x3eecfb=a74_0x5cd9;if(Array[_0x3eecfb(0xd1)](_0x85b1ac))return _0x85b1ac['filter'](isRemoteAppItem);if(!_0x85b1ac||typeof _0x85b1ac!==_0x3eecfb(0xe7))throw CliErrors[_0x3eecfb(0xbf)](_0x3eecfb(0x81));const _0x11ed18=_0x85b1ac;if(Array['isArray'](_0x11ed18['tableData']))return _0x11ed18['tableData'][_0x3eecfb(0xc2)](isRemoteAppItem);if(_0x11ed18[_0x3eecfb(0x6e)]&&typeof _0x11ed18[_0x3eecfb(0x6e)]==='object'){const _0x25364d=_0x11ed18[_0x3eecfb(0x6e)];if(Array[_0x3eecfb(0xd1)](_0x25364d[_0x3eecfb(0xb5)]))return _0x25364d['tableData'][_0x3eecfb(0xc2)](isRemoteAppItem);}throw CliErrors[_0x3eecfb(0xbf)](_0x3eecfb(0xb3));}export async function getMyApps(){const _0x3c489e=a74_0x5cd9,_0x1d0d0e=await apiRequest(_0x3c489e(0xb8));return extractRemoteAppItems(_0x1d0d0e[_0x3c489e(0x6e)]);}export async function getLoginUserInfo(){const _0x2b4dad=a74_0x5cd9,_0x1e3f02=await apiRequest(_0x2b4dad(0xcc));if(!_0x1e3f02[_0x2b4dad(0x6e)]||typeof _0x1e3f02[_0x2b4dad(0x6e)]!=='object'||Array[_0x2b4dad(0xd1)](_0x1e3f02[_0x2b4dad(0x6e)]))throw CliErrors[_0x2b4dad(0xbf)](_0x2b4dad(0x74));return _0x1e3f02['data'];}export async function listDatasets(_0x38fdb4,_0x24389f){const _0x5f057f=a74_0x5cd9,_0x25fa49=await apiRequest(_0x5f057f(0x90),{'method':_0x5f057f(0x98),'body':{'appCode':_0x38fdb4,..._0x24389f?.[_0x5f057f(0xd4)]&&{'code':_0x24389f[_0x5f057f(0xd4)]},..._0x24389f?.['name']&&{'name':_0x24389f[_0x5f057f(0x8f)]}}});return extractList(_0x25fa49['data']);}export async function getDatasetDetail(_0x1f71fe){const _0x4e37bc=a74_0x5cd9,_0x202095=await apiRequest(_0x4e37bc(0x83)+encodeURIComponent(_0x1f71fe));return _0x202095[_0x4e37bc(0x6e)];}export async function getDatasetSdkUsageDoc(_0x5b81c5,_0x409720){const _0x2dc2f1=a74_0x5cd9,_0x43bedc=await toolboxRequest(_0x2dc2f1(0xa0),{'datasetCode':_0x5b81c5,'appCode':_0x409720});return typeof _0x43bedc?.[_0x2dc2f1(0xc4)]===_0x2dc2f1(0xab)?_0x43bedc['markdown']:'';}export async function uploadRuntimeFile(_0x260d2d,_0x2d7883){const _0xf322e3=a74_0x5cd9,_0x30acf8=await readFile(_0x2d7883),_0x25b91e=new FormData();_0x25b91e[_0xf322e3(0xa9)]('appCode',_0x260d2d),_0x25b91e[_0xf322e3(0xa9)](_0xf322e3(0xb7),new Blob([new Uint8Array(_0x30acf8)]),basename(_0x2d7883));const _0x3e7079=await apiFormRequest(_0xf322e3(0xcf),_0x25b91e);return _0x3e7079[_0xf322e3(0x6e)];}export async function queryRuntimeFileUrl(_0x2333d2,_0x725a36={}){const _0xa453c5=a74_0x5cd9,_0x372e55=await apiRequest(_0xa453c5(0xe6),{'method':_0xa453c5(0x98),'body':{'filePath':_0x2333d2,'downloadFlag':_0x725a36[_0xa453c5(0x8d)]??![]}});return _0x372e55[_0xa453c5(0x6e)];}export async function recognizeRuntimeOcr(_0x5d9b03,_0x5d58cc){const _0x1e6462=a74_0x5cd9,_0x39e564=await apiRequest(_0x1e6462(0xe3),{'method':_0x1e6462(0x98),'body':{'appCode':_0x5d9b03,'url':_0x5d58cc[_0x1e6462(0x85)],'type':_0x5d58cc[_0x1e6462(0xd0)]}});return _0x39e564[_0x1e6462(0x6e)];}export async function getRuntimeAppConfigByKey(_0x530305,_0x12016b){const _0x3f3e74=a74_0x5cd9,_0x4bbf0a=new URLSearchParams({'appCode':_0x530305,'key':_0x12016b}),_0x39a2b1=await apiRequest('/client/app-config/getByKey?'+_0x4bbf0a[_0x3f3e74(0xf6)]());if(!_0x39a2b1['data'])throw CliErrors['validation'](_0x3f3e74(0xd6)+_0x12016b);return _0x39a2b1[_0x3f3e74(0x6e)];}export async function listRuntimeArtifacts(_0xbf29a3,_0xe8bf69){const _0x14c0fd=a74_0x5cd9,_0x39610e=new URLSearchParams({'appCode':_0xbf29a3});if(_0xe8bf69?.[_0x14c0fd(0xe2)])_0x39610e[_0x14c0fd(0x6b)](_0x14c0fd(0xe2),_0xe8bf69['artifactType']);if(_0xe8bf69?.['source'])_0x39610e[_0x14c0fd(0x6b)](_0x14c0fd(0xd8),_0xe8bf69['source']);if(_0xe8bf69?.[_0x14c0fd(0xba)]!==undefined)_0x39610e[_0x14c0fd(0x6b)](_0x14c0fd(0xba),String(_0xe8bf69[_0x14c0fd(0xba)]));const _0x1fdc42=await apiRequest(_0x14c0fd(0xcb)+_0x39610e[_0x14c0fd(0xf6)]());return Array[_0x14c0fd(0xd1)](_0x1fdc42['data'])?_0x1fdc42[_0x14c0fd(0x6e)]:[];}export async function getRuntimeArtifact(_0x2f14c0,_0x23da82){const _0x79d485=a74_0x5cd9,_0x4337f5=await apiRequest(_0x79d485(0xf3)+_0x2f14c0+'?appCode='+encodeURIComponent(_0x23da82));if(!_0x4337f5['data'])throw CliErrors[_0x79d485(0xd3)](_0x79d485(0xe0)+_0x2f14c0);return _0x4337f5[_0x79d485(0x6e)];}export async function createRuntimeArtifact(_0x3c57a1,_0x3862df){const _0x5c758e=a74_0x5cd9,_0x19a33e=await apiRequest(_0x5c758e(0x8c),{'method':_0x5c758e(0x98),'body':{'appCode':_0x3c57a1,..._0x3862df}});return _0x19a33e['data'];}export async function updateRuntimeArtifact(_0x11d5d3,_0x359c07,_0x50ef70){const _0x40ad97=a74_0x5cd9,_0x4fb224=await apiRequest(_0x40ad97(0xf3)+_0x11d5d3+'/update',{'method':_0x40ad97(0x98),'body':{'appCode':_0x359c07,..._0x50ef70}});return _0x4fb224[_0x40ad97(0x6e)];}export async function listPersonalBffs(_0x25dc73){const _0x3ab3c5=a74_0x5cd9,_0x3c5bde=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x25dc73));return Array[_0x3ab3c5(0xd1)](_0x3c5bde[_0x3ab3c5(0x6e)])?_0x3c5bde['data']:[];}export async function getPersonalBff(_0x206838,_0x532b38){const _0x3ce1f2=a74_0x5cd9,_0x3c9d27=await apiRequest(_0x3ce1f2(0x77)+_0x206838+'?appCode='+encodeURIComponent(_0x532b38));if(!_0x3c9d27[_0x3ce1f2(0x6e)])throw CliErrors['validation'](_0x3ce1f2(0xe1)+_0x206838);return _0x3c9d27[_0x3ce1f2(0x6e)];}export async function createPersonalBff(_0x2849c1,_0x113ae5){const _0x2166b7=a74_0x5cd9,_0x33616d=await apiRequest(_0x2166b7(0xb6),{'method':_0x2166b7(0x98),'body':{'appCode':_0x2849c1,..._0x113ae5}});return _0x33616d['data'];}export async function updatePersonalBff(_0x42c039,_0x1e90ab,_0x165563){const _0xbcf39=a74_0x5cd9,_0xba6009=await apiRequest('/client/runtime-bff/personal/'+_0x42c039+'/update',{'method':'POST','body':{'appCode':_0x1e90ab,..._0x165563}});return _0xba6009[_0xbcf39(0x6e)];}export async function executePersonalBff(_0x4a7fb1,_0x4973ba,_0x3dd8a9){const _0xbf830c=a74_0x5cd9,_0x2189e2=await apiRequest(_0xbf830c(0x77)+_0x4a7fb1+_0xbf830c(0x87)+encodeURIComponent(_0x4973ba),{'method':_0xbf830c(0x98),'body':_0x3dd8a9});return _0x2189e2[_0xbf830c(0x6e)];}export async function listPersonalKnowledgeBaseItems(_0x1bc071){const _0x24ad25=a74_0x5cd9,_0x220437=await apiRequest(_0x24ad25(0xa8)+encodeURIComponent(_0x1bc071));return Array[_0x24ad25(0xd1)](_0x220437['data'])?_0x220437[_0x24ad25(0x6e)]:[];}export async function getPersonalKnowledgeBaseItem(_0x1b3d1a,_0x5a5603){const _0x1dbbbd=a74_0x5cd9,_0x2ab737=await apiRequest('/client/knowledge-base/personal/'+_0x1b3d1a+'?appCode='+encodeURIComponent(_0x5a5603));if(!_0x2ab737[_0x1dbbbd(0x6e)])throw CliErrors[_0x1dbbbd(0xd3)](_0x1dbbbd(0xc6)+_0x1b3d1a);return _0x2ab737[_0x1dbbbd(0x6e)];}export async function createPersonalKnowledgeBaseItem(_0x3a3162,_0x4c7b05){const _0x269bc4=a74_0x5cd9,_0x52bbb5=await apiRequest(_0x269bc4(0xef),{'method':'POST','body':{'appCode':_0x3a3162,..._0x4c7b05}});return _0x52bbb5['data'];}export async function updatePersonalKnowledgeBaseItem(_0x53c22e,_0x1d8778,_0x113979){const _0x17c52f=a74_0x5cd9,_0x3a67be=await apiRequest('/client/knowledge-base/personal/'+_0x53c22e+'/update',{'method':'POST','body':{'appCode':_0x1d8778,..._0x113979}});return _0x3a67be[_0x17c52f(0x6e)];}export async function searchKnowledgeBase(_0x26ab0d,_0x5e2c99){const _0x24ad78=a74_0x5cd9,_0x472701=await apiRequest(_0x24ad78(0xbc),{'method':'POST','body':{'appCode':_0x26ab0d,'query':_0x5e2c99['query'],..._0x5e2c99['topK']!==undefined?{'topK':_0x5e2c99['topK']}:{}}});return Array[_0x24ad78(0xd1)](_0x472701[_0x24ad78(0x6e)])?_0x472701['data']:[];}export async function getRuntimeSkillByCode(_0x2b3130,_0x416820){const _0x13a745=a74_0x5cd9,_0x2a3539=await skillHubJsonRequest(_0x13a745(0xf5)+encodeURIComponent(_0x2b3130)+'/'+encodeURIComponent(_0x416820),{'allowNotFound':!![]});return _0x2a3539?skillHubRuntimeDetailToRuntimeSkill(_0x2a3539):undefined;}export async function listRuntimeSkills(_0x2f9009){const _0x3ba0cd=a74_0x5cd9,_0x447ce1=await skillHubJsonRequest(_0x3ba0cd(0xa7)+encodeURIComponent(_0x2f9009[_0x3ba0cd(0xbe)])+_0x3ba0cd(0x7b),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x2f9009['appCode'],_0x447ce1,_0x2f9009[_0x3ba0cd(0x99)]??_0x3ba0cd(0x7f),_0x2f9009[_0x3ba0cd(0xd4)]);}export async function listPersonalRuntimeSkills(_0x43159f){const _0x5a5c2d=a74_0x5cd9;return(await listRuntimeSkills({'appCode':_0x43159f,'scope':'personal'}))[_0x5a5c2d(0xe9)];}export async function listCompanyRuntimeSkills(_0xbe97e0){const _0x380249=a74_0x5cd9;return(await listRuntimeSkills({'appCode':_0xbe97e0,'scope':_0x380249(0xa6)}))[_0x380249(0xa6)];}export async function listVisibleRuntimeSkills(_0x2a5d11){const _0x1b2e0e=a74_0x5cd9;return(await listRuntimeSkills({'appCode':_0x2a5d11,'scope':'all'}))[_0x1b2e0e(0xe5)];}export async function createPersonalRuntimeSkill(_0x1c2004,_0x2d3c30){const _0x365fff=a74_0x5cd9;return publishRuntimeSkill(_0x1c2004,_0x2d3c30,{'visibility':_0x365fff(0xdb)});}export async function updatePersonalRuntimeSkill(_0x57f497,_0x1c067f,_0x349538){const _0x367a0d=a74_0x5cd9;return publishRuntimeSkill(_0x1c067f,{..._0x349538,'skillCode':_0x349538[_0x367a0d(0xad)]??_0x57f497},{'visibility':_0x367a0d(0xdb)});}export async function publishCompanyRuntimeSkill(_0x1e447f,_0xf04b1c,_0x5a05f5={}){const _0x589502=a74_0x5cd9;return publishRuntimeSkill(_0x1e447f,_0xf04b1c,{'visibility':_0x589502(0x84),'confirmWarnings':_0x5a05f5[_0x589502(0xc1)]});}export async function validateRuntimeSkillPublish(_0x2dd8ae,_0x53aab3,_0x462fc8){const _0x4ddfa3=a74_0x5cd9,_0x3533d8=buildRuntimeSkillPublishForm(_0x53aab3,_0x462fc8['visibility']),_0x3b6536=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x2dd8ae)+'/publish/validate',{'method':_0x4ddfa3(0x98),'body':_0x3533d8});return{'valid':_0x3b6536[_0x4ddfa3(0x8a)]===!![],'errors':Array[_0x4ddfa3(0xd1)](_0x3b6536[_0x4ddfa3(0xaf)])?_0x3b6536['errors']:[],'warnings':Array['isArray'](_0x3b6536[_0x4ddfa3(0xa1)])?_0x3b6536[_0x4ddfa3(0xa1)]:[],'resolvedSlug':_0x3b6536['resolvedSlug'],'resolvedVersion':_0x3b6536['resolvedVersion']};}export async function downloadRuntimeSkillPackage(_0x5035d0,_0x44c07e,_0x57a0c8,_0x3de377){const _0x5db82d=a74_0x5cd9;void _0x5035d0;const _0x35b523=_0x3de377?_0x5db82d(0x97)+encodeURIComponent(_0x57a0c8)+'/'+encodeURIComponent(_0x44c07e)+_0x5db82d(0xc5)+encodeURIComponent(_0x3de377)+_0x5db82d(0x71):_0x5db82d(0x97)+encodeURIComponent(_0x57a0c8)+'/'+encodeURIComponent(_0x44c07e)+_0x5db82d(0x71);return skillHubBinaryRequest(_0x35b523);}async function publishRuntimeSkill(_0x224fb6,_0x29be6f,_0x44ff21){const _0x5dcccd=a74_0x5cd9,_0x39b7a4=buildRuntimeSkillPublishForm(_0x29be6f,_0x44ff21[_0x5dcccd(0xec)]),_0x70a517=await skillHubJsonRequest(_0x5dcccd(0x97)+encodeURIComponent(_0x224fb6)+_0x5dcccd(0x70),{'method':_0x5dcccd(0x98),'query':{'confirmWarnings':_0x44ff21[_0x5dcccd(0xc1)]===!![]?!![]:undefined},'body':_0x39b7a4});return{'appCode':_0x70a517['namespace']??_0x224fb6,'skillCode':_0x70a517[_0x5dcccd(0xc3)]??_0x29be6f[_0x5dcccd(0xad)]??'','skillName':_0x29be6f['skillName']??_0x70a517[_0x5dcccd(0xc3)]??_0x29be6f[_0x5dcccd(0xad)],'description':_0x29be6f['description'],'scope':skillHubVisibilityToScope(_0x70a517[_0x5dcccd(0xec)]??_0x44ff21[_0x5dcccd(0xec)])??'personal','version':_0x70a517[_0x5dcccd(0xb0)]??_0x29be6f[_0x5dcccd(0xb0)],'tags':_0x29be6f[_0x5dcccd(0xc9)],'content':_0x29be6f[_0x5dcccd(0xe4)]};}function buildRuntimeSkillPublishForm(_0x385e08,_0x13ba17){const _0x1a5f3e=a74_0x5cd9,_0x2b116f=new FormData();return _0x2b116f[_0x1a5f3e(0x6b)](_0x1a5f3e(0xb7),runtimeSkillPackageFile(_0x385e08)),_0x385e08[_0x1a5f3e(0xda)]?.[_0x1a5f3e(0x86)]()&&_0x2b116f['set'](_0x1a5f3e(0xde),_0x385e08[_0x1a5f3e(0xda)][_0x1a5f3e(0x86)]()),_0x2b116f['set'](_0x1a5f3e(0xec),_0x13ba17),_0x2b116f;}function runtimeSkillPackageFile(_0x52b792){const _0x28ef03=a74_0x5cd9;if(!_0x52b792[_0x28ef03(0x9f)])throw CliErrors[_0x28ef03(0xd3)]('Missing\x20Skill\x20package\x20payload.');const _0x6e7a36=Buffer[_0x28ef03(0xce)](_0x52b792['packageBase64'],_0x28ef03(0x6d)),_0x5229e5=new Blob([_0x6e7a36],{'type':'application/zip'}),_0x1535eb=(_0x52b792['skillCode']||_0x28ef03(0xdc))+_0x28ef03(0xac);if(typeof File!==_0x28ef03(0x9e))return new File([_0x5229e5],_0x1535eb,{'type':_0x28ef03(0xa5)});return _0x5229e5;}function normalizeSkillHubRuntimeListResponse(_0x4cec6a,_0x2c6aba,_0x13f4d0,_0x3967cd){const _0x35507b=a74_0x5cd9,_0x4ac225=Array[_0x35507b(0xd1)](_0x2c6aba)?_0x2c6aba:Array['isArray'](_0x2c6aba?.[_0x35507b(0x82)])?_0x2c6aba[_0x35507b(0x82)]:[],_0x1017ab=_0x3967cd?.[_0x35507b(0x86)](),_0x24976e=_0x4ac225[_0x35507b(0xc2)](_0x2ff1e2=>!_0x1017ab||_0x2ff1e2[_0x35507b(0xc3)]===_0x1017ab)[_0x35507b(0x9a)](skillHubRuntimeItemToRuntimeSkill)[_0x35507b(0xc2)](_0x4e9171=>Boolean(_0x4e9171)),_0x57e974=_0x24976e['filter'](_0x4415c3=>_0x4415c3[_0x35507b(0x99)]===_0x35507b(0xe9)),_0x53eabf=_0x24976e[_0x35507b(0xc2)](_0x59afc9=>_0x59afc9['scope']===_0x35507b(0xa6));return{'appCode':_0x4cec6a,'personal':_0x13f4d0===_0x35507b(0xa6)?[]:_0x57e974,'company':_0x13f4d0===_0x35507b(0xe9)?[]:_0x53eabf,'effective':buildEffectiveRuntimeSkills(_0x57e974,_0x53eabf,_0x13f4d0)};}function skillHubRuntimeItemToRuntimeSkill(_0x5c92ca){const _0x5ee4c9=a74_0x5cd9,_0x1e3826=_0x5c92ca['slug']?.[_0x5ee4c9(0x86)](),_0x4ade3b=skillHubVisibilityToScope(_0x5c92ca[_0x5ee4c9(0xec)]);if(!_0x1e3826||!_0x4ade3b)return undefined;return{'id':_0x5c92ca['id'],'appCode':_0x5c92ca[_0x5ee4c9(0xf2)],'skillCode':_0x1e3826,'skillName':_0x5c92ca[_0x5ee4c9(0xde)]??_0x1e3826,'description':_0x5c92ca[_0x5ee4c9(0xaa)],'scope':_0x4ade3b,'version':skillHubRuntimeItemVersion(_0x5c92ca),'status':_0x5c92ca['status']};}function skillHubRuntimeDetailToRuntimeSkill(_0x16148c){const _0x17bb02=a74_0x5cd9,_0x2a619c=_0x16148c[_0x17bb02(0xc3)]?.[_0x17bb02(0x86)]();if(!_0x2a619c)return undefined;return{'id':_0x16148c['id'],'appCode':_0x16148c[_0x17bb02(0xf2)],'skillCode':_0x2a619c,'skillName':_0x16148c[_0x17bb02(0xde)]??_0x2a619c,'description':_0x16148c[_0x17bb02(0xaa)],'scope':skillHubVisibilityToScope(_0x16148c['visibility'])??_0x16148c[_0x17bb02(0xec)]?.[_0x17bb02(0x88)](),'version':skillHubRuntimeItemVersion(_0x16148c),'status':_0x16148c[_0x17bb02(0x93)]};}function skillHubVisibilityToScope(_0xf09915){const _0x4815a3=a74_0x5cd9;if(_0xf09915==='PRIVATE')return _0x4815a3(0xe9);if(_0xf09915===_0x4815a3(0x84))return _0x4815a3(0xa6);return undefined;}function skillHubRuntimeItemVersion(_0x22d579){const _0x43d514=a74_0x5cd9;return _0x22d579[_0x43d514(0x91)]?.[_0x43d514(0xb0)]??_0x22d579[_0x43d514(0xc8)]?.[_0x43d514(0xb0)]??_0x22d579[_0x43d514(0xf9)]?.[_0x43d514(0xb0)];}function buildEffectiveRuntimeSkills(_0x193d68,_0x4aeb76,_0x556f11){const _0x365a32=a74_0x5cd9;if(_0x556f11===_0x365a32(0xe9))return _0x193d68;if(_0x556f11==='company')return _0x4aeb76;const _0x4a84b4=new Map();for(const _0x447f8a of _0x4aeb76){_0x4a84b4[_0x365a32(0x6b)](_0x447f8a['skillCode'],_0x447f8a);}for(const _0x2df3bc of _0x193d68){_0x4a84b4[_0x365a32(0x6b)](_0x2df3bc[_0x365a32(0xad)],_0x2df3bc);}return Array['from'](_0x4a84b4[_0x365a32(0x80)]());}function normalizeRuntimeSkillListResponse(_0x150bd3,_0xa7f1ac){const _0x166e6a=a74_0x5cd9;if(Array[_0x166e6a(0xd1)](_0xa7f1ac)){const _0x455827=_0xa7f1ac['filter'](_0x51ebb1=>_0x51ebb1[_0x166e6a(0x99)]==='personal'),_0x5ee87b=_0xa7f1ac['filter'](_0x2919fa=>_0x2919fa['scope']===_0x166e6a(0xa6));return{'appCode':_0x150bd3,'personal':_0x455827,'company':_0x5ee87b,'effective':[..._0x5ee87b,..._0x455827]};}return{'appCode':_0xa7f1ac?.['appCode']??_0x150bd3,'personal':Array[_0x166e6a(0xd1)](_0xa7f1ac?.[_0x166e6a(0xe9)])?_0xa7f1ac['personal']:[],'company':Array[_0x166e6a(0xd1)](_0xa7f1ac?.[_0x166e6a(0xa6)])?_0xa7f1ac['company']:[],'effective':Array[_0x166e6a(0xd1)](_0xa7f1ac?.[_0x166e6a(0xe5)])?_0xa7f1ac[_0x166e6a(0xe5)]:[]};}
|
|
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)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2e7c04,_0x2c9505){const _0x166679=a75_0x3709,_0x50d462=_0x2e7c04();while(!![]){try{const _0x2e4763=parseInt(_0x166679(0x183))/0x1*(-parseInt(_0x166679(0x182))/0x2)+parseInt(_0x166679(0x171))/0x3*(parseInt(_0x166679(0x184))/0x4)+-parseInt(_0x166679(0x17b))/0x5+parseInt(_0x166679(0x177))/0x6*(parseInt(_0x166679(0x173))/0x7)+parseInt(_0x166679(0x174))/0x8*(-parseInt(_0x166679(0x179))/0x9)+parseInt(_0x166679(0x17d))/0xa*(parseInt(_0x166679(0x17f))/0xb)+parseInt(_0x166679(0x176))/0xc*(parseInt(_0x166679(0x172))/0xd);if(_0x2e4763===_0x2c9505)break;else _0x50d462['push'](_0x50d462['shift']());}catch(_0xe414b2){_0x50d462['push'](_0x50d462['shift']());}}}(a75_0x20d1,0xda85d));function a75_0x3709(_0x5e5c19,_0x4f558c){_0x5e5c19=_0x5e5c19-0x171;const _0x20d18=a75_0x20d1();let _0x3709ae=_0x20d18[_0x5e5c19];return _0x3709ae;}import{listDatasets}from'../core/api-client.js';function a75_0x20d1(){const _0x280f28=['1412237KOBFez','36MeljNm','247983EjbsHk','14462695JMtGAD','6773431tOdaYZ','7378584xrhGKO','dbName','12wgQOol','6tCSzTE','get','9DeLxco','dbtableConfig','1313780jwyVcv','dbId','417680pdGuWS','db-','176IZERBD','find','map','2sWQYBF'];a75_0x20d1=function(){return _0x280f28;};return a75_0x20d1();}const cache=new Map();export async function listDatabases(_0x23c7a1){const _0x23fc0a=a75_0x3709;if(cache['has'](_0x23c7a1))return cache[_0x23fc0a(0x178)](_0x23c7a1);const _0x513739=await listDatasets(_0x23c7a1),_0x9e3f83=new Map();for(const _0x3a3c14 of _0x513739){const _0x373f01=_0x3a3c14[_0x23fc0a(0x17a)];_0x373f01?.[_0x23fc0a(0x17c)]!=null&&_0x9e3f83['set'](_0x373f01[_0x23fc0a(0x17c)],_0x373f01['dbName']??_0x23fc0a(0x17e)+_0x373f01[_0x23fc0a(0x17c)]);}const _0xa16749=[..._0x9e3f83['entries']()][_0x23fc0a(0x181)](([_0x4b9183,_0x1f16c5])=>({'dbId':_0x4b9183,'dbName':_0x1f16c5}));return cache['set'](_0x23c7a1,_0xa16749),_0xa16749;}export async function getDbName(_0x52d202,_0x49f021){const _0x6ef4c4=a75_0x3709;try{const _0x4f5f2d=await listDatabases(_0x52d202);return _0x4f5f2d[_0x6ef4c4(0x180)](_0x297c93=>_0x297c93[_0x6ef4c4(0x17c)]===_0x49f021)?.[_0x6ef4c4(0x175)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12621b,_0x452504){const _0x2236b5=a76_0x1859,_0x17052a=_0x12621b();while(!![]){try{const _0x4b8f8e=parseInt(_0x2236b5(0x1d5))/0x1*(-parseInt(_0x2236b5(0x1e2))/0x2)+-parseInt(_0x2236b5(0x1d2))/0x3+-parseInt(_0x2236b5(0x1cd))/0x4+parseInt(_0x2236b5(0x1d6))/0x5*(parseInt(_0x2236b5(0x1e7))/0x6)+-parseInt(_0x2236b5(0x1de))/0x7+-parseInt(_0x2236b5(0x1cf))/0x8*(-parseInt(_0x2236b5(0x1e8))/0x9)+parseInt(_0x2236b5(0x1df))/0xa*(parseInt(_0x2236b5(0x1f0))/0xb);if(_0x4b8f8e===_0x452504)break;else _0x17052a['push'](_0x17052a['shift']());}catch(_0x502dab){_0x17052a['push'](_0x17052a['shift']());}}}(a76_0x47a1,0xd3521));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(_0x2f8592){const _0x30d371=a76_0x1859;_client=createClient({'appCode':_0x2f8592['appCode'],'env':_0x2f8592[_0x30d371(0x1e0)],'authMode':_0x2f8592[_0x30d371(0x1d4)],..._0x2f8592[_0x30d371(0x1f1)]?{'accessKey':_0x2f8592['accessKey']}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x30d371(0x1e3)]}}});}function a76_0x47a1(){const _0x2073c4=['execute','field','3865892TZmOye','sql','4184jDUyMq','column','getOne','4554726GMVFPX','map','authMode','517snCqvY','235YcRyFW','delete','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27',']\x20must\x20be\x20an\x20object.','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','update','data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.','object','5910527lTdLIi','33752890hloIAU','env','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','3034RJPQbi','invokeSource','isArray','data\x20aggregate\x20--params.aggregate[','dataset_','167532aWBbrt','5013NcrHmz','bff','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','validation','function','aggregate','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','models','11vOBikn','accessKey'];a76_0x47a1=function(){return _0x2073c4;};return a76_0x47a1();}function ensureClient(){if(!_client)throw new Error('SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.');return _client;}function a76_0x1859(_0x2c8066,_0x5c3024){_0x2c8066=_0x2c8066-0x1cc;const _0x47a1b5=a76_0x47a1();let _0x1859e3=_0x47a1b5[_0x2c8066];return _0x1859e3;}function normalizeAggregateParams(_0x30dc0d){const _0xb45610=a76_0x1859,_0x26d55e=_0x30dc0d[_0xb45610(0x1ed)];if(_0x26d55e===undefined)return _0x30dc0d;if(!Array[_0xb45610(0x1e4)](_0x26d55e))throw CliErrors['validation'](_0xb45610(0x1dc));return{..._0x30dc0d,'aggregate':_0x26d55e[_0xb45610(0x1d3)]((_0x1e9d9a,_0x4d92f0)=>{const _0x5b3ab4=_0xb45610;if(!_0x1e9d9a||typeof _0x1e9d9a!==_0x5b3ab4(0x1dd)||Array[_0x5b3ab4(0x1e4)](_0x1e9d9a))throw CliErrors[_0x5b3ab4(0x1eb)](_0x5b3ab4(0x1e5)+_0x4d92f0+_0x5b3ab4(0x1d9));const _0x4fef78=_0x1e9d9a[_0x5b3ab4(0x1d0)]??_0x1e9d9a[_0x5b3ab4(0x1cc)];if(typeof _0x4fef78!=='string'||_0x4fef78['trim']()==='')throw CliErrors['validation'](_0x5b3ab4(0x1e5)+_0x4d92f0+']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.');const _0x4e73ed={..._0x1e9d9a,'column':_0x4fef78};return delete _0x4e73ed[_0x5b3ab4(0x1cc)],_0x4e73ed;})};}export async function executeData(_0x3efcd7,_0x33b11b,_0x9a81c8){const _0x353007=a76_0x1859,_0x4332d5=ensureClient(),_0x5cabc4=_0x353007(0x1e6)+_0x3efcd7,_0x559bba=_0x4332d5[_0x353007(0x1ef)][_0x5cabc4];if(!_0x559bba||typeof _0x559bba[_0x33b11b]!==_0x353007(0x1ec))throw new Error(_0x353007(0x1da)+_0x33b11b+'\x22.\x20'+_0x353007(0x1e1));if(_0x33b11b==='batchCreate')return _0x559bba['batchCreate'](parseBatchCreateItemsFromParams(_0x9a81c8));const _0x484c00=_0x9a81c8!==undefined&&_0x9a81c8!==null&&!Array[_0x353007(0x1e4)](_0x9a81c8)?_0x9a81c8:{};switch(_0x33b11b){case _0x353007(0x1d1):{const _0x5c99e9=_0x484c00['id'];if(_0x5c99e9===undefined||_0x5c99e9===null)throw new Error(_0x353007(0x1d8));return _0x559bba['getOne'](_0x5c99e9);}case _0x353007(0x1db):{const {id:_0x4d7a41,..._0xa36140}=_0x484c00;if(_0x4d7a41===undefined||_0x4d7a41===null)throw new Error(_0x353007(0x1ea));return _0x559bba[_0x353007(0x1db)](_0x4d7a41,_0xa36140);}case _0x353007(0x1d7):{const _0x57a135=_0x484c00['id'];if(_0x57a135===undefined||_0x57a135===null)throw new Error(_0x353007(0x1ee));return _0x559bba['delete'](_0x57a135);}case'aggregate':return _0x559bba[_0x353007(0x1ed)](normalizeAggregateParams(_0x484c00));default:return _0x559bba[_0x33b11b](_0x484c00);}}export async function executeSdkSql(_0x314a86,_0x200459){const _0x175612=a76_0x1859,_0xb467a9=ensureClient();return _0xb467a9[_0x175612(0x1ce)][_0x175612(0x1f2)]({'sqlCode':_0x314a86,'params':_0x200459});}export async function executeSdkBff(_0x5b7c40,_0x307083){const _0x2843ae=a76_0x1859,_0x23ec2c=ensureClient();return _0x23ec2c[_0x2843ae(0x1e9)]['execute']({'scriptName':_0x5b7c40,'params':_0x307083});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a77_0x5045ed=a77_0x36c1;function a77_0x36c1(_0x309b33,_0x10ccb0){_0x309b33=_0x309b33-0x79;const _0x4c6381=a77_0x4c63();let _0x36c178=_0x4c6381[_0x309b33];return _0x36c178;}(function(_0x47d2d6,_0x839eb1){const _0x210452=a77_0x36c1,_0x126cce=_0x47d2d6();while(!![]){try{const _0x5daca9=parseInt(_0x210452(0x7b))/0x1+-parseInt(_0x210452(0x7e))/0x2*(-parseInt(_0x210452(0x81))/0x3)+-parseInt(_0x210452(0x87))/0x4*(-parseInt(_0x210452(0x7c))/0x5)+parseInt(_0x210452(0x86))/0x6+-parseInt(_0x210452(0x82))/0x7*(-parseInt(_0x210452(0x7a))/0x8)+parseInt(_0x210452(0x85))/0x9*(parseInt(_0x210452(0x83))/0xa)+-parseInt(_0x210452(0x79))/0xb;if(_0x5daca9===_0x839eb1)break;else _0x126cce['push'](_0x126cce['shift']());}catch(_0xcb8af6){_0x126cce['push'](_0x126cce['shift']());}}}(a77_0x4c63,0xcde22));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};function a77_0x4c63(){const _0xa4fd1e=['newConfigFileName','Set\x20appcode\x20via\x20--appcode\x20or\x20','133941vPzHoi','9597zDKrWe','193700WLmVRi','Configure\x20accessKey\x20in\x20','297mkAnoy','472482aBTgap','978920dSmNCF','\x20auth\x20login`.','\x20or\x20run\x20`','20193349eFAcSW','1432AVlRPb','511879vOsstT','10LeXitn','\x20file.','32zWhAwR'];a77_0x4c63=function(){return _0xa4fd1e;};return a77_0x4c63();}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a77_0x5045ed(0x84)+PRODUCT_CONFIG['newConfigFileName']+a77_0x5045ed(0x89)+CLI_BIN_NAME+a77_0x5045ed(0x88),'configMissingHint':a77_0x5045ed(0x80)+PRODUCT_CONFIG[a77_0x5045ed(0x7f)]+'.','notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20'+PRODUCT_CONFIG['newConfigFileName']+a77_0x5045ed(0x7d)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x45bd10,_0x293235){var _0x297e2c=a78_0x3950,_0x554b25=_0x45bd10();while(!![]){try{var _0x4343dd=parseInt(_0x297e2c(0xf0))/0x1*(parseInt(_0x297e2c(0xed))/0x2)+parseInt(_0x297e2c(0xec))/0x3*(-parseInt(_0x297e2c(0xeb))/0x4)+parseInt(_0x297e2c(0xf2))/0x5*(-parseInt(_0x297e2c(0xf1))/0x6)+-parseInt(_0x297e2c(0xef))/0x7+-parseInt(_0x297e2c(0xf4))/0x8*(parseInt(_0x297e2c(0xee))/0x9)+parseInt(_0x297e2c(0xf3))/0xa*(parseInt(_0x297e2c(0xf5))/0xb)+parseInt(_0x297e2c(0xea))/0xc;if(_0x4343dd===_0x293235)break;else _0x554b25['push'](_0x554b25['shift']());}catch(_0x3cc6ae){_0x554b25['push'](_0x554b25['shift']());}}}(a78_0x7833,0xe1a2b));function a78_0x3950(_0x4e240e,_0x5b2ae6){_0x4e240e=_0x4e240e-0xea;var _0x7833ea=a78_0x7833();var _0x39505a=_0x7833ea[_0x4e240e];return _0x39505a;}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a78_0x355c31}from'@lovrabet/cli-framework';function a78_0x7833(){var _0x179a60=['7592gwnLMf','11ADgQLe','26448024aKkLlj','8vgGOKT','2295624EEbgzk','903534kvqhKb','8298GSMMfa','1854853wtVrOk','1YuVlii','592494FttBvN','20gUkybO','13338030bUtAao'];a78_0x7833=function(){return _0x179a60;};return a78_0x7833();}export function buildAllFlags(_0x405cbe){return a78_0x355c31(_0x405cbe,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x402043,_0x16642a){const _0x588d16=a79_0x12e5,_0x3b0618=_0x402043();while(!![]){try{const _0x11b7b9=-parseInt(_0x588d16(0x68))/0x1+-parseInt(_0x588d16(0x6e))/0x2+parseInt(_0x588d16(0x70))/0x3+parseInt(_0x588d16(0x6c))/0x4*(-parseInt(_0x588d16(0x6d))/0x5)+-parseInt(_0x588d16(0x6f))/0x6+parseInt(_0x588d16(0x71))/0x7*(-parseInt(_0x588d16(0x69))/0x8)+parseInt(_0x588d16(0x6a))/0x9;if(_0x11b7b9===_0x16642a)break;else _0x3b0618['push'](_0x3b0618['shift']());}catch(_0x410667){_0x3b0618['push'](_0x3b0618['shift']());}}}(a79_0x4eb8,0x54ffe));function a79_0x4eb8(){const _0x59da47=['11599ILuQuP','332207CNpQfB','112NZlkuW','10888488uVUrJs','description','1819580sdHhix','5DFcfHA','39092JtxnAl','3703626nYcSOW','1756329sUCTMv'];a79_0x4eb8=function(){return _0x59da47;};return a79_0x4eb8();}function a79_0x12e5(_0x32a45a,_0x3435d4){_0x32a45a=_0x32a45a-0x68;const _0x4eb810=a79_0x4eb8();let _0x12e5fc=_0x4eb810[_0x32a45a];return _0x12e5fc;}export function dryRun(_0x5cbecc,_0x592b6a){const _0x2935ac={'method':_0x5cbecc,'url':_0x592b6a},_0x23a16f={'body'(_0x19dba6){return _0x2935ac['body']=_0x19dba6,_0x23a16f;},'description'(_0x2bb8c0){const _0x28ab1e=a79_0x12e5;return _0x2935ac[_0x28ab1e(0x6b)]=_0x2bb8c0,_0x23a16f;},'build'(){return{..._0x2935ac};}};return _0x23a16f;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a80_0x4eef41=a80_0x1ae8;(function(_0x57648f,_0x526519){const _0x5a243a=a80_0x1ae8,_0x5c6e37=_0x57648f();while(!![]){try{const _0x55862e=-parseInt(_0x5a243a(0x7b))/0x1+parseInt(_0x5a243a(0x7d))/0x2+parseInt(_0x5a243a(0x7e))/0x3*(parseInt(_0x5a243a(0x78))/0x4)+-parseInt(_0x5a243a(0x7c))/0x5*(-parseInt(_0x5a243a(0x7a))/0x6)+parseInt(_0x5a243a(0x79))/0x7+parseInt(_0x5a243a(0x81))/0x8*(parseInt(_0x5a243a(0x7f))/0x9)+-parseInt(_0x5a243a(0x80))/0xa;if(_0x55862e===_0x526519)break;else _0x5c6e37['push'](_0x5c6e37['shift']());}catch(_0x21d9fb){_0x5c6e37['push'](_0x5c6e37['shift']());}}}(a80_0x4b8d,0x5836c));function a80_0x1ae8(_0x4eea33,_0x4be98c){_0x4eea33=_0x4eea33-0x77;const _0x4b8d61=a80_0x4b8d();let _0x1ae800=_0x4b8d61[_0x4eea33];return _0x1ae800;}function a80_0x4b8d(){const _0x19a095=['783890zteHhW','495sgXmhJ','3069fwIPsV','9756840nAFTwf','15256VHUWQS','parseFlags','2936wqrSuH','1337588bENkLC','19794WTVHzX','268142rMfjxC','380cmbZiH'];a80_0x4b8d=function(){return _0x19a095;};return a80_0x4b8d();}import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a80_0x4eef41(0x77)];export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x118ba8,_0x5745bd){const _0x3eb1ff=a81_0x4856,_0x5d4d4f=_0x118ba8();while(!![]){try{const _0x4dc3b9=parseInt(_0x3eb1ff(0xc5))/0x1+parseInt(_0x3eb1ff(0xc6))/0x2+parseInt(_0x3eb1ff(0xc2))/0x3+parseInt(_0x3eb1ff(0xbd))/0x4+-parseInt(_0x3eb1ff(0xc4))/0x5+parseInt(_0x3eb1ff(0xb7))/0x6*(parseInt(_0x3eb1ff(0xbe))/0x7)+-parseInt(_0x3eb1ff(0xbc))/0x8;if(_0x4dc3b9===_0x5745bd)break;else _0x5d4d4f['push'](_0x5d4d4f['shift']());}catch(_0x5ca3de){_0x5d4d4f['push'](_0x5d4d4f['shift']());}}}(a81_0x8f0f,0xcf76d));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{getDynamicServiceDefinitions,getDynamicServiceEntry,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a81_0x8f0f(){const _0x111473=['generateCommandHelp','generateServiceHelp','24WIdVrQ','Requires\x20appcode\x20(set\x20via\x20','has','newConfigFileName','filter','19219720NLmbZG','3446896wKEmDA','672658pZVEIz','generateFullHelp','map','\x20or\x20--appcode).','3126549KeIeID','service','1362085nFbknU','651826ZAOYMV','1169092uXCsSn'];a81_0x8f0f=function(){return _0x111473;};return a81_0x8f0f();}function createGenerators(){const _0x5908c2=a81_0x4856;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(serviceRegistry,safeListDynamicServiceEntries()),'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x5908c2(0xb8)+PRODUCT_CONFIG[_0x5908c2(0xba)]+_0x5908c2(0xc1)});}export function generateCommandHelp(_0x553e43){const _0x4488b8=a81_0x4856;return createGenerators()[_0x4488b8(0xc7)](_0x553e43);}export function generateServiceHelp(_0x2abd54){const _0x149cc9=a81_0x4856;return createGenerators()[_0x149cc9(0xb6)](_0x2abd54);}export function generateFullHelp(){const _0x4d6aec=a81_0x4856;return createGenerators()[_0x4d6aec(0xbf)]();}function getAnyServiceEntry(_0x44fd75){const _0xabdbf6=getServiceEntry(_0x44fd75);if(_0xabdbf6)return _0xabdbf6;try{return getDynamicServiceEntry(_0x44fd75);}catch{return undefined;}}function a81_0x4856(_0x491125,_0x44f857){_0x491125=_0x491125-0xb6;const _0x8f0fea=a81_0x8f0f();let _0x4856a3=_0x8f0fea[_0x491125];return _0x4856a3;}function getAnyServiceDefinitions(_0x944b93){const _0x1a1930=serviceGroups['get'](_0x944b93);if(_0x1a1930)return _0x1a1930;try{return getDynamicServiceDefinitions(_0x944b93);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x31721c=a81_0x4856,_0x47cd8e=new Set(serviceRegistry[_0x31721c(0xc0)](_0x3c651a=>_0x3c651a[_0x31721c(0xc3)]));try{return listDynamicServiceEntries()[_0x31721c(0xbb)](_0x3920fc=>!_0x47cd8e[_0x31721c(0xb9)](_0x3920fc['service']));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a82_0x5079(_0x50cfcb,_0x2ccd0c){_0x50cfcb=_0x50cfcb-0x10c;var _0x266a8e=a82_0x266a();var _0x50797a=_0x266a8e[_0x50cfcb];return _0x50797a;}(function(_0x386f2c,_0x4f7174){var _0x2783a1=a82_0x5079,_0x30060f=_0x386f2c();while(!![]){try{var _0x185f73=-parseInt(_0x2783a1(0x110))/0x1*(parseInt(_0x2783a1(0x10e))/0x2)+parseInt(_0x2783a1(0x112))/0x3+parseInt(_0x2783a1(0x114))/0x4*(-parseInt(_0x2783a1(0x10d))/0x5)+-parseInt(_0x2783a1(0x10c))/0x6+parseInt(_0x2783a1(0x10f))/0x7*(parseInt(_0x2783a1(0x113))/0x8)+-parseInt(_0x2783a1(0x111))/0x9+parseInt(_0x2783a1(0x115))/0xa;if(_0x185f73===_0x4f7174)break;else _0x30060f['push'](_0x30060f['shift']());}catch(_0x4365f9){_0x30060f['push'](_0x30060f['shift']());}}}(a82_0x266a,0xc7cd5));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{dryRun}from'../framework/dryrun.js';export{riskLevelOrder,isValidFormat}from'../framework/types.js';function a82_0x266a(){var _0x4e966c=['1442tOLRoY','70812DdsLsv','7331517FTEiOZ','4486599scvSym','424FbzUVc','242660UWTQXk','16450310zUAuKI','68106YqbfvW','25gjaYkJ','34WFtGHP'];a82_0x266a=function(){return _0x4e966c;};return a82_0x266a();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x572d57,_0x1310e0){const _0x92b502=a83_0xfb0b,_0x5914e8=_0x572d57();while(!![]){try{const _0x29266c=-parseInt(_0x92b502(0x1d1))/0x1*(-parseInt(_0x92b502(0x1d4))/0x2)+parseInt(_0x92b502(0x1cc))/0x3+-parseInt(_0x92b502(0x1d3))/0x4*(parseInt(_0x92b502(0x1c7))/0x5)+-parseInt(_0x92b502(0x1ca))/0x6*(-parseInt(_0x92b502(0x1c8))/0x7)+-parseInt(_0x92b502(0x1cf))/0x8+-parseInt(_0x92b502(0x1c6))/0x9*(parseInt(_0x92b502(0x1d5))/0xa)+parseInt(_0x92b502(0x1d2))/0xb;if(_0x29266c===_0x1310e0)break;else _0x5914e8['push'](_0x5914e8['shift']());}catch(_0x273ff2){_0x5914e8['push'](_0x5914e8['shift']());}}}(a83_0x12fd,0xce261));function a83_0xfb0b(_0x364146,_0x2823fa){_0x364146=_0x364146-0x1c6;const _0x12fd0f=a83_0x12fd();let _0xfb0b06=_0x12fd0f[_0x364146];return _0xfb0b06;}import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x37cb76,_0x58cfc3){const _0x5cc9fd=a83_0xfb0b,_0x1504ce=_0x37cb76[_0x5cc9fd(0x1d0)],{_notice:_0x1ad3d2,..._0x29e87f}=_0x37cb76;void _0x1ad3d2,baseFormatOutput(_0x29e87f,_0x58cfc3),_0x58cfc3[_0x5cc9fd(0x1cb)]==='pretty'&&printPrettyNotice(_0x1504ce);}function printPrettyNotice(_0x431aa7){const _0x14aac0=a83_0xfb0b;if(!_0x431aa7?.['update'])return;console['error'](_0x431aa7[_0x14aac0(0x1cd)][_0x14aac0(0x1c9)]+'\x20('+_0x431aa7[_0x14aac0(0x1cd)][_0x14aac0(0x1ce)]+')');}function a83_0x12fd(){const _0x2ecf33=['80mxvWvi','547011ODkXHD','2245xSWuMg','91189kfwpOF','message','186PYIETg','format','1762962NwAbhC','update','url','2291976yEHUbM','_notice','134XNrzlI','3714898oMsqDC','28QVWcsG','4344HBNtMg'];a83_0x12fd=function(){return _0x2ecf33;};return a83_0x12fd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a84_0x5602(_0x428ef6,_0x55ea2d){_0x428ef6=_0x428ef6-0x1b6;const _0x3bca25=a84_0x3bca();let _0x56022c=_0x3bca25[_0x428ef6];return _0x56022c;}(function(_0x2a4e52,_0x20408a){const _0x449f2a=a84_0x5602,_0x1c9f9c=_0x2a4e52();while(!![]){try{const _0x5c4586=parseInt(_0x449f2a(0x1be))/0x1*(parseInt(_0x449f2a(0x1d9))/0x2)+parseInt(_0x449f2a(0x1cd))/0x3*(-parseInt(_0x449f2a(0x1da))/0x4)+parseInt(_0x449f2a(0x1ce))/0x5*(parseInt(_0x449f2a(0x1d8))/0x6)+parseInt(_0x449f2a(0x1c1))/0x7+-parseInt(_0x449f2a(0x1d3))/0x8*(-parseInt(_0x449f2a(0x1c4))/0x9)+-parseInt(_0x449f2a(0x1c3))/0xa+-parseInt(_0x449f2a(0x1d2))/0xb*(parseInt(_0x449f2a(0x1c5))/0xc);if(_0x5c4586===_0x20408a)break;else _0x1c9f9c['push'](_0x1c9f9c['shift']());}catch(_0x53310b){_0x1c9f9c['push'](_0x1c9f9c['shift']());}}}(a84_0x3bca,0x2dc46));function toKebab(_0xc76b40){const _0x2f1233=a84_0x5602;return _0xc76b40['replace'](/_/g,'-')[_0x2f1233(0x1ca)](/-([A-Z]+)/g,(_0x52b5d6,_0x37e538)=>'-'+_0x37e538[_0x2f1233(0x1d4)]())[_0x2f1233(0x1ca)](/([a-z0-9])([A-Z])/g,(_0x2c15e4,_0x50724b,_0x26c57c)=>_0x50724b+'-'+_0x26c57c)[_0x2f1233(0x1d4)]();}function a84_0x3bca(){const _0x1228d=['9wGKwns','12dsbtST','slice','app','boolean','dry-run','replace','indexOf','set','109932ljSbbC','215RUnxUc','keys','type','nonInteractive','3826361HSjxot','279152ZiJhLI','toLowerCase','add','dryRun','global','11580FTBNVJ','6502HyPusb','4QtjMjZ','length','push','entries','corrected','appcode','help','non-interactive','original','string','sticky','name','111bjrjhQ','has','number','1555967TaRWOA','env','1290690XaWebc'];a84_0x3bca=function(){return _0x1228d;};return a84_0x3bca();}function buildKnownFlags(_0x3d6915){const _0x5a80d1=a84_0x5602,_0x17bdea=new Set();for(const _0x34e44c of _0x3d6915){_0x17bdea[_0x5a80d1(0x1d5)](_0x34e44c[_0x5a80d1(0x1bd)]),_0x17bdea[_0x5a80d1(0x1d5)](toCamelCase(_0x34e44c[_0x5a80d1(0x1bd)]));}for(const _0x2b3459 of[_0x5a80d1(0x1c9),_0x5a80d1(0x1d6),'yes','format']){_0x17bdea['add'](_0x2b3459);}for(const _0x18ee2e of[_0x5a80d1(0x1b8),_0x5a80d1(0x1c2),_0x5a80d1(0x1b7),_0x5a80d1(0x1c7),_0x5a80d1(0x1d1),_0x5a80d1(0x1b9),'ci',_0x5a80d1(0x1d7),'version']){_0x17bdea['add'](_0x18ee2e);}return _0x17bdea;}function buildFlagTypeMap(_0x539e7b){const _0x5f16ef=a84_0x5602,_0x343490=new Map();for(const _0x10391c of _0x539e7b){_0x343490[_0x5f16ef(0x1cc)](_0x10391c['name'],_0x10391c[_0x5f16ef(0x1d0)]),_0x343490[_0x5f16ef(0x1cc)](toCamelCase(_0x10391c[_0x5f16ef(0x1bd)]),_0x10391c[_0x5f16ef(0x1d0)]);}return _0x343490;}function toCamelCase(_0x94288d){return _0x94288d['replace'](/-([a-z])/g,(_0x2ec19f,_0x3be6ad)=>_0x3be6ad['toUpperCase']());}function aliasHandler(_0x4c5fc6,_0x444167){const _0x4bc8fd=a84_0x5602,_0x64d5f5=[];for(const _0x409329 of Object[_0x4bc8fd(0x1cf)](_0x4c5fc6)){if(_0x444167[_0x4bc8fd(0x1bf)](_0x409329))continue;const _0x263cb6=toKebab(_0x409329);_0x263cb6!==_0x409329&&_0x444167['has'](_0x263cb6)&&_0x64d5f5[_0x4bc8fd(0x1dc)]({'original':_0x409329,'corrected':_0x263cb6,'handler':'alias'});}return _0x64d5f5;}function stickyHandler(_0x2c6b52,_0x7f234e,_0x221b40){const _0x3ec3df=a84_0x5602,_0x3c5ae7=[];for(const [_0x565117,_0x51213c]of Object[_0x3ec3df(0x1dd)](_0x2c6b52)){if(_0x51213c!==!![])continue;for(let _0x5ee015=_0x565117['length']-0x1;_0x5ee015>0x0;_0x5ee015--){const _0x55cb40=_0x565117[_0x3ec3df(0x1c6)](0x0,_0x5ee015),_0x31c25f=_0x565117[_0x3ec3df(0x1c6)](_0x5ee015),_0x597c6e=toKebab(_0x55cb40),_0x2e7e03=toCamelCase(_0x55cb40),_0x254b82=_0x7f234e['has'](_0x55cb40)?_0x55cb40:_0x7f234e[_0x3ec3df(0x1bf)](_0x597c6e)?_0x597c6e:_0x7f234e[_0x3ec3df(0x1bf)](_0x2e7e03)?_0x2e7e03:null;if(!_0x254b82)continue;const _0xb755e=_0x221b40['get'](_0x254b82)??_0x3ec3df(0x1bb);let _0x14857d;if(_0xb755e===_0x3ec3df(0x1c0)){const _0x1bdb54=Number(_0x31c25f);if(isNaN(_0x1bdb54)||_0x31c25f==='')continue;_0x14857d=_0x1bdb54;}else{if(_0xb755e===_0x3ec3df(0x1c8))continue;else{if(_0x31c25f==='')continue;_0x14857d=_0x31c25f;}}_0x3c5ae7[_0x3ec3df(0x1dc)]({'original':_0x565117,'corrected':_0x254b82+'='+_0x14857d,'handler':_0x3ec3df(0x1bc)});break;}}return _0x3c5ae7;}export function correctFlags(_0x2303c6,_0x46176e){const _0x350e38=a84_0x5602,_0x48d1dd=buildKnownFlags(_0x46176e),_0x25394b=buildFlagTypeMap(_0x46176e),_0x4ad988=aliasHandler(_0x2303c6,_0x48d1dd),_0x445d61=stickyHandler(_0x2303c6,_0x48d1dd,_0x25394b),_0x543bdb=[..._0x4ad988,..._0x445d61];if(_0x543bdb[_0x350e38(0x1db)]===0x0)return{'flags':_0x2303c6,'corrections':[]};const _0x2d5cef={..._0x2303c6},_0x3d1214=new Set();for(const _0x4b6eff of _0x4ad988){_0x2d5cef[_0x4b6eff[_0x350e38(0x1b6)]]=_0x2303c6[_0x4b6eff[_0x350e38(0x1ba)]],_0x3d1214['add'](_0x4b6eff[_0x350e38(0x1ba)]);}for(const _0x6b6eb of _0x445d61){const _0x27efe8=_0x6b6eb[_0x350e38(0x1b6)][_0x350e38(0x1cb)]('='),_0x226524=_0x6b6eb[_0x350e38(0x1b6)]['slice'](0x0,_0x27efe8),_0x9e099e=_0x6b6eb[_0x350e38(0x1b6)][_0x350e38(0x1c6)](_0x27efe8+0x1),_0xff35dc=_0x25394b['get'](_0x226524)??'string';_0xff35dc===_0x350e38(0x1c0)?_0x2d5cef[_0x226524]=Number(_0x9e099e):_0x2d5cef[_0x226524]=_0x9e099e,_0x3d1214[_0x350e38(0x1d5)](_0x6b6eb['original']);}for(const _0x136873 of _0x3d1214){delete _0x2d5cef[_0x136873];}return{'flags':_0x2d5cef,'corrections':_0x543bdb};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a85_0x201e(){var _0x4b4239=['6184RbsNNC','12831890hceGSL','8101572zEDDZF','1770661nSmGtV','19107VtypeO','87455IkOuWw','388ZwCVtn','11XcwcZp','7184555VkbqMX','64caCoAO','146271uaBssD'];a85_0x201e=function(){return _0x4b4239;};return a85_0x201e();}(function(_0x5f35cc,_0x1276fb){var _0x1aa453=a85_0x6d24,_0x1e3ccd=_0x5f35cc();while(!![]){try{var _0x1fa321=parseInt(_0x1aa453(0x11e))/0x1+parseInt(_0x1aa453(0x124))/0x2*(parseInt(_0x1aa453(0x125))/0x3)+-parseInt(_0x1aa453(0x121))/0x4*(parseInt(_0x1aa453(0x120))/0x5)+-parseInt(_0x1aa453(0x11d))/0x6+parseInt(_0x1aa453(0x123))/0x7+-parseInt(_0x1aa453(0x126))/0x8*(parseInt(_0x1aa453(0x11f))/0x9)+-parseInt(_0x1aa453(0x127))/0xa*(-parseInt(_0x1aa453(0x122))/0xb);if(_0x1fa321===_0x1276fb)break;else _0x1e3ccd['push'](_0x1e3ccd['shift']());}catch(_0x492c14){_0x1e3ccd['push'](_0x1e3ccd['shift']());}}}(a85_0x201e,0xe8897));function a85_0x6d24(_0xc0f03e,_0x23502e){_0xc0f03e=_0xc0f03e-0x11d;var _0x201e4f=a85_0x201e();var _0x6d2463=_0x201e4f[_0xc0f03e];return _0x6d2463;}export{extractList,extractPaging}from'@lovrabet/cli-framework';
|