diff --git a/.firebaserc b/.firebaserc index 76385bda63..c04e013962 100644 --- a/.firebaserc +++ b/.firebaserc @@ -2,6 +2,6 @@ "projects": { "default": "precious-plastics-v4-dev", "production": "onearmyworld", - "ci":"onearmy-test-ci" + "ci": "onearmy-test-ci" } -} \ No newline at end of file +} diff --git a/cypress/support/db/endpoints.ts b/cypress/support/db/endpoints.ts new file mode 100644 index 0000000000..03ceb2fa84 --- /dev/null +++ b/cypress/support/db/endpoints.ts @@ -0,0 +1,29 @@ +// React apps populate a process variable, however it might not always be accessible outside (e.g. cypress) +const e = process ? process.env : ({} as any) +/** + * A prefix can be used to simplify large-scale schema changes or multisite hosting + * and allow multiple sites to use one DB (used for parallel test seed DBs) + * e.g. oa_ + */ +const DB_PREFIX = e.REACT_APP_DB_PREFIX ? e.REACT_APP_DB_PREFIX : '' + +/** + * Mapping of generic database endpoints to specific prefixed and revisioned versions for the + * current implementation + * @example + * ``` + * const allHowtos = await db.get(DB_ENDPOINTS.howtos) + * ``` + * NOTE - these are a bit messy due to various migrations and changes + * In the future all endpoints should try to just retain prefix-base-revision, e.g. oa_users_rev20201012 + */ +export const DB_ENDPOINTS = { + howtos: `${DB_PREFIX}v3_howtos`, + users: `${DB_PREFIX}v3_users`, + tags: `${DB_PREFIX}v3_tags`, + events: `${DB_PREFIX}v3_events`, + mappins: `${DB_PREFIX}v3_mappins`, +} +export type DBEndpoint = keyof typeof DB_ENDPOINTS +// legacy - want to use upper case naming convention but keep alternate until all code migrated +export const DBEndpoints = DB_ENDPOINTS diff --git a/cypress/support/db/firebase.ts b/cypress/support/db/firebase.ts index 5ea134d280..8eac5bcb54 100644 --- a/cypress/support/db/firebase.ts +++ b/cypress/support/db/firebase.ts @@ -7,6 +7,7 @@ import 'firebase/functions' import 'firebase/database' import Query = firebase.firestore.Query import { SEED_DATA } from '../../fixtures/seed' +import { DB_ENDPOINTS } from './endpoints' const fbConfig = { apiKey: 'AIzaSyDAxS_7M780mI3_tlwnAvpbaqRsQPlmp64', authDomain: 'onearmy-test-ci.firebaseapp.com', @@ -46,8 +47,9 @@ class FirestoreDB { opStr: any, value: string, ): Promise | Promise => { + const mapping = DB_ENDPOINTS[collectionName] || collectionName return db - .collection(`${prefix}${collectionName}`) + .collection(`${prefix}${mapping}`) .where(fieldPath, opStr, value) .get() .then(snapshot => { @@ -63,8 +65,9 @@ class FirestoreDB { }) } addDocuments = (collectionName: string, docs: any[]) => { + const mapping = DB_ENDPOINTS[collectionName] || collectionName const batch = db.batch() - const col = db.collection(`${prefix}${collectionName}`) + const col = db.collection(`${prefix}${mapping}`) docs.forEach(doc => { const ref = col.doc(doc._id) batch.set(ref, doc) @@ -72,8 +75,9 @@ class FirestoreDB { return batch.commit() } deleteAll = async (collectionName: string) => { + const mapping = DB_ENDPOINTS[collectionName] || collectionName const batch = db.batch() - const col = db.collection(`${prefix}${collectionName}`) + const col = db.collection(`${prefix}${mapping}`) const docs = await col.get() docs.forEach(d => { batch.delete(col.doc(d.id)) @@ -87,8 +91,9 @@ class FirestoreDB { opStr: any, value: string, ) => { + const mapping = DB_ENDPOINTS[collectionName] || collectionName const query = db - .collection(`${prefix}${collectionName}`) + .collection(`${prefix}${mapping}`) .where(fieldPath, opStr, value) .limit(MAX_BATCH_SIZE) return new Promise((resolve, reject) => { @@ -133,8 +138,9 @@ class FirestoreDB { } updateDocument = (collectionName: string, docId: string, docData: any) => { + const mapping = DB_ENDPOINTS[collectionName] || collectionName return db - .collection(`${prefix}${collectionName}`) + .collection(`${prefix}${mapping}`) .doc(docId) .set(docData) } diff --git a/firebase.json b/firebase.json index 5e0b0d7d0b..7784939258 100644 --- a/firebase.json +++ b/firebase.json @@ -1,7 +1,11 @@ { "hosting": { "public": "build", - "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], "rewrites": [ { "source": "/api", @@ -15,7 +19,6 @@ "source": "/DHSite_migrateAvatar", "function": "DHSite_migrateAvatar" }, - { "source": "**", "destination": "/index.html", @@ -57,6 +60,21 @@ "yarn --cwd \"$RESOURCE_DIR\" install", "npm --prefix \"$RESOURCE_DIR\" run lint", "npm --prefix \"$RESOURCE_DIR\" run build" - ] + ], + "source": "functions" + }, + "emulators": { + "functions": { + "port": 5001 + }, + "firestore": { + "port": 8080 + }, + "hosting": { + "port": 5000 + }, + "ui": { + "enabled": true + } } } diff --git a/firestore.rules.WiP b/firestore.rules.WiP index 0d7bf80f32..b6f0c29f96 100644 --- a/firestore.rules.WiP +++ b/firestore.rules.WiP @@ -1,5 +1,6 @@ // WiP - CC - 2020-02-24 // As part of future security update will make better use of firestore rules, as stubbed out below +// Note - will also need to include any legacy revisions as required service cloud.firestore { // rules will apply to all docs in database diff --git a/functions/.gitignore b/functions/.gitignore index 4c3459967d..e3a6e22148 100644 --- a/functions/.gitignore +++ b/functions/.gitignore @@ -11,4 +11,5 @@ lib/ # Testing config files .runtimeconfig.json -./firebase-debug.log \ No newline at end of file +./firebase-debug.log +*.log \ No newline at end of file diff --git a/functions/README.md b/functions/README.md index 9a13742e82..84b9ec4fb6 100644 --- a/functions/README.md +++ b/functions/README.md @@ -41,13 +41,11 @@ Note, this will require authentication for the firebase project. You can request and the relevant config will automatically be made available (viewable with command `firebase functions:config:get`) -This also only works for specific triggers (namely the api endpoints). If you want to -test a functions triggered in other ways you may first want to create an api endpoint -for testing and later test further with the [firebase functions shell](https://firebase.google.com/docs/functions/local-emulator#install_and_configure_the_cloud_functions_shell), via command `$npm run shell` +This also only works for specific triggers (namely the https callable functions, api endpoints). For more information see https://firebase.google.com/docs/functions/local-emulator. + +NOTE - if running a function that requires access to the live database (and not just emulated), use `npm run serve:only:functions`, which will exclude db emulator and default to live project db + -Additionally, the functions won't be automatically reloaded on change. This should be possible -(easier when working with JS instead of TS), so if anybody wishes to investigate further they would -be most welcome. Alternatively just restart the serve process on changes. ## Handling headers and redirects @@ -75,3 +73,23 @@ To view console logs and events from deployed functions request project access f Both production and live have small app-engine instances that run cron tasks, schedules can be seen in ../functions-cron. If changing either of these remember to deploy both to production and development servers + +# Using functions for data migrations + +If making changes across the entire DB it is likely that backend functions will be used to do so. +A couple tips to help implementing: + +1. Create backups of all the collection points potentially affected. +``` +gcloud firestore export gs://[BUCKET_NAME] --collection-ids=[COLLECTION_ID_1],[COLLECTION_ID_2] +``` +E.g. for the staging server, updating howtos and events: +``` +gcloud firestore export gs://precious-plastics-v4-dev-exports/2020-10-12 --collection-ids=v3_howtos,v3_events +``` +For more info see https://firebase.google.com/docs/firestore/manage-data/export-import#export_specific_collections + +2. For any data that you want to be reflected immediately, also change the `modified` field so that user caches will update as required + +3. If less confident or making large scale changes, consider populating to a new db endpoint, e.g. `v4_howtos` +(this will need to also be updated in the models for both functions and frontend) \ No newline at end of file diff --git a/functions/package.json b/functions/package.json index d09a8a48f1..df8e5857a4 100644 --- a/functions/package.json +++ b/functions/package.json @@ -8,7 +8,8 @@ "copyDevConfig": "firebase functions:config:get > .runtimeconfig.json", "copyDevConfigWin": "firebase functions:config:get | ac .runtimeconfig.json", "db:backup:local": "firestore-export -a service.json -b backup.json -p", - "serve": "concurrently --kill-others \"npm run watch\" \"firebase emulators:start\"", + "serve": "concurrently --kill-others \"npm run watch\" \"firebase emulators:start \"", + "serve:only:functions": "concurrently --kill-others \"npm run watch\" \"firebase emulators:start --only functions\"", "shell": "npm run build && firebase functions:shell", "deploy:dev": "firebase use default && firebase deploy --only functions", "start": "npm run copyDevConfig && npm run serve", @@ -16,33 +17,33 @@ }, "main": "./lib/index.js", "dependencies": { - "axios": "^0.18.1", - "body-parser": "^1.18.3", + "axios": "^0.20.0", + "body-parser": "^1.19.0", "cors": "^2.8.5", "dateformat": "^3.0.3", - "express": "^4.16.4", - "firebase-admin": "^8.3.0", - "firebase-functions": "^3.2.0", - "fs-extra": "^7.0.1", - "google-auth-library": "^2.0.1", - "googleapis": "^39.1.0", - "log-update": "^3.2.0", - "request": "^2.88.0", - "sharp": "^0.23.3" + "express": "^4.17.1", + "firebase-admin": "^9.2.0", + "firebase-functions": "^3.11.0", + "fs-extra": "^9.0.1", + "google-auth-library": "^6.1.1", + "googleapis": "^61.0.0", + "log-update": "^4.0.0", + "request": "^2.88.2", + "sharp": "^0.26.1" }, "devDependencies": { "@types/axios": "^0.14.0", - "@types/cors": "^2.8.5", - "@types/dateformat": "^3.0.0", - "@types/fs-extra": "^5.0.5", - "@types/request": "^2.48.3", - "@types/sharp": "^0.22.1", - "concurrently": "^4.1.1", - "tslint": "^5.12.0", - "typescript": "^3.7.4" + "@types/cors": "^2.8.8", + "@types/dateformat": "^3.0.1", + "@types/fs-extra": "^9.0.2", + "@types/request": "^2.48.5", + "@types/sharp": "^0.26.0", + "concurrently": "^5.3.0", + "tslint": "^6.1.3", + "typescript": "^4.0.3" }, "engines": { - "node": "10" + "node": "12" }, "private": true } diff --git a/functions/src/DaveHakkensNL/BPMember.model.ts b/functions/src/DaveHakkensNL/BPMember.model.ts deleted file mode 100644 index d99415fd0d..0000000000 --- a/functions/src/DaveHakkensNL/BPMember.model.ts +++ /dev/null @@ -1,67 +0,0 @@ -export interface BPMember { - id: number - name: string - email: string - user_login: string - link: string - member_types: [] - xprofile: { - groups: { - '1': { - name: 'Base' - fields: { - '1': { - name: 'Name' - value: string - } - '8': { - name: 'Birthday' - value: string - } - '38': { - name: 'Website' - value: string - } - '42': { - name: 'Location' - value: string - } - '667': { - name: 'About' - value: string - } - '1055': { - name: 'Your love' - value: [string[]] - } - } - } - '2': { - name: 'Additional information' - fields: { - '1264': { - name: 'Country' - value: string - } - } - } - } - } - mention_name: 'fernandochacon' - avatar_urls: { - full: string - thumb: string - } - _links: { - self: [ - { - href: string - } - ] - collection: [ - { - href: string - } - ] - } -} diff --git a/functions/src/DaveHakkensNL/avatarMigrate.ts b/functions/src/DaveHakkensNL/avatarMigrate.ts deleted file mode 100644 index 3d8485fe9b..0000000000 --- a/functions/src/DaveHakkensNL/avatarMigrate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - getStorageFileMeta, - uploadLocalFileToStorage, -} from '../Firebase/storage' -import { resizeLocalImage } from '../Utils/image.utils' -import { downloadFileToTemp, IFileWriteMeta } from '../Utils/file.utils' - -export const migrateAvatar = async (imgUrl: string, userId: string) => { - // download - const localImgMeta = (await downloadFileToTemp(imgUrl)) as IFileWriteMeta - // convert and upload - // note, will operate sequentially on the same file - const avatar = await resizeLocalImage(localImgMeta.filePath, 'avatar', 'jpg') - await uploadLocalFileToStorage(avatar, `avatars/${userId}.jpg`, {}) - const thumb = await resizeLocalImage(localImgMeta.filePath, 'thumb', 'jpg') - await uploadLocalFileToStorage(thumb, `avatars/${userId}.thumb.jpg`, {}) - // get meta and return - const avatarMeta = await getStorageFileMeta(`avatars/${userId}.jpg`) - const thumbMeta = await getStorageFileMeta(`avatars/${userId}.thumb.jpg`) - return { avatar: avatarMeta, thumb: thumbMeta } -} diff --git a/functions/src/DaveHakkensNL/dataMigrate.ts b/functions/src/DaveHakkensNL/dataMigrate.ts deleted file mode 100644 index f22894b374..0000000000 --- a/functions/src/DaveHakkensNL/dataMigrate.ts +++ /dev/null @@ -1,172 +0,0 @@ -import axios from 'axios' -import { BPMember } from './BPMember.model' -import * as db from '../Firebase/realtimeDB' -const endpoint = 'https://davehakkens.nl/wp-json/buddypress/v1/members' - -/************ Exported Functions **************************************************** - These functions handle creation of a database that stores and tracks buddypress - user ids by the user's mention name (as user unlikely to know id number) for lookup. - Once id has been identified for a user, the getUserProfile function can extract - the user's buddypress profile information - ************************************************************************************/ - -// identify a user id from their mention name -export const getUserId = async (mention_name: string) => { - return db.get(`_DHSiteUserIDs/${mention_name}`) -} - -// take a user name, lookup their id and return the buddypress profile data with email stripped -export const getDHUserProfile = async (mention_name: string) => { - try { - console.log('getting user profile', mention_name) - const id = (await getUserId(mention_name)) as number - console.log(`id retrieved: ${mention_name}:${id}`) - if (!id) { - throw new Error(`user @${mention_name} not found`) - } - const req = await axios.get(endpoint, { - params: { - per_page: 1, - user_ids: [id], - }, - }) - const profile = req.data[0] - // not sharing email between sites as user has registered new account - if (profile && profile.hasOwnProperty('email')) { - delete profile.email - return profile - } else { - throw new Error( - 'migration not possible - profile contains no public information', - ) - } - } catch (error) { - throw new Error(`user @${mention_name} not found`) - } -} - -// check how many IDs already exist in db and how many are on the buddypress server -// migrate all missing in batches of 100 (storing as mention_name:id pairs) -export const updateDHUserIds = async () => { - console.log('updating ids') - const existingIDs = await db.get('_DHSiteUserIDs') - const totalOnDB = Object.keys(existingIDs).length - console.log('total on db', totalOnDB) - // use initial request to see how many total (response has custom header) - const initialRequest = await sendRecordRequest(1, 1) - const totalOnBP = Number(initialRequest.headers['x-wp-totalpages']) - console.log('total on BP', totalOnBP) - const totalToFetch = totalOnBP - totalOnDB - const pagesToFetch = Math.ceil(totalToFetch / 100) - await migrateDHUserIDs(pagesToFetch) - return `${totalToFetch} updated` -} - -/************ Helper Methods ******************************************************** - - ************************************************************************************/ - -// -async function migrateDHUserIDs(endPage: number) { - console.log(`fetching [${endPage}] pages of profile data`) - // note, ids retrieved in reverse order so page 1 is newest - for (let i = 1; i <= endPage; i++) { - console.log(`${i}/${endPage}`) - const req = await sendRecordRequest(i) - const ids = extractBPIds(req.data) - // await fileUtils.appendJsonToFile('allUsers.json', nextRecords) - await db.update('_DHSiteUserIDs', ids) - } -} - -// send a http get request to endpoint with paging parameters -function sendRecordRequest(pageNumber: number, perPage: number = 100) { - return axios.get(endpoint, { - params: { - per_page: perPage, - page: pageNumber, - }, - }) -} - -// take batch of user profiles and return single object in format {mention_name:id} -function extractBPIds(records: BPMember[]) { - const recordObject = {} - records.forEach(r => { - recordObject[r.mention_name] = r.id - }) - return recordObject -} - -/************ Deprecated ************************************************************ - (code retained for likely future use) - ************************************************************************************/ - -// // callback function that logs completion progress -// function updateProgress(completed: number) { -// const frames = ['-', '\\', '|', '/'] -// let i = 0 -// const frame = frames[(i = ++i % frames.length)] -// logUpdate( -// ` -// ♥♥ -// ${frame} ${completed}% ${frame} -// ♥♥ -// `, -// ) -// if (completed === 100) { -// logUpdate.done() -// } -// } - -// similar as above but operates in parallel - found for large numbers this would -// cause issue with wordpress and break, but keeping for record -// async function _getAllBPRecordsInParallel(startPage: number, endPage: number) { -// const totalPages = endPage - startPage -// console.log(`fetching [${endPage - startPage}] pages`) -// let responses = [] -// if (totalPages > 0) { -// // make subsequent requests in parallel -// const requests = [] -// for (let i = startPage; i <= endPage; i++) { -// requests.push( -// new Promise((resolve, reject) => { -// axios -// .get(endpoint, { -// params: { -// per_page: 100, -// page: i, -// }, -// }) -// .then(resolve) -// .catch(err => { -// reject(err) -// }) -// }), -// ) -// } -// try { -// responses = await progressPromise(requests, updateProgress) -// } catch (error) { -// throw new Error(JSON.stringify(error)) -// } -// } -// return responses.map(r => r.data) -// } - -// // wrapper for promise.all to also track number of completion -// function progressPromise( -// promises: Promise[], -// progressCallback: (progress: number) => void, -// ) { -// let progress = 0 -// const length = promises.length -// progressCallback(progress) -// for (const p of promises) { -// p.then(() => { -// progress++ -// progressCallback(Math.round((progress / length) * 100)) -// }) -// } -// return Promise.all(promises) -// } diff --git a/functions/src/DaveHakkensNL/index.ts b/functions/src/DaveHakkensNL/index.ts deleted file mode 100644 index b2697663bb..0000000000 --- a/functions/src/DaveHakkensNL/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { migrateAvatar } from './avatarMigrate' -import { getDHUserProfile } from './dataMigrate' -import { DHLogin } from './login' - -import * as functions from 'firebase-functions' - -const DHSite_getUser = functions.https.onCall(async (mention_name: string) => { - console.log('getting DH user profile', mention_name) - try { - const profile = await getDHUserProfile(mention_name) - return profile - } catch (error) { - throw new functions.https.HttpsError('not-found', error.message) - } -}) - -const DHSite_migrateAvatar = functions.https.onCall( - async ({ avatarUrl, user }) => { - console.log('migrating user avatar', user, avatarUrl) - try { - const meta = await migrateAvatar(avatarUrl, user) - return meta - } catch (error) { - throw new functions.https.HttpsError('not-found', error.message) - } - }, -) - -const DHSite_login = functions.https.onCall(async ({ email, password }) => { - try { - const token = await DHLogin(email, password) - return token - } catch (error) { - console.log(error.message) - throw new functions.https.HttpsError('permission-denied', error.message) - } -}) - -export const DH_Exports = { DHSite_getUser, DHSite_migrateAvatar, DHSite_login } diff --git a/functions/src/DaveHakkensNL/login.ts b/functions/src/DaveHakkensNL/login.ts deleted file mode 100644 index c66de47888..0000000000 --- a/functions/src/DaveHakkensNL/login.ts +++ /dev/null @@ -1,105 +0,0 @@ -const endpoint = 'https://davehakkens.nl/wp-json/aam/v1/authenticate' -import axios from 'axios' -import { firebaseAdmin } from '../Firebase/admin' -import { IUser } from '../models' - -export const DHLogin = async (username: string, password: string) => { - const dhJWT = await DHGetJWTToken(username, password) - const userId = dhJWT.user.data.user_login - const claims = mergeDhData(dhJWT) - return firebaseAdmin.auth().createCustomToken(userId, claims) -} - -// Use AAM plugin on DH site to generate JWT token from DH site -// User credentials are validated and a JWT token passed back on successful user login -const DHGetJWTToken = async (username: string, password: string) => { - const body = { username, password } - const headers = { - 'Content-Type': 'application/json', - Accept: 'application/json', - } - const res = await axios.post(endpoint, body, { headers: headers }) - const token: IDHTokenResponse = res.data - return token -} - -// when logging in via dh site a JWT token is returned with a variety of user profile information -// want to extract data from token and format in way consistent with other users (OpenIDConnect) -// and fields that will be used in the platform -const mergeDhData = (dhJWT: IDHTokenResponse) => { - const oidcClaims = { - email: dhJWT.user.data.user_email, - name: dhJWT.user.data.display_name, - } - const additionalUserClaims: Partial = { - DHSite_id: dhJWT.user.ID, - DHSite_mention_name: dhJWT.user.data.user_login, - } - return { ...oidcClaims, ...additionalUserClaims } -} - -/******************************************************************************************************** - * Interfaces and Mocks - *********************************************************************************************************/ -interface IDHTokenResponse { - token: string - token_expires: string - user: { - data: { - ID: string - user_login: string - user_pass: string - user_nicename: string - user_email: string - user_url: string - user_registered: string - user_activation_key: string - user_status: string - display_name: string - } - ID: number - caps: { - subscriber: boolean - } - cap_key: string - roles: string[] - allcaps: { - read: boolean - level_0: boolean - subscriber: boolean - } - filter: null - } -} - -const LOGIN_MOCK: IDHTokenResponse = { - token: - 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1NjgxMjcxNzQsImlzcyI6Imh0dHA6XC9cL3Rlc3R3cC5vbmVhcm15LndvcmxkIiwiZXhwIjoiMDlcLzExXC8yMDE5LCAxNDo1MiArMDAwMCIsImp0aSI6ImM2OGE1YWViLWJjZjQtNDNmOS1iYjJiLTFmODVmNDc2YTEyNSIsInVzZXJJZCI6MiwicmV2b2NhYmxlIjp0cnVlLCJyZWZyZXNoYWJsZSI6ZmFsc2V9.4yxRenweWSJ69gNg_2RhqxpMozBN29FGODcx82L5a7A', - token_expires: '09/11/2019, 14:52 +0000', - user: { - data: { - ID: '2', - user_login: 'testwp', - user_pass: '$P$Bw2/hfTcHvHXLKawFMST3OSE5CxmIN0', - user_nicename: 'testwp', - user_email: 'testwp@test.com', - user_url: '', - user_registered: '2019-09-10 11:55:34', - user_activation_key: '', - user_status: '0', - display_name: 'testwp', - }, - ID: 2, - caps: { - subscriber: true, - }, - cap_key: 'wp_capabilities', - roles: ['subscriber'], - allcaps: { - read: true, - level_0: true, - subscriber: true, - }, - filter: null, - }, -} diff --git a/functions/src/Firebase/firebaseSync.ts b/functions/src/Firebase/firebaseSync.ts index 978b74679f..b1b2e8820c 100644 --- a/functions/src/Firebase/firebaseSync.ts +++ b/functions/src/Firebase/firebaseSync.ts @@ -1,7 +1,7 @@ -// import { IDBEndpoint } from '@OAModels/common.models' + import * as rtdb from './realtimeDB' import * as firestore from './firestoreDB' -import { IDBEndpoint, DBDoc, DB_PREFIX } from '../models' +import { DBDoc, DB_ENDPOINTS } from '../models' /* Functions in this folder are used to sync data between firestore and firebase realtime databases The reason for this is to allow large collections to be 'cached' for cheap retrieval @@ -12,16 +12,8 @@ import { IDBEndpoint, DBDoc, DB_PREFIX } from '../models' https://github.com/OneArmyWorld/onearmy/wiki/Backend-Database */ -// List of endpoints to use during sync operations, mapped to have correct prefix -// TODO - ideally want better way of setting DB_PREFIX globally as opposed to just from frontend -const endpoints: IDBEndpoint[] = [ - 'events', - 'howtos', - 'mappins', - 'tags', - // NOTE - do not want to keep list of sync'd users - // 'users', -].map(e => `${DB_PREFIX}${e}` as IDBEndpoint) +// List of endpoints to use during sync operations, taken from common db mapping +const endpoints = Object.values(DB_ENDPOINTS) export const syncAll = async () => { const promises = endpoints.map(async endpoint => await sync(endpoint)) @@ -33,7 +25,7 @@ export const syncAll = async () => { // for given endpoint, query rtdb for all records, determin latest, // query firestore for newer records, add to rtdb -export const sync = async (endpoint: IDBEndpoint) => { +export const sync = async (endpoint: string) => { const existing = await rtdb.get(endpoint) const latest = existing && Object.keys(existing).length > 1 @@ -55,9 +47,3 @@ export const sync = async (endpoint: IDBEndpoint) => { function _sortByModified(a: DBDoc, b: DBDoc) { return a._modified > b._modified ? -1 : 1 } - -export const test = async () => { - const endpoint: IDBEndpoint = 'howtos' - const data = await rtdb.get(endpoint) - return Object.values(data) -} diff --git a/functions/src/Firebase/firestoreDB.ts b/functions/src/Firebase/firestoreDB.ts index 5e2001f562..3ad13bce11 100644 --- a/functions/src/Firebase/firestoreDB.ts +++ b/functions/src/Firebase/firestoreDB.ts @@ -1,29 +1,51 @@ import { firebaseAdmin } from './admin' -import { DBDoc, IDBEndpoint } from '../models' +import { DBDoc, IDBEndpoint, DB_ENDPOINTS } from '../models' + +// TODO - ideally should remove default export to force using functions which have mapping export const db = firebaseAdmin.firestore() -export const update = (path: string, data: any) => db.doc(path).update(data) +/************************************************************ + * Additional exports to support common naming conventions + ************************************************************/ +export const update = (path: string, data: any) => db.doc(path).update(data) export const set = (path: string, data: any) => db.doc(path).set(data) - export const get = (path: string) => db.doc(path) -export const getLatestDoc = async (collection: string, orderBy: string) => { +/************************************************************ + * Specific firestore helpers for common ops + ************************************************************/ +export const getLatestDoc = async (endpoint: IDBEndpoint, orderBy: string) => { + const mappedEndpoint = DB_ENDPOINTS[endpoint] const col = await db - .collection(collection) + .collection(mappedEndpoint) .orderBy(orderBy) .limit(1) .get() return col.docs[0] } - -export const getDoc = (path: string) => db.doc(path) - -export const getCollection = (endpoint: IDBEndpoint) => - db - .collection(endpoint) +export const getDoc = async ( + endpoint: IDBEndpoint, + docId: string, +): Promise => { + const mapping = DB_ENDPOINTS[endpoint] || endpoint + console.log(`mapping [${endpoint}] -> [${mapping}]`) + return db + .collection(mapping) + .doc(docId) + .get() + .then(res => { + return res.data() as T + }) +} +export const getCollection = async (endpoint: IDBEndpoint) => { + const mapping = DB_ENDPOINTS[endpoint] || endpoint + console.log(`mapping [${endpoint}] -> [${mapping}]`) + return db + .collection(mapping) .get() .then(snapshot => { - return snapshot.empty ? [] : snapshot.docs.map(d => d.data() as DBDoc) + return snapshot.empty ? [] : snapshot.docs.map(d => d.data() as T & DBDoc) }) +} diff --git a/functions/src/Integrations/firebase-email.ts b/functions/src/Integrations/firebase-email.ts index 004c2ccc43..64ba83aae6 100644 --- a/functions/src/Integrations/firebase-email.ts +++ b/functions/src/Integrations/firebase-email.ts @@ -1,17 +1,14 @@ import * as functions from 'firebase-functions' -import { IDBEndpoint } from '../models' +import { DB_ENDPOINTS } from '../models' import { db } from '../Firebase/firestoreDB' -const USER_ENDPOINT: IDBEndpoint = 'v3_users' as any -// TODO - fix links to main repo and handle with prefix_endpoint type checking - /** * Example function to show how an automated email can be triggered * In this case it is being used temporarily to help debug * https://github.com/ONEARMY/community-platform/issues/883 */ export const notifyEmailDemo = functions.firestore - .document(`${USER_ENDPOINT}/precious-plastic`) + .document(`${DB_ENDPOINTS.users}/precious-plastic`) .onWrite(async (change, context) => { return db.collection('mail').add({ to: 'chris.m.clarke@live.co.uk', diff --git a/functions/src/Integrations/firebase-userBackup.ts b/functions/src/Integrations/firebase-userBackup.ts deleted file mode 100644 index 3af4035415..0000000000 --- a/functions/src/Integrations/firebase-userBackup.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as functions from 'firebase-functions' -import { DBDoc, IDBEndpoint } from '../models' -const USERS_ENDPOINT: IDBEndpoint = 'v3_users' as any - -/** - * Automatically create user revision on update - * Nests revision as subcollection of original document, - * labeled by previous _modified timestamp - */ -export const FirebaseUserBackup = functions.firestore - .document(`${USERS_ENDPOINT}/{username}`) - .onUpdate((change, context) => { - const { before, after } = change - const rev = before.data() as DBDoc - if (rev && rev._modified) { - return before.ref - .collection('revisions') - .doc(rev._modified) - .set(rev) - } - return null - }) diff --git a/functions/src/Integrations/user-stats.ts b/functions/src/Integrations/user-stats.ts deleted file mode 100644 index c24366dd56..0000000000 --- a/functions/src/Integrations/user-stats.ts +++ /dev/null @@ -1,109 +0,0 @@ -import * as functions from 'firebase-functions' -import { db } from '../Firebase/firestoreDB' - -export const countHowTos = functions.firestore - .document('v3_howtos/{id}') - .onWrite(async (change, context) => { - updateStats(change, 'howToCount') - }) - -export const countEvents = functions.firestore - .document('v3_events/{id}') - .onWrite(async (change, context) => { - updateStats(change, 'eventCount') - }) - -async function updateStats(change, target) { - const info = change.after.exists ? change.after.data() : null - const prevInfo = change.before.exists ? change.before.data() : null - const userStatsRef = db.collection('v3_users/') - - let delta = 0 - - if ( - info !== null && - info.moderation === 'accepted' && - prevInfo !== null && - prevInfo.Moderation !== 'accepted' - ) { - // Increment if now accepted and previously different - delta = 1 - } else if ( - prevInfo !== null && - prevInfo.moderation === 'accepted' && - (info === null || info.moderation !== 'accepted') - ) { - // Decrement if previously accepted and now erased or moderation changed - delta = -1 - } else { - return null - } - - console.log('Update ', info._createdBy, ' ', target, ' delta: ', delta) - - const user: any = await userStatsRef.doc(info._createdBy).get() - let stats = null - if (user && user.exists) { - if (!user.data().stats || (!(target in user.data().stats) && delta<0 ) ){ - console.log('No previous stats for ' + user.id + ' -> compute') - stats = await computeUserStats(info._createdBy) - console.log(user.id, ': ', stats) - } else { - stats = user.data().stats; - if (!(target in stats)) stats[target] = delta > 0 ? delta : 0; // Should never happen - stats[target] += delta; - } - if (stats) { - user.ref - .update( - { - stats: stats, - }, - { merge: true }, - ) - .then(() => { - return true - }) - .catch(e => { - console.error('Could not update user stats, error: ', e) - }) - } - } else { - console.error( - 'Fatal(updateStats): user not found for ', - target, - ': ', - info._createdBy, - ) - } - return false -} - -// Compute one user stats -async function computeUserStats(owner) { - console.log('Calculando para ', owner) - - try { - const snapshotHowTos: any = await db - .collection('v3_howtos') - .where('_createdBy', '==', owner) - .where('moderation', '==', 'accepted') - .get(); - - const snapshotEvents: any = await db - .collection('v3_events') - .where('_createdBy', '==', owner) - .where('moderation', '==', 'accepted') - .get(); - - const stats: any = { - howToCount : snapshotHowTos ? snapshotHowTos.size : 0, - eventCount : snapshotEvents ? snapshotEvents.size : 0 - }; - - return stats - } catch (e) { - console.error('Error compute:', e) - } - return null -} diff --git a/functions/src/Integrations/user-triggers.ts b/functions/src/Integrations/user-triggers.ts deleted file mode 100644 index 5b7378f7a7..0000000000 --- a/functions/src/Integrations/user-triggers.ts +++ /dev/null @@ -1,58 +0,0 @@ -import * as functions from 'firebase-functions' -import { db } from '../Firebase/firestoreDB' - -export const handleUserChanges = functions.firestore - .document('v3_users/{id}') - .onWrite(async (change, context) => { - const info = change.after.exists ? change.after.data() : null - const prevInfo = change.before.exists ? change.before.data() : null - - const prevCountryCode = - prevInfo.location && prevInfo.location.countryCode - ? prevInfo.location.countryCode - : null - const newCountryCode = - info.location && info.location.countryCode - ? info.location.countryCode - : null - const prevCountry = prevInfo.country ? prevInfo.country : null - const newCountry = info.country ? info.country : null - - if (prevCountryCode !== newCountryCode || prevCountry !== newCountry) { - const country = newCountryCode ? newCountryCode : newCountry.toLowerCase() - updateHowTosCountry(info._id, country) - } - }) - -async function updateHowTosCountry(userId, country) { - if (!userId || !country) { - console.error('Missing information to set howToCountry') - return false - } - console.log('Update ', userId, ' moved to :', country) - - const querySnapshot = await db - .collection('v3_howtos') - .where('_createdBy', '==', userId) - .get() - - if (querySnapshot) { - querySnapshot.forEach(doc => { - console.log('Updating howTo ', doc.data()._id, 'to', country) - doc.ref - .update({ creatorCountry: country }) - .then(() => { - console.log('Document successfully updated!') - return true - }) - .catch(error => { - console.error('Error updating HowToCountry: ', error) - return false - }) - }) - } else { - console.log('Error getting user howTo') - return false - } - return false -} diff --git a/functions/src/exports/api.ts b/functions/src/exports/api.ts index 143b90bf6b..679d022aa4 100644 --- a/functions/src/exports/api.ts +++ b/functions/src/exports/api.ts @@ -45,4 +45,4 @@ app.all('*', async (req, res, next) => { } }) -export const api = functions.https.onRequest(app) +export const api = functions.https.onRequest(app as any) diff --git a/functions/src/exports/tasks.ts b/functions/src/exports/tasks.ts index 72eb2d872f..9de1d3cc88 100644 --- a/functions/src/exports/tasks.ts +++ b/functions/src/exports/tasks.ts @@ -6,7 +6,6 @@ Add/change schedule from `./functions-cron/appengine/cron.yaml` import * as functions from 'firebase-functions' import { BackupDatabase } from '../Firebase/databaseBackup' import * as FirebaseSync from '../Firebase/firebaseSync' -import { updateDHUserIds } from '../DaveHakkensNL/dataMigrate' export const weeklyTasks = functions.pubsub .topic('weekly-tick') diff --git a/functions/src/index.ts b/functions/src/index.ts index f8302367ef..0fec607d82 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -1,33 +1,29 @@ import { api } from './exports/api' import { weeklyTasks, dailyTasks } from './exports/tasks' -import { DH_Exports } from './DaveHakkensNL' import * as IntegrationsSlack from './Integrations/firebase-slack' import * as IntegrationsDiscord from './Integrations/firebase-discord' -import * as UserTriggers from './Integrations/user-triggers' -import { FirebaseUserBackup } from './Integrations/firebase-userBackup' import * as IntegrationsEmail from './Integrations/firebase-email' -import * as UserStats from './Integrations/user-stats' +import * as UserStats from './userStats' import * as Admin from './admin' +import * as UserUpdates from './userUpdates' // the following endpoints are exposed for use by various triggers // see individual files for more informaiton exports.api = api exports.weeklyTasks = weeklyTasks exports.dailyTasks = dailyTasks -exports.DHSite_getUser = DH_Exports.DHSite_getUser -exports.DHSite_migrateAvatar = DH_Exports.DHSite_migrateAvatar -exports.DHSite_login = DH_Exports.DHSite_login exports.notifyNewPin = IntegrationsSlack.notifyNewPin exports.notifyNewHowTo = IntegrationsSlack.notifyNewHowTo exports.notifyNewEvent = IntegrationsSlack.notifyNewEvent exports.notifyPinAccepted = IntegrationsDiscord.notifyPinAccepted exports.notifyHowToAccepted = IntegrationsDiscord.notifyHowToAccepted exports.notifyEventAccepted = IntegrationsDiscord.notifyEventAccepted -exports.handleUserChanges = UserTriggers.handleUserChanges -exports.firebaseUserBackup = FirebaseUserBackup exports.emailNotificationDemo = IntegrationsEmail.notifyEmailDemo -exports.countEvents = UserStats.countEvents -exports.countHowTos = UserStats.countHowTos +// TODO - migrate function should be removed after complete +exports.userStatsMigrate = UserStats.migrateUserStats +exports.userStatsCountEvents = UserStats.countEvents +exports.userStatsCountHowTos = UserStats.countHowTos +exports.userUpdates = UserUpdates.handleUserUpdates // CC Note, 2020-04-40 // folder-based naming conventions should be encourage from now on exports.adminGetUserEmail = Admin.getUserEmail diff --git a/functions/src/models.ts b/functions/src/models.ts index 1995cb15b7..1ee1977dcb 100644 --- a/functions/src/models.ts +++ b/functions/src/models.ts @@ -1,12 +1,30 @@ -// Models can be imported from the main package for use here -// NOTE 1 - this requires adjustment main src in package.json -// NOTE 2 - shorthand @OAModels notation defined in tsconfig -import { IDBEndpoint, DBDoc } from '../../src/models/common.models' -import { IUser } from '../../src/models/user.models' -export { IDBEndpoint, DBDoc, IUser } +import * as functions from 'firebase-functions' -// TODO - handle import from src/models (currently breaks ts setup) -// but possibly fixed by backend improvements pr -// NOTE - types import fine as skipLib=true, but consts have issue -const e = process.env -export const DB_PREFIX = e.REACT_APP_DB_PREFIX ? e.REACT_APP_DB_PREFIX : 'v3_' +// Re-export types from the main platform used in functions +// Note - simply exporting * seems to fail so add specific exports as required +export { + IEventDB, + IHowtoDB, + DBDoc, + IUserDB, + IDBEndpoint, +} from '../../src/models' + +/************************************************************************************* + * IMPORTANT + * We want to ensure the same db endpoints are used in frontend and backend functions, + * however importing directly isn't very well supported for constants + * (to fix with future migration to lerna or similar module system) + * + * Therefore these need to be kept manually in sync with src/stores/databaseV2/endpoints.ts + **************************************************************************************/ +const DB_PREFIX = '' +export const DB_ENDPOINTS = { + howtos: `${DB_PREFIX}v3_howtos`, + users: `${DB_PREFIX}v3_users`, + tags: `${DB_PREFIX}v3_tags`, + events: `${DB_PREFIX}v3_events`, + mappins: `${DB_PREFIX}v3_mappins`, +} + +export type IDBDocChange = functions.Change diff --git a/functions/src/upgrade/dbV1Upgrade.ts b/functions/src/upgrade/dbV1Upgrade.ts deleted file mode 100644 index 584fc64c4e..0000000000 --- a/functions/src/upgrade/dbV1Upgrade.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { db } from '../Firebase/firestoreDB' - -/* Temporary function used to migrate from db V1 docs to V2 - The breaking change comes from converting timestamps to strings - (explained here: https://github.com/OneArmyWorld/onearmy/issues/343 ) -*/ - -const mappings: DBMapping = { - eventsV1: 'v2_events', - howtosV1: 'v2_howtos', - tagsV1: 'v2_tags', - users: 'v2_users', -} - -export const upgradeV1DB = async () => { - const promises = Object.keys(mappings).map(async endpoint => { - const upgradedDocs = await upgradeDBEndpoint(endpoint) - return upgradedDocs - }) - const updates = await Promise.all(promises) - console.log('upgrade complete') - return updates -} - -const upgradeDBEndpoint = async (endpoint: string) => { - console.log('upgrading endpoint', endpoint) - const snap = await db.collection(endpoint).get() - const docs = snap.empty ? [] : snap.docs.map(d => d.data()) - console.log(`|${endpoint}|: [${docs.length}] docs to upgrade`) - const batch = db.batch() - // remove deleted docs and upgrade - const v2Docs = docs.filter(d => !d._deleted).map(d => upgradeV1Doc(d)) - const v2Endpoint = mappings[endpoint] - v2Docs.forEach(v2Doc => { - const ref = db.doc(`${v2Endpoint}/${v2Doc._id}`) - batch.set(ref, v2Doc) - }) - console.log(`|${endpoint}|: upgrade ready`) - await batch.commit() - return v2Docs -} - -function upgradeV1Doc(doc: any) { - try { - // upgrade timestamps on all docs - const metaFields = ['_created', '_modified'] - metaFields.forEach(field => { - doc[field] = _upgradeDate(doc[field]) - }) - // upgrade other specific fields - const optionalFields = ['_lastResponse', 'year', 'date'] - optionalFields.forEach(field => { - // ignore case where field set to null (discussions) - if (doc.hasOwnProperty(field) && doc[field]) { - doc[field] = _upgradeDate(doc[field]) - } - }) - return doc - } catch (error) { - console.log(doc) - throw new Error('unable to upgrade doc') - } -} - -function _upgradeDate(date: any) { - if (typeof date === 'string') { - return new Date(date).toISOString() - } else if ( - date.hasOwnProperty('_seconds') && - date.hasOwnProperty('_nanoseconds') - ) { - const millis = date._seconds * 1000 + date._nanoseconds / 1e6 - return new Date(millis).toISOString() - } else { - throw new Error(`no date upgrade method: ${JSON.stringify(date)}`) - } -} - -type DBMapping = { [key in IDBEndpointV1]: IDBEndpointV2 } - -type IDBEndpointV1 = 'howtosV1' | 'users' | 'tagsV1' | 'eventsV1' - -type IDBEndpointV2 = 'v2_howtos' | 'v2_users' | 'v2_tags' | 'v2_events' diff --git a/functions/src/upgrade/dbv2Upgrade.ts b/functions/src/upgrade/dbv2Upgrade.ts deleted file mode 100644 index 4e7589b90f..0000000000 --- a/functions/src/upgrade/dbv2Upgrade.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { db } from '../Firebase/firestoreDB' - -/** - * Temporary function used to migrate from db V2 docs to V3 - Changes: - - Add moderation fields to how-tos, events, mappins, users (#847) - - Format usernames to slug format - - Add username display fields - - Update howto and event _createdBy to reflect new users - */ -export const upgradeV2DB = async () => { - const promises = Object.keys(mappings).map(async endpoint => { - const upgradedDocs = await upgradeDBEndpoint(endpoint as IDBEndpointV2) - return upgradedDocs - }) - const updates = await Promise.all(promises) - console.log('upgrade complete') - return updates -} - -const upgradeDBEndpoint = async (endpoint: IDBEndpointV2) => { - console.log('upgrading endpoint', endpoint) - const snap = await db.collection(endpoint).get() - const docs = snap.empty - ? [] - : snap.docs.map(d => { - return { ...(d.data() as any), _id: d.id } - }) - console.log(`|${endpoint}|: [${docs.length}] docs to upgrade`) - if (docs.length > 500) { - throw new Error('Too many docs for batch, chunking required') - } - const batch = db.batch() - // remove deleted docs and upgrade - const v3Docs = docs.filter(d => !d._deleted).map(d => upgrade(d, endpoint)) - const v2Endpoint = mappings[endpoint] - v3Docs.forEach(doc => { - const ref = db.doc(`${v2Endpoint}/${doc._id}`) - batch.set(ref, doc) - }) - console.log(`|${endpoint}|: upgrade ready`) - await batch.commit() - return v3Docs -} - -function upgrade(doc: any, endpoint: IDBEndpointV2) { - switch (endpoint) { - case 'v2_events': - return { - ...doc, - moderation: doc.moderation ? doc.moderation : 'accepted', - _createdBy: formatLowerNoSpecial(doc._createdBy), - } - case 'v2_howtos': - return { - ...doc, - moderation: doc.moderation ? doc.moderation : 'accepted', - _createdBy: formatLowerNoSpecial(doc._createdBy), - } - case 'v2_mappins': - return { - ...doc, - _id: formatLowerNoSpecial(doc._id), - moderation: doc.moderation ? doc.moderation : 'accepted', - _createdBy: formatLowerNoSpecial(doc._createdBy), - } - case 'v2_users': - return { - ...doc, - _id: formatLowerNoSpecial(doc._id), - displayName: doc.userName || doc._id || 'NA', - userName: formatLowerNoSpecial(doc.userName), - } - default: - return doc - } -} - -/***************************************************************************** - * Imported functions - note, direct import not working so copied from src - ******************************************************************************/ -// remove special characters from string, also replacing spaces with dashes -const stripSpecialCharacters = (text: string) => { - return text - ? text - .split(' ') - .join('-') - .replace(/[^a-zA-Z0-9_-]/gi, '') - : '' -} - -// convert to lower case and remove any special characters -const formatLowerNoSpecial = (text: string) => { - return stripSpecialCharacters(text).toLowerCase() -} - -/***************************************************************************** - * Constants & Types - ******************************************************************************/ -const mappings: { [key in IDBEndpointV2]: IDBEndpointV3 } = { - v2_events: 'v3_events', - v2_howtos: 'v3_howtos', - v2_mappins: 'v3_mappins', - v2_tags: 'v3_tags', - v2_users: 'v3_users', -} - -type IDBEndpointV2 = - | 'v2_events' - | 'v2_howtos' - | 'v2_mappins' - | 'v2_tags' - | 'v2_users' -type IDBEndpointV3 = - | 'v3_events' - | 'v3_howtos' - | 'v3_mappins' - | 'v3_tags' - | 'v3_users' diff --git a/functions/src/upgrade/dbv2UserFix.ts b/functions/src/upgrade/dbv2UserFix.ts deleted file mode 100644 index 16879aabce..0000000000 --- a/functions/src/upgrade/dbv2UserFix.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { db } from '../Firebase/firestoreDB' - -/** - * Temporary function used to migrate from db V2 docs to V3 - Changes: - - Add moderation fields to how-tos, events, mappins, users (#847) - - Format usernames to slug format - - Add username display fields - - Update howto and event _createdBy to reflect new users - */ - -export const fixV2User = async (username: string) => { - console.log('fixing user', username) - if (!username) { - return `no username provided` - } - const d = await db - .collection('v2_users') - .doc(username) - .get() - if (!d.exists) { - return `user with username [${username}] not found` - } - const doc = d.data() as any - console.log('user found, updating') - const newDoc = { - ...doc, - _id: formatLowerNoSpecial(doc._id), - _modified: new Date().toISOString(), - displayName: doc.userName || doc._id || 'NA', - userName: formatLowerNoSpecial(doc.userName), - } - await db - .collection('v3_users') - .doc(newDoc._id) - .set(newDoc) - return `[${username}] updated successfully. Try reloading the platform` -} - -/***************************************************************************** - * Imported functions - note, direct import not working so copied from src - ******************************************************************************/ -// remove special characters from string, also replacing spaces with dashes -const stripSpecialCharacters = (text: string) => { - return text - ? text - .split(' ') - .join('-') - .replace(/[^a-zA-Z0-9_-]/gi, '') - : '' -} - -// convert to lower case and remove any special characters -const formatLowerNoSpecial = (text: string) => { - return stripSpecialCharacters(text).toLowerCase() -} diff --git a/functions/src/userStats/index.ts b/functions/src/userStats/index.ts new file mode 100644 index 0000000000..ee55ae5daf --- /dev/null +++ b/functions/src/userStats/index.ts @@ -0,0 +1,70 @@ +import * as functions from 'firebase-functions' +import { db, getDoc } from '../Firebase/firestoreDB' +import { + IUserDB, + IDBDocChange, + DB_ENDPOINTS, + IHowtoDB, + IEventDB, +} from '../models' +export * from './migration' + +/** + * User-generated content stats + * Keep count of user contributions, including + * - total howtos created + * - total events created + */ + +/******************************************************************** + * Triggered functions + ********************************************************************/ +export const countHowTos = functions.firestore + .document(`${DB_ENDPOINTS.howtos}/{id}`) + .onWrite(async (change, context) => { + await updateStats(change, 'userCreatedHowtos') + }) + +export const countEvents = functions.firestore + .document(`${DB_ENDPOINTS.events}/{id}`) + .onWrite(async (change, context) => { + await updateStats(change, 'userCreatedEvents') + }) + +/******************************************************************** + * Helper functions + ********************************************************************/ +/** + * When a moderation status changes (including first created or deleted) + * update user stats to reflect content they have created + */ +async function updateStats( + change: IDBDocChange, + target: keyof IUserDB['stats'], +) { + const after: IHowtoDB | IEventDB = change.after.data() || ({} as any) + const before: IHowtoDB | IEventDB = change.before.data() || ({} as any) + if (after.moderation !== before.moderation) { + const userDoc = await db + .collection(DB_ENDPOINTS.users) + .doc(after._createdBy) + .get() + // only update if a user exists and stats have changed + if (userDoc.exists) { + const user = userDoc.data() as IUserDB + user.stats = user.stats || { + userCreatedEvents: {}, + userCreatedHowtos: {}, + } + user.stats[target] = { + ...user.stats[target], + [after._id]: after.moderation, + } + await userDoc.ref.set(user, { merge: true }) + } else { + throw new Error( + 'could not find user to update stats: ' + after._createdBy, + ) + } + } +} diff --git a/functions/src/userStats/migration.ts b/functions/src/userStats/migration.ts new file mode 100644 index 0000000000..9fb5aa49a3 --- /dev/null +++ b/functions/src/userStats/migration.ts @@ -0,0 +1,116 @@ +import * as functions from 'firebase-functions' +import { IUserDB, IHowtoDB, IEventDB, DB_ENDPOINTS } from '../models' +import { db, getCollection } from '../Firebase/firestoreDB' + +/** + * One-off script to migrate legacy content to new format + * Once run this code will be deprecated, but retained in case + * it can be used in future migrations + */ +export const migrateUserStats = functions.https.onCall( + async (data, context) => { + // Calculate how many events and howtos have been created by each user, + // and populate to a user.stats object accordingly + const allEvents = await getCollection('events') + const allEventsByUser = calcUserEvents(allEvents as any[]) + const allHowtos = await getCollection('howtos') + const allHowtosByUser = calcUserHowtos(allHowtos as any[]) + // create a unique array of users identifies from event and howto calc functions + const usersToUpdate = [ + ...new Set([ + ...Object.keys(allHowtosByUser), + ...Object.keys(allEventsByUser), + ]), + ] + // use hardcoded endpoint as this has now been updated in models to reflect new revision + // const allUsers: IUserDB[] = await getCollection('v3_users' as any) + // console.log(`migrating [${allUsers.length}] users`) + const batch = db.batch() + const operations = { updated: [], skipped: [] } + for (const userId of usersToUpdate) { + const ref = db.collection(DB_ENDPOINTS.users).doc(userId) + const userDoc = (await ref.get()).data() + if (userDoc) { + const update: Partial = { + stats: { + userCreatedEvents: allEventsByUser[userId] || {}, + userCreatedHowtos: allHowtosByUser[userId] || {}, + }, + _modified: new Date().toISOString(), + } + operations.updated.push({ ...update, _id: userId }) + batch.update(ref, update) + } else { + operations.skipped.push({ _id: userId }) + console.error('cannot find user', userId) + } + } + if (data.write) { + await batch.commit() + } + return { + _write: data.write, + operations, + meta: { allHowtosByUser, allHowtos, allEventsByUser, allEvents }, + } + /** + * No longer required - chunking writes + */ + // // split updates into chunks with sleep between commits to comply with firebase max writes + // // https://firebase.google.com/docs/firestore/quotas#writes_and_transactions + // const writeChunks = _splitArrayToChunks(userUpdates, 500) + // for (const chunk of writeChunks) { + // const batch = db.batch() + // chunk.forEach(user => + + // ) + // await batch.commit() + // await _sleep(1000) + // } + // } + }, +) + +/**************************************************************** + * Helper functions + ****************************************************************/ +/** + * Create a hashmap all all howtos, keyed by id and value moderation status + */ +function calcUserHowtos(howtos: IHowtoDB[]) { + const allHowTosByUser = {} + howtos.forEach(v => { + const createdBy = v._createdBy || '_anonymous' + allHowTosByUser[createdBy] = allHowTosByUser[createdBy] || {} + allHowTosByUser[createdBy][v._id] = v.moderation + }) + console.log('allHowTosByUser', allHowTosByUser) + return allHowTosByUser +} +/** + * Create a hashmap all events, keyed by id and value moderation status + */ +function calcUserEvents(events: IEventDB[]) { + const allEventsByUser = {} + events.forEach(v => { + const createdBy = v._createdBy || '_anonymous' + allEventsByUser[createdBy] = allEventsByUser[createdBy] || {} + allEventsByUser[createdBy][v._id] = v.moderation + }) + return allEventsByUser +} +/** + * Take a given array length n and split into an array of arrays, each with a maximum + * length provided by @param chunksize + */ +function _splitArrayToChunks(arr: T[], chunksize: number): T[][] { + let chunkedArrays = [] + for (let i = 0; i < arr.length; i += chunksize) { + chunkedArrays = arr.slice(i, i + chunksize) + } + return chunkedArrays +} + +function _sleep(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)) +} diff --git a/functions/src/userUpdates/backupUser.ts b/functions/src/userUpdates/backupUser.ts new file mode 100644 index 0000000000..54333df459 --- /dev/null +++ b/functions/src/userUpdates/backupUser.ts @@ -0,0 +1,17 @@ +import { DBDoc, IDBDocChange } from '../models' + +/** + * Automatically create user revision on update + * Nests revision as subcollection of original document, + * labeled by previous _modified timestamp + */ +export const backupUser = (change: IDBDocChange) => { + const { before, after } = change + const rev = before.data() as DBDoc + if (rev && rev._modified) { + return before.ref + .collection('revisions') + .doc(rev._modified) + .set(rev) + } +} diff --git a/functions/src/userUpdates/index.ts b/functions/src/userUpdates/index.ts new file mode 100644 index 0000000000..33046f247c --- /dev/null +++ b/functions/src/userUpdates/index.ts @@ -0,0 +1,65 @@ +import * as functions from 'firebase-functions' +import { db } from '../Firebase/firestoreDB' +import { IUserDB, IDBDocChange, DB_ENDPOINTS } from '../models' + +/********************************************************************* + * Side-effects to be carried out on various user updates, namely: + * - create user revision history + * - update map pin location on change + * - update howTo creator flag on change + *********************************************************************/ +export const handleUserUpdates = functions.firestore + .document(`${DB_ENDPOINTS.users}/{id}`) + .onUpdate(async (change, context) => { + await processCountryUpdates(change) + }) + +async function processCountryUpdates(change: IDBDocChange) { + const info = change.after.exists ? change.after.data() : {} + const prevInfo = change.before.exists ? change.before.data() : {} + // optional chaining (.?.) incase does not exists + const prevCountryCode = prevInfo.location?.countryCode + const newCountryCode = info.location?.countryCode + const prevCountry = prevInfo.country + const newCountry = info.country + if (prevCountryCode !== newCountryCode || prevCountry !== newCountry) { + const country = newCountryCode ? newCountryCode : newCountry.toLowerCase() + return updateHowTosCountry(info._id, country) + } +} + +async function updateHowTosCountry( + userId: string, + country: IUserDB['country'], +) { + if (!userId || !country) { + console.error('Missing information to set howToCountry') + return false + } + console.log('Update ', userId, ' moved to :', country) + + const querySnapshot = await db + .collection(DB_ENDPOINTS.howtos) + .where('_createdBy', '==', userId) + .get() + + if (querySnapshot) { + querySnapshot.forEach(doc => { + console.log('Updating howTo ', doc.data()._id, 'to', country) + doc.ref + .update({ creatorCountry: country }) + .then(() => { + console.log('Document successfully updated!') + return true + }) + .catch(error => { + console.error('Error updating HowToCountry: ', error) + return false + }) + }) + } else { + console.log('Error getting user howTo') + return false + } + return false +} diff --git a/functions/yarn.lock b/functions/yarn.lock index 56e264d39f..03f3fa6feb 100644 --- a/functions/yarn.lock +++ b/functions/yarn.lock @@ -28,31 +28,31 @@ resolved "https://registry.yarnpkg.com/@firebase/auth-interop-types/-/auth-interop-types-0.1.5.tgz#9fc9bd7c879f16b8d1bb08373a0f48c3a8b74557" integrity sha512-88h74TMQ6wXChPA6h9Q3E1Jg6TkTHep2+k63OWg3s0ozyGVMeY+TTOti7PFPzq5RhszQPQOoCi59es4MaRvgCw== -"@firebase/component@0.1.18": - version "0.1.18" - resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.1.18.tgz#28e69e54b79953376283464cb0543bde4c104140" - integrity sha512-c8gd1k/e0sbBTR0xkLIYUN8nVkA0zWxcXGIvdfYtGEsNw6n7kh5HkcxKXOPB8S7bcPpqZkGgBIfvd94IyG2gaQ== +"@firebase/component@0.1.19": + version "0.1.19" + resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.1.19.tgz#bd2ac601652c22576b574c08c40da245933dbac7" + integrity sha512-L0S3g8eqaerg8y0zox3oOHSTwn/FE8RbcRHiurnbESvDViZtP5S5WnhuAPd7FnFxa8ElWK0z1Tr3ikzWDv1xdQ== dependencies: - "@firebase/util" "0.3.1" + "@firebase/util" "0.3.2" tslib "^1.11.1" -"@firebase/database-types@0.5.2": +"@firebase/database-types@0.5.2", "@firebase/database-types@^0.5.2": version "0.5.2" resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-0.5.2.tgz#23bec8477f84f519727f165c687761e29958b63c" integrity sha512-ap2WQOS3LKmGuVFKUghFft7RxXTyZTDr0Xd8y2aqmWsbJVjgozi0huL/EUMgTjGFrATAjcf2A7aNs8AKKZ2a8g== dependencies: "@firebase/app-types" "0.6.1" -"@firebase/database@^0.6.0": - version "0.6.11" - resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.6.11.tgz#74a09d5f4769eb97c00bc2f7621f54efbccea6f2" - integrity sha512-QOHhB7+CdjVhEXG9CyX0roA9ARJcEuwbozz0Bix+ULuZqjQ58KUFHMH1apW6EEiUP22d/mYD7dNXsUGshjL9PA== +"@firebase/database@^0.6.10": + version "0.6.13" + resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.6.13.tgz#b96fe0c53757dd6404ee085fdcb45c0f9f525c17" + integrity sha512-NommVkAPzU7CKd1gyehmi3lz0K78q0KOfiex7Nfy7MBMwknLm7oNqKovXSgQV1PCLvKXvvAplDSFhDhzIf9obA== dependencies: "@firebase/auth-interop-types" "0.1.5" - "@firebase/component" "0.1.18" + "@firebase/component" "0.1.19" "@firebase/database-types" "0.5.2" "@firebase/logger" "0.2.6" - "@firebase/util" "0.3.1" + "@firebase/util" "0.3.2" faye-websocket "0.11.3" tslib "^1.11.1" @@ -61,90 +61,89 @@ resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.2.6.tgz#3aa2ca4fe10327cabf7808bd3994e88db26d7989" integrity sha512-KIxcUvW/cRGWlzK9Vd2KB864HlUnCfdTH0taHE0sXW5Xl7+W68suaeau1oKNEqmc3l45azkd4NzXTCWZRZdXrw== -"@firebase/util@0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.3.1.tgz#8c95152a00121bd31fb7c1fc6520ca208976e384" - integrity sha512-zjVd9rfL08dRRdZILFn1RZTHb1euCcnD9N/9P56gdBcm2bvT5XsCC4G6t5toQBpE/H/jYe5h6MZMqfLu3EQLXw== +"@firebase/util@0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.3.2.tgz#87de27f9cffc2324651cabf6ec133d0a9eb21b52" + integrity sha512-Dqs00++c8rwKky6KCKLLY2T1qYO4Q+X5t+lF7DInXDNF4ae1Oau35bkD+OpJ9u7l1pEv7KHowP6CUKuySCOc8g== dependencies: tslib "^1.11.1" -"@google-cloud/common@^2.1.1": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-2.4.0.tgz#2783b7de8435024a31453510f2dab5a6a91a4c82" - integrity sha512-zWFjBS35eI9leAHhjfeOYlK5Plcuj/77EzstnrJIZbKgF/nkqjcQuGiMCpzCwOfPyUbz8ZaEOYgbHa759AKbjg== +"@google-cloud/common@^3.3.0": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-3.4.1.tgz#a1920d73c38437923b4b134e245c392d36c442e9" + integrity sha512-e5z0CwsM0RXky+PnyPtQ3QK46ksqm+kE7kX8pm8X+ddBwZJipHchKeazMM5fLlGCS+AALalzXb+uYmH72TRnpQ== dependencies: - "@google-cloud/projectify" "^1.0.0" - "@google-cloud/promisify" "^1.0.0" - arrify "^2.0.0" - duplexify "^3.6.0" + "@google-cloud/projectify" "^2.0.0" + "@google-cloud/promisify" "^2.0.0" + arrify "^2.0.1" + duplexify "^4.1.1" ent "^2.2.0" extend "^3.0.2" - google-auth-library "^5.5.0" - retry-request "^4.0.0" - teeny-request "^6.0.0" + google-auth-library "^6.1.1" + retry-request "^4.1.1" + teeny-request "^7.0.0" -"@google-cloud/firestore@^3.0.0": - version "3.8.6" - resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-3.8.6.tgz#9e6dea57323a5824563430a759244825fb01d834" - integrity sha512-ox80NbrM1MLJgvAAUd1quFLx/ie/nSjrk1PtscSicpoYDlKb9e6j7pHrVpbopBMyliyfNl3tLJWaDh+x+uCXqw== +"@google-cloud/firestore@^4.0.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-4.4.0.tgz#6cdbd462f32a8f94e138c57ef81195156c79e680" + integrity sha512-nixsumd4C7eL+hHEgyihspzhBBNe3agsvNFRX0xfqO3uR/6ro4CUj9XdcCvdnSSd3yTyqKfdBSRK2fEj1jIbYg== dependencies: - deep-equal "^2.0.0" + fast-deep-equal "^3.1.1" functional-red-black-tree "^1.0.1" - google-gax "^1.15.3" - readable-stream "^3.4.0" - through2 "^3.0.0" + google-gax "^2.2.0" -"@google-cloud/paginator@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@google-cloud/paginator/-/paginator-2.0.0.tgz#187af93634341e79cf1d41dccde5c9082508a0f2" - integrity sha512-droVsitvSUGSoMV7Hbk2B5dCFkZIz9YNu3D1AxgFh+hmbSEWJ9SgB/M3WrU8CUx3pseH7IbLuq8jgs3HEFzeHw== +"@google-cloud/paginator@^3.0.0": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@google-cloud/paginator/-/paginator-3.0.5.tgz#9d6b96c421a89bd560c1bc2c197c7611ef21db6c" + integrity sha512-N4Uk4BT1YuskfRhKXBs0n9Lg2YTROZc6IMpkO/8DIHODtm5s3xY8K5vVBo23v/2XulY3azwITQlYWgT4GdLsUw== dependencies: arrify "^2.0.0" - extend "^3.0.1" + extend "^3.0.2" -"@google-cloud/projectify@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@google-cloud/projectify/-/projectify-1.0.1.tgz#f654c2ea9de923294ec814ff07c42891abf2d143" - integrity sha512-xknDOmsMgOYHksKc1GPbwDLsdej8aRNIA17SlSZgQdyrcC0lx0OGo4VZgYfwoEU1YS8oUxF9Y+6EzDOb0eB7Xg== +"@google-cloud/projectify@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@google-cloud/projectify/-/projectify-2.0.1.tgz#13350ee609346435c795bbfe133a08dfeab78d65" + integrity sha512-ZDG38U/Yy6Zr21LaR3BTiiLtpJl6RkPS/JwoRT453G+6Q1DhlV0waNf8Lfu+YVYGIIxgKnLayJRfYlFJfiI8iQ== -"@google-cloud/promisify@^1.0.0": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@google-cloud/promisify/-/promisify-1.0.2.tgz#e581aa79ff71fb6074acc1cc59e3d81bf84ce07b" - integrity sha512-7WfV4R/3YV5T30WRZW0lqmvZy9hE2/p9MvpI34WuKa2Wz62mLu5XplGTFEMK6uTbJCLWUxTcZ4J4IyClKucE5g== +"@google-cloud/promisify@^2.0.0": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@google-cloud/promisify/-/promisify-2.0.3.tgz#f934b5cdc939e3c7039ff62b9caaf59a9d89e3a8" + integrity sha512-d4VSA86eL/AFTe5xtyZX+ePUjE8dIFu2T8zmdeNBSa5/kNgXPCx/o/wbFNHAGLJdGnk1vddRuMESD9HbOC8irw== -"@google-cloud/storage@^4.1.2": - version "4.7.0" - resolved "https://registry.yarnpkg.com/@google-cloud/storage/-/storage-4.7.0.tgz#a7466086a83911c7979cc238d00a127ffb645615" - integrity sha512-f0guAlbeg7Z0m3gKjCfBCu7FG9qS3M3oL5OQQxlvGoPtK7/qg3+W+KQV73O2/sbuS54n0Kh2mvT5K2FWzF5vVQ== +"@google-cloud/storage@^5.3.0": + version "5.3.0" + resolved "https://registry.yarnpkg.com/@google-cloud/storage/-/storage-5.3.0.tgz#cf86683911cce68829e46de544abb41947d29da2" + integrity sha512-3t5UF3SZ14Bw2kcBHubCai6EIugU2GnQOstYWVSFuoO8IJ94RAaIOPq/dtexvQbUTpBTAGpd5smVR9WPL1mJVw== dependencies: - "@google-cloud/common" "^2.1.1" - "@google-cloud/paginator" "^2.0.0" - "@google-cloud/promisify" "^1.0.0" + "@google-cloud/common" "^3.3.0" + "@google-cloud/paginator" "^3.0.0" + "@google-cloud/promisify" "^2.0.0" arrify "^2.0.0" compressible "^2.0.12" concat-stream "^2.0.0" - date-and-time "^0.13.0" + date-and-time "^0.14.0" duplexify "^3.5.0" extend "^3.0.2" gaxios "^3.0.0" - gcs-resumable-upload "^2.2.4" + gcs-resumable-upload "^3.1.0" hash-stream-validation "^0.2.2" mime "^2.2.0" mime-types "^2.0.8" onetime "^5.1.0" - p-limit "^2.2.0" + p-limit "^3.0.1" pumpify "^2.0.0" - readable-stream "^3.4.0" snakeize "^0.1.0" stream-events "^1.0.1" - through2 "^3.0.0" xdg-basedir "^4.0.0" -"@grpc/grpc-js@~1.0.3": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.0.5.tgz#09948c0810e62828fdd61455b2eb13d7879888b0" - integrity sha512-Hm+xOiqAhcpT9RYM8lc15dbQD7aQurM7ZU8ulmulepiPlN7iwBXXwP3vSBUimoFoApRqz7pSIisXU8pZaCB4og== +"@grpc/grpc-js@~1.1.1": + version "1.1.7" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.1.7.tgz#d3d71c6da95397e2d63895ccc4a05e7572f7b7e6" + integrity sha512-EuxMstI0u778dp0nk6Fe3gHXYPeV6FYsWOe0/QFwxv1NQ6bc5Wl/0Yxa4xl9uBlKElL6AIxuASmSfu7KEJhqiw== dependencies: + "@grpc/proto-loader" "^0.6.0-pre14" + "@types/node" "^12.12.47" + google-auth-library "^6.0.0" semver "^6.2.0" "@grpc/proto-loader@^0.5.1": @@ -155,6 +154,17 @@ lodash.camelcase "^4.3.0" protobufjs "^6.8.6" +"@grpc/proto-loader@^0.6.0-pre14": + version "0.6.0-pre9" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.6.0-pre9.tgz#0c6fe42f6c5ef9ce1b3cef7be64d5b09d6fe4d6d" + integrity sha512-oM+LjpEjNzW5pNJjt4/hq1HYayNeQT+eGrOPABJnYHv7TyNPDNzkQ76rDYZF86X5swJOa4EujEMzQ9iiTdPgww== + dependencies: + "@types/long" "^4.0.1" + lodash.camelcase "^4.3.0" + long "^4.0.0" + protobufjs "^6.9.0" + yargs "^15.3.1" + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -240,17 +250,17 @@ dependencies: "@types/node" "*" -"@types/cors@^2.8.5": - version "2.8.5" - resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.5.tgz#c0c54c4e643e1d943d447292f2baf9dc82cfc8ec" - integrity sha512-GmK8AKu8i+s+EChK/uZ5IbrXPcPaQKWaNSGevDT/7o3gFObwSUQwqb1jMqxuo+YPvj0ckGzINI+EO7EHcmJjKg== +"@types/cors@^2.8.8": + version "2.8.8" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.8.tgz#317a8d8561995c60e35b9e0fcaa8d36660c98092" + integrity sha512-fO3gf3DxU2Trcbr75O7obVndW/X5k8rJNZkLXlQWStTHhP71PkRqjwPIEI0yMnJdg9R9OasjU+Bsr+Hr1xy/0w== dependencies: "@types/express" "*" -"@types/dateformat@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/dateformat/-/dateformat-3.0.0.tgz#d3cbfa8ac3789990592f3d9585331cdb2c5f979f" - integrity sha512-4N/J/ISasvUYOPnr5gfYRp+YYmPhHqkAyUgP9T9/HQHFoIfjU53lt3jaX67VuTvhpF5WsyNlCcEFbpI3spdxEA== +"@types/dateformat@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/dateformat/-/dateformat-3.0.1.tgz#98d747a2e5e9a56070c6bf14e27bff56204e34cc" + integrity sha512-KlPPdikagvL6ELjWsljbyDIPzNCeliYkqRpI+zea99vBBbCIA5JNshZAwQKTON139c87y9qvTFVgkFd14rtS4g== "@types/express-serve-static-core@*": version "4.16.7" @@ -260,7 +270,7 @@ "@types/node" "*" "@types/range-parser" "*" -"@types/express@*", "@types/express@^4.17.0": +"@types/express@*": version "4.17.0" resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.0.tgz#49eaedb209582a86f12ed9b725160f12d04ef287" integrity sha512-CjaMu57cjgjuZbh9DpkloeGxV45CnMGlVd+XpG7Gm9QgVrd7KFq+X4HY0vM+2v0bczS48Wg7bvnMY5TN+Xmcfw== @@ -269,17 +279,19 @@ "@types/express-serve-static-core" "*" "@types/serve-static" "*" -"@types/fs-extra@^5.0.5": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.1.0.tgz#2a325ef97901504a3828718c390d34b8426a10a1" - integrity sha512-AInn5+UBFIK9FK5xc9yP5e3TQSPNNgjHByqYcj9g5elVBnDQcQL7PlO1CIRy2gWlbwK7UPYqi7vRvFA44dCmYQ== +"@types/express@4.17.3": + version "4.17.3" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.3.tgz#38e4458ce2067873b09a73908df488870c303bd9" + integrity sha512-I8cGRJj3pyOLs/HndoP+25vOqhqWkAZsWMEmq1qXy/b/M3ppufecUwaK2/TVDVxcV61/iSdhykUjQQ2DLSrTdg== dependencies: - "@types/node" "*" + "@types/body-parser" "*" + "@types/express-serve-static-core" "*" + "@types/serve-static" "*" -"@types/fs-extra@^8.0.1": - version "8.1.1" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.1.tgz#1e49f22d09aa46e19b51c0b013cb63d0d923a068" - integrity sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w== +"@types/fs-extra@^9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.2.tgz#e1e1b578c48e8d08ae7fc36e552b94c6f4621609" + integrity sha512-jp0RI6xfZpi5JL8v7WQwpBEQTq63RqW2kxwTZt+m27LcJqQdPVU1yGnT1ZI4EtCDynQQJtIGyQahkiCGCS7e+A== dependencies: "@types/node" "*" @@ -308,25 +320,30 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.15.tgz#e8f7729b631be1b02ae130ff0b61f3e018000640" integrity sha512-CBR5avlLcu0YCILJiDIXeU2pTw7UK/NIxfC63m7d7CVamho1qDEzXKkOtEauQRPMy6MI8mLozth+JJkas7HY6g== +"@types/node@^10.10.0": + version "10.17.39" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.39.tgz#ce1122758d0608de8303667cebf171f44192629b" + integrity sha512-dJLCxrpQmgyxYGcl0Ae9MTsQgI22qHHcGFj/8VKu7McJA5zQpnuGjoksnxbo1JxSjW/Nahnl13W8MYZf01CZHA== + +"@types/node@^12.12.47": + version "12.12.67" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.67.tgz#4f86badb292e822e3b13730a1f9713ed2377f789" + integrity sha512-R48tgL2izApf+9rYNH+3RBMbRpPeW3N8f0I9HMhggeq4UXwBDqumJ14SDs4ctTMhG11pIOduZ4z3QWGOiMc9Vg== + "@types/node@^13.7.0": version "13.13.16" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.16.tgz#66f2177047b61131eaac18c47eb25d6f1317070a" integrity sha512-dJ9vXxJ8MEwzNn4GkoAGauejhXoKuJyYKegsA6Af25ZpEDXomeVXt5HUWUNVHk5UN7+U0f6ghC6otwt+7PdSDg== -"@types/node@^8.10.59": - version "8.10.63" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.63.tgz#f86775d576bc07a2992da244f41c23d3ba66d402" - integrity sha512-g+nSkeHFDd2WOQChfmy9SAXLywT47WZBrGS/NC5ym5PJ8c8RC6l4pbGaUW/X0+eZJnXw6/AVNEouXWhV4iz72Q== - "@types/range-parser@*": version "1.2.3" resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== -"@types/request@^2.48.3": - version "2.48.3" - resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.3.tgz#970b8ed2317568c390361d29c555a95e74bd6135" - integrity sha512-3Wo2jNYwqgXcIz/rrq18AdOZUQB8cQ34CXZo+LUwPJNpvRAL86+Kc2wwI8mqpz9Cr1V+enIox5v+WZhy/p3h8w== +"@types/request@^2.48.5": + version "2.48.5" + resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.5.tgz#019b8536b402069f6d11bee1b2c03e7f232937a0" + integrity sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ== dependencies: "@types/caseless" "*" "@types/node" "*" @@ -341,10 +358,10 @@ "@types/express-serve-static-core" "*" "@types/mime" "*" -"@types/sharp@^0.22.1": - version "0.22.2" - resolved "https://registry.yarnpkg.com/@types/sharp/-/sharp-0.22.2.tgz#c9b613816ec000d94f153259b25ae41f874a75f5" - integrity sha512-oH49f42h3nf/qys0weYsaTGiMv67wPB769ynCoPfBAVwjjxFF3QtIPEe3MfhwyNjQAhQhTEfnmMKvVZfcFkhIw== +"@types/sharp@^0.26.0": + version "0.26.0" + resolved "https://registry.yarnpkg.com/@types/sharp/-/sharp-0.26.0.tgz#2fa8419dbdaca8dd38f73888b27b207f188a8669" + integrity sha512-oJrR8eiwpL7qykn2IeFRduXM4za7z+7yOUEbKVtuDQ/F6htDLHYO6IbzhaJQHV5n6O3adIh4tJvtgPyLyyydqg== dependencies: "@types/node" "*" @@ -375,27 +392,22 @@ agent-base@6: dependencies: debug "4" -agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -ajv@^6.5.5: - version "6.10.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" - integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== +ajv@^6.12.3: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: - fast-deep-equal "^2.0.1" + fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ansi-escapes@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" - integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== +ansi-escapes@^4.3.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + dependencies: + type-fest "^0.11.0" ansi-regex@^2.0.0: version "2.1.1" @@ -412,6 +424,11 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -419,6 +436,13 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + aproba@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -439,17 +463,12 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -array-filter@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" - integrity sha1-uveeYubvTCpMC4MSMtr/7CUfnYM= - array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= -arrify@^2.0.0: +arrify@^2.0.0, arrify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== @@ -466,17 +485,20 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -available-typed-arrays@^1.0.0, available-typed-arrays@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz#6b098ca9d8039079ee3f77f7b783c4480ba513f5" - integrity sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ== - dependencies: - array-filter "^1.0.0" +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== aws-sign2@~0.7.0: version "0.7.0" @@ -496,13 +518,12 @@ axios@*: follow-redirects "1.5.10" is-buffer "^2.0.2" -axios@^0.18.0, axios@^0.18.1: - version "0.18.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" - integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g== +axios@^0.20.0: + version "0.20.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.20.0.tgz#057ba30f04884694993a8cd07fa394cff11c50bd" + integrity sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA== dependencies: - follow-redirects "1.5.10" - is-buffer "^2.0.2" + follow-redirects "^1.10.0" balanced-match@^1.0.0: version "1.0.0" @@ -521,10 +542,10 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -bignumber.js@^7.0.0: - version "7.2.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" - integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== +bignumber.js@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" + integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== bl@^3.0.0: version "3.0.1" @@ -533,7 +554,7 @@ bl@^3.0.0: dependencies: readable-stream "^3.0.1" -body-parser@1.19.0, body-parser@^1.18.3: +body-parser@1.19.0, body-parser@^1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== @@ -587,7 +608,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.1: +chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -601,26 +622,30 @@ chownr@^1.1.1: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.2.tgz#a18f1e0b269c8a6a5d3c86eb298beb14c3dd7bf6" integrity sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A== -chownr@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" - integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== dependencies: - restore-cursor "^2.0.0" + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" code-point-at@^1.0.0: version "1.1.0" @@ -634,12 +659,19 @@ color-convert@^1.9.0, color-convert@^1.9.1: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-name@^1.0.0: +color-name@^1.0.0, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== @@ -694,20 +726,20 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" -concurrently@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-4.1.1.tgz#42cf84d625163f3f5b2e2262568211ad76e1dbe8" - integrity sha512-48+FE5RJ0qc8azwKv4keVQWlni1hZeSjcWr8shBelOBtBHcKj1aJFM9lHRiSc1x7lq416pkvsqfBMhSRja+Lhw== +concurrently@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-5.3.0.tgz#7500de6410d043c912b2da27de3202cb489b1e7b" + integrity sha512-8MhqOB6PWlBfA2vJ8a0bSFKATOdWlHiQlk11IfmQBPaHVP8oP2gsh2MObE6UR3hqDHqvaIvLTyceNW6obVuFHQ== dependencies: - chalk "^2.4.1" - date-fns "^1.23.0" - lodash "^4.17.10" + chalk "^2.4.2" + date-fns "^2.0.1" + lodash "^4.17.15" read-pkg "^4.0.1" - rxjs "^6.3.3" + rxjs "^6.5.2" spawn-command "^0.0.2-1" - supports-color "^4.5.0" - tree-kill "^1.1.0" - yargs "^12.0.1" + supports-color "^6.1.0" + tree-kill "^1.2.2" + yargs "^13.3.0" configstore@^5.0.0: version "5.0.0" @@ -761,17 +793,6 @@ cors@^2.8.5: object-assign "^4" vary "^1" -cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - crypto-random-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" @@ -784,15 +805,15 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -date-and-time@^0.13.0: - version "0.13.1" - resolved "https://registry.yarnpkg.com/date-and-time/-/date-and-time-0.13.1.tgz#d12ba07ac840d5b112dc4c83f8a03e8a51f78dd6" - integrity sha512-/Uge9DJAT+s+oAcDxtBhyR8+sKjUnZbYmyhbmWjTHNtX7B7oWD8YyYdeXcBRbwSj6hVvj+IQegJam7m7czhbFw== +date-and-time@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/date-and-time/-/date-and-time-0.14.1.tgz#969634697b78956fb66b8be6fb0f39fbd631f2f6" + integrity sha512-M4RggEH5OF2ZuCOxgOU67R6Z9ohjKbxGvAQz48vj53wLmL0bAgumkBvycR32f30pK+Og9pIR+RFDyChbaE4oLA== -date-fns@^1.23.0: - version "1.30.1" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" - integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== +date-fns@^2.0.1: + version "2.16.1" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.16.1.tgz#05775792c3f3331da812af253e1a935851d3834b" + integrity sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ== dateformat@^3.0.3: version "3.0.3" @@ -820,13 +841,6 @@ debug@=3.1.0: dependencies: ms "2.0.0" -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -839,45 +853,18 @@ decompress-response@^3.3.0: dependencies: mimic-response "^1.0.0" -decompress-response@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" - integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== dependencies: - mimic-response "^2.0.0" - -deep-equal@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.3.tgz#cad1c15277ad78a5c01c49c2dee0f54de8a6a7b0" - integrity sha512-Spqdl4H+ky45I9ByyJtXteOm9CaIrPmnIPmOhrkKGNYWeDgCvJ8jNYVCTjChxW4FqGuZnLHADc8EKRMX6+CgvA== - dependencies: - es-abstract "^1.17.5" - es-get-iterator "^1.1.0" - is-arguments "^1.0.4" - is-date-object "^1.0.2" - is-regex "^1.0.5" - isarray "^2.0.5" - object-is "^1.1.2" - object-keys "^1.1.1" - object.assign "^4.1.0" - regexp.prototype.flags "^1.3.0" - side-channel "^1.0.2" - which-boxed-primitive "^1.0.1" - which-collection "^1.0.1" - which-typed-array "^1.1.2" + mimic-response "^3.1.0" deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== -define-properties@^1.1.2, define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -910,10 +897,10 @@ dicer@^0.3.0: dependencies: streamsearch "0.1.2" -diff@^3.2.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== dot-prop@^5.1.0: version "5.2.0" @@ -922,7 +909,7 @@ dot-prop@^5.1.0: dependencies: is-obj "^2.0.0" -duplexify@^3.5.0, duplexify@^3.6.0: +duplexify@^3.5.0: version "3.7.1" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== @@ -932,7 +919,7 @@ duplexify@^3.5.0, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" -duplexify@^4.1.1: +duplexify@^4.0.0, duplexify@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.1.tgz#7027dc374f157b122a8ae08c2d3ea4d2d953aa61" integrity sha512-DY3xVEmVHTv1wSzKNbwoU6nVjzI369Y6sPoqfYr0/xlx3IdX2n94xIszTcjPO8W8ZIv0Wb0PXNcjuZyT4wiICA== @@ -967,6 +954,11 @@ emoji-regex@^7.0.1: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -991,75 +983,6 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0-next.1, es-abstract@^1.17.4, es-abstract@^1.17.5: - version "1.17.6" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" - integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.0" - is-regex "^1.1.0" - object-inspect "^1.7.0" - object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.18.0-next.0: - version "1.18.0-next.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.0.tgz#b302834927e624d8e5837ed48224291f2c66e6fc" - integrity sha512-elZXTZXKn51hUBdJjSZGYRujuzilgXo8vSPQzjGYXLvSlGiCo8VO8ZGV3kjo9a0WNJJ57hENagwbtlRuHuzkcQ== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.0" - is-negative-zero "^2.0.0" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-get-iterator@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8" - integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ== - dependencies: - es-abstract "^1.17.4" - has-symbols "^1.0.1" - is-arguments "^1.0.4" - is-map "^2.0.1" - is-set "^2.0.1" - is-string "^1.0.5" - isarray "^2.0.5" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es6-promise@^4.0.3: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -1090,25 +1013,12 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - expand-template@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== -express@^4.16.4, express@^4.17.1: +express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== @@ -1144,7 +1054,7 @@ express@^4.16.4, express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" -extend@^3.0.1, extend@^3.0.2, extend@~3.0.2: +extend@^3.0.2, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== @@ -1159,10 +1069,10 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-json-stable-stringify@^2.0.0: version "2.0.0" @@ -1201,29 +1111,37 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -firebase-admin@^8.3.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/firebase-admin/-/firebase-admin-8.13.0.tgz#997d34ae8357d7dc162ba622148bbebcf7f2e923" - integrity sha512-krXj5ncWMJBhCpXSn9UFY6zmDWjFjqgx+1e9ATXKFYndEjmKtNBuJzqdrAdDh7aTUR7X6+0TPx4Hbc08kd0lwQ== +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +firebase-admin@^9.2.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/firebase-admin/-/firebase-admin-9.2.0.tgz#df5176e2d0c5711df6dbf7012320492a703538ea" + integrity sha512-LhnMYl71B4gP1FlTLfwaYlOWhBCAcNF+byb2CPTfaW/T4hkp4qlXOgo2bws/zbAv5X9GTFqGir3KexMslVGsIA== dependencies: - "@firebase/database" "^0.6.0" - "@types/node" "^8.10.59" + "@firebase/database" "^0.6.10" + "@firebase/database-types" "^0.5.2" + "@types/node" "^10.10.0" dicer "^0.3.0" jsonwebtoken "^8.5.1" - node-forge "^0.7.6" + node-forge "^0.10.0" optionalDependencies: - "@google-cloud/firestore" "^3.0.0" - "@google-cloud/storage" "^4.1.2" + "@google-cloud/firestore" "^4.0.0" + "@google-cloud/storage" "^5.3.0" -firebase-functions@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/firebase-functions/-/firebase-functions-3.2.0.tgz#c4c01ea2f97aafb7aa45776eaff52a0f7f44678e" - integrity sha512-v61CXYFSb53SdSSqwc/QhdBrR+H0bhwxSOIhKIYFFa2m5APUsuj8SrkAOBL2CfOJo3yk7+nuuWOtz16JFaXLxg== +firebase-functions@^3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/firebase-functions/-/firebase-functions-3.11.0.tgz#92f5a6af6a10641da6dc9b41b29974658b621a7b" + integrity sha512-i1uMhZ/M6i5SCI3ulKo7EWX0/LD+I5o6N+sk0HbOWfzyWfOl0iJTvQkR3BVDcjrlhPVC4xG1bDTLxd+DTkLqaw== dependencies: - "@types/express" "^4.17.0" + "@types/express" "4.17.3" cors "^2.8.5" express "^4.17.1" - jsonwebtoken "^8.5.1" lodash "^4.17.14" follow-redirects@1.5.10: @@ -1233,10 +1151,10 @@ follow-redirects@1.5.10: dependencies: debug "=3.1.0" -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= +follow-redirects@^1.10.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" + integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== forever-agent@~0.6.1: version "0.6.1" @@ -1276,32 +1194,21 @@ 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@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-minipass@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.0.0.tgz#a6415edab02fae4b9e9230bc87ee2e4472003cd1" - integrity sha512-40Qz+LFXmd9tzYVnnBmZvFfvAADfUA14TXPK1s7IfElJTIZ97rA8w4Kin7Wt5JBrC3ShnnFJO/5vPjPEeJIq9A== +fs-extra@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" + integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== dependencies: - minipass "^3.0.0" + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^1.0.0" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" @@ -1321,30 +1228,10 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -gaxios@^1.0.2, gaxios@^1.0.4, gaxios@^1.2.1, gaxios@^1.2.2: - version "1.8.4" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-1.8.4.tgz#e08c34fe93c0a9b67a52b7b9e7a64e6435f9a339" - integrity sha512-BoENMnu1Gav18HcpV9IleMPZ9exM+AvUjrAOV4Mzs/vfz2Lu/ABv451iEXByKiMPn2M140uul1txXCg83sAENw== - dependencies: - abort-controller "^3.0.0" - extend "^3.0.2" - https-proxy-agent "^2.2.1" - node-fetch "^2.3.0" - -gaxios@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-2.0.1.tgz#2ca1c9eb64c525d852048721316c138dddf40708" - integrity sha512-c1NXovTxkgRJTIgB2FrFmOFg4YIV6N/bAa4f/FZ4jIw13Ql9ya/82x69CswvotJhbV3DiGnlTZwoq2NVXk2Irg== - dependencies: - abort-controller "^3.0.0" - extend "^3.0.2" - https-proxy-agent "^2.2.1" - node-fetch "^2.3.0" - -gaxios@^2.1.0: - version "2.3.4" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-2.3.4.tgz#eea99353f341c270c5f3c29fc46b8ead56f0a173" - integrity sha512-US8UMj8C5pRnao3Zykc4AAVr+cffoNKRTg9Rsf2GiuZCW69vgJj38VK2PzlPuQU73FZ/nTk9/Av6/JGcE1N9vA== +gaxios@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-3.1.0.tgz#95f65f5a335f61aff602fe124cfdba8524f765fa" + integrity sha512-DDTn3KXVJJigtz+g0J3vhcfbDbKtAroSTxauWsdnP57sM5KZ3d2c/3D9RKFJ86s43hfw6WULg6TXYw/AYiBlpA== dependencies: abort-controller "^3.0.0" extend "^3.0.2" @@ -1352,10 +1239,10 @@ gaxios@^2.1.0: is-stream "^2.0.0" node-fetch "^2.3.0" -gaxios@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-3.1.0.tgz#95f65f5a335f61aff602fe124cfdba8524f765fa" - integrity sha512-DDTn3KXVJJigtz+g0J3vhcfbDbKtAroSTxauWsdnP57sM5KZ3d2c/3D9RKFJ86s43hfw6WULg6TXYw/AYiBlpA== +gaxios@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-3.2.0.tgz#11b6f0e8fb08d94a10d4d58b044ad3bec6dd486a" + integrity sha512-+6WPeVzPvOshftpxJwRi2Ozez80tn/hdtOUag7+gajDHRJvAblKxTFSSMPtr2hmnLy7p0mvYz0rMXLBl8pSO7Q== dependencies: abort-controller "^3.0.0" extend "^3.0.2" @@ -1363,54 +1250,31 @@ gaxios@^3.0.0: is-stream "^2.0.0" node-fetch "^2.3.0" -gcp-metadata@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-0.7.0.tgz#6c35dbb52bda32a427bb9c98f54237ddd1b5406f" - integrity sha512-ffjC09amcDWjh3VZdkDngIo7WoluyC5Ag9PAYxZbmQLOLNI8lvPtoKTSCyU54j2gwy5roZh6sSMTfkY2ct7K3g== - dependencies: - axios "^0.18.0" - extend "^3.0.1" - retry-axios "0.3.2" - -gcp-metadata@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-1.0.0.tgz#5212440229fa099fc2f7c2a5cdcb95575e9b2ca6" - integrity sha512-Q6HrgfrCQeEircnNP3rCcEgiDv7eF9+1B+1MMgpE190+/+0mjQR8PxeOaRgxZWmdDAF9EIryHB9g1moPiw1SbQ== - dependencies: - gaxios "^1.0.2" - json-bigint "^0.3.0" - -gcp-metadata@^3.4.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-3.5.0.tgz#6d28343f65a6bbf8449886a0c0e4a71c77577055" - integrity sha512-ZQf+DLZ5aKcRpLzYUyBS3yo3N0JSa82lNDO8rj3nMSlovLcz2riKFBsYgDzeXcv75oo5eqB2lx+B14UvPoCRnA== +gcp-metadata@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-4.2.0.tgz#3b424355ccdc240ee07c5791e2fd6a60a283d89a" + integrity sha512-vQZD57cQkqIA6YPGXM/zc+PIZfNRFdukWGsGZ5+LcJzesi5xp6Gn7a02wRJi4eXPyArNMIYpPET4QMxGqtlk6Q== dependencies: - gaxios "^2.1.0" - json-bigint "^0.3.0" + gaxios "^3.0.0" + json-bigint "^1.0.0" -gcs-resumable-upload@^2.2.4: - version "2.3.3" - resolved "https://registry.yarnpkg.com/gcs-resumable-upload/-/gcs-resumable-upload-2.3.3.tgz#02c616ed17eff6676e789910aeab3907d412c5f8" - integrity sha512-sf896I5CC/1AxeaGfSFg3vKMjUq/r+A3bscmVzZm10CElyRanN0XwPu/MxeIO4LSP+9uF6yKzXvNsaTsMXUG6Q== +gcs-resumable-upload@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/gcs-resumable-upload/-/gcs-resumable-upload-3.1.1.tgz#67c766a0555d6a352f9651b7603337207167d0de" + integrity sha512-RS1osvAicj9+MjCc6jAcVL1Pt3tg7NK2C2gXM5nqD1Gs0klF2kj5nnAFSBy97JrtslMIQzpb7iSuxaG8rFWd2A== dependencies: abort-controller "^3.0.0" configstore "^5.0.0" - gaxios "^2.0.0" - google-auth-library "^5.0.0" + extend "^3.0.2" + gaxios "^3.0.0" + google-auth-library "^6.0.0" pumpify "^2.0.0" stream-events "^1.0.4" -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-stream@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== getpass@^0.1.1: version "0.1.7" @@ -1436,128 +1300,81 @@ glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" -google-auth-library@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-2.0.2.tgz#7a315d2036744af6afcad87b210ee6638b40f57b" - integrity sha512-FURxmo1hBVmcfLauuMRKOPYAPKht3dGuI2wjeJFalDUThO0HoYVjr4yxt5cgYSFm1dgUpmN9G/poa7ceTFAIiA== - dependencies: - axios "^0.18.0" - gcp-metadata "^0.7.0" - gtoken "^2.3.0" - https-proxy-agent "^2.2.1" - jws "^3.1.5" - lru-cache "^5.0.0" - semver "^5.5.0" - -google-auth-library@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-3.1.2.tgz#ff2f88cd5cd2118a57bd3d5ad3c093c8837fc350" - integrity sha512-cDQMzTotwyWMrg5jRO7q0A4TL/3GWBgO7I7q5xGKNiiFf9SmGY/OJ1YsLMgI2MVHHsEGyrqYnbnmV1AE+Z6DnQ== - dependencies: - base64-js "^1.3.0" - fast-text-encoding "^1.0.0" - gaxios "^1.2.1" - gcp-metadata "^1.0.0" - gtoken "^2.3.2" - https-proxy-agent "^2.2.1" - jws "^3.1.5" - lru-cache "^5.0.0" - semver "^5.5.0" - -google-auth-library@^5.0.0, google-auth-library@^5.5.0: - version "5.10.1" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-5.10.1.tgz#504ec75487ad140e68dd577c21affa363c87ddff" - integrity sha512-rOlaok5vlpV9rSiUu5EpR0vVpc+PhN62oF4RyX/6++DG1VsaulAFEMlDYBLjJDDPI6OcNOCGAKy9UVB/3NIDXg== +google-auth-library@^6.0.0, google-auth-library@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-6.1.1.tgz#e1882ac22e8a073dd7a7296e500d5c0c6dc21933" + integrity sha512-0WfExOx3FrLYnY88RICQxvpaNzdwjz44OsHqHkIoAJfjY6Jck6CZRl1ASWadk+wbJ0LhkQ8rNY4zZebKml4Ghg== dependencies: arrify "^2.0.0" base64-js "^1.3.0" ecdsa-sig-formatter "^1.0.11" fast-text-encoding "^1.0.0" - gaxios "^2.1.0" - gcp-metadata "^3.4.0" - gtoken "^4.1.0" + gaxios "^3.0.0" + gcp-metadata "^4.1.0" + gtoken "^5.0.4" jws "^4.0.0" - lru-cache "^5.0.0" + lru-cache "^6.0.0" -google-gax@^1.15.3: - version "1.15.3" - resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-1.15.3.tgz#e88cdcbbd19c7d88cc5fd7d7b932c4d1979a5aca" - integrity sha512-3JKJCRumNm3x2EksUTw4P1Rad43FTpqrtW9jzpf3xSMYXx+ogaqTM1vGo7VixHB4xkAyATXVIa3OcNSh8H9zsQ== +google-gax@^2.2.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-2.9.0.tgz#84edef8715d82c0f91a6e5485b8f2803d2690f00" + integrity sha512-MFMwA7Fb8PEwjnYwfGXjZMidCNyMl3gSnvS/+kS8TQioJZQDpzK+W3dmwyNyig/U13+kbABqDnbkkAXJ5NiUkw== dependencies: - "@grpc/grpc-js" "~1.0.3" + "@grpc/grpc-js" "~1.1.1" "@grpc/proto-loader" "^0.5.1" - "@types/fs-extra" "^8.0.1" "@types/long" "^4.0.0" abort-controller "^3.0.0" - duplexify "^3.6.0" - google-auth-library "^5.0.0" + duplexify "^4.0.0" + google-auth-library "^6.0.0" is-stream-ended "^0.1.4" - lodash.at "^4.6.0" - lodash.has "^4.5.2" - node-fetch "^2.6.0" - protobufjs "^6.8.9" + node-fetch "^2.6.1" + protobufjs "^6.9.0" retry-request "^4.0.0" - semver "^6.0.0" - walkdir "^0.4.0" - -google-p12-pem@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-1.0.4.tgz#b77fb833a2eb9f7f3c689e2e54f095276f777605" - integrity sha512-SwLAUJqUfTB2iS+wFfSS/G9p7bt4eWcc2LyfvmUXe7cWp6p3mpxDo6LLI29MXdU6wvPcQ/up298X7GMC5ylAlA== - dependencies: - node-forge "^0.8.0" - pify "^4.0.0" -google-p12-pem@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-2.0.1.tgz#509f9415e50c9bdf76de8150a825f9e97cba2c57" - integrity sha512-6h6x+eBX3k+IDSe/c8dVYmn8Mzr1mUcmKC9MdUSwaBkFAXlqBEnwFWmSFgGC+tcqtsLn73BDP/vUNWEehf1Rww== +google-p12-pem@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-3.0.3.tgz#673ac3a75d3903a87f05878f3c75e06fc151669e" + integrity sha512-wS0ek4ZtFx/ACKYF3JhyGe5kzH7pgiQ7J5otlumqR9psmWMYc+U9cErKlCYVYHoUaidXHdZ2xbo34kB+S+24hA== dependencies: - node-forge "^0.8.0" + node-forge "^0.10.0" -googleapis-common@^0.7.0: - version "0.7.2" - resolved "https://registry.yarnpkg.com/googleapis-common/-/googleapis-common-0.7.2.tgz#a694f55d979cb7c2eac21a0e0439af12f9b418ba" - integrity sha512-9DEJIiO4nS7nw0VE1YVkEfXEj8x8MxsuB+yZIpOBULFSN9OIKcUU8UuKgSZFU4lJmRioMfngktrbkMwWJcUhQg== +googleapis-common@^4.4.0: + version "4.4.1" + resolved "https://registry.yarnpkg.com/googleapis-common/-/googleapis-common-4.4.1.tgz#ded785eefdbe629b313f566c3049d5613ae7a9ac" + integrity sha512-F1QcH8oU7TOuZex9p+XW7TeyLY0332NwBwJ3dZoN+51pXZXB5JjrKswrpgbhuREuIe8xAy8J1rlmFqxeP2mFfA== dependencies: - gaxios "^1.2.2" - google-auth-library "^3.0.0" - pify "^4.0.0" - qs "^6.5.2" + extend "^3.0.2" + gaxios "^3.2.0" + google-auth-library "^6.0.0" + qs "^6.7.0" url-template "^2.0.8" - uuid "^3.2.1" + uuid "^8.0.0" -googleapis@^39.1.0: - version "39.1.0" - resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-39.1.0.tgz#7a89092e9cc64b25dde4503db606032e3514444d" - integrity sha512-MRO9rW7izUIBZ4NJ67FNhBUw/Q3ki7hk149E9MhphJnLw1CStUAnm9nFD/IpNnx97qx2WBa7dLPjeXrJky6xlw== +googleapis@^61.0.0: + version "61.0.0" + resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-61.0.0.tgz#90f2ff37fda7f4f524c478188ebc67e7fb1a37b9" + integrity sha512-aXaNgWKaALiYrfwrJ0ZYhRo2abyIBcqUjyNMgkbghKJMiCeOwcktlaGseH6JbPlCxXYCE8ZDfvAQqVNsf+6/RA== dependencies: - google-auth-library "^3.0.0" - googleapis-common "^0.7.0" + google-auth-library "^6.0.0" + googleapis-common "^4.4.0" graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.2.1" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.1.tgz#1c1f0c364882c868f5bff6512146328336a11b1d" integrity sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw== -gtoken@^2.3.0, gtoken@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-2.3.3.tgz#8a7fe155c5ce0c4b71c886cfb282a9060d94a641" - integrity sha512-EaB49bu/TCoNeQjhCYKI/CurooBKkGxIqFHsWABW0b25fobBYVTMe84A8EBVVZhl8emiUdNypil9huMOTmyAnw== - dependencies: - gaxios "^1.0.4" - google-p12-pem "^1.0.0" - jws "^3.1.5" - mime "^2.2.0" - pify "^4.0.0" +graceful-fs@^4.2.0: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== -gtoken@^4.1.0: - version "4.1.4" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-4.1.4.tgz#925ff1e7df3aaada06611d30ea2d2abf60fcd6a7" - integrity sha512-VxirzD0SWoFUo5p8RDP8Jt2AGyOmyYcT/pOUgDKJCK+iSw0TMqwrVfY37RXTNmoKwrzmDHSk0GMT9FsgVmnVSA== +gtoken@^5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-5.0.4.tgz#e8d7456ad2ff774c70176e56b9d34b1c63fb6f0b" + integrity sha512-U9wnSp4GZ7ov6zRdPuRHG4TuqEWqRRgT1gfXGNArhzBUn9byrPeH8uTmBWU/ZiWJJvTEmkjhDIC3mqHWdVi3xQ== dependencies: - gaxios "^2.1.0" - google-p12-pem "^2.0.0" + gaxios "^3.0.0" + google-p12-pem "^3.0.3" jws "^4.0.0" mime "^2.2.0" @@ -1566,41 +1383,24 @@ har-schema@^2.0.0: resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= -har-validator@~5.1.0: - version "5.1.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" - integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== dependencies: - ajv "^6.5.5" + ajv "^6.12.3" har-schema "^2.0.0" -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= -has-symbols@^1.0.0, has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== - has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - hash-stream-validation@^0.2.2: version "0.2.4" resolved "https://registry.yarnpkg.com/hash-stream-validation/-/hash-stream-validation-0.2.4.tgz#ee68b41bf822f7f44db1142ec28ba9ee7ccb7512" @@ -1656,14 +1456,6 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-proxy-agent@^2.2.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -1707,21 +1499,11 @@ ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== -invert-kv@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" - integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== - ipaddr.js@1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== -is-arguments@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" - integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== - is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -1732,31 +1514,11 @@ is-arrayish@^0.3.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== -is-bigint@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.0.tgz#73da8c33208d00f130e9b5e15d23eac9215601c4" - integrity sha512-t5mGUXC/xRheCK431ylNiSkGGpBp8bHENBcENTkDT6ppwPzEVxNGZRvgvmOEfbWkFhA7D2GEuE2mmQTr78sl2g== - -is-boolean-object@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.1.tgz#10edc0900dd127697a92f6f9807c7617d68ac48e" - integrity sha512-TqZuVwa/sppcrhUCAYkGBk7w0yxfQQnxq28fjkO53tnK9FQXmdwz2JS5+GjsWQ6RByES1K40nI+yDic5c9/aAQ== - is-buffer@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725" integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw== -is-callable@^1.1.4, is-callable@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" - integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== - -is-date-object@^1.0.1, is-date-object@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" @@ -1769,105 +1531,36 @@ is-fullwidth-code-point@^2.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= -is-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1" - integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw== - -is-negative-zero@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" - integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE= - -is-number-object@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" - integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw== +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== is-obj@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-regex@^1.0.5, is-regex@^1.1.0, is-regex@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== - dependencies: - has-symbols "^1.0.1" - -is-set@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43" - integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA== - is-stream-ended@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-stream-ended/-/is-stream-ended-0.1.4.tgz#f50224e95e06bce0e356d440a4827cd35b267eda" integrity sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw== -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - is-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== -is-string@^1.0.4, is-string@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" - integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== - -is-symbol@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - dependencies: - has-symbols "^1.0.1" - -is-typed-array@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.3.tgz#a4ff5a5e672e1a55f99c7f54e59597af5c1df04d" - integrity sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ== - dependencies: - available-typed-arrays "^1.0.0" - es-abstract "^1.17.4" - foreach "^2.0.5" - has-symbols "^1.0.1" - is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-weakmap@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" - integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== - -is-weakset@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.1.tgz#e9a0af88dbd751589f5e50d80f4c98b780884f83" - integrity sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw== - -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -1891,12 +1584,12 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -json-bigint@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-0.3.0.tgz#0ccd912c4b8270d05f056fbd13814b53d3825b1e" - integrity sha1-DM2RLEuCcNBfBW+9E4FLU9OCWx4= +json-bigint@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1" + integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ== dependencies: - bignumber.js "^7.0.0" + bignumber.js "^9.0.0" json-parse-better-errors@^1.0.1: version "1.0.2" @@ -1918,10 +1611,12 @@ json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= +jsonfile@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" + integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + dependencies: + universalify "^1.0.0" optionalDependencies: graceful-fs "^4.1.6" @@ -1969,7 +1664,7 @@ jwa@^2.0.0: ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" -jws@^3.1.5, jws@^3.2.2: +jws@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== @@ -1985,13 +1680,6 @@ jws@^4.0.0: jwa "^2.0.0" safe-buffer "^5.0.1" -lcid@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" - integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== - dependencies: - invert-kv "^2.0.0" - locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -2000,21 +1688,18 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" -lodash.at@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.at/-/lodash.at-4.6.0.tgz#93cdce664f0a1994ea33dd7cd40e23afd11b0ff8" - integrity sha1-k83OZk8KGZTqM9181A4jr9EbD/g= +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= -lodash.has@^4.5.2: - version "4.5.2" - resolved "https://registry.yarnpkg.com/lodash.has/-/lodash.has-4.5.2.tgz#d19f4dc1095058cccbe2b0cdf4ee0fe4aa37c862" - integrity sha1-0Z9NwQlQWMzL4rDN9O4P5Ko3yGI= - lodash.includes@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" @@ -2050,31 +1735,37 @@ lodash.once@^4.0.0: resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= -lodash@^4.17.10, lodash@^4.17.14: +lodash@^4.17.14: version "4.17.19" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== -log-update@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-3.2.0.tgz#719f24293250d65d0165f4e2ec2ed805ff062eec" - integrity sha512-KJ6zAPIHWo7Xg1jYror6IUDFJBq1bQ4Bi4wAEp2y/0ScjBBVi/g0thr0sUVhuvuXauWzczt7T2QHghPDNnKBuw== +lodash@^4.17.15: + version "4.17.20" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" + integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== + +log-update@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== dependencies: - ansi-escapes "^3.2.0" - cli-cursor "^2.1.0" - wrap-ansi "^5.0.0" + ansi-escapes "^4.3.0" + cli-cursor "^3.1.0" + slice-ansi "^4.0.0" + wrap-ansi "^6.2.0" long@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== -lru-cache@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: - yallist "^3.0.2" + yallist "^4.0.0" make-dir@^3.0.0: version "3.0.0" @@ -2083,27 +1774,11 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" -map-age-cleaner@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== - dependencies: - p-defer "^1.0.0" - media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -mem@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" - integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== - dependencies: - map-age-cleaner "^0.1.1" - mimic-fn "^2.0.0" - p-is-promise "^2.0.0" - merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -2148,12 +1823,7 @@ mime@^2.2.0: resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -mimic-fn@^2.0.0, mimic-fn@^2.1.0: +mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== @@ -2163,10 +1833,10 @@ mimic-response@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== -mimic-response@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.0.0.tgz#996a51c60adf12cb8a87d7fb8ef24c2f3d5ebb46" - integrity sha512-8ilDoEapqA4uQ3TwS0jakGONKXVJqpy+RpM+3b7pLdOjghCrEiGp9SRkFbUHAmZW9vdnrENWHjaweIoTIJExSQ== +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== minimatch@^3.0.4: version "3.0.4" @@ -2185,28 +1855,30 @@ minimist@^1.2.0: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= -minipass@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.1.tgz#7607ce778472a185ad6d89082aa2070f79cedcd5" - integrity sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w== - dependencies: - yallist "^4.0.0" +minimist@^1.2.3, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minizlib@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.0.tgz#fd52c645301ef09a63a2c209697c294c6ce02cf3" - integrity sha512-EzTZN/fjSvifSX0SlqUERCN39o6T40AMarPbv0MrarSFtIITCBh7bi+dU8nxGFHuqs9jdIAeoYoKuQAAASsPPA== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" +mkdirp-classic@^0.5.2: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== -mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" +mkdirp@^0.5.3: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -2222,11 +1894,6 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -nan@^2.14.0: - version "2.14.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" - integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== - napi-build-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.1.tgz#1381a0f92c39d66bf19852e7873432fc2123e508" @@ -2237,11 +1904,6 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - node-abi@^2.7.0: version "2.10.0" resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.10.0.tgz#894bc6625ee042627ed9b5e9270d80bb63ef5045" @@ -2249,20 +1911,20 @@ node-abi@^2.7.0: dependencies: semver "^5.4.1" -node-fetch@^2.2.0, node-fetch@^2.3.0, node-fetch@^2.6.0: +node-addon-api@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.0.2.tgz#04bc7b83fd845ba785bb6eae25bc857e1ef75681" + integrity sha512-+D4s2HCnxPd5PjjI0STKwncjXTUKKqm74MDMz9OPXavjsGmjkvwgLtA5yoxJUdmpj52+2u+RrXgPipahKczMKg== + +node-fetch@^2.3.0, node-fetch@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== -node-forge@^0.7.6: - version "0.7.6" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.6.tgz#fdf3b418aee1f94f0ef642cd63486c77ca9724ac" - integrity sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw== - -node-forge@^0.8.0: - version "0.8.5" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.5.tgz#57906f07614dc72762c84cef442f427c0e1b86ee" - integrity sha512-vFMQIWt+J/7FLNyKouZ9TazT74PRV3wgv9UT4cRjC8BffxFbKXkgIWR42URCPSnHm/QDz6BOlb2Q0U4+VQT67Q== +node-forge@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" + integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA== noop-logger@^0.1.1: version "0.1.1" @@ -2279,13 +1941,6 @@ normalize-package-data@^2.3.2: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - npmlog@^4.0.1, npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" @@ -2311,34 +1966,6 @@ object-assign@^4, object-assign@^4.1.0: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -object-inspect@^1.7.0, object-inspect@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" - integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== - -object-is@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6" - integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -2353,13 +1980,6 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - dependencies: - mimic-fn "^1.0.0" - onetime@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" @@ -2367,30 +1987,6 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -os-locale@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" - integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== - dependencies: - execa "^1.0.0" - lcid "^2.0.0" - mem "^4.0.0" - -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-is-promise@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" - integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== - p-limit@^2.0.0, p-limit@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.0.tgz#417c9941e6027a9abcba5092dd2904e255b5fbc2" @@ -2398,6 +1994,13 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.0.2.tgz#1664e010af3cadc681baafd3e2a437be7b0fb5fe" + integrity sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg== + dependencies: + p-try "^2.0.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -2405,6 +2008,13 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -2428,16 +2038,16 @@ path-exists@^3.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" @@ -2458,20 +2068,15 @@ pify@^3.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= -pify@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -prebuild-install@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.3.tgz#ef4052baac60d465f5ba6bf003c9c1de79b9da8e" - integrity sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g== +prebuild-install@^5.3.5: + version "5.3.5" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.5.tgz#e7e71e425298785ea9d22d4f958dbaccf8bb0e1b" + integrity sha512-YmMO7dph9CYKi5IR/BzjOJlRzpxGGVo1EsLSUZ0mt/Mq0HWZIHOKHHcHdT69yG54C9m6i45GpItwRHpk0Py7Uw== dependencies: detect-libc "^1.0.3" expand-template "^2.0.3" github-from-package "0.0.0" - minimist "^1.2.0" + minimist "^1.2.3" mkdirp "^0.5.1" napi-build-utils "^1.0.1" node-abi "^2.7.0" @@ -2508,7 +2113,7 @@ protobufjs@^6.8.6: "@types/node" "^10.1.0" long "^4.0.0" -protobufjs@^6.8.9: +protobufjs@^6.9.0: version "6.10.1" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.10.1.tgz#e6a484dd8f04b29629e9053344e3970cccf13cd2" integrity sha512-pb8kTchL+1Ceg4lFd5XUpK8PdWacbvV5SK2ULH2ebrYtl4GjJmS24m6CKME67jzV53tbJxHlnNOSqQHbTsR9JQ== @@ -2535,10 +2140,10 @@ proxy-addr@~2.0.5: forwarded "~0.1.2" ipaddr.js "1.9.0" -psl@^1.1.24: - version "1.5.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.5.0.tgz#47fd1292def7fdb1e138cd78afa8814cebcf7b13" - integrity sha512-4vqUjKi2huMu1OJiLhi3jN6jeeKvMZdI1tYgi/njW5zV52jNLgSAZSdN16m9bJFe61/cT8ulmw4qFitV9QRsEA== +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== pump@^3.0.0: version "3.0.0" @@ -2557,21 +2162,21 @@ pumpify@^2.0.0: inherits "^2.0.3" pump "^3.0.0" -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - -punycode@^2.1.0: +punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -qs@6.7.0, qs@^6.5.2: +qs@6.7.0: version "6.7.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== +qs@^6.7.0: + version "6.9.4" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.4.tgz#9090b290d1f91728d3c22e54843ca44aea5ab687" + integrity sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ== + qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" @@ -2611,7 +2216,7 @@ read-pkg@^4.0.1: parse-json "^4.0.0" pify "^3.0.0" -"readable-stream@2 || 3", readable-stream@^3.0.1, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0: +"readable-stream@2 || 3", readable-stream@^3.0.1, readable-stream@^3.0.2, readable-stream@^3.1.1: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -2633,18 +2238,10 @@ readable-stream@^2.0.0, readable-stream@^2.0.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" -regexp.prototype.flags@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" - integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - -request@^2.88.0: - version "2.88.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" - integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== +request@^2.88.2: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -2653,7 +2250,7 @@ request@^2.88.0: extend "~3.0.2" forever-agent "~0.6.1" form-data "~2.3.2" - har-validator "~5.1.0" + har-validator "~5.1.3" http-signature "~1.2.0" is-typedarray "~1.0.0" isstream "~0.1.2" @@ -2663,7 +2260,7 @@ request@^2.88.0: performance-now "^2.1.0" qs "~6.5.2" safe-buffer "^5.1.2" - tough-cookie "~2.4.3" + tough-cookie "~2.5.0" tunnel-agent "^0.6.0" uuid "^3.3.2" @@ -2672,10 +2269,10 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== resolve@^1.10.0, resolve@^1.3.2: version "1.12.0" @@ -2684,19 +2281,14 @@ resolve@^1.10.0, resolve@^1.3.2: dependencies: path-parse "^1.0.6" -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== dependencies: - onetime "^2.0.0" + onetime "^5.1.0" signal-exit "^3.0.2" -retry-axios@0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/retry-axios/-/retry-axios-0.3.2.tgz#5757c80f585b4cc4c4986aa2ffd47a60c6d35e13" - integrity sha512-jp4YlI0qyDFfXiXGhkCOliBN1G7fRH03Nqy8YdShzGqbY5/9S2x/IR6C88ls2DFkbWuL3ASkP7QD3pVrNpPgwQ== - retry-request@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-4.1.1.tgz#f676d0db0de7a6f122c048626ce7ce12101d2bd8" @@ -2705,10 +2297,17 @@ retry-request@^4.0.0: debug "^4.1.1" through2 "^3.0.1" -rxjs@^6.3.3: - version "6.5.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7" - integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg== +retry-request@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-4.1.3.tgz#d5f74daf261372cff58d08b0a1979b4d7cab0fde" + integrity sha512-QnRZUpuPNgX0+D1xVxul6DbJ9slvo4Rm6iV/dn63e048MvGbUZiKySVt6Tenp04JqmchxjiLltGerOJys7kJYQ== + dependencies: + debug "^4.1.1" + +rxjs@^6.5.2: + version "6.6.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" + integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== dependencies: tslib "^1.9.0" @@ -2737,16 +2336,21 @@ safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: +semver@^5.3.0, semver@^5.4.1, semver@^5.6.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -2786,41 +2390,21 @@ setprototypeof@1.1.1: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== -sharp@^0.23.3: - version "0.23.3" - resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.23.3.tgz#549770a4c671b9bd221f00639452a3eb803a0ed1" - integrity sha512-pjT4zyviQteXMC1Z8USIiSwQFQbZTlU5J59/UoygE25hh+sSb7PSYI/MZ2MCB1COtxWQuoUAaG3TYIOLon26Mg== +sharp@^0.26.1: + version "0.26.1" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.26.1.tgz#084e3447ba17f1baf3e3f2e08305ed7aec236ce9" + integrity sha512-9MhwS4ys8pnwBH7MtnBdLzUv+cb24QC4xbzzQL6A+1MQ4Se2V6oPHEX8TIGIZUPRKi6S1kJPVNzt/Xqqp6/H3Q== dependencies: color "^3.1.2" detect-libc "^1.0.3" - nan "^2.14.0" + node-addon-api "^3.0.2" npmlog "^4.1.2" - prebuild-install "^5.3.3" - semver "^6.3.0" - simple-get "^3.1.0" - tar "^5.0.5" + prebuild-install "^5.3.5" + semver "^7.3.2" + simple-get "^4.0.0" + tar-fs "^2.1.0" tunnel-agent "^0.6.0" -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -side-channel@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.3.tgz#cdc46b057550bbab63706210838df5d4c19519c3" - integrity sha512-A6+ByhlLkksFoUepsGxfj5x1gTSrs+OydsRptUxeNCabQpCFUvcwIczgOigI8vhY/OJCnPnyE9rGiwgvr9cS1g== - dependencies: - es-abstract "^1.18.0-next.0" - object-inspect "^1.8.0" - signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -2840,12 +2424,12 @@ simple-get@^3.0.3: once "^1.3.1" simple-concat "^1.0.0" -simple-get@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3" - integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== +simple-get@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.0.tgz#73fa628278d21de83dadd5512d2cc1f4872bd675" + integrity sha512-ZalZGexYr3TA0SwySsr5HlgOOinS4Jsa8YB2GJ6lUNAazyAu4KG/VmzMTwAt2YVXzzVj8QmefmAonZIK2BSGcQ== dependencies: - decompress-response "^4.2.0" + decompress-response "^6.0.0" once "^1.3.1" simple-concat "^1.0.0" @@ -2856,6 +2440,15 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + snakeize@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/snakeize/-/snakeize-0.1.0.tgz#10c088d8b58eb076b3229bb5a04e232ce126422d" @@ -2943,7 +2536,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2": version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -2951,7 +2544,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0: +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" integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== @@ -2960,21 +2553,14 @@ string-width@^3.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string.prototype.trimend@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" - integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - -string.prototype.trimstart@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" - integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" string_decoder@^1.1.1: version "1.3.0" @@ -3004,17 +2590,19 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.0.0, strip-ansi@^5.1.0: +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== dependencies: ansi-regex "^4.1.0" -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" strip-json-comments@~2.0.1: version "2.0.1" @@ -3026,13 +2614,6 @@ stubs@^3.0.0: resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" integrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls= -supports-color@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" - integrity sha1-vnoN5ITexcXN34s9WRJQRJEvY1s= - dependencies: - has-flag "^2.0.0" - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -3040,6 +2621,13 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + tar-fs@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.0.0.tgz#677700fc0c8b337a78bee3623fdc235f21d7afad" @@ -3050,6 +2638,16 @@ tar-fs@^2.0.0: pump "^3.0.0" tar-stream "^2.0.0" +tar-fs@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.0.tgz#d1cdd121ab465ee0eb9ccde2d35049d3f3daf0d5" + integrity sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.0.0" + tar-stream@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.0.tgz#d1aaa3661f05b38b5acc9b7020efdca5179a2cc3" @@ -3061,30 +2659,18 @@ tar-stream@^2.0.0: inherits "^2.0.3" readable-stream "^3.1.1" -tar@^5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/tar/-/tar-5.0.5.tgz#03fcdb7105bc8ea3ce6c86642b9c942495b04f93" - integrity sha512-MNIgJddrV2TkuwChwcSNds/5E9VijOiw7kAc1y5hTNJoLDSuIyid2QtLYiCYNnICebpuvjhPQZsXwUL0O3l7OQ== - dependencies: - chownr "^1.1.3" - fs-minipass "^2.0.0" - minipass "^3.0.0" - minizlib "^2.1.0" - mkdirp "^0.5.0" - yallist "^4.0.0" - -teeny-request@^6.0.0: - version "6.0.3" - resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-6.0.3.tgz#b617f9d5b7ba95c76a3f257f6ba2342b70228b1f" - integrity sha512-TZG/dfd2r6yeji19es1cUIwAlVD8y+/svB1kAC2Y0bjEyysrfbO8EZvJBRwIE6WkwmUoB7uvWLwTIhJbMXZ1Dw== +teeny-request@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-7.0.1.tgz#bdd41fdffea5f8fbc0d29392cb47bec4f66b2b4c" + integrity sha512-sasJmQ37klOlplL4Ia/786M5YlOcoLGQyq2TE4WHSRupbAuDaQW0PfVxV4MtdBtRJ4ngzS+1qim8zP6Zp35qCw== dependencies: http-proxy-agent "^4.0.0" https-proxy-agent "^5.0.0" - node-fetch "^2.2.0" + node-fetch "^2.6.1" stream-events "^1.0.5" - uuid "^7.0.0" + uuid "^8.0.0" -through2@^3.0.0, through2@^3.0.1: +through2@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== @@ -3096,15 +2682,15 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== dependencies: - psl "^1.1.24" - punycode "^1.4.1" + psl "^1.1.28" + punycode "^2.1.1" -tree-kill@^1.1.0: +tree-kill@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== @@ -3114,28 +2700,33 @@ tslib@^1.11.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== -tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.13.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^1.8.1, tslib@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== -tslint@^5.12.0: - version "5.18.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.18.0.tgz#f61a6ddcf372344ac5e41708095bbf043a147ac6" - integrity sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w== +tslint@^6.1.3: + version "6.1.3" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904" + integrity sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg== dependencies: "@babel/code-frame" "^7.0.0" builtin-modules "^1.1.1" chalk "^2.3.0" commander "^2.12.1" - diff "^3.2.0" + diff "^4.0.1" glob "^7.1.1" js-yaml "^3.13.1" minimatch "^3.0.4" - mkdirp "^0.5.1" + mkdirp "^0.5.3" resolve "^1.3.2" semver "^5.3.0" - tslib "^1.8.0" + tslib "^1.13.0" tsutils "^2.29.0" tsutils@^2.29.0: @@ -3157,6 +2748,11 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== + type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -3177,10 +2773,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.7.4: - version "3.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" - integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== +typescript@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5" + integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg== unique-string@^2.0.0: version "2.0.0" @@ -3189,10 +2785,10 @@ unique-string@^2.0.0: dependencies: crypto-random-string "^2.0.0" -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" + integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" @@ -3221,15 +2817,15 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.2.1, uuid@^3.3.2: +uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== -uuid@^7.0.0: - version "7.0.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" - integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== +uuid@^8.0.0: + version "8.3.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" + integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== validate-npm-package-license@^3.0.1: version "3.0.4" @@ -3253,11 +2849,6 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -walkdir@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/walkdir/-/walkdir-0.4.1.tgz#dc119f83f4421df52e3061e514228a2db20afa39" - integrity sha512-3eBwRyEln6E1MSzcxcVpQIhRG8Q1jLvEqRmCZqS3dsfXEDR/AhOF4d+jHg1qvDCpYaVRZjENPQyrVxAkQqxPgQ== - websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" @@ -3272,27 +2863,6 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== -which-boxed-primitive@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.1.tgz#cbe8f838ebe91ba2471bb69e9edbda67ab5a5ec1" - integrity sha512-7BT4TwISdDGBgaemWU0N0OU7FeAEJ9Oo2P1PHRm/FCWoEi2VLWC9b6xvxAA3C/NMpxg3HXVgi0sMmGbNUbNepQ== - dependencies: - is-bigint "^1.0.0" - is-boolean-object "^1.0.0" - is-number-object "^1.0.3" - is-string "^1.0.4" - is-symbol "^1.0.2" - -which-collection@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" - integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== - dependencies: - is-map "^2.0.1" - is-set "^2.0.1" - is-weakmap "^2.0.1" - is-weakset "^2.0.1" - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -3303,25 +2873,6 @@ which-pm-runs@^1.0.0: resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= -which-typed-array@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.2.tgz#e5f98e56bda93e3dac196b01d47c1156679c00b2" - integrity sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ== - dependencies: - available-typed-arrays "^1.0.2" - es-abstract "^1.17.5" - foreach "^2.0.5" - function-bind "^1.1.1" - has-symbols "^1.0.1" - is-typed-array "^1.1.3" - -which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" @@ -3329,15 +2880,7 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrap-ansi@^5.0.0: +wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== @@ -3346,6 +2889,15 @@ wrap-ansi@^5.0.0: string-width "^3.0.0" strip-ansi "^5.0.0" +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -3366,43 +2918,61 @@ xdg-basedir@^4.0.0: resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== -"y18n@^3.2.1 || ^4.0.0": +y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== -yallist@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" - integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== - yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" - integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== +yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== dependencies: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@^12.0.1: - version "12.0.5" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" - integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== dependencies: - cliui "^4.0.0" + camelcase "^5.0.0" decamelize "^1.2.0" + +yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" find-up "^3.0.0" - get-caller-file "^1.0.1" - os-locale "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@^15.3.1: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" require-directory "^2.1.1" - require-main-filename "^1.0.1" + require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^2.0.0" + string-width "^4.2.0" which-module "^2.0.0" - y18n "^3.2.1 || ^4.0.0" - yargs-parser "^11.1.1" + y18n "^4.0.0" + yargs-parser "^18.1.2" diff --git a/scripts/test.e2e.js b/scripts/test.e2e.js index 8c80454c22..4122d3a3f9 100644 --- a/scripts/test.e2e.js +++ b/scripts/test.e2e.js @@ -1,5 +1,6 @@ const child = require('child_process') const e2eEnv = require('dotenv').config({ path: `${process.cwd()}/.env.e2e` }) +const fs = require('fs') // Prevent unhandled errors being silently ignored process.on('unhandledRejection', err => { @@ -19,6 +20,11 @@ async function main() { const isCi = process.argv[2] === 'ci' const DB_PREFIX = `${randomString(5)}_` const sharedEnv = `REACT_APP_DB_PREFIX=${DB_PREFIX} REACT_APP_SITE_VARIANT=test-ci` + // copy endpoints for use in testing + fs.copyFileSync( + 'src/stores/databaseV2/endpoints.ts', + 'cypress/support/db/endpoints.ts', + ) const cyEnv = getCypressEnv(sharedEnv) const appStart = `cross-env ${sharedEnv} BROWSER=none PORT=3456 npm run start` const waitForStart = 'http-get://localhost:3456' diff --git a/src/models/common.models.tsx b/src/models/common.models.tsx index 428919b5f6..d1e7f086de 100644 --- a/src/models/common.models.tsx +++ b/src/models/common.models.tsx @@ -1,18 +1,15 @@ +// re-imports and re-exports import { DBDoc as DBDocImport } from '../stores/databaseV2/types' -import { DBEndpoint } from '../stores/databaseV2/' -import { DB_PREFIX as DB_PREFIX_IMPORT } from '../stores/databaseV2/config' +export type DBDoc = DBDocImport +import { DBEndpoint } from '../stores/databaseV2/endpoints' +export { DB_ENDPOINTS } from '../stores/databaseV2/endpoints' +export type IDBEndpoint = DBEndpoint // A reminder that dates should be saved in the ISOString format // i.e. new Date().toISOString() => 2011-10-05T14:48:00.000Z // This is more consistent than others and allows better querying export type ISODateString = string -// Simply re-exported main database endpoints for convenience -// and re-import into functions -export type IDBEndpoint = DBEndpoint -export const DB_PREFIX = DB_PREFIX_IMPORT -export type DBDoc = DBDocImport - // Types for moderation status export type IModerationStatus = | 'draft' diff --git a/src/models/index.ts b/src/models/index.ts new file mode 100644 index 0000000000..516366fcc9 --- /dev/null +++ b/src/models/index.ts @@ -0,0 +1,10 @@ +// Re-export all other files for easy access +export * from './common.models' +export * from './events.models' +export * from './howto.models' +export * from './maps.models' +export * from './project.models' +export * from './selectorList.models' +export * from './tags.model' +export * from './user.models' +export * from './user_pp.models' diff --git a/src/models/user.models.tsx b/src/models/user.models.tsx index 666f0415db..314933532b 100644 --- a/src/models/user.models.tsx +++ b/src/models/user.models.tsx @@ -52,9 +52,12 @@ interface IExternalLink { | 'instagram' } +/** + * Track the ids and moderation status as summary for user stats + */ interface IUserStats { - howToCount: number - eventCount: number + userCreatedHowtos: { [id: string]: IModerationStatus } + userCreatedEvents: { [id: string]: IModerationStatus } } export type IUserDB = IUser & DBDoc diff --git a/src/pages/Howto/Content/Howto/HowtoDescription/HowtoDescription.tsx b/src/pages/Howto/Content/Howto/HowtoDescription/HowtoDescription.tsx index d181f37a52..c4c95301a5 100644 --- a/src/pages/Howto/Content/Howto/HowtoDescription/HowtoDescription.tsx +++ b/src/pages/Howto/Content/Howto/HowtoDescription/HowtoDescription.tsx @@ -53,6 +53,7 @@ export default class HowtoDescription extends React.PureComponent { return ( )} */} - {user.stats.howToCount > 0 && ( + {howtoCount > 0 && ( - How-to: {user.stats.howToCount} + How-to: {howtoCount} )} - {user.stats.eventCount > 0 && ( + {eventCount > 0 && ( - Events: {user.stats.eventCount} + Events: {eventCount} )} @@ -399,7 +405,8 @@ export class UserPage extends React.Component< const shouldRenderUserStatsBox = user && (user.location || - (user.stats && (user.stats.howToCount || user.stats.eventCount))) + (user.stats && + (user.stats.userCreatedHowtos || user.stats.userCreatedEvents))) ? true : false diff --git a/src/stores/databaseV2/clients/dexie.tsx b/src/stores/databaseV2/clients/dexie.tsx index 015eaf2991..9353a1975b 100644 --- a/src/stores/databaseV2/clients/dexie.tsx +++ b/src/stores/databaseV2/clients/dexie.tsx @@ -2,7 +2,7 @@ import { IDBEndpoint, DBDoc } from 'src/models/common.models' import Dexie from 'dexie' import { DBQueryOptions, DBQueryWhereOptions, AbstractDBClient } from '../types' import { DB_QUERY_DEFAULTS } from '../utils/db.utils' -import { DB_PREFIX } from '../config' +import { DB_ENDPOINTS } from '../endpoints' /** * Update the cache number either when making changes to db architecture @@ -155,10 +155,9 @@ const SCHEMA_BASE: IDexieSchema = { } // Ensure dexie also handles any prefixed database schema const MAPPED_SCHEMA = {} as IDexieSchema -console.log('db_prefix', DB_PREFIX) Object.keys(SCHEMA_BASE).forEach( endpoint => - (MAPPED_SCHEMA[`${DB_PREFIX}${endpoint}` as IDBEndpoint] = + (MAPPED_SCHEMA[DB_ENDPOINTS[endpoint] as IDBEndpoint] = SCHEMA_BASE[endpoint]), ) const DEXIE_SCHEMA = MAPPED_SCHEMA diff --git a/src/stores/databaseV2/clients/rtdb.tsx b/src/stores/databaseV2/clients/rtdb.tsx index b20ed2715f..10d9675d15 100644 --- a/src/stores/databaseV2/clients/rtdb.tsx +++ b/src/stores/databaseV2/clients/rtdb.tsx @@ -10,7 +10,7 @@ export class RealtimeDBClient implements AbstractDBClient { ***********************************************************************/ async getDoc(endpoint: IDBEndpoint, docId: string) { const snap = await db.ref(`${endpoint}/${docId}`).once('value') - return snap.exists ? (snap.val() as T) : undefined + return snap.exists() ? (snap.val() as T) : undefined } async setDoc(endpoint: IDBEndpoint, doc: DBDoc) { @@ -26,7 +26,7 @@ export class RealtimeDBClient implements AbstractDBClient { async getCollection(endpoint: IDBEndpoint) { try { const snap = await db.ref(endpoint).once('value') - return snap.exists && snap.val() + return snap.exists() && snap.val() ? Object.values(snap.val()) : [] } catch (error) { diff --git a/src/stores/databaseV2/config.ts b/src/stores/databaseV2/config.ts deleted file mode 100644 index 6c6dd2e33d..0000000000 --- a/src/stores/databaseV2/config.ts +++ /dev/null @@ -1,8 +0,0 @@ -const e = process.env -/** - * @remark - * - A prefix is used to simplify large-scale schema changes - * (a new prefix will essentially start all users with clean DBs), - * and allow multiple sites to use one DB (used for parallel test seed DBs) - */ -export const DB_PREFIX = e.REACT_APP_DB_PREFIX ? e.REACT_APP_DB_PREFIX : 'v3_' diff --git a/src/stores/databaseV2/endpoints.ts b/src/stores/databaseV2/endpoints.ts new file mode 100644 index 0000000000..3879b53bfa --- /dev/null +++ b/src/stores/databaseV2/endpoints.ts @@ -0,0 +1,30 @@ +// React apps populate a process variable, however it might not always be accessible outside +// (e.g. cypress will instead use it's own env to populate a prefix) +const e = process ? process.env : ({} as any) +/** + * A prefix can be used to simplify large-scale schema changes or multisite hosting + * and allow multiple sites to use one DB (used for parallel test seed DBs) + * e.g. oa_ + */ +const DB_PREFIX = e.REACT_APP_DB_PREFIX ? e.REACT_APP_DB_PREFIX : '' + +/** + * Mapping of generic database endpoints to specific prefixed and revisioned versions for the + * current implementation + * @example + * ``` + * const allHowtos = await db.get(DB_ENDPOINTS.howtos) + * ``` + * NOTE - these are a bit messy due to various migrations and changes + * In the future all endpoints should try to just retain prefix-base-revision, e.g. oa_users_rev20201012 + */ +export const DB_ENDPOINTS = { + howtos: `${DB_PREFIX}v3_howtos`, + users: `${DB_PREFIX}v3_users`, + tags: `${DB_PREFIX}v3_tags`, + events: `${DB_PREFIX}v3_events`, + mappins: `${DB_PREFIX}v3_mappins`, +} +export type DBEndpoint = keyof typeof DB_ENDPOINTS +// legacy - want to use upper case naming convention but keep alternate until all code migrated +export const DBEndpoints = DB_ENDPOINTS diff --git a/src/stores/databaseV2/index.tsx b/src/stores/databaseV2/index.tsx index c0887331ad..5922c8d5a4 100644 --- a/src/stores/databaseV2/index.tsx +++ b/src/stores/databaseV2/index.tsx @@ -10,21 +10,7 @@ import { } from './types' import { Observable, Observer } from 'rxjs' -import { DB_PREFIX } from './config' - -/** - * Consts and Types - * A few additional exports are provided to help ensure type safety. - * @remark - list required to populate db schema in dexie - * @remark - Mapping required to allow custom prefix for any of the endpoints - */ -const endpoints = ['howtos', 'users', 'tags', 'events', 'mappins'] as const -export type DBEndpoint = typeof endpoints[number] -const mappedEndpoints = {} as { [key in DBEndpoint]: string } -endpoints.forEach( - endpoint => (mappedEndpoints[endpoint] = `${DB_PREFIX}${endpoint}`), -) -export const DBEndpoints = mappedEndpoints +import { DBEndpoint, DB_ENDPOINTS } from './endpoints' /** * Main Database class @@ -42,7 +28,7 @@ export class DatabaseV2 implements AbstractDatabase { */ collection(endpoint: DBEndpoint) { // use mapped endpoint to allow custom db endpoint prefixes - const mappedEndpoint = DBEndpoints[endpoint] + const mappedEndpoint = DB_ENDPOINTS[endpoint] return new CollectionReference(mappedEndpoint, this._clients) } diff --git a/yarn.lock b/yarn.lock index 7e8cea2e5c..0e1a188fd4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5373,9 +5373,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000929, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001035, caniuse-lite@^1.0.30001038, caniuse-lite@^1.0.30001039: - version "1.0.30001043" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001043.tgz#1b561de27aefbe6ff99e41866b8d7d87840c513b" - integrity sha512-MrBDRPJPDBYwACtSQvxg9+fkna5jPXhJlKmuxenl/ml9uf8LHKlDmLpElu+zTW/bEz7lC1m0wTDD7jiIB+hgFg== + version "1.0.30001148" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001148.tgz" + integrity sha512-E66qcd0KMKZHNJQt9hiLZGE3J4zuTqE1OnU53miEVtylFbwOEmeA5OsRu90noZful+XGSQOni1aT2tiqu/9yYw== capture-exit@^2.0.0: version "2.0.0"