GeoLeaf Core API - v3.19.0
    Preparing search index...
    • Records a pull's outcome for ONE layer, preserving the others'.

      ⚠️ Read-modify-write, and the key is single: two concurrent pulls on two layers could lose each other. Accepted here, and the motive is measurable — pullLayer is triggered by a user gesture, one at a time, and the stake is a display marker, not a capture. The contract's rule ("a capture never disappears") bears on features and the outbox, which do go through transactions.

      Never throws: a successful pull must not be reported as failed because its marker could not be written.

      The entry is tagged with the source the active profile's layer pulls from, and replaces whatever another source left under the same layer id.

      Parameters

      • db: PreferenceStore | null | undefined

        The storage facade (GeoLeaf.Storage.DB).

      • layerId: string

        Layer concerned.

      • state: LayerPullState

        The outcome to record.

      Returns Promise<void>

      Resolves once the write was attempted.

      await writePullState(GeoLeaf?.Storage?.DB, "sites_rosario", {
      at: Date.now(),
      outcome: "ok",
      written: 27,
      });