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

26
server/node_modules/koa-favicon/History.md generated vendored Normal file
View File

@@ -0,0 +1,26 @@
2.1.0 / 2020-02-27
==================
* Support and test for specifying mime type of icon (#30)
* bump deps
2.0.1 / 2018-03-18
==================
* bump deps
1.2.0 / 2014-09-23
==================
* use mz instead of co-fs
1.1.0 / 2014-05-05
==================
* add favicon serving
1.0.1 / 2013-12-21
==================
* update to new koa middleware signature

34
server/node_modules/koa-favicon/Readme.md generated vendored Normal file
View File

@@ -0,0 +1,34 @@
# koa-favicon [![Build Status](https://travis-ci.org/koajs/favicon.svg)](https://travis-ci.org/koajs/favicon)
Koa middleware for serving a favicon. Based on [serve-favicon](https://github.com/expressjs/serve-favicon).
## Installation
```js
$ npm install koa-favicon
```
## Example
```js
const Koa = require('koa');
const favicon = require('koa-favicon');
const app = new Koa();
app.use(favicon(__dirname + '/public/favicon.ico'));
```
## API
### favicon(path, [options])
Returns a middleware serving the favicon found on the given `path`.
#### options
- `maxAge` cache-control max-age directive in ms, defaulting to 1 day.
- `mime` specify the mime-type of the favicon, defaults to "image/x-icon"
## License
MIT

56
server/node_modules/koa-favicon/index.js generated vendored Normal file
View File

@@ -0,0 +1,56 @@
'use strict';
/**
* Module dependencies.
*/
const resolve = require('path').resolve;
const fs = require('fs');
/**
* Serve favicon.ico
*
* @param {String} path
* @param {Object} [options]
* @param {Number} [options.maxAge=null]
* @param {String} [options.mime="image/x-icon"] MIME type of the file at path
* @return {Function}
* @api public
*/
module.exports = function (path, options){
if (!path) {
return (ctx, next) => {
if ('/favicon.ico' != ctx.path) {
return next();
}
};
}
path = resolve(path);
options = options || {};
let icon;
const maxAge = options.maxAge == null
? 86400000
: Math.min(Math.max(0, options.maxAge), 31556926000);
const cacheControl = `public, max-age=${maxAge / 1000 | 0}`;
const mime = options.mime || 'image/x-icon';
return (ctx, next) => {
if ('/favicon.ico' != ctx.path) {
return next();
}
if ('GET' !== ctx.method && 'HEAD' !== ctx.method) {
ctx.status = 'OPTIONS' == ctx.method ? 200 : 405;
ctx.set('Allow', 'GET, HEAD, OPTIONS');
} else {
// lazily read the icon
if (!icon) icon = fs.readFileSync(path);
ctx.set('Cache-Control', cacheControl);
ctx.type = mime;
ctx.body = icon;
}
};
};

29
server/node_modules/koa-favicon/package.json generated vendored Normal file
View File

@@ -0,0 +1,29 @@
{
"name": "koa-favicon",
"description": "favicon bounce middleware for koa",
"repository": "koajs/favicon",
"version": "2.1.0",
"keywords": [
"koa",
"middleware",
"favicon"
],
"files": [
"index.js"
],
"devDependencies": {
"istanbul": "^0.4.5",
"koa": "^2.11.0",
"mocha": "^7.1.0",
"supertest": "^4.0.2"
},
"dependencies": {
"mz": "^2.7.0"
},
"license": "MIT",
"scripts": {
"test": "NODE_ENV=test mocha --reporter spec --exit",
"test-cov": "NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha -- --exit",
"test-travis": "NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --exit"
}
}