renovate/lib/modules/manager/ansible-galaxy/util.ts
kechigon c02cf6a34f
fix(ansible-galaxy): space parsing (#20679)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-04-12 11:53:08 +00:00

12 lines
540 B
TypeScript

import { regEx } from '../../../util/regex';
export const newBlockRegEx = /^\s*-\s*((\w+):\s*(.*))$/;
export const blockLineRegEx = /^\s*((\w+):\s*(\S+))\s*$/;
export const galaxyDepRegex = /[\w-]+\.[\w-]+/;
export const dependencyRegex = /^dependencies:/;
export const galaxyRegEx = regEx(
/^\s+(?<packageName>[\w.]+):\s*["'](?<version>.+)["']\s*/
);
export const nameMatchRegex = regEx(
/(?<source>((git\+)?(?:(git|ssh|https?):\/\/)?(.*@)?(?<hostname>[\w.-]+)(?:(:\d+)?\/|:))(?<depName>[\w./-]+)(?:\.git)?)(,(?<version>[\w.]*))?/
);