mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Remove suppressedVersionState.js as it's no longer used
This commit is contained in:
parent
62a3c1330c
commit
fbc94f77ca
2 changed files with 0 additions and 23 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import { getMinimumPackageAgeHours } from "../../../../config/settings.js";
|
||||
import { ui } from "../../../../environment/userInteraction.js";
|
||||
import { getHeaderValueAsString } from "../../http-utils.js";
|
||||
import { recordSuppressedVersion } from "../suppressedVersionsState.js";
|
||||
|
||||
/**
|
||||
* @param {NodeJS.Dict<string | string[]> | undefined} headers
|
||||
|
|
@ -20,7 +19,6 @@ export function getPipMetadataContentType(headers) {
|
|||
* @returns {void}
|
||||
*/
|
||||
export function logSuppressedVersion(packageName, version) {
|
||||
recordSuppressedVersion();
|
||||
ui.writeVerbose(
|
||||
`Safe-chain: ${packageName}@${version} is newer than ${getMinimumPackageAgeHours()} hours and was removed (minimumPackageAgeInHours setting).`
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
const state = {
|
||||
hasSuppressedVersions: false,
|
||||
};
|
||||
|
||||
/**
|
||||
* Tracks whether any rewritten metadata response suppressed versions during the
|
||||
* current process lifetime. This is intentional shared state used only for the
|
||||
* end-of-run summary message exposed through the proxy API.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
export function recordSuppressedVersion() {
|
||||
state.hasSuppressedVersions = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function getHasSuppressedVersions() {
|
||||
return state.hasSuppressedVersions;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue