|
1 | 1 | import { HandlerContext, HandlerEvent } from '@netlify/functions'
|
2 |
| -import { Bridge } from '@vercel/node-bridge/bridge' |
3 | 2 | // Aliasing like this means the editor may be able to syntax-highlight the string
|
| 3 | +import type { Bridge as NodeBridge } from '@vercel/node-bridge/bridge' |
4 | 4 | import { outdent as javascript } from 'outdent'
|
5 | 5 |
|
6 | 6 | import type { NextConfig } from '../helpers/config'
|
7 | 7 |
|
8 | 8 | import type { NextServerType } from './handlerUtils'
|
9 | 9 |
|
10 | 10 | /* eslint-disable @typescript-eslint/no-var-requires */
|
| 11 | + |
11 | 12 | const { promises } = require('fs')
|
12 | 13 | const { Server } = require('http')
|
13 | 14 | const path = require('path')
|
14 | 15 | // eslint-disable-next-line node/prefer-global/url, node/prefer-global/url-search-params
|
15 | 16 | const { URLSearchParams, URL } = require('url')
|
16 | 17 |
|
| 18 | +const { Bridge } = require('@vercel/node-bridge/bridge') |
| 19 | + |
17 | 20 | const { augmentFsModule, getMaxAge, getMultiValueHeaders, getNextServer } = require('./handlerUtils')
|
18 | 21 | /* eslint-enable @typescript-eslint/no-var-requires */
|
19 | 22 |
|
@@ -48,8 +51,8 @@ const makeHandler = (conf: NextConfig, app, pageRoot, staticManifest: Array<[str
|
48 | 51 |
|
49 | 52 | // We memoize this because it can be shared between requests, but don't instantiate it until
|
50 | 53 | // the first request because we need the host and port.
|
51 |
| - let bridge: Bridge |
52 |
| - const getBridge = (event: HandlerEvent): Bridge => { |
| 54 | + let bridge: NodeBridge |
| 55 | + const getBridge = (event: HandlerEvent): NodeBridge => { |
53 | 56 | if (bridge) {
|
54 | 57 | return bridge
|
55 | 58 | }
|
|
0 commit comments