박민정

[remove] remove and ignore directory node_modules

Showing 1000 changed files with 0 additions and 4829 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

1 -../is-ci/bin.js
...\ No newline at end of file ...\ No newline at end of file
1 -../mime/cli.js
...\ No newline at end of file ...\ No newline at end of file
1 -../nodemon/bin/nodemon.js
...\ No newline at end of file ...\ No newline at end of file
1 -../touch/bin/nodetouch.js
...\ No newline at end of file ...\ No newline at end of file
1 -../nopt/bin/nopt.js
...\ No newline at end of file ...\ No newline at end of file
1 -../rc/cli.js
...\ No newline at end of file ...\ No newline at end of file
1 -../semver/bin/semver
...\ No newline at end of file ...\ No newline at end of file
1 -/// <reference types="node" />
2 -/// <reference lib="es2016" />
3 -/// <reference lib="es2017.sharedmemory" />
4 -/// <reference lib="esnext.asynciterable" />
5 -/// <reference lib="dom" />
6 -declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
7 -declare type Primitive = null | undefined | string | number | boolean | Symbol;
8 -export interface ArrayLike {
9 - length: number;
10 -}
11 -export interface Class<T = unknown> {
12 - new (...args: any[]): T;
13 -}
14 -declare type DomElement = object & {
15 - nodeType: 1;
16 - nodeName: string;
17 -};
18 -declare type NodeStream = object & {
19 - pipe: Function;
20 -};
21 -export declare const enum TypeName {
22 - null = "null",
23 - boolean = "boolean",
24 - undefined = "undefined",
25 - string = "string",
26 - number = "number",
27 - symbol = "symbol",
28 - Function = "Function",
29 - GeneratorFunction = "GeneratorFunction",
30 - AsyncFunction = "AsyncFunction",
31 - Observable = "Observable",
32 - Array = "Array",
33 - Buffer = "Buffer",
34 - Object = "Object",
35 - RegExp = "RegExp",
36 - Date = "Date",
37 - Error = "Error",
38 - Map = "Map",
39 - Set = "Set",
40 - WeakMap = "WeakMap",
41 - WeakSet = "WeakSet",
42 - Int8Array = "Int8Array",
43 - Uint8Array = "Uint8Array",
44 - Uint8ClampedArray = "Uint8ClampedArray",
45 - Int16Array = "Int16Array",
46 - Uint16Array = "Uint16Array",
47 - Int32Array = "Int32Array",
48 - Uint32Array = "Uint32Array",
49 - Float32Array = "Float32Array",
50 - Float64Array = "Float64Array",
51 - ArrayBuffer = "ArrayBuffer",
52 - SharedArrayBuffer = "SharedArrayBuffer",
53 - DataView = "DataView",
54 - Promise = "Promise",
55 - URL = "URL"
56 -}
57 -declare function is(value: unknown): TypeName;
58 -declare namespace is {
59 - const undefined: (value: unknown) => value is undefined;
60 - const string: (value: unknown) => value is string;
61 - const number: (value: unknown) => value is number;
62 - const function_: (value: unknown) => value is Function;
63 - const null_: (value: unknown) => value is null;
64 - const class_: (value: unknown) => value is Class<unknown>;
65 - const boolean: (value: unknown) => value is boolean;
66 - const symbol: (value: unknown) => value is Symbol;
67 - const numericString: (value: unknown) => boolean;
68 - const array: (arg: any) => arg is any[];
69 - const buffer: (input: unknown) => input is Buffer;
70 - const nullOrUndefined: (value: unknown) => value is null | undefined;
71 - const object: (value: unknown) => value is object;
72 - const iterable: (value: unknown) => value is IterableIterator<unknown>;
73 - const asyncIterable: (value: unknown) => value is AsyncIterableIterator<unknown>;
74 - const generator: (value: unknown) => value is Generator;
75 - const nativePromise: (value: unknown) => value is Promise<unknown>;
76 - const promise: (value: unknown) => value is Promise<unknown>;
77 - const generatorFunction: (value: unknown) => value is GeneratorFunction;
78 - const asyncFunction: (value: unknown) => value is Function;
79 - const boundFunction: (value: unknown) => value is Function;
80 - const regExp: (value: unknown) => value is RegExp;
81 - const date: (value: unknown) => value is Date;
82 - const error: (value: unknown) => value is Error;
83 - const map: (value: unknown) => value is Map<unknown, unknown>;
84 - const set: (value: unknown) => value is Set<unknown>;
85 - const weakMap: (value: unknown) => value is WeakMap<object, unknown>;
86 - const weakSet: (value: unknown) => value is WeakSet<object>;
87 - const int8Array: (value: unknown) => value is Int8Array;
88 - const uint8Array: (value: unknown) => value is Uint8Array;
89 - const uint8ClampedArray: (value: unknown) => value is Uint8ClampedArray;
90 - const int16Array: (value: unknown) => value is Int16Array;
91 - const uint16Array: (value: unknown) => value is Uint16Array;
92 - const int32Array: (value: unknown) => value is Int32Array;
93 - const uint32Array: (value: unknown) => value is Uint32Array;
94 - const float32Array: (value: unknown) => value is Float32Array;
95 - const float64Array: (value: unknown) => value is Float64Array;
96 - const arrayBuffer: (value: unknown) => value is ArrayBuffer;
97 - const sharedArrayBuffer: (value: unknown) => value is SharedArrayBuffer;
98 - const dataView: (value: unknown) => value is DataView;
99 - const directInstanceOf: <T>(instance: unknown, klass: Class<T>) => instance is T;
100 - const urlInstance: (value: unknown) => value is URL;
101 - const urlString: (value: unknown) => boolean;
102 - const truthy: (value: unknown) => boolean;
103 - const falsy: (value: unknown) => boolean;
104 - const nan: (value: unknown) => boolean;
105 - const primitive: (value: unknown) => value is Primitive;
106 - const integer: (value: unknown) => value is number;
107 - const safeInteger: (value: unknown) => value is number;
108 - const plainObject: (value: unknown) => boolean;
109 - const typedArray: (value: unknown) => value is TypedArray;
110 - const arrayLike: (value: unknown) => value is ArrayLike;
111 - const inRange: (value: number, range: number | number[]) => boolean;
112 - const domElement: (value: unknown) => value is DomElement;
113 - const observable: (value: unknown) => boolean;
114 - const nodeStream: (value: unknown) => value is NodeStream;
115 - const infinite: (value: unknown) => boolean;
116 - const even: (value: number) => boolean;
117 - const odd: (value: number) => boolean;
118 - const emptyArray: (value: unknown) => boolean;
119 - const nonEmptyArray: (value: unknown) => boolean;
120 - const emptyString: (value: unknown) => boolean;
121 - const nonEmptyString: (value: unknown) => boolean;
122 - const emptyStringOrWhitespace: (value: unknown) => boolean;
123 - const emptyObject: (value: unknown) => boolean;
124 - const nonEmptyObject: (value: unknown) => boolean;
125 - const emptySet: (value: unknown) => boolean;
126 - const nonEmptySet: (value: unknown) => boolean;
127 - const emptyMap: (value: unknown) => boolean;
128 - const nonEmptyMap: (value: unknown) => boolean;
129 - const any: (predicate: unknown, ...values: unknown[]) => boolean;
130 - const all: (predicate: unknown, ...values: unknown[]) => boolean;
131 -}
132 -export default is;
This diff is collapsed. Click to expand it.
1 -MIT License
2 -
3 -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4 -
5 -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:
6 -
7 -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 -
9 -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.
1 -{
2 - "_from": "@sindresorhus/is@^0.14.0",
3 - "_id": "@sindresorhus/is@0.14.0",
4 - "_inBundle": false,
5 - "_integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==",
6 - "_location": "/@sindresorhus/is",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "@sindresorhus/is@^0.14.0",
12 - "name": "@sindresorhus/is",
13 - "escapedName": "@sindresorhus%2fis",
14 - "scope": "@sindresorhus",
15 - "rawSpec": "^0.14.0",
16 - "saveSpec": null,
17 - "fetchSpec": "^0.14.0"
18 - },
19 - "_requiredBy": [
20 - "/got"
21 - ],
22 - "_resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",
23 - "_shasum": "9fb3a3cf3132328151f353de4632e01e52102bea",
24 - "_spec": "@sindresorhus/is@^0.14.0",
25 - "_where": "/Users/mindyeoi/Desktop/oss/We-Shop/boiler-plate/node_modules/got",
26 - "author": {
27 - "name": "Sindre Sorhus",
28 - "email": "sindresorhus@gmail.com",
29 - "url": "sindresorhus.com"
30 - },
31 - "bugs": {
32 - "url": "https://github.com/sindresorhus/is/issues"
33 - },
34 - "bundleDependencies": false,
35 - "deprecated": false,
36 - "description": "Type check values: `is.string('🦄') //=> true`",
37 - "devDependencies": {
38 - "@sindresorhus/tsconfig": "^0.1.0",
39 - "@types/jsdom": "^11.12.0",
40 - "@types/node": "^10.12.10",
41 - "@types/tempy": "^0.2.0",
42 - "@types/zen-observable": "^0.8.0",
43 - "ava": "^0.25.0",
44 - "del-cli": "^1.1.0",
45 - "jsdom": "^11.6.2",
46 - "rxjs": "^6.3.3",
47 - "tempy": "^0.2.1",
48 - "tslint": "^5.9.1",
49 - "tslint-xo": "^0.10.0",
50 - "typescript": "^3.2.1",
51 - "zen-observable": "^0.8.8"
52 - },
53 - "engines": {
54 - "node": ">=6"
55 - },
56 - "files": [
57 - "dist"
58 - ],
59 - "homepage": "https://github.com/sindresorhus/is#readme",
60 - "keywords": [
61 - "type",
62 - "types",
63 - "is",
64 - "check",
65 - "checking",
66 - "validate",
67 - "validation",
68 - "utility",
69 - "util",
70 - "typeof",
71 - "instanceof",
72 - "object",
73 - "assert",
74 - "assertion",
75 - "test",
76 - "kind",
77 - "primitive",
78 - "verify",
79 - "compare"
80 - ],
81 - "license": "MIT",
82 - "main": "dist/index.js",
83 - "name": "@sindresorhus/is",
84 - "repository": {
85 - "type": "git",
86 - "url": "git+https://github.com/sindresorhus/is.git"
87 - },
88 - "scripts": {
89 - "build": "del dist && tsc",
90 - "lint": "tslint --format stylish --project .",
91 - "prepublish": "npm run build && del dist/tests",
92 - "test": "npm run lint && npm run build && ava dist/tests"
93 - },
94 - "types": "dist/index.d.ts",
95 - "version": "0.14.0"
96 -}
This diff is collapsed. Click to expand it.
1 -MIT License
2 -
3 -Copyright (c) 2018 Szymon Marczak
4 -
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
11 -
12 -The above copyright notice and this permission notice shall be included in all
13 -copies or substantial portions of the Software.
14 -
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 -SOFTWARE.
1 -# http-timer
2 -> Timings for HTTP requests
3 -
4 -[![Build Status](https://travis-ci.org/szmarczak/http-timer.svg?branch=master)](https://travis-ci.org/szmarczak/http-timer)
5 -[![Coverage Status](https://coveralls.io/repos/github/szmarczak/http-timer/badge.svg?branch=master)](https://coveralls.io/github/szmarczak/http-timer?branch=master)
6 -[![install size](https://packagephobia.now.sh/badge?p=@szmarczak/http-timer)](https://packagephobia.now.sh/result?p=@szmarczak/http-timer)
7 -
8 -Inspired by the [`request` package](https://github.com/request/request).
9 -
10 -## Usage
11 -```js
12 -'use strict';
13 -const https = require('https');
14 -const timer = require('@szmarczak/http-timer');
15 -
16 -const request = https.get('https://httpbin.org/anything');
17 -const timings = timer(request);
18 -
19 -request.on('response', response => {
20 - response.on('data', () => {}); // Consume the data somehow
21 - response.on('end', () => {
22 - console.log(timings);
23 - });
24 -});
25 -
26 -// { start: 1535708511443,
27 -// socket: 1535708511444,
28 -// lookup: 1535708511444,
29 -// connect: 1535708511582,
30 -// upload: 1535708511887,
31 -// response: 1535708512037,
32 -// end: 1535708512040,
33 -// phases:
34 -// { wait: 1,
35 -// dns: 0,
36 -// tcp: 138,
37 -// request: 305,
38 -// firstByte: 150,
39 -// download: 3,
40 -// total: 597 } }
41 -```
42 -
43 -## API
44 -
45 -### timer(request)
46 -
47 -Returns: `Object`
48 -
49 -- `start` - Time when the request started.
50 -- `socket` - Time when a socket was assigned to the request.
51 -- `lookup` - Time when the DNS lookup finished.
52 -- `connect` - Time when the socket successfully connected.
53 -- `upload` - Time when the request finished uploading.
54 -- `response` - Time when the request fired the `response` event.
55 -- `end` - Time when the response fired the `end` event.
56 -- `error` - Time when the request fired the `error` event.
57 -- `phases`
58 - - `wait` - `timings.socket - timings.start`
59 - - `dns` - `timings.lookup - timings.socket`
60 - - `tcp` - `timings.connect - timings.lookup`
61 - - `request` - `timings.upload - timings.connect`
62 - - `firstByte` - `timings.response - timings.upload`
63 - - `download` - `timings.end - timings.response`
64 - - `total` - `timings.end - timings.start` or `timings.error - timings.start`
65 -
66 -**Note**: The time is a `number` representing the milliseconds elapsed since the UNIX epoch.
67 -
68 -## License
69 -
70 -MIT
1 -{
2 - "_from": "@szmarczak/http-timer@^1.1.2",
3 - "_id": "@szmarczak/http-timer@1.1.2",
4 - "_inBundle": false,
5 - "_integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",
6 - "_location": "/@szmarczak/http-timer",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "@szmarczak/http-timer@^1.1.2",
12 - "name": "@szmarczak/http-timer",
13 - "escapedName": "@szmarczak%2fhttp-timer",
14 - "scope": "@szmarczak",
15 - "rawSpec": "^1.1.2",
16 - "saveSpec": null,
17 - "fetchSpec": "^1.1.2"
18 - },
19 - "_requiredBy": [
20 - "/got"
21 - ],
22 - "_resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",
23 - "_shasum": "b1665e2c461a2cd92f4c1bbf50d5454de0d4b421",
24 - "_spec": "@szmarczak/http-timer@^1.1.2",
25 - "_where": "/Users/mindyeoi/Desktop/oss/We-Shop/boiler-plate/node_modules/got",
26 - "author": {
27 - "name": "Szymon Marczak"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/szmarczak/http-timer/issues"
31 - },
32 - "bundleDependencies": false,
33 - "dependencies": {
34 - "defer-to-connect": "^1.0.1"
35 - },
36 - "deprecated": false,
37 - "description": "Timings for HTTP requests",
38 - "devDependencies": {
39 - "ava": "^0.25.0",
40 - "coveralls": "^3.0.2",
41 - "nyc": "^12.0.2",
42 - "p-event": "^2.1.0",
43 - "xo": "^0.22.0"
44 - },
45 - "engines": {
46 - "node": ">=6"
47 - },
48 - "files": [
49 - "source"
50 - ],
51 - "homepage": "https://github.com/szmarczak/http-timer#readme",
52 - "keywords": [
53 - "http",
54 - "https",
55 - "timer",
56 - "timings"
57 - ],
58 - "license": "MIT",
59 - "main": "source",
60 - "name": "@szmarczak/http-timer",
61 - "repository": {
62 - "type": "git",
63 - "url": "git+https://github.com/szmarczak/http-timer.git"
64 - },
65 - "scripts": {
66 - "coveralls": "nyc report --reporter=text-lcov | coveralls",
67 - "test": "xo && nyc ava"
68 - },
69 - "version": "1.1.2",
70 - "xo": {
71 - "rules": {
72 - "unicorn/filename-case": "camelCase"
73 - }
74 - }
75 -}
1 -'use strict';
2 -const deferToConnect = require('defer-to-connect');
3 -
4 -module.exports = request => {
5 - const timings = {
6 - start: Date.now(),
7 - socket: null,
8 - lookup: null,
9 - connect: null,
10 - upload: null,
11 - response: null,
12 - end: null,
13 - error: null,
14 - phases: {
15 - wait: null,
16 - dns: null,
17 - tcp: null,
18 - request: null,
19 - firstByte: null,
20 - download: null,
21 - total: null
22 - }
23 - };
24 -
25 - const handleError = origin => {
26 - const emit = origin.emit.bind(origin);
27 - origin.emit = (event, ...args) => {
28 - // Catches the `error` event
29 - if (event === 'error') {
30 - timings.error = Date.now();
31 - timings.phases.total = timings.error - timings.start;
32 -
33 - origin.emit = emit;
34 - }
35 -
36 - // Saves the original behavior
37 - return emit(event, ...args);
38 - };
39 - };
40 -
41 - let uploadFinished = false;
42 - const onUpload = () => {
43 - timings.upload = Date.now();
44 - timings.phases.request = timings.upload - timings.connect;
45 - };
46 -
47 - handleError(request);
48 -
49 - request.once('socket', socket => {
50 - timings.socket = Date.now();
51 - timings.phases.wait = timings.socket - timings.start;
52 -
53 - const lookupListener = () => {
54 - timings.lookup = Date.now();
55 - timings.phases.dns = timings.lookup - timings.socket;
56 - };
57 -
58 - socket.once('lookup', lookupListener);
59 -
60 - deferToConnect(socket, () => {
61 - timings.connect = Date.now();
62 -
63 - if (timings.lookup === null) {
64 - socket.removeListener('lookup', lookupListener);
65 - timings.lookup = timings.connect;
66 - timings.phases.dns = timings.lookup - timings.socket;
67 - }
68 -
69 - timings.phases.tcp = timings.connect - timings.lookup;
70 -
71 - if (uploadFinished && !timings.upload) {
72 - onUpload();
73 - }
74 - });
75 - });
76 -
77 - request.once('finish', () => {
78 - uploadFinished = true;
79 -
80 - if (timings.connect) {
81 - onUpload();
82 - }
83 - });
84 -
85 - request.once('response', response => {
86 - timings.response = Date.now();
87 - timings.phases.firstByte = timings.response - timings.upload;
88 -
89 - handleError(response);
90 -
91 - response.once('end', () => {
92 - timings.end = Date.now();
93 - timings.phases.download = timings.end - timings.response;
94 - timings.phases.total = timings.end - timings.start;
95 - });
96 - });
97 -
98 - return timings;
99 -};
1 - MIT License
2 -
3 - Copyright (c) Microsoft Corporation.
4 -
5 - Permission is hereby granted, free of charge, to any person obtaining a copy
6 - of this software and associated documentation files (the "Software"), to deal
7 - in the Software without restriction, including without limitation the rights
8 - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 - copies of the Software, and to permit persons to whom the Software is
10 - furnished to do so, subject to the following conditions:
11 -
12 - The above copyright notice and this permission notice shall be included in all
13 - copies or substantial portions of the Software.
14 -
15 - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 - SOFTWARE
1 -# Installation
2 -> `npm install --save @types/bson`
3 -
4 -# Summary
5 -This package contains type definitions for bson (https://github.com/mongodb/js-bson).
6 -
7 -# Details
8 -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bson.
9 -
10 -### Additional Details
11 - * Last updated: Tue, 20 Oct 2020 02:03:19 GMT
12 - * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
13 - * Global values: none
14 -
15 -# Credits
16 -These definitions were written by [Hiroki Horiuchi](https://github.com/horiuchi), [Federico Caselli](https://github.com/CaselIT), [Justin Grant](https://github.com/justingrant), and [Mikael Lirbank](https://github.com/lirbank).
This diff is collapsed. Click to expand it.
1 -{
2 - "_from": "@types/bson@*",
3 - "_id": "@types/bson@4.0.3",
4 - "_inBundle": false,
5 - "_integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==",
6 - "_location": "/@types/bson",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "@types/bson@*",
12 - "name": "@types/bson",
13 - "escapedName": "@types%2fbson",
14 - "scope": "@types",
15 - "rawSpec": "*",
16 - "saveSpec": null,
17 - "fetchSpec": "*"
18 - },
19 - "_requiredBy": [
20 - "/@types/mongodb"
21 - ],
22 - "_resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz",
23 - "_shasum": "30889d2ffde6262abbe38659364c631454999fbf",
24 - "_spec": "@types/bson@*",
25 - "_where": "/Users/mindyeoi/Desktop/oss/We-Shop/boiler-plate/node_modules/@types/mongodb",
26 - "bugs": {
27 - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
28 - },
29 - "bundleDependencies": false,
30 - "contributors": [
31 - {
32 - "name": "Hiroki Horiuchi",
33 - "url": "https://github.com/horiuchi"
34 - },
35 - {
36 - "name": "Federico Caselli",
37 - "url": "https://github.com/CaselIT"
38 - },
39 - {
40 - "name": "Justin Grant",
41 - "url": "https://github.com/justingrant"
42 - },
43 - {
44 - "name": "Mikael Lirbank",
45 - "url": "https://github.com/lirbank"
46 - }
47 - ],
48 - "dependencies": {
49 - "@types/node": "*"
50 - },
51 - "deprecated": false,
52 - "description": "TypeScript definitions for bson",
53 - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
54 - "license": "MIT",
55 - "main": "",
56 - "name": "@types/bson",
57 - "repository": {
58 - "type": "git",
59 - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
60 - "directory": "types/bson"
61 - },
62 - "scripts": {},
63 - "typeScriptVersion": "3.2",
64 - "types": "index.d.ts",
65 - "typesPublisherContentHash": "de339c6ae3194d7c34d771d4580048f1007707bafc646731b539c3a79638ebe9",
66 - "version": "4.0.3"
67 -}
1 - MIT License
2 -
3 - Copyright (c) Microsoft Corporation.
4 -
5 - Permission is hereby granted, free of charge, to any person obtaining a copy
6 - of this software and associated documentation files (the "Software"), to deal
7 - in the Software without restriction, including without limitation the rights
8 - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 - copies of the Software, and to permit persons to whom the Software is
10 - furnished to do so, subject to the following conditions:
11 -
12 - The above copyright notice and this permission notice shall be included in all
13 - copies or substantial portions of the Software.
14 -
15 - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 - SOFTWARE
1 -# Installation
2 -> `npm install --save @types/mongodb`
3 -
4 -# Summary
5 -This package contains type definitions for MongoDB (https://github.com/mongodb/node-mongodb-native).
6 -
7 -# Details
8 -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mongodb.
9 -
10 -### Additional Details
11 - * Last updated: Fri, 28 May 2021 20:31:25 GMT
12 - * Dependencies: [@types/bson](https://npmjs.com/package/@types/bson), [@types/node](https://npmjs.com/package/@types/node)
13 - * Global values: none
14 -
15 -# Credits
16 -These definitions were written by [Federico Caselli](https://github.com/CaselIT), [Alan Marcell](https://github.com/alanmarcell), [Gaurav Lahoti](https://github.com/dante-101), [Mariano Cortesi](https://github.com/mcortesi), [Enrico Picci](https://github.com/EnricoPicci), [Alexander Christie](https://github.com/AJCStriker), [Julien Chaumond](https://github.com/julien-c), [Dan Aprahamian](https://github.com/daprahamian), [Denys Bushulyak](https://github.com/denys-bushulyak), [Bastien Arata](https://github.com/b4nst), [Wan Bachtiar](https://github.com/sindbach), [Geraldine Lemeur](https://github.com/geraldinelemeur), [Dominik Heigl](https://github.com/various89), [Angela-1](https://github.com/angela-1), [Hector Ribes](https://github.com/hector7), [Florian Richter](https://github.com/floric), [Erik Christensen](https://github.com/erikc5000), [Nick Zahn](https://github.com/Manc), [Jarom Loveridge](https://github.com/jloveridge), [Luis Pais](https://github.com/ranguna), [Hossein Saniei](https://github.com/HosseinAgha), [Alberto Silva](https://github.com/albertossilva), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Linus Unnebäck](https://github.com/LinusU), [Richard Bateman](https://github.com/taxilian), [Igor Strebezhev](https://github.com/xamgore), [Valentin Agachi](https://github.com/avaly), [HitkoDev](https://github.com/HitkoDev), [TJT](https://github.com/Celend), [Julien TASSIN](https://github.com/jtassin), [Anna Henningsen](https://github.com/addaleax), [Emmanuel Gautier](https://github.com/emmanuelgautier), and [Wyatt Johnson](https://github.com/wyattjoh).
This diff could not be displayed because it is too large.
1 -{
2 - "_from": "@types/mongodb@^3.5.27",
3 - "_id": "@types/mongodb@3.6.17",
4 - "_inBundle": false,
5 - "_integrity": "sha512-9hhgvYPdC5iHyyksPcKCu45gfaAIPQHKHGdvNXu4582DmOZX3wrUJIJPT40o4G1oTKPgpMMFqZglOTjhnYoF+A==",
6 - "_location": "/@types/mongodb",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "@types/mongodb@^3.5.27",
12 - "name": "@types/mongodb",
13 - "escapedName": "@types%2fmongodb",
14 - "scope": "@types",
15 - "rawSpec": "^3.5.27",
16 - "saveSpec": null,
17 - "fetchSpec": "^3.5.27"
18 - },
19 - "_requiredBy": [
20 - "/mongoose"
21 - ],
22 - "_resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.17.tgz",
23 - "_shasum": "a8893654989cb11e9a241858bc530060b6fd126d",
24 - "_spec": "@types/mongodb@^3.5.27",
25 - "_where": "/Users/mindyeoi/Desktop/oss/We-Shop/boiler-plate/node_modules/mongoose",
26 - "bugs": {
27 - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
28 - },
29 - "bundleDependencies": false,
30 - "contributors": [
31 - {
32 - "name": "Federico Caselli",
33 - "url": "https://github.com/CaselIT"
34 - },
35 - {
36 - "name": "Alan Marcell",
37 - "url": "https://github.com/alanmarcell"
38 - },
39 - {
40 - "name": "Gaurav Lahoti",
41 - "url": "https://github.com/dante-101"
42 - },
43 - {
44 - "name": "Mariano Cortesi",
45 - "url": "https://github.com/mcortesi"
46 - },
47 - {
48 - "name": "Enrico Picci",
49 - "url": "https://github.com/EnricoPicci"
50 - },
51 - {
52 - "name": "Alexander Christie",
53 - "url": "https://github.com/AJCStriker"
54 - },
55 - {
56 - "name": "Julien Chaumond",
57 - "url": "https://github.com/julien-c"
58 - },
59 - {
60 - "name": "Dan Aprahamian",
61 - "url": "https://github.com/daprahamian"
62 - },
63 - {
64 - "name": "Denys Bushulyak",
65 - "url": "https://github.com/denys-bushulyak"
66 - },
67 - {
68 - "name": "Bastien Arata",
69 - "url": "https://github.com/b4nst"
70 - },
71 - {
72 - "name": "Wan Bachtiar",
73 - "url": "https://github.com/sindbach"
74 - },
75 - {
76 - "name": "Geraldine Lemeur",
77 - "url": "https://github.com/geraldinelemeur"
78 - },
79 - {
80 - "name": "Dominik Heigl",
81 - "url": "https://github.com/various89"
82 - },
83 - {
84 - "name": "Angela-1",
85 - "url": "https://github.com/angela-1"
86 - },
87 - {
88 - "name": "Hector Ribes",
89 - "url": "https://github.com/hector7"
90 - },
91 - {
92 - "name": "Florian Richter",
93 - "url": "https://github.com/floric"
94 - },
95 - {
96 - "name": "Erik Christensen",
97 - "url": "https://github.com/erikc5000"
98 - },
99 - {
100 - "name": "Nick Zahn",
101 - "url": "https://github.com/Manc"
102 - },
103 - {
104 - "name": "Jarom Loveridge",
105 - "url": "https://github.com/jloveridge"
106 - },
107 - {
108 - "name": "Luis Pais",
109 - "url": "https://github.com/ranguna"
110 - },
111 - {
112 - "name": "Hossein Saniei",
113 - "url": "https://github.com/HosseinAgha"
114 - },
115 - {
116 - "name": "Alberto Silva",
117 - "url": "https://github.com/albertossilva"
118 - },
119 - {
120 - "name": "Piotr Błażejewicz",
121 - "url": "https://github.com/peterblazejewicz"
122 - },
123 - {
124 - "name": "Linus Unnebäck",
125 - "url": "https://github.com/LinusU"
126 - },
127 - {
128 - "name": "Richard Bateman",
129 - "url": "https://github.com/taxilian"
130 - },
131 - {
132 - "name": "Igor Strebezhev",
133 - "url": "https://github.com/xamgore"
134 - },
135 - {
136 - "name": "Valentin Agachi",
137 - "url": "https://github.com/avaly"
138 - },
139 - {
140 - "name": "HitkoDev",
141 - "url": "https://github.com/HitkoDev"
142 - },
143 - {
144 - "name": "TJT",
145 - "url": "https://github.com/Celend"
146 - },
147 - {
148 - "name": "Julien TASSIN",
149 - "url": "https://github.com/jtassin"
150 - },
151 - {
152 - "name": "Anna Henningsen",
153 - "url": "https://github.com/addaleax"
154 - },
155 - {
156 - "name": "Emmanuel Gautier",
157 - "url": "https://github.com/emmanuelgautier"
158 - },
159 - {
160 - "name": "Wyatt Johnson",
161 - "url": "https://github.com/wyattjoh"
162 - }
163 - ],
164 - "dependencies": {
165 - "@types/bson": "*",
166 - "@types/node": "*"
167 - },
168 - "deprecated": false,
169 - "description": "TypeScript definitions for MongoDB",
170 - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mongodb",
171 - "license": "MIT",
172 - "main": "",
173 - "name": "@types/mongodb",
174 - "repository": {
175 - "type": "git",
176 - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
177 - "directory": "types/mongodb"
178 - },
179 - "scripts": {},
180 - "typeScriptVersion": "3.6",
181 - "types": "index.d.ts",
182 - "typesPublisherContentHash": "b6066acdbd0337b91c210765f292fe009ae3f8418d91a14009f3a9de14c85775",
183 - "version": "3.6.17"
184 -}
1 - MIT License
2 -
3 - Copyright (c) Microsoft Corporation.
4 -
5 - Permission is hereby granted, free of charge, to any person obtaining a copy
6 - of this software and associated documentation files (the "Software"), to deal
7 - in the Software without restriction, including without limitation the rights
8 - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 - copies of the Software, and to permit persons to whom the Software is
10 - furnished to do so, subject to the following conditions:
11 -
12 - The above copyright notice and this permission notice shall be included in all
13 - copies or substantial portions of the Software.
14 -
15 - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 - SOFTWARE
1 -# Installation
2 -> `npm install --save @types/node`
3 -
4 -# Summary
5 -This package contains type definitions for Node.js (http://nodejs.org/).
6 -
7 -# Details
8 -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9 -
10 -### Additional Details
11 - * Last updated: Wed, 02 Jun 2021 07:31:33 GMT
12 - * Dependencies: none
13 - * Global values: `AbortController`, `AbortSignal`, `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14 -
15 -# Credits
16 -These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys).
1 -declare module 'assert' {
2 - /** An alias of `assert.ok()`. */
3 - function assert(value: any, message?: string | Error): asserts value;
4 - namespace assert {
5 - class AssertionError extends Error {
6 - actual: any;
7 - expected: any;
8 - operator: string;
9 - generatedMessage: boolean;
10 - code: 'ERR_ASSERTION';
11 -
12 - constructor(options?: {
13 - /** If provided, the error message is set to this value. */
14 - message?: string;
15 - /** The `actual` property on the error instance. */
16 - actual?: any;
17 - /** The `expected` property on the error instance. */
18 - expected?: any;
19 - /** The `operator` property on the error instance. */
20 - operator?: string;
21 - /** If provided, the generated stack trace omits frames before this function. */
22 - // tslint:disable-next-line:ban-types
23 - stackStartFn?: Function;
24 - });
25 - }
26 -
27 - class CallTracker {
28 - calls(exact?: number): () => void;
29 - calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
30 - report(): CallTrackerReportInformation[];
31 - verify(): void;
32 - }
33 - interface CallTrackerReportInformation {
34 - message: string;
35 - /** The actual number of times the function was called. */
36 - actual: number;
37 - /** The number of times the function was expected to be called. */
38 - expected: number;
39 - /** The name of the function that is wrapped. */
40 - operator: string;
41 - /** A stack trace of the function. */
42 - stack: object;
43 - }
44 -
45 - type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
46 -
47 - function fail(message?: string | Error): never;
48 - /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
49 - function fail(
50 - actual: any,
51 - expected: any,
52 - message?: string | Error,
53 - operator?: string,
54 - // tslint:disable-next-line:ban-types
55 - stackStartFn?: Function,
56 - ): never;
57 - function ok(value: any, message?: string | Error): asserts value;
58 - /** @deprecated since v9.9.0 - use strictEqual() instead. */
59 - function equal(actual: any, expected: any, message?: string | Error): void;
60 - /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
61 - function notEqual(actual: any, expected: any, message?: string | Error): void;
62 - /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
63 - function deepEqual(actual: any, expected: any, message?: string | Error): void;
64 - /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
65 - function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
66 - function strictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
67 - function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
68 - function deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
69 - function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
70 -
71 - function throws(block: () => any, message?: string | Error): void;
72 - function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
73 - function doesNotThrow(block: () => any, message?: string | Error): void;
74 - function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
75 -
76 - function ifError(value: any): asserts value is null | undefined;
77 -
78 - function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
79 - function rejects(
80 - block: (() => Promise<any>) | Promise<any>,
81 - error: AssertPredicate,
82 - message?: string | Error,
83 - ): Promise<void>;
84 - function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
85 - function doesNotReject(
86 - block: (() => Promise<any>) | Promise<any>,
87 - error: AssertPredicate,
88 - message?: string | Error,
89 - ): Promise<void>;
90 -
91 - function match(value: string, regExp: RegExp, message?: string | Error): void;
92 - function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
93 -
94 - const strict: Omit<
95 - typeof assert,
96 - | 'equal'
97 - | 'notEqual'
98 - | 'deepEqual'
99 - | 'notDeepEqual'
100 - | 'ok'
101 - | 'strictEqual'
102 - | 'deepStrictEqual'
103 - | 'ifError'
104 - | 'strict'
105 - > & {
106 - (value: any, message?: string | Error): asserts value;
107 - equal: typeof strictEqual;
108 - notEqual: typeof notStrictEqual;
109 - deepEqual: typeof deepStrictEqual;
110 - notDeepEqual: typeof notDeepStrictEqual;
111 -
112 - // Mapped types and assertion functions are incompatible?
113 - // TS2775: Assertions require every name in the call target
114 - // to be declared with an explicit type annotation.
115 - ok: typeof ok;
116 - strictEqual: typeof strictEqual;
117 - deepStrictEqual: typeof deepStrictEqual;
118 - ifError: typeof ifError;
119 - strict: typeof strict;
120 - };
121 - }
122 -
123 - export = assert;
124 -}
1 -declare module 'assert/strict' {
2 - import { strict } from 'assert';
3 - export = strict;
4 -}
1 -/**
2 - * Async Hooks module: https://nodejs.org/api/async_hooks.html
3 - */
4 -declare module 'async_hooks' {
5 - /**
6 - * Returns the asyncId of the current execution context.
7 - */
8 - function executionAsyncId(): number;
9 -
10 - /**
11 - * The resource representing the current execution.
12 - * Useful to store data within the resource.
13 - *
14 - * Resource objects returned by `executionAsyncResource()` are most often internal
15 - * Node.js handle objects with undocumented APIs. Using any functions or properties
16 - * on the object is likely to crash your application and should be avoided.
17 - *
18 - * Using `executionAsyncResource()` in the top-level execution context will
19 - * return an empty object as there is no handle or request object to use,
20 - * but having an object representing the top-level can be helpful.
21 - */
22 - function executionAsyncResource(): object;
23 -
24 - /**
25 - * Returns the ID of the resource responsible for calling the callback that is currently being executed.
26 - */
27 - function triggerAsyncId(): number;
28 -
29 - interface HookCallbacks {
30 - /**
31 - * Called when a class is constructed that has the possibility to emit an asynchronous event.
32 - * @param asyncId a unique ID for the async resource
33 - * @param type the type of the async resource
34 - * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
35 - * @param resource reference to the resource representing the async operation, needs to be released during destroy
36 - */
37 - init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
38 -
39 - /**
40 - * When an asynchronous operation is initiated or completes a callback is called to notify the user.
41 - * The before callback is called just before said callback is executed.
42 - * @param asyncId the unique identifier assigned to the resource about to execute the callback.
43 - */
44 - before?(asyncId: number): void;
45 -
46 - /**
47 - * Called immediately after the callback specified in before is completed.
48 - * @param asyncId the unique identifier assigned to the resource which has executed the callback.
49 - */
50 - after?(asyncId: number): void;
51 -
52 - /**
53 - * Called when a promise has resolve() called. This may not be in the same execution id
54 - * as the promise itself.
55 - * @param asyncId the unique id for the promise that was resolve()d.
56 - */
57 - promiseResolve?(asyncId: number): void;
58 -
59 - /**
60 - * Called after the resource corresponding to asyncId is destroyed
61 - * @param asyncId a unique ID for the async resource
62 - */
63 - destroy?(asyncId: number): void;
64 - }
65 -
66 - interface AsyncHook {
67 - /**
68 - * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
69 - */
70 - enable(): this;
71 -
72 - /**
73 - * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
74 - */
75 - disable(): this;
76 - }
77 -
78 - /**
79 - * Registers functions to be called for different lifetime events of each async operation.
80 - * @param options the callbacks to register
81 - * @return an AsyncHooks instance used for disabling and enabling hooks
82 - */
83 - function createHook(options: HookCallbacks): AsyncHook;
84 -
85 - interface AsyncResourceOptions {
86 - /**
87 - * The ID of the execution context that created this async event.
88 - * @default executionAsyncId()
89 - */
90 - triggerAsyncId?: number;
91 -
92 - /**
93 - * Disables automatic `emitDestroy` when the object is garbage collected.
94 - * This usually does not need to be set (even if `emitDestroy` is called
95 - * manually), unless the resource's `asyncId` is retrieved and the
96 - * sensitive API's `emitDestroy` is called with it.
97 - * @default false
98 - */
99 - requireManualDestroy?: boolean;
100 - }
101 -
102 - /**
103 - * The class AsyncResource was designed to be extended by the embedder's async resources.
104 - * Using this users can easily trigger the lifetime events of their own resources.
105 - */
106 - class AsyncResource {
107 - /**
108 - * AsyncResource() is meant to be extended. Instantiating a
109 - * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
110 - * async_hook.executionAsyncId() is used.
111 - * @param type The type of async event.
112 - * @param triggerAsyncId The ID of the execution context that created
113 - * this async event (default: `executionAsyncId()`), or an
114 - * AsyncResourceOptions object (since 9.3)
115 - */
116 - constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
117 -
118 - /**
119 - * Binds the given function to the current execution context.
120 - * @param fn The function to bind to the current execution context.
121 - * @param type An optional name to associate with the underlying `AsyncResource`.
122 - */
123 - static bind<Func extends (...args: any[]) => any>(fn: Func, type?: string): Func & { asyncResource: AsyncResource };
124 -
125 - /**
126 - * Binds the given function to execute to this `AsyncResource`'s scope.
127 - * @param fn The function to bind to the current `AsyncResource`.
128 - */
129 - bind<Func extends (...args: any[]) => any>(fn: Func): Func & { asyncResource: AsyncResource };
130 -
131 - /**
132 - * Call the provided function with the provided arguments in the
133 - * execution context of the async resource. This will establish the
134 - * context, trigger the AsyncHooks before callbacks, call the function,
135 - * trigger the AsyncHooks after callbacks, and then restore the original
136 - * execution context.
137 - * @param fn The function to call in the execution context of this
138 - * async resource.
139 - * @param thisArg The receiver to be used for the function call.
140 - * @param args Optional arguments to pass to the function.
141 - */
142 - runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
143 -
144 - /**
145 - * Call AsyncHooks destroy callbacks.
146 - */
147 - emitDestroy(): this;
148 -
149 - /**
150 - * @return the unique ID assigned to this AsyncResource instance.
151 - */
152 - asyncId(): number;
153 -
154 - /**
155 - * @return the trigger ID for this AsyncResource instance.
156 - */
157 - triggerAsyncId(): number;
158 - }
159 -
160 - /**
161 - * When having multiple instances of `AsyncLocalStorage`, they are independent
162 - * from each other. It is safe to instantiate this class multiple times.
163 - */
164 - class AsyncLocalStorage<T> {
165 - /**
166 - * This method disables the instance of `AsyncLocalStorage`. All subsequent calls
167 - * to `asyncLocalStorage.getStore()` will return `undefined` until
168 - * `asyncLocalStorage.run()` is called again.
169 - *
170 - * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
171 - * instance will be exited.
172 - *
173 - * Calling `asyncLocalStorage.disable()` is required before the
174 - * `asyncLocalStorage` can be garbage collected. This does not apply to stores
175 - * provided by the `asyncLocalStorage`, as those objects are garbage collected
176 - * along with the corresponding async resources.
177 - *
178 - * This method is to be used when the `asyncLocalStorage` is not in use anymore
179 - * in the current process.
180 - */
181 - disable(): void;
182 -
183 - /**
184 - * This method returns the current store. If this method is called outside of an
185 - * asynchronous context initialized by calling `asyncLocalStorage.run`, it will
186 - * return `undefined`.
187 - */
188 - getStore(): T | undefined;
189 -
190 - /**
191 - * This methods runs a function synchronously within a context and return its
192 - * return value. The store is not accessible outside of the callback function or
193 - * the asynchronous operations created within the callback.
194 - *
195 - * Optionally, arguments can be passed to the function. They will be passed to the
196 - * callback function.
197 - *
198 - * I the callback function throws an error, it will be thrown by `run` too. The
199 - * stacktrace will not be impacted by this call and the context will be exited.
200 - */
201 - // TODO: Apply generic vararg once available
202 - run<R>(store: T, callback: (...args: any[]) => R, ...args: any[]): R;
203 -
204 - /**
205 - * This methods runs a function synchronously outside of a context and return its
206 - * return value. The store is not accessible within the callback function or the
207 - * asynchronous operations created within the callback.
208 - *
209 - * Optionally, arguments can be passed to the function. They will be passed to the
210 - * callback function.
211 - *
212 - * If the callback function throws an error, it will be thrown by `exit` too. The
213 - * stacktrace will not be impacted by this call and the context will be
214 - * re-entered.
215 - */
216 - // TODO: Apply generic vararg once available
217 - exit<R>(callback: (...args: any[]) => R, ...args: any[]): R;
218 -
219 - /**
220 - * Calling `asyncLocalStorage.enterWith(store)` will transition into the context
221 - * for the remainder of the current synchronous execution and will persist
222 - * through any following asynchronous calls.
223 - */
224 - enterWith(store: T): void;
225 - }
226 -}
1 -// NOTE: These definitions support NodeJS and TypeScript 3.7.
2 -
3 -// NOTE: TypeScript version-specific augmentations can be found in the following paths:
4 -// - ~/base.d.ts - Shared definitions common to all TypeScript versions
5 -// - ~/index.d.ts - Definitions specific to TypeScript 2.1
6 -// - ~/ts3.7/base.d.ts - Definitions specific to TypeScript 3.7
7 -// - ~/ts3.7/index.d.ts - Definitions specific to TypeScript 3.7 with assert pulled in
8 -
9 -// Reference required types from the default lib:
10 -/// <reference lib="es2018" />
11 -/// <reference lib="esnext.asynciterable" />
12 -/// <reference lib="esnext.intl" />
13 -/// <reference lib="esnext.bigint" />
14 -
15 -// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
16 -/// <reference path="ts3.6/base.d.ts" />
17 -
18 -// TypeScript 3.7-specific augmentations:
19 -/// <reference path="assert.d.ts" />
1 -declare module 'buffer' {
2 - export const INSPECT_MAX_BYTES: number;
3 - export const kMaxLength: number;
4 - export const kStringMaxLength: number;
5 - export const constants: {
6 - MAX_LENGTH: number;
7 - MAX_STRING_LENGTH: number;
8 - };
9 - const BuffType: typeof Buffer;
10 -
11 - export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
12 -
13 - export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
14 -
15 - export const SlowBuffer: {
16 - /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
17 - new(size: number): Buffer;
18 - prototype: Buffer;
19 - };
20 -
21 - export { BuffType as Buffer };
22 -}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -declare module 'console' {
2 - import { InspectOptions } from 'util';
3 -
4 - global {
5 - // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
6 - interface Console {
7 - Console: NodeJS.ConsoleConstructor;
8 - /**
9 - * A simple assertion test that verifies whether `value` is truthy.
10 - * If it is not, an `AssertionError` is thrown.
11 - * If provided, the error `message` is formatted using `util.format()` and used as the error message.
12 - */
13 - assert(value: any, message?: string, ...optionalParams: any[]): void;
14 - /**
15 - * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY.
16 - * When `stdout` is not a TTY, this method does nothing.
17 - */
18 - clear(): void;
19 - /**
20 - * Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`.
21 - */
22 - count(label?: string): void;
23 - /**
24 - * Resets the internal counter specific to `label`.
25 - */
26 - countReset(label?: string): void;
27 - /**
28 - * The `console.debug()` function is an alias for {@link console.log()}.
29 - */
30 - debug(message?: any, ...optionalParams: any[]): void;
31 - /**
32 - * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`.
33 - * This function bypasses any custom `inspect()` function defined on `obj`.
34 - */
35 - dir(obj: any, options?: InspectOptions): void;
36 - /**
37 - * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting
38 - */
39 - dirxml(...data: any[]): void;
40 - /**
41 - * Prints to `stderr` with newline.
42 - */
43 - error(message?: any, ...optionalParams: any[]): void;
44 - /**
45 - * Increases indentation of subsequent lines by two spaces.
46 - * If one or more `label`s are provided, those are printed first without the additional indentation.
47 - */
48 - group(...label: any[]): void;
49 - /**
50 - * The `console.groupCollapsed()` function is an alias for {@link console.group()}.
51 - */
52 - groupCollapsed(...label: any[]): void;
53 - /**
54 - * Decreases indentation of subsequent lines by two spaces.
55 - */
56 - groupEnd(): void;
57 - /**
58 - * The {@link console.info()} function is an alias for {@link console.log()}.
59 - */
60 - info(message?: any, ...optionalParams: any[]): void;
61 - /**
62 - * Prints to `stdout` with newline.
63 - */
64 - log(message?: any, ...optionalParams: any[]): void;
65 - /**
66 - * This method does not display anything unless used in the inspector.
67 - * Prints to `stdout` the array `array` formatted as a table.
68 - */
69 - table(tabularData: any, properties?: ReadonlyArray<string>): void;
70 - /**
71 - * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`.
72 - */
73 - time(label?: string): void;
74 - /**
75 - * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`.
76 - */
77 - timeEnd(label?: string): void;
78 - /**
79 - * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`.
80 - */
81 - timeLog(label?: string, ...data: any[]): void;
82 - /**
83 - * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code.
84 - */
85 - trace(message?: any, ...optionalParams: any[]): void;
86 - /**
87 - * The {@link console.warn()} function is an alias for {@link console.error()}.
88 - */
89 - warn(message?: any, ...optionalParams: any[]): void;
90 -
91 - // --- Inspector mode only ---
92 - /**
93 - * This method does not display anything unless used in the inspector.
94 - * Starts a JavaScript CPU profile with an optional label.
95 - */
96 - profile(label?: string): void;
97 - /**
98 - * This method does not display anything unless used in the inspector.
99 - * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
100 - */
101 - profileEnd(label?: string): void;
102 - /**
103 - * This method does not display anything unless used in the inspector.
104 - * Adds an event with the label `label` to the Timeline panel of the inspector.
105 - */
106 - timeStamp(label?: string): void;
107 - }
108 -
109 - var console: Console;
110 -
111 - namespace NodeJS {
112 - interface ConsoleConstructorOptions {
113 - stdout: WritableStream;
114 - stderr?: WritableStream;
115 - ignoreErrors?: boolean;
116 - colorMode?: boolean | 'auto';
117 - inspectOptions?: InspectOptions;
118 - }
119 -
120 - interface ConsoleConstructor {
121 - prototype: Console;
122 - new(stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean): Console;
123 - new(options: ConsoleConstructorOptions): Console;
124 - }
125 -
126 - interface Global {
127 - console: typeof console;
128 - }
129 - }
130 - }
131 -
132 - export = console;
133 -}
1 -/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
2 -declare module 'constants' {
3 - import { constants as osConstants, SignalConstants } from 'os';
4 - import { constants as cryptoConstants } from 'crypto';
5 - import { constants as fsConstants } from 'fs';
6 -
7 - const exp: typeof osConstants.errno &
8 - typeof osConstants.priority &
9 - SignalConstants &
10 - typeof cryptoConstants &
11 - typeof fsConstants;
12 - export = exp;
13 -}
This diff is collapsed. Click to expand it.
1 -declare module 'dgram' {
2 - import { AddressInfo } from 'net';
3 - import * as dns from 'dns';
4 - import EventEmitter = require('events');
5 -
6 - interface RemoteInfo {
7 - address: string;
8 - family: 'IPv4' | 'IPv6';
9 - port: number;
10 - size: number;
11 - }
12 -
13 - interface BindOptions {
14 - port?: number;
15 - address?: string;
16 - exclusive?: boolean;
17 - fd?: number;
18 - }
19 -
20 - type SocketType = "udp4" | "udp6";
21 -
22 - interface SocketOptions {
23 - type: SocketType;
24 - reuseAddr?: boolean;
25 - /**
26 - * @default false
27 - */
28 - ipv6Only?: boolean;
29 - recvBufferSize?: number;
30 - sendBufferSize?: number;
31 - lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
32 - }
33 -
34 - function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
35 - function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
36 -
37 - class Socket extends EventEmitter {
38 - addMembership(multicastAddress: string, multicastInterface?: string): void;
39 - address(): AddressInfo;
40 - bind(port?: number, address?: string, callback?: () => void): void;
41 - bind(port?: number, callback?: () => void): void;
42 - bind(callback?: () => void): void;
43 - bind(options: BindOptions, callback?: () => void): void;
44 - close(callback?: () => void): void;
45 - connect(port: number, address?: string, callback?: () => void): void;
46 - connect(port: number, callback: () => void): void;
47 - disconnect(): void;
48 - dropMembership(multicastAddress: string, multicastInterface?: string): void;
49 - getRecvBufferSize(): number;
50 - getSendBufferSize(): number;
51 - ref(): this;
52 - remoteAddress(): AddressInfo;
53 - send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
54 - send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
55 - send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
56 - send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
57 - send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
58 - send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
59 - setBroadcast(flag: boolean): void;
60 - setMulticastInterface(multicastInterface: string): void;
61 - setMulticastLoopback(flag: boolean): void;
62 - setMulticastTTL(ttl: number): void;
63 - setRecvBufferSize(size: number): void;
64 - setSendBufferSize(size: number): void;
65 - setTTL(ttl: number): void;
66 - unref(): this;
67 - /**
68 - * Tells the kernel to join a source-specific multicast channel at the given
69 - * `sourceAddress` and `groupAddress`, using the `multicastInterface` with the
70 - * `IP_ADD_SOURCE_MEMBERSHIP` socket option.
71 - * If the `multicastInterface` argument
72 - * is not specified, the operating system will choose one interface and will add
73 - * membership to it.
74 - * To add membership to every available interface, call
75 - * `socket.addSourceSpecificMembership()` multiple times, once per interface.
76 - */
77 - addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
78 -
79 - /**
80 - * Instructs the kernel to leave a source-specific multicast channel at the given
81 - * `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`
82 - * socket option. This method is automatically called by the kernel when the
83 - * socket is closed or the process terminates, so most apps will never have
84 - * reason to call this.
85 - *
86 - * If `multicastInterface` is not specified, the operating system will attempt to
87 - * drop membership on all valid interfaces.
88 - */
89 - dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
90 -
91 - /**
92 - * events.EventEmitter
93 - * 1. close
94 - * 2. connect
95 - * 3. error
96 - * 4. listening
97 - * 5. message
98 - */
99 - addListener(event: string, listener: (...args: any[]) => void): this;
100 - addListener(event: "close", listener: () => void): this;
101 - addListener(event: "connect", listener: () => void): this;
102 - addListener(event: "error", listener: (err: Error) => void): this;
103 - addListener(event: "listening", listener: () => void): this;
104 - addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
105 -
106 - emit(event: string | symbol, ...args: any[]): boolean;
107 - emit(event: "close"): boolean;
108 - emit(event: "connect"): boolean;
109 - emit(event: "error", err: Error): boolean;
110 - emit(event: "listening"): boolean;
111 - emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean;
112 -
113 - on(event: string, listener: (...args: any[]) => void): this;
114 - on(event: "close", listener: () => void): this;
115 - on(event: "connect", listener: () => void): this;
116 - on(event: "error", listener: (err: Error) => void): this;
117 - on(event: "listening", listener: () => void): this;
118 - on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
119 -
120 - once(event: string, listener: (...args: any[]) => void): this;
121 - once(event: "close", listener: () => void): this;
122 - once(event: "connect", listener: () => void): this;
123 - once(event: "error", listener: (err: Error) => void): this;
124 - once(event: "listening", listener: () => void): this;
125 - once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
126 -
127 - prependListener(event: string, listener: (...args: any[]) => void): this;
128 - prependListener(event: "close", listener: () => void): this;
129 - prependListener(event: "connect", listener: () => void): this;
130 - prependListener(event: "error", listener: (err: Error) => void): this;
131 - prependListener(event: "listening", listener: () => void): this;
132 - prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
133 -
134 - prependOnceListener(event: string, listener: (...args: any[]) => void): this;
135 - prependOnceListener(event: "close", listener: () => void): this;
136 - prependOnceListener(event: "connect", listener: () => void): this;
137 - prependOnceListener(event: "error", listener: (err: Error) => void): this;
138 - prependOnceListener(event: "listening", listener: () => void): this;
139 - prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
140 - }
141 -}
1 -/**
2 - * @experimental
3 - */
4 -declare module 'diagnostic_channel' {
5 - /**
6 - * Returns wether a named channel has subscribers or not.
7 - */
8 - function hasSubscribers(name: string): boolean;
9 -
10 - /**
11 - * Gets or create a diagnostic channel by name.
12 - */
13 - function channel(name: string): Channel;
14 -
15 - type ChannelListener = (name: string, message: unknown) => void;
16 -
17 - /**
18 - * Simple diagnostic channel that allows
19 - */
20 - class Channel {
21 - readonly name: string;
22 - readonly hashSubscribers: boolean;
23 - private constructor(name: string);
24 -
25 - /**
26 - * Add a listener to the message channel.
27 - */
28 - subscribe(listener: ChannelListener): void;
29 - /**
30 - * Removes a previously registered listener.
31 - */
32 - unsubscribe(listener: ChannelListener): void;
33 - }
34 -}
This diff is collapsed. Click to expand it.
1 -declare module "dns/promises" {
2 - import {
3 - LookupAddress,
4 - LookupOneOptions,
5 - LookupAllOptions,
6 - LookupOptions,
7 - AnyRecord,
8 - CaaRecord,
9 - MxRecord,
10 - NaptrRecord,
11 - SoaRecord,
12 - SrvRecord,
13 - ResolveWithTtlOptions,
14 - RecordWithTtl,
15 - ResolveOptions,
16 - ResolverOptions,
17 - } from "dns";
18 -
19 - function getServers(): string[];
20 -
21 - function lookup(hostname: string, family: number): Promise<LookupAddress>;
22 - function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
23 - function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
24 - function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
25 - function lookup(hostname: string): Promise<LookupAddress>;
26 -
27 - function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>;
28 -
29 - function resolve(hostname: string): Promise<string[]>;
30 - function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
31 - function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
32 - function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
33 - function resolve(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
34 - function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
35 - function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
36 - function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
37 - function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
38 - function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
39 - function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
40 - function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
41 - function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
42 - function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
43 -
44 - function resolve4(hostname: string): Promise<string[]>;
45 - function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
46 - function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
47 -
48 - function resolve6(hostname: string): Promise<string[]>;
49 - function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
50 - function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
51 -
52 - function resolveAny(hostname: string): Promise<AnyRecord[]>;
53 -
54 - function resolveCaa(hostname: string): Promise<CaaRecord[]>;
55 -
56 - function resolveCname(hostname: string): Promise<string[]>;
57 -
58 - function resolveMx(hostname: string): Promise<MxRecord[]>;
59 -
60 - function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
61 -
62 - function resolveNs(hostname: string): Promise<string[]>;
63 -
64 - function resolvePtr(hostname: string): Promise<string[]>;
65 -
66 - function resolveSoa(hostname: string): Promise<SoaRecord>;
67 -
68 - function resolveSrv(hostname: string): Promise<SrvRecord[]>;
69 -
70 - function resolveTxt(hostname: string): Promise<string[][]>;
71 -
72 - function reverse(ip: string): Promise<string[]>;
73 -
74 - function setServers(servers: ReadonlyArray<string>): void;
75 -
76 - class Resolver {
77 - constructor(options?: ResolverOptions);
78 -
79 - cancel(): void;
80 - getServers: typeof getServers;
81 - resolve: typeof resolve;
82 - resolve4: typeof resolve4;
83 - resolve6: typeof resolve6;
84 - resolveAny: typeof resolveAny;
85 - resolveCname: typeof resolveCname;
86 - resolveMx: typeof resolveMx;
87 - resolveNaptr: typeof resolveNaptr;
88 - resolveNs: typeof resolveNs;
89 - resolvePtr: typeof resolvePtr;
90 - resolveSoa: typeof resolveSoa;
91 - resolveSrv: typeof resolveSrv;
92 - resolveTxt: typeof resolveTxt;
93 - reverse: typeof reverse;
94 - setLocalAddress(ipv4?: string, ipv6?: string): void;
95 - setServers: typeof setServers;
96 - }
97 -}
1 -declare module 'domain' {
2 - import EventEmitter = require('events');
3 -
4 - global {
5 - namespace NodeJS {
6 - interface Domain extends EventEmitter {
7 - run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
8 - add(emitter: EventEmitter | Timer): void;
9 - remove(emitter: EventEmitter | Timer): void;
10 - bind<T extends Function>(cb: T): T;
11 - intercept<T extends Function>(cb: T): T;
12 - }
13 - }
14 - }
15 -
16 - interface Domain extends NodeJS.Domain {}
17 - class Domain extends EventEmitter {
18 - members: Array<EventEmitter | NodeJS.Timer>;
19 - enter(): void;
20 - exit(): void;
21 - }
22 -
23 - function create(): Domain;
24 -}
1 -declare module 'events' {
2 - interface EventEmitterOptions {
3 - /**
4 - * Enables automatic capturing of promise rejection.
5 - */
6 - captureRejections?: boolean;
7 - }
8 -
9 - interface NodeEventTarget {
10 - once(event: string | symbol, listener: (...args: any[]) => void): this;
11 - }
12 -
13 - interface DOMEventTarget {
14 - addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any;
15 - }
16 -
17 - interface StaticEventEmitterOptions {
18 - signal?: AbortSignal;
19 - }
20 -
21 - interface EventEmitter extends NodeJS.EventEmitter {}
22 - class EventEmitter {
23 - constructor(options?: EventEmitterOptions);
24 -
25 - static once(emitter: NodeEventTarget, event: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
26 - static once(emitter: DOMEventTarget, event: string, options?: StaticEventEmitterOptions): Promise<any[]>;
27 - static on(emitter: NodeJS.EventEmitter, event: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>;
28 -
29 - /** @deprecated since v4.0.0 */
30 - static listenerCount(emitter: NodeJS.EventEmitter, event: string | symbol): number;
31 - /**
32 - * Returns a list listener for a specific emitter event name.
33 - */
34 - static getEventListener(emitter: DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
35 -
36 - /**
37 - * This symbol shall be used to install a listener for only monitoring `'error'`
38 - * events. Listeners installed using this symbol are called before the regular
39 - * `'error'` listeners are called.
40 - *
41 - * Installing a listener using this symbol does not change the behavior once an
42 - * `'error'` event is emitted, therefore the process will still crash if no
43 - * regular `'error'` listener is installed.
44 - */
45 - static readonly errorMonitor: unique symbol;
46 - static readonly captureRejectionSymbol: unique symbol;
47 -
48 - /**
49 - * Sets or gets the default captureRejection value for all emitters.
50 - */
51 - // TODO: These should be described using static getter/setter pairs:
52 - static captureRejections: boolean;
53 - static defaultMaxListeners: number;
54 - }
55 -
56 - import internal = require('events');
57 - namespace EventEmitter {
58 - // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
59 - export { internal as EventEmitter };
60 -
61 - export interface Abortable {
62 - /**
63 - * When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
64 - */
65 - signal?: AbortSignal;
66 - }
67 - }
68 -
69 - global {
70 - namespace NodeJS {
71 - interface EventEmitter {
72 - addListener(event: string | symbol, listener: (...args: any[]) => void): this;
73 - on(event: string | symbol, listener: (...args: any[]) => void): this;
74 - once(event: string | symbol, listener: (...args: any[]) => void): this;
75 - removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
76 - off(event: string | symbol, listener: (...args: any[]) => void): this;
77 - removeAllListeners(event?: string | symbol): this;
78 - setMaxListeners(n: number): this;
79 - getMaxListeners(): number;
80 - listeners(event: string | symbol): Function[];
81 - rawListeners(event: string | symbol): Function[];
82 - emit(event: string | symbol, ...args: any[]): boolean;
83 - listenerCount(event: string | symbol): number;
84 - // Added in Node 6...
85 - prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
86 - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
87 - eventNames(): Array<string | symbol>;
88 - }
89 - }
90 - }
91 -
92 - export = EventEmitter;
93 -}
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -declare var global: NodeJS.Global & typeof globalThis;
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -declare module 'https' {
2 - import * as tls from 'tls';
3 - import * as http from 'http';
4 - import { URL } from 'url';
5 -
6 - type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
7 -
8 - type RequestOptions = http.RequestOptions & tls.SecureContextOptions & {
9 - rejectUnauthorized?: boolean; // Defaults to true
10 - servername?: string; // SNI TLS Extension
11 - };
12 -
13 - interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
14 - rejectUnauthorized?: boolean;
15 - maxCachedSessions?: number;
16 - }
17 -
18 - class Agent extends http.Agent {
19 - constructor(options?: AgentOptions);
20 - options: AgentOptions;
21 - }
22 -
23 - interface Server extends http.HttpBase {}
24 - class Server extends tls.Server {
25 - constructor(requestListener?: http.RequestListener);
26 - constructor(options: ServerOptions, requestListener?: http.RequestListener);
27 - }
28 -
29 - function createServer(requestListener?: http.RequestListener): Server;
30 - function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server;
31 - function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
32 - function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
33 - function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
34 - function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
35 - let globalAgent: Agent;
36 -}
1 -// Type definitions for non-npm package Node.js 15.6
2 -// Project: http://nodejs.org/
3 -// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4 -// DefinitelyTyped <https://github.com/DefinitelyTyped>
5 -// Alberto Schiabel <https://github.com/jkomyno>
6 -// Alvis HT Tang <https://github.com/alvis>
7 -// Andrew Makarov <https://github.com/r3nya>
8 -// Benjamin Toueg <https://github.com/btoueg>
9 -// Chigozirim C. <https://github.com/smac89>
10 -// David Junger <https://github.com/touffy>
11 -// Deividas Bakanas <https://github.com/DeividasBakanas>
12 -// Eugene Y. Q. Shen <https://github.com/eyqs>
13 -// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
14 -// Hoàng Văn Khải <https://github.com/KSXGitHub>
15 -// Huw <https://github.com/hoo29>
16 -// Kelvin Jin <https://github.com/kjin>
17 -// Klaus Meinhardt <https://github.com/ajafff>
18 -// Lishude <https://github.com/islishude>
19 -// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
20 -// Mohsen Azimi <https://github.com/mohsen1>
21 -// Nicolas Even <https://github.com/n-e>
22 -// Nikita Galkin <https://github.com/galkin>
23 -// Parambir Singh <https://github.com/parambirs>
24 -// Sebastian Silbermann <https://github.com/eps1lon>
25 -// Simon Schick <https://github.com/SimonSchick>
26 -// Thomas den Hollander <https://github.com/ThomasdenH>
27 -// Wilco Bakker <https://github.com/WilcoBakker>
28 -// wwwy3y3 <https://github.com/wwwy3y3>
29 -// Samuel Ainsworth <https://github.com/samuela>
30 -// Kyle Uehlein <https://github.com/kuehlein>
31 -// Thanik Bhongbhibhat <https://github.com/bhongy>
32 -// Marcin Kopacz <https://github.com/chyzwar>
33 -// Trivikram Kamat <https://github.com/trivikr>
34 -// Minh Son Nguyen <https://github.com/nguymin4>
35 -// Junxiao Shi <https://github.com/yoursunny>
36 -// Ilia Baryshnikov <https://github.com/qwelias>
37 -// ExE Boss <https://github.com/ExE-Boss>
38 -// Surasak Chaisurin <https://github.com/Ryan-Willpower>
39 -// Piotr Błażejewicz <https://github.com/peterblazejewicz>
40 -// Anna Henningsen <https://github.com/addaleax>
41 -// Jason Kwok <https://github.com/JasonHK>
42 -// Victor Perin <https://github.com/victorperin>
43 -// Yongsheng Zhang <https://github.com/ZYSzys>
44 -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
45 -
46 -// NOTE: These definitions support NodeJS and TypeScript 3.7.
47 -// Typically type modifications should be made in base.d.ts instead of here
48 -
49 -/// <reference path="base.d.ts" />
50 -
51 -// NOTE: TypeScript version-specific augmentations can be found in the following paths:
52 -// - ~/base.d.ts - Shared definitions common to all TypeScript versions
53 -// - ~/index.d.ts - Definitions specific to TypeScript 2.8
54 -// - ~/ts3.5/index.d.ts - Definitions specific to TypeScript 3.5
55 -
56 -// NOTE: Augmentations for TypeScript 3.5 and later should use individual files for overrides
57 -// within the respective ~/ts3.5 (or later) folder. However, this is disallowed for versions
58 -// prior to TypeScript 3.5, so the older definitions will be found here.
This diff could not be displayed because it is too large.
1 -declare module 'module' {
2 - import { URL } from 'url';
3 - namespace Module {
4 - /**
5 - * Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports.
6 - * It does not add or remove exported names from the ES Modules.
7 - */
8 - function syncBuiltinESMExports(): void;
9 -
10 - function findSourceMap(path: string, error?: Error): SourceMap;
11 - interface SourceMapPayload {
12 - file: string;
13 - version: number;
14 - sources: string[];
15 - sourcesContent: string[];
16 - names: string[];
17 - mappings: string;
18 - sourceRoot: string;
19 - }
20 -
21 - interface SourceMapping {
22 - generatedLine: number;
23 - generatedColumn: number;
24 - originalSource: string;
25 - originalLine: number;
26 - originalColumn: number;
27 - }
28 -
29 - class SourceMap {
30 - readonly payload: SourceMapPayload;
31 - constructor(payload: SourceMapPayload);
32 - findEntry(line: number, column: number): SourceMapping;
33 - }
34 - }
35 - interface Module extends NodeModule {}
36 - class Module {
37 - static runMain(): void;
38 - static wrap(code: string): string;
39 -
40 - /**
41 - * @deprecated Deprecated since: v12.2.0. Please use createRequire() instead.
42 - */
43 - static createRequireFromPath(path: string): NodeRequire;
44 - static createRequire(path: string | URL): NodeRequire;
45 - static builtinModules: string[];
46 -
47 - static Module: typeof Module;
48 -
49 - constructor(id: string, parent?: Module);
50 - }
51 - export = Module;
52 -}
This diff is collapsed. Click to expand it.
1 -declare module 'os' {
2 - interface CpuInfo {
3 - model: string;
4 - speed: number;
5 - times: {
6 - user: number;
7 - nice: number;
8 - sys: number;
9 - idle: number;
10 - irq: number;
11 - };
12 - }
13 -
14 - interface NetworkInterfaceBase {
15 - address: string;
16 - netmask: string;
17 - mac: string;
18 - internal: boolean;
19 - cidr: string | null;
20 - }
21 -
22 - interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
23 - family: "IPv4";
24 - }
25 -
26 - interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
27 - family: "IPv6";
28 - scopeid: number;
29 - }
30 -
31 - interface UserInfo<T> {
32 - username: T;
33 - uid: number;
34 - gid: number;
35 - shell: T;
36 - homedir: T;
37 - }
38 -
39 - type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
40 -
41 - function hostname(): string;
42 - function loadavg(): number[];
43 - function uptime(): number;
44 - function freemem(): number;
45 - function totalmem(): number;
46 - function cpus(): CpuInfo[];
47 - function type(): string;
48 - function release(): string;
49 - function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
50 - function homedir(): string;
51 - function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
52 - function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
53 -
54 - type SignalConstants = {
55 - [key in NodeJS.Signals]: number;
56 - };
57 -
58 - namespace constants {
59 - const UV_UDP_REUSEADDR: number;
60 - namespace signals {}
61 - const signals: SignalConstants;
62 - namespace errno {
63 - const E2BIG: number;
64 - const EACCES: number;
65 - const EADDRINUSE: number;
66 - const EADDRNOTAVAIL: number;
67 - const EAFNOSUPPORT: number;
68 - const EAGAIN: number;
69 - const EALREADY: number;
70 - const EBADF: number;
71 - const EBADMSG: number;
72 - const EBUSY: number;
73 - const ECANCELED: number;
74 - const ECHILD: number;
75 - const ECONNABORTED: number;
76 - const ECONNREFUSED: number;
77 - const ECONNRESET: number;
78 - const EDEADLK: number;
79 - const EDESTADDRREQ: number;
80 - const EDOM: number;
81 - const EDQUOT: number;
82 - const EEXIST: number;
83 - const EFAULT: number;
84 - const EFBIG: number;
85 - const EHOSTUNREACH: number;
86 - const EIDRM: number;
87 - const EILSEQ: number;
88 - const EINPROGRESS: number;
89 - const EINTR: number;
90 - const EINVAL: number;
91 - const EIO: number;
92 - const EISCONN: number;
93 - const EISDIR: number;
94 - const ELOOP: number;
95 - const EMFILE: number;
96 - const EMLINK: number;
97 - const EMSGSIZE: number;
98 - const EMULTIHOP: number;
99 - const ENAMETOOLONG: number;
100 - const ENETDOWN: number;
101 - const ENETRESET: number;
102 - const ENETUNREACH: number;
103 - const ENFILE: number;
104 - const ENOBUFS: number;
105 - const ENODATA: number;
106 - const ENODEV: number;
107 - const ENOENT: number;
108 - const ENOEXEC: number;
109 - const ENOLCK: number;
110 - const ENOLINK: number;
111 - const ENOMEM: number;
112 - const ENOMSG: number;
113 - const ENOPROTOOPT: number;
114 - const ENOSPC: number;
115 - const ENOSR: number;
116 - const ENOSTR: number;
117 - const ENOSYS: number;
118 - const ENOTCONN: number;
119 - const ENOTDIR: number;
120 - const ENOTEMPTY: number;
121 - const ENOTSOCK: number;
122 - const ENOTSUP: number;
123 - const ENOTTY: number;
124 - const ENXIO: number;
125 - const EOPNOTSUPP: number;
126 - const EOVERFLOW: number;
127 - const EPERM: number;
128 - const EPIPE: number;
129 - const EPROTO: number;
130 - const EPROTONOSUPPORT: number;
131 - const EPROTOTYPE: number;
132 - const ERANGE: number;
133 - const EROFS: number;
134 - const ESPIPE: number;
135 - const ESRCH: number;
136 - const ESTALE: number;
137 - const ETIME: number;
138 - const ETIMEDOUT: number;
139 - const ETXTBSY: number;
140 - const EWOULDBLOCK: number;
141 - const EXDEV: number;
142 - const WSAEINTR: number;
143 - const WSAEBADF: number;
144 - const WSAEACCES: number;
145 - const WSAEFAULT: number;
146 - const WSAEINVAL: number;
147 - const WSAEMFILE: number;
148 - const WSAEWOULDBLOCK: number;
149 - const WSAEINPROGRESS: number;
150 - const WSAEALREADY: number;
151 - const WSAENOTSOCK: number;
152 - const WSAEDESTADDRREQ: number;
153 - const WSAEMSGSIZE: number;
154 - const WSAEPROTOTYPE: number;
155 - const WSAENOPROTOOPT: number;
156 - const WSAEPROTONOSUPPORT: number;
157 - const WSAESOCKTNOSUPPORT: number;
158 - const WSAEOPNOTSUPP: number;
159 - const WSAEPFNOSUPPORT: number;
160 - const WSAEAFNOSUPPORT: number;
161 - const WSAEADDRINUSE: number;
162 - const WSAEADDRNOTAVAIL: number;
163 - const WSAENETDOWN: number;
164 - const WSAENETUNREACH: number;
165 - const WSAENETRESET: number;
166 - const WSAECONNABORTED: number;
167 - const WSAECONNRESET: number;
168 - const WSAENOBUFS: number;
169 - const WSAEISCONN: number;
170 - const WSAENOTCONN: number;
171 - const WSAESHUTDOWN: number;
172 - const WSAETOOMANYREFS: number;
173 - const WSAETIMEDOUT: number;
174 - const WSAECONNREFUSED: number;
175 - const WSAELOOP: number;
176 - const WSAENAMETOOLONG: number;
177 - const WSAEHOSTDOWN: number;
178 - const WSAEHOSTUNREACH: number;
179 - const WSAENOTEMPTY: number;
180 - const WSAEPROCLIM: number;
181 - const WSAEUSERS: number;
182 - const WSAEDQUOT: number;
183 - const WSAESTALE: number;
184 - const WSAEREMOTE: number;
185 - const WSASYSNOTREADY: number;
186 - const WSAVERNOTSUPPORTED: number;
187 - const WSANOTINITIALISED: number;
188 - const WSAEDISCON: number;
189 - const WSAENOMORE: number;
190 - const WSAECANCELLED: number;
191 - const WSAEINVALIDPROCTABLE: number;
192 - const WSAEINVALIDPROVIDER: number;
193 - const WSAEPROVIDERFAILEDINIT: number;
194 - const WSASYSCALLFAILURE: number;
195 - const WSASERVICE_NOT_FOUND: number;
196 - const WSATYPE_NOT_FOUND: number;
197 - const WSA_E_NO_MORE: number;
198 - const WSA_E_CANCELLED: number;
199 - const WSAEREFUSED: number;
200 - }
201 - namespace priority {
202 - const PRIORITY_LOW: number;
203 - const PRIORITY_BELOW_NORMAL: number;
204 - const PRIORITY_NORMAL: number;
205 - const PRIORITY_ABOVE_NORMAL: number;
206 - const PRIORITY_HIGH: number;
207 - const PRIORITY_HIGHEST: number;
208 - }
209 - }
210 -
211 - function arch(): string;
212 - /**
213 - * Returns a string identifying the kernel version.
214 - * On POSIX systems, the operating system release is determined by calling
215 - * [uname(3)][]. On Windows, `pRtlGetVersion` is used, and if it is not available,
216 - * `GetVersionExW()` will be used. See
217 - * https://en.wikipedia.org/wiki/Uname#Examples for more information.
218 - */
219 - function version(): string;
220 - function platform(): NodeJS.Platform;
221 - function tmpdir(): string;
222 - const EOL: string;
223 - function endianness(): "BE" | "LE";
224 - /**
225 - * Gets the priority of a process.
226 - * Defaults to current process.
227 - */
228 - function getPriority(pid?: number): number;
229 - /**
230 - * Sets the priority of the current process.
231 - * @param priority Must be in range of -20 to 19
232 - */
233 - function setPriority(priority: number): void;
234 - /**
235 - * Sets the priority of the process specified process.
236 - * @param priority Must be in range of -20 to 19
237 - */
238 - function setPriority(pid: number, priority: number): void;
239 -}
1 -{
2 - "_from": "@types/node@*",
3 - "_id": "@types/node@15.6.2",
4 - "_inBundle": false,
5 - "_integrity": "sha512-dxcOx8801kMo3KlU+C+/ctWrzREAH7YvoF3aoVpRdqgs+Kf7flp+PJDN/EX5bME3suDUZHsxes9hpvBmzYlWbA==",
6 - "_location": "/@types/node",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "@types/node@*",
12 - "name": "@types/node",
13 - "escapedName": "@types%2fnode",
14 - "scope": "@types",
15 - "rawSpec": "*",
16 - "saveSpec": null,
17 - "fetchSpec": "*"
18 - },
19 - "_requiredBy": [
20 - "/@types/bson",
21 - "/@types/mongodb"
22 - ],
23 - "_resolved": "https://registry.npmjs.org/@types/node/-/node-15.6.2.tgz",
24 - "_shasum": "c61d49f38af70da32424b5322eee21f97e627175",
25 - "_spec": "@types/node@*",
26 - "_where": "/Users/mindyeoi/Desktop/oss/We-Shop/boiler-plate/node_modules/@types/mongodb",
27 - "bugs": {
28 - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
29 - },
30 - "bundleDependencies": false,
31 - "contributors": [
32 - {
33 - "name": "Microsoft TypeScript",
34 - "url": "https://github.com/Microsoft"
35 - },
36 - {
37 - "name": "DefinitelyTyped",
38 - "url": "https://github.com/DefinitelyTyped"
39 - },
40 - {
41 - "name": "Alberto Schiabel",
42 - "url": "https://github.com/jkomyno"
43 - },
44 - {
45 - "name": "Alvis HT Tang",
46 - "url": "https://github.com/alvis"
47 - },
48 - {
49 - "name": "Andrew Makarov",
50 - "url": "https://github.com/r3nya"
51 - },
52 - {
53 - "name": "Benjamin Toueg",
54 - "url": "https://github.com/btoueg"
55 - },
56 - {
57 - "name": "Chigozirim C.",
58 - "url": "https://github.com/smac89"
59 - },
60 - {
61 - "name": "David Junger",
62 - "url": "https://github.com/touffy"
63 - },
64 - {
65 - "name": "Deividas Bakanas",
66 - "url": "https://github.com/DeividasBakanas"
67 - },
68 - {
69 - "name": "Eugene Y. Q. Shen",
70 - "url": "https://github.com/eyqs"
71 - },
72 - {
73 - "name": "Hannes Magnusson",
74 - "url": "https://github.com/Hannes-Magnusson-CK"
75 - },
76 - {
77 - "name": "Hoàng Văn Khải",
78 - "url": "https://github.com/KSXGitHub"
79 - },
80 - {
81 - "name": "Huw",
82 - "url": "https://github.com/hoo29"
83 - },
84 - {
85 - "name": "Kelvin Jin",
86 - "url": "https://github.com/kjin"
87 - },
88 - {
89 - "name": "Klaus Meinhardt",
90 - "url": "https://github.com/ajafff"
91 - },
92 - {
93 - "name": "Lishude",
94 - "url": "https://github.com/islishude"
95 - },
96 - {
97 - "name": "Mariusz Wiktorczyk",
98 - "url": "https://github.com/mwiktorczyk"
99 - },
100 - {
101 - "name": "Mohsen Azimi",
102 - "url": "https://github.com/mohsen1"
103 - },
104 - {
105 - "name": "Nicolas Even",
106 - "url": "https://github.com/n-e"
107 - },
108 - {
109 - "name": "Nikita Galkin",
110 - "url": "https://github.com/galkin"
111 - },
112 - {
113 - "name": "Parambir Singh",
114 - "url": "https://github.com/parambirs"
115 - },
116 - {
117 - "name": "Sebastian Silbermann",
118 - "url": "https://github.com/eps1lon"
119 - },
120 - {
121 - "name": "Simon Schick",
122 - "url": "https://github.com/SimonSchick"
123 - },
124 - {
125 - "name": "Thomas den Hollander",
126 - "url": "https://github.com/ThomasdenH"
127 - },
128 - {
129 - "name": "Wilco Bakker",
130 - "url": "https://github.com/WilcoBakker"
131 - },
132 - {
133 - "name": "wwwy3y3",
134 - "url": "https://github.com/wwwy3y3"
135 - },
136 - {
137 - "name": "Samuel Ainsworth",
138 - "url": "https://github.com/samuela"
139 - },
140 - {
141 - "name": "Kyle Uehlein",
142 - "url": "https://github.com/kuehlein"
143 - },
144 - {
145 - "name": "Thanik Bhongbhibhat",
146 - "url": "https://github.com/bhongy"
147 - },
148 - {
149 - "name": "Marcin Kopacz",
150 - "url": "https://github.com/chyzwar"
151 - },
152 - {
153 - "name": "Trivikram Kamat",
154 - "url": "https://github.com/trivikr"
155 - },
156 - {
157 - "name": "Minh Son Nguyen",
158 - "url": "https://github.com/nguymin4"
159 - },
160 - {
161 - "name": "Junxiao Shi",
162 - "url": "https://github.com/yoursunny"
163 - },
164 - {
165 - "name": "Ilia Baryshnikov",
166 - "url": "https://github.com/qwelias"
167 - },
168 - {
169 - "name": "ExE Boss",
170 - "url": "https://github.com/ExE-Boss"
171 - },
172 - {
173 - "name": "Surasak Chaisurin",
174 - "url": "https://github.com/Ryan-Willpower"
175 - },
176 - {
177 - "name": "Piotr Błażejewicz",
178 - "url": "https://github.com/peterblazejewicz"
179 - },
180 - {
181 - "name": "Anna Henningsen",
182 - "url": "https://github.com/addaleax"
183 - },
184 - {
185 - "name": "Jason Kwok",
186 - "url": "https://github.com/JasonHK"
187 - },
188 - {
189 - "name": "Victor Perin",
190 - "url": "https://github.com/victorperin"
191 - },
192 - {
193 - "name": "Yongsheng Zhang",
194 - "url": "https://github.com/ZYSzys"
195 - }
196 - ],
197 - "dependencies": {},
198 - "deprecated": false,
199 - "description": "TypeScript definitions for Node.js",
200 - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
201 - "license": "MIT",
202 - "main": "",
203 - "name": "@types/node",
204 - "repository": {
205 - "type": "git",
206 - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
207 - "directory": "types/node"
208 - },
209 - "scripts": {},
210 - "typeScriptVersion": "3.6",
211 - "types": "index.d.ts",
212 - "typesPublisherContentHash": "f62422deccbd466260cb63740d207022259eb7fc7b6e7c406be463b9d1b0cd19",
213 - "typesVersions": {
214 - "<=3.6": {
215 - "*": [
216 - "ts3.6/*"
217 - ]
218 - }
219 - },
220 - "version": "15.6.2"
221 -}
1 -declare module 'path/posix' {
2 - import path = require('path');
3 - export = path;
4 -}
5 -
6 -declare module 'path/win32' {
7 - import path = require('path');
8 - export = path;
9 -}
10 -
11 -declare module 'path' {
12 - namespace path {
13 - /**
14 - * A parsed path object generated by path.parse() or consumed by path.format().
15 - */
16 - interface ParsedPath {
17 - /**
18 - * The root of the path such as '/' or 'c:\'
19 - */
20 - root: string;
21 - /**
22 - * The full directory path such as '/home/user/dir' or 'c:\path\dir'
23 - */
24 - dir: string;
25 - /**
26 - * The file name including extension (if any) such as 'index.html'
27 - */
28 - base: string;
29 - /**
30 - * The file extension (if any) such as '.html'
31 - */
32 - ext: string;
33 - /**
34 - * The file name without extension (if any) such as 'index'
35 - */
36 - name: string;
37 - }
38 -
39 - interface FormatInputPathObject {
40 - /**
41 - * The root of the path such as '/' or 'c:\'
42 - */
43 - root?: string;
44 - /**
45 - * The full directory path such as '/home/user/dir' or 'c:\path\dir'
46 - */
47 - dir?: string;
48 - /**
49 - * The file name including extension (if any) such as 'index.html'
50 - */
51 - base?: string;
52 - /**
53 - * The file extension (if any) such as '.html'
54 - */
55 - ext?: string;
56 - /**
57 - * The file name without extension (if any) such as 'index'
58 - */
59 - name?: string;
60 - }
61 -
62 - interface PlatformPath {
63 - /**
64 - * Normalize a string path, reducing '..' and '.' parts.
65 - * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
66 - *
67 - * @param p string path to normalize.
68 - */
69 - normalize(p: string): string;
70 - /**
71 - * Join all arguments together and normalize the resulting path.
72 - * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
73 - *
74 - * @param paths paths to join.
75 - */
76 - join(...paths: string[]): string;
77 - /**
78 - * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
79 - *
80 - * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
81 - *
82 - * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
83 - * until an absolute path is found. If after using all {from} paths still no absolute path is found,
84 - * the current working directory is used as well. The resulting path is normalized,
85 - * and trailing slashes are removed unless the path gets resolved to the root directory.
86 - *
87 - * @param pathSegments string paths to join. Non-string arguments are ignored.
88 - */
89 - resolve(...pathSegments: string[]): string;
90 - /**
91 - * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
92 - *
93 - * @param path path to test.
94 - */
95 - isAbsolute(p: string): boolean;
96 - /**
97 - * Solve the relative path from {from} to {to}.
98 - * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
99 - */
100 - relative(from: string, to: string): string;
101 - /**
102 - * Return the directory name of a path. Similar to the Unix dirname command.
103 - *
104 - * @param p the path to evaluate.
105 - */
106 - dirname(p: string): string;
107 - /**
108 - * Return the last portion of a path. Similar to the Unix basename command.
109 - * Often used to extract the file name from a fully qualified path.
110 - *
111 - * @param p the path to evaluate.
112 - * @param ext optionally, an extension to remove from the result.
113 - */
114 - basename(p: string, ext?: string): string;
115 - /**
116 - * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
117 - * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
118 - *
119 - * @param p the path to evaluate.
120 - */
121 - extname(p: string): string;
122 - /**
123 - * The platform-specific file separator. '\\' or '/'.
124 - */
125 - readonly sep: string;
126 - /**
127 - * The platform-specific file delimiter. ';' or ':'.
128 - */
129 - readonly delimiter: string;
130 - /**
131 - * Returns an object from a path string - the opposite of format().
132 - *
133 - * @param pathString path to evaluate.
134 - */
135 - parse(p: string): ParsedPath;
136 - /**
137 - * Returns a path string from an object - the opposite of parse().
138 - *
139 - * @param pathString path to evaluate.
140 - */
141 - format(pP: FormatInputPathObject): string;
142 - /**
143 - * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
144 - * If path is not a string, path will be returned without modifications.
145 - * This method is meaningful only on Windows system.
146 - * On POSIX systems, the method is non-operational and always returns path without modifications.
147 - */
148 - toNamespacedPath(path: string): string;
149 - /**
150 - * Posix specific pathing.
151 - * Same as parent object on posix.
152 - */
153 - readonly posix: PlatformPath;
154 - /**
155 - * Windows specific pathing.
156 - * Same as parent object on windows
157 - */
158 - readonly win32: PlatformPath;
159 - }
160 - }
161 - const path: path.PlatformPath;
162 - export = path;
163 -}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -/**
2 - * @deprecated since v7.0.0
3 - * The version of the punycode module bundled in Node.js is being deprecated.
4 - * In a future major version of Node.js this module will be removed.
5 - * Users currently depending on the punycode module should switch to using
6 - * the userland-provided Punycode.js module instead.
7 - */
8 -declare module 'punycode' {
9 - /**
10 - * @deprecated since v7.0.0
11 - * The version of the punycode module bundled in Node.js is being deprecated.
12 - * In a future major version of Node.js this module will be removed.
13 - * Users currently depending on the punycode module should switch to using
14 - * the userland-provided Punycode.js module instead.
15 - */
16 - function decode(string: string): string;
17 - /**
18 - * @deprecated since v7.0.0
19 - * The version of the punycode module bundled in Node.js is being deprecated.
20 - * In a future major version of Node.js this module will be removed.
21 - * Users currently depending on the punycode module should switch to using
22 - * the userland-provided Punycode.js module instead.
23 - */
24 - function encode(string: string): string;
25 - /**
26 - * @deprecated since v7.0.0
27 - * The version of the punycode module bundled in Node.js is being deprecated.
28 - * In a future major version of Node.js this module will be removed.
29 - * Users currently depending on the punycode module should switch to using
30 - * the userland-provided Punycode.js module instead.
31 - */
32 - function toUnicode(domain: string): string;
33 - /**
34 - * @deprecated since v7.0.0
35 - * The version of the punycode module bundled in Node.js is being deprecated.
36 - * In a future major version of Node.js this module will be removed.
37 - * Users currently depending on the punycode module should switch to using
38 - * the userland-provided Punycode.js module instead.
39 - */
40 - function toASCII(domain: string): string;
41 - /**
42 - * @deprecated since v7.0.0
43 - * The version of the punycode module bundled in Node.js is being deprecated.
44 - * In a future major version of Node.js this module will be removed.
45 - * Users currently depending on the punycode module should switch to using
46 - * the userland-provided Punycode.js module instead.
47 - */
48 - const ucs2: ucs2;
49 - interface ucs2 {
50 - /**
51 - * @deprecated since v7.0.0
52 - * The version of the punycode module bundled in Node.js is being deprecated.
53 - * In a future major version of Node.js this module will be removed.
54 - * Users currently depending on the punycode module should switch to using
55 - * the userland-provided Punycode.js module instead.
56 - */
57 - decode(string: string): number[];
58 - /**
59 - * @deprecated since v7.0.0
60 - * The version of the punycode module bundled in Node.js is being deprecated.
61 - * In a future major version of Node.js this module will be removed.
62 - * Users currently depending on the punycode module should switch to using
63 - * the userland-provided Punycode.js module instead.
64 - */
65 - encode(codePoints: ReadonlyArray<number>): string;
66 - }
67 - /**
68 - * @deprecated since v7.0.0
69 - * The version of the punycode module bundled in Node.js is being deprecated.
70 - * In a future major version of Node.js this module will be removed.
71 - * Users currently depending on the punycode module should switch to using
72 - * the userland-provided Punycode.js module instead.
73 - */
74 - const version: string;
75 -}
1 -declare module 'querystring' {
2 - interface StringifyOptions {
3 - encodeURIComponent?: (str: string) => string;
4 - }
5 -
6 - interface ParseOptions {
7 - maxKeys?: number;
8 - decodeURIComponent?: (str: string) => string;
9 - }
10 -
11 - interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> { }
12 -
13 - interface ParsedUrlQueryInput extends NodeJS.Dict<string | number | boolean | ReadonlyArray<string> | ReadonlyArray<number> | ReadonlyArray<boolean> | null> {
14 - }
15 -
16 - function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
17 - function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
18 - /**
19 - * The querystring.encode() function is an alias for querystring.stringify().
20 - */
21 - const encode: typeof stringify;
22 - /**
23 - * The querystring.decode() function is an alias for querystring.parse().
24 - */
25 - const decode: typeof parse;
26 - function escape(str: string): string;
27 - function unescape(str: string): string;
28 -}
1 -declare module 'readline' {
2 - import EventEmitter = require('events');
3 -
4 - interface Key {
5 - sequence?: string;
6 - name?: string;
7 - ctrl?: boolean;
8 - meta?: boolean;
9 - shift?: boolean;
10 - }
11 -
12 - class Interface extends EventEmitter {
13 - readonly terminal: boolean;
14 -
15 - // Need direct access to line/cursor data, for use in external processes
16 - // see: https://github.com/nodejs/node/issues/30347
17 - /** The current input data */
18 - readonly line: string;
19 - /** The current cursor position in the input line */
20 - readonly cursor: number;
21 -
22 - /**
23 - * NOTE: According to the documentation:
24 - *
25 - * > Instances of the `readline.Interface` class are constructed using the
26 - * > `readline.createInterface()` method.
27 - *
28 - * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
29 - */
30 - protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
31 - /**
32 - * NOTE: According to the documentation:
33 - *
34 - * > Instances of the `readline.Interface` class are constructed using the
35 - * > `readline.createInterface()` method.
36 - *
37 - * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
38 - */
39 - protected constructor(options: ReadLineOptions);
40 -
41 - getPrompt(): string;
42 - setPrompt(prompt: string): void;
43 - prompt(preserveCursor?: boolean): void;
44 - question(query: string, callback: (answer: string) => void): void;
45 - pause(): this;
46 - resume(): this;
47 - close(): void;
48 - write(data: string | Buffer, key?: Key): void;
49 -
50 - /**
51 - * Returns the real position of the cursor in relation to the input
52 - * prompt + string. Long input (wrapping) strings, as well as multiple
53 - * line prompts are included in the calculations.
54 - */
55 - getCursorPos(): CursorPos;
56 -
57 - /**
58 - * events.EventEmitter
59 - * 1. close
60 - * 2. line
61 - * 3. pause
62 - * 4. resume
63 - * 5. SIGCONT
64 - * 6. SIGINT
65 - * 7. SIGTSTP
66 - */
67 -
68 - addListener(event: string, listener: (...args: any[]) => void): this;
69 - addListener(event: "close", listener: () => void): this;
70 - addListener(event: "line", listener: (input: string) => void): this;
71 - addListener(event: "pause", listener: () => void): this;
72 - addListener(event: "resume", listener: () => void): this;
73 - addListener(event: "SIGCONT", listener: () => void): this;
74 - addListener(event: "SIGINT", listener: () => void): this;
75 - addListener(event: "SIGTSTP", listener: () => void): this;
76 -
77 - emit(event: string | symbol, ...args: any[]): boolean;
78 - emit(event: "close"): boolean;
79 - emit(event: "line", input: string): boolean;
80 - emit(event: "pause"): boolean;
81 - emit(event: "resume"): boolean;
82 - emit(event: "SIGCONT"): boolean;
83 - emit(event: "SIGINT"): boolean;
84 - emit(event: "SIGTSTP"): boolean;
85 -
86 - on(event: string, listener: (...args: any[]) => void): this;
87 - on(event: "close", listener: () => void): this;
88 - on(event: "line", listener: (input: string) => void): this;
89 - on(event: "pause", listener: () => void): this;
90 - on(event: "resume", listener: () => void): this;
91 - on(event: "SIGCONT", listener: () => void): this;
92 - on(event: "SIGINT", listener: () => void): this;
93 - on(event: "SIGTSTP", listener: () => void): this;
94 -
95 - once(event: string, listener: (...args: any[]) => void): this;
96 - once(event: "close", listener: () => void): this;
97 - once(event: "line", listener: (input: string) => void): this;
98 - once(event: "pause", listener: () => void): this;
99 - once(event: "resume", listener: () => void): this;
100 - once(event: "SIGCONT", listener: () => void): this;
101 - once(event: "SIGINT", listener: () => void): this;
102 - once(event: "SIGTSTP", listener: () => void): this;
103 -
104 - prependListener(event: string, listener: (...args: any[]) => void): this;
105 - prependListener(event: "close", listener: () => void): this;
106 - prependListener(event: "line", listener: (input: string) => void): this;
107 - prependListener(event: "pause", listener: () => void): this;
108 - prependListener(event: "resume", listener: () => void): this;
109 - prependListener(event: "SIGCONT", listener: () => void): this;
110 - prependListener(event: "SIGINT", listener: () => void): this;
111 - prependListener(event: "SIGTSTP", listener: () => void): this;
112 -
113 - prependOnceListener(event: string, listener: (...args: any[]) => void): this;
114 - prependOnceListener(event: "close", listener: () => void): this;
115 - prependOnceListener(event: "line", listener: (input: string) => void): this;
116 - prependOnceListener(event: "pause", listener: () => void): this;
117 - prependOnceListener(event: "resume", listener: () => void): this;
118 - prependOnceListener(event: "SIGCONT", listener: () => void): this;
119 - prependOnceListener(event: "SIGINT", listener: () => void): this;
120 - prependOnceListener(event: "SIGTSTP", listener: () => void): this;
121 - [Symbol.asyncIterator](): AsyncIterableIterator<string>;
122 - }
123 -
124 - type ReadLine = Interface; // type forwarded for backwards compatibility
125 -
126 - type Completer = (line: string) => CompleterResult;
127 - type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => any;
128 -
129 - type CompleterResult = [string[], string];
130 -
131 - interface ReadLineOptions {
132 - input: NodeJS.ReadableStream;
133 - output?: NodeJS.WritableStream;
134 - completer?: Completer | AsyncCompleter;
135 - terminal?: boolean;
136 - historySize?: number;
137 - prompt?: string;
138 - crlfDelay?: number;
139 - removeHistoryDuplicates?: boolean;
140 - escapeCodeTimeout?: number;
141 - tabSize?: number;
142 - }
143 -
144 - function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
145 - function createInterface(options: ReadLineOptions): Interface;
146 - function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
147 -
148 - type Direction = -1 | 0 | 1;
149 -
150 - interface CursorPos {
151 - rows: number;
152 - cols: number;
153 - }
154 -
155 - /**
156 - * Clears the current line of this WriteStream in a direction identified by `dir`.
157 - */
158 - function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
159 - /**
160 - * Clears this `WriteStream` from the current cursor down.
161 - */
162 - function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
163 - /**
164 - * Moves this WriteStream's cursor to the specified position.
165 - */
166 - function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
167 - /**
168 - * Moves this WriteStream's cursor relative to its current position.
169 - */
170 - function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
171 -}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -declare module "stream/promises" {
2 - import { FinishedOptions, PipelineSource, PipelineTransform,
3 - PipelineDestination, PipelinePromise, PipelineOptions } from "stream";
4 -
5 - function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
6 -
7 - function pipeline<A extends PipelineSource<any>,
8 - B extends PipelineDestination<A, any>>(
9 - source: A,
10 - destination: B,
11 - options?: PipelineOptions
12 - ): PipelinePromise<B>;
13 - function pipeline<A extends PipelineSource<any>,
14 - T1 extends PipelineTransform<A, any>,
15 - B extends PipelineDestination<T1, any>>(
16 - source: A,
17 - transform1: T1,
18 - destination: B,
19 - options?: PipelineOptions
20 - ): PipelinePromise<B>;
21 - function pipeline<A extends PipelineSource<any>,
22 - T1 extends PipelineTransform<A, any>,
23 - T2 extends PipelineTransform<T1, any>,
24 - B extends PipelineDestination<T2, any>>(
25 - source: A,
26 - transform1: T1,
27 - transform2: T2,
28 - destination: B,
29 - options?: PipelineOptions
30 - ): PipelinePromise<B>;
31 - function pipeline<A extends PipelineSource<any>,
32 - T1 extends PipelineTransform<A, any>,
33 - T2 extends PipelineTransform<T1, any>,
34 - T3 extends PipelineTransform<T2, any>,
35 - B extends PipelineDestination<T3, any>>(
36 - source: A,
37 - transform1: T1,
38 - transform2: T2,
39 - transform3: T3,
40 - destination: B,
41 - options?: PipelineOptions
42 - ): PipelinePromise<B>;
43 - function pipeline<A extends PipelineSource<any>,
44 - T1 extends PipelineTransform<A, any>,
45 - T2 extends PipelineTransform<T1, any>,
46 - T3 extends PipelineTransform<T2, any>,
47 - T4 extends PipelineTransform<T3, any>,
48 - B extends PipelineDestination<T4, any>>(
49 - source: A,
50 - transform1: T1,
51 - transform2: T2,
52 - transform3: T3,
53 - transform4: T4,
54 - destination: B,
55 - options?: PipelineOptions
56 - ): PipelinePromise<B>;
57 -
58 - function pipeline(
59 - streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
60 - options?: PipelineOptions
61 - ): Promise<void>;
62 - function pipeline(
63 - stream1: NodeJS.ReadableStream,
64 - stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
65 - ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>,
66 - ): Promise<void>;
67 -}
1 -declare module 'string_decoder' {
2 - class StringDecoder {
3 - constructor(encoding?: BufferEncoding);
4 - write(buffer: Buffer): string;
5 - end(buffer?: Buffer): string;
6 - }
7 -}
1 -declare module 'timers' {
2 - interface TimerOptions {
3 - /**
4 - * Set to `false` to indicate that the scheduled `Timeout`
5 - * should not require the Node.js event loop to remain active.
6 - * @default true
7 - */
8 - ref?: boolean;
9 -
10 - /**
11 - * An optional `AbortSignal` that can be used to cancel the scheduled `Timeout`.
12 - */
13 - signal?: AbortSignal;
14 - }
15 -
16 - function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
17 - namespace setTimeout {
18 - function __promisify__(ms: number): Promise<void>;
19 - function __promisify__<T>(ms: number, value: T, options?: TimerOptions): Promise<T>;
20 - }
21 - function clearTimeout(timeoutId: NodeJS.Timeout): void;
22 - function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
23 - function clearInterval(intervalId: NodeJS.Timeout): void;
24 - function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
25 - namespace setImmediate {
26 - function __promisify__(): Promise<void>;
27 - function __promisify__<T>(value: T, options?: TimerOptions): Promise<T>;
28 - }
29 - function clearImmediate(immediateId: NodeJS.Immediate): void;
30 -}
1 -declare module 'timers/promises' {
2 - import { TimerOptions } from 'timers';
3 -
4 - /**
5 - * Returns a promise that resolves after the specified delay in milliseconds.
6 - */
7 - function setTimeout<T>(delay: number, value?: T, options?: TimerOptions): Promise<T>;
8 -
9 - /**
10 - * Returns a promise that resolves in the next tick.
11 - */
12 - function setImmediate<T>(value: T, options?: TimerOptions): Promise<T>;
13 -}
This diff is collapsed. Click to expand it.
1 -declare module 'trace_events' {
2 - /**
3 - * The `Tracing` object is used to enable or disable tracing for sets of
4 - * categories. Instances are created using the
5 - * `trace_events.createTracing()` method.
6 - *
7 - * When created, the `Tracing` object is disabled. Calling the
8 - * `tracing.enable()` method adds the categories to the set of enabled trace
9 - * event categories. Calling `tracing.disable()` will remove the categories
10 - * from the set of enabled trace event categories.
11 - */
12 - interface Tracing {
13 - /**
14 - * A comma-separated list of the trace event categories covered by this
15 - * `Tracing` object.
16 - */
17 - readonly categories: string;
18 -
19 - /**
20 - * Disables this `Tracing` object.
21 - *
22 - * Only trace event categories _not_ covered by other enabled `Tracing`
23 - * objects and _not_ specified by the `--trace-event-categories` flag
24 - * will be disabled.
25 - */
26 - disable(): void;
27 -
28 - /**
29 - * Enables this `Tracing` object for the set of categories covered by
30 - * the `Tracing` object.
31 - */
32 - enable(): void;
33 -
34 - /**
35 - * `true` only if the `Tracing` object has been enabled.
36 - */
37 - readonly enabled: boolean;
38 - }
39 -
40 - interface CreateTracingOptions {
41 - /**
42 - * An array of trace category names. Values included in the array are
43 - * coerced to a string when possible. An error will be thrown if the
44 - * value cannot be coerced.
45 - */
46 - categories: string[];
47 - }
48 -
49 - /**
50 - * Creates and returns a Tracing object for the given set of categories.
51 - */
52 - function createTracing(options: CreateTracingOptions): Tracing;
53 -
54 - /**
55 - * Returns a comma-separated list of all currently-enabled trace event
56 - * categories. The current set of enabled trace event categories is
57 - * determined by the union of all currently-enabled `Tracing` objects and
58 - * any categories enabled using the `--trace-event-categories` flag.
59 - */
60 - function getEnabledCategories(): string | undefined;
61 -}
1 -declare module 'assert' {
2 - /** An alias of `assert.ok()`. */
3 - function assert(value: any, message?: string | Error): void;
4 - namespace assert {
5 - class AssertionError extends Error {
6 - actual: any;
7 - expected: any;
8 - operator: string;
9 - generatedMessage: boolean;
10 - code: 'ERR_ASSERTION';
11 -
12 - constructor(options?: {
13 - /** If provided, the error message is set to this value. */
14 - message?: string;
15 - /** The `actual` property on the error instance. */
16 - actual?: any;
17 - /** The `expected` property on the error instance. */
18 - expected?: any;
19 - /** The `operator` property on the error instance. */
20 - operator?: string;
21 - /** If provided, the generated stack trace omits frames before this function. */
22 - // tslint:disable-next-line:ban-types
23 - stackStartFn?: Function;
24 - });
25 - }
26 -
27 - class CallTracker {
28 - calls(exact?: number): () => void;
29 - calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
30 - report(): CallTrackerReportInformation[];
31 - verify(): void;
32 - }
33 - interface CallTrackerReportInformation {
34 - message: string;
35 - /** The actual number of times the function was called. */
36 - actual: number;
37 - /** The number of times the function was expected to be called. */
38 - expected: number;
39 - /** The name of the function that is wrapped. */
40 - operator: string;
41 - /** A stack trace of the function. */
42 - stack: object;
43 - }
44 -
45 - type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
46 -
47 - function fail(message?: string | Error): never;
48 - /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
49 - function fail(
50 - actual: any,
51 - expected: any,
52 - message?: string | Error,
53 - operator?: string,
54 - // tslint:disable-next-line:ban-types
55 - stackStartFn?: Function,
56 - ): never;
57 - function ok(value: any, message?: string | Error): void;
58 - /** @deprecated since v9.9.0 - use strictEqual() instead. */
59 - function equal(actual: any, expected: any, message?: string | Error): void;
60 - /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
61 - function notEqual(actual: any, expected: any, message?: string | Error): void;
62 - /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
63 - function deepEqual(actual: any, expected: any, message?: string | Error): void;
64 - /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
65 - function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
66 - function strictEqual(actual: any, expected: any, message?: string | Error): void;
67 - function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
68 - function deepStrictEqual(actual: any, expected: any, message?: string | Error): void;
69 - function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
70 -
71 - function throws(block: () => any, message?: string | Error): void;
72 - function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
73 - function doesNotThrow(block: () => any, message?: string | Error): void;
74 - function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
75 -
76 - function ifError(value: any): void;
77 -
78 - function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
79 - function rejects(
80 - block: (() => Promise<any>) | Promise<any>,
81 - error: AssertPredicate,
82 - message?: string | Error,
83 - ): Promise<void>;
84 - function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
85 - function doesNotReject(
86 - block: (() => Promise<any>) | Promise<any>,
87 - error: AssertPredicate,
88 - message?: string | Error,
89 - ): Promise<void>;
90 -
91 - function match(value: string, regExp: RegExp, message?: string | Error): void;
92 - function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
93 -
94 - const strict: typeof assert;
95 - }
96 -
97 - export = assert;
98 -}
1 -// NOTE: These definitions support NodeJS and TypeScript 3.6 and earlier.
2 -
3 -// NOTE: TypeScript version-specific augmentations can be found in the following paths:
4 -// - ~/base.d.ts - Shared definitions common to all TypeScript versions
5 -// - ~/index.d.ts - Definitions specific to TypeScript 3.7 and above
6 -// - ~/ts3.5/base.d.ts - Definitions specific to TypeScript 3.6 and earlier
7 -// - ~/ts3.5/index.d.ts - Definitions specific to TypeScript 3.6 and earlier with assert pulled in
8 -
9 -// Reference required types from the default lib:
10 -/// <reference lib="es2018" />
11 -/// <reference lib="esnext.asynciterable" />
12 -/// <reference lib="esnext.intl" />
13 -/// <reference lib="esnext.bigint" />
14 -
15 -// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
16 -/// <reference path="../assert/strict.d.ts" />
17 -/// <reference path="../globals.d.ts" />
18 -/// <reference path="../async_hooks.d.ts" />
19 -/// <reference path="../buffer.d.ts" />
20 -/// <reference path="../child_process.d.ts" />
21 -/// <reference path="../cluster.d.ts" />
22 -/// <reference path="../console.d.ts" />
23 -/// <reference path="../constants.d.ts" />
24 -/// <reference path="../crypto.d.ts" />
25 -/// <reference path="../dgram.d.ts" />
26 -/// <reference path="../diagnostic_channel.d.ts" />
27 -/// <reference path="../dns.d.ts" />
28 -/// <reference path="../dns/promises.d.ts" />
29 -/// <reference path="../dns/promises.d.ts" />
30 -/// <reference path="../domain.d.ts" />
31 -/// <reference path="../events.d.ts" />
32 -/// <reference path="../fs.d.ts" />
33 -/// <reference path="../fs/promises.d.ts" />
34 -/// <reference path="../http.d.ts" />
35 -/// <reference path="../http2.d.ts" />
36 -/// <reference path="../https.d.ts" />
37 -/// <reference path="../inspector.d.ts" />
38 -/// <reference path="../module.d.ts" />
39 -/// <reference path="../net.d.ts" />
40 -/// <reference path="../os.d.ts" />
41 -/// <reference path="../path.d.ts" />
42 -/// <reference path="../perf_hooks.d.ts" />
43 -/// <reference path="../process.d.ts" />
44 -/// <reference path="../punycode.d.ts" />
45 -/// <reference path="../querystring.d.ts" />
46 -/// <reference path="../readline.d.ts" />
47 -/// <reference path="../repl.d.ts" />
48 -/// <reference path="../stream.d.ts" />
49 -/// <reference path="../stream/promises.d.ts" />
50 -/// <reference path="../string_decoder.d.ts" />
51 -/// <reference path="../timers.d.ts" />
52 -/// <reference path="../timers/promises.d.ts" />
53 -/// <reference path="../tls.d.ts" />
54 -/// <reference path="../trace_events.d.ts" />
55 -/// <reference path="../tty.d.ts" />
56 -/// <reference path="../url.d.ts" />
57 -/// <reference path="../util.d.ts" />
58 -/// <reference path="../util/types.d.ts" />
59 -/// <reference path="../v8.d.ts" />
60 -/// <reference path="../vm.d.ts" />
61 -/// <reference path="../worker_threads.d.ts" />
62 -/// <reference path="../zlib.d.ts" />
63 -
64 -// TypeScript 3.5-specific augmentations:
65 -/// <reference path="../globals.global.d.ts" />
66 -
67 -// TypeScript 3.5-specific augmentations:
68 -/// <reference path="../wasi.d.ts" />
1 -// NOTE: These definitions support NodeJS and TypeScript 3.5 - 3.6.
2 -// This is required to enable typing assert in ts3.7 without causing errors
3 -// Typically type modifications should be made in base.d.ts instead of here
4 -
5 -/// <reference path="base.d.ts" />
6 -
7 -/// <reference path="assert.d.ts" />
1 -declare module 'tty' {
2 - import * as net from 'net';
3 -
4 - function isatty(fd: number): boolean;
5 - class ReadStream extends net.Socket {
6 - constructor(fd: number, options?: net.SocketConstructorOpts);
7 - isRaw: boolean;
8 - setRawMode(mode: boolean): this;
9 - isTTY: boolean;
10 - }
11 - /**
12 - * -1 - to the left from cursor
13 - * 0 - the entire line
14 - * 1 - to the right from cursor
15 - */
16 - type Direction = -1 | 0 | 1;
17 - class WriteStream extends net.Socket {
18 - constructor(fd: number);
19 - addListener(event: string, listener: (...args: any[]) => void): this;
20 - addListener(event: "resize", listener: () => void): this;
21 -
22 - emit(event: string | symbol, ...args: any[]): boolean;
23 - emit(event: "resize"): boolean;
24 -
25 - on(event: string, listener: (...args: any[]) => void): this;
26 - on(event: "resize", listener: () => void): this;
27 -
28 - once(event: string, listener: (...args: any[]) => void): this;
29 - once(event: "resize", listener: () => void): this;
30 -
31 - prependListener(event: string, listener: (...args: any[]) => void): this;
32 - prependListener(event: "resize", listener: () => void): this;
33 -
34 - prependOnceListener(event: string, listener: (...args: any[]) => void): this;
35 - prependOnceListener(event: "resize", listener: () => void): this;
36 -
37 - /**
38 - * Clears the current line of this WriteStream in a direction identified by `dir`.
39 - */
40 - clearLine(dir: Direction, callback?: () => void): boolean;
41 - /**
42 - * Clears this `WriteStream` from the current cursor down.
43 - */
44 - clearScreenDown(callback?: () => void): boolean;
45 - /**
46 - * Moves this WriteStream's cursor to the specified position.
47 - */
48 - cursorTo(x: number, y?: number, callback?: () => void): boolean;
49 - cursorTo(x: number, callback: () => void): boolean;
50 - /**
51 - * Moves this WriteStream's cursor relative to its current position.
52 - */
53 - moveCursor(dx: number, dy: number, callback?: () => void): boolean;
54 - /**
55 - * @default `process.env`
56 - */
57 - getColorDepth(env?: {}): number;
58 - hasColors(depth?: number): boolean;
59 - hasColors(env?: {}): boolean;
60 - hasColors(depth: number, env?: {}): boolean;
61 - getWindowSize(): [number, number];
62 - columns: number;
63 - rows: number;
64 - isTTY: boolean;
65 - }
66 -}
1 -declare module 'url' {
2 - import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
3 -
4 - // Input to `url.format`
5 - interface UrlObject {
6 - auth?: string | null;
7 - hash?: string | null;
8 - host?: string | null;
9 - hostname?: string | null;
10 - href?: string | null;
11 - pathname?: string | null;
12 - protocol?: string | null;
13 - search?: string | null;
14 - slashes?: boolean | null;
15 - port?: string | number | null;
16 - query?: string | null | ParsedUrlQueryInput;
17 - }
18 -
19 - // Output of `url.parse`
20 - interface Url {
21 - auth: string | null;
22 - hash: string | null;
23 - host: string | null;
24 - hostname: string | null;
25 - href: string;
26 - path: string | null;
27 - pathname: string | null;
28 - protocol: string | null;
29 - search: string | null;
30 - slashes: boolean | null;
31 - port: string | null;
32 - query: string | null | ParsedUrlQuery;
33 - }
34 -
35 - interface UrlWithParsedQuery extends Url {
36 - query: ParsedUrlQuery;
37 - }
38 -
39 - interface UrlWithStringQuery extends Url {
40 - query: string | null;
41 - }
42 -
43 - /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
44 - function parse(urlStr: string): UrlWithStringQuery;
45 - /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
46 - function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
47 - /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
48 - function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
49 - /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
50 - function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
51 -
52 - function format(URL: URL, options?: URLFormatOptions): string;
53 - /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
54 - function format(urlObject: UrlObject | string): string;
55 - /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
56 - function resolve(from: string, to: string): string;
57 -
58 - function domainToASCII(domain: string): string;
59 - function domainToUnicode(domain: string): string;
60 -
61 - /**
62 - * This function ensures the correct decodings of percent-encoded characters as
63 - * well as ensuring a cross-platform valid absolute path string.
64 - * @param url The file URL string or URL object to convert to a path.
65 - */
66 - function fileURLToPath(url: string | URL): string;
67 -
68 - /**
69 - * This function ensures that path is resolved absolutely, and that the URL
70 - * control characters are correctly encoded when converting into a File URL.
71 - * @param url The path to convert to a File URL.
72 - */
73 - function pathToFileURL(url: string): URL;
74 -
75 - interface URLFormatOptions {
76 - auth?: boolean;
77 - fragment?: boolean;
78 - search?: boolean;
79 - unicode?: boolean;
80 - }
81 -
82 - class URL {
83 - constructor(input: string, base?: string | URL);
84 - hash: string;
85 - host: string;
86 - hostname: string;
87 - href: string;
88 - readonly origin: string;
89 - password: string;
90 - pathname: string;
91 - port: string;
92 - protocol: string;
93 - search: string;
94 - readonly searchParams: URLSearchParams;
95 - username: string;
96 - toString(): string;
97 - toJSON(): string;
98 - }
99 -
100 - class URLSearchParams implements Iterable<[string, string]> {
101 - constructor(init?: URLSearchParams | string | NodeJS.Dict<string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
102 - append(name: string, value: string): void;
103 - delete(name: string): void;
104 - entries(): IterableIterator<[string, string]>;
105 - forEach(callback: (value: string, name: string, searchParams: this) => void): void;
106 - get(name: string): string | null;
107 - getAll(name: string): string[];
108 - has(name: string): boolean;
109 - keys(): IterableIterator<string>;
110 - set(name: string, value: string): void;
111 - sort(): void;
112 - toString(): string;
113 - values(): IterableIterator<string>;
114 - [Symbol.iterator](): IterableIterator<[string, string]>;
115 - }
116 -}
This diff is collapsed. Click to expand it.
1 -declare module 'util/types' {
2 - function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
3 - function isArgumentsObject(object: any): object is IArguments;
4 - function isArrayBuffer(object: any): object is ArrayBuffer;
5 - function isArrayBufferView(object: any): object is NodeJS.ArrayBufferView;
6 - function isAsyncFunction(object: any): boolean;
7 - function isBigInt64Array(value: any): value is BigInt64Array;
8 - function isBigUint64Array(value: any): value is BigUint64Array;
9 - function isBooleanObject(object: any): object is Boolean;
10 - function isBoxedPrimitive(object: any): object is String | Number | BigInt | Boolean | Symbol;
11 - function isDataView(object: any): object is DataView;
12 - function isDate(object: any): object is Date;
13 - function isExternal(object: any): boolean;
14 - function isFloat32Array(object: any): object is Float32Array;
15 - function isFloat64Array(object: any): object is Float64Array;
16 - function isGeneratorFunction(object: any): object is GeneratorFunction;
17 - function isGeneratorObject(object: any): object is Generator;
18 - function isInt8Array(object: any): object is Int8Array;
19 - function isInt16Array(object: any): object is Int16Array;
20 - function isInt32Array(object: any): object is Int32Array;
21 - function isMap<T>(
22 - object: T | {},
23 - ): object is T extends ReadonlyMap<any, any>
24 - ? unknown extends T
25 - ? never
26 - : ReadonlyMap<any, any>
27 - : Map<any, any>;
28 - function isMapIterator(object: any): boolean;
29 - function isModuleNamespaceObject(value: any): boolean;
30 - function isNativeError(object: any): object is Error;
31 - function isNumberObject(object: any): object is Number;
32 - function isPromise(object: any): object is Promise<any>;
33 - function isProxy(object: any): boolean;
34 - function isRegExp(object: any): object is RegExp;
35 - function isSet<T>(
36 - object: T | {},
37 - ): object is T extends ReadonlySet<any>
38 - ? unknown extends T
39 - ? never
40 - : ReadonlySet<any>
41 - : Set<any>;
42 - function isSetIterator(object: any): boolean;
43 - function isSharedArrayBuffer(object: any): object is SharedArrayBuffer;
44 - function isStringObject(object: any): object is String;
45 - function isSymbolObject(object: any): object is Symbol;
46 - function isTypedArray(object: any): object is NodeJS.TypedArray;
47 - function isUint8Array(object: any): object is Uint8Array;
48 - function isUint8ClampedArray(object: any): object is Uint8ClampedArray;
49 - function isUint16Array(object: any): object is Uint16Array;
50 - function isUint32Array(object: any): object is Uint32Array;
51 - function isWeakMap(object: any): object is WeakMap<any, any>;
52 - function isWeakSet(object: any): object is WeakSet<any>;
53 -}
1 -declare module 'v8' {
2 - import { Readable } from 'stream';
3 -
4 - interface HeapSpaceInfo {
5 - space_name: string;
6 - space_size: number;
7 - space_used_size: number;
8 - space_available_size: number;
9 - physical_space_size: number;
10 - }
11 -
12 - // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
13 - type DoesZapCodeSpaceFlag = 0 | 1;
14 -
15 - interface HeapInfo {
16 - total_heap_size: number;
17 - total_heap_size_executable: number;
18 - total_physical_size: number;
19 - total_available_size: number;
20 - used_heap_size: number;
21 - heap_size_limit: number;
22 - malloced_memory: number;
23 - peak_malloced_memory: number;
24 - does_zap_garbage: DoesZapCodeSpaceFlag;
25 - number_of_native_contexts: number;
26 - number_of_detached_contexts: number;
27 - }
28 -
29 - interface HeapCodeStatistics {
30 - code_and_metadata_size: number;
31 - bytecode_and_metadata_size: number;
32 - external_script_source_size: number;
33 - }
34 -
35 - /**
36 - * Returns an integer representing a "version tag" derived from the V8 version, command line flags and detected CPU features.
37 - * This is useful for determining whether a vm.Script cachedData buffer is compatible with this instance of V8.
38 - */
39 - function cachedDataVersionTag(): number;
40 -
41 - function getHeapStatistics(): HeapInfo;
42 - function getHeapSpaceStatistics(): HeapSpaceInfo[];
43 - function setFlagsFromString(flags: string): void;
44 - /**
45 - * Generates a snapshot of the current V8 heap and returns a Readable
46 - * Stream that may be used to read the JSON serialized representation.
47 - * This conversation was marked as resolved by joyeecheung
48 - * This JSON stream format is intended to be used with tools such as
49 - * Chrome DevTools. The JSON schema is undocumented and specific to the
50 - * V8 engine, and may change from one version of V8 to the next.
51 - */
52 - function getHeapSnapshot(): Readable;
53 -
54 - /**
55 - *
56 - * @param fileName The file path where the V8 heap snapshot is to be
57 - * saved. If not specified, a file name with the pattern
58 - * `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
59 - * generated, where `{pid}` will be the PID of the Node.js process,
60 - * `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from
61 - * the main Node.js thread or the id of a worker thread.
62 - */
63 - function writeHeapSnapshot(fileName?: string): string;
64 -
65 - function getHeapCodeStatistics(): HeapCodeStatistics;
66 -
67 - class Serializer {
68 - /**
69 - * Writes out a header, which includes the serialization format version.
70 - */
71 - writeHeader(): void;
72 -
73 - /**
74 - * Serializes a JavaScript value and adds the serialized representation to the internal buffer.
75 - * This throws an error if value cannot be serialized.
76 - */
77 - writeValue(val: any): boolean;
78 -
79 - /**
80 - * Returns the stored internal buffer.
81 - * This serializer should not be used once the buffer is released.
82 - * Calling this method results in undefined behavior if a previous write has failed.
83 - */
84 - releaseBuffer(): Buffer;
85 -
86 - /**
87 - * Marks an ArrayBuffer as having its contents transferred out of band.\
88 - * Pass the corresponding ArrayBuffer in the deserializing context to deserializer.transferArrayBuffer().
89 - */
90 - transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
91 -
92 - /**
93 - * Write a raw 32-bit unsigned integer.
94 - */
95 - writeUint32(value: number): void;
96 -
97 - /**
98 - * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
99 - */
100 - writeUint64(hi: number, lo: number): void;
101 -
102 - /**
103 - * Write a JS number value.
104 - */
105 - writeDouble(value: number): void;
106 -
107 - /**
108 - * Write raw bytes into the serializer’s internal buffer.
109 - * The deserializer will require a way to compute the length of the buffer.
110 - */
111 - writeRawBytes(buffer: NodeJS.TypedArray): void;
112 - }
113 -
114 - /**
115 - * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
116 - * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
117 - */
118 - class DefaultSerializer extends Serializer {
119 - }
120 -
121 - class Deserializer {
122 - constructor(data: NodeJS.TypedArray);
123 - /**
124 - * Reads and validates a header (including the format version).
125 - * May, for example, reject an invalid or unsupported wire format.
126 - * In that case, an Error is thrown.
127 - */
128 - readHeader(): boolean;
129 -
130 - /**
131 - * Deserializes a JavaScript value from the buffer and returns it.
132 - */
133 - readValue(): any;
134 -
135 - /**
136 - * Marks an ArrayBuffer as having its contents transferred out of band.
137 - * Pass the corresponding `ArrayBuffer` in the serializing context to serializer.transferArrayBuffer()
138 - * (or return the id from serializer._getSharedArrayBufferId() in the case of SharedArrayBuffers).
139 - */
140 - transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
141 -
142 - /**
143 - * Reads the underlying wire format version.
144 - * Likely mostly to be useful to legacy code reading old wire format versions.
145 - * May not be called before .readHeader().
146 - */
147 - getWireFormatVersion(): number;
148 -
149 - /**
150 - * Read a raw 32-bit unsigned integer and return it.
151 - */
152 - readUint32(): number;
153 -
154 - /**
155 - * Read a raw 64-bit unsigned integer and return it as an array [hi, lo] with two 32-bit unsigned integer entries.
156 - */
157 - readUint64(): [number, number];
158 -
159 - /**
160 - * Read a JS number value.
161 - */
162 - readDouble(): number;
163 -
164 - /**
165 - * Read raw bytes from the deserializer’s internal buffer.
166 - * The length parameter must correspond to the length of the buffer that was passed to serializer.writeRawBytes().
167 - */
168 - readRawBytes(length: number): Buffer;
169 - }
170 -
171 - /**
172 - * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
173 - * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
174 - */
175 - class DefaultDeserializer extends Deserializer {
176 - }
177 -
178 - /**
179 - * Uses a `DefaultSerializer` to serialize value into a buffer.
180 - */
181 - function serialize(value: any): Buffer;
182 -
183 - /**
184 - * Uses a `DefaultDeserializer` with default options to read a JS value from a buffer.
185 - */
186 - function deserialize(data: NodeJS.TypedArray): any;
187 -
188 - /**
189 - * Begins writing coverage report based on the `NODE_V8_COVERAGE` env var.
190 - * Noop is the env var is not set.
191 - */
192 - function takeCoverage(): void;
193 -
194 - /**
195 - * Stops writing coverage report.
196 - */
197 - function stopCoverage(): void;
198 -}
1 -declare module 'vm' {
2 - interface Context extends NodeJS.Dict<any> { }
3 - interface BaseOptions {
4 - /**
5 - * Specifies the filename used in stack traces produced by this script.
6 - * Default: `''`.
7 - */
8 - filename?: string;
9 - /**
10 - * Specifies the line number offset that is displayed in stack traces produced by this script.
11 - * Default: `0`.
12 - */
13 - lineOffset?: number;
14 - /**
15 - * Specifies the column number offset that is displayed in stack traces produced by this script.
16 - * @default 0
17 - */
18 - columnOffset?: number;
19 - }
20 - interface ScriptOptions extends BaseOptions {
21 - displayErrors?: boolean;
22 - timeout?: number;
23 - cachedData?: Buffer;
24 - /** @deprecated in favor of `script.createCachedData()` */
25 - produceCachedData?: boolean;
26 - }
27 - interface RunningScriptOptions extends BaseOptions {
28 - /**
29 - * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
30 - * Default: `true`.
31 - */
32 - displayErrors?: boolean;
33 - /**
34 - * Specifies the number of milliseconds to execute code before terminating execution.
35 - * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
36 - */
37 - timeout?: number;
38 - /**
39 - * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
40 - * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
41 - * If execution is terminated, an `Error` will be thrown.
42 - * Default: `false`.
43 - */
44 - breakOnSigint?: boolean;
45 - /**
46 - * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
47 - */
48 - microtaskMode?: 'afterEvaluate';
49 - }
50 - interface CompileFunctionOptions extends BaseOptions {
51 - /**
52 - * Provides an optional data with V8's code cache data for the supplied source.
53 - */
54 - cachedData?: Buffer;
55 - /**
56 - * Specifies whether to produce new cache data.
57 - * Default: `false`,
58 - */
59 - produceCachedData?: boolean;
60 - /**
61 - * The sandbox/context in which the said function should be compiled in.
62 - */
63 - parsingContext?: Context;
64 -
65 - /**
66 - * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
67 - */
68 - contextExtensions?: Object[];
69 - }
70 -
71 - interface CreateContextOptions {
72 - /**
73 - * Human-readable name of the newly created context.
74 - * @default 'VM Context i' Where i is an ascending numerical index of the created context.
75 - */
76 - name?: string;
77 - /**
78 - * Corresponds to the newly created context for display purposes.
79 - * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
80 - * like the value of the `url.origin` property of a URL object.
81 - * Most notably, this string should omit the trailing slash, as that denotes a path.
82 - * @default ''
83 - */
84 - origin?: string;
85 - codeGeneration?: {
86 - /**
87 - * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
88 - * will throw an EvalError.
89 - * @default true
90 - */
91 - strings?: boolean;
92 - /**
93 - * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
94 - * @default true
95 - */
96 - wasm?: boolean;
97 - };
98 - /**
99 - * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
100 - */
101 - microtaskMode?: 'afterEvaluate';
102 - }
103 -
104 - type MeasureMemoryMode = 'summary' | 'detailed';
105 -
106 - interface MeasureMemoryOptions {
107 - /**
108 - * @default 'summary'
109 - */
110 - mode?: MeasureMemoryMode;
111 - context?: Context;
112 - }
113 -
114 - interface MemoryMeasurement {
115 - total: {
116 - jsMemoryEstimate: number;
117 - jsMemoryRange: [number, number];
118 - };
119 - }
120 -
121 - class Script {
122 - constructor(code: string, options?: ScriptOptions);
123 - runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
124 - runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
125 - runInThisContext(options?: RunningScriptOptions): any;
126 - createCachedData(): Buffer;
127 - cachedDataRejected?: boolean;
128 - }
129 - function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
130 - function isContext(sandbox: Context): boolean;
131 - function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
132 - function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
133 - function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
134 - function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
135 -
136 - /**
137 - * Measure the memory known to V8 and used by the current execution context or a specified context.
138 - *
139 - * The format of the object that the returned Promise may resolve with is
140 - * specific to the V8 engine and may change from one version of V8 to the next.
141 - *
142 - * The returned result is different from the statistics returned by
143 - * `v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measures
144 - * the memory reachable by V8 from a specific context, while
145 - * `v8.getHeapSpaceStatistics()` measures the memory used by an instance
146 - * of V8 engine, which can switch among multiple contexts that reference
147 - * objects in the heap of one engine.
148 - *
149 - * @experimental
150 - */
151 - function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
152 -}
1 -declare module 'wasi' {
2 - interface WASIOptions {
3 - /**
4 - * An array of strings that the WebAssembly application will
5 - * see as command line arguments. The first argument is the virtual path to the
6 - * WASI command itself.
7 - */
8 - args?: string[];
9 -
10 - /**
11 - * An object similar to `process.env` that the WebAssembly
12 - * application will see as its environment.
13 - */
14 - env?: object;
15 -
16 - /**
17 - * This object represents the WebAssembly application's
18 - * sandbox directory structure. The string keys of `preopens` are treated as
19 - * directories within the sandbox. The corresponding values in `preopens` are
20 - * the real paths to those directories on the host machine.
21 - */
22 - preopens?: NodeJS.Dict<string>;
23 -
24 - /**
25 - * By default, WASI applications terminate the Node.js
26 - * process via the `__wasi_proc_exit()` function. Setting this option to `true`
27 - * causes `wasi.start()` to return the exit code rather than terminate the
28 - * process.
29 - * @default false
30 - */
31 - returnOnExit?: boolean;
32 -
33 - /**
34 - * The file descriptor used as standard input in the WebAssembly application.
35 - * @default 0
36 - */
37 - stdin?: number;
38 -
39 - /**
40 - * The file descriptor used as standard output in the WebAssembly application.
41 - * @default 1
42 - */
43 - stdout?: number;
44 -
45 - /**
46 - * The file descriptor used as standard error in the WebAssembly application.
47 - * @default 2
48 - */
49 - stderr?: number;
50 - }
51 -
52 - class WASI {
53 - constructor(options?: WASIOptions);
54 - /**
55 - *
56 - * Attempt to begin execution of `instance` by invoking its `_start()` export.
57 - * If `instance` does not contain a `_start()` export, then `start()` attempts to
58 - * invoke the `__wasi_unstable_reactor_start()` export. If neither of those exports
59 - * is present on `instance`, then `start()` does nothing.
60 - *
61 - * `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
62 - * `memory`. If `instance` does not have a `memory` export an exception is thrown.
63 - *
64 - * If `start()` is called more than once, an exception is thrown.
65 - */
66 - start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
67 -
68 - /**
69 - * Attempt to initialize `instance` as a WASI reactor by invoking its `_initialize()` export, if it is present.
70 - * If `instance` contains a `_start()` export, then an exception is thrown.
71 - *
72 - * `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
73 - * `memory`. If `instance` does not have a `memory` export an exception is thrown.
74 - *
75 - * If `initialize()` is called more than once, an exception is thrown.
76 - */
77 - initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
78 -
79 - /**
80 - * Is an object that implements the WASI system call API. This object
81 - * should be passed as the `wasi_snapshot_preview1` import during the instantiation of a
82 - * [`WebAssembly.Instance`][].
83 - */
84 - readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
85 - }
86 -}
This diff is collapsed. Click to expand it.
1 -This software is dual-licensed under the ISC and MIT licenses.
2 -You may use this software under EITHER of the following licenses.
3 -
4 -----------
5 -
6 -The ISC License
7 -
8 -Copyright (c) Isaac Z. Schlueter and Contributors
9 -
10 -Permission to use, copy, modify, and/or distribute this software for any
11 -purpose with or without fee is hereby granted, provided that the above
12 -copyright notice and this permission notice appear in all copies.
13 -
14 -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15 -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
20 -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 -
22 -----------
23 -
24 -Copyright Isaac Z. Schlueter and Contributors
25 -All rights reserved.
26 -
27 -Permission is hereby granted, free of charge, to any person
28 -obtaining a copy of this software and associated documentation
29 -files (the "Software"), to deal in the Software without
30 -restriction, including without limitation the rights to use,
31 -copy, modify, merge, publish, distribute, sublicense, and/or sell
32 -copies of the Software, and to permit persons to whom the
33 -Software is furnished to do so, subject to the following
34 -conditions:
35 -
36 -The above copyright notice and this permission notice shall be
37 -included in all copies or substantial portions of the Software.
38 -
39 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
40 -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
41 -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
42 -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
43 -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
44 -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
45 -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
46 -OTHER DEALINGS IN THE SOFTWARE.
1 -# abbrev-js
2 -
3 -Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).
4 -
5 -Usage:
6 -
7 - var abbrev = require("abbrev");
8 - abbrev("foo", "fool", "folding", "flop");
9 -
10 - // returns:
11 - { fl: 'flop'
12 - , flo: 'flop'
13 - , flop: 'flop'
14 - , fol: 'folding'
15 - , fold: 'folding'
16 - , foldi: 'folding'
17 - , foldin: 'folding'
18 - , folding: 'folding'
19 - , foo: 'foo'
20 - , fool: 'fool'
21 - }
22 -
23 -This is handy for command-line scripts, or other cases where you want to be able to accept shorthands.
1 -module.exports = exports = abbrev.abbrev = abbrev
2 -
3 -abbrev.monkeyPatch = monkeyPatch
4 -
5 -function monkeyPatch () {
6 - Object.defineProperty(Array.prototype, 'abbrev', {
7 - value: function () { return abbrev(this) },
8 - enumerable: false, configurable: true, writable: true
9 - })
10 -
11 - Object.defineProperty(Object.prototype, 'abbrev', {
12 - value: function () { return abbrev(Object.keys(this)) },
13 - enumerable: false, configurable: true, writable: true
14 - })
15 -}
16 -
17 -function abbrev (list) {
18 - if (arguments.length !== 1 || !Array.isArray(list)) {
19 - list = Array.prototype.slice.call(arguments, 0)
20 - }
21 - for (var i = 0, l = list.length, args = [] ; i < l ; i ++) {
22 - args[i] = typeof list[i] === "string" ? list[i] : String(list[i])
23 - }
24 -
25 - // sort them lexicographically, so that they're next to their nearest kin
26 - args = args.sort(lexSort)
27 -
28 - // walk through each, seeing how much it has in common with the next and previous
29 - var abbrevs = {}
30 - , prev = ""
31 - for (var i = 0, l = args.length ; i < l ; i ++) {
32 - var current = args[i]
33 - , next = args[i + 1] || ""
34 - , nextMatches = true
35 - , prevMatches = true
36 - if (current === next) continue
37 - for (var j = 0, cl = current.length ; j < cl ; j ++) {
38 - var curChar = current.charAt(j)
39 - nextMatches = nextMatches && curChar === next.charAt(j)
40 - prevMatches = prevMatches && curChar === prev.charAt(j)
41 - if (!nextMatches && !prevMatches) {
42 - j ++
43 - break
44 - }
45 - }
46 - prev = current
47 - if (j === cl) {
48 - abbrevs[current] = current
49 - continue
50 - }
51 - for (var a = current.substr(0, j) ; j <= cl ; j ++) {
52 - abbrevs[a] = current
53 - a += current.charAt(j)
54 - }
55 - }
56 - return abbrevs
57 -}
58 -
59 -function lexSort (a, b) {
60 - return a === b ? 0 : a > b ? 1 : -1
61 -}
1 -{
2 - "_from": "abbrev@1",
3 - "_id": "abbrev@1.1.1",
4 - "_inBundle": false,
5 - "_integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
6 - "_location": "/abbrev",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "abbrev@1",
12 - "name": "abbrev",
13 - "escapedName": "abbrev",
14 - "rawSpec": "1",
15 - "saveSpec": null,
16 - "fetchSpec": "1"
17 - },
18 - "_requiredBy": [
19 - "/nopt"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
22 - "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8",
23 - "_spec": "abbrev@1",
24 - "_where": "/Users/mindyeoi/Desktop/oss/We-Shop/boiler-plate/node_modules/nopt",
25 - "author": {
26 - "name": "Isaac Z. Schlueter",
27 - "email": "i@izs.me"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/isaacs/abbrev-js/issues"
31 - },
32 - "bundleDependencies": false,
33 - "deprecated": false,
34 - "description": "Like ruby's abbrev module, but in js",
35 - "devDependencies": {
36 - "tap": "^10.1"
37 - },
38 - "files": [
39 - "abbrev.js"
40 - ],
41 - "homepage": "https://github.com/isaacs/abbrev-js#readme",
42 - "license": "ISC",
43 - "main": "abbrev.js",
44 - "name": "abbrev",
45 - "repository": {
46 - "type": "git",
47 - "url": "git+ssh://git@github.com/isaacs/abbrev-js.git"
48 - },
49 - "scripts": {
50 - "postpublish": "git push origin --all; git push origin --tags",
51 - "postversion": "npm publish",
52 - "preversion": "npm test",
53 - "test": "tap test.js --100"
54 - },
55 - "version": "1.1.1"
56 -}
1 -1.3.7 / 2019-04-29
2 -==================
3 -
4 - * deps: negotiator@0.6.2
5 - - Fix sorting charset, encoding, and language with extra parameters
6 -
7 -1.3.6 / 2019-04-28
8 -==================
9 -
10 - * deps: mime-types@~2.1.24
11 - - deps: mime-db@~1.40.0
12 -
13 -1.3.5 / 2018-02-28
14 -==================
15 -
16 - * deps: mime-types@~2.1.18
17 - - deps: mime-db@~1.33.0
18 -
19 -1.3.4 / 2017-08-22
20 -==================
21 -
22 - * deps: mime-types@~2.1.16
23 - - deps: mime-db@~1.29.0
24 -
25 -1.3.3 / 2016-05-02
26 -==================
27 -
28 - * deps: mime-types@~2.1.11
29 - - deps: mime-db@~1.23.0
30 - * deps: negotiator@0.6.1
31 - - perf: improve `Accept` parsing speed
32 - - perf: improve `Accept-Charset` parsing speed
33 - - perf: improve `Accept-Encoding` parsing speed
34 - - perf: improve `Accept-Language` parsing speed
35 -
36 -1.3.2 / 2016-03-08
37 -==================
38 -
39 - * deps: mime-types@~2.1.10
40 - - Fix extension of `application/dash+xml`
41 - - Update primary extension for `audio/mp4`
42 - - deps: mime-db@~1.22.0
43 -
44 -1.3.1 / 2016-01-19
45 -==================
46 -
47 - * deps: mime-types@~2.1.9
48 - - deps: mime-db@~1.21.0
49 -
50 -1.3.0 / 2015-09-29
51 -==================
52 -
53 - * deps: mime-types@~2.1.7
54 - - deps: mime-db@~1.19.0
55 - * deps: negotiator@0.6.0
56 - - Fix including type extensions in parameters in `Accept` parsing
57 - - Fix parsing `Accept` parameters with quoted equals
58 - - Fix parsing `Accept` parameters with quoted semicolons
59 - - Lazy-load modules from main entry point
60 - - perf: delay type concatenation until needed
61 - - perf: enable strict mode
62 - - perf: hoist regular expressions
63 - - perf: remove closures getting spec properties
64 - - perf: remove a closure from media type parsing
65 - - perf: remove property delete from media type parsing
66 -
67 -1.2.13 / 2015-09-06
68 -===================
69 -
70 - * deps: mime-types@~2.1.6
71 - - deps: mime-db@~1.18.0
72 -
73 -1.2.12 / 2015-07-30
74 -===================
75 -
76 - * deps: mime-types@~2.1.4
77 - - deps: mime-db@~1.16.0
78 -
79 -1.2.11 / 2015-07-16
80 -===================
81 -
82 - * deps: mime-types@~2.1.3
83 - - deps: mime-db@~1.15.0
84 -
85 -1.2.10 / 2015-07-01
86 -===================
87 -
88 - * deps: mime-types@~2.1.2
89 - - deps: mime-db@~1.14.0
90 -
91 -1.2.9 / 2015-06-08
92 -==================
93 -
94 - * deps: mime-types@~2.1.1
95 - - perf: fix deopt during mapping
96 -
97 -1.2.8 / 2015-06-07
98 -==================
99 -
100 - * deps: mime-types@~2.1.0
101 - - deps: mime-db@~1.13.0
102 - * perf: avoid argument reassignment & argument slice
103 - * perf: avoid negotiator recursive construction
104 - * perf: enable strict mode
105 - * perf: remove unnecessary bitwise operator
106 -
107 -1.2.7 / 2015-05-10
108 -==================
109 -
110 - * deps: negotiator@0.5.3
111 - - Fix media type parameter matching to be case-insensitive
112 -
113 -1.2.6 / 2015-05-07
114 -==================
115 -
116 - * deps: mime-types@~2.0.11
117 - - deps: mime-db@~1.9.1
118 - * deps: negotiator@0.5.2
119 - - Fix comparing media types with quoted values
120 - - Fix splitting media types with quoted commas
121 -
122 -1.2.5 / 2015-03-13
123 -==================
124 -
125 - * deps: mime-types@~2.0.10
126 - - deps: mime-db@~1.8.0
127 -
128 -1.2.4 / 2015-02-14
129 -==================
130 -
131 - * Support Node.js 0.6
132 - * deps: mime-types@~2.0.9
133 - - deps: mime-db@~1.7.0
134 - * deps: negotiator@0.5.1
135 - - Fix preference sorting to be stable for long acceptable lists
136 -
137 -1.2.3 / 2015-01-31
138 -==================
139 -
140 - * deps: mime-types@~2.0.8
141 - - deps: mime-db@~1.6.0
142 -
143 -1.2.2 / 2014-12-30
144 -==================
145 -
146 - * deps: mime-types@~2.0.7
147 - - deps: mime-db@~1.5.0
148 -
149 -1.2.1 / 2014-12-30
150 -==================
151 -
152 - * deps: mime-types@~2.0.5
153 - - deps: mime-db@~1.3.1
154 -
155 -1.2.0 / 2014-12-19
156 -==================
157 -
158 - * deps: negotiator@0.5.0
159 - - Fix list return order when large accepted list
160 - - Fix missing identity encoding when q=0 exists
161 - - Remove dynamic building of Negotiator class
162 -
163 -1.1.4 / 2014-12-10
164 -==================
165 -
166 - * deps: mime-types@~2.0.4
167 - - deps: mime-db@~1.3.0
168 -
169 -1.1.3 / 2014-11-09
170 -==================
171 -
172 - * deps: mime-types@~2.0.3
173 - - deps: mime-db@~1.2.0
174 -
175 -1.1.2 / 2014-10-14
176 -==================
177 -
178 - * deps: negotiator@0.4.9
179 - - Fix error when media type has invalid parameter
180 -
181 -1.1.1 / 2014-09-28
182 -==================
183 -
184 - * deps: mime-types@~2.0.2
185 - - deps: mime-db@~1.1.0
186 - * deps: negotiator@0.4.8
187 - - Fix all negotiations to be case-insensitive
188 - - Stable sort preferences of same quality according to client order
189 -
190 -1.1.0 / 2014-09-02
191 -==================
192 -
193 - * update `mime-types`
194 -
195 -1.0.7 / 2014-07-04
196 -==================
197 -
198 - * Fix wrong type returned from `type` when match after unknown extension
199 -
200 -1.0.6 / 2014-06-24
201 -==================
202 -
203 - * deps: negotiator@0.4.7
204 -
205 -1.0.5 / 2014-06-20
206 -==================
207 -
208 - * fix crash when unknown extension given
209 -
210 -1.0.4 / 2014-06-19
211 -==================
212 -
213 - * use `mime-types`
214 -
215 -1.0.3 / 2014-06-11
216 -==================
217 -
218 - * deps: negotiator@0.4.6
219 - - Order by specificity when quality is the same
220 -
221 -1.0.2 / 2014-05-29
222 -==================
223 -
224 - * Fix interpretation when header not in request
225 - * deps: pin negotiator@0.4.5
226 -
227 -1.0.1 / 2014-01-18
228 -==================
229 -
230 - * Identity encoding isn't always acceptable
231 - * deps: negotiator@~0.4.0
232 -
233 -1.0.0 / 2013-12-27
234 -==================
235 -
236 - * Genesis
1 -(The MIT License)
2 -
3 -Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
4 -Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
5 -
6 -Permission is hereby granted, free of charge, to any person obtaining
7 -a copy of this software and associated documentation files (the
8 -'Software'), to deal in the Software without restriction, including
9 -without limitation the rights to use, copy, modify, merge, publish,
10 -distribute, sublicense, and/or sell copies of the Software, and to
11 -permit persons to whom the Software is furnished to do so, subject to
12 -the following conditions:
13 -
14 -The above copyright notice and this permission notice shall be
15 -included in all copies or substantial portions of the Software.
16 -
17 -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
18 -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 -# accepts
2 -
3 -[![NPM Version][npm-version-image]][npm-url]
4 -[![NPM Downloads][npm-downloads-image]][npm-url]
5 -[![Node.js Version][node-version-image]][node-version-url]
6 -[![Build Status][travis-image]][travis-url]
7 -[![Test Coverage][coveralls-image]][coveralls-url]
8 -
9 -Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
10 -Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
11 -
12 -In addition to negotiator, it allows:
13 -
14 -- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
15 - as well as `('text/html', 'application/json')`.
16 -- Allows type shorthands such as `json`.
17 -- Returns `false` when no types match
18 -- Treats non-existent headers as `*`
19 -
20 -## Installation
21 -
22 -This is a [Node.js](https://nodejs.org/en/) module available through the
23 -[npm registry](https://www.npmjs.com/). Installation is done using the
24 -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
25 -
26 -```sh
27 -$ npm install accepts
28 -```
29 -
30 -## API
31 -
32 -<!-- eslint-disable no-unused-vars -->
33 -
34 -```js
35 -var accepts = require('accepts')
36 -```
37 -
38 -### accepts(req)
39 -
40 -Create a new `Accepts` object for the given `req`.
41 -
42 -#### .charset(charsets)
43 -
44 -Return the first accepted charset. If nothing in `charsets` is accepted,
45 -then `false` is returned.
46 -
47 -#### .charsets()
48 -
49 -Return the charsets that the request accepts, in the order of the client's
50 -preference (most preferred first).
51 -
52 -#### .encoding(encodings)
53 -
54 -Return the first accepted encoding. If nothing in `encodings` is accepted,
55 -then `false` is returned.
56 -
57 -#### .encodings()
58 -
59 -Return the encodings that the request accepts, in the order of the client's
60 -preference (most preferred first).
61 -
62 -#### .language(languages)
63 -
64 -Return the first accepted language. If nothing in `languages` is accepted,
65 -then `false` is returned.
66 -
67 -#### .languages()
68 -
69 -Return the languages that the request accepts, in the order of the client's
70 -preference (most preferred first).
71 -
72 -#### .type(types)
73 -
74 -Return the first accepted type (and it is returned as the same text as what
75 -appears in the `types` array). If nothing in `types` is accepted, then `false`
76 -is returned.
77 -
78 -The `types` array can contain full MIME types or file extensions. Any value
79 -that is not a full MIME types is passed to `require('mime-types').lookup`.
80 -
81 -#### .types()
82 -
83 -Return the types that the request accepts, in the order of the client's
84 -preference (most preferred first).
85 -
86 -## Examples
87 -
88 -### Simple type negotiation
89 -
90 -This simple example shows how to use `accepts` to return a different typed
91 -respond body based on what the client wants to accept. The server lists it's
92 -preferences in order and will get back the best match between the client and
93 -server.
94 -
95 -```js
96 -var accepts = require('accepts')
97 -var http = require('http')
98 -
99 -function app (req, res) {
100 - var accept = accepts(req)
101 -
102 - // the order of this list is significant; should be server preferred order
103 - switch (accept.type(['json', 'html'])) {
104 - case 'json':
105 - res.setHeader('Content-Type', 'application/json')
106 - res.write('{"hello":"world!"}')
107 - break
108 - case 'html':
109 - res.setHeader('Content-Type', 'text/html')
110 - res.write('<b>hello, world!</b>')
111 - break
112 - default:
113 - // the fallback is text/plain, so no need to specify it above
114 - res.setHeader('Content-Type', 'text/plain')
115 - res.write('hello, world!')
116 - break
117 - }
118 -
119 - res.end()
120 -}
121 -
122 -http.createServer(app).listen(3000)
123 -```
124 -
125 -You can test this out with the cURL program:
126 -```sh
127 -curl -I -H'Accept: text/html' http://localhost:3000/
128 -```
129 -
130 -## License
131 -
132 -[MIT](LICENSE)
133 -
134 -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
135 -[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
136 -[node-version-image]: https://badgen.net/npm/node/accepts
137 -[node-version-url]: https://nodejs.org/en/download
138 -[npm-downloads-image]: https://badgen.net/npm/dm/accepts
139 -[npm-url]: https://npmjs.org/package/accepts
140 -[npm-version-image]: https://badgen.net/npm/v/accepts
141 -[travis-image]: https://badgen.net/travis/jshttp/accepts/master
142 -[travis-url]: https://travis-ci.org/jshttp/accepts
1 -/*!
2 - * accepts
3 - * Copyright(c) 2014 Jonathan Ong
4 - * Copyright(c) 2015 Douglas Christopher Wilson
5 - * MIT Licensed
6 - */
7 -
8 -'use strict'
9 -
10 -/**
11 - * Module dependencies.
12 - * @private
13 - */
14 -
15 -var Negotiator = require('negotiator')
16 -var mime = require('mime-types')
17 -
18 -/**
19 - * Module exports.
20 - * @public
21 - */
22 -
23 -module.exports = Accepts
24 -
25 -/**
26 - * Create a new Accepts object for the given req.
27 - *
28 - * @param {object} req
29 - * @public
30 - */
31 -
32 -function Accepts (req) {
33 - if (!(this instanceof Accepts)) {
34 - return new Accepts(req)
35 - }
36 -
37 - this.headers = req.headers
38 - this.negotiator = new Negotiator(req)
39 -}
40 -
41 -/**
42 - * Check if the given `type(s)` is acceptable, returning
43 - * the best match when true, otherwise `undefined`, in which
44 - * case you should respond with 406 "Not Acceptable".
45 - *
46 - * The `type` value may be a single mime type string
47 - * such as "application/json", the extension name
48 - * such as "json" or an array `["json", "html", "text/plain"]`. When a list
49 - * or array is given the _best_ match, if any is returned.
50 - *
51 - * Examples:
52 - *
53 - * // Accept: text/html
54 - * this.types('html');
55 - * // => "html"
56 - *
57 - * // Accept: text/*, application/json
58 - * this.types('html');
59 - * // => "html"
60 - * this.types('text/html');
61 - * // => "text/html"
62 - * this.types('json', 'text');
63 - * // => "json"
64 - * this.types('application/json');
65 - * // => "application/json"
66 - *
67 - * // Accept: text/*, application/json
68 - * this.types('image/png');
69 - * this.types('png');
70 - * // => undefined
71 - *
72 - * // Accept: text/*;q=.5, application/json
73 - * this.types(['html', 'json']);
74 - * this.types('html', 'json');
75 - * // => "json"
76 - *
77 - * @param {String|Array} types...
78 - * @return {String|Array|Boolean}
79 - * @public
80 - */
81 -
82 -Accepts.prototype.type =
83 -Accepts.prototype.types = function (types_) {
84 - var types = types_
85 -
86 - // support flattened arguments
87 - if (types && !Array.isArray(types)) {
88 - types = new Array(arguments.length)
89 - for (var i = 0; i < types.length; i++) {
90 - types[i] = arguments[i]
91 - }
92 - }
93 -
94 - // no types, return all requested types
95 - if (!types || types.length === 0) {
96 - return this.negotiator.mediaTypes()
97 - }
98 -
99 - // no accept header, return first given type
100 - if (!this.headers.accept) {
101 - return types[0]
102 - }
103 -
104 - var mimes = types.map(extToMime)
105 - var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
106 - var first = accepts[0]
107 -
108 - return first
109 - ? types[mimes.indexOf(first)]
110 - : false
111 -}
112 -
113 -/**
114 - * Return accepted encodings or best fit based on `encodings`.
115 - *
116 - * Given `Accept-Encoding: gzip, deflate`
117 - * an array sorted by quality is returned:
118 - *
119 - * ['gzip', 'deflate']
120 - *
121 - * @param {String|Array} encodings...
122 - * @return {String|Array}
123 - * @public
124 - */
125 -
126 -Accepts.prototype.encoding =
127 -Accepts.prototype.encodings = function (encodings_) {
128 - var encodings = encodings_
129 -
130 - // support flattened arguments
131 - if (encodings && !Array.isArray(encodings)) {
132 - encodings = new Array(arguments.length)
133 - for (var i = 0; i < encodings.length; i++) {
134 - encodings[i] = arguments[i]
135 - }
136 - }
137 -
138 - // no encodings, return all requested encodings
139 - if (!encodings || encodings.length === 0) {
140 - return this.negotiator.encodings()
141 - }
142 -
143 - return this.negotiator.encodings(encodings)[0] || false
144 -}
145 -
146 -/**
147 - * Return accepted charsets or best fit based on `charsets`.
148 - *
149 - * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
150 - * an array sorted by quality is returned:
151 - *
152 - * ['utf-8', 'utf-7', 'iso-8859-1']
153 - *
154 - * @param {String|Array} charsets...
155 - * @return {String|Array}
156 - * @public
157 - */
158 -
159 -Accepts.prototype.charset =
160 -Accepts.prototype.charsets = function (charsets_) {
161 - var charsets = charsets_
162 -
163 - // support flattened arguments
164 - if (charsets && !Array.isArray(charsets)) {
165 - charsets = new Array(arguments.length)
166 - for (var i = 0; i < charsets.length; i++) {
167 - charsets[i] = arguments[i]
168 - }
169 - }
170 -
171 - // no charsets, return all requested charsets
172 - if (!charsets || charsets.length === 0) {
173 - return this.negotiator.charsets()
174 - }
175 -
176 - return this.negotiator.charsets(charsets)[0] || false
177 -}
178 -
179 -/**
180 - * Return accepted languages or best fit based on `langs`.
181 - *
182 - * Given `Accept-Language: en;q=0.8, es, pt`
183 - * an array sorted by quality is returned:
184 - *
185 - * ['es', 'pt', 'en']
186 - *
187 - * @param {String|Array} langs...
188 - * @return {Array|String}
189 - * @public
190 - */
191 -
192 -Accepts.prototype.lang =
193 -Accepts.prototype.langs =
194 -Accepts.prototype.language =
195 -Accepts.prototype.languages = function (languages_) {
196 - var languages = languages_
197 -
198 - // support flattened arguments
199 - if (languages && !Array.isArray(languages)) {
200 - languages = new Array(arguments.length)
201 - for (var i = 0; i < languages.length; i++) {
202 - languages[i] = arguments[i]
203 - }
204 - }
205 -
206 - // no languages, return all requested languages
207 - if (!languages || languages.length === 0) {
208 - return this.negotiator.languages()
209 - }
210 -
211 - return this.negotiator.languages(languages)[0] || false
212 -}
213 -
214 -/**
215 - * Convert extnames to mime.
216 - *
217 - * @param {String} type
218 - * @return {String}
219 - * @private
220 - */
221 -
222 -function extToMime (type) {
223 - return type.indexOf('/') === -1
224 - ? mime.lookup(type)
225 - : type
226 -}
227 -
228 -/**
229 - * Check if mime is valid.
230 - *
231 - * @param {String} type
232 - * @return {String}
233 - * @private
234 - */
235 -
236 -function validMime (type) {
237 - return typeof type === 'string'
238 -}
1 -{
2 - "_from": "accepts@~1.3.7",
3 - "_id": "accepts@1.3.7",
4 - "_inBundle": false,
5 - "_integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
6 - "_location": "/accepts",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "accepts@~1.3.7",
12 - "name": "accepts",
13 - "escapedName": "accepts",
14 - "rawSpec": "~1.3.7",
15 - "saveSpec": null,
16 - "fetchSpec": "~1.3.7"
17 - },
18 - "_requiredBy": [
19 - "/express"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
22 - "_shasum": "531bc726517a3b2b41f850021c6cc15eaab507cd",
23 - "_spec": "accepts@~1.3.7",
24 - "_where": "/Users/mindyeoi/Desktop/oss/We-Shop/boiler-plate/node_modules/express",
25 - "bugs": {
26 - "url": "https://github.com/jshttp/accepts/issues"
27 - },
28 - "bundleDependencies": false,
29 - "contributors": [
30 - {
31 - "name": "Douglas Christopher Wilson",
32 - "email": "doug@somethingdoug.com"
33 - },
34 - {
35 - "name": "Jonathan Ong",
36 - "email": "me@jongleberry.com",
37 - "url": "http://jongleberry.com"
38 - }
39 - ],
40 - "dependencies": {
41 - "mime-types": "~2.1.24",
42 - "negotiator": "0.6.2"
43 - },
44 - "deprecated": false,
45 - "description": "Higher-level content negotiation",
46 - "devDependencies": {
47 - "deep-equal": "1.0.1",
48 - "eslint": "5.16.0",
49 - "eslint-config-standard": "12.0.0",
50 - "eslint-plugin-import": "2.17.2",
51 - "eslint-plugin-markdown": "1.0.0",
52 - "eslint-plugin-node": "8.0.1",
53 - "eslint-plugin-promise": "4.1.1",
54 - "eslint-plugin-standard": "4.0.0",
55 - "mocha": "6.1.4",
56 - "nyc": "14.0.0"
57 - },
58 - "engines": {
59 - "node": ">= 0.6"
60 - },
61 - "files": [
62 - "LICENSE",
63 - "HISTORY.md",
64 - "index.js"
65 - ],
66 - "homepage": "https://github.com/jshttp/accepts#readme",
67 - "keywords": [
68 - "content",
69 - "negotiation",
70 - "accept",
71 - "accepts"
72 - ],
73 - "license": "MIT",
74 - "name": "accepts",
75 - "repository": {
76 - "type": "git",
77 - "url": "git+https://github.com/jshttp/accepts.git"
78 - },
79 - "scripts": {
80 - "lint": "eslint --plugin markdown --ext js,md .",
81 - "test": "mocha --reporter spec --check-leaks --bail test/",
82 - "test-cov": "nyc --reporter=html --reporter=text npm test",
83 - "test-travis": "nyc --reporter=text npm test"
84 - },
85 - "version": "1.3.7"
86 -}
1 -# Change Log
2 -
3 -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4 -
5 -<a name="3.0.0"></a>
6 -# [3.0.0](https://github.com/nexdrew/ansi-align/compare/v2.0.0...v3.0.0) (2018-12-17)
7 -
8 -
9 -### Bug Fixes
10 -
11 -* **package:** update string-width to version 3.0.0 ([#50](https://github.com/nexdrew/ansi-align/issues/50)) ([67f0d8f](https://github.com/nexdrew/ansi-align/commit/67f0d8f))
12 -
13 -
14 -### BREAKING CHANGES
15 -
16 -* **package:** Node 4 no longer supported, please update to Node 6+ or use ansi-align@2.0.0
17 -
18 -
19 -
20 -<a name="2.0.0"></a>
21 -# [2.0.0](https://github.com/nexdrew/ansi-align/compare/v1.1.0...v2.0.0) (2017-05-01)
22 -
23 -
24 -### Features
25 -
26 -* ES2015ify, dropping support for Node <4 ([#30](https://github.com/nexdrew/ansi-align/issues/30)) ([7b43f48](https://github.com/nexdrew/ansi-align/commit/7b43f48))
27 -
28 -
29 -### BREAKING CHANGES
30 -
31 -* Node 0.10 or 0.12 no longer supported, please update to Node 4+ or use ansi-align@1.1.0
32 -
33 -
34 -
35 -<a name="1.1.0"></a>
36 -# [1.1.0](https://github.com/nexdrew/ansi-align/compare/v1.0.0...v1.1.0) (2016-06-06)
37 -
38 -
39 -### Features
40 -
41 -* support left-alignment as no-op ([#3](https://github.com/nexdrew/ansi-align/issues/3)) ([e581db6](https://github.com/nexdrew/ansi-align/commit/e581db6))
42 -
43 -
44 -
45 -<a name="1.0.0"></a>
46 -# 1.0.0 (2016-04-30)
47 -
48 -
49 -### Features
50 -
51 -* initial commit ([1914d90](https://github.com/nexdrew/ansi-align/commit/1914d90))
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.