fastify-raw-body
Advanced tools
Comparing version 4.1.3 to 4.2.0
{ | ||
"name": "fastify-raw-body", | ||
"version": "4.1.3", | ||
"version": "4.2.0", | ||
"description": "Request raw body", | ||
@@ -10,3 +10,4 @@ "main": "plugin.js", | ||
"lint:fix": "standard --fix", | ||
"test": "tap test/**.test.* && tsd" | ||
"test": "tap test/**.test.* && tsd", | ||
"test:types": "tsd" | ||
}, | ||
@@ -21,2 +22,4 @@ "repository": { | ||
"request", | ||
"fastify", | ||
"fastify-plugin", | ||
"fastify-raw-body" | ||
@@ -39,3 +42,3 @@ ], | ||
"tap": "^16.2.0", | ||
"tsd": "^0.24.1" | ||
"tsd": "^0.25.0" | ||
}, | ||
@@ -42,0 +45,0 @@ "dependencies": { |
@@ -9,11 +9,19 @@ import { FastifyPluginCallback } from 'fastify' | ||
export interface RawBodyPluginOptions { | ||
field?: string | ||
global?: boolean | ||
encoding?: string | null | false | ||
runFirst?: boolean | ||
routes?: string[] | ||
type FastifyRawBody = FastifyPluginCallback<fastifyRawBody.RawBodyPluginOptions> | ||
declare namespace fastifyRawBody { | ||
export interface RawBodyPluginOptions { | ||
field?: string | ||
global?: boolean | ||
encoding?: string | null | false | ||
runFirst?: boolean | ||
routes?: string[] | ||
} | ||
export const fastifyRawBody: FastifyRawBody; | ||
export { fastifyRawBody as default }; | ||
} | ||
declare const fastifyRawBody: FastifyPluginCallback<RawBodyPluginOptions> | ||
export default fastifyRawBody | ||
declare function fastifyRawBody(...params: Parameters<FastifyRawBody>): ReturnType<FastifyRawBody> | ||
export = fastifyRawBody |
@@ -105,5 +105,9 @@ 'use strict' | ||
module.exports = fp(rawBody, { | ||
const plugin = fp(rawBody, { | ||
fastify: '^4.10.x', | ||
name: 'fastify-raw-body' | ||
}) | ||
module.exports = plugin | ||
module.exports.default = plugin | ||
module.exports.fastifyRawBody = plugin |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25037
702