hlx-url-rewriter
Advanced tools
Comparing version 0.0.18 to 0.0.19
@@ -64,4 +64,4 @@ const path = require('path'); | ||
function createRelativeFunc(playlistUrl) { | ||
return pathname => path.relative(path.dirname(playlistUrl.pathname), pathname); | ||
function createRelativeFunc(fromPath) { | ||
return pathname => path.relative(path.dirname(fromPath), pathname); | ||
} | ||
@@ -81,7 +81,7 @@ | ||
} | ||
const relativeToPlaylist = createRelativeFunc(playlistUrl); | ||
const relativeToPlaylist = createRelativeFunc(path.join('/', playlistUrl.hostname, playlistUrl.pathname)); | ||
let result; | ||
if (url.protocol === playlistUrl.protocol && url.hostname === playlistUrl.hostname) { | ||
print('\tpattern-A'); | ||
result = relativeToPlaylist(url.pathname); | ||
result = relativeToPlaylist(path.join('/', url.hostname, url.pathname)); | ||
} else { | ||
@@ -88,0 +88,0 @@ print('\tpattern-B'); |
{ | ||
"name": "hlx-url-rewriter", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"description": "A transform stream to modify URLs contained in HLS playlists", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9198