fix(url): allow domains with ports
This commit is contained in:
@@ -34,7 +34,7 @@ export const url = z.preprocess(
|
|||||||
.url()
|
.url()
|
||||||
.regex(/^https?:\/\//, "URL uses unsupported protocol")
|
.regex(/^https?:\/\//, "URL uses unsupported protocol")
|
||||||
.refine(
|
.refine(
|
||||||
(x) => /\.[a-z]{2,}([\/?#]|$)/i.test(x),
|
(x) => /\.[a-z]{2,}(:\d+)?([\/?#]|$)/i.test(x),
|
||||||
"URL must have a valid top-level domain or be a valid path",
|
"URL must have a valid top-level domain or be a valid path",
|
||||||
)
|
)
|
||||||
.refine((x) => {
|
.refine((x) => {
|
||||||
|
|||||||
@@ -1126,5 +1126,6 @@ async function processJob(job: Job & { id: string }, token: string) {
|
|||||||
await new Promise((resolve) => setTimeout(resolve, 500));
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("All jobs finished. Worker out!");
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user