Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(url): allow domains with ports

Gergő Móricz655753cd272c
diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts
index 14715c9bd..ac3743e86 100644
--- a/apps/api/src/controllers/v1/types.ts
+++ b/apps/api/src/controllers/v1/types.ts
@@ -34,7 +34,7 @@ export const url = z.preprocess(
.url()
.regex(/^https?:\/\//, "URL uses unsupported protocol")
.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",
)
.refine((x) => {
diff --git a/apps/api/src/services/queue-worker.ts b/apps/api/src/services/queue-worker.ts
index d13cb198e..a2d493ec9 100644
--- a/apps/api/src/services/queue-worker.ts
+++ b/apps/api/src/services/queue-worker.ts
@@ -1126,5 +1126,6 @@ async function processJob(job: Job & { id: string }, token: string) {
await new Promise((resolve) => setTimeout(resolve, 500));
}
+ console.log("All jobs finished. Worker out!");
process.exit(0);
})();