Skip to content
Français

createArtifactStore

import { createArtifactStore } from "@elie-laloum/outpost";

Create an ArtifactStore that keeps each artifact as the immutable object artifacts/<id>.blob. Publishing an existing id succeeds only with identical bytes, otherwise it rejects with Existing object content integrity mismatch; reading a missing id rejects with Artifact does not exist.

Complete example and detailed rules.

  • optionsRequired
    ArtifactStoreOptions
    Transport and per-artifact payload bound for immutable publication and verified reads.
  • options.maxBytesOptional
    number | undefined
    Positive maximum artifact size in bytes, default 16 MiB; enforced before publication and while reading.
  • options.transporterRequired
    Transport
    Caller-owned object transport used by the store or operation. Closing a workflow or sandbox does not close this transport.

ArtifactStore

export declare function createArtifactStore(
  options: ArtifactStoreOptions,
): ArtifactStore;