Packages

Headless-first, token-driven UI components for Phoenix LiveView — rich selects, date pickers, dialogs, menus, tables, sliders and toasts that live in the browser top layer. Themeable through CSS tokens, viewport-aware, server-authoritative, with zero third-party JS.

Current section

Files

Jump to
skua lib skua auth yes_shell.ex
Raw

lib/skua/auth/yes_shell.ex

defmodule Skua.Auth.YesShell do
@moduledoc false
# A Mix.Shell that auto-confirms every prompt, so `skua.gen.auth` can run
# `phx.gen.auth` (which asks "proceed?" / "LiveView-based?" via Mix.shell().yes?)
# non-interactively. Output is delegated to the normal IO shell.
@behaviour Mix.Shell
@impl true
defdelegate print_app(), to: Mix.Shell.IO
@impl true
defdelegate info(message), to: Mix.Shell.IO
@impl true
defdelegate error(message), to: Mix.Shell.IO
@impl true
def cmd(command, opts \\ []), do: Mix.Shell.IO.cmd(command, opts)
@impl true
def prompt(_message), do: "y"
@impl true
def yes?(_message, _options \\ []), do: true
end