import type { WhenContext, WhenExpression } from 'devframe/utils/when' import type { DevframeHubContext } from './node/context' import type { DevframeServerCommandInput } from './types/commands' import type { DevframeDockUserEntry } from './types/docks' import { createDefineWrapperWithContext } from 'devframe/rpc' export const defineHubRpcFunction = createDefineWrapperWithContext() export function defineCommand( command: Omit & { when?: WhenExpression }, ): DevframeServerCommandInput { return command as DevframeServerCommandInput } export function defineDockEntry< const T extends DevframeDockUserEntry, const W extends string = '', const V extends string = '', >( entry: Omit & { when?: WhenExpression visibility?: WhenExpression }, ): T { return entry as T }