@antora/redirect-producer
Advanced tools
Comparing version 3.1.7 to 3.1.8
@@ -36,3 +36,7 @@ 'use strict' | ||
if ('findBy' in aliases) aliases = aliases.findBy({ family: 'alias' }) // @deprecated remove in Antora 4 | ||
if (!aliases.length) return [] | ||
aliases = aliases.filter((it) => { | ||
if (it.pub.url !== it.rel.pub.url) return true | ||
delete it.out | ||
}) | ||
if (!aliases.length) return aliases | ||
let siteUrl = playbook.site.url | ||
@@ -51,6 +55,3 @@ if (siteUrl) siteUrl = stripTrailingSlash(siteUrl, '') | ||
case 'static': | ||
return populateStaticRedirectFiles( | ||
aliases.filter((it) => it.out), | ||
siteUrl | ||
) | ||
return populateStaticRedirectFiles(aliases, siteUrl) | ||
default: | ||
@@ -132,3 +133,3 @@ return unpublish(aliases) | ||
function populateStaticRedirectFiles (files, siteUrl) { | ||
files.forEach((file) => (file.contents = Buffer.from(createStaticRedirectContents(file, siteUrl) + '\n'))) | ||
files.forEach((file) => file.out && (file.contents = Buffer.from(createStaticRedirectContents(file, siteUrl) + '\n'))) | ||
return [] | ||
@@ -135,0 +136,0 @@ } |
{ | ||
"name": "@antora/redirect-producer", | ||
"version": "3.1.7", | ||
"version": "3.1.8", | ||
"description": "Produces redirects (HTTP redirections) for pages in an Antora site.", | ||
@@ -22,3 +22,3 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"vinyl": "~2.2" | ||
"vinyl": "~3.0" | ||
}, | ||
@@ -25,0 +25,0 @@ "engines": { |
10245
175
+ Addedb4a@1.6.7(transitive)
+ Addedbare-events@2.5.4(transitive)
+ Addedfast-fifo@1.3.2(transitive)
+ Addedreplace-ext@2.0.0(transitive)
+ Addedstreamx@2.22.0(transitive)
+ Addedteex@1.0.1(transitive)
+ Addedtext-decoder@1.2.3(transitive)
+ Addedvinyl@3.0.0(transitive)
- Removedclone-buffer@1.0.0(transitive)
- Removedcloneable-readable@1.1.3(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@1.0.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedreplace-ext@1.0.1(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedvinyl@2.2.1(transitive)
Updatedvinyl@~3.0