@lovrabet/lovrabet-cli 2.1.0-beta.3 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a48_0x3ffc55=a48_0x516a;(function(_0x51d4f8,_0x2ba32d){const _0x97cef7=a48_0x516a,_0x5cbe86=_0x51d4f8();while(!![]){try{const _0x216c65=parseInt(_0x97cef7(0xae))/0x1+parseInt(_0x97cef7(0xb9))/0x2*(-parseInt(_0x97cef7(0xb5))/0x3)+-parseInt(_0x97cef7(0xb1))/0x4+parseInt(_0x97cef7(0xaf))/0x5+-parseInt(_0x97cef7(0xb6))/0x6*(parseInt(_0x97cef7(0xb4))/0x7)+-parseInt(_0x97cef7(0xb3))/0x8*(parseInt(_0x97cef7(0xb2))/0x9)+parseInt(_0x97cef7(0xb8))/0xa;if(_0x216c65===_0x2ba32d)break;else _0x5cbe86['push'](_0x5cbe86['shift']());}catch(_0x494a9a){_0x5cbe86['push'](_0x5cbe86['shift']());}}}(a48_0x16ab,0x8d182));function a48_0x16ab(){const _0x4bd59b=['npmRegistryBaseUrl','22914800hFMbjJ','1327026aeIIPW','95229XXTkgj','1248760rfETCx','npmPackageName','2079964hcIHvM','62217YnNCdk','248XjGhAi','14gnCezA','3hUwCuh','1982196YtbiRa'];a48_0x16ab=function(){return _0x4bd59b;};return a48_0x16ab();}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a48_0x3ffc55(0xb0)];function a48_0x516a(_0x50d6da,_0x19449b){_0x50d6da=_0x50d6da-0xae;const _0x16ab3a=a48_0x16ab();let _0x516a82=_0x16ab3a[_0x50d6da];return _0x516a82;}export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a48_0x3ffc55(0xb7)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a49_0x5867(_0x25eaed,_0x3003fc){_0x25eaed=_0x25eaed-0x186;const _0x1e3667=a49_0x1e36();let _0x58670d=_0x1e3667[_0x25eaed];return _0x58670d;}const a49_0x2ede9a=a49_0x5867;(function(_0x5abed7,_0x3d111d){const _0x41a98a=a49_0x5867,_0x337543=_0x5abed7();while(!![]){try{const _0x222646=parseInt(_0x41a98a(0x19b))/0x1*(-parseInt(_0x41a98a(0x196))/0x2)+parseInt(_0x41a98a(0x190))/0x3*(parseInt(_0x41a98a(0x186))/0x4)+-parseInt(_0x41a98a(0x188))/0x5*(parseInt(_0x41a98a(0x19a))/0x6)+parseInt(_0x41a98a(0x193))/0x7*(parseInt(_0x41a98a(0x195))/0x8)+-parseInt(_0x41a98a(0x194))/0x9*(parseInt(_0x41a98a(0x192))/0xa)+-parseInt(_0x41a98a(0x18d))/0xb*(parseInt(_0x41a98a(0x19c))/0xc)+parseInt(_0x41a98a(0x18e))/0xd;if(_0x222646===_0x3d111d)break;else _0x337543['push'](_0x337543['shift']());}catch(_0x294036){_0x337543['push'](_0x337543['shift']());}}}(a49_0x1e36,0x73cce));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x1e06ef){const _0xb8716d=a49_0x5867;customApiDomain=_0x1e06ef?.[_0xb8716d(0x18c)],customUserDomain=_0x1e06ef?.[_0xb8716d(0x197)],customRuntimeDomain=_0x1e06ef?.['runtimeDomain'],customSkillHubDomain=_0x1e06ef?.[_0xb8716d(0x189)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a49_0x2ede9a(0x18f)][a49_0x2ede9a(0x198)][a49_0x2ede9a(0x199)]:PRODUCT_CONFIG[a49_0x2ede9a(0x18f)]['nonProduction'][a49_0x2ede9a(0x199)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains']['production'][a49_0x2ede9a(0x191)]:PRODUCT_CONFIG[a49_0x2ede9a(0x18f)][a49_0x2ede9a(0x18b)][a49_0x2ede9a(0x191)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a49_0x2ede9a(0x18f)][a49_0x2ede9a(0x198)]['runtime']:PRODUCT_CONFIG['domains'][a49_0x2ede9a(0x18b)][a49_0x2ede9a(0x18a)]);function a49_0x1e36(){const _0x55c37e=['195PczOFH','skillHubDomain','runtime','nonProduction','apiDomain','1155tOqSiz','18319873QMyJtL','domains','93189tnGIXJ','api','90ndolVv','5999kPOAyp','339381pTGiEa','8072QdVmBi','87358oTaIgp','userDomain','production','user','16374briPOY','12HLmxoV','105468QKeBsH','12pBuzRo','skillhub'];a49_0x1e36=function(){return _0x55c37e;};return a49_0x1e36();}export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a49_0x2ede9a(0x18f)][a49_0x2ede9a(0x198)][a49_0x2ede9a(0x187)]:PRODUCT_CONFIG[a49_0x2ede9a(0x18f)][a49_0x2ede9a(0x18b)][a49_0x2ede9a(0x187)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x5975a6=a50_0x15b1;(function(_0x278a6e,_0x45201e){const _0x4c35c2=a50_0x15b1,_0x586e6f=_0x278a6e();while(!![]){try{const _0x4f2ace=parseInt(_0x4c35c2(0x9f))/0x1*(-parseInt(_0x4c35c2(0x90))/0x2)+-parseInt(_0x4c35c2(0x95))/0x3*(parseInt(_0x4c35c2(0x92))/0x4)+-parseInt(_0x4c35c2(0x93))/0x5*(parseInt(_0x4c35c2(0x9a))/0x6)+-parseInt(_0x4c35c2(0x99))/0x7*(parseInt(_0x4c35c2(0x96))/0x8)+parseInt(_0x4c35c2(0xa1))/0x9*(-parseInt(_0x4c35c2(0x97))/0xa)+-parseInt(_0x4c35c2(0x98))/0xb*(-parseInt(_0x4c35c2(0x9b))/0xc)+parseInt(_0x4c35c2(0x9d))/0xd*(parseInt(_0x4c35c2(0x8f))/0xe);if(_0x4f2ace===_0x45201e)break;else _0x586e6f['push'](_0x586e6f['shift']());}catch(_0x284f9d){_0x586e6f['push'](_0x586e6f['shift']());}}}(a50_0x453f,0xd9eb3));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a50_0x5975a6(0x91),a50_0x5975a6(0xa0),a50_0x5975a6(0x9e)];function a50_0x453f(){const _0x32aa3a=['ENV','123BBxqYS','141424Hbgyka','30aCZAAX','15517799GxZZlT','651ivNTij','319998CWCNWg','12OaVEoM','dev','65XzsWjA','daily','13268mGEFfk','development','2600298lxupVG','online','11629786JgZkBb','52PaVggJ','production','52276eGfwIJ','120tLQKSX'];a50_0x453f=function(){return _0x32aa3a;};return a50_0x453f();}export function normalizeEnv(_0x2825b){const _0x4125ed=a50_0x5975a6;return _0x2825b===_0x4125ed(0xa2)?'production':_0x2825b;}export function isProduction(_0x2981d8){const _0x2e119a=a50_0x5975a6;return normalizeEnv(_0x2981d8)===_0x2e119a(0x91);}export function isDaily(_0x4dc17b){return normalizeEnv(_0x4dc17b)==='daily';}export function isDev(_0x472700){const _0x286d9f=a50_0x5975a6,_0x5b479c=normalizeEnv(_0x472700);return _0x5b479c===_0x286d9f(0xa0)||_0x5b479c===_0x286d9f(0x9c);}function a50_0x15b1(_0x266c2f,_0x4549f7){_0x266c2f=_0x266c2f-0x8f;const _0x453f21=a50_0x453f();let _0x15b199=_0x453f21[_0x266c2f];return _0x15b199;}let env=normalizeEnv(productEnv(a50_0x5975a6(0x94))||a50_0x5975a6(0x91));export function getEnv(){return env;}export function initEnv(_0x96ed1a){env=normalizeEnv(_0x96ed1a);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a51_0x46f9(_0x1880dc,_0x522142){_0x1880dc=_0x1880dc-0x15e;const _0x2f5940=a51_0x2f59();let _0x46f906=_0x2f5940[_0x1880dc];return _0x46f906;}function a51_0x2f59(){const _0x274f9d=['238wgTaWQ','5848tOGiXN','16248vvFXTV','342CsMcOr','35FbnsrB','12856LuDpml','714lwsaMK','pretty','377465mMruew','11690KXaUxW','json','4149Nwobdn','184559mpXLRv','4485OufBJh','40vqwgtP'];a51_0x2f59=function(){return _0x274f9d;};return a51_0x2f59();}const a51_0x334411=a51_0x46f9;(function(_0x5bf82a,_0x490570){const _0x1bc67a=a51_0x46f9,_0x3e302e=_0x5bf82a();while(!![]){try{const _0x3c438a=parseInt(_0x1bc67a(0x16b))/0x1+-parseInt(_0x1bc67a(0x15f))/0x2*(parseInt(_0x1bc67a(0x16a))/0x3)+-parseInt(_0x1bc67a(0x164))/0x4*(parseInt(_0x1bc67a(0x163))/0x5)+parseInt(_0x1bc67a(0x165))/0x6*(-parseInt(_0x1bc67a(0x168))/0x7)+-parseInt(_0x1bc67a(0x160))/0x8*(-parseInt(_0x1bc67a(0x162))/0x9)+-parseInt(_0x1bc67a(0x15e))/0xa*(parseInt(_0x1bc67a(0x167))/0xb)+parseInt(_0x1bc67a(0x161))/0xc*(parseInt(_0x1bc67a(0x16c))/0xd);if(_0x3c438a===_0x490570)break;else _0x3e302e['push'](_0x3e302e['shift']());}catch(_0x4d10c0){_0x3e302e['push'](_0x3e302e['shift']());}}}(a51_0x2f59,0x262f2));export const OUTPUT_FORMAT_VALUES=[a51_0x334411(0x169),a51_0x334411(0x166),'compress'];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x4a2ee1=a52_0x2838;function a52_0x2838(_0x38c7b9,_0x360933){_0x38c7b9=_0x38c7b9-0x1aa;const _0x1c46ce=a52_0x1c46();let _0x28381e=_0x1c46ce[_0x38c7b9];return _0x28381e;}(function(_0x2a9774,_0x4a4c75){const _0x531c5a=a52_0x2838,_0x580d8f=_0x2a9774();while(!![]){try{const _0x68f42=-parseInt(_0x531c5a(0x1c0))/0x1+parseInt(_0x531c5a(0x1ac))/0x2*(parseInt(_0x531c5a(0x1ad))/0x3)+parseInt(_0x531c5a(0x1aa))/0x4+-parseInt(_0x531c5a(0x1ab))/0x5+-parseInt(_0x531c5a(0x1bf))/0x6+-parseInt(_0x531c5a(0x1c3))/0x7+parseInt(_0x531c5a(0x1bc))/0x8;if(_0x68f42===_0x4a4c75)break;else _0x580d8f['push'](_0x580d8f['shift']());}catch(_0x22726b){_0x580d8f['push'](_0x580d8f['shift']());}}}(a52_0x1c46,0x5dce9));export const PRODUCT_CONFIG={'cliBinName':a52_0x4a2ee1(0x1c1),'cliDisplayName':'Lovrabet\x20Runtime\x20CLI','npmPackageName':a52_0x4a2ee1(0x1b6),'skillSource':a52_0x4a2ee1(0x1c2),'npmRegistryBaseUrl':a52_0x4a2ee1(0x1b9),'envPrefix':'LOVRABET','legacyEnvPrefixes':[a52_0x4a2ee1(0x1b5)],'configFileNames':[a52_0x4a2ee1(0x1b2),'.lovrabetrc'],'newConfigFileName':a52_0x4a2ee1(0x1b2),'homeDirName':a52_0x4a2ee1(0x1b3),'logFileName':a52_0x4a2ee1(0x1ba),'invokeSource':a52_0x4a2ee1(0x1b0),'userCenterDisplayName':a52_0x4a2ee1(0x1b8),'skipNpxSkillsEnvSuffix':a52_0x4a2ee1(0x1b4),'domains':{'production':{'user':a52_0x4a2ee1(0x1c8),'api':a52_0x4a2ee1(0x1ae),'runtime':a52_0x4a2ee1(0x1b1),'skillhub':a52_0x4a2ee1(0x1b7)},'nonProduction':{'user':a52_0x4a2ee1(0x1bd),'api':a52_0x4a2ee1(0x1c7),'runtime':a52_0x4a2ee1(0x1be),'skillhub':a52_0x4a2ee1(0x1af)}},'accessKeyCreatePath':a52_0x4a2ee1(0x1bb)};export function productEnvName(_0x476f96){const _0x59dbc0=a52_0x4a2ee1;return PRODUCT_CONFIG[_0x59dbc0(0x1c4)]+'_'+_0x476f96;}export function productEnvNames(_0x2eb964){const _0x49102c=a52_0x4a2ee1;return[productEnvName(_0x2eb964),...PRODUCT_CONFIG[_0x49102c(0x1c5)][_0x49102c(0x1c6)](_0x45d992=>_0x45d992+'_'+_0x2eb964)];}function a52_0x1c46(){const _0x20134a=['legacyEnvPrefixes','map','https://daily-api.lovrabet.com','https://user.lovrabet.com','544524LROUOM','1470925eSLKTk','746UXSCrY','237lXsURx','https://api.lovrabet.com','https://skills-daily.lovrabet.com','cli:lovrabet-runtime','https://runtime.lovrabet.com','.lovrabet.json','.lovrabet','SKIP_NPX_SKILLS','RABETBASE','@lovrabet/lovrabet-cli','https://skills.lovrabet.com','Lovrabet\x20User\x20Center','https://registry.npmjs.org','.lovrabet-runtime.log','/user/ak','12519608URGwTN','https://user-daily.lovrabet.com','https://daily-runtime.lovrabet.com','1689048isebsi','585432NEZZGH','lovrabet','lovrabet/lovrabet-cli','1296337azFTuU','envPrefix'];a52_0x1c46=function(){return _0x20134a;};return a52_0x1c46();}export function productEnv(_0x4807bc){for(const _0x1b7540 of productEnvNames(_0x4807bc)){const _0x206ec9=process.env[_0x1b7540];if(_0x206ec9!==undefined)return _0x206ec9;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a53_0x2b82d3=a53_0x537c;(function(_0x5eb0b9,_0x27cd34){const _0x2f6ca8=a53_0x537c,_0xbec38d=_0x5eb0b9();while(!![]){try{const _0x4dbc84=-parseInt(_0x2f6ca8(0x15b))/0x1+parseInt(_0x2f6ca8(0x164))/0x2+-parseInt(_0x2f6ca8(0x163))/0x3*(-parseInt(_0x2f6ca8(0x15f))/0x4)+-parseInt(_0x2f6ca8(0x161))/0x5*(-parseInt(_0x2f6ca8(0x15c))/0x6)+parseInt(_0x2f6ca8(0x165))/0x7+parseInt(_0x2f6ca8(0x15d))/0x8+-parseInt(_0x2f6ca8(0x160))/0x9;if(_0x4dbc84===_0x27cd34)break;else _0xbec38d['push'](_0xbec38d['shift']());}catch(_0xab4d8c){_0xbec38d['push'](_0xbec38d['shift']());}}}(a53_0x5ddc,0xeee6e));function a53_0x537c(_0x248990,_0x4f3ecd){_0x248990=_0x248990-0x15b;const _0x5ddcb0=a53_0x5ddc();let _0x537cd9=_0x5ddcb0[_0x248990];return _0x537cd9;}export const RISK_LEVEL_VALUES=[a53_0x2b82d3(0x15e),'write',a53_0x2b82d3(0x162)];function a53_0x5ddc(){const _0x38bee5=['4CfGzSt','22046238nXGySx','95aCcOgX','high-risk-write','1671927TDwQLS','3593664dYKsiz','4377877KJgKaZ','703131xKswxH','159834WUIHMC','5164496rjvEpc','read'];a53_0x5ddc=function(){return _0x38bee5;};return a53_0x5ddc();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a54_0x998693=a54_0x2a90;(function(_0x465ed7,_0x4b3868){const _0x4e3f31=a54_0x2a90,_0x46bde8=_0x465ed7();while(!![]){try{const _0x20f3eb=parseInt(_0x4e3f31(0x1d2))/0x1+parseInt(_0x4e3f31(0x1d1))/0x2*(parseInt(_0x4e3f31(0x1c8))/0x3)+parseInt(_0x4e3f31(0x1d0))/0x4+parseInt(_0x4e3f31(0x1ca))/0x5*(parseInt(_0x4e3f31(0x1c6))/0x6)+parseInt(_0x4e3f31(0x1c9))/0x7*(-parseInt(_0x4e3f31(0x1cc))/0x8)+parseInt(_0x4e3f31(0x1cf))/0x9+-parseInt(_0x4e3f31(0x1c7))/0xa;if(_0x20f3eb===_0x4b3868)break;else _0x46bde8['push'](_0x46bde8['shift']());}catch(_0xc6c703){_0x46bde8['push'](_0x46bde8['shift']());}}}(a54_0x31c6,0xa3098));function a54_0x2a90(_0x56636f,_0x512e66){_0x56636f=_0x56636f-0x1c6;const _0x31c657=a54_0x31c6();let _0x2a90ae=_0x31c657[_0x56636f];return _0x2a90ae;}function a54_0x31c6(){const _0x104976=['1707UoIbvC','7XxGdox','1010snyBEj','user','7961288DpZETc','accessKeyCreatePath','production','4920264VVVRwm','2647368ljcVDr','4534oBuPVg','964437EfYbtY','8814hHigwi','20966750yvoGvs'];a54_0x31c6=function(){return _0x104976;};return a54_0x31c6();}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG['domains'][a54_0x998693(0x1ce)][a54_0x998693(0x1cb)]+PRODUCT_CONFIG[a54_0x998693(0x1cd)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2a1ad3,_0x280922){const _0x177b23=a55_0x219f,_0x39575b=_0x2a1ad3();while(!![]){try{const _0x33a109=-parseInt(_0x177b23(0x1f6))/0x1+-parseInt(_0x177b23(0x1e2))/0x2+-parseInt(_0x177b23(0x1e4))/0x3*(parseInt(_0x177b23(0x1f4))/0x4)+parseInt(_0x177b23(0x1ea))/0x5*(-parseInt(_0x177b23(0x209))/0x6)+parseInt(_0x177b23(0x203))/0x7+parseInt(_0x177b23(0x20c))/0x8+parseInt(_0x177b23(0x216))/0x9*(parseInt(_0x177b23(0x208))/0xa);if(_0x33a109===_0x280922)break;else _0x39575b['push'](_0x39575b['shift']());}catch(_0x23c1a5){_0x39575b['push'](_0x39575b['shift']());}}}(a55_0x2a3d,0xc2465));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x1fbf26){for(const _0x462679 of CONFIG_NAMES){const _0x1f3401=resolve(_0x1fbf26,_0x462679);if(existsSync(_0x1f3401))return _0x1f3401;}return undefined;}export function resolveWriteConfigPath(_0x4fcb02){const _0x40ffca=a55_0x219f,_0x3d08a1=_0x4fcb02===_0x40ffca(0x204)?process['cwd']():homedir(),_0x409629=resolveConfigPath(_0x3d08a1);return _0x409629??resolve(_0x3d08a1,NEW_CONFIG_NAME);}export function readConfigFile(_0x4e6bee){const _0x1da8a5=a55_0x219f;try{if(existsSync(_0x4e6bee)){const _0x10d77d=readFileSync(_0x4e6bee,{'encoding':_0x1da8a5(0x1ff)});if(_0x10d77d){const _0x30da76=JSON['parse'](_0x10d77d);return migrateOnlineEnv(_0x4e6bee,_0x30da76),_0x30da76;}}}catch{}return{};}function migrateOnlineEnv(_0x46f2b4,_0x3b38e0){const _0x3af5e6=a55_0x219f;let _0xc37bd5=![];_0x3b38e0[_0x3af5e6(0x211)]===_0x3af5e6(0x206)&&(_0x3b38e0[_0x3af5e6(0x211)]=_0x3af5e6(0x1e8),_0xc37bd5=!![]);if(_0x3b38e0[_0x3af5e6(0x213)]&&typeof _0x3b38e0[_0x3af5e6(0x213)]===_0x3af5e6(0x220))for(const _0x4677c9 of Object[_0x3af5e6(0x1fc)](_0x3b38e0['apps'])){_0x4677c9&&_0x4677c9[_0x3af5e6(0x211)]===_0x3af5e6(0x206)&&(_0x4677c9['env']=_0x3af5e6(0x1e8),_0xc37bd5=!![]);}if(_0xc37bd5)try{writeConfigFile(_0x46f2b4,_0x3b38e0);}catch{}}export function writeConfigFile(_0x2f3547,_0x251125){const _0x5ba592=a55_0x219f,_0x3c49d3=dirname(_0x2f3547);!existsSync(_0x3c49d3)&&mkdirSync(_0x3c49d3,{'recursive':!![]});const _0x49af36=_0x2f3547+_0x5ba592(0x219);try{writeFileSync(_0x49af36,JSON[_0x5ba592(0x1ec)](_0x251125,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x49af36,_0x2f3547);}catch(_0x5d0cba){if(_0x5d0cba[_0x5ba592(0x1f9)]===_0x5ba592(0x1e6)||_0x5d0cba['code']===_0x5ba592(0x1df)||_0x5d0cba[_0x5ba592(0x1f9)]==='EACCES'){writeFileSync(_0x2f3547,JSON['stringify'](_0x251125,null,0x2)+'\x0a',{'encoding':_0x5ba592(0x1ff)});try{unlinkSync(_0x49af36);}catch{}}else throw _0x5d0cba;}}catch(_0x15f8cf){try{unlinkSync(_0x49af36);}catch{}throw _0x15f8cf;}}export function isNonInteractiveMode(_0x3883ab){const _0x213d42=a55_0x219f;return!!(_0x3883ab[_0x213d42(0x222)]||_0x3883ab['ci']||productEnvNames('CI')[_0x213d42(0x215)](_0x39acf6=>process.env[_0x39acf6]===_0x213d42(0x1f2))||process.env.CI==='true'||!process['stdout'][_0x213d42(0x1e3)]||!isStdinRawModeSupported());}function a55_0x2a3d(){const _0x3729d4=['true','ENV','4cYPVXg','write','363619JkAsWx','defaultApp','daily','code','parse','appcode','values','userDomain','projectConfig','utf8','explicit','globalConfig','VERBOSE','3693914JHgGNj','project','string','online','global','10kfotFh','12zPyUri','setRawMode','find','1846752uBELEI','accessKey','cwd','FORMAT','PAGE_SIZE','env','stdin','apps','slice','some','25467651VBtEfV','authRequired','skillHubDomain','.tmp','error','pageSize','isRaw','trim','empty','./constant/env.js','object','local-alias','nonInteractive','APP','app','ACCESS_KEY','APPCODE','riskLevel','EXDEV','setLogPath','missing','1432716bUiFlV','isTTY','3447963RXVFrQ','top-level','EPERM','development','production','message','1408095tYMFtS','./constant/domain.js','stringify','format','high-risk-write','raw','runtimeDomain','inherit'];a55_0x2a3d=function(){return _0x3729d4;};return a55_0x2a3d();}function isStdinRawModeSupported(){const _0x5b3267=a55_0x219f;if(!process[_0x5b3267(0x212)][_0x5b3267(0x1e3)])return![];try{const _0x44e23e=process[_0x5b3267(0x212)][_0x5b3267(0x21c)];return process[_0x5b3267(0x212)][_0x5b3267(0x20a)](!![]),process[_0x5b3267(0x212)][_0x5b3267(0x20a)](_0x44e23e??![]),!![];}catch{return![];}}export async function createContext(_0x4483b2){const _0xd5ce1d=a55_0x219f,_0x549319=readRawConfig(),_0x2fbc4a=buildConfig(_0x549319,_0x4483b2);await initGlobalEnvironment(_0x2fbc4a);const {getUserDomain:_0x25cda4,getApiDomain:_0x3826ff}=await import(_0xd5ce1d(0x1eb)),_0x2cbd83={'apiDomain':_0x3826ff(),'userDomain':_0x25cda4()},_0x285e1e=await buildAuth(_0x2fbc4a);logger[_0xd5ce1d(0x1e0)](process[_0xd5ce1d(0x20e)]());const _0x373c89=(CLI_BIN_NAME+'\x20'+process['argv'][_0xd5ce1d(0x214)](0x2)['join']('\x20'))[_0xd5ce1d(0x21d)]();logger['setRawCommand'](_0x373c89);const _0x3efa54=isNonInteractiveMode(_0x4483b2);return{'config':_0x2fbc4a,'auth':_0x285e1e,'logger':logger,'env':_0x2cbd83,'nonInteractive':_0x3efa54};}export function buildConfigFromFlags(_0x4909ce){return buildConfig(readRawConfig(),_0x4909ce);}export function getLocalAppAliases(_0x1f79c9){const _0x35c8f6=a55_0x219f;return _0x1f79c9[_0x35c8f6(0x213)]&&typeof _0x1f79c9[_0x35c8f6(0x213)]===_0x35c8f6(0x220)?_0x1f79c9[_0x35c8f6(0x213)]:{};}export function resolveLocalAppAliasCode(_0x3e607d,_0x4f88cb){const _0x52890e=a55_0x219f;if(!_0x4f88cb)return undefined;const _0x4bc312=getLocalAppAliases(_0x3e607d)[_0x4f88cb],_0x195e2e=_0x4bc312?.[_0x52890e(0x1fb)];return typeof _0x195e2e===_0x52890e(0x205)&&_0x195e2e[_0x52890e(0x21d)]()?_0x195e2e[_0x52890e(0x21d)]():undefined;}export function readAppCodeFromConfig(){const _0xbacf29=a55_0x219f,_0x5cfcb0=readRawConfig(),_0x349e08=_0x5cfcb0[_0xbacf29(0x1fb)]??_0x5cfcb0[_0xbacf29(0x224)];if(typeof _0x349e08==='string'&&_0x349e08[_0xbacf29(0x21d)]())return _0x349e08[_0xbacf29(0x21d)]();const _0x34353a=resolveLocalAppAliasCode(_0x5cfcb0,typeof _0x5cfcb0[_0xbacf29(0x1f7)]==='string'?_0x5cfcb0[_0xbacf29(0x1f7)]:undefined);if(_0x34353a)return _0x34353a;const _0x5573fb=normalizeEnv(String(_0x5cfcb0[_0xbacf29(0x211)]||_0xbacf29(0x1e8))),_0x315605=isDaily(_0x5573fb)?_0xbacf29(0x1f8):isDev(_0x5573fb)?_0xbacf29(0x1e7):_0xbacf29(0x1e8),_0x40ae94=resolveCachedAppCode(typeof _0x5cfcb0['defaultApp']==='string'?_0x5cfcb0[_0xbacf29(0x1f7)]:undefined,_0x315605,typeof _0x5cfcb0[_0xbacf29(0x20d)]===_0xbacf29(0x205)?_0x5cfcb0[_0xbacf29(0x20d)]:undefined);if(_0x40ae94)return _0x40ae94;const _0x4ea55b=Object[_0xbacf29(0x1fc)](getLocalAppAliases(_0x5cfcb0))[_0xbacf29(0x20b)](_0x4f3cbd=>_0x4f3cbd?.[_0xbacf29(0x1fb)]);return typeof _0x4ea55b?.[_0xbacf29(0x1fb)]==='string'&&_0x4ea55b[_0xbacf29(0x1fb)][_0xbacf29(0x21d)]()?_0x4ea55b[_0xbacf29(0x1fb)][_0xbacf29(0x21d)]():undefined;}export function readScopedConfig(_0x2df219){const _0x1a8b8b=a55_0x219f,_0x3a0b1a=_0x2df219[_0x1a8b8b(0x207)]?_0x1a8b8b(0x207):_0x1a8b8b(0x204);return readConfigFile(resolveWriteConfigPath(_0x3a0b1a));}export function writeScopedConfig(_0x1f2e8f,_0x3b2610){const _0x41fdf6=a55_0x219f,_0x1ddd24=_0x3b2610['global']?_0x41fdf6(0x207):'project';writeConfigFile(resolveWriteConfigPath(_0x1ddd24),_0x1f2e8f);}export async function initGlobalEnvironment(_0x72f138){const _0x2be5d4=a55_0x219f,{initEnv:_0x467a3a}=await import(_0x2be5d4(0x21f));_0x467a3a(_0x72f138[_0x2be5d4(0x211)]);const {initDomains:_0x1a16eb}=await import(_0x2be5d4(0x1eb));_0x1a16eb({'apiDomain':_0x72f138[_0x2be5d4(0x1ef)]['apiDomain']||_0x72f138[_0x2be5d4(0x1ef)]['host']||undefined,'userDomain':_0x72f138[_0x2be5d4(0x1ef)][_0x2be5d4(0x1fd)]||undefined,'runtimeDomain':_0x72f138[_0x2be5d4(0x1ef)][_0x2be5d4(0x1f0)]||undefined,'skillHubDomain':_0x72f138[_0x2be5d4(0x1ef)][_0x2be5d4(0x218)]||undefined});}export function getProjectConfigPath(){const _0x3b9972=a55_0x219f;return resolveConfigPath(process[_0x3b9972(0x20e)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x5a045b){const _0x55be21=a55_0x219f;if(!existsSync(_0x5a045b))return{'status':_0x55be21(0x1e1)};try{const _0xb682e9=readFileSync(_0x5a045b,{'encoding':'utf8'});if(!_0xb682e9?.[_0x55be21(0x21d)]())return{'status':_0x55be21(0x21e)};const _0x530db8=JSON['parse'](_0xb682e9);return{'status':'ok','data':_0x530db8};}catch(_0x30df2f){return{'status':_0x55be21(0x21a),'message':_0x30df2f instanceof Error?_0x30df2f[_0x55be21(0x1e9)]:String(_0x30df2f)};}}export function loadRawConfigLayers(_0x44404a){const _0x4f9385=a55_0x219f;let _0x12daca={},_0x46ead3={},_0x50b9a7,_0x232b00;try{_0x50b9a7=resolveConfigPath(homedir());if(_0x50b9a7){const _0x1a717f=readFileSync(_0x50b9a7,{'encoding':_0x4f9385(0x1ff)});if(_0x1a717f)_0x12daca=JSON[_0x4f9385(0x1fa)](_0x1a717f);}}catch{}try{const _0x23a71c=_0x44404a||process[_0x4f9385(0x20e)]();_0x232b00=resolveConfigPath(_0x23a71c);if(_0x232b00){const _0x2ea28f=readFileSync(_0x232b00,{'encoding':_0x4f9385(0x1ff)});if(_0x2ea28f)_0x46ead3=JSON['parse'](_0x2ea28f);}}catch{}return{'globalPath':_0x50b9a7,'projectPath':_0x232b00,'globalConfig':_0x12daca,'projectConfig':_0x46ead3};}function mergeRawConfigLayers(_0x59762c){const _0x4d7b9c=a55_0x219f,{globalConfig:_0x4a0578,projectConfig:_0xc13ae4}=_0x59762c;if(_0xc13ae4[_0x4d7b9c(0x1f1)]===![]){const _0xcc5d5={..._0xc13ae4};return delete _0xcc5d5['inherit'],_0xcc5d5;}const _0x164ac7={..._0x4a0578,..._0xc13ae4};if(_0x4d7b9c(0x1f7)in _0xc13ae4)_0x164ac7[_0x4d7b9c(0x1f7)]=_0xc13ae4[_0x4d7b9c(0x1f7)];else _0x4a0578[_0x4d7b9c(0x1f7)]&&(_0x164ac7[_0x4d7b9c(0x1f7)]=_0x4a0578[_0x4d7b9c(0x1f7)]);return _0x164ac7;}export function isInProject(){return!!getProjectConfigPath();}function a55_0x219f(_0x55562e,_0x11952d){_0x55562e=_0x55562e-0x1dd;const _0x2a3d8f=a55_0x2a3d();let _0x219fd1=_0x2a3d8f[_0x55562e];return _0x219fd1;}export function readRawConfig(_0x5b05c1){return mergeRawConfigLayers(loadRawConfigLayers(_0x5b05c1));}export function readRawConfigWithLayers(_0x930f0){const _0x367c45=loadRawConfigLayers(_0x930f0);return{'config':mergeRawConfigLayers(_0x367c45),'layers':_0x367c45};}export function resolveDefaultAppSource(_0xf72805){const _0x1613eb=a55_0x219f;if(_0x1613eb(0x1f7)in _0xf72805[_0x1613eb(0x1fe)])return'project';if(_0xf72805[_0x1613eb(0x1fe)][_0x1613eb(0x1f1)]===![])return null;if(_0xf72805[_0x1613eb(0x201)][_0x1613eb(0x1f7)])return _0x1613eb(0x207);return null;}function buildConfig(_0x5a17b7,_0x13982c){const _0x4cffc4=a55_0x219f,_0x4cbc10=_0x5a17b7[_0x4cffc4(0x1f7)]||undefined,_0x29c6d2=_0x13982c['app']||env(_0x4cffc4(0x223))||undefined,_0x461bea=_0x29c6d2||_0x4cbc10||undefined,_0x214b1b=env(_0x4cffc4(0x225))||_0x5a17b7[_0x4cffc4(0x20d)]||undefined,_0x4ab7e6=_0x13982c['env']||env(_0x4cffc4(0x1f3))||_0x5a17b7[_0x4cffc4(0x211)]||DEFAULT_CONFIG_VALUES[_0x4cffc4(0x211)],_0x11a68c=normalizeEnv(String(_0x4ab7e6)),_0x506987=isDaily(_0x11a68c)?_0x4cffc4(0x1f8):isDev(_0x11a68c)?'development':_0x4cffc4(0x1e8),_0x5b555c=resolveLocalAppAliasCode(_0x5a17b7,_0x461bea),_0x296ff1=resolveCachedAppCode(_0x461bea,_0x506987,_0x214b1b),_0x631827=typeof _0x13982c[_0x4cffc4(0x1fb)]==='string'?_0x13982c[_0x4cffc4(0x1fb)]:undefined,_0x180c82=env(_0x4cffc4(0x1dd)),_0x22999a=_0x29c6d2?undefined:_0x5a17b7[_0x4cffc4(0x1fb)]||_0x5a17b7['app']||undefined,_0x441bcd=_0x631827||_0x180c82||_0x5b555c||_0x296ff1||_0x22999a||undefined,_0x730f7c=_0x631827?_0x4cffc4(0x200):_0x180c82?_0x4cffc4(0x211):_0x5b555c?_0x4cffc4(0x221):_0x296ff1?'cache':_0x22999a?_0x4cffc4(0x1e5):undefined,_0x532a2d=_0x5a17b7['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x44901b=undefined,_0x19d755=_0x13982c[_0x4cffc4(0x1ed)]||env(_0x4cffc4(0x20f))||_0x5a17b7[_0x4cffc4(0x1ed)],_0x5f1076=normalizeLegacyOutputFormat(_0x19d755),_0x2ce978=env(_0x4cffc4(0x210))||_0x5a17b7[_0x4cffc4(0x21b)],_0x4cb43=_0x2ce978?Number(_0x2ce978)||undefined:undefined,_0x5da79c=_0x5a17b7[_0x4cffc4(0x1de)]||_0x5a17b7['maxRisk'],_0x30c609=_0x5da79c==='read'||_0x5da79c===_0x4cffc4(0x1f5)||_0x5da79c===_0x4cffc4(0x1ee)?_0x5da79c:DEFAULT_CONFIG_VALUES[_0x4cffc4(0x1de)],_0x2fa808=env(_0x4cffc4(0x202)),_0xcb1a7a=_0x2fa808==='1'||_0x2fa808===_0x4cffc4(0x1f2);return{'appCode':typeof _0x441bcd==='string'&&_0x441bcd['trim']()?_0x441bcd[_0x4cffc4(0x21d)]():undefined,'appCodeSource':_0x730f7c,'env':_0x506987,'locale':_0x532a2d,'cookie':_0x44901b,'accessKey':_0x214b1b,'format':_0x5f1076,'pageSize':_0x4cb43,'riskLevel':_0x30c609,'verbose':_0xcb1a7a,'defaultApp':_0x4cbc10,'currentApp':typeof _0x461bea===_0x4cffc4(0x205)?_0x461bea:undefined,'raw':_0x5a17b7};}function env(_0x131a6f){return productEnv(_0x131a6f);}async function buildAuth(_0x1fbd0a){const _0x27694c=a55_0x219f,_0x3a4d70='',_0x2e7f6c=!!_0x1fbd0a[_0x27694c(0x20d)];return{'cookie':_0x3a4d70,'isLoggedIn':_0x2e7f6c,async 'getOrLogin'(){const _0x3c1e82=_0x27694c;if(_0x2e7f6c)return _0x3a4d70;throw CliErrors[_0x3c1e82(0x217)]();}};}
|
|
1
|
+
const a55_0x46a99d=a55_0x4fed;(function(_0x504d13,_0x40f084){const _0x2e221f=a55_0x4fed,_0x34d976=_0x504d13();while(!![]){try{const _0x5da14a=-parseInt(_0x2e221f(0x10e))/0x1*(-parseInt(_0x2e221f(0x105))/0x2)+-parseInt(_0x2e221f(0x138))/0x3*(parseInt(_0x2e221f(0x107))/0x4)+parseInt(_0x2e221f(0x13f))/0x5*(parseInt(_0x2e221f(0x148))/0x6)+-parseInt(_0x2e221f(0x126))/0x7+parseInt(_0x2e221f(0x125))/0x8+parseInt(_0x2e221f(0x132))/0x9+-parseInt(_0x2e221f(0x10a))/0xa;if(_0x5da14a===_0x40f084)break;else _0x34d976['push'](_0x34d976['shift']());}catch(_0x52d934){_0x34d976['push'](_0x34d976['shift']());}}}(a55_0x241d,0xf2126));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a55_0x46a99d(0x124)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x25341e){for(const _0x2d129e of CONFIG_NAMES){const _0x1a80ca=resolve(_0x25341e,_0x2d129e);if(existsSync(_0x1a80ca))return _0x1a80ca;}return undefined;}export function resolveWriteConfigPath(_0x1feab6){const _0x395428=a55_0x46a99d,_0xefcc2b=_0x1feab6===_0x395428(0x121)?process[_0x395428(0x14a)]():homedir(),_0x2d8c2a=resolveConfigPath(_0xefcc2b);return _0x2d8c2a??resolve(_0xefcc2b,NEW_CONFIG_NAME);}export function readConfigFile(_0x3abc1b){const _0x3b8eaf=a55_0x46a99d;try{if(existsSync(_0x3abc1b)){const _0x534ca6=readFileSync(_0x3abc1b,{'encoding':_0x3b8eaf(0x141)});if(_0x534ca6){const _0x474aca=JSON[_0x3b8eaf(0x108)](_0x534ca6);return migrateOnlineEnv(_0x3abc1b,_0x474aca),_0x474aca;}}}catch{}return{};}function a55_0x241d(){const _0x2423a0=['stdout','250110eXGKzC','.tmp','code','isTTY','values','daily','827439djUjNa','format','raw','appcode','local-alias','userDomain','accessKey','10yMsXjy','some','utf8','trim','top-level','riskLevel','cache','explicit','runtimeDomain','2490726abiJpO','skillHubDomain','cwd','ENV','high-risk-write','VERBOSE','apps','error','APPCODE','EACCES','setLogPath','1038CrcNyi','write','8HENGCk','parse','./constant/env.js','867900iEvTbb','true','maxRisk','./constant/domain.js','257VouOZP','pageSize','defaultApp','stringify','APP','authRequired','ACCESS_KEY','read','host','env','argv','isRaw','inherit','EPERM','app','missing','setRawMode','nonInteractive','global','project','online','message','configFileNames','10744136PRuOMj','4931430mVTEHu','locale','slice','object','production','setRawCommand','empty','stdin','find','development','string'];a55_0x241d=function(){return _0x2423a0;};return a55_0x241d();}function migrateOnlineEnv(_0x1ce630,_0x3597bd){const _0x274dbb=a55_0x46a99d;let _0x5d45a2=![];_0x3597bd[_0x274dbb(0x117)]===_0x274dbb(0x122)&&(_0x3597bd[_0x274dbb(0x117)]='production',_0x5d45a2=!![]);if(_0x3597bd['apps']&&typeof _0x3597bd[_0x274dbb(0x14e)]===_0x274dbb(0x129))for(const _0x17e32f of Object['values'](_0x3597bd[_0x274dbb(0x14e)])){_0x17e32f&&_0x17e32f['env']==='online'&&(_0x17e32f['env']=_0x274dbb(0x12a),_0x5d45a2=!![]);}if(_0x5d45a2)try{writeConfigFile(_0x1ce630,_0x3597bd);}catch{}}export function writeConfigFile(_0x228c5a,_0x3e4c9a){const _0x199514=a55_0x46a99d,_0x14be77=dirname(_0x228c5a);!existsSync(_0x14be77)&&mkdirSync(_0x14be77,{'recursive':!![]});const _0x58d737=_0x228c5a+_0x199514(0x133);try{writeFileSync(_0x58d737,JSON['stringify'](_0x3e4c9a,null,0x2)+'\x0a',{'encoding':_0x199514(0x141),'mode':0x180});try{renameSync(_0x58d737,_0x228c5a);}catch(_0x42af2b){if(_0x42af2b[_0x199514(0x134)]===_0x199514(0x11b)||_0x42af2b[_0x199514(0x134)]==='EXDEV'||_0x42af2b['code']===_0x199514(0x151)){writeFileSync(_0x228c5a,JSON[_0x199514(0x111)](_0x3e4c9a,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x58d737);}catch{}}else throw _0x42af2b;}}catch(_0x3c9484){try{unlinkSync(_0x58d737);}catch{}throw _0x3c9484;}}export function isNonInteractiveMode(_0x3bd68a){const _0x41536e=a55_0x46a99d;return!!(_0x3bd68a[_0x41536e(0x11f)]||_0x3bd68a['ci']||productEnvNames('CI')[_0x41536e(0x140)](_0x2b73cb=>process.env[_0x2b73cb]===_0x41536e(0x10b))||process.env.CI===_0x41536e(0x10b)||!process[_0x41536e(0x131)][_0x41536e(0x135)]||!isStdinRawModeSupported());}function a55_0x4fed(_0x3d901b,_0x361d4d){_0x3d901b=_0x3d901b-0x105;const _0x241d72=a55_0x241d();let _0x4fed92=_0x241d72[_0x3d901b];return _0x4fed92;}function isStdinRawModeSupported(){const _0x3c1b51=a55_0x46a99d;if(!process['stdin']['isTTY'])return![];try{const _0x3e5539=process[_0x3c1b51(0x12d)][_0x3c1b51(0x119)];return process[_0x3c1b51(0x12d)][_0x3c1b51(0x11e)](!![]),process[_0x3c1b51(0x12d)]['setRawMode'](_0x3e5539??![]),!![];}catch{return![];}}export async function createContext(_0x332be7){const _0x136cd4=a55_0x46a99d,_0x50d5c6=readRawConfig(),_0x46792a=buildConfig(_0x50d5c6,_0x332be7);await initGlobalEnvironment(_0x46792a);const {getUserDomain:_0x43eba8,getApiDomain:_0x42f3e5}=await import(_0x136cd4(0x10d)),_0x2966e2={'apiDomain':_0x42f3e5(),'userDomain':_0x43eba8()},_0x5a9eb8=await buildAuth(_0x46792a);logger[_0x136cd4(0x152)](process['cwd']());const _0x22cc1e=(CLI_BIN_NAME+'\x20'+process[_0x136cd4(0x118)][_0x136cd4(0x128)](0x2)['join']('\x20'))[_0x136cd4(0x142)]();logger[_0x136cd4(0x12b)](_0x22cc1e);const _0x55aea0=isNonInteractiveMode(_0x332be7);return{'config':_0x46792a,'auth':_0x5a9eb8,'logger':logger,'env':_0x2966e2,'nonInteractive':_0x55aea0};}export function buildConfigFromFlags(_0x3ab01a){return buildConfig(readRawConfig(),_0x3ab01a);}export function getLocalAppAliases(_0x3ec346){const _0x3676e2=a55_0x46a99d;return _0x3ec346[_0x3676e2(0x14e)]&&typeof _0x3ec346[_0x3676e2(0x14e)]==='object'?_0x3ec346[_0x3676e2(0x14e)]:{};}export function resolveLocalAppAliasCode(_0x2b0358,_0x1df7ea){const _0x58d0a8=a55_0x46a99d;if(!_0x1df7ea)return undefined;const _0x126846=getLocalAppAliases(_0x2b0358)[_0x1df7ea],_0x2a6ea2=_0x126846?.[_0x58d0a8(0x13b)];return typeof _0x2a6ea2===_0x58d0a8(0x130)&&_0x2a6ea2[_0x58d0a8(0x142)]()?_0x2a6ea2[_0x58d0a8(0x142)]():undefined;}export function readAppCodeFromConfig(){const _0x3c3c38=a55_0x46a99d,_0x246538=readRawConfig(),_0x41a8ca=_0x246538['appcode']??_0x246538[_0x3c3c38(0x11c)];if(typeof _0x41a8ca==='string'&&_0x41a8ca['trim']())return _0x41a8ca[_0x3c3c38(0x142)]();const _0x3f916c=resolveLocalAppAliasCode(_0x246538,typeof _0x246538[_0x3c3c38(0x110)]===_0x3c3c38(0x130)?_0x246538['defaultApp']:undefined);if(_0x3f916c)return _0x3f916c;const _0x3860a8=normalizeEnv(String(_0x246538['env']||_0x3c3c38(0x12a))),_0x3d372e=isDaily(_0x3860a8)?_0x3c3c38(0x137):isDev(_0x3860a8)?_0x3c3c38(0x12f):'production',_0x3d1e22=resolveCachedAppCode(typeof _0x246538[_0x3c3c38(0x110)]==='string'?_0x246538[_0x3c3c38(0x110)]:undefined,_0x3d372e,typeof _0x246538[_0x3c3c38(0x13e)]===_0x3c3c38(0x130)?_0x246538['accessKey']:undefined);if(_0x3d1e22)return _0x3d1e22;const _0x5c0b13=Object[_0x3c3c38(0x136)](getLocalAppAliases(_0x246538))[_0x3c3c38(0x12e)](_0x3ade6d=>_0x3ade6d?.['appcode']);return typeof _0x5c0b13?.[_0x3c3c38(0x13b)]===_0x3c3c38(0x130)&&_0x5c0b13[_0x3c3c38(0x13b)]['trim']()?_0x5c0b13['appcode'][_0x3c3c38(0x142)]():undefined;}export function readScopedConfig(_0x38d485){const _0x5642f6=a55_0x46a99d,_0x2371ca=_0x38d485['global']?_0x5642f6(0x120):_0x5642f6(0x121);return readConfigFile(resolveWriteConfigPath(_0x2371ca));}export function writeScopedConfig(_0x32f8a0,_0x17ae40){const _0x55da50=a55_0x46a99d,_0x29e84e=_0x17ae40[_0x55da50(0x120)]?'global':_0x55da50(0x121);writeConfigFile(resolveWriteConfigPath(_0x29e84e),_0x32f8a0);}export async function initGlobalEnvironment(_0x5f400a){const _0x3de56a=a55_0x46a99d,{initEnv:_0x29f271}=await import(_0x3de56a(0x109));_0x29f271(_0x5f400a[_0x3de56a(0x117)]);const {initDomains:_0x113954}=await import(_0x3de56a(0x10d));_0x113954({'apiDomain':_0x5f400a['raw']['apiDomain']||_0x5f400a[_0x3de56a(0x13a)][_0x3de56a(0x116)]||undefined,'userDomain':_0x5f400a[_0x3de56a(0x13a)][_0x3de56a(0x13d)]||undefined,'runtimeDomain':_0x5f400a['raw'][_0x3de56a(0x147)]||undefined,'skillHubDomain':_0x5f400a[_0x3de56a(0x13a)][_0x3de56a(0x149)]||undefined});}export function getProjectConfigPath(){const _0x450f6a=a55_0x46a99d;return resolveConfigPath(process[_0x450f6a(0x14a)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x2fe6e2){const _0x5efa39=a55_0x46a99d;if(!existsSync(_0x2fe6e2))return{'status':_0x5efa39(0x11d)};try{const _0x4eb79f=readFileSync(_0x2fe6e2,{'encoding':'utf8'});if(!_0x4eb79f?.[_0x5efa39(0x142)]())return{'status':_0x5efa39(0x12c)};const _0x2e9a60=JSON['parse'](_0x4eb79f);return{'status':'ok','data':_0x2e9a60};}catch(_0x2239f5){return{'status':_0x5efa39(0x14f),'message':_0x2239f5 instanceof Error?_0x2239f5[_0x5efa39(0x123)]:String(_0x2239f5)};}}export function loadRawConfigLayers(_0x4d09cb){const _0x25469f=a55_0x46a99d;let _0x1b2164={},_0x3562e1={},_0x3b898b,_0x44a05a;try{_0x3b898b=resolveConfigPath(homedir());if(_0x3b898b){const _0x5b5132=readFileSync(_0x3b898b,{'encoding':_0x25469f(0x141)});if(_0x5b5132)_0x1b2164=JSON[_0x25469f(0x108)](_0x5b5132);}}catch{}try{const _0x1a0cc7=_0x4d09cb||process[_0x25469f(0x14a)]();_0x44a05a=resolveConfigPath(_0x1a0cc7);if(_0x44a05a){const _0x32fb9b=readFileSync(_0x44a05a,{'encoding':_0x25469f(0x141)});if(_0x32fb9b)_0x3562e1=JSON[_0x25469f(0x108)](_0x32fb9b);}}catch{}return{'globalPath':_0x3b898b,'projectPath':_0x44a05a,'globalConfig':_0x1b2164,'projectConfig':_0x3562e1};}function mergeRawConfigLayers(_0x2798fe){const _0x2ea425=a55_0x46a99d,{globalConfig:_0x1ca175,projectConfig:_0x18da77}=_0x2798fe;if(_0x18da77[_0x2ea425(0x11a)]===![]){const _0x382860={..._0x18da77};return delete _0x382860[_0x2ea425(0x11a)],_0x382860;}const _0x4268b3={..._0x1ca175,..._0x18da77};if(_0x2ea425(0x110)in _0x18da77)_0x4268b3[_0x2ea425(0x110)]=_0x18da77[_0x2ea425(0x110)];else _0x1ca175[_0x2ea425(0x110)]&&(_0x4268b3[_0x2ea425(0x110)]=_0x1ca175[_0x2ea425(0x110)]);return _0x4268b3;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x3d903c){return mergeRawConfigLayers(loadRawConfigLayers(_0x3d903c));}export function readRawConfigWithLayers(_0x5d980e){const _0x410990=loadRawConfigLayers(_0x5d980e);return{'config':mergeRawConfigLayers(_0x410990),'layers':_0x410990};}export function resolveDefaultAppSource(_0x1e59ce){const _0x2dcf5e=a55_0x46a99d;if(_0x2dcf5e(0x110)in _0x1e59ce['projectConfig'])return'project';if(_0x1e59ce['projectConfig'][_0x2dcf5e(0x11a)]===![])return null;if(_0x1e59ce['globalConfig']['defaultApp'])return'global';return null;}function buildConfig(_0x54dd95,_0x378e95){const _0x4104cc=a55_0x46a99d,_0x59ffec=_0x54dd95[_0x4104cc(0x110)]||undefined,_0x1558cd=_0x378e95[_0x4104cc(0x11c)]||env(_0x4104cc(0x112))||undefined,_0x32a6b7=_0x1558cd||_0x59ffec||undefined,_0x5ef0e3=env(_0x4104cc(0x114))||_0x54dd95['accessKey']||undefined,_0x3e22b2=_0x378e95[_0x4104cc(0x117)]||env(_0x4104cc(0x14b))||_0x54dd95[_0x4104cc(0x117)]||DEFAULT_CONFIG_VALUES[_0x4104cc(0x117)],_0xcc4da=normalizeEnv(String(_0x3e22b2)),_0x238707=isDaily(_0xcc4da)?_0x4104cc(0x137):isDev(_0xcc4da)?'development':_0x4104cc(0x12a),_0x2b3f05=resolveLocalAppAliasCode(_0x54dd95,_0x32a6b7),_0xe6ff87=resolveCachedAppCode(_0x32a6b7,_0x238707,_0x5ef0e3),_0x1eb2ba=typeof _0x378e95[_0x4104cc(0x13b)]===_0x4104cc(0x130)?_0x378e95['appcode']:undefined,_0x42ae3c=env(_0x4104cc(0x150)),_0x2cea67=_0x1558cd?undefined:_0x54dd95['appcode']||_0x54dd95[_0x4104cc(0x11c)]||undefined,_0x57c581=_0x1eb2ba||_0x42ae3c||_0x2b3f05||_0xe6ff87||_0x2cea67||undefined,_0x39ac41=_0x1eb2ba?_0x4104cc(0x146):_0x42ae3c?_0x4104cc(0x117):_0x2b3f05?_0x4104cc(0x13c):_0xe6ff87?_0x4104cc(0x145):_0x2cea67?_0x4104cc(0x143):undefined,_0x4e30a7=_0x54dd95['locale']||DEFAULT_CONFIG_VALUES[_0x4104cc(0x127)],_0x170f45=undefined,_0x46edf7=_0x378e95[_0x4104cc(0x139)]||env('FORMAT')||_0x54dd95[_0x4104cc(0x139)],_0xa32505=normalizeLegacyOutputFormat(_0x46edf7),_0x5cce8a=env('PAGE_SIZE')||_0x54dd95[_0x4104cc(0x10f)],_0xee216c=_0x5cce8a?Number(_0x5cce8a)||undefined:undefined,_0x30544f=_0x54dd95[_0x4104cc(0x144)]||_0x54dd95[_0x4104cc(0x10c)],_0x1a136a=_0x30544f===_0x4104cc(0x115)||_0x30544f===_0x4104cc(0x106)||_0x30544f===_0x4104cc(0x14c)?_0x30544f:DEFAULT_CONFIG_VALUES[_0x4104cc(0x144)],_0x5d060d=env(_0x4104cc(0x14d)),_0x13c1f6=_0x5d060d==='1'||_0x5d060d==='true';return{'appCode':typeof _0x57c581===_0x4104cc(0x130)&&_0x57c581[_0x4104cc(0x142)]()?_0x57c581[_0x4104cc(0x142)]():undefined,'appCodeSource':_0x39ac41,'env':_0x238707,'locale':_0x4e30a7,'cookie':_0x170f45,'accessKey':_0x5ef0e3,'format':_0xa32505,'pageSize':_0xee216c,'riskLevel':_0x1a136a,'verbose':_0x13c1f6,'defaultApp':_0x59ffec,'currentApp':typeof _0x32a6b7===_0x4104cc(0x130)?_0x32a6b7:undefined,'raw':_0x54dd95};}function env(_0x4d2e0e){return productEnv(_0x4d2e0e);}async function buildAuth(_0x1e10ef){const _0xcf4ab2=a55_0x46a99d,_0x47256d='',_0x552f33=!!_0x1e10ef[_0xcf4ab2(0x13e)];return{'cookie':_0x47256d,'isLoggedIn':_0x552f33,async 'getOrLogin'(){const _0x195700=_0xcf4ab2;if(_0x552f33)return _0x47256d;throw CliErrors[_0x195700(0x113)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5238b1,_0x25c51f){const _0x158ca7=a56_0x523d,_0x5940ef=_0x5238b1();while(!![]){try{const _0x9f3aa6=parseInt(_0x158ca7(0x183))/0x1*(parseInt(_0x158ca7(0x17b))/0x2)+parseInt(_0x158ca7(0x1b1))/0x3+parseInt(_0x158ca7(0x1c9))/0x4*(-parseInt(_0x158ca7(0x160))/0x5)+parseInt(_0x158ca7(0x1a1))/0x6+parseInt(_0x158ca7(0x190))/0x7*(parseInt(_0x158ca7(0x1a3))/0x8)+-parseInt(_0x158ca7(0x1ca))/0x9*(parseInt(_0x158ca7(0x188))/0xa)+-parseInt(_0x158ca7(0x1da))/0xb*(parseInt(_0x158ca7(0x166))/0xc);if(_0x9f3aa6===_0x25c51f)break;else _0x5940ef['push'](_0x5940ef['shift']());}catch(_0x44d86e){_0x5940ef['push'](_0x5940ef['shift']());}}}(a56_0x2ef6,0x2589b));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(_0x304526){_activeAK=_0x304526||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x40a1a6,_0x40b748={}){const _0x3347d9=a56_0x523d,{method:method=_0x3347d9(0x16d),body:_0x2c749b,headers:headers={},timeout:timeout=0x7530}=_0x40b748,_0x71347a=_activeAK,_0x211658=getRuntimeDomain();if(!_0x71347a)throw CliErrors[_0x3347d9(0x1dc)](_0x3347d9(0x1ac)+PRODUCT_CONFIG[_0x3347d9(0x19b)]+'.');const _0x485c5f=''+_0x211658+_0x40a1a6,_0x1d50dc={'X-User-AK':_0x71347a},_0x50ff60=new AbortController(),_0x52c8c0=setTimeout(()=>_0x50ff60[_0x3347d9(0x1b9)](),timeout);try{const _0x3786ef=await fetch(_0x485c5f,{'method':method,'headers':{'Content-Type':_0x3347d9(0x194),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x1d50dc,...headers},'body':_0x2c749b?JSON[_0x3347d9(0x195)](_0x2c749b):undefined,'signal':_0x50ff60[_0x3347d9(0x1a5)]});let _0x5909d8;try{_0x5909d8=await _0x3786ef[_0x3347d9(0x182)]();}catch{throw CliErrors[_0x3347d9(0x169)](_0x3347d9(0x1cd)+_0x3786ef[_0x3347d9(0x196)]+')',_0x3786ef[_0x3347d9(0x196)]>=0x190?_0x3347d9(0x1db):undefined);}if(!_0x3786ef['ok']||_0x5909d8[_0x3347d9(0x1b8)]===![])throw CliErrors[_0x3347d9(0x169)](_0x5909d8[_0x3347d9(0x1d7)]||_0x5909d8[_0x3347d9(0x1bd)]||'API\x20error:\x20'+_0x3786ef[_0x3347d9(0x196)],_0x5909d8[_0x3347d9(0x1a2)]?_0x3347d9(0x1a8)+_0x5909d8[_0x3347d9(0x1a2)]:undefined);return _0x5909d8;}catch(_0x4375ab){if(_0x4375ab instanceof Error&&_0x4375ab[_0x3347d9(0x1b3)]===_0x3347d9(0x161))throw CliErrors[_0x3347d9(0x169)](_0x3347d9(0x1d6)+_0x485c5f);throw _0x4375ab;}finally{clearTimeout(_0x52c8c0);}}async function apiBinaryRequest(_0x35f87f,_0x2648d7={}){const _0x16bc6b=a56_0x523d,{method:method=_0x16bc6b(0x16d),headers:headers={},timeout:timeout=0x7530}=_0x2648d7,_0x5e7c13=_activeAK,_0x15ebf9=getRuntimeDomain();if(!_0x5e7c13)throw CliErrors[_0x16bc6b(0x1dc)](_0x16bc6b(0x1ac)+PRODUCT_CONFIG[_0x16bc6b(0x19b)]+'.');const _0x1e20e4=''+_0x15ebf9+_0x35f87f,_0x22d3c7=new AbortController(),_0x326c37=setTimeout(()=>_0x22d3c7[_0x16bc6b(0x1b9)](),timeout);try{const _0x45bf5f=await fetch(_0x1e20e4,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x5e7c13,...headers},'signal':_0x22d3c7['signal']});if(!_0x45bf5f['ok']){let _0x2b112a;try{const _0x233289=await _0x45bf5f[_0x16bc6b(0x182)]();_0x2b112a=_0x233289[_0x16bc6b(0x1d7)]||_0x233289[_0x16bc6b(0x1bd)]||_0x233289['errorCode'];}catch{_0x2b112a=await _0x45bf5f['text']()[_0x16bc6b(0x1a4)](()=>undefined);}throw CliErrors['apiError'](_0x2b112a||_0x16bc6b(0x1cf)+_0x45bf5f['status'],_0x16bc6b(0x197)+_0x1e20e4);}return Buffer[_0x16bc6b(0x170)](await _0x45bf5f['arrayBuffer']());}catch(_0x5b0b35){if(_0x5b0b35 instanceof Error&&_0x5b0b35['name']===_0x16bc6b(0x161))throw CliErrors[_0x16bc6b(0x169)](_0x16bc6b(0x1d6)+_0x1e20e4);throw _0x5b0b35;}finally{clearTimeout(_0x326c37);}}async function toolboxRequest(_0x1de9fa,_0x424cce,_0x1b8e8a={}){const _0x1e0a20=a56_0x523d,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x1b8e8a,_0x277ee4=_activeAK;if(!_0x277ee4)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x1e0a20(0x19b)]+'.');const _0x4522fe=getApiDomain()['replace'](/\/$/,''),_0x35f641=new URL(_0x1de9fa,_0x4522fe+_0x1e0a20(0x17c));if(_0x424cce)for(const [_0x1bb5e0,_0xba5018]of Object[_0x1e0a20(0x1a9)](_0x424cce)){_0xba5018!==undefined&&_0xba5018!==null&&_0x35f641['searchParams'][_0x1e0a20(0x17a)](_0x1bb5e0,String(_0xba5018));}const _0x445481=new AbortController(),_0x19cc50=setTimeout(()=>_0x445481[_0x1e0a20(0x1b9)](),timeout);try{const _0x87d23f=await fetch(_0x35f641,{'method':method,'headers':{'Content-Type':_0x1e0a20(0x194),'X-Invoke-Source':PRODUCT_CONFIG[_0x1e0a20(0x16b)],'X-User-AK':_0x277ee4,...headers},'signal':_0x445481[_0x1e0a20(0x1a5)]});let _0x4a93f2;try{_0x4a93f2=await _0x87d23f[_0x1e0a20(0x182)]();}catch{throw CliErrors[_0x1e0a20(0x169)](_0x1e0a20(0x179)+_0x87d23f['status']+')',_0x87d23f['status']>=0x190?_0x1e0a20(0x1db):undefined);}if(!_0x87d23f['ok']){const _0x582bb7=_0x4a93f2&&typeof _0x4a93f2===_0x1e0a20(0x180)?_0x4a93f2:{};throw CliErrors[_0x1e0a20(0x169)](_0x582bb7[_0x1e0a20(0x1d7)]||_0x582bb7[_0x1e0a20(0x1bd)]||_0x1e0a20(0x165)+_0x87d23f[_0x1e0a20(0x196)],_0x582bb7[_0x1e0a20(0x1a2)]?_0x1e0a20(0x185)+_0x582bb7[_0x1e0a20(0x1a2)]:undefined);}if(_0x4a93f2&&typeof _0x4a93f2===_0x1e0a20(0x180)&&_0x1e0a20(0x1b8)in _0x4a93f2&&typeof _0x4a93f2['success']==='boolean'){const _0x30a48a=_0x4a93f2;if(!_0x30a48a[_0x1e0a20(0x1b8)])throw CliErrors['apiError'](_0x30a48a['errorMsg']||_0x30a48a['message']||_0x1e0a20(0x1c5),_0x30a48a['errorCode']?_0x1e0a20(0x185)+_0x30a48a[_0x1e0a20(0x1a2)]:undefined);return _0x30a48a[_0x1e0a20(0x1b5)];}return _0x4a93f2;}catch(_0x2c1a50){if(_0x2c1a50 instanceof Error&&_0x2c1a50[_0x1e0a20(0x1b3)]==='AbortError')throw CliErrors[_0x1e0a20(0x169)]('Request\x20timeout:\x20'+_0x35f641[_0x1e0a20(0x1d3)]());throw _0x2c1a50;}finally{clearTimeout(_0x19cc50);}}async function skillHubJsonRequest(_0x5b60f7,_0x1563fc={}){const _0x1c86c6=a56_0x523d,{method:method=_0x1c86c6(0x16d),query:_0x247002,body:_0x22154a,headers:headers={},timeout:timeout=0x7530}=_0x1563fc,_0x23a690=_activeAK;if(!_0x23a690)throw CliErrors[_0x1c86c6(0x1dc)](_0x1c86c6(0x1ac)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x4c2f06=getSkillHubDomain()['replace'](/\/$/,''),_0x35feb1=new URL(_0x5b60f7,_0x4c2f06+'/');if(_0x247002)for(const [_0x4a2ea5,_0x45b6a4]of Object[_0x1c86c6(0x1a9)](_0x247002)){_0x45b6a4!==undefined&&_0x45b6a4!==null&&_0x35feb1[_0x1c86c6(0x18b)][_0x1c86c6(0x17a)](_0x4a2ea5,String(_0x45b6a4));}const _0x5d29f0=new AbortController(),_0x44cd84=setTimeout(()=>_0x5d29f0[_0x1c86c6(0x1b9)](),timeout);try{const _0x1144b6=await fetch(_0x35feb1['toString'](),{'method':method,'headers':{'Accept':_0x1c86c6(0x194),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x23a690,...headers},'body':_0x22154a,'signal':_0x5d29f0[_0x1c86c6(0x1a5)]});let _0x480751;try{_0x480751=await _0x1144b6[_0x1c86c6(0x182)]();}catch{throw CliErrors[_0x1c86c6(0x169)](_0x1c86c6(0x18d)+_0x1144b6[_0x1c86c6(0x196)]+')',_0x1144b6[_0x1c86c6(0x196)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x4350b0=!_0x1144b6['ok']||_0x480751?.['success']===![]||typeof _0x480751?.[_0x1c86c6(0x1a0)]===_0x1c86c6(0x1c8)&&_0x480751[_0x1c86c6(0x1a0)]>=0x190;if(_0x4350b0)throw CliErrors[_0x1c86c6(0x169)](_0x480751?.['errorMsg']||_0x480751?.[_0x1c86c6(0x1bd)]||_0x480751?.['msg']||'SkillHub\x20API\x20error:\x20'+_0x1144b6[_0x1c86c6(0x196)],_0x480751?.[_0x1c86c6(0x1a2)]?_0x1c86c6(0x16f)+_0x480751[_0x1c86c6(0x1a2)]:undefined);return _0x480751?.['data']??_0x480751;}catch(_0x49d282){if(_0x49d282 instanceof Error&&_0x49d282[_0x1c86c6(0x1b3)]===_0x1c86c6(0x161))throw CliErrors['apiError'](_0x1c86c6(0x1d6)+_0x35feb1['toString']());throw _0x49d282;}finally{clearTimeout(_0x44cd84);}}async function skillHubBinaryRequest(_0x422223,_0x588b5e={}){const _0x2d548d=a56_0x523d,{query:_0x220bf3,headers:headers={},timeout:timeout=0x7530}=_0x588b5e,_0x34b58b=_activeAK;if(!_0x34b58b)throw CliErrors[_0x2d548d(0x1dc)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x2d548d(0x19b)]+'.');const _0x97d20=getSkillHubDomain()[_0x2d548d(0x192)](/\/$/,''),_0x52f572=new URL(_0x422223,_0x97d20+'/');if(_0x220bf3)for(const [_0x4d88d4,_0x563857]of Object[_0x2d548d(0x1a9)](_0x220bf3)){_0x563857!==undefined&&_0x563857!==null&&_0x52f572[_0x2d548d(0x18b)][_0x2d548d(0x17a)](_0x4d88d4,String(_0x563857));}const _0x1fb9b5=new AbortController(),_0x3f7e3d=setTimeout(()=>_0x1fb9b5[_0x2d548d(0x1b9)](),timeout);try{const _0x4052ab=await fetch(_0x52f572[_0x2d548d(0x1d3)](),{'method':_0x2d548d(0x16d),'headers':{'Accept':_0x2d548d(0x1ae),'X-Invoke-Source':PRODUCT_CONFIG[_0x2d548d(0x16b)],'X-User-AK':_0x34b58b,...headers},'signal':_0x1fb9b5[_0x2d548d(0x1a5)]});if(!_0x4052ab['ok']){let _0x46c9f9;try{const _0xe233ba=await _0x4052ab['json']();_0x46c9f9=_0xe233ba[_0x2d548d(0x1d7)]||_0xe233ba[_0x2d548d(0x1bd)]||_0xe233ba[_0x2d548d(0x1af)]||_0xe233ba[_0x2d548d(0x1a2)];}catch{_0x46c9f9=await _0x4052ab[_0x2d548d(0x1b6)]()[_0x2d548d(0x1a4)](()=>undefined);}throw CliErrors[_0x2d548d(0x169)](_0x46c9f9||'SkillHub\x20API\x20error:\x20'+_0x4052ab[_0x2d548d(0x196)],_0x2d548d(0x197)+_0x52f572[_0x2d548d(0x1d3)]());}return Buffer[_0x2d548d(0x170)](await _0x4052ab[_0x2d548d(0x191)]());}catch(_0x5de997){if(_0x5de997 instanceof Error&&_0x5de997[_0x2d548d(0x1b3)]===_0x2d548d(0x161))throw CliErrors[_0x2d548d(0x169)](_0x2d548d(0x1d6)+_0x52f572[_0x2d548d(0x1d3)]());throw _0x5de997;}finally{clearTimeout(_0x3f7e3d);}}export async function getBffScriptInfo(_0x4af92a){const _0x15b0ea=a56_0x523d,_0x505248=await apiRequest(_0x15b0ea(0x172)+_0x4af92a);if(!_0x505248[_0x15b0ea(0x1b5)])throw CliErrors[_0x15b0ea(0x168)](_0x15b0ea(0x1c4)+_0x4af92a);return _0x505248[_0x15b0ea(0x1b5)];}export async function getSqlQueryInfo(_0x4d9f59,_0x3885a1){const _0x5e99f8=a56_0x523d,_0x4fde8c=await apiRequest(_0x5e99f8(0x18e),{'method':_0x5e99f8(0x189),'body':{'appCode':_0x4d9f59,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x3885a1}}),_0x469347=_0x4fde8c['data'],_0x16fb4d=_0x469347&&typeof _0x469347===_0x5e99f8(0x180)&&_0x5e99f8(0x177)in _0x469347?_0x469347[_0x5e99f8(0x177)]?.[0x0]:_0x469347&&typeof _0x469347===_0x5e99f8(0x180)&&_0x5e99f8(0x1ce)in _0x469347?_0x469347:undefined;if(!_0x16fb4d)throw CliErrors[_0x5e99f8(0x168)](_0x5e99f8(0x1c6)+_0x3885a1);return _0x16fb4d;}function isRemoteAppItem(_0x488fac){const _0x3b6844=a56_0x523d;return!!_0x488fac&&typeof _0x488fac==='object'&&typeof _0x488fac['appCode']===_0x3b6844(0x1cc)&&typeof _0x488fac[_0x3b6844(0x1ba)]===_0x3b6844(0x1cc);}function extractRemoteAppItems(_0x3f6935){const _0x24a599=a56_0x523d;if(Array['isArray'](_0x3f6935))return _0x3f6935[_0x24a599(0x173)](isRemoteAppItem);if(!_0x3f6935||typeof _0x3f6935!==_0x24a599(0x180))throw CliErrors[_0x24a599(0x169)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x5dee81=_0x3f6935;if(Array[_0x24a599(0x1de)](_0x5dee81[_0x24a599(0x177)]))return _0x5dee81[_0x24a599(0x177)][_0x24a599(0x173)](isRemoteAppItem);if(_0x5dee81['data']&&typeof _0x5dee81['data']==='object'){const _0x3d4784=_0x5dee81[_0x24a599(0x1b5)];if(Array[_0x24a599(0x1de)](_0x3d4784[_0x24a599(0x177)]))return _0x3d4784['tableData'][_0x24a599(0x173)](isRemoteAppItem);}throw CliErrors[_0x24a599(0x169)]('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x2bf204=a56_0x523d,_0x6c6770=await apiRequest(_0x2bf204(0x1d5));return extractRemoteAppItems(_0x6c6770['data']);}export async function getLoginUserInfo(){const _0x5484d4=a56_0x523d,_0x5a15fe=await apiRequest(_0x5484d4(0x175));if(!_0x5a15fe[_0x5484d4(0x1b5)]||typeof _0x5a15fe[_0x5484d4(0x1b5)]!==_0x5484d4(0x180)||Array['isArray'](_0x5a15fe['data']))throw CliErrors['apiError']('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x5a15fe['data'];}export async function listDatasets(_0x165c8f,_0xefb627){const _0x3d6f56=a56_0x523d,_0x1e045a=await apiRequest('/client/dataset/list',{'method':_0x3d6f56(0x189),'body':{'appCode':_0x165c8f,..._0xefb627?.[_0x3d6f56(0x1a0)]&&{'code':_0xefb627['code']},..._0xefb627?.['name']&&{'name':_0xefb627[_0x3d6f56(0x1b3)]}}});return extractList(_0x1e045a[_0x3d6f56(0x1b5)]);}export async function getDatasetDetail(_0x3c709d){const _0x474e1b=a56_0x523d,_0x4f3d0c=/^\d+$/[_0x474e1b(0x17d)](_0x3c709d)?'id':'code',_0x33d608=await apiRequest(_0x474e1b(0x19a)+_0x4f3d0c+'='+_0x3c709d);return _0x33d608[_0x474e1b(0x1b5)];}export async function getDatasetSdkUsageDoc(_0x47240a,_0x49f5e6){const _0x3f4a85=a56_0x523d,_0x55f676=await toolboxRequest(_0x3f4a85(0x19c),{'datasetCode':_0x47240a,'appCode':_0x49f5e6});return typeof _0x55f676?.[_0x3f4a85(0x187)]===_0x3f4a85(0x1cc)?_0x55f676[_0x3f4a85(0x187)]:'';}export async function listRuntimeArtifacts(_0x850124,_0x2ae488){const _0x300bf2=a56_0x523d,_0x2cf386=new URLSearchParams({'appCode':_0x850124});if(_0x2ae488?.['artifactType'])_0x2cf386[_0x300bf2(0x17a)](_0x300bf2(0x17e),_0x2ae488['artifactType']);if(_0x2ae488?.[_0x300bf2(0x1bf)])_0x2cf386[_0x300bf2(0x17a)](_0x300bf2(0x1bf),_0x2ae488['source']);if(_0x2ae488?.[_0x300bf2(0x1a6)]!==undefined)_0x2cf386['set']('favorite',String(_0x2ae488[_0x300bf2(0x1a6)]));const _0x4ada8f=await apiRequest('/client/artifact/list?'+_0x2cf386[_0x300bf2(0x1d3)]());return Array[_0x300bf2(0x1de)](_0x4ada8f[_0x300bf2(0x1b5)])?_0x4ada8f[_0x300bf2(0x1b5)]:[];}export async function getRuntimeArtifact(_0x3e5e6d,_0x6f9768){const _0xec941a=a56_0x523d,_0x3e3fee=await apiRequest('/client/artifact/'+_0x3e5e6d+_0xec941a(0x19f)+encodeURIComponent(_0x6f9768));if(!_0x3e3fee['data'])throw CliErrors['validation']('Artifact\x20not\x20found:\x20id='+_0x3e5e6d);return _0x3e3fee[_0xec941a(0x1b5)];}export async function createRuntimeArtifact(_0x32a27f,_0x38565c){const _0x52cad6=a56_0x523d,_0x1cdb21=await apiRequest(_0x52cad6(0x162),{'method':_0x52cad6(0x189),'body':{'appCode':_0x32a27f,..._0x38565c}});return _0x1cdb21[_0x52cad6(0x1b5)];}export async function updateRuntimeArtifact(_0xe153bb,_0x4567e0,_0x41b5be){const _0x981254=a56_0x523d,_0x3c3119=await apiRequest(_0x981254(0x18c)+_0xe153bb+_0x981254(0x193),{'method':_0x981254(0x189),'body':{'appCode':_0x4567e0,..._0x41b5be}});return _0x3c3119[_0x981254(0x1b5)];}export async function listPersonalBffs(_0x58542d){const _0x5a01e0=a56_0x523d,_0x2f6273=await apiRequest(_0x5a01e0(0x1c3)+encodeURIComponent(_0x58542d));return Array[_0x5a01e0(0x1de)](_0x2f6273[_0x5a01e0(0x1b5)])?_0x2f6273['data']:[];}function a56_0x523d(_0x121f6f,_0x534c8f){_0x121f6f=_0x121f6f-0x160;const _0x2ef679=a56_0x2ef6();let _0x523d19=_0x2ef679[_0x121f6f];return _0x523d19;}export async function getPersonalBff(_0x5a7eec,_0x13d8bc){const _0x18ddb8=a56_0x523d,_0x55c4eb=await apiRequest('/client/runtime-bff/personal/'+_0x5a7eec+'?appCode='+encodeURIComponent(_0x13d8bc));if(!_0x55c4eb[_0x18ddb8(0x1b5)])throw CliErrors[_0x18ddb8(0x168)](_0x18ddb8(0x1c0)+_0x5a7eec);return _0x55c4eb[_0x18ddb8(0x1b5)];}export async function createPersonalBff(_0x338280,_0x66f3be){const _0x45d5f9=a56_0x523d,_0x467ee4=await apiRequest(_0x45d5f9(0x1c7),{'method':_0x45d5f9(0x189),'body':{'appCode':_0x338280,..._0x66f3be}});return _0x467ee4[_0x45d5f9(0x1b5)];}export async function updatePersonalBff(_0x1efe63,_0x9eac4b,_0x1148dc){const _0x5055dc=a56_0x523d,_0x274dcf=await apiRequest(_0x5055dc(0x1d4)+_0x1efe63+_0x5055dc(0x193),{'method':_0x5055dc(0x189),'body':{'appCode':_0x9eac4b,..._0x1148dc}});return _0x274dcf[_0x5055dc(0x1b5)];}export async function executePersonalBff(_0x1fb6ab,_0x3d44ce,_0x37f155){const _0x38555c=a56_0x523d,_0xaae3f8=await apiRequest(_0x38555c(0x1d4)+_0x1fb6ab+_0x38555c(0x171)+encodeURIComponent(_0x3d44ce),{'method':_0x38555c(0x189),'body':_0x37f155});return _0xaae3f8[_0x38555c(0x1b5)];}export async function listPersonalKnowledgeBaseItems(_0x335b49){const _0x1b18e1=a56_0x523d,_0x2e7b14=await apiRequest(_0x1b18e1(0x164)+encodeURIComponent(_0x335b49));return Array[_0x1b18e1(0x1de)](_0x2e7b14['data'])?_0x2e7b14[_0x1b18e1(0x1b5)]:[];}export async function getPersonalKnowledgeBaseItem(_0x4a853b,_0x4b3a62){const _0x4ca94a=a56_0x523d,_0x52e374=await apiRequest('/client/knowledge-base/personal/'+_0x4a853b+_0x4ca94a(0x19f)+encodeURIComponent(_0x4b3a62));if(!_0x52e374[_0x4ca94a(0x1b5)])throw CliErrors[_0x4ca94a(0x168)](_0x4ca94a(0x1ab)+_0x4a853b);return _0x52e374[_0x4ca94a(0x1b5)];}export async function createPersonalKnowledgeBaseItem(_0x1d3a22,_0x417807){const _0x40b966=a56_0x523d,_0x293697=await apiRequest(_0x40b966(0x19e),{'method':'POST','body':{'appCode':_0x1d3a22,..._0x417807}});return _0x293697[_0x40b966(0x1b5)];}export async function updatePersonalKnowledgeBaseItem(_0x106031,_0x1ca656,_0xabd9f8){const _0x52f6ca=a56_0x523d,_0x3f8f6d=await apiRequest(_0x52f6ca(0x1aa)+_0x106031+_0x52f6ca(0x193),{'method':_0x52f6ca(0x189),'body':{'appCode':_0x1ca656,..._0xabd9f8}});return _0x3f8f6d[_0x52f6ca(0x1b5)];}export async function searchKnowledgeBase(_0x29ec7a,_0x3d8d9c){const _0x3b2747=a56_0x523d,_0x6274ab=await apiRequest('/client/knowledge-base/search',{'method':_0x3b2747(0x189),'body':{'appCode':_0x29ec7a,'query':_0x3d8d9c['query'],..._0x3d8d9c[_0x3b2747(0x1d8)]!==undefined?{'topK':_0x3d8d9c[_0x3b2747(0x1d8)]}:{}}});return Array[_0x3b2747(0x1de)](_0x6274ab[_0x3b2747(0x1b5)])?_0x6274ab[_0x3b2747(0x1b5)]:[];}export async function listRuntimeSkills(_0x3ec081){const _0x358585=a56_0x523d,_0x3f94ea=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0x3ec081[_0x358585(0x1b7)])+_0x358585(0x184),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x3ec081[_0x358585(0x1b7)],_0x3f94ea,_0x3ec081[_0x358585(0x17f)]??_0x358585(0x16e),_0x3ec081['code']);}export async function listPersonalRuntimeSkills(_0x7d9175){const _0x50b98f=a56_0x523d;return(await listRuntimeSkills({'appCode':_0x7d9175,'scope':_0x50b98f(0x1b4)}))[_0x50b98f(0x1b4)];}function a56_0x2ef6(){const _0x48f844=['abort','appName','visibility','/download','message','application/zip','source','Personal\x20BFF\x20not\x20found:\x20id=','skillName','company','/client/runtime-bff/personal/list?appCode=','BFF\x20script\x20not\x20found:\x20id=','Toolbox\x20API\x20error','SQL\x20query\x20not\x20found:\x20','/client/runtime-bff/personal/create','number','186860oHNyKc','171fohICv','packageBase64','string','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','sqlCode','API\x20error:\x20','PRIVATE','Missing\x20Skill\x20package\x20payload.','undefined','toString','/client/runtime-bff/personal/','/client/app/my-apps','Request\x20timeout:\x20','errorMsg','topK','skillCode','11zZaCpw','Check\x20your\x20credentials\x20and\x20try\x20again.','authRequired','items','isArray','description','10EqFBbs','AbortError','/client/artifact/create','version','/client/knowledge-base/personal/list?appCode=','Toolbox\x20API\x20error:\x20','1194672qktFZc','/publish','validation','apiError','tags','invokeSource','skill','GET','user','SkillHub\x20error\x20code:\x20','from','/execute?appCode=','/client/bff/query/','filter','effective','/client/user/loginUserInfo','namespace','tableData','slug','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','set','4GAecHi','/api/node-toolbox/','test','artifactType','scope','object','files','json','37283tSXKiW','/skills','Toolbox\x20error\x20code:\x20','file','markdown','131680NOYYWA','POST','NAMESPACE_ONLY','searchParams','/client/artifact/','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/sql/query','public','14WILuNv','arrayBuffer','replace','/update','application/json','stringify','status','Download\x20failed:\x20','/api/cli/v1/skills/','displayName','/client/dataset/query?','newConfigFileName','api-doc-generator','PUBLIC','/client/knowledge-base/personal/create','?appCode=','code','1453818lfluqt','errorCode','640040wlVkFr','catch','signal','favorite','trim','API\x20error\x20code:\x20','entries','/client/knowledge-base/personal/','Knowledge-base\x20entry\x20not\x20found:\x20id=','Configure\x20accessKey\x20in\x20','publishedVersion','application/octet-stream','msg','content','360162EwTDkG','values','name','personal','data','text','appCode','success'];a56_0x2ef6=function(){return _0x48f844;};return a56_0x2ef6();}export async function listCompanyRuntimeSkills(_0x412f86){const _0xa5c7f7=a56_0x523d;return(await listRuntimeSkills({'appCode':_0x412f86,'scope':_0xa5c7f7(0x1c2)}))['company'];}export async function listVisibleRuntimeSkills(_0x36031d){const _0x5a0447=a56_0x523d;return(await listRuntimeSkills({'appCode':_0x36031d,'scope':_0x5a0447(0x16e)}))[_0x5a0447(0x174)];}export async function createPersonalRuntimeSkill(_0x54e1c6,_0x10b4e2){return publishRuntimeSkill(_0x54e1c6,_0x10b4e2);}export async function updatePersonalRuntimeSkill(_0x4745d2,_0x2ebdec,_0x2f0202){const _0x478658=a56_0x523d;return publishRuntimeSkill(_0x2ebdec,{..._0x2f0202,'skillCode':_0x2f0202[_0x478658(0x1d9)]??_0x4745d2});}export async function downloadRuntimeSkillPackage(_0x2fb578,_0x10ed19,_0xd89df0,_0x2ab9eb){const _0x1d80e8=a56_0x523d;void _0x2fb578;const _0x37e070=_0x2ab9eb?_0x1d80e8(0x198)+encodeURIComponent(_0xd89df0)+'/'+encodeURIComponent(_0x10ed19)+'/versions/'+encodeURIComponent(_0x2ab9eb)+_0x1d80e8(0x1bc):_0x1d80e8(0x198)+encodeURIComponent(_0xd89df0)+'/'+encodeURIComponent(_0x10ed19)+'/download';return skillHubBinaryRequest(_0x37e070);}async function publishRuntimeSkill(_0xad72e3,_0x5d6fda){const _0x1d903a=a56_0x523d,_0x4e74ba=new FormData();_0x4e74ba[_0x1d903a(0x17a)](_0x1d903a(0x186),runtimeSkillPackageFile(_0x5d6fda)),_0x4e74ba[_0x1d903a(0x17a)]('visibility',_0x1d903a(0x1d0));const _0x28c463=await skillHubJsonRequest(_0x1d903a(0x198)+encodeURIComponent(_0xad72e3)+_0x1d903a(0x167),{'method':_0x1d903a(0x189),'body':_0x4e74ba});return{'appCode':_0x28c463[_0x1d903a(0x176)]??_0xad72e3,'skillCode':_0x28c463['slug']??_0x5d6fda['skillCode']??'','skillName':_0x5d6fda[_0x1d903a(0x1c1)]??_0x28c463[_0x1d903a(0x178)]??_0x5d6fda[_0x1d903a(0x1d9)],'description':_0x5d6fda[_0x1d903a(0x1df)],'scope':skillHubVisibilityToScope(_0x28c463[_0x1d903a(0x1bb)])??_0x1d903a(0x1b4),'version':_0x28c463['version']??_0x5d6fda[_0x1d903a(0x163)],'tags':_0x5d6fda[_0x1d903a(0x16a)],'content':_0x5d6fda[_0x1d903a(0x1b0)],'files':_0x5d6fda[_0x1d903a(0x181)]};}function runtimeSkillPackageFile(_0xbf98bf){const _0x4d3b96=a56_0x523d;if(!_0xbf98bf[_0x4d3b96(0x1cb)])throw CliErrors[_0x4d3b96(0x168)](_0x4d3b96(0x1d1));const _0x4e492a=Buffer['from'](_0xbf98bf[_0x4d3b96(0x1cb)],'base64'),_0x3e4d87=new Blob([_0x4e492a],{'type':_0x4d3b96(0x1be)}),_0x5bc5bb=(_0xbf98bf[_0x4d3b96(0x1d9)]||_0x4d3b96(0x16c))+'.zip';if(typeof File!==_0x4d3b96(0x1d2))return new File([_0x3e4d87],_0x5bc5bb,{'type':_0x4d3b96(0x1be)});return _0x3e4d87;}function normalizeSkillHubRuntimeListResponse(_0x41038b,_0x1231d1,_0x59d268,_0x5c3264){const _0x3a0960=a56_0x523d,_0xabd4e=Array[_0x3a0960(0x1de)](_0x1231d1)?_0x1231d1:Array['isArray'](_0x1231d1?.[_0x3a0960(0x1dd)])?_0x1231d1[_0x3a0960(0x1dd)]:[],_0x2f5c58=_0x5c3264?.[_0x3a0960(0x1a7)](),_0x5ad68a=_0xabd4e['filter'](_0x16dc80=>!_0x2f5c58||_0x16dc80[_0x3a0960(0x178)]===_0x2f5c58)['map'](skillHubRuntimeItemToRuntimeSkill)[_0x3a0960(0x173)](_0x2e8aff=>Boolean(_0x2e8aff)),_0x542065=_0x5ad68a[_0x3a0960(0x173)](_0x58cb34=>_0x58cb34[_0x3a0960(0x17f)]===_0x3a0960(0x1b4)),_0x43b8da=_0x5ad68a[_0x3a0960(0x173)](_0x3d35dc=>_0x3d35dc[_0x3a0960(0x17f)]==='company'),_0x5eb1c1=_0x5ad68a[_0x3a0960(0x173)](_0x7fa963=>_0x7fa963['scope']===_0x3a0960(0x18f));return{'appCode':_0x41038b,'personal':_0x59d268===_0x3a0960(0x1c2)||_0x59d268===_0x3a0960(0x18f)?[]:_0x542065,'company':_0x59d268===_0x3a0960(0x1b4)||_0x59d268===_0x3a0960(0x18f)?[]:_0x43b8da,'public':_0x59d268==='personal'||_0x59d268==='company'?[]:_0x5eb1c1,'effective':buildEffectiveRuntimeSkills(_0x542065,_0x43b8da,_0x5eb1c1,_0x59d268)};}function skillHubRuntimeItemToRuntimeSkill(_0x1f4e26){const _0x11d263=a56_0x523d,_0x5d9ae1=_0x1f4e26[_0x11d263(0x178)]?.[_0x11d263(0x1a7)](),_0x17d1ec=skillHubVisibilityToScope(_0x1f4e26[_0x11d263(0x1bb)]);if(!_0x5d9ae1||!_0x17d1ec)return undefined;return{'id':_0x1f4e26['id'],'appCode':_0x1f4e26['namespace'],'skillCode':_0x5d9ae1,'skillName':_0x1f4e26[_0x11d263(0x199)]??_0x5d9ae1,'description':_0x1f4e26['summary'],'scope':_0x17d1ec,'version':skillHubRuntimeItemVersion(_0x1f4e26),'status':_0x1f4e26[_0x11d263(0x196)]};}function skillHubVisibilityToScope(_0x565fe0){const _0x360eac=a56_0x523d;if(_0x565fe0===_0x360eac(0x1d0))return'personal';if(_0x565fe0===_0x360eac(0x18a))return _0x360eac(0x1c2);if(_0x565fe0===_0x360eac(0x19d))return _0x360eac(0x18f);return undefined;}function skillHubRuntimeItemVersion(_0x4fa415){const _0x11ca84=a56_0x523d;return _0x4fa415[_0x11ca84(0x1ad)]?.[_0x11ca84(0x163)]??_0x4fa415['headlineVersion']?.[_0x11ca84(0x163)]??_0x4fa415['ownerPreviewVersion']?.[_0x11ca84(0x163)];}function buildEffectiveRuntimeSkills(_0x1e103f,_0x307811,_0x47ce5a,_0x16072d){const _0x1e49eb=a56_0x523d;if(_0x16072d===_0x1e49eb(0x1b4))return _0x1e103f;if(_0x16072d===_0x1e49eb(0x1c2))return _0x307811;if(_0x16072d===_0x1e49eb(0x18f))return _0x47ce5a;const _0x5b2840=new Map();for(const _0x3dee7c of _0x47ce5a){_0x5b2840['set'](_0x3dee7c[_0x1e49eb(0x1d9)],_0x3dee7c);}for(const _0x43944f of _0x307811){_0x5b2840['set'](_0x43944f[_0x1e49eb(0x1d9)],_0x43944f);}for(const _0x3fc6d5 of _0x1e103f){_0x5b2840[_0x1e49eb(0x17a)](_0x3fc6d5[_0x1e49eb(0x1d9)],_0x3fc6d5);}return Array['from'](_0x5b2840[_0x1e49eb(0x1b2)]());}function normalizeRuntimeSkillListResponse(_0x5eb04d,_0x2c9dcc){const _0x10a93c=a56_0x523d;if(Array[_0x10a93c(0x1de)](_0x2c9dcc)){const _0x2544a3=_0x2c9dcc[_0x10a93c(0x173)](_0x1c406e=>_0x1c406e['scope']===_0x10a93c(0x1b4)),_0x3ccd38=_0x2c9dcc[_0x10a93c(0x173)](_0x7b7eea=>_0x7b7eea['scope']===_0x10a93c(0x1c2)),_0x4a2e60=_0x2c9dcc['filter'](_0x1b9f6f=>_0x1b9f6f[_0x10a93c(0x17f)]===_0x10a93c(0x18f));return{'appCode':_0x5eb04d,'personal':_0x2544a3,'company':_0x3ccd38,'public':_0x4a2e60,'effective':_0x2c9dcc['filter'](_0x27bd04=>_0x27bd04[_0x10a93c(0x17f)]!=='builtin')};}return{'appCode':_0x2c9dcc?.[_0x10a93c(0x1b7)]??_0x5eb04d,'personal':Array[_0x10a93c(0x1de)](_0x2c9dcc?.[_0x10a93c(0x1b4)])?_0x2c9dcc[_0x10a93c(0x1b4)]:[],'company':Array[_0x10a93c(0x1de)](_0x2c9dcc?.[_0x10a93c(0x1c2)])?_0x2c9dcc[_0x10a93c(0x1c2)]:[],'public':Array[_0x10a93c(0x1de)](_0x2c9dcc?.[_0x10a93c(0x18f)])?_0x2c9dcc[_0x10a93c(0x18f)]:[],'effective':Array[_0x10a93c(0x1de)](_0x2c9dcc?.[_0x10a93c(0x174)])?_0x2c9dcc['effective']:[]};}
|
|
1
|
+
(function(_0x4edcef,_0x2fc47e){const _0x5e3fea=a56_0x28b3,_0xb0a104=_0x4edcef();while(!![]){try{const _0x306fa2=-parseInt(_0x5e3fea(0x202))/0x1*(-parseInt(_0x5e3fea(0x22f))/0x2)+-parseInt(_0x5e3fea(0x231))/0x3+parseInt(_0x5e3fea(0x1ca))/0x4*(parseInt(_0x5e3fea(0x1f9))/0x5)+parseInt(_0x5e3fea(0x1cd))/0x6*(-parseInt(_0x5e3fea(0x23f))/0x7)+parseInt(_0x5e3fea(0x220))/0x8*(-parseInt(_0x5e3fea(0x232))/0x9)+parseInt(_0x5e3fea(0x238))/0xa*(-parseInt(_0x5e3fea(0x1c4))/0xb)+parseInt(_0x5e3fea(0x1e8))/0xc*(parseInt(_0x5e3fea(0x20c))/0xd);if(_0x306fa2===_0x2fc47e)break;else _0xb0a104['push'](_0xb0a104['shift']());}catch(_0x3f9b8e){_0xb0a104['push'](_0xb0a104['shift']());}}}(a56_0x3f25,0x918b1));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(_0x13cdba){_activeAK=_0x13cdba||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x2b0ded,_0xe242ed={}){const _0x5512ee=a56_0x28b3,{method:method=_0x5512ee(0x1ed),body:_0x13e203,headers:headers={},timeout:timeout=0x7530}=_0xe242ed,_0x1f9b92=_activeAK,_0xe9a902=getRuntimeDomain();if(!_0x1f9b92)throw CliErrors[_0x5512ee(0x1fe)](_0x5512ee(0x1d8)+PRODUCT_CONFIG[_0x5512ee(0x223)]+'.');const _0x4c71b2=''+_0xe9a902+_0x2b0ded,_0x89ec7d={'X-User-AK':_0x1f9b92},_0x310f44=new AbortController(),_0x545741=setTimeout(()=>_0x310f44[_0x5512ee(0x1e3)](),timeout);try{const _0x46f7d4=await fetch(_0x4c71b2,{'method':method,'headers':{'Content-Type':_0x5512ee(0x1e2),'X-Invoke-Source':PRODUCT_CONFIG[_0x5512ee(0x214)],..._0x89ec7d,...headers},'body':_0x13e203?JSON[_0x5512ee(0x213)](_0x13e203):undefined,'signal':_0x310f44['signal']});let _0x54f6ea;try{_0x54f6ea=await _0x46f7d4['json']();}catch{throw CliErrors[_0x5512ee(0x1c8)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x46f7d4['status']+')',_0x46f7d4[_0x5512ee(0x1d5)]>=0x190?_0x5512ee(0x226):undefined);}if(!_0x46f7d4['ok']||_0x54f6ea['success']===![])throw CliErrors[_0x5512ee(0x1c8)](_0x54f6ea['errorMsg']||_0x54f6ea[_0x5512ee(0x1e1)]||'API\x20error:\x20'+_0x46f7d4[_0x5512ee(0x1d5)],_0x54f6ea[_0x5512ee(0x1de)]?_0x5512ee(0x1dc)+_0x54f6ea[_0x5512ee(0x1de)]:undefined);return _0x54f6ea;}catch(_0x39ea61){if(_0x39ea61 instanceof Error&&_0x39ea61[_0x5512ee(0x22d)]==='AbortError')throw CliErrors[_0x5512ee(0x1c8)](_0x5512ee(0x212)+_0x4c71b2);throw _0x39ea61;}finally{clearTimeout(_0x545741);}}async function apiBinaryRequest(_0x184a56,_0x56232d={}){const _0x203b95=a56_0x28b3,{method:method=_0x203b95(0x1ed),headers:headers={},timeout:timeout=0x7530}=_0x56232d,_0x5e4e40=_activeAK,_0x234f68=getRuntimeDomain();if(!_0x5e4e40)throw CliErrors[_0x203b95(0x1fe)](_0x203b95(0x1d8)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x4ea2bc=''+_0x234f68+_0x184a56,_0x3f849b=new AbortController(),_0x54af70=setTimeout(()=>_0x3f849b[_0x203b95(0x1e3)](),timeout);try{const _0x318f41=await fetch(_0x4ea2bc,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x5e4e40,...headers},'signal':_0x3f849b[_0x203b95(0x22a)]});if(!_0x318f41['ok']){let _0x4a2dce;try{const _0x449d93=await _0x318f41[_0x203b95(0x235)]();_0x4a2dce=_0x449d93[_0x203b95(0x1d4)]||_0x449d93[_0x203b95(0x1e1)]||_0x449d93[_0x203b95(0x1de)];}catch{_0x4a2dce=await _0x318f41[_0x203b95(0x1f7)]()['catch'](()=>undefined);}throw CliErrors[_0x203b95(0x1c8)](_0x4a2dce||_0x203b95(0x20f)+_0x318f41[_0x203b95(0x1d5)],_0x203b95(0x23a)+_0x4ea2bc);}return Buffer['from'](await _0x318f41[_0x203b95(0x243)]());}catch(_0x5826ce){if(_0x5826ce instanceof Error&&_0x5826ce['name']==='AbortError')throw CliErrors[_0x203b95(0x1c8)](_0x203b95(0x212)+_0x4ea2bc);throw _0x5826ce;}finally{clearTimeout(_0x54af70);}}async function toolboxRequest(_0x1cb5ae,_0x5ad9ca,_0x32fd05={}){const _0x4c7c4c=a56_0x28b3,{method:method=_0x4c7c4c(0x1ed),headers:headers={},timeout:timeout=0x7530}=_0x32fd05,_0x3c4b04=_activeAK;if(!_0x3c4b04)throw CliErrors[_0x4c7c4c(0x1fe)](_0x4c7c4c(0x1d8)+PRODUCT_CONFIG[_0x4c7c4c(0x223)]+'.');const _0x4109eb=getApiDomain()[_0x4c7c4c(0x1f0)](/\/$/,''),_0x26f80c=new URL(_0x1cb5ae,_0x4109eb+_0x4c7c4c(0x1f4));if(_0x5ad9ca)for(const [_0x57e009,_0x448ac6]of Object[_0x4c7c4c(0x1ee)](_0x5ad9ca)){_0x448ac6!==undefined&&_0x448ac6!==null&&_0x26f80c['searchParams']['set'](_0x57e009,String(_0x448ac6));}const _0x469f71=new AbortController(),_0xc24ebf=setTimeout(()=>_0x469f71['abort'](),timeout);try{const _0x524944=await fetch(_0x26f80c,{'method':method,'headers':{'Content-Type':_0x4c7c4c(0x1e2),'X-Invoke-Source':PRODUCT_CONFIG[_0x4c7c4c(0x214)],'X-User-AK':_0x3c4b04,...headers},'signal':_0x469f71[_0x4c7c4c(0x22a)]});let _0x53c063;try{_0x53c063=await _0x524944['json']();}catch{throw CliErrors[_0x4c7c4c(0x1c8)](_0x4c7c4c(0x1d7)+_0x524944[_0x4c7c4c(0x1d5)]+')',_0x524944['status']>=0x190?_0x4c7c4c(0x226):undefined);}if(!_0x524944['ok']){const _0x172ec2=_0x53c063&&typeof _0x53c063==='object'?_0x53c063:{};throw CliErrors[_0x4c7c4c(0x1c8)](_0x172ec2[_0x4c7c4c(0x1d4)]||_0x172ec2[_0x4c7c4c(0x1e1)]||_0x4c7c4c(0x237)+_0x524944[_0x4c7c4c(0x1d5)],_0x172ec2[_0x4c7c4c(0x1de)]?_0x4c7c4c(0x205)+_0x172ec2[_0x4c7c4c(0x1de)]:undefined);}if(_0x53c063&&typeof _0x53c063===_0x4c7c4c(0x227)&&_0x4c7c4c(0x1ea)in _0x53c063&&typeof _0x53c063['success']===_0x4c7c4c(0x207)){const _0x2fc595=_0x53c063;if(!_0x2fc595[_0x4c7c4c(0x1ea)])throw CliErrors['apiError'](_0x2fc595[_0x4c7c4c(0x1d4)]||_0x2fc595['message']||'Toolbox\x20API\x20error',_0x2fc595[_0x4c7c4c(0x1de)]?'Toolbox\x20error\x20code:\x20'+_0x2fc595[_0x4c7c4c(0x1de)]:undefined);return _0x2fc595['data'];}return _0x53c063;}catch(_0x29fe7c){if(_0x29fe7c instanceof Error&&_0x29fe7c[_0x4c7c4c(0x22d)]===_0x4c7c4c(0x20e))throw CliErrors[_0x4c7c4c(0x1c8)](_0x4c7c4c(0x212)+_0x26f80c[_0x4c7c4c(0x1c6)]());throw _0x29fe7c;}finally{clearTimeout(_0xc24ebf);}}async function skillHubJsonRequest(_0x2117f9,_0x3601c6={}){const _0x28b401=a56_0x28b3,{method:method=_0x28b401(0x1ed),query:_0x357b3c,body:_0x1f0594,headers:headers={},timeout:timeout=0x7530}=_0x3601c6,_0x43d8c7=_activeAK;if(!_0x43d8c7)throw CliErrors['authRequired'](_0x28b401(0x1d8)+PRODUCT_CONFIG[_0x28b401(0x223)]+'.');const _0x20a6cf=getSkillHubDomain()[_0x28b401(0x1f0)](/\/$/,''),_0x3a390e=new URL(_0x2117f9,_0x20a6cf+'/');if(_0x357b3c)for(const [_0x11ecb9,_0xa0b5c4]of Object[_0x28b401(0x1ee)](_0x357b3c)){_0xa0b5c4!==undefined&&_0xa0b5c4!==null&&_0x3a390e[_0x28b401(0x1fb)][_0x28b401(0x21e)](_0x11ecb9,String(_0xa0b5c4));}const _0xb36439=new AbortController(),_0x9708eb=setTimeout(()=>_0xb36439[_0x28b401(0x1e3)](),timeout);try{const _0xfdde91=await fetch(_0x3a390e[_0x28b401(0x1c6)](),{'method':method,'headers':{'Accept':_0x28b401(0x1e2),'X-Invoke-Source':PRODUCT_CONFIG[_0x28b401(0x214)],'X-User-AK':_0x43d8c7,...headers},'body':_0x1f0594,'signal':_0xb36439[_0x28b401(0x22a)]});let _0x3d58d;try{_0x3d58d=await _0xfdde91[_0x28b401(0x235)]();}catch{throw CliErrors[_0x28b401(0x1c8)](_0x28b401(0x1c2)+_0xfdde91[_0x28b401(0x1d5)]+')',_0xfdde91[_0x28b401(0x1d5)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x557fe9=!_0xfdde91['ok']||_0x3d58d?.[_0x28b401(0x1ea)]===![]||typeof _0x3d58d?.[_0x28b401(0x225)]===_0x28b401(0x201)&&_0x3d58d['code']>=0x190;if(_0x557fe9)throw CliErrors[_0x28b401(0x1c8)](_0x3d58d?.[_0x28b401(0x1d4)]||_0x3d58d?.[_0x28b401(0x1e1)]||_0x3d58d?.[_0x28b401(0x206)]||_0x28b401(0x1be)+_0xfdde91['status'],_0x3d58d?.[_0x28b401(0x1de)]?_0x28b401(0x210)+_0x3d58d[_0x28b401(0x1de)]:undefined);return _0x3d58d?.[_0x28b401(0x1fc)]??_0x3d58d;}catch(_0xe20cbe){if(_0xe20cbe instanceof Error&&_0xe20cbe[_0x28b401(0x22d)]===_0x28b401(0x20e))throw CliErrors[_0x28b401(0x1c8)](_0x28b401(0x212)+_0x3a390e['toString']());throw _0xe20cbe;}finally{clearTimeout(_0x9708eb);}}async function skillHubBinaryRequest(_0x2760de,_0xe080a0={}){const _0x5497ed=a56_0x28b3,{query:_0x3d9c83,headers:headers={},timeout:timeout=0x7530}=_0xe080a0,_0x5e4b77=_activeAK;if(!_0x5e4b77)throw CliErrors['authRequired'](_0x5497ed(0x1d8)+PRODUCT_CONFIG[_0x5497ed(0x223)]+'.');const _0xf08494=getSkillHubDomain()['replace'](/\/$/,''),_0xbaa262=new URL(_0x2760de,_0xf08494+'/');if(_0x3d9c83)for(const [_0x487de9,_0x38c2da]of Object['entries'](_0x3d9c83)){_0x38c2da!==undefined&&_0x38c2da!==null&&_0xbaa262[_0x5497ed(0x1fb)][_0x5497ed(0x21e)](_0x487de9,String(_0x38c2da));}const _0x3315f2=new AbortController(),_0x36c247=setTimeout(()=>_0x3315f2[_0x5497ed(0x1e3)](),timeout);try{const _0x127f05=await fetch(_0xbaa262[_0x5497ed(0x1c6)](),{'method':_0x5497ed(0x1ed),'headers':{'Accept':_0x5497ed(0x1da),'X-Invoke-Source':PRODUCT_CONFIG[_0x5497ed(0x214)],'X-User-AK':_0x5e4b77,...headers},'signal':_0x3315f2[_0x5497ed(0x22a)]});if(!_0x127f05['ok']){let _0x555dfd;try{const _0x54cd1d=await _0x127f05[_0x5497ed(0x235)]();_0x555dfd=_0x54cd1d[_0x5497ed(0x1d4)]||_0x54cd1d[_0x5497ed(0x1e1)]||_0x54cd1d[_0x5497ed(0x206)]||_0x54cd1d[_0x5497ed(0x1de)];}catch{_0x555dfd=await _0x127f05[_0x5497ed(0x1f7)]()['catch'](()=>undefined);}throw CliErrors['apiError'](_0x555dfd||_0x5497ed(0x1be)+_0x127f05[_0x5497ed(0x1d5)],_0x5497ed(0x23a)+_0xbaa262['toString']());}return Buffer['from'](await _0x127f05[_0x5497ed(0x243)]());}catch(_0x21475b){if(_0x21475b instanceof Error&&_0x21475b[_0x5497ed(0x22d)]==='AbortError')throw CliErrors[_0x5497ed(0x1c8)](_0x5497ed(0x212)+_0xbaa262[_0x5497ed(0x1c6)]());throw _0x21475b;}finally{clearTimeout(_0x36c247);}}export async function getBffScriptInfo(_0xbf6b42){const _0x13c71a=a56_0x28b3,_0x324fa2=await apiRequest(_0x13c71a(0x1f6)+_0xbf6b42);if(!_0x324fa2[_0x13c71a(0x1fc)])throw CliErrors[_0x13c71a(0x203)](_0x13c71a(0x209)+_0xbf6b42);return _0x324fa2[_0x13c71a(0x1fc)];}export async function getSqlQueryInfo(_0x1106ac,_0x2168b8){const _0x15b015=a56_0x28b3,_0x371b27=await apiRequest(_0x15b015(0x1ce),{'method':_0x15b015(0x1eb),'body':{'appCode':_0x1106ac,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x2168b8}}),_0x1f8ac4=_0x371b27[_0x15b015(0x1fc)],_0x2c1d8d=_0x1f8ac4&&typeof _0x1f8ac4===_0x15b015(0x227)&&_0x15b015(0x21b)in _0x1f8ac4?_0x1f8ac4[_0x15b015(0x21b)]?.[0x0]:_0x1f8ac4&&typeof _0x1f8ac4===_0x15b015(0x227)&&_0x15b015(0x22e)in _0x1f8ac4?_0x1f8ac4:undefined;if(!_0x2c1d8d)throw CliErrors[_0x15b015(0x203)](_0x15b015(0x1d9)+_0x2168b8);return _0x2c1d8d;}function isRemoteAppItem(_0x140879){const _0x201294=a56_0x28b3;return!!_0x140879&&typeof _0x140879===_0x201294(0x227)&&typeof _0x140879[_0x201294(0x1f1)]===_0x201294(0x1d6)&&typeof _0x140879[_0x201294(0x1fd)]===_0x201294(0x1d6);}function a56_0x3f25(){const _0xb0fead=['SQL\x20query\x20not\x20found:\x20','application/octet-stream','markdown','API\x20error\x20code:\x20','favorite','errorCode','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','ownerPreviewVersion','message','application/json','abort','from','Missing\x20Skill\x20package\x20payload.','/client/knowledge-base/personal/list?appCode=','description','3641076lfGkjH','skillName','success','POST','NAMESPACE_ONLY','GET','entries','/client/user/loginUserInfo','replace','appCode','public','undefined','/api/node-toolbox/','values','/client/bff/query/','text','version','175SmwYzC','test','searchParams','data','appName','authRequired','visibility','/api/cli/v1/skills/','number','1HgrIaO','validation','slug','Toolbox\x20error\x20code:\x20','msg','boolean','displayName','BFF\x20script\x20not\x20found:\x20id=','?appCode=','items','78HzuUmw','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','AbortError','API\x20error:\x20','SkillHub\x20error\x20code:\x20','topK','Request\x20timeout:\x20','stringify','invokeSource','application/zip','PUBLIC','filter','personal','files','skillCode','tableData','.zip','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','set','trim','5144504NcGajb','/client/artifact/list?','/client/dataset/list','newConfigFileName','/skills','code','Check\x20your\x20credentials\x20and\x20try\x20again.','object','packageBase64','/client/app/my-apps','signal','source','/client/artifact/create','name','sqlCode','1985762RXFGIR','scope','1535805BbcDEn','9zvgjwu','artifactType','/client/runtime-bff/personal/','json','Artifact\x20not\x20found:\x20id=','Toolbox\x20API\x20error:\x20','20PDnTqw','Personal\x20BFF\x20not\x20found:\x20id=','Download\x20failed:\x20','builtin','/client/knowledge-base/search','/update','content','1701PAWeCD','/client/knowledge-base/personal/create','publishedVersion','user','arrayBuffer','/client/knowledge-base/personal/','company','SkillHub\x20API\x20error:\x20','/client/artifact/','api-doc-generator','/download','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','summary','2238434UNwiIv','/client/runtime-bff/personal/list?appCode=','toString','isArray','apiError','/versions/','33724tFFalV','namespace','PRIVATE','23466MeFYoz','/client/sql/query','query','map','Knowledge-base\x20entry\x20not\x20found:\x20id=','effective','/execute?appCode=','errorMsg','status','string','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Configure\x20accessKey\x20in\x20'];a56_0x3f25=function(){return _0xb0fead;};return a56_0x3f25();}function extractRemoteAppItems(_0x634a59){const _0x23b106=a56_0x28b3;if(Array[_0x23b106(0x1c7)](_0x634a59))return _0x634a59[_0x23b106(0x217)](isRemoteAppItem);if(!_0x634a59||typeof _0x634a59!==_0x23b106(0x227))throw CliErrors[_0x23b106(0x1c8)](_0x23b106(0x1df));const _0x1734a6=_0x634a59;if(Array['isArray'](_0x1734a6[_0x23b106(0x21b)]))return _0x1734a6['tableData'][_0x23b106(0x217)](isRemoteAppItem);if(_0x1734a6[_0x23b106(0x1fc)]&&typeof _0x1734a6[_0x23b106(0x1fc)]==='object'){const _0x2c743e=_0x1734a6[_0x23b106(0x1fc)];if(Array[_0x23b106(0x1c7)](_0x2c743e[_0x23b106(0x21b)]))return _0x2c743e[_0x23b106(0x21b)][_0x23b106(0x217)](isRemoteAppItem);}throw CliErrors['apiError'](_0x23b106(0x20d));}export async function getMyApps(){const _0xb15e87=a56_0x28b3,_0x2d25ed=await apiRequest(_0xb15e87(0x229));return extractRemoteAppItems(_0x2d25ed[_0xb15e87(0x1fc)]);}export async function getLoginUserInfo(){const _0x2784c0=a56_0x28b3,_0x1026a7=await apiRequest(_0x2784c0(0x1ef));if(!_0x1026a7[_0x2784c0(0x1fc)]||typeof _0x1026a7[_0x2784c0(0x1fc)]!==_0x2784c0(0x227)||Array['isArray'](_0x1026a7['data']))throw CliErrors[_0x2784c0(0x1c8)](_0x2784c0(0x21d));return _0x1026a7['data'];}export async function listDatasets(_0x5b0dad,_0x314659){const _0x5a8086=a56_0x28b3,_0x198637=await apiRequest(_0x5a8086(0x222),{'method':_0x5a8086(0x1eb),'body':{'appCode':_0x5b0dad,..._0x314659?.[_0x5a8086(0x225)]&&{'code':_0x314659[_0x5a8086(0x225)]},..._0x314659?.[_0x5a8086(0x22d)]&&{'name':_0x314659[_0x5a8086(0x22d)]}}});return extractList(_0x198637[_0x5a8086(0x1fc)]);}export async function getDatasetDetail(_0x2d9713){const _0x4e2bdd=a56_0x28b3,_0x50b70d=/^\d+$/[_0x4e2bdd(0x1fa)](_0x2d9713)?'id':_0x4e2bdd(0x225),_0x4151ed=await apiRequest('/client/dataset/query?'+_0x50b70d+'='+_0x2d9713);return _0x4151ed[_0x4e2bdd(0x1fc)];}export async function getDatasetSdkUsageDoc(_0x82529e,_0x53e84){const _0xfe5c9a=a56_0x28b3,_0x3f175f=await toolboxRequest(_0xfe5c9a(0x1c0),{'datasetCode':_0x82529e,'appCode':_0x53e84});return typeof _0x3f175f?.[_0xfe5c9a(0x1db)]===_0xfe5c9a(0x1d6)?_0x3f175f[_0xfe5c9a(0x1db)]:'';}export async function listRuntimeArtifacts(_0xdf58b6,_0x311d82){const _0x3b77df=a56_0x28b3,_0x2eafbe=new URLSearchParams({'appCode':_0xdf58b6});if(_0x311d82?.['artifactType'])_0x2eafbe[_0x3b77df(0x21e)](_0x3b77df(0x233),_0x311d82['artifactType']);if(_0x311d82?.[_0x3b77df(0x22b)])_0x2eafbe['set'](_0x3b77df(0x22b),_0x311d82[_0x3b77df(0x22b)]);if(_0x311d82?.[_0x3b77df(0x1dd)]!==undefined)_0x2eafbe['set'](_0x3b77df(0x1dd),String(_0x311d82['favorite']));const _0x20af86=await apiRequest(_0x3b77df(0x221)+_0x2eafbe['toString']());return Array[_0x3b77df(0x1c7)](_0x20af86['data'])?_0x20af86[_0x3b77df(0x1fc)]:[];}export async function getRuntimeArtifact(_0x3cc4bf,_0x548068){const _0x4eb46c=a56_0x28b3,_0x2f9a39=await apiRequest(_0x4eb46c(0x1bf)+_0x3cc4bf+_0x4eb46c(0x20a)+encodeURIComponent(_0x548068));if(!_0x2f9a39[_0x4eb46c(0x1fc)])throw CliErrors[_0x4eb46c(0x203)](_0x4eb46c(0x236)+_0x3cc4bf);return _0x2f9a39['data'];}export async function createRuntimeArtifact(_0x50bd79,_0x5be092){const _0xa750d=a56_0x28b3,_0x5e94ca=await apiRequest(_0xa750d(0x22c),{'method':_0xa750d(0x1eb),'body':{'appCode':_0x50bd79,..._0x5be092}});return _0x5e94ca[_0xa750d(0x1fc)];}export async function updateRuntimeArtifact(_0x590e67,_0x104eef,_0x46dfa0){const _0x1a38be=a56_0x28b3,_0x17431a=await apiRequest(_0x1a38be(0x1bf)+_0x590e67+'/update',{'method':_0x1a38be(0x1eb),'body':{'appCode':_0x104eef,..._0x46dfa0}});return _0x17431a['data'];}export async function listPersonalBffs(_0x1936ba){const _0x2351bc=a56_0x28b3,_0x216a79=await apiRequest(_0x2351bc(0x1c5)+encodeURIComponent(_0x1936ba));return Array[_0x2351bc(0x1c7)](_0x216a79[_0x2351bc(0x1fc)])?_0x216a79[_0x2351bc(0x1fc)]:[];}export async function getPersonalBff(_0xce1a7a,_0x5d6160){const _0x59a493=a56_0x28b3,_0x2ef245=await apiRequest(_0x59a493(0x234)+_0xce1a7a+_0x59a493(0x20a)+encodeURIComponent(_0x5d6160));if(!_0x2ef245[_0x59a493(0x1fc)])throw CliErrors['validation'](_0x59a493(0x239)+_0xce1a7a);return _0x2ef245['data'];}export async function createPersonalBff(_0x254ce1,_0x458a28){const _0x73d482=a56_0x28b3,_0xb874f5=await apiRequest('/client/runtime-bff/personal/create',{'method':_0x73d482(0x1eb),'body':{'appCode':_0x254ce1,..._0x458a28}});return _0xb874f5[_0x73d482(0x1fc)];}export async function updatePersonalBff(_0x1e2416,_0x218a7d,_0x29ea78){const _0x3f5f65=a56_0x28b3,_0x29c613=await apiRequest(_0x3f5f65(0x234)+_0x1e2416+_0x3f5f65(0x23d),{'method':_0x3f5f65(0x1eb),'body':{'appCode':_0x218a7d,..._0x29ea78}});return _0x29c613[_0x3f5f65(0x1fc)];}export async function executePersonalBff(_0x175d73,_0x157777,_0x324f46){const _0x178d0e=a56_0x28b3,_0x7e20cf=await apiRequest(_0x178d0e(0x234)+_0x175d73+_0x178d0e(0x1d3)+encodeURIComponent(_0x157777),{'method':'POST','body':_0x324f46});return _0x7e20cf[_0x178d0e(0x1fc)];}export async function listPersonalKnowledgeBaseItems(_0x190cbb){const _0x28e1c9=a56_0x28b3,_0x5f1086=await apiRequest(_0x28e1c9(0x1e6)+encodeURIComponent(_0x190cbb));return Array['isArray'](_0x5f1086[_0x28e1c9(0x1fc)])?_0x5f1086[_0x28e1c9(0x1fc)]:[];}export async function getPersonalKnowledgeBaseItem(_0x4150bd,_0x589147){const _0x3fda68=a56_0x28b3,_0x3abd01=await apiRequest('/client/knowledge-base/personal/'+_0x4150bd+_0x3fda68(0x20a)+encodeURIComponent(_0x589147));if(!_0x3abd01[_0x3fda68(0x1fc)])throw CliErrors[_0x3fda68(0x203)](_0x3fda68(0x1d1)+_0x4150bd);return _0x3abd01['data'];}export async function createPersonalKnowledgeBaseItem(_0x2081d0,_0x21a85c){const _0x49fc42=a56_0x28b3,_0x16d7dd=await apiRequest(_0x49fc42(0x240),{'method':_0x49fc42(0x1eb),'body':{'appCode':_0x2081d0,..._0x21a85c}});return _0x16d7dd[_0x49fc42(0x1fc)];}export async function updatePersonalKnowledgeBaseItem(_0x27deb8,_0x2a9ceb,_0x130837){const _0xc57717=a56_0x28b3,_0x3a1e92=await apiRequest(_0xc57717(0x1bc)+_0x27deb8+_0xc57717(0x23d),{'method':'POST','body':{'appCode':_0x2a9ceb,..._0x130837}});return _0x3a1e92[_0xc57717(0x1fc)];}export async function searchKnowledgeBase(_0x575662,_0xc137f0){const _0x218fa8=a56_0x28b3,_0x4754a1=await apiRequest(_0x218fa8(0x23c),{'method':'POST','body':{'appCode':_0x575662,'query':_0xc137f0[_0x218fa8(0x1cf)],..._0xc137f0['topK']!==undefined?{'topK':_0xc137f0[_0x218fa8(0x211)]}:{}}});return Array[_0x218fa8(0x1c7)](_0x4754a1['data'])?_0x4754a1[_0x218fa8(0x1fc)]:[];}export async function listRuntimeSkills(_0xbaf7ef){const _0x1e0e1d=a56_0x28b3,_0x55e446=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0xbaf7ef[_0x1e0e1d(0x1f1)])+_0x1e0e1d(0x224),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0xbaf7ef[_0x1e0e1d(0x1f1)],_0x55e446,_0xbaf7ef['scope']??_0x1e0e1d(0x242),_0xbaf7ef[_0x1e0e1d(0x225)]);}export async function listPersonalRuntimeSkills(_0x10abb7){const _0x39b120=a56_0x28b3;return(await listRuntimeSkills({'appCode':_0x10abb7,'scope':_0x39b120(0x218)}))[_0x39b120(0x218)];}export async function listCompanyRuntimeSkills(_0x343511){const _0x3796ab=a56_0x28b3;return(await listRuntimeSkills({'appCode':_0x343511,'scope':_0x3796ab(0x1bd)}))[_0x3796ab(0x1bd)];}export async function listVisibleRuntimeSkills(_0x81552f){const _0x2a826b=a56_0x28b3;return(await listRuntimeSkills({'appCode':_0x81552f,'scope':_0x2a826b(0x242)}))[_0x2a826b(0x1d2)];}export async function createPersonalRuntimeSkill(_0x545e3f,_0x36c088){return publishRuntimeSkill(_0x545e3f,_0x36c088);}export async function updatePersonalRuntimeSkill(_0x32ce6b,_0x40a228,_0x23c75a){const _0x58c546=a56_0x28b3;return publishRuntimeSkill(_0x40a228,{..._0x23c75a,'skillCode':_0x23c75a[_0x58c546(0x21a)]??_0x32ce6b});}export async function downloadRuntimeSkillPackage(_0x512410,_0x1e830d,_0x362ca7,_0x2563c9){const _0x4a5f6b=a56_0x28b3;void _0x512410;const _0x51d56c=_0x2563c9?_0x4a5f6b(0x200)+encodeURIComponent(_0x362ca7)+'/'+encodeURIComponent(_0x1e830d)+_0x4a5f6b(0x1c9)+encodeURIComponent(_0x2563c9)+_0x4a5f6b(0x1c1):'/api/cli/v1/skills/'+encodeURIComponent(_0x362ca7)+'/'+encodeURIComponent(_0x1e830d)+_0x4a5f6b(0x1c1);return skillHubBinaryRequest(_0x51d56c);}async function publishRuntimeSkill(_0x4c476e,_0x43949a){const _0x4e48d6=a56_0x28b3,_0x380fc1=new FormData();_0x380fc1[_0x4e48d6(0x21e)]('file',runtimeSkillPackageFile(_0x43949a)),_0x380fc1[_0x4e48d6(0x21e)](_0x4e48d6(0x1ff),_0x4e48d6(0x1cc));const _0x16b4bf=await skillHubJsonRequest(_0x4e48d6(0x200)+encodeURIComponent(_0x4c476e)+'/publish',{'method':_0x4e48d6(0x1eb),'body':_0x380fc1});return{'appCode':_0x16b4bf[_0x4e48d6(0x1cb)]??_0x4c476e,'skillCode':_0x16b4bf[_0x4e48d6(0x204)]??_0x43949a[_0x4e48d6(0x21a)]??'','skillName':_0x43949a[_0x4e48d6(0x1e9)]??_0x16b4bf[_0x4e48d6(0x204)]??_0x43949a[_0x4e48d6(0x21a)],'description':_0x43949a[_0x4e48d6(0x1e7)],'scope':skillHubVisibilityToScope(_0x16b4bf[_0x4e48d6(0x1ff)])??_0x4e48d6(0x218),'version':_0x16b4bf[_0x4e48d6(0x1f8)]??_0x43949a[_0x4e48d6(0x1f8)],'tags':_0x43949a['tags'],'content':_0x43949a[_0x4e48d6(0x23e)],'files':_0x43949a[_0x4e48d6(0x219)]};}function a56_0x28b3(_0x59e6b7,_0x2ec0fd){_0x59e6b7=_0x59e6b7-0x1bc;const _0x3f25e4=a56_0x3f25();let _0x28b35f=_0x3f25e4[_0x59e6b7];return _0x28b35f;}function runtimeSkillPackageFile(_0x17f0b7){const _0x22b3dc=a56_0x28b3;if(!_0x17f0b7[_0x22b3dc(0x228)])throw CliErrors[_0x22b3dc(0x203)](_0x22b3dc(0x1e5));const _0x48ead3=Buffer[_0x22b3dc(0x1e4)](_0x17f0b7['packageBase64'],'base64'),_0x44018=new Blob([_0x48ead3],{'type':_0x22b3dc(0x215)}),_0x42d970=(_0x17f0b7['skillCode']||'skill')+_0x22b3dc(0x21c);if(typeof File!==_0x22b3dc(0x1f3))return new File([_0x44018],_0x42d970,{'type':'application/zip'});return _0x44018;}function normalizeSkillHubRuntimeListResponse(_0x1e8fe7,_0x114e45,_0x22acad,_0x2f4ff2){const _0x2846be=a56_0x28b3,_0x359735=Array['isArray'](_0x114e45)?_0x114e45:Array[_0x2846be(0x1c7)](_0x114e45?.[_0x2846be(0x20b)])?_0x114e45[_0x2846be(0x20b)]:[],_0x4dabc3=_0x2f4ff2?.[_0x2846be(0x21f)](),_0x1a6352=_0x359735[_0x2846be(0x217)](_0x3eb3b5=>!_0x4dabc3||_0x3eb3b5[_0x2846be(0x204)]===_0x4dabc3)[_0x2846be(0x1d0)](skillHubRuntimeItemToRuntimeSkill)[_0x2846be(0x217)](_0x37dd55=>Boolean(_0x37dd55)),_0x43bc87=_0x1a6352[_0x2846be(0x217)](_0x3bedee=>_0x3bedee['scope']===_0x2846be(0x218)),_0x238cef=_0x1a6352[_0x2846be(0x217)](_0x108510=>_0x108510['scope']===_0x2846be(0x1bd)),_0x3cb7b3=_0x1a6352[_0x2846be(0x217)](_0x3d570b=>_0x3d570b[_0x2846be(0x230)]==='public');return{'appCode':_0x1e8fe7,'personal':_0x22acad===_0x2846be(0x1bd)||_0x22acad==='public'?[]:_0x43bc87,'company':_0x22acad===_0x2846be(0x218)||_0x22acad===_0x2846be(0x1f2)?[]:_0x238cef,'public':_0x22acad===_0x2846be(0x218)||_0x22acad==='company'?[]:_0x3cb7b3,'effective':buildEffectiveRuntimeSkills(_0x43bc87,_0x238cef,_0x3cb7b3,_0x22acad)};}function skillHubRuntimeItemToRuntimeSkill(_0xb78fd4){const _0x573bcf=a56_0x28b3,_0x9367ec=_0xb78fd4['slug']?.[_0x573bcf(0x21f)](),_0x543a0e=skillHubVisibilityToScope(_0xb78fd4[_0x573bcf(0x1ff)]);if(!_0x9367ec||!_0x543a0e)return undefined;return{'id':_0xb78fd4['id'],'appCode':_0xb78fd4['namespace'],'skillCode':_0x9367ec,'skillName':_0xb78fd4[_0x573bcf(0x208)]??_0x9367ec,'description':_0xb78fd4[_0x573bcf(0x1c3)],'scope':_0x543a0e,'version':skillHubRuntimeItemVersion(_0xb78fd4),'status':_0xb78fd4[_0x573bcf(0x1d5)]};}function skillHubVisibilityToScope(_0x26ed0f){const _0x11185d=a56_0x28b3;if(_0x26ed0f===_0x11185d(0x1cc))return _0x11185d(0x218);if(_0x26ed0f===_0x11185d(0x1ec))return _0x11185d(0x1bd);if(_0x26ed0f===_0x11185d(0x216))return _0x11185d(0x1f2);return undefined;}function skillHubRuntimeItemVersion(_0x11ff50){const _0x962eb9=a56_0x28b3;return _0x11ff50[_0x962eb9(0x241)]?.[_0x962eb9(0x1f8)]??_0x11ff50['headlineVersion']?.['version']??_0x11ff50[_0x962eb9(0x1e0)]?.['version'];}function buildEffectiveRuntimeSkills(_0x4e9e46,_0x52df63,_0x55b472,_0x241654){const _0x30e271=a56_0x28b3;if(_0x241654===_0x30e271(0x218))return _0x4e9e46;if(_0x241654===_0x30e271(0x1bd))return _0x52df63;if(_0x241654===_0x30e271(0x1f2))return _0x55b472;const _0x524814=new Map();for(const _0x41f400 of _0x55b472){_0x524814[_0x30e271(0x21e)](_0x41f400[_0x30e271(0x21a)],_0x41f400);}for(const _0x596f8b of _0x52df63){_0x524814[_0x30e271(0x21e)](_0x596f8b['skillCode'],_0x596f8b);}for(const _0x519b70 of _0x4e9e46){_0x524814['set'](_0x519b70[_0x30e271(0x21a)],_0x519b70);}return Array['from'](_0x524814[_0x30e271(0x1f5)]());}function normalizeRuntimeSkillListResponse(_0x5c4fae,_0x2646a){const _0x3f6f44=a56_0x28b3;if(Array[_0x3f6f44(0x1c7)](_0x2646a)){const _0x5ac4de=_0x2646a[_0x3f6f44(0x217)](_0x31ccc7=>_0x31ccc7['scope']===_0x3f6f44(0x218)),_0x4140b5=_0x2646a[_0x3f6f44(0x217)](_0x5989d3=>_0x5989d3[_0x3f6f44(0x230)]==='company'),_0x25a836=_0x2646a['filter'](_0x3fb97b=>_0x3fb97b[_0x3f6f44(0x230)]==='public');return{'appCode':_0x5c4fae,'personal':_0x5ac4de,'company':_0x4140b5,'public':_0x25a836,'effective':_0x2646a[_0x3f6f44(0x217)](_0x5d40ef=>_0x5d40ef[_0x3f6f44(0x230)]!==_0x3f6f44(0x23b))};}return{'appCode':_0x2646a?.[_0x3f6f44(0x1f1)]??_0x5c4fae,'personal':Array[_0x3f6f44(0x1c7)](_0x2646a?.[_0x3f6f44(0x218)])?_0x2646a[_0x3f6f44(0x218)]:[],'company':Array[_0x3f6f44(0x1c7)](_0x2646a?.[_0x3f6f44(0x1bd)])?_0x2646a[_0x3f6f44(0x1bd)]:[],'public':Array[_0x3f6f44(0x1c7)](_0x2646a?.[_0x3f6f44(0x1f2)])?_0x2646a[_0x3f6f44(0x1f2)]:[],'effective':Array[_0x3f6f44(0x1c7)](_0x2646a?.['effective'])?_0x2646a[_0x3f6f44(0x1d2)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8a0ab,_0x319ba9){const _0x510855=a57_0x7444,_0x34c271=_0x8a0ab();while(!![]){try{const _0x451951=parseInt(_0x510855(0x1a1))/0x1*(parseInt(_0x510855(0x19b))/0x2)+parseInt(_0x510855(0x196))/0x3*(-parseInt(_0x510855(0x19d))/0x4)+parseInt(_0x510855(0x1a2))/0x5+parseInt(_0x510855(0x19e))/0x6*(-parseInt(_0x510855(0x199))/0x7)+-parseInt(_0x510855(0x19f))/0x8+-parseInt(_0x510855(0x195))/0x9+parseInt(_0x510855(0x19c))/0xa;if(_0x451951===_0x319ba9)break;else _0x34c271['push'](_0x34c271['shift']());}catch(_0x1f4c2d){_0x34c271['push'](_0x34c271['shift']());}}}(a57_0x21a9,0x5e74a));import{listDatasets}from'../core/api-client.js';function a57_0x7444(_0x46e586,_0x504fbf){_0x46e586=_0x46e586-0x192;const _0x21a9d6=a57_0x21a9();let _0x744455=_0x21a9d6[_0x46e586];return _0x744455;}const cache=new Map();export async function listDatabases(_0x312381){const _0x2af697=a57_0x7444;if(cache[_0x2af697(0x197)](_0x312381))return cache['get'](_0x312381);const _0x490477=await listDatasets(_0x312381),_0x5dbd67=new Map();for(const _0x3f5b94 of _0x490477){const _0x10c5ca=_0x3f5b94['dbtableConfig'];_0x10c5ca?.[_0x2af697(0x19a)]!=null&&_0x5dbd67['set'](_0x10c5ca[_0x2af697(0x19a)],_0x10c5ca[_0x2af697(0x193)]??_0x2af697(0x192)+_0x10c5ca['dbId']);}const _0x279753=[..._0x5dbd67['entries']()][_0x2af697(0x194)](([_0x40add9,_0x4878fc])=>({'dbId':_0x40add9,'dbName':_0x4878fc}));return cache[_0x2af697(0x198)](_0x312381,_0x279753),_0x279753;}function a57_0x21a9(){const _0x24de39=['41154tIqQwD','3521500XjGvkl','db-','dbName','map','2793087CEvlnf','2201034fZHRBd','has','set','7GoRbRa','dbId','22AxAgpx','13515970QRayfF','4bcTOvU','2054118gbuqpX','5882616snuXTg','find'];a57_0x21a9=function(){return _0x24de39;};return a57_0x21a9();}export async function getDbName(_0x4fe57e,_0x2ed4d3){const _0x20f261=a57_0x7444;try{const _0x536208=await listDatabases(_0x4fe57e);return _0x536208[_0x20f261(0x1a0)](_0x5b8b15=>_0x5b8b15[_0x20f261(0x19a)]===_0x2ed4d3)?.[_0x20f261(0x193)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5aa9c3,_0x12e422){const _0x525b47=a58_0x13b0,_0x5bc32f=_0x5aa9c3();while(!![]){try{const _0x371ccb=-parseInt(_0x525b47(0xc5))/0x1+-parseInt(_0x525b47(0xd1))/0x2*(-parseInt(_0x525b47(0xb8))/0x3)+-parseInt(_0x525b47(0xb3))/0x4+-parseInt(_0x525b47(0xd4))/0x5*(parseInt(_0x525b47(0xbb))/0x6)+-parseInt(_0x525b47(0xcf))/0x7*(-parseInt(_0x525b47(0xca))/0x8)+-parseInt(_0x525b47(0xb2))/0x9+parseInt(_0x525b47(0xc2))/0xa*(parseInt(_0x525b47(0xd0))/0xb);if(_0x371ccb===_0x12e422)break;else _0x5bc32f['push'](_0x5bc32f['shift']());}catch(_0x46d56f){_0x5bc32f['push'](_0x5bc32f['shift']());}}}(a58_0x5174,0x5f27c));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';function a58_0x13b0(_0x50d2dd,_0x5bc9e0){_0x50d2dd=_0x50d2dd-0xae;const _0x5174d2=a58_0x5174();let _0x13b0d9=_0x5174d2[_0x50d2dd];return _0x13b0d9;}import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x26d2d2){const _0x4741a6=a58_0x13b0;_client=createClient({'appCode':_0x26d2d2[_0x4741a6(0xbe)],'env':_0x26d2d2[_0x4741a6(0xaf)],'authMode':_0x26d2d2['authMode'],..._0x26d2d2['accessKey']?{'accessKey':_0x26d2d2[_0x4741a6(0xc8)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x4741a6(0xc6)]}}});}function ensureClient(){const _0x7da635=a58_0x13b0;if(!_client)throw new Error(_0x7da635(0xc7));return _client;}function normalizeAggregateParams(_0x32cbee){const _0x1f5a72=a58_0x13b0,_0x14ee83=_0x32cbee[_0x1f5a72(0xb7)];if(_0x14ee83===undefined)return _0x32cbee;if(!Array['isArray'](_0x14ee83))throw CliErrors[_0x1f5a72(0xce)](_0x1f5a72(0xb1));return{..._0x32cbee,'aggregate':_0x14ee83[_0x1f5a72(0xc0)]((_0x558b80,_0x4d6c6c)=>{const _0x158591=_0x1f5a72;if(!_0x558b80||typeof _0x558b80!==_0x158591(0xcc)||Array[_0x158591(0xd2)](_0x558b80))throw CliErrors[_0x158591(0xce)](_0x158591(0xcd)+_0x4d6c6c+_0x158591(0xcb));const _0x2316e5=_0x558b80[_0x158591(0xb9)]??_0x558b80['field'];if(typeof _0x2316e5!==_0x158591(0xd6)||_0x2316e5[_0x158591(0xbd)]()==='')throw CliErrors['validation'](_0x158591(0xcd)+_0x4d6c6c+_0x158591(0xba));const _0x465c2b={..._0x558b80,'column':_0x2316e5};return delete _0x465c2b[_0x158591(0xbf)],_0x465c2b;})};}export async function executeData(_0x46a90d,_0xa187c2,_0x421678){const _0x4f0bcf=a58_0x13b0,_0x409ac6=ensureClient(),_0x3d2915=_0x4f0bcf(0xc1)+_0x46a90d,_0x5b78a4=_0x409ac6[_0x4f0bcf(0xd7)][_0x3d2915];if(!_0x5b78a4||typeof _0x5b78a4[_0xa187c2]!==_0x4f0bcf(0xb4))throw new Error(_0x4f0bcf(0xc3)+_0xa187c2+'\x22.\x20'+_0x4f0bcf(0xbc));if(_0xa187c2===_0x4f0bcf(0xc4))return _0x5b78a4[_0x4f0bcf(0xc4)](parseBatchCreateItemsFromParams(_0x421678));const _0x1124bb=_0x421678!==undefined&&_0x421678!==null&&!Array['isArray'](_0x421678)?_0x421678:{};switch(_0xa187c2){case _0x4f0bcf(0xb5):{const _0x386834=_0x1124bb['id'];if(_0x386834===undefined||_0x386834===null)throw new Error('getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x5b78a4['getOne'](_0x386834);}case _0x4f0bcf(0xc9):{const {id:_0x54dcad,..._0x51488e}=_0x1124bb;if(_0x54dcad===undefined||_0x54dcad===null)throw new Error('update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27');return _0x5b78a4[_0x4f0bcf(0xc9)](_0x54dcad,_0x51488e);}case'delete':{const _0x2ed5fa=_0x1124bb['id'];if(_0x2ed5fa===undefined||_0x2ed5fa===null)throw new Error(_0x4f0bcf(0xb6));return _0x5b78a4[_0x4f0bcf(0xb0)](_0x2ed5fa);}case _0x4f0bcf(0xb7):return _0x5b78a4[_0x4f0bcf(0xb7)](normalizeAggregateParams(_0x1124bb));default:return _0x5b78a4[_0xa187c2](_0x1124bb);}}export async function executeSdkSql(_0x5301a3,_0x490b98){const _0x43d8eb=a58_0x13b0,_0x5f51d7=ensureClient();return _0x5f51d7[_0x43d8eb(0xae)][_0x43d8eb(0xd3)]({'sqlCode':_0x5301a3,'params':_0x490b98});}export async function executeSdkBff(_0x23b0ed,_0x1f8f2a){const _0x44c213=a58_0x13b0,_0x2eaf24=ensureClient();return _0x2eaf24[_0x44c213(0xd5)]['execute']({'scriptName':_0x23b0ed,'params':_0x1f8f2a});}function a58_0x5174(){const _0x257c33=['3695usNCQn','bff','string','models','sql','env','delete','data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.','4035006JrcpeB','996172hkyesh','function','getOne','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','aggregate','15kTDHOA','column',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.','3114JzSTqY','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','trim','appCode','field','map','dataset_','70aVaBGM','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','batchCreate','424961fzwFCe','invokeSource','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','accessKey','update','15736PTZmnK',']\x20must\x20be\x20an\x20object.','object','data\x20aggregate\x20--params.aggregate[','validation','1001ybsjiD','2304632uEBSsm','59108iCRvoI','isArray','execute'];a58_0x5174=function(){return _0x257c33;};return a58_0x5174();}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x5e8c93=a59_0x67b4;(function(_0x3ac736,_0x1562a1){const _0x3350e7=a59_0x67b4,_0x97c5d=_0x3ac736();while(!![]){try{const _0x3dc075=parseInt(_0x3350e7(0x1df))/0x1+parseInt(_0x3350e7(0x1d8))/0x2+-parseInt(_0x3350e7(0x1de))/0x3*(parseInt(_0x3350e7(0x1db))/0x4)+parseInt(_0x3350e7(0x1d6))/0x5*(-parseInt(_0x3350e7(0x1dc))/0x6)+-parseInt(_0x3350e7(0x1dd))/0x7+-parseInt(_0x3350e7(0x1e1))/0x8+parseInt(_0x3350e7(0x1e3))/0x9;if(_0x3dc075===_0x1562a1)break;else _0x97c5d['push'](_0x97c5d['shift']());}catch(_0x296ca2){_0x97c5d['push'](_0x97c5d['shift']());}}}(a59_0x2a06,0xac015));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a59_0x2a06(){const _0x48d43f=['1192844GzzYcc','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','newConfigFileName','20KYEbuc','6YFNOvj','6492745Xzkehx','337083jNTTRI','14225eWOPIF','Set\x20appcode\x20via\x20--appcode\x20or\x20','1313936MiJLOW','\x20auth\x20login`.','24771879LEJMrk','5024815htSpAe','Configure\x20accessKey\x20in\x20'];a59_0x2a06=function(){return _0x48d43f;};return a59_0x2a06();}import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};function a59_0x67b4(_0x587d8f,_0xdfd21a){_0x587d8f=_0x587d8f-0x1d6;const _0x2a06ed=a59_0x2a06();let _0x67b4a3=_0x2a06ed[_0x587d8f];return _0x67b4a3;}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a59_0x5e8c93(0x1d7)+PRODUCT_CONFIG[a59_0x5e8c93(0x1da)]+'\x20or\x20run\x20`'+CLI_BIN_NAME+a59_0x5e8c93(0x1e2),'configMissingHint':a59_0x5e8c93(0x1e0)+PRODUCT_CONFIG[a59_0x5e8c93(0x1da)]+'.','notInProjectHint':a59_0x5e8c93(0x1d9)+PRODUCT_CONFIG[a59_0x5e8c93(0x1da)]+'\x20file.'});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3b7e7f,_0x41166b){var _0x59b9ff=a60_0x4149,_0x56e0a8=_0x3b7e7f();while(!![]){try{var _0x11f12a=-parseInt(_0x59b9ff(0xb2))/0x1*(-parseInt(_0x59b9ff(0xb3))/0x2)+-parseInt(_0x59b9ff(0xb4))/0x3+-parseInt(_0x59b9ff(0xb8))/0x4*(parseInt(_0x59b9ff(0xb9))/0x5)+parseInt(_0x59b9ff(0xb1))/0x6*(parseInt(_0x59b9ff(0xb5))/0x7)+-parseInt(_0x59b9ff(0xb0))/0x8+parseInt(_0x59b9ff(0xb7))/0x9*(parseInt(_0x59b9ff(0xaf))/0xa)+-parseInt(_0x59b9ff(0xae))/0xb*(-parseInt(_0x59b9ff(0xb6))/0xc);if(_0x11f12a===_0x41166b)break;else _0x56e0a8['push'](_0x56e0a8['shift']());}catch(_0x3060fd){_0x56e0a8['push'](_0x56e0a8['shift']());}}}(a60_0x287d,0x20fe3));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';function a60_0x287d(){var _0x8b5181=['716112PXrNsX','8UFdrrW','479985pGZvsv','11zPpQtD','20QqHeUg','222200MNtNcg','6sHtmAl','1qnmbZk','110584wAuZyU','620625XBgtii','288274SXjcHy','3674076YfruQy'];a60_0x287d=function(){return _0x8b5181;};return a60_0x287d();}import{buildAllFlags as a60_0x21ba12}from'@lovrabet/cli-framework';function a60_0x4149(_0x777e55,_0x261dae){_0x777e55=_0x777e55-0xae;var _0x287d9a=a60_0x287d();var _0x4149b1=_0x287d9a[_0x777e55];return _0x4149b1;}export function buildAllFlags(_0x4db968){return a60_0x21ba12(_0x4db968,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a61_0x15f9(_0x24bcd9,_0x2af29d){_0x24bcd9=_0x24bcd9-0xfc;const _0x5e01d9=a61_0x5e01();let _0x15f9e1=_0x5e01d9[_0x24bcd9];return _0x15f9e1;}(function(_0xebf541,_0x52f246){const _0x5b7919=a61_0x15f9,_0x560748=_0xebf541();while(!![]){try{const _0x4caead=parseInt(_0x5b7919(0x100))/0x1*(parseInt(_0x5b7919(0x105))/0x2)+parseInt(_0x5b7919(0xff))/0x3*(-parseInt(_0x5b7919(0x107))/0x4)+-parseInt(_0x5b7919(0xfe))/0x5+-parseInt(_0x5b7919(0x103))/0x6+parseInt(_0x5b7919(0xfd))/0x7*(-parseInt(_0x5b7919(0xfc))/0x8)+-parseInt(_0x5b7919(0x102))/0x9*(-parseInt(_0x5b7919(0x104))/0xa)+parseInt(_0x5b7919(0x101))/0xb;if(_0x4caead===_0x52f246)break;else _0x560748['push'](_0x560748['shift']());}catch(_0xec31fd){_0x560748['push'](_0x560748['shift']());}}}(a61_0x5e01,0xbca2b));function a61_0x5e01(){const _0x69a484=['948646RNUzvz','description','88QbmiHF','72xvlRzv','491246AjFiNy','4590425ZgWwwC','143121BicCLt','1xAhaxJ','36055074slQOIB','9318933bRtIna','8493612tvEcSI','10UHPCLC'];a61_0x5e01=function(){return _0x69a484;};return a61_0x5e01();}export function dryRun(_0x19556a,_0x234a2d){const _0x10e30b={'method':_0x19556a,'url':_0x234a2d},_0x5d4a91={'body'(_0x2d7d38){return _0x10e30b['body']=_0x2d7d38,_0x5d4a91;},'description'(_0x25629d){const _0x1868a3=a61_0x15f9;return _0x10e30b[_0x1868a3(0x106)]=_0x25629d,_0x5d4a91;},'build'(){return{..._0x10e30b};}};return _0x5d4a91;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a62_0x1f43(){const _0x12b8b4=['1331750IBjmpf','4354196DBPIEW','5780007cbbzaB','60hVbIva','16eNcdqZ','parseFlags','77144xFqjRi','1092138vmgZlr','validateFlags','361752gWnRdM','6520638jPtkLn'];a62_0x1f43=function(){return _0x12b8b4;};return a62_0x1f43();}const a62_0xc87e4d=a62_0x3d1e;(function(_0x452715,_0xdfd5fc){const _0x24a86c=a62_0x3d1e,_0x17c14e=_0x452715();while(!![]){try{const _0x313e6d=parseInt(_0x24a86c(0x173))/0x1+-parseInt(_0x24a86c(0x178))/0x2+-parseInt(_0x24a86c(0x174))/0x3+parseInt(_0x24a86c(0x176))/0x4*(parseInt(_0x24a86c(0x17b))/0x5)+parseInt(_0x24a86c(0x177))/0x6+parseInt(_0x24a86c(0x179))/0x7+-parseInt(_0x24a86c(0x17c))/0x8*(parseInt(_0x24a86c(0x17a))/0x9);if(_0x313e6d===_0xdfd5fc)break;else _0x17c14e['push'](_0x17c14e['shift']());}catch(_0x1b9759){_0x17c14e['push'](_0x17c14e['shift']());}}}(a62_0x1f43,0x87f22));function a62_0x3d1e(_0xd29bbf,_0x27bf2f){_0xd29bbf=_0xd29bbf-0x172;const _0x1f4359=a62_0x1f43();let _0x3d1e67=_0x1f4359[_0xd29bbf];return _0x3d1e67;}import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a62_0xc87e4d(0x172)];export const validateFlags=helpers[a62_0xc87e4d(0x175)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x247c8c,_0x14a6fb){const _0x3d98ee=a63_0x411d,_0x5392a9=_0x247c8c();while(!![]){try{const _0x100c75=parseInt(_0x3d98ee(0x11f))/0x1+-parseInt(_0x3d98ee(0x12b))/0x2+-parseInt(_0x3d98ee(0x11b))/0x3+-parseInt(_0x3d98ee(0x122))/0x4+parseInt(_0x3d98ee(0x11c))/0x5+parseInt(_0x3d98ee(0x12a))/0x6+-parseInt(_0x3d98ee(0x125))/0x7*(parseInt(_0x3d98ee(0x11d))/0x8);if(_0x100c75===_0x14a6fb)break;else _0x5392a9['push'](_0x5392a9['shift']());}catch(_0x54d72f){_0x5392a9['push'](_0x5392a9['shift']());}}}(a63_0x1132,0xd4902));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{getDynamicServiceDefinitions,getDynamicServiceEntry,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';function createGenerators(){const _0x47114b=a63_0x411d;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[...serviceRegistry,...safeListDynamicServiceEntries()],'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x47114b(0x11e)+PRODUCT_CONFIG[_0x47114b(0x120)]+_0x47114b(0x124)});}function a63_0x1132(){const _0x314ca6=['1539241ZkpDdk','newConfigFileName','generateServiceHelp','1804536QBcYcU','map','\x20or\x20--appcode).','2053114pqCwvB','generateCommandHelp','service','get','has','6769650DgSmOy','1921548ppmIvX','generateFullHelp','3133044gNVOmc','4763500EezYyh','8iBeumN','Requires\x20appcode\x20(set\x20via\x20'];a63_0x1132=function(){return _0x314ca6;};return a63_0x1132();}function a63_0x411d(_0x1caf33,_0x1a94ad){_0x1caf33=_0x1caf33-0x11a;const _0x113280=a63_0x1132();let _0x411da9=_0x113280[_0x1caf33];return _0x411da9;}export function generateCommandHelp(_0x53cfb8){const _0x37daf7=a63_0x411d;return createGenerators()[_0x37daf7(0x126)](_0x53cfb8);}export function generateServiceHelp(_0x120638){const _0x5c5ce0=a63_0x411d;return createGenerators()[_0x5c5ce0(0x121)](_0x120638);}export function generateFullHelp(){const _0x5805ed=a63_0x411d;return createGenerators()[_0x5805ed(0x11a)]();}function getAnyServiceEntry(_0x474035){const _0x3a6ef6=getServiceEntry(_0x474035);if(_0x3a6ef6)return _0x3a6ef6;try{return getDynamicServiceEntry(_0x474035);}catch{return undefined;}}function getAnyServiceDefinitions(_0x47a081){const _0x117383=a63_0x411d,_0x2bb42f=serviceGroups[_0x117383(0x128)](_0x47a081);if(_0x2bb42f)return _0x2bb42f;try{return getDynamicServiceDefinitions(_0x47a081);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x5d8f57=a63_0x411d,_0x51ed43=new Set(serviceRegistry[_0x5d8f57(0x123)](_0x3f5f16=>_0x3f5f16[_0x5d8f57(0x127)]));try{return listDynamicServiceEntries()['filter'](_0x380720=>!_0x51ed43[_0x5d8f57(0x129)](_0x380720[_0x5d8f57(0x127)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x200006,_0x154a82){var _0xd4ac02=a64_0x39be,_0x17039e=_0x200006();while(!![]){try{var _0x56b23f=-parseInt(_0xd4ac02(0x6d))/0x1+parseInt(_0xd4ac02(0x71))/0x2+-parseInt(_0xd4ac02(0x6a))/0x3+-parseInt(_0xd4ac02(0x67))/0x4*(parseInt(_0xd4ac02(0x6b))/0x5)+-parseInt(_0xd4ac02(0x69))/0x6*(-parseInt(_0xd4ac02(0x70))/0x7)+parseInt(_0xd4ac02(0x6e))/0x8*(parseInt(_0xd4ac02(0x6f))/0x9)+parseInt(_0xd4ac02(0x68))/0xa*(-parseInt(_0xd4ac02(0x6c))/0xb);if(_0x56b23f===_0x154a82)break;else _0x17039e['push'](_0x17039e['shift']());}catch(_0x10116e){_0x17039e['push'](_0x17039e['shift']());}}}(a64_0x4b2c,0xdd54a));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';function a64_0x4b2c(){var _0x33145d=['872505BfeukY','394040xDpMJR','144KQKfyR','259wwSWiB','1524372QHDHrP','792CQWOTF','79410DvuDpP','268662dUuXnK','2285739miHlik','7795UuHPeB','495KUqscK'];a64_0x4b2c=function(){return _0x33145d;};return a64_0x4b2c();}function a64_0x39be(_0x171a8e,_0x5f020b){_0x171a8e=_0x171a8e-0x67;var _0x4b2cee=a64_0x4b2c();var _0x39beee=_0x4b2cee[_0x171a8e];return _0x39beee;}export{extractList,extractPaging}from'../framework/response.js';export{dryRun}from'../framework/dryrun.js';export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5919c1,_0x3903da){const _0x522961=a65_0x664a,_0x4544b6=_0x5919c1();while(!![]){try{const _0x45847f=-parseInt(_0x522961(0x14c))/0x1+-parseInt(_0x522961(0x148))/0x2+parseInt(_0x522961(0x14a))/0x3+-parseInt(_0x522961(0x143))/0x4+parseInt(_0x522961(0x13e))/0x5+-parseInt(_0x522961(0x14b))/0x6+-parseInt(_0x522961(0x145))/0x7*(-parseInt(_0x522961(0x144))/0x8);if(_0x45847f===_0x3903da)break;else _0x4544b6['push'](_0x4544b6['shift']());}catch(_0x55797f){_0x4544b6['push'](_0x4544b6['shift']());}}}(a65_0x1233,0xec6db));function a65_0x664a(_0x13b65e,_0x5b34e2){_0x13b65e=_0x13b65e-0x13e;const _0x123381=a65_0x1233();let _0x664a67=_0x123381[_0x13b65e];return _0x664a67;}import{createFormatOutput,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a65_0x1233(){const _0x4c4e57=['4916430IMQusY','5434464gwEoNx','1771868hIbDgJ','8253965pvZrzW','error','message','pretty','url','5708284guXRux','3666888sWTEpu','49LLKSbf','update','_notice','2850072zkpbYh','format'];a65_0x1233=function(){return _0x4c4e57;};return a65_0x1233();}import{CliErrors}from'../errors.js';const baseFormatOutput=createFormatOutput({'cliErrors':CliErrors,'jqBinaryResolverOptions':{'bundledJqPaths':resolveBundledJqPaths()}});export function formatOutput(_0x2b87a4,_0x4db17d){const _0x167df6=a65_0x664a,_0x1568a5=_0x2b87a4[_0x167df6(0x147)],{_notice:_0x2d1815,..._0x3f00a9}=_0x2b87a4;void _0x2d1815,baseFormatOutput(_0x3f00a9,_0x4db17d),_0x4db17d[_0x167df6(0x149)]===_0x167df6(0x141)&&printPrettyNotice(_0x1568a5);}function printPrettyNotice(_0x52ea6d){const _0x29a363=a65_0x664a;if(!_0x52ea6d?.[_0x29a363(0x146)])return;console[_0x29a363(0x13f)](_0x52ea6d[_0x29a363(0x146)][_0x29a363(0x140)]+'\x20('+_0x52ea6d[_0x29a363(0x146)][_0x29a363(0x142)]+')');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1dfd26,_0x397df7){const _0x14e199=a66_0x2177,_0x149bbd=_0x1dfd26();while(!![]){try{const _0x43af10=parseInt(_0x14e199(0x8b))/0x1+-parseInt(_0x14e199(0x7d))/0x2+-parseInt(_0x14e199(0x85))/0x3+parseInt(_0x14e199(0x9a))/0x4*(-parseInt(_0x14e199(0x9c))/0x5)+-parseInt(_0x14e199(0x89))/0x6+parseInt(_0x14e199(0x7e))/0x7*(-parseInt(_0x14e199(0x9b))/0x8)+parseInt(_0x14e199(0x7c))/0x9*(parseInt(_0x14e199(0x95))/0xa);if(_0x43af10===_0x397df7)break;else _0x149bbd['push'](_0x149bbd['shift']());}catch(_0xe02b65){_0x149bbd['push'](_0x149bbd['shift']());}}}(a66_0x64f5,0x4a0da));function toKebab(_0x1b1376){const _0xeaefe7=a66_0x2177;return _0x1b1376[_0xeaefe7(0x94)](/_/g,'-')[_0xeaefe7(0x94)](/-([A-Z]+)/g,(_0x5af89f,_0x5a3258)=>'-'+_0x5a3258['toLowerCase']())[_0xeaefe7(0x94)](/([a-z0-9])([A-Z])/g,(_0x106fa2,_0x5ce39f,_0x561212)=>_0x5ce39f+'-'+_0x561212)[_0xeaefe7(0x7f)]();}function buildKnownFlags(_0x3ba7a9){const _0x216776=a66_0x2177,_0x3dcf45=new Set();for(const _0x1ef428 of _0x3ba7a9){_0x3dcf45[_0x216776(0x8d)](_0x1ef428[_0x216776(0x9d)]),_0x3dcf45[_0x216776(0x8d)](toCamelCase(_0x1ef428[_0x216776(0x9d)]));}for(const _0x5e8b30 of['dry-run',_0x216776(0x93),_0x216776(0x8e),_0x216776(0x8a)]){_0x3dcf45['add'](_0x5e8b30);}for(const _0x4947c1 of[_0x216776(0x8f),_0x216776(0x7b),_0x216776(0x98),'app',_0x216776(0x81),'non-interactive','ci','global','version']){_0x3dcf45['add'](_0x4947c1);}return _0x3dcf45;}function buildFlagTypeMap(_0x1ee418){const _0x3a6bd6=a66_0x2177,_0x117d03=new Map();for(const _0x759a93 of _0x1ee418){_0x117d03[_0x3a6bd6(0x83)](_0x759a93['name'],_0x759a93[_0x3a6bd6(0x90)]),_0x117d03[_0x3a6bd6(0x83)](toCamelCase(_0x759a93['name']),_0x759a93[_0x3a6bd6(0x90)]);}return _0x117d03;}function toCamelCase(_0x50c473){const _0x4ddf86=a66_0x2177;return _0x50c473[_0x4ddf86(0x94)](/-([a-z])/g,(_0x4b368b,_0x473a97)=>_0x473a97['toUpperCase']());}function aliasHandler(_0x371d90,_0x13cd26){const _0x317d5a=a66_0x2177,_0x5027ff=[];for(const _0x43625a of Object[_0x317d5a(0x87)](_0x371d90)){if(_0x13cd26[_0x317d5a(0x99)](_0x43625a))continue;const _0x35b34a=toKebab(_0x43625a);_0x35b34a!==_0x43625a&&_0x13cd26[_0x317d5a(0x99)](_0x35b34a)&&_0x5027ff['push']({'original':_0x43625a,'corrected':_0x35b34a,'handler':_0x317d5a(0x96)});}return _0x5027ff;}function stickyHandler(_0x2b03c4,_0x21193c,_0xc8a816){const _0x496619=a66_0x2177,_0x35d60d=[];for(const [_0x5b0617,_0x4d8304]of Object[_0x496619(0x80)](_0x2b03c4)){if(_0x4d8304!==!![])continue;for(let _0x31b53c=_0x5b0617[_0x496619(0x84)]-0x1;_0x31b53c>0x0;_0x31b53c--){const _0x10b1c9=_0x5b0617[_0x496619(0x92)](0x0,_0x31b53c),_0x5b3d2f=_0x5b0617['slice'](_0x31b53c),_0x16d5de=toKebab(_0x10b1c9),_0x1d6494=toCamelCase(_0x10b1c9),_0xa74d29=_0x21193c[_0x496619(0x99)](_0x10b1c9)?_0x10b1c9:_0x21193c['has'](_0x16d5de)?_0x16d5de:_0x21193c[_0x496619(0x99)](_0x1d6494)?_0x1d6494:null;if(!_0xa74d29)continue;const _0x2ad3da=_0xc8a816[_0x496619(0x82)](_0xa74d29)??'string';let _0x2447a8;if(_0x2ad3da===_0x496619(0x86)){const _0x6efd5c=Number(_0x5b3d2f);if(isNaN(_0x6efd5c)||_0x5b3d2f==='')continue;_0x2447a8=_0x6efd5c;}else{if(_0x2ad3da==='boolean')continue;else{if(_0x5b3d2f==='')continue;_0x2447a8=_0x5b3d2f;}}_0x35d60d[_0x496619(0x91)]({'original':_0x5b0617,'corrected':_0xa74d29+'='+_0x2447a8,'handler':_0x496619(0x97)});break;}}return _0x35d60d;}function a66_0x2177(_0x454dac,_0x186857){_0x454dac=_0x454dac-0x7b;const _0x64f52d=a66_0x64f5();let _0x217714=_0x64f52d[_0x454dac];return _0x217714;}function a66_0x64f5(){const _0x1c6851=['appcode','has','257352wxjueT','8mmdDAg','40nOsoxR','name','corrected','env','27qNHaUV','603648tJLRAB','1925518sYYBwi','toLowerCase','entries','nonInteractive','get','set','length','1154034ANfwBL','number','keys','indexOf','2314320uHQCXu','format','144738GkNTFV','string','add','yes','help','type','push','slice','dryRun','replace','6735280TMzxuN','alias','sticky'];a66_0x64f5=function(){return _0x1c6851;};return a66_0x64f5();}export function correctFlags(_0x29206c,_0x4165e6){const _0x22e353=a66_0x2177,_0x1840f1=buildKnownFlags(_0x4165e6),_0x54d79c=buildFlagTypeMap(_0x4165e6),_0x30cbde=aliasHandler(_0x29206c,_0x1840f1),_0x579065=stickyHandler(_0x29206c,_0x1840f1,_0x54d79c),_0x256b2b=[..._0x30cbde,..._0x579065];if(_0x256b2b[_0x22e353(0x84)]===0x0)return{'flags':_0x29206c,'corrections':[]};const _0x1005e5={..._0x29206c},_0x2e2675=new Set();for(const _0x341d98 of _0x30cbde){_0x1005e5[_0x341d98['corrected']]=_0x29206c[_0x341d98['original']],_0x2e2675[_0x22e353(0x8d)](_0x341d98['original']);}for(const _0x1f7d04 of _0x579065){const _0x119d96=_0x1f7d04[_0x22e353(0x9e)][_0x22e353(0x88)]('='),_0x3e63da=_0x1f7d04[_0x22e353(0x9e)]['slice'](0x0,_0x119d96),_0x58d495=_0x1f7d04['corrected'][_0x22e353(0x92)](_0x119d96+0x1),_0x26242a=_0x54d79c[_0x22e353(0x82)](_0x3e63da)??_0x22e353(0x8c);_0x26242a===_0x22e353(0x86)?_0x1005e5[_0x3e63da]=Number(_0x58d495):_0x1005e5[_0x3e63da]=_0x58d495,_0x2e2675[_0x22e353(0x8d)](_0x1f7d04['original']);}for(const _0x28f5e5 of _0x2e2675){delete _0x1005e5[_0x28f5e5];}return{'flags':_0x1005e5,'corrections':_0x256b2b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5e7efe,_0x137bd0){var _0x3c5326=a67_0x9eac,_0x5bb9d1=_0x5e7efe();while(!![]){try{var _0x4bacc5=-parseInt(_0x3c5326(0x6d))/0x1+-parseInt(_0x3c5326(0x72))/0x2+parseInt(_0x3c5326(0x74))/0x3+-parseInt(_0x3c5326(0x70))/0x4*(-parseInt(_0x3c5326(0x6e))/0x5)+parseInt(_0x3c5326(0x75))/0x6+parseInt(_0x3c5326(0x6f))/0x7+-parseInt(_0x3c5326(0x71))/0x8*(parseInt(_0x3c5326(0x73))/0x9);if(_0x4bacc5===_0x137bd0)break;else _0x5bb9d1['push'](_0x5bb9d1['shift']());}catch(_0x1a21af){_0x5bb9d1['push'](_0x5bb9d1['shift']());}}}(a67_0x3933,0x820dc));function a67_0x3933(){var _0x80bc7b=['3380499HHqXGQ','248952TxaSJK','5107554OzfKvM','265242RMZsDN','22095Mkrotl','5604312jvcJtN','456gOMlOE','8FPowdU','2130144MOpkUp'];a67_0x3933=function(){return _0x80bc7b;};return a67_0x3933();}function a67_0x9eac(_0x2eeb5c,_0xbaf42d){_0x2eeb5c=_0x2eeb5c-0x6d;var _0x3933f0=a67_0x3933();var _0x9eac4e=_0x3933f0[_0x2eeb5c];return _0x9eac4e;}export{extractList,extractPaging}from'@lovrabet/cli-framework';
|