mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Another iteration
This commit is contained in:
parent
f400c5576a
commit
28d24bb6ea
12 changed files with 134 additions and 107 deletions
|
|
@ -1,12 +1,19 @@
|
|||
import { runPip } from "./runPipCommand.js";
|
||||
|
||||
import { getCurrentPipInvocation } from "./pipSettings.js";
|
||||
/**
|
||||
* @param {string} [command]
|
||||
* @returns {import("../currentPackageManager.js").PackageManager}
|
||||
*/
|
||||
export function createPipPackageManager(command = "pip") {
|
||||
export function createPipPackageManager() {
|
||||
return {
|
||||
runCommand: /** @param {string[]} args */ (args) => runPip(command, args),
|
||||
/**
|
||||
* @param {string[]} args
|
||||
*/
|
||||
runCommand: (args) => {
|
||||
const invocation = getCurrentPipInvocation();
|
||||
const fullArgs = [...invocation.args, ...args];
|
||||
console.debug('[safe-chain debug] runCommand:', invocation.command, fullArgs);
|
||||
return runPip(invocation.command, fullArgs);
|
||||
},
|
||||
// For pip, rely solely on MITM proxy to detect/deny downloads from known registries.
|
||||
isSupportedCommand: () => false,
|
||||
getDependencyUpdatesForCommand: () => [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue