mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Add installer build scripts and configuration
This commit is contained in:
parent
fb3a8582a2
commit
3420290ea9
22 changed files with 1377 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue