@veecode-platform/plugin-kong-service-manager
Version:
19 lines (17 loc) • 418 B
JavaScript
function extractGitLabInfo(url) {
const regex = /https:\/\/([^\/]+)\/(.+?)\/([^\/]+)\/-\/blob\/([^\/]+)\/(.*)$/;
const match = url.match(regex);
if (!match) {
throw new Error("Invalid URL");
}
const [_, host, group, repo, branch, filePath] = match;
return {
host,
group,
repo,
branch,
filePath
};
}
export { extractGitLabInfo };
//# sourceMappingURL=extractGitlabInfo.esm.js.map