Commit 98f4f8b8 authored by Guy Bedford's avatar Guy Bedford Committed by Joe Haddad

raw-body

parent 26dca225
...@@ -2,7 +2,7 @@ import { parse } from 'next/dist/compiled/content-type' ...@@ -2,7 +2,7 @@ import { parse } from 'next/dist/compiled/content-type'
import { CookieSerializeOptions } from 'next/dist/compiled/cookie' import { CookieSerializeOptions } from 'next/dist/compiled/cookie'
import { IncomingMessage, ServerResponse } from 'http' import { IncomingMessage, ServerResponse } from 'http'
import { PageConfig } from 'next/types' import { PageConfig } from 'next/types'
import getRawBody from 'raw-body' import getRawBody from 'next/dist/compiled/raw-body'
import { Stream } from 'stream' import { Stream } from 'stream'
import { isResSent, NextApiRequest, NextApiResponse } from '../lib/utils' import { isResSent, NextApiRequest, NextApiResponse } from '../lib/utils'
import { decryptWithSecret, encryptWithSecret } from './crypto-utils' import { decryptWithSecret, encryptWithSecret } from './crypto-utils'
......
...@@ -81,7 +81,6 @@ ...@@ -81,7 +81,6 @@
"postcss-preset-env": "6.7.0", "postcss-preset-env": "6.7.0",
"prop-types": "15.7.2", "prop-types": "15.7.2",
"prop-types-exact": "1.2.0", "prop-types-exact": "1.2.0",
"raw-body": "2.4.0",
"react-error-overlay": "5.1.6", "react-error-overlay": "5.1.6",
"react-is": "16.8.6", "react-is": "16.8.6",
"recast": "0.18.5", "recast": "0.18.5",
...@@ -194,6 +193,7 @@ ...@@ -194,6 +193,7 @@
"nanoid": "2.0.3", "nanoid": "2.0.3",
"node-fetch": "2.6.0", "node-fetch": "2.6.0",
"ora": "3.4.0", "ora": "3.4.0",
"raw-body": "2.4.0",
"resolve": "1.11.0", "resolve": "1.11.0",
"taskr": "1.1.0", "taskr": "1.1.0",
"text-table": "0.2.0", "text-table": "0.2.0",
......
...@@ -428,6 +428,13 @@ export async function ncc_ora(task, opts) { ...@@ -428,6 +428,13 @@ export async function ncc_ora(task, opts) {
.target('dist/compiled/ora') .target('dist/compiled/ora')
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
export async function ncc_raw_body(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('raw-body')))
.ncc({ packageName: 'raw-body' })
.target('dist/compiled/raw-body')
}
// eslint-disable-next-line camelcase
export async function ncc_resolve(task, opts) { export async function ncc_resolve(task, opts) {
await task await task
.source(opts.src || relative(__dirname, require.resolve('resolve'))) .source(opts.src || relative(__dirname, require.resolve('resolve')))
...@@ -499,6 +506,7 @@ export async function precompile(task) { ...@@ -499,6 +506,7 @@ export async function precompile(task) {
'ncc_nanoid', 'ncc_nanoid',
'ncc_node_fetch', 'ncc_node_fetch',
'ncc_ora', 'ncc_ora',
'ncc_raw_body',
'ncc_resolve', 'ncc_resolve',
'ncc_text_table', 'ncc_text_table',
'ncc_unistore', 'ncc_unistore',
......
...@@ -148,6 +148,10 @@ declare module 'next/dist/compiled/ora' { ...@@ -148,6 +148,10 @@ declare module 'next/dist/compiled/ora' {
import m from 'ora' import m from 'ora'
export = m export = m
} }
declare module 'next/dist/compiled/raw-body' {
import m from 'raw-body'
export = m
}
declare module 'next/dist/compiled/resolve/index.js' { declare module 'next/dist/compiled/resolve/index.js' {
import m from 'resolve' import m from 'resolve'
export = m export = m
......
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