body-parser/000755 001751 000166 0000000000 15020720275014756 5ustar00runner000000 000000 1502072027515020720275body-parser/LICENSE000644 001751 000166 0000002165 15020720275015767 0ustar00runner000000 000000 1502072027515020720275 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE body-parser/README.md000644 001751 000166 0000001651 15020720275016240 0ustar00runner000000 000000 1502072027515020720275# Installation > `npm install --save @types/body-parser` # Summary This package contains type definitions for body-parser (https://github.com/expressjs/body-parser). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser. ### Additional Details * Last updated: Sat, 07 Jun 2025 02:15:25 GMT * Dependencies: [@types/connect](https://npmjs.com/package/@types/connect), [@types/node](https://npmjs.com/package/@types/node) # Credits These definitions were written by [Santi Albo](https://github.com/santialbo), [Vilic Vane](https://github.com/vilic), [Jonathan Häberle](https://github.com/dreampulse), [Gevik Babakhani](https://github.com/blendsdk), [Tomasz Łaziuk](https://github.com/tlaziuk), [Jason Walton](https://github.com/jwalton), [Piotr Błażejewicz](https://github.com/peterblazejewicz), and [Sebastian Beltran](https://github.com/bjohansebas). body-parser/index.d.ts000644 001751 000166 0000007404 15020720275016664 0ustar00runner000000 000000 1502072027515020720275/// import { NextHandleFunction } from "connect"; import * as http from "http"; // for docs go to https://github.com/expressjs/body-parser/tree/1.19.0#body-parser declare namespace bodyParser { interface BodyParser { /** * @deprecated use individual json/urlencoded middlewares */ (options?: OptionsJson & OptionsText & OptionsUrlencoded): NextHandleFunction; /** * Returns middleware that only parses json and only looks at requests * where the Content-Type header matches the type option. */ json(options?: OptionsJson): NextHandleFunction; /** * Returns middleware that parses all bodies as a Buffer and only looks at requests * where the Content-Type header matches the type option. */ raw(options?: Options): NextHandleFunction; /** * Returns middleware that parses all bodies as a string and only looks at requests * where the Content-Type header matches the type option. */ text(options?: OptionsText): NextHandleFunction; /** * Returns middleware that only parses urlencoded bodies and only looks at requests * where the Content-Type header matches the type option */ urlencoded(options?: OptionsUrlencoded): NextHandleFunction; } interface Options { /** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */ inflate?: boolean | undefined; /** * Controls the maximum request body size. If this is a number, * then the value specifies the number of bytes; if it is a string, * the value is passed to the bytes library for parsing. Defaults to '100kb'. */ limit?: number | string | undefined; /** * The type option is used to determine what media type the middleware will parse */ type?: string | string[] | ((req: http.IncomingMessage) => any) | undefined; /** * The verify option, if supplied, is called as verify(req, res, buf, encoding), * where buf is a Buffer of the raw request body and encoding is the encoding of the request. */ verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void; } interface OptionsJson extends Options { /** * The reviver option is passed directly to JSON.parse as the second argument. */ reviver?(key: string, value: any): any; /** * When set to `true`, will only accept arrays and objects; * when `false` will accept anything JSON.parse accepts. Defaults to `true`. */ strict?: boolean | undefined; } interface OptionsText extends Options { /** * Specify the default character set for the text content if the charset * is not specified in the Content-Type header of the request. * Defaults to `utf-8`. */ defaultCharset?: string | undefined; } interface OptionsUrlencoded extends Options { /** * The extended option allows to choose between parsing the URL-encoded data * with the querystring library (when `false`) or the qs library (when `true`). */ extended?: boolean | undefined; /** * The parameterLimit option controls the maximum number of parameters * that are allowed in the URL-encoded data. If a request contains more parameters than this value, * a 413 will be returned to the client. Defaults to 1000. */ parameterLimit?: number | undefined; } } declare const bodyParser: bodyParser.BodyParser; export = bodyParser; body-parser/package.json000644 001751 000166 0000003656 15020720275017256 0ustar00runner000000 000000 1502072027515020720275{ "name": "@types/body-parser", "version": "1.19.6", "description": "TypeScript definitions for body-parser", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser", "license": "MIT", "contributors": [ { "name": "Santi Albo", "githubUsername": "santialbo", "url": "https://github.com/santialbo" }, { "name": "Vilic Vane", "githubUsername": "vilic", "url": "https://github.com/vilic" }, { "name": "Jonathan Häberle", "githubUsername": "dreampulse", "url": "https://github.com/dreampulse" }, { "name": "Gevik Babakhani", "githubUsername": "blendsdk", "url": "https://github.com/blendsdk" }, { "name": "Tomasz Łaziuk", "githubUsername": "tlaziuk", "url": "https://github.com/tlaziuk" }, { "name": "Jason Walton", "githubUsername": "jwalton", "url": "https://github.com/jwalton" }, { "name": "Piotr Błażejewicz", "githubUsername": "peterblazejewicz", "url": "https://github.com/peterblazejewicz" }, { "name": "Sebastian Beltran", "githubUsername": "bjohansebas", "url": "https://github.com/bjohansebas" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/body-parser" }, "scripts": {}, "dependencies": { "@types/connect": "*", "@types/node": "*" }, "peerDependencies": {}, "typesPublisherContentHash": "d788c843f427d6ca19640ee90eb433324a18f23aed05402a82c4e47e6d60b29d", "typeScriptVersion": "5.1" }