Skip to content
@drupflare/spool v1.0.0 GitHub
    Preparing search index...

    Type Alias SerializedRoute

    the part of a route the service worker needs; functions stay on the server

    type SerializedRoute = {
        catalogue?: true;
        family?: Family;
        freshness: Freshness;
        mode?: Mode;
        navigation?: "document";
        offline: OfflineRule;
        origin?: string;
        pattern: string;
        persist: boolean;
        provisionable?: false;
        query?: QuerySchema;
        retention?: Retention;
        scope: Scope;
        strategy: Strategy;
        sync: SyncRule;
        type?: string;
        version?: string;
    }
    Index
    catalogue?: true

    the route declares a catalogue, so the worker asks for one when a flush goes out on it

    family?: Family

    the held dataset row the page renders; the worker answers from it with no request

    freshness: Freshness

    the staleness contract, with maxStale in seconds

    mode?: Mode

    serve or shadow; absent means the server decides

    navigation?: "document"

    document when the page leaves this family's links and forms to the browser

    offline: OfflineRule

    whether a snapshot may be shown while offline

    origin?: string

    the API origin a cross-origin data family answers for

    pattern: string

    the path pattern the route matches

    persist: boolean

    whether the artifact survives a worker restart

    provisionable?: false

    false for a family route with no load, which has no artifact to provision

    query?: QuerySchema

    the query strings the worker answers from the stored collection of a public route

    retention?: Retention

    a principal route's at-rest key; absent on a public route

    scope: Scope

    public or principal

    strategy: Strategy

    how the route is answered locally

    sync: SyncRule

    when a soft route past its bound refreshes

    type?: string

    the content type a data route answers with, when it is not JSON

    version?: string

    what a manifest route's file is at now; the worker compares it with the stored copy