Type Alias RouteCommon
auth?: "principal";
documentBytes?: number;
freshness?: Partial<Freshness>;
mode?: Mode;
offline?: OfflineRule;
persist?: boolean;
provision?: { futureViews?: number; maxBytes?: number; reuse?: number };
retention?: Retention;
scope?: Scope;
sync?: SyncRule;
catalogue?(
ctx: RouteContext,
): readonly CatalogueGuess[] | Promise<readonly CatalogueGuess[]>;
depends?(ctx: RouteContext): readonly string[] | Promise<readonly string[]>;
}
Methods
Optionalcatalogue
-
Pages a device on this route may open next, each with the share of devices expected to (from the site's own
nextShareover the sink, link position, or a fixed prior). The server ships the data of those that repay their transfer, never their HTML. Onlytemplate,projectionanddataroutes can be entries.Parameters
- ctx: RouteContext
Returns readonly CatalogueGuess[] | Promise<readonly CatalogueGuess[]>
Optionaldepends
-
tags the artifact is built from; records and projections the load registers are added
Parameters
- ctx: RouteContext
Returns readonly string[] | Promise<readonly string[]>
Properties
Optionalauth
principal is the same as scope: 'principal'; a conflicting scope is refused
Optionaldocument Bytes
compressed bytes of the document this route renders, which a catalogue entry for it replaces; the server's prior when absent
Optionalfreshness
overrides the scope's default maxStale and mode
Optionalmode
shadow renders locally and compares but never serves; the server's mode when absent
Optionaloffline
serve shows a snapshot offline, refuse does not; default follows the scope
Optionalpersist
keep the artifact across worker restarts; default true
Optionalprovision
overrides the provisioning priors for this route when the server decides whether to ship it
Type Declaration
-
OptionalfutureViews?: numberlater views one provisioned artifact is expected to serve; the server's prior when absent
-
OptionalmaxBytes?: numberrefuses an artifact whose stored JSON is over this many bytes; no budget when absent
-
Optionalreuse?: numberchance a provisioned artifact serves a later view; the server's prior when absent
Optionalretention
a principal route's at-rest key; default persistent, session for a shared device
Optionalscope
public or principal; public when absent
Optionalsync
how a soft route past its bound refreshes; default background
the declaration fields every strategy shares