@lovrabet/lovrabet-cli 2.1.21 → 2.1.22-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 +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.d.ts +4 -0
- package/lib/commands/skill/commands/diagram.js +1 -0
- 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.d.ts +5 -0
- package/lib/commands/skill/diagram.js +1 -0
- package/lib/commands/skill/flags.d.ts +6 -0
- 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.d.ts +4 -0
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +52 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/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/help.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/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/utils/apply-jq-filter.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/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a28_0x214e(_0x2af819,_0x3697c0){_0x2af819=_0x2af819-0x194;const _0x459c23=a28_0x459c();let _0x214e49=_0x459c23[_0x2af819];return _0x214e49;}const a28_0x1fdd89=a28_0x214e;(function(_0x39c4ee,_0xf558a4){const _0x209523=a28_0x214e,_0x39a6f2=_0x39c4ee();while(!![]){try{const _0x3a991b=-parseInt(_0x209523(0x19c))/0x1*(parseInt(_0x209523(0x1a2))/0x2)+parseInt(_0x209523(0x19d))/0x3+-parseInt(_0x209523(0x194))/0x4*(parseInt(_0x209523(0x197))/0x5)+parseInt(_0x209523(0x19e))/0x6+-parseInt(_0x209523(0x196))/0x7+-parseInt(_0x209523(0x1a1))/0x8+parseInt(_0x209523(0x198))/0x9;if(_0x3a991b===_0xf558a4)break;else _0x39a6f2['push'](_0x39a6f2['shift']());}catch(_0x411f94){_0x39a6f2['push'](_0x39a6f2['shift']());}}}(a28_0x459c,0x3328a));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a28_0x1fdd89(0x1a0);export function formatDatasetSdkMarkdown(_0x2fc920){const _0x51cf07=a28_0x1fdd89,_0x3ab0e0=typeof _0x2fc920===_0x51cf07(0x19a)?_0x2fc920[_0x51cf07(0x1a5)]():'';return _0x3ab0e0||DEFAULT_MARKDOWN;}function a28_0x459c(){const _0x534e48=['#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','1273680SlpUEN','2JOqePK','dataset','code','trim','12zHeUsV','appCode','806687HVkaFv','587240gBjBLT','4997583ezLbeB','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','string','sdk-doc','298735FdEeeq','906132uSEAbS','1666470FLxMSf','str'];a28_0x459c=function(){return _0x534e48;};return a28_0x459c();}export const datasetSdkDoc={'service':a28_0x1fdd89(0x1a3),'command':a28_0x1fdd89(0x19b),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':'read','flags':[{...CODE_FLAG,'description':a28_0x1fdd89(0x199)}],async 'execute'(_0x4d25c0){const _0x2614e8=a28_0x1fdd89,_0x2d75e4=_0x4d25c0[_0x2614e8(0x19f)](_0x2614e8(0x1a4)),_0x147e9f=await getDatasetSdkUsageDoc(_0x2d75e4,_0x4d25c0[_0x2614e8(0x195)]);return{'ok':!![],'data':{'code':_0x2d75e4,'appCode':_0x4d25c0[_0x2614e8(0x195)],'markdown':formatDatasetSdkMarkdown(_0x147e9f)}};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a29_0x346c06=a29_0x3cab;(function(_0x847b87,_0x106368){const _0x4cbb23=a29_0x3cab,_0x1f40d0=_0x847b87();while(!![]){try{const _0x105767=parseInt(_0x4cbb23(0x14b))/0x1*(-parseInt(_0x4cbb23(0x15a))/0x2)+parseInt(_0x4cbb23(0x141))/0x3*(parseInt(_0x4cbb23(0x15c))/0x4)+-parseInt(_0x4cbb23(0x145))/0x5*(-parseInt(_0x4cbb23(0x163))/0x6)+parseInt(_0x4cbb23(0x12b))/0x7*(-parseInt(_0x4cbb23(0x153))/0x8)+parseInt(_0x4cbb23(0x16a))/0x9*(-parseInt(_0x4cbb23(0x175))/0xa)+-parseInt(_0x4cbb23(0x168))/0xb+-parseInt(_0x4cbb23(0x14f))/0xc*(-parseInt(_0x4cbb23(0x136))/0xd);if(_0x105767===_0x106368)break;else _0x1f40d0['push'](_0x1f40d0['shift']());}catch(_0x227104){_0x1f40d0['push'](_0x1f40d0['shift']());}}}(a29_0x4f6c,0x82a35));import a29_0x236dc7 from'chalk';function a29_0x4f6c(){const _0x15cc2f=['green','⚠\x20Empty','Global','length','defaultApp','red','✗\x20Invalid\x20JSON','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','120150SQEgyf','commandCount','(removed\x20—\x20cookie\x20auth\x20disabled)','status','format','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','services','(missing)','(none)','\x20\x20Config\x20Files','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','4619909XwiEnJ','gray','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','missing','Project','(unnamed)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Service\x20Tree','(default)','empty','currentApp','3887eXWUMo','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','env','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','✗\x20Invalid','name','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','54963mGEDUP','padEnd','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','serviceCode','1040430admemR','\x20\x20─','yellow','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','✓\x20Valid\x20JSON','5997SivQyp','bold','\x20\x20Auth','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','95496yJeUTx','\x20commands)','path','\x20\x20API\x20Endpoints','8KIQtmF','(no\x20file)','log','ClientAk','\x20(legacy/compat\x20only)','version','(set,\x20length=','304JqucUs','message','8oRfDMy','pageSize','\x20\x20Config\x20JSON','repeat','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','registryPath','24EZrkgW','verbose','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','10841699eVGtkn','locale','117pzxKMx','\x20(accessKey)','\x20\x20Session\x20check:\x20\x20\x20'];a29_0x4f6c=function(){return _0x15cc2f;};return a29_0x4f6c();}import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x2fea5b){const _0x53320f=a29_0x3cab,_0xc7ecb7=getCliVersion(),_0x37a192=buildConfigFromFlags({});await initGlobalEnvironment(_0x37a192),console[_0x53320f(0x155)](),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x14c)](CLI_BIN_NAME+'\x20doctor')),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x12c)]('─'['repeat'](0x32))),console[_0x53320f(0x155)](_0x53320f(0x143)+_0xc7ecb7),console[_0x53320f(0x155)](_0x53320f(0x13f)+process[_0x53320f(0x158)]),console[_0x53320f(0x155)](_0x53320f(0x174)+process[_0x53320f(0x149)]+'\x20'+process[_0x53320f(0x17b)]),console[_0x53320f(0x155)](),console['log'](a29_0x236dc7[_0x53320f(0x14c)](_0x53320f(0x129))),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x146)[_0x53320f(0x15f)](0x1e)));const _0x1a175c=getGlobalConfigPath(),_0x2447b9=getProjectConfigPath();console[_0x53320f(0x155)](_0x53320f(0x17a)+(_0x1a175c||a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x140)))),console[_0x53320f(0x155)](_0x53320f(0x12a)+(_0x2447b9||a29_0x236dc7['gray'](_0x53320f(0x140)))),console[_0x53320f(0x155)](),console['log'](a29_0x236dc7[_0x53320f(0x14c)](_0x53320f(0x15e))),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x146)['repeat'](0x1e)));const _0x1e431f=(_0x1c5e8b,_0x3812a2)=>{const _0x2a221c=_0x53320f;if(!_0x3812a2){console['log']('\x20\x20'+_0x1c5e8b[_0x2a221c(0x142)](0x11)+'\x20'+a29_0x236dc7[_0x2a221c(0x12c)](_0x2a221c(0x154)));return;}const _0x9f3d8f=inspectCliConfigJsonFile(_0x3812a2);if(_0x9f3d8f[_0x2a221c(0x178)]==='ok')console[_0x2a221c(0x155)]('\x20\x20'+_0x1c5e8b[_0x2a221c(0x142)](0x11)+'\x20'+a29_0x236dc7[_0x2a221c(0x16d)](_0x2a221c(0x14a)));else{if(_0x9f3d8f[_0x2a221c(0x178)]===_0x2a221c(0x134))console[_0x2a221c(0x155)]('\x20\x20'+_0x1c5e8b[_0x2a221c(0x142)](0x11)+'\x20'+a29_0x236dc7['yellow']('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x9f3d8f['status']===_0x2a221c(0x12e)?console['log']('\x20\x20'+_0x1c5e8b['padEnd'](0x11)+'\x20'+a29_0x236dc7[_0x2a221c(0x12c)](_0x2a221c(0x17d))):(console[_0x2a221c(0x155)]('\x20\x20'+_0x1c5e8b[_0x2a221c(0x142)](0x11)+'\x20'+a29_0x236dc7[_0x2a221c(0x172)](_0x2a221c(0x173))),console[_0x2a221c(0x155)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a29_0x236dc7['red'](_0x9f3d8f['message'])));}};_0x1e431f(_0x53320f(0x16f),_0x1a175c),_0x1e431f(_0x53320f(0x12f),_0x2447b9),console['log'](),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x14c)](_0x53320f(0x13c))),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x146)['repeat'](0x1e))),console[_0x53320f(0x155)](_0x53320f(0x131)+(_0x37a192['appCode']||a29_0x236dc7[_0x53320f(0x172)]('(not\x20set)'))),console[_0x53320f(0x155)](_0x53320f(0x167)+_0x37a192[_0x53320f(0x139)]);const _0x4b8ca6=isLegacyCompatConfigKey(_0x53320f(0x169))?a29_0x236dc7[_0x53320f(0x12c)](_0x37a192[_0x53320f(0x169)]+_0x53320f(0x157)):_0x37a192[_0x53320f(0x169)];console['log']('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4b8ca6),console[_0x53320f(0x155)](_0x53320f(0x166)+(_0x37a192[_0x53320f(0x171)]||a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x17e)))),console['log'](_0x53320f(0x13b)+(_0x37a192[_0x53320f(0x135)]||a29_0x236dc7[_0x53320f(0x12c)]('(none)'))),console[_0x53320f(0x155)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x37a192[_0x53320f(0x179)]||a29_0x236dc7[_0x53320f(0x12c)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x53320f(0x179)]+')'))),console[_0x53320f(0x155)](_0x53320f(0x14e)+(_0x37a192[_0x53320f(0x15d)]??a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x133)))),console[_0x53320f(0x155)](_0x53320f(0x138)+_0x37a192['riskLevel']),console[_0x53320f(0x155)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x37a192[_0x53320f(0x164)]),console[_0x53320f(0x155)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x53320f(0x156)]),console[_0x53320f(0x155)](_0x53320f(0x165)+(_0x37a192[_0x53320f(0x161)]?a29_0x236dc7[_0x53320f(0x16d)](_0x53320f(0x159)+_0x37a192[_0x53320f(0x161)][_0x53320f(0x170)]+')'):a29_0x236dc7['gray']('(none)'))),console[_0x53320f(0x155)](),console['log'](a29_0x236dc7[_0x53320f(0x14c)](_0x53320f(0x152))),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x146)['repeat'](0x1e))),console[_0x53320f(0x155)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x53320f(0x155)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x53320f(0x155)](),console['log'](a29_0x236dc7[_0x53320f(0x14c)](_0x53320f(0x132))),console[_0x53320f(0x155)](a29_0x236dc7['gray']('\x20\x20─'['repeat'](0x1e)));const _0x5860e2=inspectServiceRegistry();console[_0x53320f(0x155)]('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5860e2[_0x53320f(0x162)]),console['log'](_0x53320f(0x148)+formatServiceRegistryStatus(_0x5860e2)),console['log'](_0x53320f(0x12d)+_0x5860e2['serviceCount']),console[_0x53320f(0x155)](_0x53320f(0x137)+_0x5860e2[_0x53320f(0x176)]);for(const _0x2af0a8 of _0x5860e2[_0x53320f(0x17c)]){console[_0x53320f(0x155)]('\x20\x20'+(_0x2af0a8[_0x53320f(0x144)]+':')[_0x53320f(0x142)](0x11)+'\x20'+(_0x2af0a8[_0x53320f(0x13e)]||a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x130)))+'\x20('+_0x2af0a8['commandCount']+_0x53320f(0x150)),console[_0x53320f(0x155)]('\x20\x20'+''[_0x53320f(0x142)](0x11)+'\x20Imported\x20from:\x20'+_0x2af0a8['source'][_0x53320f(0x151)]);}return console[_0x53320f(0x155)](),console['log'](a29_0x236dc7['bold'](_0x53320f(0x14d))),console['log'](a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x146)[_0x53320f(0x15f)](0x1e))),console['log'](_0x53320f(0x160)+a29_0x236dc7[_0x53320f(0x16d)](AUTH_MODE[_0x53320f(0x156)]+_0x53320f(0x16b))),console[_0x53320f(0x155)](_0x53320f(0x16c)+a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x177))),console[_0x53320f(0x155)](),{'ok':!![]};}function a29_0x3cab(_0x31507e,_0x1b852c){_0x31507e=_0x31507e-0x129;const _0x4f6c10=a29_0x4f6c();let _0x3cabeb=_0x4f6c10[_0x31507e];return _0x3cabeb;}function formatServiceRegistryStatus(_0x43a0a3){const _0xb1ea62=a29_0x3cab;if(_0x43a0a3[_0xb1ea62(0x178)]==='ok')return a29_0x236dc7[_0xb1ea62(0x16d)]('✓\x20Loaded');if(_0x43a0a3[_0xb1ea62(0x178)]===_0xb1ea62(0x12e))return a29_0x236dc7[_0xb1ea62(0x12c)](_0xb1ea62(0x140));if(_0x43a0a3[_0xb1ea62(0x178)]==='empty')return a29_0x236dc7[_0xb1ea62(0x147)](_0xb1ea62(0x16e));return a29_0x236dc7[_0xb1ea62(0x172)](_0xb1ea62(0x13d)+(_0x43a0a3[_0xb1ea62(0x15b)]?':\x20'+_0x43a0a3['message']:''));}export const doctorDefinition={'service':'doctor','command':'check','description':a29_0x346c06(0x13a),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x478127=a30_0x123d;(function(_0x4629d8,_0x53f12e){const _0x1f1f35=a30_0x123d,_0x40348e=_0x4629d8();while(!![]){try{const _0x411fcc=-parseInt(_0x1f1f35(0x17d))/0x1+-parseInt(_0x1f1f35(0x161))/0x2+parseInt(_0x1f1f35(0x165))/0x3*(-parseInt(_0x1f1f35(0x171))/0x4)+parseInt(_0x1f1f35(0x16f))/0x5*(-parseInt(_0x1f1f35(0x175))/0x6)+parseInt(_0x1f1f35(0x16a))/0x7*(parseInt(_0x1f1f35(0x16c))/0x8)+-parseInt(_0x1f1f35(0x182))/0x9+parseInt(_0x1f1f35(0x169))/0xa*(parseInt(_0x1f1f35(0x172))/0xb);if(_0x411fcc===_0x53f12e)break;else _0x40348e['push'](_0x40348e['shift']());}catch(_0x44d6a3){_0x40348e['push'](_0x40348e['shift']());}}}(a30_0x36ee,0x492cc));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x36ee(){const _0x3bfd98=['7BWVxLM','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','522440PMNPhx','validation','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','220085ZyXKZr','Uploaded\x20file:\x20','2072216jVoGJq','11EeZtio','string','long-term','54iSnuqh','description','filePath','bool','str','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Path\x20to\x20the\x20local\x20file\x20to\x20upload','File','249527Czvikd','download','POST','boolean','filepath','5151636BYVydN','read','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','appCode','1049724jPCTWg','upload','path','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','3ByKHcZ','file','query-url','trim','24954190uWEzLc'];a30_0x36ee=function(){return _0x3bfd98;};return a30_0x36ee();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a30_0x123d(_0x102ec5,_0x300925){_0x102ec5=_0x102ec5-0x15e;const _0x36ee9e=a30_0x36ee();let _0x123d4b=_0x36ee9e[_0x102ec5];return _0x123d4b;}const FILE_FLAG={'name':'file','type':a30_0x478127(0x173),'required':!![],'description':a30_0x478127(0x17b)},FILEPATH_FLAG={'name':a30_0x478127(0x181),'type':a30_0x478127(0x173),'required':!![],'description':a30_0x478127(0x16b)},DOWNLOAD_FLAG={'name':a30_0x478127(0x17e),'type':a30_0x478127(0x180),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a30_0x478127(0x174),'type':'boolean','description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x87b5ff){const _0x1b0920=a30_0x478127,_0x244f4c=_0x87b5ff[_0x1b0920(0x168)]();if(!_0x244f4c)throw CliErrors[_0x1b0920(0x16d)]('filePath\x20is\x20required.');return _0x244f4c;}const fileUpload={'service':a30_0x478127(0x166),'command':a30_0x478127(0x162),'description':a30_0x478127(0x16e),'risk':a30_0x478127(0x15e),'flags':[FILE_FLAG],async 'dryRun'(_0x5395d6){const _0x1d7595=a30_0x478127,_0x1391e6=requireRuntimeUploadFile(_0x5395d6[_0x1d7595(0x179)]('file'),_0x1d7595(0x17c));return dryRun(_0x1d7595(0x17f),'/client/uploadFile')['body']({'appCode':_0x5395d6[_0x1d7595(0x160)],'multipart':{'file':_0x1391e6}})[_0x1d7595(0x176)]('Preview:\x20upload\x20'+_0x1391e6[_0x1d7595(0x163)]+'\x20to\x20runtime\x20app\x20'+_0x5395d6[_0x1d7595(0x160)])['build']();},async 'execute'(_0x35dff6){const _0xd19a5b=a30_0x478127,_0x2a90db=requireRuntimeUploadFile(_0x35dff6[_0xd19a5b(0x179)](_0xd19a5b(0x166)),_0xd19a5b(0x17c)),_0x17b45d=await uploadRuntimeFile(_0x35dff6['appCode'],_0x2a90db[_0xd19a5b(0x163)]);return{'ok':!![],'data':_0x17b45d,'message':_0x17b45d[_0xd19a5b(0x177)]?_0xd19a5b(0x170)+_0x17b45d[_0xd19a5b(0x177)]+_0xd19a5b(0x17a):_0xd19a5b(0x164)};}},fileQueryUrl={'service':a30_0x478127(0x166),'command':a30_0x478127(0x167),'description':a30_0x478127(0x15f),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x33b329){const _0xaf8b45=a30_0x478127,_0x3decd8=requireFilePath(_0x33b329['str'](_0xaf8b45(0x181))),_0x45ba29=await queryRuntimeFileUrl(_0x3decd8,{'download':_0x33b329[_0xaf8b45(0x178)](_0xaf8b45(0x17e)),'longTerm':_0x33b329[_0xaf8b45(0x178)](_0xaf8b45(0x174))});return{'ok':!![],'data':_0x45ba29};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x44c116=a31_0x27f0;(function(_0x4509c0,_0x1ec5cd){const _0x27b828=a31_0x27f0,_0x1af056=_0x4509c0();while(!![]){try{const _0x59ae32=-parseInt(_0x27b828(0xad))/0x1*(-parseInt(_0x27b828(0xd3))/0x2)+-parseInt(_0x27b828(0xc2))/0x3*(parseInt(_0x27b828(0xba))/0x4)+parseInt(_0x27b828(0xdb))/0x5+-parseInt(_0x27b828(0xe4))/0x6+-parseInt(_0x27b828(0xd6))/0x7+-parseInt(_0x27b828(0xd5))/0x8+-parseInt(_0x27b828(0xd0))/0x9*(-parseInt(_0x27b828(0xaa))/0xa);if(_0x59ae32===_0x1ec5cd)break;else _0x1af056['push'](_0x1af056['shift']());}catch(_0x3f8a5c){_0x1af056['push'](_0x1af056['shift']());}}}(a31_0x1aaf,0xa0932));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';function a31_0x1aaf(){const _0x5e12f1=['9kMRhoZ','\x0aInitialized\x20','removeListener','11348FQtKqb','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','7708672QJkarN','8071161zcCSIW','\x20\x20config:\x20\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','question','Skip\x20confirmation\x20when\x20overwriting','3013995HUpIrc','appcode','newConfigFileName','log',')\x20instead\x20of\x20project','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','includes','utf8','Write\x20to\x20global\x20(~/','318522lcyXFM','apiDir','global','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','AbortPrompt','entries','SIGINT','validation','\x20\x20default:\x20','cancelled','24044410ePiCxo','apps','stdout','198IouOYr','cwd','yes','[y/N]','string','riskLevel','race','Override\x20imported\x20default\x20appcode','\x20\x20env:\x20\x20\x20\x20\x20','App\x20code\x20for\x20the\x20project','trim','Source\x20file\x20not\x20found:\x20','Aborted.','24gBRvWk','boolean','defaultApp','file','message','join','name','\x20\x20appcode:\x20','651642xBEint','project','\x20already\x20exists.\x20Overwrite?','App\x20code\x20cannot\x20be\x20empty.','flagMissing','close','toLowerCase','env','Imported\x20from\x20','):\x20','stdin','Target\x20environment\x20(default\x20','app','object'];a31_0x1aaf=function(){return _0x5e12f1;};return a31_0x1aaf();}import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0x44c116(0xdc),'type':a31_0x44c116(0xb1),'description':a31_0x44c116(0xb6)},{'name':a31_0x44c116(0xc9),'type':a31_0x44c116(0xb1),'description':a31_0x44c116(0xcd)+DEFAULT_CONFIG_VALUES[a31_0x44c116(0xc9)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x44c116(0xe6),'type':'boolean','description':a31_0x44c116(0xe3)+PRODUCT_CONFIG[a31_0x44c116(0xdd)]+a31_0x44c116(0xdf),'default':![]},{'name':a31_0x44c116(0xaf),'type':'boolean','description':a31_0x44c116(0xda),'default':![]}];export const initImportFlagDefs=[{'name':a31_0x44c116(0xbd),'type':a31_0x44c116(0xb1),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x44c116(0xdc),'type':a31_0x44c116(0xb1),'description':a31_0x44c116(0xb4)},{'name':'env','type':'string','description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x44c116(0xe6),'type':a31_0x44c116(0xbb),'description':a31_0x44c116(0xe3)+PRODUCT_CONFIG[a31_0x44c116(0xdd)]+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':a31_0x44c116(0xbb),'description':a31_0x44c116(0xda),'default':![]}];export async function runInit(_0x4435dc){const _0x26d1b9=a31_0x44c116,_0x372b2a=isNonInteractiveMode(_0x4435dc),_0x32e3ba=_0x4435dc[_0x26d1b9(0xe6)]?_0x26d1b9(0xe6):_0x26d1b9(0xc3),_0x30805f=resolveWriteConfigPath(_0x32e3ba);try{_0x372b2a?await runNonInteractive(_0x4435dc,_0x30805f):await runInteractive(_0x4435dc,_0x30805f);}catch(_0x4e76ec){if(_0x4e76ec instanceof AbortPrompt)throw CliErrors[_0x26d1b9(0xa9)]();throw _0x4e76ec;}}export async function runInitImport(_0x5254ef){const _0x4bd98a=a31_0x44c116,_0xbc41fa=_0x5254ef[_0x4bd98a(0xe6)]?_0x4bd98a(0xe6):_0x4bd98a(0xc3),_0x3913ce=resolveWriteConfigPath(_0xbc41fa);await runFromImport(_0x5254ef,_0x3913ce);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x44c116(0xe5)]);function a31_0x27f0(_0x3a305b,_0x22673c){_0x3a305b=_0x3a305b-0xa4;const _0x1aaffc=a31_0x1aaf();let _0x27f0bc=_0x1aaffc[_0x3a305b];return _0x27f0bc;}async function runFromImport(_0x317e46,_0x2b9777){const _0xaec19=a31_0x44c116,_0x50e02f=resolveFilePath(_0x317e46['file']);if(!existsSync(_0x50e02f))throw CliErrors[_0xaec19(0xa7)](_0xaec19(0xb8)+_0x50e02f);const _0x5758ee=readSourceFile(_0x50e02f),_0x2aa7ea=convertToRuntimeConfig(_0x5758ee);_0x317e46[_0xaec19(0xdc)]&&(_0x2aa7ea[_0xaec19(0xdc)]=String(_0x317e46[_0xaec19(0xdc)]));_0x317e46[_0xaec19(0xc9)]&&(_0x2aa7ea[_0xaec19(0xc9)]=resolveInitEnv(_0x317e46));if(!_0x2aa7ea['appcode'])throw CliErrors['validation'](_0xaec19(0xe7),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeInitConfig(_0x2b9777,_0x2aa7ea,_0x317e46),console[_0xaec19(0xde)](_0xaec19(0xca)+_0x50e02f),console[_0xaec19(0xde)](_0xaec19(0xd7)+_0x2b9777),console[_0xaec19(0xde)](_0xaec19(0xc1)+_0x2aa7ea[_0xaec19(0xdc)]);if(_0x2aa7ea[_0xaec19(0xbc)])console[_0xaec19(0xde)](_0xaec19(0xa8)+_0x2aa7ea[_0xaec19(0xbc)]);}function convertToRuntimeConfig(_0x442fca){const _0xf5c1d2=a31_0x44c116;if(_0x442fca[_0xf5c1d2(0xab)]&&typeof _0x442fca[_0xf5c1d2(0xab)]===_0xf5c1d2(0xcf))throw CliErrors[_0xf5c1d2(0xa7)](_0xf5c1d2(0xd4),_0xf5c1d2(0xd8));const _0x197eeb={};for(const _0x33af62 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x442fca[_0x33af62]!==undefined&&(_0x197eeb[_0x33af62]=_0x442fca[_0x33af62]);}return!_0x197eeb[_0xf5c1d2(0xb2)]&&(_0x197eeb[_0xf5c1d2(0xb2)]=DEFAULT_CONFIG_VALUES[_0xf5c1d2(0xb2)]),_0x197eeb;}async function runNonInteractive(_0x44de2f,_0x48ebfb){const _0xd1c531=a31_0x44c116,_0x16ec17=_0x44de2f[_0xd1c531(0xdc)];if(!_0x16ec17)throw CliErrors[_0xd1c531(0xc6)](_0xd1c531(0xdc),'Usage:\x20'+CLI_BIN_NAME+_0xd1c531(0xe0));const _0x1b7f05=resolveInitEnv(_0x44de2f);await writeInitConfig(_0x48ebfb,{'appcode':_0x16ec17,'env':_0x1b7f05},_0x44de2f),console['log']('Initialized\x20'+_0x48ebfb),console['log'](_0xd1c531(0xc1)+_0x16ec17),console[_0xd1c531(0xde)](_0xd1c531(0xb5)+_0x1b7f05);}async function runInteractive(_0x260248,_0x31bc7b){const _0x58a047=a31_0x44c116,_0x3e881c=loadExisting(_0x31bc7b),_0x13806a=typeof _0x3e881c?.[_0x58a047(0xdc)]==='string'?_0x3e881c['appcode']:'',_0x55e6e4=resolveInitEnv(_0x260248);console[_0x58a047(0xde)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG[_0x58a047(0xdd)]+'\x0a');if(existsSync(_0x31bc7b)&&!_0x260248[_0x58a047(0xaf)]){const _0x3a04ec=await promptYesNo('File\x20'+_0x31bc7b+_0x58a047(0xc4),![]);if(!_0x3a04ec){console[_0x58a047(0xde)](_0x58a047(0xb9));return;}}const _0x3ef96e=typeof _0x260248[_0x58a047(0xdc)]==='string'?_0x260248[_0x58a047(0xdc)][_0x58a047(0xb7)]():'';let _0x50b744=_0x3ef96e;!_0x50b744&&(_0x50b744=await promptInput('App\x20code',_0x13806a));if(!_0x50b744['trim']())throw CliErrors[_0x58a047(0xa7)](_0x58a047(0xc5));await writeInitConfig(_0x31bc7b,{'appcode':_0x50b744[_0x58a047(0xb7)](),'env':_0x55e6e4},_0x260248),console[_0x58a047(0xde)](_0x58a047(0xd1)+_0x31bc7b),console[_0x58a047(0xde)]('\x20\x20appcode:\x20'+_0x50b744['trim']()),console[_0x58a047(0xde)](_0x58a047(0xb5)+_0x55e6e4);}async function writeInitConfig(_0x57f933,_0x3de4df,_0x578c74){const _0x814e61=a31_0x44c116;let _0x4d8fa0={};existsSync(_0x57f933)&&!_0x578c74['yes']&&(_0x4d8fa0=readConfigFile(_0x57f933));for(const [_0x1c3622,_0x4e4f88]of Object[_0x814e61(0xa5)](_0x3de4df)){_0x4e4f88!==undefined&&(_0x4d8fa0[_0x1c3622]=_0x4e4f88);}if(_0x4d8fa0['app'])delete _0x4d8fa0[_0x814e61(0xce)];writeConfigFile(_0x57f933,_0x4d8fa0);}class AbortPrompt extends Error{constructor(){const _0x2746c3=a31_0x44c116;super('User\x20aborted\x20prompt'),this[_0x2746c3(0xc0)]=_0x2746c3(0xa4);}}function createSafeRl(){const _0x4b018e=a31_0x44c116,_0x100ecb=createInterface({'input':process[_0x4b018e(0xcc)],'output':process[_0x4b018e(0xac)]});let _0x504f9f;const _0x5cfa57=new Promise((_0x66d98a,_0x2bbb7f)=>{const _0x41d3c5=_0x4b018e;_0x504f9f=()=>{const _0x56a48f=a31_0x27f0;_0x504f9f&&(_0x100ecb[_0x56a48f(0xd2)](_0x56a48f(0xa6),_0x504f9f),_0x504f9f=undefined);try{_0x100ecb[_0x56a48f(0xc7)]();}catch{}_0x2bbb7f(new AbortPrompt());},_0x100ecb['once'](_0x41d3c5(0xa6),_0x504f9f);}),_0x10fcac=()=>{const _0x394dd3=_0x4b018e;_0x504f9f&&(_0x100ecb['removeListener'](_0x394dd3(0xa6),_0x504f9f),_0x504f9f=undefined);try{_0x100ecb[_0x394dd3(0xc7)]();}catch{}};return{'rl':_0x100ecb,'abortPromise':_0x5cfa57,'disposeSuccess':_0x10fcac};}async function promptInput(_0x4bc8fe,_0x213e70){const {rl:_0x4e66e5,abortPromise:_0x20c141,disposeSuccess:_0x4776ff}=createSafeRl(),_0x4a0b90=new Promise(_0x9a3704=>{const _0x452859=a31_0x27f0,_0x191d51=_0x213e70?'\x20\x20'+_0x4bc8fe+'\x20('+_0x213e70+_0x452859(0xcb):'\x20\x20'+_0x4bc8fe+':\x20';_0x4e66e5['question'](_0x191d51,_0x685d5c=>{const _0x706a24=_0x452859;_0x4776ff(),_0x9a3704(_0x685d5c[_0x706a24(0xb7)]()||_0x213e70);});});return Promise['race']([_0x4a0b90,_0x20c141]);}async function promptYesNo(_0x429699,_0xf67297){const _0x440aa5=a31_0x44c116,{rl:_0x574139,abortPromise:_0x210f81,disposeSuccess:_0x13dc6c}=createSafeRl(),_0x40edc3=new Promise(_0x49dd71=>{const _0x525f66=a31_0x27f0,_0x18ac22=_0xf67297?'[Y/n]':_0x525f66(0xb0);_0x574139[_0x525f66(0xd9)]('\x20\x20'+_0x429699+'\x20'+_0x18ac22+':\x20',_0x5d6589=>{const _0xf41bff=_0x525f66;_0x13dc6c();const _0x42e77a=_0x5d6589[_0xf41bff(0xb7)]()[_0xf41bff(0xc8)]();if(_0x42e77a==='y'||_0x42e77a===_0xf41bff(0xaf))_0x49dd71(!![]);else{if(_0x42e77a==='n'||_0x42e77a==='no')_0x49dd71(![]);else _0x49dd71(_0xf67297);}});});return Promise[_0x440aa5(0xb3)]([_0x40edc3,_0x210f81]);}function loadExisting(_0x40aa38){if(!existsSync(_0x40aa38))return null;return readConfigFile(_0x40aa38);}function resolveFilePath(_0xeccc01){const _0x5282ce=a31_0x44c116;return isAbsolute(_0xeccc01)?_0xeccc01:resolve(process[_0x5282ce(0xae)](),_0xeccc01);}function readSourceFile(_0x1e8d77){const _0x39338a=a31_0x44c116;try{const _0x548748=readFileSync(_0x1e8d77,{'encoding':_0x39338a(0xe2)});return JSON['parse'](_0x548748);}catch(_0x597470){throw CliErrors['validation']('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x597470[_0x39338a(0xbe)]);}}function resolveInitEnv(_0x542c78){const _0x6522d2=a31_0x44c116,_0x36757e=_0x542c78[_0x6522d2(0xc9)];if(_0x36757e===undefined||_0x36757e==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0x6522d2(0xe1)](_0x36757e))throw CliErrors[_0x6522d2(0xa7)]('Invalid\x20env\x20\x22'+_0x36757e+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x6522d2(0xbf)](',\x20'));return _0x36757e;}
|
|
1
|
+
const a31_0xc56787=a31_0x2db2;(function(_0x598a7f,_0x568d70){const _0x20bb66=a31_0x2db2,_0x2337f1=_0x598a7f();while(!![]){try{const _0x16bf42=parseInt(_0x20bb66(0x1a8))/0x1*(parseInt(_0x20bb66(0x1a2))/0x2)+-parseInt(_0x20bb66(0x19b))/0x3+parseInt(_0x20bb66(0x182))/0x4*(-parseInt(_0x20bb66(0x19d))/0x5)+-parseInt(_0x20bb66(0x1a4))/0x6*(-parseInt(_0x20bb66(0x175))/0x7)+-parseInt(_0x20bb66(0x196))/0x8*(-parseInt(_0x20bb66(0x170))/0x9)+-parseInt(_0x20bb66(0x183))/0xa+parseInt(_0x20bb66(0x173))/0xb;if(_0x16bf42===_0x568d70)break;else _0x2337f1['push'](_0x2337f1['shift']());}catch(_0x3c0b40){_0x2337f1['push'](_0x2337f1['shift']());}}}(a31_0x38bc,0x5720d));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0xc56787(0x172),'type':a31_0xc56787(0x18f),'description':a31_0xc56787(0x165)},{'name':'env','type':a31_0xc56787(0x18f),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES[a31_0xc56787(0x177)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0xc56787(0x1a9),'type':a31_0xc56787(0x176),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a31_0xc56787(0x19e)]+a31_0xc56787(0x19a),'default':![]},{'name':a31_0xc56787(0x198),'type':a31_0xc56787(0x176),'description':a31_0xc56787(0x17c),'default':![]}];export const initImportFlagDefs=[{'name':a31_0xc56787(0x164),'type':'string','description':a31_0xc56787(0x193),'required':!![]},{'name':'appcode','type':a31_0xc56787(0x18f),'description':a31_0xc56787(0x1a5)},{'name':a31_0xc56787(0x177),'type':a31_0xc56787(0x18f),'description':a31_0xc56787(0x17a),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0xc56787(0x1a9),'type':a31_0xc56787(0x176),'description':a31_0xc56787(0x168)+PRODUCT_CONFIG['newConfigFileName']+a31_0xc56787(0x19a),'default':![]},{'name':a31_0xc56787(0x198),'type':a31_0xc56787(0x176),'description':a31_0xc56787(0x17c),'default':![]}];export async function runInit(_0x533c83){const _0x331399=a31_0xc56787,_0x4f600c=isNonInteractiveMode(_0x533c83),_0x4d500f=_0x533c83[_0x331399(0x1a9)]?'global':'project',_0x331001=resolveWriteConfigPath(_0x4d500f);try{_0x4f600c?await runNonInteractive(_0x533c83,_0x331001):await runInteractive(_0x533c83,_0x331001);}catch(_0x274d5f){if(_0x274d5f instanceof AbortPrompt)throw CliErrors[_0x331399(0x179)]();throw _0x274d5f;}}export async function runInitImport(_0x5eb1c4){const _0x247f9c=a31_0xc56787,_0x4872e4=_0x5eb1c4['global']?_0x247f9c(0x1a9):_0x247f9c(0x197),_0xf97467=resolveWriteConfigPath(_0x4872e4);await runFromImport(_0x5eb1c4,_0xf97467);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0xc56787(0x184)]);function a31_0x2db2(_0x12a618,_0x1e7a79){_0x12a618=_0x12a618-0x164;const _0x38bcba=a31_0x38bc();let _0x2db2ec=_0x38bcba[_0x12a618];return _0x2db2ec;}async function runFromImport(_0x5355e2,_0x1ddeba){const _0x4c7dd8=a31_0xc56787,_0x2d1050=resolveFilePath(_0x5355e2[_0x4c7dd8(0x164)]);if(!existsSync(_0x2d1050))throw CliErrors[_0x4c7dd8(0x18b)](_0x4c7dd8(0x167)+_0x2d1050);const _0x578074=readSourceFile(_0x2d1050),_0x3c8bf1=convertToRuntimeConfig(_0x578074);_0x5355e2[_0x4c7dd8(0x172)]&&(_0x3c8bf1[_0x4c7dd8(0x172)]=String(_0x5355e2[_0x4c7dd8(0x172)]));_0x5355e2['env']&&(_0x3c8bf1['env']=resolveInitEnv(_0x5355e2));if(!_0x3c8bf1[_0x4c7dd8(0x172)])throw CliErrors[_0x4c7dd8(0x18b)](_0x4c7dd8(0x16d),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeInitConfig(_0x1ddeba,_0x3c8bf1,_0x5355e2),console[_0x4c7dd8(0x187)](_0x4c7dd8(0x1a7)+_0x2d1050),console[_0x4c7dd8(0x187)](_0x4c7dd8(0x190)+_0x1ddeba),console[_0x4c7dd8(0x187)](_0x4c7dd8(0x19f)+_0x3c8bf1[_0x4c7dd8(0x172)]);if(_0x3c8bf1[_0x4c7dd8(0x18e)])console[_0x4c7dd8(0x187)](_0x4c7dd8(0x17d)+_0x3c8bf1['defaultApp']);}function convertToRuntimeConfig(_0x44a6ac){const _0x35fde2=a31_0xc56787;if(_0x44a6ac[_0x35fde2(0x16c)]&&typeof _0x44a6ac[_0x35fde2(0x16c)]==='object')throw CliErrors[_0x35fde2(0x18b)](_0x35fde2(0x180),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x1c20f2={};for(const _0x42f5f6 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x44a6ac[_0x42f5f6]!==undefined&&(_0x1c20f2[_0x42f5f6]=_0x44a6ac[_0x42f5f6]);}return!_0x1c20f2[_0x35fde2(0x16f)]&&(_0x1c20f2[_0x35fde2(0x16f)]=DEFAULT_CONFIG_VALUES[_0x35fde2(0x16f)]),_0x1c20f2;}async function runNonInteractive(_0x335ea8,_0x1e10dd){const _0x52ca1d=a31_0xc56787,_0x114b40=_0x335ea8[_0x52ca1d(0x172)];if(!_0x114b40)throw CliErrors[_0x52ca1d(0x194)]('appcode',_0x52ca1d(0x188)+CLI_BIN_NAME+_0x52ca1d(0x189));const _0x44e8ac=resolveInitEnv(_0x335ea8);await writeInitConfig(_0x1e10dd,{'appcode':_0x114b40,'env':_0x44e8ac},_0x335ea8),console['log'](_0x52ca1d(0x18c)+_0x1e10dd),console['log'](_0x52ca1d(0x19f)+_0x114b40),console[_0x52ca1d(0x187)](_0x52ca1d(0x16e)+_0x44e8ac);}async function runInteractive(_0x2d6ebd,_0x1d3bcb){const _0x428dcd=a31_0xc56787,_0x35a7b0=loadExisting(_0x1d3bcb),_0x25e024=typeof _0x35a7b0?.[_0x428dcd(0x172)]===_0x428dcd(0x18f)?_0x35a7b0['appcode']:'',_0x55f1ce=resolveInitEnv(_0x2d6ebd);console[_0x428dcd(0x187)](CLI_BIN_NAME+_0x428dcd(0x16b)+PRODUCT_CONFIG['newConfigFileName']+'\x0a');if(existsSync(_0x1d3bcb)&&!_0x2d6ebd[_0x428dcd(0x198)]){const _0xa08e61=await promptYesNo('File\x20'+_0x1d3bcb+_0x428dcd(0x186),![]);if(!_0xa08e61){console[_0x428dcd(0x187)](_0x428dcd(0x171));return;}}const _0x5ec3da=typeof _0x2d6ebd[_0x428dcd(0x172)]==='string'?_0x2d6ebd[_0x428dcd(0x172)][_0x428dcd(0x1a3)]():'';let _0x1a29dd=_0x5ec3da;!_0x1a29dd&&(_0x1a29dd=await promptInput('App\x20code',_0x25e024));if(!_0x1a29dd[_0x428dcd(0x1a3)]())throw CliErrors[_0x428dcd(0x18b)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x1d3bcb,{'appcode':_0x1a29dd[_0x428dcd(0x1a3)](),'env':_0x55f1ce},_0x2d6ebd),console[_0x428dcd(0x187)]('\x0aInitialized\x20'+_0x1d3bcb),console[_0x428dcd(0x187)](_0x428dcd(0x19f)+_0x1a29dd[_0x428dcd(0x1a3)]()),console[_0x428dcd(0x187)](_0x428dcd(0x16e)+_0x55f1ce);}function a31_0x38bc(){const _0x2c8852=['\x20\x20env:\x20\x20\x20\x20\x20','riskLevel','9PwdAvh','Aborted.','appcode','4584019WKdQXq','SIGINT','399DGIQYp','boolean','env','[y/N]','cancelled','Override\x20imported\x20default\x20env','close','Skip\x20confirmation\x20when\x20overwriting','\x20\x20default:\x20','):\x20','name','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Invalid\x20env\x20\x22','227524unltpL','6027410CIBWLh','apiDir','join','\x20already\x20exists.\x20Overwrite?','log','Usage:\x20','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','stdout','validation','Initialized\x20','Failed\x20to\x20parse\x20source\x20file:\x20','defaultApp','string','\x20\x20config:\x20\x20','\x22.\x20Allowed:\x20','entries','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','flagMissing','cwd','2185016vWqsPX','project','yes','question',')\x20instead\x20of\x20project','772707hPAaFW','toLowerCase','40qFFoZD','newConfigFileName','\x20\x20appcode:\x20','removeListener','race','470hEPQcT','trim','28332ZPEEik','Override\x20imported\x20default\x20appcode','parse','Imported\x20from\x20','3035WmvJqP','global','file','App\x20code\x20for\x20the\x20project','message','Source\x20file\x20not\x20found:\x20','Write\x20to\x20global\x20(~/','app','once','\x20init\x20—\x20Create\x20','apps','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.'];a31_0x38bc=function(){return _0x2c8852;};return a31_0x38bc();}async function writeInitConfig(_0x58d7a6,_0xe3afa3,_0x358dfb){const _0x4c27f1=a31_0xc56787;let _0x432ea={};existsSync(_0x58d7a6)&&!_0x358dfb[_0x4c27f1(0x198)]&&(_0x432ea=readConfigFile(_0x58d7a6));for(const [_0x1b5d98,_0x4536fe]of Object[_0x4c27f1(0x192)](_0xe3afa3)){_0x4536fe!==undefined&&(_0x432ea[_0x1b5d98]=_0x4536fe);}if(_0x432ea[_0x4c27f1(0x169)])delete _0x432ea[_0x4c27f1(0x169)];writeConfigFile(_0x58d7a6,_0x432ea);}class AbortPrompt extends Error{constructor(){const _0x214f3e=a31_0xc56787;super('User\x20aborted\x20prompt'),this[_0x214f3e(0x17f)]='AbortPrompt';}}function createSafeRl(){const _0x41b3fe=a31_0xc56787,_0x479711=createInterface({'input':process['stdin'],'output':process[_0x41b3fe(0x18a)]});let _0x3f819a;const _0x5d7df7=new Promise((_0x1c7e28,_0x1d3684)=>{const _0x373f9e=_0x41b3fe;_0x3f819a=()=>{const _0x473c72=a31_0x2db2;_0x3f819a&&(_0x479711[_0x473c72(0x1a0)]('SIGINT',_0x3f819a),_0x3f819a=undefined);try{_0x479711[_0x473c72(0x17b)]();}catch{}_0x1d3684(new AbortPrompt());},_0x479711[_0x373f9e(0x16a)](_0x373f9e(0x174),_0x3f819a);}),_0x2821ca=()=>{const _0x293864=_0x41b3fe;_0x3f819a&&(_0x479711[_0x293864(0x1a0)](_0x293864(0x174),_0x3f819a),_0x3f819a=undefined);try{_0x479711[_0x293864(0x17b)]();}catch{}};return{'rl':_0x479711,'abortPromise':_0x5d7df7,'disposeSuccess':_0x2821ca};}async function promptInput(_0x5a8843,_0x38d4e4){const _0x2cacf0=a31_0xc56787,{rl:_0x1669b0,abortPromise:_0x1b6499,disposeSuccess:_0x42c777}=createSafeRl(),_0x4b7021=new Promise(_0x5b6a5b=>{const _0x4be0f0=a31_0x2db2,_0x422e01=_0x38d4e4?'\x20\x20'+_0x5a8843+'\x20('+_0x38d4e4+_0x4be0f0(0x17e):'\x20\x20'+_0x5a8843+':\x20';_0x1669b0['question'](_0x422e01,_0x1c7de7=>{const _0x5b0209=_0x4be0f0;_0x42c777(),_0x5b6a5b(_0x1c7de7[_0x5b0209(0x1a3)]()||_0x38d4e4);});});return Promise[_0x2cacf0(0x1a1)]([_0x4b7021,_0x1b6499]);}async function promptYesNo(_0x1eee8a,_0x31a99b){const {rl:_0x2245c0,abortPromise:_0x409776,disposeSuccess:_0x434e8b}=createSafeRl(),_0x169d3e=new Promise(_0x1e7a43=>{const _0x2f5583=a31_0x2db2,_0x31fb38=_0x31a99b?'[Y/n]':_0x2f5583(0x178);_0x2245c0[_0x2f5583(0x199)]('\x20\x20'+_0x1eee8a+'\x20'+_0x31fb38+':\x20',_0x37d479=>{const _0x33f072=_0x2f5583;_0x434e8b();const _0x43a6ae=_0x37d479[_0x33f072(0x1a3)]()[_0x33f072(0x19c)]();if(_0x43a6ae==='y'||_0x43a6ae==='yes')_0x1e7a43(!![]);else{if(_0x43a6ae==='n'||_0x43a6ae==='no')_0x1e7a43(![]);else _0x1e7a43(_0x31a99b);}});});return Promise['race']([_0x169d3e,_0x409776]);}function loadExisting(_0x3aab89){if(!existsSync(_0x3aab89))return null;return readConfigFile(_0x3aab89);}function resolveFilePath(_0x470f62){const _0x48ce8a=a31_0xc56787;return isAbsolute(_0x470f62)?_0x470f62:resolve(process[_0x48ce8a(0x195)](),_0x470f62);}function readSourceFile(_0x24b1ef){const _0x4673fa=a31_0xc56787;try{const _0x1e1598=readFileSync(_0x24b1ef,{'encoding':'utf8'});return JSON[_0x4673fa(0x1a6)](_0x1e1598);}catch(_0x50afff){throw CliErrors[_0x4673fa(0x18b)](_0x4673fa(0x18d)+_0x50afff[_0x4673fa(0x166)]);}}function resolveInitEnv(_0x508fdd){const _0x54b0f0=a31_0xc56787,_0x2e9d0d=_0x508fdd[_0x54b0f0(0x177)];if(_0x2e9d0d===undefined||_0x2e9d0d==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES['includes'](_0x2e9d0d))throw CliErrors[_0x54b0f0(0x18b)](_0x54b0f0(0x181)+_0x2e9d0d+_0x54b0f0(0x191)+RUNTIME_ENV_VALUES[_0x54b0f0(0x185)](',\x20'));return _0x2e9d0d;}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x2f30d7=a32_0x4063;(function(_0x4f05f5,_0x360b53){const _0x375732=a32_0x4063,_0x29b997=_0x4f05f5();while(!![]){try{const _0x5a53cb=parseInt(_0x375732(0x15e))/0x1*(parseInt(_0x375732(0x178))/0x2)+parseInt(_0x375732(0x166))/0x3+parseInt(_0x375732(0x176))/0x4*(-parseInt(_0x375732(0x154))/0x5)+parseInt(_0x375732(0x167))/0x6+-parseInt(_0x375732(0x152))/0x7*(parseInt(_0x375732(0x171))/0x8)+parseInt(_0x375732(0x150))/0x9+parseInt(_0x375732(0x139))/0xa;if(_0x5a53cb===_0x360b53)break;else _0x29b997['push'](_0x29b997['shift']());}catch(_0x3b3025){_0x29b997['push'](_0x29b997['shift']());}}}(a32_0x5927,0x298dc));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x2f30d7(0x165),'type':'string','required':!![],'description':a32_0x2f30d7(0x162)},FILE_FLAG={'name':a32_0x2f30d7(0x174),'type':a32_0x2f30d7(0x16b),'required':!![],'description':a32_0x2f30d7(0x175)},QUERY_FLAG={'name':a32_0x2f30d7(0x15a),'type':a32_0x2f30d7(0x16b),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x2f30d7(0x177),'type':a32_0x2f30d7(0x15b),'description':a32_0x2f30d7(0x168)};function readKnowledgeFile(_0x4c14aa){const _0x514a59=a32_0x2f30d7;if(!_0x4c14aa)throw CliErrors[_0x514a59(0x161)](_0x514a59(0x158));if(!existsSync(_0x4c14aa))throw CliErrors[_0x514a59(0x161)](_0x514a59(0x15d)+_0x4c14aa);if(!statSync(_0x4c14aa)[_0x514a59(0x169)]())throw CliErrors[_0x514a59(0x161)](_0x514a59(0x13d)+_0x4c14aa);return readFileSync(_0x4c14aa,'utf8');}function summarizePersonalItem(_0xc992d6){const _0x4b2699=a32_0x2f30d7;return{'id':_0xc992d6['id'],'title':_0xc992d6[_0x4b2699(0x165)],'version':_0xc992d6[_0x4b2699(0x14a)],'ragStatus':_0xc992d6['ragStatus'],'ragErrorMessage':_0xc992d6[_0x4b2699(0x172)],'updateTime':_0xc992d6['updateTime']};}function detailPersonalItem(_0xcc113){const _0x2d149e=a32_0x2f30d7;return{'id':_0xcc113['id'],'appCode':_0xcc113[_0x2d149e(0x143)],'scope':_0xcc113['scope'],'userId':_0xcc113['userId'],'title':_0xcc113[_0x2d149e(0x165)],'content':_0xcc113[_0x2d149e(0x146)]??'','version':_0xcc113[_0x2d149e(0x14a)],'ragStatus':_0xcc113[_0x2d149e(0x148)],'ragErrorMessage':_0xcc113[_0x2d149e(0x172)],'createTime':_0xcc113[_0x2d149e(0x16d)],'updateTime':_0xcc113[_0x2d149e(0x151)]};}function summarizeSearchHit(_0xf6012){const _0x5bf17a=a32_0x2f30d7;return{'scope':_0xf6012[_0x5bf17a(0x14e)],'title':_0xf6012[_0x5bf17a(0x165)],'docId':_0xf6012[_0x5bf17a(0x173)],'score':_0xf6012[_0x5bf17a(0x15c)],'weightedScore':_0xf6012[_0x5bf17a(0x141)],'content':_0xf6012[_0x5bf17a(0x146)],'metadata':_0xf6012['metadata']};}function readTopK(_0x4ad341){const _0x3f8274=a32_0x2f30d7,_0x53aa1f=_0x4ad341[_0x3f8274(0x13c)](_0x3f8274(0x177));if(_0x53aa1f===undefined||_0x53aa1f===null||_0x53aa1f==='')return undefined;const _0x158545=_0x4ad341[_0x3f8274(0x155)](_0x3f8274(0x177));if(!Number[_0x3f8274(0x149)](_0x158545)||_0x158545<0x1)throw CliErrors['validation'](_0x3f8274(0x147));return _0x158545;}function a32_0x5927(){const _0xea7626=['str','1583768beOepv','ragErrorMessage','docId','file','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','1278644wqwPnL','topk','105778yPgAxN','length','139080cUvyPc','verbose','read','flag','File\x20is\x20not\x20a\x20regular\x20file:\x20','search','list','Search\x20query\x20is\x20required.','weightedScore','bool','appCode','POST','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','content','--topk\x20must\x20be\x20a\x20positive\x20number.','ragStatus','isFinite','version','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','trim','scope','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','555804swyDGf','updateTime','7WjZqoe','/update','5NUcaQi','num','body','map','File\x20path\x20is\x20required.','description','query','number','score','File\x20not\x20found:\x20','2OvQvOU','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Personal\x20knowledge-base\x20entry\x20ID','validation','Personal\x20knowledge-base\x20entry\x20title','create','/client/knowledge-base/personal/','title','860712HLnjDh','1316940xSYvOb','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','isFile','write','string','build','createTime','/client/knowledge-base/personal/create','update'];a32_0x5927=function(){return _0xea7626;};return a32_0x5927();}function a32_0x4063(_0x8a621,_0x282b6b){_0x8a621=_0x8a621-0x139;const _0x5927e5=a32_0x5927();let _0x4063fc=_0x5927e5[_0x8a621];return _0x4063fc;}const kbList={'service':'kb','command':a32_0x2f30d7(0x13f),'description':a32_0x2f30d7(0x14b),'risk':a32_0x2f30d7(0x13b),'flags':[VERBOSE_FLAG],async 'execute'(_0x3fc1e8){const _0x4a8ce1=a32_0x2f30d7,_0x54f7e0=await listPersonalKnowledgeBaseItems(_0x3fc1e8[_0x4a8ce1(0x143)]);if(_0x3fc1e8[_0x4a8ce1(0x142)](_0x4a8ce1(0x13a)))return{'ok':!![],'data':{'total':_0x54f7e0[_0x4a8ce1(0x179)],'items':_0x54f7e0}};return{'ok':!![],'data':{'total':_0x54f7e0['length'],'items':_0x54f7e0['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':a32_0x2f30d7(0x13b),'flags':[{...ID_FLAG,'description':a32_0x2f30d7(0x160)}],async 'execute'(_0x255262){const _0x54fb76=a32_0x2f30d7,_0x362877=await getPersonalKnowledgeBaseItem(_0x255262[_0x54fb76(0x155)]('id'),_0x255262[_0x54fb76(0x143)]);return{'ok':!![],'data':detailPersonalItem(_0x362877)};}},kbCreate={'service':'kb','command':a32_0x2f30d7(0x163),'description':a32_0x2f30d7(0x15f),'risk':a32_0x2f30d7(0x16a),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x548e5f){const _0x1b4a46=a32_0x2f30d7,_0x4e36c0=_0x548e5f[_0x1b4a46(0x170)]('title'),_0x487fae=readKnowledgeFile(_0x548e5f['str']('file')),_0x5a6ab3=await createPersonalKnowledgeBaseItem(_0x548e5f['appCode'],{'title':_0x4e36c0,'content':_0x487fae});return{'ok':!![],'data':summarizePersonalItem(_0x5a6ab3),'message':'Created\x20KB\x20entry\x20'+_0x5a6ab3['id']+'\x20('+_0x5a6ab3[_0x1b4a46(0x165)]+')'};},async 'dryRun'(_0x3a7f93){const _0x45683e=a32_0x2f30d7,_0x3dd217=_0x3a7f93[_0x45683e(0x170)](_0x45683e(0x165)),_0x236057=readKnowledgeFile(_0x3a7f93[_0x45683e(0x170)]('file'));return dryRun(_0x45683e(0x144),_0x45683e(0x16e))[_0x45683e(0x156)]({'appCode':_0x3a7f93[_0x45683e(0x143)],'title':_0x3dd217,'content':_0x236057})['description'](_0x45683e(0x14f)+_0x3dd217+'\x22')[_0x45683e(0x16c)]();}},kbUpdate={'service':'kb','command':a32_0x2f30d7(0x16f),'description':a32_0x2f30d7(0x145),'risk':a32_0x2f30d7(0x16a),'flags':[{...ID_FLAG,'description':a32_0x2f30d7(0x160)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x19e041){const _0xf57a87=a32_0x2f30d7,_0x4c8fa5=_0x19e041[_0xf57a87(0x155)]('id'),_0x4178e8=readKnowledgeFile(_0x19e041[_0xf57a87(0x170)](_0xf57a87(0x174))),_0xa61b9b=_0x19e041['str'](_0xf57a87(0x165))||(await getPersonalKnowledgeBaseItem(_0x4c8fa5,_0x19e041[_0xf57a87(0x143)]))[_0xf57a87(0x165)],_0x41cfa8=await updatePersonalKnowledgeBaseItem(_0x4c8fa5,_0x19e041[_0xf57a87(0x143)],{'title':_0xa61b9b,'content':_0x4178e8});return{'ok':!![],'data':summarizePersonalItem(_0x41cfa8),'message':'Updated\x20KB\x20entry\x20'+_0x41cfa8['id']+'\x20('+_0x41cfa8[_0xf57a87(0x165)]+')'};},async 'dryRun'(_0x23d018){const _0x23bd47=a32_0x2f30d7,_0x2697d6=_0x23d018[_0x23bd47(0x155)]('id'),_0x2b3296=readKnowledgeFile(_0x23d018['str'](_0x23bd47(0x174))),_0x5b319c=_0x23d018[_0x23bd47(0x170)](_0x23bd47(0x165))||(await getPersonalKnowledgeBaseItem(_0x2697d6,_0x23d018['appCode']))[_0x23bd47(0x165)];return dryRun(_0x23bd47(0x144),_0x23bd47(0x164)+_0x2697d6+_0x23bd47(0x153))[_0x23bd47(0x156)]({'appCode':_0x23d018['appCode'],'title':_0x5b319c,'content':_0x2b3296})[_0x23bd47(0x159)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x2697d6)[_0x23bd47(0x16c)]();}},kbSearch={'service':'kb','command':a32_0x2f30d7(0x13e),'description':a32_0x2f30d7(0x14c),'risk':a32_0x2f30d7(0x13b),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0xcc7d40){const _0x4eff52=a32_0x2f30d7;if(!_0xcc7d40[_0x4eff52(0x170)](_0x4eff52(0x15a))[_0x4eff52(0x14d)]())throw CliErrors[_0x4eff52(0x161)](_0x4eff52(0x140));readTopK(_0xcc7d40);},async 'execute'(_0xd1237a){const _0x3a04e6=a32_0x2f30d7,_0x2eab56=_0xd1237a[_0x3a04e6(0x170)](_0x3a04e6(0x15a))[_0x3a04e6(0x14d)](),_0x355cbe=readTopK(_0xd1237a),_0x4ad4d4=await searchKnowledgeBase(_0xd1237a['appCode'],{'query':_0x2eab56,'topK':_0x355cbe});return{'ok':!![],'data':{'total':_0x4ad4d4[_0x3a04e6(0x179)],'hits':_0x4ad4d4[_0x3a04e6(0x157)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x5e22bd=a33_0x1de2;(function(_0x2c88f8,_0x47d48e){const _0x2e0a00=a33_0x1de2,_0x5d5119=_0x2c88f8();while(!![]){try{const _0x1c6c97=parseInt(_0x2e0a00(0x13d))/0x1*(-parseInt(_0x2e0a00(0x152))/0x2)+parseInt(_0x2e0a00(0x13f))/0x3*(-parseInt(_0x2e0a00(0x148))/0x4)+parseInt(_0x2e0a00(0x158))/0x5+-parseInt(_0x2e0a00(0x146))/0x6+-parseInt(_0x2e0a00(0x151))/0x7+parseInt(_0x2e0a00(0x147))/0x8+parseInt(_0x2e0a00(0x142))/0x9;if(_0x1c6c97===_0x47d48e)break;else _0x5d5119['push'](_0x5d5119['shift']());}catch(_0x4c9b9c){_0x5d5119['push'](_0x5d5119['shift']());}}}(a33_0xa4d5,0xcdad7));import{logger}from'../../utils/logger.js';function a33_0x1de2(_0x1129b9,_0x70c71c){_0x1129b9=_0x1129b9-0x13c;const _0xa4d5c7=a33_0xa4d5();let _0x1de2da=_0xa4d5c7[_0x1129b9];return _0x1de2da;}function a33_0xa4d5(){const _0x36ba34=['level','20586141nzRdRf','length','\x20\x20\x20Duration:\x20','\x20\x20\x20Time:\x20','2967006KfIive','3526424qMLQKK','8LOxCKE','keys','View\x20command\x20history\x20logs','toLocaleString','read','log','error','duration','*\x20No\x20logs\x20found','10994900zmUnhw','2906nCjeoS','\x20logs:\x0a','clearLogs','en-US','write','\x20\x20\x20Details:\x20','6007095vFqVqJ','clear','Clear\x20command\x20history\x20logs','forEach','details','stringify','command','569NkVIii','show','292737atjQem','logs'];a33_0xa4d5=function(){return _0x36ba34;};return a33_0xa4d5();}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x19e518){const _0x2468fa=a33_0x1de2;if(_0x19e518[_0x2468fa(0x143)]===0x0){console[_0x2468fa(0x14d)](_0x2468fa(0x150));return;}console[_0x2468fa(0x14d)]('*\x20'+CLI_DISPLAY_NAME+_0x2468fa(0x153)),_0x19e518[_0x2468fa(0x15b)]((_0x351cc6,_0x53acb8)=>{const _0x12619d=_0x2468fa,_0x558b84=new Date(_0x351cc6['timestamp'])[_0x12619d(0x14b)](_0x12619d(0x155)),_0x5d6cf7=_0x351cc6[_0x12619d(0x141)]==='success'?'√':_0x351cc6[_0x12619d(0x141)]===_0x12619d(0x14e)?'×':_0x351cc6[_0x12619d(0x141)]==='warn'?'!':'i';console[_0x12619d(0x14d)](_0x53acb8+0x1+'.\x20'+_0x5d6cf7+'\x20['+_0x351cc6[_0x12619d(0x13c)]+']\x20'+_0x351cc6['message']),console['log'](_0x12619d(0x145)+_0x558b84),_0x351cc6[_0x12619d(0x14f)]&&console['log'](_0x12619d(0x144)+_0x351cc6[_0x12619d(0x14f)]+'ms'),_0x351cc6[_0x12619d(0x15c)]&&Object[_0x12619d(0x149)](_0x351cc6['details'])[_0x12619d(0x143)]>0x0&&console['log'](_0x12619d(0x157)+JSON[_0x12619d(0x15d)](_0x351cc6['details'],null,0x2)),console[_0x12619d(0x14d)]('');});}export const logsDefinitions=[{'service':a33_0x5e22bd(0x140),'command':a33_0x5e22bd(0x13e),'description':a33_0x5e22bd(0x14a),'risk':a33_0x5e22bd(0x14c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x404b9d){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':'logs','command':a33_0x5e22bd(0x159),'description':a33_0x5e22bd(0x15a),'risk':a33_0x5e22bd(0x156),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2b3a6a){const _0x408e60=a33_0x5e22bd;return logger[_0x408e60(0x154)](),console[_0x408e60(0x14d)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x3a7f88=a34_0x1ad4;function a34_0x1ad4(_0x2d8a69,_0x381ae4){_0x2d8a69=_0x2d8a69-0x1b4;const _0x423103=a34_0x4231();let _0x1ad4e1=_0x423103[_0x2d8a69];return _0x1ad4e1;}(function(_0x16cb9f,_0x572ea2){const _0x4d5f3b=a34_0x1ad4,_0x36954d=_0x16cb9f();while(!![]){try{const _0x1a1d93=-parseInt(_0x4d5f3b(0x1b6))/0x1+parseInt(_0x4d5f3b(0x1c7))/0x2+parseInt(_0x4d5f3b(0x1bf))/0x3+parseInt(_0x4d5f3b(0x1ce))/0x4+parseInt(_0x4d5f3b(0x1c1))/0x5+parseInt(_0x4d5f3b(0x1e5))/0x6+-parseInt(_0x4d5f3b(0x1c9))/0x7*(parseInt(_0x4d5f3b(0x1c5))/0x8);if(_0x1a1d93===_0x572ea2)break;else _0x36954d['push'](_0x36954d['shift']());}catch(_0x3a301f){_0x36954d['push'](_0x36954d['shift']());}}}(a34_0x4231,0xe474f));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a34_0x4231(){const _0x15c2ba=['string','/client/ocr','write','\x20OCR\x20from\x20URL','POST','build','Publicly\x20accessible\x20image\x20or\x20file\x20URL','length','description','validation','path','fileUrl','filter','ocr','.\x20Supported\x20scenes:\x20','idCard','<filePath\x20returned\x20by\x20/client/uploadFile>','str','trim','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','8837832CMlcUa','filePath','General','1429475NshSQE','scene','Unsupported\x20OCR\x20scene:\x20','body','imageFile','apiError','fileName','Invoice','toLowerCase','2446917OEdmTe','\x20OCR','2618050jQGtrH','idcard','general','Table','279248Yjefsy','appCode','877126cpquzM','imageUrl','273FWIXmX','count','image-file','image-url','/client/uploadFile','1903136jWDxQi','invoice'];a34_0x4231=function(){return _0x15c2ba;};return a34_0x4231();}import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=['invoice',a34_0x3a7f88(0x1c3),'form',a34_0x3a7f88(0x1df)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x3a7f88(0x1bd),'general':a34_0x3a7f88(0x1b5),'form':a34_0x3a7f88(0x1c4),'idCard':'IdCard'},SCENE_FLAG={'name':'scene','type':a34_0x3a7f88(0x1d0),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x3a7f88(0x1e4)},IMAGE_FILE_FLAG={'name':a34_0x3a7f88(0x1cb),'type':'string','description':'Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':'image-url','type':a34_0x3a7f88(0x1d0),'description':a34_0x3a7f88(0x1d6)};function normalizeScene(_0x4b5b11){const _0x4b20a1=a34_0x3a7f88,_0x4d08f7=_0x4b5b11[_0x4b20a1(0x1e2)]()[_0x4b20a1(0x1be)]();if(_0x4d08f7===_0x4b20a1(0x1c2))return _0x4b20a1(0x1df);if(_0x4d08f7===_0x4b20a1(0x1cf)||_0x4d08f7===_0x4b20a1(0x1c3)||_0x4d08f7==='form')return _0x4d08f7;throw CliErrors['validation'](_0x4b20a1(0x1b8)+_0x4b5b11+_0x4b20a1(0x1de)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x328685){const _0xbcfaca=a34_0x3a7f88,_0x37ad0f=_0x328685[_0xbcfaca(0x1e1)](_0xbcfaca(0x1cb))[_0xbcfaca(0x1e2)](),_0x45c854=_0x328685['str'](_0xbcfaca(0x1cc))[_0xbcfaca(0x1e2)]();return{'imageFile':_0x37ad0f,'imageUrl':_0x45c854,'count':[_0x37ad0f,_0x45c854][_0xbcfaca(0x1dc)](Boolean)[_0xbcfaca(0x1d7)]};}function validateInputSelection(_0x26ba6f){const _0x4ec2e2=a34_0x3a7f88,_0x2126bc=selectedInputs(_0x26ba6f);if(_0x2126bc[_0x4ec2e2(0x1ca)]!==0x1)throw CliErrors[_0x4ec2e2(0x1d9)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x2126bc;}function withScene(_0x15bcb5,_0x400a99,_0x5396d0){const _0x230d03=a34_0x3a7f88;return{..._0x15bcb5,'scene':_0x400a99,..._0x5396d0?{'sourceFile':{'fileName':_0x5396d0[_0x230d03(0x1bc)],'filePath':_0x5396d0[_0x230d03(0x1b4)]}}:{}};}const ocrRecognize={'service':a34_0x3a7f88(0x1dd),'command':'recognize','description':'Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','risk':a34_0x3a7f88(0x1d2),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x4a108b){const _0x33f031=a34_0x3a7f88,_0x39ae5e=normalizeScene(_0x4a108b['str']('scene')),_0x5b015c=SCENE_TO_LEGACY_TYPE[_0x39ae5e],_0x257819=validateInputSelection(_0x4a108b);if(_0x257819[_0x33f031(0x1c8)])return dryRun(_0x33f031(0x1d4),_0x33f031(0x1d1))['body']({'appCode':_0x4a108b[_0x33f031(0x1c6)],'url':_0x257819[_0x33f031(0x1c8)],'type':_0x5b015c})['description']('Preview:\x20recognize\x20'+_0x39ae5e+_0x33f031(0x1d3))['build']();const _0x24977d=requireRuntimeUploadFile(_0x257819[_0x33f031(0x1ba)],_0x33f031(0x1cb));return dryRun(_0x33f031(0x1d4),_0x33f031(0x1cd))[_0x33f031(0x1b9)]({'steps':[{'method':_0x33f031(0x1d4),'url':_0x33f031(0x1cd),'body':{'appCode':_0x4a108b[_0x33f031(0x1c6)],'multipart':{'file':_0x24977d}}},{'method':_0x33f031(0x1d4),'url':'/client/queryFileUrl','body':{'filePath':_0x33f031(0x1e0),'downloadFlag':![]}},{'method':_0x33f031(0x1d4),'url':_0x33f031(0x1d1),'body':{'appCode':_0x4a108b['appCode'],'url':_0x33f031(0x1e3),'type':_0x5b015c}}]})[_0x33f031(0x1d8)]('Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x39ae5e+_0x33f031(0x1c0))[_0x33f031(0x1d5)]();},async 'execute'(_0xb7c957){const _0x8c0486=a34_0x3a7f88,_0x1bb668=normalizeScene(_0xb7c957[_0x8c0486(0x1e1)](_0x8c0486(0x1b7))),_0x1d8244=SCENE_TO_LEGACY_TYPE[_0x1bb668],_0x239e0c=validateInputSelection(_0xb7c957);if(_0x239e0c[_0x8c0486(0x1c8)]){const _0x241531=await recognizeRuntimeOcr(_0xb7c957[_0x8c0486(0x1c6)],{'url':_0x239e0c[_0x8c0486(0x1c8)],'type':_0x1d8244});return{'ok':!![],'data':withScene(_0x241531,_0x1bb668)};}const _0x32a55b=requireRuntimeUploadFile(_0x239e0c[_0x8c0486(0x1ba)],_0x8c0486(0x1cb)),_0x17460c=await uploadRuntimeFile(_0xb7c957[_0x8c0486(0x1c6)],_0x32a55b[_0x8c0486(0x1da)]);if(!_0x17460c['filePath'])throw CliErrors['apiError']('File\x20upload\x20response\x20missing\x20filePath.');const _0x30334e=await queryRuntimeFileUrl(_0x17460c[_0x8c0486(0x1b4)],{'download':![]});if(!_0x30334e[_0x8c0486(0x1db)])throw CliErrors[_0x8c0486(0x1bb)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x4c43d4=await recognizeRuntimeOcr(_0xb7c957[_0x8c0486(0x1c6)],{'url':_0x30334e[_0x8c0486(0x1db)],'type':_0x1d8244});return{'ok':!![],'data':withScene(_0x4c43d4,_0x1bb668,_0x17460c)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a35_0x1f63ad=a35_0x5892;(function(_0x259375,_0x248e7e){const _0x171d1e=a35_0x5892,_0x42542e=_0x259375();while(!![]){try{const _0x46cd36=parseInt(_0x171d1e(0xdf))/0x1*(-parseInt(_0x171d1e(0xef))/0x2)+-parseInt(_0x171d1e(0xc6))/0x3*(parseInt(_0x171d1e(0xc7))/0x4)+-parseInt(_0x171d1e(0xf1))/0x5+-parseInt(_0x171d1e(0xd4))/0x6+-parseInt(_0x171d1e(0xc8))/0x7+parseInt(_0x171d1e(0xc5))/0x8+-parseInt(_0x171d1e(0xd1))/0x9*(-parseInt(_0x171d1e(0xd7))/0xa);if(_0x46cd36===_0x248e7e)break;else _0x42542e['push'](_0x42542e['shift']());}catch(_0x362ec2){_0x42542e['push'](_0x42542e['shift']());}}}(a35_0x22ed,0x9f7ab));import{existsSync,readFileSync,statSync}from'node:fs';function a35_0x22ed(){const _0x18f7bf=['Optional\x20source\x20RuntimeAgent\x20session\x20id','/client/runtime-bff/personal/','params','Update\x20a\x20personal\x20BFF\x20by\x20id','scriptType','gmtCreate','sourceSessionId','2377638luqXIa','update','verbose','5662362NZQNVy','file','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','110LxfXwf','scriptContent','Executed\x20personal\x20BFF\x20','appCode','version','map','description','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','7aFbBmD','isFile','functionName','name','trim','File\x20not\x20found:\x20','isArray','updateTime','/client/runtime-bff/personal/create','list','Show\x20one\x20personal\x20BFF\x20by\x20id','POST','read','Personal\x20BFF\x20description','high-risk-write','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','62362bYNTXh','createUserId','880000RfJOFZ','Preview:\x20create\x20personal\x20BFF\x20','Created\x20personal\x20BFF\x20','build','config','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','create','body','bool','utf8','Preview:\x20update\x20personal\x20BFF\x20','test','flag','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','str','Personal\x20BFF\x20script\x20ID','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','validation','gmtModified','write','personal-bff','exec','keys','num','string','source-session-id','6542528QZpTEk','3tbMtdY','2740412sCRLqY','7332458PcQoGk','File\x20path\x20is\x20required.'];a35_0x22ed=function(){return _0x18f7bf;};return a35_0x22ed();}import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':'file','type':a35_0x1f63ad(0xc3),'description':a35_0x1f63ad(0xd6)},FUNCTION_NAME_FLAG={'name':a35_0x1f63ad(0xe2),'type':'string','required':!![],'description':a35_0x1f63ad(0xde)},DESCRIPTION_FLAG={'name':a35_0x1f63ad(0xdd),'type':a35_0x1f63ad(0xc3),'description':a35_0x1f63ad(0xec)},SOURCE_SESSION_FLAG={'name':a35_0x1f63ad(0xc4),'type':a35_0x1f63ad(0xc3),'description':a35_0x1f63ad(0xca)};function normalizeFunctionName(_0x3d7e02){const _0x3a4cea=a35_0x1f63ad,_0xba2c04=String(_0x3d7e02||'')[_0x3a4cea(0xe3)]();if(!_0xba2c04||!FUNCTION_NAME_PATTERN[_0x3a4cea(0xfc)](_0xba2c04))throw CliErrors[_0x3a4cea(0xbc)](_0x3a4cea(0xf6));return _0xba2c04;}function readScriptFile(_0x542bfb){const _0x31305e=a35_0x1f63ad;if(!_0x542bfb)throw CliErrors['validation'](_0x31305e(0xc9));if(!existsSync(_0x542bfb))throw CliErrors[_0x31305e(0xbc)](_0x31305e(0xe4)+_0x542bfb);if(!statSync(_0x542bfb)[_0x31305e(0xe0)]())throw CliErrors[_0x31305e(0xbc)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x542bfb);const _0x55c1e9=readFileSync(_0x542bfb,_0x31305e(0xfa));if(!_0x55c1e9[_0x31305e(0xe3)]())throw CliErrors[_0x31305e(0xbc)]('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0x55c1e9;}function optionalTrimmed(_0x4ab6aa){const _0x561dd0=String(_0x4ab6aa||'')['trim']();return _0x561dd0||undefined;}function summarizeBff(_0x52cccf){const _0x5973c2=a35_0x1f63ad;return{'id':_0x52cccf['id'],'appCode':_0x52cccf[_0x5973c2(0xda)],'functionName':_0x52cccf[_0x5973c2(0xe1)],'description':_0x52cccf[_0x5973c2(0xdd)],'scriptType':_0x52cccf[_0x5973c2(0xce)],'version':_0x52cccf[_0x5973c2(0xdb)],'gmtModified':_0x52cccf[_0x5973c2(0xbd)],'updateTime':_0x52cccf[_0x5973c2(0xe6)]};}function detailBff(_0x2a76b4){const _0x3c2260=a35_0x1f63ad;return{'id':_0x2a76b4['id'],'appCode':_0x2a76b4[_0x3c2260(0xda)],'functionName':_0x2a76b4[_0x3c2260(0xe1)],'description':_0x2a76b4[_0x3c2260(0xdd)],'scriptType':_0x2a76b4[_0x3c2260(0xce)],'scriptContent':_0x2a76b4[_0x3c2260(0xd8)]??'','config':_0x2a76b4[_0x3c2260(0xf5)],'version':_0x2a76b4[_0x3c2260(0xdb)],'createUserId':_0x2a76b4[_0x3c2260(0xf0)],'gmtCreate':_0x2a76b4[_0x3c2260(0xcf)],'gmtModified':_0x2a76b4[_0x3c2260(0xbd)],'createTime':_0x2a76b4['createTime'],'updateTime':_0x2a76b4[_0x3c2260(0xe6)]};}function a35_0x5892(_0xa73534,_0x349130){_0xa73534=_0xa73534-0xb9;const _0x22edc8=a35_0x22ed();let _0x5892fb=_0x22edc8[_0xa73534];return _0x5892fb;}function buildCreateInput(_0x18a8d5){const _0x5e2925=a35_0x1f63ad;return{'functionName':normalizeFunctionName(_0x18a8d5[_0x5e2925(0xb9)]('name')),...optionalTrimmed(_0x18a8d5[_0x5e2925(0xb9)](_0x5e2925(0xdd)))?{'description':optionalTrimmed(_0x18a8d5[_0x5e2925(0xb9)](_0x5e2925(0xdd)))}:{},'scriptContent':readScriptFile(_0x18a8d5[_0x5e2925(0xb9)](_0x5e2925(0xd5))),...optionalTrimmed(_0x18a8d5[_0x5e2925(0xb9)](_0x5e2925(0xc4)))?{'sourceSessionId':optionalTrimmed(_0x18a8d5['str'](_0x5e2925(0xc4)))}:{}};}function buildUpdateInput(_0xfdf460){const _0x5b3a6a=a35_0x1f63ad,_0x178262={};optionalTrimmed(_0xfdf460[_0x5b3a6a(0xb9)]('name'))&&(_0x178262[_0x5b3a6a(0xe1)]=normalizeFunctionName(_0xfdf460['str'](_0x5b3a6a(0xe2))));_0xfdf460['flag'](_0x5b3a6a(0xdd))!==undefined&&(_0x178262[_0x5b3a6a(0xdd)]=_0xfdf460['str'](_0x5b3a6a(0xdd)));optionalTrimmed(_0xfdf460[_0x5b3a6a(0xb9)](_0x5b3a6a(0xd5)))&&(_0x178262[_0x5b3a6a(0xd8)]=readScriptFile(_0xfdf460['str'](_0x5b3a6a(0xd5))));_0xfdf460[_0x5b3a6a(0xfd)]('source-session-id')!==undefined&&(_0x178262[_0x5b3a6a(0xd0)]=_0xfdf460[_0x5b3a6a(0xb9)](_0x5b3a6a(0xc4)));if(Object[_0x5b3a6a(0xc1)](_0x178262)['length']===0x0)throw CliErrors[_0x5b3a6a(0xbc)](_0x5b3a6a(0xbb));return _0x178262;}function parseExecParams(_0xea13d2){const _0x218f0d=a35_0x1f63ad,_0x20c058=parseJsonParams(_0xea13d2)??{};if(Array[_0x218f0d(0xe5)](_0x20c058))throw CliErrors[_0x218f0d(0xbc)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x20c058;}const personalBffList={'service':a35_0x1f63ad(0xbf),'command':a35_0x1f63ad(0xe8),'description':'List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','risk':a35_0x1f63ad(0xeb),'flags':[VERBOSE_FLAG],async 'execute'(_0x3e9945){const _0x395f4c=a35_0x1f63ad,_0xa4efb1=await listPersonalBffs(_0x3e9945[_0x395f4c(0xda)]);return{'ok':!![],'data':{'total':_0xa4efb1['length'],'items':_0x3e9945[_0x395f4c(0xf9)](_0x395f4c(0xd3))?_0xa4efb1:_0xa4efb1[_0x395f4c(0xdc)](summarizeBff)}};}},personalBffDetail={'service':a35_0x1f63ad(0xbf),'command':'detail','description':a35_0x1f63ad(0xe9),'risk':'read','flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x21fd2a){const _0x46c5ab=a35_0x1f63ad,_0x2edbf6=await getPersonalBff(_0x21fd2a[_0x46c5ab(0xc2)]('id'),_0x21fd2a[_0x46c5ab(0xda)]);return{'ok':!![],'data':detailBff(_0x2edbf6)};}},personalBffCreate={'service':a35_0x1f63ad(0xbf),'command':a35_0x1f63ad(0xf7),'description':'Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','risk':a35_0x1f63ad(0xbe),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x257b64){const _0x3076d3=a35_0x1f63ad,_0x74e642=buildCreateInput(_0x257b64),_0x1ca965=await createPersonalBff(_0x257b64['appCode'],_0x74e642);return{'ok':!![],'data':detailBff(_0x1ca965),'message':_0x3076d3(0xf3)+_0x1ca965['id']+(_0x1ca965['functionName']?'\x20('+_0x1ca965[_0x3076d3(0xe1)]+')':'')};},async 'dryRun'(_0x518027){const _0x5bdb1d=a35_0x1f63ad,_0x282c7c=buildCreateInput(_0x518027);return dryRun(_0x5bdb1d(0xea),_0x5bdb1d(0xe7))[_0x5bdb1d(0xf8)]({'appCode':_0x518027['appCode'],..._0x282c7c})['description'](_0x5bdb1d(0xf2)+_0x282c7c[_0x5bdb1d(0xe1)])[_0x5bdb1d(0xf4)]();}},personalBffUpdate={'service':a35_0x1f63ad(0xbf),'command':a35_0x1f63ad(0xd2),'description':a35_0x1f63ad(0xcd),'risk':a35_0x1f63ad(0xbe),'flags':[{...ID_FLAG,'description':a35_0x1f63ad(0xba)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x26f8c9){const _0x25f55c=a35_0x1f63ad,_0x385606=_0x26f8c9[_0x25f55c(0xc2)]('id'),_0x19a8c5=buildUpdateInput(_0x26f8c9),_0x33837e=await updatePersonalBff(_0x385606,_0x26f8c9[_0x25f55c(0xda)],_0x19a8c5);return{'ok':!![],'data':detailBff(_0x33837e),'message':'Updated\x20personal\x20BFF\x20'+_0x33837e['id']+(_0x33837e['functionName']?'\x20('+_0x33837e[_0x25f55c(0xe1)]+')':'')};},async 'dryRun'(_0x47b5b5){const _0x48b530=a35_0x1f63ad,_0xad4344=_0x47b5b5[_0x48b530(0xc2)]('id'),_0xd6b18e=buildUpdateInput(_0x47b5b5);return dryRun(_0x48b530(0xea),_0x48b530(0xcb)+_0xad4344+'/update')[_0x48b530(0xf8)]({'appCode':_0x47b5b5[_0x48b530(0xda)],..._0xd6b18e})[_0x48b530(0xdd)](_0x48b530(0xfb)+_0xad4344)[_0x48b530(0xf4)]();}},personalBffExec={'service':a35_0x1f63ad(0xbf),'command':a35_0x1f63ad(0xc0),'description':a35_0x1f63ad(0xee),'risk':a35_0x1f63ad(0xed),'flags':[{...ID_FLAG,'description':a35_0x1f63ad(0xba)},{...PARAMS_FLAG,'description':a35_0x1f63ad(0xfe)}],async 'validate'(_0x3d102e){const _0x56ef4a=a35_0x1f63ad;parseExecParams(_0x3d102e[_0x56ef4a(0xb9)](_0x56ef4a(0xcc)));},async 'execute'(_0x2cfa24){const _0x12e865=a35_0x1f63ad,_0x1156de=_0x2cfa24[_0x12e865(0xc2)]('id'),_0x1fc9c2=parseExecParams(_0x2cfa24[_0x12e865(0xb9)](_0x12e865(0xcc))),_0x139edc=await executePersonalBff(_0x1156de,_0x2cfa24[_0x12e865(0xda)],_0x1fc9c2);return{'ok':!![],'data':{'result':_0x139edc},'message':_0x12e865(0xd9)+_0x1156de};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
|
|
1
|
+
const a35_0x3ec7a3=a35_0x298f;function a35_0x4e65(){const _0x4c1e04=['Personal\x20BFF\x20script\x20ID','write','POST','functionName','Updated\x20personal\x20BFF\x20','length','updateTime','Update\x20a\x20personal\x20BFF\x20by\x20id','/client/runtime-bff/personal/create','1858940yVlsGQ','isArray','high-risk-write','read','flag','--params\x20must\x20be\x20a\x20JSON\x20object.','createUserId','1AaNaVD','appCode','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','verbose','scriptContent','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','Executed\x20personal\x20BFF\x20','string','Preview:\x20create\x20personal\x20BFF\x20','str','3693690WtTveR','update','4004164dSvChb','num','map','1758072sgsPrV','7GLPBnS','exec','gmtCreate','description','File\x20is\x20not\x20a\x20regular\x20file:\x20','1434159wkAQNf','params','150tTsSzj','body','File\x20path\x20is\x20required.','version','Preview:\x20update\x20personal\x20BFF\x20','sourceSessionId','3759335IhHNkk','build','Created\x20personal\x20BFF\x20','2834320yXqrmx','scriptType','validation','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','/client/runtime-bff/personal/','config','Personal\x20BFF\x20script\x20file\x20is\x20blank.','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','File\x20not\x20found:\x20','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','gmtModified','personal-bff','source-session-id','Show\x20one\x20personal\x20BFF\x20by\x20id','isFile','test','name','file','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.'];a35_0x4e65=function(){return _0x4c1e04;};return a35_0x4e65();}(function(_0x158014,_0x3c43a4){const _0x3034c9=a35_0x298f,_0x243c83=_0x158014();while(!![]){try{const _0x295b18=parseInt(_0x3034c9(0x192))/0x1*(-parseInt(_0x3034c9(0x18b))/0x2)+parseInt(_0x3034c9(0x19c))/0x3+-parseInt(_0x3034c9(0x19e))/0x4+-parseInt(_0x3034c9(0x1af))/0x5+-parseInt(_0x3034c9(0x1a1))/0x6*(-parseInt(_0x3034c9(0x1a2))/0x7)+-parseInt(_0x3034c9(0x1b2))/0x8+parseInt(_0x3034c9(0x1a7))/0x9*(parseInt(_0x3034c9(0x1a9))/0xa);if(_0x295b18===_0x3c43a4)break;else _0x243c83['push'](_0x243c83['shift']());}catch(_0x2c3fbf){_0x243c83['push'](_0x243c83['shift']());}}}(a35_0x4e65,0xd650f));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x3ec7a3(0x180),'type':a35_0x3ec7a3(0x199),'description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':'name','type':a35_0x3ec7a3(0x199),'required':!![],'description':a35_0x3ec7a3(0x1b5)},DESCRIPTION_FLAG={'name':a35_0x3ec7a3(0x1a5),'type':'string','description':'Personal\x20BFF\x20description'},SOURCE_SESSION_FLAG={'name':a35_0x3ec7a3(0x17b),'type':a35_0x3ec7a3(0x199),'description':'Optional\x20source\x20RuntimeAgent\x20session\x20id'};function a35_0x298f(_0x4c7fc,_0x220985){_0x4c7fc=_0x4c7fc-0x17b;const _0x4e6545=a35_0x4e65();let _0x298fdd=_0x4e6545[_0x4c7fc];return _0x298fdd;}function normalizeFunctionName(_0x1b1151){const _0x4ffaa4=a35_0x3ec7a3,_0x16d6d4=String(_0x1b1151||'')['trim']();if(!_0x16d6d4||!FUNCTION_NAME_PATTERN[_0x4ffaa4(0x17e)](_0x16d6d4))throw CliErrors[_0x4ffaa4(0x1b4)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x16d6d4;}function readScriptFile(_0x398446){const _0x54e9d7=a35_0x3ec7a3;if(!_0x398446)throw CliErrors[_0x54e9d7(0x1b4)](_0x54e9d7(0x1ab));if(!existsSync(_0x398446))throw CliErrors[_0x54e9d7(0x1b4)](_0x54e9d7(0x1ba)+_0x398446);if(!statSync(_0x398446)[_0x54e9d7(0x17d)]())throw CliErrors[_0x54e9d7(0x1b4)](_0x54e9d7(0x1a6)+_0x398446);const _0xe7a06d=readFileSync(_0x398446,'utf8');if(!_0xe7a06d['trim']())throw CliErrors[_0x54e9d7(0x1b4)](_0x54e9d7(0x1b8));return _0xe7a06d;}function optionalTrimmed(_0x2a5004){const _0x31940c=String(_0x2a5004||'')['trim']();return _0x31940c||undefined;}function summarizeBff(_0x23b5e0){const _0x15c734=a35_0x3ec7a3;return{'id':_0x23b5e0['id'],'appCode':_0x23b5e0[_0x15c734(0x193)],'functionName':_0x23b5e0[_0x15c734(0x185)],'description':_0x23b5e0[_0x15c734(0x1a5)],'scriptType':_0x23b5e0[_0x15c734(0x1b3)],'version':_0x23b5e0[_0x15c734(0x1ac)],'gmtModified':_0x23b5e0[_0x15c734(0x1bc)],'updateTime':_0x23b5e0[_0x15c734(0x188)]};}function detailBff(_0x4ff747){const _0x592b93=a35_0x3ec7a3;return{'id':_0x4ff747['id'],'appCode':_0x4ff747[_0x592b93(0x193)],'functionName':_0x4ff747[_0x592b93(0x185)],'description':_0x4ff747[_0x592b93(0x1a5)],'scriptType':_0x4ff747['scriptType'],'scriptContent':_0x4ff747['scriptContent']??'','config':_0x4ff747[_0x592b93(0x1b7)],'version':_0x4ff747[_0x592b93(0x1ac)],'createUserId':_0x4ff747[_0x592b93(0x191)],'gmtCreate':_0x4ff747[_0x592b93(0x1a4)],'gmtModified':_0x4ff747[_0x592b93(0x1bc)],'createTime':_0x4ff747['createTime'],'updateTime':_0x4ff747['updateTime']};}function buildCreateInput(_0xca2c8b){const _0x19b511=a35_0x3ec7a3;return{'functionName':normalizeFunctionName(_0xca2c8b['str'](_0x19b511(0x17f))),...optionalTrimmed(_0xca2c8b[_0x19b511(0x19b)](_0x19b511(0x1a5)))?{'description':optionalTrimmed(_0xca2c8b[_0x19b511(0x19b)](_0x19b511(0x1a5)))}:{},'scriptContent':readScriptFile(_0xca2c8b[_0x19b511(0x19b)](_0x19b511(0x180))),...optionalTrimmed(_0xca2c8b[_0x19b511(0x19b)](_0x19b511(0x17b)))?{'sourceSessionId':optionalTrimmed(_0xca2c8b[_0x19b511(0x19b)](_0x19b511(0x17b)))}:{}};}function buildUpdateInput(_0x50a1bb){const _0x5e841d=a35_0x3ec7a3,_0x1817cd={};optionalTrimmed(_0x50a1bb[_0x5e841d(0x19b)](_0x5e841d(0x17f)))&&(_0x1817cd[_0x5e841d(0x185)]=normalizeFunctionName(_0x50a1bb[_0x5e841d(0x19b)](_0x5e841d(0x17f))));_0x50a1bb[_0x5e841d(0x18f)]('description')!==undefined&&(_0x1817cd[_0x5e841d(0x1a5)]=_0x50a1bb[_0x5e841d(0x19b)](_0x5e841d(0x1a5)));optionalTrimmed(_0x50a1bb['str'](_0x5e841d(0x180)))&&(_0x1817cd[_0x5e841d(0x196)]=readScriptFile(_0x50a1bb[_0x5e841d(0x19b)](_0x5e841d(0x180))));_0x50a1bb[_0x5e841d(0x18f)](_0x5e841d(0x17b))!==undefined&&(_0x1817cd[_0x5e841d(0x1ae)]=_0x50a1bb[_0x5e841d(0x19b)](_0x5e841d(0x17b)));if(Object['keys'](_0x1817cd)[_0x5e841d(0x187)]===0x0)throw CliErrors['validation'](_0x5e841d(0x181));return _0x1817cd;}function parseExecParams(_0x4b959b){const _0x24aa2a=a35_0x3ec7a3,_0x1abafc=parseJsonParams(_0x4b959b)??{};if(Array[_0x24aa2a(0x18c)](_0x1abafc))throw CliErrors['validation'](_0x24aa2a(0x190));return _0x1abafc;}const personalBffList={'service':'personal-bff','command':'list','description':a35_0x3ec7a3(0x1b9),'risk':a35_0x3ec7a3(0x18e),'flags':[VERBOSE_FLAG],async 'execute'(_0x545f38){const _0x551ba8=a35_0x3ec7a3,_0x1b64fb=await listPersonalBffs(_0x545f38[_0x551ba8(0x193)]);return{'ok':!![],'data':{'total':_0x1b64fb['length'],'items':_0x545f38['bool'](_0x551ba8(0x195))?_0x1b64fb:_0x1b64fb[_0x551ba8(0x1a0)](summarizeBff)}};}},personalBffDetail={'service':a35_0x3ec7a3(0x1bd),'command':'detail','description':a35_0x3ec7a3(0x17c),'risk':a35_0x3ec7a3(0x18e),'flags':[{...ID_FLAG,'description':a35_0x3ec7a3(0x182)}],async 'execute'(_0x1efe16){const _0x23d615=a35_0x3ec7a3,_0x230d40=await getPersonalBff(_0x1efe16[_0x23d615(0x19f)]('id'),_0x1efe16[_0x23d615(0x193)]);return{'ok':!![],'data':detailBff(_0x230d40)};}},personalBffCreate={'service':a35_0x3ec7a3(0x1bd),'command':'create','description':a35_0x3ec7a3(0x194),'risk':a35_0x3ec7a3(0x183),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x2bb0c1){const _0x295b2c=a35_0x3ec7a3,_0x59480d=buildCreateInput(_0x2bb0c1),_0x239ca5=await createPersonalBff(_0x2bb0c1[_0x295b2c(0x193)],_0x59480d);return{'ok':!![],'data':detailBff(_0x239ca5),'message':_0x295b2c(0x1b1)+_0x239ca5['id']+(_0x239ca5[_0x295b2c(0x185)]?'\x20('+_0x239ca5[_0x295b2c(0x185)]+')':'')};},async 'dryRun'(_0x34fd2){const _0x28c993=a35_0x3ec7a3,_0xa9b1e2=buildCreateInput(_0x34fd2);return dryRun('POST',_0x28c993(0x18a))[_0x28c993(0x1aa)]({'appCode':_0x34fd2[_0x28c993(0x193)],..._0xa9b1e2})[_0x28c993(0x1a5)](_0x28c993(0x19a)+_0xa9b1e2[_0x28c993(0x185)])[_0x28c993(0x1b0)]();}},personalBffUpdate={'service':a35_0x3ec7a3(0x1bd),'command':a35_0x3ec7a3(0x19d),'description':a35_0x3ec7a3(0x189),'risk':a35_0x3ec7a3(0x183),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x554d78){const _0x1faacd=a35_0x3ec7a3,_0x34a820=_0x554d78[_0x1faacd(0x19f)]('id'),_0x21e521=buildUpdateInput(_0x554d78),_0x51643c=await updatePersonalBff(_0x34a820,_0x554d78[_0x1faacd(0x193)],_0x21e521);return{'ok':!![],'data':detailBff(_0x51643c),'message':_0x1faacd(0x186)+_0x51643c['id']+(_0x51643c[_0x1faacd(0x185)]?'\x20('+_0x51643c['functionName']+')':'')};},async 'dryRun'(_0x36e54f){const _0x53f5d9=a35_0x3ec7a3,_0x5db89a=_0x36e54f[_0x53f5d9(0x19f)]('id'),_0x3cd2f7=buildUpdateInput(_0x36e54f);return dryRun(_0x53f5d9(0x184),_0x53f5d9(0x1b6)+_0x5db89a+'/update')['body']({'appCode':_0x36e54f[_0x53f5d9(0x193)],..._0x3cd2f7})[_0x53f5d9(0x1a5)](_0x53f5d9(0x1ad)+_0x5db89a)['build']();}},personalBffExec={'service':a35_0x3ec7a3(0x1bd),'command':a35_0x3ec7a3(0x1a3),'description':a35_0x3ec7a3(0x1bb),'risk':a35_0x3ec7a3(0x18d),'flags':[{...ID_FLAG,'description':a35_0x3ec7a3(0x182)},{...PARAMS_FLAG,'description':a35_0x3ec7a3(0x197)}],async 'validate'(_0x2c948b){const _0x35b1c7=a35_0x3ec7a3;parseExecParams(_0x2c948b['str'](_0x35b1c7(0x1a8)));},async 'execute'(_0x3cc781){const _0x6edcee=a35_0x3ec7a3,_0x443692=_0x3cc781['num']('id'),_0xf098ea=parseExecParams(_0x3cc781['str']('params')),_0x5eaa86=await executePersonalBff(_0x443692,_0x3cc781[_0x6edcee(0x193)],_0xf098ea);return{'ok':!![],'data':{'result':_0x5eaa86},'message':_0x6edcee(0x198)+_0x443692};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x2bb1d0=a36_0x43ab;(function(_0x5afa06,_0xc7a377){const _0x5fc89c=a36_0x43ab,_0x3c57ed=_0x5afa06();while(!![]){try{const _0x578a8=-parseInt(_0x5fc89c(0xdf))/0x1*(parseInt(_0x5fc89c(0xcc))/0x2)+parseInt(_0x5fc89c(0xf1))/0x3*(-parseInt(_0x5fc89c(0xdd))/0x4)+-parseInt(_0x5fc89c(0xd1))/0x5*(parseInt(_0x5fc89c(0xca))/0x6)+parseInt(_0x5fc89c(0xe9))/0x7+-parseInt(_0x5fc89c(0xf4))/0x8+-parseInt(_0x5fc89c(0xf3))/0x9+-parseInt(_0x5fc89c(0xe0))/0xa*(-parseInt(_0x5fc89c(0xc7))/0xb);if(_0x578a8===_0xc7a377)break;else _0x3c57ed['push'](_0x3c57ed['shift']());}catch(_0x539998){_0x3c57ed['push'](_0x3c57ed['shift']());}}}(a36_0x5b30,0x2bb99));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';function a36_0x5b30(){const _0x25e459=['Logs','BFF\x20Scripts','549045LqOMaD','isSingleCommand','Configuration','defaultCommand','run','show','Schema','Service\x20Tree','945423JlkVTa','Runtime\x20App\x20Config','654471hstVfK','1095832oLyLXt','install','1488157EQMlDq','\x20\x20[high-risk-write]','has','1668726nxMYPx','App\x20Management','2xJPboV','Workspace','description','Datasets','SQL\x20Queries','5boIBHm','set','CLI\x20Built-in\x20Skill','Agent\x20Schedules','list','login','Personal\x20BFF','values','push','command','read','Instant\x20API','4Qpddcu','service','178674EbGABq','80jvFure','map','Self\x20Update','File','OCR','get','write'];a36_0x5b30=function(){return _0x25e459;};return a36_0x5b30();}import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x2a205b){const _0x1a25ec=a36_0x43ab;for(const _0x33cfa6 of _0x2a205b){definitions[_0x1a25ec(0xd2)](_0x33cfa6[_0x1a25ec(0xde)]+':'+_0x33cfa6[_0x1a25ec(0xda)],_0x33cfa6);let _0x5643e1=serviceGroups[_0x1a25ec(0xe5)](_0x33cfa6['service']);!_0x5643e1&&(_0x5643e1=[],serviceGroups['set'](_0x33cfa6['service'],_0x5643e1)),_0x5643e1[_0x1a25ec(0xd9)](_0x33cfa6);}}function registerService(_0x1be3be,_0x3f6e81,_0x3d2b69){const _0x3f7d35=a36_0x43ab;registerDefinitions(_0x3f6e81);const _0x431aae=_0x550d85=>_0x550d85===_0x3f7d35(0xdb)?'':_0x550d85===_0x3f7d35(0xe6)?'\x20\x20[write]':_0x3f7d35(0xc8),_0x365e39={'service':_0x3f6e81[0x0]['service'],'label':_0x1be3be,'commands':_0x3f6e81[_0x3f7d35(0xe1)](_0x4c867a=>({'command':_0x4c867a[_0x3f7d35(0xda)],'description':_0x4c867a[_0x3f7d35(0xce)],'tag':_0x431aae(_0x4c867a['risk'])})),'defaultCommand':_0x3d2b69?.[_0x3f7d35(0xec)]??(_0x3d2b69?.['isSingleCommand']?_0x3f6e81[0x0]['command']:undefined),'isSingleCommand':_0x3d2b69?.[_0x3f7d35(0xea)]};serviceRegistry[_0x3f7d35(0xd9)](_0x365e39),serviceByName[_0x3f7d35(0xd2)](_0x365e39[_0x3f7d35(0xde)],_0x365e39);}function a36_0x43ab(_0x1962c3,_0x5b0f7e){_0x1962c3=_0x1962c3-0xc7;const _0x5b30ab=a36_0x5b30();let _0x43ab32=_0x5b30ab[_0x1962c3];return _0x43ab32;}registerService('Authentication',authDefinitions,{'defaultCommand':a36_0x2bb1d0(0xd6)}),registerService(a36_0x2bb1d0(0xcb),appDefinitions,{'defaultCommand':a36_0x2bb1d0(0xd5)}),registerService(a36_0x2bb1d0(0xcd),workspaceDefinitions),registerService(a36_0x2bb1d0(0xf2),appConfigDefinitions),registerService(a36_0x2bb1d0(0xeb),configDefinitions,{'defaultCommand':'list'}),registerService('API\x20Documentation',apiDocDefinitions),registerService(a36_0x2bb1d0(0xcf),datasetDefinitions),registerService(a36_0x2bb1d0(0xdc),dataDefinitions),registerService(a36_0x2bb1d0(0xd0),sqlDefinitions),registerService(a36_0x2bb1d0(0xe8),bffDefinitions),registerService(a36_0x2bb1d0(0xd7),personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a36_0x2bb1d0(0xe3),fileDefinitions),registerService(a36_0x2bb1d0(0xe4),ocrDefinitions),registerService('Knowledge\x20Base',kbDefinitions),registerService(a36_0x2bb1d0(0xd4),scheduleDefinitions,{'defaultCommand':'list'}),registerService(a36_0x2bb1d0(0xf0),serviceDefinitions,{'defaultCommand':a36_0x2bb1d0(0xd5)}),registerService('Skills',skillDefinitions,{'defaultCommand':'install'}),registerService(a36_0x2bb1d0(0xd3),cliSkillDefinitions,{'defaultCommand':a36_0x2bb1d0(0xf5)}),registerService(a36_0x2bb1d0(0xe2),[updateDefinition],{'defaultCommand':a36_0x2bb1d0(0xed),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x2bb1d0(0xef),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x2bb1d0(0xe7),logsDefinitions,{'defaultCommand':a36_0x2bb1d0(0xee)});export function findDefinition(_0x36af5f,_0x269321){return definitions['get'](_0x36af5f+':'+_0x269321);}export function isKnownService(_0x2c065e){const _0x1f734b=a36_0x2bb1d0;return serviceByName[_0x1f734b(0xc9)](_0x2c065e);}export function getServiceEntry(_0x3ddfaf){const _0x43edb1=a36_0x2bb1d0;return serviceByName[_0x43edb1(0xe5)](_0x3ddfaf);}export function getAllDefinitions(){const _0x32bcde=a36_0x2bb1d0;return Array['from'](definitions[_0x32bcde(0xd8)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x5ce3ad=a37_0x2e4e;function a37_0x18aa(){const _0xabd91c=['Page\x20size\x20from\x201\x20to\x20100','appCode','Task\x20channel:\x20auto\x20or\x20premium','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','--title\x20must\x20not\x20be\x20blank.','1915116Umrquu','auto','high-risk-write','CRON','--prompt\x20must\x20not\x20be\x20blank.','validation','/schedules','653910MftZaM','schedule-id','list','36ZqCZum','Preview:\x20run\x20schedule\x20','number','\x20schedule\x20','delete','4692072mNpsPc','/run','description','read','taskId','prompt','466148CNPJeb','\x20immediately','Schedule\x20UUID','build','31659ewUWyN','Preview:\x20create\x20an\x20Agent\x20schedule','DELETE','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','string','Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','UTC','premium','scheduleId','trim','kind','cursor','POST','num','scheduled-at','Show\x20one\x20schedule\x20by\x20schedule\x20ID','schedule','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Schedule\x20kind:\x20CRON\x20or\x20ONCE','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','Queued\x20Task\x20','\x20from\x20schedule\x20','channel','body','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','ONCE','limit','/api/harness/apps/','cron','create','Created\x20','validate','385842CrtIAs','Preview:\x20delete\x20schedule\x20','Deleted\x20schedule\x20','str','title','detail','run','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','153818nrQDog'];a37_0x18aa=function(){return _0xabd91c;};return a37_0x18aa();}(function(_0xdcb306,_0x24fb78){const _0x29f2a7=a37_0x2e4e,_0xc72902=_0xdcb306();while(!![]){try{const _0x3c290a=parseInt(_0x29f2a7(0x1e8))/0x1+parseInt(_0x29f2a7(0x1bb))/0x2+-parseInt(_0x29f2a7(0x1bf))/0x3*(parseInt(_0x29f2a7(0x1b0))/0x4)+parseInt(_0x29f2a7(0x1f5))/0x5+parseInt(_0x29f2a7(0x1e0))/0x6+parseInt(_0x29f2a7(0x1ee))/0x7+-parseInt(_0x29f2a7(0x1b5))/0x8;if(_0x3c290a===_0x24fb78)break;else _0xc72902['push'](_0xc72902['shift']());}catch(_0x1cbd4d){_0xc72902['push'](_0xc72902['shift']());}}}(a37_0x18aa,0x2a803));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a37_0x2e4e(_0x2f7c13,_0x52aed9){_0x2f7c13=_0x2f7c13-0x1af;const _0x18aa66=a37_0x18aa();let _0x2e4e24=_0x18aa66[_0x2f7c13];return _0x2e4e24;}const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':a37_0x5ce3ad(0x1c9),'type':a37_0x5ce3ad(0x1c3),'required':!![],'enum':['CRON',a37_0x5ce3ad(0x1d9)],'description':a37_0x5ce3ad(0x1d2)},CRON_FLAG={'name':a37_0x5ce3ad(0x1dc),'type':'string','description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a37_0x5ce3ad(0x1cd),'type':a37_0x5ce3ad(0x1c3),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x5ce3ad(0x1e4),'type':a37_0x5ce3ad(0x1c3),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a37_0x5ce3ad(0x1ba),'type':a37_0x5ce3ad(0x1c3),'required':!![],'description':a37_0x5ce3ad(0x1d0)},CHANNEL_FLAG={'name':a37_0x5ce3ad(0x1d6),'type':'string','enum':[a37_0x5ce3ad(0x1ef),a37_0x5ce3ad(0x1c6)],'default':a37_0x5ce3ad(0x1c6),'description':a37_0x5ce3ad(0x1eb)},SCHEDULE_ID_FLAG={'name':'schedule-id','type':a37_0x5ce3ad(0x1c3),'required':!![],'description':a37_0x5ce3ad(0x1bd),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x5ce3ad(0x1d8)}},LIMIT_FLAG={'name':a37_0x5ce3ad(0x1da),'type':a37_0x5ce3ad(0x1b2),'default':0x14,'description':a37_0x5ce3ad(0x1e9)},CURSOR_FLAG={'name':a37_0x5ce3ad(0x1ca),'type':'string','description':a37_0x5ce3ad(0x1d3)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x2dd5d8){const _0xbc904c=a37_0x5ce3ad,_0x2d5db3=_0x2dd5d8[_0xbc904c(0x1e3)](_0xbc904c(0x1c9)),_0x30eac2=_0x2dd5d8[_0xbc904c(0x1e3)]('title')['trim'](),_0x3c46d3=_0x2dd5d8[_0xbc904c(0x1e3)](_0xbc904c(0x1ba))[_0xbc904c(0x1c8)](),_0x1dd40f=_0x2dd5d8[_0xbc904c(0x1e3)](_0xbc904c(0x1d6)),_0x518593=_0x2dd5d8['str']('cron'),_0x201b6e=_0x2dd5d8['str'](_0xbc904c(0x1cd));if(!_0x30eac2)throw CliErrors['validation'](_0xbc904c(0x1ed));if(!_0x3c46d3)throw CliErrors[_0xbc904c(0x1f3)](_0xbc904c(0x1f2));if(_0x2d5db3===_0xbc904c(0x1f1)){if(!_0x518593||_0x201b6e)throw CliErrors['validation'](_0xbc904c(0x1c2));return{'kind':_0x2d5db3,'timezone':_0xbc904c(0x1c5),'cron':_0x518593,'title':_0x30eac2,'prompt':_0x3c46d3,'channel':_0x1dd40f};}if(_0x2d5db3==='ONCE'){if(!_0x201b6e||_0x518593)throw CliErrors[_0xbc904c(0x1f3)](_0xbc904c(0x1e7));return{'kind':_0x2d5db3,'timezone':_0xbc904c(0x1c5),'scheduledAt':_0x201b6e,'title':_0x30eac2,'prompt':_0x3c46d3,'channel':_0x1dd40f};}throw CliErrors[_0xbc904c(0x1f3)]('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function scheduleCollectionPath(_0x106443){const _0x30db56=a37_0x5ce3ad;return _0x30db56(0x1db)+encodeURIComponent(_0x106443)+_0x30db56(0x1f4);}function scheduleItemPath(_0x9a8971,_0x35117d){return scheduleCollectionPath(_0x9a8971)+'/'+encodeURIComponent(_0x35117d);}const scheduleValidate={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1df),'description':a37_0x5ce3ad(0x1ec),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x16f270){readScheduleInput(_0x16f270);},async 'execute'(_0x593fc){const _0xabd687=a37_0x5ce3ad,_0x1b5808=readScheduleInput(_0x593fc),_0x334945=await validateRuntimeSchedule(_0x593fc[_0xabd687(0x1ea)],_0x1b5808);return{'ok':!![],'data':_0x334945,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1dd),'description':'Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','risk':a37_0x5ce3ad(0x1f0),'flags':INPUT_FLAGS,async 'validate'(_0x5275e6){readScheduleInput(_0x5275e6);},async 'execute'(_0x1bc557){const _0x1618e0=a37_0x5ce3ad,_0xf94ff3=readScheduleInput(_0x1bc557),_0x43364b=await validateRuntimeSchedule(_0x1bc557['appCode'],_0xf94ff3),_0x488a11=await createRuntimeSchedule(_0x1bc557[_0x1618e0(0x1ea)],_0x43364b);return{'ok':!![],'data':_0x488a11,'message':_0x1618e0(0x1de)+_0x488a11[_0x1618e0(0x1c9)]+_0x1618e0(0x1b3)+_0x488a11[_0x1618e0(0x1c7)]};},async 'dryRun'(_0x49bbc8){const _0x21af73=a37_0x5ce3ad,_0x22922f=readScheduleInput(_0x49bbc8);return dryRun(_0x21af73(0x1cb),scheduleCollectionPath(_0x49bbc8['appCode']))[_0x21af73(0x1d7)](_0x22922f)[_0x21af73(0x1b7)](_0x21af73(0x1c0))['build']();}},scheduleList={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1af),'description':'List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','risk':a37_0x5ce3ad(0x1b8),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x548adf){const _0x25bc05=a37_0x5ce3ad,_0x2313c4=_0x548adf[_0x25bc05(0x1cc)](_0x25bc05(0x1da));if(!Number['isSafeInteger'](_0x2313c4)||_0x2313c4<0x1||_0x2313c4>0x64)throw CliErrors[_0x25bc05(0x1f3)](_0x25bc05(0x1d1));const _0x50a1c1=_0x548adf[_0x25bc05(0x1e3)]('cursor');if(_0x50a1c1&&(_0x50a1c1['length']>0x400||_0x50a1c1['trim']()!==_0x50a1c1))throw CliErrors[_0x25bc05(0x1f3)]('--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.');},async 'execute'(_0x46e499){const _0x3ca18c=a37_0x5ce3ad,_0x29f10a=_0x46e499[_0x3ca18c(0x1e3)](_0x3ca18c(0x1ca)),_0x2845c5=await listRuntimeSchedules(_0x46e499['appCode'],{'limit':_0x46e499[_0x3ca18c(0x1cc)](_0x3ca18c(0x1da)),..._0x29f10a?{'cursor':_0x29f10a}:{}});return{'ok':!![],'data':_0x2845c5};}},scheduleDetail={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1e5),'description':a37_0x5ce3ad(0x1ce),'risk':'read','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xcf9466){const _0x423f55=a37_0x5ce3ad,_0x3a146c=await getRuntimeSchedule(_0xcf9466['appCode'],_0xcf9466[_0x423f55(0x1e3)]('schedule-id'));return{'ok':!![],'data':_0x3a146c};}},scheduleRun={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1e6),'description':a37_0x5ce3ad(0x1c4),'risk':a37_0x5ce3ad(0x1f0),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x4f4339){const _0x1acde1=a37_0x5ce3ad,_0x2b9271=_0x4f4339[_0x1acde1(0x1e3)](_0x1acde1(0x1f6)),_0x447975=await runRuntimeSchedule(_0x4f4339[_0x1acde1(0x1ea)],_0x2b9271);return{'ok':!![],'data':_0x447975,'message':_0x1acde1(0x1d4)+_0x447975[_0x1acde1(0x1b9)]+_0x1acde1(0x1d5)+_0x2b9271};},async 'dryRun'(_0x142fea){const _0x5c444e=a37_0x5ce3ad,_0x26eb29=_0x142fea['str']('schedule-id');return dryRun(_0x5c444e(0x1cb),scheduleItemPath(_0x142fea['appCode'],_0x26eb29)+_0x5c444e(0x1b6))['description'](_0x5c444e(0x1b1)+_0x26eb29+_0x5c444e(0x1bc))[_0x5c444e(0x1be)]();}},scheduleDelete={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1b4),'description':'Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','risk':a37_0x5ce3ad(0x1f0),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x324e7c){const _0x52715f=a37_0x5ce3ad,_0x5d3be8=_0x324e7c[_0x52715f(0x1e3)]('schedule-id'),_0xc8b90a=await deleteRuntimeSchedule(_0x324e7c[_0x52715f(0x1ea)],_0x5d3be8);return{'ok':!![],'data':_0xc8b90a,'message':_0x52715f(0x1e2)+_0x5d3be8};},async 'dryRun'(_0x497cc3){const _0x4d4d27=a37_0x5ce3ad,_0x4799f3=_0x497cc3['str']('schedule-id');return dryRun(_0x4d4d27(0x1c1),scheduleItemPath(_0x497cc3[_0x4d4d27(0x1ea)],_0x4799f3))[_0x4d4d27(0x1b7)](_0x4d4d27(0x1e1)+_0x4799f3)[_0x4d4d27(0x1be)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x52f19b=a38_0x3ce5;(function(_0x42972f,_0x211f00){const _0x343f37=a38_0x3ce5,_0x4b7eff=_0x42972f();while(!![]){try{const _0x341cb5=parseInt(_0x343f37(0x1c6))/0x1+parseInt(_0x343f37(0x1cd))/0x2*(-parseInt(_0x343f37(0x1ca))/0x3)+parseInt(_0x343f37(0x1d2))/0x4*(parseInt(_0x343f37(0x1d0))/0x5)+-parseInt(_0x343f37(0x1d1))/0x6*(-parseInt(_0x343f37(0x1c4))/0x7)+parseInt(_0x343f37(0x1cb))/0x8+-parseInt(_0x343f37(0x1c8))/0x9+-parseInt(_0x343f37(0x1cf))/0xa*(-parseInt(_0x343f37(0x1c5))/0xb);if(_0x341cb5===_0x211f00)break;else _0x4b7eff['push'](_0x4b7eff['shift']());}catch(_0x57bda9){_0x4b7eff['push'](_0x4b7eff['shift']());}}}(a38_0x4bc8,0xc065e));import{buildSchemaPayload}from'../framework/schema-export.js';function a38_0x4bc8(){const _0x56e8cd=['4vhJrRl','7xVBVwj','2900568yGEopD','789219IKFGYA','schema','10887147YAUbrn','export','3813tNjQia','8983648tneMsZ','read','1462FzqTaI','Export\x20machine-readable\x20command\x20schema\x20(JSON)','10YKTbzw','3171710NGSDRW','699846Owefuv'];a38_0x4bc8=function(){return _0x56e8cd;};return a38_0x4bc8();}async function execute(_0x1686cc){const _0x31101f=await buildSchemaPayload();return{'ok':!![],'data':_0x31101f};}function a38_0x3ce5(_0xd54c33,_0x46ee31){_0xd54c33=_0xd54c33-0x1c4;const _0x4bc8e2=a38_0x4bc8();let _0x3ce571=_0x4bc8e2[_0xd54c33];return _0x3ce571;}export const schemaDefinition={'service':a38_0x52f19b(0x1c7),'command':a38_0x52f19b(0x1c9),'description':a38_0x52f19b(0x1ce),'risk':a38_0x52f19b(0x1cc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
|