Comparing version 0.6.3 to 0.6.4
@@ -94,3 +94,3 @@ #!/usr/bin/env node | ||
return async (id) => { | ||
const fsPath = path.resolve(rootDir, id); | ||
const fsPath = path.resolve(path.join(rootDir, id)); | ||
if (!isValidPath__default['default'](id) || id.includes("..") || !fsPath.startsWith(rootDir)) { | ||
@@ -358,2 +358,3 @@ throw createError("Forbidden path:" + id, 403); | ||
const options = defu__default['default'](userOptions, defaults); | ||
options.alias = Object.fromEntries(Object.entries(options.alias).map((e) => [ufo.withLeadingSlash(e[0]), e[1]])); | ||
const ctx = { | ||
@@ -376,2 +377,3 @@ sources: {} | ||
} | ||
id = ufo.hasProtocol(id) ? id : ufo.withLeadingSlash(id); | ||
for (const base in options.alias) { | ||
@@ -378,0 +380,0 @@ if (id.startsWith(base)) { |
@@ -91,3 +91,3 @@ 'use strict'; | ||
return async (id) => { | ||
const fsPath = path.resolve(rootDir, id); | ||
const fsPath = path.resolve(path.join(rootDir, id)); | ||
if (!isValidPath__default['default'](id) || id.includes("..") || !fsPath.startsWith(rootDir)) { | ||
@@ -355,2 +355,3 @@ throw createError("Forbidden path:" + id, 403); | ||
const options = defu__default['default'](userOptions, defaults); | ||
options.alias = Object.fromEntries(Object.entries(options.alias).map((e) => [ufo.withLeadingSlash(e[0]), e[1]])); | ||
const ctx = { | ||
@@ -373,2 +374,3 @@ sources: {} | ||
} | ||
id = ufo.hasProtocol(id) ? id : ufo.withLeadingSlash(id); | ||
for (const base in options.alias) { | ||
@@ -375,0 +377,0 @@ if (id.startsWith(base)) { |
{ | ||
"name": "ipx", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"repository": "nuxt-contrib/ipx", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
48579
1478