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

    Function fanoutHooks

    • Convenience function to trigger a hook, and gather any successful responses. Failures are ignored.

      Responses are organised into a dictionary, keyed by plug-in name. Only plug-ins that have hooks registered for the given event, and the hooks were run successfully, are included.

      Type Parameters

      Parameters

      • config: Config

        The oclif config object.

      • event: TEvent

        The name of the hook to trigger.

      • options: TPluginMap[TEvent]["options"]

        The options to pass to the hook.

      • Optionaltimeout: number

        The timeout to use for the hook.

      Returns Promise<Partial<TPluginMap[TEvent]["pluginReturns"]>>

      A dictionary of plug-in names to the response from the hook.