diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index dd8d1e9ad..cb5a402d4 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -538,11 +538,13 @@ "license": "MIT" }, "node_modules/@types/jszip": { - "version": "3.1.6", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.4.1.tgz", + "integrity": "sha512-TezXjmf3lj+zQ651r6hPqvSScqBLvyPI9FxdXBqpEwBijNGQ2NXpaFW/7joGzveYkKQUil7iiDHLo6LV71Pc0A==", + "deprecated": "This is a stub types definition. jszip provides its own type definitions, so you do not need this installed.", "dev": true, - "license": "MIT", "dependencies": { - "@types/node": "*" + "jszip": "*" } }, "node_modules/@types/long": { @@ -565,9 +567,9 @@ } }, "node_modules/@types/node": { - "version": "16.4.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.3.tgz", - "integrity": "sha512-GKM4FLMkWDc0sfx7tXqPWkM6NBow1kge0fgQh0bOnlqo4iT1kvTvMEKE0c1RtUGnbLlGRXiAA8SumE//90uKAg==" + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.5.tgz", + "integrity": "sha512-+0GPv/hIFNoy8r5MFf7vRpBjnqNYNrlHdetoy23E7TYc7JB2ctwyi3GMKpviozaHQ/Sy2kBNUTvG9ywN66zV1g==" }, "node_modules/@types/normalize-package-data": { "version": "2.4.0", @@ -1615,6 +1617,12 @@ "node": ">= 4" } }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, "node_modules/crypt": { "version": "0.0.2", "license": "BSD-3-Clause", @@ -3070,6 +3078,12 @@ "dev": true, "license": "ISC" }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", + "dev": true + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -3534,6 +3548,18 @@ "node": "*" } }, + "node_modules/jszip": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.7.0.tgz", + "integrity": "sha512-Y2OlFIzrDOPWUnpU0LORIcDn2xN7rC9yKffFM/7pGhQuhO+SUhfm2trkJ/S5amjFvem0Y+1EALz/MEPkvHXVNw==", + "dev": true, + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" + } + }, "node_modules/just-extend": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", @@ -3575,6 +3601,15 @@ "node": ">= 0.8.0" } }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, + "dependencies": { + "immediate": "~3.0.5" + } + }, "node_modules/lines-and-columns": { "version": "1.1.6", "dev": true, @@ -4189,6 +4224,12 @@ "semver": "bin/semver.js" } }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4490,6 +4531,12 @@ "node": ">= 0.6.0" } }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, "node_modules/progress": { "version": "2.0.3", "dev": true, @@ -4732,6 +4779,27 @@ "node": ">=8" } }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, "node_modules/readdirp": { "version": "3.4.0", "dev": true, @@ -4948,6 +5016,15 @@ "dev": true, "license": "ISC" }, + "node_modules/set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/signal-exit": { "version": "3.0.2", "dev": true, @@ -5107,6 +5184,15 @@ "node": ">=4" } }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, "node_modules/string-width": { "version": "4.2.0", "dev": true, @@ -5683,6 +5769,12 @@ "inherits": "2.0.3" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, "node_modules/uuid": { "version": "8.3.0", "license": "MIT", diff --git a/node_modules/@types/jszip/LICENSE b/node_modules/@types/jszip/LICENSE index 4b1ad51b2..9e841e7a2 100644 --- a/node_modules/@types/jszip/LICENSE +++ b/node_modules/@types/jszip/LICENSE @@ -1,21 +1,21 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/jszip/README.md b/node_modules/@types/jszip/README.md index 6418c8930..3a2a112d4 100644 --- a/node_modules/@types/jszip/README.md +++ b/node_modules/@types/jszip/README.md @@ -1,16 +1,3 @@ -# Installation -> `npm install --save @types/jszip` - -# Summary -This package contains type definitions for JSZip ( http://stuk.github.com/jszip/ ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jszip - -Additional Details - * Last updated: Mon, 20 May 2019 21:14:34 GMT - * Dependencies: @types/node - * Global values: none - -# Credits -These definitions were written by mzeiher , forabi . +This is a stub types definition for jszip (https://github.com/Stuk/jszip). + +jszip provides its own type definitions, so you don't need @types/jszip installed! \ No newline at end of file diff --git a/node_modules/@types/jszip/package.json b/node_modules/@types/jszip/package.json index 5712e3e9d..d09b9a368 100644 --- a/node_modules/@types/jszip/package.json +++ b/node_modules/@types/jszip/package.json @@ -1,31 +1,14 @@ { "name": "@types/jszip", - "version": "3.1.6", - "description": "TypeScript definitions for JSZip", - "license": "MIT", - "contributors": [ - { - "name": "mzeiher", - "url": "https://github.com/mzeiher", - "githubUsername": "mzeiher" - }, - { - "name": "forabi", - "url": "https://github.com/forabi", - "githubUsername": "forabi" - } - ], + "version": "3.4.1", + "typings": null, + "description": "Stub TypeScript definitions entry for jszip, which provides its own types definitions", "main": "", - "types": "index", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/jszip" - }, "scripts": {}, + "author": "", + "repository": "https://github.com/Stuk/jszip", + "license": "MIT", "dependencies": { - "@types/node": "*" - }, - "typesPublisherContentHash": "b39880f7d79a626d32182cc6886711e3db5e4728ace6005cbfd57457fee69d85", - "typeScriptVersion": "2.3" + "jszip": "*" + } } \ No newline at end of file diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md index 08883fd87..a04feedfa 100755 --- a/node_modules/@types/node/README.md +++ b/node_modules/@types/node/README.md @@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://nodejs.org/). Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. ### Additional Details - * Last updated: Mon, 26 Jul 2021 00:01:15 GMT + * Last updated: Wed, 28 Jul 2021 07:31:16 GMT * Dependencies: none * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require` diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts index ba9f6197c..e3c4141ea 100755 --- a/node_modules/@types/node/async_hooks.d.ts +++ b/node_modules/@types/node/async_hooks.d.ts @@ -197,7 +197,7 @@ declare module 'async_hooks' { * @param callbacks The `Hook Callbacks` to register * @return Instance used for disabling and enabling hooks */ - function createHook(options: HookCallbacks): AsyncHook; + function createHook(callbacks: HookCallbacks): AsyncHook; interface AsyncResourceOptions { /** * The ID of the execution context that created this async event. @@ -298,7 +298,7 @@ declare module 'async_hooks' { * @since v9.6.0 * @param fn The function to call in the execution context of this async resource. * @param thisArg The receiver to be used for the function call. - * @param ...args Optional arguments to pass to the function. + * @param args Optional arguments to pass to the function. */ runInAsyncScope(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result; /** diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts index d077e46d0..318b39fd3 100755 --- a/node_modules/@types/node/buffer.d.ts +++ b/node_modules/@types/node/buffer.d.ts @@ -471,7 +471,7 @@ declare module 'buffer' { * @param sourceStart The offset within `buf` at which to begin comparison. * @param sourceEnd The offset within `buf` at which to end comparison (not inclusive). */ - compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; /** * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. * @@ -521,7 +521,7 @@ declare module 'buffer' { * @param sourceEnd The offset within `buf` at which to stop copying (not inclusive). * @return The number of bytes copied. */ - copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; /** * Returns a new `Buffer` that references the same memory as the original, but * offset and cropped by the `start` and `end` indices. @@ -546,7 +546,7 @@ declare module 'buffer' { * @param start Where the new `Buffer` will start. * @param end Where the new `Buffer` will end (not inclusive). */ - slice(begin?: number, end?: number): Buffer; + slice(start?: number, end?: number): Buffer; /** * Returns a new `Buffer` that references the same memory as the original, but * offset and cropped by the `start` and `end` indices. @@ -602,7 +602,7 @@ declare module 'buffer' { * @param start Where the new `Buffer` will start. * @param end Where the new `Buffer` will end (not inclusive). */ - subarray(begin?: number, end?: number): Buffer; + subarray(start?: number, end?: number): Buffer; /** * Writes `value` to `buf` at the specified `offset` as big-endian. * @@ -1761,7 +1761,7 @@ declare module 'buffer' { * @deprecated Use `Buffer.from(data, 'base64')` instead. * @param data The Base64-encoded input string. */ - function atob(input: string): string; + function atob(data: string): string; /** * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes * into a string using Base64. @@ -1777,7 +1777,7 @@ declare module 'buffer' { * @deprecated Use `buf.toString('base64')` instead. * @param data An ASCII (Latin1) string. */ - function btoa(input: string): string; + function btoa(data: string): string; } } declare module 'node:buffer' { diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts index fa1f5c52c..03ce5bb13 100755 --- a/node_modules/@types/node/child_process.d.ts +++ b/node_modules/@types/node/child_process.d.ts @@ -1342,13 +1342,13 @@ declare module 'child_process' { * @param args List of string arguments. * @return The stdout from the command. */ - function execFileSync(command: string): Buffer; - function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; - function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; - function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithStringEncoding): string; - function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): Buffer; + function execFileSync(file: string): Buffer; + function execFileSync(file: string, options?: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(file: string, options?: ExecFileSyncOptions): Buffer; + function execFileSync(file: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(file: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): Buffer; } declare module 'node:child_process' { export * from 'child_process'; diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts index 144c1c839..666fa5b56 100755 --- a/node_modules/@types/node/cluster.d.ts +++ b/node_modules/@types/node/cluster.d.ts @@ -116,7 +116,9 @@ declare module 'cluster' { * @since v0.7.0 * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: */ - send(message: child.Serializable, sendHandle?: child.SendHandle, callback?: (error: Error | null) => void): boolean; + send(message: child.Serializable, callback?: (error: Error | null) => void): boolean; + send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean; + send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean; /** * This function will kill the worker. In the primary, it does this * by disconnecting the `worker.process`, and once disconnected, killing diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts index e004ca979..7f3bbc2fe 100755 --- a/node_modules/@types/node/console.d.ts +++ b/node_modules/@types/node/console.d.ts @@ -83,7 +83,7 @@ declare module 'node:console' { * ``` * @since v0.1.101 * @param value The value tested for being truthy. - * @param ...message All arguments besides `value` are used as error message. + * @param message All arguments besides `value` are used as error message. */ assert(value: any, message?: string, ...optionalParams: any[]): void; /** diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts index 5cafb8d99..6b2edeabd 100755 --- a/node_modules/@types/node/crypto.d.ts +++ b/node_modules/@types/node/crypto.d.ts @@ -491,7 +491,7 @@ declare module 'crypto' { * @since v13.1.0 * @param options `stream.transform` options */ - copy(): Hash; + copy(options?: stream.TransformOptions): Hash; /** * Updates the hash content with the given `data`, the encoding of which * is given in `inputEncoding`. @@ -503,7 +503,7 @@ declare module 'crypto' { * @param inputEncoding The `encoding` of the `data` string. */ update(data: BinaryLike): Hash; - update(data: string, input_encoding: Encoding): Hash; + update(data: string, inputEncoding: Encoding): Hash; /** * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). * If `encoding` is provided a string will be returned; otherwise @@ -648,7 +648,7 @@ declare module 'crypto' { * @param inputEncoding The `encoding` of the `data` string. */ update(data: BinaryLike): Hmac; - update(data: string, input_encoding: Encoding): Hmac; + update(data: string, inputEncoding: Encoding): Hmac; /** * Calculates the HMAC digest of all of the data passed using `hmac.update()`. * If `encoding` is @@ -1114,9 +1114,9 @@ declare module 'crypto' { * @param outputEncoding The `encoding` of the return value. */ update(data: BinaryLike): Buffer; - update(data: string, input_encoding: Encoding): Buffer; - update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string; - update(data: string, input_encoding: Encoding | undefined, output_encoding: Encoding): string; + update(data: string, inputEncoding: Encoding): Buffer; + update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; + update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; /** * Once the `cipher.final()` method has been called, the `Cipher` object can no * longer be used to encrypt data. Attempts to call `cipher.final()` more than @@ -1126,7 +1126,7 @@ declare module 'crypto' { * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. */ final(): Buffer; - final(output_encoding: BufferEncoding): string; + final(outputEncoding: BufferEncoding): string; /** * When using block encryption algorithms, the `Cipher` class will automatically * add padding to the input data to the appropriate block size. To disable the @@ -1141,7 +1141,7 @@ declare module 'crypto' { * @since v0.7.1 * @return for method chaining. */ - setAutoPadding(auto_padding?: boolean): this; + setAutoPadding(autoPadding?: boolean): this; } interface CipherCCM extends Cipher { setAAD( @@ -1427,9 +1427,9 @@ declare module 'crypto' { * @param outputEncoding The `encoding` of the return value. */ update(data: NodeJS.ArrayBufferView): Buffer; - update(data: string, input_encoding: Encoding): Buffer; - update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string; - update(data: string, input_encoding: Encoding | undefined, output_encoding: Encoding): string; + update(data: string, inputEncoding: Encoding): Buffer; + update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; + update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; /** * Once the `decipher.final()` method has been called, the `Decipher` object can * no longer be used to decrypt data. Attempts to call `decipher.final()` more @@ -1439,7 +1439,7 @@ declare module 'crypto' { * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. */ final(): Buffer; - final(output_encoding: BufferEncoding): string; + final(outputEncoding: BufferEncoding): string; /** * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and * removing padding. @@ -1551,6 +1551,7 @@ declare module 'crypto' { * @param encoding The string encoding when `key` is a string. */ function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject; + function createSecretKey(key: string, encoding: BufferEncoding): KeyObject; /** * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. * Optional `options` argument controls the `stream.Writable` behavior. @@ -1706,7 +1707,7 @@ declare module 'crypto' { * @param inputEncoding The `encoding` of the `data` string. */ update(data: BinaryLike): this; - update(data: string, input_encoding: Encoding): this; + update(data: string, inputEncoding: Encoding): this; /** * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. * @@ -1719,8 +1720,8 @@ declare module 'crypto' { * called. Multiple calls to `sign.sign()` will result in an error being thrown. * @since v0.1.92 */ - sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer; - sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, output_format: BinaryToTextEncoding): string; + sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer; + sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string; } /** * Creates and returns a `Verify` object that uses the given algorithm. @@ -1765,7 +1766,7 @@ declare module 'crypto' { * @param inputEncoding The `encoding` of the `data` string. */ update(data: BinaryLike): Verify; - update(data: string, input_encoding: Encoding): Verify; + update(data: string, inputEncoding: Encoding): Verify; /** * Verifies the provided data using the given `object` and `signature`. * @@ -1803,11 +1804,11 @@ declare module 'crypto' { * @param primeEncoding The `encoding` of the `prime` string. * @param generatorEncoding The `encoding` of the `generator` string. */ - function createDiffieHellman(prime_length: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(primeLength: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman; function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman; - function createDiffieHellman(prime: string, prime_encoding: BinaryToTextEncoding): DiffieHellman; - function createDiffieHellman(prime: string, prime_encoding: BinaryToTextEncoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman; - function createDiffieHellman(prime: string, prime_encoding: BinaryToTextEncoding, generator: string, generator_encoding: BinaryToTextEncoding): DiffieHellman; + function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding): DiffieHellman; + function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman; + function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman; /** * The `DiffieHellman` class is a utility for creating Diffie-Hellman key * exchanges. @@ -1886,10 +1887,10 @@ declare module 'crypto' { * @param inputEncoding The `encoding` of an `otherPublicKey` string. * @param outputEncoding The `encoding` of the return value. */ - computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer; - computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer; - computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string; - computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding, output_encoding: BinaryToTextEncoding): string; + computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer; + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string; /** * Returns the Diffie-Hellman prime in the specified `encoding`. * If `encoding` is provided a string is @@ -1933,8 +1934,8 @@ declare module 'crypto' { * @since v0.5.0 * @param encoding The `encoding` of the `publicKey` string. */ - setPublicKey(public_key: NodeJS.ArrayBufferView): void; - setPublicKey(public_key: string, encoding: BufferEncoding): void; + setPublicKey(publicKey: NodeJS.ArrayBufferView): void; + setPublicKey(publicKey: string, encoding: BufferEncoding): void; /** * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected * to be a string. If no `encoding` is provided, `privateKey` is expected @@ -1942,8 +1943,8 @@ declare module 'crypto' { * @since v0.5.0 * @param encoding The `encoding` of the `privateKey` string. */ - setPrivateKey(private_key: NodeJS.ArrayBufferView): void; - setPrivateKey(private_key: string, encoding: BufferEncoding): void; + setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; + setPrivateKey(privateKey: string, encoding: BufferEncoding): void; /** * A bit field containing any warnings and/or errors resulting from a check * performed during initialization of the `DiffieHellman` object. @@ -2006,7 +2007,7 @@ declare module 'crypto' { * ``` * @since v0.7.5 */ - function getDiffieHellman(group_name: string): DiffieHellman; + function getDiffieHellman(groupName: string): DiffieHellman; /** * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) * implementation. A selected HMAC digest algorithm specified by `digest` is @@ -2652,7 +2653,7 @@ declare module 'crypto' { * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`. * @since v0.11.14 */ - function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; /** * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using * the corresponding public key, for example using {@link publicDecrypt}. @@ -2661,7 +2662,7 @@ declare module 'crypto' { * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`. * @since v1.1.0 */ - function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; /** * ```js * const { @@ -2881,10 +2882,10 @@ declare module 'crypto' { * @param inputEncoding The `encoding` of the `otherPublicKey` string. * @param outputEncoding The `encoding` of the return value. */ - computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer; - computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer; - computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string; - computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding, output_encoding: BinaryToTextEncoding): string; + computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer; + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string; /** * If `encoding` is specified, a string is returned; otherwise a `Buffer` is * returned. @@ -2916,8 +2917,8 @@ declare module 'crypto' { * @since v0.11.14 * @param encoding The `encoding` of the `privateKey` string. */ - setPrivateKey(private_key: NodeJS.ArrayBufferView): void; - setPrivateKey(private_key: string, encoding: BinaryToTextEncoding): void; + setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; + setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void; } /** * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a @@ -2926,7 +2927,7 @@ declare module 'crypto' { * and description of each available elliptic curve. * @since v0.11.14 */ - function createECDH(curve_name: string): ECDH; + function createECDH(curveName: string): ECDH; /** * This function is based on a constant-time algorithm. * Returns true if `a` is equal to `b`, without leaking timing information that @@ -3960,7 +3961,7 @@ declare module 'crypto' { * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. */ - function checkPrimeSync(value: LargeNumberLike, options?: CheckPrimeOptions): boolean; + function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; namespace webcrypto { class CryptoKey {} // placeholder } diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts index 68d07282a..79bc9caec 100755 --- a/node_modules/@types/node/diagnostics_channel.d.ts +++ b/node_modules/@types/node/diagnostics_channel.d.ts @@ -84,7 +84,7 @@ declare module 'diagnostics_channel' { * ``` * @param onMessage The handler to receive channel messages */ - subscribe(listener: ChannelListener): void; + subscribe(onMessage: ChannelListener): void; /** * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. * @@ -103,7 +103,7 @@ declare module 'diagnostics_channel' { * ``` * @param onMessage The previous subscribed handler to remove */ - unsubscribe(listener: ChannelListener): void; + unsubscribe(onMessage: ChannelListener): void; } } declare module 'node:diagnostics_channel' { diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts index 70d7fce39..ae8d0db8b 100755 --- a/node_modules/@types/node/domain.d.ts +++ b/node_modules/@types/node/domain.d.ts @@ -127,7 +127,7 @@ declare module 'domain' { * @param callback The callback function * @return The bound function */ - bind(cb: T): T; + bind(callback: T): T; /** * This method is almost identical to {@link bind}. However, in * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. @@ -160,7 +160,7 @@ declare module 'domain' { * @param callback The callback function * @return The intercepted function */ - intercept(cb: T): T; + intercept(callback: T): T; } function create(): Domain; } diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts index f33a26477..e29429b04 100755 --- a/node_modules/@types/node/events.d.ts +++ b/node_modules/@types/node/events.d.ts @@ -42,11 +42,11 @@ declare module 'events' { captureRejections?: boolean | undefined; } interface NodeEventTarget { - once(event: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; } interface DOMEventTarget { addEventListener( - event: string, + eventName: string, listener: (...args: any[]) => void, opts?: { once: boolean; @@ -72,11 +72,11 @@ declare module 'events' { */ class EventEmitter { constructor(options?: EventEmitterOptions); - static once(emitter: NodeEventTarget, event: string | symbol, options?: StaticEventEmitterOptions): Promise; - static once(emitter: DOMEventTarget, event: string, options?: StaticEventEmitterOptions): Promise; - static on(emitter: NodeJS.EventEmitter, event: string, options?: StaticEventEmitterOptions): AsyncIterableIterator; + static once(emitter: NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise; + static once(emitter: DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise; + static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator; /** @deprecated since v4.0.0 */ - static listenerCount(emitter: NodeJS.EventEmitter, event: string | symbol): number; + static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number; /** * Returns a list listener for a specific emitter event name. */ @@ -117,7 +117,7 @@ declare module 'events' { * Alias for `emitter.on(eventName, listener)`. * @since v0.1.26 */ - addListener(event: string | symbol, listener: (...args: any[]) => void): this; + addListener(eventName: string | symbol, listener: (...args: any[]) => void): this; /** * Adds the `listener` function to the end of the listeners array for the * event named `eventName`. No checks are made to see if the `listener` has @@ -148,7 +148,7 @@ declare module 'events' { * @param eventName The name of the event. * @param listener The callback function */ - on(event: string | symbol, listener: (...args: any[]) => void): this; + on(eventName: string | symbol, listener: (...args: any[]) => void): this; /** * Adds a **one-time**`listener` function for the event named `eventName`. The * next time `eventName` is triggered, this listener is removed and then invoked. @@ -177,7 +177,7 @@ declare module 'events' { * @param eventName The name of the event. * @param listener The callback function */ - once(event: string | symbol, listener: (...args: any[]) => void): this; + once(eventName: string | symbol, listener: (...args: any[]) => void): this; /** * Removes the specified `listener` from the listener array for the event named`eventName`. * @@ -257,12 +257,12 @@ declare module 'events' { * Returns a reference to the `EventEmitter`, so that calls can be chained. * @since v0.1.26 */ - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this; /** * Alias for `emitter.removeListener()`. * @since v10.0.0 */ - off(event: string | symbol, listener: (...args: any[]) => void): this; + off(eventName: string | symbol, listener: (...args: any[]) => void): this; /** * Removes all listeners, or those of the specified `eventName`. * @@ -302,7 +302,7 @@ declare module 'events' { * ``` * @since v0.1.26 */ - listeners(event: string | symbol): Function[]; + listeners(eventName: string | symbol): Function[]; /** * Returns a copy of the array of listeners for the event named `eventName`, * including any wrappers (such as those created by `.once()`). @@ -332,7 +332,7 @@ declare module 'events' { * ``` * @since v9.4.0 */ - rawListeners(event: string | symbol): Function[]; + rawListeners(eventName: string | symbol): Function[]; /** * Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments * to each. @@ -373,13 +373,13 @@ declare module 'events' { * ``` * @since v0.1.26 */ - emit(event: string | symbol, ...args: any[]): boolean; + emit(eventName: string | symbol, ...args: any[]): boolean; /** * Returns the number of listeners listening to the event named `eventName`. * @since v3.2.0 * @param eventName The name of the event being listened for */ - listenerCount(event: string | symbol): number; + listenerCount(eventName: string | symbol): number; /** * Adds the `listener` function to the _beginning_ of the listeners array for the * event named `eventName`. No checks are made to see if the `listener` has @@ -397,7 +397,7 @@ declare module 'events' { * @param eventName The name of the event. * @param listener The callback function */ - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this; /** * Adds a **one-time**`listener` function for the event named `eventName` to the_beginning_ of the listeners array. The next time `eventName` is triggered, this * listener is removed, and then invoked. @@ -413,7 +413,7 @@ declare module 'events' { * @param eventName The name of the event. * @param listener The callback function */ - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this; /** * Returns an array listing the events for which the emitter has registered * listeners. The values in the array are strings or `Symbol`s. diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts index 32f2bda16..9be747779 100755 --- a/node_modules/@types/node/fs.d.ts +++ b/node_modules/@types/node/fs.d.ts @@ -2555,7 +2555,7 @@ declare module 'fs' { * @since v0.1.29 * @param file filename or file descriptor */ - export function writeFile(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void; + export function writeFile(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void; /** * Asynchronously writes data to a file, replacing the file if it already exists. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. @@ -2586,7 +2586,7 @@ declare module 'fs' { * @since v0.1.29 * @param file filename or file descriptor */ - export function writeFileSync(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void; + export function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void; /** * Asynchronously append data to a file, creating the file if it does not yet * exist. `data` can be a string or a ``. @@ -2638,7 +2638,7 @@ declare module 'fs' { * @since v0.6.7 * @param path filename or file descriptor */ - export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void; + export function appendFile(path: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void; /** * Asynchronously append data to a file, creating the file if it does not exist. * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. @@ -2706,7 +2706,7 @@ declare module 'fs' { * @since v0.6.7 * @param path filename or file descriptor */ - export function appendFileSync(file: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void; + export function appendFileSync(path: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void; /** * Watch for changes on `filename`. The callback `listener` will be called each * time the file is accessed. @@ -3479,31 +3479,9 @@ declare module 'fs' { * @param mode modifiers for copy operation. */ export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; - /** - * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. - * No arguments other than a possible exception are given to the callback function. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. - * @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. - */ - export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: NoParamCallback): void; + export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; export namespace copyFile { - /** - * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. - * No arguments other than a possible exception are given to the callback function. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. - * @param flags An optional integer that specifies the behavior of the copy operation. - * The only supported flag is fs.constants.COPYFILE_EXCL, - * which causes the copy operation to fail if dest already exists. - */ - function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise; + function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; } /** * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it @@ -3539,7 +3517,7 @@ declare module 'fs' { * @param dest destination filename of the copy operation * @param mode modifiers for copy operation. */ - export function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void; + export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; /** * Write an array of `ArrayBufferView`s to the file specified by `fd` using`writev()`. * diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts index ff55e7d42..b272d8d80 100755 --- a/node_modules/@types/node/fs/promises.d.ts +++ b/node_modules/@types/node/fs/promises.d.ts @@ -229,6 +229,41 @@ declare module 'fs/promises' { * @since v10.0.0 */ writeFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null): Promise; + /** + * Write `buffer` to the file. + * + * The promise is resolved with an object containing two properties: + * + * It is unsafe to use `filehandle.write()` multiple times on the same file + * without waiting for the promise to be resolved (or rejected). For this + * scenario, use `fs.createWriteStream()`. + * + * On Linux, positional writes do not work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v10.0.0 + * @param offset The start position from within `buffer` where the data to write begins. + * @param length The number of bytes from `buffer` to write. + * @param position The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current position. + * See the POSIX pwrite(2) documentation for more detail. + */ + write( + buffer: TBuffer, + offset?: number | null, + length?: number | null, + position?: number | null + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + write( + data: string, + position?: number | null, + encoding?: BufferEncoding | null + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; /** * Write an array of [<ArrayBufferView>](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView)s to the file. * @@ -338,7 +373,7 @@ declare module 'fs/promises' { * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) * @return Fulfills with `undefined` upon success. */ - function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise; + function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; /** * Opens a ``. * @@ -739,7 +774,7 @@ declare module 'fs/promises' { * @return Fulfills with `undefined` upon success. */ function writeFile( - path: PathLike | FileHandle, + file: PathLike | FileHandle, data: string | NodeJS.ArrayBufferView | Iterable | AsyncIterable | Stream, options?: | (ObjectEncodingOptions & { diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts index 3af675ff4..9b5fe3f89 100755 --- a/node_modules/@types/node/http2.d.ts +++ b/node_modules/@types/node/http2.d.ts @@ -1002,7 +1002,7 @@ declare module 'http2' { * @param origins One or more URL Strings passed as separate arguments. */ origin( - ...args: Array< + ...origins: Array< | string | url.URL | { diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts index 44f03c4f0..b9c8d5d3d 100755 --- a/node_modules/@types/node/net.d.ts +++ b/node_modules/@types/node/net.d.ts @@ -286,9 +286,9 @@ declare module 'net' { * @param callback Optional callback for when the socket is finished. * @return The socket itself. */ - end(cb?: () => void): void; - end(buffer: Uint8Array | string, cb?: () => void): void; - end(str: Uint8Array | string, encoding?: BufferEncoding, cb?: () => void): void; + end(callback?: () => void): void; + end(buffer: Uint8Array | string, callback?: () => void): void; + end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): void; /** * events.EventEmitter * 1. close @@ -301,7 +301,7 @@ declare module 'net' { * 8. timeout */ addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: 'close', listener: (had_error: boolean) => void): this; + addListener(event: 'close', listener: (hadError: boolean) => void): this; addListener(event: 'connect', listener: () => void): this; addListener(event: 'data', listener: (data: Buffer) => void): this; addListener(event: 'drain', listener: () => void): this; @@ -310,7 +310,7 @@ declare module 'net' { addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; addListener(event: 'timeout', listener: () => void): this; emit(event: string | symbol, ...args: any[]): boolean; - emit(event: 'close', had_error: boolean): boolean; + emit(event: 'close', hadError: boolean): boolean; emit(event: 'connect'): boolean; emit(event: 'data', data: Buffer): boolean; emit(event: 'drain'): boolean; @@ -319,7 +319,7 @@ declare module 'net' { emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean; emit(event: 'timeout'): boolean; on(event: string, listener: (...args: any[]) => void): this; - on(event: 'close', listener: (had_error: boolean) => void): this; + on(event: 'close', listener: (hadError: boolean) => void): this; on(event: 'connect', listener: () => void): this; on(event: 'data', listener: (data: Buffer) => void): this; on(event: 'drain', listener: () => void): this; @@ -328,7 +328,7 @@ declare module 'net' { on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; on(event: 'timeout', listener: () => void): this; once(event: string, listener: (...args: any[]) => void): this; - once(event: 'close', listener: (had_error: boolean) => void): this; + once(event: 'close', listener: (hadError: boolean) => void): this; once(event: 'connect', listener: () => void): this; once(event: 'data', listener: (data: Buffer) => void): this; once(event: 'drain', listener: () => void): this; @@ -337,7 +337,7 @@ declare module 'net' { once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; once(event: 'timeout', listener: () => void): this; prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: 'close', listener: (had_error: boolean) => void): this; + prependListener(event: 'close', listener: (hadError: boolean) => void): this; prependListener(event: 'connect', listener: () => void): this; prependListener(event: 'data', listener: (data: Buffer) => void): this; prependListener(event: 'drain', listener: () => void): this; @@ -346,7 +346,7 @@ declare module 'net' { prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this; prependListener(event: 'timeout', listener: () => void): this; prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: 'close', listener: (had_error: boolean) => void): this; + prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this; prependOnceListener(event: 'connect', listener: () => void): this; prependOnceListener(event: 'data', listener: (data: Buffer) => void): this; prependOnceListener(event: 'drain', listener: () => void): this; diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts index 42054e550..8796274fc 100755 --- a/node_modules/@types/node/os.d.ts +++ b/node_modules/@types/node/os.d.ts @@ -448,10 +448,6 @@ declare module 'os' { * @param priority The scheduling priority to assign to the process. */ function setPriority(priority: number): void; - /** - * Sets the priority of the process specified process. - * @param priority Must be in range of -20 to 19 - */ function setPriority(pid: number, priority: number): void; } declare module 'node:os' { diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json index c81966ed9..5862ce8e5 100755 --- a/node_modules/@types/node/package.json +++ b/node_modules/@types/node/package.json @@ -1,6 +1,6 @@ { "name": "@types/node", - "version": "16.4.3", + "version": "16.4.5", "description": "TypeScript definitions for Node.js", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", "license": "MIT", @@ -232,6 +232,6 @@ }, "scripts": {}, "dependencies": {}, - "typesPublisherContentHash": "7773c70431ea6e9c0933bf765366c8cdb469355d431747d11fab3a760e130912", + "typesPublisherContentHash": "98c66e97322cf8ea4701d26cb699718e44f01a3ac25a1096136e1f082c6c125a", "typeScriptVersion": "3.6" } \ No newline at end of file diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts index 5aab98b1e..6983e1585 100755 --- a/node_modules/@types/node/process.d.ts +++ b/node_modules/@types/node/process.d.ts @@ -1126,7 +1126,7 @@ declare module 'process' { * } * ``` * @since v0.1.26 - * @param ...args Additional arguments to pass when invoking the `callback` + * @param args Additional arguments to pass when invoking the `callback` */ nextTick(callback: Function, ...args: any[]): void; /** diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts index dbf7b6a47..3178197bb 100755 --- a/node_modules/@types/node/repl.d.ts +++ b/node_modules/@types/node/repl.d.ts @@ -312,7 +312,7 @@ declare module 'repl' { * @param historyPath the path to the history file * @param callback called when history writes are ready or upon error */ - setupHistory(path: string, cb: (err: Error | null, repl: this) => void): void; + setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void; /** * events.EventEmitter * 1. close - inherited from `readline.Interface` diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts index 85e0428ff..64913af30 100755 --- a/node_modules/@types/node/stream.d.ts +++ b/node_modules/@types/node/stream.d.ts @@ -376,7 +376,7 @@ declare module 'stream' { * @since v0.9.4 * @param stream An "old style" readable stream */ - wrap(oldStream: NodeJS.ReadableStream): this; + wrap(stream: NodeJS.ReadableStream): this; push(chunk: any, encoding?: BufferEncoding): boolean; _destroy(error: Error | null, callback: (error?: Error | null) => void): void; /** @@ -591,8 +591,8 @@ declare module 'stream' { * @param callback Callback for when this chunk of data is flushed. * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. */ - write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; - write(chunk: any, encoding: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; /** * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. * @since v0.11.15 diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts index 3e3e6c68a..f551b3803 100755 --- a/node_modules/@types/node/tls.d.ts +++ b/node_modules/@types/node/tls.d.ts @@ -560,7 +560,7 @@ declare module 'tls' { * @param hostname A SNI host name or wildcard (e.g. `'*'`) * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). */ - addContext(hostName: string, credentials: SecureContextOptions): void; + addContext(hostname: string, context: SecureContextOptions): void; /** * Returns the session ticket keys. * @@ -575,7 +575,7 @@ declare module 'tls' { * @since v11.0.0 * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). */ - setSecureContext(details: SecureContextOptions): void; + setSecureContext(options: SecureContextOptions): void; /** * Sets the session ticket keys. * @@ -825,7 +825,7 @@ declare module 'tls' { * @param hostname The host name or IP address to verify the certificate against. * @param cert A `certificate object` representing the peer's certificate. */ - function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined; + function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; /** * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is * automatically set as a listener for the `'secureConnection'` event. @@ -949,7 +949,7 @@ declare module 'tls' { * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`. * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`. */ - function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; + function createSecurePair(context?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; /** * {@link createServer} sets the default value of the `honorCipherOrder` option * to `true`, other APIs that create secure contexts leave it unset. diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts index 0682e3782..f8a47c423 100755 --- a/node_modules/@types/node/tty.d.ts +++ b/node_modules/@types/node/tty.d.ts @@ -155,7 +155,7 @@ declare module 'tty' { * @since v9.9.0 * @param env An object containing the environment variables to check. This enables simulating the usage of a specific terminal. */ - getColorDepth(env?: {}): number; + getColorDepth(env?: object): number; /** * Returns `true` if the `writeStream` supports at least as many colors as provided * in `count`. Minimum support is 2 (black and white). @@ -176,9 +176,9 @@ declare module 'tty' { * @param count The number of colors that are requested (minimum 2). * @param env An object containing the environment variables to check. This enables simulating the usage of a specific terminal. */ - hasColors(depth?: number): boolean; - hasColors(env?: {}): boolean; - hasColors(depth: number, env?: {}): boolean; + hasColors(count?: number): boolean; + hasColors(env?: object): boolean; + hasColors(count: number, env?: object): boolean; /** * `writeStream.getWindowSize()` returns the size of the `TTY` corresponding to this `WriteStream`. The array is of the type`[numColumns, numRows]` where `numColumns` and `numRows` represent * the number diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts index 7a0b11ecc..a13407996 100755 --- a/node_modules/@types/node/url.d.ts +++ b/node_modules/@types/node/url.d.ts @@ -70,13 +70,10 @@ declare module 'url' { * @param slashesDenoteHost If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the result * would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`. */ - function parse(urlStr: string): UrlWithStringQuery; - /** @deprecated since v11.0.0 - Use the WHATWG URL API. */ - function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery; - /** @deprecated since v11.0.0 - Use the WHATWG URL API. */ - function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; - /** @deprecated since v11.0.0 - Use the WHATWG URL API. */ - function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + function parse(urlString: string): UrlWithStringQuery; + function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery; + function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; /** * The `url.format()` method returns a formatted URL string derived from`urlObject`. * @@ -140,8 +137,7 @@ declare module 'url' { * @deprecated Legacy: Use the WHATWG URL API instead. * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. */ - function format(URL: URL, options?: URLFormatOptions): string; - /** @deprecated since v11.0.0 - Use the WHATWG URL API. */ + function format(urlObject: URL, options?: URLFormatOptions): string; function format(urlObject: UrlObject | string): string; /** * The `url.resolve()` method resolves a target URL relative to a base URL in a @@ -313,7 +309,7 @@ declare module 'url' { * @param path The path to convert to a File URL. * @return The file URL object. */ - function pathToFileURL(url: string): URL; + function pathToFileURL(path: string): URL; /** * This utility function converts a URL object into an ordinary options object as * expected by the `http.request()` and `https.request()` APIs. @@ -758,7 +754,7 @@ declare module 'url' { * @param fn Invoked for each name-value pair in the query * @param thisArg To be used as `this` value for when `fn` is called */ - forEach(callback: (value: string, name: string, searchParams: this) => void): void; + forEach(callback: (this: TThis, value: string, name: string, searchParams: this) => void, thisArg?: TThis): void; /** * Returns the value of the first name-value pair whose name is `name`. If there * are no such pairs, `null` is returned. diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts index 8785d1909..99509bd7a 100755 --- a/node_modules/@types/node/util.d.ts +++ b/node_modules/@types/node/util.d.ts @@ -451,6 +451,10 @@ declare module 'util' { * @deprecated Legacy: Use ES2015 class syntax and `extends` keyword instead. */ export function inherits(constructor: unknown, superConstructor: unknown): void; + export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; + export interface DebugLogger extends DebugLoggerFunction { + enabled: boolean; + } /** * The `util.debuglog()` method is used to create a function that conditionally * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that @@ -508,7 +512,7 @@ declare module 'util' { * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function. * @return The logging function */ - export function debuglog(key: string): (msg: string, ...param: unknown[]) => void; + export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; /** * Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`. * @@ -768,7 +772,7 @@ declare module 'util' { * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. * @return The deprecated function wrapped to emit a warning. */ - export function deprecate(fn: T, message: string, code?: string): T; + export function deprecate(fn: T, msg: string, code?: string): T; /** * Returns `true` if there is deep strict equality between `val1` and `val2`. * Otherwise, returns `false`. @@ -1050,7 +1054,7 @@ declare module 'util' { * @param src The text to encode. * @param dest The array to hold the encode result. */ - encodeInto(input: string, output: Uint8Array): EncodeIntoResult; + encodeInto(src: string, dest: Uint8Array): EncodeIntoResult; } } declare module 'util/types' { diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts index 6be4de357..ace8b781d 100755 --- a/node_modules/@types/node/v8.d.ts +++ b/node_modules/@types/node/v8.d.ts @@ -217,7 +217,7 @@ declare module 'v8' { * worker thread. * @return The filename where the snapshot was saved. */ - function writeHeapSnapshot(fileName?: string): string; + function writeHeapSnapshot(filename?: string): string; /** * Returns an object with the following properties: * @@ -353,7 +353,7 @@ declare module 'v8' { * @since v8.0.0 * @param buffer A buffer returned by {@link serialize}. */ - function deserialize(data: NodeJS.TypedArray): any; + function deserialize(buffer: NodeJS.TypedArray): any; /** * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple * times during the lifetime of the process. Each time the execution counter will diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts index e27375025..d83f02622 100755 --- a/node_modules/@types/node/vm.d.ts +++ b/node_modules/@types/node/vm.d.ts @@ -191,7 +191,7 @@ declare module 'vm' { * @param contextifiedObject A `contextified` object as returned by the `vm.createContext()` method. * @return the result of the very last statement executed in the script. */ - runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; + runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any; /** * First contextifies the given `contextObject`, runs the compiled code contained * by the `vm.Script` object within the created context, and returns the result. @@ -218,7 +218,7 @@ declare module 'vm' { * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created. * @return the result of the very last statement executed in the script. */ - runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; + runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any; /** * Runs the compiled code contained by the `vm.Script` within the context of the * current `global` object. Running code does not have access to local scope, but_does_ have access to the current `global` object. @@ -340,7 +340,7 @@ declare module 'vm' { * @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run. * @return the result of the very last statement executed in the script. */ - function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any; + function runInContext(code: string, contextifiedObject: Context, options?: RunningScriptOptions | string): any; /** * The `vm.runInNewContext()` first contextifies the given `contextObject` (or * creates a new `contextObject` if passed as `undefined`), compiles the `code`, @@ -369,7 +369,7 @@ declare module 'vm' { * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created. * @return the result of the very last statement executed in the script. */ - function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any; + function runInNewContext(code: string, contextObject?: Context, options?: RunningScriptOptions | string): any; /** * `vm.runInThisContext()` compiles `code`, runs it within the context of the * current `global` and returns the result. Running code does not have access to diff --git a/node_modules/@types/node/worker_threads.d.ts b/node_modules/@types/node/worker_threads.d.ts index 0f40bb078..0d77c5ebc 100755 --- a/node_modules/@types/node/worker_threads.d.ts +++ b/node_modules/@types/node/worker_threads.d.ts @@ -583,7 +583,7 @@ declare module 'worker_threads' { * @param port The message port to transfer. * @param contextifiedSandbox A `contextified` object as returned by the `vm.createContext()` method. */ - function moveMessagePortToContext(port: MessagePort, context: Context): MessagePort; + function moveMessagePortToContext(port: MessagePort, contextifiedSandbox: Context): MessagePort; /** * Receive a single message from a given `MessagePort`. If no message is available,`undefined` is returned, otherwise an object with a single `message` property * that contains the message payload, corresponding to the oldest message in the`MessagePort`’s queue. diff --git a/node_modules/core-util-is/LICENSE b/node_modules/core-util-is/LICENSE new file mode 100644 index 000000000..d8d7f9437 --- /dev/null +++ b/node_modules/core-util-is/LICENSE @@ -0,0 +1,19 @@ +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/node_modules/core-util-is/README.md b/node_modules/core-util-is/README.md new file mode 100644 index 000000000..5a76b4149 --- /dev/null +++ b/node_modules/core-util-is/README.md @@ -0,0 +1,3 @@ +# core-util-is + +The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/core-util-is/float.patch b/node_modules/core-util-is/float.patch new file mode 100644 index 000000000..a06d5c05f --- /dev/null +++ b/node_modules/core-util-is/float.patch @@ -0,0 +1,604 @@ +diff --git a/lib/util.js b/lib/util.js +index a03e874..9074e8e 100644 +--- a/lib/util.js ++++ b/lib/util.js +@@ -19,430 +19,6 @@ + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + +-var formatRegExp = /%[sdj%]/g; +-exports.format = function(f) { +- if (!isString(f)) { +- var objects = []; +- for (var i = 0; i < arguments.length; i++) { +- objects.push(inspect(arguments[i])); +- } +- return objects.join(' '); +- } +- +- var i = 1; +- var args = arguments; +- var len = args.length; +- var str = String(f).replace(formatRegExp, function(x) { +- if (x === '%%') return '%'; +- if (i >= len) return x; +- switch (x) { +- case '%s': return String(args[i++]); +- case '%d': return Number(args[i++]); +- case '%j': +- try { +- return JSON.stringify(args[i++]); +- } catch (_) { +- return '[Circular]'; +- } +- default: +- return x; +- } +- }); +- for (var x = args[i]; i < len; x = args[++i]) { +- if (isNull(x) || !isObject(x)) { +- str += ' ' + x; +- } else { +- str += ' ' + inspect(x); +- } +- } +- return str; +-}; +- +- +-// Mark that a method should not be used. +-// Returns a modified function which warns once by default. +-// If --no-deprecation is set, then it is a no-op. +-exports.deprecate = function(fn, msg) { +- // Allow for deprecating things in the process of starting up. +- if (isUndefined(global.process)) { +- return function() { +- return exports.deprecate(fn, msg).apply(this, arguments); +- }; +- } +- +- if (process.noDeprecation === true) { +- return fn; +- } +- +- var warned = false; +- function deprecated() { +- if (!warned) { +- if (process.throwDeprecation) { +- throw new Error(msg); +- } else if (process.traceDeprecation) { +- console.trace(msg); +- } else { +- console.error(msg); +- } +- warned = true; +- } +- return fn.apply(this, arguments); +- } +- +- return deprecated; +-}; +- +- +-var debugs = {}; +-var debugEnviron; +-exports.debuglog = function(set) { +- if (isUndefined(debugEnviron)) +- debugEnviron = process.env.NODE_DEBUG || ''; +- set = set.toUpperCase(); +- if (!debugs[set]) { +- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { +- var pid = process.pid; +- debugs[set] = function() { +- var msg = exports.format.apply(exports, arguments); +- console.error('%s %d: %s', set, pid, msg); +- }; +- } else { +- debugs[set] = function() {}; +- } +- } +- return debugs[set]; +-}; +- +- +-/** +- * Echos the value of a value. Trys to print the value out +- * in the best way possible given the different types. +- * +- * @param {Object} obj The object to print out. +- * @param {Object} opts Optional options object that alters the output. +- */ +-/* legacy: obj, showHidden, depth, colors*/ +-function inspect(obj, opts) { +- // default options +- var ctx = { +- seen: [], +- stylize: stylizeNoColor +- }; +- // legacy... +- if (arguments.length >= 3) ctx.depth = arguments[2]; +- if (arguments.length >= 4) ctx.colors = arguments[3]; +- if (isBoolean(opts)) { +- // legacy... +- ctx.showHidden = opts; +- } else if (opts) { +- // got an "options" object +- exports._extend(ctx, opts); +- } +- // set default options +- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; +- if (isUndefined(ctx.depth)) ctx.depth = 2; +- if (isUndefined(ctx.colors)) ctx.colors = false; +- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; +- if (ctx.colors) ctx.stylize = stylizeWithColor; +- return formatValue(ctx, obj, ctx.depth); +-} +-exports.inspect = inspect; +- +- +-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +-inspect.colors = { +- 'bold' : [1, 22], +- 'italic' : [3, 23], +- 'underline' : [4, 24], +- 'inverse' : [7, 27], +- 'white' : [37, 39], +- 'grey' : [90, 39], +- 'black' : [30, 39], +- 'blue' : [34, 39], +- 'cyan' : [36, 39], +- 'green' : [32, 39], +- 'magenta' : [35, 39], +- 'red' : [31, 39], +- 'yellow' : [33, 39] +-}; +- +-// Don't use 'blue' not visible on cmd.exe +-inspect.styles = { +- 'special': 'cyan', +- 'number': 'yellow', +- 'boolean': 'yellow', +- 'undefined': 'grey', +- 'null': 'bold', +- 'string': 'green', +- 'date': 'magenta', +- // "name": intentionally not styling +- 'regexp': 'red' +-}; +- +- +-function stylizeWithColor(str, styleType) { +- var style = inspect.styles[styleType]; +- +- if (style) { +- return '\u001b[' + inspect.colors[style][0] + 'm' + str + +- '\u001b[' + inspect.colors[style][1] + 'm'; +- } else { +- return str; +- } +-} +- +- +-function stylizeNoColor(str, styleType) { +- return str; +-} +- +- +-function arrayToHash(array) { +- var hash = {}; +- +- array.forEach(function(val, idx) { +- hash[val] = true; +- }); +- +- return hash; +-} +- +- +-function formatValue(ctx, value, recurseTimes) { +- // Provide a hook for user-specified inspect functions. +- // Check that value is an object with an inspect function on it +- if (ctx.customInspect && +- value && +- isFunction(value.inspect) && +- // Filter out the util module, it's inspect function is special +- value.inspect !== exports.inspect && +- // Also filter out any prototype objects using the circular check. +- !(value.constructor && value.constructor.prototype === value)) { +- var ret = value.inspect(recurseTimes, ctx); +- if (!isString(ret)) { +- ret = formatValue(ctx, ret, recurseTimes); +- } +- return ret; +- } +- +- // Primitive types cannot have properties +- var primitive = formatPrimitive(ctx, value); +- if (primitive) { +- return primitive; +- } +- +- // Look up the keys of the object. +- var keys = Object.keys(value); +- var visibleKeys = arrayToHash(keys); +- +- if (ctx.showHidden) { +- keys = Object.getOwnPropertyNames(value); +- } +- +- // Some type of object without properties can be shortcutted. +- if (keys.length === 0) { +- if (isFunction(value)) { +- var name = value.name ? ': ' + value.name : ''; +- return ctx.stylize('[Function' + name + ']', 'special'); +- } +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } +- if (isDate(value)) { +- return ctx.stylize(Date.prototype.toString.call(value), 'date'); +- } +- if (isError(value)) { +- return formatError(value); +- } +- } +- +- var base = '', array = false, braces = ['{', '}']; +- +- // Make Array say that they are Array +- if (isArray(value)) { +- array = true; +- braces = ['[', ']']; +- } +- +- // Make functions say that they are functions +- if (isFunction(value)) { +- var n = value.name ? ': ' + value.name : ''; +- base = ' [Function' + n + ']'; +- } +- +- // Make RegExps say that they are RegExps +- if (isRegExp(value)) { +- base = ' ' + RegExp.prototype.toString.call(value); +- } +- +- // Make dates with properties first say the date +- if (isDate(value)) { +- base = ' ' + Date.prototype.toUTCString.call(value); +- } +- +- // Make error with message first say the error +- if (isError(value)) { +- base = ' ' + formatError(value); +- } +- +- if (keys.length === 0 && (!array || value.length == 0)) { +- return braces[0] + base + braces[1]; +- } +- +- if (recurseTimes < 0) { +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } else { +- return ctx.stylize('[Object]', 'special'); +- } +- } +- +- ctx.seen.push(value); +- +- var output; +- if (array) { +- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); +- } else { +- output = keys.map(function(key) { +- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); +- }); +- } +- +- ctx.seen.pop(); +- +- return reduceToSingleString(output, base, braces); +-} +- +- +-function formatPrimitive(ctx, value) { +- if (isUndefined(value)) +- return ctx.stylize('undefined', 'undefined'); +- if (isString(value)) { +- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') +- .replace(/'/g, "\\'") +- .replace(/\\"/g, '"') + '\''; +- return ctx.stylize(simple, 'string'); +- } +- if (isNumber(value)) { +- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, +- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . +- if (value === 0 && 1 / value < 0) +- return ctx.stylize('-0', 'number'); +- return ctx.stylize('' + value, 'number'); +- } +- if (isBoolean(value)) +- return ctx.stylize('' + value, 'boolean'); +- // For some reason typeof null is "object", so special case here. +- if (isNull(value)) +- return ctx.stylize('null', 'null'); +-} +- +- +-function formatError(value) { +- return '[' + Error.prototype.toString.call(value) + ']'; +-} +- +- +-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { +- var output = []; +- for (var i = 0, l = value.length; i < l; ++i) { +- if (hasOwnProperty(value, String(i))) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- String(i), true)); +- } else { +- output.push(''); +- } +- } +- keys.forEach(function(key) { +- if (!key.match(/^\d+$/)) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- key, true)); +- } +- }); +- return output; +-} +- +- +-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { +- var name, str, desc; +- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; +- if (desc.get) { +- if (desc.set) { +- str = ctx.stylize('[Getter/Setter]', 'special'); +- } else { +- str = ctx.stylize('[Getter]', 'special'); +- } +- } else { +- if (desc.set) { +- str = ctx.stylize('[Setter]', 'special'); +- } +- } +- if (!hasOwnProperty(visibleKeys, key)) { +- name = '[' + key + ']'; +- } +- if (!str) { +- if (ctx.seen.indexOf(desc.value) < 0) { +- if (isNull(recurseTimes)) { +- str = formatValue(ctx, desc.value, null); +- } else { +- str = formatValue(ctx, desc.value, recurseTimes - 1); +- } +- if (str.indexOf('\n') > -1) { +- if (array) { +- str = str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n').substr(2); +- } else { +- str = '\n' + str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n'); +- } +- } +- } else { +- str = ctx.stylize('[Circular]', 'special'); +- } +- } +- if (isUndefined(name)) { +- if (array && key.match(/^\d+$/)) { +- return str; +- } +- name = JSON.stringify('' + key); +- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { +- name = name.substr(1, name.length - 2); +- name = ctx.stylize(name, 'name'); +- } else { +- name = name.replace(/'/g, "\\'") +- .replace(/\\"/g, '"') +- .replace(/(^"|"$)/g, "'"); +- name = ctx.stylize(name, 'string'); +- } +- } +- +- return name + ': ' + str; +-} +- +- +-function reduceToSingleString(output, base, braces) { +- var numLinesEst = 0; +- var length = output.reduce(function(prev, cur) { +- numLinesEst++; +- if (cur.indexOf('\n') >= 0) numLinesEst++; +- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; +- }, 0); +- +- if (length > 60) { +- return braces[0] + +- (base === '' ? '' : base + '\n ') + +- ' ' + +- output.join(',\n ') + +- ' ' + +- braces[1]; +- } +- +- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +-} +- +- + // NOTE: These type checking functions intentionally don't use `instanceof` + // because it is fragile and can be easily faked with `Object.create()`. + function isArray(ar) { +@@ -522,166 +98,10 @@ function isPrimitive(arg) { + exports.isPrimitive = isPrimitive; + + function isBuffer(arg) { +- return arg instanceof Buffer; ++ return Buffer.isBuffer(arg); + } + exports.isBuffer = isBuffer; + + function objectToString(o) { + return Object.prototype.toString.call(o); +-} +- +- +-function pad(n) { +- return n < 10 ? '0' + n.toString(10) : n.toString(10); +-} +- +- +-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', +- 'Oct', 'Nov', 'Dec']; +- +-// 26 Feb 16:19:34 +-function timestamp() { +- var d = new Date(); +- var time = [pad(d.getHours()), +- pad(d.getMinutes()), +- pad(d.getSeconds())].join(':'); +- return [d.getDate(), months[d.getMonth()], time].join(' '); +-} +- +- +-// log is just a thin wrapper to console.log that prepends a timestamp +-exports.log = function() { +- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +-}; +- +- +-/** +- * Inherit the prototype methods from one constructor into another. +- * +- * The Function.prototype.inherits from lang.js rewritten as a standalone +- * function (not on Function.prototype). NOTE: If this file is to be loaded +- * during bootstrapping this function needs to be rewritten using some native +- * functions as prototype setup using normal JavaScript does not work as +- * expected during bootstrapping (see mirror.js in r114903). +- * +- * @param {function} ctor Constructor function which needs to inherit the +- * prototype. +- * @param {function} superCtor Constructor function to inherit prototype from. +- */ +-exports.inherits = function(ctor, superCtor) { +- ctor.super_ = superCtor; +- ctor.prototype = Object.create(superCtor.prototype, { +- constructor: { +- value: ctor, +- enumerable: false, +- writable: true, +- configurable: true +- } +- }); +-}; +- +-exports._extend = function(origin, add) { +- // Don't do anything if add isn't an object +- if (!add || !isObject(add)) return origin; +- +- var keys = Object.keys(add); +- var i = keys.length; +- while (i--) { +- origin[keys[i]] = add[keys[i]]; +- } +- return origin; +-}; +- +-function hasOwnProperty(obj, prop) { +- return Object.prototype.hasOwnProperty.call(obj, prop); +-} +- +- +-// Deprecated old stuff. +- +-exports.p = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- console.error(exports.inspect(arguments[i])); +- } +-}, 'util.p: Use console.error() instead'); +- +- +-exports.exec = exports.deprecate(function() { +- return require('child_process').exec.apply(this, arguments); +-}, 'util.exec is now called `child_process.exec`.'); +- +- +-exports.print = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(String(arguments[i])); +- } +-}, 'util.print: Use console.log instead'); +- +- +-exports.puts = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(arguments[i] + '\n'); +- } +-}, 'util.puts: Use console.log instead'); +- +- +-exports.debug = exports.deprecate(function(x) { +- process.stderr.write('DEBUG: ' + x + '\n'); +-}, 'util.debug: Use console.error instead'); +- +- +-exports.error = exports.deprecate(function(x) { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stderr.write(arguments[i] + '\n'); +- } +-}, 'util.error: Use console.error instead'); +- +- +-exports.pump = exports.deprecate(function(readStream, writeStream, callback) { +- var callbackCalled = false; +- +- function call(a, b, c) { +- if (callback && !callbackCalled) { +- callback(a, b, c); +- callbackCalled = true; +- } +- } +- +- readStream.addListener('data', function(chunk) { +- if (writeStream.write(chunk) === false) readStream.pause(); +- }); +- +- writeStream.addListener('drain', function() { +- readStream.resume(); +- }); +- +- readStream.addListener('end', function() { +- writeStream.end(); +- }); +- +- readStream.addListener('close', function() { +- call(); +- }); +- +- readStream.addListener('error', function(err) { +- writeStream.end(); +- call(err); +- }); +- +- writeStream.addListener('error', function(err) { +- readStream.destroy(); +- call(err); +- }); +-}, 'util.pump(): Use readableStream.pipe() instead'); +- +- +-var uv; +-exports._errnoException = function(err, syscall) { +- if (isUndefined(uv)) uv = process.binding('uv'); +- var errname = uv.errname(err); +- var e = new Error(syscall + ' ' + errname); +- e.code = errname; +- e.errno = errname; +- e.syscall = syscall; +- return e; +-}; ++} \ No newline at end of file diff --git a/node_modules/core-util-is/lib/util.js b/node_modules/core-util-is/lib/util.js new file mode 100644 index 000000000..ff4c851c0 --- /dev/null +++ b/node_modules/core-util-is/lib/util.js @@ -0,0 +1,107 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} diff --git a/node_modules/core-util-is/package.json b/node_modules/core-util-is/package.json new file mode 100644 index 000000000..2332d4c37 --- /dev/null +++ b/node_modules/core-util-is/package.json @@ -0,0 +1,32 @@ +{ + "name": "core-util-is", + "version": "1.0.2", + "description": "The `util.is*` functions introduced in Node v0.12.", + "main": "lib/util.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/core-util-is" + }, + "keywords": [ + "util", + "isBuffer", + "isArray", + "isNumber", + "isString", + "isRegExp", + "isThis", + "isThat", + "polyfill" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/isaacs/core-util-is/issues" + }, + "scripts": { + "test": "tap test.js" + }, + "devDependencies": { + "tap": "^2.3.0" + } +} \ No newline at end of file diff --git a/node_modules/core-util-is/test.js b/node_modules/core-util-is/test.js new file mode 100644 index 000000000..1a490c65a --- /dev/null +++ b/node_modules/core-util-is/test.js @@ -0,0 +1,68 @@ +var assert = require('tap'); + +var t = require('./lib/util'); + +assert.equal(t.isArray([]), true); +assert.equal(t.isArray({}), false); + +assert.equal(t.isBoolean(null), false); +assert.equal(t.isBoolean(true), true); +assert.equal(t.isBoolean(false), true); + +assert.equal(t.isNull(null), true); +assert.equal(t.isNull(undefined), false); +assert.equal(t.isNull(false), false); +assert.equal(t.isNull(), false); + +assert.equal(t.isNullOrUndefined(null), true); +assert.equal(t.isNullOrUndefined(undefined), true); +assert.equal(t.isNullOrUndefined(false), false); +assert.equal(t.isNullOrUndefined(), true); + +assert.equal(t.isNumber(null), false); +assert.equal(t.isNumber('1'), false); +assert.equal(t.isNumber(1), true); + +assert.equal(t.isString(null), false); +assert.equal(t.isString('1'), true); +assert.equal(t.isString(1), false); + +assert.equal(t.isSymbol(null), false); +assert.equal(t.isSymbol('1'), false); +assert.equal(t.isSymbol(1), false); +assert.equal(t.isSymbol(Symbol()), true); + +assert.equal(t.isUndefined(null), false); +assert.equal(t.isUndefined(undefined), true); +assert.equal(t.isUndefined(false), false); +assert.equal(t.isUndefined(), true); + +assert.equal(t.isRegExp(null), false); +assert.equal(t.isRegExp('1'), false); +assert.equal(t.isRegExp(new RegExp()), true); + +assert.equal(t.isObject({}), true); +assert.equal(t.isObject([]), true); +assert.equal(t.isObject(new RegExp()), true); +assert.equal(t.isObject(new Date()), true); + +assert.equal(t.isDate(null), false); +assert.equal(t.isDate('1'), false); +assert.equal(t.isDate(new Date()), true); + +assert.equal(t.isError(null), false); +assert.equal(t.isError({ err: true }), false); +assert.equal(t.isError(new Error()), true); + +assert.equal(t.isFunction(null), false); +assert.equal(t.isFunction({ }), false); +assert.equal(t.isFunction(function() {}), true); + +assert.equal(t.isPrimitive(null), true); +assert.equal(t.isPrimitive(''), true); +assert.equal(t.isPrimitive(0), true); +assert.equal(t.isPrimitive(new Date()), false); + +assert.equal(t.isBuffer(null), false); +assert.equal(t.isBuffer({}), false); +assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/node_modules/immediate/LICENSE.txt b/node_modules/immediate/LICENSE.txt new file mode 100644 index 000000000..88c18c279 --- /dev/null +++ b/node_modules/immediate/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, Domenic Denicola, Brian Cavalier + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/immediate/README.md b/node_modules/immediate/README.md new file mode 100644 index 000000000..d661ae837 --- /dev/null +++ b/node_modules/immediate/README.md @@ -0,0 +1,93 @@ +# immediate [![Build Status](https://travis-ci.org/calvinmetcalf/immediate.svg?branch=master)](https://travis-ci.org/calvinmetcalf/immediate) + +``` +npm install immediate --save +``` + +then + +```js +var immediate = require("immediate"); + +immediate(function () { + // this will run soon +}); + +immediate(function (arg1, arg2) { + // get your args like in iojs +}, thing1, thing2); +``` + +## Introduction + +**immediate** is a microtask library, decended from [NobleJS's setImmediate](https://github.com/NobleJS/setImmediate), but including ideas from [Cujo's When](https://github.com/cujojs/when) and [RSVP][RSVP]. + +immediate takes the tricks from setImmedate and RSVP and combines them with the schedualer inspired (vaugly) by whens. + +Note versions 2.6.5 and earlier were strictly speaking a 'macrotask' library not a microtask one, [see this for the difference](https://github.com/YuzuJS/setImmediate#macrotasks-and-microtasks), if you need a macrotask library, [I got you covered](https://github.com/calvinmetcalf/macrotask). + +Several new features were added in versions 3.1.0 and 3.2.0 to maintain parity with +process.nextTick, but the 3.0.x series is still being kept up to date if you just need +the small barebones version. + + +## The Tricks + +### `process.nextTick` + +Note that we check for *actual* Node.js environments, not emulated ones like those produced by browserify or similar. + +### `MutationObserver` + +This is what [RSVP][RSVP] uses, it's very fast, details on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver). + + +### `MessageChannel` + +Unfortunately, `postMessage` has completely different semantics inside web workers, and so cannot be used there. So we +turn to [`MessageChannel`][MessageChannel], which has worse browser support, but does work inside a web worker. + +### `