UNPKG

open-next-cdk

Version:

Deploy a NextJS app using OpenNext packaging to serverless AWS using CDK

16 lines (15 loc) 538 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.requestTimeout = void 0; function requestTimeout(timeoutInMs = 0) { return new Promise((resolve, reject) => { if (timeoutInMs) { setTimeout(() => { const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); timeoutError.name = "TimeoutError"; reject(timeoutError); }, timeoutInMs); } }); } exports.requestTimeout = requestTimeout;