@lovrabet/lovrabet-cli 2.1.6-beta.5 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a54_0x34a906=a54_0x2cc7;(function(_0x4639b4,_0x2f2f28){const _0x2b781e=a54_0x2cc7,_0x2df4e5=_0x4639b4();while(!![]){try{const _0x28ede8=-parseInt(_0x2b781e(0x93))/0x1+parseInt(_0x2b781e(0x90))/0x2+parseInt(_0x2b781e(0x8e))/0x3*(parseInt(_0x2b781e(0x91))/0x4)+parseInt(_0x2b781e(0x8a))/0x5+-parseInt(_0x2b781e(0x8f))/0x6+parseInt(_0x2b781e(0x8c))/0x7+parseInt(_0x2b781e(0x92))/0x8*(parseInt(_0x2b781e(0x8d))/0x9);if(_0x28ede8===_0x2f2f28)break;else _0x2df4e5['push'](_0x2df4e5['shift']());}catch(_0x8b597){_0x2df4e5['push'](_0x2df4e5['shift']());}}}(a54_0xf3c8,0xd351b));export const AUTH_MODE={'ClientAk':a54_0x34a906(0x8b)};export function isAuthMode(_0xe04c7e){const _0x12f7ab=a54_0x34a906;return _0xe04c7e===AUTH_MODE[_0x12f7ab(0x94)];}function a54_0x2cc7(_0x5877bf,_0x10d098){_0x5877bf=_0x5877bf-0x8a;const _0xf3c8c5=a54_0xf3c8();let _0x2cc7b9=_0xf3c8c5[_0x5877bf];return _0x2cc7b9;}function a54_0xf3c8(){const _0x3c1e57=['ClientAk','2268280ggSrjp','client-ak','879417gKZFus','45oGqyHQ','11061iISUHs','7854648OIuBIP','1792018bxLSVb','908IqnUUy','358864ruDyjB','361864WRQTFA'];a54_0xf3c8=function(){return _0x3c1e57;};return a54_0xf3c8();}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x54aaa0=a55_0xc87d;(function(_0x3a472e,_0x3d3543){const _0x34f628=a55_0xc87d,_0x1d093b=_0x3a472e();while(!![]){try{const _0xc503ed=parseInt(_0x34f628(0x20a))/0x1+parseInt(_0x34f628(0x1e1))/0x2*(-parseInt(_0x34f628(0x200))/0x3)+parseInt(_0x34f628(0x1fa))/0x4+parseInt(_0x34f628(0x1e6))/0x5+parseInt(_0x34f628(0x1ec))/0x6*(parseInt(_0x34f628(0x20d))/0x7)+parseInt(_0x34f628(0x205))/0x8*(parseInt(_0x34f628(0x1fd))/0x9)+-parseInt(_0x34f628(0x203))/0xa*(parseInt(_0x34f628(0x202))/0xb);if(_0xc503ed===_0x3d3543)break;else _0x1d093b['push'](_0x1d093b['shift']());}catch(_0x18873a){_0x1d093b['push'](_0x1d093b['shift']());}}}(a55_0x39a0,0xeff58));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a55_0x54aaa0(0x209)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a55_0x54aaa0(0x1e4)];function a55_0x39a0(){const _0x107ef2=['Show\x20help','global','dryRun','<expr>','1287396aFUFba','app','Name\x20filter','11332233ANzYKv','Verbose\x20output','sqlcode','444BhizNe','non-interactive','11711722uEgbMb','30KqfeNA','dry-run','8ZdoRMD','Preview\x20operation\x20without\x20executing','<name>','fromEntries','cliBinName','1342311UKkyqJ','SQL\x20query\x20code','yes','133lrKyhm','Output\x20format','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','clear','production\x20|\x20development\x20|\x20daily','1036FsmnGJ','params','env','cliDisplayName','verbose','4485915UuMpko','string','json\x20|\x20pretty\x20|\x20compress','help','map','boolean','136788xyZTel','Record\x20ID','appcode','Alias\x20for\x20--non-interactive','meowKey','name','<code>','Clear\x20output','JSON\x20params\x20for\x20execute\x20commands','Force\x20non-interactive\x20mode\x20(CI)'];a55_0x39a0=function(){return _0x107ef2;};return a55_0x39a0();}export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;function a55_0xc87d(_0x3f1bd1,_0x9d856d){_0x3f1bd1=_0x3f1bd1-0x1df;const _0x39a0a0=a55_0x39a0();let _0xc87d94=_0x39a0a0[_0x3f1bd1];return _0xc87d94;}export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a55_0x54aaa0(0x1ee),'type':'string','description':'Override\x20appcode','hint':a55_0x54aaa0(0x1f2)},{'name':a55_0x54aaa0(0x1fb),'meowKey':a55_0x54aaa0(0x1fb),'type':'string','description':'Select\x20app\x20profile\x20by\x20name','hint':a55_0x54aaa0(0x207)},{'name':a55_0x54aaa0(0x1e3),'meowKey':'env','type':a55_0x54aaa0(0x1e7),'description':'Environment','hint':a55_0x54aaa0(0x1e0)},{'name':'format','meowKey':'format','type':a55_0x54aaa0(0x1e7),'description':a55_0x54aaa0(0x20e),'hint':a55_0x54aaa0(0x1e8)},{'name':'jq','meowKey':'jq','type':a55_0x54aaa0(0x1e7),'description':a55_0x54aaa0(0x20f),'hint':a55_0x54aaa0(0x1f9)},{'name':a55_0x54aaa0(0x204),'meowKey':a55_0x54aaa0(0x1f8),'type':a55_0x54aaa0(0x1eb),'description':a55_0x54aaa0(0x206)},{'name':a55_0x54aaa0(0x20c),'meowKey':a55_0x54aaa0(0x20c),'type':a55_0x54aaa0(0x1eb),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':'non-interactive','meowKey':'nonInteractive','type':a55_0x54aaa0(0x1eb),'description':a55_0x54aaa0(0x1f5)},{'name':a55_0x54aaa0(0x1f7),'meowKey':a55_0x54aaa0(0x1f7),'type':a55_0x54aaa0(0x1eb),'description':'Use\x20global\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a55_0x54aaa0(0x1eb),'description':a55_0x54aaa0(0x1ef),'hidden':!![]},{'name':a55_0x54aaa0(0x1e9),'meowKey':a55_0x54aaa0(0x1e9),'type':a55_0x54aaa0(0x1eb),'description':a55_0x54aaa0(0x1f6)},{'name':'id','meowKey':'id','type':'string','description':a55_0x54aaa0(0x1ed),'hidden':!![]},{'name':a55_0x54aaa0(0x1f1),'meowKey':a55_0x54aaa0(0x1f1),'type':'string','description':a55_0x54aaa0(0x1fc),'hidden':!![]},{'name':a55_0x54aaa0(0x1ff),'meowKey':a55_0x54aaa0(0x1ff),'type':a55_0x54aaa0(0x1e7),'description':a55_0x54aaa0(0x20b),'hidden':!![]},{'name':a55_0x54aaa0(0x1e2),'meowKey':'params','type':a55_0x54aaa0(0x1e7),'description':a55_0x54aaa0(0x1f4),'hidden':!![]},{'name':'verbose','meowKey':a55_0x54aaa0(0x1e5),'type':a55_0x54aaa0(0x1eb),'description':a55_0x54aaa0(0x1fe),'hidden':!![]},{'name':a55_0x54aaa0(0x1df),'meowKey':a55_0x54aaa0(0x1df),'type':a55_0x54aaa0(0x1eb),'description':a55_0x54aaa0(0x1f3),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a55_0x54aaa0(0x1ee),a55_0x54aaa0(0x1fb),a55_0x54aaa0(0x1e3),'format','jq',a55_0x54aaa0(0x204),a55_0x54aaa0(0x20c),a55_0x54aaa0(0x201),'ci']);export function buildMeowFlags(){const _0x526224=a55_0x54aaa0;return Object[_0x526224(0x208)](GLOBAL_FLAGS[_0x526224(0x1ea)](_0x4e74e8=>[_0x4e74e8[_0x526224(0x1f0)],{'type':_0x4e74e8['type']}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a56_0x47cb(_0x5eb00a,_0xcb3436){_0x5eb00a=_0x5eb00a-0xa4;const _0x40256b=a56_0x4025();let _0x47cb0a=_0x40256b[_0x5eb00a];return _0x47cb0a;}const a56_0x562004=a56_0x47cb;(function(_0x535ec5,_0x1df5d6){const _0x57a4e8=a56_0x47cb,_0x1fe5b1=_0x535ec5();while(!![]){try{const _0x42dddf=parseInt(_0x57a4e8(0xae))/0x1*(parseInt(_0x57a4e8(0xb3))/0x2)+-parseInt(_0x57a4e8(0xa7))/0x3*(-parseInt(_0x57a4e8(0xad))/0x4)+parseInt(_0x57a4e8(0xa8))/0x5*(-parseInt(_0x57a4e8(0xaf))/0x6)+parseInt(_0x57a4e8(0xa5))/0x7*(-parseInt(_0x57a4e8(0xb0))/0x8)+parseInt(_0x57a4e8(0xb5))/0x9*(-parseInt(_0x57a4e8(0xab))/0xa)+parseInt(_0x57a4e8(0xa9))/0xb*(parseInt(_0x57a4e8(0xa6))/0xc)+parseInt(_0x57a4e8(0xa4))/0xd;if(_0x42dddf===_0x1df5d6)break;else _0x1fe5b1['push'](_0x1fe5b1['shift']());}catch(_0x1dc92a){_0x1fe5b1['push'](_0x1fe5b1['shift']());}}}(a56_0x4025,0x7136f));export const DEFAULT_APP_PROFILE_NAME=a56_0x562004(0xaa);export const DEFAULT_CONFIG_VALUES={'env':a56_0x562004(0xb2),'format':a56_0x562004(0xb1),'locale':a56_0x562004(0xac),'riskLevel':a56_0x562004(0xb4)};function a56_0x4025(){const _0x5f0866=['7aweFtg','13956lAAnbA','42774wfOYRr','5xIOszi','8503qOgket','main','1460MyHQxD','en-US','20ArfQDa','22405hwzDkV','4924074gXXvJQ','4944176uBwANC','compress','production','2rakoLB','write','33093sGgJmG','18805488ayOHuf'];a56_0x4025=function(){return _0x5f0866;};return a56_0x4025();}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a56_0x562004(0xb1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x409f76=a57_0x4b2b;(function(_0x53a732,_0x2bf4bc){const _0x2177a1=a57_0x4b2b,_0x3d4b31=_0x53a732();while(!![]){try{const _0x3d3685=parseInt(_0x2177a1(0xa2))/0x1*(parseInt(_0x2177a1(0xa0))/0x2)+-parseInt(_0x2177a1(0x97))/0x3+parseInt(_0x2177a1(0x9a))/0x4+-parseInt(_0x2177a1(0x9b))/0x5*(parseInt(_0x2177a1(0xa1))/0x6)+-parseInt(_0x2177a1(0x98))/0x7*(-parseInt(_0x2177a1(0x99))/0x8)+parseInt(_0x2177a1(0x9c))/0x9*(parseInt(_0x2177a1(0x9d))/0xa)+-parseInt(_0x2177a1(0x9e))/0xb;if(_0x3d3685===_0x2bf4bc)break;else _0x3d4b31['push'](_0x3d4b31['shift']());}catch(_0x1ee8f4){_0x3d4b31['push'](_0x3d4b31['shift']());}}}(a57_0x58d4,0x619e8));function a57_0x58d4(){const _0x25a4ec=['221668hVjddT','3405PVbgWD','279WqeGyE','139460sArEut','5811278VqyxRA','npmRegistryBaseUrl','217982uGEcwC','1986qXgwTu','7ILayqk','1833126HsKuat','49hsSmXO','587336lGJLIm'];a57_0x58d4=function(){return _0x25a4ec;};return a57_0x58d4();}function a57_0x4b2b(_0x1a424a,_0x925df6){_0x1a424a=_0x1a424a-0x97;const _0x58d435=a57_0x58d4();let _0x4b2bbe=_0x58d435[_0x1a424a];return _0x4b2bbe;}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[a57_0x409f76(0x9f)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0x34d7d1=a58_0x206f;(function(_0xab9919,_0x3e158d){const _0x2dfe29=a58_0x206f,_0x5c66de=_0xab9919();while(!![]){try{const _0x4531ad=parseInt(_0x2dfe29(0xf7))/0x1+-parseInt(_0x2dfe29(0xfe))/0x2*(parseInt(_0x2dfe29(0xf8))/0x3)+parseInt(_0x2dfe29(0xf6))/0x4+parseInt(_0x2dfe29(0xfd))/0x5+parseInt(_0x2dfe29(0x102))/0x6*(-parseInt(_0x2dfe29(0xf5))/0x7)+parseInt(_0x2dfe29(0x106))/0x8*(parseInt(_0x2dfe29(0x107))/0x9)+parseInt(_0x2dfe29(0xf9))/0xa;if(_0x4531ad===_0x3e158d)break;else _0x5c66de['push'](_0x5c66de['shift']());}catch(_0x15aa82){_0x5c66de['push'](_0x5c66de['shift']());}}}(a58_0x7222,0xc8f90));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a58_0x206f(_0x482f49,_0x5356f3){_0x482f49=_0x482f49-0xf4;const _0x7222e4=a58_0x7222();let _0x206fdb=_0x7222e4[_0x482f49];return _0x206fdb;}let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x9393cb){const _0x9503a3=a58_0x206f;customApiDomain=_0x9393cb?.['apiDomain'],customUserDomain=_0x9393cb?.[_0x9503a3(0x101)],customRuntimeDomain=_0x9393cb?.[_0x9503a3(0xfb)],customSkillHubDomain=_0x9393cb?.[_0x9503a3(0x103)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x34d7d1(0x100)][a58_0x34d7d1(0xfa)][a58_0x34d7d1(0xfc)]:PRODUCT_CONFIG[a58_0x34d7d1(0x100)][a58_0x34d7d1(0x105)]['user']);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains']['production'][a58_0x34d7d1(0xff)]:PRODUCT_CONFIG[a58_0x34d7d1(0x100)][a58_0x34d7d1(0x105)][a58_0x34d7d1(0xff)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x34d7d1(0x100)][a58_0x34d7d1(0xfa)][a58_0x34d7d1(0xf4)]:PRODUCT_CONFIG[a58_0x34d7d1(0x100)][a58_0x34d7d1(0x105)][a58_0x34d7d1(0xf4)]);function a58_0x7222(){const _0x42d02c=['skillHubDomain','skillhub','nonProduction','232CDXTHp','309429kryRSM','runtime','399NEIepB','276716oxWdqN','233584qGBUQP','3wpcwUZ','4534060cuYUUk','production','runtimeDomain','user','92985wwxpQe','517634eyKmsD','api','domains','userDomain','72612Ccqquf'];a58_0x7222=function(){return _0x42d02c;};return a58_0x7222();}export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a58_0x34d7d1(0x100)][a58_0x34d7d1(0xfa)][a58_0x34d7d1(0x104)]:PRODUCT_CONFIG[a58_0x34d7d1(0x100)][a58_0x34d7d1(0x105)]['skillhub']);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x3be8f8=a59_0x13e6;function a59_0x13e6(_0x5b0c6a,_0x5bffc4){_0x5b0c6a=_0x5b0c6a-0x17e;const _0x1f5599=a59_0x1f55();let _0x13e698=_0x1f5599[_0x5b0c6a];return _0x13e698;}(function(_0x536134,_0x963409){const _0x6c7699=a59_0x13e6,_0x288a50=_0x536134();while(!![]){try{const _0x445ea1=parseInt(_0x6c7699(0x18a))/0x1+-parseInt(_0x6c7699(0x186))/0x2+parseInt(_0x6c7699(0x187))/0x3+parseInt(_0x6c7699(0x180))/0x4+parseInt(_0x6c7699(0x17f))/0x5*(parseInt(_0x6c7699(0x183))/0x6)+parseInt(_0x6c7699(0x182))/0x7+-parseInt(_0x6c7699(0x18b))/0x8;if(_0x445ea1===_0x963409)break;else _0x288a50['push'](_0x288a50['shift']());}catch(_0x565b61){_0x288a50['push'](_0x288a50['shift']());}}}(a59_0x1f55,0xe26d8));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a59_0x3be8f8(0x189),a59_0x3be8f8(0x188),'daily'];export function normalizeEnv(_0x3a3384){const _0xaedb0=a59_0x3be8f8;return _0x3a3384===_0xaedb0(0x184)?_0xaedb0(0x189):_0x3a3384;}export function isProduction(_0x501e74){const _0x53ddf3=a59_0x3be8f8;return normalizeEnv(_0x501e74)===_0x53ddf3(0x189);}export function isDaily(_0x3f3570){const _0x23fab7=a59_0x3be8f8;return normalizeEnv(_0x3f3570)===_0x23fab7(0x185);}export function isDev(_0x36741e){const _0x4a37d4=a59_0x3be8f8,_0x44ac7e=normalizeEnv(_0x36741e);return _0x44ac7e===_0x4a37d4(0x188)||_0x44ac7e===_0x4a37d4(0x181);}let env=normalizeEnv(productEnv(a59_0x3be8f8(0x17e))||a59_0x3be8f8(0x189));export function getEnv(){return env;}function a59_0x1f55(){const _0x48c2dd=['9163938ZNkQGK','41808SVzswi','online','daily','1602100EtqZhU','3362967kMuPcl','development','production','1377811EUXyRt','35875472HxFRrP','ENV','835IXCesV','4965368QogAWw','dev'];a59_0x1f55=function(){return _0x48c2dd;};return a59_0x1f55();}export function initEnv(_0x4e9d67){env=normalizeEnv(_0x4e9d67);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a60_0x195800=a60_0x12bd;function a60_0x277c(){const _0x37e1a1=['json','4SNPAde','750290QcGYIS','42BAYHxx','10hkoWqh','764432wbGtzA','1066887ecwfxk','1413190NeOkQl','2641707yWAiES','16PjkDdh','5407318uGhITG','24469313vGduse'];a60_0x277c=function(){return _0x37e1a1;};return a60_0x277c();}(function(_0x1dd3ae,_0x224a52){const _0x5bc703=a60_0x12bd,_0x54a690=_0x1dd3ae();while(!![]){try{const _0x5b43a5=-parseInt(_0x5bc703(0x7e))/0x1+parseInt(_0x5bc703(0x80))/0x2+-parseInt(_0x5bc703(0x7f))/0x3*(parseInt(_0x5bc703(0x7a))/0x4)+-parseInt(_0x5bc703(0x7b))/0x5*(parseInt(_0x5bc703(0x7c))/0x6)+-parseInt(_0x5bc703(0x83))/0x7+-parseInt(_0x5bc703(0x82))/0x8*(-parseInt(_0x5bc703(0x81))/0x9)+-parseInt(_0x5bc703(0x7d))/0xa*(-parseInt(_0x5bc703(0x84))/0xb);if(_0x5b43a5===_0x224a52)break;else _0x54a690['push'](_0x54a690['shift']());}catch(_0x12140c){_0x54a690['push'](_0x54a690['shift']());}}}(a60_0x277c,0x8c6cf));function a60_0x12bd(_0x150c3d,_0x927ca8){_0x150c3d=_0x150c3d-0x79;const _0x277c05=a60_0x277c();let _0x12bddf=_0x277c05[_0x150c3d];return _0x12bddf;}export const OUTPUT_FORMAT_VALUES=[a60_0x195800(0x79),'pretty','compress'];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a61_0x8fef(_0x23390f,_0x3861ea){_0x23390f=_0x23390f-0xec;const _0x54508f=a61_0x5450();let _0x8feffa=_0x54508f[_0x23390f];return _0x8feffa;}const a61_0x1a13ec=a61_0x8fef;(function(_0xd0faa3,_0xc187be){const _0x16f63b=a61_0x8fef,_0x319eb2=_0xd0faa3();while(!![]){try{const _0x2d215f=-parseInt(_0x16f63b(0xf2))/0x1+-parseInt(_0x16f63b(0xff))/0x2+-parseInt(_0x16f63b(0xf7))/0x3+parseInt(_0x16f63b(0xfa))/0x4*(parseInt(_0x16f63b(0xec))/0x5)+-parseInt(_0x16f63b(0xfb))/0x6+parseInt(_0x16f63b(0xf1))/0x7+parseInt(_0x16f63b(0xee))/0x8;if(_0x2d215f===_0xc187be)break;else _0x319eb2['push'](_0x319eb2['shift']());}catch(_0x4f2ef4){_0x319eb2['push'](_0x319eb2['shift']());}}}(a61_0x5450,0x7b15f));export const PRODUCT_CONFIG={'cliBinName':a61_0x1a13ec(0xef),'cliDisplayName':'Lovrabet\x20Runtime\x20CLI','npmPackageName':'@lovrabet/lovrabet-cli','skillSource':a61_0x1a13ec(0x103),'npmRegistryBaseUrl':'https://registry.npmjs.org','envPrefix':a61_0x1a13ec(0xf3),'legacyEnvPrefixes':[a61_0x1a13ec(0xf4)],'configFileNames':['.lovrabet.json',a61_0x1a13ec(0xf6)],'newConfigFileName':a61_0x1a13ec(0xf9),'homeDirName':'.lovrabet','logFileName':a61_0x1a13ec(0xfd),'invokeSource':'cli:lovrabet-runtime','userCenterDisplayName':a61_0x1a13ec(0xfc),'skipNpxSkillsEnvSuffix':'SKIP_NPX_SKILLS','domains':{'production':{'user':a61_0x1a13ec(0x101),'api':'https://api.lovrabet.com','runtime':a61_0x1a13ec(0xf0),'skillhub':'https://skills.lovrabet.com'},'nonProduction':{'user':'https://user-daily.lovrabet.com','api':a61_0x1a13ec(0xf8),'runtime':a61_0x1a13ec(0x102),'skillhub':'https://skills-daily.lovrabet.com'}},'accessKeyCreatePath':a61_0x1a13ec(0xfe)};export function productEnvName(_0xd0326f){const _0x3e9650=a61_0x1a13ec;return PRODUCT_CONFIG[_0x3e9650(0xed)]+'_'+_0xd0326f;}export function productEnvNames(_0x169507){const _0x47ba1d=a61_0x1a13ec;return[productEnvName(_0x169507),...PRODUCT_CONFIG[_0x47ba1d(0x100)][_0x47ba1d(0xf5)](_0x41d1a=>_0x41d1a+'_'+_0x169507)];}function a61_0x5450(){const _0x51fba8=['.lovrabet.json','68TORBEN','3501132UzKkAd','Lovrabet\x20User\x20Center','.lovrabet-runtime.log','/user/ak','823796cdRBgU','legacyEnvPrefixes','https://user.lovrabet.com','https://daily-runtime.lovrabet.com','lovrabet/lovrabet-cli','292170cQlgwu','envPrefix','8140992pWKNuf','lovrabet','https://runtime.lovrabet.com','6855555sNeuxb','927889ABXzcF','LOVRABET','RABETBASE','map','.lovrabetrc','1688697iniUMq','https://daily-api.lovrabet.com'];a61_0x5450=function(){return _0x51fba8;};return a61_0x5450();}export function productEnv(_0x516126){for(const _0x221e57 of productEnvNames(_0x516126)){const _0x599b24=process.env[_0x221e57];if(_0x599b24!==undefined)return _0x599b24;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a62_0x32b2(_0x27c9c6,_0x2b1dc6){_0x27c9c6=_0x27c9c6-0x163;const _0x424007=a62_0x4240();let _0x32b21d=_0x424007[_0x27c9c6];return _0x32b21d;}function a62_0x4240(){const _0x2b6e27=['736WSlrQL','1165NPDgsw','10Mmbxcu','high-risk-write','1118939pMaEQP','2865UheLiF','read','2424BwzrNL','8wDIuzx','1810956bGHoRz','11wxaTUX','write','10250505AUJSQE','3196529TySmTE','15903516tJmlYZ'];a62_0x4240=function(){return _0x2b6e27;};return a62_0x4240();}const a62_0xde123c=a62_0x32b2;(function(_0x223aff,_0x2a7aa8){const _0x384c6b=a62_0x32b2,_0x5eeb69=_0x223aff();while(!![]){try{const _0x35e161=parseInt(_0x384c6b(0x163))/0x1+-parseInt(_0x384c6b(0x168))/0x2+parseInt(_0x384c6b(0x164))/0x3*(parseInt(_0x384c6b(0x16e))/0x4)+-parseInt(_0x384c6b(0x16f))/0x5*(-parseInt(_0x384c6b(0x166))/0x6)+-parseInt(_0x384c6b(0x16c))/0x7*(-parseInt(_0x384c6b(0x167))/0x8)+-parseInt(_0x384c6b(0x16b))/0x9*(-parseInt(_0x384c6b(0x170))/0xa)+parseInt(_0x384c6b(0x169))/0xb*(-parseInt(_0x384c6b(0x16d))/0xc);if(_0x35e161===_0x2a7aa8)break;else _0x5eeb69['push'](_0x5eeb69['shift']());}catch(_0x5821ba){_0x5eeb69['push'](_0x5eeb69['shift']());}}}(a62_0x4240,0xb7fcc));export const RISK_LEVEL_VALUES=[a62_0xde123c(0x165),a62_0xde123c(0x16a),a62_0xde123c(0x171)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x1d0630=a63_0x57de;function a63_0x57de(_0x586c4b,_0x16ae7a){_0x586c4b=_0x586c4b-0x179;const _0x3c0390=a63_0x3c03();let _0x57de42=_0x3c0390[_0x586c4b];return _0x57de42;}(function(_0x15105b,_0x12b3d8){const _0x4f508d=a63_0x57de,_0x242633=_0x15105b();while(!![]){try{const _0x53b0bf=parseInt(_0x4f508d(0x17b))/0x1*(-parseInt(_0x4f508d(0x17e))/0x2)+-parseInt(_0x4f508d(0x179))/0x3+-parseInt(_0x4f508d(0x180))/0x4+parseInt(_0x4f508d(0x17f))/0x5*(-parseInt(_0x4f508d(0x182))/0x6)+parseInt(_0x4f508d(0x183))/0x7*(-parseInt(_0x4f508d(0x17a))/0x8)+-parseInt(_0x4f508d(0x17c))/0x9*(parseInt(_0x4f508d(0x181))/0xa)+parseInt(_0x4f508d(0x17d))/0xb*(parseInt(_0x4f508d(0x186))/0xc);if(_0x53b0bf===_0x12b3d8)break;else _0x242633['push'](_0x242633['shift']());}catch(_0x34d3b3){_0x242633['push'](_0x242633['shift']());}}}(a63_0x3c03,0xbca8c));function a63_0x3c03(){const _0x47f4b8=['11CkyYvt','2924126EXlcHq','5795990xrsScS','806676SkBveA','610gkfJKi','6QvUYIX','7QWySEU','production','domains','69472596bKbSIH','1266900vlbkxx','4351704vhkzDg','1cnePGC','181098CyoznR'];a63_0x3c03=function(){return _0x47f4b8;};return a63_0x3c03();}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a63_0x1d0630(0x185)][a63_0x1d0630(0x184)]['user']+PRODUCT_CONFIG['accessKeyCreatePath'];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0x237687=a64_0x212c;(function(_0x3d1ac7,_0x4758d3){const _0x409709=a64_0x212c,_0x3c4e30=_0x3d1ac7();while(!![]){try{const _0x23e575=-parseInt(_0x409709(0xbd))/0x1*(-parseInt(_0x409709(0x85))/0x2)+-parseInt(_0x409709(0xba))/0x3+-parseInt(_0x409709(0xb8))/0x4+-parseInt(_0x409709(0x84))/0x5*(parseInt(_0x409709(0xbc))/0x6)+parseInt(_0x409709(0x8c))/0x7+-parseInt(_0x409709(0x7a))/0x8*(parseInt(_0x409709(0x95))/0x9)+parseInt(_0x409709(0xaa))/0xa*(parseInt(_0x409709(0xab))/0xb);if(_0x23e575===_0x4758d3)break;else _0x3c4e30['push'](_0x3c4e30['shift']());}catch(_0x3dd541){_0x3c4e30['push'](_0x3c4e30['shift']());}}}(a64_0x37be,0xaad3d));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[a64_0x237687(0xb0)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a64_0x237687(0xb3)];function resolveConfigPath(_0x4a5904){for(const _0x338307 of CONFIG_NAMES){const _0x41cf36=resolve(_0x4a5904,_0x338307);if(existsSync(_0x41cf36))return _0x41cf36;}return undefined;}export function resolveWriteConfigPath(_0x44260e){const _0x2f8504=a64_0x237687,_0x46aa97=_0x44260e===_0x2f8504(0x78)?process[_0x2f8504(0xc0)]():homedir(),_0x4b67aa=resolveConfigPath(_0x46aa97);return _0x4b67aa??resolve(_0x46aa97,NEW_CONFIG_NAME);}export function readConfigFile(_0x53a69e){const _0x555104=a64_0x237687;try{if(existsSync(_0x53a69e)){const _0x172607=readFileSync(_0x53a69e,{'encoding':_0x555104(0x9e)});if(_0x172607){const _0x350766=JSON['parse'](_0x172607);return migrateOnlineEnv(_0x53a69e,_0x350766),_0x350766;}}}catch{}return{};}function migrateOnlineEnv(_0x343cbb,_0x565fb3){const _0x3f2990=a64_0x237687;let _0x52cf56=![];_0x565fb3[_0x3f2990(0xb4)]===_0x3f2990(0x7b)&&(_0x565fb3['env']=_0x3f2990(0xc1),_0x52cf56=!![]);if(_0x565fb3['apps']&&typeof _0x565fb3[_0x3f2990(0x94)]===_0x3f2990(0xb2))for(const _0x3c60b7 of Object['values'](_0x565fb3[_0x3f2990(0x94)])){_0x3c60b7&&_0x3c60b7[_0x3f2990(0xb4)]===_0x3f2990(0x7b)&&(_0x3c60b7['env']='production',_0x52cf56=!![]);}if(_0x52cf56)try{writeConfigFile(_0x343cbb,_0x565fb3);}catch{}}export function writeConfigFile(_0x4d5d2c,_0xdce07b){const _0x25011f=a64_0x237687,_0x2c9a18=dirname(_0x4d5d2c);!existsSync(_0x2c9a18)&&mkdirSync(_0x2c9a18,{'recursive':!![]});const _0x24b2c9=_0x4d5d2c+'.tmp';try{writeFileSync(_0x24b2c9,JSON['stringify'](_0xdce07b,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x24b2c9,_0x4d5d2c);}catch(_0x4e8a46){if(_0x4e8a46[_0x25011f(0xad)]===_0x25011f(0x90)||_0x4e8a46[_0x25011f(0xad)]===_0x25011f(0x9f)||_0x4e8a46['code']===_0x25011f(0xb7)){writeFileSync(_0x4d5d2c,JSON[_0x25011f(0x8b)](_0xdce07b,null,0x2)+'\x0a',{'encoding':_0x25011f(0x9e)});try{unlinkSync(_0x24b2c9);}catch{}}else throw _0x4e8a46;}}catch(_0x2aa981){try{unlinkSync(_0x24b2c9);}catch{}throw _0x2aa981;}}export function isNonInteractiveMode(_0x549f31){const _0x1a963f=a64_0x237687;return!!(_0x549f31[_0x1a963f(0x7c)]||_0x549f31['ci']||productEnvNames('CI')[_0x1a963f(0x81)](_0x270b48=>process.env[_0x270b48]===_0x1a963f(0x98))||process.env.CI===_0x1a963f(0x98)||!process['stdout']['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x299271=a64_0x237687;if(!process[_0x299271(0xa9)][_0x299271(0xaf)])return![];try{const _0x2a91c7=process[_0x299271(0xa9)][_0x299271(0xa1)];return process['stdin'][_0x299271(0x83)](!![]),process[_0x299271(0xa9)]['setRawMode'](_0x2a91c7??![]),!![];}catch{return![];}}export async function createContext(_0x23cab7){const _0x442779=a64_0x237687,_0x3ce3ba=readRawConfig(),_0x3966d8=buildConfig(_0x3ce3ba,_0x23cab7);await initGlobalEnvironment(_0x3966d8);const {getUserDomain:_0x1c6030,getApiDomain:_0x378f33}=await import('./constant/domain.js'),_0xc20d7d={'apiDomain':_0x378f33(),'userDomain':_0x1c6030()},_0x52479e=await buildAuth(_0x3966d8);logger[_0x442779(0xa7)](process['cwd']());const _0x550b13=(CLI_BIN_NAME+'\x20'+process[_0x442779(0xbb)][_0x442779(0x96)](0x2)[_0x442779(0xa0)]('\x20'))[_0x442779(0xa8)]();logger['setRawCommand'](_0x550b13);const _0x55b71e=isNonInteractiveMode(_0x23cab7);return{'config':_0x3966d8,'auth':_0x52479e,'logger':logger,'env':_0xc20d7d,'nonInteractive':_0x55b71e};}function a64_0x37be(){const _0x27cd7e=['userDomain','setLogPath','trim','stdin','10nKgvVK','28823377EhrTvb','cache','code','app','isTTY','configFileNames','parse','object','newConfigFileName','env','values','local-alias','EACCES','3729196WPzNhK','message','5034hhQSQz','argv','312126xVLRNy','473524uKRGuX','ENV','defaultApp','cwd','production','top-level','riskLevel','project','read','8rYMDnm','online','nonInteractive','FORMAT','VERBOSE','skillHubDomain','global','some','daily','setRawMode','120intxyp','2tgUUaa','APPCODE','accessKey','./constant/domain.js','write','projectConfig','stringify','165410XVVLXQ','raw','high-risk-write','format','EPERM','runtimeDomain','maxRisk','./constant/env.js','apps','2117439KBKoBn','slice','string','true','development','authRequired','inherit','find','locale','utf8','EXDEV','join','isRaw','host','appcode','globalConfig','explicit'];a64_0x37be=function(){return _0x27cd7e;};return a64_0x37be();}export function buildConfigFromFlags(_0x1f80ec){return buildConfig(readRawConfig(),_0x1f80ec);}export function getLocalAppAliases(_0x2e60fe){const _0x44eb45=a64_0x237687;return _0x2e60fe['apps']&&typeof _0x2e60fe[_0x44eb45(0x94)]==='object'?_0x2e60fe['apps']:{};}export function resolveLocalAppAliasCode(_0x4861d6,_0x2cc1e0){const _0x2d0650=a64_0x237687;if(!_0x2cc1e0)return undefined;const _0x4e793e=getLocalAppAliases(_0x4861d6)[_0x2cc1e0],_0xb6de03=_0x4e793e?.['appcode'];return typeof _0xb6de03===_0x2d0650(0x97)&&_0xb6de03[_0x2d0650(0xa8)]()?_0xb6de03[_0x2d0650(0xa8)]():undefined;}export function readAppCodeFromConfig(){const _0x4412b1=a64_0x237687,_0x36f6b2=readRawConfig(),_0x1e9b02=_0x36f6b2[_0x4412b1(0xa3)]??_0x36f6b2[_0x4412b1(0xae)];if(typeof _0x1e9b02==='string'&&_0x1e9b02['trim']())return _0x1e9b02[_0x4412b1(0xa8)]();const _0x29540d=resolveLocalAppAliasCode(_0x36f6b2,typeof _0x36f6b2[_0x4412b1(0xbf)]===_0x4412b1(0x97)?_0x36f6b2[_0x4412b1(0xbf)]:undefined);if(_0x29540d)return _0x29540d;const _0x4cc772=normalizeEnv(String(_0x36f6b2[_0x4412b1(0xb4)]||'production')),_0x2fdb9f=isDaily(_0x4cc772)?'daily':isDev(_0x4cc772)?_0x4412b1(0x99):_0x4412b1(0xc1),_0xd3d65c=resolveCachedAppCode(typeof _0x36f6b2[_0x4412b1(0xbf)]===_0x4412b1(0x97)?_0x36f6b2[_0x4412b1(0xbf)]:undefined,_0x2fdb9f,typeof _0x36f6b2[_0x4412b1(0x87)]===_0x4412b1(0x97)?_0x36f6b2[_0x4412b1(0x87)]:undefined);if(_0xd3d65c)return _0xd3d65c;const _0x1babde=Object[_0x4412b1(0xb5)](getLocalAppAliases(_0x36f6b2))[_0x4412b1(0x9c)](_0x2a68d8=>_0x2a68d8?.[_0x4412b1(0xa3)]);return typeof _0x1babde?.[_0x4412b1(0xa3)]===_0x4412b1(0x97)&&_0x1babde['appcode'][_0x4412b1(0xa8)]()?_0x1babde[_0x4412b1(0xa3)][_0x4412b1(0xa8)]():undefined;}export function readScopedConfig(_0x59c591){const _0x40658f=a64_0x237687,_0x200f81=_0x59c591[_0x40658f(0x80)]?_0x40658f(0x80):_0x40658f(0x78);return readConfigFile(resolveWriteConfigPath(_0x200f81));}export function writeScopedConfig(_0x11fe44,_0x579d86){const _0x5c538f=a64_0x237687,_0x3a618f=_0x579d86[_0x5c538f(0x80)]?'global':_0x5c538f(0x78);writeConfigFile(resolveWriteConfigPath(_0x3a618f),_0x11fe44);}export async function initGlobalEnvironment(_0x7e6f42){const _0x115570=a64_0x237687,{initEnv:_0x5b5fc2}=await import(_0x115570(0x93));_0x5b5fc2(_0x7e6f42[_0x115570(0xb4)]);const {initDomains:_0xb10037}=await import(_0x115570(0x88));_0xb10037({'apiDomain':_0x7e6f42[_0x115570(0x8d)]['apiDomain']||_0x7e6f42['raw'][_0x115570(0xa2)]||undefined,'userDomain':_0x7e6f42[_0x115570(0x8d)][_0x115570(0xa6)]||undefined,'runtimeDomain':_0x7e6f42[_0x115570(0x8d)][_0x115570(0x91)]||undefined,'skillHubDomain':_0x7e6f42[_0x115570(0x8d)][_0x115570(0x7f)]||undefined});}export function getProjectConfigPath(){const _0x2ffc84=a64_0x237687;return resolveConfigPath(process[_0x2ffc84(0xc0)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x3e5291){const _0x436b4f=a64_0x237687;if(!existsSync(_0x3e5291))return{'status':'missing'};try{const _0x920114=readFileSync(_0x3e5291,{'encoding':_0x436b4f(0x9e)});if(!_0x920114?.[_0x436b4f(0xa8)]())return{'status':'empty'};const _0x2d92da=JSON['parse'](_0x920114);return{'status':'ok','data':_0x2d92da};}catch(_0x71b200){return{'status':'error','message':_0x71b200 instanceof Error?_0x71b200[_0x436b4f(0xb9)]:String(_0x71b200)};}}export function loadRawConfigLayers(_0x54890b){const _0x4eefeb=a64_0x237687;let _0x2de168={},_0x53ecc6={},_0x3b3620,_0x33907d;try{_0x3b3620=resolveConfigPath(homedir());if(_0x3b3620){const _0x2b0eed=readFileSync(_0x3b3620,{'encoding':_0x4eefeb(0x9e)});if(_0x2b0eed)_0x2de168=JSON[_0x4eefeb(0xb1)](_0x2b0eed);}}catch{}try{const _0x4a447b=_0x54890b||process[_0x4eefeb(0xc0)]();_0x33907d=resolveConfigPath(_0x4a447b);if(_0x33907d){const _0x1c34bf=readFileSync(_0x33907d,{'encoding':_0x4eefeb(0x9e)});if(_0x1c34bf)_0x53ecc6=JSON['parse'](_0x1c34bf);}}catch{}return{'globalPath':_0x3b3620,'projectPath':_0x33907d,'globalConfig':_0x2de168,'projectConfig':_0x53ecc6};}function mergeRawConfigLayers(_0x520015){const _0x4e93ea=a64_0x237687,{globalConfig:_0x47a413,projectConfig:_0x1ff4d9}=_0x520015;if(_0x1ff4d9[_0x4e93ea(0x9b)]===![]){const _0xc20fe8={..._0x1ff4d9};return delete _0xc20fe8[_0x4e93ea(0x9b)],_0xc20fe8;}const _0x28dd1f={..._0x47a413,..._0x1ff4d9};if(_0x4e93ea(0xbf)in _0x1ff4d9)_0x28dd1f[_0x4e93ea(0xbf)]=_0x1ff4d9[_0x4e93ea(0xbf)];else _0x47a413[_0x4e93ea(0xbf)]&&(_0x28dd1f[_0x4e93ea(0xbf)]=_0x47a413[_0x4e93ea(0xbf)]);return _0x28dd1f;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x54c53b){return mergeRawConfigLayers(loadRawConfigLayers(_0x54c53b));}export function readRawConfigWithLayers(_0xd42b1c){const _0x43d183=loadRawConfigLayers(_0xd42b1c);return{'config':mergeRawConfigLayers(_0x43d183),'layers':_0x43d183};}export function resolveDefaultAppSource(_0x3fa4f6){const _0x1f9054=a64_0x237687;if('defaultApp'in _0x3fa4f6[_0x1f9054(0x8a)])return _0x1f9054(0x78);if(_0x3fa4f6[_0x1f9054(0x8a)]['inherit']===![])return null;if(_0x3fa4f6[_0x1f9054(0xa4)][_0x1f9054(0xbf)])return'global';return null;}function buildConfig(_0x3f1490,_0x1639eb){const _0x3205ed=a64_0x237687,_0x5d85f6=_0x3f1490[_0x3205ed(0xbf)]||undefined,_0x351407=_0x1639eb['app']||env('APP')||undefined,_0x1ab1c6=_0x351407||_0x5d85f6||undefined,_0x44d127=env('ACCESS_KEY')||_0x3f1490['accessKey']||undefined,_0x374a52=_0x1639eb[_0x3205ed(0xb4)]||env(_0x3205ed(0xbe))||_0x3f1490['env']||DEFAULT_CONFIG_VALUES[_0x3205ed(0xb4)],_0x38525e=normalizeEnv(String(_0x374a52)),_0x1cdf15=isDaily(_0x38525e)?_0x3205ed(0x82):isDev(_0x38525e)?'development':_0x3205ed(0xc1),_0xf88397=resolveLocalAppAliasCode(_0x3f1490,_0x1ab1c6),_0x640466=resolveCachedAppCode(_0x1ab1c6,_0x1cdf15,_0x44d127),_0x1f8aba=typeof _0x1639eb[_0x3205ed(0xa3)]===_0x3205ed(0x97)?_0x1639eb['appcode']:undefined,_0xbf1d97=env(_0x3205ed(0x86)),_0x44c0e6=_0x351407?undefined:_0x3f1490[_0x3205ed(0xa3)]||_0x3f1490[_0x3205ed(0xae)]||undefined,_0x305c82=_0x1f8aba||_0xbf1d97||_0xf88397||_0x640466||_0x44c0e6||undefined,_0x3c91ce=_0x1f8aba?_0x3205ed(0xa5):_0xbf1d97?_0x3205ed(0xb4):_0xf88397?_0x3205ed(0xb6):_0x640466?_0x3205ed(0xac):_0x44c0e6?_0x3205ed(0x76):undefined,_0x3b216d=_0x3f1490['locale']||DEFAULT_CONFIG_VALUES[_0x3205ed(0x9d)],_0x11d741=undefined,_0x26ba1c=_0x1639eb[_0x3205ed(0x8f)]||env(_0x3205ed(0x7d))||_0x3f1490[_0x3205ed(0x8f)],_0x1bcce0=normalizeLegacyOutputFormat(_0x26ba1c),_0x46e912=env('PAGE_SIZE')||_0x3f1490['pageSize'],_0x45d9a9=_0x46e912?Number(_0x46e912)||undefined:undefined,_0x49b042=_0x3f1490[_0x3205ed(0x77)]||_0x3f1490[_0x3205ed(0x92)],_0x16b7a0=_0x49b042===_0x3205ed(0x79)||_0x49b042===_0x3205ed(0x89)||_0x49b042===_0x3205ed(0x8e)?_0x49b042:DEFAULT_CONFIG_VALUES['riskLevel'],_0x4ac40b=env(_0x3205ed(0x7e)),_0xa1c1f8=_0x4ac40b==='1'||_0x4ac40b===_0x3205ed(0x98);return{'appCode':typeof _0x305c82===_0x3205ed(0x97)&&_0x305c82[_0x3205ed(0xa8)]()?_0x305c82[_0x3205ed(0xa8)]():undefined,'appCodeSource':_0x3c91ce,'env':_0x1cdf15,'locale':_0x3b216d,'cookie':_0x11d741,'accessKey':_0x44d127,'format':_0x1bcce0,'pageSize':_0x45d9a9,'riskLevel':_0x16b7a0,'verbose':_0xa1c1f8,'defaultApp':_0x5d85f6,'currentApp':typeof _0x1ab1c6==='string'?_0x1ab1c6:undefined,'raw':_0x3f1490};}function env(_0x1647df){return productEnv(_0x1647df);}function a64_0x212c(_0x3f419a,_0x5a26f9){_0x3f419a=_0x3f419a-0x76;const _0x37be2e=a64_0x37be();let _0x212cc1=_0x37be2e[_0x3f419a];return _0x212cc1;}async function buildAuth(_0x8b6d57){const _0x4b91ee='',_0x3f6502=!!_0x8b6d57['accessKey'];return{'cookie':_0x4b91ee,'isLoggedIn':_0x3f6502,async 'getOrLogin'(){const _0x25d744=a64_0x212c;if(_0x3f6502)return _0x4b91ee;throw CliErrors[_0x25d744(0x9a)]();}};}
|
|
1
|
+
const a64_0x1d9611=a64_0x26c6;function a64_0x26c6(_0x2fc425,_0x44bb82){_0x2fc425=_0x2fc425-0xd6;const _0x2c1d52=a64_0x2c1d();let _0x26c6cb=_0x2c1d52[_0x2fc425];return _0x26c6cb;}(function(_0x4a5cd4,_0x383082){const _0x19e2a0=a64_0x26c6,_0x1ccd3b=_0x4a5cd4();while(!![]){try{const _0x395519=-parseInt(_0x19e2a0(0x10f))/0x1+parseInt(_0x19e2a0(0xed))/0x2+-parseInt(_0x19e2a0(0xdd))/0x3*(-parseInt(_0x19e2a0(0xf3))/0x4)+-parseInt(_0x19e2a0(0xdb))/0x5+-parseInt(_0x19e2a0(0x105))/0x6*(-parseInt(_0x19e2a0(0xfa))/0x7)+parseInt(_0x19e2a0(0xf5))/0x8*(-parseInt(_0x19e2a0(0x11b))/0x9)+parseInt(_0x19e2a0(0xe3))/0xa;if(_0x395519===_0x383082)break;else _0x1ccd3b['push'](_0x1ccd3b['shift']());}catch(_0x3874ad){_0x1ccd3b['push'](_0x1ccd3b['shift']());}}}(a64_0x2c1d,0xcc33c));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[a64_0x1d9611(0xeb)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a64_0x1d9611(0xe8)];function resolveConfigPath(_0x4acbbb){for(const _0x45d17d of CONFIG_NAMES){const _0x4734da=resolve(_0x4acbbb,_0x45d17d);if(existsSync(_0x4734da))return _0x4734da;}return undefined;}export function resolveWriteConfigPath(_0x2d6cbb){const _0x53c61c=a64_0x1d9611,_0x3a5238=_0x2d6cbb===_0x53c61c(0x11a)?process[_0x53c61c(0x10e)]():homedir(),_0x2fdb95=resolveConfigPath(_0x3a5238);return _0x2fdb95??resolve(_0x3a5238,NEW_CONFIG_NAME);}export function readConfigFile(_0xf1cd25){const _0x4d9bf2=a64_0x1d9611;try{if(existsSync(_0xf1cd25)){const _0x3f2d55=readFileSync(_0xf1cd25,{'encoding':_0x4d9bf2(0xea)});if(_0x3f2d55){const _0x361a6e=JSON[_0x4d9bf2(0x11c)](_0x3f2d55);return migrateOnlineEnv(_0xf1cd25,_0x361a6e),_0x361a6e;}}}catch{}return{};}function migrateOnlineEnv(_0x13f516,_0x31f92d){const _0x10a2ef=a64_0x1d9611;let _0x40ea38=![];_0x31f92d[_0x10a2ef(0xd9)]==='online'&&(_0x31f92d[_0x10a2ef(0xd9)]=_0x10a2ef(0x106),_0x40ea38=!![]);if(_0x31f92d[_0x10a2ef(0xd8)]&&typeof _0x31f92d[_0x10a2ef(0xd8)]===_0x10a2ef(0xe0))for(const _0x343084 of Object[_0x10a2ef(0xf6)](_0x31f92d[_0x10a2ef(0xd8)])){_0x343084&&_0x343084[_0x10a2ef(0xd9)]===_0x10a2ef(0xe5)&&(_0x343084['env']=_0x10a2ef(0x106),_0x40ea38=!![]);}if(_0x40ea38)try{writeConfigFile(_0x13f516,_0x31f92d);}catch{}}export function writeConfigFile(_0x28cf25,_0x1571c0){const _0x382d2e=a64_0x1d9611,_0x5f1c04=dirname(_0x28cf25);!existsSync(_0x5f1c04)&&mkdirSync(_0x5f1c04,{'recursive':!![]});const _0x350763=_0x28cf25+_0x382d2e(0x10b);try{writeFileSync(_0x350763,JSON[_0x382d2e(0x116)](_0x1571c0,null,0x2)+'\x0a',{'encoding':_0x382d2e(0xea),'mode':0x180});try{renameSync(_0x350763,_0x28cf25);}catch(_0x476a85){if(_0x476a85[_0x382d2e(0xda)]==='EPERM'||_0x476a85[_0x382d2e(0xda)]==='EXDEV'||_0x476a85[_0x382d2e(0xda)]===_0x382d2e(0xe2)){writeFileSync(_0x28cf25,JSON[_0x382d2e(0x116)](_0x1571c0,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x350763);}catch{}}else throw _0x476a85;}}catch(_0x4fd315){try{unlinkSync(_0x350763);}catch{}throw _0x4fd315;}}export function isNonInteractiveMode(_0x41935e){const _0x34a6e0=a64_0x1d9611;return!!(_0x41935e[_0x34a6e0(0xf1)]||_0x41935e['ci']||productEnvNames('CI')[_0x34a6e0(0x114)](_0x495a84=>process.env[_0x495a84]===_0x34a6e0(0xe1))||process.env.CI===_0x34a6e0(0xe1)||!process[_0x34a6e0(0x107)][_0x34a6e0(0x103)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x59b218=a64_0x1d9611;if(!process[_0x59b218(0xfd)][_0x59b218(0x103)])return![];try{const _0x3509dc=process[_0x59b218(0xfd)][_0x59b218(0xf4)];return process[_0x59b218(0xfd)][_0x59b218(0xf2)](!![]),process[_0x59b218(0xfd)]['setRawMode'](_0x3509dc??![]),!![];}catch{return![];}}function a64_0x2c1d(){const _0x5666dd=['6165fgXCEi','./constant/domain.js','message','object','true','EACCES','9936570lpRxBY','projectConfig','online','read','format','newConfigFileName','error','utf8','configFileNames','pageSize','1586484YRfJrK','write','empty','local-alias','nonInteractive','setRawMode','1296nEsqdW','isRaw','16tvsxhV','values','trim','setLogPath','slice','1754354dTJOsl','VERBOSE','raw','stdin','daily','FORMAT','runtimeDomain','global','globalConfig','isTTY','ENV','30qQoBMV','production','stdout','string','apiDomain','accessKey','.tmp','top-level','development','cwd','1350774CUmGtC','join','defaultApp','inherit','userDomain','some','authRequired','stringify','riskLevel','high-risk-write','app','project','6228936ptRgtI','parse','APPCODE','find','argv','locale','appcode','apps','env','code','672175CImnMJ','cache'];a64_0x2c1d=function(){return _0x5666dd;};return a64_0x2c1d();}export async function createContext(_0xeed4d8){const _0x524924=a64_0x1d9611,_0x51936a=readRawConfig(),_0x444997=buildConfig(_0x51936a,_0xeed4d8);await initGlobalEnvironment(_0x444997);const {getUserDomain:_0xecb2d1,getApiDomain:_0xbc8d5c}=await import(_0x524924(0xde)),_0x3126ba={'apiDomain':_0xbc8d5c(),'userDomain':_0xecb2d1()},_0x3d9395=await buildAuth(_0x444997);logger[_0x524924(0xf8)](process[_0x524924(0x10e)]());const _0x2e0178=(CLI_BIN_NAME+'\x20'+process[_0x524924(0x11f)][_0x524924(0xf9)](0x2)[_0x524924(0x110)]('\x20'))['trim']();logger['setRawCommand'](_0x2e0178);const _0x10977d=isNonInteractiveMode(_0xeed4d8);return{'config':_0x444997,'auth':_0x3d9395,'logger':logger,'env':_0x3126ba,'nonInteractive':_0x10977d};}export function buildConfigFromFlags(_0x53c8a1){return buildConfig(readRawConfig(),_0x53c8a1);}export function getLocalAppAliases(_0x283ed8){const _0xb0273b=a64_0x1d9611;return _0x283ed8[_0xb0273b(0xd8)]&&typeof _0x283ed8[_0xb0273b(0xd8)]===_0xb0273b(0xe0)?_0x283ed8[_0xb0273b(0xd8)]:{};}export function resolveLocalAppAliasCode(_0x38f625,_0x69acb7){const _0x3ddd9b=a64_0x1d9611;if(!_0x69acb7)return undefined;const _0x4497e7=getLocalAppAliases(_0x38f625)[_0x69acb7],_0x26daf5=_0x4497e7?.[_0x3ddd9b(0xd7)];return typeof _0x26daf5===_0x3ddd9b(0x108)&&_0x26daf5[_0x3ddd9b(0xf7)]()?_0x26daf5[_0x3ddd9b(0xf7)]():undefined;}export function readAppCodeFromConfig(){const _0x27e250=a64_0x1d9611,_0x30c2e4=readRawConfig(),_0x42c18d=_0x30c2e4['appcode']??_0x30c2e4[_0x27e250(0x119)];if(typeof _0x42c18d===_0x27e250(0x108)&&_0x42c18d['trim']())return _0x42c18d['trim']();const _0x483251=resolveLocalAppAliasCode(_0x30c2e4,typeof _0x30c2e4['defaultApp']===_0x27e250(0x108)?_0x30c2e4[_0x27e250(0x111)]:undefined);if(_0x483251)return _0x483251;const _0x5cc29c=normalizeEnv(String(_0x30c2e4[_0x27e250(0xd9)]||_0x27e250(0x106))),_0x5c03d6=isDaily(_0x5cc29c)?'daily':isDev(_0x5cc29c)?_0x27e250(0x10d):'production',_0x2dd41e=resolveCachedAppCode(typeof _0x30c2e4[_0x27e250(0x111)]==='string'?_0x30c2e4[_0x27e250(0x111)]:undefined,_0x5c03d6,typeof _0x30c2e4['accessKey']==='string'?_0x30c2e4[_0x27e250(0x10a)]:undefined);if(_0x2dd41e)return _0x2dd41e;const _0x1a8267=Object[_0x27e250(0xf6)](getLocalAppAliases(_0x30c2e4))[_0x27e250(0x11e)](_0xe0a261=>_0xe0a261?.[_0x27e250(0xd7)]);return typeof _0x1a8267?.[_0x27e250(0xd7)]==='string'&&_0x1a8267['appcode']['trim']()?_0x1a8267[_0x27e250(0xd7)][_0x27e250(0xf7)]():undefined;}export function readScopedConfig(_0x383aca){const _0x351961=a64_0x1d9611,_0x5af41b=_0x383aca['global']?_0x351961(0x101):'project';return readConfigFile(resolveWriteConfigPath(_0x5af41b));}export function writeScopedConfig(_0x4608e5,_0x243789){const _0x435165=a64_0x1d9611,_0x2f9dee=_0x243789['global']?'global':_0x435165(0x11a);writeConfigFile(resolveWriteConfigPath(_0x2f9dee),_0x4608e5);}export async function initGlobalEnvironment(_0x11402c){const _0x3ae67b=a64_0x1d9611,{initEnv:_0x1f8a45}=await import('./constant/env.js');_0x1f8a45(_0x11402c['env']);const {initDomains:_0x5ee9ec}=await import(_0x3ae67b(0xde));_0x5ee9ec({'apiDomain':_0x11402c[_0x3ae67b(0xfc)][_0x3ae67b(0x109)]||_0x11402c[_0x3ae67b(0xfc)]['host']||undefined,'userDomain':_0x11402c[_0x3ae67b(0xfc)][_0x3ae67b(0x113)]||undefined,'runtimeDomain':_0x11402c[_0x3ae67b(0xfc)][_0x3ae67b(0x100)]||undefined,'skillHubDomain':_0x11402c[_0x3ae67b(0xfc)]['skillHubDomain']||undefined});}export function getProjectConfigPath(){const _0x24962=a64_0x1d9611;return resolveConfigPath(process[_0x24962(0x10e)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x29f04c){const _0x4142d4=a64_0x1d9611;if(!existsSync(_0x29f04c))return{'status':'missing'};try{const _0x19ac01=readFileSync(_0x29f04c,{'encoding':_0x4142d4(0xea)});if(!_0x19ac01?.[_0x4142d4(0xf7)]())return{'status':_0x4142d4(0xef)};const _0x1a4449=JSON[_0x4142d4(0x11c)](_0x19ac01);return{'status':'ok','data':_0x1a4449};}catch(_0x231b17){return{'status':_0x4142d4(0xe9),'message':_0x231b17 instanceof Error?_0x231b17[_0x4142d4(0xdf)]:String(_0x231b17)};}}export function loadRawConfigLayers(_0x3c4923){const _0x26e663=a64_0x1d9611;let _0x30f53f={},_0x2c641e={},_0x57db22,_0x54f78b;try{_0x57db22=resolveConfigPath(homedir());if(_0x57db22){const _0x87e914=readFileSync(_0x57db22,{'encoding':'utf8'});if(_0x87e914)_0x30f53f=JSON[_0x26e663(0x11c)](_0x87e914);}}catch{}try{const _0x5b3f2b=_0x3c4923||process['cwd']();_0x54f78b=resolveConfigPath(_0x5b3f2b);if(_0x54f78b){const _0x5eb323=readFileSync(_0x54f78b,{'encoding':_0x26e663(0xea)});if(_0x5eb323)_0x2c641e=JSON[_0x26e663(0x11c)](_0x5eb323);}}catch{}return{'globalPath':_0x57db22,'projectPath':_0x54f78b,'globalConfig':_0x30f53f,'projectConfig':_0x2c641e};}function mergeRawConfigLayers(_0x2d94e3){const _0x34e1aa=a64_0x1d9611,{globalConfig:_0x3fa8ce,projectConfig:_0x35d153}=_0x2d94e3;if(_0x35d153[_0x34e1aa(0x112)]===![]){const _0x29b123={..._0x35d153};return delete _0x29b123[_0x34e1aa(0x112)],_0x29b123;}const _0x89d467={..._0x3fa8ce,..._0x35d153};if('defaultApp'in _0x35d153)_0x89d467[_0x34e1aa(0x111)]=_0x35d153[_0x34e1aa(0x111)];else _0x3fa8ce[_0x34e1aa(0x111)]&&(_0x89d467[_0x34e1aa(0x111)]=_0x3fa8ce[_0x34e1aa(0x111)]);return _0x89d467;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x14b7aa){return mergeRawConfigLayers(loadRawConfigLayers(_0x14b7aa));}export function readRawConfigWithLayers(_0x508de5){const _0x2a3701=loadRawConfigLayers(_0x508de5);return{'config':mergeRawConfigLayers(_0x2a3701),'layers':_0x2a3701};}export function resolveDefaultAppSource(_0x206955){const _0x3babe2=a64_0x1d9611;if(_0x3babe2(0x111)in _0x206955[_0x3babe2(0xe4)])return'project';if(_0x206955[_0x3babe2(0xe4)][_0x3babe2(0x112)]===![])return null;if(_0x206955[_0x3babe2(0x102)]['defaultApp'])return _0x3babe2(0x101);return null;}function buildConfig(_0x1cfb97,_0x4f1a99){const _0x39548e=a64_0x1d9611,_0xa73b9d=_0x1cfb97[_0x39548e(0x111)]||undefined,_0x434545=_0x4f1a99[_0x39548e(0x119)]||env('APP')||undefined,_0x1613c6=_0x434545||_0xa73b9d||undefined,_0x1689b4=env('ACCESS_KEY')||_0x1cfb97['accessKey']||undefined,_0x422cea=_0x4f1a99['env']||env(_0x39548e(0x104))||_0x1cfb97[_0x39548e(0xd9)]||DEFAULT_CONFIG_VALUES[_0x39548e(0xd9)],_0x5795c5=normalizeEnv(String(_0x422cea)),_0x3259af=isDaily(_0x5795c5)?_0x39548e(0xfe):isDev(_0x5795c5)?_0x39548e(0x10d):_0x39548e(0x106),_0x1d474a=resolveLocalAppAliasCode(_0x1cfb97,_0x1613c6),_0x3d1a11=resolveCachedAppCode(_0x1613c6,_0x3259af,_0x1689b4),_0x2c76e5=typeof _0x4f1a99[_0x39548e(0xd7)]===_0x39548e(0x108)?_0x4f1a99[_0x39548e(0xd7)]:undefined,_0x218230=env(_0x39548e(0x11d)),_0x59ac4d=_0x434545?undefined:_0x1cfb97[_0x39548e(0xd7)]||_0x1cfb97['app']||undefined,_0x286b4e=_0x2c76e5||_0x218230||_0x1d474a||_0x3d1a11||_0x59ac4d||undefined,_0xd981c8=_0x2c76e5?'explicit':_0x218230?'env':_0x1d474a?_0x39548e(0xf0):_0x3d1a11?_0x39548e(0xdc):_0x59ac4d?_0x39548e(0x10c):undefined,_0x4c5edf=_0x1cfb97[_0x39548e(0xd6)]||DEFAULT_CONFIG_VALUES[_0x39548e(0xd6)],_0x4b7edf=undefined,_0x4bcea2=_0x4f1a99[_0x39548e(0xe7)]||env(_0x39548e(0xff))||_0x1cfb97[_0x39548e(0xe7)],_0x87fbd8=normalizeLegacyOutputFormat(_0x4bcea2),_0x28ec7f=env('PAGE_SIZE')||_0x1cfb97[_0x39548e(0xec)],_0x4366ca=_0x28ec7f?Number(_0x28ec7f)||undefined:undefined,_0x361669=_0x1cfb97[_0x39548e(0x117)]||_0x1cfb97['maxRisk'],_0x12c808=_0x361669===_0x39548e(0xe6)||_0x361669===_0x39548e(0xee)||_0x361669===_0x39548e(0x118)?_0x361669:DEFAULT_CONFIG_VALUES[_0x39548e(0x117)],_0x5dfd27=env(_0x39548e(0xfb)),_0x23272a=_0x5dfd27==='1'||_0x5dfd27===_0x39548e(0xe1);return{'appCode':typeof _0x286b4e===_0x39548e(0x108)&&_0x286b4e[_0x39548e(0xf7)]()?_0x286b4e[_0x39548e(0xf7)]():undefined,'appCodeSource':_0xd981c8,'env':_0x3259af,'locale':_0x4c5edf,'cookie':_0x4b7edf,'accessKey':_0x1689b4,'format':_0x87fbd8,'pageSize':_0x4366ca,'riskLevel':_0x12c808,'verbose':_0x23272a,'defaultApp':_0xa73b9d,'currentApp':typeof _0x1613c6===_0x39548e(0x108)?_0x1613c6:undefined,'raw':_0x1cfb97};}function env(_0x266464){return productEnv(_0x266464);}async function buildAuth(_0x2704a0){const _0x22d178='',_0x2f9905=!!_0x2704a0['accessKey'];return{'cookie':_0x22d178,'isLoggedIn':_0x2f9905,async 'getOrLogin'(){const _0x782ce=a64_0x26c6;if(_0x2f9905)return _0x22d178;throw CliErrors[_0x782ce(0x115)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x557569,_0x2bf41f){const _0x1d0220=a65_0x336b,_0x40d539=_0x557569();while(!![]){try{const _0x1e3c68=parseInt(_0x1d0220(0x132))/0x1+-parseInt(_0x1d0220(0x10d))/0x2*(-parseInt(_0x1d0220(0x133))/0x3)+-parseInt(_0x1d0220(0x118))/0x4+parseInt(_0x1d0220(0xf4))/0x5*(parseInt(_0x1d0220(0x13c))/0x6)+-parseInt(_0x1d0220(0x14b))/0x7*(parseInt(_0x1d0220(0x12f))/0x8)+-parseInt(_0x1d0220(0xfa))/0x9*(-parseInt(_0x1d0220(0x106))/0xa)+parseInt(_0x1d0220(0x15f))/0xb;if(_0x1e3c68===_0x2bf41f)break;else _0x40d539['push'](_0x40d539['shift']());}catch(_0x425e43){_0x40d539['push'](_0x40d539['shift']());}}}(a65_0x4a6c,0xd22bf));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(_0x4735f8){_activeAK=_0x4735f8||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x69c6da,_0x3f79e2={}){const _0x21446e=a65_0x336b,{method:method='GET',body:_0x218d9f,headers:headers={},timeout:timeout=0x7530}=_0x3f79e2,_0x2248f2=_activeAK,_0x1d24e3=getRuntimeDomain();if(!_0x2248f2)throw CliErrors[_0x21446e(0x109)](_0x21446e(0x136)+PRODUCT_CONFIG[_0x21446e(0x151)]+'.');const _0x20d5c2=''+_0x1d24e3+_0x69c6da,_0x4e2bdf={'X-User-AK':_0x2248f2},_0x3c7ef9=new AbortController(),_0x20894f=setTimeout(()=>_0x3c7ef9[_0x21446e(0x110)](),timeout);try{const _0xb9218f=await fetch(_0x20d5c2,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x21446e(0x116)],..._0x4e2bdf,...headers},'body':_0x218d9f?JSON[_0x21446e(0x10c)](_0x218d9f):undefined,'signal':_0x3c7ef9[_0x21446e(0x16c)]});let _0x3d7eb9;try{_0x3d7eb9=await _0xb9218f[_0x21446e(0x111)]();}catch{throw CliErrors[_0x21446e(0x10e)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0xb9218f[_0x21446e(0x12d)]+')',_0xb9218f[_0x21446e(0x12d)]>=0x190?_0x21446e(0x10b):undefined);}if(!_0xb9218f['ok']||_0x3d7eb9['success']===![])throw CliErrors['apiError'](_0x3d7eb9[_0x21446e(0x101)]||_0x3d7eb9['message']||'API\x20error:\x20'+_0xb9218f['status'],_0x3d7eb9[_0x21446e(0x164)]?_0x21446e(0x11d)+_0x3d7eb9[_0x21446e(0x164)]:undefined);return _0x3d7eb9;}catch(_0x2636be){if(_0x2636be instanceof Error&&_0x2636be[_0x21446e(0x138)]==='AbortError')throw CliErrors[_0x21446e(0x10e)](_0x21446e(0x16d)+_0x20d5c2);throw _0x2636be;}finally{clearTimeout(_0x20894f);}}async function apiBinaryRequest(_0x3d2c76,_0x56bde7={}){const _0x4e3b4f=a65_0x336b,{method:method=_0x4e3b4f(0x161),headers:headers={},timeout:timeout=0x7530}=_0x56bde7,_0x1ae7db=_activeAK,_0x27d1f3=getRuntimeDomain();if(!_0x1ae7db)throw CliErrors[_0x4e3b4f(0x109)](_0x4e3b4f(0x136)+PRODUCT_CONFIG[_0x4e3b4f(0x151)]+'.');const _0x39a6ef=''+_0x27d1f3+_0x3d2c76,_0x52508b=new AbortController(),_0x4d3e5e=setTimeout(()=>_0x52508b[_0x4e3b4f(0x110)](),timeout);try{const _0x4b41d7=await fetch(_0x39a6ef,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x4e3b4f(0x116)],'X-User-AK':_0x1ae7db,...headers},'signal':_0x52508b[_0x4e3b4f(0x16c)]});if(!_0x4b41d7['ok']){let _0x3782e8;try{const _0x583f74=await _0x4b41d7[_0x4e3b4f(0x111)]();_0x3782e8=_0x583f74[_0x4e3b4f(0x101)]||_0x583f74[_0x4e3b4f(0x134)]||_0x583f74[_0x4e3b4f(0x164)];}catch{_0x3782e8=await _0x4b41d7[_0x4e3b4f(0x120)]()[_0x4e3b4f(0x154)](()=>undefined);}throw CliErrors['apiError'](_0x3782e8||_0x4e3b4f(0x128)+_0x4b41d7[_0x4e3b4f(0x12d)],_0x4e3b4f(0x146)+_0x39a6ef);}return Buffer['from'](await _0x4b41d7[_0x4e3b4f(0x12c)]());}catch(_0x184e26){if(_0x184e26 instanceof Error&&_0x184e26[_0x4e3b4f(0x138)]===_0x4e3b4f(0x12a))throw CliErrors[_0x4e3b4f(0x10e)](_0x4e3b4f(0x16d)+_0x39a6ef);throw _0x184e26;}finally{clearTimeout(_0x4d3e5e);}}async function toolboxRequest(_0x2b39d2,_0x40763d,_0x57e471={}){const _0x48a747=a65_0x336b,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x57e471,_0xe6d365=_activeAK;if(!_0xe6d365)throw CliErrors[_0x48a747(0x109)](_0x48a747(0x136)+PRODUCT_CONFIG[_0x48a747(0x151)]+'.');const _0x2ed4b6=getApiDomain()[_0x48a747(0x11e)](/\/$/,''),_0x4a3288=new URL(_0x2b39d2,_0x2ed4b6+'/api/node-toolbox/');if(_0x40763d)for(const [_0x29f527,_0x181ce9]of Object[_0x48a747(0x11b)](_0x40763d)){_0x181ce9!==undefined&&_0x181ce9!==null&&_0x4a3288[_0x48a747(0x14f)][_0x48a747(0x114)](_0x29f527,String(_0x181ce9));}const _0x10e10f=new AbortController(),_0x3a55ce=setTimeout(()=>_0x10e10f[_0x48a747(0x110)](),timeout);try{const _0x3b3c56=await fetch(_0x4a3288,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0xe6d365,...headers},'signal':_0x10e10f[_0x48a747(0x16c)]});let _0x3549d9;try{_0x3549d9=await _0x3b3c56['json']();}catch{throw CliErrors[_0x48a747(0x10e)](_0x48a747(0x14e)+_0x3b3c56[_0x48a747(0x12d)]+')',_0x3b3c56[_0x48a747(0x12d)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x3b3c56['ok']){const _0xb42695=_0x3549d9&&typeof _0x3549d9===_0x48a747(0x150)?_0x3549d9:{};throw CliErrors[_0x48a747(0x10e)](_0xb42695['errorMsg']||_0xb42695[_0x48a747(0x134)]||_0x48a747(0x148)+_0x3b3c56[_0x48a747(0x12d)],_0xb42695[_0x48a747(0x164)]?'Toolbox\x20error\x20code:\x20'+_0xb42695[_0x48a747(0x164)]:undefined);}if(_0x3549d9&&typeof _0x3549d9===_0x48a747(0x150)&&_0x48a747(0x104)in _0x3549d9&&typeof _0x3549d9[_0x48a747(0x104)]===_0x48a747(0x156)){const _0x2e09a2=_0x3549d9;if(!_0x2e09a2[_0x48a747(0x104)])throw CliErrors[_0x48a747(0x10e)](_0x2e09a2[_0x48a747(0x101)]||_0x2e09a2[_0x48a747(0x134)]||_0x48a747(0x15d),_0x2e09a2[_0x48a747(0x164)]?_0x48a747(0x127)+_0x2e09a2[_0x48a747(0x164)]:undefined);return _0x2e09a2[_0x48a747(0x162)];}return _0x3549d9;}catch(_0x16d97c){if(_0x16d97c instanceof Error&&_0x16d97c[_0x48a747(0x138)]===_0x48a747(0x12a))throw CliErrors['apiError'](_0x48a747(0x16d)+_0x4a3288[_0x48a747(0x16b)]());throw _0x16d97c;}finally{clearTimeout(_0x3a55ce);}}async function skillHubJsonRequest(_0x53ee0f,_0xadaef4={}){const _0x178be0=a65_0x336b,{method:method=_0x178be0(0x161),query:_0x5bef4d,body:_0x2a26e3,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0xadaef4,_0x2c79a4=_activeAK;if(!_0x2c79a4)throw CliErrors[_0x178be0(0x109)](_0x178be0(0x136)+PRODUCT_CONFIG[_0x178be0(0x151)]+'.');const _0x5d4354=getSkillHubDomain()[_0x178be0(0x11e)](/\/$/,''),_0x77eaf5=new URL(_0x53ee0f,_0x5d4354+'/');if(_0x5bef4d)for(const [_0x39a380,_0x17c17a]of Object[_0x178be0(0x11b)](_0x5bef4d)){_0x17c17a!==undefined&&_0x17c17a!==null&&_0x77eaf5[_0x178be0(0x14f)][_0x178be0(0x114)](_0x39a380,String(_0x17c17a));}const _0x3d01c6=new AbortController(),_0x494dae=setTimeout(()=>_0x3d01c6['abort'](),timeout);try{const _0x40b750=await fetch(_0x77eaf5[_0x178be0(0x16b)](),{'method':method,'headers':{'Accept':_0x178be0(0x12b),'X-Invoke-Source':PRODUCT_CONFIG[_0x178be0(0x116)],'X-User-AK':_0x2c79a4,...headers},'body':_0x2a26e3,'signal':_0x3d01c6['signal']});let _0x2253f5;try{_0x2253f5=await _0x40b750[_0x178be0(0x111)]();}catch{if(allowNotFound&&_0x40b750[_0x178be0(0x12d)]===0x194)return undefined;throw CliErrors[_0x178be0(0x10e)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x40b750[_0x178be0(0x12d)]+')',_0x40b750[_0x178be0(0x12d)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(allowNotFound&&(_0x40b750[_0x178be0(0x12d)]===0x194||_0x2253f5?.['code']===0x194))return undefined;const _0x1f5b99=!_0x40b750['ok']||_0x2253f5?.[_0x178be0(0x104)]===![]||typeof _0x2253f5?.['code']==='number'&&_0x2253f5[_0x178be0(0x11a)]>=0x190;if(_0x1f5b99)throw CliErrors[_0x178be0(0x10e)](_0x2253f5?.[_0x178be0(0x101)]||_0x2253f5?.['message']||_0x2253f5?.[_0x178be0(0x168)]||'SkillHub\x20API\x20error:\x20'+_0x40b750[_0x178be0(0x12d)],_0x2253f5?.[_0x178be0(0x164)]?'SkillHub\x20error\x20code:\x20'+_0x2253f5[_0x178be0(0x164)]:undefined);return _0x2253f5?.[_0x178be0(0x162)]??_0x2253f5;}catch(_0x30ffa0){if(_0x30ffa0 instanceof Error&&_0x30ffa0['name']===_0x178be0(0x12a))throw CliErrors[_0x178be0(0x10e)](_0x178be0(0x16d)+_0x77eaf5[_0x178be0(0x16b)]());throw _0x30ffa0;}finally{clearTimeout(_0x494dae);}}async function skillHubBinaryRequest(_0x2de72e,_0x4e1a7e={}){const _0x304265=a65_0x336b,{query:_0x2701bc,headers:headers={},timeout:timeout=0x7530}=_0x4e1a7e,_0x11651a=_activeAK;if(!_0x11651a)throw CliErrors[_0x304265(0x109)](_0x304265(0x136)+PRODUCT_CONFIG[_0x304265(0x151)]+'.');const _0x150bcc=getSkillHubDomain()[_0x304265(0x11e)](/\/$/,''),_0x14214f=new URL(_0x2de72e,_0x150bcc+'/');if(_0x2701bc)for(const [_0x309134,_0x4bbff4]of Object[_0x304265(0x11b)](_0x2701bc)){_0x4bbff4!==undefined&&_0x4bbff4!==null&&_0x14214f[_0x304265(0x14f)][_0x304265(0x114)](_0x309134,String(_0x4bbff4));}const _0x1b9904=new AbortController(),_0x1e5eb2=setTimeout(()=>_0x1b9904[_0x304265(0x110)](),timeout);try{const _0x34d580=await fetch(_0x14214f[_0x304265(0x16b)](),{'method':_0x304265(0x161),'headers':{'Accept':_0x304265(0x131),'X-Invoke-Source':PRODUCT_CONFIG[_0x304265(0x116)],'X-User-AK':_0x11651a,...headers},'signal':_0x1b9904['signal']});if(!_0x34d580['ok']){let _0x4b4484;try{const _0x1f185e=await _0x34d580[_0x304265(0x111)]();_0x4b4484=_0x1f185e[_0x304265(0x101)]||_0x1f185e['message']||_0x1f185e[_0x304265(0x168)]||_0x1f185e[_0x304265(0x164)];}catch{_0x4b4484=await _0x34d580[_0x304265(0x120)]()[_0x304265(0x154)](()=>undefined);}throw CliErrors[_0x304265(0x10e)](_0x4b4484||_0x304265(0xf8)+_0x34d580[_0x304265(0x12d)],_0x304265(0x146)+_0x14214f[_0x304265(0x16b)]());}return Buffer[_0x304265(0x103)](await _0x34d580[_0x304265(0x12c)]());}catch(_0x1e11a1){if(_0x1e11a1 instanceof Error&&_0x1e11a1[_0x304265(0x138)]===_0x304265(0x12a))throw CliErrors[_0x304265(0x10e)]('Request\x20timeout:\x20'+_0x14214f[_0x304265(0x16b)]());throw _0x1e11a1;}finally{clearTimeout(_0x1e5eb2);}}export async function getBffScriptInfo(_0x48b796){const _0x24f671=a65_0x336b,_0x20f7e8=await apiRequest(_0x24f671(0x141)+_0x48b796);if(!_0x20f7e8[_0x24f671(0x162)])throw CliErrors[_0x24f671(0x102)](_0x24f671(0x145)+_0x48b796);return _0x20f7e8[_0x24f671(0x162)];}export async function getSqlQueryInfo(_0x5e7405,_0xc6bbbc){const _0x2b0eda=a65_0x336b,_0x16f003=await apiRequest(_0x2b0eda(0x125),{'method':_0x2b0eda(0x113),'body':{'appCode':_0x5e7405,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0xc6bbbc}}),_0x5f2d3e=_0x16f003[_0x2b0eda(0x162)],_0xbabdb6=_0x5f2d3e&&typeof _0x5f2d3e===_0x2b0eda(0x150)&&_0x2b0eda(0x112)in _0x5f2d3e?_0x5f2d3e['tableData']?.[0x0]:_0x5f2d3e&&typeof _0x5f2d3e===_0x2b0eda(0x150)&&_0x2b0eda(0x143)in _0x5f2d3e?_0x5f2d3e:undefined;if(!_0xbabdb6)throw CliErrors[_0x2b0eda(0x102)](_0x2b0eda(0x13b)+_0xc6bbbc);return _0xbabdb6;}function isRemoteAppItem(_0x5a5e8c){const _0x4a7822=a65_0x336b;return!!_0x5a5e8c&&typeof _0x5a5e8c===_0x4a7822(0x150)&&typeof _0x5a5e8c[_0x4a7822(0x13f)]===_0x4a7822(0x122)&&typeof _0x5a5e8c['appName']===_0x4a7822(0x122);}function extractRemoteAppItems(_0x1328b2){const _0xaab7dc=a65_0x336b;if(Array[_0xaab7dc(0x157)](_0x1328b2))return _0x1328b2[_0xaab7dc(0x14a)](isRemoteAppItem);if(!_0x1328b2||typeof _0x1328b2!==_0xaab7dc(0x150))throw CliErrors[_0xaab7dc(0x10e)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x37feee=_0x1328b2;if(Array['isArray'](_0x37feee[_0xaab7dc(0x112)]))return _0x37feee['tableData'][_0xaab7dc(0x14a)](isRemoteAppItem);if(_0x37feee[_0xaab7dc(0x162)]&&typeof _0x37feee['data']==='object'){const _0x8e530a=_0x37feee[_0xaab7dc(0x162)];if(Array['isArray'](_0x8e530a[_0xaab7dc(0x112)]))return _0x8e530a[_0xaab7dc(0x112)][_0xaab7dc(0x14a)](isRemoteAppItem);}throw CliErrors[_0xaab7dc(0x10e)]('Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.');}export async function getMyApps(){const _0x138aeb=a65_0x336b,_0x6f81db=await apiRequest(_0x138aeb(0x10f));return extractRemoteAppItems(_0x6f81db[_0x138aeb(0x162)]);}export async function getLoginUserInfo(){const _0x1d0f6f=a65_0x336b,_0x3fdc89=await apiRequest(_0x1d0f6f(0x153));if(!_0x3fdc89[_0x1d0f6f(0x162)]||typeof _0x3fdc89[_0x1d0f6f(0x162)]!=='object'||Array[_0x1d0f6f(0x157)](_0x3fdc89[_0x1d0f6f(0x162)]))throw CliErrors[_0x1d0f6f(0x10e)](_0x1d0f6f(0x15a));return _0x3fdc89[_0x1d0f6f(0x162)];}export async function listDatasets(_0x41d507,_0x1fd063){const _0x3db486=a65_0x336b,_0x1571ba=await apiRequest(_0x3db486(0x13e),{'method':'POST','body':{'appCode':_0x41d507,..._0x1fd063?.[_0x3db486(0x11a)]&&{'code':_0x1fd063[_0x3db486(0x11a)]},..._0x1fd063?.['name']&&{'name':_0x1fd063['name']}}});return extractList(_0x1571ba[_0x3db486(0x162)]);}export async function getDatasetDetail(_0x1c16cf){const _0x198568=a65_0x336b,_0x3f5023=await apiRequest(_0x198568(0x10a)+encodeURIComponent(_0x1c16cf));return _0x3f5023[_0x198568(0x162)];}export async function getDatasetSdkUsageDoc(_0x3446d4,_0x3d6e0e){const _0x3df2e0=a65_0x336b,_0x187a39=await toolboxRequest(_0x3df2e0(0x144),{'datasetCode':_0x3446d4,'appCode':_0x3d6e0e});return typeof _0x187a39?.[_0x3df2e0(0x16a)]===_0x3df2e0(0x122)?_0x187a39[_0x3df2e0(0x16a)]:'';}export async function listRuntimeArtifacts(_0x17eb8d,_0x3d4eb0){const _0x3c19fd=a65_0x336b,_0x391dc4=new URLSearchParams({'appCode':_0x17eb8d});if(_0x3d4eb0?.[_0x3c19fd(0x147)])_0x391dc4[_0x3c19fd(0x114)](_0x3c19fd(0x147),_0x3d4eb0[_0x3c19fd(0x147)]);if(_0x3d4eb0?.[_0x3c19fd(0x166)])_0x391dc4[_0x3c19fd(0x114)]('source',_0x3d4eb0['source']);if(_0x3d4eb0?.[_0x3c19fd(0x15c)]!==undefined)_0x391dc4[_0x3c19fd(0x114)]('favorite',String(_0x3d4eb0[_0x3c19fd(0x15c)]));const _0x1194a0=await apiRequest(_0x3c19fd(0x117)+_0x391dc4[_0x3c19fd(0x16b)]());return Array[_0x3c19fd(0x157)](_0x1194a0[_0x3c19fd(0x162)])?_0x1194a0[_0x3c19fd(0x162)]:[];}export async function getRuntimeArtifact(_0x44666d,_0x3de3c3){const _0x2184fc=a65_0x336b,_0x53e59d=await apiRequest(_0x2184fc(0x119)+_0x44666d+_0x2184fc(0x149)+encodeURIComponent(_0x3de3c3));if(!_0x53e59d[_0x2184fc(0x162)])throw CliErrors[_0x2184fc(0x102)](_0x2184fc(0xf9)+_0x44666d);return _0x53e59d[_0x2184fc(0x162)];}export async function createRuntimeArtifact(_0x4bb923,_0x266327){const _0x3a4e3e=a65_0x336b,_0x1fcde8=await apiRequest(_0x3a4e3e(0x169),{'method':'POST','body':{'appCode':_0x4bb923,..._0x266327}});return _0x1fcde8['data'];}export async function updateRuntimeArtifact(_0x25ffb1,_0x38c775,_0x37c08e){const _0x3cac36=a65_0x336b,_0x1d37d7=await apiRequest(_0x3cac36(0x119)+_0x25ffb1+'/update',{'method':_0x3cac36(0x113),'body':{'appCode':_0x38c775,..._0x37c08e}});return _0x1d37d7['data'];}export async function listPersonalBffs(_0x42d8b9){const _0x1040d7=a65_0x336b,_0x5a7900=await apiRequest(_0x1040d7(0x16e)+encodeURIComponent(_0x42d8b9));return Array['isArray'](_0x5a7900['data'])?_0x5a7900[_0x1040d7(0x162)]:[];}export async function getPersonalBff(_0x4ffb1a,_0xd72b0a){const _0x2b05ba=a65_0x336b,_0x53c239=await apiRequest(_0x2b05ba(0x129)+_0x4ffb1a+'?appCode='+encodeURIComponent(_0xd72b0a));if(!_0x53c239['data'])throw CliErrors[_0x2b05ba(0x102)]('Personal\x20BFF\x20not\x20found:\x20id='+_0x4ffb1a);return _0x53c239[_0x2b05ba(0x162)];}export async function createPersonalBff(_0x47fcbd,_0x2d0f4e){const _0x4ca2c8=a65_0x336b,_0x4932c4=await apiRequest('/client/runtime-bff/personal/create',{'method':'POST','body':{'appCode':_0x47fcbd,..._0x2d0f4e}});return _0x4932c4[_0x4ca2c8(0x162)];}function a65_0x336b(_0x5d623a,_0x38287e){_0x5d623a=_0x5d623a-0xf4;const _0x4a6cbf=a65_0x4a6c();let _0x336bf4=_0x4a6cbf[_0x5d623a];return _0x336bf4;}export async function updatePersonalBff(_0x2064be,_0x91bbda,_0x2cd040){const _0x52f573=a65_0x336b,_0x200b2c=await apiRequest(_0x52f573(0x129)+_0x2064be+_0x52f573(0xff),{'method':'POST','body':{'appCode':_0x91bbda,..._0x2cd040}});return _0x200b2c[_0x52f573(0x162)];}export async function executePersonalBff(_0x53af65,_0x41122f,_0x20ef40){const _0x2e6ea3=a65_0x336b,_0x2d53ac=await apiRequest(_0x2e6ea3(0x129)+_0x53af65+'/execute?appCode='+encodeURIComponent(_0x41122f),{'method':'POST','body':_0x20ef40});return _0x2d53ac[_0x2e6ea3(0x162)];}export async function listPersonalKnowledgeBaseItems(_0x52deab){const _0x21bf49=a65_0x336b,_0x15a878=await apiRequest('/client/knowledge-base/personal/list?appCode='+encodeURIComponent(_0x52deab));return Array[_0x21bf49(0x157)](_0x15a878[_0x21bf49(0x162)])?_0x15a878[_0x21bf49(0x162)]:[];}export async function getPersonalKnowledgeBaseItem(_0x10c2f4,_0x4224bf){const _0x201f32=a65_0x336b,_0x2be1cb=await apiRequest(_0x201f32(0xfe)+_0x10c2f4+_0x201f32(0x149)+encodeURIComponent(_0x4224bf));if(!_0x2be1cb[_0x201f32(0x162)])throw CliErrors[_0x201f32(0x102)](_0x201f32(0x14c)+_0x10c2f4);return _0x2be1cb[_0x201f32(0x162)];}export async function createPersonalKnowledgeBaseItem(_0x570143,_0x36881a){const _0x13c77c=a65_0x336b,_0x55f1cd=await apiRequest(_0x13c77c(0x165),{'method':'POST','body':{'appCode':_0x570143,..._0x36881a}});return _0x55f1cd['data'];}export async function updatePersonalKnowledgeBaseItem(_0x5f5b5d,_0x12ba4a,_0xc07540){const _0xe722d4=a65_0x336b,_0x42929e=await apiRequest('/client/knowledge-base/personal/'+_0x5f5b5d+_0xe722d4(0xff),{'method':_0xe722d4(0x113),'body':{'appCode':_0x12ba4a,..._0xc07540}});return _0x42929e['data'];}export async function searchKnowledgeBase(_0x2df558,_0xe25c6f){const _0x5e906d=a65_0x336b,_0x4ee5e5=await apiRequest('/client/knowledge-base/search',{'method':_0x5e906d(0x113),'body':{'appCode':_0x2df558,'query':_0xe25c6f[_0x5e906d(0xf5)],..._0xe25c6f['topK']!==undefined?{'topK':_0xe25c6f['topK']}:{}}});return Array[_0x5e906d(0x157)](_0x4ee5e5[_0x5e906d(0x162)])?_0x4ee5e5[_0x5e906d(0x162)]:[];}export async function getRuntimeSkillByCode(_0x49d181,_0x41363d){const _0x421311=a65_0x336b,_0x31473c=await skillHubJsonRequest(_0x421311(0x137)+encodeURIComponent(_0x49d181)+'/'+encodeURIComponent(_0x41363d),{'allowNotFound':!![]});return _0x31473c?skillHubRuntimeDetailToRuntimeSkill(_0x31473c):undefined;}export async function listRuntimeSkills(_0x5ad433){const _0x4f4903=a65_0x336b,_0x235eb1=await skillHubJsonRequest(_0x4f4903(0xf6)+encodeURIComponent(_0x5ad433[_0x4f4903(0x13f)])+_0x4f4903(0x15b),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x5ad433['appCode'],_0x235eb1,_0x5ad433[_0x4f4903(0x140)]??_0x4f4903(0x15e),_0x5ad433[_0x4f4903(0x11a)]);}export async function listPersonalRuntimeSkills(_0x6246d8){const _0x4fc92b=a65_0x336b;return(await listRuntimeSkills({'appCode':_0x6246d8,'scope':_0x4fc92b(0x123)}))[_0x4fc92b(0x123)];}function a65_0x4a6c(){const _0x18fde4=['/client/bff/query/','.zip','sqlCode','api-doc-generator','BFF\x20script\x20not\x20found:\x20id=','Download\x20failed:\x20','artifactType','Toolbox\x20API\x20error:\x20','?appCode=','filter','7769041TAvZpK','Knowledge-base\x20entry\x20not\x20found:\x20id=','packageBase64','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','searchParams','object','newConfigFileName','map','/client/user/loginUserInfo','catch','base64','boolean','isArray','tags','/versions/','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','/skills','favorite','Toolbox\x20API\x20error','all','17377008gVquDX','description','GET','data','/api/cli/v1/skills/','errorCode','/client/knowledge-base/personal/create','source','/download','msg','/client/artifact/create','markdown','toString','signal','Request\x20timeout:\x20','/client/runtime-bff/personal/list?appCode=','25qyXMLl','query','/api/runtime/v1/namespaces/','company','SkillHub\x20API\x20error:\x20','Artifact\x20not\x20found:\x20id=','9fnvGHx','items','application/zip','skillCode','/client/knowledge-base/personal/','/update','version','errorMsg','validation','from','success','content','4043590dcGkZb','skillName','visibility','authRequired','/client/dataset/get-driven-data?code=','Check\x20your\x20credentials\x20and\x20try\x20again.','stringify','103406ZXSpmE','apiError','/client/app/my-apps','abort','json','tableData','POST','set','slug','invokeSource','/client/artifact/list?','6256904ozniZv','/client/artifact/','code','entries','NAMESPACE_ONLY','API\x20error\x20code:\x20','replace','displayName','text','values','string','personal','namespace','/client/sql/query','undefined','Toolbox\x20error\x20code:\x20','API\x20error:\x20','/client/runtime-bff/personal/','AbortError','application/json','arrayBuffer','status','file','8AIOxYZ','effective','application/octet-stream','39867boPRwJ','3UsYoJI','message','toLowerCase','Configure\x20accessKey\x20in\x20','/api/v1/skills/','name','PRIVATE','summary','SQL\x20query\x20not\x20found:\x20','1751154xpGSge','trim','/client/dataset/list','appCode','scope'];a65_0x4a6c=function(){return _0x18fde4;};return a65_0x4a6c();}export async function listCompanyRuntimeSkills(_0x17cf22){const _0x53152c=a65_0x336b;return(await listRuntimeSkills({'appCode':_0x17cf22,'scope':_0x53152c(0xf7)}))[_0x53152c(0xf7)];}export async function listVisibleRuntimeSkills(_0x25fefb){const _0x331ec5=a65_0x336b;return(await listRuntimeSkills({'appCode':_0x25fefb,'scope':_0x331ec5(0x15e)}))['effective'];}export async function createPersonalRuntimeSkill(_0x3269b8,_0x5dff7f){return publishRuntimeSkill(_0x3269b8,_0x5dff7f);}export async function updatePersonalRuntimeSkill(_0x5c005c,_0xbb39f5,_0x434225){const _0x4d4dda=a65_0x336b;return publishRuntimeSkill(_0xbb39f5,{..._0x434225,'skillCode':_0x434225[_0x4d4dda(0xfd)]??_0x5c005c});}export async function downloadRuntimeSkillPackage(_0x4189b9,_0x119df0,_0x3830fd,_0x26d398){const _0x20214f=a65_0x336b;void _0x4189b9;const _0x1f1b0f=_0x26d398?'/api/cli/v1/skills/'+encodeURIComponent(_0x3830fd)+'/'+encodeURIComponent(_0x119df0)+_0x20214f(0x159)+encodeURIComponent(_0x26d398)+_0x20214f(0x167):_0x20214f(0x163)+encodeURIComponent(_0x3830fd)+'/'+encodeURIComponent(_0x119df0)+'/download';return skillHubBinaryRequest(_0x1f1b0f);}async function publishRuntimeSkill(_0x114e1b,_0x482d7c){const _0x2569bd=a65_0x336b,_0x28f214=new FormData();_0x28f214[_0x2569bd(0x114)](_0x2569bd(0x12e),runtimeSkillPackageFile(_0x482d7c)),_0x28f214['set']('visibility',_0x2569bd(0x139));const _0x24d231=await skillHubJsonRequest(_0x2569bd(0x163)+encodeURIComponent(_0x114e1b)+'/publish',{'method':_0x2569bd(0x113),'body':_0x28f214});return{'appCode':_0x24d231[_0x2569bd(0x124)]??_0x114e1b,'skillCode':_0x24d231['slug']??_0x482d7c[_0x2569bd(0xfd)]??'','skillName':_0x482d7c[_0x2569bd(0x107)]??_0x24d231['slug']??_0x482d7c[_0x2569bd(0xfd)],'description':_0x482d7c[_0x2569bd(0x160)],'scope':skillHubVisibilityToScope(_0x24d231['visibility'])??_0x2569bd(0x123),'version':_0x24d231[_0x2569bd(0x100)]??_0x482d7c[_0x2569bd(0x100)],'tags':_0x482d7c[_0x2569bd(0x158)],'content':_0x482d7c[_0x2569bd(0x105)]};}function runtimeSkillPackageFile(_0x2af3d1){const _0x130128=a65_0x336b;if(!_0x2af3d1[_0x130128(0x14d)])throw CliErrors[_0x130128(0x102)]('Missing\x20Skill\x20package\x20payload.');const _0x132968=Buffer[_0x130128(0x103)](_0x2af3d1[_0x130128(0x14d)],_0x130128(0x155)),_0x42e1bb=new Blob([_0x132968],{'type':_0x130128(0xfc)}),_0x3c3915=(_0x2af3d1[_0x130128(0xfd)]||'skill')+_0x130128(0x142);if(typeof File!==_0x130128(0x126))return new File([_0x42e1bb],_0x3c3915,{'type':'application/zip'});return _0x42e1bb;}function normalizeSkillHubRuntimeListResponse(_0x5b7823,_0xbf743c,_0x442529,_0x15ce0a){const _0x3db051=a65_0x336b,_0x28deb1=Array[_0x3db051(0x157)](_0xbf743c)?_0xbf743c:Array[_0x3db051(0x157)](_0xbf743c?.[_0x3db051(0xfb)])?_0xbf743c[_0x3db051(0xfb)]:[],_0x2bc20c=_0x15ce0a?.['trim'](),_0x367b7b=_0x28deb1['filter'](_0x2ff3a9=>!_0x2bc20c||_0x2ff3a9[_0x3db051(0x115)]===_0x2bc20c)[_0x3db051(0x152)](skillHubRuntimeItemToRuntimeSkill)[_0x3db051(0x14a)](_0x171cea=>Boolean(_0x171cea)),_0x1363c8=_0x367b7b[_0x3db051(0x14a)](_0x3c009d=>_0x3c009d[_0x3db051(0x140)]===_0x3db051(0x123)),_0x3f6bfd=_0x367b7b[_0x3db051(0x14a)](_0x22b906=>_0x22b906[_0x3db051(0x140)]==='company');return{'appCode':_0x5b7823,'personal':_0x442529===_0x3db051(0xf7)?[]:_0x1363c8,'company':_0x442529==='personal'?[]:_0x3f6bfd,'effective':buildEffectiveRuntimeSkills(_0x1363c8,_0x3f6bfd,_0x442529)};}function skillHubRuntimeItemToRuntimeSkill(_0xaca4c4){const _0x1a1665=a65_0x336b,_0x4204e2=_0xaca4c4[_0x1a1665(0x115)]?.[_0x1a1665(0x13d)](),_0x5e290e=skillHubVisibilityToScope(_0xaca4c4[_0x1a1665(0x108)]);if(!_0x4204e2||!_0x5e290e)return undefined;return{'id':_0xaca4c4['id'],'appCode':_0xaca4c4[_0x1a1665(0x124)],'skillCode':_0x4204e2,'skillName':_0xaca4c4[_0x1a1665(0x11f)]??_0x4204e2,'description':_0xaca4c4[_0x1a1665(0x13a)],'scope':_0x5e290e,'version':skillHubRuntimeItemVersion(_0xaca4c4),'status':_0xaca4c4[_0x1a1665(0x12d)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x3516f0){const _0x1c56af=a65_0x336b,_0x3ab44c=_0x3516f0[_0x1c56af(0x115)]?.['trim']();if(!_0x3ab44c)return undefined;return{'id':_0x3516f0['id'],'appCode':_0x3516f0[_0x1c56af(0x124)],'skillCode':_0x3ab44c,'skillName':_0x3516f0[_0x1c56af(0x11f)]??_0x3ab44c,'description':_0x3516f0[_0x1c56af(0x13a)],'scope':skillHubVisibilityToScope(_0x3516f0[_0x1c56af(0x108)])??_0x3516f0[_0x1c56af(0x108)]?.[_0x1c56af(0x135)](),'version':skillHubRuntimeItemVersion(_0x3516f0),'status':_0x3516f0[_0x1c56af(0x12d)]};}function skillHubVisibilityToScope(_0x860398){const _0x464a1b=a65_0x336b;if(_0x860398==='PRIVATE')return _0x464a1b(0x123);if(_0x860398===_0x464a1b(0x11c))return'company';return undefined;}function skillHubRuntimeItemVersion(_0x3413c1){const _0xaa7280=a65_0x336b;return _0x3413c1['publishedVersion']?.[_0xaa7280(0x100)]??_0x3413c1['headlineVersion']?.[_0xaa7280(0x100)]??_0x3413c1['ownerPreviewVersion']?.[_0xaa7280(0x100)];}function buildEffectiveRuntimeSkills(_0x7f8eb1,_0x53e377,_0x471878){const _0x49b444=a65_0x336b;if(_0x471878===_0x49b444(0x123))return _0x7f8eb1;if(_0x471878===_0x49b444(0xf7))return _0x53e377;const _0x395a09=new Map();for(const _0x3a29ae of _0x53e377){_0x395a09[_0x49b444(0x114)](_0x3a29ae['skillCode'],_0x3a29ae);}for(const _0x129d79 of _0x7f8eb1){_0x395a09[_0x49b444(0x114)](_0x129d79['skillCode'],_0x129d79);}return Array[_0x49b444(0x103)](_0x395a09[_0x49b444(0x121)]());}function normalizeRuntimeSkillListResponse(_0x420f6a,_0x2c0b67){const _0x53c5d7=a65_0x336b;if(Array[_0x53c5d7(0x157)](_0x2c0b67)){const _0x619630=_0x2c0b67[_0x53c5d7(0x14a)](_0x1006ed=>_0x1006ed[_0x53c5d7(0x140)]===_0x53c5d7(0x123)),_0x2712bb=_0x2c0b67[_0x53c5d7(0x14a)](_0x3e5f04=>_0x3e5f04['scope']===_0x53c5d7(0xf7));return{'appCode':_0x420f6a,'personal':_0x619630,'company':_0x2712bb,'effective':[..._0x2712bb,..._0x619630]};}return{'appCode':_0x2c0b67?.[_0x53c5d7(0x13f)]??_0x420f6a,'personal':Array['isArray'](_0x2c0b67?.[_0x53c5d7(0x123)])?_0x2c0b67[_0x53c5d7(0x123)]:[],'company':Array[_0x53c5d7(0x157)](_0x2c0b67?.[_0x53c5d7(0xf7)])?_0x2c0b67[_0x53c5d7(0xf7)]:[],'effective':Array[_0x53c5d7(0x157)](_0x2c0b67?.['effective'])?_0x2c0b67[_0x53c5d7(0x130)]:[]};}
|
|
1
|
+
(function(_0x1bc23e,_0x7682d6){const _0x8f8979=a65_0x3cc6,_0x44afdc=_0x1bc23e();while(!![]){try{const _0x105eb6=-parseInt(_0x8f8979(0x18c))/0x1+-parseInt(_0x8f8979(0x147))/0x2+-parseInt(_0x8f8979(0x141))/0x3*(-parseInt(_0x8f8979(0x14a))/0x4)+-parseInt(_0x8f8979(0x18e))/0x5*(parseInt(_0x8f8979(0x189))/0x6)+parseInt(_0x8f8979(0x17d))/0x7*(-parseInt(_0x8f8979(0x1b1))/0x8)+parseInt(_0x8f8979(0x160))/0x9*(parseInt(_0x8f8979(0x15c))/0xa)+parseInt(_0x8f8979(0x1a6))/0xb*(parseInt(_0x8f8979(0x1a2))/0xc);if(_0x105eb6===_0x7682d6)break;else _0x44afdc['push'](_0x44afdc['shift']());}catch(_0x103cd2){_0x44afdc['push'](_0x44afdc['shift']());}}}(a65_0x5cd6,0xc808a));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(_0x2b90b9){_activeAK=_0x2b90b9||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x4a562c,_0x30c6bf={}){const _0x173879=a65_0x3cc6,{method:method='GET',body:_0x4a241d,headers:headers={},timeout:timeout=0x7530}=_0x30c6bf,_0xbf03df=_activeAK,_0x559967=getRuntimeDomain();if(!_0xbf03df)throw CliErrors[_0x173879(0x148)](_0x173879(0x1b6)+PRODUCT_CONFIG[_0x173879(0x182)]+'.');const _0x55361a=''+_0x559967+_0x4a562c,_0x1dfbd2={'X-User-AK':_0xbf03df},_0x33be51=new AbortController(),_0x53b6a6=setTimeout(()=>_0x33be51['abort'](),timeout);try{const _0x123a44=await fetch(_0x55361a,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x173879(0x186)],..._0x1dfbd2,...headers},'body':_0x4a241d?JSON[_0x173879(0x17e)](_0x4a241d):undefined,'signal':_0x33be51[_0x173879(0x19a)]});let _0x23bd26;try{_0x23bd26=await _0x123a44[_0x173879(0x16c)]();}catch{throw CliErrors['apiError']('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x123a44[_0x173879(0x142)]+')',_0x123a44[_0x173879(0x142)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x123a44['ok']||_0x23bd26['success']===![])throw CliErrors['apiError'](_0x23bd26['errorMsg']||_0x23bd26[_0x173879(0x158)]||_0x173879(0x166)+_0x123a44[_0x173879(0x142)],_0x23bd26[_0x173879(0x1af)]?'API\x20error\x20code:\x20'+_0x23bd26[_0x173879(0x1af)]:undefined);return _0x23bd26;}catch(_0x52f905){if(_0x52f905 instanceof Error&&_0x52f905['name']===_0x173879(0x193))throw CliErrors[_0x173879(0x1ae)](_0x173879(0x159)+_0x55361a);throw _0x52f905;}finally{clearTimeout(_0x53b6a6);}}async function apiBinaryRequest(_0xe61286,_0x5afb25={}){const _0x2b595a=a65_0x3cc6,{method:method=_0x2b595a(0x146),headers:headers={},timeout:timeout=0x7530}=_0x5afb25,_0x5970cf=_activeAK,_0x265389=getRuntimeDomain();if(!_0x5970cf)throw CliErrors[_0x2b595a(0x148)](_0x2b595a(0x1b6)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x20edee=''+_0x265389+_0xe61286,_0x3b7f79=new AbortController(),_0x29e751=setTimeout(()=>_0x3b7f79[_0x2b595a(0x155)](),timeout);try{const _0x44f31a=await fetch(_0x20edee,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x5970cf,...headers},'signal':_0x3b7f79[_0x2b595a(0x19a)]});if(!_0x44f31a['ok']){let _0x56a65f;try{const _0x54eee3=await _0x44f31a['json']();_0x56a65f=_0x54eee3[_0x2b595a(0x19c)]||_0x54eee3['message']||_0x54eee3[_0x2b595a(0x1af)];}catch{_0x56a65f=await _0x44f31a['text']()['catch'](()=>undefined);}throw CliErrors[_0x2b595a(0x1ae)](_0x56a65f||_0x2b595a(0x166)+_0x44f31a[_0x2b595a(0x142)],_0x2b595a(0x14b)+_0x20edee);}return Buffer[_0x2b595a(0x195)](await _0x44f31a[_0x2b595a(0x153)]());}catch(_0x205d9f){if(_0x205d9f instanceof Error&&_0x205d9f['name']===_0x2b595a(0x193))throw CliErrors['apiError'](_0x2b595a(0x159)+_0x20edee);throw _0x205d9f;}finally{clearTimeout(_0x29e751);}}async function toolboxRequest(_0x5e49f1,_0x2e0963,_0x7044e6={}){const _0x40d40e=a65_0x3cc6,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x7044e6,_0x4e50da=_activeAK;if(!_0x4e50da)throw CliErrors[_0x40d40e(0x148)](_0x40d40e(0x1b6)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x1d5a3a=getApiDomain()[_0x40d40e(0x162)](/\/$/,''),_0x1a3477=new URL(_0x5e49f1,_0x1d5a3a+_0x40d40e(0x179));if(_0x2e0963)for(const [_0x1cec46,_0x14aa81]of Object[_0x40d40e(0x1a5)](_0x2e0963)){_0x14aa81!==undefined&&_0x14aa81!==null&&_0x1a3477[_0x40d40e(0x16a)][_0x40d40e(0x1b7)](_0x1cec46,String(_0x14aa81));}const _0x485393=new AbortController(),_0x5d0991=setTimeout(()=>_0x485393[_0x40d40e(0x155)](),timeout);try{const _0x4b366e=await fetch(_0x1a3477,{'method':method,'headers':{'Content-Type':_0x40d40e(0x192),'X-Invoke-Source':PRODUCT_CONFIG[_0x40d40e(0x186)],'X-User-AK':_0x4e50da,...headers},'signal':_0x485393[_0x40d40e(0x19a)]});let _0x585a35;try{_0x585a35=await _0x4b366e[_0x40d40e(0x16c)]();}catch{throw CliErrors[_0x40d40e(0x1ae)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x4b366e[_0x40d40e(0x142)]+')',_0x4b366e['status']>=0x190?_0x40d40e(0x188):undefined);}if(!_0x4b366e['ok']){const _0x3f1e12=_0x585a35&&typeof _0x585a35===_0x40d40e(0x18f)?_0x585a35:{};throw CliErrors[_0x40d40e(0x1ae)](_0x3f1e12[_0x40d40e(0x19c)]||_0x3f1e12[_0x40d40e(0x158)]||_0x40d40e(0x1b2)+_0x4b366e[_0x40d40e(0x142)],_0x3f1e12['errorCode']?_0x40d40e(0x173)+_0x3f1e12['errorCode']:undefined);}if(_0x585a35&&typeof _0x585a35===_0x40d40e(0x18f)&&_0x40d40e(0x172)in _0x585a35&&typeof _0x585a35[_0x40d40e(0x172)]===_0x40d40e(0x16e)){const _0x2c77f9=_0x585a35;if(!_0x2c77f9[_0x40d40e(0x172)])throw CliErrors[_0x40d40e(0x1ae)](_0x2c77f9[_0x40d40e(0x19c)]||_0x2c77f9[_0x40d40e(0x158)]||_0x40d40e(0x175),_0x2c77f9[_0x40d40e(0x1af)]?_0x40d40e(0x173)+_0x2c77f9[_0x40d40e(0x1af)]:undefined);return _0x2c77f9[_0x40d40e(0x176)];}return _0x585a35;}catch(_0x40043b){if(_0x40043b instanceof Error&&_0x40043b[_0x40d40e(0x145)]==='AbortError')throw CliErrors[_0x40d40e(0x1ae)](_0x40d40e(0x159)+_0x1a3477[_0x40d40e(0x1ac)]());throw _0x40043b;}finally{clearTimeout(_0x5d0991);}}async function skillHubJsonRequest(_0x131ccd,_0x38b26a={}){const _0x2fafcc=a65_0x3cc6,{method:method=_0x2fafcc(0x146),query:_0x1e8a45,body:_0xd935d8,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x38b26a,_0x4aba07=_activeAK;if(!_0x4aba07)throw CliErrors[_0x2fafcc(0x148)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x2fafcc(0x182)]+'.');const _0x3a8368=getSkillHubDomain()[_0x2fafcc(0x162)](/\/$/,''),_0x3568ea=new URL(_0x131ccd,_0x3a8368+'/');if(_0x1e8a45)for(const [_0x110a2b,_0x1cc26f]of Object['entries'](_0x1e8a45)){_0x1cc26f!==undefined&&_0x1cc26f!==null&&_0x3568ea[_0x2fafcc(0x16a)][_0x2fafcc(0x1b7)](_0x110a2b,String(_0x1cc26f));}const _0x5742cf=new AbortController(),_0x1f3bfc=setTimeout(()=>_0x5742cf[_0x2fafcc(0x155)](),timeout);try{const _0x1225fc=await fetch(_0x3568ea[_0x2fafcc(0x1ac)](),{'method':method,'headers':{'Accept':_0x2fafcc(0x192),'X-Invoke-Source':PRODUCT_CONFIG[_0x2fafcc(0x186)],'X-User-AK':_0x4aba07,...headers},'body':_0xd935d8,'signal':_0x5742cf[_0x2fafcc(0x19a)]});let _0x514e03;try{_0x514e03=await _0x1225fc['json']();}catch{if(allowNotFound&&_0x1225fc[_0x2fafcc(0x142)]===0x194)return undefined;throw CliErrors[_0x2fafcc(0x1ae)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x1225fc[_0x2fafcc(0x142)]+')',_0x1225fc[_0x2fafcc(0x142)]>=0x190?_0x2fafcc(0x188):undefined);}if(allowNotFound&&(_0x1225fc[_0x2fafcc(0x142)]===0x194||_0x514e03?.[_0x2fafcc(0x19b)]===0x194))return undefined;const _0x4b9a4f=!_0x1225fc['ok']||_0x514e03?.[_0x2fafcc(0x172)]===![]||typeof _0x514e03?.['code']===_0x2fafcc(0x1a8)&&_0x514e03[_0x2fafcc(0x19b)]>=0x190;if(_0x4b9a4f)throw CliErrors[_0x2fafcc(0x1ae)](_0x514e03?.['errorMsg']||_0x514e03?.[_0x2fafcc(0x158)]||_0x514e03?.['msg']||_0x2fafcc(0x149)+_0x1225fc[_0x2fafcc(0x142)],_0x514e03?.[_0x2fafcc(0x1af)]?_0x2fafcc(0x19f)+_0x514e03[_0x2fafcc(0x1af)]:undefined);return _0x514e03?.[_0x2fafcc(0x176)]??_0x514e03;}catch(_0x93df50){if(_0x93df50 instanceof Error&&_0x93df50[_0x2fafcc(0x145)]===_0x2fafcc(0x193))throw CliErrors[_0x2fafcc(0x1ae)](_0x2fafcc(0x159)+_0x3568ea[_0x2fafcc(0x1ac)]());throw _0x93df50;}finally{clearTimeout(_0x1f3bfc);}}async function skillHubBinaryRequest(_0x2bb52f,_0x13b136={}){const _0x4dbfc6=a65_0x3cc6,{query:_0x7e26b3,headers:headers={},timeout:timeout=0x7530}=_0x13b136,_0x7637cf=_activeAK;if(!_0x7637cf)throw CliErrors['authRequired'](_0x4dbfc6(0x1b6)+PRODUCT_CONFIG[_0x4dbfc6(0x182)]+'.');const _0x4adca0=getSkillHubDomain()['replace'](/\/$/,''),_0x3ac85f=new URL(_0x2bb52f,_0x4adca0+'/');if(_0x7e26b3)for(const [_0x2809e5,_0x6a321c]of Object[_0x4dbfc6(0x1a5)](_0x7e26b3)){_0x6a321c!==undefined&&_0x6a321c!==null&&_0x3ac85f['searchParams'][_0x4dbfc6(0x1b7)](_0x2809e5,String(_0x6a321c));}const _0xa1046b=new AbortController(),_0x3718f3=setTimeout(()=>_0xa1046b[_0x4dbfc6(0x155)](),timeout);try{const _0x43ea13=await fetch(_0x3ac85f[_0x4dbfc6(0x1ac)](),{'method':'GET','headers':{'Accept':_0x4dbfc6(0x197),'X-Invoke-Source':PRODUCT_CONFIG[_0x4dbfc6(0x186)],'X-User-AK':_0x7637cf,...headers},'signal':_0xa1046b[_0x4dbfc6(0x19a)]});if(!_0x43ea13['ok']){let _0x5c5e2e;try{const _0x271277=await _0x43ea13[_0x4dbfc6(0x16c)]();_0x5c5e2e=_0x271277[_0x4dbfc6(0x19c)]||_0x271277[_0x4dbfc6(0x158)]||_0x271277[_0x4dbfc6(0x1b5)]||_0x271277[_0x4dbfc6(0x1af)];}catch{_0x5c5e2e=await _0x43ea13[_0x4dbfc6(0x183)]()[_0x4dbfc6(0x177)](()=>undefined);}throw CliErrors[_0x4dbfc6(0x1ae)](_0x5c5e2e||_0x4dbfc6(0x149)+_0x43ea13[_0x4dbfc6(0x142)],_0x4dbfc6(0x14b)+_0x3ac85f['toString']());}return Buffer['from'](await _0x43ea13[_0x4dbfc6(0x153)]());}catch(_0x561b47){if(_0x561b47 instanceof Error&&_0x561b47[_0x4dbfc6(0x145)]==='AbortError')throw CliErrors['apiError'](_0x4dbfc6(0x159)+_0x3ac85f[_0x4dbfc6(0x1ac)]());throw _0x561b47;}finally{clearTimeout(_0x3718f3);}}export async function getBffScriptInfo(_0x16d4cc){const _0x4c7215=a65_0x3cc6,_0x2ad30b=await apiRequest(_0x4c7215(0x18b)+_0x16d4cc);if(!_0x2ad30b['data'])throw CliErrors[_0x4c7215(0x165)]('BFF\x20script\x20not\x20found:\x20id='+_0x16d4cc);return _0x2ad30b[_0x4c7215(0x176)];}export async function getSqlQueryInfo(_0x2ec7d8,_0x1916ad){const _0x2e7f14=a65_0x3cc6,_0x49df03=await apiRequest(_0x2e7f14(0x17c),{'method':_0x2e7f14(0x15b),'body':{'appCode':_0x2ec7d8,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x1916ad}}),_0x22c9b6=_0x49df03['data'],_0x5002db=_0x22c9b6&&typeof _0x22c9b6===_0x2e7f14(0x18f)&&_0x2e7f14(0x169)in _0x22c9b6?_0x22c9b6[_0x2e7f14(0x169)]?.[0x0]:_0x22c9b6&&typeof _0x22c9b6===_0x2e7f14(0x18f)&&_0x2e7f14(0x1ad)in _0x22c9b6?_0x22c9b6:undefined;if(!_0x5002db)throw CliErrors['validation']('SQL\x20query\x20not\x20found:\x20'+_0x1916ad);return _0x5002db;}function isRemoteAppItem(_0xa18748){const _0x51125a=a65_0x3cc6;return!!_0xa18748&&typeof _0xa18748===_0x51125a(0x18f)&&typeof _0xa18748[_0x51125a(0x1a3)]===_0x51125a(0x18a)&&typeof _0xa18748[_0x51125a(0x15f)]==='string';}function extractRemoteAppItems(_0x2afefe){const _0x5d8040=a65_0x3cc6;if(Array[_0x5d8040(0x15d)](_0x2afefe))return _0x2afefe[_0x5d8040(0x171)](isRemoteAppItem);if(!_0x2afefe||typeof _0x2afefe!==_0x5d8040(0x18f))throw CliErrors['apiError'](_0x5d8040(0x170));const _0x3a699a=_0x2afefe;if(Array[_0x5d8040(0x15d)](_0x3a699a[_0x5d8040(0x169)]))return _0x3a699a[_0x5d8040(0x169)][_0x5d8040(0x171)](isRemoteAppItem);if(_0x3a699a[_0x5d8040(0x176)]&&typeof _0x3a699a[_0x5d8040(0x176)]==='object'){const _0x11367d=_0x3a699a['data'];if(Array[_0x5d8040(0x15d)](_0x11367d[_0x5d8040(0x169)]))return _0x11367d[_0x5d8040(0x169)]['filter'](isRemoteAppItem);}throw CliErrors['apiError'](_0x5d8040(0x1b0));}export async function getMyApps(){const _0xf4faad=a65_0x3cc6,_0x57e47a=await apiRequest(_0xf4faad(0x196));return extractRemoteAppItems(_0x57e47a[_0xf4faad(0x176)]);}export async function getLoginUserInfo(){const _0xb00a4e=a65_0x3cc6,_0x5a0eb2=await apiRequest(_0xb00a4e(0x14e));if(!_0x5a0eb2[_0xb00a4e(0x176)]||typeof _0x5a0eb2['data']!==_0xb00a4e(0x18f)||Array[_0xb00a4e(0x15d)](_0x5a0eb2[_0xb00a4e(0x176)]))throw CliErrors[_0xb00a4e(0x1ae)](_0xb00a4e(0x17b));return _0x5a0eb2[_0xb00a4e(0x176)];}export async function listDatasets(_0x3d97fe,_0x5af596){const _0xa8318e=a65_0x3cc6,_0x1b6fe1=await apiRequest(_0xa8318e(0x154),{'method':_0xa8318e(0x15b),'body':{'appCode':_0x3d97fe,..._0x5af596?.['code']&&{'code':_0x5af596[_0xa8318e(0x19b)]},..._0x5af596?.[_0xa8318e(0x145)]&&{'name':_0x5af596['name']}}});return extractList(_0x1b6fe1['data']);}export async function getDatasetDetail(_0xb2123f){const _0x251dde=a65_0x3cc6,_0xbe5c10=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0xb2123f));return _0xbe5c10[_0x251dde(0x176)];}export async function getDatasetSdkUsageDoc(_0x184255,_0x320d16){const _0x3426eb=a65_0x3cc6,_0x397c11=await toolboxRequest(_0x3426eb(0x199),{'datasetCode':_0x184255,'appCode':_0x320d16});return typeof _0x397c11?.['markdown']==='string'?_0x397c11[_0x3426eb(0x185)]:'';}export async function listRuntimeArtifacts(_0x4a4d02,_0x2eed9a){const _0x41b83d=a65_0x3cc6,_0x18cb51=new URLSearchParams({'appCode':_0x4a4d02});if(_0x2eed9a?.[_0x41b83d(0x174)])_0x18cb51[_0x41b83d(0x1b7)](_0x41b83d(0x174),_0x2eed9a[_0x41b83d(0x174)]);if(_0x2eed9a?.[_0x41b83d(0x15a)])_0x18cb51[_0x41b83d(0x1b7)](_0x41b83d(0x15a),_0x2eed9a[_0x41b83d(0x15a)]);if(_0x2eed9a?.[_0x41b83d(0x14c)]!==undefined)_0x18cb51['set'](_0x41b83d(0x14c),String(_0x2eed9a[_0x41b83d(0x14c)]));const _0x323a60=await apiRequest(_0x41b83d(0x161)+_0x18cb51['toString']());return Array[_0x41b83d(0x15d)](_0x323a60[_0x41b83d(0x176)])?_0x323a60[_0x41b83d(0x176)]:[];}export async function getRuntimeArtifact(_0x3865fc,_0x238817){const _0x2fd6c3=a65_0x3cc6,_0x57a1e2=await apiRequest('/client/artifact/'+_0x3865fc+_0x2fd6c3(0x13f)+encodeURIComponent(_0x238817));if(!_0x57a1e2['data'])throw CliErrors[_0x2fd6c3(0x165)](_0x2fd6c3(0x1ab)+_0x3865fc);return _0x57a1e2['data'];}export async function createRuntimeArtifact(_0x5bd9a8,_0x1c737e){const _0xe1db9=a65_0x3cc6,_0x131c01=await apiRequest('/client/artifact/create',{'method':_0xe1db9(0x15b),'body':{'appCode':_0x5bd9a8,..._0x1c737e}});return _0x131c01['data'];}export async function updateRuntimeArtifact(_0x2a16a9,_0x2a4f25,_0xf6fed3){const _0x170121=a65_0x3cc6,_0x2e2b48=await apiRequest(_0x170121(0x1b3)+_0x2a16a9+_0x170121(0x17f),{'method':'POST','body':{'appCode':_0x2a4f25,..._0xf6fed3}});return _0x2e2b48[_0x170121(0x176)];}export async function listPersonalBffs(_0x2b7f2a){const _0x11bbe4=a65_0x3cc6,_0x51dfc6=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x2b7f2a));return Array['isArray'](_0x51dfc6[_0x11bbe4(0x176)])?_0x51dfc6[_0x11bbe4(0x176)]:[];}export async function getPersonalBff(_0x49f993,_0x1651ec){const _0x21c6e9=a65_0x3cc6,_0x29a8f8=await apiRequest(_0x21c6e9(0x184)+_0x49f993+_0x21c6e9(0x13f)+encodeURIComponent(_0x1651ec));if(!_0x29a8f8['data'])throw CliErrors[_0x21c6e9(0x165)](_0x21c6e9(0x16f)+_0x49f993);return _0x29a8f8[_0x21c6e9(0x176)];}export async function createPersonalBff(_0x45fdbf,_0x9d8af3){const _0x4629d4=a65_0x3cc6,_0x359120=await apiRequest(_0x4629d4(0x14d),{'method':_0x4629d4(0x15b),'body':{'appCode':_0x45fdbf,..._0x9d8af3}});return _0x359120[_0x4629d4(0x176)];}export async function updatePersonalBff(_0x27cbf0,_0x46b3d6,_0x760772){const _0x43c503=a65_0x3cc6,_0x1a6825=await apiRequest('/client/runtime-bff/personal/'+_0x27cbf0+'/update',{'method':'POST','body':{'appCode':_0x46b3d6,..._0x760772}});return _0x1a6825[_0x43c503(0x176)];}export async function executePersonalBff(_0x503536,_0x2fbf90,_0x4f6fa6){const _0x20c29c=a65_0x3cc6,_0x3307a3=await apiRequest('/client/runtime-bff/personal/'+_0x503536+'/execute?appCode='+encodeURIComponent(_0x2fbf90),{'method':'POST','body':_0x4f6fa6});return _0x3307a3[_0x20c29c(0x176)];}export async function listPersonalKnowledgeBaseItems(_0x5a6739){const _0x1bc30d=a65_0x3cc6,_0x41c27c=await apiRequest('/client/knowledge-base/personal/list?appCode='+encodeURIComponent(_0x5a6739));return Array[_0x1bc30d(0x15d)](_0x41c27c['data'])?_0x41c27c[_0x1bc30d(0x176)]:[];}export async function getPersonalKnowledgeBaseItem(_0x3cb924,_0x41960c){const _0x3c70ba=a65_0x3cc6,_0x697cc6=await apiRequest('/client/knowledge-base/personal/'+_0x3cb924+'?appCode='+encodeURIComponent(_0x41960c));if(!_0x697cc6[_0x3c70ba(0x176)])throw CliErrors['validation']('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0x3cb924);return _0x697cc6['data'];}export async function createPersonalKnowledgeBaseItem(_0x5ad8b6,_0x13e8bc){const _0x50df31=a65_0x3cc6,_0x1dc38b=await apiRequest('/client/knowledge-base/personal/create',{'method':_0x50df31(0x15b),'body':{'appCode':_0x5ad8b6,..._0x13e8bc}});return _0x1dc38b['data'];}export async function updatePersonalKnowledgeBaseItem(_0x22800b,_0x5eca52,_0x4f95c7){const _0x4dc5d2=a65_0x3cc6,_0x4d340c=await apiRequest(_0x4dc5d2(0x17a)+_0x22800b+_0x4dc5d2(0x17f),{'method':_0x4dc5d2(0x15b),'body':{'appCode':_0x5eca52,..._0x4f95c7}});return _0x4d340c[_0x4dc5d2(0x176)];}export async function searchKnowledgeBase(_0x43be82,_0x2a7ccc){const _0x3c6950=a65_0x3cc6,_0x55e6a8=await apiRequest(_0x3c6950(0x19d),{'method':_0x3c6950(0x15b),'body':{'appCode':_0x43be82,'query':_0x2a7ccc[_0x3c6950(0x1a4)],..._0x2a7ccc['topK']!==undefined?{'topK':_0x2a7ccc['topK']}:{}}});return Array['isArray'](_0x55e6a8['data'])?_0x55e6a8[_0x3c6950(0x176)]:[];}export async function getRuntimeSkillByCode(_0x4e6e02,_0x2cc1c9){const _0x1a0fd6=a65_0x3cc6,_0x3ee07e=await skillHubJsonRequest(_0x1a0fd6(0x150)+encodeURIComponent(_0x4e6e02)+'/'+encodeURIComponent(_0x2cc1c9),{'allowNotFound':!![]});return _0x3ee07e?skillHubRuntimeDetailToRuntimeSkill(_0x3ee07e):undefined;}export async function listRuntimeSkills(_0x1cddd6){const _0xf913d2=a65_0x3cc6,_0x5e12df=await skillHubJsonRequest(_0xf913d2(0x1a9)+encodeURIComponent(_0x1cddd6[_0xf913d2(0x1a3)])+_0xf913d2(0x16b),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x1cddd6[_0xf913d2(0x1a3)],_0x5e12df,_0x1cddd6['scope']??'all',_0x1cddd6[_0xf913d2(0x19b)]);}export async function listPersonalRuntimeSkills(_0x7b712b){const _0x5f2bc8=a65_0x3cc6;return(await listRuntimeSkills({'appCode':_0x7b712b,'scope':_0x5f2bc8(0x14f)}))[_0x5f2bc8(0x14f)];}export async function listCompanyRuntimeSkills(_0x35f105){const _0x17136b=a65_0x3cc6;return(await listRuntimeSkills({'appCode':_0x35f105,'scope':'company'}))[_0x17136b(0x191)];}export async function listVisibleRuntimeSkills(_0x4f761a){const _0x33b22b=a65_0x3cc6;return(await listRuntimeSkills({'appCode':_0x4f761a,'scope':'all'}))[_0x33b22b(0x1a7)];}export async function createPersonalRuntimeSkill(_0x205b69,_0x3a97fc){return publishRuntimeSkill(_0x205b69,_0x3a97fc);}function a65_0x5cd6(){const _0x360052=['/client/artifact/list?','replace','trim','items','validation','API\x20error:\x20','headlineVersion','/versions/','tableData','searchParams','/skills','json','values','boolean','Personal\x20BFF\x20not\x20found:\x20id=','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','filter','success','Toolbox\x20error\x20code:\x20','artifactType','Toolbox\x20API\x20error','data','catch','displayName','/api/node-toolbox/','/client/knowledge-base/personal/','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','/client/sql/query','7KAvXGp','stringify','/update','/download','/api/cli/v1/skills/','newConfigFileName','text','/client/runtime-bff/personal/','markdown','invokeSource','slug','Check\x20your\x20credentials\x20and\x20try\x20again.','162BWoSwF','string','/client/bff/query/','658170TJOzOf','skillCode','159905LXYJcH','object','Missing\x20Skill\x20package\x20payload.','company','application/json','AbortError','/publish','from','/client/app/my-apps','application/octet-stream','NAMESPACE_ONLY','api-doc-generator','signal','code','errorMsg','/client/knowledge-base/search','scope','SkillHub\x20error\x20code:\x20','application/zip','content','12JiMSsF','appCode','query','entries','4715953HlzHrD','effective','number','/api/runtime/v1/namespaces/','map','Artifact\x20not\x20found:\x20id=','toString','sqlCode','apiError','errorCode','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','1371064Atjbxa','Toolbox\x20API\x20error:\x20','/client/artifact/','version','msg','Configure\x20accessKey\x20in\x20','set','?appCode=','PRIVATE','3OSUkml','status','summary','undefined','name','GET','1150918piwitE','authRequired','SkillHub\x20API\x20error:\x20','4695568CDMNoi','Download\x20failed:\x20','favorite','/client/runtime-bff/personal/create','/client/user/loginUserInfo','personal','/api/v1/skills/','packageBase64','namespace','arrayBuffer','/client/dataset/list','abort','skill','visibility','message','Request\x20timeout:\x20','source','POST','510YcnUdC','isArray','publishedVersion','appName','262098hErQNW'];a65_0x5cd6=function(){return _0x360052;};return a65_0x5cd6();}export async function updatePersonalRuntimeSkill(_0x10b83e,_0x58f002,_0x591741){const _0x247f9b=a65_0x3cc6;return publishRuntimeSkill(_0x58f002,{..._0x591741,'skillCode':_0x591741[_0x247f9b(0x18d)]??_0x10b83e});}export async function downloadRuntimeSkillPackage(_0x58bb1a,_0x3a440c,_0x243fda,_0x322f14){const _0x2ab690=a65_0x3cc6;void _0x58bb1a;const _0x188d9d=_0x322f14?'/api/cli/v1/skills/'+encodeURIComponent(_0x243fda)+'/'+encodeURIComponent(_0x3a440c)+_0x2ab690(0x168)+encodeURIComponent(_0x322f14)+_0x2ab690(0x180):_0x2ab690(0x181)+encodeURIComponent(_0x243fda)+'/'+encodeURIComponent(_0x3a440c)+_0x2ab690(0x180);return skillHubBinaryRequest(_0x188d9d);}async function publishRuntimeSkill(_0x41e803,_0x4e3c74){const _0xff9b39=a65_0x3cc6,_0xf1bbe0=new FormData();_0xf1bbe0[_0xff9b39(0x1b7)]('file',runtimeSkillPackageFile(_0x4e3c74)),_0xf1bbe0[_0xff9b39(0x1b7)](_0xff9b39(0x157),_0xff9b39(0x140));const _0x3b470c=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x41e803)+_0xff9b39(0x194),{'method':_0xff9b39(0x15b),'body':_0xf1bbe0});return{'appCode':_0x3b470c[_0xff9b39(0x152)]??_0x41e803,'skillCode':_0x3b470c[_0xff9b39(0x187)]??_0x4e3c74[_0xff9b39(0x18d)]??'','skillName':_0x4e3c74['skillName']??_0x3b470c[_0xff9b39(0x187)]??_0x4e3c74[_0xff9b39(0x18d)],'description':_0x4e3c74['description'],'scope':skillHubVisibilityToScope(_0x3b470c['visibility'])??_0xff9b39(0x14f),'version':_0x3b470c[_0xff9b39(0x1b4)]??_0x4e3c74[_0xff9b39(0x1b4)],'tags':_0x4e3c74['tags'],'content':_0x4e3c74[_0xff9b39(0x1a1)]};}function runtimeSkillPackageFile(_0x255dee){const _0x13a65a=a65_0x3cc6;if(!_0x255dee[_0x13a65a(0x151)])throw CliErrors['validation'](_0x13a65a(0x190));const _0x571f38=Buffer[_0x13a65a(0x195)](_0x255dee['packageBase64'],'base64'),_0x232698=new Blob([_0x571f38],{'type':_0x13a65a(0x1a0)}),_0x3d873f=(_0x255dee[_0x13a65a(0x18d)]||_0x13a65a(0x156))+'.zip';if(typeof File!==_0x13a65a(0x144))return new File([_0x232698],_0x3d873f,{'type':_0x13a65a(0x1a0)});return _0x232698;}function normalizeSkillHubRuntimeListResponse(_0x51cd96,_0xe27091,_0x2caf9a,_0x4b9736){const _0x3f710b=a65_0x3cc6,_0x5df941=Array['isArray'](_0xe27091)?_0xe27091:Array[_0x3f710b(0x15d)](_0xe27091?.[_0x3f710b(0x164)])?_0xe27091[_0x3f710b(0x164)]:[],_0x40c352=_0x4b9736?.[_0x3f710b(0x163)](),_0x2df632=_0x5df941['filter'](_0x368abe=>!_0x40c352||_0x368abe['slug']===_0x40c352)[_0x3f710b(0x1aa)](skillHubRuntimeItemToRuntimeSkill)[_0x3f710b(0x171)](_0x34ffb1=>Boolean(_0x34ffb1)),_0x15ee2a=_0x2df632['filter'](_0x172911=>_0x172911[_0x3f710b(0x19e)]==='personal'),_0x2729da=_0x2df632[_0x3f710b(0x171)](_0x539564=>_0x539564['scope']===_0x3f710b(0x191));return{'appCode':_0x51cd96,'personal':_0x2caf9a==='company'?[]:_0x15ee2a,'company':_0x2caf9a===_0x3f710b(0x14f)?[]:_0x2729da,'effective':buildEffectiveRuntimeSkills(_0x15ee2a,_0x2729da,_0x2caf9a)};}function skillHubRuntimeItemToRuntimeSkill(_0x122153){const _0x3f5cd3=a65_0x3cc6,_0x5e5191=_0x122153[_0x3f5cd3(0x187)]?.['trim'](),_0x1aa69a=skillHubVisibilityToScope(_0x122153['visibility']);if(!_0x5e5191||!_0x1aa69a)return undefined;return{'id':_0x122153['id'],'appCode':_0x122153[_0x3f5cd3(0x152)],'skillCode':_0x5e5191,'skillName':_0x122153[_0x3f5cd3(0x178)]??_0x5e5191,'description':_0x122153[_0x3f5cd3(0x143)],'scope':_0x1aa69a,'version':skillHubRuntimeItemVersion(_0x122153),'status':_0x122153[_0x3f5cd3(0x142)]};}function skillHubRuntimeDetailToRuntimeSkill(_0xfeb06f){const _0x76b7c6=a65_0x3cc6,_0x4c3e77=_0xfeb06f[_0x76b7c6(0x187)]?.[_0x76b7c6(0x163)]();if(!_0x4c3e77)return undefined;return{'id':_0xfeb06f['id'],'appCode':_0xfeb06f['namespace'],'skillCode':_0x4c3e77,'skillName':_0xfeb06f['displayName']??_0x4c3e77,'description':_0xfeb06f[_0x76b7c6(0x143)],'scope':skillHubVisibilityToScope(_0xfeb06f[_0x76b7c6(0x157)])??_0xfeb06f[_0x76b7c6(0x157)]?.['toLowerCase'](),'version':skillHubRuntimeItemVersion(_0xfeb06f),'status':_0xfeb06f[_0x76b7c6(0x142)]};}function skillHubVisibilityToScope(_0x4e94e0){const _0x1a5a98=a65_0x3cc6;if(_0x4e94e0===_0x1a5a98(0x140))return _0x1a5a98(0x14f);if(_0x4e94e0===_0x1a5a98(0x198))return _0x1a5a98(0x191);return undefined;}function skillHubRuntimeItemVersion(_0x260f62){const _0x44d100=a65_0x3cc6;return _0x260f62[_0x44d100(0x15e)]?.[_0x44d100(0x1b4)]??_0x260f62[_0x44d100(0x167)]?.[_0x44d100(0x1b4)]??_0x260f62['ownerPreviewVersion']?.[_0x44d100(0x1b4)];}function buildEffectiveRuntimeSkills(_0x57ac24,_0x48fc80,_0xdfee75){const _0x4d14f3=a65_0x3cc6;if(_0xdfee75==='personal')return _0x57ac24;if(_0xdfee75===_0x4d14f3(0x191))return _0x48fc80;const _0x17474b=new Map();for(const _0x4919ca of _0x48fc80){_0x17474b[_0x4d14f3(0x1b7)](_0x4919ca[_0x4d14f3(0x18d)],_0x4919ca);}for(const _0x5dc463 of _0x57ac24){_0x17474b['set'](_0x5dc463[_0x4d14f3(0x18d)],_0x5dc463);}return Array[_0x4d14f3(0x195)](_0x17474b[_0x4d14f3(0x16d)]());}function a65_0x3cc6(_0x304545,_0x2b6e6e){_0x304545=_0x304545-0x13f;const _0x5cd6d3=a65_0x5cd6();let _0x3cc65f=_0x5cd6d3[_0x304545];return _0x3cc65f;}function normalizeRuntimeSkillListResponse(_0x1a4d39,_0x8c15cc){const _0xe0d01b=a65_0x3cc6;if(Array[_0xe0d01b(0x15d)](_0x8c15cc)){const _0x7966a4=_0x8c15cc[_0xe0d01b(0x171)](_0x2c2a9e=>_0x2c2a9e['scope']===_0xe0d01b(0x14f)),_0x3da96d=_0x8c15cc[_0xe0d01b(0x171)](_0x1549c9=>_0x1549c9['scope']===_0xe0d01b(0x191));return{'appCode':_0x1a4d39,'personal':_0x7966a4,'company':_0x3da96d,'effective':[..._0x3da96d,..._0x7966a4]};}return{'appCode':_0x8c15cc?.[_0xe0d01b(0x1a3)]??_0x1a4d39,'personal':Array[_0xe0d01b(0x15d)](_0x8c15cc?.[_0xe0d01b(0x14f)])?_0x8c15cc['personal']:[],'company':Array[_0xe0d01b(0x15d)](_0x8c15cc?.[_0xe0d01b(0x191)])?_0x8c15cc[_0xe0d01b(0x191)]:[],'effective':Array['isArray'](_0x8c15cc?.['effective'])?_0x8c15cc['effective']:[]};}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xa3d373,_0x3c5728){const _0x1e6cb0=a66_0x35f3,_0x42b221=_0xa3d373();while(!![]){try{const _0x4bdaf7=parseInt(_0x1e6cb0(0x1d2))/0x1*(-parseInt(_0x1e6cb0(0x1ca))/0x2)+parseInt(_0x1e6cb0(0x1cd))/0x3+parseInt(_0x1e6cb0(0x1cb))/0x4+-parseInt(_0x1e6cb0(0x1d7))/0x5*(parseInt(_0x1e6cb0(0x1da))/0x6)+parseInt(_0x1e6cb0(0x1d3))/0x7*(parseInt(_0x1e6cb0(0x1db))/0x8)+parseInt(_0x1e6cb0(0x1d5))/0x9*(-parseInt(_0x1e6cb0(0x1d6))/0xa)+parseInt(_0x1e6cb0(0x1cc))/0xb*(parseInt(_0x1e6cb0(0x1d1))/0xc);if(_0x4bdaf7===_0x3c5728)break;else _0x42b221['push'](_0x42b221['shift']());}catch(_0x8befaa){_0x42b221['push'](_0x42b221['shift']());}}}(a66_0x65e4,0x8b477));function a66_0x65e4(){const _0x1e5e43=['find','90bzjvVR','721012EpoknD','3056119UDjgQs','2950245MKuwiS','entries','has','dbtableConfig','24eTbYLU','12890eYKfNo','617953FCAhBf','dbId','666pzJonh','97850sNHmwT','40VIwdaa','get','set','611826aRuREQ','88YfPQtD','dbName'];a66_0x65e4=function(){return _0x1e5e43;};return a66_0x65e4();}import{listDatasets}from'../core/api-client.js';const cache=new Map();function a66_0x35f3(_0x26b578,_0x1af50d){_0x26b578=_0x26b578-0x1ca;const _0x65e47c=a66_0x65e4();let _0x35f3f0=_0x65e47c[_0x26b578];return _0x35f3f0;}export async function listDatabases(_0x28e965){const _0xb06574=a66_0x35f3;if(cache[_0xb06574(0x1cf)](_0x28e965))return cache[_0xb06574(0x1d8)](_0x28e965);const _0x26fece=await listDatasets(_0x28e965),_0x523186=new Map();for(const _0x54e6ed of _0x26fece){const _0x4fa237=_0x54e6ed[_0xb06574(0x1d0)];_0x4fa237?.[_0xb06574(0x1d4)]!=null&&_0x523186[_0xb06574(0x1d9)](_0x4fa237[_0xb06574(0x1d4)],_0x4fa237['dbName']??'db-'+_0x4fa237[_0xb06574(0x1d4)]);}const _0x31a112=[..._0x523186[_0xb06574(0x1ce)]()]['map'](([_0x49ab5b,_0x4080ae])=>({'dbId':_0x49ab5b,'dbName':_0x4080ae}));return cache[_0xb06574(0x1d9)](_0x28e965,_0x31a112),_0x31a112;}export async function getDbName(_0x2e841e,_0x364216){const _0x5155fc=a66_0x35f3;try{const _0x4ea0c0=await listDatabases(_0x2e841e);return _0x4ea0c0[_0x5155fc(0x1dd)](_0x2fde09=>_0x2fde09[_0x5155fc(0x1d4)]===_0x364216)?.[_0x5155fc(0x1dc)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x2676b9,_0x3da03b){const _0x49aa7c=a67_0x438a,_0xefdaa7=_0x2676b9();while(!![]){try{const _0x2b76d7=-parseInt(_0x49aa7c(0x11f))/0x1*(-parseInt(_0x49aa7c(0x130))/0x2)+parseInt(_0x49aa7c(0x126))/0x3*(-parseInt(_0x49aa7c(0x131))/0x4)+parseInt(_0x49aa7c(0x127))/0x5+parseInt(_0x49aa7c(0x11d))/0x6*(parseInt(_0x49aa7c(0x133))/0x7)+-parseInt(_0x49aa7c(0x137))/0x8+-parseInt(_0x49aa7c(0x132))/0x9*(-parseInt(_0x49aa7c(0x13e))/0xa)+-parseInt(_0x49aa7c(0x11a))/0xb;if(_0x2b76d7===_0x3da03b)break;else _0xefdaa7['push'](_0xefdaa7['shift']());}catch(_0x1c8f0b){_0xefdaa7['push'](_0xefdaa7['shift']());}}}(a67_0x385e,0x776d5));function a67_0x385e(){const _0x1c6416=['15804kfJSTc','3534937JhVYrA','isArray','batchCreate','string','1112360UZXBUX','field','invokeSource','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','delete','update','validation','2260hJUKmt','authMode','execute','models','21179466WftkrB',']\x20must\x20be\x20an\x20object.','data\x20aggregate\x20--params.aggregate[','6DxSAzg','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','647DYfncj','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','function','dataset_','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','aggregate','appCode','858hJAJkk','4673770fDQweN','trim','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','accessKey','getOne','map','object','\x22.\x20','column','2586tfNllZ','1672LTrjeb'];a67_0x385e=function(){return _0x1c6416;};return a67_0x385e();}import{createClient}from'@lovrabet/sdk';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';function a67_0x438a(_0x236fdd,_0x1d6bd0){_0x236fdd=_0x236fdd-0x117;const _0x385e0b=a67_0x385e();let _0x438a86=_0x385e0b[_0x236fdd];return _0x438a86;}import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0xb79bdc){const _0x26cd7d=a67_0x438a;_client=createClient({'appCode':_0xb79bdc[_0x26cd7d(0x125)],'env':_0xb79bdc['env'],'authMode':_0xb79bdc[_0x26cd7d(0x117)],..._0xb79bdc[_0x26cd7d(0x12a)]?{'accessKey':_0xb79bdc[_0x26cd7d(0x12a)]}:{},'options':{'timeout':0x7530,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x26cd7d(0x139)]}}});}function ensureClient(){if(!_client)throw new Error('SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.');return _client;}function normalizeAggregateParams(_0x2328c8){const _0x35754d=a67_0x438a,_0x3a4738=_0x2328c8[_0x35754d(0x124)];if(_0x3a4738===undefined)return _0x2328c8;if(!Array[_0x35754d(0x134)](_0x3a4738))throw CliErrors[_0x35754d(0x13d)]('data\x20aggregate\x20--params.aggregate\x20must\x20be\x20an\x20array.');return{..._0x2328c8,'aggregate':_0x3a4738[_0x35754d(0x12c)]((_0x2c5d0b,_0x2837cf)=>{const _0x427500=_0x35754d;if(!_0x2c5d0b||typeof _0x2c5d0b!==_0x427500(0x12d)||Array[_0x427500(0x134)](_0x2c5d0b))throw CliErrors[_0x427500(0x13d)](_0x427500(0x11c)+_0x2837cf+_0x427500(0x11b));const _0xce862f=_0x2c5d0b[_0x427500(0x12f)]??_0x2c5d0b['field'];if(typeof _0xce862f!==_0x427500(0x136)||_0xce862f[_0x427500(0x128)]()==='')throw CliErrors[_0x427500(0x13d)]('data\x20aggregate\x20--params.aggregate['+_0x2837cf+']\x20requires\x20\x22column\x22;\x20\x22field\x22\x20is\x20accepted\x20only\x20as\x20a\x20deprecated\x20alias.');const _0x54abbd={..._0x2c5d0b,'column':_0xce862f};return delete _0x54abbd[_0x427500(0x138)],_0x54abbd;})};}export async function executeData(_0x312fc7,_0x4fd0af,_0x1b0c8e){const _0x57b63a=a67_0x438a,_0x170368=ensureClient(),_0x127a35=_0x57b63a(0x122)+_0x312fc7,_0x29fe4d=_0x170368[_0x57b63a(0x119)][_0x127a35];if(!_0x29fe4d||typeof _0x29fe4d[_0x4fd0af]!==_0x57b63a(0x121))throw new Error(_0x57b63a(0x123)+_0x4fd0af+_0x57b63a(0x12e)+_0x57b63a(0x13a));if(_0x4fd0af===_0x57b63a(0x135))return _0x29fe4d[_0x57b63a(0x135)](parseBatchCreateItemsFromParams(_0x1b0c8e));const _0x116b34=_0x1b0c8e!==undefined&&_0x1b0c8e!==null&&!Array[_0x57b63a(0x134)](_0x1b0c8e)?_0x1b0c8e:{};switch(_0x4fd0af){case _0x57b63a(0x12b):{const _0x3c4889=_0x116b34['id'];if(_0x3c4889===undefined||_0x3c4889===null)throw new Error(_0x57b63a(0x11e));return _0x29fe4d[_0x57b63a(0x12b)](_0x3c4889);}case'update':{const {id:_0x12b2b4,..._0x247ec0}=_0x116b34;if(_0x12b2b4===undefined||_0x12b2b4===null)throw new Error(_0x57b63a(0x129));return _0x29fe4d[_0x57b63a(0x13c)](_0x12b2b4,_0x247ec0);}case _0x57b63a(0x13b):{const _0x4e5684=_0x116b34['id'];if(_0x4e5684===undefined||_0x4e5684===null)throw new Error(_0x57b63a(0x120));return _0x29fe4d[_0x57b63a(0x13b)](_0x4e5684);}case'aggregate':return _0x29fe4d[_0x57b63a(0x124)](normalizeAggregateParams(_0x116b34));default:return _0x29fe4d[_0x4fd0af](_0x116b34);}}export async function executeSdkSql(_0x2d4dcf,_0x5d1463){const _0x375002=a67_0x438a,_0x3735f2=ensureClient();return _0x3735f2['sql'][_0x375002(0x118)]({'sqlCode':_0x2d4dcf,'params':_0x5d1463});}export async function executeSdkBff(_0x2d7525,_0xc7483b){const _0x3c6714=a67_0x438a,_0x215351=ensureClient();return _0x215351['bff'][_0x3c6714(0x118)]({'scriptName':_0x2d7525,'params':_0xc7483b});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x49e2e7=a68_0x3431;(function(_0x57819a,_0x165ddc){const _0x56e035=a68_0x3431,_0x5d91f7=_0x57819a();while(!![]){try{const _0x8ce618=parseInt(_0x56e035(0x7d))/0x1*(parseInt(_0x56e035(0x7f))/0x2)+-parseInt(_0x56e035(0x72))/0x3+-parseInt(_0x56e035(0x7c))/0x4+-parseInt(_0x56e035(0x75))/0x5+parseInt(_0x56e035(0x80))/0x6*(-parseInt(_0x56e035(0x73))/0x7)+parseInt(_0x56e035(0x78))/0x8*(parseInt(_0x56e035(0x77))/0x9)+parseInt(_0x56e035(0x7a))/0xa;if(_0x8ce618===_0x165ddc)break;else _0x5d91f7['push'](_0x5d91f7['shift']());}catch(_0x39844d){_0x5d91f7['push'](_0x5d91f7['shift']());}}}(a68_0x36e6,0xd12be));import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';function a68_0x36e6(){const _0x55ff0b=['28060930pneLpc','\x20or\x20run\x20`','2016352scMgnY','1IAhkKq','Set\x20appcode\x20via\x20--appcode\x20or\x20','2337654KHydlX','9148836ucPQwW','363381Olqzlc','7UtxnyX','newConfigFileName','7117400LHWIBh','Configure\x20accessKey\x20in\x20','9gRzfff','3642776RZygbD','\x20file.'];a68_0x36e6=function(){return _0x55ff0b;};return a68_0x36e6();}import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};function a68_0x3431(_0x4e3a25,_0x29e9ca){_0x4e3a25=_0x4e3a25-0x72;const _0x36e6cd=a68_0x36e6();let _0x3431f1=_0x36e6cd[_0x4e3a25];return _0x3431f1;}export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':a68_0x49e2e7(0x76)+PRODUCT_CONFIG[a68_0x49e2e7(0x74)]+a68_0x49e2e7(0x7b)+CLI_BIN_NAME+'\x20auth\x20login`.','configMissingHint':a68_0x49e2e7(0x7e)+PRODUCT_CONFIG[a68_0x49e2e7(0x74)]+'.','notInProjectHint':'Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20'+PRODUCT_CONFIG[a68_0x49e2e7(0x74)]+a68_0x49e2e7(0x79)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x300df9,_0x5dd6d8){var _0x1cede2=a69_0x5a44,_0xf406e6=_0x300df9();while(!![]){try{var _0x1fb5fc=parseInt(_0x1cede2(0x17b))/0x1*(parseInt(_0x1cede2(0x179))/0x2)+parseInt(_0x1cede2(0x17c))/0x3*(parseInt(_0x1cede2(0x177))/0x4)+-parseInt(_0x1cede2(0x181))/0x5*(parseInt(_0x1cede2(0x176))/0x6)+parseInt(_0x1cede2(0x178))/0x7+-parseInt(_0x1cede2(0x17f))/0x8+-parseInt(_0x1cede2(0x17a))/0x9*(parseInt(_0x1cede2(0x17d))/0xa)+parseInt(_0x1cede2(0x180))/0xb*(parseInt(_0x1cede2(0x17e))/0xc);if(_0x1fb5fc===_0x5dd6d8)break;else _0xf406e6['push'](_0xf406e6['shift']());}catch(_0x4d4b4a){_0xf406e6['push'](_0xf406e6['shift']());}}}(a69_0xe37e,0xf33bd));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a69_0x2dea4a}from'@lovrabet/cli-framework';function a69_0xe37e(){var _0x5603cb=['1873347tHktgP','4qKlPOC','32607WcAlPL','773467sBnrJJ','435Cwhryp','3830MNAPtp','9432GuRqgS','3753232BJxCAV','26906CEyxit','7039740qWHTzx','6YzCoBs','14452pHdHGj'];a69_0xe37e=function(){return _0x5603cb;};return a69_0xe37e();}function a69_0x5a44(_0x2d0c67,_0x20d5a8){_0x2d0c67=_0x2d0c67-0x176;var _0xe37ed1=a69_0xe37e();var _0x5a443e=_0xe37ed1[_0x2d0c67];return _0x5a443e;}export function buildAllFlags(_0x36f8a0){return a69_0x2dea4a(_0x36f8a0,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a70_0x2a9e(_0x5d5fcd,_0x1672ac){_0x5d5fcd=_0x5d5fcd-0x10c;const _0xe123ab=a70_0xe123();let _0x2a9e85=_0xe123ab[_0x5d5fcd];return _0x2a9e85;}(function(_0x2a8da1,_0x13c582){const _0x5ed678=a70_0x2a9e,_0x281f3a=_0x2a8da1();while(!![]){try{const _0x531e10=-parseInt(_0x5ed678(0x10f))/0x1*(parseInt(_0x5ed678(0x112))/0x2)+-parseInt(_0x5ed678(0x10e))/0x3+parseInt(_0x5ed678(0x111))/0x4+parseInt(_0x5ed678(0x110))/0x5+-parseInt(_0x5ed678(0x114))/0x6+parseInt(_0x5ed678(0x10d))/0x7+parseInt(_0x5ed678(0x113))/0x8;if(_0x531e10===_0x13c582)break;else _0x281f3a['push'](_0x281f3a['shift']());}catch(_0x222c4e){_0x281f3a['push'](_0x281f3a['shift']());}}}(a70_0xe123,0x80f55));export function dryRun(_0x998824,_0x40098b){const _0x1e4c13={'method':_0x998824,'url':_0x40098b},_0x47d283={'body'(_0x4d40f5){const _0x4b5724=a70_0x2a9e;return _0x1e4c13[_0x4b5724(0x10c)]=_0x4d40f5,_0x47d283;},'description'(_0xfbcea){const _0x5b1099=a70_0x2a9e;return _0x1e4c13[_0x5b1099(0x115)]=_0xfbcea,_0x47d283;},'build'(){return{..._0x1e4c13};}};return _0x47d283;}function a70_0xe123(){const _0x4b5ea8=['3742810JlnUkp','3185452GEMJkn','6grBdyk','10622000ueLxTI','6036102vXnKLI','description','body','2384683gwEuMC','2785569ieoNpJ','250197tgYBBo'];a70_0xe123=function(){return _0x4b5ea8;};return a70_0xe123();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x4aeeaf=a71_0x146f;(function(_0x471db4,_0x1fdf90){const _0x2f2635=a71_0x146f,_0x361ff9=_0x471db4();while(!![]){try{const _0x240c00=parseInt(_0x2f2635(0x121))/0x1+-parseInt(_0x2f2635(0x124))/0x2*(-parseInt(_0x2f2635(0x122))/0x3)+parseInt(_0x2f2635(0x11b))/0x4+parseInt(_0x2f2635(0x120))/0x5+parseInt(_0x2f2635(0x11c))/0x6+-parseInt(_0x2f2635(0x11d))/0x7+parseInt(_0x2f2635(0x11a))/0x8*(-parseInt(_0x2f2635(0x123))/0x9);if(_0x240c00===_0x1fdf90)break;else _0x361ff9['push'](_0x361ff9['shift']());}catch(_0x2b914c){_0x361ff9['push'](_0x361ff9['shift']());}}}(a71_0x30bf,0xf3722));function a71_0x30bf(){const _0x2f5dbe=['1874480SIcisv','1152600HVCQWV','11440247oSRSOP','validateFlags','parseFlags','5501565GCCEGL','1404643EyUxSl','624XgtRQK','9kFHKTU','9584NxGlCE','12247496cLDWRy'];a71_0x30bf=function(){return _0x2f5dbe;};return a71_0x30bf();}import{createFlagHelpers}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';const helpers=createFlagHelpers(CliErrors);export const parseFlags=helpers[a71_0x4aeeaf(0x11f)];function a71_0x146f(_0x2ce792,_0x4de442){_0x2ce792=_0x2ce792-0x11a;const _0x30bf42=a71_0x30bf();let _0x146fb1=_0x30bf42[_0x2ce792];return _0x146fb1;}export const validateFlags=helpers[a71_0x4aeeaf(0x11e)];
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3631fe,_0x4f4ef3){const _0x53d211=a72_0x3d5e,_0x7647d=_0x3631fe();while(!![]){try{const _0x389c50=parseInt(_0x53d211(0xc7))/0x1+-parseInt(_0x53d211(0xd0))/0x2*(-parseInt(_0x53d211(0xd5))/0x3)+-parseInt(_0x53d211(0xd4))/0x4*(parseInt(_0x53d211(0xd2))/0x5)+parseInt(_0x53d211(0xd3))/0x6*(-parseInt(_0x53d211(0xc9))/0x7)+parseInt(_0x53d211(0xd8))/0x8*(-parseInt(_0x53d211(0xce))/0x9)+parseInt(_0x53d211(0xd1))/0xa+parseInt(_0x53d211(0xc8))/0xb*(-parseInt(_0x53d211(0xcd))/0xc);if(_0x389c50===_0x4f4ef3)break;else _0x7647d['push'](_0x7647d['shift']());}catch(_0x2ece42){_0x7647d['push'](_0x7647d['shift']());}}}(a72_0x18d5,0x41f19));import{createHelpGenerators}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{getDynamicServiceDefinitions,getDynamicServiceEntry,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a72_0x3d5e(_0x4005ae,_0xc5a597){_0x4005ae=_0x4005ae-0xc7;const _0x18d52f=a72_0x18d5();let _0x3d5e36=_0x18d52f[_0x4005ae];return _0x3d5e36;}import{PRODUCT_CONFIG}from'../constant/product.js';function createGenerators(){const _0x595eea=a72_0x3d5e;return createHelpGenerators({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[...serviceRegistry,...safeListDynamicServiceEntries()],'getServiceEntry':getAnyServiceEntry,'getServiceDefinitions':getAnyServiceDefinitions,'buildAllFlags':buildAllFlags,'appPrerequisiteText':_0x595eea(0xd7)+PRODUCT_CONFIG[_0x595eea(0xcb)]+_0x595eea(0xd6)});}export function generateCommandHelp(_0x4e12f0){return createGenerators()['generateCommandHelp'](_0x4e12f0);}export function generateServiceHelp(_0xb936f0){const _0x358701=a72_0x3d5e;return createGenerators()[_0x358701(0xcc)](_0xb936f0);}function a72_0x18d5(){const _0x58fc25=['generateServiceHelp','1080636vgNvbD','66159IWoZGy','get','24006Vkyqaw','4337410mdhggS','85MDTmMz','3678sxPruz','119216iSfgrt','99rcBWCZ','\x20or\x20--appcode).','Requires\x20appcode\x20(set\x20via\x20','40hAWkEp','generateFullHelp','518166YBzyXp','11BnrFQz','5075zNWMpk','service','newConfigFileName'];a72_0x18d5=function(){return _0x58fc25;};return a72_0x18d5();}export function generateFullHelp(){const _0x37c2e8=a72_0x3d5e;return createGenerators()[_0x37c2e8(0xd9)]();}function getAnyServiceEntry(_0x4e9995){const _0x234bd6=getServiceEntry(_0x4e9995);if(_0x234bd6)return _0x234bd6;try{return getDynamicServiceEntry(_0x4e9995);}catch{return undefined;}}function getAnyServiceDefinitions(_0x237512){const _0x4464d3=a72_0x3d5e,_0x3a3893=serviceGroups[_0x4464d3(0xcf)](_0x237512);if(_0x3a3893)return _0x3a3893;try{return getDynamicServiceDefinitions(_0x237512);}catch{return undefined;}}function safeListDynamicServiceEntries(){const _0x1286e8=a72_0x3d5e,_0x11d8ee=new Set(serviceRegistry['map'](_0x34266c=>_0x34266c['service']));try{return listDynamicServiceEntries()['filter'](_0x2a253e=>!_0x11d8ee['has'](_0x2a253e[_0x1286e8(0xca)]));}catch{return[];}}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a73_0x2324(_0x2f8b71,_0x1c6aa0){_0x2f8b71=_0x2f8b71-0x174;var _0xd29c7d=a73_0xd29c();var _0x2324bc=_0xd29c7d[_0x2f8b71];return _0x2324bc;}(function(_0x5fc6e0,_0x4ff5d3){var _0x3dc6cc=a73_0x2324,_0x48146b=_0x5fc6e0();while(!![]){try{var _0x1f7ae7=parseInt(_0x3dc6cc(0x174))/0x1*(parseInt(_0x3dc6cc(0x17d))/0x2)+-parseInt(_0x3dc6cc(0x177))/0x3+-parseInt(_0x3dc6cc(0x17c))/0x4+-parseInt(_0x3dc6cc(0x17b))/0x5+parseInt(_0x3dc6cc(0x175))/0x6*(-parseInt(_0x3dc6cc(0x176))/0x7)+parseInt(_0x3dc6cc(0x178))/0x8*(parseInt(_0x3dc6cc(0x17a))/0x9)+parseInt(_0x3dc6cc(0x179))/0xa;if(_0x1f7ae7===_0x4ff5d3)break;else _0x48146b['push'](_0x48146b['shift']());}catch(_0x145a60){_0x48146b['push'](_0x48146b['shift']());}}}(a73_0xd29c,0x97d3a));export{runCommand}from'../framework/runner.js';export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{dryRun}from'../framework/dryrun.js';function a73_0xd29c(){var _0x5eef7e=['7AlVuVf','2348361aBQuNX','8175048yQtPde','24706140ESYJXD','9oyFrlh','5976105DUDOGk','1845032OfiyCY','870776GTKOiA','1QgxrFP','5200410xepYpo'];a73_0xd29c=function(){return _0x5eef7e;};return a73_0xd29c();}export{riskLevelOrder,isValidFormat}from'../framework/types.js';
|