@lovrabet/lovrabet-cli 2.1.7-beta.3 → 2.1.7-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -0
- package/lib/commands/app-config/index.js +1 -0
- package/lib/commands/app-config/shared.js +1 -0
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/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/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x31326f=a56_0x53d7;(function(_0x9e5e42,_0x475956){const _0x359cd4=a56_0x53d7,_0x73e8e6=_0x9e5e42();while(!![]){try{const _0x3c3723=-parseInt(_0x359cd4(0x1e0))/0x1*(-parseInt(_0x359cd4(0x1e4))/0x2)+-parseInt(_0x359cd4(0x1df))/0x3+-parseInt(_0x359cd4(0x1d4))/0x4+-parseInt(_0x359cd4(0x1d8))/0x5+-parseInt(_0x359cd4(0x1f2))/0x6*(parseInt(_0x359cd4(0x1ea))/0x7)+-parseInt(_0x359cd4(0x1ed))/0x8+parseInt(_0x359cd4(0x1dc))/0x9*(parseInt(_0x359cd4(0x1d5))/0xa);if(_0x3c3723===_0x475956)break;else _0x73e8e6['push'](_0x73e8e6['shift']());}catch(_0x148200){_0x73e8e6['push'](_0x73e8e6['shift']());}}}(a56_0x290a,0x50b55));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';function a56_0x53d7(_0x31785f,_0x2d13d4){_0x31785f=_0x31785f-0x1d4;const _0x290a04=a56_0x290a();let _0x53d71b=_0x290a04[_0x31785f];return _0x53d71b;}import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':a56_0x31326f(0x1e2),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a56_0x31326f(0x1d6)],'importable':!![]},'format':{'description':'Default\x20output\x20format','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a56_0x31326f(0x1da)],'importable':!![]},'pageSize':{'description':a56_0x31326f(0x1e5),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':'Override\x20API\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a56_0x31326f(0x1ef),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':'Override\x20runtime\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a56_0x31326f(0x1d9),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a56_0x31326f(0x1e3),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':'Risk\x20level','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES['riskLevel'],'importable':!![]},'locale':{'description':a56_0x31326f(0x1d7),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a56_0x31326f(0x1e8)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x407499])=>_0x407499[a56_0x31326f(0x1db)])[a56_0x31326f(0x1dd)](([_0x48bc2e])=>_0x48bc2e));export const CONFIG_ENUM_VALUES=Object[a56_0x31326f(0x1e9)](Object[a56_0x31326f(0x1de)](CONFIG_FIELD_SCHEMAS)[a56_0x31326f(0x1e6)](([,_0x41d1f1])=>_0x41d1f1[a56_0x31326f(0x1f1)])[a56_0x31326f(0x1dd)](([_0x3f6cdf,_0x2df5cf])=>[_0x3f6cdf,[..._0x2df5cf[a56_0x31326f(0x1f1)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a56_0x31326f(0x1de)](CONFIG_FIELD_SCHEMAS)[a56_0x31326f(0x1e6)](([,_0x3944dd])=>_0x3944dd[a56_0x31326f(0x1e7)])['map'](([_0x344e3b])=>_0x344e3b);export function getConfigFieldSchema(_0x1280f2){return CONFIG_FIELD_SCHEMAS[_0x1280f2];}export function getConfigEnumValues(_0x177f58){const _0x4abd5f=a56_0x31326f;return getConfigFieldSchema(_0x177f58)?.[_0x4abd5f(0x1f1)];}export function getConfigDefaultValue(_0x53e0be){const _0xaf3f3e=a56_0x31326f;return getConfigFieldSchema(_0x53e0be)?.[_0xaf3f3e(0x1e1)];}function a56_0x290a(){const _0x868bba=['defaultValue','Target\x20environment','Access\x20key\x20(client-ak\x20auth)','2UzSJHY','Default\x20page\x20size','filter','importable','locale','fromEntries','35qKlNuS','legacyCompatOnly','join','4728664OYAzmc','Config\x20key.\x20Top-level:\x20','Override\x20user\x20domain','has','enumValues','451650CKVpAq','1629760NcEQOQ','190HnxQGz','env','Locale','3053485NBwdUf','Override\x20SkillHub\x20domain','format','cliSettableTopLevel','1006659jWnkMa','map','entries','1402968kfQfKb','658663OMNybM'];a56_0x290a=function(){return _0x868bba;};return a56_0x290a();}export function isTopLevelConfigKey(_0x509b5a){const _0x39750c=a56_0x31326f;return TOP_LEVEL_CONFIG_KEYS[_0x39750c(0x1f0)](_0x509b5a);}export function isLegacyCompatConfigKey(_0x73e844){const _0x14ac82=a56_0x31326f;return getConfigFieldSchema(_0x73e844)?.[_0x14ac82(0x1eb)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x4c2a94){const _0x286a82=a56_0x31326f;return[..._0x4c2a94][_0x286a82(0x1ec)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x3bcaef=a56_0x31326f;return _0x3bcaef(0x1ee)+getTopLevelConfigKeySummary()+';\x20local\x20alias:\x20apps.<alias>.appcode';}export function buildAppProfileListFields(_0xf300ac){return{'env':_0xf300ac,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a57_0x3019(_0x132957,_0x22b075){_0x132957=_0x132957-0x1de;const _0x5c84c2=a57_0x5c84();let _0x301914=_0x5c84c2[_0x132957];return _0x301914;}const a57_0x2dc5bb=a57_0x3019;(function(_0x19228c,_0x5ce063){const _0x335564=a57_0x3019,_0x7f845b=_0x19228c();while(!![]){try{const _0x368070=-parseInt(_0x335564(0x1df))/0x1+parseInt(_0x335564(0x1e1))/0x2+-parseInt(_0x335564(0x1e6))/0x3+parseInt(_0x335564(0x1e5))/0x4+-parseInt(_0x335564(0x1e8))/0x5+parseInt(_0x335564(0x1de))/0x6+-parseInt(_0x335564(0x1e2))/0x7*(-parseInt(_0x335564(0x1e3))/0x8);if(_0x368070===_0x5ce063)break;else _0x7f845b['push'](_0x7f845b['shift']());}catch(_0x28e3f9){_0x7f845b['push'](_0x7f845b['shift']());}}}(a57_0x5c84,0xf24fa));export const APP_PUBLISH_STATUS={'Published':a57_0x2dc5bb(0x1e4),'Unpublished':a57_0x2dc5bb(0x1e0)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a57_0x2dc5bb(0x1e7)];function a57_0x5c84(){const _0x19ce85=['1972962rkqMTH','1845599pzCPnP','UNPUBLISH','1462198kCMPss','161bLzShj','997720yTyBuV','PUBLISHED','3644296SdlLxt','356196kiBNTR','Published','9413040hMymen'];a57_0x5c84=function(){return _0x19ce85;};return a57_0x5c84();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a58_0x4852(){const _0x4b84f6=['4965585XRGrlW','1603StvNlP','44LyPPwR','2CEuEkK','27066MtqCCT','30UuJTTi','949907KudCUZ','3511899MvakTm','client-ak','ClientAk','26812698EPOewD','680135ruKyAH','3447664voxdpC'];a58_0x4852=function(){return _0x4b84f6;};return a58_0x4852();}const a58_0x1174f8=a58_0x428f;function a58_0x428f(_0x2f8114,_0x1d04b2){_0x2f8114=_0x2f8114-0x149;const _0x4852ca=a58_0x4852();let _0x428fa2=_0x4852ca[_0x2f8114];return _0x428fa2;}(function(_0x54a56b,_0x8a1455){const _0x4a1a0b=a58_0x428f,_0x4a17fe=_0x54a56b();while(!![]){try{const _0x5ea8f1=-parseInt(_0x4a1a0b(0x14c))/0x1*(parseInt(_0x4a1a0b(0x149))/0x2)+-parseInt(_0x4a1a0b(0x153))/0x3+-parseInt(_0x4a1a0b(0x155))/0x4*(parseInt(_0x4a1a0b(0x151))/0x5)+-parseInt(_0x4a1a0b(0x14a))/0x6*(-parseInt(_0x4a1a0b(0x154))/0x7)+parseInt(_0x4a1a0b(0x152))/0x8+-parseInt(_0x4a1a0b(0x14d))/0x9*(-parseInt(_0x4a1a0b(0x14b))/0xa)+parseInt(_0x4a1a0b(0x150))/0xb;if(_0x5ea8f1===_0x8a1455)break;else _0x4a17fe['push'](_0x4a17fe['shift']());}catch(_0x42302c){_0x4a17fe['push'](_0x4a17fe['shift']());}}}(a58_0x4852,0xecfe9));export const AUTH_MODE={'ClientAk':a58_0x1174f8(0x14e)};export function isAuthMode(_0x5a48b8){const _0x59948c=a58_0x1174f8;return _0x5a48b8===AUTH_MODE[_0x59948c(0x14f)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a59_0xbce616=a59_0x1815;(function(_0xa1a021,_0xc417cd){const _0x171bca=a59_0x1815,_0x28b7d9=_0xa1a021();while(!![]){try{const _0xd96f97=parseInt(_0x171bca(0x12d))/0x1*(-parseInt(_0x171bca(0x13f))/0x2)+parseInt(_0x171bca(0x138))/0x3*(-parseInt(_0x171bca(0x141))/0x4)+-parseInt(_0x171bca(0x12c))/0x5+-parseInt(_0x171bca(0x12b))/0x6+parseInt(_0x171bca(0x125))/0x7*(-parseInt(_0x171bca(0x131))/0x8)+-parseInt(_0x171bca(0x13a))/0x9+parseInt(_0x171bca(0x142))/0xa;if(_0xd96f97===_0xc417cd)break;else _0x28b7d9['push'](_0x28b7d9['shift']());}catch(_0x483116){_0x28b7d9['push'](_0x28b7d9['shift']());}}}(a59_0x1103,0x5f96b));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a59_0xbce616(0x130)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a59_0xbce616(0x129)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;function a59_0x1103(){const _0x1bd69b=['213608teTXXJ','map','name','verbose','app','nonInteractive','json\x20|\x20pretty\x20|\x20compress','2084949HKNeDk','string','4128777iwrAMR','params','Override\x20appcode','boolean','<expr>','2OleIBK','env','4pNZJlQ','32120970Wexutf','yes','help','Show\x20help','global','fromEntries','format','Select\x20app\x20profile\x20by\x20name','<code>','dry-run','appcode','Output\x20format','non-interactive','SQL\x20query\x20code','type','Alias\x20for\x20--non-interactive','126xRhfVJ','JSON\x20params\x20for\x20execute\x20commands','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','sqlcode','cliDisplayName','Name\x20filter','2625384tsZGqY','943110yAYUVv','560026xincQZ','<name>','production\x20|\x20development\x20|\x20daily','cliBinName'];a59_0x1103=function(){return _0x1bd69b;};return a59_0x1103();}export const GLOBAL_FLAGS=[{'name':a59_0xbce616(0x14c),'meowKey':a59_0xbce616(0x14c),'type':a59_0xbce616(0x139),'description':a59_0xbce616(0x13c),'hint':a59_0xbce616(0x14a)},{'name':a59_0xbce616(0x135),'meowKey':a59_0xbce616(0x135),'type':a59_0xbce616(0x139),'description':a59_0xbce616(0x149),'hint':a59_0xbce616(0x12e)},{'name':'env','meowKey':a59_0xbce616(0x140),'type':a59_0xbce616(0x139),'description':'Environment','hint':a59_0xbce616(0x12f)},{'name':a59_0xbce616(0x148),'meowKey':a59_0xbce616(0x148),'type':'string','description':a59_0xbce616(0x14d),'hint':a59_0xbce616(0x137)},{'name':'jq','meowKey':'jq','type':a59_0xbce616(0x139),'description':a59_0xbce616(0x127),'hint':a59_0xbce616(0x13e)},{'name':a59_0xbce616(0x14b),'meowKey':'dryRun','type':a59_0xbce616(0x13d),'description':'Preview\x20operation\x20without\x20executing'},{'name':a59_0xbce616(0x143),'meowKey':a59_0xbce616(0x143),'type':a59_0xbce616(0x13d),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':'non-interactive','meowKey':a59_0xbce616(0x136),'type':a59_0xbce616(0x13d),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a59_0xbce616(0x146),'meowKey':a59_0xbce616(0x146),'type':a59_0xbce616(0x13d),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a59_0xbce616(0x13d),'description':a59_0xbce616(0x151),'hidden':!![]},{'name':'help','meowKey':a59_0xbce616(0x144),'type':a59_0xbce616(0x13d),'description':a59_0xbce616(0x145)},{'name':'id','meowKey':'id','type':a59_0xbce616(0x139),'description':'Record\x20ID','hidden':!![]},{'name':'name','meowKey':a59_0xbce616(0x133),'type':'string','description':a59_0xbce616(0x12a),'hidden':!![]},{'name':'sqlcode','meowKey':a59_0xbce616(0x128),'type':a59_0xbce616(0x139),'description':a59_0xbce616(0x14f),'hidden':!![]},{'name':a59_0xbce616(0x13b),'meowKey':'params','type':a59_0xbce616(0x139),'description':a59_0xbce616(0x126),'hidden':!![]},{'name':a59_0xbce616(0x134),'meowKey':a59_0xbce616(0x134),'type':a59_0xbce616(0x13d),'description':'Verbose\x20output','hidden':!![]},{'name':'clear','meowKey':'clear','type':'boolean','description':'Clear\x20output','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a59_0xbce616(0x14c),'app',a59_0xbce616(0x140),a59_0xbce616(0x148),'jq',a59_0xbce616(0x14b),a59_0xbce616(0x143),a59_0xbce616(0x14e),'ci']);function a59_0x1815(_0x52c681,_0x3ae7d3){_0x52c681=_0x52c681-0x125;const _0x1103b3=a59_0x1103();let _0x18158f=_0x1103b3[_0x52c681];return _0x18158f;}export function buildMeowFlags(){const _0x344689=a59_0xbce616;return Object[_0x344689(0x147)](GLOBAL_FLAGS[_0x344689(0x132)](_0x2c0d4f=>[_0x2c0d4f['meowKey'],{'type':_0x2c0d4f[_0x344689(0x150)]}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x3c5836=a60_0x1ad6;(function(_0x35b789,_0x3ec876){const _0x17cdc0=a60_0x1ad6,_0x12f3db=_0x35b789();while(!![]){try{const _0x1ca368=parseInt(_0x17cdc0(0x170))/0x1+parseInt(_0x17cdc0(0x167))/0x2*(parseInt(_0x17cdc0(0x162))/0x3)+-parseInt(_0x17cdc0(0x16e))/0x4+-parseInt(_0x17cdc0(0x16a))/0x5*(parseInt(_0x17cdc0(0x16c))/0x6)+parseInt(_0x17cdc0(0x163))/0x7*(parseInt(_0x17cdc0(0x161))/0x8)+-parseInt(_0x17cdc0(0x169))/0x9+-parseInt(_0x17cdc0(0x164))/0xa*(-parseInt(_0x17cdc0(0x16b))/0xb);if(_0x1ca368===_0x3ec876)break;else _0x12f3db['push'](_0x12f3db['shift']());}catch(_0x19654d){_0x12f3db['push'](_0x12f3db['shift']());}}}(a60_0x1185,0x3c456));function a60_0x1185(){const _0x1718e4=['production','3796524hGZQvL','95qYRJZp','5625554JFIsFj','66510fmBsgk','compress','1422336abfOAr','write','156951ZSKrby','21176kqsqCM','426249dWAyBn','371cVutgt','10aXLzsa','en-US','main','6ojeram'];a60_0x1185=function(){return _0x1718e4;};return a60_0x1185();}export const DEFAULT_APP_PROFILE_NAME=a60_0x3c5836(0x166);function a60_0x1ad6(_0x355eb3,_0x3aaae4){_0x355eb3=_0x355eb3-0x161;const _0x1185b9=a60_0x1185();let _0x1ad640=_0x1185b9[_0x355eb3];return _0x1ad640;}export const DEFAULT_CONFIG_VALUES={'env':a60_0x3c5836(0x168),'format':a60_0x3c5836(0x16d),'locale':a60_0x3c5836(0x165),'riskLevel':a60_0x3c5836(0x16f)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a60_0x3c5836(0x16d);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1d3d3d,_0xd82cfe){const _0x2d0aca=a61_0x2261,_0x125038=_0x1d3d3d();while(!![]){try{const _0x58526c=-parseInt(_0x2d0aca(0x1b2))/0x1+parseInt(_0x2d0aca(0x1ab))/0x2*(-parseInt(_0x2d0aca(0x1ae))/0x3)+parseInt(_0x2d0aca(0x1ad))/0x4*(parseInt(_0x2d0aca(0x1b0))/0x5)+-parseInt(_0x2d0aca(0x1aa))/0x6+-parseInt(_0x2d0aca(0x1af))/0x7*(parseInt(_0x2d0aca(0x1ac))/0x8)+-parseInt(_0x2d0aca(0x1b1))/0x9+parseInt(_0x2d0aca(0x1a9))/0xa;if(_0x58526c===_0xd82cfe)break;else _0x125038['push'](_0x125038['shift']());}catch(_0x56d8c6){_0x125038['push'](_0x125038['shift']());}}}(a61_0xbf62,0x69364));import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG['npmPackageName'];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];function a61_0x2261(_0x21048d,_0x90cb6a){_0x21048d=_0x21048d-0x1a9;const _0xbf62b8=a61_0xbf62();let _0x22615b=_0xbf62b8[_0x21048d];return _0x22615b;}function a61_0xbf62(){const _0x9673da=['4781490uamADC','784370EVHdHJ','2095288zhWZTy','8sVoYOH','3yrHOvr','7oSTjsc','961280tSPDdD','7162353VbzxBW','545524odkTuo','28387880CTRTfC'];a61_0xbf62=function(){return _0x9673da;};return a61_0xbf62();}
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a62_0x5900(_0x453685,_0x295a5b){_0x453685=_0x453685-0x7e;const _0x2586c1=a62_0x2586();let _0x590048=_0x2586c1[_0x453685];return _0x590048;}const a62_0x131868=a62_0x5900;(function(_0x33bd60,_0x5995ef){const _0x50434e=a62_0x5900,_0x3eba7f=_0x33bd60();while(!![]){try{const _0x3a8ad3=parseInt(_0x50434e(0x89))/0x1+parseInt(_0x50434e(0x85))/0x2+-parseInt(_0x50434e(0x8a))/0x3*(-parseInt(_0x50434e(0x8d))/0x4)+-parseInt(_0x50434e(0x80))/0x5*(-parseInt(_0x50434e(0x7f))/0x6)+parseInt(_0x50434e(0x8c))/0x7*(parseInt(_0x50434e(0x81))/0x8)+-parseInt(_0x50434e(0x91))/0x9*(parseInt(_0x50434e(0x88))/0xa)+parseInt(_0x50434e(0x87))/0xb*(-parseInt(_0x50434e(0x82))/0xc);if(_0x3a8ad3===_0x5995ef)break;else _0x3eba7f['push'](_0x3eba7f['shift']());}catch(_0x4ebea6){_0x3eba7f['push'](_0x3eba7f['shift']());}}}(a62_0x2586,0x8d406));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;function a62_0x2586(){const _0x503147=['runtime','9635607yaLtaK','userDomain','6QYMHea','3723280toAQCx','184eHuYUa','24WWZcuM','nonProduction','production','1503084egZmGR','apiDomain','11689634rBKCtB','10OJDLSq','901637hBvEJA','1689891mtwMba','skillhub','76132nwCgGm','8UPuLes','domains','api'];a62_0x2586=function(){return _0x503147;};return a62_0x2586();}export function initDomains(_0x26b657){const _0x36a8c7=a62_0x5900;customApiDomain=_0x26b657?.[_0x36a8c7(0x86)],customUserDomain=_0x26b657?.[_0x36a8c7(0x7e)],customRuntimeDomain=_0x26b657?.['runtimeDomain'],customSkillHubDomain=_0x26b657?.['skillHubDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a62_0x131868(0x8e)][a62_0x131868(0x84)]['user']:PRODUCT_CONFIG[a62_0x131868(0x8e)][a62_0x131868(0x83)]['user']);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a62_0x131868(0x8e)][a62_0x131868(0x84)][a62_0x131868(0x8f)]:PRODUCT_CONFIG[a62_0x131868(0x8e)]['nonProduction'][a62_0x131868(0x8f)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a62_0x131868(0x84)][a62_0x131868(0x90)]:PRODUCT_CONFIG['domains'][a62_0x131868(0x83)]['runtime']);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a62_0x131868(0x8e)][a62_0x131868(0x84)][a62_0x131868(0x8b)]:PRODUCT_CONFIG['domains'][a62_0x131868(0x83)]['skillhub']);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x470ef4=a63_0x287a;(function(_0xbcda3c,_0x261fa2){const _0x5aa24a=a63_0x287a,_0x24d994=_0xbcda3c();while(!![]){try{const _0x11ac05=-parseInt(_0x5aa24a(0x16d))/0x1+parseInt(_0x5aa24a(0x178))/0x2*(-parseInt(_0x5aa24a(0x174))/0x3)+parseInt(_0x5aa24a(0x16f))/0x4*(-parseInt(_0x5aa24a(0x173))/0x5)+-parseInt(_0x5aa24a(0x177))/0x6*(parseInt(_0x5aa24a(0x179))/0x7)+parseInt(_0x5aa24a(0x176))/0x8*(parseInt(_0x5aa24a(0x17d))/0x9)+-parseInt(_0x5aa24a(0x17b))/0xa+parseInt(_0x5aa24a(0x16e))/0xb*(parseInt(_0x5aa24a(0x16c))/0xc);if(_0x11ac05===_0x261fa2)break;else _0x24d994['push'](_0x24d994['shift']());}catch(_0x2e2462){_0x24d994['push'](_0x24d994['shift']());}}}(a63_0x4c44,0xe8c4e));import{productEnv}from'../constant/product.js';function a63_0x4c44(){const _0x105772=['18938450PEEKzY','dev','13020291ElyhGL','24aJXBqn','1096178BTuHlW','25577057QdtHLG','4494676FrFeYp','daily','development','ENV','5rpuZjj','1411761jzQxyy','production','8cQoxbS','839058VSnnvU','2AqOWgK','28xwQOmF','online'];a63_0x4c44=function(){return _0x105772;};return a63_0x4c44();}export const RUNTIME_ENV_VALUES=[a63_0x470ef4(0x175),'development',a63_0x470ef4(0x170)];export function normalizeEnv(_0x2cd085){const _0x442275=a63_0x470ef4;return _0x2cd085===_0x442275(0x17a)?_0x442275(0x175):_0x2cd085;}export function isProduction(_0x33bdc0){const _0x570bbd=a63_0x470ef4;return normalizeEnv(_0x33bdc0)===_0x570bbd(0x175);}export function isDaily(_0x407c55){const _0x4e1bbc=a63_0x470ef4;return normalizeEnv(_0x407c55)===_0x4e1bbc(0x170);}export function isDev(_0x1f1083){const _0x113e47=a63_0x470ef4,_0xa31808=normalizeEnv(_0x1f1083);return _0xa31808===_0x113e47(0x171)||_0xa31808===_0x113e47(0x17c);}function a63_0x287a(_0x3e66e8,_0x2c28f2){_0x3e66e8=_0x3e66e8-0x16c;const _0x4c44e5=a63_0x4c44();let _0x287a22=_0x4c44e5[_0x3e66e8];return _0x287a22;}let env=normalizeEnv(productEnv(a63_0x470ef4(0x172))||a63_0x470ef4(0x175));export function getEnv(){return env;}export function initEnv(_0x5adaf9){env=normalizeEnv(_0x5adaf9);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a64_0x4467fa=a64_0x5565;(function(_0x1c1511,_0x601fc0){const _0x1fef0d=a64_0x5565,_0xce2d69=_0x1c1511();while(!![]){try{const _0x1a9a8e=parseInt(_0x1fef0d(0x170))/0x1+-parseInt(_0x1fef0d(0x16b))/0x2*(-parseInt(_0x1fef0d(0x167))/0x3)+parseInt(_0x1fef0d(0x168))/0x4+-parseInt(_0x1fef0d(0x16d))/0x5*(parseInt(_0x1fef0d(0x16e))/0x6)+parseInt(_0x1fef0d(0x165))/0x7+-parseInt(_0x1fef0d(0x16c))/0x8*(-parseInt(_0x1fef0d(0x164))/0x9)+-parseInt(_0x1fef0d(0x171))/0xa*(parseInt(_0x1fef0d(0x166))/0xb);if(_0x1a9a8e===_0x601fc0)break;else _0xce2d69['push'](_0xce2d69['shift']());}catch(_0x392ac0){_0xce2d69['push'](_0xce2d69['shift']());}}}(a64_0xdd71,0x267a9));export const OUTPUT_FORMAT_VALUES=[a64_0x4467fa(0x16a),a64_0x4467fa(0x16f),a64_0x4467fa(0x169)];function a64_0x5565(_0x20110e,_0x4e9ae0){_0x20110e=_0x20110e-0x164;const _0xdd71f5=a64_0xdd71();let _0x556554=_0xdd71f5[_0x20110e];return _0x556554;}function a64_0xdd71(){const _0x988a0c=['451bwauyF','700647IcwvoT','166776ZVtwBX','compress','json','2OtDdNv','465208SToCIV','5fAHFil','1599018hljPoT','pretty','177546sxPMbr','49540mgnUYB','18oXzVZQ','406945AxIIIv'];a64_0xdd71=function(){return _0x988a0c;};return a64_0xdd71();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a65_0x41c581=a65_0x350c;(function(_0x13af33,_0x4c4603){const _0x107d6c=a65_0x350c,_0x21b1d5=_0x13af33();while(!![]){try{const _0x1d32fa=parseInt(_0x107d6c(0x10a))/0x1*(-parseInt(_0x107d6c(0xf8))/0x2)+-parseInt(_0x107d6c(0xf6))/0x3+parseInt(_0x107d6c(0xfb))/0x4+-parseInt(_0x107d6c(0xf5))/0x5*(parseInt(_0x107d6c(0xff))/0x6)+parseInt(_0x107d6c(0xf4))/0x7+-parseInt(_0x107d6c(0x109))/0x8*(-parseInt(_0x107d6c(0xed))/0x9)+parseInt(_0x107d6c(0x108))/0xa*(-parseInt(_0x107d6c(0xf3))/0xb);if(_0x1d32fa===_0x4c4603)break;else _0x21b1d5['push'](_0x21b1d5['shift']());}catch(_0x29a68f){_0x21b1d5['push'](_0x21b1d5['shift']());}}}(a65_0x2d69,0xb82fd));function a65_0x350c(_0x14dc57,_0x48628d){_0x14dc57=_0x14dc57-0xeb;const _0x2d6958=a65_0x2d69();let _0x350c47=_0x2d6958[_0x14dc57];return _0x350c47;}export const PRODUCT_CONFIG={'cliBinName':a65_0x41c581(0xfa),'cliDisplayName':a65_0x41c581(0xf1),'npmPackageName':a65_0x41c581(0x106),'skillSource':a65_0x41c581(0x100),'npmRegistryBaseUrl':a65_0x41c581(0x101),'envPrefix':a65_0x41c581(0xfc),'legacyEnvPrefixes':[a65_0x41c581(0xec)],'configFileNames':[a65_0x41c581(0x103),a65_0x41c581(0xf9)],'newConfigFileName':a65_0x41c581(0x103),'homeDirName':'.lovrabet','logFileName':a65_0x41c581(0xef),'invokeSource':a65_0x41c581(0xf0),'userCenterDisplayName':a65_0x41c581(0xf7),'skipNpxSkillsEnvSuffix':'SKIP_NPX_SKILLS','domains':{'production':{'user':'https://user.lovrabet.com','api':a65_0x41c581(0xee),'runtime':'https://runtime.lovrabet.com','skillhub':a65_0x41c581(0x102)},'nonProduction':{'user':a65_0x41c581(0xf2),'api':a65_0x41c581(0xfe),'runtime':a65_0x41c581(0x107),'skillhub':a65_0x41c581(0xfd)}},'accessKeyCreatePath':a65_0x41c581(0xeb)};export function productEnvName(_0x3e013c){const _0x184683=a65_0x41c581;return PRODUCT_CONFIG[_0x184683(0x104)]+'_'+_0x3e013c;}function a65_0x2d69(){const _0x5c8aa3=['@lovrabet/lovrabet-cli','https://daily-runtime.lovrabet.com','2365210fewWWH','88NbdcpS','1AnPeCj','/user/ak','RABETBASE','1233342xKJAHm','https://api.lovrabet.com','.lovrabet-runtime.log','cli:lovrabet-runtime','Lovrabet\x20Runtime\x20CLI','https://user-daily.lovrabet.com','11usyrFf','4794209yqCQCU','138495lcYWJM','4134738vUDnBp','Lovrabet\x20User\x20Center','366322QBIMXk','.lovrabetrc','lovrabet','2880556QDSSqt','LOVRABET','https://skills-daily.lovrabet.com','https://daily-api.lovrabet.com','78BMeyGk','lovrabet/lovrabet-cli','https://registry.npmjs.org','https://skills.lovrabet.com','.lovrabet.json','envPrefix','map'];a65_0x2d69=function(){return _0x5c8aa3;};return a65_0x2d69();}export function productEnvNames(_0x56507e){const _0x28ab22=a65_0x41c581;return[productEnvName(_0x56507e),...PRODUCT_CONFIG['legacyEnvPrefixes'][_0x28ab22(0x105)](_0x51d542=>_0x51d542+'_'+_0x56507e)];}export function productEnv(_0x5f0f12){for(const _0x2e2001 of productEnvNames(_0x5f0f12)){const _0x395c8a=process.env[_0x2e2001];if(_0x395c8a!==undefined)return _0x395c8a;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a66_0x45c620=a66_0x5e4c;function a66_0x5e4c(_0x558b64,_0x1d1242){_0x558b64=_0x558b64-0xc7;const _0x5bec18=a66_0x5bec();let _0x5e4c06=_0x5bec18[_0x558b64];return _0x5e4c06;}(function(_0x1a99f2,_0x3eafe2){const _0x76c573=a66_0x5e4c,_0x5d88c9=_0x1a99f2();while(!![]){try{const _0x35fa91=-parseInt(_0x76c573(0xce))/0x1*(parseInt(_0x76c573(0xd4))/0x2)+-parseInt(_0x76c573(0xd0))/0x3*(parseInt(_0x76c573(0xc8))/0x4)+-parseInt(_0x76c573(0xcc))/0x5*(-parseInt(_0x76c573(0xca))/0x6)+-parseInt(_0x76c573(0xd2))/0x7+parseInt(_0x76c573(0xc9))/0x8*(parseInt(_0x76c573(0xc7))/0x9)+parseInt(_0x76c573(0xd3))/0xa+-parseInt(_0x76c573(0xd1))/0xb*(parseInt(_0x76c573(0xcb))/0xc);if(_0x35fa91===_0x3eafe2)break;else _0x5d88c9['push'](_0x5d88c9['shift']());}catch(_0xcd93e5){_0x5d88c9['push'](_0x5d88c9['shift']());}}}(a66_0x5bec,0xe0b8e));function a66_0x5bec(){const _0x2691a4=['9031192xXkrWc','42WFZkUA','3724428wGNsbA','568975icezDG','write','2OCfPhM','read','249WGQNzk','22vBhQQA','4197501tbMBvP','12309280hVEbIq','866066TCpJrc','9pczjeh','7204nQAPQD'];a66_0x5bec=function(){return _0x2691a4;};return a66_0x5bec();}export const RISK_LEVEL_VALUES=[a66_0x45c620(0xcf),a66_0x45c620(0xcd),'high-risk-write'];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a67_0x5893(_0x46f402,_0x408b64){_0x46f402=_0x46f402-0xef;const _0x75f5d7=a67_0x75f5();let _0x589372=_0x75f5d7[_0x46f402];return _0x589372;}function a67_0x75f5(){const _0x504b96=['2093046GQtayk','14191128OwCuKy','12DfdYel','21eSLagD','domains','user','3114680hzESqG','6tdDMSe','89699bmKTYn','1421169tjRZBI','8489035fzNijI','79800570HTIwai','accessKeyCreatePath','production'];a67_0x75f5=function(){return _0x504b96;};return a67_0x75f5();}const a67_0x22c70b=a67_0x5893;(function(_0x5a3c2f,_0x40d5b6){const _0x50a0a2=a67_0x5893,_0x1b869d=_0x5a3c2f();while(!![]){try{const _0x4397fa=-parseInt(_0x50a0a2(0xf5))/0x1+-parseInt(_0x50a0a2(0xfb))/0x2+-parseInt(_0x50a0a2(0xf6))/0x3*(parseInt(_0x50a0a2(0xef))/0x4)+parseInt(_0x50a0a2(0xf7))/0x5*(-parseInt(_0x50a0a2(0xf4))/0x6)+parseInt(_0x50a0a2(0xf0))/0x7*(-parseInt(_0x50a0a2(0xf3))/0x8)+-parseInt(_0x50a0a2(0xfc))/0x9+parseInt(_0x50a0a2(0xf8))/0xa;if(_0x4397fa===_0x40d5b6)break;else _0x1b869d['push'](_0x1b869d['shift']());}catch(_0x1862cd){_0x1b869d['push'](_0x1b869d['shift']());}}}(a67_0x75f5,0xef45e));import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a67_0x22c70b(0xf1)][a67_0x22c70b(0xfa)][a67_0x22c70b(0xf2)]+PRODUCT_CONFIG[a67_0x22c70b(0xf9)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a65_0x163918=a65_0x2f55;(function(_0x4a4e98,_0x25d228){const _0x14bd96=a65_0x2f55,_0x7abc3=_0x4a4e98();while(!![]){try{const _0x57729d=-parseInt(_0x14bd96(0x133))/0x1+parseInt(_0x14bd96(0x145))/0x2+parseInt(_0x14bd96(0x136))/0x3*(-parseInt(_0x14bd96(0x16d))/0x4)+-parseInt(_0x14bd96(0x166))/0x5*(-parseInt(_0x14bd96(0x14f))/0x6)+parseInt(_0x14bd96(0x142))/0x7+-parseInt(_0x14bd96(0x153))/0x8*(-parseInt(_0x14bd96(0x158))/0x9)+parseInt(_0x14bd96(0x162))/0xa*(parseInt(_0x14bd96(0x163))/0xb);if(_0x57729d===_0x25d228)break;else _0x7abc3['push'](_0x7abc3['shift']());}catch(_0x3fdf7e){_0x7abc3['push'](_0x7abc3['shift']());}}}(a65_0x2358,0x4bd25));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a65_0x163918(0x127)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG['newConfigFileName'];function resolveConfigPath(_0x95a402){for(const _0xab365 of CONFIG_NAMES){const _0x51c3c4=resolve(_0x95a402,_0xab365);if(existsSync(_0x51c3c4))return _0x51c3c4;}return undefined;}export function resolveWriteConfigPath(_0x256af8){const _0xf748d4=a65_0x163918,_0x3a0703=_0x256af8===_0xf748d4(0x12d)?process['cwd']():homedir(),_0x3ab331=resolveConfigPath(_0x3a0703);return _0x3ab331??resolve(_0x3a0703,NEW_CONFIG_NAME);}export function readConfigFile(_0x48ceee){const _0x1f0a9e=a65_0x163918;try{if(existsSync(_0x48ceee)){const _0x2a450e=readFileSync(_0x48ceee,{'encoding':_0x1f0a9e(0x155)});if(_0x2a450e){const _0xeecb58=JSON[_0x1f0a9e(0x134)](_0x2a450e);return migrateOnlineEnv(_0x48ceee,_0xeecb58),_0xeecb58;}}}catch{}return{};}function migrateOnlineEnv(_0x2300d2,_0x11d823){const _0x7a809e=a65_0x163918;let _0x591224=![];_0x11d823[_0x7a809e(0x154)]==='online'&&(_0x11d823['env']=_0x7a809e(0x16a),_0x591224=!![]);if(_0x11d823[_0x7a809e(0x16b)]&&typeof _0x11d823[_0x7a809e(0x16b)]===_0x7a809e(0x139))for(const _0x240445 of Object[_0x7a809e(0x161)](_0x11d823[_0x7a809e(0x16b)])){_0x240445&&_0x240445[_0x7a809e(0x154)]===_0x7a809e(0x141)&&(_0x240445[_0x7a809e(0x154)]=_0x7a809e(0x16a),_0x591224=!![]);}if(_0x591224)try{writeConfigFile(_0x2300d2,_0x11d823);}catch{}}function a65_0x2358(){const _0x46c535=['production','apps','true','364BzqagV','accessKey','empty','configFileNames','PAGE_SIZE','code','EPERM','projectConfig','stdout','project','stdin','apiDomain','isTTY','explicit','setRawMode','545647vikPbc','parse','missing','19527SyTyuc','trim','maxRisk','object','cache','error','riskLevel','nonInteractive','high-risk-write','raw','EACCES','online','240569VOlmyH','runtimeDomain','locale','693312ugcGio','globalConfig','development','setLogPath','top-level','isRaw','EXDEV','app','cwd','pageSize','18tyFKnK','inherit','defaultApp','authRequired','3864592xMIpsX','env','utf8','argv','global','9OXXALg','.tmp','host','./constant/env.js','format','skillHubDomain','appcode','string','daily','values','10zEpIlD','5272091UMdBfU','local-alias','./constant/domain.js','175255jyRpkt','write','setRawCommand','some'];a65_0x2358=function(){return _0x46c535;};return a65_0x2358();}export function writeConfigFile(_0x159f1f,_0x38c401){const _0x2bbad0=a65_0x163918,_0x22c9cf=dirname(_0x159f1f);!existsSync(_0x22c9cf)&&mkdirSync(_0x22c9cf,{'recursive':!![]});const _0x8e44b9=_0x159f1f+_0x2bbad0(0x159);try{writeFileSync(_0x8e44b9,JSON['stringify'](_0x38c401,null,0x2)+'\x0a',{'encoding':_0x2bbad0(0x155),'mode':0x180});try{renameSync(_0x8e44b9,_0x159f1f);}catch(_0x483be6){if(_0x483be6[_0x2bbad0(0x129)]===_0x2bbad0(0x12a)||_0x483be6[_0x2bbad0(0x129)]===_0x2bbad0(0x14b)||_0x483be6[_0x2bbad0(0x129)]===_0x2bbad0(0x140)){writeFileSync(_0x159f1f,JSON['stringify'](_0x38c401,null,0x2)+'\x0a',{'encoding':_0x2bbad0(0x155)});try{unlinkSync(_0x8e44b9);}catch{}}else throw _0x483be6;}}catch(_0x9e4e4f){try{unlinkSync(_0x8e44b9);}catch{}throw _0x9e4e4f;}}export function isNonInteractiveMode(_0x9d7be5){const _0xad5542=a65_0x163918;return!!(_0x9d7be5[_0xad5542(0x13d)]||_0x9d7be5['ci']||productEnvNames('CI')[_0xad5542(0x169)](_0x27c666=>process.env[_0x27c666]===_0xad5542(0x16c))||process.env.CI==='true'||!process[_0xad5542(0x12c)][_0xad5542(0x130)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x407076=a65_0x163918;if(!process[_0x407076(0x12e)][_0x407076(0x130)])return![];try{const _0x4f49cb=process[_0x407076(0x12e)][_0x407076(0x14a)];return process[_0x407076(0x12e)][_0x407076(0x132)](!![]),process[_0x407076(0x12e)][_0x407076(0x132)](_0x4f49cb??![]),!![];}catch{return![];}}export async function createContext(_0x557716){const _0xddbd51=a65_0x163918,_0x5bb2f5=readRawConfig(),_0x578537=buildConfig(_0x5bb2f5,_0x557716);await initGlobalEnvironment(_0x578537);const {getUserDomain:_0x54e415,getApiDomain:_0x515f2c}=await import(_0xddbd51(0x165)),_0x30d413={'apiDomain':_0x515f2c(),'userDomain':_0x54e415()},_0x337f62=await buildAuth(_0x578537);logger[_0xddbd51(0x148)](process['cwd']());const _0xd06c1c=(CLI_BIN_NAME+'\x20'+process[_0xddbd51(0x156)]['slice'](0x2)['join']('\x20'))['trim']();logger[_0xddbd51(0x168)](_0xd06c1c);const _0x8c5ee8=isNonInteractiveMode(_0x557716);return{'config':_0x578537,'auth':_0x337f62,'logger':logger,'env':_0x30d413,'nonInteractive':_0x8c5ee8};}export function buildConfigFromFlags(_0x3cd470){return buildConfig(readRawConfig(),_0x3cd470);}export function getLocalAppAliases(_0x222416){const _0x45cce4=a65_0x163918;return _0x222416[_0x45cce4(0x16b)]&&typeof _0x222416[_0x45cce4(0x16b)]===_0x45cce4(0x139)?_0x222416[_0x45cce4(0x16b)]:{};}function a65_0x2f55(_0x3bbdb1,_0x55596f){_0x3bbdb1=_0x3bbdb1-0x127;const _0x2358c0=a65_0x2358();let _0x2f55e3=_0x2358c0[_0x3bbdb1];return _0x2f55e3;}export function resolveLocalAppAliasCode(_0x3b5435,_0x4488a1){const _0x80debb=a65_0x163918;if(!_0x4488a1)return undefined;const _0x34f759=getLocalAppAliases(_0x3b5435)[_0x4488a1],_0x2bcc66=_0x34f759?.[_0x80debb(0x15e)];return typeof _0x2bcc66===_0x80debb(0x15f)&&_0x2bcc66[_0x80debb(0x137)]()?_0x2bcc66['trim']():undefined;}export function readAppCodeFromConfig(){const _0x32ac68=a65_0x163918,_0x38f687=readRawConfig(),_0x5099f4=_0x38f687['appcode']??_0x38f687[_0x32ac68(0x14c)];if(typeof _0x5099f4==='string'&&_0x5099f4['trim']())return _0x5099f4[_0x32ac68(0x137)]();const _0x22c0c3=resolveLocalAppAliasCode(_0x38f687,typeof _0x38f687['defaultApp']===_0x32ac68(0x15f)?_0x38f687[_0x32ac68(0x151)]:undefined);if(_0x22c0c3)return _0x22c0c3;const _0x48f5b3=normalizeEnv(String(_0x38f687[_0x32ac68(0x154)]||_0x32ac68(0x16a))),_0x530c7d=isDaily(_0x48f5b3)?_0x32ac68(0x160):isDev(_0x48f5b3)?'development':_0x32ac68(0x16a),_0x4911e8=resolveCachedAppCode(typeof _0x38f687[_0x32ac68(0x151)]==='string'?_0x38f687[_0x32ac68(0x151)]:undefined,_0x530c7d,typeof _0x38f687[_0x32ac68(0x16e)]==='string'?_0x38f687[_0x32ac68(0x16e)]:undefined);if(_0x4911e8)return _0x4911e8;const _0x341a86=Object[_0x32ac68(0x161)](getLocalAppAliases(_0x38f687))['find'](_0x1247d5=>_0x1247d5?.[_0x32ac68(0x15e)]);return typeof _0x341a86?.[_0x32ac68(0x15e)]===_0x32ac68(0x15f)&&_0x341a86['appcode'][_0x32ac68(0x137)]()?_0x341a86['appcode'][_0x32ac68(0x137)]():undefined;}export function readScopedConfig(_0x6085fe){const _0x48316e=a65_0x163918,_0x55acf8=_0x6085fe['global']?_0x48316e(0x157):_0x48316e(0x12d);return readConfigFile(resolveWriteConfigPath(_0x55acf8));}export function writeScopedConfig(_0x1e8b58,_0x5c5ae9){const _0x5d40ed=a65_0x163918,_0x55ab67=_0x5c5ae9[_0x5d40ed(0x157)]?_0x5d40ed(0x157):'project';writeConfigFile(resolveWriteConfigPath(_0x55ab67),_0x1e8b58);}export async function initGlobalEnvironment(_0x1b40c3){const _0x430f92=a65_0x163918,{initEnv:_0x562a7a}=await import(_0x430f92(0x15b));_0x562a7a(_0x1b40c3['env']);const {initDomains:_0xbb66a}=await import('./constant/domain.js');_0xbb66a({'apiDomain':_0x1b40c3[_0x430f92(0x13f)][_0x430f92(0x12f)]||_0x1b40c3[_0x430f92(0x13f)][_0x430f92(0x15a)]||undefined,'userDomain':_0x1b40c3[_0x430f92(0x13f)]['userDomain']||undefined,'runtimeDomain':_0x1b40c3[_0x430f92(0x13f)][_0x430f92(0x143)]||undefined,'skillHubDomain':_0x1b40c3[_0x430f92(0x13f)][_0x430f92(0x15d)]||undefined});}export function getProjectConfigPath(){const _0x49ae55=a65_0x163918;return resolveConfigPath(process[_0x49ae55(0x14d)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x304499){const _0x5dc14b=a65_0x163918;if(!existsSync(_0x304499))return{'status':_0x5dc14b(0x135)};try{const _0x1a9357=readFileSync(_0x304499,{'encoding':_0x5dc14b(0x155)});if(!_0x1a9357?.['trim']())return{'status':_0x5dc14b(0x16f)};const _0x57318d=JSON[_0x5dc14b(0x134)](_0x1a9357);return{'status':'ok','data':_0x57318d};}catch(_0x547f48){return{'status':_0x5dc14b(0x13b),'message':_0x547f48 instanceof Error?_0x547f48['message']:String(_0x547f48)};}}export function loadRawConfigLayers(_0x2da1c2){const _0x5a6a88=a65_0x163918;let _0x5751b0={},_0x39ce2d={},_0x31b4ec,_0x2daebe;try{_0x31b4ec=resolveConfigPath(homedir());if(_0x31b4ec){const _0x1f802c=readFileSync(_0x31b4ec,{'encoding':_0x5a6a88(0x155)});if(_0x1f802c)_0x5751b0=JSON['parse'](_0x1f802c);}}catch{}try{const _0x333daa=_0x2da1c2||process[_0x5a6a88(0x14d)]();_0x2daebe=resolveConfigPath(_0x333daa);if(_0x2daebe){const _0x3fca01=readFileSync(_0x2daebe,{'encoding':'utf8'});if(_0x3fca01)_0x39ce2d=JSON[_0x5a6a88(0x134)](_0x3fca01);}}catch{}return{'globalPath':_0x31b4ec,'projectPath':_0x2daebe,'globalConfig':_0x5751b0,'projectConfig':_0x39ce2d};}function mergeRawConfigLayers(_0x40d3bc){const _0x4a89e2=a65_0x163918,{globalConfig:_0x5565d3,projectConfig:_0x275ec3}=_0x40d3bc;if(_0x275ec3[_0x4a89e2(0x150)]===![]){const _0x10e178={..._0x275ec3};return delete _0x10e178[_0x4a89e2(0x150)],_0x10e178;}const _0x55a6c6={..._0x5565d3,..._0x275ec3};if(_0x4a89e2(0x151)in _0x275ec3)_0x55a6c6[_0x4a89e2(0x151)]=_0x275ec3[_0x4a89e2(0x151)];else _0x5565d3['defaultApp']&&(_0x55a6c6[_0x4a89e2(0x151)]=_0x5565d3[_0x4a89e2(0x151)]);return _0x55a6c6;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x581856){return mergeRawConfigLayers(loadRawConfigLayers(_0x581856));}export function readRawConfigWithLayers(_0x247487){const _0x38668c=loadRawConfigLayers(_0x247487);return{'config':mergeRawConfigLayers(_0x38668c),'layers':_0x38668c};}export function resolveDefaultAppSource(_0x2fc7ce){const _0x593f88=a65_0x163918;if(_0x593f88(0x151)in _0x2fc7ce[_0x593f88(0x12b)])return'project';if(_0x2fc7ce['projectConfig']['inherit']===![])return null;if(_0x2fc7ce[_0x593f88(0x146)][_0x593f88(0x151)])return'global';return null;}function buildConfig(_0x4a0aee,_0x4d10fb){const _0x4b4fa3=a65_0x163918,_0x1f481f=_0x4a0aee[_0x4b4fa3(0x151)]||undefined,_0x5aa34f=_0x4d10fb[_0x4b4fa3(0x14c)]||env('APP')||undefined,_0x1b0cdd=_0x5aa34f||_0x1f481f||undefined,_0xd74abd=env('ACCESS_KEY')||_0x4a0aee['accessKey']||undefined,_0x3b1255=_0x4d10fb[_0x4b4fa3(0x154)]||env('ENV')||_0x4a0aee[_0x4b4fa3(0x154)]||DEFAULT_CONFIG_VALUES[_0x4b4fa3(0x154)],_0x473a92=normalizeEnv(String(_0x3b1255)),_0x3ddbd9=isDaily(_0x473a92)?_0x4b4fa3(0x160):isDev(_0x473a92)?_0x4b4fa3(0x147):_0x4b4fa3(0x16a),_0x11e93e=typeof _0x4d10fb[_0x4b4fa3(0x15e)]==='string'?_0x4d10fb['appcode']:undefined,_0x2ec32e=env('APPCODE'),_0x5b904e=_0x5aa34f?undefined:_0x4a0aee[_0x4b4fa3(0x15e)]||_0x4a0aee['app']||undefined,_0x2dbbeb=_0x5aa34f||(_0x5b904e?undefined:_0x1f481f),_0x301eee=resolveLocalAppAliasCode(_0x4a0aee,_0x2dbbeb),_0x3703d4=resolveCachedAppCode(_0x2dbbeb,_0x3ddbd9,_0xd74abd),_0x289184=_0x11e93e||_0x2ec32e||_0x5b904e||_0x301eee||_0x3703d4||undefined,_0x37d697=_0x11e93e?_0x4b4fa3(0x131):_0x2ec32e?'env':_0x5b904e?_0x4b4fa3(0x149):_0x301eee?_0x4b4fa3(0x164):_0x3703d4?_0x4b4fa3(0x13a):undefined,_0x54e5d7=_0x4a0aee[_0x4b4fa3(0x144)]||DEFAULT_CONFIG_VALUES[_0x4b4fa3(0x144)],_0x262c86=undefined,_0x340e48=_0x4d10fb['format']||env('FORMAT')||_0x4a0aee[_0x4b4fa3(0x15c)],_0xd3e7fa=normalizeLegacyOutputFormat(_0x340e48),_0x495352=env(_0x4b4fa3(0x128))||_0x4a0aee[_0x4b4fa3(0x14e)],_0x2dc2e2=_0x495352?Number(_0x495352)||undefined:undefined,_0x27083b=_0x4a0aee['riskLevel']||_0x4a0aee[_0x4b4fa3(0x138)],_0x8a031d=_0x27083b==='read'||_0x27083b===_0x4b4fa3(0x167)||_0x27083b===_0x4b4fa3(0x13e)?_0x27083b:DEFAULT_CONFIG_VALUES[_0x4b4fa3(0x13c)],_0x246300=env('VERBOSE'),_0x36718b=_0x246300==='1'||_0x246300===_0x4b4fa3(0x16c);return{'appCode':typeof _0x289184==='string'&&_0x289184[_0x4b4fa3(0x137)]()?_0x289184[_0x4b4fa3(0x137)]():undefined,'appCodeSource':_0x37d697,'env':_0x3ddbd9,'locale':_0x54e5d7,'cookie':_0x262c86,'accessKey':_0xd74abd,'format':_0xd3e7fa,'pageSize':_0x2dc2e2,'riskLevel':_0x8a031d,'verbose':_0x36718b,'defaultApp':_0x1f481f,'currentApp':typeof _0x1b0cdd==='string'?_0x1b0cdd:undefined,'raw':_0x4a0aee};}function env(_0x4d7873){return productEnv(_0x4d7873);}async function buildAuth(_0x1ce049){const _0x1f1dfd=a65_0x163918,_0x5a5741='',_0x37361a=!!_0x1ce049[_0x1f1dfd(0x16e)];return{'cookie':_0x5a5741,'isLoggedIn':_0x37361a,async 'getOrLogin'(){const _0x4c2e71=_0x1f1dfd;if(_0x37361a)return _0x5a5741;throw CliErrors[_0x4c2e71(0x152)]();}};}
|
|
1
|
+
const a68_0x4994ff=a68_0xd677;(function(_0x765204,_0x944dee){const _0x4f2273=a68_0xd677,_0x3824ed=_0x765204();while(!![]){try{const _0x2c45f1=-parseInt(_0x4f2273(0x1df))/0x1*(parseInt(_0x4f2273(0x197))/0x2)+parseInt(_0x4f2273(0x1ad))/0x3*(parseInt(_0x4f2273(0x196))/0x4)+-parseInt(_0x4f2273(0x1d3))/0x5*(parseInt(_0x4f2273(0x1c5))/0x6)+parseInt(_0x4f2273(0x1c1))/0x7*(parseInt(_0x4f2273(0x1e1))/0x8)+parseInt(_0x4f2273(0x1a6))/0x9+-parseInt(_0x4f2273(0x19c))/0xa+parseInt(_0x4f2273(0x1c3))/0xb*(parseInt(_0x4f2273(0x1a1))/0xc);if(_0x2c45f1===_0x944dee)break;else _0x3824ed['push'](_0x3824ed['shift']());}catch(_0x2022dd){_0x3824ed['push'](_0x3824ed['shift']());}}}(a68_0x7a35,0xa36b8));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a68_0x7a35(){const _0x5ca82d=['app','daily','object','skillHubDomain','accessKey','./constant/domain.js','463902KsuCRY','authRequired','string','EPERM','raw','riskLevel','explicit','configFileNames','defaultApp','online','find','message','trim','.tmp','true','join','local-alias','production','error','./constant/env.js','903742GhHPwK','userDomain','11BMjbun','missing','6mVipAs','host','values','top-level','format','locale','APPCODE','slice','argv','stringify','PAGE_SIZE','development','EXDEV','env','1694505vyXSCU','nonInteractive','inherit','empty','runtimeDomain','newConfigFileName','projectConfig','EACCES','maxRisk','code','parse','isTTY','6jfuTLV','pageSize','32DAFmCX','stdin','setRawMode','ACCESS_KEY','global','apps','appcode','8rbfiOQ','105804ezAkzl','project','utf8','APP','write','10678440uzleIT','globalConfig','apiDomain','setRawCommand','stdout','9089196UsiIQc','VERBOSE','cwd','read','cache','7293600KwrjEX'];a68_0x7a35=function(){return _0x5ca82d;};return a68_0x7a35();}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[a68_0x4994ff(0x1b4)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a68_0x4994ff(0x1d8)];function a68_0xd677(_0x50fbea,_0x5c73fa){_0x50fbea=_0x50fbea-0x193;const _0x7a359d=a68_0x7a35();let _0xd677d9=_0x7a359d[_0x50fbea];return _0xd677d9;}function resolveConfigPath(_0x34e3d6){for(const _0x59a31e of CONFIG_NAMES){const _0xd0d698=resolve(_0x34e3d6,_0x59a31e);if(existsSync(_0xd0d698))return _0xd0d698;}return undefined;}export function resolveWriteConfigPath(_0x5449b0){const _0x14d6f9=a68_0x4994ff,_0x588238=_0x5449b0===_0x14d6f9(0x198)?process[_0x14d6f9(0x1a3)]():homedir(),_0x44ee5d=resolveConfigPath(_0x588238);return _0x44ee5d??resolve(_0x588238,NEW_CONFIG_NAME);}export function readConfigFile(_0xc6b05a){const _0x4ca0df=a68_0x4994ff;try{if(existsSync(_0xc6b05a)){const _0x3ec5c4=readFileSync(_0xc6b05a,{'encoding':_0x4ca0df(0x199)});if(_0x3ec5c4){const _0x37e8a8=JSON[_0x4ca0df(0x1dd)](_0x3ec5c4);return migrateOnlineEnv(_0xc6b05a,_0x37e8a8),_0x37e8a8;}}}catch{}return{};}function migrateOnlineEnv(_0x418d5b,_0x503475){const _0x18d5b0=a68_0x4994ff;let _0x566c22=![];_0x503475[_0x18d5b0(0x1d2)]===_0x18d5b0(0x1b6)&&(_0x503475[_0x18d5b0(0x1d2)]=_0x18d5b0(0x1be),_0x566c22=!![]);if(_0x503475[_0x18d5b0(0x194)]&&typeof _0x503475[_0x18d5b0(0x194)]===_0x18d5b0(0x1a9))for(const _0xd8bd11 of Object[_0x18d5b0(0x1c7)](_0x503475[_0x18d5b0(0x194)])){_0xd8bd11&&_0xd8bd11[_0x18d5b0(0x1d2)]===_0x18d5b0(0x1b6)&&(_0xd8bd11[_0x18d5b0(0x1d2)]=_0x18d5b0(0x1be),_0x566c22=!![]);}if(_0x566c22)try{writeConfigFile(_0x418d5b,_0x503475);}catch{}}export function writeConfigFile(_0x314987,_0x69e2a3){const _0x2b6d94=a68_0x4994ff,_0x382f1a=dirname(_0x314987);!existsSync(_0x382f1a)&&mkdirSync(_0x382f1a,{'recursive':!![]});const _0xd35eb9=_0x314987+_0x2b6d94(0x1ba);try{writeFileSync(_0xd35eb9,JSON[_0x2b6d94(0x1ce)](_0x69e2a3,null,0x2)+'\x0a',{'encoding':_0x2b6d94(0x199),'mode':0x180});try{renameSync(_0xd35eb9,_0x314987);}catch(_0x3ad236){if(_0x3ad236[_0x2b6d94(0x1dc)]===_0x2b6d94(0x1b0)||_0x3ad236[_0x2b6d94(0x1dc)]===_0x2b6d94(0x1d1)||_0x3ad236[_0x2b6d94(0x1dc)]===_0x2b6d94(0x1da)){writeFileSync(_0x314987,JSON[_0x2b6d94(0x1ce)](_0x69e2a3,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0xd35eb9);}catch{}}else throw _0x3ad236;}}catch(_0x22f304){try{unlinkSync(_0xd35eb9);}catch{}throw _0x22f304;}}export function isNonInteractiveMode(_0x5eb666){const _0x45b2e1=a68_0x4994ff;return!!(_0x5eb666[_0x45b2e1(0x1d4)]||_0x5eb666['ci']||productEnvNames('CI')['some'](_0x22b2d2=>process.env[_0x22b2d2]===_0x45b2e1(0x1bb))||process.env.CI==='true'||!process[_0x45b2e1(0x1a0)][_0x45b2e1(0x1de)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x417d51=a68_0x4994ff;if(!process[_0x417d51(0x1e2)][_0x417d51(0x1de)])return![];try{const _0x13459d=process[_0x417d51(0x1e2)]['isRaw'];return process[_0x417d51(0x1e2)][_0x417d51(0x1e3)](!![]),process[_0x417d51(0x1e2)]['setRawMode'](_0x13459d??![]),!![];}catch{return![];}}export async function createContext(_0x29290b){const _0x3aa74b=a68_0x4994ff,_0x2c1896=readRawConfig(),_0x206315=buildConfig(_0x2c1896,_0x29290b);await initGlobalEnvironment(_0x206315);const {getUserDomain:_0x464e37,getApiDomain:_0x5ba37d}=await import('./constant/domain.js'),_0x1280f6={'apiDomain':_0x5ba37d(),'userDomain':_0x464e37()},_0x2f9016=await buildAuth(_0x206315);logger['setLogPath'](process[_0x3aa74b(0x1a3)]());const _0x3b83d4=(CLI_BIN_NAME+'\x20'+process[_0x3aa74b(0x1cd)][_0x3aa74b(0x1cc)](0x2)[_0x3aa74b(0x1bc)]('\x20'))[_0x3aa74b(0x1b9)]();logger[_0x3aa74b(0x19f)](_0x3b83d4);const _0x554b05=isNonInteractiveMode(_0x29290b);return{'config':_0x206315,'auth':_0x2f9016,'logger':logger,'env':_0x1280f6,'nonInteractive':_0x554b05};}export function buildConfigFromFlags(_0x989105){return buildConfig(readRawConfig(),_0x989105);}export function getLocalAppAliases(_0x479bc9){const _0x5e20f4=a68_0x4994ff;return _0x479bc9[_0x5e20f4(0x194)]&&typeof _0x479bc9['apps']==='object'?_0x479bc9[_0x5e20f4(0x194)]:{};}export function resolveLocalAppAliasCode(_0x3a3dc9,_0x25b897){const _0x4a11b4=a68_0x4994ff;if(!_0x25b897)return undefined;const _0x5f340e=getLocalAppAliases(_0x3a3dc9)[_0x25b897],_0x22cc6c=_0x5f340e?.['appcode'];return typeof _0x22cc6c==='string'&&_0x22cc6c[_0x4a11b4(0x1b9)]()?_0x22cc6c[_0x4a11b4(0x1b9)]():undefined;}export function readAppCodeFromConfig(){const _0x1d4ef4=a68_0x4994ff,_0x3f9f42=readRawConfig(),_0xd37e9d=_0x3f9f42[_0x1d4ef4(0x195)]??_0x3f9f42[_0x1d4ef4(0x1a7)];if(typeof _0xd37e9d===_0x1d4ef4(0x1af)&&_0xd37e9d['trim']())return _0xd37e9d[_0x1d4ef4(0x1b9)]();const _0x5ad931=resolveLocalAppAliasCode(_0x3f9f42,typeof _0x3f9f42[_0x1d4ef4(0x1b5)]===_0x1d4ef4(0x1af)?_0x3f9f42['defaultApp']:undefined);if(_0x5ad931)return _0x5ad931;const _0x1f93e4=normalizeEnv(String(_0x3f9f42['env']||_0x1d4ef4(0x1be))),_0x15fde8=isDaily(_0x1f93e4)?_0x1d4ef4(0x1a8):isDev(_0x1f93e4)?'development':'production',_0x27808b=resolveCachedAppCode(typeof _0x3f9f42['defaultApp']===_0x1d4ef4(0x1af)?_0x3f9f42['defaultApp']:undefined,_0x15fde8,typeof _0x3f9f42[_0x1d4ef4(0x1ab)]===_0x1d4ef4(0x1af)?_0x3f9f42[_0x1d4ef4(0x1ab)]:undefined);if(_0x27808b)return _0x27808b;const _0x2a77ee=Object['values'](getLocalAppAliases(_0x3f9f42))[_0x1d4ef4(0x1b7)](_0x2152fe=>_0x2152fe?.['appcode']);return typeof _0x2a77ee?.[_0x1d4ef4(0x195)]==='string'&&_0x2a77ee['appcode']['trim']()?_0x2a77ee['appcode']['trim']():undefined;}export function readScopedConfig(_0x2a10ab){const _0x577016=a68_0x4994ff,_0x492b86=_0x2a10ab[_0x577016(0x193)]?_0x577016(0x193):_0x577016(0x198);return readConfigFile(resolveWriteConfigPath(_0x492b86));}export function writeScopedConfig(_0x206d7a,_0x4adc79){const _0x2a6fcf=a68_0x4994ff,_0x12c468=_0x4adc79[_0x2a6fcf(0x193)]?'global':_0x2a6fcf(0x198);writeConfigFile(resolveWriteConfigPath(_0x12c468),_0x206d7a);}export async function initGlobalEnvironment(_0x3d393f){const _0x469b1e=a68_0x4994ff,{initEnv:_0x285ec0}=await import(_0x469b1e(0x1c0));_0x285ec0(_0x3d393f[_0x469b1e(0x1d2)]);const {initDomains:_0x510453}=await import(_0x469b1e(0x1ac));_0x510453({'apiDomain':_0x3d393f[_0x469b1e(0x1b1)][_0x469b1e(0x19e)]||_0x3d393f[_0x469b1e(0x1b1)][_0x469b1e(0x1c6)]||undefined,'userDomain':_0x3d393f[_0x469b1e(0x1b1)][_0x469b1e(0x1c2)]||undefined,'runtimeDomain':_0x3d393f['raw'][_0x469b1e(0x1d7)]||undefined,'skillHubDomain':_0x3d393f['raw'][_0x469b1e(0x1aa)]||undefined});}export function getProjectConfigPath(){const _0x1ae431=a68_0x4994ff;return resolveConfigPath(process[_0x1ae431(0x1a3)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x2f1657){const _0x57b6cd=a68_0x4994ff;if(!existsSync(_0x2f1657))return{'status':_0x57b6cd(0x1c4)};try{const _0x41949d=readFileSync(_0x2f1657,{'encoding':_0x57b6cd(0x199)});if(!_0x41949d?.[_0x57b6cd(0x1b9)]())return{'status':_0x57b6cd(0x1d6)};const _0x354a5b=JSON['parse'](_0x41949d);return{'status':'ok','data':_0x354a5b};}catch(_0x1fbff0){return{'status':_0x57b6cd(0x1bf),'message':_0x1fbff0 instanceof Error?_0x1fbff0[_0x57b6cd(0x1b8)]:String(_0x1fbff0)};}}export function loadRawConfigLayers(_0x3f7d6a){const _0x3849be=a68_0x4994ff;let _0x566559={},_0x17f135={},_0x475113,_0xaa0eb5;try{_0x475113=resolveConfigPath(homedir());if(_0x475113){const _0x456306=readFileSync(_0x475113,{'encoding':_0x3849be(0x199)});if(_0x456306)_0x566559=JSON['parse'](_0x456306);}}catch{}try{const _0x3f2163=_0x3f7d6a||process[_0x3849be(0x1a3)]();_0xaa0eb5=resolveConfigPath(_0x3f2163);if(_0xaa0eb5){const _0x411ead=readFileSync(_0xaa0eb5,{'encoding':'utf8'});if(_0x411ead)_0x17f135=JSON[_0x3849be(0x1dd)](_0x411ead);}}catch{}return{'globalPath':_0x475113,'projectPath':_0xaa0eb5,'globalConfig':_0x566559,'projectConfig':_0x17f135};}function mergeRawConfigLayers(_0x3bede1){const _0x34d6cd=a68_0x4994ff,{globalConfig:_0x21052,projectConfig:_0x5eeade}=_0x3bede1;if(_0x5eeade[_0x34d6cd(0x1d5)]===![]){const _0x7dfe9={..._0x5eeade};return delete _0x7dfe9[_0x34d6cd(0x1d5)],_0x7dfe9;}const _0x18c58a={..._0x21052,..._0x5eeade};if(_0x34d6cd(0x1b5)in _0x5eeade)_0x18c58a['defaultApp']=_0x5eeade[_0x34d6cd(0x1b5)];else _0x21052[_0x34d6cd(0x1b5)]&&(_0x18c58a[_0x34d6cd(0x1b5)]=_0x21052[_0x34d6cd(0x1b5)]);return _0x18c58a;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x1854f7){return mergeRawConfigLayers(loadRawConfigLayers(_0x1854f7));}export function readRawConfigWithLayers(_0x1fa455){const _0x332099=loadRawConfigLayers(_0x1fa455);return{'config':mergeRawConfigLayers(_0x332099),'layers':_0x332099};}export function resolveDefaultAppSource(_0x2286be){const _0x170ec3=a68_0x4994ff;if(_0x170ec3(0x1b5)in _0x2286be['projectConfig'])return'project';if(_0x2286be[_0x170ec3(0x1d9)][_0x170ec3(0x1d5)]===![])return null;if(_0x2286be[_0x170ec3(0x19d)][_0x170ec3(0x1b5)])return'global';return null;}function buildConfig(_0x5bc8cf,_0x4f9256){const _0x2f1c88=a68_0x4994ff,_0x17c4ee=_0x5bc8cf[_0x2f1c88(0x1b5)]||undefined,_0x32b34a=_0x4f9256['app']||env(_0x2f1c88(0x19a))||undefined,_0x3f36f8=_0x32b34a||_0x17c4ee||undefined,_0x453342=env(_0x2f1c88(0x1e4))||_0x5bc8cf[_0x2f1c88(0x1ab)]||undefined,_0x1acc32=_0x4f9256['env']||env('ENV')||_0x5bc8cf[_0x2f1c88(0x1d2)]||DEFAULT_CONFIG_VALUES[_0x2f1c88(0x1d2)],_0x105e0c=normalizeEnv(String(_0x1acc32)),_0x43d9a9=isDaily(_0x105e0c)?_0x2f1c88(0x1a8):isDev(_0x105e0c)?_0x2f1c88(0x1d0):_0x2f1c88(0x1be),_0xb37197=typeof _0x4f9256[_0x2f1c88(0x195)]===_0x2f1c88(0x1af)?_0x4f9256[_0x2f1c88(0x195)]:undefined,_0x335f2c=env(_0x2f1c88(0x1cb)),_0x32affa=_0x32b34a?undefined:_0x5bc8cf[_0x2f1c88(0x195)]||_0x5bc8cf['app']||undefined,_0x15c52a=_0x32b34a||(_0x32affa?undefined:_0x17c4ee),_0x46a643=resolveLocalAppAliasCode(_0x5bc8cf,_0x15c52a),_0x16fd8d=resolveCachedAppCode(_0x15c52a,_0x43d9a9,_0x453342),_0x11591d=_0xb37197||_0x335f2c||_0x32affa||_0x46a643||_0x16fd8d||undefined,_0x1f9745=_0xb37197?_0x2f1c88(0x1b3):_0x335f2c?_0x2f1c88(0x1d2):_0x32affa?_0x2f1c88(0x1c8):_0x46a643?_0x2f1c88(0x1bd):_0x16fd8d?_0x2f1c88(0x1a5):undefined,_0x249eb5=_0x5bc8cf[_0x2f1c88(0x1ca)]||DEFAULT_CONFIG_VALUES[_0x2f1c88(0x1ca)],_0x210ae0=undefined,_0x3e0907=_0x4f9256[_0x2f1c88(0x1c9)]||env('FORMAT')||_0x5bc8cf[_0x2f1c88(0x1c9)],_0x8d75bb=normalizeLegacyOutputFormat(_0x3e0907),_0x11e997=env(_0x2f1c88(0x1cf))||_0x5bc8cf[_0x2f1c88(0x1e0)],_0x394194=_0x11e997?Number(_0x11e997)||undefined:undefined,_0x276a6f=_0x5bc8cf[_0x2f1c88(0x1b2)]||_0x5bc8cf[_0x2f1c88(0x1db)],_0x427cd1=_0x276a6f===_0x2f1c88(0x1a4)||_0x276a6f===_0x2f1c88(0x19b)||_0x276a6f==='high-risk-write'?_0x276a6f:DEFAULT_CONFIG_VALUES[_0x2f1c88(0x1b2)],_0xb1e45=env(_0x2f1c88(0x1a2)),_0x2f4590=_0xb1e45==='1'||_0xb1e45===_0x2f1c88(0x1bb);return{'appCode':typeof _0x11591d===_0x2f1c88(0x1af)&&_0x11591d[_0x2f1c88(0x1b9)]()?_0x11591d[_0x2f1c88(0x1b9)]():undefined,'appCodeSource':_0x1f9745,'env':_0x43d9a9,'locale':_0x249eb5,'cookie':_0x210ae0,'accessKey':_0x453342,'format':_0x8d75bb,'pageSize':_0x394194,'riskLevel':_0x427cd1,'verbose':_0x2f4590,'defaultApp':_0x17c4ee,'currentApp':typeof _0x3f36f8===_0x2f1c88(0x1af)?_0x3f36f8:undefined,'raw':_0x5bc8cf};}function env(_0x7bbba4){return productEnv(_0x7bbba4);}async function buildAuth(_0x2c3c67){const _0x2b8e30='',_0x3215e3=!!_0x2c3c67['accessKey'];return{'cookie':_0x2b8e30,'isLoggedIn':_0x3215e3,async 'getOrLogin'(){const _0x546ec2=a68_0xd677;if(_0x3215e3)return _0x2b8e30;throw CliErrors[_0x546ec2(0x1ae)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x23cd43,_0x3a2198){const _0x679b6f=a66_0x525c,_0x4b9fc9=_0x23cd43();while(!![]){try{const _0x20a2d3=parseInt(_0x679b6f(0x18a))/0x1+-parseInt(_0x679b6f(0x17a))/0x2*(-parseInt(_0x679b6f(0x1b8))/0x3)+-parseInt(_0x679b6f(0x171))/0x4+parseInt(_0x679b6f(0x1bc))/0x5+parseInt(_0x679b6f(0x166))/0x6+-parseInt(_0x679b6f(0x154))/0x7*(parseInt(_0x679b6f(0x199))/0x8)+-parseInt(_0x679b6f(0x1b1))/0x9;if(_0x20a2d3===_0x3a2198)break;else _0x4b9fc9['push'](_0x4b9fc9['shift']());}catch(_0x1aa291){_0x4b9fc9['push'](_0x4b9fc9['shift']());}}}(a66_0x4489,0xd0e1d));import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x4e5035){_activeAK=_0x4e5035||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x777274,_0x50b024={}){const _0x5d0b65=a66_0x525c,{method:method=_0x5d0b65(0x1b3),body:_0x306046,headers:headers={},timeout:timeout=0x7530}=_0x50b024,_0x4c7fc1=_activeAK,_0x190d01=getRuntimeDomain();if(!_0x4c7fc1)throw CliErrors[_0x5d0b65(0x185)](_0x5d0b65(0x165)+PRODUCT_CONFIG[_0x5d0b65(0x1a8)]+'.');const _0x2b3939=''+_0x190d01+_0x777274,_0x127b20={'X-User-AK':_0x4c7fc1},_0x4526f9=new AbortController(),_0x446a36=setTimeout(()=>_0x4526f9['abort'](),timeout);try{const _0x7bdfab=await fetch(_0x2b3939,{'method':method,'headers':{'Content-Type':_0x5d0b65(0x14c),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x127b20,...headers},'body':_0x306046?JSON['stringify'](_0x306046):undefined,'signal':_0x4526f9[_0x5d0b65(0x178)]});let _0x2368a7;try{_0x2368a7=await _0x7bdfab['json']();}catch{throw CliErrors[_0x5d0b65(0x19e)](_0x5d0b65(0x17e)+_0x7bdfab[_0x5d0b65(0x1a9)]+')',_0x7bdfab[_0x5d0b65(0x1a9)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x7bdfab['ok']||_0x2368a7[_0x5d0b65(0x1b2)]===![])throw CliErrors[_0x5d0b65(0x19e)](_0x2368a7[_0x5d0b65(0x15a)]||_0x2368a7[_0x5d0b65(0x1a5)]||_0x5d0b65(0x148)+_0x7bdfab[_0x5d0b65(0x1a9)],_0x2368a7['errorCode']?'API\x20error\x20code:\x20'+_0x2368a7[_0x5d0b65(0x1a3)]:undefined);return _0x2368a7;}catch(_0x232056){if(_0x232056 instanceof Error&&_0x232056[_0x5d0b65(0x1ad)]===_0x5d0b65(0x181))throw CliErrors[_0x5d0b65(0x19e)]('Request\x20timeout:\x20'+_0x2b3939);throw _0x232056;}finally{clearTimeout(_0x446a36);}}async function apiBinaryRequest(_0x34368d,_0x35f5bf={}){const _0xc8c906=a66_0x525c,{method:method=_0xc8c906(0x1b3),headers:headers={},timeout:timeout=0x7530}=_0x35f5bf,_0x5a7a61=_activeAK,_0x4241b6=getRuntimeDomain();if(!_0x5a7a61)throw CliErrors[_0xc8c906(0x185)](_0xc8c906(0x165)+PRODUCT_CONFIG[_0xc8c906(0x1a8)]+'.');const _0x4d801c=''+_0x4241b6+_0x34368d,_0x5f1ca5=new AbortController(),_0x3af75a=setTimeout(()=>_0x5f1ca5[_0xc8c906(0x1a6)](),timeout);try{const _0x3bc23f=await fetch(_0x4d801c,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0xc8c906(0x161)],'X-User-AK':_0x5a7a61,...headers},'signal':_0x5f1ca5[_0xc8c906(0x178)]});if(!_0x3bc23f['ok']){let _0xacaea9;try{const _0x5a5719=await _0x3bc23f['json']();_0xacaea9=_0x5a5719['errorMsg']||_0x5a5719[_0xc8c906(0x1a5)]||_0x5a5719[_0xc8c906(0x1a3)];}catch{_0xacaea9=await _0x3bc23f[_0xc8c906(0x196)]()[_0xc8c906(0x151)](()=>undefined);}throw CliErrors[_0xc8c906(0x19e)](_0xacaea9||_0xc8c906(0x148)+_0x3bc23f['status'],_0xc8c906(0x1ab)+_0x4d801c);}return Buffer[_0xc8c906(0x15e)](await _0x3bc23f['arrayBuffer']());}catch(_0x1cbe6a){if(_0x1cbe6a instanceof Error&&_0x1cbe6a[_0xc8c906(0x1ad)]===_0xc8c906(0x181))throw CliErrors[_0xc8c906(0x19e)](_0xc8c906(0x19a)+_0x4d801c);throw _0x1cbe6a;}finally{clearTimeout(_0x3af75a);}}async function toolboxRequest(_0x23c632,_0x4027b8,_0x30e114={}){const _0x1ffd9e=a66_0x525c,{method:method=_0x1ffd9e(0x1b3),headers:headers={},timeout:timeout=0x7530}=_0x30e114,_0x28bdea=_activeAK;if(!_0x28bdea)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x1ffd9e(0x1a8)]+'.');const _0x384665=getApiDomain()[_0x1ffd9e(0x191)](/\/$/,''),_0x5d26ea=new URL(_0x23c632,_0x384665+_0x1ffd9e(0x19f));if(_0x4027b8)for(const [_0xda9b9c,_0x1d9f82]of Object[_0x1ffd9e(0x18e)](_0x4027b8)){_0x1d9f82!==undefined&&_0x1d9f82!==null&&_0x5d26ea[_0x1ffd9e(0x1bb)][_0x1ffd9e(0x194)](_0xda9b9c,String(_0x1d9f82));}const _0x40a5b8=new AbortController(),_0x317c65=setTimeout(()=>_0x40a5b8['abort'](),timeout);try{const _0x51736e=await fetch(_0x5d26ea,{'method':method,'headers':{'Content-Type':_0x1ffd9e(0x14c),'X-Invoke-Source':PRODUCT_CONFIG[_0x1ffd9e(0x161)],'X-User-AK':_0x28bdea,...headers},'signal':_0x40a5b8[_0x1ffd9e(0x178)]});let _0x212379;try{_0x212379=await _0x51736e[_0x1ffd9e(0x18f)]();}catch{throw CliErrors['apiError'](_0x1ffd9e(0x174)+_0x51736e['status']+')',_0x51736e[_0x1ffd9e(0x1a9)]>=0x190?_0x1ffd9e(0x16b):undefined);}if(!_0x51736e['ok']){const _0x19e24d=_0x212379&&typeof _0x212379===_0x1ffd9e(0x193)?_0x212379:{};throw CliErrors[_0x1ffd9e(0x19e)](_0x19e24d[_0x1ffd9e(0x15a)]||_0x19e24d[_0x1ffd9e(0x1a5)]||_0x1ffd9e(0x16e)+_0x51736e[_0x1ffd9e(0x1a9)],_0x19e24d['errorCode']?_0x1ffd9e(0x1ae)+_0x19e24d['errorCode']:undefined);}if(_0x212379&&typeof _0x212379===_0x1ffd9e(0x193)&&_0x1ffd9e(0x1b2)in _0x212379&&typeof _0x212379[_0x1ffd9e(0x1b2)]===_0x1ffd9e(0x175)){const _0x2aff06=_0x212379;if(!_0x2aff06[_0x1ffd9e(0x1b2)])throw CliErrors[_0x1ffd9e(0x19e)](_0x2aff06[_0x1ffd9e(0x15a)]||_0x2aff06[_0x1ffd9e(0x1a5)]||_0x1ffd9e(0x1a1),_0x2aff06[_0x1ffd9e(0x1a3)]?_0x1ffd9e(0x1ae)+_0x2aff06[_0x1ffd9e(0x1a3)]:undefined);return _0x2aff06[_0x1ffd9e(0x1aa)];}return _0x212379;}catch(_0x5365da){if(_0x5365da instanceof Error&&_0x5365da[_0x1ffd9e(0x1ad)]===_0x1ffd9e(0x181))throw CliErrors[_0x1ffd9e(0x19e)](_0x1ffd9e(0x19a)+_0x5d26ea[_0x1ffd9e(0x183)]());throw _0x5365da;}finally{clearTimeout(_0x317c65);}}async function skillHubJsonRequest(_0x1c82aa,_0x5293d5={}){const _0x59d980=a66_0x525c,{method:method=_0x59d980(0x1b3),query:_0x1ad9c1,body:_0x177897,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x5293d5,_0x19eecd=_activeAK;if(!_0x19eecd)throw CliErrors[_0x59d980(0x185)](_0x59d980(0x165)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x41ac83=getSkillHubDomain()[_0x59d980(0x191)](/\/$/,''),_0x32e37d=new URL(_0x1c82aa,_0x41ac83+'/');if(_0x1ad9c1)for(const [_0x4d119d,_0x562a5b]of Object[_0x59d980(0x18e)](_0x1ad9c1)){_0x562a5b!==undefined&&_0x562a5b!==null&&_0x32e37d[_0x59d980(0x1bb)][_0x59d980(0x194)](_0x4d119d,String(_0x562a5b));}const _0x41d41f=new AbortController(),_0x4ea4e8=setTimeout(()=>_0x41d41f['abort'](),timeout);try{const _0x14f405=await fetch(_0x32e37d[_0x59d980(0x183)](),{'method':method,'headers':{'Accept':_0x59d980(0x14c),'X-Invoke-Source':PRODUCT_CONFIG[_0x59d980(0x161)],'X-User-AK':_0x19eecd,...headers},'body':_0x177897,'signal':_0x41d41f['signal']});let _0x1332ff;try{_0x1332ff=await _0x14f405[_0x59d980(0x18f)]();}catch{if(allowNotFound&&_0x14f405['status']===0x194)return undefined;throw CliErrors['apiError'](_0x59d980(0x147)+_0x14f405['status']+')',_0x14f405['status']>=0x190?_0x59d980(0x16b):undefined);}if(allowNotFound&&(_0x14f405[_0x59d980(0x1a9)]===0x194||_0x1332ff?.[_0x59d980(0x168)]===0x194))return undefined;const _0x191e47=!_0x14f405['ok']||_0x1332ff?.['success']===![]||typeof _0x1332ff?.['code']==='number'&&_0x1332ff[_0x59d980(0x168)]>=0x190;if(_0x191e47)throw CliErrors[_0x59d980(0x19e)](_0x1332ff?.[_0x59d980(0x15a)]||_0x1332ff?.[_0x59d980(0x1a5)]||_0x1332ff?.['msg']||'SkillHub\x20API\x20error:\x20'+_0x14f405[_0x59d980(0x1a9)],_0x1332ff?.[_0x59d980(0x1a3)]?_0x59d980(0x153)+_0x1332ff['errorCode']:undefined);return _0x1332ff?.[_0x59d980(0x1aa)]??_0x1332ff;}catch(_0x1c567e){if(_0x1c567e instanceof Error&&_0x1c567e['name']==='AbortError')throw CliErrors[_0x59d980(0x19e)]('Request\x20timeout:\x20'+_0x32e37d[_0x59d980(0x183)]());throw _0x1c567e;}finally{clearTimeout(_0x4ea4e8);}}function a66_0x4489(){const _0xe3f2f0=['208196qIDTlw','/client/runtime-bff/personal/create','warnings','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','boolean','/client/bff/query/','Missing\x20Skill\x20package\x20payload.','signal','resolvedSlug','346634OUwUny','resolvedVersion','personal','skillCode','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','artifactType','skillName','AbortError','/api/cli/v1/skills/','toString','packageBase64','authRequired','scope','PRIVATE','string','/publish','875272KfbYkO','/execute?appCode=','/client/artifact/','/download','entries','json','source','replace','filter','object','set','tags','text','validation','slug','1264440yREzgz','Request\x20timeout:\x20','trim','isArray','/api/runtime/v1/namespaces/','apiError','/api/node-toolbox/','tableData','Toolbox\x20API\x20error','Knowledge-base\x20entry\x20not\x20found:\x20id=','errorCode','effective','message','abort','/client/runtime-bff/personal/','newConfigFileName','status','data','Download\x20failed:\x20','/client/sql/query','name','Toolbox\x20error\x20code:\x20','?appCode=','/client/user/loginUserInfo','16438239hbZAcd','success','GET','.zip','skill','errors','appCode','15EMyhKv','appName','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','searchParams','2767565SElMJB','headlineVersion','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','/client/knowledge-base/search','file','summary','Personal\x20BFF\x20not\x20found:\x20id=','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','API\x20error:\x20','/versions/','map','POST','application/json','valid','confirmWarnings','namespace','version','catch','BFF\x20script\x20not\x20found:\x20id=','SkillHub\x20error\x20code:\x20','35IyrLDL','items','/client/artifact/create','sqlCode','NAMESPACE_ONLY','markdown','errorMsg','/update','favorite','base64','from','/client/knowledge-base/personal/list?appCode=','/client/knowledge-base/personal/create','invokeSource','SQL\x20query\x20not\x20found:\x20','company','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','Configure\x20accessKey\x20in\x20','7374036wbGTVU','application/zip','code','topK','content','Check\x20your\x20credentials\x20and\x20try\x20again.','visibility','all','Toolbox\x20API\x20error:\x20','/client/knowledge-base/personal/','description'];a66_0x4489=function(){return _0xe3f2f0;};return a66_0x4489();}async function skillHubBinaryRequest(_0x385cbd,_0x1ed9b6={}){const _0x121046=a66_0x525c,{query:_0x1bef57,headers:headers={},timeout:timeout=0x7530}=_0x1ed9b6,_0x5a973d=_activeAK;if(!_0x5a973d)throw CliErrors[_0x121046(0x185)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x121046(0x1a8)]+'.');const _0x33ff4b=getSkillHubDomain()[_0x121046(0x191)](/\/$/,''),_0x584d80=new URL(_0x385cbd,_0x33ff4b+'/');if(_0x1bef57)for(const [_0x4aba3c,_0x29a4bb]of Object[_0x121046(0x18e)](_0x1bef57)){_0x29a4bb!==undefined&&_0x29a4bb!==null&&_0x584d80[_0x121046(0x1bb)][_0x121046(0x194)](_0x4aba3c,String(_0x29a4bb));}const _0x508ec7=new AbortController(),_0x9fe702=setTimeout(()=>_0x508ec7['abort'](),timeout);try{const _0x1c6976=await fetch(_0x584d80[_0x121046(0x183)](),{'method':_0x121046(0x1b3),'headers':{'Accept':'application/octet-stream','X-Invoke-Source':PRODUCT_CONFIG[_0x121046(0x161)],'X-User-AK':_0x5a973d,...headers},'signal':_0x508ec7[_0x121046(0x178)]});if(!_0x1c6976['ok']){let _0x5d5355;try{const _0x2b18fd=await _0x1c6976[_0x121046(0x18f)]();_0x5d5355=_0x2b18fd[_0x121046(0x15a)]||_0x2b18fd[_0x121046(0x1a5)]||_0x2b18fd['msg']||_0x2b18fd[_0x121046(0x1a3)];}catch{_0x5d5355=await _0x1c6976[_0x121046(0x196)]()[_0x121046(0x151)](()=>undefined);}throw CliErrors[_0x121046(0x19e)](_0x5d5355||'SkillHub\x20API\x20error:\x20'+_0x1c6976[_0x121046(0x1a9)],_0x121046(0x1ab)+_0x584d80['toString']());}return Buffer[_0x121046(0x15e)](await _0x1c6976['arrayBuffer']());}catch(_0x50de40){if(_0x50de40 instanceof Error&&_0x50de40['name']===_0x121046(0x181))throw CliErrors['apiError'](_0x121046(0x19a)+_0x584d80['toString']());throw _0x50de40;}finally{clearTimeout(_0x9fe702);}}export async function getBffScriptInfo(_0x145b5b){const _0xce9965=a66_0x525c,_0x2dbb72=await apiRequest(_0xce9965(0x176)+_0x145b5b);if(!_0x2dbb72[_0xce9965(0x1aa)])throw CliErrors[_0xce9965(0x197)](_0xce9965(0x152)+_0x145b5b);return _0x2dbb72['data'];}export async function getSqlQueryInfo(_0xc53e43,_0x5c5e03){const _0x4f93a8=a66_0x525c,_0x803584=await apiRequest(_0x4f93a8(0x1ac),{'method':_0x4f93a8(0x14b),'body':{'appCode':_0xc53e43,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x5c5e03}}),_0x31ef02=_0x803584[_0x4f93a8(0x1aa)],_0x2252fa=_0x31ef02&&typeof _0x31ef02===_0x4f93a8(0x193)&&_0x4f93a8(0x1a0)in _0x31ef02?_0x31ef02['tableData']?.[0x0]:_0x31ef02&&typeof _0x31ef02==='object'&&_0x4f93a8(0x157)in _0x31ef02?_0x31ef02:undefined;if(!_0x2252fa)throw CliErrors[_0x4f93a8(0x197)](_0x4f93a8(0x162)+_0x5c5e03);return _0x2252fa;}function isRemoteAppItem(_0x5bda90){const _0x4f6c10=a66_0x525c;return!!_0x5bda90&&typeof _0x5bda90===_0x4f6c10(0x193)&&typeof _0x5bda90[_0x4f6c10(0x1b7)]==='string'&&typeof _0x5bda90[_0x4f6c10(0x1b9)]===_0x4f6c10(0x188);}function extractRemoteAppItems(_0x31c706){const _0x25eda2=a66_0x525c;if(Array[_0x25eda2(0x19c)](_0x31c706))return _0x31c706[_0x25eda2(0x192)](isRemoteAppItem);if(!_0x31c706||typeof _0x31c706!==_0x25eda2(0x193))throw CliErrors[_0x25eda2(0x19e)](_0x25eda2(0x164));const _0x58b7a6=_0x31c706;if(Array['isArray'](_0x58b7a6['tableData']))return _0x58b7a6['tableData'][_0x25eda2(0x192)](isRemoteAppItem);if(_0x58b7a6[_0x25eda2(0x1aa)]&&typeof _0x58b7a6[_0x25eda2(0x1aa)]==='object'){const _0x5ae630=_0x58b7a6['data'];if(Array[_0x25eda2(0x19c)](_0x5ae630[_0x25eda2(0x1a0)]))return _0x5ae630[_0x25eda2(0x1a0)][_0x25eda2(0x192)](isRemoteAppItem);}throw CliErrors['apiError'](_0x25eda2(0x1ba));}export async function getMyApps(){const _0x5a2e97=a66_0x525c,_0x2f6c28=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x2f6c28[_0x5a2e97(0x1aa)]);}export async function getLoginUserInfo(){const _0x3d4677=a66_0x525c,_0x4abc45=await apiRequest(_0x3d4677(0x1b0));if(!_0x4abc45['data']||typeof _0x4abc45['data']!=='object'||Array['isArray'](_0x4abc45[_0x3d4677(0x1aa)]))throw CliErrors[_0x3d4677(0x19e)](_0x3d4677(0x1be));return _0x4abc45[_0x3d4677(0x1aa)];}export async function listDatasets(_0x598188,_0x53d878){const _0x2d3dce=a66_0x525c,_0x3a8ab4=await apiRequest('/client/dataset/list',{'method':_0x2d3dce(0x14b),'body':{'appCode':_0x598188,..._0x53d878?.[_0x2d3dce(0x168)]&&{'code':_0x53d878[_0x2d3dce(0x168)]},..._0x53d878?.['name']&&{'name':_0x53d878[_0x2d3dce(0x1ad)]}}});return extractList(_0x3a8ab4[_0x2d3dce(0x1aa)]);}export async function getDatasetDetail(_0x926594){const _0x2b02ca=a66_0x525c,_0x3fef9e=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0x926594));return _0x3fef9e[_0x2b02ca(0x1aa)];}export async function getDatasetSdkUsageDoc(_0x1f3e2a,_0x2ab8fc){const _0x383a71=a66_0x525c,_0x134ffa=await toolboxRequest('api-doc-generator',{'datasetCode':_0x1f3e2a,'appCode':_0x2ab8fc});return typeof _0x134ffa?.['markdown']===_0x383a71(0x188)?_0x134ffa[_0x383a71(0x159)]:'';}export async function listRuntimeArtifacts(_0x3be898,_0x424706){const _0x2365bc=a66_0x525c,_0x110f7b=new URLSearchParams({'appCode':_0x3be898});if(_0x424706?.[_0x2365bc(0x17f)])_0x110f7b[_0x2365bc(0x194)]('artifactType',_0x424706[_0x2365bc(0x17f)]);if(_0x424706?.[_0x2365bc(0x190)])_0x110f7b[_0x2365bc(0x194)]('source',_0x424706[_0x2365bc(0x190)]);if(_0x424706?.['favorite']!==undefined)_0x110f7b['set'](_0x2365bc(0x15c),String(_0x424706[_0x2365bc(0x15c)]));const _0x10c47a=await apiRequest('/client/artifact/list?'+_0x110f7b[_0x2365bc(0x183)]());return Array[_0x2365bc(0x19c)](_0x10c47a['data'])?_0x10c47a[_0x2365bc(0x1aa)]:[];}export async function getRuntimeArtifact(_0x5bdbe6,_0x239c75){const _0x13a363=a66_0x525c,_0x223eee=await apiRequest(_0x13a363(0x18c)+_0x5bdbe6+_0x13a363(0x1af)+encodeURIComponent(_0x239c75));if(!_0x223eee[_0x13a363(0x1aa)])throw CliErrors['validation']('Artifact\x20not\x20found:\x20id='+_0x5bdbe6);return _0x223eee[_0x13a363(0x1aa)];}export async function createRuntimeArtifact(_0x3fe24b,_0x5a8b8c){const _0x15199f=a66_0x525c,_0x7f40ea=await apiRequest(_0x15199f(0x156),{'method':_0x15199f(0x14b),'body':{'appCode':_0x3fe24b,..._0x5a8b8c}});return _0x7f40ea[_0x15199f(0x1aa)];}export async function updateRuntimeArtifact(_0x3fae55,_0x192aab,_0x353b70){const _0x3f5ff3=a66_0x525c,_0x233b34=await apiRequest(_0x3f5ff3(0x18c)+_0x3fae55+_0x3f5ff3(0x15b),{'method':'POST','body':{'appCode':_0x192aab,..._0x353b70}});return _0x233b34[_0x3f5ff3(0x1aa)];}export async function listPersonalBffs(_0x2b8d97){const _0x109eeb=a66_0x525c,_0x3519be=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x2b8d97));return Array[_0x109eeb(0x19c)](_0x3519be[_0x109eeb(0x1aa)])?_0x3519be[_0x109eeb(0x1aa)]:[];}export async function getPersonalBff(_0xd68ff2,_0x155eb3){const _0x21e3cb=a66_0x525c,_0x28e34e=await apiRequest(_0x21e3cb(0x1a7)+_0xd68ff2+_0x21e3cb(0x1af)+encodeURIComponent(_0x155eb3));if(!_0x28e34e[_0x21e3cb(0x1aa)])throw CliErrors[_0x21e3cb(0x197)](_0x21e3cb(0x146)+_0xd68ff2);return _0x28e34e[_0x21e3cb(0x1aa)];}export async function createPersonalBff(_0x4bcb59,_0x2d74d1){const _0x5c558c=a66_0x525c,_0x5013ca=await apiRequest(_0x5c558c(0x172),{'method':_0x5c558c(0x14b),'body':{'appCode':_0x4bcb59,..._0x2d74d1}});return _0x5013ca[_0x5c558c(0x1aa)];}export async function updatePersonalBff(_0x244141,_0x3c0385,_0x3410b9){const _0x333024=a66_0x525c,_0x470a3f=await apiRequest(_0x333024(0x1a7)+_0x244141+_0x333024(0x15b),{'method':_0x333024(0x14b),'body':{'appCode':_0x3c0385,..._0x3410b9}});return _0x470a3f['data'];}export async function executePersonalBff(_0x4fbe98,_0x33609a,_0x4ca0ac){const _0x54f1fe=a66_0x525c,_0x3bd18b=await apiRequest(_0x54f1fe(0x1a7)+_0x4fbe98+_0x54f1fe(0x18b)+encodeURIComponent(_0x33609a),{'method':_0x54f1fe(0x14b),'body':_0x4ca0ac});return _0x3bd18b[_0x54f1fe(0x1aa)];}export async function listPersonalKnowledgeBaseItems(_0x373ce1){const _0x46f505=a66_0x525c,_0x3541fb=await apiRequest(_0x46f505(0x15f)+encodeURIComponent(_0x373ce1));return Array[_0x46f505(0x19c)](_0x3541fb[_0x46f505(0x1aa)])?_0x3541fb[_0x46f505(0x1aa)]:[];}export async function getPersonalKnowledgeBaseItem(_0x1f2f40,_0xfcace0){const _0x196402=a66_0x525c,_0x433a05=await apiRequest(_0x196402(0x16f)+_0x1f2f40+'?appCode='+encodeURIComponent(_0xfcace0));if(!_0x433a05[_0x196402(0x1aa)])throw CliErrors[_0x196402(0x197)](_0x196402(0x1a2)+_0x1f2f40);return _0x433a05[_0x196402(0x1aa)];}export async function createPersonalKnowledgeBaseItem(_0x4b7dbf,_0x5b8222){const _0x2d690d=a66_0x525c,_0x4ed2df=await apiRequest(_0x2d690d(0x160),{'method':'POST','body':{'appCode':_0x4b7dbf,..._0x5b8222}});return _0x4ed2df[_0x2d690d(0x1aa)];}export async function updatePersonalKnowledgeBaseItem(_0x56631d,_0x40728f,_0x55d854){const _0x59d4f5=a66_0x525c,_0x506c3e=await apiRequest(_0x59d4f5(0x16f)+_0x56631d+_0x59d4f5(0x15b),{'method':_0x59d4f5(0x14b),'body':{'appCode':_0x40728f,..._0x55d854}});return _0x506c3e['data'];}export async function searchKnowledgeBase(_0x56e597,_0x438a58){const _0x35898a=a66_0x525c,_0x18f620=await apiRequest(_0x35898a(0x1bf),{'method':_0x35898a(0x14b),'body':{'appCode':_0x56e597,'query':_0x438a58['query'],..._0x438a58[_0x35898a(0x169)]!==undefined?{'topK':_0x438a58[_0x35898a(0x169)]}:{}}});return Array[_0x35898a(0x19c)](_0x18f620[_0x35898a(0x1aa)])?_0x18f620[_0x35898a(0x1aa)]:[];}export async function getRuntimeSkillByCode(_0x195fed,_0x4f2d53){const _0x2585d3=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x195fed)+'/'+encodeURIComponent(_0x4f2d53),{'allowNotFound':!![]});return _0x2585d3?skillHubRuntimeDetailToRuntimeSkill(_0x2585d3):undefined;}function a66_0x525c(_0x6ebb8b,_0x11687b){_0x6ebb8b=_0x6ebb8b-0x145;const _0x4489c6=a66_0x4489();let _0x525c18=_0x4489c6[_0x6ebb8b];return _0x525c18;}export async function listRuntimeSkills(_0x116d9c){const _0x304eca=a66_0x525c,_0x2b7b23=await skillHubJsonRequest(_0x304eca(0x19d)+encodeURIComponent(_0x116d9c['appCode'])+'/skills',{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x116d9c[_0x304eca(0x1b7)],_0x2b7b23,_0x116d9c[_0x304eca(0x186)]??_0x304eca(0x16d),_0x116d9c[_0x304eca(0x168)]);}export async function listPersonalRuntimeSkills(_0x5326ec){const _0x2c75a5=a66_0x525c;return(await listRuntimeSkills({'appCode':_0x5326ec,'scope':_0x2c75a5(0x17c)}))[_0x2c75a5(0x17c)];}export async function listCompanyRuntimeSkills(_0x179d21){const _0x357ac1=a66_0x525c;return(await listRuntimeSkills({'appCode':_0x179d21,'scope':_0x357ac1(0x163)}))[_0x357ac1(0x163)];}export async function listVisibleRuntimeSkills(_0x4ae616){const _0x59fa03=a66_0x525c;return(await listRuntimeSkills({'appCode':_0x4ae616,'scope':_0x59fa03(0x16d)}))[_0x59fa03(0x1a4)];}export async function createPersonalRuntimeSkill(_0x253ac5,_0x14aec7){const _0x5befa9=a66_0x525c;return publishRuntimeSkill(_0x253ac5,_0x14aec7,{'visibility':_0x5befa9(0x187)});}export async function updatePersonalRuntimeSkill(_0x47052d,_0x46da36,_0x1b55d8){const _0x187279=a66_0x525c;return publishRuntimeSkill(_0x46da36,{..._0x1b55d8,'skillCode':_0x1b55d8[_0x187279(0x17d)]??_0x47052d},{'visibility':_0x187279(0x187)});}export async function publishCompanyRuntimeSkill(_0x2a30f0,_0x58c95e,_0x45bcc8={}){const _0x480564=a66_0x525c;return publishRuntimeSkill(_0x2a30f0,_0x58c95e,{'visibility':_0x480564(0x158),'confirmWarnings':_0x45bcc8[_0x480564(0x14e)]});}export async function validateRuntimeSkillPublish(_0x2bbe55,_0x5080bf,_0x4ac833){const _0x2f50d7=a66_0x525c,_0x330514=buildRuntimeSkillPublishForm(_0x5080bf,_0x4ac833[_0x2f50d7(0x16c)]),_0x2aca29=await skillHubJsonRequest(_0x2f50d7(0x182)+encodeURIComponent(_0x2bbe55)+'/publish/validate',{'method':'POST','body':_0x330514});return{'valid':_0x2aca29[_0x2f50d7(0x14d)]===!![],'errors':Array[_0x2f50d7(0x19c)](_0x2aca29[_0x2f50d7(0x1b6)])?_0x2aca29['errors']:[],'warnings':Array[_0x2f50d7(0x19c)](_0x2aca29['warnings'])?_0x2aca29[_0x2f50d7(0x173)]:[],'resolvedSlug':_0x2aca29[_0x2f50d7(0x179)],'resolvedVersion':_0x2aca29[_0x2f50d7(0x17b)]};}export async function downloadRuntimeSkillPackage(_0x2fec1a,_0x316b8b,_0x366717,_0x1f3567){const _0x141fe1=a66_0x525c;void _0x2fec1a;const _0xb32d38=_0x1f3567?_0x141fe1(0x182)+encodeURIComponent(_0x366717)+'/'+encodeURIComponent(_0x316b8b)+_0x141fe1(0x149)+encodeURIComponent(_0x1f3567)+_0x141fe1(0x18d):_0x141fe1(0x182)+encodeURIComponent(_0x366717)+'/'+encodeURIComponent(_0x316b8b)+_0x141fe1(0x18d);return skillHubBinaryRequest(_0xb32d38);}async function publishRuntimeSkill(_0x4d105b,_0x3bf0bb,_0x1e7ee9){const _0x2b6d91=a66_0x525c,_0x30b76f=buildRuntimeSkillPublishForm(_0x3bf0bb,_0x1e7ee9[_0x2b6d91(0x16c)]),_0x363681=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x4d105b)+_0x2b6d91(0x189),{'method':_0x2b6d91(0x14b),'query':{'confirmWarnings':_0x1e7ee9['confirmWarnings']===!![]?!![]:undefined},'body':_0x30b76f});return{'appCode':_0x363681['namespace']??_0x4d105b,'skillCode':_0x363681[_0x2b6d91(0x198)]??_0x3bf0bb[_0x2b6d91(0x17d)]??'','skillName':_0x3bf0bb[_0x2b6d91(0x180)]??_0x363681[_0x2b6d91(0x198)]??_0x3bf0bb[_0x2b6d91(0x17d)],'description':_0x3bf0bb[_0x2b6d91(0x170)],'scope':skillHubVisibilityToScope(_0x363681[_0x2b6d91(0x16c)]??_0x1e7ee9[_0x2b6d91(0x16c)])??_0x2b6d91(0x17c),'version':_0x363681[_0x2b6d91(0x150)]??_0x3bf0bb['version'],'tags':_0x3bf0bb[_0x2b6d91(0x195)],'content':_0x3bf0bb[_0x2b6d91(0x16a)]};}function buildRuntimeSkillPublishForm(_0x149146,_0x5ef34e){const _0xa81364=a66_0x525c,_0x415f7d=new FormData();return _0x415f7d[_0xa81364(0x194)](_0xa81364(0x1c0),runtimeSkillPackageFile(_0x149146)),_0x415f7d[_0xa81364(0x194)](_0xa81364(0x16c),_0x5ef34e),_0x415f7d;}function runtimeSkillPackageFile(_0x5c6648){const _0x5ecf42=a66_0x525c;if(!_0x5c6648['packageBase64'])throw CliErrors['validation'](_0x5ecf42(0x177));const _0x5c1ef3=Buffer[_0x5ecf42(0x15e)](_0x5c6648[_0x5ecf42(0x184)],_0x5ecf42(0x15d)),_0x55e06c=new Blob([_0x5c1ef3],{'type':_0x5ecf42(0x167)}),_0x5bdbf9=(_0x5c6648[_0x5ecf42(0x17d)]||_0x5ecf42(0x1b5))+_0x5ecf42(0x1b4);if(typeof File!=='undefined')return new File([_0x55e06c],_0x5bdbf9,{'type':_0x5ecf42(0x167)});return _0x55e06c;}function normalizeSkillHubRuntimeListResponse(_0x5e3b7d,_0x45aae0,_0x475c3d,_0x12a032){const _0x57aad4=a66_0x525c,_0x4f0af6=Array[_0x57aad4(0x19c)](_0x45aae0)?_0x45aae0:Array[_0x57aad4(0x19c)](_0x45aae0?.[_0x57aad4(0x155)])?_0x45aae0['items']:[],_0x508101=_0x12a032?.[_0x57aad4(0x19b)](),_0x55f137=_0x4f0af6[_0x57aad4(0x192)](_0x152bc5=>!_0x508101||_0x152bc5['slug']===_0x508101)[_0x57aad4(0x14a)](skillHubRuntimeItemToRuntimeSkill)[_0x57aad4(0x192)](_0x598520=>Boolean(_0x598520)),_0x38d282=_0x55f137[_0x57aad4(0x192)](_0x4c25c1=>_0x4c25c1[_0x57aad4(0x186)]==='personal'),_0x197538=_0x55f137['filter'](_0x174963=>_0x174963['scope']===_0x57aad4(0x163));return{'appCode':_0x5e3b7d,'personal':_0x475c3d===_0x57aad4(0x163)?[]:_0x38d282,'company':_0x475c3d===_0x57aad4(0x17c)?[]:_0x197538,'effective':buildEffectiveRuntimeSkills(_0x38d282,_0x197538,_0x475c3d)};}function skillHubRuntimeItemToRuntimeSkill(_0x1630cd){const _0x4079cd=a66_0x525c,_0x41f3b9=_0x1630cd[_0x4079cd(0x198)]?.[_0x4079cd(0x19b)](),_0x373bc8=skillHubVisibilityToScope(_0x1630cd[_0x4079cd(0x16c)]);if(!_0x41f3b9||!_0x373bc8)return undefined;return{'id':_0x1630cd['id'],'appCode':_0x1630cd[_0x4079cd(0x14f)],'skillCode':_0x41f3b9,'skillName':_0x1630cd['displayName']??_0x41f3b9,'description':_0x1630cd[_0x4079cd(0x145)],'scope':_0x373bc8,'version':skillHubRuntimeItemVersion(_0x1630cd),'status':_0x1630cd[_0x4079cd(0x1a9)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x5872f2){const _0x19809d=a66_0x525c,_0x2bfefe=_0x5872f2[_0x19809d(0x198)]?.['trim']();if(!_0x2bfefe)return undefined;return{'id':_0x5872f2['id'],'appCode':_0x5872f2[_0x19809d(0x14f)],'skillCode':_0x2bfefe,'skillName':_0x5872f2['displayName']??_0x2bfefe,'description':_0x5872f2[_0x19809d(0x145)],'scope':skillHubVisibilityToScope(_0x5872f2[_0x19809d(0x16c)])??_0x5872f2[_0x19809d(0x16c)]?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0x5872f2),'status':_0x5872f2[_0x19809d(0x1a9)]};}function skillHubVisibilityToScope(_0x5892fc){const _0x522c2c=a66_0x525c;if(_0x5892fc===_0x522c2c(0x187))return _0x522c2c(0x17c);if(_0x5892fc==='NAMESPACE_ONLY')return _0x522c2c(0x163);return undefined;}function skillHubRuntimeItemVersion(_0x492fc9){const _0x1d2593=a66_0x525c;return _0x492fc9['publishedVersion']?.['version']??_0x492fc9[_0x1d2593(0x1bd)]?.[_0x1d2593(0x150)]??_0x492fc9['ownerPreviewVersion']?.[_0x1d2593(0x150)];}function buildEffectiveRuntimeSkills(_0x2a2c3f,_0x73d428,_0x3f1d7e){const _0x5c2e52=a66_0x525c;if(_0x3f1d7e===_0x5c2e52(0x17c))return _0x2a2c3f;if(_0x3f1d7e===_0x5c2e52(0x163))return _0x73d428;const _0x3cd14a=new Map();for(const _0x137de9 of _0x73d428){_0x3cd14a[_0x5c2e52(0x194)](_0x137de9[_0x5c2e52(0x17d)],_0x137de9);}for(const _0x2fa2e1 of _0x2a2c3f){_0x3cd14a[_0x5c2e52(0x194)](_0x2fa2e1[_0x5c2e52(0x17d)],_0x2fa2e1);}return Array['from'](_0x3cd14a['values']());}function normalizeRuntimeSkillListResponse(_0x1d9aae,_0xa2f894){const _0x41d49c=a66_0x525c;if(Array[_0x41d49c(0x19c)](_0xa2f894)){const _0x414735=_0xa2f894['filter'](_0x510738=>_0x510738[_0x41d49c(0x186)]===_0x41d49c(0x17c)),_0x430ff3=_0xa2f894[_0x41d49c(0x192)](_0x25955e=>_0x25955e[_0x41d49c(0x186)]===_0x41d49c(0x163));return{'appCode':_0x1d9aae,'personal':_0x414735,'company':_0x430ff3,'effective':[..._0x430ff3,..._0x414735]};}return{'appCode':_0xa2f894?.['appCode']??_0x1d9aae,'personal':Array[_0x41d49c(0x19c)](_0xa2f894?.[_0x41d49c(0x17c)])?_0xa2f894[_0x41d49c(0x17c)]:[],'company':Array[_0x41d49c(0x19c)](_0xa2f894?.[_0x41d49c(0x163)])?_0xa2f894[_0x41d49c(0x163)]:[],'effective':Array[_0x41d49c(0x19c)](_0xa2f894?.[_0x41d49c(0x1a4)])?_0xa2f894[_0x41d49c(0x1a4)]:[]};}
|
|
1
|
+
(function(_0x55c826,_0x30396e){const _0x4ee068=a69_0x52b7,_0x1362f5=_0x55c826();while(!![]){try{const _0x2a5cb6=-parseInt(_0x4ee068(0x15a))/0x1*(parseInt(_0x4ee068(0x174))/0x2)+parseInt(_0x4ee068(0x17b))/0x3+-parseInt(_0x4ee068(0x175))/0x4*(parseInt(_0x4ee068(0x195))/0x5)+parseInt(_0x4ee068(0x144))/0x6+-parseInt(_0x4ee068(0x198))/0x7+-parseInt(_0x4ee068(0x14f))/0x8+parseInt(_0x4ee068(0x167))/0x9;if(_0x2a5cb6===_0x30396e)break;else _0x1362f5['push'](_0x1362f5['shift']());}catch(_0x255c30){_0x1362f5['push'](_0x1362f5['shift']());}}}(a69_0x3013,0x3c128));import{getApiDomain,getRuntimeDomain,getSkillHubDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x50a0f9){_activeAK=_0x50a0f9||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x397252,_0x2c5bf9={}){const _0x4e2959=a69_0x52b7,{method:method='GET',body:_0x124f15,headers:headers={},timeout:timeout=0x7530}=_0x2c5bf9,_0x5f31ee=_activeAK,_0xc48ef0=getRuntimeDomain();if(!_0x5f31ee)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x3bcfd8=''+_0xc48ef0+_0x397252,_0x3cd73a={'X-User-AK':_0x5f31ee},_0x1fbab7=new AbortController(),_0x2e6303=setTimeout(()=>_0x1fbab7[_0x4e2959(0x12c)](),timeout);try{const _0x142b29=await fetch(_0x3bcfd8,{'method':method,'headers':{'Content-Type':_0x4e2959(0x145),'X-Invoke-Source':PRODUCT_CONFIG[_0x4e2959(0x164)],..._0x3cd73a,...headers},'body':_0x124f15?JSON[_0x4e2959(0x15f)](_0x124f15):undefined,'signal':_0x1fbab7[_0x4e2959(0x125)]});let _0x2db105;try{_0x2db105=await _0x142b29[_0x4e2959(0x17c)]();}catch{throw CliErrors[_0x4e2959(0x135)](_0x4e2959(0x177)+_0x142b29[_0x4e2959(0x163)]+')',_0x142b29['status']>=0x190?_0x4e2959(0x124):undefined);}if(!_0x142b29['ok']||_0x2db105[_0x4e2959(0x191)]===![])throw CliErrors[_0x4e2959(0x135)](_0x2db105[_0x4e2959(0x127)]||_0x2db105['message']||_0x4e2959(0x190)+_0x142b29[_0x4e2959(0x163)],_0x2db105[_0x4e2959(0x121)]?'API\x20error\x20code:\x20'+_0x2db105[_0x4e2959(0x121)]:undefined);return _0x2db105;}catch(_0x298625){if(_0x298625 instanceof Error&&_0x298625[_0x4e2959(0x13b)]===_0x4e2959(0x13d))throw CliErrors[_0x4e2959(0x135)](_0x4e2959(0x131)+_0x3bcfd8);throw _0x298625;}finally{clearTimeout(_0x2e6303);}}async function apiBinaryRequest(_0x253763,_0x2ce2e2={}){const _0x3eb223=a69_0x52b7,{method:method=_0x3eb223(0x178),headers:headers={},timeout:timeout=0x7530}=_0x2ce2e2,_0x1e45d8=_activeAK,_0x411ad8=getRuntimeDomain();if(!_0x1e45d8)throw CliErrors[_0x3eb223(0x16b)](_0x3eb223(0x16f)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x192236=''+_0x411ad8+_0x253763,_0x4264ca=new AbortController(),_0x4bcb2b=setTimeout(()=>_0x4264ca[_0x3eb223(0x12c)](),timeout);try{const _0xd94bd1=await fetch(_0x192236,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x3eb223(0x164)],'X-User-AK':_0x1e45d8,...headers},'signal':_0x4264ca[_0x3eb223(0x125)]});if(!_0xd94bd1['ok']){let _0x30882e;try{const _0x23cb5c=await _0xd94bd1[_0x3eb223(0x17c)]();_0x30882e=_0x23cb5c[_0x3eb223(0x127)]||_0x23cb5c[_0x3eb223(0x16d)]||_0x23cb5c['errorCode'];}catch{_0x30882e=await _0xd94bd1['text']()['catch'](()=>undefined);}throw CliErrors['apiError'](_0x30882e||'API\x20error:\x20'+_0xd94bd1['status'],'Download\x20failed:\x20'+_0x192236);}return Buffer[_0x3eb223(0x186)](await _0xd94bd1[_0x3eb223(0x117)]());}catch(_0x317c6b){if(_0x317c6b instanceof Error&&_0x317c6b['name']===_0x3eb223(0x13d))throw CliErrors[_0x3eb223(0x135)]('Request\x20timeout:\x20'+_0x192236);throw _0x317c6b;}finally{clearTimeout(_0x4bcb2b);}}async function toolboxRequest(_0x135bc4,_0x2b4a27,_0x5a7b9d={}){const _0x476fda=a69_0x52b7,{method:method=_0x476fda(0x178),headers:headers={},timeout:timeout=0x7530}=_0x5a7b9d,_0x2bb0f6=_activeAK;if(!_0x2bb0f6)throw CliErrors['authRequired'](_0x476fda(0x16f)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x53094b=getApiDomain()[_0x476fda(0x16a)](/\/$/,''),_0x5017a0=new URL(_0x135bc4,_0x53094b+_0x476fda(0x166));if(_0x2b4a27)for(const [_0x6d09be,_0x204df5]of Object[_0x476fda(0x176)](_0x2b4a27)){_0x204df5!==undefined&&_0x204df5!==null&&_0x5017a0[_0x476fda(0x18a)][_0x476fda(0x153)](_0x6d09be,String(_0x204df5));}const _0x4f331f=new AbortController(),_0x542d79=setTimeout(()=>_0x4f331f[_0x476fda(0x12c)](),timeout);try{const _0x143b2c=await fetch(_0x5017a0,{'method':method,'headers':{'Content-Type':_0x476fda(0x145),'X-Invoke-Source':PRODUCT_CONFIG[_0x476fda(0x164)],'X-User-AK':_0x2bb0f6,...headers},'signal':_0x4f331f[_0x476fda(0x125)]});let _0x6152bf;try{_0x6152bf=await _0x143b2c['json']();}catch{throw CliErrors['apiError']('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x143b2c[_0x476fda(0x163)]+')',_0x143b2c[_0x476fda(0x163)]>=0x190?_0x476fda(0x124):undefined);}if(!_0x143b2c['ok']){const _0x35b983=_0x6152bf&&typeof _0x6152bf===_0x476fda(0x171)?_0x6152bf:{};throw CliErrors[_0x476fda(0x135)](_0x35b983[_0x476fda(0x127)]||_0x35b983[_0x476fda(0x16d)]||_0x476fda(0x12e)+_0x143b2c['status'],_0x35b983[_0x476fda(0x121)]?_0x476fda(0x120)+_0x35b983[_0x476fda(0x121)]:undefined);}if(_0x6152bf&&typeof _0x6152bf===_0x476fda(0x171)&&_0x476fda(0x191)in _0x6152bf&&typeof _0x6152bf[_0x476fda(0x191)]===_0x476fda(0x17f)){const _0x28144f=_0x6152bf;if(!_0x28144f[_0x476fda(0x191)])throw CliErrors[_0x476fda(0x135)](_0x28144f['errorMsg']||_0x28144f[_0x476fda(0x16d)]||'Toolbox\x20API\x20error',_0x28144f['errorCode']?_0x476fda(0x120)+_0x28144f[_0x476fda(0x121)]:undefined);return _0x28144f[_0x476fda(0x143)];}return _0x6152bf;}catch(_0x467c72){if(_0x467c72 instanceof Error&&_0x467c72[_0x476fda(0x13b)]===_0x476fda(0x13d))throw CliErrors['apiError'](_0x476fda(0x131)+_0x5017a0['toString']());throw _0x467c72;}finally{clearTimeout(_0x542d79);}}async function skillHubJsonRequest(_0x2c2543,_0x411d04={}){const _0xcd2a87=a69_0x52b7,{method:method=_0xcd2a87(0x178),query:_0x26c766,body:_0x13d794,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x411d04,_0x4a4822=_activeAK;if(!_0x4a4822)throw CliErrors[_0xcd2a87(0x16b)](_0xcd2a87(0x16f)+PRODUCT_CONFIG[_0xcd2a87(0x184)]+'.');const _0x26c2fd=getSkillHubDomain()[_0xcd2a87(0x16a)](/\/$/,''),_0x2432c2=new URL(_0x2c2543,_0x26c2fd+'/');if(_0x26c766)for(const [_0x3fd890,_0x299d6d]of Object['entries'](_0x26c766)){_0x299d6d!==undefined&&_0x299d6d!==null&&_0x2432c2['searchParams']['set'](_0x3fd890,String(_0x299d6d));}const _0x478357=new AbortController(),_0xefa45f=setTimeout(()=>_0x478357[_0xcd2a87(0x12c)](),timeout);try{const _0x394041=await fetch(_0x2432c2[_0xcd2a87(0x151)](),{'method':method,'headers':{'Accept':_0xcd2a87(0x145),'X-Invoke-Source':PRODUCT_CONFIG[_0xcd2a87(0x164)],'X-User-AK':_0x4a4822,...headers},'body':_0x13d794,'signal':_0x478357[_0xcd2a87(0x125)]});let _0x5775eb;try{_0x5775eb=await _0x394041['json']();}catch{if(allowNotFound&&_0x394041['status']===0x194)return undefined;throw CliErrors[_0xcd2a87(0x135)](_0xcd2a87(0x17e)+_0x394041[_0xcd2a87(0x163)]+')',_0x394041[_0xcd2a87(0x163)]>=0x190?_0xcd2a87(0x124):undefined);}if(allowNotFound&&(_0x394041[_0xcd2a87(0x163)]===0x194||_0x5775eb?.[_0xcd2a87(0x173)]===0x194))return undefined;const _0x4ed99f=!_0x394041['ok']||_0x5775eb?.['success']===![]||typeof _0x5775eb?.[_0xcd2a87(0x173)]==='number'&&_0x5775eb[_0xcd2a87(0x173)]>=0x190;if(_0x4ed99f)throw CliErrors[_0xcd2a87(0x135)](_0x5775eb?.['errorMsg']||_0x5775eb?.[_0xcd2a87(0x16d)]||_0x5775eb?.[_0xcd2a87(0x183)]||_0xcd2a87(0x181)+_0x394041[_0xcd2a87(0x163)],_0x5775eb?.[_0xcd2a87(0x121)]?_0xcd2a87(0x122)+_0x5775eb[_0xcd2a87(0x121)]:undefined);return _0x5775eb?.[_0xcd2a87(0x143)]??_0x5775eb;}catch(_0xfdbc94){if(_0xfdbc94 instanceof Error&&_0xfdbc94[_0xcd2a87(0x13b)]===_0xcd2a87(0x13d))throw CliErrors[_0xcd2a87(0x135)](_0xcd2a87(0x131)+_0x2432c2[_0xcd2a87(0x151)]());throw _0xfdbc94;}finally{clearTimeout(_0xefa45f);}}async function skillHubBinaryRequest(_0x59182a,_0x1e6baa={}){const _0x1e1176=a69_0x52b7,{query:_0x29c1ac,headers:headers={},timeout:timeout=0x7530}=_0x1e6baa,_0x47d750=_activeAK;if(!_0x47d750)throw CliErrors['authRequired'](_0x1e1176(0x16f)+PRODUCT_CONFIG[_0x1e1176(0x184)]+'.');const _0x124b63=getSkillHubDomain()[_0x1e1176(0x16a)](/\/$/,''),_0x12a1bf=new URL(_0x59182a,_0x124b63+'/');if(_0x29c1ac)for(const [_0xc7d45f,_0x552ca8]of Object[_0x1e1176(0x176)](_0x29c1ac)){_0x552ca8!==undefined&&_0x552ca8!==null&&_0x12a1bf[_0x1e1176(0x18a)][_0x1e1176(0x153)](_0xc7d45f,String(_0x552ca8));}const _0x16d982=new AbortController(),_0xf9d2f=setTimeout(()=>_0x16d982['abort'](),timeout);try{const _0x23051b=await fetch(_0x12a1bf[_0x1e1176(0x151)](),{'method':_0x1e1176(0x178),'headers':{'Accept':_0x1e1176(0x146),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x47d750,...headers},'signal':_0x16d982['signal']});if(!_0x23051b['ok']){let _0x1d4fad;try{const _0x127808=await _0x23051b[_0x1e1176(0x17c)]();_0x1d4fad=_0x127808[_0x1e1176(0x127)]||_0x127808['message']||_0x127808[_0x1e1176(0x183)]||_0x127808[_0x1e1176(0x121)];}catch{_0x1d4fad=await _0x23051b['text']()[_0x1e1176(0x179)](()=>undefined);}throw CliErrors[_0x1e1176(0x135)](_0x1d4fad||'SkillHub\x20API\x20error:\x20'+_0x23051b[_0x1e1176(0x163)],_0x1e1176(0x152)+_0x12a1bf[_0x1e1176(0x151)]());}return Buffer[_0x1e1176(0x186)](await _0x23051b[_0x1e1176(0x117)]());}catch(_0x555668){if(_0x555668 instanceof Error&&_0x555668[_0x1e1176(0x13b)]===_0x1e1176(0x13d))throw CliErrors['apiError'](_0x1e1176(0x131)+_0x12a1bf[_0x1e1176(0x151)]());throw _0x555668;}finally{clearTimeout(_0xf9d2f);}}export async function getBffScriptInfo(_0x579638){const _0x4d4ca0=a69_0x52b7,_0x3fcf03=await apiRequest(_0x4d4ca0(0x188)+_0x579638);if(!_0x3fcf03[_0x4d4ca0(0x143)])throw CliErrors[_0x4d4ca0(0x170)]('BFF\x20script\x20not\x20found:\x20id='+_0x579638);return _0x3fcf03['data'];}export async function getSqlQueryInfo(_0x549fce,_0x21d4d9){const _0x48ecfd=a69_0x52b7,_0x1eaf5f=await apiRequest(_0x48ecfd(0x13c),{'method':_0x48ecfd(0x12b),'body':{'appCode':_0x549fce,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x21d4d9}}),_0x291905=_0x1eaf5f[_0x48ecfd(0x143)],_0x3a49ba=_0x291905&&typeof _0x291905===_0x48ecfd(0x171)&&_0x48ecfd(0x160)in _0x291905?_0x291905['tableData']?.[0x0]:_0x291905&&typeof _0x291905===_0x48ecfd(0x171)&&_0x48ecfd(0x11f)in _0x291905?_0x291905:undefined;if(!_0x3a49ba)throw CliErrors['validation'](_0x48ecfd(0x194)+_0x21d4d9);return _0x3a49ba;}function isRemoteAppItem(_0x1b8f7e){const _0x4b5b37=a69_0x52b7;return!!_0x1b8f7e&&typeof _0x1b8f7e==='object'&&typeof _0x1b8f7e['appCode']===_0x4b5b37(0x18b)&&typeof _0x1b8f7e[_0x4b5b37(0x189)]===_0x4b5b37(0x18b);}function extractRemoteAppItems(_0x5c0745){const _0x14cd70=a69_0x52b7;if(Array[_0x14cd70(0x17d)](_0x5c0745))return _0x5c0745[_0x14cd70(0x15b)](isRemoteAppItem);if(!_0x5c0745||typeof _0x5c0745!==_0x14cd70(0x171))throw CliErrors['apiError']('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x169352=_0x5c0745;if(Array[_0x14cd70(0x17d)](_0x169352['tableData']))return _0x169352[_0x14cd70(0x160)][_0x14cd70(0x15b)](isRemoteAppItem);if(_0x169352[_0x14cd70(0x143)]&&typeof _0x169352['data']===_0x14cd70(0x171)){const _0x3a2c25=_0x169352[_0x14cd70(0x143)];if(Array[_0x14cd70(0x17d)](_0x3a2c25['tableData']))return _0x3a2c25['tableData'][_0x14cd70(0x15b)](isRemoteAppItem);}throw CliErrors['apiError'](_0x14cd70(0x157));}function a69_0x3013(){const _0x1ce84f=['toString','Download\x20failed:\x20','set','all','ownerPreviewVersion','/client/dataset/list','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','tags','summary','62642EdlXxo','filter','artifactType','.zip','namespace','stringify','tableData','/client/artifact/create','topK','status','invokeSource','items','/api/node-toolbox/','1248309oTMrax','toLowerCase','/client/runtime-bff/personal/create','replace','authRequired','/execute?appCode=','message','/download','Configure\x20accessKey\x20in\x20','validation','object','Personal\x20BFF\x20not\x20found:\x20id=','code','4aECPVg','926284rAdOwp','entries','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','GET','catch','valid','813636LoBwJo','json','isArray','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','boolean','/versions/','SkillHub\x20API\x20error:\x20','confirmWarnings','msg','newConfigFileName','base64','from','/client/knowledge-base/personal/','/client/bff/query/','appName','searchParams','string','skillCode','/publish/validate','/client/dataset/get-driven-data?code=','values','API\x20error:\x20','success','description','slug','SQL\x20query\x20not\x20found:\x20','5LmkonT','/client/user/loginUserInfo','Artifact\x20not\x20found:\x20id=','1330595REgWhw','arrayBuffer','version','/client/knowledge-base/personal/list?appCode=','App\x20config\x20not\x20found:\x20key=','content','/skills','/client/artifact/','/api/v1/skills/','sqlCode','Toolbox\x20error\x20code:\x20','errorCode','SkillHub\x20error\x20code:\x20','/api/cli/v1/skills/','Check\x20your\x20credentials\x20and\x20try\x20again.','signal','/publish','errorMsg','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','personal','PRIVATE','POST','abort','resolvedVersion','Toolbox\x20API\x20error:\x20','trim','Missing\x20Skill\x20package\x20payload.','Request\x20timeout:\x20','favorite','Knowledge-base\x20entry\x20not\x20found:\x20id=','headlineVersion','apiError','?appCode=','NAMESPACE_ONLY','displayName','visibility','application/zip','name','/client/sql/query','AbortError','skillName','/client/knowledge-base/personal/create','resolvedSlug','appCode','packageBase64','data','2336364JWPFFx','application/json','application/octet-stream','/update','/client/artifact/list?','/client/runtime-bff/personal/','errors','scope','source','api-doc-generator','company','50488PhytLq','warnings'];a69_0x3013=function(){return _0x1ce84f;};return a69_0x3013();}export async function getMyApps(){const _0x376412=a69_0x52b7,_0x56a04e=await apiRequest('/client/app/my-apps');return extractRemoteAppItems(_0x56a04e[_0x376412(0x143)]);}export async function getLoginUserInfo(){const _0x237049=a69_0x52b7,_0xd9da8b=await apiRequest(_0x237049(0x196));if(!_0xd9da8b[_0x237049(0x143)]||typeof _0xd9da8b[_0x237049(0x143)]!=='object'||Array[_0x237049(0x17d)](_0xd9da8b['data']))throw CliErrors[_0x237049(0x135)](_0x237049(0x128));return _0xd9da8b['data'];}export async function listDatasets(_0x31533a,_0x131ca8){const _0x210eb1=a69_0x52b7,_0x358657=await apiRequest(_0x210eb1(0x156),{'method':'POST','body':{'appCode':_0x31533a,..._0x131ca8?.[_0x210eb1(0x173)]&&{'code':_0x131ca8[_0x210eb1(0x173)]},..._0x131ca8?.[_0x210eb1(0x13b)]&&{'name':_0x131ca8[_0x210eb1(0x13b)]}}});return extractList(_0x358657[_0x210eb1(0x143)]);}export async function getDatasetDetail(_0x31302c){const _0x31e037=a69_0x52b7,_0x8490c7=await apiRequest(_0x31e037(0x18e)+encodeURIComponent(_0x31302c));return _0x8490c7[_0x31e037(0x143)];}export async function getDatasetSdkUsageDoc(_0x3efbae,_0x16ef7c){const _0x6f3f3d=a69_0x52b7,_0x5babdc=await toolboxRequest(_0x6f3f3d(0x14d),{'datasetCode':_0x3efbae,'appCode':_0x16ef7c});return typeof _0x5babdc?.['markdown']===_0x6f3f3d(0x18b)?_0x5babdc['markdown']:'';}export async function getRuntimeAppConfigByKey(_0x2b1a1c,_0x373ee7){const _0x543879=a69_0x52b7,_0x3e8b83=new URLSearchParams({'appCode':_0x2b1a1c,'key':_0x373ee7}),_0x258a35=await apiRequest('/client/app-config/getByKey?'+_0x3e8b83[_0x543879(0x151)]());if(!_0x258a35[_0x543879(0x143)])throw CliErrors[_0x543879(0x170)](_0x543879(0x11a)+_0x373ee7);return _0x258a35[_0x543879(0x143)];}export async function listRuntimeArtifacts(_0x4daa5a,_0x3383fe){const _0x35a78c=a69_0x52b7,_0x319d8a=new URLSearchParams({'appCode':_0x4daa5a});if(_0x3383fe?.[_0x35a78c(0x15c)])_0x319d8a['set']('artifactType',_0x3383fe[_0x35a78c(0x15c)]);if(_0x3383fe?.['source'])_0x319d8a[_0x35a78c(0x153)](_0x35a78c(0x14c),_0x3383fe[_0x35a78c(0x14c)]);if(_0x3383fe?.[_0x35a78c(0x132)]!==undefined)_0x319d8a[_0x35a78c(0x153)]('favorite',String(_0x3383fe[_0x35a78c(0x132)]));const _0x550522=await apiRequest(_0x35a78c(0x148)+_0x319d8a[_0x35a78c(0x151)]());return Array[_0x35a78c(0x17d)](_0x550522['data'])?_0x550522[_0x35a78c(0x143)]:[];}export async function getRuntimeArtifact(_0x101543,_0x3669fb){const _0x1f93a6=a69_0x52b7,_0x5008e5=await apiRequest(_0x1f93a6(0x11d)+_0x101543+_0x1f93a6(0x136)+encodeURIComponent(_0x3669fb));if(!_0x5008e5['data'])throw CliErrors['validation'](_0x1f93a6(0x197)+_0x101543);return _0x5008e5[_0x1f93a6(0x143)];}export async function createRuntimeArtifact(_0x35c567,_0xdb1af5){const _0x5abb4c=a69_0x52b7,_0x4e45c3=await apiRequest(_0x5abb4c(0x161),{'method':'POST','body':{'appCode':_0x35c567,..._0xdb1af5}});return _0x4e45c3[_0x5abb4c(0x143)];}export async function updateRuntimeArtifact(_0xcc9ed7,_0x18e008,_0x344e0a){const _0x1a1553=a69_0x52b7,_0x75948d=await apiRequest('/client/artifact/'+_0xcc9ed7+'/update',{'method':_0x1a1553(0x12b),'body':{'appCode':_0x18e008,..._0x344e0a}});return _0x75948d[_0x1a1553(0x143)];}export async function listPersonalBffs(_0x3851a3){const _0x2e35d2=a69_0x52b7,_0x472728=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x3851a3));return Array[_0x2e35d2(0x17d)](_0x472728[_0x2e35d2(0x143)])?_0x472728[_0x2e35d2(0x143)]:[];}export async function getPersonalBff(_0xd30289,_0x3af178){const _0x19565e=a69_0x52b7,_0x1d85e0=await apiRequest(_0x19565e(0x149)+_0xd30289+_0x19565e(0x136)+encodeURIComponent(_0x3af178));if(!_0x1d85e0['data'])throw CliErrors[_0x19565e(0x170)](_0x19565e(0x172)+_0xd30289);return _0x1d85e0['data'];}export async function createPersonalBff(_0x3bcbae,_0x1633b1){const _0x1eadb0=a69_0x52b7,_0xfdf9e1=await apiRequest(_0x1eadb0(0x169),{'method':'POST','body':{'appCode':_0x3bcbae,..._0x1633b1}});return _0xfdf9e1[_0x1eadb0(0x143)];}export async function updatePersonalBff(_0x2b8d3f,_0x189dd7,_0x2d3f03){const _0x162406=a69_0x52b7,_0x14af64=await apiRequest(_0x162406(0x149)+_0x2b8d3f+'/update',{'method':_0x162406(0x12b),'body':{'appCode':_0x189dd7,..._0x2d3f03}});return _0x14af64['data'];}export async function executePersonalBff(_0x1ece85,_0x29b547,_0x4875a2){const _0x29961d=a69_0x52b7,_0x5f23fa=await apiRequest(_0x29961d(0x149)+_0x1ece85+_0x29961d(0x16c)+encodeURIComponent(_0x29b547),{'method':_0x29961d(0x12b),'body':_0x4875a2});return _0x5f23fa[_0x29961d(0x143)];}export async function listPersonalKnowledgeBaseItems(_0x33aa96){const _0x49f9a3=a69_0x52b7,_0x248fb7=await apiRequest(_0x49f9a3(0x119)+encodeURIComponent(_0x33aa96));return Array[_0x49f9a3(0x17d)](_0x248fb7['data'])?_0x248fb7['data']:[];}export async function getPersonalKnowledgeBaseItem(_0x3b890a,_0x426e1c){const _0x5e378f=a69_0x52b7,_0x2f4027=await apiRequest(_0x5e378f(0x187)+_0x3b890a+'?appCode='+encodeURIComponent(_0x426e1c));if(!_0x2f4027[_0x5e378f(0x143)])throw CliErrors['validation'](_0x5e378f(0x133)+_0x3b890a);return _0x2f4027['data'];}export async function createPersonalKnowledgeBaseItem(_0x1bf0e4,_0x10378a){const _0x3d9b61=a69_0x52b7,_0x3a247e=await apiRequest(_0x3d9b61(0x13f),{'method':_0x3d9b61(0x12b),'body':{'appCode':_0x1bf0e4,..._0x10378a}});return _0x3a247e[_0x3d9b61(0x143)];}export async function updatePersonalKnowledgeBaseItem(_0x24165,_0x371fda,_0x43d3a1){const _0x525acf=a69_0x52b7,_0x45b69a=await apiRequest('/client/knowledge-base/personal/'+_0x24165+_0x525acf(0x147),{'method':_0x525acf(0x12b),'body':{'appCode':_0x371fda,..._0x43d3a1}});return _0x45b69a[_0x525acf(0x143)];}export async function searchKnowledgeBase(_0x3ec2cd,_0x483d6a){const _0x2b4d22=a69_0x52b7,_0x51bed8=await apiRequest('/client/knowledge-base/search',{'method':_0x2b4d22(0x12b),'body':{'appCode':_0x3ec2cd,'query':_0x483d6a['query'],..._0x483d6a[_0x2b4d22(0x162)]!==undefined?{'topK':_0x483d6a[_0x2b4d22(0x162)]}:{}}});return Array[_0x2b4d22(0x17d)](_0x51bed8[_0x2b4d22(0x143)])?_0x51bed8[_0x2b4d22(0x143)]:[];}export async function getRuntimeSkillByCode(_0x14a02c,_0x2e1013){const _0x47ce9f=a69_0x52b7,_0x46596a=await skillHubJsonRequest(_0x47ce9f(0x11e)+encodeURIComponent(_0x14a02c)+'/'+encodeURIComponent(_0x2e1013),{'allowNotFound':!![]});return _0x46596a?skillHubRuntimeDetailToRuntimeSkill(_0x46596a):undefined;}export async function listRuntimeSkills(_0x6c5a1b){const _0x4c9c58=a69_0x52b7,_0x127413=await skillHubJsonRequest('/api/runtime/v1/namespaces/'+encodeURIComponent(_0x6c5a1b['appCode'])+_0x4c9c58(0x11c),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x6c5a1b[_0x4c9c58(0x141)],_0x127413,_0x6c5a1b['scope']??_0x4c9c58(0x154),_0x6c5a1b[_0x4c9c58(0x173)]);}export async function listPersonalRuntimeSkills(_0x58d396){const _0x1939f2=a69_0x52b7;return(await listRuntimeSkills({'appCode':_0x58d396,'scope':_0x1939f2(0x129)}))['personal'];}export async function listCompanyRuntimeSkills(_0x226ac7){const _0x505dcf=a69_0x52b7;return(await listRuntimeSkills({'appCode':_0x226ac7,'scope':_0x505dcf(0x14e)}))['company'];}export async function listVisibleRuntimeSkills(_0x5b217a){const _0x25e414=a69_0x52b7;return(await listRuntimeSkills({'appCode':_0x5b217a,'scope':_0x25e414(0x154)}))['effective'];}export async function createPersonalRuntimeSkill(_0xef5b79,_0xedf81b){const _0x43b7a4=a69_0x52b7;return publishRuntimeSkill(_0xef5b79,_0xedf81b,{'visibility':_0x43b7a4(0x12a)});}export async function updatePersonalRuntimeSkill(_0x563713,_0x6f6a3f,_0x4e0c6f){const _0x4655af=a69_0x52b7;return publishRuntimeSkill(_0x6f6a3f,{..._0x4e0c6f,'skillCode':_0x4e0c6f[_0x4655af(0x18c)]??_0x563713},{'visibility':_0x4655af(0x12a)});}export async function publishCompanyRuntimeSkill(_0x389b50,_0x3b9068,_0x5af6e4={}){const _0x26bc1d=a69_0x52b7;return publishRuntimeSkill(_0x389b50,_0x3b9068,{'visibility':_0x26bc1d(0x137),'confirmWarnings':_0x5af6e4[_0x26bc1d(0x182)]});}function a69_0x52b7(_0x5ac027,_0x1e4314){_0x5ac027=_0x5ac027-0x117;const _0x3013c1=a69_0x3013();let _0x52b709=_0x3013c1[_0x5ac027];return _0x52b709;}export async function validateRuntimeSkillPublish(_0x2cb050,_0xd408f,_0x266c11){const _0x2daf36=a69_0x52b7,_0x139d74=buildRuntimeSkillPublishForm(_0xd408f,_0x266c11[_0x2daf36(0x139)]),_0x4407f1=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x2cb050)+_0x2daf36(0x18d),{'method':_0x2daf36(0x12b),'body':_0x139d74});return{'valid':_0x4407f1[_0x2daf36(0x17a)]===!![],'errors':Array[_0x2daf36(0x17d)](_0x4407f1[_0x2daf36(0x14a)])?_0x4407f1['errors']:[],'warnings':Array[_0x2daf36(0x17d)](_0x4407f1['warnings'])?_0x4407f1[_0x2daf36(0x150)]:[],'resolvedSlug':_0x4407f1[_0x2daf36(0x140)],'resolvedVersion':_0x4407f1[_0x2daf36(0x12d)]};}export async function downloadRuntimeSkillPackage(_0x3c27af,_0x48d60b,_0x3e5b23,_0x4ccfb6){const _0xa20ead=a69_0x52b7;void _0x3c27af;const _0x54cc29=_0x4ccfb6?_0xa20ead(0x123)+encodeURIComponent(_0x3e5b23)+'/'+encodeURIComponent(_0x48d60b)+_0xa20ead(0x180)+encodeURIComponent(_0x4ccfb6)+_0xa20ead(0x16e):_0xa20ead(0x123)+encodeURIComponent(_0x3e5b23)+'/'+encodeURIComponent(_0x48d60b)+_0xa20ead(0x16e);return skillHubBinaryRequest(_0x54cc29);}async function publishRuntimeSkill(_0x3b2c52,_0x20b635,_0x1e0eee){const _0x2e7a3e=a69_0x52b7,_0x167947=buildRuntimeSkillPublishForm(_0x20b635,_0x1e0eee[_0x2e7a3e(0x139)]),_0xf3d88c=await skillHubJsonRequest(_0x2e7a3e(0x123)+encodeURIComponent(_0x3b2c52)+_0x2e7a3e(0x126),{'method':_0x2e7a3e(0x12b),'query':{'confirmWarnings':_0x1e0eee['confirmWarnings']===!![]?!![]:undefined},'body':_0x167947});return{'appCode':_0xf3d88c[_0x2e7a3e(0x15e)]??_0x3b2c52,'skillCode':_0xf3d88c[_0x2e7a3e(0x193)]??_0x20b635[_0x2e7a3e(0x18c)]??'','skillName':_0x20b635[_0x2e7a3e(0x13e)]??_0xf3d88c[_0x2e7a3e(0x193)]??_0x20b635[_0x2e7a3e(0x18c)],'description':_0x20b635[_0x2e7a3e(0x192)],'scope':skillHubVisibilityToScope(_0xf3d88c[_0x2e7a3e(0x139)]??_0x1e0eee[_0x2e7a3e(0x139)])??_0x2e7a3e(0x129),'version':_0xf3d88c[_0x2e7a3e(0x118)]??_0x20b635[_0x2e7a3e(0x118)],'tags':_0x20b635[_0x2e7a3e(0x158)],'content':_0x20b635[_0x2e7a3e(0x11b)]};}function buildRuntimeSkillPublishForm(_0xece5e9,_0xf734f5){const _0x1847cc=a69_0x52b7,_0x4e7b5f=new FormData();return _0x4e7b5f[_0x1847cc(0x153)]('file',runtimeSkillPackageFile(_0xece5e9)),_0x4e7b5f['set'](_0x1847cc(0x139),_0xf734f5),_0x4e7b5f;}function runtimeSkillPackageFile(_0x3d12c8){const _0x29d588=a69_0x52b7;if(!_0x3d12c8[_0x29d588(0x142)])throw CliErrors[_0x29d588(0x170)](_0x29d588(0x130));const _0x48dfa7=Buffer[_0x29d588(0x186)](_0x3d12c8['packageBase64'],_0x29d588(0x185)),_0x2b6c82=new Blob([_0x48dfa7],{'type':_0x29d588(0x13a)}),_0x46d268=(_0x3d12c8[_0x29d588(0x18c)]||'skill')+_0x29d588(0x15d);if(typeof File!=='undefined')return new File([_0x2b6c82],_0x46d268,{'type':_0x29d588(0x13a)});return _0x2b6c82;}function normalizeSkillHubRuntimeListResponse(_0x502220,_0x571b29,_0x223438,_0x13ee33){const _0x18873b=a69_0x52b7,_0x8b5dfc=Array['isArray'](_0x571b29)?_0x571b29:Array['isArray'](_0x571b29?.[_0x18873b(0x165)])?_0x571b29[_0x18873b(0x165)]:[],_0x11b149=_0x13ee33?.[_0x18873b(0x12f)](),_0x31f63f=_0x8b5dfc[_0x18873b(0x15b)](_0x167884=>!_0x11b149||_0x167884[_0x18873b(0x193)]===_0x11b149)['map'](skillHubRuntimeItemToRuntimeSkill)[_0x18873b(0x15b)](_0x22b0d0=>Boolean(_0x22b0d0)),_0x372120=_0x31f63f[_0x18873b(0x15b)](_0x522074=>_0x522074['scope']===_0x18873b(0x129)),_0x58bf6c=_0x31f63f[_0x18873b(0x15b)](_0x5da5cf=>_0x5da5cf['scope']==='company');return{'appCode':_0x502220,'personal':_0x223438===_0x18873b(0x14e)?[]:_0x372120,'company':_0x223438===_0x18873b(0x129)?[]:_0x58bf6c,'effective':buildEffectiveRuntimeSkills(_0x372120,_0x58bf6c,_0x223438)};}function skillHubRuntimeItemToRuntimeSkill(_0x52002f){const _0x1afaac=a69_0x52b7,_0x3ffab5=_0x52002f['slug']?.[_0x1afaac(0x12f)](),_0x328805=skillHubVisibilityToScope(_0x52002f['visibility']);if(!_0x3ffab5||!_0x328805)return undefined;return{'id':_0x52002f['id'],'appCode':_0x52002f[_0x1afaac(0x15e)],'skillCode':_0x3ffab5,'skillName':_0x52002f['displayName']??_0x3ffab5,'description':_0x52002f['summary'],'scope':_0x328805,'version':skillHubRuntimeItemVersion(_0x52002f),'status':_0x52002f[_0x1afaac(0x163)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x41cf05){const _0x3c30af=a69_0x52b7,_0x9308d2=_0x41cf05['slug']?.[_0x3c30af(0x12f)]();if(!_0x9308d2)return undefined;return{'id':_0x41cf05['id'],'appCode':_0x41cf05[_0x3c30af(0x15e)],'skillCode':_0x9308d2,'skillName':_0x41cf05[_0x3c30af(0x138)]??_0x9308d2,'description':_0x41cf05[_0x3c30af(0x159)],'scope':skillHubVisibilityToScope(_0x41cf05[_0x3c30af(0x139)])??_0x41cf05[_0x3c30af(0x139)]?.[_0x3c30af(0x168)](),'version':skillHubRuntimeItemVersion(_0x41cf05),'status':_0x41cf05[_0x3c30af(0x163)]};}function skillHubVisibilityToScope(_0x12b27b){const _0x34f7b3=a69_0x52b7;if(_0x12b27b===_0x34f7b3(0x12a))return _0x34f7b3(0x129);if(_0x12b27b==='NAMESPACE_ONLY')return _0x34f7b3(0x14e);return undefined;}function skillHubRuntimeItemVersion(_0x60a6eb){const _0xcea598=a69_0x52b7;return _0x60a6eb['publishedVersion']?.[_0xcea598(0x118)]??_0x60a6eb[_0xcea598(0x134)]?.[_0xcea598(0x118)]??_0x60a6eb[_0xcea598(0x155)]?.[_0xcea598(0x118)];}function buildEffectiveRuntimeSkills(_0x3e7032,_0x478f3a,_0x42be8a){const _0x3050ba=a69_0x52b7;if(_0x42be8a===_0x3050ba(0x129))return _0x3e7032;if(_0x42be8a===_0x3050ba(0x14e))return _0x478f3a;const _0x102cf7=new Map();for(const _0x41929f of _0x478f3a){_0x102cf7[_0x3050ba(0x153)](_0x41929f[_0x3050ba(0x18c)],_0x41929f);}for(const _0x115f26 of _0x3e7032){_0x102cf7['set'](_0x115f26['skillCode'],_0x115f26);}return Array[_0x3050ba(0x186)](_0x102cf7[_0x3050ba(0x18f)]());}function normalizeRuntimeSkillListResponse(_0x5e3885,_0x33a9a0){const _0x4a8607=a69_0x52b7;if(Array[_0x4a8607(0x17d)](_0x33a9a0)){const _0x18b3bf=_0x33a9a0[_0x4a8607(0x15b)](_0x365612=>_0x365612[_0x4a8607(0x14b)]===_0x4a8607(0x129)),_0x5a57aa=_0x33a9a0[_0x4a8607(0x15b)](_0x33ef7d=>_0x33ef7d[_0x4a8607(0x14b)]==='company');return{'appCode':_0x5e3885,'personal':_0x18b3bf,'company':_0x5a57aa,'effective':[..._0x5a57aa,..._0x18b3bf]};}return{'appCode':_0x33a9a0?.[_0x4a8607(0x141)]??_0x5e3885,'personal':Array[_0x4a8607(0x17d)](_0x33a9a0?.[_0x4a8607(0x129)])?_0x33a9a0['personal']:[],'company':Array[_0x4a8607(0x17d)](_0x33a9a0?.[_0x4a8607(0x14e)])?_0x33a9a0[_0x4a8607(0x14e)]:[],'effective':Array['isArray'](_0x33a9a0?.['effective'])?_0x33a9a0['effective']:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2f0615,_0x3c2bfa){const _0x1f0ea7=a70_0x2250,_0x49f4ea=_0x2f0615();while(!![]){try{const _0x2ed57a=parseInt(_0x1f0ea7(0x7f))/0x1*(-parseInt(_0x1f0ea7(0x79))/0x2)+parseInt(_0x1f0ea7(0x72))/0x3*(parseInt(_0x1f0ea7(0x73))/0x4)+-parseInt(_0x1f0ea7(0x75))/0x5*(parseInt(_0x1f0ea7(0x7a))/0x6)+-parseInt(_0x1f0ea7(0x80))/0x7+parseInt(_0x1f0ea7(0x7b))/0x8+parseInt(_0x1f0ea7(0x7d))/0x9*(parseInt(_0x1f0ea7(0x7e))/0xa)+parseInt(_0x1f0ea7(0x82))/0xb;if(_0x2ed57a===_0x3c2bfa)break;else _0x49f4ea['push'](_0x49f4ea['shift']());}catch(_0x97d7ff){_0x49f4ea['push'](_0x49f4ea['shift']());}}}(a70_0x4fdc,0x731c3));function a70_0x4fdc(){const _0x24fc55=['1130847aIhNQJ','8hFeCIq','dbName','603755FQyokg','set','map','find','2402ZoUhyY','18KMlGwf','5671088eaSkiQ','dbId','231327oWZBwK','70mRMKcQ','469BsMZVO','2178428MLeMyt','entries','720632FHCEKe','get','db-'];a70_0x4fdc=function(){return _0x24fc55;};return a70_0x4fdc();}import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x440ee7){const _0x127317=a70_0x2250;if(cache['has'](_0x440ee7))return cache[_0x127317(0x70)](_0x440ee7);const _0x5b8eaf=await listDatasets(_0x440ee7),_0xda0595=new Map();for(const _0x2ba642 of _0x5b8eaf){const _0x3acd60=_0x2ba642['dbtableConfig'];_0x3acd60?.[_0x127317(0x7c)]!=null&&_0xda0595[_0x127317(0x76)](_0x3acd60[_0x127317(0x7c)],_0x3acd60['dbName']??_0x127317(0x71)+_0x3acd60['dbId']);}const _0xd2d84a=[..._0xda0595[_0x127317(0x81)]()][_0x127317(0x77)](([_0x102e47,_0x2148f5])=>({'dbId':_0x102e47,'dbName':_0x2148f5}));return cache[_0x127317(0x76)](_0x440ee7,_0xd2d84a),_0xd2d84a;}function a70_0x2250(_0x245baa,_0x2fda6d){_0x245baa=_0x245baa-0x70;const _0x4fdc8c=a70_0x4fdc();let _0x22509f=_0x4fdc8c[_0x245baa];return _0x22509f;}export async function getDbName(_0x169ed5,_0x58f024){const _0x4f1a07=a70_0x2250;try{const _0xcdc522=await listDatabases(_0x169ed5);return _0xcdc522[_0x4f1a07(0x78)](_0x59bf0a=>_0x59bf0a['dbId']===_0x58f024)?.[_0x4f1a07(0x74)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf0c20c,_0x192e7a){const _0x524244=a71_0x3d7a,_0x3f5656=_0xf0c20c();while(!![]){try{const _0x2df6ac=-parseInt(_0x524244(0x150))/0x1*(-parseInt(_0x524244(0x14d))/0x2)+-parseInt(_0x524244(0x146))/0x3*(parseInt(_0x524244(0x158))/0x4)+parseInt(_0x524244(0x15b))/0x5+parseInt(_0x524244(0x15f))/0x6+-parseInt(_0x524244(0x152))/0x7*(-parseInt(_0x524244(0x163))/0x8)+parseInt(_0x524244(0x157))/0x9*(parseInt(_0x524244(0x14c))/0xa)+parseInt(_0x524244(0x142))/0xb*(-parseInt(_0x524244(0x165))/0xc);if(_0x2df6ac===_0x192e7a)break;else _0x3f5656['push'](_0x3f5656['shift']());}catch(_0x1b4b90){_0x3f5656['push'](_0x3f5656['shift']());}}}(a71_0x975b,0x8aec5));import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';function a71_0x975b(){const _0x4d69d3=['map','isArray','5023925uXLRyN','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','getOne',']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.','3452814DVizQl','execute','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','sql','441648fXyaaf','column','6222252gbfPQZ','env','accessKey','delete','44bOscay','dataset_','appCode','authMode','3395559gnoCxC','trim','aggregate','models','field','function','208450CsHyaJ','78tJRXXa','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','\x22.\x20','14919YjuqsO','bff','112JomMqi','invokeSource','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','validation','batchCreate','315amvWOp','4TWIIRH'];a71_0x975b=function(){return _0x4d69d3;};return a71_0x975b();}import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x2a3a17){const _0x508225=a71_0x3d7a;_client=createClient({'appCode':_0x2a3a17[_0x508225(0x144)],'env':_0x2a3a17[_0x508225(0x166)],'authMode':_0x2a3a17[_0x508225(0x145)],..._0x2a3a17[_0x508225(0x167)]?{'accessKey':_0x2a3a17[_0x508225(0x167)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x508225(0x153)]}}});}function ensureClient(){const _0x260701=a71_0x3d7a;if(!_client)throw new Error(_0x260701(0x14e));return _client;}function normalizeAggregateParams(_0x3eabe7){const _0x1bf6f6=a71_0x3d7a,_0x5e0c20=_0x3eabe7['aggregate'];if(_0x5e0c20===undefined)return _0x3eabe7;if(!Array[_0x1bf6f6(0x15a)](_0x5e0c20))throw CliErrors[_0x1bf6f6(0x155)]('data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.');return{..._0x3eabe7,'aggregate':_0x5e0c20[_0x1bf6f6(0x159)]((_0x2d1184,_0x55783c)=>{const _0x9aad23=_0x1bf6f6;if(!_0x2d1184||typeof _0x2d1184!=='object'||Array[_0x9aad23(0x15a)](_0x2d1184))throw CliErrors[_0x9aad23(0x155)]('data\x20aggregate\x20--params.aggregate['+_0x55783c+']\x20must\x20be\x20an\x20object.');const _0x341229=_0x2d1184[_0x9aad23(0x164)]??_0x2d1184[_0x9aad23(0x14a)];if(typeof _0x341229!=='string'||_0x341229[_0x9aad23(0x147)]()==='')throw CliErrors['validation']('data\x20aggregate\x20--params.aggregate['+_0x55783c+_0x9aad23(0x15e));const _0x23dedf={..._0x2d1184,'column':_0x341229};return delete _0x23dedf['field'],_0x23dedf;})};}export async function executeData(_0x2b6396,_0x1f226d,_0x1d08d8){const _0x596c56=a71_0x3d7a,_0x161165=ensureClient(),_0x44bced=_0x596c56(0x143)+_0x2b6396,_0x2bcead=_0x161165[_0x596c56(0x149)][_0x44bced];if(!_0x2bcead||typeof _0x2bcead[_0x1f226d]!==_0x596c56(0x14b))throw new Error(_0x596c56(0x161)+_0x1f226d+_0x596c56(0x14f)+_0x596c56(0x15c));if(_0x1f226d===_0x596c56(0x156))return _0x2bcead[_0x596c56(0x156)](parseBatchCreateItemsFromParams(_0x1d08d8));const _0x26ca73=_0x1d08d8!==undefined&&_0x1d08d8!==null&&!Array[_0x596c56(0x15a)](_0x1d08d8)?_0x1d08d8:{};switch(_0x1f226d){case _0x596c56(0x15d):{const _0x3afe62=_0x26ca73['id'];if(_0x3afe62===undefined||_0x3afe62===null)throw new Error('getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0x2bcead['getOne'](_0x3afe62);}case'update':{const {id:_0x2627d5,..._0x143f1f}=_0x26ca73;if(_0x2627d5===undefined||_0x2627d5===null)throw new Error('update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27');return _0x2bcead['update'](_0x2627d5,_0x143f1f);}case _0x596c56(0x141):{const _0x5f16a2=_0x26ca73['id'];if(_0x5f16a2===undefined||_0x5f16a2===null)throw new Error(_0x596c56(0x154));return _0x2bcead[_0x596c56(0x141)](_0x5f16a2);}case'aggregate':return _0x2bcead[_0x596c56(0x148)](normalizeAggregateParams(_0x26ca73));default:return _0x2bcead[_0x1f226d](_0x26ca73);}}function a71_0x3d7a(_0x665b0e,_0x148585){_0x665b0e=_0x665b0e-0x141;const _0x975b8e=a71_0x975b();let _0x3d7ac7=_0x975b8e[_0x665b0e];return _0x3d7ac7;}export async function executeSdkSql(_0x56b753,_0x43dd02){const _0x967573=a71_0x3d7a,_0x36bfed=ensureClient();return _0x36bfed[_0x967573(0x162)][_0x967573(0x160)]({'sqlCode':_0x56b753,'params':_0x43dd02});}export async function executeSdkBff(_0x397c72,_0xee945d){const _0x49b226=a71_0x3d7a,_0x50e7a0=ensureClient();return _0x50e7a0[_0x49b226(0x151)]['execute']({'scriptName':_0x397c72,'params':_0xee945d});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x34ee55=a72_0x5827;(function(_0x2056ac,_0x40e5f3){const _0x4c0a01=a72_0x5827,_0x2ff543=_0x2056ac();while(!![]){try{const _0x9bb6bf=parseInt(_0x4c0a01(0xb0))/0x1*(parseInt(_0x4c0a01(0xad))/0x2)+parseInt(_0x4c0a01(0xb2))/0x3+parseInt(_0x4c0a01(0xac))/0x4*(parseInt(_0x4c0a01(0xba))/0x5)+-parseInt(_0x4c0a01(0xb3))/0x6*(parseInt(_0x4c0a01(0xb4))/0x7)+parseInt(_0x4c0a01(0xb7))/0x8+parseInt(_0x4c0a01(0xb9))/0x9+-parseInt(_0x4c0a01(0xb5))/0xa;if(_0x9bb6bf===_0x40e5f3)break;else _0x2ff543['push'](_0x2ff543['shift']());}catch(_0x38702a){_0x2ff543['push'](_0x2ff543['shift']());}}}(a72_0x31ca,0xd2f2e));function a72_0x5827(_0x415982,_0x2260ed){_0x415982=_0x415982-0xac;const _0x31cae5=a72_0x31ca();let _0x5827ad=_0x31cae5[_0x415982];return _0x5827ad;}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';function a72_0x31ca(){const _0x1e8ded=['2XGcgsh','\x20or\x20run\x20`','Configure\x20accessKey\x20in\x20','1718050vAcEpe','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','4161585jGEKhb','6ZslHFm','789187ijmwmz','58886640XFeCeB','newConfigFileName','9843160VuVylj','\x20auth\x20login`.','7391133BPzkjZ','610205dIOqHK','56hbZXGs'];a72_0x31ca=function(){return _0x1e8ded;};return a72_0x31ca();}export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a72_0x34ee55(0xaf)+PRODUCT_CONFIG[a72_0x34ee55(0xb6)]+a72_0x34ee55(0xae)+CLI_BIN_NAME+a72_0x34ee55(0xb8),'configMissingHint':'Set\x20appcode\x20via\x20--appcode\x20or\x20'+PRODUCT_CONFIG[a72_0x34ee55(0xb6)]+'.','notInProjectHint':a72_0x34ee55(0xb1)+PRODUCT_CONFIG[a72_0x34ee55(0xb6)]+'\x20file.'});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d6aa7,_0x3d4b3a){var _0x48db0e=a73_0x45ee,_0x1ba670=_0x4d6aa7();while(!![]){try{var _0x5496c7=-parseInt(_0x48db0e(0x14d))/0x1*(parseInt(_0x48db0e(0x14b))/0x2)+parseInt(_0x48db0e(0x150))/0x3*(-parseInt(_0x48db0e(0x14a))/0x4)+-parseInt(_0x48db0e(0x14f))/0x5*(-parseInt(_0x48db0e(0x152))/0x6)+-parseInt(_0x48db0e(0x14e))/0x7+parseInt(_0x48db0e(0x148))/0x8+parseInt(_0x48db0e(0x151))/0x9*(parseInt(_0x48db0e(0x149))/0xa)+parseInt(_0x48db0e(0x14c))/0xb;if(_0x5496c7===_0x3d4b3a)break;else _0x1ba670['push'](_0x1ba670['shift']());}catch(_0x22e787){_0x1ba670['push'](_0x1ba670['shift']());}}}(a73_0x9253,0xe5b41));function a73_0x45ee(_0x526297,_0x924fa0){_0x526297=_0x526297-0x148;var _0x92532d=a73_0x9253();var _0x45ee64=_0x92532d[_0x526297];return _0x45ee64;}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a73_0xf9bec0}from'@lovrabet/cli-framework';function a73_0x9253(){var _0x5bdafe=['34454046hsmCUQ','686363HhFFgp','9275511vrNwNF','3970NILGVl','29031FjsIUA','258453TcRScM','1578lzNNeB','8569960uuhYsp','290SPhVEC','664ylKZqW','4hutSze'];a73_0x9253=function(){return _0x5bdafe;};return a73_0x9253();}export function buildAllFlags(_0x338bb6){return a73_0xf9bec0(_0x338bb6,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2d52b5,_0x1d4878){const _0x1d5550=a74_0x590d,_0x20f91b=_0x2d52b5();while(!![]){try{const _0x3eed50=-parseInt(_0x1d5550(0x12a))/0x1+-parseInt(_0x1d5550(0x120))/0x2*(-parseInt(_0x1d5550(0x123))/0x3)+-parseInt(_0x1d5550(0x128))/0x4*(-parseInt(_0x1d5550(0x126))/0x5)+parseInt(_0x1d5550(0x127))/0x6+-parseInt(_0x1d5550(0x124))/0x7+-parseInt(_0x1d5550(0x122))/0x8+-parseInt(_0x1d5550(0x125))/0x9*(-parseInt(_0x1d5550(0x121))/0xa);if(_0x3eed50===_0x1d4878)break;else _0x20f91b['push'](_0x20f91b['shift']());}catch(_0x2c33fa){_0x20f91b['push'](_0x20f91b['shift']());}}}(a74_0x1ea6,0x9d3ba));function a74_0x1ea6(){const _0x1875ad=['4EXSpaS','description','907782iDYoOj','495182Wejwng','4613530Jzmmrt','9351400lUiNmX','3RKyGVC','4208330kzuYwU','27NRLKYO','5880775EzNYuq','3084708jmKNAQ'];a74_0x1ea6=function(){return _0x1875ad;};return a74_0x1ea6();}function a74_0x590d(_0x3cb9cc,_0x4da2c7){_0x3cb9cc=_0x3cb9cc-0x120;const _0x1ea637=a74_0x1ea6();let _0x590d78=_0x1ea637[_0x3cb9cc];return _0x590d78;}export function dryRun(_0x1c6c47,_0x54c459){const _0x5b7296={'method':_0x1c6c47,'url':_0x54c459},_0x15c7f8={'body'(_0x403010){return _0x5b7296['body']=_0x403010,_0x15c7f8;},'description'(_0x252167){const _0x16cb13=a74_0x590d;return _0x5b7296[_0x16cb13(0x129)]=_0x252167,_0x15c7f8;},'build'(){return{..._0x5b7296};}};return _0x15c7f8;}
|