summaryrefslogtreecommitdiff
path: root/node_modules/decompress-response
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/decompress-response')
-rw-r--r--node_modules/decompress-response/index.d.ts29
-rw-r--r--node_modules/decompress-response/index.js40
-rw-r--r--node_modules/decompress-response/license9
-rw-r--r--node_modules/decompress-response/package.json82
-rw-r--r--node_modules/decompress-response/readme.md52
5 files changed, 0 insertions, 212 deletions
diff --git a/node_modules/decompress-response/index.d.ts b/node_modules/decompress-response/index.d.ts
deleted file mode 100644
index 18918fa..0000000
--- a/node_modules/decompress-response/index.d.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/// <reference types="node"/>
-import {IncomingMessage} from 'http';
-
-declare const decompressResponse: {
- /**
- Decompress a HTTP response if needed.
-
- @param response - The HTTP incoming stream with compressed data.
- @returns The decompressed HTTP response stream.
-
- @example
- ```
- import {http} from 'http';
- import decompressResponse = require('decompress-response');
-
- http.get('https://sindresorhus.com', response => {
- response = decompressResponse(response);
- });
- ```
- */
- (response: IncomingMessage): IncomingMessage;
-
- // TODO: remove this in the next major version, refactor the whole definition to:
- // declare function decompressResponse(response: IncomingMessage): IncomingMessage;
- // export = decompressResponse;
- default: typeof decompressResponse;
-};
-
-export = decompressResponse;
diff --git a/node_modules/decompress-response/index.js b/node_modules/decompress-response/index.js
deleted file mode 100644
index 0379dc5..0000000
--- a/node_modules/decompress-response/index.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-const {PassThrough: PassThroughStream} = require('stream');
-const zlib = require('zlib');
-const mimicResponse = require('mimic-response');
-
-const decompressResponse = response => {
- const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase();
-
- if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) {
- return response;
- }
-
- const isBrotli = contentEncoding === 'br';
- if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') {
- return response;
- }
-
- const decompress = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip();
- const stream = new PassThroughStream();
-
- mimicResponse(response, stream);
-
- decompress.on('error', error => {
- // Ignore empty response
- if (error.code === 'Z_BUF_ERROR') {
- stream.end();
- return;
- }
-
- stream.emit('error', error);
- });
-
- response.pipe(decompress).pipe(stream);
-
- return stream;
-};
-
-module.exports = decompressResponse;
-// TODO: remove this in the next major version
-module.exports.default = decompressResponse;
diff --git a/node_modules/decompress-response/license b/node_modules/decompress-response/license
deleted file mode 100644
index e7af2f7..0000000
--- a/node_modules/decompress-response/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
-
-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.
diff --git a/node_modules/decompress-response/package.json b/node_modules/decompress-response/package.json
deleted file mode 100644
index 09873f0..0000000
--- a/node_modules/decompress-response/package.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "_from": "decompress-response@^4.2.0",
- "_id": "[email protected]",
- "_inBundle": false,
- "_integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",
- "_location": "/decompress-response",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "decompress-response@^4.2.0",
- "name": "decompress-response",
- "escapedName": "decompress-response",
- "rawSpec": "^4.2.0",
- "saveSpec": null,
- "fetchSpec": "^4.2.0"
- },
- "_requiredBy": [
- "/simple-get"
- ],
- "_resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",
- "_shasum": "414023cc7a302da25ce2ec82d0d5238ccafd8986",
- "_spec": "decompress-response@^4.2.0",
- "_where": "E:\\Documents\\GitHub\\s5nical\\node_modules\\simple-get",
- "author": {
- "name": "Sindre Sorhus",
- "email": "[email protected]",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/decompress-response/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "mimic-response": "^2.0.0"
- },
- "deprecated": false,
- "description": "Decompress a HTTP response if needed",
- "devDependencies": {
- "@types/node": "^12.7.1",
- "ava": "^2.2.0",
- "get-stream": "^5.0.0",
- "pify": "^4.0.1",
- "tsd": "^0.7.1",
- "xo": "^0.24.0"
- },
- "engines": {
- "node": ">=8"
- },
- "files": [
- "index.js",
- "index.d.ts"
- ],
- "homepage": "https://github.com/sindresorhus/decompress-response#readme",
- "keywords": [
- "decompress",
- "response",
- "http",
- "https",
- "zlib",
- "gzip",
- "zip",
- "deflate",
- "unzip",
- "ungzip",
- "incoming",
- "message",
- "stream",
- "compressed",
- "brotli"
- ],
- "license": "MIT",
- "name": "decompress-response",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/decompress-response.git"
- },
- "scripts": {
- "test": "xo && ava && tsd"
- },
- "version": "4.2.1"
-}
diff --git a/node_modules/decompress-response/readme.md b/node_modules/decompress-response/readme.md
deleted file mode 100644
index c87431a..0000000
--- a/node_modules/decompress-response/readme.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# decompress-response [![Build Status](https://travis-ci.org/sindresorhus/decompress-response.svg?branch=master)](https://travis-ci.org/sindresorhus/decompress-response)
-
-> Decompress a HTTP response if needed
-
-Decompresses the [response](https://nodejs.org/api/http.html#http_class_http_incomingmessage) from [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) if it's gzipped, deflated or compressed with Brotli, otherwise just passes it through.
-
-Used by [`got`](https://github.com/sindresorhus/got).
-
-
-## Install
-
-```
-$ npm install decompress-response
-```
-
-
-## Usage
-
-```js
-const http = require('http');
-const decompressResponse = require('decompress-response');
-
-http.get('https://sindresorhus.com', response => {
- response = decompressResponse(response);
-});
-```
-
-
-## API
-
-### decompressResponse(response)
-
-Returns the decompressed HTTP response stream.
-
-#### response
-
-Type: [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
-
-The HTTP incoming stream with compressed data.
-
-
----
-
-<div align="center">
- <b>
- <a href="https://tidelift.com/subscription/pkg/npm-unzip-response?utm_source=npm-unzip-response&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
- </b>
- <br>
- <sub>
- Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
- </sub>
-</div>