async function writeUrlMapToApi(urlMap) {
  const slug = getGitHubRepoSlug();

  if (!slug) {
    print(`No GitHub repository slug found, skipping URL map upload.\n`);
    return;
  }
  print(`Saving URL map for GitHub repository ${slug}...`);

  try {
    /** @type {Record<string, string>} */
    const payload = {slug};
    Array.from(urlMap.entries()).forEach(([k, v]) => (payload[k] = v));

    const response = await fetch(SAVE_URL_MAP_URL, {
      method: 'POST',
      body: JSON.stringify(payload),
      headers: {'content-type': 'application/json'},
    });

    if (response.ok) {
      print(`success!\n`);
    } else {
      print(`failed!\n`);
    }
  } catch (err) {
    print(`Failed to save URL map: ${err.message}\n`);
  }
}
Saves the provided URL map to temporary public storage.

@param {Map<string, string>} urlMap
@return {Promise<void>}