body-parser/000755 001751 000177 0000000000 14522265601014771 5ustar00runner000000 000000 1452226560114522265601body-parser/LICENSE000644 001751 000177 0000002165 14522265601016002 0ustar00runner000000 000000 1452226560114522265601 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 000177 0000001564 14522265601016271 0ustar00runner000000 000000 1452227677214522265601# 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: Mon, 06 Nov 2023 22:41:05 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), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). body-parser/index.d.ts000644 001751 000177 0000007404 14522265601016677 0ustar00runner000000 000000 1452226560114522265601/// 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 000177 0000003363 14522265601017277 0ustar00runner000000 000000 1452227677214522265601{ "name": "@types/body-parser", "version": "1.19.5", "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" } ], "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": "*" }, "typesPublisherContentHash": "7be737b78c8aabd5436be840558b283182b44c3cf9da24fb1f2ff8f414db5802", "typeScriptVersion": "4.5" }