0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-01-11 13:48:55 +00:00
renovatebot_renovate/lib/modules/datasource/conan/common.ts
2024-11-29 17:14:19 +00:00

16 lines
528 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+)/gim,
);
export function getConanPackage(packageName: string): ConanPackage {
const conanName = packageName.split('/')[0];
const userAndChannel = packageName.split('@')[1];
return { conanName, userAndChannel };
}