This commit is contained in:
Yamozha
2021-04-02 02:24:13 +03:00
parent c23950b545
commit 7256d79e2c
31493 changed files with 3036630 additions and 0 deletions

12
node_modules/nocache/CHANGELOG.md generated vendored Normal file
View File

@ -0,0 +1,12 @@
# Changelog
## 2.1.0 - 2019-05-05
### Added
- Added TypeScript type definitions. See [#17](https://github.com/helmetjs/nocache/issues/17) and [helmetjs/helmet#188](https://github.com/helmetjs/helmet/issues/188)
- Created a changelog
### Changed
- Excluded some files from npm package
- Updated some package metadata
Changes in versions 2.0.0 and below can be found in [Helmet's changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md).

21
node_modules/nocache/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014-2019 Evan Hahn, Adam Baldwin
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.

19
node_modules/nocache/README.md generated vendored Normal file
View File

@ -0,0 +1,19 @@
Middleware to turn off caching
==============================
[![Build Status](https://travis-ci.org/helmetjs/nocache.svg?branch=master)](https://travis-ci.org/helmetjs/nocache)
It's possible that you've got bugs in an old HTML or JavaScript file, and with a cache, some users will be stuck with those old versions. This will (try to) abolish all client-side caching.
```javascript
const nocache = require('nocache')
app.use(nocache())
```
This sets four headers, disabling a lot of browser caching:
- `Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate`
- `Pragma: no-cache`
- `Expires: 0`
- `Surrogate-Control: no-store`
Caching has performance benefits, and you lose them here. It's also possible that you'll introduce *new* bugs and you'll wish people had old resources cached, but that's less likely.

4
node_modules/nocache/dist/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,4 @@
/// <reference types="node" />
import { IncomingMessage, ServerResponse } from 'http';
declare const _default: () => (_req: IncomingMessage, res: ServerResponse, next: () => void) => void;
export = _default;

10
node_modules/nocache/dist/index.js generated vendored Normal file
View File

@ -0,0 +1,10 @@
"use strict";
module.exports = function nocache() {
return function nocache(_req, res, next) {
res.setHeader('Surrogate-Control', 'no-store');
res.setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, proxy-revalidate');
res.setHeader('Pragma', 'no-cache');
res.setHeader('Expires', '0');
next();
};
};

62
node_modules/nocache/package.json generated vendored Normal file
View File

@ -0,0 +1,62 @@
{
"name": "nocache",
"author": "Adam Baldwin <adam@npmjs.com> (https://evilpacket.net)",
"contributors": [
"Evan Hahn <me@evanhahn.com> (https://evanhahn.com)"
],
"description": "Middleware to destroy caching",
"version": "2.1.0",
"license": "MIT",
"keywords": [
"helmet",
"security",
"express",
"connect",
"nocache",
"caching",
"cache"
],
"homepage": "https://helmetjs.github.io/docs/nocache/",
"repository": {
"type": "git",
"url": "git://github.com/helmetjs/nocache.git"
},
"bugs": {
"url": "https://github.com/helmetjs/nocache/issues",
"email": "me@evanhahn.com"
},
"engines": {
"node": ">=4.0.0"
},
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"files": [
"CHANGELOG.md",
"LICENSE",
"README.md",
"dist/index.js",
"dist/index.d.ts"
],
"scripts": {
"pretest": "npm run lint",
"prepublishOnly": "npm run build",
"lint": "eslint --fix '**/*.ts'",
"test": "jest --config test/jest-config.json",
"clean": "rm -rf dist",
"build": "npm run clean && tsc"
},
"devDependencies": {
"@types/connect": "^3.4.32",
"@types/jest": "^24.0.12",
"@types/supertest": "^2.0.7",
"@typescript-eslint/eslint-plugin": "^1.7.0",
"@typescript-eslint/parser": "^1.7.0",
"connect": "^3.6.6",
"eslint": "^5.16.0",
"eslint-config-helmet": "^0.2.0",
"jest": "^24.8.0",
"supertest": "^4.0.2",
"ts-jest": "^24.0.2",
"typescript": "^3.4.5"
}
}