diff --git a/.renovaterc.json b/.renovaterc.json index 0f1ace09d..76cb50139 100644 --- a/.renovaterc.json +++ b/.renovaterc.json @@ -6,6 +6,7 @@ "helpers:disableTypesNodeMajor" ], "ignorePresets": ["group:monorepos"], + "ignoreDeps": ["argon2"], "packageRules": [ { "matchPaths": ["actions/**"], diff --git a/packages/encrypted-archive/README.md b/packages/encrypted-archive/README.md index 592d252e5..41d251e6c 100644 --- a/packages/encrypted-archive/README.md +++ b/packages/encrypted-archive/README.md @@ -1,7 +1,7 @@ # @sounisi5011/encrypted-archive [![Go to the latest release page on npm](https://img.shields.io/npm/v/@sounisi5011/encrypted-archive.svg)](https://www.npmjs.com/package/@sounisi5011/encrypted-archive) -![Supported Node.js version: ^12.17.x || 14.x || 15.x || 16.x || 17.x](https://img.shields.io/static/v1?label=node&message=%5E12.17.x%20%7C%7C%2014.x%20%7C%7C%2015.x%20%7C%7C%2016.x%20%7C%7C%2017.x&color=brightgreen) +![Supported Node.js version: ^12.17.x || 14.x || 15.x || 16.x || 17.x || >=18.x](https://img.shields.io/static/v1?label=node&message=%5E12.17.x%20%7C%7C%2014.x%20%7C%7C%2015.x%20%7C%7C%2016.x%20%7C%7C%2017.x%20%7C%7C%20%3E%3D18.x&color=brightgreen) [![Tested with Jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![Minified Bundle Size Details](https://img.shields.io/bundlephobia/min/@sounisi5011/encrypted-archive)](https://bundlephobia.com/result?p=%40sounisi5011%2Fencrypted-archive) diff --git a/packages/encrypted-archive/examples/package.json b/packages/encrypted-archive/examples/package.json index 58aeb7824..939107a44 100644 --- a/packages/encrypted-archive/examples/package.json +++ b/packages/encrypted-archive/examples/package.json @@ -4,6 +4,6 @@ "@sounisi5011/encrypted-archive": "file:.." }, "engines": { - "node": "^12.17.x || 14.x || 15.x || 16.x || 17.x" + "node": "^12.17.x || 14.x || 15.x || 16.x || 17.x || >=18.x" } } diff --git a/packages/encrypted-archive/package.json b/packages/encrypted-archive/package.json index 3e10410c4..e82fa31c6 100644 --- a/packages/encrypted-archive/package.json +++ b/packages/encrypted-archive/package.json @@ -122,8 +122,11 @@ "typescript": "4.7.2", "ultra-runner": "3.10.5" }, + "optionalDependencies": { + "argon2": "0.27.2" + }, "engines": { - "node": "^12.17.x || 14.x || 15.x || 16.x || 17.x" + "node": "^12.17.x || 14.x || 15.x || 16.x || 17.x || >=18.x" }, "runkitExampleFilename": "./runkit-example.js" } diff --git a/packages/encrypted-archive/src/key-derivation-function/argon2.ts b/packages/encrypted-archive/src/key-derivation-function/argon2.ts index c4ffdc20c..e678f9fa4 100644 --- a/packages/encrypted-archive/src/key-derivation-function/argon2.ts +++ b/packages/encrypted-archive/src/key-derivation-function/argon2.ts @@ -1,20 +1,15 @@ -// @ts-expect-error TS1471: Module '@sounisi5011/ts-utils-is-property-accessible' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. +import { version as nodeVersion } from 'process'; + import { isPropAccessible } from '@sounisi5011/ts-utils-is-property-accessible'; -import { ArgonType, hash as argonHash } from 'argon2-browser'; import capitalize from 'capitalize'; import type { BaseKeyDerivationOptions, GetKDFResult } from '.'; import { bufferFrom, ifFuncThenExec, isNotUndefined, normalizeOptions, printObject } from '../utils'; import { assertType, isInteger, objectEntries, objectFromEntries, RequiredExcludeUndefined } from '../utils/type'; -const argon2TypeRecord = { - argon2d: ArgonType.Argon2d, - argon2id: ArgonType.Argon2id, -}; -const argon2TypeMap = new Map((Object.entries as objectEntries)(argon2TypeRecord).map(([k, type]) => [k, { type }])); -const typeNameList = [...argon2TypeMap.keys()]; +const argon2TypeNameList = ['argon2d', 'argon2id'] as const; -export type Argon2Algorithm = (typeof typeNameList)[number]; +export type Argon2Algorithm = (typeof argon2TypeNameList)[number]; export interface Argon2Options extends BaseKeyDerivationOptions { algorithm: Argon2Algorithm; iterations?: number | undefined; @@ -38,10 +33,7 @@ export const defaultOptions: NormalizedArgon2Options = { * @see https://github.com/P-H-C/phc-winner-argon2/blob/16d3df698db2486dde480b09a732bf9bf48599f9/argon2-specs.pdf * @see https://www.password-hashing.net/argon2-specs.pdf#page=5 */ -const ARGON2_ITERATIONS = { - MIN: 1, - MAX: 2 ** 32 - 1, -}; +const ARGON2_ITERATIONS = { MIN: 1, MAX: 2 ** 32 - 1 }; /** * > # 3 Specification of Argon2 * > ## 3.1 Inputs @@ -62,10 +54,7 @@ const ARGON2_MEMORY = { * @see https://github.com/P-H-C/phc-winner-argon2/blob/16d3df698db2486dde480b09a732bf9bf48599f9/argon2-specs.pdf * @see https://www.password-hashing.net/argon2-specs.pdf#page=4 */ -const ARGON2_PARALLELISM = { - MIN: 1, - MAX: 2 ** 24 - 1, -}; +const ARGON2_PARALLELISM = { MIN: 1, MAX: 2 ** 24 - 1 }; /** * > # 3 Specification of Argon2 * > ## 3.1 Inputs @@ -73,10 +62,7 @@ const ARGON2_PARALLELISM = { * @see https://github.com/P-H-C/phc-winner-argon2/blob/16d3df698db2486dde480b09a732bf9bf48599f9/argon2-specs.pdf * @see https://www.password-hashing.net/argon2-specs.pdf#page=4 */ -const ARGON2_PASSWORD = { - MIN: 0, - MAX: 2 ** 32 - 1, -}; +const ARGON2_PASSWORD = { MIN: 0, MAX: 2 ** 32 - 1 }; /** * > # 3 Specification of Argon2 * > ## 3.1 Inputs @@ -84,10 +70,7 @@ const ARGON2_PASSWORD = { * @see https://github.com/P-H-C/phc-winner-argon2/blob/16d3df698db2486dde480b09a732bf9bf48599f9/argon2-specs.pdf * @see https://www.password-hashing.net/argon2-specs.pdf#page=4 */ -const ARGON2_SALT = { - MIN: 8, - MAX: 2 ** 32 - 1, -}; +const ARGON2_SALT = { MIN: 8, MAX: 2 ** 32 - 1 }; /** * > # 3 Specification of Argon2 * > ## 3.1 Inputs @@ -95,10 +78,7 @@ const ARGON2_SALT = { * @see https://github.com/P-H-C/phc-winner-argon2/blob/16d3df698db2486dde480b09a732bf9bf48599f9/argon2-specs.pdf * @see https://www.password-hashing.net/argon2-specs.pdf#page=4 */ -const ARGON2_OUTPUT = { - MIN: 4, - MAX: 2 ** 32 - 1, -}; +const ARGON2_OUTPUT = { MIN: 4, MAX: 2 ** 32 - 1 }; /** * > 9 Recommended parameters * > 5. Select the salt length. 128 bits is sufficient for all applications, but can be reduced to 64 bits in the case @@ -108,15 +88,19 @@ const ARGON2_OUTPUT = { */ const SALT_LEN = 128 / 8; -export function isArgon2Options(options: T): options is T extends Argon2Options ? T : never { - if (!isPropAccessible(options) || typeof options !== 'object') return false; - const { algorithm } = options; - for (const type of typeNameList) { +function isArgon2Algorithm(algorithm: unknown): algorithm is Argon2Algorithm { + // Note: The `Array.prototype.includes()` method cannot be used because its argument cannot be assigned the type `unknown`. + for (const type of argon2TypeNameList) { if (algorithm === type) return true; } return false; } +export function isArgon2Options(options: T): options is T extends Argon2Options ? T : never { + if (!isPropAccessible(options) || typeof options !== 'object') return false; + return isArgon2Algorithm(options['algorithm']); +} + function validatePositiveInteger(optionName: string, value: unknown): asserts value { const messageSuffix = ( `The "${optionName}" option must be of positive integers without 0, but received: ${printObject(value)}` @@ -269,11 +253,32 @@ function normalizeInternalError(error: unknown): never { throw new Error(`Internal error from Argon2: ${printObject(error)}`); } -function createDeriveKeyFunc( - type: ArgonType, - options: Omit, -): GetArgon2KDFResult['deriveKey'] { - return async (password, salt, keyLengthBytes) => { +interface Argon2HashOptions extends NormalizedArgon2Options { + password: string | Buffer; + salt: Uint8Array; + hashLength: number; +} +export type Argon2HashFn = (options: Argon2HashOptions) => Promise; + +/** + * For Node.js 18.1.0 and later, use node-argon2 instead of argon2-browser. + * Because argon2-browser fails in Node.js 18.1.0 or later. + * @see https://github.com/antelle/argon2-browser/issues/81 + */ +let argon2Hash: Argon2HashFn = async options => { + const nodeVersionMatch = /^v(\d+)\.(\d+)\./.exec(nodeVersion); + ({ argon2Hash } = await ( + (Number(nodeVersionMatch?.[1]) >= 18 && Number(nodeVersionMatch?.[2]) >= 1) + ? // In Node.js >=18.1.0, use node-argon2 + import('./argon2/node.js') // eslint-disable-line node/no-unsupported-features/es-syntax + : // For Node.js <18.1.0, use argon2-browser + import('./argon2/wasm.js') // eslint-disable-line node/no-unsupported-features/es-syntax + )); + return await argon2Hash(options); +}; + +const createDeriveKeyFunc = (options: NormalizedArgon2Options): GetArgon2KDFResult['deriveKey'] => + async (password, salt, keyLengthBytes) => { validateBetweenByteLength('salt', salt, { min: ARGON2_SALT.MIN, max: ARGON2_SALT.MAX }); validateBetweenLength( 'keyLengthBytes', @@ -288,24 +293,18 @@ function createDeriveKeyFunc( { min: ARGON2_PASSWORD.MIN, max: ARGON2_PASSWORD.MAX }, ); - return await argonHash({ - pass: passwordBufferOrString, + return await argon2Hash({ + ...options, + password: passwordBufferOrString, salt, - time: options.iterations, - mem: options.memory, - hashLen: keyLengthBytes, - parallelism: options.parallelism, - type, + hashLength: keyLengthBytes, }) - .then(({ hash }) => hash) .catch(normalizeInternalError); }; -} export function getArgon2KDF(options: Readonly): GetArgon2KDFResult { const { algorithm, ...argon2Options } = normalizeOptions(defaultOptions, options); - const foundType = argon2TypeMap.get(algorithm); - if (!foundType) { + if (!isArgon2Algorithm(algorithm)) { throw new TypeError( `Invalid Argon2 type received: ${printObject(algorithm, { passThroughString: true })}`, ); @@ -313,7 +312,7 @@ export function getArgon2KDF(options: Readonly): GetArgon2KDFResu validateArgon2Options(argon2Options); return { - deriveKey: createDeriveKeyFunc(foundType.type, argon2Options), + deriveKey: createDeriveKeyFunc({ algorithm, ...argon2Options }), saltLength: SALT_LEN, normalizedOptions: { algorithm, ...argon2Options }, }; diff --git a/packages/encrypted-archive/src/key-derivation-function/argon2/node.ts b/packages/encrypted-archive/src/key-derivation-function/argon2/node.ts new file mode 100644 index 000000000..0e13fbfda --- /dev/null +++ b/packages/encrypted-archive/src/key-derivation-function/argon2/node.ts @@ -0,0 +1,22 @@ +import argon2 from 'argon2'; + +import type { Argon2HashFn } from '../argon2'; + +const typeRecord = { + argon2d: argon2.argon2d, + argon2id: argon2.argon2id, +} as const; + +const argon2Hash: Argon2HashFn = async options => { + return await argon2.hash(options.password, { + salt: Buffer.from(options.salt), + timeCost: options.iterations, + memoryCost: options.memory, + hashLength: options.hashLength, + parallelism: options.parallelism, + type: typeRecord[options.algorithm], + raw: true, + }); +}; + +export { argon2Hash }; diff --git a/packages/encrypted-archive/src/key-derivation-function/argon2/wasm.ts b/packages/encrypted-archive/src/key-derivation-function/argon2/wasm.ts new file mode 100644 index 000000000..bed21db33 --- /dev/null +++ b/packages/encrypted-archive/src/key-derivation-function/argon2/wasm.ts @@ -0,0 +1,23 @@ +import { ArgonType, hash } from 'argon2-browser'; + +import type { Argon2HashFn } from '../argon2'; + +const typeRecord = { + argon2d: ArgonType.Argon2d, + argon2id: ArgonType.Argon2id, +} as const; + +const argon2Hash: Argon2HashFn = async options => { + const result = await hash({ + pass: options.password, + salt: options.salt, + time: options.iterations, + mem: options.memory, + hashLen: options.hashLength, + parallelism: options.parallelism, + type: typeRecord[options.algorithm], + }); + return result.hash; +}; + +export { argon2Hash }; diff --git a/packages/encrypted-archive/src/utils/index.ts b/packages/encrypted-archive/src/utils/index.ts index 33c4b4f4e..0afd1c2f8 100644 --- a/packages/encrypted-archive/src/utils/index.ts +++ b/packages/encrypted-archive/src/utils/index.ts @@ -1,6 +1,5 @@ import { inspect, types } from 'util'; -// @ts-expect-error TS1471: Module '@sounisi5011/ts-utils-is-property-accessible' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead. import { isPropAccessible } from '@sounisi5011/ts-utils-is-property-accessible'; import type { AsyncIterableReturn, objectEntries, PartialWithUndefined } from './type'; diff --git a/packages/encrypted-archive/tests/unit/key-derivation-function.ts b/packages/encrypted-archive/tests/unit/key-derivation-function.ts index 0f3d10a1a..f0a57d18a 100644 --- a/packages/encrypted-archive/tests/unit/key-derivation-function.ts +++ b/packages/encrypted-archive/tests/unit/key-derivation-function.ts @@ -344,22 +344,37 @@ describe('algorithm: Argon2', () => { }); }); - it('internal error', async () => { - const { deriveKey, saltLength } = getKDF({ - algorithm: 'argon2d', - iterations: ARGON2_MIN_TIME, - parallelism: ARGON2_MIN_THREADS, - /** - * This option tells Argon2 to use 1TiB of memory. - * However, at present (May 2021), there is no computer in this world with such a huge memory. - * Therefore, this process will always fail and Argon2's internal error will be output. - */ - memory: 2 ** 40 / 2 ** 10, + if (process.env['CI']) { + /** + * This test is run on CI only. + * When run on a local computer, this test does not work as expected. + * At least it works properly on Ubuntu 20.04 on GitHub Actions. + */ + it('internal error', async () => { + const { deriveKey, saltLength } = getKDF({ + algorithm: 'argon2d', + iterations: ARGON2_MIN_TIME, + parallelism: ARGON2_MIN_THREADS, + /** + * This option tells Argon2 to use 1TiB of memory. + * However, at present (May 2021), there is no computer in this world with such a huge memory. + * Therefore, this process will always fail and Argon2's internal error will be output. + */ + memory: 2 ** 40 / 2 ** 10, + }); + const salt = Buffer.alloc(saltLength); + await expect(deriveKey('', salt, safeKeyLengthBytes)).rejects.toThrowWithMessage( + Error, + /^Internal error from Argon2: /, + ); }); - const salt = Buffer.alloc(saltLength); - await expect(deriveKey('', salt, safeKeyLengthBytes)).rejects.toThrowWithMessage( - Error, - `Internal error from Argon2: Memory cost is too large`, - ); - }); + } else { + /** + * This test case is a dummy + */ + // eslint-disable-next-line jest/no-identical-title, jest/no-disabled-tests + it.skip('internal error', () => { + expect.anything(); + }); + } }); diff --git a/packages/encrypted-archive/tsconfig.json b/packages/encrypted-archive/tsconfig.json index 96b1c3730..535d476b9 100644 --- a/packages/encrypted-archive/tsconfig.json +++ b/packages/encrypted-archive/tsconfig.json @@ -5,6 +5,7 @@ /* Modules */ "rootDir": "./", + "moduleResolution": "Node", "types": [], /* Emit */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 21c94e222..7eb8de4ad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -222,6 +222,7 @@ importers: '@types/jest': 27.5.1 '@types/node': 12.20.52 '@types/varint': 6.0.0 + argon2: 0.27.2 argon2-browser: ^1.15.4 bl: ^5.0.0 bytefield-svg: 1.6.1 @@ -249,6 +250,8 @@ importers: capitalize: 2.0.4 google-protobuf: 3.20.1 varint: 6.0.0 + optionalDependencies: + argon2: 0.27.2 devDependencies: '@jorgeferrero/stream-to-buffer': 2.0.6 '@sounisi5011/jest-binary-data-matchers': link:../jest-matchers/binary-data @@ -1185,6 +1188,25 @@ packages: dev: true optional: true + /@mapbox/node-pre-gyp/1.0.9: + resolution: {integrity: sha512-aDF3S3rK9Q2gey/WAttUlISduDItz5BU3306M9Eyv6/oS40aMprnopshtlKTykxRNIBEZuRMaZAnbrQ4QtKGyw==} + hasBin: true + dependencies: + detect-libc: 2.0.1 + https-proxy-agent: 5.0.1 + make-dir: 3.1.0 + node-fetch: 2.6.7 + nopt: 5.0.0 + npmlog: 5.0.1 + rimraf: 3.0.2 + semver: 7.3.7 + tar: 6.1.11 + transitivePeerDependencies: + - encoding + - supports-color + dev: false + optional: true + /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1291,6 +1313,12 @@ packages: '@octokit/openapi-types': 11.2.0 dev: false + /@phc/format/1.0.0: + resolution: {integrity: sha512-m7X9U6BG2+J+R1lSOdCiITLLrxm+cWlNI3HUFA92oLO77ObGNzaKdh8pMLqdZcshtkKuV84olNNXDfMc4FezBQ==} + engines: {node: '>=10'} + dev: false + optional: true + /@rollup/plugin-typescript/8.3.2_c1be88d918babc0a713f75d188fcb23a: resolution: {integrity: sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==} engines: {node: '>=8.0.0'} @@ -1754,6 +1782,11 @@ packages: resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} dev: false + /abbrev/1.1.1: + resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + dev: false + optional: true + /acorn-jsx/5.3.2_acorn@8.7.1: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1774,6 +1807,16 @@ packages: hasBin: true dev: true + /agent-base/6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + optional: true + /aggregate-error/3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -1865,6 +1908,20 @@ packages: picomatch: 2.3.1 dev: true + /aproba/1.2.0: + resolution: {integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==} + dev: false + optional: true + + /are-we-there-yet/2.0.0: + resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} + engines: {node: '>=10'} + dependencies: + delegates: 1.0.0 + readable-stream: 3.6.0 + dev: false + optional: true + /arg/4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} dev: true @@ -1874,6 +1931,21 @@ packages: resolution: {integrity: sha512-ImVAGIItnFnvET1exhsQB7apRztcoC5TnlSqernMJDUjbc/DLq3UEYeXFrLPrlaIl8cVfwnXb6wX2KpFf2zxHw==} dev: false + /argon2/0.27.2: + resolution: {integrity: sha512-evnzS/Q9rj6ahaaCJjLDoJo9ZuXHhVL2BrBz3wFHb5/i9zAJovBuIY+5t2En7tJjhFXs4O3rUZDeGZxBiDOLwQ==} + engines: {node: '>=10.0.0'} + requiresBuild: true + dependencies: + '@mapbox/node-pre-gyp': 1.0.9 + '@phc/format': 1.0.0 + node-addon-api: 3.2.1 + opencollective-postinstall: 2.0.3 + transitivePeerDependencies: + - encoding + - supports-color + dev: false + optional: true + /argparse/1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: @@ -2187,6 +2259,12 @@ packages: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true + /chownr/2.0.0: + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} + dev: false + optional: true + /ci-info/3.3.1: resolution: {integrity: sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==} dev: true @@ -2275,6 +2353,12 @@ packages: /color-name/1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + /color-support/1.1.3: + resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} + hasBin: true + dev: false + optional: true + /colorette/2.0.16: resolution: {integrity: sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==} dev: true @@ -2351,7 +2435,12 @@ packages: dev: true /concat-map/0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + + /console-control-strings/1.1.0: + resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} + dev: false + optional: true /conventional-commit-types/3.0.0: resolution: {integrity: sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==} @@ -2590,6 +2679,11 @@ packages: object-keys: 1.1.1 dev: true + /delegates/1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + dev: false + optional: true + /deprecation/2.3.1: resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} dev: false @@ -2609,6 +2703,12 @@ packages: engines: {node: '>=8'} dev: true + /detect-libc/2.0.1: + resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==} + engines: {node: '>=8'} + dev: false + optional: true + /detect-newline/3.1.0: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} @@ -2679,7 +2779,6 @@ packages: /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true /emoji-regex/9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} @@ -3372,9 +3471,16 @@ packages: universalify: 0.1.2 dev: true + /fs-minipass/2.1.0: + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.1.6 + dev: false + optional: true + /fs.realpath/1.0.0: resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} - dev: true /fsevents/2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} @@ -3405,6 +3511,22 @@ packages: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true + /gauge/3.0.2: + resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} + engines: {node: '>=10'} + dependencies: + aproba: 1.2.0 + color-support: 1.1.3 + console-control-strings: 1.1.0 + has-unicode: 2.0.1 + object-assign: 4.1.1 + signal-exit: 3.0.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wide-align: 1.1.5 + dev: false + optional: true + /gensync/1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -3509,7 +3631,6 @@ packages: minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 - dev: true /global-dirs/0.1.1: resolution: {integrity: sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=} @@ -3657,6 +3778,11 @@ packages: has-symbols: 1.0.3 dev: true + /has-unicode/2.0.1: + resolution: {integrity: sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=} + dev: false + optional: true + /has/1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} @@ -3692,6 +3818,17 @@ packages: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true + /https-proxy-agent/5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + optional: true + /human-signals/2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -3754,7 +3891,6 @@ packages: dependencies: once: 1.4.0 wrappy: 1.0.2 - dev: true /inherits/2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -3843,7 +3979,6 @@ packages: /is-fullwidth-code-point/3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} - dev: true /is-fullwidth-code-point/4.0.0: resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} @@ -4891,7 +5026,6 @@ packages: engines: {node: '>=8'} dependencies: semver: 6.3.0 - dev: true /make-error/1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} @@ -5014,6 +5148,30 @@ packages: resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} dev: true + /minipass/3.1.6: + resolution: {integrity: sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==} + engines: {node: '>=8'} + dependencies: + yallist: 4.0.0 + dev: false + optional: true + + /minizlib/2.1.2: + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.1.6 + yallist: 4.0.0 + dev: false + optional: true + + /mkdirp/1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: false + optional: true + /ms/2.0.0: resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=} dev: true @@ -5080,6 +5238,11 @@ packages: - supports-color dev: true + /node-addon-api/3.2.1: + resolution: {integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==} + dev: false + optional: true + /node-domexception/1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} @@ -5121,6 +5284,15 @@ packages: type-fest: 0.5.2 dev: true + /nopt/5.0.0: + resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} + engines: {node: '>=6'} + hasBin: true + dependencies: + abbrev: 1.1.1 + dev: false + optional: true + /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -5180,6 +5352,22 @@ packages: path-key: 3.1.1 dev: true + /npmlog/5.0.1: + resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} + dependencies: + are-we-there-yet: 2.0.0 + console-control-strings: 1.1.0 + gauge: 3.0.2 + set-blocking: 2.0.0 + dev: false + optional: true + + /object-assign/4.1.1: + resolution: {integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=} + engines: {node: '>=0.10.0'} + dev: false + optional: true + /object-inspect/1.12.2: resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} @@ -5226,6 +5414,12 @@ packages: mimic-fn: 2.1.0 dev: true + /opencollective-postinstall/2.0.3: + resolution: {integrity: sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==} + hasBin: true + dev: false + optional: true + /optionator/0.9.1: resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} engines: {node: '>= 0.8.0'} @@ -5416,7 +5610,6 @@ packages: /path-is-absolute/1.0.1: resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} engines: {node: '>=0.10.0'} - dev: true /path-key/2.0.1: resolution: {integrity: sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=} @@ -5799,7 +5992,6 @@ packages: hasBin: true dependencies: glob: 7.2.3 - dev: true /rollup-pluginutils/2.8.2: resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==} @@ -5857,7 +6049,6 @@ packages: /semver/6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true - dev: true /semver/7.3.7: resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} @@ -5866,6 +6057,11 @@ packages: dependencies: lru-cache: 6.0.0 + /set-blocking/2.0.0: + resolution: {integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc=} + dev: false + optional: true + /shebang-command/1.2.0: resolution: {integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=} engines: {node: '>=0.10.0'} @@ -6056,7 +6252,6 @@ packages: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - dev: true /string-width/5.1.2: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} @@ -6117,7 +6312,6 @@ packages: engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 - dev: true /strip-ansi/7.0.1: resolution: {integrity: sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==} @@ -6222,6 +6416,19 @@ packages: engines: {node: '>=6'} dev: true + /tar/6.1.11: + resolution: {integrity: sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==} + engines: {node: '>= 10'} + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 3.1.6 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + dev: false + optional: true + /terminal-link/2.1.1: resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==} engines: {node: '>=8'} @@ -6627,6 +6834,13 @@ packages: dependencies: isexe: 2.0.0 + /wide-align/1.1.5: + resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} + dependencies: + string-width: 4.2.3 + dev: false + optional: true + /word-wrap/1.2.3: resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} engines: {node: '>=0.10.0'}