From d99378e3f8b0007dcc5f6aecb90e97ed056e0cd7 Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sat, 25 Mar 2023 19:44:37 +0500 Subject: [PATCH 01/38] feat: dontTrustApi fro Azbit --- package.json | 2 +- trade/trader_azbit.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b1ec4936..e888db35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adamant-tradebot", - "version": "5.4.0", + "version": "5.4.1", "description": "ADAMANT Trading and Market Making bot", "main": "index.js", "scripts": { diff --git a/trade/trader_azbit.js b/trade/trader_azbit.js index 2c6b823c..3e3ef4e7 100644 --- a/trade/trader_azbit.js +++ b/trade/trader_azbit.js @@ -167,6 +167,7 @@ module.exports = (apiKey, secretKey, pwd, log, publicOnly = false) => { supportCoinNetworks: true, // Use v2 to get info allowAmountForMarketBuy: false, amountForMarketOrderNecessary: false, + dontTrustApi: true, // Azbit can return false empty order list even if there are orders }; }, @@ -292,7 +293,7 @@ module.exports = (apiKey, secretKey, pwd, log, publicOnly = false) => { let orderStatus; if (data.isCanceled) { orderStatus = 'cancelled'; - } if (data.initialAmount === data.amount) { + } else if (data.initialAmount === data.amount) { orderStatus = 'new'; } else if (data.amount === 0) { orderStatus = 'filled'; From 0be52759adfb28d8d2576bf43d28e194b988a03a Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sat, 25 Mar 2023 19:49:47 +0500 Subject: [PATCH 02/38] feat: consider dontTrustApi in updateOrders() --- trade/orderUtils.js | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/trade/orderUtils.js b/trade/orderUtils.js index d378f653..d7d6b94d 100644 --- a/trade/orderUtils.js +++ b/trade/orderUtils.js @@ -258,6 +258,63 @@ module.exports = { log.log(`orderUtils: Updating ${dbOrders.length} ${samePurpose}dbOrders on ${pair} for ${moduleName}, noCache: ${noCache}, hideNotOpened: ${hideNotOpened}… Received ${exchangeOrders?.length} orders from exchange.`); if (exchangeOrders) { + + // If we don't trust exchange API, it can return false empty order list even if there are orders. Re-check then. + // Bullshit, but it's a reality. We'll deal with it. + + if ( + dbOrders.length !== 0 && + exchangeOrders.length === 0 && + traderapi.features().dontTrustApi && + traderapi.getOrderDetails + ) { + let allOrdersAreUnknown = true; + let falseResultDetails; + + for (const dbOrder of dbOrders) { + if ( + !dbOrder.isVirtual && + (!dbOrder.apikey || dbOrder.apikey === config.apikey) + ) { + const orderDetails = await traderapi.getOrderDetails(dbOrder._id, dbOrder.pair); + const orderStatus = orderDetails?.status; + + /** + * !orderStatus, 'new', 'part_filled' -> API failed, don't trust + * 'filled', 'cancelled' -> Empty order list is still possible + * 'unknown' means Order doesn't exist or Wrong orderId. It's possible/accepted, if: + * - Order is virtual (ld-order which is not created) + * - Order placed with other API keys. We check it where an order stores API key. + * - On other exchange. Don't check it as we already filtered orders by exchange. + * - If any order is not 'unknown', empty order list is still possible + */ + + if (!orderStatus) { + falseResultDetails = `No order ${dbOrder._id} status received. Request result is ${JSON.stringify(orderDetails)}`; + break; + } + + if (['new', 'part_filled'].includes(orderStatus)) { + falseResultDetails = `Order ${dbOrder._id} status is ${orderStatus}`; + break; + } + + if (orderStatus !== 'unknown') { + allOrdersAreUnknown = false; + } + } + } // for (const dbOrder of dbOrders) + + if (!falseResultDetails && allOrdersAreUnknown) { + falseResultDetails = `All of ${dbOrders.length} ${samePurpose}dbOrders are in unknown status`; + } + + if (falseResultDetails) { + log.warn(`orderUtils: It seems ${config.exchangeName} API returned false empty order list: ${falseResultDetails}. Leaving ${samePurpose}dbOrders as is.`); + return dbOrders; + } + } + for (const dbOrder of dbOrders) { const orderInfoString = `${dbOrder.purpose}-order${onWhichAccount} with params: id=${dbOrder._id}, type=${dbOrder.type}, pair=${dbOrder.pair}, price=${dbOrder.price}, coin1Amount=${dbOrder.coin1AmountInitial || dbOrder.coin1Amount}, coin2Amount=${dbOrder.coin2Amount}`; From 597084dcf09941e2893b53998936933351ef1a2e Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sat, 25 Mar 2023 20:28:48 +0500 Subject: [PATCH 03/38] =?UTF-8?q?fix:=20count=20=C2=B1=20spread%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helpers/const.js | 2 +- helpers/utils.js | 8 ++++---- trade/mm_liquidity_provider.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helpers/const.js b/helpers/const.js index f34f94c9..0d3e0bac 100644 --- a/helpers/const.js +++ b/helpers/const.js @@ -11,7 +11,7 @@ module.exports = { PRINT_DECIMALS: 8, // For pretty print, 9.12345678 ETH MAX_ADM_MESSAGE_LENGTH: 10000, EXECUTE_IN_ORDER_BOOK_MAX_PRICE_CHANGE_PERCENT: 0.15, // In-orderbook trading: don't change price by mm-order more, than 0.15% - LIQUIDITY_SS_MAX_SPREAD_PERCENT: 0.3, // Liquidity spread support orders: Maintain spread percent + LIQUIDITY_SS_MAX_SPREAD_PERCENT: 0.2, // Liquidity spread support orders: Maintain spread percent DEFAULT_ORDERBOOK_ORDERS_COUNT: 15, LADDER_STATES: ['Not placed', 'Open', 'Filled', 'Partly filled', 'Cancelled', 'Missed', 'To be removed', 'Removed'], LADDER_OPENED_STATES: ['Open', 'Partly filled'], diff --git a/helpers/utils.js b/helpers/utils.js index eff80ca7..7f8a3c97 100644 --- a/helpers/utils.js +++ b/helpers/utils.js @@ -775,8 +775,8 @@ module.exports = { liquidity[key].totalCount = 0; liquidity[key].amountTotal = 0; liquidity[key].amountTotalQuote = 0; - liquidity[key].lowPrice = averagePrice * (1 - liquidity[key].spreadPercent/100/2); - liquidity[key].highPrice = averagePrice * (1 + liquidity[key].spreadPercent/100/2); + liquidity[key].lowPrice = averagePrice * (1 - liquidity[key].spreadPercent/100); + liquidity[key].highPrice = averagePrice * (1 + liquidity[key].spreadPercent/100); liquidity[key].spread = averagePrice * liquidity[key].spreadPercent / 100; // average price is the same for any spread } @@ -1282,8 +1282,8 @@ module.exports = { // Second, check mm_liquiditySpreadPercentMin: 'depth' orders should be not close to mid of spread if (order.subPurpose !== 'ss' && tradeParams.mm_liquiditySpreadPercentMin) { - const innerLowPrice = orderBookInfo.averagePrice * (1 - tradeParams.mm_liquiditySpreadPercentMin/100/2) + roughness; - const innerHighPrice = orderBookInfo.averagePrice * (1 + tradeParams.mm_liquiditySpreadPercentMin/100/2) - roughness; + const innerLowPrice = orderBookInfo.averagePrice * (1 - tradeParams.mm_liquiditySpreadPercentMin/100) + roughness; + const innerHighPrice = orderBookInfo.averagePrice * (1 + tradeParams.mm_liquiditySpreadPercentMin/100) - roughness; if (order.price > innerLowPrice && order.price < innerHighPrice) { return true; } diff --git a/trade/mm_liquidity_provider.js b/trade/mm_liquidity_provider.js index 4a80c5b4..6543a527 100644 --- a/trade/mm_liquidity_provider.js +++ b/trade/mm_liquidity_provider.js @@ -379,8 +379,8 @@ async function setPrice(type, orderBookInfo, subPurpose) { liqKoefMin = 0; liqKoefMax = constants.LIQUIDITY_SS_MAX_SPREAD_PERCENT/100; } else { - liqKoefMin = tradeParams.mm_liquiditySpreadPercentMin/100 / 2 || 0; - liqKoefMax = tradeParams.mm_liquiditySpreadPercent/100 / 2; + liqKoefMin = tradeParams.mm_liquiditySpreadPercentMin/100 || 0; + liqKoefMax = tradeParams.mm_liquiditySpreadPercent/100; } // Keep spread enough for in-spread trading From 83b7a30c84d2d3fe789a9bc9c83e40d9aff861d3 Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sun, 26 Mar 2023 14:51:37 +0500 Subject: [PATCH 04/38] feat: getLogString() in utils --- .eslintrc.js | 1 + helpers/utils.js | 92 ++++++++++++++++++++++++++++++++++-------------- 2 files changed, 66 insertions(+), 27 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 76f4fb9c..a3b888b8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,6 +16,7 @@ module.exports = { 'max-len': ['error', { 'code': 131, 'ignoreTrailingComments': true, + 'ignoreComments': true, 'ignoreUrls': true, 'ignoreStrings': true, 'ignoreTemplateLiterals': true, diff --git a/helpers/utils.js b/helpers/utils.js index 7f8a3c97..03317030 100644 --- a/helpers/utils.js +++ b/helpers/utils.js @@ -20,6 +20,7 @@ module.exports = { /** * Returns object with all of properties as a string for logging + * @param {*} object Data to convert to string * @return {String} */ getFullObjectString(object) { @@ -27,6 +28,27 @@ module.exports = { return util.inspect(object, { showHidden: false, depth: null, colors: true }); }, + /** + * Converts to a string and truncates for logging + * @param {String} data Data to log + * @param {Number} length Max length of output. Optional. + * @param {Boolean} multiLineObjects If get full object output + * @return {String} + */ + getLogString(data, length, multiLineObjects = true) { + if (this.isObject(data) && multiLineObjects) { + data = this.getFullObjectString(data); + } else { + data = JSON.stringify(data); + } + + if (data.length > length) { + data = data.slice(0, length-1) + '…'; + } + + return data; + }, + /** * Returns current time in milliseconds since Unix Epoch * The Unix epoch is 00:00:00 UTC on 1 January 1970 (an arbitrary date) @@ -48,6 +70,12 @@ module.exports = { return Math.floor((time - EPOCH) / 1000); }, + /** + * Pads the value with '0' until length of 2 digits + * 2 -> '02' + * @param {Number} num Value to pad + * @returns {string} + */ padTo2Digits(num) { return num.toString().padStart(2, '0'); }, @@ -1119,66 +1147,76 @@ module.exports = { /** * Calculates clean (non-cheater) price for the order book + * It depends on: + * Distance^2 from smart price: bigger distance means higher probability of cheater order + * Amount of order (accumulated): smaller amount means higher probability of cheater order + * Koef threshold: bigger koef means higher probability of cheater order * @param {Array of object} items Bids or asks, received using traderapi.getOrderBook() - * @param {String} type Items are 'asks' or 'bids'? - * @param {Array of object} liquidity Liquidity info, calculated in getOrderBookInfo() + * @param {String} type Items are 'asks' or 'bids'? Asks arranged from low to high, Bids from high to low (spread in the center). + * @param {Array of object} liquidity Liquidity info, calculated in getOrderBookInfo(). Using percent50 liquidity for total. * @param {Number} smartPrice Smart price for the order book - * @param {Number} koef How to understand we achieve clean price. The more koef, the farther smart price from spread - * @return {Number} Clean price. It depends on distance from smart price + * @param {Number} koef How to understand we achieve clean price + * @return {Number} Clean price */ - getCleanPrice(items, type, liquidity, smartPrice, koef = 0.02) { + getCleanPrice(items, type, liquidity, smartPrice, koef = 3) { try { let cleanPrice; + let a = 0; let t = 0; let c = 0; let c_t = 0; let d = 0; let d2 = 0; let ct_d2 = 0; - const enough_ct_d2 = koef; const table = []; + // Each iteration el.price moves towards to Smart price + for (let i = 0; i < items.length; i++) { const el = items[i]; + if (type === 'asks') { - if (items[i].price > smartPrice) break; + if (el.price > smartPrice) break; a = el.amount; t = liquidity['percent50'].amountAsks; } else { - if (items[i].price < smartPrice) break; + if (el.price < smartPrice) break; a = el.amount * el.price; t = liquidity['percent50'].amountBidsQuote; } d = this.numbersDifferencePercent(el.price, smartPrice) / 100; - d2 = d * d; + d2 = d * d; // Decreases every iteration. For order with smartPrice (last iteration) it equals 0. c += a; - c_t = c / t; - ct_d2 = c_t / d2; + c_t = c / t; // Grows each iteration + ct_d2 = c_t / d2; // Grows each iteration. For order with smartPrice (last iteration) it equals Infinity. - if (!cleanPrice && (ct_d2 > enough_ct_d2 || ct_d2 === Infinity)) { - cleanPrice = el.price; + if (ct_d2 < koef && items[i + 1]) { // While ct_d2 is less than Koef, consider an order as a cheater price + cleanPrice = items[i + 1].price; } // This table is only for logging - if (!cleanPrice) { - table.push({ - items: items.length, - total: +t.toFixed(2), - price: el.price.toFixed(8), - d: +d.toFixed(2), - d2: +d2.toFixed(4), - a: a.toFixed(8), - c: +c.toFixed(8), - c_t: +c_t.toFixed(5), - ct_d2: +ct_d2.toFixed(5), - }); - } + table.push({ + items: items.length, + total: +t.toFixed(2), + price: el.price.toFixed(8), + d: +d.toFixed(2), + d2: +d2.toFixed(4), + a: a.toFixed(8), + c: +c.toFixed(8), + c_t: +c_t.toFixed(5), + ct_d2: +ct_d2.toFixed(5), + isCheater: ct_d2 < koef, + }); + + } // For i + if (!cleanPrice) { // Set Clean price as the best bid/ask + cleanPrice = items?.[0].price; } // See this table to understand the magic // console.table(table); - // console.log(`cleanPrice for ${type} and ${smartPrice.toFixed(8)} smart price is ${cleanPrice.toFixed(8)}\n`); + // console.log(`Clean price is ${cleanPrice.toFixed(8)} for ${type} when Smart price = ${smartPrice.toFixed(8)} and Koef = ${koef}.\n`); return cleanPrice; From 8e2b8f1ab5283c848b7458fabcfbf56842e554d5 Mon Sep 17 00:00:00 2001 From: confleux Date: Mon, 10 Apr 2023 17:23:32 +0300 Subject: [PATCH 05/38] chore: add stakecube api --- trade/api/stakecube_api.js | 294 +++++++++++++++++++++++++++++++++++++ 1 file changed, 294 insertions(+) create mode 100644 trade/api/stakecube_api.js diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js new file mode 100644 index 00000000..572e874b --- /dev/null +++ b/trade/api/stakecube_api.js @@ -0,0 +1,294 @@ +const crypto = require('crypto'); +const axios = require('axios'); + +module.exports = function() { + let WEB_BASE = 'https://stakecube.io/api/v2'; + let config = { + 'apiKey': '', + 'secret_key': '', + 'tradePwd': '', + }; + let log = {}; + + /** + * Handles response from API + * @param {Object} responseOrError + * @param resolve + * @param reject + * @param {String} bodyString + * @param {String} queryString + * @param {String} url + */ + const handleResponse = (responseOrError, resolve, reject, bodyString, queryString, url) => { + const httpCode = responseOrError?.status || responseOrError?.response?.status; + const httpMessage = responseOrError?.statusText || responseOrError?.response?.statusText; + + const scData = responseOrError?.data || responseOrError?.response?.data; + + const scResult = scData?.result; + const scStatus = scData?.success; + const scError = scData?.error; + const scErrorInfo = scStatus ? `[No error code]` : `[${scError}]`; + + const errorMessage = httpCode ? `${httpCode} ${httpMessage}, ${scErrorInfo}` : String(responseOrError); + const reqParameters = queryString || bodyString || '{ No parameters }'; + + try { + if ([200, 201].includes(httpCode) && scData && scStatus) { + resolve(scResult); + } else if ([200, 201].includes(httpCode) && scData) { + scResult.errorMessage = scError; + resolve(scResult); + } else if ([404].includes(httpCode)) { + log.warn(`Request to ${url} with data ${reqParameters} failed: ${errorMessage}. Invalid request. Rejecting…`); + reject(errorMessage); + } + } catch (e) { + log.warn(`Error while processing response of request to ${url} with data ${reqParameters}: ${e}. Data object I've got: ${JSON.stringify(scData)}.`); + reject(`Unable to process data: ${JSON.stringify(scData)}. ${e}`); + } + }; + + /** + * @param {String} path + * @param {Object} data + * @param {String} type + * @returns {Promise|Promise} + */ + function protectedRequest(path, data, type = 'get') { + let url = `${WEB_BASE}${path}`; + const urlBase = url; + + const pars = []; + for (const key in data) { + const v = data[key]; + pars.push(key + '=' + v); + } + + let queryString = pars.join('&'); + + try { + const nonce = Date.now(); + queryString = queryString.length === 0 ? `nonce=${nonce}` : `nonce=${nonce}&` + queryString; + + const sign = setSign(config.secret_key, queryString); + + queryString = queryString + `&signature=${sign}`; + } catch (e) { + log.error(`An error occurred while generating request signature: ${e}`); + return Promise.reject(e); + } + + const bodyString = queryString; + + if (queryString && type !== 'post') { + url = url + '?' + queryString; + } + + return new Promise((resolve, reject) => { + const httpOptions = { + url: url, + method: type, + timeout: 10000, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'X-API-KEY': config.apiKey, + }, + data: type === 'get' || type === 'delete' ? undefined : bodyString, + }; + + axios(httpOptions) + .then((response) => handleResponse(response, resolve, reject, bodyString, queryString, urlBase)) + .catch((error) => handleResponse(error, resolve, reject, bodyString, queryString, urlBase)); + }); + } + + function publicRequest(path, data, type = 'get') { + let url = `${WEB_BASE}${path}`; + const urlBase = url; + + const pars = []; + for (const key in data) { + const v = data[key]; + pars.push(key + '=' + v); + } + + const queryString = pars.join('&'); + if (queryString && type !== 'post') { + url = url + '?' + queryString; + } + + return new Promise((resolve, reject) => { + const httpOptions = { + url: url, + method: type, + timeout: 30000, + }; + + axios(httpOptions) + .then((response) => handleResponse(response, resolve, reject, undefined, queryString, urlBase)) + .catch((error) => handleResponse(error, resolve, reject, undefined, queryString, urlBase)); + }); + } + + /** + * Sign string + * @param {String} secret + * @param {String} str + * @returns {string} + */ + function setSign(secret, str) { + return crypto + .createHmac('sha256', secret) + .update(`${str}`) + .digest('hex'); + } + + const EXCHANGE_API = { + setConfig: function(apiServer, apiKey, secretKey, tradePwd, logger, publicOnly = false) { + if (apiServer) { + WEB_BASE = apiServer; + } + + if (logger) { + log = logger; + } + + if (!publicOnly) { + config = { + 'apiKey': apiKey, + 'secret_key': secretKey, + 'tradePwd': tradePwd, + }; + } + }, + + /** + * List of user balances for all currencies + * @return {Promise} + * https://www.gate.io/docs/developers/apiv4/en/#list-spot-accounts + */ + getBalances: function() { + return protectedRequest('/user/account', {}, 'get'); + }, + + /** + * Query account active orders + * @param {String} symbol In StakeCube format as BTC_USDT + * @param {Number} limit Number of records to return. Default is 100. + * @return {Promise} + * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#my-open-orders + */ + getOrders: async function(symbol, limit = 100) { + const data = { + market: symbol, + limit, + }; + + return protectedRequest('/exchange/spot/myOpenOrder', data, 'get'); + }, + + /** + * Places an order + * @param {String} symbol In StakeCube format as BTC_USDT + * @param {Number} amount Order amount in coin1 + * @param {Number} price Order price + * @param {String} side 'BUY' or 'SELL'. StakeCube supports only uppercase side parameter. + * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#order + */ + addOrder: function(symbol, amount, price, side) { + const data = { + market: symbol, + side: side.toUpperCase(), + price, + amount, + }; + + return protectedRequest('/exchange/spot/order', data, 'post'); + }, + + /** + * Cancel an order + * @param {String} orderId Example 285088438163 + * @return {Promise} + * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#cancel + */ + cancelOrder: function(orderId) { + const data = { + orderId, + }; + + return protectedRequest('/exchange/spot/cancel', data, 'post'); + }, + + /** + * Cancel all orders + * @param {String} symbol In StakeCube format as BTC_USDT + * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#cancel-all + */ + cancelAllOrders: function(symbol) { + const data = { + market: symbol, + }; + + return protectedRequest('/exchange/spot/cancelAll', data, 'post'); + }, + + /** + * Get market depth + * @param {String} symbol Trading pair in StakeCube format as BTC_USDT + * @return {Promise} + * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#orderbook + */ + orderBook: function(symbol) { + const data = { + market: symbol, + }; + + return publicRequest('/exchange/spot/orderbook', data, 'get'); + }, + + /** + * Get trades history + * @param {String} symbol Trading pair in StakeCube format as BTC_USDT + * @param {Number} limit Number of records to return. Default: 100, Minimum: 1, Maximum: 1000. + * @return {Promise>} Last trades + * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#trades + */ + getTradesHistory: function(symbol, limit ) { + const data = { + market: symbol, + limit, + }; + + return publicRequest('/exchange/spot/trades', data, 'get'); + }, + + /** + * Get info on all markets + * @return {Promise} + * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#markets + */ + markets: function() { + return publicRequest('/exchange/spot/markets', {}, 'get'); + }, + + /** + * Get trade info for a ticker + * @param {String} symbol In StakeCube format as DOGE_SCC + * @return {Promise} + * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#markets + */ + ticker: function(symbol) { + const data = { + market: symbol, + }; + + return publicRequest('/exchange/spot/markets', data, 'get'); + }, + }; + + return EXCHANGE_API; +}; + +module.exports.axios = axios; // for setup axios mock adapter From 13281144ca83e48c450237b87d90a6bf34a67746 Mon Sep 17 00:00:00 2001 From: confleux Date: Mon, 10 Apr 2023 17:30:54 +0300 Subject: [PATCH 06/38] chore: add stakecube tradeParams --- trade/settings/tradeParams_stakecube.js | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 trade/settings/tradeParams_stakecube.js diff --git a/trade/settings/tradeParams_stakecube.js b/trade/settings/tradeParams_stakecube.js new file mode 100644 index 00000000..843d8bc7 --- /dev/null +++ b/trade/settings/tradeParams_stakecube.js @@ -0,0 +1,26 @@ +module.exports = { + 'mm_buyPercent': 0.67, + 'mm_minInterval': 5000, + 'mm_maxInterval': 22000, + 'mm_isActive': false, + 'mm_minAmount': 5, + 'mm_maxAmount': 100, + 'mm_Policy': 'optimal', + 'mm_isOrderBookActive': true, + 'mm_orderBookHeight': 14, + 'mm_orderBookOrdersCount': 22, + 'mm_orderBookMaxOrderPercent': 50, + 'mm_isLiquidityActive': false, + 'mm_liquiditySellAmount': 100, + 'mm_liquidityBuyQuoteAmount': 50, + 'mm_liquiditySpreadPercent': 2, + 'mm_liquidityTrend': 'middle', + 'mm_isPriceWatcherActive': false, + 'mm_priceWatcherLowPriceInSourceCoin': 0, + 'mm_priceWatcherMidPriceInSourceCoin': 0, + 'mm_priceWatcherHighPriceInSourceCoin': 0, + 'mm_priceWatcherDeviationPercent': 0, + 'mm_priceWatcherSource': '#', + 'mm_priceWatcherSourcePolicy': 'smart', + 'mm_priceWatcherAction': 'fill', +}; From a06606c809f49010cdea826059730a0aa509eee0 Mon Sep 17 00:00:00 2001 From: confleux Date: Mon, 10 Apr 2023 17:31:03 +0300 Subject: [PATCH 07/38] chore: add stakecube trader --- trade/trader_stakecube.js | 642 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 642 insertions(+) create mode 100644 trade/trader_stakecube.js diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js new file mode 100644 index 00000000..a365961c --- /dev/null +++ b/trade/trader_stakecube.js @@ -0,0 +1,642 @@ +const StakeCubeApi = require('./api/stakecube_api'); +const utils = require('../helpers/utils'); + +// API endpoints: +const apiServer = 'https://stakecube.io/api/v2'; +const exchangeName = 'StakeCube'; + +module.exports = ( + apiKey, + secretKey, + pwd, + log, + publicOnly = false, + loadMarket = true, +) => { + const stakeCubeApiClient = StakeCubeApi(); + + stakeCubeApiClient.setConfig(apiServer, apiKey, secretKey, pwd, log, publicOnly); + + // Fulfill markets on initialization + if (loadMarket) { + getMarkets(); + } + + /** + * Get info on all markets or return info on a specific market + * @param {String} pair In classic format like BTC/USDT. If not provided, update all markets. + * @returns {Promise|*} + */ + function getMarkets(pair) { + const paramString = `pair: ${pair}`; + + if (module.exports.gettingMarkets) return; + if (module.exports.exchangeMarkets) return module.exports.exchangeMarkets[pair]; + + module.exports.gettingMarkets = true; + return new Promise((resolve) => { + stakeCubeApiClient.markets().then((markets) => { + try { + if (markets.errorMessage) { + log.warn(`API request getMarkets(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + resolve(undefined); + } + + const result = {}; + + Object.entries(markets).forEach(([pairName, market]) => { + const pair = deformatPairName(pairName); + + result[pair.pairReadable] = { + pairReadable: pair.pairReadable, + pairPlain: pair.pair, + coin1: market.tradeMarket, // base + coin2: market.baseMarket, // quote + coin1Decimals: +market.tradeMinDecimal, + coin2Decimals: +market.baseMinDecimal, + coin1Precision: utils.getPrecision(+market.tradeMinDecimal), + coin2Precision: utils.getPrecision(+market.baseMinDecimal), + coin1MinAmount: null, + coin1MaxAmount: null, + coin2MinAmount: null, + coin2MaxAmount: null, + coin2MinPrice: null, + coin2MaxPrice: null, + minTrade: null, + status: market.status === 'ACTIVE' ? 'ONLINE' : 'OFFLINE', + }; + }); + + if (Object.keys(result).length > 0) { + module.exports.exchangeMarkets = result; + log.log(`Received info about ${Object.keys(result).length} markets on ${exchangeName} exchange.`); + } + + resolve(result); + } catch (e) { + log.warn(`Error while processing getMarkets(${paramString}) request: ${e}`); + return undefined; + } + }).catch((err) => { + log.warn(`API request getMarkets(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + resolve(undefined); + }).finally(() => { + module.exports.gettingMarkets = false; + }); + }); + } + + return { + getMarkets, + + get markets() { + return module.exports.exchangeMarkets; + }, + + /** + * Get market info for a pair + * @param pair In classic format like BTC/USDT + * @returns {Promise<*>|*} + */ + marketInfo(pair) { + return getMarkets(pair); + }, + + features() { + return { + getMarkets: true, + getCurrencies: false, + placeMarketOrder: false, + getDepositAddress: false, + getTradingFees: false, + getAccountTradeVolume: false, + createDepositAddressWithWebsiteOnly: false, + getFundHistory: false, + getFundHistoryImplemented: false, + supportCoinNetworks: false, + allowAmountForMarketBuy: false, + amountForMarketOrderNecessary: true, + }; + }, + + /** + * List of account balances for all currencies + * @param {Boolean} nonzero + * @returns {Promise} + */ + async getBalances(nonzero = true) { + const paramString = `nonzero: ${nonzero}`; + + let userData; + + try { + userData = await stakeCubeApiClient.getBalances(); + + if (userData.errorMessage) { + log.warn(`API request getBalances(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + } catch (err) { + log.warn(`API request getBalances(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + + try { + let result = []; + + userData.wallets.forEach((crypto) => { + result.push({ + code: crypto.asset, + free: +crypto.balance, + freezed: +crypto.balanceInOrder, + total: +crypto.balance + +crypto.balanceInOrder, + }); + }); + + if (nonzero) { + result = result.filter((crypto) => crypto.free || crypto.freezed); + } + + return result; + } catch (e) { + log.warn(`Error while processing getBalances(${paramString}) request: ${e}`); + return undefined; + } + }, + + /** + * List of all account open orders + * @param {String} pair In classic format as BTC/USD + * @returns {Promise<*[]|undefined>} + */ + async getOpenOrders(pair) { + const paramString = `pair: ${pair}`; + const pair_ = formatPairName(pair); + + const marketInfo = this.marketInfo(pair); + + if (!marketInfo) { + log.warn(`Unable to place an order on ${exchangeName} exchange. I don't have info about market ${pair}`); + return undefined; + } + + let orders; + + try { + orders = await stakeCubeApiClient.getOrders(pair_.pair); + + if (orders.errorMessage) { + if (orders.errorMessage === 'no data') { + return []; + } else { + log.warn(`API request getOpenOrders(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${orders.errorMessage}`); + return undefined; + } + } + } catch (err) { + log.warn(`API request getOpenOrders(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + + try { + const result = []; + + orders.forEach((order) => { + let orderStatus; + const pair = deformatPairName(order.market); + + const amountLeft = +order.amount - +order.executedAmount; + + if (+order.executedAmount && amountLeft) { + orderStatus = 'part_filled'; + } else if (amountLeft) { + orderStatus = 'new'; + } else { + orderStatus = 'filled'; + } + + result.push({ + orderId: order.id?.toString(), + symbol: pair.pairReadable, + price: +order.price, + side: order.side.toLowerCase(), // 'buy' or 'sell' + type: 'limit', // StakeCube supports only limit orders + timestamp: Date.parse(order.placed), // e.g. StakeCube timestamp (order.placed) 2023-04-10 10:17:03, converting to 1681111023000 + amount: +order.amount, + amountExecuted: +order.executedAmount, + amountLeft, + status: orderStatus, + }); + }); + + return result; + } catch (e) { + log.warn(`Error while processing getOpenOrders(${paramString}) request: ${e}`); + return undefined; + } + }, + + /** + * Cancel an order + * @param {String} orderId Example: 285088438163 + * @param {String} side 'buy' or 'sell'. Not used for StakeCube. + * @param {String} pair In classic format as BTC/USDT. Not used for StakeCube. + * @returns {Promise} + */ + async cancelOrder(orderId, side, pair) { + const paramString = `orderId: ${orderId}, pair: ${pair}`; + const pair_ = formatPairName(pair); + + try { + const data = await stakeCubeApiClient.cancelOrder(orderId); + + if (data.errorMessage) { + if (data.errorMessage === 'Order already canceled or filled') { + log.warn(`Order ${orderId} on ${pair_.pairReadable} pair is already canceled or filled`); + return true; + } else { + log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${data.errorMessage}`); + return undefined; + } + } + + if (data.orderId === orderId) { + log.log(`Cancelling order ${orderId} on ${pair_.pairReadable} pair…`); + return true; + } else { + log.warn(`Failed to cancel order ${orderId} on ${pair_.pairReadable} pair: No details.`); + return false; + } + } catch (err) { + log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + }, + + /** + * Cancel all orders on a specific pair + * @param {String} pair In classic format as BTC/USD + * @param {String} side Cancel buy or sell orders. Cancel both if not set. Not used for StakeCube. + * @returns {Promise} + */ + async cancelAllOrders(pair, side = '') { + const paramString = `pair: ${pair}, side: ${side}`; + const pair_ = formatPairName(pair); + + try { + const data = await stakeCubeApiClient.cancelAllOrders(pair_.pair); + + if (data.errorMessage) { + if (data.errorMessage === 'no open order') { + log.log(`No open orders on ${pair_.pairReadable}`); + return true; + } else { + log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${data.errorMessage}`); + return undefined; + } + } + + return true; + } catch (err) { + log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + + // return new Promise((resolve) => { + // stakeCubeApiClient.cancelAllOrders(pair_.pair).then((data) => { + // // if (data.length === 0 || data.find((order) => order.status === 'cancelled')) { + // // log.log(`Cancelling all ${data.length}${sideString} on ${pair_.pairReadable} orders…`); + // // resolve(true); + // // } else { + // // const errorMessage = `${data.gateioErrorInfo}`; + // // log.log(`Unable to cancel all ${data.length}${sideString} orders on ${pair_.pairReadable} pair: ${errorMessage || 'No details'}.`); + // // resolve(false); + // // } + // }).catch((err) => { + // log.warn(`API request cancelAllOrders(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + // resolve(undefined); + // }); + // }); + }, + + /** + * Places an order + * @param {String} side 'buy' or 'sell' + * @param {String} pair In classic format like BTC/USD + * @param {Number} price Order price + * @param {Number} coin1Amount Base coin amount. Provide either coin1Amount or coin2Amount. + * @param {Number} limit StakeCube supports only limit orders + * @param {Number} coin2Amount Quote coin amount. Provide either coin1Amount or coin2Amount. + * @returns {Promise|undefined} + */ + async placeOrder(side, pair, price, coin1Amount, limit = 1, coin2Amount) { + const paramString = `side: ${side}, pair: ${pair}, price: ${price}, coin1Amount: ${coin1Amount}, limit: ${limit}, coin2Amount: ${coin2Amount}`; + + const marketInfo = this.marketInfo(pair); + + let message; + + if (!marketInfo) { + message = `Unable to place an order on ${exchangeName} exchange. I don't have info about market ${pair}.`; + log.warn(message); + return { + message, + }; + } + + // for Limit orders, calculate coin1Amount if only coin2Amount is provided + if (!coin1Amount && coin2Amount && price) { + coin1Amount = coin2Amount / price; + } + + // for Limit orders, calculate coin2Amount if only coin1Amount is provided + let coin2AmountCalculated; + if (!coin2Amount && coin1Amount && price) { + coin2AmountCalculated = coin1Amount * price; + } + + if (coin1Amount) { + coin1Amount = +(+coin1Amount).toFixed(marketInfo.coin1Decimals); + } + if (coin2Amount) { + coin2Amount = +(+coin2Amount).toFixed(marketInfo.coin2Decimals); + } + if (price) { + price = +(+price).toFixed(marketInfo.coin2Decimals); + } + + if (coin1Amount && coin1Amount < marketInfo.coin1MinAmount) { // coin1Amount may be null + message = `Unable to place an order on ${exchangeName} exchange. Order amount ${coin1Amount} ${marketInfo.coin1} is less minimum ${marketInfo.coin1MinAmount} ${marketInfo.coin1} on ${marketInfo.pairReadable} pair.`; + log.warn(message); + return { + message, + }; + } + + if (coin2Amount && coin2Amount < marketInfo.coin2MinAmount) { // coin2Amount may be null, and skip coin2AmountCalculated checking, it's for market order only + message = `Unable to place an order on ${exchangeName} exchange. Order volume ${coin2Amount} ${marketInfo.coin2} is less minimum ${marketInfo.coin2MinAmount} ${marketInfo.coin2} on ${marketInfo.pairReadable} pair.`; + log.warn(message); + return { + message, + }; + } + + const order = {}; + let output; + + if (limit) { // Limit order + const pairName = formatPairName(pair); + output = `${side} ${coin1Amount} ${pairName.coin1} at ${price} ${pairName.coin2}.`; + + const order = {}; + let orderId; + let errorMessage; + let response; + + try { + response = await stakeCubeApiClient.addOrder(marketInfo.pairPlain, coin1Amount, price, side); + + orderId = response?.orderId; + errorMessage = response?.errorMessage; + } catch (err) { + message = `API request addOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}.`; + log.warn(message); + order.orderId = false; + order.message = message; + + return order; + } + + if (orderId) { + message = `Order placed to ${output} Order Id: ${orderId}.`; + log.info(message); + order.orderId = orderId; + order.message = message; + } else if (!orderId && !errorMessage) { + message = `Order executed to ${output}`; + log.info(message); + order.orderId = null; + order.message = message; + } else { + const details = errorMessage ? ` Details: ${utils.trimAny(errorMessage, ' .')}.` : ' { No details }.'; + message = `Unable to place order to ${output}${details} Check parameters and balances.`; + log.warn(message); + order.orderId = false; + order.message = message; + } + + return order; + } else { // Market order + message = `Unable to place order to ${output} ${exchangeName} doesn't support Market orders.`; + log.warn(message); + order.orderId = false; + order.message = message; + return order; + } + + }, + + /** + * Get trade details for a market rates + * @param {String} pair In classic format as BTC/USD + * @returns {Promise} + */ + async getRates(pair) { + const paramString = `pair: ${pair}`; + const pair_ = formatPairName(pair); + + let ticker; + + try { + ticker = await stakeCubeApiClient.ticker(pair_.pair); + + if (ticker.errorMessage || !ticker[pair_.pair]) { + log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + } catch (err) { + log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + + let orderBook; + try { + orderBook = await stakeCubeApiClient.orderBook(pair_.pair); + + if (orderBook.errorMessage) { + log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + } catch (err) { + log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + + try { + ticker = ticker[pair_.pair]; + return { + ask: +orderBook.asks[orderBook.asks.length - 1]?.price, // assuming asks are sorted in descending order by price. We need the lowest ask + bid: +orderBook.bids[0]?.price, // assuming bids are sorted in descending order by price. We need the highest bid + volume: +ticker.volumeTrade24h, + volumeInCoin2: +ticker.volumeBase24h, + high: +ticker.high24h, + low: +ticker.low24h, + last: +ticker.lastPrice, + }; + } catch (e) { + log.warn(`Error while processing getRates(${paramString}) request: ${e}`); + return undefined; + } + }, + + /** + * Get market depth + * @param {String} pair In classic format as BTC/USDT + * @returns {Promise} + */ + async getOrderBook(pair) { + const paramString = `pair: ${pair}`; + const pair_ = formatPairName(pair); + + let book; + try { + book = await stakeCubeApiClient.orderBook(pair_.pair); + + if (book.errorMessage) { + log.warn(`API request getOrderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + } catch (err) { + log.warn(`API request getOrderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + + try { + const result = { + bids: [], + asks: [], + }; + + book.asks.forEach((crypto) => { + result.asks.push({ + amount: +crypto.amount, + price: +crypto.price, + count: 1, + type: 'ask-sell-right', + }); + }); + result.asks.sort((a, b) => { + return parseFloat(a.price) - parseFloat(b.price); + }); + + book.bids.forEach((crypto) => { + result.bids.push({ + amount: +crypto.amount, + price: +crypto.price, + count: 1, + type: 'bid-buy-left', + }); + }); + result.bids.sort((a, b) => { + return parseFloat(b.price) - parseFloat(a.price); + }); + + return result; + } catch (e) { + log.warn(`Error while processing orderBook(${paramString}) request: ${e}`); + return undefined; + } + }, + + /** + * Get trades history + * @param {String} pair In classic format as BTC/USDT + * @param {Number} limit Number of records to return + * @returns {Promise} + */ + async getTradesHistory(pair, limit) { + const paramString = `pair: ${pair}`; + const pair_ = formatPairName(pair); + + let trades = []; + try { + trades = await stakeCubeApiClient.getTradesHistory(pair_.pairPlain, limit); + + if (trades.errorMessage) { + log.warn(`API request getTradesHistory(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + } catch (err) { + log.warn(`API request getTradesHistory(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + + try { + const result = []; + trades.forEach((trade) => { + result.push({ + coin1Amount: +trade.amount, // amount in coin1 + price: +trade.price, // trade price + coin2Amount: +trade.amount * +trade.price, // quote in coin2 + date: Date.parse(trade.timeConverted), // e.g. StakeCube timestamp (trade.timeConverted) 2023-04-10 10:17:03, converting to 1681111023000 + type: trade.direction.toLowerCase(), // 'buy' or 'sell' + tradeId: null, + }); + }); + + // We need ascending sort order + result.sort(function(a, b) { + return parseFloat(a.date) - parseFloat(b.date); + }); + + return result; + } catch (e) { + log.warn(`Error while processing getTradesHistory(${paramString}) request: ${e}`); + return undefined; + } + }, + }; +}; + +/** + * Returns pair in StakeCube format like BTC_USDT + * @param pair Pair in any format + * @returns {Object} Pair, coin1, coin2 + */ +function formatPairName(pair) { + pair = pair?.toUpperCase(); + + if (pair.indexOf('-') > -1) { + pair = pair.replace('-', '_').toUpperCase(); + } else { + pair = pair.replace('/', '_').toUpperCase(); + } + + const [coin1, coin2] = pair.split('_'); + + return { + pair, + pairPlain: pair, + pairReadable: `${coin1}/${coin2}`, + coin1, + coin2, + }; +} + +/** + * Returns pair in classic format like BTC/USDT + * @param pair Pair in format BTC_USDT + * @returns {Object} + */ +function deformatPairName(pair) { + pair = pair?.toUpperCase(); + + const [coin1, coin2] = pair.split('_'); + + return { + pair: `${coin1}_${coin2}`, // BTC_USDT + pairReadable: `${coin1}/${coin2}`, // BTC/USDT + coin1, + coin2, + }; +} From d7474f798823f6aeaa78321e60990b6e10f1227f Mon Sep 17 00:00:00 2001 From: confleux Date: Mon, 10 Apr 2023 18:43:51 +0300 Subject: [PATCH 08/38] refactor: rename getBalances() to getUserData() --- trade/api/stakecube_api.js | 4 ++-- trade/trader_stakecube.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index 572e874b..cb167311 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -164,11 +164,11 @@ module.exports = function() { }, /** - * List of user balances for all currencies + * User data including: wallets with balances and deposit addresses, exchange fee * @return {Promise} * https://www.gate.io/docs/developers/apiv4/en/#list-spot-accounts */ - getBalances: function() { + getUserData: function() { return protectedRequest('/user/account', {}, 'get'); }, diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index a365961c..190041f0 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -130,7 +130,7 @@ module.exports = ( let userData; try { - userData = await stakeCubeApiClient.getBalances(); + userData = await stakeCubeApiClient.getUserData(); if (userData.errorMessage) { log.warn(`API request getBalances(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); From 9b58eb17e29dde048148a0a18243e41dc80fa38e Mon Sep 17 00:00:00 2001 From: confleux Date: Mon, 10 Apr 2023 18:44:09 +0300 Subject: [PATCH 09/38] feat: add getDepositAddress() --- trade/trader_stakecube.js | 41 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index 190041f0..a290b9df 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -107,7 +107,7 @@ module.exports = ( getMarkets: true, getCurrencies: false, placeMarketOrder: false, - getDepositAddress: false, + getDepositAddress: true, getTradingFees: false, getAccountTradeVolume: false, createDepositAddressWithWebsiteOnly: false, @@ -436,6 +436,45 @@ module.exports = ( }, + /** + * Get deposit address for specific coin + * @param coin e.g. BTC + * @returns {Promise} + */ + async getDepositAddress(coin) { + const paramString = `coin: ${coin}`; + + let userData; + try { + userData = await stakeCubeApiClient.getUserData(); + + if (userData.errorMessage) { + log.warn(`API request getDepositAddress(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${userData.errorMessage}`); + return undefined; + } + } catch (err) { + log.warn(`API request getDepositAddress(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + + try { + const { wallets } = userData; + let result; + + for (const wallet of wallets) { + if (wallet.asset === coin.toUpperCase()) { + result = [{ network: wallet.network, address: wallet.address }]; + break; + } + } + + return result; + } catch (err) { + log.warn(`Error while processing getDepositAddress(${paramString}) request: ${e}`); + return undefined; + } + }, + /** * Get trade details for a market rates * @param {String} pair In classic format as BTC/USD From 73d723bc5623409b8245cad87d49aaf664b20a7f Mon Sep 17 00:00:00 2001 From: confleux Date: Mon, 10 Apr 2023 18:46:50 +0300 Subject: [PATCH 10/38] chore: clean up --- trade/trader_stakecube.js | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index a290b9df..11fd6c63 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -38,7 +38,7 @@ module.exports = ( stakeCubeApiClient.markets().then((markets) => { try { if (markets.errorMessage) { - log.warn(`API request getMarkets(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + log.warn(`API request getMarkets(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${markets.errorMessage}`); resolve(undefined); } @@ -133,7 +133,7 @@ module.exports = ( userData = await stakeCubeApiClient.getUserData(); if (userData.errorMessage) { - log.warn(`API request getBalances(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + log.warn(`API request getBalances(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${userData.errorMessage}`); return undefined; } } catch (err) { @@ -301,22 +301,6 @@ module.exports = ( log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; } - - // return new Promise((resolve) => { - // stakeCubeApiClient.cancelAllOrders(pair_.pair).then((data) => { - // // if (data.length === 0 || data.find((order) => order.status === 'cancelled')) { - // // log.log(`Cancelling all ${data.length}${sideString} on ${pair_.pairReadable} orders…`); - // // resolve(true); - // // } else { - // // const errorMessage = `${data.gateioErrorInfo}`; - // // log.log(`Unable to cancel all ${data.length}${sideString} orders on ${pair_.pairReadable} pair: ${errorMessage || 'No details'}.`); - // // resolve(false); - // // } - // }).catch((err) => { - // log.warn(`API request cancelAllOrders(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); - // resolve(undefined); - // }); - // }); }, /** @@ -490,7 +474,7 @@ module.exports = ( ticker = await stakeCubeApiClient.ticker(pair_.pair); if (ticker.errorMessage || !ticker[pair_.pair]) { - log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${ticker.errorMessage}`); return undefined; } } catch (err) { @@ -503,7 +487,7 @@ module.exports = ( orderBook = await stakeCubeApiClient.orderBook(pair_.pair); if (orderBook.errorMessage) { - log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${orderBook.errorMessage}`); return undefined; } } catch (err) { @@ -542,7 +526,7 @@ module.exports = ( book = await stakeCubeApiClient.orderBook(pair_.pair); if (book.errorMessage) { - log.warn(`API request getOrderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + log.warn(`API request getOrderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${book.errorMessage}`); return undefined; } } catch (err) { @@ -602,7 +586,7 @@ module.exports = ( trades = await stakeCubeApiClient.getTradesHistory(pair_.pairPlain, limit); if (trades.errorMessage) { - log.warn(`API request getTradesHistory(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + log.warn(`API request getTradesHistory(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${trades.errorMessage}}`); return undefined; } } catch (err) { From c5f043fab7a45c0ee355c59bc3ab0fa77f01552a Mon Sep 17 00:00:00 2001 From: confleux Date: Mon, 10 Apr 2023 19:31:59 +0300 Subject: [PATCH 11/38] fix: add reject in case of undefined request error --- trade/api/stakecube_api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index cb167311..33fac0d0 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -40,7 +40,10 @@ module.exports = function() { scResult.errorMessage = scError; resolve(scResult); } else if ([404].includes(httpCode)) { - log.warn(`Request to ${url} with data ${reqParameters} failed: ${errorMessage}. Invalid request. Rejecting…`); + log.warn(`Request to ${url} with data ${reqParameters} failed: ${errorMessage}. Not found. Rejecting…`); + reject(errorMessage); + } else { + log.warn(`Request to ${url} with data ${reqParameters} failed: ${errorMessage}. Rejecting…`); reject(errorMessage); } } catch (e) { From be4c0c314ada93abd17c4e95b5a9c8f98da7b858 Mon Sep 17 00:00:00 2001 From: confleux Date: Mon, 10 Apr 2023 19:36:19 +0300 Subject: [PATCH 12/38] chore: clean up --- trade/api/stakecube_api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index 33fac0d0..691d9a96 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -125,7 +125,7 @@ module.exports = function() { const httpOptions = { url: url, method: type, - timeout: 30000, + timeout: 20000, }; axios(httpOptions) @@ -169,7 +169,7 @@ module.exports = function() { /** * User data including: wallets with balances and deposit addresses, exchange fee * @return {Promise} - * https://www.gate.io/docs/developers/apiv4/en/#list-spot-accounts + * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/user.md#account */ getUserData: function() { return protectedRequest('/user/account', {}, 'get'); From 3e20bf0401dc5f19a0c5e71722b9aa026ee1d754 Mon Sep 17 00:00:00 2001 From: confleux Date: Mon, 10 Apr 2023 19:41:08 +0300 Subject: [PATCH 13/38] fix: jsdoc at stakecube api --- trade/api/stakecube_api.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index 691d9a96..dbb33bf8 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -138,7 +138,7 @@ module.exports = function() { * Sign string * @param {String} secret * @param {String} str - * @returns {string} + * @returns {String} */ function setSign(secret, str) { return crypto @@ -176,7 +176,7 @@ module.exports = function() { }, /** - * Query account active orders + * Returns a list of your currently open orders, their IDs, their market pair, and other relevant order information. * @param {String} symbol In StakeCube format as BTC_USDT * @param {Number} limit Number of records to return. Default is 100. * @return {Promise} @@ -192,11 +192,12 @@ module.exports = function() { }, /** - * Places an order + * Creates an exchange limit order on the chosen market, side, price and amount * @param {String} symbol In StakeCube format as BTC_USDT * @param {Number} amount Order amount in coin1 * @param {Number} price Order price * @param {String} side 'BUY' or 'SELL'. StakeCube supports only uppercase side parameter. + * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#order */ addOrder: function(symbol, amount, price, side) { @@ -211,7 +212,7 @@ module.exports = function() { }, /** - * Cancel an order + * Cancels an order by it's unique ID * @param {String} orderId Example 285088438163 * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#cancel @@ -225,7 +226,7 @@ module.exports = function() { }, /** - * Cancel all orders + * Cancels all orders in a chosen market pair * @param {String} symbol In StakeCube format as BTC_USDT * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#cancel-all */ @@ -238,7 +239,7 @@ module.exports = function() { }, /** - * Get market depth + * Returns orderbook data for a specified market pair * @param {String} symbol Trading pair in StakeCube format as BTC_USDT * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#orderbook @@ -252,7 +253,7 @@ module.exports = function() { }, /** - * Get trades history + * Returns the last trades of a specified market pair * @param {String} symbol Trading pair in StakeCube format as BTC_USDT * @param {Number} limit Number of records to return. Default: 100, Minimum: 1, Maximum: 1000. * @return {Promise>} Last trades @@ -268,7 +269,7 @@ module.exports = function() { }, /** - * Get info on all markets + * Returns a list of all markets * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#markets */ @@ -277,7 +278,7 @@ module.exports = function() { }, /** - * Get trade info for a ticker + * Returns info on a specified market * @param {String} symbol In StakeCube format as DOGE_SCC * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#markets From f6598c64d4a26691eba8f53aef79c20943b47a33 Mon Sep 17 00:00:00 2001 From: confleux Date: Mon, 10 Apr 2023 19:54:25 +0300 Subject: [PATCH 14/38] chore: clean up --- trade/trader_stakecube.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index 11fd6c63..845e5f5b 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -122,7 +122,7 @@ module.exports = ( /** * List of account balances for all currencies * @param {Boolean} nonzero - * @returns {Promise} + * @returns {Promise<[]|undefined>} */ async getBalances(nonzero = true) { const paramString = `nonzero: ${nonzero}`; @@ -144,14 +144,14 @@ module.exports = ( try { let result = []; - userData.wallets.forEach((crypto) => { + for (crypto of userData.wallets) { result.push({ code: crypto.asset, free: +crypto.balance, freezed: +crypto.balanceInOrder, total: +crypto.balance + +crypto.balanceInOrder, }); - }); + } if (nonzero) { result = result.filter((crypto) => crypto.free || crypto.freezed); @@ -167,7 +167,7 @@ module.exports = ( /** * List of all account open orders * @param {String} pair In classic format as BTC/USD - * @returns {Promise<*[]|undefined>} + * @returns {Promise<[]|undefined>} */ async getOpenOrders(pair) { const paramString = `pair: ${pair}`; @@ -241,7 +241,7 @@ module.exports = ( * @param {String} orderId Example: 285088438163 * @param {String} side 'buy' or 'sell'. Not used for StakeCube. * @param {String} pair In classic format as BTC/USDT. Not used for StakeCube. - * @returns {Promise} + * @returns {Promise} */ async cancelOrder(orderId, side, pair) { const paramString = `orderId: ${orderId}, pair: ${pair}`; @@ -276,8 +276,8 @@ module.exports = ( /** * Cancel all orders on a specific pair * @param {String} pair In classic format as BTC/USD - * @param {String} side Cancel buy or sell orders. Cancel both if not set. Not used for StakeCube. - * @returns {Promise} + * @param {String} side Not used for StakeCube. + * @returns {Promise} */ async cancelAllOrders(pair, side = '') { const paramString = `pair: ${pair}, side: ${side}`; @@ -417,13 +417,12 @@ module.exports = ( order.message = message; return order; } - }, /** * Get deposit address for specific coin * @param coin e.g. BTC - * @returns {Promise} + * @returns {Promise<[]|undefined>} */ async getDepositAddress(coin) { const paramString = `coin: ${coin}`; @@ -462,7 +461,7 @@ module.exports = ( /** * Get trade details for a market rates * @param {String} pair In classic format as BTC/USD - * @returns {Promise} + * @returns {Promise} */ async getRates(pair) { const paramString = `pair: ${pair}`; @@ -515,7 +514,7 @@ module.exports = ( /** * Get market depth * @param {String} pair In classic format as BTC/USDT - * @returns {Promise} + * @returns {Promise} */ async getOrderBook(pair) { const paramString = `pair: ${pair}`; @@ -575,7 +574,7 @@ module.exports = ( * Get trades history * @param {String} pair In classic format as BTC/USDT * @param {Number} limit Number of records to return - * @returns {Promise} + * @returns {Promise<[]|undefined>} */ async getTradesHistory(pair, limit) { const paramString = `pair: ${pair}`; From 84708d9166d2453560e4cb2742b7b94ddea1a7b0 Mon Sep 17 00:00:00 2001 From: martiliones Date: Fri, 28 Apr 2023 03:01:43 +0600 Subject: [PATCH 15/38] chore: migrate to mongodb v5 --- helpers/dbModel.js | 109 +++-- modules/DB.js | 37 +- modules/unknownTxs.js | 2 +- package-lock.json | 957 +++++++++++++++++++++++------------------- package.json | 14 +- server.js | 24 +- 6 files changed, 611 insertions(+), 532 deletions(-) diff --git a/helpers/dbModel.js b/helpers/dbModel.js index 3cf79e67..72db86b1 100644 --- a/helpers/dbModel.js +++ b/helpers/dbModel.js @@ -1,85 +1,78 @@ module.exports = (db) => { - return class { - constructor(data = {}, isSave) { + class Model { + constructor(data = {}, shouldSave) { this.db = db; + Object.assign(this, data); - if (isSave) { + + if (shouldSave) { this.save(); } } static get db() { return db; } - static find(a) { // return Array - return new Promise((resolve, reject) => { - this.db.find(a).toArray((err, data) => { - resolve(data.map((d)=>new this(d))); - }); - }); + static async find(req) { // return Promise + const data = await this.db.find(req).toArray(); + + return data.map((d) => new this(d)); } - static aggregate(a) { // return Array - return new Promise((resolve, reject) => { - this.db.aggregate(a).toArray((err, data) => { - resolve(data.map((d)=>new this(d))); - }); - }); + static async aggregate(req) { // return Promise + const data = await this.db.aggregate(req).toArray(); + + return data.map((d) => new this(d)); } - static findOne(a) { - return new Promise((resolve, reject) => { - db.findOne(a).then((doc, b) => { - if (!doc) { - resolve(doc); - } else { - resolve(new this(doc)); - } - }); - }); + static async findOne(req) { + const doc = await db.findOne(req); + + return doc ? new this(doc) : doc; } - static deleteOne(a) { - return new Promise((resolve, reject) => { - delete a.db; - db.deleteOne(a).then((res) => { - resolve(res.deletedCount); - }); - }); + static async deleteOne(req) { + delete req.db; + + const { deletedCount } = await db.deleteOne(req); + + return deletedCount; } - static count(a) { - return new Promise((resolve, reject) => { - db.count(a).then((count) => { - resolve(count); - }); - }); + static async count(req) { + const count = await db.count(req); + + return count; } _data() { const data = {}; - for (const field in this) { - if (!['db', '_id'].includes(field)) { - data[field] = this[field]; + + for (const fieldName in this) { + if (Object.prototype.hasOwnProperty.call(this, fieldName)) { + if (!['db', '_id'].includes(fieldName)) { + data[fieldName] = this[fieldName]; + } } } + return data; } - async update(obj, isSave) { + async update(obj, shouldSave) { Object.assign(this, obj); - if (isSave) { + + if (shouldSave) { await this.save(); } } - save() { - return new Promise((resolve, reject) => { - if (!this._id) { - db.insertOne(this._data(), (err, res) => { - this._id = res.insertedId; - resolve(this._id); - }); - } else { - db.updateOne({ _id: this._id }, { - $set: this._data(), - }, { upsert: true }).then(() => { - resolve(this._id); - }); - } - }); + async save() { + if (!this._id) { + const res = await db.insertOne(this._data()); + this._id = res.insertedId; + return this._id; + } else { + await db.updateOne({ _id: this._id }, { + $set: this._data(), + }, { upsert: true }); + + return this._id; + } } }; + + return Model; }; diff --git a/modules/DB.js b/modules/DB.js index 757e82f5..edae9007 100644 --- a/modules/DB.js +++ b/modules/DB.js @@ -6,29 +6,28 @@ const config = require('./configReader'); const collections = {}; -mongoClient.connect((error, client) => { +mongoClient.connect() + .then((client) => { + const db = client.db('tradebotdb'); - if (error) { - log.error(`Unable to connect to MongoDB, ` + error); - process.exit(-1); - } - const db = client.db('tradebotdb'); + collections.db = db; - collections.db = db; + const incomingTxsCollection = db.collection('incomingtxs'); + incomingTxsCollection.createIndex([['date', 1], ['senderId', 1]]); - const incomingTxsCollection = db.collection('incomingtxs'); - incomingTxsCollection.createIndex([['date', 1], ['senderId', 1]]); + const ordersCollection = db.collection('orders'); + ordersCollection.createIndex([['isProcessed', 1], ['purpose', 1]]); + ordersCollection.createIndex([['pair', 1], ['exchange', 1]]); - const ordersCollection = db.collection('orders'); - ordersCollection.createIndex([['isProcessed', 1], ['purpose', 1]]); - ordersCollection.createIndex([['pair', 1], ['exchange', 1]]); + collections.ordersDb = model(ordersCollection); + collections.incomingTxsDb = model(incomingTxsCollection); + collections.systemDb = model(db.collection('systems')); - collections.ordersDb = model(ordersCollection); - collections.incomingTxsDb = model(incomingTxsCollection); - collections.systemDb = model(db.collection('systems')); - - log.log(`${config.notifyName} successfully connected to 'tradebotdb' MongoDB.`); - -}); + log.log(`${config.notifyName} successfully connected to 'tradebotdb' MongoDB.`); + }) + .catch((error) => { + log.error(`Unable to connect to MongoDB, ` + error); + process.exit(-1); + }); module.exports = collections; diff --git a/modules/unknownTxs.js b/modules/unknownTxs.js index c23cbd7c..ba79846a 100644 --- a/modules/unknownTxs.js +++ b/modules/unknownTxs.js @@ -15,7 +15,7 @@ module.exports = async (tx, itx) => { senderId: tx.senderId, type: 'unknown', date: { $gt: (utils.unixTimeStampMs() - 24 * 3600 * 1000) }, // last 24h - }).sort({ date: -1 }).toArray((err, docs) => { + }).sort({ date: -1 }).toArray().then((docs) => { const twoHoursAgo = utils.unixTimeStampMs() - 2 * 3600 * 1000; let countMsgs = docs.length; if (!docs[1] || twoHoursAgo > docs[1].date) { diff --git a/package-lock.json b/package-lock.json index 7779e61f..230117e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,29 +1,29 @@ { "name": "adamant-tradebot", - "version": "5.4.0", + "version": "5.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "adamant-tradebot", - "version": "5.4.0", + "version": "5.4.1", "license": "GPL-3.0", "dependencies": { "adamant-api": "^1.8.0", - "axios": "^1.3.4", + "axios": "^1.3.6", "express": "^4.18.2", "fast-deep-equal": "^3.1.3", "form-data": "^4.0.0", "jsonminify": "^0.4.2", - "mongodb": "^4.14.0" + "mongodb": "^5.3.0" }, "devDependencies": { - "@babel/core": "^7.21.3", + "@babel/core": "^7.21.4", "@babel/eslint-parser": "^7.21.3", - "@babel/plugin-transform-runtime": "^7.21.0", - "@babel/preset-env": "^7.20.2", - "axios-mock-adapter": "^1.21.2", - "eslint": "^8.36.0", + "@babel/plugin-transform-runtime": "^7.21.4", + "@babel/preset-env": "^7.21.4", + "axios-mock-adapter": "^1.21.4", + "eslint": "^8.39.0", "eslint-config-google": "^0.14.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-node": "^11.1.0", @@ -49,6 +49,7 @@ "resolved": "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz", "integrity": "sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==", "optional": true, + "peer": true, "dependencies": { "tslib": "^1.11.1" } @@ -57,13 +58,15 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true + "optional": true, + "peer": true }, "node_modules/@aws-crypto/sha256-browser": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz", "integrity": "sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==", "optional": true, + "peer": true, "dependencies": { "@aws-crypto/ie11-detection": "^3.0.0", "@aws-crypto/sha256-js": "^3.0.0", @@ -79,13 +82,15 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true + "optional": true, + "peer": true }, "node_modules/@aws-crypto/sha256-js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz", "integrity": "sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==", "optional": true, + "peer": true, "dependencies": { "@aws-crypto/util": "^3.0.0", "@aws-sdk/types": "^3.222.0", @@ -96,13 +101,15 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true + "optional": true, + "peer": true }, "node_modules/@aws-crypto/supports-web-crypto": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz", "integrity": "sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==", "optional": true, + "peer": true, "dependencies": { "tslib": "^1.11.1" } @@ -111,13 +118,15 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true + "optional": true, + "peer": true }, "node_modules/@aws-crypto/util": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz", "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "^3.222.0", "@aws-sdk/util-utf8-browser": "^3.0.0", @@ -128,13 +137,15 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true + "optional": true, + "peer": true }, "node_modules/@aws-sdk/abort-controller": { "version": "3.272.0", "resolved": "https://registry.npmjs.org/@aws-sdk/abort-controller/-/abort-controller-3.272.0.tgz", "integrity": "sha512-s2TV3phapcTwZNr4qLxbfuQuE9ZMP4RoJdkvRRCkKdm6jslsWLJf2Zlcxti/23hOlINUMYv2iXE2pftIgWGdpg==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -148,6 +159,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.272.0.tgz", "integrity": "sha512-uMjRWcNvX7SoGaVn0mXWD43+Z1awPahQwGW3riDLfXHZdOgw2oFDhD3Jg5jQ8OzQLUfDvArhE3WyZwlS4muMuQ==", "optional": true, + "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -194,6 +206,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.272.0.tgz", "integrity": "sha512-xn9a0IGONwQIARmngThoRhF1lLGjHAD67sUaShgIMaIMc6ipVYN6alWG1VuUpoUQ6iiwMEt0CHdfCyLyUV/fTA==", "optional": true, + "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -237,6 +250,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.272.0.tgz", "integrity": "sha512-ECcXu3xoa1yggnGKMTh29eWNHiF/wC6r5Uqbla22eOOosyh0+Z6lkJ3JUSLOUKCkBXA4Cs/tJL9UDFBrKbSlvA==", "optional": true, + "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -280,6 +294,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.272.0.tgz", "integrity": "sha512-kigxCxURp3WupufGaL/LABMb7UQfzAQkKcj9royizL3ItJ0vw5kW/JFrPje5IW1mfLgdPF7PI9ShOjE0fCLTqA==", "optional": true, + "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -327,6 +342,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/config-resolver/-/config-resolver-3.272.0.tgz", "integrity": "sha512-Dr4CffRVNsOp3LRNdpvcH6XuSgXOSLblWliCy/5I86cNl567KVMxujVx6uPrdTXYs2h1rt3MNl6jQGnAiJeTbw==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/signature-v4": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -343,6 +359,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.272.0.tgz", "integrity": "sha512-rVx0rtQjbiYCM0nah2rB/2ut2YJYPpRr1AbW/Hd4r/PI+yiusrmXAwuT4HIW2yr34zsQMPi1jZ3WHN9Rn9mzlg==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/client-cognito-identity": "3.272.0", "@aws-sdk/property-provider": "3.272.0", @@ -358,6 +375,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.272.0.tgz", "integrity": "sha512-QI65NbLnKLYHyTYhXaaUrq6eVsCCrMUb05WDA7+TJkWkjXesovpjc8vUKgFiLSxmgKmb2uOhHNcDyObKMrYQFw==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -372,6 +390,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-imds/-/credential-provider-imds-3.272.0.tgz", "integrity": "sha512-wwAfVY1jTFQEfxVfdYD5r5ieYGl+0g4nhekVxNMqE8E1JeRDd18OqiwAflzpgBIqxfqvCUkf+vl5JYyacMkNAQ==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/node-config-provider": "3.272.0", "@aws-sdk/property-provider": "3.272.0", @@ -388,6 +407,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.272.0.tgz", "integrity": "sha512-iE3CDzK5NcupHYjfYjBdY1JCy8NLEoRUsboEjG0i0gy3S3jVpDeVHX1dLVcL/slBFj6GiM7SoNV/UfKnJf3Gaw==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/credential-provider-env": "3.272.0", "@aws-sdk/credential-provider-imds": "3.272.0", @@ -408,6 +428,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.272.0.tgz", "integrity": "sha512-FI8uvwM1IxiRSvbkdKv8DZG5vxU3ezaseTaB1fHWTxEUFb0pWIoHX9oeOKer9Fj31SOZTCNAaYFURbSRuZlm/w==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/credential-provider-env": "3.272.0", "@aws-sdk/credential-provider-imds": "3.272.0", @@ -429,6 +450,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.272.0.tgz", "integrity": "sha512-hiCAjWWm2PeBFp5cjkxqyam/XADjiS+e7GzwC34TbZn3LisS0uoweLojj9tD11NnnUhyhbLteUvu5+rotOLwrg==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/shared-ini-file-loader": "3.272.0", @@ -444,6 +466,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.272.0.tgz", "integrity": "sha512-hwYaulyiU/7chKKFecxCeo0ls6Dxs7h+5EtoYcJJGvfpvCncyOZF35t00OAsCd3Wo7HkhhgfpGdb6dmvCNQAZQ==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/client-sso": "3.272.0", "@aws-sdk/property-provider": "3.272.0", @@ -461,6 +484,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.272.0.tgz", "integrity": "sha512-ImrHMkcgneGa/HadHAQXPwOrX26sAKuB8qlMxZF/ZCM2B55u8deY+ZVkVuraeKb7YsahMGehPFOfRAF6mvFI5Q==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -475,6 +499,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.272.0.tgz", "integrity": "sha512-ucd6Xq6aBMf+nM4uz5zkjL11mwaE5BV1Q4hkulaGu2v1dRA8n6zhLJk/sb4hOJ7leelqMJMErlbQ2T3MkYvlJQ==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/client-cognito-identity": "3.272.0", "@aws-sdk/client-sso": "3.272.0", @@ -501,6 +526,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/fetch-http-handler/-/fetch-http-handler-3.272.0.tgz", "integrity": "sha512-1Qhm9e0RbS1Xf4CZqUbQyUMkDLd7GrsRXWIvm9b86/vgeV8/WnjO3CMue9D51nYgcyQORhYXv6uVjAYCWbUExA==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/querystring-builder": "3.272.0", @@ -514,6 +540,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/hash-node/-/hash-node-3.272.0.tgz", "integrity": "sha512-40dwND+iAm3VtPHPZu7/+CIdVJFk2s0cWZt1lOiMPMSXycSYJ45wMk7Lly3uoqRx0uWfFK5iT2OCv+fJi5jTng==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "@aws-sdk/util-buffer-from": "3.208.0", @@ -529,6 +556,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/invalid-dependency/-/invalid-dependency-3.272.0.tgz", "integrity": "sha512-ysW6wbjl1Y78txHUQ/Tldj2Rg1BI7rpMO9B9xAF6yAX3mQ7t6SUPQG/ewOGvH2208NBIl3qP5e/hDf0Q6r/1iw==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -539,6 +567,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/is-array-buffer/-/is-array-buffer-3.201.0.tgz", "integrity": "sha512-UPez5qLh3dNgt0DYnPD/q0mVJY84rA17QE26hVNOW3fAji8W2wrwrxdacWOxyXvlxWsVRcKmr+lay1MDqpAMfg==", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.3.1" }, @@ -551,6 +580,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-content-length/-/middleware-content-length-3.272.0.tgz", "integrity": "sha512-sAbDZSTNmLX+UTGwlUHJBWy0QGQkiClpHwVFXACon+aG0ySLNeRKEVYs6NCPYldw4cj6hveLUn50cX44ukHErw==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -565,6 +595,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-endpoint/-/middleware-endpoint-3.272.0.tgz", "integrity": "sha512-Dk3JVjj7SxxoUKv3xGiOeBksvPtFhTDrVW75XJ98Ymv8gJH5L1sq4hIeJAHRKogGiRFq2J73mnZSlM9FVXEylg==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/middleware-serde": "3.272.0", "@aws-sdk/protocol-http": "3.272.0", @@ -584,6 +615,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.272.0.tgz", "integrity": "sha512-Q8K7bMMFZnioUXpxn57HIt4p+I63XaNAawMLIZ5B4F2piyukbQeM9q2XVKMGwqLvijHR8CyP5nHrtKqVuINogQ==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -598,6 +630,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.272.0.tgz", "integrity": "sha512-u2SQ0hWrFwxbxxYMG5uMEgf01pQY5jauK/LYWgGIvuCmFgiyRQQP3oN7kkmsxnS9MWmNmhbyQguX2NY02s5e9w==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -611,6 +644,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.272.0.tgz", "integrity": "sha512-Gp/eKWeUWVNiiBdmUM2qLkBv+VLSJKoWAO+aKmyxxwjjmWhE0FrfA1NQ1a3g+NGMhRbAfQdaYswRAKsul70ISg==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -625,6 +659,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-retry/-/middleware-retry-3.272.0.tgz", "integrity": "sha512-pCGvHM7C76VbO/dFerH+Vwf7tGv7j+e+eGrvhQ35mRghCtfIou/WMfTZlD1TNee93crrAQQVZKjtW3dMB3WCzg==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/service-error-classification": "3.272.0", @@ -643,6 +678,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.272.0.tgz", "integrity": "sha512-VvYPg7LrDIjUOWueSzo2wBzcNG7dw+cmzV6zAKaLxf0RC5jeAP4hE0OzDiiZfDrjNghEzgq/V+0NO+LewqYL9Q==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/middleware-signing": "3.272.0", "@aws-sdk/property-provider": "3.272.0", @@ -660,6 +696,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-serde/-/middleware-serde-3.272.0.tgz", "integrity": "sha512-kW1uOxgPSwtXPB5rm3QLdWomu42lkYpQL94tM1BjyFOWmBLO2lQhk5a7Dw6HkTozT9a+vxtscLChRa6KZe61Hw==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -673,6 +710,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.272.0.tgz", "integrity": "sha512-4LChFK4VAR91X+dupqM8fQqYhFGE0G4Bf9rQlVTgGSbi2KUOmpqXzH0/WKE228nKuEhmH8+Qd2VPSAE2JcyAUA==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/protocol-http": "3.272.0", @@ -690,6 +728,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-stack/-/middleware-stack-3.272.0.tgz", "integrity": "sha512-jhwhknnPBGhfXAGV5GXUWfEhDFoP/DN8MPCO2yC5OAxyp6oVJ8lTPLkZYMTW5VL0c0eG44dXpF4Ib01V+PlDrQ==", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.3.1" }, @@ -702,6 +741,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.272.0.tgz", "integrity": "sha512-Qy7/0fsDJxY5l0bEk7WKDfqb4Os/sCAgFR2zEvrhDtbkhYPf72ysvg/nRUTncmCbo8tOok4SJii2myk8KMfjjw==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -716,6 +756,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/node-config-provider/-/node-config-provider-3.272.0.tgz", "integrity": "sha512-YYCIBh9g1EQo7hm2l22HX5Yr9RoPQ2RCvhzKvF1n1e8t1QH4iObQrYUtqHG4khcm64Cft8C5MwZmgzHbya5Z6Q==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/shared-ini-file-loader": "3.272.0", @@ -731,6 +772,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/node-http-handler/-/node-http-handler-3.272.0.tgz", "integrity": "sha512-VrW9PjhhngeyYp4yGYPe5S0vgZH6NwU3Po9xAgayUeE37Inr7LS1YteFMHdpgsUUeNXnh7d06CXqHo1XjtqOKA==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/abort-controller": "3.272.0", "@aws-sdk/protocol-http": "3.272.0", @@ -747,6 +789,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/property-provider/-/property-provider-3.272.0.tgz", "integrity": "sha512-V1pZTaH5eqpAt8O8CzbItHhOtzIfFuWymvwZFkAtwKuaHpnl7jjrTouV482zoq8AD/fF+VVSshwBKYA7bhidIw==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -760,6 +803,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/protocol-http/-/protocol-http-3.272.0.tgz", "integrity": "sha512-4JQ54v5Yn08jspNDeHo45CaSn1CvTJqS1Ywgr79eU6jBExtguOWv6LNtwVSBD9X37v88iqaxt8iu1Z3pZZAJeg==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -773,6 +817,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/querystring-builder/-/querystring-builder-3.272.0.tgz", "integrity": "sha512-ndo++7GkdCj5tBXE6rGcITpSpZS4PfyV38wntGYAlj9liL1omk3bLZRY6uzqqkJpVHqbg2fD7O2qHNItzZgqhw==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "@aws-sdk/util-uri-escape": "3.201.0", @@ -787,6 +832,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/querystring-parser/-/querystring-parser-3.272.0.tgz", "integrity": "sha512-5oS4/9n6N1LZW9tI3qq/0GnCuWoOXRgcHVB+AJLRBvDbEe+GI+C/xK1tKLsfpDNgsQJHc4IPQoIt4megyZ/1+A==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -800,6 +846,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/service-error-classification/-/service-error-classification-3.272.0.tgz", "integrity": "sha512-REoltM1LK9byyIufLqx9znhSolPcHQgVHIA2S0zu5sdt5qER4OubkLAXuo4MBbisUTmh8VOOvIyUb5ijZCXq1w==", "optional": true, + "peer": true, "engines": { "node": ">=14.0.0" } @@ -809,6 +856,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/shared-ini-file-loader/-/shared-ini-file-loader-3.272.0.tgz", "integrity": "sha512-lzFPohp5sy2XvwFjZIzLVCRpC0i5cwBiaXmFzXYQZJm6FSCszHO4ax+m9yrtlyVFF/2YPWl+/bzNthy4aJtseA==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -822,6 +870,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4/-/signature-v4-3.272.0.tgz", "integrity": "sha512-pWxnHG1NqJWMwlhJ6NHNiUikOL00DHROmxah6krJPMPq4I3am2KY2Rs/8ouWhnEXKaHAv4EQhSALJ+7Mq5S4/A==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/is-array-buffer": "3.201.0", "@aws-sdk/types": "3.272.0", @@ -840,6 +889,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/smithy-client/-/smithy-client-3.272.0.tgz", "integrity": "sha512-pvdleJ3kaRvyRw2pIZnqL85ZlWBOZrPKmR9I69GCvlyrfdjRBhbSjIEZ+sdhZudw0vdHxq25AGoLUXhofVLf5Q==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/middleware-stack": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -854,6 +904,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.272.0.tgz", "integrity": "sha512-0GISJ4IKN2rXvbSddB775VjBGSKhYIGQnAdMqbvxi9LB6pSvVxcH9aIL28G0spiuL+dy3yGQZ8RlJPAyP9JW9A==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/client-sso-oidc": "3.272.0", "@aws-sdk/property-provider": "3.272.0", @@ -870,6 +921,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.272.0.tgz", "integrity": "sha512-MmmL6vxMGP5Bsi+4wRx4mxYlU/LX6M0noOXrDh/x5FfG7/4ZOar/nDxqDadhJtNM88cuWVHZWY59P54JzkGWmA==", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.3.1" }, @@ -882,6 +934,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/url-parser/-/url-parser-3.272.0.tgz", "integrity": "sha512-vX/Tx02PlnQ/Kgtf5TnrNDHPNbY+amLZjW0Z1d9vzAvSZhQ4i9Y18yxoRDIaDTCNVRDjdhV8iuctW+05PB5JtQ==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/querystring-parser": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -893,6 +946,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-base64/-/util-base64-3.208.0.tgz", "integrity": "sha512-PQniZph5A6N7uuEOQi+1hnMz/FSOK/8kMFyFO+4DgA1dZ5pcKcn5wiFwHkcTb/BsgVqQa3Jx0VHNnvhlS8JyTg==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/util-buffer-from": "3.208.0", "tslib": "^2.3.1" @@ -906,6 +960,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-body-length-browser/-/util-body-length-browser-3.188.0.tgz", "integrity": "sha512-8VpnwFWXhnZ/iRSl9mTf+VKOX9wDE8QtN4bj9pBfxwf90H1X7E8T6NkiZD3k+HubYf2J94e7DbeHs7fuCPW5Qg==", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.3.1" } @@ -915,6 +970,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-body-length-node/-/util-body-length-node-3.208.0.tgz", "integrity": "sha512-3zj50e5g7t/MQf53SsuuSf0hEELzMtD8RX8C76f12OSRo2Bca4FLLYHe0TZbxcfQHom8/hOaeZEyTyMogMglqg==", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.3.1" }, @@ -927,6 +983,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-buffer-from/-/util-buffer-from-3.208.0.tgz", "integrity": "sha512-7L0XUixNEFcLUGPeBF35enCvB9Xl+K6SQsmbrPk1P3mlV9mguWSDQqbOBwY1Ir0OVbD6H/ZOQU7hI/9RtRI0Zw==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/is-array-buffer": "3.201.0", "tslib": "^2.3.1" @@ -940,6 +997,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-config-provider/-/util-config-provider-3.208.0.tgz", "integrity": "sha512-DSRqwrERUsT34ug+anlMBIFooBEGwM8GejC7q00Y/9IPrQy50KnG5PW2NiTjuLKNi7pdEOlwTSEocJE15eDZIg==", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.3.1" }, @@ -952,6 +1010,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-defaults-mode-browser/-/util-defaults-mode-browser-3.272.0.tgz", "integrity": "sha512-W8ZVJSZRuUBg8l0JEZzUc+9fKlthVp/cdE+pFeF8ArhZelOLCiaeCrMaZAeJusaFzIpa6cmOYQAjtSMVyrwRtg==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -967,6 +1026,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-defaults-mode-node/-/util-defaults-mode-node-3.272.0.tgz", "integrity": "sha512-U0NTcbMw6KFk7uz/avBmfxQSTREEiX6JDMH68oN/3ux4AICd2I4jHyxnloSWGuiER1FxZf1dEJ8ZTwy8Ibl21Q==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/config-resolver": "3.272.0", "@aws-sdk/credential-provider-imds": "3.272.0", @@ -984,6 +1044,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.272.0.tgz", "integrity": "sha512-c4MPUaJt2G6gGpoiwIOqDfUa98c1J63RpYvf/spQEKOtC/tF5Gfqlxuq8FnAl5lHnrqj1B9ZXLLxFhHtDR0IiQ==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -997,6 +1058,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-hex-encoding/-/util-hex-encoding-3.201.0.tgz", "integrity": "sha512-7t1vR1pVxKx0motd3X9rI3m/xNp78p3sHtP5yo4NP4ARpxyJ0fokBomY8ScaH2D/B+U5o9ARxldJUdMqyBlJcA==", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.3.1" }, @@ -1009,6 +1071,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.208.0.tgz", "integrity": "sha512-iua1A2+P7JJEDHVgvXrRJSvsnzG7stYSGQnBVphIUlemwl6nN5D+QrgbjECtrbxRz8asYFHSzhdhECqN+tFiBg==", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.3.1" }, @@ -1021,6 +1084,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-middleware/-/util-middleware-3.272.0.tgz", "integrity": "sha512-Abw8m30arbwxqmeMMha5J11ESpHUNmCeSqSzE8/C4B8jZQtHY4kq7f+upzcNIQ11lsd+uzBEzNG3+dDRi0XOJQ==", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.3.1" }, @@ -1033,6 +1097,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-retry/-/util-retry-3.272.0.tgz", "integrity": "sha512-Ngha5414LR4gRHURVKC9ZYXsEJhMkm+SJ+44wlzOhavglfdcKKPUsibz5cKY1jpUV7oKECwaxHWpBB8r6h+hOg==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/service-error-classification": "3.272.0", "tslib": "^2.3.1" @@ -1046,6 +1111,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-uri-escape/-/util-uri-escape-3.201.0.tgz", "integrity": "sha512-TeTWbGx4LU2c5rx0obHeDFeO9HvwYwQtMh1yniBz00pQb6Qt6YVOETVQikRZ+XRQwEyCg/dA375UplIpiy54mA==", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.3.1" }, @@ -1058,6 +1124,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.272.0.tgz", "integrity": "sha512-Lp5QX5bH6uuwBlIdr7w7OAcAI50ttyskb++yUr9i+SPvj6RI2dsfIBaK4mDg1qUdM5LeUdvIyqwj3XHjFKAAvA==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/types": "3.272.0", "bowser": "^2.11.0", @@ -1069,6 +1136,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.272.0.tgz", "integrity": "sha512-ljK+R3l+Q1LIHrcR+Knhk0rmcSkfFadZ8V+crEGpABf/QUQRg7NkZMsoe814tfBO5F7tMxo8wwwSdaVNNHtoRA==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/node-config-provider": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -1091,6 +1159,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8/-/util-utf8-3.254.0.tgz", "integrity": "sha512-14Kso/eIt5/qfIBmhEL9L1IfyUqswjSTqO2mY7KOzUZ9SZbwn3rpxmtkhmATkRjD7XIlLKaxBkI7tU9Zjzj8Kw==", "optional": true, + "peer": true, "dependencies": { "@aws-sdk/util-buffer-from": "3.208.0", "tslib": "^2.3.1" @@ -1104,14 +1173,15 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.3.1" } }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", + "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", "dev": true, "dependencies": { "@babel/highlight": "^7.18.6" @@ -1121,30 +1191,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.20.14", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.14.tgz", - "integrity": "sha512-0YpKHD6ImkWMEINCyDAD0HLLUH/lPCefG8ld9it8DJB2wnApraKuhgYTvTY1z7UFIfBTGy5LwncZ+5HWWGbhFw==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.4.tgz", + "integrity": "sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.3.tgz", - "integrity": "sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.4.tgz", + "integrity": "sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.3", - "@babel/helper-compilation-targets": "^7.20.7", + "@babel/code-frame": "^7.21.4", + "@babel/generator": "^7.21.4", + "@babel/helper-compilation-targets": "^7.21.4", "@babel/helper-module-transforms": "^7.21.2", "@babel/helpers": "^7.21.0", - "@babel/parser": "^7.21.3", + "@babel/parser": "^7.21.4", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.3", - "@babel/types": "^7.21.3", + "@babel/traverse": "^7.21.4", + "@babel/types": "^7.21.4", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -1178,12 +1248,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.3.tgz", - "integrity": "sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.4.tgz", + "integrity": "sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==", "dev": true, "dependencies": { - "@babel/types": "^7.21.3", + "@babel/types": "^7.21.4", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -1232,13 +1302,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz", + "integrity": "sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", + "@babel/compat-data": "^7.21.4", + "@babel/helper-validator-option": "^7.21.0", "browserslist": "^4.21.3", "lru-cache": "^5.1.1", "semver": "^6.3.0" @@ -1251,15 +1321,15 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.20.12", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.12.tgz", - "integrity": "sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.4.tgz", + "integrity": "sha512-46QrX2CQlaFRF4TkwfTt6nJD7IHq8539cCL7SDpqWSDeJKY1xylKKY5F/33mJhLZ3mFvKv2gGrVS6NkyF6qs+Q==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-member-expression-to-functions": "^7.20.7", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-member-expression-to-functions": "^7.21.0", "@babel/helper-optimise-call-expression": "^7.18.6", "@babel/helper-replace-supers": "^7.20.7", "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", @@ -1352,24 +1422,24 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz", - "integrity": "sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz", + "integrity": "sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q==", "dev": true, "dependencies": { - "@babel/types": "^7.20.7" + "@babel/types": "^7.21.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz", + "integrity": "sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.21.4" }, "engines": { "node": ">=6.9.0" @@ -1505,9 +1575,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", + "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -1557,9 +1627,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.3.tgz", - "integrity": "sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz", + "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1635,12 +1705,12 @@ } }, "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.20.7.tgz", - "integrity": "sha512-AveGOoi9DAjUYYuUAG//Ig69GlazLnoyzMw68VCDux+c1tsnnH/OkYcpz/5xzMkEFC6UxjR5Gw1c+iY2wOGVeQ==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz", + "integrity": "sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.20.7", + "@babel/helper-create-class-features-plugin": "^7.21.0", "@babel/helper-plugin-utils": "^7.20.2", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, @@ -1783,9 +1853,9 @@ } }, "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.20.7.tgz", - "integrity": "sha512-T+A7b1kfjtRM51ssoOfS1+wbyCVqorfyZhT99TvxxLMirPShD8CzKMRepMlCBGM5RpHMbn8s+5MMHnPstJH6mQ==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz", + "integrity": "sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.20.2", @@ -1816,13 +1886,13 @@ } }, "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.20.5.tgz", - "integrity": "sha512-Vq7b9dUA12ByzB4EjQTPo25sFhY+08pQDBSZRtUAkj7lb7jahaHR5igera16QZ+3my1nYR4dKsNdYj5IjPHilQ==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz", + "integrity": "sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.20.5", + "@babel/helper-create-class-features-plugin": "^7.21.0", "@babel/helper-plugin-utils": "^7.20.2", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, @@ -2143,9 +2213,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.20.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.15.tgz", - "integrity": "sha512-Vv4DMZ6MiNOhu/LdaZsT/bsLRxgL94d269Mv4R/9sp6+Mp++X/JqypZYypJXLlM4mlL352/Egzbzr98iABH1CA==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz", + "integrity": "sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.20.2" @@ -2158,15 +2228,15 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.7.tgz", - "integrity": "sha512-LWYbsiXTPKl+oBlXUGlwNlJZetXD5Am+CyBdqhPsDVjM9Jc8jwBJFrKhHf900Kfk2eZG1y9MAG3UNajol7A4VQ==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz", + "integrity": "sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", "@babel/helper-compilation-targets": "^7.20.7", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", + "@babel/helper-function-name": "^7.21.0", "@babel/helper-optimise-call-expression": "^7.18.6", "@babel/helper-plugin-utils": "^7.20.2", "@babel/helper-replace-supers": "^7.20.7", @@ -2197,9 +2267,9 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.7.tgz", - "integrity": "sha512-Xwg403sRrZb81IVB79ZPqNQME23yhugYVqgTxAhT99h485F4f+GMELFhhOsscDUB7HCswepKeCKLn/GZvUKoBA==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz", + "integrity": "sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.20.2" @@ -2259,12 +2329,12 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", - "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz", + "integrity": "sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -2337,12 +2407,12 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.20.11.tgz", - "integrity": "sha512-S8e1f7WQ7cimJQ51JkAaDrEtohVEitXjgCGAS2N8S31Y42E+kWwfSz83LYz57QdBm7q9diARVqanIaH2oVgQnw==", + "version": "7.21.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz", + "integrity": "sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.20.11", + "@babel/helper-module-transforms": "^7.21.2", "@babel/helper-plugin-utils": "^7.20.2", "@babel/helper-simple-access": "^7.20.2" }, @@ -2435,9 +2505,9 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.7.tgz", - "integrity": "sha512-WiWBIkeHKVOSYPO0pWkxGPfKeWrCJyD3NJ53+Lrp/QMSZbsVPovrVl2aWZ19D/LTVnaDv5Ap7GJ/B2CTOZdrfA==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.21.3.tgz", + "integrity": "sha512-Wxc+TvppQG9xWFYatvCGPvZ6+SIUxQ2ZdiBP+PHYMIjnPXD+uThCshaz4NZOnODAtBjjcVQQ/3OKs9LW28purQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.20.2" @@ -2496,12 +2566,12 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.21.0.tgz", - "integrity": "sha512-ReY6pxwSzEU0b3r2/T/VhqMKg/AkceBT19X0UptA3/tYi5Pe2eXgEUH+NNMC5nok6c6XQz5tyVTUpuezRfSMSg==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.21.4.tgz", + "integrity": "sha512-1J4dhrw1h1PqnNNpzwxQ2UBymJUF8KuPjAAnlLwZcGhHAIqUigFW7cdK6GHoB64ubY4qXQNYknoUeks4Wz7CUA==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-module-imports": "^7.21.4", "@babel/helper-plugin-utils": "^7.20.2", "babel-plugin-polyfill-corejs2": "^0.3.3", "babel-plugin-polyfill-corejs3": "^0.6.0", @@ -2623,31 +2693,31 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz", - "integrity": "sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.21.4.tgz", + "integrity": "sha512-2W57zHs2yDLm6GD5ZpvNn71lZ0B/iypSdIeq25OurDKji6AdzV07qp4s3n1/x5BqtiGaTrPN3nerlSCaC5qNTw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.20.1", - "@babel/helper-compilation-targets": "^7.20.0", + "@babel/compat-data": "^7.21.4", + "@babel/helper-compilation-targets": "^7.21.4", "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-option": "^7.18.6", + "@babel/helper-validator-option": "^7.21.0", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.20.1", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.20.7", + "@babel/plugin-proposal-async-generator-functions": "^7.20.7", "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.21.0", "@babel/plugin-proposal-dynamic-import": "^7.18.6", "@babel/plugin-proposal-export-namespace-from": "^7.18.9", "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-logical-assignment-operators": "^7.20.7", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.20.2", + "@babel/plugin-proposal-object-rest-spread": "^7.20.7", "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-optional-chaining": "^7.21.0", "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.21.0", "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", @@ -2664,40 +2734,40 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.20.7", + "@babel/plugin-transform-async-to-generator": "^7.20.7", "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.20.2", - "@babel/plugin-transform-classes": "^7.20.2", - "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.20.2", + "@babel/plugin-transform-block-scoping": "^7.21.0", + "@babel/plugin-transform-classes": "^7.21.0", + "@babel/plugin-transform-computed-properties": "^7.20.7", + "@babel/plugin-transform-destructuring": "^7.21.3", "@babel/plugin-transform-dotall-regex": "^7.18.6", "@babel/plugin-transform-duplicate-keys": "^7.18.9", "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-for-of": "^7.21.0", "@babel/plugin-transform-function-name": "^7.18.9", "@babel/plugin-transform-literals": "^7.18.9", "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.19.6", - "@babel/plugin-transform-modules-commonjs": "^7.19.6", - "@babel/plugin-transform-modules-systemjs": "^7.19.6", + "@babel/plugin-transform-modules-amd": "^7.20.11", + "@babel/plugin-transform-modules-commonjs": "^7.21.2", + "@babel/plugin-transform-modules-systemjs": "^7.20.11", "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.20.5", "@babel/plugin-transform-new-target": "^7.18.6", "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.20.1", + "@babel/plugin-transform-parameters": "^7.21.3", "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.20.5", "@babel/plugin-transform-reserved-words": "^7.18.6", "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.19.0", + "@babel/plugin-transform-spread": "^7.20.7", "@babel/plugin-transform-sticky-regex": "^7.18.6", "@babel/plugin-transform-template-literals": "^7.18.9", "@babel/plugin-transform-typeof-symbol": "^7.18.9", "@babel/plugin-transform-unicode-escapes": "^7.18.10", "@babel/plugin-transform-unicode-regex": "^7.18.6", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.20.2", + "@babel/types": "^7.21.4", "babel-plugin-polyfill-corejs2": "^0.3.3", "babel-plugin-polyfill-corejs3": "^0.6.0", "babel-plugin-polyfill-regenerator": "^0.4.1", @@ -2760,19 +2830,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.3.tgz", - "integrity": "sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz", + "integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.3", + "@babel/code-frame": "^7.21.4", + "@babel/generator": "^7.21.4", "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-function-name": "^7.21.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.3", - "@babel/types": "^7.21.3", + "@babel/parser": "^7.21.4", + "@babel/types": "^7.21.4", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -2781,9 +2851,9 @@ } }, "node_modules/@babel/types": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.3.tgz", - "integrity": "sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.4.tgz", + "integrity": "sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.19.4", @@ -2834,14 +2904,14 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", - "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.0", + "espree": "^9.5.1", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -2884,9 +2954,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", - "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", + "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -4159,9 +4229,9 @@ } }, "node_modules/axios": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", - "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.6.tgz", + "integrity": "sha512-PEcdkk7JcdPiMDkvM4K6ZBRYq9keuVJsToxm2zQIM70Qqo2WHTdJZMXcG9X+RmRp2VPNUQC8W1RAGbgt6b1yMg==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -4169,9 +4239,9 @@ } }, "node_modules/axios-mock-adapter": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.21.2.tgz", - "integrity": "sha512-jzyNxU3JzB2XVhplZboUcF0YDs7xuExzoRSHXPHr+UQajaGmcTqvkkUADgkVI2WkGlpZ1zZlMVdcTMU0ejV8zQ==", + "version": "1.21.4", + "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.21.4.tgz", + "integrity": "sha512-ztnENm28ONAKeRXC/6SUW6pcsaXbThKq93MRDRAA47LYTzrGSDoO/DCr1NHz7jApEl95DrBoGPvZ0r9xtSbjqw==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.3", @@ -4395,25 +4465,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/bech32": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", @@ -4550,7 +4601,8 @@ "version": "2.11.0", "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", - "optional": true + "optional": true, + "peer": true }, "node_modules/brace-expansion": { "version": "1.1.11", @@ -4648,37 +4700,11 @@ } }, "node_modules/bson": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", - "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", - "dependencies": { - "buffer": "^5.6.0" - }, + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.2.0.tgz", + "integrity": "sha512-HevkSpDbpUfsrHWmWiAsNavANKYIErV2ePXllp1bwq5CDreAaFVj6RVlZpJnxK4WWDCJ/5jMUpaY6G526q3Hjg==", "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "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": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "node": ">=14.20.1" } }, "node_modules/buffer-compare": { @@ -5327,15 +5353,15 @@ } }, "node_modules/eslint": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", - "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz", + "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.1", - "@eslint/js": "8.36.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.39.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -5345,9 +5371,9 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.5.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -5674,9 +5700,9 @@ } }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -5684,15 +5710,21 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/estraverse": { @@ -5753,14 +5785,14 @@ } }, "node_modules/espree": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", - "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", "dev": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -5770,12 +5802,15 @@ } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { @@ -6034,6 +6069,7 @@ "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.0.11.tgz", "integrity": "sha512-4aUg3aNRR/WjQAcpceODG1C3x3lFANXRo8+1biqfieHmg9pyMt7qB4lQV/Ta6sJCTbA5vfD8fnA8S54JATiFUA==", "optional": true, + "peer": true, "dependencies": { "strnum": "^1.0.5" }, @@ -6587,25 +6623,6 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -9015,20 +9032,35 @@ } }, "node_modules/mongodb": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.14.0.tgz", - "integrity": "sha512-coGKkWXIBczZPr284tYKFLg+KbGPPLlSbdgfKAb6QqCFt5bo5VFZ50O3FFzsw4rnkqjwT6D8Qcoo9nshYKM7Mg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.3.0.tgz", + "integrity": "sha512-Wy/sbahguL8c3TXQWXmuBabiLD+iVmz+tOgQf+FwkCjhUIorqbAxRbbz00g4ZoN4sXIPwpAlTANMaGRjGGTikQ==", "dependencies": { - "bson": "^4.7.0", - "mongodb-connection-string-url": "^2.5.4", + "bson": "^5.2.0", + "mongodb-connection-string-url": "^2.6.0", "socks": "^2.7.1" }, "engines": { - "node": ">=12.9.0" + "node": ">=14.20.1" }, "optionalDependencies": { - "@aws-sdk/credential-providers": "^3.186.0", "saslprep": "^1.0.3" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.201.0", + "mongodb-client-encryption": ">=2.3.0 <3", + "snappy": "^7.2.2" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + } } }, "node_modules/mongodb-connection-string-url": { @@ -10313,7 +10345,8 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", - "optional": true + "optional": true, + "peer": true }, "node_modules/supports-color": { "version": "5.5.0", @@ -10453,7 +10486,8 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", - "optional": true + "optional": true, + "peer": true }, "node_modules/tweetnacl": { "version": "1.0.3", @@ -10669,6 +10703,7 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "optional": true, + "peer": true, "bin": { "uuid": "dist/bin/uuid" } @@ -10968,6 +11003,7 @@ "resolved": "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz", "integrity": "sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==", "optional": true, + "peer": true, "requires": { "tslib": "^1.11.1" }, @@ -10976,7 +11012,8 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true + "optional": true, + "peer": true } } }, @@ -10985,6 +11022,7 @@ "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz", "integrity": "sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==", "optional": true, + "peer": true, "requires": { "@aws-crypto/ie11-detection": "^3.0.0", "@aws-crypto/sha256-js": "^3.0.0", @@ -11000,7 +11038,8 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true + "optional": true, + "peer": true } } }, @@ -11009,6 +11048,7 @@ "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz", "integrity": "sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==", "optional": true, + "peer": true, "requires": { "@aws-crypto/util": "^3.0.0", "@aws-sdk/types": "^3.222.0", @@ -11019,7 +11059,8 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true + "optional": true, + "peer": true } } }, @@ -11028,6 +11069,7 @@ "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz", "integrity": "sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==", "optional": true, + "peer": true, "requires": { "tslib": "^1.11.1" }, @@ -11036,7 +11078,8 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true + "optional": true, + "peer": true } } }, @@ -11045,6 +11088,7 @@ "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz", "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "^3.222.0", "@aws-sdk/util-utf8-browser": "^3.0.0", @@ -11055,7 +11099,8 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true + "optional": true, + "peer": true } } }, @@ -11064,6 +11109,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/abort-controller/-/abort-controller-3.272.0.tgz", "integrity": "sha512-s2TV3phapcTwZNr4qLxbfuQuE9ZMP4RoJdkvRRCkKdm6jslsWLJf2Zlcxti/23hOlINUMYv2iXE2pftIgWGdpg==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -11074,6 +11120,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.272.0.tgz", "integrity": "sha512-uMjRWcNvX7SoGaVn0mXWD43+Z1awPahQwGW3riDLfXHZdOgw2oFDhD3Jg5jQ8OzQLUfDvArhE3WyZwlS4muMuQ==", "optional": true, + "peer": true, "requires": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -11117,6 +11164,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.272.0.tgz", "integrity": "sha512-xn9a0IGONwQIARmngThoRhF1lLGjHAD67sUaShgIMaIMc6ipVYN6alWG1VuUpoUQ6iiwMEt0CHdfCyLyUV/fTA==", "optional": true, + "peer": true, "requires": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -11157,6 +11205,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.272.0.tgz", "integrity": "sha512-ECcXu3xoa1yggnGKMTh29eWNHiF/wC6r5Uqbla22eOOosyh0+Z6lkJ3JUSLOUKCkBXA4Cs/tJL9UDFBrKbSlvA==", "optional": true, + "peer": true, "requires": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -11197,6 +11246,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.272.0.tgz", "integrity": "sha512-kigxCxURp3WupufGaL/LABMb7UQfzAQkKcj9royizL3ItJ0vw5kW/JFrPje5IW1mfLgdPF7PI9ShOjE0fCLTqA==", "optional": true, + "peer": true, "requires": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", @@ -11241,6 +11291,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/config-resolver/-/config-resolver-3.272.0.tgz", "integrity": "sha512-Dr4CffRVNsOp3LRNdpvcH6XuSgXOSLblWliCy/5I86cNl567KVMxujVx6uPrdTXYs2h1rt3MNl6jQGnAiJeTbw==", "optional": true, + "peer": true, "requires": { "@aws-sdk/signature-v4": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -11254,6 +11305,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.272.0.tgz", "integrity": "sha512-rVx0rtQjbiYCM0nah2rB/2ut2YJYPpRr1AbW/Hd4r/PI+yiusrmXAwuT4HIW2yr34zsQMPi1jZ3WHN9Rn9mzlg==", "optional": true, + "peer": true, "requires": { "@aws-sdk/client-cognito-identity": "3.272.0", "@aws-sdk/property-provider": "3.272.0", @@ -11266,6 +11318,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.272.0.tgz", "integrity": "sha512-QI65NbLnKLYHyTYhXaaUrq6eVsCCrMUb05WDA7+TJkWkjXesovpjc8vUKgFiLSxmgKmb2uOhHNcDyObKMrYQFw==", "optional": true, + "peer": true, "requires": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -11277,6 +11330,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-imds/-/credential-provider-imds-3.272.0.tgz", "integrity": "sha512-wwAfVY1jTFQEfxVfdYD5r5ieYGl+0g4nhekVxNMqE8E1JeRDd18OqiwAflzpgBIqxfqvCUkf+vl5JYyacMkNAQ==", "optional": true, + "peer": true, "requires": { "@aws-sdk/node-config-provider": "3.272.0", "@aws-sdk/property-provider": "3.272.0", @@ -11290,6 +11344,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.272.0.tgz", "integrity": "sha512-iE3CDzK5NcupHYjfYjBdY1JCy8NLEoRUsboEjG0i0gy3S3jVpDeVHX1dLVcL/slBFj6GiM7SoNV/UfKnJf3Gaw==", "optional": true, + "peer": true, "requires": { "@aws-sdk/credential-provider-env": "3.272.0", "@aws-sdk/credential-provider-imds": "3.272.0", @@ -11307,6 +11362,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.272.0.tgz", "integrity": "sha512-FI8uvwM1IxiRSvbkdKv8DZG5vxU3ezaseTaB1fHWTxEUFb0pWIoHX9oeOKer9Fj31SOZTCNAaYFURbSRuZlm/w==", "optional": true, + "peer": true, "requires": { "@aws-sdk/credential-provider-env": "3.272.0", "@aws-sdk/credential-provider-imds": "3.272.0", @@ -11325,6 +11381,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.272.0.tgz", "integrity": "sha512-hiCAjWWm2PeBFp5cjkxqyam/XADjiS+e7GzwC34TbZn3LisS0uoweLojj9tD11NnnUhyhbLteUvu5+rotOLwrg==", "optional": true, + "peer": true, "requires": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/shared-ini-file-loader": "3.272.0", @@ -11337,6 +11394,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.272.0.tgz", "integrity": "sha512-hwYaulyiU/7chKKFecxCeo0ls6Dxs7h+5EtoYcJJGvfpvCncyOZF35t00OAsCd3Wo7HkhhgfpGdb6dmvCNQAZQ==", "optional": true, + "peer": true, "requires": { "@aws-sdk/client-sso": "3.272.0", "@aws-sdk/property-provider": "3.272.0", @@ -11351,6 +11409,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.272.0.tgz", "integrity": "sha512-ImrHMkcgneGa/HadHAQXPwOrX26sAKuB8qlMxZF/ZCM2B55u8deY+ZVkVuraeKb7YsahMGehPFOfRAF6mvFI5Q==", "optional": true, + "peer": true, "requires": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -11362,6 +11421,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.272.0.tgz", "integrity": "sha512-ucd6Xq6aBMf+nM4uz5zkjL11mwaE5BV1Q4hkulaGu2v1dRA8n6zhLJk/sb4hOJ7leelqMJMErlbQ2T3MkYvlJQ==", "optional": true, + "peer": true, "requires": { "@aws-sdk/client-cognito-identity": "3.272.0", "@aws-sdk/client-sso": "3.272.0", @@ -11385,6 +11445,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/fetch-http-handler/-/fetch-http-handler-3.272.0.tgz", "integrity": "sha512-1Qhm9e0RbS1Xf4CZqUbQyUMkDLd7GrsRXWIvm9b86/vgeV8/WnjO3CMue9D51nYgcyQORhYXv6uVjAYCWbUExA==", "optional": true, + "peer": true, "requires": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/querystring-builder": "3.272.0", @@ -11398,6 +11459,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/hash-node/-/hash-node-3.272.0.tgz", "integrity": "sha512-40dwND+iAm3VtPHPZu7/+CIdVJFk2s0cWZt1lOiMPMSXycSYJ45wMk7Lly3uoqRx0uWfFK5iT2OCv+fJi5jTng==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "@aws-sdk/util-buffer-from": "3.208.0", @@ -11410,6 +11472,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/invalid-dependency/-/invalid-dependency-3.272.0.tgz", "integrity": "sha512-ysW6wbjl1Y78txHUQ/Tldj2Rg1BI7rpMO9B9xAF6yAX3mQ7t6SUPQG/ewOGvH2208NBIl3qP5e/hDf0Q6r/1iw==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -11420,6 +11483,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/is-array-buffer/-/is-array-buffer-3.201.0.tgz", "integrity": "sha512-UPez5qLh3dNgt0DYnPD/q0mVJY84rA17QE26hVNOW3fAji8W2wrwrxdacWOxyXvlxWsVRcKmr+lay1MDqpAMfg==", "optional": true, + "peer": true, "requires": { "tslib": "^2.3.1" } @@ -11429,6 +11493,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-content-length/-/middleware-content-length-3.272.0.tgz", "integrity": "sha512-sAbDZSTNmLX+UTGwlUHJBWy0QGQkiClpHwVFXACon+aG0ySLNeRKEVYs6NCPYldw4cj6hveLUn50cX44ukHErw==", "optional": true, + "peer": true, "requires": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -11440,6 +11505,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-endpoint/-/middleware-endpoint-3.272.0.tgz", "integrity": "sha512-Dk3JVjj7SxxoUKv3xGiOeBksvPtFhTDrVW75XJ98Ymv8gJH5L1sq4hIeJAHRKogGiRFq2J73mnZSlM9FVXEylg==", "optional": true, + "peer": true, "requires": { "@aws-sdk/middleware-serde": "3.272.0", "@aws-sdk/protocol-http": "3.272.0", @@ -11456,6 +11522,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.272.0.tgz", "integrity": "sha512-Q8K7bMMFZnioUXpxn57HIt4p+I63XaNAawMLIZ5B4F2piyukbQeM9q2XVKMGwqLvijHR8CyP5nHrtKqVuINogQ==", "optional": true, + "peer": true, "requires": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -11467,6 +11534,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.272.0.tgz", "integrity": "sha512-u2SQ0hWrFwxbxxYMG5uMEgf01pQY5jauK/LYWgGIvuCmFgiyRQQP3oN7kkmsxnS9MWmNmhbyQguX2NY02s5e9w==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -11477,6 +11545,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.272.0.tgz", "integrity": "sha512-Gp/eKWeUWVNiiBdmUM2qLkBv+VLSJKoWAO+aKmyxxwjjmWhE0FrfA1NQ1a3g+NGMhRbAfQdaYswRAKsul70ISg==", "optional": true, + "peer": true, "requires": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -11488,6 +11557,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-retry/-/middleware-retry-3.272.0.tgz", "integrity": "sha512-pCGvHM7C76VbO/dFerH+Vwf7tGv7j+e+eGrvhQ35mRghCtfIou/WMfTZlD1TNee93crrAQQVZKjtW3dMB3WCzg==", "optional": true, + "peer": true, "requires": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/service-error-classification": "3.272.0", @@ -11503,6 +11573,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.272.0.tgz", "integrity": "sha512-VvYPg7LrDIjUOWueSzo2wBzcNG7dw+cmzV6zAKaLxf0RC5jeAP4hE0OzDiiZfDrjNghEzgq/V+0NO+LewqYL9Q==", "optional": true, + "peer": true, "requires": { "@aws-sdk/middleware-signing": "3.272.0", "@aws-sdk/property-provider": "3.272.0", @@ -11517,6 +11588,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-serde/-/middleware-serde-3.272.0.tgz", "integrity": "sha512-kW1uOxgPSwtXPB5rm3QLdWomu42lkYpQL94tM1BjyFOWmBLO2lQhk5a7Dw6HkTozT9a+vxtscLChRa6KZe61Hw==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -11527,6 +11599,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.272.0.tgz", "integrity": "sha512-4LChFK4VAR91X+dupqM8fQqYhFGE0G4Bf9rQlVTgGSbi2KUOmpqXzH0/WKE228nKuEhmH8+Qd2VPSAE2JcyAUA==", "optional": true, + "peer": true, "requires": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/protocol-http": "3.272.0", @@ -11541,6 +11614,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-stack/-/middleware-stack-3.272.0.tgz", "integrity": "sha512-jhwhknnPBGhfXAGV5GXUWfEhDFoP/DN8MPCO2yC5OAxyp6oVJ8lTPLkZYMTW5VL0c0eG44dXpF4Ib01V+PlDrQ==", "optional": true, + "peer": true, "requires": { "tslib": "^2.3.1" } @@ -11550,6 +11624,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.272.0.tgz", "integrity": "sha512-Qy7/0fsDJxY5l0bEk7WKDfqb4Os/sCAgFR2zEvrhDtbkhYPf72ysvg/nRUTncmCbo8tOok4SJii2myk8KMfjjw==", "optional": true, + "peer": true, "requires": { "@aws-sdk/protocol-http": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -11561,6 +11636,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/node-config-provider/-/node-config-provider-3.272.0.tgz", "integrity": "sha512-YYCIBh9g1EQo7hm2l22HX5Yr9RoPQ2RCvhzKvF1n1e8t1QH4iObQrYUtqHG4khcm64Cft8C5MwZmgzHbya5Z6Q==", "optional": true, + "peer": true, "requires": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/shared-ini-file-loader": "3.272.0", @@ -11573,6 +11649,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/node-http-handler/-/node-http-handler-3.272.0.tgz", "integrity": "sha512-VrW9PjhhngeyYp4yGYPe5S0vgZH6NwU3Po9xAgayUeE37Inr7LS1YteFMHdpgsUUeNXnh7d06CXqHo1XjtqOKA==", "optional": true, + "peer": true, "requires": { "@aws-sdk/abort-controller": "3.272.0", "@aws-sdk/protocol-http": "3.272.0", @@ -11586,6 +11663,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/property-provider/-/property-provider-3.272.0.tgz", "integrity": "sha512-V1pZTaH5eqpAt8O8CzbItHhOtzIfFuWymvwZFkAtwKuaHpnl7jjrTouV482zoq8AD/fF+VVSshwBKYA7bhidIw==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -11596,6 +11674,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/protocol-http/-/protocol-http-3.272.0.tgz", "integrity": "sha512-4JQ54v5Yn08jspNDeHo45CaSn1CvTJqS1Ywgr79eU6jBExtguOWv6LNtwVSBD9X37v88iqaxt8iu1Z3pZZAJeg==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -11606,6 +11685,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/querystring-builder/-/querystring-builder-3.272.0.tgz", "integrity": "sha512-ndo++7GkdCj5tBXE6rGcITpSpZS4PfyV38wntGYAlj9liL1omk3bLZRY6uzqqkJpVHqbg2fD7O2qHNItzZgqhw==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "@aws-sdk/util-uri-escape": "3.201.0", @@ -11617,6 +11697,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/querystring-parser/-/querystring-parser-3.272.0.tgz", "integrity": "sha512-5oS4/9n6N1LZW9tI3qq/0GnCuWoOXRgcHVB+AJLRBvDbEe+GI+C/xK1tKLsfpDNgsQJHc4IPQoIt4megyZ/1+A==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -11626,13 +11707,15 @@ "version": "3.272.0", "resolved": "https://registry.npmjs.org/@aws-sdk/service-error-classification/-/service-error-classification-3.272.0.tgz", "integrity": "sha512-REoltM1LK9byyIufLqx9znhSolPcHQgVHIA2S0zu5sdt5qER4OubkLAXuo4MBbisUTmh8VOOvIyUb5ijZCXq1w==", - "optional": true + "optional": true, + "peer": true }, "@aws-sdk/shared-ini-file-loader": { "version": "3.272.0", "resolved": "https://registry.npmjs.org/@aws-sdk/shared-ini-file-loader/-/shared-ini-file-loader-3.272.0.tgz", "integrity": "sha512-lzFPohp5sy2XvwFjZIzLVCRpC0i5cwBiaXmFzXYQZJm6FSCszHO4ax+m9yrtlyVFF/2YPWl+/bzNthy4aJtseA==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -11643,6 +11726,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4/-/signature-v4-3.272.0.tgz", "integrity": "sha512-pWxnHG1NqJWMwlhJ6NHNiUikOL00DHROmxah6krJPMPq4I3am2KY2Rs/8ouWhnEXKaHAv4EQhSALJ+7Mq5S4/A==", "optional": true, + "peer": true, "requires": { "@aws-sdk/is-array-buffer": "3.201.0", "@aws-sdk/types": "3.272.0", @@ -11658,6 +11742,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/smithy-client/-/smithy-client-3.272.0.tgz", "integrity": "sha512-pvdleJ3kaRvyRw2pIZnqL85ZlWBOZrPKmR9I69GCvlyrfdjRBhbSjIEZ+sdhZudw0vdHxq25AGoLUXhofVLf5Q==", "optional": true, + "peer": true, "requires": { "@aws-sdk/middleware-stack": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -11669,6 +11754,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.272.0.tgz", "integrity": "sha512-0GISJ4IKN2rXvbSddB775VjBGSKhYIGQnAdMqbvxi9LB6pSvVxcH9aIL28G0spiuL+dy3yGQZ8RlJPAyP9JW9A==", "optional": true, + "peer": true, "requires": { "@aws-sdk/client-sso-oidc": "3.272.0", "@aws-sdk/property-provider": "3.272.0", @@ -11682,6 +11768,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.272.0.tgz", "integrity": "sha512-MmmL6vxMGP5Bsi+4wRx4mxYlU/LX6M0noOXrDh/x5FfG7/4ZOar/nDxqDadhJtNM88cuWVHZWY59P54JzkGWmA==", "optional": true, + "peer": true, "requires": { "tslib": "^2.3.1" } @@ -11691,6 +11778,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/url-parser/-/url-parser-3.272.0.tgz", "integrity": "sha512-vX/Tx02PlnQ/Kgtf5TnrNDHPNbY+amLZjW0Z1d9vzAvSZhQ4i9Y18yxoRDIaDTCNVRDjdhV8iuctW+05PB5JtQ==", "optional": true, + "peer": true, "requires": { "@aws-sdk/querystring-parser": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -11702,6 +11790,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-base64/-/util-base64-3.208.0.tgz", "integrity": "sha512-PQniZph5A6N7uuEOQi+1hnMz/FSOK/8kMFyFO+4DgA1dZ5pcKcn5wiFwHkcTb/BsgVqQa3Jx0VHNnvhlS8JyTg==", "optional": true, + "peer": true, "requires": { "@aws-sdk/util-buffer-from": "3.208.0", "tslib": "^2.3.1" @@ -11712,6 +11801,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-body-length-browser/-/util-body-length-browser-3.188.0.tgz", "integrity": "sha512-8VpnwFWXhnZ/iRSl9mTf+VKOX9wDE8QtN4bj9pBfxwf90H1X7E8T6NkiZD3k+HubYf2J94e7DbeHs7fuCPW5Qg==", "optional": true, + "peer": true, "requires": { "tslib": "^2.3.1" } @@ -11721,6 +11811,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-body-length-node/-/util-body-length-node-3.208.0.tgz", "integrity": "sha512-3zj50e5g7t/MQf53SsuuSf0hEELzMtD8RX8C76f12OSRo2Bca4FLLYHe0TZbxcfQHom8/hOaeZEyTyMogMglqg==", "optional": true, + "peer": true, "requires": { "tslib": "^2.3.1" } @@ -11730,6 +11821,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-buffer-from/-/util-buffer-from-3.208.0.tgz", "integrity": "sha512-7L0XUixNEFcLUGPeBF35enCvB9Xl+K6SQsmbrPk1P3mlV9mguWSDQqbOBwY1Ir0OVbD6H/ZOQU7hI/9RtRI0Zw==", "optional": true, + "peer": true, "requires": { "@aws-sdk/is-array-buffer": "3.201.0", "tslib": "^2.3.1" @@ -11740,6 +11832,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-config-provider/-/util-config-provider-3.208.0.tgz", "integrity": "sha512-DSRqwrERUsT34ug+anlMBIFooBEGwM8GejC7q00Y/9IPrQy50KnG5PW2NiTjuLKNi7pdEOlwTSEocJE15eDZIg==", "optional": true, + "peer": true, "requires": { "tslib": "^2.3.1" } @@ -11749,6 +11842,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-defaults-mode-browser/-/util-defaults-mode-browser-3.272.0.tgz", "integrity": "sha512-W8ZVJSZRuUBg8l0JEZzUc+9fKlthVp/cdE+pFeF8ArhZelOLCiaeCrMaZAeJusaFzIpa6cmOYQAjtSMVyrwRtg==", "optional": true, + "peer": true, "requires": { "@aws-sdk/property-provider": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -11761,6 +11855,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-defaults-mode-node/-/util-defaults-mode-node-3.272.0.tgz", "integrity": "sha512-U0NTcbMw6KFk7uz/avBmfxQSTREEiX6JDMH68oN/3ux4AICd2I4jHyxnloSWGuiER1FxZf1dEJ8ZTwy8Ibl21Q==", "optional": true, + "peer": true, "requires": { "@aws-sdk/config-resolver": "3.272.0", "@aws-sdk/credential-provider-imds": "3.272.0", @@ -11775,6 +11870,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.272.0.tgz", "integrity": "sha512-c4MPUaJt2G6gGpoiwIOqDfUa98c1J63RpYvf/spQEKOtC/tF5Gfqlxuq8FnAl5lHnrqj1B9ZXLLxFhHtDR0IiQ==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "tslib": "^2.3.1" @@ -11785,6 +11881,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-hex-encoding/-/util-hex-encoding-3.201.0.tgz", "integrity": "sha512-7t1vR1pVxKx0motd3X9rI3m/xNp78p3sHtP5yo4NP4ARpxyJ0fokBomY8ScaH2D/B+U5o9ARxldJUdMqyBlJcA==", "optional": true, + "peer": true, "requires": { "tslib": "^2.3.1" } @@ -11794,6 +11891,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.208.0.tgz", "integrity": "sha512-iua1A2+P7JJEDHVgvXrRJSvsnzG7stYSGQnBVphIUlemwl6nN5D+QrgbjECtrbxRz8asYFHSzhdhECqN+tFiBg==", "optional": true, + "peer": true, "requires": { "tslib": "^2.3.1" } @@ -11803,6 +11901,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-middleware/-/util-middleware-3.272.0.tgz", "integrity": "sha512-Abw8m30arbwxqmeMMha5J11ESpHUNmCeSqSzE8/C4B8jZQtHY4kq7f+upzcNIQ11lsd+uzBEzNG3+dDRi0XOJQ==", "optional": true, + "peer": true, "requires": { "tslib": "^2.3.1" } @@ -11812,6 +11911,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-retry/-/util-retry-3.272.0.tgz", "integrity": "sha512-Ngha5414LR4gRHURVKC9ZYXsEJhMkm+SJ+44wlzOhavglfdcKKPUsibz5cKY1jpUV7oKECwaxHWpBB8r6h+hOg==", "optional": true, + "peer": true, "requires": { "@aws-sdk/service-error-classification": "3.272.0", "tslib": "^2.3.1" @@ -11822,6 +11922,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-uri-escape/-/util-uri-escape-3.201.0.tgz", "integrity": "sha512-TeTWbGx4LU2c5rx0obHeDFeO9HvwYwQtMh1yniBz00pQb6Qt6YVOETVQikRZ+XRQwEyCg/dA375UplIpiy54mA==", "optional": true, + "peer": true, "requires": { "tslib": "^2.3.1" } @@ -11831,6 +11932,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.272.0.tgz", "integrity": "sha512-Lp5QX5bH6uuwBlIdr7w7OAcAI50ttyskb++yUr9i+SPvj6RI2dsfIBaK4mDg1qUdM5LeUdvIyqwj3XHjFKAAvA==", "optional": true, + "peer": true, "requires": { "@aws-sdk/types": "3.272.0", "bowser": "^2.11.0", @@ -11842,6 +11944,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.272.0.tgz", "integrity": "sha512-ljK+R3l+Q1LIHrcR+Knhk0rmcSkfFadZ8V+crEGpABf/QUQRg7NkZMsoe814tfBO5F7tMxo8wwwSdaVNNHtoRA==", "optional": true, + "peer": true, "requires": { "@aws-sdk/node-config-provider": "3.272.0", "@aws-sdk/types": "3.272.0", @@ -11853,6 +11956,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8/-/util-utf8-3.254.0.tgz", "integrity": "sha512-14Kso/eIt5/qfIBmhEL9L1IfyUqswjSTqO2mY7KOzUZ9SZbwn3rpxmtkhmATkRjD7XIlLKaxBkI7tU9Zjzj8Kw==", "optional": true, + "peer": true, "requires": { "@aws-sdk/util-buffer-from": "3.208.0", "tslib": "^2.3.1" @@ -11863,41 +11967,42 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", "optional": true, + "peer": true, "requires": { "tslib": "^2.3.1" } }, "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", + "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", "dev": true, "requires": { "@babel/highlight": "^7.18.6" } }, "@babel/compat-data": { - "version": "7.20.14", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.14.tgz", - "integrity": "sha512-0YpKHD6ImkWMEINCyDAD0HLLUH/lPCefG8ld9it8DJB2wnApraKuhgYTvTY1z7UFIfBTGy5LwncZ+5HWWGbhFw==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.4.tgz", + "integrity": "sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g==", "dev": true }, "@babel/core": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.3.tgz", - "integrity": "sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.4.tgz", + "integrity": "sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA==", "dev": true, "requires": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.3", - "@babel/helper-compilation-targets": "^7.20.7", + "@babel/code-frame": "^7.21.4", + "@babel/generator": "^7.21.4", + "@babel/helper-compilation-targets": "^7.21.4", "@babel/helper-module-transforms": "^7.21.2", "@babel/helpers": "^7.21.0", - "@babel/parser": "^7.21.3", + "@babel/parser": "^7.21.4", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.3", - "@babel/types": "^7.21.3", + "@babel/traverse": "^7.21.4", + "@babel/types": "^7.21.4", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -11917,12 +12022,12 @@ } }, "@babel/generator": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.3.tgz", - "integrity": "sha512-QS3iR1GYC/YGUnW7IdggFeN5c1poPUurnGttOV/bZgPGV+izC/D8HnD6DLwod0fsatNyVn1G3EVWMYIF0nHbeA==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.4.tgz", + "integrity": "sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==", "dev": true, "requires": { - "@babel/types": "^7.21.3", + "@babel/types": "^7.21.4", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -11961,28 +12066,28 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz", + "integrity": "sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg==", "dev": true, "requires": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", + "@babel/compat-data": "^7.21.4", + "@babel/helper-validator-option": "^7.21.0", "browserslist": "^4.21.3", "lru-cache": "^5.1.1", "semver": "^6.3.0" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.20.12", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.12.tgz", - "integrity": "sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.4.tgz", + "integrity": "sha512-46QrX2CQlaFRF4TkwfTt6nJD7IHq8539cCL7SDpqWSDeJKY1xylKKY5F/33mJhLZ3mFvKv2gGrVS6NkyF6qs+Q==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.18.6", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-member-expression-to-functions": "^7.20.7", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-member-expression-to-functions": "^7.21.0", "@babel/helper-optimise-call-expression": "^7.18.6", "@babel/helper-replace-supers": "^7.20.7", "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", @@ -12048,21 +12153,21 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz", - "integrity": "sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz", + "integrity": "sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q==", "dev": true, "requires": { - "@babel/types": "^7.20.7" + "@babel/types": "^7.21.0" } }, "@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz", + "integrity": "sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.21.4" } }, "@babel/helper-module-transforms": { @@ -12162,9 +12267,9 @@ "dev": true }, "@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", + "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", "dev": true }, "@babel/helper-wrap-function": { @@ -12202,9 +12307,9 @@ } }, "@babel/parser": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.3.tgz", - "integrity": "sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz", + "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==", "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { @@ -12250,12 +12355,12 @@ } }, "@babel/plugin-proposal-class-static-block": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.20.7.tgz", - "integrity": "sha512-AveGOoi9DAjUYYuUAG//Ig69GlazLnoyzMw68VCDux+c1tsnnH/OkYcpz/5xzMkEFC6UxjR5Gw1c+iY2wOGVeQ==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz", + "integrity": "sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.20.7", + "@babel/helper-create-class-features-plugin": "^7.21.0", "@babel/helper-plugin-utils": "^7.20.2", "@babel/plugin-syntax-class-static-block": "^7.14.5" } @@ -12344,9 +12449,9 @@ } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.20.7.tgz", - "integrity": "sha512-T+A7b1kfjtRM51ssoOfS1+wbyCVqorfyZhT99TvxxLMirPShD8CzKMRepMlCBGM5RpHMbn8s+5MMHnPstJH6mQ==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz", + "integrity": "sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.20.2", @@ -12365,13 +12470,13 @@ } }, "@babel/plugin-proposal-private-property-in-object": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.20.5.tgz", - "integrity": "sha512-Vq7b9dUA12ByzB4EjQTPo25sFhY+08pQDBSZRtUAkj7lb7jahaHR5igera16QZ+3my1nYR4dKsNdYj5IjPHilQ==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz", + "integrity": "sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.20.5", + "@babel/helper-create-class-features-plugin": "^7.21.0", "@babel/helper-plugin-utils": "^7.20.2", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" } @@ -12587,24 +12692,24 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.20.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.15.tgz", - "integrity": "sha512-Vv4DMZ6MiNOhu/LdaZsT/bsLRxgL94d269Mv4R/9sp6+Mp++X/JqypZYypJXLlM4mlL352/Egzbzr98iABH1CA==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz", + "integrity": "sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.20.2" } }, "@babel/plugin-transform-classes": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.7.tgz", - "integrity": "sha512-LWYbsiXTPKl+oBlXUGlwNlJZetXD5Am+CyBdqhPsDVjM9Jc8jwBJFrKhHf900Kfk2eZG1y9MAG3UNajol7A4VQ==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz", + "integrity": "sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.18.6", "@babel/helper-compilation-targets": "^7.20.7", "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", + "@babel/helper-function-name": "^7.21.0", "@babel/helper-optimise-call-expression": "^7.18.6", "@babel/helper-plugin-utils": "^7.20.2", "@babel/helper-replace-supers": "^7.20.7", @@ -12623,9 +12728,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.7.tgz", - "integrity": "sha512-Xwg403sRrZb81IVB79ZPqNQME23yhugYVqgTxAhT99h485F4f+GMELFhhOsscDUB7HCswepKeCKLn/GZvUKoBA==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz", + "integrity": "sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.20.2" @@ -12661,12 +12766,12 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", - "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz", + "integrity": "sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.20.2" } }, "@babel/plugin-transform-function-name": { @@ -12709,12 +12814,12 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.20.11.tgz", - "integrity": "sha512-S8e1f7WQ7cimJQ51JkAaDrEtohVEitXjgCGAS2N8S31Y42E+kWwfSz83LYz57QdBm7q9diARVqanIaH2oVgQnw==", + "version": "7.21.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz", + "integrity": "sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.20.11", + "@babel/helper-module-transforms": "^7.21.2", "@babel/helper-plugin-utils": "^7.20.2", "@babel/helper-simple-access": "^7.20.2" } @@ -12771,9 +12876,9 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.7.tgz", - "integrity": "sha512-WiWBIkeHKVOSYPO0pWkxGPfKeWrCJyD3NJ53+Lrp/QMSZbsVPovrVl2aWZ19D/LTVnaDv5Ap7GJ/B2CTOZdrfA==", + "version": "7.21.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.21.3.tgz", + "integrity": "sha512-Wxc+TvppQG9xWFYatvCGPvZ6+SIUxQ2ZdiBP+PHYMIjnPXD+uThCshaz4NZOnODAtBjjcVQQ/3OKs9LW28purQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.20.2" @@ -12808,12 +12913,12 @@ } }, "@babel/plugin-transform-runtime": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.21.0.tgz", - "integrity": "sha512-ReY6pxwSzEU0b3r2/T/VhqMKg/AkceBT19X0UptA3/tYi5Pe2eXgEUH+NNMC5nok6c6XQz5tyVTUpuezRfSMSg==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.21.4.tgz", + "integrity": "sha512-1J4dhrw1h1PqnNNpzwxQ2UBymJUF8KuPjAAnlLwZcGhHAIqUigFW7cdK6GHoB64ubY4qXQNYknoUeks4Wz7CUA==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-module-imports": "^7.21.4", "@babel/helper-plugin-utils": "^7.20.2", "babel-plugin-polyfill-corejs2": "^0.3.3", "babel-plugin-polyfill-corejs3": "^0.6.0", @@ -12887,31 +12992,31 @@ } }, "@babel/preset-env": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz", - "integrity": "sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.21.4.tgz", + "integrity": "sha512-2W57zHs2yDLm6GD5ZpvNn71lZ0B/iypSdIeq25OurDKji6AdzV07qp4s3n1/x5BqtiGaTrPN3nerlSCaC5qNTw==", "dev": true, "requires": { - "@babel/compat-data": "^7.20.1", - "@babel/helper-compilation-targets": "^7.20.0", + "@babel/compat-data": "^7.21.4", + "@babel/helper-compilation-targets": "^7.21.4", "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-option": "^7.18.6", + "@babel/helper-validator-option": "^7.21.0", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.20.1", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.20.7", + "@babel/plugin-proposal-async-generator-functions": "^7.20.7", "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.21.0", "@babel/plugin-proposal-dynamic-import": "^7.18.6", "@babel/plugin-proposal-export-namespace-from": "^7.18.9", "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-logical-assignment-operators": "^7.20.7", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.20.2", + "@babel/plugin-proposal-object-rest-spread": "^7.20.7", "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-optional-chaining": "^7.21.0", "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.21.0", "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", @@ -12928,40 +13033,40 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.20.7", + "@babel/plugin-transform-async-to-generator": "^7.20.7", "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.20.2", - "@babel/plugin-transform-classes": "^7.20.2", - "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.20.2", + "@babel/plugin-transform-block-scoping": "^7.21.0", + "@babel/plugin-transform-classes": "^7.21.0", + "@babel/plugin-transform-computed-properties": "^7.20.7", + "@babel/plugin-transform-destructuring": "^7.21.3", "@babel/plugin-transform-dotall-regex": "^7.18.6", "@babel/plugin-transform-duplicate-keys": "^7.18.9", "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-for-of": "^7.21.0", "@babel/plugin-transform-function-name": "^7.18.9", "@babel/plugin-transform-literals": "^7.18.9", "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.19.6", - "@babel/plugin-transform-modules-commonjs": "^7.19.6", - "@babel/plugin-transform-modules-systemjs": "^7.19.6", + "@babel/plugin-transform-modules-amd": "^7.20.11", + "@babel/plugin-transform-modules-commonjs": "^7.21.2", + "@babel/plugin-transform-modules-systemjs": "^7.20.11", "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.20.5", "@babel/plugin-transform-new-target": "^7.18.6", "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.20.1", + "@babel/plugin-transform-parameters": "^7.21.3", "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.20.5", "@babel/plugin-transform-reserved-words": "^7.18.6", "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.19.0", + "@babel/plugin-transform-spread": "^7.20.7", "@babel/plugin-transform-sticky-regex": "^7.18.6", "@babel/plugin-transform-template-literals": "^7.18.9", "@babel/plugin-transform-typeof-symbol": "^7.18.9", "@babel/plugin-transform-unicode-escapes": "^7.18.10", "@babel/plugin-transform-unicode-regex": "^7.18.6", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.20.2", + "@babel/types": "^7.21.4", "babel-plugin-polyfill-corejs2": "^0.3.3", "babel-plugin-polyfill-corejs3": "^0.6.0", "babel-plugin-polyfill-regenerator": "^0.4.1", @@ -13009,27 +13114,27 @@ } }, "@babel/traverse": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.3.tgz", - "integrity": "sha512-XLyopNeaTancVitYZe2MlUEvgKb6YVVPXzofHgqHijCImG33b/uTurMS488ht/Hbsb2XK3U2BnSTxKVNGV3nGQ==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz", + "integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==", "dev": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.3", + "@babel/code-frame": "^7.21.4", + "@babel/generator": "^7.21.4", "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-function-name": "^7.21.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.3", - "@babel/types": "^7.21.3", + "@babel/parser": "^7.21.4", + "@babel/types": "^7.21.4", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.3.tgz", - "integrity": "sha512-sBGdETxC+/M4o/zKC0sl6sjWv62WFR/uzxrJ6uYyMLZOUlPnwzw0tKgVHOXxaAd5l2g8pEDM5RZ495GPQI77kg==", + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.4.tgz", + "integrity": "sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==", "dev": true, "requires": { "@babel/helper-string-parser": "^7.19.4", @@ -13067,14 +13172,14 @@ "dev": true }, "@eslint/eslintrc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", - "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.0", + "espree": "^9.5.1", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -13101,9 +13206,9 @@ } }, "@eslint/js": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", - "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", + "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==", "dev": true }, "@humanwhocodes/config-array": { @@ -14107,9 +14212,9 @@ "dev": true }, "axios": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", - "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.6.tgz", + "integrity": "sha512-PEcdkk7JcdPiMDkvM4K6ZBRYq9keuVJsToxm2zQIM70Qqo2WHTdJZMXcG9X+RmRp2VPNUQC8W1RAGbgt6b1yMg==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -14117,9 +14222,9 @@ } }, "axios-mock-adapter": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.21.2.tgz", - "integrity": "sha512-jzyNxU3JzB2XVhplZboUcF0YDs7xuExzoRSHXPHr+UQajaGmcTqvkkUADgkVI2WkGlpZ1zZlMVdcTMU0ejV8zQ==", + "version": "1.21.4", + "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.21.4.tgz", + "integrity": "sha512-ztnENm28ONAKeRXC/6SUW6pcsaXbThKq93MRDRAA47LYTzrGSDoO/DCr1NHz7jApEl95DrBoGPvZ0r9xtSbjqw==", "dev": true, "requires": { "fast-deep-equal": "^3.1.3", @@ -14291,11 +14396,6 @@ "safe-buffer": "^5.0.1" } }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, "bech32": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", @@ -14415,7 +14515,8 @@ "version": "2.11.0", "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", - "optional": true + "optional": true, + "peer": true }, "brace-expansion": { "version": "1.1.11", @@ -14494,21 +14595,9 @@ } }, "bson": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.7.2.tgz", - "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==", - "requires": { - "buffer": "^5.6.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.2.0.tgz", + "integrity": "sha512-HevkSpDbpUfsrHWmWiAsNavANKYIErV2ePXllp1bwq5CDreAaFVj6RVlZpJnxK4WWDCJ/5jMUpaY6G526q3Hjg==" }, "buffer-compare": { "version": "1.1.1", @@ -15020,15 +15109,15 @@ "dev": true }, "eslint": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", - "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz", + "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.1", - "@eslint/js": "8.36.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.39.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -15038,9 +15127,9 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.5.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -15108,9 +15197,9 @@ "dev": true }, "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -15118,9 +15207,9 @@ } }, "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "dev": true }, "estraverse": { @@ -15335,20 +15424,20 @@ "dev": true }, "espree": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", - "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", "dev": true, "requires": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.0" }, "dependencies": { "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "dev": true } } @@ -15571,6 +15660,7 @@ "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.0.11.tgz", "integrity": "sha512-4aUg3aNRR/WjQAcpceODG1C3x3lFANXRo8+1biqfieHmg9pyMt7qB4lQV/Ta6sJCTbA5vfD8fnA8S54JATiFUA==", "optional": true, + "peer": true, "requires": { "strnum": "^1.0.5" } @@ -15981,11 +16071,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, "ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -17749,13 +17834,12 @@ "dev": true }, "mongodb": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.14.0.tgz", - "integrity": "sha512-coGKkWXIBczZPr284tYKFLg+KbGPPLlSbdgfKAb6QqCFt5bo5VFZ50O3FFzsw4rnkqjwT6D8Qcoo9nshYKM7Mg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.3.0.tgz", + "integrity": "sha512-Wy/sbahguL8c3TXQWXmuBabiLD+iVmz+tOgQf+FwkCjhUIorqbAxRbbz00g4ZoN4sXIPwpAlTANMaGRjGGTikQ==", "requires": { - "@aws-sdk/credential-providers": "^3.186.0", - "bson": "^4.7.0", - "mongodb-connection-string-url": "^2.5.4", + "bson": "^5.2.0", + "mongodb-connection-string-url": "^2.6.0", "saslprep": "^1.0.3", "socks": "^2.7.1" } @@ -18720,7 +18804,8 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", - "optional": true + "optional": true, + "peer": true }, "supports-color": { "version": "5.5.0", @@ -18829,7 +18914,8 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", - "optional": true + "optional": true, + "peer": true }, "tweetnacl": { "version": "1.0.3", @@ -18985,7 +19071,8 @@ "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "optional": true + "optional": true, + "peer": true }, "v8-to-istanbul": { "version": "9.1.0", diff --git a/package.json b/package.json index e888db35..f79951a7 100644 --- a/package.json +++ b/package.json @@ -44,20 +44,20 @@ "license": "GPL-3.0", "dependencies": { "adamant-api": "^1.8.0", - "axios": "^1.3.4", + "axios": "^1.3.6", "express": "^4.18.2", "fast-deep-equal": "^3.1.3", "form-data": "^4.0.0", "jsonminify": "^0.4.2", - "mongodb": "^4.14.0" + "mongodb": "^5.3.0" }, "devDependencies": { - "@babel/core": "^7.21.3", + "@babel/core": "^7.21.4", "@babel/eslint-parser": "^7.21.3", - "@babel/plugin-transform-runtime": "^7.21.0", - "@babel/preset-env": "^7.20.2", - "axios-mock-adapter": "^1.21.2", - "eslint": "^8.36.0", + "@babel/plugin-transform-runtime": "^7.21.4", + "@babel/preset-env": "^7.21.4", + "axios-mock-adapter": "^1.21.4", + "eslint": "^8.39.0", "eslint-config-google": "^0.14.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-node": "^11.1.0", diff --git a/server.js b/server.js index 20b1d713..f9cf3f2b 100644 --- a/server.js +++ b/server.js @@ -19,19 +19,19 @@ if (port) { }); return; } - tb.find().toArray((err, data) => { - if (err) { - res.json({ - success: false, - err, + tb.find().toArray() + .then((result) => { + res.json({ + result, + success: true, + }); + }) + .catch((err) => { + res.json({ + err, + success: false, + }); }); - return; - } - res.json({ - success: true, - result: data, - }); - }); }); app.listen(port, () => log.info(`${config.notifyName} debug server is listening on http://localhost:${port}. F. e., http://localhost:${port}/db?tb=systemDb.`)); From 4755935432164b77b3af58df6262bf034f49d6e4 Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sat, 29 Apr 2023 15:58:22 +0500 Subject: [PATCH 16/38] fix: getLogString() in utils --- helpers/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/utils.js b/helpers/utils.js index 03317030..b175a0b1 100644 --- a/helpers/utils.js +++ b/helpers/utils.js @@ -42,7 +42,7 @@ module.exports = { data = JSON.stringify(data); } - if (data.length > length) { + if (data?.length > length) { data = data.slice(0, length-1) + '…'; } From c89fbbf4d5cc9809c95e1f6519629caf8379feb2 Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sat, 29 Apr 2023 16:44:44 +0500 Subject: [PATCH 17/38] chore: update JSDocs --- trade/api/stakecube_api.js | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index dbb33bf8..397b7cc1 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -53,10 +53,11 @@ module.exports = function() { }; /** - * @param {String} path - * @param {Object} data - * @param {String} type - * @returns {Promise|Promise} + * Makes a request to private (auth) endpoint + * @param {String} path Endpoint + * @param {Object} data Request params + * @param {String} type Request type: get, post, delete + * @returns {*} */ function protectedRequest(path, data, type = 'get') { let url = `${WEB_BASE}${path}`; @@ -78,7 +79,7 @@ module.exports = function() { queryString = queryString + `&signature=${sign}`; } catch (e) { - log.error(`An error occurred while generating request signature: ${e}`); + log.error(`Error while generating request signature: ${e}`); return Promise.reject(e); } @@ -106,6 +107,13 @@ module.exports = function() { }); } + /** + * Makes a request to public endpoint + * @param {String} path Endpoint + * @param {Object} data Request params + * @param {String} path Endpoint + * @returns {*} + */ function publicRequest(path, data, type = 'get') { let url = `${WEB_BASE}${path}`; const urlBase = url; @@ -167,7 +175,7 @@ module.exports = function() { }, /** - * User data including: wallets with balances and deposit addresses, exchange fee + * Account: Returns general information about your StakeCube account, including wallets, balances, fee-rate in percentage and your account username * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/user.md#account */ @@ -176,13 +184,13 @@ module.exports = function() { }, /** - * Returns a list of your currently open orders, their IDs, their market pair, and other relevant order information. + * Returns a list of your currently open orders, their IDs, their market pair, and other relevant order information * @param {String} symbol In StakeCube format as BTC_USDT * @param {Number} limit Number of records to return. Default is 100. * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#my-open-orders */ - getOrders: async function(symbol, limit = 100) { + getOrders: async function(symbol, limit = 1000) { const data = { market: symbol, limit, @@ -193,6 +201,7 @@ module.exports = function() { /** * Creates an exchange limit order on the chosen market, side, price and amount + * Note: market order are not supported via API * @param {String} symbol In StakeCube format as BTC_USDT * @param {Number} amount Order amount in coin1 * @param {Number} price Order price @@ -212,8 +221,8 @@ module.exports = function() { }, /** - * Cancels an order by it's unique ID - * @param {String} orderId Example 285088438163 + * Cancels an order by its unique ID + * @param {String} orderId Example: 285088438163 * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#cancel */ @@ -259,7 +268,7 @@ module.exports = function() { * @return {Promise>} Last trades * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#trades */ - getTradesHistory: function(symbol, limit ) { + getTradesHistory: function(symbol, limit = 300) { const data = { market: symbol, limit, @@ -279,6 +288,7 @@ module.exports = function() { /** * Returns info on a specified market + * Note: same endpoint as for markets() * @param {String} symbol In StakeCube format as DOGE_SCC * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#markets From ce1bc6cf5582a048535b5ffca3758c885734ef5b Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sat, 29 Apr 2023 17:11:13 +0500 Subject: [PATCH 18/38] chore: update logs --- trade/api/stakecube_api.js | 2 +- trade/trader_stakecube.js | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index 397b7cc1..9133032b 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -201,7 +201,7 @@ module.exports = function() { /** * Creates an exchange limit order on the chosen market, side, price and amount - * Note: market order are not supported via API + * Note: market orders are not supported via API * @param {String} symbol In StakeCube format as BTC_USDT * @param {Number} amount Order amount in coin1 * @param {Number} price Order price diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index 845e5f5b..a7386c7a 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -252,7 +252,7 @@ module.exports = ( if (data.errorMessage) { if (data.errorMessage === 'Order already canceled or filled') { - log.warn(`Order ${orderId} on ${pair_.pairReadable} pair is already canceled or filled`); + log.log(`Order ${orderId} on ${pair_.pairReadable} pair is already cancelled or filled.`); return true; } else { log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${data.errorMessage}`); @@ -288,7 +288,7 @@ module.exports = ( if (data.errorMessage) { if (data.errorMessage === 'no open order') { - log.log(`No open orders on ${pair_.pairReadable}`); + log.log(`No open orders on ${pair_.pairReadable}.`); return true; } else { log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${data.errorMessage}`); @@ -305,6 +305,7 @@ module.exports = ( /** * Places an order + * Note: market orders are not supported via API * @param {String} side 'buy' or 'sell' * @param {String} pair In classic format like BTC/USD * @param {Number} price Order price @@ -473,11 +474,11 @@ module.exports = ( ticker = await stakeCubeApiClient.ticker(pair_.pair); if (ticker.errorMessage || !ticker[pair_.pair]) { - log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${ticker.errorMessage}`); + log.warn(`API request getRates-ticker(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${ticker.errorMessage}`); return undefined; } } catch (err) { - log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + log.warn(`API request getRates-ticker(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; } @@ -486,16 +487,17 @@ module.exports = ( orderBook = await stakeCubeApiClient.orderBook(pair_.pair); if (orderBook.errorMessage) { - log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${orderBook.errorMessage}`); + log.warn(`API request getRates-orderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${orderBook.errorMessage}`); return undefined; } } catch (err) { - log.warn(`API request getRates(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + log.warn(`API request getRates-orderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; } try { ticker = ticker[pair_.pair]; + return { ask: +orderBook.asks[orderBook.asks.length - 1]?.price, // assuming asks are sorted in descending order by price. We need the lowest ask bid: +orderBook.bids[0]?.price, // assuming bids are sorted in descending order by price. We need the highest bid From 716fad2891bd15481e9984741712280473a6e359 Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sat, 29 Apr 2023 17:40:19 +0500 Subject: [PATCH 19/38] chore: add StakeCube to readme and default config --- README.md | 1 + config.default.jsonc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c16c35c4..bbc6a487 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Trading is a mode when a bot runs orders according to some strategy. It can be p * [P2PB2B](https://p2pb2b.com) * [Azbit](https://azbit.com?referralCode=9YVWYAF) +* [StakeCube](https://stakecube.net/?team=adm) To add other exchange support, see [marketmaking.app/services](https://marketmaking.app/services/). diff --git a/config.default.jsonc b/config.default.jsonc index 8aa52752..d307e610 100644 --- a/config.default.jsonc +++ b/config.default.jsonc @@ -44,7 +44,8 @@ /** List of supported exchanges **/ "exchanges": [ "P2PB2B", - "Azbit" + "Azbit", + "StakeCube" ], /** Exchange to work with. Case insensitive. **/ From c11f1f7cb8b5ea3804d146980ff060e653ab4586 Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sat, 29 Apr 2023 18:15:50 +0500 Subject: [PATCH 20/38] chore: if scStatus === true, resolve request data --- trade/api/stakecube_api.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index 9133032b..e5422249 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -25,16 +25,29 @@ module.exports = function() { const scData = responseOrError?.data || responseOrError?.response?.data; + /** + { + success: true, + result: { + ... + }, + error: '', + timestamp: 1682773618, + timestampConverted: '2023-04-29 13:06:58', (UTC) + executionTime: 0.25620508193969727 + } + */ + const scResult = scData?.result; const scStatus = scData?.success; const scError = scData?.error; - const scErrorInfo = scStatus ? `[No error code]` : `[${scError}]`; + const scErrorInfo = scStatus ? `[No error code]` : `[${scError}]`; const errorMessage = httpCode ? `${httpCode} ${httpMessage}, ${scErrorInfo}` : String(responseOrError); const reqParameters = queryString || bodyString || '{ No parameters }'; try { - if ([200, 201].includes(httpCode) && scData && scStatus) { + if (scStatus) { resolve(scResult); } else if ([200, 201].includes(httpCode) && scData) { scResult.errorMessage = scError; From 4c9c5904b7553fce4d7f8cb8790c1c6f1e28d2e1 Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sat, 29 Apr 2023 18:21:29 +0500 Subject: [PATCH 21/38] fix: market status --- trade/trader_stakecube.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index a7386c7a..9df60ed9 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -63,7 +63,7 @@ module.exports = ( coin2MinPrice: null, coin2MaxPrice: null, minTrade: null, - status: market.status === 'ACTIVE' ? 'ONLINE' : 'OFFLINE', + status: market.state === 'ACTIVE' ? 'ONLINE' : 'OFFLINE', }; }); From 6e91e0220c39862a50cdd4f56f2f12cb9f196ae5 Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sat, 29 Apr 2023 18:29:58 +0500 Subject: [PATCH 22/38] fix: date is in UTC, not local time --- trade/trader_stakecube.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index 9df60ed9..e30be530 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -221,7 +221,7 @@ module.exports = ( price: +order.price, side: order.side.toLowerCase(), // 'buy' or 'sell' type: 'limit', // StakeCube supports only limit orders - timestamp: Date.parse(order.placed), // e.g. StakeCube timestamp (order.placed) 2023-04-10 10:17:03, converting to 1681111023000 + timestamp: Date.parse(order.placed + '+00:00'), // e.g. StakeCube timestamp (order.placed) 2023-04-29 13:22:44, converting to 1681111023000 amount: +order.amount, amountExecuted: +order.executedAmount, amountLeft, @@ -597,12 +597,13 @@ module.exports = ( try { const result = []; + trades.forEach((trade) => { result.push({ coin1Amount: +trade.amount, // amount in coin1 price: +trade.price, // trade price coin2Amount: +trade.amount * +trade.price, // quote in coin2 - date: Date.parse(trade.timeConverted), // e.g. StakeCube timestamp (trade.timeConverted) 2023-04-10 10:17:03, converting to 1681111023000 + date: Date.parse(trade.timeConverted + '+00:00'), // e.g. StakeCube timestamp (trade.timeConverted) 2023-04-10 10:17:03, converting to 1681111023000 type: trade.direction.toLowerCase(), // 'buy' or 'sell' tradeId: null, }); From 99ee1174e1730aa13be4d4b39e4bf8a91c5f53d9 Mon Sep 17 00:00:00 2001 From: martiliones Date: Sun, 30 Apr 2023 00:12:43 +0600 Subject: [PATCH 23/38] refactor: remove useless this statements and comments --- helpers/dbModel.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helpers/dbModel.js b/helpers/dbModel.js index 72db86b1..c81ba4db 100644 --- a/helpers/dbModel.js +++ b/helpers/dbModel.js @@ -12,13 +12,13 @@ module.exports = (db) => { static get db() { return db; } - static async find(req) { // return Promise - const data = await this.db.find(req).toArray(); + static async find(req) { + const data = await db.find(req).toArray(); return data.map((d) => new this(d)); } - static async aggregate(req) { // return Promise - const data = await this.db.aggregate(req).toArray(); + static async aggregate(req) { + const data = await db.aggregate(req).toArray(); return data.map((d) => new this(d)); } From 1fa916d4a54a5a64e24ef4375324805bde4a3067 Mon Sep 17 00:00:00 2001 From: confleux Date: Tue, 2 May 2023 14:43:26 +0300 Subject: [PATCH 24/38] refactor: return scData instead of scResult at api --- trade/api/stakecube_api.js | 6 +-- trade/trader_stakecube.js | 104 ++++++++++++++++++++++--------------- 2 files changed, 64 insertions(+), 46 deletions(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index e5422249..8e66ef0f 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -38,7 +38,6 @@ module.exports = function() { } */ - const scResult = scData?.result; const scStatus = scData?.success; const scError = scData?.error; @@ -48,10 +47,9 @@ module.exports = function() { try { if (scStatus) { - resolve(scResult); + resolve(scData); } else if ([200, 201].includes(httpCode) && scData) { - scResult.errorMessage = scError; - resolve(scResult); + resolve(scData); } else if ([404].includes(httpCode)) { log.warn(`Request to ${url} with data ${reqParameters} failed: ${errorMessage}. Not found. Rejecting…`); reject(errorMessage); diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index e30be530..5a9da6ba 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -35,13 +35,15 @@ module.exports = ( module.exports.gettingMarkets = true; return new Promise((resolve) => { - stakeCubeApiClient.markets().then((markets) => { + stakeCubeApiClient.markets().then((scData) => { try { - if (markets.errorMessage) { - log.warn(`API request getMarkets(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${markets.errorMessage}`); + if (scData.error) { + log.warn(`API request getMarkets(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); resolve(undefined); } + const markets = scData.result; + const result = {}; Object.entries(markets).forEach(([pairName, market]) => { @@ -127,13 +129,13 @@ module.exports = ( async getBalances(nonzero = true) { const paramString = `nonzero: ${nonzero}`; - let userData; + let scData; try { - userData = await stakeCubeApiClient.getUserData(); + scData = await stakeCubeApiClient.getUserData(); - if (userData.errorMessage) { - log.warn(`API request getBalances(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${userData.errorMessage}`); + if (scData.error) { + log.warn(`API request getBalances(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); return undefined; } } catch (err) { @@ -141,6 +143,8 @@ module.exports = ( return undefined; } + const userData = scData.result; + try { let result = []; @@ -180,16 +184,16 @@ module.exports = ( return undefined; } - let orders; + let scData; try { - orders = await stakeCubeApiClient.getOrders(pair_.pair); + scData = await stakeCubeApiClient.getOrders(pair_.pair); - if (orders.errorMessage) { - if (orders.errorMessage === 'no data') { + if (scData.error) { + if (scData.error === 'no data') { return []; } else { - log.warn(`API request getOpenOrders(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${orders.errorMessage}`); + log.warn(`API request getOpenOrders(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); return undefined; } } @@ -198,6 +202,8 @@ module.exports = ( return undefined; } + const orders = scData.result; + try { const result = []; @@ -248,18 +254,20 @@ module.exports = ( const pair_ = formatPairName(pair); try { - const data = await stakeCubeApiClient.cancelOrder(orderId); + const scData = await stakeCubeApiClient.cancelOrder(orderId); - if (data.errorMessage) { - if (data.errorMessage === 'Order already canceled or filled') { + if (scData.error) { + if (scData.error === 'Order already canceled or filled') { log.log(`Order ${orderId} on ${pair_.pairReadable} pair is already cancelled or filled.`); return true; } else { - log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${data.errorMessage}`); + log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); return undefined; } } + const data = scData.result; + if (data.orderId === orderId) { log.log(`Cancelling order ${orderId} on ${pair_.pairReadable} pair…`); return true; @@ -284,14 +292,14 @@ module.exports = ( const pair_ = formatPairName(pair); try { - const data = await stakeCubeApiClient.cancelAllOrders(pair_.pair); + const scData = await stakeCubeApiClient.cancelAllOrders(pair_.pair); - if (data.errorMessage) { - if (data.errorMessage === 'no open order') { + if (scData.error) { + if (scData.error === 'no open order') { log.log(`No open orders on ${pair_.pairReadable}.`); return true; } else { - log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${data.errorMessage}`); + log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); return undefined; } } @@ -376,10 +384,12 @@ module.exports = ( const order = {}; let orderId; let errorMessage; - let response; + let scData; try { - response = await stakeCubeApiClient.addOrder(marketInfo.pairPlain, coin1Amount, price, side); + scData = await stakeCubeApiClient.addOrder(marketInfo.pairPlain, coin1Amount, price, side); + + const response = scData.result; orderId = response?.orderId; errorMessage = response?.errorMessage; @@ -428,12 +438,12 @@ module.exports = ( async getDepositAddress(coin) { const paramString = `coin: ${coin}`; - let userData; + let scData; try { - userData = await stakeCubeApiClient.getUserData(); + scData = await stakeCubeApiClient.getUserData(); - if (userData.errorMessage) { - log.warn(`API request getDepositAddress(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${userData.errorMessage}`); + if (scData.error) { + log.warn(`API request getDepositAddress(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); return undefined; } } catch (err) { @@ -441,6 +451,8 @@ module.exports = ( return undefined; } + const userData = scData.result; + try { const { wallets } = userData; let result; @@ -468,13 +480,13 @@ module.exports = ( const paramString = `pair: ${pair}`; const pair_ = formatPairName(pair); - let ticker; + let scTickerData; try { - ticker = await stakeCubeApiClient.ticker(pair_.pair); + scTickerData = await stakeCubeApiClient.ticker(pair_.pair); - if (ticker.errorMessage || !ticker[pair_.pair]) { - log.warn(`API request getRates-ticker(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${ticker.errorMessage}`); + if (scTickerData.error || !scTickerData.result[pair_.pair]) { + log.warn(`API request getRates-ticker(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scTickerData.error}`); return undefined; } } catch (err) { @@ -482,12 +494,14 @@ module.exports = ( return undefined; } - let orderBook; + let ticker = scTickerData.result; + + let scOrderBookData; try { - orderBook = await stakeCubeApiClient.orderBook(pair_.pair); + scOrderBookData = await stakeCubeApiClient.orderBook(pair_.pair); - if (orderBook.errorMessage) { - log.warn(`API request getRates-orderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${orderBook.errorMessage}`); + if (scOrderBookData.error) { + log.warn(`API request getRates-orderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scOrderBookData.error}`); return undefined; } } catch (err) { @@ -495,6 +509,8 @@ module.exports = ( return undefined; } + const orderBook = scOrderBookData.result; + try { ticker = ticker[pair_.pair]; @@ -522,12 +538,12 @@ module.exports = ( const paramString = `pair: ${pair}`; const pair_ = formatPairName(pair); - let book; + let scData; try { - book = await stakeCubeApiClient.orderBook(pair_.pair); + scData = await stakeCubeApiClient.orderBook(pair_.pair); - if (book.errorMessage) { - log.warn(`API request getOrderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${book.errorMessage}`); + if (scData.error) { + log.warn(`API request getOrderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); return undefined; } } catch (err) { @@ -535,6 +551,8 @@ module.exports = ( return undefined; } + const book = scData.result; + try { const result = { bids: [], @@ -582,12 +600,12 @@ module.exports = ( const paramString = `pair: ${pair}`; const pair_ = formatPairName(pair); - let trades = []; + let scData = []; try { - trades = await stakeCubeApiClient.getTradesHistory(pair_.pairPlain, limit); + scData = await stakeCubeApiClient.getTradesHistory(pair_.pairPlain, limit); - if (trades.errorMessage) { - log.warn(`API request getTradesHistory(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${trades.errorMessage}}`); + if (scData.error) { + log.warn(`API request getTradesHistory(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}}`); return undefined; } } catch (err) { @@ -595,6 +613,8 @@ module.exports = ( return undefined; } + const trades = scData.result; + try { const result = []; From 6abf481cc85c08fee10415daa80f9ffe0f1de891 Mon Sep 17 00:00:00 2001 From: confleux Date: Wed, 3 May 2023 15:06:40 +0300 Subject: [PATCH 25/38] fix: getBalances() --- trade/trader_stakecube.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index 5a9da6ba..db0a9425 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -148,7 +148,7 @@ module.exports = ( try { let result = []; - for (crypto of userData.wallets) { + for (const crypto of userData.wallets) { result.push({ code: crypto.asset, free: +crypto.balance, From 5961c858f2675b4b9e745abb74853c1df8923090 Mon Sep 17 00:00:00 2001 From: confleux Date: Wed, 3 May 2023 15:27:08 +0300 Subject: [PATCH 26/38] refactor: remove unnecessary conditionals --- trade/api/stakecube_api.js | 2 ++ trade/trader_stakecube.js | 44 -------------------------------------- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index 8e66ef0f..c9620e1e 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -49,6 +49,8 @@ module.exports = function() { if (scStatus) { resolve(scData); } else if ([200, 201].includes(httpCode) && scData) { + scData.errorMessage = errorMessage; + log.log(`StakeCube processed a request to ${url} with data ${reqParameters}, but with error: ${errorMessage}. Resolving…`); resolve(scData); } else if ([404].includes(httpCode)) { log.warn(`Request to ${url} with data ${reqParameters} failed: ${errorMessage}. Not found. Rejecting…`); diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index db0a9425..31005e08 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -37,11 +37,6 @@ module.exports = ( return new Promise((resolve) => { stakeCubeApiClient.markets().then((scData) => { try { - if (scData.error) { - log.warn(`API request getMarkets(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); - resolve(undefined); - } - const markets = scData.result; const result = {}; @@ -133,11 +128,6 @@ module.exports = ( try { scData = await stakeCubeApiClient.getUserData(); - - if (scData.error) { - log.warn(`API request getBalances(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); - return undefined; - } } catch (err) { log.warn(`API request getBalances(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; @@ -188,15 +178,6 @@ module.exports = ( try { scData = await stakeCubeApiClient.getOrders(pair_.pair); - - if (scData.error) { - if (scData.error === 'no data') { - return []; - } else { - log.warn(`API request getOpenOrders(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); - return undefined; - } - } } catch (err) { log.warn(`API request getOpenOrders(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; @@ -441,11 +422,6 @@ module.exports = ( let scData; try { scData = await stakeCubeApiClient.getUserData(); - - if (scData.error) { - log.warn(`API request getDepositAddress(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); - return undefined; - } } catch (err) { log.warn(`API request getDepositAddress(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; @@ -484,11 +460,6 @@ module.exports = ( try { scTickerData = await stakeCubeApiClient.ticker(pair_.pair); - - if (scTickerData.error || !scTickerData.result[pair_.pair]) { - log.warn(`API request getRates-ticker(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scTickerData.error}`); - return undefined; - } } catch (err) { log.warn(`API request getRates-ticker(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; @@ -499,11 +470,6 @@ module.exports = ( let scOrderBookData; try { scOrderBookData = await stakeCubeApiClient.orderBook(pair_.pair); - - if (scOrderBookData.error) { - log.warn(`API request getRates-orderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scOrderBookData.error}`); - return undefined; - } } catch (err) { log.warn(`API request getRates-orderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; @@ -541,11 +507,6 @@ module.exports = ( let scData; try { scData = await stakeCubeApiClient.orderBook(pair_.pair); - - if (scData.error) { - log.warn(`API request getOrderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); - return undefined; - } } catch (err) { log.warn(`API request getOrderBook(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; @@ -603,11 +564,6 @@ module.exports = ( let scData = []; try { scData = await stakeCubeApiClient.getTradesHistory(pair_.pairPlain, limit); - - if (scData.error) { - log.warn(`API request getTradesHistory(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}}`); - return undefined; - } } catch (err) { log.warn(`API request getTradesHistory(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; From d9b3dcc0cf3796ac44a5e6288f0c730f931f601c Mon Sep 17 00:00:00 2001 From: adamant-al Date: Wed, 3 May 2023 18:33:47 +0500 Subject: [PATCH 27/38] chore: remove unnecessary this.marketInfo(pair) --- trade/api/stakecube_api.js | 1 + trade/trader_stakecube.js | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index c9620e1e..909a03c6 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -49,6 +49,7 @@ module.exports = function() { if (scStatus) { resolve(scData); } else if ([200, 201].includes(httpCode) && scData) { + // For spot/myOpenOrder with no open orders API returns 200 OK, success: false, result: [], error: 'no data' scData.errorMessage = errorMessage; log.log(`StakeCube processed a request to ${url} with data ${reqParameters}, but with error: ${errorMessage}. Resolving…`); resolve(scData); diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index 31005e08..3ec193f2 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -167,17 +167,11 @@ module.exports = ( const paramString = `pair: ${pair}`; const pair_ = formatPairName(pair); - const marketInfo = this.marketInfo(pair); - - if (!marketInfo) { - log.warn(`Unable to place an order on ${exchangeName} exchange. I don't have info about market ${pair}`); - return undefined; - } - let scData; try { scData = await stakeCubeApiClient.getOrders(pair_.pair); + console.log(scData); } catch (err) { log.warn(`API request getOpenOrders(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; From a781a3f67ccf1220b94102a0094bc27050ff6aa4 Mon Sep 17 00:00:00 2001 From: confleux Date: Wed, 3 May 2023 20:24:02 +0300 Subject: [PATCH 28/38] chore: clean up --- trade/trader_stakecube.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index 3ec193f2..de6ca436 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -171,7 +171,6 @@ module.exports = ( try { scData = await stakeCubeApiClient.getOrders(pair_.pair); - console.log(scData); } catch (err) { log.warn(`API request getOpenOrders(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); return undefined; @@ -367,7 +366,7 @@ module.exports = ( const response = scData.result; orderId = response?.orderId; - errorMessage = response?.errorMessage; + errorMessage = scData?.errorMessage; } catch (err) { message = `API request addOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}.`; log.warn(message); @@ -385,7 +384,7 @@ module.exports = ( } else if (!orderId && !errorMessage) { message = `Order executed to ${output}`; log.info(message); - order.orderId = null; + order.orderId = Math.floor(Math.random() * 10 ** 12); // 12 digit random number order.message = message; } else { const details = errorMessage ? ` Details: ${utils.trimAny(errorMessage, ' .')}.` : ' { No details }.'; From 15958fb6b189cf43d614cc71f78d9cc05757376d Mon Sep 17 00:00:00 2001 From: adamant-al Date: Thu, 4 May 2023 10:16:11 +0500 Subject: [PATCH 29/38] refactor: placing order when API doesn't return orderId --- trade/trader_stakecube.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index de6ca436..ed30e83e 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -359,14 +359,23 @@ module.exports = ( let orderId; let errorMessage; let scData; + let filledNote = ''; try { scData = await stakeCubeApiClient.addOrder(marketInfo.pairPlain, coin1Amount, price, side); - const response = scData.result; orderId = response?.orderId; errorMessage = scData?.errorMessage; + const fills = response?.fills; + + if (!orderId && !errorMessage && fills?.length) { + // When an order executes just after it placed, StakeCube returns no orderId + // To correspond with the bot's order structure, we'll generate a random 12-digit orderId + // Real orderId sample: 5413353. Fake orderId sample: + orderId = Math.floor(Math.random() * 10 ** 12); + filledNote = ` Note: API haven't returned orderId, generated a random one. The order is fully executed with ${fills.length} ${utils.incline(fills.length, 'fill', 'fills')}.`; + } } catch (err) { message = `API request addOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}.`; log.warn(message); @@ -377,15 +386,10 @@ module.exports = ( } if (orderId) { - message = `Order placed to ${output} Order Id: ${orderId}.`; + message = `Order placed to ${output} Order Id: ${orderId}.${filledNote}`; log.info(message); order.orderId = orderId; order.message = message; - } else if (!orderId && !errorMessage) { - message = `Order executed to ${output}`; - log.info(message); - order.orderId = Math.floor(Math.random() * 10 ** 12); // 12 digit random number - order.message = message; } else { const details = errorMessage ? ` Details: ${utils.trimAny(errorMessage, ' .')}.` : ' { No details }.'; message = `Unable to place order to ${output}${details} Check parameters and balances.`; From 51b6213b5423c7e285683b50a833e7dc9a793f17 Mon Sep 17 00:00:00 2001 From: adamant-al Date: Thu, 4 May 2023 10:17:23 +0500 Subject: [PATCH 30/38] chore: add sample generated orderId --- trade/trader_stakecube.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index ed30e83e..061e923d 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -372,7 +372,7 @@ module.exports = ( if (!orderId && !errorMessage && fills?.length) { // When an order executes just after it placed, StakeCube returns no orderId // To correspond with the bot's order structure, we'll generate a random 12-digit orderId - // Real orderId sample: 5413353. Fake orderId sample: + // Real orderId sample: 5413353. Fake orderId sample: 59039834250 (greater) orderId = Math.floor(Math.random() * 10 ** 12); filledNote = ` Note: API haven't returned orderId, generated a random one. The order is fully executed with ${fills.length} ${utils.incline(fills.length, 'fill', 'fills')}.`; } From 02844264ba7df55bd3c30f2c01302344884f983d Mon Sep 17 00:00:00 2001 From: adamant-al Date: Thu, 4 May 2023 11:04:28 +0500 Subject: [PATCH 31/38] fix: cancelOrder() and cancelAllOrders() --- trade/trader_stakecube.js | 64 +++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index 061e923d..cd67695c 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -227,30 +227,29 @@ module.exports = ( const paramString = `orderId: ${orderId}, pair: ${pair}`; const pair_ = formatPairName(pair); - try { - const scData = await stakeCubeApiClient.cancelOrder(orderId); + let scData; - if (scData.error) { - if (scData.error === 'Order already canceled or filled') { - log.log(`Order ${orderId} on ${pair_.pairReadable} pair is already cancelled or filled.`); - return true; - } else { - log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); - return undefined; - } - } + try { + scData = await stakeCubeApiClient.cancelOrder(orderId); + } catch (err) { + log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } + try { const data = scData.result; if (data.orderId === orderId) { log.log(`Cancelling order ${orderId} on ${pair_.pairReadable} pair…`); return true; } else { - log.warn(`Failed to cancel order ${orderId} on ${pair_.pairReadable} pair: No details.`); - return false; + const errorMessage = scData?.errorMessage || 'No details'; + + log.log(`Failed to cancel order ${orderId} on ${pair_.pairReadable} pair: ${errorMessage}. Assuming it doesn't exist or already cancelled.`); + return true; } - } catch (err) { - log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + } catch (e) { + log.warn(`Error while processing cancelOrder(${paramString}) request: ${e}`); return undefined; } }, @@ -258,29 +257,36 @@ module.exports = ( /** * Cancel all orders on a specific pair * @param {String} pair In classic format as BTC/USD - * @param {String} side Not used for StakeCube. + * @param {String} side Not used for StakeCube * @returns {Promise} */ async cancelAllOrders(pair, side = '') { const paramString = `pair: ${pair}, side: ${side}`; const pair_ = formatPairName(pair); + let scData; + try { - const scData = await stakeCubeApiClient.cancelAllOrders(pair_.pair); + scData = await stakeCubeApiClient.cancelAllOrders(pair_.pair); + } catch (err) { + log.warn(`API request cancelAllOrders(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + return undefined; + } - if (scData.error) { - if (scData.error === 'no open order') { - log.log(`No open orders on ${pair_.pairReadable}.`); - return true; - } else { - log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${scData.error}`); - return undefined; - } - } + try { + const data = scData.result; - return true; - } catch (err) { - log.warn(`API request cancelOrder(${paramString}) of ${utils.getModuleName(module.id)} module failed. ${err}`); + if (data.length) { + log.log(`Cancelling all ${data.length} orders on ${pair_.pairReadable} pair…`); + return true; + } else { + const errorMessage = scData?.errorMessage || 'No details'; + + log.log(`Cancelling all orders on ${pair_.pairReadable} pair: ${errorMessage}.`); + return true; + } + } catch (e) { + log.warn(`Error while processing cancelAllOrders(${paramString}) request: ${e}`); return undefined; } }, From 2b141f03cac7d860f11cd005b0ce5445633a687f Mon Sep 17 00:00:00 2001 From: adamant-al Date: Thu, 4 May 2023 11:13:40 +0500 Subject: [PATCH 32/38] fix: createDepositAddressWithWebsiteOnly --- trade/trader_stakecube.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index cd67695c..f70a1e2a 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -107,7 +107,7 @@ module.exports = ( getDepositAddress: true, getTradingFees: false, getAccountTradeVolume: false, - createDepositAddressWithWebsiteOnly: false, + createDepositAddressWithWebsiteOnly: true, getFundHistory: false, getFundHistoryImplemented: false, supportCoinNetworks: false, From 3c9e94d6cdbac6f9fee1ff5f84af4e3b36b043cc Mon Sep 17 00:00:00 2001 From: adamant-al Date: Thu, 4 May 2023 11:19:11 +0500 Subject: [PATCH 33/38] fix: getDepositAddress exception processing --- trade/trader_stakecube.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index f70a1e2a..39478c9d 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -444,7 +444,7 @@ module.exports = ( } return result; - } catch (err) { + } catch (e) { log.warn(`Error while processing getDepositAddress(${paramString}) request: ${e}`); return undefined; } From 9af0824992ca3b666807e300c78b3d01a58239b5 Mon Sep 17 00:00:00 2001 From: adamant-al Date: Thu, 4 May 2023 12:16:37 +0500 Subject: [PATCH 34/38] chore: update dependencies --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f79951a7..f6c158c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adamant-tradebot", - "version": "5.4.1", + "version": "5.5.0", "description": "ADAMANT Trading and Market Making bot", "main": "index.js", "scripts": { @@ -44,7 +44,7 @@ "license": "GPL-3.0", "dependencies": { "adamant-api": "^1.8.0", - "axios": "^1.3.6", + "axios": "^1.4.0", "express": "^4.18.2", "fast-deep-equal": "^3.1.3", "form-data": "^4.0.0", @@ -52,10 +52,10 @@ "mongodb": "^5.3.0" }, "devDependencies": { - "@babel/core": "^7.21.4", - "@babel/eslint-parser": "^7.21.3", + "@babel/core": "^7.21.8", + "@babel/eslint-parser": "^7.21.8", "@babel/plugin-transform-runtime": "^7.21.4", - "@babel/preset-env": "^7.21.4", + "@babel/preset-env": "^7.21.5", "axios-mock-adapter": "^1.21.4", "eslint": "^8.39.0", "eslint-config-google": "^0.14.0", From c939519ee3a0463b4ed5d4bbf33ecd5a85e43d36 Mon Sep 17 00:00:00 2001 From: adamant-al Date: Thu, 4 May 2023 12:17:16 +0500 Subject: [PATCH 35/38] chore: update package-lock --- package-lock.json | 450 +++++++++++++++++++++++----------------------- 1 file changed, 226 insertions(+), 224 deletions(-) diff --git a/package-lock.json b/package-lock.json index 230117e8..4a7f0a78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "adamant-tradebot", - "version": "5.4.1", + "version": "5.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "adamant-tradebot", - "version": "5.4.1", + "version": "5.5.0", "license": "GPL-3.0", "dependencies": { "adamant-api": "^1.8.0", - "axios": "^1.3.6", + "axios": "^1.4.0", "express": "^4.18.2", "fast-deep-equal": "^3.1.3", "form-data": "^4.0.0", @@ -18,10 +18,10 @@ "mongodb": "^5.3.0" }, "devDependencies": { - "@babel/core": "^7.21.4", - "@babel/eslint-parser": "^7.21.3", + "@babel/core": "^7.21.8", + "@babel/eslint-parser": "^7.21.8", "@babel/plugin-transform-runtime": "^7.21.4", - "@babel/preset-env": "^7.21.4", + "@babel/preset-env": "^7.21.5", "axios-mock-adapter": "^1.21.4", "eslint": "^8.39.0", "eslint-config-google": "^0.14.0", @@ -1191,30 +1191,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.4.tgz", - "integrity": "sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g==", + "version": "7.21.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.7.tgz", + "integrity": "sha512-KYMqFYTaenzMK4yUtf4EW9wc4N9ef80FsbMtkwool5zpwl4YrT1SdWYSTRcT94KO4hannogdS+LxY7L+arP3gA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.4.tgz", - "integrity": "sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA==", + "version": "7.21.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.8.tgz", + "integrity": "sha512-YeM22Sondbo523Sz0+CirSPnbj9bG3P0CdHcBZdqUuaeOaYEFbOLoGU7lebvGP6P5J/WE9wOn7u7C4J9HvS1xQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.21.4", - "@babel/helper-compilation-targets": "^7.21.4", - "@babel/helper-module-transforms": "^7.21.2", - "@babel/helpers": "^7.21.0", - "@babel/parser": "^7.21.4", + "@babel/generator": "^7.21.5", + "@babel/helper-compilation-targets": "^7.21.5", + "@babel/helper-module-transforms": "^7.21.5", + "@babel/helpers": "^7.21.5", + "@babel/parser": "^7.21.8", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.4", - "@babel/types": "^7.21.4", + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -1230,9 +1230,9 @@ } }, "node_modules/@babel/eslint-parser": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.21.3.tgz", - "integrity": "sha512-kfhmPimwo6k4P8zxNs8+T7yR44q1LdpsZdE1NkCsVlfiuTPRfnGgjaF8Qgug9q9Pou17u6wneYF0lDCZJATMFg==", + "version": "7.21.8", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.21.8.tgz", + "integrity": "sha512-HLhI+2q+BP3sf78mFUZNCGc10KEmoUqtUT1OCdMZsN+qr4qFeLUod62/zAnF3jNQstwyasDkZnVXwfK2Bml7MQ==", "dev": true, "dependencies": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", @@ -1248,12 +1248,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.4.tgz", - "integrity": "sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.5.tgz", + "integrity": "sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w==", "dev": true, "dependencies": { - "@babel/types": "^7.21.4", + "@babel/types": "^7.21.5", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -1302,12 +1302,12 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz", - "integrity": "sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.5.tgz", + "integrity": "sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.21.4", + "@babel/compat-data": "^7.21.5", "@babel/helper-validator-option": "^7.21.0", "browserslist": "^4.21.3", "lru-cache": "^5.1.1", @@ -1376,9 +1376,9 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz", + "integrity": "sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -1446,19 +1446,19 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz", - "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.5.tgz", + "integrity": "sha512-bI2Z9zBGY2q5yMHoBvJ2a9iX3ZOAzJPm7Q8Yz6YeoUjU/Cvhmi2G4QyTNyPBqqXSgTjUxRg3L0xV45HvkNWWBw==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", + "@babel/helper-environment-visitor": "^7.21.5", + "@babel/helper-module-imports": "^7.21.4", + "@babel/helper-simple-access": "^7.21.5", "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.19.1", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.2", - "@babel/types": "^7.21.2" + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -1477,9 +1477,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", - "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", + "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==", "dev": true, "engines": { "node": ">=6.9.0" @@ -1521,12 +1521,12 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", - "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.21.5.tgz", + "integrity": "sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg==", "dev": true, "dependencies": { - "@babel/types": "^7.20.2" + "@babel/types": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -1557,9 +1557,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz", + "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==", "dev": true, "engines": { "node": ">=6.9.0" @@ -1599,14 +1599,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", - "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.5.tgz", + "integrity": "sha512-BSY+JSlHxOmGsPTydUkPf1MdMQ3M81x5xGCOVgWM3G8XH77sJ292Y2oqcp0CbbgxhqBuI46iUz1tT7hqP7EfgA==", "dev": true, "dependencies": { "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0" + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -1627,9 +1627,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz", - "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==", + "version": "7.21.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz", + "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -2166,12 +2166,12 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz", - "integrity": "sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.21.5.tgz", + "integrity": "sha512-wb1mhwGOCaXHDTcsRYMKF9e5bbMgqwxtqa2Y1ifH96dXJPwbuLX9qHy3clhrxVqgMz7nyNXs8VkxdH8UBcjKqA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -2251,12 +2251,12 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz", - "integrity": "sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.21.5.tgz", + "integrity": "sha512-TR653Ki3pAwxBxUe8srfF3e4Pe3FTA46uaNHYyQwIoM4oWKSoOZiDNyHJ0oIoDIUPSRQbQG7jzgVBX3FPVne1Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-plugin-utils": "^7.21.5", "@babel/template": "^7.20.7" }, "engines": { @@ -2329,12 +2329,12 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz", - "integrity": "sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.5.tgz", + "integrity": "sha512-nYWpjKW/7j/I/mZkGVgHJXh4bA1sfdFnJoOXwJuj4m3Q2EraO/8ZyrkCau9P5tbHQk01RMSt6KYLCsW7730SXQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -2407,14 +2407,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz", - "integrity": "sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.5.tgz", + "integrity": "sha512-OVryBEgKUbtqMoB7eG2rs6UFexJi6Zj6FDXx+esBLPTCxCNxAY9o+8Di7IsUGJ+AVhp5ncK0fxWUBd0/1gPhrQ==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.21.2", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-simple-access": "^7.20.2" + "@babel/helper-module-transforms": "^7.21.5", + "@babel/helper-plugin-utils": "^7.21.5", + "@babel/helper-simple-access": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -2535,12 +2535,12 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz", - "integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.21.5.tgz", + "integrity": "sha512-ZoYBKDb6LyMi5yCsByQ5jmXsHAQDDYeexT1Szvlmui+lADvfSecr5Dxd/PkrTC3pAD182Fcju1VQkB4oCp9M+w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-plugin-utils": "^7.21.5", "regenerator-transform": "^0.15.1" }, "engines": { @@ -2662,12 +2662,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", - "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.21.5.tgz", + "integrity": "sha512-LYm/gTOwZqsYohlvFUe/8Tujz75LqqVC2w+2qPHLR+WyWHGCZPN1KBpJCJn+4Bk4gOkQy/IXKIge6az5MqwlOg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -2693,14 +2693,14 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.21.4.tgz", - "integrity": "sha512-2W57zHs2yDLm6GD5ZpvNn71lZ0B/iypSdIeq25OurDKji6AdzV07qp4s3n1/x5BqtiGaTrPN3nerlSCaC5qNTw==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.21.5.tgz", + "integrity": "sha512-wH00QnTTldTbf/IefEVyChtRdw5RJvODT/Vb4Vcxq1AZvtXj6T0YeX0cAcXhI6/BdGuiP3GcNIL4OQbI2DVNxg==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.21.4", - "@babel/helper-compilation-targets": "^7.21.4", - "@babel/helper-plugin-utils": "^7.20.2", + "@babel/compat-data": "^7.21.5", + "@babel/helper-compilation-targets": "^7.21.5", + "@babel/helper-plugin-utils": "^7.21.5", "@babel/helper-validator-option": "^7.21.0", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.20.7", @@ -2725,6 +2725,7 @@ "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", @@ -2734,22 +2735,22 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.20.7", + "@babel/plugin-transform-arrow-functions": "^7.21.5", "@babel/plugin-transform-async-to-generator": "^7.20.7", "@babel/plugin-transform-block-scoped-functions": "^7.18.6", "@babel/plugin-transform-block-scoping": "^7.21.0", "@babel/plugin-transform-classes": "^7.21.0", - "@babel/plugin-transform-computed-properties": "^7.20.7", + "@babel/plugin-transform-computed-properties": "^7.21.5", "@babel/plugin-transform-destructuring": "^7.21.3", "@babel/plugin-transform-dotall-regex": "^7.18.6", "@babel/plugin-transform-duplicate-keys": "^7.18.9", "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.21.0", + "@babel/plugin-transform-for-of": "^7.21.5", "@babel/plugin-transform-function-name": "^7.18.9", "@babel/plugin-transform-literals": "^7.18.9", "@babel/plugin-transform-member-expression-literals": "^7.18.6", "@babel/plugin-transform-modules-amd": "^7.20.11", - "@babel/plugin-transform-modules-commonjs": "^7.21.2", + "@babel/plugin-transform-modules-commonjs": "^7.21.5", "@babel/plugin-transform-modules-systemjs": "^7.20.11", "@babel/plugin-transform-modules-umd": "^7.18.6", "@babel/plugin-transform-named-capturing-groups-regex": "^7.20.5", @@ -2757,17 +2758,17 @@ "@babel/plugin-transform-object-super": "^7.18.6", "@babel/plugin-transform-parameters": "^7.21.3", "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.20.5", + "@babel/plugin-transform-regenerator": "^7.21.5", "@babel/plugin-transform-reserved-words": "^7.18.6", "@babel/plugin-transform-shorthand-properties": "^7.18.6", "@babel/plugin-transform-spread": "^7.20.7", "@babel/plugin-transform-sticky-regex": "^7.18.6", "@babel/plugin-transform-template-literals": "^7.18.9", "@babel/plugin-transform-typeof-symbol": "^7.18.9", - "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-escapes": "^7.21.5", "@babel/plugin-transform-unicode-regex": "^7.18.6", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.21.4", + "@babel/types": "^7.21.5", "babel-plugin-polyfill-corejs2": "^0.3.3", "babel-plugin-polyfill-corejs3": "^0.6.0", "babel-plugin-polyfill-regenerator": "^0.4.1", @@ -2804,9 +2805,9 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz", - "integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.5.tgz", + "integrity": "sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q==", "dev": true, "dependencies": { "regenerator-runtime": "^0.13.11" @@ -2830,19 +2831,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz", - "integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.5.tgz", + "integrity": "sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.21.4", - "@babel/helper-environment-visitor": "^7.18.9", + "@babel/generator": "^7.21.5", + "@babel/helper-environment-visitor": "^7.21.5", "@babel/helper-function-name": "^7.21.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.4", - "@babel/types": "^7.21.4", + "@babel/parser": "^7.21.5", + "@babel/types": "^7.21.5", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -2851,12 +2852,12 @@ } }, "node_modules/@babel/types": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.4.tgz", - "integrity": "sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.5.tgz", + "integrity": "sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-string-parser": "^7.21.5", "@babel/helper-validator-identifier": "^7.19.1", "to-fast-properties": "^2.0.0" }, @@ -4229,9 +4230,9 @@ } }, "node_modules/axios": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.6.tgz", - "integrity": "sha512-PEcdkk7JcdPiMDkvM4K6ZBRYq9keuVJsToxm2zQIM70Qqo2WHTdJZMXcG9X+RmRp2VPNUQC8W1RAGbgt6b1yMg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", + "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -11982,27 +11983,27 @@ } }, "@babel/compat-data": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.4.tgz", - "integrity": "sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g==", + "version": "7.21.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.7.tgz", + "integrity": "sha512-KYMqFYTaenzMK4yUtf4EW9wc4N9ef80FsbMtkwool5zpwl4YrT1SdWYSTRcT94KO4hannogdS+LxY7L+arP3gA==", "dev": true }, "@babel/core": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.4.tgz", - "integrity": "sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA==", + "version": "7.21.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.8.tgz", + "integrity": "sha512-YeM22Sondbo523Sz0+CirSPnbj9bG3P0CdHcBZdqUuaeOaYEFbOLoGU7lebvGP6P5J/WE9wOn7u7C4J9HvS1xQ==", "dev": true, "requires": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.21.4", - "@babel/helper-compilation-targets": "^7.21.4", - "@babel/helper-module-transforms": "^7.21.2", - "@babel/helpers": "^7.21.0", - "@babel/parser": "^7.21.4", + "@babel/generator": "^7.21.5", + "@babel/helper-compilation-targets": "^7.21.5", + "@babel/helper-module-transforms": "^7.21.5", + "@babel/helpers": "^7.21.5", + "@babel/parser": "^7.21.8", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.4", - "@babel/types": "^7.21.4", + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -12011,9 +12012,9 @@ } }, "@babel/eslint-parser": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.21.3.tgz", - "integrity": "sha512-kfhmPimwo6k4P8zxNs8+T7yR44q1LdpsZdE1NkCsVlfiuTPRfnGgjaF8Qgug9q9Pou17u6wneYF0lDCZJATMFg==", + "version": "7.21.8", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.21.8.tgz", + "integrity": "sha512-HLhI+2q+BP3sf78mFUZNCGc10KEmoUqtUT1OCdMZsN+qr4qFeLUod62/zAnF3jNQstwyasDkZnVXwfK2Bml7MQ==", "dev": true, "requires": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", @@ -12022,12 +12023,12 @@ } }, "@babel/generator": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.4.tgz", - "integrity": "sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.5.tgz", + "integrity": "sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w==", "dev": true, "requires": { - "@babel/types": "^7.21.4", + "@babel/types": "^7.21.5", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -12066,12 +12067,12 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz", - "integrity": "sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.5.tgz", + "integrity": "sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w==", "dev": true, "requires": { - "@babel/compat-data": "^7.21.4", + "@babel/compat-data": "^7.21.5", "@babel/helper-validator-option": "^7.21.0", "browserslist": "^4.21.3", "lru-cache": "^5.1.1", @@ -12119,9 +12120,9 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz", + "integrity": "sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ==", "dev": true }, "@babel/helper-explode-assignable-expression": { @@ -12171,19 +12172,19 @@ } }, "@babel/helper-module-transforms": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz", - "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.5.tgz", + "integrity": "sha512-bI2Z9zBGY2q5yMHoBvJ2a9iX3ZOAzJPm7Q8Yz6YeoUjU/Cvhmi2G4QyTNyPBqqXSgTjUxRg3L0xV45HvkNWWBw==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", + "@babel/helper-environment-visitor": "^7.21.5", + "@babel/helper-module-imports": "^7.21.4", + "@babel/helper-simple-access": "^7.21.5", "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.19.1", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.2", - "@babel/types": "^7.21.2" + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5" } }, "@babel/helper-optimise-call-expression": { @@ -12196,9 +12197,9 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", - "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", + "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==", "dev": true }, "@babel/helper-remap-async-to-generator": { @@ -12228,12 +12229,12 @@ } }, "@babel/helper-simple-access": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", - "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.21.5.tgz", + "integrity": "sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg==", "dev": true, "requires": { - "@babel/types": "^7.20.2" + "@babel/types": "^7.21.5" } }, "@babel/helper-skip-transparent-expression-wrappers": { @@ -12255,9 +12256,9 @@ } }, "@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz", + "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==", "dev": true }, "@babel/helper-validator-identifier": { @@ -12285,14 +12286,14 @@ } }, "@babel/helpers": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", - "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.5.tgz", + "integrity": "sha512-BSY+JSlHxOmGsPTydUkPf1MdMQ3M81x5xGCOVgWM3G8XH77sJ292Y2oqcp0CbbgxhqBuI46iUz1tT7hqP7EfgA==", "dev": true, "requires": { "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0" + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5" } }, "@babel/highlight": { @@ -12307,9 +12308,9 @@ } }, "@babel/parser": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz", - "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==", + "version": "7.21.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz", + "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==", "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { @@ -12663,12 +12664,12 @@ } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz", - "integrity": "sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.21.5.tgz", + "integrity": "sha512-wb1mhwGOCaXHDTcsRYMKF9e5bbMgqwxtqa2Y1ifH96dXJPwbuLX9qHy3clhrxVqgMz7nyNXs8VkxdH8UBcjKqA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.21.5" } }, "@babel/plugin-transform-async-to-generator": { @@ -12718,12 +12719,12 @@ } }, "@babel/plugin-transform-computed-properties": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz", - "integrity": "sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.21.5.tgz", + "integrity": "sha512-TR653Ki3pAwxBxUe8srfF3e4Pe3FTA46uaNHYyQwIoM4oWKSoOZiDNyHJ0oIoDIUPSRQbQG7jzgVBX3FPVne1Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-plugin-utils": "^7.21.5", "@babel/template": "^7.20.7" } }, @@ -12766,12 +12767,12 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz", - "integrity": "sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.5.tgz", + "integrity": "sha512-nYWpjKW/7j/I/mZkGVgHJXh4bA1sfdFnJoOXwJuj4m3Q2EraO/8ZyrkCau9P5tbHQk01RMSt6KYLCsW7730SXQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.21.5" } }, "@babel/plugin-transform-function-name": { @@ -12814,14 +12815,14 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz", - "integrity": "sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.5.tgz", + "integrity": "sha512-OVryBEgKUbtqMoB7eG2rs6UFexJi6Zj6FDXx+esBLPTCxCNxAY9o+8Di7IsUGJ+AVhp5ncK0fxWUBd0/1gPhrQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.21.2", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-simple-access": "^7.20.2" + "@babel/helper-module-transforms": "^7.21.5", + "@babel/helper-plugin-utils": "^7.21.5", + "@babel/helper-simple-access": "^7.21.5" } }, "@babel/plugin-transform-modules-systemjs": { @@ -12894,12 +12895,12 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz", - "integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.21.5.tgz", + "integrity": "sha512-ZoYBKDb6LyMi5yCsByQ5jmXsHAQDDYeexT1Szvlmui+lADvfSecr5Dxd/PkrTC3pAD182Fcju1VQkB4oCp9M+w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-plugin-utils": "^7.21.5", "regenerator-transform": "^0.15.1" } }, @@ -12973,12 +12974,12 @@ } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", - "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.21.5.tgz", + "integrity": "sha512-LYm/gTOwZqsYohlvFUe/8Tujz75LqqVC2w+2qPHLR+WyWHGCZPN1KBpJCJn+4Bk4gOkQy/IXKIge6az5MqwlOg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.21.5" } }, "@babel/plugin-transform-unicode-regex": { @@ -12992,14 +12993,14 @@ } }, "@babel/preset-env": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.21.4.tgz", - "integrity": "sha512-2W57zHs2yDLm6GD5ZpvNn71lZ0B/iypSdIeq25OurDKji6AdzV07qp4s3n1/x5BqtiGaTrPN3nerlSCaC5qNTw==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.21.5.tgz", + "integrity": "sha512-wH00QnTTldTbf/IefEVyChtRdw5RJvODT/Vb4Vcxq1AZvtXj6T0YeX0cAcXhI6/BdGuiP3GcNIL4OQbI2DVNxg==", "dev": true, "requires": { - "@babel/compat-data": "^7.21.4", - "@babel/helper-compilation-targets": "^7.21.4", - "@babel/helper-plugin-utils": "^7.20.2", + "@babel/compat-data": "^7.21.5", + "@babel/helper-compilation-targets": "^7.21.5", + "@babel/helper-plugin-utils": "^7.21.5", "@babel/helper-validator-option": "^7.21.0", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.20.7", @@ -13024,6 +13025,7 @@ "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", @@ -13033,22 +13035,22 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.20.7", + "@babel/plugin-transform-arrow-functions": "^7.21.5", "@babel/plugin-transform-async-to-generator": "^7.20.7", "@babel/plugin-transform-block-scoped-functions": "^7.18.6", "@babel/plugin-transform-block-scoping": "^7.21.0", "@babel/plugin-transform-classes": "^7.21.0", - "@babel/plugin-transform-computed-properties": "^7.20.7", + "@babel/plugin-transform-computed-properties": "^7.21.5", "@babel/plugin-transform-destructuring": "^7.21.3", "@babel/plugin-transform-dotall-regex": "^7.18.6", "@babel/plugin-transform-duplicate-keys": "^7.18.9", "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.21.0", + "@babel/plugin-transform-for-of": "^7.21.5", "@babel/plugin-transform-function-name": "^7.18.9", "@babel/plugin-transform-literals": "^7.18.9", "@babel/plugin-transform-member-expression-literals": "^7.18.6", "@babel/plugin-transform-modules-amd": "^7.20.11", - "@babel/plugin-transform-modules-commonjs": "^7.21.2", + "@babel/plugin-transform-modules-commonjs": "^7.21.5", "@babel/plugin-transform-modules-systemjs": "^7.20.11", "@babel/plugin-transform-modules-umd": "^7.18.6", "@babel/plugin-transform-named-capturing-groups-regex": "^7.20.5", @@ -13056,17 +13058,17 @@ "@babel/plugin-transform-object-super": "^7.18.6", "@babel/plugin-transform-parameters": "^7.21.3", "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.20.5", + "@babel/plugin-transform-regenerator": "^7.21.5", "@babel/plugin-transform-reserved-words": "^7.18.6", "@babel/plugin-transform-shorthand-properties": "^7.18.6", "@babel/plugin-transform-spread": "^7.20.7", "@babel/plugin-transform-sticky-regex": "^7.18.6", "@babel/plugin-transform-template-literals": "^7.18.9", "@babel/plugin-transform-typeof-symbol": "^7.18.9", - "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-escapes": "^7.21.5", "@babel/plugin-transform-unicode-regex": "^7.18.6", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.21.4", + "@babel/types": "^7.21.5", "babel-plugin-polyfill-corejs2": "^0.3.3", "babel-plugin-polyfill-corejs3": "^0.6.0", "babel-plugin-polyfill-regenerator": "^0.4.1", @@ -13094,9 +13096,9 @@ "dev": true }, "@babel/runtime": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz", - "integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.5.tgz", + "integrity": "sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q==", "dev": true, "requires": { "regenerator-runtime": "^0.13.11" @@ -13114,30 +13116,30 @@ } }, "@babel/traverse": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz", - "integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.5.tgz", + "integrity": "sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==", "dev": true, "requires": { "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.21.4", - "@babel/helper-environment-visitor": "^7.18.9", + "@babel/generator": "^7.21.5", + "@babel/helper-environment-visitor": "^7.21.5", "@babel/helper-function-name": "^7.21.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.4", - "@babel/types": "^7.21.4", + "@babel/parser": "^7.21.5", + "@babel/types": "^7.21.5", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.4.tgz", - "integrity": "sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==", + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.5.tgz", + "integrity": "sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-string-parser": "^7.21.5", "@babel/helper-validator-identifier": "^7.19.1", "to-fast-properties": "^2.0.0" } @@ -14212,9 +14214,9 @@ "dev": true }, "axios": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.6.tgz", - "integrity": "sha512-PEcdkk7JcdPiMDkvM4K6ZBRYq9keuVJsToxm2zQIM70Qqo2WHTdJZMXcG9X+RmRp2VPNUQC8W1RAGbgt6b1yMg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", + "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", From 66cdb5279020d19cda2da9e7db3019ec666532af Mon Sep 17 00:00:00 2001 From: adamant-al Date: Sat, 20 May 2023 13:07:33 +0500 Subject: [PATCH 36/38] fix: Azbit changed max pageSize for getTradesHistory() to 200 --- trade/api/azbit_api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trade/api/azbit_api.js b/trade/api/azbit_api.js index f7cbfb34..37832a6a 100644 --- a/trade/api/azbit_api.js +++ b/trade/api/azbit_api.js @@ -334,12 +334,12 @@ module.exports = function() { * Get trades history * Note: returns [] for a wrong trade pair * @param pair In Azbit format as ETH_USDT - * @param pageSize Number of trades to return + * @param pageSize Number of trades to return. Max is 200. * @param pageNumber Page number. Optional. * @return {Object} Last trades * https://docs.azbit.com/docs/public-api/deals#apideals */ - getTradesHistory: function(pair, pageSize = 500, pageNumber) { + getTradesHistory: function(pair, pageSize = 200, pageNumber) { const data = { pageSize, currencyPairCode: pair, From ce62ded769f471e351955a7c0395f6d88c67d449 Mon Sep 17 00:00:00 2001 From: confleux Date: Sat, 20 May 2023 16:56:22 +0300 Subject: [PATCH 37/38] fix: lint errors --- trade/api/stakecube_api.js | 38 +++++++++++++++++++------------------- trade/trader_stakecube.js | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index 909a03c6..957cf5df 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -4,9 +4,9 @@ const axios = require('axios'); module.exports = function() { let WEB_BASE = 'https://stakecube.io/api/v2'; let config = { - 'apiKey': '', - 'secret_key': '', - 'tradePwd': '', + apiKey: '', + secret_key: '', + tradePwd: '', }; let log = {}; @@ -41,7 +41,7 @@ module.exports = function() { const scStatus = scData?.success; const scError = scData?.error; - const scErrorInfo = scStatus ? `[No error code]` : `[${scError}]`; + const scErrorInfo = scStatus ? '[No error code]' : `[${scError}]`; const errorMessage = httpCode ? `${httpCode} ${httpMessage}, ${scErrorInfo}` : String(responseOrError); const reqParameters = queryString || bodyString || '{ No parameters }'; @@ -105,7 +105,7 @@ module.exports = function() { return new Promise((resolve, reject) => { const httpOptions = { - url: url, + url, method: type, timeout: 10000, headers: { @@ -145,7 +145,7 @@ module.exports = function() { return new Promise((resolve, reject) => { const httpOptions = { - url: url, + url, method: type, timeout: 20000, }; @@ -170,7 +170,7 @@ module.exports = function() { } const EXCHANGE_API = { - setConfig: function(apiServer, apiKey, secretKey, tradePwd, logger, publicOnly = false) { + setConfig(apiServer, apiKey, secretKey, tradePwd, logger, publicOnly = false) { if (apiServer) { WEB_BASE = apiServer; } @@ -181,9 +181,9 @@ module.exports = function() { if (!publicOnly) { config = { - 'apiKey': apiKey, - 'secret_key': secretKey, - 'tradePwd': tradePwd, + apiKey, + secret_key: secretKey, + tradePwd: tradePwd, }; } }, @@ -193,7 +193,7 @@ module.exports = function() { * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/user.md#account */ - getUserData: function() { + getUserData() { return protectedRequest('/user/account', {}, 'get'); }, @@ -204,7 +204,7 @@ module.exports = function() { * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#my-open-orders */ - getOrders: async function(symbol, limit = 1000) { + getOrders(symbol, limit = 1000) { const data = { market: symbol, limit, @@ -223,7 +223,7 @@ module.exports = function() { * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#order */ - addOrder: function(symbol, amount, price, side) { + addOrder(symbol, amount, price, side) { const data = { market: symbol, side: side.toUpperCase(), @@ -240,7 +240,7 @@ module.exports = function() { * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#cancel */ - cancelOrder: function(orderId) { + cancelOrder(orderId) { const data = { orderId, }; @@ -253,7 +253,7 @@ module.exports = function() { * @param {String} symbol In StakeCube format as BTC_USDT * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#cancel-all */ - cancelAllOrders: function(symbol) { + cancelAllOrders(symbol) { const data = { market: symbol, }; @@ -267,7 +267,7 @@ module.exports = function() { * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#orderbook */ - orderBook: function(symbol) { + orderBook(symbol) { const data = { market: symbol, }; @@ -282,7 +282,7 @@ module.exports = function() { * @return {Promise>} Last trades * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#trades */ - getTradesHistory: function(symbol, limit = 300) { + getTradesHistory(symbol, limit = 300) { const data = { market: symbol, limit, @@ -296,7 +296,7 @@ module.exports = function() { * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#markets */ - markets: function() { + markets() { return publicRequest('/exchange/spot/markets', {}, 'get'); }, @@ -307,7 +307,7 @@ module.exports = function() { * @return {Promise} * https://github.com/stakecube-hub/stakecube-api-docs/blob/master/rest-api/exchange.md#markets */ - ticker: function(symbol) { + ticker(symbol) { const data = { market: symbol, }; diff --git a/trade/trader_stakecube.js b/trade/trader_stakecube.js index 39478c9d..c56a7e3a 100644 --- a/trade/trader_stakecube.js +++ b/trade/trader_stakecube.js @@ -589,7 +589,7 @@ module.exports = ( }); // We need ascending sort order - result.sort(function(a, b) { + result.sort((a, b) => { return parseFloat(a.date) - parseFloat(b.date); }); From deaf60e2320c2be92f16021a9e079516e3508d56 Mon Sep 17 00:00:00 2001 From: confleux Date: Sat, 20 May 2023 16:56:52 +0300 Subject: [PATCH 38/38] fix: reject requests with 'nonce' and 'pending' errors --- trade/api/stakecube_api.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/trade/api/stakecube_api.js b/trade/api/stakecube_api.js index 957cf5df..121b7ada 100644 --- a/trade/api/stakecube_api.js +++ b/trade/api/stakecube_api.js @@ -10,6 +10,12 @@ module.exports = function() { }; let log = {}; + // In case if error message includes these words, consider request as failed + const doNotResolveErrors = [ + 'nonce', // ~invalid nonce. last nonce used: 1684169723966 + 'pending', // ~pending process need to finish + ]; + /** * Handles response from API * @param {Object} responseOrError @@ -49,10 +55,16 @@ module.exports = function() { if (scStatus) { resolve(scData); } else if ([200, 201].includes(httpCode) && scData) { - // For spot/myOpenOrder with no open orders API returns 200 OK, success: false, result: [], error: 'no data' - scData.errorMessage = errorMessage; - log.log(`StakeCube processed a request to ${url} with data ${reqParameters}, but with error: ${errorMessage}. Resolving…`); - resolve(scData); + if (doNotResolveErrors.some((e) => scError.includes(e))) { + scData.errorMessage = errorMessage; + log.warn(`Request to ${url} with data ${reqParameters} failed: ${errorMessage}. Rejecting…`); + reject(errorMessage); + } else { + // For spot/myOpenOrder with no open orders API returns 200 OK, success: false, result: [], error: 'no data' + scData.errorMessage = errorMessage; + log.log(`StakeCube processed a request to ${url} with data ${reqParameters}, but with error: ${errorMessage}. Resolving…`); + resolve(scData); + } } else if ([404].includes(httpCode)) { log.warn(`Request to ${url} with data ${reqParameters} failed: ${errorMessage}. Not found. Rejecting…`); reject(errorMessage);