UNPKG

@lark-project/cli

Version:

飞书项目插件开发工具

17 lines (16 loc) 707 B
/** * Route a parsed (command, payload) pair to the right service/legacy model. * * Extracted from the former IIFE so it can be unit-tested by mocking the * individual service modules and asserting which one is called. Runtime behavior * for real CLI invocations is unchanged — see the `require.main === module` * block at the bottom of this file. * * @param rawOptions forwarded to `Project.init` for the v1 init branch (which * reads `{ command, payload }` off the object). Pass `undefined` in tests * unless exercising v1 init explicitly. */ export declare function runDispatcher(command: string, payload: any, rawOptions?: { command: string; payload: string; }): Promise<void>;