frond.config.ts

What one frond decides for itself, and wins for its own scope.

fronds/blog/frond.config.ts
1import { defineFrond } from '@fougere/core/node';
2
3export default defineFrond({
4 expose: [ … ],
5 reads: [ … ],
6 surfaces: { … },
7 pipes: { … },
8 ports: { … },
9 protocols: { … },
10 operations: { … },
11});

Point at a key, or tap it, to see what it is. Every key is described in full below.

expose

(NameOf<'handler'> | NameOf<'entity'>)[] · optional

Class names exposed as the frond's public contract (all surfaces).

reads

NameOf<'entity'>[] · optional

The entities this frond may read ACROSS sources, by name.

surfaces

Record<string, NameOf<'entity'>[]> · optional

Per-surface entity lists. Overrides default deduction for each named surface.

pipes

Record<NameOf<'entity'>, NameOf<'handler'>[]> · optional

The ops that finish a fact, in the order they run, keyed by fact; declared by the fact's owner.

ports

Record<string, string | readonly string[]> · optional

The order this frond's links stand in front of a port, outside in. Ex: ports: { Dispatcher: ['Timing', 'Audit'] }.

protocols

FougereFrondProtocols · optional

What the frond says to each protocol about itself — rest: { path: '/journal' }.

operations

Record<${string}.${string}, OperationOverride> · optional

Per-operation overrides, keyed the way an op is named: post.list.

Per operation

kind

OperationKind · optional

Force operation kind, over the naming convention (isReadOp).

handler

Ctor · optional

The handler class to delegate to, resolved by its name.

method

string · optional

Method name on handler (defaults to the operation name).

policy

string · optional

CASL ability check (e.g.

input

SchemaView · optional

What validates the input. The view carries its own mode (partial() → patch).

binding

BindingPlan · optional

Where each argument is read from; an empty array means the op takes nothing.

output

SchemaView · optional

Per-operation output view, below prefab declarations and above handler/entity defaults.

Built with Fougere and Nuxt, hosted on GitHub Pages.