@shopify/cli-kit
    Preparing search index...

    Function createCommandEventChannel

    • Creates a synchronous, execution-scoped channel for command side events. Adapters validate events at their output boundary; the channel preserves domain-specific event fields.

      Type Parameters

      • TEvent extends
            | {
                code?: string;
                level: "info"
                | "error"
                | "debug"
                | "warning";
                message: string;
                timestamp: string;
                type: "diagnostic";
            }
            | {
                current?: number;
                message?: string;
                operation: string;
                status: "started"
                | "updated"
                | "completed";
                timestamp: string;
                total?: number;
                type: "progress";
            } =
            | {
                code?: string;
                level: "info"
                | "error"
                | "debug"
                | "warning";
                message: string;
                timestamp: string;
                type: "diagnostic";
            }
            | {
                current?: number;
                message?: string;
                operation: string;
                status: "started"
                | "updated"
                | "completed";
                timestamp: string;
                total?: number;
                type: "progress";
            }

      Parameters

      Returns CommandEventChannel<TEvent>

      A channel that adds an ISO timestamp before synchronously delivering each event.