Initial commit

This commit is contained in:
abrendan
2023-11-30 14:15:19 +00:00
commit e4599df811
5457 changed files with 500139 additions and 0 deletions

1
node_modules/server/.env.demo generated vendored Normal file
View File

@@ -0,0 +1 @@
TEST44={"a"}

21
node_modules/server/.eslintrc.json generated vendored Normal file
View File

@@ -0,0 +1,21 @@
{
"parserOptions": {
"ecmaVersion": 8
},
"plugins": ["jasmine"],
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jasmine": true,
"node": true
},
"extends": "eslint:recommended",
"rules": {
"indent": ["error",2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"no-console": "off"
}
}

1
node_modules/server/.github/FUNDING.yml generated vendored Normal file
View File

@@ -0,0 +1 @@
custom: https://www.paypal.me/franciscopresencia/19

23
node_modules/server/.github/ISSUE_TEMPLATE.md generated vendored Normal file
View File

@@ -0,0 +1,23 @@
### Description
<!-- Example: The server fails to find my route when requested. -->
### Expected outcome
<!-- Example: The server responds with a 200 and OK. -->
### Actual outcome
<!-- Example: The route returns a 404 and Not Found -->
### Live Demo
<!-- Example: https://glitch.com/edit/#!/remix/server-js-demo -->
### System Information
**OS:** MacOS High Sierra, Windows 10, etc.
**Node Version:** v8.9.1
**Server.js Version:** 1.0.14

View File

@@ -0,0 +1,29 @@
---
name: 🙋‍ Ask a Question
about: Ask any kind of question
---
**What are you trying to do?**
Please describe first **what you are trying to do** before your actual problem. Some times there is a conceptually simpler way of doing things, but we get stuck into the details of our way. This is known as [the XY Problem](https://meta.stackexchange.com/q/66377/179259).
**Have you tried this first?**
Since server is maintained mainly only by [Francisco Presencia](https://francisco.io/), it is recommended that you try to fix the problem on your own before asking a question. But if you have tried and couldn't fix it, feel free to ask! Make sure to do this first though:
- [ ] Try to find an answer by reading [the documentation](https://serverjs.io/documentation/) and [tutorials](https://serverjs.io/tutorials/).
- [ ] Try to find an answer by searching [previous Github issues](https://github.com/franciscop/server/issues/).
- [ ] Try to find an answer by searching the Web.
- [ ] Try to find an answer by inspection or experimentation.
- [ ] Try to find an answer by asking a skilled friend.
- [ ] Try to find an answer by reading the source code.
**Ask your question**
A clear and concise description of what you want to achieve and the issues you are facing.
**Environment (optional):**
- OS:
- Node.js:
- Server.js:
**Additional context (optional)**
Add any other context about the problem here.

View File

@@ -0,0 +1,35 @@
---
name: 🐛 Bug report
about: Create a report to help us improve
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,17 @@
---
name: 🙏 Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

24
node_modules/server/.github/workflows/tests.yml generated vendored Normal file
View File

@@ -0,0 +1,24 @@
name: tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install dependencies
run: npm install
- name: npm test
run: npm test
env:
CI: true

34
node_modules/server/Contributing.md generated vendored Normal file
View File

@@ -0,0 +1,34 @@
# Contributing
You are welcome to contribute to the project. We use Grunt for building the website and jest for testing.
## Help wanted
While you can open an issue for other reasons, these are the main areas where help is most needed:
- Documentation. Writing new areas ([open an issue first](#pull-requests)), improving the grammar/typos/etc. Also, adding many examples, which should be tested first; a good place would be in `/examples`.
- Testing. In many situations we are testing the *happy path* only, so we'd need more tests for others.
- Errors. This project has an unusual section called errors where all of the errors are logged. Wording/improving these is very welcome.
- Examples. Some simple examples in the folder `/examples` help newcomers and can be included later on in the documentation. The reverse is also true, you can test an example from the documentation in this folder.
## Pull Requests
Before opening any PR with new functionality or change a section of the web or documentation please open an issue to discuss it first.
> Tiny PR fixing typos, some wording, a website issue, etc are perfectly okay and promptly accepted.
**Small PR are preferred** than large ones. If in doubt, open an issue, [ask me personally](http://francisco.io/) or make it small. Since this is mostly a 1-person project, large PR will probably sit idle for a while or flatly rejected (related: [you can also donate or sponsor the project](https://serverjs.io/sponsor) so I'll be able to invest more time and resources on it).
## Security issues
Please do not open any vulnerability issue on Github's issue tracker. Send me an email (find my personal email in [my website](http://francisco.io/)) if you find a particular issue within server, or contact privately the package author in case it's a sub-package issue.
I do not have a PGP-based email right now, but if requested I'll make sure to find out how to use it and publish it in [github](https://github.com/franciscop) or [twitter](http://twitter.com/fpresencia).

131
node_modules/server/Gruntfile.js generated vendored Normal file
View File

@@ -0,0 +1,131 @@
const filters = require("./docs/filters.js");
const files = require("./docs/files.js");
const sass = require("node-sass");
const fs = require("fs");
function extract(src) {
const data = {};
const readme = fs.readFileSync(src + "README.md", "utf-8");
data.title = (readme.match(/^\#\s(.+)/gm) || []).map(one =>
one.replace(/^\#\s/, "")
)[0];
if (!data.title)
throw new Error("Your file " + file + "/README.md has no h1 in markdown");
data.sections = (readme.match(/^\#\#[\s](.+)/gm) || []).map(one =>
one.replace(/^\#\#\s/, "")
);
return data;
}
function getInfo(src) {
delete require.cache[require.resolve(src)];
const info = {};
if (/documentation/.test(src)) {
const base = { title: "Introduction", url: "/documentation/" };
info.introduction = Object.assign({}, extract(src), base);
}
return require(src).reduce((obj, one) => {
return Object.assign({}, obj, { [one]: extract(src + one + "/") });
}, info);
}
// Generate the documentation final:origin pairs
const transform = dir =>
files(__dirname + "/" + dir)
.filter(str => /\.html\.pug$/.test(str))
.reduce((docs, one) => {
docs[one.replace(/\.pug$/, "")] = one;
return docs;
}, {});
// This builds the library itself
module.exports = function(grunt) {
// Configuration
grunt.initConfig({
bytesize: {
all: {
src: ["docs/assets/style.min.css", "docs/assets/javascript.js"]
}
},
jshint: {
options: { esversion: 6 },
src: ["Gruntfile.js", "server.js", "src"]
},
// Launch a small static server
connect: {
server: {
options: {
port: 3000,
hostname: "*",
base: "docs",
livereload: true,
useAvailablePort: false
}
}
},
sass: {
dist: {
options: { implementation: sass, outputStyle: "compressed" },
files: { "docs/assets/style.min.css": "docs/assets/style.scss" }
}
},
pug: {
compile: {
options: {
client: false,
data: file => {
return {
require,
file,
tutorials: getInfo("./docs/tutorials/"),
documentation: getInfo("./docs/documentation/"),
slug: str => str.toLowerCase().replace(/[^\w]+/g, "-")
};
},
filters: filters
},
files: transform("docs")
}
},
watch: {
scripts: {
files: [
"Gruntfile.js",
// Docs
"docs/**/*.*",
"README.md",
// For testing:
"server.js",
"src/**/*.js",
// To bump versions
"package.js"
],
tasks: ["default"],
options: {
spawn: false,
livereload: true
}
}
}
});
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-pug");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-bytesize");
grunt.loadNpmTasks("grunt-sass");
grunt.registerTask("build", ["sass", "pug"]);
grunt.registerTask("test", ["bytesize"]);
grunt.registerTask("default", ["build", "test", "connect"]);
};

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

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016 serverjs
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.

148
node_modules/server/README.md generated vendored Normal file
View File

@@ -0,0 +1,148 @@
# **server.js** for Node.js
[![Subscribe](https://img.shields.io/badge/%20subscribe%20-%20mailchimp%20-blue.svg )](http://eepurl.com/cGRggH)
[![Downloads](https://img.shields.io/npm/dm/server.svg)](https://npm-stat.com/charts.html?package=server)
[![Status](https://github.com/franciscop/server/workflows/tests/badge.svg)](https://github.com/franciscop/server/actions)
[![Windows Build](https://img.shields.io/appveyor/ci/franciscop/server.svg?label=windows)](https://ci.appveyor.com/project/franciscop/server)
[![Dependencies status](https://david-dm.org/franciscop/server/status.svg)](https://david-dm.org/franciscop/server)
Powerful server for Node.js that just works so **you can focus on your awesome project**:
```js
// Include it and extract some methods for convenience
const server = require('server');
const { get, post } = server.router;
// Launch server with options and a couple of routes
server({ port: 8080 }, [
get('/', ctx => 'Hello world'),
post('/', ctx => {
console.log(ctx.data);
return 'ok';
})
]);
```
<blockquote class="external">
<p>Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better.</p>
<cite>― Edsger W. Dijkstra</cite>
</blockquote>
## Getting started
There's a [whole tutorial on getting started for beginners](https://serverjs.io/tutorials/getting-started/) but the quick version is to first install `server` as a dependency:
```bash
npm install server
```
> Server requires **Node.js 7.6.0** or newer. **Node.js 8.x.y** LTS is recommended.
Then you can create a file called `index.js` with this code:
```js
// Include the server in your file
const server = require('server');
const { get, post } = server.router;
// Handle requests to the url "/" ( http://localhost:3000/ )
server([
get('/', ctx => 'Hello world!')
]);
```
Execute this in the terminal to get the server started:
```bash
node .
```
And finally, open your browser on [localhost:3000](http://localhost:3000/) and you should see 'Hello world!' on your browser.
## Documentation
The library is documented here:
<strong><a class="button" href="https://serverjs.io/documentation/">Full Documentation</a></strong>
> [**Subscribe here**](http://eepurl.com/cGRggH) to receive tutorials when released. Tutorials are *good for learning* while the documentation is good for reference/quick use *once you know the basics*.
You can also download the repository and try the examples by browsing to them and `node .` inside each of them in `/examples`.
## Use cases
The package `server` is great for many situations. Let's see some of them:
### Small to medium projects
Everything works out of the box, you get great support for most features and you can easily tap into Express' middleware ecosystem. What's not to love?
Some of the included features: body and file parsers, cookies, sessions, websockets, Redis, gzip, favicon, csrf, SSL, etc. They just work so you will save a headache or two and can focus on your actual project. Get a simple form going:
```js
const server = require('server');
const { get, post } = server.router;
const { render, redirect } = server.reply;
server(
get('/', () => render('index.pug')),
post('/', ctx => {
console.log(ctx.data);
return redirect('/');
})
);
```
### API design
From the flexibility and expressivity of the bundle, designing APIs is a breeze:
```js
// books/router.js
const { get, post, put, del } = require('server/router');
const ctrl = require('./controller');
module.exports = [
get('/book', ctrl.list),
get('/book/:id', ctrl.item),
post('/book', ctrl.create),
put('/book/:id', ctrl.update),
del('/book/:id', ctrl.delete)
];
```
### Real time
Websockets were never this easy to use! With socket.io on the front-end, you can simply do this in the back-end to handle those events:
```js
// chat/router.js
const { socket } = require('server/router');
const ctrl = require('./controller');
module.exports = [
socket('connect', ctrl.join),
socket('message', ctrl.message),
socket('disconnect', ctrl.leave)
];
```
## Author & support
This package was created by [Francisco Presencia](http://francisco.io/) but hopefully developed and maintained by many others. See the [the list of contributors here](https://github.com/franciscop/server/graphs/contributors).
I love using my work and I'm available for contractor work. Freelancing helps maintain `server` and [my other open source projects](https://github.com/franciscop/) up to date! I am also on [Codementor](https://www.codementor.io/franciscop) so if you want to learn more Javascript/Node.js/etc contact me there.
You can also [sponsor the project](https://serverjs.io/sponsor), get your logo in here and some other perks with tons of ♥

127
node_modules/server/api.js generated vendored Normal file
View File

@@ -0,0 +1,127 @@
// API Specification
// This document is to define server's stable API
// - Main function
// - options
// - middleware
// - context
// - router
// - reply
// - utils
// Main function
const server = require('server');
// Definition: an ASYNC function that accepts options and/or middleware
server(opts, mid1, mid2, ...).then(...);
// Properties (defined below)
server.router;
server.reply;
server.utils;
// Options
const ops = {
// Simple options
port,
engine,
public,
secret,
log,
// TODO: MISSING MANY HERE; THIS PART IS NOT YET STABLE
// Plugins options
core,
parser,
};
// Middleware
// Definition: (a)sync function, accepts the Context and returns a reply
const mid1 = ctx => { ... };
const mid2 = async ctx => { ... };
// Return types
// String => HTML or PLAIN response
const mid = ctx => 'Hello world';
// Array/Object => JSON response
const mid = ctx => ['I', 'am', 'json'];
const mid = ctx => ({ hello: 'world' }); // To return an object the extra () is needed
// Reply instance
const mid = ctx => server.reply.send('hello world');
// Context
// Definition: all of the currently known data. Varies depending on location
// NOTE: there are more properties, but they are not considered stable
ctx.options, // the specified or inherited options
ctx.log, // a method to log things in several levels
ctx.reply, // same as above
ctx.utils, // utilities
ctx.server, // the currently running server instance
// For middleware/routers
ctx.data, // the parsed body if it's a POST request
ctx.params, // NOTE: NOT YET, rely on ctx.req.params so far
ctx.query, // NOTE: NOT YET, rely on ctx.req.query so far
// ...
// Non-stable (will change at some point in the future)
ctx.req, // express request; considering removing/changing it in 1.1
ctx.res, // express response; not useful anymore, use server.reply instead
// Router
const router = server.router;
const router = require('server/router');
// Definition: handle the different methods and paths requested
router.get('/', mid1);
router.post('/users', mid2);
router.put('/users/:id', mid3);
// Methods (REST methods not explained):
router.get;
router.post;
router.put;
router.del;
router.socket; // Handle websocket calls
router.error; // Handle errors further up in the chain
// Reply
const reply = server.reply;
const reply = require('server/reply');
// Definition: handle the response from your code
// Note: it MUST be returned from the middleware or it won't be executed
reply.cookie;
reply.download;
reply.end;
reply.file;
reply.header;
reply.json;
reply.jsonp;
reply.redirect;
reply.render;
reply.send;
reply.status;
reply.type;
// Utils
const utils = server.utils;
const utils = require('server/utils'); // NOT YET AVAILABLE
// Definition: some extra utilities to make development easier
utils.modern; // Make express middleware work with server.js

21
node_modules/server/appveyor.yml generated vendored Normal file
View File

@@ -0,0 +1,21 @@
environment:
matrix:
- nodejs_version: "10.0"
cache:
- node_modules
install:
- ps: Install-Product node $env:nodejs_version
- node -v
- npm -v
- npm cache verify
- rm -rf node_modules/
- if exist node_modules npm prune
- if exist node_modules npm rebuild
- npm install
- npm install jest-cli@25 --save-dev
build: off
test_script:
- node --version
- npm --version
- npm test
version: "{build}"

125
node_modules/server/changelog.md generated vendored Normal file
View File

@@ -0,0 +1,125 @@
# Changelog
These are the changes for server. Follows semver as long as you use the documented features. If you reach into the internals, make sure to lock the version and follow the changes. Feel free to ask any question in Github :)
## 1.0.18 [[reference](https://github.com/franciscop/server/compare/1.0.17...1.0.18)]
- Fixed tag for npm so it doesn't install alphas by default.
## 1.0.17 [[reference](https://github.com/franciscop/server/compare/1.0.16...1.0.17)]
- Forgot a couple of debugging console.log(), so had to re-publish without them.
## 1.0.16 [[reference](https://github.com/franciscop/server/compare/1.0.15...1.0.16)]
- Add [`options` sub-schema definition in the plugin parser](https://github.com/franciscop/server/issues/60).
## 1.0.15 [[reference](https://github.com/franciscop/server/compare/1.0.14...1.0.15)]
- Added [session to the sockets](https://github.com/franciscop/server/issues/55).
- Fixed test and docs for jsonp.
## 1.0.14 [[reference](https://github.com/franciscop/server/compare/1.0.13...1.0.14)]
- Added [express session globally](https://github.com/franciscop/server/issues/30) so stores can be created based on that.
## 1.0.13 [[reference](https://github.com/franciscop/server/compare/1.0.12...1.0.13)]
- Fixed bug where some error handling might throw an error. From internal testing in one of my projects.
## 1.0.12 [[reference](https://github.com/franciscop/server/compare/1.0.11...1.0.12)]
- Remove [the unexpected body that was set by express](https://github.com/franciscop/server/issues/46) when only an status code was sent by making it explicit with status(NUMBER).send().
## 1.0.11 [[reference](https://github.com/franciscop/server/compare/1.0.10...1.0.11)]
- Never published, published on 1.0.12 instead.
## 1.0.10 [[reference](https://github.com/franciscop/server/compare/1.0.9...1.0.10)]
- Do not show a warning if [only the status was set but no body](https://github.com/franciscop/server/issues/46) was set.
## 1.0.9 [[reference](https://github.com/franciscop/server/compare/1.0.8...1.0.9)]
- Better error handling and warnings when there is no response from the server. Shows error only when it should.
## 1.0.8 [[reference](https://github.com/franciscop/server/compare/1.0.7...1.0.8)]
- Never published, published on 1.0.9 instead.
## 1.0.7 [[reference](https://github.com/franciscop/server/compare/1.0.6...1.0.7)]
- Fix for [Yarn and npm having different path resolution](https://github.com/franciscop/server/issues/43). This was giving inconsistent results when using yarn (vs the expected one with npm):
```js
server(
get('*', (ctx) => status(200))
);
```
## 1.0.6 [[reference](https://github.com/franciscop/server/compare/1.0.5...1.0.6)]
- Never published, published on 1.0.7 instead.
## 1.0.5 [[reference](https://github.com/franciscop/server/compare/1.0.4...1.0.5)]
- Fix subdomain order resolution (merged from @nick-woodward).
- Test subdomain handling.
- Removed pointless warning.
## 1.0.4 [[reference](https://github.com/franciscop/server/compare/1.0.3...1.0.4)]
- Specify that the `views` for express should be a folder (that can inherit).
- Added environment variable name handling.
## 1.0.3 [[reference](https://github.com/franciscop/server/compare/1.0.2...1.0.3)]
- The log plugin is always on since it's needed internally.
## 1.0.2
- Better error handling for environment variables.
## 1.0.1
- Added the option to disable the CSRF and security plugins independently.
## 1.0.0
**First major release.**

7
node_modules/server/circle.yml generated vendored Normal file
View File

@@ -0,0 +1,7 @@
machine:
node:
version: 8.0.0
general:
artifacts:
- ./coverage

812
node_modules/server/coverage/clover.xml generated vendored Normal file
View File

@@ -0,0 +1,812 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1582728593120" clover="3.2.0">
<project timestamp="1582728593121" name="All files">
<metrics statements="602" coveredstatements="572" conditionals="342" coveredconditionals="284" methods="159" coveredmethods="149" elements="1103" coveredelements="1005" complexity="0" loc="602" ncloc="602" packages="18" files="50" classes="50"/>
<package name="server-old">
<metrics statements="27" coveredstatements="27" conditionals="8" coveredconditionals="7" methods="8" coveredmethods="8"/>
<file name="server.js" path="/Users/francisco/projects/server-old/server.js">
<metrics statements="27" coveredstatements="27" conditionals="8" coveredconditionals="7" methods="8" coveredmethods="8"/>
<line num="5" count="26" type="stmt"/>
<line num="6" count="26" type="stmt"/>
<line num="7" count="26" type="stmt"/>
<line num="8" count="26" type="stmt"/>
<line num="9" count="26" type="stmt"/>
<line num="12" count="108" type="stmt"/>
<line num="15" count="5160" type="stmt"/>
<line num="20" count="26" type="stmt"/>
<line num="23" count="107" type="stmt"/>
<line num="28" count="107" type="cond" truecount="1" falsecount="1"/>
<line num="38" count="107" type="stmt"/>
<line num="41" count="1060" type="stmt"/>
<line num="43" count="106" type="stmt"/>
<line num="44" count="106" type="stmt"/>
<line num="47" count="106" type="stmt"/>
<line num="48" count="424" type="stmt"/>
<line num="54" count="106" type="stmt"/>
<line num="57" count="108" type="stmt"/>
<line num="62" count="106" type="stmt"/>
<line num="65" count="106" type="stmt"/>
<line num="66" count="212" type="stmt"/>
<line num="69" count="106" type="stmt"/>
<line num="72" count="26" type="stmt"/>
<line num="73" count="26" type="stmt"/>
<line num="74" count="26" type="stmt"/>
<line num="75" count="26" type="stmt"/>
<line num="78" count="26" type="stmt"/>
</file>
</package>
<package name="server-old.error">
<metrics statements="16" coveredstatements="16" conditionals="8" coveredconditionals="8" methods="5" coveredmethods="5"/>
<file name="index.js" path="/Users/francisco/projects/server-old/error/index.js">
<metrics statements="16" coveredstatements="16" conditionals="8" coveredconditionals="8" methods="5" coveredmethods="5"/>
<line num="1" count="29" type="stmt"/>
<line num="2" count="51" type="stmt"/>
<line num="3" count="51" type="stmt"/>
<line num="4" count="313" type="cond" truecount="2" falsecount="0"/>
<line num="6" count="51" type="stmt"/>
<line num="9" count="227" type="stmt"/>
<line num="11" count="29" type="cond" truecount="2" falsecount="0"/>
<line num="12" count="99" type="cond" truecount="2" falsecount="0"/>
<line num="14" count="99" type="cond" truecount="2" falsecount="0"/>
<line num="15" count="51" type="stmt"/>
<line num="16" count="51" type="stmt"/>
<line num="17" count="51" type="stmt"/>
<line num="18" count="51" type="stmt"/>
<line num="19" count="51" type="stmt"/>
<line num="23" count="29" type="stmt"/>
<line num="25" count="29" type="stmt"/>
</file>
</package>
<package name="server-old.plugins.compress">
<metrics statements="4" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<file name="index.js" path="/Users/francisco/projects/server-old/plugins/compress/index.js">
<metrics statements="4" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="26" type="stmt"/>
<line num="2" count="26" type="stmt"/>
<line num="4" count="26" type="stmt"/>
<line num="15" count="105" type="stmt"/>
</file>
</package>
<package name="server-old.plugins.express">
<metrics statements="22" coveredstatements="19" conditionals="8" coveredconditionals="4" methods="8" coveredmethods="7"/>
<file name="index.js" path="/Users/francisco/projects/server-old/plugins/express/index.js">
<metrics statements="22" coveredstatements="19" conditionals="8" coveredconditionals="4" methods="8" coveredmethods="7"/>
<line num="1" count="26" type="stmt"/>
<line num="3" count="26" type="stmt"/>
<line num="32" count="106" type="stmt"/>
<line num="33" count="106" type="stmt"/>
<line num="36" count="106" type="stmt"/>
<line num="37" count="430" type="stmt"/>
<line num="38" count="430" type="cond" truecount="1" falsecount="1"/>
<line num="39" count="430" type="stmt"/>
<line num="44" count="106" type="stmt"/>
<line num="46" count="106" type="cond" truecount="1" falsecount="1"/>
<line num="48" count="106" type="cond" truecount="1" falsecount="1"/>
<line num="49" count="0" type="stmt"/>
<line num="50" count="0" type="stmt"/>
<line num="51" count="0" type="stmt"/>
<line num="54" count="106" type="stmt"/>
<line num="58" count="106" type="stmt"/>
<line num="59" count="106" type="stmt"/>
<line num="60" count="106" type="stmt"/>
<line num="61" count="106" type="stmt"/>
<line num="63" count="106" type="stmt"/>
<line num="64" count="7" type="cond" truecount="1" falsecount="1"/>
<line num="66" count="106" type="stmt"/>
</file>
</package>
<package name="server-old.plugins.favicon">
<metrics statements="5" coveredstatements="5" conditionals="2" coveredconditionals="2" methods="1" coveredmethods="1"/>
<file name="index.js" path="/Users/francisco/projects/server-old/plugins/favicon/index.js">
<metrics statements="5" coveredstatements="5" conditionals="2" coveredconditionals="2" methods="1" coveredmethods="1"/>
<line num="1" count="26" type="stmt"/>
<line num="2" count="26" type="stmt"/>
<line num="4" count="26" type="stmt"/>
<line num="17" count="107" type="cond" truecount="2" falsecount="0"/>
<line num="18" count="1" type="stmt"/>
</file>
</package>
<package name="server-old.plugins.final">
<metrics statements="21" coveredstatements="21" conditionals="15" coveredconditionals="15" methods="3" coveredmethods="3"/>
<file name="errors.js" path="/Users/francisco/projects/server-old/plugins/final/errors.js">
<metrics statements="4" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="26" type="stmt"/>
<line num="3" count="26" type="stmt"/>
<line num="14" count="26" type="stmt"/>
<line num="40" count="26" type="stmt"/>
</file>
<file name="index.js" path="/Users/francisco/projects/server-old/plugins/final/index.js">
<metrics statements="17" coveredstatements="17" conditionals="15" coveredconditionals="15" methods="2" coveredmethods="2"/>
<line num="4" count="26" type="stmt"/>
<line num="7" count="26" type="stmt"/>
<line num="8" count="102" type="cond" truecount="2" falsecount="0"/>
<line num="10" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="13" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="14" count="4" type="stmt"/>
<line num="22" count="26" type="stmt"/>
<line num="23" count="4" type="stmt"/>
<line num="24" count="4" type="stmt"/>
<line num="25" count="4" type="stmt"/>
<line num="26" count="4" type="cond" truecount="2" falsecount="0"/>
<line num="27" count="3" type="cond" truecount="3" falsecount="0"/>
<line num="28" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="31" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="32" count="1" type="stmt"/>
<line num="36" count="2" type="stmt"/>
<line num="40" count="26" type="stmt"/>
</file>
</package>
<package name="server-old.plugins.log">
<metrics statements="5" coveredstatements="5" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<file name="index.js" path="/Users/francisco/projects/server-old/plugins/log/index.js">
<metrics statements="5" coveredstatements="5" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="26" type="stmt"/>
<line num="3" count="26" type="stmt"/>
<line num="15" count="26" type="stmt"/>
<line num="29" count="106" type="stmt"/>
<line num="33" count="26" type="stmt"/>
</file>
</package>
<package name="server-old.plugins.parser">
<metrics statements="24" coveredstatements="24" conditionals="14" coveredconditionals="10" methods="9" coveredmethods="9"/>
<file name="index.js" path="/Users/francisco/projects/server-old/plugins/parser/index.js">
<metrics statements="24" coveredstatements="24" conditionals="14" coveredconditionals="10" methods="9" coveredmethods="9"/>
<line num="4" count="26" type="stmt"/>
<line num="5" count="26" type="stmt"/>
<line num="7" count="26" type="stmt"/>
<line num="40" count="107" type="cond" truecount="2" falsecount="0"/>
<line num="47" count="108" type="cond" truecount="1" falsecount="1"/>
<line num="48" count="108" type="stmt"/>
<line num="49" count="426" type="stmt"/>
<line num="54" count="108" type="cond" truecount="2" falsecount="0"/>
<line num="55" count="107" type="stmt"/>
<line num="56" count="107" type="stmt"/>
<line num="61" count="108" type="cond" truecount="2" falsecount="0"/>
<line num="62" count="107" type="stmt"/>
<line num="63" count="107" type="stmt"/>
<line num="68" count="108" type="cond" truecount="1" falsecount="1"/>
<line num="69" count="108" type="stmt"/>
<line num="70" count="108" type="stmt"/>
<line num="75" count="108" type="cond" truecount="1" falsecount="1"/>
<line num="76" count="108" type="stmt"/>
<line num="77" count="108" type="stmt"/>
<line num="82" count="108" type="cond" truecount="1" falsecount="1"/>
<line num="83" count="108" type="stmt"/>
<line num="87" count="108" type="stmt"/>
<line num="92" count="108" type="stmt"/>
<line num="97" count="26" type="stmt"/>
</file>
</package>
<package name="server-old.plugins.security">
<metrics statements="9" coveredstatements="9" conditionals="8" coveredconditionals="5" methods="3" coveredmethods="3"/>
<file name="index.js" path="/Users/francisco/projects/server-old/plugins/security/index.js">
<metrics statements="9" coveredstatements="9" conditionals="8" coveredconditionals="5" methods="3" coveredmethods="3"/>
<line num="1" count="26" type="stmt"/>
<line num="2" count="26" type="stmt"/>
<line num="3" count="26" type="stmt"/>
<line num="5" count="26" type="stmt"/>
<line num="51" count="78" type="cond" truecount="3" falsecount="1"/>
<line num="56" count="78" type="cond" truecount="1" falsecount="1"/>
<line num="57" count="78" type="stmt"/>
<line num="58" count="78" type="stmt"/>
<line num="61" count="78" type="cond" truecount="1" falsecount="1"/>
</file>
</package>
<package name="server-old.plugins.session">
<metrics statements="12" coveredstatements="10" conditionals="6" coveredconditionals="3" methods="4" coveredmethods="3"/>
<file name="index.js" path="/Users/francisco/projects/server-old/plugins/session/index.js">
<metrics statements="12" coveredstatements="10" conditionals="6" coveredconditionals="3" methods="4" coveredmethods="3"/>
<line num="1" count="26" type="stmt"/>
<line num="2" count="26" type="stmt"/>
<line num="3" count="26" type="stmt"/>
<line num="4" count="26" type="stmt"/>
<line num="5" count="26" type="stmt"/>
<line num="8" count="26" type="stmt"/>
<line num="36" count="106" type="cond" truecount="3" falsecount="1"/>
<line num="37" count="0" type="stmt"/>
<line num="41" count="106" type="stmt"/>
<line num="43" count="107" type="stmt"/>
<line num="45" count="106" type="stmt"/>
<line num="46" count="0" type="cond" truecount="0" falsecount="2"/>
</file>
</package>
<package name="server-old.plugins.socket">
<metrics statements="17" coveredstatements="7" conditionals="8" coveredconditionals="1" methods="6" coveredmethods="1"/>
<file name="index.js" path="/Users/francisco/projects/server-old/plugins/socket/index.js">
<metrics statements="17" coveredstatements="7" conditionals="8" coveredconditionals="1" methods="6" coveredmethods="1"/>
<line num="2" count="26" type="stmt"/>
<line num="3" count="26" type="stmt"/>
<line num="5" count="26" type="stmt"/>
<line num="7" count="26" type="stmt"/>
<line num="32" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="33" count="0" type="stmt"/>
<line num="36" count="106" type="cond" truecount="1" falsecount="1"/>
<line num="37" count="106" type="stmt"/>
<line num="38" count="106" type="stmt"/>
<line num="40" count="0" type="stmt"/>
<line num="41" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="42" count="0" type="stmt"/>
<line num="43" count="0" type="stmt"/>
<line num="44" count="0" type="stmt"/>
<line num="49" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="50" count="0" type="stmt"/>
<line num="51" count="0" type="stmt"/>
</file>
</package>
<package name="server-old.plugins.static">
<metrics statements="4" coveredstatements="4" conditionals="2" coveredconditionals="2" methods="1" coveredmethods="1"/>
<file name="index.js" path="/Users/francisco/projects/server-old/plugins/static/index.js">
<metrics statements="4" coveredstatements="4" conditionals="2" coveredconditionals="2" methods="1" coveredmethods="1"/>
<line num="1" count="26" type="stmt"/>
<line num="3" count="26" type="stmt"/>
<line num="14" count="106" type="cond" truecount="2" falsecount="0"/>
<line num="15" count="105" type="stmt"/>
</file>
</package>
<package name="server-old.reply">
<metrics statements="115" coveredstatements="115" conditionals="35" coveredconditionals="32" methods="44" coveredmethods="44"/>
<file name="cookie.js" path="/Users/francisco/projects/server-old/reply/cookie.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
</file>
<file name="download.js" path="/Users/francisco/projects/server-old/reply/download.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
</file>
<file name="end.js" path="/Users/francisco/projects/server-old/reply/end.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
</file>
<file name="file.js" path="/Users/francisco/projects/server-old/reply/file.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
</file>
<file name="header.js" path="/Users/francisco/projects/server-old/reply/header.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
</file>
<file name="index.js" path="/Users/francisco/projects/server-old/reply/index.js">
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
<line num="1" count="27" type="stmt"/>
</file>
<file name="json.js" path="/Users/francisco/projects/server-old/reply/json.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
</file>
<file name="jsonp.js" path="/Users/francisco/projects/server-old/reply/jsonp.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
</file>
<file name="redirect.js" path="/Users/francisco/projects/server-old/reply/redirect.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
</file>
<file name="render.js" path="/Users/francisco/projects/server-old/reply/render.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
</file>
<file name="reply.js" path="/Users/francisco/projects/server-old/reply/reply.js">
<metrics statements="90" coveredstatements="90" conditionals="35" coveredconditionals="32" methods="32" coveredmethods="32"/>
<line num="1" count="27" type="stmt"/>
<line num="2" count="27" type="stmt"/>
<line num="5" count="27" type="stmt"/>
<line num="6" count="115" type="stmt"/>
<line num="7" count="115" type="stmt"/>
<line num="8" count="107" type="stmt"/>
<line num="13" count="27" type="stmt"/>
<line num="14" count="2" type="stmt"/>
<line num="15" count="2" type="stmt"/>
<line num="17" count="2" type="stmt"/>
<line num="22" count="27" type="stmt"/>
<line num="25" count="6" type="cond" truecount="2" falsecount="0"/>
<line num="26" count="1" type="stmt"/>
<line num="29" count="5" type="cond" truecount="2" falsecount="0"/>
<line num="30" count="1" type="stmt"/>
<line num="33" count="4" type="cond" truecount="2" falsecount="0"/>
<line num="34" count="1" type="stmt"/>
<line num="37" count="3" type="stmt"/>
<line num="38" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="39" count="2" type="stmt"/>
<line num="42" count="3" type="stmt"/>
<line num="43" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="44" count="1" type="stmt"/>
<line num="46" count="2" type="stmt"/>
<line num="47" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="51" count="3" type="stmt"/>
<line num="56" count="27" type="stmt"/>
<line num="57" count="4" type="stmt"/>
<line num="58" count="4" type="stmt"/>
<line num="60" count="4" type="stmt"/>
<line num="65" count="27" type="stmt"/>
<line num="68" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="69" count="1" type="stmt"/>
<line num="72" count="9" type="cond" truecount="2" falsecount="0"/>
<line num="73" count="1" type="stmt"/>
<line num="76" count="8" type="cond" truecount="1" falsecount="0"/>
<line num="77" count="8" type="cond" truecount="2" falsecount="0"/>
<line num="78" count="7" type="stmt"/>
<line num="81" count="8" type="stmt"/>
<line num="82" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="83" count="1" type="stmt"/>
<line num="85" count="2" type="stmt"/>
<line num="86" count="2" type="cond" truecount="1" falsecount="1"/>
<line num="90" count="8" type="stmt"/>
<line num="95" count="27" type="stmt"/>
<line num="96" count="1" type="stmt"/>
<line num="97" count="1" type="stmt"/>
<line num="99" count="1" type="stmt"/>
<line num="102" count="27" type="stmt"/>
<line num="103" count="1" type="stmt"/>
<line num="104" count="1" type="stmt"/>
<line num="106" count="1" type="stmt"/>
<line num="109" count="27" type="stmt"/>
<line num="110" count="1" type="stmt"/>
<line num="111" count="1" type="stmt"/>
<line num="113" count="1" type="stmt"/>
<line num="116" count="27" type="stmt"/>
<line num="117" count="1" type="stmt"/>
<line num="118" count="1" type="stmt"/>
<line num="120" count="1" type="stmt"/>
<line num="123" count="27" type="stmt"/>
<line num="126" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="127" count="1" type="stmt"/>
<line num="130" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="131" count="1" type="stmt"/>
<line num="134" count="1" type="cond" truecount="1" falsecount="0"/>
<line num="136" count="1" type="stmt"/>
<line num="138" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="139" count="1" type="stmt"/>
<line num="141" count="1" type="stmt"/>
<line num="144" count="27" type="stmt"/>
<line num="147" count="84" type="cond" truecount="5" falsecount="0"/>
<line num="148" count="1" type="stmt"/>
<line num="151" count="83" type="stmt"/>
<line num="152" count="83" type="stmt"/>
<line num="154" count="83" type="stmt"/>
<line num="157" count="27" type="stmt"/>
<line num="158" count="18" type="stmt"/>
<line num="160" count="18" type="stmt"/>
<line num="161" count="18" type="stmt"/>
<line num="163" count="18" type="stmt"/>
<line num="166" count="27" type="stmt"/>
<line num="167" count="1" type="stmt"/>
<line num="168" count="1" type="stmt"/>
<line num="170" count="1" type="stmt"/>
<line num="173" count="27" type="stmt"/>
<line num="174" count="103" type="stmt"/>
<line num="175" count="119" type="stmt"/>
<line num="177" count="99" type="stmt"/>
<line num="181" count="27" type="stmt"/>
</file>
<file name="send.js" path="/Users/francisco/projects/server-old/reply/send.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="71" type="stmt"/>
</file>
<file name="status.js" path="/Users/francisco/projects/server-old/reply/status.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
</file>
<file name="type.js" path="/Users/francisco/projects/server-old/reply/type.js">
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
</file>
</package>
<package name="server-old.router">
<metrics statements="75" coveredstatements="74" conditionals="32" coveredconditionals="29" methods="17" coveredmethods="17"/>
<file name="del.js" path="/Users/francisco/projects/server-old/router/del.js">
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="2" count="26" type="stmt"/>
<line num="5" count="26" type="stmt"/>
<line num="6" count="2" type="stmt"/>
</file>
<file name="error.js" path="/Users/francisco/projects/server-old/router/error.js">
<metrics statements="15" coveredstatements="15" conditionals="8" coveredconditionals="6" methods="3" coveredmethods="3"/>
<line num="1" count="26" type="stmt"/>
<line num="2" count="26" type="stmt"/>
<line num="3" count="26" type="stmt"/>
<line num="5" count="26" type="stmt"/>
<line num="7" count="107" type="stmt"/>
<line num="8" count="107" type="cond" truecount="1" falsecount="1"/>
<line num="10" count="107" type="stmt"/>
<line num="11" count="107" type="stmt"/>
<line num="14" count="20" type="cond" truecount="2" falsecount="0"/>
<line num="15" count="20" type="stmt"/>
<line num="18" count="20" type="cond" truecount="3" falsecount="1"/>
<line num="20" count="20" type="stmt"/>
<line num="21" count="20" type="stmt"/>
<line num="22" count="20" type="stmt"/>
<line num="24" count="107" type="stmt"/>
</file>
<file name="errors.js" path="/Users/francisco/projects/server-old/router/errors.js">
<metrics statements="4" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="3" count="1" type="stmt"/>
<line num="5" count="1" type="stmt"/>
<line num="6" count="1" type="stmt"/>
<line num="8" count="1" type="stmt"/>
</file>
<file name="generic.js" path="/Users/francisco/projects/server-old/router/generic.js">
<metrics statements="14" coveredstatements="14" conditionals="8" coveredconditionals="7" methods="2" coveredmethods="2"/>
<line num="1" count="26" type="stmt"/>
<line num="2" count="26" type="stmt"/>
<line num="3" count="26" type="stmt"/>
<line num="6" count="26" type="stmt"/>
<line num="9" count="36" type="stmt"/>
<line num="11" count="36" type="cond" truecount="1" falsecount="1"/>
<line num="13" count="36" type="stmt"/>
<line num="16" count="43" type="cond" truecount="2" falsecount="0"/>
<line num="19" count="36" type="cond" truecount="2" falsecount="0"/>
<line num="22" count="32" type="stmt"/>
<line num="23" count="32" type="cond" truecount="2" falsecount="0"/>
<line num="24" count="27" type="stmt"/>
<line num="27" count="27" type="stmt"/>
<line num="29" count="27" type="stmt"/>
</file>
<file name="get.js" path="/Users/francisco/projects/server-old/router/get.js">
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="2" count="26" type="stmt"/>
<line num="5" count="26" type="stmt"/>
<line num="6" count="29" type="stmt"/>
</file>
<file name="index.js" path="/Users/francisco/projects/server-old/router/index.js">
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
<line num="8" count="26" type="stmt"/>
</file>
<file name="parse.js" path="/Users/francisco/projects/server-old/router/parse.js">
<metrics statements="3" coveredstatements="3" conditionals="2" coveredconditionals="2" methods="1" coveredmethods="1"/>
<line num="2" count="26" type="stmt"/>
<line num="3" count="143" type="cond" truecount="2" falsecount="0"/>
<line num="4" count="143" type="stmt"/>
</file>
<file name="path-to-regexp-wrap.js" path="/Users/francisco/projects/server-old/router/path-to-regexp-wrap.js">
<metrics statements="20" coveredstatements="19" conditionals="8" coveredconditionals="8" methods="4" coveredmethods="4"/>
<line num="12" count="26" type="stmt"/>
<line num="18" count="26" type="stmt"/>
<line num="19" count="52" type="cond" truecount="2" falsecount="0"/>
<line num="27" count="8" type="stmt"/>
<line num="28" count="8" type="stmt"/>
<line num="30" count="0" type="stmt"/>
<line num="32" count="8" type="stmt"/>
<line num="35" count="52" type="stmt"/>
<line num="36" count="143" type="stmt"/>
<line num="37" count="143" type="stmt"/>
<line num="39" count="143" type="stmt"/>
<line num="40" count="52" type="stmt"/>
<line num="41" count="52" type="cond" truecount="2" falsecount="0"/>
<line num="43" count="52" type="cond" truecount="2" falsecount="0"/>
<line num="44" count="6" type="stmt"/>
<line num="47" count="46" type="stmt"/>
<line num="48" count="20" type="cond" truecount="2" falsecount="0"/>
<line num="49" count="12" type="stmt"/>
<line num="51" count="8" type="stmt"/>
<line num="54" count="46" type="stmt"/>
</file>
<file name="post.js" path="/Users/francisco/projects/server-old/router/post.js">
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="2" count="26" type="stmt"/>
<line num="5" count="26" type="stmt"/>
<line num="6" count="4" type="stmt"/>
</file>
<file name="put.js" path="/Users/francisco/projects/server-old/router/put.js">
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="2" count="26" type="stmt"/>
<line num="5" count="26" type="stmt"/>
<line num="6" count="1" type="stmt"/>
</file>
<file name="sub.js" path="/Users/francisco/projects/server-old/router/sub.js">
<metrics statements="6" coveredstatements="6" conditionals="6" coveredconditionals="6" methods="2" coveredmethods="2"/>
<line num="1" count="26" type="stmt"/>
<line num="3" count="26" type="stmt"/>
<line num="4" count="4" type="stmt"/>
<line num="5" count="4" type="cond" truecount="6" falsecount="0"/>
<line num="7" count="3" type="stmt"/>
<line num="8" count="3" type="stmt"/>
</file>
</package>
<package name="server-old.src.config">
<metrics statements="115" coveredstatements="106" conditionals="125" coveredconditionals="104" methods="18" coveredmethods="16"/>
<file name="env.js" path="/Users/francisco/projects/server-old/src/config/env.js">
<metrics statements="18" coveredstatements="18" conditionals="12" coveredconditionals="11" methods="4" coveredmethods="4"/>
<line num="2" count="27" type="stmt"/>
<line num="5" count="27" type="stmt"/>
<line num="6" count="4752" type="stmt"/>
<line num="7" count="4158" type="stmt"/>
<line num="8" count="3618" type="cond" truecount="2" falsecount="0"/>
<line num="11" count="27" type="stmt"/>
<line num="12" count="6372" type="cond" truecount="2" falsecount="0"/>
<line num="13" count="4752" type="cond" truecount="1" falsecount="1"/>
<line num="14" count="4752" type="cond" truecount="2" falsecount="0"/>
<line num="15" count="4158" type="cond" truecount="2" falsecount="0"/>
<line num="16" count="3618" type="stmt"/>
<line num="17" count="3618" type="cond" truecount="2" falsecount="0"/>
<line num="19" count="27" type="stmt"/>
<line num="21" count="3564" type="stmt"/>
<line num="24" count="27" type="stmt"/>
<line num="25" count="27" type="stmt"/>
<line num="26" count="6372" type="stmt"/>
<line num="29" count="27" type="stmt"/>
</file>
<file name="errors.js" path="/Users/francisco/projects/server-old/src/config/errors.js">
<metrics statements="13" coveredstatements="13" conditionals="2" coveredconditionals="0" methods="8" coveredmethods="6"/>
<line num="1" count="27" type="stmt"/>
<line num="2" count="10" type="stmt"/>
<line num="5" count="27" type="stmt"/>
<line num="11" count="27" type="stmt"/>
<line num="17" count="27" type="stmt"/>
<line num="22" count="27" type="stmt"/>
<line num="31" count="27" type="stmt"/>
<line num="36" count="27" type="stmt"/>
<line num="41" count="27" type="stmt"/>
<line num="46" count="27" type="stmt"/>
<line num="51" count="27" type="stmt"/>
<line num="57" count="27" type="stmt"/>
<line num="63" count="27" type="stmt"/>
</file>
<file name="index.js" path="/Users/francisco/projects/server-old/src/config/index.js">
<metrics statements="8" coveredstatements="8" conditionals="4" coveredconditionals="3" methods="2" coveredmethods="2"/>
<line num="1" count="27" type="stmt"/>
<line num="2" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
<line num="7" count="27" type="cond" truecount="2" falsecount="0"/>
<line num="10" count="113" type="stmt"/>
<line num="13" count="113" type="cond" truecount="1" falsecount="1"/>
<line num="14" count="1070" type="stmt"/>
<line num="17" count="112" type="stmt"/>
</file>
<file name="parse.js" path="/Users/francisco/projects/server-old/src/config/parse.js">
<metrics statements="66" coveredstatements="61" conditionals="97" coveredconditionals="88" methods="3" coveredmethods="3"/>
<line num="5" count="27" type="stmt"/>
<line num="6" count="27" type="stmt"/>
<line num="13" count="27" type="cond" truecount="3" falsecount="0"/>
<line num="16" count="1212" type="stmt"/>
<line num="19" count="1212" type="cond" truecount="4" falsecount="0"/>
<line num="20" count="28" type="stmt"/>
<line num="25" count="1184" type="cond" truecount="2" falsecount="0"/>
<line num="26" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="27" count="1" type="stmt"/>
<line num="29" count="9" type="stmt"/>
<line num="33" count="1183" type="stmt"/>
<line num="37" count="7833" type="stmt"/>
<line num="41" count="7833" type="cond" truecount="2" falsecount="0"/>
<line num="44" count="7171" type="cond" truecount="1" falsecount="1"/>
<line num="45" count="0" type="stmt"/>
<line num="49" count="7171" type="cond" truecount="1" falsecount="1"/>
<line num="50" count="0" type="stmt"/>
<line num="54" count="7171" type="cond" truecount="2" falsecount="0"/>
<line num="55" count="6921" type="cond" truecount="4" falsecount="0"/>
<line num="56" count="250" type="cond" truecount="4" falsecount="0"/>
<line num="57" count="1" type="stmt"/>
<line num="61" count="7170" type="cond" truecount="2" falsecount="0"/>
<line num="62" count="6955" type="cond" truecount="4" falsecount="0"/>
<line num="63" count="215" type="cond" truecount="2" falsecount="2"/>
<line num="64" count="0" type="cond" truecount="0" falsecount="4"/>
<line num="65" count="0" type="stmt"/>
<line num="70" count="7170" type="cond" truecount="2" falsecount="0"/>
<line num="71" count="6955" type="cond" truecount="4" falsecount="0"/>
<line num="76" count="7170" type="stmt"/>
<line num="81" count="28680" type="stmt"/>
<line num="82" count="7170" type="cond" truecount="2" falsecount="0"/>
<line num="83" count="2896" type="stmt"/>
<line num="88" count="7170" type="cond" truecount="5" falsecount="0"/>
<line num="89" count="106" type="cond" truecount="1" falsecount="1"/>
<line num="90" count="0" type="stmt"/>
<line num="92" count="106" type="stmt"/>
<line num="96" count="7170" type="cond" truecount="5" falsecount="0"/>
<line num="97" count="356" type="cond" truecount="2" falsecount="0"/>
<line num="98" count="248" type="stmt"/>
<line num="100" count="356" type="stmt"/>
<line num="101" count="356" type="cond" truecount="4" falsecount="0"/>
<line num="102" count="123" type="stmt"/>
<line num="107" count="7170" type="cond" truecount="2" falsecount="0"/>
<line num="108" count="234" type="stmt"/>
<line num="116" count="7170" type="cond" truecount="2" falsecount="0"/>
<line num="117" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="118" count="1" type="stmt"/>
<line num="123" count="7169" type="cond" truecount="2" falsecount="0"/>
<line num="124" count="232" type="cond" truecount="2" falsecount="0"/>
<line num="125" count="2" type="stmt"/>
<line num="130" count="7167" type="cond" truecount="4" falsecount="0"/>
<line num="133" count="1878" type="cond" truecount="2" falsecount="0"/>
<line num="135" count="2553" type="cond" truecount="2" falsecount="0"/>
<line num="138" count="1878" type="cond" truecount="2" falsecount="0"/>
<line num="139" count="2" type="stmt"/>
<line num="145" count="7165" type="cond" truecount="2" falsecount="0"/>
<line num="146" count="4" type="stmt"/>
<line num="147" count="4" type="cond" truecount="2" falsecount="0"/>
<line num="148" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="151" count="7162" type="cond" truecount="2" falsecount="0"/>
<line num="152" count="2891" type="stmt"/>
<line num="157" count="1174" type="stmt"/>
<line num="158" count="7814" type="stmt"/>
<line num="159" count="7814" type="cond" truecount="2" falsecount="0"/>
<line num="160" count="2" type="stmt"/>
<line num="164" count="1174" type="stmt"/>
</file>
<file name="schema.js" path="/Users/francisco/projects/server-old/src/config/schema.js">
<metrics statements="10" coveredstatements="6" conditionals="10" coveredconditionals="2" methods="1" coveredmethods="1"/>
<line num="1" count="27" type="stmt"/>
<line num="2" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
<line num="5" count="27" type="stmt"/>
<line num="16" count="127" type="cond" truecount="2" falsecount="2"/>
<line num="17" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="19" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="20" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="21" count="0" type="stmt"/>
<line num="23" count="127" type="stmt"/>
</file>
</package>
<package name="server-old.src.join">
<metrics statements="22" coveredstatements="22" conditionals="10" coveredconditionals="9" methods="3" coveredmethods="3"/>
<file name="index.js" path="/Users/francisco/projects/server-old/src/join/index.js">
<metrics statements="22" coveredstatements="22" conditionals="10" coveredconditionals="9" methods="3" coveredmethods="3"/>
<line num="1" count="27" type="stmt"/>
<line num="2" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
<line num="6" count="27" type="stmt"/>
<line num="7" count="2202" type="cond" truecount="2" falsecount="0"/>
<line num="10" count="103" type="cond" truecount="2" falsecount="0"/>
<line num="11" count="34" type="stmt"/>
<line num="17" count="69" type="cond" truecount="2" falsecount="0"/>
<line num="18" count="69" type="stmt"/>
<line num="22" count="27" type="stmt"/>
<line num="25" count="248" type="stmt"/>
<line num="28" count="248" type="stmt"/>
<line num="29" count="250" type="stmt"/>
<line num="30" count="2225" type="stmt"/>
<line num="32" count="2225" type="cond" truecount="2" falsecount="0"/>
<line num="34" count="24" type="cond" truecount="1" falsecount="1"/>
<line num="35" count="24" type="stmt"/>
<line num="36" count="24" type="stmt"/>
<line num="37" count="24" type="stmt"/>
<line num="42" count="2201" type="stmt"/>
<line num="43" count="2178" type="stmt"/>
<line num="46" count="25" type="stmt"/>
</file>
</package>
<package name="server-old.src.modern">
<metrics statements="30" coveredstatements="30" conditionals="14" coveredconditionals="14" methods="9" coveredmethods="9"/>
<file name="errors.js" path="/Users/francisco/projects/server-old/src/modern/errors.js">
<metrics statements="8" coveredstatements="8" conditionals="0" coveredconditionals="0" methods="3" coveredmethods="3"/>
<line num="1" count="27" type="stmt"/>
<line num="2" count="11" type="stmt"/>
<line num="5" count="27" type="stmt"/>
<line num="14" count="27" type="stmt"/>
<line num="25" count="27" type="stmt"/>
<line num="38" count="27" type="stmt"/>
<line num="47" count="27" type="stmt"/>
<line num="62" count="27" type="stmt"/>
</file>
<file name="index.js" path="/Users/francisco/projects/server-old/src/modern/index.js">
<metrics statements="7" coveredstatements="7" conditionals="2" coveredconditionals="2" methods="4" coveredmethods="4"/>
<line num="4" count="27" type="stmt"/>
<line num="7" count="27" type="stmt"/>
<line num="10" count="1464" type="stmt"/>
<line num="13" count="1457" type="stmt"/>
<line num="14" count="1457" type="stmt"/>
<line num="17" count="1453" type="cond" truecount="2" falsecount="0"/>
<line num="20" count="1453" type="stmt"/>
</file>
<file name="validate.js" path="/Users/francisco/projects/server-old/src/modern/validate.js">
<metrics statements="15" coveredstatements="15" conditionals="12" coveredconditionals="12" methods="2" coveredmethods="2"/>
<line num="1" count="27" type="stmt"/>
<line num="3" count="27" type="stmt"/>
<line num="4" count="1464" type="cond" truecount="2" falsecount="0"/>
<line num="5" count="2" type="stmt"/>
<line num="7" count="1462" type="cond" truecount="2" falsecount="0"/>
<line num="8" count="4" type="stmt"/>
<line num="10" count="1458" type="cond" truecount="2" falsecount="0"/>
<line num="11" count="1" type="stmt"/>
<line num="15" count="27" type="stmt"/>
<line num="16" count="1457" type="cond" truecount="2" falsecount="0"/>
<line num="17" count="1" type="stmt"/>
<line num="19" count="1456" type="cond" truecount="2" falsecount="0"/>
<line num="20" count="2" type="stmt"/>
<line num="22" count="1454" type="cond" truecount="2" falsecount="0"/>
<line num="23" count="1" type="stmt"/>
</file>
</package>
<package name="server-old.test">
<metrics statements="79" coveredstatements="74" conditionals="47" coveredconditionals="39" methods="18" coveredmethods="17"/>
<file name="a.js" path="/Users/francisco/projects/server-old/test/a.js">
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
<line num="1" count="1" type="stmt"/>
</file>
<file name="port.js" path="/Users/francisco/projects/server-old/test/port.js">
<metrics statements="12" coveredstatements="10" conditionals="5" coveredconditionals="3" methods="2" coveredmethods="2"/>
<line num="4" count="25" type="stmt"/>
<line num="5" count="25" type="stmt"/>
<line num="7" count="103" type="stmt"/>
<line num="10" count="25" type="cond" truecount="1" falsecount="0"/>
<line num="13" count="103" type="cond" truecount="1" falsecount="1"/>
<line num="14" count="0" type="stmt"/>
<line num="17" count="103" type="stmt"/>
<line num="20" count="103" type="cond" truecount="1" falsecount="1"/>
<line num="21" count="0" type="stmt"/>
<line num="25" count="103" type="stmt"/>
<line num="26" count="103" type="stmt"/>
<line num="29" count="25" type="stmt"/>
</file>
<file name="run.js" path="/Users/francisco/projects/server-old/test/run.js">
<metrics statements="66" coveredstatements="63" conditionals="42" coveredconditionals="36" methods="15" coveredmethods="14"/>
<line num="1" count="24" type="stmt"/>
<line num="2" count="24" type="stmt"/>
<line num="3" count="24" type="stmt"/>
<line num="6" count="24" type="stmt"/>
<line num="9" count="107" type="cond" truecount="1" falsecount="1"/>
<line num="12" count="107" type="stmt"/>
<line num="15" count="107" type="cond" truecount="1" falsecount="1"/>
<line num="16" count="107" type="stmt"/>
<line num="20" count="107" type="cond" truecount="4" falsecount="0"/>
<line num="21" count="7" type="stmt"/>
<line num="25" count="107" type="stmt"/>
<line num="31" count="24" type="stmt"/>
<line num="35" count="100" type="cond" truecount="2" falsecount="0"/>
<line num="45" count="100" type="cond" truecount="2" falsecount="0"/>
<line num="46" count="100" type="stmt"/>
<line num="49" count="100" type="cond" truecount="2" falsecount="0"/>
<line num="52" count="100" type="cond" truecount="1" falsecount="1"/>
<line num="57" count="100" type="stmt"/>
<line num="62" count="24" type="stmt"/>
<line num="65" count="202" type="cond" truecount="2" falsecount="0"/>
<line num="66" count="101" type="stmt"/>
<line num="69" count="101" type="stmt"/>
<line num="72" count="100" type="stmt"/>
<line num="74" count="100" type="stmt"/>
<line num="75" count="13" type="cond" truecount="2" falsecount="0"/>
<line num="76" count="11" type="stmt"/>
<line num="80" count="100" type="cond" truecount="2" falsecount="0"/>
<line num="82" count="99" type="stmt"/>
<line num="83" count="98" type="cond" truecount="1" falsecount="1"/>
<line num="85" count="99" type="cond" truecount="2" falsecount="0"/>
<line num="86" count="94" type="stmt"/>
<line num="88" count="94" type="stmt"/>
<line num="89" count="94" type="stmt"/>
<line num="90" count="94" type="stmt"/>
<line num="91" count="94" type="cond" truecount="4" falsecount="0"/>
<line num="92" count="7" type="stmt"/>
<line num="93" count="7" type="stmt"/>
<line num="95" count="94" type="stmt"/>
<line num="98" count="94" type="stmt"/>
<line num="101" count="94" type="stmt"/>
<line num="104" count="101" type="stmt"/>
<line num="106" count="5" type="stmt"/>
<line num="107" count="5" type="stmt"/>
<line num="108" count="5" type="stmt"/>
<line num="109" count="5" type="stmt"/>
<line num="110" count="20" type="stmt"/>
<line num="111" count="13" type="stmt"/>
<line num="112" count="12" type="stmt"/>
<line num="113" count="12" type="stmt"/>
<line num="114" count="12" type="cond" truecount="4" falsecount="0"/>
<line num="115" count="3" type="stmt"/>
<line num="116" count="3" type="stmt"/>
<line num="119" count="12" type="stmt"/>
<line num="120" count="12" type="stmt"/>
<line num="122" count="5" type="stmt"/>
<line num="129" count="5" type="stmt"/>
<line num="131" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="132" count="0" type="stmt"/>
<line num="134" count="0" type="stmt"/>
<line num="136" count="4" type="stmt"/>
<line num="139" count="101" type="stmt"/>
<line num="140" count="101" type="stmt"/>
<line num="141" count="101" type="stmt"/>
<line num="142" count="101" type="stmt"/>
<line num="143" count="101" type="stmt"/>
<line num="147" count="24" type="stmt"/>
</file>
</package>
</project>
</coverage>

51
node_modules/server/coverage/coverage-final.json generated vendored Normal file

File diff suppressed because one or more lines are too long

224
node_modules/server/coverage/lcov-report/base.css generated vendored Normal file
View File

@@ -0,0 +1,224 @@
body, html {
margin:0; padding: 0;
height: 100%;
}
body {
font-family: Helvetica Neue, Helvetica, Arial;
font-size: 14px;
color:#333;
}
.small { font-size: 12px; }
*, *:after, *:before {
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
h1 { font-size: 20px; margin: 0;}
h2 { font-size: 14px; }
pre {
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
margin: 0;
padding: 0;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
}
a { color:#0074D9; text-decoration:none; }
a:hover { text-decoration:underline; }
.strong { font-weight: bold; }
.space-top1 { padding: 10px 0 0 0; }
.pad2y { padding: 20px 0; }
.pad1y { padding: 10px 0; }
.pad2x { padding: 0 20px; }
.pad2 { padding: 20px; }
.pad1 { padding: 10px; }
.space-left2 { padding-left:55px; }
.space-right2 { padding-right:20px; }
.center { text-align:center; }
.clearfix { display:block; }
.clearfix:after {
content:'';
display:block;
height:0;
clear:both;
visibility:hidden;
}
.fl { float: left; }
@media only screen and (max-width:640px) {
.col3 { width:100%; max-width:100%; }
.hide-mobile { display:none!important; }
}
.quiet {
color: #7f7f7f;
color: rgba(0,0,0,0.5);
}
.quiet a { opacity: 0.7; }
.fraction {
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 10px;
color: #555;
background: #E8E8E8;
padding: 4px 5px;
border-radius: 3px;
vertical-align: middle;
}
div.path a:link, div.path a:visited { color: #333; }
table.coverage {
border-collapse: collapse;
margin: 10px 0 0 0;
padding: 0;
}
table.coverage td {
margin: 0;
padding: 0;
vertical-align: top;
}
table.coverage td.line-count {
text-align: right;
padding: 0 5px 0 20px;
}
table.coverage td.line-coverage {
text-align: right;
padding-right: 10px;
min-width:20px;
}
table.coverage td span.cline-any {
display: inline-block;
padding: 0 5px;
width: 100%;
}
.missing-if-branch {
display: inline-block;
margin-right: 5px;
border-radius: 3px;
position: relative;
padding: 0 4px;
background: #333;
color: yellow;
}
.skip-if-branch {
display: none;
margin-right: 10px;
position: relative;
padding: 0 4px;
background: #ccc;
color: white;
}
.missing-if-branch .typ, .skip-if-branch .typ {
color: inherit !important;
}
.coverage-summary {
border-collapse: collapse;
width: 100%;
}
.coverage-summary tr { border-bottom: 1px solid #bbb; }
.keyline-all { border: 1px solid #ddd; }
.coverage-summary td, .coverage-summary th { padding: 10px; }
.coverage-summary tbody { border: 1px solid #bbb; }
.coverage-summary td { border-right: 1px solid #bbb; }
.coverage-summary td:last-child { border-right: none; }
.coverage-summary th {
text-align: left;
font-weight: normal;
white-space: nowrap;
}
.coverage-summary th.file { border-right: none !important; }
.coverage-summary th.pct { }
.coverage-summary th.pic,
.coverage-summary th.abs,
.coverage-summary td.pct,
.coverage-summary td.abs { text-align: right; }
.coverage-summary td.file { white-space: nowrap; }
.coverage-summary td.pic { min-width: 120px !important; }
.coverage-summary tfoot td { }
.coverage-summary .sorter {
height: 10px;
width: 7px;
display: inline-block;
margin-left: 0.5em;
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
}
.coverage-summary .sorted .sorter {
background-position: 0 -20px;
}
.coverage-summary .sorted-desc .sorter {
background-position: 0 -10px;
}
.status-line { height: 10px; }
/* yellow */
.cbranch-no { background: yellow !important; color: #111; }
/* dark red */
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
.low .chart { border:1px solid #C21F39 }
.highlighted,
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
background: #C21F39 !important;
}
/* medium red */
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
/* light red */
.low, .cline-no { background:#FCE1E5 }
/* light green */
.high, .cline-yes { background:rgb(230,245,208) }
/* medium green */
.cstat-yes { background:rgb(161,215,106) }
/* dark green */
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
.high .chart { border:1px solid rgb(77,146,33) }
/* dark yellow (gold) */
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
.medium .chart { border:1px solid #f9cd0b; }
/* light yellow */
.medium { background: #fff4c2; }
.cstat-skip { background: #ddd; color: #111; }
.fstat-skip { background: #ddd; color: #111 !important; }
.cbranch-skip { background: #ddd !important; color: #111; }
span.cline-neutral { background: #eaeaea; }
.coverage-summary td.empty {
opacity: .5;
padding-top: 4px;
padding-bottom: 4px;
line-height: 1;
color: #888;
}
.cover-fill, .cover-empty {
display:inline-block;
height: 12px;
}
.chart {
line-height: 0;
}
.cover-empty {
background: white;
}
.cover-full {
border-right: none !important;
}
pre.prettyprint {
border: none !important;
padding: 0 !important;
margin: 0 !important;
}
.com { color: #999 !important; }
.ignore-none { color: #999; font-weight: normal; }
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -48px;
}
.footer, .push {
height: 48px;
}

View File

@@ -0,0 +1,79 @@
/* eslint-disable */
var jumpToCode = (function init() {
// Classes of code we would like to highlight in the file view
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
// Elements to highlight in the file listing view
var fileListingElements = ['td.pct.low'];
// We don't want to select elements that are direct descendants of another match
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
// Selecter that finds elements on the page to which we can jump
var selector =
fileListingElements.join(', ') +
', ' +
notSelector +
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
// The NodeList of matching elements
var missingCoverageElements = document.querySelectorAll(selector);
var currentIndex;
function toggleClass(index) {
missingCoverageElements
.item(currentIndex)
.classList.remove('highlighted');
missingCoverageElements.item(index).classList.add('highlighted');
}
function makeCurrent(index) {
toggleClass(index);
currentIndex = index;
missingCoverageElements.item(index).scrollIntoView({
behavior: 'smooth',
block: 'center',
inline: 'center'
});
}
function goToPrevious() {
var nextIndex = 0;
if (typeof currentIndex !== 'number' || currentIndex === 0) {
nextIndex = missingCoverageElements.length - 1;
} else if (missingCoverageElements.length > 1) {
nextIndex = currentIndex - 1;
}
makeCurrent(nextIndex);
}
function goToNext() {
var nextIndex = 0;
if (
typeof currentIndex === 'number' &&
currentIndex < missingCoverageElements.length - 1
) {
nextIndex = currentIndex + 1;
}
makeCurrent(nextIndex);
}
return function jump(event) {
switch (event.which) {
case 78: // n
case 74: // j
goToNext();
break;
case 66: // b
case 75: // k
case 80: // p
goToPrevious();
break;
}
};
})();
window.addEventListener('keydown', jumpToCode);

BIN
node_modules/server/coverage/lcov-report/favicon.png generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

366
node_modules/server/coverage/lcov-report/index.html generated vendored Normal file
View File

@@ -0,0 +1,366 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for All files</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>All files</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">93.7% </span>
<span class="quiet">Statements</span>
<span class='fraction'>639/682</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">83.04% </span>
<span class="quiet">Branches</span>
<span class='fraction'>284/342</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">93.71% </span>
<span class="quiet">Functions</span>
<span class='fraction'>149/159</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">95.02% </span>
<span class="quiet">Lines</span>
<span class='fraction'>572/602</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="server-old"><a href="server-old/index.html">server-old</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="34" class="abs high">34/34</td>
<td data-value="87.5" class="pct high">87.5%</td>
<td data-value="8" class="abs high">7/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="27" class="abs high">27/27</td>
</tr>
<tr>
<td class="file high" data-value="server-old/error"><a href="server-old/error/index.html">server-old/error</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="18" class="abs high">18/18</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="16" class="abs high">16/16</td>
</tr>
<tr>
<td class="file high" data-value="server-old/plugins/compress"><a href="server-old/plugins/compress/index.html">server-old/plugins/compress</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
</tr>
<tr>
<td class="file high" data-value="server-old/plugins/express"><a href="server-old/plugins/express/index.html">server-old/plugins/express</a></td>
<td data-value="84" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 84%"></div><div class="cover-empty" style="width: 16%"></div></div>
</td>
<td data-value="84" class="pct high">84%</td>
<td data-value="25" class="abs high">21/25</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="8" class="abs medium">4/8</td>
<td data-value="87.5" class="pct high">87.5%</td>
<td data-value="8" class="abs high">7/8</td>
<td data-value="86.36" class="pct high">86.36%</td>
<td data-value="22" class="abs high">19/22</td>
</tr>
<tr>
<td class="file high" data-value="server-old/plugins/favicon"><a href="server-old/plugins/favicon/index.html">server-old/plugins/favicon</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
</tr>
<tr>
<td class="file high" data-value="server-old/plugins/final"><a href="server-old/plugins/final/index.html">server-old/plugins/final</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="23" class="abs high">23/23</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="15" class="abs high">15/15</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="21" class="abs high">21/21</td>
</tr>
<tr>
<td class="file high" data-value="server-old/plugins/log"><a href="server-old/plugins/log/index.html">server-old/plugins/log</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
</tr>
<tr>
<td class="file high" data-value="server-old/plugins/parser"><a href="server-old/plugins/parser/index.html">server-old/plugins/parser</a></td>
<td data-value="86.67" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 86%"></div><div class="cover-empty" style="width: 14%"></div></div>
</td>
<td data-value="86.67" class="pct high">86.67%</td>
<td data-value="30" class="abs high">26/30</td>
<td data-value="71.43" class="pct medium">71.43%</td>
<td data-value="14" class="abs medium">10/14</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="9" class="abs high">9/9</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="24" class="abs high">24/24</td>
</tr>
<tr>
<td class="file high" data-value="server-old/plugins/security"><a href="server-old/plugins/security/index.html">server-old/plugins/security</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="9" class="abs high">9/9</td>
<td data-value="62.5" class="pct medium">62.5%</td>
<td data-value="8" class="abs medium">5/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="9" class="abs high">9/9</td>
</tr>
<tr>
<td class="file high" data-value="server-old/plugins/session"><a href="server-old/plugins/session/index.html">server-old/plugins/session</a></td>
<td data-value="83.33" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 83%"></div><div class="cover-empty" style="width: 17%"></div></div>
</td>
<td data-value="83.33" class="pct high">83.33%</td>
<td data-value="12" class="abs high">10/12</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="6" class="abs medium">3/6</td>
<td data-value="75" class="pct medium">75%</td>
<td data-value="4" class="abs medium">3/4</td>
<td data-value="83.33" class="pct high">83.33%</td>
<td data-value="12" class="abs high">10/12</td>
</tr>
<tr>
<td class="file low" data-value="server-old/plugins/socket"><a href="server-old/plugins/socket/index.html">server-old/plugins/socket</a></td>
<td data-value="38.89" class="pic low">
<div class="chart"><div class="cover-fill" style="width: 38%"></div><div class="cover-empty" style="width: 62%"></div></div>
</td>
<td data-value="38.89" class="pct low">38.89%</td>
<td data-value="18" class="abs low">7/18</td>
<td data-value="12.5" class="pct low">12.5%</td>
<td data-value="8" class="abs low">1/8</td>
<td data-value="16.67" class="pct low">16.67%</td>
<td data-value="6" class="abs low">1/6</td>
<td data-value="41.18" class="pct low">41.18%</td>
<td data-value="17" class="abs low">7/17</td>
</tr>
<tr>
<td class="file high" data-value="server-old/plugins/static"><a href="server-old/plugins/static/index.html">server-old/plugins/static</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
</tr>
<tr>
<td class="file high" data-value="server-old/reply"><a href="server-old/reply/index.html">server-old/reply</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="131" class="abs high">131/131</td>
<td data-value="91.43" class="pct high">91.43%</td>
<td data-value="35" class="abs high">32/35</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="44" class="abs high">44/44</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="115" class="abs high">115/115</td>
</tr>
<tr>
<td class="file high" data-value="server-old/router"><a href="server-old/router/index.html">server-old/router</a></td>
<td data-value="97.59" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 97%"></div><div class="cover-empty" style="width: 3%"></div></div>
</td>
<td data-value="97.59" class="pct high">97.59%</td>
<td data-value="83" class="abs high">81/83</td>
<td data-value="90.63" class="pct high">90.63%</td>
<td data-value="32" class="abs high">29/32</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="17" class="abs high">17/17</td>
<td data-value="98.67" class="pct high">98.67%</td>
<td data-value="75" class="abs high">74/75</td>
</tr>
<tr>
<td class="file high" data-value="server-old/src/config"><a href="server-old/src/config/index.html">server-old/src/config</a></td>
<td data-value="90.08" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 90%"></div><div class="cover-empty" style="width: 10%"></div></div>
</td>
<td data-value="90.08" class="pct high">90.08%</td>
<td data-value="131" class="abs high">118/131</td>
<td data-value="83.2" class="pct high">83.2%</td>
<td data-value="125" class="abs high">104/125</td>
<td data-value="88.89" class="pct high">88.89%</td>
<td data-value="18" class="abs high">16/18</td>
<td data-value="92.17" class="pct high">92.17%</td>
<td data-value="115" class="abs high">106/115</td>
</tr>
<tr>
<td class="file high" data-value="server-old/src/join"><a href="server-old/src/join/index.html">server-old/src/join</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="23" class="abs high">23/23</td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="22" class="abs high">22/22</td>
</tr>
<tr>
<td class="file high" data-value="server-old/src/modern"><a href="server-old/src/modern/index.html">server-old/src/modern</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="34" class="abs high">34/34</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="14" class="abs high">14/14</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="9" class="abs high">9/9</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="30" class="abs high">30/30</td>
</tr>
<tr>
<td class="file high" data-value="server-old/test"><a href="server-old/test/index.html">server-old/test</a></td>
<td data-value="92.31" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 92%"></div><div class="cover-empty" style="width: 8%"></div></div>
</td>
<td data-value="92.31" class="pct high">92.31%</td>
<td data-value="91" class="abs high">84/91</td>
<td data-value="82.98" class="pct high">82.98%</td>
<td data-value="47" class="abs high">39/47</td>
<td data-value="94.44" class="pct high">94.44%</td>
<td data-value="18" class="abs high">17/18</td>
<td data-value="93.67" class="pct high">93.67%</td>
<td data-value="79" class="abs high">74/79</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1 @@
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}

2
node_modules/server/coverage/lcov-report/prettify.js generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/error</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> server-old/error</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>18/18</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>8/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>5/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>16/16</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="18" class="abs high">18/18</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="16" class="abs high">16/16</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,155 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/error/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/error</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>18/18</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>8/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>5/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>16/16</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">29x</span>
<span class="cline-any cline-yes">51x</span>
<span class="cline-any cline-yes">51x</span>
<span class="cline-any cline-yes">313x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">51x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">227x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">29x</span>
<span class="cline-any cline-yes">99x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">99x</span>
<span class="cline-any cline-yes">51x</span>
<span class="cline-any cline-yes">51x</span>
<span class="cline-any cline-yes">51x</span>
<span class="cline-any cline-yes">51x</span>
<span class="cline-any cline-yes">51x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">29x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">29x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const buildError = (message, opts) =&gt; {
const error = new Error(message);
for (const key in opts) {
error[key] = opts[key] instanceof Function ? opts[key](opts) : opts[key];
}
return error;
};
&nbsp;
const singleSlash = str =&gt; '/' + str.split('/').filter(one =&gt; one).join('/');
&nbsp;
const ErrorFactory = function (namespace = '', defaults = {}) {
defaults.namespace = defaults.namespace || namespace;
&nbsp;
return function ErrorInstance (code = '', options = {}) {
options = Object.assign({}, ErrorFactory.options, defaults, options);
options.code = singleSlash(options.namespace + '/' + code);
options.id = options.code.toLowerCase().replace(/[^\w]+/g, '-').replace(/^-/, '');
options.message = ErrorInstance[code];
return buildError(options.message, options);
};
};
&nbsp;
ErrorFactory.options = { status: 500 };
&nbsp;
module.exports = ErrorFactory;
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> server-old</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>34/34</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">87.5% </span>
<span class="quiet">Branches</span>
<span class='fraction'>7/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>8/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>27/27</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="server.js"><a href="server.js.html">server.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="34" class="abs high">34/34</td>
<td data-value="87.5" class="pct high">87.5%</td>
<td data-value="8" class="abs high">7/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="27" class="abs high">27/27</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/compress</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/plugins/compress</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>4/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>4/4</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,128 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/compress/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/plugins/compress</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>4/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>4/4</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">105x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const modern = require('../../src/modern');
const compress = require('compression');
&nbsp;
module.exports = {
name: 'compress',
options: {
__root: 'compress',
compress: {
default: {},
type: Object
}
},
&nbsp;
// The whole plugin won't be loaded if the option is false
before: ctx =&gt; modern(compress(ctx.options.compress))(ctx)
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/express</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/plugins/express</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">84% </span>
<span class="quiet">Statements</span>
<span class='fraction'>21/25</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Branches</span>
<span class='fraction'>4/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">87.5% </span>
<span class="quiet">Functions</span>
<span class='fraction'>7/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">86.36% </span>
<span class="quiet">Lines</span>
<span class='fraction'>19/22</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="84" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 84%"></div><div class="cover-empty" style="width: 16%"></div></div>
</td>
<td data-value="84" class="pct high">84%</td>
<td data-value="25" class="abs high">21/25</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="8" class="abs medium">4/8</td>
<td data-value="87.5" class="pct high">87.5%</td>
<td data-value="8" class="abs high">7/8</td>
<td data-value="86.36" class="pct high">86.36%</td>
<td data-value="22" class="abs high">19/22</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,284 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/express/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/plugins/express</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">84% </span>
<span class="quiet">Statements</span>
<span class='fraction'>21/25</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Branches</span>
<span class='fraction'>4/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">87.5% </span>
<span class="quiet">Functions</span>
<span class='fraction'>7/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">86.36% </span>
<span class="quiet">Lines</span>
<span class='fraction'>19/22</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">430x</span>
<span class="cline-any cline-yes">430x</span>
<span class="cline-any cline-yes">430x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const express = require('express');
&nbsp;
module.exports = {
name: 'express',
options: {
// See these in-depth in https://expressjs.com/en/api.html#app.set
'case sensitive routing': {},
'env': {
inherit: 'env'
},
'etag': {},
'jsonp callback name': {},
'json replacer': {},
'json spaces': {},
'query parser': {},
'strict routing': {},
'subdomain offset': {},
'trust proxy': {},
'views': {
default: 'views',
inherit: true,
type: String,
folder: true
},
'view cache': {},
'view engine': {
inherit: 'engine'
},
'x-powered-by': {}
},
init: ctx =&gt; {
ctx.express = express;
ctx.app = ctx.express();
&nbsp;
// Go through all of the options and set the right ones
for (let key in ctx.options.express) {
let value = ctx.options.express[key];
<span class="missing-if-branch" title="else path not taken" >E</span>if (typeof value !== 'undefined') {
ctx.app.set(key, value);
}
}
&nbsp;
// Accept HTML as a render extension
ctx.app.engine('html', require('hbs').__express);
&nbsp;
<span class="missing-if-branch" title="else path not taken" >E</span>if (ctx.options.engine) {
// If it's an object, expect a { engine: { engineName: engineFN } }
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof ctx.options.engine === 'object') {
<span class="cstat-no" title="statement not covered" > for (let name in ctx.options.engine) {</span>
<span class="cstat-no" title="statement not covered" > ctx.app.engine(name, ctx.options.engine[name]);</span>
<span class="cstat-no" title="statement not covered" > ctx.app.set('view engine', name);</span>
}
} else { // Simple case like { engine: 'pug' }
ctx.app.set('view engine', ctx.options.engine);
}
}
},
listen: ctx =&gt; new Promise((resolve, reject) =&gt; {
ctx.server = ctx.app.listen(ctx.options.port, () =&gt; {
ctx.log.debug(`Server started on http://localhost:${ctx.options.port}/`);
resolve();
});
ctx.close = () =&gt; new Promise((res, rej) =&gt; {
ctx.server.close(err =&gt; err ? <span class="branch-0 cbranch-no" title="branch not covered" >rej(err) </span>: res());
});
ctx.server.on('error', <span class="fstat-no" title="function not covered" >er</span>r =&gt; <span class="cstat-no" title="statement not covered" >reject(err))</span>;
})
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/favicon</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/plugins/favicon</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>6/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>5/5</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,143 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/favicon/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/plugins/favicon</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>6/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>5/5</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const modern = require('../../src/modern');
const favicon = require('serve-favicon');
&nbsp;
module.exports = {
name: 'favicon',
options: {
__root: 'location',
location: {
type: String,
file: true,
env: 'FAVICON'
}
},
&nbsp;
before: [
ctx =&gt; {
if (!ctx.options.favicon.location) return false;
return modern(favicon(ctx.options.favicon.location))(ctx);
}
]
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,200 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/final/errors.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/plugins/final</a> errors.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>5/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>4/4</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const error = require('../../error')('/plugin/final/');
&nbsp;
error.noreturn = ({ method, url }) =&gt; `
Your middleware did not return anything for this request:
&nbsp;
${method} ${url}
&nbsp;
This normally happens when no route was matched or if the router did not reply with anything. Make sure to return something, even if it's a catch-all error.
&nbsp;
Documentation for reply: https://serverjs.io/documentation/reply/
Relevant issue: https://github.com/franciscop/server/issues/118
`;
&nbsp;
error.unhandled = `
Some middleware threw an error that was not handled properly. This can happen when you do this:
&nbsp;
~~~
// BAD:
server(ctx =&gt; { throw new Error('I am an error!'); });
~~~
&nbsp;
To catch and handle these types of errors, add a route to the end of your middlewares to handle errors like this:
&nbsp;
~~~
// GOOD:
const { error } = server.router;
const { status } = server.reply;
&nbsp;
server(
ctx =&gt; { throw new Error('I am an error!'); },
// ...
error(ctx =&gt; status(500).send(ctx.error.message))
);
~~~
&nbsp;
Please feel free to open an issue in Github asking for more info:
https://github.com/franciscop/server
`;
&nbsp;
module.exports = error;
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,126 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/final</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/plugins/final</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>23/23</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>15/15</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>21/21</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="errors.js"><a href="errors.js.html">errors.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
</tr>
<tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="18" class="abs high">18/18</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="15" class="abs high">15/15</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="17" class="abs high">17/17</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,212 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/final/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/plugins/final</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>18/18</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>15/15</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>17/17</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">102x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// This file makes sure to clean up things in case there was something missing
// There are two reasons normally for this to happen: no reply was set or an
// unhandled error was thrown
const FinalError = require('./errors');
&nbsp;
// Make sure that a (404) reply is sent if there was no user reply
const handler = async ctx =&gt; {
if (!ctx.res.headersSent) {
// Send the user-set status
ctx.res.status(ctx.res.explicitStatus ? ctx.res.statusCode : 404).send();
&nbsp;
// Show it only if there was no status set in a return
if (!ctx.res.explicitStatus) {
ctx.log.error(
new FinalError('noreturn', { url: ctx.url, method: ctx.method })
);
}
}
};
&nbsp;
// Make sure there is a (500) reply if there was an unhandled error thrown
handler.error = ctx =&gt; {
const error = ctx.error;
ctx.log.warning(FinalError('unhandled'));
ctx.log.error(error);
if (!ctx.res.headersSent) {
let status = error.status || error.code || 500;
if (typeof status !== 'number') status = 500;
&nbsp;
// Display the error message if this error is marked as public
if (error.public) {
return ctx.res.status(status).send(error.message);
}
&nbsp;
// Otherwise just display the default error for that code
ctx.res.sendStatus(status);
}
};
&nbsp;
module.exports = {
name: 'final',
after: handler
};
// module.exports = handler;
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/log</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/plugins/log</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>5/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>5/5</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,179 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/log/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/plugins/log</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>5/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>5/5</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Log = require('log');
&nbsp;
const valid = [
'emergency',
'alert',
'critical',
'error',
'warning',
'notice',
'info',
'debug'
];
&nbsp;
// Log plugin
const plugin = {
name: 'log',
options: {
__root: 'level',
level: {
default: 'info',
type: String,
enum: valid
},
report: {
default: process.stdout
}
},
init: ctx =&gt; {
ctx.log = new Log(ctx.options.log.level, ctx.options.log.report);
}
};
&nbsp;
module.exports = plugin;
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/parser</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/plugins/parser</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">86.67% </span>
<span class="quiet">Statements</span>
<span class='fraction'>26/30</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">71.43% </span>
<span class="quiet">Branches</span>
<span class='fraction'>10/14</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>9/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>24/24</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="86.67" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 86%"></div><div class="cover-empty" style="width: 14%"></div></div>
</td>
<td data-value="86.67" class="pct high">86.67%</td>
<td data-value="30" class="abs high">26/30</td>
<td data-value="71.43" class="pct medium">71.43%</td>
<td data-value="14" class="abs medium">10/14</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="9" class="abs high">9/9</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="24" class="abs high">24/24</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,371 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/parser/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/plugins/parser</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">86.67% </span>
<span class="quiet">Statements</span>
<span class='fraction'>26/30</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">71.43% </span>
<span class="quiet">Branches</span>
<span class='fraction'>10/14</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>9/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>24/24</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-yes">426x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// Parser plugin
// Get the raw request and transform it into something usable
// Examples: ctx.body, ctx.files, etc
const join = require('../../src/join');
const modern = require('../../src/modern');
&nbsp;
const plugin = {
name: 'parser',
options: {
body: {
type: [Object, Boolean],
default: { extended: true },
extend: true
},
json: {
type: [Object, Boolean],
default: {}
},
text: {
type: Object,
default: {}
},
data: {
type: Object,
default: {}
},
cookie: {
type: Object,
default: {}
},
method: {
type: [Object, String, Boolean],
default: [
'X-HTTP-Method',
'X-HTTP-Method-Override',
'X-Method-Override',
'_method'
],
// Coerce it into an Array if it is not already
clean: value =&gt; typeof value === 'string' ? [value] : value
}
},
&nbsp;
// It is populated in "init()" right now:
before: [
ctx =&gt; {
<span class="missing-if-branch" title="if path not taken" >I</span>if (!ctx.options.parser.method) <span class="cstat-no" title="statement not covered" >return;</span>
return join(ctx.options.parser.method.map(one =&gt; {
return modern(require('method-override')(one));
}))(ctx);
},
&nbsp;
ctx =&gt; {
if (!ctx.options.parser.body) return;
const body = require('body-parser').urlencoded(ctx.options.parser.body);
return modern(body)(ctx);
},
&nbsp;
// JSON parser
ctx =&gt; {
if (!ctx.options.parser.json) return;
const json = require('body-parser').json(ctx.options.parser.json);
return modern(json)(ctx);
},
&nbsp;
// Text parser
ctx =&gt; {
<span class="missing-if-branch" title="if path not taken" >I</span>if (!ctx.options.parser.text) <span class="cstat-no" title="statement not covered" >return;</span>
const text = require('body-parser').text(ctx.options.parser.text);
return modern(text)(ctx);
},
&nbsp;
// Data parser
ctx =&gt; {
<span class="missing-if-branch" title="if path not taken" >I</span>if (!ctx.options.parser.data) <span class="cstat-no" title="statement not covered" >return;</span>
const data = require('express-data-parser')(ctx.options.parser.data);
return modern(data)(ctx);
},
&nbsp;
// Cookie parser
ctx =&gt; {
<span class="missing-if-branch" title="if path not taken" >I</span>if (!ctx.options.parser.cookie) <span class="cstat-no" title="statement not covered" >return;</span>
const cookie = require('cookie-parser')(
ctx.options.secret,
ctx.options.parser.cookie
);
return modern(cookie)(ctx);
},
&nbsp;
// Add a reference from ctx.req.body to the ctx.data and an alias
ctx =&gt; {
ctx.data = ctx.body;
},
]
};
&nbsp;
module.exports = plugin;
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/security</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/plugins/security</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>9/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">62.5% </span>
<span class="quiet">Branches</span>
<span class='fraction'>5/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>9/9</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="9" class="abs high">9/9</td>
<td data-value="62.5" class="pct medium">62.5%</td>
<td data-value="8" class="abs medium">5/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="9" class="abs high">9/9</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,269 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/security/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/plugins/security</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>9/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">62.5% </span>
<span class="quiet">Branches</span>
<span class='fraction'>5/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>9/9</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">78x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">78x</span>
<span class="cline-any cline-yes">78x</span>
<span class="cline-any cline-yes">78x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">78x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const modern = require('../../src/modern');
const csurf = require('csurf');
const helmet = require('helmet');
&nbsp;
module.exports = {
name: 'security',
options: {
csrf: {
env: 'SECURITY_CSRF',
default: {},
type: Object
},
contentSecurityPolicy: {
env: 'SECURITY_CONTENTSECURITYPOLICY'
},
expectCt: {
env: 'SECURITY_EXPECTCT'
},
dnsPrefetchControl: {
env: 'SECURITY_DNSPREFETCHCONTROL'
},
frameguard: {
env: 'SECURITY_FRAMEGUARD'
},
hidePoweredBy: {
env: 'SECURITY_HIDEPOWEREDBY'
},
hpkp: {
env: 'SECURITY_HPKP'
},
hsts: {
env: 'SECURITY_HSTS'
},
ieNoOpen: {
env: 'SECURITY_IENOOPEN'
},
noCache: {
env: 'SECURITY_NOCACHE'
},
noSniff: {
env: 'SECURITY_NOSNIFF'
},
referrerPolicy: {
env: 'SECURITY_REFERRERPOLICY'
},
xssFilter: {
env: 'SECURITY_XSSFILTER'
}
},
before: [
ctx =&gt; ctx.options.security &amp;&amp; ctx.options.security.csrf
? modern(csurf(ctx.options.security.csrf))(ctx)
: <span class="branch-1 cbranch-no" title="branch not covered" >false,</span>
ctx =&gt; {
// Set the csrf for render(): https://expressjs.com/en/api.html#res.locals
<span class="missing-if-branch" title="else path not taken" >E</span>if (ctx.req.csrfToken) {
ctx.csrf = ctx.req.csrfToken();
ctx.res.locals.csrf = ctx.csrf;
}
},
ctx =&gt; ctx.options.security ? modern(helmet(ctx.options.security))(ctx) : <span class="branch-1 cbranch-no" title="branch not covered" >false</span>
]
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/session</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/plugins/session</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">83.33% </span>
<span class="quiet">Statements</span>
<span class='fraction'>10/12</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Branches</span>
<span class='fraction'>3/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">75% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">83.33% </span>
<span class="quiet">Lines</span>
<span class='fraction'>10/12</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="83.33" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 83%"></div><div class="cover-empty" style="width: 17%"></div></div>
</td>
<td data-value="83.33" class="pct high">83.33%</td>
<td data-value="12" class="abs high">10/12</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="6" class="abs medium">3/6</td>
<td data-value="75" class="pct medium">75%</td>
<td data-value="4" class="abs medium">3/4</td>
<td data-value="83.33" class="pct high">83.33%</td>
<td data-value="12" class="abs high">10/12</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,227 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/session/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/plugins/session</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">83.33% </span>
<span class="quiet">Statements</span>
<span class='fraction'>10/12</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Branches</span>
<span class='fraction'>3/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">75% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">83.33% </span>
<span class="quiet">Lines</span>
<span class='fraction'>10/12</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const modern = require('../../src/modern');
const server = require('../../server');
const session = require('express-session');
server.session = session;
const RedisStore = require('connect-redis')(server.session);
let sessionMiddleware;
&nbsp;
module.exports = {
name: 'session',
options: {
__root: 'secret',
resave: {
default: false
},
saveUninitialized: {
default: true
},
cookie: {
default: {}
},
secret: {
type: String,
inherit: 'secret',
env: 'SESSION_SECRET'
},
store: {
env: false
},
redis: {
type: String,
inherit: true,
env: 'REDIS_URL'
}
},
init: ctx =&gt; {
<span class="missing-if-branch" title="if path not taken" >I</span>if (!ctx.options.session.store &amp;&amp; ctx.options.session.redis) {
<span class="cstat-no" title="statement not covered" > ctx.options.session.store = new RedisStore({</span>
url: ctx.options.session.redis
});
}
sessionMiddleware = session(ctx.options.session);
},
before: ctx =&gt; modern(sessionMiddleware)(ctx),
launch: ctx =&gt; {
ctx.io.use(<span class="fstat-no" title="function not covered" >fu</span>nction(socket, next) {
<span class="cstat-no" title="statement not covered" > sessionMiddleware(socket.request, socket.request.res || {}, next);</span>
});
}
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/socket</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/plugins/socket</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">38.89% </span>
<span class="quiet">Statements</span>
<span class='fraction'>7/18</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">12.5% </span>
<span class="quiet">Branches</span>
<span class='fraction'>1/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">16.67% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">41.18% </span>
<span class="quiet">Lines</span>
<span class='fraction'>7/17</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line low'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file low" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="38.89" class="pic low">
<div class="chart"><div class="cover-fill" style="width: 38%"></div><div class="cover-empty" style="width: 62%"></div></div>
</td>
<td data-value="38.89" class="pct low">38.89%</td>
<td data-value="18" class="abs low">7/18</td>
<td data-value="12.5" class="pct low">12.5%</td>
<td data-value="8" class="abs low">1/8</td>
<td data-value="16.67" class="pct low">16.67%</td>
<td data-value="6" class="abs low">1/6</td>
<td data-value="41.18" class="pct low">41.18%</td>
<td data-value="17" class="abs low">7/17</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,248 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/socket/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/plugins/socket</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">38.89% </span>
<span class="quiet">Statements</span>
<span class='fraction'>7/18</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">12.5% </span>
<span class="quiet">Branches</span>
<span class='fraction'>1/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">16.67% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">41.18% </span>
<span class="quiet">Lines</span>
<span class='fraction'>7/17</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// Create a socket plugin
const socketIO = require('socket.io');
const extend = require('extend');
&nbsp;
const listeners = {};
&nbsp;
module.exports = {
name: 'socket',
options: {
path: {
env: 'SOCKET_PATH'
},
serveClient: {},
adapter: {},
origins: {},
parser: {},
pingTimeout: {},
pingInterval: {},
upgradeTimeout: {},
maxHttpBufferSize: {},
allowRequest: {},
transports: {},
allowUpgrades: {},
perMessageDeflate: {},
httpCompression: {},
cookie: {},
cookiePath: {},
cookieHttpOnly: {},
wsEngine: {}
},
router: <span class="fstat-no" title="function not covered" >(p</span>ath, middle) =&gt; {
<span class="cstat-no" title="statement not covered" > listeners[path] = listeners[path] || [];</span>
<span class="cstat-no" title="statement not covered" > listeners[path].push(middle);</span>
},
launch: ctx =&gt; {
<span class="missing-if-branch" title="if path not taken" >I</span>if (!ctx.options.socket) <span class="cstat-no" title="statement not covered" >return;</span>
ctx.io = socketIO(ctx.server, ctx.options.socket);
ctx.io.on('connect', <span class="fstat-no" title="function not covered" >so</span>cket =&gt; {
// console.log(socket.client.request.session);
<span class="cstat-no" title="statement not covered" > for (let path in listeners) {</span>
<span class="cstat-no" title="statement not covered" > if (path !== 'connect') {</span>
<span class="cstat-no" title="statement not covered" > listeners[path].forEach(<span class="fstat-no" title="function not covered" >cb</span> =&gt; {</span>
<span class="cstat-no" title="statement not covered" > socket.on(path, <span class="fstat-no" title="function not covered" >da</span>ta =&gt; {</span>
<span class="cstat-no" title="statement not covered" > cb(extend(socket.client.request, ctx, { path, socket, data }));</span>
});
});
}
}
<span class="cstat-no" title="statement not covered" > if (listeners['connect']) {</span>
<span class="cstat-no" title="statement not covered" > listeners['connect'].forEach(<span class="fstat-no" title="function not covered" >cb</span> =&gt; {</span>
<span class="cstat-no" title="statement not covered" > cb(extend(socket.client.request, ctx, { path: 'connect', socket }));</span>
});
}
});
}
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/static</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/plugins/static</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>5/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>4/4</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,137 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/plugins/static/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/plugins/static</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>5/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>4/4</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">105x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const modern = require('../../src/modern');
&nbsp;
module.exports = {
name: 'static',
options: {
__root: 'public',
public: {
type: String,
inherit: 'public',
env: false
}
},
init: ctx =&gt; {
if (!ctx.options.static.public) return;
module.exports.before = [
modern(ctx.express.static(ctx.options.static.public))
];
}
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/cookie.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> cookie.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('cookie', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/download.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> download.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('download', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/end.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> end.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('end', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/file.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> file.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('file', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/header.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> header.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('header', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,306 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> server-old/reply</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>131/131</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">91.43% </span>
<span class="quiet">Branches</span>
<span class='fraction'>32/35</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>44/44</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>115/115</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="cookie.js"><a href="cookie.js.html">cookie.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
<tr>
<td class="file high" data-value="download.js"><a href="download.js.html">download.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
<tr>
<td class="file high" data-value="end.js"><a href="end.js.html">end.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
<tr>
<td class="file high" data-value="file.js"><a href="file.js.html">file.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
<tr>
<td class="file high" data-value="header.js"><a href="header.js.html">header.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
<tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
</tr>
<tr>
<td class="file high" data-value="json.js"><a href="json.js.html">json.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
<tr>
<td class="file high" data-value="jsonp.js"><a href="jsonp.js.html">jsonp.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
<tr>
<td class="file high" data-value="redirect.js"><a href="redirect.js.html">redirect.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
<tr>
<td class="file high" data-value="render.js"><a href="render.js.html">render.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
<tr>
<td class="file high" data-value="reply.js"><a href="reply.js.html">reply.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="94" class="abs high">94/94</td>
<td data-value="91.43" class="pct high">91.43%</td>
<td data-value="35" class="abs high">32/35</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="32" class="abs high">32/32</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="90" class="abs high">90/90</td>
</tr>
<tr>
<td class="file high" data-value="send.js"><a href="send.js.html">send.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
<tr>
<td class="file high" data-value="status.js"><a href="status.js.html">status.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
<tr>
<td class="file high" data-value="type.js"><a href="type.js.html">type.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,122 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>1/1</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = {
cookie: require('./cookie' ),
download: require('./download'),
end: require('./end' ),
file: require('./file' ),
header: require('./header' ),
json: require('./json' ),
jsonp: require('./jsonp' ),
redirect: require('./redirect'),
render: require('./render' ),
send: require('./send' ),
status: require('./status' ),
type: require('./type' )
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/json.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> json.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('json', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/jsonp.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> jsonp.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('jsonp', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/redirect.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> redirect.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('redirect', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/render.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> render.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('render', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,623 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/reply.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> reply.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>94/94</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">91.43% </span>
<span class="quiet">Branches</span>
<span class='fraction'>32/35</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>32/32</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>90/90</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a>
<a name='L125'></a><a href='#L125'>125</a>
<a name='L126'></a><a href='#L126'>126</a>
<a name='L127'></a><a href='#L127'>127</a>
<a name='L128'></a><a href='#L128'>128</a>
<a name='L129'></a><a href='#L129'>129</a>
<a name='L130'></a><a href='#L130'>130</a>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a>
<a name='L133'></a><a href='#L133'>133</a>
<a name='L134'></a><a href='#L134'>134</a>
<a name='L135'></a><a href='#L135'>135</a>
<a name='L136'></a><a href='#L136'>136</a>
<a name='L137'></a><a href='#L137'>137</a>
<a name='L138'></a><a href='#L138'>138</a>
<a name='L139'></a><a href='#L139'>139</a>
<a name='L140'></a><a href='#L140'>140</a>
<a name='L141'></a><a href='#L141'>141</a>
<a name='L142'></a><a href='#L142'>142</a>
<a name='L143'></a><a href='#L143'>143</a>
<a name='L144'></a><a href='#L144'>144</a>
<a name='L145'></a><a href='#L145'>145</a>
<a name='L146'></a><a href='#L146'>146</a>
<a name='L147'></a><a href='#L147'>147</a>
<a name='L148'></a><a href='#L148'>148</a>
<a name='L149'></a><a href='#L149'>149</a>
<a name='L150'></a><a href='#L150'>150</a>
<a name='L151'></a><a href='#L151'>151</a>
<a name='L152'></a><a href='#L152'>152</a>
<a name='L153'></a><a href='#L153'>153</a>
<a name='L154'></a><a href='#L154'>154</a>
<a name='L155'></a><a href='#L155'>155</a>
<a name='L156'></a><a href='#L156'>156</a>
<a name='L157'></a><a href='#L157'>157</a>
<a name='L158'></a><a href='#L158'>158</a>
<a name='L159'></a><a href='#L159'>159</a>
<a name='L160'></a><a href='#L160'>160</a>
<a name='L161'></a><a href='#L161'>161</a>
<a name='L162'></a><a href='#L162'>162</a>
<a name='L163'></a><a href='#L163'>163</a>
<a name='L164'></a><a href='#L164'>164</a>
<a name='L165'></a><a href='#L165'>165</a>
<a name='L166'></a><a href='#L166'>166</a>
<a name='L167'></a><a href='#L167'>167</a>
<a name='L168'></a><a href='#L168'>168</a>
<a name='L169'></a><a href='#L169'>169</a>
<a name='L170'></a><a href='#L170'>170</a>
<a name='L171'></a><a href='#L171'>171</a>
<a name='L172'></a><a href='#L172'>172</a>
<a name='L173'></a><a href='#L173'>173</a>
<a name='L174'></a><a href='#L174'>174</a>
<a name='L175'></a><a href='#L175'>175</a>
<a name='L176'></a><a href='#L176'>176</a>
<a name='L177'></a><a href='#L177'>177</a>
<a name='L178'></a><a href='#L178'>178</a>
<a name='L179'></a><a href='#L179'>179</a>
<a name='L180'></a><a href='#L180'>180</a>
<a name='L181'></a><a href='#L181'>181</a>
<a name='L182'></a><a href='#L182'>182</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">115x</span>
<span class="cline-any cline-yes">115x</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">9x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">84x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">83x</span>
<span class="cline-any cline-yes">83x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">83x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">18x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">103x</span>
<span class="cline-any cline-yes">119x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">99x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const path = require('path');
const fs = require('mz/fs');
&nbsp;
&nbsp;
const Reply = function (name, ...args) {
this.stack = [];
this[name](...args);
return this;
};
&nbsp;
&nbsp;
&nbsp;
Reply.prototype.cookie = function (...args) {
this.stack.push(ctx =&gt; {
ctx.res.cookie(...args);
});
return this;
};
&nbsp;
&nbsp;
&nbsp;
Reply.prototype.download = function (...args) {
&nbsp;
// Guard clauses
if (args.length &lt; 1) {
throw new Error('download() expects a path as the first argument');
}
&nbsp;
if (args.length &lt; 2) {
throw new Error('download() expects a filename as the second argument');
}
&nbsp;
if (args.length &gt; 2) {
throw new Error('download() only expects two arguments, path and filename. The rest of them will be ignored');
}
&nbsp;
let [file, opts] = args;
if (!path.isAbsolute(file)) {
file = path.resolve(process.cwd(), file);
}
&nbsp;
this.stack.push(async ctx =&gt; {
if (!await fs.exists(file)) {
throw new Error(`The file "${file}" does not exist. Make sure that you set an absolute path or a relative path to the root of your project`);
}
return new Promise((resolve, reject) =&gt; {
ctx.res.download(file, opts, err =&gt; err ? <span class="branch-0 cbranch-no" title="branch not covered" >reject(err) </span>: resolve());
});
});
&nbsp;
return this;
};
&nbsp;
&nbsp;
&nbsp;
Reply.prototype.end = function () {
this.stack.push(ctx =&gt; {
ctx.res.end();
});
return this;
};
&nbsp;
&nbsp;
&nbsp;
Reply.prototype.file = function (...args) {
&nbsp;
// Guard clauses
if (args.length &lt; 1) {
throw new Error('file() expects a path as the first argument');
}
&nbsp;
if (args.length &gt; 2) {
throw new Error(`file() only expects two arguments, the path and options, but ${args.length} were provided.`);
}
&nbsp;
let [file, opts = {}] = args;
if (!path.isAbsolute(file)) {
file = path.resolve(process.cwd(), file);
}
&nbsp;
this.stack.push(async ctx =&gt; {
if (!await fs.exists(file)) {
throw new Error(`The file "${file}" does not exist. Make sure that you set an absolute path or a relative path to the root of your project`);
}
return new Promise((resolve, reject) =&gt; {
ctx.res.sendFile(file, opts, err =&gt; err ? <span class="branch-0 cbranch-no" title="branch not covered" >reject(err) </span>: resolve());
});
});
&nbsp;
return this;
};
&nbsp;
&nbsp;
&nbsp;
Reply.prototype.header = function (...args) {
this.stack.push(ctx =&gt; {
ctx.res.header(...args);
});
return this;
};
&nbsp;
Reply.prototype.json = function (...args) {
this.stack.push(ctx =&gt; {
ctx.res.json(...args);
});
return this;
};
&nbsp;
Reply.prototype.jsonp = function (...args) {
this.stack.push(ctx =&gt; {
ctx.res.jsonp(...args);
});
return this;
};
&nbsp;
Reply.prototype.redirect = function (...args) {
this.stack.push(ctx =&gt; {
ctx.res.redirect(...args);
});
return this;
};
&nbsp;
Reply.prototype.render = function (...args) {
&nbsp;
// Guard clauses
if (args.length &lt; 1) {
throw new Error('file() expects a path');
}
&nbsp;
if (args.length &gt; 2) {
throw new Error('file() expects a path and options but nothing else');
}
&nbsp;
let [file, opts = {}] = args;
&nbsp;
this.stack.push(ctx =&gt; new Promise((resolve, reject) =&gt; {
// Note: if callback is provided, it does not send() automatically
const cb = (err, html) =&gt; err ? <span class="branch-0 cbranch-no" title="branch not covered" >reject(err) </span>: resolve(ctx.res.send(html));
ctx.res.render(file, opts, cb);
}));
return this;
};
&nbsp;
Reply.prototype.send = function (...args) {
&nbsp;
// If we are trying to send the context
if (args[0] &amp;&amp; args[0].close &amp;&amp; args[0].close instanceof Function) {
throw new Error('Never send the context, request or response as those are a security risk');
}
&nbsp;
this.stack.push(ctx =&gt; {
ctx.res.send(...args);
});
return this;
};
&nbsp;
Reply.prototype.status = function (...args) {
this.stack.push(ctx =&gt; {
// In case there is no response, it'll respond with the status
ctx.res.explicitStatus = true;
ctx.res.status(...args);
});
return this;
};
&nbsp;
Reply.prototype.type = function (...args) {
this.stack.push(ctx =&gt; {
ctx.res.type(...args);
});
return this;
};
&nbsp;
Reply.prototype.exec = async function (ctx) {
for (let cb of this.stack) {
await cb(ctx);
}
this.stack = [];
};
&nbsp;
// This will make that the first time a function is called it starts a new stack
module.exports = Reply;
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/send.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> send.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">71x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('send', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/status.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> status.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('status', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/reply/type.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/reply</a> type.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>2/2</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Reply = require('./reply');
&nbsp;
module.exports = (...args) =&gt; new Reply('type', ...args);
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,101 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router/del.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/router</a> del.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>3/3</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// Import the generic REST handler
const generic = require('./generic');
&nbsp;
// Defined the actual method
module.exports = (...middle) =&gt; {
return generic('DELETE', ...middle);
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,155 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router/error.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/router</a> error.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">93.75% </span>
<span class="quiet">Statements</span>
<span class='fraction'>15/16</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">75% </span>
<span class="quiet">Branches</span>
<span class='fraction'>6/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>15/15</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const join = require('../src/join');
const parse = require('./parse');
const params = require('./path-to-regexp-wrap')();
&nbsp;
module.exports = (...all) =&gt; {
// Extracted or otherwise it'd shift once per call; also more performant
const { path, middle } = parse(all);
const match = params(path || <span class="branch-1 cbranch-no" title="branch not covered" >'')</span>;
&nbsp;
const generic = () =&gt; {};
generic.error = async ctx =&gt; {
&nbsp;
// Only do this if the correct path
ctx.error.code = ctx.error.code || '';
ctx.error.params = match(ctx.error.code);
&nbsp;
// Add an extra-allowing initial matching
<span class="missing-if-branch" title="if path not taken" >I</span>if (!ctx.error.params &amp;&amp; ctx.error.code.slice(0, path.length) !== path) <span class="cstat-no" title="statement not covered" >return;</span>
&nbsp;
const ret = await middle[0](ctx);
delete ctx.error;
return ret;
};
return generic;
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,104 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router/errors.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/router</a> errors.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>5/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>4/4</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// YOU MIGHT BE LOOKING FOR 'error.js' (without the "s")
&nbsp;
const error = require('../error')('/server/test/');
&nbsp;
error.router = 'This is a demo error';
error.simplerouter = ({ text }) =&gt; `Simple message: ${text}`;
&nbsp;
module.exports = error;
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,173 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router/generic.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/router</a> generic.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>17/17</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">87.5% </span>
<span class="quiet">Branches</span>
<span class='fraction'>7/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>14/14</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">36x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">36x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">36x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">43x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">36x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">32x</span>
<span class="cline-any cline-yes">32x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const join = require('../src/join');
const parse = require('./parse');
const params = require('./path-to-regexp-wrap')();
&nbsp;
// Generic request handler
module.exports = (method, ...all) =&gt; {
&nbsp;
// Extracted or otherwise it'd shift once per call; also more performant
const { path, middle } = parse(all);
&nbsp;
const match = params(path || <span class="branch-1 cbranch-no" title="branch not covered" >'')</span>;
&nbsp;
return async ctx =&gt; {
&nbsp;
// A route should be solved only once per request
if (ctx.req.solved) return;
&nbsp;
// Only for the correct method
if (method !== ctx.req.method) return;
&nbsp;
// Only do this if the correct path
ctx.req.params = match(ctx.req.path);
if (!ctx.req.params) return;
ctx.params = ctx.req.params;
&nbsp;
// Perform this promise chain
await join(middle)(ctx);
&nbsp;
ctx.req.solved = true;
};
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,101 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router/get.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/router</a> get.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>3/3</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">29x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// Import the generic REST handler
const generic = require('./generic');
&nbsp;
// Defined the actual method
module.exports = (...middle) =&gt; {
return generic('GET', ...middle);
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,261 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> server-old/router</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">97.59% </span>
<span class="quiet">Statements</span>
<span class='fraction'>81/83</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90.63% </span>
<span class="quiet">Branches</span>
<span class='fraction'>29/32</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>17/17</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">98.67% </span>
<span class="quiet">Lines</span>
<span class='fraction'>74/75</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="del.js"><a href="del.js.html">del.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
</tr>
<tr>
<td class="file high" data-value="error.js"><a href="error.js.html">error.js</a></td>
<td data-value="93.75" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 93%"></div><div class="cover-empty" style="width: 7%"></div></div>
</td>
<td data-value="93.75" class="pct high">93.75%</td>
<td data-value="16" class="abs high">15/16</td>
<td data-value="75" class="pct medium">75%</td>
<td data-value="8" class="abs medium">6/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="15" class="abs high">15/15</td>
</tr>
<tr>
<td class="file high" data-value="errors.js"><a href="errors.js.html">errors.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="5" class="abs high">5/5</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
</tr>
<tr>
<td class="file high" data-value="generic.js"><a href="generic.js.html">generic.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="17" class="abs high">17/17</td>
<td data-value="87.5" class="pct high">87.5%</td>
<td data-value="8" class="abs high">7/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="14" class="abs high">14/14</td>
</tr>
<tr>
<td class="file high" data-value="get.js"><a href="get.js.html">get.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
</tr>
<tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
</tr>
<tr>
<td class="file high" data-value="parse.js"><a href="parse.js.html">parse.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
</tr>
<tr>
<td class="file high" data-value="path-to-regexp-wrap.js"><a href="path-to-regexp-wrap.js.html">path-to-regexp-wrap.js</a></td>
<td data-value="95.45" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 95%"></div><div class="cover-empty" style="width: 5%"></div></div>
</td>
<td data-value="95.45" class="pct high">95.45%</td>
<td data-value="22" class="abs high">21/22</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="95" class="pct high">95%</td>
<td data-value="20" class="abs high">19/20</td>
</tr>
<tr>
<td class="file high" data-value="post.js"><a href="post.js.html">post.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
</tr>
<tr>
<td class="file high" data-value="put.js"><a href="put.js.html">put.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
</tr>
<tr>
<td class="file high" data-value="sub.js"><a href="sub.js.html">sub.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="7" class="abs high">7/7</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,143 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/router</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>1/1</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// Define the router methods that are available to use as middleware
// Each of these is available through:
// const { get } = require('server').router;
// const { get } = require('server/router');
// const get = require('server/router/get');
&nbsp;
// Perform the routing required
module.exports = {
&nbsp;
// REST
get : require('./get'),
post : require('./post'),
put : require('./put'),
del : require('./del'),
&nbsp;
// Special cases
sub : require('./sub'),
error : require('./error'),
join : require('../src/join'),
socket : require('../plugins/socket').router
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,95 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router/parse.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/router</a> parse.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>3/3</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">143x</span>
<span class="cline-any cline-yes">143x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// Parse the request parameters
module.exports = middle =&gt; {
const path = typeof middle[0] === 'string' ? middle.shift() : '*';
return { path, middle };
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,251 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router/path-to-regexp-wrap.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/router</a> path-to-regexp-wrap.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">95.45% </span>
<span class="quiet">Statements</span>
<span class='fraction'>21/22</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>8/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>4/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">95% </span>
<span class="quiet">Lines</span>
<span class='fraction'>19/20</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">52x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">52x</span>
<span class="cline-any cline-yes">143x</span>
<span class="cline-any cline-yes">143x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">143x</span>
<span class="cline-any cline-yes">52x</span>
<span class="cline-any cline-yes">52x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">52x</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">46x</span>
<span class="cline-any cline-yes">20x</span>
<span class="cline-any cline-yes">12x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">46x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// This comes from https://github.com/teologov/path-to-regexp-wrap
// because of this bug: https://github.com/franciscop/server/issues/43
&nbsp;
/**
* Path to regexp lib wrapper
* @author Andrey Teologov &lt;teologov.and@gmail.com&gt;
* @date 16.04.14
*/
&nbsp;
"use strict";
&nbsp;
const path = require('path-to-regexp');
&nbsp;
/**
* Routes lib
* @type {exports}
*/
module.exports = function(options) {
options = options || {};
&nbsp;
/**
* String decoder
* @param {String} str
* @returns {*}
*/
function decodeUri(str) {
try {
str = decodeURIComponent(str);
} catch(e) {
<span class="cstat-no" title="statement not covered" > throw new Error(`Cannot decodeURIComponent: ${str}` );</span>
}
return str;
}
&nbsp;
return function(route) {
const keys = [];
const reg = path.apply(this, [route, keys, options]);
&nbsp;
return function(route, config) {
const res = reg.exec(route);
const params = config || {};
&nbsp;
if (!res) {
return false;
}
&nbsp;
for (let i = 1, l = res.length; i &lt; l; i++) {
if (!res[i]) {
continue;
}
params[keys[i - 1].name] = decodeUri(res[i]);
}
&nbsp;
return params;
}
}
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,101 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router/post.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/router</a> post.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>3/3</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// Import the generic REST handler
const generic = require('./generic');
&nbsp;
// Defined the actual method
module.exports = (...middle) =&gt; {
return generic('POST', ...middle);
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,101 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router/put.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/router</a> put.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>3/3</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// Import the generic REST handler
const generic = require('./generic');
&nbsp;
// Defined the actual method
module.exports = (...middle) =&gt; {
return generic('PUT', ...middle);
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,110 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/router/sub.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../index.html">All files</a> / <a href="index.html">server-old/router</a> sub.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>7/7</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>6/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>6/6</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const join = require('../src/join');
&nbsp;
module.exports = (path, ...middle) =&gt; async ctx =&gt; {
const full = ctx.req.subdomains.reverse().join('.');
if ((typeof path === 'string' &amp;&amp; path === full) ||
(path instanceof RegExp &amp;&amp; path.test(full))) {
await join(middle)(ctx);
ctx.req.solved = true;
}
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,347 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/server.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">server-old</a> server.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>34/34</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">87.5% </span>
<span class="quiet">Branches</span>
<span class='fraction'>7/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>8/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>27/27</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">5160x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">107x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1060x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">424x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">108x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-yes">212x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">26x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// server for Node.js (https://serverjs.io/)
// A simple and powerful server for Node.js.
&nbsp;
// Internal modules
const config = require('./src/config');
const router = require('./router');
const reply = require('./reply');
const join = require('./src/join/index.js');
const modern = require('./src/modern');
&nbsp;
// Create a context per-request
const context = (self, req, res) =&gt; Object.assign(req, self, { req, res });
&nbsp;
// Get the functions from the plugins for a special point
const hook = (ctx, name) =&gt; ctx.plugins.map(p =&gt; p[name]).filter(p =&gt; p);
&nbsp;
&nbsp;
&nbsp;
// Main function
const Server = async (...middle) =&gt; {
&nbsp;
// Initialize the global context
const ctx = {};
&nbsp;
// First parameter can be:
// - options: Number || Object (cannot be ID'd)
// - middleware: undefined || null || Boolean || Function || Array
const opts = (
typeof middle[0] === 'undefined' ||
typeof middle[0] === 'boolean' ||
typeof middle[0] === 'string' ||
middle[0] === null ||
middle[0] instanceof Function ||
middle[0] instanceof Array
) ? <span class="branch-0 cbranch-no" title="branch not covered" >{} </span>: middle.shift();
&nbsp;
// Set the options for the context of Server.js
ctx.options = await config(opts, module.exports.plugins);
&nbsp;
// Only enabled plugins through the config
ctx.plugins = module.exports.plugins.filter(p =&gt; ctx.options[p.name]);
&nbsp;
ctx.utils = { modern: modern };
ctx.modern = modern;
&nbsp;
// All the init beforehand
for (let init of hook(ctx, 'init')) {
await init(ctx);
}
&nbsp;
&nbsp;
&nbsp;
// PLUGIN middleware
ctx.middle = join(hook(ctx, 'before'), middle, hook(ctx, 'after'));
&nbsp;
// Main thing here
ctx.app.use((req, res) =&gt; ctx.middle(context(ctx, req, res)));
&nbsp;
&nbsp;
&nbsp;
// Different listening methods
await Promise.all(hook(ctx, 'listen').map(listen =&gt; listen(ctx)));
&nbsp;
// After launching it (already proxified)
for (let launch of hook(ctx, 'launch')) {
await launch(ctx);
}
&nbsp;
return ctx;
};
&nbsp;
module.exports = Server;
module.exports.router = router;
module.exports.reply = reply;
module.exports.utils = {
modern: modern
};
module.exports.plugins = [
require('./plugins/log'),
require('./plugins/express'),
require('./plugins/parser'),
require('./plugins/static'),
require('./plugins/socket'),
require('./plugins/session'),
require('./plugins/security'),
require('./plugins/favicon'),
require('./plugins/compress'),
require('./plugins/final')
];
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,167 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/config/env.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/src/config</a> env.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">95.65% </span>
<span class="quiet">Statements</span>
<span class='fraction'>22/23</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">91.67% </span>
<span class="quiet">Branches</span>
<span class='fraction'>11/12</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>4/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>18/18</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">4752x</span>
<span class="cline-any cline-yes">4158x</span>
<span class="cline-any cline-yes">3618x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">6372x</span>
<span class="cline-any cline-yes">4752x</span>
<span class="cline-any cline-yes">4752x</span>
<span class="cline-any cline-yes">4158x</span>
<span class="cline-any cline-yes">3618x</span>
<span class="cline-any cline-yes">3618x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3564x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">6372x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// Load them from the environment file if any
require('dotenv').config({ silent: true });
&nbsp;
// Check if a variable is numeric even if string
const is = {
numeric: num =&gt; !isNaN(num),
boolean: bool =&gt; /^(true|false)$/i.test(bool),
json: str =&gt; /^[{[]/.test(str) &amp;&amp; /[}\]]$/.test(str)
};
&nbsp;
const type = str =&gt; {
if (!str) return;
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof str !== 'string') <span class="cstat-no" title="statement not covered" >return str;</span>
if (is.numeric(str)) return +str;
if (is.boolean(str)) return /true/i.test(str);
try {
if (is.json(str)) return JSON.parse(str);
} catch (err) {
return str;
}
return str;
};
&nbsp;
const env = {};
for (let key in process.env) {
env[key] = type(process.env[key]);
}
&nbsp;
module.exports = env;
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,269 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/config/errors.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/src/config</a> errors.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">90% </span>
<span class="quiet">Statements</span>
<span class='fraction'>18/20</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">75% </span>
<span class="quiet">Functions</span>
<span class='fraction'>6/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>13/13</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const error = require('../../error')('/server/options', {
url: ({ id }) =&gt; `https://serverjs.io/documentation/errors/#${id}`
});
&nbsp;
error.notobject = `
Your options must be an object as required by the options definition.
If you are a developer and want to accept a single option, make sure
to use the '__root' property.
`;
&nbsp;
error.noarg = ({ name }) =&gt; `
The option '${name}' cannot be passed through the arguments of server. This
might be because it's sensitive and it has to be set in the environment.
Please read the documentation for '${name}' and make sure to set it correctly.
`;
&nbsp;
error.noenv = <span class="fstat-no" title="function not covered" >({</span> name }) =&gt; <span class="cstat-no" title="statement not covered" >`</span>
The option '${name}' cannot be passed through the environment of server.
Please read the documentation for '${name}' and make sure to set it correctly.
`;
&nbsp;
error.cannotextend = <span class="fstat-no" title="function not covered" >({</span> type, name }) =&gt; <span class="cstat-no" title="statement not covered" >`</span>
The option "${name}" must be an object but it received "${type}".
Please check your options to make sure you are passing an object.
${type === 'undefined' ? `
If you are the creator of the plugin and you are receiving 'undefined', you
could allow for the default behaviour to be an empty object 'default: {}'
` : ''}
`;
&nbsp;
error.required = ({ name }) =&gt; `
The option '${name}' is required but it was not set neither as an argument nor
in the environment. Please make sure to set it.
`;
&nbsp;
error.type = ({ name, expected, received, value }) =&gt; `
The option '${name}' should be a '[${typeof expected}]' but you passed a '${received}':
${JSON.stringify(value)}
`;
&nbsp;
error.enum = ({ name, value, possible }) =&gt; `
The option '${name}' has a value of '${value}' but it should have one of these values:
${JSON.stringify(possible)}
`;
&nbsp;
error.validate = ({ name, value }) =&gt; `
Failed to validate the option '${name}' with the value '${value}'. Please
consult this option documentation for more information.
`;
&nbsp;
error.secretexample = `
It looks like you are trying to use 'your-random-string-here' as the secret,
just as in the documentation. Please don't do this! Create a strong secret
and store it in your '.env'.
`;
&nbsp;
error.secretgenerated = `
Please change the secret in your environment configuration.
The default one is not recommended and should be changed.
More info in https://serverjs.io/errors#defaultSecret
`;
&nbsp;
module.exports = error;
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,171 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/config</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/src/config</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">90.08% </span>
<span class="quiet">Statements</span>
<span class='fraction'>118/131</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">83.2% </span>
<span class="quiet">Branches</span>
<span class='fraction'>104/125</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">88.89% </span>
<span class="quiet">Functions</span>
<span class='fraction'>16/18</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">92.17% </span>
<span class="quiet">Lines</span>
<span class='fraction'>106/115</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="env.js"><a href="env.js.html">env.js</a></td>
<td data-value="95.65" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 95%"></div><div class="cover-empty" style="width: 5%"></div></div>
</td>
<td data-value="95.65" class="pct high">95.65%</td>
<td data-value="23" class="abs high">22/23</td>
<td data-value="91.67" class="pct high">91.67%</td>
<td data-value="12" class="abs high">11/12</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="18" class="abs high">18/18</td>
</tr>
<tr>
<td class="file high" data-value="errors.js"><a href="errors.js.html">errors.js</a></td>
<td data-value="90" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 90%"></div><div class="cover-empty" style="width: 10%"></div></div>
</td>
<td data-value="90" class="pct high">90%</td>
<td data-value="20" class="abs high">18/20</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="2" class="abs low">0/2</td>
<td data-value="75" class="pct medium">75%</td>
<td data-value="8" class="abs medium">6/8</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="13" class="abs high">13/13</td>
</tr>
<tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
<td data-value="75" class="pct medium">75%</td>
<td data-value="4" class="abs medium">3/4</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
</tr>
<tr>
<td class="file high" data-value="parse.js"><a href="parse.js.html">parse.js</a></td>
<td data-value="92.75" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 92%"></div><div class="cover-empty" style="width: 8%"></div></div>
</td>
<td data-value="92.75" class="pct high">92.75%</td>
<td data-value="69" class="abs high">64/69</td>
<td data-value="90.72" class="pct high">90.72%</td>
<td data-value="97" class="abs high">88/97</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="92.42" class="pct high">92.42%</td>
<td data-value="66" class="abs high">61/66</td>
</tr>
<tr>
<td class="file medium" data-value="schema.js"><a href="schema.js.html">schema.js</a></td>
<td data-value="54.55" class="pic medium">
<div class="chart"><div class="cover-fill" style="width: 54%"></div><div class="cover-empty" style="width: 46%"></div></div>
</td>
<td data-value="54.55" class="pct medium">54.55%</td>
<td data-value="11" class="abs medium">6/11</td>
<td data-value="20" class="pct low">20%</td>
<td data-value="10" class="abs low">2/10</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="1" class="abs high">1/1</td>
<td data-value="60" class="pct medium">60%</td>
<td data-value="10" class="abs medium">6/10</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,134 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/config/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/src/config</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>8/8</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">75% </span>
<span class="quiet">Branches</span>
<span class='fraction'>3/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>8/8</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">113x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">113x</span>
<span class="cline-any cline-yes">1070x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">112x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const parse = require('./parse');
const schema = require('./schema');
const env = require('./env');
&nbsp;
// Accept the user options (first argument) and then a list with all the plugins
// This will allow us to use the plugin's schemas as well
module.exports = async (user = {}, plugins = []) =&gt; {
&nbsp;
// First and most important is the core and the user-defined options
const options = await parse(schema, user, env);
&nbsp;
// Then load plugin options namespaced with the name in parallel
await Promise.all(plugins.map(async ({ name, options: def = {}} = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
options[name] = await parse(def, user[name], env, options);
}));
&nbsp;
return options;
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,575 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/config/parse.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/src/config</a> parse.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">92.75% </span>
<span class="quiet">Statements</span>
<span class='fraction'>64/69</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90.72% </span>
<span class="quiet">Branches</span>
<span class='fraction'>88/97</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">92.42% </span>
<span class="quiet">Lines</span>
<span class='fraction'>61/66</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a>
<a name='L72'></a><a href='#L72'>72</a>
<a name='L73'></a><a href='#L73'>73</a>
<a name='L74'></a><a href='#L74'>74</a>
<a name='L75'></a><a href='#L75'>75</a>
<a name='L76'></a><a href='#L76'>76</a>
<a name='L77'></a><a href='#L77'>77</a>
<a name='L78'></a><a href='#L78'>78</a>
<a name='L79'></a><a href='#L79'>79</a>
<a name='L80'></a><a href='#L80'>80</a>
<a name='L81'></a><a href='#L81'>81</a>
<a name='L82'></a><a href='#L82'>82</a>
<a name='L83'></a><a href='#L83'>83</a>
<a name='L84'></a><a href='#L84'>84</a>
<a name='L85'></a><a href='#L85'>85</a>
<a name='L86'></a><a href='#L86'>86</a>
<a name='L87'></a><a href='#L87'>87</a>
<a name='L88'></a><a href='#L88'>88</a>
<a name='L89'></a><a href='#L89'>89</a>
<a name='L90'></a><a href='#L90'>90</a>
<a name='L91'></a><a href='#L91'>91</a>
<a name='L92'></a><a href='#L92'>92</a>
<a name='L93'></a><a href='#L93'>93</a>
<a name='L94'></a><a href='#L94'>94</a>
<a name='L95'></a><a href='#L95'>95</a>
<a name='L96'></a><a href='#L96'>96</a>
<a name='L97'></a><a href='#L97'>97</a>
<a name='L98'></a><a href='#L98'>98</a>
<a name='L99'></a><a href='#L99'>99</a>
<a name='L100'></a><a href='#L100'>100</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a>
<a name='L125'></a><a href='#L125'>125</a>
<a name='L126'></a><a href='#L126'>126</a>
<a name='L127'></a><a href='#L127'>127</a>
<a name='L128'></a><a href='#L128'>128</a>
<a name='L129'></a><a href='#L129'>129</a>
<a name='L130'></a><a href='#L130'>130</a>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a>
<a name='L133'></a><a href='#L133'>133</a>
<a name='L134'></a><a href='#L134'>134</a>
<a name='L135'></a><a href='#L135'>135</a>
<a name='L136'></a><a href='#L136'>136</a>
<a name='L137'></a><a href='#L137'>137</a>
<a name='L138'></a><a href='#L138'>138</a>
<a name='L139'></a><a href='#L139'>139</a>
<a name='L140'></a><a href='#L140'>140</a>
<a name='L141'></a><a href='#L141'>141</a>
<a name='L142'></a><a href='#L142'>142</a>
<a name='L143'></a><a href='#L143'>143</a>
<a name='L144'></a><a href='#L144'>144</a>
<a name='L145'></a><a href='#L145'>145</a>
<a name='L146'></a><a href='#L146'>146</a>
<a name='L147'></a><a href='#L147'>147</a>
<a name='L148'></a><a href='#L148'>148</a>
<a name='L149'></a><a href='#L149'>149</a>
<a name='L150'></a><a href='#L150'>150</a>
<a name='L151'></a><a href='#L151'>151</a>
<a name='L152'></a><a href='#L152'>152</a>
<a name='L153'></a><a href='#L153'>153</a>
<a name='L154'></a><a href='#L154'>154</a>
<a name='L155'></a><a href='#L155'>155</a>
<a name='L156'></a><a href='#L156'>156</a>
<a name='L157'></a><a href='#L157'>157</a>
<a name='L158'></a><a href='#L158'>158</a>
<a name='L159'></a><a href='#L159'>159</a>
<a name='L160'></a><a href='#L160'>160</a>
<a name='L161'></a><a href='#L161'>161</a>
<a name='L162'></a><a href='#L162'>162</a>
<a name='L163'></a><a href='#L163'>163</a>
<a name='L164'></a><a href='#L164'>164</a>
<a name='L165'></a><a href='#L165'>165</a>
<a name='L166'></a><a href='#L166'>166</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1212x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1212x</span>
<span class="cline-any cline-yes">28x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1184x</span>
<span class="cline-any cline-yes">10x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">9x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1183x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7833x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7833x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7171x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7171x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7171x</span>
<span class="cline-any cline-yes">6921x</span>
<span class="cline-any cline-yes">250x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7170x</span>
<span class="cline-any cline-yes">6955x</span>
<span class="cline-any cline-yes">215x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7170x</span>
<span class="cline-any cline-yes">6955x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7170x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">28680x</span>
<span class="cline-any cline-yes">7170x</span>
<span class="cline-any cline-yes">2896x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7170x</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">106x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7170x</span>
<span class="cline-any cline-yes">356x</span>
<span class="cline-any cline-yes">248x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">356x</span>
<span class="cline-any cline-yes">356x</span>
<span class="cline-any cline-yes">123x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7170x</span>
<span class="cline-any cline-yes">234x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7170x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7169x</span>
<span class="cline-any cline-yes">232x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7167x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1878x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2553x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1878x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7165x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">3x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">7162x</span>
<span class="cline-any cline-yes">2891x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1174x</span>
<span class="cline-any cline-yes">7814x</span>
<span class="cline-any cline-yes">7814x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1174x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// parse.js
// Reads an schema and retrieves the proper options from it
&nbsp;
// Errors specifics to this submodule
const OptionsError = require('./errors');
const path = require('path');
&nbsp;
&nbsp;
// The main function.
// - arg: user options from the argument in the main server() function
// - env: the environment variables as read from env.js
// - parent: if it's a submodule, the global configuration
const parse = module.exports = async (schema, arg = {}, env= {}, parent = {}) =&gt; {
&nbsp;
// Fully parsed options will be stored here
const options = {};
&nbsp;
// For plugins, accept "false" as an option to nuke a full plugin
if (arg === false &amp;&amp; parent) {
return false;
}
&nbsp;
// Accepts a single option instead of an object and it will be mapped to its
// root value. Example: server(2000) === server({ port: 2000 })
if (typeof arg !== 'object') {
if (!schema.__root) {
throw new OptionsError('notobject');
}
arg = { [schema.__root]: arg };
}
&nbsp;
// Loop each of the defined options
for (let name in schema) {
&nbsp;
// RETRIEVAL
// Make the definition local so it's easier to handle
const def = schema[name];
let value;
&nbsp;
// Skip the control variables such as '__root'
if (/^__/.test(name)) continue;
&nbsp;
// Make sure we are dealing with a valid schema definition for this option
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof def !== 'object') {
<span class="cstat-no" title="statement not covered" > throw new Error('Invalid option definition: ' + JSON.stringify(def));</span>
}
&nbsp;
// The user defined a function to find the actual value manually
<span class="missing-if-branch" title="if path not taken" >I</span>if (def.find) {
<span class="cstat-no" title="statement not covered" > value = await def.find({ arg, env, def, parent, schema });</span>
} else {
&nbsp;
// Use the user-passed option unles explictly told not to
if (def.arg !== false) {
def.arg = def.arg === true ? name : def.arg || name;
} else if (arg[name] &amp;&amp; process.env.NODE_ENV === 'test') {
throw new OptionsError('noarg', { name });
}
&nbsp;
// Use the environment variable unless explicitly told not to
if (def.env !== false) {
def.env = (def.env === true ? name : def.env || name).toUpperCase();
} else <span class="missing-if-branch" title="if path not taken" >I</span>if (env[name.toUpperCase()] &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >process.env.NODE_ENV === 'test')</span> {
<span class="cstat-no" title="statement not covered" > if (!/^win/.test(process.platform) || name !== 'public') {</span>
<span class="cstat-no" title="statement not covered" > throw new OptionsError('noenv', { name });</span>
}
}
&nbsp;
// Make sure to use the name if we are inheriting with true
if (def.env !== false) {
def.inherit = (def.inherit === true ? name : def.inherit || name);
}
&nbsp;
// List of possibilities, from HIGHER preference to LOWER preference
// Removes the empty one and gets the first one as it has HIGHER preference
const possible = [
env[def.env],
arg[def.arg],
parent[def.inherit],
def.default
].filter(value =&gt; typeof value !== 'undefined');
if (possible.length) {
value = possible[0];
}
}
&nbsp;
// Extend the base object or user object with new values if these are not set
if (def.extend &amp;&amp; (typeof value === 'undefined' || typeof value === 'object')) {
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof value === 'undefined') {
<span class="cstat-no" title="statement not covered" > value = {};</span>
}
value = Object.assign({}, def.default, value);
}
&nbsp;
// Normalize the "public" folder or file
if ((def.file || def.folder) &amp;&amp; typeof value === 'string') {
if (!path.isAbsolute(value)) {
value = path.join(process.cwd(), value);
}
value = path.normalize(value);
if (def.folder &amp;&amp; value[value.length - 1] !== path.sep) {
value = value + path.sep;
}
}
&nbsp;
// A final hook for the schema to call up on the value
if (def.clean) {
value = await def.clean(value, { arg, env, parent, def, schema });
}
&nbsp;
&nbsp;
&nbsp;
&nbsp;
// VALIDATION
// Validate that it is set
if (def.required) {
if (typeof value === 'undefined') {
throw new OptionsError('required', { name });
}
// TODO: check that the file and folder exist
}
&nbsp;
if (def.enum) {
if (!def.enum.includes(value)) {
throw new OptionsError('enum', { name, value, possible: def.enum });
}
}
&nbsp;
// Validate the type (only if there's a value)
if (def.type &amp;&amp; value) {
&nbsp;
// Parse valid types into a simple array of strings: ['string', 'number']
def.type = (def.type instanceof Array ? def.type : [def.type])
// pulls up the name for primitives such as String, Number, etc
.map(one =&gt; (one.name ? one.name : one).toLowerCase());
&nbsp;
// Make sure it is one of the valid types
if (!def.type.includes(typeof value)) {
throw new OptionsError('type', {
name, expected: def.type, value
});
}
}
&nbsp;
if (def.validate) {
let ret = def.validate(value, def, options);
if (ret instanceof Error) throw ret;
if (!ret) throw new OptionsError('validate', { name, value });
}
&nbsp;
if (typeof value !== 'undefined') {
options[name] = value;
}
}
&nbsp;
// If the property 'options' exists handle it recursively
for (let name in schema) {
const def = schema[name];
if (def.options) {
options[name] = await parse(def.options, arg[name], env, options);
}
}
&nbsp;
return options;
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,251 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/config/schema.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/src/config</a> schema.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">54.55% </span>
<span class="quiet">Statements</span>
<span class='fraction'>6/11</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">20% </span>
<span class="quiet">Branches</span>
<span class='fraction'>2/10</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">60% </span>
<span class="quiet">Lines</span>
<span class='fraction'>6/10</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line medium'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">127x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">127x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const buffer = require('crypto').randomBytes(60);
const token = buffer.toString('base64').replace(/\//g,'_').replace(/\+/g,'-');
const path = require('path');
&nbsp;
module.exports = {
__root: 'port',
port: {
default: 3000,
type: Number
},
public: {
default: 'public',
type: [String, Boolean],
file: true,
clean: (value, option) =&gt; {
<span class="missing-if-branch" title="if path not taken" >I</span>if (/^win/.test(process.platform) &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >value === 'C:\\Users\\Public')</span> {
<span class="cstat-no" title="statement not covered" > value = option.arg.public || option.def.default;</span>
&nbsp;
<span class="cstat-no" title="statement not covered" > if (!value) <span class="cstat-no" title="statement not covered" >return;</span></span>
const fullpath = <span class="cstat-no" title="statement not covered" >path.isAbsolute(value) ? value : path.join(process.cwd(), value);</span>
<span class="cstat-no" title="statement not covered" > return path.normalize(fullpath);</span>
}
return value;
}
},
env: {
default: 'development',
enum: ['production', 'test', 'development'],
arg: false,
env: 'NODE_ENV'
},
engine: {
default: 'pug',
type: [String, Object]
},
views: {
default: 'views',
type: String,
folder: true
},
secret: {
default: 'secret-' + token,
type: String,
arg: false
// TODO: integrate this
// if (options.secret === 'your-random-string-here') {
// throw new ServerError('/server/options/secret/example');
// }
//
// if (/^secret-/.test(options.secret) &amp;&amp; options.verbose) {
// console.log(new ServerError('/server/options/secret/generated'));
// }
},
'x-powered-by': {
default: false
}
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/join</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/src/join</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>23/23</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90% </span>
<span class="quiet">Branches</span>
<span class='fraction'>9/10</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>22/22</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="23" class="abs high">23/23</td>
<td data-value="90" class="pct high">90%</td>
<td data-value="10" class="abs high">9/10</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="22" class="abs high">22/22</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,230 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/join/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/src/join</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>23/23</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">90% </span>
<span class="quiet">Branches</span>
<span class='fraction'>9/10</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>22/22</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">2202x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">103x</span>
<span class="cline-any cline-yes">34x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-yes">69x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">248x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">248x</span>
<span class="cline-any cline-yes">250x</span>
<span class="cline-any cline-yes">2225x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2225x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-yes">24x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2201x</span>
<span class="cline-any cline-yes">2178x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">25x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const load = require('loadware');
const assert = require('assert');
const reply = require('../../reply');
&nbsp;
// Recursively resolve possible function returns
const processReturn = async (ctx, ret) =&gt; {
if (!ret) return;
&nbsp;
// Use the returned reply instance
if (ret.constructor.name === 'Reply') {
return await ret.exec(ctx);
}
&nbsp;
// TODO: make a check for only accepting the right types of return values
&nbsp;
// Create a whole new reply thing
const fn = typeof ret === 'number' ? 'status' : 'send';
return await reply[fn](ret).exec(ctx);
};
&nbsp;
// Pass an array of modern middleware and return a single modern middleware
module.exports = (...middles) =&gt; {
&nbsp;
// Flattify all of the middleware
const middle = load(middles);
&nbsp;
// Go through each of them
return async ctx =&gt; {
for (const mid of middle) {
try {
// DO NOT MERGE; the else is relevant only for ctx.error
if (ctx.error) {
// See if this middleware can fix it
<span class="missing-if-branch" title="else path not taken" >E</span>if (mid.error) {
assert(mid.error instanceof Function, 'Error handler should be a function');
let ret = await mid.error(ctx);
await processReturn(ctx, ret);
}
}
// No error, call next middleware. Skips middleware if there's an error
else {
let ret = await mid(ctx);
await processReturn(ctx, ret);
}
} catch (err) {
ctx.error = err;
}
}
};
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,266 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/modern/errors.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/src/modern</a> errors.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>10/10</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>3/3</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>8/8</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a>
<a name='L35'></a><a href='#L35'>35</a>
<a name='L36'></a><a href='#L36'>36</a>
<a name='L37'></a><a href='#L37'>37</a>
<a name='L38'></a><a href='#L38'>38</a>
<a name='L39'></a><a href='#L39'>39</a>
<a name='L40'></a><a href='#L40'>40</a>
<a name='L41'></a><a href='#L41'>41</a>
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">11x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const error = require('../../error')('/server/modern/', {
url: ({ id }) =&gt; `https://serverjs.io/documentation/errors/#${id}`
});
&nbsp;
error.missingmiddleware = `
modern() expects a middleware to be passed but nothing was passed.
`;
&nbsp;
// error.MissingMiddleware = () =&gt; `
// modern() expects a middleware to be passed but nothing was passed.
//`;
&nbsp;
&nbsp;
error.invalidmiddleware = ({ type }) =&gt; `
modern() expects the argument to be a middleware function.
"${type}" was passed instead
`;
&nbsp;
// error.InvalidMiddleware = ({ type }) =&gt; `
// modern() expects the argument to be a middleware function.
// "${type}" was passed instead
// `;
&nbsp;
&nbsp;
error.errormiddleware = `
modern() cannot create a modern middleware that handles errors.
If you can handle an error in your middleware do it there.
Otherwise, use ".catch()" for truly fatal errors as "server().catch()".
`;
&nbsp;
// error.ErrorMiddleware = () =&gt; `
// modern() cannot create a modern middleware that handles errors.
// If you can handle an error in your middleware do it there.
// Otherwise, use ".catch()" for truly fatal errors as "server().catch()".
// `;
&nbsp;
&nbsp;
error.missingcontext = `
There is no context being passed to the middleware.
`;
&nbsp;
// error.MissingContext = () =&gt; `
// There is no context being passed to the middleware.
// `;
&nbsp;
&nbsp;
error.malformedcontext = ({ item }) =&gt; `
The argument passed as context is malformed.
Expecting it to be an object containing "${item}".
This is most likely an error from "server.modern".
Please report it: https://github.com/franciscop/server/issues
`;
&nbsp;
// error.MalformedContext = ({ item }) =&gt; `
// The argument passed as context is malformed.
// Expecting it to be an object containing "${item}".
// This is most likely an error from "server.modern".
// Please report it: https://github.com/franciscop/server/issues
// `;
&nbsp;
&nbsp;
module.exports = error;
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,141 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/modern</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> server-old/src/modern</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>34/34</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>14/14</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>9/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>30/30</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="errors.js"><a href="errors.js.html">errors.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="10" class="abs high">10/10</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="8" class="abs high">8/8</td>
</tr>
<tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="9" class="abs high">9/9</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="7" class="abs high">7/7</td>
</tr>
<tr>
<td class="file high" data-value="validate.js"><a href="validate.js.html">validate.js</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="15" class="abs high">15/15</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="12" class="abs high">12/12</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="15" class="abs high">15/15</td>
</tr>
</tbody>
</table>
</div>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,146 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/modern/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/src/modern</a> index.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>9/9</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>4/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>7/7</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1464x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1457x</span>
<span class="cline-any cline-yes">1457x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1453x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1453x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// Modern - Create a modern middleware from the old-style one
&nbsp;
// Cleanly validate data
const validate = require('./validate');
&nbsp;
// Pass it an old middleware and return a new one 'ctx =&gt; promise'
module.exports = middle =&gt; {
&nbsp;
// Validate it early so no requests need to be made
validate.middleware(middle);
&nbsp;
// Create and return the modern middleware function
return ctx =&gt; new Promise((resolve, reject) =&gt; {
validate.context(ctx);
&nbsp;
// It can handle both success or errors. Pass the right ctx
const next = err =&gt; err ? reject(err) : resolve();
&nbsp;
// Call the old middleware
middle(ctx.req, ctx.res, next);
});
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,155 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for server-old/src/modern/validate.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">server-old/src/modern</a> validate.js</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>15/15</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>12/12</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>15/15</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">1464x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1462x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1458x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">27x</span>
<span class="cline-any cline-yes">1457x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1456x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1454x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const ModernError = require('./errors');
&nbsp;
exports.middleware = middle =&gt; {
if (!middle) {
throw new ModernError('missingmiddleware');
}
if (!(middle instanceof Function)) {
throw new ModernError('invalidmiddleware', { type: typeof middle });
}
if (middle.length === 4) {
throw new ModernError('errormiddleware');
}
};
&nbsp;
exports.context = ctx =&gt; {
if (!ctx) {
throw new ModernError('missingcontext');
}
if (!ctx.req) {
throw new ModernError('malformedcontext', { item: 'res' });
}
if (!ctx.res) {
throw new ModernError('malformedcontext', { item: 'res' });
}
};
&nbsp;</pre></td></tr></table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Wed Feb 26 2020 23:49:53 GMT+0900 (Japan Standard Time)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

170
node_modules/server/coverage/lcov-report/sorter.js generated vendored Normal file
View File

@@ -0,0 +1,170 @@
/* eslint-disable */
var addSorting = (function() {
'use strict';
var cols,
currentSort = {
index: 0,
desc: false
};
// returns the summary table element
function getTable() {
return document.querySelector('.coverage-summary');
}
// returns the thead element of the summary table
function getTableHeader() {
return getTable().querySelector('thead tr');
}
// returns the tbody element of the summary table
function getTableBody() {
return getTable().querySelector('tbody');
}
// returns the th element for nth column
function getNthColumn(n) {
return getTableHeader().querySelectorAll('th')[n];
}
// loads all columns
function loadColumns() {
var colNodes = getTableHeader().querySelectorAll('th'),
colNode,
cols = [],
col,
i;
for (i = 0; i < colNodes.length; i += 1) {
colNode = colNodes[i];
col = {
key: colNode.getAttribute('data-col'),
sortable: !colNode.getAttribute('data-nosort'),
type: colNode.getAttribute('data-type') || 'string'
};
cols.push(col);
if (col.sortable) {
col.defaultDescSort = col.type === 'number';
colNode.innerHTML =
colNode.innerHTML + '<span class="sorter"></span>';
}
}
return cols;
}
// attaches a data attribute to every tr element with an object
// of data values keyed by column name
function loadRowData(tableRow) {
var tableCols = tableRow.querySelectorAll('td'),
colNode,
col,
data = {},
i,
val;
for (i = 0; i < tableCols.length; i += 1) {
colNode = tableCols[i];
col = cols[i];
val = colNode.getAttribute('data-value');
if (col.type === 'number') {
val = Number(val);
}
data[col.key] = val;
}
return data;
}
// loads all row data
function loadData() {
var rows = getTableBody().querySelectorAll('tr'),
i;
for (i = 0; i < rows.length; i += 1) {
rows[i].data = loadRowData(rows[i]);
}
}
// sorts the table using the data for the ith column
function sortByIndex(index, desc) {
var key = cols[index].key,
sorter = function(a, b) {
a = a.data[key];
b = b.data[key];
return a < b ? -1 : a > b ? 1 : 0;
},
finalSorter = sorter,
tableBody = document.querySelector('.coverage-summary tbody'),
rowNodes = tableBody.querySelectorAll('tr'),
rows = [],
i;
if (desc) {
finalSorter = function(a, b) {
return -1 * sorter(a, b);
};
}
for (i = 0; i < rowNodes.length; i += 1) {
rows.push(rowNodes[i]);
tableBody.removeChild(rowNodes[i]);
}
rows.sort(finalSorter);
for (i = 0; i < rows.length; i += 1) {
tableBody.appendChild(rows[i]);
}
}
// removes sort indicators for current column being sorted
function removeSortIndicators() {
var col = getNthColumn(currentSort.index),
cls = col.className;
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
col.className = cls;
}
// adds sort indicators for current column being sorted
function addSortIndicators() {
getNthColumn(currentSort.index).className += currentSort.desc
? ' sorted-desc'
: ' sorted';
}
// adds event listeners for all sorter widgets
function enableUI() {
var i,
el,
ithSorter = function ithSorter(i) {
var col = cols[i];
return function() {
var desc = col.defaultDescSort;
if (currentSort.index === i) {
desc = !currentSort.desc;
}
sortByIndex(i, desc);
removeSortIndicators();
currentSort.index = i;
currentSort.desc = desc;
addSortIndicators();
};
};
for (i = 0; i < cols.length; i += 1) {
if (cols[i].sortable) {
// add the click event handler on the th so users
// dont have to click on those tiny arrows
el = getNthColumn(i).querySelector('.sorter').parentElement;
if (el.addEventListener) {
el.addEventListener('click', ithSorter(i));
} else {
el.attachEvent('onclick', ithSorter(i));
}
}
}
}
// adds sorting functionality to the UI
return function() {
if (!getTable()) {
return;
}
cols = loadColumns();
loadData();
addSortIndicators();
enableUI();
};
})();
window.addEventListener('load', addSorting);

1712
node_modules/server/coverage/lcov.info generated vendored Normal file

File diff suppressed because it is too large Load Diff

51
node_modules/server/error/README.md generated vendored Normal file
View File

@@ -0,0 +1,51 @@
# Experimental syntax proposal
```js
// Using a factory
const ErrorFactory = require('server/error');
const ServerError = ErrorFactory('/server/', {});
const ErrorFactory = require('server/error');
class ServerError extends ErrorFactory {
namespace: '/server',
url: ({ id }) => ...,
status: 500
}
// Using the plain import method
const ServerError = require('server/error')('/server/');
const ServerError = require('server/error')('/server/', {
namespace: '/server/',
url: ({ slug }) => `https://serverjs.io/documentation/errors/#${slug}`,
status: 500,
});
const ServerError = require('server/error')({
namespace: '/server/'
});
const SassError = require('server/error')({
namespace: '/plugin/sass',
url: ({ slug }) => `https://serverjs.io/documentation/errors/#${slug}`,
});
const ServerError = require('server/error');
const SassError = ServerError(null, {
namespace: '/plugin/sass',
status: 500
});
const SassError = ServerError.defaults({
namespace: '/plugin/sass/',
status: 500
});
SassError.exists = ({ file }) => `
The file "${file}" already exists. Please rename it or remove it so @sass/server
can work properly. <3
`;
throw new SassError('exists');
throw new SassError('exists', { status: 500 });
throw new SassError('exists', { file: FILENAME });
```

25
node_modules/server/error/index.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
const buildError = (message, opts) => {
const error = new Error(message);
for (const key in opts) {
error[key] = opts[key] instanceof Function ? opts[key](opts) : opts[key];
}
return error;
};
const singleSlash = str => '/' + str.split('/').filter(one => one).join('/');
const ErrorFactory = function (namespace = '', defaults = {}) {
defaults.namespace = defaults.namespace || namespace;
return function ErrorInstance (code = '', options = {}) {
options = Object.assign({}, ErrorFactory.options, defaults, options);
options.code = singleSlash(options.namespace + '/' + code);
options.id = options.code.toLowerCase().replace(/[^\w]+/g, '-').replace(/^-/, '');
options.message = ErrorInstance[code];
return buildError(options.message, options);
};
};
ErrorFactory.options = { status: 500 };
module.exports = ErrorFactory;

85
node_modules/server/error/index.test.js generated vendored Normal file
View File

@@ -0,0 +1,85 @@
const ErrorFactory = require('./index.js');
describe('server/error', () => {
it('is a function', () => {
expect(ErrorFactory instanceof Function).toBe(true);
});
it('canNOT do simple errors', () => {
expect(new ErrorFactory('Hello world').message).not.toBe('Hello world');
expect(new ErrorFactory('Hello world') instanceof Error).not.toBe(true);
});
it('does not create a plain error', () => {
expect(ErrorFactory().message).toBe(undefined);
expect(ErrorFactory() instanceof Function).toBe(true);
expect(ErrorFactory('Hello world').message).toBe(undefined);
expect(ErrorFactory('Hello world') instanceof Function).toBe(true);
expect(ErrorFactory('Hello world', {}).message).toBe(undefined);
expect(ErrorFactory('Hello world', {}) instanceof Function).toBe(true);
});
it('can create errors from within the factory', () => {
expect(ErrorFactory('/server/')('test') instanceof Error).toBe(true);
expect(ErrorFactory('/server/')('test').code).toBe('/server/test');
expect(ErrorFactory('/server/')('test', { status: 500 }).status).toBe(500);
});
it('can create errors from within the factory', () => {
expect(ErrorFactory('/server/')('test') instanceof Error).toBe(true);
expect(ErrorFactory('/server/')('test').code).toBe('/server/test');
expect(ErrorFactory('/server/')('test').namespace).toBe('/server/');
expect(ErrorFactory('/server/')('test', { status: 500 }).status).toBe(500);
});
describe('Namespaces', () => {
const TestError = ErrorFactory('/server/', { status: 500 });
it('has the correct defaults', () => {
expect(TestError().status).toBe(500);
expect(TestError().code).toBe('/server');
expect(TestError().id).toBe('server');
});
it('can extend the errors', () => {
const err = TestError('demo', { status: 501 });
expect(err.status).toBe(501);
expect(err.code).toBe('/server/demo');
expect(err.id).toBe('server-demo');
});
it('is the same as with the instance', () => {
const err = TestError('demo', { status: 501 });
const err2 = new TestError('demo', { status: 501 });
expect(err).toMatchObject(err2);
});
});
describe('Define errors', () => {
const TestError = ErrorFactory('/server/', { status: 500 });
TestError.aaa = 'First error';
it('has the correct message', () => {
expect(TestError('aaa').message).toBe('First error');
});
it('can define an error with a function', () => {
TestError.bbb = () => `Function error`;
expect(TestError('bbb').message).toBe('Function error');
});
it('defines errors globally', () => {
expect(TestError('bbb').message).toBe('Function error');
});
it('errors are namespaced', () => {
const TestError = ErrorFactory('/server/');
expect(TestError('bbb').message).toBe(undefined);
});
it('gets the options in the interpolation', () => {
TestError.ccc = ({ status }) => `Function error ${status}`;
expect(TestError('ccc', { status: 505 }).message).toBe('Function error 505');
});
});
});

120
node_modules/server/package.json generated vendored Normal file
View File

@@ -0,0 +1,120 @@
{
"_from": "server",
"_id": "server@1.0.27",
"_inBundle": false,
"_integrity": "sha512-bwrbLCFYOozl/XGc+AxGsWbKBEYX/sQ6ga0uXEBlMwBlYU1Pxcdfg3Af8OJwR9N3A180fYZQY1LWagDSgSqQqg==",
"_location": "/server",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "server",
"name": "server",
"escapedName": "server",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/server/-/server-1.0.27.tgz",
"_shasum": "7ae0b7d3128d28ce5bf5125b2a48e37bb136c348",
"_spec": "server",
"_where": "/home/runner/Socketio-Chat-Template",
"author": {
"name": "Francisco Presencia",
"email": "public@francisco.io",
"url": "https://francisco.io/"
},
"bugs": {
"url": "https://github.com/franciscop/server/issues"
},
"bundleDependencies": false,
"dependencies": {
"body-parser": "^1.15.2",
"compression": "^1.6.2",
"connect-redis": "^3.3.0",
"cookie-parser": "^1.4.3",
"csurf": "^1.9.0",
"dotenv": "^4.0.0",
"express": "^4.14.0",
"express-data-parser": "^1.2.0",
"express-session": "^1.14.2",
"extend": "^3.0.0",
"hbs": "^4.1.0",
"helmet": "^3.9.0",
"loadware": "^2.0.0",
"log": "^1.4.0",
"method-override": "^2.3.10",
"mz": "^2.6.0",
"path-to-regexp": "^0.1.7",
"pug": "^2.0.0-rc.4",
"response-time": "^2.3.2",
"serve-favicon": "^2.3.2",
"serve-index": "^1.8.0",
"socket.io": "^2.0.3"
},
"deprecated": false,
"description": "A modern and powerful server for Node.js",
"devDependencies": {
"eslint": "^4.7.2",
"eslint-plugin-jasmine": "^2.2.0",
"grunt": "^1.0.1",
"grunt-bytesize": "^0.2.0",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-pug": "^1.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-sass": "^3.1.0",
"jest": "^25.0.0",
"jstransformer-marked": "^1.0.2",
"node-sass": "^4.13.1",
"picnic": "^6.4.0",
"request-promises": "^1.0.1",
"supertest": "^3.0.0"
},
"directories": {
"Documentation": "./docs/documentation",
"Code": "./src",
"Plugins": "./plugins",
"Examples": "./examples"
},
"engineStrict": true,
"engines": {
"node": ">=10.0.0"
},
"funding": "https://www.paypal.me/franciscopresencia/19",
"homepage": "https://serverjs.io/",
"jest": {
"transformIgnorePatterns": [
"/node_modules/"
]
},
"keywords": [
"server",
"node.js",
"http",
"websocket",
"socket",
"async"
],
"license": "MIT",
"main": "server.js",
"name": "server",
"repository": {
"type": "git",
"url": "git+https://github.com/franciscop/server.git"
},
"scripts": {
"build": "grunt",
"dev": "grunt watch",
"kill": "kill $(lsof -t -i:$PORT) && echo '> KILLED!' || echo '> The port was already dead'",
"kill-comment": "Kill a process running in a specific port: PORT=3000 npm run kill",
"pretest": "cp .env.demo .env",
"start": "node .",
"test": "jest --coverage --forceExit"
},
"version": "1.0.27"
}

16
node_modules/server/plugins/compress/index.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
const modern = require('../../src/modern');
const compress = require('compression');
module.exports = {
name: 'compress',
options: {
__root: 'compress',
compress: {
default: {},
type: Object
}
},
// The whole plugin won't be loaded if the option is false
before: ctx => modern(compress(ctx.options.compress))(ctx)
};

View File

@@ -0,0 +1,18 @@
const run = require('server/test/run');
describe('compress', () => {
it('works with the defaults', async () => {
const res = await run(() => 'Hello world').get('/');
expect(res.body).toBe('Hello world');
});
it('works with an empty option object', async () => {
const res = await run({ compress: {} }, () => 'Hello world').get('/');
expect(res.body).toBe('Hello world');
});
it('works without compress', async () => {
const res = await run({ compress: false }, () => 'Hello world').get('/');
expect(res.body).toBe('Hello world');
});
});

68
node_modules/server/plugins/express/index.js generated vendored Normal file
View File

@@ -0,0 +1,68 @@
const express = require('express');
module.exports = {
name: 'express',
options: {
// See these in-depth in https://expressjs.com/en/api.html#app.set
'case sensitive routing': {},
'env': {
inherit: 'env'
},
'etag': {},
'jsonp callback name': {},
'json replacer': {},
'json spaces': {},
'query parser': {},
'strict routing': {},
'subdomain offset': {},
'trust proxy': {},
'views': {
default: 'views',
inherit: true,
type: String,
folder: true
},
'view cache': {},
'view engine': {
inherit: 'engine'
},
'x-powered-by': {}
},
init: ctx => {
ctx.express = express;
ctx.app = ctx.express();
// Go through all of the options and set the right ones
for (let key in ctx.options.express) {
let value = ctx.options.express[key];
if (typeof value !== 'undefined') {
ctx.app.set(key, value);
}
}
// Accept HTML as a render extension
ctx.app.engine('html', require('hbs').__express);
if (ctx.options.engine) {
// If it's an object, expect a { engine: { engineName: engineFN } }
if (typeof ctx.options.engine === 'object') {
for (let name in ctx.options.engine) {
ctx.app.engine(name, ctx.options.engine[name]);
ctx.app.set('view engine', name);
}
} else { // Simple case like { engine: 'pug' }
ctx.app.set('view engine', ctx.options.engine);
}
}
},
listen: ctx => new Promise((resolve, reject) => {
ctx.server = ctx.app.listen(ctx.options.port, () => {
ctx.log.debug(`Server started on http://localhost:${ctx.options.port}/`);
resolve();
});
ctx.close = () => new Promise((res, rej) => {
ctx.server.close(err => err ? rej(err) : res());
});
ctx.server.on('error', err => reject(err));
})
};

View File

@@ -0,0 +1,56 @@
const server = require('../../server');
const { status } = server.reply;
// Test runner:
const run = require('server/test/run');
describe('express', () => {
it('is defined', () => {
server(parseInt(1000 + Math.random() * 10000)).then(ctx => {
expect(ctx.app).toBeDefined();
ctx.close();
});
});
it('accepts the options', async () => {
const options = {
'case sensitive routing': true,
'etag': 'strong',
'jsonp callback name': 'abc',
'subdomain offset': 1,
'trust proxy': true,
'view cache': true,
'x-powered-by': false
};
const res = await run({ express: options }, ctx => {
for (let key in options) {
expect(ctx.app.get(key)).toBe(options[key]);
}
return status(200);
}).get('/');
expect(res.status).toBe(200);
expect(res.body).toBe('');
});
it('ignores the view engine (use .engine instead)', async () => {
const res = await run({ express: { 'view engine': 'abc' } }, ctx => {
expect(ctx.app.get('env')).toBe('test');
expect(ctx.app.get('view engine')).toBe('pug');
return status(200);
}).get('/');
expect(res.status).toBe(200);
expect(res.body).toBe('');
});
it.skip('uses an engine', async () => {
const res = run({
express: { engine: {
blabla: 'I do not know how to make an engine yet'
}}
}).get('/');
expect(res.status).toBe(200);
expect(res.body).toBe('');
});
});

21
node_modules/server/plugins/favicon/index.js generated vendored Normal file
View File

@@ -0,0 +1,21 @@
const modern = require('../../src/modern');
const favicon = require('serve-favicon');
module.exports = {
name: 'favicon',
options: {
__root: 'location',
location: {
type: String,
file: true,
env: 'FAVICON'
}
},
before: [
ctx => {
if (!ctx.options.favicon.location) return false;
return modern(favicon(ctx.options.favicon.location))(ctx);
}
]
};

Some files were not shown because too many files have changed in this diff Show More