From 31f07af2f2de0c3bb807f30d3ca3538d2eda7418 Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Thu, 19 Oct 2023 19:41:26 -0700 Subject: [PATCH 01/16] fix lint --- package.json | 2 + .../stages/build/drupal/metalsmith-drupal.js | 39 +- src/site/stages/build/drupal/page.js | 5 +- .../build/drupal/static-data-files/config.js | 27 +- .../drupal/static-data-files/generate.js | 111 +++- .../static-data-files/vaPoliceData/index.js | 47 ++ .../vaPoliceData/police-contact.csv | 3 + .../vaPoliceData/police-events.csv | 7 + .../plugins/generate-static-data-files.js | 5 +- yarn.lock | 530 +++++++++++++++++- 10 files changed, 741 insertions(+), 35 deletions(-) create mode 100644 src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js create mode 100644 src/site/stages/build/drupal/static-data-files/vaPoliceData/police-contact.csv create mode 100644 src/site/stages/build/drupal/static-data-files/vaPoliceData/police-events.csv diff --git a/package.json b/package.json index 58edd2b5be..0edac61ee3 100644 --- a/package.json +++ b/package.json @@ -210,6 +210,7 @@ "aws-sdk": "^2.1441.0", "blob-polyfill": "^4.0.20200601", "core-js": "^3.17.3", + "csvtojson": "^2.0.10", "diff2html": "^3.4.11", "dotenv": "^10.0.0", "express": "^4.17.1", @@ -229,6 +230,7 @@ "metalsmith-sitemap": "^1.0.0", "moment": "^2.29.2", "moment-timezone": "^0.5.33", + "node-libcurl": "^3.0.0", "number-to-words": "^1.2.4", "raven": "^2.6.4", "react": "^16.13.1", diff --git a/src/site/stages/build/drupal/metalsmith-drupal.js b/src/site/stages/build/drupal/metalsmith-drupal.js index bf8462c80c..aecc44a8cb 100644 --- a/src/site/stages/build/drupal/metalsmith-drupal.js +++ b/src/site/stages/build/drupal/metalsmith-drupal.js @@ -55,7 +55,6 @@ function pipeDrupalPagesIntoMetalsmith(contentData, files) { const pages = contentData.data.nodeQuery.entities.filter( e => e && Object.keys(e).length, ); - for (const page of pages) { const { entityUrl: { path: drupalUrl }, @@ -355,6 +354,44 @@ function getDrupalContent(buildOptions) { let drupalData = null; try { drupalData = await loadDrupal(buildOptions); + + // Add to drupal Sidebars at the bottom of the ABOUT VA/ABOUT LOVELL section the va-police link + // TODO: Remove if CMS goes forward with creating VA Police Pages + // const facilitySidebarQueries = Object.keys(drupalData.data).filter(k => + // k.includes('FacilitySidebarQuery'), + // ); + // FOR EACH FACILITY SIDEBAR QUERY, UNDER THE ABOUT XYZ SECTION ADD "VA Police" link + // for (const query of facilitySidebarQueries) { + // for (let i = 0; i < drupalData.data[query].links.length; i += 1) { + // const j = drupalData.data[query].links[i].links.findIndex(l => { + // return ( + // l.label.toUpperCase().startsWith('ABOUT VA') || + // l.label.toUpperCase().startsWith('ABOUT LOVELL') + // ); + // }); + // if (j !== -1) { + // console.log( + // `Adding VA Police to: ${drupalData.data[query].links[0].url.path}/va-police`, + // ); + // drupalData.data[query].links[i].links[j].links.push({ + // expanded: false, + // description: 'Police data', + // label: 'VA Police', + // links: [], + // url: { + // path: `${drupalData.data[query].links[0].url.path}/va-police`, + // }, + // entity: { + // linkedEntity: { + // entityPublished: true, + // moderationState: 'published', + // }, + // }, + // }); + // } + // } + // } + drupalData = convertDrupalFilesToLocal(drupalData, files); await loadCachedDrupalFiles(buildOptions, files); diff --git a/src/site/stages/build/drupal/page.js b/src/site/stages/build/drupal/page.js index 55148dd366..5711dedcfe 100644 --- a/src/site/stages/build/drupal/page.js +++ b/src/site/stages/build/drupal/page.js @@ -67,7 +67,7 @@ function paginatePages(page, files, field, layout, ariaLabel, perPage) { if (page[pageField]) { const pagedEntities = _.chunk(page[pageField].entities, perPage); - for (let pageNum = 0; pageNum < pagedEntities.length; pageNum++) { + for (let pageNum = 0; pageNum < pagedEntities.length; pageNum += 1) { let pagedPage = { ...page }; if (pageNum > 0) { @@ -98,7 +98,7 @@ function paginatePages(page, files, field, layout, ariaLabel, perPage) { start = pageNum; } } - for (let num = start; num < start + length; num++) { + for (let num = start; num < start + length; num += 1) { innerPages.push({ href: num === pageNum @@ -356,6 +356,7 @@ function compilePage(page, contentData) { const facilitySidebarNavItems = { facilitySidebar: getFacilitySidebar(page, contentData), }; + const outreachSidebarNavItems = { outreachSidebar: outreachSidebarNav }; const alertItems = { alert: alertsItem }; diff --git a/src/site/stages/build/drupal/static-data-files/config.js b/src/site/stages/build/drupal/static-data-files/config.js index b0a6b4b078..71760ae0ea 100644 --- a/src/site/stages/build/drupal/static-data-files/config.js +++ b/src/site/stages/build/drupal/static-data-files/config.js @@ -1,3 +1,6 @@ +const { join } = require('path'); +const url = require('url'); + const { query: queryVamcEhrSystem, postProcess: postProcessVamcEhrSystem, @@ -8,6 +11,11 @@ const { postProcess: postProcessVamcFacilitySupplementalStatus, } = require('./vamcFacilitySupplementalStatus'); +const { + query: queryVAPoliceData, + postProcess: postProcessVAPoliceData, +} = require('./vaPoliceData'); + const DATA_FILE_PATH = 'data/cms'; /** @@ -15,7 +23,7 @@ const DATA_FILE_PATH = 'data/cms'; * description: String used in build log, * filename: File will be generated at `${DATA_FILE_PATH}/${filename}`, * queryType: 'graphql' (default); aim to eventually support jsonapi - * query: String defining the query to be run, + * query: String|Object defining the query to be run, * postProcess: Callback function to apply post-query processing on query result, * } */ @@ -32,6 +40,23 @@ const DATA_FILES = [ query: queryVamcFacilitySupplementalStatus, postProcess: postProcessVamcFacilitySupplementalStatus, }, + { + description: 'VA Police Data', + filename: 'va-police.json', + queryType: 'curl', + query: queryVAPoliceData( + [ + url + .pathToFileURL(join(__dirname, 'vaPoliceData', 'police-contact.csv')) + .toString(), + url + .pathToFileURL(join(__dirname, 'vaPoliceData', 'police-events.csv')) + .toString(), + ], + ['pre-police-contact.csv', 'pre-police-violations.csv'], + ), + postProcess: postProcessVAPoliceData, + }, ]; module.exports = { diff --git a/src/site/stages/build/drupal/static-data-files/generate.js b/src/site/stages/build/drupal/static-data-files/generate.js index fbf4ac40be..99727d1d6d 100644 --- a/src/site/stages/build/drupal/static-data-files/generate.js +++ b/src/site/stages/build/drupal/static-data-files/generate.js @@ -16,6 +16,8 @@ const DRUPAL_CACHE_CONFIG_FILENAME = 'config.json'; const isQueryTypeGraphQL = ({ queryType }) => queryType === 'graphql' || queryType === undefined; // if undefined, default to graphql +const isQueryTypeCurl = ({ queryType }) => queryType === 'curl'; + const writeProcessedDataFileToBuild = ( files, filenameWithPath, @@ -103,6 +105,28 @@ const writeProcessedDataFilesToCache = ( }); }; +// Applies the process function to download the inputs to the DATA_FILE (A DATA_FILE for curl may have multiple files) +const processCurlDataFile = async dataFile => { + const { description, filename, query, postProcess } = dataFile; + const baseResult = { + description, + filename, + from: 'Curl', + }; + if (!filename) { + return Promise.resolve({ + ...baseResult, + error: 'A filename must be provided.', + }); + } + const outputFiles = await query(); + const data = postProcess ? await postProcess(outputFiles) : outputFiles; + return { + ...baseResult, + data, + }; +}; + const processGraphQLDataFile = async ( graphQLApiClient, onlyPublishedContent, @@ -151,8 +175,17 @@ const processGraphQLDataFile = async ( }); }; +const pullDataFileContentFromCurls = async ( + _dataFiles, + _buildOptions, + _onlyPublishedContent, +) => { + const curlFiles = DATA_FILES.filter(isQueryTypeCurl); + return Promise.all(curlFiles.map(dataFile => processCurlDataFile(dataFile))); +}; + const pullGraphQLDataFileContentFromDrupal = async ( - dataFiles, + _dataFiles, buildOptions, onlyPublishedContent, ) => { @@ -178,6 +211,18 @@ const pullDataFileContentFromDrupal = async ( ); }; +const pullDataFileContentFromCurl = async ( + dataFiles, + buildOptions, + onlyPublishedContent, +) => { + return pullDataFileContentFromCurls( + dataFiles, + buildOptions, + onlyPublishedContent, + ); +}; + const readProcessedDataFileFromCache = async (path, filename) => { const filenameWithPath = `${path}/${filename}`; return fs.readJSON(filenameWithPath); @@ -232,6 +277,67 @@ const pullDataFileContentFromCache = async ( ), ); }; +const generateStaticDataFilesFromCurl = async ( + files, + buildOptions, + onlyPublishedContent = true, +) => { + if (!ENABLED_ENVIRONMENTS.has(buildOptions.buildtype)) { + logDrupal( + `Drupal integration disabled for buildtype ${buildOptions.buildtype}`, + ); + return; + } + let processedJsonDataFiles = []; + // Pull static-data-file content from Drupal + if (shouldPullDrupal(buildOptions, DRUPAL_CACHE_STATIC_DATA_FILEPATH)) { + logDrupal( + `Generating static data files from Drupal at ${buildOptions['drupal-address']}.`, + ); + + if (!Array.isArray(DATA_FILES)) { + logDrupal( + 'Malformed static-data-file configuration at src/site/stages/build/drupal/static-data-files/config.js.', + ); + logDrupal('Static data files cannot be generated.'); + return; + } + + if (DATA_FILES.length === 0) { + logDrupal('No static data files configured for Drupal.'); + logDrupal('Static data files cannot be generated.'); + return; + } + + processedJsonDataFiles = await pullDataFileContentFromCurl( + DATA_FILES, + buildOptions, + onlyPublishedContent, + ); + + writeProcessedDataFilesToCache( + buildOptions, + DRUPAL_CACHE_STATIC_DATA_FILEPATH, + DRUPAL_CACHE_CONFIG_FILENAME, + processedJsonDataFiles, + ); + } + + // Read static-data-file content from cache + else { + logDrupal('Generating static data files from cache.'); + logDrupal(`To pull latest, run with "--${PULL_DRUPAL_BUILD_ARG}" flag.`); + + processedJsonDataFiles = await pullDataFileContentFromCache( + buildOptions, + DRUPAL_CACHE_STATIC_DATA_FILEPATH, + DRUPAL_CACHE_CONFIG_FILENAME, + ); + } + + // Write processed data files to build output + writeProcessedDataFilesToBuild(files, DATA_FILE_PATH, processedJsonDataFiles); +}; /** * Generates static data files defined at ../config.js @@ -304,4 +410,5 @@ const generateStaticDataFilesFromDrupal = async ( writeProcessedDataFilesToBuild(files, DATA_FILE_PATH, processedJsonDataFiles); }; -module.exports = generateStaticDataFilesFromDrupal; +module.exports.generateStaticDataFilesFromDrupal = generateStaticDataFilesFromDrupal; +module.exports.generateStaticDataFilesFromCurl = generateStaticDataFilesFromCurl; diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js new file mode 100644 index 0000000000..1b3c52987d --- /dev/null +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js @@ -0,0 +1,47 @@ +const { curly } = require('node-libcurl'); +const { zip } = require('lodash'); +const fs = require('fs'); +const csv = require('csvtojson'); +const path = require('path'); +const { logDrupal: log } = require('../../utilities-drupal'); + +const query = (inputs, outputFilenames) => async () => { + if (!Array.isArray(inputs)) { + throw new Error('inputs must be an array'); + } + if (!Array.isArray(outputFilenames)) { + throw new Error('output_filenames must be an array'); + } + if (inputs.length !== outputFilenames.length) { + throw new Error('inputs and output_filenames must be the same length'); + } + for await (const io of zip(inputs, outputFilenames)) { + if (typeof io[0] !== 'string') { + throw new Error('inputs must be an array of strings'); + } + if (typeof io[1] !== 'string') { + throw new Error('output_filenames must be an array of strings'); + } + if (/https?|file:\/\//.test(io[0])) { + const { data } = await curly.get(io[0]); + fs.writeFileSync(path.join(__dirname, io[1]), data); + } + } + return outputFilenames; +}; + +/* eslint-disable camelcase */ +const postProcess = async queryResult => { + log({ POLICE: JSON.stringify(queryResult) }); + const processedJSON = {}; + for await (const csvFilePath of queryResult) { + const data = await csv().fromFile(csvFilePath); + log(data); + } + return processedJSON; +}; + +module.exports = { + query, + postProcess, +}; diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/police-contact.csv b/src/site/stages/build/drupal/static-data-files/vaPoliceData/police-contact.csv new file mode 100644 index 0000000000..bb077b38f6 --- /dev/null +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/police-contact.csv @@ -0,0 +1,3 @@ +facility_id,contact_name,contact_number +vha_011,Abc Jameson,1234567890 +vha_021,Xyz Adamson,1123456789 diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/police-events.csv b/src/site/stages/build/drupal/static-data-files/vaPoliceData/police-events.csv new file mode 100644 index 0000000000..df790c0066 --- /dev/null +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/police-events.csv @@ -0,0 +1,7 @@ +date_range,facility_id,a,b,c +2021-01-01:2021-12-31,vha_011,2,3,4 +2022-01-01:2022-12-31,vha_011,3,4,5 +2023-01-01:2023-10-10,vha_011,1,1,1 +2021-01-01:2021-12-31,vha_021,1,3,1 +2022-01-01:2022-12-31,vha_021,2,0,1 +2023-01-01:2023-10-10,vha_021,0,1,0 \ No newline at end of file diff --git a/src/site/stages/build/plugins/generate-static-data-files.js b/src/site/stages/build/plugins/generate-static-data-files.js index 07d21f30db..338babe349 100644 --- a/src/site/stages/build/plugins/generate-static-data-files.js +++ b/src/site/stages/build/plugins/generate-static-data-files.js @@ -1,8 +1,9 @@ -const generateStaticDataFilesFromDrupal = require('../drupal/static-data-files/generate'); +const generate = require('../drupal/static-data-files/generate'); const generateStaticDataFiles = buildOptions => { return async (files, metalsmith, done) => { - await generateStaticDataFilesFromDrupal(files, buildOptions); + await generate.generateStaticDataFilesFromDrupal(files, buildOptions); + await generate.generateStaticDataFilesFromCurl(files, buildOptions); done(); }; }; diff --git a/yarn.lock b/yarn.lock index 8828ad8b88..9ed30056f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1144,6 +1144,11 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@gar/promisify@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" + integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== + "@humanwhocodes/config-array@^0.5.0": version "0.5.0" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" @@ -1185,6 +1190,21 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" +"@mapbox/node-pre-gyp@1.0.10": + version "1.0.10" + resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz#8e6735ccebbb1581e5a7e652244cadc8a844d03c" + integrity sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA== + dependencies: + detect-libc "^2.0.0" + https-proxy-agent "^5.0.0" + make-dir "^3.1.0" + node-fetch "^2.6.7" + nopt "^5.0.0" + npmlog "^5.0.1" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.11" + "@mapbox/node-pre-gyp@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.5.tgz#2a0b32fcb416fb3f2250fd24cb2a81421a4f5950" @@ -1221,6 +1241,22 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@npmcli/fs@^2.1.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-2.1.2.tgz#a9e2541a4a2fec2e69c29b35e6060973da79b865" + integrity sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ== + dependencies: + "@gar/promisify" "^1.1.3" + semver "^7.3.5" + +"@npmcli/move-file@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-2.0.1.tgz#26f6bdc379d87f75e55739bab89db525b06100e4" + integrity sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ== + dependencies: + mkdirp "^1.0.4" + rimraf "^3.0.2" + "@octokit/auth-token@^2.4.4": version "2.5.0" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" @@ -1482,6 +1518,11 @@ lz-string "^1.4.4" pretty-format "^27.0.2" +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + "@trysound/sax@0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" @@ -1856,7 +1897,7 @@ abab@^2.0.0: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== -abbrev@1: +abbrev@1, abbrev@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== @@ -1941,6 +1982,13 @@ agent-base@6, agent-base@^6.0.2: dependencies: debug "4" +agentkeepalive@^4.2.1: + version "4.5.0" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" + integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== + dependencies: + humanize-ms "^1.2.1" + aggregate-error@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" @@ -2112,6 +2160,11 @@ aproba@^1.0.3: resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== +"aproba@^1.0.3 || ^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== + arch@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" @@ -2122,6 +2175,22 @@ archy@^1.0.0: resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= +are-we-there-yet@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz#372e0e7bd279d8e94c653aaa1f67200884bf3e1c" + integrity sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw== + dependencies: + delegates "^1.0.0" + readable-stream "^3.6.0" + +are-we-there-yet@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz#679df222b278c64f2cdba1175cdc00b0d96164bd" + integrity sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg== + dependencies: + delegates "^1.0.0" + readable-stream "^3.6.0" + are-we-there-yet@~1.1.2: version "1.1.7" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" @@ -2556,7 +2625,7 @@ blob-util@^2.0.2: resolved "https://registry.yarnpkg.com/blob-util/-/blob-util-2.0.2.tgz#3b4e3c281111bb7f11128518006cdc60b403a1eb" integrity sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ== -bluebird@^3.1.1, bluebird@^3.7.2: +bluebird@^3.1.1, bluebird@^3.5.1, bluebird@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -2607,6 +2676,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.1, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -2698,6 +2774,30 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== +cacache@^16.1.0: + version "16.1.3" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-16.1.3.tgz#a02b9f34ecfaf9a78c9f4bc16fceb94d5d67a38e" + integrity sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ== + dependencies: + "@npmcli/fs" "^2.1.0" + "@npmcli/move-file" "^2.0.0" + chownr "^2.0.0" + fs-minipass "^2.1.0" + glob "^8.0.1" + infer-owner "^1.0.4" + lru-cache "^7.7.1" + minipass "^3.1.6" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + mkdirp "^1.0.4" + p-map "^4.0.0" + promise-inflight "^1.0.1" + rimraf "^3.0.2" + ssri "^9.0.0" + tar "^6.1.11" + unique-filename "^2.0.0" + cachedir@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.3.0.tgz#0c75892a052198f0b21c7c1804d8331edfcae0e8" @@ -3147,6 +3247,11 @@ color-string@^1.5.2: color-name "^1.0.0" simple-swizzle "^0.2.2" +color-support@^1.1.2, color-support@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + color@3.0.x: version "3.0.0" resolved "https://registry.yarnpkg.com/color/-/color-3.0.0.tgz#d920b4328d534a3ac8295d68f7bd4ba6c427be9a" @@ -3300,7 +3405,7 @@ connect-history-api-fallback@^1.6.0: resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== -console-control-strings@^1.0.0, console-control-strings@~1.1.0: +console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= @@ -3613,6 +3718,15 @@ cssstyle@^2.0.0: dependencies: cssom "~0.3.6" +csvtojson@^2.0.10: + version "2.0.10" + resolved "https://registry.yarnpkg.com/csvtojson/-/csvtojson-2.0.10.tgz#11e7242cc630da54efce7958a45f443210357574" + integrity sha512-lUWFxGKyhraKCW8Qghz6Z0f2l/PqB1W3AO0HKJzGIQ5JRSlR651ekJDiGJbBT4sRNNv5ddnSGVEnsxP9XRCVpQ== + dependencies: + bluebird "^3.5.1" + lodash "^4.17.3" + strip-bom "^2.0.0" + cy-mobile-commands@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/cy-mobile-commands/-/cy-mobile-commands-0.3.0.tgz#2bf242093149154d846b755977da197b4730429e" @@ -3773,6 +3887,13 @@ debug@^4.3.2: dependencies: ms "2.1.2" +debug@^4.3.3: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + debug@~0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" @@ -3912,6 +4033,11 @@ detect-libc@^1.0.3: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= +detect-libc@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" + integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== + detect-node@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" @@ -4155,6 +4281,13 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +encoding@^0.1.13: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -4192,6 +4325,11 @@ entities@~2.1.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== +env-paths@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" + integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== + env-paths@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" @@ -4275,6 +4413,11 @@ enzyme@^3.11.0: rst-selector-parser "^2.2.3" string.prototype.trim "^1.2.1" +err-code@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -5404,7 +5547,7 @@ fs-extra@~0.26.5: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-minipass@^2.0.0: +fs-minipass@^2.0.0, fs-minipass@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== @@ -5461,6 +5604,35 @@ functions-have-names@^1.2.2: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.2.tgz#98d93991c39da9361f8e50b337c4f6e41f120e21" integrity sha512-bLgc3asbWdwPbx2mNk2S49kmJCuQeu0nfmaOgbs8WIyzzkw3r4htszdIi9Q9EMezDPTYuJx2wvjZ/EwgAthpnA== +gauge@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395" + integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.2" + console-control-strings "^1.0.0" + has-unicode "^2.0.1" + object-assign "^4.1.1" + signal-exit "^3.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.2" + +gauge@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" + integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.3" + console-control-strings "^1.1.0" + has-unicode "^2.0.1" + signal-exit "^3.0.7" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.5" + gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -5631,6 +5803,17 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, gl once "^1.3.0" path-is-absolute "^1.0.0" +glob@^8.0.1: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + global-dirs@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.0.tgz#70a76fe84ea315ab37b1f5576cbde7d48ef72686" @@ -5795,7 +5978,7 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has-unicode@^2.0.0: +has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= @@ -5897,6 +6080,11 @@ htmlparser2@^6.1.0: domutils "^2.5.2" entities "^2.0.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== + http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" @@ -5939,6 +6127,15 @@ http-parser-js@>=0.5.1: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== + dependencies: + "@tootallnate/once" "2" + agent-base "6" + debug "4" + http-proxy-middleware@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.1.tgz#7ef3417a479fb7666a571e09966c66a39bd2c15f" @@ -6011,6 +6208,13 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== + dependencies: + ms "^2.0.0" + husky@>=6: version "7.0.2" resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.2.tgz#21900da0f30199acca43a46c043c4ad84ae88dff" @@ -6023,6 +6227,13 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + icss-utils@^5.0.0, icss-utils@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" @@ -6098,6 +6309,11 @@ indexes-of@^1.0.1: resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= +infer-owner@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -6189,6 +6405,11 @@ ip@^1.1.0, ip@^1.1.5: resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= +ip@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" + integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== + ipaddr.js@1.9.1, ipaddr.js@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" @@ -6360,6 +6581,11 @@ is-ip@^3.1.0: dependencies: ip-regex "^4.0.0" +is-lambda@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" + integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== + is-my-ip-valid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" @@ -7371,7 +7597,7 @@ lodash.zip@^4.2.0: resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020" integrity sha1-7GZi5IlkCO1KtsVCo5kLcswIACA= -lodash@4.17.21, lodash@^2.4.1, lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.3.0, lodash@~4.17.10: +lodash@4.17.21, lodash@^2.4.1, lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.3.0, lodash@~4.17.10: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -7453,6 +7679,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@^7.7.1: + version "7.18.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + lz-string@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" @@ -7473,6 +7704,28 @@ make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: dependencies: semver "^6.0.0" +make-fetch-happen@^10.0.3: + version "10.2.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz#f5e3835c5e9817b617f2770870d9492d28678164" + integrity sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w== + dependencies: + agentkeepalive "^4.2.1" + cacache "^16.1.0" + http-cache-semantics "^4.1.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^7.7.1" + minipass "^3.1.6" + minipass-collect "^1.0.2" + minipass-fetch "^2.0.3" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.3" + promise-retry "^2.0.1" + socks-proxy-agent "^7.0.0" + ssri "^9.0.0" + makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" @@ -7765,6 +8018,13 @@ minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.3, minimatch@^3.0.4, minimatch dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -7779,6 +8039,45 @@ minimist@1.1.x, minimist@1.2.5, minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2. resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== + dependencies: + minipass "^3.0.0" + +minipass-fetch@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-2.1.2.tgz#95560b50c472d81a3bc76f20ede80eaed76d8add" + integrity sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA== + dependencies: + minipass "^3.1.6" + minipass-sized "^1.0.3" + minizlib "^2.1.2" + optionalDependencies: + encoding "^0.1.13" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== + dependencies: + minipass "^3.0.0" + +minipass-pipeline@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== + dependencies: + minipass "^3.0.0" + +minipass-sized@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + minipass@^3.0.0, minipass@^3.1.1: version "3.1.5" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.5.tgz#71f6251b0a33a49c01b3cf97ff77eda030dff732" @@ -7786,7 +8085,19 @@ minipass@^3.0.0, minipass@^3.1.1: dependencies: yallist "^4.0.0" -minizlib@^2.1.1: +minipass@^3.1.6: + version "3.3.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" + integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== + dependencies: + yallist "^4.0.0" + +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + +minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== @@ -7811,7 +8122,7 @@ mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.5, mkdirp@~0.5.1: dependencies: minimist "^1.2.5" -mkdirp@^1.0.3: +mkdirp@^1.0.3, mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -7992,7 +8303,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.1.1: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -8030,6 +8341,11 @@ mute-stream@0.0.5: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" integrity sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA= +nan@2.17.0: + version "2.17.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" + integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== + nan@^2.13.2, nan@~2.15.0: version "2.15.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" @@ -8070,6 +8386,11 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== +negotiator@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + neo-async@^2.6.0, neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -8108,6 +8429,22 @@ node-forge@^0.10.0: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA== +node-gyp@9.3.0: + version "9.3.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.3.0.tgz#f8eefe77f0ad8edb3b3b898409b53e697642b319" + integrity sha512-A6rJWfXFz7TQNjpldJ915WFb1LnhO4lIve3ANPbWreuEoLoKlFT3sxIepPBkLhM27crW8YmN+pjlgbasH6cH/Q== + dependencies: + env-paths "^2.2.0" + glob "^7.1.4" + graceful-fs "^4.2.6" + make-fetch-happen "^10.0.3" + nopt "^6.0.0" + npmlog "^6.0.0" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.2" + which "^2.0.2" + node-gyp@^7.1.0: version "7.1.2" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-7.1.2.tgz#21a810aebb187120251c3bcec979af1587b188ae" @@ -8124,6 +8461,19 @@ node-gyp@^7.1.0: tar "^6.0.2" which "^2.0.2" +node-libcurl@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/node-libcurl/-/node-libcurl-3.0.0.tgz#426014190d54fdacfd164b926c85d4f2d419c9d2" + integrity sha512-wqIXXsHyOdBg5kZH02OgG1ZiunJumDdMyNXKul9I0AVEZLLMq2/SuOk1/8uvYiJ5y3+SGNBZYnS86keD8+Qo0Q== + dependencies: + "@mapbox/node-pre-gyp" "1.0.10" + env-paths "2.2.0" + nan "2.17.0" + node-gyp "9.3.0" + npmlog "6.0.2" + rimraf "3.0.2" + tslib "2.4.0" + node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" @@ -8176,6 +8526,13 @@ nopt@^5.0.0: dependencies: abbrev "1" +nopt@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" + integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== + dependencies: + abbrev "^1.0.0" + normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -8218,6 +8575,16 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npmlog@6.0.2, npmlog@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" + integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== + dependencies: + are-we-there-yet "^3.0.0" + console-control-strings "^1.1.0" + gauge "^4.0.3" + set-blocking "^2.0.0" + npmlog@^4.0.0, npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" @@ -8228,6 +8595,16 @@ npmlog@^4.0.0, npmlog@^4.1.2: gauge "~2.7.3" set-blocking "~2.0.0" +npmlog@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-5.0.1.tgz#f06678e80e29419ad67ab964e0fa69959c1eb8b0" + integrity sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw== + dependencies: + are-we-there-yet "^2.0.0" + console-control-strings "^1.1.0" + gauge "^3.0.0" + set-blocking "^2.0.0" + nth-check@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.1.tgz#2efe162f5c3da06a28959fbd3db75dbeea9f0fc2" @@ -9486,6 +9863,19 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== + +promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== + dependencies: + err-code "^2.0.2" + retry "^0.12.0" + promised-io@*: version "0.3.6" resolved "https://registry.yarnpkg.com/promised-io/-/promised-io-0.3.6.tgz#04c0fea80772f7091dca0f114e30b3e3f7650126" @@ -9779,6 +10169,15 @@ readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + readdirp@~3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" @@ -10103,6 +10502,11 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + retry@^0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" @@ -10120,6 +10524,13 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" +rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + rimraf@^2.2.8: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -10127,13 +10538,6 @@ rimraf@^2.2.8: dependencies: glob "^7.1.3" -rimraf@^3.0.0, rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - rimraf@~2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -10192,7 +10596,7 @@ safe-regex@^2.1.1: dependencies: regexp-tree "~0.1.1" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -10469,6 +10873,11 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.4.tgz#366a4684d175b9cab2081e3681fda3747b6c51d7" integrity sha512-rqYhcAnZ6d/vTPGghdrw7iumdcbXpsk1b8IG/rz+VWV51DM0p7XCtMoJ3qhPLIbp3tvyt3pKRbaaEMZYpHto8Q== +signal-exit@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + simple-swizzle@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" @@ -10539,6 +10948,11 @@ smart-buffer@^4.1.0: resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + sockjs@^0.3.21: version "0.3.21" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.21.tgz#b34ffb98e796930b60a0cfa11904d6a339a7d417" @@ -10557,6 +10971,15 @@ socks-proxy-agent@^5.0.0: debug "4" socks "^2.3.3" +socks-proxy-agent@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz#dc069ecf34436621acb41e3efa66ca1b5fed15b6" + integrity sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww== + dependencies: + agent-base "^6.0.2" + debug "^4.3.3" + socks "^2.6.2" + socks@^2.3.3: version "2.6.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.1.tgz#989e6534a07cf337deb1b1c94aaa44296520d30e" @@ -10565,6 +10988,14 @@ socks@^2.3.3: ip "^1.1.5" smart-buffer "^4.1.0" +socks@^2.6.2: + version "2.7.1" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55" + integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== + dependencies: + ip "^2.0.0" + smart-buffer "^4.2.0" + source-map-js@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-0.6.2.tgz#0bb5de631b41cfbda6cfba8bd05a80efdfd2385e" @@ -10686,7 +11117,7 @@ sshpk@^1.14.1, sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -ssri@^8.0.1: +ssri@^8.0.1, ssri@^9.0.0: version "8.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== @@ -10747,6 +11178,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -10765,15 +11205,6 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string.prototype.matchall@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.5.tgz#59370644e1db7e4c0c045277690cf7b01203c4da" @@ -10878,6 +11309,13 @@ strip-ansi@^7.0.0: dependencies: ansi-regex "^6.0.1" +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g== + dependencies: + is-utf8 "^0.2.0" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -11079,6 +11517,18 @@ tar@^6.0.2, tar@^6.1.0, tar@^6.1.9: mkdirp "^1.0.3" yallist "^4.0.0" +tar@^6.1.11, tar@^6.1.2: + version "6.2.0" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.0.tgz#b14ce49a79cb1cd23bc9b016302dea5474493f73" + integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^5.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + tcomb-validation@^3.3.0: version "3.4.1" resolved "https://registry.yarnpkg.com/tcomb-validation/-/tcomb-validation-3.4.1.tgz#a7696ec176ce56a081d9e019f8b732a5a8894b65" @@ -11291,6 +11741,11 @@ tsconfig-paths@^3.11.0: minimist "^1.2.0" strip-bom "^3.0.0" +tslib@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + tslib@^1.0.0, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -11482,6 +11937,20 @@ uniqs@^2.0.0: resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= +unique-filename@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-2.0.1.tgz#e785f8675a9a7589e0ac77e0b5c34d2eaeac6da2" + integrity sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A== + dependencies: + unique-slug "^3.0.0" + +unique-slug@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-3.0.0.tgz#6d347cf57c8a7a7a6044aabd0e2d74e4d76dc7c9" + integrity sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w== + dependencies: + imurmurhash "^0.1.4" + universal-user-agent@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" @@ -11895,6 +12364,13 @@ wide-align@1.1.3, wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" +wide-align@^1.1.2, wide-align@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" + wildcard@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" From c911d2b363d81920f470a59713ba212dae157b65 Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Thu, 19 Oct 2023 21:44:47 -0700 Subject: [PATCH 02/16] will files be present in build --- .../static-data-files/vaPoliceData/index.js | 20 ++++++++++++------- .../vaPoliceData/pre-contact-police.csv | 3 +++ .../vaPoliceData/pre-events-police.csv | 7 +++++++ 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-contact-police.csv create mode 100644 src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-events-police.csv diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js index 1b3c52987d..2269879522 100644 --- a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js @@ -15,6 +15,7 @@ const query = (inputs, outputFilenames) => async () => { if (inputs.length !== outputFilenames.length) { throw new Error('inputs and output_filenames must be the same length'); } + const outputData = []; for await (const io of zip(inputs, outputFilenames)) { if (typeof io[0] !== 'string') { throw new Error('inputs must be an array of strings'); @@ -24,20 +25,25 @@ const query = (inputs, outputFilenames) => async () => { } if (/https?|file:\/\//.test(io[0])) { const { data } = await curly.get(io[0]); - fs.writeFileSync(path.join(__dirname, io[1]), data); + outputData.push(data); } } - return outputFilenames; + return { outputFilenames, outputData }; }; /* eslint-disable camelcase */ const postProcess = async queryResult => { - log({ POLICE: JSON.stringify(queryResult) }); + log({ POLICE: queryResult }); const processedJSON = {}; - for await (const csvFilePath of queryResult) { - const data = await csv().fromFile(csvFilePath); - log(data); - } + const [contact, events] = queryResult.outputData; + const contactFile = path.join(__dirname, 'pre-contact-police.csv'); + const eventsFile = path.join(__dirname, 'pre-events-police.csv'); + fs.writeFileSync(contactFile, contact); + fs.writeFileSync(eventsFile, events); + const jsonContact = await csv().fromFile(contactFile); + const jsonEvents = await csv().fromFile(eventsFile); + log(jsonContact); + log(jsonEvents); return processedJSON; }; diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-contact-police.csv b/src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-contact-police.csv new file mode 100644 index 0000000000..bb077b38f6 --- /dev/null +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-contact-police.csv @@ -0,0 +1,3 @@ +facility_id,contact_name,contact_number +vha_011,Abc Jameson,1234567890 +vha_021,Xyz Adamson,1123456789 diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-events-police.csv b/src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-events-police.csv new file mode 100644 index 0000000000..df790c0066 --- /dev/null +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-events-police.csv @@ -0,0 +1,7 @@ +date_range,facility_id,a,b,c +2021-01-01:2021-12-31,vha_011,2,3,4 +2022-01-01:2022-12-31,vha_011,3,4,5 +2023-01-01:2023-10-10,vha_011,1,1,1 +2021-01-01:2021-12-31,vha_021,1,3,1 +2022-01-01:2022-12-31,vha_021,2,0,1 +2023-01-01:2023-10-10,vha_021,0,1,0 \ No newline at end of file From 296b0bda32278cf4de9eb8a909b48b6558c8cbdb Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Thu, 19 Oct 2023 21:50:12 -0700 Subject: [PATCH 03/16] force overwrite --- .../build/drupal/static-data-files/vaPoliceData/index.js | 4 ++-- .../drupal/static-data-files/vaPoliceData/police-contact.csv | 4 ++-- .../static-data-files/vaPoliceData/pre-contact-police.csv | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js index 2269879522..f7c9e37e8a 100644 --- a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js @@ -38,8 +38,8 @@ const postProcess = async queryResult => { const [contact, events] = queryResult.outputData; const contactFile = path.join(__dirname, 'pre-contact-police.csv'); const eventsFile = path.join(__dirname, 'pre-events-police.csv'); - fs.writeFileSync(contactFile, contact); - fs.writeFileSync(eventsFile, events); + fs.writeFileSync(contactFile, contact, { append: false }); + fs.writeFileSync(eventsFile, events, { append: false }); const jsonContact = await csv().fromFile(contactFile); const jsonEvents = await csv().fromFile(eventsFile); log(jsonContact); diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/police-contact.csv b/src/site/stages/build/drupal/static-data-files/vaPoliceData/police-contact.csv index bb077b38f6..da9c0203e5 100644 --- a/src/site/stages/build/drupal/static-data-files/vaPoliceData/police-contact.csv +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/police-contact.csv @@ -1,3 +1,3 @@ facility_id,contact_name,contact_number -vha_011,Abc Jameson,1234567890 -vha_021,Xyz Adamson,1123456789 +vha_011,Abc Jameson,1234567899 +vha_021,Xyz Adamson,1123456799 diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-contact-police.csv b/src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-contact-police.csv index bb077b38f6..da9c0203e5 100644 --- a/src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-contact-police.csv +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/pre-contact-police.csv @@ -1,3 +1,3 @@ facility_id,contact_name,contact_number -vha_011,Abc Jameson,1234567890 -vha_021,Xyz Adamson,1123456789 +vha_011,Abc Jameson,1234567899 +vha_021,Xyz Adamson,1123456799 From 0a9c260d252fb553eac45db55842251275f6710b Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Thu, 19 Oct 2023 23:09:16 -0700 Subject: [PATCH 04/16] clean up --- .../build/drupal/static-data-files/config.js | 22 +++++++-------- .../static-data-files/vaPoliceData/index.js | 27 +++++++------------ 2 files changed, 20 insertions(+), 29 deletions(-) diff --git a/src/site/stages/build/drupal/static-data-files/config.js b/src/site/stages/build/drupal/static-data-files/config.js index 71760ae0ea..3421a3fbb0 100644 --- a/src/site/stages/build/drupal/static-data-files/config.js +++ b/src/site/stages/build/drupal/static-data-files/config.js @@ -32,29 +32,29 @@ const DATA_FILES = [ description: 'VAMC EHR System', filename: 'vamc-ehr.json', query: queryVamcEhrSystem, + queryType: 'graphql', postProcess: postProcessVamcEhrSystem, }, { description: 'VAMC Facility Supplemental Status', filename: 'vamc-facility-supplemental-status.json', query: queryVamcFacilitySupplementalStatus, + queryType: 'graphql', postProcess: postProcessVamcFacilitySupplementalStatus, }, { description: 'VA Police Data', filename: 'va-police.json', queryType: 'curl', - query: queryVAPoliceData( - [ - url - .pathToFileURL(join(__dirname, 'vaPoliceData', 'police-contact.csv')) - .toString(), - url - .pathToFileURL(join(__dirname, 'vaPoliceData', 'police-events.csv')) - .toString(), - ], - ['pre-police-contact.csv', 'pre-police-violations.csv'], - ), + // This looks like a highly complicated route to get the file data, but it is generalizeable to all CURL requests, not just file URLs + query: queryVAPoliceData([ + url + .pathToFileURL(join(__dirname, 'vaPoliceData', 'police-contact.csv')) + .toString(), + url + .pathToFileURL(join(__dirname, 'vaPoliceData', 'police-events.csv')) + .toString(), + ]), postProcess: postProcessVAPoliceData, }, ]; diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js index f7c9e37e8a..e91dc0c90b 100644 --- a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js @@ -1,49 +1,40 @@ const { curly } = require('node-libcurl'); -const { zip } = require('lodash'); const fs = require('fs'); const csv = require('csvtojson'); const path = require('path'); const { logDrupal: log } = require('../../utilities-drupal'); -const query = (inputs, outputFilenames) => async () => { +const query = inputs => async () => { if (!Array.isArray(inputs)) { throw new Error('inputs must be an array'); } - if (!Array.isArray(outputFilenames)) { - throw new Error('output_filenames must be an array'); - } - if (inputs.length !== outputFilenames.length) { - throw new Error('inputs and output_filenames must be the same length'); - } const outputData = []; - for await (const io of zip(inputs, outputFilenames)) { - if (typeof io[0] !== 'string') { + for await (const input of inputs) { + if (typeof input !== 'string') { throw new Error('inputs must be an array of strings'); } - if (typeof io[1] !== 'string') { - throw new Error('output_filenames must be an array of strings'); - } - if (/https?|file:\/\//.test(io[0])) { - const { data } = await curly.get(io[0]); + if (/https?|file:\/\//.test(input)) { + const { data } = await curly.get(input); outputData.push(data); } } - return { outputFilenames, outputData }; + return outputData; }; /* eslint-disable camelcase */ const postProcess = async queryResult => { - log({ POLICE: queryResult }); const processedJSON = {}; - const [contact, events] = queryResult.outputData; + const [contact, events] = queryResult; const contactFile = path.join(__dirname, 'pre-contact-police.csv'); const eventsFile = path.join(__dirname, 'pre-events-police.csv'); + // Unfortunately there's no Buffer or file-string support in csvtojson, there's read and process per-line, but this is more efficient. fs.writeFileSync(contactFile, contact, { append: false }); fs.writeFileSync(eventsFile, events, { append: false }); const jsonContact = await csv().fromFile(contactFile); const jsonEvents = await csv().fromFile(eventsFile); log(jsonContact); log(jsonEvents); + // TODO: Process jsonEvents and Join data with contact info for a Facility Police Page content return processedJSON; }; From b6ad5db0744155dbd72410d1bdc5da34412da673 Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Fri, 20 Oct 2023 14:51:47 -0700 Subject: [PATCH 05/16] rm the cached files not the directory --- .../drupal/static-data-files/generate.js | 21 ++++++++++++------- .../static-data-files/vaPoliceData/index.js | 1 - 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/site/stages/build/drupal/static-data-files/generate.js b/src/site/stages/build/drupal/static-data-files/generate.js index 99727d1d6d..74204e5fd9 100644 --- a/src/site/stages/build/drupal/static-data-files/generate.js +++ b/src/site/stages/build/drupal/static-data-files/generate.js @@ -78,7 +78,6 @@ const writeProcessedDataFilesToCache = ( processedDataFiles, ) => { const fullCacheFilepath = getDrupalCachePath(buildOptions, cacheFilepath); - fs.rmSync(fullCacheFilepath, { recursive: true, force: true }); const successfulDataFiles = processedDataFiles.filter( ({ error }) => error === undefined, @@ -88,7 +87,12 @@ const writeProcessedDataFilesToCache = ( return; } + const newSuccessful = [...successfulDataFiles]; const configCacheFilenameWithPath = `${fullCacheFilepath}/${cacheConfigFilename}`; + if (fs.existsSync(configCacheFilenameWithPath)) { + const existingConfig = fs.readJSONSync(configCacheFilenameWithPath); + successfulDataFiles.push(...existingConfig); + } fs.outputJSON( configCacheFilenameWithPath, successfulDataFiles.map(({ description, filename }) => ({ @@ -96,11 +100,16 @@ const writeProcessedDataFilesToCache = ( filename, })), { + append: false, spaces: 2, }, ); - - successfulDataFiles.forEach(({ filename, data }) => { + for (const processedData of newSuccessful) { + fs.rmSync(`${fullCacheFilepath}/${processedData.filename}`, { + force: true, + }); + } + newSuccessful.forEach(({ filename, data }) => { writeProcessedDataFileToCache(fullCacheFilepath, filename, data); }); }; @@ -161,7 +170,6 @@ const processGraphQLDataFile = async ( error: json.error, }; } - return { ...baseResult, data: postProcess ? postProcess(json) : json, @@ -185,11 +193,11 @@ const pullDataFileContentFromCurls = async ( }; const pullGraphQLDataFileContentFromDrupal = async ( - _dataFiles, + dataFiles, buildOptions, onlyPublishedContent, ) => { - const graphQLDataFiles = DATA_FILES.filter(isQueryTypeGraphQL); + const graphQLDataFiles = dataFiles.filter(isQueryTypeGraphQL); const graphQLApiClient = getApiClient(buildOptions); return Promise.all( graphQLDataFiles.map(dataFile => @@ -385,7 +393,6 @@ const generateStaticDataFilesFromDrupal = async ( buildOptions, onlyPublishedContent, ); - writeProcessedDataFilesToCache( buildOptions, DRUPAL_CACHE_STATIC_DATA_FILEPATH, diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js index e91dc0c90b..fdb68e275f 100644 --- a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js @@ -21,7 +21,6 @@ const query = inputs => async () => { return outputData; }; -/* eslint-disable camelcase */ const postProcess = async queryResult => { const processedJSON = {}; const [contact, events] = queryResult; From 51a4e40d337816d35ed5be0c78f35ed51285f24f Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Fri, 20 Oct 2023 16:19:09 -0700 Subject: [PATCH 06/16] working multiple file writes --- .../drupal/static-data-files/generate.js | 95 +++++-------------- .../plugins/generate-static-data-files.js | 3 +- 2 files changed, 26 insertions(+), 72 deletions(-) diff --git a/src/site/stages/build/drupal/static-data-files/generate.js b/src/site/stages/build/drupal/static-data-files/generate.js index 74204e5fd9..6d7859bfb8 100644 --- a/src/site/stages/build/drupal/static-data-files/generate.js +++ b/src/site/stages/build/drupal/static-data-files/generate.js @@ -184,11 +184,11 @@ const processGraphQLDataFile = async ( }; const pullDataFileContentFromCurls = async ( - _dataFiles, + dataFiles, _buildOptions, _onlyPublishedContent, ) => { - const curlFiles = DATA_FILES.filter(isQueryTypeCurl); + const curlFiles = dataFiles.filter(isQueryTypeCurl); return Promise.all(curlFiles.map(dataFile => processCurlDataFile(dataFile))); }; @@ -231,6 +231,24 @@ const pullDataFileContentFromCurl = async ( ); }; +const pullDataFileContent = async ( + dataFiles, + buildOptions, + onlyPublishedContent, +) => { + const curls = await pullDataFileContentFromCurl( + dataFiles, + buildOptions, + onlyPublishedContent, + ); + const drupal = await pullDataFileContentFromDrupal( + dataFiles, + buildOptions, + onlyPublishedContent, + ); + return curls.concat(drupal); +}; + const readProcessedDataFileFromCache = async (path, filename) => { const filenameWithPath = `${path}/${filename}`; return fs.readJSON(filenameWithPath); @@ -285,67 +303,6 @@ const pullDataFileContentFromCache = async ( ), ); }; -const generateStaticDataFilesFromCurl = async ( - files, - buildOptions, - onlyPublishedContent = true, -) => { - if (!ENABLED_ENVIRONMENTS.has(buildOptions.buildtype)) { - logDrupal( - `Drupal integration disabled for buildtype ${buildOptions.buildtype}`, - ); - return; - } - let processedJsonDataFiles = []; - // Pull static-data-file content from Drupal - if (shouldPullDrupal(buildOptions, DRUPAL_CACHE_STATIC_DATA_FILEPATH)) { - logDrupal( - `Generating static data files from Drupal at ${buildOptions['drupal-address']}.`, - ); - - if (!Array.isArray(DATA_FILES)) { - logDrupal( - 'Malformed static-data-file configuration at src/site/stages/build/drupal/static-data-files/config.js.', - ); - logDrupal('Static data files cannot be generated.'); - return; - } - - if (DATA_FILES.length === 0) { - logDrupal('No static data files configured for Drupal.'); - logDrupal('Static data files cannot be generated.'); - return; - } - - processedJsonDataFiles = await pullDataFileContentFromCurl( - DATA_FILES, - buildOptions, - onlyPublishedContent, - ); - - writeProcessedDataFilesToCache( - buildOptions, - DRUPAL_CACHE_STATIC_DATA_FILEPATH, - DRUPAL_CACHE_CONFIG_FILENAME, - processedJsonDataFiles, - ); - } - - // Read static-data-file content from cache - else { - logDrupal('Generating static data files from cache.'); - logDrupal(`To pull latest, run with "--${PULL_DRUPAL_BUILD_ARG}" flag.`); - - processedJsonDataFiles = await pullDataFileContentFromCache( - buildOptions, - DRUPAL_CACHE_STATIC_DATA_FILEPATH, - DRUPAL_CACHE_CONFIG_FILENAME, - ); - } - - // Write processed data files to build output - writeProcessedDataFilesToBuild(files, DATA_FILE_PATH, processedJsonDataFiles); -}; /** * Generates static data files defined at ../config.js @@ -354,7 +311,7 @@ const generateStaticDataFilesFromCurl = async ( * --pull-drupal is used * Cache cannot be found */ -const generateStaticDataFilesFromDrupal = async ( +const generateStaticDataFiles = async ( files, buildOptions, onlyPublishedContent = true, @@ -365,13 +322,11 @@ const generateStaticDataFilesFromDrupal = async ( ); return; } - let processedJsonDataFiles = []; - // Pull static-data-file content from Drupal if (shouldPullDrupal(buildOptions, DRUPAL_CACHE_STATIC_DATA_FILEPATH)) { logDrupal( - `Generating static data files from Drupal at ${buildOptions['drupal-address']}.`, + `Generating static data files from all sources, including ${buildOptions['drupal-address']}.`, ); if (!Array.isArray(DATA_FILES)) { @@ -388,11 +343,12 @@ const generateStaticDataFilesFromDrupal = async ( return; } - processedJsonDataFiles = await pullDataFileContentFromDrupal( + processedJsonDataFiles = await pullDataFileContent( DATA_FILES, buildOptions, onlyPublishedContent, ); + writeProcessedDataFilesToCache( buildOptions, DRUPAL_CACHE_STATIC_DATA_FILEPATH, @@ -417,5 +373,4 @@ const generateStaticDataFilesFromDrupal = async ( writeProcessedDataFilesToBuild(files, DATA_FILE_PATH, processedJsonDataFiles); }; -module.exports.generateStaticDataFilesFromDrupal = generateStaticDataFilesFromDrupal; -module.exports.generateStaticDataFilesFromCurl = generateStaticDataFilesFromCurl; +module.exports.generateStaticDataFiles = generateStaticDataFiles; diff --git a/src/site/stages/build/plugins/generate-static-data-files.js b/src/site/stages/build/plugins/generate-static-data-files.js index 338babe349..a005930331 100644 --- a/src/site/stages/build/plugins/generate-static-data-files.js +++ b/src/site/stages/build/plugins/generate-static-data-files.js @@ -2,8 +2,7 @@ const generate = require('../drupal/static-data-files/generate'); const generateStaticDataFiles = buildOptions => { return async (files, metalsmith, done) => { - await generate.generateStaticDataFilesFromDrupal(files, buildOptions); - await generate.generateStaticDataFilesFromCurl(files, buildOptions); + await generate.generateStaticDataFiles(files, buildOptions); done(); }; }; From 33583ba71c51cda92fd6ec00208166d95c6fe6dc Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Fri, 20 Oct 2023 16:49:59 -0700 Subject: [PATCH 07/16] temporarily remove testing of components that do not seem to be accessible in content-build at the moment --- src/site/includes/tests/homepage.cypress.spec.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/site/includes/tests/homepage.cypress.spec.js b/src/site/includes/tests/homepage.cypress.spec.js index 8f25196976..275bfc2342 100644 --- a/src/site/includes/tests/homepage.cypress.spec.js +++ b/src/site/includes/tests/homepage.cypress.spec.js @@ -81,10 +81,12 @@ describe('home page', () => { verifyElement('#vetnav'); verifyElement('.va-crisis-line'); - verifyElement('[data-e2e-id="va-benefits-and-health-care-0"]'); - verifyElement('[data-e2e-id="about-va-1"]'); - verifyElement('[data-e2e-id="find-a-va-location-2"]'); - verifyElement('[data-e2e-id="my-va-3"]'); + // TODO: Commented out because CI pipelines failing with them in + // Possibly related to a PR in vets-website not in prod yet + // verifyElement('[data-e2e-id="va-benefits-and-health-care-0"]'); + // verifyElement('[data-e2e-id="about-va-1"]'); + // verifyElement('[data-e2e-id="find-a-va-location-2"]'); + // verifyElement('[data-e2e-id="my-va-3"]'); }); // Hero ======================================================= From 1461ea703abbe2813b5a4be68f102c609f6a8c66 Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Fri, 20 Oct 2023 16:57:42 -0700 Subject: [PATCH 08/16] removed element --- src/site/includes/tests/homepage.cypress.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/site/includes/tests/homepage.cypress.spec.js b/src/site/includes/tests/homepage.cypress.spec.js index 275bfc2342..f4b3aac7fc 100644 --- a/src/site/includes/tests/homepage.cypress.spec.js +++ b/src/site/includes/tests/homepage.cypress.spec.js @@ -83,9 +83,9 @@ describe('home page', () => { // TODO: Commented out because CI pipelines failing with them in // Possibly related to a PR in vets-website not in prod yet - // verifyElement('[data-e2e-id="va-benefits-and-health-care-0"]'); - // verifyElement('[data-e2e-id="about-va-1"]'); - // verifyElement('[data-e2e-id="find-a-va-location-2"]'); + verifyElement('[data-e2e-id="va-benefits-and-health-care-0"]'); + verifyElement('[data-e2e-id="about-va-1"]'); + verifyElement('[data-e2e-id="find-a-va-location-2"]'); // verifyElement('[data-e2e-id="my-va-3"]'); }); From b86706861f0489239d5043e24d43a279d9b0d12d Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Fri, 20 Oct 2023 17:01:04 -0700 Subject: [PATCH 09/16] revert so PR to address will be handled --- src/site/includes/tests/homepage.cypress.spec.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/site/includes/tests/homepage.cypress.spec.js b/src/site/includes/tests/homepage.cypress.spec.js index f4b3aac7fc..8f25196976 100644 --- a/src/site/includes/tests/homepage.cypress.spec.js +++ b/src/site/includes/tests/homepage.cypress.spec.js @@ -81,12 +81,10 @@ describe('home page', () => { verifyElement('#vetnav'); verifyElement('.va-crisis-line'); - // TODO: Commented out because CI pipelines failing with them in - // Possibly related to a PR in vets-website not in prod yet verifyElement('[data-e2e-id="va-benefits-and-health-care-0"]'); verifyElement('[data-e2e-id="about-va-1"]'); verifyElement('[data-e2e-id="find-a-va-location-2"]'); - // verifyElement('[data-e2e-id="my-va-3"]'); + verifyElement('[data-e2e-id="my-va-3"]'); }); // Hero ======================================================= From be0aa055a55d10e4f391e1ec5545d87944b17f7c Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Sun, 22 Oct 2023 00:01:48 -0700 Subject: [PATCH 10/16] testing --- config/cypress.config.js | 2 ++ package.json | 2 ++ .../testing/e2e/cypress/plugins/index.js | 12 ++++++- .../e2e/cypress/support/commands/index.js | 5 +++ .../build/drupal/static-data-files/config.js | 4 +-- .../drupal/static-data-files/generate.js | 10 +++++- .../static-files-exist.cypress.spec.js | 36 +++++++++++++++++++ yarn.lock | 31 +++++++++++++++- 8 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 src/site/tests/static-files/static-files-exist.cypress.spec.js diff --git a/config/cypress.config.js b/config/cypress.config.js index 93822357ba..6e37fd5677 100644 --- a/config/cypress.config.js +++ b/config/cypress.config.js @@ -11,6 +11,8 @@ module.exports = defineConfig({ runMode: 2, openMode: 0, }, + downloadsFolder: '../cypress/downloads', + trashAssetsBeforeRuns: true, e2e: { // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. diff --git a/package.json b/package.json index 0edac61ee3..aca5b62fc9 100644 --- a/package.json +++ b/package.json @@ -130,6 +130,8 @@ "cy-mobile-commands": "^0.3.0", "cypress": "^10.8.0", "cypress-axe": "^1.0.0", + "cypress-delete-downloads-folder": "^0.0.4", + "cypress-downloadfile": "^1.2.3", "cypress-multi-reporters": "^1.5.0", "cypress-plugin-tab": "^1.0.5", "cypress-real-events": "^1.7.1", diff --git a/src/platform/testing/e2e/cypress/plugins/index.js b/src/platform/testing/e2e/cypress/plugins/index.js index f3a3b778e0..760b7616a1 100644 --- a/src/platform/testing/e2e/cypress/plugins/index.js +++ b/src/platform/testing/e2e/cypress/plugins/index.js @@ -1,6 +1,7 @@ const fs = require('fs-extra'); const path = require('path'); -const table = require('table').table; +const { table } = require('table'); +const { downloadFile } = require('cypress-downloadfile/lib/addPlugin'); const tableConfig = { columns: { @@ -76,5 +77,14 @@ module.exports = on => { return dir; }, + downloadFile, + deleteFileOrFolder(fileOrFolderName) { + if (fs.existsSync(fileOrFolderName)) { + fs.rmSync(fileOrFolderName, { + recursive: true, + }); + } + return null; + }, }); }; diff --git a/src/platform/testing/e2e/cypress/support/commands/index.js b/src/platform/testing/e2e/cypress/support/commands/index.js index ce7bf9ee05..f7af90cb46 100644 --- a/src/platform/testing/e2e/cypress/support/commands/index.js +++ b/src/platform/testing/e2e/cypress/support/commands/index.js @@ -6,3 +6,8 @@ import './hasCount'; import './keyboard'; import 'cy-mobile-commands'; import 'cypress-wait-until'; +import 'cypress-downloadfile/lib/downloadFileCommand'; + +Cypress.Commands.add('deleteFileOrFolder', folderOrFileName => { + return cy.task('deleteFileOrFolder', folderOrFileName); +}); diff --git a/src/site/stages/build/drupal/static-data-files/config.js b/src/site/stages/build/drupal/static-data-files/config.js index 3421a3fbb0..d9d6288b00 100644 --- a/src/site/stages/build/drupal/static-data-files/config.js +++ b/src/site/stages/build/drupal/static-data-files/config.js @@ -43,8 +43,8 @@ const DATA_FILES = [ postProcess: postProcessVamcFacilitySupplementalStatus, }, { - description: 'VA Police Data', - filename: 'va-police.json', + description: 'VAMC Police Data', + filename: 'vamc-police.json', queryType: 'curl', // This looks like a highly complicated route to get the file data, but it is generalizeable to all CURL requests, not just file URLs query: queryVAPoliceData([ diff --git a/src/site/stages/build/drupal/static-data-files/generate.js b/src/site/stages/build/drupal/static-data-files/generate.js index 6d7859bfb8..94ec83da71 100644 --- a/src/site/stages/build/drupal/static-data-files/generate.js +++ b/src/site/stages/build/drupal/static-data-files/generate.js @@ -324,7 +324,15 @@ const generateStaticDataFiles = async ( } let processedJsonDataFiles = []; // Pull static-data-file content from Drupal - if (shouldPullDrupal(buildOptions, DRUPAL_CACHE_STATIC_DATA_FILEPATH)) { + // if any of the files are missing from cache + if ( + DATA_FILES.some(df => + shouldPullDrupal( + buildOptions, + `${DRUPAL_CACHE_STATIC_DATA_FILEPATH}/${df.filename}`, + ), + ) + ) { logDrupal( `Generating static data files from all sources, including ${buildOptions['drupal-address']}.`, ); diff --git a/src/site/tests/static-files/static-files-exist.cypress.spec.js b/src/site/tests/static-files/static-files-exist.cypress.spec.js new file mode 100644 index 0000000000..8d8918bfc1 --- /dev/null +++ b/src/site/tests/static-files/static-files-exist.cypress.spec.js @@ -0,0 +1,36 @@ +// Cypress test for checking that the static data files exist +describe('Static Data Files Test', () => { + /* This is not a visual test -- no accessibility involvement */ + /* eslint-disable @department-of-veterans-affairs/axe-check-required */ + it('has the EHR JSON static file', () => { + cy.deleteFileOrFolder('../cypress/downloads/vamc-ehr.json'); + cy.downloadFile( + 'http://localhost:3002/data/cms/vamc-ehr.json', + '../cypress/downloads', + 'vamc-ehr.json', + ); + cy.readFile('cypress/downloads/vamc-ehr.json').should('exist'); + }); + it('has the Supplemental Status JSON static file', () => { + cy.deleteFileOrFolder( + '../cypress/downloads/vamc-facility-supplemental-status.json', + ); + cy.downloadFile( + 'http://localhost:3002/data/cms/vamc-facility-supplemental-status.json', + '../cypress/downloads', + 'vamc-facility-supplemental-status.json', + ); + cy.readFile( + 'cypress/downloads/vamc-facility-supplemental-status.json', + ).should('exist'); + }); + it('has the VAMC Police JSON static file', () => { + cy.deleteFileOrFolder('../cypress/downloads/vamc-police.json'); + cy.downloadFile( + 'http://localhost:3002/data/cms/vamc-police.json', + '../cypress/downloads', + 'vamc-police.json', + ); + cy.readFile('cypress/downloads/vamc-police.json').should('exist'); + }); +}); diff --git a/yarn.lock b/yarn.lock index 9ed30056f4..527140cf32 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3518,6 +3518,13 @@ create-eslint-index@^1.0.0: dependencies: lodash.get "^4.3.0" +cross-fetch@^3.1.5: + version "3.1.8" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" + integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== + dependencies: + node-fetch "^2.6.12" + cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -3737,6 +3744,19 @@ cypress-axe@^1.0.0: resolved "https://registry.yarnpkg.com/cypress-axe/-/cypress-axe-1.0.0.tgz#ab4e9486eaa3bb956a90a1ae40d52df42827b4f0" integrity sha512-QBlNMAd5eZoyhG8RGGR/pLtpHGkvgWXm2tkP68scJ+AjYiNNOlJihxoEwH93RT+rWOLrefw4iWwEx8kpEcrvJA== +cypress-delete-downloads-folder@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/cypress-delete-downloads-folder/-/cypress-delete-downloads-folder-0.0.4.tgz#00693d4d7a36b552e7a11148e49d2c4c34ed3ec3" + integrity sha512-0zix5YIROeMHCrCGQVmMP+jUL3KtKliAs1msSnHCPwkX8rNL4DioI8UHvbBVVghWA3vxWN6GCtV1qW+5DHi9Bg== + +cypress-downloadfile@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/cypress-downloadfile/-/cypress-downloadfile-1.2.3.tgz#af4b23ec055732a60d0c09e76e28a50a7bfe8c1a" + integrity sha512-XvjMi081VJPs8gdmITHLpdbcscW8HHlTpIuKBqqFTRnIqPqcsjaZfJ22tqqDSr5w4X9T5FPFfr4SiklPsfoXiw== + dependencies: + cross-fetch "^3.1.5" + fs-extra "10.1.0" + cypress-multi-reporters@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/cypress-multi-reporters/-/cypress-multi-reporters-1.5.0.tgz#fff2758c082b49e8b91fed39f9650c70bc06de0d" @@ -5508,6 +5528,15 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-extra@10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" @@ -8417,7 +8446,7 @@ nise@^1.0.1: lolex "^5.0.1" path-to-regexp "^1.7.0" -node-fetch@^1.0.1, node-fetch@^2.6.1, node-fetch@^2.6.7: +node-fetch@^1.0.1, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== From 328786b8b6aab6992a266f01b65bdb151fcb65b2 Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Sun, 22 Oct 2023 00:03:49 -0700 Subject: [PATCH 11/16] remove delete dep and use self-written one --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index aca5b62fc9..a446a41886 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,6 @@ "cy-mobile-commands": "^0.3.0", "cypress": "^10.8.0", "cypress-axe": "^1.0.0", - "cypress-delete-downloads-folder": "^0.0.4", "cypress-downloadfile": "^1.2.3", "cypress-multi-reporters": "^1.5.0", "cypress-plugin-tab": "^1.0.5", @@ -271,4 +270,4 @@ "**/uglify-js": "^2.2.24", "**/ansi-regex": "^4.1.1" } -} +} \ No newline at end of file From cccaa10fd3d379f5be457ff289b83cff9634a83d Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Thu, 26 Oct 2023 06:56:28 -0700 Subject: [PATCH 12/16] remove changes to cypress config --- config/cypress.config.js | 2 -- .../stages/build/drupal/static-data-files/vaPoliceData/index.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/config/cypress.config.js b/config/cypress.config.js index 6e37fd5677..93822357ba 100644 --- a/config/cypress.config.js +++ b/config/cypress.config.js @@ -11,8 +11,6 @@ module.exports = defineConfig({ runMode: 2, openMode: 0, }, - downloadsFolder: '../cypress/downloads', - trashAssetsBeforeRuns: true, e2e: { // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js index fdb68e275f..6550de34f2 100644 --- a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js @@ -22,7 +22,7 @@ const query = inputs => async () => { }; const postProcess = async queryResult => { - const processedJSON = {}; + const processedJSON = { data: { statistics: {}, contacts: {} } }; const [contact, events] = queryResult; const contactFile = path.join(__dirname, 'pre-contact-police.csv'); const eventsFile = path.join(__dirname, 'pre-events-police.csv'); From 56487a7cdd43e71bee22258eb07aa87eed1ef8d9 Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Fri, 27 Oct 2023 14:33:18 -0700 Subject: [PATCH 13/16] switched to Curl from curly for future Socks handling --- .../testing/e2e/cypress/plugins/index.js | 9 +++-- .../e2e/cypress/support/commands/index.js | 8 +++-- .../drupal/static-data-files/generate.js | 20 +++-------- .../static-data-files/vaPoliceData/index.js | 36 ++++++++++++++----- .../static-files-exist.cypress.spec.js | 14 ++++++-- 5 files changed, 56 insertions(+), 31 deletions(-) diff --git a/src/platform/testing/e2e/cypress/plugins/index.js b/src/platform/testing/e2e/cypress/plugins/index.js index 760b7616a1..a95cbe6708 100644 --- a/src/platform/testing/e2e/cypress/plugins/index.js +++ b/src/platform/testing/e2e/cypress/plugins/index.js @@ -78,13 +78,16 @@ module.exports = on => { return dir; }, downloadFile, - deleteFileOrFolder(fileOrFolderName) { - if (fs.existsSync(fileOrFolderName)) { - fs.rmSync(fileOrFolderName, { + deleteFileOrDir(fileOrDirName) { + if (fs.existsSync(fileOrDirName)) { + fs.rmSync(fileOrDirName, { recursive: true, }); } return null; }, + fileOrDirExists(fileOrDirName) { + return fs.existsSync(fileOrDirName); + }, }); }; diff --git a/src/platform/testing/e2e/cypress/support/commands/index.js b/src/platform/testing/e2e/cypress/support/commands/index.js index f7af90cb46..638b86cd73 100644 --- a/src/platform/testing/e2e/cypress/support/commands/index.js +++ b/src/platform/testing/e2e/cypress/support/commands/index.js @@ -8,6 +8,10 @@ import 'cy-mobile-commands'; import 'cypress-wait-until'; import 'cypress-downloadfile/lib/downloadFileCommand'; -Cypress.Commands.add('deleteFileOrFolder', folderOrFileName => { - return cy.task('deleteFileOrFolder', folderOrFileName); +Cypress.Commands.add('deleteFileOrDir', fileOrDirName => { + return cy.task('deleteFileOrDir', fileOrDirName); +}); + +Cypress.Commands.add('fileOrDirExists', fileOrDirName => { + return cy.task('fileOrDirExists', fileOrDirName); }); diff --git a/src/site/stages/build/drupal/static-data-files/generate.js b/src/site/stages/build/drupal/static-data-files/generate.js index 94ec83da71..0065a63cb6 100644 --- a/src/site/stages/build/drupal/static-data-files/generate.js +++ b/src/site/stages/build/drupal/static-data-files/generate.js @@ -188,8 +188,10 @@ const pullDataFileContentFromCurls = async ( _buildOptions, _onlyPublishedContent, ) => { - const curlFiles = dataFiles.filter(isQueryTypeCurl); - return Promise.all(curlFiles.map(dataFile => processCurlDataFile(dataFile))); + const curlDataFiles = dataFiles.filter(isQueryTypeCurl); + return Promise.all( + curlDataFiles.map(dataFile => processCurlDataFile(dataFile)), + ); }; const pullGraphQLDataFileContentFromDrupal = async ( @@ -219,24 +221,12 @@ const pullDataFileContentFromDrupal = async ( ); }; -const pullDataFileContentFromCurl = async ( - dataFiles, - buildOptions, - onlyPublishedContent, -) => { - return pullDataFileContentFromCurls( - dataFiles, - buildOptions, - onlyPublishedContent, - ); -}; - const pullDataFileContent = async ( dataFiles, buildOptions, onlyPublishedContent, ) => { - const curls = await pullDataFileContentFromCurl( + const curls = await pullDataFileContentFromCurls( dataFiles, buildOptions, onlyPublishedContent, diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js index 6550de34f2..c9d7ccf70d 100644 --- a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js @@ -1,8 +1,7 @@ -const { curly } = require('node-libcurl'); +const { Curl } = require('node-libcurl'); const fs = require('fs'); const csv = require('csvtojson'); const path = require('path'); -const { logDrupal: log } = require('../../utilities-drupal'); const query = inputs => async () => { if (!Array.isArray(inputs)) { @@ -14,7 +13,23 @@ const query = inputs => async () => { throw new Error('inputs must be an array of strings'); } if (/https?|file:\/\//.test(input)) { - const { data } = await curly.get(input); + const curl = new Curl(); + curl.setOpt(Curl.option.URL, input); + if (input.endsWith('cms.va.gov')) { + curl.setOpt(Curl.option.PROXY, '127.0.0.1:2001'); + } + curl.setOpt(Curl.option.CUSTOMREQUEST, 'GET'); + + const data = await new Promise((resolve, reject) => { + curl.on('end', (statusCode, body) => { + resolve(body); + }); + curl.on('error', err => { + reject(err); + }); + curl.perform(); + }); + outputData.push(data); } } @@ -22,17 +37,22 @@ const query = inputs => async () => { }; const postProcess = async queryResult => { - const processedJSON = { data: { statistics: {}, contacts: {} } }; + const processedJSON = { + data: { + statistics: {}, + contacts: {}, + }, + }; const [contact, events] = queryResult; const contactFile = path.join(__dirname, 'pre-contact-police.csv'); const eventsFile = path.join(__dirname, 'pre-events-police.csv'); // Unfortunately there's no Buffer or file-string support in csvtojson, there's read and process per-line, but this is more efficient. fs.writeFileSync(contactFile, contact, { append: false }); fs.writeFileSync(eventsFile, events, { append: false }); - const jsonContact = await csv().fromFile(contactFile); - const jsonEvents = await csv().fromFile(eventsFile); - log(jsonContact); - log(jsonEvents); + // eslint-disable-next-line no-unused-vars + const contactsJson = await csv().fromFile(contactFile); + // eslint-disable-next-line no-unused-vars + const eventsJson = await csv().fromFile(eventsFile); // TODO: Process jsonEvents and Join data with contact info for a Facility Police Page content return processedJSON; }; diff --git a/src/site/tests/static-files/static-files-exist.cypress.spec.js b/src/site/tests/static-files/static-files-exist.cypress.spec.js index 8d8918bfc1..87a7eebcdd 100644 --- a/src/site/tests/static-files/static-files-exist.cypress.spec.js +++ b/src/site/tests/static-files/static-files-exist.cypress.spec.js @@ -3,7 +3,8 @@ describe('Static Data Files Test', () => { /* This is not a visual test -- no accessibility involvement */ /* eslint-disable @department-of-veterans-affairs/axe-check-required */ it('has the EHR JSON static file', () => { - cy.deleteFileOrFolder('../cypress/downloads/vamc-ehr.json'); + cy.deleteFileOrDir('../cypress/downloads/vamc-ehr.json'); + cy.fileOrDirExists('cypress/downloads/vamc-ehr.json').should('eq', false); cy.downloadFile( 'http://localhost:3002/data/cms/vamc-ehr.json', '../cypress/downloads', @@ -12,9 +13,12 @@ describe('Static Data Files Test', () => { cy.readFile('cypress/downloads/vamc-ehr.json').should('exist'); }); it('has the Supplemental Status JSON static file', () => { - cy.deleteFileOrFolder( + cy.deleteFileOrDir( '../cypress/downloads/vamc-facility-supplemental-status.json', ); + cy.fileOrDirExists( + 'cypress/downloads/vamc-facility-supplemental-status.json', + ).should('eq', false); cy.downloadFile( 'http://localhost:3002/data/cms/vamc-facility-supplemental-status.json', '../cypress/downloads', @@ -25,7 +29,11 @@ describe('Static Data Files Test', () => { ).should('exist'); }); it('has the VAMC Police JSON static file', () => { - cy.deleteFileOrFolder('../cypress/downloads/vamc-police.json'); + cy.deleteFileOrDir('../cypress/downloads/vamc-police.json'); + cy.fileOrDirExists('cypress/downloads/vamc-police.json').should( + 'eq', + false, + ); cy.downloadFile( 'http://localhost:3002/data/cms/vamc-police.json', '../cypress/downloads', From 5fbb05e866cf25bb3961f4816e3906dc6ad2f26e Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Fri, 27 Oct 2023 16:17:31 -0700 Subject: [PATCH 14/16] api --- .../drupal/static-data-files/fetchApi.js | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 src/site/stages/build/drupal/static-data-files/fetchApi.js diff --git a/src/site/stages/build/drupal/static-data-files/fetchApi.js b/src/site/stages/build/drupal/static-data-files/fetchApi.js new file mode 100644 index 0000000000..0c910b141f --- /dev/null +++ b/src/site/stages/build/drupal/static-data-files/fetchApi.js @@ -0,0 +1,106 @@ +const fetch = require('node-fetch'); +const fs = require('fs'); +const { fileURLToPath } = require('url'); +const chalk = require('chalk'); +const SocksProxyAgent = require('socks-proxy-agent'); +const syswidecas = require('syswide-cas'); + +const { blobFrom, Response } = fetch; + +export default async function fetchWrapper(url, options) { + if (url.startsWith('file:')) { + const filePath = fileURLToPath(url); + + if (!fs.existsSync(filePath)) { + return new Response(null, { status: 404, statusText: 'NOT FOUND' }); + } + const blob = await blobFrom(filePath, { type: 'application/octet-stream' }); + return new Response(blob, { status: 200, statusText: 'OK', url }); + } + return fetch(url, options); +} + +function encodeCredentials({ user, password }) { + const credentials = `${user}:${password}`; + return Buffer.from(credentials).toString('base64'); +} + +const defaultClientOptions = { verbose: true, maxParallelRequests: 15 }; + +function getCurlClient(buildOptions, clientOptionsArg) { + const buildArgs = { + address: buildOptions['drupal-address'], + user: buildOptions['drupal-user'], + password: buildOptions['drupal-password'], + maxParallelRequests: buildOptions['drupal-max-parallel-requests'], + }; + + Object.keys(buildArgs).forEach(key => { + if (!buildArgs[key]) delete buildArgs[key]; + }); + + const clientOptions = { ...defaultClientOptions, ...clientOptionsArg }; + + // Set up debug logging + // eslint-disable-next-line no-console + const say = clientOptions.verbose ? console.log : () => {}; + + // eslint-disable-next-line prefer-object-spread, no-undef + const drupalConfig = Object.assign({}, buildArgs); + const { address, user, password } = drupalConfig; + + const encodedCredentials = encodeCredentials({ user, password }); + const headers = { + Authorization: `Basic ${encodedCredentials}`, + 'Content-Type': 'application/json', + }; + const agent = new SocksProxyAgent('socks://127.0.0.1:2001'); + + return { + // We have to point to aws urls on Jenkins, so the only + // time we'll be using cms.va.gov addresses is locally, + // when we need a proxy + usingProxy: + /^https?:\/\/.*\.cms\.va\.gov$/.test(address) && + !buildOptions['no-drupal-proxy'], + + async proxyFetch(url, options = {}) { + if (this.usingProxy) { + // addCAs() is here because VA uses self-signed certificates with a + // non-globally trusted Root Certificate Authority and we need to + // tell our code to trust it, otherwise we get self-signed certificate errors. + syswidecas.addCAs([ + 'certs/VA-Internal-S2-RCA1-v1.pem', + 'certs/VA-Internal-S2-RCA2.pem', + ]); + } + + return fetchWrapper( + url, + // eslint-disable-next-line prefer-object-spread + Object.assign({}, options, { + agent: this.usingProxy ? agent : undefined, + }), + ); + }, + + async query(qargs) { + const { method, url, args } = qargs; + say(chalk.green(`Fetching ${url}`)); + const response = await this.proxyFetch(url, { + headers, + method: method || 'GET', + mode: 'cors', + body: JSON.stringify(args), + }); + + if (response.ok) { + return response.text(); + } + + throw new Error(`HTTP error: ${response.status}: ${response.statusText}`); + }, + }; +} + +module.exports = getCurlClient; From ef4318f9d17ded0641d61ab90dfc9e519aa23b24 Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Fri, 27 Oct 2023 17:20:02 -0700 Subject: [PATCH 15/16] working choice between files getting libcurl and URLs getting node-fetch --- package.json | 3 +- .../build/drupal/static-data-files/config.js | 12 +--- .../drupal/static-data-files/fetchApi.js | 65 +++++-------------- .../drupal/static-data-files/generate.js | 20 ++++-- .../static-data-files/vaPoliceData/index.js | 40 ++---------- yarn.lock | 17 +++-- 6 files changed, 52 insertions(+), 105 deletions(-) diff --git a/package.json b/package.json index a446a41886..28bd456e59 100644 --- a/package.json +++ b/package.json @@ -216,6 +216,7 @@ "dotenv": "^10.0.0", "express": "^4.17.1", "express-http-proxy": "^1.6.0", + "fetch-blob": "^4.0.0", "git-diff": "^2.0.6", "js-yaml": "^3.14.0", "jsesc": "^3.0.2", @@ -270,4 +271,4 @@ "**/uglify-js": "^2.2.24", "**/ansi-regex": "^4.1.1" } -} \ No newline at end of file +} diff --git a/src/site/stages/build/drupal/static-data-files/config.js b/src/site/stages/build/drupal/static-data-files/config.js index d9d6288b00..055d1a35d4 100644 --- a/src/site/stages/build/drupal/static-data-files/config.js +++ b/src/site/stages/build/drupal/static-data-files/config.js @@ -1,6 +1,3 @@ -const { join } = require('path'); -const url = require('url'); - const { query: queryVamcEhrSystem, postProcess: postProcessVamcEhrSystem, @@ -47,14 +44,7 @@ const DATA_FILES = [ filename: 'vamc-police.json', queryType: 'curl', // This looks like a highly complicated route to get the file data, but it is generalizeable to all CURL requests, not just file URLs - query: queryVAPoliceData([ - url - .pathToFileURL(join(__dirname, 'vaPoliceData', 'police-contact.csv')) - .toString(), - url - .pathToFileURL(join(__dirname, 'vaPoliceData', 'police-events.csv')) - .toString(), - ]), + query: queryVAPoliceData, postProcess: postProcessVAPoliceData, }, ]; diff --git a/src/site/stages/build/drupal/static-data-files/fetchApi.js b/src/site/stages/build/drupal/static-data-files/fetchApi.js index 0c910b141f..6a716838ca 100644 --- a/src/site/stages/build/drupal/static-data-files/fetchApi.js +++ b/src/site/stages/build/drupal/static-data-files/fetchApi.js @@ -1,21 +1,16 @@ const fetch = require('node-fetch'); -const fs = require('fs'); -const { fileURLToPath } = require('url'); -const chalk = require('chalk'); const SocksProxyAgent = require('socks-proxy-agent'); const syswidecas = require('syswide-cas'); +const { curly } = require('node-libcurl'); -const { blobFrom, Response } = fetch; +const { Response } = fetch; -export default async function fetchWrapper(url, options) { +// Uses fetch to make a request to a non-file URL or uses node-libcurl to make a request to a file URL +// Returns a node-fetch response in all cases +async function fetchWrapper(url, options) { if (url.startsWith('file:')) { - const filePath = fileURLToPath(url); - - if (!fs.existsSync(filePath)) { - return new Response(null, { status: 404, statusText: 'NOT FOUND' }); - } - const blob = await blobFrom(filePath, { type: 'application/octet-stream' }); - return new Response(blob, { status: 200, statusText: 'OK', url }); + const { data } = await curly.get(url); + return new Response(data, { status: 200, statusText: 'OK', url }); } return fetch(url, options); } @@ -25,11 +20,8 @@ function encodeCredentials({ user, password }) { return Buffer.from(credentials).toString('base64'); } -const defaultClientOptions = { verbose: true, maxParallelRequests: 15 }; - -function getCurlClient(buildOptions, clientOptionsArg) { +function getCurlClient(buildOptions, _clientOptionsArg = { verbose: true }) { const buildArgs = { - address: buildOptions['drupal-address'], user: buildOptions['drupal-user'], password: buildOptions['drupal-password'], maxParallelRequests: buildOptions['drupal-max-parallel-requests'], @@ -39,15 +31,7 @@ function getCurlClient(buildOptions, clientOptionsArg) { if (!buildArgs[key]) delete buildArgs[key]; }); - const clientOptions = { ...defaultClientOptions, ...clientOptionsArg }; - - // Set up debug logging - // eslint-disable-next-line no-console - const say = clientOptions.verbose ? console.log : () => {}; - - // eslint-disable-next-line prefer-object-spread, no-undef - const drupalConfig = Object.assign({}, buildArgs); - const { address, user, password } = drupalConfig; + const { user, password } = buildArgs; const encodedCredentials = encodeCredentials({ user, password }); const headers = { @@ -55,17 +39,17 @@ function getCurlClient(buildOptions, clientOptionsArg) { 'Content-Type': 'application/json', }; const agent = new SocksProxyAgent('socks://127.0.0.1:2001'); - return { // We have to point to aws urls on Jenkins, so the only // time we'll be using cms.va.gov addresses is locally, // when we need a proxy - usingProxy: - /^https?:\/\/.*\.cms\.va\.gov$/.test(address) && - !buildOptions['no-drupal-proxy'], - async proxyFetch(url, options = {}) { - if (this.usingProxy) { + async proxyFetch(url, options = { headers }) { + const usingProxy = + /^https?:\/\/.*\.cms\.va\.gov\//.test(url) && + !buildOptions['no-drupal-proxy']; + + if (usingProxy) { // addCAs() is here because VA uses self-signed certificates with a // non-globally trusted Root Certificate Authority and we need to // tell our code to trust it, otherwise we get self-signed certificate errors. @@ -79,27 +63,10 @@ function getCurlClient(buildOptions, clientOptionsArg) { url, // eslint-disable-next-line prefer-object-spread Object.assign({}, options, { - agent: this.usingProxy ? agent : undefined, + agent: usingProxy ? agent : undefined, }), ); }, - - async query(qargs) { - const { method, url, args } = qargs; - say(chalk.green(`Fetching ${url}`)); - const response = await this.proxyFetch(url, { - headers, - method: method || 'GET', - mode: 'cors', - body: JSON.stringify(args), - }); - - if (response.ok) { - return response.text(); - } - - throw new Error(`HTTP error: ${response.status}: ${response.statusText}`); - }, }; } diff --git a/src/site/stages/build/drupal/static-data-files/generate.js b/src/site/stages/build/drupal/static-data-files/generate.js index 0065a63cb6..6cbacddc01 100644 --- a/src/site/stages/build/drupal/static-data-files/generate.js +++ b/src/site/stages/build/drupal/static-data-files/generate.js @@ -2,6 +2,8 @@ const fs = require('fs-extra'); const { ENABLED_ENVIRONMENTS } = require('../../../../constants/drupals'); const getApiClient = require('../api'); +const getCurlClient = require('./fetchApi'); + const { logDrupal } = require('../utilities-drupal'); const { DATA_FILE_PATH, DATA_FILES } = require('./config'); const { @@ -114,8 +116,8 @@ const writeProcessedDataFilesToCache = ( }); }; -// Applies the process function to download the inputs to the DATA_FILE (A DATA_FILE for curl may have multiple files) -const processCurlDataFile = async dataFile => { +// Applies the process function to download the inputs to the DATA_FILE (A DATA_FILE for curl may have multiple inputs) +const processCurlDataFile = async (dataFile, curlClient) => { const { description, filename, query, postProcess } = dataFile; const baseResult = { description, @@ -128,8 +130,13 @@ const processCurlDataFile = async dataFile => { error: 'A filename must be provided.', }); } - const outputFiles = await query(); - const data = postProcess ? await postProcess(outputFiles) : outputFiles; + const responses = await Promise.all( + query.map(URL => curlClient.proxyFetch(URL, { method: 'GET' })), + ); + const outputData = await Promise.all( + responses.map(response => response.text()), + ); + const data = postProcess ? await postProcess(outputData) : outputData; return { ...baseResult, data, @@ -185,12 +192,13 @@ const processGraphQLDataFile = async ( const pullDataFileContentFromCurls = async ( dataFiles, - _buildOptions, + buildOptions, _onlyPublishedContent, ) => { const curlDataFiles = dataFiles.filter(isQueryTypeCurl); + const curlClient = getCurlClient(buildOptions); return Promise.all( - curlDataFiles.map(dataFile => processCurlDataFile(dataFile)), + curlDataFiles.map(dataFile => processCurlDataFile(dataFile, curlClient)), ); }; diff --git a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js index c9d7ccf70d..9388718420 100644 --- a/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js +++ b/src/site/stages/build/drupal/static-data-files/vaPoliceData/index.js @@ -1,40 +1,14 @@ -const { Curl } = require('node-libcurl'); const fs = require('fs'); const csv = require('csvtojson'); const path = require('path'); +const { join } = require('path'); +const { pathToFileURL } = require('url'); -const query = inputs => async () => { - if (!Array.isArray(inputs)) { - throw new Error('inputs must be an array'); - } - const outputData = []; - for await (const input of inputs) { - if (typeof input !== 'string') { - throw new Error('inputs must be an array of strings'); - } - if (/https?|file:\/\//.test(input)) { - const curl = new Curl(); - curl.setOpt(Curl.option.URL, input); - if (input.endsWith('cms.va.gov')) { - curl.setOpt(Curl.option.PROXY, '127.0.0.1:2001'); - } - curl.setOpt(Curl.option.CUSTOMREQUEST, 'GET'); - - const data = await new Promise((resolve, reject) => { - curl.on('end', (statusCode, body) => { - resolve(body); - }); - curl.on('error', err => { - reject(err); - }); - curl.perform(); - }); - - outputData.push(data); - } - } - return outputData; -}; +// URLs to fetch (even if they are local files) +const query = [ + pathToFileURL(join(__dirname, 'police-contact.csv')).toString(), + pathToFileURL(join(__dirname, 'police-events.csv')).toString(), +]; const postProcess = async queryResult => { const processedJSON = { diff --git a/yarn.lock b/yarn.lock index 527140cf32..58334c124b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3744,11 +3744,6 @@ cypress-axe@^1.0.0: resolved "https://registry.yarnpkg.com/cypress-axe/-/cypress-axe-1.0.0.tgz#ab4e9486eaa3bb956a90a1ae40d52df42827b4f0" integrity sha512-QBlNMAd5eZoyhG8RGGR/pLtpHGkvgWXm2tkP68scJ+AjYiNNOlJihxoEwH93RT+rWOLrefw4iWwEx8kpEcrvJA== -cypress-delete-downloads-folder@^0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/cypress-delete-downloads-folder/-/cypress-delete-downloads-folder-0.0.4.tgz#00693d4d7a36b552e7a11148e49d2c4c34ed3ec3" - integrity sha512-0zix5YIROeMHCrCGQVmMP+jUL3KtKliAs1msSnHCPwkX8rNL4DioI8UHvbBVVghWA3vxWN6GCtV1qW+5DHi9Bg== - cypress-downloadfile@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/cypress-downloadfile/-/cypress-downloadfile-1.2.3.tgz#af4b23ec055732a60d0c09e76e28a50a7bfe8c1a" @@ -5278,6 +5273,13 @@ fecha@^4.2.0: resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.1.tgz#0a83ad8f86ef62a091e22bb5a039cd03d23eecce" integrity sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q== +fetch-blob@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-4.0.0.tgz#7175579ab41933d047293c8e71dd5a49f9620a52" + integrity sha512-nPmnhRmpNMjYWnp9EBMGs6z5lq9RXed5W1vuZcECrsDVQInM8AMQSooVb3X183Aole60adzjWbH9qlRFWzDDTA== + dependencies: + node-domexception "^1.0.0" + figures@^1.3.5: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" @@ -8446,6 +8448,11 @@ nise@^1.0.1: lolex "^5.0.1" path-to-regexp "^1.7.0" +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + node-fetch@^1.0.1, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" From b03adcdfb192b6c898c078316e3ddd2a179ae07c Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Fri, 27 Oct 2023 17:21:54 -0700 Subject: [PATCH 16/16] remove blob --- package.json | 1 - yarn.lock | 12 ------------ 2 files changed, 13 deletions(-) diff --git a/package.json b/package.json index 28bd456e59..dd72b78638 100644 --- a/package.json +++ b/package.json @@ -216,7 +216,6 @@ "dotenv": "^10.0.0", "express": "^4.17.1", "express-http-proxy": "^1.6.0", - "fetch-blob": "^4.0.0", "git-diff": "^2.0.6", "js-yaml": "^3.14.0", "jsesc": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index 58334c124b..43db806a74 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5273,13 +5273,6 @@ fecha@^4.2.0: resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.1.tgz#0a83ad8f86ef62a091e22bb5a039cd03d23eecce" integrity sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q== -fetch-blob@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-4.0.0.tgz#7175579ab41933d047293c8e71dd5a49f9620a52" - integrity sha512-nPmnhRmpNMjYWnp9EBMGs6z5lq9RXed5W1vuZcECrsDVQInM8AMQSooVb3X183Aole60adzjWbH9qlRFWzDDTA== - dependencies: - node-domexception "^1.0.0" - figures@^1.3.5: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" @@ -8448,11 +8441,6 @@ nise@^1.0.1: lolex "^5.0.1" path-to-regexp "^1.7.0" -node-domexception@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - node-fetch@^1.0.1, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"