@lovrabet/lovrabet-cli 2.1.19 → 2.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.d.ts +12 -0
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.d.ts +12 -0
- package/lib/framework/raw-flags.js +1 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.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/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x4b44bc=a66_0x3642;(function(_0x458edb,_0x8d213d){const _0x562d8d=a66_0x3642,_0xf2388f=_0x458edb();while(!![]){try{const _0x53000e=parseInt(_0x562d8d(0xb6))/0x1*(-parseInt(_0x562d8d(0xba))/0x2)+-parseInt(_0x562d8d(0xd7))/0x3+parseInt(_0x562d8d(0xb4))/0x4+-parseInt(_0x562d8d(0xda))/0x5*(parseInt(_0x562d8d(0xc0))/0x6)+parseInt(_0x562d8d(0xcc))/0x7+-parseInt(_0x562d8d(0xad))/0x8*(-parseInt(_0x562d8d(0xcd))/0x9)+parseInt(_0x562d8d(0xc3))/0xa;if(_0x53000e===_0x8d213d)break;else _0xf2388f['push'](_0xf2388f['shift']());}catch(_0x52f748){_0xf2388f['push'](_0xf2388f['shift']());}}}(a66_0x3a03,0x48224));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG['cliBinName'];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a66_0x4b44bc(0xce)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a66_0x4b44bc(0xc8),'type':a66_0x4b44bc(0xc4),'description':a66_0x4b44bc(0xc7),'hint':a66_0x4b44bc(0xb0)},{'name':'app','meowKey':a66_0x4b44bc(0xbc),'type':a66_0x4b44bc(0xc4),'description':a66_0x4b44bc(0xc5),'hint':a66_0x4b44bc(0xc6)},{'name':a66_0x4b44bc(0xcb),'meowKey':a66_0x4b44bc(0xcb),'type':a66_0x4b44bc(0xc4),'description':a66_0x4b44bc(0xb2),'hint':a66_0x4b44bc(0xb3)},{'name':a66_0x4b44bc(0xd5),'meowKey':'format','type':a66_0x4b44bc(0xc4),'description':'Output\x20format','hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a66_0x4b44bc(0xc4),'description':a66_0x4b44bc(0xd6),'hint':'<expr>'},{'name':a66_0x4b44bc(0xb1),'meowKey':a66_0x4b44bc(0xca),'type':a66_0x4b44bc(0xd4),'description':a66_0x4b44bc(0xd8)},{'name':a66_0x4b44bc(0xd9),'meowKey':a66_0x4b44bc(0xd9),'type':a66_0x4b44bc(0xd4),'description':a66_0x4b44bc(0xd1)},{'name':'non-interactive','meowKey':a66_0x4b44bc(0xc2),'type':a66_0x4b44bc(0xd4),'description':a66_0x4b44bc(0xb5)},{'name':a66_0x4b44bc(0xc9),'meowKey':a66_0x4b44bc(0xc9),'type':a66_0x4b44bc(0xd4),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a66_0x4b44bc(0xd4),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a66_0x4b44bc(0xae),'meowKey':'help','type':a66_0x4b44bc(0xd4),'description':a66_0x4b44bc(0xac)},{'name':'id','meowKey':'id','type':a66_0x4b44bc(0xc4),'description':a66_0x4b44bc(0xd3),'hidden':!![]},{'name':'name','meowKey':'name','type':a66_0x4b44bc(0xc4),'description':a66_0x4b44bc(0xb8),'hidden':!![]},{'name':a66_0x4b44bc(0xcf),'meowKey':'sqlcode','type':a66_0x4b44bc(0xc4),'description':a66_0x4b44bc(0xbd),'hidden':!![]},{'name':a66_0x4b44bc(0xbf),'meowKey':a66_0x4b44bc(0xbf),'type':a66_0x4b44bc(0xc4),'description':a66_0x4b44bc(0xbb),'hidden':!![]},{'name':a66_0x4b44bc(0xaf),'meowKey':a66_0x4b44bc(0xaf),'type':a66_0x4b44bc(0xd4),'description':a66_0x4b44bc(0xbe),'hidden':!![]},{'name':a66_0x4b44bc(0xd2),'meowKey':a66_0x4b44bc(0xd2),'type':a66_0x4b44bc(0xd4),'description':a66_0x4b44bc(0xb9),'hidden':!![]}];function a66_0x3a03(){const _0x14b9f4=['761538VtUvOD','JSON\x20params\x20for\x20execute\x20commands','app','SQL\x20query\x20code','Verbose\x20output','params','164508qUaMGF','type','nonInteractive','1092110PNSZks','string','Select\x20app\x20profile\x20by\x20name','<name>','Override\x20appcode','appcode','global','dryRun','env','1144542RRoNXu','405ShmAxf','cliDisplayName','sqlcode','non-interactive','Skip\x20confirmation\x20for\x20high-risk\x20writes','clear','Record\x20ID','boolean','format','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','288528dxzNgJ','Preview\x20operation\x20without\x20executing','yes','40mpaFXE','Show\x20help','61112wQKyql','help','verbose','<code>','dry-run','Environment','production\x20|\x20development\x20|\x20daily','1501108eTkWfq','Force\x20non-interactive\x20mode\x20(CI)','1HreCjC','fromEntries','Name\x20filter','Clear\x20output'];a66_0x3a03=function(){return _0x14b9f4;};return a66_0x3a03();}function a66_0x3642(_0x550101,_0x519d11){_0x550101=_0x550101-0xac;const _0x3a0328=a66_0x3a03();let _0x364240=_0x3a0328[_0x550101];return _0x364240;}export const PIPELINE_FLAG_NAMES=new Set([a66_0x4b44bc(0xc8),'app',a66_0x4b44bc(0xcb),a66_0x4b44bc(0xd5),'jq',a66_0x4b44bc(0xb1),'yes',a66_0x4b44bc(0xd0),'ci']);export function buildMeowFlags(){const _0x44a89a=a66_0x4b44bc;return Object[_0x44a89a(0xb7)](GLOBAL_FLAGS['map'](_0x1c8e2d=>[_0x1c8e2d['meowKey'],{'type':_0x1c8e2d[_0x44a89a(0xc1)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x250607=a67_0x5640;function a67_0x13bd(){const _0x7cdcdb=['718039PcDdWY','907332PnPcNo','compress','155Wukcdn','30036SxfbKh','5773710GdWNpH','write','en-US','11qbdsVk','production','869964GjuMIl','207YZWrpM','138584unDyxA','243762CBcFgQ','49JceZXP','4MAGPgo'];a67_0x13bd=function(){return _0x7cdcdb;};return a67_0x13bd();}function a67_0x5640(_0x44e021,_0x5ea5d7){_0x44e021=_0x44e021-0x135;const _0x13bdcd=a67_0x13bd();let _0x5640d7=_0x13bdcd[_0x44e021];return _0x5640d7;}(function(_0x403cb7,_0x4bb839){const _0xaf7dc=a67_0x5640,_0x4876b4=_0x403cb7();while(!![]){try{const _0x212cf9=parseInt(_0xaf7dc(0x139))/0x1+parseInt(_0xaf7dc(0x138))/0x2*(-parseInt(_0xaf7dc(0x143))/0x3)+parseInt(_0xaf7dc(0x13d))/0x4*(parseInt(_0xaf7dc(0x13c))/0x5)+-parseInt(_0xaf7dc(0x136))/0x6*(-parseInt(_0xaf7dc(0x137))/0x7)+-parseInt(_0xaf7dc(0x135))/0x8*(-parseInt(_0xaf7dc(0x144))/0x9)+-parseInt(_0xaf7dc(0x13e))/0xa+parseInt(_0xaf7dc(0x141))/0xb*(-parseInt(_0xaf7dc(0x13a))/0xc);if(_0x212cf9===_0x4bb839)break;else _0x4876b4['push'](_0x4876b4['shift']());}catch(_0x6efa29){_0x4876b4['push'](_0x4876b4['shift']());}}}(a67_0x13bd,0x61d26));export const DEFAULT_APP_PROFILE_NAME='main';export const DEFAULT_CONFIG_VALUES={'env':a67_0x250607(0x142),'format':a67_0x250607(0x13b),'locale':a67_0x250607(0x140),'riskLevel':a67_0x250607(0x13f)};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x30cc2d=a68_0x4110;(function(_0x2c8e77,_0x496a65){const _0x42d538=a68_0x4110,_0x5e14f5=_0x2c8e77();while(!![]){try{const _0x10614b=parseInt(_0x42d538(0x116))/0x1+parseInt(_0x42d538(0x115))/0x2*(parseInt(_0x42d538(0x117))/0x3)+-parseInt(_0x42d538(0x114))/0x4+parseInt(_0x42d538(0x113))/0x5*(parseInt(_0x42d538(0x118))/0x6)+parseInt(_0x42d538(0x10e))/0x7*(-parseInt(_0x42d538(0x119))/0x8)+-parseInt(_0x42d538(0x110))/0x9*(parseInt(_0x42d538(0x11b))/0xa)+parseInt(_0x42d538(0x10f))/0xb*(parseInt(_0x42d538(0x112))/0xc);if(_0x10614b===_0x496a65)break;else _0x5e14f5['push'](_0x5e14f5['shift']());}catch(_0x57fc0a){_0x5e14f5['push'](_0x5e14f5['shift']());}}}(a68_0x30b0,0x42a8a));function a68_0x30b0(){const _0x412955=['760650CRghqG','414uITCix','712UJCQxV','npmRegistryBaseUrl','7600ZwkpaT','skillSource','36869VxxHMu','759SCaWYE','90UuqPwb','npmPackageName','46536GjONYI','2745IHEtuB','678200iErwlD','4yPwfVa','106384ZPOhzt'];a68_0x30b0=function(){return _0x412955;};return a68_0x30b0();}function a68_0x4110(_0x3ded92,_0x542b0d){_0x3ded92=_0x3ded92-0x10d;const _0x30b01d=a68_0x30b0();let _0x41108d=_0x30b01d[_0x3ded92];return _0x41108d;}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a68_0x30cc2d(0x111)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a68_0x30cc2d(0x10d)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a68_0x30cc2d(0x11a)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x64b5a8=a69_0x319f;(function(_0x23def2,_0x13d2b6){const _0x1ee66d=a69_0x319f,_0x1f7a8c=_0x23def2();while(!![]){try{const _0x231818=parseInt(_0x1ee66d(0xca))/0x1+parseInt(_0x1ee66d(0xbe))/0x2+-parseInt(_0x1ee66d(0xbc))/0x3+-parseInt(_0x1ee66d(0xc7))/0x4*(-parseInt(_0x1ee66d(0xc8))/0x5)+parseInt(_0x1ee66d(0xc5))/0x6*(-parseInt(_0x1ee66d(0xc3))/0x7)+-parseInt(_0x1ee66d(0xc2))/0x8+-parseInt(_0x1ee66d(0xc1))/0x9*(-parseInt(_0x1ee66d(0xc0))/0xa);if(_0x231818===_0x13d2b6)break;else _0x1f7a8c['push'](_0x1f7a8c['shift']());}catch(_0x4978c0){_0x1f7a8c['push'](_0x1f7a8c['shift']());}}}(a69_0x2324,0x527ff));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;function a69_0x319f(_0x24b120,_0x27d661){_0x24b120=_0x24b120-0xba;const _0x23246c=a69_0x2324();let _0x319fc8=_0x23246c[_0x24b120];return _0x319fc8;}export function initDomains(_0x38e847){const _0x707e5c=a69_0x319f;customApiDomain=_0x38e847?.[_0x707e5c(0xc9)],customUserDomain=_0x38e847?.[_0x707e5c(0xbf)],customRuntimeDomain=_0x38e847?.[_0x707e5c(0xba)],customSkillHubDomain=_0x38e847?.['skillHubDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x64b5a8(0xbb)][a69_0x64b5a8(0xc6)][a69_0x64b5a8(0xcd)]:PRODUCT_CONFIG['domains']['nonProduction']['user']);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x64b5a8(0xbb)]['production'][a69_0x64b5a8(0xbd)]:PRODUCT_CONFIG[a69_0x64b5a8(0xbb)][a69_0x64b5a8(0xcb)][a69_0x64b5a8(0xbd)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a69_0x64b5a8(0xc6)][a69_0x64b5a8(0xc4)]:PRODUCT_CONFIG[a69_0x64b5a8(0xbb)]['nonProduction']['runtime']);function a69_0x2324(){const _0x25df76=['runtimeDomain','domains','290469zYCvVL','api','224140uXTOOJ','userDomain','348430BWhSDB','18JydZCG','539056zfLgPE','10227fqARqO','runtime','60RhxEHq','production','365188JQHjLe','5jqfFKz','apiDomain','243681zbTxHK','nonProduction','skillhub','user'];a69_0x2324=function(){return _0x25df76;};return a69_0x2324();}export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x64b5a8(0xbb)]['production']['skillhub']:PRODUCT_CONFIG[a69_0x64b5a8(0xbb)][a69_0x64b5a8(0xcb)][a69_0x64b5a8(0xcc)]);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x42b1c0=a70_0x58e5;(function(_0x1c3fa5,_0x4264ae){const _0x29a065=a70_0x58e5,_0x2cb507=_0x1c3fa5();while(!![]){try{const _0x143d80=-parseInt(_0x29a065(0x14d))/0x1*(parseInt(_0x29a065(0x155))/0x2)+-parseInt(_0x29a065(0x153))/0x3*(parseInt(_0x29a065(0x152))/0x4)+parseInt(_0x29a065(0x14c))/0x5+parseInt(_0x29a065(0x158))/0x6*(parseInt(_0x29a065(0x154))/0x7)+-parseInt(_0x29a065(0x14e))/0x8+-parseInt(_0x29a065(0x157))/0x9+parseInt(_0x29a065(0x151))/0xa;if(_0x143d80===_0x4264ae)break;else _0x2cb507['push'](_0x2cb507['shift']());}catch(_0x5176b9){_0x2cb507['push'](_0x2cb507['shift']());}}}(a70_0x63ad,0x1a565));import{productEnv}from'../constant/product.js';function a70_0x58e5(_0x11bf72,_0x55abc0){_0x11bf72=_0x11bf72-0x14c;const _0x63ad8f=a70_0x63ad();let _0x58e54f=_0x63ad8f[_0x11bf72];return _0x58e54f;}export const RUNTIME_ENV_VALUES=['production',a70_0x42b1c0(0x159),a70_0x42b1c0(0x150)];export function normalizeEnv(_0x2fc8e4){return _0x2fc8e4==='online'?'production':_0x2fc8e4;}export function isProduction(_0x58bef1){const _0x364405=a70_0x42b1c0;return normalizeEnv(_0x58bef1)===_0x364405(0x14f);}export function isDaily(_0x30a9fd){const _0x3c50c1=a70_0x42b1c0;return normalizeEnv(_0x30a9fd)===_0x3c50c1(0x150);}function a70_0x63ad(){const _0x38b6fd=['374hIxMQy','dev','1932084sLMSPK','822216fqpbfr','development','1025935SFaFUy','45YqYKXd','1114280bGNqGk','production','daily','2581590XTHqCm','148AgUDUH','10551YLCtvW','7ogURRL'];a70_0x63ad=function(){return _0x38b6fd;};return a70_0x63ad();}export function isDev(_0x5a1563){const _0x51fb76=a70_0x42b1c0,_0x31c409=normalizeEnv(_0x5a1563);return _0x31c409===_0x51fb76(0x159)||_0x31c409===_0x51fb76(0x156);}let env=normalizeEnv(productEnv('ENV')||a70_0x42b1c0(0x14f));export function getEnv(){return env;}export function initEnv(_0x2a7d28){env=normalizeEnv(_0x2a7d28);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x408205=a71_0x3cdc;function a71_0x3cdc(_0x9895e1,_0x13d8bb){_0x9895e1=_0x9895e1-0x16e;const _0x11face=a71_0x11fa();let _0x3cdc00=_0x11face[_0x9895e1];return _0x3cdc00;}(function(_0x1e3ac7,_0x44c93b){const _0x27b358=a71_0x3cdc,_0x515b49=_0x1e3ac7();while(!![]){try{const _0x510d14=-parseInt(_0x27b358(0x177))/0x1+parseInt(_0x27b358(0x170))/0x2+-parseInt(_0x27b358(0x173))/0x3*(parseInt(_0x27b358(0x172))/0x4)+-parseInt(_0x27b358(0x16f))/0x5+parseInt(_0x27b358(0x174))/0x6*(parseInt(_0x27b358(0x16e))/0x7)+parseInt(_0x27b358(0x178))/0x8+-parseInt(_0x27b358(0x171))/0x9*(-parseInt(_0x27b358(0x175))/0xa);if(_0x510d14===_0x44c93b)break;else _0x515b49['push'](_0x515b49['shift']());}catch(_0x19a50a){_0x515b49['push'](_0x515b49['shift']());}}}(a71_0x11fa,0x565a3));function a71_0x11fa(){const _0xdc502=['2459630tzwclt','json','553040psCPzz','2576736eQobTC','2750279ECYXDZ','1965200Ggavpw','549532CsWniu','18oDQTds','103944QGONpj','21NlmWFt','6KOuGjm'];a71_0x11fa=function(){return _0xdc502;};return a71_0x11fa();}export const OUTPUT_FORMAT_VALUES=[a71_0x408205(0x176),'pretty','compress'];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a72_0x2d7d(_0x5703c2,_0x9954a9){_0x5703c2=_0x5703c2-0x8e;const _0x2a4c37=a72_0x2a4c();let _0x2d7dd2=_0x2a4c37[_0x5703c2];return _0x2d7dd2;}const a72_0xd58be8=a72_0x2d7d;(function(_0x2aa672,_0x1480d9){const _0x6f136f=a72_0x2d7d,_0x5d8f33=_0x2aa672();while(!![]){try{const _0x5306d1=-parseInt(_0x6f136f(0x8e))/0x1+-parseInt(_0x6f136f(0xa6))/0x2*(-parseInt(_0x6f136f(0x9f))/0x3)+-parseInt(_0x6f136f(0xa5))/0x4*(parseInt(_0x6f136f(0xa9))/0x5)+parseInt(_0x6f136f(0x95))/0x6*(parseInt(_0x6f136f(0x92))/0x7)+-parseInt(_0x6f136f(0xa3))/0x8+-parseInt(_0x6f136f(0xa0))/0x9+parseInt(_0x6f136f(0x90))/0xa*(parseInt(_0x6f136f(0x91))/0xb);if(_0x5306d1===_0x1480d9)break;else _0x5d8f33['push'](_0x5d8f33['shift']());}catch(_0x37f94e){_0x5d8f33['push'](_0x5d8f33['shift']());}}}(a72_0x2a4c,0x61808));export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':a72_0xd58be8(0x9d),'npmPackageName':a72_0xd58be8(0x9c),'skillSource':a72_0xd58be8(0xab),'npmRegistryBaseUrl':a72_0xd58be8(0xa4),'envPrefix':a72_0xd58be8(0x98),'legacyEnvPrefixes':[a72_0xd58be8(0x9e)],'configFileNames':[a72_0xd58be8(0x9b),a72_0xd58be8(0xa1)],'newConfigFileName':a72_0xd58be8(0x9b),'homeDirName':a72_0xd58be8(0x93),'logFileName':a72_0xd58be8(0x97),'invokeSource':a72_0xd58be8(0xa7),'userCenterDisplayName':a72_0xd58be8(0x8f),'skipNpxSkillsEnvSuffix':'SKIP_NPX_SKILLS','domains':{'production':{'user':'https://user.lovrabet.com','api':'https://api.lovrabet.com','runtime':a72_0xd58be8(0xa2),'skillhub':a72_0xd58be8(0x94)},'nonProduction':{'user':a72_0xd58be8(0x99),'api':a72_0xd58be8(0x96),'runtime':a72_0xd58be8(0xa8),'skillhub':'https://skills-daily.lovrabet.com'}},'accessKeyCreatePath':'/user/ak'};export function productEnvName(_0x5af5db){return PRODUCT_CONFIG['envPrefix']+'_'+_0x5af5db;}function a72_0x2a4c(){const _0x45d497=['Lovrabet\x20Runtime\x20CLI','RABETBASE','3OrYvdM','1818612FHdBLx','.lovrabetrc','https://runtime.lovrabet.com','2046976gPMqGV','https://registry.npmjs.org','12332zyoemJ','389542KjDcJz','cli:lovrabet-runtime','https://daily-runtime.lovrabet.com','1180AlpjpR','map','lovrabet/lovrabet-cli','435931OGZaes','Lovrabet\x20User\x20Center','9008410vsaXga','22wsPZmY','170618BqvwMj','.lovrabet','https://skills.lovrabet.com','6WWsPba','https://daily-api.lovrabet.com','.lovrabet-runtime.log','LOVRABET','https://user-daily.lovrabet.com','legacyEnvPrefixes','.lovrabet.json','@lovrabet/lovrabet-cli'];a72_0x2a4c=function(){return _0x45d497;};return a72_0x2a4c();}export function productEnvNames(_0x4a4d27){const _0x331b50=a72_0xd58be8;return[productEnvName(_0x4a4d27),...PRODUCT_CONFIG[_0x331b50(0x9a)][_0x331b50(0xaa)](_0x368945=>_0x368945+'_'+_0x4a4d27)];}export function productEnv(_0x16b527){for(const _0x212318 of productEnvNames(_0x16b527)){const _0x4a65cf=process.env[_0x212318];if(_0x4a65cf!==undefined)return _0x4a65cf;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a73_0x228bb5=a73_0x8184;(function(_0x19927f,_0x43a43b){const _0x38fc71=a73_0x8184,_0x4c4fa0=_0x19927f();while(!![]){try{const _0x4e2ded=parseInt(_0x38fc71(0x1cc))/0x1+parseInt(_0x38fc71(0x1c9))/0x2*(-parseInt(_0x38fc71(0x1c6))/0x3)+-parseInt(_0x38fc71(0x1c5))/0x4*(-parseInt(_0x38fc71(0x1ce))/0x5)+parseInt(_0x38fc71(0x1c8))/0x6+-parseInt(_0x38fc71(0x1c7))/0x7*(-parseInt(_0x38fc71(0x1d0))/0x8)+-parseInt(_0x38fc71(0x1cf))/0x9*(-parseInt(_0x38fc71(0x1cb))/0xa)+-parseInt(_0x38fc71(0x1cd))/0xb;if(_0x4e2ded===_0x43a43b)break;else _0x4c4fa0['push'](_0x4c4fa0['shift']());}catch(_0x3e92e1){_0x4c4fa0['push'](_0x4c4fa0['shift']());}}}(a73_0xc8f7,0x4c301));export const RISK_LEVEL_VALUES=['read',a73_0x228bb5(0x1ca),'high-risk-write'];function a73_0x8184(_0x52da45,_0x527489){_0x52da45=_0x52da45-0x1c5;const _0xc8f71d=a73_0xc8f7();let _0x8184ab=_0xc8f71d[_0x52da45];return _0x8184ab;}function a73_0xc8f7(){const _0x281e7c=['27632MEmXXI','557616LxfWEa','678986VJxBBO','2626506YKXXEq','2meHNGA','write','1725910OtLouF','534553zivilb','14415280IzKyXb','90QTHNmp','27raOToW','16XfSbiU'];a73_0xc8f7=function(){return _0x281e7c;};return a73_0xc8f7();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a74_0x47fc(){const _0x5634f8=['32862faLCmP','71703BDcGfO','430122hyGzsy','production','1500095NvPGdv','76JbPAgb','112ojQsxy','1956788ZIOMOw','21BFpOnQ','3981YAgjeV','accessKeyCreatePath','15919930fRaoja'];a74_0x47fc=function(){return _0x5634f8;};return a74_0x47fc();}const a74_0x453a01=a74_0x32b4;(function(_0x134e68,_0x5aad2f){const _0x102e1d=a74_0x32b4,_0xbd8ca5=_0x134e68();while(!![]){try{const _0x1330c6=-parseInt(_0x102e1d(0x1d5))/0x1+parseInt(_0x102e1d(0x1cc))/0x2*(parseInt(_0x102e1d(0x1d0))/0x3)+-parseInt(_0x102e1d(0x1ce))/0x4+-parseInt(_0x102e1d(0x1cb))/0x5+-parseInt(_0x102e1d(0x1d3))/0x6*(-parseInt(_0x102e1d(0x1cf))/0x7)+parseInt(_0x102e1d(0x1cd))/0x8*(-parseInt(_0x102e1d(0x1d4))/0x9)+parseInt(_0x102e1d(0x1d2))/0xa;if(_0x1330c6===_0x5aad2f)break;else _0xbd8ca5['push'](_0xbd8ca5['shift']());}catch(_0x4d6058){_0xbd8ca5['push'](_0xbd8ca5['shift']());}}}(a74_0x47fc,0x50126));function a74_0x32b4(_0x406514,_0x2f828b){_0x406514=_0x406514-0x1cb;const _0x47fc44=a74_0x47fc();let _0x32b46c=_0x47fc44[_0x406514];return _0x32b46c;}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG['domains'][a74_0x453a01(0x1d6)]['user']+PRODUCT_CONFIG[a74_0x453a01(0x1d1)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a75_0x4c5faa=a75_0x1f2e;(function(_0x3f039e,_0x38d72e){const _0x36482b=a75_0x1f2e,_0x4620f0=_0x3f039e();while(!![]){try{const _0x141d98=parseInt(_0x36482b(0x17e))/0x1*(-parseInt(_0x36482b(0x160))/0x2)+-parseInt(_0x36482b(0x14f))/0x3+parseInt(_0x36482b(0x13d))/0x4*(-parseInt(_0x36482b(0x135))/0x5)+-parseInt(_0x36482b(0x178))/0x6*(parseInt(_0x36482b(0x162))/0x7)+-parseInt(_0x36482b(0x158))/0x8+parseInt(_0x36482b(0x132))/0x9*(-parseInt(_0x36482b(0x168))/0xa)+parseInt(_0x36482b(0x16f))/0xb*(parseInt(_0x36482b(0x17d))/0xc);if(_0x141d98===_0x38d72e)break;else _0x4620f0['push'](_0x4620f0['shift']());}catch(_0x497db1){_0x4620f0['push'](_0x4620f0['shift']());}}}(a75_0x16a1,0x328ff));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[a75_0x4c5faa(0x138)];function a75_0x1f2e(_0x4835d6,_0x458870){_0x4835d6=_0x4835d6-0x132;const _0x16a1d8=a75_0x16a1();let _0x1f2e93=_0x16a1d8[_0x4835d6];return _0x1f2e93;}export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a75_0x4c5faa(0x170)];function resolveConfigPath(_0x551e4c){for(const _0x569e73 of CONFIG_NAMES){const _0x550ab6=resolve(_0x551e4c,_0x569e73);if(existsSync(_0x550ab6))return _0x550ab6;}return undefined;}export function resolveWriteConfigPath(_0x15c4a6){const _0x440697=a75_0x4c5faa,_0x9fefbb=_0x15c4a6===_0x440697(0x141)?process['cwd']():homedir(),_0x5f3422=resolveConfigPath(_0x9fefbb);return _0x5f3422??resolve(_0x9fefbb,NEW_CONFIG_NAME);}export function readConfigFile(_0x427c8d){const _0x46aea9=a75_0x4c5faa;try{if(existsSync(_0x427c8d)){const _0x7a9f11=readFileSync(_0x427c8d,{'encoding':_0x46aea9(0x15f)});if(_0x7a9f11){const _0x10cca9=JSON['parse'](_0x7a9f11);return migrateOnlineEnv(_0x427c8d,_0x10cca9),_0x10cca9;}}}catch{}return{};}function migrateOnlineEnv(_0xe510ab,_0x366a1d){const _0x6b3542=a75_0x4c5faa;let _0xc8a6e3=![];_0x366a1d[_0x6b3542(0x16b)]==='online'&&(_0x366a1d['env']=_0x6b3542(0x14e),_0xc8a6e3=!![]);if(_0x366a1d['apps']&&typeof _0x366a1d['apps']===_0x6b3542(0x16e))for(const _0x494c0d of Object[_0x6b3542(0x145)](_0x366a1d[_0x6b3542(0x16a)])){_0x494c0d&&_0x494c0d[_0x6b3542(0x16b)]===_0x6b3542(0x15a)&&(_0x494c0d[_0x6b3542(0x16b)]=_0x6b3542(0x14e),_0xc8a6e3=!![]);}if(_0xc8a6e3)try{writeConfigFile(_0xe510ab,_0x366a1d);}catch{}}export function writeConfigFile(_0x120b74,_0x5afd66){const _0x4411c2=a75_0x4c5faa,_0x18500a=dirname(_0x120b74);!existsSync(_0x18500a)&&mkdirSync(_0x18500a,{'recursive':!![]});const _0x3cedf5=_0x120b74+'.tmp';try{writeFileSync(_0x3cedf5,JSON['stringify'](_0x5afd66,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x3cedf5,_0x120b74);}catch(_0xc90843){if(_0xc90843[_0x4411c2(0x133)]===_0x4411c2(0x153)||_0xc90843['code']===_0x4411c2(0x172)||_0xc90843[_0x4411c2(0x133)]==='EACCES'){writeFileSync(_0x120b74,JSON[_0x4411c2(0x14d)](_0x5afd66,null,0x2)+'\x0a',{'encoding':_0x4411c2(0x15f)});try{unlinkSync(_0x3cedf5);}catch{}}else throw _0xc90843;}}catch(_0xbb1691){try{unlinkSync(_0x3cedf5);}catch{}throw _0xbb1691;}}export function isNonInteractiveMode(_0x329bc9){const _0x4ef3f3=a75_0x4c5faa;return!!(_0x329bc9[_0x4ef3f3(0x156)]||_0x329bc9['ci']||productEnvNames('CI')[_0x4ef3f3(0x174)](_0x4f5651=>process.env[_0x4f5651]===_0x4ef3f3(0x137))||process.env.CI===_0x4ef3f3(0x137)||!process[_0x4ef3f3(0x159)]['isTTY']||!isStdinRawModeSupported());}function a75_0x16a1(){const _0x4c5e90=['find','values','appcode','PAGE_SIZE','isRaw','high-risk-write','missing','maxRisk','riskLevel','stringify','production','471402azvFzv','string','ENV','message','EPERM','argv','apiDomain','nonInteractive','app','1173984IQQFNT','stdout','online','FORMAT','defaultApp','development','explicit','utf8','4klPtHP','isTTY','252KOijpq','setLogPath','setRawMode','local-alias','setRawCommand','APPCODE','435170nxWGOa','empty','apps','env','join','cwd','object','22CevtmN','newConfigFileName','./constant/domain.js','EXDEV','accessKey','some','daily','parse','globalConfig','24018jzddYc','global','trim','read','VERBOSE','7562196XdaMPX','104729knRHkf','runtimeDomain','projectConfig','45GBkIRQ','code','stdin','6855dwnTGP','format','true','configFileNames','error','inherit','top-level','host','520UcPyMI','cache','write','ACCESS_KEY','project','./constant/env.js','raw'];a75_0x16a1=function(){return _0x4c5e90;};return a75_0x16a1();}function isStdinRawModeSupported(){const _0x3a5047=a75_0x4c5faa;if(!process[_0x3a5047(0x134)][_0x3a5047(0x161)])return![];try{const _0x287572=process['stdin'][_0x3a5047(0x148)];return process[_0x3a5047(0x134)][_0x3a5047(0x164)](!![]),process[_0x3a5047(0x134)][_0x3a5047(0x164)](_0x287572??![]),!![];}catch{return![];}}export async function createContext(_0x285173){const _0x1e040c=a75_0x4c5faa,_0x2773d2=readRawConfig(),_0x34f513=buildConfig(_0x2773d2,_0x285173);await initGlobalEnvironment(_0x34f513);const {getUserDomain:_0x2ea83a,getApiDomain:_0x59d74d}=await import('./constant/domain.js'),_0x1601f0={'apiDomain':_0x59d74d(),'userDomain':_0x2ea83a()},_0x51dfc3=await buildAuth(_0x34f513);logger[_0x1e040c(0x163)](process['cwd']());const _0x381634=(CLI_BIN_NAME+'\x20'+process[_0x1e040c(0x154)]['slice'](0x2)[_0x1e040c(0x16c)]('\x20'))[_0x1e040c(0x17a)]();logger[_0x1e040c(0x166)](_0x381634);const _0x16d8ac=isNonInteractiveMode(_0x285173);return{'config':_0x34f513,'auth':_0x51dfc3,'logger':logger,'env':_0x1601f0,'nonInteractive':_0x16d8ac};}export function buildConfigFromFlags(_0x4909bf){return buildConfig(readRawConfig(),_0x4909bf);}export function getLocalAppAliases(_0x322e99){const _0x232630=a75_0x4c5faa;return _0x322e99['apps']&&typeof _0x322e99[_0x232630(0x16a)]===_0x232630(0x16e)?_0x322e99[_0x232630(0x16a)]:{};}export function resolveLocalAppAliasCode(_0xf79516,_0x20d0c9){const _0x195039=a75_0x4c5faa;if(!_0x20d0c9)return undefined;const _0x3b42c9=getLocalAppAliases(_0xf79516)[_0x20d0c9],_0x532ddb=_0x3b42c9?.[_0x195039(0x146)];return typeof _0x532ddb==='string'&&_0x532ddb[_0x195039(0x17a)]()?_0x532ddb[_0x195039(0x17a)]():undefined;}export function readAppCodeFromConfig(){const _0x377ca4=a75_0x4c5faa,_0x1538a1=readRawConfig(),_0x5bff94=_0x1538a1[_0x377ca4(0x146)]??_0x1538a1[_0x377ca4(0x157)];if(typeof _0x5bff94===_0x377ca4(0x150)&&_0x5bff94[_0x377ca4(0x17a)]())return _0x5bff94[_0x377ca4(0x17a)]();const _0x150af4=resolveLocalAppAliasCode(_0x1538a1,typeof _0x1538a1[_0x377ca4(0x15c)]===_0x377ca4(0x150)?_0x1538a1[_0x377ca4(0x15c)]:undefined);if(_0x150af4)return _0x150af4;const _0x40add3=normalizeEnv(String(_0x1538a1[_0x377ca4(0x16b)]||_0x377ca4(0x14e))),_0x3288ef=isDaily(_0x40add3)?_0x377ca4(0x175):isDev(_0x40add3)?_0x377ca4(0x15d):_0x377ca4(0x14e),_0x2d5d0b=resolveCachedAppCode(typeof _0x1538a1[_0x377ca4(0x15c)]===_0x377ca4(0x150)?_0x1538a1[_0x377ca4(0x15c)]:undefined,_0x3288ef,typeof _0x1538a1[_0x377ca4(0x173)]===_0x377ca4(0x150)?_0x1538a1['accessKey']:undefined);if(_0x2d5d0b)return _0x2d5d0b;const _0x35f54f=Object[_0x377ca4(0x145)](getLocalAppAliases(_0x1538a1))[_0x377ca4(0x144)](_0x129f3e=>_0x129f3e?.[_0x377ca4(0x146)]);return typeof _0x35f54f?.[_0x377ca4(0x146)]===_0x377ca4(0x150)&&_0x35f54f['appcode'][_0x377ca4(0x17a)]()?_0x35f54f[_0x377ca4(0x146)][_0x377ca4(0x17a)]():undefined;}export function readScopedConfig(_0x522b0c){const _0x251948=a75_0x4c5faa,_0x3b5c10=_0x522b0c['global']?_0x251948(0x179):_0x251948(0x141);return readConfigFile(resolveWriteConfigPath(_0x3b5c10));}export function writeScopedConfig(_0x18ee65,_0x1d6874){const _0x2a371c=a75_0x4c5faa,_0x370bdb=_0x1d6874[_0x2a371c(0x179)]?_0x2a371c(0x179):_0x2a371c(0x141);writeConfigFile(resolveWriteConfigPath(_0x370bdb),_0x18ee65);}export async function initGlobalEnvironment(_0x293626){const _0x40f19c=a75_0x4c5faa,{initEnv:_0x226552}=await import(_0x40f19c(0x142));_0x226552(_0x293626[_0x40f19c(0x16b)]);const {initDomains:_0x4d4d4d}=await import(_0x40f19c(0x171));_0x4d4d4d({'apiDomain':_0x293626[_0x40f19c(0x143)][_0x40f19c(0x155)]||_0x293626[_0x40f19c(0x143)][_0x40f19c(0x13c)]||undefined,'userDomain':_0x293626[_0x40f19c(0x143)]['userDomain']||undefined,'runtimeDomain':_0x293626[_0x40f19c(0x143)][_0x40f19c(0x17f)]||undefined,'skillHubDomain':_0x293626[_0x40f19c(0x143)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){const _0x17390e=a75_0x4c5faa;return resolveConfigPath(process[_0x17390e(0x16d)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x3eaaec){const _0x1e63c7=a75_0x4c5faa;if(!existsSync(_0x3eaaec))return{'status':_0x1e63c7(0x14a)};try{const _0x2f90a7=readFileSync(_0x3eaaec,{'encoding':_0x1e63c7(0x15f)});if(!_0x2f90a7?.[_0x1e63c7(0x17a)]())return{'status':_0x1e63c7(0x169)};const _0x596af8=JSON[_0x1e63c7(0x176)](_0x2f90a7);return{'status':'ok','data':_0x596af8};}catch(_0x3043f3){return{'status':_0x1e63c7(0x139),'message':_0x3043f3 instanceof Error?_0x3043f3[_0x1e63c7(0x152)]:String(_0x3043f3)};}}export function loadRawConfigLayers(_0x21b64e){const _0x59a286=a75_0x4c5faa;let _0x149156={},_0x2eed6d={},_0x2ca446,_0x58052e;try{_0x2ca446=resolveConfigPath(homedir());if(_0x2ca446){const _0x3bbbc8=readFileSync(_0x2ca446,{'encoding':'utf8'});if(_0x3bbbc8)_0x149156=JSON['parse'](_0x3bbbc8);}}catch{}try{const _0x5b5c68=_0x21b64e||process[_0x59a286(0x16d)]();_0x58052e=resolveConfigPath(_0x5b5c68);if(_0x58052e){const _0x5974fa=readFileSync(_0x58052e,{'encoding':_0x59a286(0x15f)});if(_0x5974fa)_0x2eed6d=JSON[_0x59a286(0x176)](_0x5974fa);}}catch{}return{'globalPath':_0x2ca446,'projectPath':_0x58052e,'globalConfig':_0x149156,'projectConfig':_0x2eed6d};}function mergeRawConfigLayers(_0x21174c){const _0x6dc57d=a75_0x4c5faa,{globalConfig:_0x5a21a4,projectConfig:_0x39fb1b}=_0x21174c;if(_0x39fb1b[_0x6dc57d(0x13a)]===![]){const _0x38bd91={..._0x39fb1b};return delete _0x38bd91[_0x6dc57d(0x13a)],_0x38bd91;}const _0x51e679={..._0x5a21a4,..._0x39fb1b};if('defaultApp'in _0x39fb1b)_0x51e679['defaultApp']=_0x39fb1b[_0x6dc57d(0x15c)];else _0x5a21a4[_0x6dc57d(0x15c)]&&(_0x51e679[_0x6dc57d(0x15c)]=_0x5a21a4[_0x6dc57d(0x15c)]);return _0x51e679;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x17d282){return mergeRawConfigLayers(loadRawConfigLayers(_0x17d282));}export function readRawConfigWithLayers(_0x5b8369){const _0x3347f1=loadRawConfigLayers(_0x5b8369);return{'config':mergeRawConfigLayers(_0x3347f1),'layers':_0x3347f1};}export function resolveDefaultAppSource(_0x39fb87){const _0x43a9c5=a75_0x4c5faa;if(_0x43a9c5(0x15c)in _0x39fb87[_0x43a9c5(0x180)])return'project';if(_0x39fb87['projectConfig'][_0x43a9c5(0x13a)]===![])return null;if(_0x39fb87[_0x43a9c5(0x177)][_0x43a9c5(0x15c)])return _0x43a9c5(0x179);return null;}function buildConfig(_0x377e9d,_0x3b4fb0){const _0x80601a=a75_0x4c5faa,_0x3ffab8=_0x377e9d[_0x80601a(0x15c)]||undefined,_0x1342f9=_0x3b4fb0[_0x80601a(0x157)]||env('APP')||undefined,_0x35a1c8=_0x1342f9||_0x3ffab8||undefined,_0x38ea11=env(_0x80601a(0x140))||_0x377e9d[_0x80601a(0x173)]||undefined,_0x6287a8=_0x3b4fb0[_0x80601a(0x16b)]||env(_0x80601a(0x151))||_0x377e9d['env']||DEFAULT_CONFIG_VALUES[_0x80601a(0x16b)],_0x100a9d=normalizeEnv(String(_0x6287a8)),_0x530fce=isDaily(_0x100a9d)?_0x80601a(0x175):isDev(_0x100a9d)?'development':_0x80601a(0x14e),_0xaca557=typeof _0x3b4fb0[_0x80601a(0x146)]===_0x80601a(0x150)?_0x3b4fb0[_0x80601a(0x146)]:undefined,_0x9616e2=env(_0x80601a(0x167)),_0xa23a6=_0x1342f9?undefined:_0x377e9d[_0x80601a(0x146)]||_0x377e9d[_0x80601a(0x157)]||undefined,_0x1aabf1=_0x1342f9||(_0xa23a6?undefined:_0x3ffab8),_0x168e91=resolveLocalAppAliasCode(_0x377e9d,_0x1aabf1),_0x35d9e3=resolveCachedAppCode(_0x1aabf1,_0x530fce,_0x38ea11),_0x3d01d2=_0xaca557||_0x9616e2||_0xa23a6||_0x168e91||_0x35d9e3||undefined,_0x3231a9=_0xaca557?_0x80601a(0x15e):_0x9616e2?_0x80601a(0x16b):_0xa23a6?_0x80601a(0x13b):_0x168e91?_0x80601a(0x165):_0x35d9e3?_0x80601a(0x13e):undefined,_0x7a7aaf=_0x377e9d['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x178b9f=undefined,_0x57d1bc=_0x3b4fb0[_0x80601a(0x136)]||env(_0x80601a(0x15b))||_0x377e9d[_0x80601a(0x136)],_0x4f06f4=normalizeLegacyOutputFormat(_0x57d1bc),_0x65f1ce=env(_0x80601a(0x147))||_0x377e9d['pageSize'],_0x166e61=_0x65f1ce?Number(_0x65f1ce)||undefined:undefined,_0x565769=_0x377e9d[_0x80601a(0x14c)]||_0x377e9d[_0x80601a(0x14b)],_0x3b964f=_0x565769===_0x80601a(0x17b)||_0x565769===_0x80601a(0x13f)||_0x565769===_0x80601a(0x149)?_0x565769:DEFAULT_CONFIG_VALUES[_0x80601a(0x14c)],_0x3e97a1=env(_0x80601a(0x17c)),_0x497e97=_0x3e97a1==='1'||_0x3e97a1===_0x80601a(0x137);return{'appCode':typeof _0x3d01d2===_0x80601a(0x150)&&_0x3d01d2[_0x80601a(0x17a)]()?_0x3d01d2[_0x80601a(0x17a)]():undefined,'appCodeSource':_0x3231a9,'env':_0x530fce,'locale':_0x7a7aaf,'cookie':_0x178b9f,'accessKey':_0x38ea11,'format':_0x4f06f4,'pageSize':_0x166e61,'riskLevel':_0x3b964f,'verbose':_0x497e97,'defaultApp':_0x3ffab8,'currentApp':typeof _0x35a1c8===_0x80601a(0x150)?_0x35a1c8:undefined,'raw':_0x377e9d};}function env(_0x366f6a){return productEnv(_0x366f6a);}async function buildAuth(_0x15f496){const _0x47276e='',_0x17ed3c=!!_0x15f496['accessKey'];return{'cookie':_0x47276e,'isLoggedIn':_0x17ed3c,async 'getOrLogin'(){if(_0x17ed3c)return _0x47276e;throw CliErrors['authRequired']();}};}
|
|
1
|
+
const a75_0x30f786=a75_0x259c;(function(_0x182d6a,_0xdd303e){const _0x32f9d8=a75_0x259c,_0x4b1e1b=_0x182d6a();while(!![]){try{const _0x480c7c=-parseInt(_0x32f9d8(0x20c))/0x1*(-parseInt(_0x32f9d8(0x1f1))/0x2)+parseInt(_0x32f9d8(0x222))/0x3+-parseInt(_0x32f9d8(0x1f4))/0x4*(-parseInt(_0x32f9d8(0x200))/0x5)+-parseInt(_0x32f9d8(0x212))/0x6*(parseInt(_0x32f9d8(0x218))/0x7)+-parseInt(_0x32f9d8(0x20e))/0x8*(parseInt(_0x32f9d8(0x202))/0x9)+-parseInt(_0x32f9d8(0x21a))/0xa+parseInt(_0x32f9d8(0x210))/0xb*(parseInt(_0x32f9d8(0x1ea))/0xc);if(_0x480c7c===_0xdd303e)break;else _0x4b1e1b['push'](_0x4b1e1b['shift']());}catch(_0x2d4d3e){_0x4b1e1b['push'](_0x4b1e1b['shift']());}}}(a75_0x1530,0x5e552));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[a75_0x30f786(0x203)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a75_0x30f786(0x1e7)];function resolveConfigPath(_0x54150d){for(const _0x5c55fb of CONFIG_NAMES){const _0x4f3505=resolve(_0x54150d,_0x5c55fb);if(existsSync(_0x4f3505))return _0x4f3505;}return undefined;}export function resolveWriteConfigPath(_0x1757f8){const _0x439e4d=a75_0x30f786,_0x46491f=_0x1757f8===_0x439e4d(0x216)?process[_0x439e4d(0x1ff)]():homedir(),_0x203134=resolveConfigPath(_0x46491f);return _0x203134??resolve(_0x46491f,NEW_CONFIG_NAME);}export function readConfigFile(_0x3b0004){const _0x16c9ca=a75_0x30f786;try{if(existsSync(_0x3b0004)){const _0x189181=readFileSync(_0x3b0004,{'encoding':_0x16c9ca(0x21c)});if(_0x189181){const _0x56534b=JSON['parse'](_0x189181);return migrateOnlineEnv(_0x3b0004,_0x56534b),_0x56534b;}}}catch{}return{};}function a75_0x1530(){const _0x2c02f7=['some','APPCODE','stdin','346734XkjlMA','join','APP','4PRSDlI','missing','production','online','apiDomain','app','env','accessKey','error','isRaw','setLogPath','cwd','1552645POAKfl','high-risk-write','301203IBBirf','configFileNames','values','daily','parse','./constant/domain.js','projectConfig','setRawMode','defaultApp','apps','2qPcGwP','find','136WuEUxl','cache','154MvMmrU','object','4734NASqSg','EACCES','message','inherit','project','locale','301HpYfvC','maxRisk','7150720WQzDDH','skillHubDomain','utf8','format','string','PAGE_SIZE','EPERM','runtimeDomain','513201WtFOdj','global','globalConfig','trim','code','riskLevel','./constant/env.js','.tmp','local-alias','stringify','isTTY','raw','newConfigFileName','stdout','true','750852IMAZwM','slice','ENV','appcode'];a75_0x1530=function(){return _0x2c02f7;};return a75_0x1530();}function migrateOnlineEnv(_0x34d5f7,_0x188a59){const _0x5f2042=a75_0x30f786;let _0x120d6d=![];_0x188a59[_0x5f2042(0x1fa)]===_0x5f2042(0x1f7)&&(_0x188a59[_0x5f2042(0x1fa)]=_0x5f2042(0x1f6),_0x120d6d=!![]);if(_0x188a59[_0x5f2042(0x20b)]&&typeof _0x188a59['apps']==='object')for(const _0x593ecd of Object[_0x5f2042(0x204)](_0x188a59[_0x5f2042(0x20b)])){_0x593ecd&&_0x593ecd[_0x5f2042(0x1fa)]===_0x5f2042(0x1f7)&&(_0x593ecd[_0x5f2042(0x1fa)]=_0x5f2042(0x1f6),_0x120d6d=!![]);}if(_0x120d6d)try{writeConfigFile(_0x34d5f7,_0x188a59);}catch{}}export function writeConfigFile(_0x1264b1,_0x4e9833){const _0x4633ae=a75_0x30f786,_0x2be2eb=dirname(_0x1264b1);!existsSync(_0x2be2eb)&&mkdirSync(_0x2be2eb,{'recursive':!![]});const _0x154373=_0x1264b1+_0x4633ae(0x1e2);try{writeFileSync(_0x154373,JSON[_0x4633ae(0x1e4)](_0x4e9833,null,0x2)+'\x0a',{'encoding':_0x4633ae(0x21c),'mode':0x180});try{renameSync(_0x154373,_0x1264b1);}catch(_0x5d59ff){if(_0x5d59ff['code']===_0x4633ae(0x220)||_0x5d59ff[_0x4633ae(0x1df)]==='EXDEV'||_0x5d59ff['code']===_0x4633ae(0x213)){writeFileSync(_0x1264b1,JSON[_0x4633ae(0x1e4)](_0x4e9833,null,0x2)+'\x0a',{'encoding':_0x4633ae(0x21c)});try{unlinkSync(_0x154373);}catch{}}else throw _0x5d59ff;}}catch(_0x4d6aa0){try{unlinkSync(_0x154373);}catch{}throw _0x4d6aa0;}}export function isNonInteractiveMode(_0x56d42e){const _0x513265=a75_0x30f786;return!!(_0x56d42e['nonInteractive']||_0x56d42e['ci']||productEnvNames('CI')[_0x513265(0x1ee)](_0xf4ff88=>process.env[_0xf4ff88]===_0x513265(0x1e9))||process.env.CI==='true'||!process[_0x513265(0x1e8)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x4f688f=a75_0x30f786;if(!process['stdin'][_0x4f688f(0x1e5)])return![];try{const _0x187631=process[_0x4f688f(0x1f0)][_0x4f688f(0x1fd)];return process['stdin'][_0x4f688f(0x209)](!![]),process[_0x4f688f(0x1f0)]['setRawMode'](_0x187631??![]),!![];}catch{return![];}}export async function createContext(_0x5055ba){const _0x37de20=a75_0x30f786,_0x6a1a69=readRawConfig(),_0x49154e=buildConfig(_0x6a1a69,_0x5055ba);await initGlobalEnvironment(_0x49154e);const {getUserDomain:_0xd98ca2,getApiDomain:_0x4ea014}=await import(_0x37de20(0x207)),_0x399c55={'apiDomain':_0x4ea014(),'userDomain':_0xd98ca2()},_0x446ee6=await buildAuth(_0x49154e);logger[_0x37de20(0x1fe)](process[_0x37de20(0x1ff)]());const _0x331829=(CLI_BIN_NAME+'\x20'+process['argv'][_0x37de20(0x1eb)](0x2)[_0x37de20(0x1f2)]('\x20'))[_0x37de20(0x1de)]();logger['setRawCommand'](_0x331829);const _0x5212d8=isNonInteractiveMode(_0x5055ba);return{'config':_0x49154e,'auth':_0x446ee6,'logger':logger,'env':_0x399c55,'nonInteractive':_0x5212d8};}export function buildConfigFromFlags(_0x200ce5){return buildConfig(readRawConfig(),_0x200ce5);}export function getLocalAppAliases(_0x427e23){const _0x17b16b=a75_0x30f786;return _0x427e23[_0x17b16b(0x20b)]&&typeof _0x427e23['apps']===_0x17b16b(0x211)?_0x427e23[_0x17b16b(0x20b)]:{};}export function resolveLocalAppAliasCode(_0x3536b5,_0x2cb754){const _0xb082d=a75_0x30f786;if(!_0x2cb754)return undefined;const _0x260a2f=getLocalAppAliases(_0x3536b5)[_0x2cb754],_0x146549=_0x260a2f?.[_0xb082d(0x1ed)];return typeof _0x146549===_0xb082d(0x21e)&&_0x146549[_0xb082d(0x1de)]()?_0x146549['trim']():undefined;}export function readAppCodeFromConfig(){const _0x2b681d=a75_0x30f786,_0x53f3fb=readRawConfig(),_0x52adf3=_0x53f3fb['appcode']??_0x53f3fb[_0x2b681d(0x1f9)];if(typeof _0x52adf3===_0x2b681d(0x21e)&&_0x52adf3[_0x2b681d(0x1de)]())return _0x52adf3[_0x2b681d(0x1de)]();const _0x506514=resolveLocalAppAliasCode(_0x53f3fb,typeof _0x53f3fb['defaultApp']==='string'?_0x53f3fb['defaultApp']:undefined);if(_0x506514)return _0x506514;const _0x2f0cb4=normalizeEnv(String(_0x53f3fb[_0x2b681d(0x1fa)]||_0x2b681d(0x1f6))),_0xacabb3=isDaily(_0x2f0cb4)?_0x2b681d(0x205):isDev(_0x2f0cb4)?'development':_0x2b681d(0x1f6),_0x46f55e=resolveCachedAppCode(typeof _0x53f3fb[_0x2b681d(0x20a)]===_0x2b681d(0x21e)?_0x53f3fb[_0x2b681d(0x20a)]:undefined,_0xacabb3,typeof _0x53f3fb['accessKey']===_0x2b681d(0x21e)?_0x53f3fb[_0x2b681d(0x1fb)]:undefined);if(_0x46f55e)return _0x46f55e;const _0x54c001=Object[_0x2b681d(0x204)](getLocalAppAliases(_0x53f3fb))[_0x2b681d(0x20d)](_0x3ac520=>_0x3ac520?.['appcode']);return typeof _0x54c001?.[_0x2b681d(0x1ed)]===_0x2b681d(0x21e)&&_0x54c001[_0x2b681d(0x1ed)][_0x2b681d(0x1de)]()?_0x54c001['appcode']['trim']():undefined;}export function readScopedConfig(_0x26ac12){const _0x1854c2=a75_0x30f786,_0x194a77=_0x26ac12['global']?_0x1854c2(0x223):'project';return readConfigFile(resolveWriteConfigPath(_0x194a77));}export function writeScopedConfig(_0x558681,_0x459eff){const _0x249379=a75_0x30f786,_0x43fb09=_0x459eff[_0x249379(0x223)]?_0x249379(0x223):'project';writeConfigFile(resolveWriteConfigPath(_0x43fb09),_0x558681);}export async function initGlobalEnvironment(_0x565da1){const _0x378b11=a75_0x30f786,{initEnv:_0x3b8a04}=await import(_0x378b11(0x1e1));_0x3b8a04(_0x565da1[_0x378b11(0x1fa)]);const {initDomains:_0x111381}=await import(_0x378b11(0x207));_0x111381({'apiDomain':_0x565da1[_0x378b11(0x1e6)][_0x378b11(0x1f8)]||_0x565da1[_0x378b11(0x1e6)]['host']||undefined,'userDomain':_0x565da1[_0x378b11(0x1e6)]['userDomain']||undefined,'runtimeDomain':_0x565da1[_0x378b11(0x1e6)][_0x378b11(0x221)]||undefined,'skillHubDomain':_0x565da1[_0x378b11(0x1e6)][_0x378b11(0x21b)]||undefined});}function a75_0x259c(_0xbd4f05,_0x5ec939){_0xbd4f05=_0xbd4f05-0x1dd;const _0x1530e8=a75_0x1530();let _0x259cd0=_0x1530e8[_0xbd4f05];return _0x259cd0;}export function getProjectConfigPath(){const _0x3e730d=a75_0x30f786;return resolveConfigPath(process[_0x3e730d(0x1ff)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x423aa8){const _0x26fab2=a75_0x30f786;if(!existsSync(_0x423aa8))return{'status':_0x26fab2(0x1f5)};try{const _0x353ce2=readFileSync(_0x423aa8,{'encoding':_0x26fab2(0x21c)});if(!_0x353ce2?.[_0x26fab2(0x1de)]())return{'status':'empty'};const _0x3ba53e=JSON['parse'](_0x353ce2);return{'status':'ok','data':_0x3ba53e};}catch(_0x5363c9){return{'status':_0x26fab2(0x1fc),'message':_0x5363c9 instanceof Error?_0x5363c9[_0x26fab2(0x214)]:String(_0x5363c9)};}}export function loadRawConfigLayers(_0x3d786c){const _0x5155a0=a75_0x30f786;let _0xdcadc5={},_0x2c0fe3={},_0x1790e3,_0x898943;try{_0x1790e3=resolveConfigPath(homedir());if(_0x1790e3){const _0x7107b=readFileSync(_0x1790e3,{'encoding':_0x5155a0(0x21c)});if(_0x7107b)_0xdcadc5=JSON[_0x5155a0(0x206)](_0x7107b);}}catch{}try{const _0x20095f=_0x3d786c||process['cwd']();_0x898943=resolveConfigPath(_0x20095f);if(_0x898943){const _0x63f1e3=readFileSync(_0x898943,{'encoding':'utf8'});if(_0x63f1e3)_0x2c0fe3=JSON[_0x5155a0(0x206)](_0x63f1e3);}}catch{}return{'globalPath':_0x1790e3,'projectPath':_0x898943,'globalConfig':_0xdcadc5,'projectConfig':_0x2c0fe3};}function mergeRawConfigLayers(_0x415700){const _0x1c4d21=a75_0x30f786,{globalConfig:_0x45e792,projectConfig:_0x590555}=_0x415700;if(_0x590555['inherit']===![]){const _0x10914d={..._0x590555};return delete _0x10914d[_0x1c4d21(0x215)],_0x10914d;}const _0x53a8ed={..._0x45e792,..._0x590555};if(_0x1c4d21(0x20a)in _0x590555)_0x53a8ed[_0x1c4d21(0x20a)]=_0x590555['defaultApp'];else _0x45e792[_0x1c4d21(0x20a)]&&(_0x53a8ed[_0x1c4d21(0x20a)]=_0x45e792[_0x1c4d21(0x20a)]);return _0x53a8ed;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x290279){return mergeRawConfigLayers(loadRawConfigLayers(_0x290279));}export function readRawConfigWithLayers(_0x37962e){const _0x55d023=loadRawConfigLayers(_0x37962e);return{'config':mergeRawConfigLayers(_0x55d023),'layers':_0x55d023};}export function resolveDefaultAppSource(_0x3afcb5){const _0x2e8602=a75_0x30f786;if(_0x2e8602(0x20a)in _0x3afcb5['projectConfig'])return _0x2e8602(0x216);if(_0x3afcb5[_0x2e8602(0x208)]['inherit']===![])return null;if(_0x3afcb5[_0x2e8602(0x1dd)]['defaultApp'])return _0x2e8602(0x223);return null;}function buildConfig(_0x41b9df,_0x2889b3){const _0x48c90a=a75_0x30f786,_0x2548d2=_0x41b9df[_0x48c90a(0x20a)]||undefined,_0x10965e=_0x2889b3[_0x48c90a(0x1f9)]||env(_0x48c90a(0x1f3))||undefined,_0x541caa=_0x10965e||_0x2548d2||undefined,_0x16306d=env('ACCESS_KEY')||_0x41b9df['accessKey']||undefined,_0x148006=_0x2889b3[_0x48c90a(0x1fa)]||env(_0x48c90a(0x1ec))||_0x41b9df[_0x48c90a(0x1fa)]||DEFAULT_CONFIG_VALUES[_0x48c90a(0x1fa)],_0x3ce95c=normalizeEnv(String(_0x148006)),_0x3492b5=isDaily(_0x3ce95c)?_0x48c90a(0x205):isDev(_0x3ce95c)?'development':_0x48c90a(0x1f6),_0x38e2ec=typeof _0x2889b3[_0x48c90a(0x1ed)]==='string'?_0x2889b3[_0x48c90a(0x1ed)]:undefined,_0x29479a=env(_0x48c90a(0x1ef)),_0x537f5b=_0x10965e?undefined:_0x41b9df[_0x48c90a(0x1ed)]||_0x41b9df['app']||undefined,_0x5ab8bb=_0x10965e||(_0x537f5b?undefined:_0x2548d2),_0xe0135b=resolveLocalAppAliasCode(_0x41b9df,_0x5ab8bb),_0x32341b=resolveCachedAppCode(_0x5ab8bb,_0x3492b5,_0x16306d),_0x5d9450=_0x38e2ec||_0x29479a||_0x537f5b||_0xe0135b||_0x32341b||undefined,_0x131843=_0x38e2ec?'explicit':_0x29479a?_0x48c90a(0x1fa):_0x537f5b?'top-level':_0xe0135b?_0x48c90a(0x1e3):_0x32341b?_0x48c90a(0x20f):undefined,_0x312bf8=_0x41b9df[_0x48c90a(0x217)]||DEFAULT_CONFIG_VALUES[_0x48c90a(0x217)],_0x3f9aea=undefined,_0xf5c677=_0x2889b3[_0x48c90a(0x21d)]||env('FORMAT')||_0x41b9df['format'],_0x4f7d57=normalizeLegacyOutputFormat(_0xf5c677),_0x513cd0=env(_0x48c90a(0x21f))||_0x41b9df['pageSize'],_0x25aefe=_0x513cd0?Number(_0x513cd0)||undefined:undefined,_0x238cd0=_0x41b9df[_0x48c90a(0x1e0)]||_0x41b9df[_0x48c90a(0x219)],_0x23c9c4=_0x238cd0==='read'||_0x238cd0==='write'||_0x238cd0===_0x48c90a(0x201)?_0x238cd0:DEFAULT_CONFIG_VALUES['riskLevel'],_0x453340=env('VERBOSE'),_0x3564b5=_0x453340==='1'||_0x453340==='true';return{'appCode':typeof _0x5d9450===_0x48c90a(0x21e)&&_0x5d9450[_0x48c90a(0x1de)]()?_0x5d9450['trim']():undefined,'appCodeSource':_0x131843,'env':_0x3492b5,'locale':_0x312bf8,'cookie':_0x3f9aea,'accessKey':_0x16306d,'format':_0x4f7d57,'pageSize':_0x25aefe,'riskLevel':_0x23c9c4,'verbose':_0x3564b5,'defaultApp':_0x2548d2,'currentApp':typeof _0x541caa===_0x48c90a(0x21e)?_0x541caa:undefined,'raw':_0x41b9df};}function env(_0xa6d405){return productEnv(_0xa6d405);}async function buildAuth(_0x29e38d){const _0x5e637f='',_0x2ac7e4=!!_0x29e38d['accessKey'];return{'cookie':_0x5e637f,'isLoggedIn':_0x2ac7e4,async 'getOrLogin'(){if(_0x2ac7e4)return _0x5e637f;throw CliErrors['authRequired']();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4e7e3b,_0x41016c){const _0x39d45e=a76_0x348a,_0x5e25aa=_0x4e7e3b();while(!![]){try{const _0x946e99=parseInt(_0x39d45e(0xb3))/0x1+parseInt(_0x39d45e(0xf2))/0x2+-parseInt(_0x39d45e(0x127))/0x3*(parseInt(_0x39d45e(0xcc))/0x4)+-parseInt(_0x39d45e(0x118))/0x5*(-parseInt(_0x39d45e(0x14b))/0x6)+parseInt(_0x39d45e(0xcf))/0x7+-parseInt(_0x39d45e(0x101))/0x8*(parseInt(_0x39d45e(0x12d))/0x9)+parseInt(_0x39d45e(0x125))/0xa*(parseInt(_0x39d45e(0xcb))/0xb);if(_0x946e99===_0x41016c)break;else _0x5e25aa['push'](_0x5e25aa['shift']());}catch(_0x164b8f){_0x5e25aa['push'](_0x5e25aa['shift']());}}}(a76_0x1c5e,0xf3cfa));import{readFile}from'node:fs/promises';import{basename}from'node:path';function a76_0x1c5e(){const _0x21a97c=['?appCode=','url','scope','/api/cli/v1/skills/',',\x20name=','Request\x20timeout:\x20','6orSMMc','download','gmtModified','abort','status','805356qMgBBx','Configure\x20accessKey\x20in\x20','json','/run','topK','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','application/octet-stream','/client/sql/query','example','authRequired','isJson','NAMESPACE_ONLY','description','toString','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','skillName','Personal\x20BFF\x20not\x20found:\x20id=','warnings','/schedules','API\x20error\x20code:\x20','all','apiError','packageBase64','test','22ihggcP','4DwlLJW','/client/runtime-bff/personal/create','favorite','12031922caRYsw','PRIVATE','file','Toolbox\x20API\x20error','/versions/','trim','stringify','searchParams','/client/app/my-apps','string','resolvedSlug','tags','/client/queryFileUrl','/publish','summary','/client/artifact/','content','GET','Knowledge-base\x20entry\x20not\x20found:\x20id=','/update','valid','query','personal','visibility','appName','object','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','data','invokeSource','effective','BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','ownerPreviewVersion','text','skillCode','values','1648742ablQCb','success','/validate','/client/dataset/list','longTerm','type','Toolbox\x20API\x20error:\x20','/download','markdown','application/json','function','signal','Toolbox\x20error\x20code:\x20','/client/ocr','cursor','14529320OQMteQ','replace','arrayBuffer','/client/runtime-bff/personal/list?appCode=','set','boolean','/api/runtime/v1/namespaces/','company','/client/knowledge-base/personal/','skill','Check\x20your\x20credentials\x20and\x20try\x20again.','/client/dataset/get-driven-data?code=','AbortError','/client/artifact/list?','artifactType','isArray','Invalid\x20app\x20config\x20value:\x20key=','SkillHub\x20error\x20code:\x20','version','/client/knowledge-base/personal/create','API\x20error:\x20','/client/bff/endpoint/','/api/v1/skills/','1615430LUcZtD','/execute?appCode=','tableData','SkillHub\x20API\x20error:\x20','displayName','confirmWarnings','name','/client/uploadFile','SQL\x20query\x20not\x20found:\x20','errors','msg','POST','validation','911110VvJujs','/client/user/loginUserInfo','3117198rdKyZN','/api/node-toolbox/','errorMsg','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','Artifact\x20not\x20found:\x20id=','resolvedVersion','9OiPmJm','limit','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/runtime-bff/personal/','application/zip','source','code','errorCode','from','entries','slug','error','items','base64','append','filter','message','namespace','size','appCode','Download\x20failed:\x20','find','newConfigFileName','functionName'];a76_0x1c5e=function(){return _0x21a97c;};return a76_0x1c5e();}import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x32f37e){_activeAK=_0x32f37e||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x34b914){const _0x2ea6a7=a76_0x348a;for(const _0x215902 of _0x34b914){if(typeof _0x215902==='string'&&_0x215902[_0x2ea6a7(0xd4)]())return _0x215902['trim']();}return undefined;}async function decodeResponseBody(_0x45ea53){const _0x543c50=a76_0x348a;if(typeof _0x45ea53[_0x543c50(0xef)]===_0x543c50(0xfc))try{const _0x12c8f4=await _0x45ea53[_0x543c50(0xef)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x12c8f4),'text':_0x12c8f4};}catch{return{'isJson':![],'text':_0x12c8f4[_0x543c50(0xd4)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x45ea53[_0x543c50(0xb5)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x3a60f3,_0x18d813,_0x54514a){const _0x31146c=a76_0x348a,_0x495360=_0x18d813&&typeof _0x18d813==='object'?_0x18d813:{},_0x2903d7=[_0x495360[_0x31146c(0x14f)],_0x495360[_0x31146c(0x133)]][_0x31146c(0x142)](_0x264514=>Number(_0x264514)===0x1ad),_0x174cef=createRateLimitError({'status':_0x3a60f3[_0x31146c(0x14f)]===0x1ad?_0x3a60f3[_0x31146c(0x14f)]:_0x2903d7??_0x3a60f3['status'],'errorCode':firstString(_0x495360['errorCode'],typeof _0x495360['code']===_0x31146c(0xd8)?_0x495360['code']:undefined),'message':firstString(_0x495360[_0x31146c(0x129)],_0x495360[_0x31146c(0x13d)],_0x495360[_0x31146c(0x122)],_0x54514a),'retryAfter':readRetryAfter(_0x3a60f3['headers'])??readRetryAfterSeconds(_0x18d813)});if(_0x174cef)throw _0x174cef;}async function apiRequest(_0x192f21,_0x3bd26f={}){const _0x167c3d=a76_0x348a,{method:method=_0x167c3d(0xe0),body:_0x1203de,headers:headers={},timeout:timeout=0x7530}=_0x3bd26f,_0x427208=_activeAK,_0x127530=getRuntimeDomain();if(!_0x427208)throw CliErrors[_0x167c3d(0xbc)](_0x167c3d(0xb4)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x16cbb4=''+_0x127530+_0x192f21,_0x9b50d1={'X-User-AK':_0x427208},_0xd43ac6=new AbortController(),_0x3c5296=setTimeout(()=>_0xd43ac6[_0x167c3d(0x14e)](),timeout);try{const _0x2e6797=await fetch(_0x16cbb4,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x9b50d1,...headers},'body':_0x1203de?JSON[_0x167c3d(0xd5)](_0x1203de):undefined,'signal':_0xd43ac6[_0x167c3d(0xfd)]}),_0x5b5200=await decodeResponseBody(_0x2e6797);if(!_0x5b5200['isJson']){throwIfRateLimited(_0x2e6797,undefined,_0x5b5200[_0x167c3d(0xef)]);throw CliErrors[_0x167c3d(0xc8)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x2e6797[_0x167c3d(0x14f)]+')',_0x2e6797[_0x167c3d(0x14f)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x34870d=_0x5b5200['data'];throwIfRateLimited(_0x2e6797,_0x34870d);if(!_0x2e6797['ok']||_0x34870d[_0x167c3d(0xf3)]===![])throw CliErrors['apiError'](_0x34870d[_0x167c3d(0x129)]||_0x34870d[_0x167c3d(0x13d)]||_0x167c3d(0x115)+_0x2e6797['status'],_0x34870d[_0x167c3d(0x134)]?_0x167c3d(0xc6)+_0x34870d[_0x167c3d(0x134)]:undefined);return _0x34870d;}catch(_0x44005d){if(_0x44005d instanceof Error&&_0x44005d[_0x167c3d(0x11e)]==='AbortError')throw CliErrors[_0x167c3d(0xc8)]('Request\x20timeout:\x20'+_0x16cbb4);throw _0x44005d;}finally{clearTimeout(_0x3c5296);}}async function apiBinaryRequest(_0x4bcb9d,_0x312268={}){const _0x1ac044=a76_0x348a,{method:method=_0x1ac044(0xe0),headers:headers={},timeout:timeout=0x7530}=_0x312268,_0x3235e3=_activeAK,_0x2cc7dd=getRuntimeDomain();if(!_0x3235e3)throw CliErrors[_0x1ac044(0xbc)](_0x1ac044(0xb4)+PRODUCT_CONFIG[_0x1ac044(0x143)]+'.');const _0x531028=''+_0x2cc7dd+_0x4bcb9d,_0x38003d=new AbortController(),_0x1cec00=setTimeout(()=>_0x38003d[_0x1ac044(0x14e)](),timeout);try{const _0x265be6=await fetch(_0x531028,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x1ac044(0xeb)],'X-User-AK':_0x3235e3,...headers},'signal':_0x38003d[_0x1ac044(0xfd)]});if(!_0x265be6['ok']){const _0x2aa605=await decodeResponseBody(_0x265be6),_0x3ec31c=_0x2aa605[_0x1ac044(0xea)]&&typeof _0x2aa605[_0x1ac044(0xea)]===_0x1ac044(0xe8)?_0x2aa605[_0x1ac044(0xea)]:{},_0x4bb853=firstString(_0x3ec31c['errorMsg'],_0x3ec31c[_0x1ac044(0x13d)],_0x3ec31c[_0x1ac044(0x134)],_0x2aa605[_0x1ac044(0xef)]);throwIfRateLimited(_0x265be6,_0x2aa605['data'],_0x4bb853);throw CliErrors['apiError'](_0x4bb853||_0x1ac044(0x115)+_0x265be6['status'],_0x1ac044(0x141)+_0x531028);}return Buffer[_0x1ac044(0x135)](await _0x265be6[_0x1ac044(0x103)]());}catch(_0x3d96fb){if(_0x3d96fb instanceof Error&&_0x3d96fb[_0x1ac044(0x11e)]===_0x1ac044(0x10d))throw CliErrors[_0x1ac044(0xc8)]('Request\x20timeout:\x20'+_0x531028);throw _0x3d96fb;}finally{clearTimeout(_0x1cec00);}}async function apiFormRequest(_0x12c646,_0x15997e,_0xbdbb7a={}){const _0x23f683=a76_0x348a,{timeout:timeout=0x7530}=_0xbdbb7a,_0x3b0d23=_activeAK,_0x2779c3=getRuntimeDomain();if(!_0x3b0d23)throw CliErrors['authRequired'](_0x23f683(0xb4)+PRODUCT_CONFIG[_0x23f683(0x143)]+'.');const _0x405c96=''+_0x2779c3+_0x12c646,_0x3aab82=new AbortController(),_0x270057=setTimeout(()=>_0x3aab82[_0x23f683(0x14e)](),timeout);try{const _0x42547f=await fetch(_0x405c96,{'method':_0x23f683(0x123),'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x3b0d23},'body':_0x15997e,'signal':_0x3aab82['signal']}),_0x580e98=await decodeResponseBody(_0x42547f);if(!_0x580e98['isJson']){throwIfRateLimited(_0x42547f,undefined,_0x580e98['text']);throw CliErrors['apiError'](_0x23f683(0xb8)+_0x42547f['status']+')',_0x42547f['status']>=0x190?_0x23f683(0x10b):undefined);}const _0x598a32=_0x580e98['data'];throwIfRateLimited(_0x42547f,_0x598a32);if(!_0x42547f['ok']||_0x598a32[_0x23f683(0xf3)]===![])throw CliErrors[_0x23f683(0xc8)](_0x598a32[_0x23f683(0x129)]||_0x598a32[_0x23f683(0x13d)]||_0x23f683(0x115)+_0x42547f[_0x23f683(0x14f)],_0x598a32[_0x23f683(0x134)]?_0x23f683(0xc6)+_0x598a32[_0x23f683(0x134)]:undefined);return _0x598a32;}catch(_0x5bb074){if(_0x5bb074 instanceof Error&&_0x5bb074[_0x23f683(0x11e)]===_0x23f683(0x10d))throw CliErrors[_0x23f683(0xc8)](_0x23f683(0x14a)+_0x405c96);throw _0x5bb074;}finally{clearTimeout(_0x270057);}}async function toolboxRequest(_0x4a899e,_0x376f8e,_0x6028f3={}){const _0x562b13=a76_0x348a,{method:method=_0x562b13(0xe0),headers:headers={},timeout:timeout=0x7530}=_0x6028f3,_0x29c462=_activeAK;if(!_0x29c462)throw CliErrors[_0x562b13(0xbc)](_0x562b13(0xb4)+PRODUCT_CONFIG[_0x562b13(0x143)]+'.');const _0x23dc21=getApiDomain()[_0x562b13(0x102)](/\/$/,''),_0x20670a=new URL(_0x4a899e,_0x23dc21+_0x562b13(0x128));if(_0x376f8e)for(const [_0x5047f6,_0xf7a627]of Object[_0x562b13(0x136)](_0x376f8e)){_0xf7a627!==undefined&&_0xf7a627!==null&&_0x20670a[_0x562b13(0xd6)][_0x562b13(0x105)](_0x5047f6,String(_0xf7a627));}const _0x33b4de=new AbortController(),_0x24bdb8=setTimeout(()=>_0x33b4de[_0x562b13(0x14e)](),timeout);try{const _0x122bf4=await fetch(_0x20670a,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x562b13(0xeb)],'X-User-AK':_0x29c462,...headers},'signal':_0x33b4de[_0x562b13(0xfd)]}),_0x77299f=await decodeResponseBody(_0x122bf4);if(!_0x77299f['isJson']){throwIfRateLimited(_0x122bf4,undefined,_0x77299f[_0x562b13(0xef)]);throw CliErrors[_0x562b13(0xc8)](_0x562b13(0xc1)+_0x122bf4['status']+')',_0x122bf4['status']>=0x190?_0x562b13(0x10b):undefined);}const _0x4360ea=_0x77299f[_0x562b13(0xea)];throwIfRateLimited(_0x122bf4,_0x4360ea);if(!_0x122bf4['ok']){const _0x15f90f=_0x4360ea&&typeof _0x4360ea==='object'?_0x4360ea:{};throw CliErrors[_0x562b13(0xc8)](_0x15f90f[_0x562b13(0x129)]||_0x15f90f[_0x562b13(0x13d)]||_0x562b13(0xf8)+_0x122bf4[_0x562b13(0x14f)],_0x15f90f[_0x562b13(0x134)]?_0x562b13(0xfe)+_0x15f90f[_0x562b13(0x134)]:undefined);}if(_0x4360ea&&typeof _0x4360ea===_0x562b13(0xe8)&&_0x562b13(0xf3)in _0x4360ea&&typeof _0x4360ea[_0x562b13(0xf3)]===_0x562b13(0x106)){const _0x46b946=_0x4360ea;if(!_0x46b946['success'])throw CliErrors[_0x562b13(0xc8)](_0x46b946['errorMsg']||_0x46b946[_0x562b13(0x13d)]||_0x562b13(0xd2),_0x46b946['errorCode']?'Toolbox\x20error\x20code:\x20'+_0x46b946['errorCode']:undefined);return _0x46b946['data'];}return _0x4360ea;}catch(_0x139e35){if(_0x139e35 instanceof Error&&_0x139e35[_0x562b13(0x11e)]==='AbortError')throw CliErrors[_0x562b13(0xc8)](_0x562b13(0x14a)+_0x20670a[_0x562b13(0xc0)]());throw _0x139e35;}finally{clearTimeout(_0x24bdb8);}}async function skillHubJsonRequest(_0x95f971,_0x16318e={}){const _0x332bb6=a76_0x348a,{method:method=_0x332bb6(0xe0),query:_0xaa663e,body:_0x3f89a6,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x16318e,_0x267754=_activeAK;if(!_0x267754)throw CliErrors['authRequired'](_0x332bb6(0xb4)+PRODUCT_CONFIG[_0x332bb6(0x143)]+'.');const _0x5d7c77=getSkillHubDomain()[_0x332bb6(0x102)](/\/$/,''),_0x340d0d=new URL(_0x95f971,_0x5d7c77+'/');if(_0xaa663e)for(const [_0xc28e17,_0x108b64]of Object[_0x332bb6(0x136)](_0xaa663e)){_0x108b64!==undefined&&_0x108b64!==null&&_0x340d0d[_0x332bb6(0xd6)][_0x332bb6(0x105)](_0xc28e17,String(_0x108b64));}const _0x2c3989=new AbortController(),_0x38f53a=setTimeout(()=>_0x2c3989[_0x332bb6(0x14e)](),timeout);try{const _0x5ab75b=await fetch(_0x340d0d[_0x332bb6(0xc0)](),{'method':method,'headers':{'Accept':_0x332bb6(0xfb),'X-Invoke-Source':PRODUCT_CONFIG[_0x332bb6(0xeb)],'X-User-AK':_0x267754,...headers},'body':_0x3f89a6,'signal':_0x2c3989[_0x332bb6(0xfd)]}),_0x1a462f=await decodeResponseBody(_0x5ab75b);if(!_0x1a462f[_0x332bb6(0xbd)]){if(allowNotFound&&_0x5ab75b['status']===0x194)return undefined;throwIfRateLimited(_0x5ab75b,undefined,_0x1a462f['text']);throw CliErrors[_0x332bb6(0xc8)](_0x332bb6(0x12f)+_0x5ab75b[_0x332bb6(0x14f)]+')',_0x5ab75b[_0x332bb6(0x14f)]>=0x190?_0x332bb6(0x10b):undefined);}const _0xe6ebfd=_0x1a462f['data'];throwIfRateLimited(_0x5ab75b,_0xe6ebfd);if(allowNotFound&&isSkillHubNotFoundResponse(_0x5ab75b['status'],_0xe6ebfd))return undefined;const _0x98d461=!_0x5ab75b['ok']||_0xe6ebfd?.[_0x332bb6(0xf3)]===![]||typeof _0xe6ebfd?.[_0x332bb6(0x133)]==='number'&&_0xe6ebfd['code']>=0x190;if(_0x98d461)throw CliErrors[_0x332bb6(0xc8)](_0xe6ebfd?.['errorMsg']||_0xe6ebfd?.[_0x332bb6(0x13d)]||_0xe6ebfd?.[_0x332bb6(0x122)]||_0x332bb6(0x11b)+_0x5ab75b[_0x332bb6(0x14f)],_0xe6ebfd?.[_0x332bb6(0x134)]?_0x332bb6(0x112)+_0xe6ebfd[_0x332bb6(0x134)]:undefined);return _0xe6ebfd?.[_0x332bb6(0xea)]??_0xe6ebfd;}catch(_0x10333c){if(_0x10333c instanceof Error&&_0x10333c[_0x332bb6(0x11e)]===_0x332bb6(0x10d))throw CliErrors[_0x332bb6(0xc8)](_0x332bb6(0x14a)+_0x340d0d[_0x332bb6(0xc0)]());throw _0x10333c;}finally{clearTimeout(_0x38f53a);}}function isSkillHubNotFoundResponse(_0x2c1d56,_0x286ab0){const _0xe6fe21=a76_0x348a;if(_0x2c1d56===0x194||_0x286ab0?.['code']===0x194)return!![];if(_0x2c1d56!==0x190&&_0x286ab0?.['code']!==0x190)return![];const _0x3a45ae=[_0x286ab0?.[_0xe6fe21(0x122)],_0x286ab0?.[_0xe6fe21(0x13d)],_0x286ab0?.[_0xe6fe21(0x129)],_0x286ab0?.[_0xe6fe21(0x138)]][_0xe6fe21(0x13c)](_0x5803b0=>typeof _0x5803b0===_0xe6fe21(0xd8))['join']('\x20');return/skill not found\b/i[_0xe6fe21(0xca)](_0x3a45ae);}async function skillHubBinaryRequest(_0x2160e4,_0x297e63={}){const _0x4f6d5e=a76_0x348a,{query:_0x5abef6,headers:headers={},timeout:timeout=0x7530}=_0x297e63,_0x5ae00d=_activeAK;if(!_0x5ae00d)throw CliErrors[_0x4f6d5e(0xbc)](_0x4f6d5e(0xb4)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x57eb01=getSkillHubDomain()[_0x4f6d5e(0x102)](/\/$/,''),_0x14cdd5=new URL(_0x2160e4,_0x57eb01+'/');if(_0x5abef6)for(const [_0x11f3a1,_0x5e6638]of Object[_0x4f6d5e(0x136)](_0x5abef6)){_0x5e6638!==undefined&&_0x5e6638!==null&&_0x14cdd5[_0x4f6d5e(0xd6)][_0x4f6d5e(0x105)](_0x11f3a1,String(_0x5e6638));}const _0x13b758=new AbortController(),_0xa3559d=setTimeout(()=>_0x13b758['abort'](),timeout);try{const _0x4c9d3d=await fetch(_0x14cdd5[_0x4f6d5e(0xc0)](),{'method':'GET','headers':{'Accept':_0x4f6d5e(0xb9),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x5ae00d,...headers},'signal':_0x13b758['signal']});if(!_0x4c9d3d['ok']){const _0x2ef289=await decodeResponseBody(_0x4c9d3d),_0x3483b1=_0x2ef289[_0x4f6d5e(0xea)]&&typeof _0x2ef289[_0x4f6d5e(0xea)]===_0x4f6d5e(0xe8)?_0x2ef289[_0x4f6d5e(0xea)]:{},_0x5af3bf=firstString(_0x3483b1[_0x4f6d5e(0x129)],_0x3483b1[_0x4f6d5e(0x13d)],_0x3483b1['msg'],_0x3483b1[_0x4f6d5e(0x134)],_0x2ef289[_0x4f6d5e(0xef)]);throwIfRateLimited(_0x4c9d3d,_0x2ef289['data'],_0x5af3bf);throw CliErrors[_0x4f6d5e(0xc8)](_0x5af3bf||'SkillHub\x20API\x20error:\x20'+_0x4c9d3d[_0x4f6d5e(0x14f)],'Download\x20failed:\x20'+_0x14cdd5['toString']());}return Buffer['from'](await _0x4c9d3d['arrayBuffer']());}catch(_0x1a9194){if(_0x1a9194 instanceof Error&&_0x1a9194[_0x4f6d5e(0x11e)]===_0x4f6d5e(0x10d))throw CliErrors[_0x4f6d5e(0xc8)](_0x4f6d5e(0x14a)+_0x14cdd5[_0x4f6d5e(0xc0)]());throw _0x1a9194;}finally{clearTimeout(_0xa3559d);}}export async function getBffEndpointContract(_0x5b5d8c,_0x4a6b69){const _0x39a13b=a76_0x348a;if(_0x4a6b69==='functions')throw CliErrors[_0x39a13b(0x124)](_0x39a13b(0xed)+_0x5b5d8c+',\x20name='+_0x4a6b69);const _0x1f81c2=await apiRequest(_0x39a13b(0x116)+encodeURIComponent(_0x5b5d8c)+'/'+encodeURIComponent(_0x4a6b69)),_0x17c2ab=_0x1f81c2[_0x39a13b(0xea)];if(!_0x17c2ab||typeof _0x17c2ab!==_0x39a13b(0xe8)||Array[_0x39a13b(0x110)](_0x17c2ab)||_0x17c2ab[_0x39a13b(0x140)]!==_0x5b5d8c||_0x17c2ab[_0x39a13b(0x144)]!==_0x4a6b69)throw CliErrors[_0x39a13b(0x124)]('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x5b5d8c+_0x39a13b(0x149)+_0x4a6b69);return{'appCode':_0x17c2ab[_0x39a13b(0x140)],'functionName':_0x17c2ab[_0x39a13b(0x144)],'description':_0x17c2ab[_0x39a13b(0xbf)],'version':_0x17c2ab[_0x39a13b(0x113)],'gmtModified':_0x17c2ab[_0x39a13b(0x14d)]};}export async function getSqlQueryInfo(_0x1ac951,_0x515cb8){const _0x4934d8=a76_0x348a,_0x4f889b=await apiRequest(_0x4934d8(0xba),{'method':'POST','body':{'appCode':_0x1ac951,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x515cb8}}),_0x68dc8=_0x4f889b[_0x4934d8(0xea)],_0x1032b6=_0x68dc8&&typeof _0x68dc8===_0x4934d8(0xe8)&&_0x4934d8(0x11a)in _0x68dc8?_0x68dc8[_0x4934d8(0x11a)]?.[0x0]:_0x68dc8&&typeof _0x68dc8===_0x4934d8(0xe8)&&'sqlCode'in _0x68dc8?_0x68dc8:undefined;if(!_0x1032b6)throw CliErrors[_0x4934d8(0x124)](_0x4934d8(0x120)+_0x515cb8);return _0x1032b6;}function isRemoteAppItem(_0x16cf66){const _0xcf7fcf=a76_0x348a;return!!_0x16cf66&&typeof _0x16cf66===_0xcf7fcf(0xe8)&&typeof _0x16cf66[_0xcf7fcf(0x140)]===_0xcf7fcf(0xd8)&&typeof _0x16cf66[_0xcf7fcf(0xe7)]===_0xcf7fcf(0xd8);}function extractRemoteAppItems(_0x2d5598){const _0x287582=a76_0x348a;if(Array[_0x287582(0x110)](_0x2d5598))return _0x2d5598['filter'](isRemoteAppItem);if(!_0x2d5598||typeof _0x2d5598!==_0x287582(0xe8))throw CliErrors[_0x287582(0xc8)](_0x287582(0xe9));const _0x358307=_0x2d5598;if(Array[_0x287582(0x110)](_0x358307[_0x287582(0x11a)]))return _0x358307[_0x287582(0x11a)][_0x287582(0x13c)](isRemoteAppItem);if(_0x358307['data']&&typeof _0x358307[_0x287582(0xea)]===_0x287582(0xe8)){const _0x281e2f=_0x358307[_0x287582(0xea)];if(Array['isArray'](_0x281e2f[_0x287582(0x11a)]))return _0x281e2f[_0x287582(0x11a)][_0x287582(0x13c)](isRemoteAppItem);}throw CliErrors[_0x287582(0xc8)](_0x287582(0x12a));}export async function getMyApps(){const _0x48533b=a76_0x348a,_0x3975e8=await apiRequest(_0x48533b(0xd7));return extractRemoteAppItems(_0x3975e8[_0x48533b(0xea)]);}export async function getLoginUserInfo(){const _0x575bdd=a76_0x348a,_0x437100=await apiRequest(_0x575bdd(0x126));if(!_0x437100['data']||typeof _0x437100['data']!=='object'||Array[_0x575bdd(0x110)](_0x437100[_0x575bdd(0xea)]))throw CliErrors[_0x575bdd(0xc8)]('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x437100[_0x575bdd(0xea)];}function runtimeSchedulePath(_0x3de173,_0x1b57a1=''){const _0x2a0b5e=a76_0x348a;return'/api/harness/apps/'+encodeURIComponent(_0x3de173)+_0x2a0b5e(0xc5)+_0x1b57a1;}export async function validateRuntimeSchedule(_0x1b1a08,_0x1ae5e1){const _0x54700a=a76_0x348a,_0x46377b=await apiRequest(runtimeSchedulePath(_0x1b1a08,_0x54700a(0xf4)),{'method':'POST','body':_0x1ae5e1});return _0x46377b['data'];}export async function createRuntimeSchedule(_0x8f60f0,_0x99a3c3){const _0x6e4434=a76_0x348a,_0x2f522c=await apiRequest(runtimeSchedulePath(_0x8f60f0),{'method':_0x6e4434(0x123),'body':_0x99a3c3});return _0x2f522c['data'];}export async function listRuntimeSchedules(_0x556617,_0x251345={}){const _0x26bde4=a76_0x348a,_0x33d762=new URLSearchParams();if(_0x251345[_0x26bde4(0x12e)]!==undefined)_0x33d762[_0x26bde4(0x105)](_0x26bde4(0x12e),String(_0x251345[_0x26bde4(0x12e)]));if(_0x251345[_0x26bde4(0x100)])_0x33d762[_0x26bde4(0x105)](_0x26bde4(0x100),_0x251345[_0x26bde4(0x100)]);const _0x25c55d=_0x33d762[_0x26bde4(0x13f)]>0x0?'?'+_0x33d762[_0x26bde4(0xc0)]():'',_0x2c26c2=await apiRequest(''+runtimeSchedulePath(_0x556617)+_0x25c55d);return _0x2c26c2['data'];}export async function getRuntimeSchedule(_0x1bfea1,_0x503df9){const _0x1440c8=a76_0x348a,_0xba976f=await apiRequest(runtimeSchedulePath(_0x1bfea1,'/'+encodeURIComponent(_0x503df9)));return _0xba976f[_0x1440c8(0xea)];}export async function deleteRuntimeSchedule(_0x51aa55,_0x2772bc){const _0x3d6ead=a76_0x348a,_0x4d4d8b=await apiRequest(runtimeSchedulePath(_0x51aa55,'/'+encodeURIComponent(_0x2772bc)),{'method':'DELETE'});return _0x4d4d8b[_0x3d6ead(0xea)];}export async function runRuntimeSchedule(_0x29ff6b,_0x594ae5){const _0x32f233=a76_0x348a,_0x26e8d7=await apiRequest(runtimeSchedulePath(_0x29ff6b,'/'+encodeURIComponent(_0x594ae5)+_0x32f233(0xb6)),{'method':_0x32f233(0x123)});return _0x26e8d7[_0x32f233(0xea)];}export async function listDatasets(_0xc89535,_0x48a978){const _0x4c45c9=a76_0x348a,_0x3854c8=await apiRequest(_0x4c45c9(0xf5),{'method':_0x4c45c9(0x123),'body':{'appCode':_0xc89535,..._0x48a978?.[_0x4c45c9(0x133)]&&{'code':_0x48a978['code']},..._0x48a978?.[_0x4c45c9(0x11e)]&&{'name':_0x48a978[_0x4c45c9(0x11e)]}}});return extractList(_0x3854c8[_0x4c45c9(0xea)]);}export async function getDatasetDetail(_0x1a0e1e){const _0x3b79bc=a76_0x348a,_0x324c76=await apiRequest(_0x3b79bc(0x10c)+encodeURIComponent(_0x1a0e1e));return _0x324c76[_0x3b79bc(0xea)];}export async function getDatasetSdkUsageDoc(_0x428edc,_0x22e08f){const _0x17a54a=a76_0x348a,_0x1240fd=await toolboxRequest('api-doc-generator',{'datasetCode':_0x428edc,'appCode':_0x22e08f});return typeof _0x1240fd?.[_0x17a54a(0xfa)]===_0x17a54a(0xd8)?_0x1240fd[_0x17a54a(0xfa)]:'';}export async function uploadRuntimeFile(_0x45f202,_0x22740d){const _0x17a372=a76_0x348a,_0x4c8ba7=await readFile(_0x22740d),_0x3b848b=new FormData();_0x3b848b[_0x17a372(0x13b)]('appCode',_0x45f202),_0x3b848b[_0x17a372(0x13b)]('file',new Blob([new Uint8Array(_0x4c8ba7)]),basename(_0x22740d));const _0x1b7a20=await apiFormRequest(_0x17a372(0x11f),_0x3b848b);return _0x1b7a20[_0x17a372(0xea)];}export async function queryRuntimeFileUrl(_0x271978,_0x16a838={}){const _0x534a1c=a76_0x348a,_0x3bac6d=await apiRequest(_0x534a1c(0xdb),{'method':'POST','body':{'filePath':_0x271978,'downloadFlag':_0x16a838[_0x534a1c(0x14c)]??![],..._0x16a838[_0x534a1c(0xf6)]?{'longTerm':!![]}:{}}});return _0x3bac6d[_0x534a1c(0xea)];}export async function recognizeRuntimeOcr(_0x38e077,_0x734268){const _0x8bf6d6=a76_0x348a,_0x584d0c=await apiRequest(_0x8bf6d6(0xff),{'method':_0x8bf6d6(0x123),'body':{'appCode':_0x38e077,'url':_0x734268[_0x8bf6d6(0x146)],'type':_0x734268[_0x8bf6d6(0xf7)]}});return _0x584d0c[_0x8bf6d6(0xea)];}export async function getRuntimeAppConfigByKey(_0x2ccbd4,_0x2a1bb0){const _0x16e522=a76_0x348a,_0x5d1b63=new URLSearchParams({'appCode':_0x2ccbd4,'key':_0x2a1bb0}),_0x3759fc=await apiRequest('/client/app-config/getByKey?'+_0x5d1b63[_0x16e522(0xc0)]());if(typeof _0x3759fc[_0x16e522(0xea)]!==_0x16e522(0xd8))throw CliErrors[_0x16e522(0x124)](_0x16e522(0x111)+_0x2a1bb0);return _0x3759fc[_0x16e522(0xea)];}export async function listRuntimeArtifacts(_0x4ff1ec,_0xd11178){const _0xc539f6=a76_0x348a,_0x4cad2d=new URLSearchParams({'appCode':_0x4ff1ec});if(_0xd11178?.[_0xc539f6(0x10f)])_0x4cad2d[_0xc539f6(0x105)]('artifactType',_0xd11178['artifactType']);if(_0xd11178?.['source'])_0x4cad2d[_0xc539f6(0x105)](_0xc539f6(0x132),_0xd11178[_0xc539f6(0x132)]);if(_0xd11178?.[_0xc539f6(0xce)]!==undefined)_0x4cad2d['set'](_0xc539f6(0xce),String(_0xd11178['favorite']));const _0x20f9e0=await apiRequest(_0xc539f6(0x10e)+_0x4cad2d[_0xc539f6(0xc0)]());return Array['isArray'](_0x20f9e0[_0xc539f6(0xea)])?_0x20f9e0[_0xc539f6(0xea)]:[];}export async function getRuntimeArtifact(_0x2e020b,_0x1f1670){const _0x3e939d=a76_0x348a,_0x300610=await apiRequest(_0x3e939d(0xde)+_0x2e020b+_0x3e939d(0x145)+encodeURIComponent(_0x1f1670));if(!_0x300610['data'])throw CliErrors['validation'](_0x3e939d(0x12b)+_0x2e020b);return _0x300610['data'];}export async function createRuntimeArtifact(_0x11ae8c,_0x2cb669){const _0x546758=a76_0x348a,_0x4ad341=await apiRequest('/client/artifact/create',{'method':'POST','body':{'appCode':_0x11ae8c,..._0x2cb669}});return _0x4ad341[_0x546758(0xea)];}export async function updateRuntimeArtifact(_0x5cb3a9,_0xd95cd9,_0x499bad){const _0x2ffb7f=a76_0x348a,_0xe4499=await apiRequest(_0x2ffb7f(0xde)+_0x5cb3a9+_0x2ffb7f(0xe2),{'method':'POST','body':{'appCode':_0xd95cd9,..._0x499bad}});return _0xe4499[_0x2ffb7f(0xea)];}export async function listPersonalBffs(_0x2cd13e){const _0x580096=a76_0x348a,_0x58408b=await apiRequest(_0x580096(0x104)+encodeURIComponent(_0x2cd13e));return Array[_0x580096(0x110)](_0x58408b[_0x580096(0xea)])?_0x58408b[_0x580096(0xea)]:[];}export async function getPersonalBff(_0x59edce,_0x17e909){const _0x1b85b9=a76_0x348a,_0x4e543a=await apiRequest(_0x1b85b9(0x130)+_0x59edce+_0x1b85b9(0x145)+encodeURIComponent(_0x17e909));if(!_0x4e543a[_0x1b85b9(0xea)])throw CliErrors[_0x1b85b9(0x124)](_0x1b85b9(0xc3)+_0x59edce);return _0x4e543a['data'];}export async function createPersonalBff(_0x2725d1,_0x12dabf){const _0x4791fd=a76_0x348a,_0xc29333=await apiRequest(_0x4791fd(0xcd),{'method':'POST','body':{'appCode':_0x2725d1,..._0x12dabf}});return _0xc29333[_0x4791fd(0xea)];}export async function updatePersonalBff(_0x463cf2,_0x35dfdd,_0x411fc5){const _0x58a638=a76_0x348a,_0x17a05a=await apiRequest(_0x58a638(0x130)+_0x463cf2+_0x58a638(0xe2),{'method':_0x58a638(0x123),'body':{'appCode':_0x35dfdd,..._0x411fc5}});return _0x17a05a[_0x58a638(0xea)];}export async function executePersonalBff(_0x54ba65,_0x1dfd76,_0x1f4180){const _0x495743=a76_0x348a,_0x40073a=await apiRequest(_0x495743(0x130)+_0x54ba65+_0x495743(0x119)+encodeURIComponent(_0x1dfd76),{'method':_0x495743(0x123),'body':_0x1f4180});return _0x40073a['data'];}export async function listPersonalKnowledgeBaseItems(_0x445a77){const _0x149c8a=a76_0x348a,_0x837a51=await apiRequest('/client/knowledge-base/personal/list?appCode='+encodeURIComponent(_0x445a77));return Array[_0x149c8a(0x110)](_0x837a51[_0x149c8a(0xea)])?_0x837a51['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x34c7cb,_0x51f589){const _0x489c46=a76_0x348a,_0xaaf16=await apiRequest('/client/knowledge-base/personal/'+_0x34c7cb+'?appCode='+encodeURIComponent(_0x51f589));if(!_0xaaf16['data'])throw CliErrors[_0x489c46(0x124)](_0x489c46(0xe1)+_0x34c7cb);return _0xaaf16['data'];}export async function createPersonalKnowledgeBaseItem(_0x24a505,_0x42fe71){const _0x15aab6=a76_0x348a,_0xa1d67a=await apiRequest(_0x15aab6(0x114),{'method':_0x15aab6(0x123),'body':{'appCode':_0x24a505,..._0x42fe71}});return _0xa1d67a[_0x15aab6(0xea)];}export async function updatePersonalKnowledgeBaseItem(_0x37aa51,_0x41c9a5,_0x14153e){const _0x5a8d9d=a76_0x348a,_0x305e9d=await apiRequest(_0x5a8d9d(0x109)+_0x37aa51+_0x5a8d9d(0xe2),{'method':_0x5a8d9d(0x123),'body':{'appCode':_0x41c9a5,..._0x14153e}});return _0x305e9d['data'];}export async function searchKnowledgeBase(_0xd1351c,_0x842e48){const _0x112a90=a76_0x348a,_0x108aaa=await apiRequest('/client/knowledge-base/search',{'method':_0x112a90(0x123),'body':{'appCode':_0xd1351c,'query':_0x842e48[_0x112a90(0xe4)],..._0x842e48[_0x112a90(0xb7)]!==undefined?{'topK':_0x842e48['topK']}:{}}});return Array['isArray'](_0x108aaa['data'])?_0x108aaa[_0x112a90(0xea)]:[];}export async function getRuntimeSkillByCode(_0x3a1f82,_0x376894){const _0x17b8e4=a76_0x348a,_0x1ee45e=await skillHubJsonRequest(_0x17b8e4(0x117)+encodeURIComponent(_0x3a1f82)+'/'+encodeURIComponent(_0x376894),{'allowNotFound':!![]});return _0x1ee45e?skillHubRuntimeDetailToRuntimeSkill(_0x1ee45e):undefined;}export async function listRuntimeSkills(_0x18fa91){const _0x541833=a76_0x348a,_0x25ac76=await skillHubJsonRequest(_0x541833(0x107)+encodeURIComponent(_0x18fa91[_0x541833(0x140)])+'/skills',{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x18fa91['appCode'],_0x25ac76,_0x18fa91[_0x541833(0x147)]??'all',_0x18fa91[_0x541833(0x133)]);}export async function listPersonalRuntimeSkills(_0x221d52){const _0x1759da=a76_0x348a;return(await listRuntimeSkills({'appCode':_0x221d52,'scope':_0x1759da(0xe5)}))[_0x1759da(0xe5)];}export async function listCompanyRuntimeSkills(_0x2afa31){const _0x4ddc7e=a76_0x348a;return(await listRuntimeSkills({'appCode':_0x2afa31,'scope':_0x4ddc7e(0x108)}))[_0x4ddc7e(0x108)];}export async function listVisibleRuntimeSkills(_0x10e74d){const _0x452c08=a76_0x348a;return(await listRuntimeSkills({'appCode':_0x10e74d,'scope':_0x452c08(0xc7)}))['effective'];}export async function createPersonalRuntimeSkill(_0xc9026d,_0x2a4f21,_0x23d2fa={}){const _0x37f570=a76_0x348a;return publishRuntimeSkill(_0xc9026d,_0x2a4f21,{'visibility':_0x37f570(0xd0),'confirmWarnings':_0x23d2fa[_0x37f570(0x11d)]});}export async function updatePersonalRuntimeSkill(_0x2c186e,_0xd958a2,_0x4d6ec4,_0x2fb8e2={}){const _0x2cffb7=a76_0x348a;return publishRuntimeSkill(_0xd958a2,{..._0x4d6ec4,'skillCode':_0x4d6ec4['skillCode']??_0x2c186e},{'visibility':_0x2cffb7(0xd0),'confirmWarnings':_0x2fb8e2[_0x2cffb7(0x11d)]});}export async function publishCompanyRuntimeSkill(_0x1d88f7,_0x173a38,_0x7b5eb9={}){const _0x5507af=a76_0x348a;return publishRuntimeSkill(_0x1d88f7,_0x173a38,{'visibility':_0x5507af(0xbe),'confirmWarnings':_0x7b5eb9['confirmWarnings']});}export async function validateRuntimeSkillPublish(_0x6ad483,_0x313ccc,_0x27d9c6){const _0x270886=a76_0x348a,_0x105d73=buildRuntimeSkillPublishForm(_0x313ccc,_0x27d9c6[_0x270886(0xe6)]),_0x14b663=await skillHubJsonRequest(_0x270886(0x148)+encodeURIComponent(_0x6ad483)+'/publish/validate',{'method':_0x270886(0x123),'body':_0x105d73});return{'valid':_0x14b663[_0x270886(0xe3)]===!![],'errors':Array[_0x270886(0x110)](_0x14b663[_0x270886(0x121)])?_0x14b663['errors']:[],'warnings':Array[_0x270886(0x110)](_0x14b663[_0x270886(0xc4)])?_0x14b663['warnings']:[],'resolvedSlug':_0x14b663[_0x270886(0xd9)],'resolvedVersion':_0x14b663[_0x270886(0x12c)]};}export async function downloadRuntimeSkillPackage(_0x5f5573,_0x241e96,_0x3ed19c,_0x284a79){const _0x2c95ee=a76_0x348a;void _0x5f5573;const _0x44f6fa=_0x284a79?_0x2c95ee(0x148)+encodeURIComponent(_0x3ed19c)+'/'+encodeURIComponent(_0x241e96)+_0x2c95ee(0xd3)+encodeURIComponent(_0x284a79)+'/download':'/api/cli/v1/skills/'+encodeURIComponent(_0x3ed19c)+'/'+encodeURIComponent(_0x241e96)+_0x2c95ee(0xf9);return skillHubBinaryRequest(_0x44f6fa);}async function publishRuntimeSkill(_0x318463,_0x5e9f48,_0x15a785){const _0x1a023b=a76_0x348a,_0x50b635=buildRuntimeSkillPublishForm(_0x5e9f48,_0x15a785[_0x1a023b(0xe6)]),_0x454fc2=await skillHubJsonRequest(_0x1a023b(0x148)+encodeURIComponent(_0x318463)+_0x1a023b(0xdc),{'method':_0x1a023b(0x123),'query':{'confirmWarnings':_0x15a785[_0x1a023b(0x11d)]===!![]?!![]:undefined},'body':_0x50b635});return{'appCode':_0x454fc2[_0x1a023b(0x13e)]??_0x318463,'skillCode':_0x454fc2[_0x1a023b(0x137)]??_0x5e9f48[_0x1a023b(0xf0)]??'','skillName':_0x5e9f48[_0x1a023b(0xc2)]??_0x454fc2[_0x1a023b(0x137)]??_0x5e9f48[_0x1a023b(0xf0)],'description':_0x5e9f48[_0x1a023b(0xbf)],'scope':skillHubVisibilityToScope(_0x454fc2[_0x1a023b(0xe6)]??_0x15a785[_0x1a023b(0xe6)])??_0x1a023b(0xe5),'version':_0x454fc2['version']??_0x5e9f48[_0x1a023b(0x113)],'tags':_0x5e9f48[_0x1a023b(0xda)],'content':_0x5e9f48[_0x1a023b(0xdf)]};}function buildRuntimeSkillPublishForm(_0x453c2c,_0x2512d9){const _0x4f7d93=a76_0x348a,_0x50ab86=new FormData();return _0x50ab86[_0x4f7d93(0x105)](_0x4f7d93(0xd1),runtimeSkillPackageFile(_0x453c2c)),_0x453c2c[_0x4f7d93(0xc2)]?.[_0x4f7d93(0xd4)]()&&_0x50ab86['set'](_0x4f7d93(0x11c),_0x453c2c[_0x4f7d93(0xc2)][_0x4f7d93(0xd4)]()),_0x50ab86[_0x4f7d93(0x105)](_0x4f7d93(0xe6),_0x2512d9),_0x50ab86;}function a76_0x348a(_0x23f2cc,_0xb3bd53){_0x23f2cc=_0x23f2cc-0xb3;const _0x1c5e11=a76_0x1c5e();let _0x348ab8=_0x1c5e11[_0x23f2cc];return _0x348ab8;}function runtimeSkillPackageFile(_0x58b117){const _0x207db5=a76_0x348a;if(!_0x58b117[_0x207db5(0xc9)])throw CliErrors[_0x207db5(0x124)]('Missing\x20Skill\x20package\x20payload.');const _0x4fb919=Buffer[_0x207db5(0x135)](_0x58b117[_0x207db5(0xc9)],_0x207db5(0x13a)),_0x18fa26=new Blob([_0x4fb919],{'type':_0x207db5(0x131)}),_0x50c7ce=(_0x58b117[_0x207db5(0xf0)]||_0x207db5(0x10a))+'.zip';if(typeof File!=='undefined')return new File([_0x18fa26],_0x50c7ce,{'type':_0x207db5(0x131)});return _0x18fa26;}function normalizeSkillHubRuntimeListResponse(_0x4e9168,_0x5b8196,_0x31b135,_0x31f7a1){const _0xf20d33=a76_0x348a,_0x5769d1=Array[_0xf20d33(0x110)](_0x5b8196)?_0x5b8196:Array[_0xf20d33(0x110)](_0x5b8196?.[_0xf20d33(0x139)])?_0x5b8196[_0xf20d33(0x139)]:[],_0x427192=_0x31f7a1?.['trim'](),_0x32dd05=_0x5769d1[_0xf20d33(0x13c)](_0x2229ee=>!_0x427192||_0x2229ee[_0xf20d33(0x137)]===_0x427192)['map'](skillHubRuntimeItemToRuntimeSkill)[_0xf20d33(0x13c)](_0x1336fb=>Boolean(_0x1336fb)),_0x53b4e0=_0x32dd05[_0xf20d33(0x13c)](_0x39bb32=>_0x39bb32[_0xf20d33(0x147)]==='personal'),_0x2da9b1=_0x32dd05['filter'](_0x25bfe4=>_0x25bfe4[_0xf20d33(0x147)]===_0xf20d33(0x108));return{'appCode':_0x4e9168,'personal':_0x31b135===_0xf20d33(0x108)?[]:_0x53b4e0,'company':_0x31b135===_0xf20d33(0xe5)?[]:_0x2da9b1,'effective':buildEffectiveRuntimeSkills(_0x53b4e0,_0x2da9b1,_0x31b135)};}function skillHubRuntimeItemToRuntimeSkill(_0x181374){const _0x17dce6=a76_0x348a,_0x597f5d=_0x181374[_0x17dce6(0x137)]?.['trim'](),_0x4ede1e=skillHubVisibilityToScope(_0x181374['visibility']);if(!_0x597f5d||!_0x4ede1e)return undefined;return{'id':_0x181374['id'],'appCode':_0x181374[_0x17dce6(0x13e)],'skillCode':_0x597f5d,'skillName':_0x181374[_0x17dce6(0x11c)]??_0x597f5d,'description':_0x181374[_0x17dce6(0xdd)],'scope':_0x4ede1e,'version':skillHubRuntimeItemVersion(_0x181374),'status':_0x181374[_0x17dce6(0x14f)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x2f6235){const _0x404ca8=a76_0x348a,_0x44dd0a=_0x2f6235[_0x404ca8(0x137)]?.['trim']();if(!_0x44dd0a)return undefined;return{'id':_0x2f6235['id'],'appCode':_0x2f6235[_0x404ca8(0x13e)],'skillCode':_0x44dd0a,'skillName':_0x2f6235[_0x404ca8(0x11c)]??_0x44dd0a,'description':_0x2f6235[_0x404ca8(0xdd)],'example':_0x2f6235[_0x404ca8(0xbb)],'scope':skillHubVisibilityToScope(_0x2f6235[_0x404ca8(0xe6)])??_0x2f6235[_0x404ca8(0xe6)]?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0x2f6235),'status':_0x2f6235[_0x404ca8(0x14f)]};}function skillHubVisibilityToScope(_0x3d61af){const _0x18c131=a76_0x348a;if(_0x3d61af==='PRIVATE')return _0x18c131(0xe5);if(_0x3d61af==='NAMESPACE_ONLY')return'company';return undefined;}function skillHubRuntimeItemVersion(_0x53923d){const _0x4f82d0=a76_0x348a;return _0x53923d['publishedVersion']?.['version']??_0x53923d['headlineVersion']?.['version']??_0x53923d[_0x4f82d0(0xee)]?.[_0x4f82d0(0x113)];}function buildEffectiveRuntimeSkills(_0x3478ff,_0x5d42cc,_0x5c1051){const _0x59a8fd=a76_0x348a;if(_0x5c1051===_0x59a8fd(0xe5))return _0x3478ff;if(_0x5c1051===_0x59a8fd(0x108))return _0x5d42cc;const _0x564678=new Map();for(const _0x5d0cf0 of _0x5d42cc){_0x564678[_0x59a8fd(0x105)](_0x5d0cf0[_0x59a8fd(0xf0)],_0x5d0cf0);}for(const _0x1e63a7 of _0x3478ff){_0x564678[_0x59a8fd(0x105)](_0x1e63a7[_0x59a8fd(0xf0)],_0x1e63a7);}return Array['from'](_0x564678[_0x59a8fd(0xf1)]());}function normalizeRuntimeSkillListResponse(_0x48a737,_0x20aac1){const _0x2f4485=a76_0x348a;if(Array[_0x2f4485(0x110)](_0x20aac1)){const _0xed7b18=_0x20aac1[_0x2f4485(0x13c)](_0x210a4d=>_0x210a4d[_0x2f4485(0x147)]===_0x2f4485(0xe5)),_0x56fe78=_0x20aac1[_0x2f4485(0x13c)](_0xa61f2=>_0xa61f2[_0x2f4485(0x147)]==='company');return{'appCode':_0x48a737,'personal':_0xed7b18,'company':_0x56fe78,'effective':[..._0x56fe78,..._0xed7b18]};}return{'appCode':_0x20aac1?.[_0x2f4485(0x140)]??_0x48a737,'personal':Array[_0x2f4485(0x110)](_0x20aac1?.[_0x2f4485(0xe5)])?_0x20aac1['personal']:[],'company':Array[_0x2f4485(0x110)](_0x20aac1?.[_0x2f4485(0x108)])?_0x20aac1[_0x2f4485(0x108)]:[],'effective':Array[_0x2f4485(0x110)](_0x20aac1?.['effective'])?_0x20aac1[_0x2f4485(0xec)]:[]};}
|
|
1
|
+
(function(_0x4ad3f3,_0x27ac54){const _0x2a3fa2=a76_0x2b79,_0x3d60bc=_0x4ad3f3();while(!![]){try{const _0x366ab7=parseInt(_0x2a3fa2(0x14b))/0x1*(-parseInt(_0x2a3fa2(0x133))/0x2)+parseInt(_0x2a3fa2(0x184))/0x3+-parseInt(_0x2a3fa2(0x175))/0x4+parseInt(_0x2a3fa2(0x1b4))/0x5+-parseInt(_0x2a3fa2(0x135))/0x6+-parseInt(_0x2a3fa2(0x179))/0x7*(parseInt(_0x2a3fa2(0x195))/0x8)+parseInt(_0x2a3fa2(0x134))/0x9;if(_0x366ab7===_0x27ac54)break;else _0x3d60bc['push'](_0x3d60bc['shift']());}catch(_0x2112dc){_0x3d60bc['push'](_0x3d60bc['shift']());}}}(a76_0x3c2d,0x83421));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x318276){_activeAK=_0x318276||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x2ed822){const _0x140f84=a76_0x2b79;for(const _0x14ee28 of _0x2ed822){if(typeof _0x14ee28===_0x140f84(0x183)&&_0x14ee28['trim']())return _0x14ee28[_0x140f84(0x15b)]();}return undefined;}async function decodeResponseBody(_0x3e9662){const _0x155013=a76_0x2b79;if(typeof _0x3e9662[_0x155013(0x14c)]===_0x155013(0x19a))try{const _0x38445e=await _0x3e9662[_0x155013(0x14c)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x38445e),'text':_0x38445e};}catch{return{'isJson':![],'text':_0x38445e[_0x155013(0x15b)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x3e9662[_0x155013(0x19f)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x1df0e4,_0x4a2d10,_0x37593c){const _0xd00d51=a76_0x2b79,_0x2a1b30=_0x4a2d10&&typeof _0x4a2d10===_0xd00d51(0x13c)?_0x4a2d10:{},_0x3f1c92=[_0x2a1b30['status'],_0x2a1b30[_0xd00d51(0x14a)]][_0xd00d51(0x1af)](_0x5884c4=>Number(_0x5884c4)===0x1ad),_0x53e717=createRateLimitError({'status':_0x1df0e4['status']===0x1ad?_0x1df0e4[_0xd00d51(0x143)]:_0x3f1c92??_0x1df0e4[_0xd00d51(0x143)],'errorCode':firstString(_0x2a1b30[_0xd00d51(0x138)],typeof _0x2a1b30[_0xd00d51(0x14a)]===_0xd00d51(0x183)?_0x2a1b30[_0xd00d51(0x14a)]:undefined),'message':firstString(_0x2a1b30[_0xd00d51(0x190)],_0x2a1b30['message'],_0x2a1b30['msg'],_0x37593c),'retryAfter':readRetryAfter(_0x1df0e4[_0xd00d51(0x189)])??readRetryAfterSeconds(_0x4a2d10)});if(_0x53e717)throw _0x53e717;}async function apiRequest(_0xaada99,_0x357dd2={}){const _0x3f938c=a76_0x2b79,{method:method='GET',body:_0xea5be,headers:headers={},timeout:timeout=0x7530}=_0x357dd2,_0x1a0141=_activeAK,_0x492ad2=getRuntimeDomain();if(!_0x1a0141)throw CliErrors[_0x3f938c(0x150)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x3f938c(0x185)]+'.');const _0x2342ca=''+_0x492ad2+_0xaada99,_0x1cc3ef={'X-User-AK':_0x1a0141},_0x3501e9=new AbortController(),_0xa6079c=setTimeout(()=>_0x3501e9[_0x3f938c(0x142)](),timeout);try{const _0x869f5d=await fetch(_0x2342ca,{'method':method,'headers':{'Content-Type':_0x3f938c(0x163),'X-Invoke-Source':PRODUCT_CONFIG[_0x3f938c(0x1ad)],..._0x1cc3ef,...headers},'body':_0xea5be?JSON[_0x3f938c(0x12f)](_0xea5be):undefined,'signal':_0x3501e9[_0x3f938c(0x15f)]}),_0x266da8=await decodeResponseBody(_0x869f5d);if(!_0x266da8['isJson']){throwIfRateLimited(_0x869f5d,undefined,_0x266da8[_0x3f938c(0x14c)]);throw CliErrors[_0x3f938c(0x15d)](_0x3f938c(0x122)+_0x869f5d[_0x3f938c(0x143)]+')',_0x869f5d[_0x3f938c(0x143)]>=0x190?_0x3f938c(0x1a6):undefined);}const _0x416035=_0x266da8[_0x3f938c(0x1a3)];throwIfRateLimited(_0x869f5d,_0x416035);if(!_0x869f5d['ok']||_0x416035['success']===![])throw CliErrors['apiError'](_0x416035['errorMsg']||_0x416035[_0x3f938c(0x1b5)]||_0x3f938c(0x182)+_0x869f5d[_0x3f938c(0x143)],_0x416035[_0x3f938c(0x138)]?_0x3f938c(0x186)+_0x416035[_0x3f938c(0x138)]:undefined);return _0x416035;}catch(_0x83dcce){if(_0x83dcce instanceof Error&&_0x83dcce[_0x3f938c(0x156)]==='AbortError')throw CliErrors[_0x3f938c(0x15d)](_0x3f938c(0x128)+_0x2342ca);throw _0x83dcce;}finally{clearTimeout(_0xa6079c);}}async function apiBinaryRequest(_0x4b6590,_0x2459fe={}){const _0x2d45fa=a76_0x2b79,{method:method=_0x2d45fa(0x13e),headers:headers={},timeout:timeout=0x7530}=_0x2459fe,_0x6b9f42=_activeAK,_0x30c284=getRuntimeDomain();if(!_0x6b9f42)throw CliErrors[_0x2d45fa(0x150)](_0x2d45fa(0x1b1)+PRODUCT_CONFIG[_0x2d45fa(0x185)]+'.');const _0x3f7fec=''+_0x30c284+_0x4b6590,_0x5b8ee4=new AbortController(),_0x22ac06=setTimeout(()=>_0x5b8ee4[_0x2d45fa(0x142)](),timeout);try{const _0x527a5d=await fetch(_0x3f7fec,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x2d45fa(0x1ad)],'X-User-AK':_0x6b9f42,...headers},'signal':_0x5b8ee4['signal']});if(!_0x527a5d['ok']){const _0x55c41d=await decodeResponseBody(_0x527a5d),_0x3973bd=_0x55c41d[_0x2d45fa(0x1a3)]&&typeof _0x55c41d[_0x2d45fa(0x1a3)]===_0x2d45fa(0x13c)?_0x55c41d['data']:{},_0x3764c1=firstString(_0x3973bd[_0x2d45fa(0x190)],_0x3973bd[_0x2d45fa(0x1b5)],_0x3973bd['errorCode'],_0x55c41d[_0x2d45fa(0x14c)]);throwIfRateLimited(_0x527a5d,_0x55c41d[_0x2d45fa(0x1a3)],_0x3764c1);throw CliErrors['apiError'](_0x3764c1||_0x2d45fa(0x182)+_0x527a5d[_0x2d45fa(0x143)],_0x2d45fa(0x13d)+_0x3f7fec);}return Buffer[_0x2d45fa(0x18b)](await _0x527a5d[_0x2d45fa(0x144)]());}catch(_0x261dad){if(_0x261dad instanceof Error&&_0x261dad[_0x2d45fa(0x156)]==='AbortError')throw CliErrors[_0x2d45fa(0x15d)](_0x2d45fa(0x128)+_0x3f7fec);throw _0x261dad;}finally{clearTimeout(_0x22ac06);}}async function apiFormRequest(_0xd2d84d,_0x51c2e7,_0x4866c6={}){const _0x4fb5a1=a76_0x2b79,{timeout:timeout=0x7530}=_0x4866c6,_0x161f72=_activeAK,_0x3b3fa1=getRuntimeDomain();if(!_0x161f72)throw CliErrors[_0x4fb5a1(0x150)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x4fb5a1(0x185)]+'.');const _0x4a2d15=''+_0x3b3fa1+_0xd2d84d,_0x2964db=new AbortController(),_0xf93f27=setTimeout(()=>_0x2964db[_0x4fb5a1(0x142)](),timeout);try{const _0xfd7078=await fetch(_0x4a2d15,{'method':_0x4fb5a1(0x123),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x4fb5a1(0x1ad)],'X-User-AK':_0x161f72},'body':_0x51c2e7,'signal':_0x2964db['signal']}),_0x5f09e6=await decodeResponseBody(_0xfd7078);if(!_0x5f09e6[_0x4fb5a1(0x14f)]){throwIfRateLimited(_0xfd7078,undefined,_0x5f09e6[_0x4fb5a1(0x14c)]);throw CliErrors['apiError']('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0xfd7078[_0x4fb5a1(0x143)]+')',_0xfd7078['status']>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x12a38f=_0x5f09e6[_0x4fb5a1(0x1a3)];throwIfRateLimited(_0xfd7078,_0x12a38f);if(!_0xfd7078['ok']||_0x12a38f['success']===![])throw CliErrors['apiError'](_0x12a38f[_0x4fb5a1(0x190)]||_0x12a38f[_0x4fb5a1(0x1b5)]||_0x4fb5a1(0x182)+_0xfd7078[_0x4fb5a1(0x143)],_0x12a38f[_0x4fb5a1(0x138)]?'API\x20error\x20code:\x20'+_0x12a38f['errorCode']:undefined);return _0x12a38f;}catch(_0x3b746e){if(_0x3b746e instanceof Error&&_0x3b746e[_0x4fb5a1(0x156)]===_0x4fb5a1(0x19d))throw CliErrors['apiError'](_0x4fb5a1(0x128)+_0x4a2d15);throw _0x3b746e;}finally{clearTimeout(_0xf93f27);}}async function toolboxRequest(_0x593770,_0x293ab1,_0x59e3ce={}){const _0x416f6e=a76_0x2b79,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x59e3ce,_0x12119d=_activeAK;if(!_0x12119d)throw CliErrors[_0x416f6e(0x150)](_0x416f6e(0x1b1)+PRODUCT_CONFIG[_0x416f6e(0x185)]+'.');const _0x2e39a6=getApiDomain()[_0x416f6e(0x16d)](/\/$/,''),_0xddd75d=new URL(_0x593770,_0x2e39a6+_0x416f6e(0x13a));if(_0x293ab1)for(const [_0x1f7b3a,_0x114d5e]of Object['entries'](_0x293ab1)){_0x114d5e!==undefined&&_0x114d5e!==null&&_0xddd75d[_0x416f6e(0x1b2)][_0x416f6e(0x12b)](_0x1f7b3a,String(_0x114d5e));}const _0x22c4b2=new AbortController(),_0x77afa7=setTimeout(()=>_0x22c4b2[_0x416f6e(0x142)](),timeout);try{const _0x18d2a8=await fetch(_0xddd75d,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x416f6e(0x1ad)],'X-User-AK':_0x12119d,...headers},'signal':_0x22c4b2[_0x416f6e(0x15f)]}),_0x3548d2=await decodeResponseBody(_0x18d2a8);if(!_0x3548d2[_0x416f6e(0x14f)]){throwIfRateLimited(_0x18d2a8,undefined,_0x3548d2[_0x416f6e(0x14c)]);throw CliErrors['apiError'](_0x416f6e(0x18c)+_0x18d2a8[_0x416f6e(0x143)]+')',_0x18d2a8[_0x416f6e(0x143)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x363574=_0x3548d2['data'];throwIfRateLimited(_0x18d2a8,_0x363574);if(!_0x18d2a8['ok']){const _0x4cf803=_0x363574&&typeof _0x363574===_0x416f6e(0x13c)?_0x363574:{};throw CliErrors[_0x416f6e(0x15d)](_0x4cf803[_0x416f6e(0x190)]||_0x4cf803[_0x416f6e(0x1b5)]||_0x416f6e(0x16b)+_0x18d2a8[_0x416f6e(0x143)],_0x4cf803[_0x416f6e(0x138)]?_0x416f6e(0x148)+_0x4cf803['errorCode']:undefined);}if(_0x363574&&typeof _0x363574===_0x416f6e(0x13c)&&'success'in _0x363574&&typeof _0x363574[_0x416f6e(0x132)]==='boolean'){const _0x327bc2=_0x363574;if(!_0x327bc2[_0x416f6e(0x132)])throw CliErrors[_0x416f6e(0x15d)](_0x327bc2[_0x416f6e(0x190)]||_0x327bc2[_0x416f6e(0x1b5)]||'Toolbox\x20API\x20error',_0x327bc2[_0x416f6e(0x138)]?_0x416f6e(0x148)+_0x327bc2[_0x416f6e(0x138)]:undefined);return _0x327bc2[_0x416f6e(0x1a3)];}return _0x363574;}catch(_0x4501be){if(_0x4501be instanceof Error&&_0x4501be['name']===_0x416f6e(0x19d))throw CliErrors[_0x416f6e(0x15d)](_0x416f6e(0x128)+_0xddd75d[_0x416f6e(0x125)]());throw _0x4501be;}finally{clearTimeout(_0x77afa7);}}async function skillHubJsonRequest(_0x177c55,_0x34b644={}){const _0x11e777=a76_0x2b79,{method:method='GET',query:_0x12ff55,body:_0x5ac385,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x34b644,_0x49b333=_activeAK;if(!_0x49b333)throw CliErrors[_0x11e777(0x150)](_0x11e777(0x1b1)+PRODUCT_CONFIG[_0x11e777(0x185)]+'.');const _0x3a5912=getSkillHubDomain()[_0x11e777(0x16d)](/\/$/,''),_0x173c72=new URL(_0x177c55,_0x3a5912+'/');if(_0x12ff55)for(const [_0x2e5803,_0x4245a5]of Object[_0x11e777(0x174)](_0x12ff55)){_0x4245a5!==undefined&&_0x4245a5!==null&&_0x173c72[_0x11e777(0x1b2)]['set'](_0x2e5803,String(_0x4245a5));}const _0x88c1e=new AbortController(),_0x266ac7=setTimeout(()=>_0x88c1e[_0x11e777(0x142)](),timeout);try{const _0x55035e=await fetch(_0x173c72['toString'](),{'method':method,'headers':{'Accept':_0x11e777(0x163),'X-Invoke-Source':PRODUCT_CONFIG[_0x11e777(0x1ad)],'X-User-AK':_0x49b333,...headers},'body':_0x5ac385,'signal':_0x88c1e[_0x11e777(0x15f)]}),_0x4e77e9=await decodeResponseBody(_0x55035e);if(!_0x4e77e9[_0x11e777(0x14f)]){if(allowNotFound&&_0x55035e[_0x11e777(0x143)]===0x194)return undefined;throwIfRateLimited(_0x55035e,undefined,_0x4e77e9['text']);throw CliErrors['apiError'](_0x11e777(0x1ac)+_0x55035e[_0x11e777(0x143)]+')',_0x55035e[_0x11e777(0x143)]>=0x190?_0x11e777(0x1a6):undefined);}const _0x1e39b1=_0x4e77e9['data'];throwIfRateLimited(_0x55035e,_0x1e39b1);if(allowNotFound&&isSkillHubNotFoundResponse(_0x55035e['status'],_0x1e39b1))return undefined;const _0x5dd619=!_0x55035e['ok']||_0x1e39b1?.['success']===![]||typeof _0x1e39b1?.[_0x11e777(0x14a)]===_0x11e777(0x13f)&&_0x1e39b1[_0x11e777(0x14a)]>=0x190;if(_0x5dd619)throw CliErrors[_0x11e777(0x15d)](_0x1e39b1?.[_0x11e777(0x190)]||_0x1e39b1?.[_0x11e777(0x1b5)]||_0x1e39b1?.['msg']||_0x11e777(0x1ba)+_0x55035e[_0x11e777(0x143)],_0x1e39b1?.[_0x11e777(0x138)]?'SkillHub\x20error\x20code:\x20'+_0x1e39b1['errorCode']:undefined);return _0x1e39b1?.[_0x11e777(0x1a3)]??_0x1e39b1;}catch(_0x19f271){if(_0x19f271 instanceof Error&&_0x19f271[_0x11e777(0x156)]===_0x11e777(0x19d))throw CliErrors[_0x11e777(0x15d)]('Request\x20timeout:\x20'+_0x173c72[_0x11e777(0x125)]());throw _0x19f271;}finally{clearTimeout(_0x266ac7);}}function isSkillHubNotFoundResponse(_0x11f040,_0x33c4f3){const _0x4cb7fc=a76_0x2b79;if(_0x11f040===0x194||_0x33c4f3?.[_0x4cb7fc(0x14a)]===0x194)return!![];if(_0x11f040!==0x190&&_0x33c4f3?.['code']!==0x190)return![];const _0x57d523=[_0x33c4f3?.[_0x4cb7fc(0x1b8)],_0x33c4f3?.['message'],_0x33c4f3?.[_0x4cb7fc(0x190)],_0x33c4f3?.['error']][_0x4cb7fc(0x149)](_0x9e9e9c=>typeof _0x9e9e9c===_0x4cb7fc(0x183))[_0x4cb7fc(0x127)]('\x20');return/skill not found\b/i[_0x4cb7fc(0x162)](_0x57d523);}async function skillHubBinaryRequest(_0x4e3111,_0x3265a5={}){const _0x481b52=a76_0x2b79,{query:_0x19c10d,headers:headers={},timeout:timeout=0x7530}=_0x3265a5,_0x852288=_activeAK;if(!_0x852288)throw CliErrors[_0x481b52(0x150)](_0x481b52(0x1b1)+PRODUCT_CONFIG[_0x481b52(0x185)]+'.');const _0x4a5940=getSkillHubDomain()['replace'](/\/$/,''),_0x50ace1=new URL(_0x4e3111,_0x4a5940+'/');if(_0x19c10d)for(const [_0x586f9b,_0x1d843b]of Object['entries'](_0x19c10d)){_0x1d843b!==undefined&&_0x1d843b!==null&&_0x50ace1[_0x481b52(0x1b2)][_0x481b52(0x12b)](_0x586f9b,String(_0x1d843b));}const _0x4069f0=new AbortController(),_0x27dfb4=setTimeout(()=>_0x4069f0['abort'](),timeout);try{const _0x13344f=await fetch(_0x50ace1[_0x481b52(0x125)](),{'method':_0x481b52(0x13e),'headers':{'Accept':_0x481b52(0x17f),'X-Invoke-Source':PRODUCT_CONFIG[_0x481b52(0x1ad)],'X-User-AK':_0x852288,...headers},'signal':_0x4069f0[_0x481b52(0x15f)]});if(!_0x13344f['ok']){const _0x2a06ec=await decodeResponseBody(_0x13344f),_0x4a71f6=_0x2a06ec[_0x481b52(0x1a3)]&&typeof _0x2a06ec['data']===_0x481b52(0x13c)?_0x2a06ec[_0x481b52(0x1a3)]:{},_0x5dc99e=firstString(_0x4a71f6[_0x481b52(0x190)],_0x4a71f6[_0x481b52(0x1b5)],_0x4a71f6[_0x481b52(0x1b8)],_0x4a71f6[_0x481b52(0x138)],_0x2a06ec['text']);throwIfRateLimited(_0x13344f,_0x2a06ec[_0x481b52(0x1a3)],_0x5dc99e);throw CliErrors[_0x481b52(0x15d)](_0x5dc99e||'SkillHub\x20API\x20error:\x20'+_0x13344f['status'],_0x481b52(0x13d)+_0x50ace1[_0x481b52(0x125)]());}return Buffer[_0x481b52(0x18b)](await _0x13344f[_0x481b52(0x144)]());}catch(_0x4475d5){if(_0x4475d5 instanceof Error&&_0x4475d5['name']===_0x481b52(0x19d))throw CliErrors[_0x481b52(0x15d)](_0x481b52(0x128)+_0x50ace1[_0x481b52(0x125)]());throw _0x4475d5;}finally{clearTimeout(_0x27dfb4);}}export async function getBffEndpointContract(_0x6c57ee,_0x34dd55){const _0x533834=a76_0x2b79;if(_0x34dd55===_0x533834(0x180))throw CliErrors['validation'](_0x533834(0x136)+_0x6c57ee+_0x533834(0x12a)+_0x34dd55);const _0x326bfb=await apiRequest(_0x533834(0x1a5)+encodeURIComponent(_0x6c57ee)+'/'+encodeURIComponent(_0x34dd55)),_0x324ec5=_0x326bfb['data'];if(!_0x324ec5||typeof _0x324ec5!=='object'||Array[_0x533834(0x164)](_0x324ec5)||_0x324ec5[_0x533834(0x172)]!==_0x6c57ee||_0x324ec5[_0x533834(0x16f)]!==_0x34dd55)throw CliErrors[_0x533834(0x16a)](_0x533834(0x136)+_0x6c57ee+_0x533834(0x12a)+_0x34dd55);return{'appCode':_0x324ec5['appCode'],'functionName':_0x324ec5[_0x533834(0x16f)],'description':_0x324ec5[_0x533834(0x12e)],'version':_0x324ec5['version'],'gmtModified':_0x324ec5['gmtModified']};}export async function getSqlQueryInfo(_0x1496e4,_0x24e3db){const _0x2ab2a1=a76_0x2b79,_0x22841f=await apiRequest(_0x2ab2a1(0x1b7),{'method':_0x2ab2a1(0x123),'body':{'appCode':_0x1496e4,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x24e3db}}),_0x241ed4=_0x22841f[_0x2ab2a1(0x1a3)],_0x57539d=_0x241ed4&&typeof _0x241ed4===_0x2ab2a1(0x13c)&&_0x2ab2a1(0x169)in _0x241ed4?_0x241ed4[_0x2ab2a1(0x169)]?.[0x0]:_0x241ed4&&typeof _0x241ed4===_0x2ab2a1(0x13c)&&_0x2ab2a1(0x155)in _0x241ed4?_0x241ed4:undefined;if(!_0x57539d)throw CliErrors[_0x2ab2a1(0x16a)](_0x2ab2a1(0x159)+_0x24e3db);return _0x57539d;}function isRemoteAppItem(_0x302e0e){const _0x1ef911=a76_0x2b79;return!!_0x302e0e&&typeof _0x302e0e===_0x1ef911(0x13c)&&typeof _0x302e0e['appCode']===_0x1ef911(0x183)&&typeof _0x302e0e[_0x1ef911(0x124)]===_0x1ef911(0x183);}function extractRemoteAppItems(_0xbe218e){const _0xc22ea2=a76_0x2b79;if(Array[_0xc22ea2(0x164)](_0xbe218e))return _0xbe218e[_0xc22ea2(0x149)](isRemoteAppItem);if(!_0xbe218e||typeof _0xbe218e!==_0xc22ea2(0x13c))throw CliErrors[_0xc22ea2(0x15d)](_0xc22ea2(0x188));const _0xd49d43=_0xbe218e;if(Array[_0xc22ea2(0x164)](_0xd49d43['tableData']))return _0xd49d43[_0xc22ea2(0x169)][_0xc22ea2(0x149)](isRemoteAppItem);if(_0xd49d43['data']&&typeof _0xd49d43[_0xc22ea2(0x1a3)]===_0xc22ea2(0x13c)){const _0x164cf9=_0xd49d43[_0xc22ea2(0x1a3)];if(Array[_0xc22ea2(0x164)](_0x164cf9[_0xc22ea2(0x169)]))return _0x164cf9[_0xc22ea2(0x169)][_0xc22ea2(0x149)](isRemoteAppItem);}throw CliErrors[_0xc22ea2(0x15d)](_0xc22ea2(0x16e));}export async function getMyApps(){const _0x8e1ecf=a76_0x2b79,_0x3db63d=await apiRequest(_0x8e1ecf(0x15c));return extractRemoteAppItems(_0x3db63d[_0x8e1ecf(0x1a3)]);}export async function getLoginUserInfo(){const _0x2c120f=a76_0x2b79,_0xa49d3c=await apiRequest('/client/user/loginUserInfo');if(!_0xa49d3c[_0x2c120f(0x1a3)]||typeof _0xa49d3c[_0x2c120f(0x1a3)]!=='object'||Array[_0x2c120f(0x164)](_0xa49d3c[_0x2c120f(0x1a3)]))throw CliErrors['apiError']('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0xa49d3c[_0x2c120f(0x1a3)];}function runtimeSchedulePath(_0x219715,_0x2d9baa=''){const _0x45431f=a76_0x2b79;return _0x45431f(0x160)+encodeURIComponent(_0x219715)+_0x45431f(0x191)+_0x2d9baa;}export async function validateRuntimeSchedule(_0x5f1501,_0x1c5268){const _0x27b6ad=a76_0x2b79,_0x81fa29=await apiRequest(runtimeSchedulePath(_0x5f1501,_0x27b6ad(0x17b)),{'method':_0x27b6ad(0x123),'body':_0x1c5268});return _0x81fa29['data'];}export async function createRuntimeSchedule(_0x222da0,_0x5f3cce){const _0x4031dc=a76_0x2b79,_0x4c33ce=await apiRequest(runtimeSchedulePath(_0x222da0),{'method':'POST','body':_0x5f3cce});return _0x4c33ce[_0x4031dc(0x1a3)];}export async function listRuntimeSchedules(_0x2a9ad8,_0x229c38={}){const _0x185059=a76_0x2b79,_0x3c5076=new URLSearchParams();if(_0x229c38['limit']!==undefined)_0x3c5076['set']('limit',String(_0x229c38[_0x185059(0x178)]));if(_0x229c38[_0x185059(0x1a0)])_0x3c5076[_0x185059(0x12b)]('cursor',_0x229c38[_0x185059(0x1a0)]);const _0x3d796e=_0x3c5076[_0x185059(0x1a8)]>0x0?'?'+_0x3c5076[_0x185059(0x125)]():'',_0x161a71=await apiRequest(''+runtimeSchedulePath(_0x2a9ad8)+_0x3d796e);return _0x161a71[_0x185059(0x1a3)];}export async function getRuntimeSchedule(_0x17c659,_0x3d5889){const _0x4f6288=await apiRequest(runtimeSchedulePath(_0x17c659,'/'+encodeURIComponent(_0x3d5889)));return _0x4f6288['data'];}export async function deleteRuntimeSchedule(_0x23cd20,_0x3709e9){const _0x33c3d4=a76_0x2b79,_0x26db6d=await apiRequest(runtimeSchedulePath(_0x23cd20,'/'+encodeURIComponent(_0x3709e9)),{'method':'DELETE'});return _0x26db6d[_0x33c3d4(0x1a3)];}export async function runRuntimeSchedule(_0x30982d,_0x506e9f){const _0x6bb853=a76_0x2b79,_0x3f6a7a=await apiRequest(runtimeSchedulePath(_0x30982d,'/'+encodeURIComponent(_0x506e9f)+_0x6bb853(0x18a)),{'method':'POST'});return _0x3f6a7a[_0x6bb853(0x1a3)];}export async function listDatasets(_0x9810eb,_0x4e97ab){const _0x2f54f9=a76_0x2b79,_0x1dd5aa=await apiRequest(_0x2f54f9(0x161),{'method':'POST','body':{'appCode':_0x9810eb,..._0x4e97ab?.[_0x2f54f9(0x14a)]&&{'code':_0x4e97ab[_0x2f54f9(0x14a)]},..._0x4e97ab?.['name']&&{'name':_0x4e97ab[_0x2f54f9(0x156)]}}});return extractList(_0x1dd5aa['data']);}export async function getDatasetDetail(_0x31d523){const _0x4a0e1f=a76_0x2b79,_0x5da1b8=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0x31d523));return _0x5da1b8[_0x4a0e1f(0x1a3)];}export async function getDatasetSdkUsageDoc(_0x26f81e,_0x5b7ecd){const _0x376f42=a76_0x2b79,_0x2d24f8=await toolboxRequest(_0x376f42(0x131),{'datasetCode':_0x26f81e,'appCode':_0x5b7ecd});return typeof _0x2d24f8?.[_0x376f42(0x197)]===_0x376f42(0x183)?_0x2d24f8['markdown']:'';}export async function uploadRuntimeFile(_0x5d62cc,_0x174606){const _0x3a6c37=a76_0x2b79,_0xf9966c=await readFile(_0x174606),_0x8268a9=new FormData();_0x8268a9[_0x3a6c37(0x19c)](_0x3a6c37(0x172),_0x5d62cc),_0x8268a9[_0x3a6c37(0x19c)](_0x3a6c37(0x187),new Blob([new Uint8Array(_0xf9966c)]),basename(_0x174606));const _0x1b1c72=await apiFormRequest(_0x3a6c37(0x1a4),_0x8268a9);return _0x1b1c72[_0x3a6c37(0x1a3)];}export async function queryRuntimeFileUrl(_0x400349,_0x4408d2={}){const _0x294958=a76_0x2b79,_0x5836e2=await apiRequest(_0x294958(0x17e),{'method':_0x294958(0x123),'body':{'filePath':_0x400349,'downloadFlag':_0x4408d2['download']??![],..._0x4408d2[_0x294958(0x151)]?{'longTerm':!![]}:{}}});return _0x5836e2[_0x294958(0x1a3)];}export async function recognizeRuntimeOcr(_0x382fb1,_0x264d68){const _0x51568f=a76_0x2b79,_0x9234c2=await apiRequest(_0x51568f(0x1a1),{'method':_0x51568f(0x123),'body':{'appCode':_0x382fb1,'url':_0x264d68[_0x51568f(0x146)],'type':_0x264d68[_0x51568f(0x18f)]}});return _0x9234c2['data'];}export async function getRuntimeAppConfigByKey(_0x267af9,_0x5915b6){const _0x1de2cb=a76_0x2b79,_0x2d4ab4=new URLSearchParams({'appCode':_0x267af9,'key':_0x5915b6}),_0x31a296=await apiRequest(_0x1de2cb(0x1b0)+_0x2d4ab4['toString']());if(typeof _0x31a296[_0x1de2cb(0x1a3)]!=='string')throw CliErrors[_0x1de2cb(0x16a)](_0x1de2cb(0x141)+_0x5915b6);return _0x31a296[_0x1de2cb(0x1a3)];}export async function listRuntimeArtifacts(_0x520370,_0xaeee84){const _0x481627=a76_0x2b79,_0x3e2cb1=new URLSearchParams({'appCode':_0x520370});if(_0xaeee84?.[_0x481627(0x170)])_0x3e2cb1[_0x481627(0x12b)](_0x481627(0x170),_0xaeee84['artifactType']);if(_0xaeee84?.['source'])_0x3e2cb1[_0x481627(0x12b)](_0x481627(0x1a2),_0xaeee84[_0x481627(0x1a2)]);if(_0xaeee84?.[_0x481627(0x158)]!==undefined)_0x3e2cb1[_0x481627(0x12b)](_0x481627(0x158),String(_0xaeee84[_0x481627(0x158)]));const _0x596976=await apiRequest(_0x481627(0x176)+_0x3e2cb1[_0x481627(0x125)]());return Array[_0x481627(0x164)](_0x596976[_0x481627(0x1a3)])?_0x596976['data']:[];}export async function getRuntimeArtifact(_0x50e954,_0x542aa3){const _0x1286d3=a76_0x2b79,_0x403b33=await apiRequest(_0x1286d3(0x173)+_0x50e954+_0x1286d3(0x168)+encodeURIComponent(_0x542aa3));if(!_0x403b33['data'])throw CliErrors[_0x1286d3(0x16a)](_0x1286d3(0x12d)+_0x50e954);return _0x403b33[_0x1286d3(0x1a3)];}export async function createRuntimeArtifact(_0x4e28ac,_0x3f9017){const _0x47195e=a76_0x2b79,_0x1d1c99=await apiRequest('/client/artifact/create',{'method':'POST','body':{'appCode':_0x4e28ac,..._0x3f9017}});return _0x1d1c99[_0x47195e(0x1a3)];}function a76_0x2b79(_0x21aab1,_0xf55e4b){_0x21aab1=_0x21aab1-0x120;const _0x3c2dcc=a76_0x3c2d();let _0x2b79df=_0x3c2dcc[_0x21aab1];return _0x2b79df;}export async function updateRuntimeArtifact(_0x18d0f2,_0x5a4c79,_0x1fb0e9){const _0x39ecce=a76_0x2b79,_0x2aa8f1=await apiRequest(_0x39ecce(0x173)+_0x18d0f2+'/update',{'method':'POST','body':{'appCode':_0x5a4c79,..._0x1fb0e9}});return _0x2aa8f1[_0x39ecce(0x1a3)];}function a76_0x3c2d(){const _0x1ce44f=['isArray','packageBase64','values','/client/knowledge-base/search','?appCode=','tableData','validation','Toolbox\x20API\x20error:\x20','/client/knowledge-base/personal/list?appCode=','replace','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','functionName','artifactType','undefined','appCode','/client/artifact/','entries','3305972yrxIsJ','/client/artifact/list?','.zip','limit','11326eLxRBD','displayName','/validate','/publish/validate','skillCode','/client/queryFileUrl','application/octet-stream','functions','tags','API\x20error:\x20','string','2062968Qypvsu','newConfigFileName','API\x20error\x20code:\x20','file','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','headers','/run','from','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/runtime-bff/personal/','/api/cli/v1/skills/','type','errorMsg','/schedules','map','headlineVersion','warnings','776dKvZEt','/download','markdown','topK','/client/knowledge-base/personal/create','function','company','append','AbortError','effective','json','cursor','/client/ocr','source','data','/client/uploadFile','/client/bff/endpoint/','Check\x20your\x20credentials\x20and\x20try\x20again.','base64','size','summary','scope','/api/runtime/v1/namespaces/','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','invokeSource','/api/v1/skills/','find','/client/app-config/getByKey?','Configure\x20accessKey\x20in\x20','searchParams','skillName','853015HdBKYJ','message','/publish','/client/sql/query','msg','example','SkillHub\x20API\x20error:\x20','Knowledge-base\x20entry\x20not\x20found:\x20id=','toLowerCase','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','POST','appName','toString','slug','join','Request\x20timeout:\x20','/client/knowledge-base/personal/',',\x20name=','set','valid','Artifact\x20not\x20found:\x20id=','description','stringify','confirmWarnings','api-doc-generator','success','2cAQKuJ','8175375FdBufP','69774ufqqkC','BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','PRIVATE','errorCode','items','/api/node-toolbox/','visibility','object','Download\x20failed:\x20','GET','number','all','Invalid\x20app\x20config\x20value:\x20key=','abort','status','arrayBuffer','/client/runtime-bff/personal/list?appCode=','url','errors','Toolbox\x20error\x20code:\x20','filter','code','233933fDWYRA','text','/update','version','isJson','authRequired','longTerm','application/zip','namespace','NAMESPACE_ONLY','sqlCode','name','personal','favorite','SQL\x20query\x20not\x20found:\x20','resolvedSlug','trim','/client/app/my-apps','apiError','Personal\x20BFF\x20not\x20found:\x20id=','signal','/api/harness/apps/','/client/dataset/list','test','application/json'];a76_0x3c2d=function(){return _0x1ce44f;};return a76_0x3c2d();}export async function listPersonalBffs(_0x7ea4bb){const _0x41c620=a76_0x2b79,_0x478af9=await apiRequest(_0x41c620(0x145)+encodeURIComponent(_0x7ea4bb));return Array['isArray'](_0x478af9[_0x41c620(0x1a3)])?_0x478af9[_0x41c620(0x1a3)]:[];}export async function getPersonalBff(_0xa82291,_0x1c3a91){const _0x2866b7=a76_0x2b79,_0x578ff9=await apiRequest(_0x2866b7(0x18d)+_0xa82291+'?appCode='+encodeURIComponent(_0x1c3a91));if(!_0x578ff9[_0x2866b7(0x1a3)])throw CliErrors[_0x2866b7(0x16a)](_0x2866b7(0x15e)+_0xa82291);return _0x578ff9[_0x2866b7(0x1a3)];}export async function createPersonalBff(_0x104dc5,_0x330ada){const _0x36e66f=a76_0x2b79,_0x32d475=await apiRequest('/client/runtime-bff/personal/create',{'method':_0x36e66f(0x123),'body':{'appCode':_0x104dc5,..._0x330ada}});return _0x32d475['data'];}export async function updatePersonalBff(_0x23226f,_0x330118,_0x1a5f3d){const _0x3a6cc1=a76_0x2b79,_0xf9d386=await apiRequest(_0x3a6cc1(0x18d)+_0x23226f+_0x3a6cc1(0x14d),{'method':_0x3a6cc1(0x123),'body':{'appCode':_0x330118,..._0x1a5f3d}});return _0xf9d386['data'];}export async function executePersonalBff(_0x562190,_0x407293,_0x20a6d0){const _0x243af2=a76_0x2b79,_0x4896a2=await apiRequest(_0x243af2(0x18d)+_0x562190+'/execute?appCode='+encodeURIComponent(_0x407293),{'method':_0x243af2(0x123),'body':_0x20a6d0});return _0x4896a2[_0x243af2(0x1a3)];}export async function listPersonalKnowledgeBaseItems(_0x46d4a5){const _0xdb84d7=a76_0x2b79,_0x57fcaf=await apiRequest(_0xdb84d7(0x16c)+encodeURIComponent(_0x46d4a5));return Array[_0xdb84d7(0x164)](_0x57fcaf[_0xdb84d7(0x1a3)])?_0x57fcaf[_0xdb84d7(0x1a3)]:[];}export async function getPersonalKnowledgeBaseItem(_0x2b650a,_0x41f697){const _0x30862a=a76_0x2b79,_0x2d1c5e=await apiRequest(_0x30862a(0x129)+_0x2b650a+_0x30862a(0x168)+encodeURIComponent(_0x41f697));if(!_0x2d1c5e[_0x30862a(0x1a3)])throw CliErrors['validation'](_0x30862a(0x120)+_0x2b650a);return _0x2d1c5e[_0x30862a(0x1a3)];}export async function createPersonalKnowledgeBaseItem(_0x35c396,_0x3d10cc){const _0x2a8a43=a76_0x2b79,_0x370498=await apiRequest(_0x2a8a43(0x199),{'method':_0x2a8a43(0x123),'body':{'appCode':_0x35c396,..._0x3d10cc}});return _0x370498[_0x2a8a43(0x1a3)];}export async function updatePersonalKnowledgeBaseItem(_0x3387c5,_0x50cbca,_0x13bbef){const _0x2067b0=a76_0x2b79,_0x1076b6=await apiRequest('/client/knowledge-base/personal/'+_0x3387c5+_0x2067b0(0x14d),{'method':_0x2067b0(0x123),'body':{'appCode':_0x50cbca,..._0x13bbef}});return _0x1076b6[_0x2067b0(0x1a3)];}export async function searchKnowledgeBase(_0x4eb3cc,_0x1ba104){const _0x4ff532=a76_0x2b79,_0x1b248f=await apiRequest(_0x4ff532(0x167),{'method':_0x4ff532(0x123),'body':{'appCode':_0x4eb3cc,'query':_0x1ba104['query'],..._0x1ba104[_0x4ff532(0x198)]!==undefined?{'topK':_0x1ba104[_0x4ff532(0x198)]}:{}}});return Array[_0x4ff532(0x164)](_0x1b248f[_0x4ff532(0x1a3)])?_0x1b248f[_0x4ff532(0x1a3)]:[];}export async function getRuntimeSkillByCode(_0x5b9f2e,_0x33dd76){const _0x4dfcfa=a76_0x2b79,_0x1de253=await skillHubJsonRequest(_0x4dfcfa(0x1ae)+encodeURIComponent(_0x5b9f2e)+'/'+encodeURIComponent(_0x33dd76),{'allowNotFound':!![]});return _0x1de253?skillHubRuntimeDetailToRuntimeSkill(_0x1de253):undefined;}export async function listRuntimeSkills(_0x5eec74){const _0x27fef0=a76_0x2b79,_0x5723fc=await skillHubJsonRequest(_0x27fef0(0x1ab)+encodeURIComponent(_0x5eec74[_0x27fef0(0x172)])+'/skills',{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x5eec74[_0x27fef0(0x172)],_0x5723fc,_0x5eec74[_0x27fef0(0x1aa)]??_0x27fef0(0x140),_0x5eec74['code']);}export async function listPersonalRuntimeSkills(_0x111ff2){const _0x362678=a76_0x2b79;return(await listRuntimeSkills({'appCode':_0x111ff2,'scope':_0x362678(0x157)}))['personal'];}export async function listCompanyRuntimeSkills(_0x4a4bf2){const _0x235f57=a76_0x2b79;return(await listRuntimeSkills({'appCode':_0x4a4bf2,'scope':_0x235f57(0x19b)}))[_0x235f57(0x19b)];}export async function listVisibleRuntimeSkills(_0x394a63){const _0x2a1b28=a76_0x2b79;return(await listRuntimeSkills({'appCode':_0x394a63,'scope':_0x2a1b28(0x140)}))[_0x2a1b28(0x19e)];}export async function createPersonalRuntimeSkill(_0x12fefe,_0x693902,_0x45985c={}){const _0x3314c1=a76_0x2b79;return publishRuntimeSkill(_0x12fefe,_0x693902,{'visibility':_0x3314c1(0x137),'confirmWarnings':_0x45985c[_0x3314c1(0x130)]});}export async function updatePersonalRuntimeSkill(_0x12d588,_0x32d691,_0x15d6f1,_0x164bcb={}){const _0x3435ce=a76_0x2b79;return publishRuntimeSkill(_0x32d691,{..._0x15d6f1,'skillCode':_0x15d6f1['skillCode']??_0x12d588},{'visibility':_0x3435ce(0x137),'confirmWarnings':_0x164bcb[_0x3435ce(0x130)]});}export async function publishCompanyRuntimeSkill(_0x5b1562,_0x36e84d,_0x566d5f={}){return publishRuntimeSkill(_0x5b1562,_0x36e84d,{'visibility':'NAMESPACE_ONLY','confirmWarnings':_0x566d5f['confirmWarnings']});}export async function validateRuntimeSkillPublish(_0x23585f,_0x30244f,_0x25559b){const _0xd6ef06=a76_0x2b79,_0x220a4a=buildRuntimeSkillPublishForm(_0x30244f,_0x25559b[_0xd6ef06(0x13b)]),_0x405579=await skillHubJsonRequest(_0xd6ef06(0x18e)+encodeURIComponent(_0x23585f)+_0xd6ef06(0x17c),{'method':'POST','body':_0x220a4a});return{'valid':_0x405579[_0xd6ef06(0x12c)]===!![],'errors':Array[_0xd6ef06(0x164)](_0x405579[_0xd6ef06(0x147)])?_0x405579['errors']:[],'warnings':Array[_0xd6ef06(0x164)](_0x405579[_0xd6ef06(0x194)])?_0x405579['warnings']:[],'resolvedSlug':_0x405579[_0xd6ef06(0x15a)],'resolvedVersion':_0x405579['resolvedVersion']};}export async function downloadRuntimeSkillPackage(_0x5e4ffc,_0x263a62,_0x17234b,_0x32c451){const _0x57b08c=a76_0x2b79;void _0x5e4ffc;const _0x49d66f=_0x32c451?'/api/cli/v1/skills/'+encodeURIComponent(_0x17234b)+'/'+encodeURIComponent(_0x263a62)+'/versions/'+encodeURIComponent(_0x32c451)+_0x57b08c(0x196):_0x57b08c(0x18e)+encodeURIComponent(_0x17234b)+'/'+encodeURIComponent(_0x263a62)+_0x57b08c(0x196);return skillHubBinaryRequest(_0x49d66f);}async function publishRuntimeSkill(_0x4b4e31,_0x128c03,_0x4cf004){const _0x5054bf=a76_0x2b79,_0x52cf70=buildRuntimeSkillPublishForm(_0x128c03,_0x4cf004['visibility']),_0x5ec933=await skillHubJsonRequest(_0x5054bf(0x18e)+encodeURIComponent(_0x4b4e31)+_0x5054bf(0x1b6),{'method':'POST','query':{'confirmWarnings':_0x4cf004['confirmWarnings']===!![]?!![]:undefined},'body':_0x52cf70});return{'appCode':_0x5ec933[_0x5054bf(0x153)]??_0x4b4e31,'skillCode':_0x5ec933[_0x5054bf(0x126)]??_0x128c03[_0x5054bf(0x17d)]??'','skillName':_0x128c03[_0x5054bf(0x1b3)]??_0x5ec933[_0x5054bf(0x126)]??_0x128c03['skillCode'],'description':_0x128c03[_0x5054bf(0x12e)],'scope':skillHubVisibilityToScope(_0x5ec933[_0x5054bf(0x13b)]??_0x4cf004[_0x5054bf(0x13b)])??_0x5054bf(0x157),'version':_0x5ec933['version']??_0x128c03['version'],'tags':_0x128c03[_0x5054bf(0x181)],'content':_0x128c03['content']};}function buildRuntimeSkillPublishForm(_0xd085a5,_0x304b3a){const _0x294b60=a76_0x2b79,_0x6a1bda=new FormData();return _0x6a1bda[_0x294b60(0x12b)]('file',runtimeSkillPackageFile(_0xd085a5)),_0xd085a5[_0x294b60(0x1b3)]?.[_0x294b60(0x15b)]()&&_0x6a1bda[_0x294b60(0x12b)](_0x294b60(0x17a),_0xd085a5['skillName'][_0x294b60(0x15b)]()),_0x6a1bda['set'](_0x294b60(0x13b),_0x304b3a),_0x6a1bda;}function runtimeSkillPackageFile(_0x227ae0){const _0x253b9a=a76_0x2b79;if(!_0x227ae0[_0x253b9a(0x165)])throw CliErrors['validation']('Missing\x20Skill\x20package\x20payload.');const _0x164bb9=Buffer['from'](_0x227ae0['packageBase64'],_0x253b9a(0x1a7)),_0x51aad6=new Blob([_0x164bb9],{'type':_0x253b9a(0x152)}),_0x4683d6=(_0x227ae0['skillCode']||'skill')+_0x253b9a(0x177);if(typeof File!==_0x253b9a(0x171))return new File([_0x51aad6],_0x4683d6,{'type':_0x253b9a(0x152)});return _0x51aad6;}function normalizeSkillHubRuntimeListResponse(_0x37c12c,_0x934b52,_0x5ef511,_0x3edbd0){const _0xcdc414=a76_0x2b79,_0xa33dda=Array['isArray'](_0x934b52)?_0x934b52:Array[_0xcdc414(0x164)](_0x934b52?.[_0xcdc414(0x139)])?_0x934b52[_0xcdc414(0x139)]:[],_0x4b0c8=_0x3edbd0?.[_0xcdc414(0x15b)](),_0x5004f6=_0xa33dda[_0xcdc414(0x149)](_0x32dfb6=>!_0x4b0c8||_0x32dfb6[_0xcdc414(0x126)]===_0x4b0c8)[_0xcdc414(0x192)](skillHubRuntimeItemToRuntimeSkill)[_0xcdc414(0x149)](_0x46217d=>Boolean(_0x46217d)),_0x34e4b7=_0x5004f6[_0xcdc414(0x149)](_0x4abb07=>_0x4abb07['scope']===_0xcdc414(0x157)),_0x5d3222=_0x5004f6[_0xcdc414(0x149)](_0x2251e6=>_0x2251e6[_0xcdc414(0x1aa)]===_0xcdc414(0x19b));return{'appCode':_0x37c12c,'personal':_0x5ef511===_0xcdc414(0x19b)?[]:_0x34e4b7,'company':_0x5ef511==='personal'?[]:_0x5d3222,'effective':buildEffectiveRuntimeSkills(_0x34e4b7,_0x5d3222,_0x5ef511)};}function skillHubRuntimeItemToRuntimeSkill(_0x39466f){const _0x3036ac=a76_0x2b79,_0x16e3c0=_0x39466f['slug']?.[_0x3036ac(0x15b)](),_0x213947=skillHubVisibilityToScope(_0x39466f[_0x3036ac(0x13b)]);if(!_0x16e3c0||!_0x213947)return undefined;return{'id':_0x39466f['id'],'appCode':_0x39466f['namespace'],'skillCode':_0x16e3c0,'skillName':_0x39466f[_0x3036ac(0x17a)]??_0x16e3c0,'description':_0x39466f[_0x3036ac(0x1a9)],'scope':_0x213947,'version':skillHubRuntimeItemVersion(_0x39466f),'status':_0x39466f[_0x3036ac(0x143)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x2fab50){const _0x1ac44b=a76_0x2b79,_0x1a53c2=_0x2fab50[_0x1ac44b(0x126)]?.[_0x1ac44b(0x15b)]();if(!_0x1a53c2)return undefined;return{'id':_0x2fab50['id'],'appCode':_0x2fab50[_0x1ac44b(0x153)],'skillCode':_0x1a53c2,'skillName':_0x2fab50['displayName']??_0x1a53c2,'description':_0x2fab50[_0x1ac44b(0x1a9)],'example':_0x2fab50[_0x1ac44b(0x1b9)],'scope':skillHubVisibilityToScope(_0x2fab50[_0x1ac44b(0x13b)])??_0x2fab50[_0x1ac44b(0x13b)]?.[_0x1ac44b(0x121)](),'version':skillHubRuntimeItemVersion(_0x2fab50),'status':_0x2fab50[_0x1ac44b(0x143)]};}function skillHubVisibilityToScope(_0x2c5553){const _0x4fbbf8=a76_0x2b79;if(_0x2c5553==='PRIVATE')return _0x4fbbf8(0x157);if(_0x2c5553===_0x4fbbf8(0x154))return _0x4fbbf8(0x19b);return undefined;}function skillHubRuntimeItemVersion(_0x306ad1){const _0x5eedbd=a76_0x2b79;return _0x306ad1['publishedVersion']?.[_0x5eedbd(0x14e)]??_0x306ad1[_0x5eedbd(0x193)]?.[_0x5eedbd(0x14e)]??_0x306ad1['ownerPreviewVersion']?.['version'];}function buildEffectiveRuntimeSkills(_0xf9ec49,_0x1c452a,_0x5cb34b){const _0x346c9a=a76_0x2b79;if(_0x5cb34b===_0x346c9a(0x157))return _0xf9ec49;if(_0x5cb34b===_0x346c9a(0x19b))return _0x1c452a;const _0x47d495=new Map();for(const _0x397258 of _0x1c452a){_0x47d495[_0x346c9a(0x12b)](_0x397258[_0x346c9a(0x17d)],_0x397258);}for(const _0x12bd44 of _0xf9ec49){_0x47d495[_0x346c9a(0x12b)](_0x12bd44['skillCode'],_0x12bd44);}return Array[_0x346c9a(0x18b)](_0x47d495[_0x346c9a(0x166)]());}function normalizeRuntimeSkillListResponse(_0x1bce3e,_0x5ea3d5){const _0x5ea993=a76_0x2b79;if(Array[_0x5ea993(0x164)](_0x5ea3d5)){const _0x3f76f6=_0x5ea3d5[_0x5ea993(0x149)](_0x42fb8d=>_0x42fb8d[_0x5ea993(0x1aa)]===_0x5ea993(0x157)),_0x1969e9=_0x5ea3d5['filter'](_0x264c6f=>_0x264c6f[_0x5ea993(0x1aa)]==='company');return{'appCode':_0x1bce3e,'personal':_0x3f76f6,'company':_0x1969e9,'effective':[..._0x1969e9,..._0x3f76f6]};}return{'appCode':_0x5ea3d5?.[_0x5ea993(0x172)]??_0x1bce3e,'personal':Array['isArray'](_0x5ea3d5?.[_0x5ea993(0x157)])?_0x5ea3d5[_0x5ea993(0x157)]:[],'company':Array[_0x5ea993(0x164)](_0x5ea3d5?.[_0x5ea993(0x19b)])?_0x5ea3d5[_0x5ea993(0x19b)]:[],'effective':Array[_0x5ea993(0x164)](_0x5ea3d5?.['effective'])?_0x5ea3d5[_0x5ea993(0x19e)]:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x42f680,_0x35e931){const _0x2fc55a=a77_0x5a5c,_0x562ec0=_0x42f680();while(!![]){try{const _0x4b8fb0=parseInt(_0x2fc55a(0x164))/0x1+-parseInt(_0x2fc55a(0x162))/0x2+parseInt(_0x2fc55a(0x160))/0x3*(parseInt(_0x2fc55a(0x165))/0x4)+parseInt(_0x2fc55a(0x161))/0x5*(parseInt(_0x2fc55a(0x16a))/0x6)+parseInt(_0x2fc55a(0x166))/0x7+parseInt(_0x2fc55a(0x169))/0x8*(-parseInt(_0x2fc55a(0x15c))/0x9)+parseInt(_0x2fc55a(0x15d))/0xa*(-parseInt(_0x2fc55a(0x163))/0xb);if(_0x4b8fb0===_0x35e931)break;else _0x562ec0['push'](_0x562ec0['shift']());}catch(_0x3ab2da){_0x562ec0['push'](_0x562ec0['shift']());}}}(a77_0x4564,0xc9cfb));import{listDatasets}from'../core/api-client.js';function a77_0x4564(){const _0x2cff37=['19050QmtAZy','dbId','dbName','3znbURj','2355UrojSu','1944118BGfeAp','3806aQfKRa','624504uXkdFy','5266936IbHZlw','563773jhZQdw','get','set','8MlVqCP','9252uCYMhV','dbtableConfig','2612259loLLKS'];a77_0x4564=function(){return _0x2cff37;};return a77_0x4564();}const cache=new Map();export async function listDatabases(_0x2bea28){const _0x4b0dae=a77_0x5a5c;if(cache['has'](_0x2bea28))return cache[_0x4b0dae(0x167)](_0x2bea28);const _0x2e3999=await listDatasets(_0x2bea28),_0x3c9390=new Map();for(const _0x5c5317 of _0x2e3999){const _0x1a2c67=_0x5c5317[_0x4b0dae(0x15b)];_0x1a2c67?.[_0x4b0dae(0x15e)]!=null&&_0x3c9390[_0x4b0dae(0x168)](_0x1a2c67[_0x4b0dae(0x15e)],_0x1a2c67['dbName']??'db-'+_0x1a2c67[_0x4b0dae(0x15e)]);}const _0x33a42d=[..._0x3c9390['entries']()]['map'](([_0x38364e,_0x38bad8])=>({'dbId':_0x38364e,'dbName':_0x38bad8}));return cache[_0x4b0dae(0x168)](_0x2bea28,_0x33a42d),_0x33a42d;}function a77_0x5a5c(_0x13509c,_0x40474f){_0x13509c=_0x13509c-0x15b;const _0x4564d3=a77_0x4564();let _0x5a5c48=_0x4564d3[_0x13509c];return _0x5a5c48;}export async function getDbName(_0x4db0d0,_0x4f6d2d){const _0x35ec7e=a77_0x5a5c;try{const _0xcc4164=await listDatabases(_0x4db0d0);return _0xcc4164['find'](_0x1f5c55=>_0x1f5c55['dbId']===_0x4f6d2d)?.[_0x35ec7e(0x15f)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26e2d0,_0x246d08){const _0x275c15=a78_0x43c3,_0x194fa6=_0x26e2d0();while(!![]){try{const _0x112ca3=-parseInt(_0x275c15(0x132))/0x1+parseInt(_0x275c15(0x142))/0x2*(-parseInt(_0x275c15(0x13f))/0x3)+parseInt(_0x275c15(0x14a))/0x4+parseInt(_0x275c15(0x134))/0x5*(parseInt(_0x275c15(0x13b))/0x6)+parseInt(_0x275c15(0x14f))/0x7+-parseInt(_0x275c15(0x12a))/0x8+parseInt(_0x275c15(0x12f))/0x9;if(_0x112ca3===_0x246d08)break;else _0x194fa6['push'](_0x194fa6['shift']());}catch(_0x439f01){_0x194fa6['push'](_0x194fa6['shift']());}}}(a78_0x79e0,0xb4436));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';function a78_0x79e0(){const _0x512630=['delete','models','8643483PLDGVY','update','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','1471748eljjqk','getOne','609005zXoGZz','execute','invokeSource','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27\x20or\x20\x27{\x22id\x22:[1,2,3],\x22name\x22:\x22new\x22}\x27','trim','map','30jwAiJE','data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.','validation','3eTWdNp','column','batchCreate','1129790mXYXyU','appCode','aggregate','sql','accessKey','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','field','object','4753648YkPApB','env','bff','string','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','5015234uqFDZj','isArray','dataset_','5594120PeXsIb','function','data\x20aggregate\x20--params.aggregate['];a78_0x79e0=function(){return _0x512630;};return a78_0x79e0();}import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';import{installLosslessJsonResponseParser}from'../utils/lossless-json.js';let _client,restoreResponseJsonParser;function a78_0x43c3(_0x5755d7,_0x14b32c){_0x5755d7=_0x5755d7-0x12a;const _0x79e088=a78_0x79e0();let _0x43c3be=_0x79e088[_0x5755d7];return _0x43c3be;}export function initSdkClient(_0x2c3a54){const _0x5e1f5c=a78_0x43c3;restoreResponseJsonParser??=installLosslessJsonResponseParser();try{_client=createClient({'appCode':_0x2c3a54[_0x5e1f5c(0x143)],'env':_0x2c3a54[_0x5e1f5c(0x14b)],'authMode':_0x2c3a54['authMode'],..._0x2c3a54['accessKey']?{'accessKey':_0x2c3a54[_0x5e1f5c(0x146)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x5e1f5c(0x136)]}}});}catch(_0x291da0){clearSdkClient();throw _0x291da0;}}export function clearSdkClient(){_client=undefined,restoreResponseJsonParser?.(),restoreResponseJsonParser=undefined;}function ensureClient(){const _0x3d12f5=a78_0x43c3;if(!_client)throw new Error(_0x3d12f5(0x131));return _client;}function normalizeAggregateParams(_0x52357d){const _0x3c1081=a78_0x43c3,_0x545724=_0x52357d[_0x3c1081(0x144)];if(_0x545724===undefined)return _0x52357d;if(!Array['isArray'](_0x545724))throw CliErrors[_0x3c1081(0x13e)](_0x3c1081(0x13c));return{..._0x52357d,'aggregate':_0x545724[_0x3c1081(0x13a)]((_0x5dd656,_0x1a9cca)=>{const _0x12d82a=_0x3c1081;if(!_0x5dd656||typeof _0x5dd656!==_0x12d82a(0x149)||Array[_0x12d82a(0x150)](_0x5dd656))throw CliErrors[_0x12d82a(0x13e)](_0x12d82a(0x12c)+_0x1a9cca+']\x20must\x20be\x20an\x20object.');const _0x5b6e1d=_0x5dd656[_0x12d82a(0x140)]??_0x5dd656[_0x12d82a(0x148)];if(typeof _0x5b6e1d!==_0x12d82a(0x14d)||_0x5b6e1d[_0x12d82a(0x139)]()==='')throw CliErrors[_0x12d82a(0x13e)](_0x12d82a(0x12c)+_0x1a9cca+_0x12d82a(0x13d));const _0xa3cc0d={..._0x5dd656,'column':_0x5b6e1d};return delete _0xa3cc0d[_0x12d82a(0x148)],_0xa3cc0d;})};}export async function executeData(_0x2472b7,_0x3f91fa,_0x29a1ed){const _0x3096ee=a78_0x43c3,_0x1e7ea0=ensureClient(),_0x10276d=_0x3096ee(0x151)+_0x2472b7,_0x457780=_0x1e7ea0[_0x3096ee(0x12e)][_0x10276d];if(!_0x457780||typeof _0x457780[_0x3f91fa]!==_0x3096ee(0x12b))throw new Error(_0x3096ee(0x137)+_0x3f91fa+'\x22.\x20'+_0x3096ee(0x14e));if(_0x3f91fa===_0x3096ee(0x141))return _0x457780[_0x3096ee(0x141)](parseBatchCreateItemsFromParams(_0x29a1ed));const _0x1faf17=_0x29a1ed!==undefined&&_0x29a1ed!==null&&!Array[_0x3096ee(0x150)](_0x29a1ed)?_0x29a1ed:{};switch(_0x3f91fa){case'getOne':{const _0x15b9d9=_0x1faf17['id'];if(_0x15b9d9===undefined||_0x15b9d9===null)throw new Error(_0x3096ee(0x147));return _0x457780[_0x3096ee(0x133)](_0x15b9d9);}case _0x3096ee(0x130):{const {id:_0x167a80,..._0x29093b}=_0x1faf17;if(_0x167a80===undefined||_0x167a80===null)throw new Error(_0x3096ee(0x138));return _0x457780['update'](_0x167a80,_0x29093b);}case _0x3096ee(0x12d):{const _0x3f0984=_0x1faf17['id'];if(_0x3f0984===undefined||_0x3f0984===null)throw new Error('delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x457780[_0x3096ee(0x12d)](_0x3f0984);}case _0x3096ee(0x144):return _0x457780[_0x3096ee(0x144)](normalizeAggregateParams(_0x1faf17));default:return _0x457780[_0x3f91fa](_0x1faf17);}}export async function executeSdkSql(_0x404204,_0x5b48c6){const _0x259f10=a78_0x43c3,_0x531162=ensureClient();return _0x531162[_0x259f10(0x145)][_0x259f10(0x135)]({'sqlCode':_0x404204,'params':_0x5b48c6});}export async function executeSdkBff(_0x1750a3,_0x461bab){const _0xee3aa7=a78_0x43c3,_0x213250=ensureClient();return _0x213250[_0xee3aa7(0x14c)][_0xee3aa7(0x135)]({'scriptName':_0x1750a3,'params':_0x461bab});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a79_0x47a6df=a79_0x5188;function a79_0x5a1a(){const _0x489739=['3381367RsOLUg','796QyTDbi','18DZimey','1472733rBquPG','Set\x20appcode\x20via\x20--appcode\x20or\x20','15RGeDFg','2208540AuusDX','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','95036RDvpds','746PcxznP','245441LDniIg','Configure\x20accessKey\x20in\x20','498615QGIMYc','newConfigFileName','8UgJAJL','rate_limited','\x20file.','\x20or\x20run\x20`'];a79_0x5a1a=function(){return _0x489739;};return a79_0x5a1a();}(function(_0x344a79,_0x30ceaa){const _0x507531=a79_0x5188,_0x347698=_0x344a79();while(!![]){try{const _0x5c12d8=parseInt(_0x507531(0x1b0))/0x1*(parseInt(_0x507531(0x1a6))/0x2)+parseInt(_0x507531(0x1b4))/0x3*(parseInt(_0x507531(0x1a5))/0x4)+-parseInt(_0x507531(0x1a9))/0x5*(parseInt(_0x507531(0x1b1))/0x6)+-parseInt(_0x507531(0x1a7))/0x7+-parseInt(_0x507531(0x1ab))/0x8*(-parseInt(_0x507531(0x1b2))/0x9)+parseInt(_0x507531(0x1a3))/0xa+-parseInt(_0x507531(0x1af))/0xb;if(_0x5c12d8===_0x30ceaa)break;else _0x347698['push'](_0x347698['shift']());}catch(_0x5a2e60){_0x347698['push'](_0x347698['shift']());}}}(a79_0x5a1a,0x26b65));function a79_0x5188(_0xdd399d,_0x5dbd97){_0xdd399d=_0xdd399d-0x1a3;const _0x5a1a20=a79_0x5a1a();let _0x518818=_0x5a1a20[_0xdd399d];return _0x518818;}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};const baseCliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a79_0x47a6df(0x1a8)+PRODUCT_CONFIG[a79_0x47a6df(0x1aa)]+a79_0x47a6df(0x1ae)+CLI_BIN_NAME+'\x20auth\x20login`.','configMissingHint':a79_0x47a6df(0x1b3)+PRODUCT_CONFIG[a79_0x47a6df(0x1aa)]+'.','notInProjectHint':a79_0x47a6df(0x1a4)+PRODUCT_CONFIG[a79_0x47a6df(0x1aa)]+a79_0x47a6df(0x1ad)});export const CliErrors={...baseCliErrors,'rateLimited':(_0x44d50e,_0x5b2805)=>new CliError(a79_0x47a6df(0x1ac),0x2,_0x44d50e,_0x5b2805)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a80_0xab19(){var _0x24eb28=['4702719KzdnuQ','6bfAuEX','3179610kEqhIy','7158ltNpVM','4078144xviyaL','79947Ftxqah','2813515HuoDny','67ZQHjlj','4JWegzT','42663ahbCgh'];a80_0xab19=function(){return _0x24eb28;};return a80_0xab19();}(function(_0x4a2545,_0x2a72b3){var _0xd32b50=a80_0x7c57,_0x2d6952=_0x4a2545();while(!![]){try{var _0x4c0dc1=-parseInt(_0xd32b50(0x1f4))/0x1*(-parseInt(_0xd32b50(0x1f0))/0x2)+parseInt(_0xd32b50(0x1f6))/0x3*(parseInt(_0xd32b50(0x1f5))/0x4)+parseInt(_0xd32b50(0x1f3))/0x5+-parseInt(_0xd32b50(0x1ee))/0x6*(parseInt(_0xd32b50(0x1ed))/0x7)+parseInt(_0xd32b50(0x1f1))/0x8+parseInt(_0xd32b50(0x1f2))/0x9+-parseInt(_0xd32b50(0x1ef))/0xa;if(_0x4c0dc1===_0x2a72b3)break;else _0x2d6952['push'](_0x2d6952['shift']());}catch(_0x2ab71c){_0x2d6952['push'](_0x2d6952['shift']());}}}(a80_0xab19,0x545f6));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a80_0x4b1f5f}from'@lovrabet/cli-framework';function a80_0x7c57(_0x356ea8,_0x33a71c){_0x356ea8=_0x356ea8-0x1ed;var _0xab19cd=a80_0xab19();var _0x7c574d=_0xab19cd[_0x356ea8];return _0x7c574d;}export function buildAllFlags(_0x3fada8){return a80_0x4b1f5f(_0x3fada8,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x554ef7,_0x26988f){const _0x4c120e=a81_0x1917,_0x3e1cdb=_0x554ef7();while(!![]){try{const _0x3b95e2=parseInt(_0x4c120e(0x1f3))/0x1*(-parseInt(_0x4c120e(0x1f6))/0x2)+parseInt(_0x4c120e(0x1f1))/0x3*(parseInt(_0x4c120e(0x1ee))/0x4)+-parseInt(_0x4c120e(0x1f4))/0x5*(parseInt(_0x4c120e(0x1ef))/0x6)+parseInt(_0x4c120e(0x1ec))/0x7*(-parseInt(_0x4c120e(0x1f8))/0x8)+parseInt(_0x4c120e(0x1ed))/0x9+parseInt(_0x4c120e(0x1f0))/0xa*(parseInt(_0x4c120e(0x1f7))/0xb)+-parseInt(_0x4c120e(0x1f2))/0xc;if(_0x3b95e2===_0x26988f)break;else _0x3e1cdb['push'](_0x3e1cdb['shift']());}catch(_0x500e92){_0x3e1cdb['push'](_0x3e1cdb['shift']());}}}(a81_0x43a7,0x26fc1));export function dryRun(_0x473253,_0x30582b){const _0xac40e1={'method':_0x473253,'url':_0x30582b},_0x18adec={'body'(_0x441ffc){return _0xac40e1['body']=_0x441ffc,_0x18adec;},'description'(_0x306ef1){const _0x3ebddc=a81_0x1917;return _0xac40e1[_0x3ebddc(0x1f5)]=_0x306ef1,_0x18adec;},'build'(){return{..._0xac40e1};}};return _0x18adec;}function a81_0x1917(_0x2d0231,_0x569504){_0x2d0231=_0x2d0231-0x1ec;const _0x43a752=a81_0x43a7();let _0x191789=_0x43a752[_0x2d0231];return _0x191789;}function a81_0x43a7(){const _0x10fbf4=['851532AgvUGC','755850YrTslB','4390VYbhNA','3kIxYlJ','814356BIyGEE','1217kzWBps','5WpTxfN','description','236LYWqQM','7667jZSlJk','2039288AcklhS','7OjHkyw','2098530nyYeeJ'];a81_0x43a7=function(){return _0x10fbf4;};return a81_0x43a7();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a82_0x110b(_0x8edc9c,_0x5828cf){_0x8edc9c=_0x8edc9c-0x82;const _0x140b86=a82_0x140b();let _0x110bf1=_0x140b86[_0x8edc9c];return _0x110bf1;}(function(_0x1ba273,_0x5e86a8){const _0x55b7e7=a82_0x110b,_0x3d3dba=_0x1ba273();while(!![]){try{const _0x147b88=parseInt(_0x55b7e7(0x86))/0x1+-parseInt(_0x55b7e7(0x87))/0x2*(-parseInt(_0x55b7e7(0x8b))/0x3)+parseInt(_0x55b7e7(0x88))/0x4+-parseInt(_0x55b7e7(0x82))/0x5*(parseInt(_0x55b7e7(0x85))/0x6)+-parseInt(_0x55b7e7(0x89))/0x7+-parseInt(_0x55b7e7(0x8a))/0x8*(-parseInt(_0x55b7e7(0x8c))/0x9)+-parseInt(_0x55b7e7(0x83))/0xa*(parseInt(_0x55b7e7(0x84))/0xb);if(_0x147b88===_0x5e86a8)break;else _0x3d3dba['push'](_0x3d3dba['shift']());}catch(_0x129111){_0x3d3dba['push'](_0x3d3dba['shift']());}}}(a82_0x140b,0xe5bbd));import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers['parseFlags'];export const validateFlags=helpers['validateFlags'];function a82_0x140b(){const _0x1934cb=['9enLVpI','99GWrmLL','10VeFnIE','6710YPcwbR','11561DYARgb','1701306kOggrg','151523YpVwVc','619262pQMyjU','3656232XDVJYg','5486761VfjUJs','729208YcEgFJ'];a82_0x140b=function(){return _0x1934cb;};return a82_0x140b();}
|