Add installer build scripts and configuration

This commit is contained in:
Reinier Criel 2025-11-25 08:21:35 -08:00
parent fb3a8582a2
commit 3420290ea9
22 changed files with 1377 additions and 7 deletions

View file

@ -1,6 +1,7 @@
import {
ECOSYSTEM_JS,
ECOSYSTEM_PY,
ECOSYSTEM_ALL,
getEcoSystem,
} from "../../config/settings.js";
import { npmInterceptorForUrl } from "./npm/npmInterceptor.js";
@ -13,6 +14,21 @@ import { pipInterceptorForUrl } from "./pipInterceptor.js";
export function createInterceptorForUrl(url) {
const ecosystem = getEcoSystem();
if (ecosystem === ECOSYSTEM_ALL) {
// Try both ecosystems (npm registries first, then PyPI)
const jsInterceptor = npmInterceptorForUrl(url);
if (jsInterceptor) {
return jsInterceptor;
}
const pyInterceptor = pipInterceptorForUrl(url);
if (pyInterceptor) {
return pyInterceptor;
}
return undefined;
}
if (ecosystem === ECOSYSTEM_JS) {
return npmInterceptorForUrl(url);
}