From 81e49fa9e9ab059542a1055c11701c39fefa4cc2 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Fri, 3 May 2024 23:34:35 +0100 Subject: [PATCH] fix: Allow zod to coerce the crawler timeout from strings. Fixes #134 --- packages/shared/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/shared/config.ts b/packages/shared/config.ts index a31c48b4..bdd58936 100644 --- a/packages/shared/config.ts +++ b/packages/shared/config.ts @@ -20,8 +20,8 @@ const allEnv = z.object({ REDIS_DB_IDX: z.coerce.number().optional(), CRAWLER_HEADLESS_BROWSER: stringBool("true"), BROWSER_WEB_URL: z.string().url().optional(), - CRAWLER_JOB_TIMEOUT_SEC: z.number().default(60), - CRAWLER_NAVIGATE_TIMEOUT_SEC: z.number().default(30), + CRAWLER_JOB_TIMEOUT_SEC: z.coerce.number().default(60), + CRAWLER_NAVIGATE_TIMEOUT_SEC: z.coerce.number().default(30), CRAWLER_NUM_WORKERS: z.coerce.number().default(1), CRAWLER_DOWNLOAD_BANNER_IMAGE: stringBool("true"), CRAWLER_STORE_SCREENSHOT: stringBool("true"),