iya-sts
    Preparing search index...

    The description pages' shell, their JSON form's negotiation and their script.

    Index
    BUNDLE_FILE: "description-pages-spa.js" = BUNDLE_FILE

    Its file on disk, beside this module.

    SCRIPT_NAME: "description.js" = SCRIPT_NAME

    The script's name under a family's path.

    • Whether a request asks for the JSON form: its ?format=, read as the family has always read it, where the query names one, and its Accept where it does not — so ?format=html with an Accept of JSON is still the page.

      Parameters

      • req: any

        the request

      • formatIsJson: boolean

        the family's own reading of ?format=json

      Returns boolean

      true for the JSON form

    • The surface's bundle and its precompressed forms, read once. A tree that was never built has none, and the shell then loads a script that says so.

      Returns any

      ShellDocument.readFile()'s { raw, br, gzip, built }

    • Answers GET /<family>/description.js: the bundle, brotli, gzip or neither by the request's Accept-Encoding.

      Parameters

      • req: any

        the request

      • res: any

        the response

      Returns void

    • The script's path on a family's own path.

      Parameters

      • base: string

        the family's path (/saml2)

      Returns string

      /saml2/description.js

    • Sends a family's shell carrying its view: 200, as every one of these pages always answered.

      Parameters

      • req: any

        the request

      • res: any

        the response

      • spec: { base: string; title: string; view: any }

        base, the family's path; title, the document's title until the script draws it; view, with its kind

      Returns void

    • Whether a request's Accept prefers JSON to HTML — the second way to the JSON form (#584's step 3). ?format=json is the family's own reading, asked by its handler beside this.

      Parameters

      • req: any

        the request

      Returns boolean

      true for Accept: application/json and its kind