From ec8608421a76d798e946dd6f91e315e7b5881a68 Mon Sep 17 00:00:00 2001 From: Nitin Jaiswal Date: Sun, 26 Dec 2021 16:06:35 +0530 Subject: [PATCH] Override package install timeout from 30 seconds to 120 seconds --- server/worker.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/worker.js b/server/worker.js index 9fc6fcc4..3efb81f1 100644 --- a/server/worker.js +++ b/server/worker.js @@ -5,9 +5,12 @@ const { getPackageExportSizes, } = require('package-build-stats') +const getPackageStatsIncreasedTimeout = (name, options) => + getPackageStats(name, { ...options, installTimeout: 120000 }) + // create a worker and register public functions workerpool.worker({ - getPackageStats, + getPackageStats: getPackageStatsIncreasedTimeout, getAllPackageExports, getPackageExportSizes, })