@lovrabet/lovrabet-cli 2.1.6-beta.6 → 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
|
-
|
|
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
|
-
|
|
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
|
-
function
|
|
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
|
-
function
|
|
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_0x3b2b82=a64_0xe5e2;(function(_0x24e842,_0x56200f){const _0x518ec0=a64_0xe5e2,_0x1f863e=_0x24e842();while(!![]){try{const _0x3048a9=parseInt(_0x518ec0(0x1f3))/0x1*(-parseInt(_0x518ec0(0x1ee))/0x2)+-parseInt(_0x518ec0(0x1ea))/0x3*(parseInt(_0x518ec0(0x224))/0x4)+-parseInt(_0x518ec0(0x21f))/0x5+-parseInt(_0x518ec0(0x218))/0x6*(-parseInt(_0x518ec0(0x217))/0x7)+-parseInt(_0x518ec0(0x211))/0x8+-parseInt(_0x518ec0(0x1fa))/0x9+-parseInt(_0x518ec0(0x225))/0xa*(-parseInt(_0x518ec0(0x1e2))/0xb);if(_0x3048a9===_0x56200f)break;else _0x1f863e['push'](_0x1f863e['shift']());}catch(_0x478455){_0x1f863e['push'](_0x1f863e['shift']());}}}(a64_0x3803,0xee9d0));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';function a64_0x3803(){const _0x161cfd=['explicit','nonInteractive','local-alias','stdout','EXDEV','globalConfig','raw','newConfigFileName','code','trim','env','userDomain','cache','13553496cHHhgW','utf8','parse','true','riskLevel','host','1013495dlGItj','18xTrBTY','defaultApp','apiDomain','ACCESS_KEY','daily','error','EPERM','2483960VzJBKo','EACCES','setRawCommand','./constant/domain.js','VERBOSE','316136BwssfH','7261990QnzypP','stdin','string','77QFOLWR','format','configFileNames','apps','projectConfig','project','APPCODE','online','60gqPzMo','stringify','top-level','values','18uSAOKT','maxRisk','isTTY','PAGE_SIZE','slice','25997MJdZXv','join','app','global','setLogPath','accessKey','isRaw','4812804BENEqW','development','setRawMode','cwd','appcode','production','skillHubDomain','inherit','empty','message'];a64_0x3803=function(){return _0x161cfd;};return a64_0x3803();}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_0x3b2b82(0x1e4)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a64_0x3b2b82(0x20b)];function resolveConfigPath(_0x2322d8){for(const _0x569ee1 of CONFIG_NAMES){const _0x4e46e3=resolve(_0x2322d8,_0x569ee1);if(existsSync(_0x4e46e3))return _0x4e46e3;}return undefined;}export function resolveWriteConfigPath(_0x48cf2a){const _0x1e5196=a64_0x3b2b82,_0x392bc7=_0x48cf2a===_0x1e5196(0x1e7)?process[_0x1e5196(0x1fd)]():homedir(),_0x26a4e3=resolveConfigPath(_0x392bc7);return _0x26a4e3??resolve(_0x392bc7,NEW_CONFIG_NAME);}export function readConfigFile(_0x11662a){const _0x451c6f=a64_0x3b2b82;try{if(existsSync(_0x11662a)){const _0xee8b27=readFileSync(_0x11662a,{'encoding':_0x451c6f(0x212)});if(_0xee8b27){const _0x3bcefa=JSON[_0x451c6f(0x213)](_0xee8b27);return migrateOnlineEnv(_0x11662a,_0x3bcefa),_0x3bcefa;}}}catch{}return{};}function migrateOnlineEnv(_0x110445,_0x14082a){const _0x1127ac=a64_0x3b2b82;let _0x195a08=![];_0x14082a[_0x1127ac(0x20e)]===_0x1127ac(0x1e9)&&(_0x14082a[_0x1127ac(0x20e)]=_0x1127ac(0x1ff),_0x195a08=!![]);if(_0x14082a[_0x1127ac(0x1e5)]&&typeof _0x14082a[_0x1127ac(0x1e5)]==='object')for(const _0xdeb68e of Object[_0x1127ac(0x1ed)](_0x14082a[_0x1127ac(0x1e5)])){_0xdeb68e&&_0xdeb68e[_0x1127ac(0x20e)]===_0x1127ac(0x1e9)&&(_0xdeb68e[_0x1127ac(0x20e)]=_0x1127ac(0x1ff),_0x195a08=!![]);}if(_0x195a08)try{writeConfigFile(_0x110445,_0x14082a);}catch{}}export function writeConfigFile(_0xc14931,_0x45122e){const _0xa66eba=a64_0x3b2b82,_0x491367=dirname(_0xc14931);!existsSync(_0x491367)&&mkdirSync(_0x491367,{'recursive':!![]});const _0x23a6bd=_0xc14931+'.tmp';try{writeFileSync(_0x23a6bd,JSON['stringify'](_0x45122e,null,0x2)+'\x0a',{'encoding':_0xa66eba(0x212),'mode':0x180});try{renameSync(_0x23a6bd,_0xc14931);}catch(_0x1e503c){if(_0x1e503c[_0xa66eba(0x20c)]===_0xa66eba(0x21e)||_0x1e503c[_0xa66eba(0x20c)]===_0xa66eba(0x208)||_0x1e503c[_0xa66eba(0x20c)]===_0xa66eba(0x220)){writeFileSync(_0xc14931,JSON[_0xa66eba(0x1eb)](_0x45122e,null,0x2)+'\x0a',{'encoding':_0xa66eba(0x212)});try{unlinkSync(_0x23a6bd);}catch{}}else throw _0x1e503c;}}catch(_0x54d7fb){try{unlinkSync(_0x23a6bd);}catch{}throw _0x54d7fb;}}export function isNonInteractiveMode(_0x3b1670){const _0x4f4e05=a64_0x3b2b82;return!!(_0x3b1670[_0x4f4e05(0x205)]||_0x3b1670['ci']||productEnvNames('CI')['some'](_0x4b6d58=>process.env[_0x4b6d58]===_0x4f4e05(0x214))||process.env.CI==='true'||!process[_0x4f4e05(0x207)][_0x4f4e05(0x1f0)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x3ea2bb=a64_0x3b2b82;if(!process[_0x3ea2bb(0x1e0)][_0x3ea2bb(0x1f0)])return![];try{const _0x289a10=process[_0x3ea2bb(0x1e0)][_0x3ea2bb(0x1f9)];return process[_0x3ea2bb(0x1e0)][_0x3ea2bb(0x1fc)](!![]),process[_0x3ea2bb(0x1e0)]['setRawMode'](_0x289a10??![]),!![];}catch{return![];}}export async function createContext(_0x4bbf81){const _0x4134cb=a64_0x3b2b82,_0x566328=readRawConfig(),_0x505513=buildConfig(_0x566328,_0x4bbf81);await initGlobalEnvironment(_0x505513);const {getUserDomain:_0x5a0bf1,getApiDomain:_0x17d4fa}=await import(_0x4134cb(0x222)),_0x428961={'apiDomain':_0x17d4fa(),'userDomain':_0x5a0bf1()},_0x450fb1=await buildAuth(_0x505513);logger[_0x4134cb(0x1f7)](process[_0x4134cb(0x1fd)]());const _0x4c651a=(CLI_BIN_NAME+'\x20'+process['argv'][_0x4134cb(0x1f2)](0x2)[_0x4134cb(0x1f4)]('\x20'))[_0x4134cb(0x20d)]();logger[_0x4134cb(0x221)](_0x4c651a);const _0x46eac1=isNonInteractiveMode(_0x4bbf81);return{'config':_0x505513,'auth':_0x450fb1,'logger':logger,'env':_0x428961,'nonInteractive':_0x46eac1};}export function buildConfigFromFlags(_0x35645a){return buildConfig(readRawConfig(),_0x35645a);}export function getLocalAppAliases(_0x13b04c){const _0x50e06d=a64_0x3b2b82;return _0x13b04c[_0x50e06d(0x1e5)]&&typeof _0x13b04c[_0x50e06d(0x1e5)]==='object'?_0x13b04c[_0x50e06d(0x1e5)]:{};}function a64_0xe5e2(_0x4fd42d,_0x5b856f){_0x4fd42d=_0x4fd42d-0x1e0;const _0x3803a5=a64_0x3803();let _0xe5e2a0=_0x3803a5[_0x4fd42d];return _0xe5e2a0;}export function resolveLocalAppAliasCode(_0x4ca0a6,_0x29b47e){const _0x2b98e9=a64_0x3b2b82;if(!_0x29b47e)return undefined;const _0x10d3f3=getLocalAppAliases(_0x4ca0a6)[_0x29b47e],_0x4ab3c2=_0x10d3f3?.[_0x2b98e9(0x1fe)];return typeof _0x4ab3c2===_0x2b98e9(0x1e1)&&_0x4ab3c2[_0x2b98e9(0x20d)]()?_0x4ab3c2['trim']():undefined;}export function readAppCodeFromConfig(){const _0x167e5b=a64_0x3b2b82,_0x3fb9bf=readRawConfig(),_0x4bdaaa=_0x3fb9bf['appcode']??_0x3fb9bf['app'];if(typeof _0x4bdaaa===_0x167e5b(0x1e1)&&_0x4bdaaa[_0x167e5b(0x20d)]())return _0x4bdaaa['trim']();const _0x5167d0=resolveLocalAppAliasCode(_0x3fb9bf,typeof _0x3fb9bf[_0x167e5b(0x219)]===_0x167e5b(0x1e1)?_0x3fb9bf[_0x167e5b(0x219)]:undefined);if(_0x5167d0)return _0x5167d0;const _0x5b3f95=normalizeEnv(String(_0x3fb9bf[_0x167e5b(0x20e)]||'production')),_0x42828c=isDaily(_0x5b3f95)?_0x167e5b(0x21c):isDev(_0x5b3f95)?_0x167e5b(0x1fb):_0x167e5b(0x1ff),_0x3171b9=resolveCachedAppCode(typeof _0x3fb9bf[_0x167e5b(0x219)]===_0x167e5b(0x1e1)?_0x3fb9bf[_0x167e5b(0x219)]:undefined,_0x42828c,typeof _0x3fb9bf[_0x167e5b(0x1f8)]==='string'?_0x3fb9bf[_0x167e5b(0x1f8)]:undefined);if(_0x3171b9)return _0x3171b9;const _0xcc310a=Object[_0x167e5b(0x1ed)](getLocalAppAliases(_0x3fb9bf))['find'](_0x183b54=>_0x183b54?.[_0x167e5b(0x1fe)]);return typeof _0xcc310a?.[_0x167e5b(0x1fe)]===_0x167e5b(0x1e1)&&_0xcc310a[_0x167e5b(0x1fe)][_0x167e5b(0x20d)]()?_0xcc310a[_0x167e5b(0x1fe)][_0x167e5b(0x20d)]():undefined;}export function readScopedConfig(_0x5e140f){const _0x1835d9=a64_0x3b2b82,_0x4f26ac=_0x5e140f[_0x1835d9(0x1f6)]?_0x1835d9(0x1f6):_0x1835d9(0x1e7);return readConfigFile(resolveWriteConfigPath(_0x4f26ac));}export function writeScopedConfig(_0x23351f,_0x2ce862){const _0x356905=a64_0x3b2b82,_0x4570a0=_0x2ce862[_0x356905(0x1f6)]?_0x356905(0x1f6):_0x356905(0x1e7);writeConfigFile(resolveWriteConfigPath(_0x4570a0),_0x23351f);}export async function initGlobalEnvironment(_0x5db6ee){const _0x144730=a64_0x3b2b82,{initEnv:_0x33d89f}=await import('./constant/env.js');_0x33d89f(_0x5db6ee[_0x144730(0x20e)]);const {initDomains:_0x2618d7}=await import(_0x144730(0x222));_0x2618d7({'apiDomain':_0x5db6ee['raw'][_0x144730(0x21a)]||_0x5db6ee[_0x144730(0x20a)][_0x144730(0x216)]||undefined,'userDomain':_0x5db6ee['raw'][_0x144730(0x20f)]||undefined,'runtimeDomain':_0x5db6ee[_0x144730(0x20a)]['runtimeDomain']||undefined,'skillHubDomain':_0x5db6ee[_0x144730(0x20a)][_0x144730(0x200)]||undefined});}export function getProjectConfigPath(){const _0x48698b=a64_0x3b2b82;return resolveConfigPath(process[_0x48698b(0x1fd)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x147876){const _0x2b1ac2=a64_0x3b2b82;if(!existsSync(_0x147876))return{'status':'missing'};try{const _0x304e99=readFileSync(_0x147876,{'encoding':'utf8'});if(!_0x304e99?.['trim']())return{'status':_0x2b1ac2(0x202)};const _0x667137=JSON['parse'](_0x304e99);return{'status':'ok','data':_0x667137};}catch(_0xe66be3){return{'status':_0x2b1ac2(0x21d),'message':_0xe66be3 instanceof Error?_0xe66be3[_0x2b1ac2(0x203)]:String(_0xe66be3)};}}export function loadRawConfigLayers(_0x1b02c1){const _0x522a00=a64_0x3b2b82;let _0x42e099={},_0x4c4aa5={},_0x197aa2,_0x339337;try{_0x197aa2=resolveConfigPath(homedir());if(_0x197aa2){const _0x107304=readFileSync(_0x197aa2,{'encoding':'utf8'});if(_0x107304)_0x42e099=JSON[_0x522a00(0x213)](_0x107304);}}catch{}try{const _0x527177=_0x1b02c1||process['cwd']();_0x339337=resolveConfigPath(_0x527177);if(_0x339337){const _0x2a3cf3=readFileSync(_0x339337,{'encoding':_0x522a00(0x212)});if(_0x2a3cf3)_0x4c4aa5=JSON['parse'](_0x2a3cf3);}}catch{}return{'globalPath':_0x197aa2,'projectPath':_0x339337,'globalConfig':_0x42e099,'projectConfig':_0x4c4aa5};}function mergeRawConfigLayers(_0x191ef9){const _0xfb9977=a64_0x3b2b82,{globalConfig:_0x30d200,projectConfig:_0x4efaa1}=_0x191ef9;if(_0x4efaa1['inherit']===![]){const _0x35616a={..._0x4efaa1};return delete _0x35616a[_0xfb9977(0x201)],_0x35616a;}const _0x25eeb2={..._0x30d200,..._0x4efaa1};if(_0xfb9977(0x219)in _0x4efaa1)_0x25eeb2[_0xfb9977(0x219)]=_0x4efaa1['defaultApp'];else _0x30d200[_0xfb9977(0x219)]&&(_0x25eeb2[_0xfb9977(0x219)]=_0x30d200['defaultApp']);return _0x25eeb2;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x37d583){return mergeRawConfigLayers(loadRawConfigLayers(_0x37d583));}export function readRawConfigWithLayers(_0x4aba60){const _0x206a15=loadRawConfigLayers(_0x4aba60);return{'config':mergeRawConfigLayers(_0x206a15),'layers':_0x206a15};}export function resolveDefaultAppSource(_0x4dafca){const _0x5baaf6=a64_0x3b2b82;if(_0x5baaf6(0x219)in _0x4dafca[_0x5baaf6(0x1e6)])return'project';if(_0x4dafca['projectConfig'][_0x5baaf6(0x201)]===![])return null;if(_0x4dafca[_0x5baaf6(0x209)][_0x5baaf6(0x219)])return _0x5baaf6(0x1f6);return null;}function buildConfig(_0x4f3227,_0x2e8022){const _0x2d93f3=a64_0x3b2b82,_0x3bac97=_0x4f3227[_0x2d93f3(0x219)]||undefined,_0x3082a5=_0x2e8022[_0x2d93f3(0x1f5)]||env('APP')||undefined,_0x3e8499=_0x3082a5||_0x3bac97||undefined,_0x41decf=env(_0x2d93f3(0x21b))||_0x4f3227[_0x2d93f3(0x1f8)]||undefined,_0x5af1b4=_0x2e8022[_0x2d93f3(0x20e)]||env('ENV')||_0x4f3227[_0x2d93f3(0x20e)]||DEFAULT_CONFIG_VALUES[_0x2d93f3(0x20e)],_0x492252=normalizeEnv(String(_0x5af1b4)),_0x4d6186=isDaily(_0x492252)?_0x2d93f3(0x21c):isDev(_0x492252)?'development':_0x2d93f3(0x1ff),_0x1c612c=resolveLocalAppAliasCode(_0x4f3227,_0x3e8499),_0x2fb6a5=resolveCachedAppCode(_0x3e8499,_0x4d6186,_0x41decf),_0x5d3803=typeof _0x2e8022[_0x2d93f3(0x1fe)]===_0x2d93f3(0x1e1)?_0x2e8022[_0x2d93f3(0x1fe)]:undefined,_0x822696=env(_0x2d93f3(0x1e8)),_0x486643=_0x3082a5?undefined:_0x4f3227[_0x2d93f3(0x1fe)]||_0x4f3227[_0x2d93f3(0x1f5)]||undefined,_0x1c872e=_0x5d3803||_0x822696||_0x1c612c||_0x2fb6a5||_0x486643||undefined,_0x3c9db8=_0x5d3803?_0x2d93f3(0x204):_0x822696?_0x2d93f3(0x20e):_0x1c612c?_0x2d93f3(0x206):_0x2fb6a5?_0x2d93f3(0x210):_0x486643?_0x2d93f3(0x1ec):undefined,_0x1d0a87=_0x4f3227['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x7b9f17=undefined,_0x454782=_0x2e8022[_0x2d93f3(0x1e3)]||env('FORMAT')||_0x4f3227[_0x2d93f3(0x1e3)],_0x5e847f=normalizeLegacyOutputFormat(_0x454782),_0x2c8e5b=env(_0x2d93f3(0x1f1))||_0x4f3227['pageSize'],_0x48f0a9=_0x2c8e5b?Number(_0x2c8e5b)||undefined:undefined,_0x6b24c6=_0x4f3227[_0x2d93f3(0x215)]||_0x4f3227[_0x2d93f3(0x1ef)],_0x5b4f14=_0x6b24c6==='read'||_0x6b24c6==='write'||_0x6b24c6==='high-risk-write'?_0x6b24c6:DEFAULT_CONFIG_VALUES[_0x2d93f3(0x215)],_0x4cb0a3=env(_0x2d93f3(0x223)),_0x219bb4=_0x4cb0a3==='1'||_0x4cb0a3===_0x2d93f3(0x214);return{'appCode':typeof _0x1c872e==='string'&&_0x1c872e[_0x2d93f3(0x20d)]()?_0x1c872e['trim']():undefined,'appCodeSource':_0x3c9db8,'env':_0x4d6186,'locale':_0x1d0a87,'cookie':_0x7b9f17,'accessKey':_0x41decf,'format':_0x5e847f,'pageSize':_0x48f0a9,'riskLevel':_0x5b4f14,'verbose':_0x219bb4,'defaultApp':_0x3bac97,'currentApp':typeof _0x3e8499===_0x2d93f3(0x1e1)?_0x3e8499:undefined,'raw':_0x4f3227};}function env(_0x336543){return productEnv(_0x336543);}async function buildAuth(_0x1fd048){const _0x39b900='',_0x1b5194=!!_0x1fd048['accessKey'];return{'cookie':_0x39b900,'isLoggedIn':_0x1b5194,async 'getOrLogin'(){if(_0x1b5194)return _0x39b900;throw CliErrors['authRequired']();}};}
|
|
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(_0x522e7e,_0x39920e){const _0x43c785=a65_0xa184,_0x4ab82f=_0x522e7e();while(!![]){try{const _0x43932c=-parseInt(_0x43c785(0x1ba))/0x1+parseInt(_0x43c785(0x1a7))/0x2*(parseInt(_0x43c785(0x185))/0x3)+parseInt(_0x43c785(0x1c6))/0x4*(-parseInt(_0x43c785(0x1fb))/0x5)+parseInt(_0x43c785(0x191))/0x6*(parseInt(_0x43c785(0x1bf))/0x7)+parseInt(_0x43c785(0x1bb))/0x8*(-parseInt(_0x43c785(0x1b3))/0x9)+-parseInt(_0x43c785(0x1cd))/0xa*(parseInt(_0x43c785(0x1d0))/0xb)+parseInt(_0x43c785(0x1b2))/0xc*(parseInt(_0x43c785(0x1f6))/0xd);if(_0x43932c===_0x39920e)break;else _0x4ab82f['push'](_0x4ab82f['shift']());}catch(_0x1afe11){_0x4ab82f['push'](_0x4ab82f['shift']());}}}(a65_0x1473,0xe6480));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(_0x1959c0){_activeAK=_0x1959c0||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0x1087ac,_0xfe8b23={}){const _0x415d61=a65_0xa184,{method:method=_0x415d61(0x1e3),body:_0x10d04a,headers:headers={},timeout:timeout=0x7530}=_0xfe8b23,_0x30b0ad=_activeAK,_0x1902ea=getRuntimeDomain();if(!_0x30b0ad)throw CliErrors[_0x415d61(0x1f9)](_0x415d61(0x1ab)+PRODUCT_CONFIG[_0x415d61(0x1c5)]+'.');const _0x2c91d6=''+_0x1902ea+_0x1087ac,_0xcda67b={'X-User-AK':_0x30b0ad},_0x209075=new AbortController(),_0x19f9e4=setTimeout(()=>_0x209075['abort'](),timeout);try{const _0x3994bd=await fetch(_0x2c91d6,{'method':method,'headers':{'Content-Type':_0x415d61(0x1cb),'X-Invoke-Source':PRODUCT_CONFIG[_0x415d61(0x188)],..._0xcda67b,...headers},'body':_0x10d04a?JSON[_0x415d61(0x1e8)](_0x10d04a):undefined,'signal':_0x209075[_0x415d61(0x1c7)]});let _0x2463d2;try{_0x2463d2=await _0x3994bd[_0x415d61(0x1d5)]();}catch{throw CliErrors['apiError'](_0x415d61(0x18e)+_0x3994bd[_0x415d61(0x200)]+')',_0x3994bd[_0x415d61(0x200)]>=0x190?_0x415d61(0x1a9):undefined);}if(!_0x3994bd['ok']||_0x2463d2['success']===![])throw CliErrors[_0x415d61(0x1b6)](_0x2463d2['errorMsg']||_0x2463d2[_0x415d61(0x1be)]||_0x415d61(0x19f)+_0x3994bd['status'],_0x2463d2[_0x415d61(0x19b)]?'API\x20error\x20code:\x20'+_0x2463d2[_0x415d61(0x19b)]:undefined);return _0x2463d2;}catch(_0x3ec2c1){if(_0x3ec2c1 instanceof Error&&_0x3ec2c1[_0x415d61(0x1b4)]==='AbortError')throw CliErrors['apiError'](_0x415d61(0x187)+_0x2c91d6);throw _0x3ec2c1;}finally{clearTimeout(_0x19f9e4);}}async function apiBinaryRequest(_0x4739e8,_0xf7b4b9={}){const _0x1c07a3=a65_0xa184,{method:method=_0x1c07a3(0x1e3),headers:headers={},timeout:timeout=0x7530}=_0xf7b4b9,_0x284d40=_activeAK,_0x46aaaa=getRuntimeDomain();if(!_0x284d40)throw CliErrors[_0x1c07a3(0x1f9)](_0x1c07a3(0x1ab)+PRODUCT_CONFIG[_0x1c07a3(0x1c5)]+'.');const _0x58b3d5=''+_0x46aaaa+_0x4739e8,_0x28ace1=new AbortController(),_0x592f4d=setTimeout(()=>_0x28ace1[_0x1c07a3(0x196)](),timeout);try{const _0x2e7a3b=await fetch(_0x58b3d5,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x284d40,...headers},'signal':_0x28ace1[_0x1c07a3(0x1c7)]});if(!_0x2e7a3b['ok']){let _0x1d0b65;try{const _0x3ead31=await _0x2e7a3b[_0x1c07a3(0x1d5)]();_0x1d0b65=_0x3ead31[_0x1c07a3(0x183)]||_0x3ead31[_0x1c07a3(0x1be)]||_0x3ead31[_0x1c07a3(0x19b)];}catch{_0x1d0b65=await _0x2e7a3b[_0x1c07a3(0x1e5)]()[_0x1c07a3(0x1e2)](()=>undefined);}throw CliErrors[_0x1c07a3(0x1b6)](_0x1d0b65||_0x1c07a3(0x19f)+_0x2e7a3b['status'],_0x1c07a3(0x1f4)+_0x58b3d5);}return Buffer['from'](await _0x2e7a3b[_0x1c07a3(0x1f1)]());}catch(_0x20b5c1){if(_0x20b5c1 instanceof Error&&_0x20b5c1['name']===_0x1c07a3(0x1c8))throw CliErrors[_0x1c07a3(0x1b6)](_0x1c07a3(0x187)+_0x58b3d5);throw _0x20b5c1;}finally{clearTimeout(_0x592f4d);}}async function toolboxRequest(_0x17b6e8,_0x1ddc1c,_0x317093={}){const _0x27f0f7=a65_0xa184,{method:method=_0x27f0f7(0x1e3),headers:headers={},timeout:timeout=0x7530}=_0x317093,_0x4c8c1c=_activeAK;if(!_0x4c8c1c)throw CliErrors[_0x27f0f7(0x1f9)](_0x27f0f7(0x1ab)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x1a0d46=getApiDomain()['replace'](/\/$/,''),_0x2f045c=new URL(_0x17b6e8,_0x1a0d46+'/api/node-toolbox/');if(_0x1ddc1c)for(const [_0x2460ab,_0xeb4e41]of Object['entries'](_0x1ddc1c)){_0xeb4e41!==undefined&&_0xeb4e41!==null&&_0x2f045c[_0x27f0f7(0x1c3)][_0x27f0f7(0x1fa)](_0x2460ab,String(_0xeb4e41));}const _0x4fa7b1=new AbortController(),_0x10c28a=setTimeout(()=>_0x4fa7b1[_0x27f0f7(0x196)](),timeout);try{const _0x4380f1=await fetch(_0x2f045c,{'method':method,'headers':{'Content-Type':_0x27f0f7(0x1cb),'X-Invoke-Source':PRODUCT_CONFIG[_0x27f0f7(0x188)],'X-User-AK':_0x4c8c1c,...headers},'signal':_0x4fa7b1[_0x27f0f7(0x1c7)]});let _0x225dfd;try{_0x225dfd=await _0x4380f1['json']();}catch{throw CliErrors[_0x27f0f7(0x1b6)](_0x27f0f7(0x1aa)+_0x4380f1[_0x27f0f7(0x200)]+')',_0x4380f1[_0x27f0f7(0x200)]>=0x190?_0x27f0f7(0x1a9):undefined);}if(!_0x4380f1['ok']){const _0x3ee885=_0x225dfd&&typeof _0x225dfd===_0x27f0f7(0x1e6)?_0x225dfd:{};throw CliErrors['apiError'](_0x3ee885['errorMsg']||_0x3ee885[_0x27f0f7(0x1be)]||_0x27f0f7(0x1ec)+_0x4380f1[_0x27f0f7(0x200)],_0x3ee885[_0x27f0f7(0x19b)]?_0x27f0f7(0x1d6)+_0x3ee885[_0x27f0f7(0x19b)]:undefined);}if(_0x225dfd&&typeof _0x225dfd===_0x27f0f7(0x1e6)&&_0x27f0f7(0x1d4)in _0x225dfd&&typeof _0x225dfd['success']===_0x27f0f7(0x190)){const _0xf83a1f=_0x225dfd;if(!_0xf83a1f[_0x27f0f7(0x1d4)])throw CliErrors[_0x27f0f7(0x1b6)](_0xf83a1f[_0x27f0f7(0x183)]||_0xf83a1f[_0x27f0f7(0x1be)]||_0x27f0f7(0x199),_0xf83a1f['errorCode']?_0x27f0f7(0x1d6)+_0xf83a1f[_0x27f0f7(0x19b)]:undefined);return _0xf83a1f['data'];}return _0x225dfd;}catch(_0x5eb409){if(_0x5eb409 instanceof Error&&_0x5eb409[_0x27f0f7(0x1b4)]==='AbortError')throw CliErrors[_0x27f0f7(0x1b6)](_0x27f0f7(0x187)+_0x2f045c[_0x27f0f7(0x1fd)]());throw _0x5eb409;}finally{clearTimeout(_0x10c28a);}}async function skillHubJsonRequest(_0xae5bf3,_0x40c1a1={}){const _0x1b7abd=a65_0xa184,{method:method=_0x1b7abd(0x1e3),query:_0x3df3ff,body:_0x51ae73,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x40c1a1,_0x45c3f4=_activeAK;if(!_0x45c3f4)throw CliErrors[_0x1b7abd(0x1f9)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x1b7abd(0x1c5)]+'.');const _0x5e6ed1=getSkillHubDomain()[_0x1b7abd(0x1df)](/\/$/,''),_0x29480e=new URL(_0xae5bf3,_0x5e6ed1+'/');if(_0x3df3ff)for(const [_0x28bc40,_0xa9099c]of Object[_0x1b7abd(0x1a8)](_0x3df3ff)){_0xa9099c!==undefined&&_0xa9099c!==null&&_0x29480e['searchParams'][_0x1b7abd(0x1fa)](_0x28bc40,String(_0xa9099c));}const _0x36bb30=new AbortController(),_0x47f505=setTimeout(()=>_0x36bb30[_0x1b7abd(0x196)](),timeout);try{const _0x394cd5=await fetch(_0x29480e[_0x1b7abd(0x1fd)](),{'method':method,'headers':{'Accept':_0x1b7abd(0x1cb),'X-Invoke-Source':PRODUCT_CONFIG[_0x1b7abd(0x188)],'X-User-AK':_0x45c3f4,...headers},'body':_0x51ae73,'signal':_0x36bb30[_0x1b7abd(0x1c7)]});let _0x6fef82;try{_0x6fef82=await _0x394cd5[_0x1b7abd(0x1d5)]();}catch{if(allowNotFound&&_0x394cd5[_0x1b7abd(0x200)]===0x194)return undefined;throw CliErrors[_0x1b7abd(0x1b6)]('SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x394cd5['status']+')',_0x394cd5[_0x1b7abd(0x200)]>=0x190?_0x1b7abd(0x1a9):undefined);}if(allowNotFound&&(_0x394cd5[_0x1b7abd(0x200)]===0x194||_0x6fef82?.[_0x1b7abd(0x1f5)]===0x194))return undefined;const _0x37d653=!_0x394cd5['ok']||_0x6fef82?.[_0x1b7abd(0x1d4)]===![]||typeof _0x6fef82?.[_0x1b7abd(0x1f5)]===_0x1b7abd(0x182)&&_0x6fef82[_0x1b7abd(0x1f5)]>=0x190;if(_0x37d653)throw CliErrors[_0x1b7abd(0x1b6)](_0x6fef82?.[_0x1b7abd(0x183)]||_0x6fef82?.[_0x1b7abd(0x1be)]||_0x6fef82?.[_0x1b7abd(0x18d)]||_0x1b7abd(0x1e7)+_0x394cd5['status'],_0x6fef82?.[_0x1b7abd(0x19b)]?'SkillHub\x20error\x20code:\x20'+_0x6fef82['errorCode']:undefined);return _0x6fef82?.[_0x1b7abd(0x19c)]??_0x6fef82;}catch(_0x52f392){if(_0x52f392 instanceof Error&&_0x52f392[_0x1b7abd(0x1b4)]===_0x1b7abd(0x1c8))throw CliErrors[_0x1b7abd(0x1b6)](_0x1b7abd(0x187)+_0x29480e[_0x1b7abd(0x1fd)]());throw _0x52f392;}finally{clearTimeout(_0x47f505);}}async function skillHubBinaryRequest(_0x440bfc,_0xff0462={}){const _0x14fe4c=a65_0xa184,{query:_0x10f4d8,headers:headers={},timeout:timeout=0x7530}=_0xff0462,_0x174bf0=_activeAK;if(!_0x174bf0)throw CliErrors[_0x14fe4c(0x1f9)](_0x14fe4c(0x1ab)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x3ef64e=getSkillHubDomain()[_0x14fe4c(0x1df)](/\/$/,''),_0x32c201=new URL(_0x440bfc,_0x3ef64e+'/');if(_0x10f4d8)for(const [_0x4d2ce4,_0x4c1cdf]of Object[_0x14fe4c(0x1a8)](_0x10f4d8)){_0x4c1cdf!==undefined&&_0x4c1cdf!==null&&_0x32c201[_0x14fe4c(0x1c3)][_0x14fe4c(0x1fa)](_0x4d2ce4,String(_0x4c1cdf));}const _0xa181a9=new AbortController(),_0x331e86=setTimeout(()=>_0xa181a9[_0x14fe4c(0x196)](),timeout);try{const _0x53b1b2=await fetch(_0x32c201[_0x14fe4c(0x1fd)](),{'method':_0x14fe4c(0x1e3),'headers':{'Accept':_0x14fe4c(0x1ed),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x174bf0,...headers},'signal':_0xa181a9[_0x14fe4c(0x1c7)]});if(!_0x53b1b2['ok']){let _0x5727b8;try{const _0x503290=await _0x53b1b2[_0x14fe4c(0x1d5)]();_0x5727b8=_0x503290[_0x14fe4c(0x183)]||_0x503290[_0x14fe4c(0x1be)]||_0x503290[_0x14fe4c(0x18d)]||_0x503290[_0x14fe4c(0x19b)];}catch{_0x5727b8=await _0x53b1b2[_0x14fe4c(0x1e5)]()[_0x14fe4c(0x1e2)](()=>undefined);}throw CliErrors[_0x14fe4c(0x1b6)](_0x5727b8||'SkillHub\x20API\x20error:\x20'+_0x53b1b2['status'],_0x14fe4c(0x1f4)+_0x32c201[_0x14fe4c(0x1fd)]());}return Buffer[_0x14fe4c(0x1c0)](await _0x53b1b2['arrayBuffer']());}catch(_0x5701fb){if(_0x5701fb instanceof Error&&_0x5701fb[_0x14fe4c(0x1b4)]===_0x14fe4c(0x1c8))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x32c201[_0x14fe4c(0x1fd)]());throw _0x5701fb;}finally{clearTimeout(_0x331e86);}}export async function getBffScriptInfo(_0x1559c6){const _0x4ab906=a65_0xa184,_0x4c6712=await apiRequest(_0x4ab906(0x1a4)+_0x1559c6);if(!_0x4c6712[_0x4ab906(0x19c)])throw CliErrors[_0x4ab906(0x201)](_0x4ab906(0x1cf)+_0x1559c6);return _0x4c6712[_0x4ab906(0x19c)];}export async function getSqlQueryInfo(_0x14d576,_0x2b365d){const _0x5987e7=a65_0xa184,_0x5e4276=await apiRequest(_0x5987e7(0x19a),{'method':'POST','body':{'appCode':_0x14d576,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x2b365d}}),_0x402b71=_0x5e4276[_0x5987e7(0x19c)],_0x3f1e6a=_0x402b71&&typeof _0x402b71===_0x5987e7(0x1e6)&&_0x5987e7(0x1ad)in _0x402b71?_0x402b71['tableData']?.[0x0]:_0x402b71&&typeof _0x402b71===_0x5987e7(0x1e6)&&'sqlCode'in _0x402b71?_0x402b71:undefined;if(!_0x3f1e6a)throw CliErrors[_0x5987e7(0x201)](_0x5987e7(0x1b9)+_0x2b365d);return _0x3f1e6a;}function isRemoteAppItem(_0x57c861){const _0x3bf995=a65_0xa184;return!!_0x57c861&&typeof _0x57c861===_0x3bf995(0x1e6)&&typeof _0x57c861[_0x3bf995(0x1b7)]===_0x3bf995(0x18b)&&typeof _0x57c861[_0x3bf995(0x192)]===_0x3bf995(0x18b);}function extractRemoteAppItems(_0x1cce00){const _0x34f1b7=a65_0xa184;if(Array[_0x34f1b7(0x1b5)](_0x1cce00))return _0x1cce00[_0x34f1b7(0x1f2)](isRemoteAppItem);if(!_0x1cce00||typeof _0x1cce00!==_0x34f1b7(0x1e6))throw CliErrors[_0x34f1b7(0x1b6)](_0x34f1b7(0x1d3));const _0x584029=_0x1cce00;if(Array[_0x34f1b7(0x1b5)](_0x584029[_0x34f1b7(0x1ad)]))return _0x584029[_0x34f1b7(0x1ad)]['filter'](isRemoteAppItem);if(_0x584029[_0x34f1b7(0x19c)]&&typeof _0x584029[_0x34f1b7(0x19c)]===_0x34f1b7(0x1e6)){const _0x10d023=_0x584029['data'];if(Array[_0x34f1b7(0x1b5)](_0x10d023[_0x34f1b7(0x1ad)]))return _0x10d023['tableData'][_0x34f1b7(0x1f2)](isRemoteAppItem);}throw CliErrors['apiError'](_0x34f1b7(0x1a3));}export async function getMyApps(){const _0x5de574=a65_0xa184,_0x11883e=await apiRequest(_0x5de574(0x1af));return extractRemoteAppItems(_0x11883e[_0x5de574(0x19c)]);}export async function getLoginUserInfo(){const _0x414054=a65_0xa184,_0x252c0b=await apiRequest(_0x414054(0x1e4));if(!_0x252c0b[_0x414054(0x19c)]||typeof _0x252c0b[_0x414054(0x19c)]!==_0x414054(0x1e6)||Array[_0x414054(0x1b5)](_0x252c0b[_0x414054(0x19c)]))throw CliErrors[_0x414054(0x1b6)](_0x414054(0x1ee));return _0x252c0b[_0x414054(0x19c)];}export async function listDatasets(_0x301228,_0x1b8c80){const _0x1b943b=a65_0xa184,_0x1964a1=await apiRequest('/client/dataset/list',{'method':_0x1b943b(0x1a2),'body':{'appCode':_0x301228,..._0x1b8c80?.[_0x1b943b(0x1f5)]&&{'code':_0x1b8c80['code']},..._0x1b8c80?.[_0x1b943b(0x1b4)]&&{'name':_0x1b8c80[_0x1b943b(0x1b4)]}}});return extractList(_0x1964a1[_0x1b943b(0x19c)]);}export async function getDatasetDetail(_0x22377a){const _0x5676a2=await apiRequest('/client/dataset/get-driven-data?code='+encodeURIComponent(_0x22377a));return _0x5676a2['data'];}export async function getDatasetSdkUsageDoc(_0x346a85,_0x4620b4){const _0x223560=a65_0xa184,_0x2d5406=await toolboxRequest(_0x223560(0x1f0),{'datasetCode':_0x346a85,'appCode':_0x4620b4});return typeof _0x2d5406?.['markdown']===_0x223560(0x18b)?_0x2d5406[_0x223560(0x1ae)]:'';}export async function listRuntimeArtifacts(_0x3244b1,_0x487efb){const _0x42ed43=a65_0xa184,_0x5788ca=new URLSearchParams({'appCode':_0x3244b1});if(_0x487efb?.[_0x42ed43(0x1d7)])_0x5788ca[_0x42ed43(0x1fa)](_0x42ed43(0x1d7),_0x487efb[_0x42ed43(0x1d7)]);if(_0x487efb?.[_0x42ed43(0x1de)])_0x5788ca[_0x42ed43(0x1fa)](_0x42ed43(0x1de),_0x487efb[_0x42ed43(0x1de)]);if(_0x487efb?.[_0x42ed43(0x1d1)]!==undefined)_0x5788ca[_0x42ed43(0x1fa)](_0x42ed43(0x1d1),String(_0x487efb[_0x42ed43(0x1d1)]));const _0x4e95c5=await apiRequest(_0x42ed43(0x1c4)+_0x5788ca[_0x42ed43(0x1fd)]());return Array[_0x42ed43(0x1b5)](_0x4e95c5[_0x42ed43(0x19c)])?_0x4e95c5['data']:[];}export async function getRuntimeArtifact(_0x36367a,_0x204466){const _0xd9f931=a65_0xa184,_0x125e48=await apiRequest(_0xd9f931(0x1bd)+_0x36367a+'?appCode='+encodeURIComponent(_0x204466));if(!_0x125e48[_0xd9f931(0x19c)])throw CliErrors[_0xd9f931(0x201)](_0xd9f931(0x186)+_0x36367a);return _0x125e48['data'];}export async function createRuntimeArtifact(_0x3d2945,_0x3cf5ec){const _0x2048de=a65_0xa184,_0x2594f5=await apiRequest(_0x2048de(0x1e9),{'method':_0x2048de(0x1a2),'body':{'appCode':_0x3d2945,..._0x3cf5ec}});return _0x2594f5['data'];}export async function updateRuntimeArtifact(_0x58415d,_0x1a4134,_0x55d9b8){const _0x318982=a65_0xa184,_0x3385e5=await apiRequest(_0x318982(0x1bd)+_0x58415d+_0x318982(0x1dc),{'method':_0x318982(0x1a2),'body':{'appCode':_0x1a4134,..._0x55d9b8}});return _0x3385e5['data'];}export async function listPersonalBffs(_0x2ba436){const _0x528d4c=a65_0xa184,_0x48f41e=await apiRequest(_0x528d4c(0x1c9)+encodeURIComponent(_0x2ba436));return Array[_0x528d4c(0x1b5)](_0x48f41e['data'])?_0x48f41e[_0x528d4c(0x19c)]:[];}export async function getPersonalBff(_0x507d50,_0x1b47a8){const _0x37ca0a=a65_0xa184,_0x2ecdf5=await apiRequest(_0x37ca0a(0x193)+_0x507d50+_0x37ca0a(0x18c)+encodeURIComponent(_0x1b47a8));if(!_0x2ecdf5['data'])throw CliErrors['validation'](_0x37ca0a(0x1e0)+_0x507d50);return _0x2ecdf5[_0x37ca0a(0x19c)];}export async function createPersonalBff(_0x2d0164,_0x5046bf){const _0x1f4fc1=a65_0xa184,_0x284c1e=await apiRequest(_0x1f4fc1(0x1a1),{'method':_0x1f4fc1(0x1a2),'body':{'appCode':_0x2d0164,..._0x5046bf}});return _0x284c1e[_0x1f4fc1(0x19c)];}export async function updatePersonalBff(_0x500668,_0x46cad6,_0x54e8db){const _0x4bff14=a65_0xa184,_0x576789=await apiRequest(_0x4bff14(0x193)+_0x500668+_0x4bff14(0x1dc),{'method':_0x4bff14(0x1a2),'body':{'appCode':_0x46cad6,..._0x54e8db}});return _0x576789[_0x4bff14(0x19c)];}export async function executePersonalBff(_0x59de57,_0x481f54,_0x2f2d6f){const _0x1e64ab=a65_0xa184,_0xeab5da=await apiRequest(_0x1e64ab(0x193)+_0x59de57+'/execute?appCode='+encodeURIComponent(_0x481f54),{'method':'POST','body':_0x2f2d6f});return _0xeab5da[_0x1e64ab(0x19c)];}export async function listPersonalKnowledgeBaseItems(_0x1aed8c){const _0x581004=a65_0xa184,_0x4eb0ea=await apiRequest(_0x581004(0x1bc)+encodeURIComponent(_0x1aed8c));return Array[_0x581004(0x1b5)](_0x4eb0ea[_0x581004(0x19c)])?_0x4eb0ea[_0x581004(0x19c)]:[];}export async function getPersonalKnowledgeBaseItem(_0x6ed1ed,_0x39e766){const _0x323530=a65_0xa184,_0x13b5b7=await apiRequest('/client/knowledge-base/personal/'+_0x6ed1ed+'?appCode='+encodeURIComponent(_0x39e766));if(!_0x13b5b7['data'])throw CliErrors['validation'](_0x323530(0x1fe)+_0x6ed1ed);return _0x13b5b7[_0x323530(0x19c)];}export async function createPersonalKnowledgeBaseItem(_0x1c9426,_0x5de5a3){const _0x2e0978=a65_0xa184,_0x245169=await apiRequest(_0x2e0978(0x197),{'method':_0x2e0978(0x1a2),'body':{'appCode':_0x1c9426,..._0x5de5a3}});return _0x245169[_0x2e0978(0x19c)];}export async function updatePersonalKnowledgeBaseItem(_0x2f8198,_0x5f0583,_0xb909ff){const _0x3a32eb=a65_0xa184,_0x5bb9b5=await apiRequest('/client/knowledge-base/personal/'+_0x2f8198+_0x3a32eb(0x1dc),{'method':_0x3a32eb(0x1a2),'body':{'appCode':_0x5f0583,..._0xb909ff}});return _0x5bb9b5[_0x3a32eb(0x19c)];}export async function searchKnowledgeBase(_0x1f685c,_0x403cc8){const _0x5683a6=a65_0xa184,_0x4db7c7=await apiRequest('/client/knowledge-base/search',{'method':_0x5683a6(0x1a2),'body':{'appCode':_0x1f685c,'query':_0x403cc8[_0x5683a6(0x189)],..._0x403cc8[_0x5683a6(0x1f3)]!==undefined?{'topK':_0x403cc8[_0x5683a6(0x1f3)]}:{}}});return Array[_0x5683a6(0x1b5)](_0x4db7c7[_0x5683a6(0x19c)])?_0x4db7c7[_0x5683a6(0x19c)]:[];}export async function getRuntimeSkillByCode(_0x2e0def,_0x1077a8){const _0x4acbb4=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x2e0def)+'/'+encodeURIComponent(_0x1077a8),{'allowNotFound':!![]});return _0x4acbb4?skillHubRuntimeDetailToRuntimeSkill(_0x4acbb4):undefined;}export async function listRuntimeSkills(_0x47aa44){const _0x4b5a17=a65_0xa184,_0x50b5be=await skillHubJsonRequest(_0x4b5a17(0x1cc)+encodeURIComponent(_0x47aa44[_0x4b5a17(0x1b7)])+_0x4b5a17(0x202),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x47aa44[_0x4b5a17(0x1b7)],_0x50b5be,_0x47aa44['scope']??_0x4b5a17(0x1f7),_0x47aa44[_0x4b5a17(0x1f5)]);}export async function listPersonalRuntimeSkills(_0x46d3b0){const _0x22b02d=a65_0xa184;return(await listRuntimeSkills({'appCode':_0x46d3b0,'scope':_0x22b02d(0x1b1)}))[_0x22b02d(0x1b1)];}export async function listCompanyRuntimeSkills(_0x3ae199){const _0x2e910d=a65_0xa184;return(await listRuntimeSkills({'appCode':_0x3ae199,'scope':_0x2e910d(0x1ce)}))[_0x2e910d(0x1ce)];}export async function listVisibleRuntimeSkills(_0x2fb123){const _0x3d7674=a65_0xa184;return(await listRuntimeSkills({'appCode':_0x2fb123,'scope':_0x3d7674(0x1f7)}))['effective'];}export async function createPersonalRuntimeSkill(_0x10fee8,_0x12fc25){return publishRuntimeSkill(_0x10fee8,_0x12fc25);}export async function updatePersonalRuntimeSkill(_0x15b22b,_0x10e38d,_0x42185e){return publishRuntimeSkill(_0x10e38d,{..._0x42185e,'skillCode':_0x42185e['skillCode']??_0x15b22b});}export async function downloadRuntimeSkillPackage(_0x1ef082,_0x4b1ba5,_0x4f5ff0,_0x4ecc6a){const _0x5ec685=a65_0xa184;void _0x1ef082;const _0x2e45f2=_0x4ecc6a?_0x5ec685(0x18f)+encodeURIComponent(_0x4f5ff0)+'/'+encodeURIComponent(_0x4b1ba5)+_0x5ec685(0x1ff)+encodeURIComponent(_0x4ecc6a)+'/download':_0x5ec685(0x18f)+encodeURIComponent(_0x4f5ff0)+'/'+encodeURIComponent(_0x4b1ba5)+'/download';return skillHubBinaryRequest(_0x2e45f2);}async function publishRuntimeSkill(_0x4003bb,_0x58fb8e){const _0x15180c=a65_0xa184,_0xf9cc38=new FormData();_0xf9cc38['set'](_0x15180c(0x1b0),runtimeSkillPackageFile(_0x58fb8e)),_0xf9cc38[_0x15180c(0x1fa)]('visibility',_0x15180c(0x18a));const _0x163b21=await skillHubJsonRequest(_0x15180c(0x18f)+encodeURIComponent(_0x4003bb)+'/publish',{'method':_0x15180c(0x1a2),'body':_0xf9cc38});return{'appCode':_0x163b21[_0x15180c(0x1ef)]??_0x4003bb,'skillCode':_0x163b21['slug']??_0x58fb8e[_0x15180c(0x1d2)]??'','skillName':_0x58fb8e[_0x15180c(0x1db)]??_0x163b21[_0x15180c(0x1c2)]??_0x58fb8e[_0x15180c(0x1d2)],'description':_0x58fb8e[_0x15180c(0x1a6)],'scope':skillHubVisibilityToScope(_0x163b21[_0x15180c(0x1fc)])??_0x15180c(0x1b1),'version':_0x163b21[_0x15180c(0x1ca)]??_0x58fb8e['version'],'tags':_0x58fb8e[_0x15180c(0x194)],'content':_0x58fb8e[_0x15180c(0x195)]};}function runtimeSkillPackageFile(_0xc3f1e0){const _0x501ba6=a65_0xa184;if(!_0xc3f1e0[_0x501ba6(0x198)])throw CliErrors[_0x501ba6(0x201)](_0x501ba6(0x1a5));const _0x37cbf1=Buffer[_0x501ba6(0x1c0)](_0xc3f1e0[_0x501ba6(0x198)],_0x501ba6(0x1f8)),_0x2523fa=new Blob([_0x37cbf1],{'type':_0x501ba6(0x1da)}),_0x56506c=(_0xc3f1e0[_0x501ba6(0x1d2)]||'skill')+_0x501ba6(0x1d9);if(typeof File!==_0x501ba6(0x1a0))return new File([_0x2523fa],_0x56506c,{'type':'application/zip'});return _0x2523fa;}function normalizeSkillHubRuntimeListResponse(_0x2b51fe,_0x1eae45,_0x292017,_0x461b63){const _0x390603=a65_0xa184,_0xc980ad=Array[_0x390603(0x1b5)](_0x1eae45)?_0x1eae45:Array[_0x390603(0x1b5)](_0x1eae45?.[_0x390603(0x1e1)])?_0x1eae45[_0x390603(0x1e1)]:[],_0x2f4cf3=_0x461b63?.[_0x390603(0x1b8)](),_0x5928d7=_0xc980ad[_0x390603(0x1f2)](_0x5d0819=>!_0x2f4cf3||_0x5d0819['slug']===_0x2f4cf3)[_0x390603(0x1c1)](skillHubRuntimeItemToRuntimeSkill)[_0x390603(0x1f2)](_0x5edc16=>Boolean(_0x5edc16)),_0x1b08e3=_0x5928d7[_0x390603(0x1f2)](_0x27c7ec=>_0x27c7ec['scope']===_0x390603(0x1b1)),_0x39d368=_0x5928d7[_0x390603(0x1f2)](_0xac062c=>_0xac062c[_0x390603(0x1d8)]===_0x390603(0x1ce));return{'appCode':_0x2b51fe,'personal':_0x292017==='company'?[]:_0x1b08e3,'company':_0x292017===_0x390603(0x1b1)?[]:_0x39d368,'effective':buildEffectiveRuntimeSkills(_0x1b08e3,_0x39d368,_0x292017)};}function a65_0x1473(){const _0x39b48d=['file','personal','507840nZDRGO','54Dkjlhx','name','isArray','apiError','appCode','trim','SQL\x20query\x20not\x20found:\x20','1266550ZLYIPY','1312312QhzrBG','/client/knowledge-base/personal/list?appCode=','/client/artifact/','message','3651508ftwxQV','from','map','slug','searchParams','/client/artifact/list?','newConfigFileName','940vKdlEF','signal','AbortError','/client/runtime-bff/personal/list?appCode=','version','application/json','/api/runtime/v1/namespaces/','7210apyEnW','company','BFF\x20script\x20not\x20found:\x20id=','18579XQWmph','favorite','skillCode','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','success','json','Toolbox\x20error\x20code:\x20','artifactType','scope','.zip','application/zip','skillName','/update','effective','source','replace','Personal\x20BFF\x20not\x20found:\x20id=','items','catch','GET','/client/user/loginUserInfo','text','object','SkillHub\x20API\x20error:\x20','stringify','/client/artifact/create','publishedVersion','displayName','Toolbox\x20API\x20error:\x20','application/octet-stream','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','namespace','api-doc-generator','arrayBuffer','filter','topK','Download\x20failed:\x20','code','1222PICCwf','all','base64','authRequired','set','36245hpMVzD','visibility','toString','Knowledge-base\x20entry\x20not\x20found:\x20id=','/versions/','status','validation','/skills','number','errorMsg','toLowerCase','605841ctzcxW','Artifact\x20not\x20found:\x20id=','Request\x20timeout:\x20','invokeSource','query','PRIVATE','string','?appCode=','msg','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/api/cli/v1/skills/','boolean','6VnjIyq','appName','/client/runtime-bff/personal/','tags','content','abort','/client/knowledge-base/personal/create','packageBase64','Toolbox\x20API\x20error','/client/sql/query','errorCode','data','ownerPreviewVersion','summary','API\x20error:\x20','undefined','/client/runtime-bff/personal/create','POST','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','/client/bff/query/','Missing\x20Skill\x20package\x20payload.','description','16qpSKWW','entries','Check\x20your\x20credentials\x20and\x20try\x20again.','Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Configure\x20accessKey\x20in\x20','values','tableData','markdown','/client/app/my-apps'];a65_0x1473=function(){return _0x39b48d;};return a65_0x1473();}function a65_0xa184(_0x3970cf,_0x1a5fb0){_0x3970cf=_0x3970cf-0x182;const _0x1473e8=a65_0x1473();let _0xa18434=_0x1473e8[_0x3970cf];return _0xa18434;}function skillHubRuntimeItemToRuntimeSkill(_0x6a146){const _0x3c12a5=a65_0xa184,_0x1a2261=_0x6a146['slug']?.[_0x3c12a5(0x1b8)](),_0x1977d1=skillHubVisibilityToScope(_0x6a146[_0x3c12a5(0x1fc)]);if(!_0x1a2261||!_0x1977d1)return undefined;return{'id':_0x6a146['id'],'appCode':_0x6a146['namespace'],'skillCode':_0x1a2261,'skillName':_0x6a146[_0x3c12a5(0x1eb)]??_0x1a2261,'description':_0x6a146[_0x3c12a5(0x19e)],'scope':_0x1977d1,'version':skillHubRuntimeItemVersion(_0x6a146),'status':_0x6a146[_0x3c12a5(0x200)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x7afd6a){const _0x58f33b=a65_0xa184,_0x4b5c19=_0x7afd6a['slug']?.[_0x58f33b(0x1b8)]();if(!_0x4b5c19)return undefined;return{'id':_0x7afd6a['id'],'appCode':_0x7afd6a[_0x58f33b(0x1ef)],'skillCode':_0x4b5c19,'skillName':_0x7afd6a[_0x58f33b(0x1eb)]??_0x4b5c19,'description':_0x7afd6a['summary'],'scope':skillHubVisibilityToScope(_0x7afd6a[_0x58f33b(0x1fc)])??_0x7afd6a[_0x58f33b(0x1fc)]?.[_0x58f33b(0x184)](),'version':skillHubRuntimeItemVersion(_0x7afd6a),'status':_0x7afd6a[_0x58f33b(0x200)]};}function skillHubVisibilityToScope(_0x314c81){const _0x1e7b60=a65_0xa184;if(_0x314c81===_0x1e7b60(0x18a))return _0x1e7b60(0x1b1);if(_0x314c81==='NAMESPACE_ONLY')return _0x1e7b60(0x1ce);return undefined;}function skillHubRuntimeItemVersion(_0x15beaf){const _0x24493f=a65_0xa184;return _0x15beaf[_0x24493f(0x1ea)]?.['version']??_0x15beaf['headlineVersion']?.[_0x24493f(0x1ca)]??_0x15beaf[_0x24493f(0x19d)]?.[_0x24493f(0x1ca)];}function buildEffectiveRuntimeSkills(_0x154887,_0x28a025,_0x1ae9d5){const _0x20f059=a65_0xa184;if(_0x1ae9d5==='personal')return _0x154887;if(_0x1ae9d5==='company')return _0x28a025;const _0x49c9b2=new Map();for(const _0x553265 of _0x28a025){_0x49c9b2[_0x20f059(0x1fa)](_0x553265[_0x20f059(0x1d2)],_0x553265);}for(const _0xcbfad1 of _0x154887){_0x49c9b2[_0x20f059(0x1fa)](_0xcbfad1[_0x20f059(0x1d2)],_0xcbfad1);}return Array[_0x20f059(0x1c0)](_0x49c9b2[_0x20f059(0x1ac)]());}function normalizeRuntimeSkillListResponse(_0x3acec1,_0x5eba1f){const _0x225d65=a65_0xa184;if(Array[_0x225d65(0x1b5)](_0x5eba1f)){const _0x1adf70=_0x5eba1f[_0x225d65(0x1f2)](_0x3c8ff9=>_0x3c8ff9['scope']===_0x225d65(0x1b1)),_0x3d2be0=_0x5eba1f['filter'](_0x2ca3e9=>_0x2ca3e9[_0x225d65(0x1d8)]===_0x225d65(0x1ce));return{'appCode':_0x3acec1,'personal':_0x1adf70,'company':_0x3d2be0,'effective':[..._0x3d2be0,..._0x1adf70]};}return{'appCode':_0x5eba1f?.[_0x225d65(0x1b7)]??_0x3acec1,'personal':Array['isArray'](_0x5eba1f?.[_0x225d65(0x1b1)])?_0x5eba1f['personal']:[],'company':Array[_0x225d65(0x1b5)](_0x5eba1f?.[_0x225d65(0x1ce)])?_0x5eba1f['company']:[],'effective':Array[_0x225d65(0x1b5)](_0x5eba1f?.['effective'])?_0x5eba1f[_0x225d65(0x1dd)]:[]};}
|
|
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';
|