drupflare/worker - v1.0.4
    Preparing search index...

    Type Alias PlanSlot

    PlanSlot:
        | { kind: "build_id"; role: "raw" }
        | { head: number; kind: "build_id"; role: "id" }
        | { head: number; kind: "view_dom_id" }
        | { head: number; kind: "csrf" }
        | { bytes: number; kind: "unknown" }

    What a slot holds.

    build_id is Drupal's form_build_id (32 random bytes, base64url); it prints twice on a form page, raw and through Html::getId(), and both share one value.

    Type Declaration

    • { kind: "build_id"; role: "raw" }
    • { head: number; kind: "build_id"; role: "id" }

      Html::getId('form-' + token) with its first head characters dropped, being the part the two renders did not share

    • { head: number; kind: "view_dom_id" }

      A view's per-request DOM id: hash('sha256', $id . $time . mt_rand()), 64 lowercase hex.

      head is how many characters the surrounding constants already carry (two hex values share a leading character one time in sixteen). Any 64 hex characters are legal, since hook_views_pre_view() may set it to anything.

    • { head: number; kind: "csrf" }

      Drupal's session CSRF token: 43 base64url characters, constant per session.

      Two sessions of one role set differ only in this value, which is why a shared plan could not compile an authenticated page. It cannot be generated, only substituted: fillSlots takes it from the caller and refuses without one.

    • { bytes: number; kind: "unknown" }