From a3c86a6056393581fc6253f05b475157f5a40b36 Mon Sep 17 00:00:00 2001 From: antoineludeau <52679050+antoineludeau@users.noreply.github.com> Date: Fri, 23 Jun 2023 10:25:43 +0200 Subject: [PATCH] Migrated from got to node-fetch package --- .env.sample | 44 +++++---- lib/api/legacy-routes.cjs | 2 +- lib/import/source-part-updater.cjs | 17 ++-- lib/util/api-depot.cjs | 13 ++- lib/util/contours.cjs | 5 +- lib/util/datagouv.cjs | 13 +-- lib/util/fetch.cjs | 35 +++++++ lib/util/get-as-stream.cjs | 34 ------- package.json | 1 - scripts/build-geo.cjs | 11 ++- scripts/download-datasets.cjs | 6 +- scripts/prepare-contours.cjs | 1 + yarn.lock | 151 +---------------------------- 13 files changed, 100 insertions(+), 233 deletions(-) create mode 100644 lib/util/fetch.cjs delete mode 100644 lib/util/get-as-stream.cjs diff --git a/.env.sample b/.env.sample index aa90a625..95a07b31 100644 --- a/.env.sample +++ b/.env.sample @@ -1,33 +1,37 @@ -MONGODB_URL=mongodb://127.0.0.1:27017 -MONGODB_PORT=27017 +# Mongo DB +MONGODB_URL=mongodb://127.0.0.1:27017 # Not used for deployment with Docker Compose +MONGODB_PORT=27017 # Used only for deployment with Docker Compose MONGODB_DBNAME=ban -REDIS_URL=redis://127.0.0.1:6379 -REDIS_PORT=6379 +# Redis +REDIS_URL=redis://127.0.0.1:6379 # Not used for deployment with Docker Compose +REDIS_PORT=6379 # Used only for Docker Compose +# APIs +# API BAN BAN_API_URL=https://plateforme.adresse.data.gouv.fr -BAN_API_AUTHORIZED_TOKENS= +ADMIN_TOKEN= # Used for legacy routes +BAN_API_AUTHORIZED_TOKENS= # Used for new ban-id api routes +PORT=5000 -# relative path from the "root" directory for all the following path variables : +# API de dépôt +API_DEPOT_URL=https://plateforme.adresse.data.gouv.fr/api-depot + +# API ID-Fix +API_IDFIX_URL=https://plateforme.adresse.data.gouv.fr/api-idfix +API_IDFIX_TOKEN= + +# Path to data files +# Relative path from the "root" directory for all the following path variables : FANTOIR_PATH=data/fantoir.sqlite GAZETTEER_DB_PATH=data/gazetteer.sqlite MAJIC_PATH=/data/majic.sqlite CONTOURS_DATA_PATH=data/communes-50m.sqlite COMMUNES_LOCAUX_ADRESSES_DATA_PATH=data/communes-locaux-adresses.json -DEPARTEMENTS= - +# Others +DEPARTEMENTS= # Comma separated list of departements for dev only +JOB_STATUS_LIMIT_DURATION='90d' # Duration max of job status in database MAX_CONCURRENT_WORKERS=1 - DATAGOUV_API_KEY= - -API_DEPOT_URL=https://plateforme.adresse.data.gouv.fr/api-depot - -API_IDFIX_URL=https://plateforme.adresse.data.gouv.fr/api-idfix -API_IDFIX_TOKEN= - -ADMIN_TOKEN= - -JOB_STATUS_LIMIT_DURATION='90d' - -PORT=5000 \ No newline at end of file +PROXY_URL= # To use only if you are behind a proxy diff --git a/lib/api/legacy-routes.cjs b/lib/api/legacy-routes.cjs index df318a17..299b8bce 100644 --- a/lib/api/legacy-routes.cjs +++ b/lib/api/legacy-routes.cjs @@ -2,7 +2,7 @@ const fs = require('node:fs') const express = require('express') const Papa = require('papaparse') const {snakeCase, mapKeys} = require('lodash') -const fetch = require('node-fetch') +const fetch = require('../util/fetch.cjs') const currentDate = require('../util/local-current-date.cjs') const {computeFilteredStats} = require('../models/ban.cjs') const { diff --git a/lib/import/source-part-updater.cjs b/lib/import/source-part-updater.cjs index a96c1d80..22af69a8 100644 --- a/lib/import/source-part-updater.cjs +++ b/lib/import/source-part-updater.cjs @@ -1,6 +1,6 @@ -const got = require('got') const revisionHash = require('rev-hash') const {omit} = require('lodash') +const fetch = require('../util/fetch.cjs') const source = require('../models/source.cjs') async function fetchResource(resourceInfo, options = {}) { @@ -17,14 +17,15 @@ async function fetchResource(resourceInfo, options = {}) { } try { - const response = await got(resourceInfo.url, {responseType: 'buffer', headers: requestHeaders}) - const {body, headers, statusCode} = response + const response = await fetch(resourceInfo.url, {headers: requestHeaders}) + const {headers, status} = response - if (statusCode === 304) { + if (status === 304) { return } - const revision = revisionHash(body) + const buffer = await response.buffer() + const revision = revisionHash(buffer) if (!options.force && resourceInfo.revision && resourceInfo.revision === revision) { return @@ -32,11 +33,11 @@ async function fetchResource(resourceInfo, options = {}) { resourceInfo.headers = headers resourceInfo.revision = revision - resourceInfo.data = body - resourceInfo.size = body.length + resourceInfo.data = buffer + resourceInfo.size = buffer.length resourceInfo.updatedAt = new Date() } catch (error) { - if (error && error.response && error.response.statusCode === 404 && options.allowNotFound) { + if (error && error.response && error.response.status === 404 && options.allowNotFound) { resourceInfo.notFound = true return } diff --git a/lib/util/api-depot.cjs b/lib/util/api-depot.cjs index a7d3a695..46968e56 100644 --- a/lib/util/api-depot.cjs +++ b/lib/util/api-depot.cjs @@ -1,13 +1,14 @@ const process = require('process') -const got = require('got') +const fetch = require('./fetch.cjs') const API_DEPOT_URL = process.env.API_DEPOT_URL || 'https://plateforme.adresse.data.gouv.fr/api-depot' async function getCurrentRevision(codeCommune) { try { - return await got(`${API_DEPOT_URL}/communes/${codeCommune}/current-revision`).json() + const response = await fetch(`${API_DEPOT_URL}/communes/${codeCommune}/current-revision`) + return await response.json() } catch (error) { - if (error.response?.statusCode === 404) { + if (error.response?.status === 404) { return } @@ -16,11 +17,13 @@ async function getCurrentRevision(codeCommune) { } async function getRevisionFile(revisionId) { - return got(`${API_DEPOT_URL}/revisions/${revisionId}/files/bal/download`).buffer() + const response = await fetch(`${API_DEPOT_URL}/revisions/${revisionId}/files/bal/download`) + return response.buffer() } async function getCurrentRevisons() { - return got(`${API_DEPOT_URL}/current-revisions`).json() + const response = await fetch(`${API_DEPOT_URL}/current-revisions`) + return response.json() } module.exports = {getCurrentRevision, getRevisionFile, getCurrentRevisons} diff --git a/lib/util/contours.cjs b/lib/util/contours.cjs index 282fe75f..e1e276fb 100644 --- a/lib/util/contours.cjs +++ b/lib/util/contours.cjs @@ -3,8 +3,8 @@ const Keyv = require('keyv') const Cache = require('lru-cache') const {throttle} = require('lodash') const ms = require('ms') -const got = require('got') const ora = require('ora') +const fetch = require('./fetch.cjs') const contoursDataPath = process.env.CONTOURS_DATA_PATH || 'data/communes-50m.sqlite' @@ -19,7 +19,8 @@ function db() { } async function getCommunesFeatures() { - const communesFile = await got('https://adresse.data.gouv.fr/data/contours-administratifs/2023/geojson/communes-50m.geojson').json() + const response = await fetch('https://adresse.data.gouv.fr/data/contours-administratifs/2023/geojson/communes-50m.geojson') + const communesFile = await response.json() return communesFile.features } diff --git a/lib/util/datagouv.cjs b/lib/util/datagouv.cjs index 505e27f8..bf5aecbb 100644 --- a/lib/util/datagouv.cjs +++ b/lib/util/datagouv.cjs @@ -1,5 +1,5 @@ -const got = require('got') const FormData = require('form-data') +const fetch = require('./fetch.cjs') async function replaceResourceFile(datasetId, resourceId, fileName, fileContent) { const url = `https://www.data.gouv.fr/api/1/datasets/${datasetId}/resources/${resourceId}/upload/` @@ -9,15 +9,16 @@ async function replaceResourceFile(datasetId, resourceId, fileName, fileContent) const form = new FormData() form.append('file', fileBuffer, {filename: fileName}) - const gotOptions = { + const fetchOptions = { + method: 'POST', headers: { - 'X-API-Key': process.env.DATAGOUV_API_KEY + 'X-API-Key': process.env.DATAGOUV_API_KEY, + ...form.getHeaders() }, - body: form, - responseType: 'json' + body: form } - await got.post(url, gotOptions) + await fetch(url, fetchOptions) } module.exports = {replaceResourceFile} diff --git a/lib/util/fetch.cjs b/lib/util/fetch.cjs new file mode 100644 index 00000000..86f6620f --- /dev/null +++ b/lib/util/fetch.cjs @@ -0,0 +1,35 @@ +const fetch = require('node-fetch') +const HttpsProxyAgent = require('https-proxy-agent') + +const PROXY_URL = process.env.PROXY_URL || '' + +class HTTPResponseError extends Error { + constructor(response) { + super(`HTTP Error Response: ${response.status} ${response.statusText}`) + this.response = response + } +} + +const fetchWithProxy = async (url, options) => { + try { + let response + if (PROXY_URL) { + const agent = new HttpsProxyAgent(PROXY_URL) + response = await fetch(url, {...options, agent}) + } else { + response = await fetch(url, options) + } + + if (response.status >= 400) { + throw new HTTPResponseError(response) + } + + return response + } catch (error) { + // Handle any network or other errors + console.error(`Request failed : ${error.message}`) + throw error + } +} + +module.exports = fetchWithProxy diff --git a/lib/util/get-as-stream.cjs b/lib/util/get-as-stream.cjs deleted file mode 100644 index 3aaf0630..00000000 --- a/lib/util/get-as-stream.cjs +++ /dev/null @@ -1,34 +0,0 @@ -const {PassThrough} = require('stream') -const {createReadStream} = require('fs') -const {pathExists} = require('fs-extra') -const got = require('got') - -async function getAsStream(path) { - if (path.startsWith('http')) { - return new Promise(resolve => { - const proxyStream = new PassThrough() - const gotStream = got.stream(path) - gotStream.pipe(proxyStream) - - gotStream.on('error', () => { - resolve(null) - }) - - gotStream.on('response', response => { - if (response.statusCode === 200) { - return resolve(proxyStream) - } - - resolve(null) - }) - }) - } - - if (!(await pathExists(path))) { - return null - } - - return createReadStream(path) -} - -module.exports = getAsStream diff --git a/package.json b/package.json index f30b7acd..64a5ca48 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,6 @@ "geojson-stream": "^0.1.0", "geojson-vt": "^3.2.1", "get-stream": "^6.0.1", - "got": "^11.8.5", "gunzip-stream": "^1.0.1", "iconv-lite": "^0.6.3", "into-stream": "^6.0.0", diff --git a/scripts/build-geo.cjs b/scripts/build-geo.cjs index ca783db4..e0346a96 100755 --- a/scripts/build-geo.cjs +++ b/scripts/build-geo.cjs @@ -1,20 +1,21 @@ #!/usr/bin/env node /* eslint unicorn/prefer-object-from-entries: off */ +require('dotenv').config() const {createGunzip} = require('zlib') const {join} = require('path') -const got = require('got') const {center, bbox} = require('@turf/turf') const getStream = require('get-stream') const {outputJson} = require('fs-extra') +const fetch = require('../lib/util/fetch.cjs') const communes = 'http://etalab-datasets.geo.data.gouv.fr/contours-administratifs/2023/geojson/communes-100m.geojson.gz' async function getFeatures(url) { - const buffer = await getStream.buffer( - got.stream(url).pipe(createGunzip()) - ) + const response = await fetch(url) + const unzippedStream = response.body.pipe(createGunzip()) + const bufferData = await getStream.buffer(unzippedStream) - return JSON.parse(buffer.toString()).features + return JSON.parse(bufferData.toString()).features } function toPrecision(float, precision) { diff --git a/scripts/download-datasets.cjs b/scripts/download-datasets.cjs index 955dd50d..7de1818d 100644 --- a/scripts/download-datasets.cjs +++ b/scripts/download-datasets.cjs @@ -1,17 +1,19 @@ #!/usr/bin/env node +require('dotenv').config() const path = require('path') const {createWriteStream} = require('fs') const {pipeline} = require('stream/promises') const {mkdirp} = require('fs-extra') -const got = require('got') const ora = require('ora') +const fetch = require('../lib/util/fetch.cjs') const dataDir = path.join(__dirname, '..', 'data') async function downloadFile(url, fileName) { const spinner = ora(`Téléchargement du fichier ${fileName}`).start() + const response = await fetch(url) await pipeline( - got.stream(url, {responseType: 'buffer'}), + response.body, createWriteStream(path.join(dataDir, fileName)) ) spinner.succeed() diff --git a/scripts/prepare-contours.cjs b/scripts/prepare-contours.cjs index 6215680c..98f142c6 100644 --- a/scripts/prepare-contours.cjs +++ b/scripts/prepare-contours.cjs @@ -1,4 +1,5 @@ #!/usr/bin/env node +require('dotenv').config() const path = require('path') const {mkdirp} = require('fs-extra') const {prepareContours} = require('../lib/util/contours.cjs') diff --git a/yarn.lock b/yarn.lock index da9337d6..759b3cbc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1527,11 +1527,6 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.25.24.tgz#8c7688559979f7079aacaf31aa881c3aa410b718" integrity sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ== -"@sindresorhus/is@^4.0.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" - integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== - "@sinonjs/commons@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-2.0.0.tgz#fd4ca5b063554307e8327b4564bd56d3b73924a3" @@ -1546,13 +1541,6 @@ dependencies: "@sinonjs/commons" "^2.0.0" -"@szmarczak/http-timer@^4.0.5": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" - integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== - dependencies: - defer-to-connect "^2.0.0" - "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -2728,16 +2716,6 @@ dependencies: "@babel/types" "^7.3.0" -"@types/cacheable-request@^6.0.1": - version "6.0.3" - resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183" - integrity sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw== - dependencies: - "@types/http-cache-semantics" "*" - "@types/keyv" "^3.1.4" - "@types/node" "*" - "@types/responselike" "^1.0.0" - "@types/eslint@^7.2.13": version "7.29.0" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.29.0.tgz#e56ddc8e542815272720bb0b4ccc2aff9c3e1c78" @@ -2763,11 +2741,6 @@ dependencies: "@types/node" "*" -"@types/http-cache-semantics@*": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" - integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.4" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" @@ -2797,13 +2770,6 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/keyv@^3.1.4": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" - integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== - dependencies: - "@types/node" "*" - "@types/minimist@^1.2.2": version "1.2.2" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" @@ -2829,13 +2795,6 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== -"@types/responselike@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" - integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== - dependencies: - "@types/node" "*" - "@types/semver@^7.3.12": version "7.3.13" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" @@ -3397,24 +3356,6 @@ cacache@^15.2.0: tar "^6.0.2" unique-filename "^1.1.1" -cacheable-lookup@^5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" - integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== - -cacheable-request@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" - integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^4.0.0" - lowercase-keys "^2.0.0" - normalize-url "^6.0.1" - responselike "^2.0.0" - call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -3528,13 +3469,6 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" -clone-response@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3" - integrity sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA== - dependencies: - mimic-response "^1.0.0" - clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" @@ -3788,13 +3722,6 @@ decamelize@^5.0.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-5.0.1.tgz#db11a92e58c741ef339fb0a2868d8a06a9a7b1e9" integrity sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA== -decompress-response@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" - integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== - dependencies: - mimic-response "^3.1.0" - dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" @@ -3829,11 +3756,6 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" -defer-to-connect@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" - integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== - define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" @@ -4850,13 +4772,6 @@ get-stdin@^9.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-9.0.0.tgz#3983ff82e03d56f1b2ea0d3e60325f39d703a575" integrity sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA== -get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - get-stream@^6.0.0, get-stream@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" @@ -4945,23 +4860,6 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -got@^11.8.5: - version "11.8.6" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" - integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g== - dependencies: - "@sindresorhus/is" "^4.0.0" - "@szmarczak/http-timer" "^4.0.5" - "@types/cacheable-request" "^6.0.1" - "@types/responselike" "^1.0.0" - cacheable-lookup "^5.0.3" - cacheable-request "^7.0.2" - decompress-response "^6.0.0" - http2-wrapper "^1.0.0-beta.5.2" - lowercase-keys "^2.0.0" - p-cancelable "^2.0.0" - responselike "^2.0.0" - graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" @@ -5057,7 +4955,7 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: +http-cache-semantics@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== @@ -5082,14 +4980,6 @@ http-proxy-agent@^4.0.1: agent-base "6" debug "4" -http2-wrapper@^1.0.0-beta.5.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" - integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== - dependencies: - quick-lru "^5.1.1" - resolve-alpn "^1.0.0" - https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -6033,7 +5923,7 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== -keyv@^4.0.0, keyv@^4.1.1, keyv@^4.2.2, keyv@^4.2.8, keyv@^4.3.2: +keyv@^4.1.1, keyv@^4.2.2, keyv@^4.2.8, keyv@^4.3.2: version "4.5.2" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.2.tgz#0e310ce73bf7851ec702f2eaf46ec4e3805cce56" integrity sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g== @@ -6144,11 +6034,6 @@ lowercase-keys@^1.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -6307,16 +6192,6 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-response@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -mimic-response@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" - integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== - min-indent@^1.0.0, min-indent@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -6597,11 +6472,6 @@ normalize-path@^3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-url@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" - integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== - npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" @@ -6775,11 +6645,6 @@ ora@^5.4.1: strip-ansi "^6.0.0" wcwidth "^1.0.1" -p-cancelable@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" - integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== - p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -7298,11 +7163,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -resolve-alpn@^1.0.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" - integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -7341,13 +7201,6 @@ resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.1: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -responselike@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" - integrity sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw== - dependencies: - lowercase-keys "^2.0.0" - restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"