Comment out the proxy for testing purposes

This commit is contained in:
Sander Declerck 2026-01-09 15:34:44 +01:00
parent 6d2d943e18
commit 40a79e2019
No known key found for this signature in database
3 changed files with 24 additions and 23 deletions

View file

@ -20,8 +20,8 @@ export async function main(args) {
process.on("SIGINT", handleProcessTermination);
process.on("SIGTERM", handleProcessTermination);
const proxy = createSafeChainProxy();
await proxy.startServer();
// const proxy = createSafeChainProxy();
// await proxy.startServer();
// Global error handlers to log unhandled errors
process.on("uncaughtException", (error) => {
@ -64,9 +64,9 @@ export async function main(args) {
// Write all buffered logs
ui.writeBufferedLogsAndStopBuffering();
if (!proxy.verifyNoMaliciousPackages()) {
return 1;
}
// if (!proxy.verifyNoMaliciousPackages()) {
// return 1;
// }
const auditStats = getAuditStats();
if (auditStats.totalPackages > 0) {
@ -77,18 +77,18 @@ export async function main(args) {
);
}
if (proxy.hasSuppressedVersions()) {
ui.writeInformation(
`${chalk.yellow(
""
)} Safe-chain: Some package versions were suppressed due to minimum age requirement.`
);
ui.writeInformation(
` To disable this check, use: ${chalk.cyan(
"--safe-chain-skip-minimum-package-age"
)}`
);
}
// if (proxy.hasSuppressedVersions()) {
// ui.writeInformation(
// `${chalk.yellow(
// ""
// )} Safe-chain: Some package versions were suppressed due to minimum age requirement.`
// );
// ui.writeInformation(
// ` To disable this check, use: ${chalk.cyan(
// "--safe-chain-skip-minimum-package-age"
// )}`
// );
// }
// Returning the exit code back to the caller allows the promise
// to be awaited in the bin files and return the correct exit code
@ -100,9 +100,10 @@ export async function main(args) {
// Returning the exit code back to the caller allows the promise
// to be awaited in the bin files and return the correct exit code
return 1;
} finally {
await proxy.stopServer();
}
// finally {
// // await proxy.stopServer();
// }
}
function handleProcessTermination() {

View file

@ -10,7 +10,7 @@ import { mergeSafeChainProxyEnvironmentVariables } from "../../registryProxy/reg
export async function runYarnCommand(args) {
try {
const env = mergeSafeChainProxyEnvironmentVariables(process.env);
await fixYarnProxyEnvironmentVariables(env);
// await fixYarnProxyEnvironmentVariables(env);
const result = await safeSpawn("yarn", args, {
stdio: "inherit",

View file

@ -40,9 +40,9 @@ function getSafeChainProxyEnvironmentVariables() {
const caCertPath = getCombinedCaBundlePath();
return {
HTTPS_PROXY: proxyUrl,
GLOBAL_AGENT_HTTP_PROXY: proxyUrl,
NODE_EXTRA_CA_CERTS: caCertPath,
// HTTPS_PROXY: proxyUrl,
// GLOBAL_AGENT_HTTP_PROXY: proxyUrl,
// NODE_EXTRA_CA_CERTS: caCertPath,
};
}