New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@antora/redirect-producer

Package Overview
Dependencies
Maintainers
2
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antora/redirect-producer - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

14

lib/produce-redirects.js

@@ -7,2 +7,4 @@ 'use strict'

const ALL_SPACES_RX = / /g
/**

@@ -68,6 +70,6 @@ * Produces redirects (HTTP redirections) for registered page aliases.

delete file.out
accum.push(`${urlContext}${file.pub.url} ${urlContext}${file.rel.pub.url} 301`)
if (includeDirectoryRedirects && file.pub.url.endsWith('/index.html')) {
accum.push(`${urlContext}${file.pub.url.slice(0, -10)} ${urlContext}${file.rel.pub.url} 301`)
}
const from = `${urlContext}${file.pub.url.replace(ALL_SPACES_RX, '%20')}`
const to = `${urlContext}${file.rel.pub.url.replace(ALL_SPACES_RX, '%20')}`
accum.push(`${from} ${to} 301`)
if (includeDirectoryRedirects && from.endsWith('/index.html')) accum.push(`${from.slice(0, -10)} ${to} 301`)
return accum

@@ -85,3 +87,5 @@ }, [])

delete file.out
return `location = ${urlContext}${file.pub.url} { return 301 ${urlContext}${file.rel.pub.url}; }`
const from = `${urlContext}${file.pub.url.replace(ALL_SPACES_RX, '\\ ')}`
const to = `${urlContext}${file.rel.pub.url.replace(ALL_SPACES_RX, '\\ ')}`
return `location = ${from} { return 301 ${to}; }`
})

@@ -88,0 +92,0 @@ const rewriteConfigFile = new File({

{
"name": "@antora/redirect-producer",
"version": "2.0.0",
"version": "2.0.1",
"description": "Produces redirects (HTTP redirections) for pages in an Antora site.",

@@ -18,7 +18,7 @@ "license": "MPL-2.0",

"dependencies": {
"@antora/asciidoc-loader": "2.0.0",
"vinyl": "^2.2.0"
"@antora/asciidoc-loader": "2.0.1",
"vinyl": "~2.2"
},
"engines": {
"node": ">= 8.0.0"
"node": ">=8.11.0"
},

@@ -25,0 +25,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc