@lovrabet/lovrabet-cli 2.1.3-beta.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/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/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a58_0x556c(_0x25e967,_0x30f010){_0x25e967=_0x25e967-0x12e;const _0x464bc0=a58_0x464b();let _0x556c26=_0x464bc0[_0x25e967];return _0x556c26;}const a58_0x353e13=a58_0x556c;(function(_0x2d7a01,_0x11dddb){const _0x2fdbdb=a58_0x556c,_0x30f1ca=_0x2d7a01();while(!![]){try{const _0x5d4cdd=-parseInt(_0x2fdbdb(0x140))/0x1*(parseInt(_0x2fdbdb(0x13c))/0x2)+parseInt(_0x2fdbdb(0x143))/0x3*(parseInt(_0x2fdbdb(0x13a))/0x4)+-parseInt(_0x2fdbdb(0x136))/0x5+-parseInt(_0x2fdbdb(0x138))/0x6*(parseInt(_0x2fdbdb(0x13d))/0x7)+-parseInt(_0x2fdbdb(0x130))/0x8*(-parseInt(_0x2fdbdb(0x141))/0x9)+-parseInt(_0x2fdbdb(0x12e))/0xa*(parseInt(_0x2fdbdb(0x134))/0xb)+parseInt(_0x2fdbdb(0x142))/0xc;if(_0x5d4cdd===_0x11dddb)break;else _0x30f1ca['push'](_0x30f1ca['shift']());}catch(_0x5ee9ca){_0x30f1ca['push'](_0x30f1ca['shift']());}}}(a58_0x464b,0xcd232));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x40e3f6){const _0x185e92=a58_0x556c;customApiDomain=_0x40e3f6?.['apiDomain'],customUserDomain=_0x40e3f6?.[_0x185e92(0x13f)],customRuntimeDomain=_0x40e3f6?.[_0x185e92(0x137)],customSkillHubDomain=_0x40e3f6?.[_0x185e92(0x139)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x353e13(0x133)][a58_0x353e13(0x13e)]['user']:PRODUCT_CONFIG[a58_0x353e13(0x133)][a58_0x353e13(0x135)][a58_0x353e13(0x131)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x353e13(0x133)][a58_0x353e13(0x13e)][a58_0x353e13(0x132)]:PRODUCT_CONFIG[a58_0x353e13(0x133)][a58_0x353e13(0x135)]['api']);function a58_0x464b(){const _0x503148=['skillHubDomain','1631332fdiWtj','skillhub','332476lfMCKa','1675996BRyJMs','production','userDomain','2mifJSx','4125897pquzSF','6543648zoqjYd','6EvNMmf','20ogETUX','runtime','16DIVwlU','user','api','domains','1709510hiJhzG','nonProduction','2774350anINzn','runtimeDomain','6kFmRKZ'];a58_0x464b=function(){return _0x503148;};return a58_0x464b();}export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x353e13(0x133)][a58_0x353e13(0x13e)][a58_0x353e13(0x12f)]:PRODUCT_CONFIG[a58_0x353e13(0x133)][a58_0x353e13(0x135)][a58_0x353e13(0x12f)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x353e13(0x133)][a58_0x353e13(0x13e)][a58_0x353e13(0x13b)]:PRODUCT_CONFIG['domains']['nonProduction'][a58_0x353e13(0x13b)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0xb3ea73=a59_0x9f62;(function(_0x51f0f0,_0x3bd463){const _0x1cb212=a59_0x9f62,_0x7dd91d=_0x51f0f0();while(!![]){try{const _0x20c0f9=-parseInt(_0x1cb212(0x8a))/0x1+-parseInt(_0x1cb212(0x8c))/0x2+-parseInt(_0x1cb212(0x88))/0x3+parseInt(_0x1cb212(0x8d))/0x4+-parseInt(_0x1cb212(0x8e))/0x5+parseInt(_0x1cb212(0x87))/0x6+-parseInt(_0x1cb212(0x8b))/0x7*(parseInt(_0x1cb212(0x83))/0x8);if(_0x20c0f9===_0x3bd463)break;else _0x7dd91d['push'](_0x7dd91d['shift']());}catch(_0x1667c8){_0x7dd91d['push'](_0x7dd91d['shift']());}}}(a59_0x3a5e,0x7c5f7));function a59_0x3a5e(){const _0x2c1632=['4053456dlNCyG','44328yuVItK','development','300464dPeNmU','7mUbMfp','219742LbFbBf','2041492tdFpWZ','10200pIgFiK','1994936NLpWTV','production','dev','daily'];a59_0x3a5e=function(){return _0x2c1632;};return a59_0x3a5e();}function a59_0x9f62(_0xd1c0ba,_0x29c79f){_0xd1c0ba=_0xd1c0ba-0x83;const _0x3a5e91=a59_0x3a5e();let _0x9f6291=_0x3a5e91[_0xd1c0ba];return _0x9f6291;}import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a59_0xb3ea73(0x84),'development',a59_0xb3ea73(0x86)];export function normalizeEnv(_0x338fc4){const _0x271147=a59_0xb3ea73;return _0x338fc4==='online'?_0x271147(0x84):_0x338fc4;}export function isProduction(_0x1fd286){const _0x1c9602=a59_0xb3ea73;return normalizeEnv(_0x1fd286)===_0x1c9602(0x84);}export function isDaily(_0x41d71b){const _0x214c7e=a59_0xb3ea73;return normalizeEnv(_0x41d71b)===_0x214c7e(0x86);}export function isDev(_0x2ef27e){const _0xff92c=a59_0xb3ea73,_0x1dd6da=normalizeEnv(_0x2ef27e);return _0x1dd6da===_0xff92c(0x89)||_0x1dd6da===_0xff92c(0x85);}let env=normalizeEnv(productEnv('ENV')||'production');export function getEnv(){return env;}export function initEnv(_0x549798){env=normalizeEnv(_0x549798);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a60_0x2924(){const _0x1a9d29=['80igKQpf','json','2595726ewIblb','pretty','7798450yFXfji','2899986kzMwfD','2dsdRYV','7384023XbkrMf','1201782YQCzId','3662328xqSfvf','214612uZuSuM','14XCAOmT'];a60_0x2924=function(){return _0x1a9d29;};return a60_0x2924();}const a60_0x38f856=a60_0x1add;(function(_0x21fbf3,_0x4768ff){const _0x41e1aa=a60_0x1add,_0x2f72c0=_0x21fbf3();while(!![]){try{const _0x74b927=-parseInt(_0x41e1aa(0x1e1))/0x1*(-parseInt(_0x41e1aa(0x1df))/0x2)+-parseInt(_0x41e1aa(0x1de))/0x3+parseInt(_0x41e1aa(0x1e3))/0x4*(parseInt(_0x41e1aa(0x1e5))/0x5)+parseInt(_0x41e1aa(0x1db))/0x6+-parseInt(_0x41e1aa(0x1e4))/0x7*(parseInt(_0x41e1aa(0x1e2))/0x8)+parseInt(_0x41e1aa(0x1e0))/0x9+-parseInt(_0x41e1aa(0x1dd))/0xa;if(_0x74b927===_0x4768ff)break;else _0x2f72c0['push'](_0x2f72c0['shift']());}catch(_0x58554f){_0x2f72c0['push'](_0x2f72c0['shift']());}}}(a60_0x2924,0x9efc9));function a60_0x1add(_0x4961a4,_0x490c8d){_0x4961a4=_0x4961a4-0x1db;const _0x292426=a60_0x2924();let _0x1addff=_0x292426[_0x4961a4];return _0x1addff;}export const OUTPUT_FORMAT_VALUES=[a60_0x38f856(0x1e6),a60_0x38f856(0x1dc),'compress'];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x3f6ffd=a61_0x6bb4;function a61_0x40ba(){const _0x4fe1d5=['7640nQEGaT','cli:lovrabet-runtime','4WXBhIR','2008030tvTQhH','1827148nCKFMA','LOVRABET','https://registry.npmjs.org','.lovrabet','https://user.lovrabet.com','.lovrabetrc','https://skills.lovrabet.com','2646AaSpMp','legacyEnvPrefixes','/user/ak','84969pzrSwk','386631UAvGQc','.lovrabet.json','SKIP_NPX_SKILLS','.lovrabet-runtime.log','3166776obOBet','RABETBASE','Lovrabet\x20User\x20Center','9hLbwKC','@lovrabet/lovrabet-cli','https://daily-api.lovrabet.com','https://runtime.lovrabet.com','https://user-daily.lovrabet.com','lovrabet','lovrabet/lovrabet-cli','https://api.lovrabet.com','Lovrabet\x20Runtime\x20CLI','2289295lmEqVd','envPrefix'];a61_0x40ba=function(){return _0x4fe1d5;};return a61_0x40ba();}(function(_0x4a9887,_0x375648){const _0x3cc70b=a61_0x6bb4,_0xb259c2=_0x4a9887();while(!![]){try{const _0x41bc66=parseInt(_0x3cc70b(0xef))/0x1*(-parseInt(_0x3cc70b(0x104))/0x2)+-parseInt(_0x3cc70b(0xf0))/0x3+-parseInt(_0x3cc70b(0xe5))/0x4+parseInt(_0x3cc70b(0x100))/0x5+parseInt(_0x3cc70b(0xf4))/0x6+parseInt(_0x3cc70b(0xec))/0x7*(parseInt(_0x3cc70b(0x102))/0x8)+-parseInt(_0x3cc70b(0xf7))/0x9*(parseInt(_0x3cc70b(0x105))/0xa);if(_0x41bc66===_0x375648)break;else _0xb259c2['push'](_0xb259c2['shift']());}catch(_0x43d6b6){_0xb259c2['push'](_0xb259c2['shift']());}}}(a61_0x40ba,0x5f460));export const PRODUCT_CONFIG={'cliBinName':a61_0x3f6ffd(0xfc),'cliDisplayName':a61_0x3f6ffd(0xff),'npmPackageName':a61_0x3f6ffd(0xf8),'skillSource':a61_0x3f6ffd(0xfd),'npmRegistryBaseUrl':a61_0x3f6ffd(0xe7),'envPrefix':a61_0x3f6ffd(0xe6),'legacyEnvPrefixes':[a61_0x3f6ffd(0xf5)],'configFileNames':[a61_0x3f6ffd(0xf1),a61_0x3f6ffd(0xea)],'newConfigFileName':a61_0x3f6ffd(0xf1),'homeDirName':a61_0x3f6ffd(0xe8),'logFileName':a61_0x3f6ffd(0xf3),'invokeSource':a61_0x3f6ffd(0x103),'userCenterDisplayName':a61_0x3f6ffd(0xf6),'skipNpxSkillsEnvSuffix':a61_0x3f6ffd(0xf2),'domains':{'production':{'user':a61_0x3f6ffd(0xe9),'api':a61_0x3f6ffd(0xfe),'runtime':a61_0x3f6ffd(0xfa),'skillhub':a61_0x3f6ffd(0xeb)},'nonProduction':{'user':a61_0x3f6ffd(0xfb),'api':a61_0x3f6ffd(0xf9),'runtime':'https://daily-runtime.lovrabet.com','skillhub':'https://skills-daily.lovrabet.com'}},'accessKeyCreatePath':a61_0x3f6ffd(0xee)};export function productEnvName(_0x25446b){const _0x531238=a61_0x3f6ffd;return PRODUCT_CONFIG[_0x531238(0x101)]+'_'+_0x25446b;}export function productEnvNames(_0x349048){const _0x1fb4a7=a61_0x3f6ffd;return[productEnvName(_0x349048),...PRODUCT_CONFIG[_0x1fb4a7(0xed)]['map'](_0x4cb4da=>_0x4cb4da+'_'+_0x349048)];}function a61_0x6bb4(_0x618800,_0x28033f){_0x618800=_0x618800-0xe5;const _0x40ba15=a61_0x40ba();let _0x6bb490=_0x40ba15[_0x618800];return _0x6bb490;}export function productEnv(_0x21c700){for(const _0x3cfd5b of productEnvNames(_0x21c700)){const _0x515040=process.env[_0x3cfd5b];if(_0x515040!==undefined)return _0x515040;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a62_0xd0d5(_0x1f0e9c,_0x2f70d3){_0x1f0e9c=_0x1f0e9c-0x6d;const _0x40df3e=a62_0x40df();let _0xd0d57e=_0x40df3e[_0x1f0e9c];return _0xd0d57e;}function a62_0x40df(){const _0x3691a8=['142164HNqXpo','8qNyYwp','209568iioTjM','189ORpZvJ','18Sfeikj','115182BERXYi','45801AdJJBT','write','50520LgfIqs','high-risk-write','3653150AGTquE','886525mtWonI'];a62_0x40df=function(){return _0x3691a8;};return a62_0x40df();}const a62_0x27e095=a62_0xd0d5;(function(_0x3cd4bf,_0x445d49){const _0x3990e9=a62_0xd0d5,_0x1c9b8f=_0x3cd4bf();while(!![]){try{const _0xffb321=-parseInt(_0x3990e9(0x6f))/0x1+parseInt(_0x3990e9(0x78))/0x2+-parseInt(_0x3990e9(0x70))/0x3+-parseInt(_0x3990e9(0x77))/0x4*(parseInt(_0x3990e9(0x75))/0x5)+parseInt(_0x3990e9(0x76))/0x6+parseInt(_0x3990e9(0x6d))/0x7*(-parseInt(_0x3990e9(0x72))/0x8)+parseInt(_0x3990e9(0x6e))/0x9*(parseInt(_0x3990e9(0x74))/0xa);if(_0xffb321===_0x445d49)break;else _0x1c9b8f['push'](_0x1c9b8f['shift']());}catch(_0x25bf4d){_0x1c9b8f['push'](_0x1c9b8f['shift']());}}}(a62_0x40df,0x31b18));export const RISK_LEVEL_VALUES=['read',a62_0x27e095(0x71),a62_0x27e095(0x73)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a63_0x5340(){const _0x55c968=['2009FtqZar','6060738JGvnTM','3278418HlWtgL','1224526YsKEFZ','6729140gnzSGh','user','41112vERSbN','6149495pqQiJC','3555484XOqFTK'];a63_0x5340=function(){return _0x55c968;};return a63_0x5340();}const a63_0x2564f7=a63_0x2369;function a63_0x2369(_0x5048a5,_0x7f9de3){_0x5048a5=_0x5048a5-0x6f;const _0x534052=a63_0x5340();let _0x23692e=_0x534052[_0x5048a5];return _0x23692e;}(function(_0x47d51f,_0x2593e0){const _0x2c00bc=a63_0x2369,_0x323feb=_0x47d51f();while(!![]){try{const _0x20d336=parseInt(_0x2c00bc(0x71))/0x1+-parseInt(_0x2c00bc(0x76))/0x2+parseInt(_0x2c00bc(0x70))/0x3+parseInt(_0x2c00bc(0x72))/0x4+parseInt(_0x2c00bc(0x75))/0x5+-parseInt(_0x2c00bc(0x6f))/0x6+-parseInt(_0x2c00bc(0x77))/0x7*(parseInt(_0x2c00bc(0x74))/0x8);if(_0x20d336===_0x2593e0)break;else _0x323feb['push'](_0x323feb['shift']());}catch(_0x53fda5){_0x323feb['push'](_0x323feb['shift']());}}}(a63_0x5340,0xec066));import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG['domains']['production'][a63_0x2564f7(0x73)]+PRODUCT_CONFIG['accessKeyCreatePath'];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0x134bfe=a64_0x2380;(function(_0xbb0fee,_0x288843){const _0x556e58=a64_0x2380,_0x1c97c2=_0xbb0fee();while(!![]){try{const _0x26c055=parseInt(_0x556e58(0x1e5))/0x1+-parseInt(_0x556e58(0x1db))/0x2*(parseInt(_0x556e58(0x1e1))/0x3)+-parseInt(_0x556e58(0x1d7))/0x4*(parseInt(_0x556e58(0x1d6))/0x5)+parseInt(_0x556e58(0x1f5))/0x6+parseInt(_0x556e58(0x1d5))/0x7*(parseInt(_0x556e58(0x1ec))/0x8)+-parseInt(_0x556e58(0x1cb))/0x9*(parseInt(_0x556e58(0x206))/0xa)+-parseInt(_0x556e58(0x1f7))/0xb*(-parseInt(_0x556e58(0x1fb))/0xc);if(_0x26c055===_0x288843)break;else _0x1c97c2['push'](_0x1c97c2['shift']());}catch(_0x25d709){_0x1c97c2['push'](_0x1c97c2['shift']());}}}(a64_0x25de,0x84b8f));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[a64_0x134bfe(0x1d2)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a64_0x134bfe(0x1ca)];function resolveConfigPath(_0x5c9523){for(const _0x462b29 of CONFIG_NAMES){const _0x369bda=resolve(_0x5c9523,_0x462b29);if(existsSync(_0x369bda))return _0x369bda;}return undefined;}export function resolveWriteConfigPath(_0x119ed3){const _0x21c5a8=a64_0x134bfe,_0x5cb701=_0x119ed3===_0x21c5a8(0x205)?process['cwd']():homedir(),_0x2089d9=resolveConfigPath(_0x5cb701);return _0x2089d9??resolve(_0x5cb701,NEW_CONFIG_NAME);}export function readConfigFile(_0x59f5dc){const _0x344f20=a64_0x134bfe;try{if(existsSync(_0x59f5dc)){const _0x321860=readFileSync(_0x59f5dc,{'encoding':_0x344f20(0x1e7)});if(_0x321860){const _0x373453=JSON[_0x344f20(0x1d8)](_0x321860);return migrateOnlineEnv(_0x59f5dc,_0x373453),_0x373453;}}}catch{}return{};}function migrateOnlineEnv(_0xc54196,_0x530ccc){const _0x217b7b=a64_0x134bfe;let _0x537afa=![];_0x530ccc['env']===_0x217b7b(0x1e3)&&(_0x530ccc['env']=_0x217b7b(0x207),_0x537afa=!![]);if(_0x530ccc[_0x217b7b(0x1d4)]&&typeof _0x530ccc['apps']===_0x217b7b(0x1f8))for(const _0x16ed85 of Object[_0x217b7b(0x1da)](_0x530ccc[_0x217b7b(0x1d4)])){_0x16ed85&&_0x16ed85[_0x217b7b(0x1f9)]===_0x217b7b(0x1e3)&&(_0x16ed85[_0x217b7b(0x1f9)]=_0x217b7b(0x207),_0x537afa=!![]);}if(_0x537afa)try{writeConfigFile(_0xc54196,_0x530ccc);}catch{}}export function writeConfigFile(_0x4a6fc1,_0x42ba80){const _0x131604=a64_0x134bfe,_0x2c3f9c=dirname(_0x4a6fc1);!existsSync(_0x2c3f9c)&&mkdirSync(_0x2c3f9c,{'recursive':!![]});const _0x5f2bc6=_0x4a6fc1+_0x131604(0x1d9);try{writeFileSync(_0x5f2bc6,JSON[_0x131604(0x1d3)](_0x42ba80,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x5f2bc6,_0x4a6fc1);}catch(_0x1fb318){if(_0x1fb318[_0x131604(0x1c9)]===_0x131604(0x1f6)||_0x1fb318[_0x131604(0x1c9)]===_0x131604(0x1fc)||_0x1fb318[_0x131604(0x1c9)]===_0x131604(0x1ce)){writeFileSync(_0x4a6fc1,JSON[_0x131604(0x1d3)](_0x42ba80,null,0x2)+'\x0a',{'encoding':_0x131604(0x1e7)});try{unlinkSync(_0x5f2bc6);}catch{}}else throw _0x1fb318;}}catch(_0x1effde){try{unlinkSync(_0x5f2bc6);}catch{}throw _0x1effde;}}export function isNonInteractiveMode(_0x214ce0){const _0x4b87e9=a64_0x134bfe;return!!(_0x214ce0['nonInteractive']||_0x214ce0['ci']||productEnvNames('CI')[_0x4b87e9(0x1ea)](_0x54876f=>process.env[_0x54876f]==='true')||process.env.CI==='true'||!process['stdout'][_0x4b87e9(0x1e8)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x586b77=a64_0x134bfe;if(!process['stdin'][_0x586b77(0x1e8)])return![];try{const _0x339ecc=process['stdin'][_0x586b77(0x1dd)];return process[_0x586b77(0x1d0)][_0x586b77(0x210)](!![]),process[_0x586b77(0x1d0)][_0x586b77(0x210)](_0x339ecc??![]),!![];}catch{return![];}}export async function createContext(_0x2e6a09){const _0x3bf38a=a64_0x134bfe,_0x23da54=readRawConfig(),_0x2be228=buildConfig(_0x23da54,_0x2e6a09);await initGlobalEnvironment(_0x2be228);const {getUserDomain:_0x3afaaf,getApiDomain:_0x3526b7}=await import(_0x3bf38a(0x1fe)),_0x4d22a5={'apiDomain':_0x3526b7(),'userDomain':_0x3afaaf()},_0x4d300f=await buildAuth(_0x2be228);logger[_0x3bf38a(0x1e0)](process[_0x3bf38a(0x1cc)]());const _0x1fac15=(CLI_BIN_NAME+'\x20'+process[_0x3bf38a(0x204)][_0x3bf38a(0x1ff)](0x2)['join']('\x20'))[_0x3bf38a(0x201)]();logger[_0x3bf38a(0x1f1)](_0x1fac15);const _0x10bcc5=isNonInteractiveMode(_0x2e6a09);return{'config':_0x2be228,'auth':_0x4d300f,'logger':logger,'env':_0x4d22a5,'nonInteractive':_0x10bcc5};}export function buildConfigFromFlags(_0x5020dd){return buildConfig(readRawConfig(),_0x5020dd);}export function getLocalAppAliases(_0x143e3a){const _0x97c49=a64_0x134bfe;return _0x143e3a[_0x97c49(0x1d4)]&&typeof _0x143e3a[_0x97c49(0x1d4)]===_0x97c49(0x1f8)?_0x143e3a[_0x97c49(0x1d4)]:{};}export function resolveLocalAppAliasCode(_0x23268f,_0x2bcad6){const _0x175042=a64_0x134bfe;if(!_0x2bcad6)return undefined;const _0x49b219=getLocalAppAliases(_0x23268f)[_0x2bcad6],_0x3c772d=_0x49b219?.[_0x175042(0x1d1)];return typeof _0x3c772d==='string'&&_0x3c772d[_0x175042(0x201)]()?_0x3c772d[_0x175042(0x201)]():undefined;}function a64_0x25de(){const _0x49f52a=['globalConfig','setLogPath','3vBykMU','skillHubDomain','online','runtimeDomain','185773ZKYSTr','raw','utf8','isTTY','daily','some','find','7256bzMdaF','top-level','read','local-alias','host','setRawCommand','VERBOSE','projectConfig','PAGE_SIZE','5161356bWUcwA','EPERM','512479OoNCMo','object','env','ENV','360ZZcdkP','EXDEV','cache','./constant/domain.js','slice','authRequired','trim','write','app','argv','project','10HJbZXP','production','riskLevel','high-risk-write','accessKey','userDomain','pageSize','message','empty','defaultApp','setRawMode','true','global','apiDomain','format','inherit','missing','APPCODE','code','newConfigFileName','6405939jWFiMZ','cwd','development','EACCES','./constant/env.js','stdin','appcode','configFileNames','stringify','apps','3409KUlPaw','205nHQojr','59884nWNUpg','parse','.tmp','values','2032330mEEMjg','string','isRaw','locale'];a64_0x25de=function(){return _0x49f52a;};return a64_0x25de();}export function readAppCodeFromConfig(){const _0x3005ae=a64_0x134bfe,_0x5126d0=readRawConfig(),_0x5326fc=_0x5126d0[_0x3005ae(0x1d1)]??_0x5126d0[_0x3005ae(0x203)];if(typeof _0x5326fc===_0x3005ae(0x1dc)&&_0x5326fc['trim']())return _0x5326fc['trim']();const _0x3c32ab=resolveLocalAppAliasCode(_0x5126d0,typeof _0x5126d0[_0x3005ae(0x20f)]===_0x3005ae(0x1dc)?_0x5126d0['defaultApp']:undefined);if(_0x3c32ab)return _0x3c32ab;const _0x3e4ce7=normalizeEnv(String(_0x5126d0[_0x3005ae(0x1f9)]||_0x3005ae(0x207))),_0x274952=isDaily(_0x3e4ce7)?_0x3005ae(0x1e9):isDev(_0x3e4ce7)?'development':_0x3005ae(0x207),_0x2938ca=resolveCachedAppCode(typeof _0x5126d0['defaultApp']===_0x3005ae(0x1dc)?_0x5126d0[_0x3005ae(0x20f)]:undefined,_0x274952,typeof _0x5126d0[_0x3005ae(0x20a)]===_0x3005ae(0x1dc)?_0x5126d0[_0x3005ae(0x20a)]:undefined);if(_0x2938ca)return _0x2938ca;const _0x33af18=Object[_0x3005ae(0x1da)](getLocalAppAliases(_0x5126d0))[_0x3005ae(0x1eb)](_0x17b424=>_0x17b424?.[_0x3005ae(0x1d1)]);return typeof _0x33af18?.[_0x3005ae(0x1d1)]===_0x3005ae(0x1dc)&&_0x33af18[_0x3005ae(0x1d1)]['trim']()?_0x33af18[_0x3005ae(0x1d1)][_0x3005ae(0x201)]():undefined;}export function readScopedConfig(_0x267fdb){const _0x4d2d6a=a64_0x134bfe,_0x1bf91f=_0x267fdb[_0x4d2d6a(0x212)]?_0x4d2d6a(0x212):_0x4d2d6a(0x205);return readConfigFile(resolveWriteConfigPath(_0x1bf91f));}export function writeScopedConfig(_0x1c76d5,_0x4ebeaa){const _0x136955=a64_0x134bfe,_0xf1d083=_0x4ebeaa[_0x136955(0x212)]?'global':_0x136955(0x205);writeConfigFile(resolveWriteConfigPath(_0xf1d083),_0x1c76d5);}export async function initGlobalEnvironment(_0xe2486){const _0x55b6a4=a64_0x134bfe,{initEnv:_0x575bf7}=await import(_0x55b6a4(0x1cf));_0x575bf7(_0xe2486['env']);const {initDomains:_0x4ac16f}=await import(_0x55b6a4(0x1fe));_0x4ac16f({'apiDomain':_0xe2486[_0x55b6a4(0x1e6)][_0x55b6a4(0x213)]||_0xe2486[_0x55b6a4(0x1e6)][_0x55b6a4(0x1f0)]||undefined,'userDomain':_0xe2486['raw'][_0x55b6a4(0x20b)]||undefined,'runtimeDomain':_0xe2486[_0x55b6a4(0x1e6)][_0x55b6a4(0x1e4)]||undefined,'skillHubDomain':_0xe2486['raw'][_0x55b6a4(0x1e2)]||undefined});}export function getProjectConfigPath(){const _0x2bc1a1=a64_0x134bfe;return resolveConfigPath(process[_0x2bc1a1(0x1cc)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x252253){const _0x1dbcd3=a64_0x134bfe;if(!existsSync(_0x252253))return{'status':_0x1dbcd3(0x1c7)};try{const _0x36ef4a=readFileSync(_0x252253,{'encoding':_0x1dbcd3(0x1e7)});if(!_0x36ef4a?.[_0x1dbcd3(0x201)]())return{'status':_0x1dbcd3(0x20e)};const _0x4cfeae=JSON[_0x1dbcd3(0x1d8)](_0x36ef4a);return{'status':'ok','data':_0x4cfeae};}catch(_0x1b13ec){return{'status':'error','message':_0x1b13ec instanceof Error?_0x1b13ec[_0x1dbcd3(0x20d)]:String(_0x1b13ec)};}}export function loadRawConfigLayers(_0x2314f7){const _0xf743ba=a64_0x134bfe;let _0x18a894={},_0x14a908={},_0x4d89be,_0x5e8b03;try{_0x4d89be=resolveConfigPath(homedir());if(_0x4d89be){const _0x41c997=readFileSync(_0x4d89be,{'encoding':_0xf743ba(0x1e7)});if(_0x41c997)_0x18a894=JSON[_0xf743ba(0x1d8)](_0x41c997);}}catch{}try{const _0x47d3cc=_0x2314f7||process[_0xf743ba(0x1cc)]();_0x5e8b03=resolveConfigPath(_0x47d3cc);if(_0x5e8b03){const _0x3e103a=readFileSync(_0x5e8b03,{'encoding':_0xf743ba(0x1e7)});if(_0x3e103a)_0x14a908=JSON['parse'](_0x3e103a);}}catch{}return{'globalPath':_0x4d89be,'projectPath':_0x5e8b03,'globalConfig':_0x18a894,'projectConfig':_0x14a908};}function mergeRawConfigLayers(_0x51aa80){const _0x32983e=a64_0x134bfe,{globalConfig:_0x26767d,projectConfig:_0xecc879}=_0x51aa80;if(_0xecc879[_0x32983e(0x215)]===![]){const _0x39835c={..._0xecc879};return delete _0x39835c['inherit'],_0x39835c;}const _0x1e8dd9={..._0x26767d,..._0xecc879};if(_0x32983e(0x20f)in _0xecc879)_0x1e8dd9[_0x32983e(0x20f)]=_0xecc879[_0x32983e(0x20f)];else _0x26767d['defaultApp']&&(_0x1e8dd9[_0x32983e(0x20f)]=_0x26767d[_0x32983e(0x20f)]);return _0x1e8dd9;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x2dc4ba){return mergeRawConfigLayers(loadRawConfigLayers(_0x2dc4ba));}export function readRawConfigWithLayers(_0x2c8092){const _0x97d772=loadRawConfigLayers(_0x2c8092);return{'config':mergeRawConfigLayers(_0x97d772),'layers':_0x97d772};}export function resolveDefaultAppSource(_0x392b35){const _0x2af65d=a64_0x134bfe;if(_0x2af65d(0x20f)in _0x392b35[_0x2af65d(0x1f3)])return _0x2af65d(0x205);if(_0x392b35[_0x2af65d(0x1f3)][_0x2af65d(0x215)]===![])return null;if(_0x392b35[_0x2af65d(0x1df)][_0x2af65d(0x20f)])return _0x2af65d(0x212);return null;}function buildConfig(_0xaea59b,_0x51fe15){const _0xd9c07b=a64_0x134bfe,_0x46d04a=_0xaea59b[_0xd9c07b(0x20f)]||undefined,_0x1c56f6=_0x51fe15[_0xd9c07b(0x203)]||env('APP')||undefined,_0x27e037=_0x1c56f6||_0x46d04a||undefined,_0x4cdd94=env('ACCESS_KEY')||_0xaea59b[_0xd9c07b(0x20a)]||undefined,_0x2b317e=_0x51fe15[_0xd9c07b(0x1f9)]||env(_0xd9c07b(0x1fa))||_0xaea59b[_0xd9c07b(0x1f9)]||DEFAULT_CONFIG_VALUES[_0xd9c07b(0x1f9)],_0x5794b9=normalizeEnv(String(_0x2b317e)),_0x42c3ab=isDaily(_0x5794b9)?_0xd9c07b(0x1e9):isDev(_0x5794b9)?_0xd9c07b(0x1cd):_0xd9c07b(0x207),_0xf901b7=resolveLocalAppAliasCode(_0xaea59b,_0x27e037),_0x2d928d=resolveCachedAppCode(_0x27e037,_0x42c3ab,_0x4cdd94),_0x11aaa5=typeof _0x51fe15[_0xd9c07b(0x1d1)]===_0xd9c07b(0x1dc)?_0x51fe15[_0xd9c07b(0x1d1)]:undefined,_0x49014d=env(_0xd9c07b(0x1c8)),_0x40fb28=_0x1c56f6?undefined:_0xaea59b[_0xd9c07b(0x1d1)]||_0xaea59b[_0xd9c07b(0x203)]||undefined,_0x36d481=_0x11aaa5||_0x49014d||_0xf901b7||_0x2d928d||_0x40fb28||undefined,_0x2e345a=_0x11aaa5?'explicit':_0x49014d?'env':_0xf901b7?_0xd9c07b(0x1ef):_0x2d928d?_0xd9c07b(0x1fd):_0x40fb28?_0xd9c07b(0x1ed):undefined,_0x551bd9=_0xaea59b['locale']||DEFAULT_CONFIG_VALUES[_0xd9c07b(0x1de)],_0x5b7a28=undefined,_0x329224=_0x51fe15[_0xd9c07b(0x214)]||env('FORMAT')||_0xaea59b['format'],_0x129bc5=normalizeLegacyOutputFormat(_0x329224),_0x465895=env(_0xd9c07b(0x1f4))||_0xaea59b[_0xd9c07b(0x20c)],_0x42064d=_0x465895?Number(_0x465895)||undefined:undefined,_0xf0adbb=_0xaea59b[_0xd9c07b(0x208)]||_0xaea59b['maxRisk'],_0x5c2aa2=_0xf0adbb===_0xd9c07b(0x1ee)||_0xf0adbb===_0xd9c07b(0x202)||_0xf0adbb===_0xd9c07b(0x209)?_0xf0adbb:DEFAULT_CONFIG_VALUES[_0xd9c07b(0x208)],_0x1078cf=env(_0xd9c07b(0x1f2)),_0x34a21e=_0x1078cf==='1'||_0x1078cf===_0xd9c07b(0x211);return{'appCode':typeof _0x36d481===_0xd9c07b(0x1dc)&&_0x36d481['trim']()?_0x36d481[_0xd9c07b(0x201)]():undefined,'appCodeSource':_0x2e345a,'env':_0x42c3ab,'locale':_0x551bd9,'cookie':_0x5b7a28,'accessKey':_0x4cdd94,'format':_0x129bc5,'pageSize':_0x42064d,'riskLevel':_0x5c2aa2,'verbose':_0x34a21e,'defaultApp':_0x46d04a,'currentApp':typeof _0x27e037==='string'?_0x27e037:undefined,'raw':_0xaea59b};}function env(_0x27d9b7){return productEnv(_0x27d9b7);}function a64_0x2380(_0x15253a,_0x587308){_0x15253a=_0x15253a-0x1c7;const _0x25dec9=a64_0x25de();let _0x238076=_0x25dec9[_0x15253a];return _0x238076;}async function buildAuth(_0x45bc2f){const _0x2015ca=a64_0x134bfe,_0x5950b7='',_0x1517f2=!!_0x45bc2f[_0x2015ca(0x20a)];return{'cookie':_0x5950b7,'isLoggedIn':_0x1517f2,async 'getOrLogin'(){const _0x2ff1bc=_0x2015ca;if(_0x1517f2)return _0x5950b7;throw CliErrors[_0x2ff1bc(0x200)]();}};}
|
|
1
|
+
const a64_0x26ce9a=a64_0xd050;(function(_0x35012c,_0x295499){const _0x383f39=a64_0xd050,_0x32e642=_0x35012c();while(!![]){try{const _0x34acfe=parseInt(_0x383f39(0xcd))/0x1*(parseInt(_0x383f39(0xce))/0x2)+-parseInt(_0x383f39(0xde))/0x3+-parseInt(_0x383f39(0xe3))/0x4+-parseInt(_0x383f39(0xee))/0x5*(parseInt(_0x383f39(0xf5))/0x6)+-parseInt(_0x383f39(0xdf))/0x7+parseInt(_0x383f39(0x101))/0x8+parseInt(_0x383f39(0xca))/0x9;if(_0x34acfe===_0x295499)break;else _0x32e642['push'](_0x32e642['shift']());}catch(_0x34697d){_0x32e642['push'](_0x32e642['shift']());}}}(a64_0xcf37,0x868d2));function a64_0xcf37(){const _0x20f86a=['utf8','18cKtcIl','EPERM','global','authRequired','APP','userDomain','slice','accessKey','env','project','cache','projectConfig','2586952KUjJWU','newConfigFileName','./constant/env.js','object','FORMAT','find','inherit','raw','code','globalConfig','riskLevel','VERBOSE','configFileNames','14981985PGdoPt','nonInteractive','isRaw','1xhkXhx','404940huPNKH','join','parse','daily','apiDomain','locale','host','isTTY','write','string','appcode','high-risk-write','production','maxRisk','defaultApp','APPCODE','1387356ESjAIL','4480392bsYPHz','development','missing','cwd','1419792OHqYmv','setLogPath','.tmp','setRawMode','explicit','error','stringify','apps','online','trim','values','303210dIWitg','format','some','app','stdin','skillHubDomain'];a64_0xcf37=function(){return _0x20f86a;};return a64_0xcf37();}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[a64_0x26ce9a(0x10d)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a64_0x26ce9a(0x102)];function resolveConfigPath(_0x2e897d){for(const _0x4303f1 of CONFIG_NAMES){const _0x3346a5=resolve(_0x2e897d,_0x4303f1);if(existsSync(_0x3346a5))return _0x3346a5;}return undefined;}export function resolveWriteConfigPath(_0x47aad3){const _0x6ec644=a64_0x26ce9a,_0x4a6136=_0x47aad3===_0x6ec644(0xfe)?process[_0x6ec644(0xe2)]():homedir(),_0x5a6af0=resolveConfigPath(_0x4a6136);return _0x5a6af0??resolve(_0x4a6136,NEW_CONFIG_NAME);}export function readConfigFile(_0x512420){const _0x5dc17b=a64_0x26ce9a;try{if(existsSync(_0x512420)){const _0x5e5e45=readFileSync(_0x512420,{'encoding':_0x5dc17b(0xf4)});if(_0x5e5e45){const _0x4eb2c5=JSON[_0x5dc17b(0xd0)](_0x5e5e45);return migrateOnlineEnv(_0x512420,_0x4eb2c5),_0x4eb2c5;}}}catch{}return{};}function migrateOnlineEnv(_0x19d5e2,_0xd80897){const _0x3f5a7d=a64_0x26ce9a;let _0x56646b=![];_0xd80897[_0x3f5a7d(0xfd)]===_0x3f5a7d(0xeb)&&(_0xd80897['env']='production',_0x56646b=!![]);if(_0xd80897[_0x3f5a7d(0xea)]&&typeof _0xd80897[_0x3f5a7d(0xea)]==='object')for(const _0x319610 of Object[_0x3f5a7d(0xed)](_0xd80897[_0x3f5a7d(0xea)])){_0x319610&&_0x319610['env']==='online'&&(_0x319610[_0x3f5a7d(0xfd)]=_0x3f5a7d(0xda),_0x56646b=!![]);}if(_0x56646b)try{writeConfigFile(_0x19d5e2,_0xd80897);}catch{}}export function writeConfigFile(_0x2398e2,_0x264b11){const _0x933d6a=a64_0x26ce9a,_0x194f59=dirname(_0x2398e2);!existsSync(_0x194f59)&&mkdirSync(_0x194f59,{'recursive':!![]});const _0x31c915=_0x2398e2+_0x933d6a(0xe5);try{writeFileSync(_0x31c915,JSON[_0x933d6a(0xe9)](_0x264b11,null,0x2)+'\x0a',{'encoding':_0x933d6a(0xf4),'mode':0x180});try{renameSync(_0x31c915,_0x2398e2);}catch(_0x185a86){if(_0x185a86[_0x933d6a(0x109)]===_0x933d6a(0xf6)||_0x185a86['code']==='EXDEV'||_0x185a86[_0x933d6a(0x109)]==='EACCES'){writeFileSync(_0x2398e2,JSON['stringify'](_0x264b11,null,0x2)+'\x0a',{'encoding':_0x933d6a(0xf4)});try{unlinkSync(_0x31c915);}catch{}}else throw _0x185a86;}}catch(_0x4aaf06){try{unlinkSync(_0x31c915);}catch{}throw _0x4aaf06;}}export function isNonInteractiveMode(_0x3a339e){const _0x9979c2=a64_0x26ce9a;return!!(_0x3a339e[_0x9979c2(0xcb)]||_0x3a339e['ci']||productEnvNames('CI')[_0x9979c2(0xf0)](_0x59d7a4=>process.env[_0x59d7a4]==='true')||process.env.CI==='true'||!process['stdout']['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x1a95d1=a64_0x26ce9a;if(!process[_0x1a95d1(0xf2)][_0x1a95d1(0xd5)])return![];try{const _0x19a9a5=process[_0x1a95d1(0xf2)][_0x1a95d1(0xcc)];return process[_0x1a95d1(0xf2)]['setRawMode'](!![]),process[_0x1a95d1(0xf2)][_0x1a95d1(0xe6)](_0x19a9a5??![]),!![];}catch{return![];}}function a64_0xd050(_0x3f919b,_0x5a3175){_0x3f919b=_0x3f919b-0xca;const _0xcf37e5=a64_0xcf37();let _0xd0508a=_0xcf37e5[_0x3f919b];return _0xd0508a;}export async function createContext(_0x3ed049){const _0x2efc66=a64_0x26ce9a,_0x3f5b91=readRawConfig(),_0x2c4148=buildConfig(_0x3f5b91,_0x3ed049);await initGlobalEnvironment(_0x2c4148);const {getUserDomain:_0x23ddcc,getApiDomain:_0x38fa31}=await import('./constant/domain.js'),_0x5c7a92={'apiDomain':_0x38fa31(),'userDomain':_0x23ddcc()},_0x5d281d=await buildAuth(_0x2c4148);logger[_0x2efc66(0xe4)](process['cwd']());const _0x30cf76=(CLI_BIN_NAME+'\x20'+process['argv'][_0x2efc66(0xfb)](0x2)[_0x2efc66(0xcf)]('\x20'))[_0x2efc66(0xec)]();logger['setRawCommand'](_0x30cf76);const _0xb9195b=isNonInteractiveMode(_0x3ed049);return{'config':_0x2c4148,'auth':_0x5d281d,'logger':logger,'env':_0x5c7a92,'nonInteractive':_0xb9195b};}export function buildConfigFromFlags(_0x3820fe){return buildConfig(readRawConfig(),_0x3820fe);}export function getLocalAppAliases(_0x271fbd){const _0x458b26=a64_0x26ce9a;return _0x271fbd[_0x458b26(0xea)]&&typeof _0x271fbd[_0x458b26(0xea)]===_0x458b26(0x104)?_0x271fbd['apps']:{};}export function resolveLocalAppAliasCode(_0x2649c3,_0x4dcdd0){const _0x392365=a64_0x26ce9a;if(!_0x4dcdd0)return undefined;const _0x3af41e=getLocalAppAliases(_0x2649c3)[_0x4dcdd0],_0x386c2c=_0x3af41e?.[_0x392365(0xd8)];return typeof _0x386c2c===_0x392365(0xd7)&&_0x386c2c['trim']()?_0x386c2c['trim']():undefined;}export function readAppCodeFromConfig(){const _0xbe19be=a64_0x26ce9a,_0x4df65e=readRawConfig(),_0x326f3f=_0x4df65e[_0xbe19be(0xd8)]??_0x4df65e[_0xbe19be(0xf1)];if(typeof _0x326f3f===_0xbe19be(0xd7)&&_0x326f3f[_0xbe19be(0xec)]())return _0x326f3f[_0xbe19be(0xec)]();const _0x1d05df=resolveLocalAppAliasCode(_0x4df65e,typeof _0x4df65e[_0xbe19be(0xdc)]===_0xbe19be(0xd7)?_0x4df65e['defaultApp']:undefined);if(_0x1d05df)return _0x1d05df;const _0x36c816=normalizeEnv(String(_0x4df65e['env']||_0xbe19be(0xda))),_0x57ccbf=isDaily(_0x36c816)?_0xbe19be(0xd1):isDev(_0x36c816)?'development':'production',_0x120167=resolveCachedAppCode(typeof _0x4df65e['defaultApp']===_0xbe19be(0xd7)?_0x4df65e[_0xbe19be(0xdc)]:undefined,_0x57ccbf,typeof _0x4df65e[_0xbe19be(0xfc)]===_0xbe19be(0xd7)?_0x4df65e['accessKey']:undefined);if(_0x120167)return _0x120167;const _0x574229=Object[_0xbe19be(0xed)](getLocalAppAliases(_0x4df65e))[_0xbe19be(0x106)](_0x3c3457=>_0x3c3457?.[_0xbe19be(0xd8)]);return typeof _0x574229?.[_0xbe19be(0xd8)]==='string'&&_0x574229[_0xbe19be(0xd8)][_0xbe19be(0xec)]()?_0x574229[_0xbe19be(0xd8)][_0xbe19be(0xec)]():undefined;}export function readScopedConfig(_0x52fb07){const _0x4c7896=a64_0x26ce9a,_0x12f962=_0x52fb07[_0x4c7896(0xf7)]?_0x4c7896(0xf7):'project';return readConfigFile(resolveWriteConfigPath(_0x12f962));}export function writeScopedConfig(_0x4493f8,_0x477d45){const _0x2f917d=_0x477d45['global']?'global':'project';writeConfigFile(resolveWriteConfigPath(_0x2f917d),_0x4493f8);}export async function initGlobalEnvironment(_0x14bcb9){const _0x13c59f=a64_0x26ce9a,{initEnv:_0x10a7ca}=await import(_0x13c59f(0x103));_0x10a7ca(_0x14bcb9[_0x13c59f(0xfd)]);const {initDomains:_0x2718d3}=await import('./constant/domain.js');_0x2718d3({'apiDomain':_0x14bcb9[_0x13c59f(0x108)][_0x13c59f(0xd2)]||_0x14bcb9[_0x13c59f(0x108)][_0x13c59f(0xd4)]||undefined,'userDomain':_0x14bcb9[_0x13c59f(0x108)][_0x13c59f(0xfa)]||undefined,'runtimeDomain':_0x14bcb9[_0x13c59f(0x108)]['runtimeDomain']||undefined,'skillHubDomain':_0x14bcb9[_0x13c59f(0x108)][_0x13c59f(0xf3)]||undefined});}export function getProjectConfigPath(){const _0x61083f=a64_0x26ce9a;return resolveConfigPath(process[_0x61083f(0xe2)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x4f2aa4){const _0x407282=a64_0x26ce9a;if(!existsSync(_0x4f2aa4))return{'status':_0x407282(0xe1)};try{const _0x4bc8ea=readFileSync(_0x4f2aa4,{'encoding':'utf8'});if(!_0x4bc8ea?.['trim']())return{'status':'empty'};const _0x45dec9=JSON[_0x407282(0xd0)](_0x4bc8ea);return{'status':'ok','data':_0x45dec9};}catch(_0x12f7bc){return{'status':_0x407282(0xe8),'message':_0x12f7bc instanceof Error?_0x12f7bc['message']:String(_0x12f7bc)};}}export function loadRawConfigLayers(_0x363300){const _0x430017=a64_0x26ce9a;let _0x33a1b5={},_0x44077a={},_0x58f286,_0x47b2da;try{_0x58f286=resolveConfigPath(homedir());if(_0x58f286){const _0x549408=readFileSync(_0x58f286,{'encoding':_0x430017(0xf4)});if(_0x549408)_0x33a1b5=JSON[_0x430017(0xd0)](_0x549408);}}catch{}try{const _0x4038f0=_0x363300||process[_0x430017(0xe2)]();_0x47b2da=resolveConfigPath(_0x4038f0);if(_0x47b2da){const _0x15447b=readFileSync(_0x47b2da,{'encoding':_0x430017(0xf4)});if(_0x15447b)_0x44077a=JSON[_0x430017(0xd0)](_0x15447b);}}catch{}return{'globalPath':_0x58f286,'projectPath':_0x47b2da,'globalConfig':_0x33a1b5,'projectConfig':_0x44077a};}function mergeRawConfigLayers(_0x5c0858){const _0x69c47c=a64_0x26ce9a,{globalConfig:_0x3b4938,projectConfig:_0x317e95}=_0x5c0858;if(_0x317e95['inherit']===![]){const _0x4e36aa={..._0x317e95};return delete _0x4e36aa[_0x69c47c(0x107)],_0x4e36aa;}const _0x3b9b16={..._0x3b4938,..._0x317e95};if(_0x69c47c(0xdc)in _0x317e95)_0x3b9b16[_0x69c47c(0xdc)]=_0x317e95[_0x69c47c(0xdc)];else _0x3b4938[_0x69c47c(0xdc)]&&(_0x3b9b16[_0x69c47c(0xdc)]=_0x3b4938[_0x69c47c(0xdc)]);return _0x3b9b16;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x4e0b8e){return mergeRawConfigLayers(loadRawConfigLayers(_0x4e0b8e));}export function readRawConfigWithLayers(_0x209395){const _0x414193=loadRawConfigLayers(_0x209395);return{'config':mergeRawConfigLayers(_0x414193),'layers':_0x414193};}export function resolveDefaultAppSource(_0x160d5c){const _0x48467a=a64_0x26ce9a;if(_0x48467a(0xdc)in _0x160d5c[_0x48467a(0x100)])return'project';if(_0x160d5c[_0x48467a(0x100)][_0x48467a(0x107)]===![])return null;if(_0x160d5c[_0x48467a(0x10a)][_0x48467a(0xdc)])return _0x48467a(0xf7);return null;}function buildConfig(_0x42e9c9,_0x3fcfa4){const _0x174d79=a64_0x26ce9a,_0x1b541b=_0x42e9c9[_0x174d79(0xdc)]||undefined,_0x36ea24=_0x3fcfa4['app']||env(_0x174d79(0xf9))||undefined,_0x50a5bf=_0x36ea24||_0x1b541b||undefined,_0x29cb61=env('ACCESS_KEY')||_0x42e9c9[_0x174d79(0xfc)]||undefined,_0x4a95c1=_0x3fcfa4[_0x174d79(0xfd)]||env('ENV')||_0x42e9c9[_0x174d79(0xfd)]||DEFAULT_CONFIG_VALUES[_0x174d79(0xfd)],_0x460dc3=normalizeEnv(String(_0x4a95c1)),_0x28cb49=isDaily(_0x460dc3)?_0x174d79(0xd1):isDev(_0x460dc3)?_0x174d79(0xe0):_0x174d79(0xda),_0x48a74a=resolveLocalAppAliasCode(_0x42e9c9,_0x50a5bf),_0x259485=resolveCachedAppCode(_0x50a5bf,_0x28cb49,_0x29cb61),_0x5a57a5=typeof _0x3fcfa4[_0x174d79(0xd8)]===_0x174d79(0xd7)?_0x3fcfa4[_0x174d79(0xd8)]:undefined,_0xdd4966=env(_0x174d79(0xdd)),_0x2052aa=_0x36ea24?undefined:_0x42e9c9[_0x174d79(0xd8)]||_0x42e9c9[_0x174d79(0xf1)]||undefined,_0x460861=_0x5a57a5||_0xdd4966||_0x48a74a||_0x259485||_0x2052aa||undefined,_0xdc0b5f=_0x5a57a5?_0x174d79(0xe7):_0xdd4966?_0x174d79(0xfd):_0x48a74a?'local-alias':_0x259485?_0x174d79(0xff):_0x2052aa?'top-level':undefined,_0x17d1fd=_0x42e9c9[_0x174d79(0xd3)]||DEFAULT_CONFIG_VALUES[_0x174d79(0xd3)],_0x316395=undefined,_0x248340=_0x3fcfa4[_0x174d79(0xef)]||env(_0x174d79(0x105))||_0x42e9c9[_0x174d79(0xef)],_0x1c8657=normalizeLegacyOutputFormat(_0x248340),_0x627df6=env('PAGE_SIZE')||_0x42e9c9['pageSize'],_0x5d17b2=_0x627df6?Number(_0x627df6)||undefined:undefined,_0x50ffa7=_0x42e9c9[_0x174d79(0x10b)]||_0x42e9c9[_0x174d79(0xdb)],_0x3af269=_0x50ffa7==='read'||_0x50ffa7===_0x174d79(0xd6)||_0x50ffa7===_0x174d79(0xd9)?_0x50ffa7:DEFAULT_CONFIG_VALUES['riskLevel'],_0x995cc4=env(_0x174d79(0x10c)),_0x5d5edc=_0x995cc4==='1'||_0x995cc4==='true';return{'appCode':typeof _0x460861===_0x174d79(0xd7)&&_0x460861[_0x174d79(0xec)]()?_0x460861[_0x174d79(0xec)]():undefined,'appCodeSource':_0xdc0b5f,'env':_0x28cb49,'locale':_0x17d1fd,'cookie':_0x316395,'accessKey':_0x29cb61,'format':_0x1c8657,'pageSize':_0x5d17b2,'riskLevel':_0x3af269,'verbose':_0x5d5edc,'defaultApp':_0x1b541b,'currentApp':typeof _0x50a5bf===_0x174d79(0xd7)?_0x50a5bf:undefined,'raw':_0x42e9c9};}function env(_0x4f7ed5){return productEnv(_0x4f7ed5);}async function buildAuth(_0x5caef5){const _0x2e2c39=a64_0x26ce9a,_0x15c4a5='',_0x37542d=!!_0x5caef5[_0x2e2c39(0xfc)];return{'cookie':_0x15c4a5,'isLoggedIn':_0x37542d,async 'getOrLogin'(){const _0x561ce9=_0x2e2c39;if(_0x37542d)return _0x15c4a5;throw CliErrors[_0x561ce9(0xf8)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1b7495,_0x2c98b6){const _0x4a23d1=a65_0x236b,_0x38dbb5=_0x1b7495();while(!![]){try{const _0x5de3fe=parseInt(_0x4a23d1(0x177))/0x1*(parseInt(_0x4a23d1(0x161))/0x2)+parseInt(_0x4a23d1(0x1b6))/0x3+parseInt(_0x4a23d1(0x18c))/0x4+-parseInt(_0x4a23d1(0x1aa))/0x5*(parseInt(_0x4a23d1(0x1a8))/0x6)+parseInt(_0x4a23d1(0x185))/0x7*(parseInt(_0x4a23d1(0x1c4))/0x8)+parseInt(_0x4a23d1(0x1c0))/0x9*(parseInt(_0x4a23d1(0x1ce))/0xa)+-parseInt(_0x4a23d1(0x1be))/0xb;if(_0x5de3fe===_0x2c98b6)break;else _0x38dbb5['push'](_0x38dbb5['shift']());}catch(_0x5ec26f){_0x38dbb5['push'](_0x38dbb5['shift']());}}}(a65_0x4ce4,0x6e7ea));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(_0x55a2fb){_activeAK=_0x55a2fb||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x3c1f32,_0x1b66e7={}){const _0x418328=a65_0x236b,{method:method=_0x418328(0x16a),body:_0x108b7e,headers:headers={},timeout:timeout=0x7530}=_0x1b66e7,_0x2f537f=_activeAK,_0x4a220a=getRuntimeDomain();if(!_0x2f537f)throw CliErrors[_0x418328(0x196)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x418328(0x1a4)]+'.');const _0x4e1ec9=''+_0x4a220a+_0x3c1f32,_0x577271={'X-User-AK':_0x2f537f},_0x38d36c=new AbortController(),_0x845947=setTimeout(()=>_0x38d36c['abort'](),timeout);try{const _0x3fb1e1=await fetch(_0x4e1ec9,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x577271,...headers},'body':_0x108b7e?JSON['stringify'](_0x108b7e):undefined,'signal':_0x38d36c['signal']});let _0x199a36;try{_0x199a36=await _0x3fb1e1['json']();}catch{throw CliErrors[_0x418328(0x18b)](_0x418328(0x19f)+_0x3fb1e1[_0x418328(0x1cc)]+')',_0x3fb1e1[_0x418328(0x1cc)]>=0x190?_0x418328(0x1c5):undefined);}if(!_0x3fb1e1['ok']||_0x199a36[_0x418328(0x1d2)]===![])throw CliErrors['apiError'](_0x199a36[_0x418328(0x168)]||_0x199a36[_0x418328(0x1d4)]||_0x418328(0x190)+_0x3fb1e1[_0x418328(0x1cc)],_0x199a36['errorCode']?_0x418328(0x198)+_0x199a36['errorCode']:undefined);return _0x199a36;}catch(_0x2576b1){if(_0x2576b1 instanceof Error&&_0x2576b1[_0x418328(0x172)]===_0x418328(0x193))throw CliErrors['apiError'](_0x418328(0x1c8)+_0x4e1ec9);throw _0x2576b1;}finally{clearTimeout(_0x845947);}}async function apiBinaryRequest(_0x56f56a,_0x473374={}){const _0x23b751=a65_0x236b,{method:method=_0x23b751(0x16a),headers:headers={},timeout:timeout=0x7530}=_0x473374,_0x807c99=_activeAK,_0x2594e5=getRuntimeDomain();if(!_0x807c99)throw CliErrors['authRequired'](_0x23b751(0x19e)+PRODUCT_CONFIG[_0x23b751(0x1a4)]+'.');const _0x1e8d2e=''+_0x2594e5+_0x56f56a,_0x4c114d=new AbortController(),_0x5200fe=setTimeout(()=>_0x4c114d[_0x23b751(0x1cd)](),timeout);try{const _0x7f33d2=await fetch(_0x1e8d2e,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x23b751(0x1b3)],'X-User-AK':_0x807c99,...headers},'signal':_0x4c114d[_0x23b751(0x173)]});if(!_0x7f33d2['ok']){let _0x377819;try{const _0x5d11f4=await _0x7f33d2[_0x23b751(0x15b)]();_0x377819=_0x5d11f4['errorMsg']||_0x5d11f4[_0x23b751(0x1d4)]||_0x5d11f4[_0x23b751(0x175)];}catch{_0x377819=await _0x7f33d2['text']()['catch'](()=>undefined);}throw CliErrors[_0x23b751(0x18b)](_0x377819||'API\x20error:\x20'+_0x7f33d2['status'],_0x23b751(0x165)+_0x1e8d2e);}return Buffer[_0x23b751(0x17d)](await _0x7f33d2[_0x23b751(0x17b)]());}catch(_0x2d5da0){if(_0x2d5da0 instanceof Error&&_0x2d5da0[_0x23b751(0x172)]===_0x23b751(0x193))throw CliErrors[_0x23b751(0x18b)](_0x23b751(0x1c8)+_0x1e8d2e);throw _0x2d5da0;}finally{clearTimeout(_0x5200fe);}}async function toolboxRequest(_0x397e43,_0x4bdc5f,_0x5c2fa1={}){const _0x2eec76=a65_0x236b,{method:method=_0x2eec76(0x16a),headers:headers={},timeout:timeout=0x7530}=_0x5c2fa1,_0x2e7994=_activeAK;if(!_0x2e7994)throw CliErrors[_0x2eec76(0x196)](_0x2eec76(0x19e)+PRODUCT_CONFIG[_0x2eec76(0x1a4)]+'.');const _0x27580e=getApiDomain()[_0x2eec76(0x188)](/\/$/,''),_0x3348b6=new URL(_0x397e43,_0x27580e+_0x2eec76(0x1a1));if(_0x4bdc5f)for(const [_0x36935f,_0x113e0f]of Object['entries'](_0x4bdc5f)){_0x113e0f!==undefined&&_0x113e0f!==null&&_0x3348b6[_0x2eec76(0x1c6)]['set'](_0x36935f,String(_0x113e0f));}const _0x167619=new AbortController(),_0x39c1e6=setTimeout(()=>_0x167619['abort'](),timeout);try{const _0x5f31c4=await fetch(_0x3348b6,{'method':method,'headers':{'Content-Type':_0x2eec76(0x166),'X-Invoke-Source':PRODUCT_CONFIG[_0x2eec76(0x1b3)],'X-User-AK':_0x2e7994,...headers},'signal':_0x167619[_0x2eec76(0x173)]});let _0x4d5998;try{_0x4d5998=await _0x5f31c4['json']();}catch{throw CliErrors[_0x2eec76(0x18b)](_0x2eec76(0x160)+_0x5f31c4[_0x2eec76(0x1cc)]+')',_0x5f31c4[_0x2eec76(0x1cc)]>=0x190?_0x2eec76(0x1c5):undefined);}if(!_0x5f31c4['ok']){const _0x19ebbc=_0x4d5998&&typeof _0x4d5998===_0x2eec76(0x1cb)?_0x4d5998:{};throw CliErrors['apiError'](_0x19ebbc[_0x2eec76(0x168)]||_0x19ebbc[_0x2eec76(0x1d4)]||_0x2eec76(0x1b9)+_0x5f31c4[_0x2eec76(0x1cc)],_0x19ebbc[_0x2eec76(0x175)]?_0x2eec76(0x1ca)+_0x19ebbc['errorCode']:undefined);}if(_0x4d5998&&typeof _0x4d5998==='object'&&_0x2eec76(0x1d2)in _0x4d5998&&typeof _0x4d5998['success']===_0x2eec76(0x176)){const _0x41c173=_0x4d5998;if(!_0x41c173[_0x2eec76(0x1d2)])throw CliErrors[_0x2eec76(0x18b)](_0x41c173[_0x2eec76(0x168)]||_0x41c173[_0x2eec76(0x1d4)]||_0x2eec76(0x180),_0x41c173[_0x2eec76(0x175)]?'Toolbox\x20error\x20code:\x20'+_0x41c173[_0x2eec76(0x175)]:undefined);return _0x41c173[_0x2eec76(0x16c)];}return _0x4d5998;}catch(_0x1498ee){if(_0x1498ee instanceof Error&&_0x1498ee[_0x2eec76(0x172)]===_0x2eec76(0x193))throw CliErrors[_0x2eec76(0x18b)](_0x2eec76(0x1c8)+_0x3348b6[_0x2eec76(0x187)]());throw _0x1498ee;}finally{clearTimeout(_0x39c1e6);}}async function skillHubJsonRequest(_0xa4fb2e,_0x3433aa={}){const _0xee6eb0=a65_0x236b,{method:method=_0xee6eb0(0x16a),query:_0x10acb9,body:_0x355ce2,headers:headers={},timeout:timeout=0x7530}=_0x3433aa,_0x82476c=_activeAK;if(!_0x82476c)throw CliErrors[_0xee6eb0(0x196)](_0xee6eb0(0x19e)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x4ee29a=getSkillHubDomain()[_0xee6eb0(0x188)](/\/$/,''),_0x128c65=new URL(_0xa4fb2e,_0x4ee29a+'/');if(_0x10acb9)for(const [_0x4eb204,_0xa90d2b]of Object[_0xee6eb0(0x1a2)](_0x10acb9)){_0xa90d2b!==undefined&&_0xa90d2b!==null&&_0x128c65[_0xee6eb0(0x1c6)]['set'](_0x4eb204,String(_0xa90d2b));}const _0x5a1889=new AbortController(),_0x26c7e4=setTimeout(()=>_0x5a1889['abort'](),timeout);try{const _0xff64cc=await fetch(_0x128c65['toString'](),{'method':method,'headers':{'Accept':_0xee6eb0(0x166),'X-Invoke-Source':PRODUCT_CONFIG[_0xee6eb0(0x1b3)],'X-User-AK':_0x82476c,...headers},'body':_0x355ce2,'signal':_0x5a1889[_0xee6eb0(0x173)]});let _0x20f13f;try{_0x20f13f=await _0xff64cc['json']();}catch{throw CliErrors['apiError'](_0xee6eb0(0x170)+_0xff64cc['status']+')',_0xff64cc[_0xee6eb0(0x1cc)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x3dc007=!_0xff64cc['ok']||_0x20f13f?.[_0xee6eb0(0x1d2)]===![]||typeof _0x20f13f?.['code']===_0xee6eb0(0x1bb)&&_0x20f13f[_0xee6eb0(0x17e)]>=0x190;if(_0x3dc007)throw CliErrors[_0xee6eb0(0x18b)](_0x20f13f?.[_0xee6eb0(0x168)]||_0x20f13f?.['message']||_0x20f13f?.[_0xee6eb0(0x171)]||_0xee6eb0(0x1ba)+_0xff64cc['status'],_0x20f13f?.[_0xee6eb0(0x175)]?'SkillHub\x20error\x20code:\x20'+_0x20f13f['errorCode']:undefined);return _0x20f13f?.[_0xee6eb0(0x16c)]??_0x20f13f;}catch(_0x321ed8){if(_0x321ed8 instanceof Error&&_0x321ed8[_0xee6eb0(0x172)]===_0xee6eb0(0x193))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x128c65[_0xee6eb0(0x187)]());throw _0x321ed8;}finally{clearTimeout(_0x26c7e4);}}async function skillHubBinaryRequest(_0x1d850a,_0x156faf={}){const _0x2299c5=a65_0x236b,{query:_0x2cfca9,headers:headers={},timeout:timeout=0x7530}=_0x156faf,_0x205f2e=_activeAK;if(!_0x205f2e)throw CliErrors[_0x2299c5(0x196)](_0x2299c5(0x19e)+PRODUCT_CONFIG[_0x2299c5(0x1a4)]+'.');const _0x5b797a=getSkillHubDomain()['replace'](/\/$/,''),_0x4611e1=new URL(_0x1d850a,_0x5b797a+'/');if(_0x2cfca9)for(const [_0x4b2f6a,_0x2e5e70]of Object[_0x2299c5(0x1a2)](_0x2cfca9)){_0x2e5e70!==undefined&&_0x2e5e70!==null&&_0x4611e1[_0x2299c5(0x1c6)][_0x2299c5(0x1bd)](_0x4b2f6a,String(_0x2e5e70));}const _0xf8e82f=new AbortController(),_0x2e3128=setTimeout(()=>_0xf8e82f[_0x2299c5(0x1cd)](),timeout);try{const _0x424391=await fetch(_0x4611e1[_0x2299c5(0x187)](),{'method':_0x2299c5(0x16a),'headers':{'Accept':_0x2299c5(0x1d3),'X-Invoke-Source':PRODUCT_CONFIG[_0x2299c5(0x1b3)],'X-User-AK':_0x205f2e,...headers},'signal':_0xf8e82f[_0x2299c5(0x173)]});if(!_0x424391['ok']){let _0x7acfac;try{const _0x2084b7=await _0x424391[_0x2299c5(0x15b)]();_0x7acfac=_0x2084b7[_0x2299c5(0x168)]||_0x2084b7[_0x2299c5(0x1d4)]||_0x2084b7['msg']||_0x2084b7['errorCode'];}catch{_0x7acfac=await _0x424391[_0x2299c5(0x18f)]()['catch'](()=>undefined);}throw CliErrors[_0x2299c5(0x18b)](_0x7acfac||_0x2299c5(0x1ba)+_0x424391[_0x2299c5(0x1cc)],_0x2299c5(0x165)+_0x4611e1[_0x2299c5(0x187)]());}return Buffer[_0x2299c5(0x17d)](await _0x424391[_0x2299c5(0x17b)]());}catch(_0x5db4f1){if(_0x5db4f1 instanceof Error&&_0x5db4f1[_0x2299c5(0x172)]===_0x2299c5(0x193))throw CliErrors[_0x2299c5(0x18b)](_0x2299c5(0x1c8)+_0x4611e1[_0x2299c5(0x187)]());throw _0x5db4f1;}finally{clearTimeout(_0x2e3128);}}export async function getBffScriptInfo(_0x54ea48){const _0x23da14=a65_0x236b,_0x394fe0=await apiRequest(_0x23da14(0x1bc)+_0x54ea48);if(!_0x394fe0['data'])throw CliErrors[_0x23da14(0x1c2)](_0x23da14(0x164)+_0x54ea48);return _0x394fe0['data'];}export async function getSqlQueryInfo(_0x114671,_0x3a1f75){const _0x57a7c1=a65_0x236b,_0x524a4f=await apiRequest('/client/sql/query',{'method':_0x57a7c1(0x1ad),'body':{'appCode':_0x114671,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x3a1f75}}),_0x966469=_0x524a4f[_0x57a7c1(0x16c)],_0x2f2e82=_0x966469&&typeof _0x966469===_0x57a7c1(0x1cb)&&_0x57a7c1(0x159)in _0x966469?_0x966469[_0x57a7c1(0x159)]?.[0x0]:_0x966469&&typeof _0x966469===_0x57a7c1(0x1cb)&&_0x57a7c1(0x1b5)in _0x966469?_0x966469:undefined;if(!_0x2f2e82)throw CliErrors[_0x57a7c1(0x1c2)](_0x57a7c1(0x1a5)+_0x3a1f75);return _0x2f2e82;}function isRemoteAppItem(_0x2af084){const _0x20ea02=a65_0x236b;return!!_0x2af084&&typeof _0x2af084===_0x20ea02(0x1cb)&&typeof _0x2af084[_0x20ea02(0x1ab)]===_0x20ea02(0x1a7)&&typeof _0x2af084[_0x20ea02(0x186)]===_0x20ea02(0x1a7);}function extractRemoteAppItems(_0x4a5d86){const _0x441a7c=a65_0x236b;if(Array['isArray'](_0x4a5d86))return _0x4a5d86['filter'](isRemoteAppItem);if(!_0x4a5d86||typeof _0x4a5d86!==_0x441a7c(0x1cb))throw CliErrors[_0x441a7c(0x18b)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x2d0ce5=_0x4a5d86;if(Array[_0x441a7c(0x17c)](_0x2d0ce5[_0x441a7c(0x159)]))return _0x2d0ce5[_0x441a7c(0x159)][_0x441a7c(0x1c7)](isRemoteAppItem);if(_0x2d0ce5[_0x441a7c(0x16c)]&&typeof _0x2d0ce5[_0x441a7c(0x16c)]==='object'){const _0x1e9365=_0x2d0ce5['data'];if(Array['isArray'](_0x1e9365[_0x441a7c(0x159)]))return _0x1e9365[_0x441a7c(0x159)][_0x441a7c(0x1c7)](isRemoteAppItem);}throw CliErrors[_0x441a7c(0x18b)](_0x441a7c(0x184));}export async function getMyApps(){const _0x1d3712=a65_0x236b,_0x37cd36=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x37cd36[_0x1d3712(0x16c)]);}export async function getLoginUserInfo(){const _0x1f445d=a65_0x236b,_0x58a00f=await apiRequest(_0x1f445d(0x1d6));if(!_0x58a00f[_0x1f445d(0x16c)]||typeof _0x58a00f['data']!==_0x1f445d(0x1cb)||Array[_0x1f445d(0x17c)](_0x58a00f['data']))throw CliErrors[_0x1f445d(0x18b)](_0x1f445d(0x192));return _0x58a00f[_0x1f445d(0x16c)];}export async function listDatasets(_0x307bf2,_0x2a1d56){const _0x3cac51=a65_0x236b,_0x56fa4f=await apiRequest(_0x3cac51(0x1d7),{'method':_0x3cac51(0x1ad),'body':{'appCode':_0x307bf2,..._0x2a1d56?.[_0x3cac51(0x17e)]&&{'code':_0x2a1d56[_0x3cac51(0x17e)]},..._0x2a1d56?.[_0x3cac51(0x172)]&&{'name':_0x2a1d56[_0x3cac51(0x172)]}}});return extractList(_0x56fa4f[_0x3cac51(0x16c)]);}export async function getDatasetDetail(_0x1f9587){const _0x168d39=a65_0x236b,_0x3fab31=/^\d+$/[_0x168d39(0x1bf)](_0x1f9587)?'id':_0x168d39(0x17e),_0x582993=await apiRequest(_0x168d39(0x15a)+_0x3fab31+'='+_0x1f9587);return _0x582993['data'];}export async function getDatasetSdkUsageDoc(_0x3d6969,_0x5a706f){const _0x3e108c=a65_0x236b,_0x3ef212=await toolboxRequest(_0x3e108c(0x15d),{'datasetCode':_0x3d6969,'appCode':_0x5a706f});return typeof _0x3ef212?.[_0x3e108c(0x1ae)]===_0x3e108c(0x1a7)?_0x3ef212[_0x3e108c(0x1ae)]:'';}export async function listRuntimeArtifacts(_0x5bab21,_0x279fa6){const _0x219483=a65_0x236b,_0x2d5158=new URLSearchParams({'appCode':_0x5bab21});if(_0x279fa6?.['artifactType'])_0x2d5158[_0x219483(0x1bd)]('artifactType',_0x279fa6['artifactType']);if(_0x279fa6?.[_0x219483(0x199)])_0x2d5158[_0x219483(0x1bd)](_0x219483(0x199),_0x279fa6[_0x219483(0x199)]);if(_0x279fa6?.[_0x219483(0x1b8)]!==undefined)_0x2d5158['set'](_0x219483(0x1b8),String(_0x279fa6[_0x219483(0x1b8)]));const _0x78ac5b=await apiRequest(_0x219483(0x1a0)+_0x2d5158[_0x219483(0x187)]());return Array['isArray'](_0x78ac5b['data'])?_0x78ac5b[_0x219483(0x16c)]:[];}export async function getRuntimeArtifact(_0x1f9789,_0x2e1d70){const _0x422826=a65_0x236b,_0x11ddfb=await apiRequest(_0x422826(0x174)+_0x1f9789+'?appCode='+encodeURIComponent(_0x2e1d70));if(!_0x11ddfb[_0x422826(0x16c)])throw CliErrors['validation'](_0x422826(0x179)+_0x1f9789);return _0x11ddfb[_0x422826(0x16c)];}export async function createRuntimeArtifact(_0x34a2f2,_0x443112){const _0x245e86=a65_0x236b,_0x405d80=await apiRequest(_0x245e86(0x16f),{'method':_0x245e86(0x1ad),'body':{'appCode':_0x34a2f2,..._0x443112}});return _0x405d80[_0x245e86(0x16c)];}export async function updateRuntimeArtifact(_0x2c530e,_0x2e8eff,_0x368155){const _0x26dd90=a65_0x236b,_0x49e738=await apiRequest(_0x26dd90(0x174)+_0x2c530e+_0x26dd90(0x181),{'method':_0x26dd90(0x1ad),'body':{'appCode':_0x2e8eff,..._0x368155}});return _0x49e738[_0x26dd90(0x16c)];}export async function listPersonalBffs(_0x1ae0fa){const _0x32789e=a65_0x236b,_0x2ff3c3=await apiRequest(_0x32789e(0x16d)+encodeURIComponent(_0x1ae0fa));return Array['isArray'](_0x2ff3c3['data'])?_0x2ff3c3[_0x32789e(0x16c)]:[];}function a65_0x236b(_0x588903,_0x4aa2c3){_0x588903=_0x588903-0x158;const _0x4ce405=a65_0x4ce4();let _0x236b97=_0x4ce405[_0x588903];return _0x236b97;}export async function getPersonalBff(_0x5851c4,_0xa5ad84){const _0x285631=a65_0x236b,_0x3bf151=await apiRequest(_0x285631(0x1c1)+_0x5851c4+_0x285631(0x178)+encodeURIComponent(_0xa5ad84));if(!_0x3bf151['data'])throw CliErrors[_0x285631(0x1c2)](_0x285631(0x19d)+_0x5851c4);return _0x3bf151[_0x285631(0x16c)];}export async function createPersonalBff(_0x4a4d43,_0x41e877){const _0x4beabf=a65_0x236b,_0x561fdd=await apiRequest(_0x4beabf(0x195),{'method':'POST','body':{'appCode':_0x4a4d43,..._0x41e877}});return _0x561fdd[_0x4beabf(0x16c)];}export async function updatePersonalBff(_0x427f00,_0x262673,_0x392d3e){const _0x47e7f6=a65_0x236b,_0x1dac32=await apiRequest(_0x47e7f6(0x1c1)+_0x427f00+_0x47e7f6(0x181),{'method':_0x47e7f6(0x1ad),'body':{'appCode':_0x262673,..._0x392d3e}});return _0x1dac32[_0x47e7f6(0x16c)];}export async function executePersonalBff(_0x1c480a,_0x427d2e,_0x168f52){const _0x317700=a65_0x236b,_0xe2ffc9=await apiRequest(_0x317700(0x1c1)+_0x1c480a+_0x317700(0x18e)+encodeURIComponent(_0x427d2e),{'method':'POST','body':_0x168f52});return _0xe2ffc9[_0x317700(0x16c)];}export async function listPersonalKnowledgeBaseItems(_0x2b9940){const _0x5709ee=a65_0x236b,_0x39c4df=await apiRequest(_0x5709ee(0x1a6)+encodeURIComponent(_0x2b9940));return Array[_0x5709ee(0x17c)](_0x39c4df[_0x5709ee(0x16c)])?_0x39c4df[_0x5709ee(0x16c)]:[];}export async function getPersonalKnowledgeBaseItem(_0x41038e,_0x3e422d){const _0x379b3d=a65_0x236b,_0x4c9100=await apiRequest(_0x379b3d(0x1b0)+_0x41038e+_0x379b3d(0x178)+encodeURIComponent(_0x3e422d));if(!_0x4c9100[_0x379b3d(0x16c)])throw CliErrors[_0x379b3d(0x1c2)](_0x379b3d(0x18a)+_0x41038e);return _0x4c9100[_0x379b3d(0x16c)];}export async function createPersonalKnowledgeBaseItem(_0x396955,_0x212ea4){const _0x375b2a=await apiRequest('/client/knowledge-base/personal/create',{'method':'POST','body':{'appCode':_0x396955,..._0x212ea4}});return _0x375b2a['data'];}export async function updatePersonalKnowledgeBaseItem(_0x528c4d,_0x21916d,_0x58109d){const _0x54efd6=a65_0x236b,_0x135172=await apiRequest(_0x54efd6(0x1b0)+_0x528c4d+_0x54efd6(0x181),{'method':_0x54efd6(0x1ad),'body':{'appCode':_0x21916d,..._0x58109d}});return _0x135172[_0x54efd6(0x16c)];}export async function searchKnowledgeBase(_0x29455c,_0x4f4899){const _0x21f42f=a65_0x236b,_0x40057f=await apiRequest(_0x21f42f(0x16b),{'method':_0x21f42f(0x1ad),'body':{'appCode':_0x29455c,'query':_0x4f4899[_0x21f42f(0x1ac)],..._0x4f4899[_0x21f42f(0x15c)]!==undefined?{'topK':_0x4f4899[_0x21f42f(0x15c)]}:{}}});return Array['isArray'](_0x40057f[_0x21f42f(0x16c)])?_0x40057f[_0x21f42f(0x16c)]:[];}export async function listRuntimeSkills(_0x278485){const _0x3f07b1=a65_0x236b,_0x43d23a=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0x278485['appCode'])+_0x3f07b1(0x183),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x278485[_0x3f07b1(0x1ab)],_0x43d23a,_0x278485[_0x3f07b1(0x1d5)]??_0x3f07b1(0x19c),_0x278485['code']);}export async function listPersonalRuntimeSkills(_0x210020){const _0x174b77=a65_0x236b;return(await listRuntimeSkills({'appCode':_0x210020,'scope':'personal'}))[_0x174b77(0x1c3)];}export async function listCompanyRuntimeSkills(_0x3c37bc){const _0x58a236=a65_0x236b;return(await listRuntimeSkills({'appCode':_0x3c37bc,'scope':'company'}))[_0x58a236(0x17a)];}export async function listVisibleRuntimeSkills(_0x228648){const _0x20dc5a=a65_0x236b;return(await listRuntimeSkills({'appCode':_0x228648,'scope':_0x20dc5a(0x19c)}))[_0x20dc5a(0x169)];}function a65_0x4ce4(){const _0x2bcb07=['SQL\x20query\x20not\x20found:\x20','/client/knowledge-base/personal/list?appCode=','string','6maBJtU','tags','3516055aOImWc','appCode','query','POST','markdown','.zip','/client/knowledge-base/personal/','description','displayName','invokeSource','visibility','sqlCode','1470573xoRdnX','publishedVersion','favorite','Toolbox\x20API\x20error:\x20','SkillHub\x20API\x20error:\x20','number','/client/bff/query/','set','12742928zcZQdl','test','711279MKWGtK','/client/runtime-bff/personal/','validation','personal','454232dsBEOc','Check\x20your\x20credentials\x20and\x20try\x20again.','searchParams','filter','Request\x20timeout:\x20','summary','Toolbox\x20error\x20code:\x20','object','status','abort','50TJjnUz','items','map','skillCode','success','application/octet-stream','message','scope','/client/user/loginUserInfo','/client/dataset/list','application/zip','tableData','/client/dataset/query?','json','topK','api-doc-generator','skill','base64','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','2102ZFgbEa','/api/cli/v1/skills/','packageBase64','BFF\x20script\x20not\x20found:\x20id=','Download\x20failed:\x20','application/json','/versions/','errorMsg','effective','GET','/client/knowledge-base/search','data','/client/runtime-bff/personal/list?appCode=','ownerPreviewVersion','/client/artifact/create','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','msg','name','signal','/client/artifact/','errorCode','boolean','599WcOLea','?appCode=','Artifact\x20not\x20found:\x20id=','company','arrayBuffer','isArray','from','code','Missing\x20Skill\x20package\x20payload.','Toolbox\x20API\x20error','/update','values','/skills','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','14QmYeus','appName','toString','replace','slug','Knowledge-base\x20entry\x20not\x20found:\x20id=','apiError','2743168shhkiw','version','/execute?appCode=','text','API\x20error:\x20','/publish','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','AbortError','namespace','/client/runtime-bff/personal/create','authRequired','trim','API\x20error\x20code:\x20','source','skillName','/download','all','Personal\x20BFF\x20not\x20found:\x20id=','Configure\x20accessKey\x20in\x20','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/artifact/list?','/api/node-toolbox/','entries','content','newConfigFileName'];a65_0x4ce4=function(){return _0x2bcb07;};return a65_0x4ce4();}export async function createPersonalRuntimeSkill(_0x13c09d,_0x306b60){return publishRuntimeSkill(_0x13c09d,_0x306b60);}export async function updatePersonalRuntimeSkill(_0x524c84,_0x41f866,_0xf702ad){const _0x4f98f7=a65_0x236b;return publishRuntimeSkill(_0x41f866,{..._0xf702ad,'skillCode':_0xf702ad[_0x4f98f7(0x1d1)]??_0x524c84});}export async function downloadRuntimeSkillPackage(_0x1d9a03,_0x54a5fb,_0x1ea7ff,_0x28947a){const _0x4e1357=a65_0x236b;void _0x1d9a03;const _0x2c48df=_0x28947a?_0x4e1357(0x162)+encodeURIComponent(_0x1ea7ff)+'/'+encodeURIComponent(_0x54a5fb)+_0x4e1357(0x167)+encodeURIComponent(_0x28947a)+_0x4e1357(0x19b):'/api/cli/v1/skills/'+encodeURIComponent(_0x1ea7ff)+'/'+encodeURIComponent(_0x54a5fb)+_0x4e1357(0x19b);return skillHubBinaryRequest(_0x2c48df);}async function publishRuntimeSkill(_0x43a2fc,_0x72f440){const _0x36d51c=a65_0x236b,_0x2eaf9d=new FormData();_0x2eaf9d[_0x36d51c(0x1bd)]('file',runtimeSkillPackageFile(_0x72f440)),_0x2eaf9d[_0x36d51c(0x1bd)](_0x36d51c(0x1b4),'PRIVATE');const _0x898728=await skillHubJsonRequest(_0x36d51c(0x162)+encodeURIComponent(_0x43a2fc)+_0x36d51c(0x191),{'method':'POST','body':_0x2eaf9d});return{'appCode':_0x898728[_0x36d51c(0x194)]??_0x43a2fc,'skillCode':_0x898728[_0x36d51c(0x189)]??_0x72f440[_0x36d51c(0x1d1)]??'','skillName':_0x72f440[_0x36d51c(0x19a)]??_0x898728[_0x36d51c(0x189)]??_0x72f440[_0x36d51c(0x1d1)],'description':_0x72f440[_0x36d51c(0x1b1)],'scope':skillHubVisibilityToScope(_0x898728[_0x36d51c(0x1b4)])??_0x36d51c(0x1c3),'version':_0x898728['version']??_0x72f440['version'],'tags':_0x72f440[_0x36d51c(0x1a9)],'content':_0x72f440[_0x36d51c(0x1a3)]};}function runtimeSkillPackageFile(_0x30c872){const _0x4617e1=a65_0x236b;if(!_0x30c872['packageBase64'])throw CliErrors[_0x4617e1(0x1c2)](_0x4617e1(0x17f));const _0x2be40f=Buffer['from'](_0x30c872[_0x4617e1(0x163)],_0x4617e1(0x15f)),_0x248dcd=new Blob([_0x2be40f],{'type':_0x4617e1(0x158)}),_0x3bd965=(_0x30c872[_0x4617e1(0x1d1)]||_0x4617e1(0x15e))+_0x4617e1(0x1af);if(typeof File!=='undefined')return new File([_0x248dcd],_0x3bd965,{'type':_0x4617e1(0x158)});return _0x248dcd;}function normalizeSkillHubRuntimeListResponse(_0x21bc7d,_0x229127,_0x5cb28d,_0x56e577){const _0x391b6f=a65_0x236b,_0x49d0f5=Array[_0x391b6f(0x17c)](_0x229127)?_0x229127:Array['isArray'](_0x229127?.[_0x391b6f(0x1cf)])?_0x229127[_0x391b6f(0x1cf)]:[],_0x243a78=_0x56e577?.[_0x391b6f(0x197)](),_0x4385cd=_0x49d0f5[_0x391b6f(0x1c7)](_0x27c271=>!_0x243a78||_0x27c271['slug']===_0x243a78)[_0x391b6f(0x1d0)](skillHubRuntimeItemToRuntimeSkill)[_0x391b6f(0x1c7)](_0x52e34c=>Boolean(_0x52e34c)),_0x15fe71=_0x4385cd['filter'](_0x2c31c3=>_0x2c31c3[_0x391b6f(0x1d5)]===_0x391b6f(0x1c3)),_0x52d0d6=_0x4385cd[_0x391b6f(0x1c7)](_0x5a13d1=>_0x5a13d1[_0x391b6f(0x1d5)]===_0x391b6f(0x17a));return{'appCode':_0x21bc7d,'personal':_0x5cb28d==='company'?[]:_0x15fe71,'company':_0x5cb28d===_0x391b6f(0x1c3)?[]:_0x52d0d6,'effective':buildEffectiveRuntimeSkills(_0x15fe71,_0x52d0d6,_0x5cb28d)};}function skillHubRuntimeItemToRuntimeSkill(_0x5711d8){const _0x32ecfd=a65_0x236b,_0x5ad612=_0x5711d8[_0x32ecfd(0x189)]?.[_0x32ecfd(0x197)](),_0x4bd902=skillHubVisibilityToScope(_0x5711d8[_0x32ecfd(0x1b4)]);if(!_0x5ad612||!_0x4bd902)return undefined;return{'id':_0x5711d8['id'],'appCode':_0x5711d8[_0x32ecfd(0x194)],'skillCode':_0x5ad612,'skillName':_0x5711d8[_0x32ecfd(0x1b2)]??_0x5ad612,'description':_0x5711d8[_0x32ecfd(0x1c9)],'scope':_0x4bd902,'version':skillHubRuntimeItemVersion(_0x5711d8),'status':_0x5711d8[_0x32ecfd(0x1cc)]};}function skillHubVisibilityToScope(_0xbf8019){const _0x1bb535=a65_0x236b;if(_0xbf8019==='PRIVATE')return _0x1bb535(0x1c3);if(_0xbf8019==='NAMESPACE_ONLY')return'company';return undefined;}function skillHubRuntimeItemVersion(_0x34db91){const _0x31562f=a65_0x236b;return _0x34db91[_0x31562f(0x1b7)]?.[_0x31562f(0x18d)]??_0x34db91['headlineVersion']?.['version']??_0x34db91[_0x31562f(0x16e)]?.[_0x31562f(0x18d)];}function buildEffectiveRuntimeSkills(_0x135f68,_0x22eb20,_0x1687bc){const _0x44c873=a65_0x236b;if(_0x1687bc==='personal')return _0x135f68;if(_0x1687bc===_0x44c873(0x17a))return _0x22eb20;const _0xb7f162=new Map();for(const _0x5150c6 of _0x22eb20){_0xb7f162[_0x44c873(0x1bd)](_0x5150c6['skillCode'],_0x5150c6);}for(const _0x3e55a7 of _0x135f68){_0xb7f162['set'](_0x3e55a7[_0x44c873(0x1d1)],_0x3e55a7);}return Array['from'](_0xb7f162[_0x44c873(0x182)]());}function normalizeRuntimeSkillListResponse(_0x1e71c3,_0x27e20f){const _0x309e42=a65_0x236b;if(Array[_0x309e42(0x17c)](_0x27e20f)){const _0x577266=_0x27e20f[_0x309e42(0x1c7)](_0x321d20=>_0x321d20[_0x309e42(0x1d5)]===_0x309e42(0x1c3)),_0x3f416f=_0x27e20f[_0x309e42(0x1c7)](_0x51c915=>_0x51c915['scope']===_0x309e42(0x17a));return{'appCode':_0x1e71c3,'personal':_0x577266,'company':_0x3f416f,'effective':[..._0x3f416f,..._0x577266]};}return{'appCode':_0x27e20f?.[_0x309e42(0x1ab)]??_0x1e71c3,'personal':Array[_0x309e42(0x17c)](_0x27e20f?.[_0x309e42(0x1c3)])?_0x27e20f[_0x309e42(0x1c3)]:[],'company':Array[_0x309e42(0x17c)](_0x27e20f?.[_0x309e42(0x17a)])?_0x27e20f[_0x309e42(0x17a)]:[],'effective':Array['isArray'](_0x27e20f?.['effective'])?_0x27e20f[_0x309e42(0x169)]:[]};}
|
|
1
|
+
(function(_0x1762b6,_0x127f97){const _0xdba764=a65_0x3700,_0x303126=_0x1762b6();while(!![]){try{const _0x275cc5=parseInt(_0xdba764(0xe1))/0x1+parseInt(_0xdba764(0x128))/0x2*(-parseInt(_0xdba764(0xbf))/0x3)+parseInt(_0xdba764(0xb5))/0x4*(-parseInt(_0xdba764(0x102))/0x5)+-parseInt(_0xdba764(0xe2))/0x6*(-parseInt(_0xdba764(0x11f))/0x7)+parseInt(_0xdba764(0xdb))/0x8*(parseInt(_0xdba764(0x11d))/0x9)+-parseInt(_0xdba764(0xd6))/0xa*(-parseInt(_0xdba764(0xc7))/0xb)+-parseInt(_0xdba764(0x132))/0xc;if(_0x275cc5===_0x127f97)break;else _0x303126['push'](_0x303126['shift']());}catch(_0x57e756){_0x303126['push'](_0x303126['shift']());}}}(a65_0x25ec,0x47dfa));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(_0x39ad02){_activeAK=_0x39ad02||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x2d038e,_0x1740cd={}){const _0x40e3ce=a65_0x3700,{method:method='GET',body:_0x594f0d,headers:headers={},timeout:timeout=0x7530}=_0x1740cd,_0x3ede2a=_activeAK,_0x588f52=getRuntimeDomain();if(!_0x3ede2a)throw CliErrors[_0x40e3ce(0x10a)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x40e3ce(0x11a)]+'.');const _0x5f577f=''+_0x588f52+_0x2d038e,_0x19a0fe={'X-User-AK':_0x3ede2a},_0x40f370=new AbortController(),_0x59dde9=setTimeout(()=>_0x40f370[_0x40e3ce(0x12d)](),timeout);try{const _0x46b9dc=await fetch(_0x5f577f,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x40e3ce(0x114)],..._0x19a0fe,...headers},'body':_0x594f0d?JSON[_0x40e3ce(0xfe)](_0x594f0d):undefined,'signal':_0x40f370[_0x40e3ce(0x10f)]});let _0x296863;try{_0x296863=await _0x46b9dc[_0x40e3ce(0x130)]();}catch{throw CliErrors[_0x40e3ce(0x12a)](_0x40e3ce(0x119)+_0x46b9dc[_0x40e3ce(0x11b)]+')',_0x46b9dc[_0x40e3ce(0x11b)]>=0x190?_0x40e3ce(0xb8):undefined);}if(!_0x46b9dc['ok']||_0x296863[_0x40e3ce(0xce)]===![])throw CliErrors['apiError'](_0x296863['errorMsg']||_0x296863[_0x40e3ce(0xeb)]||_0x40e3ce(0x109)+_0x46b9dc[_0x40e3ce(0x11b)],_0x296863[_0x40e3ce(0xc0)]?_0x40e3ce(0x107)+_0x296863[_0x40e3ce(0xc0)]:undefined);return _0x296863;}catch(_0x2a40f8){if(_0x2a40f8 instanceof Error&&_0x2a40f8['name']===_0x40e3ce(0x126))throw CliErrors['apiError'](_0x40e3ce(0xd2)+_0x5f577f);throw _0x2a40f8;}finally{clearTimeout(_0x59dde9);}}async function apiBinaryRequest(_0xb418e2,_0x2959a8={}){const _0x34782c=a65_0x3700,{method:method=_0x34782c(0x122),headers:headers={},timeout:timeout=0x7530}=_0x2959a8,_0x1756b6=_activeAK,_0x5e2c07=getRuntimeDomain();if(!_0x1756b6)throw CliErrors[_0x34782c(0x10a)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x34782c(0x11a)]+'.');const _0x5a4232=''+_0x5e2c07+_0xb418e2,_0x1afba8=new AbortController(),_0x2721e5=setTimeout(()=>_0x1afba8['abort'](),timeout);try{const _0x255614=await fetch(_0x5a4232,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x1756b6,...headers},'signal':_0x1afba8[_0x34782c(0x10f)]});if(!_0x255614['ok']){let _0x55c130;try{const _0x41a4fc=await _0x255614[_0x34782c(0x130)]();_0x55c130=_0x41a4fc[_0x34782c(0x121)]||_0x41a4fc['message']||_0x41a4fc[_0x34782c(0xc0)];}catch{_0x55c130=await _0x255614[_0x34782c(0xdf)]()[_0x34782c(0xd8)](()=>undefined);}throw CliErrors[_0x34782c(0x12a)](_0x55c130||'API\x20error:\x20'+_0x255614[_0x34782c(0x11b)],'Download\x20failed:\x20'+_0x5a4232);}return Buffer[_0x34782c(0xff)](await _0x255614['arrayBuffer']());}catch(_0x4a204f){if(_0x4a204f instanceof Error&&_0x4a204f[_0x34782c(0xd0)]===_0x34782c(0x126))throw CliErrors['apiError'](_0x34782c(0xd2)+_0x5a4232);throw _0x4a204f;}finally{clearTimeout(_0x2721e5);}}async function toolboxRequest(_0x4548e5,_0x757982,_0x38fc1f={}){const _0x57a8eb=a65_0x3700,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x38fc1f,_0x3eec15=_activeAK;if(!_0x3eec15)throw CliErrors['authRequired'](_0x57a8eb(0x134)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x41ee96=getApiDomain()['replace'](/\/$/,''),_0x347ed1=new URL(_0x4548e5,_0x41ee96+_0x57a8eb(0xba));if(_0x757982)for(const [_0x2d189b,_0x2f41b4]of Object[_0x57a8eb(0xf7)](_0x757982)){_0x2f41b4!==undefined&&_0x2f41b4!==null&&_0x347ed1[_0x57a8eb(0x12e)][_0x57a8eb(0xc3)](_0x2d189b,String(_0x2f41b4));}const _0x227af6=new AbortController(),_0x20444e=setTimeout(()=>_0x227af6[_0x57a8eb(0x12d)](),timeout);try{const _0x147f34=await fetch(_0x347ed1,{'method':method,'headers':{'Content-Type':_0x57a8eb(0xf1),'X-Invoke-Source':PRODUCT_CONFIG[_0x57a8eb(0x114)],'X-User-AK':_0x3eec15,...headers},'signal':_0x227af6[_0x57a8eb(0x10f)]});let _0x451a1a;try{_0x451a1a=await _0x147f34[_0x57a8eb(0x130)]();}catch{throw CliErrors[_0x57a8eb(0x12a)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x147f34['status']+')',_0x147f34[_0x57a8eb(0x11b)]>=0x190?_0x57a8eb(0xb8):undefined);}if(!_0x147f34['ok']){const _0x423127=_0x451a1a&&typeof _0x451a1a==='object'?_0x451a1a:{};throw CliErrors[_0x57a8eb(0x12a)](_0x423127[_0x57a8eb(0x121)]||_0x423127[_0x57a8eb(0xeb)]||_0x57a8eb(0x108)+_0x147f34[_0x57a8eb(0x11b)],_0x423127[_0x57a8eb(0xc0)]?_0x57a8eb(0xc5)+_0x423127[_0x57a8eb(0xc0)]:undefined);}if(_0x451a1a&&typeof _0x451a1a==='object'&&'success'in _0x451a1a&&typeof _0x451a1a[_0x57a8eb(0xce)]===_0x57a8eb(0x12c)){const _0x5a4708=_0x451a1a;if(!_0x5a4708[_0x57a8eb(0xce)])throw CliErrors[_0x57a8eb(0x12a)](_0x5a4708[_0x57a8eb(0x121)]||_0x5a4708[_0x57a8eb(0xeb)]||_0x57a8eb(0x10c),_0x5a4708[_0x57a8eb(0xc0)]?_0x57a8eb(0xc5)+_0x5a4708['errorCode']:undefined);return _0x5a4708[_0x57a8eb(0xbe)];}return _0x451a1a;}catch(_0x51c1d1){if(_0x51c1d1 instanceof Error&&_0x51c1d1['name']===_0x57a8eb(0x126))throw CliErrors['apiError'](_0x57a8eb(0xd2)+_0x347ed1['toString']());throw _0x51c1d1;}finally{clearTimeout(_0x20444e);}}async function skillHubJsonRequest(_0x15dc41,_0xbb0750={}){const _0x44f80e=a65_0x3700,{method:method=_0x44f80e(0x122),query:_0xd05117,body:_0x1bbe3e,headers:headers={},timeout:timeout=0x7530}=_0xbb0750,_0x2f42fe=_activeAK;if(!_0x2f42fe)throw CliErrors[_0x44f80e(0x10a)](_0x44f80e(0x134)+PRODUCT_CONFIG[_0x44f80e(0x11a)]+'.');const _0xe53b0b=getSkillHubDomain()[_0x44f80e(0x111)](/\/$/,''),_0x3c9b4f=new URL(_0x15dc41,_0xe53b0b+'/');if(_0xd05117)for(const [_0x212cfc,_0x473c9d]of Object[_0x44f80e(0xf7)](_0xd05117)){_0x473c9d!==undefined&&_0x473c9d!==null&&_0x3c9b4f['searchParams'][_0x44f80e(0xc3)](_0x212cfc,String(_0x473c9d));}const _0x6fdee0=new AbortController(),_0x442a28=setTimeout(()=>_0x6fdee0[_0x44f80e(0x12d)](),timeout);try{const _0x5b790c=await fetch(_0x3c9b4f[_0x44f80e(0xb9)](),{'method':method,'headers':{'Accept':_0x44f80e(0xf1),'X-Invoke-Source':PRODUCT_CONFIG[_0x44f80e(0x114)],'X-User-AK':_0x2f42fe,...headers},'body':_0x1bbe3e,'signal':_0x6fdee0[_0x44f80e(0x10f)]});let _0x1515ce;try{_0x1515ce=await _0x5b790c[_0x44f80e(0x130)]();}catch{throw CliErrors[_0x44f80e(0x12a)](_0x44f80e(0xfd)+_0x5b790c['status']+')',_0x5b790c[_0x44f80e(0x11b)]>=0x190?_0x44f80e(0xb8):undefined);}const _0x5a4771=!_0x5b790c['ok']||_0x1515ce?.[_0x44f80e(0xce)]===![]||typeof _0x1515ce?.[_0x44f80e(0xe8)]==='number'&&_0x1515ce[_0x44f80e(0xe8)]>=0x190;if(_0x5a4771)throw CliErrors['apiError'](_0x1515ce?.['errorMsg']||_0x1515ce?.['message']||_0x1515ce?.[_0x44f80e(0xb2)]||_0x44f80e(0xed)+_0x5b790c[_0x44f80e(0x11b)],_0x1515ce?.[_0x44f80e(0xc0)]?_0x44f80e(0xf2)+_0x1515ce[_0x44f80e(0xc0)]:undefined);return _0x1515ce?.[_0x44f80e(0xbe)]??_0x1515ce;}catch(_0x1e1011){if(_0x1e1011 instanceof Error&&_0x1e1011[_0x44f80e(0xd0)]===_0x44f80e(0x126))throw CliErrors[_0x44f80e(0x12a)](_0x44f80e(0xd2)+_0x3c9b4f[_0x44f80e(0xb9)]());throw _0x1e1011;}finally{clearTimeout(_0x442a28);}}async function skillHubBinaryRequest(_0x139a72,_0x165d16={}){const _0x4f6b7f=a65_0x3700,{query:_0x22c2d0,headers:headers={},timeout:timeout=0x7530}=_0x165d16,_0x558b9d=_activeAK;if(!_0x558b9d)throw CliErrors['authRequired'](_0x4f6b7f(0x134)+PRODUCT_CONFIG[_0x4f6b7f(0x11a)]+'.');const _0x10dc99=getSkillHubDomain()[_0x4f6b7f(0x111)](/\/$/,''),_0x39b4b4=new URL(_0x139a72,_0x10dc99+'/');if(_0x22c2d0)for(const [_0xacef47,_0x5a7afa]of Object[_0x4f6b7f(0xf7)](_0x22c2d0)){_0x5a7afa!==undefined&&_0x5a7afa!==null&&_0x39b4b4[_0x4f6b7f(0x12e)]['set'](_0xacef47,String(_0x5a7afa));}const _0x5672c8=new AbortController(),_0x54dc9f=setTimeout(()=>_0x5672c8[_0x4f6b7f(0x12d)](),timeout);try{const _0x44af36=await fetch(_0x39b4b4[_0x4f6b7f(0xb9)](),{'method':_0x4f6b7f(0x122),'headers':{'Accept':_0x4f6b7f(0xf5),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x558b9d,...headers},'signal':_0x5672c8[_0x4f6b7f(0x10f)]});if(!_0x44af36['ok']){let _0x5820e3;try{const _0x15407f=await _0x44af36['json']();_0x5820e3=_0x15407f['errorMsg']||_0x15407f['message']||_0x15407f[_0x4f6b7f(0xb2)]||_0x15407f[_0x4f6b7f(0xc0)];}catch{_0x5820e3=await _0x44af36[_0x4f6b7f(0xdf)]()[_0x4f6b7f(0xd8)](()=>undefined);}throw CliErrors[_0x4f6b7f(0x12a)](_0x5820e3||'SkillHub\x20API\x20error:\x20'+_0x44af36[_0x4f6b7f(0x11b)],_0x4f6b7f(0x11e)+_0x39b4b4[_0x4f6b7f(0xb9)]());}return Buffer['from'](await _0x44af36['arrayBuffer']());}catch(_0x575723){if(_0x575723 instanceof Error&&_0x575723[_0x4f6b7f(0xd0)]===_0x4f6b7f(0x126))throw CliErrors['apiError'](_0x4f6b7f(0xd2)+_0x39b4b4['toString']());throw _0x575723;}finally{clearTimeout(_0x54dc9f);}}export async function getBffScriptInfo(_0x40bf4d){const _0x302aa2=a65_0x3700,_0x4a4fba=await apiRequest(_0x302aa2(0xbd)+_0x40bf4d);if(!_0x4a4fba[_0x302aa2(0xbe)])throw CliErrors[_0x302aa2(0xf8)](_0x302aa2(0xcc)+_0x40bf4d);return _0x4a4fba['data'];}export async function getSqlQueryInfo(_0x2115d8,_0x516d24){const _0x475e7e=a65_0x3700,_0x26bb13=await apiRequest(_0x475e7e(0xc1),{'method':'POST','body':{'appCode':_0x2115d8,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x516d24}}),_0x100ab9=_0x26bb13['data'],_0x32e7ca=_0x100ab9&&typeof _0x100ab9===_0x475e7e(0x113)&&_0x475e7e(0x131)in _0x100ab9?_0x100ab9[_0x475e7e(0x131)]?.[0x0]:_0x100ab9&&typeof _0x100ab9===_0x475e7e(0x113)&&_0x475e7e(0xf0)in _0x100ab9?_0x100ab9:undefined;if(!_0x32e7ca)throw CliErrors['validation'](_0x475e7e(0xd7)+_0x516d24);return _0x32e7ca;}function isRemoteAppItem(_0x339b93){const _0x5611dd=a65_0x3700;return!!_0x339b93&&typeof _0x339b93===_0x5611dd(0x113)&&typeof _0x339b93[_0x5611dd(0x127)]===_0x5611dd(0x100)&&typeof _0x339b93[_0x5611dd(0x11c)]===_0x5611dd(0x100);}function extractRemoteAppItems(_0x542ff2){const _0x2c5b39=a65_0x3700;if(Array[_0x2c5b39(0x125)](_0x542ff2))return _0x542ff2[_0x2c5b39(0xc6)](isRemoteAppItem);if(!_0x542ff2||typeof _0x542ff2!==_0x2c5b39(0x113))throw CliErrors['apiError'](_0x2c5b39(0xf9));const _0x1f259a=_0x542ff2;if(Array[_0x2c5b39(0x125)](_0x1f259a['tableData']))return _0x1f259a[_0x2c5b39(0x131)]['filter'](isRemoteAppItem);if(_0x1f259a[_0x2c5b39(0xbe)]&&typeof _0x1f259a[_0x2c5b39(0xbe)]==='object'){const _0x25b9c8=_0x1f259a[_0x2c5b39(0xbe)];if(Array['isArray'](_0x25b9c8[_0x2c5b39(0x131)]))return _0x25b9c8[_0x2c5b39(0x131)][_0x2c5b39(0xc6)](isRemoteAppItem);}throw CliErrors[_0x2c5b39(0x12a)](_0x2c5b39(0xca));}export async function getMyApps(){const _0x414713=a65_0x3700,_0x423389=await apiRequest(_0x414713(0xe4));return extractRemoteAppItems(_0x423389[_0x414713(0xbe)]);}export async function getLoginUserInfo(){const _0x5c6c16=a65_0x3700,_0x1a4e6d=await apiRequest('/client/user/loginUserInfo');if(!_0x1a4e6d[_0x5c6c16(0xbe)]||typeof _0x1a4e6d[_0x5c6c16(0xbe)]!==_0x5c6c16(0x113)||Array['isArray'](_0x1a4e6d['data']))throw CliErrors[_0x5c6c16(0x12a)](_0x5c6c16(0xd9));return _0x1a4e6d[_0x5c6c16(0xbe)];}export async function listDatasets(_0x3d3688,_0x460e1c){const _0xad68e1=a65_0x3700,_0x3a87df=await apiRequest(_0xad68e1(0xc4),{'method':_0xad68e1(0x10d),'body':{'appCode':_0x3d3688,..._0x460e1c?.['code']&&{'code':_0x460e1c[_0xad68e1(0xe8)]},..._0x460e1c?.[_0xad68e1(0xd0)]&&{'name':_0x460e1c[_0xad68e1(0xd0)]}}});return extractList(_0x3a87df[_0xad68e1(0xbe)]);}export async function getDatasetDetail(_0x2ed9f5){const _0x132135=a65_0x3700,_0xd5b1c7=/^\d+$/[_0x132135(0x10b)](_0x2ed9f5)?'id':'code',_0x10de28=await apiRequest('/client/dataset/query?'+_0xd5b1c7+'='+_0x2ed9f5);return _0x10de28[_0x132135(0xbe)];}export async function getDatasetSdkUsageDoc(_0x4d131c,_0xe3fc0a){const _0x48b234=a65_0x3700,_0x10ad74=await toolboxRequest(_0x48b234(0x129),{'datasetCode':_0x4d131c,'appCode':_0xe3fc0a});return typeof _0x10ad74?.[_0x48b234(0xe6)]===_0x48b234(0x100)?_0x10ad74[_0x48b234(0xe6)]:'';}export async function listRuntimeArtifacts(_0x2f7f96,_0x9c65d0){const _0x3e8ea2=a65_0x3700,_0x7af649=new URLSearchParams({'appCode':_0x2f7f96});if(_0x9c65d0?.[_0x3e8ea2(0xe3)])_0x7af649[_0x3e8ea2(0xc3)](_0x3e8ea2(0xe3),_0x9c65d0[_0x3e8ea2(0xe3)]);if(_0x9c65d0?.['source'])_0x7af649[_0x3e8ea2(0xc3)](_0x3e8ea2(0xb6),_0x9c65d0[_0x3e8ea2(0xb6)]);if(_0x9c65d0?.[_0x3e8ea2(0xe0)]!==undefined)_0x7af649['set'](_0x3e8ea2(0xe0),String(_0x9c65d0[_0x3e8ea2(0xe0)]));const _0x250503=await apiRequest(_0x3e8ea2(0x116)+_0x7af649[_0x3e8ea2(0xb9)]());return Array['isArray'](_0x250503[_0x3e8ea2(0xbe)])?_0x250503[_0x3e8ea2(0xbe)]:[];}export async function getRuntimeArtifact(_0x579ce6,_0xb15de0){const _0x50c706=a65_0x3700,_0x8c08c4=await apiRequest(_0x50c706(0x103)+_0x579ce6+_0x50c706(0x115)+encodeURIComponent(_0xb15de0));if(!_0x8c08c4[_0x50c706(0xbe)])throw CliErrors['validation'](_0x50c706(0x105)+_0x579ce6);return _0x8c08c4['data'];}export async function createRuntimeArtifact(_0x28166b,_0x36d0d8){const _0x48b126=a65_0x3700,_0x27371d=await apiRequest('/client/artifact/create',{'method':_0x48b126(0x10d),'body':{'appCode':_0x28166b,..._0x36d0d8}});return _0x27371d[_0x48b126(0xbe)];}export async function updateRuntimeArtifact(_0x544340,_0x4a5374,_0x3e7679){const _0x2901c0=a65_0x3700,_0x1f02fb=await apiRequest(_0x2901c0(0x103)+_0x544340+_0x2901c0(0xe7),{'method':_0x2901c0(0x10d),'body':{'appCode':_0x4a5374,..._0x3e7679}});return _0x1f02fb[_0x2901c0(0xbe)];}function a65_0x25ec(){const _0x356c0d=['stringify','from','string','namespace','10cnpEFT','/client/artifact/','displayName','Artifact\x20not\x20found:\x20id=','/client/knowledge-base/personal/create','API\x20error\x20code:\x20','Toolbox\x20API\x20error:\x20','API\x20error:\x20','authRequired','test','Toolbox\x20API\x20error','POST','base64','signal','description','replace','trim','object','invokeSource','?appCode=','/client/artifact/list?','tags','file','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','newConfigFileName','status','appName','9uyFmDL','Download\x20failed:\x20','701449dDPSHr','.zip','errorMsg','GET','/client/runtime-bff/personal/','PRIVATE','isArray','AbortError','appCode','878JrmHqX','api-doc-generator','apiError','topK','boolean','abort','searchParams','headlineVersion','json','tableData','5425428EZhoGj','slug','Configure\x20accessKey\x20in\x20','personal','msg','items','visibility','353796MSQQrS','source','application/zip','Check\x20your\x20credentials\x20and\x20try\x20again.','toString','/api/node-toolbox/','effective','scope','/client/bff/query/','data','1767aTXHyc','errorCode','/client/sql/query','/client/knowledge-base/search','set','/client/dataset/list','Toolbox\x20error\x20code:\x20','filter','11yuLfLc','company','content','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','ownerPreviewVersion','BFF\x20script\x20not\x20found:\x20id=','skillName','success','query','name','skill','Request\x20timeout:\x20','map','/execute?appCode=','/skills','1365370ChqJkc','SQL\x20query\x20not\x20found:\x20','catch','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','skillCode','4397336OhQNxt','/client/knowledge-base/personal/list?appCode=','summary','all','text','favorite','395571osIbAL','6fgMyXc','artifactType','/client/app/my-apps','Knowledge-base\x20entry\x20not\x20found:\x20id=','markdown','/update','code','NAMESPACE_ONLY','values','message','packageBase64','SkillHub\x20API\x20error:\x20','undefined','/client/knowledge-base/personal/','sqlCode','application/json','SkillHub\x20error\x20code:\x20','publishedVersion','/api/cli/v1/skills/','application/octet-stream','version','entries','validation','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/download','Missing\x20Skill\x20package\x20payload.','Personal\x20BFF\x20not\x20found:\x20id=','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'];a65_0x25ec=function(){return _0x356c0d;};return a65_0x25ec();}export async function listPersonalBffs(_0x474653){const _0x3b6995=a65_0x3700,_0x35b670=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x474653));return Array['isArray'](_0x35b670[_0x3b6995(0xbe)])?_0x35b670[_0x3b6995(0xbe)]:[];}export async function getPersonalBff(_0x44cbac,_0x4d91ac){const _0x4c2035=a65_0x3700,_0x7c458=await apiRequest(_0x4c2035(0x123)+_0x44cbac+_0x4c2035(0x115)+encodeURIComponent(_0x4d91ac));if(!_0x7c458[_0x4c2035(0xbe)])throw CliErrors[_0x4c2035(0xf8)](_0x4c2035(0xfc)+_0x44cbac);return _0x7c458[_0x4c2035(0xbe)];}export async function createPersonalBff(_0x28915c,_0x4c344a){const _0x339778=a65_0x3700,_0x550f8f=await apiRequest('/client/runtime-bff/personal/create',{'method':_0x339778(0x10d),'body':{'appCode':_0x28915c,..._0x4c344a}});return _0x550f8f['data'];}export async function updatePersonalBff(_0x338c83,_0x29db30,_0x3d2325){const _0x4a34dc=a65_0x3700,_0x57053b=await apiRequest('/client/runtime-bff/personal/'+_0x338c83+_0x4a34dc(0xe7),{'method':_0x4a34dc(0x10d),'body':{'appCode':_0x29db30,..._0x3d2325}});return _0x57053b[_0x4a34dc(0xbe)];}export async function executePersonalBff(_0x5aafc1,_0x2970e0,_0x258697){const _0x464aa=a65_0x3700,_0x43cf62=await apiRequest('/client/runtime-bff/personal/'+_0x5aafc1+_0x464aa(0xd4)+encodeURIComponent(_0x2970e0),{'method':'POST','body':_0x258697});return _0x43cf62['data'];}export async function listPersonalKnowledgeBaseItems(_0x1e6ca8){const _0x462f47=a65_0x3700,_0xca7d97=await apiRequest(_0x462f47(0xdc)+encodeURIComponent(_0x1e6ca8));return Array[_0x462f47(0x125)](_0xca7d97['data'])?_0xca7d97[_0x462f47(0xbe)]:[];}export async function getPersonalKnowledgeBaseItem(_0x1d309e,_0x82cbb6){const _0x1eb946=a65_0x3700,_0x355ab8=await apiRequest(_0x1eb946(0xef)+_0x1d309e+'?appCode='+encodeURIComponent(_0x82cbb6));if(!_0x355ab8[_0x1eb946(0xbe)])throw CliErrors['validation'](_0x1eb946(0xe5)+_0x1d309e);return _0x355ab8['data'];}export async function createPersonalKnowledgeBaseItem(_0x3af25a,_0x3566f6){const _0x23a585=a65_0x3700,_0x37d6ba=await apiRequest(_0x23a585(0x106),{'method':_0x23a585(0x10d),'body':{'appCode':_0x3af25a,..._0x3566f6}});return _0x37d6ba[_0x23a585(0xbe)];}export async function updatePersonalKnowledgeBaseItem(_0x49bea3,_0xb0c79e,_0x854650){const _0x3a84e7=a65_0x3700,_0x1f4afd=await apiRequest(_0x3a84e7(0xef)+_0x49bea3+_0x3a84e7(0xe7),{'method':_0x3a84e7(0x10d),'body':{'appCode':_0xb0c79e,..._0x854650}});return _0x1f4afd[_0x3a84e7(0xbe)];}export async function searchKnowledgeBase(_0xf4c16f,_0x36bc82){const _0x41931b=a65_0x3700,_0x343fc5=await apiRequest(_0x41931b(0xc2),{'method':_0x41931b(0x10d),'body':{'appCode':_0xf4c16f,'query':_0x36bc82[_0x41931b(0xcf)],..._0x36bc82['topK']!==undefined?{'topK':_0x36bc82[_0x41931b(0x12b)]}:{}}});return Array['isArray'](_0x343fc5[_0x41931b(0xbe)])?_0x343fc5['data']:[];}export async function listRuntimeSkills(_0x5df392){const _0x3264e8=a65_0x3700,_0x4552f5=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0x5df392[_0x3264e8(0x127)])+_0x3264e8(0xd5),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x5df392[_0x3264e8(0x127)],_0x4552f5,_0x5df392[_0x3264e8(0xbc)]??_0x3264e8(0xde),_0x5df392[_0x3264e8(0xe8)]);}export async function listPersonalRuntimeSkills(_0x1acbd){const _0x1d3723=a65_0x3700;return(await listRuntimeSkills({'appCode':_0x1acbd,'scope':'personal'}))[_0x1d3723(0xb1)];}export async function listCompanyRuntimeSkills(_0x5bebf3){return(await listRuntimeSkills({'appCode':_0x5bebf3,'scope':'company'}))['company'];}export async function listVisibleRuntimeSkills(_0x358a41){const _0x1ba150=a65_0x3700;return(await listRuntimeSkills({'appCode':_0x358a41,'scope':'all'}))[_0x1ba150(0xbb)];}export async function createPersonalRuntimeSkill(_0xba757e,_0x57fd70){return publishRuntimeSkill(_0xba757e,_0x57fd70);}function a65_0x3700(_0xd18229,_0x241ddd){_0xd18229=_0xd18229-0xb1;const _0x25ecc1=a65_0x25ec();let _0x370034=_0x25ecc1[_0xd18229];return _0x370034;}export async function updatePersonalRuntimeSkill(_0x527661,_0x17bbd9,_0x100f5c){const _0x550e9e=a65_0x3700;return publishRuntimeSkill(_0x17bbd9,{..._0x100f5c,'skillCode':_0x100f5c[_0x550e9e(0xda)]??_0x527661});}export async function downloadRuntimeSkillPackage(_0x1fc8af,_0x516d62,_0x5ce657,_0x733136){const _0x5b0276=a65_0x3700;void _0x1fc8af;const _0x4ab33e=_0x733136?_0x5b0276(0xf4)+encodeURIComponent(_0x5ce657)+'/'+encodeURIComponent(_0x516d62)+'/versions/'+encodeURIComponent(_0x733136)+'/download':'/api/cli/v1/skills/'+encodeURIComponent(_0x5ce657)+'/'+encodeURIComponent(_0x516d62)+_0x5b0276(0xfa);return skillHubBinaryRequest(_0x4ab33e);}async function publishRuntimeSkill(_0x2d0aee,_0x19a167){const _0x190c61=a65_0x3700,_0x1947a8=new FormData();_0x1947a8['set'](_0x190c61(0x118),runtimeSkillPackageFile(_0x19a167)),_0x1947a8[_0x190c61(0xc3)](_0x190c61(0xb4),_0x190c61(0x124));const _0x19ac95=await skillHubJsonRequest(_0x190c61(0xf4)+encodeURIComponent(_0x2d0aee)+'/publish',{'method':_0x190c61(0x10d),'body':_0x1947a8});return{'appCode':_0x19ac95[_0x190c61(0x101)]??_0x2d0aee,'skillCode':_0x19ac95[_0x190c61(0x133)]??_0x19a167[_0x190c61(0xda)]??'','skillName':_0x19a167[_0x190c61(0xcd)]??_0x19ac95['slug']??_0x19a167[_0x190c61(0xda)],'description':_0x19a167[_0x190c61(0x110)],'scope':skillHubVisibilityToScope(_0x19ac95[_0x190c61(0xb4)])??'personal','version':_0x19ac95[_0x190c61(0xf6)]??_0x19a167[_0x190c61(0xf6)],'tags':_0x19a167[_0x190c61(0x117)],'content':_0x19a167[_0x190c61(0xc9)]};}function runtimeSkillPackageFile(_0x1f78b7){const _0x45c06b=a65_0x3700;if(!_0x1f78b7['packageBase64'])throw CliErrors[_0x45c06b(0xf8)](_0x45c06b(0xfb));const _0x2a33a7=Buffer[_0x45c06b(0xff)](_0x1f78b7[_0x45c06b(0xec)],_0x45c06b(0x10e)),_0x5f3919=new Blob([_0x2a33a7],{'type':'application/zip'}),_0x19238c=(_0x1f78b7[_0x45c06b(0xda)]||_0x45c06b(0xd1))+_0x45c06b(0x120);if(typeof File!==_0x45c06b(0xee))return new File([_0x5f3919],_0x19238c,{'type':_0x45c06b(0xb7)});return _0x5f3919;}function normalizeSkillHubRuntimeListResponse(_0x4d235e,_0x3aa3f8,_0x440a20,_0x5599cd){const _0x168c4c=a65_0x3700,_0x49f8d4=Array['isArray'](_0x3aa3f8)?_0x3aa3f8:Array[_0x168c4c(0x125)](_0x3aa3f8?.[_0x168c4c(0xb3)])?_0x3aa3f8[_0x168c4c(0xb3)]:[],_0x4be92c=_0x5599cd?.[_0x168c4c(0x112)](),_0x836b8=_0x49f8d4[_0x168c4c(0xc6)](_0x556129=>!_0x4be92c||_0x556129[_0x168c4c(0x133)]===_0x4be92c)[_0x168c4c(0xd3)](skillHubRuntimeItemToRuntimeSkill)[_0x168c4c(0xc6)](_0x2e7709=>Boolean(_0x2e7709)),_0xd5b70e=_0x836b8[_0x168c4c(0xc6)](_0x3fec4f=>_0x3fec4f[_0x168c4c(0xbc)]===_0x168c4c(0xb1)),_0x1e24be=_0x836b8[_0x168c4c(0xc6)](_0x540c49=>_0x540c49[_0x168c4c(0xbc)]===_0x168c4c(0xc8));return{'appCode':_0x4d235e,'personal':_0x440a20==='company'?[]:_0xd5b70e,'company':_0x440a20===_0x168c4c(0xb1)?[]:_0x1e24be,'effective':buildEffectiveRuntimeSkills(_0xd5b70e,_0x1e24be,_0x440a20)};}function skillHubRuntimeItemToRuntimeSkill(_0x35b100){const _0x62c0f9=a65_0x3700,_0x143f11=_0x35b100[_0x62c0f9(0x133)]?.[_0x62c0f9(0x112)](),_0x16548c=skillHubVisibilityToScope(_0x35b100[_0x62c0f9(0xb4)]);if(!_0x143f11||!_0x16548c)return undefined;return{'id':_0x35b100['id'],'appCode':_0x35b100[_0x62c0f9(0x101)],'skillCode':_0x143f11,'skillName':_0x35b100[_0x62c0f9(0x104)]??_0x143f11,'description':_0x35b100[_0x62c0f9(0xdd)],'scope':_0x16548c,'version':skillHubRuntimeItemVersion(_0x35b100),'status':_0x35b100[_0x62c0f9(0x11b)]};}function skillHubVisibilityToScope(_0x251f0c){const _0xc87b40=a65_0x3700;if(_0x251f0c===_0xc87b40(0x124))return _0xc87b40(0xb1);if(_0x251f0c===_0xc87b40(0xe9))return _0xc87b40(0xc8);return undefined;}function skillHubRuntimeItemVersion(_0x1262fd){const _0x35382e=a65_0x3700;return _0x1262fd[_0x35382e(0xf3)]?.[_0x35382e(0xf6)]??_0x1262fd[_0x35382e(0x12f)]?.[_0x35382e(0xf6)]??_0x1262fd[_0x35382e(0xcb)]?.['version'];}function buildEffectiveRuntimeSkills(_0x3788c3,_0x70800a,_0x578f54){const _0xad216d=a65_0x3700;if(_0x578f54==='personal')return _0x3788c3;if(_0x578f54===_0xad216d(0xc8))return _0x70800a;const _0x17d77d=new Map();for(const _0x23514a of _0x70800a){_0x17d77d['set'](_0x23514a[_0xad216d(0xda)],_0x23514a);}for(const _0x2aa6c8 of _0x3788c3){_0x17d77d[_0xad216d(0xc3)](_0x2aa6c8['skillCode'],_0x2aa6c8);}return Array['from'](_0x17d77d[_0xad216d(0xea)]());}function normalizeRuntimeSkillListResponse(_0x25b779,_0x108040){const _0x6c0b8c=a65_0x3700;if(Array[_0x6c0b8c(0x125)](_0x108040)){const _0xd221aa=_0x108040['filter'](_0xb63471=>_0xb63471['scope']===_0x6c0b8c(0xb1)),_0x310232=_0x108040[_0x6c0b8c(0xc6)](_0xc8b107=>_0xc8b107['scope']===_0x6c0b8c(0xc8));return{'appCode':_0x25b779,'personal':_0xd221aa,'company':_0x310232,'effective':[..._0x310232,..._0xd221aa]};}return{'appCode':_0x108040?.[_0x6c0b8c(0x127)]??_0x25b779,'personal':Array[_0x6c0b8c(0x125)](_0x108040?.[_0x6c0b8c(0xb1)])?_0x108040['personal']:[],'company':Array['isArray'](_0x108040?.[_0x6c0b8c(0xc8)])?_0x108040[_0x6c0b8c(0xc8)]:[],'effective':Array[_0x6c0b8c(0x125)](_0x108040?.[_0x6c0b8c(0xbb)])?_0x108040[_0x6c0b8c(0xbb)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40d4af,_0x21fc6a){const _0x1a5c1a=a66_0x1f35,_0x79facb=_0x40d4af();while(!![]){try{const _0x59260a=parseInt(_0x1a5c1a(0x94))/0x1+parseInt(_0x1a5c1a(0x8b))/0x2*(parseInt(_0x1a5c1a(0x9a))/0x3)+parseInt(_0x1a5c1a(0x9b))/0x4+-parseInt(_0x1a5c1a(0x89))/0x5*(-parseInt(_0x1a5c1a(0x96))/0x6)+parseInt(_0x1a5c1a(0x9c))/0x7+-parseInt(_0x1a5c1a(0x95))/0x8*(-parseInt(_0x1a5c1a(0x8d))/0x9)+parseInt(_0x1a5c1a(0x90))/0xa*(-parseInt(_0x1a5c1a(0x8a))/0xb);if(_0x59260a===_0x21fc6a)break;else _0x79facb['push'](_0x79facb['shift']());}catch(_0x581feb){_0x79facb['push'](_0x79facb['shift']());}}}(a66_0x5c36,0x9a632));import{listDatasets}from'../core/api-client.js';function a66_0x5c36(){const _0x558526=['956979CjUvyB','get','dbtableConfig','10eFCVov','map','find','dbName','371120hzLuQp','88TVisdu','6HoQSmZ','entries','dbId','db-','10266ZVUcDZ','1246264ccCdOQ','1811243yLPylh','set','5484335aZJDoa','31041527ZnxMhR','144SBURQC','has'];a66_0x5c36=function(){return _0x558526;};return a66_0x5c36();}const cache=new Map();export async function listDatabases(_0x2dc9c0){const _0x2d6447=a66_0x1f35;if(cache[_0x2d6447(0x8c)](_0x2dc9c0))return cache[_0x2d6447(0x8e)](_0x2dc9c0);const _0x1c6987=await listDatasets(_0x2dc9c0),_0x2491a2=new Map();for(const _0x2cc7f of _0x1c6987){const _0x2ff3e1=_0x2cc7f[_0x2d6447(0x8f)];_0x2ff3e1?.['dbId']!=null&&_0x2491a2['set'](_0x2ff3e1[_0x2d6447(0x98)],_0x2ff3e1[_0x2d6447(0x93)]??_0x2d6447(0x99)+_0x2ff3e1['dbId']);}const _0x2ef432=[..._0x2491a2[_0x2d6447(0x97)]()][_0x2d6447(0x91)](([_0x16faca,_0x3b3693])=>({'dbId':_0x16faca,'dbName':_0x3b3693}));return cache[_0x2d6447(0x9d)](_0x2dc9c0,_0x2ef432),_0x2ef432;}function a66_0x1f35(_0x32613e,_0x936ef8){_0x32613e=_0x32613e-0x89;const _0x5c368a=a66_0x5c36();let _0x1f35bb=_0x5c368a[_0x32613e];return _0x1f35bb;}export async function getDbName(_0x3c1c8b,_0x54fc32){const _0x44b0f5=a66_0x1f35;try{const _0x498181=await listDatabases(_0x3c1c8b);return _0x498181[_0x44b0f5(0x92)](_0x33bb4d=>_0x33bb4d[_0x44b0f5(0x98)]===_0x54fc32)?.[_0x44b0f5(0x93)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ecf50,_0x44f4f1){const _0xd1dd94=a67_0x32d8,_0x489bbe=_0x3ecf50();while(!![]){try{const _0x26060a=-parseInt(_0xd1dd94(0x1c0))/0x1*(parseInt(_0xd1dd94(0x1b2))/0x2)+-parseInt(_0xd1dd94(0x1bf))/0x3*(parseInt(_0xd1dd94(0x1c5))/0x4)+-parseInt(_0xd1dd94(0x1c1))/0x5+-parseInt(_0xd1dd94(0x1a9))/0x6+-parseInt(_0xd1dd94(0x1ba))/0x7+-parseInt(_0xd1dd94(0x1af))/0x8*(-parseInt(_0xd1dd94(0x1a4))/0x9)+parseInt(_0xd1dd94(0x1a3))/0xa;if(_0x26060a===_0x44f4f1)break;else _0x489bbe['push'](_0x489bbe['shift']());}catch(_0xa34535){_0x489bbe['push'](_0x489bbe['shift']());}}}(a67_0x1ff6,0xbb7f7));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;function a67_0x32d8(_0xf79a72,_0x1d8421){_0xf79a72=_0xf79a72-0x19d;const _0x1ff68b=a67_0x1ff6();let _0x32d85e=_0x1ff68b[_0xf79a72];return _0x32d85e;}export function initSdkClient(_0x4c201c){const _0x3b88b1=a67_0x32d8;_client=createClient({'appCode':_0x4c201c[_0x3b88b1(0x19f)],'env':_0x4c201c[_0x3b88b1(0x1bd)],'authMode':_0x4c201c[_0x3b88b1(0x1a6)],..._0x4c201c[_0x3b88b1(0x19d)]?{'accessKey':_0x4c201c['accessKey']}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x3b88b1(0x1b3)]}}});}function ensureClient(){if(!_client)throw new Error('SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.');return _client;}function a67_0x1ff6(){const _0x3c65e0=['env','isArray','24324mlAmpo','665YuabsZ','7576245XYreRH','aggregate','batchCreate','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','460xGrbAr','validation','accessKey','data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.','appCode','sql','string','models','44195740jeYvPs','39213bVxglw','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','authMode',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.',']\x20must\x20be\x20an\x20object.','2990736NwQLqE','delete','object','execute','dataset_','getOne','1408ijJQXW','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','3668voPGzl','invokeSource','function','field','bff','data\x20aggregate\x20--params.aggregate[','trim','update','1768760JmeuGp','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','map'];a67_0x1ff6=function(){return _0x3c65e0;};return a67_0x1ff6();}function normalizeAggregateParams(_0x6e66f4){const _0x25bafa=a67_0x32d8,_0x6f9cc8=_0x6e66f4['aggregate'];if(_0x6f9cc8===undefined)return _0x6e66f4;if(!Array[_0x25bafa(0x1be)](_0x6f9cc8))throw CliErrors[_0x25bafa(0x1c6)](_0x25bafa(0x19e));return{..._0x6e66f4,'aggregate':_0x6f9cc8[_0x25bafa(0x1bc)]((_0x4ca450,_0x5974cf)=>{const _0x46f6ca=_0x25bafa;if(!_0x4ca450||typeof _0x4ca450!==_0x46f6ca(0x1ab)||Array[_0x46f6ca(0x1be)](_0x4ca450))throw CliErrors[_0x46f6ca(0x1c6)]('data\x20aggregate\x20--params.aggregate['+_0x5974cf+_0x46f6ca(0x1a8));const _0x4eccb5=_0x4ca450['column']??_0x4ca450[_0x46f6ca(0x1b5)];if(typeof _0x4eccb5!==_0x46f6ca(0x1a1)||_0x4eccb5[_0x46f6ca(0x1b8)]()==='')throw CliErrors['validation'](_0x46f6ca(0x1b7)+_0x5974cf+_0x46f6ca(0x1a7));const _0x8b7c={..._0x4ca450,'column':_0x4eccb5};return delete _0x8b7c['field'],_0x8b7c;})};}export async function executeData(_0x9397ba,_0x1e8b20,_0x11a85b){const _0x36b813=a67_0x32d8,_0xd5a9e9=ensureClient(),_0x21de6e=_0x36b813(0x1ad)+_0x9397ba,_0x203ee8=_0xd5a9e9[_0x36b813(0x1a2)][_0x21de6e];if(!_0x203ee8||typeof _0x203ee8[_0x1e8b20]!==_0x36b813(0x1b4))throw new Error(_0x36b813(0x1b0)+_0x1e8b20+'\x22.\x20'+_0x36b813(0x1a5));if(_0x1e8b20==='batchCreate')return _0x203ee8[_0x36b813(0x1c3)](parseBatchCreateItemsFromParams(_0x11a85b));const _0x393ad3=_0x11a85b!==undefined&&_0x11a85b!==null&&!Array[_0x36b813(0x1be)](_0x11a85b)?_0x11a85b:{};switch(_0x1e8b20){case _0x36b813(0x1ae):{const _0x51adb9=_0x393ad3['id'];if(_0x51adb9===undefined||_0x51adb9===null)throw new Error(_0x36b813(0x1bb));return _0x203ee8[_0x36b813(0x1ae)](_0x51adb9);}case _0x36b813(0x1b9):{const {id:_0x485422,..._0x21db56}=_0x393ad3;if(_0x485422===undefined||_0x485422===null)throw new Error(_0x36b813(0x1c4));return _0x203ee8[_0x36b813(0x1b9)](_0x485422,_0x21db56);}case _0x36b813(0x1aa):{const _0x53ca30=_0x393ad3['id'];if(_0x53ca30===undefined||_0x53ca30===null)throw new Error(_0x36b813(0x1b1));return _0x203ee8['delete'](_0x53ca30);}case _0x36b813(0x1c2):return _0x203ee8['aggregate'](normalizeAggregateParams(_0x393ad3));default:return _0x203ee8[_0x1e8b20](_0x393ad3);}}export async function executeSdkSql(_0xe8bc3b,_0x54f1be){const _0x2a4c68=a67_0x32d8,_0x563390=ensureClient();return _0x563390[_0x2a4c68(0x1a0)][_0x2a4c68(0x1ac)]({'sqlCode':_0xe8bc3b,'params':_0x54f1be});}export async function executeSdkBff(_0x1d5638,_0x4f37ae){const _0xcda791=a67_0x32d8,_0x5c7101=ensureClient();return _0x5c7101[_0xcda791(0x1b6)]['execute']({'scriptName':_0x1d5638,'params':_0x4f37ae});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x1370bf=a68_0x16c4;(function(_0x1b1c21,_0x588738){const _0x1b8116=a68_0x16c4,_0x18b05c=_0x1b1c21();while(!![]){try{const _0x36e678=-parseInt(_0x1b8116(0x1d5))/0x1+-parseInt(_0x1b8116(0x1d4))/0x2*(-parseInt(_0x1b8116(0x1d6))/0x3)+-parseInt(_0x1b8116(0x1cb))/0x4+-parseInt(_0x1b8116(0x1cf))/0x5*(-parseInt(_0x1b8116(0x1d1))/0x6)+-parseInt(_0x1b8116(0x1ce))/0x7*(-parseInt(_0x1b8116(0x1c8))/0x8)+parseInt(_0x1b8116(0x1d2))/0x9*(parseInt(_0x1b8116(0x1d0))/0xa)+-parseInt(_0x1b8116(0x1d3))/0xb;if(_0x36e678===_0x588738)break;else _0x18b05c['push'](_0x18b05c['shift']());}catch(_0x287651){_0x18b05c['push'](_0x18b05c['shift']());}}}(a68_0x4e17,0x823c2));function a68_0x4e17(){const _0x4b70ac=['1142205mGgLCv','9360370WWdGpI','18HlslUB','9YtIPGL','7662633BLHObI','2NSGjxR','524491ptQbhd','2087478kWYwdR','\x20file.','5512ofVYMu','\x20auth\x20login`.','Set\x20appcode\x20via\x20--appcode\x20or\x20','3047084XYTjtN','newConfigFileName','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','2023FNeSay'];a68_0x4e17=function(){return _0x4b70ac;};return a68_0x4e17();}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a68_0x16c4(_0x16c04a,_0x2fc76f){_0x16c04a=_0x16c04a-0x1c7;const _0x4e17d7=a68_0x4e17();let _0x16c4e1=_0x4e17d7[_0x16c04a];return _0x16c4e1;}import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'\x20or\x20run\x20`'+CLI_BIN_NAME+a68_0x1370bf(0x1c9),'configMissingHint':a68_0x1370bf(0x1ca)+PRODUCT_CONFIG['newConfigFileName']+'.','notInProjectHint':a68_0x1370bf(0x1cd)+PRODUCT_CONFIG[a68_0x1370bf(0x1cc)]+a68_0x1370bf(0x1c7)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1004c4,_0x18cad6){var _0x73bbf2=a69_0x2992,_0x1f0e0f=_0x1004c4();while(!![]){try{var _0x1d45ec=-parseInt(_0x73bbf2(0x1ba))/0x1*(-parseInt(_0x73bbf2(0x1bd))/0x2)+parseInt(_0x73bbf2(0x1b8))/0x3+parseInt(_0x73bbf2(0x1b6))/0x4+parseInt(_0x73bbf2(0x1bb))/0x5+parseInt(_0x73bbf2(0x1b7))/0x6+-parseInt(_0x73bbf2(0x1bc))/0x7*(-parseInt(_0x73bbf2(0x1b9))/0x8)+-parseInt(_0x73bbf2(0x1be))/0x9;if(_0x1d45ec===_0x18cad6)break;else _0x1f0e0f['push'](_0x1f0e0f['shift']());}catch(_0x88df67){_0x1f0e0f['push'](_0x1f0e0f['shift']());}}}(a69_0x22f9,0x92fcd));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a69_0x215f91}from'@lovrabet/cli-framework';function a69_0x2992(_0x112bae,_0x4f9f80){_0x112bae=_0x112bae-0x1b6;var _0x22f918=a69_0x22f9();var _0x2992b5=_0x22f918[_0x112bae];return _0x2992b5;}export function buildAllFlags(_0xcdb7f4){return a69_0x215f91(_0xcdb7f4,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}function a69_0x22f9(){var _0x5acbdb=['1861fFaRrd','3924235udcdNy','7lkHFEg','902HYbrUe','32539572gEurkc','4666644tcTjft','3345414UuwzcR','357000XOnAbJ','6001448tpLygp'];a69_0x22f9=function(){return _0x5acbdb;};return a69_0x22f9();}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2baf2a,_0x585883){const _0x3a72f8=a70_0x2b9f,_0x1be547=_0x2baf2a();while(!![]){try{const _0x35a009=parseInt(_0x3a72f8(0x91))/0x1*(-parseInt(_0x3a72f8(0x92))/0x2)+parseInt(_0x3a72f8(0x8e))/0x3+parseInt(_0x3a72f8(0x8f))/0x4+-parseInt(_0x3a72f8(0x8d))/0x5+-parseInt(_0x3a72f8(0x95))/0x6+parseInt(_0x3a72f8(0x94))/0x7*(parseInt(_0x3a72f8(0x8c))/0x8)+parseInt(_0x3a72f8(0x93))/0x9;if(_0x35a009===_0x585883)break;else _0x1be547['push'](_0x1be547['shift']());}catch(_0x5b9a32){_0x1be547['push'](_0x1be547['shift']());}}}(a70_0x5d85,0x22fb4));export function dryRun(_0x59962e,_0x431bd8){const _0x3ed156={'method':_0x59962e,'url':_0x431bd8},_0x29b14a={'body'(_0x3468d8){const _0x1c49e5=a70_0x2b9f;return _0x3ed156[_0x1c49e5(0x90)]=_0x3468d8,_0x29b14a;},'description'(_0x303fc3){const _0x3daef6=a70_0x2b9f;return _0x3ed156[_0x3daef6(0x96)]=_0x303fc3,_0x29b14a;},'build'(){return{..._0x3ed156};}};return _0x29b14a;}function a70_0x2b9f(_0x5e8a75,_0x169eff){_0x5e8a75=_0x5e8a75-0x8c;const _0x5d85d7=a70_0x5d85();let _0x2b9f2d=_0x5d85d7[_0x5e8a75];return _0x2b9f2d;}function a70_0x5d85(){const _0xe8b81c=['1376262lYadua','description','40sdIjyp','455985MoppiY','68919vPZaNq','1040144zKvbkx','body','269PRvOFp','2038aqPVop','3983625GnNIwl','17269gfzzYO'];a70_0x5d85=function(){return _0xe8b81c;};return a70_0x5d85();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x592afd=a71_0x1f27;(function(_0x1e9955,_0x2f001b){const _0x6e9bd5=a71_0x1f27,_0x3cd58b=_0x1e9955();while(!![]){try{const _0x36149d=parseInt(_0x6e9bd5(0xbd))/0x1+-parseInt(_0x6e9bd5(0xb3))/0x2+parseInt(_0x6e9bd5(0xb9))/0x3*(-parseInt(_0x6e9bd5(0xb7))/0x4)+parseInt(_0x6e9bd5(0xb5))/0x5*(parseInt(_0x6e9bd5(0xbb))/0x6)+-parseInt(_0x6e9bd5(0xb6))/0x7*(parseInt(_0x6e9bd5(0xb8))/0x8)+-parseInt(_0x6e9bd5(0xb1))/0x9*(parseInt(_0x6e9bd5(0xb2))/0xa)+parseInt(_0x6e9bd5(0xba))/0xb*(parseInt(_0x6e9bd5(0xb4))/0xc);if(_0x36149d===_0x2f001b)break;else _0x3cd58b['push'](_0x3cd58b['shift']());}catch(_0x485743){_0x3cd58b['push'](_0x3cd58b['shift']());}}}(a71_0x1d5f,0x93fd8));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a71_0x1f27(_0xcf7e45,_0x27faeb){_0xcf7e45=_0xcf7e45-0xb1;const _0x1d5f55=a71_0x1d5f();let _0x1f278f=_0x1d5f55[_0xcf7e45];return _0x1f278f;}function a71_0x1d5f(){const _0x3bf2c8=['6740CYJhTa','1284430cHmIzF','1212Oauwpi','5aMcJdY','14mrIrfd','12yizYap','127016HhzaTU','669198MhmiPh','145211rpaWau','2318586JSutXf','parseFlags','389341KSTgvN','2133oFKqZT'];a71_0x1d5f=function(){return _0x3bf2c8;};return a71_0x1d5f();}const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a71_0x592afd(0xbc)];export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x147d00,_0x338fd){const _0x5552f9=a72_0x4c0d,_0xe92e6b=_0x147d00();while(!![]){try{const _0x5b010a=parseInt(_0x5552f9(0xa0))/0x1+-parseInt(_0x5552f9(0xab))/0x2+-parseInt(_0x5552f9(0xa6))/0x3+-parseInt(_0x5552f9(0xad))/0x4+parseInt(_0x5552f9(0xaa))/0x5+-parseInt(_0x5552f9(0xac))/0x6+parseInt(_0x5552f9(0xa4))/0x7;if(_0x5b010a===_0x338fd)break;else _0xe92e6b['push'](_0xe92e6b['shift']());}catch(_0x11601b){_0xe92e6b['push'](_0xe92e6b['shift']());}}}(a72_0x2834,0xe0eb3));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 a72_0x4c0d(_0x7e51fb,_0x315938){_0x7e51fb=_0x7e51fb-0x9e;const _0x28349e=a72_0x2834();let _0x4c0dd2=_0x28349e[_0x7e51fb];return _0x4c0dd2;}function createGenerators(){const _0x1e784a=a72_0x4c0d;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[...serviceRegistry,...safeListDynamicServiceEntries()],'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x1e784a(0xa2)+PRODUCT_CONFIG[_0x1e784a(0x9e)]+_0x1e784a(0xae)});}export function generateCommandHelp(_0x187cb0){const _0x18f819=a72_0x4c0d;return createGenerators()[_0x18f819(0x9f)](_0x187cb0);}export function generateServiceHelp(_0x4dc8ed){const _0x1c7578=a72_0x4c0d;return createGenerators()[_0x1c7578(0xa3)](_0x4dc8ed);}export function generateFullHelp(){return createGenerators()['generateFullHelp']();}function a72_0x2834(){const _0xc36f2c=['11190228ugSQAG','filter','978240XXwvdX','service','map','get','2448430BLaqkV','288716IIEHvy','3658776hFzbui','5680620HJYbsi','\x20or\x20--appcode).','newConfigFileName','generateCommandHelp','1333366aKYZtt','has','Requires\x20appcode\x20(set\x20via\x20','generateServiceHelp'];a72_0x2834=function(){return _0xc36f2c;};return a72_0x2834();}function getAnyServiceEntry(_0x3c3bf8){const _0x48c501=getServiceEntry(_0x3c3bf8);if(_0x48c501)return _0x48c501;try{return getDynamicServiceEntry(_0x3c3bf8);}catch{return undefined;}}function getAnyServiceDefinitions(_0x1341d2){const _0x255549=a72_0x4c0d,_0x30ae6f=serviceGroups[_0x255549(0xa9)](_0x1341d2);if(_0x30ae6f)return _0x30ae6f;try{return getDynamicServiceDefinitions(_0x1341d2);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x1162f5=a72_0x4c0d,_0x189ffd=new Set(serviceRegistry[_0x1162f5(0xa8)](_0x3ae7e5=>_0x3ae7e5[_0x1162f5(0xa7)]));try{return listDynamicServiceEntries()[_0x1162f5(0xa5)](_0x16fbe9=>!_0x189ffd[_0x1162f5(0xa1)](_0x16fbe9[_0x1162f5(0xa7)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb84b80,_0x31addc){var _0x4d5169=a73_0x1dd9,_0x5cf391=_0xb84b80();while(!![]){try{var _0x2c9bb3=-parseInt(_0x4d5169(0x162))/0x1+-parseInt(_0x4d5169(0x163))/0x2+-parseInt(_0x4d5169(0x15d))/0x3+parseInt(_0x4d5169(0x160))/0x4*(parseInt(_0x4d5169(0x15f))/0x5)+-parseInt(_0x4d5169(0x15c))/0x6+parseInt(_0x4d5169(0x15e))/0x7+parseInt(_0x4d5169(0x161))/0x8;if(_0x2c9bb3===_0x31addc)break;else _0x5cf391['push'](_0x5cf391['shift']());}catch(_0x293721){_0x5cf391['push'](_0x5cf391['shift']());}}}(a73_0x10e9,0xc77f9));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';function a73_0x1dd9(_0x54ef1d,_0x13dee2){_0x54ef1d=_0x54ef1d-0x15c;var _0x10e9c0=a73_0x10e9();var _0x1dd9f6=_0x10e9c0[_0x54ef1d];return _0x1dd9f6;}export{dryRun}from'../framework/dryrun.js';export{riskLevelOrder,isValidFormat}from'../framework/types.js';function a73_0x10e9(){var _0x1477cf=['170832qGzjWU','302202ThJULR','499396abSwum','733434Lpnqsl','871944OepoNQ','10068884lhNdsD','123910ybzqUQ','52bmHEgi'];a73_0x10e9=function(){return _0x1477cf;};return a73_0x10e9();}
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d26c0,_0x15bbfe){const _0x4c1289=a74_0x405e,_0x22dc13=_0x1d26c0();while(!![]){try{const _0x393d0d=parseInt(_0x4c1289(0x1be))/0x1*(parseInt(_0x4c1289(0x1b6))/0x2)+parseInt(_0x4c1289(0x1b5))/0x3+parseInt(_0x4c1289(0x1ba))/0x4*(parseInt(_0x4c1289(0x1b7))/0x5)+parseInt(_0x4c1289(0x1b4))/0x6*(-parseInt(_0x4c1289(0x1c1))/0x7)+parseInt(_0x4c1289(0x1b3))/0x8+-parseInt(_0x4c1289(0x1c2))/0x9+-parseInt(_0x4c1289(0x1b8))/0xa;if(_0x393d0d===_0x15bbfe)break;else _0x22dc13['push'](_0x22dc13['shift']());}catch(_0xd4c322){_0x22dc13['push'](_0x22dc13['shift']());}}}(a74_0x2361,0x8e94f));import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a74_0x405e(_0x10ccc7,_0x13b920){_0x10ccc7=_0x10ccc7-0x1b3;const _0x23616f=a74_0x2361();let _0x405e74=_0x23616f[_0x10ccc7];return _0x405e74;}function a74_0x2361(){const _0x413207=['_notice','pretty','17Tdoalj','error','url','1645OBvCnC','8130726KkOnVO','format','4922992BHEioL','15522BFfDus','602082DEkSiQ','109014CprOro','15970ZmjTEL','7588250YLLAAt','update','1392pJojUK','message'];a74_0x2361=function(){return _0x413207;};return a74_0x2361();}const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x20910d,_0x3d5ec1){const _0x13bd4c=a74_0x405e,_0x2c26a3=_0x20910d[_0x13bd4c(0x1bc)],{_notice:_0x1ac263,..._0x41d649}=_0x20910d;void _0x1ac263,baseFormatOutput(_0x41d649,_0x3d5ec1),_0x3d5ec1[_0x13bd4c(0x1c3)]===_0x13bd4c(0x1bd)&&printPrettyNotice(_0x2c26a3);}function printPrettyNotice(_0x3d70bd){const _0x5865e0=a74_0x405e;if(!_0x3d70bd?.[_0x5865e0(0x1b9)])return;console[_0x5865e0(0x1bf)](_0x3d70bd[_0x5865e0(0x1b9)][_0x5865e0(0x1bb)]+'\x20('+_0x3d70bd[_0x5865e0(0x1b9)][_0x5865e0(0x1c0)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2bb8c4,_0x48e535){const _0x51a9b6=a75_0x40a4,_0x2d1daf=_0x2bb8c4();while(!![]){try{const _0x3a63b0=-parseInt(_0x51a9b6(0x150))/0x1*(-parseInt(_0x51a9b6(0x164))/0x2)+parseInt(_0x51a9b6(0x16b))/0x3*(parseInt(_0x51a9b6(0x172))/0x4)+-parseInt(_0x51a9b6(0x14f))/0x5*(parseInt(_0x51a9b6(0x16c))/0x6)+-parseInt(_0x51a9b6(0x15b))/0x7+parseInt(_0x51a9b6(0x16f))/0x8*(parseInt(_0x51a9b6(0x171))/0x9)+-parseInt(_0x51a9b6(0x165))/0xa+parseInt(_0x51a9b6(0x16a))/0xb*(-parseInt(_0x51a9b6(0x156))/0xc);if(_0x3a63b0===_0x48e535)break;else _0x2d1daf['push'](_0x2d1daf['shift']());}catch(_0x2296a9){_0x2d1daf['push'](_0x2d1daf['shift']());}}}(a75_0x252a,0x78cca));function a75_0x252a(){const _0x42e5d1=['2936zKwlNY','string','11133BvXmny','26468dGbmqU','format','set','indexOf','boolean','entries','669145EoEMPR','203LvOZKi','keys','yes','toLowerCase','toUpperCase','slice','192540hXkoQH','name','help','app','type','3164231RtIbft','global','get','dry-run','replace','corrected','non-interactive','add','original','7018bOSqpL','2555420dpcVal','push','has','env','appcode','11umSkCH','327wzWylw','30cZZzne','length','number'];a75_0x252a=function(){return _0x42e5d1;};return a75_0x252a();}function toKebab(_0xce11fd){const _0x73398e=a75_0x40a4;return _0xce11fd['replace'](/_/g,'-')[_0x73398e(0x15f)](/-([A-Z]+)/g,(_0xd848f6,_0x6f7252)=>'-'+_0x6f7252[_0x73398e(0x153)]())[_0x73398e(0x15f)](/([a-z0-9])([A-Z])/g,(_0x3b522f,_0x3d29ff,_0x3f4d28)=>_0x3d29ff+'-'+_0x3f4d28)[_0x73398e(0x153)]();}function a75_0x40a4(_0x2920f5,_0x4bfb89){_0x2920f5=_0x2920f5-0x14c;const _0x252a64=a75_0x252a();let _0x40a4ca=_0x252a64[_0x2920f5];return _0x40a4ca;}function buildKnownFlags(_0x5c612c){const _0x2a9045=a75_0x40a4,_0x1a1488=new Set();for(const _0x2a987d of _0x5c612c){_0x1a1488[_0x2a9045(0x162)](_0x2a987d[_0x2a9045(0x157)]),_0x1a1488[_0x2a9045(0x162)](toCamelCase(_0x2a987d[_0x2a9045(0x157)]));}for(const _0xfe57d4 of[_0x2a9045(0x15e),'dryRun',_0x2a9045(0x152),_0x2a9045(0x173)]){_0x1a1488['add'](_0xfe57d4);}for(const _0x21cddf of[_0x2a9045(0x158),_0x2a9045(0x168),_0x2a9045(0x169),_0x2a9045(0x159),'nonInteractive',_0x2a9045(0x161),'ci',_0x2a9045(0x15c),'version']){_0x1a1488[_0x2a9045(0x162)](_0x21cddf);}return _0x1a1488;}function buildFlagTypeMap(_0x51a1ca){const _0x5dbe41=a75_0x40a4,_0x5cb13a=new Map();for(const _0x26584c of _0x51a1ca){_0x5cb13a['set'](_0x26584c[_0x5dbe41(0x157)],_0x26584c[_0x5dbe41(0x15a)]),_0x5cb13a[_0x5dbe41(0x174)](toCamelCase(_0x26584c['name']),_0x26584c[_0x5dbe41(0x15a)]);}return _0x5cb13a;}function toCamelCase(_0x3a6908){const _0x9a9eb=a75_0x40a4;return _0x3a6908[_0x9a9eb(0x15f)](/-([a-z])/g,(_0x4db252,_0x15714d)=>_0x15714d[_0x9a9eb(0x154)]());}function aliasHandler(_0x54674a,_0x5988c6){const _0x10c92c=a75_0x40a4,_0x1152d8=[];for(const _0x4fd2b8 of Object[_0x10c92c(0x151)](_0x54674a)){if(_0x5988c6['has'](_0x4fd2b8))continue;const _0x1eeaf5=toKebab(_0x4fd2b8);_0x1eeaf5!==_0x4fd2b8&&_0x5988c6[_0x10c92c(0x167)](_0x1eeaf5)&&_0x1152d8[_0x10c92c(0x166)]({'original':_0x4fd2b8,'corrected':_0x1eeaf5,'handler':'alias'});}return _0x1152d8;}function stickyHandler(_0x4577dd,_0x4f16ec,_0x1802e6){const _0x49dd24=a75_0x40a4,_0x539ccb=[];for(const [_0x3ff40f,_0x5a8159]of Object[_0x49dd24(0x14e)](_0x4577dd)){if(_0x5a8159!==!![])continue;for(let _0x2a444e=_0x3ff40f[_0x49dd24(0x16d)]-0x1;_0x2a444e>0x0;_0x2a444e--){const _0x568447=_0x3ff40f[_0x49dd24(0x155)](0x0,_0x2a444e),_0x7afdb1=_0x3ff40f[_0x49dd24(0x155)](_0x2a444e),_0x31812e=toKebab(_0x568447),_0x9ff947=toCamelCase(_0x568447),_0x1c7aca=_0x4f16ec[_0x49dd24(0x167)](_0x568447)?_0x568447:_0x4f16ec[_0x49dd24(0x167)](_0x31812e)?_0x31812e:_0x4f16ec[_0x49dd24(0x167)](_0x9ff947)?_0x9ff947:null;if(!_0x1c7aca)continue;const _0x54968c=_0x1802e6[_0x49dd24(0x15d)](_0x1c7aca)??'string';let _0x83b60d;if(_0x54968c===_0x49dd24(0x16e)){const _0x25dee5=Number(_0x7afdb1);if(isNaN(_0x25dee5)||_0x7afdb1==='')continue;_0x83b60d=_0x25dee5;}else{if(_0x54968c===_0x49dd24(0x14d))continue;else{if(_0x7afdb1==='')continue;_0x83b60d=_0x7afdb1;}}_0x539ccb['push']({'original':_0x3ff40f,'corrected':_0x1c7aca+'='+_0x83b60d,'handler':'sticky'});break;}}return _0x539ccb;}export function correctFlags(_0x1ad7c4,_0x2bb80b){const _0x3c2c62=a75_0x40a4,_0x3cf768=buildKnownFlags(_0x2bb80b),_0x35bfad=buildFlagTypeMap(_0x2bb80b),_0x5843d5=aliasHandler(_0x1ad7c4,_0x3cf768),_0x28b41f=stickyHandler(_0x1ad7c4,_0x3cf768,_0x35bfad),_0x4f0ead=[..._0x5843d5,..._0x28b41f];if(_0x4f0ead[_0x3c2c62(0x16d)]===0x0)return{'flags':_0x1ad7c4,'corrections':[]};const _0x19f757={..._0x1ad7c4},_0x287a38=new Set();for(const _0x8f390e of _0x5843d5){_0x19f757[_0x8f390e[_0x3c2c62(0x160)]]=_0x1ad7c4[_0x8f390e[_0x3c2c62(0x163)]],_0x287a38['add'](_0x8f390e[_0x3c2c62(0x163)]);}for(const _0x7a6a2f of _0x28b41f){const _0x51ff6b=_0x7a6a2f[_0x3c2c62(0x160)][_0x3c2c62(0x14c)]('='),_0x1fff40=_0x7a6a2f[_0x3c2c62(0x160)][_0x3c2c62(0x155)](0x0,_0x51ff6b),_0x348aef=_0x7a6a2f[_0x3c2c62(0x160)]['slice'](_0x51ff6b+0x1),_0x4773bf=_0x35bfad['get'](_0x1fff40)??_0x3c2c62(0x170);_0x4773bf==='number'?_0x19f757[_0x1fff40]=Number(_0x348aef):_0x19f757[_0x1fff40]=_0x348aef,_0x287a38[_0x3c2c62(0x162)](_0x7a6a2f[_0x3c2c62(0x163)]);}for(const _0x345ab4 of _0x287a38){delete _0x19f757[_0x345ab4];}return{'flags':_0x19f757,'corrections':_0x4f0ead};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a76_0x20ca(_0x3d1f44,_0x4f8ce3){_0x3d1f44=_0x3d1f44-0x94;var _0x17fe75=a76_0x17fe();var _0x20cab5=_0x17fe75[_0x3d1f44];return _0x20cab5;}(function(_0x46ea1a,_0x486730){var _0x26550e=a76_0x20ca,_0x4ebaef=_0x46ea1a();while(!![]){try{var _0x211465=parseInt(_0x26550e(0x9c))/0x1*(parseInt(_0x26550e(0x9e))/0x2)+parseInt(_0x26550e(0x98))/0x3*(parseInt(_0x26550e(0x9f))/0x4)+parseInt(_0x26550e(0x9a))/0x5*(parseInt(_0x26550e(0x97))/0x6)+parseInt(_0x26550e(0x95))/0x7*(parseInt(_0x26550e(0x96))/0x8)+-parseInt(_0x26550e(0x99))/0x9*(-parseInt(_0x26550e(0x9b))/0xa)+-parseInt(_0x26550e(0x94))/0xb+-parseInt(_0x26550e(0x9d))/0xc;if(_0x211465===_0x486730)break;else _0x4ebaef['push'](_0x4ebaef['shift']());}catch(_0x5c4994){_0x4ebaef['push'](_0x4ebaef['shift']());}}}(a76_0x17fe,0x4f140));export{extractList,extractPaging}from'@lovrabet/cli-framework';function a76_0x17fe(){var _0x3f9106=['58492oaPlkF','152ShuVDV','6ysZZCt','408DOUdqa','9VyDiZi','1010330VNyHga','5392770AKyKqE','197QnTLbw','17030076bqVtKz','5836bOPsnY','10316RtcFTx','908820ZQiThB'];a76_0x17fe=function(){return _0x3f9106;};return a76_0x17fe();}
|