EU Parliament Monitor — API Documentation - v0.9.24
    Preparing search index...

    Function writeMetadataDatabase

    • Write metadata database to JSON file.

      Idempotent at the byte level: if the existing file has an identical articles payload, the original lastUpdated timestamp is preserved and the file is left untouched. This keeps aws s3 sync (size+mtime) from re-uploading news/articles-metadata.json on every prebuild rerun when no articles actually changed.

      Parameters

      • database: NewsMetadataDatabase

        Metadata database to write

      • outputPath: string = METADATA_DB_PATH

        Output file path (defaults to news/articles-metadata.json)

      Returns void