Commit e7fcdd32 authored by Guy Bedford's avatar Guy Bedford Committed by Joe Haddad

send

parent 9615bbd8
import { IncomingMessage, ServerResponse } from 'http'
import send from 'send'
import send from 'next/dist/compiled/send'
export function serveStatic(
req: IncomingMessage,
......
......@@ -85,7 +85,6 @@
"react-is": "16.8.6",
"resolve-url-loader": "3.1.1",
"sass-loader": "8.0.2",
"send": "0.17.1",
"source-map": "0.6.1",
"string-hash": "1.1.3",
"strip-ansi": "5.2.0",
......@@ -195,6 +194,7 @@
"raw-body": "2.4.0",
"recast": "0.18.5",
"resolve": "1.11.0",
"send": "0.17.1",
"taskr": "1.1.0",
"text-table": "0.2.0",
"typescript": "3.7.3",
......
......@@ -496,6 +496,13 @@ export async function ncc_resolve(task, opts) {
.target('dist/compiled/resolve')
}
// eslint-disable-next-line camelcase
export async function ncc_send(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('send')))
.ncc({ packageName: 'send' })
.target('dist/compiled/send')
}
// eslint-disable-next-line camelcase
export async function ncc_text_table(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('text-table')))
......@@ -564,6 +571,7 @@ export async function precompile(task) {
'ncc_raw_body',
'ncc_recast',
'ncc_resolve',
'ncc_send',
'ncc_text_table',
'ncc_unistore',
])
......
......@@ -160,7 +160,10 @@ declare module 'next/dist/compiled/resolve/index.js' {
import m from 'resolve'
export = m
}
declare module 'next/dist/compiled/send' {
import m from 'send'
export = m
}
declare module 'next/dist/compiled/text-table' {
function textTable(
rows: Array<Array<{}>>,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment