DevTools & tooling
Terminal
The socket's startup task and the action picker in the nuxt dev terminal.
The module also reports to the nuxt dev terminal:
- Startup: the socket's start shows as a task that ends with its URL and the variable it set, or with the reason it failed.
- Runs: every
serverorsocketaction run, from the tab or from the picker below, shows as a task that ends with a one-line summary of its result.
The action picker
When the nuxt dev UI runs and there are server or socket actions, calling the pglite:devtools:prompt hook opens a picker in the terminal; the chosen action runs as a task. It does not depend on the DevTools tab: it works with pglite.devtools: false.
await nuxt.callHook('pglite:devtools:prompt')
The
nuxt dev UI has no way for a module to add a key binding of its own, so the picker has no shortcut: something has to call the hook, for example another module reacting to its own trigger. The hook is registered only in an interactive nuxt dev, which excludes a restart into a forked process, and only when there are actions to pick from.client actions are not listed there: they run in the browser, so only the DevTools tab can run them.