@lovrabet/lovrabet-cli 2.1.6-beta.3 → 2.1.6-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x53e719=a54_0x2162;function a54_0x2162(_0x76bef8,_0x45783b){_0x76bef8=_0x76bef8-0x18d;const _0x3cd20e=a54_0x3cd2();let _0x216287=_0x3cd20e[_0x76bef8];return _0x216287;}(function(_0x3caf10,_0x39e3c1){const _0xe80b20=a54_0x2162,_0x28fb33=_0x3caf10();while(!![]){try{const _0x345e4c=-parseInt(_0xe80b20(0x194))/0x1+-parseInt(_0xe80b20(0x195))/0x2*(-parseInt(_0xe80b20(0x18e))/0x3)+-parseInt(_0xe80b20(0x191))/0x4*(-parseInt(_0xe80b20(0x18f))/0x5)+parseInt(_0xe80b20(0x192))/0x6+-parseInt(_0xe80b20(0x18d))/0x7*(-parseInt(_0xe80b20(0x197))/0x8)+parseInt(_0xe80b20(0x190))/0x9+-parseInt(_0xe80b20(0x196))/0xa;if(_0x345e4c===_0x39e3c1)break;else _0x28fb33['push'](_0x28fb33['shift']());}catch(_0x294822){_0x28fb33['push'](_0x28fb33['shift']());}}}(a54_0x3cd2,0xcf82b));export const AUTH_MODE={'ClientAk':a54_0x53e719(0x193)};export function isAuthMode(_0x2dee75){const _0x183e4e=a54_0x53e719;return _0x2dee75===AUTH_MODE[_0x183e4e(0x198)];}function a54_0x3cd2(){const _0x37992a=['1275876zNvKZK','client-ak','725080ngTdlh','322078xcgiaB','23881550PRrInQ','8BBLkFU','ClientAk','10072811yGRxjQ','15UWvrYa','14745wiPVre','4905090iuyEvi','1304eAclJa'];a54_0x3cd2=function(){return _0x37992a;};return a54_0x3cd2();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a55_0x513a93=a55_0x1419;(function(_0x1924df,_0x16a259){const _0x55bf4d=a55_0x1419,_0x3f9cad=_0x1924df();while(!![]){try{const _0x369dd9=-parseInt(_0x55bf4d(0x1e1))/0x1*(parseInt(_0x55bf4d(0x1e7))/0x2)+-parseInt(_0x55bf4d(0x1d0))/0x3*(parseInt(_0x55bf4d(0x1c7))/0x4)+-parseInt(_0x55bf4d(0x1d3))/0x5*(-parseInt(_0x55bf4d(0x1f3))/0x6)+-parseInt(_0x55bf4d(0x1d8))/0x7+-parseInt(_0x55bf4d(0x1d2))/0x8+parseInt(_0x55bf4d(0x1db))/0x9*(-parseInt(_0x55bf4d(0x1d7))/0xa)+-parseInt(_0x55bf4d(0x1eb))/0xb*(-parseInt(_0x55bf4d(0x1ce))/0xc);if(_0x369dd9===_0x16a259)break;else _0x3f9cad['push'](_0x3f9cad['shift']());}catch(_0xb722c5){_0x3f9cad['push'](_0x3f9cad['shift']());}}}(a55_0x33af,0xf3a93));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';function a55_0x1419(_0x16b0eb,_0x3f5556){_0x16b0eb=_0x16b0eb-0x1c7;const _0x33af85=a55_0x33af();let _0x14197b=_0x33af85[_0x16b0eb];return _0x14197b;}function a55_0x33af(){const _0x362403=['verbose','<name>','121tfKKAn','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','Output\x20format','format','name','help','SQL\x20query\x20code','JSON\x20params\x20for\x20execute\x20commands','6qImNke','Verbose\x20output','1905628khHdKX','params','Show\x20help','Select\x20app\x20profile\x20by\x20name','Alias\x20for\x20--non-interactive','sqlcode','Environment','7101564LaLJKm','dry-run','9clStvG','global','13451528TuqPRa','1388105GfKdEw','boolean','<expr>','nonInteractive','970YRvNQs','8552663FrHEdJ','string','fromEntries','41355XtsaRq','Preview\x20operation\x20without\x20executing','Skip\x20confirmation\x20for\x20high-risk\x20writes','Force\x20non-interactive\x20mode\x20(CI)','yes','<code>','1cEyXaJ','env','Record\x20ID','cliDisplayName','production\x20|\x20development\x20|\x20daily','app','2022334CAmUkZ','non-interactive'];a55_0x33af=function(){return _0x362403;};return a55_0x33af();}export const CLI_BIN_NAME=PRODUCT_CONFIG['cliBinName'];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a55_0x513a93(0x1e4)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':'appcode','type':a55_0x513a93(0x1d9),'description':'Override\x20appcode','hint':a55_0x513a93(0x1e0)},{'name':a55_0x513a93(0x1e6),'meowKey':'app','type':a55_0x513a93(0x1d9),'description':a55_0x513a93(0x1ca),'hint':a55_0x513a93(0x1ea)},{'name':a55_0x513a93(0x1e2),'meowKey':a55_0x513a93(0x1e2),'type':a55_0x513a93(0x1d9),'description':a55_0x513a93(0x1cd),'hint':a55_0x513a93(0x1e5)},{'name':a55_0x513a93(0x1ee),'meowKey':a55_0x513a93(0x1ee),'type':a55_0x513a93(0x1d9),'description':a55_0x513a93(0x1ed),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':'string','description':a55_0x513a93(0x1ec),'hint':a55_0x513a93(0x1d5)},{'name':a55_0x513a93(0x1cf),'meowKey':'dryRun','type':'boolean','description':a55_0x513a93(0x1dc)},{'name':a55_0x513a93(0x1df),'meowKey':a55_0x513a93(0x1df),'type':a55_0x513a93(0x1d4),'description':a55_0x513a93(0x1dd)},{'name':a55_0x513a93(0x1e8),'meowKey':a55_0x513a93(0x1d6),'type':a55_0x513a93(0x1d4),'description':a55_0x513a93(0x1de)},{'name':a55_0x513a93(0x1d1),'meowKey':a55_0x513a93(0x1d1),'type':a55_0x513a93(0x1d4),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a55_0x513a93(0x1d4),'description':a55_0x513a93(0x1cb),'hidden':!![]},{'name':'help','meowKey':a55_0x513a93(0x1f0),'type':a55_0x513a93(0x1d4),'description':a55_0x513a93(0x1c9)},{'name':'id','meowKey':'id','type':a55_0x513a93(0x1d9),'description':a55_0x513a93(0x1e3),'hidden':!![]},{'name':'name','meowKey':a55_0x513a93(0x1ef),'type':a55_0x513a93(0x1d9),'description':'Name\x20filter','hidden':!![]},{'name':'sqlcode','meowKey':a55_0x513a93(0x1cc),'type':a55_0x513a93(0x1d9),'description':a55_0x513a93(0x1f1),'hidden':!![]},{'name':a55_0x513a93(0x1c8),'meowKey':'params','type':'string','description':a55_0x513a93(0x1f2),'hidden':!![]},{'name':a55_0x513a93(0x1e9),'meowKey':a55_0x513a93(0x1e9),'type':'boolean','description':a55_0x513a93(0x1f4),'hidden':!![]},{'name':'clear','meowKey':'clear','type':'boolean','description':'Clear\x20output','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a55_0x513a93(0x1e6),a55_0x513a93(0x1e2),a55_0x513a93(0x1ee),'jq','dry-run',a55_0x513a93(0x1df),a55_0x513a93(0x1e8),'ci']);export function buildMeowFlags(){const _0x3151f9=a55_0x513a93;return Object[_0x3151f9(0x1da)](GLOBAL_FLAGS['map'](_0x571ecf=>[_0x571ecf['meowKey'],{'type':_0x571ecf['type']}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x415480=a56_0x45fb;(function(_0x408a7f,_0xe299da){const _0x4abc27=a56_0x45fb,_0x5063c6=_0x408a7f();while(!![]){try{const _0x48c819=parseInt(_0x4abc27(0xcb))/0x1*(parseInt(_0x4abc27(0xd2))/0x2)+parseInt(_0x4abc27(0xd4))/0x3+parseInt(_0x4abc27(0xd0))/0x4+-parseInt(_0x4abc27(0xcf))/0x5*(parseInt(_0x4abc27(0xd7))/0x6)+-parseInt(_0x4abc27(0xca))/0x7+parseInt(_0x4abc27(0xd6))/0x8*(parseInt(_0x4abc27(0xcc))/0x9)+-parseInt(_0x4abc27(0xd3))/0xa;if(_0x48c819===_0xe299da)break;else _0x5063c6['push'](_0x5063c6['shift']());}catch(_0x51add6){_0x5063c6['push'](_0x5063c6['shift']());}}}(a56_0x251b,0x79ad5));function a56_0x45fb(_0x4d6d9c,_0x42344b){_0x4d6d9c=_0x4d6d9c-0xca;const _0x251b2a=a56_0x251b();let _0x45fb2f=_0x251b2a[_0x4d6d9c];return _0x45fb2f;}export const DEFAULT_APP_PROFILE_NAME=a56_0x415480(0xd8);export const DEFAULT_CONFIG_VALUES={'env':a56_0x415480(0xcd),'format':a56_0x415480(0xce),'locale':a56_0x415480(0xd5),'riskLevel':a56_0x415480(0xd1)};function a56_0x251b(){const _0x5c687b=['1lXfrbU','90igPNkh','production','compress','8675yDAQwo','3433720BWGkTE','write','1053538jiZVPR','2972470RPVhXR','946284aMDcki','en-US','10008uJTGfU','3162AYcRQt','main','22092LkPRVV'];a56_0x251b=function(){return _0x5c687b;};return a56_0x251b();}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a56_0x415480(0xce);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a57_0x2dd7(){const _0x228b40=['35vjHUNv','skillSource','10338BuKdEz','3046203dzDhvd','12RInwHf','335499MdTnwW','8wKTwxs','2160103MTKfez','1476690LKorrt','4USnuFC','8gYIzZQ','npmPackageName','117462PKAFWI','3316747onnlMz'];a57_0x2dd7=function(){return _0x228b40;};return a57_0x2dd7();}const a57_0x117e56=a57_0x3b7d;(function(_0x5bfff8,_0x1912dd){const _0xfeb41e=a57_0x3b7d,_0x743cce=_0x5bfff8();while(!![]){try{const _0x1cf829=-parseInt(_0xfeb41e(0x1af))/0x1*(-parseInt(_0xfeb41e(0x1b9))/0x2)+-parseInt(_0xfeb41e(0x1ae))/0x3*(parseInt(_0xfeb41e(0x1b2))/0x4)+-parseInt(_0xfeb41e(0x1b7))/0x5*(parseInt(_0xfeb41e(0x1b5))/0x6)+parseInt(_0xfeb41e(0x1b6))/0x7+-parseInt(_0xfeb41e(0x1b3))/0x8*(-parseInt(_0xfeb41e(0x1ac))/0x9)+-parseInt(_0xfeb41e(0x1b1))/0xa+-parseInt(_0xfeb41e(0x1b0))/0xb*(parseInt(_0xfeb41e(0x1ad))/0xc);if(_0x1cf829===_0x1912dd)break;else _0x743cce['push'](_0x743cce['shift']());}catch(_0x56669a){_0x743cce['push'](_0x743cce['shift']());}}}(a57_0x2dd7,0x3fa76));import{PRODUCT_CONFIG}from'../constant/product.js';function a57_0x3b7d(_0x5722fd,_0x2e30fb){_0x5722fd=_0x5722fd-0x1ac;const _0x2dd7eb=a57_0x2dd7();let _0x3b7da0=_0x2dd7eb[_0x5722fd];return _0x3b7da0;}export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a57_0x117e56(0x1b4)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a57_0x117e56(0x1b8)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0x32ff92=a58_0x4ba3;(function(_0x5dd31d,_0x3b1c92){const _0x3cbd37=a58_0x4ba3,_0x209e70=_0x5dd31d();while(!![]){try{const _0x153278=parseInt(_0x3cbd37(0x113))/0x1*(parseInt(_0x3cbd37(0x117))/0x2)+parseInt(_0x3cbd37(0x11d))/0x3+parseInt(_0x3cbd37(0x10c))/0x4*(parseInt(_0x3cbd37(0x10f))/0x5)+-parseInt(_0x3cbd37(0x10e))/0x6*(parseInt(_0x3cbd37(0x115))/0x7)+-parseInt(_0x3cbd37(0x11f))/0x8+-parseInt(_0x3cbd37(0x10d))/0x9*(-parseInt(_0x3cbd37(0x11a))/0xa)+parseInt(_0x3cbd37(0x120))/0xb*(-parseInt(_0x3cbd37(0x118))/0xc);if(_0x153278===_0x3b1c92)break;else _0x209e70['push'](_0x209e70['shift']());}catch(_0x2f6fb1){_0x209e70['push'](_0x209e70['shift']());}}}(a58_0x3746,0x4b0e4));function a58_0x3746(){const _0x1a2c73=['skillhub','216120njoJsN','5138958UWbqmu','userDomain','24HIJKKS','5031fQufAx','402FBckMn','308285FevWjs','runtimeDomain','runtime','nonProduction','277mlNwRt','skillHubDomain','45997TMCPFj','production','3034nFDakC','24gmIALh','user','10690jBjXnk','apiDomain','domains','964002POnBOM'];a58_0x3746=function(){return _0x1a2c73;};return a58_0x3746();}import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x3e4a15){const _0x678ef=a58_0x4ba3;customApiDomain=_0x3e4a15?.[_0x678ef(0x11b)],customUserDomain=_0x3e4a15?.[_0x678ef(0x121)],customRuntimeDomain=_0x3e4a15?.[_0x678ef(0x110)],customSkillHubDomain=_0x3e4a15?.[_0x678ef(0x114)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains']['production'][a58_0x32ff92(0x119)]:PRODUCT_CONFIG[a58_0x32ff92(0x11c)][a58_0x32ff92(0x112)][a58_0x32ff92(0x119)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x32ff92(0x11c)]['production']['api']:PRODUCT_CONFIG[a58_0x32ff92(0x11c)]['nonProduction']['api']);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x32ff92(0x11c)][a58_0x32ff92(0x116)]['runtime']:PRODUCT_CONFIG[a58_0x32ff92(0x11c)][a58_0x32ff92(0x112)][a58_0x32ff92(0x111)]);function a58_0x4ba3(_0x52e371,_0x137387){_0x52e371=_0x52e371-0x10c;const _0x37466d=a58_0x3746();let _0x4ba343=_0x37466d[_0x52e371];return _0x4ba343;}export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains']['production'][a58_0x32ff92(0x11e)]:PRODUCT_CONFIG['domains'][a58_0x32ff92(0x112)][a58_0x32ff92(0x11e)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x312665=a59_0x40cd;function a59_0x40cd(_0x7c5287,_0x2211ae){_0x7c5287=_0x7c5287-0x1ac;const _0x2ec591=a59_0x2ec5();let _0x40cdd9=_0x2ec591[_0x7c5287];return _0x40cdd9;}(function(_0x3ff748,_0x2b78cd){const _0x37e6d1=a59_0x40cd,_0x54b5c9=_0x3ff748();while(!![]){try{const _0x57d5fd=parseInt(_0x37e6d1(0x1ad))/0x1*(parseInt(_0x37e6d1(0x1b2))/0x2)+-parseInt(_0x37e6d1(0x1ba))/0x3+-parseInt(_0x37e6d1(0x1b9))/0x4*(-parseInt(_0x37e6d1(0x1b8))/0x5)+-parseInt(_0x37e6d1(0x1b4))/0x6*(parseInt(_0x37e6d1(0x1b1))/0x7)+parseInt(_0x37e6d1(0x1b7))/0x8+-parseInt(_0x37e6d1(0x1b6))/0x9*(parseInt(_0x37e6d1(0x1bd))/0xa)+parseInt(_0x37e6d1(0x1b5))/0xb*(parseInt(_0x37e6d1(0x1ac))/0xc);if(_0x57d5fd===_0x2b78cd)break;else _0x54b5c9['push'](_0x54b5c9['shift']());}catch(_0x53daca){_0x54b5c9['push'](_0x54b5c9['shift']());}}}(a59_0x2ec5,0x927ad));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a59_0x312665(0x1b3),a59_0x312665(0x1bb),a59_0x312665(0x1af)];export function normalizeEnv(_0x4ad452){const _0x525b43=a59_0x312665;return _0x4ad452===_0x525b43(0x1b0)?_0x525b43(0x1b3):_0x4ad452;}export function isProduction(_0x41c92c){return normalizeEnv(_0x41c92c)==='production';}export function isDaily(_0x117cd4){const _0x2d2ffd=a59_0x312665;return normalizeEnv(_0x117cd4)===_0x2d2ffd(0x1af);}export function isDev(_0x3c73f9){const _0x3fb64b=a59_0x312665,_0x496231=normalizeEnv(_0x3c73f9);return _0x496231===_0x3fb64b(0x1bb)||_0x496231===_0x3fb64b(0x1bc);}let env=normalizeEnv(productEnv(a59_0x312665(0x1ae))||a59_0x312665(0x1b3));export function getEnv(){return env;}export function initEnv(_0xc801c3){env=normalizeEnv(_0xc801c3);}function a59_0x2ec5(){const _0x4bf4e1=['2336324ErCSMK','896997sygDja','development','dev','450OAkcwL','12LIiykO','838763lHvLaw','ENV','daily','online','42119UoLqGR','2nBkNiu','production','354wSkGiq','2513181ExOVkQ','197037rkbKss','4702824jZeIaQ','5ykYCzZ'];a59_0x2ec5=function(){return _0x4bf4e1;};return a59_0x2ec5();}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a60_0x1221(_0x17f0b0,_0x17d120){_0x17f0b0=_0x17f0b0-0x1bc;const _0x372ef9=a60_0x372e();let _0x122174=_0x372ef9[_0x17f0b0];return _0x122174;}function a60_0x372e(){const _0x49dd3d=['4792821ahQsaq','json','6LFSOOD','2346164FHnyDw','1910416jfVvVE','9921150AuKJzQ','1826787TAEtrU','7wpxTds','pretty','120OzdZIH','135ijStCD','175734iWMBgf','compress','1518892ZBoJBM'];a60_0x372e=function(){return _0x49dd3d;};return a60_0x372e();}const a60_0x54cd37=a60_0x1221;(function(_0x1908ef,_0x509e39){const _0x26a9e3=a60_0x1221,_0x291e17=_0x1908ef();while(!![]){try{const _0x3deb96=-parseInt(_0x26a9e3(0x1c1))/0x1+-parseInt(_0x26a9e3(0x1c8))/0x2+-parseInt(_0x26a9e3(0x1bd))/0x3*(parseInt(_0x26a9e3(0x1be))/0x4)+parseInt(_0x26a9e3(0x1c5))/0x5*(parseInt(_0x26a9e3(0x1c6))/0x6)+-parseInt(_0x26a9e3(0x1c2))/0x7*(parseInt(_0x26a9e3(0x1bf))/0x8)+-parseInt(_0x26a9e3(0x1c0))/0x9+parseInt(_0x26a9e3(0x1c4))/0xa*(parseInt(_0x26a9e3(0x1c9))/0xb);if(_0x3deb96===_0x509e39)break;else _0x291e17['push'](_0x291e17['shift']());}catch(_0x493cab){_0x291e17['push'](_0x291e17['shift']());}}}(a60_0x372e,0xe0554));export const OUTPUT_FORMAT_VALUES=[a60_0x54cd37(0x1bc),a60_0x54cd37(0x1c3),a60_0x54cd37(0x1c7)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a61_0x59551e=a61_0x235a;(function(_0x43c4ab,_0x53e135){const _0x5eb500=a61_0x235a,_0x1f4825=_0x43c4ab();while(!![]){try{const _0x7d71ab=-parseInt(_0x5eb500(0x6d))/0x1*(-parseInt(_0x5eb500(0x84))/0x2)+parseInt(_0x5eb500(0x74))/0x3+parseInt(_0x5eb500(0x86))/0x4+parseInt(_0x5eb500(0x7a))/0x5*(-parseInt(_0x5eb500(0x6e))/0x6)+-parseInt(_0x5eb500(0x85))/0x7*(-parseInt(_0x5eb500(0x73))/0x8)+-parseInt(_0x5eb500(0x7b))/0x9*(parseInt(_0x5eb500(0x72))/0xa)+-parseInt(_0x5eb500(0x6f))/0xb;if(_0x7d71ab===_0x53e135)break;else _0x1f4825['push'](_0x1f4825['shift']());}catch(_0x420f81){_0x1f4825['push'](_0x1f4825['shift']());}}}(a61_0x5972,0x5dd87));export const PRODUCT_CONFIG={'cliBinName':a61_0x59551e(0x7f),'cliDisplayName':a61_0x59551e(0x7c),'npmPackageName':a61_0x59551e(0x78),'skillSource':a61_0x59551e(0x77),'npmRegistryBaseUrl':a61_0x59551e(0x6c),'envPrefix':a61_0x59551e(0x7e),'legacyEnvPrefixes':[a61_0x59551e(0x71)],'configFileNames':['.lovrabet.json','.lovrabetrc'],'newConfigFileName':a61_0x59551e(0x76),'homeDirName':a61_0x59551e(0x70),'logFileName':'.lovrabet-runtime.log','invokeSource':a61_0x59551e(0x81),'userCenterDisplayName':a61_0x59551e(0x80),'skipNpxSkillsEnvSuffix':a61_0x59551e(0x83),'domains':{'production':{'user':a61_0x59551e(0x82),'api':a61_0x59551e(0x88),'runtime':'https://runtime.lovrabet.com','skillhub':'https://skills.lovrabet.com'},'nonProduction':{'user':'https://user-daily.lovrabet.com','api':'https://daily-api.lovrabet.com','runtime':a61_0x59551e(0x79),'skillhub':'https://skills-daily.lovrabet.com'}},'accessKeyCreatePath':a61_0x59551e(0x75)};function a61_0x235a(_0x1c0f3f,_0x3e8238){_0x1c0f3f=_0x1c0f3f-0x6c;const _0x5972bb=a61_0x5972();let _0x235a71=_0x5972bb[_0x1c0f3f];return _0x235a71;}function a61_0x5972(){const _0x48bfdf=['@lovrabet/lovrabet-cli','https://daily-runtime.lovrabet.com','10xdegNY','432lWEudx','Lovrabet\x20Runtime\x20CLI','map','LOVRABET','lovrabet','Lovrabet\x20User\x20Center','cli:lovrabet-runtime','https://user.lovrabet.com','SKIP_NPX_SKILLS','2jxwGQO','7wPutzH','129344CWJkEu','envPrefix','https://api.lovrabet.com','https://registry.npmjs.org','87299csNWvX','450228mXcrCb','733348TXWcHM','.lovrabet','RABETBASE','104240MkcdpD','3561072kFzYZE','1610154KYEARW','/user/ak','.lovrabet.json','lovrabet/lovrabet-cli'];a61_0x5972=function(){return _0x48bfdf;};return a61_0x5972();}export function productEnvName(_0x2fe7d1){const _0x1a9dc5=a61_0x59551e;return PRODUCT_CONFIG[_0x1a9dc5(0x87)]+'_'+_0x2fe7d1;}export function productEnvNames(_0xe42107){const _0x1779ab=a61_0x59551e;return[productEnvName(_0xe42107),...PRODUCT_CONFIG['legacyEnvPrefixes'][_0x1779ab(0x7d)](_0xd53830=>_0xd53830+'_'+_0xe42107)];}export function productEnv(_0x5e24d0){for(const _0x4d759f of productEnvNames(_0x5e24d0)){const _0x52427f=process.env[_0x4d759f];if(_0x52427f!==undefined)return _0x52427f;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a62_0x5b3eb9=a62_0x445d;function a62_0x445d(_0x3f2765,_0x4b71c2){_0x3f2765=_0x3f2765-0x123;const _0x74e87a=a62_0x74e8();let _0x445dbf=_0x74e87a[_0x3f2765];return _0x445dbf;}function a62_0x74e8(){const _0x4fa805=['141933vrJdKQ','14124980ZXYyag','7036695SRXiTd','7YJWwhM','read','1345542MEjHth','4021310FOjWEp','high-risk-write','13785976JuyKHo','60fOWwms','12LYTmmS','88NpCMAL','33fadsNH','3372PvgENf'];a62_0x74e8=function(){return _0x4fa805;};return a62_0x74e8();}(function(_0x5a3e90,_0x4d4785){const _0x16464e=a62_0x445d,_0x48143a=_0x5a3e90();while(!![]){try{const _0x1ce056=parseInt(_0x16464e(0x12b))/0x1*(-parseInt(_0x16464e(0x12c))/0x2)+-parseInt(_0x16464e(0x12d))/0x3*(-parseInt(_0x16464e(0x12a))/0x4)+-parseInt(_0x16464e(0x125))/0x5*(-parseInt(_0x16464e(0x129))/0x6)+parseInt(_0x16464e(0x130))/0x7*(-parseInt(_0x16464e(0x127))/0x8)+-parseInt(_0x16464e(0x12f))/0x9+parseInt(_0x16464e(0x12e))/0xa+-parseInt(_0x16464e(0x124))/0xb*(parseInt(_0x16464e(0x128))/0xc);if(_0x1ce056===_0x4d4785)break;else _0x48143a['push'](_0x48143a['shift']());}catch(_0xc7ffcf){_0x48143a['push'](_0x48143a['shift']());}}}(a62_0x74e8,0xd92aa));export const RISK_LEVEL_VALUES=[a62_0x5b3eb9(0x123),'write',a62_0x5b3eb9(0x126)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a63_0x52fb0a=a63_0x3db7;(function(_0x589af5,_0x40541d){const _0x4abfd4=a63_0x3db7,_0x330b56=_0x589af5();while(!![]){try{const _0x34e7bd=parseInt(_0x4abfd4(0x18b))/0x1*(parseInt(_0x4abfd4(0x18f))/0x2)+parseInt(_0x4abfd4(0x18e))/0x3*(parseInt(_0x4abfd4(0x18c))/0x4)+parseInt(_0x4abfd4(0x189))/0x5+parseInt(_0x4abfd4(0x186))/0x6+parseInt(_0x4abfd4(0x188))/0x7+-parseInt(_0x4abfd4(0x18a))/0x8+parseInt(_0x4abfd4(0x187))/0x9*(-parseInt(_0x4abfd4(0x190))/0xa);if(_0x34e7bd===_0x40541d)break;else _0x330b56['push'](_0x330b56['shift']());}catch(_0x537ddc){_0x330b56['push'](_0x330b56['shift']());}}}(a63_0x3483,0xbd6b1));import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG['domains'][a63_0x52fb0a(0x18d)]['user']+PRODUCT_CONFIG['accessKeyCreatePath'];function a63_0x3db7(_0x544b02,_0x12b0d9){_0x544b02=_0x544b02-0x186;const _0x348304=a63_0x3483();let _0x3db768=_0x348304[_0x544b02];return _0x3db768;}function a63_0x3483(){const _0x398e1e=['18175680XctdBk','7927530vKXTGL','18zmSUvD','7466753cybhwy','3906040kZonbz','2319952cxCVWx','76203ciWQhd','64zMJYZJ','production','72900HhHTYg','30bGSdJe'];a63_0x3483=function(){return _0x398e1e;};return a63_0x3483();}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0x454d9a=a64_0x1a00;(function(_0x1b9547,_0x522677){const _0x3e67fd=a64_0x1a00,_0x8b5c04=_0x1b9547();while(!![]){try{const _0x31ef10=-parseInt(_0x3e67fd(0x10f))/0x1+parseInt(_0x3e67fd(0x104))/0x2+-parseInt(_0x3e67fd(0xe2))/0x3*(parseInt(_0x3e67fd(0xe0))/0x4)+parseInt(_0x3e67fd(0xdf))/0x5+-parseInt(_0x3e67fd(0xe7))/0x6+-parseInt(_0x3e67fd(0x106))/0x7+-parseInt(_0x3e67fd(0x114))/0x8*(-parseInt(_0x3e67fd(0xec))/0x9);if(_0x31ef10===_0x522677)break;else _0x8b5c04['push'](_0x8b5c04['shift']());}catch(_0x18e733){_0x8b5c04['push'](_0x8b5c04['shift']());}}}(a64_0x110f,0x41c97));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';function a64_0x1a00(_0x59471f,_0x5e4ade){_0x59471f=_0x59471f-0xd5;const _0x110f06=a64_0x110f();let _0x1a00bd=_0x110f06[_0x59471f];return _0x1a00bd;}import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a64_0x454d9a(0xfe)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a64_0x454d9a(0xf1)];function resolveConfigPath(_0x5e7810){for(const _0x1d942a of CONFIG_NAMES){const _0x117604=resolve(_0x5e7810,_0x1d942a);if(existsSync(_0x117604))return _0x117604;}return undefined;}export function resolveWriteConfigPath(_0x269c25){const _0x2f9c6e=a64_0x454d9a,_0x4cac2f=_0x269c25===_0x2f9c6e(0x110)?process['cwd']():homedir(),_0x5f1ed8=resolveConfigPath(_0x4cac2f);return _0x5f1ed8??resolve(_0x4cac2f,NEW_CONFIG_NAME);}export function readConfigFile(_0x26f20b){const _0x3ca76a=a64_0x454d9a;try{if(existsSync(_0x26f20b)){const _0x33b9cc=readFileSync(_0x26f20b,{'encoding':_0x3ca76a(0x108)});if(_0x33b9cc){const _0x86ce85=JSON[_0x3ca76a(0xe3)](_0x33b9cc);return migrateOnlineEnv(_0x26f20b,_0x86ce85),_0x86ce85;}}}catch{}return{};}function migrateOnlineEnv(_0x108e07,_0x4f5ba8){const _0x512894=a64_0x454d9a;let _0x4c69de=![];_0x4f5ba8[_0x512894(0xf9)]===_0x512894(0x10d)&&(_0x4f5ba8[_0x512894(0xf9)]=_0x512894(0xfd),_0x4c69de=!![]);if(_0x4f5ba8[_0x512894(0xe9)]&&typeof _0x4f5ba8[_0x512894(0xe9)]===_0x512894(0x103))for(const _0xaffc84 of Object[_0x512894(0xf7)](_0x4f5ba8[_0x512894(0xe9)])){_0xaffc84&&_0xaffc84[_0x512894(0xf9)]===_0x512894(0x10d)&&(_0xaffc84[_0x512894(0xf9)]=_0x512894(0xfd),_0x4c69de=!![]);}if(_0x4c69de)try{writeConfigFile(_0x108e07,_0x4f5ba8);}catch{}}export function writeConfigFile(_0x55e3a1,_0x48139b){const _0x7f617f=a64_0x454d9a,_0x3ecd7a=dirname(_0x55e3a1);!existsSync(_0x3ecd7a)&&mkdirSync(_0x3ecd7a,{'recursive':!![]});const _0x251946=_0x55e3a1+_0x7f617f(0x100);try{writeFileSync(_0x251946,JSON['stringify'](_0x48139b,null,0x2)+'\x0a',{'encoding':_0x7f617f(0x108),'mode':0x180});try{renameSync(_0x251946,_0x55e3a1);}catch(_0x4ae91b){if(_0x4ae91b[_0x7f617f(0xfb)]===_0x7f617f(0xf5)||_0x4ae91b[_0x7f617f(0xfb)]===_0x7f617f(0xea)||_0x4ae91b['code']==='EACCES'){writeFileSync(_0x55e3a1,JSON[_0x7f617f(0xe6)](_0x48139b,null,0x2)+'\x0a',{'encoding':_0x7f617f(0x108)});try{unlinkSync(_0x251946);}catch{}}else throw _0x4ae91b;}}catch(_0xea53b5){try{unlinkSync(_0x251946);}catch{}throw _0xea53b5;}}export function isNonInteractiveMode(_0x9bddb7){const _0xba7188=a64_0x454d9a;return!!(_0x9bddb7['nonInteractive']||_0x9bddb7['ci']||productEnvNames('CI')['some'](_0x307bac=>process.env[_0x307bac]==='true')||process.env.CI===_0xba7188(0x112)||!process[_0xba7188(0xf2)][_0xba7188(0x118)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x32b253=a64_0x454d9a;if(!process['stdin']['isTTY'])return![];try{const _0x30dfbd=process[_0x32b253(0xfc)][_0x32b253(0xdd)];return process['stdin'][_0x32b253(0x116)](!![]),process[_0x32b253(0xfc)][_0x32b253(0x116)](_0x30dfbd??![]),!![];}catch{return![];}}export async function createContext(_0x153273){const _0x401511=a64_0x454d9a,_0x205bf9=readRawConfig(),_0x3c5965=buildConfig(_0x205bf9,_0x153273);await initGlobalEnvironment(_0x3c5965);const {getUserDomain:_0x704b1d,getApiDomain:_0xa3d6c5}=await import('./constant/domain.js'),_0x368b6d={'apiDomain':_0xa3d6c5(),'userDomain':_0x704b1d()},_0x1cc4ac=await buildAuth(_0x3c5965);logger['setLogPath'](process[_0x401511(0xd5)]());const _0x4a44dc=(CLI_BIN_NAME+'\x20'+process[_0x401511(0x111)]['slice'](0x2)[_0x401511(0x117)]('\x20'))[_0x401511(0x107)]();logger[_0x401511(0xee)](_0x4a44dc);const _0x548596=isNonInteractiveMode(_0x153273);return{'config':_0x3c5965,'auth':_0x1cc4ac,'logger':logger,'env':_0x368b6d,'nonInteractive':_0x548596};}export function buildConfigFromFlags(_0x44abb3){return buildConfig(readRawConfig(),_0x44abb3);}export function getLocalAppAliases(_0x177088){const _0x444abe=a64_0x454d9a;return _0x177088['apps']&&typeof _0x177088['apps']==='object'?_0x177088[_0x444abe(0xe9)]:{};}export function resolveLocalAppAliasCode(_0x586b85,_0x291219){const _0x4215da=a64_0x454d9a;if(!_0x291219)return undefined;const _0xe61f1e=getLocalAppAliases(_0x586b85)[_0x291219],_0x2a13c7=_0xe61f1e?.[_0x4215da(0x10e)];return typeof _0x2a13c7===_0x4215da(0xe5)&&_0x2a13c7[_0x4215da(0x107)]()?_0x2a13c7['trim']():undefined;}export function readAppCodeFromConfig(){const _0x5d8544=a64_0x454d9a,_0x36cf1e=readRawConfig(),_0x2619f0=_0x36cf1e[_0x5d8544(0x10e)]??_0x36cf1e[_0x5d8544(0xed)];if(typeof _0x2619f0===_0x5d8544(0xe5)&&_0x2619f0[_0x5d8544(0x107)]())return _0x2619f0[_0x5d8544(0x107)]();const _0x3468d7=resolveLocalAppAliasCode(_0x36cf1e,typeof _0x36cf1e[_0x5d8544(0x101)]===_0x5d8544(0xe5)?_0x36cf1e['defaultApp']:undefined);if(_0x3468d7)return _0x3468d7;const _0x3ab51d=normalizeEnv(String(_0x36cf1e[_0x5d8544(0xf9)]||_0x5d8544(0xfd))),_0x2c6d45=isDaily(_0x3ab51d)?_0x5d8544(0xeb):isDev(_0x3ab51d)?_0x5d8544(0xef):_0x5d8544(0xfd),_0x21d814=resolveCachedAppCode(typeof _0x36cf1e[_0x5d8544(0x101)]===_0x5d8544(0xe5)?_0x36cf1e['defaultApp']:undefined,_0x2c6d45,typeof _0x36cf1e['accessKey']===_0x5d8544(0xe5)?_0x36cf1e[_0x5d8544(0xd6)]:undefined);if(_0x21d814)return _0x21d814;const _0x1e4fae=Object[_0x5d8544(0xf7)](getLocalAppAliases(_0x36cf1e))['find'](_0x2e461c=>_0x2e461c?.[_0x5d8544(0x10e)]);return typeof _0x1e4fae?.[_0x5d8544(0x10e)]===_0x5d8544(0xe5)&&_0x1e4fae['appcode'][_0x5d8544(0x107)]()?_0x1e4fae[_0x5d8544(0x10e)][_0x5d8544(0x107)]():undefined;}export function readScopedConfig(_0x116948){const _0x352449=a64_0x454d9a,_0x256992=_0x116948[_0x352449(0xde)]?_0x352449(0xde):_0x352449(0x110);return readConfigFile(resolveWriteConfigPath(_0x256992));}export function writeScopedConfig(_0x881767,_0x3e490e){const _0x57b3af=a64_0x454d9a,_0x4413fd=_0x3e490e[_0x57b3af(0xde)]?_0x57b3af(0xde):_0x57b3af(0x110);writeConfigFile(resolveWriteConfigPath(_0x4413fd),_0x881767);}export async function initGlobalEnvironment(_0x50035a){const _0x57e86c=a64_0x454d9a,{initEnv:_0x512e6c}=await import(_0x57e86c(0xe4));_0x512e6c(_0x50035a[_0x57e86c(0xf9)]);const {initDomains:_0x5bd891}=await import(_0x57e86c(0x10c));_0x5bd891({'apiDomain':_0x50035a['raw']['apiDomain']||_0x50035a['raw'][_0x57e86c(0xfa)]||undefined,'userDomain':_0x50035a[_0x57e86c(0x105)][_0x57e86c(0xdb)]||undefined,'runtimeDomain':_0x50035a['raw'][_0x57e86c(0xd8)]||undefined,'skillHubDomain':_0x50035a['raw'][_0x57e86c(0xf0)]||undefined});}export function getProjectConfigPath(){const _0x578d50=a64_0x454d9a;return resolveConfigPath(process[_0x578d50(0xd5)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x3a87db){const _0x2bc620=a64_0x454d9a;if(!existsSync(_0x3a87db))return{'status':'missing'};try{const _0x38e980=readFileSync(_0x3a87db,{'encoding':_0x2bc620(0x108)});if(!_0x38e980?.['trim']())return{'status':_0x2bc620(0x10a)};const _0xbcc248=JSON[_0x2bc620(0xe3)](_0x38e980);return{'status':'ok','data':_0xbcc248};}catch(_0x157e4d){return{'status':_0x2bc620(0xf8),'message':_0x157e4d instanceof Error?_0x157e4d[_0x2bc620(0x102)]:String(_0x157e4d)};}}export function loadRawConfigLayers(_0x12d8c0){const _0x3b54ef=a64_0x454d9a;let _0x3b44dc={},_0x509a97={},_0x1d03ed,_0x290fb8;try{_0x1d03ed=resolveConfigPath(homedir());if(_0x1d03ed){const _0x2a7854=readFileSync(_0x1d03ed,{'encoding':_0x3b54ef(0x108)});if(_0x2a7854)_0x3b44dc=JSON[_0x3b54ef(0xe3)](_0x2a7854);}}catch{}try{const _0x8d7599=_0x12d8c0||process[_0x3b54ef(0xd5)]();_0x290fb8=resolveConfigPath(_0x8d7599);if(_0x290fb8){const _0x159b4b=readFileSync(_0x290fb8,{'encoding':'utf8'});if(_0x159b4b)_0x509a97=JSON[_0x3b54ef(0xe3)](_0x159b4b);}}catch{}return{'globalPath':_0x1d03ed,'projectPath':_0x290fb8,'globalConfig':_0x3b44dc,'projectConfig':_0x509a97};}function mergeRawConfigLayers(_0x45042d){const _0x1bdd95=a64_0x454d9a,{globalConfig:_0x4bfb96,projectConfig:_0x518436}=_0x45042d;if(_0x518436[_0x1bdd95(0xe1)]===![]){const _0x51ca0b={..._0x518436};return delete _0x51ca0b['inherit'],_0x51ca0b;}const _0x18f044={..._0x4bfb96,..._0x518436};if(_0x1bdd95(0x101)in _0x518436)_0x18f044['defaultApp']=_0x518436[_0x1bdd95(0x101)];else _0x4bfb96[_0x1bdd95(0x101)]&&(_0x18f044[_0x1bdd95(0x101)]=_0x4bfb96['defaultApp']);return _0x18f044;}export function isInProject(){return!!getProjectConfigPath();}function a64_0x110f(){const _0x2b7904=['values','error','env','host','code','stdin','production','configFileNames','APPCODE','.tmp','defaultApp','message','object','883332dNdqQb','raw','843269MBSaTq','trim','utf8','maxRisk','empty','projectConfig','./constant/domain.js','online','appcode','97572saMEqZ','project','argv','true','PAGE_SIZE','20848MusxsT','riskLevel','setRawMode','join','isTTY','cwd','accessKey','write','runtimeDomain','locale','format','userDomain','APP','isRaw','global','1825710QpsBCE','10776ZhBLkA','inherit','84fhjIea','parse','./constant/env.js','string','stringify','1572696DIHdlw','local-alias','apps','EXDEV','daily','63sZqfJT','app','setRawCommand','development','skillHubDomain','newConfigFileName','stdout','top-level','globalConfig','EPERM','ACCESS_KEY'];a64_0x110f=function(){return _0x2b7904;};return a64_0x110f();}export function readRawConfig(_0x40b06e){return mergeRawConfigLayers(loadRawConfigLayers(_0x40b06e));}export function readRawConfigWithLayers(_0x4ce667){const _0x220a31=loadRawConfigLayers(_0x4ce667);return{'config':mergeRawConfigLayers(_0x220a31),'layers':_0x220a31};}export function resolveDefaultAppSource(_0x32bbff){const _0x163b8c=a64_0x454d9a;if('defaultApp'in _0x32bbff['projectConfig'])return _0x163b8c(0x110);if(_0x32bbff[_0x163b8c(0x10b)][_0x163b8c(0xe1)]===![])return null;if(_0x32bbff[_0x163b8c(0xf4)][_0x163b8c(0x101)])return _0x163b8c(0xde);return null;}function buildConfig(_0x41ac26,_0x29ca5b){const _0x4b6bfd=a64_0x454d9a,_0x1def28=_0x41ac26['defaultApp']||undefined,_0x23a894=_0x29ca5b[_0x4b6bfd(0xed)]||env(_0x4b6bfd(0xdc))||undefined,_0x10d52f=_0x23a894||_0x1def28||undefined,_0x1b574f=env(_0x4b6bfd(0xf6))||_0x41ac26['accessKey']||undefined,_0x259a16=_0x29ca5b['env']||env('ENV')||_0x41ac26[_0x4b6bfd(0xf9)]||DEFAULT_CONFIG_VALUES[_0x4b6bfd(0xf9)],_0x1e4d48=normalizeEnv(String(_0x259a16)),_0x351f9f=isDaily(_0x1e4d48)?'daily':isDev(_0x1e4d48)?'development':_0x4b6bfd(0xfd),_0x4e60a0=resolveLocalAppAliasCode(_0x41ac26,_0x10d52f),_0x23e686=resolveCachedAppCode(_0x10d52f,_0x351f9f,_0x1b574f),_0x31e93f=typeof _0x29ca5b[_0x4b6bfd(0x10e)]===_0x4b6bfd(0xe5)?_0x29ca5b[_0x4b6bfd(0x10e)]:undefined,_0x30775f=env(_0x4b6bfd(0xff)),_0x26057b=_0x23a894?undefined:_0x41ac26[_0x4b6bfd(0x10e)]||_0x41ac26[_0x4b6bfd(0xed)]||undefined,_0x1929b3=_0x31e93f||_0x30775f||_0x4e60a0||_0x23e686||_0x26057b||undefined,_0x2fae13=_0x31e93f?'explicit':_0x30775f?_0x4b6bfd(0xf9):_0x4e60a0?_0x4b6bfd(0xe8):_0x23e686?'cache':_0x26057b?_0x4b6bfd(0xf3):undefined,_0x21caf9=_0x41ac26[_0x4b6bfd(0xd9)]||DEFAULT_CONFIG_VALUES['locale'],_0x51b44f=undefined,_0xd041ee=_0x29ca5b[_0x4b6bfd(0xda)]||env('FORMAT')||_0x41ac26[_0x4b6bfd(0xda)],_0x52407e=normalizeLegacyOutputFormat(_0xd041ee),_0x1f9788=env(_0x4b6bfd(0x113))||_0x41ac26['pageSize'],_0xe4abf9=_0x1f9788?Number(_0x1f9788)||undefined:undefined,_0x3ae0e9=_0x41ac26[_0x4b6bfd(0x115)]||_0x41ac26[_0x4b6bfd(0x109)],_0x1f5f65=_0x3ae0e9==='read'||_0x3ae0e9===_0x4b6bfd(0xd7)||_0x3ae0e9==='high-risk-write'?_0x3ae0e9:DEFAULT_CONFIG_VALUES[_0x4b6bfd(0x115)],_0x719723=env('VERBOSE'),_0x53b5f5=_0x719723==='1'||_0x719723===_0x4b6bfd(0x112);return{'appCode':typeof _0x1929b3==='string'&&_0x1929b3[_0x4b6bfd(0x107)]()?_0x1929b3[_0x4b6bfd(0x107)]():undefined,'appCodeSource':_0x2fae13,'env':_0x351f9f,'locale':_0x21caf9,'cookie':_0x51b44f,'accessKey':_0x1b574f,'format':_0x52407e,'pageSize':_0xe4abf9,'riskLevel':_0x1f5f65,'verbose':_0x53b5f5,'defaultApp':_0x1def28,'currentApp':typeof _0x10d52f==='string'?_0x10d52f:undefined,'raw':_0x41ac26};}function env(_0x336e35){return productEnv(_0x336e35);}async function buildAuth(_0x120236){const _0x1d288f=a64_0x454d9a,_0x52f2b0='',_0x56f5f0=!!_0x120236[_0x1d288f(0xd6)];return{'cookie':_0x52f2b0,'isLoggedIn':_0x56f5f0,async 'getOrLogin'(){if(_0x56f5f0)return _0x52f2b0;throw CliErrors['authRequired']();}};}
|
|
1
|
+
const a64_0x4cf9ca=a64_0x12d8;(function(_0x435822,_0x5c9cf4){const _0x2300cd=a64_0x12d8,_0x48a990=_0x435822();while(!![]){try{const _0x24856e=-parseInt(_0x2300cd(0x1a9))/0x1+parseInt(_0x2300cd(0x19f))/0x2*(-parseInt(_0x2300cd(0x19b))/0x3)+parseInt(_0x2300cd(0x1cb))/0x4+-parseInt(_0x2300cd(0x1a4))/0x5*(-parseInt(_0x2300cd(0x1ae))/0x6)+-parseInt(_0x2300cd(0x1c1))/0x7+-parseInt(_0x2300cd(0x1b7))/0x8+parseInt(_0x2300cd(0x18c))/0x9;if(_0x24856e===_0x5c9cf4)break;else _0x48a990['push'](_0x48a990['shift']());}catch(_0x52008b){_0x48a990['push'](_0x48a990['shift']());}}}(a64_0x412d,0xb4e41));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[a64_0x4cf9ca(0x1bf)];function resolveConfigPath(_0x173f09){for(const _0x5ce59d of CONFIG_NAMES){const _0x4e613a=resolve(_0x173f09,_0x5ce59d);if(existsSync(_0x4e613a))return _0x4e613a;}return undefined;}export function resolveWriteConfigPath(_0x2e6526){const _0x37d5d3=a64_0x4cf9ca,_0x4b987d=_0x2e6526==='project'?process[_0x37d5d3(0x19d)]():homedir(),_0x3ed973=resolveConfigPath(_0x4b987d);return _0x3ed973??resolve(_0x4b987d,NEW_CONFIG_NAME);}export function readConfigFile(_0x2f8828){const _0x1f8202=a64_0x4cf9ca;try{if(existsSync(_0x2f8828)){const _0x4a9428=readFileSync(_0x2f8828,{'encoding':_0x1f8202(0x1ab)});if(_0x4a9428){const _0x155f79=JSON[_0x1f8202(0x1a7)](_0x4a9428);return migrateOnlineEnv(_0x2f8828,_0x155f79),_0x155f79;}}}catch{}return{};}function migrateOnlineEnv(_0x8c74ab,_0x95a484){const _0x388272=a64_0x4cf9ca;let _0x3ff38c=![];_0x95a484[_0x388272(0x1a2)]===_0x388272(0x1a8)&&(_0x95a484['env']=_0x388272(0x1b8),_0x3ff38c=!![]);if(_0x95a484[_0x388272(0x189)]&&typeof _0x95a484[_0x388272(0x189)]==='object')for(const _0x5e22ee of Object[_0x388272(0x18e)](_0x95a484[_0x388272(0x189)])){_0x5e22ee&&_0x5e22ee['env']===_0x388272(0x1a8)&&(_0x5e22ee['env']=_0x388272(0x1b8),_0x3ff38c=!![]);}if(_0x3ff38c)try{writeConfigFile(_0x8c74ab,_0x95a484);}catch{}}export function writeConfigFile(_0x596762,_0x336c42){const _0x388fb1=a64_0x4cf9ca,_0x7cf237=dirname(_0x596762);!existsSync(_0x7cf237)&&mkdirSync(_0x7cf237,{'recursive':!![]});const _0x27403d=_0x596762+'.tmp';try{writeFileSync(_0x27403d,JSON[_0x388fb1(0x1b4)](_0x336c42,null,0x2)+'\x0a',{'encoding':_0x388fb1(0x1ab),'mode':0x180});try{renameSync(_0x27403d,_0x596762);}catch(_0x450ee6){if(_0x450ee6[_0x388fb1(0x1b5)]==='EPERM'||_0x450ee6[_0x388fb1(0x1b5)]===_0x388fb1(0x1bc)||_0x450ee6[_0x388fb1(0x1b5)]==='EACCES'){writeFileSync(_0x596762,JSON[_0x388fb1(0x1b4)](_0x336c42,null,0x2)+'\x0a',{'encoding':_0x388fb1(0x1ab)});try{unlinkSync(_0x27403d);}catch{}}else throw _0x450ee6;}}catch(_0x27f704){try{unlinkSync(_0x27403d);}catch{}throw _0x27f704;}}export function isNonInteractiveMode(_0x16e469){const _0x2dd146=a64_0x4cf9ca;return!!(_0x16e469[_0x2dd146(0x1c2)]||_0x16e469['ci']||productEnvNames('CI')['some'](_0x31e3d9=>process.env[_0x31e3d9]===_0x2dd146(0x1a0))||process.env.CI===_0x2dd146(0x1a0)||!process[_0x2dd146(0x18f)][_0x2dd146(0x193)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0xdb2107=a64_0x4cf9ca;if(!process['stdin'][_0xdb2107(0x193)])return![];try{const _0x4eefe2=process[_0xdb2107(0x1be)][_0xdb2107(0x1ad)];return process['stdin'][_0xdb2107(0x1c3)](!![]),process[_0xdb2107(0x1be)][_0xdb2107(0x1c3)](_0x4eefe2??![]),!![];}catch{return![];}}export async function createContext(_0x593f94){const _0x5c3c79=a64_0x4cf9ca,_0xcd76be=readRawConfig(),_0x457a84=buildConfig(_0xcd76be,_0x593f94);await initGlobalEnvironment(_0x457a84);const {getUserDomain:_0x456f9e,getApiDomain:_0x28a8a3}=await import('./constant/domain.js'),_0x112377={'apiDomain':_0x28a8a3(),'userDomain':_0x456f9e()},_0x50f23e=await buildAuth(_0x457a84);logger[_0x5c3c79(0x1c9)](process[_0x5c3c79(0x19d)]());const _0xeabb6a=(CLI_BIN_NAME+'\x20'+process[_0x5c3c79(0x199)][_0x5c3c79(0x197)](0x2)[_0x5c3c79(0x1b9)]('\x20'))['trim']();logger[_0x5c3c79(0x1cd)](_0xeabb6a);const _0x19207b=isNonInteractiveMode(_0x593f94);return{'config':_0x457a84,'auth':_0x50f23e,'logger':logger,'env':_0x112377,'nonInteractive':_0x19207b};}export function buildConfigFromFlags(_0x45515a){return buildConfig(readRawConfig(),_0x45515a);}export function getLocalAppAliases(_0x31a076){const _0x3cf434=a64_0x4cf9ca;return _0x31a076['apps']&&typeof _0x31a076[_0x3cf434(0x189)]===_0x3cf434(0x1b6)?_0x31a076[_0x3cf434(0x189)]:{};}export function resolveLocalAppAliasCode(_0x9e9da4,_0x3b5a78){const _0x169672=a64_0x4cf9ca;if(!_0x3b5a78)return undefined;const _0x114256=getLocalAppAliases(_0x9e9da4)[_0x3b5a78],_0x35193b=_0x114256?.['appcode'];return typeof _0x35193b===_0x169672(0x1b0)&&_0x35193b[_0x169672(0x1a6)]()?_0x35193b[_0x169672(0x1a6)]():undefined;}function a64_0x12d8(_0x31e50b,_0x306504){_0x31e50b=_0x31e50b-0x188;const _0x412d2f=a64_0x412d();let _0x12d810=_0x412d2f[_0x31e50b];return _0x12d810;}export function readAppCodeFromConfig(){const _0x55af64=a64_0x4cf9ca,_0x3cf8a6=readRawConfig(),_0x254220=_0x3cf8a6[_0x55af64(0x18b)]??_0x3cf8a6[_0x55af64(0x1bb)];if(typeof _0x254220==='string'&&_0x254220[_0x55af64(0x1a6)]())return _0x254220[_0x55af64(0x1a6)]();const _0x1e7023=resolveLocalAppAliasCode(_0x3cf8a6,typeof _0x3cf8a6[_0x55af64(0x195)]===_0x55af64(0x1b0)?_0x3cf8a6[_0x55af64(0x195)]:undefined);if(_0x1e7023)return _0x1e7023;const _0x1ad692=normalizeEnv(String(_0x3cf8a6[_0x55af64(0x1a2)]||_0x55af64(0x1b8))),_0xe2bfcb=isDaily(_0x1ad692)?'daily':isDev(_0x1ad692)?_0x55af64(0x1cc):_0x55af64(0x1b8),_0x11c340=resolveCachedAppCode(typeof _0x3cf8a6[_0x55af64(0x195)]===_0x55af64(0x1b0)?_0x3cf8a6[_0x55af64(0x195)]:undefined,_0xe2bfcb,typeof _0x3cf8a6[_0x55af64(0x194)]===_0x55af64(0x1b0)?_0x3cf8a6[_0x55af64(0x194)]:undefined);if(_0x11c340)return _0x11c340;const _0x2c60ba=Object[_0x55af64(0x18e)](getLocalAppAliases(_0x3cf8a6))['find'](_0x12e599=>_0x12e599?.['appcode']);return typeof _0x2c60ba?.[_0x55af64(0x18b)]===_0x55af64(0x1b0)&&_0x2c60ba[_0x55af64(0x18b)][_0x55af64(0x1a6)]()?_0x2c60ba[_0x55af64(0x18b)]['trim']():undefined;}export function readScopedConfig(_0x4171b3){const _0x20acf4=a64_0x4cf9ca,_0x40efe9=_0x4171b3[_0x20acf4(0x19a)]?_0x20acf4(0x19a):_0x20acf4(0x190);return readConfigFile(resolveWriteConfigPath(_0x40efe9));}export function writeScopedConfig(_0x592123,_0x475d6b){const _0xbb69c0=a64_0x4cf9ca,_0x3078e1=_0x475d6b[_0xbb69c0(0x19a)]?_0xbb69c0(0x19a):_0xbb69c0(0x190);writeConfigFile(resolveWriteConfigPath(_0x3078e1),_0x592123);}export async function initGlobalEnvironment(_0x143584){const _0x18f665=a64_0x4cf9ca,{initEnv:_0x41cb90}=await import('./constant/env.js');_0x41cb90(_0x143584[_0x18f665(0x1a2)]);const {initDomains:_0x4b0cd3}=await import('./constant/domain.js');_0x4b0cd3({'apiDomain':_0x143584[_0x18f665(0x18a)][_0x18f665(0x1ac)]||_0x143584[_0x18f665(0x18a)][_0x18f665(0x19e)]||undefined,'userDomain':_0x143584['raw'][_0x18f665(0x196)]||undefined,'runtimeDomain':_0x143584['raw']['runtimeDomain']||undefined,'skillHubDomain':_0x143584[_0x18f665(0x18a)][_0x18f665(0x1bd)]||undefined});}export function getProjectConfigPath(){const _0x14b15d=a64_0x4cf9ca;return resolveConfigPath(process[_0x14b15d(0x19d)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x2e078c){const _0x4336ff=a64_0x4cf9ca;if(!existsSync(_0x2e078c))return{'status':_0x4336ff(0x1ba)};try{const _0x24f482=readFileSync(_0x2e078c,{'encoding':_0x4336ff(0x1ab)});if(!_0x24f482?.[_0x4336ff(0x1a6)]())return{'status':_0x4336ff(0x192)};const _0x44ae4b=JSON[_0x4336ff(0x1a7)](_0x24f482);return{'status':'ok','data':_0x44ae4b};}catch(_0x1a0650){return{'status':_0x4336ff(0x1b3),'message':_0x1a0650 instanceof Error?_0x1a0650[_0x4336ff(0x1c0)]:String(_0x1a0650)};}}export function loadRawConfigLayers(_0x222f7f){const _0xee4bc6=a64_0x4cf9ca;let _0x4b7f62={},_0x5bec75={},_0x8581a8,_0x3f7adc;try{_0x8581a8=resolveConfigPath(homedir());if(_0x8581a8){const _0x5e7348=readFileSync(_0x8581a8,{'encoding':_0xee4bc6(0x1ab)});if(_0x5e7348)_0x4b7f62=JSON[_0xee4bc6(0x1a7)](_0x5e7348);}}catch{}try{const _0x49c718=_0x222f7f||process[_0xee4bc6(0x19d)]();_0x3f7adc=resolveConfigPath(_0x49c718);if(_0x3f7adc){const _0x33ce46=readFileSync(_0x3f7adc,{'encoding':_0xee4bc6(0x1ab)});if(_0x33ce46)_0x5bec75=JSON[_0xee4bc6(0x1a7)](_0x33ce46);}}catch{}return{'globalPath':_0x8581a8,'projectPath':_0x3f7adc,'globalConfig':_0x4b7f62,'projectConfig':_0x5bec75};}function mergeRawConfigLayers(_0x290886){const _0xc4682a=a64_0x4cf9ca,{globalConfig:_0x1c7c18,projectConfig:_0x2a7fb8}=_0x290886;if(_0x2a7fb8['inherit']===![]){const _0x340c5c={..._0x2a7fb8};return delete _0x340c5c[_0xc4682a(0x1a3)],_0x340c5c;}const _0x354562={..._0x1c7c18,..._0x2a7fb8};if(_0xc4682a(0x195)in _0x2a7fb8)_0x354562[_0xc4682a(0x195)]=_0x2a7fb8[_0xc4682a(0x195)];else _0x1c7c18['defaultApp']&&(_0x354562[_0xc4682a(0x195)]=_0x1c7c18[_0xc4682a(0x195)]);return _0x354562;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x234df1){return mergeRawConfigLayers(loadRawConfigLayers(_0x234df1));}export function readRawConfigWithLayers(_0x1f83b1){const _0x45ee04=loadRawConfigLayers(_0x1f83b1);return{'config':mergeRawConfigLayers(_0x45ee04),'layers':_0x45ee04};}export function resolveDefaultAppSource(_0x11b80a){const _0x41edae=a64_0x4cf9ca;if(_0x41edae(0x195)in _0x11b80a[_0x41edae(0x1c6)])return _0x41edae(0x190);if(_0x11b80a[_0x41edae(0x1c6)]['inherit']===![])return null;if(_0x11b80a['globalConfig'][_0x41edae(0x195)])return _0x41edae(0x19a);return null;}function buildConfig(_0x331356,_0x153ab1){const _0x599a8b=a64_0x4cf9ca,_0x20815e=_0x331356['defaultApp']||undefined,_0x34bcb1=_0x153ab1[_0x599a8b(0x1bb)]||env('APP')||undefined,_0x52bfdc=_0x34bcb1||_0x20815e||undefined,_0x2a386b=env('ACCESS_KEY')||_0x331356[_0x599a8b(0x194)]||undefined,_0x1623b7=_0x153ab1[_0x599a8b(0x1a2)]||env(_0x599a8b(0x18d))||_0x331356[_0x599a8b(0x1a2)]||DEFAULT_CONFIG_VALUES[_0x599a8b(0x1a2)],_0x549eb2=normalizeEnv(String(_0x1623b7)),_0x432f4d=isDaily(_0x549eb2)?_0x599a8b(0x1b2):isDev(_0x549eb2)?_0x599a8b(0x1cc):_0x599a8b(0x1b8),_0x51bd22=resolveLocalAppAliasCode(_0x331356,_0x52bfdc),_0x5890f2=resolveCachedAppCode(_0x52bfdc,_0x432f4d,_0x2a386b),_0x264cb8=typeof _0x153ab1[_0x599a8b(0x18b)]===_0x599a8b(0x1b0)?_0x153ab1['appcode']:undefined,_0x20129f=env(_0x599a8b(0x1aa)),_0x173492=_0x34bcb1?undefined:_0x331356['appcode']||_0x331356[_0x599a8b(0x1bb)]||undefined,_0xaf6149=_0x264cb8||_0x20129f||_0x51bd22||_0x5890f2||_0x173492||undefined,_0x25d986=_0x264cb8?_0x599a8b(0x1c4):_0x20129f?_0x599a8b(0x1a2):_0x51bd22?_0x599a8b(0x1c7):_0x5890f2?_0x599a8b(0x1b1):_0x173492?'top-level':undefined,_0x5f2474=_0x331356['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x4712d5=undefined,_0x279c7b=_0x153ab1[_0x599a8b(0x198)]||env(_0x599a8b(0x191))||_0x331356[_0x599a8b(0x198)],_0x2524fc=normalizeLegacyOutputFormat(_0x279c7b),_0x3af278=env(_0x599a8b(0x1c8))||_0x331356[_0x599a8b(0x1af)],_0x3e73ed=_0x3af278?Number(_0x3af278)||undefined:undefined,_0x16f633=_0x331356[_0x599a8b(0x1a5)]||_0x331356[_0x599a8b(0x19c)],_0x4107a2=_0x16f633===_0x599a8b(0x1c5)||_0x16f633===_0x599a8b(0x188)||_0x16f633==='high-risk-write'?_0x16f633:DEFAULT_CONFIG_VALUES['riskLevel'],_0x162d99=env(_0x599a8b(0x1ca)),_0x3a2f38=_0x162d99==='1'||_0x162d99==='true';return{'appCode':typeof _0xaf6149===_0x599a8b(0x1b0)&&_0xaf6149[_0x599a8b(0x1a6)]()?_0xaf6149[_0x599a8b(0x1a6)]():undefined,'appCodeSource':_0x25d986,'env':_0x432f4d,'locale':_0x5f2474,'cookie':_0x4712d5,'accessKey':_0x2a386b,'format':_0x2524fc,'pageSize':_0x3e73ed,'riskLevel':_0x4107a2,'verbose':_0x3a2f38,'defaultApp':_0x20815e,'currentApp':typeof _0x52bfdc===_0x599a8b(0x1b0)?_0x52bfdc:undefined,'raw':_0x331356};}function env(_0x38a286){return productEnv(_0x38a286);}function a64_0x412d(){const _0x160183=['FORMAT','empty','isTTY','accessKey','defaultApp','userDomain','slice','format','argv','global','995151LXzwSP','maxRisk','cwd','host','6oklCso','true','authRequired','env','inherit','4620cADooX','riskLevel','trim','parse','online','1241987sdHQUE','APPCODE','utf8','apiDomain','isRaw','6162dIBWUP','pageSize','string','cache','daily','error','stringify','code','object','8675032MuHzyJ','production','join','missing','app','EXDEV','skillHubDomain','stdin','newConfigFileName','message','624106yytoYI','nonInteractive','setRawMode','explicit','read','projectConfig','local-alias','PAGE_SIZE','setLogPath','VERBOSE','3937080kQsRrH','development','setRawCommand','write','apps','raw','appcode','19965474niewtK','ENV','values','stdout','project'];a64_0x412d=function(){return _0x160183;};return a64_0x412d();}async function buildAuth(_0x4c77d4){const _0x7b3944=a64_0x4cf9ca,_0x56c800='',_0xdbae9=!!_0x4c77d4[_0x7b3944(0x194)];return{'cookie':_0x56c800,'isLoggedIn':_0xdbae9,async 'getOrLogin'(){const _0x1a30e7=_0x7b3944;if(_0xdbae9)return _0x56c800;throw CliErrors[_0x1a30e7(0x1a1)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x398b2b,_0x3246ff){const _0x2de888=a65_0x346c,_0x20864b=_0x398b2b();while(!![]){try{const _0x422bb9=-parseInt(_0x2de888(0x150))/0x1*(-parseInt(_0x2de888(0x19b))/0x2)+parseInt(_0x2de888(0x185))/0x3+parseInt(_0x2de888(0x169))/0x4+-parseInt(_0x2de888(0x18d))/0x5+-parseInt(_0x2de888(0x183))/0x6+-parseInt(_0x2de888(0x13b))/0x7*(parseInt(_0x2de888(0x1a8))/0x8)+parseInt(_0x2de888(0x157))/0x9;if(_0x422bb9===_0x3246ff)break;else _0x20864b['push'](_0x20864b['shift']());}catch(_0x38b21a){_0x20864b['push'](_0x20864b['shift']());}}}(a65_0x327f,0xb7e5f));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(_0x66d17e){_activeAK=_0x66d17e||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x1054a7,_0x5f2bf8={}){const _0xa5d309=a65_0x346c,{method:method=_0xa5d309(0x18b),body:_0x5b9969,headers:headers={},timeout:timeout=0x7530}=_0x5f2bf8,_0x37e6ac=_activeAK,_0x461df3=getRuntimeDomain();if(!_0x37e6ac)throw CliErrors[_0xa5d309(0x176)](_0xa5d309(0x182)+PRODUCT_CONFIG[_0xa5d309(0x14d)]+'.');const _0x1619c7=''+_0x461df3+_0x1054a7,_0x3d61ee={'X-User-AK':_0x37e6ac},_0x584ac8=new AbortController(),_0x51c148=setTimeout(()=>_0x584ac8[_0xa5d309(0x197)](),timeout);try{const _0x2bb8d9=await fetch(_0x1619c7,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0xa5d309(0x16c)],..._0x3d61ee,...headers},'body':_0x5b9969?JSON[_0xa5d309(0x19a)](_0x5b9969):undefined,'signal':_0x584ac8[_0xa5d309(0x1a2)]});let _0x4d6004;try{_0x4d6004=await _0x2bb8d9[_0xa5d309(0x13f)]();}catch{throw CliErrors[_0xa5d309(0x15e)](_0xa5d309(0x16a)+_0x2bb8d9[_0xa5d309(0x149)]+')',_0x2bb8d9[_0xa5d309(0x149)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x2bb8d9['ok']||_0x4d6004[_0xa5d309(0x151)]===![])throw CliErrors[_0xa5d309(0x15e)](_0x4d6004[_0xa5d309(0x154)]||_0x4d6004['message']||_0xa5d309(0x196)+_0x2bb8d9[_0xa5d309(0x149)],_0x4d6004[_0xa5d309(0x1ac)]?'API\x20error\x20code:\x20'+_0x4d6004[_0xa5d309(0x1ac)]:undefined);return _0x4d6004;}catch(_0x469747){if(_0x469747 instanceof Error&&_0x469747[_0xa5d309(0x192)]===_0xa5d309(0x1a7))throw CliErrors[_0xa5d309(0x15e)](_0xa5d309(0x13e)+_0x1619c7);throw _0x469747;}finally{clearTimeout(_0x51c148);}}async function apiBinaryRequest(_0x221aa6,_0x464218={}){const _0x315fe6=a65_0x346c,{method:method=_0x315fe6(0x18b),headers:headers={},timeout:timeout=0x7530}=_0x464218,_0x40972f=_activeAK,_0x411070=getRuntimeDomain();if(!_0x40972f)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x315fe6(0x14d)]+'.');const _0x548414=''+_0x411070+_0x221aa6,_0x1ab187=new AbortController(),_0x10639c=setTimeout(()=>_0x1ab187[_0x315fe6(0x197)](),timeout);try{const _0x3ff27a=await fetch(_0x548414,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x315fe6(0x16c)],'X-User-AK':_0x40972f,...headers},'signal':_0x1ab187['signal']});if(!_0x3ff27a['ok']){let _0x213db3;try{const _0x2ffc54=await _0x3ff27a[_0x315fe6(0x13f)]();_0x213db3=_0x2ffc54['errorMsg']||_0x2ffc54[_0x315fe6(0x166)]||_0x2ffc54[_0x315fe6(0x1ac)];}catch{_0x213db3=await _0x3ff27a[_0x315fe6(0x156)]()[_0x315fe6(0x138)](()=>undefined);}throw CliErrors['apiError'](_0x213db3||_0x315fe6(0x196)+_0x3ff27a[_0x315fe6(0x149)],_0x315fe6(0x17e)+_0x548414);}return Buffer[_0x315fe6(0x170)](await _0x3ff27a[_0x315fe6(0x1aa)]());}catch(_0x2c7089){if(_0x2c7089 instanceof Error&&_0x2c7089[_0x315fe6(0x192)]===_0x315fe6(0x1a7))throw CliErrors[_0x315fe6(0x15e)](_0x315fe6(0x13e)+_0x548414);throw _0x2c7089;}finally{clearTimeout(_0x10639c);}}async function toolboxRequest(_0x17c6a9,_0x1c0cd0,_0x28b637={}){const _0x25b6e5=a65_0x346c,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x28b637,_0x39e452=_activeAK;if(!_0x39e452)throw CliErrors[_0x25b6e5(0x176)](_0x25b6e5(0x182)+PRODUCT_CONFIG[_0x25b6e5(0x14d)]+'.');const _0x461005=getApiDomain()[_0x25b6e5(0x134)](/\/$/,''),_0x138b66=new URL(_0x17c6a9,_0x461005+_0x25b6e5(0x190));if(_0x1c0cd0)for(const [_0x50f358,_0x5b55f2]of Object[_0x25b6e5(0x161)](_0x1c0cd0)){_0x5b55f2!==undefined&&_0x5b55f2!==null&&_0x138b66[_0x25b6e5(0x13c)][_0x25b6e5(0x140)](_0x50f358,String(_0x5b55f2));}const _0xb5480f=new AbortController(),_0x26b756=setTimeout(()=>_0xb5480f[_0x25b6e5(0x197)](),timeout);try{const _0x3d00b2=await fetch(_0x138b66,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x25b6e5(0x16c)],'X-User-AK':_0x39e452,...headers},'signal':_0xb5480f[_0x25b6e5(0x1a2)]});let _0x502712;try{_0x502712=await _0x3d00b2[_0x25b6e5(0x13f)]();}catch{throw CliErrors[_0x25b6e5(0x15e)](_0x25b6e5(0x19e)+_0x3d00b2[_0x25b6e5(0x149)]+')',_0x3d00b2['status']>=0x190?_0x25b6e5(0x193):undefined);}if(!_0x3d00b2['ok']){const _0x36d828=_0x502712&&typeof _0x502712===_0x25b6e5(0x1a0)?_0x502712:{};throw CliErrors[_0x25b6e5(0x15e)](_0x36d828['errorMsg']||_0x36d828[_0x25b6e5(0x166)]||_0x25b6e5(0x148)+_0x3d00b2[_0x25b6e5(0x149)],_0x36d828[_0x25b6e5(0x1ac)]?'Toolbox\x20error\x20code:\x20'+_0x36d828[_0x25b6e5(0x1ac)]:undefined);}if(_0x502712&&typeof _0x502712===_0x25b6e5(0x1a0)&&'success'in _0x502712&&typeof _0x502712['success']===_0x25b6e5(0x175)){const _0x12ab65=_0x502712;if(!_0x12ab65[_0x25b6e5(0x151)])throw CliErrors[_0x25b6e5(0x15e)](_0x12ab65['errorMsg']||_0x12ab65[_0x25b6e5(0x166)]||_0x25b6e5(0x15d),_0x12ab65[_0x25b6e5(0x1ac)]?_0x25b6e5(0x164)+_0x12ab65[_0x25b6e5(0x1ac)]:undefined);return _0x12ab65[_0x25b6e5(0x16f)];}return _0x502712;}catch(_0x33f174){if(_0x33f174 instanceof Error&&_0x33f174[_0x25b6e5(0x192)]===_0x25b6e5(0x1a7))throw CliErrors[_0x25b6e5(0x15e)]('Request\x20timeout:\x20'+_0x138b66[_0x25b6e5(0x177)]());throw _0x33f174;}finally{clearTimeout(_0x26b756);}}async function skillHubJsonRequest(_0x5d0662,_0x4ad97f={}){const _0xb7d7db=a65_0x346c,{method:method=_0xb7d7db(0x18b),query:_0x52cfd6,body:_0xf0fe3a,headers:headers={},timeout:timeout=0x7530}=_0x4ad97f,_0x532aef=_activeAK;if(!_0x532aef)throw CliErrors[_0xb7d7db(0x176)](_0xb7d7db(0x182)+PRODUCT_CONFIG[_0xb7d7db(0x14d)]+'.');const _0x5b5520=getSkillHubDomain()[_0xb7d7db(0x134)](/\/$/,''),_0x4bd693=new URL(_0x5d0662,_0x5b5520+'/');if(_0x52cfd6)for(const [_0x2f4e46,_0xdb6b7c]of Object[_0xb7d7db(0x161)](_0x52cfd6)){_0xdb6b7c!==undefined&&_0xdb6b7c!==null&&_0x4bd693[_0xb7d7db(0x13c)]['set'](_0x2f4e46,String(_0xdb6b7c));}const _0x188d0d=new AbortController(),_0x53d2ed=setTimeout(()=>_0x188d0d[_0xb7d7db(0x197)](),timeout);try{const _0xffae4d=await fetch(_0x4bd693[_0xb7d7db(0x177)](),{'method':method,'headers':{'Accept':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0xb7d7db(0x16c)],'X-User-AK':_0x532aef,...headers},'body':_0xf0fe3a,'signal':_0x188d0d['signal']});let _0x3b410e;try{_0x3b410e=await _0xffae4d[_0xb7d7db(0x13f)]();}catch{throw CliErrors[_0xb7d7db(0x15e)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0xffae4d[_0xb7d7db(0x149)]+')',_0xffae4d[_0xb7d7db(0x149)]>=0x190?_0xb7d7db(0x193):undefined);}const _0x203a89=!_0xffae4d['ok']||_0x3b410e?.['success']===![]||typeof _0x3b410e?.[_0xb7d7db(0x191)]===_0xb7d7db(0x14e)&&_0x3b410e['code']>=0x190;if(_0x203a89)throw CliErrors[_0xb7d7db(0x15e)](_0x3b410e?.[_0xb7d7db(0x154)]||_0x3b410e?.['message']||_0x3b410e?.[_0xb7d7db(0x165)]||_0xb7d7db(0x1a5)+_0xffae4d[_0xb7d7db(0x149)],_0x3b410e?.[_0xb7d7db(0x1ac)]?_0xb7d7db(0x184)+_0x3b410e['errorCode']:undefined);return _0x3b410e?.[_0xb7d7db(0x16f)]??_0x3b410e;}catch(_0x17c8e5){if(_0x17c8e5 instanceof Error&&_0x17c8e5['name']===_0xb7d7db(0x1a7))throw CliErrors[_0xb7d7db(0x15e)]('Request\x20timeout:\x20'+_0x4bd693[_0xb7d7db(0x177)]());throw _0x17c8e5;}finally{clearTimeout(_0x53d2ed);}}async function skillHubBinaryRequest(_0x3350fb,_0x15053d={}){const _0x116b3f=a65_0x346c,{query:_0x41f490,headers:headers={},timeout:timeout=0x7530}=_0x15053d,_0x4ecca9=_activeAK;if(!_0x4ecca9)throw CliErrors[_0x116b3f(0x176)](_0x116b3f(0x182)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x336855=getSkillHubDomain()[_0x116b3f(0x134)](/\/$/,''),_0x39b22f=new URL(_0x3350fb,_0x336855+'/');if(_0x41f490)for(const [_0x1307c1,_0x340e7c]of Object[_0x116b3f(0x161)](_0x41f490)){_0x340e7c!==undefined&&_0x340e7c!==null&&_0x39b22f[_0x116b3f(0x13c)][_0x116b3f(0x140)](_0x1307c1,String(_0x340e7c));}const _0x214e22=new AbortController(),_0x50545b=setTimeout(()=>_0x214e22[_0x116b3f(0x197)](),timeout);try{const _0x560c49=await fetch(_0x39b22f[_0x116b3f(0x177)](),{'method':_0x116b3f(0x18b),'headers':{'Accept':_0x116b3f(0x141),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x4ecca9,...headers},'signal':_0x214e22[_0x116b3f(0x1a2)]});if(!_0x560c49['ok']){let _0x4ffba1;try{const _0x409771=await _0x560c49[_0x116b3f(0x13f)]();_0x4ffba1=_0x409771[_0x116b3f(0x154)]||_0x409771['message']||_0x409771[_0x116b3f(0x165)]||_0x409771[_0x116b3f(0x1ac)];}catch{_0x4ffba1=await _0x560c49['text']()[_0x116b3f(0x138)](()=>undefined);}throw CliErrors['apiError'](_0x4ffba1||_0x116b3f(0x1a5)+_0x560c49[_0x116b3f(0x149)],_0x116b3f(0x17e)+_0x39b22f[_0x116b3f(0x177)]());}return Buffer[_0x116b3f(0x170)](await _0x560c49[_0x116b3f(0x1aa)]());}catch(_0x21f190){if(_0x21f190 instanceof Error&&_0x21f190[_0x116b3f(0x192)]===_0x116b3f(0x1a7))throw CliErrors[_0x116b3f(0x15e)](_0x116b3f(0x13e)+_0x39b22f['toString']());throw _0x21f190;}finally{clearTimeout(_0x50545b);}}export async function getBffScriptInfo(_0x2db4d7){const _0x204ba4=a65_0x346c,_0x13a2a6=await apiRequest(_0x204ba4(0x16b)+_0x2db4d7);if(!_0x13a2a6[_0x204ba4(0x16f)])throw CliErrors[_0x204ba4(0x1a1)](_0x204ba4(0x163)+_0x2db4d7);return _0x13a2a6[_0x204ba4(0x16f)];}export async function getSqlQueryInfo(_0x382a68,_0x8d1c4a){const _0x1b4dae=a65_0x346c,_0x5e76b4=await apiRequest('/client/sql/query',{'method':_0x1b4dae(0x1ab),'body':{'appCode':_0x382a68,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x8d1c4a}}),_0x322b9b=_0x5e76b4['data'],_0x20c503=_0x322b9b&&typeof _0x322b9b===_0x1b4dae(0x1a0)&&_0x1b4dae(0x19f)in _0x322b9b?_0x322b9b[_0x1b4dae(0x19f)]?.[0x0]:_0x322b9b&&typeof _0x322b9b===_0x1b4dae(0x1a0)&&_0x1b4dae(0x14b)in _0x322b9b?_0x322b9b:undefined;if(!_0x20c503)throw CliErrors[_0x1b4dae(0x1a1)](_0x1b4dae(0x16d)+_0x8d1c4a);return _0x20c503;}function isRemoteAppItem(_0x425380){const _0x2e3e41=a65_0x346c;return!!_0x425380&&typeof _0x425380===_0x2e3e41(0x1a0)&&typeof _0x425380[_0x2e3e41(0x1a6)]===_0x2e3e41(0x143)&&typeof _0x425380[_0x2e3e41(0x1ad)]===_0x2e3e41(0x143);}function extractRemoteAppItems(_0x902a6a){const _0x458744=a65_0x346c;if(Array[_0x458744(0x178)](_0x902a6a))return _0x902a6a[_0x458744(0x13d)](isRemoteAppItem);if(!_0x902a6a||typeof _0x902a6a!==_0x458744(0x1a0))throw CliErrors[_0x458744(0x15e)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x4bdc8b=_0x902a6a;if(Array[_0x458744(0x178)](_0x4bdc8b[_0x458744(0x19f)]))return _0x4bdc8b[_0x458744(0x19f)][_0x458744(0x13d)](isRemoteAppItem);if(_0x4bdc8b[_0x458744(0x16f)]&&typeof _0x4bdc8b[_0x458744(0x16f)]===_0x458744(0x1a0)){const _0x334f3f=_0x4bdc8b[_0x458744(0x16f)];if(Array[_0x458744(0x178)](_0x334f3f[_0x458744(0x19f)]))return _0x334f3f[_0x458744(0x19f)][_0x458744(0x13d)](isRemoteAppItem);}throw CliErrors[_0x458744(0x15e)]('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x2ffba2=a65_0x346c,_0x2d4767=await apiRequest(_0x2ffba2(0x1a4));return extractRemoteAppItems(_0x2d4767[_0x2ffba2(0x16f)]);}export async function getLoginUserInfo(){const _0x1266b1=a65_0x346c,_0x1dd1d6=await apiRequest('/client/user/loginUserInfo');if(!_0x1dd1d6[_0x1266b1(0x16f)]||typeof _0x1dd1d6[_0x1266b1(0x16f)]!==_0x1266b1(0x1a0)||Array[_0x1266b1(0x178)](_0x1dd1d6['data']))throw CliErrors[_0x1266b1(0x15e)]('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x1dd1d6[_0x1266b1(0x16f)];}export async function listDatasets(_0x1d6169,_0x34ce68){const _0x6c2cd9=a65_0x346c,_0x90b487=await apiRequest(_0x6c2cd9(0x152),{'method':_0x6c2cd9(0x1ab),'body':{'appCode':_0x1d6169,..._0x34ce68?.['code']&&{'code':_0x34ce68[_0x6c2cd9(0x191)]},..._0x34ce68?.['name']&&{'name':_0x34ce68[_0x6c2cd9(0x192)]}}});return extractList(_0x90b487[_0x6c2cd9(0x16f)]);}export async function getDatasetDetail(_0x121c88){const _0x52120b=a65_0x346c,_0x30a5b1=await apiRequest(_0x52120b(0x17d)+encodeURIComponent(_0x121c88));return _0x30a5b1['data'];}export async function getDatasetSdkUsageDoc(_0x3396ec,_0x2cd6ab){const _0x32e770=a65_0x346c,_0x4020c9=await toolboxRequest('api-doc-generator',{'datasetCode':_0x3396ec,'appCode':_0x2cd6ab});return typeof _0x4020c9?.['markdown']===_0x32e770(0x143)?_0x4020c9[_0x32e770(0x17c)]:'';}export async function listRuntimeArtifacts(_0xbf7e34,_0x14b582){const _0x31a9dc=a65_0x346c,_0x122125=new URLSearchParams({'appCode':_0xbf7e34});if(_0x14b582?.[_0x31a9dc(0x15c)])_0x122125['set']('artifactType',_0x14b582['artifactType']);if(_0x14b582?.[_0x31a9dc(0x14a)])_0x122125['set']('source',_0x14b582[_0x31a9dc(0x14a)]);if(_0x14b582?.[_0x31a9dc(0x17f)]!==undefined)_0x122125[_0x31a9dc(0x140)](_0x31a9dc(0x17f),String(_0x14b582['favorite']));const _0x1ab171=await apiRequest(_0x31a9dc(0x14c)+_0x122125['toString']());return Array[_0x31a9dc(0x178)](_0x1ab171[_0x31a9dc(0x16f)])?_0x1ab171[_0x31a9dc(0x16f)]:[];}export async function getRuntimeArtifact(_0x18fe55,_0x324200){const _0x3f5962=a65_0x346c,_0x288b01=await apiRequest(_0x3f5962(0x180)+_0x18fe55+_0x3f5962(0x15f)+encodeURIComponent(_0x324200));if(!_0x288b01[_0x3f5962(0x16f)])throw CliErrors[_0x3f5962(0x1a1)](_0x3f5962(0x167)+_0x18fe55);return _0x288b01[_0x3f5962(0x16f)];}export async function createRuntimeArtifact(_0x1a27aa,_0x5a4868){const _0x479140=a65_0x346c,_0x13bcbc=await apiRequest(_0x479140(0x19d),{'method':_0x479140(0x1ab),'body':{'appCode':_0x1a27aa,..._0x5a4868}});return _0x13bcbc[_0x479140(0x16f)];}export async function updateRuntimeArtifact(_0x20e824,_0xf8a716,_0x121e41){const _0xa0abda=a65_0x346c,_0x33a65e=await apiRequest(_0xa0abda(0x180)+_0x20e824+_0xa0abda(0x189),{'method':_0xa0abda(0x1ab),'body':{'appCode':_0xf8a716,..._0x121e41}});return _0x33a65e[_0xa0abda(0x16f)];}export async function listPersonalBffs(_0x4c8566){const _0x40ab61=a65_0x346c,_0x2c799d=await apiRequest(_0x40ab61(0x181)+encodeURIComponent(_0x4c8566));return Array['isArray'](_0x2c799d[_0x40ab61(0x16f)])?_0x2c799d[_0x40ab61(0x16f)]:[];}export async function getPersonalBff(_0x22b9de,_0x2700e4){const _0xf38127=a65_0x346c,_0x521c2f=await apiRequest(_0xf38127(0x187)+_0x22b9de+_0xf38127(0x15f)+encodeURIComponent(_0x2700e4));if(!_0x521c2f[_0xf38127(0x16f)])throw CliErrors['validation']('Personal\x20BFF\x20not\x20found:\x20id='+_0x22b9de);return _0x521c2f[_0xf38127(0x16f)];}export async function createPersonalBff(_0x289ce8,_0x287c9d){const _0x30ccce=a65_0x346c,_0x49d324=await apiRequest(_0x30ccce(0x144),{'method':_0x30ccce(0x1ab),'body':{'appCode':_0x289ce8,..._0x287c9d}});return _0x49d324[_0x30ccce(0x16f)];}export async function updatePersonalBff(_0xd3e409,_0x5200df,_0x5c68a9){const _0x4bc414=a65_0x346c,_0x246c97=await apiRequest(_0x4bc414(0x187)+_0xd3e409+_0x4bc414(0x189),{'method':_0x4bc414(0x1ab),'body':{'appCode':_0x5200df,..._0x5c68a9}});return _0x246c97[_0x4bc414(0x16f)];}export async function executePersonalBff(_0x3ad50f,_0x547aee,_0x49dc3b){const _0x5694ea=a65_0x346c,_0x2e95cd=await apiRequest(_0x5694ea(0x187)+_0x3ad50f+'/execute?appCode='+encodeURIComponent(_0x547aee),{'method':_0x5694ea(0x1ab),'body':_0x49dc3b});return _0x2e95cd[_0x5694ea(0x16f)];}export async function listPersonalKnowledgeBaseItems(_0x36e295){const _0x156199=a65_0x346c,_0x3b66ee=await apiRequest(_0x156199(0x142)+encodeURIComponent(_0x36e295));return Array[_0x156199(0x178)](_0x3b66ee[_0x156199(0x16f)])?_0x3b66ee[_0x156199(0x16f)]:[];}export async function getPersonalKnowledgeBaseItem(_0x4792c2,_0x5e658e){const _0x1ab944=a65_0x346c,_0x6614a=await apiRequest(_0x1ab944(0x171)+_0x4792c2+_0x1ab944(0x15f)+encodeURIComponent(_0x5e658e));if(!_0x6614a[_0x1ab944(0x16f)])throw CliErrors[_0x1ab944(0x1a1)](_0x1ab944(0x195)+_0x4792c2);return _0x6614a[_0x1ab944(0x16f)];}export async function createPersonalKnowledgeBaseItem(_0x191f26,_0x1b908c){const _0x1c0948=a65_0x346c,_0x1018b6=await apiRequest(_0x1c0948(0x1a3),{'method':_0x1c0948(0x1ab),'body':{'appCode':_0x191f26,..._0x1b908c}});return _0x1018b6[_0x1c0948(0x16f)];}export async function updatePersonalKnowledgeBaseItem(_0x3614e2,_0x520348,_0x43309e){const _0x2fe18d=a65_0x346c,_0x125bba=await apiRequest('/client/knowledge-base/personal/'+_0x3614e2+'/update',{'method':_0x2fe18d(0x1ab),'body':{'appCode':_0x520348,..._0x43309e}});return _0x125bba[_0x2fe18d(0x16f)];}export async function searchKnowledgeBase(_0x4f595b,_0x323a10){const _0x2d146e=a65_0x346c,_0x41a857=await apiRequest(_0x2d146e(0x146),{'method':_0x2d146e(0x1ab),'body':{'appCode':_0x4f595b,'query':_0x323a10[_0x2d146e(0x194)],..._0x323a10[_0x2d146e(0x168)]!==undefined?{'topK':_0x323a10[_0x2d146e(0x168)]}:{}}});return Array[_0x2d146e(0x178)](_0x41a857['data'])?_0x41a857[_0x2d146e(0x16f)]:[];}export async function listRuntimeSkills(_0x92d7f9){const _0x410341=a65_0x346c,_0x24947e=await skillHubJsonRequest(_0x410341(0x15b)+encodeURIComponent(_0x92d7f9['appCode'])+_0x410341(0x172),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x92d7f9[_0x410341(0x1a6)],_0x24947e,_0x92d7f9[_0x410341(0x145)]??'all',_0x92d7f9[_0x410341(0x191)]);}export async function listPersonalRuntimeSkills(_0x481697){const _0x422f5a=a65_0x346c;return(await listRuntimeSkills({'appCode':_0x481697,'scope':_0x422f5a(0x18e)}))[_0x422f5a(0x18e)];}export async function listCompanyRuntimeSkills(_0x3ea7ba){const _0x18b7de=a65_0x346c;return(await listRuntimeSkills({'appCode':_0x3ea7ba,'scope':_0x18b7de(0x199)}))[_0x18b7de(0x199)];}export async function listVisibleRuntimeSkills(_0x44c636){const _0x46f1c8=a65_0x346c;return(await listRuntimeSkills({'appCode':_0x44c636,'scope':_0x46f1c8(0x1ae)}))[_0x46f1c8(0x17b)];}export async function createPersonalRuntimeSkill(_0x3ccdaa,_0x57fe0e){return publishRuntimeSkill(_0x3ccdaa,_0x57fe0e);}export async function updatePersonalRuntimeSkill(_0x357d4d,_0x35b213,_0x4ae1d6){const _0x366db8=a65_0x346c;return publishRuntimeSkill(_0x35b213,{..._0x4ae1d6,'skillCode':_0x4ae1d6[_0x366db8(0x198)]??_0x357d4d});}export async function downloadRuntimeSkillPackage(_0x26bef7,_0x376b7c,_0x4a88e5,_0x19fd3e){const _0x3ed55a=a65_0x346c;void _0x26bef7;const _0x5a1e8f=_0x19fd3e?_0x3ed55a(0x18c)+encodeURIComponent(_0x4a88e5)+'/'+encodeURIComponent(_0x376b7c)+_0x3ed55a(0x135)+encodeURIComponent(_0x19fd3e)+_0x3ed55a(0x147):_0x3ed55a(0x18c)+encodeURIComponent(_0x4a88e5)+'/'+encodeURIComponent(_0x376b7c)+_0x3ed55a(0x147);return skillHubBinaryRequest(_0x5a1e8f);}async function publishRuntimeSkill(_0x28e6d0,_0xcc73c6){const _0x583615=a65_0x346c,_0x5148ba=new FormData();_0x5148ba[_0x583615(0x140)]('file',runtimeSkillPackageFile(_0xcc73c6)),_0x5148ba[_0x583615(0x140)](_0x583615(0x162),_0x583615(0x14f));const _0x52a551=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x28e6d0)+'/publish',{'method':_0x583615(0x1ab),'body':_0x5148ba});return{'appCode':_0x52a551[_0x583615(0x18a)]??_0x28e6d0,'skillCode':_0x52a551[_0x583615(0x136)]??_0xcc73c6[_0x583615(0x198)]??'','skillName':_0xcc73c6[_0x583615(0x139)]??_0x52a551[_0x583615(0x136)]??_0xcc73c6['skillCode'],'description':_0xcc73c6[_0x583615(0x155)],'scope':skillHubVisibilityToScope(_0x52a551[_0x583615(0x162)])??'personal','version':_0x52a551[_0x583615(0x137)]??_0xcc73c6['version'],'tags':_0xcc73c6[_0x583615(0x160)],'content':_0xcc73c6['content']};}function a65_0x327f(){const _0x331afb=['entries','visibility','BFF\x20script\x20not\x20found:\x20id=','Toolbox\x20error\x20code:\x20','msg','message','Artifact\x20not\x20found:\x20id=','topK','2833496TOfBmm','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/bff/query/','invokeSource','SQL\x20query\x20not\x20found:\x20','ownerPreviewVersion','data','from','/client/knowledge-base/personal/','/skills','displayName','publishedVersion','boolean','authRequired','toString','isArray','undefined','Missing\x20Skill\x20package\x20payload.','effective','markdown','/client/dataset/get-driven-data?code=','Download\x20failed:\x20','favorite','/client/artifact/','/client/runtime-bff/personal/list?appCode=','Configure\x20accessKey\x20in\x20','939084fqNcuT','SkillHub\x20error\x20code:\x20','544989nKhlws','items','/client/runtime-bff/personal/','skill','/update','namespace','GET','/api/cli/v1/skills/','6573810BsPzyc','personal','values','/api/node-toolbox/','code','name','Check\x20your\x20credentials\x20and\x20try\x20again.','query','Knowledge-base\x20entry\x20not\x20found:\x20id=','API\x20error:\x20','abort','skillCode','company','stringify','470KMKZXM','.zip','/client/artifact/create','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','tableData','object','validation','signal','/client/knowledge-base/personal/create','/client/app/my-apps','SkillHub\x20API\x20error:\x20','appCode','AbortError','7052040ccRvQz','application/zip','arrayBuffer','POST','errorCode','appName','all','replace','/versions/','slug','version','catch','skillName','packageBase64','7viqUQB','searchParams','filter','Request\x20timeout:\x20','json','set','application/octet-stream','/client/knowledge-base/personal/list?appCode=','string','/client/runtime-bff/personal/create','scope','/client/knowledge-base/search','/download','Toolbox\x20API\x20error:\x20','status','source','sqlCode','/client/artifact/list?','newConfigFileName','number','PRIVATE','2873NbRPgw','success','/client/dataset/list','trim','errorMsg','description','text','13867524mBmRej','base64','NAMESPACE_ONLY','headlineVersion','/api/runtime/v1/namespaces/','artifactType','Toolbox\x20API\x20error','apiError','?appCode=','tags'];a65_0x327f=function(){return _0x331afb;};return a65_0x327f();}function runtimeSkillPackageFile(_0xd3d443){const _0x28957b=a65_0x346c;if(!_0xd3d443[_0x28957b(0x13a)])throw CliErrors[_0x28957b(0x1a1)](_0x28957b(0x17a));const _0x2154f4=Buffer[_0x28957b(0x170)](_0xd3d443[_0x28957b(0x13a)],_0x28957b(0x158)),_0x30108d=new Blob([_0x2154f4],{'type':_0x28957b(0x1a9)}),_0xce70c=(_0xd3d443[_0x28957b(0x198)]||_0x28957b(0x188))+_0x28957b(0x19c);if(typeof File!==_0x28957b(0x179))return new File([_0x30108d],_0xce70c,{'type':_0x28957b(0x1a9)});return _0x30108d;}function normalizeSkillHubRuntimeListResponse(_0x437f43,_0x2b23d2,_0x29e21d,_0x5b8e92){const _0x1e2779=a65_0x346c,_0x140f6b=Array['isArray'](_0x2b23d2)?_0x2b23d2:Array['isArray'](_0x2b23d2?.[_0x1e2779(0x186)])?_0x2b23d2[_0x1e2779(0x186)]:[],_0x3c2724=_0x5b8e92?.['trim'](),_0x25f526=_0x140f6b[_0x1e2779(0x13d)](_0x4e40a1=>!_0x3c2724||_0x4e40a1[_0x1e2779(0x136)]===_0x3c2724)['map'](skillHubRuntimeItemToRuntimeSkill)[_0x1e2779(0x13d)](_0x5db319=>Boolean(_0x5db319)),_0x2492b=_0x25f526[_0x1e2779(0x13d)](_0x1c8d7e=>_0x1c8d7e[_0x1e2779(0x145)]===_0x1e2779(0x18e)),_0x12e43b=_0x25f526[_0x1e2779(0x13d)](_0x2cb9cd=>_0x2cb9cd['scope']==='company');return{'appCode':_0x437f43,'personal':_0x29e21d==='company'?[]:_0x2492b,'company':_0x29e21d===_0x1e2779(0x18e)?[]:_0x12e43b,'effective':buildEffectiveRuntimeSkills(_0x2492b,_0x12e43b,_0x29e21d)};}function skillHubRuntimeItemToRuntimeSkill(_0x489a88){const _0x459b9b=a65_0x346c,_0x37fe47=_0x489a88[_0x459b9b(0x136)]?.[_0x459b9b(0x153)](),_0x2a7250=skillHubVisibilityToScope(_0x489a88[_0x459b9b(0x162)]);if(!_0x37fe47||!_0x2a7250)return undefined;return{'id':_0x489a88['id'],'appCode':_0x489a88[_0x459b9b(0x18a)],'skillCode':_0x37fe47,'skillName':_0x489a88[_0x459b9b(0x173)]??_0x37fe47,'description':_0x489a88['summary'],'scope':_0x2a7250,'version':skillHubRuntimeItemVersion(_0x489a88),'status':_0x489a88[_0x459b9b(0x149)]};}function skillHubVisibilityToScope(_0xa8e470){const _0x553b16=a65_0x346c;if(_0xa8e470===_0x553b16(0x14f))return _0x553b16(0x18e);if(_0xa8e470===_0x553b16(0x159))return _0x553b16(0x199);return undefined;}function a65_0x346c(_0x4d8588,_0x1ae43b){_0x4d8588=_0x4d8588-0x134;const _0x327f28=a65_0x327f();let _0x346cd3=_0x327f28[_0x4d8588];return _0x346cd3;}function skillHubRuntimeItemVersion(_0x17a83f){const _0x4ee8d5=a65_0x346c;return _0x17a83f[_0x4ee8d5(0x174)]?.[_0x4ee8d5(0x137)]??_0x17a83f[_0x4ee8d5(0x15a)]?.[_0x4ee8d5(0x137)]??_0x17a83f[_0x4ee8d5(0x16e)]?.[_0x4ee8d5(0x137)];}function buildEffectiveRuntimeSkills(_0x2da474,_0x3b4681,_0x52a3ea){const _0x505966=a65_0x346c;if(_0x52a3ea===_0x505966(0x18e))return _0x2da474;if(_0x52a3ea===_0x505966(0x199))return _0x3b4681;const _0xb38b73=new Map();for(const _0x10cb9a of _0x3b4681){_0xb38b73[_0x505966(0x140)](_0x10cb9a[_0x505966(0x198)],_0x10cb9a);}for(const _0x21cb9c of _0x2da474){_0xb38b73[_0x505966(0x140)](_0x21cb9c[_0x505966(0x198)],_0x21cb9c);}return Array[_0x505966(0x170)](_0xb38b73[_0x505966(0x18f)]());}function normalizeRuntimeSkillListResponse(_0x5b0a20,_0x1eee32){const _0x4ca32a=a65_0x346c;if(Array[_0x4ca32a(0x178)](_0x1eee32)){const _0x4af5ff=_0x1eee32['filter'](_0x597bd7=>_0x597bd7[_0x4ca32a(0x145)]===_0x4ca32a(0x18e)),_0x5326d2=_0x1eee32[_0x4ca32a(0x13d)](_0x433ed2=>_0x433ed2[_0x4ca32a(0x145)]==='company');return{'appCode':_0x5b0a20,'personal':_0x4af5ff,'company':_0x5326d2,'effective':[..._0x5326d2,..._0x4af5ff]};}return{'appCode':_0x1eee32?.['appCode']??_0x5b0a20,'personal':Array['isArray'](_0x1eee32?.[_0x4ca32a(0x18e)])?_0x1eee32[_0x4ca32a(0x18e)]:[],'company':Array[_0x4ca32a(0x178)](_0x1eee32?.[_0x4ca32a(0x199)])?_0x1eee32[_0x4ca32a(0x199)]:[],'effective':Array[_0x4ca32a(0x178)](_0x1eee32?.[_0x4ca32a(0x17b)])?_0x1eee32[_0x4ca32a(0x17b)]:[]};}
|
|
1
|
+
(function(_0x16e6d9,_0x24c878){const _0x34727b=a65_0x407c,_0x260193=_0x16e6d9();while(!![]){try{const _0x283ce1=-parseInt(_0x34727b(0x1ab))/0x1*(-parseInt(_0x34727b(0x18c))/0x2)+parseInt(_0x34727b(0x134))/0x3*(parseInt(_0x34727b(0x141))/0x4)+-parseInt(_0x34727b(0x14d))/0x5*(-parseInt(_0x34727b(0x156))/0x6)+parseInt(_0x34727b(0x16a))/0x7+-parseInt(_0x34727b(0x1a9))/0x8*(-parseInt(_0x34727b(0x15e))/0x9)+parseInt(_0x34727b(0x197))/0xa*(parseInt(_0x34727b(0x164))/0xb)+parseInt(_0x34727b(0x18d))/0xc*(-parseInt(_0x34727b(0x189))/0xd);if(_0x283ce1===_0x24c878)break;else _0x260193['push'](_0x260193['shift']());}catch(_0xde1621){_0x260193['push'](_0x260193['shift']());}}}(a65_0xbd30,0xa0696));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(_0x1dc61f){_activeAK=_0x1dc61f||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x48eeb3,_0x292afc={}){const _0xbece1b=a65_0x407c,{method:method=_0xbece1b(0x1ac),body:_0x236d89,headers:headers={},timeout:timeout=0x7530}=_0x292afc,_0x3c3229=_activeAK,_0x26abb3=getRuntimeDomain();if(!_0x3c3229)throw CliErrors[_0xbece1b(0x14a)](_0xbece1b(0x147)+PRODUCT_CONFIG[_0xbece1b(0x132)]+'.');const _0x1eba71=''+_0x26abb3+_0x48eeb3,_0x431f29={'X-User-AK':_0x3c3229},_0x384d83=new AbortController(),_0x5c3371=setTimeout(()=>_0x384d83[_0xbece1b(0x14f)](),timeout);try{const _0x278ed2=await fetch(_0x1eba71,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0xbece1b(0x18e)],..._0x431f29,...headers},'body':_0x236d89?JSON[_0xbece1b(0x175)](_0x236d89):undefined,'signal':_0x384d83[_0xbece1b(0x13a)]});let _0x10086a;try{_0x10086a=await _0x278ed2[_0xbece1b(0x12f)]();}catch{throw CliErrors[_0xbece1b(0x159)](_0xbece1b(0x188)+_0x278ed2[_0xbece1b(0x19b)]+')',_0x278ed2[_0xbece1b(0x19b)]>=0x190?_0xbece1b(0x142):undefined);}if(!_0x278ed2['ok']||_0x10086a[_0xbece1b(0x1a1)]===![])throw CliErrors['apiError'](_0x10086a['errorMsg']||_0x10086a[_0xbece1b(0x14b)]||_0xbece1b(0x170)+_0x278ed2[_0xbece1b(0x19b)],_0x10086a[_0xbece1b(0x171)]?_0xbece1b(0x15f)+_0x10086a[_0xbece1b(0x171)]:undefined);return _0x10086a;}catch(_0x121504){if(_0x121504 instanceof Error&&_0x121504[_0xbece1b(0x16d)]==='AbortError')throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x1eba71);throw _0x121504;}finally{clearTimeout(_0x5c3371);}}async function apiBinaryRequest(_0x43863,_0x196ec1={}){const _0x4ba398=a65_0x407c,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x196ec1,_0x20c3ff=_activeAK,_0x5f24bc=getRuntimeDomain();if(!_0x20c3ff)throw CliErrors[_0x4ba398(0x14a)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x4ba398(0x132)]+'.');const _0x41c6ed=''+_0x5f24bc+_0x43863,_0x4cfa73=new AbortController(),_0x37214b=setTimeout(()=>_0x4cfa73[_0x4ba398(0x14f)](),timeout);try{const _0x54d39d=await fetch(_0x41c6ed,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x20c3ff,...headers},'signal':_0x4cfa73[_0x4ba398(0x13a)]});if(!_0x54d39d['ok']){let _0x47a68e;try{const _0x12e150=await _0x54d39d[_0x4ba398(0x12f)]();_0x47a68e=_0x12e150['errorMsg']||_0x12e150[_0x4ba398(0x14b)]||_0x12e150[_0x4ba398(0x171)];}catch{_0x47a68e=await _0x54d39d[_0x4ba398(0x137)]()[_0x4ba398(0x158)](()=>undefined);}throw CliErrors[_0x4ba398(0x159)](_0x47a68e||_0x4ba398(0x170)+_0x54d39d[_0x4ba398(0x19b)],'Download\x20failed:\x20'+_0x41c6ed);}return Buffer[_0x4ba398(0x18b)](await _0x54d39d[_0x4ba398(0x19a)]());}catch(_0x97b50){if(_0x97b50 instanceof Error&&_0x97b50['name']===_0x4ba398(0x1a2))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x41c6ed);throw _0x97b50;}finally{clearTimeout(_0x37214b);}}async function toolboxRequest(_0x778853,_0x4bf895,_0x1be306={}){const _0x1fc81d=a65_0x407c,{method:method=_0x1fc81d(0x1ac),headers:headers={},timeout:timeout=0x7530}=_0x1be306,_0x494c80=_activeAK;if(!_0x494c80)throw CliErrors[_0x1fc81d(0x14a)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x1fc81d(0x132)]+'.');const _0x223d7a=getApiDomain()['replace'](/\/$/,''),_0x4c1849=new URL(_0x778853,_0x223d7a+'/api/node-toolbox/');if(_0x4bf895)for(const [_0x5716cd,_0x30be78]of Object['entries'](_0x4bf895)){_0x30be78!==undefined&&_0x30be78!==null&&_0x4c1849[_0x1fc81d(0x1a7)]['set'](_0x5716cd,String(_0x30be78));}const _0x3b2af4=new AbortController(),_0x4a54ac=setTimeout(()=>_0x3b2af4[_0x1fc81d(0x14f)](),timeout);try{const _0x26dd82=await fetch(_0x4c1849,{'method':method,'headers':{'Content-Type':_0x1fc81d(0x148),'X-Invoke-Source':PRODUCT_CONFIG[_0x1fc81d(0x18e)],'X-User-AK':_0x494c80,...headers},'signal':_0x3b2af4[_0x1fc81d(0x13a)]});let _0x28519d;try{_0x28519d=await _0x26dd82['json']();}catch{throw CliErrors['apiError'](_0x1fc81d(0x138)+_0x26dd82[_0x1fc81d(0x19b)]+')',_0x26dd82[_0x1fc81d(0x19b)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x26dd82['ok']){const _0x45de95=_0x28519d&&typeof _0x28519d===_0x1fc81d(0x135)?_0x28519d:{};throw CliErrors['apiError'](_0x45de95[_0x1fc81d(0x160)]||_0x45de95['message']||'Toolbox\x20API\x20error:\x20'+_0x26dd82[_0x1fc81d(0x19b)],_0x45de95[_0x1fc81d(0x171)]?_0x1fc81d(0x180)+_0x45de95[_0x1fc81d(0x171)]:undefined);}if(_0x28519d&&typeof _0x28519d===_0x1fc81d(0x135)&&_0x1fc81d(0x1a1)in _0x28519d&&typeof _0x28519d[_0x1fc81d(0x1a1)]===_0x1fc81d(0x169)){const _0x2209ba=_0x28519d;if(!_0x2209ba[_0x1fc81d(0x1a1)])throw CliErrors[_0x1fc81d(0x159)](_0x2209ba[_0x1fc81d(0x160)]||_0x2209ba[_0x1fc81d(0x14b)]||'Toolbox\x20API\x20error',_0x2209ba[_0x1fc81d(0x171)]?'Toolbox\x20error\x20code:\x20'+_0x2209ba[_0x1fc81d(0x171)]:undefined);return _0x2209ba['data'];}return _0x28519d;}catch(_0x8ac332){if(_0x8ac332 instanceof Error&&_0x8ac332[_0x1fc81d(0x16d)]===_0x1fc81d(0x1a2))throw CliErrors[_0x1fc81d(0x159)]('Request\x20timeout:\x20'+_0x4c1849[_0x1fc81d(0x198)]());throw _0x8ac332;}finally{clearTimeout(_0x4a54ac);}}async function skillHubJsonRequest(_0x210850,_0xf8ec62={}){const _0x1bba10=a65_0x407c,{method:method=_0x1bba10(0x1ac),query:_0x5479de,body:_0x7a3f0d,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0xf8ec62,_0x3453b0=_activeAK;if(!_0x3453b0)throw CliErrors['authRequired'](_0x1bba10(0x147)+PRODUCT_CONFIG[_0x1bba10(0x132)]+'.');const _0x43e08e=getSkillHubDomain()[_0x1bba10(0x149)](/\/$/,''),_0x49182b=new URL(_0x210850,_0x43e08e+'/');if(_0x5479de)for(const [_0x2052d3,_0x470baf]of Object[_0x1bba10(0x157)](_0x5479de)){_0x470baf!==undefined&&_0x470baf!==null&&_0x49182b[_0x1bba10(0x1a7)]['set'](_0x2052d3,String(_0x470baf));}const _0x5674ee=new AbortController(),_0x32356c=setTimeout(()=>_0x5674ee['abort'](),timeout);try{const _0x3408bd=await fetch(_0x49182b[_0x1bba10(0x198)](),{'method':method,'headers':{'Accept':_0x1bba10(0x148),'X-Invoke-Source':PRODUCT_CONFIG[_0x1bba10(0x18e)],'X-User-AK':_0x3453b0,...headers},'body':_0x7a3f0d,'signal':_0x5674ee[_0x1bba10(0x13a)]});let _0x485407;try{_0x485407=await _0x3408bd[_0x1bba10(0x12f)]();}catch{if(allowNotFound&&_0x3408bd['status']===0x194)return undefined;throw CliErrors[_0x1bba10(0x159)](_0x1bba10(0x165)+_0x3408bd[_0x1bba10(0x19b)]+')',_0x3408bd['status']>=0x190?_0x1bba10(0x142):undefined);}if(allowNotFound&&(_0x3408bd[_0x1bba10(0x19b)]===0x194||_0x485407?.[_0x1bba10(0x162)]===0x194))return undefined;const _0x43d665=!_0x3408bd['ok']||_0x485407?.[_0x1bba10(0x1a1)]===![]||typeof _0x485407?.[_0x1bba10(0x162)]===_0x1bba10(0x1a0)&&_0x485407[_0x1bba10(0x162)]>=0x190;if(_0x43d665)throw CliErrors['apiError'](_0x485407?.[_0x1bba10(0x160)]||_0x485407?.[_0x1bba10(0x14b)]||_0x485407?.['msg']||'SkillHub\x20API\x20error:\x20'+_0x3408bd[_0x1bba10(0x19b)],_0x485407?.['errorCode']?_0x1bba10(0x179)+_0x485407['errorCode']:undefined);return _0x485407?.[_0x1bba10(0x17b)]??_0x485407;}catch(_0x24f230){if(_0x24f230 instanceof Error&&_0x24f230[_0x1bba10(0x16d)]===_0x1bba10(0x1a2))throw CliErrors[_0x1bba10(0x159)](_0x1bba10(0x16b)+_0x49182b[_0x1bba10(0x198)]());throw _0x24f230;}finally{clearTimeout(_0x32356c);}}async function skillHubBinaryRequest(_0x5233a8,_0x1be032={}){const _0x505ccf=a65_0x407c,{query:_0x33b343,headers:headers={},timeout:timeout=0x7530}=_0x1be032,_0x3865e3=_activeAK;if(!_0x3865e3)throw CliErrors[_0x505ccf(0x14a)](_0x505ccf(0x147)+PRODUCT_CONFIG[_0x505ccf(0x132)]+'.');const _0x4c3033=getSkillHubDomain()['replace'](/\/$/,''),_0x131aaa=new URL(_0x5233a8,_0x4c3033+'/');if(_0x33b343)for(const [_0x1ba68e,_0x267692]of Object['entries'](_0x33b343)){_0x267692!==undefined&&_0x267692!==null&&_0x131aaa[_0x505ccf(0x1a7)][_0x505ccf(0x177)](_0x1ba68e,String(_0x267692));}const _0xcd1fb4=new AbortController(),_0x3f2744=setTimeout(()=>_0xcd1fb4[_0x505ccf(0x14f)](),timeout);try{const _0x32b1d7=await fetch(_0x131aaa[_0x505ccf(0x198)](),{'method':_0x505ccf(0x1ac),'headers':{'Accept':_0x505ccf(0x1a4),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x3865e3,...headers},'signal':_0xcd1fb4['signal']});if(!_0x32b1d7['ok']){let _0x2bc44a;try{const _0x5959d6=await _0x32b1d7[_0x505ccf(0x12f)]();_0x2bc44a=_0x5959d6[_0x505ccf(0x160)]||_0x5959d6[_0x505ccf(0x14b)]||_0x5959d6[_0x505ccf(0x131)]||_0x5959d6[_0x505ccf(0x171)];}catch{_0x2bc44a=await _0x32b1d7[_0x505ccf(0x137)]()[_0x505ccf(0x158)](()=>undefined);}throw CliErrors[_0x505ccf(0x159)](_0x2bc44a||'SkillHub\x20API\x20error:\x20'+_0x32b1d7[_0x505ccf(0x19b)],_0x505ccf(0x17c)+_0x131aaa[_0x505ccf(0x198)]());}return Buffer['from'](await _0x32b1d7['arrayBuffer']());}catch(_0x3ada10){if(_0x3ada10 instanceof Error&&_0x3ada10[_0x505ccf(0x16d)]===_0x505ccf(0x1a2))throw CliErrors['apiError'](_0x505ccf(0x16b)+_0x131aaa[_0x505ccf(0x198)]());throw _0x3ada10;}finally{clearTimeout(_0x3f2744);}}export async function getBffScriptInfo(_0x9cbed7){const _0x3f13e7=a65_0x407c,_0x17ca13=await apiRequest(_0x3f13e7(0x186)+_0x9cbed7);if(!_0x17ca13[_0x3f13e7(0x17b)])throw CliErrors[_0x3f13e7(0x13c)](_0x3f13e7(0x13b)+_0x9cbed7);return _0x17ca13[_0x3f13e7(0x17b)];}export async function getSqlQueryInfo(_0x59bcb4,_0x17dfb7){const _0x54dbf6=a65_0x407c,_0x1bf906=await apiRequest('/client/sql/query',{'method':_0x54dbf6(0x163),'body':{'appCode':_0x59bcb4,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x17dfb7}}),_0x2238d4=_0x1bf906[_0x54dbf6(0x17b)],_0x4c1d29=_0x2238d4&&typeof _0x2238d4==='object'&&'tableData'in _0x2238d4?_0x2238d4[_0x54dbf6(0x16e)]?.[0x0]:_0x2238d4&&typeof _0x2238d4==='object'&&_0x54dbf6(0x178)in _0x2238d4?_0x2238d4:undefined;if(!_0x4c1d29)throw CliErrors['validation']('SQL\x20query\x20not\x20found:\x20'+_0x17dfb7);return _0x4c1d29;}function isRemoteAppItem(_0x21cc36){const _0x1add5a=a65_0x407c;return!!_0x21cc36&&typeof _0x21cc36===_0x1add5a(0x135)&&typeof _0x21cc36['appCode']===_0x1add5a(0x146)&&typeof _0x21cc36[_0x1add5a(0x16c)]===_0x1add5a(0x146);}function extractRemoteAppItems(_0xf03276){const _0x527d87=a65_0x407c;if(Array[_0x527d87(0x167)](_0xf03276))return _0xf03276[_0x527d87(0x185)](isRemoteAppItem);if(!_0xf03276||typeof _0xf03276!=='object')throw CliErrors['apiError']('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x223402=_0xf03276;if(Array[_0x527d87(0x167)](_0x223402[_0x527d87(0x16e)]))return _0x223402[_0x527d87(0x16e)][_0x527d87(0x185)](isRemoteAppItem);if(_0x223402[_0x527d87(0x17b)]&&typeof _0x223402[_0x527d87(0x17b)]===_0x527d87(0x135)){const _0x127b0d=_0x223402[_0x527d87(0x17b)];if(Array[_0x527d87(0x167)](_0x127b0d[_0x527d87(0x16e)]))return _0x127b0d[_0x527d87(0x16e)][_0x527d87(0x185)](isRemoteAppItem);}throw CliErrors[_0x527d87(0x159)](_0x527d87(0x182));}export async function getMyApps(){const _0x4e9129=a65_0x407c,_0xca520c=await apiRequest(_0x4e9129(0x17a));return extractRemoteAppItems(_0xca520c[_0x4e9129(0x17b)]);}export async function getLoginUserInfo(){const _0x165e23=a65_0x407c,_0x4a0bce=await apiRequest(_0x165e23(0x16f));if(!_0x4a0bce[_0x165e23(0x17b)]||typeof _0x4a0bce['data']!==_0x165e23(0x135)||Array[_0x165e23(0x167)](_0x4a0bce['data']))throw CliErrors[_0x165e23(0x159)]('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x4a0bce[_0x165e23(0x17b)];}export async function listDatasets(_0x601592,_0x53c30c){const _0x432603=a65_0x407c,_0x2fabfa=await apiRequest('/client/dataset/list',{'method':_0x432603(0x163),'body':{'appCode':_0x601592,..._0x53c30c?.[_0x432603(0x162)]&&{'code':_0x53c30c[_0x432603(0x162)]},..._0x53c30c?.[_0x432603(0x16d)]&&{'name':_0x53c30c['name']}}});return extractList(_0x2fabfa['data']);}export async function getDatasetDetail(_0x2f8160){const _0x11302d=a65_0x407c,_0x2cba0f=await apiRequest(_0x11302d(0x166)+encodeURIComponent(_0x2f8160));return _0x2cba0f[_0x11302d(0x17b)];}export async function getDatasetSdkUsageDoc(_0x258b9d,_0x5c50b8){const _0x49222f=a65_0x407c,_0x3dad25=await toolboxRequest(_0x49222f(0x17e),{'datasetCode':_0x258b9d,'appCode':_0x5c50b8});return typeof _0x3dad25?.[_0x49222f(0x174)]===_0x49222f(0x146)?_0x3dad25['markdown']:'';}export async function listRuntimeArtifacts(_0x3eaf59,_0x4d98c6){const _0x404e0e=a65_0x407c,_0x2f4d48=new URLSearchParams({'appCode':_0x3eaf59});if(_0x4d98c6?.['artifactType'])_0x2f4d48[_0x404e0e(0x177)]('artifactType',_0x4d98c6['artifactType']);if(_0x4d98c6?.[_0x404e0e(0x161)])_0x2f4d48[_0x404e0e(0x177)](_0x404e0e(0x161),_0x4d98c6['source']);if(_0x4d98c6?.[_0x404e0e(0x19f)]!==undefined)_0x2f4d48[_0x404e0e(0x177)]('favorite',String(_0x4d98c6[_0x404e0e(0x19f)]));const _0x3fc7e6=await apiRequest(_0x404e0e(0x154)+_0x2f4d48[_0x404e0e(0x198)]());return Array[_0x404e0e(0x167)](_0x3fc7e6[_0x404e0e(0x17b)])?_0x3fc7e6[_0x404e0e(0x17b)]:[];}export async function getRuntimeArtifact(_0xdca3da,_0x19745d){const _0x2d20f3=a65_0x407c,_0x43b6e8=await apiRequest(_0x2d20f3(0x194)+_0xdca3da+_0x2d20f3(0x152)+encodeURIComponent(_0x19745d));if(!_0x43b6e8[_0x2d20f3(0x17b)])throw CliErrors['validation'](_0x2d20f3(0x17f)+_0xdca3da);return _0x43b6e8[_0x2d20f3(0x17b)];}export async function createRuntimeArtifact(_0x316c2f,_0x22d757){const _0x5f2f19=a65_0x407c,_0x19ad16=await apiRequest(_0x5f2f19(0x14e),{'method':_0x5f2f19(0x163),'body':{'appCode':_0x316c2f,..._0x22d757}});return _0x19ad16[_0x5f2f19(0x17b)];}export async function updateRuntimeArtifact(_0x5083d2,_0x2be3ef,_0x366a75){const _0x1ba61f=a65_0x407c,_0x42537d=await apiRequest('/client/artifact/'+_0x5083d2+'/update',{'method':_0x1ba61f(0x163),'body':{'appCode':_0x2be3ef,..._0x366a75}});return _0x42537d['data'];}export async function listPersonalBffs(_0x1af21c){const _0x573b96=a65_0x407c,_0x24dbc4=await apiRequest(_0x573b96(0x15b)+encodeURIComponent(_0x1af21c));return Array[_0x573b96(0x167)](_0x24dbc4['data'])?_0x24dbc4[_0x573b96(0x17b)]:[];}export async function getPersonalBff(_0x3422e9,_0x3ad34b){const _0x337ca4=a65_0x407c,_0x260d98=await apiRequest(_0x337ca4(0x181)+_0x3422e9+_0x337ca4(0x152)+encodeURIComponent(_0x3ad34b));if(!_0x260d98[_0x337ca4(0x17b)])throw CliErrors['validation'](_0x337ca4(0x1ae)+_0x3422e9);return _0x260d98[_0x337ca4(0x17b)];}export async function createPersonalBff(_0x115d9d,_0xe297f1){const _0x1be4f8=a65_0x407c,_0x3bf47a=await apiRequest(_0x1be4f8(0x1a5),{'method':_0x1be4f8(0x163),'body':{'appCode':_0x115d9d,..._0xe297f1}});return _0x3bf47a[_0x1be4f8(0x17b)];}export async function updatePersonalBff(_0x42af7b,_0x48ea9e,_0x540efd){const _0x598b81=a65_0x407c,_0x2c0e83=await apiRequest(_0x598b81(0x181)+_0x42af7b+_0x598b81(0x14c),{'method':'POST','body':{'appCode':_0x48ea9e,..._0x540efd}});return _0x2c0e83[_0x598b81(0x17b)];}export async function executePersonalBff(_0x462a9e,_0x5280a7,_0x28bf68){const _0x100a0e=a65_0x407c,_0x49ed54=await apiRequest(_0x100a0e(0x181)+_0x462a9e+_0x100a0e(0x144)+encodeURIComponent(_0x5280a7),{'method':'POST','body':_0x28bf68});return _0x49ed54['data'];}export async function listPersonalKnowledgeBaseItems(_0x264686){const _0x644644=a65_0x407c,_0x310b95=await apiRequest(_0x644644(0x176)+encodeURIComponent(_0x264686));return Array[_0x644644(0x167)](_0x310b95[_0x644644(0x17b)])?_0x310b95['data']:[];}export async function getPersonalKnowledgeBaseItem(_0xbb4798,_0x98215d){const _0x200ade=a65_0x407c,_0x28d50d=await apiRequest(_0x200ade(0x140)+_0xbb4798+_0x200ade(0x152)+encodeURIComponent(_0x98215d));if(!_0x28d50d[_0x200ade(0x17b)])throw CliErrors[_0x200ade(0x13c)](_0x200ade(0x139)+_0xbb4798);return _0x28d50d['data'];}export async function createPersonalKnowledgeBaseItem(_0x1e8776,_0x6552f4){const _0x401d78=a65_0x407c,_0x3307ce=await apiRequest(_0x401d78(0x184),{'method':_0x401d78(0x163),'body':{'appCode':_0x1e8776,..._0x6552f4}});return _0x3307ce[_0x401d78(0x17b)];}export async function updatePersonalKnowledgeBaseItem(_0x229d47,_0x4aaeb4,_0x5508bc){const _0x819cb8=a65_0x407c,_0x54c779=await apiRequest(_0x819cb8(0x140)+_0x229d47+_0x819cb8(0x14c),{'method':_0x819cb8(0x163),'body':{'appCode':_0x4aaeb4,..._0x5508bc}});return _0x54c779[_0x819cb8(0x17b)];}export async function searchKnowledgeBase(_0x30ee2b,_0x2d0a65){const _0x98f794=a65_0x407c,_0x16856f=await apiRequest('/client/knowledge-base/search',{'method':'POST','body':{'appCode':_0x30ee2b,'query':_0x2d0a65[_0x98f794(0x13f)],..._0x2d0a65[_0x98f794(0x13d)]!==undefined?{'topK':_0x2d0a65[_0x98f794(0x13d)]}:{}}});return Array['isArray'](_0x16856f['data'])?_0x16856f['data']:[];}export async function getRuntimeSkillByCode(_0x272e0b,_0x15aa2d){const _0x2ff123=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x272e0b)+'/'+encodeURIComponent(_0x15aa2d),{'allowNotFound':!![]});return _0x2ff123?skillHubRuntimeDetailToRuntimeSkill(_0x2ff123):undefined;}export async function listRuntimeSkills(_0x5b324f){const _0x3e7c72=a65_0x407c,_0x361151=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0x5b324f[_0x3e7c72(0x187)])+'/skills',{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x5b324f['appCode'],_0x361151,_0x5b324f[_0x3e7c72(0x133)]??_0x3e7c72(0x168),_0x5b324f[_0x3e7c72(0x162)]);}export async function listPersonalRuntimeSkills(_0x37087a){const _0x10c297=a65_0x407c;return(await listRuntimeSkills({'appCode':_0x37087a,'scope':'personal'}))[_0x10c297(0x17d)];}export async function listCompanyRuntimeSkills(_0x7c492d){const _0x3c53f8=a65_0x407c;return(await listRuntimeSkills({'appCode':_0x7c492d,'scope':_0x3c53f8(0x15c)}))[_0x3c53f8(0x15c)];}export async function listVisibleRuntimeSkills(_0x17f5e8){const _0x59e3ac=a65_0x407c;return(await listRuntimeSkills({'appCode':_0x17f5e8,'scope':_0x59e3ac(0x168)}))[_0x59e3ac(0x18f)];}export async function createPersonalRuntimeSkill(_0x5a6795,_0x4d260b){return publishRuntimeSkill(_0x5a6795,_0x4d260b);}function a65_0xbd30(){const _0xf03c4a=['Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','PRIVATE','/client/knowledge-base/personal/create','filter','/client/bff/query/','appCode','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','2622425UtgwYb','publishedVersion','from','2guHomV','264BwqMvg','invokeSource','effective','/api/cli/v1/skills/','values','toLowerCase','skillName','/client/artifact/','items','.zip','10LEcFOS','toString','slug','arrayBuffer','status','map','skillCode','NAMESPACE_ONLY','favorite','number','success','AbortError','base64','application/octet-stream','/client/runtime-bff/personal/create','file','searchParams','packageBase64','16JBXEnn','skill','447110VOYaNM','GET','version','Personal\x20BFF\x20not\x20found:\x20id=','trim','json','/versions/','msg','newConfigFileName','scope','27dqpxQl','object','/download','text','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Knowledge-base\x20entry\x20not\x20found:\x20id=','signal','BFF\x20script\x20not\x20found:\x20id=','validation','topK','visibility','query','/client/knowledge-base/personal/','424696WmoDNa','Check\x20your\x20credentials\x20and\x20try\x20again.','namespace','/execute?appCode=','description','string','Configure\x20accessKey\x20in\x20','application/json','replace','authRequired','message','/update','50UrfqjT','/client/artifact/create','abort','Missing\x20Skill\x20package\x20payload.','/publish','?appCode=','application/zip','/client/artifact/list?','headlineVersion','738102OKlacM','entries','catch','apiError','ownerPreviewVersion','/client/runtime-bff/personal/list?appCode=','company','content','4725846KYkyen','API\x20error\x20code:\x20','errorMsg','source','code','POST','11354365MYwcZg','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/dataset/get-driven-data?code=','isArray','all','boolean','2658229QxwWKr','Request\x20timeout:\x20','appName','name','tableData','/client/user/loginUserInfo','API\x20error:\x20','errorCode','displayName','summary','markdown','stringify','/client/knowledge-base/personal/list?appCode=','set','sqlCode','SkillHub\x20error\x20code:\x20','/client/app/my-apps','data','Download\x20failed:\x20','personal','api-doc-generator','Artifact\x20not\x20found:\x20id=','Toolbox\x20error\x20code:\x20','/client/runtime-bff/personal/'];a65_0xbd30=function(){return _0xf03c4a;};return a65_0xbd30();}export async function updatePersonalRuntimeSkill(_0x527b9b,_0x1e71f5,_0x396677){const _0x5a047b=a65_0x407c;return publishRuntimeSkill(_0x1e71f5,{..._0x396677,'skillCode':_0x396677[_0x5a047b(0x19d)]??_0x527b9b});}export async function downloadRuntimeSkillPackage(_0x35c468,_0xf82bb7,_0x36b8cc,_0x45f76c){const _0x27a7e9=a65_0x407c;void _0x35c468;const _0x4b2139=_0x45f76c?_0x27a7e9(0x190)+encodeURIComponent(_0x36b8cc)+'/'+encodeURIComponent(_0xf82bb7)+_0x27a7e9(0x130)+encodeURIComponent(_0x45f76c)+'/download':_0x27a7e9(0x190)+encodeURIComponent(_0x36b8cc)+'/'+encodeURIComponent(_0xf82bb7)+_0x27a7e9(0x136);return skillHubBinaryRequest(_0x4b2139);}async function publishRuntimeSkill(_0x1b3b5f,_0x296835){const _0x34e421=a65_0x407c,_0x254e6d=new FormData();_0x254e6d['set'](_0x34e421(0x1a6),runtimeSkillPackageFile(_0x296835)),_0x254e6d['set'](_0x34e421(0x13e),_0x34e421(0x183));const _0x54e80e=await skillHubJsonRequest(_0x34e421(0x190)+encodeURIComponent(_0x1b3b5f)+_0x34e421(0x151),{'method':_0x34e421(0x163),'body':_0x254e6d});return{'appCode':_0x54e80e[_0x34e421(0x143)]??_0x1b3b5f,'skillCode':_0x54e80e['slug']??_0x296835[_0x34e421(0x19d)]??'','skillName':_0x296835[_0x34e421(0x193)]??_0x54e80e[_0x34e421(0x199)]??_0x296835['skillCode'],'description':_0x296835[_0x34e421(0x145)],'scope':skillHubVisibilityToScope(_0x54e80e[_0x34e421(0x13e)])??_0x34e421(0x17d),'version':_0x54e80e['version']??_0x296835[_0x34e421(0x1ad)],'tags':_0x296835['tags'],'content':_0x296835[_0x34e421(0x15d)]};}function runtimeSkillPackageFile(_0x2c111){const _0x3e2a77=a65_0x407c;if(!_0x2c111[_0x3e2a77(0x1a8)])throw CliErrors['validation'](_0x3e2a77(0x150));const _0x18dae7=Buffer[_0x3e2a77(0x18b)](_0x2c111[_0x3e2a77(0x1a8)],_0x3e2a77(0x1a3)),_0x51bc80=new Blob([_0x18dae7],{'type':_0x3e2a77(0x153)}),_0x107a81=(_0x2c111[_0x3e2a77(0x19d)]||_0x3e2a77(0x1aa))+_0x3e2a77(0x196);if(typeof File!=='undefined')return new File([_0x51bc80],_0x107a81,{'type':_0x3e2a77(0x153)});return _0x51bc80;}function normalizeSkillHubRuntimeListResponse(_0x34adf0,_0x4c4013,_0x583d71,_0xf5bf8e){const _0x586e58=a65_0x407c,_0x23d076=Array['isArray'](_0x4c4013)?_0x4c4013:Array['isArray'](_0x4c4013?.[_0x586e58(0x195)])?_0x4c4013['items']:[],_0x78f0f=_0xf5bf8e?.[_0x586e58(0x1af)](),_0x15fff0=_0x23d076[_0x586e58(0x185)](_0x3986ac=>!_0x78f0f||_0x3986ac[_0x586e58(0x199)]===_0x78f0f)[_0x586e58(0x19c)](skillHubRuntimeItemToRuntimeSkill)[_0x586e58(0x185)](_0x1cc863=>Boolean(_0x1cc863)),_0x2bc158=_0x15fff0[_0x586e58(0x185)](_0x207f06=>_0x207f06['scope']==='personal'),_0x2a5191=_0x15fff0[_0x586e58(0x185)](_0x2654a2=>_0x2654a2[_0x586e58(0x133)]===_0x586e58(0x15c));return{'appCode':_0x34adf0,'personal':_0x583d71===_0x586e58(0x15c)?[]:_0x2bc158,'company':_0x583d71===_0x586e58(0x17d)?[]:_0x2a5191,'effective':buildEffectiveRuntimeSkills(_0x2bc158,_0x2a5191,_0x583d71)};}function skillHubRuntimeItemToRuntimeSkill(_0x60ce8b){const _0x9b48c8=a65_0x407c,_0x57b640=_0x60ce8b[_0x9b48c8(0x199)]?.[_0x9b48c8(0x1af)](),_0x44cfab=skillHubVisibilityToScope(_0x60ce8b[_0x9b48c8(0x13e)]);if(!_0x57b640||!_0x44cfab)return undefined;return{'id':_0x60ce8b['id'],'appCode':_0x60ce8b[_0x9b48c8(0x143)],'skillCode':_0x57b640,'skillName':_0x60ce8b[_0x9b48c8(0x172)]??_0x57b640,'description':_0x60ce8b[_0x9b48c8(0x173)],'scope':_0x44cfab,'version':skillHubRuntimeItemVersion(_0x60ce8b),'status':_0x60ce8b[_0x9b48c8(0x19b)]};}function a65_0x407c(_0x221711,_0x1a6669){_0x221711=_0x221711-0x12f;const _0xbd3062=a65_0xbd30();let _0x407c99=_0xbd3062[_0x221711];return _0x407c99;}function skillHubRuntimeDetailToRuntimeSkill(_0x1b5675){const _0xeacc97=a65_0x407c,_0x2885cd=_0x1b5675[_0xeacc97(0x199)]?.[_0xeacc97(0x1af)]();if(!_0x2885cd)return undefined;return{'id':_0x1b5675['id'],'appCode':_0x1b5675[_0xeacc97(0x143)],'skillCode':_0x2885cd,'skillName':_0x1b5675['displayName']??_0x2885cd,'description':_0x1b5675[_0xeacc97(0x173)],'scope':skillHubVisibilityToScope(_0x1b5675[_0xeacc97(0x13e)])??_0x1b5675[_0xeacc97(0x13e)]?.[_0xeacc97(0x192)](),'version':skillHubRuntimeItemVersion(_0x1b5675),'status':_0x1b5675[_0xeacc97(0x19b)]};}function skillHubVisibilityToScope(_0x2f0dbc){const _0x4254e0=a65_0x407c;if(_0x2f0dbc===_0x4254e0(0x183))return _0x4254e0(0x17d);if(_0x2f0dbc===_0x4254e0(0x19e))return _0x4254e0(0x15c);return undefined;}function skillHubRuntimeItemVersion(_0x47ed78){const _0x44aece=a65_0x407c;return _0x47ed78[_0x44aece(0x18a)]?.[_0x44aece(0x1ad)]??_0x47ed78[_0x44aece(0x155)]?.[_0x44aece(0x1ad)]??_0x47ed78[_0x44aece(0x15a)]?.[_0x44aece(0x1ad)];}function buildEffectiveRuntimeSkills(_0x873a52,_0x3496d8,_0x425897){const _0x48e965=a65_0x407c;if(_0x425897===_0x48e965(0x17d))return _0x873a52;if(_0x425897===_0x48e965(0x15c))return _0x3496d8;const _0x3312e5=new Map();for(const _0x1389a9 of _0x3496d8){_0x3312e5['set'](_0x1389a9['skillCode'],_0x1389a9);}for(const _0x292205 of _0x873a52){_0x3312e5[_0x48e965(0x177)](_0x292205[_0x48e965(0x19d)],_0x292205);}return Array['from'](_0x3312e5[_0x48e965(0x191)]());}function normalizeRuntimeSkillListResponse(_0xad5fab,_0x54b056){const _0xc55d13=a65_0x407c;if(Array['isArray'](_0x54b056)){const _0x554a9b=_0x54b056['filter'](_0x4c2f60=>_0x4c2f60[_0xc55d13(0x133)]===_0xc55d13(0x17d)),_0x57a0af=_0x54b056[_0xc55d13(0x185)](_0x1dae66=>_0x1dae66['scope']==='company');return{'appCode':_0xad5fab,'personal':_0x554a9b,'company':_0x57a0af,'effective':[..._0x57a0af,..._0x554a9b]};}return{'appCode':_0x54b056?.[_0xc55d13(0x187)]??_0xad5fab,'personal':Array[_0xc55d13(0x167)](_0x54b056?.[_0xc55d13(0x17d)])?_0x54b056['personal']:[],'company':Array[_0xc55d13(0x167)](_0x54b056?.['company'])?_0x54b056[_0xc55d13(0x15c)]:[],'effective':Array[_0xc55d13(0x167)](_0x54b056?.[_0xc55d13(0x18f)])?_0x54b056[_0xc55d13(0x18f)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x935398,_0xa8026b){const _0x5ddc62=a66_0x3a47,_0x150193=_0x935398();while(!![]){try{const _0x1496fe=parseInt(_0x5ddc62(0x8c))/0x1+-parseInt(_0x5ddc62(0x8a))/0x2*(parseInt(_0x5ddc62(0x82))/0x3)+parseInt(_0x5ddc62(0x8d))/0x4+parseInt(_0x5ddc62(0x80))/0x5*(parseInt(_0x5ddc62(0x8f))/0x6)+parseInt(_0x5ddc62(0x87))/0x7+-parseInt(_0x5ddc62(0x89))/0x8*(-parseInt(_0x5ddc62(0x83))/0x9)+-parseInt(_0x5ddc62(0x88))/0xa;if(_0x1496fe===_0xa8026b)break;else _0x150193['push'](_0x150193['shift']());}catch(_0x766235){_0x150193['push'](_0x150193['shift']());}}}(a66_0x1869,0x6f5e3));import{listDatasets}from'../core/api-client.js';const cache=new Map();function a66_0x1869(){const _0x37fd5e=['9656ywAPeg','116766TbQLhr','dbId','428882npSoan','2978508UIzBaA','dbName','498RWPqpw','entries','has','map','db-','8860GtPOgg','dbtableConfig','27DtKdDW','6759anzVql','get','find','set','5864187xEGNco','20831730Cpfqwp'];a66_0x1869=function(){return _0x37fd5e;};return a66_0x1869();}function a66_0x3a47(_0x5009ae,_0x55d131){_0x5009ae=_0x5009ae-0x7e;const _0x18693a=a66_0x1869();let _0x3a4789=_0x18693a[_0x5009ae];return _0x3a4789;}export async function listDatabases(_0x4d20d9){const _0x3a084c=a66_0x3a47;if(cache[_0x3a084c(0x91)](_0x4d20d9))return cache[_0x3a084c(0x84)](_0x4d20d9);const _0x2d2078=await listDatasets(_0x4d20d9),_0x5c5542=new Map();for(const _0x1c4a45 of _0x2d2078){const _0xad72f5=_0x1c4a45[_0x3a084c(0x81)];_0xad72f5?.[_0x3a084c(0x8b)]!=null&&_0x5c5542[_0x3a084c(0x86)](_0xad72f5['dbId'],_0xad72f5[_0x3a084c(0x8e)]??_0x3a084c(0x7f)+_0xad72f5['dbId']);}const _0x303818=[..._0x5c5542[_0x3a084c(0x90)]()][_0x3a084c(0x7e)](([_0x1bed9a,_0x114410])=>({'dbId':_0x1bed9a,'dbName':_0x114410}));return cache[_0x3a084c(0x86)](_0x4d20d9,_0x303818),_0x303818;}export async function getDbName(_0x2371c4,_0x173b5e){const _0xae5807=a66_0x3a47;try{const _0x2952ac=await listDatabases(_0x2371c4);return _0x2952ac[_0xae5807(0x85)](_0x3176d0=>_0x3176d0['dbId']===_0x173b5e)?.[_0xae5807(0x8e)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1608d3,_0x3d2374){const _0x5246d=a67_0x3e58,_0x1ee1f6=_0x1608d3();while(!![]){try{const _0xd102ef=-parseInt(_0x5246d(0x1c4))/0x1+-parseInt(_0x5246d(0x1ab))/0x2+parseInt(_0x5246d(0x1be))/0x3*(-parseInt(_0x5246d(0x1b3))/0x4)+-parseInt(_0x5246d(0x1b1))/0x5*(-parseInt(_0x5246d(0x1b4))/0x6)+parseInt(_0x5246d(0x1bb))/0x7*(parseInt(_0x5246d(0x1bd))/0x8)+parseInt(_0x5246d(0x1c1))/0x9+-parseInt(_0x5246d(0x1aa))/0xa*(-parseInt(_0x5246d(0x1a3))/0xb);if(_0xd102ef===_0x3d2374)break;else _0x1ee1f6['push'](_0x1ee1f6['shift']());}catch(_0x5c3543){_0x1ee1f6['push'](_0x1ee1f6['shift']());}}}(a67_0x3cb7,0xb9313));import{createClient}from'@lovrabet/sdk';function a67_0x3cb7(){const _0x2e1a82=['bff','column','object','getOne','models','150DdYbaP','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','12QnifEK','62628FhWdXJ','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','function','appCode','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','validation','invokeSource','7VKYbFM','execute','8606344WfNzZP','295047OgvaHo','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.',']\x20must\x20be\x20an\x20object.','1979064IFWxqX','authMode','aggregate','1234252TJNaWh','sql','update','field','isArray','accessKey','trim','dataset_','delete','string','env','746163YKrtIo','\x22.\x20','data\x20aggregate\x20--params.aggregate[','map','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.','batchCreate','220TSzjOn','1626618LKlwdG'];a67_0x3cb7=function(){return _0x2e1a82;};return a67_0x3cb7();}import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x3bf4e4){const _0x158717=a67_0x3e58;_client=createClient({'appCode':_0x3bf4e4[_0x158717(0x1b7)],'env':_0x3bf4e4[_0x158717(0x1a2)],'authMode':_0x3bf4e4[_0x158717(0x1c2)],..._0x3bf4e4[_0x158717(0x19d)]?{'accessKey':_0x3bf4e4['accessKey']}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x158717(0x1ba)]}}});}function ensureClient(){const _0x453316=a67_0x3e58;if(!_client)throw new Error(_0x453316(0x1bf));return _client;}function normalizeAggregateParams(_0x55affa){const _0x29c00e=a67_0x3e58,_0x457083=_0x55affa[_0x29c00e(0x1c3)];if(_0x457083===undefined)return _0x55affa;if(!Array[_0x29c00e(0x19c)](_0x457083))throw CliErrors[_0x29c00e(0x1b9)]('data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.');return{..._0x55affa,'aggregate':_0x457083[_0x29c00e(0x1a6)]((_0x53a3fa,_0xa42d69)=>{const _0xbd58de=_0x29c00e;if(!_0x53a3fa||typeof _0x53a3fa!==_0xbd58de(0x1ae)||Array[_0xbd58de(0x19c)](_0x53a3fa))throw CliErrors[_0xbd58de(0x1b9)](_0xbd58de(0x1a5)+_0xa42d69+_0xbd58de(0x1c0));const _0x11d93c=_0x53a3fa[_0xbd58de(0x1ad)]??_0x53a3fa[_0xbd58de(0x1c7)];if(typeof _0x11d93c!==_0xbd58de(0x1a1)||_0x11d93c[_0xbd58de(0x19e)]()==='')throw CliErrors[_0xbd58de(0x1b9)](_0xbd58de(0x1a5)+_0xa42d69+_0xbd58de(0x1a8));const _0x47688={..._0x53a3fa,'column':_0x11d93c};return delete _0x47688['field'],_0x47688;})};}function a67_0x3e58(_0x2a8249,_0x2faff5){_0x2a8249=_0x2a8249-0x19c;const _0x3cb7ed=a67_0x3cb7();let _0x3e5833=_0x3cb7ed[_0x2a8249];return _0x3e5833;}export async function executeData(_0x438b33,_0x4039ff,_0x206812){const _0x2dd804=a67_0x3e58,_0x3b97ee=ensureClient(),_0x246a58=_0x2dd804(0x19f)+_0x438b33,_0x12d4ef=_0x3b97ee[_0x2dd804(0x1b0)][_0x246a58];if(!_0x12d4ef||typeof _0x12d4ef[_0x4039ff]!==_0x2dd804(0x1b6))throw new Error(_0x2dd804(0x1a7)+_0x4039ff+_0x2dd804(0x1a4)+_0x2dd804(0x1b2));if(_0x4039ff===_0x2dd804(0x1a9))return _0x12d4ef[_0x2dd804(0x1a9)](parseBatchCreateItemsFromParams(_0x206812));const _0x2d2d58=_0x206812!==undefined&&_0x206812!==null&&!Array['isArray'](_0x206812)?_0x206812:{};switch(_0x4039ff){case _0x2dd804(0x1af):{const _0x1e0ede=_0x2d2d58['id'];if(_0x1e0ede===undefined||_0x1e0ede===null)throw new Error(_0x2dd804(0x1b5));return _0x12d4ef[_0x2dd804(0x1af)](_0x1e0ede);}case _0x2dd804(0x1c6):{const {id:_0x1b2888,..._0x4f57a1}=_0x2d2d58;if(_0x1b2888===undefined||_0x1b2888===null)throw new Error(_0x2dd804(0x1b8));return _0x12d4ef[_0x2dd804(0x1c6)](_0x1b2888,_0x4f57a1);}case _0x2dd804(0x1a0):{const _0x2bf260=_0x2d2d58['id'];if(_0x2bf260===undefined||_0x2bf260===null)throw new Error('delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x12d4ef[_0x2dd804(0x1a0)](_0x2bf260);}case _0x2dd804(0x1c3):return _0x12d4ef[_0x2dd804(0x1c3)](normalizeAggregateParams(_0x2d2d58));default:return _0x12d4ef[_0x4039ff](_0x2d2d58);}}export async function executeSdkSql(_0x1ae612,_0xd9188b){const _0x9e69bd=a67_0x3e58,_0xdc71d6=ensureClient();return _0xdc71d6[_0x9e69bd(0x1c5)]['execute']({'sqlCode':_0x1ae612,'params':_0xd9188b});}export async function executeSdkBff(_0x4aca4c,_0x55d52f){const _0x1a26de=a67_0x3e58,_0x2704f6=ensureClient();return _0x2704f6[_0x1a26de(0x1ac)][_0x1a26de(0x1bc)]({'scriptName':_0x4aca4c,'params':_0x55d52f});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a68_0x1617a5=a68_0x6bca;(function(_0x28d31a,_0x520f64){const _0x414179=a68_0x6bca,_0xb0047c=_0x28d31a();while(!![]){try{const _0x4a511d=-parseInt(_0x414179(0x127))/0x1+-parseInt(_0x414179(0x11d))/0x2*(-parseInt(_0x414179(0x123))/0x3)+parseInt(_0x414179(0x124))/0x4+-parseInt(_0x414179(0x11f))/0x5+parseInt(_0x414179(0x126))/0x6*(parseInt(_0x414179(0x128))/0x7)+-parseInt(_0x414179(0x121))/0x8+parseInt(_0x414179(0x12a))/0x9;if(_0x4a511d===_0x520f64)break;else _0xb0047c['push'](_0xb0047c['shift']());}catch(_0x27798a){_0xb0047c['push'](_0xb0047c['shift']());}}}(a68_0x11de,0xacb73));function a68_0x6bca(_0x5e6734,_0x436782){_0x5e6734=_0x5e6734-0x11d;const _0x11de7c=a68_0x11de();let _0x6bcaa=_0x11de7c[_0x5e6734];return _0x6bcaa;}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a68_0x11de(){const _0x3b9f99=['\x20file.','3509776FNjFqH','Set\x20appcode\x20via\x20--appcode\x20or\x20','2248095Lftsge','1553624Ztykgl','newConfigFileName','222wZXdlV','707281tFqEoy','183659OAJzDn','\x20or\x20run\x20`','4057461buucYn','2GziXTv','\x20auth\x20login`.','3529615lWyMpY'];a68_0x11de=function(){return _0x3b9f99;};return a68_0x11de();}import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[a68_0x1617a5(0x125)]+a68_0x1617a5(0x129)+CLI_BIN_NAME+a68_0x1617a5(0x11e),'configMissingHint':a68_0x1617a5(0x122)+PRODUCT_CONFIG[a68_0x1617a5(0x125)]+'.','notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20'+PRODUCT_CONFIG[a68_0x1617a5(0x125)]+a68_0x1617a5(0x120)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x35b9eb,_0x20e282){var _0x10740a=a69_0x20d2,_0x18865a=_0x35b9eb();while(!![]){try{var _0x16e684=-parseInt(_0x10740a(0x140))/0x1+parseInt(_0x10740a(0x13b))/0x2*(-parseInt(_0x10740a(0x13e))/0x3)+parseInt(_0x10740a(0x13d))/0x4+-parseInt(_0x10740a(0x141))/0x5+parseInt(_0x10740a(0x13f))/0x6+-parseInt(_0x10740a(0x13c))/0x7+-parseInt(_0x10740a(0x142))/0x8*(-parseInt(_0x10740a(0x13a))/0x9);if(_0x16e684===_0x20e282)break;else _0x18865a['push'](_0x18865a['shift']());}catch(_0x1c5df0){_0x18865a['push'](_0x18865a['shift']());}}}(a69_0x2079,0x58665));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';function a69_0x20d2(_0x19dbe3,_0x8d2071){_0x19dbe3=_0x19dbe3-0x13a;var _0x207928=a69_0x2079();var _0x20d2a3=_0x207928[_0x19dbe3];return _0x20d2a3;}import{buildAllFlags as a69_0xa0e79c}from'@lovrabet/cli-framework';function a69_0x2079(){var _0x4d46d7=['676kByZkA','2587214dkHNIQ','2743328ZwNpUN','3273AagHAA','3528738GXNoGS','678544fgIlyf','2234645QBnxIN','24jifije','2855889ZLJiDE'];a69_0x2079=function(){return _0x4d46d7;};return a69_0x2079();}export function buildAllFlags(_0x24d852){return a69_0xa0e79c(_0x24d852,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a70_0x58ab(_0x156c49,_0x104f0d){_0x156c49=_0x156c49-0x8f;const _0x2bfb30=a70_0x2bfb();let _0x58ab57=_0x2bfb30[_0x156c49];return _0x58ab57;}function a70_0x2bfb(){const _0x3e8f68=['178157dKVGuc','7zVdygG','body','1886400qEPGiN','495600CAzLQv','4981986QPCcOb','428592DswWjl','1325505jvgVPr','23780eMSOQn','16cPBgTn'];a70_0x2bfb=function(){return _0x3e8f68;};return a70_0x2bfb();}(function(_0x3db869,_0x1a09fc){const _0x519ff6=a70_0x58ab,_0xfa7653=_0x3db869();while(!![]){try{const _0x3a68fe=parseInt(_0x519ff6(0x95))/0x1+-parseInt(_0x519ff6(0x93))/0x2+-parseInt(_0x519ff6(0x92))/0x3+-parseInt(_0x519ff6(0x94))/0x4*(parseInt(_0x519ff6(0x8f))/0x5)+parseInt(_0x519ff6(0x98))/0x6+parseInt(_0x519ff6(0x96))/0x7*(parseInt(_0x519ff6(0x91))/0x8)+parseInt(_0x519ff6(0x90))/0x9;if(_0x3a68fe===_0x1a09fc)break;else _0xfa7653['push'](_0xfa7653['shift']());}catch(_0x25c373){_0xfa7653['push'](_0xfa7653['shift']());}}}(a70_0x2bfb,0x3ce88));export function dryRun(_0x26ca5b,_0x122cc4){const _0x548516={'method':_0x26ca5b,'url':_0x122cc4},_0x3e3271={'body'(_0x5e45a0){const _0x429916=a70_0x58ab;return _0x548516[_0x429916(0x97)]=_0x5e45a0,_0x3e3271;},'description'(_0x464fe3){return _0x548516['description']=_0x464fe3,_0x3e3271;},'build'(){return{..._0x548516};}};return _0x3e3271;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x45c577=a71_0x405d;(function(_0x57c378,_0x482aeb){const _0xf75cc=a71_0x405d,_0x113875=_0x57c378();while(!![]){try{const _0x17305f=parseInt(_0xf75cc(0x10d))/0x1*(-parseInt(_0xf75cc(0x10b))/0x2)+-parseInt(_0xf75cc(0x108))/0x3+-parseInt(_0xf75cc(0x109))/0x4+-parseInt(_0xf75cc(0x106))/0x5+-parseInt(_0xf75cc(0x10f))/0x6*(parseInt(_0xf75cc(0x10a))/0x7)+parseInt(_0xf75cc(0x10e))/0x8*(parseInt(_0xf75cc(0x10c))/0x9)+parseInt(_0xf75cc(0x107))/0xa;if(_0x17305f===_0x482aeb)break;else _0x113875['push'](_0x113875['shift']());}catch(_0x4f0f31){_0x113875['push'](_0x113875['shift']());}}}(a71_0x479e,0xa8631));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);function a71_0x405d(_0x5a149c,_0x2a7595){_0x5a149c=_0x5a149c-0x106;const _0x479e32=a71_0x479e();let _0x405deb=_0x479e32[_0x5a149c];return _0x405deb;}function a71_0x479e(){const _0x31f376=['8TLVLgp','41334WsjTzi','parseFlags','2735530RFObAw','31008790mttZAa','1902873QwpFPm','898996kJXdDM','483OFoRIJ','2boMoDZ','3654027bzURsK','935682BXyKzV'];a71_0x479e=function(){return _0x31f376;};return a71_0x479e();}export const parseFlags=helpers[a71_0x45c577(0x110)];export const validateFlags=helpers['validateFlags'];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x877cd2,_0x130943){const _0x2707c0=a72_0x2033,_0x5b845b=_0x877cd2();while(!![]){try{const _0x28fe32=parseInt(_0x2707c0(0x1e7))/0x1+parseInt(_0x2707c0(0x1e0))/0x2*(-parseInt(_0x2707c0(0x1d8))/0x3)+parseInt(_0x2707c0(0x1e1))/0x4*(-parseInt(_0x2707c0(0x1e2))/0x5)+-parseInt(_0x2707c0(0x1df))/0x6*(parseInt(_0x2707c0(0x1e8))/0x7)+-parseInt(_0x2707c0(0x1de))/0x8+-parseInt(_0x2707c0(0x1d7))/0x9+-parseInt(_0x2707c0(0x1e9))/0xa*(-parseInt(_0x2707c0(0x1dd))/0xb);if(_0x28fe32===_0x130943)break;else _0x5b845b['push'](_0x5b845b['shift']());}catch(_0x5bc0db){_0x5b845b['push'](_0x5b845b['shift']());}}}(a72_0x22b3,0x32abf));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';function a72_0x2033(_0x290296,_0x56c53a){_0x290296=_0x290296-0x1d6;const _0x22b353=a72_0x22b3();let _0x20335a=_0x22b353[_0x290296];return _0x20335a;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';function createGenerators(){const _0x43be61=a72_0x2033;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[...serviceRegistry,...safeListDynamicServiceEntries()],'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':'Requires\x20appcode\x20(set\x20via\x20'+PRODUCT_CONFIG[_0x43be61(0x1d9)]+_0x43be61(0x1e3)});}function a72_0x22b3(){const _0x13d7dd=['8xTmrDd','645110XFYoYK','\x20or\x20--appcode).','has','generateServiceHelp','generateCommandHelp','36099fhdTns','28623AVZukm','320uGxUfb','generateFullHelp','1917549rvItmm','619131WHlEUB','newConfigFileName','service','get','map','546458aiDsMX','1919816iQNGpn','432RqbQOK','4esxWTX'];a72_0x22b3=function(){return _0x13d7dd;};return a72_0x22b3();}export function generateCommandHelp(_0x243597){const _0x403f6a=a72_0x2033;return createGenerators()[_0x403f6a(0x1e6)](_0x243597);}export function generateServiceHelp(_0x42382d){const _0x1b76d1=a72_0x2033;return createGenerators()[_0x1b76d1(0x1e5)](_0x42382d);}export function generateFullHelp(){const _0xb123b0=a72_0x2033;return createGenerators()[_0xb123b0(0x1d6)]();}function getAnyServiceEntry(_0x1de77c){const _0x28dde2=getServiceEntry(_0x1de77c);if(_0x28dde2)return _0x28dde2;try{return getDynamicServiceEntry(_0x1de77c);}catch{return undefined;}}function getAnyServiceDefinitions(_0x2ecf74){const _0x390a7c=a72_0x2033,_0xa35c55=serviceGroups[_0x390a7c(0x1db)](_0x2ecf74);if(_0xa35c55)return _0xa35c55;try{return getDynamicServiceDefinitions(_0x2ecf74);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x57b6a9=a72_0x2033,_0x1f57d2=new Set(serviceRegistry[_0x57b6a9(0x1dc)](_0x7ef6ed=>_0x7ef6ed['service']));try{return listDynamicServiceEntries()['filter'](_0x130778=>!_0x1f57d2[_0x57b6a9(0x1e4)](_0x130778[_0x57b6a9(0x1da)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x329eee,_0x4dc2b8){var _0x4de0fe=a73_0x3861,_0x30a34b=_0x329eee();while(!![]){try{var _0x43135f=parseInt(_0x4de0fe(0x7e))/0x1*(parseInt(_0x4de0fe(0x82))/0x2)+parseInt(_0x4de0fe(0x7c))/0x3*(parseInt(_0x4de0fe(0x79))/0x4)+parseInt(_0x4de0fe(0x7a))/0x5+parseInt(_0x4de0fe(0x7f))/0x6+parseInt(_0x4de0fe(0x81))/0x7*(parseInt(_0x4de0fe(0x7b))/0x8)+parseInt(_0x4de0fe(0x7d))/0x9+-parseInt(_0x4de0fe(0x83))/0xa*(parseInt(_0x4de0fe(0x80))/0xb);if(_0x43135f===_0x4dc2b8)break;else _0x30a34b['push'](_0x30a34b['shift']());}catch(_0x317ff7){_0x30a34b['push'](_0x30a34b['shift']());}}}(a73_0x385b,0x6f978));export{runCommand}from'../framework/runner.js';function a73_0x3861(_0x1f358f,_0x24750a){_0x1f358f=_0x1f358f-0x79;var _0x385bfe=a73_0x385b();var _0x3861da=_0x385bfe[_0x1f358f];return _0x3861da;}export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';function a73_0x385b(){var _0x9464c8=['4agdlma','170460sRcfBI','824IrSjbb','1208195JVfFMB','40xYPmir','6438tAaqRp','4305456XntaTR','76913xBlXmd','4162860LANREU','1100JNlICE','212723TeCztl'];a73_0x385b=function(){return _0x9464c8;};return a73_0x385b();}export{extractList,extractPaging}from'../framework/response.js';export{dryRun}from'../framework/dryrun.js';export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|