Merge commit from fork

* chore: ensure redirects are validated against the reading config

* address comments

Signed-off-by: Fredrik Adelöw <freben@gmail.com>

---------

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Ben Lambert
2026-01-20 16:06:14 +01:00
committed by benjdlambert
parent c641c147ab
commit 27f9061d24
8 changed files with 511 additions and 69 deletions
+3 -1
View File
@@ -53,7 +53,9 @@ export async function fetchContents(options: {
if (!fetchUrlIsAbsolute && baseUrl?.startsWith('file://')) {
const basePath = baseUrl.slice('file://'.length);
const srcDir = resolveSafeChildPath(path.dirname(basePath), fetchUrl);
await fs.copy(srcDir, outputPath, { filter: src => isChildPath(srcDir, src) });
await fs.copy(srcDir, outputPath, {
filter: src => isChildPath(srcDir, src),
});
} else {
const readUrl = getReadUrl(fetchUrl, baseUrl, integrations);