Skip to content

Commit

Permalink
fix: sitemap deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Sep 21, 2024
1 parent 1fa176e commit 1be6709
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/generate-site-map.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,13 @@ const main = async () => {
? sitemapIndex.url
: sitemapIndex.url.replace(`${baseURL}/`, `${baseURL}/sitemaps/`)
const res = await fetch(url)
// only allow normalised names from backlog
res.body.pipe(new XMLToSitemapItemStream()).pipe(normaliseTransform).pipe(sitemap, {
end: false,

await res.body.pipeThrough(normaliseTransform).pipeTo(sitemap, {
preventClose: true,
})

await new Promise((resolve) => {
normaliseTransform.on('end', resolve)
normaliseTransform.readable.getReader().closed.then(resolve)
})
}
}
Expand Down

0 comments on commit 1be6709

Please sign in to comment.