From 486cd9d3be77032ffecd06b4d3b9d6ba8d8b35be Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sun, 16 Jan 2022 16:53:45 -0300 Subject: [PATCH 01/96] Replace request with cross-fetch --- lib/api.js | 58 ++++++++++++++++-------------- lib/file.js | 86 ++++++++++++++++++++------------------------- lib/mutable-file.js | 37 +++++++++---------- package.json | 3 +- 4 files changed, 88 insertions(+), 96 deletions(-) diff --git a/lib/api.js b/lib/api.js index a1a259d..179e45b 100644 --- a/lib/api.js +++ b/lib/api.js @@ -1,6 +1,6 @@ import { EventEmitter } from 'events' -import request from 'request' -import querystring from 'querystring' +import fetch from 'cross-fetch' +const AbortController = globalThis.AbortController || require('abort-controller') const MAX_RETRIES = 4 const ERRORS = { @@ -33,7 +33,12 @@ class API extends EventEmitter { this.keepalive = keepalive this.counterId = Math.random().toString().substr(2, 10) this.gateway = DEFAULT_GATEWAY - this.requestModule = request + } + + // Can be overridden to allow changing how fetching works + // Like fetch it should return a Promise + fetch (url, argv) { + return fetch(url, argv) } request (json, cb, retryno = 0) { @@ -47,21 +52,18 @@ class API extends EventEmitter { delete json._querystring } - this.requestModule({ - uri: `${this.gateway}cs`, - qs, + this.fetch(`${this.gateway}cs?${new URLSearchParams(qs)}`, { method: 'POST', - json: [json], - gzip: true - }, (err, req, resp) => { - if (err) return cb(err) - + headers: {'Content-Type': 'application/json'}, + body: JSON.stringify([ json ]) + }).then(response => response.json()).then(resp => { if (!resp) return cb(Error('Empty response')) // Some error codes are returned as num, some as array with number. if (resp.length) resp = resp[0] - if (!err && (typeof resp === 'number') && resp < 0) { + let err + if ((typeof resp === 'number') && resp < 0) { if (resp === -3) { if (retryno < MAX_RETRIES) { return setTimeout(() => { @@ -76,20 +78,21 @@ class API extends EventEmitter { } } cb(err, resp) + }).catch(err => { + return cb(err) }) } pull (sn, retryno = 0) { - this.sn = this.requestModule({ - uri: `${this.gateway}sc`, - qs: {sn, sid: this.sid}, + const controller = new AbortController() + this.sn = controller + this.fetch(`${this.gateway}sc?${new URLSearchParams({ sn, sid: this.sid })}`, { method: 'POST', - json: true, - body: `sc?${querystring.stringify({ sn })}` - }, (err, req, resp) => { + signal: controller.signal + }).then(response => response.json()).then(resp => { this.sn = undefined - if (!err && (typeof resp === 'number') && resp < 0) { + if ((typeof resp === 'number') && resp < 0) { if (resp === -3) { if (retryno < MAX_RETRIES) { return setTimeout(() => { @@ -97,9 +100,8 @@ class API extends EventEmitter { }, Math.pow(2, retryno + 1) * 1e3) } } - err = Error(ERRORS[-resp]) + throw Error(ERRORS[-resp]) } - if (err) throw err if (resp.w) { this.wait(resp.w, sn) @@ -113,13 +115,15 @@ class API extends EventEmitter { } wait (url, sn) { - this.sn = this.requestModule({ - uri: url, - method: 'POST' - }, (err, req, body) => { + const controller = new AbortController() + this.sn = controller + this.fetch(url, { + method: 'POST', + signal: controller.signal + }).then(() => { + // Body is ignored here + // Errors were ignored in original mega package this.sn = undefined - if (err) throw Error('mega server wait req failed') - this.pull(sn) }) } diff --git a/lib/file.js b/lib/file.js index 4f0a503..889749d 100644 --- a/lib/file.js +++ b/lib/file.js @@ -219,7 +219,6 @@ class File extends EventEmitter { })) const cs = this.api || notLoggedApi - const requestModule = options.requestModule || this.api.requestModule cs.request(req, (err, response) => { if (err) return stream.emit('error', err) @@ -231,8 +230,8 @@ class File extends EventEmitter { if (start > end) return stream.emit('error', Error("You can't download past the end of the file.")) function handleMegaErrors (resp) { - if (resp.statusCode === 200) return - if (resp.statusCode === 509) { + if (resp.status === 200) return + if (resp.status === 509) { const timeLimit = resp.headers['x-mega-time-left'] const error = Error('Bandwidth limit reached: ' + timeLimit + ' seconds until it resets') @@ -250,56 +249,49 @@ class File extends EventEmitter { stream.emit('error', Error('Connection error: ' + err.message)) } - if (maxConnections === 1) { - const r = requestModule(response.g + '/' + apiStart + '-' + end) - r.on('error', handleConnectionErrors) - r.on('response', handleMegaErrors) - r.pipe(decryptStream) + const combined = CombinedStream.create() + let currentOffset = apiStart + let chunkSize = initialChunkSize + let stopped = false - // Abort stream if required - stream.on('close', () => { - r.abort() - }) - } else { - const combined = CombinedStream.create() - let currentOffset = apiStart - let chunkSize = initialChunkSize - let stopped = false - - // Stop the stream on errors and if required - stream.on('error', () => { - stopped = true - }) - stream.on('close', () => { - stopped = true - }) - - const getChunk = function () { - if (stopped) return - const currentMax = Math.min(end, currentOffset + chunkSize - 1) - if (currentMax < currentOffset) return - const r = requestModule(response.g + '/' + currentOffset + '-' + currentMax) - - r.on('end', getChunk) - r.on('error', handleConnectionErrors) - r.on('response', handleMegaErrors) - - combined.append(r) + // Stop the stream on errors and if required + stream.on('error', () => { + stopped = true + }) + stream.on('close', () => { + stopped = true + }) - currentOffset = currentMax + 1 - if (chunkSize < maxChunkSize) { - chunkSize = chunkSize + chunkSizeIncrement - } + const getChunk = function () { + if (stopped) return + const currentMax = Math.min(end, currentOffset + chunkSize - 1) + if (currentMax < currentOffset) return + + const writeStream = new PassThrough() + this.api.fetch(response.g + '/' + currentOffset + '-' + currentMax) + .then(response => { + handleMegaErrors(response) + return response.arrayBuffer() + }).then(data => { + writeStream.end(Buffer.from(data)) + getChunk() + }).catch(handleConnectionErrors) + + combined.append(writeStream) + + currentOffset = currentMax + 1 + if (chunkSize < maxChunkSize) { + chunkSize = chunkSize + chunkSizeIncrement } + } - // Pass errors from the combined stream to the main stream - combined.on('error', (err) => stream.emit('error', err)) + // Pass errors from the combined stream to the main stream + combined.on('error', (err) => stream.emit('error', err)) - for (let i = 0; i < maxConnections; i++) { - getChunk() - } - combined.pipe(decryptStream) + for (let i = 0; i < maxConnections; i++) { + getChunk() } + combined.pipe(decryptStream) let i = 0 stream.on('data', d => { diff --git a/lib/mutable-file.js b/lib/mutable-file.js index 9b41b6d..28f5d26 100644 --- a/lib/mutable-file.js +++ b/lib/mutable-file.js @@ -348,34 +348,29 @@ class MutableFile extends File { } const sendChunk = () => { - const httpreq = this.api.requestModule({ + const httpreq = this.api.fetch(uploadURL + '/' + (type === 0 ? position : (type - 1)), { method: 'POST', - body: uploadBuffer, - uri: uploadURL + '/' + (type === 0 ? position : (type - 1)), - forever: true - }) - - httpreq.on('error', error => { - stream.emit('error', Error('Connection error: ' + error.message)) - }) - - httpreq.on('response', response => { - if (response.statusCode === 200) return - stream.emit('error', Error('MEGA returned a ' + response.statusCode + ' status code')) - }) - - uploadBuffer = null - position += chunkSize - - streamToCb(httpreq, (err, hash) => { - if (err || !hash || hash.length > 0) { + body: uploadBuffer + }).then(response => { + if (response.status !== 200) { + stream.emit('error', Error('MEGA returned a ' + response.statusCode + ' status code')) + return + } + return response.arrayBuffer() + }).then(hash => { + if (!hash || hash.length > 0) { source.end() - cb(err, type, hash, source) + cb(null, type, Buffer.from(hash), source) } else if (position < size && !isReading) { handleChunk() } + }).catch(error => { + stream.emit('error', Error('Connection error: ' + error.message)) }) + uploadBuffer = null + position += chunkSize + if (position < size && !isReading && activeConnections < maxConnections) { handleChunk() } diff --git a/package.json b/package.json index 4ddfd44..84d9656 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,9 @@ ], "license": "MIT", "dependencies": { + "abort-controller": "^3.0.0", "combined-stream": "^1.0.8", - "request": "^2.88.2", + "cross-fetch": "^3.1.4", "secure-random": "^1.1.2", "stream-combiner": "^0.2.2", "stream-skip": "^1.0.3", From 73bebc42fea7e55fefdf433980e5a9457ef82aca Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sun, 16 Jan 2022 17:05:19 -0300 Subject: [PATCH 02/96] Update Standard and fix related issues --- browser/aes.js | 8 +- browser/request.js | 488 ------------------------------------------- browser/rsa.js | 70 +++---- build.js | 35 ++-- lib/api.js | 6 +- lib/crypto/aes.js | 8 +- lib/crypto/rsa.js | 70 +++---- lib/file.js | 57 ++--- lib/mutable-file.js | 28 +-- lib/storage.js | 16 +- lib/util.js | 2 +- package.json | 2 +- test/storage.test.js | 10 +- 13 files changed, 159 insertions(+), 641 deletions(-) delete mode 100644 browser/request.js diff --git a/browser/aes.js b/browser/aes.js index a6993da..ef3fae6 100644 --- a/browser/aes.js +++ b/browser/aes.js @@ -39,7 +39,7 @@ export function prepareKeyV2 (password, info, cb) { name: 'PBKDF2', salt, iterations, - hash: {name: digest} + hash: { name: digest } }, key, 256) }).then(result => { cb(null, Buffer.from(result)) @@ -56,7 +56,7 @@ class AES { encryptCBC (buffer) { let iv = [0, 0, 0, 0] - let d = Array(4) + const d = Array(4) let i, j for (i = 0; i < buffer.length; i += 16) { @@ -174,7 +174,7 @@ class CTR { this.mac = undefined } - let mac = Buffer.alloc(16) + const mac = Buffer.alloc(16) for (let i = 0; i < this.macs.length; i++) { for (let j = 0; j < 16; j++) mac[j] ^= this.macs[i][j] @@ -245,4 +245,4 @@ class CTR { } } -export {AES, CTR} +export { AES, CTR } diff --git a/browser/request.js b/browser/request.js deleted file mode 100644 index 251918b..0000000 --- a/browser/request.js +++ /dev/null @@ -1,488 +0,0 @@ -/* global self */ - -import stream from 'stream' - -// window for normal pages, self for web / service / shared workers -// should crash if both two are undefined, as this script assumes a browser environment -const global = typeof window !== 'undefined' ? window : self - -// Browser Request -// -// Licensed under the Apache License, Version 2.0 (the "License") -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -request.log = { - 'trace': noop, - 'debug': noop, - 'info': noop, - 'warn': noop, - 'error': noop -} - -const DEFAULT_TIMEOUT = 3 * 60 * 1000 // 3 minutes - -// -// request -// - -function request (options, callback) { - if (!options) { - throw Error('No options given') - } - - let optionsOnResponse = options.onResponse // Save this for later. - - if (typeof options === 'string') { - options = {'uri': options} - } else { - options = JSON.parse(JSON.stringify(options)) // Use a duplicate for mutating. - } - - options.onResponse = optionsOnResponse // And put it back. - - if (options.verbose) request.log = getLogger() - - if (options.url) { - options.uri = options.url - delete options.url - } - - if (!options.uri && options.uri !== '') { - throw Error('options.uri is a required argument') - } - - if (typeof options.uri !== 'string') { - throw Error('options.uri must be a string') - } - - const unsupportedOptions = ['proxy', '_redirectsFollowed', 'maxRedirects', 'followRedirect'] - for (let i = 0; i < unsupportedOptions.length; i++) { - if (options[unsupportedOptions[i]]) { - throw Error('options.' + unsupportedOptions[i] + ' is not supported') - } - } - - options.callback = callback || noop - options.method = options.method || 'GET' - options.headers = options.headers || {} - options.body = options.body || null - options.timeout = options.timeout || request.DEFAULT_TIMEOUT - - if (options.headers.host) { - throw Error('Options.headers.host is not supported') - } - - if (options.json) { - options.headers.accept = options.headers.accept || 'application/json' - if (options.method !== 'GET') { - options.headers['content-type'] = 'application/json' - } - - if (typeof options.json !== 'boolean') { - options.body = JSON.stringify(options.json) - } else if (typeof options.body !== 'string') { - options.body = JSON.stringify(options.body) - } - } - - // BEGIN QS Hack - const serialize = (obj) => { - const str = [] - for (let p in obj) { - if (obj.hasOwnProperty(p)) { - str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p])) - } - } - - return str.join('&') - } - - if (options.qs) { - const qs = (typeof options.qs === 'string') ? options.qs : serialize(options.qs) - if (options.uri.indexOf('?') !== -1) { // no get params - options.uri = options.uri + '&' + qs - } else { // existing get params - options.uri = options.uri + '?' + qs - } - } - // END QS Hack - - // BEGIN FORM Hack - const multipart = (obj) => { - // todo: support file type (useful?) - const result = {} - result.boundry = '-------------------------------' + Math.floor(Math.random() * 1000000000) - const lines = [] - for (let p in obj) { - if (obj.hasOwnProperty(p)) { - lines.push( - '--' + result.boundry + '\n' + - 'Content-Disposition: form-data; name="' + p + '"' + '\n' + - '\n' + - obj[p] + '\n' - ) - } - } - lines.push('--' + result.boundry + '--') - result.body = lines.join('') - result.length = result.body.length - result.type = 'multipart/form-data; boundary=' + result.boundry - return result - } - - if (options.form) { - if (typeof options.form === 'string') throw Error('form name unsupported') - if (options.method === 'POST') { - const encoding = (options.encoding || 'application/x-www-form-urlencoded').toLowerCase() - options.headers['content-type'] = encoding - switch (encoding) { - case 'application/x-www-form-urlencoded': - options.body = serialize(options.form).replace(/%20/g, '+') - break - case 'multipart/form-data': - const multi = multipart(options.form) - // options.headers['content-length'] = multi.length - options.body = multi.body - options.headers['content-type'] = multi.type - break - default : throw Error('unsupported encoding:' + encoding) - } - } - } - // END FORM Hack - - // If onResponse is boolean true, call back immediately when the response is known, - // not when the full request is complete. - options.onResponse = options.onResponse || noop - if (options.onResponse === true) { - options.onResponse = callback - options.callback = noop - } - - // HTTP basic authentication - if (!options.headers.authorization && options.auth) { - options.headers.authorization = 'Basic ' + Buffer.from(options.auth.username + ':' + options.auth.password, 'utf-8').toString('base64') - } - - // Only use fetch if it supports streams - if (typeof fetch === 'function' && (typeof ReadableStream === 'function' || !global.XMLHttpRequest)) { - return runFetch(options) - } - return runXhr(options) -} - -let reqSeq = 0 -function runXhr (options) { - const xhr = new global.XMLHttpRequest() - const isCors = isCrossDomain(options.uri) - const supportsCors = ('withCredentials' in xhr) - let timedOut = false - let offset = 0 - - reqSeq += 1 - xhr.seq_id = reqSeq - xhr.id = reqSeq + ': ' + options.method + ' ' + options.uri - xhr._id = xhr.id // I know I will type "_id" from habit all the time. - - if (isCors && !supportsCors) { - const corsErr = new Error('Browser does not support cross-origin request: ' + options.uri) - corsErr.cors = 'unsupported' - return options.callback(corsErr, xhr) - } - - xhr.timeoutTimer = setTimeout(tooLate, options.timeout) - function tooLate () { - timedOut = true - const er = new Error('ETIMEDOUT') - er.code = 'ETIMEDOUT' - er.duration = options.timeout - - request.log.error('Timeout', { 'id': xhr._id, 'milliseconds': options.timeout }) - return options.callback(er, xhr) - } - - // Some states can be skipped over, so remember what is still incomplete. - const did = {response: false, loading: false, end: false} - - xhr.overrideMimeType('text/plain; charset=x-user-defined') - xhr.onreadystatechange = onStateChange - xhr.open(options.method, options.uri, true) // asynchronous - if (isCors) { - xhr.withCredentials = !!options.withCredentials - } - xhr.send(options.body) - - const xhrStream = new stream.Readable() - xhrStream._read = noop - return xhrStream - - function onStateChange (event) { - if (timedOut) { - return request.log.debug('Ignoring timed out state change', {state: xhr.readyState, id: xhr.id}) - } - - request.log.debug('State change', {'state': xhr.readyState, 'id': xhr.id, 'timedOut': timedOut}) - - if (xhr.readyState === global.XMLHttpRequest.OPENED) { - request.log.debug('Request started', {id: xhr.id}) - for (let key in options.headers) { - xhr.setRequestHeader(key, options.headers[key]) - } - } else if (xhr.readyState === global.XMLHttpRequest.HEADERS_RECEIVED) { - onResponse() - } else if (xhr.readyState === global.XMLHttpRequest.LOADING) { - onResponse() - onLoading() - } else if (xhr.readyState === global.XMLHttpRequest.DONE) { - onResponse() - onLoading() - onEnd() - } - } - - function onResponse () { - if (did.response) { return } - - did.response = true - request.log.debug('Got response', {id: xhr.id, status: xhr.status}) - clearTimeout(xhr.timeoutTimer) - xhr.statusCode = xhr.status // Node request compatibility - - // Detect failed CORS requests. - if (isCors && xhr.statusCode === 0) { - const corsErr = new Error('CORS request rejected: ' + options.uri) - corsErr.cors = 'rejected' - - // Do not process this request further. - did.loading = true - did.end = true - - xhrStream.emit('error', corsErr) - - return options.callback(corsErr, xhr) - } - - options.onResponse(null, xhr) - } - - function onLoading () { - if (xhr.response) { - const chunk = xhr.responseText.substr(offset) - offset += chunk.length - - if (chunk.length > 0) { - xhrStream.push(Buffer.from(chunk, 'ascii')) - } - } - - if (did.loading) { return } - - did.loading = true - request.log.debug('Response body loading', {id: xhr.id}) - } - - function onEnd () { - if (did.end) { return } - - did.end = true - request.log.debug('Request done', {id: xhr.id}) - xhrStream.push(null) - - xhr.body = xhr.responseText - if (options.json) { - try { - xhr.body = JSON.parse(xhr.responseText) - } catch (er) { - xhrStream.emit('error', er) - return options.callback(er, xhr) - } - } - - options.callback(null, xhr, xhr.body) - } -} // request - -function runFetch (options) { - const xhr = {} - - reqSeq += 1 - xhr.seq_id = reqSeq - xhr.id = reqSeq + ': ' + options.method + ' ' + options.uri - xhr._id = xhr.id - reqSeq += 1 - - const fetchOptions = {} - if (options.headers) { fetchOptions.headers = options.headers } - if (options.method) { fetchOptions.method = options.method } - if (options.body) { fetchOptions.body = options.body } - - const fetchStream = new stream.Readable() - fetchStream._read = noop - - global.fetch(options.uri || options.url, fetchOptions).then(response => { - xhr.statusCode = xhr.status = response.status - fetchStream.emit('response', { - statusCode: response.status, - statusMessage: response.statusText, - headers: Array.from(response.headers).reduce((obj, [key, value]) => { - obj[key] = value - return obj - }, {}) - }) - - if (options.callback) { - response.clone()[options.json ? 'json' : 'text']() - .then(data => options.callback(null, xhr, data)) - .catch(error => options.callback(error)) - } - - const bodyStream = response.body.getReader() - - readLoop() - function readLoop () { - bodyStream.read().then(function (state) { - if (state.done) { - fetchStream.push(null) - } else { - fetchStream.push(Buffer.from(state.value)) - readLoop() - } - }) - } - }, error => { - fetchStream.emit('error', error) - options.callback(error) - }) - - return fetchStream -} // fetch - -request.withCredentials = false -request.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT - -// -// defaults -// - -request.defaults = (options, requester) => { - const def = (method) => { - const d = (params, callback) => { - if (typeof params === 'string') { - params = {'uri': params} - } else { - params = JSON.parse(JSON.stringify(params)) - } - - for (let i in options) { - if (params[i] === undefined) params[i] = options[i] - } - - return method(params, callback) - } - return d - } - - const de = def(request) - de.get = def(request.get) - de.post = def(request.post) - de.put = def(request.put) - de.head = def(request.head) - - return de -} - -// -// HTTP method shortcuts -// - -const shortcuts = [ 'get', 'put', 'post', 'head' ] -shortcuts.forEach(function (shortcut) { - const method = shortcut.toUpperCase() - const func = shortcut.toLowerCase() - - request[func] = function (opts) { - if (typeof opts === 'string') { - opts = {'method': method, 'uri': opts} - } else { - opts = JSON.parse(JSON.stringify(opts)) - opts.method = method - } - - const args = [opts].concat(Array.prototype.slice.apply(arguments, [1])) - return request.apply(this, args) - } -}) - -// -// Utility -// - -function noop () {} - -function getLogger () { - const logger = {} - const levels = ['trace', 'debug', 'info', 'warn', 'error'] - let level, i - - for (i = 0; i < levels.length; i++) { - level = levels[i] - - logger[level] = noop - if (typeof console !== 'undefined' && console && console[level]) { - logger[level] = formatted(console, level) - } - } - - return logger -} - -function formatted (obj, method) { - return formattedLogger - - function formattedLogger (str, context) { - if (typeof context === 'object') { - str += ' ' + JSON.stringify(context) - } - - return obj[method](str) - } -} - -// Return whether a URL is a cross-domain request. -function isCrossDomain (url) { - const rurl = /^([\w+.-]+:)(?:\/\/([^/?#:]*)(?::(\d+))?)?/ - - // jQuery #8138, IE may throw an exception when accessing - // a field from global.location if document.domain has been set - let ajaxLocation - try { ajaxLocation = global.location.href } catch (e) { - // Use the href attribute of an A element since IE will modify it given document.location - ajaxLocation = document.createElement('a') - ajaxLocation.href = '' - ajaxLocation = ajaxLocation.href - } - - const ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [] - const parts = rurl.exec(url.toLowerCase()) - - const result = !!( - parts && ( - parts[1] !== ajaxLocParts[1] || - parts[2] !== ajaxLocParts[2] || - (parts[3] || (parts[1] === 'http:' ? 80 : 443)) !== (ajaxLocParts[3] || (ajaxLocParts[1] === 'http:' ? 80 : 443)) - ) - ) - - return result -} - -export default request diff --git a/browser/rsa.js b/browser/rsa.js index b0e284b..00317d0 100644 --- a/browser/rsa.js +++ b/browser/rsa.js @@ -107,14 +107,14 @@ function bsub (a, b) { } function ip (w, n, x, y, c) { - let xl = x & bdm - let xh = x >> bd + const xl = x & bdm + const xh = x >> bd - let yl = y & bdm - let yh = y >> bd + const yl = y & bdm + const yh = y >> bd - let m = xh * yl + yh * xl - let l = xl * yl + ((m & bdm) << bd) + w[n] + c + const m = xh * yl + yh * xl + const l = xl * yl + ((m & bdm) << bd) + w[n] + c w[n] = l & bm c = xh * yh + (m >> bd) + (l >> bs) return c @@ -123,9 +123,9 @@ function ip (w, n, x, y, c) { // Multiple-precision squaring, HAC Algorithm 14.16 function bsqr (x) { - let t = x.length - let n = 2 * t - let r = zeros(n) + const t = x.length + const n = 2 * t + const r = zeros(n) let c = 0 let i, j @@ -143,9 +143,9 @@ function bsqr (x) { // Multiple-precision multiplication, HAC Algorithm 14.12 function bmul (x, y) { - let n = x.length - let t = y.length - let r = zeros(n + t - 1) + const n = x.length + const t = y.length + const r = zeros(n + t - 1) let c, i, j for (i = 0; i < t; i++) { @@ -168,9 +168,9 @@ function toppart (x, start, len) { // Multiple-precision division, HAC Algorithm 14.20 function bdiv (a, b) { let n = a.length - 1 - let t = b.length - 1 + const t = b.length - 1 let nmt = n - t - let x, y, qq, xx + let x, qq, xx let i // trivial cases; a < b @@ -195,11 +195,11 @@ function bdiv (a, b) { } // normalize - let shift2 = Math.floor(Math.log(b[t]) / log2) + 1 - let shift = bs - shift2 + const shift2 = Math.floor(Math.log(b[t]) / log2) + 1 + const shift = bs - shift2 x = a.concat() - y = b.concat() + const y = b.concat() if (shift) { for (i = t; i > 0; i--) y[i] = ((y[i] << shift) & bm) | (y[i - 1] >> shift2) @@ -212,7 +212,7 @@ function bdiv (a, b) { } let x2 - let q = zeros(nmt + 1) + const q = zeros(nmt + 1) let y2 = zeros(nmt).concat(y) for (;;) { x2 = bsub(x, y2) @@ -221,8 +221,8 @@ function bdiv (a, b) { x = x2 } - let yt = y[t] - let top = toppart(y, t, 2) + const yt = y[t] + const top = toppart(y, t, 2) let m for (i = n; i > t; i--) { m = i - t - 1 @@ -234,7 +234,7 @@ function bdiv (a, b) { q[m] = Math.floor(toppart(x, i, 2) / yt) } - let topx = toppart(x, i, 3) + const topx = toppart(x, i, 3) while (q[m] * top > topx) q[m]-- // x-=q[m]*y*b^m @@ -275,22 +275,22 @@ function bmod (p, m) { if (m[0] < bdm) return [simplemod(p, m[0])] } - let r = bdiv(p, m) + const r = bdiv(p, m) return r.mod } // Barrett's modular reduction, HAC Algorithm 14.42 function bmod2 (x, m, mu) { - let xl = x.length - (m.length << 1) + const xl = x.length - (m.length << 1) if (xl > 0) return bmod2(x.slice(0, xl).concat(bmod2(x.slice(xl), m, mu)), m, mu) - let ml1 = m.length + 1 - let ml2 = m.length - 1 + const ml1 = m.length + 1 + const ml2 = m.length - 1 let rr - let q3 = bmul(x.slice(ml2), mu).slice(ml1) - let r1 = x.slice(0, ml1) - let r2 = bmul(q3, m).slice(0, ml1) + const q3 = bmul(x.slice(ml2), mu).slice(ml1) + const r1 = x.slice(0, ml1) + const r2 = bmul(q3, m).slice(0, ml1) let r = bsub(r1, r2) if (r.length === 0) { @@ -331,8 +331,8 @@ function bmodexp (g, e, m) { // Compute m**d mod p*q for RSA private key operations. function RSAdecrypt (m, d, p, q, u) { - let xp = bmodexp(bmod(m, p), bmod(d, bsub(p, [1])), p) - let xq = bmodexp(bmod(m, q), bmod(d, bsub(q, [1])), q) + const xp = bmodexp(bmod(m, p), bmod(d, bsub(p, [1])), p) + const xq = bmodexp(bmod(m, q), bmod(d, bsub(q, [1])), q) let t = bsub(xq, xp) if (t.length === 0) { @@ -351,7 +351,7 @@ function RSAdecrypt (m, d, p, q, u) { function mpi2b (s) { let bn = 1 - let r = [0] + const r = [0] let rn = 0 let sb = 256 let sn = s.length @@ -359,8 +359,8 @@ function mpi2b (s) { if (sn < 2) return 0 - let len = (sn - 2) * 8 - let bits = s.charCodeAt(0) * 256 + s.charCodeAt(1) + const len = (sn - 2) * 8 + const bits = s.charCodeAt(0) * 256 + s.charCodeAt(1) if (bits > len || bits < len - 8) return 0 for (let n = 0; n < len; n++) { @@ -381,10 +381,10 @@ function mpi2b (s) { function b2s (b) { let bn = 1 let bc = 0 - let r = [0] + const r = [0] let rb = 1 let rn = 0 - let bits = b.length * bs + const bits = b.length * bs let rr = '' let n diff --git a/build.js b/build.js index 6786e4d..8856dad 100644 --- a/build.js +++ b/build.js @@ -71,14 +71,16 @@ const handleWarning = (warning) => { } const doBundle = (format) => { - const externalConfig = format.bundleExternals ? [] : [ - 'zlib', 'https', 'http', 'crypto', 'fs', 'tls', - 'net', 'string_decoder', 'assert', 'punycode', - 'dns', 'dgram', 'request', 'combined-stream', - 'url', 'through', 'stream-combiner', 'events', - 'secure-random', 'querystring', 'stream', - 'stream-skip' - ] + const externalConfig = format.bundleExternals + ? [] + : [ + 'zlib', 'https', 'http', 'crypto', 'fs', 'tls', + 'net', 'string_decoder', 'assert', 'punycode', + 'dns', 'dgram', 'cross-fetch', 'combined-stream', + 'url', 'through', 'stream-combiner', 'events', + 'secure-random', 'querystring', 'stream', + 'stream-skip' + ] return rollup.rollup({ input: format.entryPoint, @@ -87,7 +89,6 @@ const doBundle = (format) => { plugins: [ format.bundlePolyfills && replace({ values: { - "from 'request'": "from '../browser/request.js'", "from './crypto/rsa'": "from '../browser/rsa.js'", "from './aes'": "from '../../browser/aes.js'" }, @@ -96,9 +97,11 @@ const doBundle = (format) => { commonjs(), format.bundleExternals && builtins(), format.bundleExternals && globals(), - replace({ values: { - 'process.env.IS_BROWSER_BUILD': '' + format.name.includes('browser') - }}), + replace({ + values: { + 'process.env.IS_BROWSER_BUILD': '' + format.name.includes('browser') + } + }), format.bundleExternals && nodeResolve({ jsnext: true, main: true, @@ -128,9 +131,11 @@ const doBundle = (format) => { // Minify using babel-minify result.code = babelTransform(result.code, { // Keep pure annotations on ES modules - shouldPrintComment: options.format === 'es' ? comment => { - return comment === '#__PURE__' - } : undefined, + shouldPrintComment: options.format === 'es' + ? comment => { + return comment === '#__PURE__' + } + : undefined, babelrc: false, presets: [['minify', { mangle: { diff --git a/lib/api.js b/lib/api.js index 179e45b..087e2f1 100644 --- a/lib/api.js +++ b/lib/api.js @@ -42,7 +42,7 @@ class API extends EventEmitter { } request (json, cb, retryno = 0) { - const qs = {id: (this.counterId++).toString()} + const qs = { id: (this.counterId++).toString() } if (this.sid) { qs.sid = this.sid } @@ -54,8 +54,8 @@ class API extends EventEmitter { this.fetch(`${this.gateway}cs?${new URLSearchParams(qs)}`, { method: 'POST', - headers: {'Content-Type': 'application/json'}, - body: JSON.stringify([ json ]) + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify([json]) }).then(response => response.json()).then(resp => { if (!resp) return cb(Error('Empty response')) diff --git a/lib/crypto/aes.js b/lib/crypto/aes.js index 9313739..d2bf36a 100644 --- a/lib/crypto/aes.js +++ b/lib/crypto/aes.js @@ -44,7 +44,7 @@ class AES { const cipher = crypto.createCipheriv('aes-128-cbc', this.key, iv) .setAutoPadding(false) - const result = Buffer.concat([ cipher.update(buffer), cipher.final() ]) + const result = Buffer.concat([cipher.update(buffer), cipher.final()]) result.copy(buffer) return result } @@ -54,7 +54,7 @@ class AES { const decipher = crypto.createDecipheriv('aes-128-cbc', this.key, iv) .setAutoPadding(false) - const result = Buffer.concat([ decipher.update(buffer), decipher.final() ]) + const result = Buffer.concat([decipher.update(buffer), decipher.final()]) result.copy(buffer) return result } @@ -149,7 +149,7 @@ class CTR { let mac = Buffer.alloc(16, 0) - for (let item of this.macs) { + for (const item of this.macs) { for (let j = 0; j < 16; j++) mac[j] ^= item[j] mac = this.macCipher.update(mac) } @@ -212,4 +212,4 @@ class CTR { } } -export {AES, CTR} +export { AES, CTR } diff --git a/lib/crypto/rsa.js b/lib/crypto/rsa.js index b0e284b..00317d0 100644 --- a/lib/crypto/rsa.js +++ b/lib/crypto/rsa.js @@ -107,14 +107,14 @@ function bsub (a, b) { } function ip (w, n, x, y, c) { - let xl = x & bdm - let xh = x >> bd + const xl = x & bdm + const xh = x >> bd - let yl = y & bdm - let yh = y >> bd + const yl = y & bdm + const yh = y >> bd - let m = xh * yl + yh * xl - let l = xl * yl + ((m & bdm) << bd) + w[n] + c + const m = xh * yl + yh * xl + const l = xl * yl + ((m & bdm) << bd) + w[n] + c w[n] = l & bm c = xh * yh + (m >> bd) + (l >> bs) return c @@ -123,9 +123,9 @@ function ip (w, n, x, y, c) { // Multiple-precision squaring, HAC Algorithm 14.16 function bsqr (x) { - let t = x.length - let n = 2 * t - let r = zeros(n) + const t = x.length + const n = 2 * t + const r = zeros(n) let c = 0 let i, j @@ -143,9 +143,9 @@ function bsqr (x) { // Multiple-precision multiplication, HAC Algorithm 14.12 function bmul (x, y) { - let n = x.length - let t = y.length - let r = zeros(n + t - 1) + const n = x.length + const t = y.length + const r = zeros(n + t - 1) let c, i, j for (i = 0; i < t; i++) { @@ -168,9 +168,9 @@ function toppart (x, start, len) { // Multiple-precision division, HAC Algorithm 14.20 function bdiv (a, b) { let n = a.length - 1 - let t = b.length - 1 + const t = b.length - 1 let nmt = n - t - let x, y, qq, xx + let x, qq, xx let i // trivial cases; a < b @@ -195,11 +195,11 @@ function bdiv (a, b) { } // normalize - let shift2 = Math.floor(Math.log(b[t]) / log2) + 1 - let shift = bs - shift2 + const shift2 = Math.floor(Math.log(b[t]) / log2) + 1 + const shift = bs - shift2 x = a.concat() - y = b.concat() + const y = b.concat() if (shift) { for (i = t; i > 0; i--) y[i] = ((y[i] << shift) & bm) | (y[i - 1] >> shift2) @@ -212,7 +212,7 @@ function bdiv (a, b) { } let x2 - let q = zeros(nmt + 1) + const q = zeros(nmt + 1) let y2 = zeros(nmt).concat(y) for (;;) { x2 = bsub(x, y2) @@ -221,8 +221,8 @@ function bdiv (a, b) { x = x2 } - let yt = y[t] - let top = toppart(y, t, 2) + const yt = y[t] + const top = toppart(y, t, 2) let m for (i = n; i > t; i--) { m = i - t - 1 @@ -234,7 +234,7 @@ function bdiv (a, b) { q[m] = Math.floor(toppart(x, i, 2) / yt) } - let topx = toppart(x, i, 3) + const topx = toppart(x, i, 3) while (q[m] * top > topx) q[m]-- // x-=q[m]*y*b^m @@ -275,22 +275,22 @@ function bmod (p, m) { if (m[0] < bdm) return [simplemod(p, m[0])] } - let r = bdiv(p, m) + const r = bdiv(p, m) return r.mod } // Barrett's modular reduction, HAC Algorithm 14.42 function bmod2 (x, m, mu) { - let xl = x.length - (m.length << 1) + const xl = x.length - (m.length << 1) if (xl > 0) return bmod2(x.slice(0, xl).concat(bmod2(x.slice(xl), m, mu)), m, mu) - let ml1 = m.length + 1 - let ml2 = m.length - 1 + const ml1 = m.length + 1 + const ml2 = m.length - 1 let rr - let q3 = bmul(x.slice(ml2), mu).slice(ml1) - let r1 = x.slice(0, ml1) - let r2 = bmul(q3, m).slice(0, ml1) + const q3 = bmul(x.slice(ml2), mu).slice(ml1) + const r1 = x.slice(0, ml1) + const r2 = bmul(q3, m).slice(0, ml1) let r = bsub(r1, r2) if (r.length === 0) { @@ -331,8 +331,8 @@ function bmodexp (g, e, m) { // Compute m**d mod p*q for RSA private key operations. function RSAdecrypt (m, d, p, q, u) { - let xp = bmodexp(bmod(m, p), bmod(d, bsub(p, [1])), p) - let xq = bmodexp(bmod(m, q), bmod(d, bsub(q, [1])), q) + const xp = bmodexp(bmod(m, p), bmod(d, bsub(p, [1])), p) + const xq = bmodexp(bmod(m, q), bmod(d, bsub(q, [1])), q) let t = bsub(xq, xp) if (t.length === 0) { @@ -351,7 +351,7 @@ function RSAdecrypt (m, d, p, q, u) { function mpi2b (s) { let bn = 1 - let r = [0] + const r = [0] let rn = 0 let sb = 256 let sn = s.length @@ -359,8 +359,8 @@ function mpi2b (s) { if (sn < 2) return 0 - let len = (sn - 2) * 8 - let bits = s.charCodeAt(0) * 256 + s.charCodeAt(1) + const len = (sn - 2) * 8 + const bits = s.charCodeAt(0) * 256 + s.charCodeAt(1) if (bits > len || bits < len - 8) return 0 for (let n = 0; n < len; n++) { @@ -381,10 +381,10 @@ function mpi2b (s) { function b2s (b) { let bn = 1 let bc = 0 - let r = [0] + const r = [0] let rb = 1 let rn = 0 - let bits = b.length * bs + const bits = b.length * bs let rr = '' let n diff --git a/lib/file.js b/lib/file.js index 889749d..d474667 100644 --- a/lib/file.js +++ b/lib/file.js @@ -2,7 +2,6 @@ import { e64, d64, AES, formatKey, getCipher, megaDecrypt } from './crypto' import CombinedStream from 'combined-stream' import { API } from './api' import { EventEmitter } from 'events' -import { parse } from 'url' import { streamToCb } from './util' import { PassThrough } from 'stream' import StreamSkip from 'stream-skip' @@ -88,18 +87,20 @@ class File extends EventEmitter { } // todo: nodeId version ('n') - const req = this.directory ? { - a: 'f', - c: 1, - ca: 1, - r: 1, - _querystring: { - n: this.downloadId - } - } : { - a: 'g', - p: this.downloadId - } + const req = this.directory + ? { + a: 'f', + c: 1, + ca: 1, + r: 1, + _querystring: { + n: this.downloadId + } + } + : { + a: 'g', + p: this.downloadId + } this.api.request(req, (err, response) => { if (err) return cb(err) @@ -116,7 +117,7 @@ class File extends EventEmitter { this.timestamp = folder.ts filesMap[folder.h] = this - for (let file of nodes) { + for (const file of nodes) { if (file === folder) continue const fileObj = new File(file, this.storage) fileObj.loadMetadata(aes, file) @@ -126,7 +127,7 @@ class File extends EventEmitter { filesMap[file.h] = fileObj } - for (let file of nodes) { + for (const file of nodes) { const parent = filesMap[file.p] if (parent) { const fileObj = filesMap[file.h] @@ -207,9 +208,9 @@ class File extends EventEmitter { const decryptStream = this.key && !options.returnCiphertext ? megaDecrypt(this.key, { - start: apiStart, - disableVerification: apiStart !== 0 || end !== null - }) + start: apiStart, + disableVerification: apiStart !== 0 || end !== null + }) : new PassThrough() const stream = apiStart === start @@ -266,7 +267,7 @@ class File extends EventEmitter { if (stopped) return const currentMax = Math.min(end, currentOffset + chunkSize - 1) if (currentMax < currentOffset) return - + const writeStream = new PassThrough() this.api.fetch(response.g + '/' + currentOffset + '-' + currentMax) .then(response => { @@ -352,16 +353,16 @@ class File extends EventEmitter { // https://mega.nz/folder/folder_handler#folder_key // https://mega.nz/folder/folder_handler#folder_key/file/file_handler - const url = parse(opt) - if (url.hostname !== 'mega.nz' && url.hostname !== 'mega.co.nz') { throw Error('Invalid URL: wrong hostname') } + const url = new URL(opt) + if (url.hostname !== 'mega.nz' && url.hostname !== 'mega.co.nz') throw Error('Invalid URL: wrong hostname') if (!url.hash) throw Error('Invalid URL: no hash') - if (url.path.match(/\/(file|folder)\//) !== null) { + if (url.pathname.match(/\/(file|folder)\//) !== null) { // new format const split = url.hash.substr(1).split('/file/') - const fileHandler = url.path.substring( - url.path.lastIndexOf('/') + 1, - url.path.length + 1 + const fileHandler = url.pathname.substring( + url.pathname.lastIndexOf('/') + 1, + url.pathname.length + 1 ) const fileKey = split[0] @@ -370,15 +371,15 @@ class File extends EventEmitter { return new File({ downloadId: fileHandler, key: fileKey, - directory: url.path.indexOf('/folder/') >= 0, + directory: url.pathname.indexOf('/folder/') >= 0, loadedFile: split[1] }) } else { // old format const split = url.hash.split('!') - if (split[0] !== '#' && split[0] !== '#F') { throw Error('Invalid URL: format not recognized') } + if (split[0] !== '#' && split[0] !== '#F') throw Error('Invalid URL: format not recognized') if (split.length <= 1) throw Error('Invalid URL: too few arguments') - if (split.length >= (split[0] === '#' ? 4 : 5)) { throw Error('Invalid URL: too many arguments') } + if (split.length >= (split[0] === '#' ? 4 : 5)) throw Error('Invalid URL: too many arguments') return new File({ downloadId: split[1], diff --git a/lib/mutable-file.js b/lib/mutable-file.js index 28f5d26..72e1d90 100644 --- a/lib/mutable-file.js +++ b/lib/mutable-file.js @@ -23,7 +23,7 @@ class MutableFile extends File { const idKeyPairs = opt.k.split('/') let aes = storage.aes - for (let idKeyPair of idKeyPairs) { + for (const idKeyPair of idKeyPairs) { const id = idKeyPair.split(':')[0] if (id === storage.user) { opt.k = idKeyPair @@ -51,7 +51,7 @@ class MutableFile extends File { mkdir (opt, cb) { if (!this.directory) throw Error("node isn't a directory") if (typeof opt === 'string') { - opt = {name: opt} + opt = { name: opt } } if (!opt.attributes) opt.attributes = {} if (opt.name) opt.attributes.n = opt.name @@ -116,7 +116,7 @@ class MutableFile extends File { } if (typeof opt === 'string') { - opt = {name: opt} + opt = { name: opt } } if (!opt.attributes) opt.attributes = {} @@ -282,7 +282,7 @@ class MutableFile extends File { encrypter.encryptCBC(buffer) const pause = through().pause() - let stream = pipeline(pause) + const stream = pipeline(pause) stream.end(buffer) this._uploadWithSize(stream, buffer.length, stream, pause, type, opt, cb) @@ -300,8 +300,8 @@ class MutableFile extends File { _uploadWithSize (stream, size, source, pause, type, opt, cb) { const ssl = (process.env.IS_BROWSER_BUILD || opt.forceHttps) ? 2 : 0 const getUrlRequest = type === 0 - ? {a: 'u', ssl, s: size, ms: 0, r: 0, e: 0, v: 2} - : {a: 'ufa', ssl, s: size} + ? { a: 'u', ssl, s: size, ms: 0, r: 0, e: 0, v: 2 } + : { a: 'ufa', ssl, s: size } if (opt.handle) { getUrlRequest.h = opt.handle @@ -348,7 +348,7 @@ class MutableFile extends File { } const sendChunk = () => { - const httpreq = this.api.fetch(uploadURL + '/' + (type === 0 ? position : (type - 1)), { + this.api.fetch(uploadURL + '/' + (type === 0 ? position : (type - 1)), { method: 'POST', body: uploadBuffer }).then(response => { @@ -379,7 +379,7 @@ class MutableFile extends File { let sizeCheck = 0 source.on('data', data => { sizeCheck += data.length - stream.emit('progress', {bytesLoaded: sizeCheck, bytesTotal: size}) + stream.emit('progress', { bytesLoaded: sizeCheck, bytesTotal: size }) data.copy(uploadBuffer, chunkPos) chunkPos += data.length @@ -441,7 +441,7 @@ class MutableFile extends File { } if (permanent) { - this.api.request({a: 'd', n: this.nodeId}, cb) + this.api.request({ a: 'd', n: this.nodeId }, cb) } else { this.moveTo(this.storage.trash, cb) } @@ -458,7 +458,7 @@ class MutableFile extends File { throw Error('target must be a folder or a nodeId') } - const request = {a: 'm', n: this.nodeId, t: target.nodeId} + const request = { a: 'm', n: this.nodeId, t: target.nodeId } const shares = getShares(this.storage.shareKeys, target) if (shares.length > 0) { request.cr = makeCryptoRequest(this.storage, [this], shares) @@ -475,7 +475,7 @@ class MutableFile extends File { const newAttributes = MutableFile.packAttributes(this.attributes) getCipher(this.key).encryptCBC(newAttributes) - this.api.request({a: 'a', n: this.nodeId, at: e64(newAttributes)}, () => { + this.api.request({ a: 'a', n: this.nodeId, at: e64(newAttributes) }, () => { this.parseAttributes(this.attributes) if (cb) cb() }) @@ -533,7 +533,7 @@ class MutableFile extends File { return this } - this.api.request({a: 'l', n: this.nodeId}, (err, id) => { + this.api.request({ a: 'l', n: this.nodeId }, (err, id) => { if (err) return cb(err) let url = `https://mega.nz/${folderKey ? 'folder' : 'file'}/${id}` @@ -583,7 +583,7 @@ class MutableFile extends File { const request = { a: 's2', n: handler, - s: [{u: 'EXP', r: 0}], + s: [{ u: 'EXP', r: 0 }], ok: e64(this.storage.aes.encryptECB(Buffer.from(shareKey))), ha: e64(authKey), cr: makeCryptoRequest(this.storage, this) @@ -603,7 +603,7 @@ class MutableFile extends File { const request = { a: 's2', n: this.nodeId, - s: [{u: 'EXP', r: ''}] + s: [{ u: 'EXP', r: '' }] } delete this.storage.shareKeys[this.nodeId] diff --git a/lib/storage.js b/lib/storage.js index 30e68c4..3a7b3dc 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -51,7 +51,7 @@ class Storage extends EventEmitter { } const loadUser = (cb) => { - this.api.request({a: 'ug'}, (err, response) => { + this.api.request({ a: 'ug' }, (err, response) => { if (err) return cb(err) this.name = response.name this.user = response.u @@ -78,7 +78,7 @@ class Storage extends EventEmitter { const aes = new AES(pw) const uh = e64(aes.stringhash(Buffer.from(this.email))) - const request = {a: 'us', user: this.email, uh} + const request = { a: 'us', user: this.email, uh } finishLogin(request, aes, cb) } @@ -91,7 +91,7 @@ class Storage extends EventEmitter { const aes = new AES(result.slice(0, 16)) const uh = e64(result.slice(16)) - const request = {a: 'us', user: this.email, uh} + const request = { a: 'us', user: this.email, uh } finishLogin(request, aes, cb) }) } @@ -108,7 +108,7 @@ class Storage extends EventEmitter { const rsaPrivk = cryptoDecodePrivKey(privk) if (!rsaPrivk) throw Error('invalid credentials') - let sid = e64(cryptoRsaDecrypt(t, rsaPrivk).slice(0, 43)) + const sid = e64(cryptoRsaDecrypt(t, rsaPrivk).slice(0, 43)) this.api.sid = this.sid = sid this.RSAPrivateKey = rsaPrivk @@ -117,7 +117,7 @@ class Storage extends EventEmitter { }) } - this.api.request({a: 'us0', user: this.email}, (err, response) => { + this.api.request({ a: 'us0', user: this.email }, (err, response) => { if (err) return cb(err) if (response.v === 1) return handleV1Account(cb) if (response.v === 2) return handleV2Account(response, cb) @@ -133,7 +133,7 @@ class Storage extends EventEmitter { return this.once('ready', this.reload.bind(this, force, cb)) } this.mounts = [] - this.api.request({a: 'f', c: 1}, (err, response) => { + this.api.request({ a: 'f', c: 1 }, (err, response) => { if (err) return cb(err) this.shareKeys = response.ok.reduce((shares, share) => { @@ -221,7 +221,7 @@ class Storage extends EventEmitter { this.mounts.push(file) } if (f.p) { - let parent = this.files[f.p] + const parent = this.files[f.p] // Issue 58: some accounts have orphan files if (parent) { @@ -265,7 +265,7 @@ class Storage extends EventEmitter { } getAccountInfo (cb) { - this.api.request({a: 'uq', strg: 1, xfer: 1, pro: 1}, (err, response) => { + this.api.request({ a: 'uq', strg: 1, xfer: 1, pro: 1 }, (err, response) => { if (err) cb(err) const account = {} diff --git a/lib/util.js b/lib/util.js index f1037b1..d312143 100644 --- a/lib/util.js +++ b/lib/util.js @@ -57,4 +57,4 @@ function detectSize (cb) { }) } -export {streamToCb, chunkSizeSafe, detectSize} +export { streamToCb, chunkSizeSafe, detectSize } diff --git a/package.json b/package.json index 84d9656..0889da5 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "rollup-plugin-node-globals": "^1.4.0", "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-replace": "^2.2.0", - "standard": "^11.0.1", + "standard": "^16.0.4", "tmp": "0.0.33" } } diff --git a/test/storage.test.js b/test/storage.test.js index fd0a78c..8444dd6 100644 --- a/test/storage.test.js +++ b/test/storage.test.js @@ -133,7 +133,7 @@ test.serial.cb('Should download shared files (old format)', t => { t.is(file.size, 16) t.is(file.directory, false) t.is(file.name, 'test file') - t.deepEqual(file.attributes, {n: 'test file'}) + t.deepEqual(file.attributes, { n: 'test file' }) file.download((error, data) => { if (error) throw error @@ -156,7 +156,7 @@ test.serial.cb('Should download shared files (new format)', t => { t.is(file.size, 16) t.is(file.directory, false) t.is(file.name, 'test file') - t.deepEqual(file.attributes, {n: 'test file'}) + t.deepEqual(file.attributes, { n: 'test file' }) file.download((error, data) => { if (error) throw error @@ -261,7 +261,7 @@ test.serial.cb.skip('Should download files shared in folders', t => { t.falsy(folder.size) t.is(folder.directory, true) t.is(folder.name, 'test folder 1') - t.deepEqual(folder.attributes, {n: 'test folder 1'}) + t.deepEqual(folder.attributes, { n: 'test folder 1' }) t.truthy(folder.children) t.is(folder.children.length, 1) @@ -269,7 +269,7 @@ test.serial.cb.skip('Should download files shared in folders', t => { t.falsy(children.size) t.is(children.directory, true) t.is(children.name, 'test folder 2') - t.deepEqual(children.attributes, {n: 'test folder 2'}) + t.deepEqual(children.attributes, { n: 'test folder 2' }) t.truthy(children.children) t.is(children.children.length, 1) @@ -277,7 +277,7 @@ test.serial.cb.skip('Should download files shared in folders', t => { t.is(children.size, 16) t.is(children.directory, false) t.is(children.name, 'test file') - t.deepEqual(children.attributes, {n: 'test file'}) + t.deepEqual(children.attributes, { n: 'test file' }) children.download((error, data) => { if (error) throw error From a5a72466dbadfa1ae7606b5e2785868a9895bba1 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sun, 16 Jan 2022 19:12:11 -0300 Subject: [PATCH 03/96] Replace rollup with esbuild and update ava Now async/await support is required for building. As esbuild do not compile to ES5 old browsers are not supported at this moment. Tests are failing, probably the code that handles uploading got broken in 486cd9d3be77032ffecd06b4d3b9d6ba8d8b35be. --- build.js | 194 +++++----------- package.json | 33 ++- test/crypto-stream.test.js | 148 ++++++------ test/crypto.test.js | 8 +- test/storage.test.js | 456 ++++++++++++++++++++----------------- 5 files changed, 396 insertions(+), 443 deletions(-) diff --git a/build.js b/build.js index 8856dad..078751c 100644 --- a/build.js +++ b/build.js @@ -1,13 +1,5 @@ -const rollup = require('rollup') -const babel = require('rollup-plugin-babel') -const builtins = require('rollup-plugin-node-builtins') -const commonjs = require('rollup-plugin-commonjs') -const globals = require('rollup-plugin-node-globals') -const json = require('rollup-plugin-json') -const nodeResolve = require('rollup-plugin-node-resolve') -const replace = require('rollup-plugin-replace') -const babelTransform = require('@babel/core').transform - +const alias = require('esbuild-plugin-alias') +const esbuild = require('esbuild') const fs = require('fs') // to aid debugging @@ -18,19 +10,20 @@ const formats = [{ // to be loaded with `, which exports the library in the `mega` global variable. You can also use `import * as mega from 'https://unpkg.com/megajs/dist/main.browser-es.js'`. - -**For more details, API documentation and examples check wiki: https://github.com/qgustavor/mega/wiki** - -The bundled files are available via [npm](https://www.npmjs.com/package/megajs) and [UNPKG](https://unpkg.com/megajs/dist/). +**API documentation and examples is available in the website: https://mega.js.org/** **For CLI usage check MEGAJS CLI**: https://github.com/qgustavor/megajs-cli -## Implementation notes +## Contributing -Only part of the file related API is implemented. For now implementing contact and chat functions seems out of scope. +When contributing fork the project: -Cryptography is mostly ported from browser code. In Node some parts are optimized: AES operations are done using native crypto. Sadly WebCrypto don't support streaming so in browser the old pure JavaScript implementation is used. The RSA operations aren't optimized as currently there isn't any need to improve that. +- Clone it; +- Run `npm install`; +- Change the library as you want; +- Build the bundled versions using `npm run build`; +- Run at least Node tests using `npm test node` to test Node; +- Optionally run `npm test deno` to test Deno if you have it installed (CI will test Deno anyway). -This module works in the browser: the "main.browser-umd.js" is a build using the UMD format where Node specific modules, like crypto and request modules, were replaced with browser equivalents. If you want to use tree shaking then use the "main.browser-es.js" bundle. This module wasn't tested in other environments. +Before creating a pull request, *please*, run tests. If you implement new features them implement tests for it too if possible. -## Fork objectives +## Project history This package started as a fork, with the following objectives: @@ -48,6 +37,4 @@ Request package was replaced with a shim based in [browser-request](https://www. As there were many changes there isn't any plan to merge those changes into the original library, unless the original author accept those massive changes. That's why I put "js" in the name, which is silly because both libraries use JavaScript. At least it's better than other ideas I had, like "mega2", "mega-es" and "modern-mega". -## Contributing - -When contributing fork the project, clone it, run `npm install`, change the library as you want, run tests using `npm run test` and build the bundled versions using `npm run build`. Before creating a pull request, *please*, run tests. +In 1.0 release request was replaced with fetch, Deno support was added (including tests), TypeScript types were added, Rollup was replaced with esbuild, streaming libraries were updated or replaced and some issues were fixed. From 23081d663502430ce0bd41cb69ba0db5b6cce98b Mon Sep 17 00:00:00 2001 From: ChampionBuffalo1 Date: Sat, 5 Feb 2022 14:13:10 +0530 Subject: [PATCH 52/96] Added missing types --- index.d.ts | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/index.d.ts b/index.d.ts index 35ce61a..437442b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -21,7 +21,7 @@ declare namespace megajs { sid: string; aes: AES; name: string; - user: any; // Not sure + user: string; email: string; shareKeys: { [nodeId in string]: Buffer }; options: StorageOpts; @@ -31,7 +31,7 @@ declare namespace megajs { inbox: MutableFile; mounts: ReadonlyArray[]; files: { [id in string]: MutableFile }; - RSAPrivateKey: (number | number[])[]; // tsc generated this + RSAPrivateKey: (number | number[])[]; constructor(options: StorageOpts, cb?: errorCb); toJSON(): StorageJSON; close(cb: noop): void; @@ -70,7 +70,7 @@ declare namespace megajs { pull(sn: AbortController, retryno?: number): void; wait(url: fetch.RequestInfo, sn: AbortController): void; defaultFetch(url: fetch.RequestInfo, opts?: fetch.RequestInit): Fetch; - request(json: Object, cb: (error: err, response?: any) => void, retryno?: number): void; + request(json: JSON, cb: (error: err, response?: any) => void, retryno?: number): void; } export class File extends EventEmitter { @@ -80,17 +80,17 @@ declare namespace megajs { label: string; owner?: string; nodeId?: string; - loadedFile?: string; // not entirely sure + loadedFile?: string; downloadId: string; directory: boolean; favorited: boolean; timestamp?: number; key: Nullable; name: Nullable; - attributes: BufferString; + attributes: JSON; constructor(opts: FileOpts); static fromURL(opt: FileOpts | string, extraOpt?: Partial): File; - static unpackAttributes(at: Buffer): void | Object; + static unpackAttributes(at: Buffer): void | JSON; static defaultHandleRetries(tries: number, error: err, cb: errorCb): void; get createdAt(): number; loadAttributes(cb: BufferString): this; @@ -103,20 +103,19 @@ declare namespace megajs { } export class MutableFile extends File { storage: Storage; - static packAttributes(attributes: Object): Buffer; + static packAttributes(attributes: JSON): Buffer; constructor(opts: FileOpts, storage: Storage); mkdir(opts: mkdirOpts | string, cb?: (error: err, file: Nullable) => void): void; upload(opts: uploadOpts | string, source?: BufferString, cb?: uploadCb): Writable; uploadAttribute(type: 0 | 1, data: Buffer, callback?: (error: err, file?: this) => void): void; // Not sure about type of file in delete's cb - delete(permanent?: boolean, cb?: (error: err, file?: File) => void): this; - moveTo(target: File | string, cb?: (error: err, file?: File) => void): this; - setAttributes(attributes: Object, cb?: noop): this; + delete(permanent?: boolean, cb?: (error: err, data?: any) => void): this; + moveTo(target: File | string, cb?: (error: err, data?: any) => void): this; + setAttributes(attributes: JSON, cb?: noop): this; rename(filename: string, cb?: noop): this; setLabel(label: labelType, cb?: noop): this; setFavorite(isFavorite?: boolean, cb?: noop): this; shareFolder(options: linkOpts, cb?: noop): this; - // this method has a option paramteter but never uses it, maybe update this in the file or change it here unshareFolder(cb?: noop): this; importFile(sharedFile: string | File, cb?: (error: err, file?: this) => void): void | this; on(event: 'move', listener: (oldDir: File) => void): this; @@ -135,7 +134,7 @@ declare namespace megajs { encryptECB(buffer: Buffer): Buffer; decryptECB(buffer: Buffer): Buffer; } - // Interfaces & Types + // Interfaces & Type Aliases type labelType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | '' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'grey'; type StorageStatus = 'ready' | 'connecting' | 'closed'; type uploadCb = (error: err, file: MutableFile) => void; @@ -144,10 +143,10 @@ declare namespace megajs { type Nullable = T | null; type err = Nullable; type noop = () => void; - type Fetch = any; // Change this if you can get the type of fetch - interface StorageOpts { + type Fetch = any; // Change this if you can get the types of fetch + interface StorageOpts extends APIOpts { email: string; - password: string; + password: BufferString; autoload?: boolean; autologin?: boolean; keepalive?: boolean; @@ -156,7 +155,7 @@ declare namespace megajs { key: string; sid: string; name: string; - user: any; // Not sure what this is + user: string; options: StorageOpts; } interface APIOpts { @@ -165,10 +164,10 @@ declare namespace megajs { } interface FileOpts { api?: API; - key?: BufferString; + key: BufferString; directory?: boolean; downloadId: string; - loadedFile: string; // Not sure + loadedFile: string; } interface accountInfo { type: string; @@ -182,7 +181,7 @@ declare namespace megajs { interface mkdirOpts { name: string; key?: BufferString; - attributes?: Object; + attributes?: JSON; } interface uploadOpts { name: string; From 688c56b33ae0ce1cc81379cf2c3df78097477171 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sat, 5 Feb 2022 18:02:06 -0300 Subject: [PATCH 53/96] Handle callback, API and sharing issues Setting userAgent to null will disable the user-agent header. At the moment it is needed in Firefox until Mega allows the user-agent header to be set in API requests. User-agent and http agents are correctly accepted as API arguments The unshare file method was implemented. Logout callback is optional as before it didn't had a callback. --- lib/api.mjs | 17 +++++++++++------ lib/mutable-file.mjs | 21 +++++++++++++++++++-- lib/storage.mjs | 11 ++++++++--- 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/lib/api.mjs b/lib/api.mjs index 95334ef..db55aea 100644 --- a/lib/api.mjs +++ b/lib/api.mjs @@ -27,6 +27,8 @@ const ERRORS = { } const DEFAULT_GATEWAY = 'https://g.api.mega.co.nz/' +const DEFAULT_HTTP_AGENT = process.env.IS_BROWSER_BUILD ? null : new HttpAgent({ keepAlive: true }) +const DEFAULT_HTTPS_AGENT = process.env.IS_BROWSER_BUILD ? null : new HttpsAgent({ keepAlive: true }) class API extends EventEmitter { constructor (keepalive, opt = {}) { @@ -37,9 +39,9 @@ class API extends EventEmitter { // Set up a default user agent and keep-alive agent const packageVersion = process.env.PACKAGE_VERSION - this.userAgent = `megajs/${packageVersion}` - this.httpAgent = process.env.IS_BROWSER_BUILD ? null : new HttpAgent({ keepAlive: true }) - this.httpsAgent = process.env.IS_BROWSER_BUILD ? null : new HttpsAgent({ keepAlive: true }) + this.userAgent = opt.userAgent === null ? null : `${opt.userAgent} megajs/${packageVersion}`.trim() + this.httpAgent = opt.httpAgent || DEFAULT_HTTP_AGENT + this.httpsAgent = opt.httpsAgent || DEFAULT_HTTPS_AGENT // Can be overridden to allow changing how fetching works // Like fetch it should return a Promise @@ -51,9 +53,12 @@ class API extends EventEmitter { if (!opts.agent) { opts.agent = url => url.protocol === 'http:' ? this.httpAgent : this.httpsAgent } - if (!opts.headers) opts.headers = {} - if (!opts.headers['user-agent']) opts.headers['user-agent'] = this.userAgent - if (!opts.credentials) opts.credentials = 'same-origin' + + if (this.userAgent) { + if (!opts.headers) opts.headers = {} + if (!opts.headers['user-agent']) opts.headers['user-agent'] = this.userAgent + } + return fetch(url, opts) } diff --git a/lib/mutable-file.mjs b/lib/mutable-file.mjs index c8322f1..93b68a0 100644 --- a/lib/mutable-file.mjs +++ b/lib/mutable-file.mjs @@ -626,7 +626,25 @@ class MutableFile extends File { return this } - unshareFolder (options, cb) { + unshare (cb) { + if (this.directory) return this.unshareFolder(cb) + + const request = { + a: 'l', + n: this.nodeId, + d: 1 + } + + this.api.request(request, () => { + if (cb) cb() + }) + + return this + } + + unshareFolder (cb) { + if (!this.directory) throw Error("node isn't a folder") + const request = { a: 's2', n: this.nodeId, @@ -722,7 +740,6 @@ function makeCryptoRequest (storage, sources, shares) { [] ] - // TODO: optimize - keep track of pre-existing/sent keys, only send new ones for (let i = shares.length; i--;) { const aes = new AES(shareKeys[shares[i]]) diff --git a/lib/storage.mjs b/lib/storage.mjs index 0c3855e..4b41612 100644 --- a/lib/storage.mjs +++ b/lib/storage.mjs @@ -130,7 +130,9 @@ class Storage extends EventEmitter { reload (force, cb) { if (typeof force === 'function') [force, cb] = [cb, force] if (this.status === 'connecting' && !force) { - return this.once('ready', this.reload.bind(this, force, cb)) + return this.once('ready', () => { + this.reload(force, cb) + }) } this.mounts = [] this.api.request({ a: 'f', c: 1 }, (err, response) => { @@ -264,9 +266,12 @@ class Storage extends EventEmitter { // Call the "Session Management Logout" API call this.api.request({ a: 'sml' }, error => { - if (error) return cb(error) + if (error) { + if (cb) cb(error) + return + } this.api.close() - cb() + if (cb) cb() }) } From 849dc738196768137948a53d1fc4c32620454cec Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sat, 5 Feb 2022 18:13:18 -0300 Subject: [PATCH 54/96] Do not prepend undefined to the user-agent --- lib/api.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/api.mjs b/lib/api.mjs index db55aea..5aaa003 100644 --- a/lib/api.mjs +++ b/lib/api.mjs @@ -39,7 +39,10 @@ class API extends EventEmitter { // Set up a default user agent and keep-alive agent const packageVersion = process.env.PACKAGE_VERSION - this.userAgent = opt.userAgent === null ? null : `${opt.userAgent} megajs/${packageVersion}`.trim() + this.userAgent = opt.userAgent === null + ? null + : `${opt.userAgent || ''} megajs/${packageVersion}`.trim() + this.httpAgent = opt.httpAgent || DEFAULT_HTTP_AGENT this.httpsAgent = opt.httpsAgent || DEFAULT_HTTPS_AGENT From e757775139d0bbd9fbfd3aa0820662dc9a6e25a5 Mon Sep 17 00:00:00 2001 From: ChampionBuffalo1 Date: Sun, 6 Feb 2022 16:34:09 +0530 Subject: [PATCH 55/96] Fixed the typings of Fileopts & APIOpts --- index.d.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/index.d.ts b/index.d.ts index 437442b..91534f7 100644 --- a/index.d.ts +++ b/index.d.ts @@ -34,7 +34,7 @@ declare namespace megajs { RSAPrivateKey: (number | number[])[]; constructor(options: StorageOpts, cb?: errorCb); toJSON(): StorageJSON; - close(cb: noop): void; + close(cb?: noop): void; static fromJSON(json: StorageJSON): Storage; mkdir(opt: mkdirOpts | string, cb?: errorCb): void; upload(opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): Writable; @@ -116,6 +116,7 @@ declare namespace megajs { setLabel(label: labelType, cb?: noop): this; setFavorite(isFavorite?: boolean, cb?: noop): this; shareFolder(options: linkOpts, cb?: noop): this; + unshare(cb?: noop): this; unshareFolder(cb?: noop): this; importFile(sharedFile: string | File, cb?: (error: err, file?: this) => void): void | this; on(event: 'move', listener: (oldDir: File) => void): this; @@ -159,15 +160,18 @@ declare namespace megajs { options: StorageOpts; } interface APIOpts { - gateway?: string; fetch?: Fetch; + gateway?: string; + httpAgent?: HttpAgent + httpsAgent?: HttpsAgent + userAgent?: Nullable } - interface FileOpts { + interface FileOpts { api?: API; - key: BufferString; + key?: BufferString; directory?: boolean; downloadId: string; - loadedFile: string; + loadedFile?: string; } interface accountInfo { type: string; From 3c84246c5474e7590fcce2f45644641b32512509 Mon Sep 17 00:00:00 2001 From: ChampionBuffalo1 Date: Sun, 6 Feb 2022 16:36:10 +0530 Subject: [PATCH 56/96] Removed the extra whitespace --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 91534f7..5f72e43 100644 --- a/index.d.ts +++ b/index.d.ts @@ -166,7 +166,7 @@ declare namespace megajs { httpsAgent?: HttpsAgent userAgent?: Nullable } - interface FileOpts { + interface FileOpts { api?: API; key?: BufferString; directory?: boolean; From 6566698692b657c51854415795c59ffa31a2997f Mon Sep 17 00:00:00 2001 From: ChampionBuffalo1 Date: Sun, 6 Feb 2022 16:45:37 +0530 Subject: [PATCH 57/96] Removed useless comments --- index.d.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 5f72e43..3f340ef 100644 --- a/index.d.ts +++ b/index.d.ts @@ -40,8 +40,6 @@ declare namespace megajs { upload(opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): Writable; login(cb: (error: err, storage: this) => void): void; getAccountInfo(cb: (error: err, account: accountInfo) => void): accountInfo; - // "A required parameter cannot follow an optional parameter." - // Do check this because in source code force is the first argument but I had to change the order because of above error reload(cb: (error: err, mount: ReadonlyArray[], force?: boolean) => void): void | this; on(event: 'add', listener: (File: MutableFile) => void): this; on(event: 'move', listener: (file: MutableFile, oldDir: MutableFile) => void): this; @@ -108,7 +106,6 @@ declare namespace megajs { mkdir(opts: mkdirOpts | string, cb?: (error: err, file: Nullable) => void): void; upload(opts: uploadOpts | string, source?: BufferString, cb?: uploadCb): Writable; uploadAttribute(type: 0 | 1, data: Buffer, callback?: (error: err, file?: this) => void): void; - // Not sure about type of file in delete's cb delete(permanent?: boolean, cb?: (error: err, data?: any) => void): this; moveTo(target: File | string, cb?: (error: err, data?: any) => void): this; setAttributes(attributes: JSON, cb?: noop): this; From 5366934f842f38e8f58c20cb1a17745f743ab42e Mon Sep 17 00:00:00 2001 From: ChampionBuffalo1 Date: Sun, 6 Feb 2022 17:46:59 +0530 Subject: [PATCH 58/96] Overloading Storage#reload to keep force as first parameter and optional --- index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 3f340ef..fbf813e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -40,7 +40,8 @@ declare namespace megajs { upload(opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): Writable; login(cb: (error: err, storage: this) => void): void; getAccountInfo(cb: (error: err, account: accountInfo) => void): accountInfo; - reload(cb: (error: err, mount: ReadonlyArray[], force?: boolean) => void): void | this; + reload(cb: (error: err, mount: ReadonlyArray[]) => void): void | this; + reload(force: boolean, cb: (error: err, mount: ReadonlyArray[]) => void): void | this; on(event: 'add', listener: (File: MutableFile) => void): this; on(event: 'move', listener: (file: MutableFile, oldDir: MutableFile) => void): this; on(event: 'ready', listener: (storage: this) => void): this; From a5907d0f58abd531241a4716ec5c931522c6b17b Mon Sep 17 00:00:00 2001 From: ChampionBuffalo1 Date: Sun, 6 Feb 2022 17:56:48 +0530 Subject: [PATCH 59/96] Fixing typings generated by tsc --- index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index fbf813e..f1d1971 100644 --- a/index.d.ts +++ b/index.d.ts @@ -29,7 +29,7 @@ declare namespace megajs { root: MutableFile; trash: MutableFile; inbox: MutableFile; - mounts: ReadonlyArray[]; + mounts: MutableFile[]; files: { [id in string]: MutableFile }; RSAPrivateKey: (number | number[])[]; constructor(options: StorageOpts, cb?: errorCb); @@ -40,8 +40,8 @@ declare namespace megajs { upload(opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): Writable; login(cb: (error: err, storage: this) => void): void; getAccountInfo(cb: (error: err, account: accountInfo) => void): accountInfo; - reload(cb: (error: err, mount: ReadonlyArray[]) => void): void | this; - reload(force: boolean, cb: (error: err, mount: ReadonlyArray[]) => void): void | this; + reload(cb: (error: err, mount: MutableFile[]) => void): void | this; + reload(force: boolean, cb: (error: err, mount: MutableFile[]) => void): void | this; on(event: 'add', listener: (File: MutableFile) => void): this; on(event: 'move', listener: (file: MutableFile, oldDir: MutableFile) => void): this; on(event: 'ready', listener: (storage: this) => void): this; From 4696c9c3332e5384eb859c30f8ceaaba289db841 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sun, 6 Feb 2022 18:20:47 -0300 Subject: [PATCH 60/96] Add promise support and tests Some tests: the only promisied function tested is mkdir and in order to test the other functions mega-mock needs to be updated. --- lib/api.mjs | 10 ++- lib/file.mjs | 19 +++--- lib/mutable-file.mjs | 115 ++++++++++++++++------------------- lib/storage.mjs | 49 ++++++++------- lib/util.mjs | 24 +++++++- test/helpers/test-runner.mjs | 2 +- test/storage.test.mjs | 22 +++++++ 7 files changed, 145 insertions(+), 96 deletions(-) diff --git a/lib/api.mjs b/lib/api.mjs index 5aaa003..65b5c16 100644 --- a/lib/api.mjs +++ b/lib/api.mjs @@ -3,6 +3,7 @@ import { Agent as HttpAgent } from 'http' import { Agent as HttpsAgent } from 'https' import fetch from 'node-fetch' import AbortController from './abort-controller-polyfill.mjs' +import { createPromise } from './util.mjs' const MAX_RETRIES = 4 const ERRORS = { @@ -65,7 +66,9 @@ class API extends EventEmitter { return fetch(url, opts) } - request (json, cb, retryno = 0) { + request (json, originalCb, retryno = 0) { + const [cb, promise] = createPromise(originalCb) + const qs = { id: (this.counterId++).toString() } if (this.sid) { qs.sid = this.sid @@ -103,8 +106,11 @@ class API extends EventEmitter { } cb(err, resp) }).catch(err => { - return cb(err) + cb(err) }) + + // TODO: find a way to simplify this promise->callback->promise chain + return promise } pull (sn, retryno = 0) { diff --git a/lib/file.mjs b/lib/file.mjs index 806bf18..da706e7 100644 --- a/lib/file.mjs +++ b/lib/file.mjs @@ -2,7 +2,7 @@ import { e64, d64, AES, formatKey, getCipher, megaDecrypt } from './crypto/index import MultiStream from 'multistream' import API from './api.mjs' import { EventEmitter } from 'events' -import { streamToCb } from './util.mjs' +import { streamToCb, createPromise } from './util.mjs' import { PassThrough } from 'stream' import StreamSkip from 'stream-skip' import AbortController from './abort-controller-polyfill.mjs' @@ -81,12 +81,8 @@ class File extends EventEmitter { this.favorited = !!at.fav } - loadAttributes (cb) { - if (typeof cb !== 'function') { - cb = err => { - if (err) throw err - } - } + loadAttributes (originalCb) { + const [cb, promise] = createPromise(originalCb) // todo: nodeId version ('n') const req = this.directory @@ -166,7 +162,7 @@ class File extends EventEmitter { } }) - return this + return promise } download (options, cb) { @@ -354,13 +350,14 @@ class File extends EventEmitter { return stream } - link (options, cb) { + link (options, originalCb) { if (arguments.length === 1 && typeof options === 'function') { - cb = options + originalCb = options options = { noKey: false } } + const [cb, promise] = createPromise(originalCb) if (typeof options === 'boolean') { options = { @@ -375,7 +372,9 @@ class File extends EventEmitter { url += `/file/${this.loadedFile}` } + // Is a synchronous function, but returns a promise to keep the same signature as MutableFile cb(null, url) + return promise } static fromURL (opt, extraOpt = {}) { diff --git a/lib/mutable-file.mjs b/lib/mutable-file.mjs index 93b68a0..91bc00d 100644 --- a/lib/mutable-file.mjs +++ b/lib/mutable-file.mjs @@ -3,7 +3,7 @@ import pumpify from 'pumpify' import secureRandom from 'secure-random' import { PassThrough } from 'stream' import { e64, getCipher, megaEncrypt, formatKey, AES, unmergeKeyMac } from './crypto/index.mjs' -import { detectSize, streamToCb, pauseStream } from './util.mjs' +import { detectSize, streamToCb, pauseStream, createPromise } from './util.mjs' const KEY_CACHE = {} @@ -48,8 +48,10 @@ class MutableFile extends File { throw Error('This is not needed for files loaded from logged in sessions') } - mkdir (opt, cb) { + mkdir (opt, originalCb) { if (!this.directory) throw Error("node isn't a directory") + + const [cb, promise] = createPromise(originalCb) if (typeof opt === 'string') { opt = { name: opt } } @@ -95,18 +97,13 @@ class MutableFile extends File { } this.api.request(request, (err, response) => { - if (err) return returnError(err) + if (err) return cb(err) const file = this.storage._importFile(response.f[0]) this.storage.emit('add', file) - - if (cb) { - cb(null, file) - } + cb(null, file) }) - function returnError (e) { - if (cb) cb(e) - } + return promise } upload (opt, source, cb) { @@ -433,7 +430,9 @@ class MutableFile extends File { }) } - uploadAttribute (type, data, callback) { + uploadAttribute (type, data, originalCb) { + const [cb, promise] = createPromise(originalCb) + if (typeof type === 'string') { type = ['thumbnail', 'preview'].indexOf(type) } @@ -443,7 +442,7 @@ class MutableFile extends File { key: this.key, handle: this.nodeId }, data, type + 1, (err, streamType, hash, encrypter) => { - if (err) return callback(err) + if (err) return cb(err) const request = { a: 'pfa', n: this.nodeId, @@ -451,17 +450,20 @@ class MutableFile extends File { } this.api.request(request, (err, response) => { - if (err) return callback(err) - callback(null, this) + if (err) return cb(err) + cb(null, this) }) }) + + return promise } - delete (permanent, cb) { + delete (permanent, originalCb) { if (typeof permanent === 'function') { - cb = permanent + originalCb = permanent permanent = undefined } + const [cb, promise] = createPromise(originalCb) if (typeof permanent === 'undefined') { permanent = this.parent === this.storage.trash @@ -473,10 +475,12 @@ class MutableFile extends File { this.moveTo(this.storage.trash, cb) } - return this + return promise } - moveTo (target, cb) { + moveTo (target, originalCb) { + const [cb, promise] = createPromise(originalCb) + if (typeof target === 'string') { target = this.storage.files[target] } @@ -493,29 +497,28 @@ class MutableFile extends File { this.api.request(request, cb) - return this + return promise } - setAttributes (attributes, cb) { + setAttributes (attributes, originalCb) { + const [cb, promise] = createPromise(originalCb) Object.assign(this.attributes, attributes) const newAttributes = MutableFile.packAttributes(this.attributes) getCipher(this.key).encryptCBC(newAttributes) - this.api.request({ a: 'a', n: this.nodeId, at: e64(newAttributes) }, () => { + this.api.request({ a: 'a', n: this.nodeId, at: e64(newAttributes) }, (error) => { this.parseAttributes(this.attributes) - if (cb) cb() + cb(error) }) - return this + return promise } rename (filename, cb) { - this.setAttributes({ + return this.setAttributes({ n: filename }, cb) - - return this } setLabel (label, cb) { @@ -524,28 +527,25 @@ class MutableFile extends File { throw Error('label must be a integer between 0 and 7 or a valid label name') } - this.setAttributes({ + return this.setAttributes({ lbl: label }, cb) - - return this } setFavorite (isFavorite, cb) { - this.setAttributes({ + return this.setAttributes({ fav: isFavorite ? 1 : 0 }, cb) - - return this } - link (options, cb) { + link (options, originalCb) { if (arguments.length === 1 && typeof options === 'function') { - cb = options + originalCb = options options = { noKey: false } } + const [cb, promise] = createPromise(originalCb) if (typeof options === 'boolean') { options = { @@ -569,11 +569,12 @@ class MutableFile extends File { cb(null, url) }) - return this + return promise } - shareFolder (options, cb) { + shareFolder (options, originalCb) { if (!this.directory) throw Error("node isn't a folder") + const [cb, promise] = createPromise(originalCb) const handler = this.nodeId const storedShareKey = this.storage.shareKeys[handler] @@ -582,7 +583,7 @@ class MutableFile extends File { __folderKey: storedShareKey }, options), cb) - return this + return promise } let shareKey = formatKey(options.key) @@ -599,7 +600,7 @@ class MutableFile extends File { process.nextTick(() => { cb(Error('share key must be 16 byte / 22 characters')) }) - return + return promise } this.storage.shareKeys[handler] = shareKey @@ -623,49 +624,41 @@ class MutableFile extends File { }, options), cb) }) - return this + return promise } unshare (cb) { if (this.directory) return this.unshareFolder(cb) - const request = { + return this.api.request({ a: 'l', n: this.nodeId, d: 1 - } - - this.api.request(request, () => { - if (cb) cb() - }) - - return this + }, cb) } unshareFolder (cb) { if (!this.directory) throw Error("node isn't a folder") + delete this.storage.shareKeys[this.nodeId] - const request = { + return this.api.request({ a: 's2', n: this.nodeId, s: [{ u: 'EXP', r: '' }] - } - - delete this.storage.shareKeys[this.nodeId] - - this.api.request(request, () => { - if (cb) cb() - }) - - return this + }, cb) } - importFile (sharedFile, cb) { + importFile (sharedFile, originalCb) { + const [cb, promise] = createPromise(originalCb) + if (!this.directory) throw Error('importFile can only be called on directories') if (typeof sharedFile === 'string') sharedFile = File.fromURL(sharedFile) if (!(sharedFile instanceof File)) throw Error('First argument of importFile should be a File or a URL string') - if (!sharedFile.key) return cb(Error("Can't import files without encryption keys")) + if (!sharedFile.key) { + cb(Error("Can't import files without encryption keys")) + return promise + } // We need file attributes const afterGotAttributes = (err, file) => { @@ -695,7 +688,7 @@ class MutableFile extends File { const file = this.storage._importFile(response.f[0]) this.storage.emit('add', file) - if (cb) cb(null, file) + cb(null, file) }) } @@ -706,7 +699,7 @@ class MutableFile extends File { sharedFile.loadAttributes(afterGotAttributes) } - return this + return promise } static packAttributes (attributes) { diff --git a/lib/storage.mjs b/lib/storage.mjs index 4b41612..de0948d 100644 --- a/lib/storage.mjs +++ b/lib/storage.mjs @@ -3,6 +3,7 @@ import { cryptoDecodePrivKey, cryptoRsaDecrypt } from './crypto/rsa.mjs' import API from './api.mjs' import { EventEmitter } from 'events' import MutableFile from './mutable-file.mjs' +import { createPromise } from './util.mjs' class Storage extends EventEmitter { constructor (options, cb) { @@ -43,7 +44,9 @@ class Storage extends EventEmitter { this.status = 'closed' } - login (cb) { + login (originalCb) { + const [cb, promise] = createPromise(originalCb) + const ready = () => { this.status = 'ready' cb(null, this) @@ -125,15 +128,20 @@ class Storage extends EventEmitter { }) this.status = 'connecting' + return promise } - reload (force, cb) { - if (typeof force === 'function') [force, cb] = [cb, force] + reload (force, originalCb) { + if (typeof force === 'function') [force, originalCb] = [originalCb, force] + const [cb, promise] = createPromise(originalCb) + if (this.status === 'connecting' && !force) { - return this.once('ready', () => { + this.once('ready', () => { this.reload(force, cb) }) + return promise } + this.mounts = [] this.api.request({ a: 'f', c: 1 }, (err, response) => { if (err) return cb(err) @@ -201,6 +209,8 @@ class Storage extends EventEmitter { file.emit('delete') }) }) + + return promise } _importFile (f) { @@ -238,44 +248,39 @@ class Storage extends EventEmitter { // alternative to this.root.mkdir mkdir (opt, cb) { - // Wait for ready event. if (this.status !== 'ready') { - this.on('ready', () => { - return this.root.mkdir(opt, cb) - }) - return + throw Error('storage is not ready') } return this.root.mkdir(opt, cb) } // alternative to this.root.upload upload (opt, buffer, cb) { - // Wait for ready event. if (this.status !== 'ready') { - this.on('ready', () => { - return this.root.upload(opt, buffer, cb) - }) - return + throw Error('storage is not ready') } return this.root.upload(opt, buffer, cb) } - close (cb) { + close (originalCb) { + const [cb, promise] = createPromise(originalCb) + // Does not handle still connecting or incomplete streams this.status = 'closed' // Call the "Session Management Logout" API call this.api.request({ a: 'sml' }, error => { - if (error) { - if (cb) cb(error) - return - } + if (error) return cb(error) this.api.close() - if (cb) cb() + cb() }) + + return promise } - getAccountInfo (cb) { + getAccountInfo (originalCb) { + const [cb, promise] = createPromise(originalCb) + this.api.request({ a: 'uq', strg: 1, xfer: 1, pro: 1 }, (err, response) => { if (err) cb(err) const account = {} @@ -291,6 +296,8 @@ class Storage extends EventEmitter { cb(null, account) }) + + return promise } toJSON () { diff --git a/lib/util.mjs b/lib/util.mjs index b3942bf..fc4e203 100644 --- a/lib/util.mjs +++ b/lib/util.mjs @@ -86,4 +86,26 @@ function pauseStream (isPaused) { return pause } -export { streamToCb, chunkSizeSafe, detectSize, pauseStream } +// Based on https://github.com/morenyang/create-promise-callback/ +function createPromise (originalCb, multipleArgs) { + let cb + const promise = new Promise((resolve, reject) => { + if (multipleArgs) { + cb = (err, ...args) => { + if (originalCb) originalCb(err, ...args) + if (err) return reject(err) + resolve(args) + } + } else { + cb = (err, arg) => { + if (originalCb) originalCb(err, arg) + if (err) return reject(err) + resolve(arg) + } + } + }) + + return [cb, promise] +} + +export { streamToCb, chunkSizeSafe, detectSize, pauseStream, createPromise } diff --git a/test/helpers/test-runner.mjs b/test/helpers/test-runner.mjs index 56a3e62..403afbd 100644 --- a/test/helpers/test-runner.mjs +++ b/test/helpers/test-runner.mjs @@ -163,7 +163,7 @@ if (testedPlatform === 'node') { if (!wasFailed) { const serverStateSerialized = JSON.stringify(server.state) const serverStateHash = crypto.createHash('blake2b512').update(serverStateSerialized).digest('hex').slice(0, 64) - const expectedStateHash = '26c4b2a6bfad4f31891b927b58c4a8aba9b9b9a7fe2f37eb2d6437aceace4790' + const expectedStateHash = 'c34bc1ab5b67a38e97e427d355d63cfac07e3ab9076357865679fa5cf4f21a88' if (serverStateHash !== expectedStateHash) { console.error('Got server state hash', serverStateHash) diff --git a/test/storage.test.mjs b/test/storage.test.mjs index fbcd5c0..ffbd48f 100644 --- a/test/storage.test.mjs +++ b/test/storage.test.mjs @@ -131,6 +131,19 @@ test.serial('Should download shared files (new format)', t => { }) }) +test.serial('Should load attributes from shared files using promises', async t => { + const file = File.fromURL('https://mega.nz/#!AAAAAAAE!AAAAAAAAAACldyOdMzqeRgAAAAAAAAAApXcjnTM6nkY') + file.api = storage.api + + const loadedFile = await file.loadAttributes() + t.is(file, loadedFile) + + t.is(file.size, 16) + t.is(file.directory, false) + t.is(file.name, 'test file buffer') + t.deepEqual(file.attributes, { n: 'test file buffer' }) +}) + test.serial('Should create folders', t => { return new Promise((resolve, reject) => { storage.mkdir({ @@ -226,6 +239,15 @@ test.serial('Should download empty files', t => { }) }) +test.serial('Should create using promises', async t => { + const folder = await storage.mkdir({ + name: 'test folder promise', + key: Buffer.alloc(16) + }) + + t.is(folder.name, 'test folder promise') +}) + test.serial('Should logout from MEGA', t => { return new Promise((resolve, reject) => { storage.close((error) => { From 6c84c84548c59c418ce72a93e35d3e33c4ff95b9 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sun, 6 Feb 2022 18:36:48 -0300 Subject: [PATCH 61/96] Simplify implementation Functions calling promisified functions don't need extra promisification. The multipleArgs was never used. --- lib/mutable-file.mjs | 22 ++++++---------------- lib/util.mjs | 18 +++++------------- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/lib/mutable-file.mjs b/lib/mutable-file.mjs index 91bc00d..af60810 100644 --- a/lib/mutable-file.mjs +++ b/lib/mutable-file.mjs @@ -458,29 +458,21 @@ class MutableFile extends File { return promise } - delete (permanent, originalCb) { + delete (permanent, cb) { if (typeof permanent === 'function') { - originalCb = permanent + cb = permanent permanent = undefined } - const [cb, promise] = createPromise(originalCb) if (typeof permanent === 'undefined') { permanent = this.parent === this.storage.trash } - if (permanent) { - this.api.request({ a: 'd', n: this.nodeId }, cb) - } else { - this.moveTo(this.storage.trash, cb) - } - - return promise + if (permanent) return this.api.request({ a: 'd', n: this.nodeId }, cb) + return this.moveTo(this.storage.trash, cb) } - moveTo (target, originalCb) { - const [cb, promise] = createPromise(originalCb) - + moveTo (target, cb) { if (typeof target === 'string') { target = this.storage.files[target] } @@ -495,9 +487,7 @@ class MutableFile extends File { request.cr = makeCryptoRequest(this.storage, [this], shares) } - this.api.request(request, cb) - - return promise + return this.api.request(request, cb) } setAttributes (attributes, originalCb) { diff --git a/lib/util.mjs b/lib/util.mjs index fc4e203..b52d750 100644 --- a/lib/util.mjs +++ b/lib/util.mjs @@ -87,21 +87,13 @@ function pauseStream (isPaused) { } // Based on https://github.com/morenyang/create-promise-callback/ -function createPromise (originalCb, multipleArgs) { +function createPromise (originalCb) { let cb const promise = new Promise((resolve, reject) => { - if (multipleArgs) { - cb = (err, ...args) => { - if (originalCb) originalCb(err, ...args) - if (err) return reject(err) - resolve(args) - } - } else { - cb = (err, arg) => { - if (originalCb) originalCb(err, arg) - if (err) return reject(err) - resolve(arg) - } + cb = (err, arg) => { + if (originalCb) originalCb(err, arg) + if (err) return reject(err) + resolve(arg) } }) From 990803119e1fc46cc9d160dd86e6738347b380bb Mon Sep 17 00:00:00 2001 From: ChampionBuffalo1 Date: Mon, 7 Feb 2022 20:51:29 +0530 Subject: [PATCH 62/96] Added Promise type --- index.d.ts | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/index.d.ts b/index.d.ts index f1d1971..d2aaa8d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -31,17 +31,17 @@ declare namespace megajs { inbox: MutableFile; mounts: MutableFile[]; files: { [id in string]: MutableFile }; - RSAPrivateKey: (number | number[])[]; + RSAPrivateKey: (number | number[])[]; constructor(options: StorageOpts, cb?: errorCb); toJSON(): StorageJSON; - close(cb?: noop): void; + close(cb?: noop): Promise; static fromJSON(json: StorageJSON): Storage; mkdir(opt: mkdirOpts | string, cb?: errorCb): void; upload(opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): Writable; - login(cb: (error: err, storage: this) => void): void; - getAccountInfo(cb: (error: err, account: accountInfo) => void): accountInfo; - reload(cb: (error: err, mount: MutableFile[]) => void): void | this; - reload(force: boolean, cb: (error: err, mount: MutableFile[]) => void): void | this; + login(cb: (error: err, storage: this) => void): Promise; + reload(cb: (error: err, mount: MutableFile[]) => void): Promise; + getAccountInfo(cb: (error: err, account: accountInfo) => void): Promise; + reload(force: boolean, cb: (error: err, mount: MutableFile[]) => void): Promise; on(event: 'add', listener: (File: MutableFile) => void): this; on(event: 'move', listener: (file: MutableFile, oldDir: MutableFile) => void): this; on(event: 'ready', listener: (storage: this) => void): this; @@ -69,7 +69,7 @@ declare namespace megajs { pull(sn: AbortController, retryno?: number): void; wait(url: fetch.RequestInfo, sn: AbortController): void; defaultFetch(url: fetch.RequestInfo, opts?: fetch.RequestInit): Fetch; - request(json: JSON, cb: (error: err, response?: any) => void, retryno?: number): void; + request(json: JSON, cb: (error: err, response?: any) => void, retryno?: number): Promise; } export class File extends EventEmitter { @@ -79,44 +79,44 @@ declare namespace megajs { label: string; owner?: string; nodeId?: string; - loadedFile?: string; + attributes: JSON; downloadId: string; + timestamp?: number; directory: boolean; favorited: boolean; - timestamp?: number; + loadedFile?: string; key: Nullable; name: Nullable; - attributes: JSON; - constructor(opts: FileOpts); - static fromURL(opt: FileOpts | string, extraOpt?: Partial): File; + get createdAt(): number; static unpackAttributes(at: Buffer): void | JSON; + static fromURL(opt: FileOpts | string, extraOpt?: Partial): File; static defaultHandleRetries(tries: number, error: err, cb: errorCb): void; - get createdAt(): number; - loadAttributes(cb: BufferString): this; + constructor(opts: FileOpts); + loadAttributes(cb: BufferString): Promise; parseAttributes(at: BufferString): void; decryptAttributes(at: BufferString): this; loadMetadata(aes: AES, opt: metaOpts): void; checkConstructorArgument(value: BufferString): void; - link(options: linkOpts | boolean, cb: (error: err, url: string) => void): void; - download(options: downloadOpts, cb?: (error: err, data: Buffer) => void): Readable; + download(options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Readable; + link(options: linkOpts | boolean, cb: (error: err, url?: string) => void): Promise; } export class MutableFile extends File { storage: Storage; static packAttributes(attributes: JSON): Buffer; constructor(opts: FileOpts, storage: Storage); - mkdir(opts: mkdirOpts | string, cb?: (error: err, file: Nullable) => void): void; - upload(opts: uploadOpts | string, source?: BufferString, cb?: uploadCb): Writable; - uploadAttribute(type: 0 | 1, data: Buffer, callback?: (error: err, file?: this) => void): void; - delete(permanent?: boolean, cb?: (error: err, data?: any) => void): this; - moveTo(target: File | string, cb?: (error: err, data?: any) => void): this; - setAttributes(attributes: JSON, cb?: noop): this; + unshare(cb?: noop): this; + unshareFolder(cb?: noop): this; rename(filename: string, cb?: noop): this; setLabel(label: labelType, cb?: noop): this; + shareFolder(options: linkOpts, cb?: noop): Promise; setFavorite(isFavorite?: boolean, cb?: noop): this; - shareFolder(options: linkOpts, cb?: noop): this; - unshare(cb?: noop): this; - unshareFolder(cb?: noop): this; - importFile(sharedFile: string | File, cb?: (error: err, file?: this) => void): void | this; + setAttributes(attributes: JSON, cb?: noop): Promise; + delete(permanent?: boolean, cb?: (error: err, data?: any) => void): this; + moveTo(target: File | string, cb?: (error: err, data?: any) => void): this; + upload(opts: uploadOpts | string, source?: BufferString, cb?: uploadCb): Writable; + mkdir(opts: mkdirOpts | string, cb?: (error: err, file: Nullable) => void): Promise; + uploadAttribute(type: 0 | 1, data: Buffer, callback?: (error: err, file?: this) => void): Promise; + importFile(sharedFile: string | File, cb?: (error: err, file?: this) => void): Promise; on(event: 'move', listener: (oldDir: File) => void): this; on(event: 'update', listener: (file: MutableFile) => void): this; on(event: 'delete', listener: (file: Readonly) => void): this; From 014ceceb323f785b90ea7491a6a8bd81a186208f Mon Sep 17 00:00:00 2001 From: qgustavor Date: Mon, 7 Feb 2022 12:52:01 -0300 Subject: [PATCH 63/96] Do not leave the promise unhandled when using a callback --- lib/util.mjs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/util.mjs b/lib/util.mjs index b52d750..2b3c6a9 100644 --- a/lib/util.mjs +++ b/lib/util.mjs @@ -91,12 +91,19 @@ function createPromise (originalCb) { let cb const promise = new Promise((resolve, reject) => { cb = (err, arg) => { - if (originalCb) originalCb(err, arg) if (err) return reject(err) resolve(arg) } }) + if (originalCb) { + promise.then(arg => { + originalCb(null, arg) + }, err => { + originalCb(err) + }) + } + return [cb, promise] } From 743d84cbb00e3770944c32950ed588ef33fa0b04 Mon Sep 17 00:00:00 2001 From: ChampionBuffalo1 Date: Tue, 8 Feb 2022 11:25:52 +0530 Subject: [PATCH 64/96] Made cb optional for Promise based methods --- index.d.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/index.d.ts b/index.d.ts index d2aaa8d..6584b83 100644 --- a/index.d.ts +++ b/index.d.ts @@ -37,11 +37,10 @@ declare namespace megajs { close(cb?: noop): Promise; static fromJSON(json: StorageJSON): Storage; mkdir(opt: mkdirOpts | string, cb?: errorCb): void; + login(cb?: (error: err, storage: this) => void): Promise; upload(opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): Writable; - login(cb: (error: err, storage: this) => void): Promise; - reload(cb: (error: err, mount: MutableFile[]) => void): Promise; - getAccountInfo(cb: (error: err, account: accountInfo) => void): Promise; - reload(force: boolean, cb: (error: err, mount: MutableFile[]) => void): Promise; + getAccountInfo(cb?: (error: err, account: accountInfo) => void): Promise; + reload(force?: boolean, cb?: (error: err, mount: MutableFile[]) => void): Promise; on(event: 'add', listener: (File: MutableFile) => void): this; on(event: 'move', listener: (file: MutableFile, oldDir: MutableFile) => void): this; on(event: 'ready', listener: (storage: this) => void): this; @@ -69,7 +68,7 @@ declare namespace megajs { pull(sn: AbortController, retryno?: number): void; wait(url: fetch.RequestInfo, sn: AbortController): void; defaultFetch(url: fetch.RequestInfo, opts?: fetch.RequestInit): Fetch; - request(json: JSON, cb: (error: err, response?: any) => void, retryno?: number): Promise; + request(json: JSON, cb?: (error: err, response?: any) => void, retryno?: number): Promise; } export class File extends EventEmitter { @@ -92,13 +91,13 @@ declare namespace megajs { static fromURL(opt: FileOpts | string, extraOpt?: Partial): File; static defaultHandleRetries(tries: number, error: err, cb: errorCb): void; constructor(opts: FileOpts); - loadAttributes(cb: BufferString): Promise; + loadAttributes(cb?: BufferString): Promise; parseAttributes(at: BufferString): void; decryptAttributes(at: BufferString): this; loadMetadata(aes: AES, opt: metaOpts): void; checkConstructorArgument(value: BufferString): void; download(options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Readable; - link(options: linkOpts | boolean, cb: (error: err, url?: string) => void): Promise; + link(options: linkOpts | boolean, cb?: (error: err, url?: string) => void): Promise; } export class MutableFile extends File { storage: Storage; From e2a0c9b5177a52eb84659d692e4e6fabe16f9aac Mon Sep 17 00:00:00 2001 From: ChampionBuffalo1 Date: Fri, 11 Feb 2022 11:13:00 +0530 Subject: [PATCH 65/96] Fixed wrong types --- index.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 6584b83..bf94f59 100644 --- a/index.d.ts +++ b/index.d.ts @@ -36,7 +36,7 @@ declare namespace megajs { toJSON(): StorageJSON; close(cb?: noop): Promise; static fromJSON(json: StorageJSON): Storage; - mkdir(opt: mkdirOpts | string, cb?: errorCb): void; + mkdir(opt: mkdirOpts | string, cb?: errorCb): Promise; login(cb?: (error: err, storage: this) => void): Promise; upload(opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): Writable; getAccountInfo(cb?: (error: err, account: accountInfo) => void): Promise; @@ -91,7 +91,7 @@ declare namespace megajs { static fromURL(opt: FileOpts | string, extraOpt?: Partial): File; static defaultHandleRetries(tries: number, error: err, cb: errorCb): void; constructor(opts: FileOpts); - loadAttributes(cb?: BufferString): Promise; + loadAttributes(cb?: BufferString): Promise; parseAttributes(at: BufferString): void; decryptAttributes(at: BufferString): this; loadMetadata(aes: AES, opt: metaOpts): void; @@ -114,7 +114,7 @@ declare namespace megajs { moveTo(target: File | string, cb?: (error: err, data?: any) => void): this; upload(opts: uploadOpts | string, source?: BufferString, cb?: uploadCb): Writable; mkdir(opts: mkdirOpts | string, cb?: (error: err, file: Nullable) => void): Promise; - uploadAttribute(type: 0 | 1, data: Buffer, callback?: (error: err, file?: this) => void): Promise; + uploadAttribute(type: uploadAttrType, data: Buffer, cb?: (error: err, file?: this) => void): Promise; importFile(sharedFile: string | File, cb?: (error: err, file?: this) => void): Promise; on(event: 'move', listener: (oldDir: File) => void): this; on(event: 'update', listener: (file: MutableFile) => void): this; @@ -135,6 +135,7 @@ declare namespace megajs { // Interfaces & Type Aliases type labelType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | '' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'grey'; type StorageStatus = 'ready' | 'connecting' | 'closed'; + type uploadAttrType = 0 | 1 | 'thumbnail' | 'preview' type uploadCb = (error: err, file: MutableFile) => void; type errorCb = (error: err) => void; type BufferString = Buffer | string; From 734e1e17e641b03196aac92f74936c79b6db8f64 Mon Sep 17 00:00:00 2001 From: ChampionBuffalo1 Date: Fri, 11 Feb 2022 11:22:39 +0530 Subject: [PATCH 66/96] File returned from mkdir cb wont be null --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index bf94f59..5eda667 100644 --- a/index.d.ts +++ b/index.d.ts @@ -113,7 +113,7 @@ declare namespace megajs { delete(permanent?: boolean, cb?: (error: err, data?: any) => void): this; moveTo(target: File | string, cb?: (error: err, data?: any) => void): this; upload(opts: uploadOpts | string, source?: BufferString, cb?: uploadCb): Writable; - mkdir(opts: mkdirOpts | string, cb?: (error: err, file: Nullable) => void): Promise; + mkdir(opts: mkdirOpts | string, cb?: (error: err, file: MutableFile) => void): Promise; uploadAttribute(type: uploadAttrType, data: Buffer, cb?: (error: err, file?: this) => void): Promise; importFile(sharedFile: string | File, cb?: (error: err, file?: this) => void): Promise; on(event: 'move', listener: (oldDir: File) => void): this; From 4d75545152a83d108a48b8700591b057dee4e9e4 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 11 Feb 2022 12:10:40 -0300 Subject: [PATCH 67/96] Finished implementing promises Also fixed some types --- index.d.ts | 13 +++++++++++-- lib/file.mjs | 8 ++++++++ lib/mutable-file.mjs | 8 ++++++-- lib/storage.mjs | 13 +++++++++---- test/helpers/test-runner.mjs | 2 +- test/storage.test.mjs | 21 +++++++++++++++++++-- 6 files changed, 54 insertions(+), 11 deletions(-) diff --git a/index.d.ts b/index.d.ts index 5eda667..d9ab05e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -32,13 +32,14 @@ declare namespace megajs { mounts: MutableFile[]; files: { [id in string]: MutableFile }; RSAPrivateKey: (number | number[])[]; + ready: Promise; constructor(options: StorageOpts, cb?: errorCb); toJSON(): StorageJSON; close(cb?: noop): Promise; static fromJSON(json: StorageJSON): Storage; mkdir(opt: mkdirOpts | string, cb?: errorCb): Promise; login(cb?: (error: err, storage: this) => void): Promise; - upload(opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): Writable; + upload(opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): UploadStream; getAccountInfo(cb?: (error: err, account: accountInfo) => void): Promise; reload(force?: boolean, cb?: (error: err, mount: MutableFile[]) => void): Promise; on(event: 'add', listener: (File: MutableFile) => void): this; @@ -97,6 +98,7 @@ declare namespace megajs { loadMetadata(aes: AES, opt: metaOpts): void; checkConstructorArgument(value: BufferString): void; download(options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Readable; + downloadBuffer(options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Promise; link(options: linkOpts | boolean, cb?: (error: err, url?: string) => void): Promise; } export class MutableFile extends File { @@ -113,7 +115,7 @@ declare namespace megajs { delete(permanent?: boolean, cb?: (error: err, data?: any) => void): this; moveTo(target: File | string, cb?: (error: err, data?: any) => void): this; upload(opts: uploadOpts | string, source?: BufferString, cb?: uploadCb): Writable; - mkdir(opts: mkdirOpts | string, cb?: (error: err, file: MutableFile) => void): Promise; + mkdir(opts: mkdirOpts | string, cb?: (error: err, file: MutableFile) => void): Promise; uploadAttribute(type: uploadAttrType, data: Buffer, cb?: (error: err, file?: this) => void): Promise; importFile(sharedFile: string | File, cb?: (error: err, file?: this) => void): Promise; on(event: 'move', listener: (oldDir: File) => void): this; @@ -222,6 +224,13 @@ declare namespace megajs { chunkSizeIncrement?: number; handleRetries?: (tries: number, error: err, cb: errorCb) => void; } + interface UploadStream extends Writable { + complete: Promise; + on(event: string, listener: (...args: any[]) => void): this; + on(event: 'complete', listener: (file: MutableFile) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: 'complete', listener: (file: MutableFile) => void): this; + } } export = megajs; diff --git a/lib/file.mjs b/lib/file.mjs index da706e7..6d60aff 100644 --- a/lib/file.mjs +++ b/lib/file.mjs @@ -350,6 +350,14 @@ class File extends EventEmitter { return stream } + // Just wraps the download function as it can't adapted to + // use promises without causing performance issues. + downloadBuffer (options, originalCb) { + const [cb, promise] = createPromise(originalCb) + this.download(options, cb) + return promise + } + link (options, originalCb) { if (arguments.length === 1 && typeof options === 'function') { originalCb = options diff --git a/lib/mutable-file.mjs b/lib/mutable-file.mjs index af60810..9a9c92a 100644 --- a/lib/mutable-file.mjs +++ b/lib/mutable-file.mjs @@ -106,11 +106,12 @@ class MutableFile extends File { return promise } - upload (opt, source, cb) { + upload (opt, source, originalCb) { if (!this.directory) throw Error('node is not a directory') if (arguments.length === 2 && typeof source === 'function') { - [cb, source] = [source, null] + [originalCb, source] = [source, null] } + const [cb, promise] = createPromise(originalCb) if (typeof opt === 'string') { opt = { name: opt } @@ -234,6 +235,9 @@ class MutableFile extends File { } } + // Since it returns a writable stream the promise is made available via .complete, similar to the complete event + stream.complete = promise + return stream } diff --git a/lib/storage.mjs b/lib/storage.mjs index de0948d..31b007c 100644 --- a/lib/storage.mjs +++ b/lib/storage.mjs @@ -6,11 +6,11 @@ import MutableFile from './mutable-file.mjs' import { createPromise } from './util.mjs' class Storage extends EventEmitter { - constructor (options, cb) { + constructor (options, originalCb) { super() if (arguments.length === 1 && typeof options === 'function') { - cb = options + originalCb = options options = {} } @@ -18,13 +18,18 @@ class Storage extends EventEmitter { throw Error("starting a session without credentials isn't supported") } - if (!cb) { - cb = (err) => { + if (!originalCb) { + originalCb = (err) => { // Would be nicer to emit error event? if (err) throw err } } + // Because this is a constructor it can't return a promise + // so the promise is make available via .ready + const [cb, promise] = createPromise(originalCb) + this.ready = promise + // Defaults options.keepalive = options.keepalive === undefined ? true : !!options.keepalive options.autoload = options.autoload === undefined ? true : !!options.autoload diff --git a/test/helpers/test-runner.mjs b/test/helpers/test-runner.mjs index 403afbd..0af3dbd 100644 --- a/test/helpers/test-runner.mjs +++ b/test/helpers/test-runner.mjs @@ -163,7 +163,7 @@ if (testedPlatform === 'node') { if (!wasFailed) { const serverStateSerialized = JSON.stringify(server.state) const serverStateHash = crypto.createHash('blake2b512').update(serverStateSerialized).digest('hex').slice(0, 64) - const expectedStateHash = 'c34bc1ab5b67a38e97e427d355d63cfac07e3ab9076357865679fa5cf4f21a88' + const expectedStateHash = '43e50d922914f368ca1e560cc11bd62fd08faa39973a0aa2f56a5665e6ac9381' if (serverStateHash !== expectedStateHash) { console.error('Got server state hash', serverStateHash) diff --git a/test/storage.test.mjs b/test/storage.test.mjs index ffbd48f..c2fed35 100644 --- a/test/storage.test.mjs +++ b/test/storage.test.mjs @@ -131,7 +131,7 @@ test.serial('Should download shared files (new format)', t => { }) }) -test.serial('Should load attributes from shared files using promises', async t => { +test.serial('Should download shared files using promises', async t => { const file = File.fromURL('https://mega.nz/#!AAAAAAAE!AAAAAAAAAACldyOdMzqeRgAAAAAAAAAApXcjnTM6nkY') file.api = storage.api @@ -142,6 +142,9 @@ test.serial('Should load attributes from shared files using promises', async t = t.is(file.directory, false) t.is(file.name, 'test file buffer') t.deepEqual(file.attributes, { n: 'test file buffer' }) + + const data = await file.downloadBuffer() + t.is(data.toString('hex'), Buffer.alloc(16).toString('hex')) }) test.serial('Should create folders', t => { @@ -239,7 +242,7 @@ test.serial('Should download empty files', t => { }) }) -test.serial('Should create using promises', async t => { +test.serial('Should create folders using promises', async t => { const folder = await storage.mkdir({ name: 'test folder promise', key: Buffer.alloc(16) @@ -248,6 +251,20 @@ test.serial('Should create using promises', async t => { t.is(folder.name, 'test folder promise') }) +test.serial('Should upload files using promises', async t => { + const file = await storage.upload({ + name: 'test file buffer promise', + key: Buffer.alloc(24) + }, Buffer.alloc(16)).complete + + t.is(file.name, 'test file buffer promise') +}) + +test.serial('Should login using promises', async t => { + const promiseResolvedValue = await storage.ready + t.is(promiseResolvedValue, storage) +}) + test.serial('Should logout from MEGA', t => { return new Promise((resolve, reject) => { storage.close((error) => { From aec2760ee886f9196aa4f04d4f15f596a785aa3e Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 11 Feb 2022 12:15:36 -0300 Subject: [PATCH 68/96] 1.0.0-alpha.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78eacef..5b0082a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "0.17.2", + "version": "1.0.0-alpha.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "0.17.2", + "version": "1.0.0-alpha.0", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index 9d1419d..b1585d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "0.17.2", + "version": "1.0.0-alpha.0", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "./index.d.ts", From 3f06b6091e3575afcb2af4040fcbffa1c6a980b1 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 11 Feb 2022 12:52:43 -0300 Subject: [PATCH 69/96] Switch to ts-standard test/helpers/test-runner.mjs had to be ignored again. Also fix some issues ts-standard found. Is a good thing that TypeScript still works without those ugly semicolons :) --- index.d.ts | 400 ++++----- lib/crypto/index.mjs | 6 +- package-lock.json | 1868 ++++++++++++++++++++++++++++++++---------- package.json | 11 +- readme.md | 4 +- tsconfig.json | 7 + 6 files changed, 1636 insertions(+), 660 deletions(-) create mode 100644 tsconfig.json diff --git a/index.d.ts b/index.d.ts index d9ab05e..400545a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,236 +1,236 @@ -/// -import { Readable, Writable, Transform } from 'stream'; -import { EventEmitter } from 'events'; -import { Agent as HttpAgent } from 'http'; -import { Agent as HttpsAgent } from 'https'; +import '@types/node/index.d.ts' +import { Readable, Writable, Transform } from 'stream' +import { EventEmitter } from 'events' +import { Agent as HttpAgent } from 'http' +import { Agent as HttpsAgent } from 'https' import AbortController from 'abort-controller' -import type * as fetch from 'node-fetch'; +import type * as fetch from 'node-fetch' -declare function megajs(options: megajs.StorageOpts, cb?: megajs.errorCb): megajs.Storage; +declare function megajs (options: megajs.StorageOpts, cb?: megajs.errorCb): megajs.Storage declare namespace megajs { - export function megaEncrypt(key: Buffer, options?: cryptOpts): void | Transform; - export function megaDecrypt(key: Buffer, options?: cryptOpts): Transform; - export function megaVerify(key: Buffer): void | Transform; + export function megaEncrypt (key: Buffer, options?: cryptOpts): Transform + export function megaDecrypt (key: Buffer, options?: cryptOpts): Transform + export function megaVerify (key: Buffer): Transform - export class Storage extends EventEmitter { - api: API; - key: Buffer; - sid: string; - aes: AES; - name: string; - user: string; - email: string; - shareKeys: { [nodeId in string]: Buffer }; - options: StorageOpts; - status: StorageStatus; - root: MutableFile; - trash: MutableFile; - inbox: MutableFile; - mounts: MutableFile[]; - files: { [id in string]: MutableFile }; - RSAPrivateKey: (number | number[])[]; - ready: Promise; - constructor(options: StorageOpts, cb?: errorCb); - toJSON(): StorageJSON; - close(cb?: noop): Promise; - static fromJSON(json: StorageJSON): Storage; - mkdir(opt: mkdirOpts | string, cb?: errorCb): Promise; - login(cb?: (error: err, storage: this) => void): Promise; - upload(opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): UploadStream; - getAccountInfo(cb?: (error: err, account: accountInfo) => void): Promise; - reload(force?: boolean, cb?: (error: err, mount: MutableFile[]) => void): Promise; - on(event: 'add', listener: (File: MutableFile) => void): this; - on(event: 'move', listener: (file: MutableFile, oldDir: MutableFile) => void): this; - on(event: 'ready', listener: (storage: this) => void): this; - on(event: 'update', listener: (file: MutableFile) => void): this; - on(event: 'delete', listener: (file: Readonly) => void): this; - once(event: 'add', listener: (File: MutableFile) => void): this; - once(event: 'move', listener: (file: MutableFile, oldDir: MutableFile) => void): this; - once(event: 'ready', listener: (storage: this) => void): this; - once(event: 'update', listener: (file: MutableFile) => void): this; - once(event: 'delete', listener: (file: Readonly) => void): this; - } - export class API extends EventEmitter { - fetch: Fetch; - gateway: string; - counterId: string; - userAgent: string; - keepalive: boolean; - httpAgent: HttpAgent; - httpsAgent: HttpsAgent; - sn?: AbortController; - static globalApi?: API; - static getGlobalApi(): API; - constructor(keepalive: boolean, opts?: APIOpts); - close(): void; - pull(sn: AbortController, retryno?: number): void; - wait(url: fetch.RequestInfo, sn: AbortController): void; - defaultFetch(url: fetch.RequestInfo, opts?: fetch.RequestInit): Fetch; - request(json: JSON, cb?: (error: err, response?: any) => void, retryno?: number): Promise; - } + export class Storage extends EventEmitter { + api: API + key: Buffer + sid: string + aes: AES + name: string + user: string + email: string + shareKeys: { [nodeId in string]: Buffer } + options: StorageOpts + status: StorageStatus + root: MutableFile + trash: MutableFile + inbox: MutableFile + mounts: MutableFile[] + files: { [id in string]: MutableFile } + RSAPrivateKey: Array + ready: Promise + constructor (options: StorageOpts, cb?: errorCb); + toJSON (): StorageJSON; + close (cb?: noop): Promise; + static fromJSON (json: StorageJSON): Storage; + mkdir (opt: mkdirOpts | string, cb?: errorCb): Promise; + login (cb?: (error: err, storage: this) => void): Promise; + upload (opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): UploadStream; + getAccountInfo (cb?: (error: err, account: accountInfo) => void): Promise; + reload (force?: boolean, cb?: (error: err, mount: MutableFile[]) => void): Promise; + on (event: 'add', listener: (File: MutableFile) => void): this; + on (event: 'move', listener: (file: MutableFile, oldDir: MutableFile) => void): this; + on (event: 'ready', listener: (storage: this) => void): this; + on (event: 'update', listener: (file: MutableFile) => void): this; + on (event: 'delete', listener: (file: Readonly) => void): this; + once (event: 'add', listener: (File: MutableFile) => void): this; + once (event: 'move', listener: (file: MutableFile, oldDir: MutableFile) => void): this; + once (event: 'ready', listener: (storage: this) => void): this; + once (event: 'update', listener: (file: MutableFile) => void): this; + once (event: 'delete', listener: (file: Readonly) => void): this; + } + export class API extends EventEmitter { + fetch: Fetch + gateway: string + counterId: string + userAgent: string + keepalive: boolean + httpAgent: HttpAgent + httpsAgent: HttpsAgent + sn?: AbortController + static globalApi?: API + static getGlobalApi (): API; + constructor (keepalive: boolean, opts?: APIOpts); + close (): void; + pull (sn: AbortController, retryno?: number): void; + wait (url: fetch.RequestInfo, sn: AbortController): void; + defaultFetch (url: fetch.RequestInfo, opts?: fetch.RequestInit): Fetch; + request (json: JSON, cb?: (error: err, response?: any) => void, retryno?: number): Promise; + } - export class File extends EventEmitter { - api: API; - type: number; - size?: number; - label: string; - owner?: string; - nodeId?: string; - attributes: JSON; - downloadId: string; - timestamp?: number; - directory: boolean; - favorited: boolean; - loadedFile?: string; - key: Nullable; - name: Nullable; - get createdAt(): number; - static unpackAttributes(at: Buffer): void | JSON; - static fromURL(opt: FileOpts | string, extraOpt?: Partial): File; - static defaultHandleRetries(tries: number, error: err, cb: errorCb): void; - constructor(opts: FileOpts); - loadAttributes(cb?: BufferString): Promise; - parseAttributes(at: BufferString): void; - decryptAttributes(at: BufferString): this; - loadMetadata(aes: AES, opt: metaOpts): void; - checkConstructorArgument(value: BufferString): void; - download(options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Readable; - downloadBuffer(options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Promise; - link(options: linkOpts | boolean, cb?: (error: err, url?: string) => void): Promise; - } - export class MutableFile extends File { - storage: Storage; - static packAttributes(attributes: JSON): Buffer; - constructor(opts: FileOpts, storage: Storage); - unshare(cb?: noop): this; - unshareFolder(cb?: noop): this; - rename(filename: string, cb?: noop): this; - setLabel(label: labelType, cb?: noop): this; - shareFolder(options: linkOpts, cb?: noop): Promise; - setFavorite(isFavorite?: boolean, cb?: noop): this; - setAttributes(attributes: JSON, cb?: noop): Promise; - delete(permanent?: boolean, cb?: (error: err, data?: any) => void): this; - moveTo(target: File | string, cb?: (error: err, data?: any) => void): this; - upload(opts: uploadOpts | string, source?: BufferString, cb?: uploadCb): Writable; - mkdir(opts: mkdirOpts | string, cb?: (error: err, file: MutableFile) => void): Promise; - uploadAttribute(type: uploadAttrType, data: Buffer, cb?: (error: err, file?: this) => void): Promise; - importFile(sharedFile: string | File, cb?: (error: err, file?: this) => void): Promise; - on(event: 'move', listener: (oldDir: File) => void): this; - on(event: 'update', listener: (file: MutableFile) => void): this; - on(event: 'delete', listener: (file: Readonly) => void): this; - once(event: 'move', listener: (oldDir: File) => void): this; - once(event: 'update', listener: (file: MutableFile) => void): this; - once(event: 'delete', listener: (file: Readonly) => void): this; - } - export class AES { - key: Buffer; - constructor(key: Buffer); - encryptCBC(buffer: Buffer): Buffer; - decryptCBC(buffer: Buffer): Buffer; - stringhash(buffer: Buffer): Buffer; - encryptECB(buffer: Buffer): Buffer; - decryptECB(buffer: Buffer): Buffer; - } + export class File extends EventEmitter { + api: API + type: number + size?: number + label: string + owner?: string + nodeId?: string + attributes: JSON + downloadId: string + timestamp?: number + directory: boolean + favorited: boolean + loadedFile?: string + key: Nullable + name: Nullable + get createdAt (): number; + static unpackAttributes (at: Buffer): undefined | JSON; + static fromURL (opt: FileOpts | string, extraOpt?: Partial): File; + static defaultHandleRetries (tries: number, error: err, cb: errorCb): void; + constructor (opts: FileOpts); + loadAttributes (cb?: BufferString): Promise; + parseAttributes (at: BufferString): void; + decryptAttributes (at: BufferString): this; + loadMetadata (aes: AES, opt: metaOpts): void; + checkConstructorArgument (value: BufferString): void; + download (options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Readable; + downloadBuffer (options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Promise; + link (options: linkOpts | boolean, cb?: (error: err, url?: string) => void): Promise; + } + export class MutableFile extends File { + storage: Storage + static packAttributes (attributes: JSON): Buffer; + constructor (opts: FileOpts, storage: Storage); + unshare (cb?: noop): this; + unshareFolder (cb?: noop): this; + rename (filename: string, cb?: noop): this; + setLabel (label: labelType, cb?: noop): this; + shareFolder (options: linkOpts, cb?: noop): Promise; + setFavorite (isFavorite?: boolean, cb?: noop): this; + setAttributes (attributes: JSON, cb?: noop): Promise; + delete (permanent?: boolean, cb?: (error: err, data?: any) => void): this; + moveTo (target: File | string, cb?: (error: err, data?: any) => void): this; + upload (opts: uploadOpts | string, source?: BufferString, cb?: uploadCb): Writable; + mkdir (opts: mkdirOpts | string, cb?: (error: err, file: MutableFile) => void): Promise; + uploadAttribute (type: uploadAttrType, data: Buffer, cb?: (error: err, file?: this) => void): Promise; + importFile (sharedFile: string | File, cb?: (error: err, file?: this) => void): Promise; + on (event: 'move', listener: (oldDir: File) => void): this; + on (event: 'update', listener: (file: MutableFile) => void): this; + on (event: 'delete', listener: (file: Readonly) => void): this; + once (event: 'move', listener: (oldDir: File) => void): this; + once (event: 'update', listener: (file: MutableFile) => void): this; + once (event: 'delete', listener: (file: Readonly) => void): this; + } + export class AES { + key: Buffer + constructor (key: Buffer); + encryptCBC (buffer: Buffer): Buffer; + decryptCBC (buffer: Buffer): Buffer; + stringhash (buffer: Buffer): Buffer; + encryptECB (buffer: Buffer): Buffer; + decryptECB (buffer: Buffer): Buffer; + } // Interfaces & Type Aliases - type labelType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | '' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'grey'; - type StorageStatus = 'ready' | 'connecting' | 'closed'; + type labelType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | '' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'grey' + type StorageStatus = 'ready' | 'connecting' | 'closed' type uploadAttrType = 0 | 1 | 'thumbnail' | 'preview' - type uploadCb = (error: err, file: MutableFile) => void; - type errorCb = (error: err) => void; - type BufferString = Buffer | string; - type Nullable = T | null; - type err = Nullable; - type noop = () => void; - type Fetch = any; // Change this if you can get the types of fetch + type uploadCb = (error: err, file: MutableFile) => void + type errorCb = (error: err) => void + type BufferString = Buffer | string + type Nullable = T | null + type err = Nullable + type noop = () => void + type Fetch = any // Change this if you can get the types of fetch interface StorageOpts extends APIOpts { - email: string; - password: BufferString; - autoload?: boolean; - autologin?: boolean; - keepalive?: boolean; + email: string + password: BufferString + autoload?: boolean + autologin?: boolean + keepalive?: boolean } interface StorageJSON { - key: string; - sid: string; - name: string; - user: string; - options: StorageOpts; + key: string + sid: string + name: string + user: string + options: StorageOpts } interface APIOpts { - fetch?: Fetch; - gateway?: string; - httpAgent?: HttpAgent - httpsAgent?: HttpsAgent - userAgent?: Nullable + fetch?: Fetch + gateway?: string + httpAgent?: HttpAgent + httpsAgent?: HttpsAgent + userAgent?: Nullable } interface FileOpts { - api?: API; - key?: BufferString; - directory?: boolean; - downloadId: string; - loadedFile?: string; + api?: API + key?: BufferString + directory?: boolean + downloadId: string + loadedFile?: string } interface accountInfo { - type: string; - spaceUsed: number; - spaceTotal: number; - downloadBandwidthUsed: number; - downloadBandwidthTotal: number; - sharedBandwidthUsed: number; - sharedBandwidthLimit: number; + type: string + spaceUsed: number + spaceTotal: number + downloadBandwidthUsed: number + downloadBandwidthTotal: number + sharedBandwidthUsed: number + sharedBandwidthLimit: number } interface mkdirOpts { - name: string; - key?: BufferString; - attributes?: JSON; + name: string + key?: BufferString + attributes?: JSON } interface uploadOpts { - name: string; - key?: BufferString; - size?: number; - maxChunkSize?: number; - maxConnections?: number; - initialChunkSize?: number; - chunkSizeIncrement?: number; - previewImage?: Buffer | Readable; - thumbnailImage?: Buffer | Readable; + name: string + key?: BufferString + size?: number + maxChunkSize?: number + maxConnections?: number + initialChunkSize?: number + chunkSizeIncrement?: number + previewImage?: Buffer | Readable + thumbnailImage?: Buffer | Readable } interface cryptOpts { - start?: number; - disableVerification?: boolean; + start?: number + disableVerification?: boolean } interface linkOpts { - noKey?: boolean; - key?: BufferString; + noKey?: boolean + key?: BufferString } interface metaOpts { - k: string; - t: unknown; - s?: number; - ts?: number; - a?: BufferString; + k: string + t: unknown + s?: number + ts?: number + a?: BufferString } interface downloadOpts { - end?: number; - start?: number; - forceHttps?: boolean; - maxChunkSize?: number; - maxConnections?: number; - initialChunkSize?: number; - returnCiphertext?: boolean; - chunkSizeIncrement?: number; - handleRetries?: (tries: number, error: err, cb: errorCb) => void; + end?: number + start?: number + forceHttps?: boolean + maxChunkSize?: number + maxConnections?: number + initialChunkSize?: number + returnCiphertext?: boolean + chunkSizeIncrement?: number + handleRetries?: (tries: number, error: err, cb: errorCb) => void } interface UploadStream extends Writable { - complete: Promise; - on(event: string, listener: (...args: any[]) => void): this; - on(event: 'complete', listener: (file: MutableFile) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: 'complete', listener: (file: MutableFile) => void): this; + complete: Promise + on: (event: string, listener: (...args: any[]) => void) => this + on: (event: 'complete', listener: (file: MutableFile) => void) => this + once: (event: string, listener: (...args: any[]) => void) => this + once: (event: 'complete', listener: (file: MutableFile) => void) => this } } -export = megajs; +export = megajs diff --git a/lib/crypto/index.mjs b/lib/crypto/index.mjs index a9b6a1d..dc5ad0b 100644 --- a/lib/crypto/index.mjs +++ b/lib/crypto/index.mjs @@ -55,9 +55,10 @@ function megaEncrypt (key, options = {}) { }) if (key.length !== 24) { - return process.nextTick(() => { + process.nextTick(() => { stream.emit('error', Error('Wrong key length. Key must be 192bit.')) }) + return stream } const aes = new AES(key.slice(0, 16)) @@ -123,9 +124,10 @@ function megaVerify (key) { }) if (key.length !== 32) { - return process.nextTick(() => { + process.nextTick(() => { stream.emit('error', Error('Wrong key length. Key must be 256bit.')) }) + return stream } const aes = getCipher(key) diff --git a/package-lock.json b/package-lock.json index 5b0082a..43aa3a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,37 +28,134 @@ "mega-mock": "^0.4.1", "readable-stream": "^3.6.0", "regenerator-runtime": "^0.13.9", - "standard": "^17.0.0-2", "tmp-promise": "^3.0.3", + "ts-standard": "^11.0.0", "util": "^0.12.4" } }, - "node_modules/@eslint/eslintrc": { + "node_modules/@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", "dev": true, "dependencies": { "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.2.0", + "debug": "^4.1.1", + "espree": "^7.3.0", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", + "js-yaml": "^3.13.1", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "node_modules/@eslint/eslintrc/node_modules/ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -68,25 +165,13 @@ "node": ">= 4" } }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", + "@humanwhocodes/object-schema": "^1.2.0", "debug": "^4.1.1", "minimatch": "^3.0.4" }, @@ -135,6 +220,12 @@ "node": ">= 8" } }, + "node_modules/@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -157,6 +248,192 @@ "form-data": "^3.0.0" } }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", + "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", + "dev": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "4.33.0", + "@typescript-eslint/scope-manager": "4.33.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/experimental-utils": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", + "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", + "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "debug": "^4.3.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", + "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", + "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "dev": true, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", + "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", + "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -230,6 +507,15 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -527,15 +813,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/ava/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/ava/node_modules/mem": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", @@ -558,32 +835,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/ava/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ava/node_modules/string-width/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ava/node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -1012,39 +1263,6 @@ "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=14" } }, - "node_modules/concordance/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/concordance/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/concordance/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", @@ -1347,13 +1565,25 @@ "once": "^1.4.0" } }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, "dependencies": { - "is-arrayish": "^0.2.1" + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" } }, "node_modules/es-abstract": { @@ -1708,44 +1938,49 @@ } }, "node_modules/eslint": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz", - "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.0.5", - "@humanwhocodes/config-array": "^0.9.2", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.3.2", + "debug": "^4.0.1", "doctrine": "^3.0.0", + "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.2.0", - "espree": "^9.3.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", + "glob-parent": "^5.1.2", "globals": "^13.6.0", - "ignore": "^5.2.0", + "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", + "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -1753,16 +1988,16 @@ "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^10.12.0 || >=12.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-config-standard": { - "version": "17.0.0-1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0-1.tgz", - "integrity": "sha512-aqRG58dqoBNfOLN+PsitasxmW+W9Os4oQrx081B16T4E4WogsSbpUL6hnKSnyv35sSRYA2XjBtKMOrUboL6jgw==", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz", + "integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==", "dev": true, "funding": [ { @@ -1779,16 +2014,16 @@ } ], "peerDependencies": { - "eslint": "^8.0.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-n": "^14.0.0", - "eslint-plugin-promise": "^6.0.0" + "eslint": "^7.12.1", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1 || ^5.0.0" } }, "node_modules/eslint-config-standard-jsx": { - "version": "11.0.0-1", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-11.0.0-1.tgz", - "integrity": "sha512-W70oBgrQ4EOnlqMU4gRhNpoiu7qA6Hnz1trSGHcEwlHLYdH9R+HyeBrClZCnHHNE0jGNHZHbz+BVDhKs4/MRLA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-10.0.0.tgz", + "integrity": "sha512-hLeA2f5e06W1xyr/93/QJulN/rLbUVUmqTlexv9PRKHFwEC9ffJcH2LvJhMoEqYQBEYafedgGZXH2W8NUpt5lA==", "dev": true, "funding": [ { @@ -1805,8 +2040,26 @@ } ], "peerDependencies": { - "eslint": "^8.8.0", - "eslint-plugin-react": "^7.28.0" + "eslint": "^7.12.1", + "eslint-plugin-react": "^7.21.5" + } + }, + "node_modules/eslint-config-standard-with-typescript": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-21.0.1.tgz", + "integrity": "sha512-FeiMHljEJ346Y0I/HpAymNKdrgKEpHpcg/D93FvPHWfCzbT4QyUJba/0FwntZeGLXfUiWDSeKmdJD597d9wwiw==", + "dev": true, + "dependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint-config-standard": "^16.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^4.0.1", + "eslint": "^7.12.1", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1 || ^5.0.0", + "typescript": "^3.9 || ^4.0.0" } }, "node_modules/eslint-import-resolver-node": { @@ -1851,9 +2104,9 @@ } }, "node_modules/eslint-plugin-es": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", - "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", "dev": true, "dependencies": { "eslint-utils": "^2.0.0", @@ -1947,40 +2200,69 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "node_modules/eslint-plugin-n": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-14.0.0.tgz", - "integrity": "sha512-mNwplPLsbaKhHyA0fa/cy8j+oF6bF6l81hzBTWa6JOvPcMNAuIogk2ih6d9tYvWYzyUG+7ZFeChqbzdFpg2QrQ==", + "node_modules/eslint-plugin-node": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", + "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", "dev": true, "dependencies": { - "eslint-plugin-es": "^4.1.0", - "eslint-utils": "^3.0.0", + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", "ignore": "^5.1.1", - "is-core-module": "^2.3.0", "minimatch": "^3.0.4", "resolve": "^1.10.1", "semver": "^6.1.0" }, "engines": { - "node": ">=12.22.0" + "node": ">=8.10.0" + }, + "peerDependencies": { + "eslint": ">=5.16.0" + } + }, + "node_modules/eslint-plugin-node/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-node/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-node/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" } }, "node_modules/eslint-plugin-promise": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", - "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.2.0.tgz", + "integrity": "sha512-SftLb1pUG01QYq2A/hGAWfDRXqYD82zE7j7TopDOyNdU+7SvvoXREls/+PRTY17vUXzXnZA/zfnyKgRH6x4JJw==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^10.12.0 || >=12.0.0" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^7.0.0" } }, "node_modules/eslint-plugin-react": { @@ -2036,17 +2318,35 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/eslint-plugin-react/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "estraverse": "^4.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=8.0.0" + } + }, + "node_modules/eslint-scope/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" } }, "node_modules/eslint-utils": { @@ -2067,7 +2367,7 @@ "eslint": ">=5" } }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "node_modules/eslint-visitor-keys": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", @@ -2076,43 +2376,37 @@ "node": ">=10" } }, - "node_modules/eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "node_modules/eslint/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, "engines": { - "node": ">=10.13.0" + "node": ">=4" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/eslint/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">= 4" } }, "node_modules/eslint/node_modules/strip-ansi": { @@ -2128,17 +2422,38 @@ } }, "node_modules/espree": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", - "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "dependencies": { - "acorn": "^8.7.0", + "acorn": "^7.4.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=0.4.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" } }, "node_modules/esprima": { @@ -2472,9 +2787,9 @@ } }, "node_modules/globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2825,6 +3140,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-generator-function": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", @@ -3174,6 +3498,12 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -3186,6 +3516,18 @@ "loose-envify": "cli.js" } }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -3885,6 +4227,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -4018,6 +4369,15 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", @@ -4138,12 +4498,18 @@ "integrity": "sha512-H2bdSKERKdBV1SwoqYm6C0y+9EA94v6SUBOWO8kDndc4NoUih7Dv6Tsgma7zO1lv27wIvjlD0ZpMQk7um5dheQ==" }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/serialize-error": { @@ -4296,46 +4662,10 @@ "node": ">=8" } }, - "node_modules/standard": { - "version": "17.0.0-2", - "resolved": "https://registry.npmjs.org/standard/-/standard-17.0.0-2.tgz", - "integrity": "sha512-BMJ8LhqqzmFDq1OAYgi2WIWPHA3PTjxqKpQQtgefKq3HEjlBerRt4rDxDfhmSLVDNJ7TPcFfu+H/CKEjT/g7Iw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "eslint": "^8.8.0", - "eslint-config-standard": "17.0.0-1", - "eslint-config-standard-jsx": "11.0.0-1", - "eslint-plugin-import": "^2.25.4", - "eslint-plugin-n": "^14.0.0", - "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-react": "^7.28.0", - "standard-engine": "^15.0.0-0" - }, - "bin": { - "standard": "bin/cmd.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/standard-engine": { - "version": "15.0.0-0", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-15.0.0-0.tgz", - "integrity": "sha512-EIwn81ncVakHtpktp+IBtSK+54T5l/d2NERnNYg0+SdEu4+CLcAtAKbpFVTkp/F7bPWrZgOaddY/Pfpgy7HreQ==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-14.0.1.tgz", + "integrity": "sha512-7FEzDwmHDOGva7r9ifOzD3BGdTbA7ujJ50afLVdW/tK14zQEptJjbFuUfn50irqdHDcTbNh0DTIoMPynMCXb0Q==", "dev": true, "funding": [ { @@ -4358,7 +4688,7 @@ "xdg-basedir": "^4.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=8.10" } }, "node_modules/standard-engine/node_modules/find-up": { @@ -4462,6 +4792,32 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.matchall": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.6.tgz", @@ -4625,40 +4981,107 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/temp-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", - "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "node_modules/time-zone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", - "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=", + "node_modules/table": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", + "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", "dev": true, + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, "engines": { - "node": ">=4" + "node": ">=10.0.0" } }, - "node_modules/tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "node_modules/table/node_modules/ajv": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", "dev": true, "dependencies": { - "rimraf": "^3.0.0" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=8.17.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/table/node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/table/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/temp-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/time-zone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", + "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" } }, "node_modules/tmp-promise": { @@ -4687,6 +5110,110 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, + "node_modules/ts-standard": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/ts-standard/-/ts-standard-11.0.0.tgz", + "integrity": "sha512-fe+PCOM6JTMIcG1Smr8BQJztUi3dc/SDJMqezxNAL8pe/0+h0shK0+fNPTuF1hMVMYO+O53Wtp9WQHqj0GJtMw==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "^4.26.1", + "eslint": "^7.28.0", + "eslint-config-standard": "^16.0.3", + "eslint-config-standard-jsx": "^10.0.0", + "eslint-config-standard-with-typescript": "^21.0.1", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.1.0", + "eslint-plugin-react": "^7.24.0", + "get-stdin": "^8.0.0", + "minimist": "^1.2.5", + "pkg-conf": "^3.1.0", + "standard-engine": "^14.0.1" + }, + "bin": { + "ts-standard": "bin/cmd.js" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "typescript": ">=3.8" + } + }, + "node_modules/ts-standard/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ts-standard/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ts-standard/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ts-standard/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ts-standard/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ts-standard/node_modules/pkg-conf": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", + "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0", + "load-json-file": "^5.2.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/tsconfig-paths": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", @@ -4699,6 +5226,27 @@ "strip-bom": "^3.0.0" } }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -4723,6 +5271,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/unbox-primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", @@ -4878,6 +5440,12 @@ "node": ">=8" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/yargs-parser": { "version": "21.0.0", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", @@ -4901,53 +5469,122 @@ } }, "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.16.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz", + "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", "dev": true, "requires": { "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.2.0", + "debug": "^4.1.1", + "espree": "^7.3.0", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", + "js-yaml": "^3.13.1", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } } } }, "@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.1", + "@humanwhocodes/object-schema": "^1.2.0", "debug": "^4.1.1", "minimatch": "^3.0.4" } @@ -4984,6 +5621,12 @@ "fastq": "^1.6.0" } }, + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -5006,6 +5649,111 @@ "form-data": "^3.0.0" } }, + "@typescript-eslint/eslint-plugin": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", + "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.33.0", + "@typescript-eslint/scope-manager": "4.33.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", + "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", + "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "debug": "^4.3.1" + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", + "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" + } + }, + "@typescript-eslint/types": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", + "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", + "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", + "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.33.0", + "eslint-visitor-keys": "^2.0.0" + } + }, "abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -5055,6 +5803,12 @@ "uri-js": "^4.2.2" } }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -5265,12 +6019,6 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, "mem": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", @@ -5287,28 +6035,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } - } - }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -5612,43 +6338,17 @@ "concordance": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz", - "integrity": "sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==", - "dev": true, - "requires": { - "date-time": "^3.1.0", - "esutils": "^2.0.3", - "fast-diff": "^1.2.0", - "js-string-escape": "^1.0.1", - "lodash": "^4.17.15", - "md5-hex": "^3.0.1", - "semver": "^7.3.2", - "well-known-symbols": "^2.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } + "integrity": "sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==", + "dev": true, + "requires": { + "date-time": "^3.1.0", + "esutils": "^2.0.3", + "fast-diff": "^1.2.0", + "js-string-escape": "^1.0.1", + "lodash": "^4.17.15", + "md5-hex": "^3.0.1", + "semver": "^7.3.2", + "well-known-symbols": "^2.0.0" } }, "content-type": { @@ -5874,6 +6574,15 @@ "once": "^1.4.0" } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -6101,71 +6810,75 @@ "dev": true }, "eslint": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz", - "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.0.5", - "@humanwhocodes/config-array": "^0.9.2", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.3.2", + "debug": "^4.0.1", "doctrine": "^3.0.0", + "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.2.0", - "espree": "^9.3.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", + "glob-parent": "^5.1.2", "globals": "^13.6.0", - "ignore": "^5.2.0", + "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^4.1.0", + "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "requires": { - "is-glob": "^4.0.3" + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true }, "strip-ansi": { "version": "6.0.1", @@ -6179,19 +6892,29 @@ } }, "eslint-config-standard": { - "version": "17.0.0-1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0-1.tgz", - "integrity": "sha512-aqRG58dqoBNfOLN+PsitasxmW+W9Os4oQrx081B16T4E4WogsSbpUL6hnKSnyv35sSRYA2XjBtKMOrUboL6jgw==", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz", + "integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==", "dev": true, "requires": {} }, "eslint-config-standard-jsx": { - "version": "11.0.0-1", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-11.0.0-1.tgz", - "integrity": "sha512-W70oBgrQ4EOnlqMU4gRhNpoiu7qA6Hnz1trSGHcEwlHLYdH9R+HyeBrClZCnHHNE0jGNHZHbz+BVDhKs4/MRLA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-10.0.0.tgz", + "integrity": "sha512-hLeA2f5e06W1xyr/93/QJulN/rLbUVUmqTlexv9PRKHFwEC9ffJcH2LvJhMoEqYQBEYafedgGZXH2W8NUpt5lA==", "dev": true, "requires": {} }, + "eslint-config-standard-with-typescript": { + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-21.0.1.tgz", + "integrity": "sha512-FeiMHljEJ346Y0I/HpAymNKdrgKEpHpcg/D93FvPHWfCzbT4QyUJba/0FwntZeGLXfUiWDSeKmdJD597d9wwiw==", + "dev": true, + "requires": { + "@typescript-eslint/parser": "^4.0.0", + "eslint-config-standard": "^16.0.0" + } + }, "eslint-import-resolver-node": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", @@ -6235,9 +6958,9 @@ } }, "eslint-plugin-es": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", - "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", "dev": true, "requires": { "eslint-utils": "^2.0.0", @@ -6308,25 +7031,47 @@ } } }, - "eslint-plugin-n": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-14.0.0.tgz", - "integrity": "sha512-mNwplPLsbaKhHyA0fa/cy8j+oF6bF6l81hzBTWa6JOvPcMNAuIogk2ih6d9tYvWYzyUG+7ZFeChqbzdFpg2QrQ==", + "eslint-plugin-node": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", + "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", "dev": true, "requires": { - "eslint-plugin-es": "^4.1.0", - "eslint-utils": "^3.0.0", + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", "ignore": "^5.1.1", - "is-core-module": "^2.3.0", "minimatch": "^3.0.4", "resolve": "^1.10.1", "semver": "^6.1.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "eslint-plugin-promise": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", - "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.2.0.tgz", + "integrity": "sha512-SftLb1pUG01QYq2A/hGAWfDRXqYD82zE7j7TopDOyNdU+7SvvoXREls/+PRTY17vUXzXnZA/zfnyKgRH6x4JJw==", "dev": true, "requires": {} }, @@ -6370,17 +7115,31 @@ "is-core-module": "^2.2.0", "path-parse": "^1.0.6" } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, "eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "estraverse": "^4.1.1" + }, + "dependencies": { + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + } } }, "eslint-utils": { @@ -6390,31 +7149,37 @@ "dev": true, "requires": { "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } } }, "eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true }, "espree": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", - "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { - "acorn": "^8.7.0", + "acorn": "^7.4.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "esprima": { @@ -6664,9 +7429,9 @@ } }, "globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -6900,6 +7665,12 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, "is-generator-function": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", @@ -7155,6 +7926,12 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -7164,6 +7941,15 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -7636,6 +8422,12 @@ "parse-ms": "^2.1.0" } }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -7731,6 +8523,12 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "resolve": { "version": "1.22.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", @@ -7800,10 +8598,13 @@ "integrity": "sha512-H2bdSKERKdBV1SwoqYm6C0y+9EA94v6SUBOWO8kDndc4NoUih7Dv6Tsgma7zO1lv27wIvjlD0ZpMQk7um5dheQ==" }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "serialize-error": { "version": "7.0.1", @@ -7913,26 +8714,10 @@ } } }, - "standard": { - "version": "17.0.0-2", - "resolved": "https://registry.npmjs.org/standard/-/standard-17.0.0-2.tgz", - "integrity": "sha512-BMJ8LhqqzmFDq1OAYgi2WIWPHA3PTjxqKpQQtgefKq3HEjlBerRt4rDxDfhmSLVDNJ7TPcFfu+H/CKEjT/g7Iw==", - "dev": true, - "requires": { - "eslint": "^8.8.0", - "eslint-config-standard": "17.0.0-1", - "eslint-config-standard-jsx": "11.0.0-1", - "eslint-plugin-import": "^2.25.4", - "eslint-plugin-n": "^14.0.0", - "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-react": "^7.28.0", - "standard-engine": "^15.0.0-0" - } - }, "standard-engine": { - "version": "15.0.0-0", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-15.0.0-0.tgz", - "integrity": "sha512-EIwn81ncVakHtpktp+IBtSK+54T5l/d2NERnNYg0+SdEu4+CLcAtAKbpFVTkp/F7bPWrZgOaddY/Pfpgy7HreQ==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-14.0.1.tgz", + "integrity": "sha512-7FEzDwmHDOGva7r9ifOzD3BGdTbA7ujJ50afLVdW/tK14zQEptJjbFuUfn50irqdHDcTbNh0DTIoMPynMCXb0Q==", "dev": true, "requires": { "get-stdin": "^8.0.0", @@ -8020,6 +8805,28 @@ "safe-buffer": "~5.2.0" } }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, "string.prototype.matchall": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.6.tgz", @@ -8136,6 +8943,59 @@ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, + "table": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", + "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", + "dev": true, + "requires": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "ajv": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, "temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -8186,6 +9046,82 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, + "ts-standard": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/ts-standard/-/ts-standard-11.0.0.tgz", + "integrity": "sha512-fe+PCOM6JTMIcG1Smr8BQJztUi3dc/SDJMqezxNAL8pe/0+h0shK0+fNPTuF1hMVMYO+O53Wtp9WQHqj0GJtMw==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "^4.26.1", + "eslint": "^7.28.0", + "eslint-config-standard": "^16.0.3", + "eslint-config-standard-jsx": "^10.0.0", + "eslint-config-standard-with-typescript": "^21.0.1", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.1.0", + "eslint-plugin-react": "^7.24.0", + "get-stdin": "^8.0.0", + "minimist": "^1.2.5", + "pkg-conf": "^3.1.0", + "standard-engine": "^14.0.1" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pkg-conf": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", + "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "load-json-file": "^5.2.0" + } + } + } + }, "tsconfig-paths": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", @@ -8198,6 +9134,21 @@ "strip-bom": "^3.0.0" } }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -8213,6 +9164,13 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, + "typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true, + "peer": true + }, "unbox-primitive": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", @@ -8338,6 +9296,12 @@ "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "yargs-parser": { "version": "21.0.0", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", diff --git a/package.json b/package.json index b1585d8..abc17d7 100644 --- a/package.json +++ b/package.json @@ -29,13 +29,14 @@ "build": "node build", "test": "npm run lint && npm run test-runner", "test-runner": "node test/helpers/test-runner.mjs", - "lint": "standard", - "lint-fix": "standard --fix", + "lint": "ts-standard", + "lint-fix": "ts-standard --fix", "dist": "npm run test && npm run build" }, - "standard": { + "ts-standard": { "ignore": [ - "dist" + "dist", + "test/helpers/test-runner.mjs" ] }, "author": "Tõnis Tiigi ", @@ -63,8 +64,8 @@ "mega-mock": "^0.4.1", "readable-stream": "^3.6.0", "regenerator-runtime": "^0.13.9", - "standard": "^17.0.0-2", "tmp-promise": "^3.0.3", + "ts-standard": "^11.0.0", "util": "^0.12.4" } } diff --git a/readme.md b/readme.md index 12be1cc..1d00c3c 100644 --- a/readme.md +++ b/readme.md @@ -21,7 +21,9 @@ When contributing fork the project: - Run at least Node tests using `npm test node` to test Node; - Optionally run `npm test deno` to test Deno if you have it installed (CI will test Deno anyway). -Before creating a pull request, *please*, run tests. If you implement new features them implement tests for it too if possible. +Before creating a pull request, *please*, run tests. If you implement new features them implement tests for it too if possible. The hash at the end of test/helpers/test-runner.mjs may be updated if tests are updated in a way it change server state (like adding new files to tests). + +Because ts-standard do not support top-level await yet "test/helpers/test-runner.mjs" is not being linted. Avoid doing changes to this file - beside changing the hash - until ts-standard support it or install standard@next locally - which supports top-level await - and use it. ## Project history diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..1d3b5ee --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "strictNullChecks": true, + "checkJs": true + }, + "include": ["lib/", "index.d.ts"] +} From 428c73efcc2e10c41251fca8209148e493cecc83 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 11 Feb 2022 13:04:29 -0300 Subject: [PATCH 70/96] Refresh package-lock.json Seems it will solve the issue with Node 14. --- package-lock.json | 3063 +++++++++++++++++++++++++-------------------- 1 file changed, 1726 insertions(+), 1337 deletions(-) diff --git a/package-lock.json b/package-lock.json index 43aa3a7..cb1e64c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -91,21 +91,6 @@ "node": ">=4" } }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, "node_modules/@babel/highlight/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -115,27 +100,6 @@ "node": ">=0.8.0" } }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@eslint/eslintrc": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", @@ -233,9 +197,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "17.0.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.14.tgz", - "integrity": "sha512-SbjLmERksKOGzWzPNuW7fJM7fk3YXVTFiZWB/Hs99gwhk+/dnrQRPBQjPW9aO+fi1tAffi9PrwFvsmOKmDTyng==", + "version": "17.0.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.17.tgz", + "integrity": "sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw==", "dev": true }, "node_modules/@types/node-fetch": { @@ -517,24 +481,24 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", + "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" @@ -745,188 +709,6 @@ } } }, - "node_modules/ava/node_modules/ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ava/node_modules/callsites": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.0.0.tgz", - "integrity": "sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==", - "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/chalk": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.0.tgz", - "integrity": "sha512-/duVOqst+luxCQRKEo4bNxinsOQtMP80ZYm7mMqzuh5PociNL0PvmHFvREJ9ueYL2TxlHjBcmLCdmocx9Vg+IQ==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/ava/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/ava/node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ava/node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/ava/node_modules/mem": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", - "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==", - "dev": true, - "dependencies": { - "map-age-cleaner": "^0.1.3", - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sindresorhus/mem?sponsor=1" - } - }, - "node_modules/ava/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/ava/node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/ava/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/ava/node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ava/node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ava/node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/ava/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/ava/node_modules/yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", @@ -940,9 +722,9 @@ } }, "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "node_modules/base64-js": { @@ -1026,6 +808,15 @@ "ieee754": "^1.2.1" } }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -1040,12 +831,15 @@ } }, "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.0.0.tgz", + "integrity": "sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cbor": { @@ -1061,28 +855,30 @@ } }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.0.tgz", + "integrity": "sha512-/duVOqst+luxCQRKEo4bNxinsOQtMP80ZYm7mMqzuh5PociNL0PvmHFvREJ9ueYL2TxlHjBcmLCdmocx9Vg+IQ==", "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, - "dependencies": { - "anymatch": "~3.1.2", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", @@ -1130,18 +926,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/clean-stack/node_modules/escape-string-regexp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/clean-yaml-object": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", @@ -1167,27 +951,65 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/cli-truncate/node_modules/string-width": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.0.tgz", - "integrity": "sha512-7x54QnN21P+XL/v8SuNKvfgsUre6PXpN7mc77N3HlZv+f1SBRGmjxtOud2Z6FZ8DmdkD/IdjCaf9XXbnqmTZGQ==", + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=12" + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=8" } }, "node_modules/code-excerpt": { @@ -1203,21 +1025,18 @@ } }, "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "color-name": "1.1.3" } }, "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "node_modules/combined-stream": { @@ -1282,9 +1101,9 @@ } }, "node_modules/core-js": { - "version": "3.20.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.20.3.tgz", - "integrity": "sha512-vVl8j8ph6tRS3B8qir40H7yw7voy17xL0piAjlbBUsH7WIfzoedL/ZOr1OV9FyZQLWXsayOJyV4tnRyXR85/ag==", + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.0.tgz", + "integrity": "sha512-YUdI3fFu4TF/2WykQ2xzSiTQdldLB4KVuL9WeAy5XONZYt5Cun/fpQvctoKbCgvPhmzADeesTk/j2Rdx77AcKQ==", "dev": true, "hasInstallScript": true, "funding": { @@ -1347,6 +1166,12 @@ } } }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -1365,15 +1190,6 @@ "node": ">= 0.4" } }, - "node_modules/define-properties/node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/del": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz", @@ -1501,15 +1317,6 @@ "node": ">=8" } }, - "node_modules/dir-glob/node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -1540,9 +1347,9 @@ "dev": true }, "node_modules/emittery": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz", - "integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.1.tgz", + "integrity": "sha512-OBSS9uVXbpgqEGq2V5VnpfCu9vSnfiR9eYVJmxFYToNIcWRHkM4BAFbJe/PWjf/pQdEL7OPxd2jOW/bJiyX7gg==", "dev": true, "engines": { "node": ">=12" @@ -1552,9 +1359,9 @@ } }, "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "node_modules/end-of-stream": { @@ -1620,15 +1427,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-abstract/node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -1647,39 +1445,43 @@ } }, "node_modules/esbuild": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.11.tgz", - "integrity": "sha512-xZvPtVj6yecnDeFb3KjjCM6i7B5TCAQZT77kkW/CpXTMnd6VLnRPKrUB1XHI1pSq6a4Zcy3BGueQ8VljqjDGCg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.21.tgz", + "integrity": "sha512-7WEoNMBJdLN993dr9h0CpFHPRc3yFZD+EAVY9lg6syJJ12gc5fHq8d75QRExuhnMkT2DaRiIKFThRvDWP+fO+A==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, + "engines": { + "node": ">=12" + }, "optionalDependencies": { - "esbuild-android-arm64": "0.14.11", - "esbuild-darwin-64": "0.14.11", - "esbuild-darwin-arm64": "0.14.11", - "esbuild-freebsd-64": "0.14.11", - "esbuild-freebsd-arm64": "0.14.11", - "esbuild-linux-32": "0.14.11", - "esbuild-linux-64": "0.14.11", - "esbuild-linux-arm": "0.14.11", - "esbuild-linux-arm64": "0.14.11", - "esbuild-linux-mips64le": "0.14.11", - "esbuild-linux-ppc64le": "0.14.11", - "esbuild-linux-s390x": "0.14.11", - "esbuild-netbsd-64": "0.14.11", - "esbuild-openbsd-64": "0.14.11", - "esbuild-sunos-64": "0.14.11", - "esbuild-windows-32": "0.14.11", - "esbuild-windows-64": "0.14.11", - "esbuild-windows-arm64": "0.14.11" + "esbuild-android-arm64": "0.14.21", + "esbuild-darwin-64": "0.14.21", + "esbuild-darwin-arm64": "0.14.21", + "esbuild-freebsd-64": "0.14.21", + "esbuild-freebsd-arm64": "0.14.21", + "esbuild-linux-32": "0.14.21", + "esbuild-linux-64": "0.14.21", + "esbuild-linux-arm": "0.14.21", + "esbuild-linux-arm64": "0.14.21", + "esbuild-linux-mips64le": "0.14.21", + "esbuild-linux-ppc64le": "0.14.21", + "esbuild-linux-riscv64": "0.14.21", + "esbuild-linux-s390x": "0.14.21", + "esbuild-netbsd-64": "0.14.21", + "esbuild-openbsd-64": "0.14.21", + "esbuild-sunos-64": "0.14.21", + "esbuild-windows-32": "0.14.21", + "esbuild-windows-64": "0.14.21", + "esbuild-windows-arm64": "0.14.21" } }, "node_modules/esbuild-android-arm64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.11.tgz", - "integrity": "sha512-6iHjgvMnC/SzDH8TefL+/3lgCjYWwAd1LixYfmz/TBPbDQlxcuSkX0yiQgcJB9k+ibZ54yjVXziIwGdlc+6WNw==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.21.tgz", + "integrity": "sha512-Bqgld1TY0wZv8TqiQmVxQFgYzz8ZmyzT7clXBDZFkOOdRybzsnj8AZuK1pwcLVA7Ya6XncHgJqIao7NFd3s0RQ==", "cpu": [ "arm64" ], @@ -1687,12 +1489,15 @@ "optional": true, "os": [ "android" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-darwin-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.11.tgz", - "integrity": "sha512-olq84ikh6TiBcrs3FnM4eR5VPPlcJcdW8BnUz/lNoEWYifYQ+Po5DuYV1oz1CTFMw4k6bQIZl8T3yxL+ZT2uvQ==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.21.tgz", + "integrity": "sha512-j+Eg+e13djzyYINVvAbOo2/zvZ2DivuJJTaBrJnJHSD7kUNuGHRkHoSfFjbI80KHkn091w350wdmXDNSgRjfYQ==", "cpu": [ "x64" ], @@ -1700,12 +1505,15 @@ "optional": true, "os": [ "darwin" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-darwin-arm64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.11.tgz", - "integrity": "sha512-Jj0ieWLREPBYr/TZJrb2GFH8PVzDqiQWavo1pOFFShrcmHWDBDrlDxPzEZ67NF/Un3t6sNNmeI1TUS/fe1xARg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.21.tgz", + "integrity": "sha512-nDNTKWDPI0RuoPj5BhcSB2z5EmZJJAyRtZLIjyXSqSpAyoB8eyAKXl4lB8U2P78Fnh4Lh1le/fmpewXE04JhBQ==", "cpu": [ "arm64" ], @@ -1713,12 +1521,15 @@ "optional": true, "os": [ "darwin" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-freebsd-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.11.tgz", - "integrity": "sha512-C5sT3/XIztxxz/zwDjPRHyzj/NJFOnakAanXuyfLDwhwupKPd76/PPHHyJx6Po6NI6PomgVp/zi6GRB8PfrOTA==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.21.tgz", + "integrity": "sha512-zIurkCHXhxELiDZtLGiexi8t8onQc2LtuE+S7457H/pP0g0MLRKMrsn/IN4LDkNe6lvBjuoZZi2OfelOHn831g==", "cpu": [ "x64" ], @@ -1726,12 +1537,15 @@ "optional": true, "os": [ "freebsd" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-freebsd-arm64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.11.tgz", - "integrity": "sha512-y3Llu4wbs0bk4cwjsdAtVOesXb6JkdfZDLKMt+v1U3tOEPBdSu6w8796VTksJgPfqvpX22JmPLClls0h5p+L9w==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.21.tgz", + "integrity": "sha512-wdxMmkJfbwcN+q85MpeUEamVZ40FNsBa9mPq8tAszDn8TRT2HoJvVRADPIIBa9SWWwlDChIMjkDKAnS3KS/sPA==", "cpu": [ "arm64" ], @@ -1739,12 +1553,15 @@ "optional": true, "os": [ "freebsd" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-32": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.11.tgz", - "integrity": "sha512-Cg3nVsxArjyLke9EuwictFF3Sva+UlDTwHIuIyx8qpxRYAOUTmxr2LzYrhHyTcGOleLGXUXYsnUVwKqnKAgkcg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.21.tgz", + "integrity": "sha512-fmxvyzOPPh2xiEHojpCeIQP6pXcoKsWbz3ryDDIKLOsk4xp3GbpHIEAWP0xTeuhEbendmvBDVKbAVv3PnODXLg==", "cpu": [ "ia32" ], @@ -1752,12 +1569,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.11.tgz", - "integrity": "sha512-oeR6dIrrojr8DKVrxtH3xl4eencmjsgI6kPkDCRIIFwv4p+K7ySviM85K66BN01oLjzthpUMvBVfWSJkBLeRbg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.21.tgz", + "integrity": "sha512-edZyNOv1ql+kpmlzdqzzDjRQYls+tSyi4QFi+PdBhATJFUqHsnNELWA9vMSzAaInPOEaVUTA5Ml28XFChcy4DA==", "cpu": [ "x64" ], @@ -1765,12 +1585,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-arm": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.11.tgz", - "integrity": "sha512-vcwskfD9g0tojux/ZaTJptJQU3a7YgTYsptK1y6LQ/rJmw7U5QJvboNawqM98Ca3ToYEucfCRGbl66OTNtp6KQ==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.21.tgz", + "integrity": "sha512-aSU5pUueK6afqmLQsbU+QcFBT62L+4G9hHMJDHWfxgid6hzhSmfRH9U/f+ymvxsSTr/HFRU4y7ox8ZyhlVl98w==", "cpu": [ "arm" ], @@ -1778,12 +1601,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-arm64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.11.tgz", - "integrity": "sha512-+e6ZCgTFQYZlmg2OqLkg1jHLYtkNDksxWDBWNtI4XG4WxuOCUErLqfEt9qWjvzK3XBcCzHImrajkUjO+rRkbMg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.21.tgz", + "integrity": "sha512-t5qxRkq4zdQC0zXpzSB2bTtfLgOvR0C6BXYaRE/6/k8/4SrkZcTZBeNu+xGvwCU4b5dU9ST9pwIWkK6T1grS8g==", "cpu": [ "arm64" ], @@ -1791,12 +1617,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-mips64le": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.11.tgz", - "integrity": "sha512-Rrs99L+p54vepmXIb87xTG6ukrQv+CzrM8eoeR+r/OFL2Rg8RlyEtCeshXJ2+Q66MXZOgPJaokXJZb9snq28bw==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.21.tgz", + "integrity": "sha512-jLZLQGCNlUsmIHtGqNvBs3zN+7a4D9ckf0JZ+jQTwHdZJ1SgV9mAjbB980OFo66LoY+WeM7t3WEnq3FjI1zw4A==", "cpu": [ "mips64el" ], @@ -1804,12 +1633,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-ppc64le": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.11.tgz", - "integrity": "sha512-JyzziGAI0D30Vyzt0HDihp4s1IUtJ3ssV2zx9O/c+U/dhUHVP2TmlYjzCfCr2Q6mwXTeloDcLS4qkyvJtYptdQ==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.21.tgz", + "integrity": "sha512-4TWxpK391en2UBUw6GSrukToTDu6lL9vkm3Ll40HrI08WG3qcnJu7bl8e1+GzelDsiw1QmfAY/nNvJ6iaHRpCQ==", "cpu": [ "ppc64" ], @@ -1817,12 +1649,31 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-riscv64": { + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.21.tgz", + "integrity": "sha512-fElngqOaOfTsF+u+oetDLHsPG74vB2ZaGZUqmGefAJn3a5z9Z2pNa4WpVbbKgHpaAAy5tWM1m1sbGohj6Ki6+Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-linux-s390x": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.11.tgz", - "integrity": "sha512-DoThrkzunZ1nfRGoDN6REwmo8ZZWHd2ztniPVIR5RMw/Il9wiWEYBahb8jnMzQaSOxBsGp0PbyJeVLTUatnlcw==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.21.tgz", + "integrity": "sha512-brleZ6R5fYv0qQ7ZBwenQmP6i9TdvJCB092c/3D3pTLQHBGHJb5zWgKxOeS7bdHzmLy6a6W7GbFk6QKpjyD6QA==", "cpu": [ "s390x" ], @@ -1830,12 +1681,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-netbsd-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.11.tgz", - "integrity": "sha512-12luoRQz+6eihKYh1zjrw0CBa2aw3twIiHV/FAfjh2NEBDgJQOY4WCEUEN+Rgon7xmLh4XUxCQjnwrvf8zhACw==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.21.tgz", + "integrity": "sha512-nCEgsLCQ8RoFWVV8pVI+kX66ICwbPP/M9vEa0NJGIEB/Vs5sVGMqkf67oln90XNSkbc0bPBDuo4G6FxlF7PN8g==", "cpu": [ "x64" ], @@ -1843,12 +1697,15 @@ "optional": true, "os": [ "netbsd" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-openbsd-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.11.tgz", - "integrity": "sha512-l18TZDjmvwW6cDeR4fmizNoxndyDHamGOOAenwI4SOJbzlJmwfr0jUgjbaXCUuYVOA964siw+Ix+A+bhALWg8Q==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.21.tgz", + "integrity": "sha512-h9zLMyVD0T73MDTVYIb/qUTokwI6EJH9O6wESuTNq6+XpMSr6C5aYZ4fvFKdNELW+Xsod+yDS2hV2JTUAbFrLA==", "cpu": [ "x64" ], @@ -1856,7 +1713,10 @@ "optional": true, "os": [ "openbsd" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-plugin-alias": { "version": "0.2.1", @@ -1865,9 +1725,9 @@ "dev": true }, "node_modules/esbuild-sunos-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.11.tgz", - "integrity": "sha512-bmYzDtwASBB8c+0/HVOAiE9diR7+8zLm/i3kEojUH2z0aIs6x/S4KiTuT5/0VKJ4zk69kXel1cNWlHBMkmavQg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.21.tgz", + "integrity": "sha512-Kl+7Cot32qd9oqpLdB1tEGXEkjBlijrIxMJ0+vlDFaqsODutif25on0IZlFxEBtL2Gosd4p5WCV1U7UskNQfXA==", "cpu": [ "x64" ], @@ -1875,12 +1735,15 @@ "optional": true, "os": [ "sunos" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-windows-32": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.11.tgz", - "integrity": "sha512-J1Ys5hMid8QgdY00OBvIolXgCQn1ARhYtxPnG6ESWNTty3ashtc4+As5nTrsErnv8ZGUcWZe4WzTP/DmEVX1UQ==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.21.tgz", + "integrity": "sha512-V7vnTq67xPBUCk/9UtlolmQ798Ecjdr1ZoI1vcSgw7M82aSSt0eZdP6bh5KAFZU8pxDcx3qoHyWQfHYr11f22A==", "cpu": [ "ia32" ], @@ -1888,12 +1751,15 @@ "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-windows-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.11.tgz", - "integrity": "sha512-h9FmMskMuGeN/9G9+LlHPAoiQk9jlKDUn9yA0MpiGzwLa82E7r1b1u+h2a+InprbSnSLxDq/7p5YGtYVO85Mlg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.21.tgz", + "integrity": "sha512-kDgHjKOHwjfJDCyRGELzVxiP/RBJBTA+wyspf78MTTJQkyPuxH2vChReNdWc+dU2S4gIZFHMdP1Qrl/k22ZmaA==", "cpu": [ "x64" ], @@ -1901,12 +1767,15 @@ "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/esbuild-windows-arm64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.11.tgz", - "integrity": "sha512-dZp7Krv13KpwKklt9/1vBFBMqxEQIO6ri7Azf8C+ob4zOegpJmha2XY9VVWP/OyQ0OWk6cEeIzMJwInRZrzBUQ==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.21.tgz", + "integrity": "sha512-8Sbo0zpzgwWrwjQYLmHF78f7E2xg5Ve63bjB2ng3V2aManilnnTGaliq2snYg+NOX60+hEvJHRdVnuIAHW0lVw==", "cpu": [ "arm64" ], @@ -1914,7 +1783,10 @@ "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": ">=12" + } }, "node_modules/escalade": { "version": "3.1.1", @@ -1926,12 +1798,12 @@ } }, "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2103,22 +1975,80 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-es": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", + "node_modules/eslint-module-utils/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "dependencies": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" + "locate-path": "^2.0.0" }, "engines": { - "node": ">=8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-es": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", + "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", + "dev": true, + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { "eslint": ">=4.19.1" } }, @@ -2376,6 +2306,76 @@ "node": ">=10" } }, + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/eslint-utils": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", @@ -2400,6 +2400,15 @@ "node": ">=4" } }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/eslint/node_modules/ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -2421,6 +2430,18 @@ "node": ">=8" } }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/espree": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", @@ -2593,18 +2614,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/figures/node_modules/escape-string-regexp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -2630,15 +2639,19 @@ } }, "node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", "dev": true, "dependencies": { - "locate-path": "^2.0.0" + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" }, "engines": { - "node": ">=4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/flat-cache": { @@ -2712,6 +2725,15 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -2801,10 +2823,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globby": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-12.1.0.tgz", - "integrity": "sha512-YULDaNwsoUZkRy9TWSY/M7Obh0abamTKoKzTfOI3uU+hfpX2FZqOq8LFDxsjYheF1RH7ITdArgbQnsNBFgcdBA==", + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-12.2.0.tgz", + "integrity": "sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA==", "dev": true, "dependencies": { "array-union": "^3.0.1", @@ -2861,12 +2895,12 @@ } }, "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/has-symbols": { @@ -2911,6 +2945,21 @@ "node": ">= 0.6" } }, + "node_modules/http-errors/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "node_modules/iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -2965,6 +3014,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2997,9 +3055,9 @@ } }, "node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/internal-slot": { "version": "1.0.3", @@ -3141,12 +3199,15 @@ } }, "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-generator-function": { @@ -3449,41 +3510,30 @@ } }, "node_modules/load-json-file": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz", + "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==", "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - }, "engines": { - "node": ">=6" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/load-json-file/node_modules/type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "node_modules/locate-path": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.1.0.tgz", + "integrity": "sha512-HNx5uOnYeK4SxEoid5qnhRfprlJeGMzFRKPLCf/15N3/B4AiofNwC/yq7VBKdVk9dx7m+PiYCJOGg55JYTAqoQ==", "dev": true, + "dependencies": { + "p-locate": "^6.0.0" + }, "engines": { - "node": ">=6" - } - }, - "node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash": { @@ -3555,18 +3605,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/matcher/node_modules/escape-string-regexp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/md5-hex": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz", @@ -3591,25 +3629,32 @@ "mega-mock": "cli/index.js" } }, - "node_modules/mega-mock/node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "node_modules/mem": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", + "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==", "dev": true, + "dependencies": { + "map-age-cleaner": "^0.1.3", + "mimic-fn": "^4.0.0" + }, "engines": { - "node": ">= 0.8" + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sindresorhus/mem?sponsor=1" } }, - "node_modules/mega-mock/node_modules/iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 8" } }, - "node_modules/mega-mock/node_modules/micro": { + "node_modules/micro": { "version": "9.3.4", "resolved": "https://registry.npmjs.org/micro/-/micro-9.3.4.tgz", "integrity": "sha512-smz9naZwTG7qaFnEZ2vn248YZq9XR+XoOH3auieZbkhDL4xLOxiE+KqG8qqnBeKfXA9c1uEFGCxPN1D+nT6N7w==", @@ -3627,30 +3672,6 @@ "node": ">= 8.0.0" } }, - "node_modules/mega-mock/node_modules/raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "dev": true, - "dependencies": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/micromatch": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", @@ -3698,9 +3719,9 @@ } }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -3716,9 +3737,9 @@ "dev": true }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "node_modules/multistream": { @@ -3805,6 +3826,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -3823,15 +3853,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.assign/node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/object.entries": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", @@ -3943,27 +3964,33 @@ } }, "node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", "dev": true, "dependencies": { - "p-try": "^1.0.0" + "yocto-queue": "^1.0.0" }, "engines": { - "node": ">=4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", "dev": true, "dependencies": { - "p-limit": "^1.1.0" + "p-limit": "^4.0.0" }, "engines": { - "node": ">=4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-map": { @@ -4014,6 +4041,15 @@ "node": ">=6" } }, + "node_modules/parent-module/node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -4037,12 +4073,12 @@ } }, "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", "dev": true, "engines": { - "node": ">=4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/path-is-absolute": { @@ -4069,6 +4105,15 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -4106,88 +4151,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pkg-conf/node_modules/find-up": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.2.0.tgz", - "integrity": "sha512-yWHzMzXCaFoABSnFTCPKNFlYoq4mSga9QLRRKOCLSJ33hSkzROB14ITbAWW0QDQDyuzsPQ33S1DsOWQb/oW1yA==", - "dev": true, - "dependencies": { - "locate-path": "^7.0.0", - "path-exists": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/load-json-file": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz", - "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/locate-path": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.0.0.tgz", - "integrity": "sha512-+cg2yXqDUKfo4hsFxwa3G1cBJeA+gs1vD8FyV9/odWoUlQe/4syxHQ5DPtKjtfm6gnKbZzjCqzX03kXosvZB1w==", - "dev": true, - "dependencies": { - "p-locate": "^6.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/p-locate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", - "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", - "dev": true, - "dependencies": { - "p-limit": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/path-exists": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", - "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, "node_modules/plur": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz", @@ -4295,6 +4258,21 @@ } ] }, + "node_modules/raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "dev": true, + "dependencies": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -4407,7 +4385,7 @@ "node": ">=8" } }, - "node_modules/resolve-cwd/node_modules/resolve-from": { + "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", @@ -4416,15 +4394,6 @@ "node": ">=8" } }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -4527,18 +4496,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/serialize-error/node_modules/type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/setprototypeof": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", @@ -4581,9 +4538,9 @@ } }, "node_modules/signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "node_modules/slash": { @@ -4611,30 +4568,6 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -4703,6 +4636,22 @@ "node": ">=6" } }, + "node_modules/standard-engine/node_modules/load-json-file": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/standard-engine/node_modules/locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -4752,6 +4701,15 @@ "node": ">=6" } }, + "node_modules/standard-engine/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/standard-engine/node_modules/pkg-conf": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", @@ -4765,6 +4723,15 @@ "node": ">=6" } }, + "node_modules/standard-engine/node_modules/type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -4793,29 +4760,20 @@ } }, "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.0.tgz", + "integrity": "sha512-7x54QnN21P+XL/v8SuNKvfgsUre6PXpN7mc77N3HlZv+f1SBRGmjxtOud2Z6FZ8DmdkD/IdjCaf9XXbnqmTZGQ==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" + "node": ">=12" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/string.prototype.matchall": { @@ -4878,18 +4836,6 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/strip-ansi/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -4927,6 +4873,15 @@ "node": ">=10" } }, + "node_modules/supertap/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/supertap/node_modules/arrify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", @@ -4958,15 +4913,15 @@ } }, "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -5013,6 +4968,63 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/table/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/table/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/table/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/table/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/table/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/table/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -5036,6 +5048,20 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, + "node_modules/table/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/table/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -5152,6 +5178,22 @@ "node": ">=6" } }, + "node_modules/ts-standard/node_modules/load-json-file": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/ts-standard/node_modules/locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -5201,6 +5243,15 @@ "node": ">=6" } }, + "node_modules/ts-standard/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/ts-standard/node_modules/pkg-conf": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", @@ -5214,6 +5265,15 @@ "node": ">=6" } }, + "node_modules/ts-standard/node_modules/type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/tsconfig-paths": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", @@ -5260,9 +5320,9 @@ } }, "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", "dev": true, "engines": { "node": ">=10" @@ -5271,6 +5331,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, "node_modules/typescript": { "version": "4.5.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", @@ -5411,48 +5480,237 @@ "is-typed-array": "^1.1.7" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", + "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", + "dev": true, + "engines": { + "node": ">=12" } }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, "engines": { - "node": ">=12" + "node": ">=8" } }, "node_modules/yocto-queue": { @@ -5515,41 +5773,11 @@ "supports-color": "^5.3.0" } }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, @@ -5634,9 +5862,9 @@ "dev": true }, "@types/node": { - "version": "17.0.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.14.tgz", - "integrity": "sha512-SbjLmERksKOGzWzPNuW7fJM7fk3YXVTFiZWB/Hs99gwhk+/dnrQRPBQjPW9aO+fi1tAffi9PrwFvsmOKmDTyng==", + "version": "17.0.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.17.tgz", + "integrity": "sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw==", "dev": true }, "@types/node-fetch": { @@ -5810,19 +6038,16 @@ "dev": true }, "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true }, "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", + "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", + "dev": true }, "anymatch": { "version": "3.1.2", @@ -5971,143 +6196,6 @@ "temp-dir": "^2.0.0", "write-file-atomic": "^3.0.3", "yargs": "^17.3.1" - }, - "dependencies": { - "ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", - "dev": true - }, - "callsites": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.0.0.tgz", - "integrity": "sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==", - "dev": true - }, - "chalk": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.0.tgz", - "integrity": "sha512-/duVOqst+luxCQRKEo4bNxinsOQtMP80ZYm7mMqzuh5PociNL0PvmHFvREJ9ueYL2TxlHjBcmLCdmocx9Vg+IQ==", - "dev": true - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "mem": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", - "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.3", - "mimic-fn": "^4.0.0" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } - } - }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - } - } } }, "available-typed-arrays": { @@ -6117,9 +6205,9 @@ "dev": true }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "base64-js": { @@ -6169,6 +6257,12 @@ "ieee754": "^1.2.1" } }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -6180,9 +6274,9 @@ } }, "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.0.0.tgz", + "integrity": "sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==", "dev": true }, "cbor": { @@ -6195,19 +6289,15 @@ } }, "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.0.tgz", + "integrity": "sha512-/duVOqst+luxCQRKEo4bNxinsOQtMP80ZYm7mMqzuh5PociNL0PvmHFvREJ9ueYL2TxlHjBcmLCdmocx9Vg+IQ==", + "dev": true }, "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { "anymatch": "~3.1.2", @@ -6245,14 +6335,6 @@ "dev": true, "requires": { "escape-string-regexp": "5.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", - "dev": true - } } }, "clean-yaml-object": { @@ -6269,23 +6351,55 @@ "requires": { "slice-ansi": "^5.0.0", "string-width": "^5.0.0" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" }, "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "string-width": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.0.tgz", - "integrity": "sha512-7x54QnN21P+XL/v8SuNKvfgsUre6PXpN7mc77N3HlZv+f1SBRGmjxtOud2Z6FZ8DmdkD/IdjCaf9XXbnqmTZGQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "ansi-regex": "^5.0.1" } } } @@ -6300,18 +6414,18 @@ } }, "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { - "color-name": "~1.1.4" + "color-name": "1.1.3" } }, "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "combined-stream": { @@ -6364,9 +6478,9 @@ "dev": true }, "core-js": { - "version": "3.20.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.20.3.tgz", - "integrity": "sha512-vVl8j8ph6tRS3B8qir40H7yw7voy17xL0piAjlbBUsH7WIfzoedL/ZOr1OV9FyZQLWXsayOJyV4tnRyXR85/ag==", + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.0.tgz", + "integrity": "sha512-YUdI3fFu4TF/2WykQ2xzSiTQdldLB4KVuL9WeAy5XONZYt5Cun/fpQvctoKbCgvPhmzADeesTk/j2Rdx77AcKQ==", "dev": true }, "cross-spawn": { @@ -6405,6 +6519,14 @@ "dev": true, "requires": { "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, "deep-is": { @@ -6420,14 +6542,6 @@ "dev": true, "requires": { "object-keys": "^1.0.12" - }, - "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - } } }, "del": { @@ -6518,14 +6632,6 @@ "dev": true, "requires": { "path-type": "^4.0.0" - }, - "dependencies": { - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - } } }, "doctrine": { @@ -6555,15 +6661,15 @@ "dev": true }, "emittery": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz", - "integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.1.tgz", + "integrity": "sha512-OBSS9uVXbpgqEGq2V5VnpfCu9vSnfiR9eYVJmxFYToNIcWRHkM4BAFbJe/PWjf/pQdEL7OPxd2jOW/bJiyX7gg==", "dev": true }, "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "end-of-stream": { @@ -6618,14 +6724,6 @@ "string.prototype.trimend": "^1.0.4", "string.prototype.trimstart": "^1.0.4", "unbox-primitive": "^1.0.1" - }, - "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - } } }, "es-to-primitive": { @@ -6640,126 +6738,134 @@ } }, "esbuild": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.11.tgz", - "integrity": "sha512-xZvPtVj6yecnDeFb3KjjCM6i7B5TCAQZT77kkW/CpXTMnd6VLnRPKrUB1XHI1pSq6a4Zcy3BGueQ8VljqjDGCg==", - "dev": true, - "requires": { - "esbuild-android-arm64": "0.14.11", - "esbuild-darwin-64": "0.14.11", - "esbuild-darwin-arm64": "0.14.11", - "esbuild-freebsd-64": "0.14.11", - "esbuild-freebsd-arm64": "0.14.11", - "esbuild-linux-32": "0.14.11", - "esbuild-linux-64": "0.14.11", - "esbuild-linux-arm": "0.14.11", - "esbuild-linux-arm64": "0.14.11", - "esbuild-linux-mips64le": "0.14.11", - "esbuild-linux-ppc64le": "0.14.11", - "esbuild-linux-s390x": "0.14.11", - "esbuild-netbsd-64": "0.14.11", - "esbuild-openbsd-64": "0.14.11", - "esbuild-sunos-64": "0.14.11", - "esbuild-windows-32": "0.14.11", - "esbuild-windows-64": "0.14.11", - "esbuild-windows-arm64": "0.14.11" + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.21.tgz", + "integrity": "sha512-7WEoNMBJdLN993dr9h0CpFHPRc3yFZD+EAVY9lg6syJJ12gc5fHq8d75QRExuhnMkT2DaRiIKFThRvDWP+fO+A==", + "dev": true, + "requires": { + "esbuild-android-arm64": "0.14.21", + "esbuild-darwin-64": "0.14.21", + "esbuild-darwin-arm64": "0.14.21", + "esbuild-freebsd-64": "0.14.21", + "esbuild-freebsd-arm64": "0.14.21", + "esbuild-linux-32": "0.14.21", + "esbuild-linux-64": "0.14.21", + "esbuild-linux-arm": "0.14.21", + "esbuild-linux-arm64": "0.14.21", + "esbuild-linux-mips64le": "0.14.21", + "esbuild-linux-ppc64le": "0.14.21", + "esbuild-linux-riscv64": "0.14.21", + "esbuild-linux-s390x": "0.14.21", + "esbuild-netbsd-64": "0.14.21", + "esbuild-openbsd-64": "0.14.21", + "esbuild-sunos-64": "0.14.21", + "esbuild-windows-32": "0.14.21", + "esbuild-windows-64": "0.14.21", + "esbuild-windows-arm64": "0.14.21" } }, "esbuild-android-arm64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.11.tgz", - "integrity": "sha512-6iHjgvMnC/SzDH8TefL+/3lgCjYWwAd1LixYfmz/TBPbDQlxcuSkX0yiQgcJB9k+ibZ54yjVXziIwGdlc+6WNw==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.21.tgz", + "integrity": "sha512-Bqgld1TY0wZv8TqiQmVxQFgYzz8ZmyzT7clXBDZFkOOdRybzsnj8AZuK1pwcLVA7Ya6XncHgJqIao7NFd3s0RQ==", "dev": true, "optional": true }, "esbuild-darwin-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.11.tgz", - "integrity": "sha512-olq84ikh6TiBcrs3FnM4eR5VPPlcJcdW8BnUz/lNoEWYifYQ+Po5DuYV1oz1CTFMw4k6bQIZl8T3yxL+ZT2uvQ==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.21.tgz", + "integrity": "sha512-j+Eg+e13djzyYINVvAbOo2/zvZ2DivuJJTaBrJnJHSD7kUNuGHRkHoSfFjbI80KHkn091w350wdmXDNSgRjfYQ==", "dev": true, "optional": true }, "esbuild-darwin-arm64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.11.tgz", - "integrity": "sha512-Jj0ieWLREPBYr/TZJrb2GFH8PVzDqiQWavo1pOFFShrcmHWDBDrlDxPzEZ67NF/Un3t6sNNmeI1TUS/fe1xARg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.21.tgz", + "integrity": "sha512-nDNTKWDPI0RuoPj5BhcSB2z5EmZJJAyRtZLIjyXSqSpAyoB8eyAKXl4lB8U2P78Fnh4Lh1le/fmpewXE04JhBQ==", "dev": true, "optional": true }, "esbuild-freebsd-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.11.tgz", - "integrity": "sha512-C5sT3/XIztxxz/zwDjPRHyzj/NJFOnakAanXuyfLDwhwupKPd76/PPHHyJx6Po6NI6PomgVp/zi6GRB8PfrOTA==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.21.tgz", + "integrity": "sha512-zIurkCHXhxELiDZtLGiexi8t8onQc2LtuE+S7457H/pP0g0MLRKMrsn/IN4LDkNe6lvBjuoZZi2OfelOHn831g==", "dev": true, "optional": true }, "esbuild-freebsd-arm64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.11.tgz", - "integrity": "sha512-y3Llu4wbs0bk4cwjsdAtVOesXb6JkdfZDLKMt+v1U3tOEPBdSu6w8796VTksJgPfqvpX22JmPLClls0h5p+L9w==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.21.tgz", + "integrity": "sha512-wdxMmkJfbwcN+q85MpeUEamVZ40FNsBa9mPq8tAszDn8TRT2HoJvVRADPIIBa9SWWwlDChIMjkDKAnS3KS/sPA==", "dev": true, "optional": true }, "esbuild-linux-32": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.11.tgz", - "integrity": "sha512-Cg3nVsxArjyLke9EuwictFF3Sva+UlDTwHIuIyx8qpxRYAOUTmxr2LzYrhHyTcGOleLGXUXYsnUVwKqnKAgkcg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.21.tgz", + "integrity": "sha512-fmxvyzOPPh2xiEHojpCeIQP6pXcoKsWbz3ryDDIKLOsk4xp3GbpHIEAWP0xTeuhEbendmvBDVKbAVv3PnODXLg==", "dev": true, "optional": true }, "esbuild-linux-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.11.tgz", - "integrity": "sha512-oeR6dIrrojr8DKVrxtH3xl4eencmjsgI6kPkDCRIIFwv4p+K7ySviM85K66BN01oLjzthpUMvBVfWSJkBLeRbg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.21.tgz", + "integrity": "sha512-edZyNOv1ql+kpmlzdqzzDjRQYls+tSyi4QFi+PdBhATJFUqHsnNELWA9vMSzAaInPOEaVUTA5Ml28XFChcy4DA==", "dev": true, "optional": true }, "esbuild-linux-arm": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.11.tgz", - "integrity": "sha512-vcwskfD9g0tojux/ZaTJptJQU3a7YgTYsptK1y6LQ/rJmw7U5QJvboNawqM98Ca3ToYEucfCRGbl66OTNtp6KQ==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.21.tgz", + "integrity": "sha512-aSU5pUueK6afqmLQsbU+QcFBT62L+4G9hHMJDHWfxgid6hzhSmfRH9U/f+ymvxsSTr/HFRU4y7ox8ZyhlVl98w==", "dev": true, "optional": true }, "esbuild-linux-arm64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.11.tgz", - "integrity": "sha512-+e6ZCgTFQYZlmg2OqLkg1jHLYtkNDksxWDBWNtI4XG4WxuOCUErLqfEt9qWjvzK3XBcCzHImrajkUjO+rRkbMg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.21.tgz", + "integrity": "sha512-t5qxRkq4zdQC0zXpzSB2bTtfLgOvR0C6BXYaRE/6/k8/4SrkZcTZBeNu+xGvwCU4b5dU9ST9pwIWkK6T1grS8g==", "dev": true, "optional": true }, "esbuild-linux-mips64le": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.11.tgz", - "integrity": "sha512-Rrs99L+p54vepmXIb87xTG6ukrQv+CzrM8eoeR+r/OFL2Rg8RlyEtCeshXJ2+Q66MXZOgPJaokXJZb9snq28bw==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.21.tgz", + "integrity": "sha512-jLZLQGCNlUsmIHtGqNvBs3zN+7a4D9ckf0JZ+jQTwHdZJ1SgV9mAjbB980OFo66LoY+WeM7t3WEnq3FjI1zw4A==", "dev": true, "optional": true }, "esbuild-linux-ppc64le": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.11.tgz", - "integrity": "sha512-JyzziGAI0D30Vyzt0HDihp4s1IUtJ3ssV2zx9O/c+U/dhUHVP2TmlYjzCfCr2Q6mwXTeloDcLS4qkyvJtYptdQ==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.21.tgz", + "integrity": "sha512-4TWxpK391en2UBUw6GSrukToTDu6lL9vkm3Ll40HrI08WG3qcnJu7bl8e1+GzelDsiw1QmfAY/nNvJ6iaHRpCQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-riscv64": { + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.21.tgz", + "integrity": "sha512-fElngqOaOfTsF+u+oetDLHsPG74vB2ZaGZUqmGefAJn3a5z9Z2pNa4WpVbbKgHpaAAy5tWM1m1sbGohj6Ki6+Q==", "dev": true, "optional": true }, "esbuild-linux-s390x": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.11.tgz", - "integrity": "sha512-DoThrkzunZ1nfRGoDN6REwmo8ZZWHd2ztniPVIR5RMw/Il9wiWEYBahb8jnMzQaSOxBsGp0PbyJeVLTUatnlcw==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.21.tgz", + "integrity": "sha512-brleZ6R5fYv0qQ7ZBwenQmP6i9TdvJCB092c/3D3pTLQHBGHJb5zWgKxOeS7bdHzmLy6a6W7GbFk6QKpjyD6QA==", "dev": true, "optional": true }, "esbuild-netbsd-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.11.tgz", - "integrity": "sha512-12luoRQz+6eihKYh1zjrw0CBa2aw3twIiHV/FAfjh2NEBDgJQOY4WCEUEN+Rgon7xmLh4XUxCQjnwrvf8zhACw==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.21.tgz", + "integrity": "sha512-nCEgsLCQ8RoFWVV8pVI+kX66ICwbPP/M9vEa0NJGIEB/Vs5sVGMqkf67oln90XNSkbc0bPBDuo4G6FxlF7PN8g==", "dev": true, "optional": true }, "esbuild-openbsd-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.11.tgz", - "integrity": "sha512-l18TZDjmvwW6cDeR4fmizNoxndyDHamGOOAenwI4SOJbzlJmwfr0jUgjbaXCUuYVOA964siw+Ix+A+bhALWg8Q==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.21.tgz", + "integrity": "sha512-h9zLMyVD0T73MDTVYIb/qUTokwI6EJH9O6wESuTNq6+XpMSr6C5aYZ4fvFKdNELW+Xsod+yDS2hV2JTUAbFrLA==", "dev": true, "optional": true }, @@ -6770,30 +6876,30 @@ "dev": true }, "esbuild-sunos-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.11.tgz", - "integrity": "sha512-bmYzDtwASBB8c+0/HVOAiE9diR7+8zLm/i3kEojUH2z0aIs6x/S4KiTuT5/0VKJ4zk69kXel1cNWlHBMkmavQg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.21.tgz", + "integrity": "sha512-Kl+7Cot32qd9oqpLdB1tEGXEkjBlijrIxMJ0+vlDFaqsODutif25on0IZlFxEBtL2Gosd4p5WCV1U7UskNQfXA==", "dev": true, "optional": true }, "esbuild-windows-32": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.11.tgz", - "integrity": "sha512-J1Ys5hMid8QgdY00OBvIolXgCQn1ARhYtxPnG6ESWNTty3ashtc4+As5nTrsErnv8ZGUcWZe4WzTP/DmEVX1UQ==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.21.tgz", + "integrity": "sha512-V7vnTq67xPBUCk/9UtlolmQ798Ecjdr1ZoI1vcSgw7M82aSSt0eZdP6bh5KAFZU8pxDcx3qoHyWQfHYr11f22A==", "dev": true, "optional": true }, "esbuild-windows-64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.11.tgz", - "integrity": "sha512-h9FmMskMuGeN/9G9+LlHPAoiQk9jlKDUn9yA0MpiGzwLa82E7r1b1u+h2a+InprbSnSLxDq/7p5YGtYVO85Mlg==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.21.tgz", + "integrity": "sha512-kDgHjKOHwjfJDCyRGELzVxiP/RBJBTA+wyspf78MTTJQkyPuxH2vChReNdWc+dU2S4gIZFHMdP1Qrl/k22ZmaA==", "dev": true, "optional": true }, "esbuild-windows-arm64": { - "version": "0.14.11", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.11.tgz", - "integrity": "sha512-dZp7Krv13KpwKklt9/1vBFBMqxEQIO6ri7Azf8C+ob4zOegpJmha2XY9VVWP/OyQ0OWk6cEeIzMJwInRZrzBUQ==", + "version": "0.14.21", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.21.tgz", + "integrity": "sha512-8Sbo0zpzgwWrwjQYLmHF78f7E2xg5Ve63bjB2ng3V2aManilnnTGaliq2snYg+NOX60+hEvJHRdVnuIAHW0lVw==", "dev": true, "optional": true }, @@ -6804,9 +6910,9 @@ "dev": true }, "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "dev": true }, "eslint": { @@ -6857,6 +6963,52 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, "eslint-utils": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", @@ -6874,6 +7026,12 @@ } } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -6888,6 +7046,15 @@ "requires": { "ansi-regex": "^5.0.1" } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -6954,6 +7121,49 @@ "requires": { "ms": "^2.1.1" } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true } } }, @@ -7283,14 +7493,6 @@ "requires": { "escape-string-regexp": "^5.0.0", "is-unicode-supported": "^1.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", - "dev": true - } } }, "file-entry-cache": { @@ -7312,12 +7514,13 @@ } }, "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" } }, "flat-cache": { @@ -7378,6 +7581,12 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -7435,12 +7644,20 @@ "dev": true, "requires": { "type-fest": "^0.20.2" + }, + "dependencies": { + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } } }, "globby": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-12.1.0.tgz", - "integrity": "sha512-YULDaNwsoUZkRy9TWSY/M7Obh0abamTKoKzTfOI3uU+hfpX2FZqOq8LFDxsjYheF1RH7ITdArgbQnsNBFgcdBA==", + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-12.2.0.tgz", + "integrity": "sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA==", "dev": true, "requires": { "array-union": "^3.0.1", @@ -7481,9 +7698,9 @@ "dev": true }, "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "has-symbols": { @@ -7511,8 +7728,22 @@ "inherits": "2.0.3", "setprototypeof": "1.0.3", "statuses": ">= 1.3.1 < 2" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } } }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -7539,6 +7770,14 @@ "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } } }, "imurmurhash": { @@ -7564,9 +7803,9 @@ } }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "internal-slot": { "version": "1.0.3", @@ -7666,9 +7905,9 @@ "dev": true }, "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true }, "is-generator-function": { @@ -7884,34 +8123,18 @@ } }, "load-json-file": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - }, - "dependencies": { - "type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", - "dev": true - } - } + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz", + "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==", + "dev": true }, "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.1.0.tgz", + "integrity": "sha512-HNx5uOnYeK4SxEoid5qnhRfprlJeGMzFRKPLCf/15N3/B4AiofNwC/yq7VBKdVk9dx7m+PiYCJOGg55JYTAqoQ==", "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "^6.0.0" } }, "lodash": { @@ -7966,14 +8189,6 @@ "dev": true, "requires": { "escape-string-regexp": "^5.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", - "dev": true - } } }, "md5-hex": { @@ -7992,44 +8207,16 @@ "dev": true, "requires": { "micro": "^9.3.3" - }, - "dependencies": { - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true - }, - "micro": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/micro/-/micro-9.3.4.tgz", - "integrity": "sha512-smz9naZwTG7qaFnEZ2vn248YZq9XR+XoOH3auieZbkhDL4xLOxiE+KqG8qqnBeKfXA9c1uEFGCxPN1D+nT6N7w==", - "dev": true, - "requires": { - "arg": "4.1.0", - "content-type": "1.0.4", - "is-stream": "1.1.0", - "raw-body": "2.3.2" - } - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - } - } + } + }, + "mem": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", + "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.3", + "mimic-fn": "^4.0.0" } }, "merge2": { @@ -8038,6 +8225,18 @@ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, + "micro": { + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/micro/-/micro-9.3.4.tgz", + "integrity": "sha512-smz9naZwTG7qaFnEZ2vn248YZq9XR+XoOH3auieZbkhDL4xLOxiE+KqG8qqnBeKfXA9c1uEFGCxPN1D+nT6N7w==", + "dev": true, + "requires": { + "arg": "4.1.0", + "content-type": "1.0.4", + "is-stream": "1.1.0", + "raw-body": "2.3.2" + } + }, "micromatch": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", @@ -8070,9 +8269,9 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -8085,9 +8284,9 @@ "dev": true }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "multistream": { @@ -8137,6 +8336,12 @@ "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, "object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -8147,14 +8352,6 @@ "define-properties": "^1.1.3", "has-symbols": "^1.0.1", "object-keys": "^1.1.1" - }, - "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - } } }, "object.entries": { @@ -8238,21 +8435,21 @@ } }, "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", "dev": true, "requires": { - "p-try": "^1.0.0" + "yocto-queue": "^1.0.0" } }, "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "^4.0.0" } }, "p-map": { @@ -8283,6 +8480,14 @@ "dev": true, "requires": { "callsites": "^3.0.0" + }, + "dependencies": { + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + } } }, "parse-json": { @@ -8302,9 +8507,9 @@ "dev": true }, "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", "dev": true }, "path-is-absolute": { @@ -8325,6 +8530,12 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -8345,57 +8556,6 @@ "requires": { "find-up": "^6.0.0", "load-json-file": "^7.0.0" - }, - "dependencies": { - "find-up": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.2.0.tgz", - "integrity": "sha512-yWHzMzXCaFoABSnFTCPKNFlYoq4mSga9QLRRKOCLSJ33hSkzROB14ITbAWW0QDQDyuzsPQ33S1DsOWQb/oW1yA==", - "dev": true, - "requires": { - "locate-path": "^7.0.0", - "path-exists": "^5.0.0" - } - }, - "load-json-file": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz", - "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==", - "dev": true - }, - "locate-path": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.0.0.tgz", - "integrity": "sha512-+cg2yXqDUKfo4hsFxwa3G1cBJeA+gs1vD8FyV9/odWoUlQe/4syxHQ5DPtKjtfm6gnKbZzjCqzX03kXosvZB1w==", - "dev": true, - "requires": { - "p-locate": "^6.0.0" - } - }, - "p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "requires": { - "yocto-queue": "^1.0.0" - } - }, - "p-locate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", - "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", - "dev": true, - "requires": { - "p-limit": "^4.0.0" - } - }, - "path-exists": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", - "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", - "dev": true - } } }, "plur": { @@ -8470,6 +8630,18 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + } + }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -8547,20 +8719,12 @@ "dev": true, "requires": { "resolve-from": "^5.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } } }, "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, "reusify": { @@ -8613,14 +8777,6 @@ "dev": true, "requires": { "type-fest": "^0.13.1" - }, - "dependencies": { - "type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "dev": true - } } }, "setprototypeof": { @@ -8656,9 +8812,9 @@ } }, "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "slash": { @@ -8675,20 +8831,6 @@ "requires": { "ansi-styles": "^6.0.0", "is-fullwidth-code-point": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true - } } }, "sprintf-js": { @@ -8735,6 +8877,19 @@ "locate-path": "^3.0.0" } }, + "load-json-file": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + } + }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -8769,6 +8924,12 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "pkg-conf": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", @@ -8778,6 +8939,12 @@ "find-up": "^3.0.0", "load-json-file": "^5.2.0" } + }, + "type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true } } }, @@ -8806,25 +8973,14 @@ } }, "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.0.tgz", + "integrity": "sha512-7x54QnN21P+XL/v8SuNKvfgsUre6PXpN7mc77N3HlZv+f1SBRGmjxtOud2Z6FZ8DmdkD/IdjCaf9XXbnqmTZGQ==", "dev": true, "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" } }, "string.prototype.matchall": { @@ -8870,14 +9026,6 @@ "dev": true, "requires": { "ansi-regex": "^6.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - } } }, "strip-bom": { @@ -8905,6 +9053,12 @@ "strip-ansi": "^6.0.0" }, "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, "arrify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", @@ -8929,12 +9083,12 @@ } }, "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "has-flag": "^4.0.0" + "has-flag": "^3.0.0" } }, "supports-preserve-symlinks-flag": { @@ -8968,6 +9122,48 @@ "uri-js": "^4.2.2" } }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -8985,6 +9181,17 @@ "is-fullwidth-code-point": "^3.0.0" } }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -9076,6 +9283,19 @@ "locate-path": "^3.0.0" } }, + "load-json-file": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + } + }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -9110,6 +9330,12 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "pkg-conf": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", @@ -9119,6 +9345,12 @@ "find-up": "^3.0.0", "load-json-file": "^5.2.0" } + }, + "type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true } } }, @@ -9159,11 +9391,20 @@ } }, "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", "dev": true }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, "typescript": { "version": "4.5.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", @@ -9285,23 +9526,171 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, "xdg-basedir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "yargs": { + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", + "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, "yargs-parser": { "version": "21.0.0", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", From 2e71fffd85558ac27a2a328d7a0674550d66ae71 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 11 Feb 2022 15:29:46 -0300 Subject: [PATCH 71/96] Attempt fix on Node 14 As suggested here: https://github.com/standard/ts-standard/issues/204#issuecomment-1008246963 --- package-lock.json | 270 ++++++++++++++++++++++++++++++++++++++++++++-- package.json | 1 + 2 files changed, 261 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index cb1e64c..fa52e32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "devDependencies": { "@types/node": "^17.0.14", "@types/node-fetch": "^2.5.12", + "@typescript-eslint/experimental-utils": "^5.11.0", "ava": "^4.0.1", "buffer": "^6.0.3", "core-js": "^3.20.3", @@ -244,7 +245,7 @@ } } }, - "node_modules/@typescript-eslint/experimental-utils": { + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/experimental-utils": { "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", @@ -268,6 +269,25 @@ "eslint": "*" } }, + "node_modules/@typescript-eslint/experimental-utils": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.11.0.tgz", + "integrity": "sha512-EPvC/bU2n1LKtzKWP1AjGWkp7r8tJ8giVlZHIODo6q7SAd6J+/9vjtEKHK2G/Qp+D2IGPsQge+oadDR3CZcFtQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "5.11.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/@typescript-eslint/parser": { "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", @@ -381,6 +401,142 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@typescript-eslint/utils": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.11.0.tgz", + "integrity": "sha512-g2I480tFE1iYRDyMhxPAtLQ9HAn0jjBtipgTCZmd9I9s11OV8CTsG+YfFciuNDcHqm4csbAgC2aVZCHzLxMSUw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.11.0", + "@typescript-eslint/types": "5.11.0", + "@typescript-eslint/typescript-estree": "5.11.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.11.0.tgz", + "integrity": "sha512-z+K4LlahDFVMww20t/0zcA7gq/NgOawaLuxgqGRVKS0PiZlCTIUtX0EJbC0BK1JtR4CelmkPK67zuCgpdlF4EA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.11.0", + "@typescript-eslint/visitor-keys": "5.11.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.11.0.tgz", + "integrity": "sha512-cxgBFGSRCoBEhvSVLkKw39+kMzUKHlJGVwwMbPcTZX3qEhuXhrjwaZXWMxVfxDgyMm+b5Q5b29Llo2yow8Y7xQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.11.0.tgz", + "integrity": "sha512-yVH9hKIv3ZN3lw8m/Jy5I4oXO4ZBMqijcXCdA4mY8ull6TPTAoQnKKrcZ0HDXg7Bsl0Unwwx7jcXMuNZc0m4lg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.11.0", + "@typescript-eslint/visitor-keys": "5.11.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.11.0.tgz", + "integrity": "sha512-E8w/vJReMGuloGxJDkpPlGwhxocxOpSVgSvjiLO5IxZPmxZF30weOeJYyPSEACwM+X4NziYS9q+WkN/2DHYQwA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.11.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@typescript-eslint/visitor-keys": { "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", @@ -5891,20 +6047,31 @@ "regexpp": "^3.1.0", "semver": "^7.3.5", "tsutils": "^3.21.0" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", + "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + } } }, "@typescript-eslint/experimental-utils": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", - "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.11.0.tgz", + "integrity": "sha512-EPvC/bU2n1LKtzKWP1AjGWkp7r8tJ8giVlZHIODo6q7SAd6J+/9vjtEKHK2G/Qp+D2IGPsQge+oadDR3CZcFtQ==", "dev": true, "requires": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "@typescript-eslint/utils": "5.11.0" } }, "@typescript-eslint/parser": { @@ -5972,6 +6139,89 @@ } } }, + "@typescript-eslint/utils": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.11.0.tgz", + "integrity": "sha512-g2I480tFE1iYRDyMhxPAtLQ9HAn0jjBtipgTCZmd9I9s11OV8CTsG+YfFciuNDcHqm4csbAgC2aVZCHzLxMSUw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.11.0", + "@typescript-eslint/types": "5.11.0", + "@typescript-eslint/typescript-estree": "5.11.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.11.0.tgz", + "integrity": "sha512-z+K4LlahDFVMww20t/0zcA7gq/NgOawaLuxgqGRVKS0PiZlCTIUtX0EJbC0BK1JtR4CelmkPK67zuCgpdlF4EA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.11.0", + "@typescript-eslint/visitor-keys": "5.11.0" + } + }, + "@typescript-eslint/types": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.11.0.tgz", + "integrity": "sha512-cxgBFGSRCoBEhvSVLkKw39+kMzUKHlJGVwwMbPcTZX3qEhuXhrjwaZXWMxVfxDgyMm+b5Q5b29Llo2yow8Y7xQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.11.0.tgz", + "integrity": "sha512-yVH9hKIv3ZN3lw8m/Jy5I4oXO4ZBMqijcXCdA4mY8ull6TPTAoQnKKrcZ0HDXg7Bsl0Unwwx7jcXMuNZc0m4lg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.11.0", + "@typescript-eslint/visitor-keys": "5.11.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.11.0.tgz", + "integrity": "sha512-E8w/vJReMGuloGxJDkpPlGwhxocxOpSVgSvjiLO5IxZPmxZF30weOeJYyPSEACwM+X4NziYS9q+WkN/2DHYQwA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.11.0", + "eslint-visitor-keys": "^3.0.0" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "dev": true + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + } + } + }, "@typescript-eslint/visitor-keys": { "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", diff --git a/package.json b/package.json index abc17d7..6ff9de1 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "devDependencies": { "@types/node": "^17.0.14", "@types/node-fetch": "^2.5.12", + "@typescript-eslint/experimental-utils": "^5.11.0", "ava": "^4.0.1", "buffer": "^6.0.3", "core-js": "^3.20.3", From 66e99f15a67b490a830352e26c4ec3139faad1ec Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 11 Feb 2022 15:37:51 -0300 Subject: [PATCH 72/96] Revert "Attempt fix on Node 14" This reverts commit 2e71fffd85558ac27a2a328d7a0674550d66ae71. --- package-lock.json | 270 ++-------------------------------------------- package.json | 1 - 2 files changed, 10 insertions(+), 261 deletions(-) diff --git a/package-lock.json b/package-lock.json index fa52e32..cb1e64c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,6 @@ "devDependencies": { "@types/node": "^17.0.14", "@types/node-fetch": "^2.5.12", - "@typescript-eslint/experimental-utils": "^5.11.0", "ava": "^4.0.1", "buffer": "^6.0.3", "core-js": "^3.20.3", @@ -245,7 +244,7 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/experimental-utils": { + "node_modules/@typescript-eslint/experimental-utils": { "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", @@ -269,25 +268,6 @@ "eslint": "*" } }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.11.0.tgz", - "integrity": "sha512-EPvC/bU2n1LKtzKWP1AjGWkp7r8tJ8giVlZHIODo6q7SAd6J+/9vjtEKHK2G/Qp+D2IGPsQge+oadDR3CZcFtQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "5.11.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, "node_modules/@typescript-eslint/parser": { "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", @@ -401,142 +381,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@typescript-eslint/utils": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.11.0.tgz", - "integrity": "sha512-g2I480tFE1iYRDyMhxPAtLQ9HAn0jjBtipgTCZmd9I9s11OV8CTsG+YfFciuNDcHqm4csbAgC2aVZCHzLxMSUw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.11.0", - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/typescript-estree": "5.11.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.11.0.tgz", - "integrity": "sha512-z+K4LlahDFVMww20t/0zcA7gq/NgOawaLuxgqGRVKS0PiZlCTIUtX0EJbC0BK1JtR4CelmkPK67zuCgpdlF4EA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/visitor-keys": "5.11.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.11.0.tgz", - "integrity": "sha512-cxgBFGSRCoBEhvSVLkKw39+kMzUKHlJGVwwMbPcTZX3qEhuXhrjwaZXWMxVfxDgyMm+b5Q5b29Llo2yow8Y7xQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.11.0.tgz", - "integrity": "sha512-yVH9hKIv3ZN3lw8m/Jy5I4oXO4ZBMqijcXCdA4mY8ull6TPTAoQnKKrcZ0HDXg7Bsl0Unwwx7jcXMuNZc0m4lg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/visitor-keys": "5.11.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.11.0.tgz", - "integrity": "sha512-E8w/vJReMGuloGxJDkpPlGwhxocxOpSVgSvjiLO5IxZPmxZF30weOeJYyPSEACwM+X4NziYS9q+WkN/2DHYQwA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.11.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@typescript-eslint/visitor-keys": { "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", @@ -6047,31 +5891,20 @@ "regexpp": "^3.1.0", "semver": "^7.3.5", "tsutils": "^3.21.0" - }, - "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", - "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - } } }, "@typescript-eslint/experimental-utils": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.11.0.tgz", - "integrity": "sha512-EPvC/bU2n1LKtzKWP1AjGWkp7r8tJ8giVlZHIODo6q7SAd6J+/9vjtEKHK2G/Qp+D2IGPsQge+oadDR3CZcFtQ==", + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", + "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.11.0" + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" } }, "@typescript-eslint/parser": { @@ -6139,89 +5972,6 @@ } } }, - "@typescript-eslint/utils": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.11.0.tgz", - "integrity": "sha512-g2I480tFE1iYRDyMhxPAtLQ9HAn0jjBtipgTCZmd9I9s11OV8CTsG+YfFciuNDcHqm4csbAgC2aVZCHzLxMSUw==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.11.0", - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/typescript-estree": "5.11.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "dependencies": { - "@typescript-eslint/scope-manager": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.11.0.tgz", - "integrity": "sha512-z+K4LlahDFVMww20t/0zcA7gq/NgOawaLuxgqGRVKS0PiZlCTIUtX0EJbC0BK1JtR4CelmkPK67zuCgpdlF4EA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/visitor-keys": "5.11.0" - } - }, - "@typescript-eslint/types": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.11.0.tgz", - "integrity": "sha512-cxgBFGSRCoBEhvSVLkKw39+kMzUKHlJGVwwMbPcTZX3qEhuXhrjwaZXWMxVfxDgyMm+b5Q5b29Llo2yow8Y7xQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.11.0.tgz", - "integrity": "sha512-yVH9hKIv3ZN3lw8m/Jy5I4oXO4ZBMqijcXCdA4mY8ull6TPTAoQnKKrcZ0HDXg7Bsl0Unwwx7jcXMuNZc0m4lg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.11.0", - "@typescript-eslint/visitor-keys": "5.11.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.11.0.tgz", - "integrity": "sha512-E8w/vJReMGuloGxJDkpPlGwhxocxOpSVgSvjiLO5IxZPmxZF30weOeJYyPSEACwM+X4NziYS9q+WkN/2DHYQwA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.11.0", - "eslint-visitor-keys": "^3.0.0" - } - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", - "dev": true - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - } - } - }, "@typescript-eslint/visitor-keys": { "version": "4.33.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", diff --git a/package.json b/package.json index 6ff9de1..abc17d7 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,6 @@ "devDependencies": { "@types/node": "^17.0.14", "@types/node-fetch": "^2.5.12", - "@typescript-eslint/experimental-utils": "^5.11.0", "ava": "^4.0.1", "buffer": "^6.0.3", "core-js": "^3.20.3", From 03de0c2bb561a4c1e28af3fd003ce2e87d2b51f6 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 11 Feb 2022 17:26:47 -0300 Subject: [PATCH 73/96] Try to fix testing again - Restore standard and use it for .js files - Use ts-standard only for index.d.ts - Split testing tasks which will allow the below - Do not lint TypeScript on Node 14 - Made the test runner default to Node to make the library more friendly to new contributors - Removed the now unneeded note in the readme. --- .github/workflows/test.yml | 8 +- package-lock.json | 973 ++++++++++++++++++++++++++++++++++- package.json | 17 +- readme.md | 2 - test/helpers/test-runner.mjs | 7 +- 5 files changed, 987 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 982d749..048677d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,10 @@ jobs: cache: 'npm' - run: npm ci - run: npm run build --if-present - - run: npm test node + - run: npm run lint-js + - run: npm run lint-ts + if: ${{ matrix.node-version != '14.x' }} + - run: npm run test-runner node test-deno: needs: pre_check @@ -48,7 +51,8 @@ jobs: steps: - uses: actions/checkout@v2 - # Testing code still depends on Node (mostly because mega-mock) + # Testing code still depends on Node + # (mostly because mega-mock: no plan to migrate it to Deno) - uses: actions/setup-node@v2 with: node-version: 16.x diff --git a/package-lock.json b/package-lock.json index cb1e64c..12ce278 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "mega-mock": "^0.4.1", "readable-stream": "^3.6.0", "regenerator-runtime": "^0.13.9", + "standard": "^17.0.0-2", "tmp-promise": "^3.0.3", "ts-standard": "^11.0.0", "util": "^0.12.4" @@ -2130,6 +2131,82 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "node_modules/eslint-plugin-n": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-14.0.0.tgz", + "integrity": "sha512-mNwplPLsbaKhHyA0fa/cy8j+oF6bF6l81hzBTWa6JOvPcMNAuIogk2ih6d9tYvWYzyUG+7ZFeChqbzdFpg2QrQ==", + "dev": true, + "dependencies": { + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", + "ignore": "^5.1.1", + "is-core-module": "^2.3.0", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-plugin-es": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", + "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", + "dev": true, + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-plugin-es/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-plugin-n/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-n/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-plugin-node": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", @@ -4595,6 +4672,42 @@ "node": ">=8" } }, + "node_modules/standard": { + "version": "17.0.0-2", + "resolved": "https://registry.npmjs.org/standard/-/standard-17.0.0-2.tgz", + "integrity": "sha512-BMJ8LhqqzmFDq1OAYgi2WIWPHA3PTjxqKpQQtgefKq3HEjlBerRt4rDxDfhmSLVDNJ7TPcFfu+H/CKEjT/g7Iw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "eslint": "^8.8.0", + "eslint-config-standard": "17.0.0-1", + "eslint-config-standard-jsx": "11.0.0-1", + "eslint-plugin-import": "^2.25.4", + "eslint-plugin-n": "^14.0.0", + "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-react": "^7.28.0", + "standard-engine": "^15.0.0-0" + }, + "bin": { + "standard": "bin/cmd.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/standard-engine": { "version": "14.0.1", "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-14.0.1.tgz", @@ -4707,23 +4820,486 @@ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true, "engines": { - "node": ">=4" + "node": ">=4" + } + }, + "node_modules/standard-engine/node_modules/pkg-conf": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", + "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0", + "load-json-file": "^5.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/standard-engine/node_modules/type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/standard/node_modules/@eslint/eslintrc": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.2.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/standard/node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/standard/node_modules/@humanwhocodes/config-array": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", + "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/standard/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/standard/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/standard/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/standard/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/standard/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/standard/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/standard/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/standard/node_modules/eslint": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz", + "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.2.0", + "espree": "^9.3.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/standard/node_modules/eslint-config-standard": { + "version": "17.0.0-1", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0-1.tgz", + "integrity": "sha512-aqRG58dqoBNfOLN+PsitasxmW+W9Os4oQrx081B16T4E4WogsSbpUL6hnKSnyv35sSRYA2XjBtKMOrUboL6jgw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peerDependencies": { + "eslint": "^8.0.1", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^14.0.0", + "eslint-plugin-promise": "^6.0.0" + } + }, + "node_modules/standard/node_modules/eslint-config-standard-jsx": { + "version": "11.0.0-1", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-11.0.0-1.tgz", + "integrity": "sha512-W70oBgrQ4EOnlqMU4gRhNpoiu7qA6Hnz1trSGHcEwlHLYdH9R+HyeBrClZCnHHNE0jGNHZHbz+BVDhKs4/MRLA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peerDependencies": { + "eslint": "^8.8.0", + "eslint-plugin-react": "^7.28.0" + } + }, + "node_modules/standard/node_modules/eslint-plugin-promise": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", + "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/standard/node_modules/eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/standard/node_modules/eslint-visitor-keys": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/standard/node_modules/espree": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", + "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", + "dev": true, + "dependencies": { + "acorn": "^8.7.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.1.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/standard/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/standard/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/standard/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/standard/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/standard/node_modules/load-json-file": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/standard/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/standard/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/standard/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/standard/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/standard/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/standard/node_modules/pkg-conf": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", + "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0", + "load-json-file": "^5.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/standard/node_modules/standard-engine": { + "version": "15.0.0-0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-15.0.0-0.tgz", + "integrity": "sha512-EIwn81ncVakHtpktp+IBtSK+54T5l/d2NERnNYg0+SdEu4+CLcAtAKbpFVTkp/F7bPWrZgOaddY/Pfpgy7HreQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "get-stdin": "^8.0.0", + "minimist": "^1.2.5", + "pkg-conf": "^3.1.0", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/standard/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/standard-engine/node_modules/pkg-conf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", - "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", + "node_modules/standard/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/standard-engine/node_modules/type-fest": { + "node_modules/standard/node_modules/type-fest": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", @@ -7241,6 +7817,56 @@ } } }, + "eslint-plugin-n": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-14.0.0.tgz", + "integrity": "sha512-mNwplPLsbaKhHyA0fa/cy8j+oF6bF6l81hzBTWa6JOvPcMNAuIogk2ih6d9tYvWYzyUG+7ZFeChqbzdFpg2QrQ==", + "dev": true, + "requires": { + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", + "ignore": "^5.1.1", + "is-core-module": "^2.3.0", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "dependencies": { + "eslint-plugin-es": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", + "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", + "dev": true, + "requires": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + } + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "eslint-plugin-node": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", @@ -8856,6 +9482,335 @@ } } }, + "standard": { + "version": "17.0.0-2", + "resolved": "https://registry.npmjs.org/standard/-/standard-17.0.0-2.tgz", + "integrity": "sha512-BMJ8LhqqzmFDq1OAYgi2WIWPHA3PTjxqKpQQtgefKq3HEjlBerRt4rDxDfhmSLVDNJ7TPcFfu+H/CKEjT/g7Iw==", + "dev": true, + "requires": { + "eslint": "^8.8.0", + "eslint-config-standard": "17.0.0-1", + "eslint-config-standard-jsx": "11.0.0-1", + "eslint-plugin-import": "^2.25.4", + "eslint-plugin-n": "^14.0.0", + "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-react": "^7.28.0", + "standard-engine": "^15.0.0-0" + }, + "dependencies": { + "@eslint/eslintrc": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.2.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + } + } + }, + "@humanwhocodes/config-array": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", + "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz", + "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.2.0", + "espree": "^9.3.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-config-standard": { + "version": "17.0.0-1", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0-1.tgz", + "integrity": "sha512-aqRG58dqoBNfOLN+PsitasxmW+W9Os4oQrx081B16T4E4WogsSbpUL6hnKSnyv35sSRYA2XjBtKMOrUboL6jgw==", + "dev": true, + "requires": {} + }, + "eslint-config-standard-jsx": { + "version": "11.0.0-1", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-11.0.0-1.tgz", + "integrity": "sha512-W70oBgrQ4EOnlqMU4gRhNpoiu7qA6Hnz1trSGHcEwlHLYdH9R+HyeBrClZCnHHNE0jGNHZHbz+BVDhKs4/MRLA==", + "dev": true, + "requires": {} + }, + "eslint-plugin-promise": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz", + "integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==", + "dev": true, + "requires": {} + }, + "eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-visitor-keys": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", + "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "dev": true + }, + "espree": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", + "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", + "dev": true, + "requires": { + "acorn": "^8.7.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.1.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "load-json-file": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pkg-conf": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", + "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "load-json-file": "^5.2.0" + } + }, + "standard-engine": { + "version": "15.0.0-0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-15.0.0-0.tgz", + "integrity": "sha512-EIwn81ncVakHtpktp+IBtSK+54T5l/d2NERnNYg0+SdEu4+CLcAtAKbpFVTkp/F7bPWrZgOaddY/Pfpgy7HreQ==", + "dev": true, + "requires": { + "get-stdin": "^8.0.0", + "minimist": "^1.2.5", + "pkg-conf": "^3.1.0", + "xdg-basedir": "^4.0.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true + } + } + }, "standard-engine": { "version": "14.0.1", "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-14.0.1.tgz", diff --git a/package.json b/package.json index abc17d7..3158d19 100644 --- a/package.json +++ b/package.json @@ -29,16 +29,22 @@ "build": "node build", "test": "npm run lint && npm run test-runner", "test-runner": "node test/helpers/test-runner.mjs", - "lint": "ts-standard", - "lint-fix": "ts-standard --fix", + "lint": "npm run lint-js && npm run lint-ts", + "lint-fix": "npm run lint-js-fix && npm run lint-ts-fix", + "lint-js": "standard", + "lint-js-fix": "standard --fix", + "lint-ts": "ts-standard", + "lint-ts-fix": "ts-standard --fix", "dist": "npm run test && npm run build" }, - "ts-standard": { + "standard": { "ignore": [ - "dist", - "test/helpers/test-runner.mjs" + "dist" ] }, + "ts-standard": { + "files": "index.d.ts" + }, "author": "Tõnis Tiigi ", "contributors": [ "Gustavo Rodrigues (https://qgustavor.tk)" @@ -64,6 +70,7 @@ "mega-mock": "^0.4.1", "readable-stream": "^3.6.0", "regenerator-runtime": "^0.13.9", + "standard": "^17.0.0-2", "tmp-promise": "^3.0.3", "ts-standard": "^11.0.0", "util": "^0.12.4" diff --git a/readme.md b/readme.md index 1d00c3c..ba27cc1 100644 --- a/readme.md +++ b/readme.md @@ -23,8 +23,6 @@ When contributing fork the project: Before creating a pull request, *please*, run tests. If you implement new features them implement tests for it too if possible. The hash at the end of test/helpers/test-runner.mjs may be updated if tests are updated in a way it change server state (like adding new files to tests). -Because ts-standard do not support top-level await yet "test/helpers/test-runner.mjs" is not being linted. Avoid doing changes to this file - beside changing the hash - until ts-standard support it or install standard@next locally - which supports top-level await - and use it. - ## Project history This package started as a fork, with the following objectives: diff --git a/test/helpers/test-runner.mjs b/test/helpers/test-runner.mjs index 0af3dbd..4f62bdc 100644 --- a/test/helpers/test-runner.mjs +++ b/test/helpers/test-runner.mjs @@ -10,9 +10,12 @@ import tmp from 'tmp-promise' import path from 'node:path' import os from 'node:os' -const testedPlatform = process.argv[2] +let testedPlatform = process.argv[2] if (testedPlatform !== 'node' && testedPlatform !== 'deno') { - throw Error(`Unknown platform: ${testedPlatform}. Run "npm test node" or "npm test deno".`) + console.warn(`Unknown platform: ${testedPlatform}.`) + console.warn('This is a multi-platform project and because CI the test command needs to know what platform is being tested.') + console.warn('Assuming "node". Next time run "npm test node" or "npm test deno".') + testedPlatform = 'node' } // Set up temporary directories From b4cfff7db8d4dbcbc4b7ce166e99664cf39084a4 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 11 Feb 2022 22:18:08 -0300 Subject: [PATCH 74/96] Publish types and fix readme.md --- package.json | 3 ++- readme.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3158d19..83922f2 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ } }, "files": [ - "dist" + "dist", + "index.d.ts" ], "repository": { "type": "git", diff --git a/readme.md b/readme.md index ba27cc1..74b7e9b 100644 --- a/readme.md +++ b/readme.md @@ -6,7 +6,7 @@ Unofficial JavaScript SDK for MEGA * This is all unofficial, based on [developer guide](https://mega.nz/#developers) and site source. * Make sure you agree with MEGA's [Terms of Service](https://mega.nz/#terms) before using it. -**API documentation and examples is available in the website: https://mega.js.org/** +**API documentation and examples is available in the website: [https://mega.js.org/](https://mega.js.org/)** **For CLI usage check MEGAJS CLI**: https://github.com/qgustavor/megajs-cli From 439728b6cfaf75b3170ca1f24dabef4b2aa0806a Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 11 Feb 2022 22:18:19 -0300 Subject: [PATCH 75/96] 1.0.0-alpha.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 12ce278..51444e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index 83922f2..d0e92c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "1.0.0-alpha.0", + "version": "1.0.0-alpha.1", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "./index.d.ts", From 96bdff053c318272aa86075a6c2c5d61a5d92216 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 11 Feb 2022 22:34:47 -0300 Subject: [PATCH 76/96] Fix typings And remove `return this` --- index.d.ts | 24 ++++++++++++------------ lib/file.mjs | 2 -- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/index.d.ts b/index.d.ts index 400545a..bd26461 100644 --- a/index.d.ts +++ b/index.d.ts @@ -37,7 +37,7 @@ declare namespace megajs { toJSON (): StorageJSON; close (cb?: noop): Promise; static fromJSON (json: StorageJSON): Storage; - mkdir (opt: mkdirOpts | string, cb?: errorCb): Promise; + mkdir (opt: mkdirOpts | string, cb?: (error: err, file: MutableFile) => void): Promise; login (cb?: (error: err, storage: this) => void): Promise; upload (opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): UploadStream; getAccountInfo (cb?: (error: err, account: accountInfo) => void): Promise; @@ -69,7 +69,7 @@ declare namespace megajs { pull (sn: AbortController, retryno?: number): void; wait (url: fetch.RequestInfo, sn: AbortController): void; defaultFetch (url: fetch.RequestInfo, opts?: fetch.RequestInit): Fetch; - request (json: JSON, cb?: (error: err, response?: any) => void, retryno?: number): Promise; + request (json: JSON, cb?: (error: err, response?: JSON) => void, retryno?: number): Promise; } export class File extends EventEmitter { @@ -92,9 +92,9 @@ declare namespace megajs { static fromURL (opt: FileOpts | string, extraOpt?: Partial): File; static defaultHandleRetries (tries: number, error: err, cb: errorCb): void; constructor (opts: FileOpts); - loadAttributes (cb?: BufferString): Promise; + loadAttributes (cb?: (error: err, file: File | this) => void): Promise; parseAttributes (at: BufferString): void; - decryptAttributes (at: BufferString): this; + decryptAttributes (at: BufferString): void; loadMetadata (aes: AES, opt: metaOpts): void; checkConstructorArgument (value: BufferString): void; download (options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Readable; @@ -105,15 +105,15 @@ declare namespace megajs { storage: Storage static packAttributes (attributes: JSON): Buffer; constructor (opts: FileOpts, storage: Storage); - unshare (cb?: noop): this; - unshareFolder (cb?: noop): this; - rename (filename: string, cb?: noop): this; - setLabel (label: labelType, cb?: noop): this; - shareFolder (options: linkOpts, cb?: noop): Promise; - setFavorite (isFavorite?: boolean, cb?: noop): this; + unshare (cb?: noop): Promise; + unshareFolder (cb?: noop): Promise; + rename (filename: string, cb?: noop): Promise; + setLabel (label: labelType, cb?: noop): Promise; + shareFolder (options: linkOpts, cb?: (error: err, url?: string) => void): Promise; + setFavorite (isFavorite?: boolean, cb?: noop): Promise; setAttributes (attributes: JSON, cb?: noop): Promise; - delete (permanent?: boolean, cb?: (error: err, data?: any) => void): this; - moveTo (target: File | string, cb?: (error: err, data?: any) => void): this; + delete (permanent?: boolean, cb?: (error: err, data?: any) => void): Promise; + moveTo (target: File | string, cb?: (error: err, data?: any) => void): Promise; upload (opts: uploadOpts | string, source?: BufferString, cb?: uploadCb): Writable; mkdir (opts: mkdirOpts | string, cb?: (error: err, file: MutableFile) => void): Promise; uploadAttribute (type: uploadAttrType, data: Buffer, cb?: (error: err, file?: this) => void): Promise; diff --git a/lib/file.mjs b/lib/file.mjs index 6d60aff..9849fd1 100644 --- a/lib/file.mjs +++ b/lib/file.mjs @@ -70,8 +70,6 @@ class File extends EventEmitter { if (unpackedAttribtes) { this.parseAttributes(unpackedAttribtes) } - - return this } parseAttributes (at) { From 6949e51e71bcd5ab341df6c18b11aa1b1b03f9b8 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 11 Feb 2022 22:34:57 -0300 Subject: [PATCH 77/96] 1.0.0-alpha.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 51444e4..27cceb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "1.0.0-alpha.1", + "version": "1.0.0-alpha.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "1.0.0-alpha.1", + "version": "1.0.0-alpha.2", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index d0e92c5..b9fc07c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "1.0.0-alpha.1", + "version": "1.0.0-alpha.2", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "./index.d.ts", From 2ca0933a5ca4eed59e942b71e3e0df5ec67bb41b Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sat, 12 Feb 2022 13:37:19 -0300 Subject: [PATCH 78/96] Add ESM types and fix CJS types For some reason ts-typescript is not working with the ESM types: "Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser." Because of that this file is not being linted at the moment. --- package.json | 10 +- tsconfig.json | 2 +- index.d.ts => types/cjs.d.ts | 20 +-- types/es.d.ts | 231 +++++++++++++++++++++++++++++++++++ 4 files changed, 252 insertions(+), 11 deletions(-) rename index.d.ts => types/cjs.d.ts (94%) create mode 100644 types/es.d.ts diff --git a/package.json b/package.json index b9fc07c..cc6fd9b 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,12 @@ "version": "1.0.0-alpha.2", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", - "typings": "./index.d.ts", + "typings": "types/cjs.d.ts", "exports": { + "types": { + "require": "./types/cjs.d.ts", + "import": "./types/es.d.ts" + }, "node": { "require": "./dist/main.node-cjs.js", "import": "./dist/main.node-es.mjs" @@ -16,7 +20,7 @@ }, "files": [ "dist", - "index.d.ts" + "types" ], "repository": { "type": "git", @@ -44,7 +48,7 @@ ] }, "ts-standard": { - "files": "index.d.ts" + "files": "types/cjs.d.ts" }, "author": "Tõnis Tiigi ", "contributors": [ diff --git a/tsconfig.json b/tsconfig.json index 1d3b5ee..3333fed 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,5 +3,5 @@ "strictNullChecks": true, "checkJs": true }, - "include": ["lib/", "index.d.ts"] + "include": ["types/cjs.d.ts"] } diff --git a/index.d.ts b/types/cjs.d.ts similarity index 94% rename from index.d.ts rename to types/cjs.d.ts index bd26461..6bf685b 100644 --- a/index.d.ts +++ b/types/cjs.d.ts @@ -11,9 +11,9 @@ declare function megajs (options: megajs.StorageOpts, cb?: megajs.errorCb): mega declare namespace megajs { - export function megaEncrypt (key: Buffer, options?: cryptOpts): Transform - export function megaDecrypt (key: Buffer, options?: cryptOpts): Transform - export function megaVerify (key: Buffer): Transform + export function encrypt (key: Buffer, options?: cryptOpts): Transform + export function decrypt (key: Buffer, options?: cryptOpts): Transform + export function verify (key: Buffer): Transform export class Storage extends EventEmitter { api: API @@ -53,6 +53,7 @@ declare namespace megajs { once (event: 'update', listener: (file: MutableFile) => void): this; once (event: 'delete', listener: (file: Readonly) => void): this; } + export class API extends EventEmitter { fetch: Fetch gateway: string @@ -101,6 +102,7 @@ declare namespace megajs { downloadBuffer (options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Promise; link (options: linkOpts | boolean, cb?: (error: err, url?: string) => void): Promise; } + export class MutableFile extends File { storage: Storage static packAttributes (attributes: JSON): Buffer; @@ -125,6 +127,7 @@ declare namespace megajs { once (event: 'update', listener: (file: MutableFile) => void): this; once (event: 'delete', listener: (file: Readonly) => void): this; } + export class AES { key: Buffer constructor (key: Buffer); @@ -134,6 +137,7 @@ declare namespace megajs { encryptECB (buffer: Buffer): Buffer; decryptECB (buffer: Buffer): Buffer; } + // Interfaces & Type Aliases type labelType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | '' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'grey' type StorageStatus = 'ready' | 'connecting' | 'closed' @@ -226,10 +230,12 @@ declare namespace megajs { } interface UploadStream extends Writable { complete: Promise - on: (event: string, listener: (...args: any[]) => void) => this - on: (event: 'complete', listener: (file: MutableFile) => void) => this - once: (event: string, listener: (...args: any[]) => void) => this - once: (event: 'complete', listener: (file: MutableFile) => void) => this + on: + ((event: string, listener: (...args: any[]) => void) => this) & + ((event: 'complete', listener: (file: MutableFile) => void) => this) + once: + ((event: string, listener: (...args: any[]) => void) => this) & + ((event: 'complete', listener: (file: MutableFile) => void) => this) } } diff --git a/types/es.d.ts b/types/es.d.ts new file mode 100644 index 0000000..ffb5136 --- /dev/null +++ b/types/es.d.ts @@ -0,0 +1,231 @@ +import 'https://cdn.deno.land/std/versions/0.125.0/raw/node/global.ts' +import { Readable, Writable, Transform } from 'https://cdn.deno.land/std/versions/0.125.0/raw/node/_stream.d.ts' +import { EventEmitter } from 'https://cdn.deno.land/std/versions/0.125.0/raw/node/_events.d.ts' +import { Agent as HttpAgent } from 'https://cdn.deno.land/std/versions/0.125.0/raw/node/http.ts' +import { Agent as HttpsAgent } from 'https://cdn.deno.land/std/versions/0.125.0/raw/node/https.ts' + +export declare function encrypt (key: Buffer, options?: cryptOpts): Transform +export declare function decrypt (key: Buffer, options?: cryptOpts): Transform +export declare function verify (key: Buffer): Transform + +export declare class Storage extends EventEmitter { + api: API + key: Buffer + sid: string + aes: AES + name: string + user: string + email: string + shareKeys: { [nodeId in string]: Buffer } + options: StorageOpts + status: StorageStatus + root: MutableFile + trash: MutableFile + inbox: MutableFile + mounts: MutableFile[] + files: { [id in string]: MutableFile } + RSAPrivateKey: Array + ready: Promise + constructor (options: StorageOpts, cb?: errorCb); + toJSON (): StorageJSON; + close (cb?: noop): Promise; + static fromJSON (json: StorageJSON): Storage; + mkdir (opt: mkdirOpts | string, cb?: (error: err, file: MutableFile) => void): Promise; + login (cb?: (error: err, storage: this) => void): Promise; + upload (opt: uploadOpts | string, buffer?: BufferString, cb?: uploadCb): UploadStream; + getAccountInfo (cb?: (error: err, account: accountInfo) => void): Promise; + reload (force?: boolean, cb?: (error: err, mount: MutableFile[]) => void): Promise; + on (event: 'add', listener: (File: MutableFile) => void): this; + on (event: 'move', listener: (file: MutableFile, oldDir: MutableFile) => void): this; + on (event: 'ready', listener: (storage: this) => void): this; + on (event: 'update', listener: (file: MutableFile) => void): this; + on (event: 'delete', listener: (file: Readonly) => void): this; + once (event: 'add', listener: (File: MutableFile) => void): this; + once (event: 'move', listener: (file: MutableFile, oldDir: MutableFile) => void): this; + once (event: 'ready', listener: (storage: this) => void): this; + once (event: 'update', listener: (file: MutableFile) => void): this; + once (event: 'delete', listener: (file: Readonly) => void): this; +} + +export declare class API extends EventEmitter { + fetch: typeof fetch + gateway: string + counterId: string + userAgent: string + keepalive: boolean + httpAgent: HttpAgent + httpsAgent: HttpsAgent + sn?: AbortController + static globalApi?: API + static getGlobalApi (): API; + constructor (keepalive: boolean, opts?: APIOpts); + close (): void; + pull (sn: AbortController, retryno?: number): void; + wait (url: string, sn: AbortController): void; + defaultFetch (url: string, opts?: RequestInit): typeof fetch; + request (json: JSON, cb?: (error: err, response?: JSON) => void, retryno?: number): Promise; +} + +export declare class File extends EventEmitter { + api: API + type: number + size?: number + label: string + owner?: string + nodeId?: string + attributes: JSON + downloadId: string + timestamp?: number + directory: boolean + favorited: boolean + loadedFile?: string + key: Nullable + name: Nullable + get createdAt (): number; + static unpackAttributes (at: Buffer): undefined | JSON; + static fromURL (opt: FileOpts | string, extraOpt?: Partial): File; + static defaultHandleRetries (tries: number, error: err, cb: errorCb): void; + constructor (opts: FileOpts); + loadAttributes (cb?: (error: err, file: File | this) => void): Promise; + parseAttributes (at: BufferString): void; + decryptAttributes (at: BufferString): void; + loadMetadata (aes: AES, opt: metaOpts): void; + checkConstructorArgument (value: BufferString): void; + download (options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Readable; + downloadBuffer (options: downloadOpts, cb?: (error: err, data?: Buffer) => void): Promise; + link (options: linkOpts | boolean, cb?: (error: err, url?: string) => void): Promise; +} + +declare class MutableFile extends File { + storage: Storage + static packAttributes (attributes: JSON): Buffer; + constructor (opts: FileOpts, storage: Storage); + unshare (cb?: noop): Promise; + unshareFolder (cb?: noop): Promise; + rename (filename: string, cb?: noop): Promise; + setLabel (label: labelType, cb?: noop): Promise; + shareFolder (options: linkOpts, cb?: (error: err, url?: string) => void): Promise; + setFavorite (isFavorite?: boolean, cb?: noop): Promise; + setAttributes (attributes: JSON, cb?: noop): Promise; + delete (permanent?: boolean, cb?: (error: err, data?: any) => void): Promise; + moveTo (target: File | string, cb?: (error: err, data?: any) => void): Promise; + upload (opts: uploadOpts | string, source?: BufferString, cb?: uploadCb): Writable; + mkdir (opts: mkdirOpts | string, cb?: (error: err, file: MutableFile) => void): Promise; + uploadAttribute (type: uploadAttrType, data: Buffer, cb?: (error: err, file?: this) => void): Promise; + importFile (sharedFile: string | File, cb?: (error: err, file?: this) => void): Promise; + on (event: 'move', listener: (oldDir: File) => void): this; + on (event: 'update', listener: (file: MutableFile) => void): this; + on (event: 'delete', listener: (file: Readonly) => void): this; + once (event: 'move', listener: (oldDir: File) => void): this; + once (event: 'update', listener: (file: MutableFile) => void): this; + once (event: 'delete', listener: (file: Readonly) => void): this; +} + +declare class AES { + key: Buffer + constructor (key: Buffer); + encryptCBC (buffer: Buffer): Buffer; + decryptCBC (buffer: Buffer): Buffer; + stringhash (buffer: Buffer): Buffer; + encryptECB (buffer: Buffer): Buffer; + decryptECB (buffer: Buffer): Buffer; +} + +// Interfaces & Type Aliases +type labelType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | '' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'grey' +type StorageStatus = 'ready' | 'connecting' | 'closed' +type uploadAttrType = 0 | 1 | 'thumbnail' | 'preview' +type uploadCb = (error: err, file: MutableFile) => void +type errorCb = (error: err) => void +type BufferString = Buffer | string +type Nullable = T | null +type err = Nullable +type noop = () => void +interface StorageOpts extends APIOpts { + email: string + password: BufferString + autoload?: boolean + autologin?: boolean + keepalive?: boolean +} +interface StorageJSON { + key: string + sid: string + name: string + user: string + options: StorageOpts +} +interface APIOpts { + fetch?: typeof fetch + gateway?: string + httpAgent?: HttpAgent + httpsAgent?: HttpsAgent + userAgent?: Nullable +} +interface FileOpts { + api?: API + key?: BufferString + directory?: boolean + downloadId: string + loadedFile?: string +} +interface accountInfo { + type: string + spaceUsed: number + spaceTotal: number + downloadBandwidthUsed: number + downloadBandwidthTotal: number + sharedBandwidthUsed: number + sharedBandwidthLimit: number +} +interface mkdirOpts { + name: string + key?: BufferString + attributes?: JSON +} +interface uploadOpts { + name: string + key?: BufferString + size?: number + maxChunkSize?: number + maxConnections?: number + initialChunkSize?: number + chunkSizeIncrement?: number + previewImage?: Buffer | Readable + thumbnailImage?: Buffer | Readable +} +interface cryptOpts { + start?: number + disableVerification?: boolean +} +interface linkOpts { + noKey?: boolean + key?: BufferString +} +interface metaOpts { + k: string + t: unknown + s?: number + ts?: number + a?: BufferString +} +interface downloadOpts { + end?: number + start?: number + forceHttps?: boolean + maxChunkSize?: number + maxConnections?: number + initialChunkSize?: number + returnCiphertext?: boolean + chunkSizeIncrement?: number + handleRetries?: (tries: number, error: err, cb: errorCb) => void +} +interface UploadStream extends Writable { + complete: Promise + on: + ((event: string, listener: (...args: any[]) => void) => this) & + ((event: 'complete', listener: (file: MutableFile) => void) => this) + once: + ((event: string, listener: (...args: any[]) => void) => this) & + ((event: 'complete', listener: (file: MutableFile) => void) => this) +} From 5b0cec6a923535347ac4b23bb3e8c53627208555 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sat, 12 Feb 2022 13:37:32 -0300 Subject: [PATCH 79/96] 1.0.0-alpha.3 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 27cceb6..db712ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "1.0.0-alpha.2", + "version": "1.0.0-alpha.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "1.0.0-alpha.2", + "version": "1.0.0-alpha.3", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index cc6fd9b..ac0ec0a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "1.0.0-alpha.2", + "version": "1.0.0-alpha.3", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "types/cjs.d.ts", From 48c7b57affc5ad74ea32265322c6c8d9ad4e3856 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sun, 13 Feb 2022 10:00:24 -0300 Subject: [PATCH 80/96] Fix issue with folder sharing --- lib/mutable-file.mjs | 13 +++++-------- test/storage.test.mjs | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/lib/mutable-file.mjs b/lib/mutable-file.mjs index 9a9c92a..7dc2a35 100644 --- a/lib/mutable-file.mjs +++ b/lib/mutable-file.mjs @@ -539,7 +539,6 @@ class MutableFile extends File { noKey: false } } - const [cb, promise] = createPromise(originalCb) if (typeof options === 'boolean') { options = { @@ -550,10 +549,10 @@ class MutableFile extends File { // __folderKey is used internally, don't use this const folderKey = options.__folderKey if (this.directory && !folderKey) { - this.shareFolder(options, cb) - return this + return this.shareFolder(options, originalCb) } + const [cb, promise] = createPromise(originalCb) this.api.request({ a: 'l', n: this.nodeId }, (err, id) => { if (err) return cb(err) @@ -568,16 +567,13 @@ class MutableFile extends File { shareFolder (options, originalCb) { if (!this.directory) throw Error("node isn't a folder") - const [cb, promise] = createPromise(originalCb) const handler = this.nodeId const storedShareKey = this.storage.shareKeys[handler] if (storedShareKey) { - this.link(Object.assign({ + return this.link(Object.assign({ __folderKey: storedShareKey - }, options), cb) - - return promise + }, options), originalCb) } let shareKey = formatKey(options.key) @@ -590,6 +586,7 @@ class MutableFile extends File { shareKey = Buffer.from(shareKey) } + const [cb, promise] = createPromise(originalCb) if (shareKey.length !== 16) { process.nextTick(() => { cb(Error('share key must be 16 byte / 22 characters')) diff --git a/test/storage.test.mjs b/test/storage.test.mjs index c2fed35..450cdb6 100644 --- a/test/storage.test.mjs +++ b/test/storage.test.mjs @@ -265,6 +265,25 @@ test.serial('Should login using promises', async t => { t.is(promiseResolvedValue, storage) }) +test.serial('Should share folders using promises', async t => { + const folder = storage.root.children.find(e => e.name === 'test folder') + + const link = await folder.link({ + key: Buffer.alloc(16) + }) + t.is(link, 'https://mega.nz/folder/AAAAAAAG#AAAAAAAAAAAAAAAAAAAAAA') +}) + +test.serial('Should share folders without keys', async t => { + const folder = storage.root.children.find(e => e.name === 'test folder') + + const link = await folder.link({ + key: Buffer.alloc(16), + noKey: true + }) + t.is(link, 'https://mega.nz/folder/AAAAAAAG') +}) + test.serial('Should logout from MEGA', t => { return new Promise((resolve, reject) => { storage.close((error) => { From a56b6830efcd9af3d7b73cd495e9508cdf754d48 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sun, 13 Feb 2022 10:00:35 -0300 Subject: [PATCH 81/96] 1.0.0-alpha.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index db712ff..e4b4e3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.4", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index ac0ec0a..68502a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.4", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "types/cjs.d.ts", From 52b72c9e780fa3e7792712acfcfd4bac7893c09c Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sun, 13 Feb 2022 11:48:41 -0300 Subject: [PATCH 82/96] Fixes and improvements - Handle AbortError in the API - Make stream errors synchronous - Support single-stream download in browser/Deno - Handle download cancelling in single-stream downloading - Remove unneeded process.nextTick since promises are being used - Simplify promisify function - Add tests --- lib/api.mjs | 8 +++-- lib/crypto/index.mjs | 14 ++------ lib/file.mjs | 28 ++++++++++++--- lib/mutable-file.mjs | 6 ++-- lib/storage.mjs | 3 +- lib/util.mjs | 6 +--- test/crypto-stream.test.mjs | 6 ++++ test/helpers/ava-deno.mjs | 3 +- test/storage.test.mjs | 69 +++++++++++++++++++++++++++++++++++++ test/verify.test.mjs | 6 ++++ 10 files changed, 118 insertions(+), 31 deletions(-) diff --git a/lib/api.mjs b/lib/api.mjs index 65b5c16..215198a 100644 --- a/lib/api.mjs +++ b/lib/api.mjs @@ -119,7 +119,7 @@ class API extends EventEmitter { this.fetch(`${this.gateway}sc?${new URLSearchParams({ sn, sid: this.sid })}`, { method: 'POST', signal: controller.signal - }).then(response => response.json()).then(resp => { + }).catch(ignoreAbortError).then(response => response.json()).then(resp => { this.sn = undefined if ((typeof resp === 'number') && resp < 0) { @@ -150,7 +150,7 @@ class API extends EventEmitter { this.fetch(url, { method: 'POST', signal: controller.signal - }).then(() => { + }).catch(ignoreAbortError).then(() => { // Body is ignored here // Errors were ignored in original mega package this.sn = undefined @@ -170,4 +170,8 @@ class API extends EventEmitter { } } +function ignoreAbortError (error) { + if (error.code !== 'AbortError') throw error +} + export default API diff --git a/lib/crypto/index.mjs b/lib/crypto/index.mjs index dc5ad0b..07d4197 100644 --- a/lib/crypto/index.mjs +++ b/lib/crypto/index.mjs @@ -54,12 +54,7 @@ function megaEncrypt (key, options = {}) { } }) - if (key.length !== 24) { - process.nextTick(() => { - stream.emit('error', Error('Wrong key length. Key must be 192bit.')) - }) - return stream - } + if (key.length !== 24) throw Error('Wrong key length. Key must be 192bit.') const aes = new AES(key.slice(0, 16)) const ctr = new CTR(aes, key.slice(16), start) @@ -123,12 +118,7 @@ function megaVerify (key) { } }) - if (key.length !== 32) { - process.nextTick(() => { - stream.emit('error', Error('Wrong key length. Key must be 256bit.')) - }) - return stream - } + if (key.length !== 32) throw Error('Wrong key length. Key must be 256bit.') const aes = getCipher(key) const mac = new MAC(aes, key.slice(16)) diff --git a/lib/file.mjs b/lib/file.mjs index 9849fd1..e6a6a5b 100644 --- a/lib/file.mjs +++ b/lib/file.mjs @@ -267,12 +267,30 @@ class File extends EventEmitter { controller.abort() }) - this.api.fetch(response.g + '/' + apiStart + '-' + end) - .then(response => { - handleMegaErrors(response) - // Might not work in browsers/Deno + this.api.fetch(response.g + '/' + apiStart + '-' + end, { + signal: controller.signal + }).then(response => { + handleMegaErrors(response) + const body = response.body + if (!body) { + throw Error('Missing response body') + } else if (body.pipe) { response.body.pipe(decryptStream) - }).catch(handleError) + } else if (body.getReader) { + const reader = body.getReader() + const read = ({ done, value }) => { + decryptStream.write(value) + if (done) { + decryptStream.end() + } else { + return reader.read().then(read) + } + } + reader.read().then(read) + } else { + throw Error('Single connection streaming not supported by fetch') + } + }).catch(handleError) return } diff --git a/lib/mutable-file.mjs b/lib/mutable-file.mjs index 7dc2a35..1674037 100644 --- a/lib/mutable-file.mjs +++ b/lib/mutable-file.mjs @@ -588,9 +588,7 @@ class MutableFile extends File { const [cb, promise] = createPromise(originalCb) if (shareKey.length !== 16) { - process.nextTick(() => { - cb(Error('share key must be 16 byte / 22 characters')) - }) + cb(Error('share key must be 16 byte / 22 characters')) return promise } @@ -685,7 +683,7 @@ class MutableFile extends File { // Check if attributes were already downloaded if (sharedFile.attributes) { - process.nextTick(afterGotAttributes, null, sharedFile) + afterGotAttributes(null, sharedFile) } else { sharedFile.loadAttributes(afterGotAttributes) } diff --git a/lib/storage.mjs b/lib/storage.mjs index 31b007c..5964326 100644 --- a/lib/storage.mjs +++ b/lib/storage.mjs @@ -42,8 +42,7 @@ class Storage extends EventEmitter { if (options.autologin) { this.login(cb) } else { - // Do not release Zalgo! - process.nextTick(() => cb(null, this)) + cb(null, this) } this.status = 'closed' diff --git a/lib/util.mjs b/lib/util.mjs index 2b3c6a9..ed3ce23 100644 --- a/lib/util.mjs +++ b/lib/util.mjs @@ -97,11 +97,7 @@ function createPromise (originalCb) { }) if (originalCb) { - promise.then(arg => { - originalCb(null, arg) - }, err => { - originalCb(err) - }) + promise.then(arg => originalCb(null, arg), originalCb) } return [cb, promise] diff --git a/test/crypto-stream.test.mjs b/test/crypto-stream.test.mjs index 7e553df..155c50c 100644 --- a/test/crypto-stream.test.mjs +++ b/test/crypto-stream.test.mjs @@ -76,3 +76,9 @@ test('MEGA mid-stream decrypt', async t => { const got = decryptBuffer.toString('hex') t.is(expected, got) }) + +test('Should not accept wrong key sizes', t => { + t.throws(() => megaEncrypt(Buffer.alloc(10)), { + message: 'Wrong key length. Key must be 192bit.' + }) +}) diff --git a/test/helpers/ava-deno.mjs b/test/helpers/ava-deno.mjs index 8f4fd88..3d703d1 100644 --- a/test/helpers/ava-deno.mjs +++ b/test/helpers/ava-deno.mjs @@ -1,10 +1,11 @@ // Ava compatibility layer for Deno /* global Deno */ -import { assertEquals, assertStrictEquals, assertThrows } from 'https://deno.land/std@0.122.0/testing/asserts.ts' +import { assert, assertEquals, assertStrictEquals, assertThrows } from 'https://deno.land/std@0.122.0/testing/asserts.ts' import { Buffer } from 'https://cdn.deno.land/std/versions/0.122.0/raw/node/buffer.ts' const testContext = { + assert, is: assertStrictEquals, deepEqual: assertEquals, throws: (fn, condition) => { diff --git a/test/storage.test.mjs b/test/storage.test.mjs index 450cdb6..9e5e746 100644 --- a/test/storage.test.mjs +++ b/test/storage.test.mjs @@ -284,6 +284,75 @@ test.serial('Should share folders without keys', async t => { t.is(link, 'https://mega.nz/folder/AAAAAAAG') }) +// Zalgo = https://oren.github.io/articles/zalgo/ +test.serial('Should not release zalgo when using callbacks', t => { + let released = false + // eslint-disable-next-line no-new + new Storage({ + email: 'mock@test', + password: 'mock', + autologin: false + }, () => { + released = true + }) + t.is(released, false) +}) + +test.serial('Should not release zalgo when using promises', t => { + let released = false + // eslint-disable-next-line no-new + new Storage({ + email: 'mock@test', + password: 'mock', + autologin: false + }).ready.then(() => { + released = true + }) + t.is(released, false) +}) + +test.serial('Should share folders using shareFolder (callback)', t => { + return new Promise((resolve, reject) => { + const folder = storage.root.children.find(e => e.name === 'test folder') + + folder.shareFolder({ + key: Buffer.alloc(16), + noKey: true + }, (error, link) => { + if (error) return reject(link) + t.is(link, 'https://mega.nz/folder/AAAAAAAG') + resolve() + }) + }) +}) + +test.serial('Should share folders using shareFolder (promise)', async t => { + const folder = storage.root.children.find(e => e.name === 'test folder') + + const link = await folder.shareFolder({ + key: Buffer.alloc(16), + noKey: true + }) + t.is(link, 'https://mega.nz/folder/AAAAAAAG') +}) + +test.serial('Should not release zalgo when using shareFolder', async t => { + return new Promise((resolve, reject) => { + const folder = storage.root.children.find(e => e.name === 'test folder promise') + + let zalgoReleased = true + folder.shareFolder({ + key: Buffer.alloc(32) + }, (error, link) => { + if (!error) return reject(Error('Should fail')) + t.is(error.message, 'share key must be 16 byte / 22 characters') + t.is(zalgoReleased, false) + resolve() + }) + zalgoReleased = false + }) +}) + test.serial('Should logout from MEGA', t => { return new Promise((resolve, reject) => { storage.close((error) => { diff --git a/test/verify.test.mjs b/test/verify.test.mjs index 39c2800..96022b4 100644 --- a/test/verify.test.mjs +++ b/test/verify.test.mjs @@ -16,3 +16,9 @@ test('MEGA verify stream', async t => { await stream2promise(verifyStream) t.is(verifyStream.mac.toString('hex'), '671427db245c00c7') }) + +test('Should not accept wrong key sizes', t => { + t.throws(() => verify(Buffer.alloc(10)), { + message: 'Wrong key length. Key must be 256bit.' + }) +}) From 17778a02a862cd13b07ccb15bff378a630cae5a1 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sun, 13 Feb 2022 11:48:48 -0300 Subject: [PATCH 83/96] 1.0.0-alpha.5 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e4b4e3c..3b68b3e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "1.0.0-alpha.4", + "version": "1.0.0-alpha.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "1.0.0-alpha.4", + "version": "1.0.0-alpha.5", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index 68502a4..7fea80f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "1.0.0-alpha.4", + "version": "1.0.0-alpha.5", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "types/cjs.d.ts", From afc8db5927485adb9ff5babda303bbc519e590c4 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sun, 13 Feb 2022 17:10:30 -0300 Subject: [PATCH 84/96] Handle closing better If you call sml while connections are still open then they will return ESID. But aborting is not enough, so API ignores responses after it was been closed. --- lib/api.mjs | 9 ++++++++- lib/storage.mjs | 13 +++---------- types/cjs.d.ts | 1 + types/es.d.ts | 1 + 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/api.mjs b/lib/api.mjs index 215198a..81493da 100644 --- a/lib/api.mjs +++ b/lib/api.mjs @@ -50,6 +50,8 @@ class API extends EventEmitter { // Can be overridden to allow changing how fetching works // Like fetch it should return a Promise this.fetch = opt.fetch || this.defaultFetch.bind(this) + + this.closed = false } defaultFetch (url, opts) { @@ -67,6 +69,8 @@ class API extends EventEmitter { } request (json, originalCb, retryno = 0) { + const isLogout = json.a === 'sml' + if (this.closed && !isLogout) throw Error('API is closed') const [cb, promise] = createPromise(originalCb) const qs = { id: (this.counterId++).toString() } @@ -84,6 +88,7 @@ class API extends EventEmitter { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify([json]) }).then(response => response.json()).then(resp => { + if (this.closed && !isLogout) return if (!resp) return cb(Error('Empty response')) // Some error codes are returned as num, some as array with number. @@ -121,6 +126,7 @@ class API extends EventEmitter { signal: controller.signal }).catch(ignoreAbortError).then(response => response.json()).then(resp => { this.sn = undefined + if (this.closed) return if ((typeof resp === 'number') && resp < 0) { if (resp === -3) { @@ -160,6 +166,7 @@ class API extends EventEmitter { close () { if (this.sn) this.sn.abort() + this.closed = true } static getGlobalApi () { @@ -171,7 +178,7 @@ class API extends EventEmitter { } function ignoreAbortError (error) { - if (error.code !== 'AbortError') throw error + if (error.name !== 'AbortError') throw error } export default API diff --git a/lib/storage.mjs b/lib/storage.mjs index 5964326..ba1302f 100644 --- a/lib/storage.mjs +++ b/lib/storage.mjs @@ -266,20 +266,13 @@ class Storage extends EventEmitter { return this.root.upload(opt, buffer, cb) } - close (originalCb) { - const [cb, promise] = createPromise(originalCb) - + close (cb) { // Does not handle still connecting or incomplete streams this.status = 'closed' + this.api.close() // Call the "Session Management Logout" API call - this.api.request({ a: 'sml' }, error => { - if (error) return cb(error) - this.api.close() - cb() - }) - - return promise + return this.api.request({ a: 'sml' }, cb) } getAccountInfo (originalCb) { diff --git a/types/cjs.d.ts b/types/cjs.d.ts index 6bf685b..2296fd4 100644 --- a/types/cjs.d.ts +++ b/types/cjs.d.ts @@ -60,6 +60,7 @@ declare namespace megajs { counterId: string userAgent: string keepalive: boolean + closed: boolean httpAgent: HttpAgent httpsAgent: HttpsAgent sn?: AbortController diff --git a/types/es.d.ts b/types/es.d.ts index ffb5136..48824ae 100644 --- a/types/es.d.ts +++ b/types/es.d.ts @@ -53,6 +53,7 @@ export declare class API extends EventEmitter { counterId: string userAgent: string keepalive: boolean + closed: boolean httpAgent: HttpAgent httpsAgent: HttpsAgent sn?: AbortController From 33cd0ebb00af923c13e14af79f7d9f6d4f41826e Mon Sep 17 00:00:00 2001 From: qgustavor Date: Sun, 13 Feb 2022 17:10:38 -0300 Subject: [PATCH 85/96] 1.0.0-alpha.6 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3b68b3e..aa4b8f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "1.0.0-alpha.5", + "version": "1.0.0-alpha.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "1.0.0-alpha.5", + "version": "1.0.0-alpha.6", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index 7fea80f..fa765ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "1.0.0-alpha.5", + "version": "1.0.0-alpha.6", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "types/cjs.d.ts", From bac52ce43ec72066779a7c14679febf7596fd323 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Mon, 14 Feb 2022 00:07:03 -0300 Subject: [PATCH 86/96] Remove pauseStream Also fix bandwidth limit error and error handling when using streams. --- lib/file.mjs | 2 +- lib/mutable-file.mjs | 61 ++++++++++++++++++++++++-------------------- lib/util.mjs | 26 +------------------ 3 files changed, 35 insertions(+), 54 deletions(-) diff --git a/lib/file.mjs b/lib/file.mjs index e6a6a5b..bbdd408 100644 --- a/lib/file.mjs +++ b/lib/file.mjs @@ -232,7 +232,7 @@ class File extends EventEmitter { function handleMegaErrors (resp) { if (resp.status === 200) return if (resp.status === 509) { - const timeLimit = resp.headers['x-mega-time-left'] + const timeLimit = resp.headers.get('x-mega-time-left') const error = Error('Bandwidth limit reached: ' + timeLimit + ' seconds until it resets') // Export error as a property of the error diff --git a/lib/mutable-file.mjs b/lib/mutable-file.mjs index 1674037..9fd0802 100644 --- a/lib/mutable-file.mjs +++ b/lib/mutable-file.mjs @@ -3,7 +3,7 @@ import pumpify from 'pumpify' import secureRandom from 'secure-random' import { PassThrough } from 'stream' import { e64, getCipher, megaEncrypt, formatKey, AES, unmergeKeyMac } from './crypto/index.mjs' -import { detectSize, streamToCb, pauseStream, createPromise } from './util.mjs' +import { detectSize, streamToCb, createPromise } from './util.mjs' const KEY_CACHE = {} @@ -228,10 +228,10 @@ class MutableFile extends File { const stream = this._upload(opt, source, 0, checkCallbacks) function returnError (e) { - if (cb) { - cb(e) - } else { + if (stream.listenerCount('error')) { stream.emit('error', e) + } else { + cb(e) } } @@ -246,8 +246,7 @@ class MutableFile extends File { ? new PassThrough() : megaEncrypt(opt.key) - const pause = pauseStream(true) - let stream = pumpify(pause, encrypter) + let stream = encrypter // Size is needed before upload. Kills the streaming otherwise. let size = opt.size @@ -260,10 +259,10 @@ class MutableFile extends File { if (size != null) { if (size === 0) encrypter.end() - this._uploadWithSize(stream, size, encrypter, pause, type, opt, cb) + this._uploadWithSize(stream, size, encrypter, type, opt, cb) } else { stream = pumpify(detectSize(size => { - this._uploadWithSize(stream, size, encrypter, pause, type, opt, cb) + this._uploadWithSize(stream, size, encrypter, type, opt, cb) }), stream) } @@ -291,11 +290,10 @@ class MutableFile extends File { : new AES(opt.key.slice(0, 16)) encrypter.encryptCBC(buffer) - const pause = pauseStream(true) - const stream = pause + const stream = new PassThrough() stream.end(buffer) - this._uploadWithSize(stream, buffer.length, stream, pause, type, opt, cb) + this._uploadWithSize(stream, buffer.length, stream, type, opt, cb) } // handle buffer @@ -307,7 +305,7 @@ class MutableFile extends File { streamToCb(source, gotBuffer) } - _uploadWithSize (stream, size, source, pause, type, opt, cb) { + _uploadWithSize (stream, size, source, type, opt, cb) { const ssl = (opt.forceHttps ?? process.env.IS_BROWSER_BUILD) ? 2 : 0 const getUrlRequest = type === 0 ? { a: 'u', ssl, s: size, ms: 0, r: 0, e: 0, v: 2 } @@ -354,7 +352,7 @@ class MutableFile extends File { sendChunk() } else { isReading = true - pause.setPause(false) + source.on('readable', handleData) } } @@ -380,7 +378,9 @@ class MutableFile extends File { const hashBuffer = Buffer.from(hash) if (hashBuffer.length > 0) { source.end() - cb(null, type, hashBuffer, source) + process.nextTick(() => { + cb(null, type, hashBuffer, source) + }) } else if (position < size && !isReading) { handleChunk() } @@ -405,21 +405,26 @@ class MutableFile extends File { } let sizeCheck = 0 - source.on('data', data => { - sizeCheck += data.length - stream.emit('progress', { bytesLoaded: sizeCheck, bytesTotal: size }) - - data.copy(uploadBuffer, chunkPos) - chunkPos += data.length - - if (chunkPos >= chunkSize) { - isReading = false - pause.setPause(true) - - remainingBuffer = data.slice(data.length - (chunkPos - chunkSize)) - sendChunk() + const handleData = () => { + while (true) { + const data = source.read() + if (data === null) break + sizeCheck += data.length + stream.emit('progress', { bytesLoaded: sizeCheck, bytesTotal: size }) + + data.copy(uploadBuffer, chunkPos) + chunkPos += data.length + + if (chunkPos >= chunkSize) { + isReading = false + source.off('readable', handleData) + + remainingBuffer = data.slice(data.length - (chunkPos - chunkSize)) + sendChunk() + break + } } - }) + } source.on('end', () => { if (size && sizeCheck !== size) { diff --git a/lib/util.mjs b/lib/util.mjs index ed3ce23..09e116f 100644 --- a/lib/util.mjs +++ b/lib/util.mjs @@ -62,30 +62,6 @@ function detectSize (cb) { }) } -function pauseStream (isPaused) { - let lastCallback - - const pause = new Transform({ - transform (chunk, encoding, callback) { - if (isPaused) { - lastCallback = () => callback(null, chunk) - } else { - callback(null, chunk) - } - } - }) - - pause.setPause = state => { - isPaused = state - if (!isPaused && lastCallback) { - lastCallback() - lastCallback = null - } - } - - return pause -} - // Based on https://github.com/morenyang/create-promise-callback/ function createPromise (originalCb) { let cb @@ -103,4 +79,4 @@ function createPromise (originalCb) { return [cb, promise] } -export { streamToCb, chunkSizeSafe, detectSize, pauseStream, createPromise } +export { streamToCb, chunkSizeSafe, detectSize, createPromise } From f45fd5c6aad51552fcdcca8f30e04fa65efafa99 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Mon, 14 Feb 2022 12:26:57 -0300 Subject: [PATCH 87/96] Attempt fixing upload and download errors There is still an issue that's causing issues in Deno and browsers, for some reason chunks are being read out of order randomly. --- lib/file.mjs | 51 ++++++++++++++++++---------- lib/mutable-file.mjs | 8 +++-- package-lock.json | 33 ------------------- package.json | 1 - test/helpers/test-runner.mjs | 2 +- test/storage.test.mjs | 64 ++++++++++++++++++++++++++++-------- 6 files changed, 90 insertions(+), 69 deletions(-) diff --git a/lib/file.mjs b/lib/file.mjs index bbdd408..981556c 100644 --- a/lib/file.mjs +++ b/lib/file.mjs @@ -1,5 +1,4 @@ import { e64, d64, AES, formatKey, getCipher, megaDecrypt } from './crypto/index.mjs' -import MultiStream from 'multistream' import API from './api.mjs' import { EventEmitter } from 'events' import { streamToCb, createPromise } from './util.mjs' @@ -279,10 +278,10 @@ class File extends EventEmitter { } else if (body.getReader) { const reader = body.getReader() const read = ({ done, value }) => { - decryptStream.write(value) if (done) { decryptStream.end() } else { + decryptStream.write(value) return reader.read().then(read) } } @@ -295,12 +294,10 @@ class File extends EventEmitter { return } + const chunkBuffer = {} + let lastStartedChunk = 0 + let nextChunk = 0 let stopped = false - let appendStream - const combined = new MultiStream(cb => { - appendStream = cb - if (stopped) cb(null, null) - }) let currentOffset = apiStart let chunkSize = initialChunkSize @@ -313,26 +310,48 @@ class File extends EventEmitter { }) const getChunk = () => { - if (stopped) return - const chunkOffset = currentOffset - const chunkMax = Math.min(end, chunkOffset + chunkSize - 1) - if (chunkMax < chunkOffset) { + if (currentOffset > end) { stopped = true return } - const writeStream = new PassThrough() - appendStream(null, writeStream) + const chunkOffset = currentOffset + const chunkMax = Math.min(end, chunkOffset + chunkSize - 1) + const chunkNumber = lastStartedChunk++ let tries = 0 const tryFetchChunk = () => { tries++ + this.api.fetch(response.g + '/' + chunkOffset + '-' + chunkMax) .then(response => { handleMegaErrors(response) return response.arrayBuffer() }).then(data => { - writeStream.end(Buffer.from(data)) + const dataBuffer = Buffer.from(data) + + // Check if this chunk is the next in the steam + if (nextChunk === chunkNumber) { + // If it is then write to the stream + decryptStream.write(dataBuffer) + + // Check if the next chunk is in the buffer + while (true) { + const bufferChunk = chunkBuffer[++nextChunk] + if (!bufferChunk) break + decryptStream.write(dataBuffer) + delete chunkBuffer[nextChunk] + } + + // Check if the stream stopped and if it's the last chunk then end the stream + if (stopped && lastStartedChunk === nextChunk) { + decryptStream.end() + } + } else { + // If it is not then add it to the buffer + chunkBuffer[chunkNumber] = dataBuffer + } + getChunk() }, error => { handleRetries(tries, error, error => { @@ -352,13 +371,9 @@ class File extends EventEmitter { } } - // Pass errors from the combined stream to the main stream - combined.on('error', (err) => stream.emit('error', err)) - for (let i = 0; i < maxConnections; i++) { getChunk() } - combined.pipe(decryptStream) }) if (cb) streamToCb(stream, cb) diff --git a/lib/mutable-file.mjs b/lib/mutable-file.mjs index 9fd0802..1c38bbb 100644 --- a/lib/mutable-file.mjs +++ b/lib/mutable-file.mjs @@ -352,7 +352,7 @@ class MutableFile extends File { sendChunk() } else { isReading = true - source.on('readable', handleData) + handleData() } } @@ -408,7 +408,10 @@ class MutableFile extends File { const handleData = () => { while (true) { const data = source.read() - if (data === null) break + if (data === null) { + source.once('readable', handleData) + break + } sizeCheck += data.length stream.emit('progress', { bytesLoaded: sizeCheck, bytesTotal: size }) @@ -417,7 +420,6 @@ class MutableFile extends File { if (chunkPos >= chunkSize) { isReading = false - source.off('readable', handleData) remainingBuffer = data.slice(data.length - (chunkPos - chunkSize)) sendChunk() diff --git a/package-lock.json b/package-lock.json index aa4b8f8..bd668b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,6 @@ "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", - "multistream": "^4.1.0", "node-fetch": "^2.6.7", "pumpify": "^2.0.1", "secure-random": "^1.1.2", @@ -3819,29 +3818,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/multistream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/multistream/-/multistream-4.1.0.tgz", - "integrity": "sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "once": "^1.4.0", - "readable-stream": "^3.6.0" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -8915,15 +8891,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "multistream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/multistream/-/multistream-4.1.0.tgz", - "integrity": "sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw==", - "requires": { - "once": "^1.4.0", - "readable-stream": "^3.6.0" - } - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", diff --git a/package.json b/package.json index fa765ba..b6e70ac 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", - "multistream": "^4.1.0", "node-fetch": "^2.6.7", "pumpify": "^2.0.1", "secure-random": "^1.1.2", diff --git a/test/helpers/test-runner.mjs b/test/helpers/test-runner.mjs index 4f62bdc..aa9b792 100644 --- a/test/helpers/test-runner.mjs +++ b/test/helpers/test-runner.mjs @@ -166,7 +166,7 @@ if (testedPlatform === 'node') { if (!wasFailed) { const serverStateSerialized = JSON.stringify(server.state) const serverStateHash = crypto.createHash('blake2b512').update(serverStateSerialized).digest('hex').slice(0, 64) - const expectedStateHash = '43e50d922914f368ca1e560cc11bd62fd08faa39973a0aa2f56a5665e6ac9381' + const expectedStateHash = '916cf06a439becb2c24a765d4ea4059f7a64d7f607a7d7d3620b1222b136d83d' if (serverStateHash !== expectedStateHash) { console.error('Got server state hash', serverStateHash) diff --git a/test/storage.test.mjs b/test/storage.test.mjs index 9e5e746..59a39a7 100644 --- a/test/storage.test.mjs +++ b/test/storage.test.mjs @@ -1,6 +1,7 @@ /* global Deno */ import test from 'ava' +import { testBuffer, sha1 } from './helpers/test-utils.mjs' import { Storage, File } from '../dist/main.node-es.mjs' // Set up Storage to use test server and credentials @@ -55,22 +56,31 @@ test.serial('Should not allow uploading without a size', t => { }) }) -test.serial('Should upload streams', t => { - return new Promise((resolve, reject) => { - const uploadStream = storage.upload({ - name: 'test file streams', - key: Buffer.alloc(24), - size: 1024 * 1024 - }) +test.serial('Should stream upload and download', async t => { + const dataSize = 2 * 1024 * 1024 + const uploadedData = testBuffer(dataSize) + const uploadedHash = sha1(uploadedData) + const uploadStream = storage.upload({ + name: 'test file streams', + key: Buffer.alloc(24), + size: dataSize + }) + uploadStream.end(Buffer.from(uploadedData)) - uploadStream.on('error', reject) - uploadStream.on('complete', file => { - t.is(file.name, 'test file streams') - resolve() - }) + const file = await uploadStream.complete + t.is(file.name, 'test file streams') + t.is(file.key.toString('hex'), '0000000000000000831f1ab870f945580000000000000000831f1ab870f94558') + t.is(file.size, dataSize) - uploadStream.end(Buffer.alloc(1024 * 1024)) + const singleConnData = await file.downloadBuffer({ + maxConnections: 1 }) + t.is(singleConnData.length, dataSize) + t.is(sha1(singleConnData), uploadedHash) + + const multiConnData = await file.downloadBuffer() + t.is(multiConnData.length, dataSize) + t.is(sha1(singleConnData), uploadedHash) }) test.serial('Should share files', t => { @@ -353,6 +363,34 @@ test.serial('Should not release zalgo when using shareFolder', async t => { }) }) +test.serial('Should upload and download huge files in parts', async t => { + const parts = 16 + const partSize = 128 * 1024 + const fullSize = parts * partSize + const uploadedData = Buffer.alloc(fullSize) + const uploadStream = storage.upload({ + name: 'test file streams 2', + key: Buffer.alloc(24), + size: fullSize + }) + + for (let i = 0; i < parts; i++) { + const data = testBuffer(partSize) + data.copy(uploadedData, partSize * i) + uploadStream.write(data) + await new Promise(resolve => setTimeout(resolve, 0)) + } + uploadStream.end() + + const file = await uploadStream.complete + t.is(file.name, 'test file streams 2') + t.is(file.size, fullSize) + + const downloadedData = await file.downloadBuffer() + t.is(downloadedData.length, fullSize) + t.is(sha1(downloadedData), sha1(uploadedData)) +}) + test.serial('Should logout from MEGA', t => { return new Promise((resolve, reject) => { storage.close((error) => { From 8029bcb4a1938e82833e81771643295969b44a41 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Mon, 14 Feb 2022 12:49:44 -0300 Subject: [PATCH 88/96] Fix downloading Wrong variable. Also handle backpressure. --- lib/file.mjs | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/lib/file.mjs b/lib/file.mjs index 981556c..61d96dd 100644 --- a/lib/file.mjs +++ b/lib/file.mjs @@ -329,30 +329,10 @@ class File extends EventEmitter { return response.arrayBuffer() }).then(data => { const dataBuffer = Buffer.from(data) - - // Check if this chunk is the next in the steam + chunkBuffer[chunkNumber] = dataBuffer if (nextChunk === chunkNumber) { - // If it is then write to the stream - decryptStream.write(dataBuffer) - - // Check if the next chunk is in the buffer - while (true) { - const bufferChunk = chunkBuffer[++nextChunk] - if (!bufferChunk) break - decryptStream.write(dataBuffer) - delete chunkBuffer[nextChunk] - } - - // Check if the stream stopped and if it's the last chunk then end the stream - if (stopped && lastStartedChunk === nextChunk) { - decryptStream.end() - } - } else { - // If it is not then add it to the buffer - chunkBuffer[chunkNumber] = dataBuffer + handleStreamWrite() } - - getChunk() }, error => { handleRetries(tries, error, error => { if (error) { @@ -371,6 +351,31 @@ class File extends EventEmitter { } } + const handleStreamWrite = () => { + let shouldWaitDrain + + // Check if the next chunk is in the buffer + while (true) { + const bufferChunk = chunkBuffer[nextChunk] + if (!bufferChunk) break + shouldWaitDrain = !decryptStream.write(bufferChunk) + delete chunkBuffer[nextChunk] + nextChunk++ + if (shouldWaitDrain) break + } + + // Check if the stream stopped and if it's the last chunk then end the stream + if (stopped && lastStartedChunk === nextChunk) { + decryptStream.end() + } + + if (shouldWaitDrain) { + decryptStream.once('drain', handleStreamWrite) + } else { + getChunk() + } + } + for (let i = 0; i < maxConnections; i++) { getChunk() } From 3245255cd73f0613d56bc67261973073c2c69b6c Mon Sep 17 00:00:00 2001 From: qgustavor Date: Mon, 14 Feb 2022 12:49:55 -0300 Subject: [PATCH 89/96] 1.0.0-alpha.7 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bd668b0..8176274 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "1.0.0-alpha.6", + "version": "1.0.0-alpha.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "1.0.0-alpha.6", + "version": "1.0.0-alpha.7", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index b6e70ac..8ea0486 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "1.0.0-alpha.6", + "version": "1.0.0-alpha.7", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "types/cjs.d.ts", From cfffe3358f6bebb386d47484d94abfcdc58032b3 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Mon, 14 Feb 2022 16:15:24 -0300 Subject: [PATCH 90/96] Fix types Children and parent were missing. MutableFile class is not exported. --- types/cjs.d.ts | 4 +++- types/es.d.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/types/cjs.d.ts b/types/cjs.d.ts index 2296fd4..9b570dc 100644 --- a/types/cjs.d.ts +++ b/types/cjs.d.ts @@ -87,6 +87,8 @@ declare namespace megajs { directory: boolean favorited: boolean loadedFile?: string + parent?: File + children?: File[] key: Nullable name: Nullable get createdAt (): number; @@ -104,7 +106,7 @@ declare namespace megajs { link (options: linkOpts | boolean, cb?: (error: err, url?: string) => void): Promise; } - export class MutableFile extends File { + export declare class MutableFile extends File { storage: Storage static packAttributes (attributes: JSON): Buffer; constructor (opts: FileOpts, storage: Storage); diff --git a/types/es.d.ts b/types/es.d.ts index 48824ae..e178a1d 100644 --- a/types/es.d.ts +++ b/types/es.d.ts @@ -80,6 +80,8 @@ export declare class File extends EventEmitter { directory: boolean favorited: boolean loadedFile?: string + parent?: File + children?: File[] key: Nullable name: Nullable get createdAt (): number; From 1d534af80fc3025b73e3df9367ecb9fe9556f258 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Mon, 14 Feb 2022 16:15:38 -0300 Subject: [PATCH 91/96] 1.0.0-alpha.8 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8176274..7080366 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "1.0.0-alpha.7", + "version": "1.0.0-alpha.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "1.0.0-alpha.7", + "version": "1.0.0-alpha.8", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index 8ea0486..8bd56c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "1.0.0-alpha.7", + "version": "1.0.0-alpha.8", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "types/cjs.d.ts", From 9b88cc88ce647cc63d858264710f9223750f3dd3 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 18 Feb 2022 00:58:14 -0300 Subject: [PATCH 92/96] Fix abort handling --- lib/api.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/api.mjs b/lib/api.mjs index 81493da..50b1117 100644 --- a/lib/api.mjs +++ b/lib/api.mjs @@ -124,7 +124,7 @@ class API extends EventEmitter { this.fetch(`${this.gateway}sc?${new URLSearchParams({ sn, sid: this.sid })}`, { method: 'POST', signal: controller.signal - }).catch(ignoreAbortError).then(response => response.json()).then(resp => { + }).then(response => response.json()).then(resp => { this.sn = undefined if (this.closed) return @@ -147,7 +147,7 @@ class API extends EventEmitter { } this.pull(resp.sn) } - }) + }).catch(ignoreAbortError) } wait (url, sn) { @@ -156,12 +156,12 @@ class API extends EventEmitter { this.fetch(url, { method: 'POST', signal: controller.signal - }).catch(ignoreAbortError).then(() => { + }).then(() => { // Body is ignored here // Errors were ignored in original mega package this.sn = undefined this.pull(sn) - }) + }).catch(ignoreAbortError) } close () { From 41bd26c9e4ccdb0f0e20182ea77e9865e5fe5497 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 18 Feb 2022 00:58:26 -0300 Subject: [PATCH 93/96] 1.0.0-alpha.9 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7080366..8af82bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "1.0.0-alpha.8", + "version": "1.0.0-alpha.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "1.0.0-alpha.8", + "version": "1.0.0-alpha.9", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index 8bd56c5..9a92208 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "1.0.0-alpha.8", + "version": "1.0.0-alpha.9", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "types/cjs.d.ts", From d5bc057cd09e7ad6abc1af7648667aa865441621 Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 18 Feb 2022 11:25:03 -0300 Subject: [PATCH 94/96] Attempt fix for promise never resolving Fix potential race condition. Split upload and download tests. --- lib/file.mjs | 3 +++ test/storage.test.mjs | 23 ++++++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/file.mjs b/lib/file.mjs index 61d96dd..25e41db 100644 --- a/lib/file.mjs +++ b/lib/file.mjs @@ -312,6 +312,9 @@ class File extends EventEmitter { const getChunk = () => { if (currentOffset > end) { stopped = true + if (lastStartedChunk === nextChunk) { + decryptStream.end() + } return } diff --git a/test/storage.test.mjs b/test/storage.test.mjs index 59a39a7..57c6eae 100644 --- a/test/storage.test.mjs +++ b/test/storage.test.mjs @@ -56,10 +56,9 @@ test.serial('Should not allow uploading without a size', t => { }) }) -test.serial('Should stream upload and download', async t => { +test.serial('Should stream upload', async t => { const dataSize = 2 * 1024 * 1024 const uploadedData = testBuffer(dataSize) - const uploadedHash = sha1(uploadedData) const uploadStream = storage.upload({ name: 'test file streams', key: Buffer.alloc(24), @@ -71,15 +70,20 @@ test.serial('Should stream upload and download', async t => { t.is(file.name, 'test file streams') t.is(file.key.toString('hex'), '0000000000000000831f1ab870f945580000000000000000831f1ab870f94558') t.is(file.size, dataSize) +}) +test.serial('Should stream download', async t => { + const file = storage.root.children.find(e => e.name === 'test file streams') + const uploadedData = testBuffer(file.size) + const uploadedHash = sha1(uploadedData) const singleConnData = await file.downloadBuffer({ maxConnections: 1 }) - t.is(singleConnData.length, dataSize) + t.is(singleConnData.length, file.size) t.is(sha1(singleConnData), uploadedHash) const multiConnData = await file.downloadBuffer() - t.is(multiConnData.length, dataSize) + t.is(multiConnData.length, file.size) t.is(sha1(singleConnData), uploadedHash) }) @@ -363,7 +367,8 @@ test.serial('Should not release zalgo when using shareFolder', async t => { }) }) -test.serial('Should upload and download huge files in parts', async t => { +let uploadedSha +test.serial('Should upload huge files in parts', async t => { const parts = 16 const partSize = 128 * 1024 const fullSize = parts * partSize @@ -385,10 +390,14 @@ test.serial('Should upload and download huge files in parts', async t => { const file = await uploadStream.complete t.is(file.name, 'test file streams 2') t.is(file.size, fullSize) + uploadedSha = sha1(uploadedData) +}) +test.serial('Should download files uploaded in parts', async t => { + const file = storage.root.children.find(e => e.name === 'test file streams 2') const downloadedData = await file.downloadBuffer() - t.is(downloadedData.length, fullSize) - t.is(sha1(downloadedData), sha1(uploadedData)) + t.is(downloadedData.length, file.size) + t.is(sha1(downloadedData), uploadedSha) }) test.serial('Should logout from MEGA', t => { From 28dcae1c8813e963b98468410cd5bb011d9de09c Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 18 Feb 2022 11:31:00 -0300 Subject: [PATCH 95/96] 1.0.0-alpha.10 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8af82bf..c31e66c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "1.0.0-alpha.9", + "version": "1.0.0-alpha.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "1.0.0-alpha.9", + "version": "1.0.0-alpha.10", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index 9a92208..f2fb4e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "1.0.0-alpha.9", + "version": "1.0.0-alpha.10", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "types/cjs.d.ts", From f1a34fcfcd7e0dc28a423f6f71769beaeb903fce Mon Sep 17 00:00:00 2001 From: qgustavor Date: Fri, 18 Feb 2022 22:03:28 -0300 Subject: [PATCH 96/96] 1.0.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c31e66c..fe82290 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "megajs", - "version": "1.0.0-alpha.10", + "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "megajs", - "version": "1.0.0-alpha.10", + "version": "1.0.0", "license": "MIT", "dependencies": { "abort-controller": "^3.0.0", diff --git a/package.json b/package.json index f2fb4e2..aaa27c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "megajs", - "version": "1.0.0-alpha.10", + "version": "1.0.0", "description": "Unofficial JavaScript SDK for MEGA", "main": "dist/main.node-cjs.js", "typings": "types/cjs.d.ts",