Support namespaces without tags.

This commit is contained in:
Paul Hatcherian 2022-08-21 22:40:59 -04:00
parent 3a712b126c
commit ae4e812946
5 changed files with 42 additions and 37 deletions

19
dist/index.js vendored
View file

@ -264,18 +264,13 @@ class DefaultTagFormatter {
return `${this.tagPrefix}*[0-9].*[0-9].*[0-9]`;
}
Parse(tag) {
let stripedTag;
if (this.tagPrefix.includes('/') && tag.includes(this.tagPrefix)) {
let tagParts = tag
.replace(this.tagPrefix, '<--!PREFIX!-->')
.split('/');
stripedTag = tagParts[tagParts.length - 1]
.replace('<--!PREFIX!-->', this.tagPrefix);
}
else {
let tagParts = tag.split('/');
stripedTag = tagParts[tagParts.length - 1];
}
let tagParts = tag
.replace(this.tagPrefix, '<--!PREFIX!-->')
.replace(this.namespace, '<--!NAMESPACE!-->')
.split('/');
const stripedTag = tagParts[tagParts.length - 1]
.replace('<--!PREFIX!-->', this.tagPrefix)
.replace('<--!NAMESPACE!-->', this.namespace);
let versionValues = stripedTag
.substring(this.tagPrefix.length)
.slice(0, this.namespace === '' ? 999 : -(this.namespace.length + 1))

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long