renovate/lib/modules/datasource/util.ts

10 lines
316 B
TypeScript

import is from '@sindresorhus/is';
import type { HttpResponse } from '../../util/http/types';
const JFROG_ARTIFACTORY_RES_HEADER = 'x-jfrog-version';
export function isArtifactoryServer<T = unknown>(
res: HttpResponse<T> | undefined
): boolean {
return is.string(res?.headers[JFROG_ARTIFACTORY_RES_HEADER]);
}