node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

22
server/node_modules/koa-helmet/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2014-2017 Matt Venables
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.

81
server/node_modules/koa-helmet/README.md generated vendored Normal file
View File

@@ -0,0 +1,81 @@
koa-helmet
==========
[![Version](https://img.shields.io/npm/v/koa-helmet.svg)](https://www.npmjs.com/package/koa-helmet)
[![Dependency Status](https://img.shields.io/david/venables/koa-helmet.svg)](https://david-dm.org/venables/koa-helmet)
[![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?style=flat-square)](https://github.com/Flet/semistandard)
[![Downloads](https://img.shields.io/npm/dm/koa-helmet.svg)](https://www.npmjs.com/package/koa-helmet)
koa-helmet is a wrapper for [helmet](https://github.com/helmetjs/helmet) to work with [koa](https://github.com/koajs/koa). It provides important security headers to make your app more secure by default.
Installation
------------
```sh
npm i koa-helmet
# or:
yarn add koa-helmet
```
Usage
-----
Usage is the same as [helmet](https://github.com/helmetjs/helmet)
Helmet offers 11 security middleware functions:
```js
// This...
app.use(helmet());
// ...is equivalent to this:
app.use(helmet.contentSecurityPolicy());
app.use(helmet.dnsPrefetchControl());
app.use(helmet.expectCt());
app.use(helmet.frameguard());
app.use(helmet.hidePoweredBy());
app.use(helmet.hsts());
app.use(helmet.ieNoOpen());
app.use(helmet.noSniff());
app.use(helmet.permittedCrossDomainPolicies());
app.use(helmet.referrerPolicy());
app.use(helmet.xssFilter());
```
You can see more in [the documentation](https://helmetjs.github.io/docs/).
Example
-------
```js
import Koa from 'koa';
import helmet from 'koa-helmet';
const app = new Koa();
app.use(helmet());
app.use((ctx) => {
ctx.body = "Hello World"
});
app.listen(4000);
```
Testing
-------
To run the tests, simply run
```
npm test
```
Versioning
----------
* koa-helmet >=2.x (master branch) supports koa 2.x
* koa-helmet 1.x ([koa-1](https://github.com/venables/koa-helmet/tree/koa-1) branch) supports koa 0.x and koa 1.x

67
server/node_modules/koa-helmet/koa-helmet.d.ts generated vendored Normal file
View File

@@ -0,0 +1,67 @@
// Type definitions for koa-helmet 6.0
// Project: https://github.com/venables/koa-helmet#readme
// Definitions by: Nick Simmons <https://github.com/nsimmons>
// Jan Dolezel <https://github.com/dolezel>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import helmet from 'helmet';
import { Middleware, Context } from 'koa';
type HelmetOptions = Required<Parameters<typeof helmet>>[0];
declare namespace koaHelmet {
type KoaHelmetContentSecurityPolicyDirectiveFunction = (ctx: Context) => string;
type KoaHelmetCspDirectiveValue = string | KoaHelmetContentSecurityPolicyDirectiveFunction;
interface KoaHelmetContentSecurityPolicyDirectives {
baseUri?: KoaHelmetCspDirectiveValue[];
childSrc?: KoaHelmetCspDirectiveValue[];
connectSrc?: KoaHelmetCspDirectiveValue[];
defaultSrc?: KoaHelmetCspDirectiveValue[];
fontSrc?: KoaHelmetCspDirectiveValue[];
formAction?: KoaHelmetCspDirectiveValue[];
frameAncestors?: KoaHelmetCspDirectiveValue[];
frameSrc?: KoaHelmetCspDirectiveValue[];
imgSrc?: KoaHelmetCspDirectiveValue[];
mediaSrc?: KoaHelmetCspDirectiveValue[];
objectSrc?: KoaHelmetCspDirectiveValue[];
pluginTypes?: KoaHelmetCspDirectiveValue[];
prefetchSrc?: KoaHelmetCspDirectiveValue[];
reportTo?: string;
reportUri?: string;
sandbox?: KoaHelmetCspDirectiveValue[];
scriptSrc?: KoaHelmetCspDirectiveValue[];
scriptSrcAttr?: KoaHelmetCspDirectiveValue[];
scriptSrcElem?: KoaHelmetCspDirectiveValue[];
styleSrc?: KoaHelmetCspDirectiveValue[];
styleSrcAttr?: KoaHelmetCspDirectiveValue[];
styleSrcElem?: KoaHelmetCspDirectiveValue[];
workerSrc?: KoaHelmetCspDirectiveValue[];
}
interface KoaHelmetContentSecurityPolicyConfiguration {
reportOnly?: boolean;
useDefaults?: boolean;
directives?: KoaHelmetContentSecurityPolicyDirectives;
}
interface KoaHelmet {
(options?: HelmetOptions): Middleware;
contentSecurityPolicy(options?: KoaHelmetContentSecurityPolicyConfiguration): Middleware;
dnsPrefetchControl(options?: HelmetOptions['dnsPrefetchControl']): Middleware;
expectCt(options?: HelmetOptions['expectCt']): Middleware;
frameguard(options?: HelmetOptions['frameguard']): Middleware;
hidePoweredBy(options?: HelmetOptions['hidePoweredBy']): Middleware;
hsts(options?: HelmetOptions['hsts']): Middleware;
ieNoOpen(options?: HelmetOptions['ieNoOpen']): Middleware;
noSniff(options?: HelmetOptions['noSniff']): Middleware;
permittedCrossDomainPolicies(options?: HelmetOptions['permittedCrossDomainPolicies']): Middleware;
referrerPolicy(options?: HelmetOptions['referrerPolicy']): Middleware;
xssFilter(options?: HelmetOptions['xssFilter']): Middleware;
}
}
declare const koaHelmet: koaHelmet.KoaHelmet;
export = koaHelmet;

29
server/node_modules/koa-helmet/lib/koa-helmet.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
'use strict';
const helmet = require('helmet');
const { promisify } = require('util');
const koaHelmet = function () {
const helmetPromise = promisify(helmet.apply(null, arguments));
const middleware = (ctx, next) => {
return helmetPromise(ctx.req, ctx.res).then(next);
};
middleware._name = 'helmet';
return middleware;
};
Object.keys(helmet).forEach(function (helmetMethod) {
koaHelmet[helmetMethod] = function () {
const methodPromise = promisify(helmet[helmetMethod].apply(null, arguments));
return (ctx, next) => {
return methodPromise(ctx.req, ctx.res).then(next);
};
};
Object.keys(helmet[helmetMethod]).forEach((methodExports) => {
koaHelmet[helmetMethod][methodExports] = helmet[helmetMethod][methodExports];
});
});
module.exports = koaHelmet;

47
server/node_modules/koa-helmet/package.json generated vendored Normal file
View File

@@ -0,0 +1,47 @@
{
"name": "koa-helmet",
"author": "Matt Venables <mattvenables@gmail.com>",
"description": "Security header middleware collection for koa",
"license": "MIT",
"version": "7.0.2",
"main": "lib/koa-helmet.js",
"typings": "./koa-helmet.d.ts",
"scripts": {
"format": "eslint lib test --fix",
"lint": "eslint lib test",
"test": "eslint lib test && nyc ava",
"coverage": "nyc report --reporter=text-lcov | coveralls"
},
"keywords": [
"security",
"headers",
"koa",
"x-frame-options",
"csp",
"hsts"
],
"repository": {
"url": "https://github.com/venables/koa-helmet"
},
"engines": {
"node": ">= 14.0.0"
},
"dependencies": {
"helmet": "^6.0.1"
},
"devDependencies": {
"ava": "^3.13.0",
"coveralls": "^3.1.0",
"eslint": "^7.10.0",
"eslint-plugin-node": "^11.1.0",
"koa": "^2.13.0",
"nyc": "^15.1.0",
"supertest": "^5.0.0"
},
"nyc": {
"reporter": [
"lcov",
"text"
]
}
}