@lovrabet/lovrabet-cli 2.1.16-beta.2 → 2.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/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/rate-limit.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/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a71_0x54cf(_0x229f01,_0x91f149){_0x229f01=_0x229f01-0x97;const _0x31fd4b=a71_0x31fd();let _0x54cf5d=_0x31fd4b[_0x229f01];return _0x54cf5d;}const a71_0x49782a=a71_0x54cf;(function(_0xde041,_0x11f9b5){const _0x382a11=a71_0x54cf,_0x5ed676=_0xde041();while(!![]){try{const _0x315ead=-parseInt(_0x382a11(0xa7))/0x1*(-parseInt(_0x382a11(0xa1))/0x2)+parseInt(_0x382a11(0xa5))/0x3*(-parseInt(_0x382a11(0x98))/0x4)+-parseInt(_0x382a11(0xaf))/0x5*(parseInt(_0x382a11(0xb0))/0x6)+parseInt(_0x382a11(0xa2))/0x7*(parseInt(_0x382a11(0x9b))/0x8)+-parseInt(_0x382a11(0xa3))/0x9*(parseInt(_0x382a11(0xa6))/0xa)+parseInt(_0x382a11(0xa4))/0xb*(parseInt(_0x382a11(0xad))/0xc)+-parseInt(_0x382a11(0x9f))/0xd*(-parseInt(_0x382a11(0x9d))/0xe);if(_0x315ead===_0x11f9b5)break;else _0x5ed676['push'](_0x5ed676['shift']());}catch(_0x1b683b){_0x5ed676['push'](_0x5ed676['shift']());}}}(a71_0x31fd,0xaef79));export const PRODUCT_CONFIG={'cliBinName':a71_0x49782a(0x9a),'cliDisplayName':'Lovrabet\x20Runtime\x20CLI','npmPackageName':'@lovrabet/lovrabet-cli','skillSource':'lovrabet/lovrabet-cli','npmRegistryBaseUrl':a71_0x49782a(0x97),'envPrefix':'LOVRABET','legacyEnvPrefixes':[a71_0x49782a(0xb4)],'configFileNames':[a71_0x49782a(0xae),'.lovrabetrc'],'newConfigFileName':a71_0x49782a(0xae),'homeDirName':a71_0x49782a(0x99),'logFileName':a71_0x49782a(0xaa),'invokeSource':'cli:lovrabet-runtime','userCenterDisplayName':a71_0x49782a(0xb2),'skipNpxSkillsEnvSuffix':a71_0x49782a(0xb1),'domains':{'production':{'user':a71_0x49782a(0xa9),'api':a71_0x49782a(0xa8),'runtime':a71_0x49782a(0xab),'skillhub':'https://skills.lovrabet.com'},'nonProduction':{'user':'https://user-daily.lovrabet.com','api':a71_0x49782a(0xa0),'runtime':a71_0x49782a(0xb3),'skillhub':'https://skills-daily.lovrabet.com'}},'accessKeyCreatePath':a71_0x49782a(0xac)};export function productEnvName(_0x6a45b1){const _0xfa8057=a71_0x49782a;return PRODUCT_CONFIG[_0xfa8057(0x9e)]+'_'+_0x6a45b1;}export function productEnvNames(_0x1d610c){const _0x21db4f=a71_0x49782a;return[productEnvName(_0x1d610c),...PRODUCT_CONFIG[_0x21db4f(0x9c)]['map'](_0x661fa9=>_0x661fa9+'_'+_0x1d610c)];}export function productEnv(_0x140a58){for(const _0x10a2ba of productEnvNames(_0x140a58)){const _0x2158fe=process.env[_0x10a2ba];if(_0x2158fe!==undefined)return _0x2158fe;}return undefined;}function a71_0x31fd(){const _0x19a163=['legacyEnvPrefixes','42cHYlEP','envPrefix','2415439ixcnES','https://daily-api.lovrabet.com','18484RPbrle','574nnnQDq','1413mjyVyP','4079867SgKCyY','640149IucJoX','6010QFaglB','93MtoabR','https://api.lovrabet.com','https://user.lovrabet.com','.lovrabet-runtime.log','https://runtime.lovrabet.com','/user/ak','12jzbQkx','.lovrabet.json','4290080czSZzi','6rbkoTt','SKIP_NPX_SKILLS','Lovrabet\x20User\x20Center','https://daily-runtime.lovrabet.com','RABETBASE','https://registry.npmjs.org','8XBLQNV','.lovrabet','lovrabet','30048sIqPvN'];a71_0x31fd=function(){return _0x19a163;};return a71_0x31fd();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x1f7dc4=a72_0x3729;(function(_0x1f58f5,_0x51e78d){const _0x9e0866=a72_0x3729,_0x4ad664=_0x1f58f5();while(!![]){try{const _0x2449ca=-parseInt(_0x9e0866(0x1b4))/0x1*(-parseInt(_0x9e0866(0x1b6))/0x2)+-parseInt(_0x9e0866(0x1b5))/0x3*(-parseInt(_0x9e0866(0x1be))/0x4)+-parseInt(_0x9e0866(0x1bf))/0x5*(parseInt(_0x9e0866(0x1c0))/0x6)+-parseInt(_0x9e0866(0x1b9))/0x7+-parseInt(_0x9e0866(0x1b7))/0x8+-parseInt(_0x9e0866(0x1bc))/0x9*(parseInt(_0x9e0866(0x1ba))/0xa)+parseInt(_0x9e0866(0x1bb))/0xb;if(_0x2449ca===_0x51e78d)break;else _0x4ad664['push'](_0x4ad664['shift']());}catch(_0x58e64e){_0x4ad664['push'](_0x4ad664['shift']());}}}(a72_0x46b0,0x626ee));function a72_0x3729(_0x3a33f1,_0x5a8238){_0x3a33f1=_0x3a33f1-0x1b4;const _0x46b070=a72_0x46b0();let _0x372972=_0x46b070[_0x3a33f1];return _0x372972;}export const RISK_LEVEL_VALUES=[a72_0x1f7dc4(0x1b8),a72_0x1f7dc4(0x1bd),'high-risk-write'];function a72_0x46b0(){const _0x78e4de=['385020wIJDtq','1720884IomhPG','81lFNtvJ','write','140ZpdyDu','91295ONKByO','150MemVEl','3631uevaSS','59922eIKxeU','406AqIfTW','2684288EKqfMW','read','356412YlzZkf'];a72_0x46b0=function(){return _0x78e4de;};return a72_0x46b0();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a73_0x1fe6(){const _0x3ac930=['accessKeyCreatePath','82OrkiwI','458649tDlReH','16tiecrq','210JLycAM','3734190dRwTEm','62350JqLpQQ','user','101000MkzEfb','374094LvOitr','13685570VnYcSp','production','5878zGdntD'];a73_0x1fe6=function(){return _0x3ac930;};return a73_0x1fe6();}const a73_0x3d2623=a73_0x21e3;function a73_0x21e3(_0xf47e51,_0xce72ed){_0xf47e51=_0xf47e51-0x172;const _0x1fe6f1=a73_0x1fe6();let _0x21e317=_0x1fe6f1[_0xf47e51];return _0x21e317;}(function(_0x3e3084,_0x5ea25b){const _0x543934=a73_0x21e3,_0x4316ba=_0x3e3084();while(!![]){try{const _0x18a6d0=parseInt(_0x543934(0x179))/0x1*(-parseInt(_0x543934(0x17b))/0x2)+-parseInt(_0x543934(0x17c))/0x3+parseInt(_0x543934(0x175))/0x4+-parseInt(_0x543934(0x173))/0x5*(parseInt(_0x543934(0x17e))/0x6)+-parseInt(_0x543934(0x176))/0x7*(-parseInt(_0x543934(0x17d))/0x8)+-parseInt(_0x543934(0x172))/0x9+parseInt(_0x543934(0x177))/0xa;if(_0x18a6d0===_0x5ea25b)break;else _0x4316ba['push'](_0x4316ba['shift']());}catch(_0x1c3b89){_0x4316ba['push'](_0x4316ba['shift']());}}}(a73_0x1fe6,0x3e5da));import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG['domains'][a73_0x3d2623(0x178)][a73_0x3d2623(0x174)]+PRODUCT_CONFIG[a73_0x3d2623(0x17a)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a74_0x59515e=a74_0x945c;(function(_0x91a1de,_0x171ec1){const _0x1661c7=a74_0x945c,_0x38e2fb=_0x91a1de();while(!![]){try{const _0xf76914=parseInt(_0x1661c7(0x201))/0x1*(parseInt(_0x1661c7(0x1d7))/0x2)+parseInt(_0x1661c7(0x1fb))/0x3*(parseInt(_0x1661c7(0x1c8))/0x4)+parseInt(_0x1661c7(0x1e0))/0x5*(-parseInt(_0x1661c7(0x1f1))/0x6)+-parseInt(_0x1661c7(0x1e1))/0x7*(parseInt(_0x1661c7(0x208))/0x8)+parseInt(_0x1661c7(0x1fe))/0x9*(-parseInt(_0x1661c7(0x1f9))/0xa)+parseInt(_0x1661c7(0x1cf))/0xb+-parseInt(_0x1661c7(0x1ef))/0xc;if(_0xf76914===_0x171ec1)break;else _0x38e2fb['push'](_0x38e2fb['shift']());}catch(_0x3fe7cb){_0x38e2fb['push'](_0x38e2fb['shift']());}}}(a74_0x2aff,0xa68cd));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';function a74_0x945c(_0x5f0a68,_0x2e6be4){_0x5f0a68=_0x5f0a68-0x1c6;const _0x2affe9=a74_0x2aff();let _0x945c5e=_0x2affe9[_0x5f0a68];return _0x945c5e;}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[a74_0x59515e(0x1c7)];function resolveConfigPath(_0x5312ee){for(const _0x1aaa21 of CONFIG_NAMES){const _0x4c0b76=resolve(_0x5312ee,_0x1aaa21);if(existsSync(_0x4c0b76))return _0x4c0b76;}return undefined;}export function resolveWriteConfigPath(_0x5ba3a9){const _0x119851=a74_0x59515e,_0x5b3af9=_0x5ba3a9===_0x119851(0x205)?process[_0x119851(0x1f6)]():homedir(),_0x1747f5=resolveConfigPath(_0x5b3af9);return _0x1747f5??resolve(_0x5b3af9,NEW_CONFIG_NAME);}export function readConfigFile(_0x3b66dd){const _0x1f4f42=a74_0x59515e;try{if(existsSync(_0x3b66dd)){const _0x2d9c11=readFileSync(_0x3b66dd,{'encoding':_0x1f4f42(0x20e)});if(_0x2d9c11){const _0x32eae1=JSON[_0x1f4f42(0x1cc)](_0x2d9c11);return migrateOnlineEnv(_0x3b66dd,_0x32eae1),_0x32eae1;}}}catch{}return{};}function migrateOnlineEnv(_0x537f8a,_0xc71591){const _0x561a21=a74_0x59515e;let _0x3d3606=![];_0xc71591[_0x561a21(0x1fd)]===_0x561a21(0x1d1)&&(_0xc71591[_0x561a21(0x1fd)]=_0x561a21(0x1fa),_0x3d3606=!![]);if(_0xc71591[_0x561a21(0x1c9)]&&typeof _0xc71591[_0x561a21(0x1c9)]==='object')for(const _0x539db2 of Object[_0x561a21(0x1dc)](_0xc71591[_0x561a21(0x1c9)])){_0x539db2&&_0x539db2['env']==='online'&&(_0x539db2[_0x561a21(0x1fd)]=_0x561a21(0x1fa),_0x3d3606=!![]);}if(_0x3d3606)try{writeConfigFile(_0x537f8a,_0xc71591);}catch{}}export function writeConfigFile(_0x31b1e4,_0x99d318){const _0x9552aa=a74_0x59515e,_0x56f690=dirname(_0x31b1e4);!existsSync(_0x56f690)&&mkdirSync(_0x56f690,{'recursive':!![]});const _0x3e5100=_0x31b1e4+_0x9552aa(0x207);try{writeFileSync(_0x3e5100,JSON[_0x9552aa(0x203)](_0x99d318,null,0x2)+'\x0a',{'encoding':_0x9552aa(0x20e),'mode':0x180});try{renameSync(_0x3e5100,_0x31b1e4);}catch(_0x25ad8a){if(_0x25ad8a[_0x9552aa(0x1f3)]==='EPERM'||_0x25ad8a[_0x9552aa(0x1f3)]===_0x9552aa(0x1f8)||_0x25ad8a[_0x9552aa(0x1f3)]===_0x9552aa(0x1e2)){writeFileSync(_0x31b1e4,JSON[_0x9552aa(0x203)](_0x99d318,null,0x2)+'\x0a',{'encoding':_0x9552aa(0x20e)});try{unlinkSync(_0x3e5100);}catch{}}else throw _0x25ad8a;}}catch(_0x53c7c1){try{unlinkSync(_0x3e5100);}catch{}throw _0x53c7c1;}}export function isNonInteractiveMode(_0x4a7e8c){const _0x467cbb=a74_0x59515e;return!!(_0x4a7e8c[_0x467cbb(0x1d4)]||_0x4a7e8c['ci']||productEnvNames('CI')[_0x467cbb(0x200)](_0x470613=>process.env[_0x470613]===_0x467cbb(0x1f2))||process.env.CI==='true'||!process['stdout'][_0x467cbb(0x1e9)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x444c83=a74_0x59515e;if(!process[_0x444c83(0x209)][_0x444c83(0x1e9)])return![];try{const _0x583086=process['stdin'][_0x444c83(0x1df)];return process[_0x444c83(0x209)][_0x444c83(0x1ed)](!![]),process[_0x444c83(0x209)][_0x444c83(0x1ed)](_0x583086??![]),!![];}catch{return![];}}export async function createContext(_0x31542e){const _0x1ce83e=a74_0x59515e,_0x297f89=readRawConfig(),_0xca4a1b=buildConfig(_0x297f89,_0x31542e);await initGlobalEnvironment(_0xca4a1b);const {getUserDomain:_0x1175cb,getApiDomain:_0x40637b}=await import(_0x1ce83e(0x1ca)),_0x1a7c6c={'apiDomain':_0x40637b(),'userDomain':_0x1175cb()},_0x4f8712=await buildAuth(_0xca4a1b);logger['setLogPath'](process['cwd']());const _0x1f28df=(CLI_BIN_NAME+'\x20'+process[_0x1ce83e(0x20b)][_0x1ce83e(0x1ff)](0x2)['join']('\x20'))[_0x1ce83e(0x1cb)]();logger['setRawCommand'](_0x1f28df);const _0x51652b=isNonInteractiveMode(_0x31542e);return{'config':_0xca4a1b,'auth':_0x4f8712,'logger':logger,'env':_0x1a7c6c,'nonInteractive':_0x51652b};}function a74_0x2aff(){const _0x3eb705=['5940hzVGiN','error','format','local-alias','read','values','runtimeDomain','missing','isRaw','778095UkQFZJ','259wJXBsk','EACCES','cache','authRequired','ACCESS_KEY','explicit','APPCODE','FORMAT','isTTY','object','development','riskLevel','setRawMode','VERBOSE','8739672KuMqis','userDomain','6ysRjUO','true','code','accessKey','apiDomain','cwd','PAGE_SIZE','EXDEV','6560FMMJhe','production','193476oSaoEb','high-risk-write','env','11385MVatkB','slice','some','103KxNLkN','string','stringify','raw','project','app','.tmp','87872dnZyWj','stdin','pageSize','argv','top-level','global','utf8','daily','maxRisk','newConfigFileName','76YztvMZ','apps','./constant/domain.js','trim','parse','inherit','write','13982144aFutVn','appcode','online','defaultApp','message','nonInteractive','projectConfig','empty'];a74_0x2aff=function(){return _0x3eb705;};return a74_0x2aff();}export function buildConfigFromFlags(_0x21d5f6){return buildConfig(readRawConfig(),_0x21d5f6);}export function getLocalAppAliases(_0x26bfc0){const _0xe94f80=a74_0x59515e;return _0x26bfc0[_0xe94f80(0x1c9)]&&typeof _0x26bfc0[_0xe94f80(0x1c9)]===_0xe94f80(0x1ea)?_0x26bfc0[_0xe94f80(0x1c9)]:{};}export function resolveLocalAppAliasCode(_0x1b2d8f,_0x27b5a9){const _0x576f30=a74_0x59515e;if(!_0x27b5a9)return undefined;const _0x22c1ad=getLocalAppAliases(_0x1b2d8f)[_0x27b5a9],_0x23ac21=_0x22c1ad?.[_0x576f30(0x1d0)];return typeof _0x23ac21===_0x576f30(0x202)&&_0x23ac21['trim']()?_0x23ac21[_0x576f30(0x1cb)]():undefined;}export function readAppCodeFromConfig(){const _0x55306a=a74_0x59515e,_0x3aeee8=readRawConfig(),_0x11b6b8=_0x3aeee8[_0x55306a(0x1d0)]??_0x3aeee8['app'];if(typeof _0x11b6b8==='string'&&_0x11b6b8[_0x55306a(0x1cb)]())return _0x11b6b8[_0x55306a(0x1cb)]();const _0x5a7fdb=resolveLocalAppAliasCode(_0x3aeee8,typeof _0x3aeee8[_0x55306a(0x1d2)]===_0x55306a(0x202)?_0x3aeee8['defaultApp']:undefined);if(_0x5a7fdb)return _0x5a7fdb;const _0x313c96=normalizeEnv(String(_0x3aeee8['env']||_0x55306a(0x1fa))),_0x52a29f=isDaily(_0x313c96)?_0x55306a(0x20f):isDev(_0x313c96)?_0x55306a(0x1eb):_0x55306a(0x1fa),_0x1b68d6=resolveCachedAppCode(typeof _0x3aeee8[_0x55306a(0x1d2)]==='string'?_0x3aeee8['defaultApp']:undefined,_0x52a29f,typeof _0x3aeee8[_0x55306a(0x1f4)]==='string'?_0x3aeee8[_0x55306a(0x1f4)]:undefined);if(_0x1b68d6)return _0x1b68d6;const _0x3af37a=Object[_0x55306a(0x1dc)](getLocalAppAliases(_0x3aeee8))['find'](_0xddd94e=>_0xddd94e?.['appcode']);return typeof _0x3af37a?.['appcode']===_0x55306a(0x202)&&_0x3af37a[_0x55306a(0x1d0)][_0x55306a(0x1cb)]()?_0x3af37a[_0x55306a(0x1d0)][_0x55306a(0x1cb)]():undefined;}export function readScopedConfig(_0x2c5c09){const _0x5a9e67=a74_0x59515e,_0x53fdc5=_0x2c5c09[_0x5a9e67(0x20d)]?_0x5a9e67(0x20d):'project';return readConfigFile(resolveWriteConfigPath(_0x53fdc5));}export function writeScopedConfig(_0x39b8f0,_0x554350){const _0x1ed78e=a74_0x59515e,_0x85f92c=_0x554350[_0x1ed78e(0x20d)]?_0x1ed78e(0x20d):'project';writeConfigFile(resolveWriteConfigPath(_0x85f92c),_0x39b8f0);}export async function initGlobalEnvironment(_0x2cfb65){const _0x2237ed=a74_0x59515e,{initEnv:_0x109f06}=await import('./constant/env.js');_0x109f06(_0x2cfb65[_0x2237ed(0x1fd)]);const {initDomains:_0x1b8934}=await import(_0x2237ed(0x1ca));_0x1b8934({'apiDomain':_0x2cfb65['raw'][_0x2237ed(0x1f5)]||_0x2cfb65[_0x2237ed(0x204)]['host']||undefined,'userDomain':_0x2cfb65['raw'][_0x2237ed(0x1f0)]||undefined,'runtimeDomain':_0x2cfb65['raw'][_0x2237ed(0x1dd)]||undefined,'skillHubDomain':_0x2cfb65[_0x2237ed(0x204)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){const _0x290754=a74_0x59515e;return resolveConfigPath(process[_0x290754(0x1f6)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x465823){const _0x5f4092=a74_0x59515e;if(!existsSync(_0x465823))return{'status':_0x5f4092(0x1de)};try{const _0x1ad331=readFileSync(_0x465823,{'encoding':_0x5f4092(0x20e)});if(!_0x1ad331?.[_0x5f4092(0x1cb)]())return{'status':_0x5f4092(0x1d6)};const _0x366078=JSON[_0x5f4092(0x1cc)](_0x1ad331);return{'status':'ok','data':_0x366078};}catch(_0x9b95b6){return{'status':_0x5f4092(0x1d8),'message':_0x9b95b6 instanceof Error?_0x9b95b6[_0x5f4092(0x1d3)]:String(_0x9b95b6)};}}export function loadRawConfigLayers(_0x73cac5){const _0x476a40=a74_0x59515e;let _0xa694e7={},_0x4d3af2={},_0x3c464f,_0x5d1a5a;try{_0x3c464f=resolveConfigPath(homedir());if(_0x3c464f){const _0x43b76f=readFileSync(_0x3c464f,{'encoding':_0x476a40(0x20e)});if(_0x43b76f)_0xa694e7=JSON['parse'](_0x43b76f);}}catch{}try{const _0xa027d6=_0x73cac5||process['cwd']();_0x5d1a5a=resolveConfigPath(_0xa027d6);if(_0x5d1a5a){const _0xd3b303=readFileSync(_0x5d1a5a,{'encoding':_0x476a40(0x20e)});if(_0xd3b303)_0x4d3af2=JSON['parse'](_0xd3b303);}}catch{}return{'globalPath':_0x3c464f,'projectPath':_0x5d1a5a,'globalConfig':_0xa694e7,'projectConfig':_0x4d3af2};}function mergeRawConfigLayers(_0x593c74){const _0xea9fa2=a74_0x59515e,{globalConfig:_0x1b994a,projectConfig:_0xa42faa}=_0x593c74;if(_0xa42faa[_0xea9fa2(0x1cd)]===![]){const _0x5607e8={..._0xa42faa};return delete _0x5607e8[_0xea9fa2(0x1cd)],_0x5607e8;}const _0x1c1ec2={..._0x1b994a,..._0xa42faa};if(_0xea9fa2(0x1d2)in _0xa42faa)_0x1c1ec2['defaultApp']=_0xa42faa[_0xea9fa2(0x1d2)];else _0x1b994a['defaultApp']&&(_0x1c1ec2[_0xea9fa2(0x1d2)]=_0x1b994a[_0xea9fa2(0x1d2)]);return _0x1c1ec2;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x567120){return mergeRawConfigLayers(loadRawConfigLayers(_0x567120));}export function readRawConfigWithLayers(_0x4d92cc){const _0x658698=loadRawConfigLayers(_0x4d92cc);return{'config':mergeRawConfigLayers(_0x658698),'layers':_0x658698};}export function resolveDefaultAppSource(_0xb6e1f0){const _0x58a7a6=a74_0x59515e;if('defaultApp'in _0xb6e1f0[_0x58a7a6(0x1d5)])return _0x58a7a6(0x205);if(_0xb6e1f0[_0x58a7a6(0x1d5)][_0x58a7a6(0x1cd)]===![])return null;if(_0xb6e1f0['globalConfig'][_0x58a7a6(0x1d2)])return'global';return null;}function buildConfig(_0x3e1d10,_0x4ae630){const _0x56b5f2=a74_0x59515e,_0x47770b=_0x3e1d10[_0x56b5f2(0x1d2)]||undefined,_0x56152d=_0x4ae630[_0x56b5f2(0x206)]||env('APP')||undefined,_0x26eb71=_0x56152d||_0x47770b||undefined,_0x67869b=env(_0x56b5f2(0x1e5))||_0x3e1d10[_0x56b5f2(0x1f4)]||undefined,_0x378318=_0x4ae630['env']||env('ENV')||_0x3e1d10['env']||DEFAULT_CONFIG_VALUES[_0x56b5f2(0x1fd)],_0x33c432=normalizeEnv(String(_0x378318)),_0x316648=isDaily(_0x33c432)?_0x56b5f2(0x20f):isDev(_0x33c432)?_0x56b5f2(0x1eb):_0x56b5f2(0x1fa),_0x348f4f=typeof _0x4ae630[_0x56b5f2(0x1d0)]==='string'?_0x4ae630[_0x56b5f2(0x1d0)]:undefined,_0x14a8cd=env(_0x56b5f2(0x1e7)),_0x4c8dc5=_0x56152d?undefined:_0x3e1d10[_0x56b5f2(0x1d0)]||_0x3e1d10[_0x56b5f2(0x206)]||undefined,_0x4746b7=_0x56152d||(_0x4c8dc5?undefined:_0x47770b),_0x2ee714=resolveLocalAppAliasCode(_0x3e1d10,_0x4746b7),_0x92e789=resolveCachedAppCode(_0x4746b7,_0x316648,_0x67869b),_0x294aff=_0x348f4f||_0x14a8cd||_0x4c8dc5||_0x2ee714||_0x92e789||undefined,_0x1e7242=_0x348f4f?_0x56b5f2(0x1e6):_0x14a8cd?_0x56b5f2(0x1fd):_0x4c8dc5?_0x56b5f2(0x20c):_0x2ee714?_0x56b5f2(0x1da):_0x92e789?_0x56b5f2(0x1e3):undefined,_0x7694d9=_0x3e1d10['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x1371b2=undefined,_0x4e7b93=_0x4ae630[_0x56b5f2(0x1d9)]||env(_0x56b5f2(0x1e8))||_0x3e1d10[_0x56b5f2(0x1d9)],_0x490d9c=normalizeLegacyOutputFormat(_0x4e7b93),_0x45f266=env(_0x56b5f2(0x1f7))||_0x3e1d10[_0x56b5f2(0x20a)],_0x36671e=_0x45f266?Number(_0x45f266)||undefined:undefined,_0x5bc57d=_0x3e1d10[_0x56b5f2(0x1ec)]||_0x3e1d10[_0x56b5f2(0x1c6)],_0x4c4f35=_0x5bc57d===_0x56b5f2(0x1db)||_0x5bc57d===_0x56b5f2(0x1ce)||_0x5bc57d===_0x56b5f2(0x1fc)?_0x5bc57d:DEFAULT_CONFIG_VALUES[_0x56b5f2(0x1ec)],_0x1966c9=env(_0x56b5f2(0x1ee)),_0x3fe226=_0x1966c9==='1'||_0x1966c9===_0x56b5f2(0x1f2);return{'appCode':typeof _0x294aff===_0x56b5f2(0x202)&&_0x294aff[_0x56b5f2(0x1cb)]()?_0x294aff[_0x56b5f2(0x1cb)]():undefined,'appCodeSource':_0x1e7242,'env':_0x316648,'locale':_0x7694d9,'cookie':_0x1371b2,'accessKey':_0x67869b,'format':_0x490d9c,'pageSize':_0x36671e,'riskLevel':_0x4c4f35,'verbose':_0x3fe226,'defaultApp':_0x47770b,'currentApp':typeof _0x26eb71===_0x56b5f2(0x202)?_0x26eb71:undefined,'raw':_0x3e1d10};}function env(_0x1b6ddb){return productEnv(_0x1b6ddb);}async function buildAuth(_0x4a3812){const _0x16d559=a74_0x59515e,_0x3021a8='',_0x3355a3=!!_0x4a3812[_0x16d559(0x1f4)];return{'cookie':_0x3021a8,'isLoggedIn':_0x3355a3,async 'getOrLogin'(){const _0x428ffe=_0x16d559;if(_0x3355a3)return _0x3021a8;throw CliErrors[_0x428ffe(0x1e4)]();}};}
|
|
1
|
+
function a74_0x197f(_0x5ef059,_0x520ab1){_0x5ef059=_0x5ef059-0x7a;const _0x24ff29=a74_0x24ff();let _0x197ff2=_0x24ff29[_0x5ef059];return _0x197ff2;}const a74_0x6c261e=a74_0x197f;(function(_0x3dd16c,_0x4b99fd){const _0x58ba8e=a74_0x197f,_0x5c20b1=_0x3dd16c();while(!![]){try{const _0x44e5b7=-parseInt(_0x58ba8e(0x8b))/0x1+-parseInt(_0x58ba8e(0x7f))/0x2+-parseInt(_0x58ba8e(0xa2))/0x3*(-parseInt(_0x58ba8e(0xbd))/0x4)+parseInt(_0x58ba8e(0x90))/0x5*(parseInt(_0x58ba8e(0x9d))/0x6)+parseInt(_0x58ba8e(0x96))/0x7*(parseInt(_0x58ba8e(0xa6))/0x8)+-parseInt(_0x58ba8e(0x86))/0x9*(-parseInt(_0x58ba8e(0xac))/0xa)+-parseInt(_0x58ba8e(0xba))/0xb;if(_0x44e5b7===_0x4b99fd)break;else _0x5c20b1['push'](_0x5c20b1['shift']());}catch(_0x16139c){_0x5c20b1['push'](_0x5c20b1['shift']());}}}(a74_0x24ff,0xcb18e));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[a74_0x6c261e(0xad)];function resolveConfigPath(_0x2350d5){for(const _0x46390b of CONFIG_NAMES){const _0x350f7d=resolve(_0x2350d5,_0x46390b);if(existsSync(_0x350f7d))return _0x350f7d;}return undefined;}export function resolveWriteConfigPath(_0x108ea8){const _0x48bf61=a74_0x6c261e,_0x16ffa7=_0x108ea8===_0x48bf61(0x85)?process[_0x48bf61(0x98)]():homedir(),_0x1c3b2d=resolveConfigPath(_0x16ffa7);return _0x1c3b2d??resolve(_0x16ffa7,NEW_CONFIG_NAME);}export function readConfigFile(_0x7181fb){try{if(existsSync(_0x7181fb)){const _0x2cdf4a=readFileSync(_0x7181fb,{'encoding':'utf8'});if(_0x2cdf4a){const _0x33ef43=JSON['parse'](_0x2cdf4a);return migrateOnlineEnv(_0x7181fb,_0x33ef43),_0x33ef43;}}}catch{}return{};}function migrateOnlineEnv(_0x8091e1,_0x333327){const _0x20d8c7=a74_0x6c261e;let _0x15cd6f=![];_0x333327[_0x20d8c7(0x84)]===_0x20d8c7(0x92)&&(_0x333327[_0x20d8c7(0x84)]=_0x20d8c7(0x87),_0x15cd6f=!![]);if(_0x333327['apps']&&typeof _0x333327[_0x20d8c7(0x8c)]===_0x20d8c7(0xa4))for(const _0x34d5a9 of Object[_0x20d8c7(0xc3)](_0x333327[_0x20d8c7(0x8c)])){_0x34d5a9&&_0x34d5a9['env']===_0x20d8c7(0x92)&&(_0x34d5a9[_0x20d8c7(0x84)]=_0x20d8c7(0x87),_0x15cd6f=!![]);}if(_0x15cd6f)try{writeConfigFile(_0x8091e1,_0x333327);}catch{}}export function writeConfigFile(_0x54b24d,_0x40c739){const _0x3111ae=a74_0x6c261e,_0x567f24=dirname(_0x54b24d);!existsSync(_0x567f24)&&mkdirSync(_0x567f24,{'recursive':!![]});const _0x12e7c7=_0x54b24d+_0x3111ae(0x9a);try{writeFileSync(_0x12e7c7,JSON['stringify'](_0x40c739,null,0x2)+'\x0a',{'encoding':_0x3111ae(0xb7),'mode':0x180});try{renameSync(_0x12e7c7,_0x54b24d);}catch(_0x5551c6){if(_0x5551c6[_0x3111ae(0xc9)]===_0x3111ae(0x97)||_0x5551c6[_0x3111ae(0xc9)]===_0x3111ae(0x9e)||_0x5551c6[_0x3111ae(0xc9)]===_0x3111ae(0x81)){writeFileSync(_0x54b24d,JSON[_0x3111ae(0x89)](_0x40c739,null,0x2)+'\x0a',{'encoding':_0x3111ae(0xb7)});try{unlinkSync(_0x12e7c7);}catch{}}else throw _0x5551c6;}}catch(_0x1c4318){try{unlinkSync(_0x12e7c7);}catch{}throw _0x1c4318;}}export function isNonInteractiveMode(_0x2bf113){const _0x32ab30=a74_0x6c261e;return!!(_0x2bf113[_0x32ab30(0x82)]||_0x2bf113['ci']||productEnvNames('CI')[_0x32ab30(0xc2)](_0xb23223=>process.env[_0xb23223]==='true')||process.env.CI===_0x32ab30(0x99)||!process[_0x32ab30(0x7c)][_0x32ab30(0xaa)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x2c80a8=a74_0x6c261e;if(!process[_0x2c80a8(0x94)][_0x2c80a8(0xaa)])return![];try{const _0x4cc454=process[_0x2c80a8(0x94)][_0x2c80a8(0xbe)];return process['stdin'][_0x2c80a8(0xb6)](!![]),process[_0x2c80a8(0x94)][_0x2c80a8(0xb6)](_0x4cc454??![]),!![];}catch{return![];}}export async function createContext(_0x139a88){const _0x555097=a74_0x6c261e,_0x4665bc=readRawConfig(),_0x550756=buildConfig(_0x4665bc,_0x139a88);await initGlobalEnvironment(_0x550756);const {getUserDomain:_0x3721c3,getApiDomain:_0x2ee0a0}=await import('./constant/domain.js'),_0x2ffea1={'apiDomain':_0x2ee0a0(),'userDomain':_0x3721c3()},_0x362d5d=await buildAuth(_0x550756);logger['setLogPath'](process['cwd']());const _0x41b7b4=(CLI_BIN_NAME+'\x20'+process[_0x555097(0x9f)][_0x555097(0x91)](0x2)[_0x555097(0xa1)]('\x20'))['trim']();logger[_0x555097(0x8f)](_0x41b7b4);const _0x36d81e=isNonInteractiveMode(_0x139a88);return{'config':_0x550756,'auth':_0x362d5d,'logger':logger,'env':_0x2ffea1,'nonInteractive':_0x36d81e};}export function buildConfigFromFlags(_0xa712b1){return buildConfig(readRawConfig(),_0xa712b1);}export function getLocalAppAliases(_0x4489d0){const _0x4370cf=a74_0x6c261e;return _0x4489d0[_0x4370cf(0x8c)]&&typeof _0x4489d0['apps']===_0x4370cf(0xa4)?_0x4489d0[_0x4370cf(0x8c)]:{};}function a74_0x24ff(){const _0xf76f17=['99066qgDBWV','EXDEV','argv','inherit','join','2847633BDMcVp','FORMAT','object','APP','2796912JquOWa','skillHubDomain','find','runtimeDomain','isTTY','local-alias','4628630nSdLsb','newConfigFileName','string','authRequired','parse','./constant/domain.js','top-level','daily','PAGE_SIZE','write','setRawMode','utf8','maxRisk','VERBOSE','6579507ivjxJf','ENV','globalConfig','4mqNWsw','isRaw','locale','global','appcode','some','values','riskLevel','app','userDomain','error','message','code','pageSize','development','stdout','raw','apiDomain','543190fjXJdp','missing','EACCES','nonInteractive','format','env','project','9sLrtRF','production','APPCODE','stringify','host','1122540xpXlGa','apps','accessKey','defaultApp','setRawCommand','110ZrHUac','slice','online','empty','stdin','high-risk-write','21oIdsGv','EPERM','cwd','true','.tmp','ACCESS_KEY','trim'];a74_0x24ff=function(){return _0xf76f17;};return a74_0x24ff();}export function resolveLocalAppAliasCode(_0x10e99b,_0x2636df){const _0x3decc3=a74_0x6c261e;if(!_0x2636df)return undefined;const _0x2a9aa5=getLocalAppAliases(_0x10e99b)[_0x2636df],_0x194aba=_0x2a9aa5?.[_0x3decc3(0xc1)];return typeof _0x194aba==='string'&&_0x194aba[_0x3decc3(0x9c)]()?_0x194aba['trim']():undefined;}export function readAppCodeFromConfig(){const _0x3f2dee=a74_0x6c261e,_0x5dc1d5=readRawConfig(),_0x1d0619=_0x5dc1d5[_0x3f2dee(0xc1)]??_0x5dc1d5['app'];if(typeof _0x1d0619===_0x3f2dee(0xae)&&_0x1d0619['trim']())return _0x1d0619[_0x3f2dee(0x9c)]();const _0x18874a=resolveLocalAppAliasCode(_0x5dc1d5,typeof _0x5dc1d5[_0x3f2dee(0x8e)]===_0x3f2dee(0xae)?_0x5dc1d5[_0x3f2dee(0x8e)]:undefined);if(_0x18874a)return _0x18874a;const _0x58c34c=normalizeEnv(String(_0x5dc1d5['env']||'production')),_0x50465b=isDaily(_0x58c34c)?_0x3f2dee(0xb3):isDev(_0x58c34c)?_0x3f2dee(0x7b):_0x3f2dee(0x87),_0x41033b=resolveCachedAppCode(typeof _0x5dc1d5[_0x3f2dee(0x8e)]===_0x3f2dee(0xae)?_0x5dc1d5[_0x3f2dee(0x8e)]:undefined,_0x50465b,typeof _0x5dc1d5['accessKey']===_0x3f2dee(0xae)?_0x5dc1d5[_0x3f2dee(0x8d)]:undefined);if(_0x41033b)return _0x41033b;const _0x4f7134=Object['values'](getLocalAppAliases(_0x5dc1d5))[_0x3f2dee(0xa8)](_0x267ca7=>_0x267ca7?.['appcode']);return typeof _0x4f7134?.[_0x3f2dee(0xc1)]===_0x3f2dee(0xae)&&_0x4f7134[_0x3f2dee(0xc1)][_0x3f2dee(0x9c)]()?_0x4f7134[_0x3f2dee(0xc1)]['trim']():undefined;}export function readScopedConfig(_0x412239){const _0x35849b=a74_0x6c261e,_0x1feed4=_0x412239[_0x35849b(0xc0)]?_0x35849b(0xc0):_0x35849b(0x85);return readConfigFile(resolveWriteConfigPath(_0x1feed4));}export function writeScopedConfig(_0x359cc3,_0x175f1d){const _0x36ffff=a74_0x6c261e,_0x6aa069=_0x175f1d[_0x36ffff(0xc0)]?'global':_0x36ffff(0x85);writeConfigFile(resolveWriteConfigPath(_0x6aa069),_0x359cc3);}export async function initGlobalEnvironment(_0x185d60){const _0x143213=a74_0x6c261e,{initEnv:_0x3c73d8}=await import('./constant/env.js');_0x3c73d8(_0x185d60[_0x143213(0x84)]);const {initDomains:_0x168f6d}=await import(_0x143213(0xb1));_0x168f6d({'apiDomain':_0x185d60[_0x143213(0x7d)][_0x143213(0x7e)]||_0x185d60['raw'][_0x143213(0x8a)]||undefined,'userDomain':_0x185d60[_0x143213(0x7d)][_0x143213(0xc6)]||undefined,'runtimeDomain':_0x185d60['raw'][_0x143213(0xa9)]||undefined,'skillHubDomain':_0x185d60['raw'][_0x143213(0xa7)]||undefined});}export function getProjectConfigPath(){const _0x4360a7=a74_0x6c261e;return resolveConfigPath(process[_0x4360a7(0x98)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x5c8380){const _0x5ae5a3=a74_0x6c261e;if(!existsSync(_0x5c8380))return{'status':_0x5ae5a3(0x80)};try{const _0x4ee9f7=readFileSync(_0x5c8380,{'encoding':'utf8'});if(!_0x4ee9f7?.['trim']())return{'status':_0x5ae5a3(0x93)};const _0x2db2b6=JSON[_0x5ae5a3(0xb0)](_0x4ee9f7);return{'status':'ok','data':_0x2db2b6};}catch(_0x4511db){return{'status':_0x5ae5a3(0xc7),'message':_0x4511db instanceof Error?_0x4511db[_0x5ae5a3(0xc8)]:String(_0x4511db)};}}export function loadRawConfigLayers(_0xc4af55){const _0x45f706=a74_0x6c261e;let _0x4f7e43={},_0x3ec766={},_0x20dac7,_0x287aba;try{_0x20dac7=resolveConfigPath(homedir());if(_0x20dac7){const _0x550c1a=readFileSync(_0x20dac7,{'encoding':_0x45f706(0xb7)});if(_0x550c1a)_0x4f7e43=JSON[_0x45f706(0xb0)](_0x550c1a);}}catch{}try{const _0x24eef2=_0xc4af55||process[_0x45f706(0x98)]();_0x287aba=resolveConfigPath(_0x24eef2);if(_0x287aba){const _0x2b8d43=readFileSync(_0x287aba,{'encoding':'utf8'});if(_0x2b8d43)_0x3ec766=JSON['parse'](_0x2b8d43);}}catch{}return{'globalPath':_0x20dac7,'projectPath':_0x287aba,'globalConfig':_0x4f7e43,'projectConfig':_0x3ec766};}function mergeRawConfigLayers(_0x3fce29){const _0x451ee3=a74_0x6c261e,{globalConfig:_0x21d61a,projectConfig:_0x46de03}=_0x3fce29;if(_0x46de03[_0x451ee3(0xa0)]===![]){const _0x210213={..._0x46de03};return delete _0x210213[_0x451ee3(0xa0)],_0x210213;}const _0x48c697={..._0x21d61a,..._0x46de03};if(_0x451ee3(0x8e)in _0x46de03)_0x48c697[_0x451ee3(0x8e)]=_0x46de03['defaultApp'];else _0x21d61a['defaultApp']&&(_0x48c697[_0x451ee3(0x8e)]=_0x21d61a[_0x451ee3(0x8e)]);return _0x48c697;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x25636f){return mergeRawConfigLayers(loadRawConfigLayers(_0x25636f));}export function readRawConfigWithLayers(_0x3c5130){const _0x113ae1=loadRawConfigLayers(_0x3c5130);return{'config':mergeRawConfigLayers(_0x113ae1),'layers':_0x113ae1};}export function resolveDefaultAppSource(_0x57f2bb){const _0x5de675=a74_0x6c261e;if('defaultApp'in _0x57f2bb['projectConfig'])return _0x5de675(0x85);if(_0x57f2bb['projectConfig'][_0x5de675(0xa0)]===![])return null;if(_0x57f2bb[_0x5de675(0xbc)][_0x5de675(0x8e)])return'global';return null;}function buildConfig(_0x4d1f01,_0x3f9507){const _0x2ac099=a74_0x6c261e,_0x3b89e7=_0x4d1f01[_0x2ac099(0x8e)]||undefined,_0x52d846=_0x3f9507[_0x2ac099(0xc5)]||env(_0x2ac099(0xa5))||undefined,_0x139178=_0x52d846||_0x3b89e7||undefined,_0x5a0c52=env(_0x2ac099(0x9b))||_0x4d1f01[_0x2ac099(0x8d)]||undefined,_0x373431=_0x3f9507[_0x2ac099(0x84)]||env(_0x2ac099(0xbb))||_0x4d1f01[_0x2ac099(0x84)]||DEFAULT_CONFIG_VALUES[_0x2ac099(0x84)],_0xe2b6c2=normalizeEnv(String(_0x373431)),_0x4b13ac=isDaily(_0xe2b6c2)?_0x2ac099(0xb3):isDev(_0xe2b6c2)?_0x2ac099(0x7b):_0x2ac099(0x87),_0x2d802e=typeof _0x3f9507[_0x2ac099(0xc1)]===_0x2ac099(0xae)?_0x3f9507[_0x2ac099(0xc1)]:undefined,_0xae6ee5=env(_0x2ac099(0x88)),_0x4aeb9a=_0x52d846?undefined:_0x4d1f01[_0x2ac099(0xc1)]||_0x4d1f01[_0x2ac099(0xc5)]||undefined,_0x4d8933=_0x52d846||(_0x4aeb9a?undefined:_0x3b89e7),_0x1230d8=resolveLocalAppAliasCode(_0x4d1f01,_0x4d8933),_0x5e9d5a=resolveCachedAppCode(_0x4d8933,_0x4b13ac,_0x5a0c52),_0x16abc6=_0x2d802e||_0xae6ee5||_0x4aeb9a||_0x1230d8||_0x5e9d5a||undefined,_0xb9acd2=_0x2d802e?'explicit':_0xae6ee5?_0x2ac099(0x84):_0x4aeb9a?_0x2ac099(0xb2):_0x1230d8?_0x2ac099(0xab):_0x5e9d5a?'cache':undefined,_0x5c39d4=_0x4d1f01[_0x2ac099(0xbf)]||DEFAULT_CONFIG_VALUES[_0x2ac099(0xbf)],_0x1e8c9e=undefined,_0x18a0af=_0x3f9507[_0x2ac099(0x83)]||env(_0x2ac099(0xa3))||_0x4d1f01[_0x2ac099(0x83)],_0x3a8e81=normalizeLegacyOutputFormat(_0x18a0af),_0x501f0b=env(_0x2ac099(0xb4))||_0x4d1f01[_0x2ac099(0x7a)],_0x42cfa1=_0x501f0b?Number(_0x501f0b)||undefined:undefined,_0x8e49a6=_0x4d1f01[_0x2ac099(0xc4)]||_0x4d1f01[_0x2ac099(0xb8)],_0x504497=_0x8e49a6==='read'||_0x8e49a6===_0x2ac099(0xb5)||_0x8e49a6===_0x2ac099(0x95)?_0x8e49a6:DEFAULT_CONFIG_VALUES['riskLevel'],_0x10aa8d=env(_0x2ac099(0xb9)),_0x6ccecd=_0x10aa8d==='1'||_0x10aa8d===_0x2ac099(0x99);return{'appCode':typeof _0x16abc6===_0x2ac099(0xae)&&_0x16abc6[_0x2ac099(0x9c)]()?_0x16abc6[_0x2ac099(0x9c)]():undefined,'appCodeSource':_0xb9acd2,'env':_0x4b13ac,'locale':_0x5c39d4,'cookie':_0x1e8c9e,'accessKey':_0x5a0c52,'format':_0x3a8e81,'pageSize':_0x42cfa1,'riskLevel':_0x504497,'verbose':_0x6ccecd,'defaultApp':_0x3b89e7,'currentApp':typeof _0x139178===_0x2ac099(0xae)?_0x139178:undefined,'raw':_0x4d1f01};}function env(_0x1ba5cf){return productEnv(_0x1ba5cf);}async function buildAuth(_0x1c6600){const _0x279de3=a74_0x6c261e,_0x35624a='',_0x39fce8=!!_0x1c6600[_0x279de3(0x8d)];return{'cookie':_0x35624a,'isLoggedIn':_0x39fce8,async 'getOrLogin'(){const _0x3f4a18=_0x279de3;if(_0x39fce8)return _0x35624a;throw CliErrors[_0x3f4a18(0xaf)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x301dc5,_0x4e4d87){const _0x36af33=a75_0xdadf,_0x1da53c=_0x301dc5();while(!![]){try{const _0x24fa46=parseInt(_0x36af33(0x1e5))/0x1+parseInt(_0x36af33(0x1f9))/0x2+-parseInt(_0x36af33(0x210))/0x3*(-parseInt(_0x36af33(0x1f7))/0x4)+-parseInt(_0x36af33(0x1ed))/0x5+parseInt(_0x36af33(0x1cb))/0x6*(-parseInt(_0x36af33(0x1cf))/0x7)+-parseInt(_0x36af33(0x1f6))/0x8*(parseInt(_0x36af33(0x23b))/0x9)+parseInt(_0x36af33(0x1f3))/0xa;if(_0x24fa46===_0x4e4d87)break;else _0x1da53c['push'](_0x1da53c['shift']());}catch(_0x5b7f05){_0x1da53c['push'](_0x1da53c['shift']());}}}(a75_0x5185,0x69416));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x687d4d){_activeAK=_0x687d4d||undefined;}function a75_0xdadf(_0x485fbe,_0x4cf1eb){_0x485fbe=_0x485fbe-0x1c2;const _0x5185cc=a75_0x5185();let _0xdadf18=_0x5185cc[_0x485fbe];return _0xdadf18;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x3cb794){const _0x3bf3d2=a75_0xdadf;for(const _0x16cee4 of _0x3cb794){if(typeof _0x16cee4===_0x3bf3d2(0x1ef)&&_0x16cee4[_0x3bf3d2(0x1dc)]())return _0x16cee4['trim']();}return undefined;}async function decodeResponseBody(_0x4c0097){const _0x3f66c7=a75_0xdadf;if(typeof _0x4c0097[_0x3f66c7(0x1cd)]==='function')try{const _0x189917=await _0x4c0097[_0x3f66c7(0x1cd)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x189917),'text':_0x189917};}catch{return{'isJson':![],'text':_0x189917['trim']()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x4c0097[_0x3f66c7(0x1d7)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x461f45,_0x5b0003,_0x54484b){const _0x2d2b0f=a75_0xdadf,_0x1dfea7=_0x5b0003&&typeof _0x5b0003==='object'?_0x5b0003:{},_0x243d2a=[_0x1dfea7[_0x2d2b0f(0x208)],_0x1dfea7[_0x2d2b0f(0x24d)]][_0x2d2b0f(0x1f0)](_0xa454b3=>Number(_0xa454b3)===0x1ad),_0x110466=createRateLimitError({'status':_0x461f45[_0x2d2b0f(0x208)]===0x1ad?_0x461f45[_0x2d2b0f(0x208)]:_0x243d2a??_0x461f45['status'],'errorCode':firstString(_0x1dfea7[_0x2d2b0f(0x249)],typeof _0x1dfea7['code']===_0x2d2b0f(0x1ef)?_0x1dfea7['code']:undefined),'message':firstString(_0x1dfea7['errorMsg'],_0x1dfea7[_0x2d2b0f(0x1f5)],_0x1dfea7[_0x2d2b0f(0x21e)],_0x54484b),'retryAfter':readRetryAfter(_0x461f45['headers'])??readRetryAfterSeconds(_0x5b0003)});if(_0x110466)throw _0x110466;}async function apiRequest(_0x384129,_0x2974b2={}){const _0x21c6dc=a75_0xdadf,{method:method=_0x21c6dc(0x1d1),body:_0x2863f6,headers:headers={},timeout:timeout=0x7530}=_0x2974b2,_0x33739b=_activeAK,_0x4b6b52=getRuntimeDomain();if(!_0x33739b)throw CliErrors['authRequired'](_0x21c6dc(0x1c5)+PRODUCT_CONFIG[_0x21c6dc(0x1ea)]+'.');const _0x728287=''+_0x4b6b52+_0x384129,_0x5871bf={'X-User-AK':_0x33739b},_0x50af4e=new AbortController(),_0x33f7c9=setTimeout(()=>_0x50af4e['abort'](),timeout);try{const _0x341e20=await fetch(_0x728287,{'method':method,'headers':{'Content-Type':_0x21c6dc(0x207),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x5871bf,...headers},'body':_0x2863f6?JSON['stringify'](_0x2863f6):undefined,'signal':_0x50af4e[_0x21c6dc(0x202)]}),_0x4cb552=await decodeResponseBody(_0x341e20);if(!_0x4cb552[_0x21c6dc(0x1e2)]){throwIfRateLimited(_0x341e20,undefined,_0x4cb552[_0x21c6dc(0x1cd)]);throw CliErrors[_0x21c6dc(0x230)](_0x21c6dc(0x1db)+_0x341e20[_0x21c6dc(0x208)]+')',_0x341e20[_0x21c6dc(0x208)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x11d0a1=_0x4cb552[_0x21c6dc(0x212)];throwIfRateLimited(_0x341e20,_0x11d0a1);if(!_0x341e20['ok']||_0x11d0a1['success']===![])throw CliErrors[_0x21c6dc(0x230)](_0x11d0a1[_0x21c6dc(0x1f8)]||_0x11d0a1['message']||'API\x20error:\x20'+_0x341e20[_0x21c6dc(0x208)],_0x11d0a1[_0x21c6dc(0x249)]?_0x21c6dc(0x1d6)+_0x11d0a1[_0x21c6dc(0x249)]:undefined);return _0x11d0a1;}catch(_0x22feba){if(_0x22feba instanceof Error&&_0x22feba[_0x21c6dc(0x205)]===_0x21c6dc(0x23f))throw CliErrors[_0x21c6dc(0x230)]('Request\x20timeout:\x20'+_0x728287);throw _0x22feba;}finally{clearTimeout(_0x33f7c9);}}async function apiBinaryRequest(_0x7de79e,_0x2fb8f5={}){const _0x38d0e9=a75_0xdadf,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x2fb8f5,_0x4253a4=_activeAK,_0x33e9ad=getRuntimeDomain();if(!_0x4253a4)throw CliErrors['authRequired'](_0x38d0e9(0x1c5)+PRODUCT_CONFIG[_0x38d0e9(0x1ea)]+'.');const _0xf6e4fe=''+_0x33e9ad+_0x7de79e,_0x2e14d6=new AbortController(),_0x4fa60b=setTimeout(()=>_0x2e14d6['abort'](),timeout);try{const _0x23a235=await fetch(_0xf6e4fe,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x38d0e9(0x1c2)],'X-User-AK':_0x4253a4,...headers},'signal':_0x2e14d6[_0x38d0e9(0x202)]});if(!_0x23a235['ok']){const _0x48cdfd=await decodeResponseBody(_0x23a235),_0xde919c=_0x48cdfd['data']&&typeof _0x48cdfd[_0x38d0e9(0x212)]===_0x38d0e9(0x1e0)?_0x48cdfd[_0x38d0e9(0x212)]:{},_0x1df89d=firstString(_0xde919c[_0x38d0e9(0x1f8)],_0xde919c[_0x38d0e9(0x1f5)],_0xde919c[_0x38d0e9(0x249)],_0x48cdfd['text']);throwIfRateLimited(_0x23a235,_0x48cdfd[_0x38d0e9(0x212)],_0x1df89d);throw CliErrors['apiError'](_0x1df89d||'API\x20error:\x20'+_0x23a235['status'],_0x38d0e9(0x1c3)+_0xf6e4fe);}return Buffer[_0x38d0e9(0x236)](await _0x23a235[_0x38d0e9(0x213)]());}catch(_0x4289f7){if(_0x4289f7 instanceof Error&&_0x4289f7[_0x38d0e9(0x205)]===_0x38d0e9(0x23f))throw CliErrors['apiError'](_0x38d0e9(0x24b)+_0xf6e4fe);throw _0x4289f7;}finally{clearTimeout(_0x4fa60b);}}async function apiFormRequest(_0x43ed11,_0x10c8d1,_0x50cfa6={}){const _0x501db4=a75_0xdadf,{timeout:timeout=0x7530}=_0x50cfa6,_0x59b473=_activeAK,_0x2a52e4=getRuntimeDomain();if(!_0x59b473)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x539e86=''+_0x2a52e4+_0x43ed11,_0x4834f7=new AbortController(),_0x26e94e=setTimeout(()=>_0x4834f7[_0x501db4(0x247)](),timeout);try{const _0x5462a6=await fetch(_0x539e86,{'method':'POST','headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x501db4(0x1c2)],'X-User-AK':_0x59b473},'body':_0x10c8d1,'signal':_0x4834f7['signal']}),_0x196f7c=await decodeResponseBody(_0x5462a6);if(!_0x196f7c['isJson']){throwIfRateLimited(_0x5462a6,undefined,_0x196f7c[_0x501db4(0x1cd)]);throw CliErrors[_0x501db4(0x230)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x5462a6[_0x501db4(0x208)]+')',_0x5462a6['status']>=0x190?_0x501db4(0x1eb):undefined);}const _0x395acf=_0x196f7c[_0x501db4(0x212)];throwIfRateLimited(_0x5462a6,_0x395acf);if(!_0x5462a6['ok']||_0x395acf[_0x501db4(0x227)]===![])throw CliErrors[_0x501db4(0x230)](_0x395acf['errorMsg']||_0x395acf[_0x501db4(0x1f5)]||_0x501db4(0x232)+_0x5462a6[_0x501db4(0x208)],_0x395acf['errorCode']?'API\x20error\x20code:\x20'+_0x395acf[_0x501db4(0x249)]:undefined);return _0x395acf;}catch(_0x20cd5a){if(_0x20cd5a instanceof Error&&_0x20cd5a[_0x501db4(0x205)]==='AbortError')throw CliErrors[_0x501db4(0x230)](_0x501db4(0x24b)+_0x539e86);throw _0x20cd5a;}finally{clearTimeout(_0x26e94e);}}async function toolboxRequest(_0x4fa981,_0x50b6c3,_0x342737={}){const _0x2098f3=a75_0xdadf,{method:method=_0x2098f3(0x1d1),headers:headers={},timeout:timeout=0x7530}=_0x342737,_0x5d0746=_activeAK;if(!_0x5d0746)throw CliErrors[_0x2098f3(0x225)](_0x2098f3(0x1c5)+PRODUCT_CONFIG[_0x2098f3(0x1ea)]+'.');const _0x3f942c=getApiDomain()[_0x2098f3(0x1d5)](/\/$/,''),_0x5ea949=new URL(_0x4fa981,_0x3f942c+_0x2098f3(0x1ce));if(_0x50b6c3)for(const [_0x2d0e57,_0x5cddf4]of Object['entries'](_0x50b6c3)){_0x5cddf4!==undefined&&_0x5cddf4!==null&&_0x5ea949[_0x2098f3(0x21b)][_0x2098f3(0x1f4)](_0x2d0e57,String(_0x5cddf4));}const _0x361c08=new AbortController(),_0x2fc7fa=setTimeout(()=>_0x361c08['abort'](),timeout);try{const _0x4523fe=await fetch(_0x5ea949,{'method':method,'headers':{'Content-Type':_0x2098f3(0x207),'X-Invoke-Source':PRODUCT_CONFIG[_0x2098f3(0x1c2)],'X-User-AK':_0x5d0746,...headers},'signal':_0x361c08['signal']}),_0x22d753=await decodeResponseBody(_0x4523fe);if(!_0x22d753[_0x2098f3(0x1e2)]){throwIfRateLimited(_0x4523fe,undefined,_0x22d753[_0x2098f3(0x1cd)]);throw CliErrors[_0x2098f3(0x230)](_0x2098f3(0x248)+_0x4523fe[_0x2098f3(0x208)]+')',_0x4523fe[_0x2098f3(0x208)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x4bf732=_0x22d753[_0x2098f3(0x212)];throwIfRateLimited(_0x4523fe,_0x4bf732);if(!_0x4523fe['ok']){const _0x3a2023=_0x4bf732&&typeof _0x4bf732===_0x2098f3(0x1e0)?_0x4bf732:{};throw CliErrors[_0x2098f3(0x230)](_0x3a2023[_0x2098f3(0x1f8)]||_0x3a2023[_0x2098f3(0x1f5)]||_0x2098f3(0x20b)+_0x4523fe[_0x2098f3(0x208)],_0x3a2023[_0x2098f3(0x249)]?_0x2098f3(0x237)+_0x3a2023[_0x2098f3(0x249)]:undefined);}if(_0x4bf732&&typeof _0x4bf732===_0x2098f3(0x1e0)&&'success'in _0x4bf732&&typeof _0x4bf732[_0x2098f3(0x227)]===_0x2098f3(0x1ee)){const _0x496a66=_0x4bf732;if(!_0x496a66[_0x2098f3(0x227)])throw CliErrors['apiError'](_0x496a66['errorMsg']||_0x496a66[_0x2098f3(0x1f5)]||'Toolbox\x20API\x20error',_0x496a66['errorCode']?'Toolbox\x20error\x20code:\x20'+_0x496a66[_0x2098f3(0x249)]:undefined);return _0x496a66[_0x2098f3(0x212)];}return _0x4bf732;}catch(_0x4861f4){if(_0x4861f4 instanceof Error&&_0x4861f4['name']==='AbortError')throw CliErrors['apiError'](_0x2098f3(0x24b)+_0x5ea949[_0x2098f3(0x222)]());throw _0x4861f4;}finally{clearTimeout(_0x2fc7fa);}}async function skillHubJsonRequest(_0x473e0d,_0xf9a834={}){const _0x2517ff=a75_0xdadf,{method:method=_0x2517ff(0x1d1),query:_0x537329,body:_0x641fe0,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0xf9a834,_0x3d9c6a=_activeAK;if(!_0x3d9c6a)throw CliErrors[_0x2517ff(0x225)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x2517ff(0x1ea)]+'.');const _0x1a269d=getSkillHubDomain()[_0x2517ff(0x1d5)](/\/$/,''),_0x14ad6a=new URL(_0x473e0d,_0x1a269d+'/');if(_0x537329)for(const [_0x1c47b2,_0x10f4ea]of Object[_0x2517ff(0x215)](_0x537329)){_0x10f4ea!==undefined&&_0x10f4ea!==null&&_0x14ad6a[_0x2517ff(0x21b)][_0x2517ff(0x1f4)](_0x1c47b2,String(_0x10f4ea));}const _0x2452c3=new AbortController(),_0x5bc9a6=setTimeout(()=>_0x2452c3[_0x2517ff(0x247)](),timeout);try{const _0x1f7e1c=await fetch(_0x14ad6a[_0x2517ff(0x222)](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x2517ff(0x1c2)],'X-User-AK':_0x3d9c6a,...headers},'body':_0x641fe0,'signal':_0x2452c3[_0x2517ff(0x202)]}),_0x213aae=await decodeResponseBody(_0x1f7e1c);if(!_0x213aae[_0x2517ff(0x1e2)]){if(allowNotFound&&_0x1f7e1c[_0x2517ff(0x208)]===0x194)return undefined;throwIfRateLimited(_0x1f7e1c,undefined,_0x213aae['text']);throw CliErrors[_0x2517ff(0x230)](_0x2517ff(0x240)+_0x1f7e1c[_0x2517ff(0x208)]+')',_0x1f7e1c[_0x2517ff(0x208)]>=0x190?_0x2517ff(0x1eb):undefined);}const _0x5657c3=_0x213aae[_0x2517ff(0x212)];throwIfRateLimited(_0x1f7e1c,_0x5657c3);if(allowNotFound&&isSkillHubNotFoundResponse(_0x1f7e1c[_0x2517ff(0x208)],_0x5657c3))return undefined;const _0x262884=!_0x1f7e1c['ok']||_0x5657c3?.['success']===![]||typeof _0x5657c3?.[_0x2517ff(0x24d)]===_0x2517ff(0x203)&&_0x5657c3[_0x2517ff(0x24d)]>=0x190;if(_0x262884)throw CliErrors[_0x2517ff(0x230)](_0x5657c3?.[_0x2517ff(0x1f8)]||_0x5657c3?.['message']||_0x5657c3?.[_0x2517ff(0x21e)]||_0x2517ff(0x1e7)+_0x1f7e1c[_0x2517ff(0x208)],_0x5657c3?.[_0x2517ff(0x249)]?_0x2517ff(0x1c8)+_0x5657c3[_0x2517ff(0x249)]:undefined);return _0x5657c3?.[_0x2517ff(0x212)]??_0x5657c3;}catch(_0x6a4698){if(_0x6a4698 instanceof Error&&_0x6a4698[_0x2517ff(0x205)]==='AbortError')throw CliErrors[_0x2517ff(0x230)](_0x2517ff(0x24b)+_0x14ad6a[_0x2517ff(0x222)]());throw _0x6a4698;}finally{clearTimeout(_0x5bc9a6);}}function isSkillHubNotFoundResponse(_0x6e9558,_0x4f9cee){const _0x41cbf5=a75_0xdadf;if(_0x6e9558===0x194||_0x4f9cee?.['code']===0x194)return!![];if(_0x6e9558!==0x190&&_0x4f9cee?.[_0x41cbf5(0x24d)]!==0x190)return![];const _0x53553f=[_0x4f9cee?.[_0x41cbf5(0x21e)],_0x4f9cee?.[_0x41cbf5(0x1f5)],_0x4f9cee?.['errorMsg'],_0x4f9cee?.[_0x41cbf5(0x22a)]][_0x41cbf5(0x234)](_0x4042d5=>typeof _0x4042d5===_0x41cbf5(0x1ef))[_0x41cbf5(0x1ec)]('\x20');return/skill not found\b/i['test'](_0x53553f);}async function skillHubBinaryRequest(_0x169e04,_0x4a3af3={}){const _0x1e44c3=a75_0xdadf,{query:_0x81a9d,headers:headers={},timeout:timeout=0x7530}=_0x4a3af3,_0x1662b5=_activeAK;if(!_0x1662b5)throw CliErrors[_0x1e44c3(0x225)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x435819=getSkillHubDomain()['replace'](/\/$/,''),_0x524dc7=new URL(_0x169e04,_0x435819+'/');if(_0x81a9d)for(const [_0x491cc4,_0x1982e5]of Object['entries'](_0x81a9d)){_0x1982e5!==undefined&&_0x1982e5!==null&&_0x524dc7['searchParams'][_0x1e44c3(0x1f4)](_0x491cc4,String(_0x1982e5));}const _0x4ff66f=new AbortController(),_0x2ac13a=setTimeout(()=>_0x4ff66f[_0x1e44c3(0x247)](),timeout);try{const _0x2f85c8=await fetch(_0x524dc7['toString'](),{'method':_0x1e44c3(0x1d1),'headers':{'Accept':'application/octet-stream','X-Invoke-Source':PRODUCT_CONFIG[_0x1e44c3(0x1c2)],'X-User-AK':_0x1662b5,...headers},'signal':_0x4ff66f['signal']});if(!_0x2f85c8['ok']){const _0x3351e0=await decodeResponseBody(_0x2f85c8),_0x320297=_0x3351e0[_0x1e44c3(0x212)]&&typeof _0x3351e0[_0x1e44c3(0x212)]===_0x1e44c3(0x1e0)?_0x3351e0[_0x1e44c3(0x212)]:{},_0x2df49f=firstString(_0x320297[_0x1e44c3(0x1f8)],_0x320297[_0x1e44c3(0x1f5)],_0x320297[_0x1e44c3(0x21e)],_0x320297['errorCode'],_0x3351e0[_0x1e44c3(0x1cd)]);throwIfRateLimited(_0x2f85c8,_0x3351e0[_0x1e44c3(0x212)],_0x2df49f);throw CliErrors[_0x1e44c3(0x230)](_0x2df49f||'SkillHub\x20API\x20error:\x20'+_0x2f85c8[_0x1e44c3(0x208)],_0x1e44c3(0x1c3)+_0x524dc7[_0x1e44c3(0x222)]());}return Buffer['from'](await _0x2f85c8[_0x1e44c3(0x213)]());}catch(_0x7ed42c){if(_0x7ed42c instanceof Error&&_0x7ed42c['name']===_0x1e44c3(0x23f))throw CliErrors[_0x1e44c3(0x230)](_0x1e44c3(0x24b)+_0x524dc7[_0x1e44c3(0x222)]());throw _0x7ed42c;}finally{clearTimeout(_0x2ac13a);}}export async function getBffEndpointContract(_0x25b8bc,_0x39d27e){const _0x2fe830=a75_0xdadf;if(_0x39d27e===_0x2fe830(0x22e))throw CliErrors[_0x2fe830(0x1c7)](_0x2fe830(0x24c)+_0x25b8bc+_0x2fe830(0x23c)+_0x39d27e);const _0x286f2c=await apiRequest(_0x2fe830(0x219)+encodeURIComponent(_0x25b8bc)+'/'+encodeURIComponent(_0x39d27e)),_0x196bc4=_0x286f2c[_0x2fe830(0x212)];if(!_0x196bc4||typeof _0x196bc4!==_0x2fe830(0x1e0)||Array[_0x2fe830(0x20e)](_0x196bc4)||_0x196bc4['appCode']!==_0x25b8bc||_0x196bc4[_0x2fe830(0x1fb)]!==_0x39d27e)throw CliErrors[_0x2fe830(0x1c7)]('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x25b8bc+',\x20name='+_0x39d27e);return{'appCode':_0x196bc4[_0x2fe830(0x21c)],'functionName':_0x196bc4[_0x2fe830(0x1fb)],'description':_0x196bc4[_0x2fe830(0x1e9)],'version':_0x196bc4[_0x2fe830(0x20c)],'gmtModified':_0x196bc4[_0x2fe830(0x1d2)]};}export async function getSqlQueryInfo(_0x35bbac,_0x970066){const _0x205225=a75_0xdadf,_0xc37079=await apiRequest(_0x205225(0x1e6),{'method':_0x205225(0x1fd),'body':{'appCode':_0x35bbac,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x970066}}),_0x12e86c=_0xc37079[_0x205225(0x212)],_0x3e98e1=_0x12e86c&&typeof _0x12e86c===_0x205225(0x1e0)&&_0x205225(0x1df)in _0x12e86c?_0x12e86c['tableData']?.[0x0]:_0x12e86c&&typeof _0x12e86c===_0x205225(0x1e0)&&'sqlCode'in _0x12e86c?_0x12e86c:undefined;if(!_0x3e98e1)throw CliErrors[_0x205225(0x1c7)]('SQL\x20query\x20not\x20found:\x20'+_0x970066);return _0x3e98e1;}function isRemoteAppItem(_0x5b1448){const _0x48b318=a75_0xdadf;return!!_0x5b1448&&typeof _0x5b1448===_0x48b318(0x1e0)&&typeof _0x5b1448[_0x48b318(0x21c)]===_0x48b318(0x1ef)&&typeof _0x5b1448[_0x48b318(0x22c)]===_0x48b318(0x1ef);}function extractRemoteAppItems(_0x273f34){const _0x1225b9=a75_0xdadf;if(Array[_0x1225b9(0x20e)](_0x273f34))return _0x273f34[_0x1225b9(0x234)](isRemoteAppItem);if(!_0x273f34||typeof _0x273f34!==_0x1225b9(0x1e0))throw CliErrors[_0x1225b9(0x230)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x5434ba=_0x273f34;if(Array[_0x1225b9(0x20e)](_0x5434ba[_0x1225b9(0x1df)]))return _0x5434ba[_0x1225b9(0x1df)][_0x1225b9(0x234)](isRemoteAppItem);if(_0x5434ba['data']&&typeof _0x5434ba[_0x1225b9(0x212)]==='object'){const _0xd703c=_0x5434ba['data'];if(Array[_0x1225b9(0x20e)](_0xd703c[_0x1225b9(0x1df)]))return _0xd703c[_0x1225b9(0x1df)]['filter'](isRemoteAppItem);}throw CliErrors[_0x1225b9(0x230)](_0x1225b9(0x21f));}export async function getMyApps(){const _0x3f82cb=a75_0xdadf,_0x44ef11=await apiRequest(_0x3f82cb(0x24e));return extractRemoteAppItems(_0x44ef11[_0x3f82cb(0x212)]);}export async function getLoginUserInfo(){const _0x47d037=a75_0xdadf,_0x381090=await apiRequest('/client/user/loginUserInfo');if(!_0x381090['data']||typeof _0x381090['data']!=='object'||Array[_0x47d037(0x20e)](_0x381090[_0x47d037(0x212)]))throw CliErrors['apiError'](_0x47d037(0x1ca));return _0x381090['data'];}export async function listDatasets(_0x4083c3,_0x2d86c3){const _0xea2ba=a75_0xdadf,_0x381c0c=await apiRequest('/client/dataset/list',{'method':'POST','body':{'appCode':_0x4083c3,..._0x2d86c3?.[_0xea2ba(0x24d)]&&{'code':_0x2d86c3[_0xea2ba(0x24d)]},..._0x2d86c3?.[_0xea2ba(0x205)]&&{'name':_0x2d86c3[_0xea2ba(0x205)]}}});return extractList(_0x381c0c[_0xea2ba(0x212)]);}export async function getDatasetDetail(_0x2603c5){const _0x478de6=a75_0xdadf,_0x2fc5a7=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0x2603c5));return _0x2fc5a7[_0x478de6(0x212)];}export async function getDatasetSdkUsageDoc(_0xcd933a,_0x40b141){const _0x2d3b7c=a75_0xdadf,_0x1e28b9=await toolboxRequest('api-doc-generator',{'datasetCode':_0xcd933a,'appCode':_0x40b141});return typeof _0x1e28b9?.[_0x2d3b7c(0x216)]===_0x2d3b7c(0x1ef)?_0x1e28b9[_0x2d3b7c(0x216)]:'';}export async function uploadRuntimeFile(_0x404f8e,_0xb0e189){const _0x40f8e4=a75_0xdadf,_0x1a03a5=await readFile(_0xb0e189),_0x3b33ba=new FormData();_0x3b33ba[_0x40f8e4(0x1c9)](_0x40f8e4(0x21c),_0x404f8e),_0x3b33ba[_0x40f8e4(0x1c9)](_0x40f8e4(0x20f),new Blob([new Uint8Array(_0x1a03a5)]),basename(_0xb0e189));const _0x22723b=await apiFormRequest(_0x40f8e4(0x224),_0x3b33ba);return _0x22723b[_0x40f8e4(0x212)];}export async function queryRuntimeFileUrl(_0x4045c4,_0x252032={}){const _0x4e5fd9=a75_0xdadf,_0xca97d0=await apiRequest(_0x4e5fd9(0x223),{'method':_0x4e5fd9(0x1fd),'body':{'filePath':_0x4045c4,'downloadFlag':_0x252032['download']??![],..._0x252032[_0x4e5fd9(0x1d0)]?{'longTerm':!![]}:{}}});return _0xca97d0[_0x4e5fd9(0x212)];}export async function recognizeRuntimeOcr(_0x3968d6,_0x4663ef){const _0x529260=a75_0xdadf,_0x2227fe=await apiRequest(_0x529260(0x233),{'method':_0x529260(0x1fd),'body':{'appCode':_0x3968d6,'url':_0x4663ef[_0x529260(0x23e)],'type':_0x4663ef['type']}});return _0x2227fe['data'];}export async function getRuntimeAppConfigByKey(_0x29b9fa,_0x28973b){const _0x1492e4=a75_0xdadf,_0x43047f=new URLSearchParams({'appCode':_0x29b9fa,'key':_0x28973b}),_0xe9e992=await apiRequest('/client/app-config/getByKey?'+_0x43047f[_0x1492e4(0x222)]());if(typeof _0xe9e992[_0x1492e4(0x212)]!==_0x1492e4(0x1ef))throw CliErrors[_0x1492e4(0x1c7)](_0x1492e4(0x1d9)+_0x28973b);return _0xe9e992[_0x1492e4(0x212)];}export async function listRuntimeArtifacts(_0x4c6072,_0x4ae601){const _0x2ef066=a75_0xdadf,_0x3abef4=new URLSearchParams({'appCode':_0x4c6072});if(_0x4ae601?.[_0x2ef066(0x235)])_0x3abef4[_0x2ef066(0x1f4)](_0x2ef066(0x235),_0x4ae601[_0x2ef066(0x235)]);if(_0x4ae601?.[_0x2ef066(0x220)])_0x3abef4[_0x2ef066(0x1f4)](_0x2ef066(0x220),_0x4ae601['source']);if(_0x4ae601?.[_0x2ef066(0x218)]!==undefined)_0x3abef4['set'](_0x2ef066(0x218),String(_0x4ae601[_0x2ef066(0x218)]));const _0x4f30e8=await apiRequest(_0x2ef066(0x204)+_0x3abef4[_0x2ef066(0x222)]());return Array[_0x2ef066(0x20e)](_0x4f30e8[_0x2ef066(0x212)])?_0x4f30e8[_0x2ef066(0x212)]:[];}export async function getRuntimeArtifact(_0x241114,_0x412a51){const _0x3d5956=a75_0xdadf,_0x10691c=await apiRequest(_0x3d5956(0x211)+_0x241114+'?appCode='+encodeURIComponent(_0x412a51));if(!_0x10691c[_0x3d5956(0x212)])throw CliErrors[_0x3d5956(0x1c7)](_0x3d5956(0x21d)+_0x241114);return _0x10691c[_0x3d5956(0x212)];}export async function createRuntimeArtifact(_0x511a5b,_0x4a0287){const _0x2aa08e=a75_0xdadf,_0xb8d3e=await apiRequest(_0x2aa08e(0x229),{'method':_0x2aa08e(0x1fd),'body':{'appCode':_0x511a5b,..._0x4a0287}});return _0xb8d3e['data'];}export async function updateRuntimeArtifact(_0x370edc,_0x318525,_0x1c117b){const _0x498f44=a75_0xdadf,_0x2b6549=await apiRequest(_0x498f44(0x211)+_0x370edc+'/update',{'method':'POST','body':{'appCode':_0x318525,..._0x1c117b}});return _0x2b6549[_0x498f44(0x212)];}export async function listPersonalBffs(_0x3559ec){const _0x544c3a=a75_0xdadf,_0x5a32e4=await apiRequest(_0x544c3a(0x200)+encodeURIComponent(_0x3559ec));return Array[_0x544c3a(0x20e)](_0x5a32e4[_0x544c3a(0x212)])?_0x5a32e4[_0x544c3a(0x212)]:[];}export async function getPersonalBff(_0x53b5f0,_0x3e2b5a){const _0x2a8561=a75_0xdadf,_0x4a82b8=await apiRequest(_0x2a8561(0x1e8)+_0x53b5f0+'?appCode='+encodeURIComponent(_0x3e2b5a));if(!_0x4a82b8[_0x2a8561(0x212)])throw CliErrors[_0x2a8561(0x1c7)](_0x2a8561(0x24f)+_0x53b5f0);return _0x4a82b8[_0x2a8561(0x212)];}export async function createPersonalBff(_0x49b28d,_0x583c95){const _0x5683b3=a75_0xdadf,_0xdd89e1=await apiRequest(_0x5683b3(0x1fc),{'method':'POST','body':{'appCode':_0x49b28d,..._0x583c95}});return _0xdd89e1[_0x5683b3(0x212)];}function a75_0x5185(){const _0x3b3b00=['undefined','isArray','file','3VnuSEK','/client/artifact/','data','arrayBuffer','/versions/','entries','markdown','/skills','favorite','/client/bff/endpoint/','slug','searchParams','appCode','Artifact\x20not\x20found:\x20id=','msg','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','source','/client/knowledge-base/personal/','toString','/client/queryFileUrl','/client/uploadFile','authRequired','scope','success','headlineVersion','/client/artifact/create','error','confirmWarnings','appName','/api/v1/skills/','functions','namespace','apiError','PRIVATE','API\x20error:\x20','/client/ocr','filter','artifactType','from','Toolbox\x20error\x20code:\x20','?appCode=','/api/runtime/v1/namespaces/','topK','231921iOoOPZ',',\x20name=','/publish/validate','url','AbortError','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','warnings','visibility','skillName','values','valid','summary','abort','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','errorCode','displayName','Request\x20timeout:\x20','BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','code','/client/app/my-apps','Personal\x20BFF\x20not\x20found:\x20id=','.zip','company','invokeSource','Download\x20failed:\x20','effective','Configure\x20accessKey\x20in\x20','tags','validation','SkillHub\x20error\x20code:\x20','append','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','2112wMrvKu','errors','text','/api/node-toolbox/','10822LmHcAt','longTerm','GET','gmtModified','application/zip','map','replace','API\x20error\x20code:\x20','json','Knowledge-base\x20entry\x20not\x20found:\x20id=','Invalid\x20app\x20config\x20value:\x20key=','resolvedSlug','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','trim','/client/knowledge-base/search','ownerPreviewVersion','tableData','object','/publish','isJson','/update','items','520698emNAcd','/client/sql/query','SkillHub\x20API\x20error:\x20','/client/runtime-bff/personal/','description','newConfigFileName','Check\x20your\x20credentials\x20and\x20try\x20again.','join','1462530CfzxTD','boolean','string','find','/download','personal','3059800VxZhBd','set','message','152TOZSuX','1469908yHxOcV','errorMsg','1126560aLsNXN','/api/cli/v1/skills/','functionName','/client/runtime-bff/personal/create','POST','skillCode','content','/client/runtime-bff/personal/list?appCode=','skill','signal','number','/client/artifact/list?','name','toLowerCase','application/json','status','all','/client/knowledge-base/personal/list?appCode=','Toolbox\x20API\x20error:\x20','version'];a75_0x5185=function(){return _0x3b3b00;};return a75_0x5185();}export async function updatePersonalBff(_0x1667f5,_0x1da467,_0xaa9698){const _0x351b77=a75_0xdadf,_0x3eddaf=await apiRequest(_0x351b77(0x1e8)+_0x1667f5+_0x351b77(0x1e3),{'method':_0x351b77(0x1fd),'body':{'appCode':_0x1da467,..._0xaa9698}});return _0x3eddaf[_0x351b77(0x212)];}export async function executePersonalBff(_0xfc49fe,_0x44c99c,_0x4aa5b6){const _0x5b345a=a75_0xdadf,_0x3e6dca=await apiRequest(_0x5b345a(0x1e8)+_0xfc49fe+'/execute?appCode='+encodeURIComponent(_0x44c99c),{'method':_0x5b345a(0x1fd),'body':_0x4aa5b6});return _0x3e6dca[_0x5b345a(0x212)];}export async function listPersonalKnowledgeBaseItems(_0x818814){const _0x521a60=a75_0xdadf,_0x63a51c=await apiRequest(_0x521a60(0x20a)+encodeURIComponent(_0x818814));return Array[_0x521a60(0x20e)](_0x63a51c['data'])?_0x63a51c[_0x521a60(0x212)]:[];}export async function getPersonalKnowledgeBaseItem(_0x4dfff4,_0x3b7b3c){const _0x3672ac=a75_0xdadf,_0x52650c=await apiRequest(_0x3672ac(0x221)+_0x4dfff4+_0x3672ac(0x238)+encodeURIComponent(_0x3b7b3c));if(!_0x52650c[_0x3672ac(0x212)])throw CliErrors[_0x3672ac(0x1c7)](_0x3672ac(0x1d8)+_0x4dfff4);return _0x52650c[_0x3672ac(0x212)];}export async function createPersonalKnowledgeBaseItem(_0x1bdc16,_0x2569c7){const _0x58c5b9=a75_0xdadf,_0x2d973=await apiRequest('/client/knowledge-base/personal/create',{'method':_0x58c5b9(0x1fd),'body':{'appCode':_0x1bdc16,..._0x2569c7}});return _0x2d973['data'];}export async function updatePersonalKnowledgeBaseItem(_0x2a6c44,_0x2bcca5,_0x4dc2ea){const _0xe4e4ef=a75_0xdadf,_0x4e76a3=await apiRequest(_0xe4e4ef(0x221)+_0x2a6c44+_0xe4e4ef(0x1e3),{'method':_0xe4e4ef(0x1fd),'body':{'appCode':_0x2bcca5,..._0x4dc2ea}});return _0x4e76a3[_0xe4e4ef(0x212)];}export async function searchKnowledgeBase(_0x471893,_0x44983f){const _0x30173b=a75_0xdadf,_0x1f5a31=await apiRequest(_0x30173b(0x1dd),{'method':_0x30173b(0x1fd),'body':{'appCode':_0x471893,'query':_0x44983f['query'],..._0x44983f[_0x30173b(0x23a)]!==undefined?{'topK':_0x44983f[_0x30173b(0x23a)]}:{}}});return Array[_0x30173b(0x20e)](_0x1f5a31[_0x30173b(0x212)])?_0x1f5a31[_0x30173b(0x212)]:[];}export async function getRuntimeSkillByCode(_0x3a0602,_0x41e176){const _0x28487e=a75_0xdadf,_0x3affd4=await skillHubJsonRequest(_0x28487e(0x22d)+encodeURIComponent(_0x3a0602)+'/'+encodeURIComponent(_0x41e176),{'allowNotFound':!![]});return _0x3affd4?skillHubRuntimeDetailToRuntimeSkill(_0x3affd4):undefined;}export async function listRuntimeSkills(_0x22754f){const _0x2145ed=a75_0xdadf,_0x5d2e84=await skillHubJsonRequest(_0x2145ed(0x239)+encodeURIComponent(_0x22754f[_0x2145ed(0x21c)])+_0x2145ed(0x217),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x22754f[_0x2145ed(0x21c)],_0x5d2e84,_0x22754f['scope']??_0x2145ed(0x209),_0x22754f[_0x2145ed(0x24d)]);}export async function listPersonalRuntimeSkills(_0x1007ce){const _0x4e54b5=a75_0xdadf;return(await listRuntimeSkills({'appCode':_0x1007ce,'scope':'personal'}))[_0x4e54b5(0x1f2)];}export async function listCompanyRuntimeSkills(_0x4b61cf){const _0x10b5a0=a75_0xdadf;return(await listRuntimeSkills({'appCode':_0x4b61cf,'scope':_0x10b5a0(0x251)}))['company'];}export async function listVisibleRuntimeSkills(_0x3fa56e){const _0x157a8a=a75_0xdadf;return(await listRuntimeSkills({'appCode':_0x3fa56e,'scope':'all'}))[_0x157a8a(0x1c4)];}export async function createPersonalRuntimeSkill(_0x80c5df,_0x271d47,_0x46bea9={}){const _0x4ecd50=a75_0xdadf;return publishRuntimeSkill(_0x80c5df,_0x271d47,{'visibility':_0x4ecd50(0x231),'confirmWarnings':_0x46bea9[_0x4ecd50(0x22b)]});}export async function updatePersonalRuntimeSkill(_0x2fed89,_0x435803,_0x2519f2,_0x273bca={}){const _0x795c7d=a75_0xdadf;return publishRuntimeSkill(_0x435803,{..._0x2519f2,'skillCode':_0x2519f2['skillCode']??_0x2fed89},{'visibility':'PRIVATE','confirmWarnings':_0x273bca[_0x795c7d(0x22b)]});}export async function publishCompanyRuntimeSkill(_0x3fb3ea,_0x30a510,_0x56bbe1={}){const _0x422c3b=a75_0xdadf;return publishRuntimeSkill(_0x3fb3ea,_0x30a510,{'visibility':'NAMESPACE_ONLY','confirmWarnings':_0x56bbe1[_0x422c3b(0x22b)]});}export async function validateRuntimeSkillPublish(_0xe681c0,_0x5565e0,_0x564472){const _0x48b710=a75_0xdadf,_0x3d8b6e=buildRuntimeSkillPublishForm(_0x5565e0,_0x564472[_0x48b710(0x242)]),_0x5b6746=await skillHubJsonRequest(_0x48b710(0x1fa)+encodeURIComponent(_0xe681c0)+_0x48b710(0x23d),{'method':_0x48b710(0x1fd),'body':_0x3d8b6e});return{'valid':_0x5b6746[_0x48b710(0x245)]===!![],'errors':Array[_0x48b710(0x20e)](_0x5b6746['errors'])?_0x5b6746[_0x48b710(0x1cc)]:[],'warnings':Array['isArray'](_0x5b6746[_0x48b710(0x241)])?_0x5b6746['warnings']:[],'resolvedSlug':_0x5b6746[_0x48b710(0x1da)],'resolvedVersion':_0x5b6746['resolvedVersion']};}export async function downloadRuntimeSkillPackage(_0xcc91e2,_0x263010,_0x466d78,_0xc72f50){const _0x47d055=a75_0xdadf;void _0xcc91e2;const _0xb48776=_0xc72f50?_0x47d055(0x1fa)+encodeURIComponent(_0x466d78)+'/'+encodeURIComponent(_0x263010)+_0x47d055(0x214)+encodeURIComponent(_0xc72f50)+'/download':_0x47d055(0x1fa)+encodeURIComponent(_0x466d78)+'/'+encodeURIComponent(_0x263010)+_0x47d055(0x1f1);return skillHubBinaryRequest(_0xb48776);}async function publishRuntimeSkill(_0x1ebaa7,_0x4b8f47,_0x24788b){const _0x1159db=a75_0xdadf,_0x21d612=buildRuntimeSkillPublishForm(_0x4b8f47,_0x24788b[_0x1159db(0x242)]),_0x420cbf=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x1ebaa7)+_0x1159db(0x1e1),{'method':_0x1159db(0x1fd),'query':{'confirmWarnings':_0x24788b[_0x1159db(0x22b)]===!![]?!![]:undefined},'body':_0x21d612});return{'appCode':_0x420cbf['namespace']??_0x1ebaa7,'skillCode':_0x420cbf[_0x1159db(0x21a)]??_0x4b8f47[_0x1159db(0x1fe)]??'','skillName':_0x4b8f47[_0x1159db(0x243)]??_0x420cbf[_0x1159db(0x21a)]??_0x4b8f47['skillCode'],'description':_0x4b8f47[_0x1159db(0x1e9)],'scope':skillHubVisibilityToScope(_0x420cbf[_0x1159db(0x242)]??_0x24788b[_0x1159db(0x242)])??_0x1159db(0x1f2),'version':_0x420cbf['version']??_0x4b8f47[_0x1159db(0x20c)],'tags':_0x4b8f47[_0x1159db(0x1c6)],'content':_0x4b8f47[_0x1159db(0x1ff)]};}function buildRuntimeSkillPublishForm(_0x43d959,_0x5acf50){const _0x54d60e=a75_0xdadf,_0xd7d7b6=new FormData();return _0xd7d7b6[_0x54d60e(0x1f4)](_0x54d60e(0x20f),runtimeSkillPackageFile(_0x43d959)),_0x43d959[_0x54d60e(0x243)]?.['trim']()&&_0xd7d7b6[_0x54d60e(0x1f4)](_0x54d60e(0x24a),_0x43d959[_0x54d60e(0x243)][_0x54d60e(0x1dc)]()),_0xd7d7b6['set']('visibility',_0x5acf50),_0xd7d7b6;}function runtimeSkillPackageFile(_0x168b1c){const _0x3bd84=a75_0xdadf;if(!_0x168b1c['packageBase64'])throw CliErrors[_0x3bd84(0x1c7)]('Missing\x20Skill\x20package\x20payload.');const _0x18df4b=Buffer[_0x3bd84(0x236)](_0x168b1c['packageBase64'],'base64'),_0x2c429a=new Blob([_0x18df4b],{'type':_0x3bd84(0x1d3)}),_0x4b6d14=(_0x168b1c[_0x3bd84(0x1fe)]||_0x3bd84(0x201))+_0x3bd84(0x250);if(typeof File!==_0x3bd84(0x20d))return new File([_0x2c429a],_0x4b6d14,{'type':_0x3bd84(0x1d3)});return _0x2c429a;}function normalizeSkillHubRuntimeListResponse(_0x15c45e,_0x21bbab,_0x35699b,_0x1727f4){const _0x16beea=a75_0xdadf,_0x5f1eeb=Array[_0x16beea(0x20e)](_0x21bbab)?_0x21bbab:Array[_0x16beea(0x20e)](_0x21bbab?.[_0x16beea(0x1e4)])?_0x21bbab[_0x16beea(0x1e4)]:[],_0x3d5356=_0x1727f4?.['trim'](),_0x4a3838=_0x5f1eeb['filter'](_0x5392f9=>!_0x3d5356||_0x5392f9[_0x16beea(0x21a)]===_0x3d5356)[_0x16beea(0x1d4)](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x22f223=>Boolean(_0x22f223)),_0x492a4e=_0x4a3838[_0x16beea(0x234)](_0x2e9e65=>_0x2e9e65[_0x16beea(0x226)]===_0x16beea(0x1f2)),_0x247e3e=_0x4a3838[_0x16beea(0x234)](_0x596b24=>_0x596b24[_0x16beea(0x226)]===_0x16beea(0x251));return{'appCode':_0x15c45e,'personal':_0x35699b===_0x16beea(0x251)?[]:_0x492a4e,'company':_0x35699b===_0x16beea(0x1f2)?[]:_0x247e3e,'effective':buildEffectiveRuntimeSkills(_0x492a4e,_0x247e3e,_0x35699b)};}function skillHubRuntimeItemToRuntimeSkill(_0x30cf9b){const _0xf754d3=a75_0xdadf,_0x238221=_0x30cf9b['slug']?.['trim'](),_0x5b4807=skillHubVisibilityToScope(_0x30cf9b[_0xf754d3(0x242)]);if(!_0x238221||!_0x5b4807)return undefined;return{'id':_0x30cf9b['id'],'appCode':_0x30cf9b[_0xf754d3(0x22f)],'skillCode':_0x238221,'skillName':_0x30cf9b[_0xf754d3(0x24a)]??_0x238221,'description':_0x30cf9b[_0xf754d3(0x246)],'scope':_0x5b4807,'version':skillHubRuntimeItemVersion(_0x30cf9b),'status':_0x30cf9b[_0xf754d3(0x208)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x49ea97){const _0x47d420=a75_0xdadf,_0x20d1fc=_0x49ea97['slug']?.['trim']();if(!_0x20d1fc)return undefined;return{'id':_0x49ea97['id'],'appCode':_0x49ea97[_0x47d420(0x22f)],'skillCode':_0x20d1fc,'skillName':_0x49ea97[_0x47d420(0x24a)]??_0x20d1fc,'description':_0x49ea97['summary'],'example':_0x49ea97['example'],'scope':skillHubVisibilityToScope(_0x49ea97[_0x47d420(0x242)])??_0x49ea97[_0x47d420(0x242)]?.[_0x47d420(0x206)](),'version':skillHubRuntimeItemVersion(_0x49ea97),'status':_0x49ea97[_0x47d420(0x208)]};}function skillHubVisibilityToScope(_0x56afd9){const _0x7401d2=a75_0xdadf;if(_0x56afd9===_0x7401d2(0x231))return _0x7401d2(0x1f2);if(_0x56afd9==='NAMESPACE_ONLY')return _0x7401d2(0x251);return undefined;}function skillHubRuntimeItemVersion(_0x535518){const _0x4b6a9e=a75_0xdadf;return _0x535518['publishedVersion']?.[_0x4b6a9e(0x20c)]??_0x535518[_0x4b6a9e(0x228)]?.['version']??_0x535518[_0x4b6a9e(0x1de)]?.[_0x4b6a9e(0x20c)];}function buildEffectiveRuntimeSkills(_0x13318b,_0x147c6e,_0x3e6084){const _0x1e6b97=a75_0xdadf;if(_0x3e6084===_0x1e6b97(0x1f2))return _0x13318b;if(_0x3e6084==='company')return _0x147c6e;const _0x15fc84=new Map();for(const _0xf87abd of _0x147c6e){_0x15fc84[_0x1e6b97(0x1f4)](_0xf87abd[_0x1e6b97(0x1fe)],_0xf87abd);}for(const _0x38bcbc of _0x13318b){_0x15fc84[_0x1e6b97(0x1f4)](_0x38bcbc[_0x1e6b97(0x1fe)],_0x38bcbc);}return Array['from'](_0x15fc84[_0x1e6b97(0x244)]());}function normalizeRuntimeSkillListResponse(_0x177680,_0x32a239){const _0x248bc5=a75_0xdadf;if(Array['isArray'](_0x32a239)){const _0xdde597=_0x32a239[_0x248bc5(0x234)](_0x562102=>_0x562102[_0x248bc5(0x226)]==='personal'),_0x813443=_0x32a239[_0x248bc5(0x234)](_0x557bc5=>_0x557bc5[_0x248bc5(0x226)]==='company');return{'appCode':_0x177680,'personal':_0xdde597,'company':_0x813443,'effective':[..._0x813443,..._0xdde597]};}return{'appCode':_0x32a239?.[_0x248bc5(0x21c)]??_0x177680,'personal':Array[_0x248bc5(0x20e)](_0x32a239?.['personal'])?_0x32a239['personal']:[],'company':Array[_0x248bc5(0x20e)](_0x32a239?.[_0x248bc5(0x251)])?_0x32a239['company']:[],'effective':Array[_0x248bc5(0x20e)](_0x32a239?.[_0x248bc5(0x1c4)])?_0x32a239[_0x248bc5(0x1c4)]:[]};}
|
|
1
|
+
(function(_0x58f41f,_0x3691f8){const _0x5e4fff=a75_0x2432,_0x33f81f=_0x58f41f();while(!![]){try{const _0x1b65f1=parseInt(_0x5e4fff(0x154))/0x1+parseInt(_0x5e4fff(0x100))/0x2+parseInt(_0x5e4fff(0x110))/0x3+parseInt(_0x5e4fff(0x122))/0x4*(parseInt(_0x5e4fff(0x14c))/0x5)+-parseInt(_0x5e4fff(0xf3))/0x6+parseInt(_0x5e4fff(0x113))/0x7*(parseInt(_0x5e4fff(0x12b))/0x8)+parseInt(_0x5e4fff(0x169))/0x9*(-parseInt(_0x5e4fff(0x171))/0xa);if(_0x1b65f1===_0x3691f8)break;else _0x33f81f['push'](_0x33f81f['shift']());}catch(_0x467315){_0x33f81f['push'](_0x33f81f['shift']());}}}(a75_0x27ac,0x8f83a));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';function a75_0x2432(_0x2980cb,_0x14ffb1){_0x2980cb=_0x2980cb-0xe7;const _0x27acef=a75_0x27ac();let _0x24321c=_0x27acef[_0x2980cb];return _0x24321c;}function a75_0x27ac(){const _0x5269fa=['items','/client/knowledge-base/personal/create','?appCode=','AbortError','/client/dataset/get-driven-data?code=','/client/runtime-bff/personal/list?appCode=','application/zip','functions','Invalid\x20app\x20config\x20value:\x20key=','searchParams','text','displayName','description','Knowledge-base\x20entry\x20not\x20found:\x20id=','9FCeEwD','GET','visibility','effective','appName','message','packageBase64','/api/v1/skills/','2499040Lesumh','gmtModified','errorCode','Toolbox\x20API\x20error:\x20',',\x20name=','sqlCode','POST','type','Toolbox\x20error\x20code:\x20','replace','/execute?appCode=','arrayBuffer','url','file','favorite','entries','/api/node-toolbox/','invokeSource','topK','3724590JhkzkI','API\x20error:\x20','validation','/client/app-config/getByKey?','data','object','Missing\x20Skill\x20package\x20payload.','stringify','append','functionName','abort','headers','success','58892muXbvE','confirmWarnings','/api/cli/v1/skills/','slug','application/octet-stream','/client/queryFileUrl','company','tableData','error','version','/client/knowledge-base/personal/list?appCode=','scope','namespace','errors','warnings','undefined','253590GyQPVJ','values','publishedVersion','6368467bGOuXk','/client/artifact/','msg','/publish/validate','join','Download\x20failed:\x20','appCode','content','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/user/loginUserInfo','test','/client/app/my-apps','/update','application/json','source','1656zuXrGb','toString','/versions/','/client/artifact/list?','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','/client/knowledge-base/personal/','Artifact\x20not\x20found:\x20id=','authRequired','trim','8FFOLQe','from','summary','Toolbox\x20API\x20error','isJson','name','API\x20error\x20code:\x20','query','skillCode','newConfigFileName','api-doc-generator','valid','Request\x20timeout:\x20','isArray','/download','/client/uploadFile','Check\x20your\x20credentials\x20and\x20try\x20again.','SQL\x20query\x20not\x20found:\x20','download','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','filter','NAMESPACE_ONLY','apiError','signal','/client/sql/query','Configure\x20accessKey\x20in\x20','/client/runtime-bff/personal/','status','toLowerCase','all','errorMsg','/publish','SkillHub\x20API\x20error:\x20','3485NFbhuk','function','number','/api/runtime/v1/namespaces/','artifactType','set','string','example','146188JlleDG','personal','code','markdown','skillName','PRIVATE','json'];a75_0x27ac=function(){return _0x5269fa;};return a75_0x27ac();}import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x3edf5f){_activeAK=_0x3edf5f||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x55c4ad){const _0x287e8a=a75_0x2432;for(const _0xc25aaf of _0x55c4ad){if(typeof _0xc25aaf===_0x287e8a(0x152)&&_0xc25aaf[_0x287e8a(0x12a)]())return _0xc25aaf['trim']();}return undefined;}async function decodeResponseBody(_0x2fe166){const _0x1925e4=a75_0x2432;if(typeof _0x2fe166[_0x1925e4(0x165)]===_0x1925e4(0x14d))try{const _0x40af67=await _0x2fe166[_0x1925e4(0x165)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x40af67),'text':_0x40af67};}catch{return{'isJson':![],'text':_0x40af67[_0x1925e4(0x12a)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x2fe166[_0x1925e4(0x15a)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x449b6f,_0x84b27e,_0x24d43f){const _0x172bbb=a75_0x2432,_0x2db73a=_0x84b27e&&typeof _0x84b27e===_0x172bbb(0xf8)?_0x84b27e:{},_0x9ac92d=[_0x2db73a[_0x172bbb(0x146)],_0x2db73a[_0x172bbb(0x156)]]['find'](_0x634e5b=>Number(_0x634e5b)===0x1ad),_0x530d79=createRateLimitError({'status':_0x449b6f[_0x172bbb(0x146)]===0x1ad?_0x449b6f[_0x172bbb(0x146)]:_0x9ac92d??_0x449b6f[_0x172bbb(0x146)],'errorCode':firstString(_0x2db73a[_0x172bbb(0x173)],typeof _0x2db73a[_0x172bbb(0x156)]===_0x172bbb(0x152)?_0x2db73a[_0x172bbb(0x156)]:undefined),'message':firstString(_0x2db73a[_0x172bbb(0x149)],_0x2db73a[_0x172bbb(0x16e)],_0x2db73a[_0x172bbb(0x115)],_0x24d43f),'retryAfter':readRetryAfter(_0x449b6f[_0x172bbb(0xfe)])??readRetryAfterSeconds(_0x84b27e)});if(_0x530d79)throw _0x530d79;}async function apiRequest(_0x1ed718,_0x1ee946={}){const _0x28f489=a75_0x2432,{method:method=_0x28f489(0x16a),body:_0x2816c5,headers:headers={},timeout:timeout=0x7530}=_0x1ee946,_0x33496c=_activeAK,_0x22945f=getRuntimeDomain();if(!_0x33496c)throw CliErrors[_0x28f489(0x129)](_0x28f489(0x144)+PRODUCT_CONFIG[_0x28f489(0x134)]+'.');const _0x4caf3d=''+_0x22945f+_0x1ed718,_0x116706={'X-User-AK':_0x33496c},_0x2065e0=new AbortController(),_0x58f1fc=setTimeout(()=>_0x2065e0[_0x28f489(0xfd)](),timeout);try{const _0x5899bd=await fetch(_0x4caf3d,{'method':method,'headers':{'Content-Type':_0x28f489(0x120),'X-Invoke-Source':PRODUCT_CONFIG[_0x28f489(0xf1)],..._0x116706,...headers},'body':_0x2816c5?JSON[_0x28f489(0xfa)](_0x2816c5):undefined,'signal':_0x2065e0[_0x28f489(0x142)]}),_0x5ffef6=await decodeResponseBody(_0x5899bd);if(!_0x5ffef6[_0x28f489(0x12f)]){throwIfRateLimited(_0x5899bd,undefined,_0x5ffef6[_0x28f489(0x165)]);throw CliErrors[_0x28f489(0x141)](_0x28f489(0x11b)+_0x5899bd[_0x28f489(0x146)]+')',_0x5899bd[_0x28f489(0x146)]>=0x190?_0x28f489(0x13b):undefined);}const _0x2e419f=_0x5ffef6[_0x28f489(0xf7)];throwIfRateLimited(_0x5899bd,_0x2e419f);if(!_0x5899bd['ok']||_0x2e419f[_0x28f489(0xff)]===![])throw CliErrors[_0x28f489(0x141)](_0x2e419f[_0x28f489(0x149)]||_0x2e419f[_0x28f489(0x16e)]||_0x28f489(0xf4)+_0x5899bd['status'],_0x2e419f[_0x28f489(0x173)]?'API\x20error\x20code:\x20'+_0x2e419f[_0x28f489(0x173)]:undefined);return _0x2e419f;}catch(_0x188e0b){if(_0x188e0b instanceof Error&&_0x188e0b[_0x28f489(0x130)]===_0x28f489(0x15e))throw CliErrors[_0x28f489(0x141)](_0x28f489(0x137)+_0x4caf3d);throw _0x188e0b;}finally{clearTimeout(_0x58f1fc);}}async function apiBinaryRequest(_0x3df65b,_0x2a724b={}){const _0x5db26a=a75_0x2432,{method:method=_0x5db26a(0x16a),headers:headers={},timeout:timeout=0x7530}=_0x2a724b,_0x118bdc=_activeAK,_0x351964=getRuntimeDomain();if(!_0x118bdc)throw CliErrors['authRequired'](_0x5db26a(0x144)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x428f56=''+_0x351964+_0x3df65b,_0x5521e7=new AbortController(),_0x16dad0=setTimeout(()=>_0x5521e7[_0x5db26a(0xfd)](),timeout);try{const _0x39627c=await fetch(_0x428f56,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x5db26a(0xf1)],'X-User-AK':_0x118bdc,...headers},'signal':_0x5521e7[_0x5db26a(0x142)]});if(!_0x39627c['ok']){const _0x120202=await decodeResponseBody(_0x39627c),_0x22be26=_0x120202[_0x5db26a(0xf7)]&&typeof _0x120202['data']===_0x5db26a(0xf8)?_0x120202[_0x5db26a(0xf7)]:{},_0x10f198=firstString(_0x22be26[_0x5db26a(0x149)],_0x22be26[_0x5db26a(0x16e)],_0x22be26['errorCode'],_0x120202[_0x5db26a(0x165)]);throwIfRateLimited(_0x39627c,_0x120202['data'],_0x10f198);throw CliErrors[_0x5db26a(0x141)](_0x10f198||'API\x20error:\x20'+_0x39627c[_0x5db26a(0x146)],_0x5db26a(0x118)+_0x428f56);}return Buffer[_0x5db26a(0x12c)](await _0x39627c['arrayBuffer']());}catch(_0x3fed93){if(_0x3fed93 instanceof Error&&_0x3fed93[_0x5db26a(0x130)]==='AbortError')throw CliErrors[_0x5db26a(0x141)](_0x5db26a(0x137)+_0x428f56);throw _0x3fed93;}finally{clearTimeout(_0x16dad0);}}async function apiFormRequest(_0x50ddb6,_0x14bc41,_0x55c913={}){const _0x2b977=a75_0x2432,{timeout:timeout=0x7530}=_0x55c913,_0x42b9b4=_activeAK,_0x36dca1=getRuntimeDomain();if(!_0x42b9b4)throw CliErrors[_0x2b977(0x129)](_0x2b977(0x144)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x22314f=''+_0x36dca1+_0x50ddb6,_0x707987=new AbortController(),_0x51468c=setTimeout(()=>_0x707987[_0x2b977(0xfd)](),timeout);try{const _0x4b5f03=await fetch(_0x22314f,{'method':_0x2b977(0x177),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x2b977(0xf1)],'X-User-AK':_0x42b9b4},'body':_0x14bc41,'signal':_0x707987['signal']}),_0xe9559e=await decodeResponseBody(_0x4b5f03);if(!_0xe9559e[_0x2b977(0x12f)]){throwIfRateLimited(_0x4b5f03,undefined,_0xe9559e[_0x2b977(0x165)]);throw CliErrors['apiError']('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x4b5f03[_0x2b977(0x146)]+')',_0x4b5f03[_0x2b977(0x146)]>=0x190?_0x2b977(0x13b):undefined);}const _0x1c644b=_0xe9559e['data'];throwIfRateLimited(_0x4b5f03,_0x1c644b);if(!_0x4b5f03['ok']||_0x1c644b['success']===![])throw CliErrors[_0x2b977(0x141)](_0x1c644b[_0x2b977(0x149)]||_0x1c644b[_0x2b977(0x16e)]||_0x2b977(0xf4)+_0x4b5f03[_0x2b977(0x146)],_0x1c644b[_0x2b977(0x173)]?_0x2b977(0x131)+_0x1c644b['errorCode']:undefined);return _0x1c644b;}catch(_0x462463){if(_0x462463 instanceof Error&&_0x462463[_0x2b977(0x130)]===_0x2b977(0x15e))throw CliErrors[_0x2b977(0x141)](_0x2b977(0x137)+_0x22314f);throw _0x462463;}finally{clearTimeout(_0x51468c);}}async function toolboxRequest(_0x22739a,_0x336ffa,_0x16b947={}){const _0x53a130=a75_0x2432,{method:method=_0x53a130(0x16a),headers:headers={},timeout:timeout=0x7530}=_0x16b947,_0x5a8e43=_activeAK;if(!_0x5a8e43)throw CliErrors[_0x53a130(0x129)](_0x53a130(0x144)+PRODUCT_CONFIG[_0x53a130(0x134)]+'.');const _0x3a7fad=getApiDomain()[_0x53a130(0xe9)](/\/$/,''),_0x2044ac=new URL(_0x22739a,_0x3a7fad+_0x53a130(0xf0));if(_0x336ffa)for(const [_0x2a7cb3,_0x50cc3b]of Object[_0x53a130(0xef)](_0x336ffa)){_0x50cc3b!==undefined&&_0x50cc3b!==null&&_0x2044ac[_0x53a130(0x164)][_0x53a130(0x151)](_0x2a7cb3,String(_0x50cc3b));}const _0x5239d8=new AbortController(),_0x210811=setTimeout(()=>_0x5239d8[_0x53a130(0xfd)](),timeout);try{const _0x968825=await fetch(_0x2044ac,{'method':method,'headers':{'Content-Type':_0x53a130(0x120),'X-Invoke-Source':PRODUCT_CONFIG[_0x53a130(0xf1)],'X-User-AK':_0x5a8e43,...headers},'signal':_0x5239d8['signal']}),_0x5c5cc9=await decodeResponseBody(_0x968825);if(!_0x5c5cc9['isJson']){throwIfRateLimited(_0x968825,undefined,_0x5c5cc9['text']);throw CliErrors['apiError'](_0x53a130(0x13e)+_0x968825[_0x53a130(0x146)]+')',_0x968825['status']>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x3cbc07=_0x5c5cc9[_0x53a130(0xf7)];throwIfRateLimited(_0x968825,_0x3cbc07);if(!_0x968825['ok']){const _0x55e177=_0x3cbc07&&typeof _0x3cbc07===_0x53a130(0xf8)?_0x3cbc07:{};throw CliErrors[_0x53a130(0x141)](_0x55e177[_0x53a130(0x149)]||_0x55e177[_0x53a130(0x16e)]||_0x53a130(0x174)+_0x968825[_0x53a130(0x146)],_0x55e177[_0x53a130(0x173)]?'Toolbox\x20error\x20code:\x20'+_0x55e177[_0x53a130(0x173)]:undefined);}if(_0x3cbc07&&typeof _0x3cbc07==='object'&&'success'in _0x3cbc07&&typeof _0x3cbc07['success']==='boolean'){const _0x1287bc=_0x3cbc07;if(!_0x1287bc[_0x53a130(0xff)])throw CliErrors[_0x53a130(0x141)](_0x1287bc[_0x53a130(0x149)]||_0x1287bc[_0x53a130(0x16e)]||_0x53a130(0x12e),_0x1287bc[_0x53a130(0x173)]?_0x53a130(0xe8)+_0x1287bc[_0x53a130(0x173)]:undefined);return _0x1287bc[_0x53a130(0xf7)];}return _0x3cbc07;}catch(_0x316c21){if(_0x316c21 instanceof Error&&_0x316c21[_0x53a130(0x130)]===_0x53a130(0x15e))throw CliErrors[_0x53a130(0x141)](_0x53a130(0x137)+_0x2044ac['toString']());throw _0x316c21;}finally{clearTimeout(_0x210811);}}async function skillHubJsonRequest(_0xc50c9e,_0x40e448={}){const _0x132cf7=a75_0x2432,{method:method=_0x132cf7(0x16a),query:_0x49440c,body:_0x30f02d,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x40e448,_0x449ed5=_activeAK;if(!_0x449ed5)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x132cf7(0x134)]+'.');const _0x5a84f1=getSkillHubDomain()[_0x132cf7(0xe9)](/\/$/,''),_0x18bc0a=new URL(_0xc50c9e,_0x5a84f1+'/');if(_0x49440c)for(const [_0x15db3a,_0x181475]of Object[_0x132cf7(0xef)](_0x49440c)){_0x181475!==undefined&&_0x181475!==null&&_0x18bc0a[_0x132cf7(0x164)][_0x132cf7(0x151)](_0x15db3a,String(_0x181475));}const _0x11ff46=new AbortController(),_0x198027=setTimeout(()=>_0x11ff46[_0x132cf7(0xfd)](),timeout);try{const _0x7f516e=await fetch(_0x18bc0a[_0x132cf7(0x123)](),{'method':method,'headers':{'Accept':_0x132cf7(0x120),'X-Invoke-Source':PRODUCT_CONFIG[_0x132cf7(0xf1)],'X-User-AK':_0x449ed5,...headers},'body':_0x30f02d,'signal':_0x11ff46[_0x132cf7(0x142)]}),_0x161ac0=await decodeResponseBody(_0x7f516e);if(!_0x161ac0['isJson']){if(allowNotFound&&_0x7f516e['status']===0x194)return undefined;throwIfRateLimited(_0x7f516e,undefined,_0x161ac0[_0x132cf7(0x165)]);throw CliErrors['apiError']('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x7f516e['status']+')',_0x7f516e[_0x132cf7(0x146)]>=0x190?_0x132cf7(0x13b):undefined);}const _0x5bbb08=_0x161ac0[_0x132cf7(0xf7)];throwIfRateLimited(_0x7f516e,_0x5bbb08);if(allowNotFound&&isSkillHubNotFoundResponse(_0x7f516e['status'],_0x5bbb08))return undefined;const _0x4a8534=!_0x7f516e['ok']||_0x5bbb08?.['success']===![]||typeof _0x5bbb08?.['code']===_0x132cf7(0x14e)&&_0x5bbb08[_0x132cf7(0x156)]>=0x190;if(_0x4a8534)throw CliErrors['apiError'](_0x5bbb08?.[_0x132cf7(0x149)]||_0x5bbb08?.[_0x132cf7(0x16e)]||_0x5bbb08?.['msg']||'SkillHub\x20API\x20error:\x20'+_0x7f516e['status'],_0x5bbb08?.[_0x132cf7(0x173)]?'SkillHub\x20error\x20code:\x20'+_0x5bbb08['errorCode']:undefined);return _0x5bbb08?.[_0x132cf7(0xf7)]??_0x5bbb08;}catch(_0x19a5d9){if(_0x19a5d9 instanceof Error&&_0x19a5d9[_0x132cf7(0x130)]===_0x132cf7(0x15e))throw CliErrors[_0x132cf7(0x141)](_0x132cf7(0x137)+_0x18bc0a[_0x132cf7(0x123)]());throw _0x19a5d9;}finally{clearTimeout(_0x198027);}}function isSkillHubNotFoundResponse(_0x2eead2,_0x3bf197){const _0x4b77a8=a75_0x2432;if(_0x2eead2===0x194||_0x3bf197?.['code']===0x194)return!![];if(_0x2eead2!==0x190&&_0x3bf197?.['code']!==0x190)return![];const _0x32981c=[_0x3bf197?.[_0x4b77a8(0x115)],_0x3bf197?.[_0x4b77a8(0x16e)],_0x3bf197?.['errorMsg'],_0x3bf197?.[_0x4b77a8(0x108)]][_0x4b77a8(0x13f)](_0xb4599a=>typeof _0xb4599a===_0x4b77a8(0x152))[_0x4b77a8(0x117)]('\x20');return/skill not found\b/i[_0x4b77a8(0x11d)](_0x32981c);}async function skillHubBinaryRequest(_0x51379b,_0x5c9f3a={}){const _0x43906b=a75_0x2432,{query:_0x19216a,headers:headers={},timeout:timeout=0x7530}=_0x5c9f3a,_0x5cb8f1=_activeAK;if(!_0x5cb8f1)throw CliErrors[_0x43906b(0x129)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x51432b=getSkillHubDomain()[_0x43906b(0xe9)](/\/$/,''),_0x3b77cb=new URL(_0x51379b,_0x51432b+'/');if(_0x19216a)for(const [_0x4b52cc,_0x38c30e]of Object[_0x43906b(0xef)](_0x19216a)){_0x38c30e!==undefined&&_0x38c30e!==null&&_0x3b77cb[_0x43906b(0x164)][_0x43906b(0x151)](_0x4b52cc,String(_0x38c30e));}const _0x31e425=new AbortController(),_0x15b1c0=setTimeout(()=>_0x31e425[_0x43906b(0xfd)](),timeout);try{const _0x572438=await fetch(_0x3b77cb[_0x43906b(0x123)](),{'method':_0x43906b(0x16a),'headers':{'Accept':_0x43906b(0x104),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x5cb8f1,...headers},'signal':_0x31e425[_0x43906b(0x142)]});if(!_0x572438['ok']){const _0x1cf22b=await decodeResponseBody(_0x572438),_0x61a572=_0x1cf22b[_0x43906b(0xf7)]&&typeof _0x1cf22b['data']===_0x43906b(0xf8)?_0x1cf22b[_0x43906b(0xf7)]:{},_0x37bea5=firstString(_0x61a572[_0x43906b(0x149)],_0x61a572[_0x43906b(0x16e)],_0x61a572[_0x43906b(0x115)],_0x61a572[_0x43906b(0x173)],_0x1cf22b[_0x43906b(0x165)]);throwIfRateLimited(_0x572438,_0x1cf22b[_0x43906b(0xf7)],_0x37bea5);throw CliErrors['apiError'](_0x37bea5||_0x43906b(0x14b)+_0x572438[_0x43906b(0x146)],_0x43906b(0x118)+_0x3b77cb[_0x43906b(0x123)]());}return Buffer['from'](await _0x572438[_0x43906b(0xeb)]());}catch(_0x2b0e79){if(_0x2b0e79 instanceof Error&&_0x2b0e79[_0x43906b(0x130)]==='AbortError')throw CliErrors[_0x43906b(0x141)](_0x43906b(0x137)+_0x3b77cb[_0x43906b(0x123)]());throw _0x2b0e79;}finally{clearTimeout(_0x15b1c0);}}export async function getBffEndpointContract(_0x2b018f,_0x25ab24){const _0x1cf801=a75_0x2432;if(_0x25ab24===_0x1cf801(0x162))throw CliErrors[_0x1cf801(0xf5)]('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x2b018f+_0x1cf801(0x175)+_0x25ab24);const _0x20eaf3=await apiRequest('/client/bff/endpoint/'+encodeURIComponent(_0x2b018f)+'/'+encodeURIComponent(_0x25ab24)),_0x1bcba0=_0x20eaf3[_0x1cf801(0xf7)];if(!_0x1bcba0||typeof _0x1bcba0!=='object'||Array[_0x1cf801(0x138)](_0x1bcba0)||_0x1bcba0[_0x1cf801(0x119)]!==_0x2b018f||_0x1bcba0['functionName']!==_0x25ab24)throw CliErrors[_0x1cf801(0xf5)]('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x2b018f+_0x1cf801(0x175)+_0x25ab24);return{'appCode':_0x1bcba0[_0x1cf801(0x119)],'functionName':_0x1bcba0[_0x1cf801(0xfc)],'description':_0x1bcba0['description'],'version':_0x1bcba0['version'],'gmtModified':_0x1bcba0[_0x1cf801(0x172)]};}export async function getSqlQueryInfo(_0x59fde4,_0x4c82b1){const _0x41d336=a75_0x2432,_0x3d3f5f=await apiRequest(_0x41d336(0x143),{'method':'POST','body':{'appCode':_0x59fde4,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x4c82b1}}),_0x1a2b35=_0x3d3f5f[_0x41d336(0xf7)],_0x80c35e=_0x1a2b35&&typeof _0x1a2b35===_0x41d336(0xf8)&&_0x41d336(0x107)in _0x1a2b35?_0x1a2b35['tableData']?.[0x0]:_0x1a2b35&&typeof _0x1a2b35===_0x41d336(0xf8)&&_0x41d336(0x176)in _0x1a2b35?_0x1a2b35:undefined;if(!_0x80c35e)throw CliErrors[_0x41d336(0xf5)](_0x41d336(0x13c)+_0x4c82b1);return _0x80c35e;}function isRemoteAppItem(_0x2ad627){const _0x4cea66=a75_0x2432;return!!_0x2ad627&&typeof _0x2ad627===_0x4cea66(0xf8)&&typeof _0x2ad627[_0x4cea66(0x119)]===_0x4cea66(0x152)&&typeof _0x2ad627[_0x4cea66(0x16d)]===_0x4cea66(0x152);}function extractRemoteAppItems(_0x14cb2f){const _0x26f82f=a75_0x2432;if(Array[_0x26f82f(0x138)](_0x14cb2f))return _0x14cb2f[_0x26f82f(0x13f)](isRemoteAppItem);if(!_0x14cb2f||typeof _0x14cb2f!=='object')throw CliErrors[_0x26f82f(0x141)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x24d196=_0x14cb2f;if(Array['isArray'](_0x24d196['tableData']))return _0x24d196[_0x26f82f(0x107)][_0x26f82f(0x13f)](isRemoteAppItem);if(_0x24d196[_0x26f82f(0xf7)]&&typeof _0x24d196[_0x26f82f(0xf7)]===_0x26f82f(0xf8)){const _0x41e065=_0x24d196['data'];if(Array[_0x26f82f(0x138)](_0x41e065['tableData']))return _0x41e065['tableData'][_0x26f82f(0x13f)](isRemoteAppItem);}throw CliErrors[_0x26f82f(0x141)]('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x2569e9=a75_0x2432,_0x3efb8e=await apiRequest(_0x2569e9(0x11e));return extractRemoteAppItems(_0x3efb8e[_0x2569e9(0xf7)]);}export async function getLoginUserInfo(){const _0x133101=a75_0x2432,_0x13d378=await apiRequest(_0x133101(0x11c));if(!_0x13d378['data']||typeof _0x13d378[_0x133101(0xf7)]!==_0x133101(0xf8)||Array[_0x133101(0x138)](_0x13d378['data']))throw CliErrors[_0x133101(0x141)](_0x133101(0x126));return _0x13d378[_0x133101(0xf7)];}export async function listDatasets(_0x524ec3,_0x203d1c){const _0x7bc249=a75_0x2432,_0x47f12c=await apiRequest('/client/dataset/list',{'method':_0x7bc249(0x177),'body':{'appCode':_0x524ec3,..._0x203d1c?.[_0x7bc249(0x156)]&&{'code':_0x203d1c[_0x7bc249(0x156)]},..._0x203d1c?.[_0x7bc249(0x130)]&&{'name':_0x203d1c[_0x7bc249(0x130)]}}});return extractList(_0x47f12c[_0x7bc249(0xf7)]);}export async function getDatasetDetail(_0x369029){const _0x2f9a35=a75_0x2432,_0x21975e=await apiRequest(_0x2f9a35(0x15f)+encodeURIComponent(_0x369029));return _0x21975e[_0x2f9a35(0xf7)];}export async function getDatasetSdkUsageDoc(_0x19eb81,_0x53f062){const _0x1c5d35=a75_0x2432,_0x3ece3b=await toolboxRequest(_0x1c5d35(0x135),{'datasetCode':_0x19eb81,'appCode':_0x53f062});return typeof _0x3ece3b?.[_0x1c5d35(0x157)]===_0x1c5d35(0x152)?_0x3ece3b[_0x1c5d35(0x157)]:'';}export async function uploadRuntimeFile(_0xd4b7ba,_0xdcec38){const _0x141d0d=a75_0x2432,_0x41874d=await readFile(_0xdcec38),_0x700225=new FormData();_0x700225[_0x141d0d(0xfb)](_0x141d0d(0x119),_0xd4b7ba),_0x700225['append'](_0x141d0d(0xed),new Blob([new Uint8Array(_0x41874d)]),basename(_0xdcec38));const _0x5adbd4=await apiFormRequest(_0x141d0d(0x13a),_0x700225);return _0x5adbd4['data'];}export async function queryRuntimeFileUrl(_0x33f52e,_0x45d644={}){const _0x1f0063=a75_0x2432,_0x17f3d3=await apiRequest(_0x1f0063(0x105),{'method':_0x1f0063(0x177),'body':{'filePath':_0x33f52e,'downloadFlag':_0x45d644[_0x1f0063(0x13d)]??![],..._0x45d644['longTerm']?{'longTerm':!![]}:{}}});return _0x17f3d3[_0x1f0063(0xf7)];}export async function recognizeRuntimeOcr(_0x472bd4,_0x4edbcf){const _0x28d598=a75_0x2432,_0x5d9ee7=await apiRequest('/client/ocr',{'method':'POST','body':{'appCode':_0x472bd4,'url':_0x4edbcf[_0x28d598(0xec)],'type':_0x4edbcf[_0x28d598(0xe7)]}});return _0x5d9ee7[_0x28d598(0xf7)];}export async function getRuntimeAppConfigByKey(_0x57da2b,_0x2fe2cd){const _0xbdb6a7=a75_0x2432,_0x403774=new URLSearchParams({'appCode':_0x57da2b,'key':_0x2fe2cd}),_0x4dd4b5=await apiRequest(_0xbdb6a7(0xf6)+_0x403774[_0xbdb6a7(0x123)]());if(typeof _0x4dd4b5[_0xbdb6a7(0xf7)]!==_0xbdb6a7(0x152))throw CliErrors['validation'](_0xbdb6a7(0x163)+_0x2fe2cd);return _0x4dd4b5[_0xbdb6a7(0xf7)];}export async function listRuntimeArtifacts(_0x45e5f9,_0xd54666){const _0x27290a=a75_0x2432,_0x472d83=new URLSearchParams({'appCode':_0x45e5f9});if(_0xd54666?.[_0x27290a(0x150)])_0x472d83[_0x27290a(0x151)](_0x27290a(0x150),_0xd54666[_0x27290a(0x150)]);if(_0xd54666?.[_0x27290a(0x121)])_0x472d83['set'](_0x27290a(0x121),_0xd54666[_0x27290a(0x121)]);if(_0xd54666?.[_0x27290a(0xee)]!==undefined)_0x472d83[_0x27290a(0x151)](_0x27290a(0xee),String(_0xd54666[_0x27290a(0xee)]));const _0x59c267=await apiRequest(_0x27290a(0x125)+_0x472d83['toString']());return Array[_0x27290a(0x138)](_0x59c267['data'])?_0x59c267[_0x27290a(0xf7)]:[];}export async function getRuntimeArtifact(_0x5cbbb2,_0x5650b3){const _0x34052a=a75_0x2432,_0xd4010c=await apiRequest(_0x34052a(0x114)+_0x5cbbb2+_0x34052a(0x15d)+encodeURIComponent(_0x5650b3));if(!_0xd4010c[_0x34052a(0xf7)])throw CliErrors[_0x34052a(0xf5)](_0x34052a(0x128)+_0x5cbbb2);return _0xd4010c['data'];}export async function createRuntimeArtifact(_0x130c2e,_0x51b57c){const _0x4b4c98=a75_0x2432,_0x1ad6b7=await apiRequest('/client/artifact/create',{'method':_0x4b4c98(0x177),'body':{'appCode':_0x130c2e,..._0x51b57c}});return _0x1ad6b7[_0x4b4c98(0xf7)];}export async function updateRuntimeArtifact(_0x4cd29e,_0x5c797b,_0x4e95cd){const _0x7e0589=a75_0x2432,_0x5ca24e=await apiRequest(_0x7e0589(0x114)+_0x4cd29e+_0x7e0589(0x11f),{'method':_0x7e0589(0x177),'body':{'appCode':_0x5c797b,..._0x4e95cd}});return _0x5ca24e['data'];}export async function listPersonalBffs(_0x327be7){const _0x41c981=a75_0x2432,_0x569212=await apiRequest(_0x41c981(0x160)+encodeURIComponent(_0x327be7));return Array[_0x41c981(0x138)](_0x569212['data'])?_0x569212[_0x41c981(0xf7)]:[];}export async function getPersonalBff(_0x24ee39,_0x5f5360){const _0x14e25c=a75_0x2432,_0x1a3192=await apiRequest('/client/runtime-bff/personal/'+_0x24ee39+_0x14e25c(0x15d)+encodeURIComponent(_0x5f5360));if(!_0x1a3192[_0x14e25c(0xf7)])throw CliErrors[_0x14e25c(0xf5)]('Personal\x20BFF\x20not\x20found:\x20id='+_0x24ee39);return _0x1a3192[_0x14e25c(0xf7)];}export async function createPersonalBff(_0x2b2379,_0x5238ee){const _0x914be4=a75_0x2432,_0x26a021=await apiRequest('/client/runtime-bff/personal/create',{'method':_0x914be4(0x177),'body':{'appCode':_0x2b2379,..._0x5238ee}});return _0x26a021[_0x914be4(0xf7)];}export async function updatePersonalBff(_0x14cf67,_0x100e39,_0x51ae78){const _0x2024bb=a75_0x2432,_0x14e2e3=await apiRequest('/client/runtime-bff/personal/'+_0x14cf67+'/update',{'method':'POST','body':{'appCode':_0x100e39,..._0x51ae78}});return _0x14e2e3[_0x2024bb(0xf7)];}export async function executePersonalBff(_0x64b943,_0x34211a,_0x2a8e98){const _0x55cf19=a75_0x2432,_0x1826e4=await apiRequest(_0x55cf19(0x145)+_0x64b943+_0x55cf19(0xea)+encodeURIComponent(_0x34211a),{'method':'POST','body':_0x2a8e98});return _0x1826e4[_0x55cf19(0xf7)];}export async function listPersonalKnowledgeBaseItems(_0x2dc282){const _0x20b8c9=a75_0x2432,_0x31e5b8=await apiRequest(_0x20b8c9(0x10a)+encodeURIComponent(_0x2dc282));return Array[_0x20b8c9(0x138)](_0x31e5b8[_0x20b8c9(0xf7)])?_0x31e5b8[_0x20b8c9(0xf7)]:[];}export async function getPersonalKnowledgeBaseItem(_0x43b713,_0x1ed756){const _0x5284ac=a75_0x2432,_0x449135=await apiRequest('/client/knowledge-base/personal/'+_0x43b713+_0x5284ac(0x15d)+encodeURIComponent(_0x1ed756));if(!_0x449135[_0x5284ac(0xf7)])throw CliErrors[_0x5284ac(0xf5)](_0x5284ac(0x168)+_0x43b713);return _0x449135[_0x5284ac(0xf7)];}export async function createPersonalKnowledgeBaseItem(_0x244e1b,_0x47fe33){const _0x402a25=a75_0x2432,_0x5bfd4f=await apiRequest(_0x402a25(0x15c),{'method':_0x402a25(0x177),'body':{'appCode':_0x244e1b,..._0x47fe33}});return _0x5bfd4f['data'];}export async function updatePersonalKnowledgeBaseItem(_0x1f7372,_0x4ccdc0,_0x5d1aa1){const _0x5d370e=a75_0x2432,_0x250e32=await apiRequest(_0x5d370e(0x127)+_0x1f7372+_0x5d370e(0x11f),{'method':_0x5d370e(0x177),'body':{'appCode':_0x4ccdc0,..._0x5d1aa1}});return _0x250e32[_0x5d370e(0xf7)];}export async function searchKnowledgeBase(_0x16081e,_0x658933){const _0x459651=a75_0x2432,_0x2460ce=await apiRequest('/client/knowledge-base/search',{'method':_0x459651(0x177),'body':{'appCode':_0x16081e,'query':_0x658933[_0x459651(0x132)],..._0x658933[_0x459651(0xf2)]!==undefined?{'topK':_0x658933[_0x459651(0xf2)]}:{}}});return Array[_0x459651(0x138)](_0x2460ce[_0x459651(0xf7)])?_0x2460ce[_0x459651(0xf7)]:[];}export async function getRuntimeSkillByCode(_0x55f741,_0x311bf8){const _0x4e011f=a75_0x2432,_0x18bc9c=await skillHubJsonRequest(_0x4e011f(0x170)+encodeURIComponent(_0x55f741)+'/'+encodeURIComponent(_0x311bf8),{'allowNotFound':!![]});return _0x18bc9c?skillHubRuntimeDetailToRuntimeSkill(_0x18bc9c):undefined;}export async function listRuntimeSkills(_0x416825){const _0x4e0fbf=a75_0x2432,_0x37fc6f=await skillHubJsonRequest(_0x4e0fbf(0x14f)+encodeURIComponent(_0x416825[_0x4e0fbf(0x119)])+'/skills',{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x416825['appCode'],_0x37fc6f,_0x416825['scope']??_0x4e0fbf(0x148),_0x416825[_0x4e0fbf(0x156)]);}export async function listPersonalRuntimeSkills(_0x2650b4){const _0x484fe2=a75_0x2432;return(await listRuntimeSkills({'appCode':_0x2650b4,'scope':_0x484fe2(0x155)}))[_0x484fe2(0x155)];}export async function listCompanyRuntimeSkills(_0x4bf8b9){const _0x268c31=a75_0x2432;return(await listRuntimeSkills({'appCode':_0x4bf8b9,'scope':_0x268c31(0x106)}))[_0x268c31(0x106)];}export async function listVisibleRuntimeSkills(_0x680892){const _0x4c4fd8=a75_0x2432;return(await listRuntimeSkills({'appCode':_0x680892,'scope':_0x4c4fd8(0x148)}))[_0x4c4fd8(0x16c)];}export async function createPersonalRuntimeSkill(_0x59a187,_0x368b4f,_0x33d88b={}){return publishRuntimeSkill(_0x59a187,_0x368b4f,{'visibility':'PRIVATE','confirmWarnings':_0x33d88b['confirmWarnings']});}export async function updatePersonalRuntimeSkill(_0x1f0665,_0x4e56d4,_0x23be29,_0x540097={}){const _0x2ae8d4=a75_0x2432;return publishRuntimeSkill(_0x4e56d4,{..._0x23be29,'skillCode':_0x23be29['skillCode']??_0x1f0665},{'visibility':_0x2ae8d4(0x159),'confirmWarnings':_0x540097['confirmWarnings']});}export async function publishCompanyRuntimeSkill(_0x2cc12e,_0x5e286d,_0x48f88c={}){const _0x2aa448=a75_0x2432;return publishRuntimeSkill(_0x2cc12e,_0x5e286d,{'visibility':_0x2aa448(0x140),'confirmWarnings':_0x48f88c[_0x2aa448(0x101)]});}export async function validateRuntimeSkillPublish(_0x27f1a8,_0x520da4,_0x10b88b){const _0x1ba9d0=a75_0x2432,_0x2e7ed2=buildRuntimeSkillPublishForm(_0x520da4,_0x10b88b[_0x1ba9d0(0x16b)]),_0x11a79b=await skillHubJsonRequest(_0x1ba9d0(0x102)+encodeURIComponent(_0x27f1a8)+_0x1ba9d0(0x116),{'method':'POST','body':_0x2e7ed2});return{'valid':_0x11a79b[_0x1ba9d0(0x136)]===!![],'errors':Array[_0x1ba9d0(0x138)](_0x11a79b['errors'])?_0x11a79b[_0x1ba9d0(0x10d)]:[],'warnings':Array[_0x1ba9d0(0x138)](_0x11a79b[_0x1ba9d0(0x10e)])?_0x11a79b[_0x1ba9d0(0x10e)]:[],'resolvedSlug':_0x11a79b['resolvedSlug'],'resolvedVersion':_0x11a79b['resolvedVersion']};}export async function downloadRuntimeSkillPackage(_0x467c09,_0x33479e,_0x30ae84,_0x19e536){const _0x3f6258=a75_0x2432;void _0x467c09;const _0x92734e=_0x19e536?_0x3f6258(0x102)+encodeURIComponent(_0x30ae84)+'/'+encodeURIComponent(_0x33479e)+_0x3f6258(0x124)+encodeURIComponent(_0x19e536)+'/download':_0x3f6258(0x102)+encodeURIComponent(_0x30ae84)+'/'+encodeURIComponent(_0x33479e)+_0x3f6258(0x139);return skillHubBinaryRequest(_0x92734e);}async function publishRuntimeSkill(_0x381aed,_0x55e089,_0x33bdd6){const _0x48a12b=a75_0x2432,_0x590a1d=buildRuntimeSkillPublishForm(_0x55e089,_0x33bdd6[_0x48a12b(0x16b)]),_0xfcf9f4=await skillHubJsonRequest(_0x48a12b(0x102)+encodeURIComponent(_0x381aed)+_0x48a12b(0x14a),{'method':'POST','query':{'confirmWarnings':_0x33bdd6['confirmWarnings']===!![]?!![]:undefined},'body':_0x590a1d});return{'appCode':_0xfcf9f4[_0x48a12b(0x10c)]??_0x381aed,'skillCode':_0xfcf9f4['slug']??_0x55e089[_0x48a12b(0x133)]??'','skillName':_0x55e089[_0x48a12b(0x158)]??_0xfcf9f4[_0x48a12b(0x103)]??_0x55e089[_0x48a12b(0x133)],'description':_0x55e089[_0x48a12b(0x167)],'scope':skillHubVisibilityToScope(_0xfcf9f4[_0x48a12b(0x16b)]??_0x33bdd6[_0x48a12b(0x16b)])??'personal','version':_0xfcf9f4['version']??_0x55e089['version'],'tags':_0x55e089['tags'],'content':_0x55e089[_0x48a12b(0x11a)]};}function buildRuntimeSkillPublishForm(_0x412e7e,_0x24f7b2){const _0x5f5c97=a75_0x2432,_0x2826ca=new FormData();return _0x2826ca[_0x5f5c97(0x151)](_0x5f5c97(0xed),runtimeSkillPackageFile(_0x412e7e)),_0x412e7e[_0x5f5c97(0x158)]?.['trim']()&&_0x2826ca[_0x5f5c97(0x151)](_0x5f5c97(0x166),_0x412e7e[_0x5f5c97(0x158)]['trim']()),_0x2826ca[_0x5f5c97(0x151)](_0x5f5c97(0x16b),_0x24f7b2),_0x2826ca;}function runtimeSkillPackageFile(_0x370688){const _0x41b308=a75_0x2432;if(!_0x370688[_0x41b308(0x16f)])throw CliErrors[_0x41b308(0xf5)](_0x41b308(0xf9));const _0xa2a283=Buffer[_0x41b308(0x12c)](_0x370688['packageBase64'],'base64'),_0x54ac25=new Blob([_0xa2a283],{'type':_0x41b308(0x161)}),_0x55f5f7=(_0x370688[_0x41b308(0x133)]||'skill')+'.zip';if(typeof File!==_0x41b308(0x10f))return new File([_0x54ac25],_0x55f5f7,{'type':_0x41b308(0x161)});return _0x54ac25;}function normalizeSkillHubRuntimeListResponse(_0x3a92a9,_0x3ce1f1,_0x6a7c00,_0x566b23){const _0xd4e2f2=a75_0x2432,_0x3dbde0=Array[_0xd4e2f2(0x138)](_0x3ce1f1)?_0x3ce1f1:Array[_0xd4e2f2(0x138)](_0x3ce1f1?.[_0xd4e2f2(0x15b)])?_0x3ce1f1[_0xd4e2f2(0x15b)]:[],_0x20abe0=_0x566b23?.['trim'](),_0x40047b=_0x3dbde0['filter'](_0x17b3b8=>!_0x20abe0||_0x17b3b8[_0xd4e2f2(0x103)]===_0x20abe0)['map'](skillHubRuntimeItemToRuntimeSkill)[_0xd4e2f2(0x13f)](_0x2815e3=>Boolean(_0x2815e3)),_0x9a21bd=_0x40047b[_0xd4e2f2(0x13f)](_0x2f43e3=>_0x2f43e3[_0xd4e2f2(0x10b)]===_0xd4e2f2(0x155)),_0x2252be=_0x40047b['filter'](_0x2bed60=>_0x2bed60[_0xd4e2f2(0x10b)]===_0xd4e2f2(0x106));return{'appCode':_0x3a92a9,'personal':_0x6a7c00==='company'?[]:_0x9a21bd,'company':_0x6a7c00==='personal'?[]:_0x2252be,'effective':buildEffectiveRuntimeSkills(_0x9a21bd,_0x2252be,_0x6a7c00)};}function skillHubRuntimeItemToRuntimeSkill(_0x186016){const _0xbb2de=a75_0x2432,_0x354b5b=_0x186016[_0xbb2de(0x103)]?.['trim'](),_0xde1af6=skillHubVisibilityToScope(_0x186016[_0xbb2de(0x16b)]);if(!_0x354b5b||!_0xde1af6)return undefined;return{'id':_0x186016['id'],'appCode':_0x186016[_0xbb2de(0x10c)],'skillCode':_0x354b5b,'skillName':_0x186016[_0xbb2de(0x166)]??_0x354b5b,'description':_0x186016['summary'],'scope':_0xde1af6,'version':skillHubRuntimeItemVersion(_0x186016),'status':_0x186016['status']};}function skillHubRuntimeDetailToRuntimeSkill(_0x391fea){const _0x494d7e=a75_0x2432,_0x1e50ec=_0x391fea[_0x494d7e(0x103)]?.['trim']();if(!_0x1e50ec)return undefined;return{'id':_0x391fea['id'],'appCode':_0x391fea[_0x494d7e(0x10c)],'skillCode':_0x1e50ec,'skillName':_0x391fea[_0x494d7e(0x166)]??_0x1e50ec,'description':_0x391fea[_0x494d7e(0x12d)],'example':_0x391fea[_0x494d7e(0x153)],'scope':skillHubVisibilityToScope(_0x391fea[_0x494d7e(0x16b)])??_0x391fea[_0x494d7e(0x16b)]?.[_0x494d7e(0x147)](),'version':skillHubRuntimeItemVersion(_0x391fea),'status':_0x391fea['status']};}function skillHubVisibilityToScope(_0x36e1bb){const _0x182dd5=a75_0x2432;if(_0x36e1bb==='PRIVATE')return'personal';if(_0x36e1bb===_0x182dd5(0x140))return'company';return undefined;}function skillHubRuntimeItemVersion(_0x1722ba){const _0x226edc=a75_0x2432;return _0x1722ba[_0x226edc(0x112)]?.[_0x226edc(0x109)]??_0x1722ba['headlineVersion']?.[_0x226edc(0x109)]??_0x1722ba['ownerPreviewVersion']?.[_0x226edc(0x109)];}function buildEffectiveRuntimeSkills(_0x16e120,_0x126780,_0x31a6ae){const _0x1f1bec=a75_0x2432;if(_0x31a6ae===_0x1f1bec(0x155))return _0x16e120;if(_0x31a6ae===_0x1f1bec(0x106))return _0x126780;const _0x4d83c7=new Map();for(const _0xab0cfd of _0x126780){_0x4d83c7[_0x1f1bec(0x151)](_0xab0cfd[_0x1f1bec(0x133)],_0xab0cfd);}for(const _0x8ecc07 of _0x16e120){_0x4d83c7[_0x1f1bec(0x151)](_0x8ecc07[_0x1f1bec(0x133)],_0x8ecc07);}return Array[_0x1f1bec(0x12c)](_0x4d83c7[_0x1f1bec(0x111)]());}function normalizeRuntimeSkillListResponse(_0x475a4b,_0x19291c){const _0x3306bd=a75_0x2432;if(Array['isArray'](_0x19291c)){const _0x35addc=_0x19291c[_0x3306bd(0x13f)](_0x4314b4=>_0x4314b4['scope']===_0x3306bd(0x155)),_0x5a1cd3=_0x19291c[_0x3306bd(0x13f)](_0x37551b=>_0x37551b['scope']==='company');return{'appCode':_0x475a4b,'personal':_0x35addc,'company':_0x5a1cd3,'effective':[..._0x5a1cd3,..._0x35addc]};}return{'appCode':_0x19291c?.[_0x3306bd(0x119)]??_0x475a4b,'personal':Array[_0x3306bd(0x138)](_0x19291c?.[_0x3306bd(0x155)])?_0x19291c[_0x3306bd(0x155)]:[],'company':Array[_0x3306bd(0x138)](_0x19291c?.[_0x3306bd(0x106)])?_0x19291c[_0x3306bd(0x106)]:[],'effective':Array[_0x3306bd(0x138)](_0x19291c?.['effective'])?_0x19291c[_0x3306bd(0x16c)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x39616a,_0x1b1059){const _0x465cf4=a76_0xdf41,_0x2dd86e=_0x39616a();while(!![]){try{const _0x55e712=parseInt(_0x465cf4(0x15f))/0x1+parseInt(_0x465cf4(0x168))/0x2+-parseInt(_0x465cf4(0x162))/0x3+parseInt(_0x465cf4(0x167))/0x4+-parseInt(_0x465cf4(0x16f))/0x5*(parseInt(_0x465cf4(0x16a))/0x6)+-parseInt(_0x465cf4(0x166))/0x7+parseInt(_0x465cf4(0x164))/0x8*(parseInt(_0x465cf4(0x16c))/0x9);if(_0x55e712===_0x1b1059)break;else _0x2dd86e['push'](_0x2dd86e['shift']());}catch(_0x33d010){_0x2dd86e['push'](_0x2dd86e['shift']());}}}(a76_0x4559,0x639b6));import{listDatasets}from'../core/api-client.js';function a76_0xdf41(_0x4536c9,_0x329863){_0x4536c9=_0x4536c9-0x15f;const _0x45597b=a76_0x4559();let _0xdf4115=_0x45597b[_0x4536c9];return _0xdf4115;}const cache=new Map();export async function listDatabases(_0x3390b4){const _0x4f55f5=a76_0xdf41;if(cache[_0x4f55f5(0x163)](_0x3390b4))return cache[_0x4f55f5(0x16e)](_0x3390b4);const _0x2e1065=await listDatasets(_0x3390b4),_0x483ca6=new Map();for(const _0x1b31a1 of _0x2e1065){const _0xf7175c=_0x1b31a1[_0x4f55f5(0x165)];_0xf7175c?.[_0x4f55f5(0x160)]!=null&&_0x483ca6[_0x4f55f5(0x169)](_0xf7175c[_0x4f55f5(0x160)],_0xf7175c['dbName']??_0x4f55f5(0x16b)+_0xf7175c['dbId']);}const _0x48f9fe=[..._0x483ca6[_0x4f55f5(0x16d)]()]['map'](([_0x1cb02f,_0x52d8b6])=>({'dbId':_0x1cb02f,'dbName':_0x52d8b6}));return cache[_0x4f55f5(0x169)](_0x3390b4,_0x48f9fe),_0x48f9fe;}export async function getDbName(_0x50d7ad,_0x3c6f56){const _0x3a85e1=a76_0xdf41;try{const _0x380fe0=await listDatabases(_0x50d7ad);return _0x380fe0[_0x3a85e1(0x161)](_0x8b12c5=>_0x8b12c5['dbId']===_0x3c6f56)?.['dbName'];}catch{return undefined;}}function a76_0x4559(){const _0x1e7394=['find','731094aNoSIw','has','328088osKtNv','dbtableConfig','3081260uSokWT','3221252vSCQTn','444942gtYcOU','set','18yiMZhm','db-','81KIMgOm','entries','get','1001785qQVGJr','296056ufSgrf','dbId'];a76_0x4559=function(){return _0x1e7394;};return a76_0x4559();}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51af1d,_0x3acf87){const _0x1fed64=a77_0x3e1c,_0x1f0b77=_0x51af1d();while(!![]){try{const _0x1aec74=-parseInt(_0x1fed64(0x1e6))/0x1+-parseInt(_0x1fed64(0x1f1))/0x2+-parseInt(_0x1fed64(0x1e0))/0x3+-parseInt(_0x1fed64(0x1d8))/0x4*(parseInt(_0x1fed64(0x1eb))/0x5)+parseInt(_0x1fed64(0x1e5))/0x6+parseInt(_0x1fed64(0x1ec))/0x7*(-parseInt(_0x1fed64(0x1f7))/0x8)+parseInt(_0x1fed64(0x1d9))/0x9;if(_0x1aec74===_0x3acf87)break;else _0x1f0b77['push'](_0x1f0b77['shift']());}catch(_0x398b11){_0x1f0b77['push'](_0x1f0b77['shift']());}}}(a77_0x2172,0xd400f));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';import{installLosslessJsonResponseParser}from'../utils/lossless-json.js';function a77_0x3e1c(_0x217d5f,_0x4afac){_0x217d5f=_0x217d5f-0x1d6;const _0x217231=a77_0x2172();let _0x3e1cfe=_0x217231[_0x217d5f];return _0x3e1cfe;}let _client,restoreResponseJsonParser;function a77_0x2172(){const _0x196be7=['update','\x22.\x20','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','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','isArray',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.','4716459dQNYdo','accessKey','data\x20aggregate\x20--params.aggregate[','data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.','function','2835792deNimO','893123XUmIhG','validation','field','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','models','30zEiLgx','681667pSPeRE','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','authMode','env','getOne','1862786uxXuvH','column',']\x20must\x20be\x20an\x20object.','delete','aggregate','execute','112bxPcNb','bff','batchCreate','dataset_','appCode','map','sql','invokeSource','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','379744zztYqP','51528186vjJnDh'];a77_0x2172=function(){return _0x196be7;};return a77_0x2172();}export function initSdkClient(_0x2d0505){const _0xebb77d=a77_0x3e1c;restoreResponseJsonParser??=installLosslessJsonResponseParser();try{_client=createClient({'appCode':_0x2d0505[_0xebb77d(0x1fb)],'env':_0x2d0505[_0xebb77d(0x1ef)],'authMode':_0x2d0505[_0xebb77d(0x1ee)],..._0x2d0505[_0xebb77d(0x1e1)]?{'accessKey':_0x2d0505[_0xebb77d(0x1e1)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0xebb77d(0x1d6)]}}});}catch(_0x1b9765){clearSdkClient();throw _0x1b9765;}}export function clearSdkClient(){_client=undefined,restoreResponseJsonParser?.(),restoreResponseJsonParser=undefined;}function ensureClient(){const _0x5c5d8c=a77_0x3e1c;if(!_client)throw new Error(_0x5c5d8c(0x1dd));return _client;}function normalizeAggregateParams(_0x5753c3){const _0x3cff35=a77_0x3e1c,_0x351df6=_0x5753c3[_0x3cff35(0x1f5)];if(_0x351df6===undefined)return _0x5753c3;if(!Array['isArray'](_0x351df6))throw CliErrors[_0x3cff35(0x1e7)](_0x3cff35(0x1e3));return{..._0x5753c3,'aggregate':_0x351df6[_0x3cff35(0x1fc)]((_0x471364,_0x1cfd75)=>{const _0x3dc5e3=_0x3cff35;if(!_0x471364||typeof _0x471364!=='object'||Array[_0x3dc5e3(0x1de)](_0x471364))throw CliErrors[_0x3dc5e3(0x1e7)](_0x3dc5e3(0x1e2)+_0x1cfd75+_0x3dc5e3(0x1f3));const _0x353fbe=_0x471364[_0x3dc5e3(0x1f2)]??_0x471364[_0x3dc5e3(0x1e8)];if(typeof _0x353fbe!=='string'||_0x353fbe['trim']()==='')throw CliErrors[_0x3dc5e3(0x1e7)](_0x3dc5e3(0x1e2)+_0x1cfd75+_0x3dc5e3(0x1df));const _0x3cf8df={..._0x471364,'column':_0x353fbe};return delete _0x3cf8df[_0x3dc5e3(0x1e8)],_0x3cf8df;})};}export async function executeData(_0x1af3b4,_0x15d172,_0x34e9e9){const _0x4c0c74=a77_0x3e1c,_0x293c2b=ensureClient(),_0x45fb90=_0x4c0c74(0x1fa)+_0x1af3b4,_0x319299=_0x293c2b[_0x4c0c74(0x1ea)][_0x45fb90];if(!_0x319299||typeof _0x319299[_0x15d172]!==_0x4c0c74(0x1e4))throw new Error(_0x4c0c74(0x1d7)+_0x15d172+_0x4c0c74(0x1db)+_0x4c0c74(0x1ed));if(_0x15d172===_0x4c0c74(0x1f9))return _0x319299[_0x4c0c74(0x1f9)](parseBatchCreateItemsFromParams(_0x34e9e9));const _0x153c84=_0x34e9e9!==undefined&&_0x34e9e9!==null&&!Array[_0x4c0c74(0x1de)](_0x34e9e9)?_0x34e9e9:{};switch(_0x15d172){case _0x4c0c74(0x1f0):{const _0x47cf0f=_0x153c84['id'];if(_0x47cf0f===undefined||_0x47cf0f===null)throw new Error('getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x319299[_0x4c0c74(0x1f0)](_0x47cf0f);}case _0x4c0c74(0x1da):{const {id:_0xc0c175,..._0x2faede}=_0x153c84;if(_0xc0c175===undefined||_0xc0c175===null)throw new Error(_0x4c0c74(0x1dc));return _0x319299['update'](_0xc0c175,_0x2faede);}case _0x4c0c74(0x1f4):{const _0x11cfa4=_0x153c84['id'];if(_0x11cfa4===undefined||_0x11cfa4===null)throw new Error(_0x4c0c74(0x1e9));return _0x319299[_0x4c0c74(0x1f4)](_0x11cfa4);}case _0x4c0c74(0x1f5):return _0x319299[_0x4c0c74(0x1f5)](normalizeAggregateParams(_0x153c84));default:return _0x319299[_0x15d172](_0x153c84);}}export async function executeSdkSql(_0x29bb24,_0x2c3af9){const _0x27e4eb=a77_0x3e1c,_0x3d52b0=ensureClient();return _0x3d52b0[_0x27e4eb(0x1fd)]['execute']({'sqlCode':_0x29bb24,'params':_0x2c3af9});}export async function executeSdkBff(_0x5f5741,_0x349c54){const _0x5e7690=a77_0x3e1c,_0x36e9fe=ensureClient();return _0x36e9fe[_0x5e7690(0x1f8)][_0x5e7690(0x1f6)]({'scriptName':_0x5f5741,'params':_0x349c54});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x2e8b41=a78_0x5cc2;(function(_0x2733f9,_0x44a3f8){const _0x337284=a78_0x5cc2,_0x1a25d8=_0x2733f9();while(!![]){try{const _0x4927ef=parseInt(_0x337284(0x18d))/0x1*(parseInt(_0x337284(0x18b))/0x2)+-parseInt(_0x337284(0x18a))/0x3*(parseInt(_0x337284(0x194))/0x4)+-parseInt(_0x337284(0x18e))/0x5*(parseInt(_0x337284(0x193))/0x6)+parseInt(_0x337284(0x192))/0x7*(parseInt(_0x337284(0x18f))/0x8)+parseInt(_0x337284(0x196))/0x9*(-parseInt(_0x337284(0x195))/0xa)+-parseInt(_0x337284(0x191))/0xb*(parseInt(_0x337284(0x189))/0xc)+parseInt(_0x337284(0x18c))/0xd;if(_0x4927ef===_0x44a3f8)break;else _0x1a25d8['push'](_0x1a25d8['shift']());}catch(_0xe390ff){_0x1a25d8['push'](_0x1a25d8['shift']());}}}(a78_0x4a53,0x89f7a));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';function a78_0x4a53(){const _0x3d7a85=['2ztUqyO','5ujPgkP','8FhGthx','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','2096721cjljYN','3286465wdVVmi','5849100nnqsdD','32nkUpAz','16820kqAroj','5535cPlIQA','newConfigFileName','\x20file.','\x20auth\x20login`.','rate_limited','\x20or\x20run\x20`','12bDfIIL','317577jBOrjW','792314SiUDlA','30550884MHLUuL'];a78_0x4a53=function(){return _0x3d7a85;};return a78_0x4a53();}export{CliError};function a78_0x5cc2(_0x1f869d,_0x523941){_0x1f869d=_0x1f869d-0x189;const _0x4a5369=a78_0x4a53();let _0x5cc294=_0x4a5369[_0x1f869d];return _0x5cc294;}const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+a78_0x2e8b41(0x19b)+CLI_BIN_NAME+a78_0x2e8b41(0x199),'configMissingHint':'Set\x20appcode\x20via\x20--appcode\x20or\x20'+PRODUCT_CONFIG[a78_0x2e8b41(0x197)]+'.','notInProjectHint':a78_0x2e8b41(0x190)+PRODUCT_CONFIG[a78_0x2e8b41(0x197)]+a78_0x2e8b41(0x198)});export const CliErrors={...baseCliErrors,'rateLimited':(_0x9938c7,_0x1a4fb2)=>new CliError(a78_0x2e8b41(0x19a),0x2,_0x9938c7,_0x1a4fb2)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x203966,_0x14f45d){var _0x1751f5=a79_0x4fa8,_0x5cbe81=_0x203966();while(!![]){try{var _0xa93886=parseInt(_0x1751f5(0x73))/0x1*(-parseInt(_0x1751f5(0x70))/0x2)+parseInt(_0x1751f5(0x72))/0x3+-parseInt(_0x1751f5(0x71))/0x4+parseInt(_0x1751f5(0x6f))/0x5*(parseInt(_0x1751f5(0x6b))/0x6)+-parseInt(_0x1751f5(0x6c))/0x7+parseInt(_0x1751f5(0x6d))/0x8+parseInt(_0x1751f5(0x6e))/0x9;if(_0xa93886===_0x14f45d)break;else _0x5cbe81['push'](_0x5cbe81['shift']());}catch(_0x48f20d){_0x5cbe81['push'](_0x5cbe81['shift']());}}}(a79_0xcc15,0x325a7));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a79_0x37a3c9}from'@lovrabet/cli-framework';function a79_0xcc15(){var _0x4f7b64=['58hUpRNs','908088pgxkeh','105930XVIySY','6928sYBixA','2259624SJWJeD','1956416vRuyvA','3066696hHWcAW','1065762lxJtJE','5lDyJiO'];a79_0xcc15=function(){return _0x4f7b64;};return a79_0xcc15();}function a79_0x4fa8(_0x531f81,_0x11d929){_0x531f81=_0x531f81-0x6b;var _0xcc1533=a79_0xcc15();var _0x4fa8fd=_0xcc1533[_0x531f81];return _0x4fa8fd;}export function buildAllFlags(_0x54abcb){return a79_0x37a3c9(_0x54abcb,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5985ef,_0xef050e){const _0x35d7f9=a80_0x8323,_0x39fa19=_0x5985ef();while(!![]){try{const _0xa022d3=parseInt(_0x35d7f9(0x1cf))/0x1*(-parseInt(_0x35d7f9(0x1c6))/0x2)+parseInt(_0x35d7f9(0x1ce))/0x3+-parseInt(_0x35d7f9(0x1cc))/0x4*(parseInt(_0x35d7f9(0x1cd))/0x5)+-parseInt(_0x35d7f9(0x1c4))/0x6+parseInt(_0x35d7f9(0x1c9))/0x7+parseInt(_0x35d7f9(0x1c8))/0x8*(parseInt(_0x35d7f9(0x1ca))/0x9)+-parseInt(_0x35d7f9(0x1c7))/0xa*(-parseInt(_0x35d7f9(0x1c5))/0xb);if(_0xa022d3===_0xef050e)break;else _0x39fa19['push'](_0x39fa19['shift']());}catch(_0x28beba){_0x39fa19['push'](_0x39fa19['shift']());}}}(a80_0x1b88,0xf30e0));export function dryRun(_0x18c288,_0x37f6b5){const _0x33514f={'method':_0x18c288,'url':_0x37f6b5},_0x59e47e={'body'(_0xeda04c){const _0x2a9042=a80_0x8323;return _0x33514f[_0x2a9042(0x1cb)]=_0xeda04c,_0x59e47e;},'description'(_0x582507){return _0x33514f['description']=_0x582507,_0x59e47e;},'build'(){return{..._0x33514f};}};return _0x59e47e;}function a80_0x8323(_0x3527d5,_0x29f03c){_0x3527d5=_0x3527d5-0x1c4;const _0x1b88b6=a80_0x1b88();let _0x832312=_0x1b88b6[_0x3527d5];return _0x832312;}function a80_0x1b88(){const _0x19fbf7=['10438281ZHTgvj','441jRXoAf','body','4kShRFa','148045aEOHFn','1930458jFLBHc','118KdgvqV','2617890XlVwYK','2619892wkTUWW','30146BCiGEz','40TzPYej','24936fElcFk'];a80_0x1b88=function(){return _0x19fbf7;};return a80_0x1b88();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x277e2f=a81_0x1736;function a81_0x1736(_0x402796,_0x14e0ea){_0x402796=_0x402796-0x14a;const _0x368cde=a81_0x368c();let _0x1736ec=_0x368cde[_0x402796];return _0x1736ec;}(function(_0x3838fd,_0x3bee95){const _0x188791=a81_0x1736,_0x37bfcd=_0x3838fd();while(!![]){try{const _0x21fd66=parseInt(_0x188791(0x156))/0x1*(-parseInt(_0x188791(0x151))/0x2)+parseInt(_0x188791(0x14a))/0x3*(-parseInt(_0x188791(0x152))/0x4)+-parseInt(_0x188791(0x14c))/0x5*(parseInt(_0x188791(0x14b))/0x6)+parseInt(_0x188791(0x14e))/0x7+parseInt(_0x188791(0x154))/0x8*(parseInt(_0x188791(0x153))/0x9)+parseInt(_0x188791(0x14d))/0xa+parseInt(_0x188791(0x155))/0xb;if(_0x21fd66===_0x3bee95)break;else _0x37bfcd['push'](_0x37bfcd['shift']());}catch(_0x1362ef){_0x37bfcd['push'](_0x37bfcd['shift']());}}}(a81_0x368c,0xac96d));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);function a81_0x368c(){const _0x1334c5=['5SGZnKl','10949720nkYZQp','121898DLrPVo','parseFlags','validateFlags','723802vNIoSf','13828nDBQPq','251532nuIker','320TrChtA','10791473FyfYJl','3IMZQjC','264HXgOqX','6687030uMBdGh'];a81_0x368c=function(){return _0x1334c5;};return a81_0x368c();}export const parseFlags=helpers[a81_0x277e2f(0x14f)];export const validateFlags=helpers[a81_0x277e2f(0x150)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a82_0x18c3(){const _0x31975c=['8ORnlAd','map','service','713322pEwNDY','11212740hpASyL','1904166eSoiQT','860976bdQvNL','generateFullHelp','2AYFMpX','2924901PyfbSR','9XjYPeM','8182770miahes','55OhmMqp','\x20or\x20--appcode).','913580KvLzWw','filter'];a82_0x18c3=function(){return _0x31975c;};return a82_0x18c3();}(function(_0x4c11fe,_0xcceefe){const _0x4b2274=a82_0x3cb9,_0x1e59b7=_0x4c11fe();while(!![]){try{const _0x4ac0ce=parseInt(_0x4b2274(0x161))/0x1+-parseInt(_0x4b2274(0x15b))/0x2*(parseInt(_0x4b2274(0x168))/0x3)+-parseInt(_0x4b2274(0x169))/0x4+-parseInt(_0x4b2274(0x15f))/0x5*(-parseInt(_0x4b2274(0x166))/0x6)+-parseInt(_0x4b2274(0x15c))/0x7*(parseInt(_0x4b2274(0x163))/0x8)+-parseInt(_0x4b2274(0x15d))/0x9*(-parseInt(_0x4b2274(0x15e))/0xa)+-parseInt(_0x4b2274(0x167))/0xb;if(_0x4ac0ce===_0xcceefe)break;else _0x1e59b7['push'](_0x1e59b7['shift']());}catch(_0x5704f8){_0x1e59b7['push'](_0x1e59b7['shift']());}}}(a82_0x18c3,0xb7b51));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 createGenerators(){const _0x28e182=a82_0x3cb9;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(serviceRegistry,safeListDynamicServiceEntries()),'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20'+PRODUCT_CONFIG['newConfigFileName']+_0x28e182(0x160)});}export function generateCommandHelp(_0x31d8ad){return createGenerators()['generateCommandHelp'](_0x31d8ad);}function a82_0x3cb9(_0x30964f,_0x1476ab){_0x30964f=_0x30964f-0x15b;const _0x18c3a4=a82_0x18c3();let _0x3cb964=_0x18c3a4[_0x30964f];return _0x3cb964;}export function generateServiceHelp(_0x560dab){return createGenerators()['generateServiceHelp'](_0x560dab);}export function generateFullHelp(){const _0x54604a=a82_0x3cb9;return createGenerators()[_0x54604a(0x16a)]();}function getAnyServiceEntry(_0x276d42){const _0xe26e27=getServiceEntry(_0x276d42);if(_0xe26e27)return _0xe26e27;try{return getDynamicServiceEntry(_0x276d42);}catch{return undefined;}}function getAnyServiceDefinitions(_0x3b2081){const _0xc91d84=serviceGroups['get'](_0x3b2081);if(_0xc91d84)return _0xc91d84;try{return getDynamicServiceDefinitions(_0x3b2081);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x965caf=a82_0x3cb9,_0x47e346=new Set(serviceRegistry[_0x965caf(0x164)](_0x52784a=>_0x52784a['service']));try{return listDynamicServiceEntries()[_0x965caf(0x162)](_0x35ed0f=>!_0x47e346['has'](_0x35ed0f[_0x965caf(0x165)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a83_0x25de(){var _0x3e8bc1=['7101gpnkEO','2661099zdfFwy','23150EVSAjk','61NloSTZ','5510136MsDkyU','23498UbCGyz','5mWReuA','8271536GnJNQU','8216080vdUrGo','3595612uHHyPU'];a83_0x25de=function(){return _0x3e8bc1;};return a83_0x25de();}(function(_0x660b61,_0xd2c391){var _0xca7def=a83_0x2daf,_0x147b44=_0x660b61();while(!![]){try{var _0x1ef4a4=-parseInt(_0xca7def(0x18f))/0x1*(parseInt(_0xca7def(0x191))/0x2)+-parseInt(_0xca7def(0x197))/0x3+parseInt(_0xca7def(0x195))/0x4*(-parseInt(_0xca7def(0x192))/0x5)+-parseInt(_0xca7def(0x190))/0x6+parseInt(_0xca7def(0x193))/0x7+parseInt(_0xca7def(0x194))/0x8+-parseInt(_0xca7def(0x196))/0x9*(-parseInt(_0xca7def(0x18e))/0xa);if(_0x1ef4a4===_0xd2c391)break;else _0x147b44['push'](_0x147b44['shift']());}catch(_0x13e232){_0x147b44['push'](_0x147b44['shift']());}}}(a83_0x25de,0x95f44));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';function a83_0x2daf(_0x404d72,_0x5767ee){_0x404d72=_0x404d72-0x18e;var _0x25de17=a83_0x25de();var _0x2daf9f=_0x25de17[_0x404d72];return _0x2daf9f;}export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{dryRun}from'../framework/dryrun.js';export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a84_0xc9a5(_0x31ebbc,_0x1a3e5f){_0x31ebbc=_0x31ebbc-0xe6;const _0x2b07d0=a84_0x2b07();let _0xc9a55e=_0x2b07d0[_0x31ebbc];return _0xc9a55e;}(function(_0x5eec31,_0x27d002){const _0x197ad1=a84_0xc9a5,_0xaa6ac2=_0x5eec31();while(!![]){try{const _0x2696bc=-parseInt(_0x197ad1(0xee))/0x1+parseInt(_0x197ad1(0xe8))/0x2+parseInt(_0x197ad1(0xe7))/0x3*(-parseInt(_0x197ad1(0xf4))/0x4)+parseInt(_0x197ad1(0xf2))/0x5+-parseInt(_0x197ad1(0xef))/0x6+parseInt(_0x197ad1(0xe9))/0x7+-parseInt(_0x197ad1(0xf1))/0x8;if(_0x2696bc===_0x27d002)break;else _0xaa6ac2['push'](_0xaa6ac2['shift']());}catch(_0xc92a7e){_0xaa6ac2['push'](_0xaa6ac2['shift']());}}}(a84_0x2b07,0x79e60));function a84_0x2b07(){const _0x18e896=['pretty','13221DRNbuM','1383318hKFxsf','5897416TNwWXB','message','update','format','_notice','175449FLAPTm','3173562UnTEYu','error','7074448dFyKum','4906550ixTmHz','url','388shrMDi'];a84_0x2b07=function(){return _0x18e896;};return a84_0x2b07();}import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x154d4c,_0x5e7638){const _0x25741a=a84_0xc9a5,_0x239156=_0x154d4c[_0x25741a(0xed)],{_notice:_0x5ad298,..._0x1e4e4e}=_0x154d4c;void _0x5ad298,baseFormatOutput(_0x1e4e4e,_0x5e7638),_0x5e7638[_0x25741a(0xec)]===_0x25741a(0xe6)&&printPrettyNotice(_0x239156);}function printPrettyNotice(_0x508991){const _0x4f6074=a84_0xc9a5;if(!_0x508991?.[_0x4f6074(0xeb)])return;console[_0x4f6074(0xf0)](_0x508991[_0x4f6074(0xeb)][_0x4f6074(0xea)]+'\x20('+_0x508991[_0x4f6074(0xeb)][_0x4f6074(0xf3)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5341cc,_0x436745){const _0x25732d=a85_0x1e96,_0x8eface=_0x5341cc();while(!![]){try{const _0xfc32d9=parseInt(_0x25732d(0x154))/0x1+-parseInt(_0x25732d(0x13f))/0x2*(parseInt(_0x25732d(0x159))/0x3)+parseInt(_0x25732d(0x136))/0x4*(parseInt(_0x25732d(0x135))/0x5)+parseInt(_0x25732d(0x14f))/0x6*(parseInt(_0x25732d(0x14c))/0x7)+parseInt(_0x25732d(0x14a))/0x8*(-parseInt(_0x25732d(0x14e))/0x9)+parseInt(_0x25732d(0x152))/0xa*(parseInt(_0x25732d(0x140))/0xb)+parseInt(_0x25732d(0x142))/0xc*(parseInt(_0x25732d(0x157))/0xd);if(_0xfc32d9===_0x436745)break;else _0x8eface['push'](_0x8eface['shift']());}catch(_0x34dfb1){_0x8eface['push'](_0x8eface['shift']());}}}(a85_0x9d2e,0x1f054));function toKebab(_0x1882ce){const _0x551d81=a85_0x1e96;return _0x1882ce['replace'](/_/g,'-')[_0x551d81(0x143)](/-([A-Z]+)/g,(_0x9ab04f,_0x2fd53d)=>'-'+_0x2fd53d[_0x551d81(0x158)]())[_0x551d81(0x143)](/([a-z0-9])([A-Z])/g,(_0xe61e5a,_0x3b5e83,_0x2876b0)=>_0x3b5e83+'-'+_0x2876b0)[_0x551d81(0x158)]();}function a85_0x1e96(_0x5078f0,_0x33870f){_0x5078f0=_0x5078f0-0x131;const _0x9d2e42=a85_0x9d2e();let _0x1e967b=_0x9d2e42[_0x5078f0];return _0x1e967b;}function a85_0x9d2e(){const _0x2c079f=['nonInteractive','name','1510SOUBnb','push','89950fRnGmk','has','dryRun','21372eeMsxl','toLowerCase','459717KyLjkA','env','set','indexOf','keys','help','global','30tRDewf','15004qQvCKI','type','alias','boolean','length','string','number','format','dry-run','2luOBeI','9031tCKhgx','app','876bUOqut','replace','corrected','add','get','slice','original','appcode','780792WxsRQs','entries','2177wMdPcZ','non-interactive','9zDJRUG','414SLXDgu'];a85_0x9d2e=function(){return _0x2c079f;};return a85_0x9d2e();}function buildKnownFlags(_0x5647f8){const _0x3a4522=a85_0x1e96,_0x4ff8c7=new Set();for(const _0x3469a0 of _0x5647f8){_0x4ff8c7[_0x3a4522(0x145)](_0x3469a0['name']),_0x4ff8c7[_0x3a4522(0x145)](toCamelCase(_0x3469a0['name']));}for(const _0x1e2d2f of[_0x3a4522(0x13e),_0x3a4522(0x156),'yes',_0x3a4522(0x13d)]){_0x4ff8c7[_0x3a4522(0x145)](_0x1e2d2f);}for(const _0x1a329a of[_0x3a4522(0x133),_0x3a4522(0x15a),_0x3a4522(0x149),_0x3a4522(0x141),_0x3a4522(0x150),_0x3a4522(0x14d),'ci',_0x3a4522(0x134),'version']){_0x4ff8c7[_0x3a4522(0x145)](_0x1a329a);}return _0x4ff8c7;}function buildFlagTypeMap(_0x4d56d3){const _0x2765c6=a85_0x1e96,_0x1a62da=new Map();for(const _0x594d6d of _0x4d56d3){_0x1a62da[_0x2765c6(0x15b)](_0x594d6d[_0x2765c6(0x151)],_0x594d6d[_0x2765c6(0x137)]),_0x1a62da[_0x2765c6(0x15b)](toCamelCase(_0x594d6d[_0x2765c6(0x151)]),_0x594d6d[_0x2765c6(0x137)]);}return _0x1a62da;}function toCamelCase(_0x1d2ece){const _0x3f86a8=a85_0x1e96;return _0x1d2ece[_0x3f86a8(0x143)](/-([a-z])/g,(_0x28c2c1,_0x44a76b)=>_0x44a76b['toUpperCase']());}function aliasHandler(_0x4b4189,_0x3008ac){const _0x49a2c2=a85_0x1e96,_0x3fabf6=[];for(const _0x14683e of Object[_0x49a2c2(0x132)](_0x4b4189)){if(_0x3008ac[_0x49a2c2(0x155)](_0x14683e))continue;const _0x3daef1=toKebab(_0x14683e);_0x3daef1!==_0x14683e&&_0x3008ac[_0x49a2c2(0x155)](_0x3daef1)&&_0x3fabf6[_0x49a2c2(0x153)]({'original':_0x14683e,'corrected':_0x3daef1,'handler':_0x49a2c2(0x138)});}return _0x3fabf6;}function stickyHandler(_0x542195,_0x53fb96,_0x289d55){const _0x496296=a85_0x1e96,_0x240fbf=[];for(const [_0x20c559,_0x1979bb]of Object[_0x496296(0x14b)](_0x542195)){if(_0x1979bb!==!![])continue;for(let _0x1b0147=_0x20c559[_0x496296(0x13a)]-0x1;_0x1b0147>0x0;_0x1b0147--){const _0x296868=_0x20c559[_0x496296(0x147)](0x0,_0x1b0147),_0x11f510=_0x20c559[_0x496296(0x147)](_0x1b0147),_0x41864d=toKebab(_0x296868),_0x2debe4=toCamelCase(_0x296868),_0x33ee15=_0x53fb96['has'](_0x296868)?_0x296868:_0x53fb96['has'](_0x41864d)?_0x41864d:_0x53fb96[_0x496296(0x155)](_0x2debe4)?_0x2debe4:null;if(!_0x33ee15)continue;const _0x1cbb3e=_0x289d55['get'](_0x33ee15)??_0x496296(0x13b);let _0x39c732;if(_0x1cbb3e===_0x496296(0x13c)){const _0x43fb14=Number(_0x11f510);if(isNaN(_0x43fb14)||_0x11f510==='')continue;_0x39c732=_0x43fb14;}else{if(_0x1cbb3e===_0x496296(0x139))continue;else{if(_0x11f510==='')continue;_0x39c732=_0x11f510;}}_0x240fbf['push']({'original':_0x20c559,'corrected':_0x33ee15+'='+_0x39c732,'handler':'sticky'});break;}}return _0x240fbf;}export function correctFlags(_0x1f97ad,_0x5e4626){const _0x5d9825=a85_0x1e96,_0x2a9346=buildKnownFlags(_0x5e4626),_0xb24ec2=buildFlagTypeMap(_0x5e4626),_0xfec2e3=aliasHandler(_0x1f97ad,_0x2a9346),_0x231198=stickyHandler(_0x1f97ad,_0x2a9346,_0xb24ec2),_0x29f9d2=[..._0xfec2e3,..._0x231198];if(_0x29f9d2['length']===0x0)return{'flags':_0x1f97ad,'corrections':[]};const _0x2df2cc={..._0x1f97ad},_0x3ab907=new Set();for(const _0x4efe15 of _0xfec2e3){_0x2df2cc[_0x4efe15[_0x5d9825(0x144)]]=_0x1f97ad[_0x4efe15['original']],_0x3ab907[_0x5d9825(0x145)](_0x4efe15[_0x5d9825(0x148)]);}for(const _0x14e0b6 of _0x231198){const _0x2286f2=_0x14e0b6[_0x5d9825(0x144)][_0x5d9825(0x131)]('='),_0x3b35be=_0x14e0b6[_0x5d9825(0x144)][_0x5d9825(0x147)](0x0,_0x2286f2),_0x2e014a=_0x14e0b6[_0x5d9825(0x144)][_0x5d9825(0x147)](_0x2286f2+0x1),_0x552d2b=_0xb24ec2[_0x5d9825(0x146)](_0x3b35be)??_0x5d9825(0x13b);_0x552d2b===_0x5d9825(0x13c)?_0x2df2cc[_0x3b35be]=Number(_0x2e014a):_0x2df2cc[_0x3b35be]=_0x2e014a,_0x3ab907[_0x5d9825(0x145)](_0x14e0b6['original']);}for(const _0x5d1870 of _0x3ab907){delete _0x2df2cc[_0x5d1870];}return{'flags':_0x2df2cc,'corrections':_0x29f9d2};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a86_0xf528(){const _0x2e28ff=['IP_RATE_LIMIT_EXCEEDED','4270EmJuOK','object','rateLimited','1857928lIqYHA','\x20seconds\x20before\x20retrying.','18kLAqUo','13915RkdrRt','isInteger','1okRaZK','150zCTika','2467381FLwfxK','693332WDggqF','status','Request\x20rate\x20limit\x20exceeded.','test','Retry\x20after\x20','retry-after','Retry-After','number','trim','1101384Vucsma','toLowerCase','\x20Retry\x20only\x20the\x20failed\x20item;\x20keep\x20requests\x20serial\x20and\x20preserve\x20completed\x20checkpoints.','4583010ToFeHE','MAX_QPS_LIMIT','call','218055iHtZFv'];a86_0xf528=function(){return _0x2e28ff;};return a86_0xf528();}const a86_0xee2807=a86_0x47f2;(function(_0x126fdf,_0x5a1ef8){const _0x18f1c8=a86_0x47f2,_0x4ed52d=_0x126fdf();while(!![]){try{const _0x1c25ac=-parseInt(_0x18f1c8(0x17d))/0x1*(-parseInt(_0x18f1c8(0x164))/0x2)+parseInt(_0x18f1c8(0x170))/0x3+-parseInt(_0x18f1c8(0x16d))/0x4+-parseInt(_0x18f1c8(0x173))/0x5*(parseInt(_0x18f1c8(0x17e))/0x6)+parseInt(_0x18f1c8(0x163))/0x7+-parseInt(_0x18f1c8(0x178))/0x8*(-parseInt(_0x18f1c8(0x17a))/0x9)+-parseInt(_0x18f1c8(0x175))/0xa*(parseInt(_0x18f1c8(0x17b))/0xb);if(_0x1c25ac===_0x5a1ef8)break;else _0x4ed52d['push'](_0x4ed52d['shift']());}catch(_0x42b95e){_0x4ed52d['push'](_0x4ed52d['shift']());}}}(a86_0xf528,0xbfc75));import{CliErrors}from'../errors.js';const RATE_LIMIT_ERROR_CODES=new Set(['EXCEED_MAX_QPS_LIMIT',a86_0xee2807(0x171),a86_0xee2807(0x174)]);function nonEmptyString(_0x47397b){const _0x5131b9=a86_0xee2807;if(typeof _0x47397b!=='string')return undefined;const _0x1d1a77=_0x47397b[_0x5131b9(0x16c)]();return _0x1d1a77||undefined;}function buildRetryHint(_0xe82d52){const _0x755374=a86_0xee2807,_0xf8c4ee=nonEmptyString(_0xe82d52),_0x40c7d3=_0xf8c4ee?/^\d+$/[_0x755374(0x167)](_0xf8c4ee)?'Wait\x20'+_0xf8c4ee+_0x755374(0x179):_0x755374(0x168)+_0xf8c4ee+'.':'Retry\x20after\x20a\x20short\x20delay.';return _0x40c7d3+_0x755374(0x16f);}function a86_0x47f2(_0x4ae16b,_0x3e367f){_0x4ae16b=_0x4ae16b-0x163;const _0xf528ba=a86_0xf528();let _0x47f2c7=_0xf528ba[_0x4ae16b];return _0x47f2c7;}export function createRateLimitError(_0x5411e3){const _0x54c5d6=a86_0xee2807,_0x3fa217=nonEmptyString(_0x5411e3['errorCode'])?.['toUpperCase'](),_0x5b2dcd=Number(_0x5411e3[_0x54c5d6(0x165)])===0x1ad||_0x3fa217!==undefined&&RATE_LIMIT_ERROR_CODES['has'](_0x3fa217);if(!_0x5b2dcd)return undefined;return CliErrors[_0x54c5d6(0x177)](nonEmptyString(_0x5411e3['message'])??_0x54c5d6(0x166),buildRetryHint(_0x5411e3['retryAfter']));}export function readRetryAfter(_0x2deec3){const _0x36110e=a86_0xee2807;if(!_0x2deec3||typeof _0x2deec3!==_0x36110e(0x176))return undefined;const _0x582a9a=_0x2deec3['get'];if(typeof _0x582a9a==='function'){const _0x5b5cb3=_0x582a9a[_0x36110e(0x172)](_0x2deec3,_0x36110e(0x16a))??_0x582a9a['call'](_0x2deec3,_0x36110e(0x169));return nonEmptyString(_0x5b5cb3);}for(const [_0x228d6c,_0x35c1d9]of Object['entries'](_0x2deec3)){if(_0x228d6c[_0x36110e(0x16e)]()===_0x36110e(0x169))return nonEmptyString(_0x35c1d9)??(typeof _0x35c1d9===_0x36110e(0x16b)?String(_0x35c1d9):undefined);}return undefined;}export function readRetryAfterSeconds(_0x34a377){const _0x144f28=a86_0xee2807;if(!_0x34a377||typeof _0x34a377!=='object'||Array['isArray'](_0x34a377))return undefined;const _0x48e676=_0x34a377['retryAfterSeconds'];if(typeof _0x48e676==='number')return Number[_0x144f28(0x17c)](_0x48e676)&&_0x48e676>=0x0?String(_0x48e676):undefined;const _0x2cfe8d=nonEmptyString(_0x48e676);return _0x2cfe8d&&/^\d+$/[_0x144f28(0x167)](_0x2cfe8d)?_0x2cfe8d:undefined;}
|