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

send

parent 9615bbd8
import { IncomingMessage, ServerResponse } from 'http' import { IncomingMessage, ServerResponse } from 'http'
import send from 'send' import send from 'next/dist/compiled/send'
export function serveStatic( export function serveStatic(
req: IncomingMessage, req: IncomingMessage,
......
...@@ -85,7 +85,6 @@ ...@@ -85,7 +85,6 @@
"react-is": "16.8.6", "react-is": "16.8.6",
"resolve-url-loader": "3.1.1", "resolve-url-loader": "3.1.1",
"sass-loader": "8.0.2", "sass-loader": "8.0.2",
"send": "0.17.1",
"source-map": "0.6.1", "source-map": "0.6.1",
"string-hash": "1.1.3", "string-hash": "1.1.3",
"strip-ansi": "5.2.0", "strip-ansi": "5.2.0",
...@@ -195,6 +194,7 @@ ...@@ -195,6 +194,7 @@
"raw-body": "2.4.0", "raw-body": "2.4.0",
"recast": "0.18.5", "recast": "0.18.5",
"resolve": "1.11.0", "resolve": "1.11.0",
"send": "0.17.1",
"taskr": "1.1.0", "taskr": "1.1.0",
"text-table": "0.2.0", "text-table": "0.2.0",
"typescript": "3.7.3", "typescript": "3.7.3",
......
...@@ -496,6 +496,13 @@ export async function ncc_resolve(task, opts) { ...@@ -496,6 +496,13 @@ export async function ncc_resolve(task, opts) {
.target('dist/compiled/resolve') .target('dist/compiled/resolve')
} }
// eslint-disable-next-line camelcase // 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) { export async function ncc_text_table(task, opts) {
await task await task
.source(opts.src || relative(__dirname, require.resolve('text-table'))) .source(opts.src || relative(__dirname, require.resolve('text-table')))
...@@ -564,6 +571,7 @@ export async function precompile(task) { ...@@ -564,6 +571,7 @@ export async function precompile(task) {
'ncc_raw_body', 'ncc_raw_body',
'ncc_recast', 'ncc_recast',
'ncc_resolve', 'ncc_resolve',
'ncc_send',
'ncc_text_table', 'ncc_text_table',
'ncc_unistore', 'ncc_unistore',
]) ])
......
...@@ -160,7 +160,10 @@ declare module 'next/dist/compiled/resolve/index.js' { ...@@ -160,7 +160,10 @@ declare module 'next/dist/compiled/resolve/index.js' {
import m from 'resolve' import m from 'resolve'
export = m export = m
} }
declare module 'next/dist/compiled/send' {
import m from 'send'
export = m
}
declare module 'next/dist/compiled/text-table' { declare module 'next/dist/compiled/text-table' {
function textTable( function textTable(
rows: Array<Array<{}>>, 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