@lovrabet/lovrabet-cli 2.1.18-beta.2 → 2.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -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/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-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.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/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/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.d.ts +7 -14
- 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 +1 -1
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a29_0x107042=a29_0x5c3e;(function(_0x5e6f60,_0x3b232d){const _0x3f956c=a29_0x5c3e,_0x1016e3=_0x5e6f60();while(!![]){try{const _0x2352c7=parseInt(_0x3f956c(0x12d))/0x1*(-parseInt(_0x3f956c(0x11d))/0x2)+-parseInt(_0x3f956c(0x117))/0x3+parseInt(_0x3f956c(0x15b))/0x4+parseInt(_0x3f956c(0x123))/0x5*(parseInt(_0x3f956c(0x14b))/0x6)+-parseInt(_0x3f956c(0x10b))/0x7*(parseInt(_0x3f956c(0x10c))/0x8)+parseInt(_0x3f956c(0x124))/0x9*(parseInt(_0x3f956c(0x151))/0xa)+-parseInt(_0x3f956c(0x158))/0xb*(parseInt(_0x3f956c(0x11c))/0xc);if(_0x2352c7===_0x3b232d)break;else _0x1016e3['push'](_0x1016e3['shift']());}catch(_0x190a8e){_0x1016e3['push'](_0x1016e3['shift']());}}}(a29_0x1b02,0xd6522));import a29_0xdc8098 from'chalk';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(_0x4001bf){const _0xa76164=a29_0x5c3e,_0x37dcb2=getCliVersion(),_0x57a4b2=buildConfigFromFlags({});await initGlobalEnvironment(_0x57a4b2),console[_0xa76164(0x141)](),console[_0xa76164(0x141)](a29_0xdc8098['bold'](CLI_BIN_NAME+_0xa76164(0x13a))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)]('─'['repeat'](0x32))),console[_0xa76164(0x141)](_0xa76164(0x110)+_0x37dcb2),console[_0xa76164(0x141)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0xa76164(0x113)]),console['log'](_0xa76164(0x149)+process[_0xa76164(0x127)]+'\x20'+process['arch']),console['log'](),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x132)](_0xa76164(0x142))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)[_0xa76164(0x12e)](0x1e)));const _0xc8155a=getGlobalConfigPath(),_0x22b65b=getProjectConfigPath();console['log'](_0xa76164(0x14a)+(_0xc8155a||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x130)))),console['log'](_0xa76164(0x11f)+(_0x22b65b||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x130)))),console[_0xa76164(0x141)](),console['log'](a29_0xdc8098[_0xa76164(0x132)](_0xa76164(0x161))),console[_0xa76164(0x141)](a29_0xdc8098['gray']('\x20\x20─'[_0xa76164(0x12e)](0x1e)));const _0x5353a5=(_0x34cb71,_0x903433)=>{const _0x2afc0c=_0xa76164;if(!_0x903433){console['log']('\x20\x20'+_0x34cb71['padEnd'](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13b)](_0x2afc0c(0x150)));return;}const _0x3fd1ce=inspectCliConfigJsonFile(_0x903433);if(_0x3fd1ce[_0x2afc0c(0x143)]==='ok')console[_0x2afc0c(0x141)]('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x145)](_0x2afc0c(0x163)));else{if(_0x3fd1ce[_0x2afc0c(0x143)]==='empty')console['log']('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x12a)](_0x2afc0c(0x152)));else _0x3fd1ce[_0x2afc0c(0x143)]==='missing'?console[_0x2afc0c(0x141)]('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13b)]('(missing)')):(console[_0x2afc0c(0x141)]('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13e)]('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13e)](_0x3fd1ce['message'])));}};_0x5353a5('Global',_0xc8155a),_0x5353a5(_0xa76164(0x167),_0x22b65b),console[_0xa76164(0x141)](),console['log'](a29_0xdc8098['bold']('\x20\x20Merged\x20Config')),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)[_0xa76164(0x12e)](0x1e))),console[_0xa76164(0x141)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x57a4b2[_0xa76164(0x10f)]||a29_0xdc8098['red'](_0xa76164(0x13f)))),console[_0xa76164(0x141)](_0xa76164(0x119)+_0x57a4b2[_0xa76164(0x138)]);const _0x43ef75=isLegacyCompatConfigKey('locale')?a29_0xdc8098[_0xa76164(0x13b)](_0x57a4b2[_0xa76164(0x165)]+_0xa76164(0x14d)):_0x57a4b2[_0xa76164(0x165)];console[_0xa76164(0x141)](_0xa76164(0x120)+_0x43ef75),console[_0xa76164(0x141)](_0xa76164(0x118)+(_0x57a4b2[_0xa76164(0x14c)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x14e)))),console[_0xa76164(0x141)](_0xa76164(0x12f)+(_0x57a4b2[_0xa76164(0x154)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x14e)))),console[_0xa76164(0x141)](_0xa76164(0x160)+(_0x57a4b2[_0xa76164(0x12c)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x13c)+DEFAULT_CONFIG_VALUES[_0xa76164(0x12c)]+')'))),console[_0xa76164(0x141)](_0xa76164(0x11a)+(_0x57a4b2[_0xa76164(0x129)]??a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x155)))),console[_0xa76164(0x141)](_0xa76164(0x15e)+_0x57a4b2[_0xa76164(0x156)]),console['log'](_0xa76164(0x166)+_0x57a4b2[_0xa76164(0x116)]),console['log'](_0xa76164(0x15a)+AUTH_MODE[_0xa76164(0x114)]),console[_0xa76164(0x141)](_0xa76164(0x140)+(_0x57a4b2[_0xa76164(0x12b)]?a29_0xdc8098[_0xa76164(0x145)](_0xa76164(0x128)+_0x57a4b2[_0xa76164(0x12b)][_0xa76164(0x15c)]+')'):a29_0xdc8098['gray'](_0xa76164(0x14e)))),console[_0xa76164(0x141)](),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x132)]('\x20\x20API\x20Endpoints')),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)[_0xa76164(0x12e)](0x1e))),console[_0xa76164(0x141)](_0xa76164(0x126)+getApiDomain()),console['log'](_0xa76164(0x137)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console[_0xa76164(0x141)](a29_0xdc8098['bold'](_0xa76164(0x131))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)['repeat'](0x1e)));const _0x60e1dc=inspectServiceRegistry();console['log'](_0xa76164(0x135)+_0x60e1dc[_0xa76164(0x159)]),console[_0xa76164(0x141)](_0xa76164(0x168)+formatServiceRegistryStatus(_0x60e1dc)),console[_0xa76164(0x141)](_0xa76164(0x148)+_0x60e1dc[_0xa76164(0x157)]),console[_0xa76164(0x141)](_0xa76164(0x136)+_0x60e1dc['commandCount']);for(const _0x3460c5 of _0x60e1dc[_0xa76164(0x10d)]){console[_0xa76164(0x141)]('\x20\x20'+(_0x3460c5[_0xa76164(0x115)]+':')[_0xa76164(0x111)](0x11)+'\x20'+(_0x3460c5[_0xa76164(0x14f)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x13d)))+'\x20('+_0x3460c5[_0xa76164(0x10e)]+_0xa76164(0x15f)),console['log']('\x20\x20'+''['padEnd'](0x11)+'\x20Imported\x20from:\x20'+_0x3460c5[_0xa76164(0x122)][_0xa76164(0x144)]);}return console['log'](),console['log'](a29_0xdc8098['bold'](_0xa76164(0x112))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)['repeat'](0x1e))),console[_0xa76164(0x141)](_0xa76164(0x164)+a29_0xdc8098[_0xa76164(0x145)](AUTH_MODE[_0xa76164(0x114)]+_0xa76164(0x133))),console[_0xa76164(0x141)](_0xa76164(0x146)+a29_0xdc8098[_0xa76164(0x13b)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0xa76164(0x141)](),{'ok':!![]};}function formatServiceRegistryStatus(_0xde5f3f){const _0x1a1d78=a29_0x5c3e;if(_0xde5f3f[_0x1a1d78(0x143)]==='ok')return a29_0xdc8098[_0x1a1d78(0x145)](_0x1a1d78(0x139));if(_0xde5f3f[_0x1a1d78(0x143)]===_0x1a1d78(0x134))return a29_0xdc8098[_0x1a1d78(0x13b)]('(not\x20found)');if(_0xde5f3f[_0x1a1d78(0x143)]===_0x1a1d78(0x153))return a29_0xdc8098[_0x1a1d78(0x12a)](_0x1a1d78(0x162));return a29_0xdc8098['red'](_0x1a1d78(0x169)+(_0xde5f3f[_0x1a1d78(0x15d)]?':\x20'+_0xde5f3f[_0x1a1d78(0x15d)]:''));}function a29_0x5c3e(_0x35854b,_0x4a8927){_0x35854b=_0x35854b-0x10b;const _0x1b0287=a29_0x1b02();let _0x5c3ef8=_0x1b0287[_0x35854b];return _0x5c3ef8;}function a29_0x1b02(){const _0x1f8006=['Project','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','14GEyJTQ','98152gIAMsa','services','commandCount','appCode','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','padEnd','\x20\x20Auth','version','ClientAk','serviceCode','verbose','1822632CJpIGj','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','73284cXTpJo','60020TyupFT','read','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','source','203045jfMQWy','6282mMUpjT','check','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','platform','(set,\x20length=','pageSize','yellow','accessKey','format','29iJPvfQ','repeat','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20Service\x20Tree','bold','\x20(accessKey)','missing','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','env','✓\x20Loaded','\x20doctor','gray','(default:\x20','(unnamed)','red','(not\x20set)','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','log','\x20\x20Config\x20Files','status','path','green','\x20\x20Session\x20check:\x20\x20\x20','doctor','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','174dVEXko','defaultApp','\x20(legacy/compat\x20only)','(none)','name','(no\x20file)','15430LXBhfG','⚠\x20Empty\x20(treated\x20as\x20{})','empty','currentApp','(default)','riskLevel','serviceCount','2552XnhiTv','registryPath','\x20\x20auth\x20(effective):\x20','6169516rnHvfz','length','message','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20commands)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','⚠\x20Empty','✓\x20Valid\x20JSON','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a29_0x1b02=function(){return _0x1f8006;};return a29_0x1b02();}export const doctorDefinition={'service':a29_0x107042(0x147),'command':a29_0x107042(0x125),'description':a29_0x107042(0x121),'risk':a29_0x107042(0x11e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
function a29_0x529c(_0x520340,_0x59ee66){_0x520340=_0x520340-0x1db;const _0x5c68ae=a29_0x5c68();let _0x529c50=_0x5c68ae[_0x520340];return _0x529c50;}const a29_0x4afd91=a29_0x529c;function a29_0x5c68(){const _0x3c73b7=['\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','source','✓\x20Loaded','(none)','\x20\x20Service\x20Tree','⚠\x20Empty','doctor','(default)','services','(missing)','910188esgRye','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','\x20Imported\x20from:\x20','(default:\x20','2183435KGZJAf','✗\x20Invalid\x20JSON','Global','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1081884FKlHcv','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','502341UwqFLE','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','appCode','\x20commands)','\x20(legacy/compat\x20only)','✗\x20Invalid','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','read','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','pageSize','(unnamed)','path','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','repeat','bold','(no\x20file)','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','currentApp','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','status','63000Dpgcvu','log','14104539buYxaf','name','green','16fANipP','serviceCount','1910774bFsIKA','\x20\x20auth\x20(effective):\x20','\x20\x20Config\x20Files','accessKey','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','(set,\x20length=','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','Project','\x20\x20─','locale','format','(not\x20set)','empty','\x20\x20Auth','serviceCode','18oRRPbT','ClientAk','\x20\x20Merged\x20Config','gray','env','red','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a29_0x5c68=function(){return _0x3c73b7;};return a29_0x5c68();}(function(_0x46b50c,_0x4bba48){const _0xe4224b=a29_0x529c,_0x49c347=_0x46b50c();while(!![]){try{const _0x2ce010=-parseInt(_0xe4224b(0x20f))/0x1+-parseInt(_0xe4224b(0x1ed))/0x2+-parseInt(_0xe4224b(0x21a))/0x3+parseInt(_0xe4224b(0x1e6))/0x4+-parseInt(_0xe4224b(0x216))/0x5+parseInt(_0xe4224b(0x1fe))/0x6*(parseInt(_0xe4224b(0x21c))/0x7)+parseInt(_0xe4224b(0x1eb))/0x8*(parseInt(_0xe4224b(0x1e8))/0x9);if(_0x2ce010===_0x4bba48)break;else _0x49c347['push'](_0x49c347['shift']());}catch(_0x2ebbf7){_0x49c347['push'](_0x49c347['shift']());}}}(a29_0x5c68,0xab81b));import a29_0x39ca70 from'chalk';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(_0xaf2564){const _0x291883=a29_0x529c,_0xe66124=getCliVersion(),_0x5f24f7=buildConfigFromFlags({});await initGlobalEnvironment(_0x5f24f7),console[_0x291883(0x1e7)](),console['log'](a29_0x39ca70[_0x291883(0x1dc)](CLI_BIN_NAME+'\x20doctor')),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x201)]('─'[_0x291883(0x1db)](0x32))),console[_0x291883(0x1e7)](_0x291883(0x205)+_0xe66124),console['log'](_0x291883(0x219)+process['version']),console[_0x291883(0x1e7)](_0x291883(0x22d)+process['platform']+'\x20'+process['arch']),console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x1dc)](_0x291883(0x1ef))),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f7)[_0x291883(0x1db)](0x1e)));const _0x500ab2=getGlobalConfigPath(),_0x4e9278=getProjectConfigPath();console[_0x291883(0x1e7)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x500ab2||a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1e2)))),console[_0x291883(0x1e7)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4e9278||a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1e2)))),console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x1dc)]('\x20\x20Config\x20JSON')),console['log'](a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f7)['repeat'](0x1e)));const _0x2ee046=(_0xda87f,_0x2272ff)=>{const _0x272c4e=_0x291883;if(!_0x2272ff){console[_0x272c4e(0x1e7)]('\x20\x20'+_0xda87f[_0x272c4e(0x1f2)](0x11)+'\x20'+a29_0x39ca70[_0x272c4e(0x201)](_0x272c4e(0x1dd)));return;}const _0x591a89=inspectCliConfigJsonFile(_0x2272ff);if(_0x591a89[_0x272c4e(0x1e5)]==='ok')console['log']('\x20\x20'+_0xda87f['padEnd'](0x11)+'\x20'+a29_0x39ca70[_0x272c4e(0x1ea)](_0x272c4e(0x1e0)));else{if(_0x591a89[_0x272c4e(0x1e5)]==='empty')console[_0x272c4e(0x1e7)]('\x20\x20'+_0xda87f[_0x272c4e(0x1f2)](0x11)+'\x20'+a29_0x39ca70[_0x272c4e(0x213)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x591a89['status']==='missing'?console[_0x272c4e(0x1e7)]('\x20\x20'+_0xda87f[_0x272c4e(0x1f2)](0x11)+'\x20'+a29_0x39ca70['gray'](_0x272c4e(0x20e))):(console[_0x272c4e(0x1e7)]('\x20\x20'+_0xda87f[_0x272c4e(0x1f2)](0x11)+'\x20'+a29_0x39ca70[_0x272c4e(0x203)](_0x272c4e(0x217))),console[_0x272c4e(0x1e7)]('\x20\x20'+''[_0x272c4e(0x1f2)](0x11)+'\x20'+a29_0x39ca70[_0x272c4e(0x203)](_0x591a89[_0x272c4e(0x227)])));}};_0x2ee046(_0x291883(0x218),_0x500ab2),_0x2ee046(_0x291883(0x1f6),_0x4e9278),console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x1dc)](_0x291883(0x200))),console['log'](a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f7)[_0x291883(0x1db)](0x1e))),console[_0x291883(0x1e7)](_0x291883(0x1df)+(_0x5f24f7[_0x291883(0x21e)]||a29_0x39ca70[_0x291883(0x203)](_0x291883(0x1fa)))),console['log'](_0x291883(0x204)+_0x5f24f7[_0x291883(0x202)]);const _0x225307=isLegacyCompatConfigKey(_0x291883(0x1f8))?a29_0x39ca70[_0x291883(0x201)](_0x5f24f7['locale']+_0x291883(0x220)):_0x5f24f7[_0x291883(0x1f8)];console[_0x291883(0x1e7)](_0x291883(0x226)+_0x225307),console[_0x291883(0x1e7)](_0x291883(0x22f)+(_0x5f24f7['defaultApp']||a29_0x39ca70['gray'](_0x291883(0x208)))),console['log'](_0x291883(0x1f4)+(_0x5f24f7[_0x291883(0x1e3)]||a29_0x39ca70[_0x291883(0x201)](_0x291883(0x208)))),console[_0x291883(0x1e7)](_0x291883(0x222)+(_0x5f24f7[_0x291883(0x1f9)]||a29_0x39ca70[_0x291883(0x201)](_0x291883(0x215)+DEFAULT_CONFIG_VALUES['format']+')'))),console['log'](_0x291883(0x1de)+(_0x5f24f7[_0x291883(0x22a)]??a29_0x39ca70[_0x291883(0x201)](_0x291883(0x20c)))),console[_0x291883(0x1e7)](_0x291883(0x229)+_0x5f24f7['riskLevel']),console['log'](_0x291883(0x225)+_0x5f24f7['verbose']),console['log'](_0x291883(0x1ee)+AUTH_MODE[_0x291883(0x1ff)]),console[_0x291883(0x1e7)](_0x291883(0x1e1)+(_0x5f24f7[_0x291883(0x1f0)]?a29_0x39ca70[_0x291883(0x1ea)](_0x291883(0x1f3)+_0x5f24f7[_0x291883(0x1f0)]['length']+')'):a29_0x39ca70[_0x291883(0x201)](_0x291883(0x208)))),console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x1dc)](_0x291883(0x22e))),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f7)[_0x291883(0x1db)](0x1e))),console[_0x291883(0x1e7)](_0x291883(0x223)+getApiDomain()),console['log'](_0x291883(0x21d)+getUserDomain()),console[_0x291883(0x1e7)](_0x291883(0x210)+getRuntimeDomain()),console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70['bold'](_0x291883(0x209))),console['log'](a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f7)[_0x291883(0x1db)](0x1e)));const _0xe4dedc=inspectServiceRegistry();console[_0x291883(0x1e7)](_0x291883(0x1e4)+_0xe4dedc['registryPath']),console[_0x291883(0x1e7)](_0x291883(0x211)+formatServiceRegistryStatus(_0xe4dedc)),console[_0x291883(0x1e7)](_0x291883(0x21b)+_0xe4dedc[_0x291883(0x1ec)]),console[_0x291883(0x1e7)](_0x291883(0x1f1)+_0xe4dedc['commandCount']);for(const _0x49ae5a of _0xe4dedc[_0x291883(0x20d)]){console['log']('\x20\x20'+(_0x49ae5a[_0x291883(0x1fd)]+':')[_0x291883(0x1f2)](0x11)+'\x20'+(_0x49ae5a[_0x291883(0x1e9)]||a29_0x39ca70[_0x291883(0x201)](_0x291883(0x22b)))+'\x20('+_0x49ae5a['commandCount']+_0x291883(0x21f)),console[_0x291883(0x1e7)]('\x20\x20'+''[_0x291883(0x1f2)](0x11)+_0x291883(0x214)+_0x49ae5a[_0x291883(0x206)][_0x291883(0x22c)]);}return console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70['bold'](_0x291883(0x1fc))),console[_0x291883(0x1e7)](a29_0x39ca70['gray']('\x20\x20─'['repeat'](0x1e))),console['log'](_0x291883(0x212)+a29_0x39ca70[_0x291883(0x1ea)](AUTH_MODE[_0x291883(0x1ff)]+'\x20(accessKey)')),console[_0x291883(0x1e7)]('\x20\x20Session\x20check:\x20\x20\x20'+a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f5))),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0x41585b){const _0x35eed8=a29_0x529c;if(_0x41585b[_0x35eed8(0x1e5)]==='ok')return a29_0x39ca70[_0x35eed8(0x1ea)](_0x35eed8(0x207));if(_0x41585b['status']==='missing')return a29_0x39ca70['gray'](_0x35eed8(0x1e2));if(_0x41585b[_0x35eed8(0x1e5)]===_0x35eed8(0x1fb))return a29_0x39ca70[_0x35eed8(0x213)](_0x35eed8(0x20a));return a29_0x39ca70[_0x35eed8(0x203)](_0x35eed8(0x221)+(_0x41585b['message']?':\x20'+_0x41585b[_0x35eed8(0x227)]:''));}export const doctorDefinition={'service':a29_0x4afd91(0x20b),'command':'check','description':a29_0x4afd91(0x224),'risk':a29_0x4afd91(0x228),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x93d254=a30_0x3b97;function a30_0x3b97(_0x4119f0,_0x3e4d6d){_0x4119f0=_0x4119f0-0x7e;const _0x327f7b=a30_0x327f();let _0x3b9703=_0x327f7b[_0x4119f0];return _0x3b9703;}(function(_0xecf722,_0x14bcca){const _0x13d1d5=a30_0x3b97,_0x57059c=_0xecf722();while(!![]){try{const _0x3f35be=parseInt(_0x13d1d5(0xa0))/0x1*(-parseInt(_0x13d1d5(0x87))/0x2)+-parseInt(_0x13d1d5(0x8e))/0x3*(parseInt(_0x13d1d5(0x82))/0x4)+-parseInt(_0x13d1d5(0x8a))/0x5*(-parseInt(_0x13d1d5(0x83))/0x6)+parseInt(_0x13d1d5(0x93))/0x7+-parseInt(_0x13d1d5(0x96))/0x8+-parseInt(_0x13d1d5(0xa2))/0x9+parseInt(_0x13d1d5(0x90))/0xa;if(_0x3f35be===_0x14bcca)break;else _0x57059c['push'](_0x57059c['shift']());}catch(_0x29ff1d){_0x57059c['push'](_0x57059c['shift']());}}}(a30_0x327f,0x250b8));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':'file','type':'string','required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':'filepath','type':a30_0x93d254(0x9f),'required':!![],'description':a30_0x93d254(0x7f)},DOWNLOAD_FLAG={'name':'download','type':a30_0x93d254(0x81),'description':a30_0x93d254(0x8c)},LONG_TERM_FLAG={'name':'long-term','type':a30_0x93d254(0x81),'description':a30_0x93d254(0x91)};function requireFilePath(_0x24653f){const _0x1a3970=a30_0x93d254,_0x49cb67=_0x24653f['trim']();if(!_0x49cb67)throw CliErrors[_0x1a3970(0x80)](_0x1a3970(0x92));return _0x49cb67;}function a30_0x327f(){const _0x3c0d15=['.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','string','1937XAAgNC','File','666801QMoEXo','long-term','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','validation','boolean','36ggxnAr','1032fGLMiT','POST','file','filePath','38kUbUpV','path','upload','885AqZpdF','/client/uploadFile','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','appCode','18759fFhBML','download','2120040BkoLMa','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','filePath\x20is\x20required.','1116346gfXoOu','bool','description','664168PyMtGU','read','build','write','body','Uploaded\x20file:\x20','Preview:\x20upload\x20','str'];a30_0x327f=function(){return _0x3c0d15;};return a30_0x327f();}const fileUpload={'service':a30_0x93d254(0x85),'command':a30_0x93d254(0x89),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a30_0x93d254(0x99),'flags':[FILE_FLAG],async 'dryRun'(_0x3c00c8){const _0x1bfc7f=a30_0x93d254,_0x3f80e2=requireRuntimeUploadFile(_0x3c00c8['str']('file'),_0x1bfc7f(0xa1));return dryRun(_0x1bfc7f(0x84),_0x1bfc7f(0x8b))[_0x1bfc7f(0x9a)]({'appCode':_0x3c00c8[_0x1bfc7f(0x8d)],'multipart':{'file':_0x3f80e2}})[_0x1bfc7f(0x95)](_0x1bfc7f(0x9c)+_0x3f80e2['path']+'\x20to\x20runtime\x20app\x20'+_0x3c00c8['appCode'])[_0x1bfc7f(0x98)]();},async 'execute'(_0x85556f){const _0x5485d8=a30_0x93d254,_0x53c821=requireRuntimeUploadFile(_0x85556f[_0x5485d8(0x9d)](_0x5485d8(0x85)),_0x5485d8(0xa1)),_0x9d9a26=await uploadRuntimeFile(_0x85556f[_0x5485d8(0x8d)],_0x53c821[_0x5485d8(0x88)]);return{'ok':!![],'data':_0x9d9a26,'message':_0x9d9a26[_0x5485d8(0x86)]?_0x5485d8(0x9b)+_0x9d9a26[_0x5485d8(0x86)]+_0x5485d8(0x9e):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a30_0x93d254(0x85),'command':'query-url','description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a30_0x93d254(0x97),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x258107){const _0x177441=a30_0x93d254,_0x324a95=requireFilePath(_0x258107[_0x177441(0x9d)]('filepath')),_0x4aa499=await queryRuntimeFileUrl(_0x324a95,{'download':_0x258107[_0x177441(0x94)](_0x177441(0x8f)),'longTerm':_0x258107[_0x177441(0x94)](_0x177441(0x7e))});return{'ok':!![],'data':_0x4aa499};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
|
package/lib/commands/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x15c51d=a31_0x7e3d;(function(_0x1dd319,_0xe20ab6){const _0x32d632=a31_0x7e3d,_0x1e1583=_0x1dd319();while(!![]){try{const _0x12a135=parseInt(_0x32d632(0xfd))/0x1+-parseInt(_0x32d632(0xf7))/0x2*(-parseInt(_0x32d632(0xdc))/0x3)+parseInt(_0x32d632(0x110))/0x4+parseInt(_0x32d632(0xe4))/0x5*(-parseInt(_0x32d632(0xf0))/0x6)+-parseInt(_0x32d632(0xf8))/0x7+parseInt(_0x32d632(0x108))/0x8*(parseInt(_0x32d632(0x119))/0x9)+parseInt(_0x32d632(0x107))/0xa*(-parseInt(_0x32d632(0x11d))/0xb);if(_0x12a135===_0xe20ab6)break;else _0x1e1583['push'](_0x1e1583['shift']());}catch(_0x137545){_0x1e1583['push'](_0x1e1583['shift']());}}}(a31_0x1fa9,0x26daf));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';function a31_0x1fa9(){const _0x34f2d3=['trim','[Y/n]','validation','yes','Imported\x20from\x20','close','name','556188jDTKWe','\x20\x20appcode:\x20','\x20init\x20—\x20Create\x20','SIGINT','object','Aborted.','\x20\x20config:\x20\x20','21806jmmqve','736428rrxeut','\x20already\x20exists.\x20Overwrite?','boolean','stdout','file','43820arpicG','riskLevel','stdin','Source\x20file\x20not\x20found:\x20','once','Initialized\x20','question','flagMissing','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`.','newConfigFileName','2140DRskue','432wROLOL','cancelled','env','\x22.\x20Allowed:\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','utf8','\x0aInitialized\x20','defaultApp','398728piSNvO','project','message','\x20\x20default:\x20','):\x20','Override\x20imported\x20default\x20appcode',')\x20instead\x20of\x20project','removeListener','app','52722WAMPAI','entries','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','19294hDZIpE','race','Failed\x20to\x20parse\x20source\x20file:\x20','Write\x20to\x20global\x20(~/','cwd','Target\x20environment\x20(default\x20','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','[y/N]','includes','75flYIVe','App\x20code\x20cannot\x20be\x20empty.','parse','App\x20code\x20for\x20the\x20project','File\x20','Skip\x20confirmation\x20when\x20overwriting','join','log','5WWGSgT','string','global','appcode','apps'];a31_0x1fa9=function(){return _0x34f2d3;};return a31_0x1fa9();}import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':'appcode','type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0xdf)},{'name':a31_0x15c51d(0x10a),'type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0x122)+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x15c51d(0xe6),'type':a31_0x15c51d(0xfa),'description':a31_0x15c51d(0x120)+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x15c51d(0xec),'type':a31_0x15c51d(0xfa),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a31_0x15c51d(0xfc),'type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0x11c),'required':!![]},{'name':'appcode','type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0x115)},{'name':a31_0x15c51d(0x10a),'type':a31_0x15c51d(0xe5),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x15c51d(0xe6),'type':a31_0x15c51d(0xfa),'description':a31_0x15c51d(0x120)+PRODUCT_CONFIG[a31_0x15c51d(0x106)]+a31_0x15c51d(0x116),'default':![]},{'name':a31_0x15c51d(0xec),'type':'boolean','description':a31_0x15c51d(0xe1),'default':![]}];export async function runInit(_0x482c89){const _0x4f3736=a31_0x15c51d,_0x2d36a2=isNonInteractiveMode(_0x482c89),_0x118192=_0x482c89[_0x4f3736(0xe6)]?'global':_0x4f3736(0x111),_0x79fee4=resolveWriteConfigPath(_0x118192);try{_0x2d36a2?await runNonInteractive(_0x482c89,_0x79fee4):await runInteractive(_0x482c89,_0x79fee4);}catch(_0x2a7d5a){if(_0x2a7d5a instanceof AbortPrompt)throw CliErrors[_0x4f3736(0x109)]();throw _0x2a7d5a;}}export async function runInitImport(_0x3120c0){const _0x2b0cb2=a31_0x15c51d,_0x55ecc1=_0x3120c0[_0x2b0cb2(0xe6)]?_0x2b0cb2(0xe6):'project',_0x2dd616=resolveWriteConfigPath(_0x55ecc1);await runFromImport(_0x3120c0,_0x2dd616);}const RUNTIME_IRRELEVANT_KEYS=new Set(['apiDir']);async function runFromImport(_0x29f9bd,_0xbf17c2){const _0x1328e9=a31_0x15c51d,_0x207159=resolveFilePath(_0x29f9bd['file']);if(!existsSync(_0x207159))throw CliErrors[_0x1328e9(0xeb)](_0x1328e9(0x100)+_0x207159);const _0x194178=readSourceFile(_0x207159),_0x54ab8d=convertToRuntimeConfig(_0x194178);_0x29f9bd[_0x1328e9(0xe7)]&&(_0x54ab8d[_0x1328e9(0xe7)]=String(_0x29f9bd[_0x1328e9(0xe7)]));_0x29f9bd['env']&&(_0x54ab8d[_0x1328e9(0x10a)]=resolveInitEnv(_0x29f9bd));if(!_0x54ab8d[_0x1328e9(0xe7)])throw CliErrors[_0x1328e9(0xeb)]('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',_0x1328e9(0x105));await writeInitConfig(_0xbf17c2,_0x54ab8d,_0x29f9bd),console[_0x1328e9(0xe3)](_0x1328e9(0xed)+_0x207159),console['log'](_0x1328e9(0xf6)+_0xbf17c2),console[_0x1328e9(0xe3)](_0x1328e9(0xf1)+_0x54ab8d[_0x1328e9(0xe7)]);if(_0x54ab8d[_0x1328e9(0x10f)])console['log'](_0x1328e9(0x113)+_0x54ab8d[_0x1328e9(0x10f)]);}function convertToRuntimeConfig(_0x583c47){const _0x5cbe20=a31_0x15c51d;if(_0x583c47[_0x5cbe20(0xe8)]&&typeof _0x583c47['apps']===_0x5cbe20(0xf4))throw CliErrors[_0x5cbe20(0xeb)](_0x5cbe20(0xd9),_0x5cbe20(0x10c));const _0x1f2be9={};for(const _0x2b1dfe of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x583c47[_0x2b1dfe]!==undefined&&(_0x1f2be9[_0x2b1dfe]=_0x583c47[_0x2b1dfe]);}return!_0x1f2be9[_0x5cbe20(0xfe)]&&(_0x1f2be9['riskLevel']=DEFAULT_CONFIG_VALUES['riskLevel']),_0x1f2be9;}async function runNonInteractive(_0x58769a,_0x16baea){const _0x2092b2=a31_0x15c51d,_0x35ed08=_0x58769a[_0x2092b2(0xe7)];if(!_0x35ed08)throw CliErrors[_0x2092b2(0x104)](_0x2092b2(0xe7),'Usage:\x20'+CLI_BIN_NAME+_0x2092b2(0x11b));const _0xbc4e73=resolveInitEnv(_0x58769a);await writeInitConfig(_0x16baea,{'appcode':_0x35ed08,'env':_0xbc4e73},_0x58769a),console['log'](_0x2092b2(0x102)+_0x16baea),console[_0x2092b2(0xe3)](_0x2092b2(0xf1)+_0x35ed08),console[_0x2092b2(0xe3)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0xbc4e73);}async function runInteractive(_0x9f4dba,_0x5cbecc){const _0x3f5d71=a31_0x15c51d,_0x594f36=loadExisting(_0x5cbecc),_0x3d71b5=typeof _0x594f36?.['appcode']==='string'?_0x594f36[_0x3f5d71(0xe7)]:'',_0x57d644=resolveInitEnv(_0x9f4dba);console[_0x3f5d71(0xe3)](CLI_BIN_NAME+_0x3f5d71(0xf2)+PRODUCT_CONFIG[_0x3f5d71(0x106)]+'\x0a');if(existsSync(_0x5cbecc)&&!_0x9f4dba[_0x3f5d71(0xec)]){const _0x443ba7=await promptYesNo(_0x3f5d71(0xe0)+_0x5cbecc+_0x3f5d71(0xf9),![]);if(!_0x443ba7){console[_0x3f5d71(0xe3)](_0x3f5d71(0xf5));return;}}const _0x4c08e1=typeof _0x9f4dba[_0x3f5d71(0xe7)]===_0x3f5d71(0xe5)?_0x9f4dba[_0x3f5d71(0xe7)][_0x3f5d71(0xe9)]():'';let _0x52dd12=_0x4c08e1;!_0x52dd12&&(_0x52dd12=await promptInput('App\x20code',_0x3d71b5));if(!_0x52dd12[_0x3f5d71(0xe9)]())throw CliErrors[_0x3f5d71(0xeb)](_0x3f5d71(0xdd));await writeInitConfig(_0x5cbecc,{'appcode':_0x52dd12[_0x3f5d71(0xe9)](),'env':_0x57d644},_0x9f4dba),console['log'](_0x3f5d71(0x10e)+_0x5cbecc),console['log'](_0x3f5d71(0xf1)+_0x52dd12[_0x3f5d71(0xe9)]()),console[_0x3f5d71(0xe3)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x57d644);}async function writeInitConfig(_0x23fa23,_0x219c7b,_0x7368ba){const _0x3a4331=a31_0x15c51d;let _0x1a5d27={};existsSync(_0x23fa23)&&!_0x7368ba[_0x3a4331(0xec)]&&(_0x1a5d27=readConfigFile(_0x23fa23));for(const [_0x4eaf1f,_0x378b48]of Object[_0x3a4331(0x11a)](_0x219c7b)){_0x378b48!==undefined&&(_0x1a5d27[_0x4eaf1f]=_0x378b48);}if(_0x1a5d27[_0x3a4331(0x118)])delete _0x1a5d27['app'];writeConfigFile(_0x23fa23,_0x1a5d27);}function a31_0x7e3d(_0x5e8637,_0x583328){_0x5e8637=_0x5e8637-0xd9;const _0x1fa928=a31_0x1fa9();let _0x7e3d4e=_0x1fa928[_0x5e8637];return _0x7e3d4e;}class AbortPrompt extends Error{constructor(){const _0x460e79=a31_0x15c51d;super('User\x20aborted\x20prompt'),this[_0x460e79(0xef)]='AbortPrompt';}}function createSafeRl(){const _0x2044fc=a31_0x15c51d,_0x38b319=createInterface({'input':process[_0x2044fc(0xff)],'output':process[_0x2044fc(0xfb)]});let _0x23d4ad;const _0x493276=new Promise((_0x314e0f,_0x23617e)=>{const _0x4e99cc=_0x2044fc;_0x23d4ad=()=>{const _0x187c6c=a31_0x7e3d;_0x23d4ad&&(_0x38b319[_0x187c6c(0x117)](_0x187c6c(0xf3),_0x23d4ad),_0x23d4ad=undefined);try{_0x38b319[_0x187c6c(0xee)]();}catch{}_0x23617e(new AbortPrompt());},_0x38b319[_0x4e99cc(0x101)](_0x4e99cc(0xf3),_0x23d4ad);}),_0x26c4a9=()=>{const _0x39ee83=_0x2044fc;_0x23d4ad&&(_0x38b319['removeListener'](_0x39ee83(0xf3),_0x23d4ad),_0x23d4ad=undefined);try{_0x38b319['close']();}catch{}};return{'rl':_0x38b319,'abortPromise':_0x493276,'disposeSuccess':_0x26c4a9};}async function promptInput(_0x4672b1,_0x499c85){const _0x2089a8=a31_0x15c51d,{rl:_0x45f6ae,abortPromise:_0x1f1c41,disposeSuccess:_0x11f867}=createSafeRl(),_0x28ede5=new Promise(_0xf8a6ca=>{const _0xa52c3e=a31_0x7e3d,_0x47749d=_0x499c85?'\x20\x20'+_0x4672b1+'\x20('+_0x499c85+_0xa52c3e(0x114):'\x20\x20'+_0x4672b1+':\x20';_0x45f6ae[_0xa52c3e(0x103)](_0x47749d,_0xc31b7a=>{_0x11f867(),_0xf8a6ca(_0xc31b7a['trim']()||_0x499c85);});});return Promise[_0x2089a8(0x11e)]([_0x28ede5,_0x1f1c41]);}async function promptYesNo(_0x9be02a,_0x23a9d8){const _0x2cb213=a31_0x15c51d,{rl:_0x5a6ca3,abortPromise:_0x41bdf3,disposeSuccess:_0x35e35e}=createSafeRl(),_0x215372=new Promise(_0x556f00=>{const _0x72ec85=a31_0x7e3d,_0x3ab6be=_0x23a9d8?_0x72ec85(0xea):_0x72ec85(0xda);_0x5a6ca3[_0x72ec85(0x103)]('\x20\x20'+_0x9be02a+'\x20'+_0x3ab6be+':\x20',_0x16582a=>{const _0xf14678=_0x72ec85;_0x35e35e();const _0x143edd=_0x16582a[_0xf14678(0xe9)]()['toLowerCase']();if(_0x143edd==='y'||_0x143edd===_0xf14678(0xec))_0x556f00(!![]);else{if(_0x143edd==='n'||_0x143edd==='no')_0x556f00(![]);else _0x556f00(_0x23a9d8);}});});return Promise[_0x2cb213(0x11e)]([_0x215372,_0x41bdf3]);}function loadExisting(_0x1bdd1f){if(!existsSync(_0x1bdd1f))return null;return readConfigFile(_0x1bdd1f);}function resolveFilePath(_0x1cc43a){const _0x149d63=a31_0x15c51d;return isAbsolute(_0x1cc43a)?_0x1cc43a:resolve(process[_0x149d63(0x121)](),_0x1cc43a);}function readSourceFile(_0x425b0a){const _0x26a9f3=a31_0x15c51d;try{const _0x4c855a=readFileSync(_0x425b0a,{'encoding':_0x26a9f3(0x10d)});return JSON[_0x26a9f3(0xde)](_0x4c855a);}catch(_0xc3402c){throw CliErrors['validation'](_0x26a9f3(0x11f)+_0xc3402c[_0x26a9f3(0x112)]);}}function resolveInitEnv(_0x26223d){const _0x4790ce=a31_0x15c51d,_0x58b3af=_0x26223d[_0x4790ce(0x10a)];if(_0x58b3af===undefined||_0x58b3af==='')return DEFAULT_CONFIG_VALUES[_0x4790ce(0x10a)];if(!RUNTIME_ENV_VALUES[_0x4790ce(0xdb)](_0x58b3af))throw CliErrors['validation']('Invalid\x20env\x20\x22'+_0x58b3af+_0x4790ce(0x10b)+RUNTIME_ENV_VALUES[_0x4790ce(0xe2)](',\x20'));return _0x58b3af;}
|
|
1
|
+
const a31_0xd213ba=a31_0x3f69;(function(_0xbfe68c,_0x5926e2){const _0x114dc2=a31_0x3f69,_0x21198f=_0xbfe68c();while(!![]){try{const _0x313d90=parseInt(_0x114dc2(0x19f))/0x1*(-parseInt(_0x114dc2(0x1ac))/0x2)+parseInt(_0x114dc2(0x1c3))/0x3+parseInt(_0x114dc2(0x195))/0x4+-parseInt(_0x114dc2(0x1a5))/0x5*(-parseInt(_0x114dc2(0x1aa))/0x6)+-parseInt(_0x114dc2(0x1a7))/0x7+parseInt(_0x114dc2(0x1c8))/0x8*(-parseInt(_0x114dc2(0x189))/0x9)+-parseInt(_0x114dc2(0x1a0))/0xa;if(_0x313d90===_0x5926e2)break;else _0x21198f['push'](_0x21198f['shift']());}catch(_0x29497d){_0x21198f['push'](_0x21198f['shift']());}}}(a31_0x34dc,0xf2e09));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_0x34dc(){const _0x588ed7=['flagMissing','AbortPrompt','utf8','removeListener','global','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','once','question','[Y/n]','toLowerCase','appcode','4254093qxqGSa','apiDir','stdin','yes','includes','205304OEBIhD','App\x20code','newConfigFileName','261XkfAWb','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`.','\x20\x20env:\x20\x20\x20\x20\x20','):\x20','file',')\x20instead\x20of\x20project','\x20already\x20exists.\x20Overwrite?','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','riskLevel','Usage:\x20','boolean','Write\x20to\x20global\x20(~/','2523148pMDHpB','log','\x20\x20appcode:\x20','Imported\x20from\x20','name','object','string','App\x20code\x20for\x20the\x20project','cancelled','\x0aInitialized\x20','1IYaynQ','260930CObffA','SIGINT','cwd','trim','close','1145NJzLsk','Override\x20imported\x20default\x20env','9811802CvguNs','File\x20','entries','46608FQxmCR','App\x20code\x20cannot\x20be\x20empty.','1321718NjjoTJ','project','Initialized\x20','parse','Override\x20imported\x20default\x20appcode','race','env','apps','validation','app','defaultApp','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]'];a31_0x34dc=function(){return _0x588ed7;};return a31_0x34dc();}import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0xd213ba(0x1c2),'type':a31_0xd213ba(0x19b),'description':a31_0xd213ba(0x19c)},{'name':a31_0xd213ba(0x1b2),'type':a31_0xd213ba(0x19b),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0xd213ba(0x1bc),'type':a31_0xd213ba(0x193),'description':a31_0xd213ba(0x194)+PRODUCT_CONFIG['newConfigFileName']+a31_0xd213ba(0x18e),'default':![]},{'name':a31_0xd213ba(0x1c6),'type':a31_0xd213ba(0x193),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a31_0xd213ba(0x18d),'type':'string','description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0xd213ba(0x1c2),'type':a31_0xd213ba(0x19b),'description':a31_0xd213ba(0x1b0)},{'name':a31_0xd213ba(0x1b2),'type':a31_0xd213ba(0x19b),'description':a31_0xd213ba(0x1a6),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a31_0xd213ba(0x188)]+a31_0xd213ba(0x18e),'default':![]},{'name':'yes','type':a31_0xd213ba(0x193),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runInit(_0x56a374){const _0x1fd3b7=a31_0xd213ba,_0x5ad4b3=isNonInteractiveMode(_0x56a374),_0x29f5ee=_0x56a374['global']?_0x1fd3b7(0x1bc):_0x1fd3b7(0x1ad),_0x3f9ca4=resolveWriteConfigPath(_0x29f5ee);try{_0x5ad4b3?await runNonInteractive(_0x56a374,_0x3f9ca4):await runInteractive(_0x56a374,_0x3f9ca4);}catch(_0x6ac07d){if(_0x6ac07d instanceof AbortPrompt)throw CliErrors[_0x1fd3b7(0x19d)]();throw _0x6ac07d;}}export async function runInitImport(_0x410f58){const _0x5118c5=a31_0xd213ba,_0xaccece=_0x410f58[_0x5118c5(0x1bc)]?'global':'project',_0x39e915=resolveWriteConfigPath(_0xaccece);await runFromImport(_0x410f58,_0x39e915);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0xd213ba(0x1c4)]);async function runFromImport(_0x307703,_0x53a28c){const _0x4a81b6=a31_0xd213ba,_0x2bb4d5=resolveFilePath(_0x307703[_0x4a81b6(0x18d)]);if(!existsSync(_0x2bb4d5))throw CliErrors[_0x4a81b6(0x1b4)]('Source\x20file\x20not\x20found:\x20'+_0x2bb4d5);const _0xa655b3=readSourceFile(_0x2bb4d5),_0x5eb23d=convertToRuntimeConfig(_0xa655b3);_0x307703[_0x4a81b6(0x1c2)]&&(_0x5eb23d[_0x4a81b6(0x1c2)]=String(_0x307703['appcode']));_0x307703[_0x4a81b6(0x1b2)]&&(_0x5eb23d['env']=resolveInitEnv(_0x307703));if(!_0x5eb23d[_0x4a81b6(0x1c2)])throw CliErrors['validation'](_0x4a81b6(0x1bd),_0x4a81b6(0x18a));await writeInitConfig(_0x53a28c,_0x5eb23d,_0x307703),console[_0x4a81b6(0x196)](_0x4a81b6(0x198)+_0x2bb4d5),console[_0x4a81b6(0x196)]('\x20\x20config:\x20\x20'+_0x53a28c),console[_0x4a81b6(0x196)](_0x4a81b6(0x197)+_0x5eb23d[_0x4a81b6(0x1c2)]);if(_0x5eb23d[_0x4a81b6(0x1b6)])console[_0x4a81b6(0x196)]('\x20\x20default:\x20'+_0x5eb23d['defaultApp']);}function convertToRuntimeConfig(_0x59f3de){const _0x1132a1=a31_0xd213ba;if(_0x59f3de[_0x1132a1(0x1b3)]&&typeof _0x59f3de[_0x1132a1(0x1b3)]===_0x1132a1(0x19a))throw CliErrors[_0x1132a1(0x1b4)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x1132a1(0x190));const _0x1ae0de={};for(const _0x2e904d of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x59f3de[_0x2e904d]!==undefined&&(_0x1ae0de[_0x2e904d]=_0x59f3de[_0x2e904d]);}return!_0x1ae0de['riskLevel']&&(_0x1ae0de['riskLevel']=DEFAULT_CONFIG_VALUES[_0x1132a1(0x191)]),_0x1ae0de;}async function runNonInteractive(_0x56e6a3,_0x1a2527){const _0x1c43b7=a31_0xd213ba,_0x1e94ac=_0x56e6a3[_0x1c43b7(0x1c2)];if(!_0x1e94ac)throw CliErrors[_0x1c43b7(0x1b8)]('appcode',_0x1c43b7(0x192)+CLI_BIN_NAME+_0x1c43b7(0x1b7));const _0x50c4eb=resolveInitEnv(_0x56e6a3);await writeInitConfig(_0x1a2527,{'appcode':_0x1e94ac,'env':_0x50c4eb},_0x56e6a3),console[_0x1c43b7(0x196)](_0x1c43b7(0x1ae)+_0x1a2527),console[_0x1c43b7(0x196)](_0x1c43b7(0x197)+_0x1e94ac),console[_0x1c43b7(0x196)](_0x1c43b7(0x18b)+_0x50c4eb);}async function runInteractive(_0x25025d,_0x74246b){const _0x3d1ca5=a31_0xd213ba,_0x4a29d4=loadExisting(_0x74246b),_0x361cda=typeof _0x4a29d4?.[_0x3d1ca5(0x1c2)]===_0x3d1ca5(0x19b)?_0x4a29d4[_0x3d1ca5(0x1c2)]:'',_0x79656f=resolveInitEnv(_0x25025d);console[_0x3d1ca5(0x196)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG[_0x3d1ca5(0x188)]+'\x0a');if(existsSync(_0x74246b)&&!_0x25025d['yes']){const _0x56bc97=await promptYesNo(_0x3d1ca5(0x1a8)+_0x74246b+_0x3d1ca5(0x18f),![]);if(!_0x56bc97){console[_0x3d1ca5(0x196)]('Aborted.');return;}}const _0x17882d=typeof _0x25025d[_0x3d1ca5(0x1c2)]===_0x3d1ca5(0x19b)?_0x25025d[_0x3d1ca5(0x1c2)][_0x3d1ca5(0x1a3)]():'';let _0x4c769a=_0x17882d;!_0x4c769a&&(_0x4c769a=await promptInput(_0x3d1ca5(0x187),_0x361cda));if(!_0x4c769a['trim']())throw CliErrors[_0x3d1ca5(0x1b4)](_0x3d1ca5(0x1ab));await writeInitConfig(_0x74246b,{'appcode':_0x4c769a[_0x3d1ca5(0x1a3)](),'env':_0x79656f},_0x25025d),console[_0x3d1ca5(0x196)](_0x3d1ca5(0x19e)+_0x74246b),console[_0x3d1ca5(0x196)]('\x20\x20appcode:\x20'+_0x4c769a[_0x3d1ca5(0x1a3)]()),console[_0x3d1ca5(0x196)](_0x3d1ca5(0x18b)+_0x79656f);}async function writeInitConfig(_0x2a51c5,_0x4afdc5,_0x2fd3ef){const _0x4ac670=a31_0xd213ba;let _0x4b0a46={};existsSync(_0x2a51c5)&&!_0x2fd3ef[_0x4ac670(0x1c6)]&&(_0x4b0a46=readConfigFile(_0x2a51c5));for(const [_0x398f91,_0x6c5111]of Object[_0x4ac670(0x1a9)](_0x4afdc5)){_0x6c5111!==undefined&&(_0x4b0a46[_0x398f91]=_0x6c5111);}if(_0x4b0a46[_0x4ac670(0x1b5)])delete _0x4b0a46[_0x4ac670(0x1b5)];writeConfigFile(_0x2a51c5,_0x4b0a46);}class AbortPrompt extends Error{constructor(){const _0x559fec=a31_0xd213ba;super('User\x20aborted\x20prompt'),this[_0x559fec(0x199)]=_0x559fec(0x1b9);}}function createSafeRl(){const _0x5c10d2=a31_0xd213ba,_0x3d521c=createInterface({'input':process[_0x5c10d2(0x1c5)],'output':process['stdout']});let _0x4fb8cb;const _0x176601=new Promise((_0x14b859,_0x4502f7)=>{const _0x47bc=_0x5c10d2;_0x4fb8cb=()=>{const _0x1b83e2=a31_0x3f69;_0x4fb8cb&&(_0x3d521c[_0x1b83e2(0x1bb)]('SIGINT',_0x4fb8cb),_0x4fb8cb=undefined);try{_0x3d521c[_0x1b83e2(0x1a4)]();}catch{}_0x4502f7(new AbortPrompt());},_0x3d521c[_0x47bc(0x1be)](_0x47bc(0x1a1),_0x4fb8cb);}),_0xf39e1b=()=>{const _0x496ca8=_0x5c10d2;_0x4fb8cb&&(_0x3d521c[_0x496ca8(0x1bb)]('SIGINT',_0x4fb8cb),_0x4fb8cb=undefined);try{_0x3d521c[_0x496ca8(0x1a4)]();}catch{}};return{'rl':_0x3d521c,'abortPromise':_0x176601,'disposeSuccess':_0xf39e1b};}async function promptInput(_0x554d23,_0x5b64f2){const _0x3cfc96=a31_0xd213ba,{rl:_0x309ad9,abortPromise:_0x1a5269,disposeSuccess:_0x26c0d5}=createSafeRl(),_0x579935=new Promise(_0xaf5633=>{const _0x4e2804=a31_0x3f69,_0x339505=_0x5b64f2?'\x20\x20'+_0x554d23+'\x20('+_0x5b64f2+_0x4e2804(0x18c):'\x20\x20'+_0x554d23+':\x20';_0x309ad9[_0x4e2804(0x1bf)](_0x339505,_0x48c130=>{const _0x32f45d=_0x4e2804;_0x26c0d5(),_0xaf5633(_0x48c130[_0x32f45d(0x1a3)]()||_0x5b64f2);});});return Promise[_0x3cfc96(0x1b1)]([_0x579935,_0x1a5269]);}function a31_0x3f69(_0x58c0e9,_0x2d09c9){_0x58c0e9=_0x58c0e9-0x187;const _0x34dc06=a31_0x34dc();let _0x3f6970=_0x34dc06[_0x58c0e9];return _0x3f6970;}async function promptYesNo(_0x1029e5,_0x348b4a){const _0x183bd1=a31_0xd213ba,{rl:_0xa81822,abortPromise:_0x14d486,disposeSuccess:_0x100cac}=createSafeRl(),_0x5d61ef=new Promise(_0x44dce8=>{const _0xd2c6c6=a31_0x3f69,_0xbdc1ec=_0x348b4a?_0xd2c6c6(0x1c0):'[y/N]';_0xa81822[_0xd2c6c6(0x1bf)]('\x20\x20'+_0x1029e5+'\x20'+_0xbdc1ec+':\x20',_0x4dfa89=>{const _0x27f8df=_0xd2c6c6;_0x100cac();const _0x93705e=_0x4dfa89[_0x27f8df(0x1a3)]()[_0x27f8df(0x1c1)]();if(_0x93705e==='y'||_0x93705e===_0x27f8df(0x1c6))_0x44dce8(!![]);else{if(_0x93705e==='n'||_0x93705e==='no')_0x44dce8(![]);else _0x44dce8(_0x348b4a);}});});return Promise[_0x183bd1(0x1b1)]([_0x5d61ef,_0x14d486]);}function loadExisting(_0x47e760){if(!existsSync(_0x47e760))return null;return readConfigFile(_0x47e760);}function resolveFilePath(_0x3e37b8){const _0x2bb1a8=a31_0xd213ba;return isAbsolute(_0x3e37b8)?_0x3e37b8:resolve(process[_0x2bb1a8(0x1a2)](),_0x3e37b8);}function readSourceFile(_0x5081db){const _0x39515a=a31_0xd213ba;try{const _0x1d1145=readFileSync(_0x5081db,{'encoding':_0x39515a(0x1ba)});return JSON[_0x39515a(0x1af)](_0x1d1145);}catch(_0x115962){throw CliErrors[_0x39515a(0x1b4)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x115962['message']);}}function resolveInitEnv(_0x152609){const _0x152a27=a31_0xd213ba,_0x343a4f=_0x152609[_0x152a27(0x1b2)];if(_0x343a4f===undefined||_0x343a4f==='')return DEFAULT_CONFIG_VALUES[_0x152a27(0x1b2)];if(!RUNTIME_ENV_VALUES[_0x152a27(0x1c7)](_0x343a4f))throw CliErrors[_0x152a27(0x1b4)]('Invalid\x20env\x20\x22'+_0x343a4f+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x343a4f;}
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x41f390=a32_0x2cdb;(function(_0x2cf060,_0x1555c8){const _0x29881d=a32_0x2cdb,_0x1c4951=_0x2cf060();while(!![]){try{const _0x55bdb1=parseInt(_0x29881d(0x192))/0x1*(parseInt(_0x29881d(0x185))/0x2)+parseInt(_0x29881d(0x168))/0x3*(parseInt(_0x29881d(0x16d))/0x4)+-parseInt(_0x29881d(0x17b))/0x5+-parseInt(_0x29881d(0x19a))/0x6+parseInt(_0x29881d(0x17e))/0x7*(parseInt(_0x29881d(0x18d))/0x8)+parseInt(_0x29881d(0x194))/0x9*(parseInt(_0x29881d(0x19c))/0xa)+parseInt(_0x29881d(0x169))/0xb*(-parseInt(_0x29881d(0x195))/0xc);if(_0x55bdb1===_0x1555c8)break;else _0x1c4951['push'](_0x1c4951['shift']());}catch(_0x5f0986){_0x1c4951['push'](_0x1c4951['shift']());}}}(a32_0x440c,0xb4ad4));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';function a32_0x2cdb(_0x4886ce,_0x4212cd){_0x4886ce=_0x4886ce-0x164;const _0x440c58=a32_0x440c();let _0x2cdb83=_0x440c58[_0x4886ce];return _0x2cdb83;}function a32_0x440c(){const _0x51dc39=['389140iQzsDv','isFinite','userId','create','length','map','body','content','Updated\x20KB\x20entry\x20','scope','File\x20not\x20found:\x20','list','trim','69BkIxiG','1916387KOkwPM','ragErrorMessage','read','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','133572AhnvvA','metadata','str','title','utf8','docId','File\x20is\x20not\x20a\x20regular\x20file:\x20','Personal\x20knowledge-base\x20entry\x20title','/client/knowledge-base/personal/','build','POST','ragStatus','topk','version','6546750hMvFex','createTime','write','7oMOHVK','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','--topk\x20must\x20be\x20a\x20positive\x20number.','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','num','string','4678zMdnEs','query','Created\x20KB\x20entry\x20','Search\x20query\x20is\x20required.','Override\x20the\x20existing\x20entry\x20title','search','validation','score','2176232VHXikL','update','description','appCode','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','434MXMEap','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','99aXFYZh','24ukKFTr','file','bool','Personal\x20knowledge-base\x20entry\x20ID','/client/knowledge-base/personal/create','512472uaSLax','verbose'];a32_0x440c=function(){return _0x51dc39;};return a32_0x440c();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x41f390(0x170),'type':'string','required':!![],'description':a32_0x41f390(0x174)},FILE_FLAG={'name':'file','type':a32_0x41f390(0x184),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a32_0x41f390(0x186),'type':a32_0x41f390(0x184),'required':!![],'description':a32_0x41f390(0x17f)},TOPK_FLAG={'name':a32_0x41f390(0x179),'type':'number','description':a32_0x41f390(0x16c)};function readKnowledgeFile(_0x276a93){const _0x18ce58=a32_0x41f390;if(!_0x276a93)throw CliErrors[_0x18ce58(0x18b)]('File\x20path\x20is\x20required.');if(!existsSync(_0x276a93))throw CliErrors['validation'](_0x18ce58(0x165)+_0x276a93);if(!statSync(_0x276a93)['isFile']())throw CliErrors[_0x18ce58(0x18b)](_0x18ce58(0x173)+_0x276a93);return readFileSync(_0x276a93,_0x18ce58(0x171));}function summarizePersonalItem(_0xd86078){return{'id':_0xd86078['id'],'title':_0xd86078['title'],'version':_0xd86078['version'],'ragStatus':_0xd86078['ragStatus'],'ragErrorMessage':_0xd86078['ragErrorMessage'],'updateTime':_0xd86078['updateTime']};}function detailPersonalItem(_0x5a3653){const _0x28aa6a=a32_0x41f390;return{'id':_0x5a3653['id'],'appCode':_0x5a3653['appCode'],'scope':_0x5a3653['scope'],'userId':_0x5a3653[_0x28aa6a(0x19e)],'title':_0x5a3653[_0x28aa6a(0x170)],'content':_0x5a3653[_0x28aa6a(0x1a3)]??'','version':_0x5a3653[_0x28aa6a(0x17a)],'ragStatus':_0x5a3653[_0x28aa6a(0x178)],'ragErrorMessage':_0x5a3653[_0x28aa6a(0x16a)],'createTime':_0x5a3653[_0x28aa6a(0x17c)],'updateTime':_0x5a3653['updateTime']};}function summarizeSearchHit(_0x311642){const _0x2624c5=a32_0x41f390;return{'scope':_0x311642[_0x2624c5(0x164)],'title':_0x311642[_0x2624c5(0x170)],'docId':_0x311642[_0x2624c5(0x172)],'score':_0x311642[_0x2624c5(0x18c)],'weightedScore':_0x311642['weightedScore'],'content':_0x311642[_0x2624c5(0x1a3)],'metadata':_0x311642[_0x2624c5(0x16e)]};}function readTopK(_0x1f5aa7){const _0x2c6eef=a32_0x41f390,_0x22c683=_0x1f5aa7['flag'](_0x2c6eef(0x179));if(_0x22c683===undefined||_0x22c683===null||_0x22c683==='')return undefined;const _0x3e07e4=_0x1f5aa7['num']('topk');if(!Number[_0x2c6eef(0x19d)](_0x3e07e4)||_0x3e07e4<0x1)throw CliErrors[_0x2c6eef(0x18b)](_0x2c6eef(0x181));return _0x3e07e4;}const kbList={'service':'kb','command':a32_0x41f390(0x166),'description':a32_0x41f390(0x193),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x26fc75){const _0x4b4134=a32_0x41f390,_0x3caca1=await listPersonalKnowledgeBaseItems(_0x26fc75[_0x4b4134(0x190)]);if(_0x26fc75[_0x4b4134(0x197)](_0x4b4134(0x19b)))return{'ok':!![],'data':{'total':_0x3caca1[_0x4b4134(0x1a0)],'items':_0x3caca1}};return{'ok':!![],'data':{'total':_0x3caca1[_0x4b4134(0x1a0)],'items':_0x3caca1['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0x317302){const _0x55c0e3=a32_0x41f390,_0x8b72e9=await getPersonalKnowledgeBaseItem(_0x317302[_0x55c0e3(0x183)]('id'),_0x317302[_0x55c0e3(0x190)]);return{'ok':!![],'data':detailPersonalItem(_0x8b72e9)};}},kbCreate={'service':'kb','command':a32_0x41f390(0x19f),'description':a32_0x41f390(0x182),'risk':a32_0x41f390(0x17d),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x11a78c){const _0x5cc224=a32_0x41f390,_0x11ae6d=_0x11a78c[_0x5cc224(0x16f)]('title'),_0x38acc8=readKnowledgeFile(_0x11a78c[_0x5cc224(0x16f)]('file')),_0x2d423e=await createPersonalKnowledgeBaseItem(_0x11a78c[_0x5cc224(0x190)],{'title':_0x11ae6d,'content':_0x38acc8});return{'ok':!![],'data':summarizePersonalItem(_0x2d423e),'message':_0x5cc224(0x187)+_0x2d423e['id']+'\x20('+_0x2d423e[_0x5cc224(0x170)]+')'};},async 'dryRun'(_0x1fa529){const _0x22be5f=a32_0x41f390,_0x3c74f5=_0x1fa529[_0x22be5f(0x16f)](_0x22be5f(0x170)),_0x8a7631=readKnowledgeFile(_0x1fa529[_0x22be5f(0x16f)](_0x22be5f(0x196)));return dryRun(_0x22be5f(0x177),_0x22be5f(0x199))['body']({'appCode':_0x1fa529['appCode'],'title':_0x3c74f5,'content':_0x8a7631})[_0x22be5f(0x18f)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x3c74f5+'\x22')[_0x22be5f(0x176)]();}},kbUpdate={'service':'kb','command':a32_0x41f390(0x18e),'description':a32_0x41f390(0x191),'risk':a32_0x41f390(0x17d),'flags':[{...ID_FLAG,'description':a32_0x41f390(0x198)},{...TITLE_FLAG,'required':![],'description':a32_0x41f390(0x189)},FILE_FLAG],async 'execute'(_0x36ec6b){const _0x474f90=a32_0x41f390,_0xfc4f37=_0x36ec6b[_0x474f90(0x183)]('id'),_0xbae8e7=readKnowledgeFile(_0x36ec6b[_0x474f90(0x16f)](_0x474f90(0x196))),_0x4d5ccc=_0x36ec6b[_0x474f90(0x16f)](_0x474f90(0x170))||(await getPersonalKnowledgeBaseItem(_0xfc4f37,_0x36ec6b['appCode']))[_0x474f90(0x170)],_0x5db040=await updatePersonalKnowledgeBaseItem(_0xfc4f37,_0x36ec6b['appCode'],{'title':_0x4d5ccc,'content':_0xbae8e7});return{'ok':!![],'data':summarizePersonalItem(_0x5db040),'message':_0x474f90(0x1a4)+_0x5db040['id']+'\x20('+_0x5db040[_0x474f90(0x170)]+')'};},async 'dryRun'(_0x4cba51){const _0x3bf984=a32_0x41f390,_0x2de980=_0x4cba51[_0x3bf984(0x183)]('id'),_0x23a344=readKnowledgeFile(_0x4cba51[_0x3bf984(0x16f)](_0x3bf984(0x196))),_0x3d067f=_0x4cba51[_0x3bf984(0x16f)]('title')||(await getPersonalKnowledgeBaseItem(_0x2de980,_0x4cba51[_0x3bf984(0x190)]))[_0x3bf984(0x170)];return dryRun(_0x3bf984(0x177),_0x3bf984(0x175)+_0x2de980+'/update')[_0x3bf984(0x1a2)]({'appCode':_0x4cba51[_0x3bf984(0x190)],'title':_0x3d067f,'content':_0x23a344})[_0x3bf984(0x18f)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x2de980)[_0x3bf984(0x176)]();}},kbSearch={'service':'kb','command':a32_0x41f390(0x18a),'description':a32_0x41f390(0x180),'risk':a32_0x41f390(0x16b),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x4dd7b7){const _0xb38b19=a32_0x41f390;if(!_0x4dd7b7['str'](_0xb38b19(0x186))[_0xb38b19(0x167)]())throw CliErrors[_0xb38b19(0x18b)](_0xb38b19(0x188));readTopK(_0x4dd7b7);},async 'execute'(_0x4f362f){const _0x38fcb6=a32_0x41f390,_0x33fd41=_0x4f362f['str'](_0x38fcb6(0x186))['trim'](),_0x2f4441=readTopK(_0x4f362f),_0x3d24a6=await searchKnowledgeBase(_0x4f362f[_0x38fcb6(0x190)],{'query':_0x33fd41,'topK':_0x2f4441});return{'ok':!![],'data':{'total':_0x3d24a6['length'],'hits':_0x3d24a6[_0x38fcb6(0x1a1)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a33_0x441cad=a33_0x25f8;(function(_0x16e2a2,_0x294a61){const _0x27cf43=a33_0x25f8,_0x4c6cc8=_0x16e2a2();while(!![]){try{const _0x5d572c=-parseInt(_0x27cf43(0x125))/0x1+-parseInt(_0x27cf43(0x114))/0x2+-parseInt(_0x27cf43(0x11d))/0x3+-parseInt(_0x27cf43(0x132))/0x4+-parseInt(_0x27cf43(0x121))/0x5+parseInt(_0x27cf43(0x11a))/0x6*(-parseInt(_0x27cf43(0x117))/0x7)+parseInt(_0x27cf43(0x130))/0x8*(parseInt(_0x27cf43(0x112))/0x9);if(_0x5d572c===_0x294a61)break;else _0x4c6cc8['push'](_0x4c6cc8['shift']());}catch(_0x16cf32){_0x4c6cc8['push'](_0x4c6cc8['shift']());}}}(a33_0x27b2,0x9a58b));function a33_0x27b2(){const _0x20e265=['stringify','clear','log','\x20logs:\x0a','success','en-US','forEach','830400WpRCrr','logs','3309124osBcBJ','*\x20No\x20logs\x20found','387txmXOX','timestamp','121088YbuwmV','level','write','4072719dyjAaG','warn','read','6wWEEou','readLogs','message','2486646npegiR','clearLogs','show','duration','4262630lHRHfR','error','Clear\x20command\x20history\x20logs','toLocaleString','680147peGyHW','keys','*\x20Logs\x20cleared','\x20\x20\x20Details:\x20'];a33_0x27b2=function(){return _0x20e265;};return a33_0x27b2();}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x25f8(_0x4902c3,_0x13482b){_0x4902c3=_0x4902c3-0x111;const _0x27b26a=a33_0x27b2();let _0x25f857=_0x27b26a[_0x4902c3];return _0x25f857;}function printLogs(_0x2803a2){const _0x267d4f=a33_0x25f8;if(_0x2803a2['length']===0x0){console['log'](_0x267d4f(0x111));return;}console[_0x267d4f(0x12b)]('*\x20'+CLI_DISPLAY_NAME+_0x267d4f(0x12c)),_0x2803a2[_0x267d4f(0x12f)]((_0x61b8ce,_0x2373b7)=>{const _0x2b7071=_0x267d4f,_0x4fb069=new Date(_0x61b8ce[_0x2b7071(0x113)])[_0x2b7071(0x124)](_0x2b7071(0x12e)),_0xdf9e54=_0x61b8ce[_0x2b7071(0x115)]===_0x2b7071(0x12d)?'√':_0x61b8ce[_0x2b7071(0x115)]===_0x2b7071(0x122)?'×':_0x61b8ce[_0x2b7071(0x115)]===_0x2b7071(0x118)?'!':'i';console[_0x2b7071(0x12b)](_0x2373b7+0x1+'.\x20'+_0xdf9e54+'\x20['+_0x61b8ce['command']+']\x20'+_0x61b8ce[_0x2b7071(0x11c)]),console['log']('\x20\x20\x20Time:\x20'+_0x4fb069),_0x61b8ce['duration']&&console[_0x2b7071(0x12b)]('\x20\x20\x20Duration:\x20'+_0x61b8ce[_0x2b7071(0x120)]+'ms'),_0x61b8ce['details']&&Object[_0x2b7071(0x126)](_0x61b8ce['details'])['length']>0x0&&console[_0x2b7071(0x12b)](_0x2b7071(0x128)+JSON[_0x2b7071(0x129)](_0x61b8ce['details'],null,0x2)),console[_0x2b7071(0x12b)]('');});}export const logsDefinitions=[{'service':a33_0x441cad(0x131),'command':a33_0x441cad(0x11f),'description':'View\x20command\x20history\x20logs','risk':a33_0x441cad(0x119),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x445f94){const _0x5b2812=a33_0x441cad;return printLogs(logger[_0x5b2812(0x11b)]()),{'ok':!![]};}},{'service':a33_0x441cad(0x131),'command':a33_0x441cad(0x12a),'description':a33_0x441cad(0x123),'risk':a33_0x441cad(0x116),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2b18ea){const _0x3f6ac7=a33_0x441cad;return logger[_0x3f6ac7(0x11e)](),console['log'](_0x3f6ac7(0x127)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0x578f6d=a34_0x12bb;(function(_0x187372,_0x493b3f){const _0x275d8d=a34_0x12bb,_0x1c595c=_0x187372();while(!![]){try{const _0x5b7d31=-parseInt(_0x275d8d(0x18e))/0x1+-parseInt(_0x275d8d(0x180))/0x2*(parseInt(_0x275d8d(0x198))/0x3)+parseInt(_0x275d8d(0x170))/0x4*(parseInt(_0x275d8d(0x19d))/0x5)+-parseInt(_0x275d8d(0x16e))/0x6+parseInt(_0x275d8d(0x189))/0x7+-parseInt(_0x275d8d(0x193))/0x8*(parseInt(_0x275d8d(0x185))/0x9)+parseInt(_0x275d8d(0x194))/0xa*(parseInt(_0x275d8d(0x173))/0xb);if(_0x5b7d31===_0x493b3f)break;else _0x1c595c['push'](_0x1c595c['shift']());}catch(_0x498294){_0x1c595c['push'](_0x1c595c['shift']());}}}(a34_0x4c18,0x64c74));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a34_0x12bb(_0x584ab0,_0x367b50){_0x584ab0=_0x584ab0-0x167;const _0x4c18a8=a34_0x4c18();let _0x12bb92=_0x4c18a8[_0x584ab0];return _0x12bb92;}import{dryRun}from'../../framework/dryrun.js';function a34_0x4c18(){const _0x516405=['141010WcAley','image-url','invoice','/client/ocr','916689lWYMxN','imageUrl','imageFile','File\x20upload\x20response\x20missing\x20filePath.','Unsupported\x20OCR\x20scene:\x20','55eSSsrx','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','recognize','apiError','IdCard','/client/uploadFile','image-file','fileUrl','3521892xKxhCa','general','27628qkJKiX','scene','description','2090yRpSlG','POST','<filePath\x20returned\x20by\x20/client/uploadFile>','\x20OCR\x20from\x20URL','idCard','idcard','build','General','File\x20URL\x20response\x20missing\x20fileUrl.','fileName','str','length','Table','4dPvhkP','form','.\x20Supported\x20scenes:\x20','string','path','6010929RaEbct','filePath','appCode','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','1908158DcadsZ','ocr','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','\x20OCR','Invoice','748984zRfuDo','trim','write','body','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','8kMNpqY'];a34_0x4c18=function(){return _0x516405;};return a34_0x4c18();}const SUPPORTED_SCENES=[a34_0x578f6d(0x196),a34_0x578f6d(0x16f),a34_0x578f6d(0x181),a34_0x578f6d(0x177)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x578f6d(0x18d),'general':a34_0x578f6d(0x17a),'form':a34_0x578f6d(0x17f),'idCard':a34_0x578f6d(0x16a)},SCENE_FLAG={'name':a34_0x578f6d(0x171),'type':a34_0x578f6d(0x183),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x578f6d(0x18b)},IMAGE_FILE_FLAG={'name':'image-file','type':a34_0x578f6d(0x183),'description':a34_0x578f6d(0x167)},IMAGE_URL_FLAG={'name':'image-url','type':'string','description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x117ee5){const _0x37d5fb=a34_0x578f6d,_0x44d64d=_0x117ee5[_0x37d5fb(0x18f)]()['toLowerCase']();if(_0x44d64d===_0x37d5fb(0x178))return'idCard';if(_0x44d64d===_0x37d5fb(0x196)||_0x44d64d===_0x37d5fb(0x16f)||_0x44d64d===_0x37d5fb(0x181))return _0x44d64d;throw CliErrors['validation'](_0x37d5fb(0x19c)+_0x117ee5+_0x37d5fb(0x182)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x10a365){const _0x20139b=a34_0x578f6d,_0x47cb69=_0x10a365[_0x20139b(0x17d)]('image-file')[_0x20139b(0x18f)](),_0x1f9c12=_0x10a365[_0x20139b(0x17d)](_0x20139b(0x195))[_0x20139b(0x18f)]();return{'imageFile':_0x47cb69,'imageUrl':_0x1f9c12,'count':[_0x47cb69,_0x1f9c12]['filter'](Boolean)[_0x20139b(0x17e)]};}function validateInputSelection(_0x52622b){const _0x164cc9=selectedInputs(_0x52622b);if(_0x164cc9['count']!==0x1)throw CliErrors['validation']('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x164cc9;}function withScene(_0x1a123e,_0x294ac2,_0xed8015){const _0x24c037=a34_0x578f6d;return{..._0x1a123e,'scene':_0x294ac2,..._0xed8015?{'sourceFile':{'fileName':_0xed8015[_0x24c037(0x17c)],'filePath':_0xed8015[_0x24c037(0x186)]}}:{}};}const ocrRecognize={'service':a34_0x578f6d(0x18a),'command':a34_0x578f6d(0x168),'description':a34_0x578f6d(0x192),'risk':a34_0x578f6d(0x190),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3f8735){const _0x55659b=a34_0x578f6d,_0x10903c=normalizeScene(_0x3f8735[_0x55659b(0x17d)](_0x55659b(0x171))),_0xa07588=SCENE_TO_LEGACY_TYPE[_0x10903c],_0xb59345=validateInputSelection(_0x3f8735);if(_0xb59345[_0x55659b(0x199)])return dryRun('POST',_0x55659b(0x197))[_0x55659b(0x191)]({'appCode':_0x3f8735[_0x55659b(0x187)],'url':_0xb59345[_0x55659b(0x199)],'type':_0xa07588})[_0x55659b(0x172)]('Preview:\x20recognize\x20'+_0x10903c+_0x55659b(0x176))[_0x55659b(0x179)]();const _0x1336f7=requireRuntimeUploadFile(_0xb59345[_0x55659b(0x19a)],_0x55659b(0x16c));return dryRun(_0x55659b(0x174),_0x55659b(0x16b))[_0x55659b(0x191)]({'steps':[{'method':_0x55659b(0x174),'url':_0x55659b(0x16b),'body':{'appCode':_0x3f8735[_0x55659b(0x187)],'multipart':{'file':_0x1336f7}}},{'method':_0x55659b(0x174),'url':'/client/queryFileUrl','body':{'filePath':_0x55659b(0x175),'downloadFlag':![]}},{'method':'POST','url':_0x55659b(0x197),'body':{'appCode':_0x3f8735['appCode'],'url':'<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','type':_0xa07588}}]})[_0x55659b(0x172)](_0x55659b(0x188)+_0x10903c+_0x55659b(0x18c))[_0x55659b(0x179)]();},async 'execute'(_0x57cdd5){const _0x1464d3=a34_0x578f6d,_0x2c98d6=normalizeScene(_0x57cdd5[_0x1464d3(0x17d)](_0x1464d3(0x171))),_0x93f7bb=SCENE_TO_LEGACY_TYPE[_0x2c98d6],_0x4f90ab=validateInputSelection(_0x57cdd5);if(_0x4f90ab['imageUrl']){const _0x5d173b=await recognizeRuntimeOcr(_0x57cdd5['appCode'],{'url':_0x4f90ab[_0x1464d3(0x199)],'type':_0x93f7bb});return{'ok':!![],'data':withScene(_0x5d173b,_0x2c98d6)};}const _0x2585fd=requireRuntimeUploadFile(_0x4f90ab[_0x1464d3(0x19a)],_0x1464d3(0x16c)),_0x3b33a3=await uploadRuntimeFile(_0x57cdd5['appCode'],_0x2585fd[_0x1464d3(0x184)]);if(!_0x3b33a3['filePath'])throw CliErrors[_0x1464d3(0x169)](_0x1464d3(0x19b));const _0x1019bd=await queryRuntimeFileUrl(_0x3b33a3[_0x1464d3(0x186)],{'download':![]});if(!_0x1019bd[_0x1464d3(0x16d)])throw CliErrors[_0x1464d3(0x169)](_0x1464d3(0x17b));const _0x5f081d=await recognizeRuntimeOcr(_0x57cdd5[_0x1464d3(0x187)],{'url':_0x1019bd['fileUrl'],'type':_0x93f7bb});return{'ok':!![],'data':withScene(_0x5f081d,_0x2c98d6,_0x3b33a3)};}};export const ocrDefinitions=[ocrRecognize];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a35_0x4959(_0x24dcb2,_0x35beda){_0x24dcb2=_0x24dcb2-0x91;const _0x4c57ae=a35_0x4c57();let _0x495956=_0x4c57ae[_0x24dcb2];return _0x495956;}const a35_0x20f073=a35_0x4959;(function(_0x47fd75,_0x5b45e9){const _0x3308f0=a35_0x4959,_0x1ac475=_0x47fd75();while(!![]){try{const _0x5bceea=-parseInt(_0x3308f0(0xbc))/0x1+-parseInt(_0x3308f0(0xb5))/0x2*(parseInt(_0x3308f0(0xa5))/0x3)+parseInt(_0x3308f0(0xcb))/0x4+-parseInt(_0x3308f0(0x96))/0x5*(-parseInt(_0x3308f0(0x9b))/0x6)+parseInt(_0x3308f0(0xb1))/0x7+parseInt(_0x3308f0(0x92))/0x8+-parseInt(_0x3308f0(0x97))/0x9*(parseInt(_0x3308f0(0xb6))/0xa);if(_0x5bceea===_0x5b45e9)break;else _0x1ac475['push'](_0x1ac475['shift']());}catch(_0x3b5f52){_0x1ac475['push'](_0x1ac475['shift']());}}}(a35_0x4c57,0x26cc7));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':'file','type':'string','description':a35_0x20f073(0xc9)},FUNCTION_NAME_FLAG={'name':a35_0x20f073(0xb3),'type':a35_0x20f073(0xce),'required':!![],'description':a35_0x20f073(0x99)},DESCRIPTION_FLAG={'name':a35_0x20f073(0xb0),'type':a35_0x20f073(0xce),'description':'Personal\x20BFF\x20description'},SOURCE_SESSION_FLAG={'name':a35_0x20f073(0x9c),'type':'string','description':a35_0x20f073(0x91)};function normalizeFunctionName(_0x19767f){const _0x31a784=a35_0x20f073,_0x5614c6=String(_0x19767f||'')['trim']();if(!_0x5614c6||!FUNCTION_NAME_PATTERN[_0x31a784(0x9f)](_0x5614c6))throw CliErrors['validation'](_0x31a784(0xc5));return _0x5614c6;}function readScriptFile(_0x80b7c7){const _0x2fc8b1=a35_0x20f073;if(!_0x80b7c7)throw CliErrors[_0x2fc8b1(0xa6)](_0x2fc8b1(0x9e));if(!existsSync(_0x80b7c7))throw CliErrors[_0x2fc8b1(0xa6)](_0x2fc8b1(0xca)+_0x80b7c7);if(!statSync(_0x80b7c7)['isFile']())throw CliErrors[_0x2fc8b1(0xa6)](_0x2fc8b1(0xc7)+_0x80b7c7);const _0x116753=readFileSync(_0x80b7c7,_0x2fc8b1(0xa0));if(!_0x116753['trim']())throw CliErrors[_0x2fc8b1(0xa6)](_0x2fc8b1(0xc8));return _0x116753;}function optionalTrimmed(_0x2f2b74){const _0x10360a=String(_0x2f2b74||'')['trim']();return _0x10360a||undefined;}function summarizeBff(_0x37924e){const _0x513497=a35_0x20f073;return{'id':_0x37924e['id'],'appCode':_0x37924e['appCode'],'functionName':_0x37924e[_0x513497(0xaf)],'description':_0x37924e[_0x513497(0xb0)],'scriptType':_0x37924e['scriptType'],'version':_0x37924e['version'],'gmtModified':_0x37924e[_0x513497(0xa9)],'updateTime':_0x37924e[_0x513497(0xd3)]};}function detailBff(_0x492f43){const _0x1d91aa=a35_0x20f073;return{'id':_0x492f43['id'],'appCode':_0x492f43[_0x1d91aa(0xb4)],'functionName':_0x492f43[_0x1d91aa(0xaf)],'description':_0x492f43[_0x1d91aa(0xb0)],'scriptType':_0x492f43[_0x1d91aa(0xa1)],'scriptContent':_0x492f43[_0x1d91aa(0xad)]??'','config':_0x492f43[_0x1d91aa(0x98)],'version':_0x492f43[_0x1d91aa(0xab)],'createUserId':_0x492f43[_0x1d91aa(0xb8)],'gmtCreate':_0x492f43[_0x1d91aa(0xbf)],'gmtModified':_0x492f43[_0x1d91aa(0xa9)],'createTime':_0x492f43[_0x1d91aa(0x9a)],'updateTime':_0x492f43[_0x1d91aa(0xd3)]};}function buildCreateInput(_0x2ad4bc){const _0x36c4ef=a35_0x20f073;return{'functionName':normalizeFunctionName(_0x2ad4bc[_0x36c4ef(0xa2)](_0x36c4ef(0xb3))),...optionalTrimmed(_0x2ad4bc[_0x36c4ef(0xa2)]('description'))?{'description':optionalTrimmed(_0x2ad4bc[_0x36c4ef(0xa2)](_0x36c4ef(0xb0)))}:{},'scriptContent':readScriptFile(_0x2ad4bc['str'](_0x36c4ef(0xb9))),...optionalTrimmed(_0x2ad4bc[_0x36c4ef(0xa2)]('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0x2ad4bc[_0x36c4ef(0xa2)](_0x36c4ef(0x9c)))}:{}};}function buildUpdateInput(_0x3a3fca){const _0x2df8e2=a35_0x20f073,_0x28566f={};optionalTrimmed(_0x3a3fca['str']('name'))&&(_0x28566f['functionName']=normalizeFunctionName(_0x3a3fca[_0x2df8e2(0xa2)](_0x2df8e2(0xb3))));_0x3a3fca['flag']('description')!==undefined&&(_0x28566f['description']=_0x3a3fca[_0x2df8e2(0xa2)]('description'));optionalTrimmed(_0x3a3fca['str'](_0x2df8e2(0xb9)))&&(_0x28566f[_0x2df8e2(0xad)]=readScriptFile(_0x3a3fca[_0x2df8e2(0xa2)](_0x2df8e2(0xb9))));_0x3a3fca[_0x2df8e2(0x95)](_0x2df8e2(0x9c))!==undefined&&(_0x28566f['sourceSessionId']=_0x3a3fca[_0x2df8e2(0xa2)](_0x2df8e2(0x9c)));if(Object[_0x2df8e2(0xac)](_0x28566f)['length']===0x0)throw CliErrors[_0x2df8e2(0xa6)](_0x2df8e2(0xbd));return _0x28566f;}function a35_0x4c57(){const _0x311d10=['133929LgTBQz','config','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','createTime','10362dycFXY','source-session-id','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','File\x20path\x20is\x20required.','test','utf8','scriptType','str','read','params','655833xCSiAM','validation','/update','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','gmtModified','body','version','keys','scriptContent','POST','functionName','description','2201059JzOvOS','Executed\x20personal\x20BFF\x20','name','appCode','2rIuxvA','20aOyhFD','write','createUserId','file','build','list','64717wgZPeH','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','isArray','gmtCreate','Show\x20one\x20personal\x20BFF\x20by\x20id','map','/client/runtime-bff/personal/create','num','length','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','Preview:\x20create\x20personal\x20BFF\x20','File\x20is\x20not\x20a\x20regular\x20file:\x20','Personal\x20BFF\x20script\x20file\x20is\x20blank.','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','File\x20not\x20found:\x20','433584NHVqvE','create','bool','string','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','Preview:\x20update\x20personal\x20BFF\x20','exec','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','updateTime','Optional\x20source\x20RuntimeAgent\x20session\x20id','255248GtcyyU','personal-bff','Personal\x20BFF\x20script\x20ID','flag','50CsNvXI'];a35_0x4c57=function(){return _0x311d10;};return a35_0x4c57();}function parseExecParams(_0x21e873){const _0x1e09b2=a35_0x20f073,_0xcd25d7=parseJsonParams(_0x21e873)??{};if(Array[_0x1e09b2(0xbe)](_0xcd25d7))throw CliErrors[_0x1e09b2(0xa6)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0xcd25d7;}const personalBffList={'service':a35_0x20f073(0x93),'command':a35_0x20f073(0xbb),'description':a35_0x20f073(0xd2),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x54211d){const _0x541145=a35_0x20f073,_0x2a221f=await listPersonalBffs(_0x54211d[_0x541145(0xb4)]);return{'ok':!![],'data':{'total':_0x2a221f[_0x541145(0xc4)],'items':_0x54211d[_0x541145(0xcd)]('verbose')?_0x2a221f:_0x2a221f[_0x541145(0xc1)](summarizeBff)}};}},personalBffDetail={'service':a35_0x20f073(0x93),'command':'detail','description':a35_0x20f073(0xc0),'risk':a35_0x20f073(0xa3),'flags':[{...ID_FLAG,'description':a35_0x20f073(0x94)}],async 'execute'(_0x5db8cb){const _0x371e81=a35_0x20f073,_0x5c716e=await getPersonalBff(_0x5db8cb[_0x371e81(0xc3)]('id'),_0x5db8cb[_0x371e81(0xb4)]);return{'ok':!![],'data':detailBff(_0x5c716e)};}},personalBffCreate={'service':a35_0x20f073(0x93),'command':a35_0x20f073(0xcc),'description':a35_0x20f073(0xcf),'risk':a35_0x20f073(0xb7),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x5ea992){const _0x155e15=a35_0x20f073,_0x261ef3=buildCreateInput(_0x5ea992),_0x50fca5=await createPersonalBff(_0x5ea992[_0x155e15(0xb4)],_0x261ef3);return{'ok':!![],'data':detailBff(_0x50fca5),'message':'Created\x20personal\x20BFF\x20'+_0x50fca5['id']+(_0x50fca5[_0x155e15(0xaf)]?'\x20('+_0x50fca5[_0x155e15(0xaf)]+')':'')};},async 'dryRun'(_0x1d11aa){const _0x1c2528=a35_0x20f073,_0x4781ef=buildCreateInput(_0x1d11aa);return dryRun(_0x1c2528(0xae),_0x1c2528(0xc2))[_0x1c2528(0xaa)]({'appCode':_0x1d11aa[_0x1c2528(0xb4)],..._0x4781ef})[_0x1c2528(0xb0)](_0x1c2528(0xc6)+_0x4781ef['functionName'])[_0x1c2528(0xba)]();}},personalBffUpdate={'service':'personal-bff','command':'update','description':'Update\x20a\x20personal\x20BFF\x20by\x20id','risk':a35_0x20f073(0xb7),'flags':[{...ID_FLAG,'description':a35_0x20f073(0x94)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x13ad35){const _0x1ed015=a35_0x20f073,_0x3b9ecc=_0x13ad35[_0x1ed015(0xc3)]('id'),_0x4e4fd3=buildUpdateInput(_0x13ad35),_0x5cc05a=await updatePersonalBff(_0x3b9ecc,_0x13ad35[_0x1ed015(0xb4)],_0x4e4fd3);return{'ok':!![],'data':detailBff(_0x5cc05a),'message':'Updated\x20personal\x20BFF\x20'+_0x5cc05a['id']+(_0x5cc05a[_0x1ed015(0xaf)]?'\x20('+_0x5cc05a[_0x1ed015(0xaf)]+')':'')};},async 'dryRun'(_0x357993){const _0x5a48a1=a35_0x20f073,_0x4ea87b=_0x357993['num']('id'),_0x3d2060=buildUpdateInput(_0x357993);return dryRun(_0x5a48a1(0xae),'/client/runtime-bff/personal/'+_0x4ea87b+_0x5a48a1(0xa7))['body']({'appCode':_0x357993['appCode'],..._0x3d2060})[_0x5a48a1(0xb0)](_0x5a48a1(0xd0)+_0x4ea87b)[_0x5a48a1(0xba)]();}},personalBffExec={'service':'personal-bff','command':a35_0x20f073(0xd1),'description':a35_0x20f073(0x9d),'risk':'high-risk-write','flags':[{...ID_FLAG,'description':a35_0x20f073(0x94)},{...PARAMS_FLAG,'description':a35_0x20f073(0xa8)}],async 'validate'(_0x256eca){const _0x194e9c=a35_0x20f073;parseExecParams(_0x256eca[_0x194e9c(0xa2)]('params'));},async 'execute'(_0x301ab9){const _0x4d267d=a35_0x20f073,_0x77fc7c=_0x301ab9[_0x4d267d(0xc3)]('id'),_0x50ece9=parseExecParams(_0x301ab9[_0x4d267d(0xa2)](_0x4d267d(0xa4))),_0x2654b1=await executePersonalBff(_0x77fc7c,_0x301ab9['appCode'],_0x50ece9);return{'ok':!![],'data':{'result':_0x2654b1},'message':_0x4d267d(0xb2)+_0x77fc7c};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
|
|
1
|
+
const a35_0x215fcc=a35_0x2af5;(function(_0x178ee9,_0x861a3c){const _0x27108d=a35_0x2af5,_0x3554f6=_0x178ee9();while(!![]){try{const _0x339a58=parseInt(_0x27108d(0x1c3))/0x1*(-parseInt(_0x27108d(0x1b9))/0x2)+-parseInt(_0x27108d(0x189))/0x3*(parseInt(_0x27108d(0x1c4))/0x4)+-parseInt(_0x27108d(0x186))/0x5+-parseInt(_0x27108d(0x19c))/0x6+parseInt(_0x27108d(0x1a0))/0x7*(parseInt(_0x27108d(0x19d))/0x8)+parseInt(_0x27108d(0x19e))/0x9*(-parseInt(_0x27108d(0x1b6))/0xa)+parseInt(_0x27108d(0x195))/0xb*(parseInt(_0x27108d(0x1bf))/0xc);if(_0x339a58===_0x861a3c)break;else _0x3554f6['push'](_0x3554f6['shift']());}catch(_0x12ec45){_0x3554f6['push'](_0x3554f6['shift']());}}}(a35_0x43f7,0xe8959));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_0x215fcc(0x1af),'type':a35_0x215fcc(0x18a),'description':a35_0x215fcc(0x1be)},FUNCTION_NAME_FLAG={'name':'name','type':a35_0x215fcc(0x18a),'required':!![],'description':'Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders'},DESCRIPTION_FLAG={'name':a35_0x215fcc(0x1a5),'type':a35_0x215fcc(0x18a),'description':a35_0x215fcc(0x188)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a35_0x215fcc(0x18a),'description':a35_0x215fcc(0x199)};function normalizeFunctionName(_0x5d456a){const _0x111597=a35_0x215fcc,_0x49c1e7=String(_0x5d456a||'')[_0x111597(0x194)]();if(!_0x49c1e7||!FUNCTION_NAME_PATTERN['test'](_0x49c1e7))throw CliErrors[_0x111597(0x1a4)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x49c1e7;}function readScriptFile(_0x5b2cb3){const _0x22bfd0=a35_0x215fcc;if(!_0x5b2cb3)throw CliErrors[_0x22bfd0(0x1a4)](_0x22bfd0(0x1b8));if(!existsSync(_0x5b2cb3))throw CliErrors[_0x22bfd0(0x1a4)]('File\x20not\x20found:\x20'+_0x5b2cb3);if(!statSync(_0x5b2cb3)[_0x22bfd0(0x1b0)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x5b2cb3);const _0x8528a2=readFileSync(_0x5b2cb3,_0x22bfd0(0x1bd));if(!_0x8528a2['trim']())throw CliErrors[_0x22bfd0(0x1a4)](_0x22bfd0(0x1a8));return _0x8528a2;}function optionalTrimmed(_0x328e9e){const _0x1cd27b=String(_0x328e9e||'')['trim']();return _0x1cd27b||undefined;}function summarizeBff(_0x1fc133){const _0x118e2a=a35_0x215fcc;return{'id':_0x1fc133['id'],'appCode':_0x1fc133[_0x118e2a(0x187)],'functionName':_0x1fc133[_0x118e2a(0x1a3)],'description':_0x1fc133[_0x118e2a(0x1a5)],'scriptType':_0x1fc133[_0x118e2a(0x1ad)],'version':_0x1fc133[_0x118e2a(0x18f)],'gmtModified':_0x1fc133[_0x118e2a(0x1ae)],'updateTime':_0x1fc133['updateTime']};}function detailBff(_0x38a8e1){const _0x35a9eb=a35_0x215fcc;return{'id':_0x38a8e1['id'],'appCode':_0x38a8e1[_0x35a9eb(0x187)],'functionName':_0x38a8e1[_0x35a9eb(0x1a3)],'description':_0x38a8e1[_0x35a9eb(0x1a5)],'scriptType':_0x38a8e1['scriptType'],'scriptContent':_0x38a8e1[_0x35a9eb(0x1aa)]??'','config':_0x38a8e1[_0x35a9eb(0x18e)],'version':_0x38a8e1[_0x35a9eb(0x18f)],'createUserId':_0x38a8e1[_0x35a9eb(0x191)],'gmtCreate':_0x38a8e1[_0x35a9eb(0x181)],'gmtModified':_0x38a8e1['gmtModified'],'createTime':_0x38a8e1[_0x35a9eb(0x190)],'updateTime':_0x38a8e1[_0x35a9eb(0x192)]};}function buildCreateInput(_0x11a5d8){const _0x4a0a79=a35_0x215fcc;return{'functionName':normalizeFunctionName(_0x11a5d8['str']('name')),...optionalTrimmed(_0x11a5d8[_0x4a0a79(0x1bb)](_0x4a0a79(0x1a5)))?{'description':optionalTrimmed(_0x11a5d8[_0x4a0a79(0x1bb)](_0x4a0a79(0x1a5)))}:{},'scriptContent':readScriptFile(_0x11a5d8[_0x4a0a79(0x1bb)](_0x4a0a79(0x1af))),...optionalTrimmed(_0x11a5d8['str'](_0x4a0a79(0x193)))?{'sourceSessionId':optionalTrimmed(_0x11a5d8['str'](_0x4a0a79(0x193)))}:{}};}function a35_0x2af5(_0x129178,_0xe41c04){_0x129178=_0x129178-0x181;const _0x43f719=a35_0x43f7();let _0x2af58c=_0x43f719[_0x129178];return _0x2af58c;}function buildUpdateInput(_0x538825){const _0x265132=a35_0x215fcc,_0x1c10f1={};optionalTrimmed(_0x538825[_0x265132(0x1bb)](_0x265132(0x1a1)))&&(_0x1c10f1['functionName']=normalizeFunctionName(_0x538825[_0x265132(0x1bb)](_0x265132(0x1a1))));_0x538825['flag'](_0x265132(0x1a5))!==undefined&&(_0x1c10f1['description']=_0x538825[_0x265132(0x1bb)](_0x265132(0x1a5)));optionalTrimmed(_0x538825['str'](_0x265132(0x1af)))&&(_0x1c10f1['scriptContent']=readScriptFile(_0x538825[_0x265132(0x1bb)](_0x265132(0x1af))));_0x538825[_0x265132(0x1ab)](_0x265132(0x193))!==undefined&&(_0x1c10f1['sourceSessionId']=_0x538825[_0x265132(0x1bb)]('source-session-id'));if(Object['keys'](_0x1c10f1)['length']===0x0)throw CliErrors[_0x265132(0x1a4)](_0x265132(0x183));return _0x1c10f1;}function a35_0x43f7(){const _0x4ede40=['body','scriptContent','flag','Update\x20a\x20personal\x20BFF\x20by\x20id','scriptType','gmtModified','file','isFile','/client/runtime-bff/personal/','isArray','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','length','530bLgTPC','verbose','File\x20path\x20is\x20required.','4utWjYp','num','str','build','utf8','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','80698212LFdecY','high-risk-write','/client/runtime-bff/personal/create','POST','376819FxxwMu','218512byIwFo','gmtCreate','list','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','create','personal-bff','4827055ZwYrMK','appCode','Personal\x20BFF\x20description','99kSnbLQ','string','Preview:\x20create\x20personal\x20BFF\x20','Preview:\x20update\x20personal\x20BFF\x20','params','config','version','createTime','createUserId','updateTime','source-session-id','trim','11mTYhzg','--params\x20must\x20be\x20a\x20JSON\x20object.','/update','exec','Optional\x20source\x20RuntimeAgent\x20session\x20id','Show\x20one\x20personal\x20BFF\x20by\x20id','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','6638586EoKIBO','120flmnxl','292131rXnufd','Personal\x20BFF\x20script\x20ID','268961AoHSVy','name','update','functionName','validation','description','read','write','Personal\x20BFF\x20script\x20file\x20is\x20blank.'];a35_0x43f7=function(){return _0x4ede40;};return a35_0x43f7();}function parseExecParams(_0x30c434){const _0x251c8e=a35_0x215fcc,_0xde8190=parseJsonParams(_0x30c434)??{};if(Array[_0x251c8e(0x1b2)](_0xde8190))throw CliErrors[_0x251c8e(0x1a4)](_0x251c8e(0x196));return _0xde8190;}const personalBffList={'service':a35_0x215fcc(0x185),'command':a35_0x215fcc(0x182),'description':a35_0x215fcc(0x19b),'risk':a35_0x215fcc(0x1a6),'flags':[VERBOSE_FLAG],async 'execute'(_0x3e8e82){const _0x332197=a35_0x215fcc,_0x5483a6=await listPersonalBffs(_0x3e8e82['appCode']);return{'ok':!![],'data':{'total':_0x5483a6[_0x332197(0x1b5)],'items':_0x3e8e82['bool'](_0x332197(0x1b7))?_0x5483a6:_0x5483a6['map'](summarizeBff)}};}},personalBffDetail={'service':a35_0x215fcc(0x185),'command':'detail','description':a35_0x215fcc(0x19a),'risk':a35_0x215fcc(0x1a6),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x228b3c){const _0x2b1910=await getPersonalBff(_0x228b3c['num']('id'),_0x228b3c['appCode']);return{'ok':!![],'data':detailBff(_0x2b1910)};}},personalBffCreate={'service':'personal-bff','command':a35_0x215fcc(0x184),'description':a35_0x215fcc(0x1b4),'risk':'write','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x3a39e8){const _0x30e849=a35_0x215fcc,_0x35ae8=buildCreateInput(_0x3a39e8),_0x373b83=await createPersonalBff(_0x3a39e8[_0x30e849(0x187)],_0x35ae8);return{'ok':!![],'data':detailBff(_0x373b83),'message':'Created\x20personal\x20BFF\x20'+_0x373b83['id']+(_0x373b83[_0x30e849(0x1a3)]?'\x20('+_0x373b83['functionName']+')':'')};},async 'dryRun'(_0x27aeb8){const _0x539278=a35_0x215fcc,_0x4deb58=buildCreateInput(_0x27aeb8);return dryRun(_0x539278(0x1c2),_0x539278(0x1c1))[_0x539278(0x1a9)]({'appCode':_0x27aeb8[_0x539278(0x187)],..._0x4deb58})['description'](_0x539278(0x18b)+_0x4deb58[_0x539278(0x1a3)])[_0x539278(0x1bc)]();}},personalBffUpdate={'service':a35_0x215fcc(0x185),'command':a35_0x215fcc(0x1a2),'description':a35_0x215fcc(0x1ac),'risk':a35_0x215fcc(0x1a7),'flags':[{...ID_FLAG,'description':a35_0x215fcc(0x19f)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x10c161){const _0x4c5a25=a35_0x215fcc,_0x5bb56c=_0x10c161[_0x4c5a25(0x1ba)]('id'),_0xaf8296=buildUpdateInput(_0x10c161),_0x4beaee=await updatePersonalBff(_0x5bb56c,_0x10c161[_0x4c5a25(0x187)],_0xaf8296);return{'ok':!![],'data':detailBff(_0x4beaee),'message':'Updated\x20personal\x20BFF\x20'+_0x4beaee['id']+(_0x4beaee[_0x4c5a25(0x1a3)]?'\x20('+_0x4beaee['functionName']+')':'')};},async 'dryRun'(_0x38b2de){const _0x457001=a35_0x215fcc,_0x527356=_0x38b2de['num']('id'),_0x21c834=buildUpdateInput(_0x38b2de);return dryRun(_0x457001(0x1c2),_0x457001(0x1b1)+_0x527356+_0x457001(0x197))[_0x457001(0x1a9)]({'appCode':_0x38b2de[_0x457001(0x187)],..._0x21c834})['description'](_0x457001(0x18c)+_0x527356)[_0x457001(0x1bc)]();}},personalBffExec={'service':'personal-bff','command':a35_0x215fcc(0x198),'description':a35_0x215fcc(0x1b3),'risk':a35_0x215fcc(0x1c0),'flags':[{...ID_FLAG,'description':a35_0x215fcc(0x19f)},{...PARAMS_FLAG,'description':'JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution'}],async 'validate'(_0x396f90){const _0x562675=a35_0x215fcc;parseExecParams(_0x396f90[_0x562675(0x1bb)](_0x562675(0x18d)));},async 'execute'(_0x24c9d5){const _0x1c7a76=a35_0x215fcc,_0x4e62f6=_0x24c9d5[_0x1c7a76(0x1ba)]('id'),_0x365324=parseExecParams(_0x24c9d5[_0x1c7a76(0x1bb)](_0x1c7a76(0x18d))),_0x261af3=await executePersonalBff(_0x4e62f6,_0x24c9d5[_0x1c7a76(0x187)],_0x365324);return{'ok':!![],'data':{'result':_0x261af3},'message':'Executed\x20personal\x20BFF\x20'+_0x4e62f6};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
|
package/lib/commands/registry.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x412a37=a36_0x484b;(function(_0x34a26d,_0x1360fa){const _0x402c9e=a36_0x484b,_0x59d42b=_0x34a26d();while(!![]){try{const _0x4c76db=-parseInt(_0x402c9e(0xcd))/0x1*(parseInt(_0x402c9e(0xe9))/0x2)+-parseInt(_0x402c9e(0xf5))/0x3*(parseInt(_0x402c9e(0xf0))/0x4)+parseInt(_0x402c9e(0xcb))/0x5+parseInt(_0x402c9e(0xd7))/0x6+parseInt(_0x402c9e(0xde))/0x7*(parseInt(_0x402c9e(0xd2))/0x8)+-parseInt(_0x402c9e(0xea))/0x9+parseInt(_0x402c9e(0xe5))/0xa;if(_0x4c76db===_0x1360fa)break;else _0x59d42b['push'](_0x59d42b['shift']());}catch(_0x3dc33c){_0x59d42b['push'](_0x59d42b['shift']());}}}(a36_0x44db,0x379c1));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';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';function a36_0x484b(_0x4185bd,_0x589114){_0x4185bd=_0x4185bd-0xcb;const _0x44db4b=a36_0x44db();let _0x484b2f=_0x44db4b[_0x4185bd];return _0x484b2f;}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=[];function a36_0x44db(){const _0x251369=['424983WpVwhl','1906355SYZypn','service','225253nlePzh','risk','Agent\x20Schedules','install','App\x20Management','1024lSyfUG','Personal\x20BFF','Skills','values','CLI\x20Built-in\x20Skill','1105638XhSbDK','read','write','Diagnostics','map','Knowledge\x20Base','\x20\x20[high-risk-write]','1169AhlzEi','push','from','command','API\x20Documentation','Configuration','Authentication','449940TxQiMj','set','isSingleCommand','get','2apGmcl','335007SdlZRH','Datasets','OCR','description','Workspace','Instant\x20API','4uQvqHj','Self\x20Update','File','Runtime\x20App\x20Config','list'];a36_0x44db=function(){return _0x251369;};return a36_0x44db();}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x406216){const _0x33df81=a36_0x484b;for(const _0x2a0752 of _0x406216){definitions[_0x33df81(0xe6)](_0x2a0752[_0x33df81(0xcc)]+':'+_0x2a0752[_0x33df81(0xe1)],_0x2a0752);let _0x1b1996=serviceGroups['get'](_0x2a0752['service']);!_0x1b1996&&(_0x1b1996=[],serviceGroups[_0x33df81(0xe6)](_0x2a0752[_0x33df81(0xcc)],_0x1b1996)),_0x1b1996[_0x33df81(0xdf)](_0x2a0752);}}function registerService(_0x5b7b13,_0x490e19,_0x3a014e){const _0x3ae3e9=a36_0x484b;registerDefinitions(_0x490e19);const _0x3870e3=_0x3b4334=>_0x3b4334===_0x3ae3e9(0xd8)?'':_0x3b4334===_0x3ae3e9(0xd9)?'\x20\x20[write]':_0x3ae3e9(0xdd),_0x889ff8={'service':_0x490e19[0x0][_0x3ae3e9(0xcc)],'label':_0x5b7b13,'commands':_0x490e19[_0x3ae3e9(0xdb)](_0x11044c=>({'command':_0x11044c[_0x3ae3e9(0xe1)],'description':_0x11044c[_0x3ae3e9(0xed)],'tag':_0x3870e3(_0x11044c[_0x3ae3e9(0xce)])})),'defaultCommand':_0x3a014e?.['defaultCommand']??(_0x3a014e?.[_0x3ae3e9(0xe7)]?_0x490e19[0x0][_0x3ae3e9(0xe1)]:undefined),'isSingleCommand':_0x3a014e?.[_0x3ae3e9(0xe7)]};serviceRegistry[_0x3ae3e9(0xdf)](_0x889ff8),serviceByName['set'](_0x889ff8[_0x3ae3e9(0xcc)],_0x889ff8);}registerService(a36_0x412a37(0xe4),authDefinitions,{'defaultCommand':'login'}),registerService(a36_0x412a37(0xd1),appDefinitions,{'defaultCommand':a36_0x412a37(0xf4)}),registerService(a36_0x412a37(0xee),workspaceDefinitions),registerService(a36_0x412a37(0xf3),appConfigDefinitions),registerService(a36_0x412a37(0xe3),configDefinitions,{'defaultCommand':'list'}),registerService(a36_0x412a37(0xe2),apiDocDefinitions),registerService(a36_0x412a37(0xeb),datasetDefinitions),registerService(a36_0x412a37(0xef),dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService('BFF\x20Scripts',bffDefinitions),registerService(a36_0x412a37(0xd3),personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a36_0x412a37(0xf2),fileDefinitions),registerService(a36_0x412a37(0xec),ocrDefinitions),registerService(a36_0x412a37(0xdc),kbDefinitions),registerService(a36_0x412a37(0xcf),scheduleDefinitions,{'defaultCommand':a36_0x412a37(0xf4)}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':a36_0x412a37(0xf4)}),registerService(a36_0x412a37(0xd4),skillDefinitions,{'defaultCommand':a36_0x412a37(0xd0)}),registerService(a36_0x412a37(0xd6),cliSkillDefinitions,{'defaultCommand':a36_0x412a37(0xd0)}),registerService(a36_0x412a37(0xf1),[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService(a36_0x412a37(0xda),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService('Logs',logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x614a0c,_0x304cd9){const _0xb1669=a36_0x412a37;return definitions[_0xb1669(0xe8)](_0x614a0c+':'+_0x304cd9);}export function isKnownService(_0x376a39){return serviceByName['has'](_0x376a39);}export function getServiceEntry(_0xb9e595){const _0x162c68=a36_0x412a37;return serviceByName[_0x162c68(0xe8)](_0xb9e595);}export function getAllDefinitions(){const _0x3234ba=a36_0x412a37;return Array[_0x3234ba(0xe0)](definitions[_0x3234ba(0xd5)]());}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x45bbf7=a37_0x1527;(function(_0x1bb751,_0xd2684a){const _0x11e8f5=a37_0x1527,_0xad86f5=_0x1bb751();while(!![]){try{const _0x27cf16=parseInt(_0x11e8f5(0x12d))/0x1*(parseInt(_0x11e8f5(0x12c))/0x2)+parseInt(_0x11e8f5(0x130))/0x3*(-parseInt(_0x11e8f5(0x12e))/0x4)+-parseInt(_0x11e8f5(0x11b))/0x5*(-parseInt(_0x11e8f5(0xea))/0x6)+parseInt(_0x11e8f5(0x125))/0x7+parseInt(_0x11e8f5(0xf4))/0x8+parseInt(_0x11e8f5(0x108))/0x9*(-parseInt(_0x11e8f5(0x131))/0xa)+-parseInt(_0x11e8f5(0x10a))/0xb*(parseInt(_0x11e8f5(0xec))/0xc);if(_0x27cf16===_0xd2684a)break;else _0xad86f5['push'](_0xad86f5['shift']());}catch(_0x3775b9){_0xad86f5['push'](_0xad86f5['shift']());}}}(a37_0x5e95,0x54564));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';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_0x45bbf7(0x133),'type':a37_0x45bbf7(0x123),'required':!![],'enum':[a37_0x45bbf7(0x111),'ONCE'],'description':a37_0x45bbf7(0x127)},CRON_FLAG={'name':a37_0x45bbf7(0x100),'type':a37_0x45bbf7(0x123),'description':a37_0x45bbf7(0x109)},SCHEDULED_AT_FLAG={'name':a37_0x45bbf7(0x129),'type':'string','description':a37_0x45bbf7(0x106)},TITLE_FLAG={'name':a37_0x45bbf7(0x120),'type':a37_0x45bbf7(0x123),'required':!![],'description':a37_0x45bbf7(0xfd)},PROMPT_FLAG={'name':a37_0x45bbf7(0xed),'type':a37_0x45bbf7(0x123),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},CHANNEL_FLAG={'name':a37_0x45bbf7(0xf8),'type':a37_0x45bbf7(0x123),'enum':[a37_0x45bbf7(0x116),a37_0x45bbf7(0x113)],'default':a37_0x45bbf7(0x116),'description':a37_0x45bbf7(0x114)},SCHEDULE_ID_FLAG={'name':a37_0x45bbf7(0x11d),'type':a37_0x45bbf7(0x123),'required':!![],'description':a37_0x45bbf7(0x11f),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x45bbf7(0x122)}},LIMIT_FLAG={'name':'limit','type':a37_0x45bbf7(0x12f),'default':0x14,'description':a37_0x45bbf7(0x132)},CURSOR_FLAG={'name':'cursor','type':a37_0x45bbf7(0x123),'description':a37_0x45bbf7(0xf2)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x2b6942){const _0x36f48f=a37_0x45bbf7,_0x2f77d1=_0x2b6942[_0x36f48f(0xeb)]('kind'),_0x206def=_0x2b6942[_0x36f48f(0xeb)](_0x36f48f(0x120))[_0x36f48f(0x119)](),_0x12a3a9=_0x2b6942[_0x36f48f(0xeb)](_0x36f48f(0xed))[_0x36f48f(0x119)](),_0x59f916=_0x2b6942[_0x36f48f(0xeb)](_0x36f48f(0xf8)),_0x437293=_0x2b6942[_0x36f48f(0xeb)]('cron'),_0x1c1f49=_0x2b6942['str'](_0x36f48f(0x129));if(!_0x206def)throw CliErrors[_0x36f48f(0x112)](_0x36f48f(0xfb));if(!_0x12a3a9)throw CliErrors[_0x36f48f(0x112)](_0x36f48f(0x115));if(_0x2f77d1===_0x36f48f(0x111)){if(!_0x437293||_0x1c1f49)throw CliErrors[_0x36f48f(0x112)](_0x36f48f(0xf7));return{'kind':_0x2f77d1,'timezone':_0x36f48f(0x124),'cron':_0x437293,'title':_0x206def,'prompt':_0x12a3a9,'channel':_0x59f916};}if(_0x2f77d1==='ONCE'){if(!_0x1c1f49||_0x437293)throw CliErrors[_0x36f48f(0x112)](_0x36f48f(0x128));return{'kind':_0x2f77d1,'timezone':'UTC','scheduledAt':_0x1c1f49,'title':_0x206def,'prompt':_0x12a3a9,'channel':_0x59f916};}throw CliErrors[_0x36f48f(0x112)](_0x36f48f(0x103));}function a37_0x1527(_0x55ed3f,_0x18f92a){_0x55ed3f=_0x55ed3f-0xe6;const _0x5e95fb=a37_0x5e95();let _0x1527bb=_0x5e95fb[_0x55ed3f];return _0x1527bb;}function scheduleCollectionPath(_0x108bde){const _0x5677e9=a37_0x45bbf7;return _0x5677e9(0xff)+encodeURIComponent(_0x108bde)+_0x5677e9(0x12a);}function scheduleItemPath(_0x12448c,_0x35b63a){return scheduleCollectionPath(_0x12448c)+'/'+encodeURIComponent(_0x35b63a);}const scheduleValidate={'service':a37_0x45bbf7(0xe9),'command':'validate','description':a37_0x45bbf7(0xe6),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x53ea3e){readScheduleInput(_0x53ea3e);},async 'execute'(_0x154604){const _0x463121=a37_0x45bbf7,_0x472cdf=readScheduleInput(_0x154604),_0x56687c=await validateRuntimeSchedule(_0x154604[_0x463121(0x105)],_0x472cdf);return{'ok':!![],'data':_0x56687c,'message':_0x463121(0xe8)};}},scheduleCreate={'service':a37_0x45bbf7(0xe9),'command':a37_0x45bbf7(0xe7),'description':a37_0x45bbf7(0x11a),'risk':'high-risk-write','flags':INPUT_FLAGS,async 'validate'(_0x353752){readScheduleInput(_0x353752);},async 'execute'(_0x3aa4d5){const _0x2dac69=a37_0x45bbf7,_0x6271c8=readScheduleInput(_0x3aa4d5),_0x1494c6=await validateRuntimeSchedule(_0x3aa4d5[_0x2dac69(0x105)],_0x6271c8),_0x51bd69=await createRuntimeSchedule(_0x3aa4d5[_0x2dac69(0x105)],_0x1494c6);return{'ok':!![],'data':_0x51bd69,'message':_0x2dac69(0x134)+_0x51bd69[_0x2dac69(0x133)]+_0x2dac69(0x117)+_0x51bd69[_0x2dac69(0xf1)]};},async 'dryRun'(_0x44ea26){const _0x59b1f0=a37_0x45bbf7,_0x3c010b=readScheduleInput(_0x44ea26);return dryRun(_0x59b1f0(0x118),scheduleCollectionPath(_0x44ea26[_0x59b1f0(0x105)]))[_0x59b1f0(0xf9)](_0x3c010b)[_0x59b1f0(0x101)](_0x59b1f0(0xfc))[_0x59b1f0(0xfa)]();}},scheduleList={'service':a37_0x45bbf7(0xe9),'command':a37_0x45bbf7(0xf3),'description':'List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','risk':'read','flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x961700){const _0xeeb482=a37_0x45bbf7,_0x557790=_0x961700[_0xeeb482(0x10e)](_0xeeb482(0x102));if(!Number[_0xeeb482(0xf0)](_0x557790)||_0x557790<0x1||_0x557790>0x64)throw CliErrors['validation']('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x3f425e=_0x961700[_0xeeb482(0xeb)](_0xeeb482(0x107));if(_0x3f425e&&(_0x3f425e[_0xeeb482(0x10f)]>0x400||_0x3f425e['trim']()!==_0x3f425e))throw CliErrors[_0xeeb482(0x112)](_0xeeb482(0x10b));},async 'execute'(_0x4fbfee){const _0x236ed5=a37_0x45bbf7,_0x4cda2=_0x4fbfee[_0x236ed5(0xeb)](_0x236ed5(0x107)),_0x33daaa=await listRuntimeSchedules(_0x4fbfee[_0x236ed5(0x105)],{'limit':_0x4fbfee[_0x236ed5(0x10e)](_0x236ed5(0x102)),..._0x4cda2?{'cursor':_0x4cda2}:{}});return{'ok':!![],'data':_0x33daaa};}},scheduleDetail={'service':a37_0x45bbf7(0xe9),'command':a37_0x45bbf7(0xef),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a37_0x45bbf7(0x10d),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x78fa56){const _0x3b8359=a37_0x45bbf7,_0x5e51d9=await getRuntimeSchedule(_0x78fa56[_0x3b8359(0x105)],_0x78fa56['str'](_0x3b8359(0x11d)));return{'ok':!![],'data':_0x5e51d9};}},scheduleRun={'service':a37_0x45bbf7(0xe9),'command':a37_0x45bbf7(0xf5),'description':'Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','risk':a37_0x45bbf7(0x11e),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x8f786e){const _0x2b7c9d=a37_0x45bbf7,_0x4718f9=_0x8f786e[_0x2b7c9d(0xeb)](_0x2b7c9d(0x11d)),_0x331696=await runRuntimeSchedule(_0x8f786e[_0x2b7c9d(0x105)],_0x4718f9);return{'ok':!![],'data':_0x331696,'message':_0x2b7c9d(0x121)+_0x331696[_0x2b7c9d(0xee)]+_0x2b7c9d(0x10c)+_0x4718f9};},async 'dryRun'(_0x2b09c8){const _0x224754=a37_0x45bbf7,_0x34a7dc=_0x2b09c8[_0x224754(0xeb)]('schedule-id');return dryRun(_0x224754(0x118),scheduleItemPath(_0x2b09c8[_0x224754(0x105)],_0x34a7dc)+_0x224754(0x104))[_0x224754(0x101)](_0x224754(0x11c)+_0x34a7dc+_0x224754(0x126))['build']();}},scheduleDelete={'service':a37_0x45bbf7(0xe9),'command':a37_0x45bbf7(0xfe),'description':'Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','risk':a37_0x45bbf7(0x11e),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x29d23a){const _0x29a20d=a37_0x45bbf7,_0x54b293=_0x29d23a['str'](_0x29a20d(0x11d)),_0x5e59bd=await deleteRuntimeSchedule(_0x29d23a[_0x29a20d(0x105)],_0x54b293);return{'ok':!![],'data':_0x5e59bd,'message':_0x29a20d(0x12b)+_0x54b293};},async 'dryRun'(_0x4dab6f){const _0x13ff32=a37_0x45bbf7,_0x4f9379=_0x4dab6f[_0x13ff32(0xeb)]('schedule-id');return dryRun(_0x13ff32(0xf6),scheduleItemPath(_0x4dab6f[_0x13ff32(0x105)],_0x4f9379))['description'](_0x13ff32(0x110)+_0x4f9379)[_0x13ff32(0xfa)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];function a37_0x5e95(){const _0x147448=['channel','body','build','--title\x20must\x20not\x20be\x20blank.','Preview:\x20create\x20an\x20Agent\x20schedule','Schedule\x20title','delete','/api/harness/apps/','cron','description','limit','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','/run','appCode','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','cursor','9fjTsss','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','392304xwARJy','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','\x20from\x20schedule\x20','read','num','length','Preview:\x20delete\x20schedule\x20','CRON','validation','premium','Task\x20channel:\x20auto\x20or\x20premium','--prompt\x20must\x20not\x20be\x20blank.','auto','\x20schedule\x20','POST','trim','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','357055LhjfvC','Preview:\x20run\x20schedule\x20','schedule-id','high-risk-write','Schedule\x20UUID','title','Queued\x20Task\x20','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','string','UTC','1387974JADtdM','\x20immediately','Schedule\x20kind:\x20CRON\x20or\x20ONCE','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','scheduled-at','/schedules','Deleted\x20schedule\x20','2xrBTgj','175789vFJfud','527588QesDal','number','3fWOAjZ','3318010WvRcQF','Page\x20size\x20from\x201\x20to\x20100','kind','Created\x20','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','create','Schedule\x20input\x20is\x20valid','schedule','12kfrkcl','str','36oJMkYa','prompt','taskId','detail','isSafeInteger','scheduleId','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','list','3193928RlWnRF','run','DELETE','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.'];a37_0x5e95=function(){return _0x147448;};return a37_0x5e95();}
|
|
1
|
+
const a37_0x550965=a37_0xc3cf;(function(_0xfec908,_0x50623a){const _0x8e596a=a37_0xc3cf,_0x368042=_0xfec908();while(!![]){try{const _0x1b04b6=-parseInt(_0x8e596a(0xec))/0x1+parseInt(_0x8e596a(0x103))/0x2*(-parseInt(_0x8e596a(0x109))/0x3)+-parseInt(_0x8e596a(0xf3))/0x4+parseInt(_0x8e596a(0xea))/0x5+parseInt(_0x8e596a(0x101))/0x6+parseInt(_0x8e596a(0xf0))/0x7+parseInt(_0x8e596a(0xfb))/0x8*(-parseInt(_0x8e596a(0xdb))/0x9);if(_0x1b04b6===_0x50623a)break;else _0x368042['push'](_0x368042['shift']());}catch(_0x3bfa12){_0x368042['push'](_0x368042['shift']());}}}(a37_0x3855,0xb4bdc));function a37_0x3855(){const _0x4e2c74=['--title\x20must\x20not\x20be\x20blank.','validation','1610084pazIur','Task\x20channel:\x20auto\x20or\x20premium','/run','detail','schedule','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','number','create','56gNAVhr','\x20immediately','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','/api/harness/apps/','body','prompt','4538502aWqoVL','read','4UYjzeS','cron','high-risk-write','validate','description','isSafeInteger','174897BkpJmS','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','length','Show\x20one\x20schedule\x20by\x20schedule\x20ID','\x20schedule\x20','Schedule\x20title','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','DELETE','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','Preview:\x20create\x20an\x20Agent\x20schedule','appCode','trim','Created\x20','Queued\x20Task\x20','--prompt\x20must\x20not\x20be\x20blank.','num','channel','POST','title','CRON','1322901fKLLzJ','UTC','scheduled-at','string','auto','\x20from\x20schedule\x20','cursor','Page\x20size\x20from\x201\x20to\x20100','str','/schedules','limit','schedule-id','taskId','Preview:\x20run\x20schedule\x20','ONCE','4181025PsYftn','run','173961jelcdI','kind','build','Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','6087879sKYGbq'];a37_0x3855=function(){return _0x4e2c74;};return a37_0x3855();}import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';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_0x550965(0xed),'type':a37_0x550965(0xde),'required':!![],'enum':[a37_0x550965(0xda),a37_0x550965(0xe9)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':a37_0x550965(0x104),'type':a37_0x550965(0xde),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a37_0x550965(0xdd),'type':a37_0x550965(0xde),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x550965(0xd9),'type':a37_0x550965(0xde),'required':!![],'description':a37_0x550965(0x10e)},PROMPT_FLAG={'name':a37_0x550965(0x100),'type':a37_0x550965(0xde),'required':!![],'description':a37_0x550965(0xfd)},CHANNEL_FLAG={'name':a37_0x550965(0xd7),'type':a37_0x550965(0xde),'enum':[a37_0x550965(0xdf),'premium'],'default':a37_0x550965(0xdf),'description':a37_0x550965(0xf4)},SCHEDULE_ID_FLAG={'name':a37_0x550965(0xe6),'type':a37_0x550965(0xde),'required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x550965(0xf8)}},LIMIT_FLAG={'name':a37_0x550965(0xe5),'type':a37_0x550965(0xf9),'default':0x14,'description':a37_0x550965(0xe2)},CURSOR_FLAG={'name':a37_0x550965(0xe1),'type':a37_0x550965(0xde),'description':'Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call'},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x100393){const _0x11f2c0=a37_0x550965,_0x22df59=_0x100393[_0x11f2c0(0xe3)](_0x11f2c0(0xed)),_0x2c24ff=_0x100393['str'](_0x11f2c0(0xd9))[_0x11f2c0(0xd2)](),_0x3057ec=_0x100393['str'](_0x11f2c0(0x100))[_0x11f2c0(0xd2)](),_0x575749=_0x100393[_0x11f2c0(0xe3)](_0x11f2c0(0xd7)),_0xa1f35c=_0x100393['str'](_0x11f2c0(0x104)),_0xa94f1a=_0x100393[_0x11f2c0(0xe3)](_0x11f2c0(0xdd));if(!_0x2c24ff)throw CliErrors['validation'](_0x11f2c0(0xf1));if(!_0x3057ec)throw CliErrors[_0x11f2c0(0xf2)](_0x11f2c0(0xd5));if(_0x22df59===_0x11f2c0(0xda)){if(!_0xa1f35c||_0xa94f1a)throw CliErrors['validation']('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x22df59,'timezone':_0x11f2c0(0xdc),'cron':_0xa1f35c,'title':_0x2c24ff,'prompt':_0x3057ec,'channel':_0x575749};}if(_0x22df59===_0x11f2c0(0xe9)){if(!_0xa94f1a||_0xa1f35c)throw CliErrors[_0x11f2c0(0xf2)](_0x11f2c0(0x111));return{'kind':_0x22df59,'timezone':'UTC','scheduledAt':_0xa94f1a,'title':_0x2c24ff,'prompt':_0x3057ec,'channel':_0x575749};}throw CliErrors['validation']('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function a37_0xc3cf(_0x168cfa,_0x33c0dd){_0x168cfa=_0x168cfa-0xd0;const _0x385542=a37_0x3855();let _0xc3cf71=_0x385542[_0x168cfa];return _0xc3cf71;}function scheduleCollectionPath(_0x2eab91){const _0x49284c=a37_0x550965;return _0x49284c(0xfe)+encodeURIComponent(_0x2eab91)+_0x49284c(0xe4);}function scheduleItemPath(_0x9df01f,_0x4e1aa4){return scheduleCollectionPath(_0x9df01f)+'/'+encodeURIComponent(_0x4e1aa4);}const scheduleValidate={'service':'schedule','command':a37_0x550965(0x106),'description':a37_0x550965(0x10a),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x460253){readScheduleInput(_0x460253);},async 'execute'(_0x78d354){const _0x2ed087=a37_0x550965,_0x1cf0d1=readScheduleInput(_0x78d354),_0x5a207f=await validateRuntimeSchedule(_0x78d354[_0x2ed087(0xd1)],_0x1cf0d1);return{'ok':!![],'data':_0x5a207f,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a37_0x550965(0xf7),'command':a37_0x550965(0xfa),'description':a37_0x550965(0x10f),'risk':'high-risk-write','flags':INPUT_FLAGS,async 'validate'(_0xe76da0){readScheduleInput(_0xe76da0);},async 'execute'(_0x30912e){const _0x4153fb=a37_0x550965,_0xdd8f72=readScheduleInput(_0x30912e),_0x467d14=await validateRuntimeSchedule(_0x30912e[_0x4153fb(0xd1)],_0xdd8f72),_0x434c3a=await createRuntimeSchedule(_0x30912e[_0x4153fb(0xd1)],_0x467d14);return{'ok':!![],'data':_0x434c3a,'message':_0x4153fb(0xd3)+_0x434c3a[_0x4153fb(0xed)]+_0x4153fb(0x10d)+_0x434c3a['scheduleId']};},async 'dryRun'(_0x2584ca){const _0x20dbf7=a37_0x550965,_0x23761d=readScheduleInput(_0x2584ca);return dryRun('POST',scheduleCollectionPath(_0x2584ca[_0x20dbf7(0xd1)]))[_0x20dbf7(0xff)](_0x23761d)[_0x20dbf7(0x107)](_0x20dbf7(0xd0))[_0x20dbf7(0xee)]();}},scheduleList={'service':a37_0x550965(0xf7),'command':'list','description':a37_0x550965(0x110),'risk':a37_0x550965(0x102),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x2d8531){const _0x382356=a37_0x550965,_0x12c427=_0x2d8531['num']('limit');if(!Number[_0x382356(0x108)](_0x12c427)||_0x12c427<0x1||_0x12c427>0x64)throw CliErrors[_0x382356(0xf2)]('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x1bfdca=_0x2d8531['str'](_0x382356(0xe1));if(_0x1bfdca&&(_0x1bfdca[_0x382356(0x10b)]>0x400||_0x1bfdca[_0x382356(0xd2)]()!==_0x1bfdca))throw CliErrors['validation'](_0x382356(0x113));},async 'execute'(_0x5b3e36){const _0x5727c4=a37_0x550965,_0xe9dee7=_0x5b3e36[_0x5727c4(0xe3)]('cursor'),_0x4271fe=await listRuntimeSchedules(_0x5b3e36[_0x5727c4(0xd1)],{'limit':_0x5b3e36[_0x5727c4(0xd6)](_0x5727c4(0xe5)),..._0xe9dee7?{'cursor':_0xe9dee7}:{}});return{'ok':!![],'data':_0x4271fe};}},scheduleDetail={'service':'schedule','command':a37_0x550965(0xf6),'description':a37_0x550965(0x10c),'risk':a37_0x550965(0x102),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x4d9e41){const _0x5a2610=a37_0x550965,_0x48525f=await getRuntimeSchedule(_0x4d9e41[_0x5a2610(0xd1)],_0x4d9e41[_0x5a2610(0xe3)]('schedule-id'));return{'ok':!![],'data':_0x48525f};}},scheduleRun={'service':a37_0x550965(0xf7),'command':a37_0x550965(0xeb),'description':'Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','risk':a37_0x550965(0x105),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2775cd){const _0x5794a0=a37_0x550965,_0x5a04dd=_0x2775cd['str'](_0x5794a0(0xe6)),_0x5a7090=await runRuntimeSchedule(_0x2775cd['appCode'],_0x5a04dd);return{'ok':!![],'data':_0x5a7090,'message':_0x5794a0(0xd4)+_0x5a7090[_0x5794a0(0xe7)]+_0x5794a0(0xe0)+_0x5a04dd};},async 'dryRun'(_0x52bde1){const _0x5dcae9=a37_0x550965,_0x39cafe=_0x52bde1[_0x5dcae9(0xe3)](_0x5dcae9(0xe6));return dryRun(_0x5dcae9(0xd8),scheduleItemPath(_0x52bde1['appCode'],_0x39cafe)+_0x5dcae9(0xf5))['description'](_0x5dcae9(0xe8)+_0x39cafe+_0x5dcae9(0xfc))[_0x5dcae9(0xee)]();}},scheduleDelete={'service':a37_0x550965(0xf7),'command':'delete','description':a37_0x550965(0xef),'risk':a37_0x550965(0x105),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x23f890){const _0x485055=a37_0x550965,_0x558b00=_0x23f890[_0x485055(0xe3)](_0x485055(0xe6)),_0x3b0a5f=await deleteRuntimeSchedule(_0x23f890[_0x485055(0xd1)],_0x558b00);return{'ok':!![],'data':_0x3b0a5f,'message':'Deleted\x20schedule\x20'+_0x558b00};},async 'dryRun'(_0x44708d){const _0x50625b=a37_0x550965,_0x4bcbbe=_0x44708d[_0x50625b(0xe3)]('schedule-id');return dryRun(_0x50625b(0x112),scheduleItemPath(_0x44708d[_0x50625b(0xd1)],_0x4bcbbe))[_0x50625b(0x107)]('Preview:\x20delete\x20schedule\x20'+_0x4bcbbe)[_0x50625b(0xee)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
|
package/lib/commands/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x5402db=a38_0x5cc5;(function(_0x237952,_0x50988d){const _0x359e04=a38_0x5cc5,_0x2244f6=_0x237952();while(!![]){try{const _0x594305=-parseInt(_0x359e04(0xf4))/0x1*(-parseInt(_0x359e04(0xf8))/0x2)+-parseInt(_0x359e04(0xfa))/0x3+parseInt(_0x359e04(0xf5))/0x4+parseInt(_0x359e04(0xf1))/0x5+-parseInt(_0x359e04(0xf0))/0x6+parseInt(_0x359e04(0xf6))/0x7+-parseInt(_0x359e04(0xef))/0x8*(parseInt(_0x359e04(0xf7))/0x9);if(_0x594305===_0x50988d)break;else _0x2244f6['push'](_0x2244f6['shift']());}catch(_0x402447){_0x2244f6['push'](_0x2244f6['shift']());}}}(a38_0x4e36,0x6d5f9));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x5d7218){const _0x72708a=await buildSchemaPayload();return{'ok':!![],'data':_0x72708a};}function a38_0x5cc5(_0x283ffc,_0x32c456){_0x283ffc=_0x283ffc-0xef;const _0x4e36b2=a38_0x4e36();let _0x5cc5ea=_0x4e36b2[_0x283ffc];return _0x5cc5ea;}export const schemaDefinition={'service':a38_0x5402db(0xf2),'command':a38_0x5402db(0xf3),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a38_0x5402db(0xf9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a38_0x4e36(){const _0x2aab41=['1544324ICqgKl','2794750OOYGvG','477Rhsaix','52uORQCT','read','209244waYXpI','27312uLdGrA','4011330pxlAcp','2137985aQQzMU','schema','export','5935LcmgrO'];a38_0x4e36=function(){return _0x2aab41;};return a38_0x4e36();}
|