@lovrabet/lovrabet-cli 2.1.18-beta.2 → 2.1.18
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.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/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/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.d.ts +7 -14
- 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_0xd56667=a66_0x50bf;(function(_0x23e9fb,_0x1b84fd){const _0x263376=a66_0x50bf,_0x57eb20=_0x23e9fb();while(!![]){try{const _0x3c2034=parseInt(_0x263376(0xdf))/0x1*(parseInt(_0x263376(0xee))/0x2)+-parseInt(_0x263376(0xe0))/0x3*(-parseInt(_0x263376(0xd0))/0x4)+parseInt(_0x263376(0xd9))/0x5+parseInt(_0x263376(0xd7))/0x6*(-parseInt(_0x263376(0xd6))/0x7)+parseInt(_0x263376(0xde))/0x8+parseInt(_0x263376(0xef))/0x9*(parseInt(_0x263376(0xf0))/0xa)+parseInt(_0x263376(0xf2))/0xb*(-parseInt(_0x263376(0xcb))/0xc);if(_0x3c2034===_0x1b84fd)break;else _0x57eb20['push'](_0x57eb20['shift']());}catch(_0x56d238){_0x57eb20['push'](_0x57eb20['shift']());}}}(a66_0xec36,0x8b2bc));function a66_0x50bf(_0x4c682d,_0xae9a6e){_0x4c682d=_0x4c682d-0xc3;const _0xec36cf=a66_0xec36();let _0x50bf07=_0xec36cf[_0x4c682d];return _0x50bf07;}import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a66_0xd56667(0xeb)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a66_0xd56667(0xdd)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':'appcode','type':a66_0xd56667(0xc6),'description':a66_0xd56667(0xcf),'hint':'<code>'},{'name':a66_0xd56667(0xc4),'meowKey':a66_0xd56667(0xc4),'type':'string','description':a66_0xd56667(0xc7),'hint':a66_0xd56667(0xea)},{'name':a66_0xd56667(0xd1),'meowKey':a66_0xd56667(0xd1),'type':a66_0xd56667(0xc6),'description':a66_0xd56667(0xdc),'hint':a66_0xd56667(0xd3)},{'name':a66_0xd56667(0xe5),'meowKey':a66_0xd56667(0xe5),'type':'string','description':a66_0xd56667(0xe8),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a66_0xd56667(0xc6),'description':a66_0xd56667(0xd5),'hint':a66_0xd56667(0xcc)},{'name':'dry-run','meowKey':a66_0xd56667(0xcd),'type':a66_0xd56667(0xe7),'description':'Preview\x20operation\x20without\x20executing'},{'name':a66_0xd56667(0xdb),'meowKey':a66_0xd56667(0xdb),'type':a66_0xd56667(0xe7),'description':a66_0xd56667(0xc9)},{'name':a66_0xd56667(0xf1),'meowKey':a66_0xd56667(0xe1),'type':a66_0xd56667(0xe7),'description':a66_0xd56667(0xd2)},{'name':'global','meowKey':'global','type':a66_0xd56667(0xe7),'description':a66_0xd56667(0xc8)},{'name':'ci','meowKey':'ci','type':a66_0xd56667(0xe7),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a66_0xd56667(0xec),'meowKey':'help','type':a66_0xd56667(0xe7),'description':a66_0xd56667(0xf5)},{'name':'id','meowKey':'id','type':a66_0xd56667(0xc6),'description':a66_0xd56667(0xc3),'hidden':!![]},{'name':a66_0xd56667(0xf4),'meowKey':a66_0xd56667(0xf4),'type':a66_0xd56667(0xc6),'description':a66_0xd56667(0xd8),'hidden':!![]},{'name':'sqlcode','meowKey':a66_0xd56667(0xe9),'type':a66_0xd56667(0xc6),'description':'SQL\x20query\x20code','hidden':!![]},{'name':a66_0xd56667(0xc5),'meowKey':a66_0xd56667(0xc5),'type':a66_0xd56667(0xc6),'description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':a66_0xd56667(0xce),'meowKey':a66_0xd56667(0xce),'type':a66_0xd56667(0xe7),'description':a66_0xd56667(0xe2),'hidden':!![]},{'name':a66_0xd56667(0xd4),'meowKey':'clear','type':a66_0xd56667(0xe7),'description':a66_0xd56667(0xda),'hidden':!![]}];function a66_0xec36(){const _0x1ba76f=['production\x20|\x20development\x20|\x20daily','clear','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','371hxdrgv','2694AYabOK','Name\x20filter','5395505NZoijp','Clear\x20output','yes','Environment','cliDisplayName','2936504cGWINC','61355OFnDIl','6234Nyjhmd','nonInteractive','Verbose\x20output','map','fromEntries','format','appcode','boolean','Output\x20format','sqlcode','<name>','cliBinName','help','type','26aFHsZk','63XpdIiq','559220RSuehd','non-interactive','1276wTCcwt','dry-run','name','Show\x20help','Record\x20ID','app','params','string','Select\x20app\x20profile\x20by\x20name','Use\x20global\x20config\x20scope','Skip\x20confirmation\x20for\x20high-risk\x20writes','meowKey','313932KupKmp','<expr>','dryRun','verbose','Override\x20appcode','1912FXXuNX','env','Force\x20non-interactive\x20mode\x20(CI)'];a66_0xec36=function(){return _0x1ba76f;};return a66_0xec36();}export const PIPELINE_FLAG_NAMES=new Set([a66_0xd56667(0xe6),'app',a66_0xd56667(0xd1),'format','jq',a66_0xd56667(0xf3),a66_0xd56667(0xdb),a66_0xd56667(0xf1),'ci']);export function buildMeowFlags(){const _0x4a6b4e=a66_0xd56667;return Object[_0x4a6b4e(0xe4)](GLOBAL_FLAGS[_0x4a6b4e(0xe3)](_0x4e0d01=>[_0x4e0d01[_0x4a6b4e(0xca)],{'type':_0x4e0d01[_0x4a6b4e(0xed)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x3cf717=a67_0x4343;(function(_0x2fa689,_0x4e01d0){const _0xe0abe3=a67_0x4343,_0x57454e=_0x2fa689();while(!![]){try{const _0xdb0970=-parseInt(_0xe0abe3(0x142))/0x1*(parseInt(_0xe0abe3(0x13f))/0x2)+parseInt(_0xe0abe3(0x143))/0x3*(-parseInt(_0xe0abe3(0x13b))/0x4)+parseInt(_0xe0abe3(0x144))/0x5+parseInt(_0xe0abe3(0x137))/0x6*(-parseInt(_0xe0abe3(0x13d))/0x7)+parseInt(_0xe0abe3(0x138))/0x8*(-parseInt(_0xe0abe3(0x139))/0x9)+parseInt(_0xe0abe3(0x13c))/0xa+parseInt(_0xe0abe3(0x13a))/0xb;if(_0xdb0970===_0x4e01d0)break;else _0x57454e['push'](_0x57454e['shift']());}catch(_0x5268fd){_0x57454e['push'](_0x57454e['shift']());}}}(a67_0x433d,0x44f2c));export const DEFAULT_APP_PROFILE_NAME='main';export const DEFAULT_CONFIG_VALUES={'env':'production','format':a67_0x3cf717(0x141),'locale':a67_0x3cf717(0x13e),'riskLevel':a67_0x3cf717(0x140)};function a67_0x433d(){const _0x3b620a=['603840gjUcBG','110305lgdyBv','1579758sAVAyQ','8MPyIcQ','1149129tthYrr','7395333TlyiNX','4mZJjUk','3377590AWqoat','7JzQRFZ','en-US','314914qqTBlc','write','compress','1sVJjXX'];a67_0x433d=function(){return _0x3b620a;};return a67_0x433d();}function a67_0x4343(_0x34f4ba,_0x21b644){_0x34f4ba=_0x34f4ba-0x137;const _0x433d9d=a67_0x433d();let _0x434357=_0x433d9d[_0x34f4ba];return _0x434357;}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a67_0x3cf717(0x141);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a68_0x5c02(_0x5a5cb0,_0x4dcb25){_0x5a5cb0=_0x5a5cb0-0x75;const _0xd15bd=a68_0xd15b();let _0x5c0298=_0xd15bd[_0x5a5cb0];return _0x5c0298;}const a68_0x1f86ad=a68_0x5c02;(function(_0x17ba5c,_0x177482){const _0x470c91=a68_0x5c02,_0x3a420d=_0x17ba5c();while(!![]){try{const _0x33ebc8=-parseInt(_0x470c91(0x75))/0x1+-parseInt(_0x470c91(0x7c))/0x2+parseInt(_0x470c91(0x7a))/0x3+-parseInt(_0x470c91(0x7e))/0x4*(parseInt(_0x470c91(0x79))/0x5)+parseInt(_0x470c91(0x78))/0x6+parseInt(_0x470c91(0x77))/0x7+parseInt(_0x470c91(0x7b))/0x8;if(_0x33ebc8===_0x177482)break;else _0x3a420d['push'](_0x3a420d['shift']());}catch(_0xed4c79){_0x3a420d['push'](_0x3a420d['shift']());}}}(a68_0xd15b,0xea544));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a68_0x1f86ad(0x7d)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a68_0x1f86ad(0x76)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];function a68_0xd15b(){const _0x268376=['615537KCzphn','skillSource','12173819PogioT','10106442lRpLeY','95ZCsQNI','771069NbXBNW','216296DYyRfb','549932goYsmY','npmPackageName','391004XcIGId'];a68_0xd15b=function(){return _0x268376;};return a68_0xd15b();}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a69_0x1f2485=a69_0xb95d;function a69_0xb95d(_0x14d1ef,_0x2e2a80){_0x14d1ef=_0x14d1ef-0x1d0;const _0x116753=a69_0x1167();let _0xb95d97=_0x116753[_0x14d1ef];return _0xb95d97;}(function(_0xd77760,_0x4574c4){const _0x274957=a69_0xb95d,_0x2b8da6=_0xd77760();while(!![]){try{const _0x25d931=parseInt(_0x274957(0x1dd))/0x1+parseInt(_0x274957(0x1e1))/0x2*(-parseInt(_0x274957(0x1d1))/0x3)+parseInt(_0x274957(0x1d6))/0x4+-parseInt(_0x274957(0x1db))/0x5*(parseInt(_0x274957(0x1e2))/0x6)+parseInt(_0x274957(0x1d8))/0x7*(parseInt(_0x274957(0x1df))/0x8)+-parseInt(_0x274957(0x1e4))/0x9*(parseInt(_0x274957(0x1d0))/0xa)+-parseInt(_0x274957(0x1e0))/0xb*(-parseInt(_0x274957(0x1d9))/0xc);if(_0x25d931===_0x4574c4)break;else _0x2b8da6['push'](_0x2b8da6['shift']());}catch(_0xfb3b97){_0x2b8da6['push'](_0x2b8da6['shift']());}}}(a69_0x1167,0xd76dd));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x9ed496){const _0x36eed7=a69_0xb95d;customApiDomain=_0x9ed496?.[_0x36eed7(0x1da)],customUserDomain=_0x9ed496?.[_0x36eed7(0x1dc)],customRuntimeDomain=_0x9ed496?.[_0x36eed7(0x1e3)],customSkillHubDomain=_0x9ed496?.['skillHubDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x1f2485(0x1de)][a69_0x1f2485(0x1d2)]['user']:PRODUCT_CONFIG['domains']['nonProduction']['user']);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x1f2485(0x1de)]['production'][a69_0x1f2485(0x1d4)]:PRODUCT_CONFIG[a69_0x1f2485(0x1de)]['nonProduction']['api']);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x1f2485(0x1de)][a69_0x1f2485(0x1d2)]['runtime']:PRODUCT_CONFIG[a69_0x1f2485(0x1de)]['nonProduction'][a69_0x1f2485(0x1d5)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a69_0x1f2485(0x1d2)][a69_0x1f2485(0x1d3)]:PRODUCT_CONFIG['domains'][a69_0x1f2485(0x1d7)][a69_0x1f2485(0x1d3)]);function a69_0x1167(){const _0x441947=['1960312xYfTfB','1397ePWjHP','1915054MsTSMQ','20994opwErb','runtimeDomain','99YJSSSb','367150crAOVt','3sdNHZU','production','skillhub','api','runtime','2260992VKwUZw','nonProduction','7KVOrfc','183864xlqsHP','apiDomain','1535nHDeQa','userDomain','561801WqOhjj','domains'];a69_0x1167=function(){return _0x441947;};return a69_0x1167();}
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a70_0x5c99(_0x301800,_0x36fce){_0x301800=_0x301800-0xaf;const _0x901017=a70_0x9010();let _0x5c99a5=_0x901017[_0x301800];return _0x5c99a5;}const a70_0x31661a=a70_0x5c99;(function(_0x1c8b62,_0x278942){const _0x54a72e=a70_0x5c99,_0x5f9183=_0x1c8b62();while(!![]){try{const _0x4cc0c4=-parseInt(_0x54a72e(0xbd))/0x1+-parseInt(_0x54a72e(0xba))/0x2+parseInt(_0x54a72e(0xbc))/0x3*(-parseInt(_0x54a72e(0xb9))/0x4)+parseInt(_0x54a72e(0xb1))/0x5*(parseInt(_0x54a72e(0xb0))/0x6)+-parseInt(_0x54a72e(0xb3))/0x7+-parseInt(_0x54a72e(0xb7))/0x8*(parseInt(_0x54a72e(0xaf))/0x9)+parseInt(_0x54a72e(0xb2))/0xa;if(_0x4cc0c4===_0x278942)break;else _0x5f9183['push'](_0x5f9183['shift']());}catch(_0x3d0716){_0x5f9183['push'](_0x5f9183['shift']());}}}(a70_0x9010,0x79d32));function a70_0x9010(){const _0x19f83a=['893780ZhNgcX','production','81IqxeEi','519092JYuHOg','ENV','1503gUAZAk','24KNanKi','462435JntvEz','30263630tzaPYR','4595486cFzsYy','daily','dev','online','39536QzlEpM','development','66596DlYZjz'];a70_0x9010=function(){return _0x19f83a;};return a70_0x9010();}import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a70_0x31661a(0xbb),a70_0x31661a(0xb8),a70_0x31661a(0xb4)];export function normalizeEnv(_0x2b3320){const _0x2a919b=a70_0x31661a;return _0x2b3320===_0x2a919b(0xb6)?_0x2a919b(0xbb):_0x2b3320;}export function isProduction(_0x2a1b53){const _0x7d9ab4=a70_0x31661a;return normalizeEnv(_0x2a1b53)===_0x7d9ab4(0xbb);}export function isDaily(_0x4d1cf0){const _0x2c3c53=a70_0x31661a;return normalizeEnv(_0x4d1cf0)===_0x2c3c53(0xb4);}export function isDev(_0xce738){const _0x1fe0de=a70_0x31661a,_0x3d3218=normalizeEnv(_0xce738);return _0x3d3218===_0x1fe0de(0xb8)||_0x3d3218===_0x1fe0de(0xb5);}let env=normalizeEnv(productEnv(a70_0x31661a(0xbe))||a70_0x31661a(0xbb));export function getEnv(){return env;}export function initEnv(_0x35a4f3){env=normalizeEnv(_0x35a4f3);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a71_0x36183c=a71_0x1c79;function a71_0x1ac3(){const _0x2710c6=['json','compress','53RgZHkU','18646dVZsNB','180102OSFiAN','273490SIDIfG','4GSFkcA','600RAYwnJ','275EkXghK','5405220sfVzRD','114987BlKpof','5458312Lglnaa','pretty','66qSnAfA','7MJnhql','2380wkGGMW'];a71_0x1ac3=function(){return _0x2710c6;};return a71_0x1ac3();}function a71_0x1c79(_0x5bef9d,_0x3da9c4){_0x5bef9d=_0x5bef9d-0x16d;const _0x1ac390=a71_0x1ac3();let _0x1c7908=_0x1ac390[_0x5bef9d];return _0x1c7908;}(function(_0x4f1b50,_0x16b17e){const _0x49d179=a71_0x1c79,_0x1fdd39=_0x4f1b50();while(!![]){try{const _0x179561=parseInt(_0x49d179(0x17c))/0x1*(parseInt(_0x49d179(0x16d))/0x2)+-parseInt(_0x49d179(0x174))/0x3*(-parseInt(_0x49d179(0x170))/0x4)+-parseInt(_0x49d179(0x179))/0x5*(parseInt(_0x49d179(0x177))/0x6)+parseInt(_0x49d179(0x178))/0x7*(parseInt(_0x49d179(0x175))/0x8)+parseInt(_0x49d179(0x173))/0x9+-parseInt(_0x49d179(0x16f))/0xa*(parseInt(_0x49d179(0x172))/0xb)+-parseInt(_0x49d179(0x171))/0xc*(parseInt(_0x49d179(0x16e))/0xd);if(_0x179561===_0x16b17e)break;else _0x1fdd39['push'](_0x1fdd39['shift']());}catch(_0x268cff){_0x1fdd39['push'](_0x1fdd39['shift']());}}}(a71_0x1ac3,0x69df8));export const OUTPUT_FORMAT_VALUES=[a71_0x36183c(0x17a),a71_0x36183c(0x176),a71_0x36183c(0x17b)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a72_0xa136(_0x90c95e,_0x96c16f){_0x90c95e=_0x90c95e-0x146;const _0x5eed4a=a72_0x5eed();let _0xa13639=_0x5eed4a[_0x90c95e];return _0xa13639;}function a72_0x5eed(){const _0x36ca0f=['https://daily-api.lovrabet.com','legacyEnvPrefixes','Lovrabet\x20User\x20Center','15ZgcAzu','Lovrabet\x20Runtime\x20CLI','3235150mWKfzA','1519593JUwldw','https://runtime.lovrabet.com','205048JMJrid','LOVRABET','138hOudry','1048740aOuWsc','SKIP_NPX_SKILLS','1740484GmYtNx','.lovrabet-runtime.log','732318IqOfqZ','3865vFzZoZ','https://skills-daily.lovrabet.com','cli:lovrabet-runtime','https://daily-runtime.lovrabet.com','map','lovrabet/lovrabet-cli','https://api.lovrabet.com','.lovrabet','https://registry.npmjs.org','27wqVIcW','@lovrabet/lovrabet-cli'];a72_0x5eed=function(){return _0x36ca0f;};return a72_0x5eed();}const a72_0x3fefb1=a72_0xa136;(function(_0x1702ff,_0x299a4a){const _0x4be070=a72_0xa136,_0x554f17=_0x1702ff();while(!![]){try{const _0x5c98f8=-parseInt(_0x4be070(0x150))/0x1*(-parseInt(_0x4be070(0x14a))/0x2)+parseInt(_0x4be070(0x146))/0x3+parseInt(_0x4be070(0x14d))/0x4+parseInt(_0x4be070(0x15e))/0x5*(-parseInt(_0x4be070(0x14f))/0x6)+-parseInt(_0x4be070(0x14b))/0x7+parseInt(_0x4be070(0x148))/0x8*(-parseInt(_0x4be070(0x159))/0x9)+-parseInt(_0x4be070(0x160))/0xa;if(_0x5c98f8===_0x299a4a)break;else _0x554f17['push'](_0x554f17['shift']());}catch(_0xd5bb70){_0x554f17['push'](_0x554f17['shift']());}}}(a72_0x5eed,0x4746e));export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':a72_0x3fefb1(0x15f),'npmPackageName':a72_0x3fefb1(0x15a),'skillSource':a72_0x3fefb1(0x155),'npmRegistryBaseUrl':a72_0x3fefb1(0x158),'envPrefix':a72_0x3fefb1(0x149),'legacyEnvPrefixes':['RABETBASE'],'configFileNames':['.lovrabet.json','.lovrabetrc'],'newConfigFileName':'.lovrabet.json','homeDirName':a72_0x3fefb1(0x157),'logFileName':a72_0x3fefb1(0x14e),'invokeSource':a72_0x3fefb1(0x152),'userCenterDisplayName':a72_0x3fefb1(0x15d),'skipNpxSkillsEnvSuffix':a72_0x3fefb1(0x14c),'domains':{'production':{'user':'https://user.lovrabet.com','api':a72_0x3fefb1(0x156),'runtime':a72_0x3fefb1(0x147),'skillhub':'https://skills.lovrabet.com'},'nonProduction':{'user':'https://user-daily.lovrabet.com','api':a72_0x3fefb1(0x15b),'runtime':a72_0x3fefb1(0x153),'skillhub':a72_0x3fefb1(0x151)}},'accessKeyCreatePath':'/user/ak'};export function productEnvName(_0x5b8d7e){return PRODUCT_CONFIG['envPrefix']+'_'+_0x5b8d7e;}export function productEnvNames(_0x560719){const _0x5ccb29=a72_0x3fefb1;return[productEnvName(_0x560719),...PRODUCT_CONFIG[_0x5ccb29(0x15c)][_0x5ccb29(0x154)](_0x30ccab=>_0x30ccab+'_'+_0x560719)];}export function productEnv(_0x585106){for(const _0x56de00 of productEnvNames(_0x585106)){const _0x38fe40=process.env[_0x56de00];if(_0x38fe40!==undefined)return _0x38fe40;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a73_0x353bb6=a73_0x5da3;(function(_0x27d8da,_0x32f19b){const _0xb43be5=a73_0x5da3,_0x1f59e5=_0x27d8da();while(!![]){try{const _0x409719=parseInt(_0xb43be5(0xc3))/0x1+parseInt(_0xb43be5(0xcc))/0x2+-parseInt(_0xb43be5(0xc7))/0x3+-parseInt(_0xb43be5(0xcb))/0x4*(-parseInt(_0xb43be5(0xcd))/0x5)+parseInt(_0xb43be5(0xca))/0x6+-parseInt(_0xb43be5(0xc8))/0x7*(parseInt(_0xb43be5(0xc6))/0x8)+-parseInt(_0xb43be5(0xc9))/0x9;if(_0x409719===_0x32f19b)break;else _0x1f59e5['push'](_0x1f59e5['shift']());}catch(_0x33d3c6){_0x1f59e5['push'](_0x1f59e5['shift']());}}}(a73_0x24e2,0x25089));function a73_0x5da3(_0x125135,_0x550b04){_0x125135=_0x125135-0xc3;const _0x24e271=a73_0x24e2();let _0x5da362=_0x24e271[_0x125135];return _0x5da362;}export const RISK_LEVEL_VALUES=[a73_0x353bb6(0xc5),a73_0x353bb6(0xc4),'high-risk-write'];function a73_0x24e2(){const _0x120c35=['227577tpIXEp','write','read','24ziJpXB','896430IhPutQ','248437SSEYPE','2086272maTnjw','1546218yxFqdo','189148VEpCcG','417852ENhUET','10QDddxP'];a73_0x24e2=function(){return _0x120c35;};return a73_0x24e2();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a74_0x22e5bd=a74_0x24ea;function a74_0x24ea(_0x24d712,_0x374cc9){_0x24d712=_0x24d712-0x1ca;const _0x594ddc=a74_0x594d();let _0x24ea22=_0x594ddc[_0x24d712];return _0x24ea22;}(function(_0x3a0f14,_0x1ab482){const _0x188f06=a74_0x24ea,_0x5f4104=_0x3a0f14();while(!![]){try{const _0x4e5bcb=parseInt(_0x188f06(0x1d0))/0x1+-parseInt(_0x188f06(0x1cb))/0x2*(parseInt(_0x188f06(0x1d1))/0x3)+parseInt(_0x188f06(0x1d9))/0x4*(-parseInt(_0x188f06(0x1d8))/0x5)+parseInt(_0x188f06(0x1d5))/0x6*(parseInt(_0x188f06(0x1ce))/0x7)+-parseInt(_0x188f06(0x1cf))/0x8*(parseInt(_0x188f06(0x1ca))/0x9)+parseInt(_0x188f06(0x1d2))/0xa+-parseInt(_0x188f06(0x1d3))/0xb*(-parseInt(_0x188f06(0x1cc))/0xc);if(_0x4e5bcb===_0x1ab482)break;else _0x5f4104['push'](_0x5f4104['shift']());}catch(_0x380c69){_0x5f4104['push'](_0x5f4104['shift']());}}}(a74_0x594d,0x351f9));function a74_0x594d(){const _0x3697bc=['accessKeyCreatePath','domains','173785rxyJKl','8aTIUvF','1989WqOMrL','554514sqzuAv','12EBumPm','user','105GbPTbk','6808GnGexr','216510LtzWwY','3OAgfRL','3805560CKASuX','1316689BxnVKE','production','14268EfEagR'];a74_0x594d=function(){return _0x3697bc;};return a74_0x594d();}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a74_0x22e5bd(0x1d7)][a74_0x22e5bd(0x1d4)][a74_0x22e5bd(0x1cd)]+PRODUCT_CONFIG[a74_0x22e5bd(0x1d6)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a75_0x14c7fe=a75_0x48f0;(function(_0x43bafb,_0x1082ac){const _0x458ab5=a75_0x48f0,_0x2eaf3e=_0x43bafb();while(!![]){try{const _0x22b4c4=parseInt(_0x458ab5(0x11f))/0x1+parseInt(_0x458ab5(0x11d))/0x2+parseInt(_0x458ab5(0x118))/0x3+parseInt(_0x458ab5(0xf9))/0x4+-parseInt(_0x458ab5(0xfb))/0x5+-parseInt(_0x458ab5(0x109))/0x6+-parseInt(_0x458ab5(0xfd))/0x7;if(_0x22b4c4===_0x1082ac)break;else _0x2eaf3e['push'](_0x2eaf3e['shift']());}catch(_0x5b6140){_0x2eaf3e['push'](_0x2eaf3e['shift']());}}}(a75_0x3ba7,0xd2990));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';function a75_0x3ba7(){const _0x4ec459=['local-alias','PAGE_SIZE','message','cache','stdin','format','4446172otHPdd','authRequired','7986020YzXqsZ','app','1863876eUhyFA','explicit','locale','cwd','pageSize','setRawMode','APP','.tmp','top-level','read','env','project','9398022EVHBNe','missing','nonInteractive','find','code','daily','error','./constant/env.js','values','defaultApp','string','online','setRawCommand','global','trim','2739639XAOhSX','true','write','accessKey','production','1808890WQnjJn','skillHubDomain','1363216GRStTz','development','userDomain','./constant/domain.js','EXDEV','parse','apiDomain','newConfigFileName','globalConfig','object','utf8','isRaw','stringify','argv','raw','host','projectConfig','APPCODE','ACCESS_KEY','high-risk-write','setLogPath','apps','runtimeDomain','riskLevel','EPERM','appcode','join','isTTY','maxRisk','some','inherit'];a75_0x3ba7=function(){return _0x4ec459;};return a75_0x3ba7();}import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a75_0x14c7fe(0x126)];function resolveConfigPath(_0x152fed){for(const _0x384e63 of CONFIG_NAMES){const _0x35b836=resolve(_0x152fed,_0x384e63);if(existsSync(_0x35b836))return _0x35b836;}return undefined;}export function resolveWriteConfigPath(_0x812901){const _0x1afd55=a75_0x14c7fe,_0x306580=_0x812901===_0x1afd55(0x108)?process[_0x1afd55(0x100)]():homedir(),_0x2ac8b3=resolveConfigPath(_0x306580);return _0x2ac8b3??resolve(_0x306580,NEW_CONFIG_NAME);}export function readConfigFile(_0x571288){try{if(existsSync(_0x571288)){const _0x3fe23c=readFileSync(_0x571288,{'encoding':'utf8'});if(_0x3fe23c){const _0x255f32=JSON['parse'](_0x3fe23c);return migrateOnlineEnv(_0x571288,_0x255f32),_0x255f32;}}}catch{}return{};}function migrateOnlineEnv(_0x2e5465,_0x2cd94c){const _0x9ccc41=a75_0x14c7fe;let _0x30a67d=![];_0x2cd94c[_0x9ccc41(0x107)]===_0x9ccc41(0x114)&&(_0x2cd94c[_0x9ccc41(0x107)]=_0x9ccc41(0x11c),_0x30a67d=!![]);if(_0x2cd94c[_0x9ccc41(0xe9)]&&typeof _0x2cd94c[_0x9ccc41(0xe9)]==='object')for(const _0x3ebc27 of Object[_0x9ccc41(0x111)](_0x2cd94c[_0x9ccc41(0xe9)])){_0x3ebc27&&_0x3ebc27[_0x9ccc41(0x107)]===_0x9ccc41(0x114)&&(_0x3ebc27[_0x9ccc41(0x107)]=_0x9ccc41(0x11c),_0x30a67d=!![]);}if(_0x30a67d)try{writeConfigFile(_0x2e5465,_0x2cd94c);}catch{}}export function writeConfigFile(_0x20dd5c,_0x15ce8c){const _0x14de98=a75_0x14c7fe,_0x2d0057=dirname(_0x20dd5c);!existsSync(_0x2d0057)&&mkdirSync(_0x2d0057,{'recursive':!![]});const _0x30d272=_0x20dd5c+_0x14de98(0x104);try{writeFileSync(_0x30d272,JSON[_0x14de98(0xe0)](_0x15ce8c,null,0x2)+'\x0a',{'encoding':_0x14de98(0xde),'mode':0x180});try{renameSync(_0x30d272,_0x20dd5c);}catch(_0xae710e){if(_0xae710e[_0x14de98(0x10d)]===_0x14de98(0xec)||_0xae710e[_0x14de98(0x10d)]===_0x14de98(0x123)||_0xae710e[_0x14de98(0x10d)]==='EACCES'){writeFileSync(_0x20dd5c,JSON[_0x14de98(0xe0)](_0x15ce8c,null,0x2)+'\x0a',{'encoding':_0x14de98(0xde)});try{unlinkSync(_0x30d272);}catch{}}else throw _0xae710e;}}catch(_0x14d296){try{unlinkSync(_0x30d272);}catch{}throw _0x14d296;}}export function isNonInteractiveMode(_0x1d4325){const _0x531693=a75_0x14c7fe;return!!(_0x1d4325[_0x531693(0x10b)]||_0x1d4325['ci']||productEnvNames('CI')[_0x531693(0xf1)](_0x4d804b=>process.env[_0x4d804b]===_0x531693(0x119))||process.env.CI===_0x531693(0x119)||!process['stdout'][_0x531693(0xef)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x589904=a75_0x14c7fe;if(!process[_0x589904(0xf7)][_0x589904(0xef)])return![];try{const _0x466f63=process[_0x589904(0xf7)][_0x589904(0xdf)];return process[_0x589904(0xf7)][_0x589904(0x102)](!![]),process[_0x589904(0xf7)][_0x589904(0x102)](_0x466f63??![]),!![];}catch{return![];}}export async function createContext(_0x572027){const _0xd4aabb=a75_0x14c7fe,_0x2f07bc=readRawConfig(),_0x11ddfe=buildConfig(_0x2f07bc,_0x572027);await initGlobalEnvironment(_0x11ddfe);const {getUserDomain:_0x5da4f4,getApiDomain:_0x550127}=await import('./constant/domain.js'),_0x10c61b={'apiDomain':_0x550127(),'userDomain':_0x5da4f4()},_0x50f3f3=await buildAuth(_0x11ddfe);logger[_0xd4aabb(0xe8)](process[_0xd4aabb(0x100)]());const _0xfb8b07=(CLI_BIN_NAME+'\x20'+process[_0xd4aabb(0xe1)]['slice'](0x2)[_0xd4aabb(0xee)]('\x20'))[_0xd4aabb(0x117)]();logger[_0xd4aabb(0x115)](_0xfb8b07);const _0x471b9c=isNonInteractiveMode(_0x572027);return{'config':_0x11ddfe,'auth':_0x50f3f3,'logger':logger,'env':_0x10c61b,'nonInteractive':_0x471b9c};}export function buildConfigFromFlags(_0x16988f){return buildConfig(readRawConfig(),_0x16988f);}export function getLocalAppAliases(_0x2021ab){const _0x421076=a75_0x14c7fe;return _0x2021ab[_0x421076(0xe9)]&&typeof _0x2021ab['apps']===_0x421076(0xdd)?_0x2021ab['apps']:{};}export function resolveLocalAppAliasCode(_0xc82f8,_0x3310cc){const _0x785df8=a75_0x14c7fe;if(!_0x3310cc)return undefined;const _0x2a5016=getLocalAppAliases(_0xc82f8)[_0x3310cc],_0x28de89=_0x2a5016?.['appcode'];return typeof _0x28de89===_0x785df8(0x113)&&_0x28de89[_0x785df8(0x117)]()?_0x28de89['trim']():undefined;}export function readAppCodeFromConfig(){const _0x2fae28=a75_0x14c7fe,_0x407ba3=readRawConfig(),_0x130730=_0x407ba3['appcode']??_0x407ba3['app'];if(typeof _0x130730===_0x2fae28(0x113)&&_0x130730['trim']())return _0x130730[_0x2fae28(0x117)]();const _0x30cddb=resolveLocalAppAliasCode(_0x407ba3,typeof _0x407ba3[_0x2fae28(0x112)]==='string'?_0x407ba3[_0x2fae28(0x112)]:undefined);if(_0x30cddb)return _0x30cddb;const _0x62fb7e=normalizeEnv(String(_0x407ba3[_0x2fae28(0x107)]||'production')),_0xee8e58=isDaily(_0x62fb7e)?_0x2fae28(0x10e):isDev(_0x62fb7e)?'development':_0x2fae28(0x11c),_0x1f9ccd=resolveCachedAppCode(typeof _0x407ba3['defaultApp']===_0x2fae28(0x113)?_0x407ba3[_0x2fae28(0x112)]:undefined,_0xee8e58,typeof _0x407ba3[_0x2fae28(0x11b)]==='string'?_0x407ba3[_0x2fae28(0x11b)]:undefined);if(_0x1f9ccd)return _0x1f9ccd;const _0x3ae434=Object[_0x2fae28(0x111)](getLocalAppAliases(_0x407ba3))[_0x2fae28(0x10c)](_0x39ab18=>_0x39ab18?.[_0x2fae28(0xed)]);return typeof _0x3ae434?.[_0x2fae28(0xed)]===_0x2fae28(0x113)&&_0x3ae434[_0x2fae28(0xed)][_0x2fae28(0x117)]()?_0x3ae434[_0x2fae28(0xed)][_0x2fae28(0x117)]():undefined;}export function readScopedConfig(_0x52f124){const _0x5bb73c=a75_0x14c7fe,_0x58061f=_0x52f124[_0x5bb73c(0x116)]?'global':_0x5bb73c(0x108);return readConfigFile(resolveWriteConfigPath(_0x58061f));}export function writeScopedConfig(_0x57cbc5,_0x299435){const _0x3eccfb=a75_0x14c7fe,_0x3094ec=_0x299435[_0x3eccfb(0x116)]?_0x3eccfb(0x116):'project';writeConfigFile(resolveWriteConfigPath(_0x3094ec),_0x57cbc5);}export async function initGlobalEnvironment(_0x421366){const _0x9637b6=a75_0x14c7fe,{initEnv:_0x1a197d}=await import(_0x9637b6(0x110));_0x1a197d(_0x421366[_0x9637b6(0x107)]);const {initDomains:_0x53429f}=await import(_0x9637b6(0x122));_0x53429f({'apiDomain':_0x421366[_0x9637b6(0xe2)][_0x9637b6(0x125)]||_0x421366['raw'][_0x9637b6(0xe3)]||undefined,'userDomain':_0x421366[_0x9637b6(0xe2)][_0x9637b6(0x121)]||undefined,'runtimeDomain':_0x421366[_0x9637b6(0xe2)][_0x9637b6(0xea)]||undefined,'skillHubDomain':_0x421366['raw'][_0x9637b6(0x11e)]||undefined});}export function getProjectConfigPath(){const _0x3e0cfb=a75_0x14c7fe;return resolveConfigPath(process[_0x3e0cfb(0x100)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x5ab1da){const _0x2978d0=a75_0x14c7fe;if(!existsSync(_0x5ab1da))return{'status':_0x2978d0(0x10a)};try{const _0x20d72a=readFileSync(_0x5ab1da,{'encoding':'utf8'});if(!_0x20d72a?.[_0x2978d0(0x117)]())return{'status':'empty'};const _0x2d6c55=JSON[_0x2978d0(0x124)](_0x20d72a);return{'status':'ok','data':_0x2d6c55};}catch(_0x4ba04e){return{'status':_0x2978d0(0x10f),'message':_0x4ba04e instanceof Error?_0x4ba04e[_0x2978d0(0xf5)]:String(_0x4ba04e)};}}export function loadRawConfigLayers(_0x37dd28){const _0x38708b=a75_0x14c7fe;let _0x4293a4={},_0x4956ea={},_0xe0fc1f,_0x30eacd;try{_0xe0fc1f=resolveConfigPath(homedir());if(_0xe0fc1f){const _0x47940f=readFileSync(_0xe0fc1f,{'encoding':_0x38708b(0xde)});if(_0x47940f)_0x4293a4=JSON[_0x38708b(0x124)](_0x47940f);}}catch{}try{const _0x3884bf=_0x37dd28||process['cwd']();_0x30eacd=resolveConfigPath(_0x3884bf);if(_0x30eacd){const _0x650533=readFileSync(_0x30eacd,{'encoding':_0x38708b(0xde)});if(_0x650533)_0x4956ea=JSON[_0x38708b(0x124)](_0x650533);}}catch{}return{'globalPath':_0xe0fc1f,'projectPath':_0x30eacd,'globalConfig':_0x4293a4,'projectConfig':_0x4956ea};}function mergeRawConfigLayers(_0x57cfe8){const _0x4cec67=a75_0x14c7fe,{globalConfig:_0x6fac9a,projectConfig:_0x2e7730}=_0x57cfe8;if(_0x2e7730['inherit']===![]){const _0xd341a7={..._0x2e7730};return delete _0xd341a7[_0x4cec67(0xf2)],_0xd341a7;}const _0x5b1b6e={..._0x6fac9a,..._0x2e7730};if(_0x4cec67(0x112)in _0x2e7730)_0x5b1b6e['defaultApp']=_0x2e7730['defaultApp'];else _0x6fac9a[_0x4cec67(0x112)]&&(_0x5b1b6e[_0x4cec67(0x112)]=_0x6fac9a['defaultApp']);return _0x5b1b6e;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x3eaad1){return mergeRawConfigLayers(loadRawConfigLayers(_0x3eaad1));}export function readRawConfigWithLayers(_0x38a734){const _0x973797=loadRawConfigLayers(_0x38a734);return{'config':mergeRawConfigLayers(_0x973797),'layers':_0x973797};}export function resolveDefaultAppSource(_0x26bf6f){const _0x364fd9=a75_0x14c7fe;if(_0x364fd9(0x112)in _0x26bf6f[_0x364fd9(0xe4)])return _0x364fd9(0x108);if(_0x26bf6f[_0x364fd9(0xe4)]['inherit']===![])return null;if(_0x26bf6f[_0x364fd9(0x127)]['defaultApp'])return _0x364fd9(0x116);return null;}function buildConfig(_0x4a7a02,_0x5793b9){const _0x323ccb=a75_0x14c7fe,_0x5c6975=_0x4a7a02[_0x323ccb(0x112)]||undefined,_0x499247=_0x5793b9[_0x323ccb(0xfc)]||env(_0x323ccb(0x103))||undefined,_0x3bd542=_0x499247||_0x5c6975||undefined,_0x547c95=env(_0x323ccb(0xe6))||_0x4a7a02['accessKey']||undefined,_0x436575=_0x5793b9[_0x323ccb(0x107)]||env('ENV')||_0x4a7a02[_0x323ccb(0x107)]||DEFAULT_CONFIG_VALUES[_0x323ccb(0x107)],_0x523062=normalizeEnv(String(_0x436575)),_0x221904=isDaily(_0x523062)?_0x323ccb(0x10e):isDev(_0x523062)?_0x323ccb(0x120):_0x323ccb(0x11c),_0x2cc163=typeof _0x5793b9[_0x323ccb(0xed)]==='string'?_0x5793b9[_0x323ccb(0xed)]:undefined,_0x337058=env(_0x323ccb(0xe5)),_0x2fb30d=_0x499247?undefined:_0x4a7a02[_0x323ccb(0xed)]||_0x4a7a02[_0x323ccb(0xfc)]||undefined,_0x2b17db=_0x499247||(_0x2fb30d?undefined:_0x5c6975),_0x46be0d=resolveLocalAppAliasCode(_0x4a7a02,_0x2b17db),_0x77196e=resolveCachedAppCode(_0x2b17db,_0x221904,_0x547c95),_0x3f251a=_0x2cc163||_0x337058||_0x2fb30d||_0x46be0d||_0x77196e||undefined,_0x3f8899=_0x2cc163?_0x323ccb(0xfe):_0x337058?_0x323ccb(0x107):_0x2fb30d?_0x323ccb(0x105):_0x46be0d?_0x323ccb(0xf3):_0x77196e?_0x323ccb(0xf6):undefined,_0x433a84=_0x4a7a02[_0x323ccb(0xff)]||DEFAULT_CONFIG_VALUES['locale'],_0x1892f9=undefined,_0x12734b=_0x5793b9[_0x323ccb(0xf8)]||env('FORMAT')||_0x4a7a02[_0x323ccb(0xf8)],_0x32bb8b=normalizeLegacyOutputFormat(_0x12734b),_0x1e365d=env(_0x323ccb(0xf4))||_0x4a7a02[_0x323ccb(0x101)],_0x5bf931=_0x1e365d?Number(_0x1e365d)||undefined:undefined,_0x5998c8=_0x4a7a02[_0x323ccb(0xeb)]||_0x4a7a02[_0x323ccb(0xf0)],_0x472d63=_0x5998c8===_0x323ccb(0x106)||_0x5998c8===_0x323ccb(0x11a)||_0x5998c8===_0x323ccb(0xe7)?_0x5998c8:DEFAULT_CONFIG_VALUES[_0x323ccb(0xeb)],_0x22f075=env('VERBOSE'),_0x1974af=_0x22f075==='1'||_0x22f075===_0x323ccb(0x119);return{'appCode':typeof _0x3f251a==='string'&&_0x3f251a[_0x323ccb(0x117)]()?_0x3f251a[_0x323ccb(0x117)]():undefined,'appCodeSource':_0x3f8899,'env':_0x221904,'locale':_0x433a84,'cookie':_0x1892f9,'accessKey':_0x547c95,'format':_0x32bb8b,'pageSize':_0x5bf931,'riskLevel':_0x472d63,'verbose':_0x1974af,'defaultApp':_0x5c6975,'currentApp':typeof _0x3bd542===_0x323ccb(0x113)?_0x3bd542:undefined,'raw':_0x4a7a02};}function env(_0x5da0ee){return productEnv(_0x5da0ee);}function a75_0x48f0(_0xbcf39c,_0xffea25){_0xbcf39c=_0xbcf39c-0xdd;const _0x3ba709=a75_0x3ba7();let _0x48f09a=_0x3ba709[_0xbcf39c];return _0x48f09a;}async function buildAuth(_0x267b62){const _0xe162dc=a75_0x14c7fe,_0x34d2e1='',_0x1ef96c=!!_0x267b62[_0xe162dc(0x11b)];return{'cookie':_0x34d2e1,'isLoggedIn':_0x1ef96c,async 'getOrLogin'(){const _0x528820=_0xe162dc;if(_0x1ef96c)return _0x34d2e1;throw CliErrors[_0x528820(0xfa)]();}};}
|
|
1
|
+
const a75_0x511901=a75_0x3d0e;(function(_0x4dfaf2,_0x152fa6){const _0x40f836=a75_0x3d0e,_0x5bbbbc=_0x4dfaf2();while(!![]){try{const _0x217907=parseInt(_0x40f836(0x11b))/0x1*(parseInt(_0x40f836(0x11c))/0x2)+-parseInt(_0x40f836(0x131))/0x3*(-parseInt(_0x40f836(0xf6))/0x4)+parseInt(_0x40f836(0x132))/0x5+parseInt(_0x40f836(0x134))/0x6*(-parseInt(_0x40f836(0x112))/0x7)+-parseInt(_0x40f836(0x106))/0x8*(parseInt(_0x40f836(0x11f))/0x9)+parseInt(_0x40f836(0x123))/0xa+parseInt(_0x40f836(0xfa))/0xb;if(_0x217907===_0x152fa6)break;else _0x5bbbbc['push'](_0x5bbbbc['shift']());}catch(_0x151bd3){_0x5bbbbc['push'](_0x5bbbbc['shift']());}}}(a75_0x4ad1,0x9840b));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a75_0x4ad1(){const _0xeb282a=['cwd','values','405823qllCyf','global','write','apps','join','userDomain','authRequired','configFileNames','EXDEV','online','development','production','282592yIkkhd','trim','inherit','appcode','code','riskLevel','./constant/domain.js','project','some','missing','nonInteractive','./constant/env.js','7kNspAe','empty','error','daily','maxRisk','object','newConfigFileName','defaultApp','EPERM','123437UZzFyf','8ftiNfa','pageSize','message','279mTNHow','globalConfig','locale','string','4977660DLaMDF','raw','ENV','runtimeDomain','setRawCommand','projectConfig','host','stringify','EACCES','.tmp','cache','env','format','setLogPath','2637WetRuz','1135750JQeIIn','explicit','1936272VUKvPw','parse','APP','isTTY','skillHubDomain','setRawMode','FORMAT','slice','true','high-risk-write','VERBOSE','accessKey','stdin','3576LcJQje','utf8'];a75_0x4ad1=function(){return _0xeb282a;};return a75_0x4ad1();}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_0x511901(0x101)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a75_0x511901(0x118)];function resolveConfigPath(_0x4fd447){for(const _0x580ea9 of CONFIG_NAMES){const _0x3e1722=resolve(_0x4fd447,_0x580ea9);if(existsSync(_0x3e1722))return _0x3e1722;}return undefined;}export function resolveWriteConfigPath(_0x77ef91){const _0x313859=a75_0x511901,_0x264d64=_0x77ef91===_0x313859(0x10d)?process[_0x313859(0xf8)]():homedir(),_0x41e1cc=resolveConfigPath(_0x264d64);return _0x41e1cc??resolve(_0x264d64,NEW_CONFIG_NAME);}export function readConfigFile(_0xe95620){const _0x2ea12e=a75_0x511901;try{if(existsSync(_0xe95620)){const _0x9d234e=readFileSync(_0xe95620,{'encoding':_0x2ea12e(0xf7)});if(_0x9d234e){const _0x1e08a5=JSON[_0x2ea12e(0x135)](_0x9d234e);return migrateOnlineEnv(_0xe95620,_0x1e08a5),_0x1e08a5;}}}catch{}return{};}function migrateOnlineEnv(_0x1e467b,_0x1f065d){const _0xe0eb55=a75_0x511901;let _0xba649d=![];_0x1f065d[_0xe0eb55(0x12e)]===_0xe0eb55(0x103)&&(_0x1f065d['env']=_0xe0eb55(0x105),_0xba649d=!![]);if(_0x1f065d[_0xe0eb55(0xfd)]&&typeof _0x1f065d[_0xe0eb55(0xfd)]==='object')for(const _0x299395 of Object[_0xe0eb55(0xf9)](_0x1f065d[_0xe0eb55(0xfd)])){_0x299395&&_0x299395[_0xe0eb55(0x12e)]===_0xe0eb55(0x103)&&(_0x299395[_0xe0eb55(0x12e)]='production',_0xba649d=!![]);}if(_0xba649d)try{writeConfigFile(_0x1e467b,_0x1f065d);}catch{}}export function writeConfigFile(_0x34504b,_0x137ed2){const _0x4e6ab6=a75_0x511901,_0x384bfe=dirname(_0x34504b);!existsSync(_0x384bfe)&&mkdirSync(_0x384bfe,{'recursive':!![]});const _0x5d2f14=_0x34504b+_0x4e6ab6(0x12c);try{writeFileSync(_0x5d2f14,JSON['stringify'](_0x137ed2,null,0x2)+'\x0a',{'encoding':_0x4e6ab6(0xf7),'mode':0x180});try{renameSync(_0x5d2f14,_0x34504b);}catch(_0x434d16){if(_0x434d16[_0x4e6ab6(0x10a)]===_0x4e6ab6(0x11a)||_0x434d16[_0x4e6ab6(0x10a)]===_0x4e6ab6(0x102)||_0x434d16['code']===_0x4e6ab6(0x12b)){writeFileSync(_0x34504b,JSON[_0x4e6ab6(0x12a)](_0x137ed2,null,0x2)+'\x0a',{'encoding':_0x4e6ab6(0xf7)});try{unlinkSync(_0x5d2f14);}catch{}}else throw _0x434d16;}}catch(_0x162684){try{unlinkSync(_0x5d2f14);}catch{}throw _0x162684;}}export function isNonInteractiveMode(_0x5737b6){const _0x547e57=a75_0x511901;return!!(_0x5737b6[_0x547e57(0x110)]||_0x5737b6['ci']||productEnvNames('CI')[_0x547e57(0x10e)](_0x2c587d=>process.env[_0x2c587d]==='true')||process.env.CI==='true'||!process['stdout']['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x382fd4=a75_0x511901;if(!process['stdin'][_0x382fd4(0x137)])return![];try{const _0xd4de49=process['stdin']['isRaw'];return process[_0x382fd4(0x140)][_0x382fd4(0x139)](!![]),process['stdin'][_0x382fd4(0x139)](_0xd4de49??![]),!![];}catch{return![];}}export async function createContext(_0x1ea2b2){const _0x4dd06e=a75_0x511901,_0x1875d1=readRawConfig(),_0x537d7e=buildConfig(_0x1875d1,_0x1ea2b2);await initGlobalEnvironment(_0x537d7e);const {getUserDomain:_0x103b14,getApiDomain:_0x3cf62a}=await import(_0x4dd06e(0x10c)),_0x353934={'apiDomain':_0x3cf62a(),'userDomain':_0x103b14()},_0x4ff20d=await buildAuth(_0x537d7e);logger[_0x4dd06e(0x130)](process[_0x4dd06e(0xf8)]());const _0x268851=(CLI_BIN_NAME+'\x20'+process['argv'][_0x4dd06e(0x13b)](0x2)[_0x4dd06e(0xfe)]('\x20'))['trim']();logger[_0x4dd06e(0x127)](_0x268851);const _0x52b00f=isNonInteractiveMode(_0x1ea2b2);return{'config':_0x537d7e,'auth':_0x4ff20d,'logger':logger,'env':_0x353934,'nonInteractive':_0x52b00f};}export function buildConfigFromFlags(_0x2bc1b3){return buildConfig(readRawConfig(),_0x2bc1b3);}export function getLocalAppAliases(_0x1ac461){const _0x230cb6=a75_0x511901;return _0x1ac461[_0x230cb6(0xfd)]&&typeof _0x1ac461[_0x230cb6(0xfd)]===_0x230cb6(0x117)?_0x1ac461[_0x230cb6(0xfd)]:{};}export function resolveLocalAppAliasCode(_0x221550,_0x1fa3cb){const _0xbfa3e4=a75_0x511901;if(!_0x1fa3cb)return undefined;const _0x19f83e=getLocalAppAliases(_0x221550)[_0x1fa3cb],_0x5279f1=_0x19f83e?.[_0xbfa3e4(0x109)];return typeof _0x5279f1===_0xbfa3e4(0x122)&&_0x5279f1[_0xbfa3e4(0x107)]()?_0x5279f1['trim']():undefined;}export function readAppCodeFromConfig(){const _0x55cb1b=a75_0x511901,_0x1aa679=readRawConfig(),_0x3f901d=_0x1aa679[_0x55cb1b(0x109)]??_0x1aa679['app'];if(typeof _0x3f901d===_0x55cb1b(0x122)&&_0x3f901d[_0x55cb1b(0x107)]())return _0x3f901d[_0x55cb1b(0x107)]();const _0x44aebc=resolveLocalAppAliasCode(_0x1aa679,typeof _0x1aa679[_0x55cb1b(0x119)]===_0x55cb1b(0x122)?_0x1aa679[_0x55cb1b(0x119)]:undefined);if(_0x44aebc)return _0x44aebc;const _0x6c2312=normalizeEnv(String(_0x1aa679[_0x55cb1b(0x12e)]||_0x55cb1b(0x105))),_0x2dd8a8=isDaily(_0x6c2312)?_0x55cb1b(0x115):isDev(_0x6c2312)?_0x55cb1b(0x104):'production',_0x59c53f=resolveCachedAppCode(typeof _0x1aa679[_0x55cb1b(0x119)]===_0x55cb1b(0x122)?_0x1aa679[_0x55cb1b(0x119)]:undefined,_0x2dd8a8,typeof _0x1aa679[_0x55cb1b(0x13f)]===_0x55cb1b(0x122)?_0x1aa679[_0x55cb1b(0x13f)]:undefined);if(_0x59c53f)return _0x59c53f;const _0x5d99bc=Object[_0x55cb1b(0xf9)](getLocalAppAliases(_0x1aa679))['find'](_0x5e7254=>_0x5e7254?.['appcode']);return typeof _0x5d99bc?.[_0x55cb1b(0x109)]===_0x55cb1b(0x122)&&_0x5d99bc[_0x55cb1b(0x109)]['trim']()?_0x5d99bc['appcode'][_0x55cb1b(0x107)]():undefined;}export function readScopedConfig(_0x594b4b){const _0x11848b=a75_0x511901,_0x71c253=_0x594b4b[_0x11848b(0xfb)]?_0x11848b(0xfb):'project';return readConfigFile(resolveWriteConfigPath(_0x71c253));}export function writeScopedConfig(_0x1782fe,_0x5c66ef){const _0x1be120=a75_0x511901,_0x3343e5=_0x5c66ef[_0x1be120(0xfb)]?_0x1be120(0xfb):_0x1be120(0x10d);writeConfigFile(resolveWriteConfigPath(_0x3343e5),_0x1782fe);}export async function initGlobalEnvironment(_0x192215){const _0x4c484c=a75_0x511901,{initEnv:_0x15fa1c}=await import(_0x4c484c(0x111));_0x15fa1c(_0x192215[_0x4c484c(0x12e)]);const {initDomains:_0x3b2b96}=await import(_0x4c484c(0x10c));_0x3b2b96({'apiDomain':_0x192215[_0x4c484c(0x124)]['apiDomain']||_0x192215[_0x4c484c(0x124)][_0x4c484c(0x129)]||undefined,'userDomain':_0x192215[_0x4c484c(0x124)][_0x4c484c(0xff)]||undefined,'runtimeDomain':_0x192215[_0x4c484c(0x124)][_0x4c484c(0x126)]||undefined,'skillHubDomain':_0x192215[_0x4c484c(0x124)][_0x4c484c(0x138)]||undefined});}export function getProjectConfigPath(){const _0x46edd3=a75_0x511901;return resolveConfigPath(process[_0x46edd3(0xf8)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x185d07){const _0x422969=a75_0x511901;if(!existsSync(_0x185d07))return{'status':_0x422969(0x10f)};try{const _0x2e5f11=readFileSync(_0x185d07,{'encoding':'utf8'});if(!_0x2e5f11?.[_0x422969(0x107)]())return{'status':_0x422969(0x113)};const _0x2d3c1b=JSON['parse'](_0x2e5f11);return{'status':'ok','data':_0x2d3c1b};}catch(_0x1a52be){return{'status':_0x422969(0x114),'message':_0x1a52be instanceof Error?_0x1a52be[_0x422969(0x11e)]:String(_0x1a52be)};}}export function loadRawConfigLayers(_0x38db83){const _0x2c5cea=a75_0x511901;let _0x994076={},_0xbe12d8={},_0x3dab45,_0x244d82;try{_0x3dab45=resolveConfigPath(homedir());if(_0x3dab45){const _0x7e78e4=readFileSync(_0x3dab45,{'encoding':_0x2c5cea(0xf7)});if(_0x7e78e4)_0x994076=JSON[_0x2c5cea(0x135)](_0x7e78e4);}}catch{}try{const _0x4a6e2a=_0x38db83||process[_0x2c5cea(0xf8)]();_0x244d82=resolveConfigPath(_0x4a6e2a);if(_0x244d82){const _0x24567d=readFileSync(_0x244d82,{'encoding':_0x2c5cea(0xf7)});if(_0x24567d)_0xbe12d8=JSON[_0x2c5cea(0x135)](_0x24567d);}}catch{}return{'globalPath':_0x3dab45,'projectPath':_0x244d82,'globalConfig':_0x994076,'projectConfig':_0xbe12d8};}function mergeRawConfigLayers(_0x361c64){const _0x1fbecd=a75_0x511901,{globalConfig:_0x913769,projectConfig:_0xe2f24f}=_0x361c64;if(_0xe2f24f['inherit']===![]){const _0x3c450d={..._0xe2f24f};return delete _0x3c450d['inherit'],_0x3c450d;}const _0x3fa92e={..._0x913769,..._0xe2f24f};if('defaultApp'in _0xe2f24f)_0x3fa92e[_0x1fbecd(0x119)]=_0xe2f24f[_0x1fbecd(0x119)];else _0x913769[_0x1fbecd(0x119)]&&(_0x3fa92e[_0x1fbecd(0x119)]=_0x913769[_0x1fbecd(0x119)]);return _0x3fa92e;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x45c7f5){return mergeRawConfigLayers(loadRawConfigLayers(_0x45c7f5));}function a75_0x3d0e(_0x37be1f,_0x4012f6){_0x37be1f=_0x37be1f-0xf6;const _0x4ad11b=a75_0x4ad1();let _0x3d0ec5=_0x4ad11b[_0x37be1f];return _0x3d0ec5;}export function readRawConfigWithLayers(_0x1cb19e){const _0x1104ee=loadRawConfigLayers(_0x1cb19e);return{'config':mergeRawConfigLayers(_0x1104ee),'layers':_0x1104ee};}export function resolveDefaultAppSource(_0x1e7a03){const _0x529ac6=a75_0x511901;if(_0x529ac6(0x119)in _0x1e7a03['projectConfig'])return'project';if(_0x1e7a03[_0x529ac6(0x128)][_0x529ac6(0x108)]===![])return null;if(_0x1e7a03[_0x529ac6(0x120)]['defaultApp'])return _0x529ac6(0xfb);return null;}function buildConfig(_0x2e0c34,_0x1821e1){const _0x3f6227=a75_0x511901,_0x4ad1fc=_0x2e0c34['defaultApp']||undefined,_0x32987d=_0x1821e1['app']||env(_0x3f6227(0x136))||undefined,_0x22ce93=_0x32987d||_0x4ad1fc||undefined,_0x1760d6=env('ACCESS_KEY')||_0x2e0c34[_0x3f6227(0x13f)]||undefined,_0x222762=_0x1821e1[_0x3f6227(0x12e)]||env(_0x3f6227(0x125))||_0x2e0c34[_0x3f6227(0x12e)]||DEFAULT_CONFIG_VALUES[_0x3f6227(0x12e)],_0x3bcd93=normalizeEnv(String(_0x222762)),_0x59f767=isDaily(_0x3bcd93)?_0x3f6227(0x115):isDev(_0x3bcd93)?_0x3f6227(0x104):'production',_0x3e0840=typeof _0x1821e1[_0x3f6227(0x109)]===_0x3f6227(0x122)?_0x1821e1[_0x3f6227(0x109)]:undefined,_0x37fe10=env('APPCODE'),_0x5e318=_0x32987d?undefined:_0x2e0c34[_0x3f6227(0x109)]||_0x2e0c34['app']||undefined,_0x51e1ec=_0x32987d||(_0x5e318?undefined:_0x4ad1fc),_0x1b72e3=resolveLocalAppAliasCode(_0x2e0c34,_0x51e1ec),_0x18162b=resolveCachedAppCode(_0x51e1ec,_0x59f767,_0x1760d6),_0x3a02c0=_0x3e0840||_0x37fe10||_0x5e318||_0x1b72e3||_0x18162b||undefined,_0x531a5c=_0x3e0840?_0x3f6227(0x133):_0x37fe10?_0x3f6227(0x12e):_0x5e318?'top-level':_0x1b72e3?'local-alias':_0x18162b?_0x3f6227(0x12d):undefined,_0x89fedc=_0x2e0c34['locale']||DEFAULT_CONFIG_VALUES[_0x3f6227(0x121)],_0x4799de=undefined,_0x1f72e1=_0x1821e1['format']||env(_0x3f6227(0x13a))||_0x2e0c34[_0x3f6227(0x12f)],_0x2bb789=normalizeLegacyOutputFormat(_0x1f72e1),_0x50b5c2=env('PAGE_SIZE')||_0x2e0c34[_0x3f6227(0x11d)],_0x13527a=_0x50b5c2?Number(_0x50b5c2)||undefined:undefined,_0x2dc3c9=_0x2e0c34[_0x3f6227(0x10b)]||_0x2e0c34[_0x3f6227(0x116)],_0x1d94de=_0x2dc3c9==='read'||_0x2dc3c9===_0x3f6227(0xfc)||_0x2dc3c9===_0x3f6227(0x13d)?_0x2dc3c9:DEFAULT_CONFIG_VALUES[_0x3f6227(0x10b)],_0x4101c4=env(_0x3f6227(0x13e)),_0x4f072d=_0x4101c4==='1'||_0x4101c4===_0x3f6227(0x13c);return{'appCode':typeof _0x3a02c0===_0x3f6227(0x122)&&_0x3a02c0[_0x3f6227(0x107)]()?_0x3a02c0['trim']():undefined,'appCodeSource':_0x531a5c,'env':_0x59f767,'locale':_0x89fedc,'cookie':_0x4799de,'accessKey':_0x1760d6,'format':_0x2bb789,'pageSize':_0x13527a,'riskLevel':_0x1d94de,'verbose':_0x4f072d,'defaultApp':_0x4ad1fc,'currentApp':typeof _0x22ce93===_0x3f6227(0x122)?_0x22ce93:undefined,'raw':_0x2e0c34};}function env(_0x10111d){return productEnv(_0x10111d);}async function buildAuth(_0x978234){const _0xb280e='',_0x553129=!!_0x978234['accessKey'];return{'cookie':_0xb280e,'isLoggedIn':_0x553129,async 'getOrLogin'(){const _0x2ec1a6=a75_0x3d0e;if(_0x553129)return _0xb280e;throw CliErrors[_0x2ec1a6(0x100)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4e166d,_0x27bb90){const _0x2b591c=a76_0x10a8,_0xbea22=_0x4e166d();while(!![]){try{const _0xa75a8=-parseInt(_0x2b591c(0x195))/0x1+parseInt(_0x2b591c(0x129))/0x2+-parseInt(_0x2b591c(0x1b0))/0x3+-parseInt(_0x2b591c(0x150))/0x4*(parseInt(_0x2b591c(0x186))/0x5)+parseInt(_0x2b591c(0x11f))/0x6*(-parseInt(_0x2b591c(0x142))/0x7)+-parseInt(_0x2b591c(0x1b9))/0x8*(-parseInt(_0x2b591c(0x12f))/0x9)+parseInt(_0x2b591c(0x140))/0xa;if(_0xa75a8===_0x27bb90)break;else _0xbea22['push'](_0xbea22['shift']());}catch(_0x357137){_0xbea22['push'](_0xbea22['shift']());}}}(a76_0x75c2,0xeebd5));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(_0x25d074){_activeAK=_0x25d074||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0xbca451){const _0x101b53=a76_0x10a8;for(const _0x3a1b52 of _0xbca451){if(typeof _0x3a1b52==='string'&&_0x3a1b52[_0x101b53(0x143)]())return _0x3a1b52[_0x101b53(0x143)]();}return undefined;}async function decodeResponseBody(_0x5eb98a){const _0x48a238=a76_0x10a8;if(typeof _0x5eb98a[_0x48a238(0x16d)]===_0x48a238(0x197))try{const _0x2156ad=await _0x5eb98a[_0x48a238(0x16d)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x2156ad),'text':_0x2156ad};}catch{return{'isJson':![],'text':_0x2156ad[_0x48a238(0x143)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x5eb98a[_0x48a238(0x12a)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x92e400,_0x3f8dac,_0x112ba7){const _0x19d101=a76_0x10a8,_0x4b8518=_0x3f8dac&&typeof _0x3f8dac===_0x19d101(0x155)?_0x3f8dac:{},_0x7320e4=[_0x4b8518['status'],_0x4b8518[_0x19d101(0x131)]][_0x19d101(0x158)](_0x473eca=>Number(_0x473eca)===0x1ad),_0x1d257e=createRateLimitError({'status':_0x92e400[_0x19d101(0x1a2)]===0x1ad?_0x92e400[_0x19d101(0x1a2)]:_0x7320e4??_0x92e400[_0x19d101(0x1a2)],'errorCode':firstString(_0x4b8518[_0x19d101(0x1ae)],typeof _0x4b8518[_0x19d101(0x131)]===_0x19d101(0x1b7)?_0x4b8518[_0x19d101(0x131)]:undefined),'message':firstString(_0x4b8518[_0x19d101(0x122)],_0x4b8518['message'],_0x4b8518[_0x19d101(0x196)],_0x112ba7),'retryAfter':readRetryAfter(_0x92e400[_0x19d101(0x14e)])??readRetryAfterSeconds(_0x3f8dac)});if(_0x1d257e)throw _0x1d257e;}async function apiRequest(_0x2437f0,_0x19adaf={}){const _0x5d3067=a76_0x10a8,{method:method=_0x5d3067(0x1a8),body:_0x323f52,headers:headers={},timeout:timeout=0x7530}=_0x19adaf,_0xc10dca=_activeAK,_0x5bd51b=getRuntimeDomain();if(!_0xc10dca)throw CliErrors[_0x5d3067(0x12d)](_0x5d3067(0x16e)+PRODUCT_CONFIG[_0x5d3067(0x14a)]+'.');const _0x49b573=''+_0x5bd51b+_0x2437f0,_0x34729f={'X-User-AK':_0xc10dca},_0x3a5705=new AbortController(),_0x30aeda=setTimeout(()=>_0x3a5705[_0x5d3067(0x128)](),timeout);try{const _0x14c59e=await fetch(_0x49b573,{'method':method,'headers':{'Content-Type':_0x5d3067(0x16b),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x34729f,...headers},'body':_0x323f52?JSON[_0x5d3067(0x168)](_0x323f52):undefined,'signal':_0x3a5705[_0x5d3067(0x18a)]}),_0x59d3a6=await decodeResponseBody(_0x14c59e);if(!_0x59d3a6[_0x5d3067(0x156)]){throwIfRateLimited(_0x14c59e,undefined,_0x59d3a6[_0x5d3067(0x16d)]);throw CliErrors[_0x5d3067(0x190)](_0x5d3067(0x172)+_0x14c59e['status']+')',_0x14c59e[_0x5d3067(0x1a2)]>=0x190?_0x5d3067(0x167):undefined);}const _0xe0c28f=_0x59d3a6[_0x5d3067(0x132)];throwIfRateLimited(_0x14c59e,_0xe0c28f);if(!_0x14c59e['ok']||_0xe0c28f[_0x5d3067(0x164)]===![])throw CliErrors[_0x5d3067(0x190)](_0xe0c28f[_0x5d3067(0x122)]||_0xe0c28f[_0x5d3067(0x14b)]||_0x5d3067(0x1b6)+_0x14c59e[_0x5d3067(0x1a2)],_0xe0c28f[_0x5d3067(0x1ae)]?_0x5d3067(0x17b)+_0xe0c28f[_0x5d3067(0x1ae)]:undefined);return _0xe0c28f;}catch(_0x211c2a){if(_0x211c2a instanceof Error&&_0x211c2a[_0x5d3067(0x19f)]===_0x5d3067(0x138))throw CliErrors['apiError'](_0x5d3067(0x133)+_0x49b573);throw _0x211c2a;}finally{clearTimeout(_0x30aeda);}}async function apiBinaryRequest(_0x5e8ac7,_0x91c6bb={}){const _0x2c24d7=a76_0x10a8,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x91c6bb,_0x42b9c5=_activeAK,_0x3a4a04=getRuntimeDomain();if(!_0x42b9c5)throw CliErrors['authRequired'](_0x2c24d7(0x16e)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x16726d=''+_0x3a4a04+_0x5e8ac7,_0x17663e=new AbortController(),_0x5ba368=setTimeout(()=>_0x17663e['abort'](),timeout);try{const _0x560441=await fetch(_0x16726d,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x2c24d7(0x19e)],'X-User-AK':_0x42b9c5,...headers},'signal':_0x17663e[_0x2c24d7(0x18a)]});if(!_0x560441['ok']){const _0x4dc522=await decodeResponseBody(_0x560441),_0x1fd1db=_0x4dc522[_0x2c24d7(0x132)]&&typeof _0x4dc522[_0x2c24d7(0x132)]==='object'?_0x4dc522[_0x2c24d7(0x132)]:{},_0x3dd662=firstString(_0x1fd1db[_0x2c24d7(0x122)],_0x1fd1db[_0x2c24d7(0x14b)],_0x1fd1db[_0x2c24d7(0x1ae)],_0x4dc522[_0x2c24d7(0x16d)]);throwIfRateLimited(_0x560441,_0x4dc522[_0x2c24d7(0x132)],_0x3dd662);throw CliErrors['apiError'](_0x3dd662||_0x2c24d7(0x1b6)+_0x560441[_0x2c24d7(0x1a2)],'Download\x20failed:\x20'+_0x16726d);}return Buffer['from'](await _0x560441['arrayBuffer']());}catch(_0x57f7e5){if(_0x57f7e5 instanceof Error&&_0x57f7e5['name']===_0x2c24d7(0x138))throw CliErrors['apiError'](_0x2c24d7(0x133)+_0x16726d);throw _0x57f7e5;}finally{clearTimeout(_0x5ba368);}}async function apiFormRequest(_0x4d7a50,_0x3ccdad,_0x2e644d={}){const _0x4f8bcf=a76_0x10a8,{timeout:timeout=0x7530}=_0x2e644d,_0x29964a=_activeAK,_0x3df321=getRuntimeDomain();if(!_0x29964a)throw CliErrors['authRequired'](_0x4f8bcf(0x16e)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x423212=''+_0x3df321+_0x4d7a50,_0x253112=new AbortController(),_0x20c1ac=setTimeout(()=>_0x253112['abort'](),timeout);try{const _0x177115=await fetch(_0x423212,{'method':'POST','headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x4f8bcf(0x19e)],'X-User-AK':_0x29964a},'body':_0x3ccdad,'signal':_0x253112[_0x4f8bcf(0x18a)]}),_0x2eb60a=await decodeResponseBody(_0x177115);if(!_0x2eb60a[_0x4f8bcf(0x156)]){throwIfRateLimited(_0x177115,undefined,_0x2eb60a['text']);throw CliErrors[_0x4f8bcf(0x190)](_0x4f8bcf(0x172)+_0x177115['status']+')',_0x177115['status']>=0x190?_0x4f8bcf(0x167):undefined);}const _0x5042ba=_0x2eb60a[_0x4f8bcf(0x132)];throwIfRateLimited(_0x177115,_0x5042ba);if(!_0x177115['ok']||_0x5042ba[_0x4f8bcf(0x164)]===![])throw CliErrors[_0x4f8bcf(0x190)](_0x5042ba[_0x4f8bcf(0x122)]||_0x5042ba[_0x4f8bcf(0x14b)]||'API\x20error:\x20'+_0x177115[_0x4f8bcf(0x1a2)],_0x5042ba[_0x4f8bcf(0x1ae)]?'API\x20error\x20code:\x20'+_0x5042ba[_0x4f8bcf(0x1ae)]:undefined);return _0x5042ba;}catch(_0x195247){if(_0x195247 instanceof Error&&_0x195247['name']===_0x4f8bcf(0x138))throw CliErrors[_0x4f8bcf(0x190)](_0x4f8bcf(0x133)+_0x423212);throw _0x195247;}finally{clearTimeout(_0x20c1ac);}}async function toolboxRequest(_0x541598,_0x22e8af,_0x613ea6={}){const _0x43b935=a76_0x10a8,{method:method=_0x43b935(0x1a8),headers:headers={},timeout:timeout=0x7530}=_0x613ea6,_0x3a9509=_activeAK;if(!_0x3a9509)throw CliErrors[_0x43b935(0x12d)](_0x43b935(0x16e)+PRODUCT_CONFIG[_0x43b935(0x14a)]+'.');const _0x5553cf=getApiDomain()[_0x43b935(0x147)](/\/$/,''),_0x3ba636=new URL(_0x541598,_0x5553cf+_0x43b935(0x11d));if(_0x22e8af)for(const [_0x121f06,_0x4cb2a3]of Object[_0x43b935(0x144)](_0x22e8af)){_0x4cb2a3!==undefined&&_0x4cb2a3!==null&&_0x3ba636['searchParams'][_0x43b935(0x1b3)](_0x121f06,String(_0x4cb2a3));}const _0x5391f4=new AbortController(),_0x2d93ec=setTimeout(()=>_0x5391f4['abort'](),timeout);try{const _0x228475=await fetch(_0x3ba636,{'method':method,'headers':{'Content-Type':_0x43b935(0x16b),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x3a9509,...headers},'signal':_0x5391f4[_0x43b935(0x18a)]}),_0x1b49cb=await decodeResponseBody(_0x228475);if(!_0x1b49cb[_0x43b935(0x156)]){throwIfRateLimited(_0x228475,undefined,_0x1b49cb[_0x43b935(0x16d)]);throw CliErrors[_0x43b935(0x190)](_0x43b935(0x177)+_0x228475[_0x43b935(0x1a2)]+')',_0x228475[_0x43b935(0x1a2)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x5a7978=_0x1b49cb[_0x43b935(0x132)];throwIfRateLimited(_0x228475,_0x5a7978);if(!_0x228475['ok']){const _0x195655=_0x5a7978&&typeof _0x5a7978==='object'?_0x5a7978:{};throw CliErrors[_0x43b935(0x190)](_0x195655[_0x43b935(0x122)]||_0x195655[_0x43b935(0x14b)]||_0x43b935(0x125)+_0x228475[_0x43b935(0x1a2)],_0x195655[_0x43b935(0x1ae)]?_0x43b935(0x15c)+_0x195655[_0x43b935(0x1ae)]:undefined);}if(_0x5a7978&&typeof _0x5a7978===_0x43b935(0x155)&&'success'in _0x5a7978&&typeof _0x5a7978[_0x43b935(0x164)]===_0x43b935(0x13b)){const _0x6cc252=_0x5a7978;if(!_0x6cc252['success'])throw CliErrors['apiError'](_0x6cc252[_0x43b935(0x122)]||_0x6cc252[_0x43b935(0x14b)]||_0x43b935(0x17f),_0x6cc252[_0x43b935(0x1ae)]?'Toolbox\x20error\x20code:\x20'+_0x6cc252['errorCode']:undefined);return _0x6cc252[_0x43b935(0x132)];}return _0x5a7978;}catch(_0x1f42b0){if(_0x1f42b0 instanceof Error&&_0x1f42b0[_0x43b935(0x19f)]===_0x43b935(0x138))throw CliErrors[_0x43b935(0x190)](_0x43b935(0x133)+_0x3ba636[_0x43b935(0x17c)]());throw _0x1f42b0;}finally{clearTimeout(_0x2d93ec);}}async function skillHubJsonRequest(_0x2d5bef,_0x17d012={}){const _0x15def5=a76_0x10a8,{method:method=_0x15def5(0x1a8),query:_0x561cfe,body:_0x18a381,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x17d012,_0x44cda7=_activeAK;if(!_0x44cda7)throw CliErrors[_0x15def5(0x12d)](_0x15def5(0x16e)+PRODUCT_CONFIG[_0x15def5(0x14a)]+'.');const _0x28d7ae=getSkillHubDomain()['replace'](/\/$/,''),_0x2ba4d3=new URL(_0x2d5bef,_0x28d7ae+'/');if(_0x561cfe)for(const [_0x4b6c71,_0x55f0f6]of Object[_0x15def5(0x144)](_0x561cfe)){_0x55f0f6!==undefined&&_0x55f0f6!==null&&_0x2ba4d3['searchParams']['set'](_0x4b6c71,String(_0x55f0f6));}const _0x2e7550=new AbortController(),_0x500091=setTimeout(()=>_0x2e7550[_0x15def5(0x128)](),timeout);try{const _0x1e19fa=await fetch(_0x2ba4d3[_0x15def5(0x17c)](),{'method':method,'headers':{'Accept':_0x15def5(0x16b),'X-Invoke-Source':PRODUCT_CONFIG[_0x15def5(0x19e)],'X-User-AK':_0x44cda7,...headers},'body':_0x18a381,'signal':_0x2e7550['signal']}),_0x8dc795=await decodeResponseBody(_0x1e19fa);if(!_0x8dc795[_0x15def5(0x156)]){if(allowNotFound&&_0x1e19fa[_0x15def5(0x1a2)]===0x194)return undefined;throwIfRateLimited(_0x1e19fa,undefined,_0x8dc795[_0x15def5(0x16d)]);throw CliErrors[_0x15def5(0x190)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x1e19fa[_0x15def5(0x1a2)]+')',_0x1e19fa[_0x15def5(0x1a2)]>=0x190?_0x15def5(0x167):undefined);}const _0x50550c=_0x8dc795[_0x15def5(0x132)];throwIfRateLimited(_0x1e19fa,_0x50550c);if(allowNotFound&&isSkillHubNotFoundResponse(_0x1e19fa[_0x15def5(0x1a2)],_0x50550c))return undefined;const _0x326941=!_0x1e19fa['ok']||_0x50550c?.[_0x15def5(0x164)]===![]||typeof _0x50550c?.[_0x15def5(0x131)]===_0x15def5(0x15d)&&_0x50550c[_0x15def5(0x131)]>=0x190;if(_0x326941)throw CliErrors['apiError'](_0x50550c?.[_0x15def5(0x122)]||_0x50550c?.[_0x15def5(0x14b)]||_0x50550c?.[_0x15def5(0x196)]||'SkillHub\x20API\x20error:\x20'+_0x1e19fa[_0x15def5(0x1a2)],_0x50550c?.[_0x15def5(0x1ae)]?'SkillHub\x20error\x20code:\x20'+_0x50550c[_0x15def5(0x1ae)]:undefined);return _0x50550c?.[_0x15def5(0x132)]??_0x50550c;}catch(_0x9ad9ba){if(_0x9ad9ba instanceof Error&&_0x9ad9ba['name']==='AbortError')throw CliErrors[_0x15def5(0x190)]('Request\x20timeout:\x20'+_0x2ba4d3[_0x15def5(0x17c)]());throw _0x9ad9ba;}finally{clearTimeout(_0x500091);}}function isSkillHubNotFoundResponse(_0x879609,_0x3af4ec){const _0x47e562=a76_0x10a8;if(_0x879609===0x194||_0x3af4ec?.[_0x47e562(0x131)]===0x194)return!![];if(_0x879609!==0x190&&_0x3af4ec?.['code']!==0x190)return![];const _0x4ed8d1=[_0x3af4ec?.[_0x47e562(0x196)],_0x3af4ec?.['message'],_0x3af4ec?.['errorMsg'],_0x3af4ec?.[_0x47e562(0x1aa)]][_0x47e562(0x176)](_0x1c2e95=>typeof _0x1c2e95===_0x47e562(0x1b7))[_0x47e562(0x185)]('\x20');return/skill not found\b/i['test'](_0x4ed8d1);}async function skillHubBinaryRequest(_0xf9987,_0x18290c={}){const _0x253f0a=a76_0x10a8,{query:_0x4ca81e,headers:headers={},timeout:timeout=0x7530}=_0x18290c,_0x49f94d=_activeAK;if(!_0x49f94d)throw CliErrors[_0x253f0a(0x12d)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x253f0a(0x14a)]+'.');const _0x41d043=getSkillHubDomain()[_0x253f0a(0x147)](/\/$/,''),_0x4c59bc=new URL(_0xf9987,_0x41d043+'/');if(_0x4ca81e)for(const [_0x3215b3,_0x2989ac]of Object[_0x253f0a(0x144)](_0x4ca81e)){_0x2989ac!==undefined&&_0x2989ac!==null&&_0x4c59bc[_0x253f0a(0x14c)]['set'](_0x3215b3,String(_0x2989ac));}const _0x1f19f3=new AbortController(),_0x23f245=setTimeout(()=>_0x1f19f3['abort'](),timeout);try{const _0x2882bc=await fetch(_0x4c59bc[_0x253f0a(0x17c)](),{'method':_0x253f0a(0x1a8),'headers':{'Accept':_0x253f0a(0x1ab),'X-Invoke-Source':PRODUCT_CONFIG[_0x253f0a(0x19e)],'X-User-AK':_0x49f94d,...headers},'signal':_0x1f19f3['signal']});if(!_0x2882bc['ok']){const _0x802f0b=await decodeResponseBody(_0x2882bc),_0x34c24b=_0x802f0b['data']&&typeof _0x802f0b[_0x253f0a(0x132)]===_0x253f0a(0x155)?_0x802f0b[_0x253f0a(0x132)]:{},_0x4e0e0c=firstString(_0x34c24b[_0x253f0a(0x122)],_0x34c24b[_0x253f0a(0x14b)],_0x34c24b[_0x253f0a(0x196)],_0x34c24b[_0x253f0a(0x1ae)],_0x802f0b['text']);throwIfRateLimited(_0x2882bc,_0x802f0b['data'],_0x4e0e0c);throw CliErrors[_0x253f0a(0x190)](_0x4e0e0c||_0x253f0a(0x170)+_0x2882bc['status'],'Download\x20failed:\x20'+_0x4c59bc['toString']());}return Buffer[_0x253f0a(0x16f)](await _0x2882bc[_0x253f0a(0x1af)]());}catch(_0x2e0062){if(_0x2e0062 instanceof Error&&_0x2e0062['name']===_0x253f0a(0x138))throw CliErrors['apiError'](_0x253f0a(0x133)+_0x4c59bc['toString']());throw _0x2e0062;}finally{clearTimeout(_0x23f245);}}export async function getBffEndpointContract(_0x5ca55e,_0x237198){const _0x333a21=a76_0x10a8;if(_0x237198==='functions')throw CliErrors[_0x333a21(0x146)]('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x5ca55e+_0x333a21(0x161)+_0x237198);const _0xc12e2d=await apiRequest(_0x333a21(0x163)+encodeURIComponent(_0x5ca55e)+'/'+encodeURIComponent(_0x237198)),_0x122270=_0xc12e2d[_0x333a21(0x132)];if(!_0x122270||typeof _0x122270!==_0x333a21(0x155)||Array[_0x333a21(0x178)](_0x122270)||_0x122270['appCode']!==_0x5ca55e||_0x122270[_0x333a21(0x141)]!==_0x237198)throw CliErrors[_0x333a21(0x146)](_0x333a21(0x182)+_0x5ca55e+_0x333a21(0x161)+_0x237198);return{'appCode':_0x122270['appCode'],'functionName':_0x122270[_0x333a21(0x141)],'description':_0x122270[_0x333a21(0x165)],'version':_0x122270[_0x333a21(0x15b)],'gmtModified':_0x122270[_0x333a21(0x1a6)]};}export async function getSqlQueryInfo(_0x2f39c5,_0x99fc03){const _0x5923c6=a76_0x10a8,_0x5de1e2=await apiRequest('/client/sql/query',{'method':'POST','body':{'appCode':_0x2f39c5,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x99fc03}}),_0x3e096b=_0x5de1e2[_0x5923c6(0x132)],_0x5e6b13=_0x3e096b&&typeof _0x3e096b===_0x5923c6(0x155)&&'tableData'in _0x3e096b?_0x3e096b[_0x5923c6(0x180)]?.[0x0]:_0x3e096b&&typeof _0x3e096b===_0x5923c6(0x155)&&_0x5923c6(0x18f)in _0x3e096b?_0x3e096b:undefined;if(!_0x5e6b13)throw CliErrors['validation']('SQL\x20query\x20not\x20found:\x20'+_0x99fc03);return _0x5e6b13;}function isRemoteAppItem(_0x3bdf34){const _0x5871d6=a76_0x10a8;return!!_0x3bdf34&&typeof _0x3bdf34===_0x5871d6(0x155)&&typeof _0x3bdf34[_0x5871d6(0x13e)]===_0x5871d6(0x1b7)&&typeof _0x3bdf34['appName']===_0x5871d6(0x1b7);}function extractRemoteAppItems(_0x415877){const _0xba1cae=a76_0x10a8;if(Array[_0xba1cae(0x178)](_0x415877))return _0x415877[_0xba1cae(0x176)](isRemoteAppItem);if(!_0x415877||typeof _0x415877!==_0xba1cae(0x155))throw CliErrors[_0xba1cae(0x190)](_0xba1cae(0x174));const _0x5467d6=_0x415877;if(Array['isArray'](_0x5467d6[_0xba1cae(0x180)]))return _0x5467d6[_0xba1cae(0x180)][_0xba1cae(0x176)](isRemoteAppItem);if(_0x5467d6[_0xba1cae(0x132)]&&typeof _0x5467d6[_0xba1cae(0x132)]==='object'){const _0x84dcb9=_0x5467d6[_0xba1cae(0x132)];if(Array[_0xba1cae(0x178)](_0x84dcb9[_0xba1cae(0x180)]))return _0x84dcb9[_0xba1cae(0x180)][_0xba1cae(0x176)](isRemoteAppItem);}throw CliErrors[_0xba1cae(0x190)](_0xba1cae(0x1a5));}export async function getMyApps(){const _0x3bfdd2=a76_0x10a8,_0x2cb3d7=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x2cb3d7[_0x3bfdd2(0x132)]);}export async function getLoginUserInfo(){const _0x434fd3=a76_0x10a8,_0x5c027c=await apiRequest(_0x434fd3(0x17a));if(!_0x5c027c[_0x434fd3(0x132)]||typeof _0x5c027c[_0x434fd3(0x132)]!==_0x434fd3(0x155)||Array['isArray'](_0x5c027c['data']))throw CliErrors[_0x434fd3(0x190)](_0x434fd3(0x17e));return _0x5c027c[_0x434fd3(0x132)];}function runtimeSchedulePath(_0x1d6dfc,_0x258e89=''){const _0x3f8543=a76_0x10a8;return _0x3f8543(0x169)+encodeURIComponent(_0x1d6dfc)+'/schedules'+_0x258e89;}export async function validateRuntimeSchedule(_0x447bec,_0x1d3daf){const _0x1a92fc=a76_0x10a8,_0x43c457=await apiRequest(runtimeSchedulePath(_0x447bec,_0x1a92fc(0x148)),{'method':_0x1a92fc(0x17d),'body':_0x1d3daf});return _0x43c457['data'];}export async function createRuntimeSchedule(_0x1c4cca,_0x3eaad7){const _0x5dd319=await apiRequest(runtimeSchedulePath(_0x1c4cca),{'method':'POST','body':_0x3eaad7});return _0x5dd319['data'];}export async function listRuntimeSchedules(_0x216df7,_0x489f39={}){const _0x56c141=a76_0x10a8,_0x2e8154=new URLSearchParams();if(_0x489f39[_0x56c141(0x1ac)]!==undefined)_0x2e8154['set'](_0x56c141(0x1ac),String(_0x489f39[_0x56c141(0x1ac)]));if(_0x489f39[_0x56c141(0x193)])_0x2e8154[_0x56c141(0x1b3)]('cursor',_0x489f39[_0x56c141(0x193)]);const _0x32b517=_0x2e8154[_0x56c141(0x19a)]>0x0?'?'+_0x2e8154['toString']():'',_0x2374a7=await apiRequest(''+runtimeSchedulePath(_0x216df7)+_0x32b517);return _0x2374a7[_0x56c141(0x132)];}export async function getRuntimeSchedule(_0x4cb5b4,_0x171501){const _0xf0bbab=a76_0x10a8,_0x548fc1=await apiRequest(runtimeSchedulePath(_0x4cb5b4,'/'+encodeURIComponent(_0x171501)));return _0x548fc1[_0xf0bbab(0x132)];}export async function deleteRuntimeSchedule(_0x2ef502,_0x426093){const _0x55ab57=a76_0x10a8,_0xbd6283=await apiRequest(runtimeSchedulePath(_0x2ef502,'/'+encodeURIComponent(_0x426093)),{'method':_0x55ab57(0x136)});return _0xbd6283[_0x55ab57(0x132)];}export async function runRuntimeSchedule(_0x54a14d,_0x4ad435){const _0x11357b=a76_0x10a8,_0x5687fe=await apiRequest(runtimeSchedulePath(_0x54a14d,'/'+encodeURIComponent(_0x4ad435)+_0x11357b(0x1b5)),{'method':_0x11357b(0x17d)});return _0x5687fe[_0x11357b(0x132)];}export async function listDatasets(_0x4c82ed,_0x3db8ec){const _0xb84097=a76_0x10a8,_0x394a34=await apiRequest(_0xb84097(0x13a),{'method':_0xb84097(0x17d),'body':{'appCode':_0x4c82ed,..._0x3db8ec?.['code']&&{'code':_0x3db8ec[_0xb84097(0x131)]},..._0x3db8ec?.[_0xb84097(0x19f)]&&{'name':_0x3db8ec[_0xb84097(0x19f)]}}});return extractList(_0x394a34[_0xb84097(0x132)]);}export async function getDatasetDetail(_0x2e7de9){const _0x51cd6c=a76_0x10a8,_0x34b239=await apiRequest(_0x51cd6c(0x18c)+encodeURIComponent(_0x2e7de9));return _0x34b239[_0x51cd6c(0x132)];}export async function getDatasetSdkUsageDoc(_0x1fe33f,_0x5eaeb6){const _0x40aec2=a76_0x10a8,_0xc6451e=await toolboxRequest(_0x40aec2(0x135),{'datasetCode':_0x1fe33f,'appCode':_0x5eaeb6});return typeof _0xc6451e?.[_0x40aec2(0x189)]===_0x40aec2(0x1b7)?_0xc6451e[_0x40aec2(0x189)]:'';}export async function uploadRuntimeFile(_0x5779f6,_0x3cebf4){const _0x14c708=a76_0x10a8,_0xc64217=await readFile(_0x3cebf4),_0x4a1663=new FormData();_0x4a1663['append']('appCode',_0x5779f6),_0x4a1663[_0x14c708(0x15a)](_0x14c708(0x1b1),new Blob([new Uint8Array(_0xc64217)]),basename(_0x3cebf4));const _0x3331ec=await apiFormRequest(_0x14c708(0x154),_0x4a1663);return _0x3331ec[_0x14c708(0x132)];}export async function queryRuntimeFileUrl(_0x52f4c1,_0x453ca7={}){const _0x2f2e43=a76_0x10a8,_0x2b2fba=await apiRequest(_0x2f2e43(0x183),{'method':_0x2f2e43(0x17d),'body':{'filePath':_0x52f4c1,'downloadFlag':_0x453ca7[_0x2f2e43(0x139)]??![],..._0x453ca7[_0x2f2e43(0x18b)]?{'longTerm':!![]}:{}}});return _0x2b2fba[_0x2f2e43(0x132)];}export async function recognizeRuntimeOcr(_0x342eae,_0x7978f7){const _0x2a36c0=a76_0x10a8,_0x5a0cfa=await apiRequest(_0x2a36c0(0x19d),{'method':_0x2a36c0(0x17d),'body':{'appCode':_0x342eae,'url':_0x7978f7['url'],'type':_0x7978f7[_0x2a36c0(0x12b)]}});return _0x5a0cfa[_0x2a36c0(0x132)];}export async function getRuntimeAppConfigByKey(_0x4e7c76,_0x570336){const _0xbeaab1=a76_0x10a8,_0x512802=new URLSearchParams({'appCode':_0x4e7c76,'key':_0x570336}),_0x45d76e=await apiRequest('/client/app-config/getByKey?'+_0x512802[_0xbeaab1(0x17c)]());if(typeof _0x45d76e[_0xbeaab1(0x132)]!==_0xbeaab1(0x1b7))throw CliErrors['validation']('Invalid\x20app\x20config\x20value:\x20key='+_0x570336);return _0x45d76e[_0xbeaab1(0x132)];}export async function listRuntimeArtifacts(_0x3d3dac,_0x262549){const _0x1d7d9b=a76_0x10a8,_0x3c4074=new URLSearchParams({'appCode':_0x3d3dac});if(_0x262549?.[_0x1d7d9b(0x1a7)])_0x3c4074[_0x1d7d9b(0x1b3)](_0x1d7d9b(0x1a7),_0x262549[_0x1d7d9b(0x1a7)]);if(_0x262549?.['source'])_0x3c4074[_0x1d7d9b(0x1b3)](_0x1d7d9b(0x188),_0x262549['source']);if(_0x262549?.[_0x1d7d9b(0x179)]!==undefined)_0x3c4074[_0x1d7d9b(0x1b3)]('favorite',String(_0x262549[_0x1d7d9b(0x179)]));const _0x14b6f2=await apiRequest(_0x1d7d9b(0x18d)+_0x3c4074['toString']());return Array[_0x1d7d9b(0x178)](_0x14b6f2[_0x1d7d9b(0x132)])?_0x14b6f2[_0x1d7d9b(0x132)]:[];}export async function getRuntimeArtifact(_0x4151de,_0x17917d){const _0x3dee00=a76_0x10a8,_0x1b151d=await apiRequest(_0x3dee00(0x175)+_0x4151de+_0x3dee00(0x166)+encodeURIComponent(_0x17917d));if(!_0x1b151d[_0x3dee00(0x132)])throw CliErrors[_0x3dee00(0x146)](_0x3dee00(0x19b)+_0x4151de);return _0x1b151d[_0x3dee00(0x132)];}export async function createRuntimeArtifact(_0x26b5ae,_0xaa3438){const _0x377228=a76_0x10a8,_0x374755=await apiRequest(_0x377228(0x1a0),{'method':_0x377228(0x17d),'body':{'appCode':_0x26b5ae,..._0xaa3438}});return _0x374755[_0x377228(0x132)];}export async function updateRuntimeArtifact(_0x4819c2,_0x2277a1,_0x4cd55d){const _0x291f02=a76_0x10a8,_0x54e869=await apiRequest(_0x291f02(0x175)+_0x4819c2+_0x291f02(0x191),{'method':_0x291f02(0x17d),'body':{'appCode':_0x2277a1,..._0x4cd55d}});return _0x54e869[_0x291f02(0x132)];}export async function listPersonalBffs(_0x50de95){const _0x2f595a=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x50de95));return Array['isArray'](_0x2f595a['data'])?_0x2f595a['data']:[];}export async function getPersonalBff(_0x322dfb,_0x57a14c){const _0x49ee09=a76_0x10a8,_0x328fc3=await apiRequest(_0x49ee09(0x159)+_0x322dfb+_0x49ee09(0x166)+encodeURIComponent(_0x57a14c));if(!_0x328fc3['data'])throw CliErrors[_0x49ee09(0x146)](_0x49ee09(0x15e)+_0x322dfb);return _0x328fc3[_0x49ee09(0x132)];}export async function createPersonalBff(_0x4418d3,_0x2cde1e){const _0x2ed7a6=a76_0x10a8,_0x2ae8b0=await apiRequest(_0x2ed7a6(0x11e),{'method':_0x2ed7a6(0x17d),'body':{'appCode':_0x4418d3,..._0x2cde1e}});return _0x2ae8b0[_0x2ed7a6(0x132)];}export async function updatePersonalBff(_0x161e4a,_0x100102,_0x440b4b){const _0x30bf9d=a76_0x10a8,_0xc7aeed=await apiRequest(_0x30bf9d(0x159)+_0x161e4a+_0x30bf9d(0x191),{'method':'POST','body':{'appCode':_0x100102,..._0x440b4b}});return _0xc7aeed[_0x30bf9d(0x132)];}export async function executePersonalBff(_0xf9ded5,_0x19ade3,_0xdb7303){const _0x22bf97=a76_0x10a8,_0x22568d=await apiRequest(_0x22bf97(0x159)+_0xf9ded5+_0x22bf97(0x153)+encodeURIComponent(_0x19ade3),{'method':_0x22bf97(0x17d),'body':_0xdb7303});return _0x22568d['data'];}export async function listPersonalKnowledgeBaseItems(_0x4e20c7){const _0x124bbe=a76_0x10a8,_0x17cdde=await apiRequest(_0x124bbe(0x137)+encodeURIComponent(_0x4e20c7));return Array[_0x124bbe(0x178)](_0x17cdde[_0x124bbe(0x132)])?_0x17cdde[_0x124bbe(0x132)]:[];}export async function getPersonalKnowledgeBaseItem(_0x179be2,_0x4ab0d2){const _0x549939=a76_0x10a8,_0x48360a=await apiRequest(_0x549939(0x1ad)+_0x179be2+_0x549939(0x166)+encodeURIComponent(_0x4ab0d2));if(!_0x48360a[_0x549939(0x132)])throw CliErrors[_0x549939(0x146)]('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0x179be2);return _0x48360a[_0x549939(0x132)];}export async function createPersonalKnowledgeBaseItem(_0x3facc3,_0x58f906){const _0x1f2e72=a76_0x10a8,_0x43a930=await apiRequest(_0x1f2e72(0x149),{'method':_0x1f2e72(0x17d),'body':{'appCode':_0x3facc3,..._0x58f906}});return _0x43a930['data'];}export async function updatePersonalKnowledgeBaseItem(_0x5eeb4e,_0x3eed3d,_0x1823ce){const _0x53b6e1=a76_0x10a8,_0x2ea5e3=await apiRequest(_0x53b6e1(0x1ad)+_0x5eeb4e+_0x53b6e1(0x191),{'method':'POST','body':{'appCode':_0x3eed3d,..._0x1823ce}});return _0x2ea5e3[_0x53b6e1(0x132)];}export async function searchKnowledgeBase(_0x3f9f17,_0x3602fd){const _0x1b2cf5=a76_0x10a8,_0x5a31d0=await apiRequest(_0x1b2cf5(0x151),{'method':_0x1b2cf5(0x17d),'body':{'appCode':_0x3f9f17,'query':_0x3602fd[_0x1b2cf5(0x120)],..._0x3602fd[_0x1b2cf5(0x194)]!==undefined?{'topK':_0x3602fd['topK']}:{}}});return Array[_0x1b2cf5(0x178)](_0x5a31d0[_0x1b2cf5(0x132)])?_0x5a31d0[_0x1b2cf5(0x132)]:[];}export async function getRuntimeSkillByCode(_0x35b13c,_0x5e32fc){const _0x335725=a76_0x10a8,_0x3e5b43=await skillHubJsonRequest(_0x335725(0x1a4)+encodeURIComponent(_0x35b13c)+'/'+encodeURIComponent(_0x5e32fc),{'allowNotFound':!![]});return _0x3e5b43?skillHubRuntimeDetailToRuntimeSkill(_0x3e5b43):undefined;}function a76_0x75c2(){const _0x8b8226=['API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','personal','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/client/artifact/','filter','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','isArray','favorite','/client/user/loginUserInfo','API\x20error\x20code:\x20','toString','POST','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','Toolbox\x20API\x20error','tableData','/publish/validate','BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','/client/queryFileUrl','application/zip','join','1495PsyQLF','/api/cli/v1/skills/','source','markdown','signal','longTerm','/client/dataset/get-driven-data?code=','/client/artifact/list?','base64','sqlCode','apiError','/update','warnings','cursor','topK','1702529DRlUzl','msg','function','scope','namespace','size','Artifact\x20not\x20found:\x20id=','values','/client/ocr','invokeSource','name','/client/artifact/create','/download','status','valid','/api/v1/skills/','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','gmtModified','artifactType','GET','skillCode','error','application/octet-stream','limit','/client/knowledge-base/personal/','errorCode','arrayBuffer','5245338kyUkrK','file','confirmWarnings','set','.zip','/run','API\x20error:\x20','string','packageBase64','16XoObuy','/api/runtime/v1/namespaces/','/api/node-toolbox/','/client/runtime-bff/personal/create','18NxzlxK','query','company','errorMsg','PRIVATE','map','Toolbox\x20API\x20error:\x20','undefined','visibility','abort','2385046LHmpPs','json','type','skillName','authRequired','summary','1652526QXOgTz','resolvedVersion','code','data','Request\x20timeout:\x20','publishedVersion','api-doc-generator','DELETE','/client/knowledge-base/personal/list?appCode=','AbortError','download','/client/dataset/list','boolean','slug','/versions/','appCode','items','41755610lUsSbI','functionName','1955163gFqiDE','trim','entries','errors','validation','replace','/validate','/client/knowledge-base/personal/create','newConfigFileName','message','searchParams','resolvedSlug','headers','effective','6268sGQdKY','/client/knowledge-base/search','NAMESPACE_ONLY','/execute?appCode=','/client/uploadFile','object','isJson','ownerPreviewVersion','find','/client/runtime-bff/personal/','append','version','Toolbox\x20error\x20code:\x20','number','Personal\x20BFF\x20not\x20found:\x20id=','displayName','content',',\x20name=','all','/client/bff/endpoint/','success','description','?appCode=','Check\x20your\x20credentials\x20and\x20try\x20again.','stringify','/api/harness/apps/','/skills','application/json','headlineVersion','text','Configure\x20accessKey\x20in\x20','from','SkillHub\x20API\x20error:\x20','skill'];a76_0x75c2=function(){return _0x8b8226;};return a76_0x75c2();}export async function listRuntimeSkills(_0x5d5bf9){const _0x554f66=a76_0x10a8,_0x5d69d4=await skillHubJsonRequest(_0x554f66(0x11c)+encodeURIComponent(_0x5d5bf9['appCode'])+_0x554f66(0x16a),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x5d5bf9[_0x554f66(0x13e)],_0x5d69d4,_0x5d5bf9['scope']??_0x554f66(0x162),_0x5d5bf9[_0x554f66(0x131)]);}export async function listPersonalRuntimeSkills(_0x432d41){const _0x45c066=a76_0x10a8;return(await listRuntimeSkills({'appCode':_0x432d41,'scope':_0x45c066(0x173)}))[_0x45c066(0x173)];}function a76_0x10a8(_0x3d6136,_0x31c1af){_0x3d6136=_0x3d6136-0x11c;const _0x75c217=a76_0x75c2();let _0x10a8e2=_0x75c217[_0x3d6136];return _0x10a8e2;}export async function listCompanyRuntimeSkills(_0x17ee89){const _0x420fb0=a76_0x10a8;return(await listRuntimeSkills({'appCode':_0x17ee89,'scope':_0x420fb0(0x121)}))['company'];}export async function listVisibleRuntimeSkills(_0x5f51c1){const _0x2648ef=a76_0x10a8;return(await listRuntimeSkills({'appCode':_0x5f51c1,'scope':_0x2648ef(0x162)}))[_0x2648ef(0x14f)];}export async function createPersonalRuntimeSkill(_0x47dcc2,_0x3d26aa,_0x582a1b={}){const _0x41d59a=a76_0x10a8;return publishRuntimeSkill(_0x47dcc2,_0x3d26aa,{'visibility':_0x41d59a(0x123),'confirmWarnings':_0x582a1b[_0x41d59a(0x1b2)]});}export async function updatePersonalRuntimeSkill(_0x10ce9c,_0x1d8c25,_0x4677e3,_0x366505={}){const _0x100246=a76_0x10a8;return publishRuntimeSkill(_0x1d8c25,{..._0x4677e3,'skillCode':_0x4677e3['skillCode']??_0x10ce9c},{'visibility':_0x100246(0x123),'confirmWarnings':_0x366505['confirmWarnings']});}export async function publishCompanyRuntimeSkill(_0x563645,_0x3c4ba0,_0x477152={}){const _0xd9c115=a76_0x10a8;return publishRuntimeSkill(_0x563645,_0x3c4ba0,{'visibility':'NAMESPACE_ONLY','confirmWarnings':_0x477152[_0xd9c115(0x1b2)]});}export async function validateRuntimeSkillPublish(_0x4daf31,_0x5625d2,_0x2b4fe9){const _0x4b02ad=a76_0x10a8,_0x4c0907=buildRuntimeSkillPublishForm(_0x5625d2,_0x2b4fe9[_0x4b02ad(0x127)]),_0x1d6c5a=await skillHubJsonRequest(_0x4b02ad(0x187)+encodeURIComponent(_0x4daf31)+_0x4b02ad(0x181),{'method':_0x4b02ad(0x17d),'body':_0x4c0907});return{'valid':_0x1d6c5a[_0x4b02ad(0x1a3)]===!![],'errors':Array[_0x4b02ad(0x178)](_0x1d6c5a[_0x4b02ad(0x145)])?_0x1d6c5a[_0x4b02ad(0x145)]:[],'warnings':Array[_0x4b02ad(0x178)](_0x1d6c5a['warnings'])?_0x1d6c5a[_0x4b02ad(0x192)]:[],'resolvedSlug':_0x1d6c5a[_0x4b02ad(0x14d)],'resolvedVersion':_0x1d6c5a[_0x4b02ad(0x130)]};}export async function downloadRuntimeSkillPackage(_0x92b8a1,_0x8d9070,_0x1284cc,_0x4f4e0a){const _0x3f6954=a76_0x10a8;void _0x92b8a1;const _0xb30d94=_0x4f4e0a?_0x3f6954(0x187)+encodeURIComponent(_0x1284cc)+'/'+encodeURIComponent(_0x8d9070)+_0x3f6954(0x13d)+encodeURIComponent(_0x4f4e0a)+_0x3f6954(0x1a1):'/api/cli/v1/skills/'+encodeURIComponent(_0x1284cc)+'/'+encodeURIComponent(_0x8d9070)+_0x3f6954(0x1a1);return skillHubBinaryRequest(_0xb30d94);}async function publishRuntimeSkill(_0x366290,_0x2f304b,_0x14b62f){const _0x3a3f67=a76_0x10a8,_0x395f7f=buildRuntimeSkillPublishForm(_0x2f304b,_0x14b62f[_0x3a3f67(0x127)]),_0x388f41=await skillHubJsonRequest(_0x3a3f67(0x187)+encodeURIComponent(_0x366290)+'/publish',{'method':_0x3a3f67(0x17d),'query':{'confirmWarnings':_0x14b62f['confirmWarnings']===!![]?!![]:undefined},'body':_0x395f7f});return{'appCode':_0x388f41[_0x3a3f67(0x199)]??_0x366290,'skillCode':_0x388f41['slug']??_0x2f304b[_0x3a3f67(0x1a9)]??'','skillName':_0x2f304b['skillName']??_0x388f41['slug']??_0x2f304b['skillCode'],'description':_0x2f304b[_0x3a3f67(0x165)],'scope':skillHubVisibilityToScope(_0x388f41[_0x3a3f67(0x127)]??_0x14b62f['visibility'])??'personal','version':_0x388f41[_0x3a3f67(0x15b)]??_0x2f304b[_0x3a3f67(0x15b)],'tags':_0x2f304b['tags'],'content':_0x2f304b[_0x3a3f67(0x160)]};}function buildRuntimeSkillPublishForm(_0x1916de,_0x2664f8){const _0x508d1d=a76_0x10a8,_0x47f9a0=new FormData();return _0x47f9a0[_0x508d1d(0x1b3)](_0x508d1d(0x1b1),runtimeSkillPackageFile(_0x1916de)),_0x1916de[_0x508d1d(0x12c)]?.[_0x508d1d(0x143)]()&&_0x47f9a0['set'](_0x508d1d(0x15f),_0x1916de[_0x508d1d(0x12c)][_0x508d1d(0x143)]()),_0x47f9a0['set'](_0x508d1d(0x127),_0x2664f8),_0x47f9a0;}function runtimeSkillPackageFile(_0x31d45b){const _0x17afa7=a76_0x10a8;if(!_0x31d45b[_0x17afa7(0x1b8)])throw CliErrors['validation']('Missing\x20Skill\x20package\x20payload.');const _0x2a19ca=Buffer[_0x17afa7(0x16f)](_0x31d45b['packageBase64'],_0x17afa7(0x18e)),_0x245a52=new Blob([_0x2a19ca],{'type':'application/zip'}),_0x862902=(_0x31d45b[_0x17afa7(0x1a9)]||_0x17afa7(0x171))+_0x17afa7(0x1b4);if(typeof File!==_0x17afa7(0x126))return new File([_0x245a52],_0x862902,{'type':_0x17afa7(0x184)});return _0x245a52;}function normalizeSkillHubRuntimeListResponse(_0x2b44cb,_0x36df2f,_0x5779e9,_0x33b26f){const _0x45c9f1=a76_0x10a8,_0x5e051f=Array[_0x45c9f1(0x178)](_0x36df2f)?_0x36df2f:Array['isArray'](_0x36df2f?.[_0x45c9f1(0x13f)])?_0x36df2f[_0x45c9f1(0x13f)]:[],_0x811346=_0x33b26f?.[_0x45c9f1(0x143)](),_0x5dd13c=_0x5e051f['filter'](_0x9fb12d=>!_0x811346||_0x9fb12d[_0x45c9f1(0x13c)]===_0x811346)[_0x45c9f1(0x124)](skillHubRuntimeItemToRuntimeSkill)[_0x45c9f1(0x176)](_0xc3b6b1=>Boolean(_0xc3b6b1)),_0x5b0bc3=_0x5dd13c[_0x45c9f1(0x176)](_0x16e7bd=>_0x16e7bd[_0x45c9f1(0x198)]===_0x45c9f1(0x173)),_0x32551c=_0x5dd13c['filter'](_0x52a8af=>_0x52a8af[_0x45c9f1(0x198)]===_0x45c9f1(0x121));return{'appCode':_0x2b44cb,'personal':_0x5779e9==='company'?[]:_0x5b0bc3,'company':_0x5779e9==='personal'?[]:_0x32551c,'effective':buildEffectiveRuntimeSkills(_0x5b0bc3,_0x32551c,_0x5779e9)};}function skillHubRuntimeItemToRuntimeSkill(_0x1eb524){const _0x5587e6=a76_0x10a8,_0x2ee65d=_0x1eb524[_0x5587e6(0x13c)]?.[_0x5587e6(0x143)](),_0x1d6d05=skillHubVisibilityToScope(_0x1eb524[_0x5587e6(0x127)]);if(!_0x2ee65d||!_0x1d6d05)return undefined;return{'id':_0x1eb524['id'],'appCode':_0x1eb524['namespace'],'skillCode':_0x2ee65d,'skillName':_0x1eb524['displayName']??_0x2ee65d,'description':_0x1eb524[_0x5587e6(0x12e)],'scope':_0x1d6d05,'version':skillHubRuntimeItemVersion(_0x1eb524),'status':_0x1eb524[_0x5587e6(0x1a2)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x3177f3){const _0x36ab01=a76_0x10a8,_0x5a8220=_0x3177f3[_0x36ab01(0x13c)]?.[_0x36ab01(0x143)]();if(!_0x5a8220)return undefined;return{'id':_0x3177f3['id'],'appCode':_0x3177f3[_0x36ab01(0x199)],'skillCode':_0x5a8220,'skillName':_0x3177f3[_0x36ab01(0x15f)]??_0x5a8220,'description':_0x3177f3['summary'],'example':_0x3177f3['example'],'scope':skillHubVisibilityToScope(_0x3177f3[_0x36ab01(0x127)])??_0x3177f3[_0x36ab01(0x127)]?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0x3177f3),'status':_0x3177f3['status']};}function skillHubVisibilityToScope(_0x32d2a2){const _0x4c845b=a76_0x10a8;if(_0x32d2a2===_0x4c845b(0x123))return'personal';if(_0x32d2a2===_0x4c845b(0x152))return'company';return undefined;}function skillHubRuntimeItemVersion(_0x34fb41){const _0x2353c1=a76_0x10a8;return _0x34fb41[_0x2353c1(0x134)]?.[_0x2353c1(0x15b)]??_0x34fb41[_0x2353c1(0x16c)]?.[_0x2353c1(0x15b)]??_0x34fb41[_0x2353c1(0x157)]?.['version'];}function buildEffectiveRuntimeSkills(_0x367b86,_0x2d748a,_0x227c0a){const _0x72ced5=a76_0x10a8;if(_0x227c0a===_0x72ced5(0x173))return _0x367b86;if(_0x227c0a===_0x72ced5(0x121))return _0x2d748a;const _0x28131b=new Map();for(const _0x3a68a3 of _0x2d748a){_0x28131b[_0x72ced5(0x1b3)](_0x3a68a3[_0x72ced5(0x1a9)],_0x3a68a3);}for(const _0x9c233a of _0x367b86){_0x28131b[_0x72ced5(0x1b3)](_0x9c233a[_0x72ced5(0x1a9)],_0x9c233a);}return Array[_0x72ced5(0x16f)](_0x28131b[_0x72ced5(0x19c)]());}function normalizeRuntimeSkillListResponse(_0x153e81,_0x97c4ec){const _0x59f850=a76_0x10a8;if(Array[_0x59f850(0x178)](_0x97c4ec)){const _0x4b054d=_0x97c4ec['filter'](_0x391615=>_0x391615['scope']===_0x59f850(0x173)),_0x286757=_0x97c4ec[_0x59f850(0x176)](_0x48abb0=>_0x48abb0[_0x59f850(0x198)]==='company');return{'appCode':_0x153e81,'personal':_0x4b054d,'company':_0x286757,'effective':[..._0x286757,..._0x4b054d]};}return{'appCode':_0x97c4ec?.[_0x59f850(0x13e)]??_0x153e81,'personal':Array[_0x59f850(0x178)](_0x97c4ec?.[_0x59f850(0x173)])?_0x97c4ec[_0x59f850(0x173)]:[],'company':Array['isArray'](_0x97c4ec?.['company'])?_0x97c4ec[_0x59f850(0x121)]:[],'effective':Array[_0x59f850(0x178)](_0x97c4ec?.[_0x59f850(0x14f)])?_0x97c4ec[_0x59f850(0x14f)]:[]};}
|
|
1
|
+
(function(_0x584e39,_0x1ce9b1){const _0x48cb88=a76_0x4b54,_0x33fbe6=_0x584e39();while(!![]){try{const _0x45fa09=-parseInt(_0x48cb88(0xe8))/0x1*(parseInt(_0x48cb88(0xfd))/0x2)+-parseInt(_0x48cb88(0x9e))/0x3*(-parseInt(_0x48cb88(0xb3))/0x4)+-parseInt(_0x48cb88(0x103))/0x5*(-parseInt(_0x48cb88(0xe7))/0x6)+parseInt(_0x48cb88(0x107))/0x7+parseInt(_0x48cb88(0x8e))/0x8+-parseInt(_0x48cb88(0x9f))/0x9*(-parseInt(_0x48cb88(0xa1))/0xa)+-parseInt(_0x48cb88(0xc2))/0xb*(parseInt(_0x48cb88(0xca))/0xc);if(_0x45fa09===_0x1ce9b1)break;else _0x33fbe6['push'](_0x33fbe6['shift']());}catch(_0x10f786){_0x33fbe6['push'](_0x33fbe6['shift']());}}}(a76_0x5809,0x45449));import{readFile}from'node:fs/promises';function a76_0x5809(){const _0x57d813=['url','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','headlineVersion','Request\x20timeout:\x20','isJson','/client/sql/query','searchParams','set','newConfigFileName','description','/api/node-toolbox/','/client/runtime-bff/personal/create','/client/knowledge-base/search','string','replace','application/json','appName','confirmWarnings','/client/knowledge-base/personal/create','Check\x20your\x20credentials\x20and\x20try\x20again.','scope','name','toString','Knowledge-base\x20entry\x20not\x20found:\x20id=','3542616ddNzOb','/publish','invokeSource','errorCode','isArray','object','/update','version','items','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','SkillHub\x20API\x20error:\x20','functions','/execute?appCode=','download','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','API\x20error\x20code:\x20','1627491tfdlvZ','747THcPhL','trim','52090AkHAgK','undefined','SkillHub\x20error\x20code:\x20','/client/uploadFile','Configure\x20accessKey\x20in\x20','file','slug','skillName','apiError','artifactType','visibility','functionName','text','personal','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','?appCode=','/client/user/loginUserInfo','Personal\x20BFF\x20not\x20found:\x20id=','4gDtiHW','favorite',',\x20name=','gmtModified','Download\x20failed:\x20','Invalid\x20app\x20config\x20value:\x20key=','/download','/api/cli/v1/skills/','from','skillCode','GET','validation','/client/app-config/getByKey?','/client/knowledge-base/personal/list?appCode=','topK','4277240hBURbz','toLowerCase','displayName','/client/queryFileUrl','Toolbox\x20error\x20code:\x20','effective','code','size','36KoTegY','resolvedVersion','NAMESPACE_ONLY','Toolbox\x20API\x20error','tags','/api/v1/skills/','signal','entries','/api/runtime/v1/namespaces/','cursor','PRIVATE','errorMsg','values','filter','/skills','namespace','message','packageBase64','/client/runtime-bff/personal/list?appCode=','/client/artifact/create','DELETE','headers','limit','msg','SQL\x20query\x20not\x20found:\x20','arrayBuffer','data','success','errors','41304AUiiRt','14mWShtV','sqlCode','all','publishedVersion','stringify','/client/knowledge-base/personal/','resolvedSlug','application/zip','/run','api-doc-generator','status','map','authRequired','json','company','AbortError','test','tableData','summary','content','appCode','78178QAgeoO','API\x20error:\x20','abort','source','skill','/client/runtime-bff/personal/','25TYDhwb','/client/artifact/','BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','find','3817772IJLgGl','Artifact\x20not\x20found:\x20id=','POST','Toolbox\x20API\x20error:\x20','function','/versions/','/client/dataset/list','/validate','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','type'];a76_0x5809=function(){return _0x57d813;};return a76_0x5809();}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(_0xd1d06f){_activeAK=_0xd1d06f||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x19c4f8){const _0x29db6d=a76_0x4b54;for(const _0x59015b of _0x19c4f8){if(typeof _0x59015b===_0x29db6d(0x11e)&&_0x59015b[_0x29db6d(0xa0)]())return _0x59015b[_0x29db6d(0xa0)]();}return undefined;}async function decodeResponseBody(_0x286338){const _0x2cb8af=a76_0x4b54;if(typeof _0x286338['text']===_0x2cb8af(0x10b))try{const _0x3bf63d=await _0x286338[_0x2cb8af(0xad)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x3bf63d),'text':_0x3bf63d};}catch{return{'isJson':![],'text':_0x3bf63d[_0x2cb8af(0xa0)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x286338[_0x2cb8af(0xf5)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x285e88,_0x5cc8ef,_0x4baf96){const _0x4d9952=a76_0x4b54,_0x4be09b=_0x5cc8ef&&typeof _0x5cc8ef===_0x4d9952(0x93)?_0x5cc8ef:{},_0x109523=[_0x4be09b[_0x4d9952(0xf2)],_0x4be09b['code']][_0x4d9952(0x106)](_0x2d0a82=>Number(_0x2d0a82)===0x1ad),_0x5127e2=createRateLimitError({'status':_0x285e88[_0x4d9952(0xf2)]===0x1ad?_0x285e88[_0x4d9952(0xf2)]:_0x109523??_0x285e88[_0x4d9952(0xf2)],'errorCode':firstString(_0x4be09b['errorCode'],typeof _0x4be09b[_0x4d9952(0xc8)]===_0x4d9952(0x11e)?_0x4be09b[_0x4d9952(0xc8)]:undefined),'message':firstString(_0x4be09b[_0x4d9952(0xd5)],_0x4be09b['message'],_0x4be09b['msg'],_0x4baf96),'retryAfter':readRetryAfter(_0x285e88[_0x4d9952(0xdf)])??readRetryAfterSeconds(_0x5cc8ef)});if(_0x5127e2)throw _0x5127e2;}async function apiRequest(_0x3564ac,_0x51c8b9={}){const _0x431ddc=a76_0x4b54,{method:method='GET',body:_0x3021b1,headers:headers={},timeout:timeout=0x7530}=_0x51c8b9,_0x6c1d74=_activeAK,_0x4f486f=getRuntimeDomain();if(!_0x6c1d74)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x7242a1=''+_0x4f486f+_0x3564ac,_0x84d370={'X-User-AK':_0x6c1d74},_0x40b2d1=new AbortController(),_0x12a839=setTimeout(()=>_0x40b2d1[_0x431ddc(0xff)](),timeout);try{const _0x509910=await fetch(_0x7242a1,{'method':method,'headers':{'Content-Type':_0x431ddc(0x120),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x84d370,...headers},'body':_0x3021b1?JSON[_0x431ddc(0xec)](_0x3021b1):undefined,'signal':_0x40b2d1[_0x431ddc(0xd0)]}),_0x5e9abf=await decodeResponseBody(_0x509910);if(!_0x5e9abf[_0x431ddc(0x115)]){throwIfRateLimited(_0x509910,undefined,_0x5e9abf[_0x431ddc(0xad)]);throw CliErrors['apiError'](_0x431ddc(0x97)+_0x509910[_0x431ddc(0xf2)]+')',_0x509910['status']>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x1cb353=_0x5e9abf[_0x431ddc(0xe4)];throwIfRateLimited(_0x509910,_0x1cb353);if(!_0x509910['ok']||_0x1cb353[_0x431ddc(0xe5)]===![])throw CliErrors[_0x431ddc(0xa9)](_0x1cb353[_0x431ddc(0xd5)]||_0x1cb353[_0x431ddc(0xda)]||'API\x20error:\x20'+_0x509910[_0x431ddc(0xf2)],_0x1cb353[_0x431ddc(0x91)]?_0x431ddc(0x9d)+_0x1cb353[_0x431ddc(0x91)]:undefined);return _0x1cb353;}catch(_0x232ad3){if(_0x232ad3 instanceof Error&&_0x232ad3[_0x431ddc(0x126)]===_0x431ddc(0xf7))throw CliErrors[_0x431ddc(0xa9)](_0x431ddc(0x114)+_0x7242a1);throw _0x232ad3;}finally{clearTimeout(_0x12a839);}}async function apiBinaryRequest(_0x5b5fda,_0x318698={}){const _0x169975=a76_0x4b54,{method:method=_0x169975(0xbd),headers:headers={},timeout:timeout=0x7530}=_0x318698,_0x26f775=_activeAK,_0x275efa=getRuntimeDomain();if(!_0x26f775)throw CliErrors[_0x169975(0xf4)](_0x169975(0xa5)+PRODUCT_CONFIG[_0x169975(0x119)]+'.');const _0x4a5578=''+_0x275efa+_0x5b5fda,_0x43c979=new AbortController(),_0x4b2d98=setTimeout(()=>_0x43c979[_0x169975(0xff)](),timeout);try{const _0xc8658=await fetch(_0x4a5578,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x26f775,...headers},'signal':_0x43c979[_0x169975(0xd0)]});if(!_0xc8658['ok']){const _0x5d6098=await decodeResponseBody(_0xc8658),_0x35ef36=_0x5d6098['data']&&typeof _0x5d6098[_0x169975(0xe4)]===_0x169975(0x93)?_0x5d6098['data']:{},_0x30a845=firstString(_0x35ef36['errorMsg'],_0x35ef36[_0x169975(0xda)],_0x35ef36[_0x169975(0x91)],_0x5d6098[_0x169975(0xad)]);throwIfRateLimited(_0xc8658,_0x5d6098[_0x169975(0xe4)],_0x30a845);throw CliErrors[_0x169975(0xa9)](_0x30a845||'API\x20error:\x20'+_0xc8658[_0x169975(0xf2)],_0x169975(0xb7)+_0x4a5578);}return Buffer[_0x169975(0xbb)](await _0xc8658['arrayBuffer']());}catch(_0x433b9e){if(_0x433b9e instanceof Error&&_0x433b9e['name']===_0x169975(0xf7))throw CliErrors[_0x169975(0xa9)](_0x169975(0x114)+_0x4a5578);throw _0x433b9e;}finally{clearTimeout(_0x4b2d98);}}async function apiFormRequest(_0x1b291f,_0x1b8753,_0x42240f={}){const _0x260783=a76_0x4b54,{timeout:timeout=0x7530}=_0x42240f,_0x4fe77d=_activeAK,_0x282b32=getRuntimeDomain();if(!_0x4fe77d)throw CliErrors[_0x260783(0xf4)](_0x260783(0xa5)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x28a32b=''+_0x282b32+_0x1b291f,_0x2566d4=new AbortController(),_0x2db28b=setTimeout(()=>_0x2566d4[_0x260783(0xff)](),timeout);try{const _0xcc9b17=await fetch(_0x28a32b,{'method':_0x260783(0x109),'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x4fe77d},'body':_0x1b8753,'signal':_0x2566d4[_0x260783(0xd0)]}),_0x4ab855=await decodeResponseBody(_0xcc9b17);if(!_0x4ab855[_0x260783(0x115)]){throwIfRateLimited(_0xcc9b17,undefined,_0x4ab855['text']);throw CliErrors[_0x260783(0xa9)](_0x260783(0x97)+_0xcc9b17[_0x260783(0xf2)]+')',_0xcc9b17['status']>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x43dd79=_0x4ab855[_0x260783(0xe4)];throwIfRateLimited(_0xcc9b17,_0x43dd79);if(!_0xcc9b17['ok']||_0x43dd79[_0x260783(0xe5)]===![])throw CliErrors[_0x260783(0xa9)](_0x43dd79[_0x260783(0xd5)]||_0x43dd79['message']||_0x260783(0xfe)+_0xcc9b17[_0x260783(0xf2)],_0x43dd79['errorCode']?'API\x20error\x20code:\x20'+_0x43dd79[_0x260783(0x91)]:undefined);return _0x43dd79;}catch(_0x4c98a4){if(_0x4c98a4 instanceof Error&&_0x4c98a4[_0x260783(0x126)]===_0x260783(0xf7))throw CliErrors[_0x260783(0xa9)](_0x260783(0x114)+_0x28a32b);throw _0x4c98a4;}finally{clearTimeout(_0x2db28b);}}async function toolboxRequest(_0x3d85a5,_0x4afd4b,_0x6090f6={}){const _0x818248=a76_0x4b54,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x6090f6,_0x103b23=_activeAK;if(!_0x103b23)throw CliErrors[_0x818248(0xf4)](_0x818248(0xa5)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x4970ca=getApiDomain()[_0x818248(0x11f)](/\/$/,''),_0x343e07=new URL(_0x3d85a5,_0x4970ca+_0x818248(0x11b));if(_0x4afd4b)for(const [_0x12ec1c,_0x2a9cfa]of Object[_0x818248(0xd1)](_0x4afd4b)){_0x2a9cfa!==undefined&&_0x2a9cfa!==null&&_0x343e07[_0x818248(0x117)][_0x818248(0x118)](_0x12ec1c,String(_0x2a9cfa));}const _0x376486=new AbortController(),_0x41b86a=setTimeout(()=>_0x376486[_0x818248(0xff)](),timeout);try{const _0x969315=await fetch(_0x343e07,{'method':method,'headers':{'Content-Type':_0x818248(0x120),'X-Invoke-Source':PRODUCT_CONFIG[_0x818248(0x90)],'X-User-AK':_0x103b23,...headers},'signal':_0x376486['signal']}),_0x32fa7b=await decodeResponseBody(_0x969315);if(!_0x32fa7b['isJson']){throwIfRateLimited(_0x969315,undefined,_0x32fa7b['text']);throw CliErrors[_0x818248(0xa9)](_0x818248(0xaf)+_0x969315[_0x818248(0xf2)]+')',_0x969315['status']>=0x190?_0x818248(0x124):undefined);}const _0x120594=_0x32fa7b[_0x818248(0xe4)];throwIfRateLimited(_0x969315,_0x120594);if(!_0x969315['ok']){const _0x2fbc19=_0x120594&&typeof _0x120594===_0x818248(0x93)?_0x120594:{};throw CliErrors[_0x818248(0xa9)](_0x2fbc19[_0x818248(0xd5)]||_0x2fbc19[_0x818248(0xda)]||_0x818248(0x10a)+_0x969315[_0x818248(0xf2)],_0x2fbc19['errorCode']?'Toolbox\x20error\x20code:\x20'+_0x2fbc19[_0x818248(0x91)]:undefined);}if(_0x120594&&typeof _0x120594===_0x818248(0x93)&&_0x818248(0xe5)in _0x120594&&typeof _0x120594[_0x818248(0xe5)]==='boolean'){const _0x1a796e=_0x120594;if(!_0x1a796e[_0x818248(0xe5)])throw CliErrors[_0x818248(0xa9)](_0x1a796e[_0x818248(0xd5)]||_0x1a796e[_0x818248(0xda)]||_0x818248(0xcd),_0x1a796e[_0x818248(0x91)]?_0x818248(0xc6)+_0x1a796e[_0x818248(0x91)]:undefined);return _0x1a796e[_0x818248(0xe4)];}return _0x120594;}catch(_0x2fc7c3){if(_0x2fc7c3 instanceof Error&&_0x2fc7c3[_0x818248(0x126)]===_0x818248(0xf7))throw CliErrors[_0x818248(0xa9)](_0x818248(0x114)+_0x343e07[_0x818248(0x127)]());throw _0x2fc7c3;}finally{clearTimeout(_0x41b86a);}}async function skillHubJsonRequest(_0x1a5251,_0xc9fc31={}){const _0x39e40b=a76_0x4b54,{method:method=_0x39e40b(0xbd),query:_0x5cc7f8,body:_0x5e7ba,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0xc9fc31,_0x5f37df=_activeAK;if(!_0x5f37df)throw CliErrors[_0x39e40b(0xf4)](_0x39e40b(0xa5)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0xec8e24=getSkillHubDomain()[_0x39e40b(0x11f)](/\/$/,''),_0x492d31=new URL(_0x1a5251,_0xec8e24+'/');if(_0x5cc7f8)for(const [_0x4d9cec,_0x3329b4]of Object[_0x39e40b(0xd1)](_0x5cc7f8)){_0x3329b4!==undefined&&_0x3329b4!==null&&_0x492d31[_0x39e40b(0x117)]['set'](_0x4d9cec,String(_0x3329b4));}const _0x52757e=new AbortController(),_0x54e05a=setTimeout(()=>_0x52757e[_0x39e40b(0xff)](),timeout);try{const _0x1affed=await fetch(_0x492d31[_0x39e40b(0x127)](),{'method':method,'headers':{'Accept':_0x39e40b(0x120),'X-Invoke-Source':PRODUCT_CONFIG[_0x39e40b(0x90)],'X-User-AK':_0x5f37df,...headers},'body':_0x5e7ba,'signal':_0x52757e[_0x39e40b(0xd0)]}),_0x393d57=await decodeResponseBody(_0x1affed);if(!_0x393d57['isJson']){if(allowNotFound&&_0x1affed['status']===0x194)return undefined;throwIfRateLimited(_0x1affed,undefined,_0x393d57[_0x39e40b(0xad)]);throw CliErrors['apiError'](_0x39e40b(0x112)+_0x1affed[_0x39e40b(0xf2)]+')',_0x1affed[_0x39e40b(0xf2)]>=0x190?_0x39e40b(0x124):undefined);}const _0x55e246=_0x393d57[_0x39e40b(0xe4)];throwIfRateLimited(_0x1affed,_0x55e246);if(allowNotFound&&isSkillHubNotFoundResponse(_0x1affed[_0x39e40b(0xf2)],_0x55e246))return undefined;const _0x1b1b1f=!_0x1affed['ok']||_0x55e246?.[_0x39e40b(0xe5)]===![]||typeof _0x55e246?.['code']==='number'&&_0x55e246[_0x39e40b(0xc8)]>=0x190;if(_0x1b1b1f)throw CliErrors[_0x39e40b(0xa9)](_0x55e246?.[_0x39e40b(0xd5)]||_0x55e246?.[_0x39e40b(0xda)]||_0x55e246?.[_0x39e40b(0xe1)]||_0x39e40b(0x98)+_0x1affed[_0x39e40b(0xf2)],_0x55e246?.[_0x39e40b(0x91)]?_0x39e40b(0xa3)+_0x55e246['errorCode']:undefined);return _0x55e246?.[_0x39e40b(0xe4)]??_0x55e246;}catch(_0x11402c){if(_0x11402c instanceof Error&&_0x11402c[_0x39e40b(0x126)]===_0x39e40b(0xf7))throw CliErrors[_0x39e40b(0xa9)]('Request\x20timeout:\x20'+_0x492d31[_0x39e40b(0x127)]());throw _0x11402c;}finally{clearTimeout(_0x54e05a);}}function isSkillHubNotFoundResponse(_0x3d2236,_0x105a3b){const _0x57d24b=a76_0x4b54;if(_0x3d2236===0x194||_0x105a3b?.[_0x57d24b(0xc8)]===0x194)return!![];if(_0x3d2236!==0x190&&_0x105a3b?.['code']!==0x190)return![];const _0x46fb57=[_0x105a3b?.[_0x57d24b(0xe1)],_0x105a3b?.[_0x57d24b(0xda)],_0x105a3b?.[_0x57d24b(0xd5)],_0x105a3b?.['error']][_0x57d24b(0xd7)](_0xc083b5=>typeof _0xc083b5===_0x57d24b(0x11e))['join']('\x20');return/skill not found\b/i[_0x57d24b(0xf8)](_0x46fb57);}async function skillHubBinaryRequest(_0xed632,_0x5eaaa8={}){const _0x140112=a76_0x4b54,{query:_0x557c27,headers:headers={},timeout:timeout=0x7530}=_0x5eaaa8,_0x141226=_activeAK;if(!_0x141226)throw CliErrors[_0x140112(0xf4)](_0x140112(0xa5)+PRODUCT_CONFIG[_0x140112(0x119)]+'.');const _0xe49655=getSkillHubDomain()[_0x140112(0x11f)](/\/$/,''),_0x1187a6=new URL(_0xed632,_0xe49655+'/');if(_0x557c27)for(const [_0x2ded1b,_0x24b064]of Object[_0x140112(0xd1)](_0x557c27)){_0x24b064!==undefined&&_0x24b064!==null&&_0x1187a6[_0x140112(0x117)][_0x140112(0x118)](_0x2ded1b,String(_0x24b064));}const _0x24610f=new AbortController(),_0x411655=setTimeout(()=>_0x24610f[_0x140112(0xff)](),timeout);try{const _0x2d01aa=await fetch(_0x1187a6[_0x140112(0x127)](),{'method':_0x140112(0xbd),'headers':{'Accept':'application/octet-stream','X-Invoke-Source':PRODUCT_CONFIG[_0x140112(0x90)],'X-User-AK':_0x141226,...headers},'signal':_0x24610f[_0x140112(0xd0)]});if(!_0x2d01aa['ok']){const _0x33493e=await decodeResponseBody(_0x2d01aa),_0x5ad73b=_0x33493e['data']&&typeof _0x33493e[_0x140112(0xe4)]===_0x140112(0x93)?_0x33493e[_0x140112(0xe4)]:{},_0x2c7a1d=firstString(_0x5ad73b[_0x140112(0xd5)],_0x5ad73b['message'],_0x5ad73b[_0x140112(0xe1)],_0x5ad73b[_0x140112(0x91)],_0x33493e[_0x140112(0xad)]);throwIfRateLimited(_0x2d01aa,_0x33493e['data'],_0x2c7a1d);throw CliErrors[_0x140112(0xa9)](_0x2c7a1d||'SkillHub\x20API\x20error:\x20'+_0x2d01aa[_0x140112(0xf2)],_0x140112(0xb7)+_0x1187a6[_0x140112(0x127)]());}return Buffer['from'](await _0x2d01aa[_0x140112(0xe3)]());}catch(_0x4a337c){if(_0x4a337c instanceof Error&&_0x4a337c['name']===_0x140112(0xf7))throw CliErrors[_0x140112(0xa9)]('Request\x20timeout:\x20'+_0x1187a6[_0x140112(0x127)]());throw _0x4a337c;}finally{clearTimeout(_0x411655);}}export async function getBffEndpointContract(_0x2778f7,_0x4ac713){const _0x24dbae=a76_0x4b54;if(_0x4ac713===_0x24dbae(0x99))throw CliErrors[_0x24dbae(0xbe)]('BFF\x20function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x2778f7+',\x20name='+_0x4ac713);const _0x35139e=await apiRequest('/client/bff/endpoint/'+encodeURIComponent(_0x2778f7)+'/'+encodeURIComponent(_0x4ac713)),_0x2c8168=_0x35139e[_0x24dbae(0xe4)];if(!_0x2c8168||typeof _0x2c8168!==_0x24dbae(0x93)||Array[_0x24dbae(0x92)](_0x2c8168)||_0x2c8168[_0x24dbae(0xfc)]!==_0x2778f7||_0x2c8168[_0x24dbae(0xac)]!==_0x4ac713)throw CliErrors[_0x24dbae(0xbe)](_0x24dbae(0x105)+_0x2778f7+_0x24dbae(0xb5)+_0x4ac713);return{'appCode':_0x2c8168['appCode'],'functionName':_0x2c8168[_0x24dbae(0xac)],'description':_0x2c8168[_0x24dbae(0x11a)],'version':_0x2c8168[_0x24dbae(0x95)],'gmtModified':_0x2c8168[_0x24dbae(0xb6)]};}export async function getSqlQueryInfo(_0x3bdb98,_0x20e6b3){const _0x5e130f=a76_0x4b54,_0x7c0601=await apiRequest(_0x5e130f(0x116),{'method':'POST','body':{'appCode':_0x3bdb98,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x20e6b3}}),_0x196129=_0x7c0601[_0x5e130f(0xe4)],_0x2db836=_0x196129&&typeof _0x196129==='object'&&_0x5e130f(0xf9)in _0x196129?_0x196129[_0x5e130f(0xf9)]?.[0x0]:_0x196129&&typeof _0x196129==='object'&&_0x5e130f(0xe9)in _0x196129?_0x196129:undefined;if(!_0x2db836)throw CliErrors[_0x5e130f(0xbe)](_0x5e130f(0xe2)+_0x20e6b3);return _0x2db836;}function isRemoteAppItem(_0x562aaa){const _0x16d556=a76_0x4b54;return!!_0x562aaa&&typeof _0x562aaa===_0x16d556(0x93)&&typeof _0x562aaa[_0x16d556(0xfc)]===_0x16d556(0x11e)&&typeof _0x562aaa[_0x16d556(0x121)]==='string';}function extractRemoteAppItems(_0xd772d4){const _0x1c49b8=a76_0x4b54;if(Array[_0x1c49b8(0x92)](_0xd772d4))return _0xd772d4[_0x1c49b8(0xd7)](isRemoteAppItem);if(!_0xd772d4||typeof _0xd772d4!==_0x1c49b8(0x93))throw CliErrors['apiError'](_0x1c49b8(0x10f));const _0x42e9d2=_0xd772d4;if(Array[_0x1c49b8(0x92)](_0x42e9d2['tableData']))return _0x42e9d2['tableData'][_0x1c49b8(0xd7)](isRemoteAppItem);if(_0x42e9d2[_0x1c49b8(0xe4)]&&typeof _0x42e9d2['data']===_0x1c49b8(0x93)){const _0x3fa418=_0x42e9d2[_0x1c49b8(0xe4)];if(Array[_0x1c49b8(0x92)](_0x3fa418[_0x1c49b8(0xf9)]))return _0x3fa418[_0x1c49b8(0xf9)][_0x1c49b8(0xd7)](isRemoteAppItem);}throw CliErrors[_0x1c49b8(0xa9)]('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x324573=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x324573['data']);}export async function getLoginUserInfo(){const _0x23d0c3=a76_0x4b54,_0x4192f0=await apiRequest(_0x23d0c3(0xb1));if(!_0x4192f0[_0x23d0c3(0xe4)]||typeof _0x4192f0[_0x23d0c3(0xe4)]!==_0x23d0c3(0x93)||Array['isArray'](_0x4192f0['data']))throw CliErrors[_0x23d0c3(0xa9)](_0x23d0c3(0x9c));return _0x4192f0[_0x23d0c3(0xe4)];}function runtimeSchedulePath(_0x169ca8,_0x3eb6da=''){return'/api/harness/apps/'+encodeURIComponent(_0x169ca8)+'/schedules'+_0x3eb6da;}export async function validateRuntimeSchedule(_0x22414e,_0xe4a150){const _0x1ae956=a76_0x4b54,_0x303ff7=await apiRequest(runtimeSchedulePath(_0x22414e,_0x1ae956(0x10e)),{'method':_0x1ae956(0x109),'body':_0xe4a150});return _0x303ff7[_0x1ae956(0xe4)];}export async function createRuntimeSchedule(_0x2a4535,_0x373cd6){const _0xec75ca=a76_0x4b54,_0x1beacc=await apiRequest(runtimeSchedulePath(_0x2a4535),{'method':_0xec75ca(0x109),'body':_0x373cd6});return _0x1beacc['data'];}export async function listRuntimeSchedules(_0x589aed,_0x545e7c={}){const _0x641015=a76_0x4b54,_0xc488fd=new URLSearchParams();if(_0x545e7c[_0x641015(0xe0)]!==undefined)_0xc488fd[_0x641015(0x118)](_0x641015(0xe0),String(_0x545e7c['limit']));if(_0x545e7c['cursor'])_0xc488fd[_0x641015(0x118)](_0x641015(0xd3),_0x545e7c['cursor']);const _0x191d7c=_0xc488fd[_0x641015(0xc9)]>0x0?'?'+_0xc488fd[_0x641015(0x127)]():'',_0x1b9adc=await apiRequest(''+runtimeSchedulePath(_0x589aed)+_0x191d7c);return _0x1b9adc[_0x641015(0xe4)];}export async function getRuntimeSchedule(_0x9b214d,_0x4828ce){const _0x1e591c=a76_0x4b54,_0x303917=await apiRequest(runtimeSchedulePath(_0x9b214d,'/'+encodeURIComponent(_0x4828ce)));return _0x303917[_0x1e591c(0xe4)];}export async function deleteRuntimeSchedule(_0xe4164b,_0x432d0f){const _0x278be8=a76_0x4b54,_0x332d9b=await apiRequest(runtimeSchedulePath(_0xe4164b,'/'+encodeURIComponent(_0x432d0f)),{'method':_0x278be8(0xde)});return _0x332d9b[_0x278be8(0xe4)];}export async function runRuntimeSchedule(_0xf4b679,_0x40de88){const _0x2c215f=a76_0x4b54,_0x4d42e1=await apiRequest(runtimeSchedulePath(_0xf4b679,'/'+encodeURIComponent(_0x40de88)+_0x2c215f(0xf0)),{'method':_0x2c215f(0x109)});return _0x4d42e1['data'];}export async function listDatasets(_0x55acc0,_0x4f71a6){const _0x129277=a76_0x4b54,_0x582088=await apiRequest(_0x129277(0x10d),{'method':_0x129277(0x109),'body':{'appCode':_0x55acc0,..._0x4f71a6?.['code']&&{'code':_0x4f71a6[_0x129277(0xc8)]},..._0x4f71a6?.['name']&&{'name':_0x4f71a6[_0x129277(0x126)]}}});return extractList(_0x582088[_0x129277(0xe4)]);}function a76_0x4b54(_0x5e145c,_0x5bd3db){_0x5e145c=_0x5e145c-0x8d;const _0x580997=a76_0x5809();let _0x4b545c=_0x580997[_0x5e145c];return _0x4b545c;}export async function getDatasetDetail(_0x109f52){const _0x4458fe=a76_0x4b54,_0xd6340=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0x109f52));return _0xd6340[_0x4458fe(0xe4)];}export async function getDatasetSdkUsageDoc(_0x3eae8c,_0x3e020f){const _0xa3e3b0=a76_0x4b54,_0x1e9509=await toolboxRequest(_0xa3e3b0(0xf1),{'datasetCode':_0x3eae8c,'appCode':_0x3e020f});return typeof _0x1e9509?.['markdown']===_0xa3e3b0(0x11e)?_0x1e9509['markdown']:'';}export async function uploadRuntimeFile(_0x3fbb5e,_0x8e104c){const _0x506c99=a76_0x4b54,_0x38438b=await readFile(_0x8e104c),_0x14f255=new FormData();_0x14f255['append'](_0x506c99(0xfc),_0x3fbb5e),_0x14f255['append'](_0x506c99(0xa6),new Blob([new Uint8Array(_0x38438b)]),basename(_0x8e104c));const _0x372326=await apiFormRequest(_0x506c99(0xa4),_0x14f255);return _0x372326[_0x506c99(0xe4)];}export async function queryRuntimeFileUrl(_0x4bbcda,_0x410fd8={}){const _0x5651d0=a76_0x4b54,_0x1c7851=await apiRequest(_0x5651d0(0xc5),{'method':_0x5651d0(0x109),'body':{'filePath':_0x4bbcda,'downloadFlag':_0x410fd8[_0x5651d0(0x9b)]??![],..._0x410fd8['longTerm']?{'longTerm':!![]}:{}}});return _0x1c7851[_0x5651d0(0xe4)];}export async function recognizeRuntimeOcr(_0x38697c,_0x42ba04){const _0x4e0f13=a76_0x4b54,_0x5985c6=await apiRequest('/client/ocr',{'method':_0x4e0f13(0x109),'body':{'appCode':_0x38697c,'url':_0x42ba04[_0x4e0f13(0x111)],'type':_0x42ba04[_0x4e0f13(0x110)]}});return _0x5985c6[_0x4e0f13(0xe4)];}export async function getRuntimeAppConfigByKey(_0xba17db,_0x31dcca){const _0xcd0eec=a76_0x4b54,_0xd82c07=new URLSearchParams({'appCode':_0xba17db,'key':_0x31dcca}),_0xb0c23a=await apiRequest(_0xcd0eec(0xbf)+_0xd82c07[_0xcd0eec(0x127)]());if(typeof _0xb0c23a[_0xcd0eec(0xe4)]!=='string')throw CliErrors[_0xcd0eec(0xbe)](_0xcd0eec(0xb8)+_0x31dcca);return _0xb0c23a[_0xcd0eec(0xe4)];}export async function listRuntimeArtifacts(_0xdf7182,_0x263407){const _0x41b7f1=a76_0x4b54,_0x3fb996=new URLSearchParams({'appCode':_0xdf7182});if(_0x263407?.[_0x41b7f1(0xaa)])_0x3fb996[_0x41b7f1(0x118)](_0x41b7f1(0xaa),_0x263407['artifactType']);if(_0x263407?.[_0x41b7f1(0x100)])_0x3fb996['set'](_0x41b7f1(0x100),_0x263407[_0x41b7f1(0x100)]);if(_0x263407?.[_0x41b7f1(0xb4)]!==undefined)_0x3fb996['set'](_0x41b7f1(0xb4),String(_0x263407['favorite']));const _0x5c03de=await apiRequest('/client/artifact/list?'+_0x3fb996['toString']());return Array[_0x41b7f1(0x92)](_0x5c03de['data'])?_0x5c03de[_0x41b7f1(0xe4)]:[];}export async function getRuntimeArtifact(_0x7292b,_0x47aa37){const _0x3673f9=a76_0x4b54,_0xf5b40e=await apiRequest('/client/artifact/'+_0x7292b+'?appCode='+encodeURIComponent(_0x47aa37));if(!_0xf5b40e['data'])throw CliErrors[_0x3673f9(0xbe)](_0x3673f9(0x108)+_0x7292b);return _0xf5b40e[_0x3673f9(0xe4)];}export async function createRuntimeArtifact(_0x44fb1c,_0x21e571){const _0x427c6a=a76_0x4b54,_0x5af240=await apiRequest(_0x427c6a(0xdd),{'method':_0x427c6a(0x109),'body':{'appCode':_0x44fb1c,..._0x21e571}});return _0x5af240[_0x427c6a(0xe4)];}export async function updateRuntimeArtifact(_0x58d3b0,_0x3eb75b,_0xc38a16){const _0x5b1376=a76_0x4b54,_0x302d27=await apiRequest(_0x5b1376(0x104)+_0x58d3b0+_0x5b1376(0x94),{'method':'POST','body':{'appCode':_0x3eb75b,..._0xc38a16}});return _0x302d27[_0x5b1376(0xe4)];}export async function listPersonalBffs(_0xa80f66){const _0x3afe8c=a76_0x4b54,_0x1d9ac8=await apiRequest(_0x3afe8c(0xdc)+encodeURIComponent(_0xa80f66));return Array[_0x3afe8c(0x92)](_0x1d9ac8[_0x3afe8c(0xe4)])?_0x1d9ac8[_0x3afe8c(0xe4)]:[];}export async function getPersonalBff(_0x128e5d,_0x1ef4e7){const _0x5bd147=a76_0x4b54,_0x54b5a6=await apiRequest(_0x5bd147(0x102)+_0x128e5d+_0x5bd147(0xb0)+encodeURIComponent(_0x1ef4e7));if(!_0x54b5a6[_0x5bd147(0xe4)])throw CliErrors[_0x5bd147(0xbe)](_0x5bd147(0xb2)+_0x128e5d);return _0x54b5a6['data'];}export async function createPersonalBff(_0x33eeee,_0x236fa3){const _0x34899b=a76_0x4b54,_0x2042a8=await apiRequest(_0x34899b(0x11c),{'method':_0x34899b(0x109),'body':{'appCode':_0x33eeee,..._0x236fa3}});return _0x2042a8[_0x34899b(0xe4)];}export async function updatePersonalBff(_0x59adef,_0x2487a5,_0x6690e0){const _0x4d6f03=a76_0x4b54,_0x22dbe7=await apiRequest(_0x4d6f03(0x102)+_0x59adef+'/update',{'method':_0x4d6f03(0x109),'body':{'appCode':_0x2487a5,..._0x6690e0}});return _0x22dbe7[_0x4d6f03(0xe4)];}export async function executePersonalBff(_0x274c9b,_0x4d627f,_0x58d1e6){const _0x34a4d4=a76_0x4b54,_0x462694=await apiRequest(_0x34a4d4(0x102)+_0x274c9b+_0x34a4d4(0x9a)+encodeURIComponent(_0x4d627f),{'method':_0x34a4d4(0x109),'body':_0x58d1e6});return _0x462694['data'];}export async function listPersonalKnowledgeBaseItems(_0x4c8451){const _0x26a9db=a76_0x4b54,_0x1bfba7=await apiRequest(_0x26a9db(0xc0)+encodeURIComponent(_0x4c8451));return Array[_0x26a9db(0x92)](_0x1bfba7['data'])?_0x1bfba7['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x57cb98,_0x5e2612){const _0x3f745c=a76_0x4b54,_0x5d3ba9=await apiRequest(_0x3f745c(0xed)+_0x57cb98+_0x3f745c(0xb0)+encodeURIComponent(_0x5e2612));if(!_0x5d3ba9[_0x3f745c(0xe4)])throw CliErrors['validation'](_0x3f745c(0x8d)+_0x57cb98);return _0x5d3ba9[_0x3f745c(0xe4)];}export async function createPersonalKnowledgeBaseItem(_0x486269,_0x1e7864){const _0x5ec3a6=a76_0x4b54,_0x487e36=await apiRequest(_0x5ec3a6(0x123),{'method':_0x5ec3a6(0x109),'body':{'appCode':_0x486269,..._0x1e7864}});return _0x487e36[_0x5ec3a6(0xe4)];}export async function updatePersonalKnowledgeBaseItem(_0x4a3eac,_0x43e530,_0x5617a8){const _0x3a79f6=a76_0x4b54,_0x4c6723=await apiRequest(_0x3a79f6(0xed)+_0x4a3eac+_0x3a79f6(0x94),{'method':'POST','body':{'appCode':_0x43e530,..._0x5617a8}});return _0x4c6723['data'];}export async function searchKnowledgeBase(_0xff27cd,_0x549c0f){const _0x29dbaf=a76_0x4b54,_0x43b25e=await apiRequest(_0x29dbaf(0x11d),{'method':'POST','body':{'appCode':_0xff27cd,'query':_0x549c0f['query'],..._0x549c0f['topK']!==undefined?{'topK':_0x549c0f[_0x29dbaf(0xc1)]}:{}}});return Array[_0x29dbaf(0x92)](_0x43b25e['data'])?_0x43b25e[_0x29dbaf(0xe4)]:[];}export async function getRuntimeSkillByCode(_0x3fda2b,_0x50123b){const _0x12951=a76_0x4b54,_0xf8819c=await skillHubJsonRequest(_0x12951(0xcf)+encodeURIComponent(_0x3fda2b)+'/'+encodeURIComponent(_0x50123b),{'allowNotFound':!![]});return _0xf8819c?skillHubRuntimeDetailToRuntimeSkill(_0xf8819c):undefined;}export async function listRuntimeSkills(_0x1da2c5){const _0x2c0233=a76_0x4b54,_0x59705d=await skillHubJsonRequest(_0x2c0233(0xd2)+encodeURIComponent(_0x1da2c5[_0x2c0233(0xfc)])+_0x2c0233(0xd8),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x1da2c5[_0x2c0233(0xfc)],_0x59705d,_0x1da2c5[_0x2c0233(0x125)]??_0x2c0233(0xea),_0x1da2c5[_0x2c0233(0xc8)]);}export async function listPersonalRuntimeSkills(_0x5d3a6c){const _0x371347=a76_0x4b54;return(await listRuntimeSkills({'appCode':_0x5d3a6c,'scope':_0x371347(0xae)}))[_0x371347(0xae)];}export async function listCompanyRuntimeSkills(_0x42e4fc){const _0x5513ff=a76_0x4b54;return(await listRuntimeSkills({'appCode':_0x42e4fc,'scope':'company'}))[_0x5513ff(0xf6)];}export async function listVisibleRuntimeSkills(_0x505852){const _0x23e885=a76_0x4b54;return(await listRuntimeSkills({'appCode':_0x505852,'scope':_0x23e885(0xea)}))[_0x23e885(0xc7)];}export async function createPersonalRuntimeSkill(_0x3583b8,_0x428911,_0x52ab73={}){return publishRuntimeSkill(_0x3583b8,_0x428911,{'visibility':'PRIVATE','confirmWarnings':_0x52ab73['confirmWarnings']});}export async function updatePersonalRuntimeSkill(_0xb2ddb0,_0x288a3f,_0x3330b8,_0x13fc28={}){const _0x4a4b51=a76_0x4b54;return publishRuntimeSkill(_0x288a3f,{..._0x3330b8,'skillCode':_0x3330b8[_0x4a4b51(0xbc)]??_0xb2ddb0},{'visibility':_0x4a4b51(0xd4),'confirmWarnings':_0x13fc28[_0x4a4b51(0x122)]});}export async function publishCompanyRuntimeSkill(_0x3b4763,_0x1b5d65,_0xe727d2={}){const _0x4b297b=a76_0x4b54;return publishRuntimeSkill(_0x3b4763,_0x1b5d65,{'visibility':_0x4b297b(0xcc),'confirmWarnings':_0xe727d2[_0x4b297b(0x122)]});}export async function validateRuntimeSkillPublish(_0x2cb3ba,_0xe4270b,_0x152fc0){const _0xb8060c=a76_0x4b54,_0x17d73a=buildRuntimeSkillPublishForm(_0xe4270b,_0x152fc0[_0xb8060c(0xab)]),_0x1c2696=await skillHubJsonRequest(_0xb8060c(0xba)+encodeURIComponent(_0x2cb3ba)+'/publish/validate',{'method':'POST','body':_0x17d73a});return{'valid':_0x1c2696['valid']===!![],'errors':Array['isArray'](_0x1c2696['errors'])?_0x1c2696[_0xb8060c(0xe6)]:[],'warnings':Array[_0xb8060c(0x92)](_0x1c2696['warnings'])?_0x1c2696['warnings']:[],'resolvedSlug':_0x1c2696[_0xb8060c(0xee)],'resolvedVersion':_0x1c2696[_0xb8060c(0xcb)]};}export async function downloadRuntimeSkillPackage(_0x3f5a86,_0xde9e78,_0x1ebc6e,_0xef28c3){const _0x5d6b5a=a76_0x4b54;void _0x3f5a86;const _0x3776f6=_0xef28c3?_0x5d6b5a(0xba)+encodeURIComponent(_0x1ebc6e)+'/'+encodeURIComponent(_0xde9e78)+_0x5d6b5a(0x10c)+encodeURIComponent(_0xef28c3)+_0x5d6b5a(0xb9):_0x5d6b5a(0xba)+encodeURIComponent(_0x1ebc6e)+'/'+encodeURIComponent(_0xde9e78)+_0x5d6b5a(0xb9);return skillHubBinaryRequest(_0x3776f6);}async function publishRuntimeSkill(_0x9f2ba,_0x5cd841,_0x162287){const _0x52fddc=a76_0x4b54,_0x2e3648=buildRuntimeSkillPublishForm(_0x5cd841,_0x162287['visibility']),_0x87cc32=await skillHubJsonRequest(_0x52fddc(0xba)+encodeURIComponent(_0x9f2ba)+_0x52fddc(0x8f),{'method':_0x52fddc(0x109),'query':{'confirmWarnings':_0x162287[_0x52fddc(0x122)]===!![]?!![]:undefined},'body':_0x2e3648});return{'appCode':_0x87cc32[_0x52fddc(0xd9)]??_0x9f2ba,'skillCode':_0x87cc32[_0x52fddc(0xa7)]??_0x5cd841['skillCode']??'','skillName':_0x5cd841[_0x52fddc(0xa8)]??_0x87cc32[_0x52fddc(0xa7)]??_0x5cd841['skillCode'],'description':_0x5cd841['description'],'scope':skillHubVisibilityToScope(_0x87cc32[_0x52fddc(0xab)]??_0x162287[_0x52fddc(0xab)])??_0x52fddc(0xae),'version':_0x87cc32['version']??_0x5cd841[_0x52fddc(0x95)],'tags':_0x5cd841[_0x52fddc(0xce)],'content':_0x5cd841[_0x52fddc(0xfb)]};}function buildRuntimeSkillPublishForm(_0x36a796,_0x4d1967){const _0x8c6fee=a76_0x4b54,_0x554c09=new FormData();return _0x554c09[_0x8c6fee(0x118)](_0x8c6fee(0xa6),runtimeSkillPackageFile(_0x36a796)),_0x36a796['skillName']?.[_0x8c6fee(0xa0)]()&&_0x554c09['set'](_0x8c6fee(0xc4),_0x36a796[_0x8c6fee(0xa8)][_0x8c6fee(0xa0)]()),_0x554c09[_0x8c6fee(0x118)]('visibility',_0x4d1967),_0x554c09;}function runtimeSkillPackageFile(_0x4c42fa){const _0x137235=a76_0x4b54;if(!_0x4c42fa[_0x137235(0xdb)])throw CliErrors[_0x137235(0xbe)]('Missing\x20Skill\x20package\x20payload.');const _0x36b819=Buffer[_0x137235(0xbb)](_0x4c42fa[_0x137235(0xdb)],'base64'),_0x149180=new Blob([_0x36b819],{'type':_0x137235(0xef)}),_0x390eb5=(_0x4c42fa['skillCode']||_0x137235(0x101))+'.zip';if(typeof File!==_0x137235(0xa2))return new File([_0x149180],_0x390eb5,{'type':_0x137235(0xef)});return _0x149180;}function normalizeSkillHubRuntimeListResponse(_0x211cf5,_0x49cc10,_0xb271b6,_0x24079a){const _0xc23975=a76_0x4b54,_0x41be7b=Array[_0xc23975(0x92)](_0x49cc10)?_0x49cc10:Array[_0xc23975(0x92)](_0x49cc10?.['items'])?_0x49cc10[_0xc23975(0x96)]:[],_0x37d767=_0x24079a?.['trim'](),_0x2cb8f6=_0x41be7b['filter'](_0x38790d=>!_0x37d767||_0x38790d[_0xc23975(0xa7)]===_0x37d767)[_0xc23975(0xf3)](skillHubRuntimeItemToRuntimeSkill)[_0xc23975(0xd7)](_0x598818=>Boolean(_0x598818)),_0x40ea07=_0x2cb8f6[_0xc23975(0xd7)](_0x39980f=>_0x39980f[_0xc23975(0x125)]==='personal'),_0x2a4ab9=_0x2cb8f6[_0xc23975(0xd7)](_0x315587=>_0x315587[_0xc23975(0x125)]===_0xc23975(0xf6));return{'appCode':_0x211cf5,'personal':_0xb271b6===_0xc23975(0xf6)?[]:_0x40ea07,'company':_0xb271b6==='personal'?[]:_0x2a4ab9,'effective':buildEffectiveRuntimeSkills(_0x40ea07,_0x2a4ab9,_0xb271b6)};}function skillHubRuntimeItemToRuntimeSkill(_0x426bbd){const _0x547e50=a76_0x4b54,_0x11b746=_0x426bbd[_0x547e50(0xa7)]?.['trim'](),_0x7ad631=skillHubVisibilityToScope(_0x426bbd[_0x547e50(0xab)]);if(!_0x11b746||!_0x7ad631)return undefined;return{'id':_0x426bbd['id'],'appCode':_0x426bbd[_0x547e50(0xd9)],'skillCode':_0x11b746,'skillName':_0x426bbd[_0x547e50(0xc4)]??_0x11b746,'description':_0x426bbd[_0x547e50(0xfa)],'scope':_0x7ad631,'version':skillHubRuntimeItemVersion(_0x426bbd),'status':_0x426bbd['status']};}function skillHubRuntimeDetailToRuntimeSkill(_0xdac3d2){const _0x2a5b96=a76_0x4b54,_0x56c68b=_0xdac3d2['slug']?.['trim']();if(!_0x56c68b)return undefined;return{'id':_0xdac3d2['id'],'appCode':_0xdac3d2['namespace'],'skillCode':_0x56c68b,'skillName':_0xdac3d2[_0x2a5b96(0xc4)]??_0x56c68b,'description':_0xdac3d2[_0x2a5b96(0xfa)],'example':_0xdac3d2['example'],'scope':skillHubVisibilityToScope(_0xdac3d2[_0x2a5b96(0xab)])??_0xdac3d2[_0x2a5b96(0xab)]?.[_0x2a5b96(0xc3)](),'version':skillHubRuntimeItemVersion(_0xdac3d2),'status':_0xdac3d2['status']};}function skillHubVisibilityToScope(_0xb07b70){const _0x53f88e=a76_0x4b54;if(_0xb07b70===_0x53f88e(0xd4))return _0x53f88e(0xae);if(_0xb07b70===_0x53f88e(0xcc))return _0x53f88e(0xf6);return undefined;}function skillHubRuntimeItemVersion(_0xfb0af0){const _0x2e4f4b=a76_0x4b54;return _0xfb0af0[_0x2e4f4b(0xeb)]?.['version']??_0xfb0af0[_0x2e4f4b(0x113)]?.['version']??_0xfb0af0['ownerPreviewVersion']?.[_0x2e4f4b(0x95)];}function buildEffectiveRuntimeSkills(_0x2533f3,_0x34bc59,_0x503c4c){const _0x540459=a76_0x4b54;if(_0x503c4c===_0x540459(0xae))return _0x2533f3;if(_0x503c4c===_0x540459(0xf6))return _0x34bc59;const _0x1afe94=new Map();for(const _0x493791 of _0x34bc59){_0x1afe94[_0x540459(0x118)](_0x493791[_0x540459(0xbc)],_0x493791);}for(const _0x560d45 of _0x2533f3){_0x1afe94[_0x540459(0x118)](_0x560d45['skillCode'],_0x560d45);}return Array[_0x540459(0xbb)](_0x1afe94[_0x540459(0xd6)]());}function normalizeRuntimeSkillListResponse(_0x4938ee,_0x3a303f){const _0xf25109=a76_0x4b54;if(Array[_0xf25109(0x92)](_0x3a303f)){const _0x40acc=_0x3a303f[_0xf25109(0xd7)](_0x567339=>_0x567339[_0xf25109(0x125)]==='personal'),_0x2125d4=_0x3a303f[_0xf25109(0xd7)](_0x43e6f2=>_0x43e6f2[_0xf25109(0x125)]===_0xf25109(0xf6));return{'appCode':_0x4938ee,'personal':_0x40acc,'company':_0x2125d4,'effective':[..._0x2125d4,..._0x40acc]};}return{'appCode':_0x3a303f?.['appCode']??_0x4938ee,'personal':Array[_0xf25109(0x92)](_0x3a303f?.[_0xf25109(0xae)])?_0x3a303f[_0xf25109(0xae)]:[],'company':Array[_0xf25109(0x92)](_0x3a303f?.['company'])?_0x3a303f[_0xf25109(0xf6)]:[],'effective':Array['isArray'](_0x3a303f?.['effective'])?_0x3a303f['effective']:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a77_0x5683(){const _0x5253fc=['dbId','2921256pQHjEe','153522ocDRHt','20azMjUY','db-','125952ntEzJX','set','147MmLblq','get','245288QDGAGC','has','229085gSIvCk','dbName','68770oRBXOO','613400QckwhA','find','640SSzfog','map'];a77_0x5683=function(){return _0x5253fc;};return a77_0x5683();}function a77_0x3909(_0x46ac8a,_0x302606){_0x46ac8a=_0x46ac8a-0x9f;const _0x568376=a77_0x5683();let _0x390934=_0x568376[_0x46ac8a];return _0x390934;}(function(_0x392905,_0x4869ba){const _0x501214=a77_0x3909,_0x3e1bc4=_0x392905();while(!![]){try{const _0x4c37a1=parseInt(_0x501214(0xaf))/0x1+parseInt(_0x501214(0xae))/0x2+-parseInt(_0x501214(0xa6))/0x3+parseInt(_0x501214(0xa4))/0x4*(-parseInt(_0x501214(0xac))/0x5)+-parseInt(_0x501214(0xa2))/0x6+-parseInt(_0x501214(0xa8))/0x7*(parseInt(_0x501214(0xaa))/0x8)+parseInt(_0x501214(0xa3))/0x9*(parseInt(_0x501214(0x9f))/0xa);if(_0x4c37a1===_0x4869ba)break;else _0x3e1bc4['push'](_0x3e1bc4['shift']());}catch(_0x33f747){_0x3e1bc4['push'](_0x3e1bc4['shift']());}}}(a77_0x5683,0x52707));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x43168e){const _0x1669ad=a77_0x3909;if(cache[_0x1669ad(0xab)](_0x43168e))return cache[_0x1669ad(0xa9)](_0x43168e);const _0x15707a=await listDatasets(_0x43168e),_0x3437a3=new Map();for(const _0x4ef3a3 of _0x15707a){const _0x212eb0=_0x4ef3a3['dbtableConfig'];_0x212eb0?.[_0x1669ad(0xa1)]!=null&&_0x3437a3[_0x1669ad(0xa7)](_0x212eb0['dbId'],_0x212eb0[_0x1669ad(0xad)]??_0x1669ad(0xa5)+_0x212eb0['dbId']);}const _0x13bf26=[..._0x3437a3['entries']()][_0x1669ad(0xa0)](([_0x3a1ba1,_0x5875e4])=>({'dbId':_0x3a1ba1,'dbName':_0x5875e4}));return cache[_0x1669ad(0xa7)](_0x43168e,_0x13bf26),_0x13bf26;}export async function getDbName(_0x3e8c1f,_0x7227cf){const _0x593906=a77_0x3909;try{const _0x420659=await listDatabases(_0x3e8c1f);return _0x420659[_0x593906(0xb0)](_0x14f306=>_0x14f306[_0x593906(0xa1)]===_0x7227cf)?.[_0x593906(0xad)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3687c7,_0x1f2c36){const _0x1004eb=a78_0x41ef,_0x23578c=_0x3687c7();while(!![]){try{const _0x5a7cfc=parseInt(_0x1004eb(0x99))/0x1*(-parseInt(_0x1004eb(0xae))/0x2)+parseInt(_0x1004eb(0x97))/0x3*(-parseInt(_0x1004eb(0x8f))/0x4)+-parseInt(_0x1004eb(0x9d))/0x5*(parseInt(_0x1004eb(0x9a))/0x6)+parseInt(_0x1004eb(0x90))/0x7*(parseInt(_0x1004eb(0x8d))/0x8)+parseInt(_0x1004eb(0xa3))/0x9+-parseInt(_0x1004eb(0x8c))/0xa*(parseInt(_0x1004eb(0xaa))/0xb)+parseInt(_0x1004eb(0xa7))/0xc*(parseInt(_0x1004eb(0x86))/0xd);if(_0x5a7cfc===_0x1f2c36)break;else _0x23578c['push'](_0x23578c['shift']());}catch(_0x154ccb){_0x23578c['push'](_0x23578c['shift']());}}}(a78_0x4c4f,0x5676d));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{parseBatchCreateItemsFromParams}from'../utils/params.js';import{installLosslessJsonResponseParser}from'../utils/lossless-json.js';let _client,restoreResponseJsonParser;export function initSdkClient(_0x5bb276){const _0x361957=a78_0x41ef;restoreResponseJsonParser??=installLosslessJsonResponseParser();try{_client=createClient({'appCode':_0x5bb276[_0x361957(0x93)],'env':_0x5bb276[_0x361957(0xa2)],'authMode':_0x5bb276[_0x361957(0x8b)],..._0x5bb276['accessKey']?{'accessKey':_0x5bb276[_0x361957(0xab)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x361957(0x96)]}}});}catch(_0x23208b){clearSdkClient();throw _0x23208b;}}export function clearSdkClient(){_client=undefined,restoreResponseJsonParser?.(),restoreResponseJsonParser=undefined;}function ensureClient(){const _0x40cc70=a78_0x41ef;if(!_client)throw new Error(_0x40cc70(0xad));return _client;}function normalizeAggregateParams(_0x55b082){const _0x24aff=a78_0x41ef,_0x5b7885=_0x55b082[_0x24aff(0xac)];if(_0x5b7885===undefined)return _0x55b082;if(!Array[_0x24aff(0xa4)](_0x5b7885))throw CliErrors['validation'](_0x24aff(0x8a));return{..._0x55b082,'aggregate':_0x5b7885['map']((_0x5207bc,_0x56d05d)=>{const _0x23a424=_0x24aff;if(!_0x5207bc||typeof _0x5207bc!==_0x23a424(0x9b)||Array[_0x23a424(0xa4)](_0x5207bc))throw CliErrors[_0x23a424(0x87)](_0x23a424(0x9f)+_0x56d05d+']\x20must\x20be\x20an\x20object.');const _0x4fbe84=_0x5207bc[_0x23a424(0x91)]??_0x5207bc[_0x23a424(0xa8)];if(typeof _0x4fbe84!==_0x23a424(0xa0)||_0x4fbe84['trim']()==='')throw CliErrors[_0x23a424(0x87)](_0x23a424(0x9f)+_0x56d05d+']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.');const _0x1820b9={..._0x5207bc,'column':_0x4fbe84};return delete _0x1820b9[_0x23a424(0xa8)],_0x1820b9;})};}export async function executeData(_0x4f2fa9,_0x4c4dc6,_0x451e05){const _0x57b9d6=a78_0x41ef,_0x3e9971=ensureClient(),_0x4fd22a=_0x57b9d6(0x9e)+_0x4f2fa9,_0x30d24b=_0x3e9971[_0x57b9d6(0x8e)][_0x4fd22a];if(!_0x30d24b||typeof _0x30d24b[_0x4c4dc6]!==_0x57b9d6(0x94))throw new Error('SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22'+_0x4c4dc6+_0x57b9d6(0xa1)+_0x57b9d6(0xa9));if(_0x4c4dc6===_0x57b9d6(0x89))return _0x30d24b['batchCreate'](parseBatchCreateItemsFromParams(_0x451e05));const _0x2c065f=_0x451e05!==undefined&&_0x451e05!==null&&!Array['isArray'](_0x451e05)?_0x451e05:{};switch(_0x4c4dc6){case _0x57b9d6(0x9c):{const _0xd0e2d3=_0x2c065f['id'];if(_0xd0e2d3===undefined||_0xd0e2d3===null)throw new Error(_0x57b9d6(0x88));return _0x30d24b[_0x57b9d6(0x9c)](_0xd0e2d3);}case _0x57b9d6(0xa5):{const {id:_0x4f346b,..._0x374bb5}=_0x2c065f;if(_0x4f346b===undefined||_0x4f346b===null)throw new Error(_0x57b9d6(0x98));return _0x30d24b[_0x57b9d6(0xa5)](_0x4f346b,_0x374bb5);}case'delete':{const _0x7802cb=_0x2c065f['id'];if(_0x7802cb===undefined||_0x7802cb===null)throw new Error(_0x57b9d6(0x92));return _0x30d24b['delete'](_0x7802cb);}case _0x57b9d6(0xac):return _0x30d24b[_0x57b9d6(0xac)](normalizeAggregateParams(_0x2c065f));default:return _0x30d24b[_0x4c4dc6](_0x2c065f);}}function a78_0x41ef(_0x3a5cca,_0x12965a){_0x3a5cca=_0x3a5cca-0x86;const _0x4c4fdb=a78_0x4c4f();let _0x41efc9=_0x4c4fdb[_0x3a5cca];return _0x41efc9;}function a78_0x4c4f(){const _0x425e37=['173826ebNdih','object','getOne','20POJHDJ','dataset_','data\x20aggregate\x20--params.aggregate[','string','\x22.\x20','env','1090935yJjMXj','isArray','update','bff','553176wcxiWK','field','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','6523AkKYkg','accessKey','aggregate','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','4516bvCKzX','390olzqfd','validation','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','batchCreate','data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.','authMode','2950sUWVoW','8ETKaWK','models','26968wDhgoS','1950081ytPCjn','column','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','appCode','function','execute','invokeSource','237MucxXm','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','268pJrkgE'];a78_0x4c4f=function(){return _0x425e37;};return a78_0x4c4f();}export async function executeSdkSql(_0x1abfd9,_0x1ed9b4){const _0xbe72ec=ensureClient();return _0xbe72ec['sql']['execute']({'sqlCode':_0x1abfd9,'params':_0x1ed9b4});}export async function executeSdkBff(_0x47c966,_0x3a9703){const _0x14c99d=a78_0x41ef,_0x468698=ensureClient();return _0x468698[_0x14c99d(0xa6)][_0x14c99d(0x95)]({'scriptName':_0x47c966,'params':_0x3a9703});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a79_0x38ee43=a79_0x1263;(function(_0x245808,_0x5be826){const _0x403fe3=a79_0x1263,_0x3b5d83=_0x245808();while(!![]){try{const _0xa4e09=-parseInt(_0x403fe3(0x1b2))/0x1+parseInt(_0x403fe3(0x1a9))/0x2+parseInt(_0x403fe3(0x1ae))/0x3*(parseInt(_0x403fe3(0x1af))/0x4)+-parseInt(_0x403fe3(0x1ab))/0x5+parseInt(_0x403fe3(0x1ad))/0x6*(-parseInt(_0x403fe3(0x1b0))/0x7)+-parseInt(_0x403fe3(0x1b5))/0x8*(-parseInt(_0x403fe3(0x1b4))/0x9)+-parseInt(_0x403fe3(0x1b6))/0xa;if(_0xa4e09===_0x5be826)break;else _0x3b5d83['push'](_0x3b5d83['shift']());}catch(_0x3fa2eb){_0x3b5d83['push'](_0x3b5d83['shift']());}}}(a79_0x31d3,0x54915));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':'Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[a79_0x38ee43(0x1ac)]+'\x20or\x20run\x20`'+CLI_BIN_NAME+a79_0x38ee43(0x1aa),'configMissingHint':'Set\x20appcode\x20via\x20--appcode\x20or\x20'+PRODUCT_CONFIG['newConfigFileName']+'.','notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20'+PRODUCT_CONFIG[a79_0x38ee43(0x1ac)]+a79_0x38ee43(0x1b3)});export const CliErrors={...baseCliErrors,'rateLimited':(_0x3ecc09,_0x18a0c4)=>new CliError(a79_0x38ee43(0x1b1),0x2,_0x3ecc09,_0x18a0c4)};function a79_0x1263(_0x378bee,_0x59c2a5){_0x378bee=_0x378bee-0x1a9;const _0x31d37d=a79_0x31d3();let _0x126350=_0x31d37d[_0x378bee];return _0x126350;}function a79_0x31d3(){const _0x4d4829=['\x20file.','18KfsuzR','2513240IejptV','592520BLcvYC','656546vLWvab','\x20auth\x20login`.','1966350XdeJeq','newConfigFileName','438IdlLsQ','2415qRPLyx','3056jsbRSZ','13895Hqmxoe','rate_limited','627787lbKpjg'];a79_0x31d3=function(){return _0x4d4829;};return a79_0x31d3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x267cbc,_0x59b5df){var _0x1f21c4=a80_0xf463,_0x2be1f7=_0x267cbc();while(!![]){try{var _0x128516=parseInt(_0x1f21c4(0x1cf))/0x1+parseInt(_0x1f21c4(0x1d1))/0x2+-parseInt(_0x1f21c4(0x1cd))/0x3*(parseInt(_0x1f21c4(0x1ca))/0x4)+parseInt(_0x1f21c4(0x1d3))/0x5*(parseInt(_0x1f21c4(0x1d2))/0x6)+parseInt(_0x1f21c4(0x1ce))/0x7*(-parseInt(_0x1f21c4(0x1cb))/0x8)+parseInt(_0x1f21c4(0x1d0))/0x9+-parseInt(_0x1f21c4(0x1cc))/0xa;if(_0x128516===_0x59b5df)break;else _0x2be1f7['push'](_0x2be1f7['shift']());}catch(_0x3c6646){_0x2be1f7['push'](_0x2be1f7['shift']());}}}(a80_0x25e5,0x4fdd5));function a80_0xf463(_0x2022c5,_0x115270){_0x2022c5=_0x2022c5-0x1ca;var _0x25e5b3=a80_0x25e5();var _0xf463ca=_0x25e5b3[_0x2022c5];return _0xf463ca;}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a80_0x2e3a4b}from'@lovrabet/cli-framework';export function buildAllFlags(_0x4f9bd6){return a80_0x2e3a4b(_0x4f9bd6,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}function a80_0x25e5(){var _0x5eca69=['66laJujj','66745khteyy','99972FqrcPx','680erGxwT','8820290UbsrkZ','9GDSJpH','21189XcYkJb','567410CWXrNN','2421747hjpNAh','1116192unUeCK'];a80_0x25e5=function(){return _0x5eca69;};return a80_0x25e5();}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d23bc,_0xfa29c5){const _0x85d4a2=a81_0x264b,_0x48f140=_0x3d23bc();while(!![]){try{const _0x9243af=parseInt(_0x85d4a2(0x1ac))/0x1*(parseInt(_0x85d4a2(0x1b6))/0x2)+-parseInt(_0x85d4a2(0x1b1))/0x3*(parseInt(_0x85d4a2(0x1b8))/0x4)+parseInt(_0x85d4a2(0x1b0))/0x5+-parseInt(_0x85d4a2(0x1b4))/0x6*(-parseInt(_0x85d4a2(0x1b3))/0x7)+-parseInt(_0x85d4a2(0x1af))/0x8*(parseInt(_0x85d4a2(0x1b7))/0x9)+parseInt(_0x85d4a2(0x1ad))/0xa*(-parseInt(_0x85d4a2(0x1ab))/0xb)+parseInt(_0x85d4a2(0x1ae))/0xc;if(_0x9243af===_0xfa29c5)break;else _0x48f140['push'](_0x48f140['shift']());}catch(_0x53decc){_0x48f140['push'](_0x48f140['shift']());}}}(a81_0x15d7,0x297ad));function a81_0x264b(_0x24305b,_0x3bd466){_0x24305b=_0x24305b-0x1ab;const _0x15d709=a81_0x15d7();let _0x264b91=_0x15d709[_0x24305b];return _0x264b91;}function a81_0x15d7(){const _0x413291=['5937612HwxWXV','472520iguVLd','210195sMUFxA','756879KQgXxB','body','169960bMmhAz','78zbbsyL','description','4794GqymeS','45BMeWJk','4SCdWMj','99IslqeT','34cvitPP','240510GqDevc'];a81_0x15d7=function(){return _0x413291;};return a81_0x15d7();}export function dryRun(_0x1fd3f8,_0x2723a1){const _0x2ff591={'method':_0x1fd3f8,'url':_0x2723a1},_0x3b1150={'body'(_0x280807){const _0x1b2ade=a81_0x264b;return _0x2ff591[_0x1b2ade(0x1b2)]=_0x280807,_0x3b1150;},'description'(_0x44a8a9){const _0x3214d8=a81_0x264b;return _0x2ff591[_0x3214d8(0x1b5)]=_0x44a8a9,_0x3b1150;},'build'(){return{..._0x2ff591};}};return _0x3b1150;}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a82_0x3f4440=a82_0x2780;function a82_0x2780(_0x3b6f3a,_0x406d10){_0x3b6f3a=_0x3b6f3a-0x1bd;const _0x29b4c5=a82_0x29b4();let _0x278026=_0x29b4c5[_0x3b6f3a];return _0x278026;}(function(_0x3084a0,_0x57c29a){const _0x13da74=a82_0x2780,_0x54b587=_0x3084a0();while(!![]){try{const _0x582d45=parseInt(_0x13da74(0x1c4))/0x1+-parseInt(_0x13da74(0x1c3))/0x2*(parseInt(_0x13da74(0x1c1))/0x3)+-parseInt(_0x13da74(0x1c5))/0x4+-parseInt(_0x13da74(0x1be))/0x5+parseInt(_0x13da74(0x1bd))/0x6*(parseInt(_0x13da74(0x1c2))/0x7)+-parseInt(_0x13da74(0x1c0))/0x8+parseInt(_0x13da74(0x1c6))/0x9;if(_0x582d45===_0x57c29a)break;else _0x54b587['push'](_0x54b587['shift']());}catch(_0xeaeabe){_0x54b587['push'](_0x54b587['shift']());}}}(a82_0x29b4,0x6bbda));import{createFlagHelpers}from'@lovrabet/cli-framework';function a82_0x29b4(){const _0x422eed=['2294155KCpnRz','parseFlags','4104752tJqOND','12AOvPCY','161LYGPSM','177884iGjSyN','72008PgnLRg','630876tPgtsV','12234852tOaCpJ','validateFlags','129204DCeSZu'];a82_0x29b4=function(){return _0x422eed;};return a82_0x29b4();}import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a82_0x3f4440(0x1bf)];export const validateFlags=helpers[a82_0x3f4440(0x1c7)];
|