message: hotfix for expiring unused sites assets
  closes
diff: use std::env;
  use std::path::Path;
  -use anyhow::Result;
  +use anyhow::{anyhow, Result};
  use cloudflare::endpoints::workerskv::write_bulk::KeyValuePair;
  use indicatif::{ProgressBar, ProgressStyle};
  use reqwest::blocking::Client;
  @@ -20,6 +20,8 @@ use crate::terminal::emoji;
  use crate::terminal::message::{Message, Output, StdErr, StdOut};
  use crate::upload;
  +const FIVE_MINUTES: Option<i64> = Some(60 * 5);
  +
  #[derive(Serialize, Deserialize, Default)]
  pub struct PublishOutput {
  pub success: bool,
  @@ -128,21 +130,21 @@ pub fn publish(
  // isn't this very slow? yes. can we do this in bulk? unfortunately as of now
  // there isn't a KV endpoint for "bulk read".
  // https://api.cloudflare.com/#workers-kv-namespace-properties
  - let five_minutes_from_now = chrono::Utc::now().timestamp() + (60 * 5);
  let http_client = reqwest::blocking::Client::new();
  let to_delete_pairs = to_delete
  .into_iter()
  - .map(|key| {
  - get_value(&key, &site_namespace.id, account_id, user, &http_client).map(
  - // discard the timestamp to match wrangler2 implementation
  - |(value, _)| KeyValuePair {
  + .filter_map(|key| {
  + match get_value(&key, &site_namespace.id, account_id, user, &http_client) {
  + Ok((_value, Some(_expiration))) => None,
  + Ok((value, None)) => Some(Ok(KeyValuePair {
  key,
  value,
  - expiration: Some(five_minutes_from_now),
  - expiration_ttl: None,
  + expiration: None,
  + expiration_ttl: FIVE_MINUTES,
  base64: None,
  - },
  - )
  + })),
  + Err(e) => Some(Err(anyhow!(e))),
  + }
  })
  .collect::<Result<Vec<_>>>()?;
  