Fix Workflow Validation error when node pack 'unknown' version (#3179)

This commit is contained in:
Christian Byrne
2025-03-21 08:04:06 -07:00
committed by GitHub
parent 830933e78f
commit f7bfb6ec57
2 changed files with 7 additions and 4 deletions

View File

@@ -155,9 +155,10 @@ const zAuxId = z
)
.transform(([username, repo]) => `${username}/${repo}`)
const zSemVer = z
.string()
.regex(semverPattern, 'Invalid semantic version (x.y.z)')
const zSemVer = z.union([
z.string().regex(semverPattern, 'Invalid semantic version (x.y.z)'),
z.literal('unknown')
])
const zGitHash = z.string().regex(gitHashPattern, 'Invalid Git commit hash')
const zVersion = z.union([zSemVer, zGitHash])