0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-01-12 22:29:06 +00:00
renovatebot_renovate/lib/modules/datasource/conan/common.ts
2025-01-11 13:06:23 +00:00

16 lines
529 B
TypeScript

import { regEx } from '../../../util/regex';
import type { ConanPackage } from './types';
export const defaultRegistryUrl = 'https://center2.conan.io/';
export const datasource = 'conan';
export const conanDatasourceRegex = regEx(
/^(?<name>[a-zA-Z\-_0-9]+)\/(?<version>[^@/\n]+)(?<userChannel>@\S+\/\S+)$/im,
);
export function getConanPackage(packageName: string): ConanPackage {
const conanName = packageName.split('/')[0];
const userAndChannel = packageName.split('@')[1];
return { conanName, userAndChannel };
}