@lovrabet/lovrabet-cli 2.3.1 → 2.3.2-beta.2
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/README.md +10 -8
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.d.ts +1 -2
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.d.ts +0 -3
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +2 -0
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.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/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.d.ts +6 -14
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.d.ts +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.d.ts +0 -3
- 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/region.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.d.ts +5 -10
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +1 -5
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +3 -7
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/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 +2 -1
- package/skills/lovrabet/SKILL.md +4 -4
- package/skills/lovrabet/guides/role-and-permission-workflow.md +6 -4
- package/skills/lovrabet/references/lovrabet-config-commands.md +7 -11
- package/skills/lovrabet/references/lovrabet-config.md +2 -3
- package/skills/lovrabet/references/lovrabet-doctor.md +1 -1
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +1 -1
- package/skills/lovrabet/references/lovrabet-notification-config-list.md +2 -8
- package/skills/lovrabet.manifest.json +3 -3
- package/lib/utils/platform.d.ts +0 -17
- package/lib/utils/platform.js +0 -1
package/lib/constant/domain.d.ts
CHANGED
|
@@ -30,7 +30,6 @@ export declare function initDomains(domains?: {
|
|
|
30
30
|
userDomain?: string;
|
|
31
31
|
runtimeDomain?: string;
|
|
32
32
|
skillDomain?: string;
|
|
33
|
-
kbDomain?: string;
|
|
34
33
|
region?: LovrabetRegion;
|
|
35
34
|
}): void;
|
|
36
35
|
/**
|
|
@@ -60,5 +59,3 @@ export declare const getRuntimeDomain: () => string;
|
|
|
60
59
|
* Returns the SkillHub domain used by native Skill management APIs.
|
|
61
60
|
*/
|
|
62
61
|
export declare const getSkillDomain: () => string;
|
|
63
|
-
/** Returns the knowledge-base domain used by personal and company KB APIs. */
|
|
64
|
-
export declare const getKbDomain: () => string;
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x4ba867=a95_0x34dd;(function(_0x5e11d4,_0x39d4ca){const _0x419081=a95_0x34dd,_0x2e89a9=_0x5e11d4();while(!![]){try{const _0x274cc7=-parseInt(_0x419081(0x191))/0x1*(-parseInt(_0x419081(0x19a))/0x2)+parseInt(_0x419081(0x1a0))/0x3*(parseInt(_0x419081(0x19b))/0x4)+parseInt(_0x419081(0x199))/0x5*(parseInt(_0x419081(0x1a1))/0x6)+-parseInt(_0x419081(0x19d))/0x7+-parseInt(_0x419081(0x195))/0x8+parseInt(_0x419081(0x1a3))/0x9+-parseInt(_0x419081(0x192))/0xa*(parseInt(_0x419081(0x198))/0xb);if(_0x274cc7===_0x39d4ca)break;else _0x2e89a9['push'](_0x2e89a9['shift']());}catch(_0x5849e4){_0x2e89a9['push'](_0x2e89a9['shift']());}}}(a95_0x17da,0xd21c0));function a95_0x17da(){const _0x41b3ce=['4105696PVZDyP','skill','region','2629cSQbsy','90AIlMXX','4cgRcjL','28qODcQd','runtime','4369092UZjSvV','daily','runtimeDomain','491322gPxXaL','198438nViMNu','serviceDomains','14515038ChZFwl','production','729202CWQXDV','117780seohSJ','userDomain','skillDomain'];a95_0x17da=function(){return _0x41b3ce;};return a95_0x17da();}function a95_0x34dd(_0x10049c,_0xbce834){_0x10049c=_0x10049c-0x190;const _0x17dab0=a95_0x17da();let _0x34ddac=_0x17dab0[_0x10049c];return _0x34ddac;}import{getEnv,isProduction}from'../constant/env.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillDomain,activeRegion=DEFAULT_LOVRABET_REGION;export function initDomains(_0x245570){const _0x28f097=a95_0x34dd;customApiDomain=_0x245570?.['apiDomain'],customUserDomain=_0x245570?.[_0x28f097(0x193)],customRuntimeDomain=_0x245570?.[_0x28f097(0x19f)],customSkillDomain=_0x245570?.[_0x28f097(0x194)],activeRegion=_0x245570?.[_0x28f097(0x197)]??DEFAULT_LOVRABET_REGION;}const getActiveRegionDomains=()=>{const _0x1f7341=a95_0x34dd,_0x5c4c7e=OFFICIAL_ROUTING_PROFILES[activeRegion][_0x1f7341(0x1a2)];return isProduction(getEnv())?_0x5c4c7e[_0x1f7341(0x190)]:'daily'in _0x5c4c7e?_0x5c4c7e[_0x1f7341(0x19e)]:_0x5c4c7e[_0x1f7341(0x190)];};export const getUserDomain=()=>customUserDomain||getActiveRegionDomains()['user'];export const getApiDomain=()=>customApiDomain||getActiveRegionDomains()['api'];export const getRuntimeDomain=()=>customRuntimeDomain||getActiveRegionDomains()[a95_0x4ba867(0x19c)];export const getSkillDomain=()=>customSkillDomain||getActiveRegionDomains()[a95_0x4ba867(0x196)];
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x293a79=a96_0x2f4e;(function(_0x2dfc24,_0x3bee02){const _0x1663de=a96_0x2f4e,_0xc3e60c=_0x2dfc24();while(!![]){try{const _0x457551=parseInt(_0x1663de(0xb3))/0x1*(parseInt(_0x1663de(0xc0))/0x2)+-parseInt(_0x1663de(0xb7))/0x3+-parseInt(_0x1663de(0xb6))/0x4*(parseInt(_0x1663de(0xbc))/0x5)+parseInt(_0x1663de(0xba))/0x6+-parseInt(_0x1663de(0xb9))/0x7*(-parseInt(_0x1663de(0xbd))/0x8)+parseInt(_0x1663de(0xb4))/0x9+-parseInt(_0x1663de(0xb2))/0xa;if(_0x457551===_0x3bee02)break;else _0xc3e60c['push'](_0xc3e60c['shift']());}catch(_0xf78fa5){_0xc3e60c['push'](_0xc3e60c['shift']());}}}(a96_0x2354,0x47b17));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=['production',a96_0x293a79(0xc1),a96_0x293a79(0xbf)];function a96_0x2f4e(_0x18d9cc,_0x3563cb){_0x18d9cc=_0x18d9cc-0xb2;const _0x2354e8=a96_0x2354();let _0x2f4efc=_0x2354e8[_0x18d9cc];return _0x2f4efc;}function a96_0x2354(){const _0x3ee073=['daily','4Fmnkuj','development','7775620UXoulZ','145477HASxjy','2744145YlDyEK','dev','8084IAgYXi','26901juAVdo','production','106652EKJFur','740868WqlauX','ENV','125BIsKwV','216clIOQO','online'];a96_0x2354=function(){return _0x3ee073;};return a96_0x2354();}export function normalizeEnv(_0x4f9950){const _0x10393c=a96_0x293a79;return _0x4f9950===_0x10393c(0xbe)?'production':_0x4f9950;}export function isProduction(_0x4ec2f0){const _0x1c14ae=a96_0x293a79;return normalizeEnv(_0x4ec2f0)===_0x1c14ae(0xb8);}export function isDaily(_0x10051d){return normalizeEnv(_0x10051d)==='daily';}export function isDev(_0xabec1f){const _0x3eab67=a96_0x293a79,_0x3d2deb=normalizeEnv(_0xabec1f);return _0x3d2deb===_0x3eab67(0xc1)||_0x3d2deb===_0x3eab67(0xb5);}let env=normalizeEnv(productEnv(a96_0x293a79(0xbb))||a96_0x293a79(0xb8));export function getEnv(){return env;}export function initEnv(_0x15776f){env=normalizeEnv(_0x15776f);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a97_0x52a1(){const _0x405ac7=['45Btxbzb','pretty','json','906yRLLsS','7iaVerN','1973346nPZTKB','5082495bJRIub','2910kXdxwg','797488ZMjyRK','27yjJykx','569830GtZfIv','848680BeuLGU','184596UoKSOl'];a97_0x52a1=function(){return _0x405ac7;};return a97_0x52a1();}function a97_0x1216(_0x484907,_0x4bdeee){_0x484907=_0x484907-0x87;const _0x52a163=a97_0x52a1();let _0x121649=_0x52a163[_0x484907];return _0x121649;}const a97_0x5c7db7=a97_0x1216;(function(_0x4ddedf,_0x218d78){const _0x3765c6=a97_0x1216,_0x574477=_0x4ddedf();while(!![]){try{const _0x22bfef=parseInt(_0x3765c6(0x87))/0x1+parseInt(_0x3765c6(0x91))/0x2*(-parseInt(_0x3765c6(0x8d))/0x3)+-parseInt(_0x3765c6(0x89))/0x4*(parseInt(_0x3765c6(0x8a))/0x5)+parseInt(_0x3765c6(0x8f))/0x6*(parseInt(_0x3765c6(0x8e))/0x7)+parseInt(_0x3765c6(0x92))/0x8*(-parseInt(_0x3765c6(0x93))/0x9)+parseInt(_0x3765c6(0x88))/0xa+parseInt(_0x3765c6(0x90))/0xb;if(_0x22bfef===_0x218d78)break;else _0x574477['push'](_0x574477['shift']());}catch(_0x12022d){_0x574477['push'](_0x574477['shift']());}}}(a97_0x52a1,0x473f1));export const OUTPUT_FORMAT_VALUES=[a97_0x5c7db7(0x8c),a97_0x5c7db7(0x8b),'compress'];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a98_0x4e825a=a98_0x576c;(function(_0x11065f,_0x47109b){const _0x268b2d=a98_0x576c,_0x46eb7d=_0x11065f();while(!![]){try{const _0x2f602e=-parseInt(_0x268b2d(0x15b))/0x1+-parseInt(_0x268b2d(0x160))/0x2+-parseInt(_0x268b2d(0x167))/0x3*(parseInt(_0x268b2d(0x161))/0x4)+-parseInt(_0x268b2d(0x163))/0x5*(parseInt(_0x268b2d(0x16d))/0x6)+parseInt(_0x268b2d(0x156))/0x7*(parseInt(_0x268b2d(0x16b))/0x8)+-parseInt(_0x268b2d(0x165))/0x9*(parseInt(_0x268b2d(0x169))/0xa)+-parseInt(_0x268b2d(0x15f))/0xb*(-parseInt(_0x268b2d(0x16c))/0xc);if(_0x2f602e===_0x47109b)break;else _0x46eb7d['push'](_0x46eb7d['shift']());}catch(_0x2832eb){_0x46eb7d['push'](_0x46eb7d['shift']());}}}(a98_0xfdfe,0xbe2cb));export const PRODUCT_CONFIG={'cliBinName':a98_0x4e825a(0x166),'cliDisplayName':a98_0x4e825a(0x168),'npmPackageName':'@lovrabet/lovrabet-cli','skillSource':a98_0x4e825a(0x16e),'internalSkillSource':'git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git','globalSkillName':'lovrabet','npmRegistryBaseUrl':a98_0x4e825a(0x164),'cliCdnBaseUrl':a98_0x4e825a(0x155),'envPrefix':a98_0x4e825a(0x15d),'legacyEnvPrefixes':[a98_0x4e825a(0x15c)],'configFileNames':[a98_0x4e825a(0x15e)],'newConfigFileName':'.lovrabet.json','homeDirName':'.lovrabet','logFileName':a98_0x4e825a(0x15a),'invokeSource':'cli:lovrabet-runtime','userCenterDisplayName':'Lovrabet\x20User\x20Center','skipNpxSkillsEnvSuffix':a98_0x4e825a(0x162),'accessKeyCreatePath':a98_0x4e825a(0x159)};function a98_0x576c(_0x468895,_0xedae06){_0x468895=_0x468895-0x155;const _0xfdfe38=a98_0xfdfe();let _0x576ccc=_0xfdfe38[_0x468895];return _0x576ccc;}export function productEnvName(_0x212ea6){const _0x34d6f1=a98_0x4e825a;return PRODUCT_CONFIG[_0x34d6f1(0x157)]+'_'+_0x212ea6;}export function productEnvNames(_0x11651f){const _0x99ca4=a98_0x4e825a;return[productEnvName(_0x11651f),...PRODUCT_CONFIG[_0x99ca4(0x158)][_0x99ca4(0x16a)](_0x5355d5=>_0x5355d5+'_'+_0x11651f)];}export function productEnv(_0x463aec){for(const _0x1495eb of productEnvNames(_0x463aec)){const _0x18a8e7=process.env[_0x1495eb];if(_0x18a8e7!==undefined)return _0x18a8e7;}return undefined;}function a98_0xfdfe(){const _0x50fe4b=['/user/ak','.lovrabet-runtime.log','192886ijXawA','RABETBASE','LOVRABET','.lovrabet.json','1969kGfLuI','2389432fYXGRO','8PVXKNm','SKIP_NPX_SKILLS','373495ZVWhAX','https://registry.npmjs.org','4167oJZeeq','lovrabet','1467423uqFqMV','Lovrabet\x20Runtime\x20CLI','1010gMsMyn','map','831064BLRfAf','223116zYhhND','36iSTiwz','lovrabet/lovrabet-cli','https://g.lovrabet.com','21ITLaXE','envPrefix','legacyEnvPrefixes'];a98_0xfdfe=function(){return _0x50fe4b;};return a98_0xfdfe();}
|
package/lib/constant/region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x50278d,_0x4f74a5){const _0x2cf968=a99_0x53a4,_0x345b31=_0x50278d();while(!![]){try{const _0xa7310f=parseInt(_0x2cf968(0x81))/0x1+parseInt(_0x2cf968(0x7c))/0x2+parseInt(_0x2cf968(0x82))/0x3+parseInt(_0x2cf968(0x7b))/0x4+parseInt(_0x2cf968(0x89))/0x5*(parseInt(_0x2cf968(0x84))/0x6)+-parseInt(_0x2cf968(0x7e))/0x7*(-parseInt(_0x2cf968(0x79))/0x8)+-parseInt(_0x2cf968(0x83))/0x9*(parseInt(_0x2cf968(0x86))/0xa);if(_0xa7310f===_0x4f74a5)break;else _0x345b31['push'](_0x345b31['shift']());}catch(_0x60d847){_0x345b31['push'](_0x345b31['shift']());}}}(a99_0x5127,0x3bc92));function a99_0x53a4(_0xbb5499,_0x3b9e0a){_0xbb5499=_0xbb5499-0x78;const _0x5127f5=a99_0x5127();let _0x53a40a=_0x5127f5[_0xbb5499];return _0x53a40a;}import{DEFAULT_REGION,ENABLED_REGION_VALUES,REGION_ALIASES,REGION_VALUES}from'../generated/official-routing.js';import{CliErrors}from'../errors.js';function a99_0x5127(){const _0x152cc3=['9762650efZqhh','includes','Available\x20regions:\x20','25mUnKUy','string','join','16zoIHlM','\x22\x20is\x20not\x20currently\x20available.','730956RyPWkM','829888yeoLBF','validation','888069eUlkrX','Run\x20`lovrabet\x20config\x20init`\x20to\x20restore\x20the\x20global\x20country/region\x20configuration.','Invalid\x20region\x20value:\x20expected\x20a\x20string,\x20received\x20','36157CMDAnc','308604InVNFa','9GtFcrb','276846bSHNjc','Region\x20\x22'];a99_0x5127=function(){return _0x152cc3;};return a99_0x5127();}export const LOVRABET_REGION_VALUES=REGION_VALUES;export const ENABLED_LOVRABET_REGION_VALUES=ENABLED_REGION_VALUES;export const DEFAULT_LOVRABET_REGION=DEFAULT_REGION;export function isLovrabetRegion(_0x185c42){const _0x45c0e4=a99_0x53a4;return typeof _0x185c42===_0x45c0e4(0x8a)&&LOVRABET_REGION_VALUES[_0x45c0e4(0x87)](_0x185c42);}export function isEnabledLovrabetRegion(_0xa7329c){const _0x1a08bf=a99_0x53a4;return typeof _0xa7329c==='string'&&ENABLED_LOVRABET_REGION_VALUES[_0x1a08bf(0x87)](_0xa7329c);}export function normalizeLovrabetRegion(_0x3a07fc){const _0x225d23=a99_0x53a4;if(_0x3a07fc===undefined||_0x3a07fc===null||_0x3a07fc==='')return DEFAULT_LOVRABET_REGION;if(typeof _0x3a07fc!==_0x225d23(0x8a))throw CliErrors[_0x225d23(0x7d)](_0x225d23(0x80)+typeof _0x3a07fc+'.',_0x225d23(0x7f));const _0x11d991=REGION_ALIASES[_0x3a07fc]??_0x3a07fc;if(isEnabledLovrabetRegion(_0x11d991))return _0x11d991;throw CliErrors[_0x225d23(0x7d)](_0x225d23(0x85)+_0x3a07fc+_0x225d23(0x7a),_0x225d23(0x88)+ENABLED_LOVRABET_REGION_VALUES[_0x225d23(0x78)](',\x20')+'.\x20Run\x20`lovrabet\x20config\x20init`\x20to\x20repair\x20the\x20global\x20configuration.');}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a100_0x49bd18=a100_0x8456;function a100_0x8456(_0x34be54,_0x27401e){_0x34be54=_0x34be54-0x1c1;const _0x5cce2e=a100_0x5cce();let _0x84564b=_0x5cce2e[_0x34be54];return _0x84564b;}function a100_0x5cce(){const _0x146be0=['988302mnMrpD','192390hqoDjJ','high-risk-write','1238616Ogjype','2751925JnNSxz','18mcRbTZ','write','28ijNOOm','read','506391EziXBK','132YriIxp','144uzAzJL','324hAwZVa','63555OangZO','22290qzYKli'];a100_0x5cce=function(){return _0x146be0;};return a100_0x5cce();}(function(_0x1b5943,_0x274ff4){const _0xa8f9eb=a100_0x8456,_0x176597=_0x1b5943();while(!![]){try{const _0x2b3f69=-parseInt(_0xa8f9eb(0x1c7))/0x1+parseInt(_0xa8f9eb(0x1c3))/0x2*(-parseInt(_0xa8f9eb(0x1cc))/0x3)+parseInt(_0xa8f9eb(0x1c8))/0x4*(-parseInt(_0xa8f9eb(0x1cb))/0x5)+parseInt(_0xa8f9eb(0x1cd))/0x6*(-parseInt(_0xa8f9eb(0x1c5))/0x7)+-parseInt(_0xa8f9eb(0x1c1))/0x8+parseInt(_0xa8f9eb(0x1ca))/0x9*(-parseInt(_0xa8f9eb(0x1ce))/0xa)+-parseInt(_0xa8f9eb(0x1c2))/0xb*(-parseInt(_0xa8f9eb(0x1c9))/0xc);if(_0x2b3f69===_0x274ff4)break;else _0x176597['push'](_0x176597['shift']());}catch(_0x2233ac){_0x176597['push'](_0x176597['shift']());}}}(a100_0x5cce,0x7ad25));export const RISK_LEVEL_VALUES=[a100_0x49bd18(0x1c6),a100_0x49bd18(0x1c4),a100_0x49bd18(0x1cf)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1d255e,_0x544378){const _0x743480=a101_0x44e3,_0x52a2dc=_0x1d255e();while(!![]){try{const _0x207d72=parseInt(_0x743480(0x152))/0x1+-parseInt(_0x743480(0x151))/0x2+parseInt(_0x743480(0x156))/0x3+parseInt(_0x743480(0x153))/0x4+parseInt(_0x743480(0x154))/0x5*(-parseInt(_0x743480(0x150))/0x6)+parseInt(_0x743480(0x14f))/0x7+-parseInt(_0x743480(0x155))/0x8;if(_0x207d72===_0x544378)break;else _0x52a2dc['push'](_0x52a2dc['shift']());}catch(_0x145900){_0x52a2dc['push'](_0x52a2dc['shift']());}}}(a101_0x132f,0x28e46));import{PRODUCT_CONFIG}from'../constant/product.js';import{OFFICIAL_ROUTING_PROFILES}from'../generated/official-routing.js';import{DEFAULT_LOVRABET_REGION}from'../constant/region.js';function a101_0x44e3(_0x10d0f5,_0x529630){_0x10d0f5=_0x10d0f5-0x14f;const _0x132f19=a101_0x132f();let _0x44e388=_0x132f19[_0x10d0f5];return _0x44e388;}export function getUserAccessKeyCreateUrl(_0x52f2e3=DEFAULT_LOVRABET_REGION){const _0x41243f=a101_0x44e3,_0x56395b=OFFICIAL_ROUTING_PROFILES[_0x52f2e3][_0x41243f(0x158)]['production'][_0x41243f(0x157)];return''+_0x56395b+PRODUCT_CONFIG['accessKeyCreatePath'];}export const USER_ACCESS_KEY_CREATE_URL=getUserAccessKeyCreateUrl();function a101_0x132f(){const _0x23d3f7=['serviceDomains','1468782aJhYFG','6BFTiTV','148248wRcFrn','247707hOvJFg','980728xGFKsn','1665105CSxAiu','1427904abscpM','151236VWSCMw','user'];a101_0x132f=function(){return _0x23d3f7;};return a101_0x132f();}
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a102_0x2a49a2=a102_0x325f;(function(_0x5228fd,_0x52b8be){const _0x11d096=a102_0x325f,_0x4648ae=_0x5228fd();while(!![]){try{const _0x2ab003=parseInt(_0x11d096(0x1ab))/0x1+parseInt(_0x11d096(0x19f))/0x2+parseInt(_0x11d096(0x1c6))/0x3*(-parseInt(_0x11d096(0x1b9))/0x4)+parseInt(_0x11d096(0x193))/0x5*(-parseInt(_0x11d096(0x1b1))/0x6)+-parseInt(_0x11d096(0x1bb))/0x7+-parseInt(_0x11d096(0x19a))/0x8*(-parseInt(_0x11d096(0x194))/0x9)+parseInt(_0x11d096(0x1cb))/0xa;if(_0x2ab003===_0x52b8be)break;else _0x4648ae['push'](_0x4648ae['shift']());}catch(_0x3bb95c){_0x4648ae['push'](_0x4648ae['shift']());}}}(a102_0x4fb3,0x21804));function a102_0x325f(_0x20461a,_0x341209){_0x20461a=_0x20461a-0x182;const _0x4fb362=a102_0x4fb3();let _0x325f59=_0x4fb362[_0x20461a];return _0x325f59;}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';function a102_0x4fb3(){const _0x47baf7=['2872SrNuAk','message','error','trim','setRawCommand','539152gBkNcG','VERBOSE','APP','skillDomain','runtimeDomain','utf8','join','string','projectConfig','ACCESS_KEY','app','development','14410EChmmD','nativeToolAvailable','.tmp','explicit','defaultApp','isTTY','137964dezmFn','newConfigFileName','riskLevel','high-risk-write','isRaw','routing','parse','stringify','220cnZFaH','values','1125719CETWYg','authRequired','online','local-alias','cache','userDomain','inherit','project','EACCES','platformDomain','empty','4737eSHbeD','write','locale','top-level','missing','1533640BIIBuq','stdout','production','accessKey','object','code','daily','apiDomain','appcode','argv','true','global','raw','APPCODE','format','PAGE_SIZE','find','kbDomain','setRawMode','env','15seqfVw','414jzGKHF','stdin','FORMAT','apps','cwd','setLogPath'];a102_0x4fb3=function(){return _0x47baf7;};return a102_0x4fb3();}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';import{normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a102_0x2a49a2(0x1b2)];function resolveConfigPath(_0x275520){for(const _0x3a20cd of CONFIG_NAMES){const _0x42392c=resolve(_0x275520,_0x3a20cd);if(existsSync(_0x42392c))return _0x42392c;}return undefined;}export function resolveWriteConfigPath(_0x4e613e){const _0x5d30dc=a102_0x2a49a2,_0x3b1e82=_0x4e613e===_0x5d30dc(0x1c2)?process['cwd']():homedir(),_0x5aee11=resolveConfigPath(_0x3b1e82);return _0x5aee11??resolve(_0x3b1e82,NEW_CONFIG_NAME);}export function readConfigFile(_0x40e2c2){const _0x3c0347=a102_0x2a49a2;try{if(existsSync(_0x40e2c2)){const _0x41b6b2=readFileSync(_0x40e2c2,{'encoding':_0x3c0347(0x1a4)});if(_0x41b6b2){const _0x6cf7ca=JSON[_0x3c0347(0x1b7)](_0x41b6b2);return migrateOnlineEnv(_0x40e2c2,_0x6cf7ca),_0x6cf7ca;}}}catch{}return{};}function migrateOnlineEnv(_0x10df39,_0x1b5924){const _0x2db472=a102_0x2a49a2;let _0x564ce9=![];_0x1b5924[_0x2db472(0x192)]==='online'&&(_0x1b5924[_0x2db472(0x192)]=_0x2db472(0x1cd),_0x564ce9=!![]);if(_0x1b5924['apps']&&typeof _0x1b5924['apps']===_0x2db472(0x183))for(const _0xa9aea3 of Object[_0x2db472(0x1ba)](_0x1b5924[_0x2db472(0x197)])){_0xa9aea3&&_0xa9aea3['env']===_0x2db472(0x1bd)&&(_0xa9aea3[_0x2db472(0x192)]=_0x2db472(0x1cd),_0x564ce9=!![]);}if(_0x564ce9)try{writeConfigFile(_0x10df39,_0x1b5924);}catch{}}export function writeConfigFile(_0x344f98,_0x2330ff){const _0x1093d2=a102_0x2a49a2,_0x4ad33e=dirname(_0x344f98);!existsSync(_0x4ad33e)&&mkdirSync(_0x4ad33e,{'recursive':!![]});const _0x578cc3=_0x344f98+_0x1093d2(0x1ad);try{writeFileSync(_0x578cc3,JSON[_0x1093d2(0x1b8)](_0x2330ff,null,0x2)+'\x0a',{'encoding':_0x1093d2(0x1a4),'mode':0x180});try{renameSync(_0x578cc3,_0x344f98);}catch(_0x22b4aa){if(_0x22b4aa['code']==='EPERM'||_0x22b4aa[_0x1093d2(0x184)]==='EXDEV'||_0x22b4aa[_0x1093d2(0x184)]===_0x1093d2(0x1c3)){writeFileSync(_0x344f98,JSON[_0x1093d2(0x1b8)](_0x2330ff,null,0x2)+'\x0a',{'encoding':_0x1093d2(0x1a4)});try{unlinkSync(_0x578cc3);}catch{}}else throw _0x22b4aa;}}catch(_0x1c9068){try{unlinkSync(_0x578cc3);}catch{}throw _0x1c9068;}}export function isNonInteractiveMode(_0x23a5b4){const _0x2dfa6f=a102_0x2a49a2;return!!(_0x23a5b4['nonInteractive']||_0x23a5b4['ci']||productEnvNames('CI')['some'](_0xdd6c93=>process.env[_0xdd6c93]===_0x2dfa6f(0x189))||process.env.CI===_0x2dfa6f(0x189)||!process[_0x2dfa6f(0x1cc)][_0x2dfa6f(0x1b0)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x189a5b=a102_0x2a49a2;if(!process[_0x189a5b(0x195)]['isTTY'])return![];try{const _0x4d465f=process[_0x189a5b(0x195)][_0x189a5b(0x1b5)];return process[_0x189a5b(0x195)][_0x189a5b(0x191)](!![]),process[_0x189a5b(0x195)][_0x189a5b(0x191)](_0x4d465f??![]),!![];}catch{return![];}}export async function createContext(_0x87c17d){const _0x4626a7=a102_0x2a49a2,_0x585b75=readRawConfig(),_0x526eed=buildConfig(_0x585b75,_0x87c17d);await initGlobalEnvironment(_0x526eed);const {getUserDomain:_0xfcdf60,getApiDomain:_0x257d88}=await import('./constant/domain.js'),_0x320f31={'apiDomain':_0x257d88(),'userDomain':_0xfcdf60()},_0x3e25aa=await buildAuth(_0x526eed);logger[_0x4626a7(0x199)](process[_0x4626a7(0x198)]());const _0x2eb152=(CLI_BIN_NAME+'\x20'+process[_0x4626a7(0x188)]['slice'](0x2)[_0x4626a7(0x1a5)]('\x20'))[_0x4626a7(0x19d)]();logger[_0x4626a7(0x19e)](_0x2eb152);const _0x53f485=isNonInteractiveMode(_0x87c17d);return{'config':_0x526eed,'auth':_0x3e25aa,'logger':logger,'env':_0x320f31,'nonInteractive':_0x53f485};}export function buildConfigFromFlags(_0x18b9c5){return buildConfig(readRawConfig(),_0x18b9c5);}export function getLocalAppAliases(_0x5d9647){const _0x552887=a102_0x2a49a2;return _0x5d9647[_0x552887(0x197)]&&typeof _0x5d9647[_0x552887(0x197)]===_0x552887(0x183)?_0x5d9647[_0x552887(0x197)]:{};}export function resolveLocalAppAliasCode(_0x2a1502,_0x142fa6){const _0x5929b2=a102_0x2a49a2;if(!_0x142fa6)return undefined;const _0x5b27ce=getLocalAppAliases(_0x2a1502)[_0x142fa6],_0x2d2e21=_0x5b27ce?.[_0x5929b2(0x187)];return typeof _0x2d2e21===_0x5929b2(0x1a6)&&_0x2d2e21['trim']()?_0x2d2e21[_0x5929b2(0x19d)]():undefined;}export function readAppCodeFromConfig(){const _0x2c1abb=a102_0x2a49a2,_0x300310=readRawConfig(),_0x33b865=_0x300310[_0x2c1abb(0x187)]??_0x300310[_0x2c1abb(0x1a9)];if(typeof _0x33b865==='string'&&_0x33b865[_0x2c1abb(0x19d)]())return _0x33b865[_0x2c1abb(0x19d)]();const _0x5e5992=resolveLocalAppAliasCode(_0x300310,typeof _0x300310['defaultApp']===_0x2c1abb(0x1a6)?_0x300310[_0x2c1abb(0x1af)]:undefined);if(_0x5e5992)return _0x5e5992;const _0x3eefc6=normalizeEnv(String(_0x300310['env']||_0x2c1abb(0x1cd))),_0x321cdb=isDaily(_0x3eefc6)?'daily':isDev(_0x3eefc6)?_0x2c1abb(0x1aa):_0x2c1abb(0x1cd),_0x44d8a3=resolveCachedAppCode(typeof _0x300310[_0x2c1abb(0x1af)]===_0x2c1abb(0x1a6)?_0x300310[_0x2c1abb(0x1af)]:undefined,_0x321cdb,typeof _0x300310[_0x2c1abb(0x182)]==='string'?_0x300310['accessKey']:undefined);if(_0x44d8a3)return _0x44d8a3;const _0x24ec88=Object[_0x2c1abb(0x1ba)](getLocalAppAliases(_0x300310))[_0x2c1abb(0x18f)](_0x2f2feb=>_0x2f2feb?.[_0x2c1abb(0x187)]);return typeof _0x24ec88?.[_0x2c1abb(0x187)]===_0x2c1abb(0x1a6)&&_0x24ec88[_0x2c1abb(0x187)]['trim']()?_0x24ec88['appcode'][_0x2c1abb(0x19d)]():undefined;}export function readScopedConfig(_0x10a1f7){const _0x3872c5=a102_0x2a49a2,_0xa764a7=_0x10a1f7[_0x3872c5(0x18a)]?_0x3872c5(0x18a):_0x3872c5(0x1c2);return readConfigFile(resolveWriteConfigPath(_0xa764a7));}export function writeScopedConfig(_0x2d0fe6,_0x33cf1e){const _0x579b38=a102_0x2a49a2,_0x3ba18a=_0x33cf1e['global']?_0x579b38(0x18a):_0x579b38(0x1c2);writeConfigFile(resolveWriteConfigPath(_0x3ba18a),_0x2d0fe6);}export async function initGlobalEnvironment(_0x4a55ba){const _0x3ba30d=a102_0x2a49a2,{initEnv:_0x116bf3}=await import('./constant/env.js');_0x116bf3(_0x4a55ba[_0x3ba30d(0x192)]);const {initDomains:_0x13b00e}=await import('./constant/domain.js'),_0x113068=resolveEnterpriseRoutingConfig(_0x4a55ba[_0x3ba30d(0x18b)][_0x3ba30d(0x1b6)]);_0x13b00e({'apiDomain':_0x113068?_0x113068[_0x3ba30d(0x186)]:_0x4a55ba[_0x3ba30d(0x18b)]['apiDomain']||_0x4a55ba[_0x3ba30d(0x18b)]['host']||undefined,'userDomain':_0x113068?_0x113068[_0x3ba30d(0x1c0)]:_0x4a55ba['raw'][_0x3ba30d(0x1c0)]||undefined,'runtimeDomain':_0x113068?_0x113068[_0x3ba30d(0x1a3)]:_0x4a55ba[_0x3ba30d(0x18b)][_0x3ba30d(0x1a3)]||undefined,'skillDomain':_0x113068?_0x113068['skillDomain']:_0x4a55ba['raw'][_0x3ba30d(0x1a2)]||_0x4a55ba[_0x3ba30d(0x18b)]['skillHubDomain']||_0x4a55ba['raw']['agentDomain']||_0x4a55ba[_0x3ba30d(0x18b)]['platformDomain']||undefined,'kbDomain':_0x113068?_0x113068[_0x3ba30d(0x190)]:_0x4a55ba[_0x3ba30d(0x18b)]['kbDomain']||_0x4a55ba[_0x3ba30d(0x18b)]['agentDomain']||_0x4a55ba[_0x3ba30d(0x18b)][_0x3ba30d(0x1c4)]||_0x4a55ba[_0x3ba30d(0x18b)][_0x3ba30d(0x1a3)]||undefined,'region':normalizeLovrabetRegion(_0x4a55ba[_0x3ba30d(0x18b)]['region'])});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x45b42e){const _0x560128=a102_0x2a49a2;if(!existsSync(_0x45b42e))return{'status':_0x560128(0x1ca)};try{const _0x154da2=readFileSync(_0x45b42e,{'encoding':_0x560128(0x1a4)});if(!_0x154da2?.[_0x560128(0x19d)]())return{'status':_0x560128(0x1c5)};const _0x184a12=JSON['parse'](_0x154da2);return{'status':'ok','data':_0x184a12};}catch(_0x149477){return{'status':_0x560128(0x19c),'message':_0x149477 instanceof Error?_0x149477[_0x560128(0x19b)]:String(_0x149477)};}}export function loadRawConfigLayers(_0x19cc6e){const _0x26db68=a102_0x2a49a2;let _0x369829={},_0x14c739={},_0x2aef1c,_0x21a36d;try{_0x2aef1c=resolveConfigPath(homedir());if(_0x2aef1c){const _0x28f357=readFileSync(_0x2aef1c,{'encoding':_0x26db68(0x1a4)});if(_0x28f357)_0x369829=JSON[_0x26db68(0x1b7)](_0x28f357);}}catch{}try{const _0x2e5b1b=_0x19cc6e||process[_0x26db68(0x198)]();_0x21a36d=resolveConfigPath(_0x2e5b1b);if(_0x21a36d){const _0x26a9ef=readFileSync(_0x21a36d,{'encoding':_0x26db68(0x1a4)});if(_0x26a9ef)_0x14c739=JSON[_0x26db68(0x1b7)](_0x26a9ef);}}catch{}return{'globalPath':_0x2aef1c,'projectPath':_0x21a36d,'globalConfig':_0x369829,'projectConfig':_0x14c739};}function mergeRawConfigLayers(_0x50c782){const _0x8fb98=a102_0x2a49a2,{globalConfig:_0x381b13,projectConfig:_0x1397dd}=_0x50c782,_0x594f7c={..._0x381b13,..._0x1397dd};delete _0x594f7c[_0x8fb98(0x1c1)];if(_0x8fb98(0x1af)in _0x1397dd)_0x594f7c['defaultApp']=_0x1397dd['defaultApp'];else _0x381b13[_0x8fb98(0x1af)]&&(_0x594f7c[_0x8fb98(0x1af)]=_0x381b13[_0x8fb98(0x1af)]);return _0x594f7c;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x64f2da){return mergeRawConfigLayers(loadRawConfigLayers(_0x64f2da));}export function readRawConfigWithLayers(_0x375ba9){const _0x5c64f2=loadRawConfigLayers(_0x375ba9);return{'config':mergeRawConfigLayers(_0x5c64f2),'layers':_0x5c64f2};}export function resolveDefaultAppSource(_0x346c54){const _0x3c5c4d=a102_0x2a49a2;if(_0x3c5c4d(0x1af)in _0x346c54[_0x3c5c4d(0x1a7)])return _0x3c5c4d(0x1c2);if(_0x346c54['globalConfig'][_0x3c5c4d(0x1af)])return _0x3c5c4d(0x18a);return null;}function buildConfig(_0x159a64,_0x5b28ff){const _0x3d6e9c=a102_0x2a49a2,_0x436dd5=_0x159a64[_0x3d6e9c(0x1af)]||undefined,_0x1f47d2=_0x5b28ff[_0x3d6e9c(0x1a9)]||env(_0x3d6e9c(0x1a1))||undefined,_0x35e593=_0x1f47d2||_0x436dd5||undefined,_0x412492=env(_0x3d6e9c(0x1a8))||_0x159a64[_0x3d6e9c(0x182)]||undefined,_0x458334=_0x5b28ff[_0x3d6e9c(0x192)]||env('ENV')||_0x159a64[_0x3d6e9c(0x192)]||DEFAULT_CONFIG_VALUES[_0x3d6e9c(0x192)],_0x3f7581=normalizeEnv(String(_0x458334)),_0x4661d3=isDaily(_0x3f7581)?_0x3d6e9c(0x185):isDev(_0x3f7581)?_0x3d6e9c(0x1aa):_0x3d6e9c(0x1cd),_0x4596ef=typeof _0x5b28ff[_0x3d6e9c(0x187)]===_0x3d6e9c(0x1a6)?_0x5b28ff[_0x3d6e9c(0x187)]:undefined,_0x5dcd66=env(_0x3d6e9c(0x18c)),_0x2ab5c3=_0x1f47d2?undefined:_0x159a64[_0x3d6e9c(0x187)]||_0x159a64[_0x3d6e9c(0x1a9)]||undefined,_0x320792=_0x1f47d2||(_0x2ab5c3?undefined:_0x436dd5),_0x2d00fd=resolveLocalAppAliasCode(_0x159a64,_0x320792),_0x1722c1=resolveCachedAppCode(_0x320792,_0x4661d3,_0x412492),_0x42eb4f=_0x4596ef||_0x5dcd66||_0x2ab5c3||_0x2d00fd||_0x1722c1||undefined,_0x189d4f=_0x4596ef?_0x3d6e9c(0x1ae):_0x5dcd66?_0x3d6e9c(0x192):_0x2ab5c3?_0x3d6e9c(0x1c9):_0x2d00fd?_0x3d6e9c(0x1be):_0x1722c1?_0x3d6e9c(0x1bf):undefined,_0x128145=_0x159a64[_0x3d6e9c(0x1c8)]||DEFAULT_CONFIG_VALUES[_0x3d6e9c(0x1c8)],_0x5d1af2=undefined,_0x45028c=_0x5b28ff[_0x3d6e9c(0x18d)]||env(_0x3d6e9c(0x196))||_0x159a64['format'],_0x39f934=normalizeLegacyOutputFormat(_0x45028c),_0x1278ed=env(_0x3d6e9c(0x18e))||_0x159a64['pageSize'],_0x2c7830=_0x1278ed?Number(_0x1278ed)||undefined:undefined,_0x243ba0=_0x159a64[_0x3d6e9c(0x1b3)],_0x2cfdaa=_0x243ba0==='read'||_0x243ba0===_0x3d6e9c(0x1c7)||_0x243ba0===_0x3d6e9c(0x1b4)?_0x243ba0:DEFAULT_CONFIG_VALUES[_0x3d6e9c(0x1b3)],_0x367f36=_0x159a64[_0x3d6e9c(0x1ac)]===!![],_0x49c677=env(_0x3d6e9c(0x1a0)),_0x5c5ed3=_0x49c677==='1'||_0x49c677===_0x3d6e9c(0x189);return{'appCode':typeof _0x42eb4f===_0x3d6e9c(0x1a6)&&_0x42eb4f[_0x3d6e9c(0x19d)]()?_0x42eb4f[_0x3d6e9c(0x19d)]():undefined,'appCodeSource':_0x189d4f,'env':_0x4661d3,'locale':_0x128145,'cookie':_0x5d1af2,'accessKey':_0x412492,'format':_0x39f934,'pageSize':_0x2c7830,'riskLevel':_0x2cfdaa,'nativeToolAvailable':_0x367f36,'verbose':_0x5c5ed3,'defaultApp':_0x436dd5,'currentApp':typeof _0x35e593===_0x3d6e9c(0x1a6)?_0x35e593:undefined,'raw':_0x159a64};}function env(_0x28caa4){return productEnv(_0x28caa4);}async function buildAuth(_0x28c1d8){const _0x721e3='',_0x3b1352=!!_0x28c1d8['accessKey'];return{'cookie':_0x721e3,'isLoggedIn':_0x3b1352,async 'getOrLogin'(){const _0x23253d=a102_0x325f;if(_0x3b1352)return _0x721e3;throw CliErrors[_0x23253d(0x1bc)]();}};}
|
|
1
|
+
const a102_0x530986=a102_0x57c3;(function(_0x1aa36f,_0x127b72){const _0x5ca987=a102_0x57c3,_0x488ab8=_0x1aa36f();while(!![]){try{const _0x15966d=-parseInt(_0x5ca987(0x1aa))/0x1*(parseInt(_0x5ca987(0x1d4))/0x2)+parseInt(_0x5ca987(0x1ce))/0x3+-parseInt(_0x5ca987(0x18c))/0x4*(-parseInt(_0x5ca987(0x1d0))/0x5)+-parseInt(_0x5ca987(0x197))/0x6+-parseInt(_0x5ca987(0x1ca))/0x7*(parseInt(_0x5ca987(0x1be))/0x8)+parseInt(_0x5ca987(0x1bd))/0x9+-parseInt(_0x5ca987(0x1c5))/0xa;if(_0x15966d===_0x127b72)break;else _0x488ab8['push'](_0x488ab8['shift']());}catch(_0x243c33){_0x488ab8['push'](_0x488ab8['shift']());}}}(a102_0x30ce,0xbfb87));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';import{normalizeLovrabetRegion}from'./constant/region.js';import{resolveEnterpriseRoutingConfig}from'./config/domain-config.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';function a102_0x30ce(){const _0x3c3efd=['write','stdin','setRawCommand','values','read','nativeToolAvailable','ENV','host','ACCESS_KEY','1TAULco','EPERM','error','daily','appcode','agentDomain','locale','defaultApp','stringify','riskLevel','app','nonInteractive','newConfigFileName','top-level','slice','global','missing','skillHubDomain','configFileNames','7267896gByjdM','373448zupUMk','join','APP','EACCES','true','local-alias','object','3051840LqATfF','apps','env','runtimeDomain','explicit','35RXAqmz','APPCODE','FORMAT','setRawMode','2802699BtKsGG','userDomain','15JkWqEE','development','accessKey','PAGE_SIZE','612460OFtBXU','pageSize','production','format','isTTY','high-risk-write','1824644UOeCqP','online','code','message','isRaw','routing','stdout','trim','apiDomain','string','globalConfig','8880924RcUaRy','project','raw','parse','.tmp','cwd','setLogPath','skillDomain','region','utf8'];a102_0x30ce=function(){return _0x3c3efd;};return a102_0x30ce();}const CONFIG_NAMES=PRODUCT_CONFIG[a102_0x530986(0x1bc)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a102_0x530986(0x1b6)];function resolveConfigPath(_0x5c36da){for(const _0x26184a of CONFIG_NAMES){const _0x212485=resolve(_0x5c36da,_0x26184a);if(existsSync(_0x212485))return _0x212485;}return undefined;}export function resolveWriteConfigPath(_0x259143){const _0x31780f=a102_0x530986,_0x1ab7cc=_0x259143===_0x31780f(0x198)?process[_0x31780f(0x19c)]():homedir(),_0x61cfe=resolveConfigPath(_0x1ab7cc);return _0x61cfe??resolve(_0x1ab7cc,NEW_CONFIG_NAME);}export function readConfigFile(_0x1f9bef){const _0x4a1918=a102_0x530986;try{if(existsSync(_0x1f9bef)){const _0x30021e=readFileSync(_0x1f9bef,{'encoding':_0x4a1918(0x1a0)});if(_0x30021e){const _0xd687ee=JSON[_0x4a1918(0x19a)](_0x30021e);return migrateOnlineEnv(_0x1f9bef,_0xd687ee),_0xd687ee;}}}catch{}return{};}function migrateOnlineEnv(_0x33c8a8,_0x372d0b){const _0x11df4b=a102_0x530986;let _0x11d8da=![];_0x372d0b[_0x11df4b(0x1c7)]===_0x11df4b(0x18d)&&(_0x372d0b[_0x11df4b(0x1c7)]='production',_0x11d8da=!![]);if(_0x372d0b['apps']&&typeof _0x372d0b['apps']===_0x11df4b(0x1c4))for(const _0x322ac5 of Object['values'](_0x372d0b[_0x11df4b(0x1c6)])){_0x322ac5&&_0x322ac5[_0x11df4b(0x1c7)]===_0x11df4b(0x18d)&&(_0x322ac5['env']=_0x11df4b(0x1d6),_0x11d8da=!![]);}if(_0x11d8da)try{writeConfigFile(_0x33c8a8,_0x372d0b);}catch{}}export function writeConfigFile(_0x285936,_0x22941d){const _0x26ca8f=a102_0x530986,_0xb9bcce=dirname(_0x285936);!existsSync(_0xb9bcce)&&mkdirSync(_0xb9bcce,{'recursive':!![]});const _0xfed283=_0x285936+_0x26ca8f(0x19b);try{writeFileSync(_0xfed283,JSON[_0x26ca8f(0x1b2)](_0x22941d,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0xfed283,_0x285936);}catch(_0xec5e9f){if(_0xec5e9f['code']===_0x26ca8f(0x1ab)||_0xec5e9f[_0x26ca8f(0x18e)]==='EXDEV'||_0xec5e9f[_0x26ca8f(0x18e)]===_0x26ca8f(0x1c1)){writeFileSync(_0x285936,JSON[_0x26ca8f(0x1b2)](_0x22941d,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0xfed283);}catch{}}else throw _0xec5e9f;}}catch(_0x469f14){try{unlinkSync(_0xfed283);}catch{}throw _0x469f14;}}export function isNonInteractiveMode(_0x70ea3b){const _0x21a3c6=a102_0x530986;return!!(_0x70ea3b[_0x21a3c6(0x1b5)]||_0x70ea3b['ci']||productEnvNames('CI')['some'](_0x50a339=>process.env[_0x50a339]===_0x21a3c6(0x1c2))||process.env.CI===_0x21a3c6(0x1c2)||!process[_0x21a3c6(0x192)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x3747f9=a102_0x530986;if(!process['stdin'][_0x3747f9(0x1d8)])return![];try{const _0x3cdc77=process[_0x3747f9(0x1a2)][_0x3747f9(0x190)];return process[_0x3747f9(0x1a2)][_0x3747f9(0x1cd)](!![]),process[_0x3747f9(0x1a2)]['setRawMode'](_0x3cdc77??![]),!![];}catch{return![];}}export async function createContext(_0x3ef5d4){const _0x1d85a1=a102_0x530986,_0x9792ad=readRawConfig(),_0x72de33=buildConfig(_0x9792ad,_0x3ef5d4);await initGlobalEnvironment(_0x72de33);const {getUserDomain:_0x91e144,getApiDomain:_0x2fa8c9}=await import('./constant/domain.js'),_0x2655e6={'apiDomain':_0x2fa8c9(),'userDomain':_0x91e144()},_0x2f750f=await buildAuth(_0x72de33);logger[_0x1d85a1(0x19d)](process['cwd']());const _0x2640ef=(CLI_BIN_NAME+'\x20'+process['argv'][_0x1d85a1(0x1b8)](0x2)[_0x1d85a1(0x1bf)]('\x20'))[_0x1d85a1(0x193)]();logger[_0x1d85a1(0x1a3)](_0x2640ef);const _0x4775ac=isNonInteractiveMode(_0x3ef5d4);return{'config':_0x72de33,'auth':_0x2f750f,'logger':logger,'env':_0x2655e6,'nonInteractive':_0x4775ac};}export function buildConfigFromFlags(_0x1c39e7){return buildConfig(readRawConfig(),_0x1c39e7);}export function getLocalAppAliases(_0x371af3){const _0x176381=a102_0x530986;return _0x371af3[_0x176381(0x1c6)]&&typeof _0x371af3[_0x176381(0x1c6)]===_0x176381(0x1c4)?_0x371af3[_0x176381(0x1c6)]:{};}export function resolveLocalAppAliasCode(_0x48c090,_0x3a56df){const _0x3216b3=a102_0x530986;if(!_0x3a56df)return undefined;const _0x15a7f8=getLocalAppAliases(_0x48c090)[_0x3a56df],_0x1be675=_0x15a7f8?.[_0x3216b3(0x1ae)];return typeof _0x1be675===_0x3216b3(0x195)&&_0x1be675[_0x3216b3(0x193)]()?_0x1be675[_0x3216b3(0x193)]():undefined;}export function readAppCodeFromConfig(){const _0x3e0afa=a102_0x530986,_0x6950a6=readRawConfig(),_0x519a9f=_0x6950a6[_0x3e0afa(0x1ae)]??_0x6950a6[_0x3e0afa(0x1b4)];if(typeof _0x519a9f===_0x3e0afa(0x195)&&_0x519a9f[_0x3e0afa(0x193)]())return _0x519a9f[_0x3e0afa(0x193)]();const _0x47dc34=resolveLocalAppAliasCode(_0x6950a6,typeof _0x6950a6[_0x3e0afa(0x1b1)]===_0x3e0afa(0x195)?_0x6950a6['defaultApp']:undefined);if(_0x47dc34)return _0x47dc34;const _0x555a58=normalizeEnv(String(_0x6950a6[_0x3e0afa(0x1c7)]||_0x3e0afa(0x1d6))),_0xa5feee=isDaily(_0x555a58)?'daily':isDev(_0x555a58)?'development':'production',_0x54feb4=resolveCachedAppCode(typeof _0x6950a6[_0x3e0afa(0x1b1)]===_0x3e0afa(0x195)?_0x6950a6[_0x3e0afa(0x1b1)]:undefined,_0xa5feee,typeof _0x6950a6[_0x3e0afa(0x1d2)]===_0x3e0afa(0x195)?_0x6950a6[_0x3e0afa(0x1d2)]:undefined);if(_0x54feb4)return _0x54feb4;const _0xa1b5a=Object[_0x3e0afa(0x1a4)](getLocalAppAliases(_0x6950a6))['find'](_0x40a81f=>_0x40a81f?.[_0x3e0afa(0x1ae)]);return typeof _0xa1b5a?.[_0x3e0afa(0x1ae)]===_0x3e0afa(0x195)&&_0xa1b5a[_0x3e0afa(0x1ae)][_0x3e0afa(0x193)]()?_0xa1b5a['appcode'][_0x3e0afa(0x193)]():undefined;}export function readScopedConfig(_0x2887da){const _0x1a6232=a102_0x530986,_0x23283b=_0x2887da[_0x1a6232(0x1b9)]?_0x1a6232(0x1b9):_0x1a6232(0x198);return readConfigFile(resolveWriteConfigPath(_0x23283b));}export function writeScopedConfig(_0x1fd453,_0x283b4f){const _0x44bfa1=a102_0x530986,_0x9d8afb=_0x283b4f[_0x44bfa1(0x1b9)]?'global':_0x44bfa1(0x198);writeConfigFile(resolveWriteConfigPath(_0x9d8afb),_0x1fd453);}function a102_0x57c3(_0x2bc422,_0x2bdbe4){_0x2bc422=_0x2bc422-0x18b;const _0x30ce73=a102_0x30ce();let _0x57c370=_0x30ce73[_0x2bc422];return _0x57c370;}export async function initGlobalEnvironment(_0x2c9182){const _0xc6aab4=a102_0x530986,{initEnv:_0x3b81dd}=await import('./constant/env.js');_0x3b81dd(_0x2c9182[_0xc6aab4(0x1c7)]);const {initDomains:_0x30bc07}=await import('./constant/domain.js'),_0x5eb2e1=resolveEnterpriseRoutingConfig(_0x2c9182[_0xc6aab4(0x199)][_0xc6aab4(0x191)]);_0x30bc07({'apiDomain':_0x5eb2e1?_0x5eb2e1['apiDomain']:_0x2c9182['raw'][_0xc6aab4(0x194)]||_0x2c9182[_0xc6aab4(0x199)][_0xc6aab4(0x1a8)]||undefined,'userDomain':_0x5eb2e1?_0x5eb2e1[_0xc6aab4(0x1cf)]:_0x2c9182[_0xc6aab4(0x199)][_0xc6aab4(0x1cf)]||undefined,'runtimeDomain':_0x5eb2e1?_0x5eb2e1[_0xc6aab4(0x1c8)]:_0x2c9182['raw']['runtimeDomain']||undefined,'skillDomain':_0x5eb2e1?_0x5eb2e1['skillDomain']:_0x2c9182[_0xc6aab4(0x199)][_0xc6aab4(0x19e)]||_0x2c9182[_0xc6aab4(0x199)][_0xc6aab4(0x1bb)]||_0x2c9182[_0xc6aab4(0x199)][_0xc6aab4(0x1af)]||_0x2c9182[_0xc6aab4(0x199)]['platformDomain']||undefined,'region':normalizeLovrabetRegion(_0x2c9182[_0xc6aab4(0x199)][_0xc6aab4(0x19f)])});}export function getProjectConfigPath(){const _0x3bc1ca=a102_0x530986;return resolveConfigPath(process[_0x3bc1ca(0x19c)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0xc835f9){const _0x275018=a102_0x530986;if(!existsSync(_0xc835f9))return{'status':_0x275018(0x1ba)};try{const _0x147c5c=readFileSync(_0xc835f9,{'encoding':_0x275018(0x1a0)});if(!_0x147c5c?.[_0x275018(0x193)]())return{'status':'empty'};const _0x237a8b=JSON['parse'](_0x147c5c);return{'status':'ok','data':_0x237a8b};}catch(_0x10c615){return{'status':_0x275018(0x1ac),'message':_0x10c615 instanceof Error?_0x10c615[_0x275018(0x18f)]:String(_0x10c615)};}}export function loadRawConfigLayers(_0x42880a){const _0x5991be=a102_0x530986;let _0x3e51d8={},_0x2e46af={},_0x494efe,_0x149a13;try{_0x494efe=resolveConfigPath(homedir());if(_0x494efe){const _0x57bc62=readFileSync(_0x494efe,{'encoding':_0x5991be(0x1a0)});if(_0x57bc62)_0x3e51d8=JSON[_0x5991be(0x19a)](_0x57bc62);}}catch{}try{const _0x495b81=_0x42880a||process['cwd']();_0x149a13=resolveConfigPath(_0x495b81);if(_0x149a13){const _0x49c6d2=readFileSync(_0x149a13,{'encoding':'utf8'});if(_0x49c6d2)_0x2e46af=JSON[_0x5991be(0x19a)](_0x49c6d2);}}catch{}return{'globalPath':_0x494efe,'projectPath':_0x149a13,'globalConfig':_0x3e51d8,'projectConfig':_0x2e46af};}function mergeRawConfigLayers(_0x54181f){const _0x2ba3d9=a102_0x530986,{globalConfig:_0x263112,projectConfig:_0x3a4b06}=_0x54181f,_0x2409c5={..._0x263112,..._0x3a4b06};delete _0x2409c5['inherit'];if('defaultApp'in _0x3a4b06)_0x2409c5[_0x2ba3d9(0x1b1)]=_0x3a4b06[_0x2ba3d9(0x1b1)];else _0x263112[_0x2ba3d9(0x1b1)]&&(_0x2409c5[_0x2ba3d9(0x1b1)]=_0x263112[_0x2ba3d9(0x1b1)]);return _0x2409c5;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x166a29){return mergeRawConfigLayers(loadRawConfigLayers(_0x166a29));}export function readRawConfigWithLayers(_0x45dff0){const _0x3d9f30=loadRawConfigLayers(_0x45dff0);return{'config':mergeRawConfigLayers(_0x3d9f30),'layers':_0x3d9f30};}export function resolveDefaultAppSource(_0x577c18){const _0x126ad2=a102_0x530986;if(_0x126ad2(0x1b1)in _0x577c18['projectConfig'])return _0x126ad2(0x198);if(_0x577c18[_0x126ad2(0x196)][_0x126ad2(0x1b1)])return'global';return null;}function buildConfig(_0x5e3392,_0x3fd4b6){const _0x3e34f4=a102_0x530986,_0x3a2cf3=_0x5e3392[_0x3e34f4(0x1b1)]||undefined,_0x52658b=_0x3fd4b6[_0x3e34f4(0x1b4)]||env(_0x3e34f4(0x1c0))||undefined,_0x49a8b3=_0x52658b||_0x3a2cf3||undefined,_0x2be605=env(_0x3e34f4(0x1a9))||_0x5e3392[_0x3e34f4(0x1d2)]||undefined,_0xbf819=_0x3fd4b6['env']||env(_0x3e34f4(0x1a7))||_0x5e3392[_0x3e34f4(0x1c7)]||DEFAULT_CONFIG_VALUES[_0x3e34f4(0x1c7)],_0x346628=normalizeEnv(String(_0xbf819)),_0x3c7d46=isDaily(_0x346628)?_0x3e34f4(0x1ad):isDev(_0x346628)?_0x3e34f4(0x1d1):'production',_0x1c3e03=typeof _0x3fd4b6[_0x3e34f4(0x1ae)]==='string'?_0x3fd4b6[_0x3e34f4(0x1ae)]:undefined,_0x368fcd=env(_0x3e34f4(0x1cb)),_0x25a130=_0x52658b?undefined:_0x5e3392[_0x3e34f4(0x1ae)]||_0x5e3392['app']||undefined,_0x5d3525=_0x52658b||(_0x25a130?undefined:_0x3a2cf3),_0x3a80ef=resolveLocalAppAliasCode(_0x5e3392,_0x5d3525),_0x1531af=resolveCachedAppCode(_0x5d3525,_0x3c7d46,_0x2be605),_0x5e2b80=_0x1c3e03||_0x368fcd||_0x25a130||_0x3a80ef||_0x1531af||undefined,_0x2b7bd3=_0x1c3e03?_0x3e34f4(0x1c9):_0x368fcd?_0x3e34f4(0x1c7):_0x25a130?_0x3e34f4(0x1b7):_0x3a80ef?_0x3e34f4(0x1c3):_0x1531af?'cache':undefined,_0x1b81c1=_0x5e3392['locale']||DEFAULT_CONFIG_VALUES[_0x3e34f4(0x1b0)],_0x22cbad=undefined,_0x1b8661=_0x3fd4b6['format']||env(_0x3e34f4(0x1cc))||_0x5e3392[_0x3e34f4(0x1d7)],_0x4a96ba=normalizeLegacyOutputFormat(_0x1b8661),_0x3c4f97=env(_0x3e34f4(0x1d3))||_0x5e3392[_0x3e34f4(0x1d5)],_0x565681=_0x3c4f97?Number(_0x3c4f97)||undefined:undefined,_0x13697e=_0x5e3392['riskLevel'],_0x5910c0=_0x13697e===_0x3e34f4(0x1a5)||_0x13697e===_0x3e34f4(0x1a1)||_0x13697e===_0x3e34f4(0x18b)?_0x13697e:DEFAULT_CONFIG_VALUES[_0x3e34f4(0x1b3)],_0x2c6c85=_0x5e3392[_0x3e34f4(0x1a6)]===!![],_0x177e54=env('VERBOSE'),_0x25492f=_0x177e54==='1'||_0x177e54==='true';return{'appCode':typeof _0x5e2b80==='string'&&_0x5e2b80[_0x3e34f4(0x193)]()?_0x5e2b80[_0x3e34f4(0x193)]():undefined,'appCodeSource':_0x2b7bd3,'env':_0x3c7d46,'locale':_0x1b81c1,'cookie':_0x22cbad,'accessKey':_0x2be605,'format':_0x4a96ba,'pageSize':_0x565681,'riskLevel':_0x5910c0,'nativeToolAvailable':_0x2c6c85,'verbose':_0x25492f,'defaultApp':_0x3a2cf3,'currentApp':typeof _0x49a8b3===_0x3e34f4(0x195)?_0x49a8b3:undefined,'raw':_0x5e3392};}function env(_0x460a08){return productEnv(_0x460a08);}async function buildAuth(_0x2798ce){const _0x4144c3=a102_0x530986,_0x47b649='',_0x590a9d=!!_0x2798ce[_0x4144c3(0x1d2)];return{'cookie':_0x47b649,'isLoggedIn':_0x590a9d,async 'getOrLogin'(){if(_0x590a9d)return _0x47b649;throw CliErrors['authRequired']();}};}
|
package/lib/core/api-client.d.ts
CHANGED
|
@@ -432,19 +432,10 @@ export declare function recognizeRuntimeOcr(appCode: string, input: {
|
|
|
432
432
|
export declare function getRuntimeAppConfigByKey(appCode: string, key: string): Promise<string>;
|
|
433
433
|
export type NotificationChannelType = "EMAIL" | "FEISHU" | "DINGTALK" | "WECOM" | "WEBHOOK";
|
|
434
434
|
export interface NotificationChannelConfigItem {
|
|
435
|
-
id?: number | string | null;
|
|
436
|
-
appCode?: string | null;
|
|
437
|
-
configName?: string | null;
|
|
438
435
|
configCode?: string | null;
|
|
436
|
+
configName?: string | null;
|
|
439
437
|
channelType?: string | null;
|
|
440
|
-
endpointUrl?: string | null;
|
|
441
|
-
channelConfig?: string | null;
|
|
442
438
|
description?: string | null;
|
|
443
|
-
connectTimeout?: number | null;
|
|
444
|
-
readTimeout?: number | null;
|
|
445
|
-
createTime?: string | null;
|
|
446
|
-
updateTime?: string | null;
|
|
447
|
-
[key: string]: unknown;
|
|
448
439
|
}
|
|
449
440
|
/** Lists app-level notification configs without using the development Cookie flow. */
|
|
450
441
|
export declare function listNotificationChannelConfigs(appCode: string, channelType: NotificationChannelType): Promise<NotificationChannelConfigItem[]>;
|
|
@@ -510,6 +501,7 @@ export type RuntimeAppRoleType = "ADMIN" | "USER" | "OWNER" | "CUSTOM";
|
|
|
510
501
|
export interface RuntimeAppRole {
|
|
511
502
|
id: number;
|
|
512
503
|
appCode: string;
|
|
504
|
+
roleCode: string;
|
|
513
505
|
roleName: string;
|
|
514
506
|
roleType: RuntimeAppRoleType;
|
|
515
507
|
permits?: Record<string, string[]>;
|
|
@@ -528,6 +520,7 @@ export interface RuntimeRoleUserRef {
|
|
|
528
520
|
}
|
|
529
521
|
export interface RuntimeRoleUsers {
|
|
530
522
|
id: number;
|
|
523
|
+
roleCode: string;
|
|
531
524
|
roleName: string;
|
|
532
525
|
roleType: RuntimeAppRoleType;
|
|
533
526
|
userList: RuntimeRoleUserRef[];
|
|
@@ -544,12 +537,14 @@ export declare function listRuntimeAppRoles(appCode: string, options?: RuntimeAp
|
|
|
544
537
|
}>;
|
|
545
538
|
export declare function createRuntimeAppRole(input: {
|
|
546
539
|
appCode: string;
|
|
540
|
+
roleCode?: string;
|
|
547
541
|
roleName: string;
|
|
548
542
|
remark?: string;
|
|
549
543
|
}): Promise<RuntimeAppRole>;
|
|
550
544
|
export declare function updateRuntimeAppRole(input: {
|
|
551
545
|
id: number;
|
|
552
546
|
appCode: string;
|
|
547
|
+
roleCode?: string;
|
|
553
548
|
roleName?: string;
|
|
554
549
|
remark?: string;
|
|
555
550
|
}): Promise<RuntimeAppRole>;
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a103_0x454103=a103_0xc689;(function(_0x2ab625,_0x13c4a4){const _0x49e4dd=a103_0xc689,_0x201d7c=_0x2ab625();while(!![]){try{const _0x15cbaa=parseInt(_0x49e4dd(0x1ec))/0x1+parseInt(_0x49e4dd(0x1da))/0x2+-parseInt(_0x49e4dd(0x1d0))/0x3*(-parseInt(_0x49e4dd(0x227))/0x4)+parseInt(_0x49e4dd(0x1c9))/0x5+-parseInt(_0x49e4dd(0x1d9))/0x6*(parseInt(_0x49e4dd(0x235))/0x7)+-parseInt(_0x49e4dd(0x1b8))/0x8*(parseInt(_0x49e4dd(0x197))/0x9)+parseInt(_0x49e4dd(0x1c6))/0xa;if(_0x15cbaa===_0x13c4a4)break;else _0x201d7c['push'](_0x201d7c['shift']());}catch(_0x1b6735){_0x201d7c['push'](_0x201d7c['shift']());}}}(a103_0x39a1,0x8c577));function a103_0xc689(_0x59ea80,_0x3a4a15){_0x59ea80=_0x59ea80-0x178;const _0x39a18b=a103_0x39a1();let _0xc68959=_0x39a18b[_0x59ea80];return _0xc68959;}import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getKbDomain,getRuntimeDomain,getSkillDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList,extractPaging}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x444d7e){_activeAK=_0x444d7e||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x37990e){const _0x2fa437=a103_0xc689;for(const _0x14c96b of _0x37990e){if(typeof _0x14c96b==='string'&&_0x14c96b[_0x2fa437(0x1d5)]())return _0x14c96b[_0x2fa437(0x1d5)]();}return undefined;}async function decodeResponseBody(_0x1afa74){const _0x295e32=a103_0xc689;if(typeof _0x1afa74[_0x295e32(0x1ef)]===_0x295e32(0x1eb))try{const _0x68bc6a=await _0x1afa74[_0x295e32(0x1ef)]();try{return{'isJson':!![],'data':parseLosslessJson(_0x68bc6a),'text':_0x68bc6a};}catch{return{'isJson':![],'text':_0x68bc6a[_0x295e32(0x1d5)]()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x1afa74[_0x295e32(0x18b)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x349777,_0x3cbf5a,_0xe359f9){const _0x2bd05f=a103_0xc689,_0x3b2ee5=_0x3cbf5a&&typeof _0x3cbf5a===_0x2bd05f(0x1dd)?_0x3cbf5a:{},_0x59edf2=[_0x3b2ee5[_0x2bd05f(0x203)],_0x3b2ee5[_0x2bd05f(0x1e4)]][_0x2bd05f(0x184)](_0x1683f4=>Number(_0x1683f4)===0x1ad),_0x3bcf42=createRateLimitError({'status':_0x349777[_0x2bd05f(0x203)]===0x1ad?_0x349777[_0x2bd05f(0x203)]:_0x59edf2??_0x349777[_0x2bd05f(0x203)],'errorCode':firstString(_0x3b2ee5['errorCode'],typeof _0x3b2ee5['code']===_0x2bd05f(0x178)?_0x3b2ee5[_0x2bd05f(0x1e4)]:undefined),'message':firstString(_0x3b2ee5[_0x2bd05f(0x193)],_0x3b2ee5[_0x2bd05f(0x1cd)],_0x3b2ee5[_0x2bd05f(0x1bd)],_0xe359f9),'retryAfter':readRetryAfter(_0x349777[_0x2bd05f(0x1b1)])??readRetryAfterSeconds(_0x3cbf5a)});if(_0x3bcf42)throw _0x3bcf42;}async function apiRequest(_0x11bfd8,_0x401338={}){const _0x1458b2=a103_0xc689,{method:method='GET',body:_0x1c89a5,headers:headers={},timeout:timeout=0x7530,domain:domain='runtime'}=_0x401338,_0x6ffc5c=_activeAK,_0x2d3334=domain===_0x1458b2(0x228)?getApiDomain():domain==='kb'?getKbDomain():getRuntimeDomain();if(!_0x6ffc5c)throw CliErrors[_0x1458b2(0x19a)](_0x1458b2(0x1a1)+PRODUCT_CONFIG[_0x1458b2(0x207)]+'.');const _0x1c612b=''+_0x2d3334+_0x11bfd8,_0x2d0f39={'X-User-AK':_0x6ffc5c},_0x2c03da=new AbortController(),_0x440f50=setTimeout(()=>_0x2c03da[_0x1458b2(0x199)](),timeout);try{const _0x54f03d=await fetch(_0x1c612b,{'method':method,'headers':{'Content-Type':_0x1458b2(0x1de),'X-Invoke-Source':PRODUCT_CONFIG[_0x1458b2(0x1cc)],..._0x2d0f39,...headers},'body':_0x1c89a5?JSON[_0x1458b2(0x185)](_0x1c89a5):undefined,'signal':_0x2c03da['signal']}),_0x1ad70a=await decodeResponseBody(_0x54f03d);if(!_0x1ad70a['isJson']){throwIfRateLimited(_0x54f03d,undefined,_0x1ad70a['text']);throw CliErrors[_0x1458b2(0x1ba)](_0x1458b2(0x182)+_0x54f03d[_0x1458b2(0x203)]+')',_0x54f03d[_0x1458b2(0x203)]>=0x190?_0x1458b2(0x208):undefined);}const _0x34e2b1=_0x1ad70a[_0x1458b2(0x23b)];throwIfRateLimited(_0x54f03d,_0x34e2b1);if(!_0x54f03d['ok']||_0x34e2b1[_0x1458b2(0x1e5)]===![])throw CliErrors[_0x1458b2(0x1ba)](_0x34e2b1[_0x1458b2(0x193)]||_0x34e2b1[_0x1458b2(0x1cd)]||_0x1458b2(0x198)+_0x54f03d[_0x1458b2(0x203)],_0x34e2b1[_0x1458b2(0x200)]?'API\x20error\x20code:\x20'+_0x34e2b1['errorCode']:undefined);return _0x34e2b1;}catch(_0x56f1ce){if(_0x56f1ce instanceof Error&&_0x56f1ce[_0x1458b2(0x1e0)]===_0x1458b2(0x1d4))throw CliErrors[_0x1458b2(0x1ba)]('Request\x20timeout:\x20'+_0x1c612b);throw _0x56f1ce;}finally{clearTimeout(_0x440f50);}}async function apiBinaryRequest(_0xfe070c,_0x28942a={}){const _0x1089c5=a103_0xc689,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x28942a,_0x354f7a=_activeAK,_0x47d0e3=getRuntimeDomain();if(!_0x354f7a)throw CliErrors[_0x1089c5(0x19a)](_0x1089c5(0x1a1)+PRODUCT_CONFIG[_0x1089c5(0x207)]+'.');const _0xd6a93f=''+_0x47d0e3+_0xfe070c,_0x4f78a3=new AbortController(),_0x2c2725=setTimeout(()=>_0x4f78a3['abort'](),timeout);try{const _0x4049a4=await fetch(_0xd6a93f,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x1089c5(0x1cc)],'X-User-AK':_0x354f7a,...headers},'signal':_0x4f78a3['signal']});if(!_0x4049a4['ok']){const _0x3137b9=await decodeResponseBody(_0x4049a4),_0x44136b=_0x3137b9[_0x1089c5(0x23b)]&&typeof _0x3137b9[_0x1089c5(0x23b)]===_0x1089c5(0x1dd)?_0x3137b9[_0x1089c5(0x23b)]:{},_0x41a904=firstString(_0x44136b['errorMsg'],_0x44136b[_0x1089c5(0x1cd)],_0x44136b['errorCode'],_0x3137b9[_0x1089c5(0x1ef)]);throwIfRateLimited(_0x4049a4,_0x3137b9[_0x1089c5(0x23b)],_0x41a904);throw CliErrors[_0x1089c5(0x1ba)](_0x41a904||_0x1089c5(0x198)+_0x4049a4['status'],_0x1089c5(0x1ac)+_0xd6a93f);}return Buffer[_0x1089c5(0x224)](await _0x4049a4[_0x1089c5(0x1ea)]());}catch(_0x208087){if(_0x208087 instanceof Error&&_0x208087[_0x1089c5(0x1e0)]===_0x1089c5(0x1d4))throw CliErrors[_0x1089c5(0x1ba)](_0x1089c5(0x1ed)+_0xd6a93f);throw _0x208087;}finally{clearTimeout(_0x2c2725);}}async function apiFormRequest(_0x362137,_0x1ae35b,_0x1be88e={}){const _0x16020a=a103_0xc689,{timeout:timeout=0x7530}=_0x1be88e,_0x16c2b3=_activeAK,_0x160d21=getRuntimeDomain();if(!_0x16c2b3)throw CliErrors[_0x16020a(0x19a)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x16020a(0x207)]+'.');const _0x15db46=''+_0x160d21+_0x362137,_0x1d5f0d=new AbortController(),_0x5684a3=setTimeout(()=>_0x1d5f0d[_0x16020a(0x199)](),timeout);try{const _0x45af92=await fetch(_0x15db46,{'method':_0x16020a(0x23c),'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x16020a(0x1cc)],'X-User-AK':_0x16c2b3},'body':_0x1ae35b,'signal':_0x1d5f0d[_0x16020a(0x1e9)]}),_0x5c16b1=await decodeResponseBody(_0x45af92);if(!_0x5c16b1['isJson']){throwIfRateLimited(_0x45af92,undefined,_0x5c16b1['text']);throw CliErrors[_0x16020a(0x1ba)](_0x16020a(0x182)+_0x45af92[_0x16020a(0x203)]+')',_0x45af92[_0x16020a(0x203)]>=0x190?_0x16020a(0x208):undefined);}const _0x1d2f36=_0x5c16b1[_0x16020a(0x23b)];throwIfRateLimited(_0x45af92,_0x1d2f36);if(!_0x45af92['ok']||_0x1d2f36[_0x16020a(0x1e5)]===![])throw CliErrors['apiError'](_0x1d2f36[_0x16020a(0x193)]||_0x1d2f36[_0x16020a(0x1cd)]||_0x16020a(0x198)+_0x45af92['status'],_0x1d2f36[_0x16020a(0x200)]?_0x16020a(0x1d1)+_0x1d2f36[_0x16020a(0x200)]:undefined);return _0x1d2f36;}catch(_0x59a382){if(_0x59a382 instanceof Error&&_0x59a382['name']===_0x16020a(0x1d4))throw CliErrors[_0x16020a(0x1ba)](_0x16020a(0x1ed)+_0x15db46);throw _0x59a382;}finally{clearTimeout(_0x5684a3);}}async function toolboxRequest(_0x36c064,_0x486725,_0x100f73={}){const _0x59ae08=a103_0xc689,{method:method=_0x59ae08(0x18f),headers:headers={},timeout:timeout=0x7530}=_0x100f73,_0x3d171b=_activeAK;if(!_0x3d171b)throw CliErrors['authRequired'](_0x59ae08(0x1a1)+PRODUCT_CONFIG[_0x59ae08(0x207)]+'.');const _0x2aa9ec=getApiDomain()[_0x59ae08(0x20e)](/\/$/,''),_0x1c9b74=new URL(_0x36c064,_0x2aa9ec+_0x59ae08(0x1ff));if(_0x486725)for(const [_0x44397f,_0x28cde2]of Object['entries'](_0x486725)){_0x28cde2!==undefined&&_0x28cde2!==null&&_0x1c9b74[_0x59ae08(0x1df)][_0x59ae08(0x21c)](_0x44397f,String(_0x28cde2));}const _0x63574f=new AbortController(),_0x176bbe=setTimeout(()=>_0x63574f[_0x59ae08(0x199)](),timeout);try{const _0x42267c=await fetch(_0x1c9b74,{'method':method,'headers':{'Content-Type':_0x59ae08(0x1de),'X-Invoke-Source':PRODUCT_CONFIG[_0x59ae08(0x1cc)],'X-User-AK':_0x3d171b,...headers},'signal':_0x63574f['signal']}),_0x4be570=await decodeResponseBody(_0x42267c);if(!_0x4be570[_0x59ae08(0x1d3)]){throwIfRateLimited(_0x42267c,undefined,_0x4be570[_0x59ae08(0x1ef)]);throw CliErrors[_0x59ae08(0x1ba)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x42267c[_0x59ae08(0x203)]+')',_0x42267c[_0x59ae08(0x203)]>=0x190?_0x59ae08(0x208):undefined);}const _0x27e6df=_0x4be570[_0x59ae08(0x23b)];throwIfRateLimited(_0x42267c,_0x27e6df);if(!_0x42267c['ok']){const _0x23cbf9=_0x27e6df&&typeof _0x27e6df===_0x59ae08(0x1dd)?_0x27e6df:{};throw CliErrors[_0x59ae08(0x1ba)](_0x23cbf9['errorMsg']||_0x23cbf9[_0x59ae08(0x1cd)]||_0x59ae08(0x183)+_0x42267c[_0x59ae08(0x203)],_0x23cbf9[_0x59ae08(0x200)]?'Toolbox\x20error\x20code:\x20'+_0x23cbf9[_0x59ae08(0x200)]:undefined);}if(_0x27e6df&&typeof _0x27e6df===_0x59ae08(0x1dd)&&_0x59ae08(0x1e5)in _0x27e6df&&typeof _0x27e6df['success']===_0x59ae08(0x191)){const _0x9e0e33=_0x27e6df;if(!_0x9e0e33[_0x59ae08(0x1e5)])throw CliErrors[_0x59ae08(0x1ba)](_0x9e0e33[_0x59ae08(0x193)]||_0x9e0e33[_0x59ae08(0x1cd)]||'Toolbox\x20API\x20error',_0x9e0e33[_0x59ae08(0x200)]?_0x59ae08(0x213)+_0x9e0e33[_0x59ae08(0x200)]:undefined);return _0x9e0e33[_0x59ae08(0x23b)];}return _0x27e6df;}catch(_0x10b71f){if(_0x10b71f instanceof Error&&_0x10b71f[_0x59ae08(0x1e0)]===_0x59ae08(0x1d4))throw CliErrors[_0x59ae08(0x1ba)]('Request\x20timeout:\x20'+_0x1c9b74[_0x59ae08(0x1ae)]());throw _0x10b71f;}finally{clearTimeout(_0x176bbe);}}async function skillHubJsonRequest(_0x3260e5,_0xb99a4d={}){const _0x483926=a103_0xc689,{method:method='GET',query:_0x5eff03,body:_0x1b493c,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0xb99a4d,_0x4c39fd=_activeAK;if(!_0x4c39fd)throw CliErrors[_0x483926(0x19a)](_0x483926(0x1a1)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x5de4ba=getSkillDomain()[_0x483926(0x20e)](/\/$/,''),_0x968ebd=new URL(_0x3260e5,_0x5de4ba+'/');if(_0x5eff03)for(const [_0x3995fe,_0x501773]of Object[_0x483926(0x21a)](_0x5eff03)){_0x501773!==undefined&&_0x501773!==null&&_0x968ebd['searchParams'][_0x483926(0x21c)](_0x3995fe,String(_0x501773));}const _0x4de77c=new AbortController(),_0x289ffb=setTimeout(()=>_0x4de77c['abort'](),timeout);try{const _0x21a865=await fetch(_0x968ebd[_0x483926(0x1ae)](),{'method':method,'headers':{'Accept':_0x483926(0x1de),'X-Invoke-Source':PRODUCT_CONFIG[_0x483926(0x1cc)],'X-User-AK':_0x4c39fd,...headers},'body':_0x1b493c,'signal':_0x4de77c[_0x483926(0x1e9)]}),_0x128529=await decodeResponseBody(_0x21a865);if(!_0x128529[_0x483926(0x1d3)]){if(allowNotFound&&_0x21a865['status']===0x194)return undefined;throwIfRateLimited(_0x21a865,undefined,_0x128529['text']);throw CliErrors[_0x483926(0x1ba)](_0x483926(0x1c1)+_0x21a865[_0x483926(0x203)]+')',_0x21a865[_0x483926(0x203)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x3ebeb9=_0x128529['data'];throwIfRateLimited(_0x21a865,_0x3ebeb9);if(allowNotFound&&isSkillHubNotFoundResponse(_0x21a865[_0x483926(0x203)],_0x3ebeb9))return undefined;const _0x4feade=!_0x21a865['ok']||_0x3ebeb9?.[_0x483926(0x1e5)]===![]||typeof _0x3ebeb9?.['code']===_0x483926(0x1e3)&&_0x3ebeb9['code']>=0x190;if(_0x4feade)throw CliErrors[_0x483926(0x1ba)](_0x3ebeb9?.[_0x483926(0x193)]||_0x3ebeb9?.['message']||_0x3ebeb9?.['msg']||_0x483926(0x192)+_0x21a865[_0x483926(0x203)],_0x3ebeb9?.[_0x483926(0x200)]?_0x483926(0x1b5)+_0x3ebeb9['errorCode']:undefined);return _0x3ebeb9?.[_0x483926(0x23b)]??_0x3ebeb9;}catch(_0x2509cb){if(_0x2509cb instanceof Error&&_0x2509cb[_0x483926(0x1e0)]===_0x483926(0x1d4))throw CliErrors[_0x483926(0x1ba)](_0x483926(0x1ed)+_0x968ebd['toString']());throw _0x2509cb;}finally{clearTimeout(_0x289ffb);}}function isSkillHubNotFoundResponse(_0x267239,_0x5192f0){const _0x3391bf=a103_0xc689;if(_0x267239===0x194||_0x5192f0?.[_0x3391bf(0x1e4)]===0x194)return!![];if(_0x267239!==0x190&&_0x5192f0?.[_0x3391bf(0x1e4)]!==0x190)return![];const _0x2d022e=[_0x5192f0?.[_0x3391bf(0x1bd)],_0x5192f0?.['message'],_0x5192f0?.[_0x3391bf(0x193)],_0x5192f0?.['error']][_0x3391bf(0x196)](_0x3d79b9=>typeof _0x3d79b9===_0x3391bf(0x178))[_0x3391bf(0x180)]('\x20');return/skill not found\b/i['test'](_0x2d022e);}async function skillHubBinaryRequest(_0xba41f5,_0x30cbd7={}){const _0x1b9905=a103_0xc689,{query:_0x1740b2,headers:headers={},timeout:timeout=0x7530}=_0x30cbd7,_0x27d047=_activeAK;if(!_0x27d047)throw CliErrors['authRequired'](_0x1b9905(0x1a1)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x3bbfd2=getSkillDomain()[_0x1b9905(0x20e)](/\/$/,''),_0x4bb7f9=new URL(_0xba41f5,_0x3bbfd2+'/');if(_0x1740b2)for(const [_0x295663,_0x4d750f]of Object['entries'](_0x1740b2)){_0x4d750f!==undefined&&_0x4d750f!==null&&_0x4bb7f9[_0x1b9905(0x1df)][_0x1b9905(0x21c)](_0x295663,String(_0x4d750f));}const _0x3934bc=new AbortController(),_0x56f464=setTimeout(()=>_0x3934bc[_0x1b9905(0x199)](),timeout);try{const _0x23084a=await fetch(_0x4bb7f9[_0x1b9905(0x1ae)](),{'method':_0x1b9905(0x18f),'headers':{'Accept':_0x1b9905(0x22e),'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x27d047,...headers},'signal':_0x3934bc[_0x1b9905(0x1e9)]});if(!_0x23084a['ok']){const _0x2e6351=await decodeResponseBody(_0x23084a),_0x32966e=_0x2e6351[_0x1b9905(0x23b)]&&typeof _0x2e6351[_0x1b9905(0x23b)]===_0x1b9905(0x1dd)?_0x2e6351[_0x1b9905(0x23b)]:{},_0x43f328=firstString(_0x32966e[_0x1b9905(0x193)],_0x32966e[_0x1b9905(0x1cd)],_0x32966e[_0x1b9905(0x1bd)],_0x32966e[_0x1b9905(0x200)],_0x2e6351['text']);throwIfRateLimited(_0x23084a,_0x2e6351[_0x1b9905(0x23b)],_0x43f328);throw CliErrors[_0x1b9905(0x1ba)](_0x43f328||_0x1b9905(0x192)+_0x23084a[_0x1b9905(0x203)],_0x1b9905(0x1ac)+_0x4bb7f9[_0x1b9905(0x1ae)]());}return Buffer[_0x1b9905(0x224)](await _0x23084a['arrayBuffer']());}catch(_0x3fac51){if(_0x3fac51 instanceof Error&&_0x3fac51[_0x1b9905(0x1e0)]===_0x1b9905(0x1d4))throw CliErrors[_0x1b9905(0x1ba)](_0x1b9905(0x1ed)+_0x4bb7f9[_0x1b9905(0x1ae)]());throw _0x3fac51;}finally{clearTimeout(_0x56f464);}}export async function getBffEndpointContract(_0x3b3379,_0x2992f0){const _0x455c17=a103_0xc689;if(_0x2992f0===_0x455c17(0x238))throw CliErrors['validation'](_0x455c17(0x20c)+_0x3b3379+',\x20name='+_0x2992f0);const _0x535356=await apiRequest(_0x455c17(0x1cb)+encodeURIComponent(_0x3b3379)+'/'+encodeURIComponent(_0x2992f0)),_0x298dd2=_0x535356[_0x455c17(0x23b)];if(!_0x298dd2||typeof _0x298dd2!==_0x455c17(0x1dd)||Array[_0x455c17(0x220)](_0x298dd2)||_0x298dd2[_0x455c17(0x17d)]!==_0x3b3379||_0x298dd2[_0x455c17(0x21d)]!==_0x2992f0)throw CliErrors[_0x455c17(0x1f2)](_0x455c17(0x20c)+_0x3b3379+_0x455c17(0x1b9)+_0x2992f0);return{'appCode':_0x298dd2[_0x455c17(0x17d)],'functionName':_0x298dd2[_0x455c17(0x21d)],'description':_0x298dd2[_0x455c17(0x1fe)],'version':_0x298dd2[_0x455c17(0x1c8)],'gmtModified':_0x298dd2[_0x455c17(0x232)]};}export async function getSqlQueryInfo(_0x11beae,_0x406fa2){const _0x32db3e=a103_0xc689,_0x4676c3=await apiRequest(_0x32db3e(0x18a),{'method':_0x32db3e(0x23c),'body':{'appCode':_0x11beae,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x406fa2}}),_0x16e508=_0x4676c3[_0x32db3e(0x23b)],_0x5733ea=_0x16e508&&typeof _0x16e508==='object'&&_0x32db3e(0x1b4)in _0x16e508?_0x16e508['tableData']?.[0x0]:_0x16e508&&typeof _0x16e508===_0x32db3e(0x1dd)&&'sqlCode'in _0x16e508?_0x16e508:undefined;if(!_0x5733ea)throw CliErrors[_0x32db3e(0x1f2)](_0x32db3e(0x1c7)+_0x406fa2);return _0x5733ea;}function isRemoteAppItem(_0x5d06b8){const _0x447731=a103_0xc689;return!!_0x5d06b8&&typeof _0x5d06b8===_0x447731(0x1dd)&&typeof _0x5d06b8[_0x447731(0x17d)]===_0x447731(0x178)&&typeof _0x5d06b8[_0x447731(0x211)]==='string';}function extractRemoteAppItems(_0x193041){const _0x481130=a103_0xc689;if(Array[_0x481130(0x220)](_0x193041))return _0x193041[_0x481130(0x196)](isRemoteAppItem);if(!_0x193041||typeof _0x193041!==_0x481130(0x1dd))throw CliErrors[_0x481130(0x1ba)](_0x481130(0x1ca));const _0x37e6ea=_0x193041;if(Array['isArray'](_0x37e6ea[_0x481130(0x1b4)]))return _0x37e6ea['tableData'][_0x481130(0x196)](isRemoteAppItem);if(_0x37e6ea['data']&&typeof _0x37e6ea[_0x481130(0x23b)]===_0x481130(0x1dd)){const _0x91631e=_0x37e6ea[_0x481130(0x23b)];if(Array[_0x481130(0x220)](_0x91631e[_0x481130(0x1b4)]))return _0x91631e['tableData']['filter'](isRemoteAppItem);}throw CliErrors[_0x481130(0x1ba)](_0x481130(0x17e));}export async function getMyApps(){const _0x24a1d3=a103_0xc689,_0x39ecbb=await apiRequest(_0x24a1d3(0x226));return extractRemoteAppItems(_0x39ecbb[_0x24a1d3(0x23b)]);}export async function getLoginUserInfo(){const _0x393859=a103_0xc689,_0x1840eb=await apiRequest(_0x393859(0x17c));if(!_0x1840eb[_0x393859(0x23b)]||typeof _0x1840eb[_0x393859(0x23b)]!==_0x393859(0x1dd)||Array[_0x393859(0x220)](_0x1840eb['data']))throw CliErrors[_0x393859(0x1ba)]('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x1840eb[_0x393859(0x23b)];}export const USER_ACCOUNT_BIND_PATH=a103_0x454103(0x230);export async function bindExternalUserAccount(_0x29bf58,_0xea52ee){const _0x472c6d=a103_0x454103,_0x48c3bf=await apiRequest(USER_ACCOUNT_BIND_PATH,{'method':'POST','body':{'provider':_0x29bf58,'accountId':_0xea52ee}});return _0x48c3bf[_0x472c6d(0x23b)];}function runtimeSchedulePath(_0x44f601,_0x2b1914=''){const _0x260e29=a103_0x454103;return _0x260e29(0x206)+encodeURIComponent(_0x44f601)+'/schedules'+_0x2b1914;}export async function validateRuntimeSchedule(_0x4fb020,_0x1d763c){const _0x596a42=a103_0x454103,_0x2986d5=await apiRequest(runtimeSchedulePath(_0x4fb020,_0x596a42(0x214)),{'method':_0x596a42(0x23c),'body':_0x1d763c});return _0x2986d5[_0x596a42(0x23b)];}export async function createRuntimeSchedule(_0xb262ee,_0x541151){const _0x1f178a=a103_0x454103,_0x4f6dbe=await apiRequest(runtimeSchedulePath(_0xb262ee),{'method':'POST','body':_0x541151});return _0x4f6dbe[_0x1f178a(0x23b)];}export async function listRuntimeSchedules(_0x1d0612,_0x4a9ae5){const _0x409666=a103_0x454103,_0x3fdbd7=new URLSearchParams();_0x3fdbd7[_0x409666(0x21c)](_0x409666(0x18d),_0x4a9ae5['kind']);if(_0x4a9ae5[_0x409666(0x236)]!==undefined)_0x3fdbd7['set'](_0x409666(0x236),String(_0x4a9ae5[_0x409666(0x236)]));if(_0x4a9ae5['cursor'])_0x3fdbd7[_0x409666(0x21c)]('cursor',_0x4a9ae5[_0x409666(0x20a)]);const _0x36ec0=_0x3fdbd7[_0x409666(0x23a)]>0x0?'?'+_0x3fdbd7[_0x409666(0x1ae)]():'',_0x1de9e7=await apiRequest(''+runtimeSchedulePath(_0x1d0612)+_0x36ec0);return _0x1de9e7[_0x409666(0x23b)];}export async function getRuntimeSchedule(_0x1f001e,_0x3ff8ec){const _0x55cf33=await apiRequest(runtimeSchedulePath(_0x1f001e,'/'+encodeURIComponent(_0x3ff8ec)));return _0x55cf33['data'];}export async function deleteRuntimeSchedule(_0x51976b,_0x4d7bfa){const _0x2df1ee=a103_0x454103,_0x2616a4=await apiRequest(runtimeSchedulePath(_0x51976b,'/'+encodeURIComponent(_0x4d7bfa)),{'method':'DELETE'});return _0x2616a4[_0x2df1ee(0x23b)];}export async function runRuntimeSchedule(_0x251201,_0x55c519){const _0x4b4898=a103_0x454103,_0x49d8eb=await apiRequest(runtimeSchedulePath(_0x251201,'/'+encodeURIComponent(_0x55c519)+_0x4b4898(0x194)),{'method':'POST'});return _0x49d8eb[_0x4b4898(0x23b)];}export async function listDatasets(_0x74ee87,_0xce99){const _0xfeeb1=a103_0x454103,_0x33df75=await apiRequest('/client/dataset/list',{'method':_0xfeeb1(0x23c),'body':{'appCode':_0x74ee87,..._0xce99?.[_0xfeeb1(0x1e4)]&&{'code':_0xce99['code']},..._0xce99?.[_0xfeeb1(0x1e0)]&&{'name':_0xce99[_0xfeeb1(0x1e0)]}}});return extractList(_0x33df75[_0xfeeb1(0x23b)]);}export async function getDatasetDetail(_0x46ae8d){const _0x155256=a103_0x454103,_0x39d569=await apiRequest(_0x155256(0x186)+encodeURIComponent(_0x46ae8d));return _0x39d569[_0x155256(0x23b)];}export async function getDatasetSdkUsageDoc(_0x12a265,_0x11fd4c){const _0x5b1ed5=a103_0x454103,_0x2ebc3e=await toolboxRequest(_0x5b1ed5(0x1c5),{'datasetCode':_0x12a265,'appCode':_0x11fd4c});return typeof _0x2ebc3e?.['markdown']==='string'?_0x2ebc3e[_0x5b1ed5(0x210)]:'';}export async function uploadRuntimeFile(_0x244489,_0x5c4892){const _0x5afc04=a103_0x454103,_0x428231=await readFile(_0x5c4892),_0x13d90b=new FormData();_0x13d90b['append'](_0x5afc04(0x17d),_0x244489),_0x13d90b[_0x5afc04(0x1f8)](_0x5afc04(0x190),new Blob([new Uint8Array(_0x428231)]),basename(_0x5c4892));const _0xe48b54=await apiFormRequest(_0x5afc04(0x1e8),_0x13d90b);return _0xe48b54[_0x5afc04(0x23b)];}export async function queryRuntimeFileUrl(_0x977048,_0x281598={}){const _0x47e378=a103_0x454103,_0x516d8e=await apiRequest(_0x47e378(0x237),{'method':_0x47e378(0x23c),'body':{'filePath':_0x977048,'downloadFlag':_0x281598[_0x47e378(0x1d7)]??![],..._0x281598[_0x47e378(0x209)]?{'longTerm':!![]}:{}}});return _0x516d8e[_0x47e378(0x23b)];}export async function recognizeRuntimeOcr(_0x579492,_0x26189a){const _0x38b87a=a103_0x454103,_0xb85b36=await apiRequest(_0x38b87a(0x1f3),{'method':'POST','body':{'appCode':_0x579492,'url':_0x26189a[_0x38b87a(0x1ad)],'type':_0x26189a['type']}});return _0xb85b36[_0x38b87a(0x23b)];}export async function getRuntimeAppConfigByKey(_0x23efb3,_0x2ad408){const _0x4456e9=a103_0x454103,_0xeb5abb=new URLSearchParams({'appCode':_0x23efb3,'key':_0x2ad408}),_0x51cc07=await apiRequest(_0x4456e9(0x1a6)+_0xeb5abb[_0x4456e9(0x1ae)]());if(typeof _0x51cc07[_0x4456e9(0x23b)]!==_0x4456e9(0x178))throw CliErrors[_0x4456e9(0x1f2)](_0x4456e9(0x1c0)+_0x2ad408);return _0x51cc07[_0x4456e9(0x23b)];}export async function listNotificationChannelConfigs(_0x52eee7,_0x640ad){const _0x130448=a103_0x454103,_0x25d50e=new URLSearchParams({'appCode':_0x52eee7,'channelType':_0x640ad}),_0x56e6f2=await apiRequest(_0x130448(0x1e6)+_0x25d50e[_0x130448(0x1ae)](),{'domain':_0x130448(0x228)});if(!Array[_0x130448(0x220)](_0x56e6f2[_0x130448(0x23b)]))throw CliErrors[_0x130448(0x1ba)](_0x130448(0x1fb),_0x130448(0x1bb));return _0x56e6f2['data'];}export async function listRuntimeArtifacts(_0x17a6db,_0x5bfc26){const _0x5ae725=a103_0x454103,_0x1b5825=new URLSearchParams({'appCode':_0x17a6db});if(_0x5bfc26?.[_0x5ae725(0x19f)])_0x1b5825['set']('artifactType',_0x5bfc26['artifactType']);if(_0x5bfc26?.['source'])_0x1b5825[_0x5ae725(0x21c)](_0x5ae725(0x1f4),_0x5bfc26[_0x5ae725(0x1f4)]);if(_0x5bfc26?.[_0x5ae725(0x1ab)]!==undefined)_0x1b5825[_0x5ae725(0x21c)](_0x5ae725(0x1ab),String(_0x5bfc26[_0x5ae725(0x1ab)]));const _0x49a77b=await apiRequest(_0x5ae725(0x181)+_0x1b5825[_0x5ae725(0x1ae)]());return Array[_0x5ae725(0x220)](_0x49a77b[_0x5ae725(0x23b)])?_0x49a77b['data']:[];}export async function getRuntimeArtifact(_0x519e57,_0x179c28){const _0x20ba7e=a103_0x454103,_0x466dca=await apiRequest('/client/artifact/'+_0x519e57+'?appCode='+encodeURIComponent(_0x179c28));if(!_0x466dca[_0x20ba7e(0x23b)])throw CliErrors[_0x20ba7e(0x1f2)]('Artifact\x20not\x20found:\x20id='+_0x519e57);return _0x466dca[_0x20ba7e(0x23b)];}export async function createRuntimeArtifact(_0x585280,_0x1fd787){const _0x3ea1ce=a103_0x454103,_0x3ae2eb=await apiRequest(_0x3ea1ce(0x1a5),{'method':_0x3ea1ce(0x23c),'body':{'appCode':_0x585280,..._0x1fd787}});return _0x3ae2eb[_0x3ea1ce(0x23b)];}function a103_0x39a1(){const _0x42acdf=['skillCode','/client/uploadFile','signal','arrayBuffer','function','226955jqxxdS','Request\x20timeout:\x20','publishedVersion','text','sourceFingerprint','values','validation','/client/ocr','source','/client/menu/permit-list','CUSTOM','all','append','found','PUT','Invalid\x20notification\x20config\x20list\x20response.','/client/runtime-bff/personal/','personal','description','/api/node-toolbox/','errorCode','/client/permit/page/save','/client/permit/user-role/update-user-list','status','packageBase64','permitList','/api/harness/apps/','newConfigFileName','Check\x20your\x20credentials\x20and\x20try\x20again.','longTerm','cursor','currentPage','Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode=','/client/permit/page/get-one','replace','/client/permit/role/get-list','markdown','appName','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.','Toolbox\x20error\x20code:\x20','/validate','/client/knowledge-base/personal/list?appCode=','warnings','/client/permit/resource/batch-save-menu','SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.','/skills','entries','/client/permit/role/delete','set','functionName','/execute?appCode=','displayName','isArray','/client/dept/queryAppUser','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.','/client/knowledge-base/personal/','from','publish','/client/app/my-apps','179512dmMoMm','api','test','PRIVATE','diagramValidated','diagramBound','skillName','application/octet-stream','/versions/','/client/user-accounts/bind','/client/permit/role/create','gmtModified','/client/permit/resource/batch-save-dataset','scope','2359CHMUPe','limit','/client/queryFileUrl','functions','diagramRevision','size','data','POST','string','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','valid','?appCode=','/client/user/loginUserInfo','appCode','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','base64','join','/client/artifact/list?','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','Toolbox\x20API\x20error:\x20','find','stringify','/client/dataset/get-driven-data?code=','effective','resolvedVersion','visibility','/client/sql/query','json','/client/runtime-bff/personal/create','kind','/publish','GET','file','boolean','SkillHub\x20API\x20error:\x20','errorMsg','/run','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','filter','927imjXxt','API\x20error:\x20','abort','authRequired','/download','confirmWarnings','/api/runtime/v1/namespaces/','Personal\x20Backend\x20Function\x20not\x20found:\x20id=','artifactType','NAMESPACE_ONLY','Configure\x20accessKey\x20in\x20','/update','map','/client/permit/dataset/list','/client/artifact/create','/client/app-config/getByKey?','skill','/client/artifact/','min','.zip','favorite','Download\x20failed:\x20','url','toString','roleName','summary','headers','diagram','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','tableData','SkillHub\x20error\x20code:\x20','slug','namespace','1328NdfEsq',',\x20name=','apiError','Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.','undefined','msg','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','errors','Invalid\x20app\x20config\x20value:\x20key=','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','/client/permit/user-role/get-user-list','pageSize','/api/cli/v1/skills/','api-doc-generator','5974780GPUdRi','SQL\x20query\x20not\x20found:\x20','version','1611330luDebM','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/client/bff/endpoint/','invokeSource','message','toLowerCase','items','15oSQMJk','API\x20error\x20code:\x20','ownerPreviewVersion','isJson','AbortError','trim','isInteger','download','company','14226qfOfbe','39750ApdiSb','/client/permit/role/update','example','object','application/json','searchParams','name','/publish/validate','/client/permit/role/get-permit-list','number','code','success','/notification/channel-config/list?'];a103_0x39a1=function(){return _0x42acdf;};return a103_0x39a1();}export async function updateRuntimeArtifact(_0x3fdd15,_0x4b01f7,_0x129c91){const _0x9286c8=a103_0x454103,_0x46ae2a=await apiRequest(_0x9286c8(0x1a8)+_0x3fdd15+_0x9286c8(0x1a2),{'method':_0x9286c8(0x23c),'body':{'appCode':_0x4b01f7,..._0x129c91}});return _0x46ae2a['data'];}export async function listPersonalBffs(_0x41e472){const _0x460710=a103_0x454103,_0x1d974d=await apiRequest('/client/runtime-bff/personal/list?appCode='+encodeURIComponent(_0x41e472));return Array[_0x460710(0x220)](_0x1d974d[_0x460710(0x23b)])?_0x1d974d[_0x460710(0x23b)]:[];}export async function getPersonalBff(_0x2c5e83,_0x549d16){const _0x1c3129=a103_0x454103,_0x77b60c=await apiRequest(_0x1c3129(0x1fc)+_0x2c5e83+_0x1c3129(0x17b)+encodeURIComponent(_0x549d16));if(!_0x77b60c[_0x1c3129(0x23b)])throw CliErrors[_0x1c3129(0x1f2)](_0x1c3129(0x19e)+_0x2c5e83);return _0x77b60c[_0x1c3129(0x23b)];}export async function createPersonalBff(_0x34f9e1,_0x3bc8d2){const _0x36ac59=a103_0x454103,_0x544b3f=await apiRequest(_0x36ac59(0x18c),{'method':_0x36ac59(0x23c),'body':{'appCode':_0x34f9e1,..._0x3bc8d2}});return _0x544b3f['data'];}export async function updatePersonalBff(_0x3107a9,_0xa34c1,_0x2ce4ee){const _0x416ce7=a103_0x454103,_0x292f12=await apiRequest(_0x416ce7(0x1fc)+_0x3107a9+'/update',{'method':_0x416ce7(0x23c),'body':{'appCode':_0xa34c1,..._0x2ce4ee}});return _0x292f12['data'];}export async function executePersonalBff(_0x41c599,_0x9f1c82,_0x362998){const _0x3c14ed=a103_0x454103,_0x4b03b1=await apiRequest(_0x3c14ed(0x1fc)+_0x41c599+_0x3c14ed(0x21e)+encodeURIComponent(_0x9f1c82),{'method':_0x3c14ed(0x23c),'body':_0x362998});return _0x4b03b1[_0x3c14ed(0x23b)];}export async function listPersonalKnowledgeBaseItems(_0x318f81){const _0x11b9b5=a103_0x454103,_0x3d48a9=await apiRequest(_0x11b9b5(0x215)+encodeURIComponent(_0x318f81),{'domain':'kb'});return Array['isArray'](_0x3d48a9['data'])?_0x3d48a9[_0x11b9b5(0x23b)]:[];}export async function getPersonalKnowledgeBaseItem(_0x221189,_0x341d85){const _0x298492=a103_0x454103,_0x423214=await apiRequest(_0x298492(0x223)+_0x221189+_0x298492(0x17b)+encodeURIComponent(_0x341d85),{'domain':'kb'});if(!_0x423214[_0x298492(0x23b)])throw CliErrors[_0x298492(0x1f2)]('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0x221189);return _0x423214[_0x298492(0x23b)];}export async function createPersonalKnowledgeBaseItem(_0x2c556b,_0x16a702){const _0xd8944c=a103_0x454103,_0x36b926=await apiRequest('/client/knowledge-base/personal/create',{'method':_0xd8944c(0x23c),'body':{'appCode':_0x2c556b,..._0x16a702},'domain':'kb'});return _0x36b926['data'];}export async function updatePersonalKnowledgeBaseItem(_0x4ddbdc,_0x266981,_0x4bfade){const _0x3f0e1e=a103_0x454103,_0x30e3e5=await apiRequest(_0x3f0e1e(0x223)+_0x4ddbdc+_0x3f0e1e(0x1a2),{'method':'POST','body':{'appCode':_0x266981,..._0x4bfade},'domain':'kb'});return _0x30e3e5[_0x3f0e1e(0x23b)];}export async function getRuntimeSkillByCode(_0x3d40b1,_0x35f3dd){const _0x4bf513=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x3d40b1)+'/'+encodeURIComponent(_0x35f3dd),{'allowNotFound':!![]});return _0x4bf513?skillHubRuntimeDetailToRuntimeSkill(_0x4bf513):undefined;}export async function listRuntimeSkills(_0xd0cf11){const _0x521382=a103_0x454103,_0x1f06ea=await skillHubJsonRequest(_0x521382(0x19d)+encodeURIComponent(_0xd0cf11[_0x521382(0x17d)])+_0x521382(0x219),{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0xd0cf11[_0x521382(0x17d)],_0x1f06ea,_0xd0cf11[_0x521382(0x234)]??_0x521382(0x1f7),_0xd0cf11[_0x521382(0x1e4)]);}export async function listPersonalRuntimeSkills(_0x2d3031){const _0x414c20=a103_0x454103;return(await listRuntimeSkills({'appCode':_0x2d3031,'scope':'personal'}))[_0x414c20(0x1fd)];}export async function listCompanyRuntimeSkills(_0x22c193){const _0x3c7668=a103_0x454103;return(await listRuntimeSkills({'appCode':_0x22c193,'scope':_0x3c7668(0x1d8)}))['company'];}export async function listVisibleRuntimeSkills(_0x10746d){const _0x54240d=a103_0x454103;return(await listRuntimeSkills({'appCode':_0x10746d,'scope':_0x54240d(0x1f7)}))[_0x54240d(0x187)];}export async function createPersonalRuntimeSkill(_0x144a8b,_0x313506,_0x2afe4f={}){const _0x59c551=a103_0x454103;return publishRuntimeSkill(_0x144a8b,_0x313506,{'visibility':_0x59c551(0x22a),'confirmWarnings':_0x2afe4f[_0x59c551(0x19c)]});}export async function updatePersonalRuntimeSkill(_0x1dfca4,_0x4c30cc,_0x49e745,_0x1d7d35={}){const _0x290dc0=a103_0x454103;return publishRuntimeSkill(_0x4c30cc,{..._0x49e745,'skillCode':_0x49e745[_0x290dc0(0x1e7)]??_0x1dfca4},{'visibility':_0x290dc0(0x22a),'confirmWarnings':_0x1d7d35[_0x290dc0(0x19c)]});}export async function publishCompanyRuntimeSkill(_0x465fca,_0x1ccf51,_0x361b17={}){const _0x37a694=a103_0x454103;return publishRuntimeSkill(_0x465fca,_0x1ccf51,{'visibility':_0x37a694(0x1a0),'confirmWarnings':_0x361b17['confirmWarnings']});}export async function validateRuntimeSkillPublish(_0x7b843b,_0x5eb5d4,_0x53c97b){const _0x229a87=a103_0x454103,_0xd0fc93=buildRuntimeSkillPublishForm(_0x5eb5d4,_0x53c97b['visibility']),_0x9bd959=await skillHubJsonRequest(_0x229a87(0x1c4)+encodeURIComponent(_0x7b843b)+_0x229a87(0x1e1),{'method':_0x229a87(0x23c),'body':_0xd0fc93});return assertJointDiagramAcknowledged(_0x5eb5d4[_0x229a87(0x1b2)],_0x9bd959[_0x229a87(0x22b)],_0x229a87(0x1f2)),{'valid':_0x9bd959[_0x229a87(0x17a)]===!![],'errors':Array['isArray'](_0x9bd959[_0x229a87(0x1bf)])?_0x9bd959[_0x229a87(0x1bf)]:[],'warnings':Array[_0x229a87(0x220)](_0x9bd959[_0x229a87(0x216)])?_0x9bd959[_0x229a87(0x216)]:[],'resolvedSlug':_0x9bd959['resolvedSlug'],'resolvedVersion':_0x9bd959[_0x229a87(0x188)],'diagramValidated':_0x9bd959[_0x229a87(0x22b)]===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x5b535e,_0x33e98d,_0x4d001d,_0x4253a5,_0x4f68d5){const _0x5893bb=a103_0x454103;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x5b535e,_0x33e98d,_0x4d001d,'/validate'),{'method':_0x5893bb(0x23c),'query':{'scope':_0x4253a5},'headers':{'Content-Type':'application/json'},'body':JSON[_0x5893bb(0x185)](_0x4f68d5)});}export async function putRuntimeSkillVersionDiagram(_0x19938e,_0x458702,_0x3f7e67,_0x1e146a,_0x4f3869){const _0x2a3793=a103_0x454103;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x19938e,_0x458702,_0x3f7e67),{'method':_0x2a3793(0x1fa),'query':{'scope':_0x1e146a},'headers':{'Content-Type':_0x2a3793(0x1de)},'body':JSON['stringify'](_0x4f3869)});}export async function getRuntimeSkillVersionDiagram(_0x55b130,_0x10b6c9,_0x1b8aca,_0x5b3a68){const _0x4a58c4=a103_0x454103,_0x21fd4c=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x55b130,_0x10b6c9,_0x1b8aca),{'query':{'scope':_0x5b3a68}});if(typeof _0x21fd4c[_0x4a58c4(0x1f9)]!==_0x4a58c4(0x191))throw CliErrors['apiError'](_0x4a58c4(0x222));const _0x39ac96=_0x21fd4c[_0x4a58c4(0x1f0)];if(typeof _0x39ac96!==_0x4a58c4(0x178)||!/^sha256:[0-9a-f]{64}$/[_0x4a58c4(0x229)](_0x39ac96))throw CliErrors[_0x4a58c4(0x1ba)](_0x4a58c4(0x1b3),_0x4a58c4(0x218));const _0x5a6f1b=_0x21fd4c[_0x4a58c4(0x239)];if(_0x21fd4c['found']&&(!Number[_0x4a58c4(0x1d6)](_0x5a6f1b)||Number(_0x5a6f1b)<0x1))throw CliErrors['apiError'](_0x4a58c4(0x195));if(!_0x21fd4c[_0x4a58c4(0x1f9)]&&_0x5a6f1b!==undefined&&_0x5a6f1b!==null)throw CliErrors[_0x4a58c4(0x1ba)](_0x4a58c4(0x179));const _0x34c42b=_0x21fd4c[_0x4a58c4(0x1f9)]?Number(_0x5a6f1b):null;return{..._0x21fd4c,'sourceFingerprint':_0x39ac96,'diagramRevision':_0x34c42b,'expectedDiagramRevision':_0x34c42b??0x0};}export async function downloadRuntimeSkillPackage(_0x4da590,_0x5a0416,_0x5d3ec4,_0x15a776){const _0x50831a=a103_0x454103;void _0x4da590;const _0x576c0a=_0x15a776?_0x50831a(0x1c4)+encodeURIComponent(_0x5d3ec4)+'/'+encodeURIComponent(_0x5a0416)+_0x50831a(0x22f)+encodeURIComponent(_0x15a776)+_0x50831a(0x19b):_0x50831a(0x1c4)+encodeURIComponent(_0x5d3ec4)+'/'+encodeURIComponent(_0x5a0416)+'/download';return skillHubBinaryRequest(_0x576c0a);}async function publishRuntimeSkill(_0xe056c3,_0x2b1849,_0x3a2584){const _0x3c80ee=a103_0x454103,_0x47ccaa=buildRuntimeSkillPublishForm(_0x2b1849,_0x3a2584[_0x3c80ee(0x189)]),_0x2c3622=await skillHubJsonRequest(_0x3c80ee(0x1c4)+encodeURIComponent(_0xe056c3)+_0x3c80ee(0x18e),{'method':'POST','query':{'confirmWarnings':_0x3a2584[_0x3c80ee(0x19c)]===!![]?!![]:undefined},'body':_0x47ccaa});return assertJointDiagramAcknowledged(_0x2b1849[_0x3c80ee(0x1b2)],_0x2c3622[_0x3c80ee(0x22c)],_0x3c80ee(0x225)),{'appCode':_0x2c3622['namespace']??_0xe056c3,'skillCode':_0x2c3622[_0x3c80ee(0x1b6)]??_0x2b1849[_0x3c80ee(0x1e7)]??'','skillName':_0x2b1849[_0x3c80ee(0x22d)]??_0x2c3622['slug']??_0x2b1849[_0x3c80ee(0x1e7)],'description':_0x2b1849[_0x3c80ee(0x1fe)],'scope':skillHubVisibilityToScope(_0x2c3622['visibility']??_0x3a2584['visibility'])??_0x3c80ee(0x1fd),'version':_0x2c3622[_0x3c80ee(0x1c8)]??_0x2b1849[_0x3c80ee(0x1c8)],'tags':_0x2b1849['tags'],'content':_0x2b1849['content'],'diagramBound':_0x2c3622[_0x3c80ee(0x22c)]===!![]};}function assertJointDiagramAcknowledged(_0xdf215a,_0x4c0294,_0x5a8e37){const _0xb45f7a=a103_0x454103;if(!_0xdf215a||_0x4c0294===!![])return;throw CliErrors[_0xb45f7a(0x1ba)](_0xb45f7a(0x1be)+_0x5a8e37+'.',_0xb45f7a(0x212));}function buildRuntimeSkillPublishForm(_0x4bddd3,_0x4bfd30){const _0x2d6fa3=a103_0x454103,_0xfaaef6=new FormData();return _0xfaaef6['set'](_0x2d6fa3(0x190),runtimeSkillPackageFile(_0x4bddd3)),_0x4bddd3[_0x2d6fa3(0x22d)]?.[_0x2d6fa3(0x1d5)]()&&_0xfaaef6[_0x2d6fa3(0x21c)](_0x2d6fa3(0x21f),_0x4bddd3[_0x2d6fa3(0x22d)]['trim']()),_0xfaaef6[_0x2d6fa3(0x21c)]('visibility',_0x4bfd30),_0x4bddd3[_0x2d6fa3(0x1b2)]&&_0xfaaef6['set'](_0x2d6fa3(0x1b2),new Blob([JSON[_0x2d6fa3(0x185)](_0x4bddd3[_0x2d6fa3(0x1b2)])],{'type':_0x2d6fa3(0x1de)})),_0xfaaef6;}function runtimeSkillVersionDiagramPath(_0x154b8c,_0x1ca366,_0x3d32bf,_0x154765=''){const _0x373450=a103_0x454103;return _0x373450(0x1c4)+encodeURIComponent(_0x154b8c)+'/'+encodeURIComponent(_0x1ca366)+_0x373450(0x22f)+encodeURIComponent(_0x3d32bf)+'/diagram'+_0x154765;}function runtimeSkillPackageFile(_0x12cebb){const _0x2aa388=a103_0x454103;if(!_0x12cebb[_0x2aa388(0x204)])throw CliErrors[_0x2aa388(0x1f2)]('Missing\x20Skill\x20package\x20payload.');const _0x5d1d0b=Buffer['from'](_0x12cebb[_0x2aa388(0x204)],_0x2aa388(0x17f)),_0xe39c0e=new Blob([_0x5d1d0b],{'type':'application/zip'}),_0x576bcf=(_0x12cebb[_0x2aa388(0x1e7)]||_0x2aa388(0x1a7))+_0x2aa388(0x1aa);if(typeof File!==_0x2aa388(0x1bc))return new File([_0xe39c0e],_0x576bcf,{'type':'application/zip'});return _0xe39c0e;}function normalizeSkillHubRuntimeListResponse(_0xcd883f,_0x2dfe4e,_0x547646,_0x4728ff){const _0x3b8ce7=a103_0x454103,_0x5e568c=Array[_0x3b8ce7(0x220)](_0x2dfe4e)?_0x2dfe4e:Array['isArray'](_0x2dfe4e?.[_0x3b8ce7(0x1cf)])?_0x2dfe4e[_0x3b8ce7(0x1cf)]:[],_0x398a8b=_0x4728ff?.['trim'](),_0x5b9e13=_0x5e568c[_0x3b8ce7(0x196)](_0x5920a9=>!_0x398a8b||_0x5920a9[_0x3b8ce7(0x1b6)]===_0x398a8b)[_0x3b8ce7(0x1a3)](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x1106ec=>Boolean(_0x1106ec)),_0x414651=_0x5b9e13['filter'](_0x462875=>_0x462875[_0x3b8ce7(0x234)]===_0x3b8ce7(0x1fd)),_0xfb84c4=_0x5b9e13[_0x3b8ce7(0x196)](_0x1e9fd6=>_0x1e9fd6[_0x3b8ce7(0x234)]==='company');return{'appCode':_0xcd883f,'personal':_0x547646===_0x3b8ce7(0x1d8)?[]:_0x414651,'company':_0x547646===_0x3b8ce7(0x1fd)?[]:_0xfb84c4,'effective':buildEffectiveRuntimeSkills(_0x414651,_0xfb84c4,_0x547646)};}function skillHubRuntimeItemToRuntimeSkill(_0x5c0aa9){const _0x647bab=a103_0x454103,_0x3f8576=_0x5c0aa9[_0x647bab(0x1b6)]?.[_0x647bab(0x1d5)](),_0xe5e479=skillHubVisibilityToScope(_0x5c0aa9[_0x647bab(0x189)]);if(!_0x3f8576||!_0xe5e479)return undefined;return{'id':_0x5c0aa9['id'],'appCode':_0x5c0aa9[_0x647bab(0x1b7)],'skillCode':_0x3f8576,'skillName':_0x5c0aa9['displayName']??_0x3f8576,'description':_0x5c0aa9[_0x647bab(0x1b0)],'example':_0x5c0aa9['example'],'scope':_0xe5e479,'version':skillHubRuntimeItemVersion(_0x5c0aa9),'status':_0x5c0aa9[_0x647bab(0x203)]};}function skillHubRuntimeDetailToRuntimeSkill(_0x429535){const _0x4b4a36=a103_0x454103,_0x47d9ec=_0x429535[_0x4b4a36(0x1b6)]?.[_0x4b4a36(0x1d5)]();if(!_0x47d9ec)return undefined;return{'id':_0x429535['id'],'appCode':_0x429535[_0x4b4a36(0x1b7)],'skillCode':_0x47d9ec,'skillName':_0x429535['displayName']??_0x47d9ec,'description':_0x429535['summary'],'example':_0x429535[_0x4b4a36(0x1dc)],'scope':skillHubVisibilityToScope(_0x429535[_0x4b4a36(0x189)])??_0x429535[_0x4b4a36(0x189)]?.[_0x4b4a36(0x1ce)](),'version':skillHubRuntimeItemVersion(_0x429535),'status':_0x429535[_0x4b4a36(0x203)]};}function skillHubVisibilityToScope(_0x535264){const _0x3cb625=a103_0x454103;if(_0x535264===_0x3cb625(0x22a))return _0x3cb625(0x1fd);if(_0x535264===_0x3cb625(0x1a0))return _0x3cb625(0x1d8);return undefined;}function skillHubRuntimeItemVersion(_0x189ed9){const _0x1177fb=a103_0x454103;return _0x189ed9[_0x1177fb(0x1ee)]?.[_0x1177fb(0x1c8)]??_0x189ed9['headlineVersion']?.[_0x1177fb(0x1c8)]??_0x189ed9[_0x1177fb(0x1d2)]?.[_0x1177fb(0x1c8)];}function buildEffectiveRuntimeSkills(_0x2b5650,_0x37c734,_0x3c6b5f){const _0x1401ef=a103_0x454103;if(_0x3c6b5f===_0x1401ef(0x1fd))return _0x2b5650;if(_0x3c6b5f===_0x1401ef(0x1d8))return _0x37c734;const _0x4ffadd=new Map();for(const _0x273bd3 of _0x37c734){_0x4ffadd[_0x1401ef(0x21c)](_0x273bd3[_0x1401ef(0x1e7)],_0x273bd3);}for(const _0x1f5a94 of _0x2b5650){_0x4ffadd[_0x1401ef(0x21c)](_0x1f5a94[_0x1401ef(0x1e7)],_0x1f5a94);}return Array[_0x1401ef(0x224)](_0x4ffadd[_0x1401ef(0x1f1)]());}function normalizeRuntimeSkillListResponse(_0x2f467b,_0x5ead51){const _0xf44835=a103_0x454103;if(Array[_0xf44835(0x220)](_0x5ead51)){const _0x1e2b19=_0x5ead51['filter'](_0x287d95=>_0x287d95[_0xf44835(0x234)]===_0xf44835(0x1fd)),_0x1044d3=_0x5ead51['filter'](_0xa254ef=>_0xa254ef[_0xf44835(0x234)]===_0xf44835(0x1d8));return{'appCode':_0x2f467b,'personal':_0x1e2b19,'company':_0x1044d3,'effective':[..._0x1044d3,..._0x1e2b19]};}return{'appCode':_0x5ead51?.[_0xf44835(0x17d)]??_0x2f467b,'personal':Array[_0xf44835(0x220)](_0x5ead51?.[_0xf44835(0x1fd)])?_0x5ead51[_0xf44835(0x1fd)]:[],'company':Array[_0xf44835(0x220)](_0x5ead51?.[_0xf44835(0x1d8)])?_0x5ead51[_0xf44835(0x1d8)]:[],'effective':Array[_0xf44835(0x220)](_0x5ead51?.[_0xf44835(0x187)])?_0x5ead51[_0xf44835(0x187)]:[]};}export async function listRuntimeAppRoles(_0x55f4bc,_0x284772={}){const _0x4f5a02=a103_0x454103,_0x31107b=_0x284772[_0x4f5a02(0x20b)]??0x1,_0x39452f=Math[_0x4f5a02(0x1a9)](Math['max'](_0x284772[_0x4f5a02(0x1c3)]??0x64,0x1),0x64),_0x17d28a=await apiRequest(_0x4f5a02(0x20f),{'method':_0x4f5a02(0x23c),'body':{'appCode':_0x55f4bc,..._0x284772[_0x4f5a02(0x1af)]?{'roleName':_0x284772[_0x4f5a02(0x1af)]}:{},'currentPage':_0x31107b,'pageSize':_0x39452f}});return{'items':extractList(_0x17d28a['data']),'paging':extractPaging(_0x17d28a['data'])};}export async function createRuntimeAppRole(_0x2b9d16){const _0x5eb3da=a103_0x454103,_0x5ddd6a=await apiRequest(_0x5eb3da(0x231),{'method':_0x5eb3da(0x23c),'body':{'roleType':_0x5eb3da(0x1f6),..._0x2b9d16}});return _0x5ddd6a[_0x5eb3da(0x23b)];}export async function updateRuntimeAppRole(_0x4a3b9c){const _0x181af7=a103_0x454103,_0x5354f7=await apiRequest(_0x181af7(0x1db),{'method':_0x181af7(0x23c),'body':_0x4a3b9c});return _0x5354f7[_0x181af7(0x23b)];}export async function deleteRuntimeAppRole(_0x57193){const _0x233be8=a103_0x454103,_0x4fba0e=await apiRequest(_0x233be8(0x21b),{'method':'POST','body':{'id':_0x57193}});return _0x4fba0e[_0x233be8(0x23b)];}export async function listRuntimeRoleUsers(_0xd4bb79){const _0x464981=a103_0x454103,_0x3786ee=await apiRequest(_0x464981(0x1c2),{'method':_0x464981(0x23c),'body':{'appCode':_0xd4bb79}});return extractList(_0x3786ee['data']);}export async function updateRuntimeRoleUsers(_0x3c04ef,_0x3b4f23){const _0x3741b0=a103_0x454103,_0xade1e3=await apiRequest(_0x3741b0(0x202),{'method':'POST','body':{'appCode':_0x3c04ef,'roleList':_0x3b4f23}});return _0xade1e3[_0x3741b0(0x23b)];}export async function listRuntimeAppUsers(_0xe6ede3){const _0x2ab2b2=a103_0x454103,_0x38badc=await apiRequest(_0x2ab2b2(0x221)+runtimePermitQuery({'appCode':_0xe6ede3}));return extractList(_0x38badc[_0x2ab2b2(0x23b)]);}function runtimePermitQuery(_0x28aacf){const _0x1ef523=a103_0x454103,_0x40820e=new URLSearchParams();for(const [_0x1ccdd6,_0x5305c0]of Object['entries'](_0x28aacf))_0x40820e[_0x1ef523(0x21c)](_0x1ccdd6,String(_0x5305c0));return'?'+_0x40820e['toString']();}export async function listRuntimePermitRoles(_0x21d98a,_0x111fb4={}){const _0x442a97=a103_0x454103,_0x533fc4=await apiRequest(_0x442a97(0x1e2),{'method':'POST','body':{'appCode':_0x21d98a,..._0x111fb4}});return extractList(_0x533fc4[_0x442a97(0x23b)]);}export async function getRuntimePagePermit(_0x514b66){const _0x424349=a103_0x454103,_0x42d95c=await apiRequest(_0x424349(0x20d)+runtimePermitQuery({'menuId':_0x514b66}));return _0x42d95c['data'];}export async function saveRuntimePagePermit(_0x10b484){const _0x560f64=a103_0x454103,_0x26933b=await apiRequest(_0x560f64(0x201),{'method':_0x560f64(0x23c),'body':_0x10b484});return _0x26933b[_0x560f64(0x23b)];}export async function getRuntimeRoleMenuResources(_0xb2fca5,_0x5b20c4){const _0x5442ba=a103_0x454103,_0x3f93eb=await apiRequest('/client/permit/resource/get-menu-list',{'method':_0x5442ba(0x23c),'body':{'appCode':_0xb2fca5,'roleId':_0x5b20c4}});return extractList(_0x3f93eb[_0x5442ba(0x23b)]);}export async function listRuntimeMenuRolePermits(_0x424ce8){const _0x4abe69=a103_0x454103,_0x3d9411=await apiRequest(_0x4abe69(0x1f5)+runtimePermitQuery({'appCode':_0x424ce8}));return Array['isArray'](_0x3d9411[_0x4abe69(0x23b)]?.['permitList'])?_0x3d9411[_0x4abe69(0x23b)][_0x4abe69(0x205)]:[];}export async function saveRuntimeMenuRolePermits(_0x2cd53b,_0x3a881e){const _0x1908c7=a103_0x454103,_0x3a04b7=await apiRequest(_0x1908c7(0x217),{'method':_0x1908c7(0x23c),'body':{'appCode':_0x2cd53b,'permitList':_0x3a881e}});return _0x3a04b7[_0x1908c7(0x23b)];}export async function listRuntimeDatasetPermits(_0x7aa03e,_0x1fb838){const _0x3a1d6d=a103_0x454103,_0x211be2=await apiRequest(_0x3a1d6d(0x1a4)+runtimePermitQuery({'appCode':_0x7aa03e,'roleId':_0x1fb838}));return Array[_0x3a1d6d(0x220)](_0x211be2[_0x3a1d6d(0x23b)]?.[_0x3a1d6d(0x205)])?_0x211be2[_0x3a1d6d(0x23b)]['permitList']:[];}export async function listRuntimeDatasetRolePermits(_0x2fd7f6){const _0x3b33f2=a103_0x454103,_0x2a660f=await apiRequest('/client/permit/dataset/permit-list'+runtimePermitQuery({'appCode':_0x2fd7f6}));return Array[_0x3b33f2(0x220)](_0x2a660f[_0x3b33f2(0x23b)]?.[_0x3b33f2(0x205)])?_0x2a660f[_0x3b33f2(0x23b)][_0x3b33f2(0x205)]:[];}export async function saveRuntimeDatasetRolePermits(_0x54fc0c,_0x27891e){const _0xff3474=a103_0x454103,_0x306498=await apiRequest(_0xff3474(0x233),{'method':_0xff3474(0x23c),'body':{'appCode':_0x54fc0c,'permitList':_0x27891e}});return _0x306498['data'];}
|
|
1
|
+
const a103_0x34bfe5=a103_0x15d2;(function(_0xaf14dd,_0x4432a6){const _0x129ccd=a103_0x15d2,_0x120b2e=_0xaf14dd();while(!![]){try{const _0x3a3fac=-parseInt(_0x129ccd(0x184))/0x1*(-parseInt(_0x129ccd(0x10e))/0x2)+parseInt(_0x129ccd(0x132))/0x3+parseInt(_0x129ccd(0xf3))/0x4+parseInt(_0x129ccd(0x125))/0x5*(-parseInt(_0x129ccd(0x162))/0x6)+-parseInt(_0x129ccd(0x193))/0x7*(-parseInt(_0x129ccd(0xfd))/0x8)+-parseInt(_0x129ccd(0x168))/0x9*(parseInt(_0x129ccd(0xe8))/0xa)+parseInt(_0x129ccd(0x185))/0xb;if(_0x3a3fac===_0x4432a6)break;else _0x120b2e['push'](_0x120b2e['shift']());}catch(_0x340fed){_0x120b2e['push'](_0x120b2e['shift']());}}}(a103_0x394c,0xd3642));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getApiDomain,getRuntimeDomain,getSkillDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';import{extractList,extractPaging}from'../framework/response.js';import{parseLosslessJson}from'../utils/lossless-json.js';let _activeAK;export function setActiveAK(_0x526871){_activeAK=_0x526871||undefined;}export function clearActiveAK(){_activeAK=undefined;}function firstString(..._0x5b57b8){const _0xc0550f=a103_0x15d2;for(const _0x271e24 of _0x5b57b8){if(typeof _0x271e24==='string'&&_0x271e24[_0xc0550f(0x11f)]())return _0x271e24[_0xc0550f(0x11f)]();}return undefined;}async function decodeResponseBody(_0x212ce0){const _0x538acd=a103_0x15d2;if(typeof _0x212ce0[_0x538acd(0x14c)]==='function')try{const _0x2e1a91=await _0x212ce0['text']();try{return{'isJson':!![],'data':parseLosslessJson(_0x2e1a91),'text':_0x2e1a91};}catch{return{'isJson':![],'text':_0x2e1a91['trim']()||undefined};}}catch{}try{return{'isJson':!![],'data':await _0x212ce0[_0x538acd(0x16c)]()};}catch{return{'isJson':![]};}}function throwIfRateLimited(_0x14f727,_0xd448c4,_0x4aa32f){const _0x5072f8=a103_0x15d2,_0x22dca2=_0xd448c4&&typeof _0xd448c4===_0x5072f8(0xd6)?_0xd448c4:{},_0x576c07=[_0x22dca2['status'],_0x22dca2['code']]['find'](_0x4b64af=>Number(_0x4b64af)===0x1ad),_0x3ba471=createRateLimitError({'status':_0x14f727['status']===0x1ad?_0x14f727[_0x5072f8(0x140)]:_0x576c07??_0x14f727[_0x5072f8(0x140)],'errorCode':firstString(_0x22dca2[_0x5072f8(0x156)],typeof _0x22dca2[_0x5072f8(0x139)]===_0x5072f8(0xe6)?_0x22dca2[_0x5072f8(0x139)]:undefined),'message':firstString(_0x22dca2[_0x5072f8(0x109)],_0x22dca2[_0x5072f8(0xdd)],_0x22dca2['msg'],_0x4aa32f),'retryAfter':readRetryAfter(_0x14f727[_0x5072f8(0xd5)])??readRetryAfterSeconds(_0xd448c4)});if(_0x3ba471)throw _0x3ba471;}async function apiRequest(_0x54c193,_0x4acd08={}){const _0x43f98d=a103_0x15d2,{method:method=_0x43f98d(0x138),body:_0x2cadba,headers:headers={},timeout:timeout=0x7530,domain:domain=_0x43f98d(0x12a)}=_0x4acd08,_0x33be0a=_activeAK,_0xa6a130=domain===_0x43f98d(0xea)?getApiDomain():getRuntimeDomain();if(!_0x33be0a)throw CliErrors['authRequired']('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x43f98d(0x13d)]+'.');const _0x5d4d0a=''+_0xa6a130+_0x54c193,_0x8cf6ef={'X-User-AK':_0x33be0a},_0xbef34=new AbortController(),_0x2f793a=setTimeout(()=>_0xbef34[_0x43f98d(0x171)](),timeout);try{const _0x507ba5=await fetch(_0x5d4d0a,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x43f98d(0x17a)],..._0x8cf6ef,...headers},'body':_0x2cadba?JSON[_0x43f98d(0x114)](_0x2cadba):undefined,'signal':_0xbef34['signal']}),_0x25af95=await decodeResponseBody(_0x507ba5);if(!_0x25af95[_0x43f98d(0x135)]){throwIfRateLimited(_0x507ba5,undefined,_0x25af95[_0x43f98d(0x14c)]);throw CliErrors[_0x43f98d(0x190)](_0x43f98d(0x10f)+_0x507ba5[_0x43f98d(0x140)]+')',_0x507ba5[_0x43f98d(0x140)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}const _0x46091d=_0x25af95['data'];throwIfRateLimited(_0x507ba5,_0x46091d);if(!_0x507ba5['ok']||_0x46091d['success']===![])throw CliErrors[_0x43f98d(0x190)](_0x46091d['errorMsg']||_0x46091d[_0x43f98d(0xdd)]||_0x43f98d(0xf2)+_0x507ba5[_0x43f98d(0x140)],_0x46091d[_0x43f98d(0x156)]?_0x43f98d(0x18a)+_0x46091d['errorCode']:undefined);return _0x46091d;}catch(_0x1abb19){if(_0x1abb19 instanceof Error&&_0x1abb19['name']===_0x43f98d(0x108))throw CliErrors[_0x43f98d(0x190)]('Request\x20timeout:\x20'+_0x5d4d0a);throw _0x1abb19;}finally{clearTimeout(_0x2f793a);}}async function apiBinaryRequest(_0x6bc5a0,_0x1d2d2b={}){const _0x10fa53=a103_0x15d2,{method:method='GET',headers:headers={},timeout:timeout=0x7530}=_0x1d2d2b,_0x271ee9=_activeAK,_0x4e22fd=getRuntimeDomain();if(!_0x271ee9)throw CliErrors[_0x10fa53(0x100)](_0x10fa53(0x12f)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x4184df=''+_0x4e22fd+_0x6bc5a0,_0xfe0d54=new AbortController(),_0x3fbf76=setTimeout(()=>_0xfe0d54[_0x10fa53(0x171)](),timeout);try{const _0x50d996=await fetch(_0x4184df,{'method':method,'headers':{'X-Invoke-Source':PRODUCT_CONFIG[_0x10fa53(0x17a)],'X-User-AK':_0x271ee9,...headers},'signal':_0xfe0d54[_0x10fa53(0x159)]});if(!_0x50d996['ok']){const _0x194718=await decodeResponseBody(_0x50d996),_0x5f05e3=_0x194718[_0x10fa53(0xe0)]&&typeof _0x194718[_0x10fa53(0xe0)]===_0x10fa53(0xd6)?_0x194718['data']:{},_0x1a1e7e=firstString(_0x5f05e3[_0x10fa53(0x109)],_0x5f05e3['message'],_0x5f05e3[_0x10fa53(0x156)],_0x194718[_0x10fa53(0x14c)]);throwIfRateLimited(_0x50d996,_0x194718[_0x10fa53(0xe0)],_0x1a1e7e);throw CliErrors['apiError'](_0x1a1e7e||'API\x20error:\x20'+_0x50d996[_0x10fa53(0x140)],'Download\x20failed:\x20'+_0x4184df);}return Buffer['from'](await _0x50d996[_0x10fa53(0x189)]());}catch(_0x3b7956){if(_0x3b7956 instanceof Error&&_0x3b7956[_0x10fa53(0xdf)]==='AbortError')throw CliErrors[_0x10fa53(0x190)](_0x10fa53(0x11a)+_0x4184df);throw _0x3b7956;}finally{clearTimeout(_0x3fbf76);}}async function apiFormRequest(_0x528087,_0x510839,_0xc82bc7={}){const _0x4e267b=a103_0x15d2,{timeout:timeout=0x7530}=_0xc82bc7,_0x48a136=_activeAK,_0xc1d20a=getRuntimeDomain();if(!_0x48a136)throw CliErrors['authRequired'](_0x4e267b(0x12f)+PRODUCT_CONFIG[_0x4e267b(0x13d)]+'.');const _0x2c7187=''+_0xc1d20a+_0x528087,_0x499251=new AbortController(),_0x2d6142=setTimeout(()=>_0x499251[_0x4e267b(0x171)](),timeout);try{const _0xf3d2a2=await fetch(_0x2c7187,{'method':'POST','headers':{'X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],'X-User-AK':_0x48a136},'body':_0x510839,'signal':_0x499251[_0x4e267b(0x159)]}),_0x540c2e=await decodeResponseBody(_0xf3d2a2);if(!_0x540c2e[_0x4e267b(0x135)]){throwIfRateLimited(_0xf3d2a2,undefined,_0x540c2e['text']);throw CliErrors['apiError']('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0xf3d2a2[_0x4e267b(0x140)]+')',_0xf3d2a2['status']>=0x190?_0x4e267b(0x13a):undefined);}const _0xe5f8db=_0x540c2e[_0x4e267b(0xe0)];throwIfRateLimited(_0xf3d2a2,_0xe5f8db);if(!_0xf3d2a2['ok']||_0xe5f8db[_0x4e267b(0x111)]===![])throw CliErrors[_0x4e267b(0x190)](_0xe5f8db[_0x4e267b(0x109)]||_0xe5f8db[_0x4e267b(0xdd)]||_0x4e267b(0xf2)+_0xf3d2a2[_0x4e267b(0x140)],_0xe5f8db[_0x4e267b(0x156)]?_0x4e267b(0x18a)+_0xe5f8db[_0x4e267b(0x156)]:undefined);return _0xe5f8db;}catch(_0x27f505){if(_0x27f505 instanceof Error&&_0x27f505[_0x4e267b(0xdf)]===_0x4e267b(0x108))throw CliErrors[_0x4e267b(0x190)](_0x4e267b(0x11a)+_0x2c7187);throw _0x27f505;}finally{clearTimeout(_0x2d6142);}}async function toolboxRequest(_0x2d5065,_0x1c9604,_0x329ae1={}){const _0x2fb1fd=a103_0x15d2,{method:method=_0x2fb1fd(0x138),headers:headers={},timeout:timeout=0x7530}=_0x329ae1,_0x56b1a7=_activeAK;if(!_0x56b1a7)throw CliErrors[_0x2fb1fd(0x100)](_0x2fb1fd(0x12f)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x4627d8=getApiDomain()[_0x2fb1fd(0x128)](/\/$/,''),_0x504f56=new URL(_0x2d5065,_0x4627d8+_0x2fb1fd(0x14e));if(_0x1c9604)for(const [_0x5cc76f,_0x535535]of Object['entries'](_0x1c9604)){_0x535535!==undefined&&_0x535535!==null&&_0x504f56['searchParams'][_0x2fb1fd(0xf1)](_0x5cc76f,String(_0x535535));}const _0x17913a=new AbortController(),_0x4c5a66=setTimeout(()=>_0x17913a[_0x2fb1fd(0x171)](),timeout);try{const _0x11c394=await fetch(_0x504f56,{'method':method,'headers':{'Content-Type':_0x2fb1fd(0xf4),'X-Invoke-Source':PRODUCT_CONFIG[_0x2fb1fd(0x17a)],'X-User-AK':_0x56b1a7,...headers},'signal':_0x17913a[_0x2fb1fd(0x159)]}),_0x55abee=await decodeResponseBody(_0x11c394);if(!_0x55abee['isJson']){throwIfRateLimited(_0x11c394,undefined,_0x55abee[_0x2fb1fd(0x14c)]);throw CliErrors[_0x2fb1fd(0x190)]('Toolbox\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x11c394[_0x2fb1fd(0x140)]+')',_0x11c394['status']>=0x190?_0x2fb1fd(0x13a):undefined);}const _0x4fada1=_0x55abee['data'];throwIfRateLimited(_0x11c394,_0x4fada1);if(!_0x11c394['ok']){const _0x15adc9=_0x4fada1&&typeof _0x4fada1===_0x2fb1fd(0xd6)?_0x4fada1:{};throw CliErrors[_0x2fb1fd(0x190)](_0x15adc9['errorMsg']||_0x15adc9['message']||'Toolbox\x20API\x20error:\x20'+_0x11c394[_0x2fb1fd(0x140)],_0x15adc9[_0x2fb1fd(0x156)]?_0x2fb1fd(0x12d)+_0x15adc9[_0x2fb1fd(0x156)]:undefined);}if(_0x4fada1&&typeof _0x4fada1===_0x2fb1fd(0xd6)&&_0x2fb1fd(0x111)in _0x4fada1&&typeof _0x4fada1[_0x2fb1fd(0x111)]===_0x2fb1fd(0xfe)){const _0x3142c3=_0x4fada1;if(!_0x3142c3[_0x2fb1fd(0x111)])throw CliErrors[_0x2fb1fd(0x190)](_0x3142c3[_0x2fb1fd(0x109)]||_0x3142c3['message']||'Toolbox\x20API\x20error',_0x3142c3[_0x2fb1fd(0x156)]?'Toolbox\x20error\x20code:\x20'+_0x3142c3[_0x2fb1fd(0x156)]:undefined);return _0x3142c3[_0x2fb1fd(0xe0)];}return _0x4fada1;}catch(_0x12540e){if(_0x12540e instanceof Error&&_0x12540e[_0x2fb1fd(0xdf)]===_0x2fb1fd(0x108))throw CliErrors[_0x2fb1fd(0x190)](_0x2fb1fd(0x11a)+_0x504f56[_0x2fb1fd(0x175)]());throw _0x12540e;}finally{clearTimeout(_0x4c5a66);}}async function skillHubJsonRequest(_0x5873a0,_0x5335e5={}){const _0x45713a=a103_0x15d2,{method:method=_0x45713a(0x138),query:_0x29131c,body:_0x4839e6,headers:headers={},timeout:timeout=0x7530,allowNotFound:allowNotFound=![]}=_0x5335e5,_0x5de968=_activeAK;if(!_0x5de968)throw CliErrors[_0x45713a(0x100)](_0x45713a(0x12f)+PRODUCT_CONFIG[_0x45713a(0x13d)]+'.');const _0x5a4520=getSkillDomain()[_0x45713a(0x128)](/\/$/,''),_0x1ee345=new URL(_0x5873a0,_0x5a4520+'/');if(_0x29131c)for(const [_0x56ed24,_0xe38152]of Object[_0x45713a(0x121)](_0x29131c)){_0xe38152!==undefined&&_0xe38152!==null&&_0x1ee345[_0x45713a(0x14f)][_0x45713a(0xf1)](_0x56ed24,String(_0xe38152));}const _0x2f0a1d=new AbortController(),_0x3f7692=setTimeout(()=>_0x2f0a1d['abort'](),timeout);try{const _0x19c3b9=await fetch(_0x1ee345[_0x45713a(0x175)](),{'method':method,'headers':{'Accept':_0x45713a(0xf4),'X-Invoke-Source':PRODUCT_CONFIG[_0x45713a(0x17a)],'X-User-AK':_0x5de968,...headers},'body':_0x4839e6,'signal':_0x2f0a1d['signal']}),_0x1995e9=await decodeResponseBody(_0x19c3b9);if(!_0x1995e9['isJson']){if(allowNotFound&&_0x19c3b9['status']===0x194)return undefined;throwIfRateLimited(_0x19c3b9,undefined,_0x1995e9[_0x45713a(0x14c)]);throw CliErrors[_0x45713a(0x190)](_0x45713a(0x101)+_0x19c3b9[_0x45713a(0x140)]+')',_0x19c3b9[_0x45713a(0x140)]>=0x190?_0x45713a(0x13a):undefined);}const _0x5b13e5=_0x1995e9[_0x45713a(0xe0)];throwIfRateLimited(_0x19c3b9,_0x5b13e5);if(allowNotFound&&isSkillHubNotFoundResponse(_0x19c3b9[_0x45713a(0x140)],_0x5b13e5))return undefined;const _0x4df122=!_0x19c3b9['ok']||_0x5b13e5?.['success']===![]||typeof _0x5b13e5?.[_0x45713a(0x139)]==='number'&&_0x5b13e5[_0x45713a(0x139)]>=0x190;if(_0x4df122)throw CliErrors[_0x45713a(0x190)](_0x5b13e5?.[_0x45713a(0x109)]||_0x5b13e5?.[_0x45713a(0xdd)]||_0x5b13e5?.[_0x45713a(0x167)]||'SkillHub\x20API\x20error:\x20'+_0x19c3b9['status'],_0x5b13e5?.['errorCode']?_0x45713a(0x10a)+_0x5b13e5[_0x45713a(0x156)]:undefined);return _0x5b13e5?.[_0x45713a(0xe0)]??_0x5b13e5;}catch(_0x1beca4){if(_0x1beca4 instanceof Error&&_0x1beca4[_0x45713a(0xdf)]===_0x45713a(0x108))throw CliErrors[_0x45713a(0x190)](_0x45713a(0x11a)+_0x1ee345['toString']());throw _0x1beca4;}finally{clearTimeout(_0x3f7692);}}function isSkillHubNotFoundResponse(_0x285dd3,_0x2ea8f4){const _0x4a616c=a103_0x15d2;if(_0x285dd3===0x194||_0x2ea8f4?.[_0x4a616c(0x139)]===0x194)return!![];if(_0x285dd3!==0x190&&_0x2ea8f4?.[_0x4a616c(0x139)]!==0x190)return![];const _0x93ac28=[_0x2ea8f4?.[_0x4a616c(0x167)],_0x2ea8f4?.[_0x4a616c(0xdd)],_0x2ea8f4?.[_0x4a616c(0x109)],_0x2ea8f4?.[_0x4a616c(0x11c)]][_0x4a616c(0x150)](_0xcbdb59=>typeof _0xcbdb59===_0x4a616c(0xe6))[_0x4a616c(0x157)]('\x20');return/skill not found\b/i[_0x4a616c(0x15b)](_0x93ac28);}async function skillHubBinaryRequest(_0x2d21d6,_0x88ea2a={}){const _0x1d7c2b=a103_0x15d2,{query:_0x3d9458,headers:headers={},timeout:timeout=0x7530}=_0x88ea2a,_0x32c007=_activeAK;if(!_0x32c007)throw CliErrors['authRequired'](_0x1d7c2b(0x12f)+PRODUCT_CONFIG['newConfigFileName']+'.');const _0x5447af=getSkillDomain()[_0x1d7c2b(0x128)](/\/$/,''),_0x34e60c=new URL(_0x2d21d6,_0x5447af+'/');if(_0x3d9458)for(const [_0x20f5f9,_0x442106]of Object['entries'](_0x3d9458)){_0x442106!==undefined&&_0x442106!==null&&_0x34e60c[_0x1d7c2b(0x14f)][_0x1d7c2b(0xf1)](_0x20f5f9,String(_0x442106));}const _0x2d96d1=new AbortController(),_0x33fc36=setTimeout(()=>_0x2d96d1[_0x1d7c2b(0x171)](),timeout);try{const _0x2887ec=await fetch(_0x34e60c[_0x1d7c2b(0x175)](),{'method':_0x1d7c2b(0x138),'headers':{'Accept':_0x1d7c2b(0xe5),'X-Invoke-Source':PRODUCT_CONFIG[_0x1d7c2b(0x17a)],'X-User-AK':_0x32c007,...headers},'signal':_0x2d96d1[_0x1d7c2b(0x159)]});if(!_0x2887ec['ok']){const _0xb1216c=await decodeResponseBody(_0x2887ec),_0x4f53f3=_0xb1216c[_0x1d7c2b(0xe0)]&&typeof _0xb1216c['data']==='object'?_0xb1216c[_0x1d7c2b(0xe0)]:{},_0x4c0cb4=firstString(_0x4f53f3[_0x1d7c2b(0x109)],_0x4f53f3[_0x1d7c2b(0xdd)],_0x4f53f3[_0x1d7c2b(0x167)],_0x4f53f3[_0x1d7c2b(0x156)],_0xb1216c[_0x1d7c2b(0x14c)]);throwIfRateLimited(_0x2887ec,_0xb1216c[_0x1d7c2b(0xe0)],_0x4c0cb4);throw CliErrors[_0x1d7c2b(0x190)](_0x4c0cb4||_0x1d7c2b(0x176)+_0x2887ec['status'],_0x1d7c2b(0x17d)+_0x34e60c[_0x1d7c2b(0x175)]());}return Buffer[_0x1d7c2b(0xfc)](await _0x2887ec[_0x1d7c2b(0x189)]());}catch(_0x1f7c80){if(_0x1f7c80 instanceof Error&&_0x1f7c80[_0x1d7c2b(0xdf)]===_0x1d7c2b(0x108))throw CliErrors['apiError']('Request\x20timeout:\x20'+_0x34e60c[_0x1d7c2b(0x175)]());throw _0x1f7c80;}finally{clearTimeout(_0x33fc36);}}export async function getBffEndpointContract(_0x39ce36,_0x14df56){const _0x26a124=a103_0x15d2;if(_0x14df56===_0x26a124(0x14a))throw CliErrors[_0x26a124(0x165)]('Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x39ce36+_0x26a124(0x12e)+_0x14df56);const _0x5c21ec=await apiRequest(_0x26a124(0x10b)+encodeURIComponent(_0x39ce36)+'/'+encodeURIComponent(_0x14df56)),_0x576d6d=_0x5c21ec[_0x26a124(0xe0)];if(!_0x576d6d||typeof _0x576d6d!==_0x26a124(0xd6)||Array[_0x26a124(0x149)](_0x576d6d)||_0x576d6d['appCode']!==_0x39ce36||_0x576d6d[_0x26a124(0x181)]!==_0x14df56)throw CliErrors[_0x26a124(0x165)]('Backend\x20Function\x20not\x20found\x20or\x20inaccessible:\x20appCode='+_0x39ce36+',\x20name='+_0x14df56);return{'appCode':_0x576d6d['appCode'],'functionName':_0x576d6d[_0x26a124(0x181)],'description':_0x576d6d[_0x26a124(0x186)],'version':_0x576d6d[_0x26a124(0x141)],'gmtModified':_0x576d6d['gmtModified']};}export async function getSqlQueryInfo(_0x47e505,_0x7dcab1){const _0x1fb4cc=a103_0x15d2,_0xf84cc9=await apiRequest(_0x1fb4cc(0xde),{'method':_0x1fb4cc(0x182),'body':{'appCode':_0x47e505,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x7dcab1}}),_0x3535ba=_0xf84cc9[_0x1fb4cc(0xe0)],_0x52da38=_0x3535ba&&typeof _0x3535ba===_0x1fb4cc(0xd6)&&_0x1fb4cc(0x163)in _0x3535ba?_0x3535ba[_0x1fb4cc(0x163)]?.[0x0]:_0x3535ba&&typeof _0x3535ba===_0x1fb4cc(0xd6)&&_0x1fb4cc(0xf0)in _0x3535ba?_0x3535ba:undefined;if(!_0x52da38)throw CliErrors[_0x1fb4cc(0x165)]('SQL\x20query\x20not\x20found:\x20'+_0x7dcab1);return _0x52da38;}function isRemoteAppItem(_0x4dd78d){const _0xcc54cf=a103_0x15d2;return!!_0x4dd78d&&typeof _0x4dd78d===_0xcc54cf(0xd6)&&typeof _0x4dd78d[_0xcc54cf(0x177)]==='string'&&typeof _0x4dd78d['appName']==='string';}function extractRemoteAppItems(_0x197e37){const _0x35fef8=a103_0x15d2;if(Array[_0x35fef8(0x149)](_0x197e37))return _0x197e37[_0x35fef8(0x150)](isRemoteAppItem);if(!_0x197e37||typeof _0x197e37!==_0x35fef8(0xd6))throw CliErrors[_0x35fef8(0x190)](_0x35fef8(0xd7));const _0x6199ff=_0x197e37;if(Array[_0x35fef8(0x149)](_0x6199ff[_0x35fef8(0x163)]))return _0x6199ff['tableData'][_0x35fef8(0x150)](isRemoteAppItem);if(_0x6199ff[_0x35fef8(0xe0)]&&typeof _0x6199ff[_0x35fef8(0xe0)]===_0x35fef8(0xd6)){const _0x416e21=_0x6199ff[_0x35fef8(0xe0)];if(Array[_0x35fef8(0x149)](_0x416e21[_0x35fef8(0x163)]))return _0x416e21[_0x35fef8(0x163)]['filter'](isRemoteAppItem);}throw CliErrors[_0x35fef8(0x190)](_0x35fef8(0x126));}export async function getMyApps(){const _0x90e584=a103_0x15d2,_0x2ffbc4=await apiRequest(_0x90e584(0xec));return extractRemoteAppItems(_0x2ffbc4[_0x90e584(0xe0)]);}export async function getLoginUserInfo(){const _0x56062f=a103_0x15d2,_0x2c8160=await apiRequest('/client/user/loginUserInfo');if(!_0x2c8160[_0x56062f(0xe0)]||typeof _0x2c8160[_0x56062f(0xe0)]!==_0x56062f(0xd6)||Array[_0x56062f(0x149)](_0x2c8160['data']))throw CliErrors[_0x56062f(0x190)](_0x56062f(0x124));return _0x2c8160[_0x56062f(0xe0)];}export const USER_ACCOUNT_BIND_PATH=a103_0x34bfe5(0x18d);export async function bindExternalUserAccount(_0x444262,_0x4bfd31){const _0x394965=a103_0x34bfe5,_0x4da158=await apiRequest(USER_ACCOUNT_BIND_PATH,{'method':_0x394965(0x182),'body':{'provider':_0x444262,'accountId':_0x4bfd31}});return _0x4da158[_0x394965(0xe0)];}function runtimeSchedulePath(_0x54c0be,_0x29d7d2=''){const _0x12d145=a103_0x34bfe5;return _0x12d145(0x13c)+encodeURIComponent(_0x54c0be)+'/schedules'+_0x29d7d2;}export async function validateRuntimeSchedule(_0x4b6f6d,_0x5d38ee){const _0x30d8a7=a103_0x34bfe5,_0x22314b=await apiRequest(runtimeSchedulePath(_0x4b6f6d,_0x30d8a7(0x179)),{'method':_0x30d8a7(0x182),'body':_0x5d38ee});return _0x22314b['data'];}export async function createRuntimeSchedule(_0x297ad5,_0x4f8ce4){const _0x470287=a103_0x34bfe5,_0x53ab95=await apiRequest(runtimeSchedulePath(_0x297ad5),{'method':_0x470287(0x182),'body':_0x4f8ce4});return _0x53ab95['data'];}export async function listRuntimeSchedules(_0x124ae0,_0x38bd33){const _0x346b7b=a103_0x34bfe5,_0x19d638=new URLSearchParams();_0x19d638['set'](_0x346b7b(0x153),_0x38bd33[_0x346b7b(0x153)]);if(_0x38bd33[_0x346b7b(0x119)]!==undefined)_0x19d638[_0x346b7b(0xf1)]('limit',String(_0x38bd33['limit']));if(_0x38bd33[_0x346b7b(0x178)])_0x19d638[_0x346b7b(0xf1)]('cursor',_0x38bd33['cursor']);const _0x4454d6=_0x19d638[_0x346b7b(0x152)]>0x0?'?'+_0x19d638[_0x346b7b(0x175)]():'',_0x507458=await apiRequest(''+runtimeSchedulePath(_0x124ae0)+_0x4454d6);return _0x507458[_0x346b7b(0xe0)];}export async function getRuntimeSchedule(_0x465edf,_0x769629){const _0x4ce2a3=a103_0x34bfe5,_0x58433b=await apiRequest(runtimeSchedulePath(_0x465edf,'/'+encodeURIComponent(_0x769629)));return _0x58433b[_0x4ce2a3(0xe0)];}export async function deleteRuntimeSchedule(_0x312546,_0x594dbd){const _0x20d422=a103_0x34bfe5,_0x3c334a=await apiRequest(runtimeSchedulePath(_0x312546,'/'+encodeURIComponent(_0x594dbd)),{'method':_0x20d422(0x13f)});return _0x3c334a[_0x20d422(0xe0)];}export async function runRuntimeSchedule(_0x3a73d2,_0x3e8f5a){const _0x3e6d35=a103_0x34bfe5,_0x47407a=await apiRequest(runtimeSchedulePath(_0x3a73d2,'/'+encodeURIComponent(_0x3e8f5a)+_0x3e6d35(0x103)),{'method':_0x3e6d35(0x182)});return _0x47407a[_0x3e6d35(0xe0)];}export async function listDatasets(_0x3b3e1c,_0x1f3c0f){const _0x27e388=a103_0x34bfe5,_0x1f7277=await apiRequest('/client/dataset/list',{'method':_0x27e388(0x182),'body':{'appCode':_0x3b3e1c,..._0x1f3c0f?.['code']&&{'code':_0x1f3c0f['code']},..._0x1f3c0f?.['name']&&{'name':_0x1f3c0f[_0x27e388(0xdf)]}}});return extractList(_0x1f7277[_0x27e388(0xe0)]);}export async function getDatasetDetail(_0x148ac8){const _0x42363d=a103_0x34bfe5,_0x137189=await apiRequest(_0x42363d(0x131)+encodeURIComponent(_0x148ac8));return _0x137189[_0x42363d(0xe0)];}export async function getDatasetSdkUsageDoc(_0x17f9c2,_0x182f9a){const _0xb05fd9=a103_0x34bfe5,_0xf3f2cd=await toolboxRequest('api-doc-generator',{'datasetCode':_0x17f9c2,'appCode':_0x182f9a});return typeof _0xf3f2cd?.[_0xb05fd9(0x158)]==='string'?_0xf3f2cd[_0xb05fd9(0x158)]:'';}export async function uploadRuntimeFile(_0x6c1794,_0x394742){const _0x2590fb=a103_0x34bfe5,_0x4b1a59=await readFile(_0x394742),_0x5c9954=new FormData();_0x5c9954[_0x2590fb(0xf5)](_0x2590fb(0x177),_0x6c1794),_0x5c9954[_0x2590fb(0xf5)](_0x2590fb(0x116),new Blob([new Uint8Array(_0x4b1a59)]),basename(_0x394742));const _0x3a4f23=await apiFormRequest(_0x2590fb(0x13e),_0x5c9954);return _0x3a4f23[_0x2590fb(0xe0)];}export async function queryRuntimeFileUrl(_0x4d6f58,_0x5ce7a6={}){const _0x1fba19=a103_0x34bfe5,_0x524270=await apiRequest(_0x1fba19(0x144),{'method':_0x1fba19(0x182),'body':{'filePath':_0x4d6f58,'downloadFlag':_0x5ce7a6[_0x1fba19(0xdb)]??![],..._0x5ce7a6[_0x1fba19(0x145)]?{'longTerm':!![]}:{}}});return _0x524270[_0x1fba19(0xe0)];}function a103_0x394c(){const _0x17b4c1=['Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','505Jzqtrn','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','/client/runtime-bff/personal/list?appCode=','replace','/client/permit/user-role/update-user-list','runtime','/execute?appCode=','/client/permit/page/save','Toolbox\x20error\x20code:\x20',',\x20name=','Configure\x20accessKey\x20in\x20','company','/client/dataset/get-driven-data?code=','8904dfQdFy','headlineVersion','diagramValidated','isJson','skill','SkillHub\x20must\x20return\x20the\x20exact\x20SkillVersion\x20fingerprint\x20even\x20when\x20found=false.','GET','code','Check\x20your\x20credentials\x20and\x20try\x20again.','SkillHub\x20does\x20not\x20support\x20atomic\x20Skill\x20diagram\x20','/api/harness/apps/','newConfigFileName','/client/uploadFile','DELETE','status','version','namespace','/api/runtime/v1/namespaces/','/client/queryFileUrl','longTerm','valid','/client/artifact/','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20found\x20state.','isArray','functions','Personal\x20Backend\x20Function\x20not\x20found:\x20id=','text','ownerPreviewVersion','/api/node-toolbox/','searchParams','filter','CUSTOM','size','kind','/client/notification/channel-config/list?','visibility','errorCode','join','markdown','signal','errors','test','PUT','permitList','Invalid\x20Skill\x20diagram\x20response:\x20absent\x20diagram\x20must\x20have\x20a\x20null\x20diagramRevision.','/client/runtime-bff/personal/create','min','/client/permit/user-role/get-user-list','38274bCtrDR','tableData','slug','validation','/publish/validate','msg','36891CcgnhM','found','PRIVATE','/client/permit/role/get-list','json','/client/permit/resource/batch-save-menu','warnings','packageBase64','personal','abort','skillCode','url','.zip','toString','SkillHub\x20API\x20error:\x20','appCode','cursor','/validate','invokeSource','example','favorite','Download\x20failed:\x20','scope','summary','currentPage','functionName','POST','all','1PKZVDP','136906hFTLgF','description','tags','resolvedSlug','arrayBuffer','API\x20error\x20code:\x20','Invalid\x20notification\x20config\x20list\x20response.','max','/client/user-accounts/bind','/client/permit/role/get-permit-list','publish','apiError','content','confirmWarnings','4697iNDVsP','headers','object','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','/versions/','diagramBound','Missing\x20Skill\x20package\x20payload.','download','/update','message','/client/sql/query','name','data','diagram','roleName','/client/artifact/create','/client/ocr','application/octet-stream','string','Invalid\x20Skill\x20diagram\x20response:\x20found\x20diagram\x20has\x20no\x20positive\x20diagramRevision.','1730JDsyBz','/diagram','api','/client/knowledge-base/personal/create','/client/app/my-apps','pageSize','/api/cli/v1/skills/','Artifact\x20not\x20found:\x20id=','sqlCode','set','API\x20error:\x20','5189716kyipbM','application/json','append','/download','resolvedVersion','/client/permit/role/update','/client/permit/role/delete','effective','map','from','224HXFLjT','boolean','/client/permit/resource/get-menu-list','authRequired','SkillHub\x20returned\x20non-JSON\x20response\x20(HTTP\x20','sourceFingerprint','/run','Invalid\x20app\x20config\x20value:\x20key=','undefined','/client/app-config/getByKey?','/client/knowledge-base/personal/list?appCode=','AbortError','errorMsg','SkillHub\x20error\x20code:\x20','/client/bff/endpoint/','values','displayName','1775266XZkEhP','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','skillName','success','source','/client/menu/permit-list','stringify','NAMESPACE_ONLY','file','isInteger','/client/knowledge-base/personal/','limit','Request\x20timeout:\x20','application/zip','error','?appCode=','Invalid\x20Skill\x20diagram\x20response:\x20missing\x20canonical\x20sourceFingerprint.','trim','toLowerCase','entries','items','/client/runtime-bff/personal/'];a103_0x394c=function(){return _0x17b4c1;};return a103_0x394c();}export async function recognizeRuntimeOcr(_0x4f9fd6,_0x5a05ea){const _0xfb14fc=a103_0x34bfe5,_0x180707=await apiRequest(_0xfb14fc(0xe4),{'method':_0xfb14fc(0x182),'body':{'appCode':_0x4f9fd6,'url':_0x5a05ea[_0xfb14fc(0x173)],'type':_0x5a05ea['type']}});return _0x180707[_0xfb14fc(0xe0)];}export async function getRuntimeAppConfigByKey(_0x4d4148,_0x171f53){const _0x495555=a103_0x34bfe5,_0x211068=new URLSearchParams({'appCode':_0x4d4148,'key':_0x171f53}),_0x35e437=await apiRequest(_0x495555(0x106)+_0x211068[_0x495555(0x175)]());if(typeof _0x35e437[_0x495555(0xe0)]!==_0x495555(0xe6))throw CliErrors[_0x495555(0x165)](_0x495555(0x104)+_0x171f53);return _0x35e437[_0x495555(0xe0)];}export async function listNotificationChannelConfigs(_0x1d4a5b,_0x1f4b20){const _0x44db16=a103_0x34bfe5,_0x2cd5e0=new URLSearchParams({'appCode':_0x1d4a5b,'channelType':_0x1f4b20}),_0x4c1172=await apiRequest(_0x44db16(0x154)+_0x2cd5e0[_0x44db16(0x175)]());if(!Array['isArray'](_0x4c1172[_0x44db16(0xe0)]))throw CliErrors[_0x44db16(0x190)](_0x44db16(0x18b),'Expected\x20the\x20server\x20data\x20field\x20to\x20be\x20an\x20array.');return _0x4c1172['data'];}export async function listRuntimeArtifacts(_0x6b8273,_0x340d61){const _0x15e011=a103_0x34bfe5,_0x138c2f=new URLSearchParams({'appCode':_0x6b8273});if(_0x340d61?.['artifactType'])_0x138c2f[_0x15e011(0xf1)]('artifactType',_0x340d61['artifactType']);if(_0x340d61?.[_0x15e011(0x112)])_0x138c2f[_0x15e011(0xf1)](_0x15e011(0x112),_0x340d61[_0x15e011(0x112)]);if(_0x340d61?.['favorite']!==undefined)_0x138c2f[_0x15e011(0xf1)](_0x15e011(0x17c),String(_0x340d61[_0x15e011(0x17c)]));const _0xbf0101=await apiRequest('/client/artifact/list?'+_0x138c2f[_0x15e011(0x175)]());return Array[_0x15e011(0x149)](_0xbf0101[_0x15e011(0xe0)])?_0xbf0101['data']:[];}export async function getRuntimeArtifact(_0x49d0e0,_0x4db892){const _0x1616fc=a103_0x34bfe5,_0x382f8c=await apiRequest(_0x1616fc(0x147)+_0x49d0e0+_0x1616fc(0x11d)+encodeURIComponent(_0x4db892));if(!_0x382f8c[_0x1616fc(0xe0)])throw CliErrors[_0x1616fc(0x165)](_0x1616fc(0xef)+_0x49d0e0);return _0x382f8c[_0x1616fc(0xe0)];}export async function createRuntimeArtifact(_0x56fda5,_0x472de8){const _0x48ea9f=a103_0x34bfe5,_0x483a19=await apiRequest(_0x48ea9f(0xe3),{'method':'POST','body':{'appCode':_0x56fda5,..._0x472de8}});return _0x483a19[_0x48ea9f(0xe0)];}export async function updateRuntimeArtifact(_0x7f88b4,_0x4215d4,_0x187e9b){const _0x1798f8=a103_0x34bfe5,_0x37df3b=await apiRequest('/client/artifact/'+_0x7f88b4+_0x1798f8(0xdc),{'method':'POST','body':{'appCode':_0x4215d4,..._0x187e9b}});return _0x37df3b[_0x1798f8(0xe0)];}export async function listPersonalBffs(_0x58f515){const _0x5dc343=a103_0x34bfe5,_0x3b0145=await apiRequest(_0x5dc343(0x127)+encodeURIComponent(_0x58f515));return Array[_0x5dc343(0x149)](_0x3b0145['data'])?_0x3b0145[_0x5dc343(0xe0)]:[];}export async function getPersonalBff(_0x21bc3c,_0x3b0e27){const _0x42725d=a103_0x34bfe5,_0x7b0f37=await apiRequest('/client/runtime-bff/personal/'+_0x21bc3c+'?appCode='+encodeURIComponent(_0x3b0e27));if(!_0x7b0f37['data'])throw CliErrors[_0x42725d(0x165)](_0x42725d(0x14b)+_0x21bc3c);return _0x7b0f37['data'];}export async function createPersonalBff(_0x298cf6,_0x2a5f60){const _0x43d99e=a103_0x34bfe5,_0x337a34=await apiRequest(_0x43d99e(0x15f),{'method':_0x43d99e(0x182),'body':{'appCode':_0x298cf6,..._0x2a5f60}});return _0x337a34['data'];}export async function updatePersonalBff(_0x29d79f,_0x34a788,_0x498a54){const _0xe7166=a103_0x34bfe5,_0x5a90a7=await apiRequest(_0xe7166(0x123)+_0x29d79f+_0xe7166(0xdc),{'method':_0xe7166(0x182),'body':{'appCode':_0x34a788,..._0x498a54}});return _0x5a90a7[_0xe7166(0xe0)];}export async function executePersonalBff(_0x3ea8fa,_0x58a354,_0x809b3f){const _0x234afd=a103_0x34bfe5,_0x157adc=await apiRequest(_0x234afd(0x123)+_0x3ea8fa+_0x234afd(0x12b)+encodeURIComponent(_0x58a354),{'method':_0x234afd(0x182),'body':_0x809b3f});return _0x157adc[_0x234afd(0xe0)];}function a103_0x15d2(_0x456726,_0x5b64cd){_0x456726=_0x456726-0xd5;const _0x394c2b=a103_0x394c();let _0x15d2c0=_0x394c2b[_0x456726];return _0x15d2c0;}export async function listPersonalKnowledgeBaseItems(_0x18a9fd){const _0x336935=a103_0x34bfe5,_0x293b0b=await apiRequest(_0x336935(0x107)+encodeURIComponent(_0x18a9fd));return Array[_0x336935(0x149)](_0x293b0b[_0x336935(0xe0)])?_0x293b0b[_0x336935(0xe0)]:[];}export async function getPersonalKnowledgeBaseItem(_0x519696,_0xe0703c){const _0x11fff9=a103_0x34bfe5,_0x248992=await apiRequest(_0x11fff9(0x118)+_0x519696+'?appCode='+encodeURIComponent(_0xe0703c));if(!_0x248992[_0x11fff9(0xe0)])throw CliErrors[_0x11fff9(0x165)]('Knowledge-base\x20entry\x20not\x20found:\x20id='+_0x519696);return _0x248992[_0x11fff9(0xe0)];}export async function createPersonalKnowledgeBaseItem(_0x142d65,_0x59a82d){const _0x5f575b=a103_0x34bfe5,_0x1bc1e8=await apiRequest(_0x5f575b(0xeb),{'method':_0x5f575b(0x182),'body':{'appCode':_0x142d65,..._0x59a82d}});return _0x1bc1e8['data'];}export async function updatePersonalKnowledgeBaseItem(_0x47f863,_0x1ba06a,_0x52a61c){const _0x25b5db=a103_0x34bfe5,_0x1a1983=await apiRequest(_0x25b5db(0x118)+_0x47f863+_0x25b5db(0xdc),{'method':'POST','body':{'appCode':_0x1ba06a,..._0x52a61c}});return _0x1a1983['data'];}export async function getRuntimeSkillByCode(_0x35e5a0,_0x474056){const _0x238f7d=await skillHubJsonRequest('/api/v1/skills/'+encodeURIComponent(_0x35e5a0)+'/'+encodeURIComponent(_0x474056),{'allowNotFound':!![]});return _0x238f7d?skillHubRuntimeDetailToRuntimeSkill(_0x238f7d):undefined;}export async function listRuntimeSkills(_0x24a9a9){const _0xe79d54=a103_0x34bfe5,_0x146218=await skillHubJsonRequest(_0xe79d54(0x143)+encodeURIComponent(_0x24a9a9[_0xe79d54(0x177)])+'/skills',{'query':{'page':0x0,'size':0xc8}});return normalizeSkillHubRuntimeListResponse(_0x24a9a9[_0xe79d54(0x177)],_0x146218,_0x24a9a9[_0xe79d54(0x17e)]??'all',_0x24a9a9[_0xe79d54(0x139)]);}export async function listPersonalRuntimeSkills(_0x49964f){const _0x2c6ba4=a103_0x34bfe5;return(await listRuntimeSkills({'appCode':_0x49964f,'scope':_0x2c6ba4(0x170)}))[_0x2c6ba4(0x170)];}export async function listCompanyRuntimeSkills(_0x275b47){const _0x27ae60=a103_0x34bfe5;return(await listRuntimeSkills({'appCode':_0x275b47,'scope':_0x27ae60(0x130)}))[_0x27ae60(0x130)];}export async function listVisibleRuntimeSkills(_0x3c1c7a){const _0x4172e6=a103_0x34bfe5;return(await listRuntimeSkills({'appCode':_0x3c1c7a,'scope':_0x4172e6(0x183)}))[_0x4172e6(0xfa)];}export async function createPersonalRuntimeSkill(_0x37016b,_0x54c01b,_0x40769d={}){const _0xac3ed9=a103_0x34bfe5;return publishRuntimeSkill(_0x37016b,_0x54c01b,{'visibility':_0xac3ed9(0x16a),'confirmWarnings':_0x40769d[_0xac3ed9(0x192)]});}export async function updatePersonalRuntimeSkill(_0x4be3b0,_0x442245,_0x67265e,_0x21689e={}){const _0x2b2aa4=a103_0x34bfe5;return publishRuntimeSkill(_0x442245,{..._0x67265e,'skillCode':_0x67265e[_0x2b2aa4(0x172)]??_0x4be3b0},{'visibility':'PRIVATE','confirmWarnings':_0x21689e[_0x2b2aa4(0x192)]});}export async function publishCompanyRuntimeSkill(_0x100ac9,_0x3561a7,_0x26a683={}){const _0x166cb1=a103_0x34bfe5;return publishRuntimeSkill(_0x100ac9,_0x3561a7,{'visibility':_0x166cb1(0x115),'confirmWarnings':_0x26a683[_0x166cb1(0x192)]});}export async function validateRuntimeSkillPublish(_0x4c4864,_0x37597a,_0x435172){const _0x511fd0=a103_0x34bfe5,_0x56db45=buildRuntimeSkillPublishForm(_0x37597a,_0x435172['visibility']),_0x1bece3=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x4c4864)+_0x511fd0(0x166),{'method':'POST','body':_0x56db45});return assertJointDiagramAcknowledged(_0x37597a[_0x511fd0(0xe1)],_0x1bece3[_0x511fd0(0x134)],_0x511fd0(0x165)),{'valid':_0x1bece3[_0x511fd0(0x146)]===!![],'errors':Array['isArray'](_0x1bece3[_0x511fd0(0x15a)])?_0x1bece3[_0x511fd0(0x15a)]:[],'warnings':Array[_0x511fd0(0x149)](_0x1bece3['warnings'])?_0x1bece3[_0x511fd0(0x16e)]:[],'resolvedSlug':_0x1bece3[_0x511fd0(0x188)],'resolvedVersion':_0x1bece3[_0x511fd0(0xf7)],'diagramValidated':_0x1bece3[_0x511fd0(0x134)]===!![]};}export async function validateRuntimeSkillVersionDiagram(_0x4bf2df,_0x107499,_0x140b2f,_0x1bd2ba,_0x5b925c){const _0x4bb162=a103_0x34bfe5;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x4bf2df,_0x107499,_0x140b2f,_0x4bb162(0x179)),{'method':_0x4bb162(0x182),'query':{'scope':_0x1bd2ba},'headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x5b925c)});}export async function putRuntimeSkillVersionDiagram(_0x422b17,_0x273e6d,_0x592c01,_0x3d76bf,_0x5b2c8e){const _0x41ca03=a103_0x34bfe5;return skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x422b17,_0x273e6d,_0x592c01),{'method':_0x41ca03(0x15c),'query':{'scope':_0x3d76bf},'headers':{'Content-Type':'application/json'},'body':JSON[_0x41ca03(0x114)](_0x5b2c8e)});}export async function getRuntimeSkillVersionDiagram(_0x5bcd07,_0xf3baa4,_0x3bd12d,_0x2f9b28){const _0x2eb3b3=a103_0x34bfe5,_0x3df5df=await skillHubJsonRequest(runtimeSkillVersionDiagramPath(_0x5bcd07,_0xf3baa4,_0x3bd12d),{'query':{'scope':_0x2f9b28}});if(typeof _0x3df5df[_0x2eb3b3(0x169)]!==_0x2eb3b3(0xfe))throw CliErrors[_0x2eb3b3(0x190)](_0x2eb3b3(0x148));const _0x248cc5=_0x3df5df[_0x2eb3b3(0x102)];if(typeof _0x248cc5!==_0x2eb3b3(0xe6)||!/^sha256:[0-9a-f]{64}$/[_0x2eb3b3(0x15b)](_0x248cc5))throw CliErrors[_0x2eb3b3(0x190)](_0x2eb3b3(0x11e),_0x2eb3b3(0x137));const _0x208f79=_0x3df5df['diagramRevision'];if(_0x3df5df[_0x2eb3b3(0x169)]&&(!Number[_0x2eb3b3(0x117)](_0x208f79)||Number(_0x208f79)<0x1))throw CliErrors['apiError'](_0x2eb3b3(0xe7));if(!_0x3df5df['found']&&_0x208f79!==undefined&&_0x208f79!==null)throw CliErrors[_0x2eb3b3(0x190)](_0x2eb3b3(0x15e));const _0x163b3b=_0x3df5df['found']?Number(_0x208f79):null;return{..._0x3df5df,'sourceFingerprint':_0x248cc5,'diagramRevision':_0x163b3b,'expectedDiagramRevision':_0x163b3b??0x0};}export async function downloadRuntimeSkillPackage(_0x36975d,_0x448a2e,_0x37b365,_0x270026){const _0x3717a0=a103_0x34bfe5;void _0x36975d;const _0x5e4ab8=_0x270026?_0x3717a0(0xee)+encodeURIComponent(_0x37b365)+'/'+encodeURIComponent(_0x448a2e)+_0x3717a0(0xd8)+encodeURIComponent(_0x270026)+_0x3717a0(0xf6):_0x3717a0(0xee)+encodeURIComponent(_0x37b365)+'/'+encodeURIComponent(_0x448a2e)+_0x3717a0(0xf6);return skillHubBinaryRequest(_0x5e4ab8);}async function publishRuntimeSkill(_0x2b0c4f,_0x59c311,_0x22bfe8){const _0x248ff1=a103_0x34bfe5,_0x35e7d5=buildRuntimeSkillPublishForm(_0x59c311,_0x22bfe8[_0x248ff1(0x155)]),_0x397865=await skillHubJsonRequest('/api/cli/v1/skills/'+encodeURIComponent(_0x2b0c4f)+'/publish',{'method':'POST','query':{'confirmWarnings':_0x22bfe8[_0x248ff1(0x192)]===!![]?!![]:undefined},'body':_0x35e7d5});return assertJointDiagramAcknowledged(_0x59c311[_0x248ff1(0xe1)],_0x397865['diagramBound'],_0x248ff1(0x18f)),{'appCode':_0x397865[_0x248ff1(0x142)]??_0x2b0c4f,'skillCode':_0x397865[_0x248ff1(0x164)]??_0x59c311[_0x248ff1(0x172)]??'','skillName':_0x59c311['skillName']??_0x397865[_0x248ff1(0x164)]??_0x59c311[_0x248ff1(0x172)],'description':_0x59c311[_0x248ff1(0x186)],'scope':skillHubVisibilityToScope(_0x397865[_0x248ff1(0x155)]??_0x22bfe8[_0x248ff1(0x155)])??_0x248ff1(0x170),'version':_0x397865[_0x248ff1(0x141)]??_0x59c311[_0x248ff1(0x141)],'tags':_0x59c311[_0x248ff1(0x187)],'content':_0x59c311[_0x248ff1(0x191)],'diagramBound':_0x397865[_0x248ff1(0xd9)]===!![]};}function assertJointDiagramAcknowledged(_0x248e6b,_0x4f52c0,_0x284499){const _0x4d18a1=a103_0x34bfe5;if(!_0x248e6b||_0x4f52c0===!![])return;throw CliErrors[_0x4d18a1(0x190)](_0x4d18a1(0x13b)+_0x284499+'.','Deploy\x20a\x20SkillHub\x20version\x20that\x20returns\x20diagramValidated/diagramBound\x20before\x20publishing\x20with\x20this\x20CLI.');}function buildRuntimeSkillPublishForm(_0x82c80d,_0x4522fc){const _0x1eaaf7=a103_0x34bfe5,_0x2cd706=new FormData();return _0x2cd706[_0x1eaaf7(0xf1)](_0x1eaaf7(0x116),runtimeSkillPackageFile(_0x82c80d)),_0x82c80d[_0x1eaaf7(0x110)]?.[_0x1eaaf7(0x11f)]()&&_0x2cd706[_0x1eaaf7(0xf1)]('displayName',_0x82c80d[_0x1eaaf7(0x110)][_0x1eaaf7(0x11f)]()),_0x2cd706[_0x1eaaf7(0xf1)](_0x1eaaf7(0x155),_0x4522fc),_0x82c80d[_0x1eaaf7(0xe1)]&&_0x2cd706[_0x1eaaf7(0xf1)](_0x1eaaf7(0xe1),new Blob([JSON[_0x1eaaf7(0x114)](_0x82c80d['diagram'])],{'type':'application/json'})),_0x2cd706;}function runtimeSkillVersionDiagramPath(_0x10b8c3,_0x3df00d,_0x4f5613,_0x17f89b=''){const _0x523512=a103_0x34bfe5;return'/api/cli/v1/skills/'+encodeURIComponent(_0x10b8c3)+'/'+encodeURIComponent(_0x3df00d)+_0x523512(0xd8)+encodeURIComponent(_0x4f5613)+_0x523512(0xe9)+_0x17f89b;}function runtimeSkillPackageFile(_0x330158){const _0x52c0e2=a103_0x34bfe5;if(!_0x330158[_0x52c0e2(0x16f)])throw CliErrors[_0x52c0e2(0x165)](_0x52c0e2(0xda));const _0xc3932f=Buffer['from'](_0x330158[_0x52c0e2(0x16f)],'base64'),_0x1040e7=new Blob([_0xc3932f],{'type':_0x52c0e2(0x11b)}),_0x1a9c48=(_0x330158[_0x52c0e2(0x172)]||_0x52c0e2(0x136))+_0x52c0e2(0x174);if(typeof File!==_0x52c0e2(0x105))return new File([_0x1040e7],_0x1a9c48,{'type':_0x52c0e2(0x11b)});return _0x1040e7;}function normalizeSkillHubRuntimeListResponse(_0x3c0df4,_0x4840a1,_0x53ac7b,_0x16ed07){const _0x5af1b9=a103_0x34bfe5,_0x52e212=Array[_0x5af1b9(0x149)](_0x4840a1)?_0x4840a1:Array[_0x5af1b9(0x149)](_0x4840a1?.[_0x5af1b9(0x122)])?_0x4840a1[_0x5af1b9(0x122)]:[],_0x56308e=_0x16ed07?.[_0x5af1b9(0x11f)](),_0x22ad85=_0x52e212['filter'](_0x509616=>!_0x56308e||_0x509616[_0x5af1b9(0x164)]===_0x56308e)[_0x5af1b9(0xfb)](skillHubRuntimeItemToRuntimeSkill)['filter'](_0x48f829=>Boolean(_0x48f829)),_0x53208a=_0x22ad85['filter'](_0x2b52db=>_0x2b52db[_0x5af1b9(0x17e)]===_0x5af1b9(0x170)),_0x373c59=_0x22ad85['filter'](_0x321918=>_0x321918['scope']===_0x5af1b9(0x130));return{'appCode':_0x3c0df4,'personal':_0x53ac7b==='company'?[]:_0x53208a,'company':_0x53ac7b===_0x5af1b9(0x170)?[]:_0x373c59,'effective':buildEffectiveRuntimeSkills(_0x53208a,_0x373c59,_0x53ac7b)};}function skillHubRuntimeItemToRuntimeSkill(_0x3760a0){const _0x530f9b=a103_0x34bfe5,_0x2e8d56=_0x3760a0['slug']?.[_0x530f9b(0x11f)](),_0x45b047=skillHubVisibilityToScope(_0x3760a0['visibility']);if(!_0x2e8d56||!_0x45b047)return undefined;return{'id':_0x3760a0['id'],'appCode':_0x3760a0[_0x530f9b(0x142)],'skillCode':_0x2e8d56,'skillName':_0x3760a0['displayName']??_0x2e8d56,'description':_0x3760a0[_0x530f9b(0x17f)],'example':_0x3760a0[_0x530f9b(0x17b)],'scope':_0x45b047,'version':skillHubRuntimeItemVersion(_0x3760a0),'status':_0x3760a0['status']};}function skillHubRuntimeDetailToRuntimeSkill(_0x501121){const _0x294e9e=a103_0x34bfe5,_0x1431de=_0x501121[_0x294e9e(0x164)]?.['trim']();if(!_0x1431de)return undefined;return{'id':_0x501121['id'],'appCode':_0x501121['namespace'],'skillCode':_0x1431de,'skillName':_0x501121[_0x294e9e(0x10d)]??_0x1431de,'description':_0x501121[_0x294e9e(0x17f)],'example':_0x501121[_0x294e9e(0x17b)],'scope':skillHubVisibilityToScope(_0x501121['visibility'])??_0x501121[_0x294e9e(0x155)]?.[_0x294e9e(0x120)](),'version':skillHubRuntimeItemVersion(_0x501121),'status':_0x501121[_0x294e9e(0x140)]};}function skillHubVisibilityToScope(_0x3f2a56){const _0x14f4e8=a103_0x34bfe5;if(_0x3f2a56===_0x14f4e8(0x16a))return _0x14f4e8(0x170);if(_0x3f2a56===_0x14f4e8(0x115))return _0x14f4e8(0x130);return undefined;}function skillHubRuntimeItemVersion(_0x36687b){const _0x3b98f7=a103_0x34bfe5;return _0x36687b['publishedVersion']?.['version']??_0x36687b[_0x3b98f7(0x133)]?.['version']??_0x36687b[_0x3b98f7(0x14d)]?.['version'];}function buildEffectiveRuntimeSkills(_0x20a727,_0x219285,_0x471071){const _0x270caa=a103_0x34bfe5;if(_0x471071===_0x270caa(0x170))return _0x20a727;if(_0x471071===_0x270caa(0x130))return _0x219285;const _0x2cca98=new Map();for(const _0x1bdd34 of _0x219285){_0x2cca98['set'](_0x1bdd34[_0x270caa(0x172)],_0x1bdd34);}for(const _0x4661d3 of _0x20a727){_0x2cca98[_0x270caa(0xf1)](_0x4661d3[_0x270caa(0x172)],_0x4661d3);}return Array[_0x270caa(0xfc)](_0x2cca98[_0x270caa(0x10c)]());}function normalizeRuntimeSkillListResponse(_0x4d521c,_0x270332){const _0x2c2168=a103_0x34bfe5;if(Array[_0x2c2168(0x149)](_0x270332)){const _0x15feef=_0x270332[_0x2c2168(0x150)](_0x1a6d43=>_0x1a6d43[_0x2c2168(0x17e)]==='personal'),_0x3b193f=_0x270332[_0x2c2168(0x150)](_0x4cca03=>_0x4cca03[_0x2c2168(0x17e)]==='company');return{'appCode':_0x4d521c,'personal':_0x15feef,'company':_0x3b193f,'effective':[..._0x3b193f,..._0x15feef]};}return{'appCode':_0x270332?.['appCode']??_0x4d521c,'personal':Array['isArray'](_0x270332?.[_0x2c2168(0x170)])?_0x270332[_0x2c2168(0x170)]:[],'company':Array['isArray'](_0x270332?.[_0x2c2168(0x130)])?_0x270332[_0x2c2168(0x130)]:[],'effective':Array[_0x2c2168(0x149)](_0x270332?.[_0x2c2168(0xfa)])?_0x270332[_0x2c2168(0xfa)]:[]};}export async function listRuntimeAppRoles(_0x7bb50d,_0x1b3084={}){const _0x3415e0=a103_0x34bfe5,_0x4baeb2=_0x1b3084[_0x3415e0(0x180)]??0x1,_0x229cdc=Math[_0x3415e0(0x160)](Math[_0x3415e0(0x18c)](_0x1b3084[_0x3415e0(0xed)]??0x64,0x1),0x64),_0x1082ef=await apiRequest(_0x3415e0(0x16b),{'method':'POST','body':{'appCode':_0x7bb50d,..._0x1b3084[_0x3415e0(0xe2)]?{'roleName':_0x1b3084[_0x3415e0(0xe2)]}:{},'currentPage':_0x4baeb2,'pageSize':_0x229cdc}});return{'items':extractList(_0x1082ef['data']),'paging':extractPaging(_0x1082ef[_0x3415e0(0xe0)])};}export async function createRuntimeAppRole(_0x133eb3){const _0x821d82=a103_0x34bfe5,_0x215e50=await apiRequest('/client/permit/role/create',{'method':'POST','body':{'roleType':_0x821d82(0x151),..._0x133eb3}});return _0x215e50[_0x821d82(0xe0)];}export async function updateRuntimeAppRole(_0x3aff08){const _0x105611=a103_0x34bfe5,_0xcf2d63=await apiRequest(_0x105611(0xf8),{'method':_0x105611(0x182),'body':_0x3aff08});return _0xcf2d63[_0x105611(0xe0)];}export async function deleteRuntimeAppRole(_0x60f0d1){const _0x1a071f=a103_0x34bfe5,_0x264030=await apiRequest(_0x1a071f(0xf9),{'method':'POST','body':{'id':_0x60f0d1}});return _0x264030['data'];}export async function listRuntimeRoleUsers(_0x26ed04){const _0x1b8193=a103_0x34bfe5,_0x133a51=await apiRequest(_0x1b8193(0x161),{'method':'POST','body':{'appCode':_0x26ed04}});return extractList(_0x133a51[_0x1b8193(0xe0)]);}export async function updateRuntimeRoleUsers(_0x14b9b1,_0x28970e){const _0x3a66ff=a103_0x34bfe5,_0x527c74=await apiRequest(_0x3a66ff(0x129),{'method':_0x3a66ff(0x182),'body':{'appCode':_0x14b9b1,'roleList':_0x28970e}});return _0x527c74[_0x3a66ff(0xe0)];}export async function listRuntimeAppUsers(_0x619550){const _0x44378e=await apiRequest('/client/dept/queryAppUser'+runtimePermitQuery({'appCode':_0x619550}));return extractList(_0x44378e['data']);}function runtimePermitQuery(_0x49e99c){const _0x9f840a=a103_0x34bfe5,_0xe8233=new URLSearchParams();for(const [_0x124e48,_0x586f03]of Object[_0x9f840a(0x121)](_0x49e99c))_0xe8233[_0x9f840a(0xf1)](_0x124e48,String(_0x586f03));return'?'+_0xe8233[_0x9f840a(0x175)]();}export async function listRuntimePermitRoles(_0xd881fc,_0x18a2af={}){const _0x26d9ac=a103_0x34bfe5,_0x286d5a=await apiRequest(_0x26d9ac(0x18e),{'method':_0x26d9ac(0x182),'body':{'appCode':_0xd881fc,..._0x18a2af}});return extractList(_0x286d5a['data']);}export async function getRuntimePagePermit(_0x4ad6e5){const _0x5a30b1=a103_0x34bfe5,_0x911a7a=await apiRequest('/client/permit/page/get-one'+runtimePermitQuery({'menuId':_0x4ad6e5}));return _0x911a7a[_0x5a30b1(0xe0)];}export async function saveRuntimePagePermit(_0x95ff01){const _0x3b9003=a103_0x34bfe5,_0x5f4587=await apiRequest(_0x3b9003(0x12c),{'method':_0x3b9003(0x182),'body':_0x95ff01});return _0x5f4587['data'];}export async function getRuntimeRoleMenuResources(_0x36bf37,_0x6708b7){const _0x3967bb=a103_0x34bfe5,_0x1c21f5=await apiRequest(_0x3967bb(0xff),{'method':_0x3967bb(0x182),'body':{'appCode':_0x36bf37,'roleId':_0x6708b7}});return extractList(_0x1c21f5[_0x3967bb(0xe0)]);}export async function listRuntimeMenuRolePermits(_0x1f535c){const _0x2119a6=a103_0x34bfe5,_0xaeeb80=await apiRequest(_0x2119a6(0x113)+runtimePermitQuery({'appCode':_0x1f535c}));return Array[_0x2119a6(0x149)](_0xaeeb80['data']?.[_0x2119a6(0x15d)])?_0xaeeb80['data'][_0x2119a6(0x15d)]:[];}export async function saveRuntimeMenuRolePermits(_0x3c244a,_0x5d5069){const _0x566325=a103_0x34bfe5,_0xbe32d4=await apiRequest(_0x566325(0x16d),{'method':_0x566325(0x182),'body':{'appCode':_0x3c244a,'permitList':_0x5d5069}});return _0xbe32d4[_0x566325(0xe0)];}export async function listRuntimeDatasetPermits(_0x218f4a,_0x565cb9){const _0x4c33ea=a103_0x34bfe5,_0x25b1f8=await apiRequest('/client/permit/dataset/list'+runtimePermitQuery({'appCode':_0x218f4a,'roleId':_0x565cb9}));return Array[_0x4c33ea(0x149)](_0x25b1f8[_0x4c33ea(0xe0)]?.[_0x4c33ea(0x15d)])?_0x25b1f8[_0x4c33ea(0xe0)]['permitList']:[];}export async function listRuntimeDatasetRolePermits(_0x2e59dc){const _0x2e1869=a103_0x34bfe5,_0x513d99=await apiRequest('/client/permit/dataset/permit-list'+runtimePermitQuery({'appCode':_0x2e59dc}));return Array[_0x2e1869(0x149)](_0x513d99[_0x2e1869(0xe0)]?.[_0x2e1869(0x15d)])?_0x513d99[_0x2e1869(0xe0)][_0x2e1869(0x15d)]:[];}export async function saveRuntimeDatasetRolePermits(_0x4ddb8c,_0x174d73){const _0x2c807b=a103_0x34bfe5,_0x278ce7=await apiRequest('/client/permit/resource/batch-save-dataset',{'method':_0x2c807b(0x182),'body':{'appCode':_0x4ddb8c,'permitList':_0x174d73}});return _0x278ce7[_0x2c807b(0xe0)];}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ed62e,_0xbdb66e){const _0x5a063c=a104_0xb1dc,_0x25ca4e=_0x5ed62e();while(!![]){try{const _0x20d999=parseInt(_0x5a063c(0x10e))/0x1*(-parseInt(_0x5a063c(0x10b))/0x2)+parseInt(_0x5a063c(0x112))/0x3+-parseInt(_0x5a063c(0x108))/0x4*(-parseInt(_0x5a063c(0x103))/0x5)+-parseInt(_0x5a063c(0x117))/0x6*(-parseInt(_0x5a063c(0x10f))/0x7)+parseInt(_0x5a063c(0x106))/0x8*(parseInt(_0x5a063c(0x10a))/0x9)+parseInt(_0x5a063c(0x110))/0xa*(-parseInt(_0x5a063c(0x10c))/0xb)+parseInt(_0x5a063c(0x113))/0xc*(parseInt(_0x5a063c(0x116))/0xd);if(_0x20d999===_0xbdb66e)break;else _0x25ca4e['push'](_0x25ca4e['shift']());}catch(_0x3fdb5b){_0x25ca4e['push'](_0x25ca4e['shift']());}}}(a104_0x5382,0x92f62));function a104_0xb1dc(_0x1add12,_0x56768e){_0x1add12=_0x1add12-0x103;const _0x538228=a104_0x5382();let _0xb1dc44=_0x538228[_0x1add12];return _0xb1dc44;}import{listDatasets}from'../core/api-client.js';function a104_0x5382(){const _0x1dc5c2=['7980ECgwQR','set','dbName','12181qDnQEy','1380564BFicjV','70PjbCfw','has','find','705608ovJwiz','dbId','306216oJcgmb','dbtableConfig','9vdHYac','1565992VrXnmp','22TZIGWB','map','1FeZJOu','14xgrcHc','5968330TKBiTz','entries','1006098LutEWw'];a104_0x5382=function(){return _0x1dc5c2;};return a104_0x5382();}const cache=new Map();export async function listDatabases(_0x532238){const _0x207c0d=a104_0xb1dc;if(cache[_0x207c0d(0x104)](_0x532238))return cache['get'](_0x532238);const _0x54955b=await listDatasets(_0x532238),_0x3e99b2=new Map();for(const _0x36ad40 of _0x54955b){const _0xdb0aad=_0x36ad40[_0x207c0d(0x109)];_0xdb0aad?.['dbId']!=null&&_0x3e99b2[_0x207c0d(0x114)](_0xdb0aad['dbId'],_0xdb0aad[_0x207c0d(0x115)]??'db-'+_0xdb0aad[_0x207c0d(0x107)]);}const _0x1c2fed=[..._0x3e99b2[_0x207c0d(0x111)]()][_0x207c0d(0x10d)](([_0x14fde7,_0x46682e])=>({'dbId':_0x14fde7,'dbName':_0x46682e}));return cache[_0x207c0d(0x114)](_0x532238,_0x1c2fed),_0x1c2fed;}export async function getDbName(_0x40b1e8,_0x260ef1){const _0x1a211a=a104_0xb1dc;try{const _0x11006e=await listDatabases(_0x40b1e8);return _0x11006e[_0x1a211a(0x105)](_0x541e43=>_0x541e43[_0x1a211a(0x107)]===_0x260ef1)?.[_0x1a211a(0x115)];}catch{return undefined;}}
|