@lovrabet/lovrabet-cli 2.1.1 → 2.1.2-beta.1
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/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/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/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/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.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x147b97=a49_0x4500;(function(_0x68040a,_0xfbcc7b){const _0x1c3694=a49_0x4500,_0x1d44cd=_0x68040a();while(!![]){try{const _0x18d0b2=-parseInt(_0x1c3694(0xcc))/0x1+-parseInt(_0x1c3694(0xd2))/0x2*(parseInt(_0x1c3694(0xd5))/0x3)+parseInt(_0x1c3694(0xc7))/0x4+-parseInt(_0x1c3694(0xcb))/0x5*(-parseInt(_0x1c3694(0xc8))/0x6)+-parseInt(_0x1c3694(0xd4))/0x7*(-parseInt(_0x1c3694(0xce))/0x8)+-parseInt(_0x1c3694(0xcf))/0x9*(parseInt(_0x1c3694(0xcd))/0xa)+parseInt(_0x1c3694(0xd1))/0xb;if(_0x18d0b2===_0xfbcc7b)break;else _0x1d44cd['push'](_0x1d44cd['shift']());}catch(_0x1466cd){_0x1d44cd['push'](_0x1d44cd['shift']());}}}(a49_0x279d,0x55fee));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;function a49_0x279d(){const _0x92fef7=['runtime','runtimeDomain','userDomain','nonProduction','apiDomain','skillHubDomain','1498188pAyiQF','60mMwicx','production','skillhub','30180IOSXtM','682053uiayme','230fzFMpC','144KAhbmH','23229wtuUmc','user','11521488XFBiss','38ErmbCS','api','59563ajWATq','85551kUNjGp','domains'];a49_0x279d=function(){return _0x92fef7;};return a49_0x279d();}export function initDomains(_0x285375){const _0x5bc4cb=a49_0x4500;customApiDomain=_0x285375?.[_0x5bc4cb(0xdb)],customUserDomain=_0x285375?.[_0x5bc4cb(0xd9)],customRuntimeDomain=_0x285375?.[_0x5bc4cb(0xd8)],customSkillHubDomain=_0x285375?.[_0x5bc4cb(0xdc)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a49_0x147b97(0xd6)]['production'][a49_0x147b97(0xd0)]:PRODUCT_CONFIG[a49_0x147b97(0xd6)][a49_0x147b97(0xda)][a49_0x147b97(0xd0)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a49_0x147b97(0xd6)][a49_0x147b97(0xc9)][a49_0x147b97(0xd3)]:PRODUCT_CONFIG['domains'][a49_0x147b97(0xda)][a49_0x147b97(0xd3)]);function a49_0x4500(_0xd5421e,_0x1788f9){_0xd5421e=_0xd5421e-0xc7;const _0x279db5=a49_0x279d();let _0x450090=_0x279db5[_0xd5421e];return _0x450090;}export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a49_0x147b97(0xc9)][a49_0x147b97(0xd7)]:PRODUCT_CONFIG[a49_0x147b97(0xd6)][a49_0x147b97(0xda)][a49_0x147b97(0xd7)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a49_0x147b97(0xd6)]['production'][a49_0x147b97(0xca)]:PRODUCT_CONFIG[a49_0x147b97(0xd6)][a49_0x147b97(0xda)][a49_0x147b97(0xca)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a50_0x4429(){const _0x16490e=['ENV','5316588IXXLgT','5352354SDBCax','511195LhbNql','online','10wfjTTn','dev','30088SBLBWr','8182090XtYTMA','2086MZrLpI','12CLBeoN','daily','production','1057732oeBiBT','development','572466oQYGfm'];a50_0x4429=function(){return _0x16490e;};return a50_0x4429();}const a50_0x564aba=a50_0x3665;(function(_0x3146c0,_0x5def68){const _0xd02f16=a50_0x3665,_0x4e5293=_0x3146c0();while(!![]){try{const _0x47aa71=-parseInt(_0xd02f16(0xcc))/0x1+parseInt(_0xd02f16(0xc4))/0x2*(parseInt(_0xd02f16(0xbe))/0x3)+parseInt(_0xd02f16(0xc9))/0x4*(parseInt(_0xd02f16(0xc2))/0x5)+-parseInt(_0xd02f16(0xc1))/0x6+parseInt(_0xd02f16(0xc8))/0x7*(parseInt(_0xd02f16(0xc6))/0x8)+-parseInt(_0xd02f16(0xc0))/0x9+parseInt(_0xd02f16(0xc7))/0xa;if(_0x47aa71===_0x5def68)break;else _0x4e5293['push'](_0x4e5293['shift']());}catch(_0xd4fc98){_0x4e5293['push'](_0x4e5293['shift']());}}}(a50_0x4429,0xa0f5b));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a50_0x564aba(0xcb),a50_0x564aba(0xcd),a50_0x564aba(0xca)];function a50_0x3665(_0x1f593e,_0x16746d){_0x1f593e=_0x1f593e-0xbe;const _0x442952=a50_0x4429();let _0x3665f3=_0x442952[_0x1f593e];return _0x3665f3;}export function normalizeEnv(_0x19b77f){const _0x54b49=a50_0x564aba;return _0x19b77f===_0x54b49(0xc3)?'production':_0x19b77f;}export function isProduction(_0x334e54){const _0x4efcf3=a50_0x564aba;return normalizeEnv(_0x334e54)===_0x4efcf3(0xcb);}export function isDaily(_0x49a4cb){const _0x4e7667=a50_0x564aba;return normalizeEnv(_0x49a4cb)===_0x4e7667(0xca);}export function isDev(_0x5bb56c){const _0x2b810f=a50_0x564aba,_0x2b7970=normalizeEnv(_0x5bb56c);return _0x2b7970==='development'||_0x2b7970===_0x2b810f(0xc5);}let env=normalizeEnv(productEnv(a50_0x564aba(0xbf))||a50_0x564aba(0xcb));export function getEnv(){return env;}export function initEnv(_0x4524e7){env=normalizeEnv(_0x4524e7);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x4c4dd7=a51_0x1324;function a51_0x1324(_0x346337,_0x465bbb){_0x346337=_0x346337-0xcc;const _0x4bad5e=a51_0x4bad();let _0x132413=_0x4bad5e[_0x346337];return _0x132413;}function a51_0x4bad(){const _0x18e66b=['9lINjuY','96402Hhldzy','compress','730840kUxUUZ','259VoVbKU','273112VxeaXV','1708456ygJJHV','1819659bDDNEN','1327340JSQfWx','214706OIMmoM'];a51_0x4bad=function(){return _0x18e66b;};return a51_0x4bad();}(function(_0x19189e,_0x36d351){const _0x8c98ac=a51_0x1324,_0x417a58=_0x19189e();while(!![]){try{const _0x39a6b3=parseInt(_0x8c98ac(0xcc))/0x1+-parseInt(_0x8c98ac(0xd0))/0x2+parseInt(_0x8c98ac(0xd4))/0x3+parseInt(_0x8c98ac(0xd2))/0x4+parseInt(_0x8c98ac(0xd5))/0x5+parseInt(_0x8c98ac(0xce))/0x6*(-parseInt(_0x8c98ac(0xd1))/0x7)+parseInt(_0x8c98ac(0xd3))/0x8*(parseInt(_0x8c98ac(0xcd))/0x9);if(_0x39a6b3===_0x36d351)break;else _0x417a58['push'](_0x417a58['shift']());}catch(_0x308880){_0x417a58['push'](_0x417a58['shift']());}}}(a51_0x4bad,0x63c57));export const OUTPUT_FORMAT_VALUES=['json','pretty',a51_0x4c4dd7(0xcf)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x29fa9d=a52_0x15b9;(function(_0xf60a69,_0x584127){const _0x194fee=a52_0x15b9,_0x3d2d50=_0xf60a69();while(!![]){try{const _0xf3a9be=-parseInt(_0x194fee(0x1a1))/0x1+parseInt(_0x194fee(0x197))/0x2+-parseInt(_0x194fee(0x1a8))/0x3+-parseInt(_0x194fee(0x195))/0x4+parseInt(_0x194fee(0x190))/0x5*(-parseInt(_0x194fee(0x1a3))/0x6)+-parseInt(_0x194fee(0x19b))/0x7+-parseInt(_0x194fee(0x19d))/0x8*(-parseInt(_0x194fee(0x198))/0x9);if(_0xf3a9be===_0x584127)break;else _0x3d2d50['push'](_0x3d2d50['shift']());}catch(_0x242aea){_0x3d2d50['push'](_0x3d2d50['shift']());}}}(a52_0x2d67,0xb25a2));export const PRODUCT_CONFIG={'cliBinName':a52_0x29fa9d(0x193),'cliDisplayName':a52_0x29fa9d(0x1a2),'npmPackageName':a52_0x29fa9d(0x1a6),'skillSource':a52_0x29fa9d(0x1a7),'npmRegistryBaseUrl':a52_0x29fa9d(0x1a0),'envPrefix':a52_0x29fa9d(0x18f),'legacyEnvPrefixes':[a52_0x29fa9d(0x196)],'configFileNames':[a52_0x29fa9d(0x1a4),a52_0x29fa9d(0x1aa)],'newConfigFileName':a52_0x29fa9d(0x1a4),'homeDirName':a52_0x29fa9d(0x18d),'logFileName':a52_0x29fa9d(0x191),'invokeSource':a52_0x29fa9d(0x19a),'userCenterDisplayName':a52_0x29fa9d(0x1a9),'skipNpxSkillsEnvSuffix':a52_0x29fa9d(0x19f),'domains':{'production':{'user':'https://user.lovrabet.com','api':'https://api.lovrabet.com','runtime':a52_0x29fa9d(0x18e),'skillhub':a52_0x29fa9d(0x192)},'nonProduction':{'user':a52_0x29fa9d(0x1a5),'api':a52_0x29fa9d(0x19c),'runtime':a52_0x29fa9d(0x18c),'skillhub':'https://skills-daily.lovrabet.com'}},'accessKeyCreatePath':a52_0x29fa9d(0x194)};function a52_0x15b9(_0x16c034,_0x14f463){_0x16c034=_0x16c034-0x18c;const _0x2d67f5=a52_0x2d67();let _0x15b972=_0x2d67f5[_0x16c034];return _0x15b972;}export function productEnvName(_0x5b73f5){const _0x5e6ce1=a52_0x29fa9d;return PRODUCT_CONFIG[_0x5e6ce1(0x19e)]+'_'+_0x5b73f5;}export function productEnvNames(_0x22a06b){const _0x7f0655=a52_0x29fa9d;return[productEnvName(_0x22a06b),...PRODUCT_CONFIG[_0x7f0655(0x199)]['map'](_0x55bec2=>_0x55bec2+'_'+_0x22a06b)];}function a52_0x2d67(){const _0x2e41f1=['https://skills.lovrabet.com','lovrabet','/user/ak','2340032rjjKwP','RABETBASE','2623448kucLCw','9432RMiWDr','legacyEnvPrefixes','cli:lovrabet-runtime','6141051ahNSCX','https://daily-api.lovrabet.com','15704RswfKa','envPrefix','SKIP_NPX_SKILLS','https://registry.npmjs.org','318644xMAGRk','Lovrabet\x20Runtime\x20CLI','18arLZJL','.lovrabet.json','https://user-daily.lovrabet.com','@lovrabet/lovrabet-cli','lovrabet/lovrabet-cli','1046064yhAlmk','Lovrabet\x20User\x20Center','.lovrabetrc','https://daily-runtime.lovrabet.com','.lovrabet','https://runtime.lovrabet.com','LOVRABET','847975WNFIwN','.lovrabet-runtime.log'];a52_0x2d67=function(){return _0x2e41f1;};return a52_0x2d67();}export function productEnv(_0x1bb62d){for(const _0x42a85f of productEnvNames(_0x1bb62d)){const _0x5c4cb2=process.env[_0x42a85f];if(_0x5c4cb2!==undefined)return _0x5c4cb2;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0x306d1a=a53_0x17df;function a53_0x17df(_0x43bad1,_0x509c36){_0x43bad1=_0x43bad1-0x181;const _0xceda39=a53_0xceda();let _0x17df84=_0xceda39[_0x43bad1];return _0x17df84;}function a53_0xceda(){const _0x467b46=['high-risk-write','86730OxAInS','1624930qZShaI','11EWYCAH','1892ohPZPa','160254szKmIf','read','88zfAweM','669VOKAxO','5109540DiyWug','write','75983cFNXLF','7uMwpmE','1026318iJcgrC','2mnnjSN'];a53_0xceda=function(){return _0x467b46;};return a53_0xceda();}(function(_0x1a9586,_0x2ec437){const _0x32389d=a53_0x17df,_0x6d7ab2=_0x1a9586();while(!![]){try{const _0x238ad7=-parseInt(_0x32389d(0x183))/0x1*(-parseInt(_0x32389d(0x186))/0x2)+-parseInt(_0x32389d(0x18f))/0x3*(parseInt(_0x32389d(0x18b))/0x4)+-parseInt(_0x32389d(0x188))/0x5+-parseInt(_0x32389d(0x185))/0x6*(parseInt(_0x32389d(0x184))/0x7)+parseInt(_0x32389d(0x18e))/0x8*(-parseInt(_0x32389d(0x18c))/0x9)+-parseInt(_0x32389d(0x189))/0xa*(-parseInt(_0x32389d(0x18a))/0xb)+parseInt(_0x32389d(0x181))/0xc;if(_0x238ad7===_0x2ec437)break;else _0x6d7ab2['push'](_0x6d7ab2['shift']());}catch(_0x2eb13b){_0x6d7ab2['push'](_0x6d7ab2['shift']());}}}(a53_0xceda,0x2a9bf));export const RISK_LEVEL_VALUES=[a53_0x306d1a(0x18d),a53_0x306d1a(0x182),a53_0x306d1a(0x187)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x18a191=a54_0x441f;(function(_0x4550fb,_0x2f5d7c){const _0x49f679=a54_0x441f,_0xb5c5b4=_0x4550fb();while(!![]){try{const _0x1d4480=parseInt(_0x49f679(0x17a))/0x1+parseInt(_0x49f679(0x17d))/0x2+-parseInt(_0x49f679(0x17c))/0x3+parseInt(_0x49f679(0x17e))/0x4+parseInt(_0x49f679(0x182))/0x5+-parseInt(_0x49f679(0x17f))/0x6+-parseInt(_0x49f679(0x181))/0x7;if(_0x1d4480===_0x2f5d7c)break;else _0xb5c5b4['push'](_0xb5c5b4['shift']());}catch(_0x825cf1){_0xb5c5b4['push'](_0xb5c5b4['shift']());}}}(a54_0x1dfe,0x87349));import{PRODUCT_CONFIG}from'../constant/product.js';function a54_0x441f(_0x45a96b,_0x4fc278){_0x45a96b=_0x45a96b-0x17a;const _0x1dfe93=a54_0x1dfe();let _0x441f0c=_0x1dfe93[_0x45a96b];return _0x441f0c;}function a54_0x1dfe(){const _0x8b0d7e=['1816674AfTkqS','2367584QCJkBF','1614984kpKkMw','domains','9388393AeJxQo','3838560risOxW','397949ABuVov','production','1505190OYFbWG'];a54_0x1dfe=function(){return _0x8b0d7e;};return a54_0x1dfe();}export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a54_0x18a191(0x180)][a54_0x18a191(0x17b)]['user']+PRODUCT_CONFIG['accessKeyCreatePath'];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a55_0x3de67e=a55_0xc765;(function(_0x4fc328,_0x1cd826){const _0x1e414b=a55_0xc765,_0x4835b0=_0x4fc328();while(!![]){try{const _0x379159=parseInt(_0x1e414b(0x13b))/0x1*(parseInt(_0x1e414b(0x117))/0x2)+parseInt(_0x1e414b(0x154))/0x3*(parseInt(_0x1e414b(0x12f))/0x4)+-parseInt(_0x1e414b(0x131))/0x5*(-parseInt(_0x1e414b(0x12e))/0x6)+parseInt(_0x1e414b(0x11c))/0x7+-parseInt(_0x1e414b(0x138))/0x8*(-parseInt(_0x1e414b(0x159))/0x9)+parseInt(_0x1e414b(0x12b))/0xa*(-parseInt(_0x1e414b(0x13d))/0xb)+-parseInt(_0x1e414b(0x143))/0xc;if(_0x379159===_0x1cd826)break;else _0x4835b0['push'](_0x4835b0['shift']());}catch(_0x475060){_0x4835b0['push'](_0x4835b0['shift']());}}}(a55_0x361e,0x4f1ed));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';function a55_0xc765(_0x457956,_0x365b23){_0x457956=_0x457956-0x10d;const _0x361e7c=a55_0x361e();let _0xc765c1=_0x361e7c[_0x457956];return _0xc765c1;}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[a55_0x3de67e(0x114)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a55_0x3de67e(0x137)];function resolveConfigPath(_0x3ea93e){for(const _0x49a311 of CONFIG_NAMES){const _0x41590d=resolve(_0x3ea93e,_0x49a311);if(existsSync(_0x41590d))return _0x41590d;}return undefined;}export function resolveWriteConfigPath(_0x230baa){const _0x9f789e=_0x230baa==='project'?process['cwd']():homedir(),_0x237caa=resolveConfigPath(_0x9f789e);return _0x237caa??resolve(_0x9f789e,NEW_CONFIG_NAME);}export function readConfigFile(_0x1ceba1){const _0x42a001=a55_0x3de67e;try{if(existsSync(_0x1ceba1)){const _0x3cf952=readFileSync(_0x1ceba1,{'encoding':_0x42a001(0x120)});if(_0x3cf952){const _0x1f245e=JSON['parse'](_0x3cf952);return migrateOnlineEnv(_0x1ceba1,_0x1f245e),_0x1f245e;}}}catch{}return{};}function migrateOnlineEnv(_0x4eeb03,_0x39dce6){const _0x51e3c4=a55_0x3de67e;let _0x39b6e5=![];_0x39dce6[_0x51e3c4(0x13c)]===_0x51e3c4(0x142)&&(_0x39dce6[_0x51e3c4(0x13c)]=_0x51e3c4(0x123),_0x39b6e5=!![]);if(_0x39dce6[_0x51e3c4(0x156)]&&typeof _0x39dce6[_0x51e3c4(0x156)]==='object')for(const _0x564000 of Object[_0x51e3c4(0x11b)](_0x39dce6[_0x51e3c4(0x156)])){_0x564000&&_0x564000['env']===_0x51e3c4(0x142)&&(_0x564000[_0x51e3c4(0x13c)]=_0x51e3c4(0x123),_0x39b6e5=!![]);}if(_0x39b6e5)try{writeConfigFile(_0x4eeb03,_0x39dce6);}catch{}}export function writeConfigFile(_0x5903f1,_0x75f526){const _0x2e64e2=a55_0x3de67e,_0x3323a4=dirname(_0x5903f1);!existsSync(_0x3323a4)&&mkdirSync(_0x3323a4,{'recursive':!![]});const _0x8772f4=_0x5903f1+_0x2e64e2(0x157);try{writeFileSync(_0x8772f4,JSON['stringify'](_0x75f526,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x8772f4,_0x5903f1);}catch(_0x50295c){if(_0x50295c[_0x2e64e2(0x155)]==='EPERM'||_0x50295c[_0x2e64e2(0x155)]===_0x2e64e2(0x126)||_0x50295c[_0x2e64e2(0x155)]===_0x2e64e2(0x14f)){writeFileSync(_0x5903f1,JSON[_0x2e64e2(0x139)](_0x75f526,null,0x2)+'\x0a',{'encoding':_0x2e64e2(0x120)});try{unlinkSync(_0x8772f4);}catch{}}else throw _0x50295c;}}catch(_0x3fa194){try{unlinkSync(_0x8772f4);}catch{}throw _0x3fa194;}}export function isNonInteractiveMode(_0x35cf3c){const _0x153268=a55_0x3de67e;return!!(_0x35cf3c[_0x153268(0x15a)]||_0x35cf3c['ci']||productEnvNames('CI')[_0x153268(0x127)](_0x5a4ee5=>process.env[_0x5a4ee5]===_0x153268(0x153))||process.env.CI===_0x153268(0x153)||!process['stdout'][_0x153268(0x136)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x43772d=a55_0x3de67e;if(!process[_0x43772d(0x11e)][_0x43772d(0x136)])return![];try{const _0x2c459a=process['stdin']['isRaw'];return process[_0x43772d(0x11e)][_0x43772d(0x13f)](!![]),process[_0x43772d(0x11e)]['setRawMode'](_0x2c459a??![]),!![];}catch{return![];}}export async function createContext(_0x373e3b){const _0x134726=a55_0x3de67e,_0x513ebb=readRawConfig(),_0x43a7b7=buildConfig(_0x513ebb,_0x373e3b);await initGlobalEnvironment(_0x43a7b7);const {getUserDomain:_0x32d0fd,getApiDomain:_0x3d7d8d}=await import('./constant/domain.js'),_0x4823dd={'apiDomain':_0x3d7d8d(),'userDomain':_0x32d0fd()},_0x21dfb4=await buildAuth(_0x43a7b7);logger['setLogPath'](process[_0x134726(0x132)]());const _0x455b76=(CLI_BIN_NAME+'\x20'+process[_0x134726(0x13e)][_0x134726(0x111)](0x2)[_0x134726(0x11a)]('\x20'))[_0x134726(0x122)]();logger[_0x134726(0x144)](_0x455b76);const _0x4e2f09=isNonInteractiveMode(_0x373e3b);return{'config':_0x43a7b7,'auth':_0x21dfb4,'logger':logger,'env':_0x4823dd,'nonInteractive':_0x4e2f09};}export function buildConfigFromFlags(_0x12f44a){return buildConfig(readRawConfig(),_0x12f44a);}export function getLocalAppAliases(_0x5cd60a){const _0x2b9136=a55_0x3de67e;return _0x5cd60a['apps']&&typeof _0x5cd60a[_0x2b9136(0x156)]==='object'?_0x5cd60a['apps']:{};}export function resolveLocalAppAliasCode(_0x3e88a9,_0x4d2949){const _0x36c2bf=a55_0x3de67e;if(!_0x4d2949)return undefined;const _0x104a05=getLocalAppAliases(_0x3e88a9)[_0x4d2949],_0x597a3b=_0x104a05?.[_0x36c2bf(0x14c)];return typeof _0x597a3b===_0x36c2bf(0x14b)&&_0x597a3b[_0x36c2bf(0x122)]()?_0x597a3b[_0x36c2bf(0x122)]():undefined;}export function readAppCodeFromConfig(){const _0x3a0eb9=a55_0x3de67e,_0x2bb0cd=readRawConfig(),_0x50f0de=_0x2bb0cd['appcode']??_0x2bb0cd['app'];if(typeof _0x50f0de===_0x3a0eb9(0x14b)&&_0x50f0de[_0x3a0eb9(0x122)]())return _0x50f0de['trim']();const _0x269a04=resolveLocalAppAliasCode(_0x2bb0cd,typeof _0x2bb0cd[_0x3a0eb9(0x14d)]==='string'?_0x2bb0cd[_0x3a0eb9(0x14d)]:undefined);if(_0x269a04)return _0x269a04;const _0x11c344=normalizeEnv(String(_0x2bb0cd[_0x3a0eb9(0x13c)]||_0x3a0eb9(0x123))),_0x11d68c=isDaily(_0x11c344)?_0x3a0eb9(0x151):isDev(_0x11c344)?_0x3a0eb9(0x129):'production',_0x447b90=resolveCachedAppCode(typeof _0x2bb0cd[_0x3a0eb9(0x14d)]===_0x3a0eb9(0x14b)?_0x2bb0cd['defaultApp']:undefined,_0x11d68c,typeof _0x2bb0cd[_0x3a0eb9(0x124)]===_0x3a0eb9(0x14b)?_0x2bb0cd[_0x3a0eb9(0x124)]:undefined);if(_0x447b90)return _0x447b90;const _0x79f5ee=Object[_0x3a0eb9(0x11b)](getLocalAppAliases(_0x2bb0cd))[_0x3a0eb9(0x119)](_0x5bb5cd=>_0x5bb5cd?.[_0x3a0eb9(0x14c)]);return typeof _0x79f5ee?.[_0x3a0eb9(0x14c)]===_0x3a0eb9(0x14b)&&_0x79f5ee[_0x3a0eb9(0x14c)][_0x3a0eb9(0x122)]()?_0x79f5ee[_0x3a0eb9(0x14c)][_0x3a0eb9(0x122)]():undefined;}export function readScopedConfig(_0x488bf3){const _0x2db3d2=a55_0x3de67e,_0x5dcb7c=_0x488bf3['global']?_0x2db3d2(0x150):_0x2db3d2(0x110);return readConfigFile(resolveWriteConfigPath(_0x5dcb7c));}function a55_0x361e(){const _0x272293=['empty','EXDEV','some','ENV','development','top-level','14870vSgBCE','missing','VERBOSE','6VwJvrE','128636QPBwvC','read','3141445QNwEKf','cwd','./constant/env.js','ACCESS_KEY','message','isTTY','newConfigFileName','105976zKzxxj','stringify','APPCODE','368339VpfWvN','env','11nCzMkS','argv','setRawMode','app','runtimeDomain','online','17431248EyfvrV','setRawCommand','explicit','high-risk-write','./constant/domain.js','riskLevel','local-alias','raw','string','appcode','defaultApp','skillHubDomain','EACCES','global','daily','userDomain','true','36OiZRCV','code','apps','.tmp','globalConfig','153gQLYFD','nonInteractive','format','parse','PAGE_SIZE','project','slice','inherit','locale','configFileNames','projectConfig','pageSize','2RoCUSB','authRequired','find','join','values','1193031EwpDSP','error','stdin','apiDomain','utf8','cache','trim','production','accessKey'];a55_0x361e=function(){return _0x272293;};return a55_0x361e();}export function writeScopedConfig(_0x31f058,_0xdaf36b){const _0x2a85ca=a55_0x3de67e,_0x3dae96=_0xdaf36b[_0x2a85ca(0x150)]?_0x2a85ca(0x150):_0x2a85ca(0x110);writeConfigFile(resolveWriteConfigPath(_0x3dae96),_0x31f058);}export async function initGlobalEnvironment(_0x5ab30c){const _0xd45781=a55_0x3de67e,{initEnv:_0x27fdfe}=await import(_0xd45781(0x133));_0x27fdfe(_0x5ab30c['env']);const {initDomains:_0x3d4234}=await import(_0xd45781(0x147));_0x3d4234({'apiDomain':_0x5ab30c['raw'][_0xd45781(0x11f)]||_0x5ab30c['raw']['host']||undefined,'userDomain':_0x5ab30c['raw'][_0xd45781(0x152)]||undefined,'runtimeDomain':_0x5ab30c[_0xd45781(0x14a)][_0xd45781(0x141)]||undefined,'skillHubDomain':_0x5ab30c[_0xd45781(0x14a)][_0xd45781(0x14e)]||undefined});}export function getProjectConfigPath(){const _0x110a3a=a55_0x3de67e;return resolveConfigPath(process[_0x110a3a(0x132)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x1421d8){const _0x69edb2=a55_0x3de67e;if(!existsSync(_0x1421d8))return{'status':_0x69edb2(0x12c)};try{const _0x567993=readFileSync(_0x1421d8,{'encoding':_0x69edb2(0x120)});if(!_0x567993?.[_0x69edb2(0x122)]())return{'status':_0x69edb2(0x125)};const _0x37053d=JSON[_0x69edb2(0x10e)](_0x567993);return{'status':'ok','data':_0x37053d};}catch(_0x49a667){return{'status':_0x69edb2(0x11d),'message':_0x49a667 instanceof Error?_0x49a667[_0x69edb2(0x135)]:String(_0x49a667)};}}export function loadRawConfigLayers(_0x527ea1){const _0x277df9=a55_0x3de67e;let _0x4be8bf={},_0xe5830a={},_0x434f75,_0x14553e;try{_0x434f75=resolveConfigPath(homedir());if(_0x434f75){const _0xacc9a9=readFileSync(_0x434f75,{'encoding':_0x277df9(0x120)});if(_0xacc9a9)_0x4be8bf=JSON['parse'](_0xacc9a9);}}catch{}try{const _0x55db5c=_0x527ea1||process[_0x277df9(0x132)]();_0x14553e=resolveConfigPath(_0x55db5c);if(_0x14553e){const _0x5d88dd=readFileSync(_0x14553e,{'encoding':_0x277df9(0x120)});if(_0x5d88dd)_0xe5830a=JSON[_0x277df9(0x10e)](_0x5d88dd);}}catch{}return{'globalPath':_0x434f75,'projectPath':_0x14553e,'globalConfig':_0x4be8bf,'projectConfig':_0xe5830a};}function mergeRawConfigLayers(_0x6fad97){const _0x1ad3d9=a55_0x3de67e,{globalConfig:_0x57e4fa,projectConfig:_0x4a3a3e}=_0x6fad97;if(_0x4a3a3e[_0x1ad3d9(0x112)]===![]){const _0x3edb1a={..._0x4a3a3e};return delete _0x3edb1a[_0x1ad3d9(0x112)],_0x3edb1a;}const _0x5a05f5={..._0x57e4fa,..._0x4a3a3e};if(_0x1ad3d9(0x14d)in _0x4a3a3e)_0x5a05f5['defaultApp']=_0x4a3a3e['defaultApp'];else _0x57e4fa[_0x1ad3d9(0x14d)]&&(_0x5a05f5[_0x1ad3d9(0x14d)]=_0x57e4fa[_0x1ad3d9(0x14d)]);return _0x5a05f5;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x42a4f5){return mergeRawConfigLayers(loadRawConfigLayers(_0x42a4f5));}export function readRawConfigWithLayers(_0x2b0f47){const _0x4abd5d=loadRawConfigLayers(_0x2b0f47);return{'config':mergeRawConfigLayers(_0x4abd5d),'layers':_0x4abd5d};}export function resolveDefaultAppSource(_0x5b10a8){const _0x38a7d9=a55_0x3de67e;if(_0x38a7d9(0x14d)in _0x5b10a8[_0x38a7d9(0x115)])return'project';if(_0x5b10a8['projectConfig'][_0x38a7d9(0x112)]===![])return null;if(_0x5b10a8[_0x38a7d9(0x158)][_0x38a7d9(0x14d)])return _0x38a7d9(0x150);return null;}function buildConfig(_0x2795b2,_0x1a5f55){const _0x18e052=a55_0x3de67e,_0x7ad74a=_0x2795b2[_0x18e052(0x14d)]||undefined,_0x26e218=_0x1a5f55[_0x18e052(0x140)]||env('APP')||undefined,_0x259da0=_0x26e218||_0x7ad74a||undefined,_0x610b5f=env(_0x18e052(0x134))||_0x2795b2[_0x18e052(0x124)]||undefined,_0x2873d9=_0x1a5f55['env']||env(_0x18e052(0x128))||_0x2795b2[_0x18e052(0x13c)]||DEFAULT_CONFIG_VALUES[_0x18e052(0x13c)],_0x27e2cd=normalizeEnv(String(_0x2873d9)),_0x5c8dde=isDaily(_0x27e2cd)?'daily':isDev(_0x27e2cd)?_0x18e052(0x129):_0x18e052(0x123),_0x39045d=resolveLocalAppAliasCode(_0x2795b2,_0x259da0),_0x92171a=resolveCachedAppCode(_0x259da0,_0x5c8dde,_0x610b5f),_0x449129=typeof _0x1a5f55[_0x18e052(0x14c)]==='string'?_0x1a5f55[_0x18e052(0x14c)]:undefined,_0x45b380=env(_0x18e052(0x13a)),_0x3f0a78=_0x26e218?undefined:_0x2795b2[_0x18e052(0x14c)]||_0x2795b2[_0x18e052(0x140)]||undefined,_0x566d68=_0x449129||_0x45b380||_0x39045d||_0x92171a||_0x3f0a78||undefined,_0x2d6760=_0x449129?_0x18e052(0x145):_0x45b380?'env':_0x39045d?_0x18e052(0x149):_0x92171a?_0x18e052(0x121):_0x3f0a78?_0x18e052(0x12a):undefined,_0x33e6e2=_0x2795b2['locale']||DEFAULT_CONFIG_VALUES[_0x18e052(0x113)],_0x3ca650=undefined,_0x35efbb=_0x1a5f55[_0x18e052(0x10d)]||env('FORMAT')||_0x2795b2['format'],_0x21863b=normalizeLegacyOutputFormat(_0x35efbb),_0x2e9703=env(_0x18e052(0x10f))||_0x2795b2[_0x18e052(0x116)],_0x3348b4=_0x2e9703?Number(_0x2e9703)||undefined:undefined,_0x22748b=_0x2795b2[_0x18e052(0x148)]||_0x2795b2['maxRisk'],_0x47f6d6=_0x22748b===_0x18e052(0x130)||_0x22748b==='write'||_0x22748b===_0x18e052(0x146)?_0x22748b:DEFAULT_CONFIG_VALUES[_0x18e052(0x148)],_0x5650b2=env(_0x18e052(0x12d)),_0x40ff6f=_0x5650b2==='1'||_0x5650b2===_0x18e052(0x153);return{'appCode':typeof _0x566d68===_0x18e052(0x14b)&&_0x566d68['trim']()?_0x566d68[_0x18e052(0x122)]():undefined,'appCodeSource':_0x2d6760,'env':_0x5c8dde,'locale':_0x33e6e2,'cookie':_0x3ca650,'accessKey':_0x610b5f,'format':_0x21863b,'pageSize':_0x3348b4,'riskLevel':_0x47f6d6,'verbose':_0x40ff6f,'defaultApp':_0x7ad74a,'currentApp':typeof _0x259da0===_0x18e052(0x14b)?_0x259da0:undefined,'raw':_0x2795b2};}function env(_0xc65dca){return productEnv(_0xc65dca);}async function buildAuth(_0x4b2e77){const _0x25bfdd='',_0x446bda=!!_0x4b2e77['accessKey'];return{'cookie':_0x25bfdd,'isLoggedIn':_0x446bda,async 'getOrLogin'(){const _0x2abca4=a55_0xc765;if(_0x446bda)return _0x25bfdd;throw CliErrors[_0x2abca4(0x118)]();}};}
|
|
1
|
+
const a55_0x2dd632=a55_0x514f;function a55_0x514f(_0x325ab9,_0x2f7d4e){_0x325ab9=_0x325ab9-0x182;const _0x5bc040=a55_0x5bc0();let _0x514f11=_0x5bc040[_0x325ab9];return _0x514f11;}(function(_0x510641,_0x3a9454){const _0x3358c9=a55_0x514f,_0x242635=_0x510641();while(!![]){try{const _0x4893d2=-parseInt(_0x3358c9(0x1c1))/0x1*(parseInt(_0x3358c9(0x1c6))/0x2)+parseInt(_0x3358c9(0x1c7))/0x3*(-parseInt(_0x3358c9(0x19c))/0x4)+parseInt(_0x3358c9(0x1bd))/0x5*(parseInt(_0x3358c9(0x1a2))/0x6)+-parseInt(_0x3358c9(0x1c9))/0x7+parseInt(_0x3358c9(0x1b0))/0x8+parseInt(_0x3358c9(0x183))/0x9*(parseInt(_0x3358c9(0x1a6))/0xa)+parseInt(_0x3358c9(0x1ab))/0xb;if(_0x4893d2===_0x3a9454)break;else _0x242635['push'](_0x242635['shift']());}catch(_0x2d1746){_0x242635['push'](_0x242635['shift']());}}}(a55_0x5bc0,0x23c0b));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[a55_0x2dd632(0x190)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a55_0x2dd632(0x18d)];function resolveConfigPath(_0x4667e){for(const _0x5a8a34 of CONFIG_NAMES){const _0x4f5271=resolve(_0x4667e,_0x5a8a34);if(existsSync(_0x4f5271))return _0x4f5271;}return undefined;}export function resolveWriteConfigPath(_0x394e1c){const _0x2e6b97=a55_0x2dd632,_0xb6e65d=_0x394e1c===_0x2e6b97(0x1af)?process[_0x2e6b97(0x18f)]():homedir(),_0x48b337=resolveConfigPath(_0xb6e65d);return _0x48b337??resolve(_0xb6e65d,NEW_CONFIG_NAME);}export function readConfigFile(_0x5be093){try{if(existsSync(_0x5be093)){const _0x37d547=readFileSync(_0x5be093,{'encoding':'utf8'});if(_0x37d547){const _0x447f3c=JSON['parse'](_0x37d547);return migrateOnlineEnv(_0x5be093,_0x447f3c),_0x447f3c;}}}catch{}return{};}function migrateOnlineEnv(_0x432cdb,_0x19f2bc){const _0x3901cc=a55_0x2dd632;let _0x2214db=![];_0x19f2bc[_0x3901cc(0x1a9)]===_0x3901cc(0x1bb)&&(_0x19f2bc[_0x3901cc(0x1a9)]='production',_0x2214db=!![]);if(_0x19f2bc[_0x3901cc(0x1b5)]&&typeof _0x19f2bc['apps']===_0x3901cc(0x187))for(const _0x26b5b4 of Object[_0x3901cc(0x1c2)](_0x19f2bc[_0x3901cc(0x1b5)])){_0x26b5b4&&_0x26b5b4[_0x3901cc(0x1a9)]===_0x3901cc(0x1bb)&&(_0x26b5b4[_0x3901cc(0x1a9)]=_0x3901cc(0x1a8),_0x2214db=!![]);}if(_0x2214db)try{writeConfigFile(_0x432cdb,_0x19f2bc);}catch{}}export function writeConfigFile(_0x56e370,_0x3cffe5){const _0x538805=a55_0x2dd632,_0x35c865=dirname(_0x56e370);!existsSync(_0x35c865)&&mkdirSync(_0x35c865,{'recursive':!![]});const _0x5dc475=_0x56e370+'.tmp';try{writeFileSync(_0x5dc475,JSON[_0x538805(0x1ae)](_0x3cffe5,null,0x2)+'\x0a',{'encoding':_0x538805(0x1b8),'mode':0x180});try{renameSync(_0x5dc475,_0x56e370);}catch(_0x447de8){if(_0x447de8[_0x538805(0x1c0)]==='EPERM'||_0x447de8[_0x538805(0x1c0)]===_0x538805(0x1a4)||_0x447de8[_0x538805(0x1c0)]==='EACCES'){writeFileSync(_0x56e370,JSON['stringify'](_0x3cffe5,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x5dc475);}catch{}}else throw _0x447de8;}}catch(_0x549c57){try{unlinkSync(_0x5dc475);}catch{}throw _0x549c57;}}export function isNonInteractiveMode(_0x2f724a){const _0x1e9d86=a55_0x2dd632;return!!(_0x2f724a[_0x1e9d86(0x1ba)]||_0x2f724a['ci']||productEnvNames('CI')[_0x1e9d86(0x182)](_0x345b34=>process.env[_0x345b34]===_0x1e9d86(0x199))||process.env.CI===_0x1e9d86(0x199)||!process[_0x1e9d86(0x1b4)][_0x1e9d86(0x1aa)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x39ef1a=a55_0x2dd632;if(!process['stdin']['isTTY'])return![];try{const _0x37e738=process['stdin']['isRaw'];return process['stdin']['setRawMode'](!![]),process['stdin'][_0x39ef1a(0x1ca)](_0x37e738??![]),!![];}catch{return![];}}export async function createContext(_0xd8be2c){const _0x4476ec=a55_0x2dd632,_0x8acf76=readRawConfig(),_0x2c73e8=buildConfig(_0x8acf76,_0xd8be2c);await initGlobalEnvironment(_0x2c73e8);const {getUserDomain:_0x5dd0c8,getApiDomain:_0xfbfd0b}=await import(_0x4476ec(0x191)),_0x15f555={'apiDomain':_0xfbfd0b(),'userDomain':_0x5dd0c8()},_0x3f944c=await buildAuth(_0x2c73e8);logger['setLogPath'](process[_0x4476ec(0x18f)]());const _0x4bd70a=(CLI_BIN_NAME+'\x20'+process[_0x4476ec(0x1b1)][_0x4476ec(0x1b2)](0x2)[_0x4476ec(0x1be)]('\x20'))[_0x4476ec(0x1b7)]();logger[_0x4476ec(0x19d)](_0x4bd70a);const _0x3431ad=isNonInteractiveMode(_0xd8be2c);return{'config':_0x2c73e8,'auth':_0x3f944c,'logger':logger,'env':_0x15f555,'nonInteractive':_0x3431ad};}export function buildConfigFromFlags(_0x1e3924){return buildConfig(readRawConfig(),_0x1e3924);}export function getLocalAppAliases(_0x30e5a3){const _0x441f2c=a55_0x2dd632;return _0x30e5a3[_0x441f2c(0x1b5)]&&typeof _0x30e5a3['apps']===_0x441f2c(0x187)?_0x30e5a3['apps']:{};}export function resolveLocalAppAliasCode(_0x4b3ba4,_0x524181){const _0x371ff8=a55_0x2dd632;if(!_0x524181)return undefined;const _0x5cbd7a=getLocalAppAliases(_0x4b3ba4)[_0x524181],_0x1082d8=_0x5cbd7a?.[_0x371ff8(0x198)];return typeof _0x1082d8==='string'&&_0x1082d8[_0x371ff8(0x1b7)]()?_0x1082d8[_0x371ff8(0x1b7)]():undefined;}export function readAppCodeFromConfig(){const _0x357cff=a55_0x2dd632,_0x4d710f=readRawConfig(),_0x1d5e6e=_0x4d710f[_0x357cff(0x198)]??_0x4d710f[_0x357cff(0x19e)];if(typeof _0x1d5e6e===_0x357cff(0x1b3)&&_0x1d5e6e[_0x357cff(0x1b7)]())return _0x1d5e6e[_0x357cff(0x1b7)]();const _0x368db2=resolveLocalAppAliasCode(_0x4d710f,typeof _0x4d710f[_0x357cff(0x18a)]===_0x357cff(0x1b3)?_0x4d710f[_0x357cff(0x18a)]:undefined);if(_0x368db2)return _0x368db2;const _0x4643a0=normalizeEnv(String(_0x4d710f[_0x357cff(0x1a9)]||'production')),_0x4a556f=isDaily(_0x4643a0)?_0x357cff(0x1a1):isDev(_0x4643a0)?_0x357cff(0x1c3):_0x357cff(0x1a8),_0x935c94=resolveCachedAppCode(typeof _0x4d710f[_0x357cff(0x18a)]===_0x357cff(0x1b3)?_0x4d710f[_0x357cff(0x18a)]:undefined,_0x4a556f,typeof _0x4d710f[_0x357cff(0x188)]===_0x357cff(0x1b3)?_0x4d710f[_0x357cff(0x188)]:undefined);if(_0x935c94)return _0x935c94;const _0x4983c3=Object[_0x357cff(0x1c2)](getLocalAppAliases(_0x4d710f))['find'](_0x51ac6a=>_0x51ac6a?.['appcode']);return typeof _0x4983c3?.[_0x357cff(0x198)]===_0x357cff(0x1b3)&&_0x4983c3[_0x357cff(0x198)][_0x357cff(0x1b7)]()?_0x4983c3[_0x357cff(0x198)]['trim']():undefined;}export function readScopedConfig(_0x418a2e){const _0x22e5c0=a55_0x2dd632,_0x3edf42=_0x418a2e[_0x22e5c0(0x186)]?_0x22e5c0(0x186):_0x22e5c0(0x1af);return readConfigFile(resolveWriteConfigPath(_0x3edf42));}export function writeScopedConfig(_0x47e80e,_0x42c6c4){const _0x2a5b2d=a55_0x2dd632,_0x52b785=_0x42c6c4['global']?_0x2a5b2d(0x186):_0x2a5b2d(0x1af);writeConfigFile(resolveWriteConfigPath(_0x52b785),_0x47e80e);}export async function initGlobalEnvironment(_0x1c2caa){const _0x2c5f8c=a55_0x2dd632,{initEnv:_0x2df484}=await import(_0x2c5f8c(0x196));_0x2df484(_0x1c2caa[_0x2c5f8c(0x1a9)]);const {initDomains:_0x47671f}=await import(_0x2c5f8c(0x191));_0x47671f({'apiDomain':_0x1c2caa[_0x2c5f8c(0x1c5)][_0x2c5f8c(0x1bc)]||_0x1c2caa[_0x2c5f8c(0x1c5)][_0x2c5f8c(0x1a0)]||undefined,'userDomain':_0x1c2caa[_0x2c5f8c(0x1c5)][_0x2c5f8c(0x19b)]||undefined,'runtimeDomain':_0x1c2caa['raw'][_0x2c5f8c(0x19a)]||undefined,'skillHubDomain':_0x1c2caa[_0x2c5f8c(0x1c5)][_0x2c5f8c(0x189)]||undefined});}export function getProjectConfigPath(){const _0x4df94a=a55_0x2dd632;return resolveConfigPath(process[_0x4df94a(0x18f)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x8eb7d7){const _0x1220fd=a55_0x2dd632;if(!existsSync(_0x8eb7d7))return{'status':'missing'};try{const _0x45841f=readFileSync(_0x8eb7d7,{'encoding':'utf8'});if(!_0x45841f?.['trim']())return{'status':'empty'};const _0x295b64=JSON[_0x1220fd(0x1a7)](_0x45841f);return{'status':'ok','data':_0x295b64};}catch(_0x47983b){return{'status':'error','message':_0x47983b instanceof Error?_0x47983b[_0x1220fd(0x197)]:String(_0x47983b)};}}export function loadRawConfigLayers(_0xe479d3){const _0x5a9cfd=a55_0x2dd632;let _0xe429bd={},_0x3eb894={},_0x35f4e3,_0x2247fc;try{_0x35f4e3=resolveConfigPath(homedir());if(_0x35f4e3){const _0x66a691=readFileSync(_0x35f4e3,{'encoding':'utf8'});if(_0x66a691)_0xe429bd=JSON[_0x5a9cfd(0x1a7)](_0x66a691);}}catch{}try{const _0x4d7d77=_0xe479d3||process[_0x5a9cfd(0x18f)]();_0x2247fc=resolveConfigPath(_0x4d7d77);if(_0x2247fc){const _0x2ebfce=readFileSync(_0x2247fc,{'encoding':_0x5a9cfd(0x1b8)});if(_0x2ebfce)_0x3eb894=JSON[_0x5a9cfd(0x1a7)](_0x2ebfce);}}catch{}return{'globalPath':_0x35f4e3,'projectPath':_0x2247fc,'globalConfig':_0xe429bd,'projectConfig':_0x3eb894};}function mergeRawConfigLayers(_0x16d8ac){const _0x25d196=a55_0x2dd632,{globalConfig:_0x2a1c90,projectConfig:_0x117dc8}=_0x16d8ac;if(_0x117dc8['inherit']===![]){const _0x387f7a={..._0x117dc8};return delete _0x387f7a[_0x25d196(0x194)],_0x387f7a;}const _0x484012={..._0x2a1c90,..._0x117dc8};if('defaultApp'in _0x117dc8)_0x484012[_0x25d196(0x18a)]=_0x117dc8['defaultApp'];else _0x2a1c90[_0x25d196(0x18a)]&&(_0x484012[_0x25d196(0x18a)]=_0x2a1c90[_0x25d196(0x18a)]);return _0x484012;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x2091db){return mergeRawConfigLayers(loadRawConfigLayers(_0x2091db));}function a55_0x5bc0(){const _0x466e80=['544qVGcSK','setRawCommand','app','top-level','host','daily','18GypGOr','pageSize','EXDEV','APP','10vHcYOQ','parse','production','env','isTTY','686147CtMYZX','ENV','VERBOSE','stringify','project','2131272wJyzbt','argv','slice','string','stdout','apps','ACCESS_KEY','trim','utf8','riskLevel','nonInteractive','online','apiDomain','439125jgNQHm','join','globalConfig','code','3qDOTho','values','development','APPCODE','raw','117622oNJdbh','6414MmeYZF','locale','1551508LRziEQ','setRawMode','some','2187243xtuSlH','projectConfig','explicit','global','object','accessKey','skillHubDomain','defaultApp','write','PAGE_SIZE','newConfigFileName','maxRisk','cwd','configFileNames','./constant/domain.js','local-alias','format','inherit','high-risk-write','./constant/env.js','message','appcode','true','runtimeDomain','userDomain'];a55_0x5bc0=function(){return _0x466e80;};return a55_0x5bc0();}export function readRawConfigWithLayers(_0x520e52){const _0x100b32=loadRawConfigLayers(_0x520e52);return{'config':mergeRawConfigLayers(_0x100b32),'layers':_0x100b32};}export function resolveDefaultAppSource(_0x1bfdbe){const _0x320189=a55_0x2dd632;if('defaultApp'in _0x1bfdbe[_0x320189(0x184)])return _0x320189(0x1af);if(_0x1bfdbe[_0x320189(0x184)]['inherit']===![])return null;if(_0x1bfdbe[_0x320189(0x1bf)][_0x320189(0x18a)])return _0x320189(0x186);return null;}function buildConfig(_0x29b2fc,_0x154848){const _0x499f7d=a55_0x2dd632,_0x8259a1=_0x29b2fc[_0x499f7d(0x18a)]||undefined,_0x2988e6=_0x154848[_0x499f7d(0x19e)]||env(_0x499f7d(0x1a5))||undefined,_0x7c896c=_0x2988e6||_0x8259a1||undefined,_0x342f3d=env(_0x499f7d(0x1b6))||_0x29b2fc['accessKey']||undefined,_0x582af3=_0x154848[_0x499f7d(0x1a9)]||env(_0x499f7d(0x1ac))||_0x29b2fc['env']||DEFAULT_CONFIG_VALUES[_0x499f7d(0x1a9)],_0x5adf91=normalizeEnv(String(_0x582af3)),_0x511a7c=isDaily(_0x5adf91)?_0x499f7d(0x1a1):isDev(_0x5adf91)?_0x499f7d(0x1c3):_0x499f7d(0x1a8),_0x1b72c8=resolveLocalAppAliasCode(_0x29b2fc,_0x7c896c),_0x225b3d=resolveCachedAppCode(_0x7c896c,_0x511a7c,_0x342f3d),_0x527143=typeof _0x154848[_0x499f7d(0x198)]===_0x499f7d(0x1b3)?_0x154848[_0x499f7d(0x198)]:undefined,_0x9ba87f=env(_0x499f7d(0x1c4)),_0x2f329d=_0x2988e6?undefined:_0x29b2fc[_0x499f7d(0x198)]||_0x29b2fc[_0x499f7d(0x19e)]||undefined,_0x597415=_0x527143||_0x9ba87f||_0x1b72c8||_0x225b3d||_0x2f329d||undefined,_0x45aa19=_0x527143?_0x499f7d(0x185):_0x9ba87f?_0x499f7d(0x1a9):_0x1b72c8?_0x499f7d(0x192):_0x225b3d?'cache':_0x2f329d?_0x499f7d(0x19f):undefined,_0x5e4999=_0x29b2fc[_0x499f7d(0x1c8)]||DEFAULT_CONFIG_VALUES['locale'],_0x429ab8=undefined,_0x49de9f=_0x154848[_0x499f7d(0x193)]||env('FORMAT')||_0x29b2fc[_0x499f7d(0x193)],_0x491a9e=normalizeLegacyOutputFormat(_0x49de9f),_0x40d087=env(_0x499f7d(0x18c))||_0x29b2fc[_0x499f7d(0x1a3)],_0x41447c=_0x40d087?Number(_0x40d087)||undefined:undefined,_0x551b3c=_0x29b2fc['riskLevel']||_0x29b2fc[_0x499f7d(0x18e)],_0x6c177=_0x551b3c==='read'||_0x551b3c===_0x499f7d(0x18b)||_0x551b3c===_0x499f7d(0x195)?_0x551b3c:DEFAULT_CONFIG_VALUES[_0x499f7d(0x1b9)],_0x48e5ef=env(_0x499f7d(0x1ad)),_0x11b162=_0x48e5ef==='1'||_0x48e5ef===_0x499f7d(0x199);return{'appCode':typeof _0x597415===_0x499f7d(0x1b3)&&_0x597415['trim']()?_0x597415[_0x499f7d(0x1b7)]():undefined,'appCodeSource':_0x45aa19,'env':_0x511a7c,'locale':_0x5e4999,'cookie':_0x429ab8,'accessKey':_0x342f3d,'format':_0x491a9e,'pageSize':_0x41447c,'riskLevel':_0x6c177,'verbose':_0x11b162,'defaultApp':_0x8259a1,'currentApp':typeof _0x7c896c==='string'?_0x7c896c:undefined,'raw':_0x29b2fc};}function env(_0x405b83){return productEnv(_0x405b83);}async function buildAuth(_0x4cb146){const _0x266345=a55_0x2dd632,_0x1335de='',_0x8a28d4=!!_0x4cb146[_0x266345(0x188)];return{'cookie':_0x1335de,'isLoggedIn':_0x8a28d4,async 'getOrLogin'(){if(_0x8a28d4)return _0x1335de;throw CliErrors['authRequired']();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x6bdc30,_0x3ac6cc){const _0x36a5fc=a56_0x5f01,_0x27bfee=_0x6bdc30();while(!![]){try{const _0x26bd72=parseInt(_0x36a5fc(0x157))/0x1+parseInt(_0x36a5fc(0x148))/0x2*(parseInt(_0x36a5fc(0x158))/0x3)+parseInt(_0x36a5fc(0x160))/0x4+parseInt(_0x36a5fc(0x1a5))/0x5*(parseInt(_0x36a5fc(0x163))/0x6)+-parseInt(_0x36a5fc(0x192))/0x7+parseInt(_0x36a5fc(0x193))/0x8*(-parseInt(_0x36a5fc(0x15c))/0x9)+parseInt(_0x36a5fc(0x182))/0xa*(-parseInt(_0x36a5fc(0x135))/0xb);if(_0x26bd72===_0x3ac6cc)break;else _0x27bfee['push'](_0x27bfee['shift']());}catch(_0x1df2b1){_0x27bfee['push'](_0x27bfee['shift']());}}}(a56_0x1f49,0x4ac91));import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';function a56_0x5f01(_0x23a3fb,_0x38c0e1){_0x23a3fb=_0x23a3fb-0x130;const _0x1f4986=a56_0x1f49();let _0x5f015b=_0x1f4986[_0x23a3fb];return _0x5f015b;}import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;function a56_0x1f49(){const _0x467206=['/api/runtime/v1/namespaces/','appCode','/client/user/loginUserInfo','map','packageBase64','user','abort','194930WTwEWj','/download','text','/skills','Toolbox\x20error\x20code:\x20','errorMsg','Check\x20your\x20credentials\x20and\x20try\x20again.','status','artifactType','.zip','query','SQL\x20query\x20not\x20found:\x20','isArray','application/zip','favorite','signal','1411599jaldfm','269888CVmzPK','skillCode','/publish','msg','/client/dataset/query?','POST','/client/sql/query','filter','/client/knowledge-base/personal/list?appCode=','items','application/octet-stream','string','/client/knowledge-base/search','/client/dataset/list','Knowledge-base\x20entry\x20not\x20found:\x20id=','name','errorCode','/client/runtime-bff/personal/create','415QmTjyk','from','/update','trim','Missing\x20Skill\x20package\x20payload.','data','/client/artifact/list?','tableData','source','apiError','SkillHub\x20API\x20error:\x20','/client/knowledge-base/personal/create','summary','/api/node-toolbox/','stringify','toString','message','object','242NbfhEb','slug','Configure\x20accessKey\x20in\x20','version','set','/execute?appCode=','catch','personal','Request\x20timeout:\x20','scope','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','base64','public','api-doc-generator','authRequired','invokeSource','publishedVersion','?appCode=','PUBLIC','38tdgsnN','/client/runtime-bff/personal/','topK','/client/knowledge-base/personal/','SkillHub\x20error\x20code:\x20','validation','number','AbortError','headlineVersion','ownerPreviewVersion','/client/app/my-apps','Toolbox\x20API\x20error:\x20','replace','/client/artifact/','entries','263068BXOjzW','45606YykliS','namespace','file','application/json','126KcORhf','undefined','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','displayName','2222732wTAbfU','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','PRIVATE','21798FLgZIG','Personal\x20BFF\x20not\x20found:\x20id=','company','success','json','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','visibility','searchParams','code','/client/runtime-bff/personal/list?appCode=','skillName','BFF\x20script\x20not\x20found:\x20id=','/api/cli/v1/skills/','newConfigFileName','/versions/','markdown','API\x20error:\x20','appName','sqlCode','values','effective','Artifact\x20not\x20found:\x20id=','GET','tags'];a56_0x1f49=function(){return _0x467206;};return a56_0x1f49();}export function setActiveAK(_0x3b578c){_activeAK=_0x3b578c||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0xfb8488,_0xfe9d57={}){const _0x51659b=a56_0x5f01,{method:method=_0x51659b(0x179),body:_0x25e92d,headers:headers={},timeout:timeout=0x7530}=_0xfe9d57,_0x49cea5=_activeAK,_0xfb1d00=getRuntimeDomain();if(!_0x49cea5)throw CliErrors[_0x51659b(0x143)](_0x51659b(0x137)+PRODUCT_CONFIG[_0x51659b(0x170)]+'.');const _0x3137fb=''+_0xfb1d00+_0xfb8488,_0xf798b4={'X-User-AK':_0x49cea5},_0x571215=new AbortController(),_0x32f71f=setTimeout(()=>_0x571215[_0x51659b(0x181)](),timeout);try{const _0x32e79a=await fetch(_0x3137fb,{'method':method,'headers':{'Content-Type':_0x51659b(0x15b),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0xf798b4,...headers},'body':_0x25e92d?JSON[_0x51659b(0x131)](_0x25e92d):undefined,'signal':_0x571215[_0x51659b(0x191)]});let _0x457b6b;try{_0x457b6b=await _0x32e79a['json']();}catch{throw CliErrors[_0x51659b(0x1ae)](_0x51659b(0x168)+_0x32e79a['status']+')',_0x32e79a['status']>=0x190?_0x51659b(0x188):undefined);}if(!_0x32e79a['ok']||_0x457b6b[_0x51659b(0x166)]===![])throw CliErrors[_0x51659b(0x1ae)](_0x457b6b['errorMsg']||_0x457b6b[_0x51659b(0x133)]||_0x51659b(0x173)+_0x32e79a[_0x51659b(0x189)],_0x457b6b[_0x51659b(0x1a3)]?'API\x20error\x20code:\x20'+_0x457b6b['errorCode']:undefined);return _0x457b6b;}catch(_0xc02706){if(_0xc02706 instanceof Error&&_0xc02706[_0x51659b(0x1a2)]===_0x51659b(0x14f))throw CliErrors[_0x51659b(0x1ae)](_0x51659b(0x13d)+_0x3137fb);throw _0xc02706;}finally{clearTimeout(_0x32f71f);}}async function apiBinaryRequest(_0x2b1f96,_0xa2423a={}){const _0x364381=a56_0x5f01,{method:method=_0x364381(0x179),headers:headers={},timeout:timeout=0x7530}=_0xa2423a,_0x24af66=_activeAK,_0x539976=getRuntimeDomain();if(!_0x24af66)throw CliErrors[_0x364381(0x143)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0xb483c1=''+_0x539976+_0x2b1f96,_0x64f714=new AbortController(),_0x26f1dd=setTimeout(()=>_0x64f714[_0x364381(0x181)](),timeout);try{const _0x503b67=await fetch(_0xb483c1,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x364381(0x144)],'X-User-AK':_0x24af66,...headers},'signal':_0x64f714[_0x364381(0x191)]});if(!_0x503b67['ok']){let _0x10453e;try{const _0x44f096=await _0x503b67[_0x364381(0x167)]();_0x10453e=_0x44f096['errorMsg']||_0x44f096['message']||_0x44f096[_0x364381(0x1a3)];}catch{_0x10453e=await _0x503b67[_0x364381(0x184)]()[_0x364381(0x13b)](()=>undefined);}throw CliErrors[_0x364381(0x1ae)](_0x10453e||'API\x20error:\x20'+_0x503b67[_0x364381(0x189)],'Download\x20failed:\x20'+_0xb483c1);}return Buffer[_0x364381(0x1a6)](await _0x503b67['arrayBuffer']());}catch(_0x2ff97f){if(_0x2ff97f instanceof Error&&_0x2ff97f['name']==='AbortError')throw CliErrors[_0x364381(0x1ae)](_0x364381(0x13d)+_0xb483c1);throw _0x2ff97f;}finally{clearTimeout(_0x26f1dd);}}async function toolboxRequest(_0x1e9c00,_0x1b7193,_0x31a263={}){const _0x42adcf=a56_0x5f01,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x31a263,_0x46415f=_activeAK;if(!_0x46415f)throw CliErrors['authRequired'](_0x42adcf(0x137)+PRODUCT_CONFIG[_0x42adcf(0x170)]+'.');const _0x112a4a=getApiDomain()['replace'](/\/$/,''),_0x44cec3=new URL(_0x1e9c00,_0x112a4a+_0x42adcf(0x130));if(_0x1b7193)for(const [_0x54e757,_0x400b89]of Object[_0x42adcf(0x156)](_0x1b7193)){_0x400b89!==undefined&&_0x400b89!==null&&_0x44cec3[_0x42adcf(0x16a)][_0x42adcf(0x139)](_0x54e757,String(_0x400b89));}const _0x40f084=new AbortController(),_0x2e4e30=setTimeout(()=>_0x40f084[_0x42adcf(0x181)](),timeout);try{const _0xb39f5b=await fetch(_0x44cec3,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x46415f,...headers},'signal':_0x40f084[_0x42adcf(0x191)]});let _0x132be4;try{_0x132be4=await _0xb39f5b[_0x42adcf(0x167)]();}catch{throw CliErrors[_0x42adcf(0x1ae)](_0x42adcf(0x13f)+_0xb39f5b[_0x42adcf(0x189)]+')',_0xb39f5b['status']>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0xb39f5b['ok']){const _0x36e164=_0x132be4&&typeof _0x132be4===_0x42adcf(0x134)?_0x132be4:{};throw CliErrors[_0x42adcf(0x1ae)](_0x36e164[_0x42adcf(0x187)]||_0x36e164[_0x42adcf(0x133)]||_0x42adcf(0x153)+_0xb39f5b[_0x42adcf(0x189)],_0x36e164[_0x42adcf(0x1a3)]?_0x42adcf(0x186)+_0x36e164[_0x42adcf(0x1a3)]:undefined);}if(_0x132be4&&typeof _0x132be4===_0x42adcf(0x134)&&_0x42adcf(0x166)in _0x132be4&&typeof _0x132be4[_0x42adcf(0x166)]==='boolean'){const _0x5e1b3c=_0x132be4;if(!_0x5e1b3c[_0x42adcf(0x166)])throw CliErrors[_0x42adcf(0x1ae)](_0x5e1b3c['errorMsg']||_0x5e1b3c[_0x42adcf(0x133)]||'Toolbox\x20API\x20error',_0x5e1b3c[_0x42adcf(0x1a3)]?_0x42adcf(0x186)+_0x5e1b3c[_0x42adcf(0x1a3)]:undefined);return _0x5e1b3c['data'];}return _0x132be4;}catch(_0x35bd21){if(_0x35bd21 instanceof Error&&_0x35bd21[_0x42adcf(0x1a2)]==='AbortError')throw CliErrors[_0x42adcf(0x1ae)]('Request\x20timeout:\x20'+_0x44cec3[_0x42adcf(0x132)]());throw _0x35bd21;}finally{clearTimeout(_0x2e4e30);}}async function skillHubJsonRequest(_0x2fb504,_0x2bd83c={}){const _0x21817b=a56_0x5f01,{method:method='GET',query:_0xde72d7,body:_0x435150,headers:headers={},timeout:timeout=0x7530}=_0x2bd83c,_0x3b2c95=_activeAK;if(!_0x3b2c95)throw CliErrors[_0x21817b(0x143)](_0x21817b(0x137)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x5ed5be=getSkillHubDomain()[_0x21817b(0x154)](/\/$/,''),_0x20721c=new URL(_0x2fb504,_0x5ed5be+'/');if(_0xde72d7)for(const [_0x5801d3,_0x3b799d]of Object[_0x21817b(0x156)](_0xde72d7)){_0x3b799d!==undefined&&_0x3b799d!==null&&_0x20721c[_0x21817b(0x16a)][_0x21817b(0x139)](_0x5801d3,String(_0x3b799d));}const _0x1140b8=new AbortController(),_0x2f1a98=setTimeout(()=>_0x1140b8[_0x21817b(0x181)](),timeout);try{const _0x6419f3=await fetch(_0x20721c[_0x21817b(0x132)](),{'method':method,'headers':{'Accept':_0x21817b(0x15b),'X-Invoke-Source':PRODUCT_CONFIG[_0x21817b(0x144)],'X-User-AK':_0x3b2c95,...headers},'body':_0x435150,'signal':_0x1140b8[_0x21817b(0x191)]});let _0x2d667d;try{_0x2d667d=await _0x6419f3[_0x21817b(0x167)]();}catch{throw CliErrors[_0x21817b(0x1ae)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x6419f3['status']+')',_0x6419f3[_0x21817b(0x189)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x454534=!_0x6419f3['ok']||_0x2d667d?.[_0x21817b(0x166)]===![]||typeof _0x2d667d?.[_0x21817b(0x16b)]===_0x21817b(0x14e)&&_0x2d667d[_0x21817b(0x16b)]>=0x190;if(_0x454534)throw CliErrors['apiError'](_0x2d667d?.[_0x21817b(0x187)]||_0x2d667d?.[_0x21817b(0x133)]||_0x2d667d?.[_0x21817b(0x196)]||'SkillHub\x20API\x20error:\x20'+_0x6419f3[_0x21817b(0x189)],_0x2d667d?.['errorCode']?_0x21817b(0x14c)+_0x2d667d['errorCode']:undefined);return _0x2d667d?.[_0x21817b(0x1aa)]??_0x2d667d;}catch(_0x410241){if(_0x410241 instanceof Error&&_0x410241[_0x21817b(0x1a2)]===_0x21817b(0x14f))throw CliErrors[_0x21817b(0x1ae)](_0x21817b(0x13d)+_0x20721c['toString']());throw _0x410241;}finally{clearTimeout(_0x2f1a98);}}async function skillHubBinaryRequest(_0x33c8b9,_0x719c2c={}){const _0x67fcc3=a56_0x5f01,{query:_0x3f114f,headers:headers={},timeout:timeout=0x7530}=_0x719c2c,_0x19e60a=_activeAK;if(!_0x19e60a)throw CliErrors['authRequired'](_0x67fcc3(0x137)+PRODUCT_CONFIG[_0x67fcc3(0x170)]+'.');const _0x4eda25=getSkillHubDomain()[_0x67fcc3(0x154)](/\/$/,''),_0x3c67f3=new URL(_0x33c8b9,_0x4eda25+'/');if(_0x3f114f)for(const [_0x202511,_0x5d8ff0]of Object[_0x67fcc3(0x156)](_0x3f114f)){_0x5d8ff0!==undefined&&_0x5d8ff0!==null&&_0x3c67f3[_0x67fcc3(0x16a)][_0x67fcc3(0x139)](_0x202511,String(_0x5d8ff0));}const _0x5b9f90=new AbortController(),_0x2f3f47=setTimeout(()=>_0x5b9f90['abort'](),timeout);try{const _0x519b61=await fetch(_0x3c67f3[_0x67fcc3(0x132)](),{'method':_0x67fcc3(0x179),'headers':{'Accept':_0x67fcc3(0x19d),'X-Invoke-Source':PRODUCT_CONFIG[_0x67fcc3(0x144)],'X-User-AK':_0x19e60a,...headers},'signal':_0x5b9f90[_0x67fcc3(0x191)]});if(!_0x519b61['ok']){let _0x174a61;try{const _0x3e7dea=await _0x519b61[_0x67fcc3(0x167)]();_0x174a61=_0x3e7dea[_0x67fcc3(0x187)]||_0x3e7dea[_0x67fcc3(0x133)]||_0x3e7dea['msg']||_0x3e7dea['errorCode'];}catch{_0x174a61=await _0x519b61[_0x67fcc3(0x184)]()[_0x67fcc3(0x13b)](()=>undefined);}throw CliErrors[_0x67fcc3(0x1ae)](_0x174a61||_0x67fcc3(0x1af)+_0x519b61[_0x67fcc3(0x189)],'Download\x20failed:\x20'+_0x3c67f3['toString']());}return Buffer[_0x67fcc3(0x1a6)](await _0x519b61['arrayBuffer']());}catch(_0x5a9834){if(_0x5a9834 instanceof Error&&_0x5a9834[_0x67fcc3(0x1a2)]===_0x67fcc3(0x14f))throw CliErrors['apiError'](_0x67fcc3(0x13d)+_0x3c67f3[_0x67fcc3(0x132)]());throw _0x5a9834;}finally{clearTimeout(_0x2f3f47);}}export async function getBffScriptInfo(_0x209f03){const _0x427fdd=a56_0x5f01,_0x2902c0=await apiRequest('/client/bff/query/'+_0x209f03);if(!_0x2902c0['data'])throw CliErrors[_0x427fdd(0x14d)](_0x427fdd(0x16e)+_0x209f03);return _0x2902c0[_0x427fdd(0x1aa)];}export async function getSqlQueryInfo(_0x4ecd6e,_0x2d9d2b){const _0x255bc6=a56_0x5f01,_0x3f0162=await apiRequest(_0x255bc6(0x199),{'method':_0x255bc6(0x198),'body':{'appCode':_0x4ecd6e,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x2d9d2b}}),_0x13da9b=_0x3f0162[_0x255bc6(0x1aa)],_0x1c9768=_0x13da9b&&typeof _0x13da9b===_0x255bc6(0x134)&&'tableData'in _0x13da9b?_0x13da9b[_0x255bc6(0x1ac)]?.[0x0]:_0x13da9b&&typeof _0x13da9b===_0x255bc6(0x134)&&_0x255bc6(0x175)in _0x13da9b?_0x13da9b:undefined;if(!_0x1c9768)throw CliErrors[_0x255bc6(0x14d)](_0x255bc6(0x18d)+_0x2d9d2b);return _0x1c9768;}function isRemoteAppItem(_0x1db585){const _0x33e580=a56_0x5f01;return!!_0x1db585&&typeof _0x1db585==='object'&&typeof _0x1db585[_0x33e580(0x17c)]===_0x33e580(0x19e)&&typeof _0x1db585[_0x33e580(0x174)]===_0x33e580(0x19e);}function extractRemoteAppItems(_0x2e8ec6){const _0x15541e=a56_0x5f01;if(Array[_0x15541e(0x18e)](_0x2e8ec6))return _0x2e8ec6['filter'](isRemoteAppItem);if(!_0x2e8ec6||typeof _0x2e8ec6!==_0x15541e(0x134))throw CliErrors['apiError'](_0x15541e(0x161));const _0x42d0a2=_0x2e8ec6;if(Array[_0x15541e(0x18e)](_0x42d0a2[_0x15541e(0x1ac)]))return _0x42d0a2[_0x15541e(0x1ac)]['filter'](isRemoteAppItem);if(_0x42d0a2[_0x15541e(0x1aa)]&&typeof _0x42d0a2[_0x15541e(0x1aa)]===_0x15541e(0x134)){const _0xc34f87=_0x42d0a2[_0x15541e(0x1aa)];if(Array[_0x15541e(0x18e)](_0xc34f87[_0x15541e(0x1ac)]))return _0xc34f87['tableData'][_0x15541e(0x19a)](isRemoteAppItem);}throw CliErrors[_0x15541e(0x1ae)]('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x547897=a56_0x5f01,_0x372914=await apiRequest(_0x547897(0x152));return extractRemoteAppItems(_0x372914['data']);}export async function getLoginUserInfo(){const _0xd4782d=a56_0x5f01,_0x5a4106=await apiRequest(_0xd4782d(0x17d));if(!_0x5a4106['data']||typeof _0x5a4106[_0xd4782d(0x1aa)]!==_0xd4782d(0x134)||Array[_0xd4782d(0x18e)](_0x5a4106['data']))throw CliErrors[_0xd4782d(0x1ae)](_0xd4782d(0x15e));return _0x5a4106[_0xd4782d(0x1aa)];}export async function listDatasets(_0xe70493,_0x224806){const _0x1e85b3=a56_0x5f01,_0x279fb2=await apiRequest(_0x1e85b3(0x1a0),{'method':'POST','body':{'appCode':_0xe70493,..._0x224806?.[_0x1e85b3(0x16b)]&&{'code':_0x224806['code']},..._0x224806?.[_0x1e85b3(0x1a2)]&&{'name':_0x224806['name']}}});return extractList(_0x279fb2[_0x1e85b3(0x1aa)]);}export async function getDatasetDetail(_0x1cf618){const _0x5bfaf9=a56_0x5f01,_0x32686e=/^\d+$/['test'](_0x1cf618)?'id':'code',_0x37c6ea=await apiRequest(_0x5bfaf9(0x197)+_0x32686e+'='+_0x1cf618);return _0x37c6ea[_0x5bfaf9(0x1aa)];}export async function getDatasetSdkUsageDoc(_0x150612,_0x17ac53){const _0x1f0450=a56_0x5f01,_0x24ab15=await toolboxRequest(_0x1f0450(0x142),{'datasetCode':_0x150612,'appCode':_0x17ac53});return typeof _0x24ab15?.[_0x1f0450(0x172)]===_0x1f0450(0x19e)?_0x24ab15[_0x1f0450(0x172)]:'';}export async function listRuntimeArtifacts(_0x2acbdf,_0x3c74c7){const _0x13f0da=a56_0x5f01,_0x57805a=new URLSearchParams({'appCode':_0x2acbdf});if(_0x3c74c7?.[_0x13f0da(0x18a)])_0x57805a[_0x13f0da(0x139)](_0x13f0da(0x18a),_0x3c74c7[_0x13f0da(0x18a)]);if(_0x3c74c7?.[_0x13f0da(0x1ad)])_0x57805a[_0x13f0da(0x139)](_0x13f0da(0x1ad),_0x3c74c7[_0x13f0da(0x1ad)]);if(_0x3c74c7?.['favorite']!==undefined)_0x57805a[_0x13f0da(0x139)](_0x13f0da(0x190),String(_0x3c74c7['favorite']));const _0x5811bd=await apiRequest(_0x13f0da(0x1ab)+_0x57805a[_0x13f0da(0x132)]());return Array[_0x13f0da(0x18e)](_0x5811bd[_0x13f0da(0x1aa)])?_0x5811bd['data']:[];}export async function getRuntimeArtifact(_0x14840f,_0x532f70){const _0x403536=a56_0x5f01,_0x51535d=await apiRequest(_0x403536(0x155)+_0x14840f+_0x403536(0x146)+encodeURIComponent(_0x532f70));if(!_0x51535d['data'])throw CliErrors['validation'](_0x403536(0x178)+_0x14840f);return _0x51535d['data'];}export async function createRuntimeArtifact(_0x27f0d9,_0x77f477){const _0x20f5e8=a56_0x5f01,_0x34f709=await apiRequest('/client/artifact/create',{'method':'POST','body':{'appCode':_0x27f0d9,..._0x77f477}});return _0x34f709[_0x20f5e8(0x1aa)];}export async function updateRuntimeArtifact(_0xd996b1,_0x38b68e,_0x5b1871){const _0x265fe4=a56_0x5f01,_0x554a57=await apiRequest(_0x265fe4(0x155)+_0xd996b1+_0x265fe4(0x1a7),{'method':'POST','body':{'appCode':_0x38b68e,..._0x5b1871}});return _0x554a57[_0x265fe4(0x1aa)];}export async function listPersonalBffs(_0x592390){const _0x149597=a56_0x5f01,_0x3c343b=await apiRequest(_0x149597(0x16c)+encodeURIComponent(_0x592390));return Array['isArray'](_0x3c343b[_0x149597(0x1aa)])?_0x3c343b[_0x149597(0x1aa)]:[];}export async function getPersonalBff(_0xc12719,_0x30d74e){const _0x489161=a56_0x5f01,_0xa1a7a4=await apiRequest(_0x489161(0x149)+_0xc12719+'?appCode='+encodeURIComponent(_0x30d74e));if(!_0xa1a7a4[_0x489161(0x1aa)])throw CliErrors[_0x489161(0x14d)](_0x489161(0x164)+_0xc12719);return _0xa1a7a4[_0x489161(0x1aa)];}export async function createPersonalBff(_0x77661d,_0x38f838){const _0x446785=a56_0x5f01,_0x445932=await apiRequest(_0x446785(0x1a4),{'method':_0x446785(0x198),'body':{'appCode':_0x77661d,..._0x38f838}});return _0x445932[_0x446785(0x1aa)];}export async function updatePersonalBff(_0x172a18,_0x410fb5,_0x4a20c5){const _0x413465=a56_0x5f01,_0x3628bf=await apiRequest(_0x413465(0x149)+_0x172a18+_0x413465(0x1a7),{'method':_0x413465(0x198),'body':{'appCode':_0x410fb5,..._0x4a20c5}});return _0x3628bf[_0x413465(0x1aa)];}export async function executePersonalBff(_0x228b5a,_0x5235e7,_0x1fe689){const _0x47b252=a56_0x5f01,_0x33a8e1=await apiRequest(_0x47b252(0x149)+_0x228b5a+_0x47b252(0x13a)+encodeURIComponent(_0x5235e7),{'method':_0x47b252(0x198),'body':_0x1fe689});return _0x33a8e1[_0x47b252(0x1aa)];}export async function listPersonalKnowledgeBaseItems(_0x54589a){const _0x394b97=a56_0x5f01,_0x302f12=await apiRequest(_0x394b97(0x19b)+encodeURIComponent(_0x54589a));return Array['isArray'](_0x302f12[_0x394b97(0x1aa)])?_0x302f12[_0x394b97(0x1aa)]:[];}export async function getPersonalKnowledgeBaseItem(_0xb753c1,_0x5a5b87){const _0x2431db=a56_0x5f01,_0x19c4b9=await apiRequest('/client/knowledge-base/personal/'+_0xb753c1+'?appCode='+encodeURIComponent(_0x5a5b87));if(!_0x19c4b9[_0x2431db(0x1aa)])throw CliErrors['validation'](_0x2431db(0x1a1)+_0xb753c1);return _0x19c4b9[_0x2431db(0x1aa)];}export async function createPersonalKnowledgeBaseItem(_0x3773a3,_0x547ff1){const _0x2d6e47=a56_0x5f01,_0x2f3145=await apiRequest(_0x2d6e47(0x1b0),{'method':_0x2d6e47(0x198),'body':{'appCode':_0x3773a3,..._0x547ff1}});return _0x2f3145[_0x2d6e47(0x1aa)];}export async function updatePersonalKnowledgeBaseItem(_0x134a5d,_0x4c9fdf,_0x54d557){const _0x452f0b=a56_0x5f01,_0x446455=await apiRequest(_0x452f0b(0x14b)+_0x134a5d+'/update',{'method':_0x452f0b(0x198),'body':{'appCode':_0x4c9fdf,..._0x54d557}});return _0x446455[_0x452f0b(0x1aa)];}export async function searchKnowledgeBase(_0x5b2c65,_0x516611){const _0xf2d452=a56_0x5f01,_0x1fe50d=await apiRequest(_0xf2d452(0x19f),{'method':_0xf2d452(0x198),'body':{'appCode':_0x5b2c65,'query':_0x516611[_0xf2d452(0x18c)],..._0x516611['topK']!==undefined?{'topK':_0x516611[_0xf2d452(0x14a)]}:{}}});return Array[_0xf2d452(0x18e)](_0x1fe50d[_0xf2d452(0x1aa)])?_0x1fe50d[_0xf2d452(0x1aa)]:[];}export async function listRuntimeSkills(_0x39fbbe){const _0x56420c=a56_0x5f01,_0x50f8a1=await skillHubJsonRequest(_0x56420c(0x17b)+encodeURIComponent(_0x39fbbe[_0x56420c(0x17c)])+_0x56420c(0x185),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x39fbbe[_0x56420c(0x17c)],_0x50f8a1,_0x39fbbe['scope']??'user',_0x39fbbe[_0x56420c(0x16b)]);}export async function listPersonalRuntimeSkills(_0xbff641){const _0x2f498f=a56_0x5f01;return(await listRuntimeSkills({'appCode':_0xbff641,'scope':_0x2f498f(0x13c)}))['personal'];}export async function listCompanyRuntimeSkills(_0x4d74e9){const _0xa5bc94=a56_0x5f01;return(await listRuntimeSkills({'appCode':_0x4d74e9,'scope':_0xa5bc94(0x165)}))[_0xa5bc94(0x165)];}export async function listVisibleRuntimeSkills(_0xa9232d){const _0x2f2027=a56_0x5f01;return(await listRuntimeSkills({'appCode':_0xa9232d,'scope':_0x2f2027(0x180)}))[_0x2f2027(0x177)];}export async function createPersonalRuntimeSkill(_0x4e5d40,_0x2f3711){return publishRuntimeSkill(_0x4e5d40,_0x2f3711);}export async function updatePersonalRuntimeSkill(_0x33fa37,_0x1ef60b,_0x3ac182){const _0x59179e=a56_0x5f01;return publishRuntimeSkill(_0x1ef60b,{..._0x3ac182,'skillCode':_0x3ac182[_0x59179e(0x194)]??_0x33fa37});}export async function downloadRuntimeSkillPackage(_0xf79df1,_0x56d92d,_0x5aa1ef,_0x2bca0b){const _0x1313d0=a56_0x5f01;void _0xf79df1;const _0x128f05=_0x2bca0b?'/api/cli/v1/skills/'+encodeURIComponent(_0x5aa1ef)+'/'+encodeURIComponent(_0x56d92d)+_0x1313d0(0x171)+encodeURIComponent(_0x2bca0b)+_0x1313d0(0x183):_0x1313d0(0x16f)+encodeURIComponent(_0x5aa1ef)+'/'+encodeURIComponent(_0x56d92d)+_0x1313d0(0x183);return skillHubBinaryRequest(_0x128f05);}async function publishRuntimeSkill(_0x4e8e6c,_0x437f7f){const _0x54fd11=a56_0x5f01,_0x42bc49=new FormData();_0x42bc49['set'](_0x54fd11(0x15a),runtimeSkillPackageFile(_0x437f7f)),_0x42bc49[_0x54fd11(0x139)](_0x54fd11(0x169),_0x54fd11(0x162));const _0x49638c=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x4e8e6c)+_0x54fd11(0x195),{'method':_0x54fd11(0x198),'body':_0x42bc49});return{'appCode':_0x49638c[_0x54fd11(0x159)]??_0x4e8e6c,'skillCode':_0x49638c[_0x54fd11(0x136)]??_0x437f7f[_0x54fd11(0x194)]??'','skillName':_0x437f7f[_0x54fd11(0x16d)]??_0x49638c[_0x54fd11(0x136)]??_0x437f7f[_0x54fd11(0x194)],'description':_0x437f7f['description'],'scope':skillHubVisibilityToScope(_0x49638c[_0x54fd11(0x169)])??_0x54fd11(0x13c),'version':_0x49638c['version']??_0x437f7f['version'],'tags':_0x437f7f[_0x54fd11(0x17a)],'content':_0x437f7f['content']};}function runtimeSkillPackageFile(_0x4ec044){const _0x24a098=a56_0x5f01;if(!_0x4ec044[_0x24a098(0x17f)])throw CliErrors['validation'](_0x24a098(0x1a9));const _0x2da3bd=Buffer['from'](_0x4ec044[_0x24a098(0x17f)],_0x24a098(0x140)),_0x5f3509=new Blob([_0x2da3bd],{'type':_0x24a098(0x18f)}),_0xf1d28d=(_0x4ec044[_0x24a098(0x194)]||'skill')+_0x24a098(0x18b);if(typeof File!==_0x24a098(0x15d))return new File([_0x5f3509],_0xf1d28d,{'type':_0x24a098(0x18f)});return _0x5f3509;}function normalizeSkillHubRuntimeListResponse(_0xe5871b,_0x4704b4,_0x5e1faf,_0x4f33ef){const _0x36dc38=a56_0x5f01,_0x1d3a50=Array[_0x36dc38(0x18e)](_0x4704b4)?_0x4704b4:Array[_0x36dc38(0x18e)](_0x4704b4?.[_0x36dc38(0x19c)])?_0x4704b4['items']:[],_0x492b74=_0x4f33ef?.[_0x36dc38(0x1a8)](),_0x56b98b=_0x1d3a50[_0x36dc38(0x19a)](_0x4784da=>!_0x492b74||_0x4784da[_0x36dc38(0x136)]===_0x492b74)[_0x36dc38(0x17e)](skillHubRuntimeItemToRuntimeSkill)[_0x36dc38(0x19a)](_0x35613a=>Boolean(_0x35613a)),_0x3b4da3=_0x56b98b[_0x36dc38(0x19a)](_0x3dd2ac=>_0x3dd2ac[_0x36dc38(0x13e)]===_0x36dc38(0x13c)),_0x15377c=_0x56b98b['filter'](_0x53be81=>_0x53be81[_0x36dc38(0x13e)]===_0x36dc38(0x165)),_0x482a99=_0x56b98b[_0x36dc38(0x19a)](_0x59cf3c=>_0x59cf3c[_0x36dc38(0x13e)]==='public');return{'appCode':_0xe5871b,'personal':_0x5e1faf===_0x36dc38(0x165)||_0x5e1faf===_0x36dc38(0x141)?[]:_0x3b4da3,'company':_0x5e1faf===_0x36dc38(0x13c)||_0x5e1faf===_0x36dc38(0x141)?[]:_0x15377c,'public':_0x5e1faf===_0x36dc38(0x13c)||_0x5e1faf===_0x36dc38(0x165)?[]:_0x482a99,'effective':buildEffectiveRuntimeSkills(_0x3b4da3,_0x15377c,_0x482a99,_0x5e1faf)};}function skillHubRuntimeItemToRuntimeSkill(_0x2aa1e0){const _0x2332c7=a56_0x5f01,_0x44655c=_0x2aa1e0['slug']?.['trim'](),_0x3720fc=skillHubVisibilityToScope(_0x2aa1e0[_0x2332c7(0x169)]);if(!_0x44655c||!_0x3720fc)return undefined;return{'id':_0x2aa1e0['id'],'appCode':_0x2aa1e0[_0x2332c7(0x159)],'skillCode':_0x44655c,'skillName':_0x2aa1e0[_0x2332c7(0x15f)]??_0x44655c,'description':_0x2aa1e0[_0x2332c7(0x1b1)],'scope':_0x3720fc,'version':skillHubRuntimeItemVersion(_0x2aa1e0),'status':_0x2aa1e0[_0x2332c7(0x189)]};}function skillHubVisibilityToScope(_0x4df746){const _0x59630f=a56_0x5f01;if(_0x4df746===_0x59630f(0x162))return _0x59630f(0x13c);if(_0x4df746==='NAMESPACE_ONLY')return _0x59630f(0x165);if(_0x4df746===_0x59630f(0x147))return _0x59630f(0x141);return undefined;}function skillHubRuntimeItemVersion(_0x347b62){const _0x4cd0db=a56_0x5f01;return _0x347b62[_0x4cd0db(0x145)]?.[_0x4cd0db(0x138)]??_0x347b62[_0x4cd0db(0x150)]?.[_0x4cd0db(0x138)]??_0x347b62[_0x4cd0db(0x151)]?.['version'];}function buildEffectiveRuntimeSkills(_0x54e826,_0x17686b,_0x157c4f,_0x56c89a){const _0x3934db=a56_0x5f01;if(_0x56c89a===_0x3934db(0x13c))return _0x54e826;if(_0x56c89a===_0x3934db(0x165))return _0x17686b;if(_0x56c89a===_0x3934db(0x141))return _0x157c4f;const _0x377507=new Map();for(const _0x11f6bf of _0x157c4f){_0x377507[_0x3934db(0x139)](_0x11f6bf[_0x3934db(0x194)],_0x11f6bf);}for(const _0x20a013 of _0x17686b){_0x377507['set'](_0x20a013[_0x3934db(0x194)],_0x20a013);}for(const _0x3e5dfd of _0x54e826){_0x377507[_0x3934db(0x139)](_0x3e5dfd[_0x3934db(0x194)],_0x3e5dfd);}return Array[_0x3934db(0x1a6)](_0x377507[_0x3934db(0x176)]());}function normalizeRuntimeSkillListResponse(_0x96ba08,_0x31288f){const _0x15c6c5=a56_0x5f01;if(Array[_0x15c6c5(0x18e)](_0x31288f)){const _0x4c7ecb=_0x31288f['filter'](_0x1ca9fe=>_0x1ca9fe[_0x15c6c5(0x13e)]==='personal'),_0x335f59=_0x31288f['filter'](_0x213cdb=>_0x213cdb[_0x15c6c5(0x13e)]==='company'),_0x3d203b=_0x31288f[_0x15c6c5(0x19a)](_0xc2fcca=>_0xc2fcca[_0x15c6c5(0x13e)]===_0x15c6c5(0x141));return{'appCode':_0x96ba08,'personal':_0x4c7ecb,'company':_0x335f59,'public':_0x3d203b,'effective':_0x31288f['filter'](_0x417f22=>_0x417f22[_0x15c6c5(0x13e)]!=='builtin')};}return{'appCode':_0x31288f?.[_0x15c6c5(0x17c)]??_0x96ba08,'personal':Array[_0x15c6c5(0x18e)](_0x31288f?.[_0x15c6c5(0x13c)])?_0x31288f[_0x15c6c5(0x13c)]:[],'company':Array[_0x15c6c5(0x18e)](_0x31288f?.[_0x15c6c5(0x165)])?_0x31288f[_0x15c6c5(0x165)]:[],'public':Array[_0x15c6c5(0x18e)](_0x31288f?.[_0x15c6c5(0x141)])?_0x31288f[_0x15c6c5(0x141)]:[],'effective':Array[_0x15c6c5(0x18e)](_0x31288f?.[_0x15c6c5(0x177)])?_0x31288f['effective']:[]};}
|
|
1
|
+
(function(_0xf17ac7,_0x4e2335){const _0x46ef4d=a56_0x47ea,_0x443cc4=_0xf17ac7();while(!![]){try{const _0x1614ed=-parseInt(_0x46ef4d(0x11d))/0x1+-parseInt(_0x46ef4d(0x13a))/0x2+parseInt(_0x46ef4d(0x15d))/0x3+parseInt(_0x46ef4d(0x183))/0x4+-parseInt(_0x46ef4d(0x14c))/0x5*(parseInt(_0x46ef4d(0x138))/0x6)+-parseInt(_0x46ef4d(0x13d))/0x7*(parseInt(_0x46ef4d(0x182))/0x8)+-parseInt(_0x46ef4d(0x15a))/0x9*(-parseInt(_0x46ef4d(0x118))/0xa);if(_0x1614ed===_0x4e2335)break;else _0x443cc4['push'](_0x443cc4['shift']());}catch(_0x162e46){_0x443cc4['push'](_0x443cc4['shift']());}}}(a56_0x354f,0x8f288));import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x4872d1){_activeAK=_0x4872d1||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x549052,_0x267f9b={}){const _0x122d49=a56_0x47ea,{method:method=_0x122d49(0x155),body:_0x2cf8d7,headers:headers={},timeout:timeout=0x7530}=_0x267f9b,_0x35e967=_activeAK,_0x3eec80=getRuntimeDomain();if(!_0x35e967)throw CliErrors[_0x122d49(0x174)](_0x122d49(0x143)+PRODUCT_CONFIG[_0x122d49(0x163)]+'.');const _0x1b8183=''+_0x3eec80+_0x549052,_0x407028={'X-User-AK':_0x35e967},_0x34c78d=new AbortController(),_0x492b94=setTimeout(()=>_0x34c78d[_0x122d49(0x123)](),timeout);try{const _0x5c6000=await fetch(_0x1b8183,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x122d49(0x167)],..._0x407028,...headers},'body':_0x2cf8d7?JSON[_0x122d49(0x188)](_0x2cf8d7):undefined,'signal':_0x34c78d[_0x122d49(0x14b)]});let _0x1c3a11;try{_0x1c3a11=await _0x5c6000[_0x122d49(0x184)]();}catch{throw CliErrors[_0x122d49(0x135)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x5c6000[_0x122d49(0x17f)]+')',_0x5c6000['status']>=0x190?_0x122d49(0x15c):undefined);}if(!_0x5c6000['ok']||_0x1c3a11[_0x122d49(0x165)]===![])throw CliErrors[_0x122d49(0x135)](_0x1c3a11[_0x122d49(0x149)]||_0x1c3a11['message']||_0x122d49(0x172)+_0x5c6000[_0x122d49(0x17f)],_0x1c3a11[_0x122d49(0x134)]?_0x122d49(0x159)+_0x1c3a11[_0x122d49(0x134)]:undefined);return _0x1c3a11;}catch(_0x12a797){if(_0x12a797 instanceof Error&&_0x12a797['name']===_0x122d49(0x162))throw CliErrors[_0x122d49(0x135)]('Request\x20timeout:\x20'+_0x1b8183);throw _0x12a797;}finally{clearTimeout(_0x492b94);}}async function apiBinaryRequest(_0x5f4ef4,_0x3e34d0={}){const _0x4ab6ea=a56_0x47ea,{method:method=_0x4ab6ea(0x155),headers:headers={},timeout:timeout=0x7530}=_0x3e34d0,_0x1bc5cb=_activeAK,_0x1fd7da=getRuntimeDomain();if(!_0x1bc5cb)throw CliErrors['authRequired'](_0x4ab6ea(0x143)+PRODUCT_CONFIG[_0x4ab6ea(0x163)]+'.');const _0x3bb9f3=''+_0x1fd7da+_0x5f4ef4,_0x43ea69=new AbortController(),_0x4198b0=setTimeout(()=>_0x43ea69[_0x4ab6ea(0x123)](),timeout);try{const _0x243c6c=await fetch(_0x3bb9f3,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x4ab6ea(0x167)],'X-User-AK':_0x1bc5cb,...headers},'signal':_0x43ea69[_0x4ab6ea(0x14b)]});if(!_0x243c6c['ok']){let _0x159d40;try{const _0x37685d=await _0x243c6c[_0x4ab6ea(0x184)]();_0x159d40=_0x37685d[_0x4ab6ea(0x149)]||_0x37685d[_0x4ab6ea(0x142)]||_0x37685d[_0x4ab6ea(0x134)];}catch{_0x159d40=await _0x243c6c[_0x4ab6ea(0x153)]()['catch'](()=>undefined);}throw CliErrors[_0x4ab6ea(0x135)](_0x159d40||'API\x20error:\x20'+_0x243c6c[_0x4ab6ea(0x17f)],_0x4ab6ea(0x16c)+_0x3bb9f3);}return Buffer[_0x4ab6ea(0x137)](await _0x243c6c['arrayBuffer']());}catch(_0xdf3599){if(_0xdf3599 instanceof Error&&_0xdf3599[_0x4ab6ea(0x13c)]===_0x4ab6ea(0x162))throw CliErrors[_0x4ab6ea(0x135)](_0x4ab6ea(0x17e)+_0x3bb9f3);throw _0xdf3599;}finally{clearTimeout(_0x4198b0);}}async function toolboxRequest(_0x48b595,_0x3127a1,_0x4c0b5c={}){const _0x40971e=a56_0x47ea,{method:method=_0x40971e(0x155),headers:headers={},timeout:timeout=0x7530}=_0x4c0b5c,_0x560b88=_activeAK;if(!_0x560b88)throw CliErrors[_0x40971e(0x174)](_0x40971e(0x143)+PRODUCT_CONFIG[_0x40971e(0x163)]+'.');const _0x8b03c5=getApiDomain()[_0x40971e(0x120)](/\/$/,''),_0x40f035=new URL(_0x48b595,_0x8b03c5+'/api/node-toolbox/');if(_0x3127a1)for(const [_0x108433,_0x36b275]of Object['entries'](_0x3127a1)){_0x36b275!==undefined&&_0x36b275!==null&&_0x40f035[_0x40971e(0x166)]['set'](_0x108433,String(_0x36b275));}const _0x2482f8=new AbortController(),_0x215436=setTimeout(()=>_0x2482f8['abort'](),timeout);try{const _0x3d4037=await fetch(_0x40f035,{'method':method,'headers':{'Content-Type':_0x40971e(0x16a),'X-Invoke-Source':PRODUCT_CONFIG[_0x40971e(0x167)],'X-User-AK':_0x560b88,...headers},'signal':_0x2482f8[_0x40971e(0x14b)]});let _0x430ef9;try{_0x430ef9=await _0x3d4037[_0x40971e(0x184)]();}catch{throw CliErrors[_0x40971e(0x135)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x3d4037['status']+')',_0x3d4037[_0x40971e(0x17f)]>=0x190?_0x40971e(0x15c):undefined);}if(!_0x3d4037['ok']){const _0x5a0a83=_0x430ef9&&typeof _0x430ef9===_0x40971e(0x136)?_0x430ef9:{};throw CliErrors[_0x40971e(0x135)](_0x5a0a83[_0x40971e(0x149)]||_0x5a0a83[_0x40971e(0x142)]||_0x40971e(0x16b)+_0x3d4037[_0x40971e(0x17f)],_0x5a0a83['errorCode']?_0x40971e(0x151)+_0x5a0a83['errorCode']:undefined);}if(_0x430ef9&&typeof _0x430ef9===_0x40971e(0x136)&&_0x40971e(0x165)in _0x430ef9&&typeof _0x430ef9[_0x40971e(0x165)]==='boolean'){const _0x1a3663=_0x430ef9;if(!_0x1a3663[_0x40971e(0x165)])throw CliErrors[_0x40971e(0x135)](_0x1a3663[_0x40971e(0x149)]||_0x1a3663[_0x40971e(0x142)]||_0x40971e(0x148),_0x1a3663[_0x40971e(0x134)]?'Toolbox\x20error\x20code:\x20'+_0x1a3663[_0x40971e(0x134)]:undefined);return _0x1a3663[_0x40971e(0x122)];}return _0x430ef9;}catch(_0x4a59aa){if(_0x4a59aa instanceof Error&&_0x4a59aa[_0x40971e(0x13c)]===_0x40971e(0x162))throw CliErrors['apiError'](_0x40971e(0x17e)+_0x40f035[_0x40971e(0x13b)]());throw _0x4a59aa;}finally{clearTimeout(_0x215436);}}async function skillHubJsonRequest(_0x358ba1,_0x5c3203={}){const _0x3f6e14=a56_0x47ea,{method:method=_0x3f6e14(0x155),query:_0x274bcb,body:_0x3eeb47,headers:headers={},timeout:timeout=0x7530}=_0x5c3203,_0x52ab67=_activeAK;if(!_0x52ab67)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x3f6e14(0x163)]+'.');const _0x2da61b=getSkillHubDomain()[_0x3f6e14(0x120)](/\/$/,''),_0x5b6aeb=new URL(_0x358ba1,_0x2da61b+'/');if(_0x274bcb)for(const [_0x4d796f,_0x58aba1]of Object[_0x3f6e14(0x139)](_0x274bcb)){_0x58aba1!==undefined&&_0x58aba1!==null&&_0x5b6aeb[_0x3f6e14(0x166)][_0x3f6e14(0x124)](_0x4d796f,String(_0x58aba1));}const _0x4e606d=new AbortController(),_0x582832=setTimeout(()=>_0x4e606d[_0x3f6e14(0x123)](),timeout);try{const _0x4d877f=await fetch(_0x5b6aeb[_0x3f6e14(0x13b)](),{'method':method,'headers':{'Accept':_0x3f6e14(0x16a),'X-Invoke-Source':PRODUCT_CONFIG[_0x3f6e14(0x167)],'X-User-AK':_0x52ab67,...headers},'body':_0x3eeb47,'signal':_0x4e606d[_0x3f6e14(0x14b)]});let _0x22424c;try{_0x22424c=await _0x4d877f[_0x3f6e14(0x184)]();}catch{throw CliErrors['apiError'](_0x3f6e14(0x14e)+_0x4d877f[_0x3f6e14(0x17f)]+')',_0x4d877f[_0x3f6e14(0x17f)]>=0x190?_0x3f6e14(0x15c):undefined);}const _0x4d3275=!_0x4d877f['ok']||_0x22424c?.[_0x3f6e14(0x165)]===![]||typeof _0x22424c?.[_0x3f6e14(0x176)]===_0x3f6e14(0x17d)&&_0x22424c[_0x3f6e14(0x176)]>=0x190;if(_0x4d3275)throw CliErrors[_0x3f6e14(0x135)](_0x22424c?.[_0x3f6e14(0x149)]||_0x22424c?.[_0x3f6e14(0x142)]||_0x22424c?.[_0x3f6e14(0x18a)]||'SkillHub\x20API\x20error:\x20'+_0x4d877f['status'],_0x22424c?.['errorCode']?'SkillHub\x20error\x20code:\x20'+_0x22424c[_0x3f6e14(0x134)]:undefined);return _0x22424c?.[_0x3f6e14(0x122)]??_0x22424c;}catch(_0x486ea3){if(_0x486ea3 instanceof Error&&_0x486ea3[_0x3f6e14(0x13c)]===_0x3f6e14(0x162))throw CliErrors[_0x3f6e14(0x135)](_0x3f6e14(0x17e)+_0x5b6aeb['toString']());throw _0x486ea3;}finally{clearTimeout(_0x582832);}}async function skillHubBinaryRequest(_0x47dfe3,_0x2dcc56={}){const _0x322e5a=a56_0x47ea,{query:_0x40ce6e,headers:headers={},timeout:timeout=0x7530}=_0x2dcc56,_0x2fddb1=_activeAK;if(!_0x2fddb1)throw CliErrors[_0x322e5a(0x174)](_0x322e5a(0x143)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x11da0b=getSkillHubDomain()[_0x322e5a(0x120)](/\/$/,''),_0x29153c=new URL(_0x47dfe3,_0x11da0b+'/');if(_0x40ce6e)for(const [_0x304630,_0x42fc8d]of Object['entries'](_0x40ce6e)){_0x42fc8d!==undefined&&_0x42fc8d!==null&&_0x29153c[_0x322e5a(0x166)][_0x322e5a(0x124)](_0x304630,String(_0x42fc8d));}const _0x22ea52=new AbortController(),_0x131c9c=setTimeout(()=>_0x22ea52[_0x322e5a(0x123)](),timeout);try{const _0x4d9c3c=await fetch(_0x29153c[_0x322e5a(0x13b)](),{'method':_0x322e5a(0x155),'headers':{'Accept':_0x322e5a(0x152),'X-Invoke-Source':PRODUCT_CONFIG[_0x322e5a(0x167)],'X-User-AK':_0x2fddb1,...headers},'signal':_0x22ea52[_0x322e5a(0x14b)]});if(!_0x4d9c3c['ok']){let _0x184e84;try{const _0x3fd93e=await _0x4d9c3c[_0x322e5a(0x184)]();_0x184e84=_0x3fd93e[_0x322e5a(0x149)]||_0x3fd93e[_0x322e5a(0x142)]||_0x3fd93e[_0x322e5a(0x18a)]||_0x3fd93e[_0x322e5a(0x134)];}catch{_0x184e84=await _0x4d9c3c[_0x322e5a(0x153)]()['catch'](()=>undefined);}throw CliErrors[_0x322e5a(0x135)](_0x184e84||'SkillHub\x20API\x20error:\x20'+_0x4d9c3c[_0x322e5a(0x17f)],'Download\x20failed:\x20'+_0x29153c[_0x322e5a(0x13b)]());}return Buffer[_0x322e5a(0x137)](await _0x4d9c3c[_0x322e5a(0x181)]());}catch(_0x483183){if(_0x483183 instanceof Error&&_0x483183['name']===_0x322e5a(0x162))throw CliErrors[_0x322e5a(0x135)](_0x322e5a(0x17e)+_0x29153c['toString']());throw _0x483183;}finally{clearTimeout(_0x131c9c);}}export async function getBffScriptInfo(_0x374a9b){const _0x519046=a56_0x47ea,_0x374455=await apiRequest('/client/bff/query/'+_0x374a9b);if(!_0x374455[_0x519046(0x122)])throw CliErrors[_0x519046(0x14a)](_0x519046(0x147)+_0x374a9b);return _0x374455[_0x519046(0x122)];}export async function getSqlQueryInfo(_0x7f3be2,_0xc2de8){const _0x2397e2=a56_0x47ea,_0x13cf06=await apiRequest(_0x2397e2(0x11e),{'method':_0x2397e2(0x129),'body':{'appCode':_0x7f3be2,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0xc2de8}}),_0xa8d6eb=_0x13cf06[_0x2397e2(0x122)],_0x3ff116=_0xa8d6eb&&typeof _0xa8d6eb===_0x2397e2(0x136)&&'tableData'in _0xa8d6eb?_0xa8d6eb[_0x2397e2(0x160)]?.[0x0]:_0xa8d6eb&&typeof _0xa8d6eb===_0x2397e2(0x136)&&'sqlCode'in _0xa8d6eb?_0xa8d6eb:undefined;if(!_0x3ff116)throw CliErrors['validation'](_0x2397e2(0x18b)+_0xc2de8);return _0x3ff116;}function isRemoteAppItem(_0x419009){const _0x1452f7=a56_0x47ea;return!!_0x419009&&typeof _0x419009===_0x1452f7(0x136)&&typeof _0x419009[_0x1452f7(0x15b)]==='string'&&typeof _0x419009[_0x1452f7(0x179)]==='string';}function extractRemoteAppItems(_0x24f2d3){const _0x2cf52e=a56_0x47ea;if(Array[_0x2cf52e(0x14f)](_0x24f2d3))return _0x24f2d3['filter'](isRemoteAppItem);if(!_0x24f2d3||typeof _0x24f2d3!==_0x2cf52e(0x136))throw CliErrors[_0x2cf52e(0x135)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0xccc991=_0x24f2d3;if(Array['isArray'](_0xccc991['tableData']))return _0xccc991['tableData']['filter'](isRemoteAppItem);if(_0xccc991[_0x2cf52e(0x122)]&&typeof _0xccc991[_0x2cf52e(0x122)]===_0x2cf52e(0x136)){const _0x58b2f3=_0xccc991[_0x2cf52e(0x122)];if(Array[_0x2cf52e(0x14f)](_0x58b2f3[_0x2cf52e(0x160)]))return _0x58b2f3[_0x2cf52e(0x160)][_0x2cf52e(0x121)](isRemoteAppItem);}throw CliErrors[_0x2cf52e(0x135)](_0x2cf52e(0x17a));}export async function getMyApps(){const _0x47f3d1=a56_0x47ea,_0x14d78b=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x14d78b[_0x47f3d1(0x122)]);}export async function getLoginUserInfo(){const _0x4e454b=a56_0x47ea,_0x48ffe5=await apiRequest(_0x4e454b(0x146));if(!_0x48ffe5[_0x4e454b(0x122)]||typeof _0x48ffe5[_0x4e454b(0x122)]!==_0x4e454b(0x136)||Array[_0x4e454b(0x14f)](_0x48ffe5['data']))throw CliErrors[_0x4e454b(0x135)](_0x4e454b(0x185));return _0x48ffe5['data'];}export async function listDatasets(_0x129f42,_0x329953){const _0x8feb9b=a56_0x47ea,_0x49823c=await apiRequest(_0x8feb9b(0x12a),{'method':_0x8feb9b(0x129),'body':{'appCode':_0x129f42,..._0x329953?.[_0x8feb9b(0x176)]&&{'code':_0x329953[_0x8feb9b(0x176)]},..._0x329953?.[_0x8feb9b(0x13c)]&&{'name':_0x329953['name']}}});return extractList(_0x49823c[_0x8feb9b(0x122)]);}export async function getDatasetDetail(_0xa4114b){const _0x401c94=a56_0x47ea,_0x4a70f1=/^\d+$/['test'](_0xa4114b)?'id':_0x401c94(0x176),_0xb6554f=await apiRequest(_0x401c94(0x12d)+_0x4a70f1+'='+_0xa4114b);return _0xb6554f[_0x401c94(0x122)];}export async function getDatasetSdkUsageDoc(_0x5d4b9b,_0x3ef178){const _0x1e5799=a56_0x47ea,_0x1ec320=await toolboxRequest(_0x1e5799(0x16f),{'datasetCode':_0x5d4b9b,'appCode':_0x3ef178});return typeof _0x1ec320?.[_0x1e5799(0x117)]==='string'?_0x1ec320['markdown']:'';}export async function listRuntimeArtifacts(_0x559c95,_0x10179e){const _0x45b8a0=a56_0x47ea,_0x52cf09=new URLSearchParams({'appCode':_0x559c95});if(_0x10179e?.[_0x45b8a0(0x16e)])_0x52cf09['set'](_0x45b8a0(0x16e),_0x10179e[_0x45b8a0(0x16e)]);if(_0x10179e?.[_0x45b8a0(0x171)])_0x52cf09['set'](_0x45b8a0(0x171),_0x10179e[_0x45b8a0(0x171)]);if(_0x10179e?.[_0x45b8a0(0x15f)]!==undefined)_0x52cf09[_0x45b8a0(0x124)](_0x45b8a0(0x15f),String(_0x10179e['favorite']));const _0x1651b2=await apiRequest(_0x45b8a0(0x15e)+_0x52cf09['toString']());return Array[_0x45b8a0(0x14f)](_0x1651b2[_0x45b8a0(0x122)])?_0x1651b2['data']:[];}export async function getRuntimeArtifact(_0x640f0f,_0x3d3f4e){const _0xada1f4=a56_0x47ea,_0x49706e=await apiRequest(_0xada1f4(0x17b)+_0x640f0f+_0xada1f4(0x158)+encodeURIComponent(_0x3d3f4e));if(!_0x49706e[_0xada1f4(0x122)])throw CliErrors['validation'](_0xada1f4(0x189)+_0x640f0f);return _0x49706e[_0xada1f4(0x122)];}export async function createRuntimeArtifact(_0x5a44f2,_0x3b6413){const _0x2bed40=a56_0x47ea,_0x352030=await apiRequest('/client/artifact/create',{'method':'POST','body':{'appCode':_0x5a44f2,..._0x3b6413}});return _0x352030[_0x2bed40(0x122)];}function a56_0x47ea(_0x3abac2,_0x545e56){_0x3abac2=_0x3abac2-0x117;const _0x354fbc=a56_0x354f();let _0x47ea22=_0x354fbc[_0x3abac2];return _0x47ea22;}export async function updateRuntimeArtifact(_0xf72466,_0x5a897d,_0x38fd47){const _0x71e7fc=a56_0x47ea,_0x414744=await apiRequest(_0x71e7fc(0x17b)+_0xf72466+_0x71e7fc(0x132),{'method':'POST','body':{'appCode':_0x5a897d,..._0x38fd47}});return _0x414744[_0x71e7fc(0x122)];}export async function listPersonalBffs(_0x1d5b80){const _0xad384b=a56_0x47ea,_0x217d42=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x1d5b80));return Array['isArray'](_0x217d42['data'])?_0x217d42[_0xad384b(0x122)]:[];}export async function getPersonalBff(_0x2a506f,_0x2ed044){const _0x57fd5c=a56_0x47ea,_0x228a86=await apiRequest(_0x57fd5c(0x170)+_0x2a506f+_0x57fd5c(0x158)+encodeURIComponent(_0x2ed044));if(!_0x228a86[_0x57fd5c(0x122)])throw CliErrors[_0x57fd5c(0x14a)](_0x57fd5c(0x119)+_0x2a506f);return _0x228a86['data'];}export async function createPersonalBff(_0x3c7a5d,_0x37c652){const _0x1b0d04=a56_0x47ea,_0x390399=await apiRequest(_0x1b0d04(0x11a),{'method':_0x1b0d04(0x129),'body':{'appCode':_0x3c7a5d,..._0x37c652}});return _0x390399[_0x1b0d04(0x122)];}export async function updatePersonalBff(_0x5ea663,_0x26eea5,_0x4c24fd){const _0x2b021c=a56_0x47ea,_0x83a809=await apiRequest(_0x2b021c(0x170)+_0x5ea663+_0x2b021c(0x132),{'method':'POST','body':{'appCode':_0x26eea5,..._0x4c24fd}});return _0x83a809[_0x2b021c(0x122)];}export async function executePersonalBff(_0x2b5317,_0x3cce5b,_0x5e5375){const _0x21711c=a56_0x47ea,_0x7c1d17=await apiRequest(_0x21711c(0x170)+_0x2b5317+_0x21711c(0x178)+encodeURIComponent(_0x3cce5b),{'method':_0x21711c(0x129),'body':_0x5e5375});return _0x7c1d17[_0x21711c(0x122)];}export async function listPersonalKnowledgeBaseItems(_0x4c00d8){const _0x284bab=a56_0x47ea,_0x217f0a=await apiRequest(_0x284bab(0x150)+encodeURIComponent(_0x4c00d8));return Array[_0x284bab(0x14f)](_0x217f0a['data'])?_0x217f0a[_0x284bab(0x122)]:[];}export async function getPersonalKnowledgeBaseItem(_0x3eee7d,_0x310b90){const _0x578b34=a56_0x47ea,_0x510f67=await apiRequest(_0x578b34(0x168)+_0x3eee7d+_0x578b34(0x158)+encodeURIComponent(_0x310b90));if(!_0x510f67['data'])throw CliErrors['validation'](_0x578b34(0x145)+_0x3eee7d);return _0x510f67[_0x578b34(0x122)];}export async function createPersonalKnowledgeBaseItem(_0x37507c,_0x3159cc){const _0x377f97=a56_0x47ea,_0x3f9473=await apiRequest(_0x377f97(0x169),{'method':_0x377f97(0x129),'body':{'appCode':_0x37507c,..._0x3159cc}});return _0x3f9473[_0x377f97(0x122)];}export async function updatePersonalKnowledgeBaseItem(_0x5e2832,_0x161f8f,_0x18fe70){const _0x1cb1a2=a56_0x47ea,_0x3c8edf=await apiRequest(_0x1cb1a2(0x168)+_0x5e2832+_0x1cb1a2(0x132),{'method':_0x1cb1a2(0x129),'body':{'appCode':_0x161f8f,..._0x18fe70}});return _0x3c8edf[_0x1cb1a2(0x122)];}export async function searchKnowledgeBase(_0x380331,_0x39dde5){const _0x592826=a56_0x47ea,_0x2c6de0=await apiRequest('/client/knowledge-base/search',{'method':'POST','body':{'appCode':_0x380331,'query':_0x39dde5[_0x592826(0x156)],..._0x39dde5[_0x592826(0x13e)]!==undefined?{'topK':_0x39dde5['topK']}:{}}});return Array[_0x592826(0x14f)](_0x2c6de0[_0x592826(0x122)])?_0x2c6de0['data']:[];}export async function listRuntimeSkills(_0xb9d3d6){const _0xf4d41d=a56_0x47ea,_0x319dd8=await skillHubJsonRequest(_0xf4d41d(0x126)+encodeURIComponent(_0xb9d3d6[_0xf4d41d(0x15b)])+_0xf4d41d(0x11f),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0xb9d3d6[_0xf4d41d(0x15b)],_0x319dd8,_0xb9d3d6[_0xf4d41d(0x14d)]??_0xf4d41d(0x144),_0xb9d3d6['code']);}export async function listPersonalRuntimeSkills(_0x34eb2c){const _0x4ea02b=a56_0x47ea;return(await listRuntimeSkills({'appCode':_0x34eb2c,'scope':_0x4ea02b(0x175)}))[_0x4ea02b(0x175)];}export async function listCompanyRuntimeSkills(_0x1ded6e){const _0x1aa5b1=a56_0x47ea;return(await listRuntimeSkills({'appCode':_0x1ded6e,'scope':_0x1aa5b1(0x186)}))[_0x1aa5b1(0x186)];}export async function listVisibleRuntimeSkills(_0x32320a){const _0x3da2b0=a56_0x47ea;return(await listRuntimeSkills({'appCode':_0x32320a,'scope':'all'}))[_0x3da2b0(0x16d)];}export async function createPersonalRuntimeSkill(_0x5388af,_0x32db1a){return publishRuntimeSkill(_0x5388af,_0x32db1a);}export async function updatePersonalRuntimeSkill(_0x20b553,_0x499cc7,_0x19560c){const _0x29f88d=a56_0x47ea;return publishRuntimeSkill(_0x499cc7,{..._0x19560c,'skillCode':_0x19560c[_0x29f88d(0x154)]??_0x20b553});}export async function downloadRuntimeSkillPackage(_0x199003,_0x7c0e99,_0xc78058,_0x575560){const _0x2a8cb0=a56_0x47ea;void _0x199003;const _0x5d4d1a=_0x575560?_0x2a8cb0(0x11c)+encodeURIComponent(_0xc78058)+'/'+encodeURIComponent(_0x7c0e99)+_0x2a8cb0(0x141)+encodeURIComponent(_0x575560)+'/download':_0x2a8cb0(0x11c)+encodeURIComponent(_0xc78058)+'/'+encodeURIComponent(_0x7c0e99)+_0x2a8cb0(0x12e);return skillHubBinaryRequest(_0x5d4d1a);}async function publishRuntimeSkill(_0x50451b,_0x5522f1){const _0x38d3e8=a56_0x47ea,_0x440320=new FormData();_0x440320[_0x38d3e8(0x124)](_0x38d3e8(0x177),runtimeSkillPackageFile(_0x5522f1)),_0x440320['set']('visibility',_0x38d3e8(0x125));const _0x202289=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x50451b)+_0x38d3e8(0x127),{'method':'POST','body':_0x440320});return{'appCode':_0x202289[_0x38d3e8(0x12b)]??_0x50451b,'skillCode':_0x202289[_0x38d3e8(0x12c)]??_0x5522f1['skillCode']??'','skillName':_0x5522f1[_0x38d3e8(0x157)]??_0x202289[_0x38d3e8(0x12c)]??_0x5522f1[_0x38d3e8(0x154)],'description':_0x5522f1[_0x38d3e8(0x12f)],'scope':skillHubVisibilityToScope(_0x202289[_0x38d3e8(0x128)])??_0x38d3e8(0x175),'version':_0x202289[_0x38d3e8(0x180)]??_0x5522f1[_0x38d3e8(0x180)],'tags':_0x5522f1['tags'],'content':_0x5522f1['content']};}function runtimeSkillPackageFile(_0x537e2d){const _0x3b0336=a56_0x47ea;if(!_0x537e2d[_0x3b0336(0x161)])throw CliErrors[_0x3b0336(0x14a)]('Missing\x20Skill\x20package\x20payload.');const _0x37b7a7=Buffer[_0x3b0336(0x137)](_0x537e2d['packageBase64'],_0x3b0336(0x187)),_0x490e58=new Blob([_0x37b7a7],{'type':_0x3b0336(0x17c)}),_0x5bccda=(_0x537e2d[_0x3b0336(0x154)]||_0x3b0336(0x131))+_0x3b0336(0x140);if(typeof File!==_0x3b0336(0x13f))return new File([_0x490e58],_0x5bccda,{'type':_0x3b0336(0x17c)});return _0x490e58;}function normalizeSkillHubRuntimeListResponse(_0x2f9902,_0x39bbd9,_0x5e8cc3,_0x15111d){const _0x5da8f8=a56_0x47ea,_0x4ca884=Array['isArray'](_0x39bbd9)?_0x39bbd9:Array[_0x5da8f8(0x14f)](_0x39bbd9?.[_0x5da8f8(0x173)])?_0x39bbd9['items']:[],_0x34e220=_0x15111d?.['trim'](),_0x5192e1=_0x4ca884['filter'](_0xedb92e=>!_0x34e220||_0xedb92e[_0x5da8f8(0x12c)]===_0x34e220)['map'](skillHubRuntimeItemToRuntimeSkill)[_0x5da8f8(0x121)](_0x3bce08=>Boolean(_0x3bce08)),_0x27792e=_0x5192e1[_0x5da8f8(0x121)](_0x176794=>_0x176794['scope']===_0x5da8f8(0x175)),_0x43663b=_0x5192e1['filter'](_0x408808=>_0x408808[_0x5da8f8(0x14d)]===_0x5da8f8(0x186));return{'appCode':_0x2f9902,'personal':_0x5e8cc3===_0x5da8f8(0x186)?[]:_0x27792e,'company':_0x5e8cc3===_0x5da8f8(0x175)?[]:_0x43663b,'effective':buildEffectiveRuntimeSkills(_0x27792e,_0x43663b,_0x5e8cc3)};}function skillHubRuntimeItemToRuntimeSkill(_0x1945cf){const _0x41eee6=a56_0x47ea,_0x327780=_0x1945cf[_0x41eee6(0x12c)]?.['trim'](),_0x322eb1=skillHubVisibilityToScope(_0x1945cf[_0x41eee6(0x128)]);if(!_0x327780||!_0x322eb1)return undefined;return{'id':_0x1945cf['id'],'appCode':_0x1945cf[_0x41eee6(0x12b)],'skillCode':_0x327780,'skillName':_0x1945cf['displayName']??_0x327780,'description':_0x1945cf['summary'],'scope':_0x322eb1,'version':skillHubRuntimeItemVersion(_0x1945cf),'status':_0x1945cf[_0x41eee6(0x17f)]};}function a56_0x354f(){const _0x1556e7=['name','1561cYYGeC','topK','undefined','.zip','/versions/','message','Configure\x20accessKey\x20in\x20','all','Knowledge-base\x20entry\x20not\x20found:\x20id=','/client/user/loginUserInfo','BFF\x20script\x20not\x20found:\x20id=','Toolbox\x20API\x20error','errorMsg','validation','signal','185RYSDFL','scope','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','isArray','/client/knowledge-base/personal/list?appCode=','Toolbox\x20error\x20code:\x20','application/octet-stream','text','skillCode','GET','query','skillName','?appCode=','API\x20error\x20code:\x20','110133DIdBsy','appCode','Check\x20your\x20credentials\x20and\x20try\x20again.','3147672qbeYbs','/client/artifact/list?','favorite','tableData','packageBase64','AbortError','newConfigFileName','values','success','searchParams','invokeSource','/client/knowledge-base/personal/','/client/knowledge-base/personal/create','application/json','Toolbox\x20API\x20error:\x20','Download\x20failed:\x20','effective','artifactType','api-doc-generator','/client/runtime-bff/personal/','source','API\x20error:\x20','items','authRequired','personal','code','file','/execute?appCode=','appName','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','/client/artifact/','application/zip','number','Request\x20timeout:\x20','status','version','arrayBuffer','696rhOpsi','2725532ROfKXZ','json','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','company','base64','stringify','Artifact\x20not\x20found:\x20id=','msg','SQL\x20query\x20not\x20found:\x20','markdown','710CaJHfD','Personal\x20BFF\x20not\x20found:\x20id=','/client/runtime-bff/personal/create','NAMESPACE_ONLY','/api/cli/v1/skills/','467525kROGpJ','/client/sql/query','/skills','replace','filter','data','abort','set','PRIVATE','/api/runtime/v1/namespaces/','/publish','visibility','POST','/client/dataset/list','namespace','slug','/client/dataset/query?','/download','description','publishedVersion','skill','/update','ownerPreviewVersion','errorCode','apiError','object','from','110874qJHjAi','entries','1684818lprAji','toString'];a56_0x354f=function(){return _0x1556e7;};return a56_0x354f();}function skillHubVisibilityToScope(_0x304ca4){const _0x76b68e=a56_0x47ea;if(_0x304ca4===_0x76b68e(0x125))return'personal';if(_0x304ca4===_0x76b68e(0x11b))return _0x76b68e(0x186);return undefined;}function skillHubRuntimeItemVersion(_0x2b8fea){const _0x53c6d0=a56_0x47ea;return _0x2b8fea[_0x53c6d0(0x130)]?.[_0x53c6d0(0x180)]??_0x2b8fea['headlineVersion']?.['version']??_0x2b8fea[_0x53c6d0(0x133)]?.[_0x53c6d0(0x180)];}function buildEffectiveRuntimeSkills(_0x16609f,_0x580a4d,_0xfbd5e1){const _0x7ceaf8=a56_0x47ea;if(_0xfbd5e1===_0x7ceaf8(0x175))return _0x16609f;if(_0xfbd5e1===_0x7ceaf8(0x186))return _0x580a4d;const _0x3adb45=new Map();for(const _0xeaff97 of _0x580a4d){_0x3adb45[_0x7ceaf8(0x124)](_0xeaff97[_0x7ceaf8(0x154)],_0xeaff97);}for(const _0x39d9ac of _0x16609f){_0x3adb45[_0x7ceaf8(0x124)](_0x39d9ac[_0x7ceaf8(0x154)],_0x39d9ac);}return Array['from'](_0x3adb45[_0x7ceaf8(0x164)]());}function normalizeRuntimeSkillListResponse(_0x31ce3b,_0x475108){const _0x262415=a56_0x47ea;if(Array['isArray'](_0x475108)){const _0x579bf1=_0x475108[_0x262415(0x121)](_0x261cd3=>_0x261cd3[_0x262415(0x14d)]===_0x262415(0x175)),_0x408d14=_0x475108[_0x262415(0x121)](_0x4576a7=>_0x4576a7['scope']===_0x262415(0x186));return{'appCode':_0x31ce3b,'personal':_0x579bf1,'company':_0x408d14,'effective':[..._0x408d14,..._0x579bf1]};}return{'appCode':_0x475108?.[_0x262415(0x15b)]??_0x31ce3b,'personal':Array[_0x262415(0x14f)](_0x475108?.[_0x262415(0x175)])?_0x475108[_0x262415(0x175)]:[],'company':Array[_0x262415(0x14f)](_0x475108?.['company'])?_0x475108[_0x262415(0x186)]:[],'effective':Array[_0x262415(0x14f)](_0x475108?.[_0x262415(0x16d)])?_0x475108['effective']:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x45fbb0,_0x57a45d){const _0x246d30=a57_0x2944,_0x27ba0c=_0x45fbb0();while(!![]){try{const _0x3f19d6=-parseInt(_0x246d30(0x1e8))/0x1*(-parseInt(_0x246d30(0x1ea))/0x2)+parseInt(_0x246d30(0x1dd))/0x3*(parseInt(_0x246d30(0x1e1))/0x4)+parseInt(_0x246d30(0x1df))/0x5*(parseInt(_0x246d30(0x1ec))/0x6)+parseInt(_0x246d30(0x1e0))/0x7+parseInt(_0x246d30(0x1e4))/0x8+-parseInt(_0x246d30(0x1e2))/0x9*(-parseInt(_0x246d30(0x1e6))/0xa)+-parseInt(_0x246d30(0x1e9))/0xb;if(_0x3f19d6===_0x57a45d)break;else _0x27ba0c['push'](_0x27ba0c['shift']());}catch(_0x428557){_0x27ba0c['push'](_0x27ba0c['shift']());}}}(a57_0x1618,0x19cd6));import{listDatasets}from'../core/api-client.js';const cache=new Map();function a57_0x2944(_0x11ee91,_0x481eaf){_0x11ee91=_0x11ee91-0x1dd;const _0x1618e4=a57_0x1618();let _0x29448d=_0x1618e4[_0x11ee91];return _0x29448d;}function a57_0x1618(){const _0xb823f0=['84BDJxRG','567DpQAiJ','has','65110hTXcxt','306089OgNnCG','2188VxUssG','681507lifhGy','get','1413576zZWCvo','db-','10mioPgN','dbtableConfig','2MOvVXq','7259670Lyyvns','183818FTjQQc','dbId'];a57_0x1618=function(){return _0xb823f0;};return a57_0x1618();}export async function listDatabases(_0x33ba70){const _0x2806e1=a57_0x2944;if(cache[_0x2806e1(0x1de)](_0x33ba70))return cache[_0x2806e1(0x1e3)](_0x33ba70);const _0xae2146=await listDatasets(_0x33ba70),_0x90b9dc=new Map();for(const _0x508728 of _0xae2146){const _0x7fb9a3=_0x508728[_0x2806e1(0x1e7)];_0x7fb9a3?.[_0x2806e1(0x1eb)]!=null&&_0x90b9dc['set'](_0x7fb9a3['dbId'],_0x7fb9a3['dbName']??_0x2806e1(0x1e5)+_0x7fb9a3[_0x2806e1(0x1eb)]);}const _0x1a4cc8=[..._0x90b9dc['entries']()]['map'](([_0x364fea,_0x2430a5])=>({'dbId':_0x364fea,'dbName':_0x2430a5}));return cache['set'](_0x33ba70,_0x1a4cc8),_0x1a4cc8;}export async function getDbName(_0x16c035,_0x445f8b){try{const _0x33757b=await listDatabases(_0x16c035);return _0x33757b['find'](_0x4cc648=>_0x4cc648['dbId']===_0x445f8b)?.['dbName'];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a58_0x46d5(){const _0x2c268f=['480122KtxLCa','aggregate','50dJoikN','sql','40eIQsVq',']\x20must\x20be\x20an\x20object.','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','field','models','1xZzdXX','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.','batchCreate','authMode','6253412xBbOuk','string','1443738vpQLgW','28484QTuzhv','data\x20aggregate\x20--params.aggregate[','bff','644151tbVywY','env','trim','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','accessKey','delete','getOne','7BkeMDo','231939DHPLNC','data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.','12RZtlSj','map','update','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','column','appCode','\x22.\x20','isArray','211280ttsUdU','execute','validation','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27'];a58_0x46d5=function(){return _0x2c268f;};return a58_0x46d5();}(function(_0x558b69,_0x3d3f5c){const _0x3cceee=a58_0x4152,_0x192e4d=_0x558b69();while(!![]){try{const _0x13c87c=-parseInt(_0x3cceee(0x71))/0x1*(parseInt(_0x3cceee(0x93))/0x2)+parseInt(_0x3cceee(0x7c))/0x3+-parseInt(_0x3cceee(0x79))/0x4*(parseInt(_0x3cceee(0x95))/0x5)+-parseInt(_0x3cceee(0x78))/0x6*(parseInt(_0x3cceee(0x83))/0x7)+-parseInt(_0x3cceee(0x97))/0x8*(parseInt(_0x3cceee(0x84))/0x9)+parseInt(_0x3cceee(0x8f))/0xa+parseInt(_0x3cceee(0x76))/0xb*(parseInt(_0x3cceee(0x86))/0xc);if(_0x13c87c===_0x3d3f5c)break;else _0x192e4d['push'](_0x192e4d['shift']());}catch(_0x26a7a5){_0x192e4d['push'](_0x192e4d['shift']());}}}(a58_0x46d5,0x1e2c4));import{createClient}from'@lovrabet/sdk';function a58_0x4152(_0x3ec78f,_0x334868){_0x3ec78f=_0x3ec78f-0x6f;const _0x46d58e=a58_0x46d5();let _0x4152b1=_0x46d58e[_0x3ec78f];return _0x4152b1;}import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x32ce4f){const _0x30438f=a58_0x4152;_client=createClient({'appCode':_0x32ce4f[_0x30438f(0x8c)],'env':_0x32ce4f[_0x30438f(0x7d)],'authMode':_0x32ce4f[_0x30438f(0x75)],..._0x32ce4f['accessKey']?{'accessKey':_0x32ce4f[_0x30438f(0x80)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource']}}});}function ensureClient(){const _0x3bca0a=a58_0x4152;if(!_client)throw new Error(_0x3bca0a(0x72));return _client;}function normalizeAggregateParams(_0x2483b2){const _0x12e750=a58_0x4152,_0x5dfe65=_0x2483b2[_0x12e750(0x94)];if(_0x5dfe65===undefined)return _0x2483b2;if(!Array[_0x12e750(0x8e)](_0x5dfe65))throw CliErrors['validation'](_0x12e750(0x85));return{..._0x2483b2,'aggregate':_0x5dfe65[_0x12e750(0x87)]((_0x3a8bf2,_0xa7f244)=>{const _0x13b497=_0x12e750;if(!_0x3a8bf2||typeof _0x3a8bf2!=='object'||Array['isArray'](_0x3a8bf2))throw CliErrors[_0x13b497(0x91)](_0x13b497(0x7a)+_0xa7f244+_0x13b497(0x98));const _0x3ed2d3=_0x3a8bf2[_0x13b497(0x8b)]??_0x3a8bf2[_0x13b497(0x6f)];if(typeof _0x3ed2d3!==_0x13b497(0x77)||_0x3ed2d3[_0x13b497(0x7e)]()==='')throw CliErrors[_0x13b497(0x91)]('data\x20aggregate\x20--params.aggregate['+_0xa7f244+_0x13b497(0x73));const _0x27c37a={..._0x3a8bf2,'column':_0x3ed2d3};return delete _0x27c37a[_0x13b497(0x6f)],_0x27c37a;})};}export async function executeData(_0x2245a7,_0x11830b,_0x3cd3f5){const _0xd35a40=a58_0x4152,_0x5e525b=ensureClient(),_0x586b5d='dataset_'+_0x2245a7,_0x3fa690=_0x5e525b[_0xd35a40(0x70)][_0x586b5d];if(!_0x3fa690||typeof _0x3fa690[_0x11830b]!=='function')throw new Error(_0xd35a40(0x7f)+_0x11830b+_0xd35a40(0x8d)+_0xd35a40(0x99));if(_0x11830b==='batchCreate')return _0x3fa690[_0xd35a40(0x74)](parseBatchCreateItemsFromParams(_0x3cd3f5));const _0x18e5b7=_0x3cd3f5!==undefined&&_0x3cd3f5!==null&&!Array[_0xd35a40(0x8e)](_0x3cd3f5)?_0x3cd3f5:{};switch(_0x11830b){case'getOne':{const _0x515409=_0x18e5b7['id'];if(_0x515409===undefined||_0x515409===null)throw new Error(_0xd35a40(0x8a));return _0x3fa690[_0xd35a40(0x82)](_0x515409);}case _0xd35a40(0x88):{const {id:_0x5f0e76,..._0x17e15b}=_0x18e5b7;if(_0x5f0e76===undefined||_0x5f0e76===null)throw new Error(_0xd35a40(0x89));return _0x3fa690['update'](_0x5f0e76,_0x17e15b);}case'delete':{const _0x201b8b=_0x18e5b7['id'];if(_0x201b8b===undefined||_0x201b8b===null)throw new Error(_0xd35a40(0x92));return _0x3fa690[_0xd35a40(0x81)](_0x201b8b);}case _0xd35a40(0x94):return _0x3fa690[_0xd35a40(0x94)](normalizeAggregateParams(_0x18e5b7));default:return _0x3fa690[_0x11830b](_0x18e5b7);}}export async function executeSdkSql(_0x2930b7,_0x25e52d){const _0x2330c5=a58_0x4152,_0x3501db=ensureClient();return _0x3501db[_0x2330c5(0x96)]['execute']({'sqlCode':_0x2930b7,'params':_0x25e52d});}export async function executeSdkBff(_0x3d107b,_0x85066f){const _0x2b8358=a58_0x4152,_0x44d124=ensureClient();return _0x44d124[_0x2b8358(0x7b)][_0x2b8358(0x90)]({'scriptName':_0x3d107b,'params':_0x85066f});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x446614=a59_0x3199;(function(_0xf39d9a,_0x5d61a9){const _0x41fd29=a59_0x3199,_0x2d9bde=_0xf39d9a();while(!![]){try{const _0x14c204=parseInt(_0x41fd29(0x187))/0x1*(parseInt(_0x41fd29(0x188))/0x2)+-parseInt(_0x41fd29(0x18c))/0x3*(parseInt(_0x41fd29(0x18e))/0x4)+-parseInt(_0x41fd29(0x183))/0x5*(parseInt(_0x41fd29(0x18b))/0x6)+-parseInt(_0x41fd29(0x181))/0x7+-parseInt(_0x41fd29(0x189))/0x8*(parseInt(_0x41fd29(0x186))/0x9)+parseInt(_0x41fd29(0x191))/0xa+parseInt(_0x41fd29(0x184))/0xb;if(_0x14c204===_0x5d61a9)break;else _0x2d9bde['push'](_0x2d9bde['shift']());}catch(_0x1fd64b){_0x2d9bde['push'](_0x2d9bde['shift']());}}}(a59_0x3591,0xb7f50));function a59_0x3199(_0x5444b0,_0x27416d){_0x5444b0=_0x5444b0-0x181;const _0x3591bf=a59_0x3591();let _0x3199ea=_0x3591bf[_0x5444b0];return _0x3199ea;}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};function a59_0x3591(){const _0xf841cd=['72hWWBpQ','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','6tMFgCm','13383zdzhwu','newConfigFileName','488sMDwBd','\x20auth\x20login`.','Configure\x20accessKey\x20in\x20','7883100HkPYYn','7452739NYjoay','\x20or\x20run\x20`','3778270WUrjBj','34961080Ezozxy','Set\x20appcode\x20via\x20--appcode\x20or\x20','1461393ycxvtR','36vzKOfC','34048KLHuVm'];a59_0x3591=function(){return _0xf841cd;};return a59_0x3591();}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a59_0x446614(0x190)+PRODUCT_CONFIG['newConfigFileName']+a59_0x446614(0x182)+CLI_BIN_NAME+a59_0x446614(0x18f),'configMissingHint':a59_0x446614(0x185)+PRODUCT_CONFIG['newConfigFileName']+'.','notInProjectHint':a59_0x446614(0x18a)+PRODUCT_CONFIG[a59_0x446614(0x18d)]+'\x20file.'});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b3c72,_0xbdd7b3){var _0x262dc2=a60_0x4d06,_0x425fe5=_0x4b3c72();while(!![]){try{var _0x23b617=parseInt(_0x262dc2(0x1b0))/0x1+-parseInt(_0x262dc2(0x1aa))/0x2*(parseInt(_0x262dc2(0x1a8))/0x3)+parseInt(_0x262dc2(0x1ac))/0x4*(parseInt(_0x262dc2(0x1a7))/0x5)+-parseInt(_0x262dc2(0x1b2))/0x6*(-parseInt(_0x262dc2(0x1ae))/0x7)+parseInt(_0x262dc2(0x1a9))/0x8*(-parseInt(_0x262dc2(0x1af))/0x9)+parseInt(_0x262dc2(0x1b1))/0xa*(-parseInt(_0x262dc2(0x1ad))/0xb)+parseInt(_0x262dc2(0x1ab))/0xc;if(_0x23b617===_0xbdd7b3)break;else _0x425fe5['push'](_0x425fe5['shift']());}catch(_0x368dc1){_0x425fe5['push'](_0x425fe5['shift']());}}}(a60_0x3865,0xd74d9));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a60_0x3865b8}from'@lovrabet/cli-framework';function a60_0x4d06(_0x5d04b6,_0x448493){_0x5d04b6=_0x5d04b6-0x1a7;var _0x3865f3=a60_0x3865();var _0x4d061d=_0x3865f3[_0x5d04b6];return _0x4d061d;}function a60_0x3865(){var _0x5c4738=['451XLmpWh','7293552NxAsVm','90xQvwBA','336831TgFjBH','242370agNCbh','6yLwSCs','415IOFNcA','3075zzZMlB','1302888GoYFzb','2974gtEuGf','23462052TpJglq','81660uIcDCN'];a60_0x3865=function(){return _0x5c4738;};return a60_0x3865();}export function buildAllFlags(_0x798366){return a60_0x3865b8(_0x798366,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a61_0x4f34(_0x73fcd3,_0x4d18e3){_0x73fcd3=_0x73fcd3-0x131;const _0x13c80a=a61_0x13c8();let _0x4f34ca=_0x13c80a[_0x73fcd3];return _0x4f34ca;}(function(_0x1d3f01,_0x5eb890){const _0x3cf3f7=a61_0x4f34,_0x2c15e8=_0x1d3f01();while(!![]){try{const _0x4b1f76=-parseInt(_0x3cf3f7(0x137))/0x1+parseInt(_0x3cf3f7(0x138))/0x2+-parseInt(_0x3cf3f7(0x135))/0x3+-parseInt(_0x3cf3f7(0x131))/0x4+parseInt(_0x3cf3f7(0x134))/0x5+-parseInt(_0x3cf3f7(0x133))/0x6+parseInt(_0x3cf3f7(0x136))/0x7;if(_0x4b1f76===_0x5eb890)break;else _0x2c15e8['push'](_0x2c15e8['shift']());}catch(_0x4a3fa7){_0x2c15e8['push'](_0x2c15e8['shift']());}}}(a61_0x13c8,0x4efdf));function a61_0x13c8(){const _0x3a4732=['body','1898548qkleaD','description','1159758EmkTxs','2257135NKSbRM','491460XvBhmC','6014596BNQurv','449213wOvqgY','587718OqCqmn'];a61_0x13c8=function(){return _0x3a4732;};return a61_0x13c8();}export function dryRun(_0x5bb415,_0x2eaece){const _0x2eacc1={'method':_0x5bb415,'url':_0x2eaece},_0x2b698f={'body'(_0x504bed){const _0x22f03f=a61_0x4f34;return _0x2eacc1[_0x22f03f(0x139)]=_0x504bed,_0x2b698f;},'description'(_0x2669e0){const _0x5ba2ff=a61_0x4f34;return _0x2eacc1[_0x5ba2ff(0x132)]=_0x2669e0,_0x2b698f;},'build'(){return{..._0x2eacc1};}};return _0x2b698f;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x69ed79=a62_0x5b90;(function(_0x209d97,_0x13f14e){const _0x5e28b2=a62_0x5b90,_0xcccd6f=_0x209d97();while(!![]){try{const _0x4bbd1f=parseInt(_0x5e28b2(0x18c))/0x1*(-parseInt(_0x5e28b2(0x18f))/0x2)+-parseInt(_0x5e28b2(0x186))/0x3*(parseInt(_0x5e28b2(0x192))/0x4)+parseInt(_0x5e28b2(0x18a))/0x5*(-parseInt(_0x5e28b2(0x18d))/0x6)+parseInt(_0x5e28b2(0x188))/0x7+-parseInt(_0x5e28b2(0x18b))/0x8*(parseInt(_0x5e28b2(0x189))/0x9)+-parseInt(_0x5e28b2(0x190))/0xa*(-parseInt(_0x5e28b2(0x187))/0xb)+parseInt(_0x5e28b2(0x191))/0xc;if(_0x4bbd1f===_0x13f14e)break;else _0xcccd6f['push'](_0xcccd6f['shift']());}catch(_0x6fc7e0){_0xcccd6f['push'](_0xcccd6f['shift']());}}}(a62_0x26b0,0x2fd0c));import{createFlagHelpers}from'@lovrabet/cli-framework';function a62_0x5b90(_0xbb7517,_0x5e3b5d){_0xbb7517=_0xbb7517-0x186;const _0x26b080=a62_0x26b0();let _0x5b90bf=_0x26b080[_0xbb7517];return _0x5b90bf;}import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);function a62_0x26b0(){const _0x413d19=['550fopPgl','10857048hTAHBo','20dWWRKH','104760ORVfyi','51799dsukjv','213472PbjYIl','1762623iNAvSu','5XzvqEc','16pmzRao','5651UPVAHJ','2117910HsgGLZ','parseFlags','28VnLWDx'];a62_0x26b0=function(){return _0x413d19;};return a62_0x26b0();}export const parseFlags=helpers[a62_0x69ed79(0x18e)];export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a63_0x2193(){const _0xc9ae90=['7gMuIiE','generateServiceHelp','generateFullHelp','148159QlqysL','8YwVybM','map','13497800VXozHQ','2357721xEsWyW','16TUfhZQ','filter','7617954ArZFWg','has','Requires\x20appcode\x20(set\x20via\x20','5061807kPVQLv','\x20or\x20--appcode).','769955WTTHXU','service','6266704MkoiEt','generateCommandHelp','get'];a63_0x2193=function(){return _0xc9ae90;};return a63_0x2193();}(function(_0x1ee2a4,_0x4bb834){const _0x4e09a5=a63_0x2062,_0x5e83f8=_0x1ee2a4();while(!![]){try{const _0x1ce379=-parseInt(_0x4e09a5(0x1a2))/0x1*(-parseInt(_0x4e09a5(0x1a7))/0x2)+parseInt(_0x4e09a5(0x1a6))/0x3+parseInt(_0x4e09a5(0x1a3))/0x4*(parseInt(_0x4e09a5(0x1ae))/0x5)+parseInt(_0x4e09a5(0x1a9))/0x6*(parseInt(_0x4e09a5(0x19f))/0x7)+-parseInt(_0x4e09a5(0x19c))/0x8+-parseInt(_0x4e09a5(0x1ac))/0x9+-parseInt(_0x4e09a5(0x1a5))/0xa;if(_0x1ce379===_0x4bb834)break;else _0x5e83f8['push'](_0x5e83f8['shift']());}catch(_0x48ede8){_0x5e83f8['push'](_0x5e83f8['shift']());}}}(a63_0x2193,0xd051f));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.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 _0x429538=a63_0x2062;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[...serviceRegistry,...safeListDynamicServiceEntries()],'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x429538(0x1ab)+PRODUCT_CONFIG['newConfigFileName']+_0x429538(0x1ad)});}export function generateCommandHelp(_0x339433){const _0x2a7214=a63_0x2062;return createGenerators()[_0x2a7214(0x19d)](_0x339433);}function a63_0x2062(_0x21ef12,_0x503d22){_0x21ef12=_0x21ef12-0x19b;const _0x219369=a63_0x2193();let _0x2062c3=_0x219369[_0x21ef12];return _0x2062c3;}export function generateServiceHelp(_0x1552ee){const _0x5db5e7=a63_0x2062;return createGenerators()[_0x5db5e7(0x1a0)](_0x1552ee);}export function generateFullHelp(){const _0x3f8532=a63_0x2062;return createGenerators()[_0x3f8532(0x1a1)]();}function getAnyServiceEntry(_0xe5c3e5){const _0x19f02e=getServiceEntry(_0xe5c3e5);if(_0x19f02e)return _0x19f02e;try{return getDynamicServiceEntry(_0xe5c3e5);}catch{return undefined;}}function getAnyServiceDefinitions(_0x3bee15){const _0x26f397=a63_0x2062,_0x24369c=serviceGroups[_0x26f397(0x19e)](_0x3bee15);if(_0x24369c)return _0x24369c;try{return getDynamicServiceDefinitions(_0x3bee15);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x508f5a=a63_0x2062,_0x175863=new Set(serviceRegistry[_0x508f5a(0x1a4)](_0x5d25a5=>_0x5d25a5['service']));try{return listDynamicServiceEntries()[_0x508f5a(0x1a8)](_0x16e95a=>!_0x175863[_0x508f5a(0x1aa)](_0x16e95a[_0x508f5a(0x19b)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c5d11,_0x37ea99){var _0x448a08=a64_0x3d1a,_0x1bae15=_0x1c5d11();while(!![]){try{var _0xb13ab=parseInt(_0x448a08(0xb6))/0x1+-parseInt(_0x448a08(0xb2))/0x2+-parseInt(_0x448a08(0xb1))/0x3*(parseInt(_0x448a08(0xb3))/0x4)+parseInt(_0x448a08(0xaf))/0x5+-parseInt(_0x448a08(0xb5))/0x6+parseInt(_0x448a08(0xae))/0x7+parseInt(_0x448a08(0xb4))/0x8*(-parseInt(_0x448a08(0xb0))/0x9);if(_0xb13ab===_0x37ea99)break;else _0x1bae15['push'](_0x1bae15['shift']());}catch(_0x5aa8d7){_0x1bae15['push'](_0x1bae15['shift']());}}}(a64_0x2d0d,0x5ba08));export{runCommand}from'../framework/runner.js';function a64_0x3d1a(_0x522069,_0x3ddb08){_0x522069=_0x522069-0xae;var _0x2d0d12=a64_0x2d0d();var _0x3d1a77=_0x2d0d12[_0x522069];return _0x3d1a77;}export{parseFlags,validateFlags}from'../framework/flags.js';function a64_0x2d0d(){var _0x5efde2=['1144316zYOIWB','372LAbekv','112JoLbvA','1415316VSIsbh','637655rWxXgf','3000627BjEhEc','3099905WAYsxS','293013trvBkA','1521kqErng'];a64_0x2d0d=function(){return _0x5efde2;};return a64_0x2d0d();}export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{dryRun}from'../framework/dryrun.js';export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x50c6f4,_0x2f0f66){const _0x21c989=a65_0x151c,_0x286155=_0x50c6f4();while(!![]){try{const _0x423318=parseInt(_0x21c989(0x96))/0x1*(parseInt(_0x21c989(0x87))/0x2)+-parseInt(_0x21c989(0x88))/0x3*(-parseInt(_0x21c989(0x86))/0x4)+parseInt(_0x21c989(0x91))/0x5*(-parseInt(_0x21c989(0x8f))/0x6)+parseInt(_0x21c989(0x94))/0x7+parseInt(_0x21c989(0x8d))/0x8*(-parseInt(_0x21c989(0x8a))/0x9)+-parseInt(_0x21c989(0x95))/0xa*(parseInt(_0x21c989(0x8e))/0xb)+parseInt(_0x21c989(0x93))/0xc*(parseInt(_0x21c989(0x97))/0xd);if(_0x423318===_0x2f0f66)break;else _0x286155['push'](_0x286155['shift']());}catch(_0x11fea5){_0x286155['push'](_0x286155['shift']());}}}(a65_0x27c6,0xc85e7));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a65_0x27c6(){const _0x23f50f=['13193fJWovh','2137070vrIJIj','20AknLyL','134VFORlm','829560lbvaJW','message','10842885PvHGsy','update','error','8ayOnlR','363ROuASK','16812kYbYQd','pretty','5hGQLeV','format','12KhRCrt','6691538LBXLIX','411690LarqDT'];a65_0x27c6=function(){return _0x23f50f;};return a65_0x27c6();}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});function a65_0x151c(_0x4d8d87,_0x28b1bc){_0x4d8d87=_0x4d8d87-0x86;const _0x27c6fc=a65_0x27c6();let _0x151c34=_0x27c6fc[_0x4d8d87];return _0x151c34;}export function formatOutput(_0x377178,_0x3464bd){const _0x21f36e=a65_0x151c,_0x380090=_0x377178['_notice'],{_notice:_0x12a969,..._0x246d24}=_0x377178;void _0x12a969,baseFormatOutput(_0x246d24,_0x3464bd),_0x3464bd[_0x21f36e(0x92)]===_0x21f36e(0x90)&&printPrettyNotice(_0x380090);}function printPrettyNotice(_0x16ce1f){const _0x4f3624=a65_0x151c;if(!_0x16ce1f?.['update'])return;console[_0x4f3624(0x8c)](_0x16ce1f[_0x4f3624(0x8b)][_0x4f3624(0x89)]+'\x20('+_0x16ce1f[_0x4f3624(0x8b)]['url']+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a66_0x55ce(){const _0x1de719=['type','yes','19303860oRcJcu','has','1lpOfqU','help','number','push','189kcnjNX','1627266eynqwu','boolean','replace','string','alias','global','corrected','3706730eQOwzF','non-interactive','645jZxrgg','indexOf','length','14624nCXTwh','keys','sticky','toUpperCase','add','358152hzPVwZ','2010679GYDhKx','get','slice','name','original','dry-run','set','appcode','dryRun','1139817wJwRng','toLowerCase','30IkgVmG','80oSppJl','version'];a66_0x55ce=function(){return _0x1de719;};return a66_0x55ce();}(function(_0xe4ea90,_0x22df96){const _0x13f928=a66_0x2963,_0x49fd81=_0xe4ea90();while(!![]){try{const _0x38e3f9=-parseInt(_0x13f928(0x170))/0x1*(parseInt(_0x13f928(0x175))/0x2)+parseInt(_0x13f928(0x17e))/0x3*(-parseInt(_0x13f928(0x181))/0x4)+-parseInt(_0x13f928(0x17c))/0x5+-parseInt(_0x13f928(0x169))/0x6*(parseInt(_0x13f928(0x167))/0x7)+parseInt(_0x13f928(0x186))/0x8*(parseInt(_0x13f928(0x174))/0x9)+-parseInt(_0x13f928(0x16a))/0xa*(-parseInt(_0x13f928(0x187))/0xb)+parseInt(_0x13f928(0x16e))/0xc;if(_0x38e3f9===_0x22df96)break;else _0x49fd81['push'](_0x49fd81['shift']());}catch(_0x12ff5a){_0x49fd81['push'](_0x49fd81['shift']());}}}(a66_0x55ce,0xd0f86));function toKebab(_0x3a74d3){const _0x46b181=a66_0x2963;return _0x3a74d3[_0x46b181(0x177)](/_/g,'-')[_0x46b181(0x177)](/-([A-Z]+)/g,(_0xc0cc60,_0x4ec23b)=>'-'+_0x4ec23b['toLowerCase']())[_0x46b181(0x177)](/([a-z0-9])([A-Z])/g,(_0x1a3d9e,_0x126774,_0x19022d)=>_0x126774+'-'+_0x19022d)[_0x46b181(0x168)]();}function buildKnownFlags(_0x4f38c4){const _0x314140=a66_0x2963,_0x15be08=new Set();for(const _0x453167 of _0x4f38c4){_0x15be08[_0x314140(0x185)](_0x453167[_0x314140(0x18a)]),_0x15be08[_0x314140(0x185)](toCamelCase(_0x453167[_0x314140(0x18a)]));}for(const _0x164777 of[_0x314140(0x18c),_0x314140(0x166),_0x314140(0x16d),'format']){_0x15be08[_0x314140(0x185)](_0x164777);}for(const _0xcd8d0d of[_0x314140(0x171),'env',_0x314140(0x165),'app','nonInteractive',_0x314140(0x17d),'ci',_0x314140(0x17a),_0x314140(0x16b)]){_0x15be08[_0x314140(0x185)](_0xcd8d0d);}return _0x15be08;}function buildFlagTypeMap(_0x2bc42f){const _0xdee11=a66_0x2963,_0x3eeee2=new Map();for(const _0x427b35 of _0x2bc42f){_0x3eeee2[_0xdee11(0x18d)](_0x427b35[_0xdee11(0x18a)],_0x427b35['type']),_0x3eeee2['set'](toCamelCase(_0x427b35['name']),_0x427b35[_0xdee11(0x16c)]);}return _0x3eeee2;}function a66_0x2963(_0x185484,_0x51387b){_0x185484=_0x185484-0x165;const _0x55ce8c=a66_0x55ce();let _0x29632b=_0x55ce8c[_0x185484];return _0x29632b;}function toCamelCase(_0x23deeb){const _0x331d08=a66_0x2963;return _0x23deeb[_0x331d08(0x177)](/-([a-z])/g,(_0x35be65,_0x4af53c)=>_0x4af53c[_0x331d08(0x184)]());}function aliasHandler(_0x24eb2e,_0x5d898e){const _0x572ecf=a66_0x2963,_0x52bc6c=[];for(const _0x56879e of Object[_0x572ecf(0x182)](_0x24eb2e)){if(_0x5d898e['has'](_0x56879e))continue;const _0x532036=toKebab(_0x56879e);_0x532036!==_0x56879e&&_0x5d898e['has'](_0x532036)&&_0x52bc6c[_0x572ecf(0x173)]({'original':_0x56879e,'corrected':_0x532036,'handler':_0x572ecf(0x179)});}return _0x52bc6c;}function stickyHandler(_0x8c7fd,_0x59b6ef,_0x1402fe){const _0x40367a=a66_0x2963,_0x1011c8=[];for(const [_0x592352,_0xcd823b]of Object['entries'](_0x8c7fd)){if(_0xcd823b!==!![])continue;for(let _0x14b7e9=_0x592352[_0x40367a(0x180)]-0x1;_0x14b7e9>0x0;_0x14b7e9--){const _0x28d4e1=_0x592352['slice'](0x0,_0x14b7e9),_0x5592e7=_0x592352[_0x40367a(0x189)](_0x14b7e9),_0x1b66d0=toKebab(_0x28d4e1),_0x5aa04c=toCamelCase(_0x28d4e1),_0xd5a94b=_0x59b6ef[_0x40367a(0x16f)](_0x28d4e1)?_0x28d4e1:_0x59b6ef[_0x40367a(0x16f)](_0x1b66d0)?_0x1b66d0:_0x59b6ef[_0x40367a(0x16f)](_0x5aa04c)?_0x5aa04c:null;if(!_0xd5a94b)continue;const _0x19fa8e=_0x1402fe[_0x40367a(0x188)](_0xd5a94b)??_0x40367a(0x178);let _0x44283a;if(_0x19fa8e===_0x40367a(0x172)){const _0x56c293=Number(_0x5592e7);if(isNaN(_0x56c293)||_0x5592e7==='')continue;_0x44283a=_0x56c293;}else{if(_0x19fa8e===_0x40367a(0x176))continue;else{if(_0x5592e7==='')continue;_0x44283a=_0x5592e7;}}_0x1011c8[_0x40367a(0x173)]({'original':_0x592352,'corrected':_0xd5a94b+'='+_0x44283a,'handler':_0x40367a(0x183)});break;}}return _0x1011c8;}export function correctFlags(_0x19103a,_0x3de2ba){const _0x4ef789=a66_0x2963,_0x3b523b=buildKnownFlags(_0x3de2ba),_0x232834=buildFlagTypeMap(_0x3de2ba),_0x4ecb3f=aliasHandler(_0x19103a,_0x3b523b),_0x143479=stickyHandler(_0x19103a,_0x3b523b,_0x232834),_0x53ff05=[..._0x4ecb3f,..._0x143479];if(_0x53ff05[_0x4ef789(0x180)]===0x0)return{'flags':_0x19103a,'corrections':[]};const _0x3819ec={..._0x19103a},_0xec740e=new Set();for(const _0x4d0aee of _0x4ecb3f){_0x3819ec[_0x4d0aee[_0x4ef789(0x17b)]]=_0x19103a[_0x4d0aee[_0x4ef789(0x18b)]],_0xec740e[_0x4ef789(0x185)](_0x4d0aee[_0x4ef789(0x18b)]);}for(const _0x42fc81 of _0x143479){const _0x4208fd=_0x42fc81[_0x4ef789(0x17b)][_0x4ef789(0x17f)]('='),_0x4b21a6=_0x42fc81[_0x4ef789(0x17b)][_0x4ef789(0x189)](0x0,_0x4208fd),_0x2b636d=_0x42fc81[_0x4ef789(0x17b)][_0x4ef789(0x189)](_0x4208fd+0x1),_0x567612=_0x232834[_0x4ef789(0x188)](_0x4b21a6)??_0x4ef789(0x178);_0x567612===_0x4ef789(0x172)?_0x3819ec[_0x4b21a6]=Number(_0x2b636d):_0x3819ec[_0x4b21a6]=_0x2b636d,_0xec740e['add'](_0x42fc81[_0x4ef789(0x18b)]);}for(const _0xb97419 of _0xec740e){delete _0x3819ec[_0xb97419];}return{'flags':_0x3819ec,'corrections':_0x53ff05};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa0cb27,_0x140b96){var _0x2ac383=a67_0x1ef2,_0x191c33=_0xa0cb27();while(!![]){try{var _0x2b60e4=parseInt(_0x2ac383(0xe6))/0x1*(-parseInt(_0x2ac383(0xeb))/0x2)+-parseInt(_0x2ac383(0xf0))/0x3+parseInt(_0x2ac383(0xea))/0x4*(-parseInt(_0x2ac383(0xed))/0x5)+-parseInt(_0x2ac383(0xe7))/0x6+-parseInt(_0x2ac383(0xec))/0x7+parseInt(_0x2ac383(0xe8))/0x8*(parseInt(_0x2ac383(0xee))/0x9)+parseInt(_0x2ac383(0xef))/0xa*(parseInt(_0x2ac383(0xe9))/0xb);if(_0x2b60e4===_0x140b96)break;else _0x191c33['push'](_0x191c33['shift']());}catch(_0x49138a){_0x191c33['push'](_0x191c33['shift']());}}}(a67_0x5e34,0xc3293));export{extractList,extractPaging}from'@lovrabet/cli-framework';function a67_0x1ef2(_0x1184b8,_0x204a8d){_0x1184b8=_0x1184b8-0xe6;var _0x5e3488=a67_0x5e34();var _0x1ef263=_0x5e3488[_0x1184b8];return _0x1ef263;}function a67_0x5e34(){var _0x470a12=['8nNiOAF','11SlAOBH','76fURxmx','472EJAElP','7002093UAjRfO','259995IMHJQo','3006279qHJDgg','50079370tSyoFZ','3278241ERXklB','4252nmTTBz','2748540yqvfck'];a67_0x5e34=function(){return _0x470a12;};return a67_0x5e34();}
|