PhoenixAssets.Session (PhoenixAssets v0.1.0)

View Source

Integration plugin that generates the authenticated-context contract.

Reads the projection declared in the module passed as session: (see PhoenixAssets.Session.Fields) and emits session.ts -- the Session interface and the route that serves it.

This is the counterpart to the read and write contracts: shapes describe what can be read, commands describe what can be changed, and this describes who is asking. Declaring it once gives both sides the same answer, so the frontend stops shaping session JSON by hand and the server has a single projection to keep honest.

Contributes a graph entry and a doctor check that the declared route exists in the router.

Summary

Functions

dev_processes(_, _)

Callback implementation for PhoenixAssets.Plugin.dev_processes/2.

name()

Callback implementation for PhoenixAssets.Plugin.name/0.

vite_config(_, _)

Callback implementation for PhoenixAssets.Plugin.vite_config/2.