change approach again

This commit is contained in:
2018-05-09 14:31:22 +02:00
parent 54a933c83a
commit 0686e02b75
2252 changed files with 864743 additions and 270 deletions

1
node_modules/.bin/command-line-args generated vendored Symbolic link
View File

@ -0,0 +1 @@
../command-line-args/bin/cli.js

1
node_modules/.bin/mime generated vendored Symbolic link
View File

@ -0,0 +1 @@
../mime/cli.js

1
node_modules/.bin/tsc generated vendored Symbolic link
View File

@ -0,0 +1 @@
../typescript/bin/tsc

1
node_modules/.bin/tsserver generated vendored Symbolic link
View File

@ -0,0 +1 @@
../typescript/bin/tsserver

21
node_modules/@types/body-parser/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

16
node_modules/@types/body-parser/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/body-parser`
# Summary
This package contains type definitions for body-parser (https://github.com/expressjs/body-parser).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser
Additional Details
* Last updated: Wed, 25 Apr 2018 00:24:37 GMT
* Dependencies: connect, http, node
* Global values: none
# Credits
These definitions were written by Santi Albo <https://github.com/santialbo>, Vilic Vane <https://github.com/vilic>, Jonathan Häberle <https://github.com/dreampulse>, Gevik Babakhani <https://github.com/blendsdk>, Tomasz Łaziuk <https://github.com/tlaziuk>, Jason Walton <https://github.com/jwalton>.

53
node_modules/@types/body-parser/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,53 @@
// Type definitions for body-parser 1.17
// Project: https://github.com/expressjs/body-parser
// Definitions by: Santi Albo <https://github.com/santialbo>
// Vilic Vane <https://github.com/vilic>
// Jonathan Häberle <https://github.com/dreampulse>
// Gevik Babakhani <https://github.com/blendsdk>
// Tomasz Łaziuk <https://github.com/tlaziuk>
// Jason Walton <https://github.com/jwalton>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node" />
import { NextHandleFunction } from 'connect';
import * as http from 'http';
// for docs go to https://github.com/expressjs/body-parser/tree/1.16.0#body-parser
// @deprecated
declare function bodyParser(options?: bodyParser.OptionsJson & bodyParser.OptionsText & bodyParser.OptionsUrlencoded): NextHandleFunction;
declare namespace bodyParser {
interface Options {
inflate?: boolean;
limit?: number | string;
type?: string | string[] | ((req: http.IncomingMessage) => any);
verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void;
}
interface OptionsJson extends Options {
reviver?(key: string, value: any): any;
strict?: boolean;
}
interface OptionsText extends Options {
defaultCharset?: string;
}
interface OptionsUrlencoded extends Options {
extended?: boolean;
parameterLimit?: number;
}
function json(options?: OptionsJson): NextHandleFunction;
function raw(options?: Options): NextHandleFunction;
function text(options?: OptionsText): NextHandleFunction;
function urlencoded(options?: OptionsUrlencoded): NextHandleFunction;
}
export = bodyParser;

70
node_modules/@types/body-parser/package.json generated vendored Normal file
View File

@ -0,0 +1,70 @@
{
"_from": "@types/body-parser@*",
"_id": "@types/body-parser@1.17.0",
"_inBundle": false,
"_integrity": "sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w==",
"_location": "/@types/body-parser",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/body-parser@*",
"name": "@types/body-parser",
"escapedName": "@types%2fbody-parser",
"scope": "@types",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/@types/express"
],
"_resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz",
"_shasum": "9f5c9d9bd04bb54be32d5eb9fc0d8c974e6cf58c",
"_spec": "@types/body-parser@*",
"_where": "/home/wn/workspace-node/homepage/node_modules/@types/express",
"bundleDependencies": false,
"contributors": [
{
"name": "Santi Albo",
"url": "https://github.com/santialbo"
},
{
"name": "Vilic Vane",
"url": "https://github.com/vilic"
},
{
"name": "Jonathan Häberle",
"url": "https://github.com/dreampulse"
},
{
"name": "Gevik Babakhani",
"url": "https://github.com/blendsdk"
},
{
"name": "Tomasz Łaziuk",
"url": "https://github.com/tlaziuk"
},
{
"name": "Jason Walton",
"url": "https://github.com/jwalton"
}
],
"dependencies": {
"@types/connect": "*",
"@types/node": "*"
},
"deprecated": false,
"description": "TypeScript definitions for body-parser",
"license": "MIT",
"main": "",
"name": "@types/body-parser",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.2",
"typesPublisherContentHash": "d50d69303022e9f76f6d905e480a7dc98120bbcedb696a9722a4a2e9f08473e6",
"version": "1.17.0"
}

21
node_modules/@types/chalk/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

2
node_modules/@types/chalk/README.md generated vendored Normal file
View File

@ -0,0 +1,2 @@
This is a stub types definition for chalk (https://github.com/chalk/chalk).
chalk provides its own type definitions, so you don't need @types/chalk installed!

47
node_modules/@types/chalk/package.json generated vendored Normal file
View File

@ -0,0 +1,47 @@
{
"_from": "@types/chalk@^2.2.0",
"_id": "@types/chalk@2.2.0",
"_inBundle": false,
"_integrity": "sha512-1zzPV9FDe1I/WHhRkf9SNgqtRJWZqrBWgu7JGveuHmmyR9CnAPCie2N/x+iHrgnpYBIcCJWHBoMRv2TRWktsvw==",
"_location": "/@types/chalk",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/chalk@^2.2.0",
"name": "@types/chalk",
"escapedName": "@types%2fchalk",
"scope": "@types",
"rawSpec": "^2.2.0",
"saveSpec": null,
"fetchSpec": "^2.2.0"
},
"_requiredBy": [
"#DEV:/"
],
"_resolved": "https://registry.npmjs.org/@types/chalk/-/chalk-2.2.0.tgz",
"_shasum": "b7f6e446f4511029ee8e3f43075fb5b73fbaa0ba",
"_spec": "@types/chalk@^2.2.0",
"_where": "/home/wn/workspace-node/homepage",
"author": "",
"bugs": {
"url": "https://github.com/chalk/chalk/issues"
},
"bundleDependencies": false,
"dependencies": {
"chalk": "*"
},
"deprecated": "This is a stub types definition for chalk (https://github.com/chalk/chalk). chalk provides its own type definitions, so you don't need @types/chalk installed!",
"description": "Stub TypeScript definitions entry for chalk, which provides its own types definitions",
"homepage": "https://github.com/chalk/chalk#readme",
"license": "MIT",
"main": "",
"name": "@types/chalk",
"repository": {
"type": "git",
"url": "git+https://github.com/chalk/chalk.git"
},
"scripts": {},
"typings": null,
"version": "2.2.0"
}

21
node_modules/@types/command-line-args/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

16
node_modules/@types/command-line-args/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/command-line-args`
# Summary
This package contains type definitions for command-line-args (https://github.com/75lb/command-line-args).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/command-line-args
Additional Details
* Last updated: Thu, 16 Nov 2017 17:18:15 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by CzBuCHi <https://github.com/CzBuCHi>.

87
node_modules/@types/command-line-args/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,87 @@
// Type definitions for command-line-args 4.0.7
// Project: https://github.com/75lb/command-line-args
// Definitions by: CzBuCHi <https://github.com/CzBuCHi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Returns an object containing all options set on the command line. By default it parses the global [`process.argv`](https://nodejs.org/api/process.html#process_process_argv) array.
*
* By default, an exception is thrown if the user sets an unknown option (one without a valid [definition](#exp_module_definition--OptionDefinition)). To enable __partial parsing__, invoke `commandLineArgs` with the `partial` option - all unknown arguments will be returned in the `_unknown` property.
*
*
* @param {module:definition[]} - An array of [OptionDefinition](#exp_module_definition--OptionDefinition) objects
* @param [options] {object} - Options.
* @param [options.argv] {string[]} - An array of strings, which if passed will be parsed instead of `process.argv`.
* @param [options.partial] {boolean} - If `true`, an array of unknown arguments is returned in the `_unknown` property of the output.
* @returns {object}
* @throws `UNKNOWN_OPTION` if `options.partial` is false and the user set an undefined option
* @throws `NAME_MISSING` if an option definition is missing the required `name` property
* @throws `INVALID_TYPE` if an option definition has a `type` value that's not a function
* @throws `INVALID_ALIAS` if an alias is numeric, a hyphen or a length other than 1
* @throws `DUPLICATE_NAME` if an option definition name was used more than once
* @throws `DUPLICATE_ALIAS` if an option definition alias was used more than once
* @throws `DUPLICATE_DEFAULT_OPTION` if more than one option definition has `defaultOption: true`
* @alias module:command-line-args
*/
declare function commandLineArgs(optionDefinitions: commandLineArgs.OptionDefinition[], options?: commandLineArgs.Options): any;
declare module commandLineArgs {
export interface OptionDefinition {
/**
* The only required definition property is name, the value of each option will be either a Boolean or string.
*/
name: string,
/**
* The type value is a setter function (you receive the output from this),
* enabling you to be specific about the type and value received.
*/
type?: (arg: string) => any,
/**
* getopt-style short option names. Can be any single character (unicode included) except a digit or hypen.
*/
alias?: string,
/**
* Set this flag if the option takes a list of values. You will receive an array of values, each passed
* through the type function (if specified).
*/
multiple?: boolean,
/**
* Any unclaimed command-line args will be set on this option. This flag is typically set on
* the most commonly-used option to make for more concise usage
* (i.e. $ myapp *.js instead of $ myapp --files *.js).
*/
defaultOption?: boolean,
/**
* An initial value for the option.
*/
defaultValue?: any,
/**
* When your app has a large amount of options it makes sense to organise them in groups.
* There are two automatic groups: _all (contains all options) and _none (contains options
* without a group specified in their definition).
*/
group?: string | string[],
/**
* Describes the option.
*/
description?: string,
/**
* A label for the type, e.g. <ms>.
*/
typeLabel?: string;
}
export interface Options {
/**
* An array of strings, which if passed will be parsed instead of `process.argv`.
*/
argv?: string[];
/**
* If `true`, an array of unknown arguments is returned in the `_unknown` property of the output.
*/
partial?: boolean;
}
}
export = commandLineArgs;

47
node_modules/@types/command-line-args/package.json generated vendored Normal file
View File

@ -0,0 +1,47 @@
{
"_from": "@types/command-line-args@^4.0.2",
"_id": "@types/command-line-args@4.0.2",
"_inBundle": false,
"_integrity": "sha512-lLN/Rtud+SONdclROGc8CnZeZ/ujQ69U4otFMtoCfCdLfs2x2R2lJFSy583uI9dnnsd6I9Pdy/Mw3efqxO/2bg==",
"_location": "/@types/command-line-args",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/command-line-args@^4.0.2",
"name": "@types/command-line-args",
"escapedName": "@types%2fcommand-line-args",
"scope": "@types",
"rawSpec": "^4.0.2",
"saveSpec": null,
"fetchSpec": "^4.0.2"
},
"_requiredBy": [
"#DEV:/"
],
"_resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-4.0.2.tgz",
"_shasum": "bbb7568685bbcd9c69b46c9e6a3f6411890735c8",
"_spec": "@types/command-line-args@^4.0.2",
"_where": "/home/wn/workspace-node/homepage",
"bundleDependencies": false,
"contributors": [
{
"name": "CzBuCHi",
"url": "https://github.com/CzBuCHi"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for command-line-args",
"license": "MIT",
"main": "",
"name": "@types/command-line-args",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.0",
"typesPublisherContentHash": "47b0f898839f3fe8df63f53814c1d04347ce49bbf55dfe5950d4a57f53e35fbb",
"version": "4.0.2"
}

21
node_modules/@types/connect/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

16
node_modules/@types/connect/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/connect`
# Summary
This package contains type definitions for connect (https://github.com/senchalabs/connect).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect
Additional Details
* Last updated: Tue, 17 Apr 2018 01:01:05 GMT
* Dependencies: http, node
* Global values: none
# Credits
These definitions were written by Maxime LUCE <https://github.com/SomaticIT>, Evan Hahn <https://github.com/EvanHahn>.

94
node_modules/@types/connect/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,94 @@
// Type definitions for connect v3.4.0
// Project: https://github.com/senchalabs/connect
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>
// Evan Hahn <https://github.com/EvanHahn>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import * as http from "http";
/**
* Create a new connect server.
* @public
*/
declare function createServer(): createServer.Server;
declare namespace createServer {
export type ServerHandle = HandleFunction | http.Server;
type NextFunction = (err?: any) => void;
export type SimpleHandleFunction = (req: http.IncomingMessage, res: http.ServerResponse) => void;
export type NextHandleFunction = (req: http.IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
export type ErrorHandleFunction = (err: any, req: http.IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
export type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction;
export interface ServerStackItem {
route: string;
handle: ServerHandle;
}
export interface Server extends NodeJS.EventEmitter {
(req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
route: string;
stack: ServerStackItem[];
/**
* Utilize the given middleware `handle` to the given `route`,
* defaulting to _/_. This "route" is the mount-point for the
* middleware, when given a value other than _/_ the middleware
* is only effective when that segment is present in the request's
* pathname.
*
* For example if we were to mount a function at _/admin_, it would
* be invoked on _/admin_, and _/admin/settings_, however it would
* not be invoked for _/_, or _/posts_.
*
* @public
*/
use(fn: HandleFunction): Server;
use(route: string, fn: HandleFunction): Server;
/**
* Handle server requests, punting them down
* the middleware stack.
*
* @private
*/
handle(req: http.IncomingMessage, res: http.ServerResponse, next: Function): void;
/**
* Listen for connections.
*
* This method takes the same arguments
* as node's `http.Server#listen()`.
*
* HTTP and HTTPS:
*
* If you run your application both as HTTP
* and HTTPS you may wrap them individually,
* since your Connect "server" is really just
* a JavaScript `Function`.
*
* var connect = require('connect')
* , http = require('http')
* , https = require('https');
*
* var app = connect();
*
* http.createServer(app).listen(80);
* https.createServer(options, app).listen(443);
*
* @api public
*/
listen(port: number, hostname?: string, backlog?: number, callback?: Function): http.Server;
listen(port: number, hostname?: string, callback?: Function): http.Server;
listen(path: string, callback?: Function): http.Server;
listen(handle: any, listeningListener?: Function): http.Server;
}
}
export = createServer;

53
node_modules/@types/connect/package.json generated vendored Normal file
View File

@ -0,0 +1,53 @@
{
"_from": "@types/connect@*",
"_id": "@types/connect@3.4.32",
"_inBundle": false,
"_integrity": "sha512-4r8qa0quOvh7lGD0pre62CAb1oni1OO6ecJLGCezTmhQ8Fz50Arx9RUszryR8KlgK6avuSXvviL6yWyViQABOg==",
"_location": "/@types/connect",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/connect@*",
"name": "@types/connect",
"escapedName": "@types%2fconnect",
"scope": "@types",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/@types/body-parser"
],
"_resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.32.tgz",
"_shasum": "aa0e9616b9435ccad02bc52b5b454ffc2c70ba28",
"_spec": "@types/connect@*",
"_where": "/home/wn/workspace-node/homepage/node_modules/@types/body-parser",
"bundleDependencies": false,
"contributors": [
{
"name": "Maxime LUCE",
"url": "https://github.com/SomaticIT"
},
{
"name": "Evan Hahn",
"url": "https://github.com/EvanHahn"
}
],
"dependencies": {
"@types/node": "*"
},
"deprecated": false,
"description": "TypeScript definitions for connect",
"license": "MIT",
"main": "",
"name": "@types/connect",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.0",
"typesPublisherContentHash": "d988cf1d88b273d694c4fcfe3699c4785f7e60ea0c8e094b598922c43ab3fb4e",
"version": "3.4.32"
}

21
node_modules/@types/events/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

16
node_modules/@types/events/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/events`
# Summary
This package contains type definitions for events (https://github.com/Gozala/events).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/events
Additional Details
* Last updated: Mon, 26 Feb 2018 20:02:51 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by Yasunori Ohoka <https://github.com/yasupeke>.

21
node_modules/@types/events/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,21 @@
// Type definitions for events 1.2
// Project: https://github.com/Gozala/events
// Definitions by: Yasunori Ohoka <https://github.com/yasupeke>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export type Listener = (...args: any[]) => void;
export class EventEmitter {
static listenerCount(emitter: EventEmitter, type: string | number): number;
static defaultMaxListeners: number;
setMaxListeners(n: number): this;
emit(type: string | number, ...args: any[]): boolean;
addListener(type: string | number, listener: Listener): this;
on(type: string | number, listener: Listener): this;
once(type: string | number, listener: Listener): this;
removeListener(type: string | number, listener: Listener): this;
removeAllListeners(type?: string | number): this;
listeners(type: string | number): Listener[];
listenerCount(type: string | number): number;
}

47
node_modules/@types/events/package.json generated vendored Normal file
View File

@ -0,0 +1,47 @@
{
"_from": "@types/events@*",
"_id": "@types/events@1.2.0",
"_inBundle": false,
"_integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==",
"_location": "/@types/events",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/events@*",
"name": "@types/events",
"escapedName": "@types%2fevents",
"scope": "@types",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/@types/express-serve-static-core"
],
"_resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz",
"_shasum": "81a6731ce4df43619e5c8c945383b3e62a89ea86",
"_spec": "@types/events@*",
"_where": "/home/wn/workspace-node/homepage/node_modules/@types/express-serve-static-core",
"bundleDependencies": false,
"contributors": [
{
"name": "Yasunori Ohoka",
"url": "https://github.com/yasupeke"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for events",
"license": "MIT",
"main": "",
"name": "@types/events",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.0",
"typesPublisherContentHash": "77df50634244c91df37e85c9c99789b6c252e985898e5c35471b3a6e0f156288",
"version": "1.2.0"
}

21
node_modules/@types/express-serve-static-core/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/express-serve-static-core`
# Summary
This package contains type definitions for Express (http://expressjs.com).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core
Additional Details
* Last updated: Fri, 19 Jan 2018 22:53:49 GMT
* Dependencies: http, events, node
* Global values: none
# Credits
These definitions were written by Boris Yankov <https://github.com/borisyankov>, Michał Lytek <https://github.com/19majkel94>, Kacper Polak <https://github.com/kacepe>, Satana Charuwichitratana <https://github.com/micksatana>, Sami Jaber <https://github.com/samijaber>.

1069
node_modules/@types/express-serve-static-core/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,67 @@
{
"_from": "@types/express-serve-static-core@*",
"_id": "@types/express-serve-static-core@4.11.1",
"_inBundle": false,
"_integrity": "sha512-EehCl3tpuqiM8RUb+0255M8PhhSwTtLfmO7zBBdv0ay/VTd/zmrqDfQdZFsa5z/PVMbH2yCMZPXsnrImpATyIw==",
"_location": "/@types/express-serve-static-core",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/express-serve-static-core@*",
"name": "@types/express-serve-static-core",
"escapedName": "@types%2fexpress-serve-static-core",
"scope": "@types",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/@types/express",
"/@types/serve-static"
],
"_resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz",
"_shasum": "f6f7212382d59b19d696677bcaa48a37280f5d45",
"_spec": "@types/express-serve-static-core@*",
"_where": "/home/wn/workspace-node/homepage/node_modules/@types/express",
"bundleDependencies": false,
"contributors": [
{
"name": "Boris Yankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Michał Lytek",
"url": "https://github.com/19majkel94"
},
{
"name": "Kacper Polak",
"url": "https://github.com/kacepe"
},
{
"name": "Satana Charuwichitratana",
"url": "https://github.com/micksatana"
},
{
"name": "Sami Jaber",
"url": "https://github.com/samijaber"
}
],
"dependencies": {
"@types/events": "*",
"@types/node": "*"
},
"deprecated": false,
"description": "TypeScript definitions for Express",
"license": "MIT",
"main": "",
"name": "@types/express-serve-static-core",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.2",
"typesPublisherContentHash": "cedfc7bb9468f0bcd4bce271c718540b3b87acdc775200e7a4bf979843d160c1",
"version": "4.11.1"
}

21
node_modules/@types/express/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

16
node_modules/@types/express/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/express`
# Summary
This package contains type definitions for Express (http://expressjs.com).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express
Additional Details
* Last updated: Thu, 01 Feb 2018 22:21:16 GMT
* Dependencies: body-parser, serve-static, express-serve-static-core
* Global values: none
# Credits
These definitions were written by Boris Yankov <https://github.com/borisyankov>.

87
node_modules/@types/express/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,87 @@
// Type definitions for Express 4.11
// Project: http://expressjs.com
// Definitions by: Boris Yankov <https://github.com/borisyankov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/* =================== USAGE ===================
import * as express from "express";
var app = express();
=============================================== */
/// <reference types="express-serve-static-core" />
/// <reference types="serve-static" />
import * as bodyParser from "body-parser";
import serveStatic = require("serve-static");
import * as core from "express-serve-static-core";
/**
* Creates an Express application. The express() function is a top-level function exported by the express module.
*/
declare function e(): core.Express;
declare namespace e {
/**
* This is a built-in middleware function in Express. It parses incoming requests with JSON payloads and is based on body-parser.
* @since 4.16.0
*/
var json: typeof bodyParser.json;
/**
* This is a built-in middleware function in Express. It serves static files and is based on serve-static.
*/
var static: typeof serveStatic;
/**
* This is a built-in middleware function in Express. It parses incoming requests with urlencoded payloads and is based on body-parser.
* @since 4.16.0
*/
var urlencoded: typeof bodyParser.urlencoded;
export function Router(options?: RouterOptions): core.Router;
interface RouterOptions {
/**
* Enable case sensitivity.
*/
caseSensitive?: boolean;
/**
* Preserve the req.params values from the parent router.
* If the parent and the child have conflicting param names, the childs value take precedence.
*
* @default false
* @since 4.5.0
*/
mergeParams?: boolean;
/**
* Enable strict routing.
*/
strict?: boolean;
}
interface Application extends core.Application { }
interface CookieOptions extends core.CookieOptions { }
interface Errback extends core.Errback { }
interface ErrorRequestHandler extends core.ErrorRequestHandler { }
interface Express extends core.Express { }
interface Handler extends core.Handler { }
interface IRoute extends core.IRoute { }
interface IRouter<T> extends core.IRouter { }
interface IRouterHandler<T> extends core.IRouterHandler<T> { }
interface IRouterMatcher<T> extends core.IRouterMatcher<T> { }
interface MediaType extends core.MediaType { }
interface NextFunction extends core.NextFunction { }
interface Request extends core.Request { }
interface RequestHandler extends core.RequestHandler { }
interface RequestParamHandler extends core.RequestParamHandler { }
export interface Response extends core.Response { }
interface Router extends core.Router { }
interface Send extends core.Send { }
}
export = e;

52
node_modules/@types/express/package.json generated vendored Normal file
View File

@ -0,0 +1,52 @@
{
"_from": "@types/express",
"_id": "@types/express@4.11.1",
"_inBundle": false,
"_integrity": "sha512-ttWle8cnPA5rAelauSWeWJimtY2RsUf2aspYZs7xPHiWgOlPn6nnUfBMtrkcnjFJuIHJF4gNOdVvpLK2Zmvh6g==",
"_location": "/@types/express",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "@types/express",
"name": "@types/express",
"escapedName": "@types%2fexpress",
"scope": "@types",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/@types/express/-/express-4.11.1.tgz",
"_shasum": "f99663b3ab32d04cb11db612ef5dd7933f75465b",
"_spec": "@types/express",
"_where": "/home/wn/workspace-node/homepage",
"bundleDependencies": false,
"contributors": [
{
"name": "Boris Yankov",
"url": "https://github.com/borisyankov"
}
],
"dependencies": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "*",
"@types/serve-static": "*"
},
"deprecated": false,
"description": "TypeScript definitions for Express",
"license": "MIT",
"main": "",
"name": "@types/express",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.2",
"typesPublisherContentHash": "bea29462c13a5204859d5ac3bb917bae720aff3de620dd36b71440b71556efa5",
"version": "4.11.1"
}

21
node_modules/@types/mime/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

9
node_modules/@types/mime/Mime.d.ts generated vendored Normal file
View File

@ -0,0 +1,9 @@
import { TypeMap } from "./index";
export default class Mime {
constructor(mimes: TypeMap);
getType(path: string): string | null;
getExtension(mime: string): string | null;
define(mimes: TypeMap, force?: boolean): void;
}

16
node_modules/@types/mime/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/mime`
# Summary
This package contains type definitions for mime (https://github.com/broofa/node-mime).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime
Additional Details
* Last updated: Mon, 18 Sep 2017 14:13:55 GMT
* Dependencies: none
* Global values: mime
# Credits
These definitions were written by Jeff Goddard <https://github.com/jedigo>, Daniel Hritzkiv <https://github.com/dhritzkiv>.

17
node_modules/@types/mime/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,17 @@
// Type definitions for mime 2.0
// Project: https://github.com/broofa/node-mime
// Definitions by: Jeff Goddard <https://github.com/jedigo>
// Daniel Hritzkiv <https://github.com/dhritzkiv>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Originally imported from: https://github.com/soywiz/typescript-node-definitions/mime.d.ts
export as namespace mime;
export interface TypeMap { [key: string]: string[]; }
export function getType(path: string): string | null;
export function getExtension(mime: string): string | null;
export function define(mimes: TypeMap, force?: boolean): void;
export const default_type: string;

51
node_modules/@types/mime/package.json generated vendored Normal file
View File

@ -0,0 +1,51 @@
{
"_from": "@types/mime@*",
"_id": "@types/mime@2.0.0",
"_inBundle": false,
"_integrity": "sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA==",
"_location": "/@types/mime",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/mime@*",
"name": "@types/mime",
"escapedName": "@types%2fmime",
"scope": "@types",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/@types/serve-static"
],
"_resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz",
"_shasum": "5a7306e367c539b9f6543499de8dd519fac37a8b",
"_spec": "@types/mime@*",
"_where": "/home/wn/workspace-node/homepage/node_modules/@types/serve-static",
"bundleDependencies": false,
"contributors": [
{
"name": "Jeff Goddard",
"url": "https://github.com/jedigo"
},
{
"name": "Daniel Hritzkiv",
"url": "https://github.com/dhritzkiv"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for mime",
"license": "MIT",
"main": "",
"name": "@types/mime",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.0",
"typesPublisherContentHash": "719b27892c0327424f3d155be034d74dc26a16ed6022ae6f9a9cb8872f8fa70e",
"version": "2.0.0"
}

21
node_modules/@types/node/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

16
node_modules/@types/node/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/node`
# Summary
This package contains type definitions for Node.js (http://nodejs.org/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped.git/tree/master/types/node/v8
Additional Details
* Last updated: Tue, 08 May 2018 16:46:27 GMT
* Dependencies: none
* Global values: Buffer, NodeJS, SlowBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
# Credits
These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>, Christian Vaagland Tellnes <https://github.com/tellnes>, Wilco Bakker <https://github.com/WilcoBakker>, Nicolas Voigt <https://github.com/octo-sniffle>, Chigozirim C. <https://github.com/smac89>, Flarna <https://github.com/Flarna>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, wwwy3y3 <https://github.com/wwwy3y3>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>, Alvis HT Tang <https://github.com/alvis>, Oliver Joseph Ash <https://github.com/OliverJAsh>, Sebastian Silbermann <https://github.com/eps1lon>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Alberto Schiabel <https://github.com/jkomyno>, Huw <https://github.com/hoo29>, Nicolas Even <https://github.com/n-e>, Bruno Scheufler <https://github.com/brunoscheufler>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Lishude <https://github.com/islishude>.

7219
node_modules/@types/node/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

2488
node_modules/@types/node/inspector.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

135
node_modules/@types/node/package.json generated vendored Normal file
View File

@ -0,0 +1,135 @@
{
"_from": "@types/node@^8.5.8",
"_id": "@types/node@8.10.13",
"_inBundle": false,
"_integrity": "sha512-AorNXRHoPVxIUIVmr6uJXRnvlPOSNKAJF5jZ1JOj1/IxYMocZzvQooNeLU02Db6kpy1IVIySTOvuIxmUF1HrOg==",
"_location": "/@types/node",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/node@^8.5.8",
"name": "@types/node",
"escapedName": "@types%2fnode",
"scope": "@types",
"rawSpec": "^8.5.8",
"saveSpec": null,
"fetchSpec": "^8.5.8"
},
"_requiredBy": [
"#DEV:/"
],
"_resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.13.tgz",
"_shasum": "786153acbe3e8e0b844053e72c9d9f2db71c796a",
"_spec": "@types/node@^8.5.8",
"_where": "/home/wn/workspace-node/homepage",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Microsoft TypeScript",
"url": "http://typescriptlang.org"
},
{
"name": "DefinitelyTyped",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped"
},
{
"name": "Parambir Singh",
"url": "https://github.com/parambirs"
},
{
"name": "Christian Vaagland Tellnes",
"url": "https://github.com/tellnes"
},
{
"name": "Wilco Bakker",
"url": "https://github.com/WilcoBakker"
},
{
"name": "Nicolas Voigt",
"url": "https://github.com/octo-sniffle"
},
{
"name": "Chigozirim C.",
"url": "https://github.com/smac89"
},
{
"name": "Flarna",
"url": "https://github.com/Flarna"
},
{
"name": "Mariusz Wiktorczyk",
"url": "https://github.com/mwiktorczyk"
},
{
"name": "wwwy3y3",
"url": "https://github.com/wwwy3y3"
},
{
"name": "Deividas Bakanas",
"url": "https://github.com/DeividasBakanas"
},
{
"name": "Kelvin Jin",
"url": "https://github.com/kjin"
},
{
"name": "Alvis HT Tang",
"url": "https://github.com/alvis"
},
{
"name": "Oliver Joseph Ash",
"url": "https://github.com/OliverJAsh"
},
{
"name": "Sebastian Silbermann",
"url": "https://github.com/eps1lon"
},
{
"name": "Hannes Magnusson",
"url": "https://github.com/Hannes-Magnusson-CK"
},
{
"name": "Alberto Schiabel",
"url": "https://github.com/jkomyno"
},
{
"name": "Huw",
"url": "https://github.com/hoo29"
},
{
"name": "Nicolas Even",
"url": "https://github.com/n-e"
},
{
"name": "Bruno Scheufler",
"url": "https://github.com/brunoscheufler"
},
{
"name": "Hoàng Văn Khải",
"url": "https://github.com/KSXGitHub"
},
{
"name": "Lishude",
"url": "https://github.com/islishude"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for Node.js",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped.git#readme",
"license": "MIT",
"main": "",
"name": "@types/node",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git.git"
},
"scripts": {},
"typeScriptVersion": "2.1",
"typesPublisherContentHash": "04b7a1da3c8d13c04f9e43d254486a4d9c7cb2247c0150f078cce7bc761c5c4e",
"version": "8.10.13"
}

21
node_modules/@types/nodemailer/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

16
node_modules/@types/nodemailer/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/nodemailer`
# Summary
This package contains type definitions for Nodemailer (https://github.com/nodemailer/nodemailer).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer
Additional Details
* Last updated: Fri, 09 Mar 2018 00:01:00 GMT
* Dependencies: node, stream, http, tls, events, url, net
* Global values: none
# Credits
These definitions were written by Rogier Schouten <https://github.com/rogierschouten>, Piotr Roszatycki <https://github.com/dex4er>.

64
node_modules/@types/nodemailer/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,64 @@
// Type definitions for Nodemailer 4.6
// Project: https://github.com/nodemailer/nodemailer
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Piotr Roszatycki <https://github.com/dex4er>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="node" />
import JSONTransport = require('./lib/json-transport');
import Mail = require('./lib/mailer');
import MailMessage = require('./lib/mailer/mail-message');
import SendmailTransport = require('./lib/sendmail-transport');
import SESTransport = require('./lib/ses-transport');
import SMTPPool = require('./lib/smtp-pool');
import SMTPTransport = require('./lib/smtp-transport');
import StreamTransport = require('./lib/stream-transport');
export type SendMailOptions = Mail.Options;
export type SentMessageInfo = any;
export type Transporter = Mail;
export interface Transport {
mailer?: Mail;
name: string;
version: string;
send(mail: MailMessage, callback: (err: Error | null, info: SentMessageInfo) => void): void;
verify?(callback: (err: Error | null, success: true) => void): void;
verify?(): Promise<true>;
close?(): void;
}
export interface TransportOptions {
component?: string;
}
export interface TestAccount {
user: string;
pass: string;
smtp: { host: string, port: number, secure: boolean };
imap: { host: string, port: number, secure: boolean };
pop3: { host: string, port: number, secure: boolean };
web: string;
}
export function createTransport(transport?: SMTPTransport | SMTPTransport.Options | string, defaults?: SMTPTransport.Options): Mail;
export function createTransport(transport: SMTPPool | SMTPPool.Options, defaults?: SMTPPool.Options): Mail;
export function createTransport(transport: SendmailTransport | SendmailTransport.Options, defaults?: SendmailTransport.Options): Mail;
export function createTransport(transport: StreamTransport | StreamTransport.Options, defaults?: StreamTransport.Options): Mail;
export function createTransport(transport: JSONTransport | JSONTransport.Options, defaults?: JSONTransport.Options): Mail;
export function createTransport(transport: SESTransport | SESTransport.Options, defaults?: SESTransport.Options): Mail;
export function createTransport(transport: Transport | TransportOptions, defaults?: TransportOptions): Mail;
export function createTestAccount(apiUrl: string, callback: (err: Error | null, testAccount: TestAccount) => void): void;
export function createTestAccount(callback: (err: Error | null, testAccount: TestAccount) => void): void;
export function createTestAccount(apiUrl?: string): Promise<TestAccount>;
export function getTestMessageUrl(info: SESTransport.SentMessageInfo | SMTPTransport.SentMessageInfo): string | false;

24
node_modules/@types/nodemailer/lib/addressparser.d.ts generated vendored Normal file
View File

@ -0,0 +1,24 @@
declare namespace addressparser {
interface Address {
name: string;
address: string;
}
}
/**
* Parses structured e-mail addresses from an address field
*
* Example:
*
* 'Name <address@domain>'
*
* will be converted to
*
* [{name: 'Name', address: 'address@domain'}]
*
* @param str Address field
* @return An array of address objects
*/
declare function addressparser(address: string): addressparser.Address[];
export = addressparser;

22
node_modules/@types/nodemailer/lib/base64.d.ts generated vendored Normal file
View File

@ -0,0 +1,22 @@
/// <reference types="node" />
import { Transform, TransformOptions } from 'stream';
/** Encodes a Buffer into a base64 encoded string */
export function encode(buffer: Buffer | string): string;
/** Adds soft line breaks to a base64 string */
export function wrap(str: string, lineLength?: number): string;
export interface EncoderOptions extends TransformOptions {
lineLength?: number | false;
}
export class Encoder extends Transform {
options: TransformOptions;
inputBytes: number;
outputBytes: number;
constructor(options?: TransformOptions);
}

41
node_modules/@types/nodemailer/lib/dkim.d.ts generated vendored Normal file
View File

@ -0,0 +1,41 @@
/// <reference types="node" />
declare namespace DKIM {
interface OptionalOptions {
/** optional location for cached messages. If not set then caching is not used. */
cacheDir?: string | false;
/** optional size in bytes, if message is larger than this treshold it gets cached to disk (assuming cacheDir is set and writable). Defaults to 131072 (128 kB). */
cacheTreshold?: number;
/** optional algorithm for the body hash, defaults to sha256 */
hashAlgo?: string;
/** an optional colon separated list of header keys to sign (eg. message-id:date:from:to...') */
headerFieldNames?: string;
/** optional colon separated list of header keys not to sign. This is useful if you want to sign all the relevant keys but your provider changes some values, ie Message-ID and Date. In this case you should use 'message-id:date' to prevent signing these values. */
skipFields?: string;
}
interface SingleKeyOptions extends OptionalOptions {
/** is the domain name to use in the signature */
domainName: string;
/** is the DKIM key selector */
keySelector: string;
/** is the private key for the selector in PEM format */
privateKey: string | { key: string; passphrase: string };
}
interface MultipleKeysOptions extends OptionalOptions {
/** is an optional array of key objects (domainName, keySelector, privateKey) if you want to add more than one signature to the message. If this value is set then the default key values are ignored */
keys: SingleKeyOptions[];
}
type Options = SingleKeyOptions | MultipleKeysOptions;
}
declare class DKIM {
options: DKIM.Options;
keys: Array<string | { key: string; passphrase: string }>;
constructor(options: DKIM.Options);
}
export = DKIM;

54
node_modules/@types/nodemailer/lib/fetch/cookies.d.ts generated vendored Normal file
View File

@ -0,0 +1,54 @@
type s = number;
declare namespace Cookies {
interface Cookie {
name: string;
value?: string;
expires?: Date;
path?: string;
domain?: string;
secure?: boolean;
httponly?: boolean;
}
interface Options {
sessionTimeout?: s;
}
}
/** Creates a biskviit cookie jar for managing cookie values in memory */
declare class Cookies {
options: Cookies.Options;
cookies: Cookies.Cookie[];
constructor(options?: Cookies.Options);
/** Stores a cookie string to the cookie storage */
set(cookieStr: string, url: string): boolean;
/** Returns cookie string for the 'Cookie:' header. */
get(url: string): string;
/** Lists all valied cookie objects for the specified URL */
list(url: string): Cookies.Cookie[];
/** Parses cookie string from the 'Set-Cookie:' header */
parse(cookieStr: string): Cookies.Cookie;
/** Checks if a cookie object is valid for a specified URL */
match(cookie: Cookies.Cookie, url: string): boolean;
/** Adds (or updates/removes if needed) a cookie object to the cookie storage */
add(cookie: Cookies.Cookie): boolean;
/** Checks if two cookie objects are the same */
compare(a: Cookies.Cookie, b: Cookies.Cookie): boolean;
/** Checks if a cookie is expired */
isExpired(cookie: Cookies.Cookie): boolean;
/** Returns normalized cookie path for an URL path argument */
getPath(pathname: string): string;
}
export = Cookies;

38
node_modules/@types/nodemailer/lib/fetch/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,38 @@
/// <reference types="node" />
type ms = number;
import _Cookies = require('./cookies');
import * as http from 'http';
import { Writable } from 'stream';
import * as tls from 'tls';
declare namespace fetch {
type Cookies = _Cookies;
interface WritableResponse extends Writable {
statusCode: number;
headers: http.IncomingHttpHeaders;
}
interface Options {
fetchRes?: Writable;
cookies?: Cookies;
cookie?: string;
redirects?: number;
maxRedirects?: number;
method?: string;
headers?: { [key: string]: string };
userAgent?: string;
body?: Buffer | string | { [key: string]: string };
contentType?: string | false;
tls?: tls.TlsOptions;
timeout?: ms;
allowErrorResponse?: boolean;
}
}
declare function fetch(url: string, options?: fetch.Options): fetch.WritableResponse;
export = fetch;

45
node_modules/@types/nodemailer/lib/json-transport.d.ts generated vendored Normal file
View File

@ -0,0 +1,45 @@
/// <reference types="node" />
import { EventEmitter } from 'events';
import { Transport, TransportOptions } from '..';
import * as shared from './shared';
import Mail = require('./mailer');
import MailMessage = require('./mailer/mail-message');
import MimeNode = require('./mime-node');
declare namespace JSONTransport {
type MailOptions = Mail.Options;
interface Options extends MailOptions, TransportOptions {
jsonTransport: true;
}
interface SentMessageInfo {
/** an envelope object {from:address, to:[address]} */
envelope: MimeNode.Envelope;
/** the Message-ID header value */
messageId: string;
/** JSON string */
message: string;
}
}
declare class JSONTransport implements Transport {
options: JSONTransport.Options;
logger: shared.Logger;
mailer: Mail;
name: string;
version: string;
constructor(options: JSONTransport.Options);
/** Compiles a mailcomposer message and forwards it to handler that sends it */
send(mail: MailMessage, callback: (err: Error | null, info: JSONTransport.SentMessageInfo) => void): void;
}
export = JSONTransport;

25
node_modules/@types/nodemailer/lib/mail-composer.d.ts generated vendored Normal file
View File

@ -0,0 +1,25 @@
/// <reference types="node" />
import { URL } from 'url';
import Mail = require('./mailer');
import MimeNode = require('./mime-node');
/** Creates the object for composing a MimeNode instance out from the mail options */
declare class MailComposer {
mail: Mail.Options;
message: MimeNode | false;
constructor(mail: Mail.Options);
/** Builds MimeNode instance */
compile(): MimeNode;
/** List all attachments. Resulting attachment objects can be used as input for MimeNode nodes */
getAttachments(findRelated: boolean): Mail.Attachment[];
/** List alternatives. Resulting objects can be used as input for MimeNode nodes */
getAlternatives(): Mail.Attachment[];
}
export = MailComposer;

216
node_modules/@types/nodemailer/lib/mailer/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,216 @@
/// <reference types="node" />
import { EventEmitter } from 'events';
import { Socket } from 'net';
import { Readable } from 'stream';
import { Url } from 'url';
import { SentMessageInfo, Transport, TransportOptions } from '../..';
import * as shared from '../shared';
import DKIM = require('../dkim');
import MailMessage = require('./mail-message');
import MimeNode = require('../mime-node');
import SMTPConnection = require('../smtp-connection');
import XOAuth2 = require('../xoauth2');
declare namespace Mail {
type Headers = { [key: string]: string | string[] | { prepared: boolean, value: string } } | Array<{ key: string, value: string }>;
type ListHeader = string | { url: string, comment: string };
interface ListHeaders {
[key: string]: ListHeader | ListHeader[] | ListHeader[][];
}
type TextEncoding = 'quoted-printable' | 'base64';
interface Address {
name: string;
address: string;
}
interface AttachmentLike {
/** String, Buffer or a Stream contents for the attachmentent */
content?: string | Buffer | Readable;
/** path to a file or an URL (data uris are allowed as well) if you want to stream the file instead of including it (better for larger attachments) */
path?: string | Url;
}
interface Attachment extends AttachmentLike {
/** filename to be reported as the name of the attached file, use of unicode is allowed. If you do not want to use a filename, set this value as false, otherwise a filename is generated automatically */
filename?: string | false;
/** optional content id for using inline images in HTML message source. Using cid sets the default contentDisposition to 'inline' and moves the attachment into a multipart/related mime node, so use it only if you actually want to use this attachment as an embedded image */
cid?: string;
/** If set and content is string, then encodes the content to a Buffer using the specified encoding. Example values: base64, hex, binary etc. Useful if you want to use binary attachments in a JSON formatted e-mail object */
encoding?: string;
/** optional content type for the attachment, if not set will be derived from the filename property */
contentType?: string;
/** optional transfer encoding for the attachment, if not set it will be derived from the contentType property. Example values: quoted-printable, base64. If it is unset then base64 encoding is used for the attachment. If it is set to false then previous default applies (base64 for most, 7bit for text). */
contentTransferEncoding?: string;
/** optional content disposition type for the attachment, defaults to attachment */
contentDisposition?: string;
/** is an object of additional headers */
headers?: Headers;
/** an optional value that overrides entire node content in the mime message. If used then all other options set for this node are ignored. */
raw?: string | Buffer | Readable | AttachmentLike;
}
interface IcalAttachment extends AttachmentLike {
/** optional method, case insensitive, defaults to publish. Other possible values would be request, reply, cancel or any other valid calendar method listed in RFC5546. This should match the METHOD: value in calendar event file. */
method?: string;
/** optional filename, defaults to invite.ics */
filename?: string | false;
/** is an alternative for content to load the calendar data from an URL */
href?: string;
/** defines optional content encoding, eg. base64 or hex. This only applies if the content is a string. By default an unicode string is assumed. */
encoding?: string;
}
interface Connection {
connection: Socket;
}
interface Envelope {
/** the first address gets used as MAIL FROM address in SMTP */
from?: string;
/** addresses from this value get added to RCPT TO list */
to?: string;
/** addresses from this value get added to RCPT TO list */
cc?: string;
/** addresses from this value get added to RCPT TO list */
bcc?: string;
}
interface Options {
/** The e-mail address of the sender. All e-mail addresses can be plain 'sender@server.com' or formatted 'Sender Name <sender@server.com>' */
from?: string | Address;
/** An e-mail address that will appear on the Sender: field */
sender?: string | Address;
/** Comma separated list or an array of recipients e-mail addresses that will appear on the To: field */
to?: string | Address | Array<string | Address>;
/** Comma separated list or an array of recipients e-mail addresses that will appear on the Cc: field */
cc?: string | Address | Array<string | Address>;
/** Comma separated list or an array of recipients e-mail addresses that will appear on the Bcc: field */
bcc?: string | Address | Array<string | Address>;
/** An e-mail address that will appear on the Reply-To: field */
replyTo?: string | Address;
/** The message-id this message is replying */
inReplyTo?: string | Address;
/** Message-id list (an array or space separated string) */
references?: string | string[];
/** The subject of the e-mail */
subject?: string;
/** The plaintext version of the message */
text?: string | Buffer | Readable | AttachmentLike;
/** The HTML version of the message */
html?: string | Buffer | Readable | AttachmentLike;
/** Apple Watch specific HTML version of the message, same usage as with text and html */
watchHtml?: string | Buffer | Readable | AttachmentLike;
/** iCalendar event, same usage as with text and html. Event method attribute defaults to PUBLISH or define it yourself: {method: 'REQUEST', content: iCalString}. This value is added as an additional alternative to html or text. Only utf-8 content is allowed */
icalEvent?: string | Buffer | Readable | IcalAttachment;
/** An object or array of additional header fields */
headers?: Headers;
/** An object where key names are converted into list headers. List key help becomes List-Help header etc. */
list?: ListHeaders;
/** An array of attachment objects */
attachments?: Attachment[];
/** An array of alternative text contents (in addition to text and html parts) */
alternatives?: Attachment[];
/** optional SMTP envelope, if auto generated envelope is not suitable */
envelope?: Envelope | MimeNode.Envelope;
/** optional Message-Id value, random value will be generated if not set */
messageId?: string;
/** optional Date value, current UTC string will be used if not set */
date?: Date | string;
/** optional transfer encoding for the textual parts */
encoding?: string;
/** if set then overwrites entire message output with this value. The value is not parsed, so you should still set address headers or the envelope value for the message to work */
raw?: string | Buffer | Readable | AttachmentLike;
/** set explicitly which encoding to use for text parts (quoted-printable or base64). If not set then encoding is detected from text content (mostly ascii means quoted-printable, otherwise base64) */
textEncoding?: TextEncoding;
/** if set to true then fails with an error when a node tries to load content from URL */
disableUrlAccess?: boolean;
/** if set to true then fails with an error when a node tries to load content from a file */
disableFileAccess?: boolean;
/** is an object with DKIM options */
dkim?: DKIM.Options;
/** method to normalize header keys for custom caseing */
normalizeHeaderKey?(key: string): string;
}
type PluginFunction = (mail: MailMessage, callback: (err?: Error | null) => void) => void;
}
/** Creates an object for exposing the Mail API */
declare class Mail extends EventEmitter {
options: Mail.Options;
meta: Map<string, any>;
dkim: DKIM;
transporter: Transport;
logger: shared.Logger;
/** Usage: typeof transporter.MailMessage */
MailMessage: MailMessage;
constructor(transporter: Transport, options: TransportOptions, defaults: TransportOptions);
/** Closes all connections in the pool. If there is a message being sent, the connection is closed later */
close(): void;
/** Returns true if there are free slots in the queue */
isIdle(): boolean;
/** Verifies SMTP configuration */
verify(callback: (err: Error | null, success: true) => void): void;
verify(): Promise<true>;
use(step: string, plugin: Mail.PluginFunction): void; // TODO Plugin?
/** Sends an email using the preselected transport object */
sendMail(mailOptions: Mail.Options, callback: (err: Error | null, info: SentMessageInfo) => void): void;
sendMail(mailOptions: Mail.Options): Promise<SentMessageInfo>;
getVersionString(): string;
/** Sets up proxy handler for a Nodemailer object */
setupProxy(proxyUrl: string): void;
set(key: 'oauth2_provision_cb', value: (user: string, renew: boolean, callback: (err: Error | null, accessToken?: string, expires?: number) => void) => void): Map<string, any>;
set(key: 'proxy_handler_http' | 'proxy_handler_https' | 'proxy_handler_socks' | 'proxy_handler_socks5' | 'proxy_handler_socks4' | 'proxy_handler_socks4a', value: (proxy: Url, options: TransportOptions, callback: (err: Error | null, socketOptions?: { connection: Socket }) => void) => void): Map<string, any>;
set(key: string, value: any): Map<string, any>;
get(key: 'oauth2_provision_cb'): (user: string, renew: boolean, callback: (err: Error | null, accessToken: string, expires: number) => void) => void;
get(key: 'proxy_handler_http' | 'proxy_handler_https' | 'proxy_handler_socks' | 'proxy_handler_socks5' | 'proxy_handler_socks4' | 'proxy_handler_socks4a'): (proxy: Url, options: TransportOptions, callback: (err: Error | null, socketOptions: { connection: Socket }) => void) => void;
get(key: string): any;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'idle', listener: () => void): this;
addListener(event: 'token', listener: (token: XOAuth2.Token) => void): this;
emit(event: 'error', error: Error): boolean;
emit(event: 'idle'): boolean;
emit(event: 'token', token: XOAuth2.Token): boolean;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'idle', listener: () => void): this;
on(event: 'token', listener: (token: XOAuth2.Token) => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'idle', listener: () => void): this;
once(event: 'token', listener: (token: XOAuth2.Token) => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'idle', listener: () => void): this;
prependListener(event: 'end', listener: (token: XOAuth2.Token) => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'idle', listener: () => void): this;
prependOnceListener(event: 'end', listener: (token: XOAuth2.Token) => void): this;
listeners(event: 'error'): Array<(err: Error) => void>;
listeners(event: 'idle'): Array<() => void>;
listeners(event: 'end'): Array<(token: XOAuth2.Token) => void>;
}
export = Mail;

View File

@ -0,0 +1,28 @@
/// <reference types="node" />
import { Readable } from 'stream';
import Mail = require('.');
import MimeNode = require('../mime-node');
declare class MailMessage {
mailer: Mail;
data: Mail.Options;
message: MimeNode;
constructor(mailer: Mail, data: Mail.Options);
resolveContent(data: object | any[], key: string | number, callback: (err: Error | null, value?: any) => any): Promise<any>;
resolveAll(callback: (err?: Error | null, data?: Mail.Options) => void): void;
normalize(callback: (err?: Error | null, data?: Mail.Options) => void): void;
setMailerHeader(): void;
setPriorityHeaders(): void;
setListHeaders(): void;
}
export = MailMessage;

View File

@ -0,0 +1,87 @@
export interface HeaderValue {
value: string;
params?: { [key: string]: string };
}
export interface ParsedHeaderValue extends HeaderValue {
params: { [key: string]: string };
}
export interface ParsedHeaderParam {
key: string;
value: string;
}
/** Checks if a value is plaintext string (uses only printable 7bit chars) */
export function isPlainText(value: string): boolean;
/**
* Checks if a multi line string containes lines longer than the selected value.
*
* Useful when detecting if a mail message needs any processing at all
* if only plaintext characters are used and lines are short, then there is
* no need to encode the values in any way. If the value is plaintext but has
* longer lines then allowed, then use format=flowed
*/
export function hasLongerLines(str: string, lineLength: number): boolean;
/** Encodes a string or an Buffer to an UTF-8 MIME Word (rfc2047) */
export function encodeWord(data: Buffer | string, mimeWordEncoding?: 'Q' | 'B', maxLength?: number): string;
/** Finds word sequences with non ascii text and converts these to mime words */
export function encodeWords(value: string, mimeWordEncoding?: 'Q' | 'B', maxLength?: number): string;
/**
* Joins parsed header value together as 'value; param1=value1; param2=value2'
* PS: We are following RFC 822 for the list of special characters that we need to keep in quotes.
* Refer: https://www.w3.org/Protocols/rfc1341/4_Content-Type.html
*/
export function buildHeaderValue(structured: HeaderValue): string;
/**
* Encodes a string or an Buffer to an UTF-8 Parameter Value Continuation encoding (rfc2231)
* Useful for splitting long parameter values.
*
* For example
* ```
* title="unicode string"
* ```
* becomes
* ```
* title*0*=utf-8''unicode
* title*1*=%20string
* ```
*/
export function buildHeaderParam(key: string, data: Buffer | string, maxLength?: number): ParsedHeaderParam[];
/**
* Parses a header value with key=value arguments into a structured
* object.
*
* ```
* parseHeaderValue('content-type: text/plain; CHARSET='UTF-8') ->
* {
* 'value': 'text/plain',
* 'params': {
* 'charset': 'UTF-8'
* }
* }
* ```
*/
export function parseHeaderValue(str: string): ParsedHeaderValue;
/** Returns file extension for a content type string. If no suitable extensions are found, 'bin' is used as the default extension */
export function detectExtension(mimeType: string): string;
/** Returns content type for a file extension. If no suitable content types are found, 'application/octet-stream' is used as the default content type */
export function detectMimeType(extension: string): string;
/** Folds long lines, useful for folding header lines (afterSpace=false) and flowed text (afterSpace=true) */
export function foldLines(str: string, lineLength?: number, afterSpace?: boolean): string;
/** Splits a mime encoded string. Needed for dividing mime words into smaller chunks */
export function splitMimeEncodedString(str: string, maxlen?: number): string[];
export function encodeURICharComponent(chr: string): string;
export function safeEncodeURIComponent(str: string): string;

View File

@ -0,0 +1,2 @@
export function detectMimeType(filename: string | false): string;
export function detectExtension(mimeType: string | false): string;

133
node_modules/@types/nodemailer/lib/mime-node.d.ts generated vendored Normal file
View File

@ -0,0 +1,133 @@
/// <reference types="node" />
import { Readable, ReadableOptions, Transform } from 'stream';
import Mail = require('./mailer');
import SMTPConnection = require('./smtp-connection');
declare namespace MimeNode {
interface Addresses {
from?: string[];
sender?: string[];
'reply-to'?: string[];
to?: string[];
cc?: string[];
bcc?: string[];
}
interface Envelope {
/** includes an address object or is set to false */
from: string | false;
/** includes an array of address objects */
to: string[];
}
interface Options {
/** root node for this tree */
rootNode?: MimeNode;
/** immediate parent for this node */
parentNode?: MimeNode;
/** filename for an attachment node */
filename?: string;
/** shared part of the unique multipart boundary */
baseBoundary?: string;
/** If true, do not exclude Bcc from the generated headers */
keepBcc?: boolean;
/** either 'Q' (the default) or 'B' */
textEncoding?: 'B' | 'Q';
/** method to normalize header keys for custom caseing */
normalizeHeaderKey?(key: string): string;
}
}
/**
* Creates a new mime tree node. Assumes 'multipart/*' as the content type
* if it is a branch, anything else counts as leaf. If rootNode is missing from
* the options, assumes this is the root.
*/
declare class MimeNode {
constructor(contentType: string, options?: MimeNode.Options);
/** Creates and appends a child node.Arguments provided are passed to MimeNode constructor */
createChild(contentType: string, options?: MimeNode.Options): MimeNode;
/** Appends an existing node to the mime tree. Removes the node from an existing tree if needed */
appendChild(childNode: MimeNode): MimeNode;
/** Replaces current node with another node */
replace(node: MimeNode): MimeNode;
/** Removes current node from the mime tree */
remove(): this;
/**
* Sets a header value. If the value for selected key exists, it is overwritten.
* You can set multiple values as well by using [{key:'', value:''}] or
* {key: 'value'} as the first argument.
*/
setHeader(key: string, value: string | string[]): this;
setHeader(headers: { [key: string]: string } | Array<{ key: string, value: string }>): this;
/**
* Adds a header value. If the value for selected key exists, the value is appended
* as a new field and old one is not touched.
* You can set multiple values as well by using [{key:'', value:''}] or
* {key: 'value'} as the first argument.
*/
addHeader(key: string, value: string): this;
addHeader(headers: { [key: string]: string } | Array<{ key: string, value: string }>): this;
/** Retrieves the first mathcing value of a selected key */
getHeader(key: string): string;
/**
* Sets body content for current node. If the value is a string, charset is added automatically
* to Content-Type (if it is text/*). If the value is a Buffer, you need to specify
* the charset yourself
*/
setContent(content: string | Buffer | Readable): this;
/** Generate the message and return it with a callback */
build(callback: (err: Error | null, buf: Buffer) => void): void;
getTransferEncoding(): string;
/** Builds the header block for the mime node. Append \r\n\r\n before writing the content */
buildHeaders(): string;
/**
* Streams the rfc2822 message from the current node. If this is a root node,
* mandatory header fields are set if missing (Date, Message-Id, MIME-Version)
*/
createReadStream(options?: ReadableOptions): Readable;
/**
* Appends a transform stream object to the transforms list. Final output
* is passed through this stream before exposing
*/
transform(transform: Transform): void;
/**
* Appends a post process function. The functon is run after transforms and
* uses the following syntax
*
* processFunc(input) -> outputStream
*/
processFunc(processFunc: (outputStream: Readable) => Readable): void;
stream(outputStream: Readable, options: ReadableOptions, done: (err?: Error | null) => void): void;
/** Sets envelope to be used instead of the generated one */
setEnvelope(envelope: Mail.Envelope): this;
/** Generates and returns an object with parsed address fields */
getAddresses(): MimeNode.Addresses;
/** Generates and returns SMTP envelope with the sender address and a list of recipients addresses */
getEnvelope(): MimeNode.Envelope;
/** Sets pregenerated content that will be used as the output of this node */
setRaw(raw: string | Buffer | Readable): this;
}
export = MimeNode;

23
node_modules/@types/nodemailer/lib/qp.d.ts generated vendored Normal file
View File

@ -0,0 +1,23 @@
/// <reference types="node" />
import { Transform, TransformOptions } from 'stream';
/** Encodes a Buffer into a Quoted-Printable encoded string */
export function encode(buffer: Buffer | string): string;
/** Adds soft line breaks to a Quoted-Printable string */
export function wrap(str: string, lineLength?: number): string;
export interface EncoderOptions extends TransformOptions {
lineLength?: number | false;
}
/** Creates a transform stream for encoding data to Quoted-Printable encoding */
export class Encoder extends Transform {
options: TransformOptions;
inputBytes: number;
outputBytes: number;
constructor(options?: TransformOptions);
}

View File

@ -0,0 +1,49 @@
/// <reference types="node" />
import { EventEmitter } from 'events';
import { Transport, TransportOptions } from '..';
import * as shared from './shared';
import Mail = require('./mailer');
import MailMessage = require('./mailer/mail-message');
import MimeNode = require('./mime-node');
declare namespace SendmailTransport {
type MailOptions = Mail.Options;
interface Options extends MailOptions, TransportOptions {
sendmail: true;
/** path to the sendmail command (defaults to sendmail) */
path?: string;
/** either windows or unix (default). Forces all newlines in the output to either use Windows syntax <CR><LF> or Unix syntax <LF> */
newline?: string;
/** an optional array of command line options to pass to the sendmail command (ie. ["-f", "foo@blurdybloop.com"]). This overrides all default arguments except for -i and recipient list so you need to make sure you have all required arguments set (ie. the -f flag). */
args?: string[];
}
interface SentMessageInfo {
envelope: MimeNode.Envelope;
messageId: string;
response: string;
}
}
declare class SendmailTransport implements Transport {
options: SendmailTransport.Options;
logger: shared.Logger;
mailer: Mail;
name: string;
version: string;
path: string;
args: string[] | false;
winbreak: boolean;
constructor(options: SendmailTransport.Options);
/** Compiles a mailcomposer message and forwards it to handler that sends it */
send(mail: MailMessage, callback: (err: Error | null, info: SendmailTransport.SentMessageInfo) => void): void;
}
export = SendmailTransport;

84
node_modules/@types/nodemailer/lib/ses-transport.d.ts generated vendored Normal file
View File

@ -0,0 +1,84 @@
/// <reference types="node" />
import { EventEmitter } from 'events';
import { Transport, TransportOptions } from '..';
import * as shared from './shared';
import Mail = require('./mailer');
import MailMessage = require('./mailer/mail-message');
import MimeNode = require('./mime-node');
declare namespace SESTransport {
interface MailOptions extends Mail.Options {
/** All keys are added to the SendRawEmail method options */
ses?: object;
}
interface Options extends MailOptions, TransportOptions {
/** is an option that expects an instantiated aws.SES object */
SES: any; // aws-sdk.SES object
/** How many messages per second is allowed to be delivered to SES */
maxConnections?: number;
/** How many parallel connections to allow towards SES */
sendingRate?: number;
}
interface SentMessageInfo {
/** an envelope object {from:address, to:[address]} */
envelope: MimeNode.Envelope;
/** the Message-ID header value. This value is derived from the response of SES API, so it differs from the Message-ID values used in logging. */
messageId: string;
response: string;
}
}
declare class SESTransport extends EventEmitter implements Transport {
options: SESTransport.Options;
logger: shared.Logger;
mailer: Mail;
name: string;
version: string;
ses: any;
maxConnections: number;
connections: number;
sendingRate: number;
sendingRateTTL: number | null;
rateInterval: number;
rateMessages: Array<{ ts: number, pending: boolean }>;
pending: Array<{ mail: Mail; callback(err: Error | null, info: SESTransport.SentMessageInfo): void; }>;
idling: boolean;
constructor(options: SESTransport.Options);
/** Schedules a sending of a message */
send(mail: MailMessage, callback: (err: Error | null, info: SESTransport.SentMessageInfo) => void): void;
/** Returns true if there are free slots in the queue */
isIdle(): boolean;
/** Verifies SES configuration */
verify(callback: (err: Error | null, success: true) => void): void;
verify(): Promise<true>;
addListener(event: 'idle', listener: () => void): this;
emit(event: 'idle'): boolean;
on(event: 'idle', listener: () => void): this;
once(event: 'idle', listener: () => void): this;
prependListener(event: 'idle', listener: () => void): this;
prependOnceListener(event: 'idle', listener: () => void): this;
listeners(event: 'idle'): Array<() => void>;
}
export = SESTransport;

38
node_modules/@types/nodemailer/lib/shared.d.ts generated vendored Normal file
View File

@ -0,0 +1,38 @@
/// <reference types="node" />
import SMTPConnection = require('./smtp-connection');
import * as stream from 'stream';
export type LoggerLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';
export interface Logger {
level(level: LoggerLevel): void;
trace(...params: any[]): void;
debug(...params: any[]): void;
info(...params: any[]): void;
warn(...params: any[]): void;
error(...params: any[]): void;
fatal(...params: any[]): void;
}
/** Parses connection url to a structured configuration object */
export function parseConnectionUrl(url: string): SMTPConnection.Options;
/** Returns a bunyan-compatible logger interface. Uses either provided logger or creates a default console logger */
export function getLogger(options?: { [key: string]: any }, defaults?: { [key: string]: any }): Logger;
/** Wrapper for creating a callback than either resolves or rejects a promise based on input */
export function callbackPromise(resolve: (...args: any[]) => void, reject: (err: Error) => void): () => void;
/**
* Resolves a String or a Buffer value for content value. Useful if the value
* is a Stream or a file or an URL. If the value is a Stream, overwrites
* the stream object with the resolved value (you can't stream a value twice).
*
* This is useful when you want to create a plugin that needs a content value,
* for example the `html` or `text` value as a String or a Buffer but not as
* a file path or an URL.
*/
export function resolveContent(data: object | any[], key: string | number, callback: (err: Error | null, value: Buffer | string) => void): void;
export function resolveContent(data: object | any[], key: string | number): Promise<Buffer | string>;
/** Copies properties from source objects to target objects */
export function assign(target: object, ...sources: object[]): object;
export function encodeXText(str: string): string;

210
node_modules/@types/nodemailer/lib/smtp-connection.d.ts generated vendored Normal file
View File

@ -0,0 +1,210 @@
/// <reference types="node" />
import { EventEmitter } from 'events';
import * as net from 'net';
import { Writable } from 'stream';
import * as tls from 'tls';
import * as shared from './shared';
import MimeNode = require('./mime-node');
import XOAuth2 = require('./xoauth2');
type ms = number;
declare namespace SMTPConnection {
interface Credentials {
/** the username */
user: string;
/** then password */
pass: string;
}
type OAuth2 = XOAuth2.Options;
interface AuthenticationTypeLogin extends Credentials {
/** indicates the authetication type, defaults to login, other option is oauth2 */
type?: 'login' | 'Login' | 'LOGIN';
}
interface AuthenticationTypeOAuth2 extends OAuth2 {
/** indicates the authetication type, defaults to login, other option is oauth2 */
type?: 'oauth2' | 'OAuth2' | 'OAUTH2';
}
type AuthenticationType = AuthenticationTypeLogin | AuthenticationTypeOAuth2;
interface AuthenticationCredentials {
/** normal authentication object */
credentials: Credentials;
}
interface AuthenticationOAuth2 {
/** if set then forces smtp-connection to use XOAuth2 for authentication */
oauth2: OAuth2;
}
type DSNOption = 'NEVER' | 'SUCCESS' | 'FAILURE' | 'DELAY';
interface DSNOptions {
/** return either the full message FULL or only headers HDRS */
ret?: 'Full' | 'HDRS';
/** senders envelope identifier for tracking */
envid?: string;
/** when to send a DSN. Multiple options are OK - array or comma delimited. NEVER must appear by itself. */
notify?: DSNOption | DSNOption[];
/** original recipient */
orcpt?: string;
}
interface Envelope {
/** includes an address object or is set to false */
from: string | false;
/** the recipient address or an array of addresses */
to: string | string[];
/** an optional value of the predicted size of the message in bytes. This value is used if the server supports the SIZE extension (RFC1870) */
size?: number;
/** if true then inform the server that this message might contain bytes outside 7bit ascii range */
use8BitMime?: boolean;
/** the dsn options */
dsn?: DSNOptions;
}
interface SMTPError extends NodeJS.ErrnoException {
/** string code identifying the error, for example EAUTH is returned when authentication */
code?: string;
/** the last response received from the server (if the error is caused by an error response from the server) */
response?: string;
/** the numeric response code of the response string (if available) */
responseCode?: number;
/** command which provoked an error */
command?: string;
}
interface SentMessageInfo {
/** an array of accepted recipient addresses. Normally this array should contain at least one address except when in LMTP mode. In this case the message itself might have succeeded but all recipients were rejected after sending the message. */
accepted: string[];
/** an array of rejected recipient addresses. This array includes both the addresses that were rejected before sending the message and addresses rejected after sending it if using LMTP */
rejected: string[];
/** if some recipients were rejected then this property holds an array of error objects for the rejected recipients */
rejectedErrors?: SMTPError[];
/** the last response received from the server */
response: string;
/** how long was envelope prepared */
envelopeTime: number;
/** how long was send stream prepared */
messageTime: number;
/** how many bytes were streamed */
messageSize: number;
}
interface Options {
/** the hostname or IP address to connect to (defaults to localhost) */
host?: string;
/** the port to connect to (defaults to 25 or 465) */
port?: number;
/** defines authentication data */
auth?: AuthenticationType;
/** defines if the connection should use SSL (if true) or not (if false) */
secure?: boolean;
/** turns off STARTTLS support if true */
ignoreTLS?: boolean;
/** forces the client to use STARTTLS. Returns an error if upgrading the connection is not possible or fails. */
requireTLS?: boolean;
/** tries to use STARTTLS and continues normally if it fails */
opportunisticTLS?: boolean;
/** optional hostname of the client, used for identifying to the server */
name?: string;
/** the local interface to bind to for network connections */
localAddress?: string;
/** how many milliseconds to wait for the connection to establish */
connectionTimeout?: ms;
/** how many milliseconds to wait for the greeting after connection is established */
greetingTimeout?: ms;
/** how many milliseconds of inactivity to allow */
socketTimeout?: ms;
/** optional bunyan compatible logger instance. If set to true then logs to console. If value is not set or is false then nothing is logged */
logger?: shared.Logger | boolean;
/** if set to true, then logs SMTP traffic without message content */
transactionLog?: boolean;
/** if set to true, then logs SMTP traffic and message content, otherwise logs only transaction events */
debug?: boolean;
/** defines preferred authentication method, e.g. PLAIN */
authMethod?: string;
/** defines additional options to be passed to the socket constructor, e.g. {rejectUnauthorized: true} */
tls?: tls.ConnectionOptions;
/** initialized socket to use instead of creating a new one */
socket?: net.Socket;
/** connected socket to use instead of creating and connecting a new one. If secure option is true, then socket is upgraded from plaintext to ciphertext */
connection?: net.Socket;
}
}
declare class SMTPConnection extends EventEmitter {
options: SMTPConnection.Options;
logger: shared.Logger;
id: string;
stage: 'init' | 'connected';
secureConnection: boolean;
alreadySecured: boolean;
port: number;
host: string;
name: string;
/** Expose version nr, just for the reference */
version: string;
/** If true, then the user is authenticated */
authenticated: boolean;
/** If set to true, this instance is no longer active */
destroyed: boolean;
/** Defines if the current connection is secure or not. If not, STARTTLS can be used if available */
secure: boolean;
lastServerResponse: string | false;
/** The socket connecting to the server */
_socket: net.Socket;
constructor(options?: SMTPConnection.Options);
/** Creates a connection to a SMTP server and sets up connection listener */
connect(callback: () => void): void;
/** Sends QUIT */
quit(): void;
/** Closes the connection to the server */
close(): void;
/** Authenticate user */
login(auth: SMTPConnection.AuthenticationCredentials | SMTPConnection.AuthenticationOAuth2 | SMTPConnection.Credentials, callback: (err: SMTPConnection.SMTPError | null) => void): void;
/** Sends a message */
send(envelope: SMTPConnection.Envelope, message: string | Buffer | Writable, callback: (err: SMTPConnection.SMTPError | null, info: SMTPConnection.SentMessageInfo) => void): void;
/** Resets connection state */
reset(callback: (err: Error | null) => void): void;
addListener(event: 'connect' | 'end', listener: () => void): this;
addListener(event: 'error', listener: (err: SMTPConnection.SMTPError) => void): this;
emit(event: 'connect' | 'end'): boolean;
emit(event: 'error', error: Error): boolean;
on(event: 'connect' | 'end', listener: () => void): this;
on(event: 'error', listener: (err: SMTPConnection.SMTPError) => void): this;
once(event: 'connect' | 'end', listener: () => void): this;
once(event: 'error', listener: (err: SMTPConnection.SMTPError) => void): this;
prependListener(event: 'connect' | 'end', listener: () => void): this;
prependListener(event: 'error', listener: (err: SMTPConnection.SMTPError) => void): this;
prependOnceListener(event: 'connect' | 'end', listener: () => void): this;
prependOnceListener(event: 'error', listener: (err: SMTPConnection.SMTPError) => void): this;
listeners(event: 'connect' | 'end'): Array<() => void>;
listeners(event: 'error'): Array<(err: SMTPConnection.SMTPError) => void>;
}
export = SMTPConnection;

87
node_modules/@types/nodemailer/lib/smtp-pool.d.ts generated vendored Normal file
View File

@ -0,0 +1,87 @@
/// <reference types="node" />
import { EventEmitter } from 'events';
import { Transport, TransportOptions } from '..';
import * as shared from './shared';
import Mail = require('./mailer');
import MailMessage = require('./mailer/mail-message');
import MimeNode = require('./mime-node');
import SMTPConnection = require('./smtp-connection');
declare namespace SMTPPool {
interface MailOptions extends Mail.Options {
auth?: SMTPConnection.AuthenticationType;
dsn?: SMTPConnection.DSNOptions;
}
interface Options extends MailOptions, TransportOptions, SMTPConnection.Options {
/** set to true to use pooled connections (defaults to false) instead of creating a new connection for every email */
pool: true;
service?: string;
getSocket?(options: Options, callback: (err: Error | null, socketOptions: any) => void): void; // TODO http.ClientRequest?
url?: string;
/** the count of maximum simultaneous connections to make against the SMTP server (defaults to 5) */
maxConnections?: number;
/** limits the message count to be sent using a single connection (defaults to 100). After maxMessages is reached the connection is dropped and a new one is created for the following messages */
maxMessages?: number;
/** defines the time measuring period in milliseconds (defaults to 1000, ie. to 1 second) for rate limiting */
rateDelta?: number;
/** limits the message count to be sent in rateDelta time. Once rateLimit is reached, sending is paused until the end of the measuring period. This limit is shared between connections, so if one connection uses up the limit, then other connections are paused as well. If rateLimit is not set then sending rate is not limited */
rateLimit?: number;
}
interface SentMessageInfo extends SMTPConnection.SentMessageInfo {
/** includes the envelope object for the message */
envelope: MimeNode.Envelope;
/** most transports should return the final Message-Id value used with this property */
messageId: string;
}
}
declare class SMTPPool extends EventEmitter implements Transport {
options: SMTPPool.Options;
mailer: Mail;
logger: shared.Logger;
name: string;
version: string;
idling: boolean;
constructor(options: SMTPPool.Options | string);
/** Placeholder function for creating proxy sockets. This method immediatelly returns without a socket */
getSocket(options: SMTPPool.Options, callback: (err: Error | null, socketOptions: any) => void): void;
/** Sends an e-mail using the selected settings */
send(mail: MailMessage, callback: (err: Error | null, info: SMTPPool.SentMessageInfo) => void): void;
/** Closes all connections in the pool. If there is a message being sent, the connection is closed later */
close(): void;
/** Returns true if there are free slots in the queue */
isIdle(): boolean;
/** Verifies SMTP configuration */
verify(callback: (err: Error | null, success: true) => void): void;
verify(): Promise<true>;
addListener(event: 'idle', listener: () => void): this;
emit(event: 'idle'): boolean;
on(event: 'idle', listener: () => void): this;
once(event: 'idle', listener: () => void): this;
prependListener(event: 'idle', listener: () => void): this;
prependOnceListener(event: 'idle', listener: () => void): this;
listeners(event: 'idle'): Array<() => void>;
}
export = SMTPPool;

80
node_modules/@types/nodemailer/lib/smtp-transport.d.ts generated vendored Normal file
View File

@ -0,0 +1,80 @@
/// <reference types="node" />
import { EventEmitter } from 'events';
import * as stream from 'stream';
import { Transport, TransportOptions } from '..';
import * as shared from './shared';
import Mail = require('./mailer');
import MailMessage = require('./mailer/mail-message');
import MimeNode = require('./mime-node');
import SMTPConnection = require('./smtp-connection');
import XOAuth2 = require('./xoauth2');
declare namespace SMTPTransport {
interface AuthenticationTypeLogin {
type: 'LOGIN';
user: string;
credentials: SMTPConnection.Credentials;
method: string | false;
}
interface AuthenticationTypeOAuth2 {
type: 'OAUTH2';
user: string;
oauth2: XOAuth2;
method: 'XOAUTH2';
}
type AuthenticationType = AuthenticationTypeLogin | AuthenticationTypeOAuth2;
interface MailOptions extends Mail.Options {
auth?: SMTPConnection.AuthenticationType;
dsn?: SMTPConnection.DSNOptions;
}
interface Options extends MailOptions, TransportOptions, SMTPConnection.Options {
service?: string;
getSocket?(options: Options, callback: (err: Error | null, socketOptions: any) => void): void; // TODO http.ClientRequest?
url?: string;
}
interface SentMessageInfo {
/** includes the envelope object for the message */
envelope: MimeNode.Envelope;
/** most transports should return the final Message-Id value used with this property */
messageId: string;
}
}
declare class SMTPTransport extends EventEmitter implements Transport {
options: SMTPTransport.Options;
mailer: Mail;
logger: shared.Logger;
name: string;
version: string;
auth: SMTPTransport.AuthenticationType;
constructor(options: SMTPTransport.Options | string);
/** Placeholder function for creating proxy sockets. This method immediatelly returns without a socket */
getSocket(options: SMTPTransport.Options, callback: (err: Error | null, socketOptions: object) => void): void;
getAuth(authOpts: SMTPConnection.AuthenticationTypeLogin | SMTPConnection.AuthenticationTypeOAuth2): SMTPTransport.AuthenticationType;
/** Sends an e-mail using the selected settings */
send(mail: MailMessage, callback: (err: Error | null, info: SMTPTransport.SentMessageInfo) => void): void;
/** Verifies SMTP configuration */
verify(callback: (err: Error | null, success: true) => void): void;
verify(): Promise<true>;
/** Releases resources */
close(): void;
}
export = SMTPTransport;

View File

@ -0,0 +1,52 @@
/// <reference types="node" />
import { EventEmitter } from 'events';
import { Readable } from 'stream';
import { Transport, TransportOptions } from '..';
import * as shared from './shared';
import Mail = require('./mailer');
import MailMessage = require('./mailer/mail-message');
import MimeNode = require('./mime-node');
declare namespace StreamTransport {
type MailOptions = Mail.Options;
interface Options extends MailOptions, TransportOptions {
streamTransport: true;
/** if true, then returns the message as a Buffer object instead of a stream */
buffer?: boolean;
/** either windows or unix (default). Forces all newlines in the output to either use Windows syntax <CR><LF> or Unix syntax <LF> */
newline?: string;
}
interface SentMessageInfo {
/** an envelope object {from:address, to:[address]} */
envelope: MimeNode.Envelope;
/** the Message-ID header value */
messageId: string;
/** either stream (default) of buffer depending on the options */
message: Buffer | Readable;
}
}
declare class StreamTransport implements Transport {
options: StreamTransport.Options;
logger: shared.Logger;
mailer: Mail;
name: string;
version: string;
winbreak: boolean;
constructor(options: StreamTransport.Options);
/** Compiles a mailcomposer message and forwards it to handler that sends it */
send(mail: MailMessage, callback: (err: Error | null, info: StreamTransport.SentMessageInfo) => void): void;
}
export = StreamTransport;

6
node_modules/@types/nodemailer/lib/well-known.d.ts generated vendored Normal file
View File

@ -0,0 +1,6 @@
import SMTPConnection = require('./smtp-connection');
/** Resolves SMTP config for given key. Key can be a name (like 'Gmail'), alias (like 'Google Mail') or an email address (like 'test@googlemail.com'). */
declare function wellKnown(key: string): SMTPConnection.Options | false;
export = wellKnown;

104
node_modules/@types/nodemailer/lib/xoauth2.d.ts generated vendored Normal file
View File

@ -0,0 +1,104 @@
/// <reference types="node" />
import * as http from 'http';
import { Readable, Stream } from 'stream';
import * as shared from './shared';
type ms = number;
type s = number;
declare namespace XOAuth2 {
interface Options {
/** User e-mail address */
user?: string;
/** Client ID value */
clientId?: string;
/** Client secret value */
clientSecret?: string;
/** Refresh token for an user */
refreshToken?: string;
/** Endpoint for token generation, defaults to 'https://accounts.google.com/o/oauth2/token' */
accessUrl?: string;
/** An existing valid accessToken */
accessToken?: string;
/** Private key for JSW */
privateKey?: string | { key: string; passphrase: string; };
/** Optional Access Token expire time in ms */
expires?: ms;
/** Optional TTL for Access Token in seconds */
timeout?: s;
/** Function to run when a new access token is required */
provisionCallback?(user: string, renew: boolean, callback: (err: Error | null, accessToken: string, expires: number) => void): void;
}
interface Token {
user: string;
accessToken: string;
expires: number;
}
interface RequestParams {
customHeaders?: http.OutgoingHttpHeaders;
}
}
declare class XOAuth2 extends Stream {
options: XOAuth2.Options;
logger: shared.Logger;
accessToken: string | false;
expires: number;
constructor(options: XOAuth2.Options, logger: shared.Logger);
/** Returns or generates (if previous has expired) a XOAuth2 token */
getToken(renew: boolean, callback: (err: Error | null, accessToken: string) => void): void;
/** Updates token values */
updateToken(accessToken: string, timeout: s): XOAuth2.Token;
/** Generates a new XOAuth2 token with the credentials provided at initialization */
generateToken(callback: (err: Error | null, accessToken: string) => void): void;
/** Converts an access_token and user id into a base64 encoded XOAuth2 token */
buildXOAuth2Token(accessToken: string): string;
/**
* Custom POST request handler.
* This is only needed to keep paths short in Windows usually this module
* is a dependency of a dependency and if it tries to require something
* like the request module the paths get way too long to handle for Windows.
* As we do only a simple POST request we do not actually require complicated
* logic support (no redirects, no nothing) anyway.
*/
postRequest(url: string, payload: string | Buffer | Readable | { [key: string]: string }, params: XOAuth2.RequestParams, callback: (err: Error | null, buf: Buffer) => void): void;
/** Encodes a buffer or a string into Base64url format */
toBase64URL(data: Buffer | string): string;
/** Creates a JSON Web Token signed with RS256 (SHA256 + RSA) */
jwtSignRS256(payload: object): string;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'token', listener: (token: XOAuth2.Token) => void): this;
emit(event: 'error', error: Error): boolean;
emit(event: 'token', token: XOAuth2.Token): boolean;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'token', listener: (token: XOAuth2.Token) => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'token', listener: (token: XOAuth2.Token) => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'end', listener: (token: XOAuth2.Token) => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'end', listener: (token: XOAuth2.Token) => void): this;
listeners(event: 'error'): Array<(err: Error) => void>;
listeners(event: 'end'): Array<(token: XOAuth2.Token) => void>;
}
export = XOAuth2;

55
node_modules/@types/nodemailer/package.json generated vendored Normal file
View File

@ -0,0 +1,55 @@
{
"_from": "@types/nodemailer",
"_id": "@types/nodemailer@4.6.0",
"_inBundle": false,
"_integrity": "sha512-DWG172izmWXfShUm2Lm6nVght5TxDI1cx2cKiGPeu2f66yTnn0QY7WhC9OSybdPoxGu7UbRXNuIkIzB+NE648A==",
"_location": "/@types/nodemailer",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "@types/nodemailer",
"name": "@types/nodemailer",
"escapedName": "@types%2fnodemailer",
"scope": "@types",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#DEV:/",
"#USER"
],
"_resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-4.6.0.tgz",
"_shasum": "542ecb5fff91cd3d841fc67cace0527649030462",
"_spec": "@types/nodemailer",
"_where": "/home/wn/workspace-node/homepage",
"bundleDependencies": false,
"contributors": [
{
"name": "Rogier Schouten",
"url": "https://github.com/rogierschouten"
},
{
"name": "Piotr Roszatycki",
"url": "https://github.com/dex4er"
}
],
"dependencies": {
"@types/events": "*",
"@types/node": "*"
},
"deprecated": false,
"description": "TypeScript definitions for Nodemailer",
"license": "MIT",
"main": "",
"name": "@types/nodemailer",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.3",
"typesPublisherContentHash": "412744a7909771bbe096e233222d1afac4cd96dc62de864e33ba0d1cd0304c66",
"version": "4.6.0"
}

21
node_modules/@types/serve-static/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

16
node_modules/@types/serve-static/README.md generated vendored Normal file
View File

@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/serve-static`
# Summary
This package contains type definitions for serve-static (https://github.com/expressjs/serve-static).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-static
Additional Details
* Last updated: Mon, 30 Apr 2018 16:18:31 GMT
* Dependencies: express-serve-static-core, mime
* Global values: none
# Credits
These definitions were written by Uros Smolnik <https://github.com/urossmolnik>, Linus Unnebäck <https://github.com/LinusU>.

104
node_modules/@types/serve-static/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,104 @@
// Type definitions for serve-static 1.13
// Project: https://github.com/expressjs/serve-static
// Definitions by: Uros Smolnik <https://github.com/urossmolnik>
// Linus Unnebäck <https://github.com/LinusU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/* =================== USAGE ===================
import * as serveStatic from "serve-static";
app.use(serveStatic("public/ftp", {"index": ["default.html", "default.htm"]}))
=============================================== */
/// <reference types="express-serve-static-core" />
import * as express from "express-serve-static-core";
import * as m from "mime";
/**
* Create a new middleware function to serve files from within a given root directory.
* The file to serve will be determined by combining req.url with the provided root directory.
* When a file is not found, instead of sending a 404 response, this module will instead call next() to move on to the next middleware, allowing for stacking and fall-backs.
*/
declare function serveStatic(root: string, options?: serveStatic.ServeStaticOptions): express.Handler;
declare namespace serveStatic {
var mime: typeof m;
interface ServeStaticOptions {
/**
* Enable or disable setting Cache-Control response header, defaults to true.
* Disabling this will ignore the immutable and maxAge options.
*/
cacheControl?: boolean;
/**
* Set how "dotfiles" are treated when encountered. A dotfile is a file or directory that begins with a dot (".").
* Note this check is done on the path itself without checking if the path actually exists on the disk.
* If root is specified, only the dotfiles above the root are checked (i.e. the root itself can be within a dotfile when when set to "deny").
* The default value is 'ignore'.
* 'allow' No special treatment for dotfiles
* 'deny' Send a 403 for any request for a dotfile
* 'ignore' Pretend like the dotfile does not exist and call next()
*/
dotfiles?: string;
/**
* Enable or disable etag generation, defaults to true.
*/
etag?: boolean;
/**
* Set file extension fallbacks. When set, if a file is not found, the given extensions will be added to the file name and search for.
* The first that exists will be served. Example: ['html', 'htm'].
* The default value is false.
*/
extensions?: string[];
/**
* Let client errors fall-through as unhandled requests, otherwise forward a client error.
* The default value is false.
*/
fallthrough?: boolean;
/**
* Enable or disable the immutable directive in the Cache-Control response header.
* If enabled, the maxAge option should also be specified to enable caching. The immutable directive will prevent supported clients from making conditional requests during the life of the maxAge option to check if the file has changed.
*/
immutable?: boolean;
/**
* By default this module will send "index.html" files in response to a request on a directory.
* To disable this set false or to supply a new index pass a string or an array in preferred order.
*/
index?: boolean | string | string[];
/**
* Enable or disable Last-Modified header, defaults to true. Uses the file system's last modified value.
*/
lastModified?: boolean;
/**
* Provide a max-age in milliseconds for http caching, defaults to 0. This can also be a string accepted by the ms module.
*/
maxAge?: number | string;
/**
* Redirect to trailing "/" when the pathname is a dir. Defaults to true.
*/
redirect?: boolean;
/**
* Function to set custom headers on response. Alterations to the headers need to occur synchronously.
* The function is called as fn(res, path, stat), where the arguments are:
* res the response object
* path the file path that is being sent
* stat the stat object of the file that is being sent
*/
setHeaders?: (res: express.Response, path: string, stat: any) => any;
}
function serveStatic(root: string, options?: ServeStaticOptions): express.Handler;
}
export = serveStatic;

54
node_modules/@types/serve-static/package.json generated vendored Normal file
View File

@ -0,0 +1,54 @@
{
"_from": "@types/serve-static@*",
"_id": "@types/serve-static@1.13.2",
"_inBundle": false,
"_integrity": "sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q==",
"_location": "/@types/serve-static",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/serve-static@*",
"name": "@types/serve-static",
"escapedName": "@types%2fserve-static",
"scope": "@types",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/@types/express"
],
"_resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz",
"_shasum": "f5ac4d7a6420a99a6a45af4719f4dcd8cd907a48",
"_spec": "@types/serve-static@*",
"_where": "/home/wn/workspace-node/homepage/node_modules/@types/express",
"bundleDependencies": false,
"contributors": [
{
"name": "Uros Smolnik",
"url": "https://github.com/urossmolnik"
},
{
"name": "Linus Unnebäck",
"url": "https://github.com/LinusU"
}
],
"dependencies": {
"@types/express-serve-static-core": "*",
"@types/mime": "*"
},
"deprecated": false,
"description": "TypeScript definitions for serve-static",
"license": "MIT",
"main": "",
"name": "@types/serve-static",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.2",
"typesPublisherContentHash": "3c454d8447dd409850aab805f4a9ddde32dc4c7606505c4e149b1f938f52728d",
"version": "1.13.2"
}

224
node_modules/accepts/HISTORY.md generated vendored Normal file
View File

@ -0,0 +1,224 @@
1.3.5 / 2018-02-28
==================
* deps: mime-types@~2.1.18
- deps: mime-db@~1.33.0
1.3.4 / 2017-08-22
==================
* deps: mime-types@~2.1.16
- deps: mime-db@~1.29.0
1.3.3 / 2016-05-02
==================
* deps: mime-types@~2.1.11
- deps: mime-db@~1.23.0
* deps: negotiator@0.6.1
- perf: improve `Accept` parsing speed
- perf: improve `Accept-Charset` parsing speed
- perf: improve `Accept-Encoding` parsing speed
- perf: improve `Accept-Language` parsing speed
1.3.2 / 2016-03-08
==================
* deps: mime-types@~2.1.10
- Fix extension of `application/dash+xml`
- Update primary extension for `audio/mp4`
- deps: mime-db@~1.22.0
1.3.1 / 2016-01-19
==================
* deps: mime-types@~2.1.9
- deps: mime-db@~1.21.0
1.3.0 / 2015-09-29
==================
* deps: mime-types@~2.1.7
- deps: mime-db@~1.19.0
* deps: negotiator@0.6.0
- Fix including type extensions in parameters in `Accept` parsing
- Fix parsing `Accept` parameters with quoted equals
- Fix parsing `Accept` parameters with quoted semicolons
- Lazy-load modules from main entry point
- perf: delay type concatenation until needed
- perf: enable strict mode
- perf: hoist regular expressions
- perf: remove closures getting spec properties
- perf: remove a closure from media type parsing
- perf: remove property delete from media type parsing
1.2.13 / 2015-09-06
===================
* deps: mime-types@~2.1.6
- deps: mime-db@~1.18.0
1.2.12 / 2015-07-30
===================
* deps: mime-types@~2.1.4
- deps: mime-db@~1.16.0
1.2.11 / 2015-07-16
===================
* deps: mime-types@~2.1.3
- deps: mime-db@~1.15.0
1.2.10 / 2015-07-01
===================
* deps: mime-types@~2.1.2
- deps: mime-db@~1.14.0
1.2.9 / 2015-06-08
==================
* deps: mime-types@~2.1.1
- perf: fix deopt during mapping
1.2.8 / 2015-06-07
==================
* deps: mime-types@~2.1.0
- deps: mime-db@~1.13.0
* perf: avoid argument reassignment & argument slice
* perf: avoid negotiator recursive construction
* perf: enable strict mode
* perf: remove unnecessary bitwise operator
1.2.7 / 2015-05-10
==================
* deps: negotiator@0.5.3
- Fix media type parameter matching to be case-insensitive
1.2.6 / 2015-05-07
==================
* deps: mime-types@~2.0.11
- deps: mime-db@~1.9.1
* deps: negotiator@0.5.2
- Fix comparing media types with quoted values
- Fix splitting media types with quoted commas
1.2.5 / 2015-03-13
==================
* deps: mime-types@~2.0.10
- deps: mime-db@~1.8.0
1.2.4 / 2015-02-14
==================
* Support Node.js 0.6
* deps: mime-types@~2.0.9
- deps: mime-db@~1.7.0
* deps: negotiator@0.5.1
- Fix preference sorting to be stable for long acceptable lists
1.2.3 / 2015-01-31
==================
* deps: mime-types@~2.0.8
- deps: mime-db@~1.6.0
1.2.2 / 2014-12-30
==================
* deps: mime-types@~2.0.7
- deps: mime-db@~1.5.0
1.2.1 / 2014-12-30
==================
* deps: mime-types@~2.0.5
- deps: mime-db@~1.3.1
1.2.0 / 2014-12-19
==================
* deps: negotiator@0.5.0
- Fix list return order when large accepted list
- Fix missing identity encoding when q=0 exists
- Remove dynamic building of Negotiator class
1.1.4 / 2014-12-10
==================
* deps: mime-types@~2.0.4
- deps: mime-db@~1.3.0
1.1.3 / 2014-11-09
==================
* deps: mime-types@~2.0.3
- deps: mime-db@~1.2.0
1.1.2 / 2014-10-14
==================
* deps: negotiator@0.4.9
- Fix error when media type has invalid parameter
1.1.1 / 2014-09-28
==================
* deps: mime-types@~2.0.2
- deps: mime-db@~1.1.0
* deps: negotiator@0.4.8
- Fix all negotiations to be case-insensitive
- Stable sort preferences of same quality according to client order
1.1.0 / 2014-09-02
==================
* update `mime-types`
1.0.7 / 2014-07-04
==================
* Fix wrong type returned from `type` when match after unknown extension
1.0.6 / 2014-06-24
==================
* deps: negotiator@0.4.7
1.0.5 / 2014-06-20
==================
* fix crash when unknown extension given
1.0.4 / 2014-06-19
==================
* use `mime-types`
1.0.3 / 2014-06-11
==================
* deps: negotiator@0.4.6
- Order by specificity when quality is the same
1.0.2 / 2014-05-29
==================
* Fix interpretation when header not in request
* deps: pin negotiator@0.4.5
1.0.1 / 2014-01-18
==================
* Identity encoding isn't always acceptable
* deps: negotiator@~0.4.0
1.0.0 / 2013-12-27
==================
* Genesis

23
node_modules/accepts/LICENSE generated vendored Normal file
View File

@ -0,0 +1,23 @@
(The MIT License)
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

143
node_modules/accepts/README.md generated vendored Normal file
View File

@ -0,0 +1,143 @@
# accepts
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
In addition to negotiator, it allows:
- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
as well as `('text/html', 'application/json')`.
- Allows type shorthands such as `json`.
- Returns `false` when no types match
- Treats non-existent headers as `*`
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install accepts
```
## API
<!-- eslint-disable no-unused-vars -->
```js
var accepts = require('accepts')
```
### accepts(req)
Create a new `Accepts` object for the given `req`.
#### .charset(charsets)
Return the first accepted charset. If nothing in `charsets` is accepted,
then `false` is returned.
#### .charsets()
Return the charsets that the request accepts, in the order of the client's
preference (most preferred first).
#### .encoding(encodings)
Return the first accepted encoding. If nothing in `encodings` is accepted,
then `false` is returned.
#### .encodings()
Return the encodings that the request accepts, in the order of the client's
preference (most preferred first).
#### .language(languages)
Return the first accepted language. If nothing in `languages` is accepted,
then `false` is returned.
#### .languages()
Return the languages that the request accepts, in the order of the client's
preference (most preferred first).
#### .type(types)
Return the first accepted type (and it is returned as the same text as what
appears in the `types` array). If nothing in `types` is accepted, then `false`
is returned.
The `types` array can contain full MIME types or file extensions. Any value
that is not a full MIME types is passed to `require('mime-types').lookup`.
#### .types()
Return the types that the request accepts, in the order of the client's
preference (most preferred first).
## Examples
### Simple type negotiation
This simple example shows how to use `accepts` to return a different typed
respond body based on what the client wants to accept. The server lists it's
preferences in order and will get back the best match between the client and
server.
```js
var accepts = require('accepts')
var http = require('http')
function app (req, res) {
var accept = accepts(req)
// the order of this list is significant; should be server preferred order
switch (accept.type(['json', 'html'])) {
case 'json':
res.setHeader('Content-Type', 'application/json')
res.write('{"hello":"world!"}')
break
case 'html':
res.setHeader('Content-Type', 'text/html')
res.write('<b>hello, world!</b>')
break
default:
// the fallback is text/plain, so no need to specify it above
res.setHeader('Content-Type', 'text/plain')
res.write('hello, world!')
break
}
res.end()
}
http.createServer(app).listen(3000)
```
You can test this out with the cURL program:
```sh
curl -I -H'Accept: text/html' http://localhost:3000/
```
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/accepts.svg
[npm-url]: https://npmjs.org/package/accepts
[node-version-image]: https://img.shields.io/node/v/accepts.svg
[node-version-url]: https://nodejs.org/en/download/
[travis-image]: https://img.shields.io/travis/jshttp/accepts/master.svg
[travis-url]: https://travis-ci.org/jshttp/accepts
[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/accepts
[downloads-image]: https://img.shields.io/npm/dm/accepts.svg
[downloads-url]: https://npmjs.org/package/accepts

238
node_modules/accepts/index.js generated vendored Normal file
View File

@ -0,0 +1,238 @@
/*!
* accepts
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module dependencies.
* @private
*/
var Negotiator = require('negotiator')
var mime = require('mime-types')
/**
* Module exports.
* @public
*/
module.exports = Accepts
/**
* Create a new Accepts object for the given req.
*
* @param {object} req
* @public
*/
function Accepts (req) {
if (!(this instanceof Accepts)) {
return new Accepts(req)
}
this.headers = req.headers
this.negotiator = new Negotiator(req)
}
/**
* Check if the given `type(s)` is acceptable, returning
* the best match when true, otherwise `undefined`, in which
* case you should respond with 406 "Not Acceptable".
*
* The `type` value may be a single mime type string
* such as "application/json", the extension name
* such as "json" or an array `["json", "html", "text/plain"]`. When a list
* or array is given the _best_ match, if any is returned.
*
* Examples:
*
* // Accept: text/html
* this.types('html');
* // => "html"
*
* // Accept: text/*, application/json
* this.types('html');
* // => "html"
* this.types('text/html');
* // => "text/html"
* this.types('json', 'text');
* // => "json"
* this.types('application/json');
* // => "application/json"
*
* // Accept: text/*, application/json
* this.types('image/png');
* this.types('png');
* // => undefined
*
* // Accept: text/*;q=.5, application/json
* this.types(['html', 'json']);
* this.types('html', 'json');
* // => "json"
*
* @param {String|Array} types...
* @return {String|Array|Boolean}
* @public
*/
Accepts.prototype.type =
Accepts.prototype.types = function (types_) {
var types = types_
// support flattened arguments
if (types && !Array.isArray(types)) {
types = new Array(arguments.length)
for (var i = 0; i < types.length; i++) {
types[i] = arguments[i]
}
}
// no types, return all requested types
if (!types || types.length === 0) {
return this.negotiator.mediaTypes()
}
// no accept header, return first given type
if (!this.headers.accept) {
return types[0]
}
var mimes = types.map(extToMime)
var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
var first = accepts[0]
return first
? types[mimes.indexOf(first)]
: false
}
/**
* Return accepted encodings or best fit based on `encodings`.
*
* Given `Accept-Encoding: gzip, deflate`
* an array sorted by quality is returned:
*
* ['gzip', 'deflate']
*
* @param {String|Array} encodings...
* @return {String|Array}
* @public
*/
Accepts.prototype.encoding =
Accepts.prototype.encodings = function (encodings_) {
var encodings = encodings_
// support flattened arguments
if (encodings && !Array.isArray(encodings)) {
encodings = new Array(arguments.length)
for (var i = 0; i < encodings.length; i++) {
encodings[i] = arguments[i]
}
}
// no encodings, return all requested encodings
if (!encodings || encodings.length === 0) {
return this.negotiator.encodings()
}
return this.negotiator.encodings(encodings)[0] || false
}
/**
* Return accepted charsets or best fit based on `charsets`.
*
* Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
* an array sorted by quality is returned:
*
* ['utf-8', 'utf-7', 'iso-8859-1']
*
* @param {String|Array} charsets...
* @return {String|Array}
* @public
*/
Accepts.prototype.charset =
Accepts.prototype.charsets = function (charsets_) {
var charsets = charsets_
// support flattened arguments
if (charsets && !Array.isArray(charsets)) {
charsets = new Array(arguments.length)
for (var i = 0; i < charsets.length; i++) {
charsets[i] = arguments[i]
}
}
// no charsets, return all requested charsets
if (!charsets || charsets.length === 0) {
return this.negotiator.charsets()
}
return this.negotiator.charsets(charsets)[0] || false
}
/**
* Return accepted languages or best fit based on `langs`.
*
* Given `Accept-Language: en;q=0.8, es, pt`
* an array sorted by quality is returned:
*
* ['es', 'pt', 'en']
*
* @param {String|Array} langs...
* @return {Array|String}
* @public
*/
Accepts.prototype.lang =
Accepts.prototype.langs =
Accepts.prototype.language =
Accepts.prototype.languages = function (languages_) {
var languages = languages_
// support flattened arguments
if (languages && !Array.isArray(languages)) {
languages = new Array(arguments.length)
for (var i = 0; i < languages.length; i++) {
languages[i] = arguments[i]
}
}
// no languages, return all requested languages
if (!languages || languages.length === 0) {
return this.negotiator.languages()
}
return this.negotiator.languages(languages)[0] || false
}
/**
* Convert extnames to mime.
*
* @param {String} type
* @return {String}
* @private
*/
function extToMime (type) {
return type.indexOf('/') === -1
? mime.lookup(type)
: type
}
/**
* Check if mime is valid.
*
* @param {String} type
* @return {String}
* @private
*/
function validMime (type) {
return typeof type === 'string'
}

85
node_modules/accepts/package.json generated vendored Normal file
View File

@ -0,0 +1,85 @@
{
"_from": "accepts@~1.3.5",
"_id": "accepts@1.3.5",
"_inBundle": false,
"_integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
"_location": "/accepts",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "accepts@~1.3.5",
"name": "accepts",
"escapedName": "accepts",
"rawSpec": "~1.3.5",
"saveSpec": null,
"fetchSpec": "~1.3.5"
},
"_requiredBy": [
"/express"
],
"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
"_shasum": "eb777df6011723a3b14e8a72c0805c8e86746bd2",
"_spec": "accepts@~1.3.5",
"_where": "/home/wn/workspace-node/homepage/node_modules/express",
"bugs": {
"url": "https://github.com/jshttp/accepts/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
{
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com"
}
],
"dependencies": {
"mime-types": "~2.1.18",
"negotiator": "0.6.1"
},
"deprecated": false,
"description": "Higher-level content negotiation",
"devDependencies": {
"eslint": "4.18.1",
"eslint-config-standard": "11.0.0",
"eslint-plugin-import": "2.9.0",
"eslint-plugin-markdown": "1.0.0-beta.6",
"eslint-plugin-node": "6.0.1",
"eslint-plugin-promise": "3.6.0",
"eslint-plugin-standard": "3.0.1",
"istanbul": "0.4.5",
"mocha": "~1.21.5"
},
"engines": {
"node": ">= 0.6"
},
"files": [
"LICENSE",
"HISTORY.md",
"index.js"
],
"homepage": "https://github.com/jshttp/accepts#readme",
"keywords": [
"content",
"negotiation",
"accept",
"accepts"
],
"license": "MIT",
"name": "accepts",
"repository": {
"type": "git",
"url": "git+https://github.com/jshttp/accepts.git"
},
"scripts": {
"lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --reporter spec --check-leaks --bail test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
},
"version": "1.3.5"
}

165
node_modules/ansi-styles/index.js generated vendored Normal file
View File

@ -0,0 +1,165 @@
'use strict';
const colorConvert = require('color-convert');
const wrapAnsi16 = (fn, offset) => function () {
const code = fn.apply(colorConvert, arguments);
return `\u001B[${code + offset}m`;
};
const wrapAnsi256 = (fn, offset) => function () {
const code = fn.apply(colorConvert, arguments);
return `\u001B[${38 + offset};5;${code}m`;
};
const wrapAnsi16m = (fn, offset) => function () {
const rgb = fn.apply(colorConvert, arguments);
return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
};
function assembleStyles() {
const codes = new Map();
const styles = {
modifier: {
reset: [0, 0],
// 21 isn't widely supported and 22 does the same thing
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
color: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
gray: [90, 39],
// Bright color
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39]
},
bgColor: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
// Bright color
bgBlackBright: [100, 49],
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}
};
// Fix humans
styles.color.grey = styles.color.gray;
for (const groupName of Object.keys(styles)) {
const group = styles[groupName];
for (const styleName of Object.keys(group)) {
const style = group[styleName];
styles[styleName] = {
open: `\u001B[${style[0]}m`,
close: `\u001B[${style[1]}m`
};
group[styleName] = styles[styleName];
codes.set(style[0], style[1]);
}
Object.defineProperty(styles, groupName, {
value: group,
enumerable: false
});
Object.defineProperty(styles, 'codes', {
value: codes,
enumerable: false
});
}
const ansi2ansi = n => n;
const rgb2rgb = (r, g, b) => [r, g, b];
styles.color.close = '\u001B[39m';
styles.bgColor.close = '\u001B[49m';
styles.color.ansi = {
ansi: wrapAnsi16(ansi2ansi, 0)
};
styles.color.ansi256 = {
ansi256: wrapAnsi256(ansi2ansi, 0)
};
styles.color.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 0)
};
styles.bgColor.ansi = {
ansi: wrapAnsi16(ansi2ansi, 10)
};
styles.bgColor.ansi256 = {
ansi256: wrapAnsi256(ansi2ansi, 10)
};
styles.bgColor.ansi16m = {
rgb: wrapAnsi16m(rgb2rgb, 10)
};
for (let key of Object.keys(colorConvert)) {
if (typeof colorConvert[key] !== 'object') {
continue;
}
const suite = colorConvert[key];
if (key === 'ansi16') {
key = 'ansi';
}
if ('ansi16' in suite) {
styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
}
if ('ansi256' in suite) {
styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
}
if ('rgb' in suite) {
styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
}
}
return styles;
}
// Make the export immutable
Object.defineProperty(module, 'exports', {
enumerable: true,
get: assembleStyles
});

9
node_modules/ansi-styles/license generated vendored Normal file
View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

88
node_modules/ansi-styles/package.json generated vendored Normal file
View File

@ -0,0 +1,88 @@
{
"_from": "ansi-styles@^3.2.1",
"_id": "ansi-styles@3.2.1",
"_inBundle": false,
"_integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"_location": "/ansi-styles",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "ansi-styles@^3.2.1",
"name": "ansi-styles",
"escapedName": "ansi-styles",
"rawSpec": "^3.2.1",
"saveSpec": null,
"fetchSpec": "^3.2.1"
},
"_requiredBy": [
"/chalk"
],
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"_shasum": "41fbb20243e50b12be0f04b8dedbf07520ce841d",
"_spec": "ansi-styles@^3.2.1",
"_where": "/home/wn/workspace-node/homepage/node_modules/chalk",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"ava": {
"require": "babel-polyfill"
},
"bugs": {
"url": "https://github.com/chalk/ansi-styles/issues"
},
"bundleDependencies": false,
"dependencies": {
"color-convert": "^1.9.0"
},
"deprecated": false,
"description": "ANSI escape codes for styling strings in the terminal",
"devDependencies": {
"ava": "*",
"babel-polyfill": "^6.23.0",
"svg-term-cli": "^2.1.1",
"xo": "*"
},
"engines": {
"node": ">=4"
},
"files": [
"index.js"
],
"homepage": "https://github.com/chalk/ansi-styles#readme",
"keywords": [
"ansi",
"styles",
"color",
"colour",
"colors",
"terminal",
"console",
"cli",
"string",
"tty",
"escape",
"formatting",
"rgb",
"256",
"shell",
"xterm",
"log",
"logging",
"command-line",
"text"
],
"license": "MIT",
"name": "ansi-styles",
"repository": {
"type": "git",
"url": "git+https://github.com/chalk/ansi-styles.git"
},
"scripts": {
"screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor",
"test": "xo && ava"
},
"version": "3.2.1"
}

147
node_modules/ansi-styles/readme.md generated vendored Normal file
View File

@ -0,0 +1,147 @@
# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
## Install
```
$ npm install ansi-styles
```
## Usage
```js
const style = require('ansi-styles');
console.log(`${style.green.open}Hello world!${style.green.close}`);
// Color conversion between 16/256/truecolor
// NOTE: If conversion goes to 16 colors or 256 colors, the original color
// may be degraded to fit that color palette. This means terminals
// that do not support 16 million colors will best-match the
// original color.
console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close);
```
## API
Each style has an `open` and `close` property.
## Styles
### Modifiers
- `reset`
- `bold`
- `dim`
- `italic` *(Not widely supported)*
- `underline`
- `inverse`
- `hidden`
- `strikethrough` *(Not widely supported)*
### Colors
- `black`
- `red`
- `green`
- `yellow`
- `blue`
- `magenta`
- `cyan`
- `white`
- `gray` ("bright black")
- `redBright`
- `greenBright`
- `yellowBright`
- `blueBright`
- `magentaBright`
- `cyanBright`
- `whiteBright`
### Background colors
- `bgBlack`
- `bgRed`
- `bgGreen`
- `bgYellow`
- `bgBlue`
- `bgMagenta`
- `bgCyan`
- `bgWhite`
- `bgBlackBright`
- `bgRedBright`
- `bgGreenBright`
- `bgYellowBright`
- `bgBlueBright`
- `bgMagentaBright`
- `bgCyanBright`
- `bgWhiteBright`
## Advanced usage
By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
- `style.modifier`
- `style.color`
- `style.bgColor`
###### Example
```js
console.log(style.color.green.open);
```
Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values.
###### Example
```js
console.log(style.codes.get(36));
//=> 39
```
## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
To use these, call the associated conversion function with the intended output, for example:
```js
style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code
style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code
style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code
style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
```
## Related
- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)
## License
MIT

1
node_modules/array-back/.coveralls.yml generated vendored Normal file
View File

@ -0,0 +1 @@
repo_token: S6p2PWnbIwJPOfO3XRVsAM5z4tNMh9hgr

2
node_modules/array-back/.npmignore generated vendored Normal file
View File

@ -0,0 +1,2 @@
tmp
out

7
node_modules/array-back/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,7 @@
language: node_js
node_js:
- 8
- 7
- 6
- 5
- 4

21
node_modules/array-back/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-17 Lloyd Brookes <75pound@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

12
node_modules/array-back/README.hbs generated vendored Normal file
View File

@ -0,0 +1,12 @@
[![view on npm](https://img.shields.io/npm/v/array-back.svg)](https://www.npmjs.org/package/array-back)
[![npm module downloads](https://img.shields.io/npm/dt/array-back.svg)](https://www.npmjs.org/package/array-back)
[![Build Status](https://travis-ci.org/75lb/array-back.svg?branch=master)](https://travis-ci.org/75lb/array-back)
[![Coverage Status](https://coveralls.io/repos/github/75lb/array-back/badge.svg?branch=master)](https://coveralls.io/github/75lb/array-back?branch=master)
[![Dependency Status](https://david-dm.org/75lb/array-back.svg)](https://david-dm.org/75lb/array-back)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)
{{>main}}
* * *
&copy; 2015-17 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown).

52
node_modules/array-back/README.md generated vendored Normal file
View File

@ -0,0 +1,52 @@
[![view on npm](https://img.shields.io/npm/v/array-back.svg)](https://www.npmjs.org/package/array-back)
[![npm module downloads](https://img.shields.io/npm/dt/array-back.svg)](https://www.npmjs.org/package/array-back)
[![Build Status](https://travis-ci.org/75lb/array-back.svg?branch=master)](https://travis-ci.org/75lb/array-back)
[![Coverage Status](https://coveralls.io/repos/github/75lb/array-back/badge.svg?branch=master)](https://coveralls.io/github/75lb/array-back?branch=master)
[![Dependency Status](https://david-dm.org/75lb/array-back.svg)](https://david-dm.org/75lb/array-back)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)
<a name="module_array-back"></a>
## array-back
**Example**
```js
const arrayify = require('array-back')
```
<a name="exp_module_array-back--arrayify"></a>
### arrayify(input) ⇒ <code>Array</code> ⏏
Takes any input and guarantees an array back.
- converts array-like objects (e.g. `arguments`) to a real array
- converts `undefined` to an empty array
- converts any another other, singular value (including `null`) into an array containing that value
- ignores input which is already an array
**Kind**: Exported function
| Param | Type | Description |
| --- | --- | --- |
| input | <code>\*</code> | the input value to convert to an array |
**Example**
```js
> a.arrayify(undefined)
[]
> a.arrayify(null)
[ null ]
> a.arrayify(0)
[ 0 ]
> a.arrayify([ 1, 2 ])
[ 1, 2 ]
> function f(){ return a.arrayify(arguments); }
> f(1,2,3)
[ 1, 2, 3 ]
```
* * *
&copy; 2015-17 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown).

1
node_modules/array-back/coverage/coverage.json generated vendored Normal file
View File

@ -0,0 +1 @@
{"/Users/lloydb/Documents/75lb/array-back/test.js":{"path":"/Users/lloydb/Documents/75lb/array-back/test.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1},"b":{},"f":{"1":1,"2":1,"3":1},"fnMap":{"1":{"name":"(anonymous_1)","line":8,"loc":{"start":{"line":8,"column":44},"end":{"line":8,"column":56}}},"2":{"name":"(anonymous_2)","line":14,"loc":{"start":{"line":14,"column":26},"end":{"line":14,"column":38}}},"3":{"name":"func","line":20,"loc":{"start":{"line":20,"column":2},"end":{"line":20,"column":19}}}},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":41}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":30}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":27}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":31}},"5":{"start":{"line":8,"column":0},"end":{"line":12,"column":2}},"6":{"start":{"line":9,"column":2},"end":{"line":9,"column":23}},"7":{"start":{"line":10,"column":2},"end":{"line":10,"column":30}},"8":{"start":{"line":11,"column":2},"end":{"line":11,"column":28}},"9":{"start":{"line":14,"column":0},"end":{"line":24,"column":2}},"10":{"start":{"line":15,"column":2},"end":{"line":15,"column":44}},"11":{"start":{"line":16,"column":2},"end":{"line":16,"column":45}},"12":{"start":{"line":17,"column":2},"end":{"line":17,"column":39}},"13":{"start":{"line":18,"column":2},"end":{"line":18,"column":49}},"14":{"start":{"line":20,"column":2},"end":{"line":22,"column":3}},"15":{"start":{"line":21,"column":4},"end":{"line":21,"column":55}},"16":{"start":{"line":23,"column":2},"end":{"line":23,"column":15}}},"branchMap":{}},"/Users/lloydb/Documents/75lb/array-back/index.js":{"path":"/Users/lloydb/Documents/75lb/array-back/index.js","s":{"1":1,"2":1,"3":6,"4":6,"5":2,"6":4,"7":1,"8":3,"9":1,"10":2},"b":{"1":[2,4],"2":[1,3],"3":[1,2]},"f":{"1":6},"fnMap":{"1":{"name":"arrayify","line":36,"loc":{"start":{"line":36,"column":0},"end":{"line":36,"column":26}}}},"statementMap":{"1":{"start":{"line":6,"column":0},"end":{"line":6,"column":25}},"2":{"start":{"line":36,"column":0},"end":{"line":49,"column":1}},"3":{"start":{"line":37,"column":2},"end":{"line":37,"column":30}},"4":{"start":{"line":38,"column":2},"end":{"line":48,"column":3}},"5":{"start":{"line":39,"column":4},"end":{"line":39,"column":16}},"6":{"start":{"line":41,"column":4},"end":{"line":47,"column":5}},"7":{"start":{"line":42,"column":6},"end":{"line":42,"column":15}},"8":{"start":{"line":43,"column":11},"end":{"line":47,"column":5}},"9":{"start":{"line":44,"column":6},"end":{"line":44,"column":46}},"10":{"start":{"line":46,"column":6},"end":{"line":46,"column":22}}},"branchMap":{"1":{"line":38,"type":"if","locations":[{"start":{"line":38,"column":2},"end":{"line":38,"column":2}},{"start":{"line":38,"column":2},"end":{"line":38,"column":2}}]},"2":{"line":41,"type":"if","locations":[{"start":{"line":41,"column":4},"end":{"line":41,"column":4}},{"start":{"line":41,"column":4},"end":{"line":41,"column":4}}]},"3":{"line":43,"type":"if","locations":[{"start":{"line":43,"column":11},"end":{"line":43,"column":11}},{"start":{"line":43,"column":11},"end":{"line":43,"column":11}}]}}}}

View File

@ -0,0 +1,106 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for array-back/</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<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> array-back/
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>26/26</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'>4/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>26/26</span>
</div>
</div>
</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="10" class="abs high">10/10</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="1" class="abs high">1/1</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="10" class="abs high">10/10</td>
</tr>
<tr>
<td class="file high" data-value="test.js"><a href="test.js.html">test.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="16" class="abs high">16/16</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="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="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Jun 24 2017 21:40:08 GMT+0100 (BST)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

View File

@ -0,0 +1,212 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for array-back/index.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<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">array-back/</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'>10/10</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'>1/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>10/10</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50</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-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-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">1×</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-yes">6×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">4×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<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 array-back
* @example
* const arrayify = require('array-back')
*/
module.exports = arrayify
&nbsp;
/**
* Takes any input and guarantees an array back.
*
* - converts array-like objects (e.g. `arguments`) to a real array
* - converts `undefined` to an empty array
* - converts any another other, singular value (including `null`) into an array containing that value
* - ignores input which is already an array
*
* @param {*} - the input value to convert to an array
* @returns {Array}
* @alias module:array-back
* @example
* &gt; a.arrayify(undefined)
* []
*
* &gt; a.arrayify(null)
* [ null ]
*
* &gt; a.arrayify(0)
* [ 0 ]
*
* &gt; a.arrayify([ 1, 2 ])
* [ 1, 2 ]
*
* &gt; function f(){ return a.arrayify(arguments); }
* &gt; f(1,2,3)
* [ 1, 2, 3 ]
*/
function arrayify (input) {
const t = require('typical')
if (Array.isArray(input)) {
return input
} else {
if (input === undefined) {
return []
} else if (t.isArrayLike(input)) {
return Array.prototype.slice.call(input)
} else {
return [ input ]
}
}
}
&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="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Jun 24 2017 21:40:08 GMT+0100 (BST)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

View File

@ -0,0 +1,137 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for array-back/test.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<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">array-back/</a> test.js
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>16/16</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'>16/16</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</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">'use strict'
const TestRunner = require('test-runner')
const arrayify = require('./')
const a = require('assert')
&nbsp;
const runner = new TestRunner()
&nbsp;
runner.test('if already array, do nothing', function () {
const arr = [ 1,2,3 ]
const result = arrayify(arr)
a.strictEqual(arr, result)
})
&nbsp;
runner.test('arrayify()', function () {
a.deepStrictEqual(arrayify(undefined), [])
a.deepStrictEqual(arrayify(null), [ null ])
a.deepStrictEqual(arrayify(0), [ 0 ])
a.deepStrictEqual(arrayify([ 1, 2 ]), [ 1, 2 ])
&nbsp;
function func () {
a.deepStrictEqual(arrayify(arguments), [ 1, 2, 3 ])
}
func(1, 2, 3)
})
&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="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Jun 24 2017 21:40:08 GMT+0100 (BST)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>

213
node_modules/array-back/coverage/lcov-report/base.css generated vendored Normal file
View File

@ -0,0 +1,213 @@
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; }
/* dark red */
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
.low .chart { border:1px solid #C21F39 }
/* 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) */
.medium .chart { border:1px solid #f9cd0b; }
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
/* light yellow */
.medium { background: #fff4c2; }
/* light gray */
span.cline-neutral { background: #eaeaea; }
.cbranch-no { background: yellow !important; color: #111; }
.cstat-skip { background: #ddd; color: #111; }
.fstat-skip { background: #ddd; color: #111 !important; }
.cbranch-skip { background: #ddd !important; color: #111; }
.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,93 @@
<!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" />
<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>
/
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>26/26</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'>4/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>26/26</span>
</div>
</div>
</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="array-back/"><a href="array-back/index.html">array-back/</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="26" class="abs high">26/26</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="4" class="abs high">4/4</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="26" class="abs high">26/26</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="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Jun 24 2017 21:40:08 GMT+0100 (BST)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="sorter.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}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

158
node_modules/array-back/coverage/lcov-report/sorter.js generated vendored Normal file
View File

@ -0,0 +1,158 @@
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(cols);
addSortIndicators();
enableUI();
};
})();
window.addEventListener('load', addSorting);

58
node_modules/array-back/coverage/lcov.info generated vendored Normal file
View File

@ -0,0 +1,58 @@
TN:
SF:/Users/lloydb/Documents/75lb/array-back/test.js
FN:8,(anonymous_1)
FN:14,(anonymous_2)
FN:20,func
FNF:3
FNH:3
FNDA:1,(anonymous_1)
FNDA:1,(anonymous_2)
FNDA:1,func
DA:2,1
DA:3,1
DA:4,1
DA:6,1
DA:8,1
DA:9,1
DA:10,1
DA:11,1
DA:14,1
DA:15,1
DA:16,1
DA:17,1
DA:18,1
DA:20,1
DA:21,1
DA:23,1
LF:16
LH:16
BRF:0
BRH:0
end_of_record
TN:
SF:/Users/lloydb/Documents/75lb/array-back/index.js
FN:36,arrayify
FNF:1
FNH:1
FNDA:6,arrayify
DA:6,1
DA:36,1
DA:37,6
DA:38,6
DA:39,2
DA:41,4
DA:42,1
DA:43,3
DA:44,1
DA:46,2
LF:10
LH:10
BRDA:38,1,0,2
BRDA:38,1,1,4
BRDA:41,2,0,1
BRDA:41,2,1,3
BRDA:43,3,0,1
BRDA:43,3,1,2
BRF:6
BRH:6
end_of_record

49
node_modules/array-back/index.js generated vendored Normal file
View File

@ -0,0 +1,49 @@
/**
* @module array-back
* @example
* const arrayify = require('array-back')
*/
module.exports = arrayify
/**
* Takes any input and guarantees an array back.
*
* - converts array-like objects (e.g. `arguments`) to a real array
* - converts `undefined` to an empty array
* - converts any another other, singular value (including `null`) into an array containing that value
* - ignores input which is already an array
*
* @param {*} - the input value to convert to an array
* @returns {Array}
* @alias module:array-back
* @example
* > a.arrayify(undefined)
* []
*
* > a.arrayify(null)
* [ null ]
*
* > a.arrayify(0)
* [ 0 ]
*
* > a.arrayify([ 1, 2 ])
* [ 1, 2 ]
*
* > function f(){ return a.arrayify(arguments); }
* > f(1,2,3)
* [ 1, 2, 3 ]
*/
function arrayify (input) {
const t = require('typical')
if (Array.isArray(input)) {
return input
} else {
if (input === undefined) {
return []
} else if (t.isArrayLike(input)) {
return Array.prototype.slice.call(input)
} else {
return [ input ]
}
}
}

66
node_modules/array-back/package.json generated vendored Normal file
View File

@ -0,0 +1,66 @@
{
"_from": "array-back@^2.0.0",
"_id": "array-back@2.0.0",
"_inBundle": false,
"_integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==",
"_location": "/array-back",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "array-back@^2.0.0",
"name": "array-back",
"escapedName": "array-back",
"rawSpec": "^2.0.0",
"saveSpec": null,
"fetchSpec": "^2.0.0"
},
"_requiredBy": [
"/command-line-args"
],
"_resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz",
"_shasum": "6877471d51ecc9c9bfa6136fb6c7d5fe69748022",
"_spec": "array-back@^2.0.0",
"_where": "/home/wn/workspace-node/homepage/node_modules/command-line-args",
"author": {
"name": "Lloyd Brookes",
"email": "75pound@gmail.com"
},
"bugs": {
"url": "https://github.com/75lb/array-back/issues"
},
"bundleDependencies": false,
"dependencies": {
"typical": "^2.6.1"
},
"deprecated": false,
"description": "Guarantees an array back",
"devDependencies": {
"coveralls": "^2.13.1",
"jsdoc-to-markdown": "^3.0.0",
"test-runner": "^0.4.0"
},
"engines": {
"node": ">=4"
},
"homepage": "https://github.com/75lb/array-back#readme",
"keywords": [
"to",
"convert",
"return",
"array",
"arrayify"
],
"license": "MIT",
"name": "array-back",
"repository": {
"type": "git",
"url": "git+https://github.com/75lb/array-back.git"
},
"scripts": {
"cover": "istanbul cover ./node_modules/.bin/test-runner test.js && cat coverage/lcov.info | ./node_modules/.bin/coveralls; echo",
"docs": "jsdoc2md -t README.hbs index.js > README.md; echo",
"test": "test-runner test.js"
},
"version": "2.0.0"
}

24
node_modules/array-back/test.js generated vendored Normal file
View File

@ -0,0 +1,24 @@
'use strict'
const TestRunner = require('test-runner')
const arrayify = require('./')
const a = require('assert')
const runner = new TestRunner()
runner.test('if already array, do nothing', function () {
const arr = [ 1,2,3 ]
const result = arrayify(arr)
a.strictEqual(arr, result)
})
runner.test('arrayify()', function () {
a.deepStrictEqual(arrayify(undefined), [])
a.deepStrictEqual(arrayify(null), [ null ])
a.deepStrictEqual(arrayify(0), [ 0 ])
a.deepStrictEqual(arrayify([ 1, 2 ]), [ 1, 2 ])
function func () {
a.deepStrictEqual(arrayify(arguments), [ 1, 2, 3 ])
}
func(1, 2, 3)
})

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